// phpcs:ignoreFile
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! function_exists( 'kirki_get_option' ) ) {
/**
* Get the value of a field.
* This is a deprecated function that we used when there was no API.
* Please use get_theme_mod() or get_option() instead.
* @see https://developer.wordpress.org/reference/functions/get_theme_mod/
* @see https://developer.wordpress.org/reference/functions/get_option/
*
* @return mixed
*/
function kirki_get_option( $option = '' ) {
_deprecated_function( __FUNCTION__, '1.0.0', sprintf( esc_html__( '%1$s or %2$s', 'kirki' ), 'get_theme_mod', 'get_option' ) );
return Kirki::get_option( '', $option );
}
}
if ( ! function_exists( 'kirki_sanitize_hex' ) ) {
function kirki_sanitize_hex( $color ) {
_deprecated_function( __FUNCTION__, '1.0.0', 'ariColor::newColor( $color )->toCSS( \'hex\' )' );
return Kirki_Color::sanitize_hex( $color );
}
}
if ( ! function_exists( 'kirki_get_rgb' ) ) {
function kirki_get_rgb( $hex, $implode = false ) {
_deprecated_function( __FUNCTION__, '1.0.0', 'ariColor::newColor( $color )->toCSS( \'rgb\' )' );
return Kirki_Color::get_rgb( $hex, $implode );
}
}
if ( ! function_exists( 'kirki_get_rgba' ) ) {
function kirki_get_rgba( $hex = '#fff', $opacity = 100 ) {
_deprecated_function( __FUNCTION__, '1.0.0', 'ariColor::newColor( $color )->toCSS( \'rgba\' )' );
return Kirki_Color::get_rgba( $hex, $opacity );
}
}
if ( ! function_exists( 'kirki_get_brightness' ) ) {
function kirki_get_brightness( $hex ) {
_deprecated_function( __FUNCTION__, '1.0.0', 'ariColor::newColor( $color )->lightness' );
return Kirki_Color::get_brightness( $hex );
}
}
if ( ! function_exists( 'Kirki' ) ) {
function Kirki() {
return \Kirki\Compatibility\Framework::get_instance();
}
}
/**
* Helper functions for interacting with the Store API.
*
* This file is autoloaded via composer.json.
*/
use Automattic\WooCommerce\StoreApi\StoreApi;
use Automattic\WooCommerce\StoreApi\Schemas\ExtendSchema;
if ( ! function_exists( 'woocommerce_store_api_register_endpoint_data' ) ) {
/**
* Register endpoint data under a specified namespace.
*
* @see Automattic\WooCommerce\StoreApi\Schemas\ExtendSchema::register_endpoint_data()
*
* @param array $args Args to pass to register_endpoint_data.
* @returns boolean|\WP_Error True on success, WP_Error on fail.
*/
function woocommerce_store_api_register_endpoint_data( $args ) {
try {
$extend = StoreApi::container()->get( ExtendSchema::class );
$extend->register_endpoint_data( $args );
} catch ( \Exception $error ) {
return new \WP_Error( 'error', $error->getMessage() );
}
return true;
}
}
if ( ! function_exists( 'woocommerce_store_api_register_update_callback' ) ) {
/**
* Add callback functions that can be executed by the cart/extensions endpoint.
*
* @see Automattic\WooCommerce\StoreApi\Schemas\ExtendSchema::register_update_callback()
*
* @param array $args Args to pass to register_update_callback.
* @returns boolean|\WP_Error True on success, WP_Error on fail.
*/
function woocommerce_store_api_register_update_callback( $args ) {
try {
$extend = StoreApi::container()->get( ExtendSchema::class );
$extend->register_update_callback( $args );
} catch ( \Exception $error ) {
return new \WP_Error( 'error', $error->getMessage() );
}
return true;
}
}
if ( ! function_exists( 'woocommerce_store_api_register_payment_requirements' ) ) {
/**
* Registers and validates payment requirements callbacks.
*
* @see Automattic\WooCommerce\StoreApi\Schemas\ExtendSchema::register_payment_requirements()
*
* @param array $args Args to pass to register_payment_requirements.
* @returns boolean|\WP_Error True on success, WP_Error on fail.
*/
function woocommerce_store_api_register_payment_requirements( $args ) {
try {
$extend = StoreApi::container()->get( ExtendSchema::class );
$extend->register_payment_requirements( $args );
} catch ( \Exception $error ) {
return new \WP_Error( 'error', $error->getMessage() );
}
return true;
}
}
if ( ! function_exists( 'woocommerce_store_api_get_formatter' ) ) {
/**
* Returns a formatter instance.
*
* @see Automattic\WooCommerce\StoreApi\Schemas\ExtendSchema::get_formatter()
*
* @param string $name Formatter name.
* @return Automattic\WooCommerce\StoreApi\Formatters\FormatterInterface
*/
function woocommerce_store_api_get_formatter( $name ) {
return StoreApi::container()->get( ExtendSchema::class )->get_formatter( $name );
}
}
/**
* WooCommerce Customer Functions
*
* Functions for customers.
*
* @package WooCommerce\Functions
* @version 2.2.0
*/
use Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore;
use Automattic\WooCommerce\Utilities\OrderUtil;
defined( 'ABSPATH' ) || exit;
/**
* Prevent any user who cannot 'edit_posts' (subscribers, customers etc) from seeing the admin bar.
*
* Note: get_option( 'woocommerce_lock_down_admin', true ) is a deprecated option here for backwards compatibility. Defaults to true.
*
* @param bool $show_admin_bar If should display admin bar.
* @return bool
*/
function wc_disable_admin_bar( $show_admin_bar ) {
if ( apply_filters( 'woocommerce_disable_admin_bar', true ) && ! ( current_user_can( 'edit_posts' ) || current_user_can( 'manage_woocommerce' ) ) ) {
$show_admin_bar = false;
}
return $show_admin_bar;
}
add_filter( 'show_admin_bar', 'wc_disable_admin_bar', 10, 1 ); // phpcs:ignore WordPress.VIP.AdminBarRemoval.RemovalDetected
if ( ! function_exists( 'wc_create_new_customer' ) ) {
/**
* Create a new customer.
*
* @param string $email Customer email.
* @param string $username Customer username.
* @param string $password Customer password.
* @param array $args List of arguments to pass to `wp_insert_user()`.
* @return int|WP_Error Returns WP_Error on failure, Int (user ID) on success.
*/
function wc_create_new_customer( $email, $username = '', $password = '', $args = array() ) {
if ( empty( $email ) || ! is_email( $email ) ) {
return new WP_Error( 'registration-error-invalid-email', __( 'Please provide a valid email address.', 'woocommerce' ) );
}
if ( email_exists( $email ) ) {
return new WP_Error( 'registration-error-email-exists', apply_filters( 'woocommerce_registration_error_email_exists', __( 'An account is already registered with your email address. Please log in.', 'woocommerce' ), $email ) );
}
if ( 'yes' === get_option( 'woocommerce_registration_generate_username', 'yes' ) && empty( $username ) ) {
$username = wc_create_new_customer_username( $email, $args );
}
$username = sanitize_user( $username );
if ( empty( $username ) || ! validate_username( $username ) ) {
return new WP_Error( 'registration-error-invalid-username', __( 'Please enter a valid account username.', 'woocommerce' ) );
}
if ( username_exists( $username ) ) {
return new WP_Error( 'registration-error-username-exists', __( 'An account is already registered with that username. Please choose another.', 'woocommerce' ) );
}
// Handle password creation.
$password_generated = false;
if ( 'yes' === get_option( 'woocommerce_registration_generate_password' ) && empty( $password ) ) {
$password = wp_generate_password();
$password_generated = true;
}
if ( empty( $password ) ) {
return new WP_Error( 'registration-error-missing-password', __( 'Please enter an account password.', 'woocommerce' ) );
}
// Use WP_Error to handle registration errors.
$errors = new WP_Error();
do_action( 'woocommerce_register_post', $username, $email, $errors );
$errors = apply_filters( 'woocommerce_registration_errors', $errors, $username, $email );
if ( $errors->get_error_code() ) {
return $errors;
}
$new_customer_data = apply_filters(
'woocommerce_new_customer_data',
array_merge(
$args,
array(
'user_login' => $username,
'user_pass' => $password,
'user_email' => $email,
'role' => 'customer',
)
)
);
$customer_id = wp_insert_user( $new_customer_data );
if ( is_wp_error( $customer_id ) ) {
return $customer_id;
}
do_action( 'woocommerce_created_customer', $customer_id, $new_customer_data, $password_generated );
return $customer_id;
}
}
/**
* Create a unique username for a new customer.
*
* @since 3.6.0
* @param string $email New customer email address.
* @param array $new_user_args Array of new user args, maybe including first and last names.
* @param string $suffix Append string to username to make it unique.
* @return string Generated username.
*/
function wc_create_new_customer_username( $email, $new_user_args = array(), $suffix = '' ) {
$username_parts = array();
if ( isset( $new_user_args['first_name'] ) ) {
$username_parts[] = sanitize_user( $new_user_args['first_name'], true );
}
if ( isset( $new_user_args['last_name'] ) ) {
$username_parts[] = sanitize_user( $new_user_args['last_name'], true );
}
// Remove empty parts.
$username_parts = array_filter( $username_parts );
// If there are no parts, e.g. name had unicode chars, or was not provided, fallback to email.
if ( empty( $username_parts ) ) {
$email_parts = explode( '@', $email );
$email_username = $email_parts[0];
// Exclude common prefixes.
if ( in_array(
$email_username,
array(
'sales',
'hello',
'mail',
'contact',
'info',
),
true
) ) {
// Get the domain part.
$email_username = $email_parts[1];
}
$username_parts[] = sanitize_user( $email_username, true );
}
$username = wc_strtolower( implode( '.', $username_parts ) );
if ( $suffix ) {
$username .= $suffix;
}
/**
* WordPress 4.4 - filters the list of blocked usernames.
*
* @since 3.7.0
* @param array $usernames Array of blocked usernames.
*/
$illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );
// Stop illegal logins and generate a new random username.
if ( in_array( strtolower( $username ), array_map( 'strtolower', $illegal_logins ), true ) ) {
$new_args = array();
/**
* Filter generated customer username.
*
* @since 3.7.0
* @param string $username Generated username.
* @param string $email New customer email address.
* @param array $new_user_args Array of new user args, maybe including first and last names.
* @param string $suffix Append string to username to make it unique.
*/
$new_args['first_name'] = apply_filters(
'woocommerce_generated_customer_username',
'woo_user_' . zeroise( wp_rand( 0, 9999 ), 4 ),
$email,
$new_user_args,
$suffix
);
return wc_create_new_customer_username( $email, $new_args, $suffix );
}
if ( username_exists( $username ) ) {
// Generate something unique to append to the username in case of a conflict with another user.
$suffix = '-' . zeroise( wp_rand( 0, 9999 ), 4 );
return wc_create_new_customer_username( $email, $new_user_args, $suffix );
}
/**
* Filter new customer username.
*
* @since 3.7.0
* @param string $username Customer username.
* @param string $email New customer email address.
* @param array $new_user_args Array of new user args, maybe including first and last names.
* @param string $suffix Append string to username to make it unique.
*/
return apply_filters( 'woocommerce_new_customer_username', $username, $email, $new_user_args, $suffix );
}
/**
* Login a customer (set auth cookie and set global user object).
*
* @param int $customer_id Customer ID.
*/
function wc_set_customer_auth_cookie( $customer_id ) {
wp_set_current_user( $customer_id );
wp_set_auth_cookie( $customer_id, true );
// Update session.
WC()->session->init_session_cookie();
}
/**
* Get past orders (by email) and update them.
*
* @param int $customer_id Customer ID.
* @return int
*/
function wc_update_new_customer_past_orders( $customer_id ) {
$linked = 0;
$complete = 0;
$customer = get_user_by( 'id', absint( $customer_id ) );
$customer_orders = wc_get_orders(
array(
'limit' => -1,
'customer' => array( array( 0, $customer->user_email ) ),
'return' => 'ids',
)
);
if ( ! empty( $customer_orders ) ) {
foreach ( $customer_orders as $order_id ) {
$order = wc_get_order( $order_id );
if ( ! $order ) {
continue;
}
$order->set_customer_id( $customer->ID );
$order->save();
if ( $order->has_downloadable_item() ) {
$data_store = WC_Data_Store::load( 'customer-download' );
$data_store->delete_by_order_id( $order->get_id() );
wc_downloadable_product_permissions( $order->get_id(), true );
}
do_action( 'woocommerce_update_new_customer_past_order', $order_id, $customer );
if ( $order->get_status() === 'wc-completed' ) {
$complete++;
}
$linked++;
}
}
if ( $complete ) {
update_user_meta( $customer_id, 'paying_customer', 1 );
update_user_meta( $customer_id, '_order_count', '' );
update_user_meta( $customer_id, '_money_spent', '' );
delete_user_meta( $customer_id, '_last_order' );
}
return $linked;
}
/**
* Order payment completed - This is a paying customer.
*
* @param int $order_id Order ID.
*/
function wc_paying_customer( $order_id ) {
$order = wc_get_order( $order_id );
$customer_id = $order->get_customer_id();
if ( $customer_id > 0 && 'shop_order_refund' !== $order->get_type() ) {
$customer = new WC_Customer( $customer_id );
if ( ! $customer->get_is_paying_customer() ) {
$customer->set_is_paying_customer( true );
$customer->save();
}
}
}
add_action( 'woocommerce_payment_complete', 'wc_paying_customer' );
add_action( 'woocommerce_order_status_completed', 'wc_paying_customer' );
/**
* Checks if a user (by email or ID or both) has bought an item.
*
* @param string $customer_email Customer email to check.
* @param int $user_id User ID to check.
* @param int $product_id Product ID to check.
* @return bool
*/
function wc_customer_bought_product( $customer_email, $user_id, $product_id ) {
global $wpdb;
$result = apply_filters( 'woocommerce_pre_customer_bought_product', null, $customer_email, $user_id, $product_id );
if ( null !== $result ) {
return $result;
}
$transient_name = 'wc_customer_bought_product_' . md5( $customer_email . $user_id );
$transient_version = WC_Cache_Helper::get_transient_version( 'orders' );
$transient_value = get_transient( $transient_name );
if ( isset( $transient_value['value'], $transient_value['version'] ) && $transient_value['version'] === $transient_version ) {
$result = $transient_value['value'];
} else {
$customer_data = array( $user_id );
if ( $user_id ) {
$user = get_user_by( 'id', $user_id );
if ( isset( $user->user_email ) ) {
$customer_data[] = $user->user_email;
}
}
if ( is_email( $customer_email ) ) {
$customer_data[] = $customer_email;
}
$customer_data = array_map( 'esc_sql', array_filter( array_unique( $customer_data ) ) );
$statuses = array_map( 'esc_sql', wc_get_is_paid_statuses() );
if ( count( $customer_data ) === 0 ) {
return false;
}
if ( OrderUtil::custom_orders_table_usage_is_enabled() ) {
$statuses = array_map(
function ( $status ) {
return "wc-$status";
},
$statuses
);
$order_table = OrdersTableDataStore::get_orders_table_name();
$sql = "
SELECT im.meta_value FROM $order_table AS o
INNER JOIN {$wpdb->prefix}woocommerce_order_items AS i ON o.id = i.order_id
INNER JOIN {$wpdb->prefix}woocommerce_order_itemmeta AS im ON i.order_item_id = im.order_item_id
WHERE o.status IN ('" . implode( "','", $statuses ) . "')
AND im.meta_key IN ('_product_id', '_variation_id' )
AND im.meta_value != 0
AND ( o.customer_id IN ('" . implode( "','", $customer_data ) . "') OR o.billing_email IN ('" . implode( "','", $customer_data ) . "') )
";
$result = $wpdb->get_col( $sql );
} else {
$result = $wpdb->get_col(
"
SELECT im.meta_value FROM {$wpdb->posts} AS p
INNER JOIN {$wpdb->postmeta} AS pm ON p.ID = pm.post_id
INNER JOIN {$wpdb->prefix}woocommerce_order_items AS i ON p.ID = i.order_id
INNER JOIN {$wpdb->prefix}woocommerce_order_itemmeta AS im ON i.order_item_id = im.order_item_id
WHERE p.post_status IN ( 'wc-" . implode( "','wc-", $statuses ) . "' )
AND pm.meta_key IN ( '_billing_email', '_customer_user' )
AND im.meta_key IN ( '_product_id', '_variation_id' )
AND im.meta_value != 0
AND pm.meta_value IN ( '" . implode( "','", $customer_data ) . "' )
"
); // WPCS: unprepared SQL ok.
}
$result = array_map( 'absint', $result );
$transient_value = array(
'version' => $transient_version,
'value' => $result,
);
set_transient( $transient_name, $transient_value, DAY_IN_SECONDS * 30 );
}
return in_array( absint( $product_id ), $result, true );
}
/**
* Checks if the current user has a role.
*
* @param string $role The role.
* @return bool
*/
function wc_current_user_has_role( $role ) {
return wc_user_has_role( wp_get_current_user(), $role );
}
/**
* Checks if a user has a role.
*
* @param int|\WP_User $user The user.
* @param string $role The role.
* @return bool
*/
function wc_user_has_role( $user, $role ) {
if ( ! is_object( $user ) ) {
$user = get_userdata( $user );
}
if ( ! $user || ! $user->exists() ) {
return false;
}
return in_array( $role, $user->roles, true );
}
/**
* Checks if a user has a certain capability.
*
* @param array $allcaps All capabilities.
* @param array $caps Capabilities.
* @param array $args Arguments.
*
* @return array The filtered array of all capabilities.
*/
function wc_customer_has_capability( $allcaps, $caps, $args ) {
if ( isset( $caps[0] ) ) {
switch ( $caps[0] ) {
case 'view_order':
$user_id = intval( $args[1] );
$order = wc_get_order( $args[2] );
if ( $order && $user_id === $order->get_user_id() ) {
$allcaps['view_order'] = true;
}
break;
case 'pay_for_order':
$user_id = intval( $args[1] );
$order_id = isset( $args[2] ) ? $args[2] : null;
// When no order ID, we assume it's a new order
// and thus, customer can pay for it.
if ( ! $order_id ) {
$allcaps['pay_for_order'] = true;
break;
}
$order = wc_get_order( $order_id );
if ( $order && ( $user_id === $order->get_user_id() || ! $order->get_user_id() ) ) {
$allcaps['pay_for_order'] = true;
}
break;
case 'order_again':
$user_id = intval( $args[1] );
$order = wc_get_order( $args[2] );
if ( $order && $user_id === $order->get_user_id() ) {
$allcaps['order_again'] = true;
}
break;
case 'cancel_order':
$user_id = intval( $args[1] );
$order = wc_get_order( $args[2] );
if ( $order && $user_id === $order->get_user_id() ) {
$allcaps['cancel_order'] = true;
}
break;
case 'download_file':
$user_id = intval( $args[1] );
$download = $args[2];
if ( $download && $user_id === $download->get_user_id() ) {
$allcaps['download_file'] = true;
}
break;
}
}
return $allcaps;
}
add_filter( 'user_has_cap', 'wc_customer_has_capability', 10, 3 );
/**
* Safe way of allowing shop managers restricted capabilities that will remove
* access to the capabilities if WooCommerce is deactivated.
*
* @since 3.5.4
* @param bool[] $allcaps Array of key/value pairs where keys represent a capability name and boolean values
* represent whether the user has that capability.
* @param string[] $caps Required primitive capabilities for the requested capability.
* @param array $args Arguments that accompany the requested capability check.
* @param WP_User $user The user object.
* @return bool[]
*/
function wc_shop_manager_has_capability( $allcaps, $caps, $args, $user ) {
if ( wc_user_has_role( $user, 'shop_manager' ) ) {
// @see wc_modify_map_meta_cap, which limits editing to customers.
$allcaps['edit_users'] = true;
}
return $allcaps;
}
add_filter( 'user_has_cap', 'wc_shop_manager_has_capability', 10, 4 );
/**
* Modify the list of editable roles to prevent non-admin adding admin users.
*
* @param array $roles Roles.
* @return array
*/
function wc_modify_editable_roles( $roles ) {
if ( is_multisite() && is_super_admin() ) {
return $roles;
}
if ( ! wc_current_user_has_role( 'administrator' ) ) {
unset( $roles['administrator'] );
if ( wc_current_user_has_role( 'shop_manager' ) ) {
$shop_manager_editable_roles = apply_filters( 'woocommerce_shop_manager_editable_roles', array( 'customer' ) );
return array_intersect_key( $roles, array_flip( $shop_manager_editable_roles ) );
}
}
return $roles;
}
add_filter( 'editable_roles', 'wc_modify_editable_roles' );
/**
* Modify capabilities to prevent non-admin users editing admin users.
*
* $args[0] will be the user being edited in this case.
*
* @param array $caps Array of caps.
* @param string $cap Name of the cap we are checking.
* @param int $user_id ID of the user being checked against.
* @param array $args Arguments.
* @return array
*/
function wc_modify_map_meta_cap( $caps, $cap, $user_id, $args ) {
if ( is_multisite() && is_super_admin() ) {
return $caps;
}
switch ( $cap ) {
case 'edit_user':
case 'remove_user':
case 'promote_user':
case 'delete_user':
if ( ! isset( $args[0] ) || $args[0] === $user_id ) {
break;
} else {
if ( ! wc_current_user_has_role( 'administrator' ) ) {
if ( wc_user_has_role( $args[0], 'administrator' ) ) {
$caps[] = 'do_not_allow';
} elseif ( wc_current_user_has_role( 'shop_manager' ) ) {
// Shop managers can only edit customer info.
$userdata = get_userdata( $args[0] );
$shop_manager_editable_roles = apply_filters( 'woocommerce_shop_manager_editable_roles', array( 'customer' ) );
if ( property_exists( $userdata, 'roles' ) && ! empty( $userdata->roles ) && ! array_intersect( $userdata->roles, $shop_manager_editable_roles ) ) {
$caps[] = 'do_not_allow';
}
}
}
}
break;
}
return $caps;
}
add_filter( 'map_meta_cap', 'wc_modify_map_meta_cap', 10, 4 );
/**
* Get customer download permissions from the database.
*
* @param int $customer_id Customer/User ID.
* @return array
*/
function wc_get_customer_download_permissions( $customer_id ) {
$data_store = WC_Data_Store::load( 'customer-download' );
return apply_filters( 'woocommerce_permission_list', $data_store->get_downloads_for_customer( $customer_id ), $customer_id );
}
/**
* Get customer available downloads.
*
* @param int $customer_id Customer/User ID.
* @return array
*/
function wc_get_customer_available_downloads( $customer_id ) {
$downloads = array();
$_product = null;
$order = null;
$file_number = 0;
// Get results from valid orders only.
$results = wc_get_customer_download_permissions( $customer_id );
if ( $results ) {
foreach ( $results as $result ) {
$order_id = intval( $result->order_id );
if ( ! $order || $order->get_id() !== $order_id ) {
// New order.
$order = wc_get_order( $order_id );
$_product = null;
}
// Make sure the order exists for this download.
if ( ! $order ) {
continue;
}
// Check if downloads are permitted.
if ( ! $order->is_download_permitted() ) {
continue;
}
$product_id = intval( $result->product_id );
if ( ! $_product || $_product->get_id() !== $product_id ) {
// New product.
$file_number = 0;
$_product = wc_get_product( $product_id );
}
// Check product exists and has the file.
if ( ! $_product || ! $_product->exists() || ! $_product->has_file( $result->download_id ) ) {
continue;
}
$download_file = $_product->get_file( $result->download_id );
// If the downloadable file has been disabled (it may be located in an untrusted location) then do not return it.
if ( ! $download_file->get_enabled() ) {
continue;
}
// Download name will be 'Product Name' for products with a single downloadable file, and 'Product Name - File X' for products with multiple files.
$download_name = apply_filters(
'woocommerce_downloadable_product_name',
$download_file['name'],
$_product,
$result->download_id,
$file_number
);
$downloads[] = array(
'download_url' => add_query_arg(
array(
'download_file' => $product_id,
'order' => $result->order_key,
'email' => rawurlencode( $result->user_email ),
'key' => $result->download_id,
),
home_url( '/' )
),
'download_id' => $result->download_id,
'product_id' => $_product->get_id(),
'product_name' => $_product->get_name(),
'product_url' => $_product->is_visible() ? $_product->get_permalink() : '', // Since 3.3.0.
'download_name' => $download_name,
'order_id' => $order->get_id(),
'order_key' => $order->get_order_key(),
'downloads_remaining' => $result->downloads_remaining,
'access_expires' => $result->access_expires,
'file' => array(
'name' => $download_file->get_name(),
'file' => $download_file->get_file(),
),
);
$file_number++;
}
}
return apply_filters( 'woocommerce_customer_available_downloads', $downloads, $customer_id );
}
/**
* Get total spent by customer.
*
* @param int $user_id User ID.
* @return string
*/
function wc_get_customer_total_spent( $user_id ) {
$customer = new WC_Customer( $user_id );
return $customer->get_total_spent();
}
/**
* Get total orders by customer.
*
* @param int $user_id User ID.
* @return int
*/
function wc_get_customer_order_count( $user_id ) {
$customer = new WC_Customer( $user_id );
return $customer->get_order_count();
}
/**
* Reset _customer_user on orders when a user is deleted.
*
* @param int $user_id User ID.
*/
function wc_reset_order_customer_id_on_deleted_user( $user_id ) {
global $wpdb;
if ( OrderUtil::custom_orders_table_usage_is_enabled() ) {
$order_table_ds = wc_get_container()->get( OrdersTableDataStore::class );
$order_table = $order_table_ds::get_orders_table_name();
$wpdb->update(
$order_table,
array(
'customer_id' => 0,
'date_updated_gmt' => current_time( 'mysql', true ),
),
array(
'customer_id' => $user_id,
),
array(
'%d',
'%s',
),
array(
'%d',
)
);
}
if ( ! OrderUtil::custom_orders_table_usage_is_enabled() || OrderUtil::is_custom_order_tables_in_sync() ) {
$wpdb->update(
$wpdb->postmeta,
array(
'meta_value' => 0, //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value
),
array(
'meta_key' => '_customer_user', //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key
'meta_value' => $user_id, //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value
)
);
}
}
add_action( 'deleted_user', 'wc_reset_order_customer_id_on_deleted_user' );
/**
* Get review verification status.
*
* @param int $comment_id Comment ID.
* @return bool
*/
function wc_review_is_from_verified_owner( $comment_id ) {
$verified = get_comment_meta( $comment_id, 'verified', true );
return '' === $verified ? WC_Comments::add_comment_purchase_verification( $comment_id ) : (bool) $verified;
}
/**
* Disable author archives for customers.
*
* @since 2.5.0
*/
function wc_disable_author_archives_for_customers() {
global $author;
if ( is_author() ) {
$user = get_user_by( 'id', $author );
if ( user_can( $user, 'customer' ) && ! user_can( $user, 'edit_posts' ) ) {
wp_safe_redirect( wc_get_page_permalink( 'shop' ) );
exit;
}
}
}
add_action( 'template_redirect', 'wc_disable_author_archives_for_customers' );
/**
* Hooks into the `profile_update` hook to set the user last updated timestamp.
*
* @since 2.6.0
* @param int $user_id The user that was updated.
* @param array $old The profile fields pre-change.
*/
function wc_update_profile_last_update_time( $user_id, $old ) {
wc_set_user_last_update_time( $user_id );
}
add_action( 'profile_update', 'wc_update_profile_last_update_time', 10, 2 );
/**
* Hooks into the update user meta function to set the user last updated timestamp.
*
* @since 2.6.0
* @param int $meta_id ID of the meta object that was changed.
* @param int $user_id The user that was updated.
* @param string $meta_key Name of the meta key that was changed.
* @param mixed $_meta_value Value of the meta that was changed.
*/
function wc_meta_update_last_update_time( $meta_id, $user_id, $meta_key, $_meta_value ) {
$keys_to_track = apply_filters( 'woocommerce_user_last_update_fields', array( 'first_name', 'last_name' ) );
$update_time = in_array( $meta_key, $keys_to_track, true ) ? true : false;
$update_time = 'billing_' === substr( $meta_key, 0, 8 ) ? true : $update_time;
$update_time = 'shipping_' === substr( $meta_key, 0, 9 ) ? true : $update_time;
if ( $update_time ) {
wc_set_user_last_update_time( $user_id );
}
}
add_action( 'update_user_meta', 'wc_meta_update_last_update_time', 10, 4 );
/**
* Sets a user's "last update" time to the current timestamp.
*
* @since 2.6.0
* @param int $user_id The user to set a timestamp for.
*/
function wc_set_user_last_update_time( $user_id ) {
update_user_meta( $user_id, 'last_update', gmdate( 'U' ) );
}
/**
* Get customer saved payment methods list.
*
* @since 2.6.0
* @param int $customer_id Customer ID.
* @return array
*/
function wc_get_customer_saved_methods_list( $customer_id ) {
return apply_filters( 'woocommerce_saved_payment_methods_list', array(), $customer_id );
}
/**
* Get info about customer's last order.
*
* @since 2.6.0
* @param int $customer_id Customer ID.
* @return WC_Order|bool Order object if successful or false.
*/
function wc_get_customer_last_order( $customer_id ) {
$customer = new WC_Customer( $customer_id );
return $customer->get_last_order();
}
/**
* Add support for searching by display_name.
*
* @since 3.2.0
* @param array $search_columns Column names.
* @return array
*/
function wc_user_search_columns( $search_columns ) {
$search_columns[] = 'display_name';
return $search_columns;
}
add_filter( 'user_search_columns', 'wc_user_search_columns' );
/**
* When a user is deleted in WordPress, delete corresponding WooCommerce data.
*
* @param int $user_id User ID being deleted.
*/
function wc_delete_user_data( $user_id ) {
global $wpdb;
// Clean up sessions.
$wpdb->delete(
$wpdb->prefix . 'woocommerce_sessions',
array(
'session_key' => $user_id,
)
);
// Revoke API keys.
$wpdb->delete(
$wpdb->prefix . 'woocommerce_api_keys',
array(
'user_id' => $user_id,
)
);
// Clean up payment tokens.
$payment_tokens = WC_Payment_Tokens::get_customer_tokens( $user_id );
foreach ( $payment_tokens as $payment_token ) {
$payment_token->delete();
}
}
add_action( 'delete_user', 'wc_delete_user_data' );
/**
* Store user agents. Used for tracker.
*
* @since 3.0.0
* @param string $user_login User login.
* @param int|object $user User.
*/
function wc_maybe_store_user_agent( $user_login, $user ) {
if ( 'yes' === get_option( 'woocommerce_allow_tracking', 'no' ) && user_can( $user, 'manage_woocommerce' ) ) {
$admin_user_agents = array_filter( (array) get_option( 'woocommerce_tracker_ua', array() ) );
$admin_user_agents[] = wc_get_user_agent();
update_option( 'woocommerce_tracker_ua', array_unique( $admin_user_agents ), false );
}
}
add_action( 'wp_login', 'wc_maybe_store_user_agent', 10, 2 );
/**
* Update logic triggered on login.
*
* @since 3.4.0
* @param string $user_login User login.
* @param object $user User.
*/
function wc_user_logged_in( $user_login, $user ) {
wc_update_user_last_active( $user->ID );
update_user_meta( $user->ID, '_woocommerce_load_saved_cart_after_login', 1 );
}
add_action( 'wp_login', 'wc_user_logged_in', 10, 2 );
/**
* Update when the user was last active.
*
* @since 3.4.0
*/
function wc_current_user_is_active() {
if ( ! is_user_logged_in() ) {
return;
}
wc_update_user_last_active( get_current_user_id() );
}
add_action( 'wp', 'wc_current_user_is_active', 10 );
/**
* Set the user last active timestamp to now.
*
* @since 3.4.0
* @param int $user_id User ID to mark active.
*/
function wc_update_user_last_active( $user_id ) {
if ( ! $user_id ) {
return;
}
update_user_meta( $user_id, 'wc_last_active', (string) strtotime( gmdate( 'Y-m-d', time() ) ) );
}
/**
* Translate WC roles using the woocommerce textdomain.
*
* @since 3.7.0
* @param string $translation Translated text.
* @param string $text Text to translate.
* @param string $context Context information for the translators.
* @param string $domain Text domain. Unique identifier for retrieving translated strings.
* @return string
*/
function wc_translate_user_roles( $translation, $text, $context, $domain ) {
// translate_user_role() only accepts a second parameter starting in WP 5.2.
if ( version_compare( get_bloginfo( 'version' ), '5.2', '<' ) ) {
return $translation;
}
if ( 'User role' === $context && 'default' === $domain && in_array( $text, array( 'Shop manager', 'Customer' ), true ) ) {
return translate_user_role( $text, 'woocommerce' );
}
return $translation;
}
add_filter( 'gettext_with_context', 'wc_translate_user_roles', 10, 4 );
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=97)}({10:function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
/*!
* Select2 4.0.2
* https://select2.github.io
*
* Released under the MIT license
* https://github.com/select2/select2/blob/master/LICENSE.md
*/!function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var t=e.fn.select2.amd;return function(){
/**
* @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/almond for details
*/
var e,n,i;t&&t.requirejs||(t?n=t:t={},function(t){var o,s,a,l,c={},u={},d={},p={},h=Object.prototype.hasOwnProperty,f=[].slice,g=/\.js$/;function m(e,t){return h.call(e,t)}function v(e,t){var n,r,i,o,s,a,l,c,u,p,h,f=t&&t.split("/"),m=d.map,v=m&&m["*"]||{};if(e&&"."===e.charAt(0))if(t){for(s=(e=e.split("/")).length-1,d.nodeIdCompat&&g.test(e[s])&&(e[s]=e[s].replace(g,"")),e=f.slice(0,f.length-1).concat(e),u=0;u0&&(e.splice(u-1,2),u-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((f||v)&&m){for(u=(n=e.split("/")).length;u>0;u-=1){if(r=n.slice(0,u).join("/"),f)for(p=f.length;p>0;p-=1)if((i=m[f.slice(0,p).join("/")])&&(i=i[r])){o=i,a=u;break}if(o)break;!l&&v&&v[r]&&(l=v[r],c=u)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function y(e,t){return function(){var n=f.call(arguments,0);return"string"!=typeof n[0]&&1===n.length&&n.push(null),s.apply(void 0,n.concat([e,t]))}}function _(e){return function(t){c[e]=t}}function $(e){if(m(u,e)){var t=u[e];delete u[e],p[e]=!0,o.apply(void 0,t)}if(!m(c,e)&&!m(p,e))throw new Error("No "+e);return c[e]}function b(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function w(e){return function(){return d&&d.config&&d.config[e]||{}}}a=function(e,t){var n,r=b(e),i=r[0];return e=r[1],i&&(n=$(i=v(i,t))),i?e=n&&n.normalize?n.normalize(e,function(e){return function(t){return v(t,e)}}(t)):v(e,t):(i=(r=b(e=v(e,t)))[0],e=r[1],i&&(n=$(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:n}},l={require:function(e){return y(e)},exports:function(e){var t=c[e];return void 0!==t?t:c[e]={}},module:function(e){return{id:e,uri:"",exports:c[e],config:w(e)}}},o=function(e,t,n,i){var o,s,d,h,f,g,v=[],b=r(n);if(i=i||e,"undefined"===b||"function"===b){for(t=!t.length&&n.length?["require","exports","module"]:t,f=0;f0&&(n.call(arguments,e.prototype.constructor),i=t.prototype.constructor),i.apply(this,arguments)}t.displayName=e.displayName,o.prototype=new function(){this.constructor=o};for(var s=0;s":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,(function(e){return t[e]}))},t.appendMany=function(t,n){if("1.7"===e.fn.jquery.substr(0,3)){var r=e();e.map(n,(function(e){r=r.add(e)})),n=r}t.append(n)},t})),t.define("select2/results",["jquery","./utils"],(function(e,t){function n(e,t,r){this.$element=e,this.data=r,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var r=e(''),i=this.options.get("translations").get(t.message);r.append(n(i(t.args))),r[0].className+=" select2-results__message",this.$results.append(r)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n-1?t.attr("aria-selected","true"):t.attr("aria-selected","false")}));var o=i.filter("[aria-selected=true]");o.length>0?o.first().trigger("mouseenter"):i.first().trigger("mouseenter")}))},n.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(t){var n=document.createElement("li");n.className="select2-results__option";var r={role:"treeitem","aria-selected":"false"};for(var i in t.disabled&&(delete r["aria-selected"],r["aria-disabled"]="true"),null==t.id&&delete r["aria-selected"],null!=t._resultId&&(n.id=t._resultId),t.title&&(n.title=t.title),t.children&&(r.role="group",r["aria-label"]=t.text,delete r["aria-selected"]),r){var o=r[i];n.setAttribute(i,o)}if(t.children){var s=e(n),a=document.createElement("strong");a.className="select2-results__group",e(a),this.template(t,a);for(var l=[],c=0;c",{class:"select2-results__options select2-results__options--nested"});p.append(l),s.append(a),s.append(p)}else this.template(t,n);return e.data(n,"data",t),n},n.prototype.bind=function(t,n){var r=this,i=t.id+"-results";this.$results.attr("id",i),t.on("results:all",(function(e){r.clear(),r.append(e.data),t.isOpen()&&r.setClasses()})),t.on("results:append",(function(e){r.append(e.data),t.isOpen()&&r.setClasses()})),t.on("query",(function(e){r.hideMessages(),r.showLoading(e)})),t.on("select",(function(){t.isOpen()&&r.setClasses()})),t.on("unselect",(function(){t.isOpen()&&r.setClasses()})),t.on("open",(function(){r.$results.attr("aria-expanded","true"),r.$results.attr("aria-hidden","false"),r.setClasses(),r.ensureHighlightVisible()})),t.on("close",(function(){r.$results.attr("aria-expanded","false"),r.$results.attr("aria-hidden","true"),r.$results.removeAttr("aria-activedescendant")})),t.on("results:toggle",(function(){var e=r.getHighlightedResults();0!==e.length&&e.trigger("mouseup")})),t.on("results:select",(function(){var e=r.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?r.trigger("close",{}):r.trigger("select",{data:t})}})),t.on("results:previous",(function(){var e=r.getHighlightedResults(),t=r.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var i=n-1;0===e.length&&(i=0);var o=t.eq(i);o.trigger("mouseenter");var s=r.$results.offset().top,a=o.offset().top,l=r.$results.scrollTop()+(a-s);0===i?r.$results.scrollTop(0):a-s<0&&r.$results.scrollTop(l)}})),t.on("results:next",(function(){var e=r.getHighlightedResults(),t=r.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var o=r.$results.offset().top+r.$results.outerHeight(!1),s=i.offset().top+i.outerHeight(!1),a=r.$results.scrollTop()+s-o;0===n?r.$results.scrollTop(0):s>o&&r.$results.scrollTop(a)}})),t.on("results:focus",(function(e){e.element.addClass("select2-results__option--highlighted")})),t.on("results:message",(function(e){r.displayMessage(e)})),e.fn.mousewheel&&this.$results.on("mousewheel",(function(e){var t=r.$results.scrollTop(),n=r.$results.get(0).scrollHeight-t+e.deltaY,i=e.deltaY>0&&t-e.deltaY<=0,o=e.deltaY<0&&n<=r.$results.height();i?(r.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):o&&(r.$results.scrollTop(r.$results.get(0).scrollHeight-r.$results.height()),e.preventDefault(),e.stopPropagation())})),this.$results.on("mouseup",".select2-results__option[aria-selected]",(function(t){var n=e(this),i=n.data("data");"true"!==n.attr("aria-selected")?r.trigger("select",{originalEvent:t,data:i}):r.options.get("multiple")?r.trigger("unselect",{originalEvent:t,data:i}):r.trigger("close",{})})),this.$results.on("mouseenter",".select2-results__option[aria-selected]",(function(t){var n=e(this).data("data");r.getHighlightedResults().removeClass("select2-results__option--highlighted"),r.trigger("results:focus",{data:n,element:e(this)})}))},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,r=e.offset().top,i=this.$results.scrollTop()+(r-n),o=r-n;i-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(i)}},n.prototype.template=function(t,n){var r=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),o=r(t,n);null==o?n.style.display="none":"string"==typeof o?n.innerHTML=i(o):e(n).append(o)},n})),t.define("select2/keys",[],(function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}})),t.define("select2/selection/base",["jquery","../utils","../keys"],(function(e,t,n){function r(e,t){this.$element=e,this.options=t,r.__super__.constructor.call(this)}return t.Extend(r,t.Observable),r.prototype.render=function(){var t=e('');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),t.attr("title",this.$element.attr("title")),t.attr("tabindex",this._tabindex),this.$selection=t,t},r.prototype.bind=function(e,t){var r=this,i=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",(function(e){r.trigger("focus",e)})),this.$selection.on("blur",(function(e){r._handleBlur(e)})),this.$selection.on("keydown",(function(e){r.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()})),e.on("results:focus",(function(e){r.$selection.attr("aria-activedescendant",e.data._resultId)})),e.on("selection:update",(function(e){r.update(e.data)})),e.on("open",(function(){r.$selection.attr("aria-expanded","true"),r.$selection.attr("aria-owns",i),r._attachCloseHandler(e)})),e.on("close",(function(){r.$selection.attr("aria-expanded","false"),r.$selection.removeAttr("aria-activedescendant"),r.$selection.removeAttr("aria-owns"),r.$selection.focus(),r._detachCloseHandler(e)})),e.on("enable",(function(){r.$selection.attr("tabindex",r._tabindex)})),e.on("disable",(function(){r.$selection.attr("tabindex","-1")}))},r.prototype._handleBlur=function(t){var n=this;window.setTimeout((function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)}),1)},r.prototype._attachCloseHandler=function(t){e(document.body).on("mousedown.select2."+t.id,(function(t){var n=e(t.target).closest(".select2");e(".select2.select2-container--open").each((function(){var t=e(this);this!=n[0]&&t.data("element").select2("close")}))}))},r.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},r.prototype.position=function(e,t){t.find(".selection").append(e)},r.prototype.destroy=function(){this._detachCloseHandler(this.container)},r.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},r})),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],(function(e,t,n,r){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html(''),e},i.prototype.bind=function(e,t){var n=this;i.__super__.bind.apply(this,arguments);var r=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r),this.$selection.attr("aria-labelledby",r),this.$selection.on("mousedown",(function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})})),this.$selection.on("focus",(function(e){})),this.$selection.on("blur",(function(e){})),e.on("selection:update",(function(e){n.update(e.data)}))},i.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("")},i.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),r=this.display(t,n);n.empty().append(r),n.prop("title",t.title||t.text)}else this.clear()},i})),t.define("select2/selection/multiple",["jquery","./base","../utils"],(function(e,t,n){function r(e,t){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html(''),e},r.prototype.bind=function(t,n){var i=this;r.__super__.bind.apply(this,arguments),this.$selection.on("click",(function(e){i.trigger("toggle",{originalEvent:e})})),this.$selection.on("click",".select2-selection__choice__remove",(function(t){if(!i.options.get("disabled")){var n=e(this).parent().data("data");i.trigger("unselect",{originalEvent:t,data:n})}}))},r.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e('×')},r.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],r=0;r1||n)return e.call(this,t);this.clear();var r=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(r)},t})),t.define("select2/selection/allowClear",["jquery","../keys"],(function(e,t){function n(){}return n.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",(function(e){r._handleClear(e)})),t.on("keypress",(function(e){r._handleKeyboardClear(e,t)}))},n.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();for(var r=n.data("data"),i=0;i0||0===n.length)){var r=e('×');r.data("data",n),this.$selection.find(".select2-selection__rendered").prepend(r)}},n})),t.define("select2/selection/search",["jquery","../utils","../keys"],(function(e,t,n){function r(e,t,n){e.call(this,t,n)}return r.prototype.render=function(t){var n=e('');this.$searchContainer=n,this.$search=n.find("input");var r=t.call(this);return this._transferTabIndex(),r},r.prototype.bind=function(e,t,r){var i=this;e.call(this,t,r),t.on("open",(function(){i.$search.trigger("focus")})),t.on("close",(function(){i.$search.val(""),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")})),t.on("enable",(function(){i.$search.prop("disabled",!1),i._transferTabIndex()})),t.on("disable",(function(){i.$search.prop("disabled",!0)})),t.on("focus",(function(e){i.$search.trigger("focus")})),t.on("results:focus",(function(e){i.$search.attr("aria-activedescendant",e.id)})),this.$selection.on("focusin",".select2-search--inline",(function(e){i.trigger("focus",e)})),this.$selection.on("focusout",".select2-search--inline",(function(e){i._handleBlur(e)})),this.$selection.on("keydown",".select2-search--inline",(function(e){if(e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which===n.BACKSPACE&&""===i.$search.val()){var t=i.$searchContainer.prev(".select2-selection__choice");if(t.length>0){var r=t.data("data");i.searchRemoveChoice(r),e.preventDefault()}}}));var o=document.documentMode,s=o&&o<=11;this.$selection.on("input.searchcheck",".select2-search--inline",(function(e){s?i.$selection.off("input.search input.searchcheck"):i.$selection.off("keyup.search")})),this.$selection.on("keyup.search input.search",".select2-search--inline",(function(e){if(s&&"input"===e.type)i.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&i.handleSearch(e)}}))},r.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},r.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},r.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},r.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},r.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},r.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";e=""!==this.$search.attr("placeholder")?this.$selection.find(".select2-selection__rendered").innerWidth():.75*(this.$search.val().length+1)+"em",this.$search.css("width",e)},r})),t.define("select2/selection/eventRelay",["jquery"],(function(e){function t(){}return t.prototype.bind=function(t,n,r){var i=this,o=["open","opening","close","closing","select","selecting","unselect","unselecting"],s=["opening","closing","selecting","unselecting"];t.call(this,n,r),n.on("*",(function(t,n){if(-1!==e.inArray(t,o)){n=n||{};var r=e.Event("select2:"+t,{params:n});i.$element.trigger(r),-1!==e.inArray(t,s)&&(n.prevented=r.isDefaultPrevented())}}))},t})),t.define("select2/translation",["jquery","require"],(function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){if(!(e in n._cache)){var r=t(e);n._cache[e]=r}return new n(n._cache[e])},n})),t.define("select2/diacritics",[],(function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}})),t.define("select2/data/base",["../utils"],(function(e){function t(e,n){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){var r=t.id+"-result-";return r+=e.generateChars(4),null!=n.id?r+="-"+n.id.toString():r+="-"+e.generateChars(4),r},t})),t.define("select2/data/select",["./base","../utils","jquery"],(function(e,t,n){function r(e,t){this.$element=e,this.options=t,r.__super__.constructor.call(this)}return t.Extend(r,e),r.prototype.current=function(e){var t=[],r=this;this.$element.find(":selected").each((function(){var e=n(this),i=r.item(e);t.push(i)})),e(t)},r.prototype.select=function(e){var t=this;if(e.selected=!0,n(e.element).is("option"))return e.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current((function(r){var i=[];(e=[e]).push.apply(e,r);for(var o=0;o=0){var u=i.filter(a(c)),d=this.item(u),p=n.extend(!0,{},c,d),h=this.option(p);u.replaceWith(h)}else{var f=this.option(c);if(c.children){var g=this.convertToOptions(c.children);t.appendMany(f,g)}s.push(f)}}return s},r})),t.define("select2/data/ajax",["./array","../utils","jquery"],(function(e,t,n){function r(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),r.__super__.constructor.call(this,e,t)}return t.Extend(r,e),r.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,r){var i=n.ajax(e);return i.then(t),i.fail(r),i}};return n.extend({},t,e,!0)},r.prototype.processResults=function(e){return e},r.prototype.query=function(e,t){var r=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var i=n.extend({type:"GET"},this.ajaxOptions);function o(){var o=i.transport(i,(function(i){var o=r.processResults(i,e);r.options.get("debug")&&window.console&&console.error&&(o&&o.results&&n.isArray(o.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(o)}),(function(){r.trigger("results:message",{message:"errorLoading"})}));r._request=o}"function"==typeof i.url&&(i.url=i.url.call(this.$element,e)),"function"==typeof i.data&&(i.data=i.data.call(this.$element,e)),this.ajaxOptions.delay&&""!==e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(o,this.ajaxOptions.delay)):o()},r})),t.define("select2/data/tags",["jquery"],(function(e){function t(t,n,r){var i=r.get("tags"),o=r.get("createTag");void 0!==o&&(this.createTag=o);var s=r.get("insertTag");if(void 0!==s&&(this.insertTag=s),t.call(this,n,r),e.isArray(i))for(var a=0;a0&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e})),t.define("select2/data/maximumSelectionLength",[],(function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){var r=this;this.current((function(i){var o=null!=i?i.length:0;r.maximumSelectionLength>0&&o>=r.maximumSelectionLength?r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):e.call(r,t,n)}))},e})),t.define("select2/dropdown",["jquery","./utils"],(function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n})),t.define("select2/dropdown/search",["jquery","../utils"],(function(e,t){function n(){}return n.prototype.render=function(t){var n=t.call(this),r=e('');return this.$searchContainer=r,this.$search=r.find("input"),n.prepend(r),n},n.prototype.bind=function(t,n,r){var i=this;t.call(this,n,r),this.$search.on("keydown",(function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()})),this.$search.on("input",(function(t){e(this).off("keyup")})),this.$search.on("keyup input",(function(e){i.handleSearch(e)})),n.on("open",(function(){i.$search.attr("tabindex",0),i.$search.focus(),window.setTimeout((function(){i.$search.focus()}),0)})),n.on("close",(function(){i.$search.attr("tabindex",-1),i.$search.val("")})),n.on("results:all",(function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer.removeClass("select2-search--hide"):i.$searchContainer.addClass("select2-search--hide"))}))},n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.showSearch=function(e,t){return!0},n})),t.define("select2/dropdown/hidePlaceholder",[],(function(){function e(e,t,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,r)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),r=t.length-1;r>=0;r--){var i=t[r];this.placeholder.id===i.id&&n.splice(r,1)}return n},e})),t.define("select2/dropdown/infiniteScroll",["jquery"],(function(e){function t(e,t,n,r){this.lastParams={},e.call(this,t,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},t.prototype.bind=function(t,n,r){var i=this;t.call(this,n,r),n.on("query",(function(e){i.lastParams=e,i.loading=!0})),n.on("query:append",(function(e){i.lastParams=e,i.loading=!0})),this.$results.on("scroll",(function(){var t=e.contains(document.documentElement,i.$loadingMore[0]);!i.loading&&t&&i.$results.offset().top+i.$results.outerHeight(!1)+50>=i.$loadingMore.offset().top+i.$loadingMore.outerHeight(!1)&&i.loadMore()}))},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e(''),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t})),t.define("select2/dropdown/attachBody",["jquery","../utils"],(function(e,t){function n(t,n,r){this.$dropdownParent=r.get("dropdownParent")||e(document.body),t.call(this,n,r)}return n.prototype.bind=function(e,t,n){var r=this,i=!1;e.call(this,t,n),t.on("open",(function(){r._showDropdown(),r._attachPositioningHandler(t),i||(i=!0,t.on("results:all",(function(){r._positionDropdown(),r._resizeDropdown()})),t.on("results:append",(function(){r._positionDropdown(),r._resizeDropdown()})))})),t.on("close",(function(){r._hideDropdown(),r._detachPositioningHandler(t)})),this.$dropdownContainer.on("mousedown",(function(e){e.stopPropagation()}))},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e(""),r=t.call(this);return n.append(r),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n,r){var i=this,o="scroll.select2."+r.id,s="resize.select2."+r.id,a="orientationchange.select2."+r.id,l=this.$container.parents().filter(t.hasScroll);l.each((function(){e(this).data("select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})})),l.on(o,(function(t){var n=e(this).data("select2-scroll-position");e(this).find(".select2-container--open").length>0&&e(this).scrollTop(n.y)})),e(window).on(o+" "+s+" "+a,(function(e){i._positionDropdown(),i._resizeDropdown()}))},n.prototype._detachPositioningHandler=function(n,r){var i="scroll.select2."+r.id,o="resize.select2."+r.id,s="orientationchange.select2."+r.id;this.$container.parents().filter(t.hasScroll).off(i),e(window).off(i+" "+o+" "+s)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("select2-dropdown--above"),r=this.$dropdown.hasClass("select2-dropdown--below"),i=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=o.top,s.bottom=o.top+s.height;var a=this.$dropdown.outerHeight(!1),l=t.scrollTop(),c=t.scrollTop()+t.height(),u=lo.bottom+a,p={left:o.left,top:s.bottom},h=this.$dropdownParent;"static"===h.css("position")&&(h=h.offsetParent());var f=h.offset();p.top-=f.top,p.left-=f.left,"above"===this.options.get("dropdownPosition")||"below"===this.options.get("dropdownPosition")?i=this.options.get("dropdownPosition"):(n||r||(i="below"),d||!u||n?!u&&d&&n&&(i="below"):i="above"),("above"==i||n&&"below"!==i)&&(p.top=s.top-a),null!=i&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+i),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+i)),this.$dropdownContainer.css(p)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n})),t.define("select2/dropdown/minimumResultsForSearch",[],(function(){function e(e,t,n,r){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,r)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,r=0;r0&&(d.dataAdapter=c.Decorate(d.dataAdapter,v)),d.maximumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,y)),d.maximumSelectionLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,_)),d.tags&&(d.dataAdapter=c.Decorate(d.dataAdapter,g)),null==d.tokenSeparators&&null==d.tokenizer||(d.dataAdapter=c.Decorate(d.dataAdapter,m)),null!=d.query){var S=t(d.amdBase+"compat/query");d.dataAdapter=c.Decorate(d.dataAdapter,S)}if(null!=d.initSelection){var T=t(d.amdBase+"compat/initSelection");d.dataAdapter=c.Decorate(d.dataAdapter,T)}}if(null==d.resultsAdapter&&(d.resultsAdapter=n,null!=d.ajax&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,x)),null!=d.placeholder&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,w)),d.selectOnClose&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,E))),null==d.dropdownAdapter){if(d.multiple)d.dropdownAdapter=$;else{var D=c.Decorate($,b);d.dropdownAdapter=D}if(0!==d.minimumResultsForSearch&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,C)),d.closeOnSelect&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,O)),null!=d.dropdownCssClass||null!=d.dropdownCss||null!=d.adaptDropdownCssClass){var q=t(d.amdBase+"compat/dropdownCss");d.dropdownAdapter=c.Decorate(d.dropdownAdapter,q)}d.dropdownAdapter=c.Decorate(d.dropdownAdapter,A)}if(null==d.selectionAdapter){if(d.multiple?d.selectionAdapter=i:d.selectionAdapter=r,null!=d.placeholder&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,o)),d.allowClear&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,s)),d.multiple&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,a)),null!=d.containerCssClass||null!=d.containerCss||null!=d.adaptContainerCssClass){var j=t(d.amdBase+"compat/containerCss");d.selectionAdapter=c.Decorate(d.selectionAdapter,j)}d.selectionAdapter=c.Decorate(d.selectionAdapter,l)}if("string"==typeof d.language)if(d.language.indexOf("-")>0){var P=d.language.split("-")[0];d.language=[d.language,P]}else d.language=[d.language];if(e.isArray(d.language)){var L=new u;d.language.push("en");for(var k=d.language,I=0;I0){for(var o=e.extend(!0,{},i),s=i.children.length-1;s>=0;s--)null==n(r,i.children[s])&&o.children.splice(s,1);return o.children.length>0?o:n(r,o)}var a=t(i.text).toUpperCase(),l=t(r.term).toUpperCase();return a.indexOf(l)>-1?i:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:8,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},T.prototype.set=function(t,n){var r={};r[e.camelCase(t)]=n;var i=c._convertData(r);e.extend(this.defaults,i)},new T})),t.define("select2/options",["require","jquery","./defaults","./utils"],(function(e,t,n,r){function i(t,i){if(this.options=t,null!=i&&this.fromElement(i),this.options=n.apply(this.options),i&&i.is("input")){var o=e(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=r.Decorate(this.options.dataAdapter,o)}}return i.prototype.fromElement=function(e){var n=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),e.data("data",e.data("select2Tags")),e.data("tags",!0)),e.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl")));var i={};i=t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset?t.extend(!0,{},e[0].dataset,e.data()):e.data();var o=t.extend(!0,{},i);for(var s in o=r._convertData(o))t.inArray(s,n)>-1||(t.isPlainObject(this.options[s])?t.extend(this.options[s],o[s]):this.options[s]=o[s]);return this},i.prototype.get=function(e){return this.options[e]},i.prototype.set=function(e,t){this.options[e]=t},i})),t.define("select2/core",["jquery","./options","./utils","./keys"],(function(e,t,n,r){var i=function e(n,r){null!=n.data("select2")&&n.data("select2").destroy(),this.$element=n,this.id=this._generateId(n),r=r||{},this.options=new t(r,n),e.__super__.constructor.call(this);var i=n.attr("tabindex")||0;n.data("old-tabindex",i),n.attr("tabindex","-1");var o=this.options.get("dataAdapter");this.dataAdapter=new o(n,this.options);var s=this.render();this._placeContainer(s);var a=this.options.get("selectionAdapter");this.selection=new a(n,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,s);var l=this.options.get("dropdownAdapter");this.dropdown=new l(n,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,s);var c=this.options.get("resultsAdapter");this.results=new c(n,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var u=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current((function(e){u.trigger("selection:update",{data:e})})),n.addClass("select2-hidden-accessible"),n.attr("aria-hidden","true"),this._syncAttributes(),n.data("select2",this)};return n.Extend(i,n.Observable),i.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},i.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=e.parents(".tvd-modal, #TB_window").length?"select2-modal":"";if(t&&e.addClass(t),this.options.get("calculateWidth")){var n=this._resolveWidth(this.$element,this.options.get("width"));null!=n&&e.css("width",n)}else e.css("width","100%")},i.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var r=this._resolveWidth(e,"style");return null!=r?r:this._resolveWidth(e,"element")}if("element"==t){var i=e.outerWidth(!1);return i<=0?"auto":i+"px"}if("style"==t){var o=e.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a=1)return c[1]}return null}return t},i.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},i.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",(function(){t.dataAdapter.current((function(e){t.trigger("selection:update",{data:e})})),t.$element.trigger("tvdclear")})).off("tvderror").on("tvderror",(function(e,n){t.$element.addClass("tvd-invalid"),t.$element.parent().find('label[for="'+t.$element.attr("id")+'"]').attr("data-error",n),t.$element.parent().find("#select2-"+t.$element.attr("id")+"-container").parent().addClass("tve-leads-input-error"),t.$container.addClass("tvd-invalid")})).off("tvdclear").on("tvdclear",(function(){t.$element.removeClass("tvd-invalid"),t.$element.parent().find("#select2-"+t.$element.attr("id")+"-container").parent().removeClass("tve-leads-input-error"),t.$container.removeClass("tvd-invalid")})),this._sync=n.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var r=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=r?(this._observer=new r((function(n){e.each(n,t._sync)})),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1})):this.$element[0].addEventListener&&this.$element[0].addEventListener("DOMAttrModified",t._sync,!1)},i.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",(function(t,n){e.trigger(t,n)}))},i.prototype._registerSelectionEvents=function(){var t=this,n=["toggle","focus"];this.selection.on("toggle",(function(){t.toggleDropdown()})),this.selection.on("focus",(function(e){t.focus(e)})),this.selection.on("*",(function(r,i){-1===e.inArray(r,n)&&t.trigger(r,i)}))},i.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",(function(t,n){e.trigger(t,n)}))},i.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",(function(t,n){e.trigger(t,n)}))},i.prototype._registerEvents=function(){var e=this;this.on("open",(function(){e.$container.addClass("select2-container--open")})),this.on("close",(function(){e.$container.removeClass("select2-container--open")})),this.on("enable",(function(){e.$container.removeClass("select2-container--disabled")})),this.on("disable",(function(){e.$container.addClass("select2-container--disabled")})),this.on("blur",(function(){e.$container.removeClass("select2-container--focus")})),this.on("query",(function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,(function(n){e.trigger("results:all",{data:n,query:t})}))})),this.on("query:append",(function(t){this.dataAdapter.query(t,(function(n){e.trigger("results:append",{data:n,query:t})}))})),this.on("keypress",(function(t){var n=t.which;e.isOpen()?n===r.ESC||n===r.TAB||n===r.UP&&t.altKey?(e.close(),t.preventDefault()):n===r.ENTER?(e.trigger("results:select",{}),t.preventDefault()):n===r.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):n===r.UP?(e.trigger("results:previous",{}),t.preventDefault()):n===r.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(n===r.ENTER||n===r.SPACE||n===r.DOWN&&t.altKey)&&(e.open(),t.preventDefault())}))},i.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},i.prototype.trigger=function(e,t){var n=i.__super__.trigger,r={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in r){var o=r[e],s={prevented:!1,name:e,args:t};if(n.call(this,o,s),s.prevented)return void(t.prevented=!0)}n.call(this,e,t)},i.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},i.prototype.open=function(){this.isOpen()||this.trigger("query",{})},i.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},i.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},i.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},i.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},i.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},i.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current((function(t){e=t})),e},i.prototype.val=function(t){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==t||0===t.length)return this.$element.val();var n=t[0];e.isArray(n)&&(n=e.map(n,(function(e){return e.toString()}))),this.$element.val(n).trigger("change")},i.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&this.$element[0].removeEventListener("DOMAttrModified",this._sync,!1),this._sync=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},i.prototype.render=function(){var t=e('');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),t.data("element",this.$element),t},i})),t.define("jquery-mousewheel",["jquery"],(function(e){return e})),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],(function(e,t,n,i){if(null==e.fn.select2){var o=["open","close","destroy"];e.fn.select2=function(t){if("object"===r(t=t||{}))return this.each((function(){var r=e.extend(!0,{},t);new n(e(this),r)})),this;var i;if("string"==typeof t)return this.each((function(){var n=e(this).data("select2");null==n&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2.");var r=Array.prototype.slice.call(arguments,1);i=n[t].apply(n,r)})),e.inArray(t,o)>-1?this:i;throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.select2.defaults&&(e.fn.select2.defaults=i),n})),{define:t.define,require:t.require}}();t.require("jquery.select2");e.fn.select2.amd=t}(jQuery)},97:function(e,t,n){e.exports=n(10)}});.e-link-in-bio{--e-link-in-bio-border-color:transparent;--e-link-in-bio-border-style:none;--e-link-in-bio-border-width:0;--e-link-in-bio-container-height:auto;--e-link-in-bio-container-width:360px;--e-link-in-bio-content-align-h:center;--e-link-in-bio-content-align-v:center;--e-link-in-bio-content-width:280px;--e-link-in-bio-full-height:100vh;--e-link-in-bio-gutter-block-end:45px;--e-link-in-bio-gutter-block-start:38px;--e-link-in-bio-gutter-inline:40px;--e-link-in-bio-identity-image-cover-border-bottom-width:0;--e-link-in-bio-identity-image-cover-border-color:transparent;--e-link-in-bio-identity-image-cover-border-style:none;--e-link-in-bio-identity-image-cover-height:170px;--e-link-in-bio-identity-image-cover-position:center center;--e-link-in-bio-identity-image-profile-border-color:transparent;--e-link-in-bio-identity-image-profile-position:center center;--e-link-in-bio-identity-image-profile-border-radius:50%;--e-link-in-bio-identity-image-profile-border-style:none;--e-link-in-bio-identity-image-profile-border-width:0;--e-link-in-bio-identity-image-profile-width:115px;--e-link-in-bio-heading-color:inherit;--e-link-in-bio-title-color:inherit;--e-link-in-bio-about-heading-color:inherit;--e-link-in-bio-description-color:#324a6d;--e-link-in-bio-icon-background-color:transparent;--e-link-in-bio-icon-border-color:transparent;--e-link-in-bio-icon-border-style:none;--e-link-in-bio-icon-border-width:0;--e-link-in-bio-icon-color:inherit;--e-link-in-bio-icon-columns:3;--e-link-in-bio-icon-gap:20px 29px;--e-link-in-bio-icon-size:25px;--e-link-in-bio-ctas-background-color:#467ff7;--e-link-in-bio-ctas-border-color:transparent;--e-link-in-bio-ctas-border-radius:20px;--e-link-in-bio-ctas-border-style:none;--e-link-in-bio-ctas-border-width:0;--e-link-in-bio-ctas-gap:22px;--e-link-in-bio-ctas-padding-block-end:17px;--e-link-in-bio-ctas-padding-block-start:17px;--e-link-in-bio-ctas-padding-inline-end:20px;--e-link-in-bio-ctas-padding-inline-start:20px;--e-link-in-bio-ctas-text-color:#fff;--e-link-in-bio-image-links-border-color:transparent;--e-link-in-bio-image-links-border-style:solid;--e-link-in-bio-image-links-border-width:0;--e-link-in-bio-image-links-columns:2;--e-link-in-bio-image-links-gap:10px;--e-link-in-bio-image-links-height:auto;--background-overlay-opacity:0.5;align-items:var(--e-link-in-bio-content-align-h);border-color:var(--e-link-in-bio-border-color);border-style:var(--e-link-in-bio-border-style);border-width:var(--e-link-in-bio-border-width);display:flex;flex-direction:column;justify-content:var(--e-link-in-bio-content-align-v);margin-inline:auto;max-width:100%;min-height:var(--e-link-in-bio-container-height);padding:var(--e-link-in-bio-gutter-block-start) var(--e-link-in-bio-gutter-inline) var(--e-link-in-bio-gutter-block-end);position:relative;width:var(--e-link-in-bio-container-width)}@supports (height:100dvh){.e-link-in-bio{--e-link-in-bio-full-height:100dvh}}.e-link-in-bio.has-border{--e-link-in-bio-border-style:solid}@media (max-width:ELEMENTOR_SCREEN_MOBILE_MAX){.e-link-in-bio.is-full-height-mobile{--e-link-in-bio-container-height:var(--e-link-in-bio-full-height,100vh)}}@media (min-width:ELEMENTOR_SCREEN_MOBILE_EXTRA_MIN) and (max-width:ELEMENTOR_SCREEN_MOBILE_EXTRA_MAX){.e-link-in-bio.is-full-height-mobile_extra{--e-link-in-bio-container-height:var(--e-link-in-bio-full-height,100vh)}}@media (min-width:ELEMENTOR_SCREEN_TABLET_MIN) and (max-width:ELEMENTOR_SCREEN_TABLET_MAX){.e-link-in-bio.is-full-height-tablet{--e-link-in-bio-container-height:var(--e-link-in-bio-full-height,100vh)}}@media (min-width:ELEMENTOR_SCREEN_TABLET_EXTRA_MIN) and (max-width:ELEMENTOR_SCREEN_TABLET_EXTRA_MAX){.e-link-in-bio.is-full-height-tablet_extra{--e-link-in-bio-container-height:var(--e-link-in-bio-full-height,100vh)}}@media (min-width:ELEMENTOR_SCREEN_LAPTOP_MIN) and (max-width:ELEMENTOR_SCREEN_LAPTOP_MAX){.e-link-in-bio.is-full-height-laptop{--e-link-in-bio-container-height:var(--e-link-in-bio-full-height,100vh)}}@media (min-width:ELEMENTOR_SCREEN_DESKTOP_MIN){.e-link-in-bio.is-full-height-desktop{--e-link-in-bio-container-height:var(--e-link-in-bio-full-height,100vh)}}@media (min-width:ELEMENTOR_SCREEN_DESKTOP_MIN) and (max-width:ELEMENTOR_SCREEN_DESKTOP_MAX){.e-link-in-bio.is-full-height-desktop.is-full-height-widescreen{--e-link-in-bio-container-height:var(--e-link-in-bio-full-height,100vh)}}@media (min-width:ELEMENTOR_SCREEN_WIDESCREEN_MIN){.e-link-in-bio.is-full-height-widescreen{--e-link-in-bio-container-height:var(--e-link-in-bio-full-height,100vh)}}.e-link-in-bio.is-full-width{--e-link-in-bio-container-width:100%}.e-link-in-bio__bg{display:grid;inset:0;position:absolute;z-index:0}.e-link-in-bio__bg,.e-link-in-bio__bg-overlay{background-position:50%;background-repeat:no-repeat;background-size:cover}.e-link-in-bio__bg-overlay{opacity:var(--background-overlay-opacity)}.e-link-in-bio__content{color:#1c2448;display:flex;flex-direction:column;font-family:var(--e-global-typography-text-font-family,"Poppins"),Sans-serif;max-width:100%;text-align:center;width:var(--e-link-in-bio-content-width);z-index:1}.e-link-in-bio__content *{word-wrap:break-word}.e-link-in-bio__identity{display:grid;grid-template-columns:1fr;grid-template-rows:auto;margin-block-end:14px;margin-block-start:calc(var(--e-link-in-bio-gutter-block-start) * -1)}.e-link-in-bio__identity .e-link-in-bio__identity-image{display:flex;position:relative}.e-link-in-bio__identity .e-link-in-bio__identity-image-element{display:block;flex:1 1 100%;-o-object-fit:cover;object-fit:cover}.e-link-in-bio__identity .e-link-in-bio__identity-image-cover{align-self:start;border-color:var(--e-link-in-bio-identity-image-cover-border-color);border-style:var(--e-link-in-bio-identity-image-cover-border-style);border-width:0 0 var(--e-link-in-bio-identity-image-cover-border-bottom-width) 0;grid-column:1;grid-row:1;margin-inline:calc(var(--e-link-in-bio-gutter-inline) * -1);max-height:var(--e-link-in-bio-identity-image-cover-height);overflow:hidden;width:calc(100% + var(--e-link-in-bio-gutter-inline) * 2)}.e-link-in-bio__identity .e-link-in-bio__identity-image-cover.has-border{--e-link-in-bio-identity-image-cover-border-style:solid}.e-link-in-bio__identity .e-link-in-bio__identity-image-cover .e-link-in-bio__identity-image-element{-o-object-position:var(--e-link-in-bio-identity-image-cover-position);object-position:var(--e-link-in-bio-identity-image-cover-position)}.e-link-in-bio__identity .e-link-in-bio__identity-image-profile{align-self:center;aspect-ratio:1;border-color:var(--e-link-in-bio-identity-image-profile-border-color);border-radius:var(--e-link-in-bio-identity-image-profile-border-radius);border-style:var(--e-link-in-bio-identity-image-profile-border-style);border-width:var(--e-link-in-bio-identity-image-profile-border-width);grid-column:1;grid-row:1;margin-block-end:17px;margin-block-start:var(--e-link-in-bio-gutter-block-start);margin-inline:auto;max-width:100%;overflow:hidden;width:var(--e-link-in-bio-identity-image-profile-width)}.e-link-in-bio__identity .e-link-in-bio__identity-image-profile.has-border{--e-link-in-bio-identity-image-profile-border-style:solid}.e-link-in-bio__identity .e-link-in-bio__identity-image-profile.has-style-square{--e-link-in-bio-identity-image-profile-border-radius:0}.e-link-in-bio__identity .e-link-in-bio__identity-image-profile .e-link-in-bio__identity-image-element{aspect-ratio:inherit;-o-object-position:var(--e-link-in-bio-identity-image-profile-position);object-position:var(--e-link-in-bio-identity-image-profile-position)}.e-link-in-bio__identity .e-link-in-bio__identity-image-cover+.e-link-in-bio__identity-image-profile{margin-block-start:17px}.e-link-in-bio__bio>*{margin-block:0}.e-link-in-bio__heading{color:var(--e-link-in-bio-heading-color);font-size:36px;font-weight:600;line-height:42px}.e-link-in-bio__about-heading{color:var(--e-link-in-bio-about-heading-color);font-size:16px;font-weight:500;line-height:20px}.e-link-in-bio__title{color:var(--e-link-in-bio-title-color);font-size:20px;font-weight:500;line-height:35px}.e-link-in-bio__description{color:var(--e-link-in-bio-description-color);font-size:16px;font-weight:300;line-height:24px;margin-block-start:20px}.e-link-in-bio__bio--footer{margin-block-start:34px}.e-link-in-bio__bio--footer .e-link-in-bio__description{font-size:12px;font-weight:500;line-height:20px;margin-block-start:0}.e-link-in-bio__bio--footer .e-link-in-bio__about-heading+.e-link-in-bio__description{margin-block-start:3px}.e-link-in-bio__icons{display:flex;flex-flow:row wrap;gap:var(--e-link-in-bio-icon-gap);justify-content:center;margin-block-start:20px}.e-link-in-bio__icons i{font-size:var(--e-link-in-bio-icon-size)}.e-link-in-bio__icons.has-size-medium{--e-link-in-bio-icon-size:30px}.e-link-in-bio__icons.has-size-large{--e-link-in-bio-icon-gap:20px 24px;--e-link-in-bio-icon-size:35px}.e-link-in-bio__icon{display:flex}.e-link-in-bio__icon .e-link-in-bio__icon-link{align-items:center;color:inherit;display:flex;flex:1 1 auto;flex-direction:column}.e-link-in-bio__icon .e-link-in-bio__icon-link:active,.e-link-in-bio__icon .e-link-in-bio__icon-link:focus,.e-link-in-bio__icon .e-link-in-bio__icon-link:hover{color:inherit}.e-link-in-bio__icon .e-link-in-bio__icon-svg{align-items:center;color:var(--e-link-in-bio-icon-color);display:flex;justify-content:center}.e-link-in-bio__icon svg{fill:currentColor;height:var(--e-link-in-bio-icon-size)}.e-link-in-bio__icon i{font-size:var(--e-link-in-bio-icon-size)}.e-link-in-bio__icon .e-link-in-bio__icon-label{font-size:14px;font-weight:500;line-height:20px;text-align:center}.e-link-in-bio__image-links{display:grid;gap:var(--e-link-in-bio-image-links-gap);grid-template-columns:repeat(var(--e-link-in-bio-image-links-columns,2),minmax(0,1fr));grid-template-rows:auto;margin-block-start:24px}.e-link-in-bio__image-links.has-1-columns{--e-link-in-bio-image-links-columns:1;--e-link-in-bio-image-links-gap:14px}.e-link-in-bio__image-links.has-3-columns{--e-link-in-bio-image-links-columns:3;--e-link-in-bio-image-links-gap:5px}.e-link-in-bio__image-links .e-link-in-bio__image-links-link{display:grid}.e-link-in-bio__image-links img.e-link-in-bio__image-links-img{aspect-ratio:1;border-color:var(--e-link-in-bio-image-links-border-color);border-style:var(--e-link-in-bio-image-links-border-style);border-width:var(--e-link-in-bio-image-links-border-width);display:block;height:var(--e-link-in-bio-image-links-height,auto);-o-object-fit:cover;object-fit:cover;width:100%}.e-link-in-bio__ctas{display:grid;gap:var(--e-link-in-bio-ctas-gap);grid-template-columns:minmax(0,1fr);grid-template-rows:auto;margin-block-start:31px}.e-link-in-bio__ctas.has-type-link{--e-link-in-bio-ctas-gap:10px;justify-items:center}.e-link-in-bio__ctas.has-type-divider{--e-link-in-bio-ctas-gap:0}.e-link-in-bio__ctas .e-link-in-bio__cta{display:flex;font-size:16px;font-weight:500;line-height:20px}.e-link-in-bio__ctas .e-link-in-bio__cta,.e-link-in-bio__ctas .e-link-in-bio__cta:active,.e-link-in-bio__ctas .e-link-in-bio__cta:focus,.e-link-in-bio__ctas .e-link-in-bio__cta:hover{color:var(--e-link-in-bio-ctas-text-color)}.e-link-in-bio__ctas .e-link-in-bio__cta-image{flex:0 0 min(50%,140px)}.e-link-in-bio__ctas .e-link-in-bio__cta-image-element{aspect-ratio:140/100;display:block;height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.e-link-in-bio__ctas .e-link-in-bio__cta-text{align-items:center;display:flex;flex:1 1 auto;justify-content:center}.e-link-in-bio__ctas .e-link-in-bio__cta.is-type-button{border-radius:var(--e-link-in-bio-ctas-border-radius);overflow:hidden}.e-link-in-bio__ctas .e-link-in-bio__cta.is-type-button.has-border{--e-link-in-bio-ctas-border-style:solid;border-color:var(--e-link-in-bio-ctas-border-color);border-style:var(--e-link-in-bio-ctas-border-style);border-width:var(--e-link-in-bio-ctas-border-width)}.e-link-in-bio__ctas .e-link-in-bio__cta.is-type-button.has-corners-rounded{--e-link-in-bio-ctas-border-radius:20px}.e-link-in-bio__ctas .e-link-in-bio__cta.is-type-button.has-corners-round{--e-link-in-bio-ctas-border-radius:50px}.e-link-in-bio__ctas .e-link-in-bio__cta.is-type-button.has-corners-sharp{--e-link-in-bio-ctas-border-radius:0}.e-link-in-bio__ctas .e-link-in-bio__cta.is-type-button .e-link-in-bio__cta-text{background-color:var(--e-link-in-bio-ctas-background-color);padding-block-end:var(--e-link-in-bio-ctas-padding-block-end);padding-block-start:var(--e-link-in-bio-ctas-padding-block-start);padding-inline-end:var(--e-link-in-bio-ctas-padding-inline-end);padding-inline-start:var(--e-link-in-bio-ctas-padding-inline-start)}.e-link-in-bio__ctas .e-link-in-bio__cta.is-type-link{--e-link-in-bio-ctas-text-color:#467ff7;font-weight:700;justify-content:center;margin-block:17px}.e-link-in-bio .e-link-in-bio__content .e-link-in-bio__ctas .e-link-in-bio__cta.is-type-link{text-decoration:underline}.e-link-in-bio-var-2{--e-link-in-bio-gutter-block-end:35px;--e-link-in-bio-identity-image-cover-height:215px;--e-link-in-bio-identity-image-profile-width:130px;--e-link-in-bio-identity-image-profile-border-color:#fff;--e-link-in-bio-identity-image-profile-border-style:solid;--e-link-in-bio-identity-image-profile-border-width:3px}.e-link-in-bio-var-2 .e-link-in-bio__identity{grid-template-rows:1fr auto auto}.e-link-in-bio-var-2 .e-link-in-bio__identity .e-link-in-bio__identity-image-cover{grid-row:1/span 2}.e-link-in-bio-var-2 .e-link-in-bio__identity .e-link-in-bio__identity-image-profile{grid-row:2/span 2}.e-link-in-bio-var-2 .e-link-in-bio__identity .e-link-in-bio__identity-image-cover+.e-link-in-bio__identity-image-profile{margin-block:17px}.e-link-in-bio-var-2 .e-link-in-bio__icons{margin-block-start:35px}.e-link-in-bio-var-3{--e-link-in-bio-gutter-block-end:20px;--e-link-in-bio-ctas-border-radius:0;--e-link-in-bio-ctas-gap:8px}.e-link-in-bio-var-3 .e-link-in-bio__ctas .e-link-in-bio__cta.has-border{border:none}.e-link-in-bio-var-3 .e-link-in-bio__ctas .e-link-in-bio__cta.has-border .e-link-in-bio__cta-image{--e-link-in-bio-ctas-border-style:solid;border-color:var(--e-link-in-bio-ctas-border-color);border-style:var(--e-link-in-bio-ctas-border-style);border-width:var(--e-link-in-bio-ctas-border-width)}.e-link-in-bio-var-3 .e-link-in-bio__ctas .e-link-in-bio__cta.has-corners-round,.e-link-in-bio-var-3 .e-link-in-bio__ctas .e-link-in-bio__cta.has-corners-rounded{--e-link-in-bio-ctas-border-radius:0}.e-link-in-bio-var-4{--e-link-in-bio-ctas-text-color:#1c2448;--e-link-in-bio-ctas-background-color:transparent;--e-link-in-bio-ctas-divider-color:#1c2448;--e-link-in-bio-ctas-divider-width:1px;--e-link-in-bio-ctas-divider-style:solid;--e-link-in-bio-ctas-padding-inline-end:16px;--e-link-in-bio-ctas-padding-inline-start:16px}.e-link-in-bio-var-4 .e-link-in-bio__ctas{grid-gap:0;margin-block-end:28px;margin-block-start:28px}.e-link-in-bio-var-4 .e-link-in-bio__ctas .e-link-in-bio__cta{border-bottom:var(--e-link-in-bio-ctas-divider-width) var(--e-link-in-bio-ctas-divider-style) var(--e-link-in-bio-ctas-divider-color);font-size:24px;font-weight:600;line-height:42px}.e-link-in-bio-var-4 .e-link-in-bio__ctas .e-link-in-bio__cta.has-corners-rounded,.e-link-in-bio-var-5{--e-link-in-bio-ctas-border-radius:0}.e-link-in-bio-var-5{--e-link-in-bio-ctas-gap:20px 15px;--e-link-in-bio-ctas-padding-block-end:5px;--e-link-in-bio-ctas-padding-block-start:5px;--e-link-in-bio-ctas-padding-inline-end:7px;--e-link-in-bio-ctas-padding-inline-start:7px}.e-link-in-bio-var-5 .e-link-in-bio__ctas.has-type-button{grid-template-columns:repeat(2,minmax(0,100px));grid-template-rows:auto;justify-content:center}.e-link-in-bio-var-5 .e-link-in-bio__ctas .e-link-in-bio__cta.has-border{border:none}.e-link-in-bio-var-5 .e-link-in-bio__ctas .e-link-in-bio__cta.has-border .e-link-in-bio__cta-image{--e-link-in-bio-ctas-border-style:solid;border-color:var(--e-link-in-bio-ctas-border-color);border-style:var(--e-link-in-bio-ctas-border-style);border-width:var(--e-link-in-bio-ctas-border-width)}.e-link-in-bio-var-5 .e-link-in-bio__ctas .e-link-in-bio__cta.has-corners-round,.e-link-in-bio-var-5 .e-link-in-bio__ctas .e-link-in-bio__cta.has-corners-rounded{--e-link-in-bio-ctas-border-radius:0}.e-link-in-bio-var-5 .e-link-in-bio__ctas .e-link-in-bio__cta.is-type-button{flex-direction:column;font-size:14px}.e-link-in-bio-var-5 .e-link-in-bio__ctas .e-link-in-bio__cta.is-type-button .e-link-in-bio__cta-image{flex:0 0 auto;margin-bottom:4px}.e-link-in-bio-var-5 .e-link-in-bio__ctas .e-link-in-bio__cta.is-type-button .e-link-in-bio__cta-image-element{aspect-ratio:1;height:auto}.e-link-in-bio-var-5 .e-link-in-bio__identity-image-cover .e-link-in-bio__identity-image-element{-o-object-position:var(--e-link-in-bio-identity-image-profile-position);object-position:var(--e-link-in-bio-identity-image-profile-position)}.e-link-in-bio-var-7{--e-link-in-bio-icon-background-color:#467ff7;--e-link-in-bio-icon-color:#fff;--e-link-in-bio-icon-gap-col:10px;--e-link-in-bio-icon-gap-row:20px;--e-link-in-bio-icon-gap:var(--e-link-in-bio-icon-gap-row) 0;--e-link-in-bio-icon-text-color:inherit}.e-link-in-bio-var-7 .e-link-in-bio__identity .e-link-in-bio__identity-image-cover{height:var(--e-link-in-bio-identity-image-cover-height,auto)}.e-link-in-bio-var-7 .e-link-in-bio__icons{align-items:start;gap:var(--e-link-in-bio-icon-gap);margin-block-start:34px;margin-inline:auto;max-width:254px;width:100%}.e-link-in-bio-var-7 .e-link-in-bio__icons.has-size-large{--e-link-in-bio-icon-gap:var(--e-link-in-bio-icon-gap-row) 0}.e-link-in-bio-var-7 .e-link-in-bio__icon{flex:1 1 calc(100% / var(--e-link-in-bio-icon-columns));max-width:calc(100% / var(--e-link-in-bio-icon-columns));padding-inline:calc(var(--e-link-in-bio-icon-gap-col) / 2)}.e-link-in-bio-var-7 .e-link-in-bio__icon-svg{aspect-ratio:1;background-color:var(--e-link-in-bio-icon-background-color);border-radius:100%;height:calc(var(--e-link-in-bio-icon-size) + 30px);padding:15px}.e-link-in-bio-var-7 .e-link-in-bio__icon{--e-link-in-bio-icon-border-style:solid}.e-link-in-bio-var-7 .e-link-in-bio__icon.has-border .e-link-in-bio__icon-svg{border-color:var(--e-link-in-bio-icon-border-color);border-style:var(--e-link-in-bio-icon-border-style);border-width:var(--e-link-in-bio-icon-border-width);height:calc(var(--e-link-in-bio-icon-size) + 30px + var(--e-link-in-bio-icon-border-width) * 2)}.e-link-in-bio-var-7 .e-link-in-bio__icon-label{color:var(--e-link-in-bio-icon-text-color)}.e-link-in-bio-var-7 .e-link-in-bio__ctas{margin-block-start:34px}/**************** Premium Progress Bar ****************/
/******************************************************/
.premium-progressbar-container {
position: relative;
}
.premium-progressbar-bar-wrap {
position: relative;
text-align: left;
overflow: hidden;
height: 25px;
margin-bottom: 50px;
background-color: #f5f5f5;
border-radius: 4px;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}
.premium-progressbar-bar-wrap.premium-progressbar-dots {
background-color: transparent;
width: 100%;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
height: auto;
box-shadow: none;
}
.premium-progressbar-bar-wrap .progress-segment {
position: relative;
width: 25px;
height: 25px;
border-radius: 50%;
overflow: hidden;
background-color: #f5f5f5;
}
.premium-progressbar-bar-wrap .progress-segment.filled {
background: #6ec1e4;
}
.premium-progressbar-bar-wrap .progress-segment:not(:first-child):not(:last-child) {
margin: 0 4px;
}
.premium-progressbar-bar-wrap .progress-segment:first-child {
margin-right: 4px;
}
.premium-progressbar-bar-wrap .progress-segment:last-child {
margin-left: 4px;
}
.premium-progressbar-bar-wrap .progress-segment .segment-inner {
position: absolute;
top: 0;
left: 0;
height: 100%;
background-color: #6ec1e4;
}
.premium-progressbar-bar {
float: left;
width: 0%;
height: 100%;
font-size: 12px;
line-height: 20px;
background: #6ec1e4;
text-align: center;
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}
.premium-progressbar-striped .premium-progressbar-bar {
background-image: -webkit-linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-size: 40px 40px;
}
.premium-progressbar-active .premium-progressbar-bar {
-webkit-animation: progress-bar-stripes 2s linear infinite;
animation: progress-bar-stripes 2s linear infinite;
}
.premium-progressbar-gradient .premium-progressbar-bar {
background-size: 400% 400% !important;
-webkit-animation: progress-bar-gradient 10s ease-in-out infinite;
animation: progress-bar-gradient 10s ease-in-out infinite;
}
.premium-progressbar-bar {
position: absolute;
overflow: hidden;
line-height: 20px;
}
.premium-progressbar-container .clearfix {
clear: both;
}
.premium-progressbar-bar {
-webkit-transition: width 0s ease-in-out !important;
transition: width 0s ease-in-out !important;
}
.premium-progressbar-container p:first-of-type {
margin: 0;
float: left;
}
.premium-progressbar-container p:nth-of-type(2) {
margin: 0;
float: right;
}
.premium-progressbar-name {
left: 50%;
top: 0;
right: 0;
-webkit-transform: translateX(-12.5px);
-ms-transform: translateX(-12.5px);
transform: translateX(-12.5px);
z-index: 1;
}
.premium-progressbar-multiple-label {
position: relative;
float: left;
width: 0;
left: 50%;
}
.premium-progressbar-center-label {
position: relative;
white-space: nowrap;
}
.premium-progressbar-arrow {
height: 15px;
left: 50%;
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-top: 11px solid;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
}
.premium-progressbar-pin {
border-left: 1px solid;
height: 12px;
left: 50%;
display: inline-block;
}
/**
* Circle Progress Bar
*/
.premium-progressbar-circle-wrap,
.premium-progressbar-hf-circle-wrap {
width: 200px;
height: 200px;
position: relative;
margin: 0 auto;
}
.premium-progressbar-circle-wrap .premium-progressbar-circle-content,
.premium-progressbar-hf-circle-wrap .premium-progressbar-circle-content {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
text-align: center;
}
.premium-progressbar-circle-wrap .premium-lottie-animation,
.premium-progressbar-hf-circle-wrap .premium-lottie-animation {
line-height: 1;
}
.premium-progressbar-circle-wrap .premium-progressbar-circle {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
-webkit-clip-path: inset(0 0 0 50%);
clip-path: inset(0 0 0 50%);
}
.premium-progressbar-circle-wrap .premium-progressbar-circle div {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
border-width: 6px;
border-style: solid;
border-color: #54595f;
border-radius: 50%;
-webkit-clip-path: inset(0 50% 0 0);
clip-path: inset(0 50% 0 0);
}
.premium-progressbar-circle-wrap .premium-progressbar-circle .premium-progressbar-circle-left {
-webkit-transform: rotate(0);
-ms-transform: rotate(0);
transform: rotate(0);
}
.premium-progressbar-circle-wrap .premium-progressbar-circle .premium-progressbar-circle-right {
-webkit-transform: rotate(180deg);
-ms-transform: rotate(180deg);
transform: rotate(180deg);
visibility: hidden;
}
.premium-progressbar-circle-wrap .premium-progressbar-circle-base {
width: 100%;
height: 100%;
border: 6px solid #eee;
border-radius: 50%;
}
/**
* Half Circle Progress Bar
*/
.premium-progressbar-hf-container {
position: relative;
width: 200px;
height: 200px;
}
.premium-progressbar-hf-circle-wrap {
overflow: hidden;
}
.premium-progressbar-hf-circle-wrap .premium-progressbar-left-label {
-webkit-order: 1;
-ms-flex-order: 1;
order: 1;
}
.premium-progressbar-hf-circle {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
-webkit-clip-path: inset(0 0 50% 0);
clip-path: inset(0 0 50% 0);
}
.premium-progressbar-hf-circle-progress {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
border: 12px solid #000;
border-radius: 50%;
-webkit-clip-path: inset(50% 0 0 0);
clip-path: inset(50% 0 0 0);
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
-webkit-transition: -webkit-transform 1500ms linear;
transition: -webkit-transform 1500ms linear;
transition: transform 1500ms linear;
transition: transform 1500ms linear, -webkit-transform 1500ms linear;
}
.premium-progressbar-circle-inner {
height: 100%;
width: 100%;
border: 12px solid #eee;
border-radius: 50%;
}
.premium-progressbar-hf-labels {
margin: 0 auto;
position: relative;
font-size: 12px;
font-weight: 400;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
}
@-webkit-keyframes progress-bar-stripes {
from {
background-position: 0 0;
}
to {
background-position: 40px 0;
}
}
@keyframes progress-bar-stripes {
from {
background-position: 0 0;
}
to {
background-position: 40px 0;
}
}
@-webkit-keyframes progress-bar-gradient {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
@keyframes progress-bar-gradient {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
@media (max-width: 768px) {
.premium-progressbar-center-label {
-webkit-transform: rotate(-90deg) !important;
-ms-transform: rotate(-90deg) !important;
transform: rotate(-90deg) !important;
-webkit-transform-origin: 0;
-ms-transform-origin: 0;
transform-origin: 0;
}
}/**
* WooCommerce Widget Functions
*
* Widget related functions and widget registration.
*
* @package WooCommerce\Functions
* @version 2.3.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Include widget classes.
require_once dirname( __FILE__ ) . '/abstracts/abstract-wc-widget.php';
require_once dirname( __FILE__ ) . '/widgets/class-wc-widget-cart.php';
require_once dirname( __FILE__ ) . '/widgets/class-wc-widget-layered-nav-filters.php';
require_once dirname( __FILE__ ) . '/widgets/class-wc-widget-layered-nav.php';
require_once dirname( __FILE__ ) . '/widgets/class-wc-widget-price-filter.php';
require_once dirname( __FILE__ ) . '/widgets/class-wc-widget-product-categories.php';
require_once dirname( __FILE__ ) . '/widgets/class-wc-widget-product-search.php';
require_once dirname( __FILE__ ) . '/widgets/class-wc-widget-product-tag-cloud.php';
require_once dirname( __FILE__ ) . '/widgets/class-wc-widget-products.php';
require_once dirname( __FILE__ ) . '/widgets/class-wc-widget-rating-filter.php';
require_once dirname( __FILE__ ) . '/widgets/class-wc-widget-recent-reviews.php';
require_once dirname( __FILE__ ) . '/widgets/class-wc-widget-recently-viewed.php';
require_once dirname( __FILE__ ) . '/widgets/class-wc-widget-top-rated-products.php';
/**
* Register Widgets.
*
* @since 2.3.0
*/
function wc_register_widgets() {
register_widget( 'WC_Widget_Cart' );
register_widget( 'WC_Widget_Layered_Nav_Filters' );
register_widget( 'WC_Widget_Layered_Nav' );
register_widget( 'WC_Widget_Price_Filter' );
register_widget( 'WC_Widget_Product_Categories' );
register_widget( 'WC_Widget_Product_Search' );
register_widget( 'WC_Widget_Product_Tag_Cloud' );
register_widget( 'WC_Widget_Products' );
register_widget( 'WC_Widget_Recently_Viewed' );
if ( 'yes' === get_option( 'woocommerce_enable_reviews', 'yes' ) ) {
register_widget( 'WC_Widget_Top_Rated_Products' );
register_widget( 'WC_Widget_Recent_Reviews' );
register_widget( 'WC_Widget_Rating_Filter' );
}
}
add_action( 'widgets_init', 'wc_register_widgets' );
body.elementor-apps-page{background:var(--e-a-color-white)}.e-a-apps .e-a-page-title{margin:30px auto 60px;max-width:770px;text-align:center}.e-a-apps .e-a-page-title h2{font-size:28px;line-height:1.6;margin:0}.e-a-apps .e-a-page-title p{font-size:16px;margin-block-start:0}.e-a-apps .e-a-page-title p a{color:inherit}.e-a-apps .e-a-page-footer{margin:60px auto;text-align:center}.e-a-apps .e-a-page-footer p{margin:auto;max-width:1200px}.e-a-apps .e-a-list{display:grid;grid-gap:30px;grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}.e-a-apps .e-a-item{align-items:flex-start;border:var(--e-a-border);border-radius:var(--e-a-border-radius);display:flex;flex-direction:column;padding:20px 24px;transition:var(--e-a-transition-hover)}.e-a-apps .e-a-item:hover{border-color:var(--e-a-border-color-bold)}.e-a-apps .e-a-heading{align-items:flex-start;display:flex;justify-content:space-between;width:100%}.e-a-apps .e-a-heading .e-a-img{border-radius:var(--e-a-border-radius);display:flex;margin-block-end:20px;width:70px}.e-a-apps .e-a-heading .e-a-badge{background:#ecfdf5;border-radius:100px;color:#047857;padding:3px 8px}.e-a-apps .e-a-author,.e-a-apps .e-a-title{line-height:1.6;margin:0}.e-a-apps .e-a-author{font-size:12px}.e-a-apps .e-a-author a{color:inherit}.e-a-apps .e-a-desc{flex-grow:1}.e-a-apps .e-a-offering{font-size:12px;font-style:italic}.e-a-apps .e-a-actions{align-items:center;display:flex;justify-content:space-between;margin-block-start:20px;width:100%}.e-a-apps .e-a-actions a{text-decoration:none}.e-a-apps .e-a-actions .e-accent{margin-inline-start:auto}.e-a-apps .e-a-actions .e-a-learn-more{color:#4338ca;font-weight:500}
Metro creative - Dépassez le bruit, créez l'écho.