Plugin Directory

Changeset 3320410


Ignore:
Timestamp:
07/01/2025 08:18:14 AM (8 months ago)
Author:
intoxstudio
Message:

version 3.21.2

Location:
content-aware-sidebars/trunk
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • content-aware-sidebars/trunk/admin/sidebar-edit.php

    r3092858 r3320410  
    811811            case 'text':
    812812            default:
    813                 echo '<input style="width:200px;" type="text" name="' . $id . '" value="' . $current . '" />' . "\n";
     813                echo '<input style="width:200px;" type="text" name="' . $id . '" value="' . esc_attr($current) . '" />' . "\n";
    814814                break;
    815815        }
  • content-aware-sidebars/trunk/app.php

    r3229095 r3320410  
    1212{
    1313    const PLUGIN_VERSION_KEY = 'cas_db_version';
    14     const PLUGIN_VERSION = '3.21.1';
     14    const PLUGIN_VERSION = '3.21.2';
    1515
    1616    /**
  • content-aware-sidebars/trunk/assets/css/style.css

    r3092858 r3320410  
    44 * @license GPLv3
    55 * @copyright 2024 by Joachim Jensen
    6  */.cas-navbar{display:none;margin-left:-20px;padding:10px 20px;background:#1f4662;color:#d0dfe2;font-size:14px}.cas-navbar .cas-nav-link{margin:0 5px;padding:8px 10px;border-radius:5px;text-decoration:none;color:#d0dfe2;float:left}.cas-navbar .cas-nav-link:active,.cas-navbar .cas-nav-link:hover{background:rgba(255,255,255,.1);color:#fff}.cas-navbar .cas-nav-link.cas-nav-upgrade{color:#fff;font-weight:600;box-shadow:0 0 0 1px inset rgba(255,255,255,.15);background:linear-gradient(30deg,#f0b914 0,#6e47aa 100%) 100% 0;background-size:135% 54%}.cas-navbar .cas-nav-link.cas-nav-upgrade:hover{background-position:0 0;box-shadow:0 0 0 1px inset rgba(255,255,255,.3)}.cas-navbar .cas-nav-pro{color:#fff;background:linear-gradient(130deg,#26974e 20%,#0f81a4 100%);border-radius:10px;padding:3px 7px;font-size:.8em}.cas-navbar h2{color:inherit;display:inline-block;font-size:inherit;margin:0;vertical-align:middle}.cas-navbar img{border-radius:5px;vertical-align:middle}#cas-rules .cas-heart{color:#ac170a}body.js .js-cas-visibility{max-height:30px;overflow:hidden}.cas-section,.js-cas-action{display:none}.nav-tab-wrapper.js-cas-tabs .nav-tab{position:relative}.cas-nav-link,.nav-tab-wrapper a{transition-property:background-color,color;transition-duration:.2s}.nav-tab-active:focus{box-shadow:none}.cas-input-inline{display:inline-block}.cas-input-sm{max-width:80px;font-size:.8em;vertical-align:middle}.cas-metabox-holder .hndle{cursor:auto!important}#submitdiv .handlediv,#submitdiv .hndle,#submitdiv .postbox-header,.cas-metabox-holder .handle-actions,.cas-metabox-holder .handlediv{display:none!important}#submitdiv .cas-save{background:#f5f5f5;border-bottom:1px solid #ddd;overflow:hidden;padding:7px 10px}#submitdiv .cas-overview-actions{padding:0 10px}#submitdiv .cas-overview-actions .dashicons{color:#82878c}#submitdiv .cas-overview-actions>li{margin:0}#submitdiv .cas-overview-actions>li:not(:last-of-type){padding:0 0 10px;margin:0 0 10px;border-bottom:1px solid #eee}.cas-pro-label{font-size:.8em;background-color:#31c455;border-radius:5px;color:#fff;padding:2px 6px;text-transform:uppercase;vertical-align:baseline;white-space:nowrap;font-weight:700}.cas-schedule-slide.ui-slider{position:relative;margin:12px;border-radius:4px;background:#c5c5c5;color:#333}.cas-schedule-slide.ui-slider .ui-slider-handle{position:absolute;z-index:2;height:24px;width:24px;touch-action:none;text-align:center;border-radius:12px;transition:background .2s}.cas-schedule-slide.ui-slider .ui-slider-handle.ui-state-default{border:1px solid #c5c5c5;background:#fff;box-shadow:0 0 0 9px #fff inset,0 1px 2px rgba(0,0,0,.15)}.cas-schedule-slide.ui-slider .ui-slider-handle.ui-state-active{background:#7ad03a;border-color:#999}.cas-schedule-slide.ui-slider .ui-slider-handle.ui-state-focus:focus{outline:0}.cas-schedule-slide.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background:#7ad03a}.cas-schedule-slide.ui-slider.ui-state-disabled{opacity:.35;cursor:default!important;pointer-events:none}.cas-schedule-slide.ui-slider.ui-slider-horizontal{height:4px}.cas-schedule-slide.ui-slider.ui-slider-horizontal .ui-slider-handle{margin-left:-12px;top:-12px}.cas-schedule-slide.ui-slider.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.cas-schedule-slide.ui-slider.ui-slider-horizontal .ui-slider-range-min{left:0}.cas-schedule-slide.ui-slider.ui-slider-horizontal .ui-slider-range-max{right:0}#cas-account.postbox{background-color:#ddecf4;border-color:#9fcadf;box-shadow:0 0 0 2px rgba(255,255,255,.7) inset,0 1px 1px rgba(0,0,0,.04)}#cas-account h3{margin:0;display:inline-block!important;border:none}#cas-account a{text-decoration:none}.wp-list-table.fixed .column-handler,.wp-list-table.fixed .column-visibility{width:20%}.wp-list-table.fixed .column-status,.wp-list-table.fixed .column-widgets{width:80px}.wp-list-table.fixed .column-status .dashicons{color:#999}.wp-list-table.fixed .column-status .sidebar-status{display:inline-block;margin-right:6px}.sidebar-status{margin:2px 0 0;position:relative;width:28px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;box-sizing:border-box}.sidebar-status .sidebar-status-input{display:none}.sidebar-status .sidebar-status-label{display:block;overflow:hidden;cursor:pointer;height:16px;padding:0;line-height:16px;border-radius:16px;background-color:#dc3232;box-shadow:0 0 2px rgba(0,0,0,.2) inset;transition:background-color .2s ease-in}.sidebar-status .sidebar-status-label:before{content:"";display:block;width:12px;height:12px;margin:0;background:#fff;position:absolute;top:2px;bottom:0;right:14px;border-radius:16px;transition:right .2s ease-in;box-shadow:0 1px 2px rgba(0,0,0,.2)}.sidebar-status .sidebar-status-input:checked+.sidebar-status-label{background-color:#7ad03a}.sidebar-status .sidebar-status-input:checked+.sidebar-status-label:before{right:2px}.sidebar-status .sidebar-status-input.sidebar-status-future:not(:checked)+.sidebar-status-label{background-color:#ffb900}.sidebar-status .sidebar-status-input:disabled+.sidebar-status-label{cursor:auto}.widget-liquid-right .widgets-holder-wrap .sidebar-name h2,.widget-liquid-right .widgets-holder-wrap .sidebar-name h3{text-overflow:ellipsis}.widget-liquid-right .widgets-holder-wrap .cas-settings{border-top:1px solid #dfdfdf;border-bottom:1px solid #dfdfdf;background-color:#f7f7f7;margin-left:-8px;margin-right:-8px;margin-bottom:10px;overflow:hidden}.widget-liquid-right .widgets-holder-wrap .sidebar-status{float:right;margin:10px 10px 0}.widget-liquid-right .widgets-holder-wrap .cas-sidebar-link{display:inline-block;border-right:1px solid #dfdfdf;padding:8px 10px;color:#888;text-decoration:none;transition:.4s;box-shadow:none}.widget-liquid-right .widgets-holder-wrap .cas-sidebar-link:hover{background-color:#fff;color:#222}.widget-liquid-right .widgets-holder-wrap.closed .cas-settings{display:none}.widget-liquid-right .widgets-holder-wrap div[id^=ca-sidebar],.wp-block-widget-area .ca-sidebar{box-shadow:inset 0 4px #75d7ef}.cas-form-table{width:97%;margin:0 auto}.cas-form-table tr td:first-child{min-width:30%}.cas-form-table tr td{border-bottom:1px solid #eee}.cas-schedule-days{text-transform:uppercase;overflow:hidden;display:inline-block;border:1px solid #dfdfdf;margin:0;border-radius:3px}.cas-schedule-days li{float:left;margin:0}.cas-schedule-days input{display:none}.cas-schedule-days label{transition:background .2s;background:#0085ba;display:block;padding:8px 12px;color:#fff}.cas-schedule-days label:hover{background:#007aab}.cas-schedule-days input:checked+label{color:inherit;background:#f1f1f1}.cas-schedule-days input:checked+label:hover{background:#e9e9e9}.cas-filter-sidebar{max-width:calc(900px + 2%);margin:10px 0;vertical-align:middle}.cas-filter-sidebar .sidebars-toggle{margin:16px 0 0 10px;display:inline-block}.cas-filter-sidebar .sidebars-toggle a{outline:0;box-shadow:none}.cas-filter-sidebar .button{margin:10px 0}.cas-filter-sidebar input{float:right}input.cas-filter{margin:10px 0}.wp-header-end{visibility:visible;margin:14px -20px 0;clear:both}@media (min-width:783px){.cas-navbar{display:block}.cas-widget-manager:not(.widgets_access) #screen-meta{z-index:20}.cas-widget-manager:not(.widgets_access) .widget-liquid-left{position:absolute;top:50px}.cas-widget-manager:not(.widgets_access) .wrap .error,.cas-widget-manager:not(.widgets_access) .wrap .notice,.cas-widget-manager:not(.widgets_access) .wrap .postbox,.cas-widget-manager:not(.widgets_access) .wrap .updated,.cas-widget-manager:not(.widgets_access) .wrap h1{margin:0 0 0 calc(38% + 56px)}.cas-widget-manager:not(.widgets_access) .update-nag{margin-left:calc(38% + 50px)}.cas-widget-manager:not(.widgets_access) #available-widgets{z-index:1;position:fixed;top:32px;padding:0 10px;background:#fafafa;box-shadow:0 0 4px 0 rgba(0,0,0,.1);width:32%;border-color:#dfdfdf;border-style:solid;border-width:0 1px 1px 0;left:160px}.cas-widget-manager:not(.widgets_access) #available-widgets input.cas-filter{width:100%}.cas-widget-manager:not(.widgets_access) #available-widgets .widget{padding-bottom:10px}.cas-widget-manager:not(.widgets_access) #available-widgets #widget-list{border-top:1px solid #dfdfdf;padding:3px;margin:0 -10px;background:#fff}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed){min-height:600px;bottom:0;border-bottom-width:0}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name{position:static}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name .handlediv,.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name .sidebar-name-arrow{display:block;bottom:auto;right:10px}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name .toggle-indicator{display:block}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) #removing-widget{box-sizing:border-box;padding:10px 0 0;color:#c00;z-index:2;text-align:center;position:absolute;background-color:rgba(255,255,255,.6);border:4px dashed #c00;top:0;left:0;right:0;height:100%}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .description{display:none}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) #widget-list{position:fixed;top:120px;padding:12px 10px;overflow-y:auto;overflow-x:hidden;width:calc(32% - 1px);bottom:0}.cas-widget-manager:not(.widgets_access).folded #available-widgets{left:36px;width:37.5%}.cas-widget-manager:not(.widgets_access).folded #available-widgets:not(.closed) #widget-list{width:calc(37.5% - 1px)}.cas-widget-manager:not(.widgets_access).rtl .wrap .error,.cas-widget-manager:not(.widgets_access).rtl .wrap .notice,.cas-widget-manager:not(.widgets_access).rtl .wrap .postbox,.cas-widget-manager:not(.widgets_access).rtl .wrap .update-nag,.cas-widget-manager:not(.widgets_access).rtl .wrap .updated,.cas-widget-manager:not(.widgets_access).rtl .wrap h1{margin:0 calc(38% + 56px) 0 0}.cas-widget-manager:not(.widgets_access).rtl .update-nag{margin-right:calc(38% + 50px)}.cas-widget-manager:not(.widgets_access).rtl #available-widgets{box-shadow:0 0 5px 0 rgba(0,0,0,.1);right:160px;left:auto;border-width:0 0 1px 1px}.cas-widget-manager:not(.widgets_access).rtl #available-widgets:not(.closed) .sidebar-name .handlediv,.cas-widget-manager:not(.widgets_access).rtl #available-widgets:not(.closed) .sidebar-name .sidebar-name-arrow{left:10px;right:auto}.cas-widget-manager:not(.widgets_access).rtl.folded #available-widgets{left:auto;right:36px}.cas-widget-manager:not(.widgets_access) #widgets-right .widgets-sortables{z-index:2}.cas-widget-manager div.widget-liquid-right{padding:0;margin:0;width:58%;float:right;background:0 0}.cas-widget-manager div.widget-liquid-left{width:38%;margin:0;float:left;padding:0}.cas-widget-manager .fw-ext-sidebars-wrap-container{float:right}}@media (min-width:783px) and (max-width:960px){.cas-widget-manager.auto-fold:not(.widgets_access) #available-widgets{left:36px;width:36%}.cas-widget-manager.auto-fold:not(.widgets_access) #available-widgets:not(.closed) #widget-list{width:calc(36% - 1px)}.cas-widget-manager.auto-fold:not(.widgets_access).rtl #available-widgets{left:auto;right:36px}}@media (max-width:782px){input.cas-filter{width:100%}}@media (max-width:1249px){div#widgets-right .sidebars-column-1,div#widgets-right .sidebars-column-2{max-width:inherit}}@media (min-width:1250px){.cas-widget-manager:not(.widgets_access) #widgets-left #available-widgets .widget:nth-child(even){float:left;margin:0 0 0 2%}.cas-widget-manager:not(.widgets_access) #available-widgets{width:34.5%}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) #widget-list{width:calc(34.5% - 1px)}.cas-widget-manager:not(.widgets_access).rtl #widgets-left #available-widgets .widget{float:right;padding-left:2%}.cas-widget-manager:not(.widgets_access).rtl #widgets-left #available-widgets .widget:nth-child(odd){margin-right:-2%}}.widgets-php #wpcontent .wrap .cs-wrap{margin:0!important}#cs-title-options,.custom-sidebars-add-new,div[id^=ca-sidebar]+.cs-toolbar{display:none}
     6 */.cas-navbar{display:none;margin-left:-20px;padding:10px 20px;background:#1f4662;color:#d0dfe2;font-size:14px}.cas-navbar .cas-nav-link{margin:0 5px;padding:8px 10px;border-radius:5px;text-decoration:none;color:#d0dfe2;float:left}.cas-navbar .cas-nav-link:active,.cas-navbar .cas-nav-link:hover{background:rgba(255,255,255,.1);color:#fff}.cas-navbar .cas-nav-link.cas-nav-upgrade{color:#fff;font-weight:600;box-shadow:0 0 0 1px inset rgba(255,255,255,.15);background:linear-gradient(30deg,#f0b914 0,#6e47aa 100%) 100% 0;background-size:135% 54%}.cas-navbar .cas-nav-link.cas-nav-upgrade:hover{background-position:0 0;box-shadow:0 0 0 1px inset rgba(255,255,255,.3)}.cas-navbar .cas-nav-pro{color:#fff;background:linear-gradient(130deg,#26974e 20%,#0f81a4 100%);border-radius:10px;padding:3px 7px;font-size:.8em}.cas-navbar h2{color:inherit;display:inline-block;font-size:inherit;margin:0;vertical-align:middle}.cas-navbar img{border-radius:5px;vertical-align:middle}#cas-rules .cas-heart{color:#ac170a}body.js .js-cas-visibility{max-height:30px;overflow:hidden}.cas-section,.js-cas-action{display:none}.nav-tab-wrapper.js-cas-tabs .nav-tab{position:relative}.cas-nav-link,.nav-tab-wrapper a{transition-property:background-color,color;transition-duration:.2s}.nav-tab-active:focus{box-shadow:none}.cas-input-inline{display:inline-block}.cas-input-sm{max-width:80px;font-size:.8em;vertical-align:middle}.cas-metabox-holder .hndle{cursor:auto!important}#submitdiv .handlediv,#submitdiv .hndle,#submitdiv .postbox-header,.cas-metabox-holder .handle-actions,.cas-metabox-holder .handlediv{display:none!important}#submitdiv .cas-save{background:#f5f5f5;border-bottom:1px solid #ddd;overflow:hidden;padding:7px 10px}#submitdiv .cas-overview-actions{padding:0 10px}#submitdiv .cas-overview-actions .dashicons{color:#82878c}#submitdiv .cas-overview-actions>li{margin:0}#submitdiv .cas-overview-actions>li:not(:last-of-type){padding:0 0 10px;margin:0 0 10px;border-bottom:1px solid #eee}.cas-pro-label{font-size:.8em;background-color:#31c455;border-radius:5px;color:#fff;padding:2px 6px;text-transform:uppercase;vertical-align:baseline;white-space:nowrap;font-weight:700}.cas-schedule-slide.ui-slider{position:relative;margin:12px;border-radius:4px;background:#c5c5c5;color:#333}.cas-schedule-slide.ui-slider .ui-slider-handle{position:absolute;z-index:2;height:24px;width:24px;touch-action:none;text-align:center;border-radius:24px/2;transition:background .2s}.cas-schedule-slide.ui-slider .ui-slider-handle.ui-state-default{border:1px solid #c5c5c5;background:#fff;box-shadow:0 0 0 9px #fff inset,0 1px 2px rgba(0,0,0,.15)}.cas-schedule-slide.ui-slider .ui-slider-handle.ui-state-active{background:#7ad03a;border-color:#999}.cas-schedule-slide.ui-slider .ui-slider-handle.ui-state-focus:focus{outline:0}.cas-schedule-slide.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background:#7ad03a}.cas-schedule-slide.ui-slider.ui-state-disabled{opacity:.35;cursor:default!important;pointer-events:none}.cas-schedule-slide.ui-slider.ui-slider-horizontal{height:4px}.cas-schedule-slide.ui-slider.ui-slider-horizontal .ui-slider-handle{margin-left:-12px;top:-12px}.cas-schedule-slide.ui-slider.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.cas-schedule-slide.ui-slider.ui-slider-horizontal .ui-slider-range-min{left:0}.cas-schedule-slide.ui-slider.ui-slider-horizontal .ui-slider-range-max{right:0}#cas-account.postbox{background-color:#ddecf4;border-color:#9fcadf;box-shadow:0 0 0 2px rgba(255,255,255,.7) inset,0 1px 1px rgba(0,0,0,.04)}#cas-account h3{margin:0;display:inline-block!important;border:none}#cas-account a{text-decoration:none}.wp-list-table.fixed .column-handler,.wp-list-table.fixed .column-visibility{width:20%}.wp-list-table.fixed .column-status,.wp-list-table.fixed .column-widgets{width:80px}.wp-list-table.fixed .column-status .dashicons{color:#999}.wp-list-table.fixed .column-status .sidebar-status{display:inline-block;margin-right:6px}.sidebar-status{margin:2px 0 0;position:relative;width:28px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;box-sizing:border-box}.sidebar-status .sidebar-status-input{display:none}.sidebar-status .sidebar-status-label{display:block;overflow:hidden;cursor:pointer;height:16px;padding:0;line-height:16px;border-radius:16px;background-color:#dc3232;box-shadow:0 0 2px rgba(0,0,0,.2) inset;transition:background-color .2s ease-in}.sidebar-status .sidebar-status-label:before{content:"";display:block;width:12px;height:12px;margin:0;background:#fff;position:absolute;top:2px;bottom:0;right:14px;border-radius:16px;transition:right .2s ease-in;box-shadow:0 1px 2px rgba(0,0,0,.2)}.sidebar-status .sidebar-status-input:checked+.sidebar-status-label{background-color:#7ad03a}.sidebar-status .sidebar-status-input:checked+.sidebar-status-label:before{right:2px}.sidebar-status .sidebar-status-input.sidebar-status-future:not(:checked)+.sidebar-status-label{background-color:#ffb900}.sidebar-status .sidebar-status-input:disabled+.sidebar-status-label{cursor:auto}.widget-liquid-right .widgets-holder-wrap .sidebar-name h2,.widget-liquid-right .widgets-holder-wrap .sidebar-name h3{text-overflow:ellipsis}.widget-liquid-right .widgets-holder-wrap .cas-settings{border-top:1px solid #dfdfdf;border-bottom:1px solid #dfdfdf;background-color:#f7f7f7;margin-left:-8px;margin-right:-8px;margin-bottom:10px;overflow:hidden}.widget-liquid-right .widgets-holder-wrap .sidebar-status{float:right;margin:10px 10px 0}.widget-liquid-right .widgets-holder-wrap .cas-sidebar-link{display:inline-block;border-right:1px solid #dfdfdf;padding:8px 10px;color:#888;text-decoration:none;transition:.4s;box-shadow:none}.widget-liquid-right .widgets-holder-wrap .cas-sidebar-link:hover{background-color:#fff;color:#222}.widget-liquid-right .widgets-holder-wrap.closed .cas-settings{display:none}.widget-liquid-right .widgets-holder-wrap div[id^=ca-sidebar],.wp-block-widget-area .ca-sidebar{box-shadow:inset 0 4px #75d7ef}.cas-form-table{width:97%;margin:0 auto}.cas-form-table tr td:first-child{min-width:30%}.cas-form-table tr td{border-bottom:1px solid #eee}.cas-schedule-days{text-transform:uppercase;overflow:hidden;display:inline-block;border:1px solid #dfdfdf;margin:0;border-radius:3px}.cas-schedule-days li{float:left;margin:0}.cas-schedule-days input{display:none}.cas-schedule-days label{transition:background .2s;background:#0085ba;display:block;padding:8px 12px;color:#fff}.cas-schedule-days label:hover{background:#007aab}.cas-schedule-days input:checked+label{color:inherit;background:#f1f1f1}.cas-schedule-days input:checked+label:hover{background:#e9e9e9}.cas-filter-sidebar{max-width:calc(900px + 2%);margin:10px 0;vertical-align:middle}.cas-filter-sidebar .sidebars-toggle{margin:16px 0 0 10px;display:inline-block}.cas-filter-sidebar .sidebars-toggle a{outline:0;box-shadow:none}.cas-filter-sidebar .button{margin:10px 0}.cas-filter-sidebar input{float:right}input.cas-filter{margin:10px 0}.wp-header-end{visibility:visible;margin:14px -20px 0;clear:both}@media (min-width:783px){.cas-navbar{display:block}.cas-widget-manager:not(.widgets_access) #screen-meta{z-index:20}.cas-widget-manager:not(.widgets_access) .widget-liquid-left{position:absolute;top:50px}.cas-widget-manager:not(.widgets_access) .wrap .error,.cas-widget-manager:not(.widgets_access) .wrap .notice,.cas-widget-manager:not(.widgets_access) .wrap .postbox,.cas-widget-manager:not(.widgets_access) .wrap .updated,.cas-widget-manager:not(.widgets_access) .wrap h1{margin:0 0 0 calc(38% + 56px)}.cas-widget-manager:not(.widgets_access) .update-nag{margin-left:calc(38% + 50px)}.cas-widget-manager:not(.widgets_access) #available-widgets{z-index:1;position:fixed;top:32px;padding:0 10px;background:#fafafa;box-shadow:0 0 4px 0 rgba(0,0,0,.1);width:32%;border-color:#dfdfdf;border-style:solid;border-width:0 1px 1px 0;left:160px}.cas-widget-manager:not(.widgets_access) #available-widgets input.cas-filter{width:100%}.cas-widget-manager:not(.widgets_access) #available-widgets .widget{padding-bottom:10px}.cas-widget-manager:not(.widgets_access) #available-widgets #widget-list{border-top:1px solid #dfdfdf;padding:3px;margin:0 -10px;background:#fff}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed){min-height:600px;bottom:0;border-bottom-width:0}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name{position:static}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name .handlediv,.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name .sidebar-name-arrow{display:block;bottom:auto;right:10px}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name .toggle-indicator{display:block}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) #removing-widget{box-sizing:border-box;padding:10px 0 0;color:#c00;z-index:2;text-align:center;position:absolute;background-color:rgba(255,255,255,.6);border:4px dashed #c00;top:0;left:0;right:0;height:100%}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .description{display:none}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) #widget-list{position:fixed;top:120px;padding:12px 10px;overflow-y:auto;overflow-x:hidden;width:calc(32% - 1px);bottom:0}.cas-widget-manager:not(.widgets_access).folded #available-widgets{left:36px;width:37.5%}.cas-widget-manager:not(.widgets_access).folded #available-widgets:not(.closed) #widget-list{width:calc(37.5% - 1px)}.cas-widget-manager:not(.widgets_access).rtl .wrap .error,.cas-widget-manager:not(.widgets_access).rtl .wrap .notice,.cas-widget-manager:not(.widgets_access).rtl .wrap .postbox,.cas-widget-manager:not(.widgets_access).rtl .wrap .update-nag,.cas-widget-manager:not(.widgets_access).rtl .wrap .updated,.cas-widget-manager:not(.widgets_access).rtl .wrap h1{margin:0 calc(38% + 56px) 0 0}.cas-widget-manager:not(.widgets_access).rtl .update-nag{margin-right:calc(38% + 50px)}.cas-widget-manager:not(.widgets_access).rtl #available-widgets{box-shadow:0 0 5px 0 rgba(0,0,0,.1);right:160px;left:auto;border-width:0 0 1px 1px}.cas-widget-manager:not(.widgets_access).rtl #available-widgets:not(.closed) .sidebar-name .handlediv,.cas-widget-manager:not(.widgets_access).rtl #available-widgets:not(.closed) .sidebar-name .sidebar-name-arrow{left:10px;right:auto}.cas-widget-manager:not(.widgets_access).rtl.folded #available-widgets{left:auto;right:36px}.cas-widget-manager:not(.widgets_access) #widgets-right .widgets-sortables{z-index:2}.cas-widget-manager div.widget-liquid-right{padding:0;margin:0;width:58%;float:right;background:0 0}.cas-widget-manager div.widget-liquid-left{width:38%;margin:0;float:left;padding:0}.cas-widget-manager .fw-ext-sidebars-wrap-container{float:right}}@media (min-width:783px) and (max-width:960px){.cas-widget-manager.auto-fold:not(.widgets_access) #available-widgets{left:36px;width:36%}.cas-widget-manager.auto-fold:not(.widgets_access) #available-widgets:not(.closed) #widget-list{width:calc(36% - 1px)}.cas-widget-manager.auto-fold:not(.widgets_access).rtl #available-widgets{left:auto;right:36px}}@media (max-width:782px){input.cas-filter{width:100%}}@media (max-width:1249px){div#widgets-right .sidebars-column-1,div#widgets-right .sidebars-column-2{max-width:inherit}}@media (min-width:1250px){.cas-widget-manager:not(.widgets_access) #widgets-left #available-widgets .widget:nth-child(even){float:left;margin:0 0 0 2%}.cas-widget-manager:not(.widgets_access) #available-widgets{width:34.5%}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) #widget-list{width:calc(34.5% - 1px)}.cas-widget-manager:not(.widgets_access).rtl #widgets-left #available-widgets .widget{float:right;padding-left:2%}.cas-widget-manager:not(.widgets_access).rtl #widgets-left #available-widgets .widget:nth-child(odd){margin-right:-2%}}.widgets-php #wpcontent .wrap .cs-wrap{margin:0!important}#cs-title-options,.custom-sidebars-add-new,div[id^=ca-sidebar]+.cs-toolbar{display:none}
  • content-aware-sidebars/trunk/assets/js/cas_admin.min.js

    r3092858 r3320410  
    55 * @copyright 2024 by Joachim Jensen
    66 */
    7 !function($){"use strict";var e={current_section:0,sections:[],init:function(){this.tabController(),this.actionOptionHandler(),this.suggestVisibility(),this.suggestTarget(),this.initSidebarActivation(),$(".js-cas-color-field").wpColorPicker(),$(".js-cas-html").on("change",function(t){var e=$(this);$(e.data("target")).attr("disabled",!e.is(":checked"))}).trigger("change")},initSidebarActivation:function(){flatpickr.l10ns.default.weekdays=CASAdmin.weekdays,flatpickr.l10ns.default.months=CASAdmin.months,flatpickr.l10ns.default.firstDayOfWeek=CASAdmin.weekStart;var t=-1===CASAdmin.timeFormat.toLowerCase().indexOf("a"),i=flatpickr(".js-cas-activation",{wrap:!0,clickOpens:!0,enableTime:!0,time_24hr:t,allowInput:!0,enableSeconds:!0,onChange:function(t,e,n){(e||a.config.minDate)&&a.set("minDate",e?new Date(t):null),e?s.prop("checked",!1):s.is(":checked")||a.clear()}}),a=flatpickr(".js-cas-expiry",{wrap:!0,clickOpens:!0,enableTime:!0,time_24hr:t,allowInput:!0,enableSeconds:!0,onChange:function(t,e,n){(e||i.config.maxDate)&&i.set("maxDate",e?new Date(t):null)}}),s=$(".js-cas-status");s.on("change",function(t){$(this).is(":checked")?i.clear():i.selectedDates.length||a.clear()})},initTabSections:function(){$(".js-cas-tabs").find(".nav-tab").each(function(){var t=this.href.lastIndexOf("#");0<=t&&(t=this.href.substr(t),e.sections.push(t),$(t).hide())})},tabController:function(){this.initTabSections(),this.setCurrentSection(window.location.hash),$("#poststuff").on("click",".js-nav-link",function(t){e.setCurrentSection(this.href)})},findSectionByURL:function(t){t=this.sections.indexOf(t.substring(t.lastIndexOf("#")));return 0<=t?t:null},setCurrentSection:function(t){var e=this.findSectionByURL(t)||0,t=$(".js-cas-tabs").find(".nav-tab");t.eq(e).is(":visible")&&($(this.sections[this.current_section]).hide(),t.eq(this.current_section).removeClass("nav-tab-active"),this.current_section=e,t.eq(this.current_section).addClass("nav-tab-active"),$(this.sections[this.current_section]).show(),$("#_cas_section").val("#top"+this.sections[this.current_section]))},actionOptionHandler:function(){var t=$(".cas-metabox-holder"),e=t.find(".js-cas-action");t.on("change",".js-cas-handle",function(){var t=$(this),t=e.filter(".js-cas-action-"+t.val());e.not(t).hide().find("input,select").attr("disabled",!0),t.fadeIn("fast").find("input,select").attr("disabled",!1)}),t.find(".js-cas-handle").trigger("change")},suggestVisibility:function(){var e=$(".js-cas-visibility");e.select2({theme:"wpca",placeholder:CASAdmin.allVisibility,minimumInputLength:0,closeOnSelect:!0,allowClear:!1,nextSearchTerm:function(t,e){return e},data:CASAdmin.visibility}).on("select2:selecting",function(t){e.data("forceOpen",!0)}).on("select2:close",function(t){e.data("forceOpen")&&(t.preventDefault(),e.select2("open"),e.data("forceOpen",!1))}),e.data("value")&&e.val(e.data("value").toString().split(",")).trigger("change")},suggestTarget:function(){var e=$(".js-cas-host");e.select2({theme:"wpca",minimumInputLength:0,closeOnSelect:!0,allowClear:!1,width:"250px",nextSearchTerm:function(t,e){return e},data:CASAdmin.target}).on("select2:selecting",function(t){e.data("forceOpen",!0)}).on("select2:close",function(t){e.data("forceOpen")&&(t.preventDefault(),e.select2("open"),e.data("forceOpen",!1))}),e.data("value")&&e.val(e.data("value").toString().split(",")).trigger("change")}};$(document).ready(function(){e.init()})}(jQuery);
     7($=>{var e={current_section:0,sections:[],init:function(){this.tabController(),this.actionOptionHandler(),this.suggestVisibility(),this.suggestTarget(),this.initSidebarActivation(),$(".js-cas-color-field").wpColorPicker(),$(".js-cas-html").on("change",function(t){var e=$(this);$(e.data("target")).attr("disabled",!e.is(":checked"))}).trigger("change")},initSidebarActivation:function(){flatpickr.l10ns.default.weekdays=CASAdmin.weekdays,flatpickr.l10ns.default.months=CASAdmin.months,flatpickr.l10ns.default.firstDayOfWeek=CASAdmin.weekStart;var t=-1===CASAdmin.timeFormat.toLowerCase().indexOf("a"),i=flatpickr(".js-cas-activation",{wrap:!0,clickOpens:!0,enableTime:!0,time_24hr:t,allowInput:!0,enableSeconds:!0,onChange:function(t,e,n){(e||a.config.minDate)&&a.set("minDate",e?new Date(t):null),e?s.prop("checked",!1):s.is(":checked")||a.clear()}}),a=flatpickr(".js-cas-expiry",{wrap:!0,clickOpens:!0,enableTime:!0,time_24hr:t,allowInput:!0,enableSeconds:!0,onChange:function(t,e,n){(e||i.config.maxDate)&&i.set("maxDate",e?new Date(t):null)}}),s=$(".js-cas-status");s.on("change",function(t){$(this).is(":checked")?i.clear():i.selectedDates.length||a.clear()})},initTabSections:function(){$(".js-cas-tabs").find(".nav-tab").each(function(){var t=this.href.lastIndexOf("#");0<=t&&(t=this.href.substr(t),e.sections.push(t),$(t).hide())})},tabController:function(){this.initTabSections(),this.setCurrentSection(window.location.hash),$("#poststuff").on("click",".js-nav-link",function(t){e.setCurrentSection(this.href)})},findSectionByURL:function(t){t=this.sections.indexOf(t.substring(t.lastIndexOf("#")));return 0<=t?t:null},setCurrentSection:function(t){var t=this.findSectionByURL(t)||0,e=$(".js-cas-tabs").find(".nav-tab");e.eq(t).is(":visible")&&($(this.sections[this.current_section]).hide(),e.eq(this.current_section).removeClass("nav-tab-active"),this.current_section=t,e.eq(this.current_section).addClass("nav-tab-active"),$(this.sections[this.current_section]).show(),$("#_cas_section").val("#top"+this.sections[this.current_section]))},actionOptionHandler:function(){var t=$(".cas-metabox-holder"),e=t.find(".js-cas-action");t.on("change",".js-cas-handle",function(){var t=$(this),t=e.filter(".js-cas-action-"+t.val());e.not(t).hide().find("input,select").attr("disabled",!0),t.fadeIn("fast").find("input,select").attr("disabled",!1)}),t.find(".js-cas-handle").trigger("change")},suggestVisibility:function(){var e=$(".js-cas-visibility");e.select2({theme:"wpca",placeholder:CASAdmin.allVisibility,minimumInputLength:0,closeOnSelect:!0,allowClear:!1,nextSearchTerm:function(t,e){return e},data:CASAdmin.visibility}).on("select2:selecting",function(t){e.data("forceOpen",!0)}).on("select2:close",function(t){e.data("forceOpen")&&(t.preventDefault(),e.select2("open"),e.data("forceOpen",!1))}),e.data("value")&&e.val(e.data("value").toString().split(",")).trigger("change")},suggestTarget:function(){var e=$(".js-cas-host");e.select2({theme:"wpca",minimumInputLength:0,closeOnSelect:!0,allowClear:!1,width:"250px",nextSearchTerm:function(t,e){return e},data:CASAdmin.target}).on("select2:selecting",function(t){e.data("forceOpen",!0)}).on("select2:close",function(t){e.data("forceOpen")&&(t.preventDefault(),e.select2("open"),e.data("forceOpen",!1))}),e.data("value")&&e.val(e.data("value").toString().split(",")).trigger("change")}};$(document).ready(function(){e.init()})})(jQuery);
  • content-aware-sidebars/trunk/assets/js/flatpickr.min.js

    r2412242 r3320410  
    11/*! flatpickr v3.0.6, @license MIT */
    2 function FlatpickrInstance(e,t){function c(e){return e.bind(Z)}function s(e){Z.config.noCalendar&&!Z.selectedDates.length&&(Z.selectedDates=[Z.now]),function(e){e.preventDefault();var t="keydown"===e.type,n=(e.type,e.type,e.target);if(Z.amPM&&e.target===Z.amPM)return e.target.textContent=["AM","PM"]["AM"===e.target.textContent|0];var a=Number(n.min),i=Number(n.max),r=Number(n.step),o=parseInt(n.value,10),l=o+r*(e.delta||(t?38===e.which?1:-1:Math.max(-1,Math.min(1,e.wheelDelta||-e.deltaY))||0));void 0!==n.value&&2===n.value.length&&(t=n===Z.hourElement,e=n===Z.minuteElement,l<a?(l=i+l+!t+(t&&!Z.amPM),e&&h(null,-1,Z.hourElement)):i<l&&(l=n===Z.hourElement?l-i-!Z.amPM:a,e&&h(null,1,Z.hourElement)),Z.amPM&&t&&(1===r?l+o===23:Math.abs(l-o)>r)&&(Z.amPM.textContent="PM"===Z.amPM.textContent?"AM":"PM"),n.value=Z.pad(l))}(e),Z.selectedDates.length&&(!Z.minDateHasTime||"input"!==e.type||2<=e.target.value.length?(d(),B()):setTimeout(function(){d(),B()},1e3))}function d(){var e,t,n;Z.config.enableTime&&(e=(parseInt(Z.hourElement.value,10)||0)%(Z.amPM?12:24),t=(parseInt(Z.minuteElement.value,10)||0)%60,n=Z.config.enableSeconds?(parseInt(Z.secondElement.value,10)||0)%60:0,void 0!==Z.amPM&&(e=e%12+12*("PM"===Z.amPM.textContent)),Z.minDateHasTime&&0===V(Z.latestSelectedDateObj,Z.config.minDate)&&(e=Math.max(e,Z.config.minDate.getHours()))===Z.config.minDate.getHours()&&(t=Math.max(t,Z.config.minDate.getMinutes())),Z.maxDateHasTime&&0===V(Z.latestSelectedDateObj,Z.config.maxDate)&&(e=Math.min(e,Z.config.maxDate.getHours()))===Z.config.maxDate.getHours()&&(t=Math.min(t,Z.config.maxDate.getMinutes())),a(e,t,n))}function i(e){e=e||Z.latestSelectedDateObj;e&&a(e.getHours(),e.getMinutes(),e.getSeconds())}function a(e,t,n){Z.selectedDates.length&&Z.latestSelectedDateObj.setHours(e%24,t,n||0,0),Z.config.enableTime&&!Z.isMobile&&(Z.hourElement.value=Z.pad(Z.config.time_24hr?e:(12+e)%12+12*(e%12==0)),Z.minuteElement.value=Z.pad(t),Z.config.time_24hr||(Z.amPM.textContent=12<=e?"PM":"AM"),!0===Z.config.enableSeconds&&(Z.secondElement.value=Z.pad(n)))}function n(e){var t=e.target.value;e.delta&&(t=(parseInt(t)+e.delta).toString()),4!==t.length&&"Enter"!==e.key||(Z.currentYearElement.blur(),/[^\d]/.test(t)||N(t))}function r(t,n,a){return n instanceof Array?n.forEach(function(e){return r(t,e,a)}):t instanceof Array?t.forEach(function(e){return r(e,n,a)}):(t.addEventListener(n,a),void Z._handlers.push({element:t,event:n,handler:a}))}function o(t){return function(e){return 1===e.which&&t(e)}}function l(){if(Z._handlers=[],Z._animationLoop=[],Z.config.wrap&&["open","close","toggle","clear"].forEach(function(t){Array.prototype.forEach.call(Z.element.querySelectorAll("[data-"+t+"]"),function(e){return r(e,"mousedown",o(Z[t]))})}),Z.isMobile)return function(){var e=Z.config.enableTime?Z.config.noCalendar?"time":"datetime-local":"date";Z.mobileInput=U("input",Z.input.className+" flatpickr-mobile"),Z.mobileInput.step="any",Z.mobileInput.tabIndex=1,Z.mobileInput.type=e,Z.mobileInput.disabled=Z.input.disabled,Z.mobileInput.placeholder=Z.input.placeholder,Z.mobileFormatStr="datetime-local"==e?"Y-m-d\\TH:i:S":"date"==e?"Y-m-d":"H:i:S",Z.selectedDates.length&&(Z.mobileInput.defaultValue=Z.mobileInput.value=Z.formatDate(Z.selectedDates[0],Z.mobileFormatStr)),Z.config.minDate&&(Z.mobileInput.min=Z.formatDate(Z.config.minDate,"Y-m-d")),Z.config.maxDate&&(Z.mobileInput.max=Z.formatDate(Z.config.maxDate,"Y-m-d")),Z.input.type="hidden",Z.config.altInput&&(Z.altInput.type="hidden");try{Z.input.parentNode.insertBefore(Z.mobileInput,Z.input.nextSibling)}catch(e){}Z.mobileInput.addEventListener("change",function(e){Z.setDate(e.target.value,!1,Z.mobileFormatStr),j("Change"),j("Close")})}(),0;Z.debouncedResize=G(S,50),Z.triggerChange=function(){j("Change")},Z.debouncedChange=G(Z.triggerChange,300),"range"===Z.config.mode&&Z.daysContainer&&r(Z.daysContainer,"mouseover",function(e){return I(e.target)}),r(window.document.body,"keydown",T),Z.config.static||r(Z._input,"keydown",T),Z.config.inline||Z.config.static||r(window,"resize",Z.debouncedResize),void 0!==window.ontouchstart&&r(window.document,"touchstart",E),r(window.document,"mousedown",o(E)),r(Z._input,"blur",E),!0===Z.config.clickOpens&&(r(Z._input,"focus",Z.open),r(Z._input,"mousedown",o(Z.open))),Z.config.noCalendar||(Z.monthNav.addEventListener("wheel",function(e){return e.preventDefault()}),r(Z.monthNav,"wheel",G(J,10)),r(Z.monthNav,"mousedown",o(K)),r(Z.monthNav,["keyup","increment"],n),r(Z.daysContainer,"mousedown",o(A)),Z.config.animate&&(r(Z.daysContainer,["webkitAnimationEnd","animationend"],f),r(Z.monthNav,["webkitAnimationEnd","animationend"],m))),Z.config.enableTime&&(r(Z.timeContainer,["wheel","input","increment"],s),r(Z.timeContainer,"mousedown",o(p)),r(Z.timeContainer,["wheel","increment"],Z.debouncedChange),r(Z.timeContainer,"input",Z.triggerChange),r([Z.hourElement,Z.minuteElement],"focus",function(e){return e.target.select()}),void 0!==Z.secondElement&&r(Z.secondElement,"focus",function(){return Z.secondElement.select()}),void 0!==Z.amPM&&r(Z.amPM,"mousedown",o(function(e){s(e),Z.triggerChange(e)})))}function u(){for(var e=Z._animationLoop.length;e--;)Z._animationLoop[e](),Z._animationLoop.splice(e,1)}function f(e){if(1<Z.daysContainer.childNodes.length)switch(e.animationName){case"fpSlideLeft":Z.daysContainer.lastChild.classList.remove("slideLeftNew"),Z.daysContainer.removeChild(Z.daysContainer.firstChild),Z.days=Z.daysContainer.firstChild,u();break;case"fpSlideRight":Z.daysContainer.firstChild.classList.remove("slideRightNew"),Z.daysContainer.removeChild(Z.daysContainer.lastChild),Z.days=Z.daysContainer.firstChild,u()}}function m(e){switch(e.animationName){case"fpSlideLeftNew":case"fpSlideRightNew":Z.navigationCurrentMonth.classList.remove("slideLeftNew"),Z.navigationCurrentMonth.classList.remove("slideRightNew");for(var t=Z.navigationCurrentMonth;t.nextSibling&&/curr/.test(t.nextSibling.className);)Z.monthNav.removeChild(t.nextSibling);for(;t.previousSibling&&/curr/.test(t.previousSibling.className);)Z.monthNav.removeChild(t.previousSibling);Z.oldCurMonth=null}}function g(e){e=e?Z.parseDate(e):Z.latestSelectedDateObj||(Z.config.minDate>Z.now?Z.config.minDate:Z.config.maxDate&&Z.config.maxDate<Z.now?Z.config.maxDate:Z.now);try{Z.currentYear=e.getFullYear(),Z.currentMonth=e.getMonth()}catch(e){}Z.redraw()}function p(e){~e.target.className.indexOf("arrow")&&h(e,e.target.classList.contains("arrowUp")?1:-1)}function h(e,t,n){n=n||e.target.parentNode.childNodes[0],e=H("increment");e.delta=t,n.dispatchEvent(e)}function D(e){var t=U("div","numInputWrapper"),n=U("input","numInput "+e),a=U("span","arrowUp"),e=U("span","arrowDown");return n.type="text",n.pattern="\\d*",t.appendChild(n),t.appendChild(a),t.appendChild(e),t}function v(){var e=window.document.createDocumentFragment();Z.calendarContainer=U("div","flatpickr-calendar"),Z.calendarContainer.tabIndex=-1,Z.config.noCalendar||(e.appendChild(function(){var e=window.document.createDocumentFragment();Z.monthNav=U("div","flatpickr-month"),Z.prevMonthNav=U("span","flatpickr-prev-month"),Z.prevMonthNav.innerHTML=Z.config.prevArrow,Z.currentMonthElement=U("span","cur-month"),Z.currentMonthElement.title=Z.l10n.scrollTitle;var t=D("cur-year");return Z.currentYearElement=t.childNodes[0],Z.currentYearElement.title=Z.l10n.scrollTitle,Z.config.minDate&&(Z.currentYearElement.min=Z.config.minDate.getFullYear()),Z.config.maxDate&&(Z.currentYearElement.max=Z.config.maxDate.getFullYear(),Z.currentYearElement.disabled=Z.config.minDate&&Z.config.minDate.getFullYear()===Z.config.maxDate.getFullYear()),Z.nextMonthNav=U("span","flatpickr-next-month"),Z.nextMonthNav.innerHTML=Z.config.nextArrow,Z.navigationCurrentMonth=U("span","flatpickr-current-month"),Z.navigationCurrentMonth.appendChild(Z.currentMonthElement),Z.navigationCurrentMonth.appendChild(t),e.appendChild(Z.prevMonthNav),e.appendChild(Z.navigationCurrentMonth),e.appendChild(Z.nextMonthNav),Z.monthNav.appendChild(e),Object.defineProperty(Z,"_hidePrevMonthArrow",{get:function(){return this.__hidePrevMonthArrow},set:function(e){this.__hidePrevMonthArrow!==e&&(Z.prevMonthNav.style.display=e?"none":"block"),this.__hidePrevMonthArrow=e}}),Object.defineProperty(Z,"_hideNextMonthArrow",{get:function(){return this.__hideNextMonthArrow},set:function(e){this.__hideNextMonthArrow!==e&&(Z.nextMonthNav.style.display=e?"none":"block"),this.__hideNextMonthArrow=e}}),W(),Z.monthNav}()),Z.innerContainer=U("div","flatpickr-innerContainer"),Z.config.weekNumbers&&Z.innerContainer.appendChild((Z.calendarContainer.classList.add("hasWeeks"),Z.weekWrapper=U("div","flatpickr-weekwrapper"),Z.weekWrapper.appendChild(U("span","flatpickr-weekday",Z.l10n.weekAbbreviation)),Z.weekNumbers=U("div","flatpickr-weeks"),Z.weekWrapper.appendChild(Z.weekNumbers),Z.weekWrapper)),Z.rContainer=U("div","flatpickr-rContainer"),Z.rContainer.appendChild(y()),Z.daysContainer||(Z.daysContainer=U("div","flatpickr-days"),Z.daysContainer.tabIndex=-1),M(),Z.rContainer.appendChild(Z.daysContainer),Z.innerContainer.appendChild(Z.rContainer),e.appendChild(Z.innerContainer)),Z.config.enableTime&&e.appendChild(function(){Z.calendarContainer.classList.add("hasTime"),Z.config.noCalendar&&Z.calendarContainer.classList.add("noCalendar"),Z.timeContainer=U("div","flatpickr-time"),Z.timeContainer.tabIndex=-1;var e=U("span","flatpickr-time-separator",":"),t=D("flatpickr-hour");Z.hourElement=t.childNodes[0];var n=D("flatpickr-minute");Z.minuteElement=n.childNodes[0],Z.hourElement.tabIndex=Z.minuteElement.tabIndex=-1,Z.hourElement.value=Z.pad(Z.latestSelectedDateObj?Z.latestSelectedDateObj.getHours():Z.config.defaultHour),Z.minuteElement.value=Z.pad(Z.latestSelectedDateObj?Z.latestSelectedDateObj.getMinutes():Z.config.defaultMinute),Z.hourElement.step=Z.config.hourIncrement,Z.minuteElement.step=Z.config.minuteIncrement,Z.hourElement.min=Z.config.time_24hr?0:1,Z.hourElement.max=Z.config.time_24hr?23:12,Z.minuteElement.min=0,Z.minuteElement.max=59,Z.hourElement.title=Z.minuteElement.title=Z.l10n.scrollTitle,Z.timeContainer.appendChild(t),Z.timeContainer.appendChild(e),Z.timeContainer.appendChild(n),Z.config.time_24hr&&Z.timeContainer.classList.add("time24hr"),Z.config.enableSeconds&&(Z.timeContainer.classList.add("hasSeconds"),n=D("flatpickr-second"),Z.secondElement=n.childNodes[0],Z.secondElement.value=Z.latestSelectedDateObj?Z.pad(Z.latestSelectedDateObj.getSeconds()):"00",Z.secondElement.step=Z.minuteElement.step,Z.secondElement.min=Z.minuteElement.min,Z.secondElement.max=Z.minuteElement.max,Z.timeContainer.appendChild(U("span","flatpickr-time-separator",":")),Z.timeContainer.appendChild(n));return Z.config.time_24hr||(Z.amPM=U("span","flatpickr-am-pm",["AM","PM"][11<Z.hourElement.value|0]),Z.amPM.title=Z.l10n.toggleTitle,Z.amPM.tabIndex=-1,Z.timeContainer.appendChild(Z.amPM)),Z.timeContainer}()),q(Z.calendarContainer,"rangeMode","range"===Z.config.mode),q(Z.calendarContainer,"animate",Z.config.animate),Z.calendarContainer.appendChild(e);var t=Z.config.appendTo&&Z.config.appendTo.nodeType;if(Z.config.inline||Z.config.static){if(Z.calendarContainer.classList.add(Z.config.inline?"inline":"static"),Z.config.inline&&!t)return Z.element.parentNode.insertBefore(Z.calendarContainer,Z._input.nextSibling);if(Z.config.static){e=U("div","flatpickr-wrapper");return Z.element.parentNode.insertBefore(e,Z.element),e.appendChild(Z.element),Z.altInput&&e.appendChild(Z.altInput),e.appendChild(Z.calendarContainer),0}}(t?Z.config.appendTo:window.document.body).appendChild(Z.calendarContainer)}function C(e,t,n,a){var i=_(t,!0),r=U("span","flatpickr-day "+e,t.getDate());return r.dateObj=t,r.$i=a,r.setAttribute("aria-label",Z.formatDate(t,Z.config.ariaDateFormat)),0===V(t,Z.now)&&(Z.todayDateElem=r).classList.add("today"),i?(r.tabIndex=-1,R(t)&&(r.classList.add("selected"),Z.selectedDateElem=r,"range"===Z.config.mode&&(q(r,"startRange",0===V(t,Z.selectedDates[0])),q(r,"endRange",0===V(t,Z.selectedDates[1]))))):(r.classList.add("disabled"),Z.selectedDates[0]&&t>Z.minRangeDate&&t<Z.selectedDates[0]?Z.minRangeDate=t:Z.selectedDates[0]&&t<Z.maxRangeDate&&t>Z.selectedDates[0]&&(Z.maxRangeDate=t)),"range"===Z.config.mode&&(i=t,!("range"!==Z.config.mode||Z.selectedDates.length<2)&&0<=V(i,Z.selectedDates[0])&&V(i,Z.selectedDates[1])<=0&&!R(t)&&r.classList.add("inRange"),1===Z.selectedDates.length&&(t<Z.minRangeDate||t>Z.maxRangeDate)&&r.classList.add("notAllowed")),Z.config.weekNumbers&&"prevMonthDay"!==e&&n%7==1&&Z.weekNumbers.insertAdjacentHTML("beforeend","<span class='disabled flatpickr-day'>"+Z.config.getWeek(t)+"</span>"),j("DayCreate",r),r}function w(e,t){var n=e+t||0,a=void 0!==e?Z.days.childNodes[n]:Z.selectedDateElem||Z.todayDateElem||Z.days.childNodes[0],e=function(){(a=a||Z.days.childNodes[n]).focus(),"range"===Z.config.mode&&I(a)};if(void 0===a&&0!==t)return 0<t?(Z.changeMonth(1),n%=42):t<0&&(Z.changeMonth(-1),n+=42),b(e);e()}function b(e){if(!0===Z.config.animate)return Z._animationLoop.push(e);e()}function M(e){var t=(new Date(Z.currentYear,Z.currentMonth,1).getDay()-Z.l10n.firstDayOfWeek+7)%7,n="range"===Z.config.mode;Z.prevMonthDays=Z.utils.getDaysinMonth((Z.currentMonth-1+12)%12),Z.selectedDateElem=void 0,Z.todayDateElem=void 0;var a=Z.utils.getDaysinMonth(),i=window.document.createDocumentFragment(),r=Z.prevMonthDays+1-t,o=0;for(Z.config.weekNumbers&&Z.weekNumbers.firstChild&&(Z.weekNumbers.textContent=""),n&&(Z.minRangeDate=new Date(Z.currentYear,Z.currentMonth-1,r),Z.maxRangeDate=new Date(Z.currentYear,Z.currentMonth+1,(42-t)%a));r<=Z.prevMonthDays;r++,o++)i.appendChild(C("prevMonthDay",new Date(Z.currentYear,Z.currentMonth-1,r),r,o));for(r=1;r<=a;r++,o++)i.appendChild(C("",new Date(Z.currentYear,Z.currentMonth,r),r,o));for(var l=a+1;l<=42-t;l++,o++)i.appendChild(C("nextMonthDay",new Date(Z.currentYear,Z.currentMonth+1,l%a),l,o));n&&1===Z.selectedDates.length&&i.childNodes[0]?(Z._hidePrevMonthArrow=Z._hidePrevMonthArrow||Z.minRangeDate>i.childNodes[0].dateObj,Z._hideNextMonthArrow=Z._hideNextMonthArrow||Z.maxRangeDate<new Date(Z.currentYear,Z.currentMonth+1,1)):W();n=U("div","dayContainer");if(n.appendChild(i),Z.config.animate&&void 0!==e)for(;1<Z.daysContainer.childNodes.length;)Z.daysContainer.removeChild(Z.daysContainer.firstChild);else!function(e){for(;e.firstChild;)e.removeChild(e.firstChild)}(Z.daysContainer);return 0<=e?Z.daysContainer.appendChild(n):Z.daysContainer.insertBefore(n,Z.daysContainer.firstChild),Z.days=Z.daysContainer.firstChild,Z.daysContainer}function y(){Z.weekdayContainer||(Z.weekdayContainer=U("div","flatpickr-weekdays"));var e=Z.l10n.firstDayOfWeek,t=Z.l10n.weekdays.shorthand.slice();return 0<e&&e<t.length&&(t=[].concat(t.splice(e,t.length),t.splice(0,e))),Z.weekdayContainer.innerHTML="\n\t\t<span class=flatpickr-weekday>\n\t\t\t"+t.join("</span><span class=flatpickr-weekday>")+"\n\t\t</span>\n\t\t",Z.weekdayContainer}function k(e,t,n){e=(t=void 0===t||t)?e:e-Z.currentMonth,n=!Z.config.animate||!1===n;if(!(e<0&&Z._hidePrevMonthArrow||0<e&&Z._hideNextMonthArrow)){if(Z.currentMonth+=e,(Z.currentMonth<0||11<Z.currentMonth)&&(Z.currentYear+=11<Z.currentMonth?1:-1,Z.currentMonth=(Z.currentMonth+12)%12,j("YearChange")),M(n?void 0:e),n)return j("MonthChange"),W();var a,i=Z.navigationCurrentMonth;if(e<0)for(;i.nextSibling&&/curr/.test(i.nextSibling.className);)Z.monthNav.removeChild(i.nextSibling);else if(0<e)for(;i.previousSibling&&/curr/.test(i.previousSibling.className);)Z.monthNav.removeChild(i.previousSibling);Z.oldCurMonth=Z.navigationCurrentMonth,Z.navigationCurrentMonth=Z.monthNav.insertBefore(Z.oldCurMonth.cloneNode(!0),0<e?Z.oldCurMonth.nextSibling:Z.oldCurMonth),0<e?(Z.daysContainer.firstChild.classList.add("slideLeft"),Z.daysContainer.lastChild.classList.add("slideLeftNew"),Z.oldCurMonth.classList.add("slideLeft"),Z.navigationCurrentMonth.classList.add("slideLeftNew")):e<0&&(Z.daysContainer.firstChild.classList.add("slideRightNew"),Z.daysContainer.lastChild.classList.add("slideRight"),Z.oldCurMonth.classList.add("slideRight"),Z.navigationCurrentMonth.classList.add("slideRightNew")),Z.currentMonthElement=Z.navigationCurrentMonth.firstChild,Z.currentYearElement=Z.navigationCurrentMonth.lastChild.childNodes[0],W(),Z.oldCurMonth.firstChild.textContent=Z.utils.monthToStr(Z.currentMonth-e),j("MonthChange"),document.activeElement&&document.activeElement.$i&&(a=document.activeElement.$i,b(function(){w(a,0)}))}}function x(e){return!(!Z.config.appendTo||!Z.config.appendTo.contains(e))||Z.calendarContainer.contains(e)}function E(e){var t,n;Z.isOpen&&!Z.config.inline&&(t=x(e.target),n=e.target===Z.input||e.target===Z.altInput||Z.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(Z.input)||~e.path.indexOf(Z.altInput)),("blur"===e.type?!n||!e.relatedTarget||x(e.relatedTarget):n||t)||-1!==Z.config.ignoredFocusElements.indexOf(e.target)||(Z.close(),"range"===Z.config.mode&&1===Z.selectedDates.length&&(Z.clear(!1),Z.redraw())))}function N(e){var t;!e||Z.currentYearElement.min&&e<Z.currentYearElement.min||Z.currentYearElement.max&&e>Z.currentYearElement.max||(t=parseInt(e,10),e=Z.currentYear!==t,Z.currentYear=t||Z.currentYear,Z.config.maxDate&&Z.currentYear===Z.config.maxDate.getFullYear()?Z.currentMonth=Math.min(Z.config.maxDate.getMonth(),Z.currentMonth):Z.config.minDate&&Z.currentYear===Z.config.minDate.getFullYear()&&(Z.currentMonth=Math.max(Z.config.minDate.getMonth(),Z.currentMonth)),e&&(Z.redraw(),j("YearChange")))}function _(e,t){if(Z.config.minDate&&V(e,Z.config.minDate,void 0!==t?t:!Z.minDateHasTime)<0||Z.config.maxDate&&0<V(e,Z.config.maxDate,void 0!==t?t:!Z.maxDateHasTime))return!1;if(!Z.config.enable.length&&!Z.config.disable.length)return!0;for(var n,a=Z.parseDate(e,null,!0),i=0<Z.config.enable.length,r=i?Z.config.enable:Z.config.disable,o=0;o<r.length;o++){if((n=r[o])instanceof Function&&n(a))return i;if(n instanceof Date&&n.getTime()===a.getTime())return i;if("string"==typeof n&&Z.parseDate(n,null,!0).getTime()===a.getTime())return i;if("object"===(void 0===n?"undefined":_typeof(n))&&n.from&&n.to&&a>=n.from&&a<=n.to)return i}return!i}function T(e){var t=e.target===Z._input,n=x(e.target),a=Z.config.allowInput,i=Z.isOpen&&(!a||!t),r=Z.config.inline&&t&&!a;if("Enter"===e.key&&a&&t)return Z.setDate(Z._input.value,!0,e.target===Z.altInput?Z.config.altFormat:Z.config.dateFormat),e.target.blur();if(n||i||r){var o=Z.timeContainer&&Z.timeContainer.contains(e.target);switch(e.key){case"Enter":o?B():A(e);break;case"Escape":e.preventDefault(),Z.close();break;case"ArrowLeft":case"ArrowRight":o||(e.preventDefault(),Z.daysContainer?(l="ArrowRight"===e.key?1:-1,e.ctrlKey?k(l,!0):w(e.target.$i,l)):Z.config.enableTime&&!o&&Z.hourElement.focus());break;case"ArrowUp":case"ArrowDown":e.preventDefault();var l="ArrowDown"===e.key?1:-1;Z.daysContainer?e.ctrlKey?(N(Z.currentYear-l),w(e.target.$i,0)):o||w(e.target.$i,7*l):Z.config.enableTime&&(o||Z.hourElement.focus(),s(e));break;case"Tab":e.target===Z.hourElement?(e.preventDefault(),Z.minuteElement.select()):e.target===Z.minuteElement&&(Z.secondElement||Z.amPM)?(e.preventDefault(),(Z.secondElement||Z.amPM).focus()):e.target===Z.secondElement&&(e.preventDefault(),Z.amPM.focus());break;case"a":e.target===Z.amPM&&(Z.amPM.textContent="AM",d(),B());break;case"p":e.target===Z.amPM&&(Z.amPM.textContent="PM",d(),B())}j("KeyDown",e)}}function I(i){if(1===Z.selectedDates.length&&i.classList.contains("flatpickr-day")){for(var r=i.dateObj,o=Z.parseDate(Z.selectedDates[0],null,!0),l=Math.min(r.getTime(),Z.selectedDates[0].getTime()),c=Math.max(r.getTime(),Z.selectedDates[0].getTime()),s=!1,e=l;e<c;e+=Z.utils.duration.DAY)if(!_(new Date(e))){s=!0;break}for(var t=Z.days.childNodes[0].dateObj.getTime(),n=0;n<42;n++,t+=Z.utils.duration.DAY)!function(e,t){var n=e<Z.minRangeDate.getTime()||e>Z.maxRangeDate.getTime(),a=Z.days.childNodes[t];if(n)return Z.days.childNodes[t].classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){a.classList.remove(e)});if(s&&!n)return;["startRange","inRange","endRange","notAllowed"].forEach(function(e){a.classList.remove(e)});t=Math.max(Z.minRangeDate.getTime(),l),n=Math.min(Z.maxRangeDate.getTime(),c);i.classList.add(r<Z.selectedDates[0]?"startRange":"endRange"),o<r&&e===o.getTime()?a.classList.add("startRange"):r<o&&e===o.getTime()&&a.classList.add("endRange"),t<=e&&e<=n&&a.classList.add("inRange")}(t,n)}}function S(){!Z.isOpen||Z.config.static||Z.config.inline||Y()}function F(a){return function(e){var t=Z.config["_"+a+"Date"]=Z.parseDate(e),n=Z.config["_"+("min"===a?"max":"min")+"Date"],e=e&&t instanceof Date;e&&(Z[a+"DateHasTime"]=t.getHours()||t.getMinutes()||t.getSeconds()),Z.selectedDates&&(Z.selectedDates=Z.selectedDates.filter(function(e){return _(e)}),Z.selectedDates.length||"min"!==a||i(t),B()),Z.daysContainer&&(O(),e?Z.currentYearElement[a]=t.getFullYear():Z.currentYearElement.removeAttribute(a),Z.currentYearElement.disabled=n&&t&&n.getFullYear()===t.getFullYear())}}function Y(e){var t,n,a,i,r,o=0<arguments.length&&void 0!==e?e:Z._positionElement;void 0!==Z.calendarContainer&&(t=Z.calendarContainer.offsetHeight,r=Z.calendarContainer.offsetWidth,n=Z.config.position,i=o.getBoundingClientRect(),a=window.innerHeight-i.bottom,a="above"===n||"below"!==n&&a<t&&i.top>t,o=window.pageYOffset+i.top+(a?-t-2:o.offsetHeight+2),q(Z.calendarContainer,"arrowTop",!a),q(Z.calendarContainer,"arrowBottom",a),Z.config.inline||(a=window.pageXOffset+i.left,i=window.document.body.offsetWidth-i.right,r=a+r>window.document.body.offsetWidth,q(Z.calendarContainer,"rightMost",r),Z.config.static||(Z.calendarContainer.style.top=o+"px",r?(Z.calendarContainer.style.left="auto",Z.calendarContainer.style.right=i+"px"):(Z.calendarContainer.style.left=a+"px",Z.calendarContainer.style.right="auto"))))}function O(){Z.config.noCalendar||Z.isMobile||(y(),W(),M())}function A(e){var t,n,a;e.preventDefault(),e.stopPropagation(),!e.target.classList.contains("flatpickr-day")||e.target.classList.contains("disabled")||e.target.classList.contains("notAllowed")||(a=(t=Z.latestSelectedDateObj=new Date(e.target.dateObj.getTime())).getMonth()!==Z.currentMonth&&"range"!==Z.config.mode,Z.selectedDateElem=e.target,"single"===Z.config.mode?Z.selectedDates=[t]:"multiple"===Z.config.mode?(n=R(t))?Z.selectedDates.splice(n,1):Z.selectedDates.push(t):"range"===Z.config.mode&&(2===Z.selectedDates.length&&Z.clear(),Z.selectedDates.push(t),0!==V(t,Z.selectedDates[0],!0)&&Z.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})),d(),a&&(n=Z.currentYear!==t.getFullYear(),Z.currentYear=t.getFullYear(),Z.currentMonth=t.getMonth(),n&&j("YearChange"),j("MonthChange")),M(),Z.minDateHasTime&&Z.config.enableTime&&0===V(t,Z.config.minDate)&&i(Z.config.minDate),B(),Z.config.enableTime&&setTimeout(function(){return Z.showTimeInput=!0},50),"range"===Z.config.mode&&(1===Z.selectedDates.length?(I(e.target),Z._hidePrevMonthArrow=Z._hidePrevMonthArrow||Z.minRangeDate>Z.days.childNodes[0].dateObj,Z._hideNextMonthArrow=Z._hideNextMonthArrow||Z.maxRangeDate<new Date(Z.currentYear,Z.currentMonth+1,1)):W()),j("Change"),a?b(function(){return Z.selectedDateElem.focus()}):w(e.target.$i,0),Z.config.enableTime&&setTimeout(function(){return Z.hourElement.select()},451),Z.config.closeOnSelect&&(a="single"===Z.config.mode&&!Z.config.enableTime,e="range"===Z.config.mode&&2===Z.selectedDates.length&&!Z.config.enableTime,(a||e)&&Z.close()))}function L(e,t){if(e instanceof Array)Z.selectedDates=e.map(function(e){return Z.parseDate(e,t)});else if(e instanceof Date||!isNaN(e))Z.selectedDates=[Z.parseDate(e,t)];else if(e&&e.substring)switch(Z.config.mode){case"single":Z.selectedDates=[Z.parseDate(e,t)];break;case"multiple":Z.selectedDates=e.split("; ").map(function(e){return Z.parseDate(e,t)});break;case"range":Z.selectedDates=e.split(Z.l10n.rangeSeparator).map(function(e){return Z.parseDate(e,t)})}Z.selectedDates=Z.selectedDates.filter(function(e){return e instanceof Date&&_(e,!1)}),Z.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function P(e){for(var t=e.length;t--;)"string"==typeof e[t]||+e[t]?e[t]=Z.parseDate(e[t],null,!0):e[t]&&e[t].from&&e[t].to&&(e[t].from=Z.parseDate(e[t].from),e[t].to=Z.parseDate(e[t].to));return e.filter(function(e){return e})}function j(e,t){var n=Z.config["on"+e];if(void 0!==n&&0<n.length)for(var a=0;n[a]&&a<n.length;a++)n[a](Z.selectedDates,Z.input.value,Z,t);"Change"===e&&(Z.input.dispatchEvent(H("change")),Z.input.dispatchEvent(H("input")))}function H(e){return Z._supportsEvents?new Event(e,{bubbles:!0}):(Z._[e+"Event"]=document.createEvent("Event"),Z._[e+"Event"].initEvent(e,!0,!0),Z._[e+"Event"])}function R(e){for(var t=0;t<Z.selectedDates.length;t++)if(0===V(Z.selectedDates[t],e))return""+t;return!1}function W(){Z.config.noCalendar||Z.isMobile||!Z.monthNav||(Z.currentMonthElement.textContent=Z.utils.monthToStr(Z.currentMonth)+" ",Z.currentYearElement.value=Z.currentYear,Z._hidePrevMonthArrow=Z.config.minDate&&(Z.currentYear===Z.config.minDate.getFullYear()?Z.currentMonth<=Z.config.minDate.getMonth():Z.currentYear<Z.config.minDate.getFullYear()),Z._hideNextMonthArrow=Z.config.maxDate&&(Z.currentYear===Z.config.maxDate.getFullYear()?Z.currentMonth+1>Z.config.maxDate.getMonth():Z.currentYear>Z.config.maxDate.getFullYear()))}function B(e){if(!Z.selectedDates.length)return Z.clear(e);Z.isMobile&&(Z.mobileInput.value=Z.selectedDates.length?Z.formatDate(Z.latestSelectedDateObj,Z.mobileFormatStr):"");var t="range"!==Z.config.mode?"; ":Z.l10n.rangeSeparator;Z.input.value=Z.selectedDates.map(function(e){return Z.formatDate(e,Z.config.dateFormat)}).join(t),Z.config.altInput&&(Z.altInput.value=Z.selectedDates.map(function(e){return Z.formatDate(e,Z.config.altFormat)}).join(t)),!1!==e&&j("ValueUpdate")}function J(e){e.preventDefault();var t,n=Z.currentYearElement.parentNode.contains(e.target);e.target!==Z.currentMonthElement&&!n||(t=e,t=Math.max(-1,Math.min(1,t.wheelDelta||-t.deltaY)),n?(N(Z.currentYear+t),e.target.value=Z.currentYear):Z.changeMonth(t,!0,!1))}function K(e){var t=Z.prevMonthNav.contains(e.target),n=Z.nextMonthNav.contains(e.target);t||n?k(t?-1:1):e.target===Z.currentYearElement?(e.preventDefault(),Z.currentYearElement.select()):"arrowUp"===e.target.className?Z.changeYear(Z.currentYear+1):"arrowDown"===e.target.className&&Z.changeYear(Z.currentYear-1)}function U(e,t,n){e=window.document.createElement(e);return t=t||"",n=n||"",e.className=t,void 0!==n&&(e.textContent=n),e}function z(e){return e instanceof Array?e:[e]}function q(e,t,n){if(n)return e.classList.add(t);e.classList.remove(t)}function G(n,a,i){var r=void 0;return function(){var e=this,t=arguments;clearTimeout(r),r=setTimeout(function(){r=null,i||n.apply(e,t)},a),i&&!r&&n.apply(e,t)}}function V(e,t,n){return e instanceof Date&&t instanceof Date&&(!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime())}var Z=this;return Z._={},Z._.afterDayAnim=b,Z._bind=r,Z._compareDates=V,Z._setHoursFromDate=i,Z.changeMonth=k,Z.changeYear=N,Z.clear=function(e){Z.input.value="",Z.altInput&&(Z.altInput.value=""),Z.mobileInput&&(Z.mobileInput.value=""),Z.selectedDates=[],Z.latestSelectedDateObj=void 0,Z.showTimeInput=!1,Z.redraw(),!1!==e&&j("Change")},Z.close=function(){Z.isOpen=!1,Z.isMobile||(Z.calendarContainer.classList.remove("open"),Z._input.classList.remove("active")),j("Close")},Z._createElement=U,Z.destroy=function(){void 0!==Z.config&&j("Destroy");for(var e=Z._handlers.length;e--;){var t=Z._handlers[e];t.element.removeEventListener(t.event,t.handler)}Z._handlers=[],Z.mobileInput?(Z.mobileInput.parentNode&&Z.mobileInput.parentNode.removeChild(Z.mobileInput),Z.mobileInput=null):Z.calendarContainer&&Z.calendarContainer.parentNode&&Z.calendarContainer.parentNode.removeChild(Z.calendarContainer),Z.altInput&&(Z.input.type="text",Z.altInput.parentNode&&Z.altInput.parentNode.removeChild(Z.altInput),delete Z.altInput),Z.input&&(Z.input.type=Z.input._type,Z.input.classList.remove("flatpickr-input"),Z.input.removeAttribute("readonly"),Z.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){return delete Z[e]})},Z.isEnabled=_,Z.jumpToDate=g,Z.open=function(e,t){if(Z.isMobile)return e&&(e.preventDefault(),e.target.blur()),setTimeout(function(){Z.mobileInput.click()},0),void j("Open");Z.isOpen||Z._input.disabled||Z.config.inline||(Z.isOpen=!0,Z.calendarContainer.classList.add("open"),Y(t),Z._input.classList.add("active"),j("Open"))},Z.redraw=O,Z.set=function(e,t){Z.config[e]=t,Z.redraw(),g()},Z.setDate=function(e,t,n){if(0!==e&&!e)return Z.clear(t);L(e,n),Z.showTimeInput=0<Z.selectedDates.length,Z.latestSelectedDateObj=Z.selectedDates[0],Z.redraw(),g(),i(),B(t),t&&j("Change")},Z.toggle=function(){if(Z.isOpen)return Z.close();Z.open()},Z.element=Z.input=e,Z.instanceConfig=t||{},Z.parseDate=FlatpickrInstance.prototype.parseDate.bind(Z),Z.formatDate=FlatpickrInstance.prototype.formatDate.bind(Z),Z.formats=Object.create(FlatpickrInstance.prototype.formats),["D","F","J","M","W","l"].forEach(function(e){Z.formats[e]=FlatpickrInstance.prototype.formats[e].bind(Z)}),Z.revFormat.F=FlatpickrInstance.prototype.revFormat.F.bind(Z),Z.revFormat.M=FlatpickrInstance.prototype.revFormat.M.bind(Z),function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange"];Z.config=Object.create(flatpickr.defaultConfig);var n=_extends({},Z.instanceConfig,JSON.parse(JSON.stringify(Z.element.dataset||{})));Z.config.parseDate=n.parseDate,Z.config.formatDate=n.formatDate,Object.defineProperty(Z.config,"enable",{get:function(){return Z.config._enable||[]},set:function(e){return Z.config._enable=P(e)}}),Object.defineProperty(Z.config,"disable",{get:function(){return Z.config._disable||[]},set:function(e){return Z.config._disable=P(e)}}),_extends(Z.config,n),!n.dateFormat&&n.enableTime&&(Z.config.dateFormat=Z.config.noCalendar?"H:i"+(Z.config.enableSeconds?":S":""):flatpickr.defaultConfig.dateFormat+" H:i"+(Z.config.enableSeconds?":S":"")),n.altInput&&n.enableTime&&!n.altFormat&&(Z.config.altFormat=Z.config.noCalendar?"h:i"+(Z.config.enableSeconds?":S K":" K"):flatpickr.defaultConfig.altFormat+" h:i"+(Z.config.enableSeconds?":S":"")+" K"),Object.defineProperty(Z.config,"minDate",{get:function(){return this._minDate},set:F("min")}),Object.defineProperty(Z.config,"maxDate",{get:function(){return this._maxDate},set:F("max")}),Z.config.minDate=n.minDate,Z.config.maxDate=n.maxDate;for(var a=0;a<e.length;a++)Z.config[e[a]]=!0===Z.config[e[a]]||"true"===Z.config[e[a]];for(var i=t.length;i--;)void 0!==Z.config[t[i]]&&(Z.config[t[i]]=z(Z.config[t[i]]||[]).map(c));for(var r=0;r<Z.config.plugins.length;r++){var o,l=Z.config.plugins[r](Z)||{};for(o in l)Z.config[o]instanceof Array||~t.indexOf(o)?Z.config[o]=z(l[o]).map(c).concat(Z.config[o]):void 0===n[o]&&(Z.config[o]=l[o])}j("ParseConfig")}(),"object"!==_typeof(Z.config.locale)&&flatpickr.l10ns[Z.config.locale],Z.l10n=_extends(Object.create(flatpickr.l10ns.default),"object"===_typeof(Z.config.locale)?Z.config.locale:"default"!==Z.config.locale&&flatpickr.l10ns[Z.config.locale]||{}),Z.input=Z.config.wrap?Z.element.querySelector("[data-input]"):Z.element,Z.input&&(Z.input._type=Z.input.type,Z.input.type="text",Z.input.classList.add("flatpickr-input"),Z._input=Z.input,Z.config.altInput&&(Z.altInput=U(Z.input.nodeName,Z.input.className+" "+Z.config.altInputClass),Z._input=Z.altInput,Z.altInput.placeholder=Z.input.placeholder,Z.altInput.disabled=Z.input.disabled,Z.altInput.required=Z.input.required,Z.altInput.type="text",Z.input.type="hidden",!Z.config.static&&Z.input.parentNode&&Z.input.parentNode.insertBefore(Z.altInput,Z.input.nextSibling)),Z.config.allowInput||Z._input.setAttribute("readonly","readonly"),Z._positionElement=Z.config.positionElement||Z._input),function(){Z.selectedDates=[],Z.now=new Date;var e=Z.config.defaultDate||Z.input.value;e&&L(e,Z.config.dateFormat),e=Z.selectedDates.length?Z.selectedDates[0]:Z.config.minDate&&Z.config.minDate.getTime()>Z.now?Z.config.minDate:Z.config.maxDate&&Z.config.maxDate.getTime()<Z.now?Z.config.maxDate:Z.now,Z.currentYear=e.getFullYear(),Z.currentMonth=e.getMonth(),Z.selectedDates.length&&(Z.latestSelectedDateObj=Z.selectedDates[0]),Z.minDateHasTime=Z.config.minDate&&(Z.config.minDate.getHours()||Z.config.minDate.getMinutes()||Z.config.minDate.getSeconds()),Z.maxDateHasTime=Z.config.maxDate&&(Z.config.maxDate.getHours()||Z.config.maxDate.getMinutes()||Z.config.maxDate.getSeconds()),Object.defineProperty(Z,"latestSelectedDateObj",{get:function(){return Z._selectedDateObj||Z.selectedDates[Z.selectedDates.length-1]},set:function(e){Z._selectedDateObj=e}}),Z.isMobile||Object.defineProperty(Z,"showTimeInput",{get:function(){return Z._showTimeInput},set:function(e){Z._showTimeInput=e,Z.calendarContainer&&q(Z.calendarContainer,"showTimeInput",e),Y()}})}(),Z.utils={duration:{DAY:864e5},getDaysinMonth:function(e,t){return e=void 0===e?Z.currentMonth:e,t=void 0===t?Z.currentYear:t,1===e&&(t%4==0&&t%100!=0||t%400==0)?29:Z.l10n.daysInMonth[e]},monthToStr:function(e,t){return t=void 0===t?Z.config.shorthandCurrentMonth:t,Z.l10n.months[(t?"short":"long")+"hand"][e]}},Z.isOpen=!1,Z.isMobile=!Z.config.disableMobile&&!Z.config.inline&&"single"===Z.config.mode&&!Z.config.disable.length&&!Z.config.enable.length&&!Z.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),Z.isMobile||v(),l(),(Z.selectedDates.length||Z.config.noCalendar)&&(Z.config.enableTime&&i(Z.config.noCalendar?Z.latestSelectedDateObj||Z.config.minDate:null),B()),Z.showTimeInput=0<Z.selectedDates.length||Z.config.noCalendar,Z.config.weekNumbers&&(Z.calendarContainer.style.width=Z.daysContainer.offsetWidth+Z.weekWrapper.offsetWidth+"px"),Z.isMobile||Y(),j("Ready"),Z}function _flatpickr(e,t){for(var n=Array.prototype.slice.call(e),a=[],i=0;i<n.length;i++)try{if(null!==n[i].getAttribute("data-fp-omit"))continue;n[i]._flatpickr&&(n[i]._flatpickr.destroy(),n[i]._flatpickr=null),n[i]._flatpickr=new FlatpickrInstance(n[i],t||{}),a.push(n[i]._flatpickr)}catch(e){}return 1===a.length?a[0]:a}function flatpickr(e,t){return e instanceof NodeList?_flatpickr(e,t):e instanceof HTMLElement?_flatpickr([e],t):_flatpickr(window.document.querySelectorAll(e),t)}var _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,a=arguments[t];for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};FlatpickrInstance.prototype={formats:{Z:function(e){return e.toISOString()},D:function(e){return this.l10n.weekdays.shorthand[this.formats.w(e)]},F:function(e){return this.utils.monthToStr(this.formats.n(e)-1,!1)},G:function(e){return FlatpickrInstance.prototype.pad(FlatpickrInstance.prototype.formats.h(e))},H:function(e){return FlatpickrInstance.prototype.pad(e.getHours())},J:function(e){return e.getDate()+this.l10n.ordinal(e.getDate())},K:function(e){return 11<e.getHours()?"PM":"AM"},M:function(e){return this.utils.monthToStr(e.getMonth(),!0)},S:function(e){return FlatpickrInstance.prototype.pad(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e){return this.config.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(e){return FlatpickrInstance.prototype.pad(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return FlatpickrInstance.prototype.pad(e.getMinutes())},j:function(e){return e.getDate()},l:function(e){return this.l10n.weekdays.longhand[e.getDay()]},m:function(e){return FlatpickrInstance.prototype.pad(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},formatDate:function(a,e){var i=this;return void 0!==this.config&&void 0!==this.config.formatDate?this.config.formatDate(a,e):e.split("").map(function(e,t,n){return i.formats[e]&&"\\"!==n[t-1]?i.formats[e](a):"\\"!==e?e:""}).join("")},revFormat:{D:function(){},F:function(e,t){e.setMonth(this.l10n.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t){var n=e.getHours();12!==n&&e.setHours(n%12+12*/pm/i.test(t))},M:function(e,t){e.setMonth(this.l10n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(t)},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t){return t=parseInt(t),new Date(e.getFullYear(),0,2+7*(t-1),0,0,0,0,0)},Y:function(e,t){e.setFullYear(t)},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:function(){},m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},w:function(){},y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},tokenRegex:{D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"(am|AM|Am|aM|pm|PM|Pm|pM)",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},pad:function(e){return("0"+e).slice(-2)},parseDate:function(e,t,n){if(0!==e&&!e)return null;if(e instanceof Date)e=new Date(e.getTime());else if(void 0!==e.toFixed)e=new Date(e);else{var a=t||(this.config||flatpickr.defaultConfig).dateFormat;if("today"===(e=String(e).trim()))e=new Date,n=!0;else if(/Z$/.test(e)||/GMT$/.test(e))e=new Date(e);else if(this.config&&this.config.parseDate)e=this.config.parseDate(e,a);else{for(var i=this.config&&this.config.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0),r=void 0,o=0,l=0,c="";o<a.length;o++){var s=a[o],d="\\"===s,u="\\"===a[o-1]||d;this.tokenRegex[s]&&!u?(c+=this.tokenRegex[s],(u=new RegExp(c).exec(e))&&(r=!0)&&(i=this.revFormat[s](i,u[++l])||i)):d||(c+=".")}e=r?i:null}}return e instanceof Date?(!0===n&&e.setHours(0,0,0,0),e):null}},"undefined"!=typeof HTMLElement&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return _flatpickr(this,e)},HTMLElement.prototype.flatpickr=function(e){return _flatpickr([this],e)}),flatpickr.defaultConfig=FlatpickrInstance.defaultConfig={mode:"single",position:"auto",animate:-1===window.navigator.userAgent.indexOf("MSIE"),wrap:!1,weekNumbers:!1,allowInput:!1,clickOpens:!0,closeOnSelect:!0,time_24hr:!1,enableTime:!1,noCalendar:!1,dateFormat:"Y-m-d",ariaDateFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",altFormat:"F j, Y",defaultDate:null,minDate:null,maxDate:null,parseDate:null,formatDate:null,getWeek:function(e){var t=new Date(e.getTime()),e=new Date(t.getFullYear(),0,1);return Math.ceil(((t-e)/864e5+e.getDay()+1)/7)},enable:[],disable:[],shorthandCurrentMonth:!1,inline:!1,static:!1,appendTo:null,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",enableSeconds:!1,hourIncrement:1,minuteIncrement:5,defaultHour:12,defaultMinute:0,disableMobile:!1,locale:"default",plugins:[],ignoredFocusElements:[],onClose:void 0,onChange:void 0,onDayCreate:void 0,onMonthChange:void 0,onOpen:void 0,onParseConfig:void 0,onReady:void 0,onValueUpdate:void 0,onYearChange:void 0,onKeyDown:void 0,onDestroy:void 0},flatpickr.l10ns={en:{weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){e%=100;if(3<e&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle"}},flatpickr.l10ns.default=Object.create(flatpickr.l10ns.en),flatpickr.localize=function(e){return _extends(flatpickr.l10ns.default,e||{})},flatpickr.setDefaults=function(e){return _extends(flatpickr.defaultConfig,e||{})},"undefined"!=typeof jQuery&&(jQuery.fn.flatpickr=function(e){return _flatpickr(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+parseInt(e,10))},"undefined"!=typeof module&&(module.exports=flatpickr);
     2function FlatpickrInstance(e,L){function P(e){return e.bind(T)}function c(e){T.config.noCalendar&&!T.selectedDates.length&&(T.selectedDates=[T.now]),(e=>{e.preventDefault();var t="keydown"===e.type,n=e.target;if(T.amPM&&e.target===T.amPM)return e.target.textContent=["AM","PM"]["AM"===e.target.textContent|0];var a,i=Number(n.min),r=Number(n.max),o=Number(n.step),l=parseInt(n.value,10),t=l+o*(e.delta||(t?38===e.which?1:-1:Math.max(-1,Math.min(1,e.wheelDelta||-e.deltaY))||0));void 0!==n.value&&2===n.value.length&&(e=n===T.hourElement,a=n===T.minuteElement,t<i?(t=r+t+!e+(e&&!T.amPM),a&&d(null,-1,T.hourElement)):r<t&&(t=n===T.hourElement?t-r-!T.amPM:i,a)&&d(null,1,T.hourElement),T.amPM&&e&&(1===o?t+l===23:Math.abs(t-l)>o)&&(T.amPM.textContent="PM"===T.amPM.textContent?"AM":"PM"),n.value=T.pad(t))})(e),T.selectedDates.length&&(!T.minDateHasTime||"input"!==e.type||2<=e.target.value.length?(s(),k()):setTimeout(function(){s(),k()},1e3))}function s(){var e,t,n;T.config.enableTime&&(e=(parseInt(T.hourElement.value,10)||0)%(T.amPM?12:24),t=(parseInt(T.minuteElement.value,10)||0)%60,n=T.config.enableSeconds?(parseInt(T.secondElement.value,10)||0)%60:0,void 0!==T.amPM&&(e=e%12+12*("PM"===T.amPM.textContent)),T.minDateHasTime&&0===_(T.latestSelectedDateObj,T.config.minDate)&&(e=Math.max(e,T.config.minDate.getHours()))===T.config.minDate.getHours()&&(t=Math.max(t,T.config.minDate.getMinutes())),T.maxDateHasTime&&0===_(T.latestSelectedDateObj,T.config.maxDate)&&(e=Math.min(e,T.config.maxDate.getHours()))===T.config.maxDate.getHours()&&(t=Math.min(t,T.config.maxDate.getMinutes())),j(e,t,n))}function i(e){e=e||T.latestSelectedDateObj;e&&j(e.getHours(),e.getMinutes(),e.getSeconds())}function j(e,t,n){T.selectedDates.length&&T.latestSelectedDateObj.setHours(e%24,t,n||0,0),T.config.enableTime&&!T.isMobile&&(T.hourElement.value=T.pad(T.config.time_24hr?e:(12+e)%12+12*(e%12==0)),T.minuteElement.value=T.pad(t),T.config.time_24hr||(T.amPM.textContent=12<=e?"PM":"AM"),!0===T.config.enableSeconds)&&(T.secondElement.value=T.pad(n))}function H(e){var t=e.target.value;4!==(t=e.delta?(parseInt(t)+e.delta).toString():t).length&&"Enter"!==e.key||(T.currentYearElement.blur(),/[^\d]/.test(t))||h(t)}function r(t,n,a){return n instanceof Array?n.forEach(function(e){return r(t,e,a)}):t instanceof Array?t.forEach(function(e){return r(e,n,a)}):(t.addEventListener(n,a),void T._handlers.push({element:t,event:n,handler:a}))}function n(t){return function(e){return 1===e.which&&t(e)}}function R(){if(T._handlers=[],T._animationLoop=[],T.config.wrap&&["open","close","toggle","clear"].forEach(function(t){Array.prototype.forEach.call(T.element.querySelectorAll("[data-"+t+"]"),function(e){return r(e,"mousedown",n(T[t]))})}),T.isMobile){var e=T.config.enableTime?T.config.noCalendar?"time":"datetime-local":"date";T.mobileInput=x("input",T.input.className+" flatpickr-mobile"),T.mobileInput.step="any",T.mobileInput.tabIndex=1,T.mobileInput.type=e,T.mobileInput.disabled=T.input.disabled,T.mobileInput.placeholder=T.input.placeholder,T.mobileFormatStr="datetime-local"==e?"Y-m-d\\TH:i:S":"date"==e?"Y-m-d":"H:i:S",T.selectedDates.length&&(T.mobileInput.defaultValue=T.mobileInput.value=T.formatDate(T.selectedDates[0],T.mobileFormatStr)),T.config.minDate&&(T.mobileInput.min=T.formatDate(T.config.minDate,"Y-m-d")),T.config.maxDate&&(T.mobileInput.max=T.formatDate(T.config.maxDate,"Y-m-d")),T.input.type="hidden",T.config.altInput&&(T.altInput.type="hidden");try{T.input.parentNode.insertBefore(T.mobileInput,T.input.nextSibling)}catch(e){}T.mobileInput.addEventListener("change",function(e){T.setDate(e.target.value,!1,T.mobileFormatStr),w("Change"),w("Close")})}else T.debouncedResize=N(G,50),T.triggerChange=function(){w("Change")},T.debouncedChange=N(T.triggerChange,300),"range"===T.config.mode&&T.daysContainer&&r(T.daysContainer,"mouseover",function(e){return v(e.target)}),r(window.document.body,"keydown",q),T.config.static||r(T._input,"keydown",q),T.config.inline||T.config.static||r(window,"resize",T.debouncedResize),void 0!==window.ontouchstart&&r(window.document,"touchstart",t),r(window.document,"mousedown",n(t)),r(T._input,"blur",t),!0===T.config.clickOpens&&(r(T._input,"focus",T.open),r(T._input,"mousedown",n(T.open))),T.config.noCalendar||(T.monthNav.addEventListener("wheel",function(e){return e.preventDefault()}),r(T.monthNav,"wheel",N(te,10)),r(T.monthNav,"mousedown",n(ne)),r(T.monthNav,["keyup","increment"],H),r(T.daysContainer,"mousedown",n(Q)),T.config.animate&&(r(T.daysContainer,["webkitAnimationEnd","animationend"],B),r(T.monthNav,["webkitAnimationEnd","animationend"],J))),T.config.enableTime&&(r(T.timeContainer,["wheel","input","increment"],c),r(T.timeContainer,"mousedown",n(K)),r(T.timeContainer,["wheel","increment"],T.debouncedChange),r(T.timeContainer,"input",T.triggerChange),r([T.hourElement,T.minuteElement],"focus",function(e){return e.target.select()}),void 0!==T.secondElement&&r(T.secondElement,"focus",function(){return T.secondElement.select()}),void 0!==T.amPM)&&r(T.amPM,"mousedown",n(function(e){c(e),T.triggerChange(e)}))}function W(){for(var e=T._animationLoop.length;e--;)T._animationLoop[e](),T._animationLoop.splice(e,1)}function B(e){if(1<T.daysContainer.childNodes.length)switch(e.animationName){case"fpSlideLeft":T.daysContainer.lastChild.classList.remove("slideLeftNew"),T.daysContainer.removeChild(T.daysContainer.firstChild),T.days=T.daysContainer.firstChild,W();break;case"fpSlideRight":T.daysContainer.firstChild.classList.remove("slideRightNew"),T.daysContainer.removeChild(T.daysContainer.lastChild),T.days=T.daysContainer.firstChild,W()}}function J(e){switch(e.animationName){case"fpSlideLeftNew":case"fpSlideRightNew":T.navigationCurrentMonth.classList.remove("slideLeftNew"),T.navigationCurrentMonth.classList.remove("slideRightNew");for(var t=T.navigationCurrentMonth;t.nextSibling&&/curr/.test(t.nextSibling.className);)T.monthNav.removeChild(t.nextSibling);for(;t.previousSibling&&/curr/.test(t.previousSibling.className);)T.monthNav.removeChild(t.previousSibling);T.oldCurMonth=null}}function a(e){e=e?T.parseDate(e):T.latestSelectedDateObj||(T.config.minDate>T.now?T.config.minDate:T.config.maxDate&&T.config.maxDate<T.now?T.config.maxDate:T.now);try{T.currentYear=e.getFullYear(),T.currentMonth=e.getMonth()}catch(e){}T.redraw()}function K(e){~e.target.className.indexOf("arrow")&&d(e,e.target.classList.contains("arrowUp")?1:-1)}function d(e,t,n){n=n||e.target.parentNode.childNodes[0],e=b("increment");e.delta=t,n.dispatchEvent(e)}function o(e){var t=x("div","numInputWrapper"),e=x("input","numInput "+e),n=x("span","arrowUp"),a=x("span","arrowDown");return e.type="text",e.pattern="\\d*",t.appendChild(e),t.appendChild(n),t.appendChild(a),t}function U(){var e,t=window.document.createDocumentFragment(),n=(T.calendarContainer=x("div","flatpickr-calendar"),T.calendarContainer.tabIndex=-1,T.config.noCalendar||(t.appendChild((e=window.document.createDocumentFragment(),T.monthNav=x("div","flatpickr-month"),T.prevMonthNav=x("span","flatpickr-prev-month"),T.prevMonthNav.innerHTML=T.config.prevArrow,T.currentMonthElement=x("span","cur-month"),T.currentMonthElement.title=T.l10n.scrollTitle,n=o("cur-year"),T.currentYearElement=n.childNodes[0],T.currentYearElement.title=T.l10n.scrollTitle,T.config.minDate&&(T.currentYearElement.min=T.config.minDate.getFullYear()),T.config.maxDate&&(T.currentYearElement.max=T.config.maxDate.getFullYear(),T.currentYearElement.disabled=T.config.minDate&&T.config.minDate.getFullYear()===T.config.maxDate.getFullYear()),T.nextMonthNav=x("span","flatpickr-next-month"),T.nextMonthNav.innerHTML=T.config.nextArrow,T.navigationCurrentMonth=x("span","flatpickr-current-month"),T.navigationCurrentMonth.appendChild(T.currentMonthElement),T.navigationCurrentMonth.appendChild(n),e.appendChild(T.prevMonthNav),e.appendChild(T.navigationCurrentMonth),e.appendChild(T.nextMonthNav),T.monthNav.appendChild(e),Object.defineProperty(T,"_hidePrevMonthArrow",{get:function(){return this.__hidePrevMonthArrow},set:function(e){this.__hidePrevMonthArrow!==e&&(T.prevMonthNav.style.display=e?"none":"block"),this.__hidePrevMonthArrow=e}}),Object.defineProperty(T,"_hideNextMonthArrow",{get:function(){return this.__hideNextMonthArrow},set:function(e){this.__hideNextMonthArrow!==e&&(T.nextMonthNav.style.display=e?"none":"block"),this.__hideNextMonthArrow=e}}),y(),T.monthNav)),T.innerContainer=x("div","flatpickr-innerContainer"),T.config.weekNumbers&&T.innerContainer.appendChild((T.calendarContainer.classList.add("hasWeeks"),T.weekWrapper=x("div","flatpickr-weekwrapper"),T.weekWrapper.appendChild(x("span","flatpickr-weekday",T.l10n.weekAbbreviation)),T.weekNumbers=x("div","flatpickr-weeks"),T.weekWrapper.appendChild(T.weekNumbers),T.weekWrapper)),T.rContainer=x("div","flatpickr-rContainer"),T.rContainer.appendChild(z()),T.daysContainer||(T.daysContainer=x("div","flatpickr-days"),T.daysContainer.tabIndex=-1),m(),T.rContainer.appendChild(T.daysContainer),T.innerContainer.appendChild(T.rContainer),t.appendChild(T.innerContainer)),T.config.enableTime&&t.appendChild((()=>{T.calendarContainer.classList.add("hasTime"),T.config.noCalendar&&T.calendarContainer.classList.add("noCalendar"),T.timeContainer=x("div","flatpickr-time"),T.timeContainer.tabIndex=-1;var e=x("span","flatpickr-time-separator",":"),t=o("flatpickr-hour"),n=(T.hourElement=t.childNodes[0],o("flatpickr-minute"));return T.minuteElement=n.childNodes[0],T.hourElement.tabIndex=T.minuteElement.tabIndex=-1,T.hourElement.value=T.pad(T.latestSelectedDateObj?T.latestSelectedDateObj.getHours():T.config.defaultHour),T.minuteElement.value=T.pad(T.latestSelectedDateObj?T.latestSelectedDateObj.getMinutes():T.config.defaultMinute),T.hourElement.step=T.config.hourIncrement,T.minuteElement.step=T.config.minuteIncrement,T.hourElement.min=T.config.time_24hr?0:1,T.hourElement.max=T.config.time_24hr?23:12,T.minuteElement.min=0,T.minuteElement.max=59,T.hourElement.title=T.minuteElement.title=T.l10n.scrollTitle,T.timeContainer.appendChild(t),T.timeContainer.appendChild(e),T.timeContainer.appendChild(n),T.config.time_24hr&&T.timeContainer.classList.add("time24hr"),T.config.enableSeconds&&(T.timeContainer.classList.add("hasSeconds"),t=o("flatpickr-second"),T.secondElement=t.childNodes[0],T.secondElement.value=T.latestSelectedDateObj?T.pad(T.latestSelectedDateObj.getSeconds()):"00",T.secondElement.step=T.minuteElement.step,T.secondElement.min=T.minuteElement.min,T.secondElement.max=T.minuteElement.max,T.timeContainer.appendChild(x("span","flatpickr-time-separator",":")),T.timeContainer.appendChild(t)),T.config.time_24hr||(T.amPM=x("span","flatpickr-am-pm",["AM","PM"][11<T.hourElement.value|0]),T.amPM.title=T.l10n.toggleTitle,T.amPM.tabIndex=-1,T.timeContainer.appendChild(T.amPM)),T.timeContainer})()),E(T.calendarContainer,"rangeMode","range"===T.config.mode),E(T.calendarContainer,"animate",T.config.animate),T.calendarContainer.appendChild(t),T.config.appendTo&&T.config.appendTo.nodeType);if(T.config.inline||T.config.static){if(T.calendarContainer.classList.add(T.config.inline?"inline":"static"),T.config.inline&&!n)return T.element.parentNode.insertBefore(T.calendarContainer,T._input.nextSibling);if(T.config.static)return e=x("div","flatpickr-wrapper"),T.element.parentNode.insertBefore(e,T.element),e.appendChild(T.element),T.altInput&&e.appendChild(T.altInput),e.appendChild(T.calendarContainer)}(n?T.config.appendTo:window.document.body).appendChild(T.calendarContainer)}function u(e,t,n,a){var i=D(t,!0),r=x("span","flatpickr-day "+e,t.getDate());return r.dateObj=t,r.$i=a,r.setAttribute("aria-label",T.formatDate(t,T.config.ariaDateFormat)),0===_(t,T.now)&&(T.todayDateElem=r).classList.add("today"),i?(r.tabIndex=-1,M(t)&&(r.classList.add("selected"),T.selectedDateElem=r,"range"===T.config.mode)&&(E(r,"startRange",0===_(t,T.selectedDates[0])),E(r,"endRange",0===_(t,T.selectedDates[1])))):(r.classList.add("disabled"),T.selectedDates[0]&&t>T.minRangeDate&&t<T.selectedDates[0]?T.minRangeDate=t:T.selectedDates[0]&&t<T.maxRangeDate&&t>T.selectedDates[0]&&(T.maxRangeDate=t)),"range"===T.config.mode&&(a=t,!("range"!==T.config.mode||T.selectedDates.length<2)&&0<=_(a,T.selectedDates[0])&&_(a,T.selectedDates[1])<=0&&!M(t)&&r.classList.add("inRange"),1===T.selectedDates.length)&&(t<T.minRangeDate||t>T.maxRangeDate)&&r.classList.add("notAllowed"),T.config.weekNumbers&&"prevMonthDay"!==e&&n%7==1&&T.weekNumbers.insertAdjacentHTML("beforeend","<span class='disabled flatpickr-day'>"+T.config.getWeek(t)+"</span>"),w("DayCreate",r),r}function f(e,t){function n(){(i=i||T.days.childNodes[a]).focus(),"range"===T.config.mode&&v(i)}var a=e+t||0,i=void 0!==e?T.days.childNodes[a]:T.selectedDateElem||T.todayDateElem||T.days.childNodes[0];if(void 0===i&&0!==t)return 0<t?(T.changeMonth(1),a%=42):t<0&&(T.changeMonth(-1),a+=42),l(n);n()}function l(e){if(!0===T.config.animate)return T._animationLoop.push(e);e()}function m(e){var t=(new Date(T.currentYear,T.currentMonth,1).getDay()-T.l10n.firstDayOfWeek+7)%7,n="range"===T.config.mode,a=(T.prevMonthDays=T.utils.getDaysinMonth((T.currentMonth-1+12)%12),T.selectedDateElem=void 0,T.todayDateElem=void 0,T.utils.getDaysinMonth()),i=window.document.createDocumentFragment(),r=T.prevMonthDays+1-t,o=0;for(T.config.weekNumbers&&T.weekNumbers.firstChild&&(T.weekNumbers.textContent=""),n&&(T.minRangeDate=new Date(T.currentYear,T.currentMonth-1,r),T.maxRangeDate=new Date(T.currentYear,T.currentMonth+1,(42-t)%a));r<=T.prevMonthDays;r++,o++)i.appendChild(u("prevMonthDay",new Date(T.currentYear,T.currentMonth-1,r),r,o));for(r=1;r<=a;r++,o++)i.appendChild(u("",new Date(T.currentYear,T.currentMonth,r),r,o));for(var l=a+1;l<=42-t;l++,o++)i.appendChild(u("nextMonthDay",new Date(T.currentYear,T.currentMonth+1,l%a),l,o));n&&1===T.selectedDates.length&&i.childNodes[0]?(T._hidePrevMonthArrow=T._hidePrevMonthArrow||T.minRangeDate>i.childNodes[0].dateObj,T._hideNextMonthArrow=T._hideNextMonthArrow||T.maxRangeDate<new Date(T.currentYear,T.currentMonth+1,1)):y();n=x("div","dayContainer");if(n.appendChild(i),T.config.animate&&void 0!==e)for(;1<T.daysContainer.childNodes.length;)T.daysContainer.removeChild(T.daysContainer.firstChild);else{var c=T.daysContainer;for(;c.firstChild;)c.removeChild(c.firstChild)}0<=e?T.daysContainer.appendChild(n):T.daysContainer.insertBefore(n,T.daysContainer.firstChild),T.days=T.daysContainer.firstChild,T.daysContainer}function z(){T.weekdayContainer||(T.weekdayContainer=x("div","flatpickr-weekdays"));var e=T.l10n.firstDayOfWeek,t=T.l10n.weekdays.shorthand.slice();return 0<e&&e<t.length&&(t=[].concat(t.splice(e,t.length),t.splice(0,e))),T.weekdayContainer.innerHTML="\n\t\t<span class=flatpickr-weekday>\n\t\t\t"+t.join("</span><span class=flatpickr-weekday>")+"\n\t\t</span>\n\t\t",T.weekdayContainer}function g(e,t,n){t=(t=void 0===t||t)?e:e-T.currentMonth,e=!T.config.animate||!1===n;if(!(t<0&&T._hidePrevMonthArrow||0<t&&T._hideNextMonthArrow)){if(T.currentMonth+=t,(T.currentMonth<0||11<T.currentMonth)&&(T.currentYear+=11<T.currentMonth?1:-1,T.currentMonth=(T.currentMonth+12)%12,w("YearChange")),m(e?void 0:t),e)return w("MonthChange"),y();var a,i=T.navigationCurrentMonth;if(t<0)for(;i.nextSibling&&/curr/.test(i.nextSibling.className);)T.monthNav.removeChild(i.nextSibling);else if(0<t)for(;i.previousSibling&&/curr/.test(i.previousSibling.className);)T.monthNav.removeChild(i.previousSibling);T.oldCurMonth=T.navigationCurrentMonth,T.navigationCurrentMonth=T.monthNav.insertBefore(T.oldCurMonth.cloneNode(!0),0<t?T.oldCurMonth.nextSibling:T.oldCurMonth),0<t?(T.daysContainer.firstChild.classList.add("slideLeft"),T.daysContainer.lastChild.classList.add("slideLeftNew"),T.oldCurMonth.classList.add("slideLeft"),T.navigationCurrentMonth.classList.add("slideLeftNew")):t<0&&(T.daysContainer.firstChild.classList.add("slideRightNew"),T.daysContainer.lastChild.classList.add("slideRight"),T.oldCurMonth.classList.add("slideRight"),T.navigationCurrentMonth.classList.add("slideRightNew")),T.currentMonthElement=T.navigationCurrentMonth.firstChild,T.currentYearElement=T.navigationCurrentMonth.lastChild.childNodes[0],y(),T.oldCurMonth.firstChild.textContent=T.utils.monthToStr(T.currentMonth-t),w("MonthChange"),document.activeElement&&document.activeElement.$i&&(a=document.activeElement.$i,l(function(){f(a,0)}))}}function p(e){return!(!T.config.appendTo||!T.config.appendTo.contains(e))||T.calendarContainer.contains(e)}function t(e){var t,n;T.isOpen&&!T.config.inline&&(t=p(e.target),n=e.target===T.input||e.target===T.altInput||T.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(T.input)||~e.path.indexOf(T.altInput)),("blur"===e.type?!n||!e.relatedTarget||p(e.relatedTarget):n||t)||-1!==T.config.ignoredFocusElements.indexOf(e.target)||(T.close(),"range"!==T.config.mode)||1!==T.selectedDates.length||(T.clear(!1),T.redraw()))}function h(e){var t;!e||T.currentYearElement.min&&e<T.currentYearElement.min||T.currentYearElement.max&&e>T.currentYearElement.max||(e=parseInt(e,10),t=T.currentYear!==e,T.currentYear=e||T.currentYear,T.config.maxDate&&T.currentYear===T.config.maxDate.getFullYear()?T.currentMonth=Math.min(T.config.maxDate.getMonth(),T.currentMonth):T.config.minDate&&T.currentYear===T.config.minDate.getFullYear()&&(T.currentMonth=Math.max(T.config.minDate.getMonth(),T.currentMonth)),t&&(T.redraw(),w("YearChange")))}function D(e,t){if(T.config.minDate&&_(e,T.config.minDate,void 0!==t?t:!T.minDateHasTime)<0||T.config.maxDate&&0<_(e,T.config.maxDate,void 0!==t?t:!T.maxDateHasTime))return!1;if(!T.config.enable.length&&!T.config.disable.length)return!0;for(var n,a=T.parseDate(e,null,!0),i=0<T.config.enable.length,r=i?T.config.enable:T.config.disable,o=0;o<r.length;o++){if((n=r[o])instanceof Function&&n(a))return i;if(n instanceof Date&&n.getTime()===a.getTime())return i;if("string"==typeof n&&T.parseDate(n,null,!0).getTime()===a.getTime())return i;if("object"===(void 0===n?"undefined":_typeof(n))&&n.from&&n.to&&a>=n.from&&a<=n.to)return i}return!i}function q(e){var t=e.target===T._input,n=p(e.target),a=T.config.allowInput,i=T.isOpen&&(!a||!t),r=T.config.inline&&t&&!a;if("Enter"===e.key&&a&&t)return T.setDate(T._input.value,!0,e.target===T.altInput?T.config.altFormat:T.config.dateFormat),e.target.blur();if(n||i||r){var o=T.timeContainer&&T.timeContainer.contains(e.target);switch(e.key){case"Enter":o?k():Q(e);break;case"Escape":e.preventDefault(),T.close();break;case"ArrowLeft":case"ArrowRight":o||(e.preventDefault(),T.daysContainer?(l="ArrowRight"===e.key?1:-1,e.ctrlKey?g(l,!0):f(e.target.$i,l)):T.config.enableTime&&!o&&T.hourElement.focus());break;case"ArrowUp":case"ArrowDown":e.preventDefault();var l="ArrowDown"===e.key?1:-1;T.daysContainer?e.ctrlKey?(h(T.currentYear-l),f(e.target.$i,0)):o||f(e.target.$i,7*l):T.config.enableTime&&(o||T.hourElement.focus(),c(e));break;case"Tab":e.target===T.hourElement?(e.preventDefault(),T.minuteElement.select()):e.target===T.minuteElement&&(T.secondElement||T.amPM)?(e.preventDefault(),(T.secondElement||T.amPM).focus()):e.target===T.secondElement&&(e.preventDefault(),T.amPM.focus());break;case"a":e.target===T.amPM&&(T.amPM.textContent="AM",s(),k());break;case"p":e.target===T.amPM&&(T.amPM.textContent="PM",s(),k())}w("KeyDown",e)}}function v(i){if(1===T.selectedDates.length&&i.classList.contains("flatpickr-day")){for(var r=i.dateObj,o=T.parseDate(T.selectedDates[0],null,!0),l=Math.min(r.getTime(),T.selectedDates[0].getTime()),c=Math.max(r.getTime(),T.selectedDates[0].getTime()),s=!1,e=l;e<c;e+=T.utils.duration.DAY)if(!D(new Date(e))){s=!0;break}for(var t=T.days.childNodes[0].dateObj.getTime(),n=0;n<42;n++,t+=T.utils.duration.DAY)((e,t)=>{var n=e<T.minRangeDate.getTime()||e>T.maxRangeDate.getTime(),a=T.days.childNodes[t];n?(T.days.childNodes[t].classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){a.classList.remove(e)})):s&&!n||(["startRange","inRange","endRange","notAllowed"].forEach(function(e){a.classList.remove(e)}),t=Math.max(T.minRangeDate.getTime(),l),n=Math.min(T.maxRangeDate.getTime(),c),i.classList.add(r<T.selectedDates[0]?"startRange":"endRange"),o<r&&e===o.getTime()?a.classList.add("startRange"):r<o&&e===o.getTime()&&a.classList.add("endRange"),t<=e&&e<=n&&a.classList.add("inRange"))})(t,n)}}function G(){!T.isOpen||T.config.static||T.config.inline||C()}function V(a){return function(e){var t=T.config["_"+a+"Date"]=T.parseDate(e),n=T.config["_"+("min"===a?"max":"min")+"Date"],e=e&&t instanceof Date;e&&(T[a+"DateHasTime"]=t.getHours()||t.getMinutes()||t.getSeconds()),T.selectedDates&&(T.selectedDates=T.selectedDates.filter(function(e){return D(e)}),T.selectedDates.length||"min"!==a||i(t),k()),T.daysContainer&&(Z(),e?T.currentYearElement[a]=t.getFullYear():T.currentYearElement.removeAttribute(a),T.currentYearElement.disabled=n&&t&&n.getFullYear()===t.getFullYear())}}function C(e){var t,n,a,i,r,e=0<arguments.length&&void 0!==e?e:T._positionElement;void 0!==T.calendarContainer&&(i=T.calendarContainer.offsetHeight,t=T.calendarContainer.offsetWidth,r=T.config.position,n=e.getBoundingClientRect(),a=window.innerHeight-n.bottom,r="above"===r||"below"!==r&&a<i&&n.top>i,a=window.pageYOffset+n.top+(r?-i-2:e.offsetHeight+2),E(T.calendarContainer,"arrowTop",!r),E(T.calendarContainer,"arrowBottom",r),T.config.inline||(i=window.pageXOffset+n.left,e=window.document.body.offsetWidth-n.right,r=i+t>window.document.body.offsetWidth,E(T.calendarContainer,"rightMost",r),T.config.static)||(T.calendarContainer.style.top=a+"px",r?(T.calendarContainer.style.left="auto",T.calendarContainer.style.right=e+"px"):(T.calendarContainer.style.left=i+"px",T.calendarContainer.style.right="auto")))}function Z(){T.config.noCalendar||T.isMobile||(z(),y(),m())}function Q(e){var t,n,a;e.preventDefault(),e.stopPropagation(),!e.target.classList.contains("flatpickr-day")||e.target.classList.contains("disabled")||e.target.classList.contains("notAllowed")||(t=(a=T.latestSelectedDateObj=new Date(e.target.dateObj.getTime())).getMonth()!==T.currentMonth&&"range"!==T.config.mode,T.selectedDateElem=e.target,"single"===T.config.mode?T.selectedDates=[a]:"multiple"===T.config.mode?(n=M(a))?T.selectedDates.splice(n,1):T.selectedDates.push(a):"range"===T.config.mode&&(2===T.selectedDates.length&&T.clear(),T.selectedDates.push(a),0!==_(a,T.selectedDates[0],!0))&&T.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}),s(),t&&(n=T.currentYear!==a.getFullYear(),T.currentYear=a.getFullYear(),T.currentMonth=a.getMonth(),n&&w("YearChange"),w("MonthChange")),m(),T.minDateHasTime&&T.config.enableTime&&0===_(a,T.config.minDate)&&i(T.config.minDate),k(),T.config.enableTime&&setTimeout(function(){return T.showTimeInput=!0},50),"range"===T.config.mode&&(1===T.selectedDates.length?(v(e.target),T._hidePrevMonthArrow=T._hidePrevMonthArrow||T.minRangeDate>T.days.childNodes[0].dateObj,T._hideNextMonthArrow=T._hideNextMonthArrow||T.maxRangeDate<new Date(T.currentYear,T.currentMonth+1,1)):y()),w("Change"),t?l(function(){return T.selectedDateElem.focus()}):f(e.target.$i,0),T.config.enableTime&&setTimeout(function(){return T.hourElement.select()},451),T.config.closeOnSelect&&(n="single"===T.config.mode&&!T.config.enableTime,a="range"===T.config.mode&&2===T.selectedDates.length&&!T.config.enableTime,n||a)&&T.close())}function X(e,t){if(e instanceof Array)T.selectedDates=e.map(function(e){return T.parseDate(e,t)});else if(e instanceof Date||!isNaN(e))T.selectedDates=[T.parseDate(e,t)];else if(e&&e.substring)switch(T.config.mode){case"single":T.selectedDates=[T.parseDate(e,t)];break;case"multiple":T.selectedDates=e.split("; ").map(function(e){return T.parseDate(e,t)});break;case"range":T.selectedDates=e.split(T.l10n.rangeSeparator).map(function(e){return T.parseDate(e,t)})}T.selectedDates=T.selectedDates.filter(function(e){return e instanceof Date&&D(e,!1)}),T.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function ee(e){for(var t=e.length;t--;)"string"==typeof e[t]||+e[t]?e[t]=T.parseDate(e[t],null,!0):e[t]&&e[t].from&&e[t].to&&(e[t].from=T.parseDate(e[t].from),e[t].to=T.parseDate(e[t].to));return e.filter(function(e){return e})}function w(e,t){var n=T.config["on"+e];if(void 0!==n&&0<n.length)for(var a=0;n[a]&&a<n.length;a++)n[a](T.selectedDates,T.input.value,T,t);"Change"===e&&(T.input.dispatchEvent(b("change")),T.input.dispatchEvent(b("input")))}function b(e){return T._supportsEvents?new Event(e,{bubbles:!0}):(T._[e+"Event"]=document.createEvent("Event"),T._[e+"Event"].initEvent(e,!0,!0),T._[e+"Event"])}function M(e){for(var t=0;t<T.selectedDates.length;t++)if(0===_(T.selectedDates[t],e))return""+t;return!1}function y(){T.config.noCalendar||T.isMobile||!T.monthNav||(T.currentMonthElement.textContent=T.utils.monthToStr(T.currentMonth)+" ",T.currentYearElement.value=T.currentYear,T._hidePrevMonthArrow=T.config.minDate&&(T.currentYear===T.config.minDate.getFullYear()?T.currentMonth<=T.config.minDate.getMonth():T.currentYear<T.config.minDate.getFullYear()),T._hideNextMonthArrow=T.config.maxDate&&(T.currentYear===T.config.maxDate.getFullYear()?T.currentMonth+1>T.config.maxDate.getMonth():T.currentYear>T.config.maxDate.getFullYear()))}function k(e){if(!T.selectedDates.length)return T.clear(e);T.isMobile&&(T.mobileInput.value=T.selectedDates.length?T.formatDate(T.latestSelectedDateObj,T.mobileFormatStr):"");var t="range"!==T.config.mode?"; ":T.l10n.rangeSeparator;T.input.value=T.selectedDates.map(function(e){return T.formatDate(e,T.config.dateFormat)}).join(t),T.config.altInput&&(T.altInput.value=T.selectedDates.map(function(e){return T.formatDate(e,T.config.altFormat)}).join(t)),!1!==e&&w("ValueUpdate")}function te(e){e.preventDefault();var t,n=T.currentYearElement.parentNode.contains(e.target);e.target!==T.currentMonthElement&&!n||(t=e,t=Math.max(-1,Math.min(1,t.wheelDelta||-t.deltaY)),n?(h(T.currentYear+t),e.target.value=T.currentYear):T.changeMonth(t,!0,!1))}function ne(e){var t=T.prevMonthNav.contains(e.target),n=T.nextMonthNav.contains(e.target);t||n?g(t?-1:1):e.target===T.currentYearElement?(e.preventDefault(),T.currentYearElement.select()):"arrowUp"===e.target.className?T.changeYear(T.currentYear+1):"arrowDown"===e.target.className&&T.changeYear(T.currentYear-1)}function x(e,t,n){e=window.document.createElement(e);return n=n||"",e.className=t=t||"",void 0!==n&&(e.textContent=n),e}function ae(e){return e instanceof Array?e:[e]}function E(e,t,n){if(n)return e.classList.add(t);e.classList.remove(t)}function N(n,a,i){var r=void 0;return function(){var e=this,t=arguments;clearTimeout(r),r=setTimeout(function(){r=null,i||n.apply(e,t)},a),i&&!r&&n.apply(e,t)}}function _(e,t,n){return e instanceof Date&&t instanceof Date&&(!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime())}var T=this,I=(T._={},T._.afterDayAnim=l,T._bind=r,T._compareDates=_,T._setHoursFromDate=i,T.changeMonth=g,T.changeYear=h,T.clear=function(e){T.input.value="",T.altInput&&(T.altInput.value=""),T.mobileInput&&(T.mobileInput.value=""),T.selectedDates=[],T.latestSelectedDateObj=void 0,T.showTimeInput=!1,T.redraw(),!1!==e&&w("Change")},T.close=function(){T.isOpen=!1,T.isMobile||(T.calendarContainer.classList.remove("open"),T._input.classList.remove("active")),w("Close")},T._createElement=x,T.destroy=function(){void 0!==T.config&&w("Destroy");for(var e=T._handlers.length;e--;){var t=T._handlers[e];t.element.removeEventListener(t.event,t.handler)}T._handlers=[],T.mobileInput?(T.mobileInput.parentNode&&T.mobileInput.parentNode.removeChild(T.mobileInput),T.mobileInput=null):T.calendarContainer&&T.calendarContainer.parentNode&&T.calendarContainer.parentNode.removeChild(T.calendarContainer),T.altInput&&(T.input.type="text",T.altInput.parentNode&&T.altInput.parentNode.removeChild(T.altInput),delete T.altInput),T.input&&(T.input.type=T.input._type,T.input.classList.remove("flatpickr-input"),T.input.removeAttribute("readonly"),T.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){return delete T[e]})},T.isEnabled=D,T.jumpToDate=a,T.open=function(e,t){T.isMobile?(e&&(e.preventDefault(),e.target.blur()),setTimeout(function(){T.mobileInput.click()},0),w("Open")):T.isOpen||T._input.disabled||T.config.inline||(T.isOpen=!0,T.calendarContainer.classList.add("open"),C(t),T._input.classList.add("active"),w("Open"))},T.redraw=Z,T.set=function(e,t){T.config[e]=t,T.redraw(),a()},T.setDate=function(e,t,n){if(0!==e&&!e)return T.clear(t);X(e,n),T.showTimeInput=0<T.selectedDates.length,T.latestSelectedDateObj=T.selectedDates[0],T.redraw(),a(),i(),k(t),t&&w("Change")},T.toggle=function(){if(T.isOpen)return T.close();T.open()},T.element=T.input=e,T.instanceConfig=L||{},T.parseDate=FlatpickrInstance.prototype.parseDate.bind(T),T.formatDate=FlatpickrInstance.prototype.formatDate.bind(T),T.formats=Object.create(FlatpickrInstance.prototype.formats),["D","F","J","M","W","l"].forEach(function(e){T.formats[e]=FlatpickrInstance.prototype.formats[e].bind(T)}),T.revFormat.F=FlatpickrInstance.prototype.revFormat.F.bind(T),T.revFormat.M=FlatpickrInstance.prototype.revFormat.M.bind(T),["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"]),S=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange"],F=(T.config=Object.create(flatpickr.defaultConfig),_extends({},T.instanceConfig,JSON.parse(JSON.stringify(T.element.dataset||{}))));T.config.parseDate=F.parseDate,T.config.formatDate=F.formatDate,Object.defineProperty(T.config,"enable",{get:function(){return T.config._enable||[]},set:function(e){return T.config._enable=ee(e)}}),Object.defineProperty(T.config,"disable",{get:function(){return T.config._disable||[]},set:function(e){return T.config._disable=ee(e)}}),_extends(T.config,F),!F.dateFormat&&F.enableTime&&(T.config.dateFormat=T.config.noCalendar?"H:i"+(T.config.enableSeconds?":S":""):flatpickr.defaultConfig.dateFormat+" H:i"+(T.config.enableSeconds?":S":"")),F.altInput&&F.enableTime&&!F.altFormat&&(T.config.altFormat=T.config.noCalendar?"h:i"+(T.config.enableSeconds?":S K":" K"):flatpickr.defaultConfig.altFormat+" h:i"+(T.config.enableSeconds?":S":"")+" K"),Object.defineProperty(T.config,"minDate",{get:function(){return this._minDate},set:V("min")}),Object.defineProperty(T.config,"maxDate",{get:function(){return this._maxDate},set:V("max")}),T.config.minDate=F.minDate,T.config.maxDate=F.maxDate;for(var Y=0;Y<I.length;Y++)T.config[I[Y]]=!0===T.config[I[Y]]||"true"===T.config[I[Y]];for(var O=S.length;O--;)void 0!==T.config[S[O]]&&(T.config[S[O]]=ae(T.config[S[O]]||[]).map(P));for(var ie=0;ie<T.config.plugins.length;ie++){var A,re=T.config.plugins[ie](T)||{};for(A in re)T.config[A]instanceof Array||~S.indexOf(A)?T.config[A]=ae(re[A]).map(P).concat(T.config[A]):void 0===F[A]&&(T.config[A]=re[A])}w("ParseConfig"),"object"!==_typeof(T.config.locale)&&flatpickr.l10ns[T.config.locale],T.l10n=_extends(Object.create(flatpickr.l10ns.default),"object"===_typeof(T.config.locale)?T.config.locale:"default"!==T.config.locale&&flatpickr.l10ns[T.config.locale]||{}),T.input=T.config.wrap?T.element.querySelector("[data-input]"):T.element,T.input&&(T.input._type=T.input.type,T.input.type="text",T.input.classList.add("flatpickr-input"),T._input=T.input,T.config.altInput&&(T.altInput=x(T.input.nodeName,T.input.className+" "+T.config.altInputClass),T._input=T.altInput,T.altInput.placeholder=T.input.placeholder,T.altInput.disabled=T.input.disabled,T.altInput.required=T.input.required,T.altInput.type="text",T.input.type="hidden",!T.config.static)&&T.input.parentNode&&T.input.parentNode.insertBefore(T.altInput,T.input.nextSibling),T.config.allowInput||T._input.setAttribute("readonly","readonly"),T._positionElement=T.config.positionElement||T._input),T.selectedDates=[],T.now=new Date,(e=T.config.defaultDate||T.input.value)&&X(e,T.config.dateFormat);e=T.selectedDates.length?T.selectedDates[0]:T.config.minDate&&T.config.minDate.getTime()>T.now?T.config.minDate:T.config.maxDate&&T.config.maxDate.getTime()<T.now?T.config.maxDate:T.now;return T.currentYear=e.getFullYear(),T.currentMonth=e.getMonth(),T.selectedDates.length&&(T.latestSelectedDateObj=T.selectedDates[0]),T.minDateHasTime=T.config.minDate&&(T.config.minDate.getHours()||T.config.minDate.getMinutes()||T.config.minDate.getSeconds()),T.maxDateHasTime=T.config.maxDate&&(T.config.maxDate.getHours()||T.config.maxDate.getMinutes()||T.config.maxDate.getSeconds()),Object.defineProperty(T,"latestSelectedDateObj",{get:function(){return T._selectedDateObj||T.selectedDates[T.selectedDates.length-1]},set:function(e){T._selectedDateObj=e}}),T.isMobile||Object.defineProperty(T,"showTimeInput",{get:function(){return T._showTimeInput},set:function(e){T._showTimeInput=e,T.calendarContainer&&E(T.calendarContainer,"showTimeInput",e),C()}}),T.utils={duration:{DAY:864e5},getDaysinMonth:function(e,t){return e=void 0===e?T.currentMonth:e,t=void 0===t?T.currentYear:t,1===e&&(t%4==0&&t%100!=0||t%400==0)?29:T.l10n.daysInMonth[e]},monthToStr:function(e,t){return t=void 0===t?T.config.shorthandCurrentMonth:t,T.l10n.months[(t?"short":"long")+"hand"][e]}},T.isOpen=!1,T.isMobile=!T.config.disableMobile&&!T.config.inline&&"single"===T.config.mode&&!T.config.disable.length&&!T.config.enable.length&&!T.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),T.isMobile||U(),R(),(T.selectedDates.length||T.config.noCalendar)&&(T.config.enableTime&&i(T.config.noCalendar?T.latestSelectedDateObj||T.config.minDate:null),k()),T.showTimeInput=0<T.selectedDates.length||T.config.noCalendar,T.config.weekNumbers&&(T.calendarContainer.style.width=T.daysContainer.offsetWidth+T.weekWrapper.offsetWidth+"px"),T.isMobile||C(),w("Ready"),T}function _flatpickr(e,t){for(var n=Array.prototype.slice.call(e),a=[],i=0;i<n.length;i++)try{if(null!==n[i].getAttribute("data-fp-omit"))continue;n[i]._flatpickr&&(n[i]._flatpickr.destroy(),n[i]._flatpickr=null),n[i]._flatpickr=new FlatpickrInstance(n[i],t||{}),a.push(n[i]._flatpickr)}catch(e){}return 1===a.length?a[0]:a}function flatpickr(e,t){return e instanceof NodeList?_flatpickr(e,t):e instanceof HTMLElement?_flatpickr([e],t):_flatpickr(window.document.querySelectorAll(e),t)}var _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,a=arguments[t];for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};FlatpickrInstance.prototype={formats:{Z:function(e){return e.toISOString()},D:function(e){return this.l10n.weekdays.shorthand[this.formats.w(e)]},F:function(e){return this.utils.monthToStr(this.formats.n(e)-1,!1)},G:function(e){return FlatpickrInstance.prototype.pad(FlatpickrInstance.prototype.formats.h(e))},H:function(e){return FlatpickrInstance.prototype.pad(e.getHours())},J:function(e){return e.getDate()+this.l10n.ordinal(e.getDate())},K:function(e){return 11<e.getHours()?"PM":"AM"},M:function(e){return this.utils.monthToStr(e.getMonth(),!0)},S:function(e){return FlatpickrInstance.prototype.pad(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e){return this.config.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(e){return FlatpickrInstance.prototype.pad(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return FlatpickrInstance.prototype.pad(e.getMinutes())},j:function(e){return e.getDate()},l:function(e){return this.l10n.weekdays.longhand[e.getDay()]},m:function(e){return FlatpickrInstance.prototype.pad(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},formatDate:function(a,e){var i=this;return void 0!==this.config&&void 0!==this.config.formatDate?this.config.formatDate(a,e):e.split("").map(function(e,t,n){return i.formats[e]&&"\\"!==n[t-1]?i.formats[e](a):"\\"!==e?e:""}).join("")},revFormat:{D:function(){},F:function(e,t){e.setMonth(this.l10n.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t){var n=e.getHours();12!==n&&e.setHours(n%12+12*/pm/i.test(t))},M:function(e,t){e.setMonth(this.l10n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(t)},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t){return t=parseInt(t),new Date(e.getFullYear(),0,2+7*(t-1),0,0,0,0,0)},Y:function(e,t){e.setFullYear(t)},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:function(){},m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},w:function(){},y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},tokenRegex:{D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"(am|AM|Am|aM|pm|PM|Pm|pM)",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},pad:function(e){return("0"+e).slice(-2)},parseDate:function(e,t,n){if(0!==e&&!e)return null;if(e instanceof Date)e=new Date(e.getTime());else if(void 0!==e.toFixed)e=new Date(e);else{var a=t||(this.config||flatpickr.defaultConfig).dateFormat;if("today"===(e=String(e).trim()))e=new Date,n=!0;else if(/Z$/.test(e)||/GMT$/.test(e))e=new Date(e);else if(this.config&&this.config.parseDate)e=this.config.parseDate(e,a);else{for(var i=this.config&&this.config.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0),r=void 0,o=0,l=0,c="";o<a.length;o++){var s=a[o],d="\\"===s,u="\\"===a[o-1]||d;this.tokenRegex[s]&&!u?(c+=this.tokenRegex[s],(u=new RegExp(c).exec(e))&&(r=!0,i=this.revFormat[s](i,u[++l])||i)):d||(c+=".")}e=r?i:null}}return e instanceof Date?(!0===n&&e.setHours(0,0,0,0),e):null}},"undefined"!=typeof HTMLElement&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return _flatpickr(this,e)},HTMLElement.prototype.flatpickr=function(e){return _flatpickr([this],e)}),flatpickr.defaultConfig=FlatpickrInstance.defaultConfig={mode:"single",position:"auto",animate:-1===window.navigator.userAgent.indexOf("MSIE"),wrap:!1,weekNumbers:!1,allowInput:!1,clickOpens:!0,closeOnSelect:!0,time_24hr:!1,enableTime:!1,noCalendar:!1,dateFormat:"Y-m-d",ariaDateFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",altFormat:"F j, Y",defaultDate:null,minDate:null,maxDate:null,parseDate:null,formatDate:null,getWeek:function(e){var e=new Date(e.getTime()),t=new Date(e.getFullYear(),0,1);return Math.ceil(((e-t)/864e5+t.getDay()+1)/7)},enable:[],disable:[],shorthandCurrentMonth:!1,inline:!1,static:!1,appendTo:null,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",enableSeconds:!1,hourIncrement:1,minuteIncrement:5,defaultHour:12,defaultMinute:0,disableMobile:!1,locale:"default",plugins:[],ignoredFocusElements:[],onClose:void 0,onChange:void 0,onDayCreate:void 0,onMonthChange:void 0,onOpen:void 0,onParseConfig:void 0,onReady:void 0,onValueUpdate:void 0,onYearChange:void 0,onKeyDown:void 0,onDestroy:void 0},flatpickr.l10ns={en:{weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){e%=100;if(3<e&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle"}},flatpickr.l10ns.default=Object.create(flatpickr.l10ns.en),flatpickr.localize=function(e){return _extends(flatpickr.l10ns.default,e||{})},flatpickr.setDefaults=function(e){return _extends(flatpickr.defaultConfig,e||{})},"undefined"!=typeof jQuery&&(jQuery.fn.flatpickr=function(e){return _flatpickr(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+parseInt(e,10))},"undefined"!=typeof module&&(module.exports=flatpickr);
  • content-aware-sidebars/trunk/assets/js/general.min.js

    r3092858 r3320410  
    55 * @copyright 2024 by Joachim Jensen
    66 */
    7 !function($){"use strict";var t={init:function(){this.toggleSidebarStatus(),CAS.showPopups&&(this.upgradeNoticeHandler(),this.reviewNoticeHandler())},toggleSidebarStatus:function(){$(".sidebar-status").on("change","input.sidebar-status-input",function(t){var a=$(this),e=a.is(":checked");if(a.hasClass("sidebar-status-future")&&!confirm(CAS.enableConfirm))return a.attr("checked",!e),t.preventDefault(),!1;$.post(ajaxurl,{action:"cas_sidebar_status",sidebar_id:a.val(),token:a.attr("data-nonce"),status:e},function(t){t.success?(a.next().attr("title",t.data.title),a.removeClass("sidebar-status-future")):(alert(t.data),a.attr("checked",!e))})})},upgradeNoticeHandler:function(){$(".js-cas-pro-notice.button").attr("disabled",!0),$(".js-cas-pro-notice").on("click",function(t){t.preventDefault(),$(".js-cas-pro-read-more").attr("href",$(this).data("url")),$(".js-cas-pro-popup").trigger("click")})},reviewNoticeHandler:function(){var e=$(".js-cas-notice-review");e.on("click","a, button",function(t){var a=$(this);$.ajax({url:ajaxurl,data:{action:"cas_dismiss_review_notice",dismiss:a.data("cas-rating")?1:0},dataType:"JSON",type:"POST",success:function(t){e.fadeOut(400,function(){e.remove()})},error:function(t,a,e){}})})}};$(document).ready(function(){t.init()})}(jQuery);
     7($=>{var t={init:function(){this.toggleSidebarStatus(),CAS.showPopups&&(this.upgradeNoticeHandler(),this.reviewNoticeHandler())},toggleSidebarStatus:function(){$(".sidebar-status").on("change","input.sidebar-status-input",function(t){var a=$(this),e=a.is(":checked");if(a.hasClass("sidebar-status-future")&&!confirm(CAS.enableConfirm))return a.attr("checked",!e),t.preventDefault(),!1;$.post(ajaxurl,{action:"cas_sidebar_status",sidebar_id:a.val(),token:a.attr("data-nonce"),status:e},function(t){t.success?(a.next().attr("title",t.data.title),a.removeClass("sidebar-status-future")):(alert(t.data),a.attr("checked",!e))})})},upgradeNoticeHandler:function(){$(".js-cas-pro-notice.button").attr("disabled",!0),$(".js-cas-pro-notice").on("click",function(t){t.preventDefault(),$(".js-cas-pro-read-more").attr("href",$(this).data("url")),$(".js-cas-pro-popup").trigger("click")})},reviewNoticeHandler:function(){var e=$(".js-cas-notice-review");e.on("click","a, button",function(t){var a=$(this);$.ajax({url:ajaxurl,data:{action:"cas_dismiss_review_notice",dismiss:a.data("cas-rating")?1:0},dataType:"JSON",type:"POST",success:function(t){e.fadeOut(400,function(){e.remove()})},error:function(t,a,e){}})})}};$(document).ready(function(){t.init()})})(jQuery);
  • content-aware-sidebars/trunk/assets/js/suggest-sidebars.min.js

    r3092858 r3320410  
    55 * @copyright 2024 by Joachim Jensen
    66 */
    7 !function($){"use strict";var e={init:function(){this.suggestSidebars(),this.toggleSidebarInputs()},toggleSidebarInputs:function(){$(".js-cas-more").click(function(e){e.preventDefault();var t=$(this),e=$(t.data("toggle")),t=t.children(":first");t.hasClass("dashicons-arrow-down-alt2")?(t.addClass("dashicons-arrow-up-alt2").removeClass("dashicons-arrow-down-alt2"),e.slideDown()):(t.addClass("dashicons-arrow-down-alt2").removeClass("dashicons-arrow-up-alt2"),e.slideUp())})},suggestSidebars:function(){$(".js-cas-sidebars").each(function(){$(this).select2({theme:"wpca",minimumInputLength:0,closeOnSelect:!0,allowClear:!1,width:"100%",escapeMarkup:function(e){return e},createTag:function(e){e=$.trim(e.term);return""===e?null:{id:"_"+e.replace(/,/g,"__"),text:e,new:!0}},templateSelection:function(e){return(e.new?"<b>("+CAS.labelNew+")</b> ":"")+e.text},templateResult:function(e){return(e.new?"<b>"+CAS.createNew+":</b> ":"")+e.text},templateNoMatches:function(e){return CAS.notFound}})})}};$(document).ready(function(){e.init()})}(jQuery);
     7($=>{var e={init:function(){this.suggestSidebars(),this.toggleSidebarInputs()},toggleSidebarInputs:function(){$(".js-cas-more").click(function(e){e.preventDefault();var e=$(this),t=$(e.data("toggle")),e=e.children(":first");e.hasClass("dashicons-arrow-down-alt2")?(e.addClass("dashicons-arrow-up-alt2").removeClass("dashicons-arrow-down-alt2"),t.slideDown()):(e.addClass("dashicons-arrow-down-alt2").removeClass("dashicons-arrow-up-alt2"),t.slideUp())})},suggestSidebars:function(){$(".js-cas-sidebars").each(function(){$(this).select2({theme:"wpca",minimumInputLength:0,closeOnSelect:!0,allowClear:!1,width:"100%",escapeMarkup:function(e){return e},createTag:function(e){e=$.trim(e.term);return""===e?null:{id:"_"+e.replace(/,/g,"__"),text:e,new:!0}},templateSelection:function(e){return(e.new?"<b>("+CAS.labelNew+")</b> ":"")+e.text},templateResult:function(e){return(e.new?"<b>"+CAS.createNew+":</b> ":"")+e.text},templateNoMatches:function(e){return CAS.notFound}})})}};$(document).ready(function(){e.init()})})(jQuery);
  • content-aware-sidebars/trunk/assets/js/widgets.min.js

    r3092858 r3320410  
    55 * @copyright 2024 by Joachim Jensen
    66 */
    7 !function($,CASAdmin){"use strict";var e={$sidebarContainer:$(".widget-liquid-right"),$widgetContainer:$("#available-widgets"),init:function(){CASAdmin.isBlockEditor?setTimeout(function(){$(".wp-block-widget-area .components-panel__body-title").each(function(e,i){CASAdmin.sidebarNames.includes(i.innerText)&&i.classList.add("ca-sidebar")})},2e3):(this.openSidebarByURL(),this.addSidebarToolbar(),this.addWidgetSearch(),this.enhancedWidgetManager())},openSidebarByURL:function(){var e,i;!window.location.hash||(i=(e=this.$sidebarContainer.find(".widgets-holder-wrap")).has(window.location.hash)).length&&i.add(e.first()).find(".handlediv,.sidebar-name-arrow").trigger("click")},enhancedWidgetManager:function(){var i,a;$("body").hasClass("cas-widget-manager")&&(this.$widgetContainer.find(".widget").draggable("option","scroll",!1),i=this,(a=$("#widgets-left .inactive-sidebar")).toggle(this.$widgetContainer.hasClass("closed")),this.$widgetContainer.find(".sidebar-name").click(function(e){a.toggle(i.$widgetContainer.hasClass("closed"))}))},addWidgetSearch:function(){var e=$(".widget",this.$widgetContainer).get().reverse();$(".sidebar-description",this.$widgetContainer).prepend('<input type="search" class="js-cas-widget-filter cas-filter" placeholder="'+CASAdmin.filterWidgets+'...">'),this.searchWidgetListener(e)},searchWidgetListener:function(i){var t,s="";this.$widgetContainer.on("input",".js-cas-widget-filter",function(e){var a=$(this).val();a!=s&&(s=a,t&&clearTimeout(t),t=setTimeout(function(){$(i).each(function(e,i){i=$(i);i.find(".widget-title :nth-child(1)").text().search(new RegExp(a,"i"))<0?i.fadeOut():(i.prependTo(i.parent()),i.fadeIn().css("display",""))})},250))})},addSidebarToolbar:function(){var e='<div class="wp-filter cas-filter-sidebar"><a href="admin.php?page=wpcas-edit" class="button button-primary">'+CASAdmin.addNew+'</a><div class="sidebars-toggle"><a href="#" title="'+CASAdmin.collapse+'" class="js-sidebars-toggle" data-toggle="0"><span class="dashicons dashicons-arrow-up-alt2"></span></a><a href="#" title="'+CASAdmin.expand+'" class="js-sidebars-toggle" data-toggle="1"><span class="dashicons dashicons-arrow-down-alt2"></span></a></div><input type="search" class="js-cas-filter cas-filter" placeholder="'+CASAdmin.filterSidebars+'..."></div>';this.$sidebarContainer.prepend(e),this.searchSidebarListener(),this.addSidebarToggle()},addSidebarToggle:function(){var i=$(document),a=this.$sidebarContainer.find(".widgets-holder-wrap");$("body").on("click",".js-sidebars-toggle",function(e){e.preventDefault();e=!!$(this).data("toggle");a.toggleClass("closed",!e),e&&a.children(".widgets-sortables").sortable("refresh"),i.triggerHandler("wp-pin-menu")})},searchSidebarListener:function(){var i,t=this,s="";this.$sidebarContainer.on("input",".js-cas-filter",function(e){var a=$(this).val();a!=s&&(s=a,i&&clearTimeout(i),i=setTimeout(function(){$(".widgets-holder-wrap",t.$sidebarContainer).each(function(e,i){i=$(i);i.find(".sidebar-name :nth-child(2)").text().search(new RegExp(a,"i"))<0?i.fadeOut():i.fadeIn()})},250))})}};$(document).ready(function(){e.init()})}(jQuery,CASAdmin);
     7(($,CASAdmin)=>{var e={$sidebarContainer:$(".widget-liquid-right"),$widgetContainer:$("#available-widgets"),init:function(){CASAdmin.isBlockEditor?setTimeout(function(){$(".wp-block-widget-area .components-panel__body-title").each(function(e,i){CASAdmin.sidebarNames.includes(i.innerText)&&i.classList.add("ca-sidebar")})},2e3):(this.openSidebarByURL(),this.addSidebarToolbar(),this.addWidgetSearch(),this.enhancedWidgetManager())},openSidebarByURL:function(){var e,i;window.location.hash&&(i=(e=this.$sidebarContainer.find(".widgets-holder-wrap")).has(window.location.hash)).length&&i.add(e.first()).find(".handlediv,.sidebar-name-arrow").trigger("click")},enhancedWidgetManager:function(){var i,a;$("body").hasClass("cas-widget-manager")&&(this.$widgetContainer.find(".widget").draggable("option","scroll",!1),i=this,(a=$("#widgets-left .inactive-sidebar")).toggle(this.$widgetContainer.hasClass("closed")),this.$widgetContainer.find(".sidebar-name").click(function(e){a.toggle(i.$widgetContainer.hasClass("closed"))}))},addWidgetSearch:function(){var e=$(".widget",this.$widgetContainer).get().reverse();$(".sidebar-description",this.$widgetContainer).prepend('<input type="search" class="js-cas-widget-filter cas-filter" placeholder="'+CASAdmin.filterWidgets+'...">'),this.searchWidgetListener(e)},searchWidgetListener:function(i){var t,s="";this.$widgetContainer.on("input",".js-cas-widget-filter",function(e){var a=$(this).val();a!=s&&(s=a,t&&clearTimeout(t),t=setTimeout(function(){$(i).each(function(e,i){i=$(i);i.find(".widget-title :nth-child(1)").text().search(new RegExp(a,"i"))<0?i.fadeOut():(i.prependTo(i.parent()),i.fadeIn().css("display",""))})},250))})},addSidebarToolbar:function(){var e='<div class="wp-filter cas-filter-sidebar"><a href="admin.php?page=wpcas-edit" class="button button-primary">'+CASAdmin.addNew+'</a><div class="sidebars-toggle"><a href="#" title="'+CASAdmin.collapse+'" class="js-sidebars-toggle" data-toggle="0"><span class="dashicons dashicons-arrow-up-alt2"></span></a><a href="#" title="'+CASAdmin.expand+'" class="js-sidebars-toggle" data-toggle="1"><span class="dashicons dashicons-arrow-down-alt2"></span></a></div><input type="search" class="js-cas-filter cas-filter" placeholder="'+CASAdmin.filterSidebars+'..."></div>';this.$sidebarContainer.prepend(e),this.searchSidebarListener(),this.addSidebarToggle()},addSidebarToggle:function(){var i=$(document),a=this.$sidebarContainer.find(".widgets-holder-wrap");$("body").on("click",".js-sidebars-toggle",function(e){e.preventDefault();e=!!$(this).data("toggle");a.toggleClass("closed",!e),e&&a.children(".widgets-sortables").sortable("refresh"),i.triggerHandler("wp-pin-menu")})},searchSidebarListener:function(){var i,t=this,s="";this.$sidebarContainer.on("input",".js-cas-filter",function(e){var a=$(this).val();a!=s&&(s=a,i&&clearTimeout(i),i=setTimeout(function(){$(".widgets-holder-wrap",t.$sidebarContainer).each(function(e,i){i=$(i);i.find(".sidebar-name :nth-child(2)").text().search(new RegExp(a,"i"))<0?i.fadeOut():i.fadeIn()})},250))})}};$(document).ready(function(){e.init()})})(jQuery,CASAdmin);
  • content-aware-sidebars/trunk/content-aware-sidebars.php

    r3229095 r3320410  
    99 * Plugin URI:        https://dev.institute/wordpress-sidebars/
    1010 * Description:       Unlimited custom sidebars and widget areas for any post, page, category etc.
    11  * Version:           3.21.1
     11 * Version:           3.21.2
    1212 * Author:            DEV Institute
    1313 * Author URI:        https://dev.institute
  • content-aware-sidebars/trunk/lib/freemius/assets/css/admin/connect.css

    r3092858 r3320410  
    1 #fs_connect{margin:60px auto 20px;width:484px}#fs_connect a{color:inherit}#fs_connect a:not(.button){text-decoration:underline}#fs_connect .fs-box-container{background:#f0f0f1;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.3);overflow:hidden;padding-top:40px}@media screen and (max-width:483px){#fs_connect{margin:30px 0 0 -10px;width:auto}#fs_connect .fs-box-container{box-shadow:none}}#fs_connect .fs-content{background:#fff;padding:30px 20px}#fs_connect .fs-content .fs-error{background:snow;border:1px solid #d3135a;box-shadow:0 1px 1px 0 rgba(0,0,0,.1);color:#d3135a;margin-bottom:10px;padding:5px;text-align:center}#fs_connect .fs-content h2{line-height:1.5em}#fs_connect .fs-content p{font-size:1.2em;margin:0;padding:0}#fs_connect .fs-license-key-container{margin:10px auto 0;position:relative;width:280px}#fs_connect .fs-license-key-container input{width:100%}#fs_connect .fs-license-key-container .dashicons{position:absolute;right:5px;top:5px}#fs_connect.require-license-key .fs-content{padding-bottom:10px}#fs_connect.require-license-key .fs-actions{border-top:none}#fs_connect.require-license-key .fs-sites-list-container td{cursor:pointer}#fs_connect #delegate_to_site_admins{border-bottom:1px dashed;float:right;font-weight:700;height:26px;line-height:37px;margin-right:15px;text-decoration:none;vertical-align:middle}#fs_connect #delegate_to_site_admins.rtl{margin-left:15px;margin-right:0}#fs_connect .fs-actions{background:#fff;border-color:#f1f1f1;border-style:solid;border-width:1px 0;padding:10px 20px}#fs_connect .fs-actions .button{font-size:16px;height:37px;line-height:35px;margin-bottom:0;padding:0 10px 1px}#fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}#fs_connect .fs-actions .button.button-primary{padding-left:15px;padding-right:15px}#fs_connect .fs-actions .button.button-primary:after{content:" ➜"}#fs_connect .fs-actions .button.button-primary.fs-loading:after{content:""}#fs_connect .fs-actions .button.button-secondary{float:right}#fs_connect.fs-anonymous-disabled .fs-actions .button.button-primary{width:100%}#fs_connect .fs-permissions{background:#fff;padding:10px 20px;transition:background .5s ease}#fs_connect .fs-permissions .fs-license-sync-disclaimer{margin-top:0;text-align:center}#fs_connect .fs-permissions>.fs-trigger{display:block;font-size:.9em;text-align:center;text-decoration:none}#fs_connect .fs-permissions>.fs-trigger .fs-arrow:after{content:"→";display:inline-block;width:20px}#fs_connect .fs-permissions.fs-open>.fs-trigger .fs-arrow:after{content:"↓"!important}#fs_connect .fs-permissions ul li{padding-left:0;padding-right:0}@media screen and (max-width:483px){#fs_connect .fs-permissions ul{height:auto;margin:20px}}#fs_connect .fs-freemium-licensing{background:#777;color:#fff;padding:8px}#fs_connect .fs-freemium-licensing p{display:block;margin:0;padding:0;text-align:center}#fs_connect .fs-freemium-licensing a{color:inherit;text-decoration:underline}#fs_connect .fs-header{height:0;line-height:0;padding:0;position:relative}#fs_connect .fs-header .fs-connect-logo,#fs_connect .fs-header .fs-site-icon{border-radius:50%;position:absolute;top:-8px}#fs_connect .fs-header .fs-site-icon{left:152px}#fs_connect .fs-header .fs-connect-logo{right:152px}#fs_connect .fs-header .fs-site-icon,#fs_connect .fs-header img,#fs_connect .fs-header object{border-radius:50%;height:50px;width:50px}#fs_connect .fs-header .fs-plugin-icon{border-radius:50%;left:50%;margin-left:-44px;overflow:hidden;position:absolute;top:-23px;z-index:1}#fs_connect .fs-header .fs-plugin-icon,#fs_connect .fs-header .fs-plugin-icon img{height:80px;width:80px}#fs_connect .fs-header .dashicons-wordpress-alt{background:#01749a;border-radius:50%;color:#fff;font-size:40px;height:40px;padding:5px;width:40px}#fs_connect .fs-header .dashicons-plus{color:#bbb;font-size:30px;margin-top:-10px;position:absolute;top:50%}#fs_connect .fs-header .dashicons-plus.fs-first{left:28%}#fs_connect .fs-header .dashicons-plus.fs-second{left:65%}#fs_connect .fs-header .fs-connect-logo,#fs_connect .fs-header .fs-plugin-icon,#fs_connect .fs-header .fs-site-icon{background:#fff;border:1px solid #efefef;padding:3px}#fs_connect .fs-terms{font-size:.85em;padding:10px 5px;text-align:center}#fs_connect .fs-terms,#fs_connect .fs-terms a{color:#999}#fs_connect .fs-terms a{text-decoration:none}.fs-multisite-options-container{border:1px solid #ccc;margin-top:20px;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:700}.fs-multisite-options-container.fs-apply-on-all-sites{border:0;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}#fs_marketing_optin{border:1px solid #ccc;display:none;line-height:1.5em;margin-top:10px;padding:10px}#fs_marketing_optin .fs-message{display:block;font-size:1.05em;font-weight:600;margin-bottom:5px}#fs_marketing_optin.error{background:#fee;border:1px solid #d3135a}#fs_marketing_optin.error .fs-message{color:#d3135a}#fs_marketing_optin .fs-input-container{margin-top:5px}#fs_marketing_optin .fs-input-container label{display:block;margin-top:5px}#fs_marketing_optin .fs-input-container label input{float:left;margin:1px 0 0}#fs_marketing_optin .fs-input-container label:first-child{display:block;margin-bottom:2px}#fs_marketing_optin .fs-input-label{display:block;margin-left:20px}#fs_marketing_optin .fs-input-label .underlined{text-decoration:underline}.rtl #fs_marketing_optin .fs-input-container label input{float:right}.rtl #fs_marketing_optin .fs-input-label{margin-left:0;margin-right:20px}.rtl #fs_connect{border-radius:3px}.rtl #fs_connect .fs-actions{background:#c0c7ca;padding:10px 20px}.rtl #fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}.rtl #fs_connect .fs-actions .button.button-primary:after{content:" »"}.rtl #fs_connect .fs-actions .button.button-primary.fs-loading:after{content:""}.rtl #fs_connect .fs-actions .button.button-secondary{float:left}.rtl #fs_connect .fs-header .fs-site-icon{left:auto;right:20px}.rtl #fs_connect .fs-header .fs-connect-logo{left:20px;right:auto}.rtl #fs_connect .fs-permissions>.fs-trigger .fs-arrow:after{content:"←"}#fs_theme_connect_wrapper{background:rgba(0,0,0,.75);height:100%;overflow-y:auto;position:fixed;text-align:center;top:0;width:100%;z-index:99990}#fs_theme_connect_wrapper:before{content:"";display:inline-block;height:100%;vertical-align:middle}#fs_theme_connect_wrapper>button.close{background-color:transparent;border:0;color:#fff;cursor:pointer;height:40px;position:absolute;right:0;top:32px;width:40px}#fs_theme_connect_wrapper #fs_connect{display:inline-block;margin-bottom:20px;margin-top:0;text-align:left;top:0;vertical-align:middle}#fs_theme_connect_wrapper #fs_connect .fs-terms,#fs_theme_connect_wrapper #fs_connect .fs-terms a{color:#c5c5c5}.wp-pointer-content #fs_connect{box-shadow:none;margin:0}.fs-opt-in-pointer .wp-pointer-content{padding:0}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow{border-bottom-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#fafafa}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow{border-top-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow-inner{border-top-color:#fafafa}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow{border-right-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow-inner{border-right-color:#fafafa}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow{border-left-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow-inner{border-left-color:#fafafa}#license_issues_link{display:block;font-size:.9em;margin-top:10px;text-align:center}.fs-tooltip-trigger{position:relative}.fs-tooltip-trigger:not(a){cursor:help}.fs-tooltip-trigger .dashicons{float:none!important}.fs-tooltip-trigger .fs-tooltip{background:rgba(0,0,0,.8);border-radius:5px;bottom:100%;box-shadow:1px 1px 1px rgba(0,0,0,.2);color:#fff!important;font-family:arial,serif;font-size:12px;font-weight:700;left:-17px;line-height:1.3em;margin-bottom:5px;opacity:0;padding:10px;position:absolute;right:0;text-align:left;text-transform:none!important;transition:opacity .3s ease-in-out;visibility:hidden;z-index:999999}.rtl .fs-tooltip-trigger .fs-tooltip{left:auto;right:-17px;text-align:right}.fs-tooltip-trigger .fs-tooltip:after{border-color:rgba(0,0,0,.8) transparent transparent;border-style:solid;border-width:5px 5px 0;content:" ";display:block;height:0;left:21px;position:absolute;top:100%;width:0}.rtl .fs-tooltip-trigger .fs-tooltip:after{left:auto;right:21px}.fs-tooltip-trigger:hover .fs-tooltip{opacity:1;visibility:visible}.fs-permissions .fs-permission.fs-disabled,.fs-permissions .fs-permission.fs-disabled .fs-permission-description span{color:#aaa}.fs-permissions .fs-permission .fs-switch-feedback{position:absolute;right:15px;top:52px}.fs-permissions ul{height:0;margin:0;overflow:hidden}.fs-permissions ul li{margin:0;padding:17px 15px;position:relative}.fs-permissions ul li>i.dashicons{float:left;font-size:30px;height:30px;padding:5px;width:30px}.fs-permissions ul li .fs-switch{float:right}.fs-permissions ul li .fs-permission-description{margin-left:55px}.fs-permissions ul li .fs-permission-description span{color:#23282d;font-size:14px;font-weight:500}.fs-permissions ul li .fs-permission-description .fs-tooltip{font-size:13px;font-weight:700}.fs-permissions ul li .fs-permission-description .fs-tooltip-trigger .dashicons{margin:-1px 2px 0}.fs-permissions ul li .fs-permission-description p{margin:2px 0 0}.fs-permissions.fs-open{background:#fff}.fs-permissions.fs-open ul{height:auto;margin:20px 0 10px;overflow:initial}.fs-permissions .fs-switch-feedback .fs-ajax-spinner{margin-right:10px}.fs-permissions .fs-switch-feedback.success{color:#71ae00}.rtl .fs-permissions .fs-switch-feedback{left:15px;right:auto}.rtl .fs-permissions .fs-switch-feedback .fs-ajax-spinner{margin-left:10px;margin-right:0}.rtl .fs-permissions ul li .fs-permission-description{margin-left:0;margin-right:55px}.rtl .fs-permissions ul li .fs-switch{float:left}.rtl .fs-permissions ul li i.dashicons{float:right}
     1#fs_connect{margin:60px auto 20px;width:484px}#fs_connect a{color:inherit}#fs_connect a:not(.button){text-decoration:underline}#fs_connect .fs-box-container{background:#f0f0f1;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.3);overflow:hidden;padding-top:40px}@media screen and (max-width:483px){#fs_connect{margin:30px 0 0 -10px;width:auto}#fs_connect .fs-box-container{box-shadow:none}}#fs_connect .fs-content{background:#fff;padding:30px 20px}#fs_connect .fs-content .fs-error{background:snow;border:1px solid #d3135a;box-shadow:0 1px 1px 0 rgba(0,0,0,.1);color:#d3135a;margin-bottom:10px;padding:5px;text-align:center}#fs_connect .fs-content h2{line-height:1.5em}#fs_connect .fs-content p{font-size:1.2em;margin:0;padding:0}#fs_connect .fs-license-key-container{margin:10px auto 0;position:relative;width:280px}#fs_connect .fs-license-key-container input{width:100%}#fs_connect .fs-license-key-container .dashicons{position:absolute;right:5px;top:5px}#fs_connect.require-license-key .fs-content{padding-bottom:10px}#fs_connect.require-license-key .fs-actions{border-top:none}#fs_connect.require-license-key .fs-sites-list-container td{cursor:pointer}#fs_connect #delegate_to_site_admins{border-bottom:1px dashed;float:right;font-weight:700;height:26px;line-height:37px;margin-right:15px;text-decoration:none;vertical-align:middle}#fs_connect #delegate_to_site_admins.rtl{margin-left:15px;margin-right:0}#fs_connect .fs-actions{background:#fff;border-color:#f1f1f1;border-style:solid;border-width:1px 0;padding:10px 20px}#fs_connect .fs-actions .button{font-size:16px;height:37px;line-height:35px;margin-bottom:0;padding:0 10px 1px}#fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}#fs_connect .fs-actions .button.button-primary{padding-left:15px;padding-right:15px}#fs_connect .fs-actions .button.button-primary:after{content:" ➜"}#fs_connect .fs-actions .button.button-primary.fs-loading:after{content:""}#fs_connect .fs-actions .button.button-secondary{float:right}#fs_connect.fs-anonymous-disabled .fs-actions .button.button-primary{width:100%}#fs_connect .fs-permissions{background:#fff;padding:10px 20px;transition:background .5s ease}#fs_connect .fs-permissions .fs-license-sync-disclaimer{margin-top:0;text-align:center}#fs_connect .fs-permissions>.fs-trigger{display:block;font-size:.9em;text-align:center;text-decoration:none}#fs_connect .fs-permissions>.fs-trigger .fs-arrow:after{content:"→";display:inline-block;width:20px}#fs_connect .fs-permissions.fs-open>.fs-trigger .fs-arrow:after{content:"↓"!important}#fs_connect .fs-permissions ul li{padding-left:0;padding-right:0}@media screen and (max-width:483px){#fs_connect .fs-permissions ul{height:auto;margin:20px}}#fs_connect .fs-freemium-licensing{background:#777;color:#fff;padding:8px}#fs_connect .fs-freemium-licensing p{display:block;margin:0;padding:0;text-align:center}#fs_connect .fs-freemium-licensing a{color:inherit;text-decoration:underline}#fs_connect .fs-header{height:0;line-height:0;padding:0;position:relative}#fs_connect .fs-header .fs-connect-logo,#fs_connect .fs-header .fs-site-icon{border-radius:50%;position:absolute;top:-8px}#fs_connect .fs-header .fs-site-icon{left:152px}#fs_connect .fs-header .fs-connect-logo{right:152px}#fs_connect .fs-header .fs-site-icon,#fs_connect .fs-header img,#fs_connect .fs-header object{border-radius:50%;height:50px;width:50px}#fs_connect .fs-header .fs-plugin-icon{border-radius:50%;left:50%;margin-left:-44px;overflow:hidden;position:absolute;top:-23px;z-index:1}#fs_connect .fs-header .fs-plugin-icon,#fs_connect .fs-header .fs-plugin-icon img{height:80px;width:80px}#fs_connect .fs-header .dashicons-wordpress-alt{background:#01749a;border-radius:50%;color:#fff;font-size:40px;height:40px;padding:5px;width:40px}#fs_connect .fs-header .dashicons-plus{color:#bbb;font-size:30px;margin-top:-10px;position:absolute;top:50%}#fs_connect .fs-header .dashicons-plus.fs-first{left:28%}#fs_connect .fs-header .dashicons-plus.fs-second{left:65%}#fs_connect .fs-header .fs-connect-logo,#fs_connect .fs-header .fs-plugin-icon,#fs_connect .fs-header .fs-site-icon{background:#fff;border:1px solid #efefef;padding:3px}#fs_connect .fs-terms{font-size:.85em;padding:10px 5px;text-align:center}#fs_connect .fs-terms,#fs_connect .fs-terms a{color:#999}#fs_connect .fs-terms a{text-decoration:none}.fs-multisite-options-container{border:1px solid #ccc;margin-top:20px;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:700}.fs-multisite-options-container.fs-apply-on-all-sites{border:0;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}#fs_marketing_optin,#fs_orphan_license_message{border:1px solid #ccc;display:none;line-height:1.5em;margin-top:10px;padding:10px}#fs_marketing_optin .fs-message,#fs_orphan_license_message .fs-message{display:block;font-size:1.05em;font-weight:600;margin-bottom:5px}#fs_marketing_optin.error,#fs_orphan_license_message.error{background:#fee;border:1px solid #d3135a}#fs_marketing_optin.error .fs-message,#fs_orphan_license_message.error .fs-message{color:#d3135a}#fs_marketing_optin .fs-input-container,#fs_orphan_license_message .fs-input-container{margin-top:5px}#fs_marketing_optin .fs-input-container label,#fs_orphan_license_message .fs-input-container label{display:block;margin-top:5px}#fs_marketing_optin .fs-input-container label input,#fs_orphan_license_message .fs-input-container label input{float:left;margin:1px 0 0}#fs_marketing_optin .fs-input-container label:first-child,#fs_orphan_license_message .fs-input-container label:first-child{display:block;margin-bottom:2px}#fs_marketing_optin .fs-input-label,#fs_orphan_license_message .fs-input-label{display:block;margin-left:20px}#fs_marketing_optin .fs-input-label .underlined,#fs_orphan_license_message .fs-input-label .underlined{text-decoration:underline}.rtl #fs_marketing_optin .fs-input-container label input{float:right}.rtl #fs_marketing_optin .fs-input-label{margin-left:0;margin-right:20px}.rtl #fs_connect{border-radius:3px}.rtl #fs_connect .fs-actions{background:#c0c7ca;padding:10px 20px}.rtl #fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}.rtl #fs_connect .fs-actions .button.button-primary:after{content:" »"}.rtl #fs_connect .fs-actions .button.button-primary.fs-loading:after{content:""}.rtl #fs_connect .fs-actions .button.button-secondary{float:left}.rtl #fs_connect .fs-header .fs-site-icon{left:auto;right:20px}.rtl #fs_connect .fs-header .fs-connect-logo{left:20px;right:auto}.rtl #fs_connect .fs-permissions>.fs-trigger .fs-arrow:after{content:"←"}#fs_theme_connect_wrapper{background:rgba(0,0,0,.75);height:100%;overflow-y:auto;position:fixed;text-align:center;top:0;width:100%;z-index:99990}#fs_theme_connect_wrapper:before{content:"";display:inline-block;height:100%;vertical-align:middle}#fs_theme_connect_wrapper>button.close{background-color:transparent;border:0;color:#fff;cursor:pointer;height:40px;position:absolute;right:0;top:32px;width:40px}#fs_theme_connect_wrapper #fs_connect{display:inline-block;margin-bottom:20px;margin-top:0;text-align:left;top:0;vertical-align:middle}#fs_theme_connect_wrapper #fs_connect .fs-terms,#fs_theme_connect_wrapper #fs_connect .fs-terms a{color:#c5c5c5}.wp-pointer-content #fs_connect{box-shadow:none;margin:0}.fs-opt-in-pointer .wp-pointer-content{padding:0}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow{border-bottom-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#fafafa}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow{border-top-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow-inner{border-top-color:#fafafa}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow{border-right-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow-inner{border-right-color:#fafafa}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow{border-left-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow-inner{border-left-color:#fafafa}#license_issues_link{display:block;font-size:.9em;margin-top:10px;text-align:center}.fs-tooltip-trigger{position:relative}.fs-tooltip-trigger:not(a){cursor:help}.fs-tooltip-trigger .dashicons{float:none!important}.fs-tooltip-trigger .fs-tooltip{background:rgba(0,0,0,.8);border-radius:5px;bottom:100%;box-shadow:1px 1px 1px rgba(0,0,0,.2);color:#fff!important;font-family:arial,serif;font-size:12px;font-weight:700;left:-17px;line-height:1.3em;margin-bottom:5px;opacity:0;padding:10px;position:absolute;right:0;text-align:left;text-transform:none!important;transition:opacity .3s ease-in-out;visibility:hidden;z-index:999999}.rtl .fs-tooltip-trigger .fs-tooltip{left:auto;right:-17px;text-align:right}.fs-tooltip-trigger .fs-tooltip:after{border-color:rgba(0,0,0,.8) transparent transparent;border-style:solid;border-width:5px 5px 0;content:" ";display:block;height:0;left:21px;position:absolute;top:100%;width:0}.rtl .fs-tooltip-trigger .fs-tooltip:after{left:auto;right:21px}.fs-tooltip-trigger:hover .fs-tooltip{opacity:1;visibility:visible}.fs-permissions .fs-permission.fs-disabled,.fs-permissions .fs-permission.fs-disabled .fs-permission-description span{color:#aaa}.fs-permissions .fs-permission .fs-switch-feedback{position:absolute;right:15px;top:52px}.fs-permissions ul{height:0;margin:0;overflow:hidden}.fs-permissions ul li{margin:0;padding:17px 15px;position:relative}.fs-permissions ul li>i.dashicons{float:left;font-size:30px;height:30px;padding:5px;width:30px}.fs-permissions ul li .fs-switch{float:right}.fs-permissions ul li .fs-permission-description{margin-left:55px}.fs-permissions ul li .fs-permission-description span{color:#23282d;font-size:14px;font-weight:500}.fs-permissions ul li .fs-permission-description .fs-tooltip{font-size:13px;font-weight:700}.fs-permissions ul li .fs-permission-description .fs-tooltip-trigger .dashicons{margin:-1px 2px 0}.fs-permissions ul li .fs-permission-description p{margin:2px 0 0}.fs-permissions.fs-open{background:#fff}.fs-permissions.fs-open ul{height:auto;margin:20px 0 10px;overflow:initial}.fs-permissions .fs-switch-feedback .fs-ajax-spinner{margin-right:10px}.fs-permissions .fs-switch-feedback.success{color:#71ae00}.rtl .fs-permissions .fs-switch-feedback{left:15px;right:auto}.rtl .fs-permissions .fs-switch-feedback .fs-ajax-spinner{margin-left:10px;margin-right:0}.rtl .fs-permissions ul li .fs-permission-description{margin-left:0;margin-right:55px}.rtl .fs-permissions ul li .fs-switch{float:left}.rtl .fs-permissions ul li i.dashicons{float:right}
  • content-aware-sidebars/trunk/lib/freemius/assets/css/admin/debug.css

    r3092858 r3320410  
    1 label.fs-tag,span.fs-tag{background:#ffba00;border-radius:3px;color:#fff;display:inline-block;font-size:11px;line-height:11px;padding:5px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}.fs-switch-label{font-size:20px;line-height:31px;margin:0 5px}#fs_log_book table{font-family:Consolas,Monaco,monospace;font-size:12px}#fs_log_book table th{color:#ccc}#fs_log_book table tr{background:#232525}#fs_log_book table tr.alternate{background:#2b2b2b}#fs_log_book table tr td.fs-col--logger{color:#5a7435}#fs_log_book table tr td.fs-col--type{color:#ffc861}#fs_log_book table tr td.fs-col--function{color:#a7b7b1;font-weight:700}#fs_log_book table tr td.fs-col--message,#fs_log_book table tr td.fs-col--message a{color:#9a73ac!important}#fs_log_book table tr td.fs-col--file{color:#d07922}#fs_log_book table tr td.fs-col--timestamp{color:#6596be}
     1label.fs-tag,span.fs-tag{background:#ffba00;border-radius:3px;color:#fff;display:inline-block;font-size:11px;line-height:11px;padding:5px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}.fs-switch-label{font-size:20px;line-height:31px;margin:0 5px}.fs-debug-table-toggle-button{background:transparent;border:none;cursor:pointer;font-size:1.2em}.fs-debug-table{overflow:hidden}#fs_log_book table{font-family:Consolas,Monaco,monospace;font-size:12px}#fs_log_book table th{color:#ccc}#fs_log_book table tr{background:#232525}#fs_log_book table tr.alternate{background:#2b2b2b}#fs_log_book table tr td.fs-col--logger{color:#5a7435}#fs_log_book table tr td.fs-col--type{color:#ffc861}#fs_log_book table tr td.fs-col--function{color:#a7b7b1;font-weight:700}#fs_log_book table tr td.fs-col--message,#fs_log_book table tr td.fs-col--message a{color:#9a73ac!important}#fs_log_book table tr td.fs-col--file{color:#d07922}#fs_log_book table tr td.fs-col--timestamp{color:#6596be}
  • content-aware-sidebars/trunk/lib/freemius/assets/js/postmessage.js

    r3092858 r3320410  
    1 !function(e,t){var s,n,o,i,r,a,c,p,u=this;u.FS=u.FS||{},u.FS.PostMessage=(n=new NoJQueryPostMessageMixin("postMessage","receiveMessage"),o={},i=decodeURIComponent(document.location.hash.replace(/^#/,"")),r=i.substring(0,i.indexOf("/","https://"===i.substring(0,8)?8:7)),a=""!==i,c=e(window),p=e("html"),{init:function(e,t){s=e,n.receiveMessage((function(e){var t=JSON.parse(e.data);if(o[t.type])for(var s=0;s<o[t.type].length;s++)o[t.type][s](t.data)}),s),FS.PostMessage.receiveOnce("forward",(function(e){window.location=e.url})),(t=t||[]).length>0&&c.on("scroll",(function(){for(var e=0;e<t.length;e++)FS.PostMessage.postScroll(t[e])}))},init_child:function(){this.init(r),e(window).bind("load",(function(){FS.PostMessage.postHeight(),FS.PostMessage.post("loaded")}))},hasParent:function(){return a},postHeight:function(t,s){t=t||0,s=s||"#wrap_section",this.post("height",{height:t+e(s).outerHeight(!0)})},postScroll:function(e){this.post("scroll",{top:c.scrollTop(),height:c.height()-parseFloat(p.css("paddingTop"))-parseFloat(p.css("marginTop"))},e)},post:function(e,t,s){console.debug("PostMessage.post",e),s?n.postMessage(JSON.stringify({type:e,data:t}),s.src,s.contentWindow):n.postMessage(JSON.stringify({type:e,data:t}),i,window.parent)},receive:function(e,s){console.debug("PostMessage.receive",e),t===o[e]&&(o[e]=[]),o[e].push(s)},receiveOnce:function(e,t){this.is_set(e)||this.receive(e,t)},is_set:function(e){return t!=o[e]},parent_url:function(){return i},parent_subdomain:function(){return r}})}(jQuery);
     1!function(t,e){var s,n,o,i,r,a,c,p,u=this;u.FS=u.FS||{},u.FS.PostMessage=(n=new NoJQueryPostMessageMixin("postMessage","receiveMessage"),o={},i=decodeURIComponent(document.location.hash.replace(/^#/,"")),r=i.substring(0,i.indexOf("/","https://"===i.substring(0,8)?8:7)),a=""!==i,c=t(window),p=t("html"),{init:function(t,e){s=t,n.receiveMessage((function(t){var e=JSON.parse(t.data);if(o[e.type])for(var s=0;s<o[e.type].length;s++)o[e.type][s](e.data)}),s),FS.PostMessage.receiveOnce("forward",(function(t){t.url&&(t.url.startsWith("http://")||t.url.startsWith("https://"))&&(window.location=t.url)})),(e=e||[]).length>0&&c.on("scroll",(function(){for(var t=0;t<e.length;t++)FS.PostMessage.postScroll(e[t])}))},init_child:function(){a&&(this.init(r),t(window).bind("load",(function(){FS.PostMessage.postHeight(),FS.PostMessage.post("loaded")})))},hasParent:function(){return a},postHeight:function(e,s){e=e||0,s=s||"#wrap_section",this.post("height",{height:e+t(s).outerHeight(!0)})},postScroll:function(t){this.post("scroll",{top:c.scrollTop(),height:c.height()-parseFloat(p.css("paddingTop"))-parseFloat(p.css("marginTop"))},t)},post:function(t,e,s){console.debug("PostMessage.post",t),s?n.postMessage(JSON.stringify({type:t,data:e}),s.src,s.contentWindow):n.postMessage(JSON.stringify({type:t,data:e}),i,window.parent)},receive:function(t,s){console.debug("PostMessage.receive",t),e===o[t]&&(o[t]=[]),o[t].push(s)},receiveOnce:function(t,e){this.is_set(t)||this.receive(t,e)},is_set:function(t){return e!=o[t]},parent_url:function(){return i},parent_subdomain:function(){return r}})}(jQuery);
  • content-aware-sidebars/trunk/lib/freemius/includes/class-freemius.php

    r3229095 r3320410  
    36303630            $this->delete_current_install( false );
    36313631
    3632             $license_key = false;
     3632            $license = null;
    36333633
    36343634            if (
     
    36383638                )
    36393639            ) {
    3640                 $license_key = $this->_license->secret_key;
     3640                $license = $this->_license;
    36413641            }
    36423642
     
    36453645                false,
    36463646                false,
    3647                 $license_key,
     3647                ( is_object( $license ) ? $license->secret_key : false ),
    36483648                false,
    36493649                false,
     
    36513651                null,
    36523652                array(),
    3653                 false
     3653                false,
     3654                ( is_object( $license ) ? $license->user_id : null )
    36543655            );
    36553656        }
     
    76607661                    false,
    76617662                    false,
    7662                     $license->secret_key
     7663                    $license->secret_key,
     7664                    false,
     7665                    false,
     7666                    false,
     7667                    null,
     7668                    array(),
     7669                    true,
     7670                    $license->user_id
    76637671                );
    76647672            } else {
     
    77247732                    false,
    77257733                    null,
    7726                     $sites
     7734                    $sites,
     7735                    true,
     7736                    $license->user_id
    77277737                );
    77287738            } else {
     
    77787788         * @param int               $blog_id
    77797789         */
    7780         private function maybe_activate_bundle_license( FS_Plugin_License $license = null, $sites = array(), $blog_id = 0 ) {
     7790        private function maybe_activate_bundle_license( $license = null, $sites = array(), $blog_id = 0 ) {
    77817791            if ( ! is_object( $license ) && $this->has_active_valid_license() ) {
    77827792                $license = $this->_license;
     
    79507960                    null,
    79517961                    $sites,
    7952                     ( $current_blog_id > 0 ? $current_blog_id : null )
     7962                    ( $current_blog_id > 0 ? $current_blog_id : null ),
     7963                    $license->user_id
    79537964                );
    79547965            }
     
    1157711588                    }
    1157811589
    11579                     $missing_plan = self::_get_plan_by_id( $plan_id );
     11590                    $missing_plan = self::_get_plan_by_id( $plan_id, false );
    1158011591
    1158111592                    if ( is_object( $missing_plan ) ) {
     
    1173911750         * @return FS_Plugin_Plan|false
    1174011751         */
    11741         function _get_plan_by_id( $id ) {
     11752        function _get_plan_by_id( $id, $allow_sync = true ) {
    1174211753            $this->_logger->entrance();
    1174311754
    11744             if ( ! is_array( $this->_plans ) || 0 === count( $this->_plans ) ) {
     11755            if ( $allow_sync && ( ! is_array( $this->_plans ) || 0 === count( $this->_plans ) ) ) {
    1174511756                $this->_sync_plans();
    1174611757            }
     
    1238612397         * @param \FS_Plugin_License $license
    1238712398         */
    12388         private function set_license( FS_Plugin_License $license = null ) {
     12399        private function set_license( $license = null ) {
    1238912400            $this->_license = $license;
    1239012401
     
    1348613497                fs_request_get( 'user_id', null ),
    1348713498                fs_request_get_bool( 'is_extensions_tracking_allowed', null ),
    13488                 fs_request_get_bool( 'is_diagnostic_tracking_allowed', null )
     13499                fs_request_get_bool( 'is_diagnostic_tracking_allowed', null ),
     13500                fs_request_get( 'license_owner_id', null )
    1348913501            );
    1349013502
     
    1363513647         * @param array       $sites
    1363613648         * @param int         $blog_id
     13649         * @param null|number $license_owner_id
    1363713650         *
    1363813651         * @return array {
     
    1364913662            $plugin_id = null,
    1365013663            $sites = array(),
    13651             $blog_id = null
     13664            $blog_id = null,
     13665            $license_owner_id = null
    1365213666        ) {
    1365313667            $this->_logger->entrance();
     
    1366013674                $is_marketing_allowed,
    1366113675                $blog_id,
    13662                 $plugin_id
     13676                $plugin_id,
     13677                null,
     13678                null,
     13679                null,
     13680                $license_owner_id
    1366313681            );
    1366413682
     
    1373413752         * @param null|int    $blog_id
    1373513753         * @param null|number $plugin_id
    13736          * @param null|number $license_owner_id
     13754         * @param null|number $user_id
    1373713755         * @param bool|null   $is_extensions_tracking_allowed
    1373813756         * @param bool|null   $is_diagnostic_tracking_allowed Since 2.5.0.2 to allow license activation with minimal data footprint.
     13757         * @param null|number $license_owner_id
    1373913758         *
    1374013759         *
     
    1375113770            $blog_id = null,
    1375213771            $plugin_id = null,
    13753             $license_owner_id = null,
     13772            $user_id = null,
    1375413773            $is_extensions_tracking_allowed = null,
    13755             $is_diagnostic_tracking_allowed = null
     13774            $is_diagnostic_tracking_allowed = null,
     13775            $license_owner_id = null
    1375613776        ) {
    1375713777            $this->_logger->entrance();
     
    1384213862                        $install_ids = array();
    1384313863
    13844                         $change_owner = FS_User::is_valid_id( $license_owner_id );
     13864                        $change_owner = FS_User::is_valid_id( $user_id );
    1384513865
    1384613866                        if ( $change_owner ) {
    13847                             $params['user_id'] = $license_owner_id;
     13867                            $params['user_id'] = $user_id;
    1384813868
    1384913869                            $installs_info_by_slug_map = $fs->get_parent_and_addons_installs_info();
     
    1392113941                    false,
    1392213942                    $is_marketing_allowed,
    13923                     $sites
     13943                    $sites,
     13944                    true,
     13945                    $license_owner_id
    1392413946                );
    1392513947
     
    1563115653         * @return bool Since 2.3.1 returns if a switch was made.
    1563215654         */
    15633         function switch_to_blog( $blog_id, FS_Site $install = null, $flush = false ) {
     15655        function switch_to_blog( $blog_id, $install = null, $flush = false ) {
    1563415656            if ( ! is_numeric( $blog_id ) ) {
    1563515657                return false;
     
    1693716959         * @param array         $override_with
    1693816960         * @param bool|int|null $network_level_or_blog_id If true, return params for network level opt-in. If integer, get params for specified blog in the network.
     16961         * @param bool          $skip_user_info
    1693916962         *
    1694016963         * @return array
    1694116964         */
    16942         function get_opt_in_params( $override_with = array(), $network_level_or_blog_id = null ) {
     16965        function get_opt_in_params( $override_with = array(), $network_level_or_blog_id = null, $skip_user_info = false ) {
    1694316966            $this->_logger->entrance();
    16944 
    16945             $current_user = self::_get_current_wp_user();
    1694616967
    1694716968            $activation_action = $this->get_unique_affix() . '_activate_new';
     
    1695516976
    1695616977            $params = array_merge( $versions, array(
    16957                 'user_firstname'    => $current_user->user_firstname,
    16958                 'user_lastname'     => $current_user->user_lastname,
    16959                 'user_email'        => $current_user->user_email,
    1696016978                'plugin_slug'       => $this->_slug,
    1696116979                'plugin_id'         => $this->get_id(),
     
    1697316991            ) );
    1697416992
     16993            if (
     16994                ! $skip_user_info &&
     16995                (
     16996                    empty( $override_with['user_firstname'] ) ||
     16997                    empty( $override_with['user_lastname'] ) ||
     16998                    empty( $override_with['user_email'] )
     16999                )
     17000            ) {
     17001                $current_user = self::_get_current_wp_user();
     17002
     17003                $params['user_firstname'] = $current_user->user_firstname;
     17004                $params['user_lastname']  = $current_user->user_lastname;
     17005                $params['user_email']     = $current_user->user_email;
     17006            }
     17007
    1697517008            if ( $this->is_addon() ) {
    1697617009                $parent_fs = $this->get_parent_instance();
     
    1705217085         * @param array       $sites                If network-level opt-in, an array of containing details of sites.
    1705317086         * @param bool        $redirect
     17087         * @param null|number $license_owner_id
    1705417088         *
    1705517089         * @return string|object
     
    1706617100            $is_marketing_allowed = null,
    1706717101            $sites = array(),
    17068             $redirect = true
     17102            $redirect = true,
     17103            $license_owner_id = null
    1706917104        ) {
    1707017105            $this->_logger->entrance();
    17071 
    17072             if ( false === $email ) {
    17073                 $current_user = self::_get_current_wp_user();
    17074                 $email        = $current_user->user_email;
    17075             }
    1707617106
    1707717107            /**
     
    1708417114
    1708517115                if ( ! $is_uninstall ) {
     17116                    if ( false === $email ) {
     17117                        $current_user = self::_get_current_wp_user();
     17118                        $email        = $current_user->user_email;
     17119                    }
     17120
    1708617121                    $fs_user = Freemius::_get_user_by_email( $email );
    1708717122                    if ( is_object( $fs_user ) && ! $this->is_pending_activation() ) {
     
    1709817133            }
    1709917134
     17135            $skip_user_info = ( ! empty( $license_key ) && FS_User::is_valid_id( $license_owner_id ) );
     17136
    1710017137            $user_info = array();
    17101             if ( ! empty( $email ) ) {
    17102                 $user_info['user_email'] = $email;
    17103             }
    17104             if ( ! empty( $first ) ) {
    17105                 $user_info['user_firstname'] = $first;
    17106             }
    17107             if ( ! empty( $last ) ) {
    17108                 $user_info['user_lastname'] = $last;
     17138
     17139            if ( ! $skip_user_info ) {
     17140                if ( ! empty( $email ) ) {
     17141                    $user_info['user_email'] = $email;
     17142                }
     17143
     17144                if ( ! empty( $first ) ) {
     17145                    $user_info['user_firstname'] = $first;
     17146                }
     17147
     17148                if ( ! empty( $last ) ) {
     17149                    $user_info['user_lastname'] = $last;
     17150                }
    1710917151            }
    1711017152
     
    1711717159            }
    1711817160
    17119             $params = $this->get_opt_in_params( $user_info, $is_network );
     17161            $params = $this->get_opt_in_params( $user_info, $is_network, $skip_user_info );
    1712017162
    1712117163            $filtered_license_key = false;
     
    1811318155            Freemius $parent_fs,
    1811418156            $network_level_or_blog_id = null,
    18115             FS_Plugin_License $bundle_license = null
     18157            $bundle_license = null
    1811618158        ) {
    1811718159            if ( $this->is_registered() ) {
     
    1874618788         */
    1874718789        function is_pricing_page_visible() {
    18748             return (
     18790            $visible = (
    1874918791                // Has at least one paid plan.
    1875018792                $this->has_paid_plan() &&
     
    1875418796                ( ! $this->is_paying() || ! $this->is_single_plan( true ) )
    1875518797            );
     18798
     18799            return $this->apply_filters( 'is_pricing_page_visible', $visible );
    1875618800        }
    1875718801
     
    1970919753         * @param \FS_Site $site                     Since 2.0.0
    1971019754         */
    19711         private function _store_site( $store = true, $network_level_or_blog_id = null, FS_Site $site = null, $is_backup = false ) {
     19755        private function _store_site( $store = true, $network_level_or_blog_id = null, $site = null, $is_backup = false ) {
    1971219756            $this->_logger->entrance();
    1971319757
     
    2154921593                        false,
    2155021594                        false,
    21551                         $premium_license->secret_key
     21595                        $premium_license->secret_key,
     21596                        false,
     21597                        false,
     21598                        false,
     21599                        null,
     21600                        array(),
     21601                        true,
     21602                        $premium_license->user_id
    2155221603                    );
    2155321604
  • content-aware-sidebars/trunk/lib/freemius/includes/class-fs-logger.php

    r3203370 r3320410  
    637637            $order = false
    638638        ) {
    639             global $wpdb;
     639            if ( empty( $filename ) ) {
     640                $filename = 'fs-logs-' . date( 'Y-m-d_H-i-s', WP_FS__SCRIPT_START_TIME ) . '.csv';
     641            }
     642
     643            $upload_dir = wp_upload_dir();
     644            $filepath   = rtrim( $upload_dir['path'], '/' ) . "/{$filename}";
     645
     646            WP_Filesystem();
     647            if ( ! $GLOBALS['wp_filesystem']->is_writable( dirname( $filepath ) ) ) {
     648                return false;
     649            }
    640650
    641651            $query = self::build_db_logs_query(
     
    647657            );
    648658
    649             $upload_dir = wp_upload_dir();
    650             if ( empty( $filename ) ) {
    651                 $filename = 'fs-logs-' . date( 'Y-m-d_H-i-s', WP_FS__SCRIPT_START_TIME ) . '.csv';
    652             }
    653             $filepath = rtrim( $upload_dir['path'], '/' ) . "/{$filename}";
    654 
    655             $query .= " INTO OUTFILE '{$filepath}' FIELDS TERMINATED BY '\t' ESCAPED BY '\\\\' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\\n'";
    656 
    657659            $columns = '';
    658660            for ( $i = 0, $len = count( self::$_log_columns ); $i < $len; $i ++ ) {
     
    666668            $query = "SELECT {$columns} UNION ALL " . $query;
    667669
    668             $result = $wpdb->query( $query );
     670            $result = $GLOBALS['wpdb']->get_results( $query );
    669671
    670672            if ( false === $result ) {
     673                return false;
     674            }
     675
     676            if ( ! self::write_csv_to_filesystem( $filepath, $result ) ) {
    671677                return false;
    672678            }
     
    692698        }
    693699
     700        /**
     701         * @param string $file_path
     702         * @param array  $query_results
     703         *
     704         * @return bool
     705         */
     706        private static function write_csv_to_filesystem( $file_path, $query_results ) {
     707            if ( empty( $query_results ) ) {
     708                return false;
     709            }
     710
     711            $content = '';
     712
     713            foreach ( $query_results as $row ) {
     714                $row_data = array_map( function ( $value ) {
     715                    return str_replace( "\n", ' ', $value );
     716                }, (array) $row );
     717                $content  .= implode( "\t", $row_data ) . "\n";
     718            }
     719
     720            if ( ! $GLOBALS['wp_filesystem']->put_contents( $file_path, $content, FS_CHMOD_FILE ) ) {
     721                return false;
     722            }
     723
     724            return true;
     725        }
     726
    694727        #endregion
    695728    }
  • content-aware-sidebars/trunk/lib/freemius/includes/managers/class-fs-clone-manager.php

    r3203370 r3320410  
    413413         * @since 2.5.0
    414414         *
    415          * @param Freemius    $instance
    416          * @param string|false $license_key
     415         * @param Freemius               $instance
     416         * @param FS_Plugin_License|null $license
    417417         *
    418418         * @return bool TRUE if successfully connected. FALSE if failed and had to restore install from backup.
    419419         */
    420         private function delete_install_and_connect( Freemius $instance, $license_key = false ) {
     420        private function delete_install_and_connect( Freemius $instance, $license = null ) {
    421421            $user = Freemius::_get_user_by_id( $instance->get_site()->user_id );
    422422
     
    430430                $user = Freemius::_get_user_by_email( $current_user->user_email );
    431431            }
     432
     433            $license_key      = ( is_object( $license ) ? $license->secret_key : false );
     434            $license_owner_id = ( is_object( $license ) ? $license->user_id : null );
    432435
    433436            if ( is_object( $user ) ) {
     
    440443                    false,
    441444                    false,
    442                     $license_key
     445                    $license_key,
     446                    false,
     447                    false,
     448                    false,
     449                    null,
     450                    array(),
     451                    true,
     452                    $license_owner_id
    443453                );
    444454            }
     
    506516
    507517            // If the site is a clone of another subsite in the network, or a localhost one, try to auto activate the license.
    508             return $this->delete_install_and_connect( $instance, $license->secret_key );
     518            return $this->delete_install_and_connect( $instance, $license );
    509519        }
    510520
  • content-aware-sidebars/trunk/lib/freemius/start.php

    r3229095 r3320410  
    88
    99    if ( ! defined( 'ABSPATH' ) ) {
    10         exit;
     10        return;
    1111    }
    1212
     
    1616     * @var string
    1717     */
    18     $this_sdk_version = '2.11.0';
     18    $this_sdk_version = '2.12.0';
    1919
    2020    #region SDK Selection Logic --------------------------------------------------------------------
     
    9191     * @since 2.2.3
    9292     */
    93     $themes_directory         = get_theme_root( get_stylesheet() );
    94     $themes_directory_name    = basename( $themes_directory );
     93    $themes_directory      = fs_normalize_path( get_theme_root( get_stylesheet() ) );
     94    $themes_directory_name = basename( $themes_directory );
    9595
    9696    // This change ensures that the condition works even if the SDK is located in a subdirectory (e.g., vendor)
     
    129129         */
    130130        if ( DIRECTORY_SEPARATOR . $this_sdk_relative_path === $fs_root_path && function_exists( 'fs_find_direct_caller_plugin_file' ) ) {
    131             $original_plugin_dir_name = dirname( fs_find_direct_caller_plugin_file( $file_path ) );
    132 
    133             // Remove everything before the original plugin directory name.
    134             $this_sdk_relative_path = substr( $this_sdk_relative_path, strpos( $this_sdk_relative_path, $original_plugin_dir_name ) );
    135 
    136             unset( $original_plugin_dir_name );
     131            $direct_caller_plugin_file = fs_find_direct_caller_plugin_file( $file_path );
     132
     133            if ( ! empty( $direct_caller_plugin_file ) ) {
     134                $original_plugin_dir_name = dirname( $direct_caller_plugin_file );
     135
     136                // Remove everything before the original plugin directory name.
     137                $this_sdk_relative_path = substr( $this_sdk_relative_path, strpos( $this_sdk_relative_path, $original_plugin_dir_name ) );
     138
     139                unset( $original_plugin_dir_name );
     140            }
    137141        }
    138142    }
     
    442446     *      fs_plugin_icon_{plugin_slug}
    443447     *      fs_show_trial_{plugin_slug}
     448     *      fs_is_pricing_page_visible_{plugin_slug}
    444449     *
    445450     * --------------------------------------------------------
  • content-aware-sidebars/trunk/lib/freemius/templates/add-ons.php

    r3203370 r3320410  
    375375    <script type="text/javascript">
    376376        (function( $, undef ) {
     377            $( 'a.thickbox' ).on( 'click', function () {
     378                setTimeout( function () {
     379                    $( '#TB_window' ).addClass( 'plugin-details-modal' );
     380                }, 0 );
     381            } );
     382
    377383            <?php if ( $open_addon ) : ?>
    378384
  • content-aware-sidebars/trunk/lib/freemius/templates/checkout/process-redirect.php

    r3203370 r3320410  
    5252        $loader.show();
    5353
    54         switch ( action ) {
    55             case 'install':
    56                 processInstall( data );
    57                 break;
    58             case 'pending_activation':
    59                 processPendingActivation( data );
    60                 break;
    61             default:
    62                 syncLicense( data );
    63                 break;
     54        // This remains compatible with the same filter in /templates/checkout/frame.php.
     55        // You can return a promise to make the successive redirection wait until your own processing is completed.
     56        // However for most cases, we recommend sending a beacon request {https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon}
     57        var processPurchaseEvent = (<?php echo $fs->apply_filters('checkout/purchaseCompleted', 'function (data) {
     58            console.log("checkout", "purchaseCompleted");
     59        }'); ?>)(data.purchaseData);
     60
     61        if (typeof Promise !== 'undefined' && processPurchaseEvent instanceof Promise) {
     62            processPurchaseEvent.finally(function () {
     63                finishProcessing(action, data);
     64            });
     65        } else {
     66            finishProcessing(action, data);
     67        }
     68
     69        function finishProcessing(action, data) {
     70            switch ( action ) {
     71                case 'install':
     72                    processInstall( data );
     73                    break;
     74                case 'pending_activation':
     75                    processPendingActivation( data );
     76                    break;
     77                case 'return_without_sync':
     78                    goToAccount();
     79                    break;
     80                default:
     81                    syncLicense( data );
     82                    break;
     83            }
    6484        }
    6585
     
    102122            window.location.href = redirectUrl.toString();
    103123        }
     124
     125        function goToAccount() {
     126            window.location.href = <?php echo wp_json_encode( $fs->get_account_url() ) ?>;
     127        }
    104128    });
    105129</script>
  • content-aware-sidebars/trunk/lib/freemius/templates/connect.php

    r3203370 r3320410  
    336336                        </label>
    337337                    </div>
     338                </div>
     339                <div id="fs_orphan_license_message">
     340                    <span class="fs-message"><?php fs_echo_inline( "A user has not yet been associated with the license, which is necessary to prevent unauthorized activation. To assign the license to your user, you agree to share your WordPress user's full name and email address." ) ?></span>
    338341                </div>
    339342            <?php endif ?>
     
    740743                        licenseKey = $licenseKeyInput.val(),
    741744                        data       = {
    742                             action     : action,
    743                             security   : security,
    744                             license_key: licenseKey,
    745                             module_id  : '<?php echo $fs->get_id() ?>'
     745                            action          : action,
     746                            security        : security,
     747                            license_key     : licenseKey,
     748                            module_id       : '<?php echo $fs->get_id() ?>',
     749                            license_owner_id: licenseOwnerIDByLicense[ licenseKey ]
    746750                        };
    747751
     
    916920                    if ('' === key) {
    917921                        $primaryCta.attr('disabled', 'disabled');
    918                         $marketingOptin.hide();
     922                        hideOptinAndLicenseMessage();
    919923                    } else {
    920924                        $primaryCta.prop('disabled', false);
     
    923927                            fetchIsMarketingAllowedFlagAndToggleOptin();
    924928                        } else {
    925                             $marketingOptin.hide();
     929                            hideOptinAndLicenseMessage();
    926930                        }
    927931                    }
     
    959963        //--------------------------------------------------------------------------------
    960964        var isMarketingAllowedByLicense = {},
    961             $marketingOptin = $('#fs_marketing_optin'),
    962             previousLicenseKey = null;
     965            licenseOwnerIDByLicense     = {},
     966            $marketingOptin             = $( '#fs_marketing_optin' ),
     967            $orphanLicenseMessage       = $( '#fs_orphan_license_message' ),
     968            previousLicenseKey          = null;
    963969
    964970        if (requireLicenseKey) {
     
    982988                            $primaryCta.focus();
    983989                        }
     990
     991                        $orphanLicenseMessage.toggle( false === licenseOwnerIDByLicense[ licenseKey ] );
     992
     993                        if ( false !== licenseOwnerIDByLicense[ licenseKey ] ) {
     994                            $( 'input[name=user_firstname]' ).remove();
     995                            $( 'input[name=user_lastname]' ).remove();
     996                            $( 'input[name=user_email]' ).remove();
     997                        }
    984998                    },
    985999                    /**
     
    9911005
    9921006                        if (licenseKey.length < 32) {
    993                             $marketingOptin.hide();
     1007                            hideOptinAndLicenseMessage();
     1008
    9941009                            return;
    9951010                        }
     
    10001015                        }
    10011016
    1002                         $marketingOptin.hide();
    1003 
     1017                        hideOptinAndLicenseMessage();
    10041018                        setLoadingMode();
    10051019
     
    10251039                                    // Cache result.
    10261040                                    isMarketingAllowedByLicense[licenseKey] = result.is_marketing_allowed;
     1041                                    licenseOwnerIDByLicense[ licenseKey ]   = result.license_owner_id;
    10271042                                }
    10281043
     
    10301045                            }
    10311046                        });
     1047                    },
     1048                    hideOptinAndLicenseMessage = function() {
     1049                        $marketingOptin.hide();
     1050                        $orphanLicenseMessage.hide();
    10321051                    };
    10331052
  • content-aware-sidebars/trunk/lib/freemius/templates/debug.php

    r3203370 r3320410  
    262262            'val' => wp_using_ext_object_cache() ? 'true' : 'false',
    263263        ),
     264        array(
     265            'key' => 'Freemius::get_unfiltered_site_url()',
     266            'val' => Freemius::get_unfiltered_site_url(),
     267        ),
    264268    )
    265269?>
     
    285289    </tbody>
    286290</table>
    287 <h2><?php fs_esc_html_echo_x_inline( 'SDK Versions', 'as software development kit versions', 'sdk-versions' ) ?></h2>
    288 <table id="fs_sdks" class="widefat">
     291<h2>
     292    <button class="fs-debug-table-toggle-button" aria-expanded="true">
     293        <span class="fs-debug-table-toggle-icon">▼</span>
     294    </button>
     295    <?php fs_esc_html_echo_x_inline( 'SDK Versions', 'as software development kit versions', 'sdk-versions' ) ?>
     296</h2>
     297<table id="fs_sdks" class="widefat fs-debug-table">
    289298    <thead>
    290299    <tr>
     
    320329    <?php $modules = fs_get_entities( $fs_options->get_option( $module_type . 's' ), FS_Plugin::get_class_name() ) ?>
    321330    <?php if ( is_array( $modules ) && count( $modules ) > 0 ) : ?>
    322         <h2><?php echo esc_html( ( WP_FS__MODULE_TYPE_PLUGIN == $module_type ) ? fs_text_inline( 'Plugins', 'plugins' ) : fs_text_inline( 'Themes', 'themes' ) ) ?></h2>
    323         <table id="fs_<?php echo $module_type ?>" class="widefat">
     331        <h2>
     332            <button class="fs-debug-table-toggle-button" aria-expanded="true">
     333                <span class="fs-debug-table-toggle-icon">▼</span>
     334            </button>
     335            <?php echo esc_html( ( WP_FS__MODULE_TYPE_PLUGIN == $module_type ) ? fs_text_inline( 'Plugins', 'plugins' ) : fs_text_inline( 'Themes', 'themes' ) ) ?>
     336        </h2>
     337        <table id="fs_<?php echo $module_type ?>" class="widefat fs-debug-table">
    324338            <thead>
    325339            <tr>
     
    453467    ?>
    454468    <?php if ( is_array( $sites_map ) && count( $sites_map ) > 0 ) : ?>
    455         <h2><?php echo esc_html( sprintf(
     469        <h2>
     470            <button class="fs-debug-table-toggle-button" aria-expanded="true">
     471                <span class="fs-debug-table-toggle-icon">▼</span>
     472            </button>
     473            <?php echo esc_html( sprintf(
    456474            /* translators: %s: 'plugin' or 'theme' */
    457475                fs_text_inline( '%s Installs', 'module-installs' ),
    458476                ( WP_FS__MODULE_TYPE_PLUGIN === $module_type ? fs_text_inline( 'Plugin', 'plugin' ) : fs_text_inline( 'Theme', 'theme' ) )
    459             ) ) ?> / <?php fs_esc_html_echo_x_inline( 'Sites', 'like websites', 'sites' ) ?></h2>
    460         <table id="fs_<?php echo $module_type ?>_installs" class="widefat">
     477            ) ) ?> / <?php fs_esc_html_echo_x_inline( 'Sites', 'like websites', 'sites' ) ?>
     478        </h2>
     479        <table id="fs_<?php echo $module_type ?>_installs" class="widefat fs-debug-table">
    461480            <thead>
    462481            <tr>
     
    568587?>
    569588<?php foreach ( $addons as $plugin_id => $plugin_addons ) : ?>
    570     <h2><?php echo esc_html( sprintf( fs_text_inline( 'Add Ons of module %s', 'addons-of-x' ), $plugin_id ) ) ?></h2>
    571     <table id="fs_addons" class="widefat">
     589    <h2>
     590        <button class="fs-debug-table-toggle-button" aria-expanded="true">
     591            <span class="fs-debug-table-toggle-icon">▼</span>
     592        </button>
     593        <?php echo esc_html( sprintf( fs_text_inline( 'Add Ons of module %s', 'addons-of-x' ), $plugin_id ) ) ?>
     594    </h2>
     595    <table id="fs_addons" class="widefat fs-debug-table">
    572596        <thead>
    573597        <tr>
     
    627651?>
    628652<?php if ( is_array( $users ) && 0 < count( $users ) ) : ?>
    629     <h2><?php fs_esc_html_echo_inline( 'Users' ) ?></h2>
    630     <table id="fs_users" class="widefat">
     653    <h2>
     654        <button class="fs-debug-table-toggle-button" aria-expanded="true">
     655            <span class="fs-debug-table-toggle-icon">▼</span>
     656        </button>
     657        <?php fs_esc_html_echo_inline( 'Users' ) ?>
     658    </h2>
     659    <table id="fs_users" class="widefat fs-debug-table">
    631660        <thead>
    632661        <tr>
     
    676705    $licenses = $VARS[ $module_type . '_licenses' ] ?>
    677706    <?php if ( is_array( $licenses ) && count( $licenses ) > 0 ) : ?>
    678         <h2><?php echo esc_html( sprintf( fs_text_inline( '%s Licenses', 'module-licenses' ), ( WP_FS__MODULE_TYPE_PLUGIN === $module_type ? fs_text_inline( 'Plugin', 'plugin' ) : fs_text_inline( 'Theme', 'theme' ) ) ) ) ?></h2>
    679         <table id="fs_<?php echo $module_type ?>_licenses" class="widefat">
     707        <h2>
     708            <button class="fs-debug-table-toggle-button" aria-expanded="true">
     709                <span class="fs-debug-table-toggle-icon">▼</span>
     710            </button>
     711            <?php echo esc_html( sprintf( fs_text_inline( '%s Licenses', 'module-licenses' ), ( WP_FS__MODULE_TYPE_PLUGIN === $module_type ? fs_text_inline( 'Plugin', 'plugin' ) : fs_text_inline( 'Theme', 'theme' ) ) ) ) ?>
     712        </h2>
     713        <table id="fs_<?php echo $module_type ?>_licenses" class="widefat fs-debug-table">
    680714            <thead>
    681715            <tr>
     
    715749    <?php endif ?>
    716750<?php endforeach ?>
     751<?php
     752    $page_params = array( 'is_fs_debug_page' => true );
     753    fs_require_template( 'debug/scheduled-crons.php', $page_params );
     754?>
    717755<?php if ( FS_Logger::is_storage_logging_on() ) : ?>
    718756
     
    889927    </script>
    890928<?php endif ?>
     929<script type="text/javascript">
     930    // JavaScript to toggle the visibility of the table body and change the caret icon
     931    jQuery( document ).ready( function ( $ ) {
     932        $( '.fs-debug-table-toggle-button' ).on( 'click', function () {
     933            const button     = $( this );
     934            const table      = button.closest( 'h2' ).next( 'table' );
     935            const isExpanded = ( 'false' === button.attr( 'aria-expanded' ) );
     936
     937            button.attr( 'aria-expanded', isExpanded );
     938            button.find( '.fs-debug-table-toggle-icon' ).text( isExpanded ? '▼' : '▶' );
     939
     940            table.css( {
     941                display          : isExpanded ? 'table' : 'block',
     942                borderBottomWidth: isExpanded ? '1px' : '0',
     943                maxHeight        : isExpanded ? 'auto' : '0',
     944            } );
     945        } );
     946
     947        $( '.fs-debug-table-toggle-button:last' ).click();
     948    } );
     949</script>
  • content-aware-sidebars/trunk/lib/freemius/templates/debug/scheduled-crons.php

    r2934101 r3320410  
    1313    $fs_options      = FS_Options::instance( WP_FS__ACCOUNTS_OPTION_NAME, true );
    1414    $scheduled_crons = array();
     15
     16    $is_fs_debug_page = ( isset( $VARS['is_fs_debug_page'] ) && $VARS['is_fs_debug_page'] );
    1517
    1618    $module_types = array(
     
    7476    $sec_text = fs_text_x_inline( 'sec', 'seconds' );
    7577?>
     78<?php if ( $is_fs_debug_page ) : ?>
     79<h2>
     80    <button class="fs-debug-table-toggle-button" aria-expanded="true">
     81        <span class="fs-debug-table-toggle-icon">▼</span>
     82    </button>
     83    <?php fs_esc_html_echo_inline( 'Scheduled Crons' ) ?>
     84</h2>
     85<?php else : ?>
    7686<h1><?php fs_esc_html_echo_inline( 'Scheduled Crons' ) ?></h1>
    77 <table class="widefat">
     87<?php endif ?>
     88<table class="widefat fs-debug-table">
    7889    <thead>
    7990    <tr>
  • content-aware-sidebars/trunk/lib/freemius/templates/forms/license-activation.php

    r3203370 r3320410  
    310310            afterLicenseUserDataLoaded = function () {
    311311                if (
     312                    false !== otherLicenseOwnerID &&
    312313                    null !== otherLicenseOwnerID &&
    313314                    otherLicenseOwnerID != <?php echo $fs->is_registered() ? $fs->get_user()->id : 'null' ?>
  • content-aware-sidebars/trunk/readme.txt

    r3229095 r3320410  
    55Requires at least: 5.5
    66Requires PHP: 7.1
    7 Tested up to: 6.7
    8 Stable tag: 3.21.1
     7Tested up to: 6.8
     8Stable tag: 3.21.2
    99License: GPLv3
    1010
     
    194194####Highlights
    195195
     196
     197
     198= 3.21.2 =
     199
     200* [new] ui improvements
     201* [new] wordpress 6.8 support
     202* [updated] freemius sdk
     203
    196204= 3.21.1 =
    197205
  • content-aware-sidebars/trunk/sidebar.php

    r3203370 r3320410  
    238238                $actions = $this->metadata->get('handle');
    239239                $action_list = $actions->get_input_list();
    240                 $action_list['__infuse'] = __('Infuse', 'content-aware-sidebars') . $pro_label;
    241                 $action_list['__after_paragraph'] = __('After Paragraph', 'content-aware-sidebars') . $pro_label;
    242                 $action_list['__totem'] = __('Totem - Floating Button', 'content-aware-sidebars') . $pro_label;
     240                $action_list['__infuse'] = __('Theme Infusion', 'content-aware-sidebars') . $pro_label;
     241                $action_list['__after_paragraph'] = __('Between Paragraphs', 'content-aware-sidebars') . $pro_label;
     242                $action_list['__totem'] = __('Floating Button', 'content-aware-sidebars') . $pro_label;
    243243                $actions->set_input_list($action_list);
    244244            }
  • content-aware-sidebars/trunk/view/meta_box_advanced.php

    r3092858 r3320410  
    2424        <td>
    2525            <label for="menu_order" class="screen-reader-text"><?php _e('Order'); ?></label>
    26             <input type="number" value="<?php echo $post->menu_order; ?>" id="menu_order" size="4" name="menu_order">
     26            <input type="number" value="<?php echo esc_attr($post->menu_order); ?>" id="menu_order" size="4" name="menu_order">
    2727        </td>
    2828    </tr>
  • content-aware-sidebars/trunk/view/meta_box_status.php

    r3092858 r3320410  
    1919                <span class="js-cas-activation">
    2020                    <input type="text" name="sidebar_activate"
    21                         value="<?php echo $activate_date; ?>"
     21                        value="<?php echo esc_attr($activate_date); ?>"
    2222                        data-input
    2323                        placeholder="<?php esc_attr_e('Select date', 'content-aware-sidebars'); ?>">
     
    3636                <span class="js-cas-expiry">
    3737                    <input type="text" name="sidebar_deactivate"
    38                         value="<?php echo $deactivate_date; ?>"
     38                        value="<?php echo esc_attr($deactivate_date); ?>"
    3939                        data-input
    4040                        placeholder="<?php esc_attr_e('Never', 'content-aware-sidebars'); ?>">
Note: See TracChangeset for help on using the changeset viewer.