Plugin Directory

Changeset 3446147


Ignore:
Timestamp:
01/24/2026 01:58:31 PM (2 months ago)
Author:
theaminuldev
Message:

Update to version 2.0.0 from GitHub

Location:
pageflash
Files:
70 added
10 deleted
35 edited
1 copied

Legend:

Unmodified
Added
Removed
  • pageflash/tags/2.0.0/autoload.php

    r3295254 r3446147  
    11<?php
     2
    23/**
    3  * Dynamically loads classes within the PageFlash namespace. Maps namespaces to their
    4  * corresponding directories and loads the appropriate file based on class name.
     4 * Returns the namespace → directory map.
    55 *
    66 * @since 1.0.0
     7 * @return array
     8 */
     9function pageflash_get_namespace_map() {
     10    return array(
     11        'TheAminul\\PageFlash\\' => trailingslashit( PAGEFLASH_DIR ) . 'includes/',
     12    );
     13}
     14
     15/**
     16 * Resolves a fully-qualified class name into a file path if it exists.
    717 *
    8  * @package PageFlash
    9  * @param string $class_name The fully qualified class name.
     18 * @since 1.0.0
     19 * @param string $class_name Fully qualified class name.
     20 * @return string|false File path or false if not found.
     21 */
     22function pageflash_locate_class_file( $class_name ) {
     23
     24    if ( ! defined( 'PAGEFLASH_DIR' ) ) {
     25        return false;
     26    }
     27
     28    $namespace_map = pageflash_get_namespace_map();
     29
     30    foreach ( $namespace_map as $namespace => $base_dir ) {
     31
     32        if ( strpos( $class_name, $namespace ) !== 0 ) {
     33            continue;
     34        }
     35
     36        $relative_class = substr( $class_name, strlen( $namespace ) );
     37        $file           = $base_dir . str_replace( '\\', '/', $relative_class ) . '.php';
     38
     39        return file_exists( $file ) ? $file : false;
     40    }
     41
     42    return false;
     43}
     44
     45/**
     46 * Autoloader.
     47 *
     48 * @since 1.0.0
     49 * @param string $class_name The class name being instantiated.
    1050 * @return void
    1151 */
    12 function exoole_autoloader( $class_name ) {
    13     $project_prefix = 'PageFlash\\';
    14     $namespace_map  = array(
    15         'PageFlash' => PAGEFLASH_DIR . '/includes/',
    16     );
     52function pageflash_autoloader( $class_name ) {
    1753
    18     if ( strpos( $class_name, $project_prefix ) === 0 ) {
    19         foreach ( $namespace_map as $namespace => $base_dir ) {
    20             if ( strpos( $class_name, $namespace ) === 0 ) {
    21                 // Derive the relative class path by stripping the namespace.
    22                 $relative_class = substr( $class_name, strlen( $namespace ) );
    23                 $file           = $base_dir . str_replace( '\\', '/', $relative_class ) . '.php';
     54    // Only handle PageFlash namespace
     55    if ( strpos( $class_name, 'TheAminul\\PageFlash\\' ) !== 0 ) {
     56        return;
     57    }
    2458
    25                 if ( file_exists( $file ) ) {
    26                     require_once $file;
    27                     return;
    28                 } elseif ( PAGEFLASH_ENV === 'development' && WP_DEBUG ) {
    29                         error_log( print_r( "Class file for {$class_name} not found: {$file}", true ) ); // phpcs:ignore
    30                 }
    31             }
    32         }
     59    $file = pageflash_locate_class_file( $class_name );
     60
     61    if ( $file ) {
     62        require_once $file;
     63        return;
     64    }
     65
     66    // Log ONLY missing PageFlash classes (dev only)
     67    if (
     68        defined( 'PAGEFLASH_ENV' ) &&
     69        PAGEFLASH_ENV === 'development' &&
     70        defined( 'WP_DEBUG' ) &&
     71        WP_DEBUG
     72    ) {
     73        error_log( "[PageFlash Autoload] Class not found: {$class_name}" ); // phpcs:ignore
    3374    }
    3475}
    3576
    36 spl_autoload_register( 'exoole_autoloader' );
     77
     78/**
     79 * Registers the autoloader.
     80 *
     81 * @since 1.0.0
     82 * @return void
     83 */
     84function pageflash_register_autoloader() {
     85
     86    if ( ! defined( 'PAGEFLASH_DIR' ) ) {
     87        return;
     88    }
     89
     90    spl_autoload_register( 'pageflash_autoloader' );
     91}
     92
     93// Boot autoloader
     94pageflash_register_autoloader();
  • pageflash/tags/2.0.0/build/admin/admin-rtl.css

    r3295254 r3446147  
    1 *{box-sizing:border-box;margin:0;padding:0}
     1@import url(https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&display=swap);
     2*{box-sizing:border-box;margin:0;padding:0}#pageflash-admin{font-family:Lexend,sans-serif;font-optical-sizing:auto;font-style:normal}.pageflash-toast-container{left:20px!important;top:50px!important}.pageflash-select{border-radius:8px}.pageflash-select .components-card-body{padding:20px}.pageflash-switch{border-radius:8px}.pageflash-switch .components-card-body{padding:20px}.pageflash-switch .pageflash-select{border-radius:unset;box-shadow:none}.pageflash-switch .pageflash-select .components-card-body{padding:10px}.pageflash-header{background-color:#fff!important;border-radius:5px!important;padding:0 5px}.pageflash-header__z-stack{width:100%}.pageflash-header__z-stack>div{width:100%!important}.pageflash-header__logo{margin-left:10px}.pageflash-header__menu{border-left:1px solid #d8d8d8;border-top-left-radius:0!important;padding:0!important}@media(max-width:768px){.pageflash-header__menu{border-left:none!important;border-top-left-radius:5px!important}}.pageflash-header__menu-list{background-color:#fff!important;padding:5px}.pageflash-header__menu-button{box-shadow:none!important;color:#1c1e24!important}.pageflash-header__menu-button.is-primary{color:#fff!important}.pageflash-header__card-body{background-color:#fff!important;border-radius:5px 0 0 5px!important;padding:0!important;width:100%!important}.pageflash-header__h-stack{border-bottom:1px solid #d8d8d8;padding:15px 30px}.pageflash-addons{padding:50px}@media(max-width:1024px){.pageflash-addons{padding:30px}}@media(max-width:768px){.pageflash-addons{padding:20px}}.pageflash-addons .components-card{padding:20px 0}.pageflash-addons__explore-link{display:flex;justify-content:flex-end;padding-top:20px}.pageflash-addons__explore-link a{align-items:center;background:#3858e9;border-radius:2px;color:#fff;display:flex;font-size:14px;padding:7px;text-decoration:none}.pageflash-addons__image{border-radius:4px;height:70px;-o-object-fit:cover;object-fit:cover;width:70px}.pageflash-addons__badge{background-color:#f0f0f0;border-radius:4px;color:#333;font-size:14px;margin-right:10px;padding:4px 8px;position:absolute;left:23px;top:23px}.pageflash-settings{padding:50px}@media(max-width:1024px){.pageflash-settings{padding:30px}}@media(max-width:768px){.pageflash-settings{padding:20px}}.pageflash-body{padding:50px}@media(max-width:1024px){.pageflash-body{padding:30px}}@media(max-width:768px){.pageflash-body{padding:20px}}.pageflash-support{margin:0 auto;max-width:1200px;padding:50px 20px}.pageflash-support .components-card{margin-bottom:20px}.pageflash-support .components-card-header h2{font-size:18px;font-weight:600;margin:0}.pageflash-support .components-card-body p{color:#646970;line-height:1.6;margin:0 0 16px}.pageflash-support .pageflash-support-faq-column{align-items:flex-start;display:flex;flex-direction:column;gap:8px}.pageflash-support .pageflash-support-faq-column .components-button.is-link{height:auto;padding:4px 0;text-align:right}.skeleton-wrapper{background:#f8f9fa;box-sizing:border-box;display:flex;flex-direction:column;font-family:sans-serif;height:100vh;overflow:hidden;width:100%}.skeleton-header{align-items:center;box-sizing:border-box;display:flex;gap:16px;height:50px;justify-content:space-between;margin:16px;width:calc(100% - 32px)}@media(max-width:1024px){.skeleton-header{gap:12px;height:40px;margin:12px;width:calc(100% - 24px)}}@media(max-width:768px){.skeleton-header{align-items:stretch;flex-direction:column;gap:8px;height:auto;margin:12px}}.skeleton-header-left{display:flex;gap:8px;height:50px;width:244px}.skeleton-header-left .logo{width:30%}.skeleton-header-left .logo,.skeleton-header-left .logo-name{animation:shimmer 1.5s infinite;background:linear-gradient(-90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:4px;height:50px}.skeleton-header-left .logo-name{width:70%}@media(max-width:1024px){.skeleton-header-left{height:40px;width:120px}}@media(max-width:768px){.skeleton-header-left{height:36px;width:100%}}.skeleton-header-center{animation:shimmer 1.5s infinite;background:linear-gradient(-90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:4px;flex:1;height:50px}@media(max-width:1024px){.skeleton-header-center{height:40px}}@media(max-width:768px){.skeleton-header-center{height:36px;width:100%}}.skeleton-header-right{animation:shimmer 1.5s infinite;background:linear-gradient(-90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:4px;height:50px;width:100px}@media(max-width:1024px){.skeleton-header-right{height:40px;width:80px}}@media(max-width:768px){.skeleton-header-right{height:36px;width:100%}}.skeleton-main{display:flex;flex:1;gap:16px;overflow:auto;padding:16px}@media(max-width:1024px){.skeleton-main{gap:12px;padding:12px}}@media(max-width:768px){.skeleton-main{flex-direction:column;gap:12px;padding:12px}}.skeleton-sidebar{display:flex;flex:0 0 244px;flex-direction:column;gap:16px}@media(max-width:1024px){.skeleton-sidebar{flex:0 0 244px;gap:12px}}@media(max-width:768px){.skeleton-sidebar{display:none}}.skeleton-sidebar-row{animation:shimmer 1.5s infinite;background:linear-gradient(-90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:8px;height:40px}@media(max-width:1024px){.skeleton-sidebar-row{height:36px}}.skeleton-content{display:flex;flex:1;flex-direction:column;gap:16px;padding:20px 30px}@media(max-width:1024px){.skeleton-content{gap:12px}}@media(max-width:768px){.skeleton-content{gap:10px}}.skeleton-row{align-items:center;background:#fff;border-radius:8px;box-shadow:0 0 0 1px #e0e0e0;display:flex;height:90px;justify-content:space-between;min-height:80px;padding:12px 16px}@media(max-width:1024px){.skeleton-row{height:80px;min-height:70px;padding:10px 12px}}@media(max-width:768px){.skeleton-row{align-items:flex-start;flex-direction:column;gap:12px;height:auto;min-height:100px;padding:12px}}.skeleton-row-left{display:flex;flex:1;flex-direction:column;gap:10px;min-width:0}@media(max-width:768px){.skeleton-row-left{gap:8px;width:100%}}.skeleton-row-title{animation:shimmer 1.5s infinite;background:linear-gradient(-90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:4px;height:20px;width:50%}@media(max-width:1024px){.skeleton-row-title{height:18px;width:60%}}@media(max-width:768px){.skeleton-row-title{height:16px;width:80%}}@media(max-width:480px){.skeleton-row-title{width:100%}}.skeleton-row-desc{animation:shimmer 1.5s infinite;background:linear-gradient(-90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:4px;height:10px;width:70%}@media(max-width:1024px){.skeleton-row-desc{width:80%}}@media(max-width:768px){.skeleton-row-desc{height:8px;width:90%}}@media(max-width:480px){.skeleton-row-desc{width:100%}}.skeleton-row-toggle{animation:shimmer 1.5s infinite;background:linear-gradient(-90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:999px;flex-shrink:0;height:20px;width:40px}@media(max-width:768px){.skeleton-row-toggle{align-self:flex-end;height:18px;width:36px}}@keyframes shimmer{0%{background-position:right -200px top 0}to{background-position:right 200px top 0}}.skeleton-header-center,.skeleton-header-left .logo,.skeleton-header-left .logo-name,.skeleton-header-right,.skeleton-row-desc,.skeleton-row-title,.skeleton-row-toggle,.skeleton-sidebar-row{background-size:400px 100%}@media(prefers-reduced-motion:reduce){.skeleton-header-center,.skeleton-header-left .logo,.skeleton-header-left .logo-name,.skeleton-header-right,.skeleton-row-desc,.skeleton-row-title,.skeleton-row-toggle,.skeleton-sidebar-row{animation:none;background:#e0e0e0}}@media print{.skeleton-wrapper{display:none}}
  • pageflash/tags/2.0.0/build/admin/admin.asset.php

    r3295254 r3446147  
    1 <?php return array('dependencies' => array(), 'version' => 'f445c3a2286b0fbfab7d');
     1<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '1af07936547064a95de7');
  • pageflash/tags/2.0.0/build/admin/admin.css

    r3295254 r3446147  
    1 *{box-sizing:border-box;margin:0;padding:0}
     1@import url(https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&display=swap);
     2*{box-sizing:border-box;margin:0;padding:0}#pageflash-admin{font-family:Lexend,sans-serif;font-optical-sizing:auto;font-style:normal}.pageflash-toast-container{right:20px!important;top:50px!important}.pageflash-select{border-radius:8px}.pageflash-select .components-card-body{padding:20px}.pageflash-switch{border-radius:8px}.pageflash-switch .components-card-body{padding:20px}.pageflash-switch .pageflash-select{border-radius:unset;box-shadow:none}.pageflash-switch .pageflash-select .components-card-body{padding:10px}.pageflash-header{background-color:#fff!important;border-radius:5px!important;padding:0 5px}.pageflash-header__z-stack{width:100%}.pageflash-header__z-stack>div{width:100%!important}.pageflash-header__logo{margin-right:10px}.pageflash-header__menu{border-right:1px solid #d8d8d8;border-top-right-radius:0!important;padding:0!important}@media(max-width:768px){.pageflash-header__menu{border-right:none!important;border-top-right-radius:5px!important}}.pageflash-header__menu-list{background-color:#fff!important;padding:5px}.pageflash-header__menu-button{box-shadow:none!important;color:#1c1e24!important}.pageflash-header__menu-button.is-primary{color:#fff!important}.pageflash-header__card-body{background-color:#fff!important;border-radius:0 5px 5px 0!important;padding:0!important;width:100%!important}.pageflash-header__h-stack{border-bottom:1px solid #d8d8d8;padding:15px 30px}.pageflash-addons{padding:50px}@media(max-width:1024px){.pageflash-addons{padding:30px}}@media(max-width:768px){.pageflash-addons{padding:20px}}.pageflash-addons .components-card{padding:20px 0}.pageflash-addons__explore-link{display:flex;justify-content:flex-end;padding-top:20px}.pageflash-addons__explore-link a{align-items:center;background:#3858e9;border-radius:2px;color:#fff;display:flex;font-size:14px;padding:7px;text-decoration:none}.pageflash-addons__image{border-radius:4px;height:70px;-o-object-fit:cover;object-fit:cover;width:70px}.pageflash-addons__badge{background-color:#f0f0f0;border-radius:4px;color:#333;font-size:14px;margin-left:10px;padding:4px 8px;position:absolute;right:23px;top:23px}.pageflash-settings{padding:50px}@media(max-width:1024px){.pageflash-settings{padding:30px}}@media(max-width:768px){.pageflash-settings{padding:20px}}.pageflash-body{padding:50px}@media(max-width:1024px){.pageflash-body{padding:30px}}@media(max-width:768px){.pageflash-body{padding:20px}}.pageflash-support{margin:0 auto;max-width:1200px;padding:50px 20px}.pageflash-support .components-card{margin-bottom:20px}.pageflash-support .components-card-header h2{font-size:18px;font-weight:600;margin:0}.pageflash-support .components-card-body p{color:#646970;line-height:1.6;margin:0 0 16px}.pageflash-support .pageflash-support-faq-column{align-items:flex-start;display:flex;flex-direction:column;gap:8px}.pageflash-support .pageflash-support-faq-column .components-button.is-link{height:auto;padding:4px 0;text-align:left}.skeleton-wrapper{background:#f8f9fa;box-sizing:border-box;display:flex;flex-direction:column;font-family:sans-serif;height:100vh;overflow:hidden;width:100%}.skeleton-header{align-items:center;box-sizing:border-box;display:flex;gap:16px;height:50px;justify-content:space-between;margin:16px;width:calc(100% - 32px)}@media(max-width:1024px){.skeleton-header{gap:12px;height:40px;margin:12px;width:calc(100% - 24px)}}@media(max-width:768px){.skeleton-header{align-items:stretch;flex-direction:column;gap:8px;height:auto;margin:12px}}.skeleton-header-left{display:flex;gap:8px;height:50px;width:244px}.skeleton-header-left .logo{width:30%}.skeleton-header-left .logo,.skeleton-header-left .logo-name{animation:shimmer 1.5s infinite;background:linear-gradient(90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:4px;height:50px}.skeleton-header-left .logo-name{width:70%}@media(max-width:1024px){.skeleton-header-left{height:40px;width:120px}}@media(max-width:768px){.skeleton-header-left{height:36px;width:100%}}.skeleton-header-center{animation:shimmer 1.5s infinite;background:linear-gradient(90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:4px;flex:1;height:50px}@media(max-width:1024px){.skeleton-header-center{height:40px}}@media(max-width:768px){.skeleton-header-center{height:36px;width:100%}}.skeleton-header-right{animation:shimmer 1.5s infinite;background:linear-gradient(90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:4px;height:50px;width:100px}@media(max-width:1024px){.skeleton-header-right{height:40px;width:80px}}@media(max-width:768px){.skeleton-header-right{height:36px;width:100%}}.skeleton-main{display:flex;flex:1;gap:16px;overflow:auto;padding:16px}@media(max-width:1024px){.skeleton-main{gap:12px;padding:12px}}@media(max-width:768px){.skeleton-main{flex-direction:column;gap:12px;padding:12px}}.skeleton-sidebar{display:flex;flex:0 0 244px;flex-direction:column;gap:16px}@media(max-width:1024px){.skeleton-sidebar{flex:0 0 244px;gap:12px}}@media(max-width:768px){.skeleton-sidebar{display:none}}.skeleton-sidebar-row{animation:shimmer 1.5s infinite;background:linear-gradient(90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:8px;height:40px}@media(max-width:1024px){.skeleton-sidebar-row{height:36px}}.skeleton-content{display:flex;flex:1;flex-direction:column;gap:16px;padding:20px 30px}@media(max-width:1024px){.skeleton-content{gap:12px}}@media(max-width:768px){.skeleton-content{gap:10px}}.skeleton-row{align-items:center;background:#fff;border-radius:8px;box-shadow:0 0 0 1px #e0e0e0;display:flex;height:90px;justify-content:space-between;min-height:80px;padding:12px 16px}@media(max-width:1024px){.skeleton-row{height:80px;min-height:70px;padding:10px 12px}}@media(max-width:768px){.skeleton-row{align-items:flex-start;flex-direction:column;gap:12px;height:auto;min-height:100px;padding:12px}}.skeleton-row-left{display:flex;flex:1;flex-direction:column;gap:10px;min-width:0}@media(max-width:768px){.skeleton-row-left{gap:8px;width:100%}}.skeleton-row-title{animation:shimmer 1.5s infinite;background:linear-gradient(90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:4px;height:20px;width:50%}@media(max-width:1024px){.skeleton-row-title{height:18px;width:60%}}@media(max-width:768px){.skeleton-row-title{height:16px;width:80%}}@media(max-width:480px){.skeleton-row-title{width:100%}}.skeleton-row-desc{animation:shimmer 1.5s infinite;background:linear-gradient(90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:4px;height:10px;width:70%}@media(max-width:1024px){.skeleton-row-desc{width:80%}}@media(max-width:768px){.skeleton-row-desc{height:8px;width:90%}}@media(max-width:480px){.skeleton-row-desc{width:100%}}.skeleton-row-toggle{animation:shimmer 1.5s infinite;background:linear-gradient(90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:999px;flex-shrink:0;height:20px;width:40px}@media(max-width:768px){.skeleton-row-toggle{align-self:flex-end;height:18px;width:36px}}@keyframes shimmer{0%{background-position:-200px 0}to{background-position:200px 0}}.skeleton-header-center,.skeleton-header-left .logo,.skeleton-header-left .logo-name,.skeleton-header-right,.skeleton-row-desc,.skeleton-row-title,.skeleton-row-toggle,.skeleton-sidebar-row{background-size:400px 100%}@media(prefers-reduced-motion:reduce){.skeleton-header-center,.skeleton-header-left .logo,.skeleton-header-left .logo-name,.skeleton-header-right,.skeleton-row-desc,.skeleton-row-title,.skeleton-row-toggle,.skeleton-sidebar-row{animation:none;background:#e0e0e0}}@media print{.skeleton-wrapper{display:none}}
  • pageflash/tags/2.0.0/build/admin/admin.js

    r3295254 r3446147  
     1(()=>{"use strict";var e={n:t=>{var a=t&&t.__esModule?()=>t.default:()=>t;return e.d(a,{a}),a},d:(t,a)=>{for(var n in a)e.o(a,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:a[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.domReady;var a=e.n(t);const n=window.wp.element,r=window.React;function o(e){var t,a,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(a=o(e[t]))&&(n&&(n+=" "),n+=a)}else for(a in e)e[a]&&(n&&(n+=" "),n+=a);return n}const i=function(){for(var e,t,a=0,n="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=o(e))&&(n&&(n+=" "),n+=t);return n};!function(e){if("undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",t.firstChild?t.insertBefore(a,t.firstChild):t.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}(':root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n');var s=e=>"number"==typeof e&&!isNaN(e),l=e=>"string"==typeof e,c=e=>"function"==typeof e,u=e=>l(e)||c(e)?e:null,d=(e,t)=>!1===e||s(e)&&e>0?e:t,p=e=>(0,r.isValidElement)(e)||l(e)||c(e)||s(e);function f({enter:e,exit:t,appendPosition:a=!1,collapse:n=!0,collapseDuration:o=300}){return function({children:i,position:s,preventExitTransition:l,done:c,nodeRef:u,isIn:d,playToast:p}){let f=a?`${e}--${s}`:e,h=a?`${t}--${s}`:t,m=(0,r.useRef)(0);return(0,r.useLayoutEffect)(()=>{let e=u.current,t=f.split(" "),a=n=>{n.target===u.current&&(p(),e.removeEventListener("animationend",a),e.removeEventListener("animationcancel",a),0===m.current&&"animationcancel"!==n.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",a),e.addEventListener("animationcancel",a)},[]),(0,r.useEffect)(()=>{let e=u.current,t=()=>{e.removeEventListener("animationend",t),n?function(e,t,a=300){let{scrollHeight:n,style:r}=e;requestAnimationFrame(()=>{r.minHeight="initial",r.height=n+"px",r.transition=`all ${a}ms`,requestAnimationFrame(()=>{r.height="0",r.padding="0",r.margin="0",setTimeout(t,a)})})}(e,c,o):c()};d||(l?t():(m.current=1,e.className+=` ${h}`,e.addEventListener("animationend",t)))},[d]),r.createElement(r.Fragment,null,i)}}function h(e,t){return{content:m(e.content,e.props),containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,reason:e.removalReason,status:t}}function m(e,t,a=!1){return(0,r.isValidElement)(e)&&!l(e.type)?(0,r.cloneElement)(e,{closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:a}):c(e)?e({closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:a}):e}function g({delay:e,isRunning:t,closeToast:a,type:n="default",hide:o,className:s,controlledProgress:l,progress:u,rtl:d,isIn:p,theme:f}){let h=o||l&&0===u,m={animationDuration:`${e}ms`,animationPlayState:t?"running":"paused"};l&&(m.transform=`scaleX(${u})`);let g=i("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${f}`,`Toastify__progress-bar--${n}`,{"Toastify__progress-bar--rtl":d}),y=c(s)?s({rtl:d,type:n,defaultClassName:g}):i(g,s),v={[l&&u>=1?"onTransitionEnd":"onAnimationEnd"]:l&&u<1?null:()=>{p&&a()}};return r.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":h},r.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${f} Toastify__progress-bar--${n}`}),r.createElement("div",{role:"progressbar","aria-hidden":h?"true":"false","aria-label":"notification timer",className:y,style:m,...v}))}var y=1,v=()=>""+y++;var _=new Map,x=[],b=new Set,w=e=>b.forEach(t=>t(e)),T=()=>_.size>0;function k(e,t){var a;if(t)return!(null==(a=_.get(t))||!a.isToastActive(e));let n=!1;return _.forEach(t=>{t.isToastActive(e)&&(n=!0)}),n}function C(e,t){p(e)&&(T()||x.push({content:e,options:t}),_.forEach(a=>{a.buildToast(e,t)}))}function E(e,t){_.forEach(a=>{(null==t||null==t||!t.containerId||(null==t?void 0:t.containerId)===a.id)&&a.toggle(e,null==t?void 0:t.id)})}function j(e){let t=e.containerId||1;return{subscribe(a){let n=function(e,t,a){let n=1,r=0,o=[],i=[],l=t,c=new Map,f=new Set,m=()=>{i=Array.from(c.values()),f.forEach(e=>e())},g=e=>{var t,a;null==(a=null==(t=e.props)?void 0:t.onClose)||a.call(t,e.removalReason),e.isActive=!1},y=e=>{if(null==e)c.forEach(g);else{let t=c.get(e);t&&g(t)}m()},v=e=>{var t,n;let{toastId:r,updateId:o}=e.props,i=null==o;e.staleId&&c.delete(e.staleId),e.isActive=!0,c.set(r,e),m(),a(h(e,i?"added":"updated")),i&&(null==(n=(t=e.props).onOpen)||n.call(t))};return{id:e,props:l,observe:e=>(f.add(e),()=>f.delete(e)),toggle:(e,t)=>{c.forEach(a=>{var n;(null==t||t===a.props.toastId)&&(null==(n=a.toggle)||n.call(a,e))})},removeToast:y,toasts:c,clearQueue:()=>{r-=o.length,o=[]},buildToast:(t,i)=>{if((({containerId:t,toastId:a,updateId:n})=>{let r=t?t!==e:1!==e,o=c.has(a)&&null==n;return r||o})(i))return;let{toastId:f,updateId:g,data:_,staleId:x,delay:b}=i,w=null==g;w&&r++;let T={...l,style:l.toastStyle,key:n++,...Object.fromEntries(Object.entries(i).filter(([e,t])=>null!=t)),toastId:f,updateId:g,data:_,isIn:!1,className:u(i.className||l.toastClassName),progressClassName:u(i.progressClassName||l.progressClassName),autoClose:!i.isLoading&&d(i.autoClose,l.autoClose),closeToast(e){c.get(f).removalReason=e,y(f)},deleteToast(){let e=c.get(f);if(null!=e){if(a(h(e,"removed")),c.delete(f),r--,r<0&&(r=0),o.length>0)return void v(o.shift());m()}}};T.closeButton=l.closeButton,!1===i.closeButton||p(i.closeButton)?T.closeButton=i.closeButton:!0===i.closeButton&&(T.closeButton=!p(l.closeButton)||l.closeButton);let k={content:t,props:T,staleId:x};l.limit&&l.limit>0&&r>l.limit&&w?o.push(k):s(b)?setTimeout(()=>{v(k)},b):v(k)},setProps(e){l=e},setToggle:(e,t)=>{let a=c.get(e);a&&(a.toggle=t)},isToastActive:e=>{var t;return null==(t=c.get(e))?void 0:t.isActive},getSnapshot:()=>i}}(t,e,w);_.set(t,n);let r=n.observe(a);return x.forEach(e=>C(e.content,e.options)),x=[],()=>{r(),_.delete(t)}},setProps(e){var a;null==(a=_.get(t))||a.setProps(e)},getSnapshot(){var e;return null==(e=_.get(t))?void 0:e.getSnapshot()}}}function L(e){return e&&(l(e.toastId)||s(e.toastId))?e.toastId:v()}function S(e,t){return C(e,t),t.toastId}function R(e,t){return{...t,type:t&&t.type||e,toastId:L(t)}}function P(e){return(t,a)=>S(t,R(e,a))}function O(e,t){return S(e,R("default",t))}O.loading=(e,t)=>S(e,R("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),O.promise=function(e,{pending:t,error:a,success:n},r){let o;t&&(o=l(t)?O.loading(t,r):O.loading(t.render,{...r,...t}));let i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},s=(e,t,a)=>{if(null==t)return void O.dismiss(o);let n={type:e,...i,...r,data:a},s=l(t)?{render:t}:t;return o?O.update(o,{...n,...s}):O(s.render,{...n,...s}),a},u=c(e)?e():e;return u.then(e=>s("success",n,e)).catch(e=>s("error",a,e)),u},O.success=P("success"),O.info=P("info"),O.error=P("error"),O.warning=P("warning"),O.warn=O.warning,O.dark=(e,t)=>S(e,R("default",{theme:"dark",...t})),O.dismiss=function(e){!function(e){if(T()){if(null==e||(e=>l(e)||s(e))(e))_.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=_.get(e.containerId);t?t.removeToast(e.id):_.forEach(t=>{t.removeToast(e.id)})}}else x=x.filter(t=>null!=e&&t.options.toastId!==e)}(e)},O.clearWaitingQueue=(e={})=>{_.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})},O.isActive=k,O.update=(e,t={})=>{let a=((e,{containerId:t})=>{var a;return null==(a=_.get(t||1))?void 0:a.toasts.get(e)})(e,t);if(a){let{props:n,content:r}=a,o={delay:100,...n,...t,toastId:t.toastId||e,updateId:v()};o.toastId!==e&&(o.staleId=e);let i=o.render||r;delete o.render,S(i,o)}},O.done=e=>{O.update(e,{progress:1})},O.onChange=function(e){return b.add(e),()=>{b.delete(e)}},O.play=e=>E(!0,e),O.pause=e=>E(!1,e);var N="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,I=({theme:e,type:t,isLoading:a,...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===e?"currentColor":`var(--toastify-icon-color-${t})`,...n}),$={info:function(e){return r.createElement(I,{...e},r.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return r.createElement(I,{...e},r.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return r.createElement(I,{...e},r.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return r.createElement(I,{...e},r.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return r.createElement("div",{className:"Toastify__spinner"})}};var M=e=>{let{isRunning:t,preventExitTransition:a,toastRef:n,eventHandlers:o,playToast:s}=function(e){let[t,a]=(0,r.useState)(!1),[n,o]=(0,r.useState)(!1),i=(0,r.useRef)(null),s=(0,r.useRef)({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:l,pauseOnHover:c,closeToast:u,onClick:d,closeOnClick:p}=e;function f(){a(!0)}function h(){a(!1)}function m(a){let n=i.current;if(s.canDrag&&n){s.didMove=!0,t&&h(),"x"===e.draggableDirection?s.delta=a.clientX-s.start:s.delta=a.clientY-s.start,s.start!==a.clientX&&(s.canCloseOnClick=!1);let r="x"===e.draggableDirection?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`;n.style.transform=`translate3d(${r},0)`,n.style.opacity=""+(1-Math.abs(s.delta/s.removalDistance))}}function g(){document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",g);let t=i.current;if(s.canDrag&&s.didMove&&t){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance)return o(!0),e.closeToast(!0),void e.collapseAll();t.style.transition="transform 0.2s, opacity 0.2s",t.style.removeProperty("transform"),t.style.removeProperty("opacity")}}(function(e){var t;null==(t=_.get(e.containerId||1))||t.setToggle(e.id,e.fn)})({id:e.toastId,containerId:e.containerId,fn:a}),(0,r.useEffect)(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||h(),window.addEventListener("focus",f),window.addEventListener("blur",h),()=>{window.removeEventListener("focus",f),window.removeEventListener("blur",h)}},[e.pauseOnFocusLoss]);let y={onPointerDown:function(t){if(!0===e.draggable||e.draggable===t.pointerType){s.didMove=!1,document.addEventListener("pointermove",m),document.addEventListener("pointerup",g);let a=i.current;s.canCloseOnClick=!0,s.canDrag=!0,a.style.transition="none","x"===e.draggableDirection?(s.start=t.clientX,s.removalDistance=a.offsetWidth*(e.draggablePercent/100)):(s.start=t.clientY,s.removalDistance=a.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(t){let{top:a,bottom:n,left:r,right:o}=i.current.getBoundingClientRect();"touchend"!==t.nativeEvent.type&&e.pauseOnHover&&t.clientX>=r&&t.clientX<=o&&t.clientY>=a&&t.clientY<=n?h():f()}};return l&&c&&(y.onMouseEnter=h,e.stacked||(y.onMouseLeave=f)),p&&(y.onClick=e=>{d&&d(e),s.canCloseOnClick&&u(!0)}),{playToast:f,pauseToast:h,isRunning:t,preventExitTransition:n,toastRef:i,eventHandlers:y}}(e),{closeButton:l,children:u,autoClose:d,onClick:p,type:f,hideProgressBar:h,closeToast:y,transition:v,position:x,className:b,style:w,progressClassName:T,updateId:k,role:C,progress:E,rtl:j,toastId:L,deleteToast:S,isIn:R,isLoading:P,closeOnClick:O,theme:N,ariaLabel:I}=e,M=i("Toastify__toast",`Toastify__toast-theme--${N}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":j},{"Toastify__toast--close-on-click":O}),z=c(b)?b({rtl:j,position:x,type:f,defaultClassName:M}):i(M,b),B=function({theme:e,type:t,isLoading:a,icon:n}){let o=null,i={theme:e,type:t};return!1===n||(c(n)?o=n({...i,isLoading:a}):(0,r.isValidElement)(n)?o=(0,r.cloneElement)(n,i):a?o=$.spinner():(e=>e in $)(t)&&(o=$[t](i))),o}(e),F=!!E||!d,A={closeToast:y,type:f,theme:N},D=null;return!1===l||(D=c(l)?l(A):(0,r.isValidElement)(l)?(0,r.cloneElement)(l,A):function({closeToast:e,theme:t,ariaLabel:a="close"}){return r.createElement("button",{className:`Toastify__close-button Toastify__close-button--${t}`,type:"button",onClick:t=>{t.stopPropagation(),e(!0)},"aria-label":a},r.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},r.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(A)),r.createElement(v,{isIn:R,done:S,position:x,preventExitTransition:a,nodeRef:n,playToast:s},r.createElement("div",{id:L,tabIndex:0,onClick:p,"data-in":R,className:z,...o,style:w,ref:n,...R&&{role:C,"aria-label":I}},null!=B&&r.createElement("div",{className:i("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!P})},B),m(u,e,!t),D,!e.customProgressBar&&r.createElement(g,{...k&&!F?{key:`p-${k}`}:{},rtl:j,theme:N,delay:d,isRunning:t,isIn:R,closeToast:y,hide:h,type:f,className:T,controlledProgress:F,progress:E||0})))},z=(e,t=!1)=>({enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}),B=f(z("bounce",!0)),F=(f(z("slide",!0)),f(z("zoom")),f(z("flip")),{position:"top-right",transition:B,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:e=>e.altKey&&"KeyT"===e.code});function A(e){let t={...F,...e},a=e.stacked,[n,o]=(0,r.useState)(!0),s=(0,r.useRef)(null),{getToastToRender:l,isToastActive:d,count:p}=function(e){var t;let{subscribe:a,getSnapshot:n,setProps:o}=(0,r.useRef)(j(e)).current;o(e);let i=null==(t=(0,r.useSyncExternalStore)(a,n,n))?void 0:t.slice();return{getToastToRender:function(t){if(!i)return[];let a=new Map;return e.newestOnTop&&i.reverse(),i.forEach(e=>{let{position:t}=e.props;a.has(t)||a.set(t,[]),a.get(t).push(e)}),Array.from(a,e=>t(e[0],e[1]))},isToastActive:k,count:null==i?void 0:i.length}}(t),{className:f,style:h,rtl:m,containerId:g,hotKeys:y}=t;function v(e){let t=i("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":m});return c(f)?f({position:e,rtl:m,defaultClassName:t}):i(t,u(f))}function _(){a&&(o(!0),O.play())}return N(()=>{var e;if(a){let a=s.current.querySelectorAll('[data-in="true"]'),r=12,o=null==(e=t.position)?void 0:e.includes("top"),i=0,l=0;Array.from(a).reverse().forEach((e,t)=>{let a=e;a.classList.add("Toastify__toast--stacked"),t>0&&(a.dataset.collapsed=`${n}`),a.dataset.pos||(a.dataset.pos=o?"top":"bot");let s=i*(n?.2:1)+(n?0:r*t);a.style.setProperty("--y",`${o?s:-1*s}px`),a.style.setProperty("--g",`${r}`),a.style.setProperty("--s",""+(1-(n?l:0))),i+=a.offsetHeight,l+=.025})}},[n,p,a]),(0,r.useEffect)(()=>{function e(e){var t;let a=s.current;y(e)&&(null==(t=a.querySelector('[tabIndex="0"]'))||t.focus(),o(!1),O.pause()),"Escape"===e.key&&(document.activeElement===a||null!=a&&a.contains(document.activeElement))&&(o(!0),O.play())}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[y]),r.createElement("section",{ref:s,className:"Toastify",id:g,onMouseEnter:()=>{a&&(o(!1),O.pause())},onMouseLeave:_,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":t["aria-label"]},l((e,t)=>{let n=t.length?{...h}:{...h,pointerEvents:"none"};return r.createElement("div",{tabIndex:-1,className:v(e),"data-stacked":a,style:n,key:`c-${e}`},t.map(({content:e,props:t})=>r.createElement(M,{...t,stacked:a,collapseAll:_,isIn:d(t.toastId,t.containerId),key:`t-${t.key}`},e)))}))}const D=window.wp.i18n;var H="popstate";function W(e={}){return function(e,t,a,n={}){let{window:r=document.defaultView,v5Compat:o=!1}=n,i=r.history,s="POP",l=null,c=u();function u(){return(i.state||{idx:null}).idx}function d(){s="POP";let e=u(),t=null==e?null:e-c;c=e,l&&l({action:s,location:f.location,delta:t})}function p(e){return function(e,t=!1){let a="http://localhost";"undefined"!=typeof window&&(a="null"!==window.location.origin?window.location.origin:window.location.href),U(a,"No window.location.(origin|href) available to create URL");let n="string"==typeof e?e:Y(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=a+n),new URL(n,a)}(e)}null==c&&(c=0,i.replaceState({...i.state,idx:c},""));let f={get action(){return s},get location(){return e(r,i)},listen(e){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(H,d),l=e,()=>{r.removeEventListener(H,d),l=null}},createHref:e=>t(r,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let n=K(f.location,e,t);a&&a(n,e),c=u()+1;let d=X(n,c),p=f.createHref(n);try{i.pushState(d,"",p)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;r.location.assign(p)}o&&l&&l({action:s,location:f.location,delta:1})},replace:function(e,t){s="REPLACE";let n=K(f.location,e,t);a&&a(n,e),c=u();let r=X(n,c),d=f.createHref(n);i.replaceState(r,"",d),o&&l&&l({action:s,location:f.location,delta:0})},go:e=>i.go(e)};return f}(function(e,t){let{pathname:a="/",search:n="",hash:r=""}=G(e.location.hash.substring(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),K("",{pathname:a,search:n,hash:r},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let a=e.document.querySelector("base"),n="";if(a&&a.getAttribute("href")){let t=e.location.href,a=t.indexOf("#");n=-1===a?t:t.slice(0,a)}return n+"#"+("string"==typeof t?t:Y(t))},function(e,t){V("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)},e)}function U(e,t){if(!1===e||null==e)throw new Error(t)}function V(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function X(e,t){return{usr:e.state,key:e.key,idx:t}}function K(e,t,a=null,n){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?G(t):t,state:a,key:t&&t.key||n||Math.random().toString(36).substring(2,10)}}function Y({pathname:e="/",search:t="",hash:a=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),a&&"#"!==a&&(e+="#"===a.charAt(0)?a:"#"+a),e}function G(e){let t={};if(e){let a=e.indexOf("#");a>=0&&(t.hash=e.substring(a),e=e.substring(0,a));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function q(e,t,a="/"){return function(e,t,a,n){let r=ue(("string"==typeof t?G(t):t).pathname||"/",a);if(null==r)return null;let o=J(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,a)=>e===t[a])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(o);let i=null;for(let e=0;null==i&&e<o.length;++e){let t=ce(r);i=se(o[e],t,n)}return i}(e,t,a,!1)}function J(e,t=[],a=[],n="",r=!1){let o=(e,o,i=r,s)=>{let l={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(n)&&i)return;U(l.relativePath.startsWith(n),`Absolute route path "${l.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(n.length)}let c=he([n,l.relativePath]),u=a.concat(l);e.children&&e.children.length>0&&(U(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),J(e.children,t,u,c,i)),(null!=e.path||e.index)&&t.push({path:c,score:ie(c,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let a of Z(e.path))o(e,t,!0,a);else o(e,t)}),t}function Z(e){let t=e.split("/");if(0===t.length)return[];let[a,...n]=t,r=a.endsWith("?"),o=a.replace(/\?$/,"");if(0===n.length)return r?[o,""]:[o];let i=Z(n.join("/")),s=[];return s.push(...i.map(e=>""===e?o:[o,e].join("/"))),r&&s.push(...i),s.map(t=>e.startsWith("/")&&""===t?"/":t)}new WeakMap;var Q=/^:[\w-]+$/,ee=3,te=2,ae=1,ne=10,re=-2,oe=e=>"*"===e;function ie(e,t){let a=e.split("/"),n=a.length;return a.some(oe)&&(n+=re),t&&(n+=te),a.filter(e=>!oe(e)).reduce((e,t)=>e+(Q.test(t)?ee:""===t?ae:ne),n)}function se(e,t,a=!1){let{routesMeta:n}=e,r={},o="/",i=[];for(let e=0;e<n.length;++e){let s=n[e],l=e===n.length-1,c="/"===o?t:t.slice(o.length)||"/",u=le({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},c),d=s.route;if(!u&&l&&a&&!n[n.length-1].route.index&&(u=le({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!u)return null;Object.assign(r,u.params),i.push({params:r,pathname:he([o,u.pathname]),pathnameBase:me(he([o,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(o=he([o,u.pathnameBase]))}return i}function le(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[a,n]=function(e,t=!1,a=!0){V("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,a)=>(n.push({paramName:t,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),r+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?r+="\\/*$":""!==e&&"/"!==e&&(r+="(?:(?=\\/|$))"),[new RegExp(r,t?void 0:"i"),n]}(e.path,e.caseSensitive,e.end),r=t.match(a);if(!r)return null;let o=r[0],i=o.replace(/(.)\/+$/,"$1"),s=r.slice(1);return{params:n.reduce((e,{paramName:t,isOptional:a},n)=>{if("*"===t){let e=s[n]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const r=s[n];return e[t]=a&&!r?void 0:(r||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:i,pattern:e}}function ce(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return V(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ue(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let a=t.endsWith("/")?t.length-1:t.length,n=e.charAt(a);return n&&"/"!==n?null:e.slice(a)||"/"}function de(e,t,a,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}].  Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function pe(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,a)=>a===t.length-1?e.pathname:e.pathnameBase)}function fe(e,t,a,n=!1){let r;"string"==typeof e?r=G(e):(r={...e},U(!r.pathname||!r.pathname.includes("?"),de("?","pathname","search",r)),U(!r.pathname||!r.pathname.includes("#"),de("#","pathname","hash",r)),U(!r.search||!r.search.includes("#"),de("#","search","hash",r)));let o,i=""===e||""===r.pathname,s=i?"/":r.pathname;if(null==s)o=a;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;r.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t="/"){let{pathname:a,search:n="",hash:r=""}="string"==typeof e?G(e):e,o=a?a.startsWith("/")?a:function(e,t){let a=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?a.length>1&&a.pop():"."!==e&&a.push(e)}),a.length>1?a.join("/"):"/"}(a,t):t;return{pathname:o,search:ge(n),hash:ye(r)}}(r,o),c=s&&"/"!==s&&s.endsWith("/"),u=(i||"."===s)&&a.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}var he=e=>e.join("/").replace(/\/\/+/g,"/"),me=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ge=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",ye=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function ve(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}var _e=["POST","PUT","PATCH","DELETE"],xe=(new Set(_e),["GET",..._e]);new Set(xe),Symbol("ResetLoaderData");var be=r.createContext(null);be.displayName="DataRouter";var we=r.createContext(null);we.displayName="DataRouterState";r.createContext(!1);var Te=r.createContext({isTransitioning:!1});Te.displayName="ViewTransition",r.createContext(new Map).displayName="Fetchers",r.createContext(null).displayName="Await";var ke=r.createContext(null);ke.displayName="Navigation";var Ce=r.createContext(null);Ce.displayName="Location";var Ee=r.createContext({outlet:null,matches:[],isDataRoute:!1});Ee.displayName="Route";var je=r.createContext(null);function Le(){return null!=r.useContext(Ce)}function Se(){return U(Le(),"useLocation() may be used only in the context of a <Router> component."),r.useContext(Ce).location}je.displayName="RouteError";var Re="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Pe(e){r.useContext(ke).static||r.useLayoutEffect(e)}function Oe(){let{isDataRoute:e}=r.useContext(Ee);return e?function(){let{router:e}=function(e){let t=r.useContext(be);return U(t,Ae(e)),t}("useNavigate"),t=De("useNavigate"),a=r.useRef(!1);return Pe(()=>{a.current=!0}),r.useCallback(async(n,r={})=>{V(a.current,Re),a.current&&("number"==typeof n?e.navigate(n):await e.navigate(n,{fromRouteId:t,...r}))},[e,t])}():function(){U(Le(),"useNavigate() may be used only in the context of a <Router> component.");let e=r.useContext(be),{basename:t,navigator:a}=r.useContext(ke),{matches:n}=r.useContext(Ee),{pathname:o}=Se(),i=JSON.stringify(pe(n)),s=r.useRef(!1);return Pe(()=>{s.current=!0}),r.useCallback((n,r={})=>{if(V(s.current,Re),!s.current)return;if("number"==typeof n)return void a.go(n);let l=fe(n,JSON.parse(i),o,"path"===r.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:he([t,l.pathname])),(r.replace?a.replace:a.push)(l,r.state,r)},[t,a,i,o,e])}()}var Ne=r.createContext(null);function Ie(e,{relative:t}={}){let{matches:a}=r.useContext(Ee),{pathname:n}=Se(),o=JSON.stringify(pe(a));return r.useMemo(()=>fe(e,JSON.parse(o),n,"path"===t),[e,o,n,t])}function $e(e,t,a,n,o){U(Le(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=r.useContext(ke),{matches:s}=r.useContext(Ee),l=s[s.length-1],c=l?l.params:{},u=l?l.pathname:"/",d=l?l.pathnameBase:"/",p=l&&l.route;{let e=p&&p.path||"";We(u,!p||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let f,h=Se();if(t){let e="string"==typeof t?G(t):t;U("/"===d||e.pathname?.startsWith(d),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=h;let m=f.pathname||"/",g=m;if("/"!==d){let e=d.replace(/^\//,"").split("/");g="/"+m.replace(/^\//,"").split("/").slice(e.length).join("/")}let y=q(e,{pathname:g});V(p||null!=y,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),V(null==y||void 0!==y[y.length-1].route.element||void 0!==y[y.length-1].route.Component||void 0!==y[y.length-1].route.lazy,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=function(e,t=[],a=null,n=null){if(null==e){if(!a)return null;if(a.errors)e=a.matches;else{if(0!==t.length||a.initialized||!(a.matches.length>0))return null;e=a.matches}}let o=e,i=a?.errors;if(null!=i){let e=o.findIndex(e=>e.route.id&&void 0!==i?.[e.route.id]);U(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,e+1))}let s=!1,l=-1;if(a)for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:n}=a,r=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!n||void 0===n[t.route.id]);if(t.route.lazy||r){s=!0,o=l>=0?o.slice(0,l+1):[o[0]];break}}}return o.reduceRight((e,c,u)=>{let d,p=!1,f=null,h=null;a&&(d=i&&c.route.id?i[c.route.id]:void 0,f=c.route.errorElement||ze,s&&(l<0&&0===u?(We("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,h=null):l===u&&(p=!0,h=c.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,u+1)),g=()=>{let t;return t=d?f:p?h:c.route.Component?r.createElement(c.route.Component,null):c.route.element?c.route.element:e,r.createElement(Fe,{match:c,routeContext:{outlet:e,matches:m,isDataRoute:null!=a},children:t})};return a&&(c.route.ErrorBoundary||c.route.errorElement||0===u)?r.createElement(Be,{location:a.location,revalidation:a.revalidation,component:f,error:d,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},unstable_onError:n}):g()},null)}(y&&y.map(e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:he([d,i.encodeLocation?i.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?d:he([d,i.encodeLocation?i.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),s,a,n,o);return t&&v?r.createElement(Ce.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...f},navigationType:"POP"}},v):v}function Me(){let e=function(){let e=r.useContext(je),t=function(e){let t=r.useContext(we);return U(t,Ae(e)),t}("useRouteError"),a=De("useRouteError");return void 0!==e?e:t.errors?.[a]}(),t=ve(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=r.createElement(r.Fragment,null,r.createElement("p",null,"💿 Hey developer 👋"),r.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",r.createElement("code",{style:i},"ErrorBoundary")," or"," ",r.createElement("code",{style:i},"errorElement")," prop on your route.")),r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),a?r.createElement("pre",{style:o},a):null,s)}var ze=r.createElement(Me,null),Be=class extends r.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.unstable_onError?this.props.unstable_onError(e,t):console.error("React Router caught the following error during render",e)}render(){return void 0!==this.state.error?r.createElement(Ee.Provider,{value:this.props.routeContext},r.createElement(je.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Fe({routeContext:e,match:t,children:a}){let n=r.useContext(be);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),r.createElement(Ee.Provider,{value:e},a)}function Ae(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function De(e){let t=function(e){let t=r.useContext(Ee);return U(t,Ae(e)),t}(e),a=t.matches[t.matches.length-1];return U(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}var He={};function We(e,t,a){t||He[e]||(He[e]=!0,V(!1,a))}function Ue(e){return function(e){let t=r.useContext(Ee).outlet;return r.useMemo(()=>t&&r.createElement(Ne.Provider,{value:e},t),[t,e])}(e.context)}function Ve(e){U(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Xe({basename:e="/",children:t=null,location:a,navigationType:n="POP",navigator:o,static:i=!1}){U(!Le(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),l=r.useMemo(()=>({basename:s,navigator:o,static:i,future:{}}),[s,o,i]);"string"==typeof a&&(a=G(a));let{pathname:c="/",search:u="",hash:d="",state:p=null,key:f="default"}=a,h=r.useMemo(()=>{let e=ue(c,s);return null==e?null:{location:{pathname:e,search:u,hash:d,state:p,key:f},navigationType:n}},[s,c,u,d,p,f,n]);return V(null!=h,`<Router basename="${s}"> is not able to match the URL "${c}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),null==h?null:r.createElement(ke.Provider,{value:l},r.createElement(Ce.Provider,{children:t,value:h}))}function Ke({children:e,location:t}){return $e(Ye(e),t)}function Ye(e,t=[]){let a=[];return r.Children.forEach(e,(e,n)=>{if(!r.isValidElement(e))return;let o=[...t,n];if(e.type===r.Fragment)return void a.push.apply(a,Ye(e.props.children,o));U(e.type===Ve,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),U(!e.props.index||!e.props.children,"An index route cannot have child routes.");let i={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=Ye(e.props.children,o)),a.push(i)}),a}r.memo(function({routes:e,future:t,state:a,unstable_onError:n}){return $e(e,void 0,a,n,t)}),r.Component;var Ge="get",qe="application/x-www-form-urlencoded";function Je(e){return null!=e&&"string"==typeof e.tagName}var Ze=null,Qe=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function et(e){return null==e||Qe.has(e)?e:(V(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${qe}"`),null)}function tt(e,t){if(!1===e||null==e)throw new Error(t)}function at(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function nt(e,t,a,n,r,o){let i=(e,t)=>!a[t]||e.route.id!==a[t].route.id,s=(e,t)=>a[t].pathname!==e.pathname||a[t].route.path?.endsWith("*")&&a[t].params["*"]!==e.params["*"];return"assets"===o?t.filter((e,t)=>i(e,t)||s(e,t)):"data"===o?t.filter((t,o)=>{let l=n.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(i(t,o)||s(t,o))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:a[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0}):[]}function rt(e,t,{includeHydrateFallback:a}={}){return n=e.map(e=>{let n=t.routes[e.route.id];if(!n)return[];let r=[n.module];return n.clientActionModule&&(r=r.concat(n.clientActionModule)),n.clientLoaderModule&&(r=r.concat(n.clientLoaderModule)),a&&n.hydrateFallbackModule&&(r=r.concat(n.hydrateFallbackModule)),n.imports&&(r=r.concat(n.imports)),r}).flat(1),[...new Set(n)];var n}function ot(){let e=r.useContext(be);return tt(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function it(){let e=r.useContext(we);return tt(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),"undefined"!=typeof window?window:"undefined"!=typeof globalThis&&globalThis,Symbol("SingleFetchRedirect");var st=r.createContext(void 0);function lt(){let e=r.useContext(st);return tt(e,"You must render this element inside a <HydratedRouter> element"),e}function ct(e,t){return a=>{e&&e(a),a.defaultPrevented||t(a)}}function ut({page:e,...t}){let{router:a}=ot(),n=r.useMemo(()=>q(a.routes,e,a.basename),[a.routes,e,a.basename]);return n?r.createElement(pt,{page:e,matches:n,...t}):null}function dt(e){let{manifest:t,routeModules:a}=lt(),[n,o]=r.useState([]);return r.useEffect(()=>{let n=!1;return async function(e,t,a){return function(e,t){let a=new Set,n=new Set(t);return e.reduce((e,r)=>{if(t&&(null==(o=r)||"string"!=typeof o.page)&&"script"===r.as&&r.href&&n.has(r.href))return e;var o;let i=JSON.stringify(function(e){let t={},a=Object.keys(e).sort();for(let n of a)t[n]=e[n];return t}(r));return a.has(i)||(a.add(i),e.push({key:i,link:r})),e},[])}((await Promise.all(e.map(async e=>{let n=t.routes[e.route.id];if(n){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let a=await import(e.module);return t[e.id]=a,a}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(n,a);return e.links?e.links():[]}return[]}))).flat(1).filter(at).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(e,t,a).then(e=>{n||o(e)}),()=>{n=!0}},[e,t,a]),n}function pt({page:e,matches:t,...a}){let n=Se(),{manifest:o,routeModules:i}=lt(),{basename:s}=ot(),{loaderData:l,matches:c}=it(),u=r.useMemo(()=>nt(e,t,c,o,n,"data"),[e,t,c,o,n]),d=r.useMemo(()=>nt(e,t,c,o,n,"assets"),[e,t,c,o,n]),p=r.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let a=new Set,r=!1;if(t.forEach(e=>{let t=o.routes[e.route.id];t&&t.hasLoader&&(!u.some(t=>t.route.id===e.route.id)&&e.route.id in l&&i[e.route.id]?.shouldRevalidate||t.hasClientLoader?r=!0:a.add(e.route.id))}),0===a.size)return[];let c=function(e,t,a){let n="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===n.pathname?n.pathname=`_root.${a}`:t&&"/"===ue(n.pathname,t)?n.pathname=`${t.replace(/\/$/,"")}/_root.${a}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${a}`,n}(e,s,"data");return r&&a.size>0&&c.searchParams.set("_routes",t.filter(e=>a.has(e.route.id)).map(e=>e.route.id).join(",")),[c.pathname+c.search]},[s,l,n,o,u,t,e,i]),f=r.useMemo(()=>rt(d,o),[d,o]),h=dt(d);return r.createElement(r.Fragment,null,p.map(e=>r.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...a})),f.map(e=>r.createElement("link",{key:e,rel:"modulepreload",href:e,...a})),h.map(({key:e,link:t})=>r.createElement("link",{key:e,nonce:a.nonce,...t})))}st.displayName="FrameworkContext";function ft(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}r.Component;var ht="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{ht&&(window.__reactRouterVersion="7.9.4")}catch(e){}function mt({basename:e,children:t,window:a}){let n=r.useRef();null==n.current&&(n.current=W({window:a,v5Compat:!0}));let o=n.current,[i,s]=r.useState({action:o.action,location:o.location}),l=r.useCallback(e=>{r.startTransition(()=>s(e))},[s]);return r.useLayoutEffect(()=>o.listen(l),[o,l]),r.createElement(Xe,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:o})}var gt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yt=r.forwardRef(function({onClick:e,discover:t="render",prefetch:a="none",relative:n,reloadDocument:o,replace:i,state:s,target:l,to:c,preventScrollReset:u,viewTransition:d,...p},f){let h,{basename:m}=r.useContext(ke),g="string"==typeof c&&gt.test(c),y=!1;if("string"==typeof c&&g&&(h=c,ht))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),a=ue(t.pathname,m);t.origin===e.origin&&null!=a?c=a+t.search+t.hash:y=!0}catch(e){V(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let v=function(e,{relative:t}={}){U(Le(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:n}=r.useContext(ke),{hash:o,pathname:i,search:s}=Ie(e,{relative:t}),l=i;return"/"!==a&&(l="/"===i?a:he([a,i])),n.createHref({pathname:l,search:s,hash:o})}(c,{relative:n}),[_,x,b]=function(e,t){let a=r.useContext(st),[n,o]=r.useState(!1),[i,s]=r.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:p}=t,f=r.useRef(null);r.useEffect(()=>{if("render"===e&&s(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),r.useEffect(()=>{if(n){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[n]);let h=()=>{o(!0)},m=()=>{o(!1),s(!1)};return a?"intent"!==e?[i,f,{}]:[i,f,{onFocus:ct(l,h),onBlur:ct(c,m),onMouseEnter:ct(u,h),onMouseLeave:ct(d,m),onTouchStart:ct(p,h)}]:[!1,f,{}]}(a,p),w=function(e,{target:t,replace:a,state:n,preventScrollReset:o,relative:i,viewTransition:s}={}){let l=Oe(),c=Se(),u=Ie(e,{relative:i});return r.useCallback(r=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(r,t)){r.preventDefault();let t=void 0!==a?a:Y(c)===Y(u);l(e,{replace:t,state:n,preventScrollReset:o,relative:i,viewTransition:s})}},[c,l,u,a,n,t,e,o,i,s])}(c,{replace:i,state:s,target:l,preventScrollReset:u,relative:n,viewTransition:d}),T=r.createElement("a",{...p,...b,href:h||v,onClick:y||o?e:function(t){e&&e(t),t.defaultPrevented||w(t)},ref:ft(f,x),target:l,"data-discover":g||"render"!==t?void 0:"true"});return _&&!g?r.createElement(r.Fragment,null,T,r.createElement(ut,{page:v})):T});function vt(e){let t=r.useContext(be);return U(t,function(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}yt.displayName="Link",r.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:a="",end:n=!1,style:o,to:i,viewTransition:s,children:l,...c},u){let d=Ie(i,{relative:c.relative}),p=Se(),f=r.useContext(we),{navigator:h,basename:m}=r.useContext(ke),g=null!=f&&function(e,{relative:t}={}){let a=r.useContext(Te);U(null!=a,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=vt("useViewTransitionState"),o=Ie(e,{relative:t});if(!a.isTransitioning)return!1;let i=ue(a.currentLocation.pathname,n)||a.currentLocation.pathname,s=ue(a.nextLocation.pathname,n)||a.nextLocation.pathname;return null!=le(o.pathname,s)||null!=le(o.pathname,i)}(d)&&!0===s,y=h.encodeLocation?h.encodeLocation(d).pathname:d.pathname,v=p.pathname,_=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),_=_?_.toLowerCase():null,y=y.toLowerCase()),_&&m&&(_=ue(_,m)||_);const x="/"!==y&&y.endsWith("/")?y.length-1:y.length;let b,w=v===y||!n&&v.startsWith(y)&&"/"===v.charAt(x),T=null!=_&&(_===y||!n&&_.startsWith(y)&&"/"===_.charAt(y.length)),k={isActive:w,isPending:T,isTransitioning:g},C=w?e:void 0;b="function"==typeof a?a(k):[a,w?"active":null,T?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let E="function"==typeof o?o(k):o;return r.createElement(yt,{...c,"aria-current":C,className:b,ref:u,style:E,to:i,viewTransition:s},"function"==typeof l?l(k):l)}).displayName="NavLink",r.forwardRef(({discover:e="render",fetcherKey:t,navigate:a,reloadDocument:n,replace:o,state:i,method:s=Ge,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:p,...f},h)=>{let m=function(){let{router:e}=vt("useSubmit"),{basename:t}=r.useContext(ke),a=De("useRouteId");return r.useCallback(async(n,r={})=>{let{action:o,method:i,encType:s,formData:l,body:c}=function(e,t){let a,n,r,o,i;if(Je(s=e)&&"form"===s.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?ue(i,t):null,a=e.getAttribute("method")||Ge,r=et(e.getAttribute("enctype"))||qe,o=new FormData(e)}else if(function(e){return Je(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Je(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||i.getAttribute("action");if(n=s?ue(s,t):null,a=e.getAttribute("formmethod")||i.getAttribute("method")||Ge,r=et(e.getAttribute("formenctype"))||et(i.getAttribute("enctype"))||qe,o=new FormData(i,e),!function(){if(null===Ze)try{new FormData(document.createElement("form"),0),Ze=!1}catch(e){Ze=!0}return Ze}()){let{name:t,type:a,value:n}=e;if("image"===a){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,n)}}else{if(Je(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Ge,n=null,r=qe,i=e}var s;return o&&"text/plain"===r&&(i=o,o=void 0),{action:n,method:a.toLowerCase(),encType:r,formData:o,body:i}}(n,t);if(!1===r.navigate){let t=r.fetcherKey||xt();await e.fetch(t,a,r.action||o,{preventScrollReset:r.preventScrollReset,formData:l,body:c,formMethod:r.method||i,formEncType:r.encType||s,flushSync:r.flushSync})}else await e.navigate(r.action||o,{preventScrollReset:r.preventScrollReset,formData:l,body:c,formMethod:r.method||i,formEncType:r.encType||s,replace:r.replace,state:r.state,fromRouteId:a,flushSync:r.flushSync,viewTransition:r.viewTransition})},[e,t,a])}(),g=function(e,{relative:t}={}){let{basename:a}=r.useContext(ke),n=r.useContext(Ee);U(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),i={...Ie(e||".",{relative:t})},s=Se();if(null==e){i.search=s.search;let e=new URLSearchParams(i.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let a=e.toString();i.search=a?`?${a}`:""}}return e&&"."!==e||!o.route.index||(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),"/"!==a&&(i.pathname="/"===i.pathname?a:he([a,i.pathname])),Y(i)}(l,{relative:u}),y="get"===s.toLowerCase()?"get":"post",v="string"==typeof l&&gt.test(l);return r.createElement("form",{ref:h,method:y,action:g,onSubmit:n?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,r=n?.getAttribute("formmethod")||s;m(n||e.currentTarget,{fetcherKey:t,method:r,navigate:a,replace:o,state:i,relative:u,preventScrollReset:d,viewTransition:p})},...f,"data-discover":v||"render"!==e?void 0:"true"})}).displayName="Form";var _t=0,xt=()=>`__${String(++_t)}__`;const bt=window.wp.components;var wt={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Tt=r.createContext&&r.createContext(wt),kt=["attr","size","title"];function Ct(){return Ct=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},Ct.apply(this,arguments)}function Et(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,n)}return a}function jt(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?Et(Object(a),!0).forEach(function(t){var n,r,o,i;n=e,r=t,o=a[t],i=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,"string");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r),(r="symbol"==typeof i?i:i+"")in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Et(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function Lt(e){return e&&e.map((e,t)=>r.createElement(e.tag,jt({key:t},e.attr),Lt(e.child)))}function St(e){return t=>r.createElement(Rt,Ct({attr:jt({},e.attr)},t),Lt(e.child))}function Rt(e){var t=t=>{var a,{attr:n,size:o,title:i}=e,s=function(e,t){if(null==e)return{};var a,n,r=function(e,t){if(null==e)return{};var a={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;a[n]=e[n]}return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)a=o[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}(e,kt),l=o||t.size||"1em";return t.className&&(a=t.className),e.className&&(a=(a?a+" ":"")+e.className),r.createElement("svg",Ct({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,s,{className:a,style:jt(jt({color:e.color||t.color},t.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),i&&r.createElement("title",null,i),e.children)};return void 0!==Tt?r.createElement(Tt.Consumer,null,e=>t(e)):t(wt)}function Pt(e){return St({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"},child:[]},{tag:"polyline",attr:{points:"15 3 21 3 21 9"},child:[]},{tag:"line",attr:{x1:"10",y1:"14",x2:"21",y2:"3"},child:[]}]})(e)}const Ot=(e=8)=>Math.random().toString(36).substring(2,e+2),Nt=window.wp.primitives,It=(0,r.createElement)(Nt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(Nt.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"}));function $t(e){return St({tag:"svg",attr:{viewBox:"0 0 32 32"},child:[{tag:"path",attr:{d:"M 18 5 L 18 7 L 23.5625 7 L 11.28125 19.28125 L 12.71875 20.71875 L 25 8.4375 L 25 14 L 27 14 L 27 5 Z M 5 9 L 5 27 L 23 27 L 23 14 L 21 16 L 21 25 L 7 25 L 7 11 L 16 11 L 18 9 Z"},child:[]}]})(e)}function Mt(e){return St({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 2v6"},child:[]},{tag:"path",attr:{d:"M15 2v6"},child:[]},{tag:"path",attr:{d:"M12 17v5"},child:[]},{tag:"path",attr:{d:"M5 8h14"},child:[]},{tag:"path",attr:{d:"M6 11V8h12v3a6 6 0 1 1-12 0Z"},child:[]}]})(e)}function zt(e){return St({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m20.38 8.57-1.23 1.85a8 8 0 0 1-.22 7.58H5.07A8 8 0 0 1 15.58 6.85l1.85-1.23A10 10 0 0 0 3.35 19a2 2 0 0 0 1.72 1h13.85a2 2 0 0 0 1.74-1 10 10 0 0 0-.27-10.44zm-9.79 6.84a2 2 0 0 0 2.83 0l5.66-8.49-8.49 5.66a2 2 0 0 0 0 2.83z"},child:[]}]})(e)}function Bt(e){return St({tag:"svg",attr:{viewBox:"0 0 15 15",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M5.49998 0.5C5.49998 0.223858 5.72383 0 5.99998 0H7.49998H8.99998C9.27612 0 9.49998 0.223858 9.49998 0.5C9.49998 0.776142 9.27612 1 8.99998 1H7.99998V2.11922C9.09832 2.20409 10.119 2.56622 10.992 3.13572C11.0116 3.10851 11.0336 3.08252 11.058 3.05806L12.058 2.05806C12.3021 1.81398 12.6978 1.81398 12.9419 2.05806C13.186 2.30214 13.186 2.69786 12.9419 2.94194L11.967 3.91682C13.1595 5.07925 13.9 6.70314 13.9 8.49998C13.9 12.0346 11.0346 14.9 7.49998 14.9C3.96535 14.9 1.09998 12.0346 1.09998 8.49998C1.09998 5.13361 3.69904 2.3743 6.99998 2.11922V1H5.99998C5.72383 1 5.49998 0.776142 5.49998 0.5ZM2.09998 8.49998C2.09998 5.51764 4.51764 3.09998 7.49998 3.09998C10.4823 3.09998 12.9 5.51764 12.9 8.49998C12.9 11.4823 10.4823 13.9 7.49998 13.9C4.51764 13.9 2.09998 11.4823 2.09998 8.49998ZM7.49998 8.49998V4.09998C5.06992 4.09998 3.09998 6.06992 3.09998 8.49998C3.09998 10.93 5.06992 12.9 7.49998 12.9C8.715 12.9 9.815 12.4075 10.6112 11.6112L7.49998 8.49998Z",fill:"currentColor"},child:[]}]})(e)}const Ft=window.ReactJSXRuntime,At={general:(0,Ft.jsx)(Bt,{}),preloading:(0,Ft.jsx)(zt,{}),addons:(0,Ft.jsx)(Mt,{}),settings:It,support:(0,Ft.jsx)($t,{})},Dt=(Object.freeze({SPEED:2,FOREGROUND_COLOR:"#b9b8b8"}),{id:Ot(),key:"addons",label:(0,D.__)("Addons","pageflash"),description:(0,D.__)("Explore and install addons to extend your website functionality.","pageflash"),plugins:[{id:Ot(),name:(0,D.__)("Contact Form 7","pageflash"),slug:"contact-form-7",author:(0,D.__)("Takayuki Miyoshi","pageflash"),description:(0,D.__)("A minimal and flexible plugin for creating contact forms easily.","pageflash"),badge:(0,D.__)("Free","pageflash"),logo:"https://ps.w.org/contact-form-7/assets/icon-256x256.png",link:"https://wordpress.org/plugins/contact-form-7/"},{id:Ot(),name:(0,D.__)("Site Kit by Google","pageflash"),slug:"google-site-kit",author:(0,D.__)("Google","pageflash"),description:(0,D.__)("The official plugin for Google services insights and site stats.","pageflash"),badge:(0,D.__)("Free","pageflash"),logo:"https://ps.w.org/google-site-kit/assets/icon-256x256.png",link:"https://wordpress.org/plugins/google-site-kit/"},{id:Ot(),name:(0,D.__)("WPForms Lite","pageflash"),slug:"wpforms-lite",author:(0,D.__)("WPForms","pageflash"),description:(0,D.__)("A beginner-friendly drag and drop builder for contact forms.","pageflash"),badge:(0,D.__)("Free","pageflash"),logo:"https://ps.w.org/wpforms-lite/assets/icon-256x256.png",link:"https://wordpress.org/plugins/wpforms-lite/"},{id:Ot(),name:(0,D.__)("Yoast SEO","pageflash"),slug:"wordpress-seo",author:(0,D.__)("Team Yoast","pageflash"),description:(0,D.__)("Boost your site ranking with smart SEO suggestions and tools.","pageflash"),badge:(0,D.__)("Free","pageflash"),logo:"https://ps.w.org/wordpress-seo/assets/icon-128x128.gif",link:"https://wordpress.org/plugins/wordpress-seo/"},{id:Ot(),name:(0,D.__)("Really Simple SSL","pageflash"),slug:"really-simple-ssl",author:(0,D.__)("Really Simple Plugins","pageflash"),description:(0,D.__)("Easily enable HTTPS and fix insecure content with one click.","pageflash"),badge:(0,D.__)("Free","pageflash"),logo:"https://ps.w.org/really-simple-ssl/assets/icon-256x256.png",link:"https://wordpress.org/plugins/really-simple-ssl/"},{id:Ot(),name:(0,D.__)("Wordfence Security","pageflash"),slug:"wordfence",author:(0,D.__)("Wordfence","pageflash"),description:(0,D.__)("Firewall and malware scanner for WordPress.","pageflash"),badge:(0,D.__)("Free","pageflash"),logo:"https://ps.w.org/wordfence/assets/icon-256x256.png",link:"https://wordpress.org/plugins/wordfence/"},{id:Ot(),name:(0,D.__)("LiteSpeed Cache","pageflash"),slug:"litespeed-cache",author:(0,D.__)("LiteSpeed Technologies","pageflash"),description:(0,D.__)("Speed up your site with all-in-one site acceleration plugin.","pageflash"),badge:(0,D.__)("Free","pageflash"),logo:"https://ps.w.org/litespeed-cache/assets/icon-256x256.png",link:"https://wordpress.org/plugins/litespeed-cache/"},{id:Ot(),name:(0,D.__)("MailPoet","pageflash"),slug:"mailpoet",author:(0,D.__)("MailPoet","pageflash"),description:(0,D.__)("Create and send email newsletters directly from WordPress dashboard.","pageflash"),badge:(0,D.__)("Free","pageflash"),logo:"https://ps.w.org/mailpoet/assets/icon-256x256.png",link:"https://wordpress.org/plugins/mailpoet/"}]}),Ht=()=>(0,Ft.jsx)(bt.__experimentalGrid,{columns:[1,2,4],gap:5,className:"pageflash-addons",children:Dt.plugins.map(e=>(0,Ft.jsx)(bt.Card,{children:(0,Ft.jsx)(bt.CardBody,{children:(0,Ft.jsxs)(bt.__experimentalVStack,{spacing:4,children:[(0,Ft.jsxs)(bt.__experimentalHStack,{children:[(0,Ft.jsx)(bt.CardBody,{style:{padding:"0px"},size:"XSmall",children:(0,Ft.jsx)("img",{className:"pageflash-addons__image",src:e.logo,alt:"Addon logo"})}),(0,Ft.jsx)("span",{className:"pageflash-addons__badge",children:e.badge})]}),(0,Ft.jsxs)(bt.__experimentalVStack,{children:[(0,Ft.jsx)(bt.__experimentalHeading,{level:4,weight:500,children:e.name}),(0,Ft.jsx)(bt.__experimentalText,{size:15,lineHeight:1.6,variant:"muted",children:e.description}),(0,Ft.jsx)("div",{className:"pageflash-addons__explore-link",children:(0,Ft.jsxs)("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",children:["Let's Explore",(0,Ft.jsx)(bt.Icon,{icon:Pt,size:16,style:{marginLeft:"4px"}})]})})]})]})})},e.id))}),Wt=({type:e="text",label:t,help:a,value:n,onChange:r,inputProps:o={},heading:i,description:s,titleSize:l=4,externalLink:c=!0})=>{let u;return u="textarea"===e?bt.TextareaControl:"input"===e?bt.__experimentalInputControl:bt.TextControl,(0,Ft.jsx)(bt.Card,{className:"pageflash-formfield",size:"large",children:(0,Ft.jsx)(bt.CardBody,{children:(0,Ft.jsxs)(bt.Flex,{gap:4,direction:"column",children:[i&&(0,Ft.jsxs)(bt.FlexItem,{children:[(0,Ft.jsxs)(bt.Flex,{direction:"row",gap:1,justify:"start",align:"center",children:[(0,Ft.jsx)(bt.__experimentalHeading,{level:l,children:i}),c&&(0,Ft.jsx)("a",{href:"#",target:"_blank",rel:"noreferrer",style:{textDecoration:"none"},children:(0,Ft.jsx)(bt.__experimentalText,{children:(0,Ft.jsx)($t,{size:22})})})]}),s&&(0,Ft.jsx)(bt.__experimentalText,{size:13,lineHeight:1.6,weight:400,style:{marginTop:"8px"},variant:"muted",children:s})]}),(0,Ft.jsx)(bt.FlexItem,{children:(0,Ft.jsx)(u,{label:t,help:a,value:n,onChange:r,...o})})]})})})},Ut=({heading:e,description:t,value:a,onChange:n,options:r,titleSize:o=4,externalLink:i=!0})=>(0,Ft.jsx)(bt.Card,{className:"pageflash-select",size:"large",children:(0,Ft.jsx)(bt.CardBody,{children:(0,Ft.jsxs)(bt.Flex,{gap:4,direction:"column",children:[(0,Ft.jsxs)(bt.FlexItem,{children:[(0,Ft.jsxs)(bt.Flex,{direction:"row",gap:1,justify:"start",align:"center",children:[(0,Ft.jsx)(bt.__experimentalHeading,{level:o,children:e}),i&&(0,Ft.jsx)("a",{href:"#",target:"_blank",rel:"noreferrer",style:{textDecoration:"none"},children:(0,Ft.jsx)(bt.__experimentalText,{children:(0,Ft.jsx)($t,{size:22})})})]}),t&&(0,Ft.jsx)(bt.__experimentalText,{size:13,lineHeight:1.6,weight:400,style:{marginTop:"8px"},variant:"muted",children:t})]}),(0,Ft.jsx)(bt.FlexItem,{children:(0,Ft.jsx)(bt.SelectControl,{size:"default",value:a,onChange:n,options:r,__nextHasNoMarginBottom:!0})})]})})}),Vt=({heading:e,description:t,checked:a,onToggle:n,children:r,externalLink:o=!0})=>(0,Ft.jsx)(Ft.Fragment,{children:(0,Ft.jsx)(bt.Card,{className:"pageflash-switch",size:"large",children:(0,Ft.jsxs)(bt.CardBody,{children:[(0,Ft.jsxs)(bt.Flex,{gap:2,children:[(0,Ft.jsxs)(bt.FlexItem,{children:[(0,Ft.jsxs)(bt.Flex,{direction:"row",gap:1,justify:"start",align:"center",children:[(0,Ft.jsx)(bt.__experimentalHeading,{level:4,children:e}),o&&(0,Ft.jsx)("a",{href:"#",target:"_blank",rel:"noreferrer",style:{textDecoration:"none"},children:(0,Ft.jsx)(bt.__experimentalText,{children:(0,Ft.jsx)($t,{size:22})})})]}),(0,Ft.jsx)(bt.__experimentalText,{size:14,lineHeight:1.6,weight:400,style:{maxWidth:"900px"},variant:"muted",children:t})]}),(0,Ft.jsx)(bt.FlexItem,{children:(0,Ft.jsx)(bt.ToggleControl,{__nextHasNoMarginBottom:!0,checked:a,onChange:n})})]}),r&&(0,Ft.jsx)("div",{style:{marginTop:"16px",marginLeft:"20px"},children:r})]})})}),Xt=window.wp.apiFetch;var Kt=e.n(Xt);const Yt="ACTIVE_MENU",Gt="SET_LANDMARKS",qt="UPDATE_LANDMARK",Jt=e=>({type:Yt,payload:e}),Zt=(0,n.createContext)(null),Qt=()=>{const e=(0,n.useContext)(Zt);if(!e)throw new Error("usePageflashContext must be used within a PageflashProvider");return e},ea=()=>{const{landmarks:e,dispatch:t}=Qt(),[a,r]=(0,n.useState)(!0),[o,i]=(0,n.useState)(null),s=(0,n.useCallback)(()=>{r(!0),i(null),Kt()({path:"/pageflash/v1/landmark",method:"GET"}).then(e=>{t((e=>({type:Gt,payload:e}))(e.data)),r(!1)}).catch(e=>{i(e.message||"Failed to fetch landmarks"),r(!1)})},[]);return(0,n.useEffect)(()=>{s()},[]),{landmarks:e,loading:a,error:o}},ta=()=>{const{dispatch:e}=Qt(),[t,a]=(0,n.useState)(!1),[r,o]=(0,n.useState)(null);return{updateLandmark:(t,n)=>(a(!0),o(null),Kt()({path:`/pageflash/v1/landmark/${t}`,method:"PUT",data:n}).then(n=>(n.data&&e(((e,t)=>({type:qt,payload:{slug:e,updates:t}}))(t,n.data)),a(!1),n)).catch(e=>{throw o(e.message||"Failed to update landmark"),a(!1),e})),loading:t,error:r}},aa=(e={})=>Object.entries(e).map(([e,t])=>({label:t,value:e})),na=({slug:e,inputKey:t,field:a})=>{var o,i,s;const{updateLandmark:l,loading:c}=ta(),[u,d]=(0,n.useState)(null!==(o=null!==(i=a.value)&&void 0!==i?i:a.default)&&void 0!==o?o:""),p=function(e,t){const[a,n]=(0,r.useState)(e);return(0,r.useEffect)(()=>{const a=setTimeout(()=>{n(e)},t);return()=>clearTimeout(a)},[e,t]),a}(u,1e3);(0,n.useEffect)(()=>{var n,r;"text"!==a.type&&"textarea"!==a.type&&"input"!==a.type||p===(null!==(n=null!==(r=a.value)&&void 0!==r?r:a.default)&&void 0!==n?n:"")||f(e,t,p)},[p]);const f=(e,t,a)=>{l(e,{input:{[t]:{value:a}}}).then(()=>{O.success("Setting updated!",{autoClose:1e3})}).catch(e=>{O.error("Failed to update setting",{autoClose:2e3})})};switch(a.type){case"select":return(0,Ft.jsx)(Ut,{titleSize:5,externalLink:!1,heading:a.label,description:a.description,value:null!==(s=a.value)&&void 0!==s?s:a.default,options:aa(a.options),onChange:a=>f(e,t,a)});case"text":return(0,Ft.jsx)(Wt,{type:"text",titleSize:5,externalLink:!1,heading:a.label,description:a.description,value:u,onChange:d});case"textarea":return(0,Ft.jsx)(Wt,{type:"textarea",titleSize:5,externalLink:!1,heading:a.label,description:a.description,value:u,onChange:d});case"input":return(0,Ft.jsx)(Wt,{type:"input",titleSize:5,externalLink:!1,heading:a.label,description:a.description,value:u,onChange:d});default:return null}},ra=({menuSlug:e})=>{const{landmarks:t,loading:a,error:r}=ea(),{updateLandmark:o,loading:i}=ta(),s=(0,n.useMemo)(()=>((e,t)=>{if(!e)return[];const a=Array.isArray(e)?e:Object.values(e);return t?a.filter(e=>e.menu===t):a})(t,e),[t,e]),l=(e,t)=>{o(t,{value:e}).then(()=>{O.success("Setting updated!",{autoClose:1e3})}).catch(e=>{O.error("Failed to update setting",{autoClose:2e3})})};return(0,Ft.jsx)(bt.__experimentalHStack,{alignment:"normal",direction:"column",spacing:5,className:`pageflash-body pageflash-${e}`,children:s.map(e=>"switch"===e.type?(0,Ft.jsx)(Vt,{heading:e.label,description:e.description,checked:e.active||!1,onToggle:t=>((e,t)=>{o(t,{active:e}).then(()=>{e?O.success("Settings enabled!",{autoClose:1e3}):O.info("Settings disabled.",{autoClose:1e3})}).catch(e=>{O.error("Failed to update setting",{autoClose:2e3})})})(t,e.slug),externalLink:!1,children:e.active&&e.input&&Object.entries(e.input).map(([t,a])=>(0,Ft.jsx)(na,{slug:e.slug,inputKey:t,field:a},t))},e.id):"select"===e.type?(0,Ft.jsx)(Ut,{heading:e.label,description:e.description,value:e.value||"",onChange:t=>l(t,e.slug),options:aa(e.options||[]),externalLink:!1},e.id):"input"===e.type||"text"===e.type||"textarea"===e.type?(0,Ft.jsx)(Wt,{type:e.type,heading:e.label,description:e.description,value:e.value||"",onChange:t=>l(t,e.slug),externalLink:!1},e.id):null)})},oa=window.wp.compose,ia=(0,r.createElement)(Nt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(Nt.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),sa=(0,r.createElement)(Nt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(Nt.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"}));function la(e){return St({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{fill:"#D9D9D9",d:"M261.7 621.4c-9.4 14.6-17 30.3-22.5 46.6H324V558.7c-24.8 16.2-46 37.5-62.3 62.7zM700 558.7V668h84.8c-5.5-16.3-13.1-32-22.5-46.6a211.6 211.6 0 0 0-62.3-62.7zm-64-239.9l-124-147-124 147V668h248V318.8zM512 448a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z"},child:[]},{tag:"path",attr:{d:"M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 0 0-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0 0 43.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0 0 43.1-30.5 97.52 97.52 0 0 0 21.4-60.8c0-8.4-1.1-16.4-3.1-23.8L864 736zm-540-68h-84.8c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668zm64-184.9V318.8l124-147 124 147V668H388V483.1zm240.1 301.1c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5s-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 0 1-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM700 668V558.7a211.6 211.6 0 0 1 62.3 62.7c9.4 14.6 17 30.3 22.5 46.6H700z"},child:[]},{tag:"path",attr:{d:"M464 400a48 48 0 1 0 96 0 48 48 0 1 0-96 0z"},child:[]}]})(e)}const ca=({activeMenu:e,onButtonClick:t,menus:a=[]})=>{const n=Oe();return(0,Ft.jsx)(bt.__experimentalVStack,{className:"pageflash-header__menu-list",spacing:0,children:a.map(({slug:a,label:r,icon:o},i)=>(0,Ft.jsx)(bt.Button,{className:"pageflash-header__menu-button",variant:e===a?"primary":"secondary",icon:o,onClick:()=>{t(a),n(0===i?"/":`/${a}`)},children:r},a))})},ua=({children:e,menus:t=[]})=>{const{activeMenu:a,dispatch:n}=Qt(),o=Se(),i=(0,oa.useViewportMatch)("medium",">="),s=(0,oa.useViewportMatch)("medium","<"),[l,c]=(0,r.useState)(!1),u=e=>{n(Jt(e))};return(0,r.useEffect)(()=>{const e=o.pathname.replace("/","")||t[0]?.slug;e&&e!==a&&n(Jt(e))},[o,t,a]),(0,Ft.jsx)(Ft.Fragment,{children:(0,Ft.jsx)(bt.Card,{className:"pageflash-header",children:(0,Ft.jsxs)(bt.Flex,{expanded:!0,gap:0,align:"top",direction:["column","column","row"],children:[(0,Ft.jsx)(bt.CardBody,{style:{width:i?"280px":"100%"},className:"pageflash-header__menu",children:(0,Ft.jsxs)(bt.__experimentalVStack,{spacing:8,style:{marginTop:"15px"},children:[(0,Ft.jsxs)(bt.__experimentalHStack,{style:{marginLeft:"8px",marginBottom:i?"":"10px"},children:[(0,Ft.jsxs)(bt.Flex,{className:"pageflash-header__logo",justify:"left",children:[(0,Ft.jsx)(la,{size:40,color:"#1c1e24"}),(0,Ft.jsx)(bt.__experimentalHeading,{level:2,style:{marginRight:"10px"},children:(0,D.__)("PageFlash","pageflash")})]}),s&&(0,Ft.jsx)(bt.Button,{icon:l?ia:sa,onClick:()=>c(e=>!e),style:{marginRight:"8px",color:"#1c1e24"}})]}),i&&(0,Ft.jsx)(ca,{activeMenu:a,onButtonClick:u,menus:t})]})}),(0,Ft.jsxs)(bt.__experimentalZStack,{isReversed:!0,className:"pageflash-header__z-stack",children:[s&&l&&(0,Ft.jsx)(ca,{activeMenu:a,onButtonClick:u,menus:t}),(0,Ft.jsxs)(bt.CardBody,{className:"pageflash-header__card-body",children:[(0,Ft.jsxs)(bt.__experimentalHStack,{expanded:!1,className:"pageflash-header__h-stack",children:[(0,Ft.jsx)(bt.__experimentalHeading,{children:t.find(e=>e.slug===a)?.label||(d=a,"string"!=typeof d||0===d.length?d:d.charAt(0).toUpperCase()+d.slice(1))}),(0,Ft.jsx)(bt.Button,{variant:"primary",icon:(0,Ft.jsx)($t,{}),onClick:()=>O.success("Get feature coming soon!",{position:"top-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"light"}),children:(0,D.__)("Get Pro","pageflash")})]}),e]})]})]})})});var d},da=({menus:e})=>(0,Ft.jsx)(ua,{menus:e,children:(0,Ft.jsx)("main",{className:"pageflash-main-content",children:(0,Ft.jsx)(Ue,{})})}),pa=function(){return(0,Ft.jsxs)("div",{className:"pageflash-support",children:[(0,Ft.jsxs)(bt.Card,{children:[(0,Ft.jsx)(bt.CardHeader,{children:(0,Ft.jsx)("h2",{children:(0,D.__)("Documentation","pageflash")})}),(0,Ft.jsxs)(bt.CardBody,{children:[(0,Ft.jsx)("p",{children:(0,D.__)("Need help? Check out our in-depth documentation. Every feature has a step-by-step walkthrough.","pageflash")}),(0,Ft.jsx)(bt.Button,{variant:"secondary",icon:(0,Ft.jsx)($t,{}),iconPosition:"right",href:"#",rel:"noopener noreferrer",children:(0,D.__)("Documentation","pageflash")})]})]}),(0,Ft.jsxs)(bt.Card,{children:[(0,Ft.jsx)(bt.CardHeader,{children:(0,Ft.jsx)("h2",{children:(0,D.__)("Contact Us","pageflash")})}),(0,Ft.jsxs)(bt.CardBody,{children:[(0,Ft.jsx)("p",{children:(0,D.__)("If you have questions or problems, please send us a message. We'll get back to you as soon as possible.","pageflash")}),(0,Ft.jsx)(bt.Button,{variant:"secondary",icon:(0,Ft.jsx)($t,{}),iconPosition:"right",href:"#",rel:"noopener noreferrer",children:(0,D.__)("Contact Us","pageflash")})]})]}),(0,Ft.jsxs)(bt.Card,{children:[(0,Ft.jsx)(bt.CardHeader,{children:(0,Ft.jsx)("h2",{children:(0,D.__)("Frequently Asked Questions","pageflash")})}),(0,Ft.jsx)(bt.CardBody,{children:(0,Ft.jsxs)(bt.Flex,{gap:4,wrap:!0,children:[(0,Ft.jsx)(bt.FlexBlock,{children:(0,Ft.jsxs)("div",{className:"pageflash-support-faq-column",children:[(0,Ft.jsx)(bt.Button,{variant:"link",href:"#",rel:"noopener noreferrer",children:(0,D.__)("How do I license activate the plugin?","pageflash")}),(0,Ft.jsx)(bt.Button,{variant:"link",href:"#",rel:"noopener noreferrer",children:(0,D.__)("How do I update the plugin?","pageflash")}),(0,Ft.jsx)(bt.Button,{variant:"link",href:"#",rel:"noopener noreferrer",children:(0,D.__)("How do I upgrade my license?","pageflash")}),(0,Ft.jsx)(bt.Button,{variant:"link",href:"#",rel:"noopener noreferrer",children:(0,D.__)("Where can I view the changelog?","pageflash")}),(0,Ft.jsx)(bt.Button,{variant:"link",href:"#",rel:"noopener noreferrer",children:(0,D.__)("Where can I sign up for the affiliate program?","pageflash")})]})}),(0,Ft.jsx)(bt.FlexBlock,{children:(0,Ft.jsxs)("div",{className:"pageflash-support-faq-column",children:[(0,Ft.jsx)(bt.Button,{variant:"link",href:"#",rel:"noopener noreferrer",children:(0,D.__)("How do I disable scripts on a per post/page basis?","pageflash")}),(0,Ft.jsx)(bt.Button,{variant:"link",href:"#",rel:"noopener noreferrer",children:(0,D.__)("How do I delay JavaScript?","pageflash")}),(0,Ft.jsx)(bt.Button,{variant:"link",href:"#",rel:"noopener noreferrer",children:(0,D.__)("How do I remove unused CSS?","pageflash")}),(0,Ft.jsx)(bt.Button,{variant:"link",href:"#",rel:"noopener noreferrer",children:(0,D.__)("How do I lazy load images and videos?","pageflash")}),(0,Ft.jsx)(bt.Button,{variant:"link",href:"#",rel:"noopener noreferrer",children:(0,D.__)("How do I host Google Analytics locally?","pageflash")})]})})]})})]})]})},fa=(0,n.memo)(()=>(0,Ft.jsxs)("div",{className:"skeleton-wrapper",children:[(0,Ft.jsxs)("div",{className:"skeleton-header",children:[(0,Ft.jsxs)("div",{className:"skeleton-header-left",children:[(0,Ft.jsx)("span",{className:"logo"}),(0,Ft.jsx)("span",{className:"logo-name"})]}),(0,Ft.jsx)("div",{className:"skeleton-header-center"}),(0,Ft.jsx)("div",{className:"skeleton-header-right",children:" "})]}),(0,Ft.jsxs)("div",{className:"skeleton-main",children:[(0,Ft.jsx)("div",{className:"skeleton-sidebar",children:Array.from({length:8}).map((e,t)=>(0,Ft.jsx)("div",{className:"skeleton-sidebar-row"},t))}),(0,Ft.jsx)("div",{className:"skeleton-content",children:Array.from({length:8}).map((e,t)=>(0,Ft.jsxs)("div",{className:"skeleton-row",children:[(0,Ft.jsxs)("div",{className:"skeleton-row-left",children:[(0,Ft.jsx)("div",{className:"skeleton-row-title"}),(0,Ft.jsx)("div",{className:"skeleton-row-desc"})]}),(0,Ft.jsx)("div",{className:"skeleton-row-toggle"})]},t))})]})]})),ha=(0,n.memo)(({children:e})=>(0,Ft.jsxs)(Ft.Fragment,{children:[(0,Ft.jsx)(fa,{}),e]})),ma=({isLoading:e,dashboard:t})=>e?(0,Ft.jsx)(ha,{}):t,ga=function(){const{menus:e,loading:t}=(()=>{const{landmarks:e,loading:t}=ea();return{menus:(0,n.useMemo)(()=>{if(!e)return[];const t=e.data||e;if("object"!=typeof t)return[];const a=new Map;return Object.values(t).forEach(e=>{if(e?.menu)if(a.has(e.menu)){var t;const n=a.get(e.menu),r=null!==(t=e.menuOrder)&&void 0!==t?t:999;r<n.order&&a.set(e.menu,{slug:e.menu,order:r,label:e.menuLabel||e.menu,icon:At[e.menu]||n.icon})}else{var n;a.set(e.menu,{slug:e.menu,order:null!==(n=e.menuOrder)&&void 0!==n?n:999,label:e.menuLabel||e.menu,icon:At[e.menu]||null})}}),Array.from(a.values()).sort((e,t)=>e.order-t.order)},[e]),loading:t}})(),a=[{slug:"addons",order:100,label:(0,D.__)("Addons","pageflash"),icon:At.addons},{slug:"support",order:300,label:(0,D.__)("Support","pageflash"),icon:At.support}],r=((e=[],t=[])=>{const a=new Map;return e.forEach(e=>{a.set(e.slug,e)}),t.forEach(e=>{a.has(e.slug)?a.set(e.slug,{...a.get(e.slug),...e}):a.set(e.slug,{order:999,...e})}),Array.from(a.values()).sort((e,t)=>e.order-t.order)})(e,a);return(0,Ft.jsx)(ma,{isLoading:t||0===r.length,dashboard:(0,Ft.jsx)(mt,{children:(0,Ft.jsx)(Ke,{children:(0,Ft.jsx)(Ve,{element:(0,Ft.jsx)(da,{menus:r}),children:r.map((t,a)=>{if("addons"===t.slug)return(0,Ft.jsx)(Ve,{path:"addons",element:(0,Ft.jsx)(Ht,{})},t.slug);if("settings"===t.slug)return(0,Ft.jsx)(Ve,{path:"settings",element:(0,Ft.jsx)("h1",{children:"Settings"})},t.slug);if("support"===t.slug)return(0,Ft.jsx)(Ve,{path:"support",element:(0,Ft.jsx)(pa,{})},t.slug);const n=0===e.findIndex(e=>e.slug===t.slug);return(0,Ft.jsx)(Ve,{index:n,path:n?void 0:t.slug,element:(0,Ft.jsx)(ra,{menuSlug:t.slug})},t.slug)})})})})})},ya={activeMenu:"general",landmarks:{}},va=(e,t)=>{switch(t.type){case Yt:return{...e,activeMenu:t.payload};case Gt:return{...e,landmarks:t.payload};case qt:{const{slug:a,updates:n}=t.payload,r={...e.landmarks};return r[a]&&(r[a]={...r[a],...n}),{...e,landmarks:r}}default:return e}},_a=({children:e})=>{const[t,a]=(0,n.useReducer)(va,ya);return(0,Ft.jsx)(Zt.Provider,{value:{...t,dispatch:a},children:e})},xa=()=>(0,Ft.jsxs)(_a,{children:[(0,Ft.jsx)(A,{position:"top-right",className:"pageflash-toast-container",autoClose:2e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0,theme:"light"}),(0,Ft.jsx)(ga,{})]});a()(()=>{(()=>{const e=document.getElementById("pageflash-admin"),t=window?.pageflashAdmin?.isDevelopment,a=Boolean(t)?r.StrictMode:r.Fragment;e?(0,n.createRoot)(e).render((0,Ft.jsx)(a,{children:(0,Ft.jsx)(xa,{})})):console.error("Root element not found. Make sure #pageflash-admin exists in the DOM.")})()})})();
  • pageflash/tags/2.0.0/build/quicklink/quicklink.asset.php

    r3295254 r3446147  
    1 <?php return array('dependencies' => array(), 'version' => '43cc382900d2313ead80');
     1<?php return array('dependencies' => array(), 'version' => 'eb584e458c2ba96551f2');
  • pageflash/tags/2.0.0/build/quicklink/quicklink.js

    r3295254 r3446147  
    1 (()=>{var r={6:()=>{function r(r){return"string"==typeof r&&Number(r)>0?Number(r):1/0}function t(r){return"string"==typeof r&&""!==r}window.addEventListener("load",(()=>{const e=window.pageflashSettings||{},n=function(e){return{el:(s=e.el,"string"==typeof s&&""!==s.trim()?document.querySelector(s):null),timeout:(u=e.timeout,"string"==typeof u?Number(u):2e3),limit:r(e.limit),throttle:r(e.throttle),timeoutFn:(o=e.timeoutFn,"string"==typeof o&&"function"==typeof window[o]?(...r)=>window[o](...r):null),priority:t(e.priority),origins:(i=e.origins,Array.isArray(i)&&i.length>0?i:[]),ignores:(n=e.ignores,Array.isArray(n)&&n.length>0?n.map((r=>new RegExp(r))):[])};var n,i,o,u,s}(e);window.quicklink.listen(n),function(r){Array.isArray(r.urls)&&r.urls.length>0&&window.quicklink.prefetch(r.urls)}(e)}))}},t={};function e(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return r[n](o,o.exports,e),o.exports}e.n=r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return e.d(t,{a:t}),t},e.d=(r,t)=>{for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},e.o=(r,t)=>Object.prototype.hasOwnProperty.call(r,t),(()=>{"use strict";e(6)})()})();
     1(()=>{var r={6:()=>{function r(r){return"string"==typeof r&&Number(r)>0?Number(r):1/0}function t(r){return"string"==typeof r&&""!==r}window.addEventListener("load",()=>{const e=window.pageflashSettings||{},n=function(e){return{el:(s=e.el,"string"==typeof s&&""!==s.trim()?document.querySelector(s):null),timeout:(u=e.timeout,"string"==typeof u?Number(u):2e3),limit:r(e.limit),throttle:r(e.throttle),timeoutFn:(o=e.timeoutFn,"string"==typeof o&&"function"==typeof window[o]?(...r)=>window[o](...r):null),priority:t(e.priority),origins:(i=e.origins,Array.isArray(i)&&i.length>0?i:[]),ignores:(n=e.ignores,Array.isArray(n)&&n.length>0?n.map(r=>new RegExp(r)):[])};var n,i,o,u,s}(e);window.quicklink.listen(n),function(r){Array.isArray(r.urls)&&r.urls.length>0&&window.quicklink.prefetch(r.urls)}(e)})}},t={};function e(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return r[n](o,o.exports,e),o.exports}e.n=r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return e.d(t,{a:t}),t},e.d=(r,t)=>{for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},e.o=(r,t)=>Object.prototype.hasOwnProperty.call(r,t),(()=>{"use strict";e(6)})()})();
  • pageflash/tags/2.0.0/includes/Admin/ActionLinks.php

    r3295254 r3446147  
    11<?php
    22
    3 namespace PageFlash\Admin;
     3namespace TheAminul\PageFlash\Admin;
    44
    55if ( ! defined( 'ABSPATH' ) ) {
     
    7070
    7171            $row_meta = array(
    72                 'docs' => '<a href="https://github.com/theaminuldev/pageflash" aria-label="' . esc_attr( esc_html__( 'View PageFlash Documentation', 'pageflash' ) ) . '" target="_blank">' . esc_html__( 'Docs & FAQs', 'pageflash' ) . '</a>',
    73                 // 'video' => '<a href="#" aria-label="' . esc_attr(esc_html__('View PageFlash Video Tutorials', 'pageflash')) . '" target="_blank">' . esc_html__('Video Tutorials', 'pageflash') . '</a>',
     72                'docs' => '<a href="https://github.com/theaminuldev/pageflash" aria-label="' . esc_attr__( 'View PageFlash Documentation', 'pageflash' ) . '" target="_blank" rel="noopener noreferrer">' . esc_html__( 'Docs & FAQs', 'pageflash' ) . '</a>',
     73                // 'video' => '<a href="#" aria-label="' . esc_attr__('View PageFlash Video Tutorials', 'pageflash') . '" target="_blank">' . esc_html__('Video Tutorials', 'pageflash') . '</a>',
    7474            );
    7575            $plugin_meta = array_merge( $plugin_meta, $row_meta );
  • pageflash/tags/2.0.0/includes/Admin/Admin.php

    r3295254 r3446147  
    11<?php
    22
    3 namespace PageFlash\Admin;
     3namespace TheAminul\PageFlash\Admin;
    44
    55if ( ! defined( 'ABSPATH' ) ) {
     
    2020     * Constructor for the Admin class.
    2121     *
    22      * Initializes the settings API and adds necessary actions.
     22     * Initializes the settings adds necessary actions.
    2323     *
    2424     * @since PageFlash 1.0.0
     
    4040    private function init_admin() {
    4141        new ActionLinks();
     42        new AdminMenu();
    4243    }
    4344}
  • pageflash/tags/2.0.0/includes/AssetsManager/AssetsManager.php

    r3295254 r3446147  
    11<?php
    22
    3 namespace PageFlash\AssetsManager;
     3namespace TheAminul\PageFlash\AssetsManager;
    44
    55if ( ! defined( 'ABSPATH' ) ) {
     
    1919    public function __construct() {
    2020        // Constructor code
    21         // Define asset loading and registration here
    22         add_action( 'wp_default_scripts', array( $this, 'pageflash_wp_default_scripts' ) );
    23         add_action( 'wp_enqueue_scripts', array( $this, 'pageflash_frontend_assets' ) );
    2421        add_action( 'admin_enqueue_scripts', array( $this, 'pageflash_admin_enqueue_scripts' ) );
    25     }
    26 
    27     /**
    28      * Enqueue scripts for the PageFlash plugin frontend.
    29      *
    30      * This method enqueues scripts necessary for the PageFlash plugin's functionality.
    31      * Add quicklink to the default scripts to make it available earlier in the runtime.
    32      *
    33      * @param WP_Scripts $scripts The WP_Scripts instance.
    34      * @return void
    35      * @since PageFlash 1.0.0
    36      */
    37     public function pageflash_wp_default_scripts( $scripts ) {
    38         // Define the version for Quicklink, falling back to a default version if not set
    39         $quicklink_version = defined( 'PAGEFLASH_VERSION' ) && ! empty( PAGEFLASH_VERSION ) ? PAGEFLASH_VERSION : '2.3.0';
    40 
    41         // Include the asset file for script dependencies and version
    42         $script_asset = include PAGEFLASH_PATH . 'build/quicklink/quicklink.asset.php';
    43         $scripts->add(
    44             'pageflash-quicklink',
    45             PAGEFLASH_ASSETS_URL . 'libs/quicklink/dist/quicklink.umd.js',
    46             array(),
    47             $quicklink_version,
    48             true
    49         );
    50 
    51         if ( is_array( $script_asset ) && isset( $script_asset['dependencies'], $script_asset['version'] ) ) {
    52             $scripts->add(
    53                 'pageflash-frontend',
    54                 PAGEFLASH_URL . 'build/quicklink/quicklink.js',
    55                 $script_asset['dependencies'],
    56                 $script_asset['version'],
    57                 true
    58             );
    59         }
    60         return $scripts;
    61     }
    62 
    63     /**
    64      * Enqueue scripts and styles for the PageFlash plugin frontend.
    65      *
    66      * This method enqueues scripts and styles necessary for the PageFlash plugin's functionality.
    67      *
    68      * @return void
    69      * @since PageFlash 1.0.0
    70      */
    71     public function pageflash_frontend_assets() {
    72         wp_enqueue_script( 'pageflash-frontend' );
    73         wp_enqueue_script( 'pageflash-quicklink' );
     22        add_action( 'admin_init', array( $this, 'pageflash_admin_icon' ) );
    7423    }
    7524
     
    8231     * @since PageFlash 1.0.0
    8332     */
    84     public function pageflash_admin_enqueue_scripts() {
     33    public function pageflash_admin_enqueue_scripts( $admin_page ) {
     34        if ( 'toplevel_page_pageflash' !== $admin_page ) {
     35            return;
     36        }
     37        $asset_file = PAGEFLASH_PATH . 'build/admin/admin.asset.php';
     38        if ( ! file_exists( $asset_file ) ) {
     39            return;
     40        }
     41
     42        $script_asset = include $asset_file;
     43        // Enqueue admin style with dependencies and version from asset file
     44        wp_enqueue_style(
     45            'pageflash-admin',
     46            PAGEFLASH_BUILD_URL . 'admin/admin.css',
     47            array( 'wp-components' ),
     48            isset( $script_asset['version'] ) ? $script_asset['version'] : '1.0.0'
     49        );
     50        // Enqueue admin script with dependencies and version from asset file
     51        wp_enqueue_script(
     52            'pageflash-admin',
     53            PAGEFLASH_BUILD_URL . 'admin/admin.js',
     54            $script_asset['dependencies'],
     55            $script_asset['version'],
     56            array(
     57                'in_footer' => true,
     58            )
     59        );
     60
     61        wp_localize_script(
     62            'pageflash-admin',
     63            'pageflashAdmin',
     64            array(
     65                'isDevelopment' => PAGEFLASH_ENV === 'development' ? true : false,
     66                'ajax_url'      => admin_url( 'admin-ajax.php' ),
     67                'nonce'         => wp_create_nonce( 'pageflash_admin_nonce' ),
     68            )
     69        );
     70    }
     71    /**
     72     * Enqueue the PageFlash icon in the admin area.
     73     *
     74     * This method enqueues the icon for use in the admin area.
     75     *
     76     * @return void
     77     * @since PageFlash 1.0.0
     78     */
     79    public function pageflash_admin_icon() {
     80        wp_add_inline_style(
     81            'wp-admin',
     82            '#adminmenu #toplevel_page_pageflash div.wp-menu-image:before {
     83                content: "\e900";
     84                font-family: "pageflash";
     85                font-size: 22px;
     86                margin-top: 0;
     87            }
     88            '
     89        );
     90        // Icon style dependency
     91        wp_enqueue_style(
     92            'pageflash-icomoon',
     93            PAGEFLASH_ASSETS_URL . 'icomoon/style.css',
     94            array(),
     95            PAGEFLASH_VERSION
     96        );
    8597    }
    8698}
  • pageflash/tags/2.0.0/includes/Landmark/Landmark.php

    r3295254 r3446147  
    1 <?
    2 // Silence is golden.
     1<?php
     2
     3namespace TheAminul\PageFlash\Landmark;
     4
     5use TheAminul\PageFlash\Landmark\NoReload\NoReload;
     6use TheAminul\PageFlash\Landmark\General\General;
    37
    48class Landmark {
     9
    510    /**
    6      * Initialize the Landmark.
     11     * Instance registry.
    712     *
    8      * This method initializes the Landmark for your PageFlash plugin.
     13     * @var array<string, object>
     14     */
     15    protected array $instances = array();
     16
     17    /**
     18     * Landmark constructor.
     19     *
     20     * @since PageFlash 1.3.0
     21     */
     22    public function __construct() {
     23        add_action( 'pageflash_init', array( $this, 'boot' ) );
     24        add_action( 'pageflash_init', array( $this, 'register_landmarks' ) );
     25        // $this->register_landmarks();
     26    }
     27
     28    /**
     29     * Plugin bootstrap.
     30     *
     31     * @since 1.3.0
     32     */
     33    public function boot(): void {
     34        $this->register_features();
     35        $this->init_managers();
     36    }
     37
     38    /**
     39     * Feature class list.
     40     *
     41     * @since 1.3.0
     42     * @return array<class-string>
     43     */
     44    protected function features(): array {
     45        return array(
     46            NoReload::class,
     47            General::class,
     48        );
     49    }
     50
     51    /**
     52     * Register all features.
     53     *
     54     * @since 1.3.0
     55     */
     56    protected function register_features(): void {
     57        foreach ( $this->features() as $feature ) {
     58            $feature::init_register();
     59        }
     60
     61        do_action( 'pageflash_register_features' );
     62    }
     63
     64    /**
     65     * Initialize feature managers.
     66     *
     67     * @since 1.3.0
     68     */
     69    protected function init_managers(): void {
     70        foreach ( $this->features() as $feature ) {
     71            $this->get_instance( $feature );
     72        }
     73
     74        do_action( 'pageflash_init_managers', $this );
     75    }
     76
     77    /**
     78     * Register landmark services.
    979     *
    1080     * @since PageFlash 1.0.0
    11      * @access public
    1281     */
    13     public function __construct() {
    14         // Register the Landmark
     82    public function register_landmarks(): void {
     83
     84        $this->get_instance( LandmarkList::class );
     85        $this->get_instance( LandmarkAPI::class );
    1586    }
    1687
     88    /**
     89     * Get or create an instance.
     90     *
     91     * @since 1.3.0
     92     * @param class-string $class
     93     * @return object
     94     */
     95    public function get_instance( string $class ): object {
     96        if ( isset( $this->instances[ $class ] ) ) {
     97            return $this->instances[ $class ];
     98        }
     99
     100        return $this->instances[ $class ] = new $class();
     101    }
    17102}
  • pageflash/tags/2.0.0/includes/Landmark/LandmarkList.php

    r3295254 r3446147  
    1 <?
    2 // Silence is golden.
     1<?php
     2
     3namespace TheAminul\PageFlash\Landmark;
     4
     5if ( ! defined( 'ABSPATH' ) ) {
     6    exit; // Exit if accessed directly
     7}
     8
     9/**
     10 * PageFlash LandmarkList Class.
     11 *
     12 * Handles the registration and initialization of default landmarks for PageFlash.
     13 *
     14 * @package PageFlash
     15 * @since PageFlash 1.0.0
     16 */
     17class LandmarkList {
     18
     19    /**
     20     * Constructor for the LandmarkList class.
     21     *
     22     * Hooks into the admin_init action to register landmarks.
     23     *
     24     * @since PageFlash 1.0.0
     25     */
     26    public function __construct() {
     27        add_action( 'init', array( $this, 'pageflash_register_landmarks' ) );
     28    }
     29
     30    /**
     31     * Registers default landmarks into the WordPress options table.
     32     *
     33     * If the option already exists, it will update it only if needed.
     34     *
     35     * Menu Properties for Dynamic Header:
     36     * - 'menu'      => Menu slug (e.g., 'general', 'preloading')
     37     * - 'menuOrder' => Sort order (lower = earlier in menu, default 999)
     38     * - 'menuLabel' => Display label in header menu (optional, defaults to menu slug)
     39     * - 'menuIcon'  => Icon for menu button (JSX string, optional)
     40     *
     41     * @since PageFlash 1.0.0
     42     */
     43    public function pageflash_register_landmarks() {
     44        $defaults = array(
     45            'version' => '1.0.0',
     46            'author'  => 'PageFlash Team',
     47            'url'     => 'https://github.com/theaminuli/pageflash/',
     48            'message' => esc_html__( 'PageFlash Dashboard Data', 'pageflash' ),
     49            'data'    => array(
     50                'quicklink' => array(
     51                    'id'          => wp_unique_id( 'pf-' ),
     52                    'type'        => 'switch',
     53                    'label'       => esc_html__( 'Quicklink', 'pageflash' ),
     54                    'description' => esc_html__( "Quicklink, an active plugin, you'll experience a 50% increase in conversions and enjoy 4x faster page loading. Boost your website speed, increase user engagement", 'pageflash' ),
     55                    'active'      => true,
     56                    'slug'        => 'quicklink',
     57                    'menu'        => 'preloading',
     58                    'menuOrder'   => 2,
     59                    'menuLabel'   => esc_html__( 'Preloading', 'pageflash' ),
     60                    'package'     => 'free',
     61                ),
     62                'instantpage' => array(
     63                    'id'          => wp_unique_id( 'pf-' ),
     64                    'type'        => 'switch',
     65                    'label'       => esc_html__( 'InstantPage', 'pageflash' ),
     66                    'description' => esc_html__( 'InstantPage uses just-in-time preloading — it preloads a page right before a user clicks on it.', 'pageflash' ),
     67                    'active'      => false,
     68                    'slug'        => 'instantpage',
     69                    'menu'        => 'preloading',
     70                    'menuOrder'   => 2,
     71                    'menuLabel'   => esc_html__( 'Preloading', 'pageflash' ),
     72                    'package'     => 'free',
     73                ),
     74                'dashicons' => array(
     75                    'id'          => wp_unique_id( 'pf-' ),
     76                    'type'        => 'switch',
     77                    'label'       => esc_html__( 'Disable Dashicons', 'pageflash' ),
     78                    'description' => esc_html__( 'Disable Dashicons on the frontend for non-logged-in users to improve performance.', 'pageflash' ),
     79                    'active'      => true,
     80                    'slug'        => 'dashicons',
     81                    'menu'        => 'general',
     82                    'menuOrder'   => 1,
     83                    'menuLabel'   => esc_html__( 'General', 'pageflash' ),
     84                    'package'     => 'free',
     85                ),
     86                'embeds' => array(
     87                    'id'          => wp_unique_id( 'pf-' ),
     88                    'type'        => 'switch',
     89                    'label'       => esc_html__( 'Disable Embeds', 'pageflash' ),
     90                    'description' => esc_html__( 'Disable the WordPress oEmbed feature to reduce unnecessary HTTP requests and improve page load times.', 'pageflash' ),
     91                    'active'      => false,
     92                    'slug'        => 'embeds',
     93                    'menu'        => 'general',
     94                    'menuOrder'   => 1,
     95                    'menuLabel'   => esc_html__( 'General', 'pageflash' ),
     96                    'package'     => 'free',
     97                ),
     98                'emojis' => array(
     99                    'id'          => wp_unique_id( 'pf-' ),
     100                    'type'        => 'switch',
     101                    'label'       => esc_html__( 'Disable Emojis', 'pageflash' ),
     102                    'description' => esc_html__( 'Disable the built-in WordPress emoji scripts and styles to reduce page size and improve load times.', 'pageflash' ),
     103                    'active'      => false,
     104                    'slug'        => 'emojis',
     105                    'menu'        => 'general',
     106                    'menuOrder'   => 1,
     107                    'menuLabel'   => esc_html__( 'General', 'pageflash' ),
     108                    'package'     => 'free',
     109                ),
     110
     111                'heartbeat' => array(
     112                    'id'          => wp_unique_id( 'pf-' ),
     113                    'type'        => 'switch',
     114                    'label'       => esc_html__( 'Disable Heartbeat', 'pageflash' ),
     115                    'description' => esc_html__( 'Disable WordPress Heartbeat everywhere or in certain areas (used for auto saving and revision tracking).', 'pageflash' ),
     116                    'active'      => false,
     117                    'slug'        => 'heartbeat',
     118                    'menu'        => 'general',
     119                    'menuOrder'   => 1,
     120                    'menuLabel'   => esc_html__( 'General', 'pageflash' ),
     121                    'package'     => 'free',
     122                    'input'       => array(
     123                        'behavior' => array(
     124                            'child_id'    => wp_unique_id( 'pf-' ),
     125                            'type'        => 'select',
     126                            'label'       => esc_html__( 'Behavior', 'pageflash' ),
     127                            'description' => esc_html__( 'Choose where to disable the Heartbeat API.', 'pageflash' ),
     128                            'slug'        => 'behavior',
     129                            'value'       => 'disable_everywhere',
     130                            'default'     => 'disable_everywhere',
     131                            'options'     => array(
     132                                'default'            => esc_html__( 'Default Behavior', 'pageflash' ),
     133                                'disable_everywhere' => esc_html__( 'Disable Everywhere', 'pageflash' ),
     134                                'allow_posts'        => esc_html__( 'Only Allow When Editing Posts/Pages', 'pageflash' ),
     135                                'disable_dashboard'  => esc_html__( 'Disable on admin Dashboard Only', 'pageflash' ),
     136                            ),
     137                        ),
     138                        'frequency' => array(
     139                            'child_id'    => wp_unique_id( 'pf-' ),
     140                            'type'        => 'select',
     141                            'label'       => esc_html__( 'Frequency', 'pageflash' ),
     142                            'description' => esc_html__( 'Controls how often the WordPress Heartbeat API is allowed to run.', 'pageflash' ),
     143                            'slug'        => 'frequency',
     144                            'value'       => 60,
     145                            'default'     => 60,
     146                            'options'     => array(
     147                                15  => esc_html__( '15 Seconds', 'pageflash' ),
     148                                30  => esc_html__( '30 Seconds', 'pageflash' ),
     149                                45  => esc_html__( '45 Seconds', 'pageflash' ),
     150                                60  => esc_html__( '60 Seconds', 'pageflash' ),
     151                                120 => esc_html__( '120 Seconds', 'pageflash' ),
     152                                300 => esc_html__( '300 Seconds', 'pageflash' ),
     153                            ),
     154                        ),
     155                    ),
     156                ),
     157                'rest_api' => array(
     158                    'id'          => wp_unique_id( 'pf-' ),
     159                    'type'        => 'select',
     160                    'label'       => esc_html__( 'Disable REST API', 'pageflash' ),
     161                    'description' => esc_html__( 'Disable the WordPress REST API for non-authenticated users to enhance security and reduce unnecessary requests.', 'pageflash' ),
     162                    'value'       => '',
     163                    'default'     => '',
     164                    'options'     => array(
     165                        ''                         => esc_html__( 'Default Behavior (Enabled)', 'pageflash' ),
     166                        'disabled'                 => esc_html__( 'Disable for Non-Authenticated Users', 'pageflash' ),
     167                        'disabled_when_logged_out' => esc_html__( 'Disable When Logged Out.', 'pageflash' ),
     168                    ),
     169                    'slug'        => 'rest_api',
     170                    'menu'        => 'general',
     171                    'menuOrder'   => 1,
     172                    'menuLabel'   => esc_html__( 'General', 'pageflash' ),
     173                    'package'     => 'free',
     174                ),
     175                'rest_api_link' => array(
     176                    'id'          => wp_unique_id( 'pf-' ),
     177                    'type'        => 'switch',
     178                    'label'       => esc_html__( 'Remove REST API Link', 'pageflash' ),
     179                    'description' => esc_html__( 'Removes REST API link tag from the front end and the REST API header link from page requests.', 'pageflash' ),
     180                    'active'      => false,
     181                    'slug'        => 'rest_api_link',
     182                    'menu'        => 'general',
     183                    'menuOrder'   => 1,
     184                    'menuLabel'   => esc_html__( 'General', 'pageflash' ),
     185                    'package'     => 'free',
     186                ),
     187                'wp_version' => array(
     188                    'id'          => wp_unique_id( 'pf-' ),
     189                    'type'        => 'switch',
     190                    'label'       => esc_html__( 'Hide WordPress Version', 'pageflash' ),
     191                    'description' => esc_html__( 'Hide the WordPress version number from the site header, Meta tag and RSS feeds to improve security.', 'pageflash' ),
     192                    'active'      => true,
     193                    'slug'        => 'wp_version',
     194                    'menu'        => 'general',
     195                    'menuOrder'   => 1,
     196                    'menuLabel'   => esc_html__( 'General', 'pageflash' ),
     197                    'package'     => 'free',
     198                ),
     199                'xmlrpc' => array(
     200                    'id'          => wp_unique_id( 'pf-' ),
     201                    'type'        => 'switch',
     202                    'label'       => esc_html__( 'Disable XML-RPC', 'pageflash' ),
     203                    'description' => esc_html__( 'Disable the XML-RPC feature to enhance security and reduce unnecessary requests.', 'pageflash' ),
     204                    'active'      => true,
     205                    'slug'        => 'xmlrpc',
     206                    'menu'        => 'general',
     207                    'menuOrder'   => 1,
     208                    'menuLabel'   => esc_html__( 'General', 'pageflash' ),
     209                    'package'     => 'free',
     210                ),
     211                'jquery_migrate' => array(
     212                    'id'          => wp_unique_id( 'pf-' ),
     213                    'type'        => 'switch',
     214                    'label'       => esc_html__( 'Remove jQuery Migrate', 'pageflash' ),
     215                    'description' => esc_html__( 'Remove jQuery Migrate script to improve performance on the frontend (jquery-migrate.min.js).', 'pageflash' ),
     216                    'active'      => false,
     217                    'slug'        => 'jquery_migrate',
     218                    'menu'        => 'general',
     219                    'menuOrder'   => 1,
     220                    'menuLabel'   => esc_html__( 'General', 'pageflash' ),
     221                    'package'     => 'free',
     222                ),
     223            ),
     224        );
     225
     226        // Allow developers to filter and modify default landmarks.
     227        $landmarks = apply_filters( 'pageflash_landmarks', $defaults );
     228        $existing  = get_option( 'pageflash_landmarks' );
     229
     230        // If no existing data, add it.
     231        if ( false === $existing ) {
     232            add_option( 'pageflash_landmarks', $landmarks );
     233            return;
     234        }
     235
     236        // Recursively sync existing data with defaults.
     237        $sync_manager = new LandmarkSyncManager();
     238        $sync_manager->pageflash_sync_properties( $existing, $landmarks );
     239    }
     240}
  • pageflash/tags/2.0.0/includes/Landmark/NoReload/NoReload.php

    r3295254 r3446147  
    11<?php
    22
    3 namespace PageFlash\Landmark\NoReload;
     3namespace TheAminul\PageFlash\Landmark\NoReload;
     4
     5use TheAminul\PageFlash\Landmark\BootManager;
     6use TheAminul\PageFlash\Landmark\Boot;
    47
    58if ( ! defined( 'ABSPATH' ) ) {
     
    811
    912/**
    10  * NoReload Class.
     13 * NoReload Boot Manager
    1114 *
    12  * This class provides functionality for something in your PageFlash plugin.
     15 * Manages preloading features (Quicklink, InstantPage, etc.)
    1316 *
    1417 * @package pageflash
    15  * @since PageFlash 1.0.0
     18 * @since PageFlash 1.3.0
    1619 */
    17 class NoReload {
    18 
    19     public function __construct() {
    20         // Constructor code
    21         add_filter( 'wp_pageflash_quicklink_ignore_urls', array( $this, 'pageflash_quicklink_ignore_urls' ) );
    22         add_filter( 'wp_pageflash_quicklink', array( $this, 'pageflash_quicklink' ) );
    23     }
     20class NoReload extends BootManager {
    2421
    2522    /**
    26      * Filters PageFlash NoReload ignore URLs.
     23     * Namespace for this manager
    2724     *
    28      * @since PageFlash 1.0.0
    29      * @access public
    30      * @param array  $ignores {
    31      *      Configuration options for PageFlash NoReload ignore URLs.
    32      *
    33      *     @param string $ignore_pattern Regular expression pattern to determine whether a URL is ignored.
    34      * }
     25     * @var string
    3526     */
    36     public function pageflash_quicklink_ignore_urls( $ignores ) {
    37         // $ignores[] = preg_quote( 'custom-ignore-pattern', '/' );
    38         return $ignores;
    39     }
     27    protected string $namespace = 'noreload';
    4028
    4129    /**
    42      * Filters PageFlash NoReload settings.
     30     * Register all NoReload features.
    4331     *
    44      * @since PageFlash 1.0.0
    45      * @access public
    46      * @param array {
    47      *     Configuration options for PageFlash NoReload.
     32     * This method is called from Landmark.php during initialization.
     33     * All features in the noreload namespace are registered here.
    4834     *
    49      *     @param string  $el CSS selector for the DOM element to observe for in-viewport links to prefetch.
    50      *     @param int     $limit The total requests that can be prefetched while observing the $el container.
    51      *     @param int     $throttle The concurrency limit for simultaneous requests while observing the $el container.
    52      *     @param int     $timeout Timeout after which prefetching will occur.
    53      *     @param string  $timeoutFn Custom timeout function. Must refer to a named global function in JS.
    54      *     @param bool    $priority Attempt higher priority fetch (low or high). Default false.
    55      *     @param string  $origins Allowed origins to prefetch (empty allows all). Defaults to host for the current home URL.
    56      *     @param string  $ignores Regular expression patterns to determine whether a URL is ignored. Runs after origin checks.
    57      *  }
     35     * @since 1.3.0
     36     * @return void
    5837     */
    59     public function pageflash_quicklink( $settings ) {
    60         // $settings['timeout'] = 3000; // Change the timeout to 3000ms
    61         // $settings['priority'] = true; // Enable fetch() API where supported
    62         return $settings;
     38    public static function init_register() {
     39        Boot::register(
     40            'quicklink',
     41            array(
     42                'class'     => Quicklink::class,
     43                'namespace' => 'noreload',
     44                'package'   => 'free',
     45                'priority'  => 10,
     46            )
     47        );
     48
     49        Boot::register(
     50            'instantpage',
     51            array(
     52                'class'     => InstantPage::class,
     53                'namespace' => 'noreload',
     54                'package'   => 'free',
     55                'priority'  => 10,
     56            )
     57        );
    6358    }
    6459}
  • pageflash/tags/2.0.0/includes/Landmark/NoReload/Quicklink.php

    r3295254 r3446147  
    11<?php
    22
    3 namespace PageFlash\Landmark\NoReload;
     3namespace TheAminul\PageFlash\Landmark\NoReload;
    44
    55if ( ! defined( 'ABSPATH' ) ) {
     
    1919    public function __construct() {
    2020        // Constructor code
     21        add_action( 'wp_default_scripts', array( $this, 'pageflash_wp_default_scripts' ) );
     22        add_action( 'wp_enqueue_scripts', array( $this, 'pageflash_frontend_assets' ) );
    2123        add_filter( 'script_loader_tag', array( $this, 'pageflash_async_script_loader' ), 10, 2 );
    2224        add_action( 'wp_enqueue_scripts', array( $this, 'pageflash_settings_config' ) );
     25    }
     26
     27    /**
     28     * Enqueue scripts for the PageFlash plugin frontend.
     29     *
     30     * This method enqueues scripts necessary for the PageFlash plugin's functionality.
     31     * Add quicklink to the default scripts to make it available earlier in the runtime.
     32     *
     33     * @param WP_Scripts $scripts The WP_Scripts instance.
     34     * @return void
     35     * @since PageFlash 1.0.0
     36     */
     37    public function pageflash_wp_default_scripts( $scripts ) {
     38        // Define the version for Quicklink, falling back to a default version if not set
     39        $quicklink_version = defined( 'PAGEFLASH_VERSION' ) && ! empty( PAGEFLASH_VERSION ) ? PAGEFLASH_VERSION : '2.3.0';
     40
     41        // Include the asset file for script dependencies and version
     42        $asset_file = PAGEFLASH_PATH . 'build/quicklink/quicklink.asset.php';
     43        if ( ! file_exists( $asset_file ) ) {
     44
     45            return $scripts;
     46        }
     47
     48        $script_asset = include $asset_file;
     49        $scripts->add(
     50            'pageflash-quicklink',
     51            PAGEFLASH_ASSETS_URL . 'libs/quicklink/dist/quicklink.umd.js',
     52            array(),
     53            $quicklink_version,
     54            true
     55        );
     56
     57        if ( is_array( $script_asset ) && isset( $script_asset['dependencies'], $script_asset['version'] ) ) {
     58            $scripts->add(
     59                'pageflash-frontend',
     60                PAGEFLASH_URL . 'build/quicklink/quicklink.js',
     61                $script_asset['dependencies'],
     62                $script_asset['version'],
     63                true
     64            );
     65        }
     66        return $scripts;
     67    }
     68
     69    /**
     70     * Enqueue scripts and styles for the PageFlash plugin frontend.
     71     *
     72     * This method enqueues scripts and styles necessary for the PageFlash plugin's functionality.
     73     *
     74     * @return void
     75     * @since PageFlash 1.0.0
     76     */
     77    public function pageflash_frontend_assets() {
     78        wp_enqueue_script( 'pageflash-frontend' );
     79        wp_enqueue_script( 'pageflash-quicklink' );
    2380    }
    2481
     
    45102        $current_request_uri = esc_url_raw( $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
    46103        $ignore_pattern      = $current_request_uri . '(#.*)?$/';
    47 
    48         $pageflash_settings = array(
     104        $pageflash_settings  = array(
    49105            'el'        => '', // CSS selector for in-viewport links to prefetch
    50106            'urls'      => array( site_url( '/' ) ), // Static array of URLs to prefetch.
     
    90146     */
    91147    public function pageflash_async_script_loader( $tag, $handle ) {
    92 
    93148        $async_handles = array( 'pageflash-quicklink', 'pageflash-frontend' );
    94149        if ( in_array( $handle, $async_handles ) && false === strpos( $tag, 'async' ) ) {
  • pageflash/tags/2.0.0/pageflash.php

    r3295254 r3446147  
    1111 * Author:      theaminul
    1212 * Author URI:  https://theaminul.com
    13  * Version: 1.2.0
     13 * Version: 2.0.0
    1414 * Stable tag:  1.2.0
    1515 * Requires at least: 6.0
     
    1919 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
    2020 * Text Domain: pageflash
    21  * Description: PageFlash - Fast and Efficient Headless Browser WordPress Plugin. By using PageFlash, an active plugin, you'll experience a 50% increase in conversions and enjoy 4x faster page loading. ⚡️ Boost your website's speed, increase user engagement 💬, and supercharge your online presence 🚀. - NewEgg
    22  * Tags:        headless-browser, pageflash, prefetches, quicklink, quickload, performance, speed, fast, prefetch, seo preconnect, optimization
     21 * Description: Preload pages intelligently to boost site speed and enhance user experience by loading pages before users click, ensuring instant page transitions.
     22 * Tags:       preload, pageflash, prefetch, quicklink, performance, speed, fast, instant-navigation, page-speed, optimization.
    2323 */
    2424
     
    3636define( 'PAGEFLASH_ASSETS_PATH', PAGEFLASH_PATH . 'assets/' );
    3737define( 'PAGEFLASH_ASSETS_URL', PAGEFLASH_URL . 'assets/' );
     38define( 'PAGEFLASH_BUILD_PATH', PAGEFLASH_PATH . 'build/' );
     39define( 'PAGEFLASH_BUILD_URL', PAGEFLASH_URL . 'build/' );
    3840define( 'PAGEFLASH_ENV', WP_DEBUG ? 'development' : 'production' );
    3941
    40 add_action( 'plugins_loaded', 'pageflash_load_plugin_textdomain' );
     42add_action( 'plugins_loaded', 'pageflash_init' );
    4143
    4244if ( ! version_compare( PHP_VERSION, '7.0', '>=' ) ) {
     
    4951
    5052/**
    51  * Load PageFlash textdomain.
     53 * Initialize PageFlash plugin.
    5254 *
    53  * Load gettext translate for PageFlash text domain.
     55 * Loads the plugin text domain and triggers the `pageflash_init` lifecycle hook.
    5456 *
    55  * @since PageFlash 1.0.0
     57 * @function pageflash_init
    5658 *
    57  * @return void
     59 * @since 1.0.0
     60 *
     61 * @fires pageflash_init
    5862 */
    59 function pageflash_load_plugin_textdomain() {
    60     load_plugin_textdomain( 'pageflash' );
     63function pageflash_init() {
     64    load_plugin_textdomain(
     65        'pageflash',
     66        false,
     67        dirname( plugin_basename( __FILE__ ) ) . '/languages'
     68    );
     69
     70    do_action( 'pageflash_init' );
    6171}
    6272
  • pageflash/tags/2.0.0/plugin.php

    r3295254 r3446147  
    11<?php
    22
    3 namespace PageFlash;
     3namespace TheAminul\PageFlash;
    44
    5 use PageFlash\AssetsManager\AssetsManager;
    6 use PageFlash\Admin\Admin;
    7 use PageFlash\Landmark\NoReload;
     5use TheAminul\PageFlash\AssetsManager\AssetsManager;
     6use TheAminul\PageFlash\Admin\Admin;
     7use TheAminul\PageFlash\Landmark;
     8use TheAminul\PageFlash\Compatibility\Compatibility;
    89
    910if ( ! defined( 'ABSPATH' ) ) {
     
    9495            // Initialize your admin-related Landmark here
    9596            new Admin();
     97
    9698        }
    9799    }
     
    108110     */
    109111    private function init_landmark() {
    110         new NoReload\Quicklink();
    111         new NoReload\NoReload();
     112        new Landmark\Landmark();
     113    }
     114
     115    /**
     116     * Initialize compatibility modules.
     117     *
     118     * This method initializes compatibility handlers for third-party plugins.
     119     *
     120     * @since PageFlash 1.2.0
     121     * @access private
     122     */
     123    private function init_compatibility() {
     124        new Compatibility();
    112125    }
    113126
     
    126139        $this->init_admin();
    127140        $this->init_landmark();
     141        $this->init_compatibility();
    128142    }
    129143
  • pageflash/tags/2.0.0/readme.txt

    r3295254 r3446147  
    1 === PageFlash - Fast and Efficient Headless Browser WordPress Plugin ===
     1=== PageFlash - Fast Page Preloading, Performance Optimization & Secure Your WordPress Site ===
    22Contributors: theaminuldev
    3 Tags: headless browser, quicklink, performance, speculation rules
    4 Requires at least: 6.0
    5 Tested up to: 6.8.1
    6 Stable tag: 1.2.0
     3Tags: preload, page-speed, optimization, performance, pageflash, speed, fast, instant-navigation, prefetch, quicklink
     4Requires at least: 6.1
     5Tested up to: 6.9
     6Stable tag: 2.0.0
    77License: GPL-3.0
    88License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
    9 Copyright: © 2023 theaminul.com
     9Copyright: © 2026 theaminul.com
    1010
    11 By using PageFlash, an active plugin, you'll experience a 50% increase in conversions and enjoy 4x faster page loading. ⚡️ Boost your website's speed, increase user engagement 💬, and supercharge your online presence 🚀. - NewEgg
     11Preload pages intelligently to boost site speed and enhance user experience by loading pages before users click, ensuring instant page transitions.
    1212
    1313== Description ==
    14 PageFlash is a powerful headless browser WordPress plugin designed to provide you with a fast and efficient web browsing experience within your WordPress site. Say goodbye to page reloads and enjoy seamless navigation through web content with this plugin. Harness the speed and agility of PageFlash for your WordPress website.
     14PageFlash is a powerful WordPress plugin that preloads pages intelligently to boost site speed and enhance user experience. By loading pages before users click, PageFlash ensures instant page transitions, creating a seamless and lightning-fast browsing experience for your visitors.
    1515
    1616### Key Features:
    17 - **Lightning-Fast Browsing:** PageFlash lives up to its name, offering rapid page loading and navigation without the need for tedious page refreshes.
    18 - **Smooth Script Execution:** Execute scripts and interact with web pages in a fluid and continuous manner. With PageFlash, you'll experience uninterrupted script execution, ensuring your web applications run seamlessly.
    19 - **Prefetches:** PageFlash incorporates advanced prefetching technology to speed up your web browsing. It anticipates and loads pages in the background, reducing loading times and providing a smoother browsing experience.
    20 - **No More Reloads:** Say goodbye to unnecessary page reloads with PageFlash, and enjoy uninterrupted web exploration. PageFlash ensures a frustration-free web experience by eliminating the need for page reloads, providing you with a streamlined and seamless browsing experience.
     17
     18**Preloading:**
     19- **Quicklink:** Experience a 50% increase in conversions and enjoy 4x faster page loading. Boost your website speed and increase user engagement.
     20- **InstantPage:** Uses just-in-time preloading — preloads a page right before a user clicks on it.
     21
     22**Performance Optimization:**
     23- **Disable Dashicons:** Remove Dashicons on the frontend for non-logged-in users to improve performance.
     24- **Disable Embeds:** Disable the WordPress oEmbed feature to reduce unnecessary HTTP requests and improve page load times.
     25- **Disable Emojis:** Remove built-in WordPress emoji scripts and styles to reduce page size and improve load times.
     26- **Disable Heartbeat:** Control WordPress Heartbeat API everywhere or in certain areas (used for auto-saving and revision tracking) with customizable behavior and frequency settings.
     27- **Remove jQuery Migrate:** Remove jQuery Migrate script to improve performance on the frontend.
     28
     29**Security Enhancements:**
     30- **Disable REST API:** Disable the WordPress REST API for non-authenticated users to enhance security and reduce unnecessary requests.
     31- **Remove REST API Link:** Remove REST API link tag from the front end and the REST API header link from page requests.
     32- **Hide WordPress Version:** Hide the WordPress version number from the site header, meta tags, and RSS feeds to improve security.
     33- **Disable XML-RPC:** Disable the XML-RPC feature to enhance security and reduce unnecessary requests.
    2134
    2235For more information and documentation, visit our [plugin documentation](https://theaminul.com/pageflash/docs).
     
    5467
    5568== Frequently Asked Questions ==
     69= How do I configure PageFlash? =
    5670
    57 = How do I enable PageFlash for a specific post or page? =
    58 
    59 After activation, go to the post or page where you want to enable PageFlash's headless browsing features. In the editor, look for the PageFlash settings panel to configure your preferences.
     71After activation, navigate to the PageFlash settings page in your WordPress admin dashboard to enable and configure the features you want to use.
    6072
    6173= Where should I check the plugin's features? =
    62 
    6374- A. In Chrome's incognito mode.
    6475- B. After logging out of the admin account.
     
    6879
    6980= Is PageFlash compatible with the latest version of WordPress? =
    70 
    7181Yes, PageFlash is regularly tested and ensured to be compatible with the latest WordPress version.
    7282
    7383
    74 == Screenshots ==
    75 1. [Screenshot 1](https://github.com/theaminuldev/pageflash/src/images/screenshot.png): Describe the screenshot here.
    76 
    7784== Changelog ==
    7885
     86= 2.0.0 - 2026-01-24 =
     87* Added: InstantPage integration to enhance the Preloading module performance.
     88* Added: Introduced admin dashboard for better user experience.
     89* Added: Disabled frontend Dashicons for non-logged-in users.
     90* Added: Disabled WordPress oEmbed for improved page load performance.
     91* Added: Disabled WordPress emojis to improve load time.
     92* Added: Removed WordPress version info for better security.
     93* Added: Disabled jquery-migrate.min.js to improve performance.
     94* Added: Disabled XML-RPC to reduce unnecessary requests.
     95* Added: Disabled WordPress REST API for non-authenticated users.
     96* Added: Removed REST API link tag and header from the frontend.
     97* Added: Disabled WordPress Heartbeat globally or in selected areas.
     98
    7999= 1.2.0 - 2025-05-14 =
    80 * Chore: Add initial configuration files
     100* chore: Add initial configuration files
    81101* Improved: Update asset management
    82102* Improved: Update security policy and PHPCS configuration
     
    84104* Improved: WP coding standards and code quality ensure
    85105* Updated: Update GPL license to version 3.0
     106
    86107= 1.1.0 - 2024-12-20 =
    87108* Fixed: Security vulnerability reporting guidelines.
    88109* Added: Supply chain attack prevention.
     110
    89111= 1.0.1 - 2024-12-19 =
    90112* Fixed: Issue with `validateElement` function in `pageflash-frontend`.
    91113* Improved: Added validation for `timeoutFn` in `buildListenerOptions` function.
    92114* Added: Confusion Clear FAQ plugin for better understanding.
     115
    93116= 1.0.0 - 2024-12-18 =
    94117* Initial release.
  • pageflash/trunk/autoload.php

    r3295254 r3446147  
    11<?php
     2
    23/**
    3  * Dynamically loads classes within the PageFlash namespace. Maps namespaces to their
    4  * corresponding directories and loads the appropriate file based on class name.
     4 * Returns the namespace → directory map.
    55 *
    66 * @since 1.0.0
     7 * @return array
     8 */
     9function pageflash_get_namespace_map() {
     10    return array(
     11        'TheAminul\\PageFlash\\' => trailingslashit( PAGEFLASH_DIR ) . 'includes/',
     12    );
     13}
     14
     15/**
     16 * Resolves a fully-qualified class name into a file path if it exists.
    717 *
    8  * @package PageFlash
    9  * @param string $class_name The fully qualified class name.
     18 * @since 1.0.0
     19 * @param string $class_name Fully qualified class name.
     20 * @return string|false File path or false if not found.
     21 */
     22function pageflash_locate_class_file( $class_name ) {
     23
     24    if ( ! defined( 'PAGEFLASH_DIR' ) ) {
     25        return false;
     26    }
     27
     28    $namespace_map = pageflash_get_namespace_map();
     29
     30    foreach ( $namespace_map as $namespace => $base_dir ) {
     31
     32        if ( strpos( $class_name, $namespace ) !== 0 ) {
     33            continue;
     34        }
     35
     36        $relative_class = substr( $class_name, strlen( $namespace ) );
     37        $file           = $base_dir . str_replace( '\\', '/', $relative_class ) . '.php';
     38
     39        return file_exists( $file ) ? $file : false;
     40    }
     41
     42    return false;
     43}
     44
     45/**
     46 * Autoloader.
     47 *
     48 * @since 1.0.0
     49 * @param string $class_name The class name being instantiated.
    1050 * @return void
    1151 */
    12 function exoole_autoloader( $class_name ) {
    13     $project_prefix = 'PageFlash\\';
    14     $namespace_map  = array(
    15         'PageFlash' => PAGEFLASH_DIR . '/includes/',
    16     );
     52function pageflash_autoloader( $class_name ) {
    1753
    18     if ( strpos( $class_name, $project_prefix ) === 0 ) {
    19         foreach ( $namespace_map as $namespace => $base_dir ) {
    20             if ( strpos( $class_name, $namespace ) === 0 ) {
    21                 // Derive the relative class path by stripping the namespace.
    22                 $relative_class = substr( $class_name, strlen( $namespace ) );
    23                 $file           = $base_dir . str_replace( '\\', '/', $relative_class ) . '.php';
     54    // Only handle PageFlash namespace
     55    if ( strpos( $class_name, 'TheAminul\\PageFlash\\' ) !== 0 ) {
     56        return;
     57    }
    2458
    25                 if ( file_exists( $file ) ) {
    26                     require_once $file;
    27                     return;
    28                 } elseif ( PAGEFLASH_ENV === 'development' && WP_DEBUG ) {
    29                         error_log( print_r( "Class file for {$class_name} not found: {$file}", true ) ); // phpcs:ignore
    30                 }
    31             }
    32         }
     59    $file = pageflash_locate_class_file( $class_name );
     60
     61    if ( $file ) {
     62        require_once $file;
     63        return;
     64    }
     65
     66    // Log ONLY missing PageFlash classes (dev only)
     67    if (
     68        defined( 'PAGEFLASH_ENV' ) &&
     69        PAGEFLASH_ENV === 'development' &&
     70        defined( 'WP_DEBUG' ) &&
     71        WP_DEBUG
     72    ) {
     73        error_log( "[PageFlash Autoload] Class not found: {$class_name}" ); // phpcs:ignore
    3374    }
    3475}
    3576
    36 spl_autoload_register( 'exoole_autoloader' );
     77
     78/**
     79 * Registers the autoloader.
     80 *
     81 * @since 1.0.0
     82 * @return void
     83 */
     84function pageflash_register_autoloader() {
     85
     86    if ( ! defined( 'PAGEFLASH_DIR' ) ) {
     87        return;
     88    }
     89
     90    spl_autoload_register( 'pageflash_autoloader' );
     91}
     92
     93// Boot autoloader
     94pageflash_register_autoloader();
  • pageflash/trunk/build/admin/admin-rtl.css

    r3295254 r3446147  
    1 *{box-sizing:border-box;margin:0;padding:0}
     1@import url(https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&display=swap);
     2*{box-sizing:border-box;margin:0;padding:0}#pageflash-admin{font-family:Lexend,sans-serif;font-optical-sizing:auto;font-style:normal}.pageflash-toast-container{left:20px!important;top:50px!important}.pageflash-select{border-radius:8px}.pageflash-select .components-card-body{padding:20px}.pageflash-switch{border-radius:8px}.pageflash-switch .components-card-body{padding:20px}.pageflash-switch .pageflash-select{border-radius:unset;box-shadow:none}.pageflash-switch .pageflash-select .components-card-body{padding:10px}.pageflash-header{background-color:#fff!important;border-radius:5px!important;padding:0 5px}.pageflash-header__z-stack{width:100%}.pageflash-header__z-stack>div{width:100%!important}.pageflash-header__logo{margin-left:10px}.pageflash-header__menu{border-left:1px solid #d8d8d8;border-top-left-radius:0!important;padding:0!important}@media(max-width:768px){.pageflash-header__menu{border-left:none!important;border-top-left-radius:5px!important}}.pageflash-header__menu-list{background-color:#fff!important;padding:5px}.pageflash-header__menu-button{box-shadow:none!important;color:#1c1e24!important}.pageflash-header__menu-button.is-primary{color:#fff!important}.pageflash-header__card-body{background-color:#fff!important;border-radius:5px 0 0 5px!important;padding:0!important;width:100%!important}.pageflash-header__h-stack{border-bottom:1px solid #d8d8d8;padding:15px 30px}.pageflash-addons{padding:50px}@media(max-width:1024px){.pageflash-addons{padding:30px}}@media(max-width:768px){.pageflash-addons{padding:20px}}.pageflash-addons .components-card{padding:20px 0}.pageflash-addons__explore-link{display:flex;justify-content:flex-end;padding-top:20px}.pageflash-addons__explore-link a{align-items:center;background:#3858e9;border-radius:2px;color:#fff;display:flex;font-size:14px;padding:7px;text-decoration:none}.pageflash-addons__image{border-radius:4px;height:70px;-o-object-fit:cover;object-fit:cover;width:70px}.pageflash-addons__badge{background-color:#f0f0f0;border-radius:4px;color:#333;font-size:14px;margin-right:10px;padding:4px 8px;position:absolute;left:23px;top:23px}.pageflash-settings{padding:50px}@media(max-width:1024px){.pageflash-settings{padding:30px}}@media(max-width:768px){.pageflash-settings{padding:20px}}.pageflash-body{padding:50px}@media(max-width:1024px){.pageflash-body{padding:30px}}@media(max-width:768px){.pageflash-body{padding:20px}}.pageflash-support{margin:0 auto;max-width:1200px;padding:50px 20px}.pageflash-support .components-card{margin-bottom:20px}.pageflash-support .components-card-header h2{font-size:18px;font-weight:600;margin:0}.pageflash-support .components-card-body p{color:#646970;line-height:1.6;margin:0 0 16px}.pageflash-support .pageflash-support-faq-column{align-items:flex-start;display:flex;flex-direction:column;gap:8px}.pageflash-support .pageflash-support-faq-column .components-button.is-link{height:auto;padding:4px 0;text-align:right}.skeleton-wrapper{background:#f8f9fa;box-sizing:border-box;display:flex;flex-direction:column;font-family:sans-serif;height:100vh;overflow:hidden;width:100%}.skeleton-header{align-items:center;box-sizing:border-box;display:flex;gap:16px;height:50px;justify-content:space-between;margin:16px;width:calc(100% - 32px)}@media(max-width:1024px){.skeleton-header{gap:12px;height:40px;margin:12px;width:calc(100% - 24px)}}@media(max-width:768px){.skeleton-header{align-items:stretch;flex-direction:column;gap:8px;height:auto;margin:12px}}.skeleton-header-left{display:flex;gap:8px;height:50px;width:244px}.skeleton-header-left .logo{width:30%}.skeleton-header-left .logo,.skeleton-header-left .logo-name{animation:shimmer 1.5s infinite;background:linear-gradient(-90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:4px;height:50px}.skeleton-header-left .logo-name{width:70%}@media(max-width:1024px){.skeleton-header-left{height:40px;width:120px}}@media(max-width:768px){.skeleton-header-left{height:36px;width:100%}}.skeleton-header-center{animation:shimmer 1.5s infinite;background:linear-gradient(-90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:4px;flex:1;height:50px}@media(max-width:1024px){.skeleton-header-center{height:40px}}@media(max-width:768px){.skeleton-header-center{height:36px;width:100%}}.skeleton-header-right{animation:shimmer 1.5s infinite;background:linear-gradient(-90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:4px;height:50px;width:100px}@media(max-width:1024px){.skeleton-header-right{height:40px;width:80px}}@media(max-width:768px){.skeleton-header-right{height:36px;width:100%}}.skeleton-main{display:flex;flex:1;gap:16px;overflow:auto;padding:16px}@media(max-width:1024px){.skeleton-main{gap:12px;padding:12px}}@media(max-width:768px){.skeleton-main{flex-direction:column;gap:12px;padding:12px}}.skeleton-sidebar{display:flex;flex:0 0 244px;flex-direction:column;gap:16px}@media(max-width:1024px){.skeleton-sidebar{flex:0 0 244px;gap:12px}}@media(max-width:768px){.skeleton-sidebar{display:none}}.skeleton-sidebar-row{animation:shimmer 1.5s infinite;background:linear-gradient(-90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:8px;height:40px}@media(max-width:1024px){.skeleton-sidebar-row{height:36px}}.skeleton-content{display:flex;flex:1;flex-direction:column;gap:16px;padding:20px 30px}@media(max-width:1024px){.skeleton-content{gap:12px}}@media(max-width:768px){.skeleton-content{gap:10px}}.skeleton-row{align-items:center;background:#fff;border-radius:8px;box-shadow:0 0 0 1px #e0e0e0;display:flex;height:90px;justify-content:space-between;min-height:80px;padding:12px 16px}@media(max-width:1024px){.skeleton-row{height:80px;min-height:70px;padding:10px 12px}}@media(max-width:768px){.skeleton-row{align-items:flex-start;flex-direction:column;gap:12px;height:auto;min-height:100px;padding:12px}}.skeleton-row-left{display:flex;flex:1;flex-direction:column;gap:10px;min-width:0}@media(max-width:768px){.skeleton-row-left{gap:8px;width:100%}}.skeleton-row-title{animation:shimmer 1.5s infinite;background:linear-gradient(-90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:4px;height:20px;width:50%}@media(max-width:1024px){.skeleton-row-title{height:18px;width:60%}}@media(max-width:768px){.skeleton-row-title{height:16px;width:80%}}@media(max-width:480px){.skeleton-row-title{width:100%}}.skeleton-row-desc{animation:shimmer 1.5s infinite;background:linear-gradient(-90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:4px;height:10px;width:70%}@media(max-width:1024px){.skeleton-row-desc{width:80%}}@media(max-width:768px){.skeleton-row-desc{height:8px;width:90%}}@media(max-width:480px){.skeleton-row-desc{width:100%}}.skeleton-row-toggle{animation:shimmer 1.5s infinite;background:linear-gradient(-90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:999px;flex-shrink:0;height:20px;width:40px}@media(max-width:768px){.skeleton-row-toggle{align-self:flex-end;height:18px;width:36px}}@keyframes shimmer{0%{background-position:right -200px top 0}to{background-position:right 200px top 0}}.skeleton-header-center,.skeleton-header-left .logo,.skeleton-header-left .logo-name,.skeleton-header-right,.skeleton-row-desc,.skeleton-row-title,.skeleton-row-toggle,.skeleton-sidebar-row{background-size:400px 100%}@media(prefers-reduced-motion:reduce){.skeleton-header-center,.skeleton-header-left .logo,.skeleton-header-left .logo-name,.skeleton-header-right,.skeleton-row-desc,.skeleton-row-title,.skeleton-row-toggle,.skeleton-sidebar-row{animation:none;background:#e0e0e0}}@media print{.skeleton-wrapper{display:none}}
  • pageflash/trunk/build/admin/admin.asset.php

    r3295254 r3446147  
    1 <?php return array('dependencies' => array(), 'version' => 'f445c3a2286b0fbfab7d');
     1<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '1af07936547064a95de7');
  • pageflash/trunk/build/admin/admin.css

    r3295254 r3446147  
    1 *{box-sizing:border-box;margin:0;padding:0}
     1@import url(https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&display=swap);
     2*{box-sizing:border-box;margin:0;padding:0}#pageflash-admin{font-family:Lexend,sans-serif;font-optical-sizing:auto;font-style:normal}.pageflash-toast-container{right:20px!important;top:50px!important}.pageflash-select{border-radius:8px}.pageflash-select .components-card-body{padding:20px}.pageflash-switch{border-radius:8px}.pageflash-switch .components-card-body{padding:20px}.pageflash-switch .pageflash-select{border-radius:unset;box-shadow:none}.pageflash-switch .pageflash-select .components-card-body{padding:10px}.pageflash-header{background-color:#fff!important;border-radius:5px!important;padding:0 5px}.pageflash-header__z-stack{width:100%}.pageflash-header__z-stack>div{width:100%!important}.pageflash-header__logo{margin-right:10px}.pageflash-header__menu{border-right:1px solid #d8d8d8;border-top-right-radius:0!important;padding:0!important}@media(max-width:768px){.pageflash-header__menu{border-right:none!important;border-top-right-radius:5px!important}}.pageflash-header__menu-list{background-color:#fff!important;padding:5px}.pageflash-header__menu-button{box-shadow:none!important;color:#1c1e24!important}.pageflash-header__menu-button.is-primary{color:#fff!important}.pageflash-header__card-body{background-color:#fff!important;border-radius:0 5px 5px 0!important;padding:0!important;width:100%!important}.pageflash-header__h-stack{border-bottom:1px solid #d8d8d8;padding:15px 30px}.pageflash-addons{padding:50px}@media(max-width:1024px){.pageflash-addons{padding:30px}}@media(max-width:768px){.pageflash-addons{padding:20px}}.pageflash-addons .components-card{padding:20px 0}.pageflash-addons__explore-link{display:flex;justify-content:flex-end;padding-top:20px}.pageflash-addons__explore-link a{align-items:center;background:#3858e9;border-radius:2px;color:#fff;display:flex;font-size:14px;padding:7px;text-decoration:none}.pageflash-addons__image{border-radius:4px;height:70px;-o-object-fit:cover;object-fit:cover;width:70px}.pageflash-addons__badge{background-color:#f0f0f0;border-radius:4px;color:#333;font-size:14px;margin-left:10px;padding:4px 8px;position:absolute;right:23px;top:23px}.pageflash-settings{padding:50px}@media(max-width:1024px){.pageflash-settings{padding:30px}}@media(max-width:768px){.pageflash-settings{padding:20px}}.pageflash-body{padding:50px}@media(max-width:1024px){.pageflash-body{padding:30px}}@media(max-width:768px){.pageflash-body{padding:20px}}.pageflash-support{margin:0 auto;max-width:1200px;padding:50px 20px}.pageflash-support .components-card{margin-bottom:20px}.pageflash-support .components-card-header h2{font-size:18px;font-weight:600;margin:0}.pageflash-support .components-card-body p{color:#646970;line-height:1.6;margin:0 0 16px}.pageflash-support .pageflash-support-faq-column{align-items:flex-start;display:flex;flex-direction:column;gap:8px}.pageflash-support .pageflash-support-faq-column .components-button.is-link{height:auto;padding:4px 0;text-align:left}.skeleton-wrapper{background:#f8f9fa;box-sizing:border-box;display:flex;flex-direction:column;font-family:sans-serif;height:100vh;overflow:hidden;width:100%}.skeleton-header{align-items:center;box-sizing:border-box;display:flex;gap:16px;height:50px;justify-content:space-between;margin:16px;width:calc(100% - 32px)}@media(max-width:1024px){.skeleton-header{gap:12px;height:40px;margin:12px;width:calc(100% - 24px)}}@media(max-width:768px){.skeleton-header{align-items:stretch;flex-direction:column;gap:8px;height:auto;margin:12px}}.skeleton-header-left{display:flex;gap:8px;height:50px;width:244px}.skeleton-header-left .logo{width:30%}.skeleton-header-left .logo,.skeleton-header-left .logo-name{animation:shimmer 1.5s infinite;background:linear-gradient(90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:4px;height:50px}.skeleton-header-left .logo-name{width:70%}@media(max-width:1024px){.skeleton-header-left{height:40px;width:120px}}@media(max-width:768px){.skeleton-header-left{height:36px;width:100%}}.skeleton-header-center{animation:shimmer 1.5s infinite;background:linear-gradient(90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:4px;flex:1;height:50px}@media(max-width:1024px){.skeleton-header-center{height:40px}}@media(max-width:768px){.skeleton-header-center{height:36px;width:100%}}.skeleton-header-right{animation:shimmer 1.5s infinite;background:linear-gradient(90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:4px;height:50px;width:100px}@media(max-width:1024px){.skeleton-header-right{height:40px;width:80px}}@media(max-width:768px){.skeleton-header-right{height:36px;width:100%}}.skeleton-main{display:flex;flex:1;gap:16px;overflow:auto;padding:16px}@media(max-width:1024px){.skeleton-main{gap:12px;padding:12px}}@media(max-width:768px){.skeleton-main{flex-direction:column;gap:12px;padding:12px}}.skeleton-sidebar{display:flex;flex:0 0 244px;flex-direction:column;gap:16px}@media(max-width:1024px){.skeleton-sidebar{flex:0 0 244px;gap:12px}}@media(max-width:768px){.skeleton-sidebar{display:none}}.skeleton-sidebar-row{animation:shimmer 1.5s infinite;background:linear-gradient(90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:8px;height:40px}@media(max-width:1024px){.skeleton-sidebar-row{height:36px}}.skeleton-content{display:flex;flex:1;flex-direction:column;gap:16px;padding:20px 30px}@media(max-width:1024px){.skeleton-content{gap:12px}}@media(max-width:768px){.skeleton-content{gap:10px}}.skeleton-row{align-items:center;background:#fff;border-radius:8px;box-shadow:0 0 0 1px #e0e0e0;display:flex;height:90px;justify-content:space-between;min-height:80px;padding:12px 16px}@media(max-width:1024px){.skeleton-row{height:80px;min-height:70px;padding:10px 12px}}@media(max-width:768px){.skeleton-row{align-items:flex-start;flex-direction:column;gap:12px;height:auto;min-height:100px;padding:12px}}.skeleton-row-left{display:flex;flex:1;flex-direction:column;gap:10px;min-width:0}@media(max-width:768px){.skeleton-row-left{gap:8px;width:100%}}.skeleton-row-title{animation:shimmer 1.5s infinite;background:linear-gradient(90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:4px;height:20px;width:50%}@media(max-width:1024px){.skeleton-row-title{height:18px;width:60%}}@media(max-width:768px){.skeleton-row-title{height:16px;width:80%}}@media(max-width:480px){.skeleton-row-title{width:100%}}.skeleton-row-desc{animation:shimmer 1.5s infinite;background:linear-gradient(90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:4px;height:10px;width:70%}@media(max-width:1024px){.skeleton-row-desc{width:80%}}@media(max-width:768px){.skeleton-row-desc{height:8px;width:90%}}@media(max-width:480px){.skeleton-row-desc{width:100%}}.skeleton-row-toggle{animation:shimmer 1.5s infinite;background:linear-gradient(90deg,#e0e0e0 25%,#f0f0f0 50%,#e0e0e0 75%);border-radius:999px;flex-shrink:0;height:20px;width:40px}@media(max-width:768px){.skeleton-row-toggle{align-self:flex-end;height:18px;width:36px}}@keyframes shimmer{0%{background-position:-200px 0}to{background-position:200px 0}}.skeleton-header-center,.skeleton-header-left .logo,.skeleton-header-left .logo-name,.skeleton-header-right,.skeleton-row-desc,.skeleton-row-title,.skeleton-row-toggle,.skeleton-sidebar-row{background-size:400px 100%}@media(prefers-reduced-motion:reduce){.skeleton-header-center,.skeleton-header-left .logo,.skeleton-header-left .logo-name,.skeleton-header-right,.skeleton-row-desc,.skeleton-row-title,.skeleton-row-toggle,.skeleton-sidebar-row{animation:none;background:#e0e0e0}}@media print{.skeleton-wrapper{display:none}}
  • pageflash/trunk/build/admin/admin.js

    r3295254 r3446147  
     1(()=>{"use strict";var e={n:t=>{var a=t&&t.__esModule?()=>t.default:()=>t;return e.d(a,{a}),a},d:(t,a)=>{for(var n in a)e.o(a,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:a[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.domReady;var a=e.n(t);const n=window.wp.element,r=window.React;function o(e){var t,a,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(a=o(e[t]))&&(n&&(n+=" "),n+=a)}else for(a in e)e[a]&&(n&&(n+=" "),n+=a);return n}const i=function(){for(var e,t,a=0,n="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=o(e))&&(n&&(n+=" "),n+=t);return n};!function(e){if("undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",t.firstChild?t.insertBefore(a,t.firstChild):t.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}(':root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n');var s=e=>"number"==typeof e&&!isNaN(e),l=e=>"string"==typeof e,c=e=>"function"==typeof e,u=e=>l(e)||c(e)?e:null,d=(e,t)=>!1===e||s(e)&&e>0?e:t,p=e=>(0,r.isValidElement)(e)||l(e)||c(e)||s(e);function f({enter:e,exit:t,appendPosition:a=!1,collapse:n=!0,collapseDuration:o=300}){return function({children:i,position:s,preventExitTransition:l,done:c,nodeRef:u,isIn:d,playToast:p}){let f=a?`${e}--${s}`:e,h=a?`${t}--${s}`:t,m=(0,r.useRef)(0);return(0,r.useLayoutEffect)(()=>{let e=u.current,t=f.split(" "),a=n=>{n.target===u.current&&(p(),e.removeEventListener("animationend",a),e.removeEventListener("animationcancel",a),0===m.current&&"animationcancel"!==n.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",a),e.addEventListener("animationcancel",a)},[]),(0,r.useEffect)(()=>{let e=u.current,t=()=>{e.removeEventListener("animationend",t),n?function(e,t,a=300){let{scrollHeight:n,style:r}=e;requestAnimationFrame(()=>{r.minHeight="initial",r.height=n+"px",r.transition=`all ${a}ms`,requestAnimationFrame(()=>{r.height="0",r.padding="0",r.margin="0",setTimeout(t,a)})})}(e,c,o):c()};d||(l?t():(m.current=1,e.className+=` ${h}`,e.addEventListener("animationend",t)))},[d]),r.createElement(r.Fragment,null,i)}}function h(e,t){return{content:m(e.content,e.props),containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,reason:e.removalReason,status:t}}function m(e,t,a=!1){return(0,r.isValidElement)(e)&&!l(e.type)?(0,r.cloneElement)(e,{closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:a}):c(e)?e({closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:a}):e}function g({delay:e,isRunning:t,closeToast:a,type:n="default",hide:o,className:s,controlledProgress:l,progress:u,rtl:d,isIn:p,theme:f}){let h=o||l&&0===u,m={animationDuration:`${e}ms`,animationPlayState:t?"running":"paused"};l&&(m.transform=`scaleX(${u})`);let g=i("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${f}`,`Toastify__progress-bar--${n}`,{"Toastify__progress-bar--rtl":d}),y=c(s)?s({rtl:d,type:n,defaultClassName:g}):i(g,s),v={[l&&u>=1?"onTransitionEnd":"onAnimationEnd"]:l&&u<1?null:()=>{p&&a()}};return r.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":h},r.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${f} Toastify__progress-bar--${n}`}),r.createElement("div",{role:"progressbar","aria-hidden":h?"true":"false","aria-label":"notification timer",className:y,style:m,...v}))}var y=1,v=()=>""+y++;var _=new Map,x=[],b=new Set,w=e=>b.forEach(t=>t(e)),T=()=>_.size>0;function k(e,t){var a;if(t)return!(null==(a=_.get(t))||!a.isToastActive(e));let n=!1;return _.forEach(t=>{t.isToastActive(e)&&(n=!0)}),n}function C(e,t){p(e)&&(T()||x.push({content:e,options:t}),_.forEach(a=>{a.buildToast(e,t)}))}function E(e,t){_.forEach(a=>{(null==t||null==t||!t.containerId||(null==t?void 0:t.containerId)===a.id)&&a.toggle(e,null==t?void 0:t.id)})}function j(e){let t=e.containerId||1;return{subscribe(a){let n=function(e,t,a){let n=1,r=0,o=[],i=[],l=t,c=new Map,f=new Set,m=()=>{i=Array.from(c.values()),f.forEach(e=>e())},g=e=>{var t,a;null==(a=null==(t=e.props)?void 0:t.onClose)||a.call(t,e.removalReason),e.isActive=!1},y=e=>{if(null==e)c.forEach(g);else{let t=c.get(e);t&&g(t)}m()},v=e=>{var t,n;let{toastId:r,updateId:o}=e.props,i=null==o;e.staleId&&c.delete(e.staleId),e.isActive=!0,c.set(r,e),m(),a(h(e,i?"added":"updated")),i&&(null==(n=(t=e.props).onOpen)||n.call(t))};return{id:e,props:l,observe:e=>(f.add(e),()=>f.delete(e)),toggle:(e,t)=>{c.forEach(a=>{var n;(null==t||t===a.props.toastId)&&(null==(n=a.toggle)||n.call(a,e))})},removeToast:y,toasts:c,clearQueue:()=>{r-=o.length,o=[]},buildToast:(t,i)=>{if((({containerId:t,toastId:a,updateId:n})=>{let r=t?t!==e:1!==e,o=c.has(a)&&null==n;return r||o})(i))return;let{toastId:f,updateId:g,data:_,staleId:x,delay:b}=i,w=null==g;w&&r++;let T={...l,style:l.toastStyle,key:n++,...Object.fromEntries(Object.entries(i).filter(([e,t])=>null!=t)),toastId:f,updateId:g,data:_,isIn:!1,className:u(i.className||l.toastClassName),progressClassName:u(i.progressClassName||l.progressClassName),autoClose:!i.isLoading&&d(i.autoClose,l.autoClose),closeToast(e){c.get(f).removalReason=e,y(f)},deleteToast(){let e=c.get(f);if(null!=e){if(a(h(e,"removed")),c.delete(f),r--,r<0&&(r=0),o.length>0)return void v(o.shift());m()}}};T.closeButton=l.closeButton,!1===i.closeButton||p(i.closeButton)?T.closeButton=i.closeButton:!0===i.closeButton&&(T.closeButton=!p(l.closeButton)||l.closeButton);let k={content:t,props:T,staleId:x};l.limit&&l.limit>0&&r>l.limit&&w?o.push(k):s(b)?setTimeout(()=>{v(k)},b):v(k)},setProps(e){l=e},setToggle:(e,t)=>{let a=c.get(e);a&&(a.toggle=t)},isToastActive:e=>{var t;return null==(t=c.get(e))?void 0:t.isActive},getSnapshot:()=>i}}(t,e,w);_.set(t,n);let r=n.observe(a);return x.forEach(e=>C(e.content,e.options)),x=[],()=>{r(),_.delete(t)}},setProps(e){var a;null==(a=_.get(t))||a.setProps(e)},getSnapshot(){var e;return null==(e=_.get(t))?void 0:e.getSnapshot()}}}function L(e){return e&&(l(e.toastId)||s(e.toastId))?e.toastId:v()}function S(e,t){return C(e,t),t.toastId}function R(e,t){return{...t,type:t&&t.type||e,toastId:L(t)}}function P(e){return(t,a)=>S(t,R(e,a))}function O(e,t){return S(e,R("default",t))}O.loading=(e,t)=>S(e,R("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),O.promise=function(e,{pending:t,error:a,success:n},r){let o;t&&(o=l(t)?O.loading(t,r):O.loading(t.render,{...r,...t}));let i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},s=(e,t,a)=>{if(null==t)return void O.dismiss(o);let n={type:e,...i,...r,data:a},s=l(t)?{render:t}:t;return o?O.update(o,{...n,...s}):O(s.render,{...n,...s}),a},u=c(e)?e():e;return u.then(e=>s("success",n,e)).catch(e=>s("error",a,e)),u},O.success=P("success"),O.info=P("info"),O.error=P("error"),O.warning=P("warning"),O.warn=O.warning,O.dark=(e,t)=>S(e,R("default",{theme:"dark",...t})),O.dismiss=function(e){!function(e){if(T()){if(null==e||(e=>l(e)||s(e))(e))_.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=_.get(e.containerId);t?t.removeToast(e.id):_.forEach(t=>{t.removeToast(e.id)})}}else x=x.filter(t=>null!=e&&t.options.toastId!==e)}(e)},O.clearWaitingQueue=(e={})=>{_.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})},O.isActive=k,O.update=(e,t={})=>{let a=((e,{containerId:t})=>{var a;return null==(a=_.get(t||1))?void 0:a.toasts.get(e)})(e,t);if(a){let{props:n,content:r}=a,o={delay:100,...n,...t,toastId:t.toastId||e,updateId:v()};o.toastId!==e&&(o.staleId=e);let i=o.render||r;delete o.render,S(i,o)}},O.done=e=>{O.update(e,{progress:1})},O.onChange=function(e){return b.add(e),()=>{b.delete(e)}},O.play=e=>E(!0,e),O.pause=e=>E(!1,e);var N="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,I=({theme:e,type:t,isLoading:a,...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===e?"currentColor":`var(--toastify-icon-color-${t})`,...n}),$={info:function(e){return r.createElement(I,{...e},r.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return r.createElement(I,{...e},r.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return r.createElement(I,{...e},r.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return r.createElement(I,{...e},r.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return r.createElement("div",{className:"Toastify__spinner"})}};var M=e=>{let{isRunning:t,preventExitTransition:a,toastRef:n,eventHandlers:o,playToast:s}=function(e){let[t,a]=(0,r.useState)(!1),[n,o]=(0,r.useState)(!1),i=(0,r.useRef)(null),s=(0,r.useRef)({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:l,pauseOnHover:c,closeToast:u,onClick:d,closeOnClick:p}=e;function f(){a(!0)}function h(){a(!1)}function m(a){let n=i.current;if(s.canDrag&&n){s.didMove=!0,t&&h(),"x"===e.draggableDirection?s.delta=a.clientX-s.start:s.delta=a.clientY-s.start,s.start!==a.clientX&&(s.canCloseOnClick=!1);let r="x"===e.draggableDirection?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`;n.style.transform=`translate3d(${r},0)`,n.style.opacity=""+(1-Math.abs(s.delta/s.removalDistance))}}function g(){document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",g);let t=i.current;if(s.canDrag&&s.didMove&&t){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance)return o(!0),e.closeToast(!0),void e.collapseAll();t.style.transition="transform 0.2s, opacity 0.2s",t.style.removeProperty("transform"),t.style.removeProperty("opacity")}}(function(e){var t;null==(t=_.get(e.containerId||1))||t.setToggle(e.id,e.fn)})({id:e.toastId,containerId:e.containerId,fn:a}),(0,r.useEffect)(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||h(),window.addEventListener("focus",f),window.addEventListener("blur",h),()=>{window.removeEventListener("focus",f),window.removeEventListener("blur",h)}},[e.pauseOnFocusLoss]);let y={onPointerDown:function(t){if(!0===e.draggable||e.draggable===t.pointerType){s.didMove=!1,document.addEventListener("pointermove",m),document.addEventListener("pointerup",g);let a=i.current;s.canCloseOnClick=!0,s.canDrag=!0,a.style.transition="none","x"===e.draggableDirection?(s.start=t.clientX,s.removalDistance=a.offsetWidth*(e.draggablePercent/100)):(s.start=t.clientY,s.removalDistance=a.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(t){let{top:a,bottom:n,left:r,right:o}=i.current.getBoundingClientRect();"touchend"!==t.nativeEvent.type&&e.pauseOnHover&&t.clientX>=r&&t.clientX<=o&&t.clientY>=a&&t.clientY<=n?h():f()}};return l&&c&&(y.onMouseEnter=h,e.stacked||(y.onMouseLeave=f)),p&&(y.onClick=e=>{d&&d(e),s.canCloseOnClick&&u(!0)}),{playToast:f,pauseToast:h,isRunning:t,preventExitTransition:n,toastRef:i,eventHandlers:y}}(e),{closeButton:l,children:u,autoClose:d,onClick:p,type:f,hideProgressBar:h,closeToast:y,transition:v,position:x,className:b,style:w,progressClassName:T,updateId:k,role:C,progress:E,rtl:j,toastId:L,deleteToast:S,isIn:R,isLoading:P,closeOnClick:O,theme:N,ariaLabel:I}=e,M=i("Toastify__toast",`Toastify__toast-theme--${N}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":j},{"Toastify__toast--close-on-click":O}),z=c(b)?b({rtl:j,position:x,type:f,defaultClassName:M}):i(M,b),B=function({theme:e,type:t,isLoading:a,icon:n}){let o=null,i={theme:e,type:t};return!1===n||(c(n)?o=n({...i,isLoading:a}):(0,r.isValidElement)(n)?o=(0,r.cloneElement)(n,i):a?o=$.spinner():(e=>e in $)(t)&&(o=$[t](i))),o}(e),F=!!E||!d,A={closeToast:y,type:f,theme:N},D=null;return!1===l||(D=c(l)?l(A):(0,r.isValidElement)(l)?(0,r.cloneElement)(l,A):function({closeToast:e,theme:t,ariaLabel:a="close"}){return r.createElement("button",{className:`Toastify__close-button Toastify__close-button--${t}`,type:"button",onClick:t=>{t.stopPropagation(),e(!0)},"aria-label":a},r.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},r.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(A)),r.createElement(v,{isIn:R,done:S,position:x,preventExitTransition:a,nodeRef:n,playToast:s},r.createElement("div",{id:L,tabIndex:0,onClick:p,"data-in":R,className:z,...o,style:w,ref:n,...R&&{role:C,"aria-label":I}},null!=B&&r.createElement("div",{className:i("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!P})},B),m(u,e,!t),D,!e.customProgressBar&&r.createElement(g,{...k&&!F?{key:`p-${k}`}:{},rtl:j,theme:N,delay:d,isRunning:t,isIn:R,closeToast:y,hide:h,type:f,className:T,controlledProgress:F,progress:E||0})))},z=(e,t=!1)=>({enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}),B=f(z("bounce",!0)),F=(f(z("slide",!0)),f(z("zoom")),f(z("flip")),{position:"top-right",transition:B,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:e=>e.altKey&&"KeyT"===e.code});function A(e){let t={...F,...e},a=e.stacked,[n,o]=(0,r.useState)(!0),s=(0,r.useRef)(null),{getToastToRender:l,isToastActive:d,count:p}=function(e){var t;let{subscribe:a,getSnapshot:n,setProps:o}=(0,r.useRef)(j(e)).current;o(e);let i=null==(t=(0,r.useSyncExternalStore)(a,n,n))?void 0:t.slice();return{getToastToRender:function(t){if(!i)return[];let a=new Map;return e.newestOnTop&&i.reverse(),i.forEach(e=>{let{position:t}=e.props;a.has(t)||a.set(t,[]),a.get(t).push(e)}),Array.from(a,e=>t(e[0],e[1]))},isToastActive:k,count:null==i?void 0:i.length}}(t),{className:f,style:h,rtl:m,containerId:g,hotKeys:y}=t;function v(e){let t=i("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":m});return c(f)?f({position:e,rtl:m,defaultClassName:t}):i(t,u(f))}function _(){a&&(o(!0),O.play())}return N(()=>{var e;if(a){let a=s.current.querySelectorAll('[data-in="true"]'),r=12,o=null==(e=t.position)?void 0:e.includes("top"),i=0,l=0;Array.from(a).reverse().forEach((e,t)=>{let a=e;a.classList.add("Toastify__toast--stacked"),t>0&&(a.dataset.collapsed=`${n}`),a.dataset.pos||(a.dataset.pos=o?"top":"bot");let s=i*(n?.2:1)+(n?0:r*t);a.style.setProperty("--y",`${o?s:-1*s}px`),a.style.setProperty("--g",`${r}`),a.style.setProperty("--s",""+(1-(n?l:0))),i+=a.offsetHeight,l+=.025})}},[n,p,a]),(0,r.useEffect)(()=>{function e(e){var t;let a=s.current;y(e)&&(null==(t=a.querySelector('[tabIndex="0"]'))||t.focus(),o(!1),O.pause()),"Escape"===e.key&&(document.activeElement===a||null!=a&&a.contains(document.activeElement))&&(o(!0),O.play())}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[y]),r.createElement("section",{ref:s,className:"Toastify",id:g,onMouseEnter:()=>{a&&(o(!1),O.pause())},onMouseLeave:_,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":t["aria-label"]},l((e,t)=>{let n=t.length?{...h}:{...h,pointerEvents:"none"};return r.createElement("div",{tabIndex:-1,className:v(e),"data-stacked":a,style:n,key:`c-${e}`},t.map(({content:e,props:t})=>r.createElement(M,{...t,stacked:a,collapseAll:_,isIn:d(t.toastId,t.containerId),key:`t-${t.key}`},e)))}))}const D=window.wp.i18n;var H="popstate";function W(e={}){return function(e,t,a,n={}){let{window:r=document.defaultView,v5Compat:o=!1}=n,i=r.history,s="POP",l=null,c=u();function u(){return(i.state||{idx:null}).idx}function d(){s="POP";let e=u(),t=null==e?null:e-c;c=e,l&&l({action:s,location:f.location,delta:t})}function p(e){return function(e,t=!1){let a="http://localhost";"undefined"!=typeof window&&(a="null"!==window.location.origin?window.location.origin:window.location.href),U(a,"No window.location.(origin|href) available to create URL");let n="string"==typeof e?e:Y(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=a+n),new URL(n,a)}(e)}null==c&&(c=0,i.replaceState({...i.state,idx:c},""));let f={get action(){return s},get location(){return e(r,i)},listen(e){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(H,d),l=e,()=>{r.removeEventListener(H,d),l=null}},createHref:e=>t(r,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let n=K(f.location,e,t);a&&a(n,e),c=u()+1;let d=X(n,c),p=f.createHref(n);try{i.pushState(d,"",p)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;r.location.assign(p)}o&&l&&l({action:s,location:f.location,delta:1})},replace:function(e,t){s="REPLACE";let n=K(f.location,e,t);a&&a(n,e),c=u();let r=X(n,c),d=f.createHref(n);i.replaceState(r,"",d),o&&l&&l({action:s,location:f.location,delta:0})},go:e=>i.go(e)};return f}(function(e,t){let{pathname:a="/",search:n="",hash:r=""}=G(e.location.hash.substring(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),K("",{pathname:a,search:n,hash:r},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let a=e.document.querySelector("base"),n="";if(a&&a.getAttribute("href")){let t=e.location.href,a=t.indexOf("#");n=-1===a?t:t.slice(0,a)}return n+"#"+("string"==typeof t?t:Y(t))},function(e,t){V("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)},e)}function U(e,t){if(!1===e||null==e)throw new Error(t)}function V(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function X(e,t){return{usr:e.state,key:e.key,idx:t}}function K(e,t,a=null,n){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?G(t):t,state:a,key:t&&t.key||n||Math.random().toString(36).substring(2,10)}}function Y({pathname:e="/",search:t="",hash:a=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),a&&"#"!==a&&(e+="#"===a.charAt(0)?a:"#"+a),e}function G(e){let t={};if(e){let a=e.indexOf("#");a>=0&&(t.hash=e.substring(a),e=e.substring(0,a));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function q(e,t,a="/"){return function(e,t,a,n){let r=ue(("string"==typeof t?G(t):t).pathname||"/",a);if(null==r)return null;let o=J(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,a)=>e===t[a])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(o);let i=null;for(let e=0;null==i&&e<o.length;++e){let t=ce(r);i=se(o[e],t,n)}return i}(e,t,a,!1)}function J(e,t=[],a=[],n="",r=!1){let o=(e,o,i=r,s)=>{let l={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(n)&&i)return;U(l.relativePath.startsWith(n),`Absolute route path "${l.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(n.length)}let c=he([n,l.relativePath]),u=a.concat(l);e.children&&e.children.length>0&&(U(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),J(e.children,t,u,c,i)),(null!=e.path||e.index)&&t.push({path:c,score:ie(c,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let a of Z(e.path))o(e,t,!0,a);else o(e,t)}),t}function Z(e){let t=e.split("/");if(0===t.length)return[];let[a,...n]=t,r=a.endsWith("?"),o=a.replace(/\?$/,"");if(0===n.length)return r?[o,""]:[o];let i=Z(n.join("/")),s=[];return s.push(...i.map(e=>""===e?o:[o,e].join("/"))),r&&s.push(...i),s.map(t=>e.startsWith("/")&&""===t?"/":t)}new WeakMap;var Q=/^:[\w-]+$/,ee=3,te=2,ae=1,ne=10,re=-2,oe=e=>"*"===e;function ie(e,t){let a=e.split("/"),n=a.length;return a.some(oe)&&(n+=re),t&&(n+=te),a.filter(e=>!oe(e)).reduce((e,t)=>e+(Q.test(t)?ee:""===t?ae:ne),n)}function se(e,t,a=!1){let{routesMeta:n}=e,r={},o="/",i=[];for(let e=0;e<n.length;++e){let s=n[e],l=e===n.length-1,c="/"===o?t:t.slice(o.length)||"/",u=le({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},c),d=s.route;if(!u&&l&&a&&!n[n.length-1].route.index&&(u=le({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!u)return null;Object.assign(r,u.params),i.push({params:r,pathname:he([o,u.pathname]),pathnameBase:me(he([o,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(o=he([o,u.pathnameBase]))}return i}function le(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[a,n]=function(e,t=!1,a=!0){V("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,a)=>(n.push({paramName:t,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),r+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?r+="\\/*$":""!==e&&"/"!==e&&(r+="(?:(?=\\/|$))"),[new RegExp(r,t?void 0:"i"),n]}(e.path,e.caseSensitive,e.end),r=t.match(a);if(!r)return null;let o=r[0],i=o.replace(/(.)\/+$/,"$1"),s=r.slice(1);return{params:n.reduce((e,{paramName:t,isOptional:a},n)=>{if("*"===t){let e=s[n]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const r=s[n];return e[t]=a&&!r?void 0:(r||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:i,pattern:e}}function ce(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return V(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ue(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let a=t.endsWith("/")?t.length-1:t.length,n=e.charAt(a);return n&&"/"!==n?null:e.slice(a)||"/"}function de(e,t,a,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}].  Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function pe(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,a)=>a===t.length-1?e.pathname:e.pathnameBase)}function fe(e,t,a,n=!1){let r;"string"==typeof e?r=G(e):(r={...e},U(!r.pathname||!r.pathname.includes("?"),de("?","pathname","search",r)),U(!r.pathname||!r.pathname.includes("#"),de("#","pathname","hash",r)),U(!r.search||!r.search.includes("#"),de("#","search","hash",r)));let o,i=""===e||""===r.pathname,s=i?"/":r.pathname;if(null==s)o=a;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;r.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t="/"){let{pathname:a,search:n="",hash:r=""}="string"==typeof e?G(e):e,o=a?a.startsWith("/")?a:function(e,t){let a=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?a.length>1&&a.pop():"."!==e&&a.push(e)}),a.length>1?a.join("/"):"/"}(a,t):t;return{pathname:o,search:ge(n),hash:ye(r)}}(r,o),c=s&&"/"!==s&&s.endsWith("/"),u=(i||"."===s)&&a.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}var he=e=>e.join("/").replace(/\/\/+/g,"/"),me=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ge=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",ye=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function ve(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}var _e=["POST","PUT","PATCH","DELETE"],xe=(new Set(_e),["GET",..._e]);new Set(xe),Symbol("ResetLoaderData");var be=r.createContext(null);be.displayName="DataRouter";var we=r.createContext(null);we.displayName="DataRouterState";r.createContext(!1);var Te=r.createContext({isTransitioning:!1});Te.displayName="ViewTransition",r.createContext(new Map).displayName="Fetchers",r.createContext(null).displayName="Await";var ke=r.createContext(null);ke.displayName="Navigation";var Ce=r.createContext(null);Ce.displayName="Location";var Ee=r.createContext({outlet:null,matches:[],isDataRoute:!1});Ee.displayName="Route";var je=r.createContext(null);function Le(){return null!=r.useContext(Ce)}function Se(){return U(Le(),"useLocation() may be used only in the context of a <Router> component."),r.useContext(Ce).location}je.displayName="RouteError";var Re="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Pe(e){r.useContext(ke).static||r.useLayoutEffect(e)}function Oe(){let{isDataRoute:e}=r.useContext(Ee);return e?function(){let{router:e}=function(e){let t=r.useContext(be);return U(t,Ae(e)),t}("useNavigate"),t=De("useNavigate"),a=r.useRef(!1);return Pe(()=>{a.current=!0}),r.useCallback(async(n,r={})=>{V(a.current,Re),a.current&&("number"==typeof n?e.navigate(n):await e.navigate(n,{fromRouteId:t,...r}))},[e,t])}():function(){U(Le(),"useNavigate() may be used only in the context of a <Router> component.");let e=r.useContext(be),{basename:t,navigator:a}=r.useContext(ke),{matches:n}=r.useContext(Ee),{pathname:o}=Se(),i=JSON.stringify(pe(n)),s=r.useRef(!1);return Pe(()=>{s.current=!0}),r.useCallback((n,r={})=>{if(V(s.current,Re),!s.current)return;if("number"==typeof n)return void a.go(n);let l=fe(n,JSON.parse(i),o,"path"===r.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:he([t,l.pathname])),(r.replace?a.replace:a.push)(l,r.state,r)},[t,a,i,o,e])}()}var Ne=r.createContext(null);function Ie(e,{relative:t}={}){let{matches:a}=r.useContext(Ee),{pathname:n}=Se(),o=JSON.stringify(pe(a));return r.useMemo(()=>fe(e,JSON.parse(o),n,"path"===t),[e,o,n,t])}function $e(e,t,a,n,o){U(Le(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=r.useContext(ke),{matches:s}=r.useContext(Ee),l=s[s.length-1],c=l?l.params:{},u=l?l.pathname:"/",d=l?l.pathnameBase:"/",p=l&&l.route;{let e=p&&p.path||"";We(u,!p||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let f,h=Se();if(t){let e="string"==typeof t?G(t):t;U("/"===d||e.pathname?.startsWith(d),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=h;let m=f.pathname||"/",g=m;if("/"!==d){let e=d.replace(/^\//,"").split("/");g="/"+m.replace(/^\//,"").split("/").slice(e.length).join("/")}let y=q(e,{pathname:g});V(p||null!=y,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),V(null==y||void 0!==y[y.length-1].route.element||void 0!==y[y.length-1].route.Component||void 0!==y[y.length-1].route.lazy,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=function(e,t=[],a=null,n=null){if(null==e){if(!a)return null;if(a.errors)e=a.matches;else{if(0!==t.length||a.initialized||!(a.matches.length>0))return null;e=a.matches}}let o=e,i=a?.errors;if(null!=i){let e=o.findIndex(e=>e.route.id&&void 0!==i?.[e.route.id]);U(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,e+1))}let s=!1,l=-1;if(a)for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:n}=a,r=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!n||void 0===n[t.route.id]);if(t.route.lazy||r){s=!0,o=l>=0?o.slice(0,l+1):[o[0]];break}}}return o.reduceRight((e,c,u)=>{let d,p=!1,f=null,h=null;a&&(d=i&&c.route.id?i[c.route.id]:void 0,f=c.route.errorElement||ze,s&&(l<0&&0===u?(We("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,h=null):l===u&&(p=!0,h=c.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,u+1)),g=()=>{let t;return t=d?f:p?h:c.route.Component?r.createElement(c.route.Component,null):c.route.element?c.route.element:e,r.createElement(Fe,{match:c,routeContext:{outlet:e,matches:m,isDataRoute:null!=a},children:t})};return a&&(c.route.ErrorBoundary||c.route.errorElement||0===u)?r.createElement(Be,{location:a.location,revalidation:a.revalidation,component:f,error:d,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},unstable_onError:n}):g()},null)}(y&&y.map(e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:he([d,i.encodeLocation?i.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?d:he([d,i.encodeLocation?i.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),s,a,n,o);return t&&v?r.createElement(Ce.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...f},navigationType:"POP"}},v):v}function Me(){let e=function(){let e=r.useContext(je),t=function(e){let t=r.useContext(we);return U(t,Ae(e)),t}("useRouteError"),a=De("useRouteError");return void 0!==e?e:t.errors?.[a]}(),t=ve(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=r.createElement(r.Fragment,null,r.createElement("p",null,"💿 Hey developer 👋"),r.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",r.createElement("code",{style:i},"ErrorBoundary")," or"," ",r.createElement("code",{style:i},"errorElement")," prop on your route.")),r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),a?r.createElement("pre",{style:o},a):null,s)}var ze=r.createElement(Me,null),Be=class extends r.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.unstable_onError?this.props.unstable_onError(e,t):console.error("React Router caught the following error during render",e)}render(){return void 0!==this.state.error?r.createElement(Ee.Provider,{value:this.props.routeContext},r.createElement(je.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Fe({routeContext:e,match:t,children:a}){let n=r.useContext(be);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),r.createElement(Ee.Provider,{value:e},a)}function Ae(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function De(e){let t=function(e){let t=r.useContext(Ee);return U(t,Ae(e)),t}(e),a=t.matches[t.matches.length-1];return U(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}var He={};function We(e,t,a){t||He[e]||(He[e]=!0,V(!1,a))}function Ue(e){return function(e){let t=r.useContext(Ee).outlet;return r.useMemo(()=>t&&r.createElement(Ne.Provider,{value:e},t),[t,e])}(e.context)}function Ve(e){U(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Xe({basename:e="/",children:t=null,location:a,navigationType:n="POP",navigator:o,static:i=!1}){U(!Le(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),l=r.useMemo(()=>({basename:s,navigator:o,static:i,future:{}}),[s,o,i]);"string"==typeof a&&(a=G(a));let{pathname:c="/",search:u="",hash:d="",state:p=null,key:f="default"}=a,h=r.useMemo(()=>{let e=ue(c,s);return null==e?null:{location:{pathname:e,search:u,hash:d,state:p,key:f},navigationType:n}},[s,c,u,d,p,f,n]);return V(null!=h,`<Router basename="${s}"> is not able to match the URL "${c}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),null==h?null:r.createElement(ke.Provider,{value:l},r.createElement(Ce.Provider,{children:t,value:h}))}function Ke({children:e,location:t}){return $e(Ye(e),t)}function Ye(e,t=[]){let a=[];return r.Children.forEach(e,(e,n)=>{if(!r.isValidElement(e))return;let o=[...t,n];if(e.type===r.Fragment)return void a.push.apply(a,Ye(e.props.children,o));U(e.type===Ve,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),U(!e.props.index||!e.props.children,"An index route cannot have child routes.");let i={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=Ye(e.props.children,o)),a.push(i)}),a}r.memo(function({routes:e,future:t,state:a,unstable_onError:n}){return $e(e,void 0,a,n,t)}),r.Component;var Ge="get",qe="application/x-www-form-urlencoded";function Je(e){return null!=e&&"string"==typeof e.tagName}var Ze=null,Qe=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function et(e){return null==e||Qe.has(e)?e:(V(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${qe}"`),null)}function tt(e,t){if(!1===e||null==e)throw new Error(t)}function at(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function nt(e,t,a,n,r,o){let i=(e,t)=>!a[t]||e.route.id!==a[t].route.id,s=(e,t)=>a[t].pathname!==e.pathname||a[t].route.path?.endsWith("*")&&a[t].params["*"]!==e.params["*"];return"assets"===o?t.filter((e,t)=>i(e,t)||s(e,t)):"data"===o?t.filter((t,o)=>{let l=n.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(i(t,o)||s(t,o))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:a[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0}):[]}function rt(e,t,{includeHydrateFallback:a}={}){return n=e.map(e=>{let n=t.routes[e.route.id];if(!n)return[];let r=[n.module];return n.clientActionModule&&(r=r.concat(n.clientActionModule)),n.clientLoaderModule&&(r=r.concat(n.clientLoaderModule)),a&&n.hydrateFallbackModule&&(r=r.concat(n.hydrateFallbackModule)),n.imports&&(r=r.concat(n.imports)),r}).flat(1),[...new Set(n)];var n}function ot(){let e=r.useContext(be);return tt(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function it(){let e=r.useContext(we);return tt(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),"undefined"!=typeof window?window:"undefined"!=typeof globalThis&&globalThis,Symbol("SingleFetchRedirect");var st=r.createContext(void 0);function lt(){let e=r.useContext(st);return tt(e,"You must render this element inside a <HydratedRouter> element"),e}function ct(e,t){return a=>{e&&e(a),a.defaultPrevented||t(a)}}function ut({page:e,...t}){let{router:a}=ot(),n=r.useMemo(()=>q(a.routes,e,a.basename),[a.routes,e,a.basename]);return n?r.createElement(pt,{page:e,matches:n,...t}):null}function dt(e){let{manifest:t,routeModules:a}=lt(),[n,o]=r.useState([]);return r.useEffect(()=>{let n=!1;return async function(e,t,a){return function(e,t){let a=new Set,n=new Set(t);return e.reduce((e,r)=>{if(t&&(null==(o=r)||"string"!=typeof o.page)&&"script"===r.as&&r.href&&n.has(r.href))return e;var o;let i=JSON.stringify(function(e){let t={},a=Object.keys(e).sort();for(let n of a)t[n]=e[n];return t}(r));return a.has(i)||(a.add(i),e.push({key:i,link:r})),e},[])}((await Promise.all(e.map(async e=>{let n=t.routes[e.route.id];if(n){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let a=await import(e.module);return t[e.id]=a,a}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(n,a);return e.links?e.links():[]}return[]}))).flat(1).filter(at).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(e,t,a).then(e=>{n||o(e)}),()=>{n=!0}},[e,t,a]),n}function pt({page:e,matches:t,...a}){let n=Se(),{manifest:o,routeModules:i}=lt(),{basename:s}=ot(),{loaderData:l,matches:c}=it(),u=r.useMemo(()=>nt(e,t,c,o,n,"data"),[e,t,c,o,n]),d=r.useMemo(()=>nt(e,t,c,o,n,"assets"),[e,t,c,o,n]),p=r.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let a=new Set,r=!1;if(t.forEach(e=>{let t=o.routes[e.route.id];t&&t.hasLoader&&(!u.some(t=>t.route.id===e.route.id)&&e.route.id in l&&i[e.route.id]?.shouldRevalidate||t.hasClientLoader?r=!0:a.add(e.route.id))}),0===a.size)return[];let c=function(e,t,a){let n="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===n.pathname?n.pathname=`_root.${a}`:t&&"/"===ue(n.pathname,t)?n.pathname=`${t.replace(/\/$/,"")}/_root.${a}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${a}`,n}(e,s,"data");return r&&a.size>0&&c.searchParams.set("_routes",t.filter(e=>a.has(e.route.id)).map(e=>e.route.id).join(",")),[c.pathname+c.search]},[s,l,n,o,u,t,e,i]),f=r.useMemo(()=>rt(d,o),[d,o]),h=dt(d);return r.createElement(r.Fragment,null,p.map(e=>r.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...a})),f.map(e=>r.createElement("link",{key:e,rel:"modulepreload",href:e,...a})),h.map(({key:e,link:t})=>r.createElement("link",{key:e,nonce:a.nonce,...t})))}st.displayName="FrameworkContext";function ft(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}r.Component;var ht="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{ht&&(window.__reactRouterVersion="7.9.4")}catch(e){}function mt({basename:e,children:t,window:a}){let n=r.useRef();null==n.current&&(n.current=W({window:a,v5Compat:!0}));let o=n.current,[i,s]=r.useState({action:o.action,location:o.location}),l=r.useCallback(e=>{r.startTransition(()=>s(e))},[s]);return r.useLayoutEffect(()=>o.listen(l),[o,l]),r.createElement(Xe,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:o})}var gt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yt=r.forwardRef(function({onClick:e,discover:t="render",prefetch:a="none",relative:n,reloadDocument:o,replace:i,state:s,target:l,to:c,preventScrollReset:u,viewTransition:d,...p},f){let h,{basename:m}=r.useContext(ke),g="string"==typeof c&&gt.test(c),y=!1;if("string"==typeof c&&g&&(h=c,ht))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),a=ue(t.pathname,m);t.origin===e.origin&&null!=a?c=a+t.search+t.hash:y=!0}catch(e){V(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let v=function(e,{relative:t}={}){U(Le(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:n}=r.useContext(ke),{hash:o,pathname:i,search:s}=Ie(e,{relative:t}),l=i;return"/"!==a&&(l="/"===i?a:he([a,i])),n.createHref({pathname:l,search:s,hash:o})}(c,{relative:n}),[_,x,b]=function(e,t){let a=r.useContext(st),[n,o]=r.useState(!1),[i,s]=r.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:p}=t,f=r.useRef(null);r.useEffect(()=>{if("render"===e&&s(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),r.useEffect(()=>{if(n){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[n]);let h=()=>{o(!0)},m=()=>{o(!1),s(!1)};return a?"intent"!==e?[i,f,{}]:[i,f,{onFocus:ct(l,h),onBlur:ct(c,m),onMouseEnter:ct(u,h),onMouseLeave:ct(d,m),onTouchStart:ct(p,h)}]:[!1,f,{}]}(a,p),w=function(e,{target:t,replace:a,state:n,preventScrollReset:o,relative:i,viewTransition:s}={}){let l=Oe(),c=Se(),u=Ie(e,{relative:i});return r.useCallback(r=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(r,t)){r.preventDefault();let t=void 0!==a?a:Y(c)===Y(u);l(e,{replace:t,state:n,preventScrollReset:o,relative:i,viewTransition:s})}},[c,l,u,a,n,t,e,o,i,s])}(c,{replace:i,state:s,target:l,preventScrollReset:u,relative:n,viewTransition:d}),T=r.createElement("a",{...p,...b,href:h||v,onClick:y||o?e:function(t){e&&e(t),t.defaultPrevented||w(t)},ref:ft(f,x),target:l,"data-discover":g||"render"!==t?void 0:"true"});return _&&!g?r.createElement(r.Fragment,null,T,r.createElement(ut,{page:v})):T});function vt(e){let t=r.useContext(be);return U(t,function(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}yt.displayName="Link",r.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:a="",end:n=!1,style:o,to:i,viewTransition:s,children:l,...c},u){let d=Ie(i,{relative:c.relative}),p=Se(),f=r.useContext(we),{navigator:h,basename:m}=r.useContext(ke),g=null!=f&&function(e,{relative:t}={}){let a=r.useContext(Te);U(null!=a,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=vt("useViewTransitionState"),o=Ie(e,{relative:t});if(!a.isTransitioning)return!1;let i=ue(a.currentLocation.pathname,n)||a.currentLocation.pathname,s=ue(a.nextLocation.pathname,n)||a.nextLocation.pathname;return null!=le(o.pathname,s)||null!=le(o.pathname,i)}(d)&&!0===s,y=h.encodeLocation?h.encodeLocation(d).pathname:d.pathname,v=p.pathname,_=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),_=_?_.toLowerCase():null,y=y.toLowerCase()),_&&m&&(_=ue(_,m)||_);const x="/"!==y&&y.endsWith("/")?y.length-1:y.length;let b,w=v===y||!n&&v.startsWith(y)&&"/"===v.charAt(x),T=null!=_&&(_===y||!n&&_.startsWith(y)&&"/"===_.charAt(y.length)),k={isActive:w,isPending:T,isTransitioning:g},C=w?e:void 0;b="function"==typeof a?a(k):[a,w?"active":null,T?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let E="function"==typeof o?o(k):o;return r.createElement(yt,{...c,"aria-current":C,className:b,ref:u,style:E,to:i,viewTransition:s},"function"==typeof l?l(k):l)}).displayName="NavLink",r.forwardRef(({discover:e="render",fetcherKey:t,navigate:a,reloadDocument:n,replace:o,state:i,method:s=Ge,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:p,...f},h)=>{let m=function(){let{router:e}=vt("useSubmit"),{basename:t}=r.useContext(ke),a=De("useRouteId");return r.useCallback(async(n,r={})=>{let{action:o,method:i,encType:s,formData:l,body:c}=function(e,t){let a,n,r,o,i;if(Je(s=e)&&"form"===s.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?ue(i,t):null,a=e.getAttribute("method")||Ge,r=et(e.getAttribute("enctype"))||qe,o=new FormData(e)}else if(function(e){return Je(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Je(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||i.getAttribute("action");if(n=s?ue(s,t):null,a=e.getAttribute("formmethod")||i.getAttribute("method")||Ge,r=et(e.getAttribute("formenctype"))||et(i.getAttribute("enctype"))||qe,o=new FormData(i,e),!function(){if(null===Ze)try{new FormData(document.createElement("form"),0),Ze=!1}catch(e){Ze=!0}return Ze}()){let{name:t,type:a,value:n}=e;if("image"===a){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,n)}}else{if(Je(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Ge,n=null,r=qe,i=e}var s;return o&&"text/plain"===r&&(i=o,o=void 0),{action:n,method:a.toLowerCase(),encType:r,formData:o,body:i}}(n,t);if(!1===r.navigate){let t=r.fetcherKey||xt();await e.fetch(t,a,r.action||o,{preventScrollReset:r.preventScrollReset,formData:l,body:c,formMethod:r.method||i,formEncType:r.encType||s,flushSync:r.flushSync})}else await e.navigate(r.action||o,{preventScrollReset:r.preventScrollReset,formData:l,body:c,formMethod:r.method||i,formEncType:r.encType||s,replace:r.replace,state:r.state,fromRouteId:a,flushSync:r.flushSync,viewTransition:r.viewTransition})},[e,t,a])}(),g=function(e,{relative:t}={}){let{basename:a}=r.useContext(ke),n=r.useContext(Ee);U(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),i={...Ie(e||".",{relative:t})},s=Se();if(null==e){i.search=s.search;let e=new URLSearchParams(i.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let a=e.toString();i.search=a?`?${a}`:""}}return e&&"."!==e||!o.route.index||(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),"/"!==a&&(i.pathname="/"===i.pathname?a:he([a,i.pathname])),Y(i)}(l,{relative:u}),y="get"===s.toLowerCase()?"get":"post",v="string"==typeof l&&gt.test(l);return r.createElement("form",{ref:h,method:y,action:g,onSubmit:n?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,r=n?.getAttribute("formmethod")||s;m(n||e.currentTarget,{fetcherKey:t,method:r,navigate:a,replace:o,state:i,relative:u,preventScrollReset:d,viewTransition:p})},...f,"data-discover":v||"render"!==e?void 0:"true"})}).displayName="Form";var _t=0,xt=()=>`__${String(++_t)}__`;const bt=window.wp.components;var wt={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Tt=r.createContext&&r.createContext(wt),kt=["attr","size","title"];function Ct(){return Ct=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},Ct.apply(this,arguments)}function Et(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,n)}return a}function jt(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?Et(Object(a),!0).forEach(function(t){var n,r,o,i;n=e,r=t,o=a[t],i=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,"string");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r),(r="symbol"==typeof i?i:i+"")in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Et(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function Lt(e){return e&&e.map((e,t)=>r.createElement(e.tag,jt({key:t},e.attr),Lt(e.child)))}function St(e){return t=>r.createElement(Rt,Ct({attr:jt({},e.attr)},t),Lt(e.child))}function Rt(e){var t=t=>{var a,{attr:n,size:o,title:i}=e,s=function(e,t){if(null==e)return{};var a,n,r=function(e,t){if(null==e)return{};var a={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;a[n]=e[n]}return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)a=o[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}(e,kt),l=o||t.size||"1em";return t.className&&(a=t.className),e.className&&(a=(a?a+" ":"")+e.className),r.createElement("svg",Ct({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,s,{className:a,style:jt(jt({color:e.color||t.color},t.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),i&&r.createElement("title",null,i),e.children)};return void 0!==Tt?r.createElement(Tt.Consumer,null,e=>t(e)):t(wt)}function Pt(e){return St({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"},child:[]},{tag:"polyline",attr:{points:"15 3 21 3 21 9"},child:[]},{tag:"line",attr:{x1:"10",y1:"14",x2:"21",y2:"3"},child:[]}]})(e)}const Ot=(e=8)=>Math.random().toString(36).substring(2,e+2),Nt=window.wp.primitives,It=(0,r.createElement)(Nt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(Nt.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"}));function $t(e){return St({tag:"svg",attr:{viewBox:"0 0 32 32"},child:[{tag:"path",attr:{d:"M 18 5 L 18 7 L 23.5625 7 L 11.28125 19.28125 L 12.71875 20.71875 L 25 8.4375 L 25 14 L 27 14 L 27 5 Z M 5 9 L 5 27 L 23 27 L 23 14 L 21 16 L 21 25 L 7 25 L 7 11 L 16 11 L 18 9 Z"},child:[]}]})(e)}function Mt(e){return St({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 2v6"},child:[]},{tag:"path",attr:{d:"M15 2v6"},child:[]},{tag:"path",attr:{d:"M12 17v5"},child:[]},{tag:"path",attr:{d:"M5 8h14"},child:[]},{tag:"path",attr:{d:"M6 11V8h12v3a6 6 0 1 1-12 0Z"},child:[]}]})(e)}function zt(e){return St({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m20.38 8.57-1.23 1.85a8 8 0 0 1-.22 7.58H5.07A8 8 0 0 1 15.58 6.85l1.85-1.23A10 10 0 0 0 3.35 19a2 2 0 0 0 1.72 1h13.85a2 2 0 0 0 1.74-1 10 10 0 0 0-.27-10.44zm-9.79 6.84a2 2 0 0 0 2.83 0l5.66-8.49-8.49 5.66a2 2 0 0 0 0 2.83z"},child:[]}]})(e)}function Bt(e){return St({tag:"svg",attr:{viewBox:"0 0 15 15",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M5.49998 0.5C5.49998 0.223858 5.72383 0 5.99998 0H7.49998H8.99998C9.27612 0 9.49998 0.223858 9.49998 0.5C9.49998 0.776142 9.27612 1 8.99998 1H7.99998V2.11922C9.09832 2.20409 10.119 2.56622 10.992 3.13572C11.0116 3.10851 11.0336 3.08252 11.058 3.05806L12.058 2.05806C12.3021 1.81398 12.6978 1.81398 12.9419 2.05806C13.186 2.30214 13.186 2.69786 12.9419 2.94194L11.967 3.91682C13.1595 5.07925 13.9 6.70314 13.9 8.49998C13.9 12.0346 11.0346 14.9 7.49998 14.9C3.96535 14.9 1.09998 12.0346 1.09998 8.49998C1.09998 5.13361 3.69904 2.3743 6.99998 2.11922V1H5.99998C5.72383 1 5.49998 0.776142 5.49998 0.5ZM2.09998 8.49998C2.09998 5.51764 4.51764 3.09998 7.49998 3.09998C10.4823 3.09998 12.9 5.51764 12.9 8.49998C12.9 11.4823 10.4823 13.9 7.49998 13.9C4.51764 13.9 2.09998 11.4823 2.09998 8.49998ZM7.49998 8.49998V4.09998C5.06992 4.09998 3.09998 6.06992 3.09998 8.49998C3.09998 10.93 5.06992 12.9 7.49998 12.9C8.715 12.9 9.815 12.4075 10.6112 11.6112L7.49998 8.49998Z",fill:"currentColor"},child:[]}]})(e)}const Ft=window.ReactJSXRuntime,At={general:(0,Ft.jsx)(Bt,{}),preloading:(0,Ft.jsx)(zt,{}),addons:(0,Ft.jsx)(Mt,{}),settings:It,support:(0,Ft.jsx)($t,{})},Dt=(Object.freeze({SPEED:2,FOREGROUND_COLOR:"#b9b8b8"}),{id:Ot(),key:"addons",label:(0,D.__)("Addons","pageflash"),description:(0,D.__)("Explore and install addons to extend your website functionality.","pageflash"),plugins:[{id:Ot(),name:(0,D.__)("Contact Form 7","pageflash"),slug:"contact-form-7",author:(0,D.__)("Takayuki Miyoshi","pageflash"),description:(0,D.__)("A minimal and flexible plugin for creating contact forms easily.","pageflash"),badge:(0,D.__)("Free","pageflash"),logo:"https://ps.w.org/contact-form-7/assets/icon-256x256.png",link:"https://wordpress.org/plugins/contact-form-7/"},{id:Ot(),name:(0,D.__)("Site Kit by Google","pageflash"),slug:"google-site-kit",author:(0,D.__)("Google","pageflash"),description:(0,D.__)("The official plugin for Google services insights and site stats.","pageflash"),badge:(0,D.__)("Free","pageflash"),logo:"https://ps.w.org/google-site-kit/assets/icon-256x256.png",link:"https://wordpress.org/plugins/google-site-kit/"},{id:Ot(),name:(0,D.__)("WPForms Lite","pageflash"),slug:"wpforms-lite",author:(0,D.__)("WPForms","pageflash"),description:(0,D.__)("A beginner-friendly drag and drop builder for contact forms.","pageflash"),badge:(0,D.__)("Free","pageflash"),logo:"https://ps.w.org/wpforms-lite/assets/icon-256x256.png",link:"https://wordpress.org/plugins/wpforms-lite/"},{id:Ot(),name:(0,D.__)("Yoast SEO","pageflash"),slug:"wordpress-seo",author:(0,D.__)("Team Yoast","pageflash"),description:(0,D.__)("Boost your site ranking with smart SEO suggestions and tools.","pageflash"),badge:(0,D.__)("Free","pageflash"),logo:"https://ps.w.org/wordpress-seo/assets/icon-128x128.gif",link:"https://wordpress.org/plugins/wordpress-seo/"},{id:Ot(),name:(0,D.__)("Really Simple SSL","pageflash"),slug:"really-simple-ssl",author:(0,D.__)("Really Simple Plugins","pageflash"),description:(0,D.__)("Easily enable HTTPS and fix insecure content with one click.","pageflash"),badge:(0,D.__)("Free","pageflash"),logo:"https://ps.w.org/really-simple-ssl/assets/icon-256x256.png",link:"https://wordpress.org/plugins/really-simple-ssl/"},{id:Ot(),name:(0,D.__)("Wordfence Security","pageflash"),slug:"wordfence",author:(0,D.__)("Wordfence","pageflash"),description:(0,D.__)("Firewall and malware scanner for WordPress.","pageflash"),badge:(0,D.__)("Free","pageflash"),logo:"https://ps.w.org/wordfence/assets/icon-256x256.png",link:"https://wordpress.org/plugins/wordfence/"},{id:Ot(),name:(0,D.__)("LiteSpeed Cache","pageflash"),slug:"litespeed-cache",author:(0,D.__)("LiteSpeed Technologies","pageflash"),description:(0,D.__)("Speed up your site with all-in-one site acceleration plugin.","pageflash"),badge:(0,D.__)("Free","pageflash"),logo:"https://ps.w.org/litespeed-cache/assets/icon-256x256.png",link:"https://wordpress.org/plugins/litespeed-cache/"},{id:Ot(),name:(0,D.__)("MailPoet","pageflash"),slug:"mailpoet",author:(0,D.__)("MailPoet","pageflash"),description:(0,D.__)("Create and send email newsletters directly from WordPress dashboard.","pageflash"),badge:(0,D.__)("Free","pageflash"),logo:"https://ps.w.org/mailpoet/assets/icon-256x256.png",link:"https://wordpress.org/plugins/mailpoet/"}]}),Ht=()=>(0,Ft.jsx)(bt.__experimentalGrid,{columns:[1,2,4],gap:5,className:"pageflash-addons",children:Dt.plugins.map(e=>(0,Ft.jsx)(bt.Card,{children:(0,Ft.jsx)(bt.CardBody,{children:(0,Ft.jsxs)(bt.__experimentalVStack,{spacing:4,children:[(0,Ft.jsxs)(bt.__experimentalHStack,{children:[(0,Ft.jsx)(bt.CardBody,{style:{padding:"0px"},size:"XSmall",children:(0,Ft.jsx)("img",{className:"pageflash-addons__image",src:e.logo,alt:"Addon logo"})}),(0,Ft.jsx)("span",{className:"pageflash-addons__badge",children:e.badge})]}),(0,Ft.jsxs)(bt.__experimentalVStack,{children:[(0,Ft.jsx)(bt.__experimentalHeading,{level:4,weight:500,children:e.name}),(0,Ft.jsx)(bt.__experimentalText,{size:15,lineHeight:1.6,variant:"muted",children:e.description}),(0,Ft.jsx)("div",{className:"pageflash-addons__explore-link",children:(0,Ft.jsxs)("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",children:["Let's Explore",(0,Ft.jsx)(bt.Icon,{icon:Pt,size:16,style:{marginLeft:"4px"}})]})})]})]})})},e.id))}),Wt=({type:e="text",label:t,help:a,value:n,onChange:r,inputProps:o={},heading:i,description:s,titleSize:l=4,externalLink:c=!0})=>{let u;return u="textarea"===e?bt.TextareaControl:"input"===e?bt.__experimentalInputControl:bt.TextControl,(0,Ft.jsx)(bt.Card,{className:"pageflash-formfield",size:"large",children:(0,Ft.jsx)(bt.CardBody,{children:(0,Ft.jsxs)(bt.Flex,{gap:4,direction:"column",children:[i&&(0,Ft.jsxs)(bt.FlexItem,{children:[(0,Ft.jsxs)(bt.Flex,{direction:"row",gap:1,justify:"start",align:"center",children:[(0,Ft.jsx)(bt.__experimentalHeading,{level:l,children:i}),c&&(0,Ft.jsx)("a",{href:"#",target:"_blank",rel:"noreferrer",style:{textDecoration:"none"},children:(0,Ft.jsx)(bt.__experimentalText,{children:(0,Ft.jsx)($t,{size:22})})})]}),s&&(0,Ft.jsx)(bt.__experimentalText,{size:13,lineHeight:1.6,weight:400,style:{marginTop:"8px"},variant:"muted",children:s})]}),(0,Ft.jsx)(bt.FlexItem,{children:(0,Ft.jsx)(u,{label:t,help:a,value:n,onChange:r,...o})})]})})})},Ut=({heading:e,description:t,value:a,onChange:n,options:r,titleSize:o=4,externalLink:i=!0})=>(0,Ft.jsx)(bt.Card,{className:"pageflash-select",size:"large",children:(0,Ft.jsx)(bt.CardBody,{children:(0,Ft.jsxs)(bt.Flex,{gap:4,direction:"column",children:[(0,Ft.jsxs)(bt.FlexItem,{children:[(0,Ft.jsxs)(bt.Flex,{direction:"row",gap:1,justify:"start",align:"center",children:[(0,Ft.jsx)(bt.__experimentalHeading,{level:o,children:e}),i&&(0,Ft.jsx)("a",{href:"#",target:"_blank",rel:"noreferrer",style:{textDecoration:"none"},children:(0,Ft.jsx)(bt.__experimentalText,{children:(0,Ft.jsx)($t,{size:22})})})]}),t&&(0,Ft.jsx)(bt.__experimentalText,{size:13,lineHeight:1.6,weight:400,style:{marginTop:"8px"},variant:"muted",children:t})]}),(0,Ft.jsx)(bt.FlexItem,{children:(0,Ft.jsx)(bt.SelectControl,{size:"default",value:a,onChange:n,options:r,__nextHasNoMarginBottom:!0})})]})})}),Vt=({heading:e,description:t,checked:a,onToggle:n,children:r,externalLink:o=!0})=>(0,Ft.jsx)(Ft.Fragment,{children:(0,Ft.jsx)(bt.Card,{className:"pageflash-switch",size:"large",children:(0,Ft.jsxs)(bt.CardBody,{children:[(0,Ft.jsxs)(bt.Flex,{gap:2,children:[(0,Ft.jsxs)(bt.FlexItem,{children:[(0,Ft.jsxs)(bt.Flex,{direction:"row",gap:1,justify:"start",align:"center",children:[(0,Ft.jsx)(bt.__experimentalHeading,{level:4,children:e}),o&&(0,Ft.jsx)("a",{href:"#",target:"_blank",rel:"noreferrer",style:{textDecoration:"none"},children:(0,Ft.jsx)(bt.__experimentalText,{children:(0,Ft.jsx)($t,{size:22})})})]}),(0,Ft.jsx)(bt.__experimentalText,{size:14,lineHeight:1.6,weight:400,style:{maxWidth:"900px"},variant:"muted",children:t})]}),(0,Ft.jsx)(bt.FlexItem,{children:(0,Ft.jsx)(bt.ToggleControl,{__nextHasNoMarginBottom:!0,checked:a,onChange:n})})]}),r&&(0,Ft.jsx)("div",{style:{marginTop:"16px",marginLeft:"20px"},children:r})]})})}),Xt=window.wp.apiFetch;var Kt=e.n(Xt);const Yt="ACTIVE_MENU",Gt="SET_LANDMARKS",qt="UPDATE_LANDMARK",Jt=e=>({type:Yt,payload:e}),Zt=(0,n.createContext)(null),Qt=()=>{const e=(0,n.useContext)(Zt);if(!e)throw new Error("usePageflashContext must be used within a PageflashProvider");return e},ea=()=>{const{landmarks:e,dispatch:t}=Qt(),[a,r]=(0,n.useState)(!0),[o,i]=(0,n.useState)(null),s=(0,n.useCallback)(()=>{r(!0),i(null),Kt()({path:"/pageflash/v1/landmark",method:"GET"}).then(e=>{t((e=>({type:Gt,payload:e}))(e.data)),r(!1)}).catch(e=>{i(e.message||"Failed to fetch landmarks"),r(!1)})},[]);return(0,n.useEffect)(()=>{s()},[]),{landmarks:e,loading:a,error:o}},ta=()=>{const{dispatch:e}=Qt(),[t,a]=(0,n.useState)(!1),[r,o]=(0,n.useState)(null);return{updateLandmark:(t,n)=>(a(!0),o(null),Kt()({path:`/pageflash/v1/landmark/${t}`,method:"PUT",data:n}).then(n=>(n.data&&e(((e,t)=>({type:qt,payload:{slug:e,updates:t}}))(t,n.data)),a(!1),n)).catch(e=>{throw o(e.message||"Failed to update landmark"),a(!1),e})),loading:t,error:r}},aa=(e={})=>Object.entries(e).map(([e,t])=>({label:t,value:e})),na=({slug:e,inputKey:t,field:a})=>{var o,i,s;const{updateLandmark:l,loading:c}=ta(),[u,d]=(0,n.useState)(null!==(o=null!==(i=a.value)&&void 0!==i?i:a.default)&&void 0!==o?o:""),p=function(e,t){const[a,n]=(0,r.useState)(e);return(0,r.useEffect)(()=>{const a=setTimeout(()=>{n(e)},t);return()=>clearTimeout(a)},[e,t]),a}(u,1e3);(0,n.useEffect)(()=>{var n,r;"text"!==a.type&&"textarea"!==a.type&&"input"!==a.type||p===(null!==(n=null!==(r=a.value)&&void 0!==r?r:a.default)&&void 0!==n?n:"")||f(e,t,p)},[p]);const f=(e,t,a)=>{l(e,{input:{[t]:{value:a}}}).then(()=>{O.success("Setting updated!",{autoClose:1e3})}).catch(e=>{O.error("Failed to update setting",{autoClose:2e3})})};switch(a.type){case"select":return(0,Ft.jsx)(Ut,{titleSize:5,externalLink:!1,heading:a.label,description:a.description,value:null!==(s=a.value)&&void 0!==s?s:a.default,options:aa(a.options),onChange:a=>f(e,t,a)});case"text":return(0,Ft.jsx)(Wt,{type:"text",titleSize:5,externalLink:!1,heading:a.label,description:a.description,value:u,onChange:d});case"textarea":return(0,Ft.jsx)(Wt,{type:"textarea",titleSize:5,externalLink:!1,heading:a.label,description:a.description,value:u,onChange:d});case"input":return(0,Ft.jsx)(Wt,{type:"input",titleSize:5,externalLink:!1,heading:a.label,description:a.description,value:u,onChange:d});default:return null}},ra=({menuSlug:e})=>{const{landmarks:t,loading:a,error:r}=ea(),{updateLandmark:o,loading:i}=ta(),s=(0,n.useMemo)(()=>((e,t)=>{if(!e)return[];const a=Array.isArray(e)?e:Object.values(e);return t?a.filter(e=>e.menu===t):a})(t,e),[t,e]),l=(e,t)=>{o(t,{value:e}).then(()=>{O.success("Setting updated!",{autoClose:1e3})}).catch(e=>{O.error("Failed to update setting",{autoClose:2e3})})};return(0,Ft.jsx)(bt.__experimentalHStack,{alignment:"normal",direction:"column",spacing:5,className:`pageflash-body pageflash-${e}`,children:s.map(e=>"switch"===e.type?(0,Ft.jsx)(Vt,{heading:e.label,description:e.description,checked:e.active||!1,onToggle:t=>((e,t)=>{o(t,{active:e}).then(()=>{e?O.success("Settings enabled!",{autoClose:1e3}):O.info("Settings disabled.",{autoClose:1e3})}).catch(e=>{O.error("Failed to update setting",{autoClose:2e3})})})(t,e.slug),externalLink:!1,children:e.active&&e.input&&Object.entries(e.input).map(([t,a])=>(0,Ft.jsx)(na,{slug:e.slug,inputKey:t,field:a},t))},e.id):"select"===e.type?(0,Ft.jsx)(Ut,{heading:e.label,description:e.description,value:e.value||"",onChange:t=>l(t,e.slug),options:aa(e.options||[]),externalLink:!1},e.id):"input"===e.type||"text"===e.type||"textarea"===e.type?(0,Ft.jsx)(Wt,{type:e.type,heading:e.label,description:e.description,value:e.value||"",onChange:t=>l(t,e.slug),externalLink:!1},e.id):null)})},oa=window.wp.compose,ia=(0,r.createElement)(Nt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(Nt.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),sa=(0,r.createElement)(Nt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(Nt.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"}));function la(e){return St({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{fill:"#D9D9D9",d:"M261.7 621.4c-9.4 14.6-17 30.3-22.5 46.6H324V558.7c-24.8 16.2-46 37.5-62.3 62.7zM700 558.7V668h84.8c-5.5-16.3-13.1-32-22.5-46.6a211.6 211.6 0 0 0-62.3-62.7zm-64-239.9l-124-147-124 147V668h248V318.8zM512 448a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z"},child:[]},{tag:"path",attr:{d:"M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 0 0-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0 0 43.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0 0 43.1-30.5 97.52 97.52 0 0 0 21.4-60.8c0-8.4-1.1-16.4-3.1-23.8L864 736zm-540-68h-84.8c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668zm64-184.9V318.8l124-147 124 147V668H388V483.1zm240.1 301.1c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5s-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 0 1-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM700 668V558.7a211.6 211.6 0 0 1 62.3 62.7c9.4 14.6 17 30.3 22.5 46.6H700z"},child:[]},{tag:"path",attr:{d:"M464 400a48 48 0 1 0 96 0 48 48 0 1 0-96 0z"},child:[]}]})(e)}const ca=({activeMenu:e,onButtonClick:t,menus:a=[]})=>{const n=Oe();return(0,Ft.jsx)(bt.__experimentalVStack,{className:"pageflash-header__menu-list",spacing:0,children:a.map(({slug:a,label:r,icon:o},i)=>(0,Ft.jsx)(bt.Button,{className:"pageflash-header__menu-button",variant:e===a?"primary":"secondary",icon:o,onClick:()=>{t(a),n(0===i?"/":`/${a}`)},children:r},a))})},ua=({children:e,menus:t=[]})=>{const{activeMenu:a,dispatch:n}=Qt(),o=Se(),i=(0,oa.useViewportMatch)("medium",">="),s=(0,oa.useViewportMatch)("medium","<"),[l,c]=(0,r.useState)(!1),u=e=>{n(Jt(e))};return(0,r.useEffect)(()=>{const e=o.pathname.replace("/","")||t[0]?.slug;e&&e!==a&&n(Jt(e))},[o,t,a]),(0,Ft.jsx)(Ft.Fragment,{children:(0,Ft.jsx)(bt.Card,{className:"pageflash-header",children:(0,Ft.jsxs)(bt.Flex,{expanded:!0,gap:0,align:"top",direction:["column","column","row"],children:[(0,Ft.jsx)(bt.CardBody,{style:{width:i?"280px":"100%"},className:"pageflash-header__menu",children:(0,Ft.jsxs)(bt.__experimentalVStack,{spacing:8,style:{marginTop:"15px"},children:[(0,Ft.jsxs)(bt.__experimentalHStack,{style:{marginLeft:"8px",marginBottom:i?"":"10px"},children:[(0,Ft.jsxs)(bt.Flex,{className:"pageflash-header__logo",justify:"left",children:[(0,Ft.jsx)(la,{size:40,color:"#1c1e24"}),(0,Ft.jsx)(bt.__experimentalHeading,{level:2,style:{marginRight:"10px"},children:(0,D.__)("PageFlash","pageflash")})]}),s&&(0,Ft.jsx)(bt.Button,{icon:l?ia:sa,onClick:()=>c(e=>!e),style:{marginRight:"8px",color:"#1c1e24"}})]}),i&&(0,Ft.jsx)(ca,{activeMenu:a,onButtonClick:u,menus:t})]})}),(0,Ft.jsxs)(bt.__experimentalZStack,{isReversed:!0,className:"pageflash-header__z-stack",children:[s&&l&&(0,Ft.jsx)(ca,{activeMenu:a,onButtonClick:u,menus:t}),(0,Ft.jsxs)(bt.CardBody,{className:"pageflash-header__card-body",children:[(0,Ft.jsxs)(bt.__experimentalHStack,{expanded:!1,className:"pageflash-header__h-stack",children:[(0,Ft.jsx)(bt.__experimentalHeading,{children:t.find(e=>e.slug===a)?.label||(d=a,"string"!=typeof d||0===d.length?d:d.charAt(0).toUpperCase()+d.slice(1))}),(0,Ft.jsx)(bt.Button,{variant:"primary",icon:(0,Ft.jsx)($t,{}),onClick:()=>O.success("Get feature coming soon!",{position:"top-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"light"}),children:(0,D.__)("Get Pro","pageflash")})]}),e]})]})]})})});var d},da=({menus:e})=>(0,Ft.jsx)(ua,{menus:e,children:(0,Ft.jsx)("main",{className:"pageflash-main-content",children:(0,Ft.jsx)(Ue,{})})}),pa=function(){return(0,Ft.jsxs)("div",{className:"pageflash-support",children:[(0,Ft.jsxs)(bt.Card,{children:[(0,Ft.jsx)(bt.CardHeader,{children:(0,Ft.jsx)("h2",{children:(0,D.__)("Documentation","pageflash")})}),(0,Ft.jsxs)(bt.CardBody,{children:[(0,Ft.jsx)("p",{children:(0,D.__)("Need help? Check out our in-depth documentation. Every feature has a step-by-step walkthrough.","pageflash")}),(0,Ft.jsx)(bt.Button,{variant:"secondary",icon:(0,Ft.jsx)($t,{}),iconPosition:"right",href:"#",rel:"noopener noreferrer",children:(0,D.__)("Documentation","pageflash")})]})]}),(0,Ft.jsxs)(bt.Card,{children:[(0,Ft.jsx)(bt.CardHeader,{children:(0,Ft.jsx)("h2",{children:(0,D.__)("Contact Us","pageflash")})}),(0,Ft.jsxs)(bt.CardBody,{children:[(0,Ft.jsx)("p",{children:(0,D.__)("If you have questions or problems, please send us a message. We'll get back to you as soon as possible.","pageflash")}),(0,Ft.jsx)(bt.Button,{variant:"secondary",icon:(0,Ft.jsx)($t,{}),iconPosition:"right",href:"#",rel:"noopener noreferrer",children:(0,D.__)("Contact Us","pageflash")})]})]}),(0,Ft.jsxs)(bt.Card,{children:[(0,Ft.jsx)(bt.CardHeader,{children:(0,Ft.jsx)("h2",{children:(0,D.__)("Frequently Asked Questions","pageflash")})}),(0,Ft.jsx)(bt.CardBody,{children:(0,Ft.jsxs)(bt.Flex,{gap:4,wrap:!0,children:[(0,Ft.jsx)(bt.FlexBlock,{children:(0,Ft.jsxs)("div",{className:"pageflash-support-faq-column",children:[(0,Ft.jsx)(bt.Button,{variant:"link",href:"#",rel:"noopener noreferrer",children:(0,D.__)("How do I license activate the plugin?","pageflash")}),(0,Ft.jsx)(bt.Button,{variant:"link",href:"#",rel:"noopener noreferrer",children:(0,D.__)("How do I update the plugin?","pageflash")}),(0,Ft.jsx)(bt.Button,{variant:"link",href:"#",rel:"noopener noreferrer",children:(0,D.__)("How do I upgrade my license?","pageflash")}),(0,Ft.jsx)(bt.Button,{variant:"link",href:"#",rel:"noopener noreferrer",children:(0,D.__)("Where can I view the changelog?","pageflash")}),(0,Ft.jsx)(bt.Button,{variant:"link",href:"#",rel:"noopener noreferrer",children:(0,D.__)("Where can I sign up for the affiliate program?","pageflash")})]})}),(0,Ft.jsx)(bt.FlexBlock,{children:(0,Ft.jsxs)("div",{className:"pageflash-support-faq-column",children:[(0,Ft.jsx)(bt.Button,{variant:"link",href:"#",rel:"noopener noreferrer",children:(0,D.__)("How do I disable scripts on a per post/page basis?","pageflash")}),(0,Ft.jsx)(bt.Button,{variant:"link",href:"#",rel:"noopener noreferrer",children:(0,D.__)("How do I delay JavaScript?","pageflash")}),(0,Ft.jsx)(bt.Button,{variant:"link",href:"#",rel:"noopener noreferrer",children:(0,D.__)("How do I remove unused CSS?","pageflash")}),(0,Ft.jsx)(bt.Button,{variant:"link",href:"#",rel:"noopener noreferrer",children:(0,D.__)("How do I lazy load images and videos?","pageflash")}),(0,Ft.jsx)(bt.Button,{variant:"link",href:"#",rel:"noopener noreferrer",children:(0,D.__)("How do I host Google Analytics locally?","pageflash")})]})})]})})]})]})},fa=(0,n.memo)(()=>(0,Ft.jsxs)("div",{className:"skeleton-wrapper",children:[(0,Ft.jsxs)("div",{className:"skeleton-header",children:[(0,Ft.jsxs)("div",{className:"skeleton-header-left",children:[(0,Ft.jsx)("span",{className:"logo"}),(0,Ft.jsx)("span",{className:"logo-name"})]}),(0,Ft.jsx)("div",{className:"skeleton-header-center"}),(0,Ft.jsx)("div",{className:"skeleton-header-right",children:" "})]}),(0,Ft.jsxs)("div",{className:"skeleton-main",children:[(0,Ft.jsx)("div",{className:"skeleton-sidebar",children:Array.from({length:8}).map((e,t)=>(0,Ft.jsx)("div",{className:"skeleton-sidebar-row"},t))}),(0,Ft.jsx)("div",{className:"skeleton-content",children:Array.from({length:8}).map((e,t)=>(0,Ft.jsxs)("div",{className:"skeleton-row",children:[(0,Ft.jsxs)("div",{className:"skeleton-row-left",children:[(0,Ft.jsx)("div",{className:"skeleton-row-title"}),(0,Ft.jsx)("div",{className:"skeleton-row-desc"})]}),(0,Ft.jsx)("div",{className:"skeleton-row-toggle"})]},t))})]})]})),ha=(0,n.memo)(({children:e})=>(0,Ft.jsxs)(Ft.Fragment,{children:[(0,Ft.jsx)(fa,{}),e]})),ma=({isLoading:e,dashboard:t})=>e?(0,Ft.jsx)(ha,{}):t,ga=function(){const{menus:e,loading:t}=(()=>{const{landmarks:e,loading:t}=ea();return{menus:(0,n.useMemo)(()=>{if(!e)return[];const t=e.data||e;if("object"!=typeof t)return[];const a=new Map;return Object.values(t).forEach(e=>{if(e?.menu)if(a.has(e.menu)){var t;const n=a.get(e.menu),r=null!==(t=e.menuOrder)&&void 0!==t?t:999;r<n.order&&a.set(e.menu,{slug:e.menu,order:r,label:e.menuLabel||e.menu,icon:At[e.menu]||n.icon})}else{var n;a.set(e.menu,{slug:e.menu,order:null!==(n=e.menuOrder)&&void 0!==n?n:999,label:e.menuLabel||e.menu,icon:At[e.menu]||null})}}),Array.from(a.values()).sort((e,t)=>e.order-t.order)},[e]),loading:t}})(),a=[{slug:"addons",order:100,label:(0,D.__)("Addons","pageflash"),icon:At.addons},{slug:"support",order:300,label:(0,D.__)("Support","pageflash"),icon:At.support}],r=((e=[],t=[])=>{const a=new Map;return e.forEach(e=>{a.set(e.slug,e)}),t.forEach(e=>{a.has(e.slug)?a.set(e.slug,{...a.get(e.slug),...e}):a.set(e.slug,{order:999,...e})}),Array.from(a.values()).sort((e,t)=>e.order-t.order)})(e,a);return(0,Ft.jsx)(ma,{isLoading:t||0===r.length,dashboard:(0,Ft.jsx)(mt,{children:(0,Ft.jsx)(Ke,{children:(0,Ft.jsx)(Ve,{element:(0,Ft.jsx)(da,{menus:r}),children:r.map((t,a)=>{if("addons"===t.slug)return(0,Ft.jsx)(Ve,{path:"addons",element:(0,Ft.jsx)(Ht,{})},t.slug);if("settings"===t.slug)return(0,Ft.jsx)(Ve,{path:"settings",element:(0,Ft.jsx)("h1",{children:"Settings"})},t.slug);if("support"===t.slug)return(0,Ft.jsx)(Ve,{path:"support",element:(0,Ft.jsx)(pa,{})},t.slug);const n=0===e.findIndex(e=>e.slug===t.slug);return(0,Ft.jsx)(Ve,{index:n,path:n?void 0:t.slug,element:(0,Ft.jsx)(ra,{menuSlug:t.slug})},t.slug)})})})})})},ya={activeMenu:"general",landmarks:{}},va=(e,t)=>{switch(t.type){case Yt:return{...e,activeMenu:t.payload};case Gt:return{...e,landmarks:t.payload};case qt:{const{slug:a,updates:n}=t.payload,r={...e.landmarks};return r[a]&&(r[a]={...r[a],...n}),{...e,landmarks:r}}default:return e}},_a=({children:e})=>{const[t,a]=(0,n.useReducer)(va,ya);return(0,Ft.jsx)(Zt.Provider,{value:{...t,dispatch:a},children:e})},xa=()=>(0,Ft.jsxs)(_a,{children:[(0,Ft.jsx)(A,{position:"top-right",className:"pageflash-toast-container",autoClose:2e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0,theme:"light"}),(0,Ft.jsx)(ga,{})]});a()(()=>{(()=>{const e=document.getElementById("pageflash-admin"),t=window?.pageflashAdmin?.isDevelopment,a=Boolean(t)?r.StrictMode:r.Fragment;e?(0,n.createRoot)(e).render((0,Ft.jsx)(a,{children:(0,Ft.jsx)(xa,{})})):console.error("Root element not found. Make sure #pageflash-admin exists in the DOM.")})()})})();
  • pageflash/trunk/build/quicklink/quicklink.asset.php

    r3295254 r3446147  
    1 <?php return array('dependencies' => array(), 'version' => '43cc382900d2313ead80');
     1<?php return array('dependencies' => array(), 'version' => 'eb584e458c2ba96551f2');
  • pageflash/trunk/build/quicklink/quicklink.js

    r3295254 r3446147  
    1 (()=>{var r={6:()=>{function r(r){return"string"==typeof r&&Number(r)>0?Number(r):1/0}function t(r){return"string"==typeof r&&""!==r}window.addEventListener("load",(()=>{const e=window.pageflashSettings||{},n=function(e){return{el:(s=e.el,"string"==typeof s&&""!==s.trim()?document.querySelector(s):null),timeout:(u=e.timeout,"string"==typeof u?Number(u):2e3),limit:r(e.limit),throttle:r(e.throttle),timeoutFn:(o=e.timeoutFn,"string"==typeof o&&"function"==typeof window[o]?(...r)=>window[o](...r):null),priority:t(e.priority),origins:(i=e.origins,Array.isArray(i)&&i.length>0?i:[]),ignores:(n=e.ignores,Array.isArray(n)&&n.length>0?n.map((r=>new RegExp(r))):[])};var n,i,o,u,s}(e);window.quicklink.listen(n),function(r){Array.isArray(r.urls)&&r.urls.length>0&&window.quicklink.prefetch(r.urls)}(e)}))}},t={};function e(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return r[n](o,o.exports,e),o.exports}e.n=r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return e.d(t,{a:t}),t},e.d=(r,t)=>{for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},e.o=(r,t)=>Object.prototype.hasOwnProperty.call(r,t),(()=>{"use strict";e(6)})()})();
     1(()=>{var r={6:()=>{function r(r){return"string"==typeof r&&Number(r)>0?Number(r):1/0}function t(r){return"string"==typeof r&&""!==r}window.addEventListener("load",()=>{const e=window.pageflashSettings||{},n=function(e){return{el:(s=e.el,"string"==typeof s&&""!==s.trim()?document.querySelector(s):null),timeout:(u=e.timeout,"string"==typeof u?Number(u):2e3),limit:r(e.limit),throttle:r(e.throttle),timeoutFn:(o=e.timeoutFn,"string"==typeof o&&"function"==typeof window[o]?(...r)=>window[o](...r):null),priority:t(e.priority),origins:(i=e.origins,Array.isArray(i)&&i.length>0?i:[]),ignores:(n=e.ignores,Array.isArray(n)&&n.length>0?n.map(r=>new RegExp(r)):[])};var n,i,o,u,s}(e);window.quicklink.listen(n),function(r){Array.isArray(r.urls)&&r.urls.length>0&&window.quicklink.prefetch(r.urls)}(e)})}},t={};function e(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return r[n](o,o.exports,e),o.exports}e.n=r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return e.d(t,{a:t}),t},e.d=(r,t)=>{for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},e.o=(r,t)=>Object.prototype.hasOwnProperty.call(r,t),(()=>{"use strict";e(6)})()})();
  • pageflash/trunk/includes/Admin/ActionLinks.php

    r3295254 r3446147  
    11<?php
    22
    3 namespace PageFlash\Admin;
     3namespace TheAminul\PageFlash\Admin;
    44
    55if ( ! defined( 'ABSPATH' ) ) {
     
    7070
    7171            $row_meta = array(
    72                 'docs' => '<a href="https://github.com/theaminuldev/pageflash" aria-label="' . esc_attr( esc_html__( 'View PageFlash Documentation', 'pageflash' ) ) . '" target="_blank">' . esc_html__( 'Docs & FAQs', 'pageflash' ) . '</a>',
    73                 // 'video' => '<a href="#" aria-label="' . esc_attr(esc_html__('View PageFlash Video Tutorials', 'pageflash')) . '" target="_blank">' . esc_html__('Video Tutorials', 'pageflash') . '</a>',
     72                'docs' => '<a href="https://github.com/theaminuldev/pageflash" aria-label="' . esc_attr__( 'View PageFlash Documentation', 'pageflash' ) . '" target="_blank" rel="noopener noreferrer">' . esc_html__( 'Docs & FAQs', 'pageflash' ) . '</a>',
     73                // 'video' => '<a href="#" aria-label="' . esc_attr__('View PageFlash Video Tutorials', 'pageflash') . '" target="_blank">' . esc_html__('Video Tutorials', 'pageflash') . '</a>',
    7474            );
    7575            $plugin_meta = array_merge( $plugin_meta, $row_meta );
  • pageflash/trunk/includes/Admin/Admin.php

    r3295254 r3446147  
    11<?php
    22
    3 namespace PageFlash\Admin;
     3namespace TheAminul\PageFlash\Admin;
    44
    55if ( ! defined( 'ABSPATH' ) ) {
     
    2020     * Constructor for the Admin class.
    2121     *
    22      * Initializes the settings API and adds necessary actions.
     22     * Initializes the settings adds necessary actions.
    2323     *
    2424     * @since PageFlash 1.0.0
     
    4040    private function init_admin() {
    4141        new ActionLinks();
     42        new AdminMenu();
    4243    }
    4344}
  • pageflash/trunk/includes/AssetsManager/AssetsManager.php

    r3295254 r3446147  
    11<?php
    22
    3 namespace PageFlash\AssetsManager;
     3namespace TheAminul\PageFlash\AssetsManager;
    44
    55if ( ! defined( 'ABSPATH' ) ) {
     
    1919    public function __construct() {
    2020        // Constructor code
    21         // Define asset loading and registration here
    22         add_action( 'wp_default_scripts', array( $this, 'pageflash_wp_default_scripts' ) );
    23         add_action( 'wp_enqueue_scripts', array( $this, 'pageflash_frontend_assets' ) );
    2421        add_action( 'admin_enqueue_scripts', array( $this, 'pageflash_admin_enqueue_scripts' ) );
    25     }
    26 
    27     /**
    28      * Enqueue scripts for the PageFlash plugin frontend.
    29      *
    30      * This method enqueues scripts necessary for the PageFlash plugin's functionality.
    31      * Add quicklink to the default scripts to make it available earlier in the runtime.
    32      *
    33      * @param WP_Scripts $scripts The WP_Scripts instance.
    34      * @return void
    35      * @since PageFlash 1.0.0
    36      */
    37     public function pageflash_wp_default_scripts( $scripts ) {
    38         // Define the version for Quicklink, falling back to a default version if not set
    39         $quicklink_version = defined( 'PAGEFLASH_VERSION' ) && ! empty( PAGEFLASH_VERSION ) ? PAGEFLASH_VERSION : '2.3.0';
    40 
    41         // Include the asset file for script dependencies and version
    42         $script_asset = include PAGEFLASH_PATH . 'build/quicklink/quicklink.asset.php';
    43         $scripts->add(
    44             'pageflash-quicklink',
    45             PAGEFLASH_ASSETS_URL . 'libs/quicklink/dist/quicklink.umd.js',
    46             array(),
    47             $quicklink_version,
    48             true
    49         );
    50 
    51         if ( is_array( $script_asset ) && isset( $script_asset['dependencies'], $script_asset['version'] ) ) {
    52             $scripts->add(
    53                 'pageflash-frontend',
    54                 PAGEFLASH_URL . 'build/quicklink/quicklink.js',
    55                 $script_asset['dependencies'],
    56                 $script_asset['version'],
    57                 true
    58             );
    59         }
    60         return $scripts;
    61     }
    62 
    63     /**
    64      * Enqueue scripts and styles for the PageFlash plugin frontend.
    65      *
    66      * This method enqueues scripts and styles necessary for the PageFlash plugin's functionality.
    67      *
    68      * @return void
    69      * @since PageFlash 1.0.0
    70      */
    71     public function pageflash_frontend_assets() {
    72         wp_enqueue_script( 'pageflash-frontend' );
    73         wp_enqueue_script( 'pageflash-quicklink' );
     22        add_action( 'admin_init', array( $this, 'pageflash_admin_icon' ) );
    7423    }
    7524
     
    8231     * @since PageFlash 1.0.0
    8332     */
    84     public function pageflash_admin_enqueue_scripts() {
     33    public function pageflash_admin_enqueue_scripts( $admin_page ) {
     34        if ( 'toplevel_page_pageflash' !== $admin_page ) {
     35            return;
     36        }
     37        $asset_file = PAGEFLASH_PATH . 'build/admin/admin.asset.php';
     38        if ( ! file_exists( $asset_file ) ) {
     39            return;
     40        }
     41
     42        $script_asset = include $asset_file;
     43        // Enqueue admin style with dependencies and version from asset file
     44        wp_enqueue_style(
     45            'pageflash-admin',
     46            PAGEFLASH_BUILD_URL . 'admin/admin.css',
     47            array( 'wp-components' ),
     48            isset( $script_asset['version'] ) ? $script_asset['version'] : '1.0.0'
     49        );
     50        // Enqueue admin script with dependencies and version from asset file
     51        wp_enqueue_script(
     52            'pageflash-admin',
     53            PAGEFLASH_BUILD_URL . 'admin/admin.js',
     54            $script_asset['dependencies'],
     55            $script_asset['version'],
     56            array(
     57                'in_footer' => true,
     58            )
     59        );
     60
     61        wp_localize_script(
     62            'pageflash-admin',
     63            'pageflashAdmin',
     64            array(
     65                'isDevelopment' => PAGEFLASH_ENV === 'development' ? true : false,
     66                'ajax_url'      => admin_url( 'admin-ajax.php' ),
     67                'nonce'         => wp_create_nonce( 'pageflash_admin_nonce' ),
     68            )
     69        );
     70    }
     71    /**
     72     * Enqueue the PageFlash icon in the admin area.
     73     *
     74     * This method enqueues the icon for use in the admin area.
     75     *
     76     * @return void
     77     * @since PageFlash 1.0.0
     78     */
     79    public function pageflash_admin_icon() {
     80        wp_add_inline_style(
     81            'wp-admin',
     82            '#adminmenu #toplevel_page_pageflash div.wp-menu-image:before {
     83                content: "\e900";
     84                font-family: "pageflash";
     85                font-size: 22px;
     86                margin-top: 0;
     87            }
     88            '
     89        );
     90        // Icon style dependency
     91        wp_enqueue_style(
     92            'pageflash-icomoon',
     93            PAGEFLASH_ASSETS_URL . 'icomoon/style.css',
     94            array(),
     95            PAGEFLASH_VERSION
     96        );
    8597    }
    8698}
  • pageflash/trunk/includes/Landmark/Landmark.php

    r3295254 r3446147  
    1 <?
    2 // Silence is golden.
     1<?php
     2
     3namespace TheAminul\PageFlash\Landmark;
     4
     5use TheAminul\PageFlash\Landmark\NoReload\NoReload;
     6use TheAminul\PageFlash\Landmark\General\General;
    37
    48class Landmark {
     9
    510    /**
    6      * Initialize the Landmark.
     11     * Instance registry.
    712     *
    8      * This method initializes the Landmark for your PageFlash plugin.
     13     * @var array<string, object>
     14     */
     15    protected array $instances = array();
     16
     17    /**
     18     * Landmark constructor.
     19     *
     20     * @since PageFlash 1.3.0
     21     */
     22    public function __construct() {
     23        add_action( 'pageflash_init', array( $this, 'boot' ) );
     24        add_action( 'pageflash_init', array( $this, 'register_landmarks' ) );
     25        // $this->register_landmarks();
     26    }
     27
     28    /**
     29     * Plugin bootstrap.
     30     *
     31     * @since 1.3.0
     32     */
     33    public function boot(): void {
     34        $this->register_features();
     35        $this->init_managers();
     36    }
     37
     38    /**
     39     * Feature class list.
     40     *
     41     * @since 1.3.0
     42     * @return array<class-string>
     43     */
     44    protected function features(): array {
     45        return array(
     46            NoReload::class,
     47            General::class,
     48        );
     49    }
     50
     51    /**
     52     * Register all features.
     53     *
     54     * @since 1.3.0
     55     */
     56    protected function register_features(): void {
     57        foreach ( $this->features() as $feature ) {
     58            $feature::init_register();
     59        }
     60
     61        do_action( 'pageflash_register_features' );
     62    }
     63
     64    /**
     65     * Initialize feature managers.
     66     *
     67     * @since 1.3.0
     68     */
     69    protected function init_managers(): void {
     70        foreach ( $this->features() as $feature ) {
     71            $this->get_instance( $feature );
     72        }
     73
     74        do_action( 'pageflash_init_managers', $this );
     75    }
     76
     77    /**
     78     * Register landmark services.
    979     *
    1080     * @since PageFlash 1.0.0
    11      * @access public
    1281     */
    13     public function __construct() {
    14         // Register the Landmark
     82    public function register_landmarks(): void {
     83
     84        $this->get_instance( LandmarkList::class );
     85        $this->get_instance( LandmarkAPI::class );
    1586    }
    1687
     88    /**
     89     * Get or create an instance.
     90     *
     91     * @since 1.3.0
     92     * @param class-string $class
     93     * @return object
     94     */
     95    public function get_instance( string $class ): object {
     96        if ( isset( $this->instances[ $class ] ) ) {
     97            return $this->instances[ $class ];
     98        }
     99
     100        return $this->instances[ $class ] = new $class();
     101    }
    17102}
  • pageflash/trunk/includes/Landmark/LandmarkList.php

    r3295254 r3446147  
    1 <?
    2 // Silence is golden.
     1<?php
     2
     3namespace TheAminul\PageFlash\Landmark;
     4
     5if ( ! defined( 'ABSPATH' ) ) {
     6    exit; // Exit if accessed directly
     7}
     8
     9/**
     10 * PageFlash LandmarkList Class.
     11 *
     12 * Handles the registration and initialization of default landmarks for PageFlash.
     13 *
     14 * @package PageFlash
     15 * @since PageFlash 1.0.0
     16 */
     17class LandmarkList {
     18
     19    /**
     20     * Constructor for the LandmarkList class.
     21     *
     22     * Hooks into the admin_init action to register landmarks.
     23     *
     24     * @since PageFlash 1.0.0
     25     */
     26    public function __construct() {
     27        add_action( 'init', array( $this, 'pageflash_register_landmarks' ) );
     28    }
     29
     30    /**
     31     * Registers default landmarks into the WordPress options table.
     32     *
     33     * If the option already exists, it will update it only if needed.
     34     *
     35     * Menu Properties for Dynamic Header:
     36     * - 'menu'      => Menu slug (e.g., 'general', 'preloading')
     37     * - 'menuOrder' => Sort order (lower = earlier in menu, default 999)
     38     * - 'menuLabel' => Display label in header menu (optional, defaults to menu slug)
     39     * - 'menuIcon'  => Icon for menu button (JSX string, optional)
     40     *
     41     * @since PageFlash 1.0.0
     42     */
     43    public function pageflash_register_landmarks() {
     44        $defaults = array(
     45            'version' => '1.0.0',
     46            'author'  => 'PageFlash Team',
     47            'url'     => 'https://github.com/theaminuli/pageflash/',
     48            'message' => esc_html__( 'PageFlash Dashboard Data', 'pageflash' ),
     49            'data'    => array(
     50                'quicklink' => array(
     51                    'id'          => wp_unique_id( 'pf-' ),
     52                    'type'        => 'switch',
     53                    'label'       => esc_html__( 'Quicklink', 'pageflash' ),
     54                    'description' => esc_html__( "Quicklink, an active plugin, you'll experience a 50% increase in conversions and enjoy 4x faster page loading. Boost your website speed, increase user engagement", 'pageflash' ),
     55                    'active'      => true,
     56                    'slug'        => 'quicklink',
     57                    'menu'        => 'preloading',
     58                    'menuOrder'   => 2,
     59                    'menuLabel'   => esc_html__( 'Preloading', 'pageflash' ),
     60                    'package'     => 'free',
     61                ),
     62                'instantpage' => array(
     63                    'id'          => wp_unique_id( 'pf-' ),
     64                    'type'        => 'switch',
     65                    'label'       => esc_html__( 'InstantPage', 'pageflash' ),
     66                    'description' => esc_html__( 'InstantPage uses just-in-time preloading — it preloads a page right before a user clicks on it.', 'pageflash' ),
     67                    'active'      => false,
     68                    'slug'        => 'instantpage',
     69                    'menu'        => 'preloading',
     70                    'menuOrder'   => 2,
     71                    'menuLabel'   => esc_html__( 'Preloading', 'pageflash' ),
     72                    'package'     => 'free',
     73                ),
     74                'dashicons' => array(
     75                    'id'          => wp_unique_id( 'pf-' ),
     76                    'type'        => 'switch',
     77                    'label'       => esc_html__( 'Disable Dashicons', 'pageflash' ),
     78                    'description' => esc_html__( 'Disable Dashicons on the frontend for non-logged-in users to improve performance.', 'pageflash' ),
     79                    'active'      => true,
     80                    'slug'        => 'dashicons',
     81                    'menu'        => 'general',
     82                    'menuOrder'   => 1,
     83                    'menuLabel'   => esc_html__( 'General', 'pageflash' ),
     84                    'package'     => 'free',
     85                ),
     86                'embeds' => array(
     87                    'id'          => wp_unique_id( 'pf-' ),
     88                    'type'        => 'switch',
     89                    'label'       => esc_html__( 'Disable Embeds', 'pageflash' ),
     90                    'description' => esc_html__( 'Disable the WordPress oEmbed feature to reduce unnecessary HTTP requests and improve page load times.', 'pageflash' ),
     91                    'active'      => false,
     92                    'slug'        => 'embeds',
     93                    'menu'        => 'general',
     94                    'menuOrder'   => 1,
     95                    'menuLabel'   => esc_html__( 'General', 'pageflash' ),
     96                    'package'     => 'free',
     97                ),
     98                'emojis' => array(
     99                    'id'          => wp_unique_id( 'pf-' ),
     100                    'type'        => 'switch',
     101                    'label'       => esc_html__( 'Disable Emojis', 'pageflash' ),
     102                    'description' => esc_html__( 'Disable the built-in WordPress emoji scripts and styles to reduce page size and improve load times.', 'pageflash' ),
     103                    'active'      => false,
     104                    'slug'        => 'emojis',
     105                    'menu'        => 'general',
     106                    'menuOrder'   => 1,
     107                    'menuLabel'   => esc_html__( 'General', 'pageflash' ),
     108                    'package'     => 'free',
     109                ),
     110
     111                'heartbeat' => array(
     112                    'id'          => wp_unique_id( 'pf-' ),
     113                    'type'        => 'switch',
     114                    'label'       => esc_html__( 'Disable Heartbeat', 'pageflash' ),
     115                    'description' => esc_html__( 'Disable WordPress Heartbeat everywhere or in certain areas (used for auto saving and revision tracking).', 'pageflash' ),
     116                    'active'      => false,
     117                    'slug'        => 'heartbeat',
     118                    'menu'        => 'general',
     119                    'menuOrder'   => 1,
     120                    'menuLabel'   => esc_html__( 'General', 'pageflash' ),
     121                    'package'     => 'free',
     122                    'input'       => array(
     123                        'behavior' => array(
     124                            'child_id'    => wp_unique_id( 'pf-' ),
     125                            'type'        => 'select',
     126                            'label'       => esc_html__( 'Behavior', 'pageflash' ),
     127                            'description' => esc_html__( 'Choose where to disable the Heartbeat API.', 'pageflash' ),
     128                            'slug'        => 'behavior',
     129                            'value'       => 'disable_everywhere',
     130                            'default'     => 'disable_everywhere',
     131                            'options'     => array(
     132                                'default'            => esc_html__( 'Default Behavior', 'pageflash' ),
     133                                'disable_everywhere' => esc_html__( 'Disable Everywhere', 'pageflash' ),
     134                                'allow_posts'        => esc_html__( 'Only Allow When Editing Posts/Pages', 'pageflash' ),
     135                                'disable_dashboard'  => esc_html__( 'Disable on admin Dashboard Only', 'pageflash' ),
     136                            ),
     137                        ),
     138                        'frequency' => array(
     139                            'child_id'    => wp_unique_id( 'pf-' ),
     140                            'type'        => 'select',
     141                            'label'       => esc_html__( 'Frequency', 'pageflash' ),
     142                            'description' => esc_html__( 'Controls how often the WordPress Heartbeat API is allowed to run.', 'pageflash' ),
     143                            'slug'        => 'frequency',
     144                            'value'       => 60,
     145                            'default'     => 60,
     146                            'options'     => array(
     147                                15  => esc_html__( '15 Seconds', 'pageflash' ),
     148                                30  => esc_html__( '30 Seconds', 'pageflash' ),
     149                                45  => esc_html__( '45 Seconds', 'pageflash' ),
     150                                60  => esc_html__( '60 Seconds', 'pageflash' ),
     151                                120 => esc_html__( '120 Seconds', 'pageflash' ),
     152                                300 => esc_html__( '300 Seconds', 'pageflash' ),
     153                            ),
     154                        ),
     155                    ),
     156                ),
     157                'rest_api' => array(
     158                    'id'          => wp_unique_id( 'pf-' ),
     159                    'type'        => 'select',
     160                    'label'       => esc_html__( 'Disable REST API', 'pageflash' ),
     161                    'description' => esc_html__( 'Disable the WordPress REST API for non-authenticated users to enhance security and reduce unnecessary requests.', 'pageflash' ),
     162                    'value'       => '',
     163                    'default'     => '',
     164                    'options'     => array(
     165                        ''                         => esc_html__( 'Default Behavior (Enabled)', 'pageflash' ),
     166                        'disabled'                 => esc_html__( 'Disable for Non-Authenticated Users', 'pageflash' ),
     167                        'disabled_when_logged_out' => esc_html__( 'Disable When Logged Out.', 'pageflash' ),
     168                    ),
     169                    'slug'        => 'rest_api',
     170                    'menu'        => 'general',
     171                    'menuOrder'   => 1,
     172                    'menuLabel'   => esc_html__( 'General', 'pageflash' ),
     173                    'package'     => 'free',
     174                ),
     175                'rest_api_link' => array(
     176                    'id'          => wp_unique_id( 'pf-' ),
     177                    'type'        => 'switch',
     178                    'label'       => esc_html__( 'Remove REST API Link', 'pageflash' ),
     179                    'description' => esc_html__( 'Removes REST API link tag from the front end and the REST API header link from page requests.', 'pageflash' ),
     180                    'active'      => false,
     181                    'slug'        => 'rest_api_link',
     182                    'menu'        => 'general',
     183                    'menuOrder'   => 1,
     184                    'menuLabel'   => esc_html__( 'General', 'pageflash' ),
     185                    'package'     => 'free',
     186                ),
     187                'wp_version' => array(
     188                    'id'          => wp_unique_id( 'pf-' ),
     189                    'type'        => 'switch',
     190                    'label'       => esc_html__( 'Hide WordPress Version', 'pageflash' ),
     191                    'description' => esc_html__( 'Hide the WordPress version number from the site header, Meta tag and RSS feeds to improve security.', 'pageflash' ),
     192                    'active'      => true,
     193                    'slug'        => 'wp_version',
     194                    'menu'        => 'general',
     195                    'menuOrder'   => 1,
     196                    'menuLabel'   => esc_html__( 'General', 'pageflash' ),
     197                    'package'     => 'free',
     198                ),
     199                'xmlrpc' => array(
     200                    'id'          => wp_unique_id( 'pf-' ),
     201                    'type'        => 'switch',
     202                    'label'       => esc_html__( 'Disable XML-RPC', 'pageflash' ),
     203                    'description' => esc_html__( 'Disable the XML-RPC feature to enhance security and reduce unnecessary requests.', 'pageflash' ),
     204                    'active'      => true,
     205                    'slug'        => 'xmlrpc',
     206                    'menu'        => 'general',
     207                    'menuOrder'   => 1,
     208                    'menuLabel'   => esc_html__( 'General', 'pageflash' ),
     209                    'package'     => 'free',
     210                ),
     211                'jquery_migrate' => array(
     212                    'id'          => wp_unique_id( 'pf-' ),
     213                    'type'        => 'switch',
     214                    'label'       => esc_html__( 'Remove jQuery Migrate', 'pageflash' ),
     215                    'description' => esc_html__( 'Remove jQuery Migrate script to improve performance on the frontend (jquery-migrate.min.js).', 'pageflash' ),
     216                    'active'      => false,
     217                    'slug'        => 'jquery_migrate',
     218                    'menu'        => 'general',
     219                    'menuOrder'   => 1,
     220                    'menuLabel'   => esc_html__( 'General', 'pageflash' ),
     221                    'package'     => 'free',
     222                ),
     223            ),
     224        );
     225
     226        // Allow developers to filter and modify default landmarks.
     227        $landmarks = apply_filters( 'pageflash_landmarks', $defaults );
     228        $existing  = get_option( 'pageflash_landmarks' );
     229
     230        // If no existing data, add it.
     231        if ( false === $existing ) {
     232            add_option( 'pageflash_landmarks', $landmarks );
     233            return;
     234        }
     235
     236        // Recursively sync existing data with defaults.
     237        $sync_manager = new LandmarkSyncManager();
     238        $sync_manager->pageflash_sync_properties( $existing, $landmarks );
     239    }
     240}
  • pageflash/trunk/includes/Landmark/NoReload/NoReload.php

    r3295254 r3446147  
    11<?php
    22
    3 namespace PageFlash\Landmark\NoReload;
     3namespace TheAminul\PageFlash\Landmark\NoReload;
     4
     5use TheAminul\PageFlash\Landmark\BootManager;
     6use TheAminul\PageFlash\Landmark\Boot;
    47
    58if ( ! defined( 'ABSPATH' ) ) {
     
    811
    912/**
    10  * NoReload Class.
     13 * NoReload Boot Manager
    1114 *
    12  * This class provides functionality for something in your PageFlash plugin.
     15 * Manages preloading features (Quicklink, InstantPage, etc.)
    1316 *
    1417 * @package pageflash
    15  * @since PageFlash 1.0.0
     18 * @since PageFlash 1.3.0
    1619 */
    17 class NoReload {
    18 
    19     public function __construct() {
    20         // Constructor code
    21         add_filter( 'wp_pageflash_quicklink_ignore_urls', array( $this, 'pageflash_quicklink_ignore_urls' ) );
    22         add_filter( 'wp_pageflash_quicklink', array( $this, 'pageflash_quicklink' ) );
    23     }
     20class NoReload extends BootManager {
    2421
    2522    /**
    26      * Filters PageFlash NoReload ignore URLs.
     23     * Namespace for this manager
    2724     *
    28      * @since PageFlash 1.0.0
    29      * @access public
    30      * @param array  $ignores {
    31      *      Configuration options for PageFlash NoReload ignore URLs.
    32      *
    33      *     @param string $ignore_pattern Regular expression pattern to determine whether a URL is ignored.
    34      * }
     25     * @var string
    3526     */
    36     public function pageflash_quicklink_ignore_urls( $ignores ) {
    37         // $ignores[] = preg_quote( 'custom-ignore-pattern', '/' );
    38         return $ignores;
    39     }
     27    protected string $namespace = 'noreload';
    4028
    4129    /**
    42      * Filters PageFlash NoReload settings.
     30     * Register all NoReload features.
    4331     *
    44      * @since PageFlash 1.0.0
    45      * @access public
    46      * @param array {
    47      *     Configuration options for PageFlash NoReload.
     32     * This method is called from Landmark.php during initialization.
     33     * All features in the noreload namespace are registered here.
    4834     *
    49      *     @param string  $el CSS selector for the DOM element to observe for in-viewport links to prefetch.
    50      *     @param int     $limit The total requests that can be prefetched while observing the $el container.
    51      *     @param int     $throttle The concurrency limit for simultaneous requests while observing the $el container.
    52      *     @param int     $timeout Timeout after which prefetching will occur.
    53      *     @param string  $timeoutFn Custom timeout function. Must refer to a named global function in JS.
    54      *     @param bool    $priority Attempt higher priority fetch (low or high). Default false.
    55      *     @param string  $origins Allowed origins to prefetch (empty allows all). Defaults to host for the current home URL.
    56      *     @param string  $ignores Regular expression patterns to determine whether a URL is ignored. Runs after origin checks.
    57      *  }
     35     * @since 1.3.0
     36     * @return void
    5837     */
    59     public function pageflash_quicklink( $settings ) {
    60         // $settings['timeout'] = 3000; // Change the timeout to 3000ms
    61         // $settings['priority'] = true; // Enable fetch() API where supported
    62         return $settings;
     38    public static function init_register() {
     39        Boot::register(
     40            'quicklink',
     41            array(
     42                'class'     => Quicklink::class,
     43                'namespace' => 'noreload',
     44                'package'   => 'free',
     45                'priority'  => 10,
     46            )
     47        );
     48
     49        Boot::register(
     50            'instantpage',
     51            array(
     52                'class'     => InstantPage::class,
     53                'namespace' => 'noreload',
     54                'package'   => 'free',
     55                'priority'  => 10,
     56            )
     57        );
    6358    }
    6459}
  • pageflash/trunk/includes/Landmark/NoReload/Quicklink.php

    r3295254 r3446147  
    11<?php
    22
    3 namespace PageFlash\Landmark\NoReload;
     3namespace TheAminul\PageFlash\Landmark\NoReload;
    44
    55if ( ! defined( 'ABSPATH' ) ) {
     
    1919    public function __construct() {
    2020        // Constructor code
     21        add_action( 'wp_default_scripts', array( $this, 'pageflash_wp_default_scripts' ) );
     22        add_action( 'wp_enqueue_scripts', array( $this, 'pageflash_frontend_assets' ) );
    2123        add_filter( 'script_loader_tag', array( $this, 'pageflash_async_script_loader' ), 10, 2 );
    2224        add_action( 'wp_enqueue_scripts', array( $this, 'pageflash_settings_config' ) );
     25    }
     26
     27    /**
     28     * Enqueue scripts for the PageFlash plugin frontend.
     29     *
     30     * This method enqueues scripts necessary for the PageFlash plugin's functionality.
     31     * Add quicklink to the default scripts to make it available earlier in the runtime.
     32     *
     33     * @param WP_Scripts $scripts The WP_Scripts instance.
     34     * @return void
     35     * @since PageFlash 1.0.0
     36     */
     37    public function pageflash_wp_default_scripts( $scripts ) {
     38        // Define the version for Quicklink, falling back to a default version if not set
     39        $quicklink_version = defined( 'PAGEFLASH_VERSION' ) && ! empty( PAGEFLASH_VERSION ) ? PAGEFLASH_VERSION : '2.3.0';
     40
     41        // Include the asset file for script dependencies and version
     42        $asset_file = PAGEFLASH_PATH . 'build/quicklink/quicklink.asset.php';
     43        if ( ! file_exists( $asset_file ) ) {
     44
     45            return $scripts;
     46        }
     47
     48        $script_asset = include $asset_file;
     49        $scripts->add(
     50            'pageflash-quicklink',
     51            PAGEFLASH_ASSETS_URL . 'libs/quicklink/dist/quicklink.umd.js',
     52            array(),
     53            $quicklink_version,
     54            true
     55        );
     56
     57        if ( is_array( $script_asset ) && isset( $script_asset['dependencies'], $script_asset['version'] ) ) {
     58            $scripts->add(
     59                'pageflash-frontend',
     60                PAGEFLASH_URL . 'build/quicklink/quicklink.js',
     61                $script_asset['dependencies'],
     62                $script_asset['version'],
     63                true
     64            );
     65        }
     66        return $scripts;
     67    }
     68
     69    /**
     70     * Enqueue scripts and styles for the PageFlash plugin frontend.
     71     *
     72     * This method enqueues scripts and styles necessary for the PageFlash plugin's functionality.
     73     *
     74     * @return void
     75     * @since PageFlash 1.0.0
     76     */
     77    public function pageflash_frontend_assets() {
     78        wp_enqueue_script( 'pageflash-frontend' );
     79        wp_enqueue_script( 'pageflash-quicklink' );
    2380    }
    2481
     
    45102        $current_request_uri = esc_url_raw( $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
    46103        $ignore_pattern      = $current_request_uri . '(#.*)?$/';
    47 
    48         $pageflash_settings = array(
     104        $pageflash_settings  = array(
    49105            'el'        => '', // CSS selector for in-viewport links to prefetch
    50106            'urls'      => array( site_url( '/' ) ), // Static array of URLs to prefetch.
     
    90146     */
    91147    public function pageflash_async_script_loader( $tag, $handle ) {
    92 
    93148        $async_handles = array( 'pageflash-quicklink', 'pageflash-frontend' );
    94149        if ( in_array( $handle, $async_handles ) && false === strpos( $tag, 'async' ) ) {
  • pageflash/trunk/pageflash.php

    r3295254 r3446147  
    1111 * Author:      theaminul
    1212 * Author URI:  https://theaminul.com
    13  * Version: 1.2.0
     13 * Version: 2.0.0
    1414 * Stable tag:  1.2.0
    1515 * Requires at least: 6.0
     
    1919 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
    2020 * Text Domain: pageflash
    21  * Description: PageFlash - Fast and Efficient Headless Browser WordPress Plugin. By using PageFlash, an active plugin, you'll experience a 50% increase in conversions and enjoy 4x faster page loading. ⚡️ Boost your website's speed, increase user engagement 💬, and supercharge your online presence 🚀. - NewEgg
    22  * Tags:        headless-browser, pageflash, prefetches, quicklink, quickload, performance, speed, fast, prefetch, seo preconnect, optimization
     21 * Description: Preload pages intelligently to boost site speed and enhance user experience by loading pages before users click, ensuring instant page transitions.
     22 * Tags:       preload, pageflash, prefetch, quicklink, performance, speed, fast, instant-navigation, page-speed, optimization.
    2323 */
    2424
     
    3636define( 'PAGEFLASH_ASSETS_PATH', PAGEFLASH_PATH . 'assets/' );
    3737define( 'PAGEFLASH_ASSETS_URL', PAGEFLASH_URL . 'assets/' );
     38define( 'PAGEFLASH_BUILD_PATH', PAGEFLASH_PATH . 'build/' );
     39define( 'PAGEFLASH_BUILD_URL', PAGEFLASH_URL . 'build/' );
    3840define( 'PAGEFLASH_ENV', WP_DEBUG ? 'development' : 'production' );
    3941
    40 add_action( 'plugins_loaded', 'pageflash_load_plugin_textdomain' );
     42add_action( 'plugins_loaded', 'pageflash_init' );
    4143
    4244if ( ! version_compare( PHP_VERSION, '7.0', '>=' ) ) {
     
    4951
    5052/**
    51  * Load PageFlash textdomain.
     53 * Initialize PageFlash plugin.
    5254 *
    53  * Load gettext translate for PageFlash text domain.
     55 * Loads the plugin text domain and triggers the `pageflash_init` lifecycle hook.
    5456 *
    55  * @since PageFlash 1.0.0
     57 * @function pageflash_init
    5658 *
    57  * @return void
     59 * @since 1.0.0
     60 *
     61 * @fires pageflash_init
    5862 */
    59 function pageflash_load_plugin_textdomain() {
    60     load_plugin_textdomain( 'pageflash' );
     63function pageflash_init() {
     64    load_plugin_textdomain(
     65        'pageflash',
     66        false,
     67        dirname( plugin_basename( __FILE__ ) ) . '/languages'
     68    );
     69
     70    do_action( 'pageflash_init' );
    6171}
    6272
  • pageflash/trunk/plugin.php

    r3295254 r3446147  
    11<?php
    22
    3 namespace PageFlash;
     3namespace TheAminul\PageFlash;
    44
    5 use PageFlash\AssetsManager\AssetsManager;
    6 use PageFlash\Admin\Admin;
    7 use PageFlash\Landmark\NoReload;
     5use TheAminul\PageFlash\AssetsManager\AssetsManager;
     6use TheAminul\PageFlash\Admin\Admin;
     7use TheAminul\PageFlash\Landmark;
     8use TheAminul\PageFlash\Compatibility\Compatibility;
    89
    910if ( ! defined( 'ABSPATH' ) ) {
     
    9495            // Initialize your admin-related Landmark here
    9596            new Admin();
     97
    9698        }
    9799    }
     
    108110     */
    109111    private function init_landmark() {
    110         new NoReload\Quicklink();
    111         new NoReload\NoReload();
     112        new Landmark\Landmark();
     113    }
     114
     115    /**
     116     * Initialize compatibility modules.
     117     *
     118     * This method initializes compatibility handlers for third-party plugins.
     119     *
     120     * @since PageFlash 1.2.0
     121     * @access private
     122     */
     123    private function init_compatibility() {
     124        new Compatibility();
    112125    }
    113126
     
    126139        $this->init_admin();
    127140        $this->init_landmark();
     141        $this->init_compatibility();
    128142    }
    129143
  • pageflash/trunk/readme.txt

    r3295254 r3446147  
    1 === PageFlash - Fast and Efficient Headless Browser WordPress Plugin ===
     1=== PageFlash - Fast Page Preloading, Performance Optimization & Secure Your WordPress Site ===
    22Contributors: theaminuldev
    3 Tags: headless browser, quicklink, performance, speculation rules
    4 Requires at least: 6.0
    5 Tested up to: 6.8.1
    6 Stable tag: 1.2.0
     3Tags: preload, page-speed, optimization, performance, pageflash, speed, fast, instant-navigation, prefetch, quicklink
     4Requires at least: 6.1
     5Tested up to: 6.9
     6Stable tag: 2.0.0
    77License: GPL-3.0
    88License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
    9 Copyright: © 2023 theaminul.com
     9Copyright: © 2026 theaminul.com
    1010
    11 By using PageFlash, an active plugin, you'll experience a 50% increase in conversions and enjoy 4x faster page loading. ⚡️ Boost your website's speed, increase user engagement 💬, and supercharge your online presence 🚀. - NewEgg
     11Preload pages intelligently to boost site speed and enhance user experience by loading pages before users click, ensuring instant page transitions.
    1212
    1313== Description ==
    14 PageFlash is a powerful headless browser WordPress plugin designed to provide you with a fast and efficient web browsing experience within your WordPress site. Say goodbye to page reloads and enjoy seamless navigation through web content with this plugin. Harness the speed and agility of PageFlash for your WordPress website.
     14PageFlash is a powerful WordPress plugin that preloads pages intelligently to boost site speed and enhance user experience. By loading pages before users click, PageFlash ensures instant page transitions, creating a seamless and lightning-fast browsing experience for your visitors.
    1515
    1616### Key Features:
    17 - **Lightning-Fast Browsing:** PageFlash lives up to its name, offering rapid page loading and navigation without the need for tedious page refreshes.
    18 - **Smooth Script Execution:** Execute scripts and interact with web pages in a fluid and continuous manner. With PageFlash, you'll experience uninterrupted script execution, ensuring your web applications run seamlessly.
    19 - **Prefetches:** PageFlash incorporates advanced prefetching technology to speed up your web browsing. It anticipates and loads pages in the background, reducing loading times and providing a smoother browsing experience.
    20 - **No More Reloads:** Say goodbye to unnecessary page reloads with PageFlash, and enjoy uninterrupted web exploration. PageFlash ensures a frustration-free web experience by eliminating the need for page reloads, providing you with a streamlined and seamless browsing experience.
     17
     18**Preloading:**
     19- **Quicklink:** Experience a 50% increase in conversions and enjoy 4x faster page loading. Boost your website speed and increase user engagement.
     20- **InstantPage:** Uses just-in-time preloading — preloads a page right before a user clicks on it.
     21
     22**Performance Optimization:**
     23- **Disable Dashicons:** Remove Dashicons on the frontend for non-logged-in users to improve performance.
     24- **Disable Embeds:** Disable the WordPress oEmbed feature to reduce unnecessary HTTP requests and improve page load times.
     25- **Disable Emojis:** Remove built-in WordPress emoji scripts and styles to reduce page size and improve load times.
     26- **Disable Heartbeat:** Control WordPress Heartbeat API everywhere or in certain areas (used for auto-saving and revision tracking) with customizable behavior and frequency settings.
     27- **Remove jQuery Migrate:** Remove jQuery Migrate script to improve performance on the frontend.
     28
     29**Security Enhancements:**
     30- **Disable REST API:** Disable the WordPress REST API for non-authenticated users to enhance security and reduce unnecessary requests.
     31- **Remove REST API Link:** Remove REST API link tag from the front end and the REST API header link from page requests.
     32- **Hide WordPress Version:** Hide the WordPress version number from the site header, meta tags, and RSS feeds to improve security.
     33- **Disable XML-RPC:** Disable the XML-RPC feature to enhance security and reduce unnecessary requests.
    2134
    2235For more information and documentation, visit our [plugin documentation](https://theaminul.com/pageflash/docs).
     
    5467
    5568== Frequently Asked Questions ==
     69= How do I configure PageFlash? =
    5670
    57 = How do I enable PageFlash for a specific post or page? =
    58 
    59 After activation, go to the post or page where you want to enable PageFlash's headless browsing features. In the editor, look for the PageFlash settings panel to configure your preferences.
     71After activation, navigate to the PageFlash settings page in your WordPress admin dashboard to enable and configure the features you want to use.
    6072
    6173= Where should I check the plugin's features? =
    62 
    6374- A. In Chrome's incognito mode.
    6475- B. After logging out of the admin account.
     
    6879
    6980= Is PageFlash compatible with the latest version of WordPress? =
    70 
    7181Yes, PageFlash is regularly tested and ensured to be compatible with the latest WordPress version.
    7282
    7383
    74 == Screenshots ==
    75 1. [Screenshot 1](https://github.com/theaminuldev/pageflash/src/images/screenshot.png): Describe the screenshot here.
    76 
    7784== Changelog ==
    7885
     86= 2.0.0 - 2026-01-24 =
     87* Added: InstantPage integration to enhance the Preloading module performance.
     88* Added: Introduced admin dashboard for better user experience.
     89* Added: Disabled frontend Dashicons for non-logged-in users.
     90* Added: Disabled WordPress oEmbed for improved page load performance.
     91* Added: Disabled WordPress emojis to improve load time.
     92* Added: Removed WordPress version info for better security.
     93* Added: Disabled jquery-migrate.min.js to improve performance.
     94* Added: Disabled XML-RPC to reduce unnecessary requests.
     95* Added: Disabled WordPress REST API for non-authenticated users.
     96* Added: Removed REST API link tag and header from the frontend.
     97* Added: Disabled WordPress Heartbeat globally or in selected areas.
     98
    7999= 1.2.0 - 2025-05-14 =
    80 * Chore: Add initial configuration files
     100* chore: Add initial configuration files
    81101* Improved: Update asset management
    82102* Improved: Update security policy and PHPCS configuration
     
    84104* Improved: WP coding standards and code quality ensure
    85105* Updated: Update GPL license to version 3.0
     106
    86107= 1.1.0 - 2024-12-20 =
    87108* Fixed: Security vulnerability reporting guidelines.
    88109* Added: Supply chain attack prevention.
     110
    89111= 1.0.1 - 2024-12-19 =
    90112* Fixed: Issue with `validateElement` function in `pageflash-frontend`.
    91113* Improved: Added validation for `timeoutFn` in `buildListenerOptions` function.
    92114* Added: Confusion Clear FAQ plugin for better understanding.
     115
    93116= 1.0.0 - 2024-12-18 =
    94117* Initial release.
Note: See TracChangeset for help on using the changeset viewer.