From 56aa41ac5dc44c2b48c8bfa7395c009a5c31d37b Mon Sep 17 00:00:00 2001 From: Nick Diego Date: Sat, 8 Oct 2022 20:38:20 -0500 Subject: [PATCH] Fresh build. --- ...ility-contextual-indicator-styles.asset.php | 1 - build/block-visibility-editor-styles.asset.php | 1 - build/block-visibility-editor-styles.css | 2 +- build/block-visibility-editor.asset.php | 2 +- build/block-visibility-editor.js | 18 +++++++++--------- .../block-visibility-setting-styles.asset.php | 1 - build/block-visibility-setting-styles.css | 2 +- build/block-visibility-settings.asset.php | 2 +- build/block-visibility-settings.js | 18 +++++++++--------- 9 files changed, 22 insertions(+), 25 deletions(-) delete mode 100644 build/block-visibility-contextual-indicator-styles.asset.php delete mode 100644 build/block-visibility-editor-styles.asset.php delete mode 100644 build/block-visibility-setting-styles.asset.php diff --git a/build/block-visibility-contextual-indicator-styles.asset.php b/build/block-visibility-contextual-indicator-styles.asset.php deleted file mode 100644 index c8ca840b..00000000 --- a/build/block-visibility-contextual-indicator-styles.asset.php +++ /dev/null @@ -1 +0,0 @@ - array(), 'version' => '9fd3423c531358fb4a56f8e73951be18'); \ No newline at end of file diff --git a/build/block-visibility-editor-styles.asset.php b/build/block-visibility-editor-styles.asset.php deleted file mode 100644 index 1a2d6a27..00000000 --- a/build/block-visibility-editor-styles.asset.php +++ /dev/null @@ -1 +0,0 @@ - array(), 'version' => '46e128e6cdb676a679db6d1893b18fc4'); \ No newline at end of file diff --git a/build/block-visibility-editor-styles.css b/build/block-visibility-editor-styles.css index 1194d1c5..6fb436f7 100644 --- a/build/block-visibility-editor-styles.css +++ b/build/block-visibility-editor-styles.css @@ -1 +1 @@ -.information-popover{line-height:0}.information-popover .information-popover__button{color:#c8c8c8;height:24px;min-width:20px;padding:0}.information-popover .information-popover__button svg{width:22px}.information-popover .information-popover__button:hover{background-color:transparent!important;box-shadow:none!important;color:#414141}.information-popover .information-popover__button:focus{box-shadow:none!important}.information-popover__popover p{color:#32373c;font-size:13px;line-height:1.5;margin:0 0 1em}.information-popover__popover p:last-child{margin-bottom:0}.information-popover__popover .components-popover__content{font-size:13px;font-weight:400;line-height:1.4;max-width:250px;min-width:200px;padding:4px;text-align:left}.block-visibility.is-opened>.components-panel__body-title{margin-bottom:0}.block-visibility.is-opened>.visibility-controls__container>:first-child:not(.control-set){margin-top:15px}.preset-manager__content .components-disabled,.visibility-controls__container .components-disabled{opacity:.4}.preset-manager__content .components-disabled *,.visibility-controls__container .components-disabled *{opacity:1!important}.preset-manager__content .components-disabled .visibility-control,.visibility-controls__container .components-disabled .visibility-control{margin-bottom:18px!important}.preset-manager__content .components-button.control-tips,.visibility-controls__container .components-button.control-tips{height:18px;margin-left:5px;margin-top:-4px;min-width:18px;padding:0!important;vertical-align:middle;width:18px!important}.preset-manager__content .components-button.control-tips:not(:hover),.visibility-controls__container .components-button.control-tips:not(:hover){color:#c8c8c8}.preset-manager__content .components-button.control-tips:focus,.visibility-controls__container .components-button.control-tips:focus{box-shadow:none!important}.preset-manager__content .components-button.control-tips svg,.visibility-controls__container .components-button.control-tips svg{height:18px;width:18px}.preset-manager__content .control-separator,.visibility-controls__container .control-separator{display:flex;justify-content:center;padding:20px 0 30px;text-align:center}.preset-manager__content .control-separator:after,.preset-manager__content .control-separator:before,.visibility-controls__container .control-separator:after,.visibility-controls__container .control-separator:before{border-bottom:1px solid #e0e0e0;content:"";flex:1 1;margin:auto 0}.preset-manager__content .control-separator:last-child,.visibility-controls__container .control-separator:last-child{display:none}.preset-manager__content .control-separator span,.visibility-controls__container .control-separator span{color:#ccc;font-size:90%;padding:0 8px}.preset-manager__content .visibility-control__group,.visibility-controls__container .visibility-control__group{margin-bottom:30px}.preset-manager__content .visibility-control__group:last-child,.visibility-controls__container .visibility-control__group:last-child{margin-bottom:0}.preset-manager__content .visibility-control__group-heading,.visibility-controls__container .visibility-control__group-heading{font-size:13px;font-weight:500;margin-bottom:16px;text-transform:none}.preset-manager__content .visibility-control__group-heading.has-icon,.visibility-controls__container .visibility-control__group-heading.has-icon{align-items:center;display:flex}.preset-manager__content .visibility-control__group-heading.has-icon>svg,.visibility-controls__container .visibility-control__group-heading.has-icon>svg{margin-right:8px;width:16px}.preset-manager__content .visibility-control__group-heading.has-icon span,.visibility-controls__container .visibility-control__group-heading.has-icon span{display:inline-block;margin-right:4px}.preset-manager__content .visibility-control__group-heading.has-icon .information-popover__button,.visibility-controls__container .visibility-control__group-heading.has-icon .information-popover__button{height:20px;min-width:20px}.preset-manager__content .visibility-control__group-heading.has-icon .information-popover__button svg,.visibility-controls__container .visibility-control__group-heading.has-icon .information-popover__button svg{width:18px}.preset-manager__content .visibility-control,.visibility-controls__container .visibility-control{margin-bottom:18px}.preset-manager__content .visibility-control.is-open,.visibility-controls__container .visibility-control.is-open{margin-bottom:24px}.preset-manager__content .visibility-control.is-open>.components-base-control,.visibility-controls__container .visibility-control.is-open>.components-base-control{margin-bottom:12px}.preset-manager__content .visibility-control:last-child,.visibility-controls__container .visibility-control:last-child{margin-bottom:0}.preset-manager__content .visibility-control>.block-visibility__react-select,.visibility-controls__container .visibility-control>.block-visibility__react-select{margin:10px 0}.preset-manager__content .visibility-control__label,.visibility-controls__container .visibility-control__label{margin-bottom:8px}.preset-manager__content .components-base-control__help a,.visibility-controls__container .components-base-control__help a{cursor:pointer}.preset-manager__content .components-base-control__help strong,.visibility-controls__container .components-base-control__help strong{font-weight:700}.preset-manager__content .visibility-control__help,.visibility-controls__container .visibility-control__help{color:#757575;font-size:12px;font-style:normal;margin-bottom:16px}.preset-manager__content .visibility-control__help strong,.visibility-controls__container .visibility-control__help strong{font-weight:700}.preset-manager__content .visibility-control__group-fields,.visibility-controls__container .visibility-control__group-fields{margin-bottom:24px}.preset-manager__content .visibility-control__group-fields .components-base-control__help,.visibility-controls__container .visibility-control__group-fields .components-base-control__help{margin-top:0}.preset-manager__content .section-header,.visibility-controls__container .section-header{align-items:center;border-bottom:1px solid #e0e0e0;display:flex;gap:24px;justify-content:space-between;margin-bottom:16px;padding-bottom:6px}.preset-manager__content .section-header.main,.visibility-controls__container .section-header.main{border-top:1px solid #e0e0e0;margin-bottom:30px;margin-left:-16px;margin-right:-16px;min-height:48px;padding:8px 16px;width:calc(100% + 32px)}.preset-manager__content .section-header .section-header__title,.visibility-controls__container .section-header .section-header__title{font-weight:500;overflow-wrap:anywhere}.preset-manager__content .section-header .section-header__toolbar,.visibility-controls__container .section-header .section-header__toolbar{flex-shrink:0;height:24px;text-align:right}.preset-manager__content .section-header .section-header__toolbar .components-button.has-icon,.visibility-controls__container .section-header .section-header__toolbar .components-button.has-icon{height:24px;min-width:24px;padding:0;width:24px}.preset-manager__content .section-header .section-header__toolbar .components-button:hover,.visibility-controls__container .section-header .section-header__toolbar .components-button:hover{color:var(--wp-admin-theme-color)}.preset-manager__content .section-header .section-header__toolbar .controls-dropdown .components-button.has-icon,.visibility-controls__container .section-header .section-header__toolbar .controls-dropdown .components-button.has-icon{padding:1px}.preset-manager__content .section-header .section-header__toolbar .settings-dropdown,.visibility-controls__container .section-header .section-header__toolbar .settings-dropdown{margin-left:5px}.preset-manager__content .section-header .section-header__toolbar .settings-dropdown .components-button.has-icon,.visibility-controls__container .section-header .section-header__toolbar .settings-dropdown .components-button.has-icon{padding:1px}.preset-manager__content .section-header .section-header__toolbar .components-disabled,.visibility-controls__container .section-header .section-header__toolbar .components-disabled{display:inline-block}.preset-manager__content .compound-radio-control .components-radio-control__option:not(:last-child),.visibility-controls__container .compound-radio-control .components-radio-control__option:not(:last-child){margin-bottom:10px}.preset-manager__content .compound-radio-control .components-radio-control__option input,.visibility-controls__container .compound-radio-control .components-radio-control__option input{margin-right:12px;margin-top:2px;vertical-align:top}.preset-manager__content .compound-radio-control .components-radio-control__option .compound-radio-label,.visibility-controls__container .compound-radio-control .components-radio-control__option .compound-radio-label{display:inline-block}.preset-manager__content .compound-radio-control .components-radio-control__option .compound-radio-label span,.visibility-controls__container .compound-radio-control .components-radio-control__option .compound-radio-label span{color:#757575;display:block;font-size:12px;font-style:normal;font-weight:400;margin-top:2px;max-width:200px}.preset-manager__content .control-set,.visibility-controls__container .control-set{margin-bottom:30px}.preset-manager__content .control-set .control-set__header,.visibility-controls__container .control-set .control-set__header{align-items:center;border-bottom:1px solid #e0e0e0;border-top:1px solid #e0e0e0;display:flex;justify-content:space-between;margin-bottom:30px;margin-left:-16px;margin-right:-16px;min-height:50px;padding:8px 16px;width:calc(100% + 32px)}.preset-manager__content .control-set .control-set__header .control-set__header-title,.visibility-controls__container .control-set .control-set__header .control-set__header-title{font-weight:500;margin:0}.preset-manager__content .control-set .control-set__header .control-set__header-toolbar,.visibility-controls__container .control-set .control-set__header .control-set__header-toolbar{height:24px;min-width:100px;text-align:right}.preset-manager__content .control-set .control-set__header .control-set__header-toolbar button,.visibility-controls__container .control-set .control-set__header .control-set__header-toolbar button{height:24px;min-width:24px;padding:0}.preset-manager__content .control-set .control-set__header .control-set__header-toolbar button svg,.visibility-controls__container .control-set .control-set__header .control-set__header-toolbar button svg{width:20px}.preset-manager__content .control-set .control-set__header .control-set__header-toolbar .configure-controls button,.visibility-controls__container .control-set .control-set__header .control-set__header-toolbar .configure-controls button{min-width:28px}.preset-manager__content .control-set .visibility-control__group:not(:last-child),.visibility-controls__container .control-set .visibility-control__group:not(:last-child){margin-bottom:15px}.preset-manager__content .rule-sets,.visibility-controls__container .rule-sets{grid-column-gap:32px;grid-row-gap:16px;display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fit,minmax(248px,1fr))}.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules{-ms-grid-columns:1fr;grid-column-gap:32px;grid-row-gap:16px;display:-ms-grid;display:grid;grid-template-columns:1fr}.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:8px}.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header button,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header button{height:24px;min-width:24px;padding:0;width:24px}.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container{display:-ms-grid;display:grid;gap:16px}.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified{-ms-grid-columns:1fr 74px;display:-ms-grid;display:grid;grid-template-columns:1fr 74px}.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified .field__ruleField,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified .field__subField,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified .field__ruleField,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified .field__subField{-ms-grid-column-span:2;-ms-grid-column:1;grid-column-end:3;grid-column-start:1}.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .visibility-control__help,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .visibility-control__help{margin-bottom:0;margin-top:10px}.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .components-base-control,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-base-control__field,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .components-base-control,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-base-control__field{margin-bottom:0}.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .components-text-control__input,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .components-text-control__input{min-height:36px;padding:8px}.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__add-rule,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__add-rule{margin:16px 0 8px}.preset-manager__content .rule-sets__add-rule-set,.visibility-controls__container .rule-sets__add-rule-set{margin:20px 0 24px}.preset-manager__content .date-time-control .date-time-control__schedules,.visibility-controls__container .date-time-control .date-time-control__schedules{grid-column-gap:32px;grid-row-gap:20px;display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fit,minmax(248px,1fr))}.preset-manager__content .date-time-control .date-time-control__schedules .schedules__schedule.disabled .date-time-control__schedule--heading span,.visibility-controls__container .date-time-control .date-time-control__schedules .schedules__schedule.disabled .date-time-control__schedule--heading span{opacity:.4}.preset-manager__content .date-time-control .date-time-control__schedules .schedules__schedule .schedule__fields>:last-child,.visibility-controls__container .date-time-control .date-time-control__schedules .schedules__schedule .schedule__fields>:last-child{margin-bottom:0}.preset-manager__content .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field,.visibility-controls__container .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field{align-items:center;border:1px solid #757575;border-radius:2px;display:flex;justify-content:space-between;margin-bottom:10px;min-height:36px}.preset-manager__content .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button,.visibility-controls__container .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button{padding:0}.preset-manager__content .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button:first-child,.visibility-controls__container .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button:first-child{margin-left:-2px}.preset-manager__content .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button.is-link,.visibility-controls__container .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button.is-link{color:#333;text-decoration:none;width:100%}.preset-manager__content .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button.is-link svg,.visibility-controls__container .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button.is-link svg{margin:4px 0 4px 8px}.preset-manager__content .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button.is-link span,.visibility-controls__container .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button.is-link span{padding:8px}.preset-manager__content .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button.is-link:hover,.visibility-controls__container .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button.is-link:hover{color:var(--wp-admin-theme-color)}.preset-manager__content .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button.clear-date-time,.visibility-controls__container .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button.clear-date-time{max-height:34px;min-width:24px;padding:4px}.preset-manager__content .date-time-control .date-time-control__add-schedule,.visibility-controls__container .date-time-control .date-time-control__add-schedule{margin:20px 0 24px}.preset-manager__content .user-role-control .visibility-control__container,.visibility-controls__container .user-role-control .visibility-control__container{margin-top:-10px}.preset-manager__content .screen-size-control .components-base-control,.visibility-controls__container .screen-size-control .components-base-control{margin-bottom:18px}.preset-manager__content .screen-size-control .components-notice,.visibility-controls__container .screen-size-control .components-notice{margin-top:20px}.preset-manager__content .components-notice,.visibility-controls__container .components-notice{margin:10px 0}.preset-manager__content .components-notice .components-notice__content,.visibility-controls__container .components-notice .components-notice__content{margin:2px 0}.preset-manager__content .components-notice .components-notice__content .visibility-control__help,.visibility-controls__container .components-notice .components-notice__content .visibility-control__help{display:inline-block;margin:4px 0 0}.preset-manager__content .query-string-control .visibility-control__help,.visibility-controls__container .query-string-control .visibility-control__help{margin-bottom:18px}.preset-manager__content .query-string-control textarea,.visibility-controls__container .query-string-control textarea{white-space:nowrap}.preset-manager__content .acf-control .components-notice,.visibility-controls__container .acf-control .components-notice{margin-bottom:20px}.block-visibility__date-time-popover.no-time .components-datetime__date{border-top:0}.block-visibility__date-time-popover .date-time-header{border-bottom:1px solid #e0e0e0;display:flex;font-weight:600;justify-content:space-between;padding:16px}.block-visibility__control-popover.control-set .components-popover__content{min-width:260px}.block-visibility__control-popover.tips>div{cursor:default;min-width:400px;padding:24px}.block-visibility__control-popover.tips>div h3{margin-top:0}.block-visibility__control-popover.tips>div h4{margin-bottom:.75em}.block-visibility__control-popover.tips>div p{margin-top:0}.block-visibility__control-popover.tips>div p.learn-more{border-top:1px solid #e0e0e0;margin-bottom:0;margin-top:2em;padding-top:1.25em}.block-visibility__control-popover.tips>div code{margin-right:8px}.block-visibility__control-popover.tips>div ol{margin-bottom:0;margin-top:0}.block-visibility__control-popover.tips>div li.tip{margin-bottom:10px;padding-left:5px}.block-visibility__control-popover.tips>div li.tip:last-child{margin-bottom:0}.block-visibility__control-popover.tips>div li.tip::marker{font-size:14px;font-weight:700}.block-visibility__control-popover.tips>div .usage .components-flex{margin-bottom:1em}.block-visibility__control-popover.tips>div .usage .components-flex__item{min-width:auto}.block-visibility__control-popover.tips>div .usage .components-flex__item:first-child{min-width:100px}.block-visibility__control-popover.control-settings>div{min-width:300px;padding:6px}.block-visibility__control-popover.control-settings>div h3{color:#757575;font-size:11px;font-weight:500;margin-bottom:18px;margin-top:0;text-transform:uppercase}.block-visibility__control-popover.control-settings>div .components-base-control{margin-bottom:24px}.block-visibility__control-popover.control-settings>div .components-base-control:last-child{margin-bottom:0}.block-visibility__control-popover .components-menu-item__button .control-branding-icon{margin-right:8px;width:14px}.block-visibility__control-popover .components-menu-item__button:hover .control-branding-icon{opacity:.6}.block-visibility__control-popover .components-notice{margin:10px 0}.block-visibility__control-popover .components-notice .components-notice__content{margin:2px 0}.block-visibility__control-popover .components-notice .components-notice__content .visibility-control__help{display:inline-block;margin:4px 0 0}.CalendarDay__today{background:#f5f5f5}.block-visibility__react-select .react-select__control{border:1px solid #757575;border-radius:2px;min-height:36px}.block-visibility__react-select .react-select__control:hover{border:1px solid #757575}.block-visibility__react-select .react-select__control.react-select__control--is-focused,.block-visibility__react-select .react-select__control:focus{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px #007cba;box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.block-visibility__react-select .react-select__value-container div:last-child{padding-bottom:0;padding-top:0}.block-visibility__react-select .react-select__value-container--is-multi{padding:2px 4px}.block-visibility__react-select .react-select__value-container--is-multi .react-select__placeholder{margin-left:5px;margin-right:5px}.block-visibility__react-select .react-select__value-container--is-multi div:last-child{margin:0 2px}.block-visibility__react-select .react-select__multi-value{background-color:#ddd}.block-visibility__react-select .react-select__multi-value .react-select__multi-value__label{font-size:90%;white-space:normal}.block-visibility__react-select .react-select__input:focus{box-shadow:none}.block-visibility__react-select .react-select__input input{min-height:auto}.block-visibility__react-select .react-select__input input:focus{box-shadow:none}.block-visibility__react-select .react-select__clear-indicator,.block-visibility__react-select .react-select__dropdown-indicator{padding:6px}.block-visibility__react-select .react-select__clear-indicator:hover,.block-visibility__react-select .react-select__dropdown-indicator:hover{color:#007cba;color:var(--wp-admin-theme-color);cursor:pointer}.block-visibility__react-select .react-select__multi-value__remove,.block-visibility__react-select .react-select__option{cursor:pointer}.block-visibility__react-select .react-select__option--is-focused,.block-visibility__react-select .react-select__option--is-selected{background:#fff;color:#007cba;color:var(--wp-admin-theme-color)}.block-visibility__react-select .react-select__option--is-selected{background:#eee}.block-visibility__react-select .react-select__option--is-disabled{color:#ccc!important}.block-visibility__react-select .react-select__menu{margin-bottom:50px}.block-visibility__reset-modal{max-width:400px!important}.block-visibility__reset-modal .block-visibility__reset-modal--buttons{margin-top:24px}.block-visibility__reset-modal .block-visibility__reset-modal--buttons button:first-child{margin-right:10px}.block-visibility__tips-modal{max-width:600px!important}.block-visibility__tips-modal h4{margin-bottom:.75em}.block-visibility__tips-modal p{margin-top:0}.block-visibility__tips-modal code{margin-right:8px}.block-visibility__tips-modal ol{margin-bottom:0;margin-top:0}.block-visibility__tips-modal li.tip{margin-bottom:10px;padding-left:5px}.block-visibility__tips-modal li.tip:last-child{margin-bottom:0}.block-visibility__tips-modal li.tip::marker{font-size:14px;font-weight:700}.block-visibility__tips-modal .usage{border-bottom:1px solid #e0e0e0;margin-bottom:20px;padding-bottom:10px}.block-visibility__tips-modal .usage .flex-table{margin-top:20px}.block-visibility__tips-modal .usage .components-notice{margin:0 0 10px}.block-visibility__tips-modal .usage .components-flex{margin-bottom:1em}.block-visibility__tips-modal .usage .components-flex__item{min-width:auto}.block-visibility__tips-modal .usage .components-flex__item:first-child{min-width:100px}.block-visibility__tips-modal .learn-more{align-items:center;border-top:1px solid #e0e0e0;display:flex;height:60px;justify-content:center;margin:2em -32px -24px;padding:0 32px}.block-visibility__confirmation-modal{max-width:400px!important}.block-visibility__confirmation-modal .block-visibility__confirmation-modal--buttons{display:flex;justify-content:space-between;margin-top:24px}#customize-theme-controls .visibility-controls__container h3.visibility-control__group-heading{font-size:13px!important;font-weight:500!important;margin-bottom:16px!important}#customize-theme-controls .control-set .control-set__header h3{font-size:12px!important;margin-bottom:8px!important}.preset-manager .components-search-control{position:relative}.preset-manager .components-search-control.is-disabled ::-moz-placeholder{opacity:.7}.preset-manager .components-search-control.is-disabled :-ms-input-placeholder{opacity:.7}.preset-manager .components-search-control.is-disabled ::placeholder{opacity:.7}.preset-manager .components-search-control.is-disabled .components-search-control__icon{opacity:.3}.preset-manager .components-search-control input[type=search].components-search-control__input{background:#f0f0f0;border:none;border-radius:2px;box-shadow:0 0 0 transparent;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;height:48px;line-height:normal;padding:16px 48px 16px 16px;transition:box-shadow .1s linear;width:100%}@media(min-width:600px){.preset-manager .components-search-control input[type=search].components-search-control__input{font-size:13px}}.preset-manager .components-search-control input[type=search].components-search-control__input:focus{background:#fff;box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.preset-manager .components-search-control input[type=search].components-search-control__input::-moz-placeholder{color:rgba(30,30,30,.62)}.preset-manager .components-search-control input[type=search].components-search-control__input:-ms-input-placeholder{color:rgba(30,30,30,.62)}.preset-manager .components-search-control input[type=search].components-search-control__input::placeholder{color:rgba(30,30,30,.62)}.preset-manager .components-search-control input[type=search].components-search-control__input::-webkit-search-cancel-button,.preset-manager .components-search-control input[type=search].components-search-control__input::-webkit-search-decoration,.preset-manager .components-search-control input[type=search].components-search-control__input::-webkit-search-results-button,.preset-manager .components-search-control input[type=search].components-search-control__input::-webkit-search-results-decoration{-webkit-appearance:none}.preset-manager .components-search-control .components-search-control__icon{align-items:center;bottom:0;display:flex;position:absolute;right:12px;top:0}.preset-manager .components-search-control .components-search-control__icon>button{margin-right:-10px}.preset-manager .components-search-control .components-search-control__icon>svg{margin:8px 0}.preset-manager .components-search-control .components-search-control__input-wrapper{position:relative} +.information-popover{line-height:0}.information-popover .information-popover__button{color:#c8c8c8;height:24px;min-width:20px;padding:0}.information-popover .information-popover__button svg{width:22px}.information-popover .information-popover__button:hover{background-color:transparent!important;box-shadow:none!important;color:#414141}.information-popover .information-popover__button:focus{box-shadow:none!important}.information-popover__popover p{color:#32373c;font-size:13px;line-height:1.5;margin:0 0 1em}.information-popover__popover p:last-child{margin-bottom:0}.information-popover__popover .components-popover__content{font-size:13px;font-weight:400;line-height:1.4;max-width:250px;min-width:200px;padding:4px;text-align:left}.block-visibility.is-opened>.components-panel__body-title{margin-bottom:0}.block-visibility.is-opened>.visibility-controls__container>:first-child:not(.control-set){margin-top:15px}.preset-manager__content .components-disabled,.visibility-controls__container .components-disabled{opacity:.4}.preset-manager__content .components-disabled *,.visibility-controls__container .components-disabled *{opacity:1!important}.preset-manager__content .components-disabled .visibility-control,.visibility-controls__container .components-disabled .visibility-control{margin-bottom:18px!important}.preset-manager__content .components-button.control-tips,.visibility-controls__container .components-button.control-tips{height:18px;margin-left:5px;margin-top:-4px;min-width:18px;padding:0!important;vertical-align:middle;width:18px!important}.preset-manager__content .components-button.control-tips:not(:hover),.visibility-controls__container .components-button.control-tips:not(:hover){color:#c8c8c8}.preset-manager__content .components-button.control-tips:focus,.visibility-controls__container .components-button.control-tips:focus{box-shadow:none!important}.preset-manager__content .components-button.control-tips svg,.visibility-controls__container .components-button.control-tips svg{height:18px;width:18px}.preset-manager__content .control-separator,.visibility-controls__container .control-separator{display:flex;justify-content:center;padding:20px 0 30px;text-align:center}.preset-manager__content .control-separator:after,.preset-manager__content .control-separator:before,.visibility-controls__container .control-separator:after,.visibility-controls__container .control-separator:before{border-bottom:1px solid #e0e0e0;content:"";flex:1 1;margin:auto 0}.preset-manager__content .control-separator:last-child,.visibility-controls__container .control-separator:last-child{display:none}.preset-manager__content .control-separator span,.visibility-controls__container .control-separator span{color:#ccc;font-size:90%;padding:0 8px}.preset-manager__content .visibility-control__group,.visibility-controls__container .visibility-control__group{margin-bottom:30px}.preset-manager__content .visibility-control__group:last-child,.visibility-controls__container .visibility-control__group:last-child{margin-bottom:0}.preset-manager__content .visibility-control__group-heading,.visibility-controls__container .visibility-control__group-heading{font-size:13px;font-weight:500;margin-bottom:16px;text-transform:none}.preset-manager__content .visibility-control__group-heading.has-icon,.visibility-controls__container .visibility-control__group-heading.has-icon{align-items:center;display:flex}.preset-manager__content .visibility-control__group-heading.has-icon>svg,.visibility-controls__container .visibility-control__group-heading.has-icon>svg{margin-right:8px;width:16px}.preset-manager__content .visibility-control__group-heading.has-icon span,.visibility-controls__container .visibility-control__group-heading.has-icon span{display:inline-block;margin-right:4px}.preset-manager__content .visibility-control__group-heading.has-icon .information-popover__button,.visibility-controls__container .visibility-control__group-heading.has-icon .information-popover__button{height:20px;min-width:20px}.preset-manager__content .visibility-control__group-heading.has-icon .information-popover__button svg,.visibility-controls__container .visibility-control__group-heading.has-icon .information-popover__button svg{width:18px}.preset-manager__content .visibility-control,.visibility-controls__container .visibility-control{margin-bottom:18px}.preset-manager__content .visibility-control.is-open,.visibility-controls__container .visibility-control.is-open{margin-bottom:24px}.preset-manager__content .visibility-control.is-open>.components-base-control,.visibility-controls__container .visibility-control.is-open>.components-base-control{margin-bottom:12px}.preset-manager__content .visibility-control:last-child,.visibility-controls__container .visibility-control:last-child{margin-bottom:0}.preset-manager__content .visibility-control>.block-visibility__react-select,.visibility-controls__container .visibility-control>.block-visibility__react-select{margin:10px 0}.preset-manager__content .visibility-control__label,.visibility-controls__container .visibility-control__label{margin-bottom:8px}.preset-manager__content .components-base-control__help a,.visibility-controls__container .components-base-control__help a{cursor:pointer}.preset-manager__content .components-base-control__help strong,.visibility-controls__container .components-base-control__help strong{font-weight:700}.preset-manager__content .visibility-control__help,.visibility-controls__container .visibility-control__help{color:#757575;font-size:12px;font-style:normal;margin-bottom:16px}.preset-manager__content .visibility-control__help strong,.visibility-controls__container .visibility-control__help strong{font-weight:700}.preset-manager__content .visibility-control__group-fields,.visibility-controls__container .visibility-control__group-fields{margin-bottom:24px}.preset-manager__content .visibility-control__group-fields .components-base-control__help,.visibility-controls__container .visibility-control__group-fields .components-base-control__help{margin-top:0}.preset-manager__content .section-header,.visibility-controls__container .section-header{align-items:center;border-bottom:1px solid #e0e0e0;display:flex;gap:24px;justify-content:space-between;margin-bottom:16px;padding-bottom:6px}.preset-manager__content .section-header.main,.visibility-controls__container .section-header.main{border-top:1px solid #e0e0e0;margin-bottom:30px;margin-left:-16px;margin-right:-16px;min-height:48px;padding:8px 16px;width:calc(100% + 32px)}.preset-manager__content .section-header .section-header__title,.visibility-controls__container .section-header .section-header__title{font-weight:500;overflow-wrap:anywhere}.preset-manager__content .section-header .section-header__toolbar,.visibility-controls__container .section-header .section-header__toolbar{flex-shrink:0;height:24px;text-align:right}.preset-manager__content .section-header .section-header__toolbar .components-button.has-icon,.visibility-controls__container .section-header .section-header__toolbar .components-button.has-icon{height:24px;min-width:24px;padding:0;width:24px}.preset-manager__content .section-header .section-header__toolbar .components-button:hover,.visibility-controls__container .section-header .section-header__toolbar .components-button:hover{color:var(--wp-admin-theme-color)}.preset-manager__content .section-header .section-header__toolbar .controls-dropdown .components-button.has-icon,.visibility-controls__container .section-header .section-header__toolbar .controls-dropdown .components-button.has-icon{padding:1px}.preset-manager__content .section-header .section-header__toolbar .settings-dropdown,.visibility-controls__container .section-header .section-header__toolbar .settings-dropdown{margin-left:5px}.preset-manager__content .section-header .section-header__toolbar .settings-dropdown .components-button.has-icon,.visibility-controls__container .section-header .section-header__toolbar .settings-dropdown .components-button.has-icon{padding:1px}.preset-manager__content .section-header .section-header__toolbar .components-disabled,.visibility-controls__container .section-header .section-header__toolbar .components-disabled{display:inline-block}.preset-manager__content .compound-radio-control .components-radio-control__option:not(:last-child),.visibility-controls__container .compound-radio-control .components-radio-control__option:not(:last-child){margin-bottom:10px}.preset-manager__content .compound-radio-control .components-radio-control__option input,.visibility-controls__container .compound-radio-control .components-radio-control__option input{margin-right:12px;margin-top:2px;vertical-align:top}.preset-manager__content .compound-radio-control .components-radio-control__option .compound-radio-label,.visibility-controls__container .compound-radio-control .components-radio-control__option .compound-radio-label{display:inline-block}.preset-manager__content .compound-radio-control .components-radio-control__option .compound-radio-label span,.visibility-controls__container .compound-radio-control .components-radio-control__option .compound-radio-label span{color:#757575;display:block;font-size:12px;font-style:normal;font-weight:400;margin-top:2px;max-width:200px}.preset-manager__content .control-set,.visibility-controls__container .control-set{margin-bottom:30px}.preset-manager__content .control-set .control-set__header,.visibility-controls__container .control-set .control-set__header{align-items:center;border-bottom:1px solid #e0e0e0;border-top:1px solid #e0e0e0;display:flex;justify-content:space-between;margin-bottom:30px;margin-left:-16px;margin-right:-16px;min-height:50px;padding:8px 16px;width:calc(100% + 32px)}.preset-manager__content .control-set .control-set__header .control-set__header-title,.visibility-controls__container .control-set .control-set__header .control-set__header-title{font-weight:500;margin:0}.preset-manager__content .control-set .control-set__header .control-set__header-toolbar,.visibility-controls__container .control-set .control-set__header .control-set__header-toolbar{height:24px;min-width:100px;text-align:right}.preset-manager__content .control-set .control-set__header .control-set__header-toolbar button,.visibility-controls__container .control-set .control-set__header .control-set__header-toolbar button{height:24px;min-width:24px;padding:0}.preset-manager__content .control-set .control-set__header .control-set__header-toolbar button svg,.visibility-controls__container .control-set .control-set__header .control-set__header-toolbar button svg{width:20px}.preset-manager__content .control-set .control-set__header .control-set__header-toolbar .configure-controls button,.visibility-controls__container .control-set .control-set__header .control-set__header-toolbar .configure-controls button{min-width:28px}.preset-manager__content .control-set .visibility-control__group:not(:last-child),.visibility-controls__container .control-set .visibility-control__group:not(:last-child){margin-bottom:15px}.preset-manager__content .rule-sets,.visibility-controls__container .rule-sets{grid-column-gap:32px;grid-row-gap:16px;display:grid;grid-template-columns:repeat(auto-fit,minmax(248px,1fr))}.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules{grid-column-gap:32px;grid-row-gap:16px;display:grid;grid-template-columns:1fr}.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:8px}.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header button,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header button{height:24px;min-width:24px;padding:0;width:24px}.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container{display:grid;gap:16px}.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified{display:grid;grid-template-columns:1fr 74px}.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified .field__ruleField,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified .field__subField,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified .field__ruleField,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified .field__subField{grid-column-end:3;grid-column-start:1}.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .visibility-control__help,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .visibility-control__help{margin-bottom:0;margin-top:10px}.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .components-base-control,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-base-control__field,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .components-base-control,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-base-control__field{margin-bottom:0}.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .components-text-control__input,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .components-text-control__input{min-height:36px;padding:8px}.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__add-rule,.visibility-controls__container .rule-sets .rule-sets__rule-set .rule-set__add-rule{margin:16px 0 8px}.preset-manager__content .rule-sets__add-rule-set,.visibility-controls__container .rule-sets__add-rule-set{margin:20px 0 24px}.preset-manager__content .date-time-control .date-time-control__schedules,.visibility-controls__container .date-time-control .date-time-control__schedules{grid-column-gap:32px;grid-row-gap:20px;display:grid;grid-template-columns:repeat(auto-fit,minmax(248px,1fr))}.preset-manager__content .date-time-control .date-time-control__schedules .schedules__schedule.disabled .date-time-control__schedule--heading span,.visibility-controls__container .date-time-control .date-time-control__schedules .schedules__schedule.disabled .date-time-control__schedule--heading span{opacity:.4}.preset-manager__content .date-time-control .date-time-control__schedules .schedules__schedule .schedule__fields>:last-child,.visibility-controls__container .date-time-control .date-time-control__schedules .schedules__schedule .schedule__fields>:last-child{margin-bottom:0}.preset-manager__content .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field,.visibility-controls__container .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field{align-items:center;border:1px solid #757575;border-radius:2px;display:flex;justify-content:space-between;margin-bottom:10px;min-height:36px}.preset-manager__content .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button,.visibility-controls__container .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button{padding:0}.preset-manager__content .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button:first-child,.visibility-controls__container .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button:first-child{margin-left:-2px}.preset-manager__content .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button.is-link,.visibility-controls__container .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button.is-link{color:#333;text-decoration:none;width:100%}.preset-manager__content .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button.is-link svg,.visibility-controls__container .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button.is-link svg{margin:4px 0 4px 8px}.preset-manager__content .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button.is-link span,.visibility-controls__container .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button.is-link span{padding:8px}.preset-manager__content .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button.is-link:hover,.visibility-controls__container .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button.is-link:hover{color:var(--wp-admin-theme-color)}.preset-manager__content .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button.clear-date-time,.visibility-controls__container .date-time-control .date-time-control__schedules .schedules__schedule .schedule__date-time-field .components-button.clear-date-time{max-height:34px;min-width:24px;padding:4px}.preset-manager__content .date-time-control .date-time-control__add-schedule,.visibility-controls__container .date-time-control .date-time-control__add-schedule{margin:20px 0 24px}.preset-manager__content .user-role-control .visibility-control__container,.visibility-controls__container .user-role-control .visibility-control__container{margin-top:-10px}.preset-manager__content .screen-size-control .components-base-control,.visibility-controls__container .screen-size-control .components-base-control{margin-bottom:18px}.preset-manager__content .screen-size-control .components-notice,.visibility-controls__container .screen-size-control .components-notice{margin-top:20px}.preset-manager__content .components-notice,.visibility-controls__container .components-notice{margin:10px 0}.preset-manager__content .components-notice .components-notice__content,.visibility-controls__container .components-notice .components-notice__content{margin:2px 0}.preset-manager__content .components-notice .components-notice__content .visibility-control__help,.visibility-controls__container .components-notice .components-notice__content .visibility-control__help{display:inline-block;margin:4px 0 0}.preset-manager__content .query-string-control .visibility-control__help,.visibility-controls__container .query-string-control .visibility-control__help{margin-bottom:18px}.preset-manager__content .query-string-control textarea,.visibility-controls__container .query-string-control textarea{white-space:nowrap}.preset-manager__content .acf-control .components-notice,.visibility-controls__container .acf-control .components-notice{margin-bottom:20px}.block-visibility__date-time-popover.no-time .components-datetime__date{border-top:0}.block-visibility__date-time-popover .date-time-header{border-bottom:1px solid #e0e0e0;display:flex;font-weight:600;justify-content:space-between;padding:16px}.block-visibility__control-popover.control-set .components-popover__content{min-width:260px}.block-visibility__control-popover.tips>div{cursor:default;min-width:400px;padding:24px}.block-visibility__control-popover.tips>div h3{margin-top:0}.block-visibility__control-popover.tips>div h4{margin-bottom:.75em}.block-visibility__control-popover.tips>div p{margin-top:0}.block-visibility__control-popover.tips>div p.learn-more{border-top:1px solid #e0e0e0;margin-bottom:0;margin-top:2em;padding-top:1.25em}.block-visibility__control-popover.tips>div code{margin-right:8px}.block-visibility__control-popover.tips>div ol{margin-bottom:0;margin-top:0}.block-visibility__control-popover.tips>div li.tip{margin-bottom:10px;padding-left:5px}.block-visibility__control-popover.tips>div li.tip:last-child{margin-bottom:0}.block-visibility__control-popover.tips>div li.tip::marker{font-size:14px;font-weight:700}.block-visibility__control-popover.tips>div .usage .components-flex{margin-bottom:1em}.block-visibility__control-popover.tips>div .usage .components-flex__item{min-width:auto}.block-visibility__control-popover.tips>div .usage .components-flex__item:first-child{min-width:100px}.block-visibility__control-popover.control-settings>div{min-width:300px;padding:6px}.block-visibility__control-popover.control-settings>div h3{color:#757575;font-size:11px;font-weight:500;margin-bottom:18px;margin-top:0;text-transform:uppercase}.block-visibility__control-popover.control-settings>div .components-base-control{margin-bottom:24px}.block-visibility__control-popover.control-settings>div .components-base-control:last-child{margin-bottom:0}.block-visibility__control-popover .components-menu-item__button .control-branding-icon{margin-right:8px;width:14px}.block-visibility__control-popover .components-menu-item__button:hover .control-branding-icon{opacity:.6}.block-visibility__control-popover .components-notice{margin:10px 0}.block-visibility__control-popover .components-notice .components-notice__content{margin:2px 0}.block-visibility__control-popover .components-notice .components-notice__content .visibility-control__help{display:inline-block;margin:4px 0 0}.CalendarDay__today{background:#f5f5f5}.block-visibility__react-select .react-select__control{border:1px solid #757575;border-radius:2px;min-height:36px}.block-visibility__react-select .react-select__control:hover{border:1px solid #757575}.block-visibility__react-select .react-select__control.react-select__control--is-focused,.block-visibility__react-select .react-select__control:focus{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px #007cba;box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.block-visibility__react-select .react-select__value-container div:last-child{padding-bottom:0;padding-top:0}.block-visibility__react-select .react-select__value-container--is-multi{padding:2px 4px}.block-visibility__react-select .react-select__value-container--is-multi .react-select__placeholder{margin-left:5px;margin-right:5px}.block-visibility__react-select .react-select__value-container--is-multi div:last-child{margin:0 2px}.block-visibility__react-select .react-select__multi-value{background-color:#ddd}.block-visibility__react-select .react-select__multi-value .react-select__multi-value__label{font-size:90%;white-space:normal}.block-visibility__react-select .react-select__input:focus{box-shadow:none}.block-visibility__react-select .react-select__input input{min-height:auto}.block-visibility__react-select .react-select__input input:focus{box-shadow:none}.block-visibility__react-select .react-select__clear-indicator,.block-visibility__react-select .react-select__dropdown-indicator{padding:6px}.block-visibility__react-select .react-select__clear-indicator:hover,.block-visibility__react-select .react-select__dropdown-indicator:hover{color:#007cba;color:var(--wp-admin-theme-color);cursor:pointer}.block-visibility__react-select .react-select__multi-value__remove,.block-visibility__react-select .react-select__option{cursor:pointer}.block-visibility__react-select .react-select__option--is-focused,.block-visibility__react-select .react-select__option--is-selected{background:#fff;color:#007cba;color:var(--wp-admin-theme-color)}.block-visibility__react-select .react-select__option--is-selected{background:#eee}.block-visibility__react-select .react-select__option--is-disabled{color:#ccc!important}.block-visibility__react-select .react-select__menu{margin-bottom:50px}.block-visibility__reset-modal{max-width:400px!important}.block-visibility__reset-modal .block-visibility__reset-modal--buttons{margin-top:24px}.block-visibility__reset-modal .block-visibility__reset-modal--buttons button:first-child{margin-right:10px}.block-visibility__tips-modal{max-width:600px!important}.block-visibility__tips-modal h4{margin-bottom:.75em}.block-visibility__tips-modal p{margin-top:0}.block-visibility__tips-modal code{margin-right:8px}.block-visibility__tips-modal ol{margin-bottom:0;margin-top:0}.block-visibility__tips-modal li.tip{margin-bottom:10px;padding-left:5px}.block-visibility__tips-modal li.tip:last-child{margin-bottom:0}.block-visibility__tips-modal li.tip::marker{font-size:14px;font-weight:700}.block-visibility__tips-modal .usage{border-bottom:1px solid #e0e0e0;margin-bottom:20px;padding-bottom:10px}.block-visibility__tips-modal .usage .flex-table{margin-top:20px}.block-visibility__tips-modal .usage .components-notice{margin:0 0 10px}.block-visibility__tips-modal .usage .components-flex{margin-bottom:1em}.block-visibility__tips-modal .usage .components-flex__item{min-width:auto}.block-visibility__tips-modal .usage .components-flex__item:first-child{min-width:100px}.block-visibility__tips-modal .learn-more{align-items:center;border-top:1px solid #e0e0e0;display:flex;height:60px;justify-content:center;margin:2em -32px -24px;padding:0 32px}.block-visibility__confirmation-modal{max-width:400px!important}.block-visibility__confirmation-modal .block-visibility__confirmation-modal--buttons{display:flex;justify-content:space-between;margin-top:24px}#customize-theme-controls .visibility-controls__container h3.visibility-control__group-heading{font-size:13px!important;font-weight:500!important;margin-bottom:16px!important}#customize-theme-controls .control-set .control-set__header h3{font-size:12px!important;margin-bottom:8px!important}.preset-manager .components-search-control{position:relative}.preset-manager .components-search-control.is-disabled ::-moz-placeholder{opacity:.7}.preset-manager .components-search-control.is-disabled ::placeholder{opacity:.7}.preset-manager .components-search-control.is-disabled .components-search-control__icon{opacity:.3}.preset-manager .components-search-control input[type=search].components-search-control__input{background:#f0f0f0;border:none;border-radius:2px;box-shadow:0 0 0 transparent;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;height:48px;line-height:normal;padding:16px 48px 16px 16px;transition:box-shadow .1s linear;width:100%}@media(min-width:600px){.preset-manager .components-search-control input[type=search].components-search-control__input{font-size:13px}}.preset-manager .components-search-control input[type=search].components-search-control__input:focus{background:#fff;box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.preset-manager .components-search-control input[type=search].components-search-control__input::-moz-placeholder{color:rgba(30,30,30,.62)}.preset-manager .components-search-control input[type=search].components-search-control__input::placeholder{color:rgba(30,30,30,.62)}.preset-manager .components-search-control input[type=search].components-search-control__input::-webkit-search-cancel-button,.preset-manager .components-search-control input[type=search].components-search-control__input::-webkit-search-decoration,.preset-manager .components-search-control input[type=search].components-search-control__input::-webkit-search-results-button,.preset-manager .components-search-control input[type=search].components-search-control__input::-webkit-search-results-decoration{-webkit-appearance:none}.preset-manager .components-search-control .components-search-control__icon{align-items:center;bottom:0;display:flex;position:absolute;right:12px;top:0}.preset-manager .components-search-control .components-search-control__icon>button{margin-right:-10px}.preset-manager .components-search-control .components-search-control__icon>svg{margin:8px 0}.preset-manager .components-search-control .components-search-control__input-wrapper{position:relative} diff --git a/build/block-visibility-editor.asset.php b/build/block-visibility-editor.asset.php index 0637f387..48f9b7ab 100644 --- a/build/block-visibility-editor.asset.php +++ b/build/block-visibility-editor.asset.php @@ -1 +1 @@ - array('lodash', 'react', 'react-dom', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-date', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => '6d7de98cfb0e7e470f6f442e3820e715'); \ No newline at end of file + array('lodash', 'react', 'react-dom', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-date', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => '63975b5e49cf44daf8f5'); diff --git a/build/block-visibility-editor.js b/build/block-visibility-editor.js index b7f34c62..ee3b441b 100644 --- a/build/block-visibility-editor.js +++ b/build/block-visibility-editor.js @@ -1,11 +1,11 @@ -!function(){var e={184:function(e,t){var n;!function(){"use strict";var i={}.hasOwnProperty;function l(){for(var e=[],t=0;t"hide_block"===e.settingSlug)))return null;const{blockVisibility:c}=o,u=null!==(l=null==c?void 0:c.hideBlock)&&void 0!==l&&l;return(0,e.createElement)("div",{className:"visibility-control__group hide-block-control"},(0,e.createElement)("div",{className:"visibility-control"},(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Hide block","block-visibility"),checked:u,onChange:()=>{r({blockVisibility:(0,t.assign)({...c},{hideBlock:!u})})},help:(0,i.__)("Hide the block from everyone.","block-visibility")})))}var p=n(184),v=n.n(p),m=window.wp.primitives,b=(0,e.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(m.Path,{d:"M14.5 13.8c-1.1 0-2.1.7-2.4 1.8H4V17h8.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20v-1.5h-3.1c-.3-1-1.3-1.7-2.4-1.7zM11.9 7c-.3-1-1.3-1.8-2.4-1.8S7.4 6 7.1 7H4v1.5h3.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20V7h-8.1z"})),f=(0,e.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(m.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),h=function(t){let{icon:n,size:i=24,...l}=t;return(0,e.cloneElement)(n,{width:i,height:i,...l})},g=(0,e.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(m.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"})),y=(0,e.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(m.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));const _={};_.logo=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256"},(0,e.createElement)(a.Path,{d:"M128,0 C198.692448,0 256,57.307552 256,128 C256,198.692448 198.692448,256 128,256 C57.307552,256 0,198.692448 0,128 C0,57.307552 57.307552,0 128,0 Z M128,67 C88.7744776,67 54.0129388,90.9022691 39.4355448,126.649105 L39,127.735956 L39,128.264044 L39.4740036,129.445062 C54.0740078,165.139702 88.8089313,189 128,189 C167.225522,189 201.987061,165.097731 216.564455,129.350895 L217,128.264044 L217,127.735956 L216.525996,126.554938 C201.925992,90.8602984 167.191069,67 128,67 Z M128,88 C150.09139,88 168,105.90861 168,128 C168,150.09139 150.09139,168 128,168 C105.90861,168 88,150.09139 88,128 C88,105.90861 105.90861,88 128,88 Z M136,104 C127.163444,104 120,111.163444 120,120 C120,128.836556 127.163444,136 136,136 C144.836556,136 152,128.836556 152,120 C152,111.163444 144.836556,104 136,104 Z"})),_.error=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M12,2 C6.48,2 2,6.48 2,12 C2,17.52 6.48,22 12,22 C17.52,22 22,17.52 22,12 C22,6.48 17.52,2 12,2 Z M13,17 L11,17 L11,15 L13,15 L13,17 Z M13,13 L11,13 L11,7 L13,7 L13,13 Z","fill-rule":"nonzero"})),_.errorOutline=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M13,17 L11,17 L11,15 L13,15 L13,17 Z M13,13 L11,13 L11,7 L13,7 L13,13 Z","fill-rule":"nonzero"}),(0,e.createElement)(a.Path,{d:"M12,22 C17.5228475,22 22,17.5228475 22,12 C22,6.4771525 17.5228475,2 12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 Z M12,20 C7.581722,20 4,16.418278 4,12 C4,7.581722 7.581722,4 12,4 C16.418278,4 20,7.581722 20,12 C20,16.418278 16.418278,20 12,20 Z","fill-rule":"nonzero"})),_.trash=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M20,5.5 L14.3,5.5 C14.3,4.2 13.3,3.2 12,3.2 C10.7,3.2 9.7,4.2 9.7,5.5 L4,5.5 L4,7.5 L5.5,7.5 L5.5,7.8 L7.2,18.9 C7.3,19.9 8.2,20.6 9.2,20.6 L14.9,20.6 C15.9,20.6 16.7,19.9 16.9,18.9 L18.6,7.8 L18.6,7.5 L20,7.5 L20,5.5 Z M16.8,7.5 L15.1,18.6 C15.1,18.7 15,18.8 14.8,18.8 L9.1,18.8 C9,18.8 8.8,18.7 8.8,18.6 L7.2,7.5 L16.8,7.5 Z"})),_.warning=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M1,21 L23,21 L12,2 L1,21 Z M13,18 L11,18 L11,16 L13,16 L13,18 Z M13,14 L11,14 L11,10 L13,10 L13,14 Z","fill-rule":"nonzero"})),_.image=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})),_.replaceImage=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",width:"20",height:"20"},(0,e.createElement)("rect",{x:"11",y:"3",width:"7",height:"5",rx:"1"}),(0,e.createElement)("rect",{x:"2",y:"12",width:"7",height:"5",rx:"1"}),(0,e.createElement)(a.Path,{d:"M13,12h1a3,3,0,0,1-3,3v2a5,5,0,0,0,5-5h1L15,9Z"}),(0,e.createElement)(a.Path,{d:"M4,8H3l2,3L7,8H6A3,3,0,0,1,9,5V3A5,5,0,0,0,4,8Z"})),_.link=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})),_.help=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M2,12 C2,6.48 6.48,2 12,2 C17.52,2 22,6.48 22,12 C22,17.52 17.52,22 12,22 C6.48,22 2,17.52 2,12 Z M12,20 C16.41,20 20,16.41 20,12 C20,7.59001 16.41,4.00002 12,4.00002 C7.59,4.00002 4,7.59001 4,12 C4,16.41 7.59,20 12,20 Z"}),(0,e.createElement)("polygon",{points:"13 16 13 18 11 18 11 16"}),(0,e.createElement)(a.Path,{d:"M8,10 C8,7.79 9.79,6 12,6 C14.21,6 16,7.79 16,10 C16,11.28291 15.21,11.97331 14.4408,12.6455 C13.711,13.2833 13,13.9046 13,15 L11,15 C11,13.1787 11.94212,12.4566 12.7704,11.82167 C13.4202,11.3236 14,10.87921 14,10 C14,8.9 13.1,8 12,8 C10.9,8 10,8.9 10,10 L8,10 Z"})),_.star=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)("polygon",{points:"12 17.7371778 5.81966011 21.5 7.49246652 14.4659011 2 9.75735421 9.2141911 9.1728642 12 2.5 14.7858089 9.1728642 22 9.75735421 16.5075335 14.4659011 18.1803399 21.5"})),_.school=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3L1 9l11 6 9-4.91V17h2V9L12 3z"})),_.support=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M12,2C6.48,2,2,6.48,2,12c0,5.52,4.48,10,10,10s10-4.48,10-10C22,6.48,17.52,2,12,2z M19.46,9.12l-2.78,1.15 c-0.51-1.36-1.58-2.44-2.95-2.94l1.15-2.78C16.98,5.35,18.65,7.02,19.46,9.12z M12,15c-1.66,0-3-1.34-3-3s1.34-3,3-3s3,1.34,3,3 S13.66,15,12,15z M9.13,4.54l1.17,2.78c-1.38,0.5-2.47,1.59-2.98,2.97L4.54,9.13C5.35,7.02,7.02,5.35,9.13,4.54z M4.54,14.87 l2.78-1.15c0.51,1.38,1.59,2.46,2.97,2.96l-1.17,2.78C7.02,18.65,5.35,16.98,4.54,14.87z M14.88,19.46l-1.15-2.78 c1.37-0.51,2.45-1.59,2.95-2.97l2.78,1.17C18.65,16.98,16.98,18.65,14.88,19.46z"})),_.cloud=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M18.3529412,9.83333333 C20.4705882,10.0666667 22,11.8166667 22,13.9166667 C22,16.1333333 20.1176471,18 17.8823529,18 L6.11764706,18 C3.88235294,18 2,16.1333333 2,13.9166667 C2,11.8166667 3.52941176,10.1833333 5.64705882,9.83333333 C5.52941176,9.71666667 5.52941176,9.48333333 5.52941176,9.25 C5.52941176,7.61666667 6.82352941,6.33333333 8.47058824,6.33333333 C8.82352941,6.33333333 9.29411765,6.45 9.52941176,6.56666667 C10.3529412,5.05 11.8823529,4 13.7647059,4 C16.3529412,4 18.4705882,6.1 18.4705882,8.66666667 C18.4705882,9.13333333 18.3529412,9.48333333 18.3529412,9.83333333 Z"})),_.visibility=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M12,5 C17,5 21.27,8.11 23,12.5 C21.27,16.89 17,20 12,20 C7,20 2.73,16.89 1,12.5 C2.73,8.11 7,5 12,5 Z M12,17.5 C14.76,17.5 17,15.26 17,12.5 C17,9.74 14.76,7.5 12,7.5 C9.24,7.5 7,9.74 7,12.5 C7,15.26 9.24,17.5 12,17.5 Z","fill-rule":"nonzero"}),(0,e.createElement)(a.Path,{d:"M12,9.5 C10.34,9.5 9,10.84 9,12.5 C9,14.16 10.34,15.5 12,15.5 C13.66,15.5 15,14.16 15,12.5 C15,10.84 13.66,9.5 12,9.5 Z","fill-rule":"nonzero"})),_.visibilityHidden=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M19.1145976,17.6145976 C17.1357397,19.111758 14.6721169,20 12,20 C7,20 2.73,16.89 1,12.5 C2.1681438,9.53575071 4.49435577,7.15509483 7.42141271,5.92141271 L9.60854669,8.10854669 C8.05477185,8.95699413 7,10.6060682 7,12.5 C7,15.26 9.24,17.5 12,17.5 C13.8939318,17.5 15.5430059,16.4452281 16.3914533,14.8914533 L19.1145976,17.6145976 L19.1145976,17.6145976 Z","fill-rule":"nonzero"}),(0,e.createElement)(a.Path,{d:"M20.6043865,16.2759593 L16.9972006,12.6687735 C16.9990619,12.6127432 17,12.5564805 17,12.5 C17,9.74 14.76,7.5 12,7.5 C11.9435195,7.5 11.8872568,7.50093805 11.8312265,7.50279942 L9.57740803,5.2489809 C10.3592736,5.08578831 11.1695684,5 12,5 C17,5 21.27,8.11 23,12.5 C22.4438856,13.9111805 21.6253071,15.1900957 20.6043865,16.2759593 L20.6043865,16.2759593 Z","fill-rule":"nonzero"}),(0,e.createElement)(a.Path,{d:"M13.6675474,14.9959745 C13.1910334,15.314476 12.6176688,15.5 12,15.5 C10.34,15.5 9,14.16 9,12.5 C9,11.8823312 9.18552396,11.3089666 9.50402547,10.8324526 L2.66116524,3.98959236 C2.27064094,3.59906807 2.27064094,2.96590309 2.66116524,2.5753788 C3.05168953,2.18485451 3.68485451,2.18485451 4.0753788,2.5753788 L21.0459415,19.5459415 C21.4364658,19.9364658 21.4364658,20.5696308 21.0459415,20.9601551 C20.6554173,21.3506794 20.0222523,21.3506794 19.631728,20.9601551 L13.6675474,14.9959745 L13.6675474,14.9959745 Z","fill-rule":"nonzero"})),_.visibilityAlt=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M12,16 C14.208,16 16,14.208 16,12 C16,9.792 14.208,8 12,8 C9.792,8 8,9.792 8,12 C8,14.208 9.792,16 12,16 Z M12,14.5 C10.6204271,14.5 9.5,13.3795729 9.5,12 C9.5,10.6204271 10.6204271,9.5 12,9.5 C13.3795729,9.5 14.5,10.6204271 14.5,12 C14.5,13.3795729 13.3795729,14.5 12,14.5 Z","fill-rule":"nonzero"}),(0,e.createElement)(a.Path,{d:"M12,16 C14.208,16 16,14.208 16,12 C16,9.792 14.208,8 12,8 C9.792,8 8,9.792 8,12 C8,14.208 9.792,16 12,16 Z M12,14.5 C10.6204271,14.5 9.5,13.3795729 9.5,12 C9.5,10.6204271 10.6204271,9.5 12,9.5 C13.3795729,9.5 14.5,10.6204271 14.5,12 C14.5,13.3795729 13.3795729,14.5 12,14.5 Z","fill-rule":"nonzero"}),(0,e.createElement)(a.Path,{d:"M12,4.5 C17,4.5 21.27,7.61 23,12 C21.27,16.39 17,19.5 12,19.5 C7,19.5 2.73,16.39 1,12 C2.73,7.61 7,4.5 12,4.5 Z M21.3473903,12 C19.6713562,8.45851492 16.065323,6.10714286 12,6.10714286 C7.934677,6.10714286 4.32864381,8.45851492 2.65260973,12 C4.32864381,15.5414851 7.934677,17.8928571 12,17.8928571 C16.065323,17.8928571 19.6713562,15.5414851 21.3473903,12 Z","fill-rule":"nonzero"})),_.visibilityHiddenAlt=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M13.9708958,15.4810143 C13.389064,15.8113365 12.7164305,16 12,16 C9.792,16 8,14.208 8,12 C8,11.3082051 8.17591163,10.6572469 8.48541416,10.089446 L9.62711077,11.2115964 C9.54465452,11.4595008 9.5,11.7245863 9.5,12 C9.5,13.3795729 10.6204271,14.5 12,14.5 C12.2905966,14.5 12.5696948,14.4502864 12.8292449,14.3589089 L13.9708958,15.4810143 L13.9708958,15.4810143 Z","fill-rule":"nonzero"}),(0,e.createElement)(a.Path,{d:"M15.8136867,13.2093721 L14.4986393,11.9168387 C14.4551273,10.5889421 13.3734522,9.52129787 12.040023,9.50031471 L10.7249635,8.20776951 C11.1254753,8.07302998 11.554261,8 12,8 C14.208,8 16,9.792 16,12 C16,12.4214718 15.9347055,12.8277859 15.8136867,13.2093721 L15.8136867,13.2093721 Z","fill-rule":"nonzero"}),(0,e.createElement)(a.Path,{d:"M16.9542237,18.4124655 C15.4477475,19.1104464 13.7695931,19.5 12,19.5 C7,19.5 2.73,16.39 1,12 C1.83549245,9.87987753 3.26340063,8.05829526 5.0798477,6.74138281 L6.22058871,7.86259395 C4.69709513,8.8848633 3.45414836,10.3063369 2.65260973,12 C4.32864381,15.5414851 7.934677,17.8928571 12,17.8928571 C13.3051937,17.8928571 14.5630455,17.6504858 15.7248846,17.2041731 L16.9542237,18.4124655 L16.9542237,18.4124655 Z","fill-rule":"nonzero"}),(0,e.createElement)(a.Path,{d:"M19.489889,16.8185998 L18.3656404,15.7135987 C19.6222382,14.7364947 20.6512781,13.4708955 21.3473903,12 C19.6713562,8.45851492 16.065323,6.10714286 12,6.10714286 C10.9730526,6.10714286 9.97541373,6.25718996 9.03079081,6.53856491 L7.75659725,5.28618597 C9.07339857,4.77839975 10.5040254,4.5 12,4.5 C17,4.5 21.27,7.61 23,12 C22.2539458,13.8931665 21.0355216,15.5482882 19.489889,16.8185998 L19.489889,16.8185998 Z","fill-rule":"nonzero"}),(0,e.createElement)(a.Path,{d:"M2.72426842,4.42613185 L19.2242684,20.6436463 C19.5196795,20.9339998 19.9945355,20.9298999 20.2848891,20.6344888 C20.5752426,20.3390777 20.5711426,19.8642217 20.2757316,19.5738682 L3.77573158,3.35635373 C3.48032051,3.0660002 3.00546447,3.07010014 2.71511094,3.36551121 C2.42475741,3.66092228 2.42885735,4.13577832 2.72426842,4.42613185 Z","fill-rule":"nonzero"})),_.wpFusion=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M5.05263158,0 L24,0 L24,0 L24,18.9473684 C24,21.7378598 21.7378598,24 18.9473684,24 L0,24 L0,24 L0,5.05263158 C0,2.26214021 2.26214021,0 5.05263158,0 Z",fill:"#E55B10"}),(0,e.createElement)(a.Path,{d:"M19.5789474,9.78947368 C19.5789474,10.3126908 19.1547961,10.7368421 18.6315789,10.7368421 L11.0526316,10.7362105 L11.0526316,18.3157895 C11.0526316,18.8390066 10.6284803,19.2631579 10.1052632,19.2631579 L9.47368421,19.2631579 C8.95046709,19.2631579 8.52631579,18.8390066 8.52631579,18.3157895 L8.52631579,9.47368421 C8.52631579,9.13121956 8.70802977,8.83119651 8.98029891,8.66477387 C9.14698598,8.39224029 9.44700903,8.21052632 9.78947368,8.21052632 L18.6315789,8.21052632 C19.1547961,8.21052632 19.5789474,8.63467762 19.5789474,9.15789474 L19.5789474,9.78947368 Z",fill:"#FFFFFF"}),(0,e.createElement)(a.Path,{d:"M5.05263158,14.5263158 C5.05263158,14.0030987 5.47678287,13.5789474 6,13.5789474 L13.5789474,13.5795789 L13.5789474,6 C13.5789474,5.47678287 14.0030987,5.05263158 14.5263158,5.05263158 L15.1578947,5.05263158 C15.6811119,5.05263158 16.1052632,5.47678287 16.1052632,6 L16.1052632,14.8421053 C16.1052632,15.1845699 15.9235492,15.484593 15.65128,15.6510156 C15.484593,15.9235492 15.1845699,16.1052632 14.8421053,16.1052632 L6,16.1052632 C5.47678287,16.1052632 5.05263158,15.6811119 5.05263158,15.1578947 L5.05263158,14.5263158 Z",fill:"#FFFFFF"})),_.acf=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M19.2,0 C21.8509668,0 24,2.1490332 24,4.8 L24,19.2 C24,21.8509668 21.8509668,24 19.2,24 L4.8,24 C2.1490332,24 0,21.8509668 0,19.2 L0,4.8 C0,2.1490332 2.1490332,0 4.8,0 L19.2,0 Z M6.89048872,7.2 L5.10930627,7.2 L1.24499674,16.9860194 L1.24732975,16.9866974 L1.2,17.1 L3.65563145,17.1 L4.2996,15.468 L7.7016,15.4704 L8.34587867,17.1 L10.8,17.1 L10.7526702,16.9866974 L10.7550033,16.9860194 L10.6063073,16.6130016 C11.2549234,16.9251163 11.9820385,17.1 12.75,17.1 C14.249715,17.1 15.5936573,16.433058 16.5014094,15.3795917 L16.5,17.1 L18.9,17.1 L18.9,13.5 L22.65,13.5 L22.65,11.1 L18.9,11.0988 L18.9,9.5988 L22.8,9.6 L22.8,7.2 L16.5,7.2 L16.5014746,8.92048398 C15.5937217,7.86697391 14.2497509,7.2 12.75,7.2 C10.6493455,7.2 8.85431186,8.50851842 8.13552383,10.3549305 L6.89048872,7.2 Z M12.75,9.48 C13.89314,9.48 14.8684898,10.1983951 15.2492094,11.2083452 L15.3135218,11.4010233 L16.5,11.4 L16.5,13.2012 L15.2051151,13.2011741 C14.8224969,14.0936466 13.9674734,14.7355294 12.9545886,14.8122785 L12.75,14.82 C11.2753997,14.82 10.08,13.6246003 10.08,12.15 C10.08,10.6753997 11.2753997,9.48 12.75,9.48 Z M6.0012,11.16 L6.8916,13.4172 L5.1108,13.416 L6.0012,11.16 Z",fill:"#5DE8BF"}));var C=_;const E=(0,a.withFilters)("blockVisibility.addControlSetOptions")((t=>(0,e.createElement)(e.Fragment,null))),k=(0,a.withFilters)("blockVisibility.addControlSetModals")((t=>(0,e.createElement)(e.Fragment,null)));function w(n){var l,o;const[r,s]=(0,e.useState)(!1),{type:u,controls:d,controlSets:p,controlSetAtts:v,defaultControls:m,setControlSetAtts:y}=n;function _(e){let n;n=e.active?(0,t.omit)({...v.controls},[e.attributeSlug]):(0,t.assign)({...v.controls},{[e.attributeSlug]:{}});const i=(0,t.assign)({...v},{controls:{...n}});y(i)}function k(e,t){y({...v,[e]:t})}const w=d.filter((e=>"core"===e.type)),x=d.filter((e=>"integration"===e.type)),M=null!==(l=null==v?void 0:v.title)&&void 0!==l?l:"",L=null===(o=null==v?void 0:v.enable)||void 0===o||o;let P=M;P||(P="single"===u?(0,i.__)("Enabled Controls","block-visibility"):(0,i.__)("Control Set","block-visibility"));const V=(0,e.createElement)(a.DropdownMenu,{className:"settings-dropdown",label:(0,i.__)("Settings","block-visibility"),icon:b,popoverProps:{className:"block-visibility__control-popover control-settings",focusOnMount:"container"}},(()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h3",null,(0,i.__)("Settings","block-visibility")),(0,e.createElement)(a.TextControl,{value:M,label:(0,i.__)("Control set title","block-visibility"),placeholder:P,onChange:e=>k("title",e)}),(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Enable control set","block-visibility"),checked:L,onChange:()=>k("enable",!L)})))),N=(0,e.createElement)(a.DropdownMenu,{className:"controls-dropdown",label:(0,i.__)("Visibility Controls","block-visibility"),icon:C.visibilityAlt,popoverProps:{className:"block-visibility__control-popover control-set",focusOnMount:"container"}},(()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(a.MenuGroup,{label:(0,i.__)("Controls","block-visibility")},w.map(((t,n)=>(0,e.createElement)(O,{key:n,control:t,toggleControls:_})))),0!==x.length&&(0,e.createElement)(a.MenuGroup,{label:(0,i.__)("Integrations","block-visibility")},x.map(((t,n)=>(0,e.createElement)(O,{key:n,control:t,toggleControls:_}))))))),T=(0,e.createElement)(a.DropdownMenu,{className:"options-dropdown",label:(0,i.__)("Options","block-visibility"),icon:f,popoverProps:{focusOnMount:"container"}},(l=>{let{onClose:o}=l;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(a.Slot,{name:"ControlSetOptionsTop"}),(0,e.createElement)(a.MenuGroup,{label:(0,i.__)("Tools","block-visibility")},(0,e.createElement)(a.Slot,{name:"ControlSetOptionsToolsTop"}),"multiple"===u&&(0,e.createElement)(a.MenuItem,{onClick:()=>{!function(){const e=Math.max(...p.map((e=>e.id)),0)+1,t={...v,id:e};y(t)}(),o()}},(0,i.__)("Duplicate","block-visibility")),(0,e.createElement)(a.Slot,{name:"ControlSetOptionsToolsMiddle"}),(0,e.createElement)(a.MenuItem,{onClick:()=>{!function(){const e=(0,t.assign)({...v},{controls:m});y(e)}(),o()}},(0,i.__)("Reset all controls","block-visibility")),(0,e.createElement)(a.Slot,{name:"ControlSetOptionsToolsBottom"}),(0,e.createElement)("a",{href:"https://www.blockvisibilitywp.com/knowledge-base/guide-to-visibility-controls-and-control-sets?bv_query=learn_more&utm_source=plugin&utm_medium=editor&utm_campaign=plugin_referrals",target:"_blank",role:"menuitem",rel:"noopener noreferrer",className:"components-button components-menu-item__button"},(0,e.createElement)("span",{className:"components-menu-item__item"},(0,i.__)("Help","block-visibility"),(0,e.createElement)(a.VisuallyHidden,null,(0,i.__)("(opens in a new tab)","block-visibility"))),(0,e.createElement)(h,{icon:g,size:20}))),(0,e.createElement)(a.Slot,{name:"ControlSetOptionsBottom"}),"multiple"===u&&(0,e.createElement)(a.MenuGroup,null,(0,e.createElement)(a.MenuItem,{onClick:()=>{y(v,!0),o()}},(0,i.__)("Remove control set","block-visibility"))),(0,e.createElement)(E,c({modalOpen:r,setModalOpen:s,toggleControls:_,coreControls:w,integrationControls:x,onClose:o},n)))}));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"control-set__header section-header main"},(0,e.createElement)("span",{className:"section-header__title"},P),(0,e.createElement)("div",{className:"section-header__toolbar"},N,"multiple"===u&&V,T)),r&&(0,e.createElement)(S,c({modalOpen:r,setModalOpen:s,toggleControls:_,coreControls:w,integrationControls:x},n)))}function S(t){return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(a.Slot,{name:"ControlSetModals"}),(0,e.createElement)(k,t))}function O(t){const{control:n,toggleControls:i}=t;return(0,e.createElement)(a.MenuItem,{key:n.attributeSlug,className:v()({disabled:!n.active}),icon:n.active?y:"",onClick:()=>i(n)},n.icon&&(0,e.createElement)(h,{className:"control-branding-icon",icon:n.icon}),n.label)}var x=window.React,M=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?I(G,--j):0,B--,10===$&&(B=1,z--),$}function Y(){return $=j2||J($)>3?"":" "}function le(e,t){for(;--t&&Y()&&!($<48||$>102||$>57&&$<65||$>70&&$<97););return K(e,Q()+(t<6&&32==X()&&32==Y()))}function oe(e){for(;Y();)switch($){case e:return j;case 34:case 39:34!==e&&39!==e&&oe($);break;case 40:41===e&&oe(e);break;case 92:Y()}return j}function re(e,t){for(;Y()&&e+$!==57&&(e+$!==84||47!==X()););return"/*"+K(t,j-1)+"*"+P(47===e?e:Y())}function se(e){for(;!J(X());)Y();return K(e,j)}var ae="-ms-",ce="-moz-",ue="-webkit-",de="comm",pe="rule",ve="decl",me="@keyframes";function be(e,t){for(var n="",i=A(e),l=0;l6)switch(I(e,t+1)){case 109:if(45!==I(e,t+4))break;case 102:return T(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+ce+(108==I(e,t+3)?"$3":"$2-$3"))+e;case 115:return~F(e,"stretch")?he(T(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==I(e,t+1))break;case 6444:switch(I(e,D(e)-3-(~F(e,"!important")&&10))){case 107:return T(e,":",":"+ue)+e;case 101:return T(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ue+(45===I(e,14)?"inline-":"")+"box$3$1"+ue+"$2$3$1"+ae+"$2box$3")+e}break;case 5936:switch(I(e,t+11)){case 114:return ue+e+ae+T(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ue+e+ae+T(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ue+e+ae+T(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ue+e+ae+e+e}return e}function ge(e){return te(ye("",null,null,null,[""],e=ee(e),0,[0],e))}function ye(e,t,n,i,l,o,r,s,a){for(var c=0,u=0,d=r,p=0,v=0,m=0,b=1,f=1,h=1,g=0,y="",_=l,C=o,E=i,k=y;f;)switch(m=g,g=Y()){case 40:if(108!=m&&58==k.charCodeAt(d-1)){-1!=F(k+=T(ne(g),"&","&\f"),"&\f")&&(h=-1);break}case 34:case 39:case 91:k+=ne(g);break;case 9:case 10:case 13:case 32:k+=ie(m);break;case 92:k+=le(Q()-1,7);continue;case 47:switch(X()){case 42:case 47:H(Ce(re(Y(),Q()),t,n),a);break;default:k+="/"}break;case 123*b:s[c++]=D(k)*h;case 125*b:case 59:case 0:switch(g){case 0:case 125:f=0;case 59+u:v>0&&D(k)-d&&H(v>32?Ee(k+";",i,n,d-1):Ee(T(k," ","")+";",i,n,d-2),a);break;case 59:k+=";";default:if(H(E=_e(k,t,n,c,u,l,s,y,_=[],C=[],d),o),123===g)if(0===u)ye(k,t,E,E,_,o,d,s,C);else switch(p){case 100:case 109:case 115:ye(e,E,E,i&&H(_e(e,E,E,0,0,l,s,y,l,_=[],d),C),l,C,d,s,i?_:C);break;default:ye(k,E,E,E,[""],C,0,s,C)}}c=u=v=0,b=h=1,y=k="",d=r;break;case 58:d=1+D(k),v=m;default:if(b<1)if(123==g)--b;else if(125==g&&0==b++&&125==W())continue;switch(k+=P(g),g*b){case 38:h=u>0?1:(k+="\f",-1);break;case 44:s[c++]=(D(k)-1)*h,h=1;break;case 64:45===X()&&(k+=ne(Y())),p=X(),u=d=D(y=k+=se(Q())),g++;break;case 45:45===m&&2==D(k)&&(b=0)}}return o}function _e(e,t,n,i,l,o,r,s,a,c,u){for(var d=l-1,p=0===l?o:[""],v=A(p),m=0,b=0,f=0;m0?p[h]+" "+g:T(g,/&\f/g,p[h])))&&(a[f++]=y);return q(e,t,n,0===l?pe:s,a,c,u)}function Ce(e,t,n){return q(e,t,n,de,P($),R(e,2,-2),0)}function Ee(e,t,n,i){return q(e,t,n,ve,R(e,0,i),R(e,i+1,-1),i)}var ke=function(e,t,n){for(var i=0,l=0;i=l,l=X(),38===i&&12===l&&(t[n]=1),!J(l);)Y();return K(e,j)},we=new WeakMap,Se=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,i=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||we.get(n))&&!i){we.set(e,!0);for(var l=[],o=function(e,t){return te(function(e,t){var n=-1,i=44;do{switch(J(i)){case 0:38===i&&12===X()&&(t[n]=1),e[n]+=ke(j-1,t,n);break;case 2:e[n]+=ne(i);break;case 4:if(44===i){e[++n]=58===X()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=P(i)}}while(i=Y());return e}(ee(e),t))}(t,l),r=n.props,s=0,a=0;s-1&&!e.return)switch(e.type){case ve:e.return=he(e.value,e.length);break;case me:return be([Z(e,{value:T(e.value,"@","@"+ue)})],i);case pe:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return be([Z(e,{props:[T(t,/:(read-\w+)/,":-moz-$1")]})],i);case"::placeholder":return be([Z(e,{props:[T(t,/:(plac\w+)/,":-webkit-input-$1")]}),Z(e,{props:[T(t,/:(plac\w+)/,":-moz-$1")]}),Z(e,{props:[T(t,/:(plac\w+)/,ae+"input-$1")]})],i)}return""}))}}],Me=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i,l,o=e.stylisPlugins||xe,r={},s=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++i,l-=4)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(l){case 3:n^=(255&e.charCodeAt(i+2))<<16;case 2:n^=(255&e.charCodeAt(i+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(i)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},Ne={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Te=/[A-Z]|^ms/g,Fe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ie=function(e){return 45===e.charCodeAt(1)},Re=function(e){return null!=e&&"boolean"!=typeof e},De=function(e){var t=Object.create(null);return function(e){return void 0===t[e]&&(t[e]=Ie(n=e)?n:n.replace(Te,"-$&").toLowerCase()),t[e];var n}}(),Ae=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Fe,(function(e,t,n){return ze={name:t,styles:n,next:ze},t}))}return 1===Ne[e]||Ie(e)||"number"!=typeof t||0===t?t:t+"px"};function He(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return ze={name:n.name,styles:n.styles,next:ze},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)ze={name:i.name,styles:i.styles,next:ze},i=i.next;return n.styles+";"}return function(e,t,n){var i="";if(Array.isArray(n))for(var l=0;l=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}function lt(e){return lt="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},lt(e)}function ot(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rt(e,t){for(var n=0;n-1}function St(e){return wt(e)?window.pageYOffset:e.scrollTop}function Ot(e,t){wt(e)?window.scrollTo(0,t):e.scrollTop=t}function xt(e,t,n,i){return n*((e=e/i-1)*e*e+1)+t}function Mt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:yt,l=St(e),o=t-l,r=10,s=0;function a(){var t=xt(s+=r,l,o,n);Ot(e,t),s=v)return{placement:"bottom",maxHeight:t};if(k>=v&&!r)return o&&Mt(a,w,O),{placement:"bottom",maxHeight:t};if(!r&&k>=i||r&&C>=i)return o&&Mt(a,w,O),{placement:"bottom",maxHeight:r?C-g:k-g};if("auto"===l||r){var x=t,M=r?_:E;return M>=i&&(x=Math.min(M-g-s.controlHeight,t)),{placement:"top",maxHeight:x}}if("bottom"===l)return o&&Ot(a,w),{placement:"bottom",maxHeight:t};break;case"top":if(_>=v)return{placement:"top",maxHeight:t};if(E>=v&&!r)return o&&Mt(a,S,O),{placement:"top",maxHeight:t};if(!r&&E>=i||r&&_>=i){var L=t;return(!r&&E>=i||r&&_>=i)&&(L=r?_-y:E-y),o&&Mt(a,S,O),{placement:"top",maxHeight:L}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(l,'".'))}return c}var Dt=function(e){return"auto"===e?"bottom":e},At=(0,x.createContext)({getPortalPlacement:null}),Ht=function(e){ct(n,e);var t=ht(n);function n(){var e;ot(this,n);for(var i=arguments.length,l=new Array(i),o=0;oe.length)&&(t=e.length);for(var n=0,i=new Array(t);n1?"s":""," ").concat(l.join(","),", selected.");case"select-option":return"option ".concat(i,o?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,i=e.options,l=e.label,o=void 0===l?"":l,r=e.selectValue,s=e.isDisabled,a=e.isSelected,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&r)return"value ".concat(o," focused, ").concat(c(r,n),".");if("menu"===t){var u=s?" disabled":"",d="".concat(a?"selected":"focused").concat(u);return"option ".concat(o," ").concat(d,", ").concat(c(i,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Sn=function(e){var t=e.ariaSelection,n=e.focusedOption,i=e.focusedValue,l=e.focusableOptions,o=e.isFocused,r=e.selectValue,s=e.selectProps,a=e.id,c=s.ariaLiveMessages,u=s.getOptionLabel,d=s.inputValue,p=s.isMulti,v=s.isOptionDisabled,m=s.isSearchable,b=s.menuIsOpen,f=s.options,h=s.screenReaderStatus,g=s.tabSelectsValue,y=s["aria-label"],_=s["aria-live"],C=(0,x.useMemo)((function(){return mt(mt({},wn),c||{})}),[c]),E=(0,x.useMemo)((function(){var e,n="";if(t&&C.onChange){var i=t.option,l=t.options,o=t.removedValue,s=t.removedValues,a=t.value,c=o||i||(e=a,Array.isArray(e)?null:e),d=c?u(c):"",p=l||s||void 0,m=p?p.map(u):[],b=mt({isDisabled:c&&v(c,r),label:d,labels:m},t);n=C.onChange(b)}return n}),[t,C,v,r,u]),k=(0,x.useMemo)((function(){var e="",t=n||i,l=!!(n&&r&&r.includes(n));if(t&&C.onFocus){var o={focused:t,label:u(t),isDisabled:v(t,r),isSelected:l,options:f,context:t===n?"menu":"value",selectValue:r};e=C.onFocus(o)}return e}),[n,i,u,v,C,f,r]),w=(0,x.useMemo)((function(){var e="";if(b&&f.length&&C.onFilter){var t=h({count:l.length});e=C.onFilter({inputValue:d,resultsMessage:t})}return e}),[l,d,b,C,f,h]),S=(0,x.useMemo)((function(){var e="";if(C.guidance){var t=i?"value":b?"menu":"input";e=C.guidance({"aria-label":y,context:t,isDisabled:n&&v(n,r),isMulti:p,isSearchable:m,tabSelectsValue:g})}return e}),[y,n,i,p,v,m,b,C,r,g]),O="".concat(k," ").concat(w," ").concat(S),M=Qe(x.Fragment,null,Qe("span",{id:"aria-selection"},E),Qe("span",{id:"aria-context"},O)),L="initial-input-focus"===(null==t?void 0:t.action);return Qe(x.Fragment,null,Qe(kn,{id:a},L&&M),Qe(kn,{"aria-live":_,"aria-atomic":"false","aria-relevant":"additions text"},o&&!L&&M))},On=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],xn=new RegExp("["+On.map((function(e){return e.letters})).join("")+"]","g"),Mn={},Ln=0;Ln0,b=d-p-u,f=!1;b>t&&r.current&&(i&&i(e),r.current=!1),m&&s.current&&(o&&o(e),s.current=!1),m&&t>b?(n&&!r.current&&n(e),v.scrollTop=d,f=!0,r.current=!0):!m&&-t>u&&(l&&!s.current&&l(e),v.scrollTop=0,f=!0,s.current=!0),f&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[n,i,l,o]),d=(0,x.useCallback)((function(e){u(e,e.deltaY)}),[u]),p=(0,x.useCallback)((function(e){a.current=e.changedTouches[0].clientY}),[]),v=(0,x.useCallback)((function(e){var t=a.current-e.changedTouches[0].clientY;u(e,t)}),[u]),m=(0,x.useCallback)((function(e){if(e){var t=!!Tt&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",v,t)}}),[v,p,d]),b=(0,x.useCallback)((function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",v,!1))}),[v,p,d]);return(0,x.useEffect)((function(){if(t){var e=c.current;return m(e),function(){b(e)}}}),[t,m,b]),function(e){c.current=e}}({isEnabled:void 0===i||i,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),o=function(e){var t=e.isEnabled,n=e.accountForScrollbars,i=void 0===n||n,l=(0,x.useRef)({}),o=(0,x.useRef)(null),r=(0,x.useCallback)((function(e){if($n){var t=document.body,n=t&&t.style;if(i&&An.forEach((function(e){var t=n&&n[e];l.current[e]=t})),i&&Gn<1){var o=parseInt(l.current.paddingRight,10)||0,r=document.body?document.body.clientWidth:0,s=window.innerWidth-r+o||0;Object.keys(Hn).forEach((function(e){var t=Hn[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&jn()&&(t.addEventListener("touchmove",zn,qn),e&&(e.addEventListener("touchstart",Un,qn),e.addEventListener("touchmove",Bn,qn))),Gn+=1}}),[i]),s=(0,x.useCallback)((function(e){if($n){var t=document.body,n=t&&t.style;Gn=Math.max(Gn-1,0),i&&Gn<1&&An.forEach((function(e){var t=l.current[e];n&&(n[e]=t)})),t&&jn()&&(t.removeEventListener("touchmove",zn,qn),e&&(e.removeEventListener("touchstart",Un,qn),e.removeEventListener("touchmove",Bn,qn)))}}),[i]);return(0,x.useEffect)((function(){if(t){var e=o.current;return r(e),function(){s(e)}}}),[t,r,s]),function(e){o.current=e}}({isEnabled:n});return Qe(x.Fragment,null,n&&Qe("div",{onClick:Zn,css:Wn}),t((function(e){l(e),o(e)})))}var Xn={clearIndicator:nn,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,i=e.theme,l=i.colors,o=i.borderRadius,r=i.spacing;return{label:"control",alignItems:"center",backgroundColor:t?l.neutral5:l.neutral0,borderColor:t?l.neutral10:n?l.primary:l.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(l.primary):void 0,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:r.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?l.primary:l.neutral30}}},dropdownIndicator:tn,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,i=n.spacing.baseUnit,l=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?l.neutral10:l.neutral20,marginBottom:2*i,marginTop:2*i,width:1}},input:function(e){var t=e.isDisabled,n=e.value,i=e.theme,l=i.spacing,o=i.colors;return mt({margin:l.baseUnit/2,paddingBottom:l.baseUnit/2,paddingTop:l.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80,transform:n?"translateZ(0)":""},un)},loadingIndicator:function(e){var t=e.isFocused,n=e.size,i=e.theme,l=i.colors,o=i.spacing.baseUnit;return{label:"loadingIndicator",color:t?l.neutral60:l.neutral20,display:"flex",padding:2*o,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:Ut,menu:function(e){var t,n=e.placement,i=e.theme,l=i.borderRadius,o=i.spacing,r=i.colors;return ut(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),ut(t,"backgroundColor",r.neutral0),ut(t,"borderRadius",l),ut(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),ut(t,"marginBottom",o.menuGutter),ut(t,"marginTop",o.menuGutter),ut(t,"position","absolute"),ut(t,"width","100%"),ut(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,i=e.position;return{left:t.left,position:i,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,i=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:i/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,i=t.colors,l=e.cropWithEllipsis;return{borderRadius:n/2,color:i.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:l||void 0===l?"ellipsis":void 0,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,i=t.borderRadius,l=t.colors;return{alignItems:"center",borderRadius:i/2,backgroundColor:e.isFocused?l.dangerLight:void 0,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:l.dangerLight,color:l.danger}}},noOptionsMessage:Bt,option:function(e){var t=e.isDisabled,n=e.isFocused,i=e.isSelected,l=e.theme,o=l.spacing,r=l.colors;return{label:"option",backgroundColor:i?r.primary:n?r.primary25:"transparent",color:t?r.neutral20:i?r.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*o.baseUnit,"px ").concat(3*o.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:t?void 0:i?r.primary:r.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,gridArea:"1 / 1 / 2 / 3",marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2}},singleValue:function(e){var t=e.isDisabled,n=e.theme,i=n.spacing,l=n.colors;return{label:"singleValue",color:t?l.neutral40:l.neutral80,gridArea:"1 / 1 / 2 / 3",marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2,maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},valueContainer:function(e){var t=e.theme.spacing,n=e.isMulti,i=e.hasValue,l=e.selectProps.controlShouldRenderValue;return{alignItems:"center",display:n&&i&&l?"flex":"grid",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Qn={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Kn={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Lt(),captureMenuScroll:!Lt(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=mt({ignoreCase:!0,ignoreAccents:!0,stringify:In,trim:!0,matchFrom:"any"},undefined),i=n.ignoreCase,l=n.ignoreAccents,o=n.stringify,r=n.trim,s=n.matchFrom,a=r?Fn(t):t,c=r?Fn(o(e)):o(e);return i&&(a=a.toLowerCase(),c=c.toLowerCase()),l&&(a=Tn(a),c=Nn(c)),"start"===s?c.substr(0,a.length)===a:c.indexOf(a)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0};function Jn(e,t,n,i){return{type:"option",data:t,isDisabled:oi(e,t,n),isSelected:ri(e,t,n),label:ii(e,t),value:li(e,t),index:i}}function ei(e,t){return e.options.map((function(n,i){if("options"in n){var l=n.options.map((function(n,i){return Jn(e,n,t,i)})).filter((function(t){return ni(e,t)}));return l.length>0?{type:"group",data:n,options:l,index:i}:void 0}var o=Jn(e,n,t,i);return ni(e,o)?o:void 0})).filter(Ft)}function ti(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,gn(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function ni(e,t){var n=e.inputValue,i=void 0===n?"":n,l=t.data,o=t.isSelected,r=t.label,s=t.value;return(!ai(e)||!o)&&si(e,{label:r,value:s,data:l},i)}var ii=function(e,t){return e.getOptionLabel(t)},li=function(e,t){return e.getOptionValue(t)};function oi(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function ri(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var i=li(e,t);return n.some((function(t){return li(e,t)===i}))}function si(e,t,n){return!e.filterOption||e.filterOption(t,n)}var ai=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},ci=1,ui=function(e){ct(n,e);var t=ht(n);function n(e){var i;return ot(this,n),(i=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.instancePrefix="",i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(e){i.controlRef=e},i.focusedOptionRef=null,i.getFocusedOptionRef=function(e){i.focusedOptionRef=e},i.menuListRef=null,i.getMenuListRef=function(e){i.menuListRef=e},i.inputRef=null,i.getInputRef=function(e){i.inputRef=e},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(e,t){var n=i.props,l=n.onChange,o=n.name;t.name=o,i.ariaOnChange(e,t),l(e,t)},i.setValue=function(e,t,n){var l=i.props,o=l.closeMenuOnSelect,r=l.isMulti,s=l.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:s}),o&&(i.setState({inputIsHiddenAfterUpdate:!r}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(e,{action:t,option:n})},i.selectOption=function(e){var t=i.props,n=t.blurInputOnSelect,l=t.isMulti,o=t.name,r=i.state.selectValue,s=l&&i.isOptionSelected(e,r),a=i.isOptionDisabled(e,r);if(s){var c=i.getOptionValue(e);i.setValue(r.filter((function(e){return i.getOptionValue(e)!==c})),"deselect-option",e)}else{if(a)return void i.ariaOnChange(e,{action:"select-option",option:e,name:o});l?i.setValue([].concat(gn(r),[e]),"select-option",e):i.setValue(e,"select-option")}n&&i.blurInput()},i.removeValue=function(e){var t=i.props.isMulti,n=i.state.selectValue,l=i.getOptionValue(e),o=n.filter((function(e){return i.getOptionValue(e)!==l})),r=It(t,o,o[0]||null);i.onChange(r,{action:"remove-value",removedValue:e}),i.focusInput()},i.clearValue=function(){var e=i.state.selectValue;i.onChange(It(i.props.isMulti,[],null),{action:"clear",removedValues:e})},i.popValue=function(){var e=i.props.isMulti,t=i.state.selectValue,n=t[t.length-1],l=t.slice(0,t.length-1),o=It(e,l,l[0]||null);i.onChange(o,{action:"pop-value",removedValue:n})},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n5||o>5}},i.onTouchEnd=function(e){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(e.target)&&i.menuListRef&&!i.menuListRef.contains(e.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(e){i.userIsDragging||i.onControlMouseDown(e)},i.onClearIndicatorTouchEnd=function(e){i.userIsDragging||i.onClearIndicatorMouseDown(e)},i.onDropdownIndicatorTouchEnd=function(e){i.userIsDragging||i.onDropdownIndicatorMouseDown(e)},i.handleInputChange=function(e){var t=i.props.inputValue,n=e.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(n,{action:"input-change",prevInputValue:t}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(e){i.props.onFocus&&i.props.onFocus(e),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(e){var t=i.props.inputValue;i.menuListRef&&i.menuListRef.contains(document.activeElement)?i.inputRef.focus():(i.props.onBlur&&i.props.onBlur(e),i.onInputChange("",{action:"input-blur",prevInputValue:t}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1}))},i.onOptionHover=function(e){i.blockOptionHover||i.state.focusedOption===e||i.setState({focusedOption:e})},i.shouldHideSelectedOptions=function(){return ai(i.props)},i.onKeyDown=function(e){var t=i.props,n=t.isMulti,l=t.backspaceRemovesValue,o=t.escapeClearsValue,r=t.inputValue,s=t.isClearable,a=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,v=i.state,m=v.focusedOption,b=v.focusedValue,f=v.selectValue;if(!(a||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(i.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||r)return;i.focusValue("previous");break;case"ArrowRight":if(!n||r)return;i.focusValue("next");break;case"Delete":case"Backspace":if(r)return;if(b)i.removeValue(b);else{if(!l)return;n?i.popValue():s&&i.clearValue()}break;case"Tab":if(i.isComposing)return;if(e.shiftKey||!c||!d||!m||p&&i.isOptionSelected(m,f))return;i.selectOption(m);break;case"Enter":if(229===e.keyCode)break;if(c){if(!m)return;if(i.isComposing)return;i.selectOption(m);break}return;case"Escape":c?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:r}),i.onMenuClose()):s&&o&&i.clearValue();break;case" ":if(r)return;if(!c){i.openMenu("first");break}if(!m)return;i.selectOption(m);break;case"ArrowUp":c?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":c?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!c)return;i.focusOption("pageup");break;case"PageDown":if(!c)return;i.focusOption("pagedown");break;case"Home":if(!c)return;i.focusOption("first");break;case"End":if(!c)return;i.focusOption("last");break;default:return}e.preventDefault()}},i.instancePrefix="react-select-"+(i.props.instanceId||++ci),i.state.selectValue=Et(e.value),i}return st(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(e){var t,n,i,l,o,r=this.props,s=r.isDisabled,a=r.menuIsOpen,c=this.state.isFocused;(c&&!s&&e.isDisabled||c&&a&&!e.menuIsOpen)&&this.focusInput(),c&&s&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,i=t.getBoundingClientRect(),l=n.getBoundingClientRect(),o=n.offsetHeight/3,l.bottom+o>i.bottom?Ot(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+o,t.scrollHeight)):l.top-o-1&&(r=s)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:o[r]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,i=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=n.indexOf(i);i||(l=-1);var o=n.length-1,r=-1;if(n.length){switch(e){case"previous":r=0===l?0:-1===l?o:l-1;break;case"next":l>-1&&l0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,i=this.getFocusableOptions();if(i.length){var l=0,o=i.indexOf(n);n||(o=-1),"up"===e?l=o>0?o-1:i.length-1:"down"===e?l=(o+1)%i.length:"pageup"===e?(l=o-t)<0&&(l=0):"pagedown"===e?(l=o+t)>i.length-1&&(l=i.length-1):"last"===e&&(l=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[l],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Qn):mt(mt({},Qn),this.props.theme):Qn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,i=this.getValue,l=this.selectOption,o=this.setValue,r=this.props,s=r.isMulti,a=r.isRtl,c=r.options;return{clearValue:e,cx:t,getStyles:n,getValue:i,hasValue:this.hasValue(),isMulti:s,isRtl:a,options:c,selectOption:l,selectProps:r,setValue:o,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return oi(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return ri(this.props,e,t)}},{key:"filterOption",value:function(e,t){return si(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,i=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:i})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,i=e.inputId,l=e.inputValue,o=e.tabIndex,r=e.form,s=e.menuIsOpen,a=this.getComponents().Input,u=this.state,d=u.inputIsHidden,p=u.ariaSelection,v=this.commonProps,m=i||this.getElementId("input"),b=mt(mt({"aria-autocomplete":"list","aria-expanded":s,"aria-haspopup":!0,"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox"),"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],role:"combobox"},!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?x.createElement(a,c({},v,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:o,form:r,type:"text",value:l},b)):x.createElement(Dn,c({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:yt,onFocus:this.onInputFocus,disabled:t,tabIndex:o,inputMode:"none",form:r,value:""},b))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,i=t.MultiValueContainer,l=t.MultiValueLabel,o=t.MultiValueRemove,r=t.SingleValue,s=t.Placeholder,a=this.commonProps,u=this.props,d=u.controlShouldRenderValue,p=u.isDisabled,v=u.isMulti,m=u.inputValue,b=u.placeholder,f=this.state,h=f.selectValue,g=f.focusedValue,y=f.isFocused;if(!this.hasValue()||!d)return m?null:x.createElement(s,c({},a,{key:"placeholder",isDisabled:p,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),b);if(v)return h.map((function(t,r){var s=t===g,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return x.createElement(n,c({},a,{components:{Container:i,Label:l,Remove:o},isFocused:s,isDisabled:p,key:u,index:r,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));if(m)return null;var _=h[0];return x.createElement(r,c({},a,{data:_,isDisabled:p}),this.formatOptionLabel(_,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,i=n.isDisabled,l=n.isLoading,o=this.state.isFocused;if(!this.isClearable()||!e||i||!this.hasValue()||l)return null;var r={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return x.createElement(e,c({},t,{innerProps:r,isFocused:o}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,i=n.isDisabled,l=n.isLoading,o=this.state.isFocused;return e&&l?x.createElement(e,c({},t,{innerProps:{"aria-hidden":"true"},isDisabled:i,isFocused:o})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var i=this.commonProps,l=this.props.isDisabled,o=this.state.isFocused;return x.createElement(n,c({},i,{isDisabled:l,isFocused:o}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,i=this.state.isFocused,l={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return x.createElement(e,c({},t,{innerProps:l,isDisabled:n,isFocused:i}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,i=t.GroupHeading,l=t.Menu,o=t.MenuList,r=t.MenuPortal,s=t.LoadingMessage,a=t.NoOptionsMessage,u=t.Option,d=this.commonProps,p=this.state.focusedOption,v=this.props,m=v.captureMenuScroll,b=v.inputValue,f=v.isLoading,h=v.loadingMessage,g=v.minMenuHeight,y=v.maxMenuHeight,_=v.menuIsOpen,C=v.menuPlacement,E=v.menuPosition,k=v.menuPortalTarget,w=v.menuShouldBlockScroll,S=v.menuShouldScrollIntoView,O=v.noOptionsMessage,M=v.onMenuScrollToTop,L=v.onMenuScrollToBottom;if(!_)return null;var P,V=function(t,n){var i=t.type,l=t.data,o=t.isDisabled,r=t.isSelected,s=t.label,a=t.value,v=p===l,m=o?void 0:function(){return e.onOptionHover(l)},b=o?void 0:function(){return e.selectOption(l)},f="".concat(e.getElementId("option"),"-").concat(n),h={id:f,onClick:b,onMouseMove:m,onMouseOver:m,tabIndex:-1};return x.createElement(u,c({},d,{innerProps:h,data:l,isDisabled:o,isSelected:r,key:f,label:s,type:i,value:a,isFocused:v,innerRef:v?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())P=this.getCategorizedOptions().map((function(t){if("group"===t.type){var l=t.data,o=t.options,r=t.index,s="".concat(e.getElementId("group"),"-").concat(r),a="".concat(s,"-heading");return x.createElement(n,c({},d,{key:s,data:l,options:o,Heading:i,headingProps:{id:a,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return V(e,"".concat(r,"-").concat(e.index))})))}if("option"===t.type)return V(t,"".concat(t.index))}));else if(f){var N=h({inputValue:b});if(null===N)return null;P=x.createElement(s,d,N)}else{var T=O({inputValue:b});if(null===T)return null;P=x.createElement(a,d,T)}var F={minMenuHeight:g,maxMenuHeight:y,menuPlacement:C,menuPosition:E,menuShouldScrollIntoView:S},I=x.createElement(Ht,c({},d,F),(function(t){var n=t.ref,i=t.placerProps,r=i.placement,s=i.maxHeight;return x.createElement(l,c({},d,F,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove,id:e.getElementId("listbox")},isLoading:f,placement:r}),x.createElement(Yn,{captureEnabled:m,onTopArrive:M,onBottomArrive:L,lockEnabled:w},(function(t){return x.createElement(o,c({},d,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:f,maxHeight:s,focusedOption:p}),P)})))}));return k||"fixed"===E?x.createElement(r,c({},d,{appendTo:k,controlElement:this.controlRef,menuPlacement:C,menuPosition:E}),I):I}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,i=t.isDisabled,l=t.isMulti,o=t.name,r=this.state.selectValue;if(o&&!i){if(l){if(n){var s=r.map((function(t){return e.getOptionValue(t)})).join(n);return x.createElement("input",{name:o,type:"hidden",value:s})}var a=r.length>0?r.map((function(t,n){return x.createElement("input",{key:"i-".concat(n),name:o,type:"hidden",value:e.getOptionValue(t)})})):x.createElement("input",{name:o,type:"hidden"});return x.createElement("div",null,a)}var c=r[0]?this.getOptionValue(r[0]):"";return x.createElement("input",{name:o,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,i=t.focusedOption,l=t.focusedValue,o=t.isFocused,r=t.selectValue,s=this.getFocusableOptions();return x.createElement(Sn,c({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:i,focusedValue:l,isFocused:o,selectValue:r,focusableOptions:s}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,i=e.SelectContainer,l=e.ValueContainer,o=this.props,r=o.className,s=o.id,a=o.isDisabled,u=o.menuIsOpen,d=this.state.isFocused,p=this.commonProps=this.getCommonProps();return x.createElement(i,c({},p,{className:r,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:a,isFocused:d}),this.renderLiveRegion(),x.createElement(t,c({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:a,isFocused:d,menuIsOpen:u}),x.createElement(l,c({},p,{isDisabled:a}),this.renderPlaceholderOrValue(),this.renderInput()),x.createElement(n,c({},p,{isDisabled:a}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,i=t.clearFocusValueOnUpdate,l=t.inputIsHiddenAfterUpdate,o=t.ariaSelection,r=t.isFocused,s=t.prevWasFocused,a=e.options,c=e.value,u=e.menuIsOpen,d=e.inputValue,p=e.isMulti,v=Et(c),m={};if(n&&(c!==n.value||a!==n.options||u!==n.menuIsOpen||d!==n.inputValue)){var b=u?function(e,t){return ti(ei(e,t))}(e,v):[],f=i?function(e,t){var n=e.focusedValue,i=e.selectValue.indexOf(n);if(i>-1){if(t.indexOf(n)>-1)return n;if(i-1?n:t[0]}(t,b);m={selectValue:v,focusedOption:h,focusedValue:f,clearFocusValueOnUpdate:!1}}var g=null!=l&&e!==n?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},y=o,_=r&&s;return r&&!_&&(y={value:It(p,v,v[0]||null),options:v,action:"initial-input-focus"},_=!s),"initial-input-focus"===(null==o?void 0:o.action)&&(y=null),mt(mt(mt({},m),g),{},{prevProps:e,ariaSelection:y,prevWasFocused:_})}}]),n}(x.Component);ui.defaultProps=Kn;var di=(0,x.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,i=e.defaultMenuIsOpen,l=void 0!==i&&i,o=e.defaultValue,r=void 0===o?null:o,s=e.inputValue,a=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,p=e.onMenuOpen,v=e.value,m=it(e,hn),b=fn((0,x.useState)(void 0!==s?s:n),2),f=b[0],h=b[1],g=fn((0,x.useState)(void 0!==a?a:l),2),y=g[0],_=g[1],C=fn((0,x.useState)(void 0!==v?v:r),2),E=C[0],k=C[1],w=(0,x.useCallback)((function(e,t){"function"==typeof c&&c(e,t),k(e)}),[c]),S=(0,x.useCallback)((function(e,t){var n;"function"==typeof u&&(n=u(e,t)),h(void 0!==n?n:e)}),[u]),O=(0,x.useCallback)((function(){"function"==typeof p&&p(),_(!0)}),[p]),M=(0,x.useCallback)((function(){"function"==typeof d&&d(),_(!1)}),[d]),L=void 0!==s?s:f,P=void 0!==a?a:y,V=void 0!==v?v:E;return mt(mt({},m),{},{inputValue:L,menuIsOpen:P,onChange:w,onInputChange:S,onMenuClose:M,onMenuOpen:O,value:V})}(e);return x.createElement(ui,c({ref:t},n))})),pi=(x.Component,di);function vi(n){var l,o,r;const{variables:s,userRole:c,setControlAtts:u}=n,d=null!==(l=null==c?void 0:c.restrictedRoles)&&void 0!==l?l:[],p=null!==(o=null==c?void 0:c.hideOnRestrictedRoles)&&void 0!==o&&o,v=null!==(r=null==s?void 0:s.user_roles)&&void 0!==r?r:[],m=p?(0,i.__)("Hide the block from","block-visibility"):(0,i.__)("Show the block to","block-visibility"),b=v.filter((e=>d.includes(e.value)));return(0,e.createElement)("div",{className:"visibility-control__container"},(0,e.createElement)("div",{className:"visibility-control restricted-roles"},(0,e.createElement)("div",{className:"visibility-control__help"},(0,i.sprintf)(// Translators: Whether the block is hidden or visible. -(0,i.__)("%s users with at least one of the selected roles.","block-visibility"),m)),(0,e.createElement)(pi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:v,value:b,placeholder:(0,i.__)("Select Role…","block-visibility"),onChange:e=>(e=>{const n=[];0!==e.length&&e.forEach((e=>{n.push(e.value)})),u("userRole",(0,t.assign)({...c},{restrictedRoles:n}))})(e),isMulti:!0})),(0,e.createElement)("div",{className:"visibility-control hide-on-restricted-roles"},(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Hide from selected roles","block-visibility"),checked:p,onChange:()=>u("userRole",(0,t.assign)({...c},{hideOnRestrictedRoles:!p}))})))}var mi=(0,e.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(m.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),bi=window.wp.date;function fi(t){const{value:n,onDateChange:i,setPopoverOpen:l,includeTime:o}=t,r=(0,bi.__experimentalGetSettings)(),s=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,e.createElement)(a.Popover,{className:"block-visibility__date-time-popover",onClose:l.bind(null,!1)},[o&&(0,e.createElement)(a.DateTimePicker,{currentDate:n,onChange:e=>{i(e),l(!1)},is12Hour:s}),!o&&(0,e.createElement)(a.DatePicker,{currentDate:n,onChange:e=>{i(e),l(!1)},is12Hour:s})])}var hi=(0,e.createElement)(m.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(m.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"}));function gi(t){const{value:n,setPopoverOpen:l,onClearDateTime:o,includeTime:r}=t;let s=r?(0,i.__)("Select Date and Time…","block-visibility"):(0,i.__)("Select Date…","block-visibility");const c=(0,bi.__experimentalGetSettings)();if(n){const e=r?`${c.formats.date} ${c.formats.time}`:`${c.formats.date}`;s=(0,bi.format)(e,n)}return(0,e.createElement)("div",{className:v()("date-time__date-time-field",{"has-value":n})},(0,e.createElement)(a.Button,{icon:hi,title:(0,i.__)("Select date/time","block-visibility"),onClick:()=>l((e=>!e)),isLink:!0},(0,e.createElement)("span",null,s)),n&&(0,e.createElement)(a.Button,{icon:mi,className:"clear-date-time",title:(0,i.__)("Clear date/time","block-visibility"),onClick:()=>o("")}))}function yi(t){const{value:n,onChange:i,includeTime:l}=t,[o,r]=(0,e.useState)(!1);return(0,e.createElement)("div",{className:"date-time"},(0,e.createElement)(gi,{value:n,setPopoverOpen:r,onClearDateTime:()=>i(""),includeTime:l}),o&&(0,e.createElement)(fi,{value:n,onDateChange:e=>i(e),setPopoverOpen:r,includeTime:l}))}function _i(t){const{rule:n,fieldType:l,fieldName:o,valueType:r,options:s,placeholder:c,handleRuleChange:u,triggerReset:d,hasGroupedOptions:p}=t;if(!n.field&&"ruleField"!==l)return null;let m="";var b;if("ruleField"===l)m=null!==(b=null==n?void 0:n.field)&&void 0!==b?b:"";else if("subField"===l){var f,h;m=null!=n&&n.subFields?null!==(f=n.subFields[o])&&void 0!==f?f:"":null!==(h=null==n?void 0:n.subField)&&void 0!==h?h:""}else{var g;m=null!==(g=n["operatorField"===l?"operator":"value"])&&void 0!==g?g:""}if("select"===r||"multiSelect"===r){let e="",t=s;if(p){const e=[];s.forEach((t=>{e.push(...t.options)})),t=e}"multiSelect"===r?e=t.filter((e=>m.includes(e.value))):(e=t.filter((e=>e.value===m)),0!==e.length&&(e=e[0])),m=e}const y="field__"+l;if("select"===r||"multiSelect"===r){const t=c||(0,i.__)("Select…","block-visibility");return(0,e.createElement)(pi,{className:v()("block-visibility__react-select",y),classNamePrefix:"react-select",value:m,options:s,placeholder:t,onChange:e=>u(e,r,l,o,d),isMulti:"multiSelect"===r})}return"date"===r||"dateTime"===r?(0,e.createElement)(yi,{className:y,value:m,onChange:e=>u(e,r,l,o,d),includeTime:"dateTime"===r}):"toggle"===r?(0,e.createElement)(a.ToggleControl,{className:y,label:c,checked:m,onChange:()=>u(!m,r,l,o,d)}):(0,e.createElement)(a.TextControl,{className:y,type:r,min:"number"===r?0:"",value:m,placeholder:c,onChange:e=>u(e,"text",l,o,d)})}function Ci(n){var l,o,r,s,c,u,d,p;const{rule:m,ruleIndex:b,ruleSet:f,ruleSetIndex:h,ruleSets:g,hideOnRuleSets:y,rulePlaceholder:_,ruleLabel:C,controlName:E,controlAtts:k,setControlAtts:w,groupedFields:S,allFields:O}=n;let x=O.filter((e=>e.value===m.field));0!==x.length&&(x=x[0]);const M=null!==(l=null===(o=x)||void 0===o?void 0:o.fields)&&void 0!==l?l:[],L=null!==(r=null===(s=x)||void 0===s?void 0:s.help)&&void 0!==r&&r,P=null!==(c=null===(u=x)||void 0===u?void 0:u.hasMultipleSubFields)&&void 0!==c&&c,V=null!==(d=null===(p=x)||void 0===p?void 0:p.hasSimplifiedLayout)&&void 0!==d&&d;let N=C;N||(N=()=>0===b?(0,i.sprintf)(// Translators: Whether the block is hidden or visible. -(0,i.__)("%s the block if","block-visibility"),y?(0,i.__)("Hide","block-visibility"):(0,i.__)("Show","block-visibility")):(0,i.__)("And if","block-visibility"));const T=(0,e.createElement)(a.Button,{label:f.rules.length<=1?(0,i.__)("Clear Rule","block-visibility"):(0,i.__)("Delete Rule","block-visibility"),icon:mi,className:"toolbar__delete",onClick:()=>(()=>{const e=[...g],n=f.rules.filter(((e,t)=>t!==b));e[h]=(0,t.assign)({...f},{rules:[...n]}),w(E,(0,t.assign)({...k},{ruleSets:[...e]}))})()}),F=function(e,n,i){let l,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];"select"===n?l=e.value:"multiSelect"===n?(l=[],0!==e.length&&e.forEach((e=>{l.push(e.value)}))):l=e;const s=[...g],a=[...f.rules];if("ruleField"===i)a[b]={field:l};else if("subField"===i)a[b]=P?(0,t.assign)({...a[b]},{subFields:{...a[b].subFields,[o]:l}}):(0,t.assign)({...a[b]},{subField:l}),r&&delete a[b].value;else{const e="operatorField"===i?"operator":"value";a[b]=(0,t.assign)({...a[b]},{[e]:l})}s[h]=(0,t.assign)({...f},{rules:a}),w(E,(0,t.assign)({...k},{ruleSets:[...s]}))};return(0,e.createElement)("div",{key:b,className:"rule"},(0,e.createElement)("div",{className:"rule__header"},(0,e.createElement)("span",null,N(b)),T),(0,e.createElement)("div",{className:"rule__fields"},(0,e.createElement)("div",{className:v()("fields-container",{"is-simplified":V})},(0,e.createElement)(_i,{rule:m,fieldType:"ruleField",valueType:"select",options:S,placeholder:null!=_?_:(0,i.__)("Select Rule…","block-visibility"),handleRuleChange:F,hasGroupedOptions:!0}),M.map((t=>{var n,i,l,o,r,s,a,c;const u=null!==(n=null==t?void 0:t.displayConditions)&&void 0!==n?n:[];if(0!==u.length){const e=[];if(u.forEach((t=>{let n;if(P&&"subField"===t.dependencyType){var i,l;const e=null!==(i=null==m?void 0:m.subFields)&&void 0!==i?i:[];n=null!==(l=e[t.dependencyName])&&void 0!==l?l:""}else{var o;const e="operatorField"===t.dependencyType?"operator":"subField";n=null!==(o=m[e])&&void 0!==o?o:""}var r;"dynamic"===t.dependencyValues?0!==(null!==(r=null==t?void 0:t.options)&&void 0!==r?r:[]).filter((e=>e.value===n)).length&&e.push(!0):t.dependencyValues.includes(n)&&e.push(!0)})),0===e.length)return null}let d,p;const v=null!==(i=null==t?void 0:t.conditionalOptions)&&void 0!==i?i:[];var b,f;return 0!==v.length?v.forEach((e=>{let t;if(P&&"subField"===e.dependencyType){var n,i;const l=null!==(n=null==m?void 0:m.subFields)&&void 0!==n?n:[];t=null!==(i=l[e.dependencyName])&&void 0!==i?i:""}else{var l;t=null!==(l=m[e.dependencyType])&&void 0!==l?l:""}if("dynamic"===e.dependencyValues){var o,r,s,a;const n=(null!==(o=null==e?void 0:e.options)&&void 0!==o?o:[]).filter((e=>e.value===t));d=null!==(r=null===(s=n[0])||void 0===s?void 0:s.valueOptions)&&void 0!==r?r:[],p=null!==(a=null==e?void 0:e.placeholder)&&void 0!==a?a:""}else if(e.dependencyValues.includes(t)){var c,u;d=null!==(c=null==e?void 0:e.options)&&void 0!==c?c:[],p=null!==(u=null==e?void 0:e.placeholder)&&void 0!==u?u:""}})):(d=null!==(b=null==t?void 0:t.options)&&void 0!==b?b:[],p=null!==(f=null==t?void 0:t.placeholder)&&void 0!==f?f:""),(0,e.createElement)(_i,{key:null!==(l=null==t?void 0:t.type)&&void 0!==l?l:"valueField",rule:m,fieldType:null!==(o=null==t?void 0:t.type)&&void 0!==o?o:"valueField",fieldName:null!==(r=null==t?void 0:t.name)&&void 0!==r?r:"",valueType:null!==(s=null==t?void 0:t.valueType)&&void 0!==s?s:"text",options:d,placeholder:p,handleRuleChange:F,triggerReset:null!==(a=null==t?void 0:t.triggerReset)&&void 0!==a&&a,hasGroupedOptions:null!==(c=null==t?void 0:t.hasGroupedOptions)&&void 0!==c&&c})}))),L&&(0,e.createElement)("div",{className:"visibility-control__help"},x.help)))}function Ei(n){var l,o,r;const{ruleSet:s,ruleSetIndex:u,ruleSets:d,controlName:p,controlAtts:m,setControlAtts:h}=n,g=null!==(l=null==s?void 0:s.title)&&void 0!==l?l:"",y=g||(0,i.__)("Rule Set","block-visibility"),_=null===(o=null==s?void 0:s.enable)||void 0===o||o,C=null!==(r=null==s?void 0:s.rules)&&void 0!==r?r:[];0===C.length&&C.push({field:""});const E=(e,n)=>{const i={...s},l=[...d];i[e]=n,l[u]=i,h(p,(0,t.assign)({...m},{ruleSets:[...l]}))},k=(0,e.createElement)(a.DropdownMenu,{className:"settings-dropdown",label:(0,i.__)("Settings","block-visibility"),icon:b,popoverProps:{className:"block-visibility__control-popover control-settings",focusOnMount:"container"}},(()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h3",null,(0,i.__)("Settings","block-visibility")),(0,e.createElement)(a.TextControl,{value:g,label:(0,i.__)("Rule set title","block-visibility"),placeholder:(0,i.__)("Rule Set","block-visibility"),onChange:e=>E("title",e)}),(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Enable rule set","block-visibility"),checked:_,onChange:()=>E("enable",!_)})))),w=d.length<=1?(0,i.__)("Clear rule set","block-visibility"):(0,i.__)("Remove rule set","block-visibility"),S=(0,e.createElement)(a.DropdownMenu,{className:"options-dropdown",label:(0,i.__)("Options","block-visibility"),icon:f,popoverProps:{focusOnMount:"container"}},(n=>{let{onClose:l}=n;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(a.Slot,{name:"RuleSetOptionsTop"}),(0,e.createElement)(a.MenuGroup,{label:(0,i.__)("Tools","block-visibility")},(0,e.createElement)(a.Slot,{name:"RuleSetMoreSettingsTools"}),(0,e.createElement)(a.MenuItem,{className:"more-settings__tools-duplicate",onClick:()=>{!function(){const e=[...d,s];h(p,(0,t.assign)({...m},{ruleSets:[...e]}))}(),l()}},(0,i.__)("Duplicate","block-visibility"))),(0,e.createElement)(a.Slot,{name:"RuleSetOptionsMiddle"}),(0,e.createElement)(a.MenuGroup,null,(0,e.createElement)(a.MenuItem,{onClick:()=>{!function(){const e=d.filter(((e,t)=>t!==u));h(p,(0,t.assign)({...m},{ruleSets:[...e]}))}(),l()}},w)),(0,e.createElement)(a.Slot,{name:"RuleSetOptionsBottom"}))}));let O=(0,e.createElement)("div",{className:"rule-set__fields"},(0,e.createElement)("div",{className:"rule-set__rules"},C.map(((t,i)=>(0,e.createElement)(Ci,c({key:i,rule:t,ruleIndex:i,ruleSet:s,ruleSetIndex:u,ruleSets:d},n))))),(0,e.createElement)("div",{className:"rule-set__add-rule"},(0,e.createElement)(a.Button,{onClick:()=>function(){const e=[...d],n=[...s.rules,{field:""}];e[u]=(0,t.assign)({...s},{rules:n}),h(p,(0,t.assign)({...m},{ruleSets:[...e]}))}(),isLink:!0},(0,i.__)("Add rule","block-visibility"))));return _||(O=(0,e.createElement)(a.Disabled,null,O)),(0,e.createElement)("div",{key:u,className:v()("rule-sets__rule-set",{disabled:!_})},(0,e.createElement)("div",{className:"rule-set__header section-header"},(0,e.createElement)("span",{className:"section-header__title"},y),(0,e.createElement)("div",{className:"section-header__toolbar"},k,S)),O)}var ki=window.wp.coreData;function wi(e){var t;let n=null!==(t=null==e?void 0:e.user_roles)&&void 0!==t?t:[];n=n.filter((e=>"logged-out"!==e.value));const o=(0,l.useSelect)((e=>{const t=e(ki.store).getUsers({per_page:-1}),n=[];return t&&0!==t.length&&t.forEach((e=>{const t={value:e.id,label:e.name};n.push(t)})),n}),[]),r=[{value:"any",label:(0,i.__)("Is any of the selected","block-visibility")},{value:"none",label:(0,i.__)("Is none of the selected","block-visibility")}],s=[{value:"atLeastOne",label:(0,i.__)("Is at least one of the selected","block-visibility")},{value:"all",label:(0,i.__)("Is all of the selected","block-visibility")},{value:"none",label:(0,i.__)("Is none of the selected","block-visibility")}],a=(0,i.__)("Select Condition…","block-visibility");return[{value:"logged-out",label:(0,i.__)("User is logged-out","block-visibility"),group:"type"},{value:"logged-in",label:(0,i.__)("User is logged-in","block-visibility"),group:"type"},{value:"user-role",label:(0,i.__)("User's role","block-visibility"),group:"type",fields:[{type:"operatorField",valueType:"select",options:s,placeholder:a},{type:"valueField",valueType:"multiSelect",options:n,placeholder:(0,i.__)("Select User Roles…","block-visibility"),isMulti:!0}]},{value:"users",label:(0,i.__)("User","block-visibility"),group:"type",fields:[{type:"operatorField",valueType:"select",options:r,placeholder:a},{type:"valueField",valueType:"multiSelect",options:o,placeholder:(0,i.__)("Select Users…","block-visibility"),isMulti:!0}]}]}function Si(n){var l,o,r,s;const{variables:u,userRole:d,setControlAtts:p}=n,v=null!==(l=null==d?void 0:d.hideOnRuleSets)&&void 0!==l&&l,m=null!==(o=null==d?void 0:d.ruleSets)&&void 0!==o?o:[];0===m.length&&m.push({enable:!0,rules:[{field:""}]});const b=function(e){const t=[{value:"type",label:(0,i.__)("User Rule Type","block-visibility")}],n=wi(e),l=[];return t.forEach((e=>{var t,i;const o=null!==(t=null==e?void 0:e.value)&&void 0!==t?t:"",r=null!==(i=null==e?void 0:e.label)&&void 0!==i?i:"",s=n.filter((e=>e.group===o));l.push({value:o,label:r,options:s})})),l}(),f=wi(u);return null!==(s=(null!==(r=null==u?void 0:u.current_users_roles)&&void 0!==r?r:[]).includes("administrator"))&&void 0!==s&&s?(0,e.createElement)("div",{className:"visibility-control__container"},(0,e.createElement)("div",{className:"visibility-control user-rule-sets"},(0,e.createElement)("div",{className:"visibility-control__help"},(0,i.sprintf)(// Translators: Whether the block is hidden or visible. -(0,i.__)("%s the block if at least one user rule set applies.","block-visibility"),v?(0,i.__)("Hide","block-visibility"):(0,i.__)("Show","block-visibility"))),(0,e.createElement)("div",{className:"rule-sets"},m.map(((t,i)=>(0,e.createElement)(Ei,c({key:i,ruleSet:t,ruleSetIndex:i,ruleSets:m,groupedFields:b,allFields:f,controlName:"userRole",controlAtts:d,hideOnRuleSets:v},n))))),(0,e.createElement)("div",{className:"rule-sets__add-rule-set"},(0,e.createElement)(a.Button,{onClick:()=>(()=>{const e=[...m,{enable:!0,rules:[{field:""}]}];p("userRole",(0,t.assign)({...d},{ruleSets:[...e]}))})(),isSecondary:!0},(0,i.__)("Add rule set","block-visibility"))),(0,e.createElement)("div",{className:"hide-on-rule-sets"},(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Hide when rules apply","block-visibility"),checked:v,onChange:()=>p("userRole",(0,t.assign)({...d},{hideOnRuleSets:!v}))})))):(0,e.createElement)(a.Notice,{status:"warning",isDismissible:!1},(0,i.__)("The User rule sets option can only be configured by website Administrators. Please choose another option.","block-visibility"))}function Oi(n){var o,r,s,c;const{variables:u,userRole:d,setControlAtts:p}=n,v=null!==(o=null==d?void 0:d.restrictedUsers)&&void 0!==o?o:[],m=null!==(r=null==d?void 0:d.hideOnRestrictedUsers)&&void 0!==r&&r,b=(0,l.useSelect)((e=>{const t=e(ki.store).getUsers({per_page:-1}),n=[];return t&&0!==t.length&&t.forEach((e=>{const t={value:e.id,label:e.name};n.push(t)})),n}),[]);if(null===(c=(null!==(s=null==u?void 0:u.current_users_roles)&&void 0!==s?s:[]).includes("administrator"))||void 0===c||!c)return(0,e.createElement)(a.Notice,{status:"warning",isDismissible:!1},(0,i.__)("The Users option can only be configured by website Administrators. Please choose another option.","block-visibility"));const f=m?(0,i.__)("Hide the block from","block-visibility"):(0,i.__)("Show the block to","block-visibility"),h=b.filter((e=>v.includes(e.value)));return(0,e.createElement)("div",{className:"visibility-control__container"},(0,e.createElement)("div",{className:"visibility-control restricted-users"},(0,e.createElement)("div",{className:"visibility-control__help"},(0,i.sprintf)(// Translators: Whether the block is hidden or visible. -(0,i.__)("%s the selected users.","block-visibility"),f)),(0,e.createElement)(pi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:b,value:h,placeholder:(0,i.__)("Select Users…","block-visibility"),onChange:e=>(e=>{const n=[];0!==e.length&&e.forEach((e=>{n.push(e.value)})),p("userRole",(0,t.assign)({...d},{restrictedUsers:n}))})(e),isMulti:!0,isLoading:0===b.length})),(0,e.createElement)("div",{className:"visibility-control hide-on-restricted-users"},(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Hide from selected users","block-visibility"),checked:m,onChange:()=>p("userRole",(0,t.assign)({...d},{hideOnRestrictedUsers:!m}))})))}function xi(e,n,i){let l=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!e||0===e.length)return!1;const o=e.visibility_controls,r=(0,t.has)(o,n);if(!r)return l;const s=(0,t.has)(o[n],i);return s?o[n][i]:l}function Mi(e,n){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||0===e.length)return!1;const l=e.plugin_settings,o=(0,t.has)(l,n);return o?l[n]:i}var Li=(0,e.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(m.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));function Pi(t){const{message:n,subMessage:l,link:o,position:r}=t,s=null!=r?r:"middle left";return(0,e.createElement)("div",{className:"information-popover"},(0,e.createElement)(a.DropdownMenu,{label:(0,i.__)("More Information","block-visibility"),icon:Li,toggleProps:{className:"information-popover__button"},popoverProps:{className:"information-popover__popover",focusOnMount:"container",position:s,noArrow:!1}},(()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",null,n),l&&(0,e.createElement)("p",null,l),o&&(0,e.createElement)(a.ExternalLink,{href:o},(0,i.__)("Learn More","block-visibility"))))))}function Vi(n){var l,o,r,s,u,d,p;const{settings:v,variables:m,enabledControls:b,setControlAtts:f,controlSetAtts:h}=n,g=b.some((e=>"visibility_by_role"===e.settingSlug)),y=null!==(l=null==h?void 0:h.controls.hasOwnProperty("userRole"))&&void 0!==l&&l;if(!g||!y)return null;const _=null!==(o=null==h||null===(r=h.controls)||void 0===r?void 0:r.userRole)&&void 0!==o?o:{},C=null!==(s=null==_?void 0:_.visibilityByRole)&&void 0!==s?s:"public",E=null!==(u=null==m?void 0:m.plugin_variables.settings_url)&&void 0!==u?u:"",k=xi(v,"visibility_by_role","enable_user_roles"),w=xi(v,"visibility_by_role","enable_users"),S=xi(v,"visibility_by_role","enable_user_rule_sets");let O=[{label:(0,i.__)("Public","block-visibility"),value:"public"},{label:(0,i.__)("Logged-out","block-visibility"),value:"logged-out"},{label:(0,i.__)("Logged-in","block-visibility"),value:"logged-in"},{label:(0,i.__)("User roles","block-visibility"),value:"user-role"},{label:(0,i.__)("Users","block-visibility"),value:"users"},{label:(0,i.__)("User rule sets","block-visibility"),value:"user-rule-sets"}];const x=[{label:(0,i.__)("Block is visible to everyone.","block-visibility"),value:"public"},{label:(0,i.__)("Block is only visible to logged-out users.","block-visibility"),value:"logged-out"},{label:(0,i.__)("Block is only visible to logged-in users.","block-visibility"),value:"logged-in"}];k||(O=O.filter((e=>"user-role"!==e.value))),w||(O=O.filter((e=>"users"!==e.value))),S||(O=O.filter((e=>"user-rule-sets"!==e.value)));const M=O.filter((e=>e.value===C)),L=null!==(d=null===(p=x.filter((e=>e.value===C))[0])||void 0===p?void 0:p.label)&&void 0!==d?d:"";return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"visibility-control__group user-role-control"},(0,e.createElement)("h3",{className:"visibility-control__group-heading has-icon"},(0,e.createElement)("span",null,(0,i.__)("User Role","block-visibility")),(0,e.createElement)(Pi,{message:(0,i.__)("The User Role control allows you to conditionally display the block based on the current user's role and/or specific users.","block-visibility-pro"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-user-role-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",position:"bottom center"})),(0,e.createElement)("div",{className:"visibility-control__group-fields"},(0,e.createElement)("div",{className:"visibility-control visibility-by-role"},(0,e.createElement)(pi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:O,value:M,onChange:e=>f("userRole",(0,t.assign)({..._},{visibilityByRole:e.value}))}),L&&(0,e.createElement)("div",{className:"visibility-control__help"},L)),"user-role"===C&&k&&(0,e.createElement)(vi,c({variables:m,userRole:_,setControlAtts:f},n)),"users"===C&&w&&(0,e.createElement)(Oi,c({variables:m,userRole:_,setControlAtts:f},n)),"user-rule-sets"===C&&S&&(0,e.createElement)(Si,c({variables:m,userRole:_,setControlAtts:f},n))),!O.some((e=>e.value===C))&&(0,e.createElement)(a.Notice,{status:"warning",isDismissible:!1},(0,e.createInterpolateElement)((0,i.__)("The User Role option that was previously selected has been disabled. Choose another option or update the Visibility Control settings.","block-visibility"),{a:(0,e.createElement)("a",{href:E+"&tab=visibility-controls",target:"_blank",rel:"noreferrer"})}))),(0,e.createElement)("div",{className:"control-separator"},(0,e.createElement)("span",null,(0,i.__)("AND","block-visibility"))))}function Ni(t){const{label:n,currentDate:i,onDateChange:l,isOpen:o,highlightedDate:r}=t,s=(0,bi.__experimentalGetSettings)(),c=/a(?!\\)/i.test(s.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,e.createElement)(a.Popover,{className:"block-visibility__date-time-popover",onClose:o.bind(null,!1)},(0,e.createElement)("div",{className:"date-time-header"},(0,e.createElement)("span",null,n)),(0,e.createElement)(a.DateTimePicker,{currentDate:i,onChange:e=>l(e),is12Hour:c,events:[{date:r}]}))}function Ti(t){const{label:n,title:l,hasDateTime:o,onOpenPopover:r,onClearDateTime:s}=t;return(0,e.createElement)("div",{className:"schedule__date-time-field"},(0,e.createElement)(a.Button,{icon:hi,title:l,onClick:()=>r((e=>!e)),isLink:!0},(0,e.createElement)("span",null,n)),o&&(0,e.createElement)(a.Button,{icon:mi,className:"clear-date-time",title:(0,i.__)("Clear date/time","block-visibility"),onClick:()=>s()}))}function Fi(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,i.__)("No time selected","block-visibility");const n=(0,bi.__experimentalGetSettings)();let l=t;return e&&(l=(0,bi.format)(`${n.formats.date} ${n.formats.time}`,e)),l}const Ii=(0,a.withFilters)("blockVisibility.addDateTimeScheduleControls")((t=>(0,e.createElement)(e.Fragment,null)));function Ri(n){var l,o,r,s;const{type:u,dateTime:d,schedules:p,scheduleIndex:m,scheduleAtts:h,controlSetAtts:g,setControlAtts:y,hideOnSchedules:_}=n,[C,E]=(0,e.useState)(!1),[k,w]=(0,e.useState)(!1),S="single"===u?u+"-"+m:u+"-"+(null==g?void 0:g.id)+"-"+m,O=null!==(l=null==h?void 0:h.title)&&void 0!==l?l:"",x=null===(o=null==h?void 0:h.enable)||void 0===o||o,M=null!==(r=null==h?void 0:h.start)&&void 0!==r?r:null,L=null!==(s=null==h?void 0:h.end)&&void 0!==s?s:null,P=new Date((new Date).setHours(0,0,0,0)),V=O||(0,i.__)("Schedule","block-visibility"),N=Fi(M,(0,i.__)("Now","block-visibility")),T=Fi(L,(0,i.__)("Never","block-visibility"));let F=!1;M&&L&&(F=M>=L);const I=(e,n)=>{const i={...h},l=[...p];i[e]=n,l[m]=i,y("dateTime",(0,t.assign)({...d},{schedules:[...l]}))},R=(0,e.createElement)(a.DropdownMenu,{className:"settings-dropdown",label:(0,i.__)("Settings","block-visibility"),icon:b,popoverProps:{className:"block-visibility__control-popover control-settings",focusOnMount:"container"}},(()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h3",null,(0,i.__)("Settings","block-visibility")),(0,e.createElement)(a.TextControl,{value:O,label:(0,i.__)("Schedule title","block-visibility"),placeholder:(0,i.__)("Schedule","block-visibility"),onChange:e=>I("title",e)}),(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Enable schedule","block-visibility"),checked:x,onChange:()=>I("enable",!x)}),(0,e.createElement)(a.Slot,{name:"DateTimeScheduleControlsSettings-"+S})))),D=p.length<=1?(0,i.__)("Clear schedule","block-visibility"):(0,i.__)("Delete schedule","block-visibility"),A=(0,e.createElement)(a.DropdownMenu,{className:"options-dropdown",label:(0,i.__)("Options","block-visibility"),icon:f,popoverProps:{focusOnMount:"container"}},(n=>{let{onClose:l}=n;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(a.Slot,{name:"ScheduleOptionsTop"}),(0,e.createElement)(a.MenuGroup,{label:(0,i.__)("Tools","block-visibility")},(0,e.createElement)(a.Slot,{name:"ScheduleOptionsTools"}),(0,e.createElement)(a.MenuItem,{onClick:()=>{!function(){const e=[...p,h];y("dateTime",(0,t.assign)({...d},{schedules:[...e]}))}(),l()}},(0,i.__)("Duplicate","block-visibility"))),(0,e.createElement)(a.Slot,{name:"ScheduleOptionsMiddle"}),(0,e.createElement)(a.MenuGroup,null,(0,e.createElement)(a.MenuItem,{onClick:()=>{!function(){const e=p.filter(((e,t)=>t!==m));y("dateTime",(0,t.assign)({...d},{schedules:[...e]}))}(),l()}},D)),(0,e.createElement)(a.Slot,{name:"ScheduleOptionsBottom"}))}));let H=(0,e.createElement)("div",{className:"schedule__fields"},(0,e.createElement)(a.Slot,{name:"DateTimeScheduleControlsTop-"+S}),(0,e.createElement)("div",{className:"fields__date-time"},(0,e.createElement)("div",{className:"date-time__schedule-start"},(0,e.createElement)("div",{className:"visibility-control__label"},_?(0,i.__)("Stop showing","block-visibility"):(0,i.__)("Start showing","block-visibility")),(0,e.createElement)(Ti,{label:N,title:(0,i.__)("Choose a start date/time","block-visibility"),hasDateTime:M,onOpenPopover:E,onClearDateTime:()=>I("start","")})),C&&(0,e.createElement)(Ni,{label:(0,i.__)("Start Date/Time","block-visibility"),currentDate:((e,t,n)=>{if(e)return e;const i=t?new Date(t):new Date(n);return t&&(i.setHours(0,0,0,0),i.setDate(i.getDate()-1)),i})(M,L,P),onDateChange:e=>I("start",e),isOpen:E,highlightedDate:L}),(0,e.createElement)("div",{className:"date-time__schedule-end"},(0,e.createElement)("div",{className:"visibility-control__label"},_?(0,i.__)("Resume showing","block-visibility"):(0,i.__)("Stop showing","block-visibility")),(0,e.createElement)(Ti,{label:T,title:(0,i.__)("Choose an end date/time","block-visibility"),hasDateTime:L,onOpenPopover:w,onClearDateTime:()=>I("end","")})),k&&(0,e.createElement)(Ni,{label:(0,i.__)("End Date/Time","block-visibility"),currentDate:((e,t,n)=>{if(t)return t;const i=e?new Date(e):new Date(n);return i.setHours(0,0,0,0),i.setDate(i.getDate()+1),i})(M,L,P),onDateChange:e=>I("end",e),isOpen:w,highlightedDate:M}),F&&(0,e.createElement)(a.Notice,{status:"warning",isDismissible:!1},(0,i.__)("The start time is after the stop time. Please fix for date/time settings to function properly.","block-visibility"))),(0,e.createElement)(a.Slot,{name:"DateTimeScheduleControlsBottom-"+S}));return x||(H=(0,e.createElement)(a.Disabled,null,H)),(0,e.createElement)("div",{className:v()("schedules__schedule",{disabled:!x})},(0,e.createElement)("div",{className:"schedule__header section-header"},(0,e.createElement)("span",{className:"section-header__title"},V),(0,e.createElement)("div",{className:"section-header__toolbar"},R,A)),H,(0,e.createElement)(Ii,c({uniqueIndex:S},n)))}function Di(n){var l,o,r,s,u;const{enabledControls:d,controlSetAtts:p,setControlAtts:v}=n,m=d.some((e=>"date_time"===e.settingSlug)),b=null!==(l=null==p?void 0:p.controls.hasOwnProperty("dateTime"))&&void 0!==l&&l;if(!m||!b)return null;const f=null!==(o=null==p||null===(r=p.controls)||void 0===r?void 0:r.dateTime)&&void 0!==o?o:{},h=null!==(s=null==f?void 0:f.hideOnSchedules)&&void 0!==s&&s;let g=null!==(u=null==f?void 0:f.schedules)&&void 0!==u?u:[];if(0===g.length){const e={enable:!0,start:"",end:""};f.schedules=[e],g=f.schedules}return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"visibility-control__group date-time-control"},(0,e.createElement)("h3",{className:"visibility-control__group-heading has-icon"},(0,e.createElement)("span",null,(0,i.__)("Date & Time","block-visibility")),(0,e.createElement)(Pi,{message:(0,i.__)("The Date & Time control allows you to automatically schedule when the block should be visible on your website.","block-visibility-pro"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-date-time-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",position:"bottom center"})),(0,e.createElement)("div",{className:"visibility-control__help"},(0,i.sprintf)(// Translators: Whether the block is hidden or visible. -(0,i.__)("%s the block if at least one schedule applies.","block-visibility"),h?(0,i.__)("Hide","block-visibility"):(0,i.__)("Show","block-visibility"))),(0,e.createElement)("div",{className:"date-time-control__schedules"},g.map(((t,i)=>(0,e.createElement)(Ri,c({key:i,dateTime:f,schedules:g,scheduleIndex:i,scheduleAtts:t,hideOnSchedules:h},n))))),(0,e.createElement)("div",{className:"date-time-control__add-schedule"},(0,e.createElement)(a.Button,{onClick:()=>(()=>{const e=[...g];e.push({enable:!0,start:"",end:""}),v("dateTime",(0,t.assign)({...f},{schedules:[...e]}))})(),isSecondary:!0},(0,i.__)("Add schedule","block-visibility"))),(0,e.createElement)("div",{className:"date-time-control__hide-on-schedules"},(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Hide when schedules apply","block-visibility"),checked:h,onChange:()=>v("dateTime",(0,t.assign)({...f},{hideOnSchedules:!h}))})),(0,e.createElement)(a.Slot,{name:"DateTimeControls"})),(0,e.createElement)("div",{className:"control-separator"},(0,e.createElement)("span",null,(0,i.__)("AND","block-visibility"))))}function Ai(n){var l,o,r,s,c,u,d,p,v,m,b,f;const{name:h,settings:g,enabledControls:y,controlSetAtts:_,setControlAtts:C}=n,E=y.some((e=>"screen_size"===e.settingSlug)),k=null!==(l=null==_?void 0:_.controls.hasOwnProperty("screenSize"))&&void 0!==l&&l;if(!E||!k)return null;const w=null!==(o=null==_||null===(r=_.controls)||void 0===r?void 0:r.screenSize)&&void 0!==o?o:{},S=null!==(s=null==w?void 0:w.hideOnScreenSize)&&void 0!==s?s:{},O=xi(g,"screen_size","enable_advanced_controls",!1),x=null!==(c=null==g||null===(u=g.visibility_controls)||void 0===u||null===(d=u.screen_size)||void 0===d?void 0:d.controls)&&void 0!==c?c:{extraLarge:!0,large:!0,medium:!0,small:!0,extraSmall:!0},M=(e,n)=>C("screenSize",(0,t.assign)({...w},{hideOnScreenSize:(0,t.assign)({...S},{[e]:n})})),L=null!==(p=null==S?void 0:S.extraLarge)&&void 0!==p&&p,P=null!==(v=null==S?void 0:S.large)&&void 0!==v&&v,V=null!==(m=null==S?void 0:S.medium)&&void 0!==m&&m,N=null!==(b=null==S?void 0:S.small)&&void 0!==b&&b,T=null!==(f=null==S?void 0:S.extraSmall)&&void 0!==f&&f;let F=(0,e.createElement)(e.Fragment,null,O&&x.extra_large&&(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Hide on large desktop","block-visibility"),checked:L,onChange:()=>{M("extraLarge",!L)}}),x.large&&(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Hide on desktop","block-visibility"),checked:P,onChange:()=>{M("large",!P)}}),x.medium&&(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Hide on tablet","block-visibility"),checked:V,onChange:()=>{M("medium",!V)}}),x.small&&(0,e.createElement)(a.ToggleControl,{label:[!O&&(0,i.__)("Hide on mobile","block-visibility"),O&&(0,i.__)("Hide on mobile (landscape)","block-visibility")],checked:N,onChange:()=>{M("small",!N)}}),O&&x.extra_small&&(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Hide on mobile (portrait)","block-visibility"),checked:T,onChange:()=>{M("extraSmall",!T)}}));const I="core/shortcode"===h||"core/html"===h;return I&&(F=(0,e.createElement)(a.Disabled,null,F)),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"visibility-control__group screen-size-control"},(0,e.createElement)("h3",{className:"visibility-control__group-heading has-icon"},(0,e.createElement)("span",null,(0,i.__)("Screen Size","block-visibility")),(0,e.createElement)(Pi,{message:(0,i.__)("The Screen Size control allows you to conditionally display the block based on the width of the current screen.","block-visibility-pro"),link:"https://blockvisibilitywp.com/knowledge-base/how-to-use-the-screen-size-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",position:"bottom center"})),F,I&&(0,e.createElement)(a.Notice,{status:"warning",isDismissible:!1},(0,e.createInterpolateElement)((0,i.__)("The Screen Size control is unfortunately not compatible with this block type. For more information, and a workaround, visit the Knowledge Base.","block-visibility"),{a:(0,e.createElement)(a.ExternalLink,{href:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-screen-size-control/?bv_query=learn_more&utm_source=plugin&utm_medium=editor&utm_campaign=plugin_referrals#limitations",target:"_blank",rel:"noreferrer"})}))),(0,e.createElement)("div",{className:"control-separator"},(0,e.createElement)("span",null,(0,i.__)("AND","block-visibility"))))}function Hi(n){var l,o,r,s,c,u;const{enabledControls:d,controlSetAtts:p,setControlAtts:v}=n,m=d.some((e=>"query_string"===e.settingSlug)),b=null!==(l=null==p?void 0:p.controls.hasOwnProperty("queryString"))&&void 0!==l&&l;if(!m||!b)return null;const f=null!==(o=null==p||null===(r=p.controls)||void 0===r?void 0:r.queryString)&&void 0!==o?o:{},h=null!==(s=null==f?void 0:f.queryStringAny)&&void 0!==s?s:"",g=null!==(c=null==f?void 0:f.queryStringAll)&&void 0!==c?c:"",y=null!==(u=null==f?void 0:f.queryStringNot)&&void 0!==u?u:"",_=(e,n)=>v("queryString",(0,t.assign)({...f},{[e]:n}));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"visibility-control__group query-string-control"},(0,e.createElement)("h3",{className:"visibility-control__group-heading has-icon"},(0,e.createElement)("span",null,(0,i.__)("Query String","block-visibility")),(0,e.createElement)(Pi,{message:(0,i.__)("The Query String control allows you to configure block visibility based on URL query strings.","block-visibility-pro"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-query-string-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",position:"bottom center"})),(0,e.createElement)("div",{className:"visibility-control__help"},(0,i.__)("Enter one URL query string per line.","block-visibility")),(0,e.createElement)(a.TextareaControl,{label:(0,i.__)("Required Queries (Any)","block-visibility"),help:(0,i.__)("Only visible when least one of the provided URL query strings is present.","block-visibility"),value:h,onChange:e=>_("queryStringAny",e),rows:"2"}),(0,e.createElement)(a.TextareaControl,{label:(0,i.__)("Required Queries (All)","block-visibility"),help:(0,e.createInterpolateElement)((0,i.__)("Only visible when all of the provided URL query strings are present.","block-visibility"),{strong:(0,e.createElement)("strong",null)}),value:g,onChange:e=>_("queryStringAll",e),rows:"2"}),(0,e.createElement)(a.TextareaControl,{label:(0,i.__)("Required Queries (Not)","block-visibility"),help:(0,i.__)("Hide when at least one of the provided URL query strings is present.","block-visibility"),value:y,onChange:e=>_("queryStringNot",e),rows:"2"})),(0,e.createElement)("div",{className:"control-separator"},(0,e.createElement)("span",null,(0,i.__)("AND","block-visibility"))))}function zi(e){var t,n,l;const o=null!==(t=null==e||null===(n=e.integrations)||void 0===n||null===(l=n.acf)||void 0===l?void 0:l.fields)&&void 0!==t?t:[],r=[],s=[{value:"notEmpty",label:(0,i.__)("Has any value","block-visibility"),disableValue:!0},{value:"empty",label:(0,i.__)("Has no value","block-visibility"),disableValue:!0},{value:"equal",label:(0,i.__)("Value is equal to","block-visibility")},{value:"notEqual",label:(0,i.__)("Value is not equal to","block-visibility")},{value:"contains",label:(0,i.__)("Value contains","block-visibility")},{value:"notContain",label:(0,i.__)("Value does not contain","block-visibility")}];return 0!==o.length&&o.forEach((e=>{var t,n;const l=null!==(t=null==e?void 0:e.key)&&void 0!==t?t:"",o=null!==(n=null==e?void 0:e.fields)&&void 0!==n?n:[];0!==o.length&&o.forEach((e=>{var t,n;const o=null!==(t=null==e?void 0:e.key)&&void 0!==t?t:"",a=null!==(n=null==e?void 0:e.label)&&void 0!==n?n:"";r.push({value:o,label:a,group:l,fields:[{type:"subField",name:"isUserField",valueType:"toggle",placeholder:(0,i.__)("Evaluate as user field","block-visibility")},{type:"operatorField",valueType:"select",options:s,placeholder:(0,i.__)("Select Condition…","block-visibility")},{type:"valueField",valueType:"text",placeholder:(0,i.__)("Enter Value…","block-visibility"),displayConditions:[{dependencyType:"operatorField",dependencyValues:["equal","notEqual","contains","notContain"]}]}]})}))})),r}function Bi(n){var l,o,r,s,u,d,p,v,m,b,f,g;const{variables:y,enabledControls:_,controlSetAtts:E,setControlAtts:k}=n,w=null!==(l=null==y||null===(o=y.integrations)||void 0===o||null===(r=o.acf)||void 0===r?void 0:r.active)&&void 0!==l&&l,S=_.some((e=>"acf"===e.settingSlug)),O=null!==(s=null==E?void 0:E.controls.hasOwnProperty("acf"))&&void 0!==s&&s;if(!S||!O||!w)return null;const x=null!==(u=null==y||null===(d=y.integrations)||void 0===d||null===(p=d.acf)||void 0===p?void 0:p.fields)&&void 0!==u?u:[],M=null!==(v=null==E||null===(m=E.controls)||void 0===m?void 0:m.acf)&&void 0!==v?v:{},L=null!==(b=null==M?void 0:M.hideOnRuleSets)&&void 0!==b&&b;let P=null!==(f=null==M?void 0:M.ruleSets)&&void 0!==f?f:[];if(0===P.length)P.push({enable:!0,rules:[{field:""}]});else if(1===P.length&&(null===(g=P[0])||void 0===g||!g.rules)){const e=P[0];0!==e.length&&e.forEach((e=>{var t;const n=null!==(t=null==e?void 0:e.operator)&&void 0!==t?t:"";e.operator="!=empty"===n?"notEmpty":"==empty"===n?"empty":"=="===n?"equal":"!="===n?"notEqual":"==contains"===n?"contains":"!=contains"===n?"notContain":""})),P=[{enable:!0,rules:e}]}const V=function(e){const t=function(e){var t,n,i;const l=null!==(t=null==e||null===(n=e.integrations)||void 0===n||null===(i=n.acf)||void 0===i?void 0:i.fields)&&void 0!==t?t:[],o=[];return 0!==l.length&&l.forEach((e=>{var t,n;const i=null!==(t=null==e?void 0:e.key)&&void 0!==t?t:"",l=null!==(n=null==e?void 0:e.title)&&void 0!==n?n:"";o.push({value:i,label:l})})),o}(e),n=zi(e),i=[];return t.forEach((e=>{var t,l;const o=null!==(t=null==e?void 0:e.value)&&void 0!==t?t:"",r=null!==(l=null==e?void 0:e.label)&&void 0!==l?l:"",s=n.filter((e=>e.group===o));i.push({value:o,label:r,options:s})})),i}(y),N=zi(y);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"visibility-control__group acf-control"},(0,e.createElement)("h3",{className:"visibility-control__group-heading has-icon"},(0,e.createElement)(h,{icon:C.acf}),(0,e.createElement)("span",null,(0,i.__)("Advanced Custom Fields","block-visibility")),(0,e.createElement)(Pi,{message:(0,i.__)("The Advanced Custom Fields (ACF) control allows you configure block visibility based on a variety of field-related rules, which form rule sets.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-advanced-custom-fields-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",position:"bottom center"})),(0,e.createElement)("div",{className:"visibility-control__help"},(0,i.sprintf)(// Translators: Whether the block is hidden or visible. -(0,i.__)("%s the block if at least one rule set applies. Rules targeting user fields will fail if the current user is not logged in.","block-visibility"),L?(0,i.__)("Hide","block-visibility"):(0,i.__)("Show","block-visibility"))),0===x.length&&(0,e.createElement)(a.Notice,{status:"warning",isDismissible:!1},(0,i.__)("It does not appear that your website contains any published fields yet.","block-visibility")),(0,e.createElement)("div",{className:"rule-sets"},P.map(((t,l)=>(0,e.createElement)(Ei,c({key:l,ruleSet:t,ruleSetIndex:l,ruleSets:P,groupedFields:V,allFields:N,controlName:"acf",controlAtts:M,hideOnRuleSets:L,rulePlaceholder:(0,i.__)("Select Field…","block-visibility")},n))))),(0,e.createElement)("div",{className:"rule-sets__add-rule-set"},(0,e.createElement)(a.Button,{onClick:()=>(()=>{const e=[...P,{enable:!0,rules:[{field:""}]}];k("acf",(0,t.assign)({...M},{ruleSets:[...e]}))})(),isSecondary:!0},(0,i.__)("Add rule set","block-visibility"))),(0,e.createElement)("div",{className:"hide-on-rule-sets"},(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Hide when rules apply","block-visibility"),checked:L,onChange:()=>k("acf",(0,t.assign)({...M},{hideOnRuleSets:!L}))}))),(0,e.createElement)("div",{className:"control-separator"},(0,e.createElement)("span",null,(0,i.__)("AND","block-visibility"))))}function Ui(n){var l,o,r,s,c,u,d,p,v,m,b,f,g,y,_,E;const{variables:k,enabledControls:w,controlSetAtts:S,setControlAtts:O}=n,x=null!==(l=null==k||null===(o=k.integrations)||void 0===o||null===(r=o.wp_fusion)||void 0===r?void 0:r.active)&&void 0!==l&&l,M=w.some((e=>"wp_fusion"===e.settingSlug)),L=null!==(s=null==S?void 0:S.controls.hasOwnProperty("wpFusion"))&&void 0!==s&&s;if(!M||!L||!x)return null;const P=null!==(c=null==S?void 0:S.controls.hasOwnProperty("userRole"))&&void 0!==c&&c,V=null!==(u=null==S||null===(d=S.controls)||void 0===d||null===(p=d.userRole)||void 0===p?void 0:p.visibilityByRole)&&void 0!==u?u:"public",N=null!==(v=null==k||null===(m=k.integrations)||void 0===m||null===(b=m.wp_fusion)||void 0===b?void 0:b.tags)&&void 0!==v?v:[],T=e=>N.filter((t=>e.includes(t.value))),F=null!==(f=null==S||null===(g=S.controls)||void 0===g?void 0:g.wpFusion)&&void 0!==f?f:{},I=T(null!==(y=null==F?void 0:F.tagsAny)&&void 0!==y?y:[]),R=T(null!==(_=null==F?void 0:F.tagsAll)&&void 0!==_?_:[]),D=T(null!==(E=null==F?void 0:F.tagsNot)&&void 0!==E?E:[]),A=(e,n)=>{const i=[];0!==n.length&&n.forEach((e=>{i.push(e.value)})),O("wpFusion",(0,t.assign)({...F},{[e]:i}))};let H=(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"visibility-control wp-fusion__tags-any"},(0,e.createElement)("div",{className:"visibility-control__label"},(0,i.__)("Required Tags (Any)","block-visibility")),(0,e.createElement)(pi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:N,value:I,placeholder:(0,i.__)("Select Tag…","block-visibility"),onChange:e=>A("tagsAny",e),isMulti:!0}),(0,e.createElement)("div",{className:"visibility-control__help"},(0,i.__)("Only visible to logged-in users with at least one of the selected tags.","block-visibility"))),(0,e.createElement)("div",{className:"visibility-control wp-fusion__tags-all"},(0,e.createElement)("div",{className:"visibility-control__label"},(0,i.__)("Required Tags (All)","block-visibility")),(0,e.createElement)(pi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:N,value:R,placeholder:(0,i.__)("Select Tag…","block-visibility"),onChange:e=>A("tagsAll",e),isMulti:!0}),(0,e.createElement)("div",{className:"visibility-control__help"},(0,e.createInterpolateElement)((0,i.__)("Only visible to logged-in users with all of the selected tags.","block-visibility"),{strong:(0,e.createElement)("strong",null)}))));"public"!==V&&"logged-out"!==V||(H=(0,e.createElement)(a.Disabled,null,H));let z=(0,e.createElement)("div",{className:"visibility-control wp-fusion__tags-not"},(0,e.createElement)("div",{className:"visibility-control__label"},(0,i.__)("Required Tags (Not)","block-visibility")),(0,e.createElement)(pi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:N,value:D,placeholder:(0,i.__)("Select Tag…","block-visibility"),onChange:e=>A("tagsNot",e),isMulti:!0}),(0,e.createElement)("div",{className:"visibility-control__help"},(0,i.__)("Hide from logged-in users with at least one of the selected tags.","block-visibility")));return"logged-out"===V&&(z=(0,e.createElement)(a.Disabled,null,z)),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"visibility-control__group wp-fusion-control"},(0,e.createElement)("h3",{className:"visibility-control__group-heading has-icon"},(0,e.createElement)(h,{icon:C.wpFusion}),(0,e.createElement)("span",null,(0,i.__)("WP Fusion","block-visibility")),(0,e.createElement)(Pi,{message:(0,i.__)("The WP Fusion control allows you to configure block visibility based on WP Fusion tags.","block-visibility"),subMessage:(0,i.__)("Note that the available fields depend on the User Role control settings. If the User Role control is disabled, only the Required Tags (Not) field will be available.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-wp-fusion-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",position:"bottom center"})),(0,e.createElement)("div",{className:"visibility-control__group-fields"},H,z),!P&&(0,e.createElement)(a.Notice,{status:"warning",isDismissible:!1},(0,i.__)("The WP Fusion control works best in coordination with the User Role control, which has been disabled. To re-enable, click the eye icon in the Controls Toolbar above.","block-visibility"))),(0,e.createElement)("div",{className:"control-separator"},(0,e.createElement)("span",null,(0,i.__)("AND","block-visibility"))))}function ji(t){return(0,e.createElement)(a.Notice,{status:"warning",isDismissible:!1},(0,e.createInterpolateElement)((0,i.__)("Looks like all Visibility Controls have been disabled. To control block visibility again, re-enable some Visibility Controls.","block-visibility"),{a:(0,e.createElement)("a",{href:t+"&tab=visibility-controls",target:"_blank",rel:"noreferrer"})}))}function $i(){return(0,e.createElement)(a.Notice,{status:"warning",isDismissible:!1},(0,i.__)("All visibility controls have been disabled for this block. Add controls using the three dots icon above.","block-visibility"))}function Gi(t){const n="core/legacy-widget"===t.name?(0,i.__)("Legacy Widget","block-visibility"):(0,i.__)("Current","block-visibility");return(0,e.createElement)(a.Notice,{status:"warning",isDismissible:!1},(0,e.createElement)("p",null,(0,i.sprintf)(// Translators: The current block name. +!function(){var e={184:function(e,t){var n;!function(){"use strict";var i={}.hasOwnProperty;function l(){for(var e=[],t=0;t"hide_block"===e.settingSlug)))return null;const{blockVisibility:c}=o,u=null!==(l=null==c?void 0:c.hideBlock)&&void 0!==l&&l;return(0,e.createElement)("div",{className:"visibility-control__group hide-block-control"},(0,e.createElement)("div",{className:"visibility-control"},(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Hide block","block-visibility"),checked:u,onChange:()=>{r({blockVisibility:(0,t.assign)({...c},{hideBlock:!u})})},help:(0,i.__)("Hide the block from everyone.","block-visibility")})))}var p=n(184),v=n.n(p),m=window.wp.primitives,b=(0,e.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(m.Path,{d:"M14.5 13.8c-1.1 0-2.1.7-2.4 1.8H4V17h8.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20v-1.5h-3.1c-.3-1-1.3-1.7-2.4-1.7zM11.9 7c-.3-1-1.3-1.8-2.4-1.8S7.4 6 7.1 7H4v1.5h3.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20V7h-8.1z"})),f=(0,e.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(m.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),h=function(t){let{icon:n,size:i=24,...l}=t;return(0,e.cloneElement)(n,{width:i,height:i,...l})},g=(0,e.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(m.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"})),y=(0,e.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(m.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));const _={};_.logo=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256"},(0,e.createElement)(a.Path,{d:"M128,0 C198.692448,0 256,57.307552 256,128 C256,198.692448 198.692448,256 128,256 C57.307552,256 0,198.692448 0,128 C0,57.307552 57.307552,0 128,0 Z M128,67 C88.7744776,67 54.0129388,90.9022691 39.4355448,126.649105 L39,127.735956 L39,128.264044 L39.4740036,129.445062 C54.0740078,165.139702 88.8089313,189 128,189 C167.225522,189 201.987061,165.097731 216.564455,129.350895 L217,128.264044 L217,127.735956 L216.525996,126.554938 C201.925992,90.8602984 167.191069,67 128,67 Z M128,88 C150.09139,88 168,105.90861 168,128 C168,150.09139 150.09139,168 128,168 C105.90861,168 88,150.09139 88,128 C88,105.90861 105.90861,88 128,88 Z M136,104 C127.163444,104 120,111.163444 120,120 C120,128.836556 127.163444,136 136,136 C144.836556,136 152,128.836556 152,120 C152,111.163444 144.836556,104 136,104 Z"})),_.error=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M12,2 C6.48,2 2,6.48 2,12 C2,17.52 6.48,22 12,22 C17.52,22 22,17.52 22,12 C22,6.48 17.52,2 12,2 Z M13,17 L11,17 L11,15 L13,15 L13,17 Z M13,13 L11,13 L11,7 L13,7 L13,13 Z","fill-rule":"nonzero"})),_.errorOutline=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M13,17 L11,17 L11,15 L13,15 L13,17 Z M13,13 L11,13 L11,7 L13,7 L13,13 Z","fill-rule":"nonzero"}),(0,e.createElement)(a.Path,{d:"M12,22 C17.5228475,22 22,17.5228475 22,12 C22,6.4771525 17.5228475,2 12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 Z M12,20 C7.581722,20 4,16.418278 4,12 C4,7.581722 7.581722,4 12,4 C16.418278,4 20,7.581722 20,12 C20,16.418278 16.418278,20 12,20 Z","fill-rule":"nonzero"})),_.trash=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M20,5.5 L14.3,5.5 C14.3,4.2 13.3,3.2 12,3.2 C10.7,3.2 9.7,4.2 9.7,5.5 L4,5.5 L4,7.5 L5.5,7.5 L5.5,7.8 L7.2,18.9 C7.3,19.9 8.2,20.6 9.2,20.6 L14.9,20.6 C15.9,20.6 16.7,19.9 16.9,18.9 L18.6,7.8 L18.6,7.5 L20,7.5 L20,5.5 Z M16.8,7.5 L15.1,18.6 C15.1,18.7 15,18.8 14.8,18.8 L9.1,18.8 C9,18.8 8.8,18.7 8.8,18.6 L7.2,7.5 L16.8,7.5 Z"})),_.warning=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M1,21 L23,21 L12,2 L1,21 Z M13,18 L11,18 L11,16 L13,16 L13,18 Z M13,14 L11,14 L11,10 L13,10 L13,14 Z","fill-rule":"nonzero"})),_.image=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})),_.replaceImage=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",width:"20",height:"20"},(0,e.createElement)("rect",{x:"11",y:"3",width:"7",height:"5",rx:"1"}),(0,e.createElement)("rect",{x:"2",y:"12",width:"7",height:"5",rx:"1"}),(0,e.createElement)(a.Path,{d:"M13,12h1a3,3,0,0,1-3,3v2a5,5,0,0,0,5-5h1L15,9Z"}),(0,e.createElement)(a.Path,{d:"M4,8H3l2,3L7,8H6A3,3,0,0,1,9,5V3A5,5,0,0,0,4,8Z"})),_.link=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})),_.help=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M2,12 C2,6.48 6.48,2 12,2 C17.52,2 22,6.48 22,12 C22,17.52 17.52,22 12,22 C6.48,22 2,17.52 2,12 Z M12,20 C16.41,20 20,16.41 20,12 C20,7.59001 16.41,4.00002 12,4.00002 C7.59,4.00002 4,7.59001 4,12 C4,16.41 7.59,20 12,20 Z"}),(0,e.createElement)("polygon",{points:"13 16 13 18 11 18 11 16"}),(0,e.createElement)(a.Path,{d:"M8,10 C8,7.79 9.79,6 12,6 C14.21,6 16,7.79 16,10 C16,11.28291 15.21,11.97331 14.4408,12.6455 C13.711,13.2833 13,13.9046 13,15 L11,15 C11,13.1787 11.94212,12.4566 12.7704,11.82167 C13.4202,11.3236 14,10.87921 14,10 C14,8.9 13.1,8 12,8 C10.9,8 10,8.9 10,10 L8,10 Z"})),_.star=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)("polygon",{points:"12 17.7371778 5.81966011 21.5 7.49246652 14.4659011 2 9.75735421 9.2141911 9.1728642 12 2.5 14.7858089 9.1728642 22 9.75735421 16.5075335 14.4659011 18.1803399 21.5"})),_.school=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3L1 9l11 6 9-4.91V17h2V9L12 3z"})),_.support=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M12,2C6.48,2,2,6.48,2,12c0,5.52,4.48,10,10,10s10-4.48,10-10C22,6.48,17.52,2,12,2z M19.46,9.12l-2.78,1.15 c-0.51-1.36-1.58-2.44-2.95-2.94l1.15-2.78C16.98,5.35,18.65,7.02,19.46,9.12z M12,15c-1.66,0-3-1.34-3-3s1.34-3,3-3s3,1.34,3,3 S13.66,15,12,15z M9.13,4.54l1.17,2.78c-1.38,0.5-2.47,1.59-2.98,2.97L4.54,9.13C5.35,7.02,7.02,5.35,9.13,4.54z M4.54,14.87 l2.78-1.15c0.51,1.38,1.59,2.46,2.97,2.96l-1.17,2.78C7.02,18.65,5.35,16.98,4.54,14.87z M14.88,19.46l-1.15-2.78 c1.37-0.51,2.45-1.59,2.95-2.97l2.78,1.17C18.65,16.98,16.98,18.65,14.88,19.46z"})),_.cloud=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M18.3529412,9.83333333 C20.4705882,10.0666667 22,11.8166667 22,13.9166667 C22,16.1333333 20.1176471,18 17.8823529,18 L6.11764706,18 C3.88235294,18 2,16.1333333 2,13.9166667 C2,11.8166667 3.52941176,10.1833333 5.64705882,9.83333333 C5.52941176,9.71666667 5.52941176,9.48333333 5.52941176,9.25 C5.52941176,7.61666667 6.82352941,6.33333333 8.47058824,6.33333333 C8.82352941,6.33333333 9.29411765,6.45 9.52941176,6.56666667 C10.3529412,5.05 11.8823529,4 13.7647059,4 C16.3529412,4 18.4705882,6.1 18.4705882,8.66666667 C18.4705882,9.13333333 18.3529412,9.48333333 18.3529412,9.83333333 Z"})),_.visibility=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M12,5 C17,5 21.27,8.11 23,12.5 C21.27,16.89 17,20 12,20 C7,20 2.73,16.89 1,12.5 C2.73,8.11 7,5 12,5 Z M12,17.5 C14.76,17.5 17,15.26 17,12.5 C17,9.74 14.76,7.5 12,7.5 C9.24,7.5 7,9.74 7,12.5 C7,15.26 9.24,17.5 12,17.5 Z","fill-rule":"nonzero"}),(0,e.createElement)(a.Path,{d:"M12,9.5 C10.34,9.5 9,10.84 9,12.5 C9,14.16 10.34,15.5 12,15.5 C13.66,15.5 15,14.16 15,12.5 C15,10.84 13.66,9.5 12,9.5 Z","fill-rule":"nonzero"})),_.visibilityHidden=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M19.1145976,17.6145976 C17.1357397,19.111758 14.6721169,20 12,20 C7,20 2.73,16.89 1,12.5 C2.1681438,9.53575071 4.49435577,7.15509483 7.42141271,5.92141271 L9.60854669,8.10854669 C8.05477185,8.95699413 7,10.6060682 7,12.5 C7,15.26 9.24,17.5 12,17.5 C13.8939318,17.5 15.5430059,16.4452281 16.3914533,14.8914533 L19.1145976,17.6145976 L19.1145976,17.6145976 Z","fill-rule":"nonzero"}),(0,e.createElement)(a.Path,{d:"M20.6043865,16.2759593 L16.9972006,12.6687735 C16.9990619,12.6127432 17,12.5564805 17,12.5 C17,9.74 14.76,7.5 12,7.5 C11.9435195,7.5 11.8872568,7.50093805 11.8312265,7.50279942 L9.57740803,5.2489809 C10.3592736,5.08578831 11.1695684,5 12,5 C17,5 21.27,8.11 23,12.5 C22.4438856,13.9111805 21.6253071,15.1900957 20.6043865,16.2759593 L20.6043865,16.2759593 Z","fill-rule":"nonzero"}),(0,e.createElement)(a.Path,{d:"M13.6675474,14.9959745 C13.1910334,15.314476 12.6176688,15.5 12,15.5 C10.34,15.5 9,14.16 9,12.5 C9,11.8823312 9.18552396,11.3089666 9.50402547,10.8324526 L2.66116524,3.98959236 C2.27064094,3.59906807 2.27064094,2.96590309 2.66116524,2.5753788 C3.05168953,2.18485451 3.68485451,2.18485451 4.0753788,2.5753788 L21.0459415,19.5459415 C21.4364658,19.9364658 21.4364658,20.5696308 21.0459415,20.9601551 C20.6554173,21.3506794 20.0222523,21.3506794 19.631728,20.9601551 L13.6675474,14.9959745 L13.6675474,14.9959745 Z","fill-rule":"nonzero"})),_.visibilityAlt=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M12,16 C14.208,16 16,14.208 16,12 C16,9.792 14.208,8 12,8 C9.792,8 8,9.792 8,12 C8,14.208 9.792,16 12,16 Z M12,14.5 C10.6204271,14.5 9.5,13.3795729 9.5,12 C9.5,10.6204271 10.6204271,9.5 12,9.5 C13.3795729,9.5 14.5,10.6204271 14.5,12 C14.5,13.3795729 13.3795729,14.5 12,14.5 Z","fill-rule":"nonzero"}),(0,e.createElement)(a.Path,{d:"M12,16 C14.208,16 16,14.208 16,12 C16,9.792 14.208,8 12,8 C9.792,8 8,9.792 8,12 C8,14.208 9.792,16 12,16 Z M12,14.5 C10.6204271,14.5 9.5,13.3795729 9.5,12 C9.5,10.6204271 10.6204271,9.5 12,9.5 C13.3795729,9.5 14.5,10.6204271 14.5,12 C14.5,13.3795729 13.3795729,14.5 12,14.5 Z","fill-rule":"nonzero"}),(0,e.createElement)(a.Path,{d:"M12,4.5 C17,4.5 21.27,7.61 23,12 C21.27,16.39 17,19.5 12,19.5 C7,19.5 2.73,16.39 1,12 C2.73,7.61 7,4.5 12,4.5 Z M21.3473903,12 C19.6713562,8.45851492 16.065323,6.10714286 12,6.10714286 C7.934677,6.10714286 4.32864381,8.45851492 2.65260973,12 C4.32864381,15.5414851 7.934677,17.8928571 12,17.8928571 C16.065323,17.8928571 19.6713562,15.5414851 21.3473903,12 Z","fill-rule":"nonzero"})),_.visibilityHiddenAlt=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M13.9708958,15.4810143 C13.389064,15.8113365 12.7164305,16 12,16 C9.792,16 8,14.208 8,12 C8,11.3082051 8.17591163,10.6572469 8.48541416,10.089446 L9.62711077,11.2115964 C9.54465452,11.4595008 9.5,11.7245863 9.5,12 C9.5,13.3795729 10.6204271,14.5 12,14.5 C12.2905966,14.5 12.5696948,14.4502864 12.8292449,14.3589089 L13.9708958,15.4810143 L13.9708958,15.4810143 Z","fill-rule":"nonzero"}),(0,e.createElement)(a.Path,{d:"M15.8136867,13.2093721 L14.4986393,11.9168387 C14.4551273,10.5889421 13.3734522,9.52129787 12.040023,9.50031471 L10.7249635,8.20776951 C11.1254753,8.07302998 11.554261,8 12,8 C14.208,8 16,9.792 16,12 C16,12.4214718 15.9347055,12.8277859 15.8136867,13.2093721 L15.8136867,13.2093721 Z","fill-rule":"nonzero"}),(0,e.createElement)(a.Path,{d:"M16.9542237,18.4124655 C15.4477475,19.1104464 13.7695931,19.5 12,19.5 C7,19.5 2.73,16.39 1,12 C1.83549245,9.87987753 3.26340063,8.05829526 5.0798477,6.74138281 L6.22058871,7.86259395 C4.69709513,8.8848633 3.45414836,10.3063369 2.65260973,12 C4.32864381,15.5414851 7.934677,17.8928571 12,17.8928571 C13.3051937,17.8928571 14.5630455,17.6504858 15.7248846,17.2041731 L16.9542237,18.4124655 L16.9542237,18.4124655 Z","fill-rule":"nonzero"}),(0,e.createElement)(a.Path,{d:"M19.489889,16.8185998 L18.3656404,15.7135987 C19.6222382,14.7364947 20.6512781,13.4708955 21.3473903,12 C19.6713562,8.45851492 16.065323,6.10714286 12,6.10714286 C10.9730526,6.10714286 9.97541373,6.25718996 9.03079081,6.53856491 L7.75659725,5.28618597 C9.07339857,4.77839975 10.5040254,4.5 12,4.5 C17,4.5 21.27,7.61 23,12 C22.2539458,13.8931665 21.0355216,15.5482882 19.489889,16.8185998 L19.489889,16.8185998 Z","fill-rule":"nonzero"}),(0,e.createElement)(a.Path,{d:"M2.72426842,4.42613185 L19.2242684,20.6436463 C19.5196795,20.9339998 19.9945355,20.9298999 20.2848891,20.6344888 C20.5752426,20.3390777 20.5711426,19.8642217 20.2757316,19.5738682 L3.77573158,3.35635373 C3.48032051,3.0660002 3.00546447,3.07010014 2.71511094,3.36551121 C2.42475741,3.66092228 2.42885735,4.13577832 2.72426842,4.42613185 Z","fill-rule":"nonzero"})),_.wpFusion=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M5.05263158,0 L24,0 L24,0 L24,18.9473684 C24,21.7378598 21.7378598,24 18.9473684,24 L0,24 L0,24 L0,5.05263158 C0,2.26214021 2.26214021,0 5.05263158,0 Z",fill:"#E55B10"}),(0,e.createElement)(a.Path,{d:"M19.5789474,9.78947368 C19.5789474,10.3126908 19.1547961,10.7368421 18.6315789,10.7368421 L11.0526316,10.7362105 L11.0526316,18.3157895 C11.0526316,18.8390066 10.6284803,19.2631579 10.1052632,19.2631579 L9.47368421,19.2631579 C8.95046709,19.2631579 8.52631579,18.8390066 8.52631579,18.3157895 L8.52631579,9.47368421 C8.52631579,9.13121956 8.70802977,8.83119651 8.98029891,8.66477387 C9.14698598,8.39224029 9.44700903,8.21052632 9.78947368,8.21052632 L18.6315789,8.21052632 C19.1547961,8.21052632 19.5789474,8.63467762 19.5789474,9.15789474 L19.5789474,9.78947368 Z",fill:"#FFFFFF"}),(0,e.createElement)(a.Path,{d:"M5.05263158,14.5263158 C5.05263158,14.0030987 5.47678287,13.5789474 6,13.5789474 L13.5789474,13.5795789 L13.5789474,6 C13.5789474,5.47678287 14.0030987,5.05263158 14.5263158,5.05263158 L15.1578947,5.05263158 C15.6811119,5.05263158 16.1052632,5.47678287 16.1052632,6 L16.1052632,14.8421053 C16.1052632,15.1845699 15.9235492,15.484593 15.65128,15.6510156 C15.484593,15.9235492 15.1845699,16.1052632 14.8421053,16.1052632 L6,16.1052632 C5.47678287,16.1052632 5.05263158,15.6811119 5.05263158,15.1578947 L5.05263158,14.5263158 Z",fill:"#FFFFFF"})),_.acf=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M19.2,0 C21.8509668,0 24,2.1490332 24,4.8 L24,19.2 C24,21.8509668 21.8509668,24 19.2,24 L4.8,24 C2.1490332,24 0,21.8509668 0,19.2 L0,4.8 C0,2.1490332 2.1490332,0 4.8,0 L19.2,0 Z M6.89048872,7.2 L5.10930627,7.2 L1.24499674,16.9860194 L1.24732975,16.9866974 L1.2,17.1 L3.65563145,17.1 L4.2996,15.468 L7.7016,15.4704 L8.34587867,17.1 L10.8,17.1 L10.7526702,16.9866974 L10.7550033,16.9860194 L10.6063073,16.6130016 C11.2549234,16.9251163 11.9820385,17.1 12.75,17.1 C14.249715,17.1 15.5936573,16.433058 16.5014094,15.3795917 L16.5,17.1 L18.9,17.1 L18.9,13.5 L22.65,13.5 L22.65,11.1 L18.9,11.0988 L18.9,9.5988 L22.8,9.6 L22.8,7.2 L16.5,7.2 L16.5014746,8.92048398 C15.5937217,7.86697391 14.2497509,7.2 12.75,7.2 C10.6493455,7.2 8.85431186,8.50851842 8.13552383,10.3549305 L6.89048872,7.2 Z M12.75,9.48 C13.89314,9.48 14.8684898,10.1983951 15.2492094,11.2083452 L15.3135218,11.4010233 L16.5,11.4 L16.5,13.2012 L15.2051151,13.2011741 C14.8224969,14.0936466 13.9674734,14.7355294 12.9545886,14.8122785 L12.75,14.82 C11.2753997,14.82 10.08,13.6246003 10.08,12.15 C10.08,10.6753997 11.2753997,9.48 12.75,9.48 Z M6.0012,11.16 L6.8916,13.4172 L5.1108,13.416 L6.0012,11.16 Z",fill:"#5DE8BF"}));var C=_;const E=(0,a.withFilters)("blockVisibility.addControlSetOptions")((t=>(0,e.createElement)(e.Fragment,null))),k=(0,a.withFilters)("blockVisibility.addControlSetModals")((t=>(0,e.createElement)(e.Fragment,null)));function w(n){var l,o;const[r,s]=(0,e.useState)(!1),{type:u,controls:d,controlSets:p,controlSetAtts:v,defaultControls:m,setControlSetAtts:y}=n;function _(e){let n;n=e.active?(0,t.omit)({...v.controls},[e.attributeSlug]):(0,t.assign)({...v.controls},{[e.attributeSlug]:{}});const i=(0,t.assign)({...v},{controls:{...n}});y(i)}function k(e,t){y({...v,[e]:t})}const w=d.filter((e=>"core"===e.type)),x=d.filter((e=>"integration"===e.type)),M=null!==(l=null==v?void 0:v.title)&&void 0!==l?l:"",L=null===(o=null==v?void 0:v.enable)||void 0===o||o;let P=M;P||(P="single"===u?(0,i.__)("Enabled Controls","block-visibility"):(0,i.__)("Control Set","block-visibility"));const V=(0,e.createElement)(a.DropdownMenu,{className:"settings-dropdown",label:(0,i.__)("Settings","block-visibility"),icon:b,popoverProps:{className:"block-visibility__control-popover control-settings",focusOnMount:"container"}},(()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h3",null,(0,i.__)("Settings","block-visibility")),(0,e.createElement)(a.TextControl,{value:M,label:(0,i.__)("Control set title","block-visibility"),placeholder:P,onChange:e=>k("title",e)}),(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Enable control set","block-visibility"),checked:L,onChange:()=>k("enable",!L)})))),N=(0,e.createElement)(a.DropdownMenu,{className:"controls-dropdown",label:(0,i.__)("Visibility Controls","block-visibility"),icon:C.visibilityAlt,popoverProps:{className:"block-visibility__control-popover control-set",focusOnMount:"container"}},(()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(a.MenuGroup,{label:(0,i.__)("Controls","block-visibility")},w.map(((t,n)=>(0,e.createElement)(O,{key:n,control:t,toggleControls:_})))),0!==x.length&&(0,e.createElement)(a.MenuGroup,{label:(0,i.__)("Integrations","block-visibility")},x.map(((t,n)=>(0,e.createElement)(O,{key:n,control:t,toggleControls:_}))))))),T=(0,e.createElement)(a.DropdownMenu,{className:"options-dropdown",label:(0,i.__)("Options","block-visibility"),icon:f,popoverProps:{focusOnMount:"container"}},(l=>{let{onClose:o}=l;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(a.Slot,{name:"ControlSetOptionsTop"}),(0,e.createElement)(a.MenuGroup,{label:(0,i.__)("Tools","block-visibility")},(0,e.createElement)(a.Slot,{name:"ControlSetOptionsToolsTop"}),"multiple"===u&&(0,e.createElement)(a.MenuItem,{onClick:()=>{!function(){const e=Math.max(...p.map((e=>e.id)),0)+1,t={...v,id:e};y(t)}(),o()}},(0,i.__)("Duplicate","block-visibility")),(0,e.createElement)(a.Slot,{name:"ControlSetOptionsToolsMiddle"}),(0,e.createElement)(a.MenuItem,{onClick:()=>{!function(){const e=(0,t.assign)({...v},{controls:m});y(e)}(),o()}},(0,i.__)("Reset all controls","block-visibility")),(0,e.createElement)(a.Slot,{name:"ControlSetOptionsToolsBottom"}),(0,e.createElement)("a",{href:"https://www.blockvisibilitywp.com/knowledge-base/guide-to-visibility-controls-and-control-sets?bv_query=learn_more&utm_source=plugin&utm_medium=editor&utm_campaign=plugin_referrals",target:"_blank",role:"menuitem",rel:"noopener noreferrer",className:"components-button components-menu-item__button"},(0,e.createElement)("span",{className:"components-menu-item__item"},(0,i.__)("Help","block-visibility"),(0,e.createElement)(a.VisuallyHidden,null,(0,i.__)("(opens in a new tab)","block-visibility"))),(0,e.createElement)(h,{icon:g,size:20}))),(0,e.createElement)(a.Slot,{name:"ControlSetOptionsBottom"}),"multiple"===u&&(0,e.createElement)(a.MenuGroup,null,(0,e.createElement)(a.MenuItem,{onClick:()=>{y(v,!0),o()}},(0,i.__)("Remove control set","block-visibility"))),(0,e.createElement)(E,c({modalOpen:r,setModalOpen:s,toggleControls:_,coreControls:w,integrationControls:x,onClose:o},n)))}));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"control-set__header section-header main"},(0,e.createElement)("span",{className:"section-header__title"},P),(0,e.createElement)("div",{className:"section-header__toolbar"},N,"multiple"===u&&V,T)),r&&(0,e.createElement)(S,c({modalOpen:r,setModalOpen:s,toggleControls:_,coreControls:w,integrationControls:x},n)))}function S(t){return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(a.Slot,{name:"ControlSetModals"}),(0,e.createElement)(k,t))}function O(t){const{control:n,toggleControls:i}=t;return(0,e.createElement)(a.MenuItem,{key:n.attributeSlug,className:v()({disabled:!n.active}),icon:n.active?y:"",onClick:()=>i(n)},n.icon&&(0,e.createElement)(h,{className:"control-branding-icon",icon:n.icon}),n.label)}var x=window.React,M=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?I(G,--j):0,B--,10===$&&(B=1,z--),$}function Y(){return $=j2||J($)>3?"":" "}function le(e,t){for(;--t&&Y()&&!($<48||$>102||$>57&&$<65||$>70&&$<97););return K(e,Q()+(t<6&&32==X()&&32==Y()))}function oe(e){for(;Y();)switch($){case e:return j;case 34:case 39:34!==e&&39!==e&&oe($);break;case 40:41===e&&oe(e);break;case 92:Y()}return j}function re(e,t){for(;Y()&&e+$!==57&&(e+$!==84||47!==X()););return"/*"+K(t,j-1)+"*"+P(47===e?e:Y())}function se(e){for(;!J(X());)Y();return K(e,j)}var ae="-ms-",ce="-moz-",ue="-webkit-",de="comm",pe="rule",ve="decl",me="@keyframes";function be(e,t){for(var n="",i=A(e),l=0;l6)switch(I(e,t+1)){case 109:if(45!==I(e,t+4))break;case 102:return T(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+ce+(108==I(e,t+3)?"$3":"$2-$3"))+e;case 115:return~F(e,"stretch")?he(T(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==I(e,t+1))break;case 6444:switch(I(e,D(e)-3-(~F(e,"!important")&&10))){case 107:return T(e,":",":"+ue)+e;case 101:return T(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ue+(45===I(e,14)?"inline-":"")+"box$3$1"+ue+"$2$3$1"+ae+"$2box$3")+e}break;case 5936:switch(I(e,t+11)){case 114:return ue+e+ae+T(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ue+e+ae+T(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ue+e+ae+T(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ue+e+ae+e+e}return e}function ge(e){var t=A(e);return function(n,i,l,o){for(var r="",s=0;s-1&&!e.return)switch(e.type){case ve:e.return=he(e.value,e.length);break;case me:return be([Z(e,{value:T(e.value,"@","@"+ue)})],i);case pe:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return be([Z(e,{props:[T(t,/:(read-\w+)/,":-moz-$1")]})],i);case"::placeholder":return be([Z(e,{props:[T(t,/:(plac\w+)/,":-webkit-input-$1")]}),Z(e,{props:[T(t,/:(plac\w+)/,":-moz-$1")]}),Z(e,{props:[T(t,/:(plac\w+)/,ae+"input-$1")]})],i)}return""}))}}function Ce(e){return te(Ee("",null,null,null,[""],e=ee(e),0,[0],e))}function Ee(e,t,n,i,l,o,r,s,a){for(var c=0,u=0,d=r,p=0,v=0,m=0,b=1,f=1,h=1,g=0,y="",_=l,C=o,E=i,k=y;f;)switch(m=g,g=Y()){case 40:if(108!=m&&58==k.charCodeAt(d-1)){-1!=F(k+=T(ne(g),"&","&\f"),"&\f")&&(h=-1);break}case 34:case 39:case 91:k+=ne(g);break;case 9:case 10:case 13:case 32:k+=ie(m);break;case 92:k+=le(Q()-1,7);continue;case 47:switch(X()){case 42:case 47:H(we(re(Y(),Q()),t,n),a);break;default:k+="/"}break;case 123*b:s[c++]=D(k)*h;case 125*b:case 59:case 0:switch(g){case 0:case 125:f=0;case 59+u:v>0&&D(k)-d&&H(v>32?Se(k+";",i,n,d-1):Se(T(k," ","")+";",i,n,d-2),a);break;case 59:k+=";";default:if(H(E=ke(k,t,n,c,u,l,s,y,_=[],C=[],d),o),123===g)if(0===u)Ee(k,t,E,E,_,o,d,s,C);else switch(p){case 100:case 109:case 115:Ee(e,E,E,i&&H(ke(e,E,E,0,0,l,s,y,l,_=[],d),C),l,C,d,s,i?_:C);break;default:Ee(k,E,E,E,[""],C,0,s,C)}}c=u=v=0,b=h=1,y=k="",d=r;break;case 58:d=1+D(k),v=m;default:if(b<1)if(123==g)--b;else if(125==g&&0==b++&&125==W())continue;switch(k+=P(g),g*b){case 38:h=u>0?1:(k+="\f",-1);break;case 44:s[c++]=(D(k)-1)*h,h=1;break;case 64:45===X()&&(k+=ne(Y())),p=X(),u=d=D(y=k+=se(Q())),g++;break;case 45:45===m&&2==D(k)&&(b=0)}}return o}function ke(e,t,n,i,l,o,r,s,a,c,u){for(var d=l-1,p=0===l?o:[""],v=A(p),m=0,b=0,f=0;m0?p[h]+" "+g:T(g,/&\f/g,p[h])))&&(a[f++]=y);return q(e,t,n,0===l?pe:s,a,c,u)}function we(e,t,n){return q(e,t,n,de,P($),R(e,2,-2),0)}function Se(e,t,n,i){return q(e,t,n,ve,R(e,0,i),R(e,i+1,-1),i)}var Oe=function(e,t,n){for(var i=0,l=0;i=l,l=X(),38===i&&12===l&&(t[n]=1),!J(l);)Y();return K(e,j)},xe=new WeakMap,Me=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,i=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||xe.get(n))&&!i){xe.set(e,!0);for(var l=[],o=function(e,t){return te(function(e,t){var n=-1,i=44;do{switch(J(i)){case 0:38===i&&12===X()&&(t[n]=1),e[n]+=Oe(j-1,t,n);break;case 2:e[n]+=ne(i);break;case 4:if(44===i){e[++n]=58===X()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=P(i)}}while(i=Y());return e}(ee(e),t))}(t,l),r=n.props,s=0,a=0;s=4;++i,l-=4)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(l){case 3:n^=(255&e.charCodeAt(i+2))<<16;case 2:n^=(255&e.charCodeAt(i+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(i)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},Re={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},De=/[A-Z]|^ms/g,Ae=/_EMO_([^_]+?)_([^]*?)_EMO_/g,He=function(e){return 45===e.charCodeAt(1)},ze=function(e){return null!=e&&"boolean"!=typeof e},Be=function(e){var t=Object.create(null);return function(e){return void 0===t[e]&&(t[e]=He(n=e)?n:n.replace(De,"-$&").toLowerCase()),t[e];var n}}(),Ue=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Ae,(function(e,t,n){return $e={name:t,styles:n,next:$e},t}))}return 1===Re[e]||He(e)||"number"!=typeof t||0===t?t:t+"px"};function je(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return $e={name:n.name,styles:n.styles,next:$e},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)$e={name:i.name,styles:i.styles,next:$e},i=i.next;return n.styles+";"}return function(e,t,n){var i="";if(Array.isArray(n))for(var l=0;l=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}function ut(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n-1}function Ft(e){return Tt(e)?window.pageYOffset:e.scrollTop}function It(e,t){Tt(e)?window.scrollTo(0,t):e.scrollTop=t}function Rt(e,t,n,i){return n*((e=e/i-1)*e*e+1)+t}function Dt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Mt,l=Ft(e),o=t-l,r=10,s=0;function a(){var t=Rt(s+=r,l,o,n);It(e,t),s=m)return{placement:"bottom",maxHeight:t};if(w>=m&&!r)return o&&Dt(a,S,x),{placement:"bottom",maxHeight:t};if(!r&&w>=i||r&&E>=i)return o&&Dt(a,S,x),{placement:"bottom",maxHeight:r?E-y:w-y};if("auto"===l||r){var M=t,L=r?C:k;return L>=i&&(M=Math.min(L-y-s.controlHeight,t)),{placement:"top",maxHeight:M}}if("bottom"===l)return o&&It(a,S),{placement:"bottom",maxHeight:t};break;case"top":if(C>=m)return{placement:"top",maxHeight:t};if(k>=m&&!r)return o&&Dt(a,O,x),{placement:"top",maxHeight:t};if(!r&&k>=i||r&&C>=i){var P=t;return(!r&&k>=i||r&&C>=i)&&(P=r?C-_:k-_),o&&Dt(a,O,x),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(l,'".'))}return c}var qt=function(e){return"auto"===e?"bottom":e},Zt=(0,x.createContext)({getPortalPlacement:null}),Wt=function(e){gt(n,e);var t=Ot(n);function n(){var e;mt(this,n);for(var i=arguments.length,l=new Array(i),o=0;o1?"s":""," ").concat(l.join(","),", selected.");case"select-option":return"option ".concat(i,o?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,i=e.options,l=e.label,o=void 0===l?"":l,r=e.selectValue,s=e.isDisabled,a=e.isSelected,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&r)return"value ".concat(o," focused, ").concat(c(r,n),".");if("menu"===t){var u=s?" disabled":"",d="".concat(a?"selected":"focused").concat(u);return"option ".concat(o," ").concat(d,", ").concat(c(i,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Vn=function(e){var t=e.ariaSelection,n=e.focusedOption,i=e.focusedValue,l=e.focusableOptions,o=e.isFocused,r=e.selectValue,s=e.selectProps,a=e.id,c=s.ariaLiveMessages,u=s.getOptionLabel,d=s.inputValue,p=s.isMulti,v=s.isOptionDisabled,m=s.isSearchable,b=s.menuIsOpen,f=s.options,h=s.screenReaderStatus,g=s.tabSelectsValue,y=s["aria-label"],_=s["aria-live"],C=(0,x.useMemo)((function(){return kt(kt({},Pn),c||{})}),[c]),E=(0,x.useMemo)((function(){var e,n="";if(t&&C.onChange){var i=t.option,l=t.options,o=t.removedValue,s=t.removedValues,a=t.value,c=o||i||(e=a,Array.isArray(e)?null:e),d=c?u(c):"",p=l||s||void 0,m=p?p.map(u):[],b=kt({isDisabled:c&&v(c,r),label:d,labels:m},t);n=C.onChange(b)}return n}),[t,C,v,r,u]),k=(0,x.useMemo)((function(){var e="",t=n||i,l=!!(n&&r&&r.includes(n));if(t&&C.onFocus){var o={focused:t,label:u(t),isDisabled:v(t,r),isSelected:l,options:f,context:t===n?"menu":"value",selectValue:r};e=C.onFocus(o)}return e}),[n,i,u,v,C,f,r]),w=(0,x.useMemo)((function(){var e="";if(b&&f.length&&C.onFilter){var t=h({count:l.length});e=C.onFilter({inputValue:d,resultsMessage:t})}return e}),[l,d,b,C,f,h]),S=(0,x.useMemo)((function(){var e="";if(C.guidance){var t=i?"value":b?"menu":"input";e=C.guidance({"aria-label":y,context:t,isDisabled:n&&v(n,r),isMulti:p,isSearchable:m,tabSelectsValue:g})}return e}),[y,n,i,p,v,m,b,C,r,g]),O="".concat(k," ").concat(w," ").concat(S),M=it(x.Fragment,null,it("span",{id:"aria-selection"},E),it("span",{id:"aria-context"},O)),L="initial-input-focus"===(null==t?void 0:t.action);return it(x.Fragment,null,it(Ln,{id:a},L&&M),it(Ln,{"aria-live":_,"aria-atomic":"false","aria-relevant":"additions text"},o&&!L&&M))},Nn=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Tn=new RegExp("["+Nn.map((function(e){return e.letters})).join("")+"]","g"),Fn={},In=0;In1?t-1:0),i=1;i0,b=d-p-u,f=!1;b>t&&r.current&&(i&&i(e),r.current=!1),m&&s.current&&(o&&o(e),s.current=!1),m&&t>b?(n&&!r.current&&n(e),v.scrollTop=d,f=!0,r.current=!0):!m&&-t>u&&(l&&!s.current&&l(e),v.scrollTop=0,f=!0,s.current=!0),f&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[n,i,l,o]),d=(0,x.useCallback)((function(e){u(e,e.deltaY)}),[u]),p=(0,x.useCallback)((function(e){a.current=e.changedTouches[0].clientY}),[]),v=(0,x.useCallback)((function(e){var t=a.current-e.changedTouches[0].clientY;u(e,t)}),[u]),m=(0,x.useCallback)((function(e){if(e){var t=!!Ut&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",v,t)}}),[v,p,d]),b=(0,x.useCallback)((function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",v,!1))}),[v,p,d]);return(0,x.useEffect)((function(){if(t){var e=c.current;return m(e),function(){b(e)}}}),[t,m,b]),function(e){c.current=e}}({isEnabled:void 0===i||i,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),o=function(e){var t=e.isEnabled,n=e.accountForScrollbars,i=void 0===n||n,l=(0,x.useRef)({}),o=(0,x.useRef)(null),r=(0,x.useCallback)((function(e){if(Xn){var t=document.body,n=t&&t.style;if(i&&$n.forEach((function(e){var t=n&&n[e];l.current[e]=t})),i&&Qn<1){var o=parseInt(l.current.paddingRight,10)||0,r=document.body?document.body.clientWidth:0,s=window.innerWidth-r+o||0;Object.keys(Gn).forEach((function(e){var t=Gn[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&Yn()&&(t.addEventListener("touchmove",qn,Kn),e&&(e.addEventListener("touchstart",Wn,Kn),e.addEventListener("touchmove",Zn,Kn))),Qn+=1}}),[i]),s=(0,x.useCallback)((function(e){if(Xn){var t=document.body,n=t&&t.style;Qn=Math.max(Qn-1,0),i&&Qn<1&&$n.forEach((function(e){var t=l.current[e];n&&(n[e]=t)})),t&&Yn()&&(t.removeEventListener("touchmove",qn,Kn),e&&(e.removeEventListener("touchstart",Wn,Kn),e.removeEventListener("touchmove",Zn,Kn)))}}),[i]);return(0,x.useEffect)((function(){if(t){var e=o.current;return r(e),function(){s(e)}}}),[t,r,s]),function(e){o.current=e}}({isEnabled:n});return it(x.Fragment,null,n&&it("div",{onClick:Jn,css:ei}),t((function(e){l(e),o(e)})))}var ni={clearIndicator:pn,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,i=e.theme,l=i.colors,o=i.borderRadius,r=i.spacing;return{label:"control",alignItems:"center",backgroundColor:t?l.neutral5:l.neutral0,borderColor:t?l.neutral10:n?l.primary:l.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(l.primary):void 0,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:r.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?l.primary:l.neutral30}}},dropdownIndicator:dn,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,i=n.spacing.baseUnit,l=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?l.neutral10:l.neutral20,marginBottom:2*i,marginTop:2*i,width:1}},input:function(e){var t=e.isDisabled,n=e.value,i=e.theme,l=i.spacing,o=i.colors;return kt({margin:l.baseUnit/2,paddingBottom:l.baseUnit/2,paddingTop:l.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80,transform:n?"translateZ(0)":""},yn)},loadingIndicator:function(e){var t=e.isFocused,n=e.size,i=e.theme,l=i.colors,o=i.spacing.baseUnit;return{label:"loadingIndicator",color:t?l.neutral60:l.neutral20,display:"flex",padding:2*o,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:Qt,menu:function(e){var t,n=e.placement,i=e.theme,l=i.borderRadius,o=i.spacing,r=i.colors;return yt(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),yt(t,"backgroundColor",r.neutral0),yt(t,"borderRadius",l),yt(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),yt(t,"marginBottom",o.menuGutter),yt(t,"marginTop",o.menuGutter),yt(t,"position","absolute"),yt(t,"width","100%"),yt(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,i=e.position;return{left:t.left,position:i,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,i=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:i/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,i=t.colors,l=e.cropWithEllipsis;return{borderRadius:n/2,color:i.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:l||void 0===l?"ellipsis":void 0,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,i=t.borderRadius,l=t.colors;return{alignItems:"center",borderRadius:i/2,backgroundColor:e.isFocused?l.dangerLight:void 0,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:l.dangerLight,color:l.danger}}},noOptionsMessage:Xt,option:function(e){var t=e.isDisabled,n=e.isFocused,i=e.isSelected,l=e.theme,o=l.spacing,r=l.colors;return{label:"option",backgroundColor:i?r.primary:n?r.primary25:"transparent",color:t?r.neutral20:i?r.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*o.baseUnit,"px ").concat(3*o.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:t?void 0:i?r.primary:r.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,gridArea:"1 / 1 / 2 / 3",marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2}},singleValue:function(e){var t=e.isDisabled,n=e.theme,i=n.spacing,l=n.colors;return{label:"singleValue",color:t?l.neutral40:l.neutral80,gridArea:"1 / 1 / 2 / 3",marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2,maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},valueContainer:function(e){var t=e.theme.spacing,n=e.isMulti,i=e.hasValue,l=e.selectProps.controlShouldRenderValue;return{alignItems:"center",display:n&&i&&l?"flex":"grid",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},ii={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},li={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:At(),captureMenuScroll:!At(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=kt({ignoreCase:!0,ignoreAccents:!0,stringify:Bn,trim:!0,matchFrom:"any"},undefined),i=n.ignoreCase,l=n.ignoreAccents,o=n.stringify,r=n.trim,s=n.matchFrom,a=r?zn(t):t,c=r?zn(o(e)):o(e);return i&&(a=a.toLowerCase(),c=c.toLowerCase()),l&&(a=Hn(a),c=An(c)),"start"===s?c.substr(0,a.length)===a:c.indexOf(a)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0};function oi(e,t,n,i){return{type:"option",data:t,isDisabled:di(e,t,n),isSelected:pi(e,t,n),label:ci(e,t),value:ui(e,t),index:i}}function ri(e,t){return e.options.map((function(n,i){if("options"in n){var l=n.options.map((function(n,i){return oi(e,n,t,i)})).filter((function(t){return ai(e,t)}));return l.length>0?{type:"group",data:n,options:l,index:i}:void 0}var o=oi(e,n,t,i);return ai(e,o)?o:void 0})).filter(jt)}function si(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,Sn(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function ai(e,t){var n=e.inputValue,i=void 0===n?"":n,l=t.data,o=t.isSelected,r=t.label,s=t.value;return(!mi(e)||!o)&&vi(e,{label:r,value:s,data:l},i)}var ci=function(e,t){return e.getOptionLabel(t)},ui=function(e,t){return e.getOptionValue(t)};function di(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function pi(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var i=ui(e,t);return n.some((function(t){return ui(e,t)===i}))}function vi(e,t,n){return!e.filterOption||e.filterOption(t,n)}var mi=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},bi=1,fi=function(e){gt(n,e);var t=Ot(n);function n(e){var i;return mt(this,n),(i=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.instancePrefix="",i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(e){i.controlRef=e},i.focusedOptionRef=null,i.getFocusedOptionRef=function(e){i.focusedOptionRef=e},i.menuListRef=null,i.getMenuListRef=function(e){i.menuListRef=e},i.inputRef=null,i.getInputRef=function(e){i.inputRef=e},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(e,t){var n=i.props,l=n.onChange,o=n.name;t.name=o,i.ariaOnChange(e,t),l(e,t)},i.setValue=function(e,t,n){var l=i.props,o=l.closeMenuOnSelect,r=l.isMulti,s=l.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:s}),o&&(i.setState({inputIsHiddenAfterUpdate:!r}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(e,{action:t,option:n})},i.selectOption=function(e){var t=i.props,n=t.blurInputOnSelect,l=t.isMulti,o=t.name,r=i.state.selectValue,s=l&&i.isOptionSelected(e,r),a=i.isOptionDisabled(e,r);if(s){var c=i.getOptionValue(e);i.setValue(r.filter((function(e){return i.getOptionValue(e)!==c})),"deselect-option",e)}else{if(a)return void i.ariaOnChange(e,{action:"select-option",option:e,name:o});l?i.setValue([].concat(Sn(r),[e]),"select-option",e):i.setValue(e,"select-option")}n&&i.blurInput()},i.removeValue=function(e){var t=i.props.isMulti,n=i.state.selectValue,l=i.getOptionValue(e),o=n.filter((function(e){return i.getOptionValue(e)!==l})),r=$t(t,o,o[0]||null);i.onChange(r,{action:"remove-value",removedValue:e}),i.focusInput()},i.clearValue=function(){var e=i.state.selectValue;i.onChange($t(i.props.isMulti,[],null),{action:"clear",removedValues:e})},i.popValue=function(){var e=i.props.isMulti,t=i.state.selectValue,n=t[t.length-1],l=t.slice(0,t.length-1),o=$t(e,l,l[0]||null);i.onChange(o,{action:"pop-value",removedValue:n})},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n5||o>5}},i.onTouchEnd=function(e){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(e.target)&&i.menuListRef&&!i.menuListRef.contains(e.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(e){i.userIsDragging||i.onControlMouseDown(e)},i.onClearIndicatorTouchEnd=function(e){i.userIsDragging||i.onClearIndicatorMouseDown(e)},i.onDropdownIndicatorTouchEnd=function(e){i.userIsDragging||i.onDropdownIndicatorMouseDown(e)},i.handleInputChange=function(e){var t=i.props.inputValue,n=e.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(n,{action:"input-change",prevInputValue:t}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(e){i.props.onFocus&&i.props.onFocus(e),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(e){var t=i.props.inputValue;i.menuListRef&&i.menuListRef.contains(document.activeElement)?i.inputRef.focus():(i.props.onBlur&&i.props.onBlur(e),i.onInputChange("",{action:"input-blur",prevInputValue:t}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1}))},i.onOptionHover=function(e){i.blockOptionHover||i.state.focusedOption===e||i.setState({focusedOption:e})},i.shouldHideSelectedOptions=function(){return mi(i.props)},i.onKeyDown=function(e){var t=i.props,n=t.isMulti,l=t.backspaceRemovesValue,o=t.escapeClearsValue,r=t.inputValue,s=t.isClearable,a=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,v=i.state,m=v.focusedOption,b=v.focusedValue,f=v.selectValue;if(!(a||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(i.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||r)return;i.focusValue("previous");break;case"ArrowRight":if(!n||r)return;i.focusValue("next");break;case"Delete":case"Backspace":if(r)return;if(b)i.removeValue(b);else{if(!l)return;n?i.popValue():s&&i.clearValue()}break;case"Tab":if(i.isComposing)return;if(e.shiftKey||!c||!d||!m||p&&i.isOptionSelected(m,f))return;i.selectOption(m);break;case"Enter":if(229===e.keyCode)break;if(c){if(!m)return;if(i.isComposing)return;i.selectOption(m);break}return;case"Escape":c?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:r}),i.onMenuClose()):s&&o&&i.clearValue();break;case" ":if(r)return;if(!c){i.openMenu("first");break}if(!m)return;i.selectOption(m);break;case"ArrowUp":c?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":c?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!c)return;i.focusOption("pageup");break;case"PageDown":if(!c)return;i.focusOption("pagedown");break;case"Home":if(!c)return;i.focusOption("first");break;case"End":if(!c)return;i.focusOption("last");break;default:return}e.preventDefault()}},i.instancePrefix="react-select-"+(i.props.instanceId||++bi),i.state.selectValue=Vt(e.value),i}return ft(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(e){var t,n,i,l,o,r=this.props,s=r.isDisabled,a=r.menuIsOpen,c=this.state.isFocused;(c&&!s&&e.isDisabled||c&&a&&!e.menuIsOpen)&&this.focusInput(),c&&s&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,i=t.getBoundingClientRect(),l=n.getBoundingClientRect(),o=n.offsetHeight/3,l.bottom+o>i.bottom?It(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+o,t.scrollHeight)):l.top-o-1&&(r=s)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:o[r]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,i=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=n.indexOf(i);i||(l=-1);var o=n.length-1,r=-1;if(n.length){switch(e){case"previous":r=0===l?0:-1===l?o:l-1;break;case"next":l>-1&&l0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,i=this.getFocusableOptions();if(i.length){var l=0,o=i.indexOf(n);n||(o=-1),"up"===e?l=o>0?o-1:i.length-1:"down"===e?l=(o+1)%i.length:"pageup"===e?(l=o-t)<0&&(l=0):"pagedown"===e?(l=o+t)>i.length-1&&(l=i.length-1):"last"===e&&(l=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[l],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(ii):kt(kt({},ii),this.props.theme):ii}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,i=this.getValue,l=this.selectOption,o=this.setValue,r=this.props,s=r.isMulti,a=r.isRtl,c=r.options;return{clearValue:e,cx:t,getStyles:n,getValue:i,hasValue:this.hasValue(),isMulti:s,isRtl:a,options:c,selectOption:l,selectProps:r,setValue:o,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return di(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return pi(this.props,e,t)}},{key:"filterOption",value:function(e,t){return vi(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,i=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:i})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,i=e.inputId,l=e.inputValue,o=e.tabIndex,r=e.form,s=e.menuIsOpen,a=this.getComponents().Input,u=this.state,d=u.inputIsHidden,p=u.ariaSelection,v=this.commonProps,m=i||this.getElementId("input"),b=kt(kt(kt({"aria-autocomplete":"list","aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],role:"combobox"},s&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?x.createElement(a,c({},v,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:o,form:r,type:"text",value:l},b)):x.createElement(jn,c({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Mt,onFocus:this.onInputFocus,disabled:t,tabIndex:o,inputMode:"none",form:r,value:""},b))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,i=t.MultiValueContainer,l=t.MultiValueLabel,o=t.MultiValueRemove,r=t.SingleValue,s=t.Placeholder,a=this.commonProps,u=this.props,d=u.controlShouldRenderValue,p=u.isDisabled,v=u.isMulti,m=u.inputValue,b=u.placeholder,f=this.state,h=f.selectValue,g=f.focusedValue,y=f.isFocused;if(!this.hasValue()||!d)return m?null:x.createElement(s,c({},a,{key:"placeholder",isDisabled:p,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),b);if(v)return h.map((function(t,r){var s=t===g,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return x.createElement(n,c({},a,{components:{Container:i,Label:l,Remove:o},isFocused:s,isDisabled:p,key:u,index:r,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(m)return null;var _=h[0];return x.createElement(r,c({},a,{data:_,isDisabled:p}),this.formatOptionLabel(_,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,i=n.isDisabled,l=n.isLoading,o=this.state.isFocused;if(!this.isClearable()||!e||i||!this.hasValue()||l)return null;var r={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return x.createElement(e,c({},t,{innerProps:r,isFocused:o}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,i=n.isDisabled,l=n.isLoading,o=this.state.isFocused;return e&&l?x.createElement(e,c({},t,{innerProps:{"aria-hidden":"true"},isDisabled:i,isFocused:o})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var i=this.commonProps,l=this.props.isDisabled,o=this.state.isFocused;return x.createElement(n,c({},i,{isDisabled:l,isFocused:o}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,i=this.state.isFocused,l={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return x.createElement(e,c({},t,{innerProps:l,isDisabled:n,isFocused:i}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,i=t.GroupHeading,l=t.Menu,o=t.MenuList,r=t.MenuPortal,s=t.LoadingMessage,a=t.NoOptionsMessage,u=t.Option,d=this.commonProps,p=this.state.focusedOption,v=this.props,m=v.captureMenuScroll,b=v.inputValue,f=v.isLoading,h=v.loadingMessage,g=v.minMenuHeight,y=v.maxMenuHeight,_=v.menuIsOpen,C=v.menuPlacement,E=v.menuPosition,k=v.menuPortalTarget,w=v.menuShouldBlockScroll,S=v.menuShouldScrollIntoView,O=v.noOptionsMessage,M=v.onMenuScrollToTop,L=v.onMenuScrollToBottom;if(!_)return null;var P,V=function(t,n){var i=t.type,l=t.data,o=t.isDisabled,r=t.isSelected,s=t.label,a=t.value,v=p===l,m=o?void 0:function(){return e.onOptionHover(l)},b=o?void 0:function(){return e.selectOption(l)},f="".concat(e.getElementId("option"),"-").concat(n),h={id:f,onClick:b,onMouseMove:m,onMouseOver:m,tabIndex:-1};return x.createElement(u,c({},d,{innerProps:h,data:l,isDisabled:o,isSelected:r,key:f,label:s,type:i,value:a,isFocused:v,innerRef:v?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())P=this.getCategorizedOptions().map((function(t){if("group"===t.type){var l=t.data,o=t.options,r=t.index,s="".concat(e.getElementId("group"),"-").concat(r),a="".concat(s,"-heading");return x.createElement(n,c({},d,{key:s,data:l,options:o,Heading:i,headingProps:{id:a,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return V(e,"".concat(r,"-").concat(e.index))})))}if("option"===t.type)return V(t,"".concat(t.index))}));else if(f){var N=h({inputValue:b});if(null===N)return null;P=x.createElement(s,d,N)}else{var T=O({inputValue:b});if(null===T)return null;P=x.createElement(a,d,T)}var F={minMenuHeight:g,maxMenuHeight:y,menuPlacement:C,menuPosition:E,menuShouldScrollIntoView:S},I=x.createElement(Wt,c({},d,F),(function(t){var n=t.ref,i=t.placerProps,r=i.placement,s=i.maxHeight;return x.createElement(l,c({},d,F,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove,id:e.getElementId("listbox")},isLoading:f,placement:r}),x.createElement(ti,{captureEnabled:m,onTopArrive:M,onBottomArrive:L,lockEnabled:w},(function(t){return x.createElement(o,c({},d,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:f,maxHeight:s,focusedOption:p}),P)})))}));return k||"fixed"===E?x.createElement(r,c({},d,{appendTo:k,controlElement:this.controlRef,menuPlacement:C,menuPosition:E}),I):I}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,i=t.isDisabled,l=t.isMulti,o=t.name,r=this.state.selectValue;if(o&&!i){if(l){if(n){var s=r.map((function(t){return e.getOptionValue(t)})).join(n);return x.createElement("input",{name:o,type:"hidden",value:s})}var a=r.length>0?r.map((function(t,n){return x.createElement("input",{key:"i-".concat(n),name:o,type:"hidden",value:e.getOptionValue(t)})})):x.createElement("input",{name:o,type:"hidden"});return x.createElement("div",null,a)}var c=r[0]?this.getOptionValue(r[0]):"";return x.createElement("input",{name:o,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,i=t.focusedOption,l=t.focusedValue,o=t.isFocused,r=t.selectValue,s=this.getFocusableOptions();return x.createElement(Vn,c({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:i,focusedValue:l,isFocused:o,selectValue:r,focusableOptions:s}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,i=e.SelectContainer,l=e.ValueContainer,o=this.props,r=o.className,s=o.id,a=o.isDisabled,u=o.menuIsOpen,d=this.state.isFocused,p=this.commonProps=this.getCommonProps();return x.createElement(i,c({},p,{className:r,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:a,isFocused:d}),this.renderLiveRegion(),x.createElement(t,c({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:a,isFocused:d,menuIsOpen:u}),x.createElement(l,c({},p,{isDisabled:a}),this.renderPlaceholderOrValue(),this.renderInput()),x.createElement(n,c({},p,{isDisabled:a}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,i=t.clearFocusValueOnUpdate,l=t.inputIsHiddenAfterUpdate,o=t.ariaSelection,r=t.isFocused,s=t.prevWasFocused,a=e.options,c=e.value,u=e.menuIsOpen,d=e.inputValue,p=e.isMulti,v=Vt(c),m={};if(n&&(c!==n.value||a!==n.options||u!==n.menuIsOpen||d!==n.inputValue)){var b=u?function(e,t){return si(ri(e,t))}(e,v):[],f=i?function(e,t){var n=e.focusedValue,i=e.selectValue.indexOf(n);if(i>-1){if(t.indexOf(n)>-1)return n;if(i-1?n:t[0]}(t,b);m={selectValue:v,focusedOption:h,focusedValue:f,clearFocusValueOnUpdate:!1}}var g=null!=l&&e!==n?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},y=o,_=r&&s;return r&&!_&&(y={value:$t(p,v,v[0]||null),options:v,action:"initial-input-focus"},_=!s),"initial-input-focus"===(null==o?void 0:o.action)&&(y=null),kt(kt(kt({},m),g),{},{prevProps:e,ariaSelection:y,prevWasFocused:_})}}]),n}(x.Component);fi.defaultProps=li;var hi=(0,x.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,i=e.defaultMenuIsOpen,l=void 0!==i&&i,o=e.defaultValue,r=void 0===o?null:o,s=e.inputValue,a=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,p=e.onMenuOpen,v=e.value,m=ct(e,wn),b=pt((0,x.useState)(void 0!==s?s:n),2),f=b[0],h=b[1],g=pt((0,x.useState)(void 0!==a?a:l),2),y=g[0],_=g[1],C=pt((0,x.useState)(void 0!==v?v:r),2),E=C[0],k=C[1],w=(0,x.useCallback)((function(e,t){"function"==typeof c&&c(e,t),k(e)}),[c]),S=(0,x.useCallback)((function(e,t){var n;"function"==typeof u&&(n=u(e,t)),h(void 0!==n?n:e)}),[u]),O=(0,x.useCallback)((function(){"function"==typeof p&&p(),_(!0)}),[p]),M=(0,x.useCallback)((function(){"function"==typeof d&&d(),_(!1)}),[d]),L=void 0!==s?s:f,P=void 0!==a?a:y,V=void 0!==v?v:E;return kt(kt({},m),{},{inputValue:L,menuIsOpen:P,onChange:w,onInputChange:S,onMenuClose:M,onMenuOpen:O,value:V})}(e);return x.createElement(fi,c({ref:t},n))})),gi=(x.Component,hi);function yi(n){var l,o,r;const{variables:s,userRole:c,setControlAtts:u}=n,d=null!==(l=null==c?void 0:c.restrictedRoles)&&void 0!==l?l:[],p=null!==(o=null==c?void 0:c.hideOnRestrictedRoles)&&void 0!==o&&o,v=null!==(r=null==s?void 0:s.user_roles)&&void 0!==r?r:[],m=p?(0,i.__)("Hide the block from","block-visibility"):(0,i.__)("Show the block to","block-visibility"),b=v.filter((e=>d.includes(e.value)));return(0,e.createElement)("div",{className:"visibility-control__container"},(0,e.createElement)("div",{className:"visibility-control restricted-roles"},(0,e.createElement)("div",{className:"visibility-control__help"},(0,i.sprintf)(// Translators: Whether the block is hidden or visible. +(0,i.__)("%s users with at least one of the selected roles.","block-visibility"),m)),(0,e.createElement)(gi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:v,value:b,placeholder:(0,i.__)("Select Role…","block-visibility"),onChange:e=>(e=>{const n=[];0!==e.length&&e.forEach((e=>{n.push(e.value)})),u("userRole",(0,t.assign)({...c},{restrictedRoles:n}))})(e),isMulti:!0})),(0,e.createElement)("div",{className:"visibility-control hide-on-restricted-roles"},(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Hide from selected roles","block-visibility"),checked:p,onChange:()=>u("userRole",(0,t.assign)({...c},{hideOnRestrictedRoles:!p}))})))}var _i=(0,e.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(m.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),Ci=window.wp.date;function Ei(t){const{value:n,onDateChange:i,setPopoverOpen:l,includeTime:o}=t,r=(0,Ci.__experimentalGetSettings)(),s=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,e.createElement)(a.Popover,{className:"block-visibility__date-time-popover",onClose:l.bind(null,!1)},[o&&(0,e.createElement)(a.DateTimePicker,{currentDate:n,onChange:e=>{i(e),l(!1)},is12Hour:s}),!o&&(0,e.createElement)(a.DatePicker,{currentDate:n,onChange:e=>{i(e),l(!1)},is12Hour:s})])}var ki=(0,e.createElement)(m.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(m.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"}));function wi(t){const{value:n,setPopoverOpen:l,onClearDateTime:o,includeTime:r}=t;let s=r?(0,i.__)("Select Date and Time…","block-visibility"):(0,i.__)("Select Date…","block-visibility");const c=(0,Ci.__experimentalGetSettings)();if(n){const e=r?`${c.formats.date} ${c.formats.time}`:`${c.formats.date}`;s=(0,Ci.format)(e,n)}return(0,e.createElement)("div",{className:v()("date-time__date-time-field",{"has-value":n})},(0,e.createElement)(a.Button,{icon:ki,title:(0,i.__)("Select date/time","block-visibility"),onClick:()=>l((e=>!e)),isLink:!0},(0,e.createElement)("span",null,s)),n&&(0,e.createElement)(a.Button,{icon:_i,className:"clear-date-time",title:(0,i.__)("Clear date/time","block-visibility"),onClick:()=>o("")}))}function Si(t){const{value:n,onChange:i,includeTime:l}=t,[o,r]=(0,e.useState)(!1);return(0,e.createElement)("div",{className:"date-time"},(0,e.createElement)(wi,{value:n,setPopoverOpen:r,onClearDateTime:()=>i(""),includeTime:l}),o&&(0,e.createElement)(Ei,{value:n,onDateChange:e=>i(e),setPopoverOpen:r,includeTime:l}))}function Oi(t){const{rule:n,fieldType:l,fieldName:o,valueType:r,options:s,placeholder:c,handleRuleChange:u,triggerReset:d,hasGroupedOptions:p}=t;if(!n.field&&"ruleField"!==l)return null;let m="";var b;if("ruleField"===l)m=null!==(b=null==n?void 0:n.field)&&void 0!==b?b:"";else if("subField"===l){var f,h;m=null!=n&&n.subFields?null!==(f=n.subFields[o])&&void 0!==f?f:"":null!==(h=null==n?void 0:n.subField)&&void 0!==h?h:""}else{var g;m=null!==(g=n["operatorField"===l?"operator":"value"])&&void 0!==g?g:""}if("select"===r||"multiSelect"===r){let e="",t=s;if(p){const e=[];s.forEach((t=>{e.push(...t.options)})),t=e}"multiSelect"===r?e=t.filter((e=>m.includes(e.value))):(e=t.filter((e=>e.value===m)),0!==e.length&&(e=e[0])),m=e}const y="field__"+l;if("select"===r||"multiSelect"===r){const t=c||(0,i.__)("Select…","block-visibility");return(0,e.createElement)(gi,{className:v()("block-visibility__react-select",y),classNamePrefix:"react-select",value:m,options:s,placeholder:t,onChange:e=>u(e,r,l,o,d),isMulti:"multiSelect"===r})}return"date"===r||"dateTime"===r?(0,e.createElement)(Si,{className:y,value:m,onChange:e=>u(e,r,l,o,d),includeTime:"dateTime"===r}):"toggle"===r?(0,e.createElement)(a.ToggleControl,{className:y,label:c,checked:m,onChange:()=>u(!m,r,l,o,d)}):(0,e.createElement)(a.TextControl,{className:y,type:r,min:"number"===r?0:"",value:m,placeholder:c,onChange:e=>u(e,"text",l,o,d)})}function xi(n){var l,o,r,s,c,u,d,p;const{rule:m,ruleIndex:b,ruleSet:f,ruleSetIndex:h,ruleSets:g,hideOnRuleSets:y,rulePlaceholder:_,ruleLabel:C,controlName:E,controlAtts:k,setControlAtts:w,groupedFields:S,allFields:O}=n;let x=O.filter((e=>e.value===m.field));0!==x.length&&(x=x[0]);const M=null!==(l=null===(o=x)||void 0===o?void 0:o.fields)&&void 0!==l?l:[],L=null!==(r=null===(s=x)||void 0===s?void 0:s.help)&&void 0!==r&&r,P=null!==(c=null===(u=x)||void 0===u?void 0:u.hasMultipleSubFields)&&void 0!==c&&c,V=null!==(d=null===(p=x)||void 0===p?void 0:p.hasSimplifiedLayout)&&void 0!==d&&d;let N=C;N||(N=()=>0===b?(0,i.sprintf)(// Translators: Whether the block is hidden or visible. +(0,i.__)("%s the block if","block-visibility"),y?(0,i.__)("Hide","block-visibility"):(0,i.__)("Show","block-visibility")):(0,i.__)("And if","block-visibility"));const T=(0,e.createElement)(a.Button,{label:f.rules.length<=1?(0,i.__)("Clear Rule","block-visibility"):(0,i.__)("Delete Rule","block-visibility"),icon:_i,className:"toolbar__delete",onClick:()=>(()=>{const e=[...g],n=f.rules.filter(((e,t)=>t!==b));e[h]=(0,t.assign)({...f},{rules:[...n]}),w(E,(0,t.assign)({...k},{ruleSets:[...e]}))})()}),F=function(e,n,i){let l,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];"select"===n?l=e.value:"multiSelect"===n?(l=[],0!==e.length&&e.forEach((e=>{l.push(e.value)}))):l=e;const s=[...g],a=[...f.rules];if("ruleField"===i)a[b]={field:l};else if("subField"===i)a[b]=P?(0,t.assign)({...a[b]},{subFields:{...a[b].subFields,[o]:l}}):(0,t.assign)({...a[b]},{subField:l}),r&&delete a[b].value;else{const e="operatorField"===i?"operator":"value";a[b]=(0,t.assign)({...a[b]},{[e]:l})}s[h]=(0,t.assign)({...f},{rules:a}),w(E,(0,t.assign)({...k},{ruleSets:[...s]}))};return(0,e.createElement)("div",{key:b,className:"rule"},(0,e.createElement)("div",{className:"rule__header"},(0,e.createElement)("span",null,N(b)),T),(0,e.createElement)("div",{className:"rule__fields"},(0,e.createElement)("div",{className:v()("fields-container",{"is-simplified":V})},(0,e.createElement)(Oi,{rule:m,fieldType:"ruleField",valueType:"select",options:S,placeholder:null!=_?_:(0,i.__)("Select Rule…","block-visibility"),handleRuleChange:F,hasGroupedOptions:!0}),M.map((t=>{var n,i,l,o,r,s,a,c;const u=null!==(n=null==t?void 0:t.displayConditions)&&void 0!==n?n:[];if(0!==u.length){const e=[];if(u.forEach((t=>{let n;if(P&&"subField"===t.dependencyType){var i,l;const e=null!==(i=null==m?void 0:m.subFields)&&void 0!==i?i:[];n=null!==(l=e[t.dependencyName])&&void 0!==l?l:""}else{var o;const e="operatorField"===t.dependencyType?"operator":"subField";n=null!==(o=m[e])&&void 0!==o?o:""}var r;"dynamic"===t.dependencyValues?0!==(null!==(r=null==t?void 0:t.options)&&void 0!==r?r:[]).filter((e=>e.value===n)).length&&e.push(!0):t.dependencyValues.includes(n)&&e.push(!0)})),0===e.length)return null}let d,p;const v=null!==(i=null==t?void 0:t.conditionalOptions)&&void 0!==i?i:[];var b,f;return 0!==v.length?v.forEach((e=>{let t;if(P&&"subField"===e.dependencyType){var n,i;const l=null!==(n=null==m?void 0:m.subFields)&&void 0!==n?n:[];t=null!==(i=l[e.dependencyName])&&void 0!==i?i:""}else{var l;t=null!==(l=m[e.dependencyType])&&void 0!==l?l:""}if("dynamic"===e.dependencyValues){var o,r,s,a;const n=(null!==(o=null==e?void 0:e.options)&&void 0!==o?o:[]).filter((e=>e.value===t));d=null!==(r=null===(s=n[0])||void 0===s?void 0:s.valueOptions)&&void 0!==r?r:[],p=null!==(a=null==e?void 0:e.placeholder)&&void 0!==a?a:""}else if(e.dependencyValues.includes(t)){var c,u;d=null!==(c=null==e?void 0:e.options)&&void 0!==c?c:[],p=null!==(u=null==e?void 0:e.placeholder)&&void 0!==u?u:""}})):(d=null!==(b=null==t?void 0:t.options)&&void 0!==b?b:[],p=null!==(f=null==t?void 0:t.placeholder)&&void 0!==f?f:""),(0,e.createElement)(Oi,{key:null!==(l=null==t?void 0:t.type)&&void 0!==l?l:"valueField",rule:m,fieldType:null!==(o=null==t?void 0:t.type)&&void 0!==o?o:"valueField",fieldName:null!==(r=null==t?void 0:t.name)&&void 0!==r?r:"",valueType:null!==(s=null==t?void 0:t.valueType)&&void 0!==s?s:"text",options:d,placeholder:p,handleRuleChange:F,triggerReset:null!==(a=null==t?void 0:t.triggerReset)&&void 0!==a&&a,hasGroupedOptions:null!==(c=null==t?void 0:t.hasGroupedOptions)&&void 0!==c&&c})}))),L&&(0,e.createElement)("div",{className:"visibility-control__help"},x.help)))}function Mi(n){var l,o,r;const{ruleSet:s,ruleSetIndex:u,ruleSets:d,controlName:p,controlAtts:m,setControlAtts:h}=n,g=null!==(l=null==s?void 0:s.title)&&void 0!==l?l:"",y=g||(0,i.__)("Rule Set","block-visibility"),_=null===(o=null==s?void 0:s.enable)||void 0===o||o,C=null!==(r=null==s?void 0:s.rules)&&void 0!==r?r:[];0===C.length&&C.push({field:""});const E=(e,n)=>{const i={...s},l=[...d];i[e]=n,l[u]=i,h(p,(0,t.assign)({...m},{ruleSets:[...l]}))},k=(0,e.createElement)(a.DropdownMenu,{className:"settings-dropdown",label:(0,i.__)("Settings","block-visibility"),icon:b,popoverProps:{className:"block-visibility__control-popover control-settings",focusOnMount:"container"}},(()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h3",null,(0,i.__)("Settings","block-visibility")),(0,e.createElement)(a.TextControl,{value:g,label:(0,i.__)("Rule set title","block-visibility"),placeholder:(0,i.__)("Rule Set","block-visibility"),onChange:e=>E("title",e)}),(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Enable rule set","block-visibility"),checked:_,onChange:()=>E("enable",!_)})))),w=d.length<=1?(0,i.__)("Clear rule set","block-visibility"):(0,i.__)("Remove rule set","block-visibility"),S=(0,e.createElement)(a.DropdownMenu,{className:"options-dropdown",label:(0,i.__)("Options","block-visibility"),icon:f,popoverProps:{focusOnMount:"container"}},(n=>{let{onClose:l}=n;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(a.Slot,{name:"RuleSetOptionsTop"}),(0,e.createElement)(a.MenuGroup,{label:(0,i.__)("Tools","block-visibility")},(0,e.createElement)(a.Slot,{name:"RuleSetMoreSettingsTools"}),(0,e.createElement)(a.MenuItem,{className:"more-settings__tools-duplicate",onClick:()=>{!function(){const e=[...d,s];h(p,(0,t.assign)({...m},{ruleSets:[...e]}))}(),l()}},(0,i.__)("Duplicate","block-visibility"))),(0,e.createElement)(a.Slot,{name:"RuleSetOptionsMiddle"}),(0,e.createElement)(a.MenuGroup,null,(0,e.createElement)(a.MenuItem,{onClick:()=>{!function(){const e=d.filter(((e,t)=>t!==u));h(p,(0,t.assign)({...m},{ruleSets:[...e]}))}(),l()}},w)),(0,e.createElement)(a.Slot,{name:"RuleSetOptionsBottom"}))}));let O=(0,e.createElement)("div",{className:"rule-set__fields"},(0,e.createElement)("div",{className:"rule-set__rules"},C.map(((t,i)=>(0,e.createElement)(xi,c({key:i,rule:t,ruleIndex:i,ruleSet:s,ruleSetIndex:u,ruleSets:d},n))))),(0,e.createElement)("div",{className:"rule-set__add-rule"},(0,e.createElement)(a.Button,{onClick:()=>function(){const e=[...d],n=[...s.rules,{field:""}];e[u]=(0,t.assign)({...s},{rules:n}),h(p,(0,t.assign)({...m},{ruleSets:[...e]}))}(),isLink:!0},(0,i.__)("Add rule","block-visibility"))));return _||(O=(0,e.createElement)(a.Disabled,null,O)),(0,e.createElement)("div",{key:u,className:v()("rule-sets__rule-set",{disabled:!_})},(0,e.createElement)("div",{className:"rule-set__header section-header"},(0,e.createElement)("span",{className:"section-header__title"},y),(0,e.createElement)("div",{className:"section-header__toolbar"},k,S)),O)}var Li=window.wp.coreData;function Pi(e){var t;let n=null!==(t=null==e?void 0:e.user_roles)&&void 0!==t?t:[];n=n.filter((e=>"logged-out"!==e.value));const o=(0,l.useSelect)((e=>{const t=e(Li.store).getUsers({per_page:-1}),n=[];return t&&0!==t.length&&t.forEach((e=>{const t={value:e.id,label:e.name};n.push(t)})),n}),[]),r=[{value:"any",label:(0,i.__)("Is any of the selected","block-visibility")},{value:"none",label:(0,i.__)("Is none of the selected","block-visibility")}],s=[{value:"atLeastOne",label:(0,i.__)("Is at least one of the selected","block-visibility")},{value:"all",label:(0,i.__)("Is all of the selected","block-visibility")},{value:"none",label:(0,i.__)("Is none of the selected","block-visibility")}],a=(0,i.__)("Select Condition…","block-visibility");return[{value:"logged-out",label:(0,i.__)("User is logged-out","block-visibility"),group:"type"},{value:"logged-in",label:(0,i.__)("User is logged-in","block-visibility"),group:"type"},{value:"user-role",label:(0,i.__)("User's role","block-visibility"),group:"type",fields:[{type:"operatorField",valueType:"select",options:s,placeholder:a},{type:"valueField",valueType:"multiSelect",options:n,placeholder:(0,i.__)("Select User Roles…","block-visibility"),isMulti:!0}]},{value:"users",label:(0,i.__)("User","block-visibility"),group:"type",fields:[{type:"operatorField",valueType:"select",options:r,placeholder:a},{type:"valueField",valueType:"multiSelect",options:o,placeholder:(0,i.__)("Select Users…","block-visibility"),isMulti:!0}]}]}function Vi(n){var l,o,r,s;const{variables:u,userRole:d,setControlAtts:p}=n,v=null!==(l=null==d?void 0:d.hideOnRuleSets)&&void 0!==l&&l,m=null!==(o=null==d?void 0:d.ruleSets)&&void 0!==o?o:[];0===m.length&&m.push({enable:!0,rules:[{field:""}]});const b=function(e){const t=[{value:"type",label:(0,i.__)("User Rule Type","block-visibility")}],n=Pi(e),l=[];return t.forEach((e=>{var t,i;const o=null!==(t=null==e?void 0:e.value)&&void 0!==t?t:"",r=null!==(i=null==e?void 0:e.label)&&void 0!==i?i:"",s=n.filter((e=>e.group===o));l.push({value:o,label:r,options:s})})),l}(),f=Pi(u);return null!==(s=(null!==(r=null==u?void 0:u.current_users_roles)&&void 0!==r?r:[]).includes("administrator"))&&void 0!==s&&s?(0,e.createElement)("div",{className:"visibility-control__container"},(0,e.createElement)("div",{className:"visibility-control user-rule-sets"},(0,e.createElement)("div",{className:"visibility-control__help"},(0,i.sprintf)(// Translators: Whether the block is hidden or visible. +(0,i.__)("%s the block if at least one user rule set applies.","block-visibility"),v?(0,i.__)("Hide","block-visibility"):(0,i.__)("Show","block-visibility"))),(0,e.createElement)("div",{className:"rule-sets"},m.map(((t,i)=>(0,e.createElement)(Mi,c({key:i,ruleSet:t,ruleSetIndex:i,ruleSets:m,groupedFields:b,allFields:f,controlName:"userRole",controlAtts:d,hideOnRuleSets:v},n))))),(0,e.createElement)("div",{className:"rule-sets__add-rule-set"},(0,e.createElement)(a.Button,{onClick:()=>(()=>{const e=[...m,{enable:!0,rules:[{field:""}]}];p("userRole",(0,t.assign)({...d},{ruleSets:[...e]}))})(),isSecondary:!0},(0,i.__)("Add rule set","block-visibility"))),(0,e.createElement)("div",{className:"hide-on-rule-sets"},(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Hide when rules apply","block-visibility"),checked:v,onChange:()=>p("userRole",(0,t.assign)({...d},{hideOnRuleSets:!v}))})))):(0,e.createElement)(a.Notice,{status:"warning",isDismissible:!1},(0,i.__)("The User rule sets option can only be configured by website Administrators. Please choose another option.","block-visibility"))}function Ni(n){var o,r,s,c;const{variables:u,userRole:d,setControlAtts:p}=n,v=null!==(o=null==d?void 0:d.restrictedUsers)&&void 0!==o?o:[],m=null!==(r=null==d?void 0:d.hideOnRestrictedUsers)&&void 0!==r&&r,b=(0,l.useSelect)((e=>{const t=e(Li.store).getUsers({per_page:-1}),n=[];return t&&0!==t.length&&t.forEach((e=>{const t={value:e.id,label:e.name};n.push(t)})),n}),[]);if(null===(c=(null!==(s=null==u?void 0:u.current_users_roles)&&void 0!==s?s:[]).includes("administrator"))||void 0===c||!c)return(0,e.createElement)(a.Notice,{status:"warning",isDismissible:!1},(0,i.__)("The Users option can only be configured by website Administrators. Please choose another option.","block-visibility"));const f=m?(0,i.__)("Hide the block from","block-visibility"):(0,i.__)("Show the block to","block-visibility"),h=b.filter((e=>v.includes(e.value)));return(0,e.createElement)("div",{className:"visibility-control__container"},(0,e.createElement)("div",{className:"visibility-control restricted-users"},(0,e.createElement)("div",{className:"visibility-control__help"},(0,i.sprintf)(// Translators: Whether the block is hidden or visible. +(0,i.__)("%s the selected users.","block-visibility"),f)),(0,e.createElement)(gi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:b,value:h,placeholder:(0,i.__)("Select Users…","block-visibility"),onChange:e=>(e=>{const n=[];0!==e.length&&e.forEach((e=>{n.push(e.value)})),p("userRole",(0,t.assign)({...d},{restrictedUsers:n}))})(e),isMulti:!0,isLoading:0===b.length})),(0,e.createElement)("div",{className:"visibility-control hide-on-restricted-users"},(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Hide from selected users","block-visibility"),checked:m,onChange:()=>p("userRole",(0,t.assign)({...d},{hideOnRestrictedUsers:!m}))})))}function Ti(e,n,i){let l=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!e||0===e.length)return!1;const o=e.visibility_controls,r=(0,t.has)(o,n);if(!r)return l;const s=(0,t.has)(o[n],i);return s?o[n][i]:l}function Fi(e,n){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||0===e.length)return!1;const l=e.plugin_settings,o=(0,t.has)(l,n);return o?l[n]:i}var Ii=(0,e.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(m.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));function Ri(t){const{message:n,subMessage:l,link:o,position:r}=t,s=null!=r?r:"middle left";return(0,e.createElement)("div",{className:"information-popover"},(0,e.createElement)(a.DropdownMenu,{label:(0,i.__)("More Information","block-visibility"),icon:Ii,toggleProps:{className:"information-popover__button"},popoverProps:{className:"information-popover__popover",focusOnMount:"container",position:s,noArrow:!1}},(()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",null,n),l&&(0,e.createElement)("p",null,l),o&&(0,e.createElement)(a.ExternalLink,{href:o},(0,i.__)("Learn More","block-visibility"))))))}function Di(n){var l,o,r,s,u,d,p;const{settings:v,variables:m,enabledControls:b,setControlAtts:f,controlSetAtts:h}=n,g=b.some((e=>"visibility_by_role"===e.settingSlug)),y=null!==(l=null==h?void 0:h.controls.hasOwnProperty("userRole"))&&void 0!==l&&l;if(!g||!y)return null;const _=null!==(o=null==h||null===(r=h.controls)||void 0===r?void 0:r.userRole)&&void 0!==o?o:{},C=null!==(s=null==_?void 0:_.visibilityByRole)&&void 0!==s?s:"public",E=null!==(u=null==m?void 0:m.plugin_variables.settings_url)&&void 0!==u?u:"",k=Ti(v,"visibility_by_role","enable_user_roles"),w=Ti(v,"visibility_by_role","enable_users"),S=Ti(v,"visibility_by_role","enable_user_rule_sets");let O=[{label:(0,i.__)("Public","block-visibility"),value:"public"},{label:(0,i.__)("Logged-out","block-visibility"),value:"logged-out"},{label:(0,i.__)("Logged-in","block-visibility"),value:"logged-in"},{label:(0,i.__)("User roles","block-visibility"),value:"user-role"},{label:(0,i.__)("Users","block-visibility"),value:"users"},{label:(0,i.__)("User rule sets","block-visibility"),value:"user-rule-sets"}];const x=[{label:(0,i.__)("Block is visible to everyone.","block-visibility"),value:"public"},{label:(0,i.__)("Block is only visible to logged-out users.","block-visibility"),value:"logged-out"},{label:(0,i.__)("Block is only visible to logged-in users.","block-visibility"),value:"logged-in"}];k||(O=O.filter((e=>"user-role"!==e.value))),w||(O=O.filter((e=>"users"!==e.value))),S||(O=O.filter((e=>"user-rule-sets"!==e.value)));const M=O.filter((e=>e.value===C)),L=null!==(d=null===(p=x.filter((e=>e.value===C))[0])||void 0===p?void 0:p.label)&&void 0!==d?d:"";return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"visibility-control__group user-role-control"},(0,e.createElement)("h3",{className:"visibility-control__group-heading has-icon"},(0,e.createElement)("span",null,(0,i.__)("User Role","block-visibility")),(0,e.createElement)(Ri,{message:(0,i.__)("The User Role control allows you to conditionally display the block based on the current user's role and/or specific users.","block-visibility-pro"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-user-role-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",position:"bottom center"})),(0,e.createElement)("div",{className:"visibility-control__group-fields"},(0,e.createElement)("div",{className:"visibility-control visibility-by-role"},(0,e.createElement)(gi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:O,value:M,onChange:e=>f("userRole",(0,t.assign)({..._},{visibilityByRole:e.value}))}),L&&(0,e.createElement)("div",{className:"visibility-control__help"},L)),"user-role"===C&&k&&(0,e.createElement)(yi,c({variables:m,userRole:_,setControlAtts:f},n)),"users"===C&&w&&(0,e.createElement)(Ni,c({variables:m,userRole:_,setControlAtts:f},n)),"user-rule-sets"===C&&S&&(0,e.createElement)(Vi,c({variables:m,userRole:_,setControlAtts:f},n))),!O.some((e=>e.value===C))&&(0,e.createElement)(a.Notice,{status:"warning",isDismissible:!1},(0,e.createInterpolateElement)((0,i.__)("The User Role option that was previously selected has been disabled. Choose another option or update the Visibility Control settings.","block-visibility"),{a:(0,e.createElement)("a",{href:E+"&tab=visibility-controls",target:"_blank",rel:"noreferrer"})}))),(0,e.createElement)("div",{className:"control-separator"},(0,e.createElement)("span",null,(0,i.__)("AND","block-visibility"))))}function Ai(t){const{label:n,currentDate:i,onDateChange:l,isOpen:o,highlightedDate:r}=t,s=(0,Ci.__experimentalGetSettings)(),c=/a(?!\\)/i.test(s.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,e.createElement)(a.Popover,{className:"block-visibility__date-time-popover",onClose:o.bind(null,!1)},(0,e.createElement)("div",{className:"date-time-header"},(0,e.createElement)("span",null,n)),(0,e.createElement)(a.DateTimePicker,{currentDate:i,onChange:e=>l(e),is12Hour:c,events:[{date:r}]}))}function Hi(t){const{label:n,title:l,hasDateTime:o,onOpenPopover:r,onClearDateTime:s}=t;return(0,e.createElement)("div",{className:"schedule__date-time-field"},(0,e.createElement)(a.Button,{icon:ki,title:l,onClick:()=>r((e=>!e)),isLink:!0},(0,e.createElement)("span",null,n)),o&&(0,e.createElement)(a.Button,{icon:_i,className:"clear-date-time",title:(0,i.__)("Clear date/time","block-visibility"),onClick:()=>s()}))}function zi(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,i.__)("No time selected","block-visibility");const n=(0,Ci.__experimentalGetSettings)();let l=t;return e&&(l=(0,Ci.format)(`${n.formats.date} ${n.formats.time}`,e)),l}const Bi=(0,a.withFilters)("blockVisibility.addDateTimeScheduleControls")((t=>(0,e.createElement)(e.Fragment,null)));function Ui(n){var l,o,r,s;const{type:u,dateTime:d,schedules:p,scheduleIndex:m,scheduleAtts:h,controlSetAtts:g,setControlAtts:y,hideOnSchedules:_}=n,[C,E]=(0,e.useState)(!1),[k,w]=(0,e.useState)(!1),S="single"===u?u+"-"+m:u+"-"+(null==g?void 0:g.id)+"-"+m,O=null!==(l=null==h?void 0:h.title)&&void 0!==l?l:"",x=null===(o=null==h?void 0:h.enable)||void 0===o||o,M=null!==(r=null==h?void 0:h.start)&&void 0!==r?r:null,L=null!==(s=null==h?void 0:h.end)&&void 0!==s?s:null,P=new Date((new Date).setHours(0,0,0,0)),V=O||(0,i.__)("Schedule","block-visibility"),N=zi(M,(0,i.__)("Now","block-visibility")),T=zi(L,(0,i.__)("Never","block-visibility"));let F=!1;M&&L&&(F=M>=L);const I=(e,n)=>{const i={...h},l=[...p];i[e]=n,l[m]=i,y("dateTime",(0,t.assign)({...d},{schedules:[...l]}))},R=(0,e.createElement)(a.DropdownMenu,{className:"settings-dropdown",label:(0,i.__)("Settings","block-visibility"),icon:b,popoverProps:{className:"block-visibility__control-popover control-settings",focusOnMount:"container"}},(()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h3",null,(0,i.__)("Settings","block-visibility")),(0,e.createElement)(a.TextControl,{value:O,label:(0,i.__)("Schedule title","block-visibility"),placeholder:(0,i.__)("Schedule","block-visibility"),onChange:e=>I("title",e)}),(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Enable schedule","block-visibility"),checked:x,onChange:()=>I("enable",!x)}),(0,e.createElement)(a.Slot,{name:"DateTimeScheduleControlsSettings-"+S})))),D=p.length<=1?(0,i.__)("Clear schedule","block-visibility"):(0,i.__)("Delete schedule","block-visibility"),A=(0,e.createElement)(a.DropdownMenu,{className:"options-dropdown",label:(0,i.__)("Options","block-visibility"),icon:f,popoverProps:{focusOnMount:"container"}},(n=>{let{onClose:l}=n;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(a.Slot,{name:"ScheduleOptionsTop"}),(0,e.createElement)(a.MenuGroup,{label:(0,i.__)("Tools","block-visibility")},(0,e.createElement)(a.Slot,{name:"ScheduleOptionsTools"}),(0,e.createElement)(a.MenuItem,{onClick:()=>{!function(){const e=[...p,h];y("dateTime",(0,t.assign)({...d},{schedules:[...e]}))}(),l()}},(0,i.__)("Duplicate","block-visibility"))),(0,e.createElement)(a.Slot,{name:"ScheduleOptionsMiddle"}),(0,e.createElement)(a.MenuGroup,null,(0,e.createElement)(a.MenuItem,{onClick:()=>{!function(){const e=p.filter(((e,t)=>t!==m));y("dateTime",(0,t.assign)({...d},{schedules:[...e]}))}(),l()}},D)),(0,e.createElement)(a.Slot,{name:"ScheduleOptionsBottom"}))}));let H=(0,e.createElement)("div",{className:"schedule__fields"},(0,e.createElement)(a.Slot,{name:"DateTimeScheduleControlsTop-"+S}),(0,e.createElement)("div",{className:"fields__date-time"},(0,e.createElement)("div",{className:"date-time__schedule-start"},(0,e.createElement)("div",{className:"visibility-control__label"},_?(0,i.__)("Stop showing","block-visibility"):(0,i.__)("Start showing","block-visibility")),(0,e.createElement)(Hi,{label:N,title:(0,i.__)("Choose a start date/time","block-visibility"),hasDateTime:M,onOpenPopover:E,onClearDateTime:()=>I("start","")})),C&&(0,e.createElement)(Ai,{label:(0,i.__)("Start Date/Time","block-visibility"),currentDate:((e,t,n)=>{if(e)return e;const i=t?new Date(t):new Date(n);return t&&(i.setHours(0,0,0,0),i.setDate(i.getDate()-1)),i})(M,L,P),onDateChange:e=>I("start",e),isOpen:E,highlightedDate:L}),(0,e.createElement)("div",{className:"date-time__schedule-end"},(0,e.createElement)("div",{className:"visibility-control__label"},_?(0,i.__)("Resume showing","block-visibility"):(0,i.__)("Stop showing","block-visibility")),(0,e.createElement)(Hi,{label:T,title:(0,i.__)("Choose an end date/time","block-visibility"),hasDateTime:L,onOpenPopover:w,onClearDateTime:()=>I("end","")})),k&&(0,e.createElement)(Ai,{label:(0,i.__)("End Date/Time","block-visibility"),currentDate:((e,t,n)=>{if(t)return t;const i=e?new Date(e):new Date(n);return i.setHours(0,0,0,0),i.setDate(i.getDate()+1),i})(M,L,P),onDateChange:e=>I("end",e),isOpen:w,highlightedDate:M}),F&&(0,e.createElement)(a.Notice,{status:"warning",isDismissible:!1},(0,i.__)("The start time is after the stop time. Please fix for date/time settings to function properly.","block-visibility"))),(0,e.createElement)(a.Slot,{name:"DateTimeScheduleControlsBottom-"+S}));return x||(H=(0,e.createElement)(a.Disabled,null,H)),(0,e.createElement)("div",{className:v()("schedules__schedule",{disabled:!x})},(0,e.createElement)("div",{className:"schedule__header section-header"},(0,e.createElement)("span",{className:"section-header__title"},V),(0,e.createElement)("div",{className:"section-header__toolbar"},R,A)),H,(0,e.createElement)(Bi,c({uniqueIndex:S},n)))}function ji(n){var l,o,r,s,u;const{enabledControls:d,controlSetAtts:p,setControlAtts:v}=n,m=d.some((e=>"date_time"===e.settingSlug)),b=null!==(l=null==p?void 0:p.controls.hasOwnProperty("dateTime"))&&void 0!==l&&l;if(!m||!b)return null;const f=null!==(o=null==p||null===(r=p.controls)||void 0===r?void 0:r.dateTime)&&void 0!==o?o:{},h=null!==(s=null==f?void 0:f.hideOnSchedules)&&void 0!==s&&s;let g=null!==(u=null==f?void 0:f.schedules)&&void 0!==u?u:[];if(0===g.length){const e={enable:!0,start:"",end:""};f.schedules=[e],g=f.schedules}return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"visibility-control__group date-time-control"},(0,e.createElement)("h3",{className:"visibility-control__group-heading has-icon"},(0,e.createElement)("span",null,(0,i.__)("Date & Time","block-visibility")),(0,e.createElement)(Ri,{message:(0,i.__)("The Date & Time control allows you to automatically schedule when the block should be visible on your website.","block-visibility-pro"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-date-time-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",position:"bottom center"})),(0,e.createElement)("div",{className:"visibility-control__help"},(0,i.sprintf)(// Translators: Whether the block is hidden or visible. +(0,i.__)("%s the block if at least one schedule applies.","block-visibility"),h?(0,i.__)("Hide","block-visibility"):(0,i.__)("Show","block-visibility"))),(0,e.createElement)("div",{className:"date-time-control__schedules"},g.map(((t,i)=>(0,e.createElement)(Ui,c({key:i,dateTime:f,schedules:g,scheduleIndex:i,scheduleAtts:t,hideOnSchedules:h},n))))),(0,e.createElement)("div",{className:"date-time-control__add-schedule"},(0,e.createElement)(a.Button,{onClick:()=>(()=>{const e=[...g];e.push({enable:!0,start:"",end:""}),v("dateTime",(0,t.assign)({...f},{schedules:[...e]}))})(),isSecondary:!0},(0,i.__)("Add schedule","block-visibility"))),(0,e.createElement)("div",{className:"date-time-control__hide-on-schedules"},(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Hide when schedules apply","block-visibility"),checked:h,onChange:()=>v("dateTime",(0,t.assign)({...f},{hideOnSchedules:!h}))})),(0,e.createElement)(a.Slot,{name:"DateTimeControls"})),(0,e.createElement)("div",{className:"control-separator"},(0,e.createElement)("span",null,(0,i.__)("AND","block-visibility"))))}function $i(n){var l,o,r,s,c,u,d,p,v,m,b,f;const{name:h,settings:g,enabledControls:y,controlSetAtts:_,setControlAtts:C}=n,E=y.some((e=>"screen_size"===e.settingSlug)),k=null!==(l=null==_?void 0:_.controls.hasOwnProperty("screenSize"))&&void 0!==l&&l;if(!E||!k)return null;const w=null!==(o=null==_||null===(r=_.controls)||void 0===r?void 0:r.screenSize)&&void 0!==o?o:{},S=null!==(s=null==w?void 0:w.hideOnScreenSize)&&void 0!==s?s:{},O=Ti(g,"screen_size","enable_advanced_controls",!1),x=null!==(c=null==g||null===(u=g.visibility_controls)||void 0===u||null===(d=u.screen_size)||void 0===d?void 0:d.controls)&&void 0!==c?c:{extraLarge:!0,large:!0,medium:!0,small:!0,extraSmall:!0},M=(e,n)=>C("screenSize",(0,t.assign)({...w},{hideOnScreenSize:(0,t.assign)({...S},{[e]:n})})),L=null!==(p=null==S?void 0:S.extraLarge)&&void 0!==p&&p,P=null!==(v=null==S?void 0:S.large)&&void 0!==v&&v,V=null!==(m=null==S?void 0:S.medium)&&void 0!==m&&m,N=null!==(b=null==S?void 0:S.small)&&void 0!==b&&b,T=null!==(f=null==S?void 0:S.extraSmall)&&void 0!==f&&f;let F=(0,e.createElement)(e.Fragment,null,O&&x.extra_large&&(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Hide on large desktop","block-visibility"),checked:L,onChange:()=>{M("extraLarge",!L)}}),x.large&&(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Hide on desktop","block-visibility"),checked:P,onChange:()=>{M("large",!P)}}),x.medium&&(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Hide on tablet","block-visibility"),checked:V,onChange:()=>{M("medium",!V)}}),x.small&&(0,e.createElement)(a.ToggleControl,{label:[!O&&(0,i.__)("Hide on mobile","block-visibility"),O&&(0,i.__)("Hide on mobile (landscape)","block-visibility")],checked:N,onChange:()=>{M("small",!N)}}),O&&x.extra_small&&(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Hide on mobile (portrait)","block-visibility"),checked:T,onChange:()=>{M("extraSmall",!T)}}));const I="core/shortcode"===h||"core/html"===h;return I&&(F=(0,e.createElement)(a.Disabled,null,F)),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"visibility-control__group screen-size-control"},(0,e.createElement)("h3",{className:"visibility-control__group-heading has-icon"},(0,e.createElement)("span",null,(0,i.__)("Screen Size","block-visibility")),(0,e.createElement)(Ri,{message:(0,i.__)("The Screen Size control allows you to conditionally display the block based on the width of the current screen.","block-visibility-pro"),link:"https://blockvisibilitywp.com/knowledge-base/how-to-use-the-screen-size-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",position:"bottom center"})),F,I&&(0,e.createElement)(a.Notice,{status:"warning",isDismissible:!1},(0,e.createInterpolateElement)((0,i.__)("The Screen Size control is unfortunately not compatible with this block type. For more information, and a workaround, visit the Knowledge Base.","block-visibility"),{a:(0,e.createElement)(a.ExternalLink,{href:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-screen-size-control/?bv_query=learn_more&utm_source=plugin&utm_medium=editor&utm_campaign=plugin_referrals#limitations",target:"_blank",rel:"noreferrer"})}))),(0,e.createElement)("div",{className:"control-separator"},(0,e.createElement)("span",null,(0,i.__)("AND","block-visibility"))))}function Gi(n){var l,o,r,s,c,u;const{enabledControls:d,controlSetAtts:p,setControlAtts:v}=n,m=d.some((e=>"query_string"===e.settingSlug)),b=null!==(l=null==p?void 0:p.controls.hasOwnProperty("queryString"))&&void 0!==l&&l;if(!m||!b)return null;const f=null!==(o=null==p||null===(r=p.controls)||void 0===r?void 0:r.queryString)&&void 0!==o?o:{},h=null!==(s=null==f?void 0:f.queryStringAny)&&void 0!==s?s:"",g=null!==(c=null==f?void 0:f.queryStringAll)&&void 0!==c?c:"",y=null!==(u=null==f?void 0:f.queryStringNot)&&void 0!==u?u:"",_=(e,n)=>v("queryString",(0,t.assign)({...f},{[e]:n}));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"visibility-control__group query-string-control"},(0,e.createElement)("h3",{className:"visibility-control__group-heading has-icon"},(0,e.createElement)("span",null,(0,i.__)("Query String","block-visibility")),(0,e.createElement)(Ri,{message:(0,i.__)("The Query String control allows you to configure block visibility based on URL query strings.","block-visibility-pro"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-query-string-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",position:"bottom center"})),(0,e.createElement)("div",{className:"visibility-control__help"},(0,i.__)("Enter one URL query string per line.","block-visibility")),(0,e.createElement)(a.TextareaControl,{label:(0,i.__)("Required Queries (Any)","block-visibility"),help:(0,i.__)("Only visible when least one of the provided URL query strings is present.","block-visibility"),value:h,onChange:e=>_("queryStringAny",e),rows:"2"}),(0,e.createElement)(a.TextareaControl,{label:(0,i.__)("Required Queries (All)","block-visibility"),help:(0,e.createInterpolateElement)((0,i.__)("Only visible when all of the provided URL query strings are present.","block-visibility"),{strong:(0,e.createElement)("strong",null)}),value:g,onChange:e=>_("queryStringAll",e),rows:"2"}),(0,e.createElement)(a.TextareaControl,{label:(0,i.__)("Required Queries (Not)","block-visibility"),help:(0,i.__)("Hide when at least one of the provided URL query strings is present.","block-visibility"),value:y,onChange:e=>_("queryStringNot",e),rows:"2"})),(0,e.createElement)("div",{className:"control-separator"},(0,e.createElement)("span",null,(0,i.__)("AND","block-visibility"))))}function qi(e){var t,n,l;const o=null!==(t=null==e||null===(n=e.integrations)||void 0===n||null===(l=n.acf)||void 0===l?void 0:l.fields)&&void 0!==t?t:[],r=[],s=[{value:"notEmpty",label:(0,i.__)("Has any value","block-visibility"),disableValue:!0},{value:"empty",label:(0,i.__)("Has no value","block-visibility"),disableValue:!0},{value:"equal",label:(0,i.__)("Value is equal to","block-visibility")},{value:"notEqual",label:(0,i.__)("Value is not equal to","block-visibility")},{value:"contains",label:(0,i.__)("Value contains","block-visibility")},{value:"notContain",label:(0,i.__)("Value does not contain","block-visibility")}];return 0!==o.length&&o.forEach((e=>{var t,n;const l=null!==(t=null==e?void 0:e.key)&&void 0!==t?t:"",o=null!==(n=null==e?void 0:e.fields)&&void 0!==n?n:[];0!==o.length&&o.forEach((e=>{var t,n;const o=null!==(t=null==e?void 0:e.key)&&void 0!==t?t:"",a=null!==(n=null==e?void 0:e.label)&&void 0!==n?n:"";r.push({value:o,label:a,group:l,fields:[{type:"subField",name:"isUserField",valueType:"toggle",placeholder:(0,i.__)("Evaluate as user field","block-visibility")},{type:"operatorField",valueType:"select",options:s,placeholder:(0,i.__)("Select Condition…","block-visibility")},{type:"valueField",valueType:"text",placeholder:(0,i.__)("Enter Value…","block-visibility"),displayConditions:[{dependencyType:"operatorField",dependencyValues:["equal","notEqual","contains","notContain"]}]}]})}))})),r}function Zi(n){var l,o,r,s,u,d,p,v,m,b,f,g;const{variables:y,enabledControls:_,controlSetAtts:E,setControlAtts:k}=n,w=null!==(l=null==y||null===(o=y.integrations)||void 0===o||null===(r=o.acf)||void 0===r?void 0:r.active)&&void 0!==l&&l,S=_.some((e=>"acf"===e.settingSlug)),O=null!==(s=null==E?void 0:E.controls.hasOwnProperty("acf"))&&void 0!==s&&s;if(!S||!O||!w)return null;const x=null!==(u=null==y||null===(d=y.integrations)||void 0===d||null===(p=d.acf)||void 0===p?void 0:p.fields)&&void 0!==u?u:[],M=null!==(v=null==E||null===(m=E.controls)||void 0===m?void 0:m.acf)&&void 0!==v?v:{},L=null!==(b=null==M?void 0:M.hideOnRuleSets)&&void 0!==b&&b;let P=null!==(f=null==M?void 0:M.ruleSets)&&void 0!==f?f:[];if(0===P.length)P.push({enable:!0,rules:[{field:""}]});else if(1===P.length&&(null===(g=P[0])||void 0===g||!g.rules)){const e=P[0];0!==e.length&&e.forEach((e=>{var t;const n=null!==(t=null==e?void 0:e.operator)&&void 0!==t?t:"";e.operator="!=empty"===n?"notEmpty":"==empty"===n?"empty":"=="===n?"equal":"!="===n?"notEqual":"==contains"===n?"contains":"!=contains"===n?"notContain":""})),P=[{enable:!0,rules:e}]}const V=function(e){const t=function(e){var t,n,i;const l=null!==(t=null==e||null===(n=e.integrations)||void 0===n||null===(i=n.acf)||void 0===i?void 0:i.fields)&&void 0!==t?t:[],o=[];return 0!==l.length&&l.forEach((e=>{var t,n;const i=null!==(t=null==e?void 0:e.key)&&void 0!==t?t:"",l=null!==(n=null==e?void 0:e.title)&&void 0!==n?n:"";o.push({value:i,label:l})})),o}(e),n=qi(e),i=[];return t.forEach((e=>{var t,l;const o=null!==(t=null==e?void 0:e.value)&&void 0!==t?t:"",r=null!==(l=null==e?void 0:e.label)&&void 0!==l?l:"",s=n.filter((e=>e.group===o));i.push({value:o,label:r,options:s})})),i}(y),N=qi(y);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"visibility-control__group acf-control"},(0,e.createElement)("h3",{className:"visibility-control__group-heading has-icon"},(0,e.createElement)(h,{icon:C.acf}),(0,e.createElement)("span",null,(0,i.__)("Advanced Custom Fields","block-visibility")),(0,e.createElement)(Ri,{message:(0,i.__)("The Advanced Custom Fields (ACF) control allows you configure block visibility based on a variety of field-related rules, which form rule sets.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-advanced-custom-fields-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",position:"bottom center"})),(0,e.createElement)("div",{className:"visibility-control__help"},(0,i.sprintf)(// Translators: Whether the block is hidden or visible. +(0,i.__)("%s the block if at least one rule set applies. Rules targeting user fields will fail if the current user is not logged in.","block-visibility"),L?(0,i.__)("Hide","block-visibility"):(0,i.__)("Show","block-visibility"))),0===x.length&&(0,e.createElement)(a.Notice,{status:"warning",isDismissible:!1},(0,i.__)("It does not appear that your website contains any published fields yet.","block-visibility")),(0,e.createElement)("div",{className:"rule-sets"},P.map(((t,l)=>(0,e.createElement)(Mi,c({key:l,ruleSet:t,ruleSetIndex:l,ruleSets:P,groupedFields:V,allFields:N,controlName:"acf",controlAtts:M,hideOnRuleSets:L,rulePlaceholder:(0,i.__)("Select Field…","block-visibility")},n))))),(0,e.createElement)("div",{className:"rule-sets__add-rule-set"},(0,e.createElement)(a.Button,{onClick:()=>(()=>{const e=[...P,{enable:!0,rules:[{field:""}]}];k("acf",(0,t.assign)({...M},{ruleSets:[...e]}))})(),isSecondary:!0},(0,i.__)("Add rule set","block-visibility"))),(0,e.createElement)("div",{className:"hide-on-rule-sets"},(0,e.createElement)(a.ToggleControl,{label:(0,i.__)("Hide when rules apply","block-visibility"),checked:L,onChange:()=>k("acf",(0,t.assign)({...M},{hideOnRuleSets:!L}))}))),(0,e.createElement)("div",{className:"control-separator"},(0,e.createElement)("span",null,(0,i.__)("AND","block-visibility"))))}function Wi(n){var l,o,r,s,c,u,d,p,v,m,b,f,g,y,_,E;const{variables:k,enabledControls:w,controlSetAtts:S,setControlAtts:O}=n,x=null!==(l=null==k||null===(o=k.integrations)||void 0===o||null===(r=o.wp_fusion)||void 0===r?void 0:r.active)&&void 0!==l&&l,M=w.some((e=>"wp_fusion"===e.settingSlug)),L=null!==(s=null==S?void 0:S.controls.hasOwnProperty("wpFusion"))&&void 0!==s&&s;if(!M||!L||!x)return null;const P=null!==(c=null==S?void 0:S.controls.hasOwnProperty("userRole"))&&void 0!==c&&c,V=null!==(u=null==S||null===(d=S.controls)||void 0===d||null===(p=d.userRole)||void 0===p?void 0:p.visibilityByRole)&&void 0!==u?u:"public",N=null!==(v=null==k||null===(m=k.integrations)||void 0===m||null===(b=m.wp_fusion)||void 0===b?void 0:b.tags)&&void 0!==v?v:[],T=e=>N.filter((t=>e.includes(t.value))),F=null!==(f=null==S||null===(g=S.controls)||void 0===g?void 0:g.wpFusion)&&void 0!==f?f:{},I=T(null!==(y=null==F?void 0:F.tagsAny)&&void 0!==y?y:[]),R=T(null!==(_=null==F?void 0:F.tagsAll)&&void 0!==_?_:[]),D=T(null!==(E=null==F?void 0:F.tagsNot)&&void 0!==E?E:[]),A=(e,n)=>{const i=[];0!==n.length&&n.forEach((e=>{i.push(e.value)})),O("wpFusion",(0,t.assign)({...F},{[e]:i}))};let H=(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"visibility-control wp-fusion__tags-any"},(0,e.createElement)("div",{className:"visibility-control__label"},(0,i.__)("Required Tags (Any)","block-visibility")),(0,e.createElement)(gi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:N,value:I,placeholder:(0,i.__)("Select Tag…","block-visibility"),onChange:e=>A("tagsAny",e),isMulti:!0}),(0,e.createElement)("div",{className:"visibility-control__help"},(0,i.__)("Only visible to logged-in users with at least one of the selected tags.","block-visibility"))),(0,e.createElement)("div",{className:"visibility-control wp-fusion__tags-all"},(0,e.createElement)("div",{className:"visibility-control__label"},(0,i.__)("Required Tags (All)","block-visibility")),(0,e.createElement)(gi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:N,value:R,placeholder:(0,i.__)("Select Tag…","block-visibility"),onChange:e=>A("tagsAll",e),isMulti:!0}),(0,e.createElement)("div",{className:"visibility-control__help"},(0,e.createInterpolateElement)((0,i.__)("Only visible to logged-in users with all of the selected tags.","block-visibility"),{strong:(0,e.createElement)("strong",null)}))));"public"!==V&&"logged-out"!==V||(H=(0,e.createElement)(a.Disabled,null,H));let z=(0,e.createElement)("div",{className:"visibility-control wp-fusion__tags-not"},(0,e.createElement)("div",{className:"visibility-control__label"},(0,i.__)("Required Tags (Not)","block-visibility")),(0,e.createElement)(gi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:N,value:D,placeholder:(0,i.__)("Select Tag…","block-visibility"),onChange:e=>A("tagsNot",e),isMulti:!0}),(0,e.createElement)("div",{className:"visibility-control__help"},(0,i.__)("Hide from logged-in users with at least one of the selected tags.","block-visibility")));return"logged-out"===V&&(z=(0,e.createElement)(a.Disabled,null,z)),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"visibility-control__group wp-fusion-control"},(0,e.createElement)("h3",{className:"visibility-control__group-heading has-icon"},(0,e.createElement)(h,{icon:C.wpFusion}),(0,e.createElement)("span",null,(0,i.__)("WP Fusion","block-visibility")),(0,e.createElement)(Ri,{message:(0,i.__)("The WP Fusion control allows you to configure block visibility based on WP Fusion tags.","block-visibility"),subMessage:(0,i.__)("Note that the available fields depend on the User Role control settings. If the User Role control is disabled, only the Required Tags (Not) field will be available.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-wp-fusion-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",position:"bottom center"})),(0,e.createElement)("div",{className:"visibility-control__group-fields"},H,z),!P&&(0,e.createElement)(a.Notice,{status:"warning",isDismissible:!1},(0,i.__)("The WP Fusion control works best in coordination with the User Role control, which has been disabled. To re-enable, click the eye icon in the Controls Toolbar above.","block-visibility"))),(0,e.createElement)("div",{className:"control-separator"},(0,e.createElement)("span",null,(0,i.__)("AND","block-visibility"))))}function Yi(t){return(0,e.createElement)(a.Notice,{status:"warning",isDismissible:!1},(0,e.createInterpolateElement)((0,i.__)("Looks like all Visibility Controls have been disabled. To control block visibility again, re-enable some Visibility Controls.","block-visibility"),{a:(0,e.createElement)("a",{href:t+"&tab=visibility-controls",target:"_blank",rel:"noreferrer"})}))}function Xi(){return(0,e.createElement)(a.Notice,{status:"warning",isDismissible:!1},(0,i.__)("All visibility controls have been disabled for this block. Add controls using the three dots icon above.","block-visibility"))}function Qi(t){const n="core/legacy-widget"===t.name?(0,i.__)("Legacy Widget","block-visibility"):(0,i.__)("Current","block-visibility");return(0,e.createElement)(a.Notice,{status:"warning",isDismissible:!1},(0,e.createElement)("p",null,(0,i.sprintf)(// Translators: The current block name. (0,i.__)("Unfortunately the %1$s block does not support custom attributes. Therefore it is not compatible with Block Visibility.","block-visibility"),n)),(0,e.createElement)("p",null,(0,i.sprintf)(// Translators: The current block name. -(0,i.__)("As a workaround, wrap the %1$s block in a Group block. Then apply the desired visibility controls to the Group block.","block-visibility"),n)))}const qi=(0,a.withFilters)("blockVisibility.addControlSetControls")((t=>(0,e.createElement)(e.Fragment,null)));function Zi(n){var i,l,o;const{type:r,controlSetAtts:s,setControlSetAtts:u,enabledControls:d,variables:p}=n,v=null!==(i=null==p||null===(l=p.plugin_variables)||void 0===l?void 0:l.settings_url)&&void 0!==i?i:"",m=null===(o=null==s?void 0:s.enable)||void 0===o||o,b="single"===r?r:r+"-"+(null==s?void 0:s.id),f=1===d.length&&d.some((e=>"hide_block"===e.settingSlug));if(f)return null;const h=[];d.forEach((e=>{var t;"hide_block"!==e.settingSlug&&h.push({label:e.label,type:e.type,attributeSlug:e.attributeSlug,settingSlug:e.settingSlug,icon:null!==(t=null==e?void 0:e.icon)&&void 0!==t&&t,active:null==s?void 0:s.controls.hasOwnProperty(e.attributeSlug)})}));const g=Object.keys(s.controls),y=h.filter((e=>!(!e.active||!g.includes(e.attributeSlug))));function _(e,n){var i;const l=null!==(i=null==s?void 0:s.controls)&&void 0!==i?i:{},o=(0,t.assign)({...s},{controls:(0,t.assign)({...l},{[e]:n})});u(o)}let C=(0,e.createElement)("div",{className:"control-set__controls"},(0,e.createElement)(a.Slot,{name:"ControlSetControlsTop-"+b}),(0,e.createElement)(Di,c({setControlAtts:_},n)),(0,e.createElement)(Vi,c({setControlAtts:_},n)),(0,e.createElement)(Ai,c({setControlAtts:_},n)),(0,e.createElement)(Hi,c({setControlAtts:_},n)),(0,e.createElement)(a.Slot,{name:"ControlSetControlsMiddle-"+b}),(0,e.createElement)(Bi,c({setControlAtts:_},n)),(0,e.createElement)(Ui,c({setControlAtts:_},n)),(0,e.createElement)(a.Slot,{name:"ControlSetControlsBottom-"+b}));return m||(C=(0,e.createElement)(a.Disabled,null,C)),(0,e.createElement)("div",{className:"control-set"},(0,e.createElement)(w,c({controls:h,setControlSetAtts:u},n)),C,(0,e.createElement)(qi,c({uniqueIndex:b,setControlAtts:_},n)),!f&&(0,t.isEmpty)(y)&&(0,e.createElement)($i,{settingsUrl:v}))}function Wi(e,t){if(!e||0===e.length)return!1;const n=e.disabled_blocks.includes(t),i=(0,r.getBlockSupport)(t,"blockVisibility",!1);return!(n||!i)}function Yi(e,t){var n,i,l,o,r;let s=!0;if(null===(n=null==e||null===(i=e.plugin_settings)||void 0===i?void 0:i.enable_user_role_restrictions)||void 0===n||!n)return s;const a=null!==(l=null==e||null===(o=e.plugin_settings)||void 0===o?void 0:o.enabled_user_roles)&&void 0!==l?l:[];-1===a.indexOf("administrator")&&a.push("administrator");const c=null!==(r=null==t?void 0:t.current_users_roles)&&void 0!==r?r:[];return s=0!==c.length&&c.every((e=>-1!==a.indexOf(e))),s}function Xi(e,n){var l;let r=[];if(!e||!n||0===e.length||0===n.length)return r;let s=function(){let e=[{label:(0,i.__)("Hide Block","block-visibility"),type:"core",attributeSlug:"hideBlock",settingSlug:"hide_block"},{label:(0,i.__)("Date & Time","block-visibility"),type:"core",attributeSlug:"dateTime",settingSlug:"date_time"},{label:(0,i.__)("User Role","block-visibility"),type:"core",attributeSlug:"userRole",settingSlug:"visibility_by_role"},{label:(0,i.__)("Screen Size","block-visibility"),type:"core",attributeSlug:"screenSize",settingSlug:"screen_size"},{label:(0,i.__)("Query String","block-visibility"),type:"core",attributeSlug:"queryString",settingSlug:"query_string"}];e=(0,o.applyFilters)("blockVisibility.coreControls",e),e.sort(((e,t)=>e.attributeSlug.localeCompare(t.attributeSlug)));let t=[{label:(0,i.__)("Advanced Custom Fields","block-visibility"),type:"integration",attributeSlug:"acf",settingSlug:"acf",icon:C.acf},{label:(0,i.__)("WP Fusion","block-visibility"),type:"integration",attributeSlug:"wpFusion",settingSlug:"wp_fusion",icon:C.wpFusion}];t=(0,o.applyFilters)("blockVisibility.integrationControls",t),t.sort(((e,t)=>e.attributeSlug.localeCompare(t.attributeSlug)));let n=[...e,...t];return n=(0,o.applyFilters)("blockVisibility.controls",n),n}();s.forEach((function(e){"integration"!==e.type||(e=>{let t=!1;var i,l;return null!=n&&n.integrations&&(t=null!==(i=null==n||null===(l=n.integrations[e])||void 0===l?void 0:l.active)&&void 0!==i&&i),t})(e.settingSlug)||(s=s.filter((t=>t.settingSlug!==e.settingSlug)))}));const a=null!==(l=null==e?void 0:e.visibility_controls)&&void 0!==l?l:{};return(0,t.isEmpty)(a)||s.forEach((function(e){var n,i;let l=!1;(0,t.has)(a,e.settingSlug)||(l=!0),(null===(n=null===(i=a[e.settingSlug])||void 0===i?void 0:i.enable)||void 0===n||n)&&(l=!0),l&&r.push(e)})),r=(0,o.applyFilters)("blockVisibility.enabledControls",r,e,n),r}const Qi=(0,a.withFilters)("blockVisibility.addInspectorControls")((t=>(0,e.createElement)(e.Fragment,null)));var Ki=(0,l.withSelect)((e=>{var t,n;const{getEntityRecord:i}=e("core");return{settings:null!==(t=i("block-visibility/v1","settings"))&&void 0!==t?t:"fetching",variables:null!==(n=i("block-visibility/v1","variables"))&&void 0!==n?n:"fetching"}}))((function(n){var l,o,r,s,p,v,m,b,f,h,g;const{attributes:y,setAttributes:_,name:C,settings:E,variables:k,clientId:w}=n;if("fetching"===E||"fetching"===k)return null;if(!Yi(E,k)||!Wi(E,C))return null;let S=Xi(E,k);const O=null!==(l=null==E||null===(o=E.plugin_settings)||void 0===o?void 0:o.default_controls)&&void 0!==l?l:{};let x={};(0,t.isEmpty)(O)?x={dateTime:{},userRole:{},screenSize:{}}:S.forEach((e=>{O.includes(e.settingSlug)&&(x[e.attributeSlug]={})}));const M={...y};let L=null==M?void 0:M.blockVisibility,P=null!==(r=null===(s=L)||void 0===s?void 0:s.controlSets)&&void 0!==r?r:[];0===P.length&&(P=[{id:1,enable:!0,controls:x}],L=(0,t.assign)({...L},{controlSets:P}));const V=null==k||!k.is_pro||null===(p=null==E||null===(v=E.visibility_controls)||void 0===v||null===(m=v.general)||void 0===m?void 0:m.enable_local_controls)||void 0===p||p;V||(S=S.filter((e=>"hideBlock"===e.attributeSlug||"visibilityPresets"===e.attributeSlug)));const N=null!==(b=null==k||null===(f=k.plugin_variables)||void 0===f?void 0:f.settings_url)&&void 0!==b?b:"",T=null!==(h=null===(g=L)||void 0===g?void 0:g.hideBlock)&&void 0!==h&&h,F=S.some((e=>"hide_block"===e.settingSlug))&&T,I=["core/legacy-widget"].includes(C);function R(e){_({blockVisibility:(0,t.assign)({...y.blockVisibility},{controlSets:[e]})})}return(0,e.createElement)(u.InspectorControls,null,(0,e.createElement)(a.PanelBody,{title:(0,i.__)("Visibility","block-visibility"),className:"block-visibility",initialOpen:!1},(0,e.createElement)("div",{className:"visibility-controls__container"},0!==S.length&&!I&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(a.Slot,{name:"InspectorControlsTop"}),(0,e.createElement)(d,c({enabledControls:S},n)),(0,e.createElement)(a.Slot,{name:"InspectorControlsMiddle"}),!F&&V&&P.map(((t,i)=>(0,e.createElement)(Zi,c({key:w+i,type:"single",controlSets:P,controlSetAtts:t,setControlSetAtts:R,enabledControls:S,defaultControls:x},n)))),(0,e.createElement)(a.Slot,{name:"InspectorControlsBottom"})),0===S.length&&!I&&(0,e.createElement)(ji,{settingsUrl:N}),I&&(0,e.createElement)(Gi,{name:C}))),(0,e.createElement)(Qi,c({blockAtts:L,enabledControls:S},n)))})),Ji=(0,l.withSelect)((e=>{var t,n;const{getEntityRecord:i}=e("core"),{getBlockName:l,getSelectedBlockClientIds:o,getBlockAttributes:r,hasMultiSelection:s}=e("core/block-editor"),{getBlockType:a}=e("core/blocks"),c=!s(),u=o(),d=0===u.length?null:u[0];return{enableMenuItem:c,clientId:d,blockType:a(l(d)),blockAttributes:r(d),settings:null!==(t=i("block-visibility/v1","settings"))&&void 0!==t?t:"fetching",variables:null!==(n=i("block-visibility/v1","variables"))&&void 0!==n?n:"fetching"}}))((function(n){var o;const{flashBlock:r,updateBlockAttributes:s}=(0,l.useDispatch)("core/block-editor"),{createSuccessNotice:c}=(0,l.useDispatch)("core/notices"),{enableMenuItem:d,clientId:p,blockType:v,blockAttributes:m,settings:b,variables:f}=n;if("fetching"===b||"fetching"===f)return null;if(!Yi(b,f))return null;if(!d||!v)return null;if(["core/legacy-widget"].includes(v.name))return null;const h=Mi(b,"enable_toolbar_controls"),g=Wi(b,v.name),y=Xi(b,f);if(!h||!g||!y.some((e=>"hide_block"===e.settingSlug)))return null;const{blockVisibility:_}=m,E=null!==(o=null==_?void 0:_.hideBlock)&&void 0!==o&&o,k=E?C.visibilityAlt:C.visibilityHiddenAlt,w=E?(0,i.__)("Enable block","block-visibility"):(0,i.__)("Hide block","block-visibility"),S=v.title,O=E?(0,i.sprintf)(// Translators: Name of the block being made visible, e.g. "Paragraph". +(0,i.__)("As a workaround, wrap the %1$s block in a Group block. Then apply the desired visibility controls to the Group block.","block-visibility"),n)))}const Ki=(0,a.withFilters)("blockVisibility.addControlSetControls")((t=>(0,e.createElement)(e.Fragment,null)));function Ji(n){var i,l,o;const{type:r,controlSetAtts:s,setControlSetAtts:u,enabledControls:d,variables:p}=n,v=null!==(i=null==p||null===(l=p.plugin_variables)||void 0===l?void 0:l.settings_url)&&void 0!==i?i:"",m=null===(o=null==s?void 0:s.enable)||void 0===o||o,b="single"===r?r:r+"-"+(null==s?void 0:s.id),f=1===d.length&&d.some((e=>"hide_block"===e.settingSlug));if(f)return null;const h=[];d.forEach((e=>{var t;"hide_block"!==e.settingSlug&&h.push({label:e.label,type:e.type,attributeSlug:e.attributeSlug,settingSlug:e.settingSlug,icon:null!==(t=null==e?void 0:e.icon)&&void 0!==t&&t,active:null==s?void 0:s.controls.hasOwnProperty(e.attributeSlug)})}));const g=Object.keys(s.controls),y=h.filter((e=>!(!e.active||!g.includes(e.attributeSlug))));function _(e,n){var i;const l=null!==(i=null==s?void 0:s.controls)&&void 0!==i?i:{},o=(0,t.assign)({...s},{controls:(0,t.assign)({...l},{[e]:n})});u(o)}let C=(0,e.createElement)("div",{className:"control-set__controls"},(0,e.createElement)(a.Slot,{name:"ControlSetControlsTop-"+b}),(0,e.createElement)(ji,c({setControlAtts:_},n)),(0,e.createElement)(Di,c({setControlAtts:_},n)),(0,e.createElement)($i,c({setControlAtts:_},n)),(0,e.createElement)(Gi,c({setControlAtts:_},n)),(0,e.createElement)(a.Slot,{name:"ControlSetControlsMiddle-"+b}),(0,e.createElement)(Zi,c({setControlAtts:_},n)),(0,e.createElement)(Wi,c({setControlAtts:_},n)),(0,e.createElement)(a.Slot,{name:"ControlSetControlsBottom-"+b}));return m||(C=(0,e.createElement)(a.Disabled,null,C)),(0,e.createElement)("div",{className:"control-set"},(0,e.createElement)(w,c({controls:h,setControlSetAtts:u},n)),C,(0,e.createElement)(Ki,c({uniqueIndex:b,setControlAtts:_},n)),!f&&(0,t.isEmpty)(y)&&(0,e.createElement)(Xi,{settingsUrl:v}))}function el(e,t){if(!e||0===e.length)return!1;const n=e.disabled_blocks.includes(t),i=(0,r.getBlockSupport)(t,"blockVisibility",!1);return!(n||!i)}function tl(e,t){var n,i,l,o,r;let s=!0;if(null===(n=null==e||null===(i=e.plugin_settings)||void 0===i?void 0:i.enable_user_role_restrictions)||void 0===n||!n)return s;const a=null!==(l=null==e||null===(o=e.plugin_settings)||void 0===o?void 0:o.enabled_user_roles)&&void 0!==l?l:[];-1===a.indexOf("administrator")&&a.push("administrator");const c=null!==(r=null==t?void 0:t.current_users_roles)&&void 0!==r?r:[];return s=0!==c.length&&c.every((e=>-1!==a.indexOf(e))),s}function nl(e,n){var l;let r=[];if(!e||!n||0===e.length||0===n.length)return r;let s=function(){let e=[{label:(0,i.__)("Hide Block","block-visibility"),type:"core",attributeSlug:"hideBlock",settingSlug:"hide_block"},{label:(0,i.__)("Date & Time","block-visibility"),type:"core",attributeSlug:"dateTime",settingSlug:"date_time"},{label:(0,i.__)("User Role","block-visibility"),type:"core",attributeSlug:"userRole",settingSlug:"visibility_by_role"},{label:(0,i.__)("Screen Size","block-visibility"),type:"core",attributeSlug:"screenSize",settingSlug:"screen_size"},{label:(0,i.__)("Query String","block-visibility"),type:"core",attributeSlug:"queryString",settingSlug:"query_string"}];e=(0,o.applyFilters)("blockVisibility.coreControls",e),e.sort(((e,t)=>e.attributeSlug.localeCompare(t.attributeSlug)));let t=[{label:(0,i.__)("Advanced Custom Fields","block-visibility"),type:"integration",attributeSlug:"acf",settingSlug:"acf",icon:C.acf},{label:(0,i.__)("WP Fusion","block-visibility"),type:"integration",attributeSlug:"wpFusion",settingSlug:"wp_fusion",icon:C.wpFusion}];t=(0,o.applyFilters)("blockVisibility.integrationControls",t),t.sort(((e,t)=>e.attributeSlug.localeCompare(t.attributeSlug)));let n=[...e,...t];return n=(0,o.applyFilters)("blockVisibility.controls",n),n}();s.forEach((function(e){"integration"!==e.type||(e=>{let t=!1;var i,l;return null!=n&&n.integrations&&(t=null!==(i=null==n||null===(l=n.integrations[e])||void 0===l?void 0:l.active)&&void 0!==i&&i),t})(e.settingSlug)||(s=s.filter((t=>t.settingSlug!==e.settingSlug)))}));const a=null!==(l=null==e?void 0:e.visibility_controls)&&void 0!==l?l:{};return(0,t.isEmpty)(a)||s.forEach((function(e){var n,i;let l=!1;(0,t.has)(a,e.settingSlug)||(l=!0),(null===(n=null===(i=a[e.settingSlug])||void 0===i?void 0:i.enable)||void 0===n||n)&&(l=!0),l&&r.push(e)})),r=(0,o.applyFilters)("blockVisibility.enabledControls",r,e,n),r}const il=(0,a.withFilters)("blockVisibility.addInspectorControls")((t=>(0,e.createElement)(e.Fragment,null)));var ll=(0,l.withSelect)((e=>{var t,n;const{getEntityRecord:i}=e("core");return{settings:null!==(t=i("block-visibility/v1","settings"))&&void 0!==t?t:"fetching",variables:null!==(n=i("block-visibility/v1","variables"))&&void 0!==n?n:"fetching"}}))((function(n){var l,o,r,s,p,v,m,b,f,h,g;const{attributes:y,setAttributes:_,name:C,settings:E,variables:k,clientId:w}=n;if("fetching"===E||"fetching"===k)return null;if(!tl(E,k)||!el(E,C))return null;let S=nl(E,k);const O=null!==(l=null==E||null===(o=E.plugin_settings)||void 0===o?void 0:o.default_controls)&&void 0!==l?l:{};let x={};(0,t.isEmpty)(O)?x={dateTime:{},userRole:{},screenSize:{}}:S.forEach((e=>{O.includes(e.settingSlug)&&(x[e.attributeSlug]={})}));const M={...y};let L=null==M?void 0:M.blockVisibility,P=null!==(r=null===(s=L)||void 0===s?void 0:s.controlSets)&&void 0!==r?r:[];0===P.length&&(P=[{id:1,enable:!0,controls:x}],L=(0,t.assign)({...L},{controlSets:P}));const V=null==k||!k.is_pro||null===(p=null==E||null===(v=E.visibility_controls)||void 0===v||null===(m=v.general)||void 0===m?void 0:m.enable_local_controls)||void 0===p||p;V||(S=S.filter((e=>"hideBlock"===e.attributeSlug||"visibilityPresets"===e.attributeSlug)));const N=null!==(b=null==k||null===(f=k.plugin_variables)||void 0===f?void 0:f.settings_url)&&void 0!==b?b:"",T=null!==(h=null===(g=L)||void 0===g?void 0:g.hideBlock)&&void 0!==h&&h,F=S.some((e=>"hide_block"===e.settingSlug))&&T,I=["core/legacy-widget"].includes(C);function R(e){_({blockVisibility:(0,t.assign)({...y.blockVisibility},{controlSets:[e]})})}return(0,e.createElement)(u.InspectorControls,null,(0,e.createElement)(a.PanelBody,{title:(0,i.__)("Visibility","block-visibility"),className:"block-visibility",initialOpen:!1},(0,e.createElement)("div",{className:"visibility-controls__container"},0!==S.length&&!I&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(a.Slot,{name:"InspectorControlsTop"}),(0,e.createElement)(d,c({enabledControls:S},n)),(0,e.createElement)(a.Slot,{name:"InspectorControlsMiddle"}),!F&&V&&P.map(((t,i)=>(0,e.createElement)(Ji,c({key:w+i,type:"single",controlSets:P,controlSetAtts:t,setControlSetAtts:R,enabledControls:S,defaultControls:x},n)))),(0,e.createElement)(a.Slot,{name:"InspectorControlsBottom"})),0===S.length&&!I&&(0,e.createElement)(Yi,{settingsUrl:N}),I&&(0,e.createElement)(Qi,{name:C}))),(0,e.createElement)(il,c({blockAtts:L,enabledControls:S},n)))})),ol=(0,l.withSelect)((e=>{var t,n;const{getEntityRecord:i}=e("core"),{getBlockName:l,getSelectedBlockClientIds:o,getBlockAttributes:r,hasMultiSelection:s}=e("core/block-editor"),{getBlockType:a}=e("core/blocks"),c=!s(),u=o(),d=0===u.length?null:u[0];return{enableMenuItem:c,clientId:d,blockType:a(l(d)),blockAttributes:r(d),settings:null!==(t=i("block-visibility/v1","settings"))&&void 0!==t?t:"fetching",variables:null!==(n=i("block-visibility/v1","variables"))&&void 0!==n?n:"fetching"}}))((function(n){var o;const{flashBlock:r,updateBlockAttributes:s}=(0,l.useDispatch)("core/block-editor"),{createSuccessNotice:c}=(0,l.useDispatch)("core/notices"),{enableMenuItem:d,clientId:p,blockType:v,blockAttributes:m,settings:b,variables:f}=n;if("fetching"===b||"fetching"===f)return null;if(!tl(b,f))return null;if(!d||!v)return null;if(["core/legacy-widget"].includes(v.name))return null;const h=Fi(b,"enable_toolbar_controls"),g=el(b,v.name),y=nl(b,f);if(!h||!g||!y.some((e=>"hide_block"===e.settingSlug)))return null;const{blockVisibility:_}=m,E=null!==(o=null==_?void 0:_.hideBlock)&&void 0!==o&&o,k=E?C.visibilityAlt:C.visibilityHiddenAlt,w=E?(0,i.__)("Enable block","block-visibility"):(0,i.__)("Hide block","block-visibility"),S=v.title,O=E?(0,i.sprintf)(// Translators: Name of the block being made visible, e.g. "Paragraph". (0,i.__)('"%s" is now visible.'),S):(0,i.sprintf)(// Translators: Name of the block being hidden, e.g. "Paragraph". -(0,i.__)('"%s" is now hidden.'),S);return(0,e.createElement)(u.BlockSettingsMenuControls,null,(0,e.createElement)(a.MenuItem,{onClick:()=>{s(p,{blockVisibility:(0,t.assign)({..._},{hideBlock:!E})}),r(p),c(O,{type:"snackbar"})},icon:k,label:w},w))}));function el(e,t,n){if(t&&!e.hasOwnProperty("dateTime"))return!1;if(!n.some((e=>"date_time"===e.settingSlug)))return!1;let i=[],l=!1;var r,s,a,c;if(t?(i=null!==(r=null===(s=e.dateTime)||void 0===s?void 0:s.schedules)&&void 0!==r?r:[],l=null!==(a=null===(c=e.dateTime)||void 0===c?void 0:c.hideOnSchedules)&&void 0!==a&&a):i=null!=e&&e.scheduling?[null==e?void 0:e.scheduling]:[],0===i.length)return!1;const u=[];i.forEach((e=>{var t,n,i;const r=null!==(t=null==e?void 0:e.enable)&&void 0!==t&&t,s=null!==(n=null==e?void 0:e.start)&&void 0!==n?n:"",a=null!==(i=null==e?void 0:e.end)&&void 0!==i?i:"";let c=!0;r||(c=!1),l||!r||s||a||(c=!1),c=(0,o.applyFilters)("blockVisibility.hasDateTimeScheduleIndicator",c,e),r&&s&&a&&s>=a&&(c=!1),u.push(c)}));let d=u.includes(!0);return d=(0,o.applyFilters)("blockVisibility.hasDateTimeIndicator",d,e,t,n),d}function tl(e,t,n){var i,l,r,s,a,c;if(t&&!e.hasOwnProperty("userRole"))return!1;const u=t?e.userRole:e,d=null!==(i=null==u?void 0:u.visibilityByRole)&&void 0!==i?i:"public",p=null!==(l=null==u?void 0:u.restrictedRoles)&&void 0!==l?l:[],v=null!==(r=null==u?void 0:u.hideOnRestrictedRoles)&&void 0!==r&&r,m=null!==(s=null==u?void 0:u.restrictedUsers)&&void 0!==s?s:[],b=null!==(a=null==u?void 0:u.hideOnRestrictedUsers)&&void 0!==a&&a,f=null!==(c=null==u?void 0:u.ruleSets)&&void 0!==c?c:[];let h=!0;return n.some((e=>"visibility_by_role"===e.settingSlug))&&d&&"public"!==d&&"all"!==d||(h=!1),"user-role"===d&&0===p.length&&v&&(h=!1),"users"===d&&0===m.length&&b&&(h=!1),"user-rule-sets"===d&&0===f.length&&(h=!1),h=(0,o.applyFilters)("blockVisibility.hasUserRoleIndicator",h,e,t,n),h}function nl(e,t,n,i){var l,r,s,a;if(t&&!e.hasOwnProperty("screenSize"))return!1;const c=t?e.screenSize:e,u=null!==(l=null==c?void 0:c.hideOnScreenSize)&&void 0!==l?l:{extraLarge:!1,large:!1,medium:!1,small:!1,extraSmall:!1},d=null!==(r=null==i||null===(s=i.visibility_controls)||void 0===s||null===(a=s.screen_size)||void 0===a?void 0:a.controls)&&void 0!==r?r:{extra_large:!0,large:!0,medium:!0,small:!0,extra_small:!0},p=[!(!u.extraLarge||!d.extra_large),!(!u.large||!d.large),!(!u.medium||!d.medium),!(!u.small||!d.small),!(!u.extraSmall||!d.extra_small)];let v=!0;return n.some((e=>"screen_size"===e.settingSlug))&&p.includes(!0)||(v=!1),v=(0,o.applyFilters)("blockVisibility.hasScreenSizeIndicator",v,e,t,n,i),v}function il(e,t,n){var i,l,r,s,a,c;if(t&&!e.hasOwnProperty("queryString"))return!1;if(!n.some((e=>"query_string"===e.settingSlug)))return!1;const u=null!==(i=null==e||null===(l=e.queryString)||void 0===l?void 0:l.queryStringAny)&&void 0!==i?i:"",d=null!==(r=null==e||null===(s=e.queryString)||void 0===s?void 0:s.queryStringAll)&&void 0!==r?r:"",p=null!==(a=null==e||null===(c=e.queryString)||void 0===c?void 0:c.queryStringNot)&&void 0!==a?a:"";let v=!0;return u||d||p||(v=!1),v=(0,o.applyFilters)("blockVisibility.hasQueryStringIndicator",v,e,t,n),v}function ll(e,t,n,i){var l,r,s,a,c;if(null===(l=null==i||null===(r=i.integrations)||void 0===r||null===(s=r.acf)||void 0===s?void 0:s.active)||void 0===l||!l||!n.some((e=>"acf"===e.settingSlug)))return!1;if(t&&!e.hasOwnProperty("acf"))return!1;let u=!0;return 0===(null!==(a=null==e||null===(c=e.acf)||void 0===c?void 0:c.ruleSets)&&void 0!==a?a:[]).length&&(u=!1),u=(0,o.applyFilters)("blockVisibility.hasACFIndicator",u,e,t,n,i),u}function ol(e,t,n,i){var l,r,s,a,c,u,d,p,v,m,b,f;if(null===(l=null==i||null===(r=i.integrations)||void 0===r||null===(s=r.wp_fusion)||void 0===s?void 0:s.active)||void 0===l||!l||!n.some((e=>"wp_fusion"===e.settingSlug)))return!1;if(t&&!e.hasOwnProperty("wpFusion"))return!1;const h=null!==(a=e.hasOwnProperty("userRole"))&&void 0!==a&&a,g=null!==(c=null==e||null===(u=e.userRole)||void 0===u?void 0:u.visibilityByRole)&&void 0!==c?c:"public",y="public"===g||"logged-out"===g,_=null!==(d=null==e||null===(p=e.wpFusion)||void 0===p?void 0:p.tagsAny)&&void 0!==d?d:[],C=null!==(v=null==e||null===(m=e.wpFusion)||void 0===m?void 0:m.tagsAll)&&void 0!==v?v:[],E=null!==(b=null==e||null===(f=e.wpFusion)||void 0===f?void 0:f.tagsNot)&&void 0!==b?b:[];let k=!0;return(!h&&0===E.length||"public"===g&&0===E.length||"logged-out"===g)&&(k=!1),y||0!==_.length||0!==C.length||0!==E.length||(k=!1),k=(0,o.applyFilters)("blockVisibility.hasWPFusionIndicator",k,e,t,n,i),k}function rl(e){const{data:t="fetching"}=(0,l.useSelect)((t=>{const{getEntityRecord:n}=t("core");return{data:n("block-visibility/v1",e)}}),[]);return t}(0,o.addFilter)("editor.BlockListBlock","block-visibility/contextual-indicators",(function(t){return n=>{var i,l,r,s,a;const u=rl("settings"),d=rl("variables");if("fetching"===u)return(0,e.createElement)(t,n);const{name:p,attributes:m}=n,b=Mi(u,"enable_contextual_indicators"),f=Wi(u,p),h=Xi(u,d);if(!b||!f||0===h.length)return(0,e.createElement)(t,n);const{blockVisibility:g}=m,y=null!==(i=null==g?void 0:g.hideBlock)&&void 0!==i&&i&&h.some((e=>"hide_block"===e.settingSlug)),_=null!==(l=null==g?void 0:g.controlSets)&&void 0!==l&&l;let C=null!=g?g:{};var E;_&&(C=0!==g.controlSets.length&&null!==(E=g.controlSets[0])&&void 0!==E&&E.controls?g.controlSets[0].controls:{});let k={"date-time":el(C,_,h),"user-role":tl(C,_,h),"screen-size":nl(C,_,h,u),"query-string":il(C,_,h)};k=(0,o.applyFilters)("blockVisibility.conditionalIndicatorActiveCoreControls",k,g,C,_,h,d);let w={acf:ll(C,_,h,d),"wp-fusion":ol(C,_,h,d)};w=(0,o.applyFilters)("blockVisibility.conditionalIndicatorActiveIntegrationControls",w,C,_,h,d);let S={...k,...w};S=Object.keys(S).filter((e=>!0===S[e])),null==d||!d.is_pro||null===(r=null==u||null===(s=u.visibility_controls)||void 0===s||null===(a=s.general)||void 0===a?void 0:a.enable_local_controls)||void 0===r||r||(S=S.filter((e=>"hide-block"===e||"visibility-presets"===e))),S.sort();let O="";S.length>1?O="block-visibility__has-"+S.length+"-controls":0!==S.length&&(O="block-visibility__has-"+S.join("-"));let x=v()({"block-visibility__is-hidden":y},O);return x&&(x+=" block-visibility__has-visibility"),x=(0,o.applyFilters)("blockVisibility.conditionalIndicatorClasses",x),(0,e.createElement)(t,c({},n,{className:x}))}})),(0,l.dispatch)("core").addEntities([{label:(0,i.__)("Block Visibility Settings","block-visibility"),kind:"block-visibility/v1",name:"settings",baseURL:"/block-visibility/v1/settings"},{label:(0,i.__)("Block Visibility Variables","block-visibility"),kind:"block-visibility/v1",name:"variables",baseURL:"/block-visibility/v1/variables"}]),(0,o.addFilter)("blocks.registerBlockType","block-visibility/add-attributes",(function(e){if("core/freeform"===e.name)return e;const n=blockVisibilityFullControlMode;let i={blockVisibility:{type:"object",properties:{hideBlock:{type:"boolean"},controlSets:{type:"array",items:{type:"object",properties:{id:{type:"number"},title:{type:"string"},enable:{type:"boolean"},controls:{type:"object",properties:{dateTime:{type:"object",properties:{schedules:{type:"array",items:{type:"object",properties:{id:{type:"number"},title:{type:"string"},enable:{type:"boolean"},start:{type:"string"},end:{type:"string"}}}},hideOnSchedules:{type:"boolean"}}},userRole:{type:"object",properties:{enable:{type:"boolean"},visibilityByRole:{type:"string"},hideOnRestrictedRoles:{type:"boolean"},restrictedRoles:{type:"array",items:{type:"string"}},hideOnRestrictedUsers:{type:"boolean"},restrictedUsers:{type:"array",items:{type:"string"}},hideOnRuleSets:{type:"boolean"},ruleSets:{type:"array",items:{type:"object",properties:{id:{type:"number"},title:{type:"string"},enable:{type:"boolean"},rules:{type:"array",items:{type:"object",properties:{field:{type:"string"},subField:{type:["string","integer","array"]},subFields:{type:"object"},operator:{type:"string"},value:{type:["string","integer","array"]}}}}}}}}},screenSize:{type:"object",properties:{enable:{type:"boolean"},hideOnScreenSize:{type:"object",properties:{extraLarge:{type:"boolean"},large:{type:"boolean"},medium:{type:"boolean"},small:{type:"boolean"},extraSmall:{type:"boolean"}}}}},queryString:{type:"object",properties:{enable:{type:"boolean"},queryStringAny:{type:"string"},queryStringAll:{type:"string"},queryStringNot:{type:"string"}}},acf:{type:"object",properties:{enable:{type:"boolean"},hideOnRuleSets:{type:"boolean"},ruleSets:{type:"array",items:{type:["array","object"],items:{type:"object",properties:{field:{type:"string"},operator:{type:"string"},value:{type:"string"}}},properties:{id:{type:"number"},title:{type:"string"},enable:{type:"boolean"},rules:{type:"array",items:{type:"object",properties:{field:{type:"string"},subField:{type:["string","integer","array"]},operator:{type:"string"},value:{type:["string","integer","array"]}}}}}}}}},wpFusion:{type:"object",properties:{enable:{type:"boolean"},tagsAny:{type:"array",items:{type:["number","string"]}},tagsAll:{type:"array",items:{type:["number","string"]}},tagsNot:{type:"array",items:{type:["number","string"]}}}}}}}}}}}};return i=(0,o.applyFilters)("blockVisibility.attributes",i),(n||(0,r.hasBlockSupport)(e,"inserter",!0)&&!e.hasOwnProperty("parent"))&&(e.attributes=(0,t.assign)(e.attributes,i),e.supports=(0,t.assign)(e.supports,{blockVisibility:!0})),e})),(0,o.addFilter)("editor.BlockEdit","block-visibility/add-inspector-controls",(function(t){return n=>n.isSelected?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,n),(0,e.createElement)(Ki,n)):(0,e.createElement)(t,n)}),100),(0,s.registerPlugin)("block-visibility-toolbar-options-hide-block",{render:Ji}),(0,o.addFilter)("blockVisibilityPro.addPresetManagerControlSet","block-visibility/preset-manager-control-set",(function(){return t=>{const{index:n,type:i}=t;return(0,e.createElement)(a.Fill,{name:"PresetManagerControlSet-"+i+"-"+n},(0,e.createElement)(Zi,t))}}))}()}(); \ No newline at end of file +(0,i.__)('"%s" is now hidden.'),S);return(0,e.createElement)(u.BlockSettingsMenuControls,null,(0,e.createElement)(a.MenuItem,{onClick:()=>{s(p,{blockVisibility:(0,t.assign)({..._},{hideBlock:!E})}),r(p),c(O,{type:"snackbar"})},icon:k,label:w},w))}));function rl(e,t,n){if(t&&!e.hasOwnProperty("dateTime"))return!1;if(!n.some((e=>"date_time"===e.settingSlug)))return!1;let i=[],l=!1;var r,s,a,c;if(t?(i=null!==(r=null===(s=e.dateTime)||void 0===s?void 0:s.schedules)&&void 0!==r?r:[],l=null!==(a=null===(c=e.dateTime)||void 0===c?void 0:c.hideOnSchedules)&&void 0!==a&&a):i=null!=e&&e.scheduling?[null==e?void 0:e.scheduling]:[],0===i.length)return!1;const u=[];i.forEach((e=>{var t,n,i;const r=null!==(t=null==e?void 0:e.enable)&&void 0!==t&&t,s=null!==(n=null==e?void 0:e.start)&&void 0!==n?n:"",a=null!==(i=null==e?void 0:e.end)&&void 0!==i?i:"";let c=!0;r||(c=!1),l||!r||s||a||(c=!1),c=(0,o.applyFilters)("blockVisibility.hasDateTimeScheduleIndicator",c,e),r&&s&&a&&s>=a&&(c=!1),u.push(c)}));let d=u.includes(!0);return d=(0,o.applyFilters)("blockVisibility.hasDateTimeIndicator",d,e,t,n),d}function sl(e,t,n){var i,l,r,s,a,c;if(t&&!e.hasOwnProperty("userRole"))return!1;const u=t?e.userRole:e,d=null!==(i=null==u?void 0:u.visibilityByRole)&&void 0!==i?i:"public",p=null!==(l=null==u?void 0:u.restrictedRoles)&&void 0!==l?l:[],v=null!==(r=null==u?void 0:u.hideOnRestrictedRoles)&&void 0!==r&&r,m=null!==(s=null==u?void 0:u.restrictedUsers)&&void 0!==s?s:[],b=null!==(a=null==u?void 0:u.hideOnRestrictedUsers)&&void 0!==a&&a,f=null!==(c=null==u?void 0:u.ruleSets)&&void 0!==c?c:[];let h=!0;return n.some((e=>"visibility_by_role"===e.settingSlug))&&d&&"public"!==d&&"all"!==d||(h=!1),"user-role"===d&&0===p.length&&v&&(h=!1),"users"===d&&0===m.length&&b&&(h=!1),"user-rule-sets"===d&&0===f.length&&(h=!1),h=(0,o.applyFilters)("blockVisibility.hasUserRoleIndicator",h,e,t,n),h}function al(e,t,n,i){var l,r,s,a;if(t&&!e.hasOwnProperty("screenSize"))return!1;const c=t?e.screenSize:e,u=null!==(l=null==c?void 0:c.hideOnScreenSize)&&void 0!==l?l:{extraLarge:!1,large:!1,medium:!1,small:!1,extraSmall:!1},d=null!==(r=null==i||null===(s=i.visibility_controls)||void 0===s||null===(a=s.screen_size)||void 0===a?void 0:a.controls)&&void 0!==r?r:{extra_large:!0,large:!0,medium:!0,small:!0,extra_small:!0},p=[!(!u.extraLarge||!d.extra_large),!(!u.large||!d.large),!(!u.medium||!d.medium),!(!u.small||!d.small),!(!u.extraSmall||!d.extra_small)];let v=!0;return n.some((e=>"screen_size"===e.settingSlug))&&p.includes(!0)||(v=!1),v=(0,o.applyFilters)("blockVisibility.hasScreenSizeIndicator",v,e,t,n,i),v}function cl(e,t,n){var i,l,r,s,a,c;if(t&&!e.hasOwnProperty("queryString"))return!1;if(!n.some((e=>"query_string"===e.settingSlug)))return!1;const u=null!==(i=null==e||null===(l=e.queryString)||void 0===l?void 0:l.queryStringAny)&&void 0!==i?i:"",d=null!==(r=null==e||null===(s=e.queryString)||void 0===s?void 0:s.queryStringAll)&&void 0!==r?r:"",p=null!==(a=null==e||null===(c=e.queryString)||void 0===c?void 0:c.queryStringNot)&&void 0!==a?a:"";let v=!0;return u||d||p||(v=!1),v=(0,o.applyFilters)("blockVisibility.hasQueryStringIndicator",v,e,t,n),v}function ul(e,t,n,i){var l,r,s,a,c;if(null===(l=null==i||null===(r=i.integrations)||void 0===r||null===(s=r.acf)||void 0===s?void 0:s.active)||void 0===l||!l||!n.some((e=>"acf"===e.settingSlug)))return!1;if(t&&!e.hasOwnProperty("acf"))return!1;let u=!0;return 0===(null!==(a=null==e||null===(c=e.acf)||void 0===c?void 0:c.ruleSets)&&void 0!==a?a:[]).length&&(u=!1),u=(0,o.applyFilters)("blockVisibility.hasACFIndicator",u,e,t,n,i),u}function dl(e,t,n,i){var l,r,s,a,c,u,d,p,v,m,b,f;if(null===(l=null==i||null===(r=i.integrations)||void 0===r||null===(s=r.wp_fusion)||void 0===s?void 0:s.active)||void 0===l||!l||!n.some((e=>"wp_fusion"===e.settingSlug)))return!1;if(t&&!e.hasOwnProperty("wpFusion"))return!1;const h=null!==(a=e.hasOwnProperty("userRole"))&&void 0!==a&&a,g=null!==(c=null==e||null===(u=e.userRole)||void 0===u?void 0:u.visibilityByRole)&&void 0!==c?c:"public",y="public"===g||"logged-out"===g,_=null!==(d=null==e||null===(p=e.wpFusion)||void 0===p?void 0:p.tagsAny)&&void 0!==d?d:[],C=null!==(v=null==e||null===(m=e.wpFusion)||void 0===m?void 0:m.tagsAll)&&void 0!==v?v:[],E=null!==(b=null==e||null===(f=e.wpFusion)||void 0===f?void 0:f.tagsNot)&&void 0!==b?b:[];let k=!0;return(!h&&0===E.length||"public"===g&&0===E.length||"logged-out"===g)&&(k=!1),y||0!==_.length||0!==C.length||0!==E.length||(k=!1),k=(0,o.applyFilters)("blockVisibility.hasWPFusionIndicator",k,e,t,n,i),k}function pl(e){const{data:t="fetching"}=(0,l.useSelect)((t=>{const{getEntityRecord:n}=t("core");return{data:n("block-visibility/v1",e)}}),[]);return t}(0,o.addFilter)("editor.BlockListBlock","block-visibility/contextual-indicators",(function(t){return n=>{var i,l,r,s,a;const u=pl("settings"),d=pl("variables");if("fetching"===u)return(0,e.createElement)(t,n);const{name:p,attributes:m}=n,b=Fi(u,"enable_contextual_indicators"),f=el(u,p),h=nl(u,d);if(!b||!f||0===h.length)return(0,e.createElement)(t,n);const{blockVisibility:g}=m,y=null!==(i=null==g?void 0:g.hideBlock)&&void 0!==i&&i&&h.some((e=>"hide_block"===e.settingSlug)),_=null!==(l=null==g?void 0:g.controlSets)&&void 0!==l&&l;let C=null!=g?g:{};var E;_&&(C=0!==g.controlSets.length&&null!==(E=g.controlSets[0])&&void 0!==E&&E.controls?g.controlSets[0].controls:{});let k={"date-time":rl(C,_,h),"user-role":sl(C,_,h),"screen-size":al(C,_,h,u),"query-string":cl(C,_,h)};k=(0,o.applyFilters)("blockVisibility.conditionalIndicatorActiveCoreControls",k,g,C,_,h,d);let w={acf:ul(C,_,h,d),"wp-fusion":dl(C,_,h,d)};w=(0,o.applyFilters)("blockVisibility.conditionalIndicatorActiveIntegrationControls",w,C,_,h,d);let S={...k,...w};S=Object.keys(S).filter((e=>!0===S[e])),null==d||!d.is_pro||null===(r=null==u||null===(s=u.visibility_controls)||void 0===s||null===(a=s.general)||void 0===a?void 0:a.enable_local_controls)||void 0===r||r||(S=S.filter((e=>"hide-block"===e||"visibility-presets"===e))),S.sort();let O="";S.length>1?O="block-visibility__has-"+S.length+"-controls":0!==S.length&&(O="block-visibility__has-"+S.join("-"));let x=v()({"block-visibility__is-hidden":y},O);return x&&(x+=" block-visibility__has-visibility"),x=(0,o.applyFilters)("blockVisibility.conditionalIndicatorClasses",x),(0,e.createElement)(t,c({},n,{className:x}))}})),(0,l.dispatch)("core").addEntities([{label:(0,i.__)("Block Visibility Settings","block-visibility"),kind:"block-visibility/v1",name:"settings",baseURL:"/block-visibility/v1/settings"},{label:(0,i.__)("Block Visibility Variables","block-visibility"),kind:"block-visibility/v1",name:"variables",baseURL:"/block-visibility/v1/variables"}]),(0,o.addFilter)("blocks.registerBlockType","block-visibility/add-attributes",(function(e){if("core/freeform"===e.name)return e;const n=blockVisibilityFullControlMode;let i={blockVisibility:{type:"object",properties:{hideBlock:{type:"boolean"},controlSets:{type:"array",items:{type:"object",properties:{id:{type:"number"},title:{type:"string"},enable:{type:"boolean"},controls:{type:"object",properties:{dateTime:{type:"object",properties:{schedules:{type:"array",items:{type:"object",properties:{id:{type:"number"},title:{type:"string"},enable:{type:"boolean"},start:{type:"string"},end:{type:"string"}}}},hideOnSchedules:{type:"boolean"}}},userRole:{type:"object",properties:{enable:{type:"boolean"},visibilityByRole:{type:"string"},hideOnRestrictedRoles:{type:"boolean"},restrictedRoles:{type:"array",items:{type:"string"}},hideOnRestrictedUsers:{type:"boolean"},restrictedUsers:{type:"array",items:{type:"string"}},hideOnRuleSets:{type:"boolean"},ruleSets:{type:"array",items:{type:"object",properties:{id:{type:"number"},title:{type:"string"},enable:{type:"boolean"},rules:{type:"array",items:{type:"object",properties:{field:{type:"string"},subField:{type:["string","integer","array"]},subFields:{type:"object"},operator:{type:"string"},value:{type:["string","integer","array"]}}}}}}}}},screenSize:{type:"object",properties:{enable:{type:"boolean"},hideOnScreenSize:{type:"object",properties:{extraLarge:{type:"boolean"},large:{type:"boolean"},medium:{type:"boolean"},small:{type:"boolean"},extraSmall:{type:"boolean"}}}}},queryString:{type:"object",properties:{enable:{type:"boolean"},queryStringAny:{type:"string"},queryStringAll:{type:"string"},queryStringNot:{type:"string"}}},acf:{type:"object",properties:{enable:{type:"boolean"},hideOnRuleSets:{type:"boolean"},ruleSets:{type:"array",items:{type:["array","object"],items:{type:"object",properties:{field:{type:"string"},operator:{type:"string"},value:{type:"string"}}},properties:{id:{type:"number"},title:{type:"string"},enable:{type:"boolean"},rules:{type:"array",items:{type:"object",properties:{field:{type:"string"},subField:{type:["string","integer","array"]},operator:{type:"string"},value:{type:["string","integer","array"]}}}}}}}}},wpFusion:{type:"object",properties:{enable:{type:"boolean"},tagsAny:{type:"array",items:{type:["number","string"]}},tagsAll:{type:"array",items:{type:["number","string"]}},tagsNot:{type:"array",items:{type:["number","string"]}}}}}}}}}}}};return i=(0,o.applyFilters)("blockVisibility.attributes",i),(n||(0,r.hasBlockSupport)(e,"inserter",!0)&&!e.hasOwnProperty("parent"))&&(e.attributes=(0,t.assign)(e.attributes,i),e.supports=(0,t.assign)(e.supports,{blockVisibility:!0})),e})),(0,o.addFilter)("editor.BlockEdit","block-visibility/add-inspector-controls",(function(t){return n=>n.isSelected?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,n),(0,e.createElement)(ll,n)):(0,e.createElement)(t,n)}),100),(0,s.registerPlugin)("block-visibility-toolbar-options-hide-block",{render:ol}),(0,o.addFilter)("blockVisibilityPro.addPresetManagerControlSet","block-visibility/preset-manager-control-set",(function(){return t=>{const{index:n,type:i}=t;return(0,e.createElement)(a.Fill,{name:"PresetManagerControlSet-"+i+"-"+n},(0,e.createElement)(Ji,t))}}))}()}(); \ No newline at end of file diff --git a/build/block-visibility-setting-styles.asset.php b/build/block-visibility-setting-styles.asset.php deleted file mode 100644 index af83ead1..00000000 --- a/build/block-visibility-setting-styles.asset.php +++ /dev/null @@ -1 +0,0 @@ - array(), 'version' => '3c6b97c3bab7d707a4580698d4c59f23'); \ No newline at end of file diff --git a/build/block-visibility-setting-styles.css b/build/block-visibility-setting-styles.css index e7401777..423c16cf 100644 --- a/build/block-visibility-setting-styles.css +++ b/build/block-visibility-setting-styles.css @@ -1 +1 @@ -.information-popover{line-height:0}.information-popover .information-popover__button{color:#c8c8c8;height:24px;min-width:20px;padding:0}.information-popover .information-popover__button svg{width:22px}.information-popover .information-popover__button:hover{background-color:transparent!important;box-shadow:none!important;color:#414141}.information-popover .information-popover__button:focus{box-shadow:none!important}.information-popover__popover p{color:#32373c;font-size:13px;line-height:1.5;margin:0 0 1em}.information-popover__popover p:last-child{margin-bottom:0}.information-popover__popover .components-popover__content{font-size:13px;font-weight:400;line-height:1.4;max-width:250px;min-width:200px;padding:4px;text-align:left}#wpwrap{background:#f1f1f1}.notice{display:none}#block-visibility-settings-container{margin-left:-20px}@media(max-width:782px){#block-visibility-settings-container{margin-left:-10px}}#block-visibility-settings-container hr{border-top:1px solid #eee;margin:24px 0}#block-visibility-settings-container .notice{display:block;margin-top:15px}#block-visibility-settings-container .loading-settings{align-items:center;display:flex;justify-content:center;margin:35vh 30px;text-align:center}#block-visibility-settings-container .loading-settings .components-spinner{float:none}#block-visibility-settings-container .loading-settings .description{color:#777;margin-top:4px}#block-visibility-settings-container .masthead{background-color:#fff;padding:15px 20px}#block-visibility-settings-container .masthead .inner-container{display:flex;justify-content:space-between;margin:0 auto;max-width:1024px}@media(max-width:426px){#block-visibility-settings-container .masthead .inner-container{flex-direction:column;margin:5px auto}}#block-visibility-settings-container .masthead .masthead__branding h1{align-items:center;color:#222;display:flex;font-size:20px;font-weight:400;margin:0}@media(max-width:426px){#block-visibility-settings-container .masthead .masthead__branding h1{justify-content:center}}#block-visibility-settings-container .masthead .masthead__branding svg{fill:#222;height:40px;margin-right:10px;width:40px}#block-visibility-settings-container .masthead .masthead__branding .pro-badge{background:var(--wp-admin-theme-color);border-radius:4px;color:#fff;font-size:8px;font-weight:800;height:8px;letter-spacing:1px;line-height:1;margin-left:10px;padding:4px 6px;text-transform:uppercase}@media(max-width:426px){#block-visibility-settings-container .masthead .masthead__branding{text-align:center}}#block-visibility-settings-container .masthead .masthead__plugin-links{align-items:center;display:flex;font-size:15px;justify-content:flex-end}#block-visibility-settings-container .masthead .masthead__plugin-links a{color:#23282d;cursor:pointer;display:inline-block;margin-left:16px;text-decoration:none}#block-visibility-settings-container .masthead .masthead__plugin-links a svg{fill:currentColor;margin:0 6px 4px 0;vertical-align:middle;width:20px}#block-visibility-settings-container .masthead .masthead__plugin-links a:hover{color:#007cba;color:var(--wp-admin-theme-color)}#block-visibility-settings-container .masthead .masthead__plugin-links a:hover svg{fill:#007cba;fill:var(--wp-admin-theme-color)}@media(max-width:782px){#block-visibility-settings-container .masthead .masthead__plugin-links a{margin:0 8px 0 0}#block-visibility-settings-container .masthead .masthead__plugin-links a span{display:none}#block-visibility-settings-container .masthead .masthead__plugin-links a svg{margin:0 2px;width:24px}}@media(max-width:426px){#block-visibility-settings-container .masthead .masthead__plugin-links{justify-content:center;margin-top:10px;width:100%}#block-visibility-settings-container .masthead .masthead__plugin-links a{margin:0 8px}}#block-visibility-settings-container .masthead .masthead__notice a{color:#0073aa;display:inline;margin:0}#block-visibility-settings-container .masthead .masthead__notice a:hover{color:#00a0d2}#block-visibility-settings-container .footer{box-shadow:0 0 0 1px #ccd0d4,0 1px 1px 1px rgba(0,0,0,.04);padding:10px 30px;text-align:center}#block-visibility-settings-container .footer .inner-container{margin:0 auto;max-width:1024px}@media(max-width:1024px){#block-visibility-settings-container .footer .inner-container{display:block}}#block-visibility-settings-container .footer a{color:#555d66;display:inline-block;margin:5px 8px;text-decoration:none}#block-visibility-settings-container .footer a:hover{color:#007cba;color:var(--wp-admin-theme-color)}#block-visibility-settings-container .setting-tabs .message{color:#777;display:flex}#block-visibility-settings-container .setting-tabs .message svg{fill:#777;height:20px;margin:0 6px;vertical-align:middle;width:20px}#block-visibility-settings-container .setting-tabs .components-tab-panel__tabs{box-shadow:0 0 0 1px #ccd0d4,0 1px 1px 1px rgba(0,0,0,.04);justify-content:center;padding-bottom:0}#block-visibility-settings-container .setting-tabs .components-tab-panel__tabs .components-tab-panel__tabs-item{font-size:15px}#block-visibility-settings-container .setting-tabs .components-tab-panel__tabs .active-tab,#block-visibility-settings-container .setting-tabs .components-tab-panel__tabs .components-tab-panel__tabs-item:focus:not(:disabled){box-shadow:inset 0 -2px #007cba;box-shadow:inset 0 -2px var(--wp-admin-theme-color)}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content{display:flex;flex-direction:row-reverse;justify-content:center;margin:0 auto;max-width:1024px;padding:40px 20px}@media(max-width:782px){#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content{flex-direction:column-reverse}}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .inner-container{margin:0 auto 40px;max-width:1024px;width:100%}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .inner-container.narrow{max-width:840px}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container{box-sizing:border-box;margin-left:40px;max-width:240px}@media(max-width:782px){#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container{margin-left:0;max-width:100%}}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container>div{background:#fff;box-shadow:0 0 0 1px #ccd0d4,0 1px 1px 1px rgba(0,0,0,.04);margin-bottom:20px;padding:18px 24px}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container>div>:last-child{margin-bottom:0}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container ul{margin-bottom:20px}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container li,#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container p{font-size:.9em}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container li{font-weight:600;padding-left:22px;position:relative}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container li:before{background-color:var(--wp-admin-theme-color);bottom:0;content:"";left:0;mask-image:url("data:image/svg+xml;utf8,");-webkit-mask-image:url("data:image/svg+xml;utf8,");mask-position:left;-webkit-mask-position:left;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-size:16px;-webkit-mask-size:16px;position:absolute;right:0;top:0;z-index:0}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container a:hover{opacity:.8}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container .ads-container__header{display:inline-block;font-size:15px;font-weight:500}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container .ads-container__support{position:relative}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container .ads-container__support:before{background-color:#f1f1f1;bottom:0;content:"";left:0;mask-image:url("data:image/svg+xml;utf8,");-webkit-mask-image:url("data:image/svg+xml;utf8,");mask-position:140px;-webkit-mask-position:140px;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-size:200px;-webkit-mask-size:200px;position:absolute;right:0;top:0;z-index:0}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container .ads-container__support>*{position:relative;z-index:1}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container .ads-container__support a{display:block;font-size:1.1em;margin-top:10px}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container .ads-container__reviews{background-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color-darker-20),0 1px 1px 1px rgba(0,0,0,.04);color:#fff;position:relative}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container .ads-container__reviews:before{background-color:var(--wp-admin-theme-color-darker-20);bottom:0;content:"";left:0;mask-image:url("data:image/svg+xml;utf8,");-webkit-mask-image:url("data:image/svg+xml;utf8,");mask-position:-100px;-webkit-mask-position:-100px;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-size:200px;-webkit-mask-size:200px;position:absolute;right:0;top:0;z-index:0}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container .ads-container__reviews>*{position:relative;z-index:1}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container .ads-container__reviews a{color:#fff;display:block;font-size:1.1em;margin-top:10px}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container .components-external-link__icon{margin:0 .2em;width:1.2em}#block-visibility-settings-container .setting-tabs .setting-tabs__tab-description h2{font-size:30px;font-weight:400;margin:0 0 20px}#block-visibility-settings-container .setting-tabs .setting-tabs__tab-description p{color:#32373c;font-size:15px;line-height:1.4;margin:0}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin-bottom:20px;min-height:36px}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls.integrations{margin-top:50px}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__title{align-items:center;display:flex;font-size:18px;font-weight:500}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__title .information-popover__button{color:#999;margin-left:6px}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__save-settings{align-items:center;display:flex}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__save-settings .message{margin-right:24px}@media(max-width:782px){#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__save-settings .message{display:none}}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__save-settings .message.update-failed{color:#b52727}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__save-settings .save-settings__save-button.is-busy{background-image:linear-gradient(-45deg,#1989c1 28%,color(#1989c1 shade(20%)) 0,color(#1989c1 shade(20%)) 72%,#1989c1 0);background-size:100px 100%;border-color:color(#1989c1);color:#fff}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__save-settings .reset-settings__save-button{margin-right:12px}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__search-blocks{width:250px}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__search-blocks div{margin:0}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__search-blocks input{border:1px solid #ccd0d4;padding:9px 12px}@media(max-width:426px){#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__search-blocks{margin-bottom:15px;width:100%}}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel{font-size:15px;margin-bottom:20px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__header{align-items:center;background:#fff;box-shadow:0 0 0 1px #ccd0d4,0 1px 1px 1px rgba(0,0,0,.04);display:flex;justify-content:space-between;margin-bottom:1px;padding:16px 16px 16px 24px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__header .settings-panel__header-title{align-items:center;display:flex;font-weight:500}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__header .settings-panel__header-title>svg{margin-right:10px;width:18px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container{background:#fff;box-shadow:0 0 0 1px #ccd0d4,0 1px 1px 1px rgba(0,0,0,.04);padding:24px 16px 24px 24px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__toggle{margin-bottom:18px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__toggle.has-info-popover{align-items:center;display:flex;justify-content:space-between}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__toggle.first{margin-top:24px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__toggle:last-child{margin-bottom:0}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__toggle .components-toggle-control .components-base-control__field{margin:4px 0}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__toggle label{margin-bottom:0}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__select{margin-bottom:18px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__select:last-child{margin-bottom:0}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__select.has-info-popover{align-items:center;display:flex;justify-content:space-between}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__select .block-visibility__react-select{margin-top:12px;width:100%}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color{align-items:flex-start;display:flex;justify-content:space-between}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .settings-type__color-selected .components-base-control__field{align-items:center;display:flex;margin-bottom:20px;margin-top:5px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .components-base-control__label{margin-bottom:2px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .component-color-indicator{margin-left:.5rem}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .components-circular-option-picker{align-items:center;display:flex}@media(max-width:782px){#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .components-circular-option-picker{display:block}}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .components-circular-option-picker__custom-clear-wrapper{justify-content:flex-start;margin:10px 0 10px 20px}@media(max-width:782px){#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .components-circular-option-picker__custom-clear-wrapper{margin:10px 0}}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .components-circular-option-picker__option:focus:after{left:-4px;top:-4px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .components-button.is-pressed:focus:not(:disabled){box-shadow:none;outline:none}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .components-circular-option-picker__option-wrapper button>span{position:absolute}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .components-circular-option-picker__option-wrapper button>span *{font-size:10px!important;position:absolute}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__range{max-width:410px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .subsetting{margin-left:20px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container label{font-size:14px;margin-bottom:8px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-label{align-items:center;display:flex;font-size:14px;font-weight:500;margin-bottom:15px;margin-top:30px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-label:first-child{margin-top:0}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-panel__help{color:#757575;font-size:12px;font-style:normal}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .components-disabled{opacity:.4}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .components-disabled .components-form-toggle{opacity:1}#block-visibility-settings-container .breakpoint-control-container{display:flex;justify-content:space-between}#block-visibility-settings-container .breakpoint-control-container .settings-label{justify-content:space-between}@media(max-width:782px){#block-visibility-settings-container .breakpoint-control-container{display:block}}#block-visibility-settings-container .breakpoint-css-preview{margin:10px 8px 30px 0}#block-visibility-settings-container .breakpoint-css-preview pre{border:1px solid #ccd0d4;color:#555;font-size:.9em;margin-top:20px;padding:20px}#block-visibility-settings-container .breakpoints-container{margin-right:10%;max-width:100%}#block-visibility-settings-container .breakpoints-container .breakpoint{margin-bottom:18px}#block-visibility-settings-container .breakpoints-container .breakpoint .settings-panel__help{margin-top:8px}@media(max-width:782px){#block-visibility-settings-container .breakpoints-container{margin-bottom:30px;margin-right:0}}#block-visibility-settings-container .controls-container{width:60%}#block-visibility-settings-container .controls-container .components-base-control{margin-bottom:18px}#block-visibility-settings-container .controls-container .components-base-control label{margin-bottom:0!important}#block-visibility-settings-container .controls-container .components-base-control .components-base-control__help{margin-top:-4px}@media(max-width:782px){#block-visibility-settings-container .controls-container{margin-bottom:30px;width:100%}}#block-visibility-settings-container .is_pro .setting-tabs__block-manager .block-manager__category-container{-ms-grid-columns:(1fr)[3];grid-template-columns:repeat(3,1fr)}#block-visibility-settings-container .is_pro div.setting-tabs__visibility-controls{-ms-grid-columns:1fr 1fr;display:-ms-grid;display:grid;gap:32px;grid-template-columns:1fr 1fr}@media(max-width:782px){#block-visibility-settings-container .is_pro div.setting-tabs__visibility-controls{-ms-grid-columns:1fr;grid-template-columns:1fr}}#block-visibility-settings-container .is_pro div.setting-tabs__visibility-controls .setting-tabs__setting-controls,#block-visibility-settings-container .is_pro div.setting-tabs__visibility-controls .two-columns{-ms-grid-column-span:2;-ms-grid-column:1;grid-column:1/span 2;margin-bottom:0}@media(max-width:782px){#block-visibility-settings-container .is_pro div.setting-tabs__visibility-controls .setting-tabs__setting-controls,#block-visibility-settings-container .is_pro div.setting-tabs__visibility-controls .two-columns{-ms-grid-column:1;grid-column:1}}#block-visibility-settings-container .is_pro div.setting-tabs__visibility-controls .setting-tabs__settings-panel{margin-bottom:0}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__category-container{-ms-grid-columns:(1fr)[2];-moz-column-gap:20px;column-gap:20px;display:-ms-grid;display:grid;grid-template-columns:repeat(2,1fr);row-gap:20px}@media(max-width:1024px){#block-visibility-settings-container .setting-tabs__block-manager .block-manager__category-container{-ms-grid-columns:(1fr)[2];grid-template-columns:repeat(2,1fr)}}@media(max-width:782px){#block-visibility-settings-container .setting-tabs__block-manager .block-manager__category-container{-ms-grid-columns:(1fr)[1];grid-template-columns:repeat(1,1fr)}}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category{background:#fff;box-shadow:0 0 0 1px #ccd0d4,0 1px 1px 1px rgba(0,0,0,.04);box-sizing:border-box;padding:16px}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .components-base-control{flex:1}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .components-base-control .components-base-control__field{margin:0}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .block-category__title{border-bottom:1px solid #ccd0d4;font-size:14px;font-weight:700;letter-spacing:.25px;padding:4px 10px 16px 0}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .block-category__title .components-base-control__field{align-items:center;display:flex;justify-content:space-between}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .block-category__title .components-base-control__field label{flex:1}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .block-category__title .components-base-control__field label>span{align-items:center;display:flex;justify-content:space-between}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .block-category__blocks-list{margin:0}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .blocks-category__block{border-bottom:1px solid #ccd0d4;margin:0;padding:12px 12px 12px 30px}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .blocks-category__block:last-child{border-bottom:none}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .blocks-category__block .block-editor-block-icon{height:22px;width:22px}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .blocks-category__block .components-base-control__field{align-items:center;display:flex;justify-content:space-between}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .blocks-category__block .components-base-control__field label{flex:1}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .blocks-category__block .components-base-control__field label>span{align-items:center;display:flex;justify-content:space-between}#block-visibility-settings-container .block-visibility__react-select{margin:10px 0}#block-visibility-settings-container .block-visibility__react-select .react-select__control{border:1px solid #757575;border-radius:2px;min-height:20px}#block-visibility-settings-container .block-visibility__react-select .react-select__control:hover{border:1px solid #757575}#block-visibility-settings-container .block-visibility__react-select .react-select__control.react-select__control--is-focused,#block-visibility-settings-container .block-visibility__react-select .react-select__control:focus{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px #007cba;box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}#block-visibility-settings-container .block-visibility__react-select .react-select__value-container{padding:2px 4px}#block-visibility-settings-container .block-visibility__react-select .react-select__value-container .react-select__placeholder{margin-left:5px;margin-right:5px}#block-visibility-settings-container .block-visibility__react-select .react-select__value-container div:last-child{margin:0 2px;padding-bottom:0;padding-top:0}#block-visibility-settings-container .block-visibility__react-select .react-select__multi-value{background-color:#ddd}#block-visibility-settings-container .block-visibility__react-select .react-select__multi-value .react-select__multi-value__label{font-size:95%}#block-visibility-settings-container .block-visibility__react-select .react-select__input input{min-height:auto}#block-visibility-settings-container .block-visibility__react-select .react-select__input input:focus{box-shadow:none}#block-visibility-settings-container .block-visibility__react-select .react-select__clear-indicator:hover,#block-visibility-settings-container .block-visibility__react-select .react-select__dropdown-indicator:hover{color:#007cba;color:var(--wp-admin-theme-color);cursor:pointer}#block-visibility-settings-container .block-visibility__react-select .react-select__multi-value__remove,#block-visibility-settings-container .block-visibility__react-select .react-select__option{cursor:pointer}#block-visibility-settings-container .block-visibility__react-select .react-select__option--is-focused{background:#fff;color:#007cba;color:var(--wp-admin-theme-color)}.block-visibility__reset-modal .block-visibility__reset-modal--buttons{display:flex;justify-content:space-between}.block-visibility__reset-modal .block-visibility__reset-modal--buttons div{align-items:center;display:flex}.block-visibility__reset-modal .block-visibility__reset-modal--buttons .components-spinner{margin-top:0}.block-visibility__reset-modal .update-failed{color:#b52727;margin-top:12px} +.information-popover{line-height:0}.information-popover .information-popover__button{color:#c8c8c8;height:24px;min-width:20px;padding:0}.information-popover .information-popover__button svg{width:22px}.information-popover .information-popover__button:hover{background-color:transparent!important;box-shadow:none!important;color:#414141}.information-popover .information-popover__button:focus{box-shadow:none!important}.information-popover__popover p{color:#32373c;font-size:13px;line-height:1.5;margin:0 0 1em}.information-popover__popover p:last-child{margin-bottom:0}.information-popover__popover .components-popover__content{font-size:13px;font-weight:400;line-height:1.4;max-width:250px;min-width:200px;padding:4px;text-align:left}#wpwrap{background:#f1f1f1}.notice{display:none}#block-visibility-settings-container{margin-left:-20px}@media(max-width:782px){#block-visibility-settings-container{margin-left:-10px}}#block-visibility-settings-container hr{border-top:1px solid #eee;margin:24px 0}#block-visibility-settings-container .notice{display:block;margin-top:15px}#block-visibility-settings-container .loading-settings{align-items:center;display:flex;justify-content:center;margin:35vh 30px;text-align:center}#block-visibility-settings-container .loading-settings .components-spinner{float:none}#block-visibility-settings-container .loading-settings .description{color:#777;margin-top:4px}#block-visibility-settings-container .masthead{background-color:#fff;padding:15px 20px}#block-visibility-settings-container .masthead .inner-container{display:flex;justify-content:space-between;margin:0 auto;max-width:1024px}@media(max-width:426px){#block-visibility-settings-container .masthead .inner-container{flex-direction:column;margin:5px auto}}#block-visibility-settings-container .masthead .masthead__branding h1{align-items:center;color:#222;display:flex;font-size:20px;font-weight:400;margin:0}@media(max-width:426px){#block-visibility-settings-container .masthead .masthead__branding h1{justify-content:center}}#block-visibility-settings-container .masthead .masthead__branding svg{fill:#222;height:40px;margin-right:10px;width:40px}#block-visibility-settings-container .masthead .masthead__branding .pro-badge{background:var(--wp-admin-theme-color);border-radius:4px;color:#fff;font-size:8px;font-weight:800;height:8px;letter-spacing:1px;line-height:1;margin-left:10px;padding:4px 6px;text-transform:uppercase}@media(max-width:426px){#block-visibility-settings-container .masthead .masthead__branding{text-align:center}}#block-visibility-settings-container .masthead .masthead__plugin-links{align-items:center;display:flex;font-size:15px;justify-content:flex-end}#block-visibility-settings-container .masthead .masthead__plugin-links a{color:#23282d;cursor:pointer;display:inline-block;margin-left:16px;text-decoration:none}#block-visibility-settings-container .masthead .masthead__plugin-links a svg{fill:currentColor;margin:0 6px 4px 0;vertical-align:middle;width:20px}#block-visibility-settings-container .masthead .masthead__plugin-links a:hover{color:#007cba;color:var(--wp-admin-theme-color)}#block-visibility-settings-container .masthead .masthead__plugin-links a:hover svg{fill:#007cba;fill:var(--wp-admin-theme-color)}@media(max-width:782px){#block-visibility-settings-container .masthead .masthead__plugin-links a{margin:0 8px 0 0}#block-visibility-settings-container .masthead .masthead__plugin-links a span{display:none}#block-visibility-settings-container .masthead .masthead__plugin-links a svg{margin:0 2px;width:24px}}@media(max-width:426px){#block-visibility-settings-container .masthead .masthead__plugin-links{justify-content:center;margin-top:10px;width:100%}#block-visibility-settings-container .masthead .masthead__plugin-links a{margin:0 8px}}#block-visibility-settings-container .masthead .masthead__notice a{color:#0073aa;display:inline;margin:0}#block-visibility-settings-container .masthead .masthead__notice a:hover{color:#00a0d2}#block-visibility-settings-container .footer{box-shadow:0 0 0 1px #ccd0d4,0 1px 1px 1px rgba(0,0,0,.04);padding:10px 30px;text-align:center}#block-visibility-settings-container .footer .inner-container{margin:0 auto;max-width:1024px}@media(max-width:1024px){#block-visibility-settings-container .footer .inner-container{display:block}}#block-visibility-settings-container .footer a{color:#555d66;display:inline-block;margin:5px 8px;text-decoration:none}#block-visibility-settings-container .footer a:hover{color:#007cba;color:var(--wp-admin-theme-color)}#block-visibility-settings-container .setting-tabs .message{color:#777;display:flex}#block-visibility-settings-container .setting-tabs .message svg{fill:#777;height:20px;margin:0 6px;vertical-align:middle;width:20px}#block-visibility-settings-container .setting-tabs .components-tab-panel__tabs{box-shadow:0 0 0 1px #ccd0d4,0 1px 1px 1px rgba(0,0,0,.04);justify-content:center;padding-bottom:0}#block-visibility-settings-container .setting-tabs .components-tab-panel__tabs .components-tab-panel__tabs-item{font-size:15px}#block-visibility-settings-container .setting-tabs .components-tab-panel__tabs .active-tab,#block-visibility-settings-container .setting-tabs .components-tab-panel__tabs .components-tab-panel__tabs-item:focus:not(:disabled){box-shadow:inset 0 -2px #007cba;box-shadow:inset 0 -2px var(--wp-admin-theme-color)}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content{display:flex;flex-direction:row-reverse;justify-content:center;margin:0 auto;max-width:1024px;padding:40px 20px}@media(max-width:782px){#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content{flex-direction:column-reverse}}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .inner-container{margin:0 auto 40px;max-width:1024px;width:100%}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .inner-container.narrow{max-width:840px}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container{box-sizing:border-box;margin-left:40px;max-width:240px}@media(max-width:782px){#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container{margin-left:0;max-width:100%}}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container>div{background:#fff;box-shadow:0 0 0 1px #ccd0d4,0 1px 1px 1px rgba(0,0,0,.04);margin-bottom:20px;padding:18px 24px}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container>div>:last-child{margin-bottom:0}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container ul{margin-bottom:20px}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container li,#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container p{font-size:.9em}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container li{font-weight:600;padding-left:22px;position:relative}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container li:before{background-color:var(--wp-admin-theme-color);bottom:0;content:"";left:0;mask-image:url("data:image/svg+xml;utf8,");-webkit-mask-image:url("data:image/svg+xml;utf8,");mask-position:left;-webkit-mask-position:left;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-size:16px;-webkit-mask-size:16px;position:absolute;right:0;top:0;z-index:0}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container a:hover{opacity:.8}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container .ads-container__header{display:inline-block;font-size:15px;font-weight:500}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container .ads-container__support{position:relative}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container .ads-container__support:before{background-color:#f1f1f1;bottom:0;content:"";left:0;mask-image:url("data:image/svg+xml;utf8,");-webkit-mask-image:url("data:image/svg+xml;utf8,");mask-position:140px;-webkit-mask-position:140px;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-size:200px;-webkit-mask-size:200px;position:absolute;right:0;top:0;z-index:0}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container .ads-container__support>*{position:relative;z-index:1}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container .ads-container__support a{display:block;font-size:1.1em;margin-top:10px}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container .ads-container__reviews{background-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color-darker-20),0 1px 1px 1px rgba(0,0,0,.04);color:#fff;position:relative}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container .ads-container__reviews:before{background-color:var(--wp-admin-theme-color-darker-20);bottom:0;content:"";left:0;mask-image:url("data:image/svg+xml;utf8,");-webkit-mask-image:url("data:image/svg+xml;utf8,");mask-position:-100px;-webkit-mask-position:-100px;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-size:200px;-webkit-mask-size:200px;position:absolute;right:0;top:0;z-index:0}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container .ads-container__reviews>*{position:relative;z-index:1}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container .ads-container__reviews a{color:#fff;display:block;font-size:1.1em;margin-top:10px}#block-visibility-settings-container .setting-tabs .components-tab-panel__tab-content .ads-container .components-external-link__icon{margin:0 .2em;width:1.2em}#block-visibility-settings-container .setting-tabs .setting-tabs__tab-description h2{font-size:30px;font-weight:400;margin:0 0 20px}#block-visibility-settings-container .setting-tabs .setting-tabs__tab-description p{color:#32373c;font-size:15px;line-height:1.4;margin:0}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin-bottom:20px;min-height:36px}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls.integrations{margin-top:50px}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__title{align-items:center;display:flex;font-size:18px;font-weight:500}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__title .information-popover__button{color:#999;margin-left:6px}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__save-settings{align-items:center;display:flex}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__save-settings .message{margin-right:24px}@media(max-width:782px){#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__save-settings .message{display:none}}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__save-settings .message.update-failed{color:#b52727}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__save-settings .save-settings__save-button.is-busy{background-image:linear-gradient(-45deg,#1989c1 28%,color(#1989c1 shade(20%)) 0,color(#1989c1 shade(20%)) 72%,#1989c1 0);background-size:100px 100%;border-color:color(#1989c1);color:#fff}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__save-settings .reset-settings__save-button{margin-right:12px}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__search-blocks{width:250px}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__search-blocks div{margin:0}#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__search-blocks input{border:1px solid #ccd0d4;padding:9px 12px}@media(max-width:426px){#block-visibility-settings-container .setting-tabs .setting-tabs__setting-controls .setting-controls__search-blocks{margin-bottom:15px;width:100%}}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel{font-size:15px;margin-bottom:20px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__header{align-items:center;background:#fff;box-shadow:0 0 0 1px #ccd0d4,0 1px 1px 1px rgba(0,0,0,.04);display:flex;justify-content:space-between;margin-bottom:1px;padding:16px 16px 16px 24px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__header .settings-panel__header-title{align-items:center;display:flex;font-weight:500}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__header .settings-panel__header-title>svg{margin-right:10px;width:18px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container{background:#fff;box-shadow:0 0 0 1px #ccd0d4,0 1px 1px 1px rgba(0,0,0,.04);padding:24px 16px 24px 24px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__toggle{margin-bottom:18px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__toggle.has-info-popover{align-items:center;display:flex;justify-content:space-between}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__toggle.first{margin-top:24px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__toggle:last-child{margin-bottom:0}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__toggle .components-toggle-control .components-base-control__field{margin:4px 0}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__toggle label{margin-bottom:0}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__select{margin-bottom:18px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__select:last-child{margin-bottom:0}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__select.has-info-popover{align-items:center;display:flex;justify-content:space-between}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__select .block-visibility__react-select{margin-top:12px;width:100%}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color{align-items:flex-start;display:flex;justify-content:space-between}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .settings-type__color-selected .components-base-control__field{align-items:center;display:flex;margin-bottom:20px;margin-top:5px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .components-base-control__label{margin-bottom:2px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .component-color-indicator{margin-left:.5rem}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .components-circular-option-picker{align-items:center;display:flex}@media(max-width:782px){#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .components-circular-option-picker{display:block}}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .components-circular-option-picker__custom-clear-wrapper{justify-content:flex-start;margin:10px 0 10px 20px}@media(max-width:782px){#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .components-circular-option-picker__custom-clear-wrapper{margin:10px 0}}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .components-circular-option-picker__option:focus:after{left:-4px;top:-4px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .components-button.is-pressed:focus:not(:disabled){box-shadow:none;outline:none}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .components-circular-option-picker__option-wrapper button>span{position:absolute}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__color .components-circular-option-picker__option-wrapper button>span *{font-size:10px!important;position:absolute}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-type__range{max-width:410px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .subsetting{margin-left:20px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container label{font-size:14px;margin-bottom:8px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-label{align-items:center;display:flex;font-size:14px;font-weight:500;margin-bottom:15px;margin-top:30px}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-label:first-child{margin-top:0}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .settings-panel__help{color:#757575;font-size:12px;font-style:normal}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .components-disabled{opacity:.4}#block-visibility-settings-container .setting-tabs .setting-tabs__settings-panel .settings-panel__container .components-disabled .components-form-toggle{opacity:1}#block-visibility-settings-container .breakpoint-control-container{display:flex;justify-content:space-between}#block-visibility-settings-container .breakpoint-control-container .settings-label{justify-content:space-between}@media(max-width:782px){#block-visibility-settings-container .breakpoint-control-container{display:block}}#block-visibility-settings-container .breakpoint-css-preview{margin:10px 8px 30px 0}#block-visibility-settings-container .breakpoint-css-preview pre{border:1px solid #ccd0d4;color:#555;font-size:.9em;margin-top:20px;padding:20px}#block-visibility-settings-container .breakpoints-container{margin-right:10%;max-width:100%}#block-visibility-settings-container .breakpoints-container .breakpoint{margin-bottom:18px}#block-visibility-settings-container .breakpoints-container .breakpoint .settings-panel__help{margin-top:8px}@media(max-width:782px){#block-visibility-settings-container .breakpoints-container{margin-bottom:30px;margin-right:0}}#block-visibility-settings-container .controls-container{width:60%}#block-visibility-settings-container .controls-container .components-base-control{margin-bottom:18px}#block-visibility-settings-container .controls-container .components-base-control label{margin-bottom:0!important}#block-visibility-settings-container .controls-container .components-base-control .components-base-control__help{margin-top:-4px}@media(max-width:782px){#block-visibility-settings-container .controls-container{margin-bottom:30px;width:100%}}#block-visibility-settings-container .is_pro .setting-tabs__block-manager .block-manager__category-container{grid-template-columns:repeat(3,1fr)}#block-visibility-settings-container .is_pro div.setting-tabs__visibility-controls{display:grid;gap:32px;grid-template-columns:1fr 1fr}@media(max-width:782px){#block-visibility-settings-container .is_pro div.setting-tabs__visibility-controls{grid-template-columns:1fr}}#block-visibility-settings-container .is_pro div.setting-tabs__visibility-controls .setting-tabs__setting-controls,#block-visibility-settings-container .is_pro div.setting-tabs__visibility-controls .two-columns{grid-column:1/span 2;margin-bottom:0}@media(max-width:782px){#block-visibility-settings-container .is_pro div.setting-tabs__visibility-controls .setting-tabs__setting-controls,#block-visibility-settings-container .is_pro div.setting-tabs__visibility-controls .two-columns{grid-column:1}}#block-visibility-settings-container .is_pro div.setting-tabs__visibility-controls .setting-tabs__settings-panel{margin-bottom:0}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__category-container{-moz-column-gap:20px;column-gap:20px;display:grid;grid-template-columns:repeat(2,1fr);row-gap:20px}@media(max-width:1024px){#block-visibility-settings-container .setting-tabs__block-manager .block-manager__category-container{grid-template-columns:repeat(2,1fr)}}@media(max-width:782px){#block-visibility-settings-container .setting-tabs__block-manager .block-manager__category-container{grid-template-columns:repeat(1,1fr)}}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category{background:#fff;box-shadow:0 0 0 1px #ccd0d4,0 1px 1px 1px rgba(0,0,0,.04);box-sizing:border-box;padding:16px}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .components-base-control{flex:1}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .components-base-control .components-base-control__field{margin:0}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .block-category__title{border-bottom:1px solid #ccd0d4;font-size:14px;font-weight:700;letter-spacing:.25px;padding:4px 10px 16px 0}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .block-category__title .components-base-control__field{align-items:center;display:flex;justify-content:space-between}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .block-category__title .components-base-control__field label{flex:1}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .block-category__title .components-base-control__field label>span{align-items:center;display:flex;justify-content:space-between}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .block-category__blocks-list{margin:0}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .blocks-category__block{border-bottom:1px solid #ccd0d4;margin:0;padding:12px 12px 12px 30px}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .blocks-category__block:last-child{border-bottom:none}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .blocks-category__block .block-editor-block-icon{height:22px;width:22px}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .blocks-category__block .components-base-control__field{align-items:center;display:flex;justify-content:space-between}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .blocks-category__block .components-base-control__field label{flex:1}#block-visibility-settings-container .setting-tabs__block-manager .block-manager__block-category .blocks-category__block .components-base-control__field label>span{align-items:center;display:flex;justify-content:space-between}#block-visibility-settings-container .block-visibility__react-select{margin:10px 0}#block-visibility-settings-container .block-visibility__react-select .react-select__control{border:1px solid #757575;border-radius:2px;min-height:20px}#block-visibility-settings-container .block-visibility__react-select .react-select__control:hover{border:1px solid #757575}#block-visibility-settings-container .block-visibility__react-select .react-select__control.react-select__control--is-focused,#block-visibility-settings-container .block-visibility__react-select .react-select__control:focus{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px #007cba;box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}#block-visibility-settings-container .block-visibility__react-select .react-select__value-container{padding:2px 4px}#block-visibility-settings-container .block-visibility__react-select .react-select__value-container .react-select__placeholder{margin-left:5px;margin-right:5px}#block-visibility-settings-container .block-visibility__react-select .react-select__value-container div:last-child{margin:0 2px;padding-bottom:0;padding-top:0}#block-visibility-settings-container .block-visibility__react-select .react-select__multi-value{background-color:#ddd}#block-visibility-settings-container .block-visibility__react-select .react-select__multi-value .react-select__multi-value__label{font-size:95%}#block-visibility-settings-container .block-visibility__react-select .react-select__input input{min-height:auto}#block-visibility-settings-container .block-visibility__react-select .react-select__input input:focus{box-shadow:none}#block-visibility-settings-container .block-visibility__react-select .react-select__clear-indicator:hover,#block-visibility-settings-container .block-visibility__react-select .react-select__dropdown-indicator:hover{color:#007cba;color:var(--wp-admin-theme-color);cursor:pointer}#block-visibility-settings-container .block-visibility__react-select .react-select__multi-value__remove,#block-visibility-settings-container .block-visibility__react-select .react-select__option{cursor:pointer}#block-visibility-settings-container .block-visibility__react-select .react-select__option--is-focused{background:#fff;color:#007cba;color:var(--wp-admin-theme-color)}.block-visibility__reset-modal .block-visibility__reset-modal--buttons{display:flex;justify-content:space-between}.block-visibility__reset-modal .block-visibility__reset-modal--buttons div{align-items:center;display:flex}.block-visibility__reset-modal .block-visibility__reset-modal--buttons .components-spinner{margin-top:0}.block-visibility__reset-modal .update-failed{color:#b52727;margin-top:12px} diff --git a/build/block-visibility-settings.asset.php b/build/block-visibility-settings.asset.php index 08fd170c..314e9888 100644 --- a/build/block-visibility-settings.asset.php +++ b/build/block-visibility-settings.asset.php @@ -1 +1 @@ - array('lodash', 'react', 'react-dom', 'wp-block-editor', 'wp-block-library', 'wp-components', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-primitives'), 'version' => 'f8f61f59f3166560028b5b7dd58915bc'); \ No newline at end of file + array('lodash', 'react', 'react-dom', 'wp-block-editor', 'wp-block-library', 'wp-components', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-primitives'), 'version' => 'dc254e7aceadbab3c337'); diff --git a/build/block-visibility-settings.js b/build/block-visibility-settings.js index 509da480..78016dda 100644 --- a/build/block-visibility-settings.js +++ b/build/block-visibility-settings.js @@ -1,10 +1,10 @@ -!function(){var e={184:function(e,t){var n;!function(){"use strict";var i={}.hasOwnProperty;function o(){for(var e=[],t=0;t{var n;const i=null!==(n=u[t].rel)&&void 0!==n?n:"noreferrer";return(0,e.createElement)("a",{key:t,href:u[t].url,className:"plugin-links__"+t,target:"_blank",rel:i},(0,e.createElement)(c,{icon:d[u[t].icon]}),(0,e.createElement)("span",null,u[t].title))}));return(0,e.createElement)("div",{className:"masthead"},(0,e.createElement)("div",{className:"inner-container"},(0,e.createElement)("div",{className:"masthead__branding"},(0,e.createElement)("h1",null,d.logo,(0,e.createElement)("span",null,(0,l.__)("Block Visibility","block-visibility")),r&&(0,e.createElement)("span",{className:"pro-badge"},"Pro"))),(0,e.createElement)("div",{className:"masthead__plugin-links"},p)))}function m(t){var n;const{variables:i}=t,o=null!==(n=null==i?void 0:i.plugin_variables)&&void 0!==n?n:[],r={plugin:{title:(0,l.__)("Block Visibility","block-visibility")+" "+o.version,url:"https://www.blockvisibilitywp.com/?utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",rel:"external"},docs:{title:(0,l.__)("Knowledge Base","block-visibility"),url:"https://www.blockvisibilitywp.com/knowledge-base/?bv_query=knowledge_base&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",rel:"external"},support:{title:(0,l.__)("Support","block-visibility"),url:o.support_url},repo:{title:(0,l.__)("GitHub","block-visibility"),url:"https://github.com/ndiego/block-visibility"},twitter:{title:(0,l.__)("Twitter","block-visibility"),url:"https://twitter.com/BlockVisibility"}};(0,s.applyFilters)("blockVisibility.FooterLinks",r);const a=Object.keys(r).map((t=>{var n;const i=null!==(n=r[t].rel)&&void 0!==n?n:"noreferrer";return(0,e.createElement)("a",{key:t,href:r[t].url,className:"footer-links__"+t,target:"_blank",rel:i},r[t].title)}));return(0,e.createElement)("div",{className:"footer"},(0,e.createElement)("div",{className:"inner-container"},a))}function b(){return b=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"save",n="";"reset"===e?(r("resetting"),n={reset:f}):"resetAll"===e?(r("resetting"),n={reset:"all"}):(r("saving"),n=(0,t.assign)({...p},{[f]:v}));const i=`${blockVisibilityRestUrl}block-visibility/v1/settings`,o=await fetch(i,{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json","X-WP-Nonce":wpApiSettings.nonce}});if(o.ok){const t=await o.json();m(t),"reset"===e||"resetAll"===e?(r("reset"),u(!1)):(r("saved"),g(!1))}else r("error")}return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"setting-controls__save-settings"},["saving"===i&&(0,e.createElement)(a.Animate,{type:"loading"},(t=>{let{className:n}=t;return(0,e.createElement)("span",{className:o()("message",n)},(0,e.createElement)(c,{icon:d.cloud}),(0,l.__)("Saving","block-visibility"))})),"error"===i&&(0,e.createElement)("span",{className:"message update-failed"},(0,l.__)("Update failed. Try again or contact support.","block-visibility"))],"saving"!==i&&(0,e.createElement)(a.Button,{className:"reset-settings__save-button",onClick:()=>u(!0),isTertiary:!0},(0,l.__)("Reset Settings","block-visibility")),(0,e.createElement)(a.Button,{className:o()("save-settings__save-button",{"is-busy":"saving"===i}),onClick:()=>y(),disabled:!b&&"error"!==i,isPrimary:!0},h)),s&&(0,e.createElement)(a.Modal,{className:"block-visibility__reset-modal",title:(0,l.__)("Reset Settings","block-visibility"),onRequestClose:()=>u(!1)},(0,e.createElement)("p",null,(0,l.__)("Resetting will restore all configured settings on the current tab to their default values. To restore all plugin settings, choose Reset All.","block-visibility")),(0,e.createElement)("div",{className:"block-visibility__reset-modal--buttons"},(0,e.createElement)("div",{className:"block-visibility__reset-modal--buttons-reset"},(0,e.createElement)(a.Button,{isPrimary:!0,onClick:()=>y("reset")},(0,l.__)("Reset","block-visibility")),(0,e.createElement)(a.Button,{isSecondary:!0,onClick:()=>y("resetAll")},(0,l.__)("Reset All","block-visibility")),"resetting"===i&&(0,e.createElement)(a.Spinner,null)),(0,e.createElement)(a.Button,{isTertiary:!0,onClick:()=>u(!1)},(0,l.__)("Cancel","block-visibility"))),"error"===i&&(0,e.createElement)("div",{className:"message update-failed"},(0,l.__)("Reset failed. Try again or contact support.","block-visibility"))))}var f=window.wp.primitives,v=(0,e.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(f.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));function h(t){const{message:n,subMessage:i,link:o,position:r}=t,s=null!=r?r:"middle left";return(0,e.createElement)("div",{className:"information-popover"},(0,e.createElement)(a.DropdownMenu,{label:(0,l.__)("More Information","block-visibility"),icon:v,toggleProps:{className:"information-popover__button"},popoverProps:{className:"information-popover__popover",focusOnMount:"container",position:s,noArrow:!1}},(()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",null,n),i&&(0,e.createElement)("p",null,i),o&&(0,e.createElement)(a.ExternalLink,{href:o},(0,l.__)("Learn More","block-visibility"))))))}var y=window.React,_=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?O(B,--F):0,T--,10===R&&(T=1,N--),R}function H(){return R=F2||G(R)>3?"":" "}function K(e,t){for(;--t&&H()&&!(R<48||R>102||R>57&&R<65||R>70&&R<97););return j(e,U()+(t<6&&32==$()&&32==H()))}function X(e){for(;H();)switch(R){case e:return F;case 34:case 39:34!==e&&39!==e&&X(R);break;case 40:41===e&&X(e);break;case 92:H()}return F}function Q(e,t){for(;H()&&e+R!==57&&(e+R!==84||47!==$()););return"/*"+j(t,F-1)+"*"+k(47===e?e:H())}function J(e){for(;!G($());)H();return j(e,F)}var ee="-ms-",te="-moz-",ne="-webkit-",ie="comm",oe="rule",le="decl",re="@keyframes";function ae(e,t){for(var n="",i=V(e),o=0;o6)switch(O(e,t+1)){case 109:if(45!==O(e,t+4))break;case 102:return S(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+te+(108==O(e,t+3)?"$3":"$2-$3"))+e;case 115:return~x(e,"stretch")?ce(S(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==O(e,t+1))break;case 6444:switch(O(e,M(e)-3-(~x(e,"!important")&&10))){case 107:return S(e,":",":"+ne)+e;case 101:return S(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ne+(45===O(e,14)?"inline-":"")+"box$3$1"+ne+"$2$3$1"+ee+"$2box$3")+e}break;case 5936:switch(O(e,t+11)){case 114:return ne+e+ee+S(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ne+e+ee+S(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ne+e+ee+S(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ne+e+ee+e+e}return e}function ue(e){return q(de("",null,null,null,[""],e=Z(e),0,[0],e))}function de(e,t,n,i,o,l,r,a,s){for(var c=0,u=0,d=r,p=0,m=0,b=0,g=1,f=1,v=1,h=0,y="",_=o,w=l,E=i,C=y;f;)switch(b=h,h=H()){case 40:if(108!=b&&58==C.charCodeAt(d-1)){-1!=x(C+=S(W(h),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:C+=W(h);break;case 9:case 10:case 13:case 32:C+=Y(b);break;case 92:C+=K(U()-1,7);continue;case 47:switch($()){case 42:case 47:P(me(Q(H(),U()),t,n),s);break;default:C+="/"}break;case 123*g:a[c++]=M(C)*v;case 125*g:case 59:case 0:switch(h){case 0:case 125:f=0;case 59+u:m>0&&M(C)-d&&P(m>32?be(C+";",i,n,d-1):be(S(C," ","")+";",i,n,d-2),s);break;case 59:C+=";";default:if(P(E=pe(C,t,n,c,u,o,a,y,_=[],w=[],d),l),123===h)if(0===u)de(C,t,E,E,_,l,d,a,w);else switch(p){case 100:case 109:case 115:de(e,E,E,i&&P(pe(e,E,E,0,0,o,a,y,o,_=[],d),w),o,w,d,a,i?_:w);break;default:de(C,E,E,E,[""],w,0,a,w)}}c=u=m=0,g=v=1,y=C="",d=r;break;case 58:d=1+M(C),m=b;default:if(g<1)if(123==h)--g;else if(125==h&&0==g++&&125==z())continue;switch(C+=k(h),h*g){case 38:v=u>0?1:(C+="\f",-1);break;case 44:a[c++]=(M(C)-1)*v,v=1;break;case 64:45===$()&&(C+=W(H())),p=$(),u=d=M(y=C+=J(U())),h++;break;case 45:45===b&&2==M(C)&&(g=0)}}return l}function pe(e,t,n,i,o,l,r,a,s,c,u){for(var d=o-1,p=0===o?l:[""],m=V(p),b=0,g=0,f=0;b0?p[v]+" "+h:S(h,/&\f/g,p[v])))&&(s[f++]=y);return D(e,t,n,0===o?oe:a,s,c,u)}function me(e,t,n){return D(e,t,n,ie,k(R),L(e,2,-2),0)}function be(e,t,n,i){return D(e,t,n,le,L(e,0,i),L(e,i+1,-1),i)}var ge=function(e,t,n){for(var i=0,o=0;i=o,o=$(),38===i&&12===o&&(t[n]=1),!G(o);)H();return j(e,F)},fe=new WeakMap,ve=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,i=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||fe.get(n))&&!i){fe.set(e,!0);for(var o=[],l=function(e,t){return q(function(e,t){var n=-1,i=44;do{switch(G(i)){case 0:38===i&&12===$()&&(t[n]=1),e[n]+=ge(F-1,t,n);break;case 2:e[n]+=W(i);break;case 4:if(44===i){e[++n]=58===$()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=k(i)}}while(i=H());return e}(Z(e),t))}(t,o),r=n.props,a=0,s=0;a-1&&!e.return)switch(e.type){case le:e.return=ce(e.value,e.length);break;case re:return ae([A(e,{value:S(e.value,"@","@"+ne)})],i);case oe:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return ae([A(e,{props:[S(t,/:(read-\w+)/,":-moz-$1")]})],i);case"::placeholder":return ae([A(e,{props:[S(t,/:(plac\w+)/,":-webkit-input-$1")]}),A(e,{props:[S(t,/:(plac\w+)/,":-moz-$1")]}),A(e,{props:[S(t,/:(plac\w+)/,ee+"input-$1")]})],i)}return""}))}}],_e=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i,o,l=e.stylisPlugins||ye,r={},a=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++i,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(i+2))<<16;case 2:n^=(255&e.charCodeAt(i+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(i)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},Ce={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Se=/[A-Z]|^ms/g,xe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Oe=function(e){return 45===e.charCodeAt(1)},Le=function(e){return null!=e&&"boolean"!=typeof e},Me=function(e){var t=Object.create(null);return function(e){return void 0===t[e]&&(t[e]=Oe(n=e)?n:n.replace(Se,"-$&").toLowerCase()),t[e];var n}}(),Ve=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(xe,(function(e,t,n){return Ne={name:t,styles:n,next:Ne},t}))}return 1===Ce[e]||Oe(e)||"number"!=typeof t||0===t?t:t+"px"};function Pe(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Ne={name:n.name,styles:n.styles,next:Ne},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)Ne={name:i.name,styles:i.styles,next:Ne},i=i.next;return n.styles+";"}return function(e,t,n){var i="";if(Array.isArray(n))for(var o=0;o=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ke(e){return Ke="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},Ke(e)}function Xe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qe(e,t){for(var n=0;n-1}function vt(e){return ft(e)?window.pageYOffset:e.scrollTop}function ht(e,t){ft(e)?window.scrollTo(0,t):e.scrollTop=t}function yt(e,t,n,i){return n*((e=e/i-1)*e*e+1)+t}function _t(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:dt,o=vt(e),l=t-o,r=10,a=0;function s(){var t=yt(a+=r,o,l,n);ht(e,t),a=m)return{placement:"bottom",maxHeight:t};if(E>=m&&!r)return l&&_t(s,C,x),{placement:"bottom",maxHeight:t};if(!r&&E>=i||r&&w>=i)return l&&_t(s,C,x),{placement:"bottom",maxHeight:r?w-h:E-h};if("auto"===o||r){var O=t,L=r?_:k;return L>=i&&(O=Math.min(L-h-a.controlHeight,t)),{placement:"top",maxHeight:O}}if("bottom"===o)return l&&ht(s,C),{placement:"bottom",maxHeight:t};break;case"top":if(_>=m)return{placement:"top",maxHeight:t};if(k>=m&&!r)return l&&_t(s,S,x),{placement:"top",maxHeight:t};if(!r&&k>=i||r&&_>=i){var M=t;return(!r&&k>=i||r&&_>=i)&&(M=r?_-y:k-y),l&&_t(s,S,x),{placement:"top",maxHeight:M}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}var Mt=function(e){return"auto"===e?"bottom":e},Vt=(0,y.createContext)({getPortalPlacement:null}),Pt=function(e){tt(n,e);var t=ct(n);function n(){var e;Xe(this,n);for(var i=arguments.length,o=new Array(i),l=0;le.length)&&(t=e.length);for(var n=0,i=new Array(t);n1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(i,l?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,i=e.options,o=e.label,l=void 0===o?"":o,r=e.selectValue,a=e.isDisabled,s=e.isSelected,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&r)return"value ".concat(l," focused, ").concat(c(r,n),".");if("menu"===t){var u=a?" disabled":"",d="".concat(s?"selected":"focused").concat(u);return"option ".concat(l," ").concat(d,", ").concat(c(i,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},fn=function(e){var t=e.ariaSelection,n=e.focusedOption,i=e.focusedValue,o=e.focusableOptions,l=e.isFocused,r=e.selectValue,a=e.selectProps,s=e.id,c=a.ariaLiveMessages,u=a.getOptionLabel,d=a.inputValue,p=a.isMulti,m=a.isOptionDisabled,b=a.isSearchable,g=a.menuIsOpen,f=a.options,v=a.screenReaderStatus,h=a.tabSelectsValue,_=a["aria-label"],w=a["aria-live"],k=(0,y.useMemo)((function(){return rt(rt({},gn),c||{})}),[c]),E=(0,y.useMemo)((function(){var e,n="";if(t&&k.onChange){var i=t.option,o=t.options,l=t.removedValue,a=t.removedValues,s=t.value,c=l||i||(e=s,Array.isArray(e)?null:e),d=c?u(c):"",p=o||a||void 0,b=p?p.map(u):[],g=rt({isDisabled:c&&m(c,r),label:d,labels:b},t);n=k.onChange(g)}return n}),[t,k,m,r,u]),C=(0,y.useMemo)((function(){var e="",t=n||i,o=!!(n&&r&&r.includes(n));if(t&&k.onFocus){var l={focused:t,label:u(t),isDisabled:m(t,r),isSelected:o,options:f,context:t===n?"menu":"value",selectValue:r};e=k.onFocus(l)}return e}),[n,i,u,m,k,f,r]),S=(0,y.useMemo)((function(){var e="";if(g&&f.length&&k.onFilter){var t=v({count:o.length});e=k.onFilter({inputValue:d,resultsMessage:t})}return e}),[o,d,g,k,f,v]),x=(0,y.useMemo)((function(){var e="";if(k.guidance){var t=i?"value":g?"menu":"input";e=k.guidance({"aria-label":_,context:t,isDisabled:n&&m(n,r),isMulti:p,isSearchable:b,tabSelectsValue:h})}return e}),[_,n,i,p,m,b,g,k,r,h]),O="".concat(C," ").concat(S," ").concat(x),L=Ue(y.Fragment,null,Ue("span",{id:"aria-selection"},E),Ue("span",{id:"aria-context"},O)),M="initial-input-focus"===(null==t?void 0:t.action);return Ue(y.Fragment,null,Ue(bn,{id:s},M&&L),Ue(bn,{"aria-live":w,"aria-atomic":"false","aria-relevant":"additions text"},l&&!M&&L))},vn=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],hn=new RegExp("["+vn.map((function(e){return e.letters})).join("")+"]","g"),yn={},wn=0;wn0,g=d-p-u,f=!1;g>t&&r.current&&(i&&i(e),r.current=!1),b&&a.current&&(l&&l(e),a.current=!1),b&&t>g?(n&&!r.current&&n(e),m.scrollTop=d,f=!0,r.current=!0):!b&&-t>u&&(o&&!a.current&&o(e),m.scrollTop=0,f=!0,a.current=!0),f&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[n,i,o,l]),d=(0,y.useCallback)((function(e){u(e,e.deltaY)}),[u]),p=(0,y.useCallback)((function(e){s.current=e.changedTouches[0].clientY}),[]),m=(0,y.useCallback)((function(e){var t=s.current-e.changedTouches[0].clientY;u(e,t)}),[u]),b=(0,y.useCallback)((function(e){if(e){var t=!!St&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",m,t)}}),[m,p,d]),g=(0,y.useCallback)((function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",m,!1))}),[m,p,d]);return(0,y.useEffect)((function(){if(t){var e=c.current;return b(e),function(){g(e)}}}),[t,b,g]),function(e){c.current=e}}({isEnabled:void 0===i||i,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),l=function(e){var t=e.isEnabled,n=e.accountForScrollbars,i=void 0===n||n,o=(0,y.useRef)({}),l=(0,y.useRef)(null),r=(0,y.useCallback)((function(e){if(Rn){var t=document.body,n=t&&t.style;if(i&&Vn.forEach((function(e){var t=n&&n[e];o.current[e]=t})),i&&Bn<1){var l=parseInt(o.current.paddingRight,10)||0,r=document.body?document.body.clientWidth:0,a=window.innerWidth-r+l||0;Object.keys(Pn).forEach((function(e){var t=Pn[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(a,"px"))}t&&Fn()&&(t.addEventListener("touchmove",Nn,Dn),e&&(e.addEventListener("touchstart",In,Dn),e.addEventListener("touchmove",Tn,Dn))),Bn+=1}}),[i]),a=(0,y.useCallback)((function(e){if(Rn){var t=document.body,n=t&&t.style;Bn=Math.max(Bn-1,0),i&&Bn<1&&Vn.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&Fn()&&(t.removeEventListener("touchmove",Nn,Dn),e&&(e.removeEventListener("touchstart",In,Dn),e.removeEventListener("touchmove",Tn,Dn)))}}),[i]);return(0,y.useEffect)((function(){if(t){var e=l.current;return r(e),function(){a(e)}}}),[t,r,a]),function(e){l.current=e}}({isEnabled:n});return Ue(y.Fragment,null,n&&Ue("div",{onClick:An,css:zn}),t((function(e){o(e),l(e)})))}var $n={clearIndicator:Wt,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,i=e.theme,o=i.colors,l=i.borderRadius,r=i.spacing;return{label:"control",alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:l,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):void 0,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:r.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:qt,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,i=n.spacing.baseUnit,o=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*i,marginTop:2*i,width:1}},input:function(e){var t=e.isDisabled,n=e.value,i=e.theme,o=i.spacing,l=i.colors;return rt({margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,visibility:t?"hidden":"visible",color:l.neutral80,transform:n?"translateZ(0)":""},tn)},loadingIndicator:function(e){var t=e.isFocused,n=e.size,i=e.theme,o=i.colors,l=i.spacing.baseUnit;return{label:"loadingIndicator",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*l,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:It,menu:function(e){var t,n=e.placement,i=e.theme,o=i.borderRadius,l=i.spacing,r=i.colors;return nt(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),nt(t,"backgroundColor",r.neutral0),nt(t,"borderRadius",o),nt(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),nt(t,"marginBottom",l.menuGutter),nt(t,"marginTop",l.menuGutter),nt(t,"position","absolute"),nt(t,"width","100%"),nt(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,i=e.position;return{left:t.left,position:i,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,i=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:i/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,i=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:i.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o||void 0===o?"ellipsis":void 0,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,i=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:i/2,backgroundColor:e.isFocused?o.dangerLight:void 0,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:Tt,option:function(e){var t=e.isDisabled,n=e.isFocused,i=e.isSelected,o=e.theme,l=o.spacing,r=o.colors;return{label:"option",backgroundColor:i?r.primary:n?r.primary25:"transparent",color:t?r.neutral20:i?r.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*l.baseUnit,"px ").concat(3*l.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:t?void 0:i?r.primary:r.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,gridArea:"1 / 1 / 2 / 3",marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2}},singleValue:function(e){var t=e.isDisabled,n=e.theme,i=n.spacing,o=n.colors;return{label:"singleValue",color:t?o.neutral40:o.neutral80,gridArea:"1 / 1 / 2 / 3",marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2,maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},valueContainer:function(e){var t=e.theme.spacing,n=e.isMulti,i=e.hasValue,o=e.selectProps.controlShouldRenderValue;return{alignItems:"center",display:n&&i&&o?"flex":"grid",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Un={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},jn={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:wt(),captureMenuScroll:!wt(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=rt({ignoreCase:!0,ignoreAccents:!0,stringify:On,trim:!0,matchFrom:"any"},undefined),i=n.ignoreCase,o=n.ignoreAccents,l=n.stringify,r=n.trim,a=n.matchFrom,s=r?xn(t):t,c=r?xn(l(e)):l(e);return i&&(s=s.toLowerCase(),c=c.toLowerCase()),o&&(s=Sn(s),c=Cn(c)),"start"===a?c.substr(0,s.length)===s:c.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0};function Gn(e,t,n,i){return{type:"option",data:t,isDisabled:Xn(e,t,n),isSelected:Qn(e,t,n),label:Yn(e,t),value:Kn(e,t),index:i}}function Zn(e,t){return e.options.map((function(n,i){if("options"in n){var o=n.options.map((function(n,i){return Gn(e,n,t,i)})).filter((function(t){return Wn(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:i}:void 0}var l=Gn(e,n,t,i);return Wn(e,l)?l:void 0})).filter(xt)}function qn(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,un(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Wn(e,t){var n=e.inputValue,i=void 0===n?"":n,o=t.data,l=t.isSelected,r=t.label,a=t.value;return(!ei(e)||!l)&&Jn(e,{label:r,value:a,data:o},i)}var Yn=function(e,t){return e.getOptionLabel(t)},Kn=function(e,t){return e.getOptionValue(t)};function Xn(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Qn(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var i=Kn(e,t);return n.some((function(t){return Kn(e,t)===i}))}function Jn(e,t,n){return!e.filterOption||e.filterOption(t,n)}var ei=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},ti=1,ni=function(e){tt(n,e);var t=ct(n);function n(e){var i;return Xe(this,n),(i=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.instancePrefix="",i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(e){i.controlRef=e},i.focusedOptionRef=null,i.getFocusedOptionRef=function(e){i.focusedOptionRef=e},i.menuListRef=null,i.getMenuListRef=function(e){i.menuListRef=e},i.inputRef=null,i.getInputRef=function(e){i.inputRef=e},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(e,t){var n=i.props,o=n.onChange,l=n.name;t.name=l,i.ariaOnChange(e,t),o(e,t)},i.setValue=function(e,t,n){var o=i.props,l=o.closeMenuOnSelect,r=o.isMulti,a=o.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:a}),l&&(i.setState({inputIsHiddenAfterUpdate:!r}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(e,{action:t,option:n})},i.selectOption=function(e){var t=i.props,n=t.blurInputOnSelect,o=t.isMulti,l=t.name,r=i.state.selectValue,a=o&&i.isOptionSelected(e,r),s=i.isOptionDisabled(e,r);if(a){var c=i.getOptionValue(e);i.setValue(r.filter((function(e){return i.getOptionValue(e)!==c})),"deselect-option",e)}else{if(s)return void i.ariaOnChange(e,{action:"select-option",option:e,name:l});o?i.setValue([].concat(un(r),[e]),"select-option",e):i.setValue(e,"select-option")}n&&i.blurInput()},i.removeValue=function(e){var t=i.props.isMulti,n=i.state.selectValue,o=i.getOptionValue(e),l=n.filter((function(e){return i.getOptionValue(e)!==o})),r=Ot(t,l,l[0]||null);i.onChange(r,{action:"remove-value",removedValue:e}),i.focusInput()},i.clearValue=function(){var e=i.state.selectValue;i.onChange(Ot(i.props.isMulti,[],null),{action:"clear",removedValues:e})},i.popValue=function(){var e=i.props.isMulti,t=i.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),l=Ot(e,o,o[0]||null);i.onChange(l,{action:"pop-value",removedValue:n})},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n5||l>5}},i.onTouchEnd=function(e){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(e.target)&&i.menuListRef&&!i.menuListRef.contains(e.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(e){i.userIsDragging||i.onControlMouseDown(e)},i.onClearIndicatorTouchEnd=function(e){i.userIsDragging||i.onClearIndicatorMouseDown(e)},i.onDropdownIndicatorTouchEnd=function(e){i.userIsDragging||i.onDropdownIndicatorMouseDown(e)},i.handleInputChange=function(e){var t=i.props.inputValue,n=e.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(n,{action:"input-change",prevInputValue:t}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(e){i.props.onFocus&&i.props.onFocus(e),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(e){var t=i.props.inputValue;i.menuListRef&&i.menuListRef.contains(document.activeElement)?i.inputRef.focus():(i.props.onBlur&&i.props.onBlur(e),i.onInputChange("",{action:"input-blur",prevInputValue:t}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1}))},i.onOptionHover=function(e){i.blockOptionHover||i.state.focusedOption===e||i.setState({focusedOption:e})},i.shouldHideSelectedOptions=function(){return ei(i.props)},i.onKeyDown=function(e){var t=i.props,n=t.isMulti,o=t.backspaceRemovesValue,l=t.escapeClearsValue,r=t.inputValue,a=t.isClearable,s=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,m=i.state,b=m.focusedOption,g=m.focusedValue,f=m.selectValue;if(!(s||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(i.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||r)return;i.focusValue("previous");break;case"ArrowRight":if(!n||r)return;i.focusValue("next");break;case"Delete":case"Backspace":if(r)return;if(g)i.removeValue(g);else{if(!o)return;n?i.popValue():a&&i.clearValue()}break;case"Tab":if(i.isComposing)return;if(e.shiftKey||!c||!d||!b||p&&i.isOptionSelected(b,f))return;i.selectOption(b);break;case"Enter":if(229===e.keyCode)break;if(c){if(!b)return;if(i.isComposing)return;i.selectOption(b);break}return;case"Escape":c?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:r}),i.onMenuClose()):a&&l&&i.clearValue();break;case" ":if(r)return;if(!c){i.openMenu("first");break}if(!b)return;i.selectOption(b);break;case"ArrowUp":c?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":c?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!c)return;i.focusOption("pageup");break;case"PageDown":if(!c)return;i.focusOption("pagedown");break;case"Home":if(!c)return;i.focusOption("first");break;case"End":if(!c)return;i.focusOption("last");break;default:return}e.preventDefault()}},i.instancePrefix="react-select-"+(i.props.instanceId||++ti),i.state.selectValue=bt(e.value),i}return Je(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(e){var t,n,i,o,l,r=this.props,a=r.isDisabled,s=r.menuIsOpen,c=this.state.isFocused;(c&&!a&&e.isDisabled||c&&s&&!e.menuIsOpen)&&this.focusInput(),c&&a&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,i=t.getBoundingClientRect(),o=n.getBoundingClientRect(),l=n.offsetHeight/3,o.bottom+l>i.bottom?ht(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+l,t.scrollHeight)):o.top-l-1&&(r=a)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:l[r]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,i=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(i);i||(o=-1);var l=n.length-1,r=-1;if(n.length){switch(e){case"previous":r=0===o?0:-1===o?l:o-1;break;case"next":o>-1&&o0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,i=this.getFocusableOptions();if(i.length){var o=0,l=i.indexOf(n);n||(l=-1),"up"===e?o=l>0?l-1:i.length-1:"down"===e?o=(l+1)%i.length:"pageup"===e?(o=l-t)<0&&(o=0):"pagedown"===e?(o=l+t)>i.length-1&&(o=i.length-1):"last"===e&&(o=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[o],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Un):rt(rt({},Un),this.props.theme):Un}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,i=this.getValue,o=this.selectOption,l=this.setValue,r=this.props,a=r.isMulti,s=r.isRtl,c=r.options;return{clearValue:e,cx:t,getStyles:n,getValue:i,hasValue:this.hasValue(),isMulti:a,isRtl:s,options:c,selectOption:o,selectProps:r,setValue:l,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return Xn(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Qn(this.props,e,t)}},{key:"filterOption",value:function(e,t){return Jn(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,i=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:i})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,i=e.inputId,o=e.inputValue,l=e.tabIndex,r=e.form,a=e.menuIsOpen,s=this.getComponents().Input,c=this.state,u=c.inputIsHidden,d=c.ariaSelection,p=this.commonProps,m=i||this.getElementId("input"),g=rt(rt({"aria-autocomplete":"list","aria-expanded":a,"aria-haspopup":!0,"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox"),"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],role:"combobox"},!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==d?void 0:d.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?y.createElement(s,b({},p,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:u,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:l,form:r,type:"text",value:o},g)):y.createElement(Mn,b({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:dt,onFocus:this.onInputFocus,disabled:t,tabIndex:l,inputMode:"none",form:r,value:""},g))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,i=t.MultiValueContainer,o=t.MultiValueLabel,l=t.MultiValueRemove,r=t.SingleValue,a=t.Placeholder,s=this.commonProps,c=this.props,u=c.controlShouldRenderValue,d=c.isDisabled,p=c.isMulti,m=c.inputValue,g=c.placeholder,f=this.state,v=f.selectValue,h=f.focusedValue,_=f.isFocused;if(!this.hasValue()||!u)return m?null:y.createElement(a,b({},s,{key:"placeholder",isDisabled:d,isFocused:_,innerProps:{id:this.getElementId("placeholder")}}),g);if(p)return v.map((function(t,r){var a=t===h,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return y.createElement(n,b({},s,{components:{Container:i,Label:o,Remove:l},isFocused:a,isDisabled:d,key:c,index:r,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));if(m)return null;var w=v[0];return y.createElement(r,b({},s,{data:w,isDisabled:d}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,i=n.isDisabled,o=n.isLoading,l=this.state.isFocused;if(!this.isClearable()||!e||i||!this.hasValue()||o)return null;var r={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return y.createElement(e,b({},t,{innerProps:r,isFocused:l}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,i=n.isDisabled,o=n.isLoading,l=this.state.isFocused;return e&&o?y.createElement(e,b({},t,{innerProps:{"aria-hidden":"true"},isDisabled:i,isFocused:l})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var i=this.commonProps,o=this.props.isDisabled,l=this.state.isFocused;return y.createElement(n,b({},i,{isDisabled:o,isFocused:l}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,i=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return y.createElement(e,b({},t,{innerProps:o,isDisabled:n,isFocused:i}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,i=t.GroupHeading,o=t.Menu,l=t.MenuList,r=t.MenuPortal,a=t.LoadingMessage,s=t.NoOptionsMessage,c=t.Option,u=this.commonProps,d=this.state.focusedOption,p=this.props,m=p.captureMenuScroll,g=p.inputValue,f=p.isLoading,v=p.loadingMessage,h=p.minMenuHeight,_=p.maxMenuHeight,w=p.menuIsOpen,k=p.menuPlacement,E=p.menuPosition,C=p.menuPortalTarget,S=p.menuShouldBlockScroll,x=p.menuShouldScrollIntoView,O=p.noOptionsMessage,L=p.onMenuScrollToTop,M=p.onMenuScrollToBottom;if(!w)return null;var V,P=function(t,n){var i=t.type,o=t.data,l=t.isDisabled,r=t.isSelected,a=t.label,s=t.value,p=d===o,m=l?void 0:function(){return e.onOptionHover(o)},g=l?void 0:function(){return e.selectOption(o)},f="".concat(e.getElementId("option"),"-").concat(n),v={id:f,onClick:g,onMouseMove:m,onMouseOver:m,tabIndex:-1};return y.createElement(c,b({},u,{innerProps:v,data:o,isDisabled:l,isSelected:r,key:f,label:a,type:i,value:s,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())V=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,l=t.options,r=t.index,a="".concat(e.getElementId("group"),"-").concat(r),s="".concat(a,"-heading");return y.createElement(n,b({},u,{key:a,data:o,options:l,Heading:i,headingProps:{id:s,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return P(e,"".concat(r,"-").concat(e.index))})))}if("option"===t.type)return P(t,"".concat(t.index))}));else if(f){var N=v({inputValue:g});if(null===N)return null;V=y.createElement(a,u,N)}else{var T=O({inputValue:g});if(null===T)return null;V=y.createElement(s,u,T)}var I={minMenuHeight:h,maxMenuHeight:_,menuPlacement:k,menuPosition:E,menuShouldScrollIntoView:x},F=y.createElement(Pt,b({},u,I),(function(t){var n=t.ref,i=t.placerProps,r=i.placement,a=i.maxHeight;return y.createElement(o,b({},u,I,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove,id:e.getElementId("listbox")},isLoading:f,placement:r}),y.createElement(Hn,{captureEnabled:m,onTopArrive:L,onBottomArrive:M,lockEnabled:S},(function(t){return y.createElement(l,b({},u,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:f,maxHeight:a,focusedOption:d}),V)})))}));return C||"fixed"===E?y.createElement(r,b({},u,{appendTo:C,controlElement:this.controlRef,menuPlacement:k,menuPosition:E}),F):F}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,i=t.isDisabled,o=t.isMulti,l=t.name,r=this.state.selectValue;if(l&&!i){if(o){if(n){var a=r.map((function(t){return e.getOptionValue(t)})).join(n);return y.createElement("input",{name:l,type:"hidden",value:a})}var s=r.length>0?r.map((function(t,n){return y.createElement("input",{key:"i-".concat(n),name:l,type:"hidden",value:e.getOptionValue(t)})})):y.createElement("input",{name:l,type:"hidden"});return y.createElement("div",null,s)}var c=r[0]?this.getOptionValue(r[0]):"";return y.createElement("input",{name:l,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,i=t.focusedOption,o=t.focusedValue,l=t.isFocused,r=t.selectValue,a=this.getFocusableOptions();return y.createElement(fn,b({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:i,focusedValue:o,isFocused:l,selectValue:r,focusableOptions:a}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,i=e.SelectContainer,o=e.ValueContainer,l=this.props,r=l.className,a=l.id,s=l.isDisabled,c=l.menuIsOpen,u=this.state.isFocused,d=this.commonProps=this.getCommonProps();return y.createElement(i,b({},d,{className:r,innerProps:{id:a,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:u}),this.renderLiveRegion(),y.createElement(t,b({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:u,menuIsOpen:c}),y.createElement(o,b({},d,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),y.createElement(n,b({},d,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,i=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,l=t.ariaSelection,r=t.isFocused,a=t.prevWasFocused,s=e.options,c=e.value,u=e.menuIsOpen,d=e.inputValue,p=e.isMulti,m=bt(c),b={};if(n&&(c!==n.value||s!==n.options||u!==n.menuIsOpen||d!==n.inputValue)){var g=u?function(e,t){return qn(Zn(e,t))}(e,m):[],f=i?function(e,t){var n=e.focusedValue,i=e.selectValue.indexOf(n);if(i>-1){if(t.indexOf(n)>-1)return n;if(i-1?n:t[0]}(t,g);b={selectValue:m,focusedOption:v,focusedValue:f,clearFocusValueOnUpdate:!1}}var h=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},y=l,_=r&&a;return r&&!_&&(y={value:Ot(p,m,m[0]||null),options:m,action:"initial-input-focus"},_=!a),"initial-input-focus"===(null==l?void 0:l.action)&&(y=null),rt(rt(rt({},b),h),{},{prevProps:e,ariaSelection:y,prevWasFocused:_})}}]),n}(y.Component);ni.defaultProps=jn;var ii=(0,y.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,i=e.defaultMenuIsOpen,o=void 0!==i&&i,l=e.defaultValue,r=void 0===l?null:l,a=e.inputValue,s=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,p=e.onMenuOpen,m=e.value,b=Ye(e,cn),g=sn((0,y.useState)(void 0!==a?a:n),2),f=g[0],v=g[1],h=sn((0,y.useState)(void 0!==s?s:o),2),_=h[0],w=h[1],k=sn((0,y.useState)(void 0!==m?m:r),2),E=k[0],C=k[1],S=(0,y.useCallback)((function(e,t){"function"==typeof c&&c(e,t),C(e)}),[c]),x=(0,y.useCallback)((function(e,t){var n;"function"==typeof u&&(n=u(e,t)),v(void 0!==n?n:e)}),[u]),O=(0,y.useCallback)((function(){"function"==typeof p&&p(),w(!0)}),[p]),L=(0,y.useCallback)((function(){"function"==typeof d&&d(),w(!1)}),[d]),M=void 0!==a?a:f,V=void 0!==s?s:_,P=void 0!==m?m:E;return rt(rt({},b),{},{inputValue:M,menuIsOpen:V,onChange:S,onInputChange:x,onMenuClose:L,onMenuOpen:O,value:P})}(e);return y.createElement(ni,b({ref:t},n))})),oi=(y.Component,ii);function li(n){var i,o;const{settings:r,setSettings:c,setHasUpdates:u,variables:p}=n,m=null!==(i=null==r?void 0:r.plugin_settings)&&void 0!==i?i:{};let b=function(e,n){var i;let o=[];if(!e||!n||0===e.length||0===n.length)return o;let r=function(){let e=[{label:(0,l.__)("Hide Block","block-visibility"),type:"core",attributeSlug:"hideBlock",settingSlug:"hide_block"},{label:(0,l.__)("Date & Time","block-visibility"),type:"core",attributeSlug:"dateTime",settingSlug:"date_time"},{label:(0,l.__)("User Role","block-visibility"),type:"core",attributeSlug:"userRole",settingSlug:"visibility_by_role"},{label:(0,l.__)("Screen Size","block-visibility"),type:"core",attributeSlug:"screenSize",settingSlug:"screen_size"},{label:(0,l.__)("Query String","block-visibility"),type:"core",attributeSlug:"queryString",settingSlug:"query_string"}];e=(0,s.applyFilters)("blockVisibility.coreControls",e),e.sort(((e,t)=>e.attributeSlug.localeCompare(t.attributeSlug)));let t=[{label:(0,l.__)("Advanced Custom Fields","block-visibility"),type:"integration",attributeSlug:"acf",settingSlug:"acf",icon:d.acf},{label:(0,l.__)("WP Fusion","block-visibility"),type:"integration",attributeSlug:"wpFusion",settingSlug:"wp_fusion",icon:d.wpFusion}];t=(0,s.applyFilters)("blockVisibility.integrationControls",t),t.sort(((e,t)=>e.attributeSlug.localeCompare(t.attributeSlug)));let n=[...e,...t];return n=(0,s.applyFilters)("blockVisibility.controls",n),n}();r.forEach((function(e){"integration"!==e.type||(e=>{let t=!1;var i,o;return null!=n&&n.integrations&&(t=null!==(i=null==n||null===(o=n.integrations[e])||void 0===o?void 0:o.active)&&void 0!==i&&i),t})(e.settingSlug)||(r=r.filter((t=>t.settingSlug!==e.settingSlug)))}));const a=null!==(i=null==e?void 0:e.visibility_controls)&&void 0!==i?i:{};return(0,t.isEmpty)(a)||r.forEach((function(e){var n,i;let l=!1;(0,t.has)(a,e.settingSlug)||(l=!0),(null===(n=null===(i=a[e.settingSlug])||void 0===i?void 0:i.enable)||void 0===n||n)&&(l=!0),l&&o.push(e)})),o=(0,s.applyFilters)("blockVisibility.enabledControls",o,e,n),o}(r,p);b=b.filter((e=>"hide_block"!==e.settingSlug&&"visibility_presets"!==e.settingSlug));const g=[];b.forEach((e=>{g.push({label:e.label,value:e.settingSlug})}));const f=null!==(o=null==m?void 0:m.default_controls)&&void 0!==o?o:["date_time","visibility_by_role","screen_size"],v=g.filter((e=>f.includes(e.value)));return(0,e.createElement)("div",{className:"setting-tabs__settings-panel two-columns"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,l.__)("General","block-visibility"))),(0,e.createElement)(a.Slot,{name:"VisibilityControlsGeneralTop"}),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__select has-info-popover"},(0,e.createElement)("div",null,(0,e.createElement)("span",null,(0,l.__)("Default visibility controls","block-visibility")),(0,e.createElement)(oi,{className:"block-visibility__react-select",classNamePrefix:"react-select",placeholder:(0,l.__)("Select Controls…","block-visibility"),options:g,value:v,onChange:e=>(e=>{const t=[];0!==e.length&&e.forEach((e=>{t.push(e.value)})),c({...r,plugin_settings:{...m,default_controls:t}}),u(!0)})(e),isMulti:!0}),(0,e.createElement)("div",{className:"settings-panel__help"},(0,l.__)("If no controls are selected, the plugin will default to Date & Time, User Role, and Screen Size.","block-visibility"))),(0,e.createElement)(h,{message:(0,l.__)("Optionally set the default controls that will be available when editing a block's visibility for the first time. This can be useful if you find yourself using the same few controls frequently. Controls can be disabled entirely on the Visibility Controls tab.","block-visibility")})),(0,e.createElement)(a.Slot,{name:"VisibilityControlsGeneralBottom"})))}function ri(t){var n,i;const{visibilityControls:o,setVisibilityControls:r}=t,s=null===(n=null==o||null===(i=o.hide_block)||void 0===i?void 0:i.enable)||void 0===n||n;return(0,e.createElement)("div",{className:"setting-tabs__settings-panel"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,l.__)("Hide Block","block-visibility"))),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Enable the Hide Block control.","block-visibility"),checked:s,onChange:()=>{r({...o,hide_block:{...o.hide_block,enable:!s}})}}),(0,e.createElement)(h,{message:(0,l.__)("The Hide Block control allows you easily hide blocks on the frontend of your website. This control overrides all other controls when enabled on a block. Visit the plugin Knowledge Base for more information and examples of how this control can be used for content management.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-hide-block-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"}))))}function ai(t){var n,i;const{visibilityControls:o,setVisibilityControls:r}=t,s=null===(n=null==o||null===(i=o.date_time)||void 0===i?void 0:i.enable)||void 0===n||n;return(0,e.createElement)("div",{className:"setting-tabs__settings-panel"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,l.__)("Date & Time","block-visibility"))),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Enable the Date & Time controls.","block-visibility"),checked:s,onChange:()=>{r({...o,date_time:{...o.date_time,enable:!s}})}}),(0,e.createElement)(h,{message:(0,l.__)("The Date & Time control allows you to conditionally display blocks based on time and date settings, which includes the ability to schedule blocks. Visit the plugin Knowledge Base for more information.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-date-time-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)(a.Slot,{name:"DateTimeControls"})))}function si(t){var n,i,o,r,s,c,u,d;const{visibilityControls:p,setVisibilityControls:m}=t,b=null===(n=null==p||null===(i=p.visibility_by_role)||void 0===i?void 0:i.enable)||void 0===n||n,g=null===(o=null==p||null===(r=p.visibility_by_role)||void 0===r?void 0:r.enable_user_roles)||void 0===o||o,f=null===(s=null==p||null===(c=p.visibility_by_role)||void 0===c?void 0:c.enable_users)||void 0===s||s,v=null===(u=null==p||null===(d=p.visibility_by_role)||void 0===d?void 0:d.enable_user_rule_sets)||void 0===u||u;let y=(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Enable individual user role restrictions (Administrator, Editor, Subscriber, etc.)","block-visibility"),checked:g,onChange:()=>{m({...p,visibility_by_role:{...p.visibility_by_role,enable_user_roles:!g}})}}),_=(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Enable individual user restrictions.","block-visibility"),checked:f,onChange:()=>{m({...p,visibility_by_role:{...p.visibility_by_role,enable_users:!f}})}}),w=(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Enable advanced user role restrictions (User rule sets)","block-visibility"),checked:v,onChange:()=>{m({...p,visibility_by_role:{...p.visibility_by_role,enable_user_rule_sets:!v}})}});return b||(y=(0,e.createElement)(a.Disabled,null,y),_=(0,e.createElement)(a.Disabled,null,_),w=(0,e.createElement)(a.Disabled,null,w)),(0,e.createElement)("div",{className:"setting-tabs__settings-panel"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,l.__)("User Role","block-visibility"))),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Enable the User Role controls.","block-visibility"),checked:b,onChange:()=>{m({...p,visibility_by_role:{...p.visibility_by_role,enable:!b}})}}),(0,e.createElement)(h,{message:(0,l.__)("The User Role control allows you to conditionally display blocks based on whether a user is logged-in, logged-out, and more. Visit the plugin Knowledge Base for more information.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-user-role-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)("hr",null),(0,e.createElement)("div",{className:"settings-type__toggle first has-info-popover subsetting"},y,(0,e.createElement)(h,{message:(0,l.__)("Restrict visibility by any user role (Administrator, Editor, Subscriber, etc.). Roles that are added by third-party plugins will also be available to choose from.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-user-role-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover subsetting"},_,(0,e.createElement)(h,{message:(0,l.__)("Restrict visibility to specific individual users on your website based on user ID. Multiple users can be selected at once.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-user-role-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover subsetting"},w,(0,e.createElement)(h,{message:(0,l.__)("This functionality allows you to create user-based rule sets, which provide extensive configuration options and greater flexibilty.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-user-role-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)(a.Slot,{name:"VisibilityByRoleControls"})))}function ci(t){const[n,i]=(0,e.useState)(!1),{screenSize:o,enableAdvancedControls:r}=t,s=function(e){const t=e.breakpoints.large,n=e.breakpoints.medium,i=e.controls.large,o=e.controls.medium,l=e.controls.small;let r="";return i&&(r=`/* Large screens (desktops, ${t} and up) */\n@media ( min-width: ${t} ) {\n\t.block-visibility-hide-large-screen {\n\t\tdisplay: none !important;\n\t}\n}`),o&&(r=(r?r+"\n\n":r)+`/* Medium screens (tablets, between ${n} and ${t}) */\n@media ( min-width: ${n} ) and ( max-width: ${ui(t)} ) {\n\t.block-visibility-hide-medium-screen {\n\t\tdisplay: none !important;\n\t}\n}`),l&&(r=(r?r+"\n\n":r)+`/* Small screens (mobile devices, less than ${n}) */\n@media ( max-width: ${ui(n)} ) {\n\t.block-visibility-hide-small-screen {\n\t\tdisplay: none !important;\n\t}\n}`),r||(r="/* All screen size controls have been disabled. */"),r}(o),c=function(e){const t=e.breakpoints.extra_large,n=e.breakpoints.large,i=e.breakpoints.medium,o=e.breakpoints.small,l=e.controls.extra_large,r=e.controls.large,a=e.controls.medium,s=e.controls.small,c=e.controls.extra_small,u="\n\n";let d="";return l&&(d=`/* Extra large screens (large desktops, ${t} and up) */\n@media ( min-width: ${t} ) {\n\t.block-visibility-hide-extra-large-screen {\n\t\tdisplay: none !important;\n\t}\n}`),r&&(d=(d?d+u:d)+`/* Large screens (desktops, between ${n} and ${t}) */\n@media ( min-width: ${n} ) and (max-width: ${ui(t)} ) {\n\t.block-visibility-hide-large-screen {\n\t\tdisplay: none !important;\n\t}\n}`),a&&(d=(d?d+u:d)+`/* Medium screens (tablets, between ${i} and ${n}) */\n@media ( min-width: ${i} ) and ( max-width: ${ui(n)} ) {\n\t.block-visibility-hide-medium-screen {\n\t\tdisplay: none !important;\n\t}\n}`),s&&(d=(d?d+u:d)+`/* Small screens (landscape mobile devices, between ${o} and ${n}) */\n@media ( min-width: ${o} ) and ( max-width: ${ui(i)} ) {\n\t.block-visibility-hide-small-screen {\n\t\tdisplay: none !important;\n\t}\n}`),c&&(d=(d?d+u:d)+`/* Extra small screens (portrait mobile devices, less than ${o}) */\n@media ( max-width: ${ui(o)} ) {\n\t.block-visibility-hide-extra-small-screen {\n\t\tdisplay: none !important;\n\t}\n}`),d||(d="/* All screen size controls have been disabled. */"),d}(o);return(0,e.createElement)("div",{className:"breakpoint-css-preview subsetting"},(0,e.createElement)(a.Button,{onClick:()=>i(!n),isSecondary:!0},[!n&&(0,l.__)("Preview Frontend CSS","block-visibility"),n&&(0,l.__)("Hide Preview","block-visibility")]),n&&(0,e.createElement)("pre",null,[r&&c,!r&&s]))}function ui(e){return(0,t.trim)(e,"px")-.02+"px"}function di(t){const{visibilityControls:n,setVisibilityControls:i,screenSize:o,enableAdvancedControls:r}=t,s={extra_large:{title:(0,l.__)("Extra Large","block-visibility"),description:(0,l.__)("Large desktop screen sizes.")},large:{title:(0,l.__)("Large","block-visibility"),description:(0,l.__)("Desktop and tablet (landscape) screen sizes.","block-visibility")},medium:{title:(0,l.__)("Medium","block-visibility"),description:(0,l.__)("Tablet (portrait) screen sizes.","block-visibility")},small:{title:(0,l.__)("Small","block-visibility"),description:(0,l.__)("Mobile (landscape) screen sizes.","block-visibility")}};return(0,e.createElement)("div",{className:"breakpoints-container"},(0,e.createElement)("div",{className:"settings-label"},(0,e.createElement)("span",null,(0,l.__)("Breakpoints","block-visibility")),(0,e.createElement)(h,{message:(0,l.__)("The plugin sets a series of breakpoints which enable the Screen Size control automatically. However for best results, you can configure the breakpoints to correspond with the media breakpoints of your current theme.","block-visibility"),subMessage:(0,l.__)("The default breakpoints are Large (992px) and Medium (768px). Advanced screen size controls add Extra Large (1200px) and Small (576px).","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-screen-size-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),Object.entries(s).map((t=>{let[l,s]=t;const c=o.breakpoints[l];return"extra_large"!==l&&"small"!==l||r?(0,e.createElement)("div",{className:"breakpoint",key:l},(0,e.createElement)("div",{className:"breakpoint-inputs"},(0,e.createElement)(a.__experimentalUnitControl,{label:s.title,value:c,onChange:e=>function(e,t){i({...n,screen_size:{...o,breakpoints:{...o.breakpoints,[e]:t}}})}(l,e),units:[{value:"px",label:"px"}]}),(0,e.createElement)("div",{className:"settings-panel__help"},s.description))):null})))}function pi(t){const{visibilityControls:n,setVisibilityControls:i,screenSize:o,enableAdvancedControls:r}=t;function s(e,t){i({...n,screen_size:{...o,controls:{...o.controls,[e]:t}}})}return(0,e.createElement)("div",{className:"controls-container"},(0,e.createElement)("div",{className:"settings-label"},(0,e.createElement)("span",null,(0,l.__)("Controls","block-visibility")),(0,e.createElement)(h,{message:(0,l.__)("The settings below allow you to restrict which controls are available to users in the Block/Site Editor. Disabling controls will remove the corresponding CSS from the frontend of your website.","block-visibility"),subMessage:(0,l.__)("The default controls are Desktop, Tablet, and Mobile. Advanced screen size controls add Large Desktop and Mobile (portrait).","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-screen-size-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),r&&(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Enable large desktop control","block-visibility"),help:(0,l.sprintf)(// translators: %s: extra large breakpoint -(0,l.__)("Allows users to hide blocks on extra large screen sizes, %s and up.","block-visibility"),o.breakpoints.extra_large),checked:o.controls.extra_large,onChange:()=>s("extra_large",!o.controls.extra_large)}),(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Enable desktop control","block-visibility"),help:[!r&&(0,l.sprintf)(// translators: %s large breakpoint -(0,l.__)("Allows users to hide blocks on large screen sizes, %s and up.","block-visibility"),o.breakpoints.large),r&&(0,l.sprintf)(// translators: %1$s: large breakpoint %2$s: extra large breakpoint -(0,l.__)("Allows users to hide blocks on large screen sizes, between %1$s and %2$s.","block-visibility"),o.breakpoints.large,o.breakpoints.extra_large)],checked:o.controls.large,onChange:()=>s("large",!o.controls.large)}),(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Enable tablet control","block-visibility"),help:(0,l.sprintf)(// translators: %1$s: medium breakpoint %2$s: large breakpoint -(0,l.__)("Allows users to hide blocks on medium screen sizes, between %1$s and %2$s.","block-visibility"),o.breakpoints.medium,o.breakpoints.large),checked:o.controls.medium,onChange:()=>s("medium",!o.controls.medium)}),(0,e.createElement)(a.ToggleControl,{label:[!r&&(0,l.__)("Enable mobile control","block-visibility"),r&&(0,l.__)("Enable mobile (landscape) control","block-visibility")],help:[!r&&(0,l.sprintf)(// translators: %s: medium breakpoint -(0,l.__)("Allows users to hide blocks on small screen sizes, less than %s.","block-visibility"),o.breakpoints.medium),r&&(0,l.sprintf)(// translators: %1$s: small breakpoint %2$s: medium breakpoint -(0,l.__)("Allows users to hide blocks on small screen sizes, between %1$s and %2$s.","block-visibility"),o.breakpoints.small,o.breakpoints.medium)],checked:o.controls.small,onChange:()=>s("small",!o.controls.small)}),r&&(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Enable mobile (portrait) control","block-visibility"),help:(0,l.sprintf)(// translators: %s: small breakpoint -(0,l.__)("Allows users to hide blocks on extra small screen sizes, less than %s.","block-visibility"),o.breakpoints.small),checked:o.controls.extra_small,onChange:()=>s("extra_small",!o.controls.extra_small)}))}function mi(t){const{visibilityControls:n,setVisibilityControls:i}=t;let o;o=null!=n&&n.screen_size?n.screen_size:{enable:!0,breakpoints:{extra_large:"1200px",large:"992px",medium:"768px",small:"576px"},controls:{extra_large:!0,large:!0,medium:!0,small:!0,extra_small:!0},enable_advanced_controls:!1,enable_frontend_css:!0};let r=(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"breakpoint-control-container subsetting"},(0,e.createElement)(di,{visibilityControls:n,setVisibilityControls:i,screenSize:o,enableAdvancedControls:o.enable_advanced_controls}),(0,e.createElement)(pi,{visibilityControls:n,setVisibilityControls:i,screenSize:o,enableAdvancedControls:o.enable_advanced_controls})),(0,e.createElement)(ci,{screenSize:o,enableAdvancedControls:o.enable_advanced_controls})),s=(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Enable advanced screen size controls.","block-visibility"),checked:o.enable_advanced_controls,onChange:()=>{i({...n,screen_size:{...o,enable_advanced_controls:!o.enable_advanced_controls}})}}),c=(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Load screen size CSS on the frontend of this website.","block-visibility"),checked:o.enable_frontend_css,onChange:()=>{i({...n,screen_size:{...o,enable_frontend_css:!o.enable_frontend_css}})}});return o.enable||(r=(0,e.createElement)(a.Disabled,null,r),s=(0,e.createElement)(a.Disabled,null,s),c=(0,e.createElement)(a.Disabled,null,c)),(0,e.createElement)("div",{className:"setting-tabs__settings-panel two-columns"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,l.__)("Screen Size","block-visibility"))),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Enable the Screen Size controls.","block-visibility"),checked:o.enable,onChange:()=>{i({...n,screen_size:{...o,enable:!o.enable}})}}),(0,e.createElement)(h,{message:(0,l.__)("The Screen Size control allows you to conditionally display blocks on the current width of the browser window, or in other words, the screen size of a user's device. Visit the plugin Knowledge Base for more information.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-screen-size-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)("hr",null),r,(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover subsetting"},s,(0,e.createElement)(h,{message:(0,l.__)("By default, the Screen Size control includes two breakpoints and three controls for users to hide blocks. There are certain situations where you may need more control over when a block should be visible, for example in the case of very large or small screens. Enabling advanced controls provides these options.","block-visibility"),subMessage:(0,l.__)("Note that once enabled, any block that is only using the advanced controls to hide at extra large, or extra small, breakpoints will become visible again if this setting is ever disabled in the future.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-screen-size-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover subsetting"},c,(0,e.createElement)(h,{message:(0,l.__)('By default, the CSS needed for the Screen Size controls is loaded on the frontend of your website. If disabled, you will need to add the CSS manually to your theme in order for the Screen Size controls to work properly. This CSS code is available via the "Preview Frontend CSS" button on this page.',"block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-screen-size-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)(a.Slot,{name:"ScreenSizeControls"})))}function bi(t){var n,i;const{visibilityControls:o,setVisibilityControls:r}=t,s=null===(n=null==o||null===(i=o.query_string)||void 0===i?void 0:i.enable)||void 0===n||n;return(0,e.createElement)("div",{className:"setting-tabs__settings-panel"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,l.__)("Query String","block-visibility"))),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Enable the Query String control.","block-visibility"),checked:s,onChange:()=>{r({...o,query_string:{...o.query_string,enable:!s}})}}),(0,e.createElement)(h,{message:(0,l.__)("The Query String control allows you to conditionally display blocks based on URL query strings. Visit the plugin Knowledge Base for more information.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-query-string-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"}))))}function gi(t){var n,i,o,r,s;const{variables:u,visibilityControls:p,setVisibilityControls:m}=t;if(null===(n=null==u||null===(i=u.integrations)||void 0===i||null===(o=i.acf)||void 0===o?void 0:o.active)||void 0===n||!n)return null;const b=null===(r=null==p||null===(s=p.acf)||void 0===s?void 0:s.enable)||void 0===r||r;return(0,e.createElement)("div",{className:"setting-tabs__settings-panel"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,e.createElement)(c,{icon:d.acf}),(0,l.__)("Advanced Custom Fields","block-visibility"))),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Enable the Advanced Custom Fields control.","block-visibility"),checked:b,onChange:()=>{m({...p,acf:{...p.acf,enable:!b}})}}),(0,e.createElement)(h,{message:(0,l.__)("The Advanced Custom Fields (ACF) control allows you to conditionally display blocks, including ACF blocks, based on ACF fields. Visit the plugin Knowledge Base for more information.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-advanced-custom-fields-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"}))))}function fi(t){var n,i,o,r,s;const{variables:u,visibilityControls:p,setVisibilityControls:m}=t;if(null===(n=null==u||null===(i=u.integrations)||void 0===i||null===(o=i.wp_fusion)||void 0===o?void 0:o.active)||void 0===n||!n)return null;const b=null===(r=null==p||null===(s=p.wp_fusion)||void 0===s?void 0:s.enable)||void 0===r||r;return(0,e.createElement)("div",{className:"setting-tabs__settings-panel"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,e.createElement)(c,{icon:d.wpFusion}),(0,l.__)("WP Fusion","block-visibility"))),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Enable the WP Fusion control.","block-visibility"),checked:b,onChange:()=>{m({...p,wp_fusion:{...p.wp_fusion,enable:!b}})}}),(0,e.createElement)(h,{message:(0,l.__)("The WP Fusion control allows you to conditionally display blocks based on WP Fusion tags. Visit the plugin Knowledge Base for more information.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-wp-fusion-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"}))))}function vi(t){var n;const{variables:i,visibilityControls:o}=t;let r=null!==(n=null==i?void 0:i.integrations)&&void 0!==n?n:{};return r=Object.keys(r).map((e=>r[e])),r=r.filter((e=>!0===e.active)),0===r.length?null:(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"setting-tabs__setting-controls integrations"},(0,e.createElement)("div",{className:"setting-controls__title"},(0,e.createElement)("span",null,(0,l.__)("Third-Party Integration Controls","block-visibility")),(0,e.createElement)(h,{message:(0,l.__)("The settings below allow you to configure all third-party integration controls for Block Visibility. If you are looking for an integration, and do not see it below, make sure the respective third-party plugin is installed and activated on your website.","block-visibility"),subMessage:(0,l.__)("Visit the plugin Knowledge Base for more information on configuring third-party integration controls and what integrations are currently available in Block Visibility.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/guide-to-third-party-integrations-in-block-visibility/?utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)(g,b({tabSlug:"visibility_controls",tabSettings:o},t))),(0,e.createElement)(a.Slot,{name:"VisibilityControlsIntegrationsTop"}),(0,e.createElement)(gi,t),(0,e.createElement)(fi,t),(0,e.createElement)(a.Slot,{name:"VisibilityControlsIntegrationsBottom"}))}const hi=(0,a.withFilters)("blockVisibility.VisibilityControls")((t=>(0,e.createElement)(e.Fragment,null)));function yi(t){var n;const[i,o]=(0,e.useState)(!1),{settings:r,setSettings:s}=t,c=null!==(n=null==r?void 0:r.visibility_controls)&&void 0!==n?n:{};function u(e){s({...r,visibility_controls:e}),o(!0)}return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"setting-tabs__visibility-controls inner-container"},(0,e.createElement)("div",{className:"setting-tabs__setting-controls"},(0,e.createElement)("div",{className:"setting-controls__title"},(0,e.createElement)("span",null,(0,l.__)("Visibility Controls","block-visibility")),(0,e.createElement)(h,{message:(0,l.__)("The settings below allow you to configure the visibility controls that power Block Visibility. Pick and choose which controls you would like to enable and how you would like them to function.","block-visibility"),subMessage:(0,l.__)("When a visibility control is disabled, blocks that relied on the disabled control will become visible again unless they are hidden by other enabled controls. Visit the plugin Knowledge Base for more information on configuring visibility controls.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/guide-to-visibility-controls-in-block-visibility/?utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)(g,b({tabSlug:"visibility_controls",tabSettings:c,hasUpdates:i,setHasUpdates:o},t))),(0,e.createElement)(a.Slot,{name:"VisibilityControlsTop"}),(0,e.createElement)(li,b({visibilityControls:c,setVisibilityControls:u,setHasUpdates:o},t)),(0,e.createElement)(ri,b({visibilityControls:c,setVisibilityControls:u},t)),(0,e.createElement)(bi,b({visibilityControls:c,setVisibilityControls:u},t)),(0,e.createElement)(ai,b({visibilityControls:c,setVisibilityControls:u},t)),(0,e.createElement)(si,b({visibilityControls:c,setVisibilityControls:u},t)),(0,e.createElement)(mi,b({visibilityControls:c,setVisibilityControls:u},t)),(0,e.createElement)(a.Slot,{name:"VisibilityControlsMiddle"}),(0,e.createElement)(vi,b({visibilityControls:c,setVisibilityControls:u,hasUpdates:i,setHasUpdates:o},t)),(0,e.createElement)(a.Slot,{name:"VisibilityControlsBottom"}),(0,e.createElement)(hi,b({visibilityControls:c,setVisibilityControls:u},t))),(0,e.createElement)(a.Slot,{name:"SettingsTabPanelBottom"}))}var _i=window.wp.data,wi=window.wp.blockEditor;function ki(t){const{blockType:n,disabledBlocks:i,handleBlockTypeChange:o}=t,l=!i.includes(n.name);return(0,e.createElement)("li",{key:n.name,className:"blocks-category__block"},(0,e.createElement)(a.CheckboxControl,{checked:l,onChange:e=>function(e){o(e,n.name)}(e),label:(0,e.createElement)("span",null,n.title,n.icon&&(0,e.createElement)(wi.BlockIcon,{icon:n.icon}))}))}function Ei(n){const{blockTypes:i,category:o,disabledBlocks:l,handleBlockCategoryChange:r,handleBlockTypeChange:s}=n;if(!i.length)return null;const c=(0,t.map)(i,"name"),u=(0,t.without)(c,...l),d=u.length===c.length;let p;p=d?"true":u.length>0?"mixed":"false";const m="block-manager__category-title-"+o.slug;return(0,e.createElement)("div",{role:"group","aria-labelledby":m,className:"block-manager__block-category"},(0,e.createElement)("div",{className:"block-category__title"},(0,e.createElement)(a.CheckboxControl,{checked:d,onChange:e=>function(e){const n=(0,t.map)(i,"name");r(e,n)}(e),"aria-checked":p,label:(0,e.createElement)("span",{id:m},o.title,o.icon&&(0,e.createElement)(wi.BlockIcon,{icon:o.icon}))})),(0,e.createElement)("ul",{className:"block-category__blocks-list"},i.map((t=>(0,e.createElement)(ki,{key:t,blockType:t,handleBlockTypeChange:s,disabledBlocks:l})))))}var Ci=(0,_i.withSelect)((e=>{const{getCategories:t,getBlockTypes:n,hasBlockSupport:i,isMatchingSearchTerm:o}=e("core/blocks");return{blockTypes:n(),categories:t(),hasBlockSupport:i,isMatchingSearchTerm:o}}))((function(n){var i,o,r;const[s,c]=(0,e.useState)(!1),[u,p]=(0,e.useState)(""),{settings:m,setSettings:f,blockTypes:v,categories:y,hasBlockSupport:_,isMatchingSearchTerm:w}=n,k=null!==(i=null==m?void 0:m.disabled_blocks)&&void 0!==i?i:{};function E(e){f({...m,disabled_blocks:e}),c(!0)}function C(e,n){let i=[...k];i=e?(0,t.difference)(i,n):(0,t.union)(i,n),E(i),c(!0)}function S(e,n){let i=[...k];e?i=(0,t.without)(i,n):i.push(n),E(i),c(!0)}let x;x=null!==(o=null==m||null===(r=m.plugin_settings)||void 0===r?void 0:r.enable_full_control_mode)&&void 0!==o&&o?v:v.filter((e=>_(e,"inserter",!0)&&!e.parent));const O=["core/freeform"];x=x.filter((e=>!O.includes(e.name)));const L=x.filter((e=>!u||w(e,u))),M=(0,t.intersection)(k,(0,t.map)(L,"name")),V=(0,t.intersection)(k,(0,t.map)(x,"name"));let P=d.visibility,N=(0,l.__)("Visibility is enabled for all blocks","block-visibility");return V.length&&(P=d.visibilityHidden,N=(0,l.sprintf)( +!function(){var e={184:function(e,t){var n;!function(){"use strict";var i={}.hasOwnProperty;function o(){for(var e=[],t=0;t{var n;const i=null!==(n=u[t].rel)&&void 0!==n?n:"noreferrer";return(0,e.createElement)("a",{key:t,href:u[t].url,className:"plugin-links__"+t,target:"_blank",rel:i},(0,e.createElement)(c,{icon:d[u[t].icon]}),(0,e.createElement)("span",null,u[t].title))}));return(0,e.createElement)("div",{className:"masthead"},(0,e.createElement)("div",{className:"inner-container"},(0,e.createElement)("div",{className:"masthead__branding"},(0,e.createElement)("h1",null,d.logo,(0,e.createElement)("span",null,(0,r.__)("Block Visibility","block-visibility")),l&&(0,e.createElement)("span",{className:"pro-badge"},"Pro"))),(0,e.createElement)("div",{className:"masthead__plugin-links"},p)))}function m(t){var n;const{variables:i}=t,o=null!==(n=null==i?void 0:i.plugin_variables)&&void 0!==n?n:[],l={plugin:{title:(0,r.__)("Block Visibility","block-visibility")+" "+o.version,url:"https://www.blockvisibilitywp.com/?utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",rel:"external"},docs:{title:(0,r.__)("Knowledge Base","block-visibility"),url:"https://www.blockvisibilitywp.com/knowledge-base/?bv_query=knowledge_base&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",rel:"external"},support:{title:(0,r.__)("Support","block-visibility"),url:o.support_url},repo:{title:(0,r.__)("GitHub","block-visibility"),url:"https://github.com/ndiego/block-visibility"},twitter:{title:(0,r.__)("Twitter","block-visibility"),url:"https://twitter.com/BlockVisibility"}};(0,s.applyFilters)("blockVisibility.FooterLinks",l);const a=Object.keys(l).map((t=>{var n;const i=null!==(n=l[t].rel)&&void 0!==n?n:"noreferrer";return(0,e.createElement)("a",{key:t,href:l[t].url,className:"footer-links__"+t,target:"_blank",rel:i},l[t].title)}));return(0,e.createElement)("div",{className:"footer"},(0,e.createElement)("div",{className:"inner-container"},a))}function b(){return b=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"save",n="";"reset"===e?(l("resetting"),n={reset:f}):"resetAll"===e?(l("resetting"),n={reset:"all"}):(l("saving"),n=(0,t.assign)({...p},{[f]:v}));const i=`${blockVisibilityRestUrl}block-visibility/v1/settings`,o=await fetch(i,{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json","X-WP-Nonce":wpApiSettings.nonce}});if(o.ok){const t=await o.json();m(t),"reset"===e||"resetAll"===e?(l("reset"),u(!1)):(l("saved"),g(!1))}else l("error")}return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"setting-controls__save-settings"},["saving"===i&&(0,e.createElement)(a.Animate,{type:"loading"},(t=>{let{className:n}=t;return(0,e.createElement)("span",{className:o()("message",n)},(0,e.createElement)(c,{icon:d.cloud}),(0,r.__)("Saving","block-visibility"))})),"error"===i&&(0,e.createElement)("span",{className:"message update-failed"},(0,r.__)("Update failed. Try again or contact support.","block-visibility"))],"saving"!==i&&(0,e.createElement)(a.Button,{className:"reset-settings__save-button",onClick:()=>u(!0),isTertiary:!0},(0,r.__)("Reset Settings","block-visibility")),(0,e.createElement)(a.Button,{className:o()("save-settings__save-button",{"is-busy":"saving"===i}),onClick:()=>y(),disabled:!b&&"error"!==i,isPrimary:!0},h)),s&&(0,e.createElement)(a.Modal,{className:"block-visibility__reset-modal",title:(0,r.__)("Reset Settings","block-visibility"),onRequestClose:()=>u(!1)},(0,e.createElement)("p",null,(0,r.__)("Resetting will restore all configured settings on the current tab to their default values. To restore all plugin settings, choose Reset All.","block-visibility")),(0,e.createElement)("div",{className:"block-visibility__reset-modal--buttons"},(0,e.createElement)("div",{className:"block-visibility__reset-modal--buttons-reset"},(0,e.createElement)(a.Button,{isPrimary:!0,onClick:()=>y("reset")},(0,r.__)("Reset","block-visibility")),(0,e.createElement)(a.Button,{isSecondary:!0,onClick:()=>y("resetAll")},(0,r.__)("Reset All","block-visibility")),"resetting"===i&&(0,e.createElement)(a.Spinner,null)),(0,e.createElement)(a.Button,{isTertiary:!0,onClick:()=>u(!1)},(0,r.__)("Cancel","block-visibility"))),"error"===i&&(0,e.createElement)("div",{className:"message update-failed"},(0,r.__)("Reset failed. Try again or contact support.","block-visibility"))))}var f=window.wp.primitives,v=(0,e.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(f.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));function h(t){const{message:n,subMessage:i,link:o,position:l}=t,s=null!=l?l:"middle left";return(0,e.createElement)("div",{className:"information-popover"},(0,e.createElement)(a.DropdownMenu,{label:(0,r.__)("More Information","block-visibility"),icon:v,toggleProps:{className:"information-popover__button"},popoverProps:{className:"information-popover__popover",focusOnMount:"container",position:s,noArrow:!1}},(()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",null,n),i&&(0,e.createElement)("p",null,i),o&&(0,e.createElement)(a.ExternalLink,{href:o},(0,r.__)("Learn More","block-visibility"))))))}var y=window.React,_=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?O(A,--F):0,T--,10===R&&(T=1,N--),R}function H(){return R=F2||G(R)>3?"":" "}function K(e,t){for(;--t&&H()&&!(R<48||R>102||R>57&&R<65||R>70&&R<97););return j(e,U()+(t<6&&32==$()&&32==H()))}function X(e){for(;H();)switch(R){case e:return F;case 34:case 39:34!==e&&39!==e&&X(R);break;case 40:41===e&&X(e);break;case 92:H()}return F}function Q(e,t){for(;H()&&e+R!==57&&(e+R!==84||47!==$()););return"/*"+j(t,F-1)+"*"+k(47===e?e:H())}function J(e){for(;!G($());)H();return j(e,F)}var ee="-ms-",te="-moz-",ne="-webkit-",ie="comm",oe="rule",re="decl",le="@keyframes";function ae(e,t){for(var n="",i=V(e),o=0;o6)switch(O(e,t+1)){case 109:if(45!==O(e,t+4))break;case 102:return S(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+te+(108==O(e,t+3)?"$3":"$2-$3"))+e;case 115:return~x(e,"stretch")?ce(S(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==O(e,t+1))break;case 6444:switch(O(e,M(e)-3-(~x(e,"!important")&&10))){case 107:return S(e,":",":"+ne)+e;case 101:return S(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ne+(45===O(e,14)?"inline-":"")+"box$3$1"+ne+"$2$3$1"+ee+"$2box$3")+e}break;case 5936:switch(O(e,t+11)){case 114:return ne+e+ee+S(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ne+e+ee+S(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ne+e+ee+S(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ne+e+ee+e+e}return e}function ue(e){var t=V(e);return function(n,i,o,r){for(var l="",a=0;a-1&&!e.return)switch(e.type){case re:e.return=ce(e.value,e.length);break;case le:return ae([D(e,{value:S(e.value,"@","@"+ne)})],i);case oe:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return ae([D(e,{props:[S(t,/:(read-\w+)/,":-moz-$1")]})],i);case"::placeholder":return ae([D(e,{props:[S(t,/:(plac\w+)/,":-webkit-input-$1")]}),D(e,{props:[S(t,/:(plac\w+)/,":-moz-$1")]}),D(e,{props:[S(t,/:(plac\w+)/,ee+"input-$1")]})],i)}return""}))}}function me(e){return q(be("",null,null,null,[""],e=Z(e),0,[0],e))}function be(e,t,n,i,o,r,l,a,s){for(var c=0,u=0,d=l,p=0,m=0,b=0,g=1,f=1,v=1,h=0,y="",_=o,w=r,E=i,C=y;f;)switch(b=h,h=H()){case 40:if(108!=b&&58==C.charCodeAt(d-1)){-1!=x(C+=S(W(h),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:C+=W(h);break;case 9:case 10:case 13:case 32:C+=Y(b);break;case 92:C+=K(U()-1,7);continue;case 47:switch($()){case 42:case 47:P(fe(Q(H(),U()),t,n),s);break;default:C+="/"}break;case 123*g:a[c++]=M(C)*v;case 125*g:case 59:case 0:switch(h){case 0:case 125:f=0;case 59+u:m>0&&M(C)-d&&P(m>32?ve(C+";",i,n,d-1):ve(S(C," ","")+";",i,n,d-2),s);break;case 59:C+=";";default:if(P(E=ge(C,t,n,c,u,o,a,y,_=[],w=[],d),r),123===h)if(0===u)be(C,t,E,E,_,r,d,a,w);else switch(p){case 100:case 109:case 115:be(e,E,E,i&&P(ge(e,E,E,0,0,o,a,y,o,_=[],d),w),o,w,d,a,i?_:w);break;default:be(C,E,E,E,[""],w,0,a,w)}}c=u=m=0,g=v=1,y=C="",d=l;break;case 58:d=1+M(C),m=b;default:if(g<1)if(123==h)--g;else if(125==h&&0==g++&&125==z())continue;switch(C+=k(h),h*g){case 38:v=u>0?1:(C+="\f",-1);break;case 44:a[c++]=(M(C)-1)*v,v=1;break;case 64:45===$()&&(C+=W(H())),p=$(),u=d=M(y=C+=J(U())),h++;break;case 45:45===b&&2==M(C)&&(g=0)}}return r}function ge(e,t,n,i,o,r,l,a,s,c,u){for(var d=o-1,p=0===o?r:[""],m=V(p),b=0,g=0,f=0;b0?p[v]+" "+h:S(h,/&\f/g,p[v])))&&(s[f++]=y);return B(e,t,n,0===o?oe:a,s,c,u)}function fe(e,t,n){return B(e,t,n,ie,k(R),L(e,2,-2),0)}function ve(e,t,n,i){return B(e,t,n,re,L(e,0,i),L(e,i+1,-1),i)}var he=function(e,t,n){for(var i=0,o=0;i=o,o=$(),38===i&&12===o&&(t[n]=1),!G(o);)H();return j(e,F)},ye=new WeakMap,_e=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,i=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ye.get(n))&&!i){ye.set(e,!0);for(var o=[],r=function(e,t){return q(function(e,t){var n=-1,i=44;do{switch(G(i)){case 0:38===i&&12===$()&&(t[n]=1),e[n]+=he(F-1,t,n);break;case 2:e[n]+=W(i);break;case 4:if(44===i){e[++n]=58===$()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=k(i)}}while(i=H());return e}(Z(e),t))}(t,o),l=n.props,a=0,s=0;a=4;++i,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(i+2))<<16;case 2:n^=(255&e.charCodeAt(i+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(i)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},Le={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Me=/[A-Z]|^ms/g,Ve=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Pe=function(e){return 45===e.charCodeAt(1)},Ne=function(e){return null!=e&&"boolean"!=typeof e},Te=function(e){var t=Object.create(null);return function(e){return void 0===t[e]&&(t[e]=Pe(n=e)?n:n.replace(Me,"-$&").toLowerCase()),t[e];var n}}(),Ie=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Ve,(function(e,t,n){return Re={name:t,styles:n,next:Re},t}))}return 1===Le[e]||Pe(e)||"number"!=typeof t||0===t?t:t+"px"};function Fe(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Re={name:n.name,styles:n.styles,next:Re},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)Re={name:i.name,styles:i.styles,next:Re},i=i.next;return n.styles+";"}return function(e,t,n){var i="";if(Array.isArray(n))for(var o=0;o=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n-1}function xt(e){return St(e)?window.pageYOffset:e.scrollTop}function Ot(e,t){St(e)?window.scrollTo(0,t):e.scrollTop=t}function Lt(e,t,n,i){return n*((e=e/i-1)*e*e+1)+t}function Mt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_t,o=xt(e),r=t-o,l=10,a=0;function s(){var t=Lt(a+=l,o,r,n);Ot(e,t),a=b)return{placement:"bottom",maxHeight:t};if(C>=b&&!l)return r&&Mt(s,S,O),{placement:"bottom",maxHeight:t};if(!l&&C>=i||l&&k>=i)return r&&Mt(s,S,O),{placement:"bottom",maxHeight:l?k-y:C-y};if("auto"===o||l){var L=t,M=l?w:E;return M>=i&&(L=Math.min(M-y-a.controlHeight,t)),{placement:"top",maxHeight:L}}if("bottom"===o)return r&&Ot(s,S),{placement:"bottom",maxHeight:t};break;case"top":if(w>=b)return{placement:"top",maxHeight:t};if(E>=b&&!l)return r&&Mt(s,x,O),{placement:"top",maxHeight:t};if(!l&&E>=i||l&&w>=i){var V=t;return(!l&&E>=i||l&&w>=i)&&(V=l?w-_:E-_),r&&Mt(s,x,O),{placement:"top",maxHeight:V}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}var Bt=function(e){return"auto"===e?"bottom":e},Dt=(0,y.createContext)({getPortalPlacement:null}),zt=function(e){ut(n,e);var t=ht(n);function n(){var e;lt(this,n);for(var i=arguments.length,o=new Array(i),r=0;r1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(i,r?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,i=e.options,o=e.label,r=void 0===o?"":o,l=e.selectValue,a=e.isDisabled,s=e.isSelected,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&l)return"value ".concat(r," focused, ").concat(c(l,n),".");if("menu"===t){var u=a?" disabled":"",d="".concat(s?"selected":"focused").concat(u);return"option ".concat(r," ").concat(d,", ").concat(c(i,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},En=function(e){var t=e.ariaSelection,n=e.focusedOption,i=e.focusedValue,o=e.focusableOptions,r=e.isFocused,l=e.selectValue,a=e.selectProps,s=e.id,c=a.ariaLiveMessages,u=a.getOptionLabel,d=a.inputValue,p=a.isMulti,m=a.isOptionDisabled,b=a.isSearchable,g=a.menuIsOpen,f=a.options,v=a.screenReaderStatus,h=a.tabSelectsValue,_=a["aria-label"],w=a["aria-live"],k=(0,y.useMemo)((function(){return gt(gt({},kn),c||{})}),[c]),E=(0,y.useMemo)((function(){var e,n="";if(t&&k.onChange){var i=t.option,o=t.options,r=t.removedValue,a=t.removedValues,s=t.value,c=r||i||(e=s,Array.isArray(e)?null:e),d=c?u(c):"",p=o||a||void 0,b=p?p.map(u):[],g=gt({isDisabled:c&&m(c,l),label:d,labels:b},t);n=k.onChange(g)}return n}),[t,k,m,l,u]),C=(0,y.useMemo)((function(){var e="",t=n||i,o=!!(n&&l&&l.includes(n));if(t&&k.onFocus){var r={focused:t,label:u(t),isDisabled:m(t,l),isSelected:o,options:f,context:t===n?"menu":"value",selectValue:l};e=k.onFocus(r)}return e}),[n,i,u,m,k,f,l]),S=(0,y.useMemo)((function(){var e="";if(g&&f.length&&k.onFilter){var t=v({count:o.length});e=k.onFilter({inputValue:d,resultsMessage:t})}return e}),[o,d,g,k,f,v]),x=(0,y.useMemo)((function(){var e="";if(k.guidance){var t=i?"value":g?"menu":"input";e=k.guidance({"aria-label":_,context:t,isDisabled:n&&m(n,l),isMulti:p,isSearchable:b,tabSelectsValue:h})}return e}),[_,n,i,p,m,b,g,k,l,h]),O="".concat(C," ").concat(S," ").concat(x),L=Ye(y.Fragment,null,Ye("span",{id:"aria-selection"},E),Ye("span",{id:"aria-context"},O)),M="initial-input-focus"===(null==t?void 0:t.action);return Ye(y.Fragment,null,Ye(wn,{id:s},M&&L),Ye(wn,{"aria-live":w,"aria-atomic":"false","aria-relevant":"additions text"},r&&!M&&L))},Cn=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Sn=new RegExp("["+Cn.map((function(e){return e.letters})).join("")+"]","g"),xn={},On=0;On1?t-1:0),i=1;i0,g=d-p-u,f=!1;g>t&&l.current&&(i&&i(e),l.current=!1),b&&a.current&&(r&&r(e),a.current=!1),b&&t>g?(n&&!l.current&&n(e),m.scrollTop=d,f=!0,l.current=!0):!b&&-t>u&&(o&&!a.current&&o(e),m.scrollTop=0,f=!0,a.current=!0),f&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[n,i,o,r]),d=(0,y.useCallback)((function(e){u(e,e.deltaY)}),[u]),p=(0,y.useCallback)((function(e){s.current=e.changedTouches[0].clientY}),[]),m=(0,y.useCallback)((function(e){var t=s.current-e.changedTouches[0].clientY;u(e,t)}),[u]),b=(0,y.useCallback)((function(e){if(e){var t=!!It&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",m,t)}}),[m,p,d]),g=(0,y.useCallback)((function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",m,!1))}),[m,p,d]);return(0,y.useEffect)((function(){if(t){var e=c.current;return b(e),function(){g(e)}}}),[t,b,g]),function(e){c.current=e}}({isEnabled:void 0===i||i,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),r=function(e){var t=e.isEnabled,n=e.accountForScrollbars,i=void 0===n||n,o=(0,y.useRef)({}),r=(0,y.useRef)(null),l=(0,y.useCallback)((function(e){if($n){var t=document.body,n=t&&t.style;if(i&&Rn.forEach((function(e){var t=n&&n[e];o.current[e]=t})),i&&Un<1){var r=parseInt(o.current.paddingRight,10)||0,l=document.body?document.body.clientWidth:0,a=window.innerWidth-l+r||0;Object.keys(An).forEach((function(e){var t=An[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(a,"px"))}t&&Hn()&&(t.addEventListener("touchmove",Bn,jn),e&&(e.addEventListener("touchstart",zn,jn),e.addEventListener("touchmove",Dn,jn))),Un+=1}}),[i]),a=(0,y.useCallback)((function(e){if($n){var t=document.body,n=t&&t.style;Un=Math.max(Un-1,0),i&&Un<1&&Rn.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&Hn()&&(t.removeEventListener("touchmove",Bn,jn),e&&(e.removeEventListener("touchstart",zn,jn),e.removeEventListener("touchmove",Dn,jn)))}}),[i]);return(0,y.useEffect)((function(){if(t){var e=r.current;return l(e),function(){a(e)}}}),[t,l,a]),function(e){r.current=e}}({isEnabled:n});return Ye(y.Fragment,null,n&&Ye("div",{onClick:Gn,css:Zn}),t((function(e){o(e),r(e)})))}var Wn={clearIndicator:on,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,i=e.theme,o=i.colors,r=i.borderRadius,l=i.spacing;return{label:"control",alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:r,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):void 0,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:nn,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,i=n.spacing.baseUnit,o=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*i,marginTop:2*i,width:1}},input:function(e){var t=e.isDisabled,n=e.value,i=e.theme,o=i.spacing,r=i.colors;return gt({margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,visibility:t?"hidden":"visible",color:r.neutral80,transform:n?"translateZ(0)":""},dn)},loadingIndicator:function(e){var t=e.isFocused,n=e.size,i=e.theme,o=i.colors,r=i.spacing.baseUnit;return{label:"loadingIndicator",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:Ut,menu:function(e){var t,n=e.placement,i=e.theme,o=i.borderRadius,r=i.spacing,l=i.colors;return dt(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),dt(t,"backgroundColor",l.neutral0),dt(t,"borderRadius",o),dt(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),dt(t,"marginBottom",r.menuGutter),dt(t,"marginTop",r.menuGutter),dt(t,"position","absolute"),dt(t,"width","100%"),dt(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,i=e.position;return{left:t.left,position:i,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,i=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:i/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,i=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:i.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o||void 0===o?"ellipsis":void 0,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,i=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:i/2,backgroundColor:e.isFocused?o.dangerLight:void 0,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:$t,option:function(e){var t=e.isDisabled,n=e.isFocused,i=e.isSelected,o=e.theme,r=o.spacing,l=o.colors;return{label:"option",backgroundColor:i?l.primary:n?l.primary25:"transparent",color:t?l.neutral20:i?l.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*r.baseUnit,"px ").concat(3*r.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:t?void 0:i?l.primary:l.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,gridArea:"1 / 1 / 2 / 3",marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2}},singleValue:function(e){var t=e.isDisabled,n=e.theme,i=n.spacing,o=n.colors;return{label:"singleValue",color:t?o.neutral40:o.neutral80,gridArea:"1 / 1 / 2 / 3",marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2,maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},valueContainer:function(e){var t=e.theme.spacing,n=e.isMulti,i=e.hasValue,o=e.selectProps.controlShouldRenderValue;return{alignItems:"center",display:n&&i&&o?"flex":"grid",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Yn={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Kn={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Vt(),captureMenuScroll:!Vt(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=gt({ignoreCase:!0,ignoreAccents:!0,stringify:Tn,trim:!0,matchFrom:"any"},undefined),i=n.ignoreCase,o=n.ignoreAccents,r=n.stringify,l=n.trim,a=n.matchFrom,s=l?Nn(t):t,c=l?Nn(r(e)):r(e);return i&&(s=s.toLowerCase(),c=c.toLowerCase()),o&&(s=Pn(s),c=Vn(c)),"start"===a?c.substr(0,s.length)===s:c.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0};function Xn(e,t,n,i){return{type:"option",data:t,isDisabled:ii(e,t,n),isSelected:oi(e,t,n),label:ti(e,t),value:ni(e,t),index:i}}function Qn(e,t){return e.options.map((function(n,i){if("options"in n){var o=n.options.map((function(n,i){return Xn(e,n,t,i)})).filter((function(t){return ei(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:i}:void 0}var r=Xn(e,n,t,i);return ei(e,r)?r:void 0})).filter(Ft)}function Jn(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,fn(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function ei(e,t){var n=e.inputValue,i=void 0===n?"":n,o=t.data,r=t.isSelected,l=t.label,a=t.value;return(!li(e)||!r)&&ri(e,{label:l,value:a,data:o},i)}var ti=function(e,t){return e.getOptionLabel(t)},ni=function(e,t){return e.getOptionValue(t)};function ii(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function oi(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var i=ni(e,t);return n.some((function(t){return ni(e,t)===i}))}function ri(e,t,n){return!e.filterOption||e.filterOption(t,n)}var li=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},ai=1,si=function(e){ut(n,e);var t=ht(n);function n(e){var i;return lt(this,n),(i=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.instancePrefix="",i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(e){i.controlRef=e},i.focusedOptionRef=null,i.getFocusedOptionRef=function(e){i.focusedOptionRef=e},i.menuListRef=null,i.getMenuListRef=function(e){i.menuListRef=e},i.inputRef=null,i.getInputRef=function(e){i.inputRef=e},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(e,t){var n=i.props,o=n.onChange,r=n.name;t.name=r,i.ariaOnChange(e,t),o(e,t)},i.setValue=function(e,t,n){var o=i.props,r=o.closeMenuOnSelect,l=o.isMulti,a=o.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:a}),r&&(i.setState({inputIsHiddenAfterUpdate:!l}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(e,{action:t,option:n})},i.selectOption=function(e){var t=i.props,n=t.blurInputOnSelect,o=t.isMulti,r=t.name,l=i.state.selectValue,a=o&&i.isOptionSelected(e,l),s=i.isOptionDisabled(e,l);if(a){var c=i.getOptionValue(e);i.setValue(l.filter((function(e){return i.getOptionValue(e)!==c})),"deselect-option",e)}else{if(s)return void i.ariaOnChange(e,{action:"select-option",option:e,name:r});o?i.setValue([].concat(fn(l),[e]),"select-option",e):i.setValue(e,"select-option")}n&&i.blurInput()},i.removeValue=function(e){var t=i.props.isMulti,n=i.state.selectValue,o=i.getOptionValue(e),r=n.filter((function(e){return i.getOptionValue(e)!==o})),l=Rt(t,r,r[0]||null);i.onChange(l,{action:"remove-value",removedValue:e}),i.focusInput()},i.clearValue=function(){var e=i.state.selectValue;i.onChange(Rt(i.props.isMulti,[],null),{action:"clear",removedValues:e})},i.popValue=function(){var e=i.props.isMulti,t=i.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),r=Rt(e,o,o[0]||null);i.onChange(r,{action:"pop-value",removedValue:n})},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n5||r>5}},i.onTouchEnd=function(e){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(e.target)&&i.menuListRef&&!i.menuListRef.contains(e.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(e){i.userIsDragging||i.onControlMouseDown(e)},i.onClearIndicatorTouchEnd=function(e){i.userIsDragging||i.onClearIndicatorMouseDown(e)},i.onDropdownIndicatorTouchEnd=function(e){i.userIsDragging||i.onDropdownIndicatorMouseDown(e)},i.handleInputChange=function(e){var t=i.props.inputValue,n=e.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(n,{action:"input-change",prevInputValue:t}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(e){i.props.onFocus&&i.props.onFocus(e),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(e){var t=i.props.inputValue;i.menuListRef&&i.menuListRef.contains(document.activeElement)?i.inputRef.focus():(i.props.onBlur&&i.props.onBlur(e),i.onInputChange("",{action:"input-blur",prevInputValue:t}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1}))},i.onOptionHover=function(e){i.blockOptionHover||i.state.focusedOption===e||i.setState({focusedOption:e})},i.shouldHideSelectedOptions=function(){return li(i.props)},i.onKeyDown=function(e){var t=i.props,n=t.isMulti,o=t.backspaceRemovesValue,r=t.escapeClearsValue,l=t.inputValue,a=t.isClearable,s=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,m=i.state,b=m.focusedOption,g=m.focusedValue,f=m.selectValue;if(!(s||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(i.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||l)return;i.focusValue("previous");break;case"ArrowRight":if(!n||l)return;i.focusValue("next");break;case"Delete":case"Backspace":if(l)return;if(g)i.removeValue(g);else{if(!o)return;n?i.popValue():a&&i.clearValue()}break;case"Tab":if(i.isComposing)return;if(e.shiftKey||!c||!d||!b||p&&i.isOptionSelected(b,f))return;i.selectOption(b);break;case"Enter":if(229===e.keyCode)break;if(c){if(!b)return;if(i.isComposing)return;i.selectOption(b);break}return;case"Escape":c?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:l}),i.onMenuClose()):a&&r&&i.clearValue();break;case" ":if(l)return;if(!c){i.openMenu("first");break}if(!b)return;i.selectOption(b);break;case"ArrowUp":c?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":c?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!c)return;i.focusOption("pageup");break;case"PageDown":if(!c)return;i.focusOption("pagedown");break;case"Home":if(!c)return;i.focusOption("first");break;case"End":if(!c)return;i.focusOption("last");break;default:return}e.preventDefault()}},i.instancePrefix="react-select-"+(i.props.instanceId||++ai),i.state.selectValue=Et(e.value),i}return st(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(e){var t,n,i,o,r,l=this.props,a=l.isDisabled,s=l.menuIsOpen,c=this.state.isFocused;(c&&!a&&e.isDisabled||c&&s&&!e.menuIsOpen)&&this.focusInput(),c&&a&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,i=t.getBoundingClientRect(),o=n.getBoundingClientRect(),r=n.offsetHeight/3,o.bottom+r>i.bottom?Ot(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+r,t.scrollHeight)):o.top-r-1&&(l=a)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:r[l]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,i=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(i);i||(o=-1);var r=n.length-1,l=-1;if(n.length){switch(e){case"previous":l=0===o?0:-1===o?r:o-1;break;case"next":o>-1&&o0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,i=this.getFocusableOptions();if(i.length){var o=0,r=i.indexOf(n);n||(r=-1),"up"===e?o=r>0?r-1:i.length-1:"down"===e?o=(r+1)%i.length:"pageup"===e?(o=r-t)<0&&(o=0):"pagedown"===e?(o=r+t)>i.length-1&&(o=i.length-1):"last"===e&&(o=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[o],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Yn):gt(gt({},Yn),this.props.theme):Yn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,i=this.getValue,o=this.selectOption,r=this.setValue,l=this.props,a=l.isMulti,s=l.isRtl,c=l.options;return{clearValue:e,cx:t,getStyles:n,getValue:i,hasValue:this.hasValue(),isMulti:a,isRtl:s,options:c,selectOption:o,selectProps:l,setValue:r,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return ii(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return oi(this.props,e,t)}},{key:"filterOption",value:function(e,t){return ri(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,i=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:i})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,i=e.inputId,o=e.inputValue,r=e.tabIndex,l=e.form,a=e.menuIsOpen,s=this.getComponents().Input,c=this.state,u=c.inputIsHidden,d=c.ariaSelection,p=this.commonProps,m=i||this.getElementId("input"),g=gt(gt(gt({"aria-autocomplete":"list","aria-expanded":a,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],role:"combobox"},a&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==d?void 0:d.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?y.createElement(s,b({},p,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:u,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:r,form:l,type:"text",value:o},g)):y.createElement(Fn,b({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:_t,onFocus:this.onInputFocus,disabled:t,tabIndex:r,inputMode:"none",form:l,value:""},g))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,i=t.MultiValueContainer,o=t.MultiValueLabel,r=t.MultiValueRemove,l=t.SingleValue,a=t.Placeholder,s=this.commonProps,c=this.props,u=c.controlShouldRenderValue,d=c.isDisabled,p=c.isMulti,m=c.inputValue,g=c.placeholder,f=this.state,v=f.selectValue,h=f.focusedValue,_=f.isFocused;if(!this.hasValue()||!u)return m?null:y.createElement(a,b({},s,{key:"placeholder",isDisabled:d,isFocused:_,innerProps:{id:this.getElementId("placeholder")}}),g);if(p)return v.map((function(t,l){var a=t===h,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return y.createElement(n,b({},s,{components:{Container:i,Label:o,Remove:r},isFocused:a,isDisabled:d,key:c,index:l,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(m)return null;var w=v[0];return y.createElement(l,b({},s,{data:w,isDisabled:d}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,i=n.isDisabled,o=n.isLoading,r=this.state.isFocused;if(!this.isClearable()||!e||i||!this.hasValue()||o)return null;var l={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return y.createElement(e,b({},t,{innerProps:l,isFocused:r}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,i=n.isDisabled,o=n.isLoading,r=this.state.isFocused;return e&&o?y.createElement(e,b({},t,{innerProps:{"aria-hidden":"true"},isDisabled:i,isFocused:r})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var i=this.commonProps,o=this.props.isDisabled,r=this.state.isFocused;return y.createElement(n,b({},i,{isDisabled:o,isFocused:r}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,i=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return y.createElement(e,b({},t,{innerProps:o,isDisabled:n,isFocused:i}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,i=t.GroupHeading,o=t.Menu,r=t.MenuList,l=t.MenuPortal,a=t.LoadingMessage,s=t.NoOptionsMessage,c=t.Option,u=this.commonProps,d=this.state.focusedOption,p=this.props,m=p.captureMenuScroll,g=p.inputValue,f=p.isLoading,v=p.loadingMessage,h=p.minMenuHeight,_=p.maxMenuHeight,w=p.menuIsOpen,k=p.menuPlacement,E=p.menuPosition,C=p.menuPortalTarget,S=p.menuShouldBlockScroll,x=p.menuShouldScrollIntoView,O=p.noOptionsMessage,L=p.onMenuScrollToTop,M=p.onMenuScrollToBottom;if(!w)return null;var V,P=function(t,n){var i=t.type,o=t.data,r=t.isDisabled,l=t.isSelected,a=t.label,s=t.value,p=d===o,m=r?void 0:function(){return e.onOptionHover(o)},g=r?void 0:function(){return e.selectOption(o)},f="".concat(e.getElementId("option"),"-").concat(n),v={id:f,onClick:g,onMouseMove:m,onMouseOver:m,tabIndex:-1};return y.createElement(c,b({},u,{innerProps:v,data:o,isDisabled:r,isSelected:l,key:f,label:a,type:i,value:s,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())V=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,r=t.options,l=t.index,a="".concat(e.getElementId("group"),"-").concat(l),s="".concat(a,"-heading");return y.createElement(n,b({},u,{key:a,data:o,options:r,Heading:i,headingProps:{id:s,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return P(e,"".concat(l,"-").concat(e.index))})))}if("option"===t.type)return P(t,"".concat(t.index))}));else if(f){var N=v({inputValue:g});if(null===N)return null;V=y.createElement(a,u,N)}else{var T=O({inputValue:g});if(null===T)return null;V=y.createElement(s,u,T)}var I={minMenuHeight:h,maxMenuHeight:_,menuPlacement:k,menuPosition:E,menuShouldScrollIntoView:x},F=y.createElement(zt,b({},u,I),(function(t){var n=t.ref,i=t.placerProps,l=i.placement,a=i.maxHeight;return y.createElement(o,b({},u,I,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove,id:e.getElementId("listbox")},isLoading:f,placement:l}),y.createElement(qn,{captureEnabled:m,onTopArrive:L,onBottomArrive:M,lockEnabled:S},(function(t){return y.createElement(r,b({},u,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:f,maxHeight:a,focusedOption:d}),V)})))}));return C||"fixed"===E?y.createElement(l,b({},u,{appendTo:C,controlElement:this.controlRef,menuPlacement:k,menuPosition:E}),F):F}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,i=t.isDisabled,o=t.isMulti,r=t.name,l=this.state.selectValue;if(r&&!i){if(o){if(n){var a=l.map((function(t){return e.getOptionValue(t)})).join(n);return y.createElement("input",{name:r,type:"hidden",value:a})}var s=l.length>0?l.map((function(t,n){return y.createElement("input",{key:"i-".concat(n),name:r,type:"hidden",value:e.getOptionValue(t)})})):y.createElement("input",{name:r,type:"hidden"});return y.createElement("div",null,s)}var c=l[0]?this.getOptionValue(l[0]):"";return y.createElement("input",{name:r,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,i=t.focusedOption,o=t.focusedValue,r=t.isFocused,l=t.selectValue,a=this.getFocusableOptions();return y.createElement(En,b({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:i,focusedValue:o,isFocused:r,selectValue:l,focusableOptions:a}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,i=e.SelectContainer,o=e.ValueContainer,r=this.props,l=r.className,a=r.id,s=r.isDisabled,c=r.menuIsOpen,u=this.state.isFocused,d=this.commonProps=this.getCommonProps();return y.createElement(i,b({},d,{className:l,innerProps:{id:a,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:u}),this.renderLiveRegion(),y.createElement(t,b({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:u,menuIsOpen:c}),y.createElement(o,b({},d,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),y.createElement(n,b({},d,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,i=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,r=t.ariaSelection,l=t.isFocused,a=t.prevWasFocused,s=e.options,c=e.value,u=e.menuIsOpen,d=e.inputValue,p=e.isMulti,m=Et(c),b={};if(n&&(c!==n.value||s!==n.options||u!==n.menuIsOpen||d!==n.inputValue)){var g=u?function(e,t){return Jn(Qn(e,t))}(e,m):[],f=i?function(e,t){var n=e.focusedValue,i=e.selectValue.indexOf(n);if(i>-1){if(t.indexOf(n)>-1)return n;if(i-1?n:t[0]}(t,g);b={selectValue:m,focusedOption:v,focusedValue:f,clearFocusValueOnUpdate:!1}}var h=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},y=r,_=l&&a;return l&&!_&&(y={value:Rt(p,m,m[0]||null),options:m,action:"initial-input-focus"},_=!a),"initial-input-focus"===(null==r?void 0:r.action)&&(y=null),gt(gt(gt({},b),h),{},{prevProps:e,ariaSelection:y,prevWasFocused:_})}}]),n}(y.Component);si.defaultProps=Kn;var ci=(0,y.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,i=e.defaultMenuIsOpen,o=void 0!==i&&i,r=e.defaultValue,l=void 0===r?null:r,a=e.inputValue,s=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,p=e.onMenuOpen,m=e.value,b=tt(e,gn),g=ot((0,y.useState)(void 0!==a?a:n),2),f=g[0],v=g[1],h=ot((0,y.useState)(void 0!==s?s:o),2),_=h[0],w=h[1],k=ot((0,y.useState)(void 0!==m?m:l),2),E=k[0],C=k[1],S=(0,y.useCallback)((function(e,t){"function"==typeof c&&c(e,t),C(e)}),[c]),x=(0,y.useCallback)((function(e,t){var n;"function"==typeof u&&(n=u(e,t)),v(void 0!==n?n:e)}),[u]),O=(0,y.useCallback)((function(){"function"==typeof p&&p(),w(!0)}),[p]),L=(0,y.useCallback)((function(){"function"==typeof d&&d(),w(!1)}),[d]),M=void 0!==a?a:f,V=void 0!==s?s:_,P=void 0!==m?m:E;return gt(gt({},b),{},{inputValue:M,menuIsOpen:V,onChange:S,onInputChange:x,onMenuClose:L,onMenuOpen:O,value:P})}(e);return y.createElement(si,b({ref:t},n))})),ui=(y.Component,ci);function di(n){var i,o;const{settings:l,setSettings:c,setHasUpdates:u,variables:p}=n,m=null!==(i=null==l?void 0:l.plugin_settings)&&void 0!==i?i:{};let b=function(e,n){var i;let o=[];if(!e||!n||0===e.length||0===n.length)return o;let l=function(){let e=[{label:(0,r.__)("Hide Block","block-visibility"),type:"core",attributeSlug:"hideBlock",settingSlug:"hide_block"},{label:(0,r.__)("Date & Time","block-visibility"),type:"core",attributeSlug:"dateTime",settingSlug:"date_time"},{label:(0,r.__)("User Role","block-visibility"),type:"core",attributeSlug:"userRole",settingSlug:"visibility_by_role"},{label:(0,r.__)("Screen Size","block-visibility"),type:"core",attributeSlug:"screenSize",settingSlug:"screen_size"},{label:(0,r.__)("Query String","block-visibility"),type:"core",attributeSlug:"queryString",settingSlug:"query_string"}];e=(0,s.applyFilters)("blockVisibility.coreControls",e),e.sort(((e,t)=>e.attributeSlug.localeCompare(t.attributeSlug)));let t=[{label:(0,r.__)("Advanced Custom Fields","block-visibility"),type:"integration",attributeSlug:"acf",settingSlug:"acf",icon:d.acf},{label:(0,r.__)("WP Fusion","block-visibility"),type:"integration",attributeSlug:"wpFusion",settingSlug:"wp_fusion",icon:d.wpFusion}];t=(0,s.applyFilters)("blockVisibility.integrationControls",t),t.sort(((e,t)=>e.attributeSlug.localeCompare(t.attributeSlug)));let n=[...e,...t];return n=(0,s.applyFilters)("blockVisibility.controls",n),n}();l.forEach((function(e){"integration"!==e.type||(e=>{let t=!1;var i,o;return null!=n&&n.integrations&&(t=null!==(i=null==n||null===(o=n.integrations[e])||void 0===o?void 0:o.active)&&void 0!==i&&i),t})(e.settingSlug)||(l=l.filter((t=>t.settingSlug!==e.settingSlug)))}));const a=null!==(i=null==e?void 0:e.visibility_controls)&&void 0!==i?i:{};return(0,t.isEmpty)(a)||l.forEach((function(e){var n,i;let r=!1;(0,t.has)(a,e.settingSlug)||(r=!0),(null===(n=null===(i=a[e.settingSlug])||void 0===i?void 0:i.enable)||void 0===n||n)&&(r=!0),r&&o.push(e)})),o=(0,s.applyFilters)("blockVisibility.enabledControls",o,e,n),o}(l,p);b=b.filter((e=>"hide_block"!==e.settingSlug&&"visibility_presets"!==e.settingSlug));const g=[];b.forEach((e=>{g.push({label:e.label,value:e.settingSlug})}));const f=null!==(o=null==m?void 0:m.default_controls)&&void 0!==o?o:["date_time","visibility_by_role","screen_size"],v=g.filter((e=>f.includes(e.value)));return(0,e.createElement)("div",{className:"setting-tabs__settings-panel two-columns"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,r.__)("General","block-visibility"))),(0,e.createElement)(a.Slot,{name:"VisibilityControlsGeneralTop"}),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__select has-info-popover"},(0,e.createElement)("div",null,(0,e.createElement)("span",null,(0,r.__)("Default visibility controls","block-visibility")),(0,e.createElement)(ui,{className:"block-visibility__react-select",classNamePrefix:"react-select",placeholder:(0,r.__)("Select Controls…","block-visibility"),options:g,value:v,onChange:e=>(e=>{const t=[];0!==e.length&&e.forEach((e=>{t.push(e.value)})),c({...l,plugin_settings:{...m,default_controls:t}}),u(!0)})(e),isMulti:!0}),(0,e.createElement)("div",{className:"settings-panel__help"},(0,r.__)("If no controls are selected, the plugin will default to Date & Time, User Role, and Screen Size.","block-visibility"))),(0,e.createElement)(h,{message:(0,r.__)("Optionally set the default controls that will be available when editing a block's visibility for the first time. This can be useful if you find yourself using the same few controls frequently. Controls can be disabled entirely on the Visibility Controls tab.","block-visibility")})),(0,e.createElement)(a.Slot,{name:"VisibilityControlsGeneralBottom"})))}function pi(t){var n,i;const{visibilityControls:o,setVisibilityControls:l}=t,s=null===(n=null==o||null===(i=o.hide_block)||void 0===i?void 0:i.enable)||void 0===n||n;return(0,e.createElement)("div",{className:"setting-tabs__settings-panel"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,r.__)("Hide Block","block-visibility"))),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Enable the Hide Block control.","block-visibility"),checked:s,onChange:()=>{l({...o,hide_block:{...o.hide_block,enable:!s}})}}),(0,e.createElement)(h,{message:(0,r.__)("The Hide Block control allows you easily hide blocks on the frontend of your website. This control overrides all other controls when enabled on a block. Visit the plugin Knowledge Base for more information and examples of how this control can be used for content management.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-hide-block-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"}))))}function mi(t){var n,i;const{visibilityControls:o,setVisibilityControls:l}=t,s=null===(n=null==o||null===(i=o.date_time)||void 0===i?void 0:i.enable)||void 0===n||n;return(0,e.createElement)("div",{className:"setting-tabs__settings-panel"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,r.__)("Date & Time","block-visibility"))),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Enable the Date & Time controls.","block-visibility"),checked:s,onChange:()=>{l({...o,date_time:{...o.date_time,enable:!s}})}}),(0,e.createElement)(h,{message:(0,r.__)("The Date & Time control allows you to conditionally display blocks based on time and date settings, which includes the ability to schedule blocks. Visit the plugin Knowledge Base for more information.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-date-time-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)(a.Slot,{name:"DateTimeControls"})))}function bi(t){var n,i,o,l,s,c,u,d;const{visibilityControls:p,setVisibilityControls:m}=t,b=null===(n=null==p||null===(i=p.visibility_by_role)||void 0===i?void 0:i.enable)||void 0===n||n,g=null===(o=null==p||null===(l=p.visibility_by_role)||void 0===l?void 0:l.enable_user_roles)||void 0===o||o,f=null===(s=null==p||null===(c=p.visibility_by_role)||void 0===c?void 0:c.enable_users)||void 0===s||s,v=null===(u=null==p||null===(d=p.visibility_by_role)||void 0===d?void 0:d.enable_user_rule_sets)||void 0===u||u;let y=(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Enable individual user role restrictions (Administrator, Editor, Subscriber, etc.)","block-visibility"),checked:g,onChange:()=>{m({...p,visibility_by_role:{...p.visibility_by_role,enable_user_roles:!g}})}}),_=(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Enable individual user restrictions.","block-visibility"),checked:f,onChange:()=>{m({...p,visibility_by_role:{...p.visibility_by_role,enable_users:!f}})}}),w=(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Enable advanced user role restrictions (User rule sets)","block-visibility"),checked:v,onChange:()=>{m({...p,visibility_by_role:{...p.visibility_by_role,enable_user_rule_sets:!v}})}});return b||(y=(0,e.createElement)(a.Disabled,null,y),_=(0,e.createElement)(a.Disabled,null,_),w=(0,e.createElement)(a.Disabled,null,w)),(0,e.createElement)("div",{className:"setting-tabs__settings-panel"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,r.__)("User Role","block-visibility"))),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Enable the User Role controls.","block-visibility"),checked:b,onChange:()=>{m({...p,visibility_by_role:{...p.visibility_by_role,enable:!b}})}}),(0,e.createElement)(h,{message:(0,r.__)("The User Role control allows you to conditionally display blocks based on whether a user is logged-in, logged-out, and more. Visit the plugin Knowledge Base for more information.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-user-role-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)("hr",null),(0,e.createElement)("div",{className:"settings-type__toggle first has-info-popover subsetting"},y,(0,e.createElement)(h,{message:(0,r.__)("Restrict visibility by any user role (Administrator, Editor, Subscriber, etc.). Roles that are added by third-party plugins will also be available to choose from.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-user-role-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover subsetting"},_,(0,e.createElement)(h,{message:(0,r.__)("Restrict visibility to specific individual users on your website based on user ID. Multiple users can be selected at once.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-user-role-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover subsetting"},w,(0,e.createElement)(h,{message:(0,r.__)("This functionality allows you to create user-based rule sets, which provide extensive configuration options and greater flexibilty.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-user-role-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)(a.Slot,{name:"VisibilityByRoleControls"})))}function gi(t){const[n,i]=(0,e.useState)(!1),{screenSize:o,enableAdvancedControls:l}=t,s=function(e){const t=e.breakpoints.large,n=e.breakpoints.medium,i=e.controls.large,o=e.controls.medium,r=e.controls.small;let l="";return i&&(l=`/* Large screens (desktops, ${t} and up) */\n@media ( min-width: ${t} ) {\n\t.block-visibility-hide-large-screen {\n\t\tdisplay: none !important;\n\t}\n}`),o&&(l=(l?l+"\n\n":l)+`/* Medium screens (tablets, between ${n} and ${t}) */\n@media ( min-width: ${n} ) and ( max-width: ${fi(t)} ) {\n\t.block-visibility-hide-medium-screen {\n\t\tdisplay: none !important;\n\t}\n}`),r&&(l=(l?l+"\n\n":l)+`/* Small screens (mobile devices, less than ${n}) */\n@media ( max-width: ${fi(n)} ) {\n\t.block-visibility-hide-small-screen {\n\t\tdisplay: none !important;\n\t}\n}`),l||(l="/* All screen size controls have been disabled. */"),l}(o),c=function(e){const t=e.breakpoints.extra_large,n=e.breakpoints.large,i=e.breakpoints.medium,o=e.breakpoints.small,r=e.controls.extra_large,l=e.controls.large,a=e.controls.medium,s=e.controls.small,c=e.controls.extra_small,u="\n\n";let d="";return r&&(d=`/* Extra large screens (large desktops, ${t} and up) */\n@media ( min-width: ${t} ) {\n\t.block-visibility-hide-extra-large-screen {\n\t\tdisplay: none !important;\n\t}\n}`),l&&(d=(d?d+u:d)+`/* Large screens (desktops, between ${n} and ${t}) */\n@media ( min-width: ${n} ) and (max-width: ${fi(t)} ) {\n\t.block-visibility-hide-large-screen {\n\t\tdisplay: none !important;\n\t}\n}`),a&&(d=(d?d+u:d)+`/* Medium screens (tablets, between ${i} and ${n}) */\n@media ( min-width: ${i} ) and ( max-width: ${fi(n)} ) {\n\t.block-visibility-hide-medium-screen {\n\t\tdisplay: none !important;\n\t}\n}`),s&&(d=(d?d+u:d)+`/* Small screens (landscape mobile devices, between ${o} and ${n}) */\n@media ( min-width: ${o} ) and ( max-width: ${fi(i)} ) {\n\t.block-visibility-hide-small-screen {\n\t\tdisplay: none !important;\n\t}\n}`),c&&(d=(d?d+u:d)+`/* Extra small screens (portrait mobile devices, less than ${o}) */\n@media ( max-width: ${fi(o)} ) {\n\t.block-visibility-hide-extra-small-screen {\n\t\tdisplay: none !important;\n\t}\n}`),d||(d="/* All screen size controls have been disabled. */"),d}(o);return(0,e.createElement)("div",{className:"breakpoint-css-preview subsetting"},(0,e.createElement)(a.Button,{onClick:()=>i(!n),isSecondary:!0},[!n&&(0,r.__)("Preview Frontend CSS","block-visibility"),n&&(0,r.__)("Hide Preview","block-visibility")]),n&&(0,e.createElement)("pre",null,[l&&c,!l&&s]))}function fi(e){return(0,t.trim)(e,"px")-.02+"px"}function vi(t){const{visibilityControls:n,setVisibilityControls:i,screenSize:o,enableAdvancedControls:l}=t,s={extra_large:{title:(0,r.__)("Extra Large","block-visibility"),description:(0,r.__)("Large desktop screen sizes.")},large:{title:(0,r.__)("Large","block-visibility"),description:(0,r.__)("Desktop and tablet (landscape) screen sizes.","block-visibility")},medium:{title:(0,r.__)("Medium","block-visibility"),description:(0,r.__)("Tablet (portrait) screen sizes.","block-visibility")},small:{title:(0,r.__)("Small","block-visibility"),description:(0,r.__)("Mobile (landscape) screen sizes.","block-visibility")}};return(0,e.createElement)("div",{className:"breakpoints-container"},(0,e.createElement)("div",{className:"settings-label"},(0,e.createElement)("span",null,(0,r.__)("Breakpoints","block-visibility")),(0,e.createElement)(h,{message:(0,r.__)("The plugin sets a series of breakpoints which enable the Screen Size control automatically. However for best results, you can configure the breakpoints to correspond with the media breakpoints of your current theme.","block-visibility"),subMessage:(0,r.__)("The default breakpoints are Large (992px) and Medium (768px). Advanced screen size controls add Extra Large (1200px) and Small (576px).","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-screen-size-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),Object.entries(s).map((t=>{let[r,s]=t;const c=o.breakpoints[r];return"extra_large"!==r&&"small"!==r||l?(0,e.createElement)("div",{className:"breakpoint",key:r},(0,e.createElement)("div",{className:"breakpoint-inputs"},(0,e.createElement)(a.__experimentalUnitControl,{label:s.title,value:c,onChange:e=>function(e,t){i({...n,screen_size:{...o,breakpoints:{...o.breakpoints,[e]:t}}})}(r,e),units:[{value:"px",label:"px"}]}),(0,e.createElement)("div",{className:"settings-panel__help"},s.description))):null})))}function hi(t){const{visibilityControls:n,setVisibilityControls:i,screenSize:o,enableAdvancedControls:l}=t;function s(e,t){i({...n,screen_size:{...o,controls:{...o.controls,[e]:t}}})}return(0,e.createElement)("div",{className:"controls-container"},(0,e.createElement)("div",{className:"settings-label"},(0,e.createElement)("span",null,(0,r.__)("Controls","block-visibility")),(0,e.createElement)(h,{message:(0,r.__)("The settings below allow you to restrict which controls are available to users in the Block/Site Editor. Disabling controls will remove the corresponding CSS from the frontend of your website.","block-visibility"),subMessage:(0,r.__)("The default controls are Desktop, Tablet, and Mobile. Advanced screen size controls add Large Desktop and Mobile (portrait).","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-screen-size-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),l&&(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Enable large desktop control","block-visibility"),help:(0,r.sprintf)(// translators: %s: extra large breakpoint +(0,r.__)("Allows users to hide blocks on extra large screen sizes, %s and up.","block-visibility"),o.breakpoints.extra_large),checked:o.controls.extra_large,onChange:()=>s("extra_large",!o.controls.extra_large)}),(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Enable desktop control","block-visibility"),help:[!l&&(0,r.sprintf)(// translators: %s large breakpoint +(0,r.__)("Allows users to hide blocks on large screen sizes, %s and up.","block-visibility"),o.breakpoints.large),l&&(0,r.sprintf)(// translators: %1$s: large breakpoint %2$s: extra large breakpoint +(0,r.__)("Allows users to hide blocks on large screen sizes, between %1$s and %2$s.","block-visibility"),o.breakpoints.large,o.breakpoints.extra_large)],checked:o.controls.large,onChange:()=>s("large",!o.controls.large)}),(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Enable tablet control","block-visibility"),help:(0,r.sprintf)(// translators: %1$s: medium breakpoint %2$s: large breakpoint +(0,r.__)("Allows users to hide blocks on medium screen sizes, between %1$s and %2$s.","block-visibility"),o.breakpoints.medium,o.breakpoints.large),checked:o.controls.medium,onChange:()=>s("medium",!o.controls.medium)}),(0,e.createElement)(a.ToggleControl,{label:[!l&&(0,r.__)("Enable mobile control","block-visibility"),l&&(0,r.__)("Enable mobile (landscape) control","block-visibility")],help:[!l&&(0,r.sprintf)(// translators: %s: medium breakpoint +(0,r.__)("Allows users to hide blocks on small screen sizes, less than %s.","block-visibility"),o.breakpoints.medium),l&&(0,r.sprintf)(// translators: %1$s: small breakpoint %2$s: medium breakpoint +(0,r.__)("Allows users to hide blocks on small screen sizes, between %1$s and %2$s.","block-visibility"),o.breakpoints.small,o.breakpoints.medium)],checked:o.controls.small,onChange:()=>s("small",!o.controls.small)}),l&&(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Enable mobile (portrait) control","block-visibility"),help:(0,r.sprintf)(// translators: %s: small breakpoint +(0,r.__)("Allows users to hide blocks on extra small screen sizes, less than %s.","block-visibility"),o.breakpoints.small),checked:o.controls.extra_small,onChange:()=>s("extra_small",!o.controls.extra_small)}))}function yi(t){const{visibilityControls:n,setVisibilityControls:i}=t;let o;o=null!=n&&n.screen_size?n.screen_size:{enable:!0,breakpoints:{extra_large:"1200px",large:"992px",medium:"768px",small:"576px"},controls:{extra_large:!0,large:!0,medium:!0,small:!0,extra_small:!0},enable_advanced_controls:!1,enable_frontend_css:!0};let l=(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"breakpoint-control-container subsetting"},(0,e.createElement)(vi,{visibilityControls:n,setVisibilityControls:i,screenSize:o,enableAdvancedControls:o.enable_advanced_controls}),(0,e.createElement)(hi,{visibilityControls:n,setVisibilityControls:i,screenSize:o,enableAdvancedControls:o.enable_advanced_controls})),(0,e.createElement)(gi,{screenSize:o,enableAdvancedControls:o.enable_advanced_controls})),s=(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Enable advanced screen size controls.","block-visibility"),checked:o.enable_advanced_controls,onChange:()=>{i({...n,screen_size:{...o,enable_advanced_controls:!o.enable_advanced_controls}})}}),c=(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Load screen size CSS on the frontend of this website.","block-visibility"),checked:o.enable_frontend_css,onChange:()=>{i({...n,screen_size:{...o,enable_frontend_css:!o.enable_frontend_css}})}});return o.enable||(l=(0,e.createElement)(a.Disabled,null,l),s=(0,e.createElement)(a.Disabled,null,s),c=(0,e.createElement)(a.Disabled,null,c)),(0,e.createElement)("div",{className:"setting-tabs__settings-panel two-columns"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,r.__)("Screen Size","block-visibility"))),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Enable the Screen Size controls.","block-visibility"),checked:o.enable,onChange:()=>{i({...n,screen_size:{...o,enable:!o.enable}})}}),(0,e.createElement)(h,{message:(0,r.__)("The Screen Size control allows you to conditionally display blocks on the current width of the browser window, or in other words, the screen size of a user's device. Visit the plugin Knowledge Base for more information.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-screen-size-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)("hr",null),l,(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover subsetting"},s,(0,e.createElement)(h,{message:(0,r.__)("By default, the Screen Size control includes two breakpoints and three controls for users to hide blocks. There are certain situations where you may need more control over when a block should be visible, for example in the case of very large or small screens. Enabling advanced controls provides these options.","block-visibility"),subMessage:(0,r.__)("Note that once enabled, any block that is only using the advanced controls to hide at extra large, or extra small, breakpoints will become visible again if this setting is ever disabled in the future.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-screen-size-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover subsetting"},c,(0,e.createElement)(h,{message:(0,r.__)('By default, the CSS needed for the Screen Size controls is loaded on the frontend of your website. If disabled, you will need to add the CSS manually to your theme in order for the Screen Size controls to work properly. This CSS code is available via the "Preview Frontend CSS" button on this page.',"block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-screen-size-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)(a.Slot,{name:"ScreenSizeControls"})))}function _i(t){var n,i;const{visibilityControls:o,setVisibilityControls:l}=t,s=null===(n=null==o||null===(i=o.query_string)||void 0===i?void 0:i.enable)||void 0===n||n;return(0,e.createElement)("div",{className:"setting-tabs__settings-panel"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,r.__)("Query String","block-visibility"))),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Enable the Query String control.","block-visibility"),checked:s,onChange:()=>{l({...o,query_string:{...o.query_string,enable:!s}})}}),(0,e.createElement)(h,{message:(0,r.__)("The Query String control allows you to conditionally display blocks based on URL query strings. Visit the plugin Knowledge Base for more information.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-query-string-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"}))))}function wi(t){var n,i,o,l,s;const{variables:u,visibilityControls:p,setVisibilityControls:m}=t;if(null===(n=null==u||null===(i=u.integrations)||void 0===i||null===(o=i.acf)||void 0===o?void 0:o.active)||void 0===n||!n)return null;const b=null===(l=null==p||null===(s=p.acf)||void 0===s?void 0:s.enable)||void 0===l||l;return(0,e.createElement)("div",{className:"setting-tabs__settings-panel"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,e.createElement)(c,{icon:d.acf}),(0,r.__)("Advanced Custom Fields","block-visibility"))),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Enable the Advanced Custom Fields control.","block-visibility"),checked:b,onChange:()=>{m({...p,acf:{...p.acf,enable:!b}})}}),(0,e.createElement)(h,{message:(0,r.__)("The Advanced Custom Fields (ACF) control allows you to conditionally display blocks, including ACF blocks, based on ACF fields. Visit the plugin Knowledge Base for more information.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-advanced-custom-fields-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"}))))}function ki(t){var n,i,o,l,s;const{variables:u,visibilityControls:p,setVisibilityControls:m}=t;if(null===(n=null==u||null===(i=u.integrations)||void 0===i||null===(o=i.wp_fusion)||void 0===o?void 0:o.active)||void 0===n||!n)return null;const b=null===(l=null==p||null===(s=p.wp_fusion)||void 0===s?void 0:s.enable)||void 0===l||l;return(0,e.createElement)("div",{className:"setting-tabs__settings-panel"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,e.createElement)(c,{icon:d.wpFusion}),(0,r.__)("WP Fusion","block-visibility"))),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Enable the WP Fusion control.","block-visibility"),checked:b,onChange:()=>{m({...p,wp_fusion:{...p.wp_fusion,enable:!b}})}}),(0,e.createElement)(h,{message:(0,r.__)("The WP Fusion control allows you to conditionally display blocks based on WP Fusion tags. Visit the plugin Knowledge Base for more information.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-use-the-wp-fusion-control/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"}))))}function Ei(t){var n;const{variables:i,visibilityControls:o}=t;let l=null!==(n=null==i?void 0:i.integrations)&&void 0!==n?n:{};return l=Object.keys(l).map((e=>l[e])),l=l.filter((e=>!0===e.active)),0===l.length?null:(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"setting-tabs__setting-controls integrations"},(0,e.createElement)("div",{className:"setting-controls__title"},(0,e.createElement)("span",null,(0,r.__)("Third-Party Integration Controls","block-visibility")),(0,e.createElement)(h,{message:(0,r.__)("The settings below allow you to configure all third-party integration controls for Block Visibility. If you are looking for an integration, and do not see it below, make sure the respective third-party plugin is installed and activated on your website.","block-visibility"),subMessage:(0,r.__)("Visit the plugin Knowledge Base for more information on configuring third-party integration controls and what integrations are currently available in Block Visibility.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/guide-to-third-party-integrations-in-block-visibility/?utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)(g,b({tabSlug:"visibility_controls",tabSettings:o},t))),(0,e.createElement)(a.Slot,{name:"VisibilityControlsIntegrationsTop"}),(0,e.createElement)(wi,t),(0,e.createElement)(ki,t),(0,e.createElement)(a.Slot,{name:"VisibilityControlsIntegrationsBottom"}))}const Ci=(0,a.withFilters)("blockVisibility.VisibilityControls")((t=>(0,e.createElement)(e.Fragment,null)));function Si(t){var n;const[i,o]=(0,e.useState)(!1),{settings:l,setSettings:s}=t,c=null!==(n=null==l?void 0:l.visibility_controls)&&void 0!==n?n:{};function u(e){s({...l,visibility_controls:e}),o(!0)}return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"setting-tabs__visibility-controls inner-container"},(0,e.createElement)("div",{className:"setting-tabs__setting-controls"},(0,e.createElement)("div",{className:"setting-controls__title"},(0,e.createElement)("span",null,(0,r.__)("Visibility Controls","block-visibility")),(0,e.createElement)(h,{message:(0,r.__)("The settings below allow you to configure the visibility controls that power Block Visibility. Pick and choose which controls you would like to enable and how you would like them to function.","block-visibility"),subMessage:(0,r.__)("When a visibility control is disabled, blocks that relied on the disabled control will become visible again unless they are hidden by other enabled controls. Visit the plugin Knowledge Base for more information on configuring visibility controls.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/guide-to-visibility-controls-in-block-visibility/?utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)(g,b({tabSlug:"visibility_controls",tabSettings:c,hasUpdates:i,setHasUpdates:o},t))),(0,e.createElement)(a.Slot,{name:"VisibilityControlsTop"}),(0,e.createElement)(di,b({visibilityControls:c,setVisibilityControls:u,setHasUpdates:o},t)),(0,e.createElement)(pi,b({visibilityControls:c,setVisibilityControls:u},t)),(0,e.createElement)(_i,b({visibilityControls:c,setVisibilityControls:u},t)),(0,e.createElement)(mi,b({visibilityControls:c,setVisibilityControls:u},t)),(0,e.createElement)(bi,b({visibilityControls:c,setVisibilityControls:u},t)),(0,e.createElement)(yi,b({visibilityControls:c,setVisibilityControls:u},t)),(0,e.createElement)(a.Slot,{name:"VisibilityControlsMiddle"}),(0,e.createElement)(Ei,b({visibilityControls:c,setVisibilityControls:u,hasUpdates:i,setHasUpdates:o},t)),(0,e.createElement)(a.Slot,{name:"VisibilityControlsBottom"}),(0,e.createElement)(Ci,b({visibilityControls:c,setVisibilityControls:u},t))),(0,e.createElement)(a.Slot,{name:"SettingsTabPanelBottom"}))}var xi=window.wp.data,Oi=window.wp.blockEditor;function Li(t){const{blockType:n,disabledBlocks:i,handleBlockTypeChange:o}=t,r=!i.includes(n.name);return(0,e.createElement)("li",{key:n.name,className:"blocks-category__block"},(0,e.createElement)(a.CheckboxControl,{checked:r,onChange:e=>function(e){o(e,n.name)}(e),label:(0,e.createElement)("span",null,n.title,n.icon&&(0,e.createElement)(Oi.BlockIcon,{icon:n.icon}))}))}function Mi(n){const{blockTypes:i,category:o,disabledBlocks:r,handleBlockCategoryChange:l,handleBlockTypeChange:s}=n;if(!i.length)return null;const c=(0,t.map)(i,"name"),u=(0,t.without)(c,...r),d=u.length===c.length;let p;p=d?"true":u.length>0?"mixed":"false";const m="block-manager__category-title-"+o.slug;return(0,e.createElement)("div",{role:"group","aria-labelledby":m,className:"block-manager__block-category"},(0,e.createElement)("div",{className:"block-category__title"},(0,e.createElement)(a.CheckboxControl,{checked:d,onChange:e=>function(e){const n=(0,t.map)(i,"name");l(e,n)}(e),"aria-checked":p,label:(0,e.createElement)("span",{id:m},o.title,o.icon&&(0,e.createElement)(Oi.BlockIcon,{icon:o.icon}))})),(0,e.createElement)("ul",{className:"block-category__blocks-list"},i.map((t=>(0,e.createElement)(Li,{key:t,blockType:t,handleBlockTypeChange:s,disabledBlocks:r})))))}var Vi=(0,xi.withSelect)((e=>{const{getCategories:t,getBlockTypes:n,hasBlockSupport:i,isMatchingSearchTerm:o}=e("core/blocks");return{blockTypes:n(),categories:t(),hasBlockSupport:i,isMatchingSearchTerm:o}}))((function(n){var i,o,l;const[s,c]=(0,e.useState)(!1),[u,p]=(0,e.useState)(""),{settings:m,setSettings:f,blockTypes:v,categories:y,hasBlockSupport:_,isMatchingSearchTerm:w}=n,k=null!==(i=null==m?void 0:m.disabled_blocks)&&void 0!==i?i:{};function E(e){f({...m,disabled_blocks:e}),c(!0)}function C(e,n){let i=[...k];i=e?(0,t.difference)(i,n):(0,t.union)(i,n),E(i),c(!0)}function S(e,n){let i=[...k];e?i=(0,t.without)(i,n):i.push(n),E(i),c(!0)}let x;x=null!==(o=null==m||null===(l=m.plugin_settings)||void 0===l?void 0:l.enable_full_control_mode)&&void 0!==o&&o?v:v.filter((e=>_(e,"inserter",!0)&&!e.parent));const O=["core/freeform"];x=x.filter((e=>!O.includes(e.name)));const L=x.filter((e=>!u||w(e,u))),M=(0,t.intersection)(k,(0,t.map)(L,"name")),V=(0,t.intersection)(k,(0,t.map)(x,"name"));let P=d.visibility,N=(0,r.__)("Visibility is enabled for all blocks","block-visibility");return V.length&&(P=d.visibilityHidden,N=(0,r.sprintf)( /* translators: %s: The total number of visible block types */ -(0,l._n)("Visibility is disabled for %s block type","Visibility is disabled for %s block types",V.length,"block-visibility"),V.length)),(0,e.createElement)("div",{className:"setting-tabs__block-manager inner-container"},(0,e.createElement)("div",{className:"setting-tabs__setting-controls"},(0,e.createElement)("div",{className:"setting-controls__title"},(0,e.createElement)("span",null,(0,l.__)("Block Manager","block-visibility")),(0,e.createElement)(h,{message:(0,l.__)("Not every block type may need visibility controls. The Block Manager allows you to restrict visibility controls to specific block types. If you are looking for a block, and do not see it listed, you may need to enable Full Control Mode on the General Settings tab.","block-visibility"),subMessage:(0,l.__)("To learn more about the Block Manager, review the plugin documentation using the link below.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-configure-the-block-manager/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)(g,b({tabSlug:"disabled_blocks",tabSettings:k,hasUpdates:s,setHasUpdates:c},n))),(0,e.createElement)("div",{className:"setting-tabs__setting-controls"},(0,e.createElement)(a.TextControl,{className:"setting-controls__search-blocks",type:"search",placeholder:(0,l.__)("Search for a block","block-visibility"),value:u,onChange:e=>p(e)}),(0,e.createElement)("span",{className:"message"},(0,e.createElement)(a.Icon,{icon:P}),N)),(0,e.createElement)("div",{className:"block-manager__category-container"},y.map((n=>(0,e.createElement)(Ei,{key:n.slug,category:n,blockTypes:(0,t.filter)(L,{category:n.slug}),disabledBlocks:M,handleBlockCategoryChange:C,handleBlockTypeChange:S})))))}));function Si(t){var n,i,o,r,s;const{pluginSettings:c,setPluginSettings:u}=t,d=null===(n=null==c?void 0:c.enable_contextual_indicators)||void 0===n||n,p=null!==(i=null==c?void 0:c.contextual_indicator_color)&&void 0!==i?i:"",m=null!==(o=null==c?void 0:c.enable_block_opacity)&&void 0!==o&&o,b=null!==(r=null==c?void 0:c.block_opacity)&&void 0!==r?r:100,g=null===(s=null==c?void 0:c.enable_toolbar_controls)||void 0===s||s,f=[{name:(0,l.__)("Black","block-visibility"),color:"#121212"},{name:(0,l.__)("Light Grey","block-visibility"),color:"#F1F1F1"},{name:(0,l.__)("Red","block-visibility"),color:"#DC3232"},{name:(0,l.__)("Orange","block-visibility"),color:"#F56E28"},{name:(0,l.__)("Yellow","block-visibility"),color:"#FFB900"},{name:(0,l.__)("Green","block-visibility"),color:"#46B450"},{name:(0,l.__)("Medium Blue","block-visibility"),color:"#00A0D2"},{name:(0,l.__)("WordPress Blue","block-visibility"),color:"#0073AA"},{name:(0,l.__)("Purple","block-visibility"),color:"#826EB4"}],v=p||"var(--wp-admin-theme-color)";let y=(0,e.createElement)("div",{className:"settings-type__color"},(0,e.createElement)("div",null,(0,e.createElement)(a.BaseControl,{id:"indicator-color",className:"settings-type__color-selected",label:(0,l.__)("Indicator color","block-visibility")},(0,e.createElement)(a.ColorIndicator,{colorValue:v})),(0,e.createElement)(a.ColorPalette,{colors:f,value:p,onChange:e=>{u({...c,contextual_indicator_color:e})}})));d||(y=(0,e.createElement)(a.Disabled,null,y));let _=(0,e.createElement)("div",{className:"settings-type__range"},(0,e.createElement)(a.RangeControl,{label:(0,l.__)("Block Opacity","block-visibility"),value:b,onChange:e=>{u({...c,block_opacity:e})},min:10,max:100,step:10}));return m||(_=(0,e.createElement)(a.Disabled,null,_)),(0,e.createElement)("div",{className:"setting-tabs__settings-panel"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,l.__)("Block Editor","block-visibility")),(0,e.createElement)(h,{message:(0,l.__)("Settings that impact the Block Editor, such as contextual indicators for when a block has visibility controls, as well as additional toolbar options. Click the link below for complete details.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-configure-the-general-settings/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-label"},(0,e.createElement)("span",null,(0,l.__)("Contextual Indicators","block-visibility"))),(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Enable contextual indicators.","block-visibility"),checked:d,onChange:()=>{u({...c,enable_contextual_indicators:!d})}}),(0,e.createElement)(h,{message:(0,l.__)("Contextual indicators allow users to quickly tell which blocks in the Block Editor have active visibility controls.","block-visibility")})),y,(0,e.createElement)("div",{className:"settings-label"},(0,e.createElement)("span",null,(0,l.__)("Contextual Block Opacity","block-visibility"))),(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Reduce block opacity when visibility controls are applied.","block-visibility"),checked:m,onChange:()=>{u({...c,enable_block_opacity:!m})}}),(0,e.createElement)(h,{message:(0,l.__)("Reducing block opacity, coupled with contextual indicators, can further help users quickly tell which blocks in the Block Editor have active visibility controls.","block-visibility")})),_,(0,e.createElement)("div",{className:"settings-label"},(0,e.createElement)("span",null,(0,l.__)("Toolbar Controls","block-visibility"))),(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Enable block toolbar controls for visibility settings.","block-visibility"),checked:g,onChange:()=>{u({...c,enable_toolbar_controls:!g})}}),(0,e.createElement)(h,{message:(0,l.__)("Some visibility controls (currently just the Hide Block control) can be made available in the toolbar of each block. This provides a more streamlined workflow and can improve content management.","block-visibility")})),(0,e.createElement)(a.Slot,{name:"BlockEditorSettings"})))}function xi(n){var i;const{pluginSettings:o,setPluginSettings:r}=n,s=null!==(i=null==o?void 0:o.enabled_user_roles)&&void 0!==i?i:[];return(0,e.createElement)("div",{className:"subsetting"},["editor","author","contributor"].map((n=>{const i=[...s],l=s.includes(n);if(l){const e=i.indexOf(n);e>-1&&i.splice(e,1)}else-1===i.indexOf(n)&&i.push(n);return(0,e.createElement)(a.CheckboxControl,{key:n,checked:l,label:(0,e.createElement)("span",null,(0,t.startCase)(n)+"s"),onChange:()=>{r({...o,enabled_user_roles:i})}})})),(0,e.createElement)("div",{className:"settings-panel__help"},(0,l.__)("Choose which user roles should be allowed to control visibility settings in the Block Editor. Administrators will always have permission.","block-visibility")))}function Oi(t){var n;const{pluginSettings:i,setPluginSettings:o}=t,r=null!==(n=null==i?void 0:i.enable_user_role_restrictions)&&void 0!==n&&n;let s=(0,e.createElement)(xi,{pluginSettings:i,setPluginSettings:o});return r||(s=(0,e.createElement)(a.Disabled,null,s)),(0,e.createElement)("div",{className:"setting-tabs__settings-panel"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,l.__)("User Permissions","block-visibility"))),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Restrict block visibility controls to selected user roles.","block-visibility"),checked:r,onChange:()=>{o({...i,enable_user_role_restrictions:!r})}}),(0,e.createElement)(h,{message:(0,l.__)("By default, all users that can edit blocks in Block Editor will be able to use the visibility settings provided by Block Visibility. You can limit permissions by user role with these settings.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-configure-the-general-settings/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),s,(0,e.createElement)(a.Slot,{name:"UserPermissionSettings"})))}function Li(t){var n;const{pluginSettings:i,setPluginSettings:o}=t,r=null!==(n=null==i?void 0:i.enable_full_control_mode)&&void 0!==n&&n;return(0,e.createElement)("div",{className:"setting-tabs__settings-panel"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,l.__)("Full Control Mode","block-visibility"))),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,e.createInterpolateElement)((0,l.__)("Enable Full Control Mode to add visibility controls to every block. Use with caution.","block-visibility"),{strong:(0,e.createElement)("strong",null),a:(0,e.createElement)(a.ExternalLink,{href:"https://www.blockvisibilitywp.com/knowledge-base/how-to-configure-the-general-settings/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",target:"_blank",rel:"noreferrer"})}),checked:r,onChange:()=>{o({...i,enable_full_control_mode:!r})}}),(0,e.createElement)(h,{message:(0,l.__)("By default, not all blocks are provided with visibility controls. These include child blocks and blocks that may exist in WordPress, but cannot actually be added directly to the editor. Most of the time, you will not need Full Control Mode, but it's there in case you do. Use with caution. Click the link below for complete details.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-configure-the-general-settings/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"}))))}function Mi(t){var n;const{pluginSettings:i,setPluginSettings:o}=t,r=null!==(n=null==i?void 0:i.remove_on_uninstall)&&void 0!==n&&n;return(0,e.createElement)("div",{className:"setting-tabs__settings-panel"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,l.__)("Uninstall","block-visibility")),(0,e.createElement)(h,{message:(0,l.__)("Settings that impact what happens when the Block Visibility plugin is uninstalled.","block-visibility")})),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__toggle"},(0,e.createElement)(a.ToggleControl,{label:(0,l.__)("Remove all plugin settings when Block Visibility is uninstalled.","block-visibility"),checked:r,onChange:()=>{o({...i,remove_on_uninstall:!r})}}))))}const Vi=(0,a.withFilters)("blockVisibility.PluginSettings")((t=>(0,e.createElement)(e.Fragment,null)));function Pi(t){var n;const[i,o]=(0,e.useState)(!1),{settings:r,setSettings:s}=t,c=null!==(n=null==r?void 0:r.plugin_settings)&&void 0!==n?n:{};function u(e){s({...r,plugin_settings:e}),o(!0)}return(0,e.createElement)("div",{className:"settings-tab__plugin-settings inner-container"},(0,e.createElement)("div",{className:"setting-tabs__setting-controls"},(0,e.createElement)("div",{className:"setting-controls__title"},(0,e.createElement)("span",null,(0,l.__)("General Settings","block-visibility")),(0,e.createElement)(h,{message:(0,l.__)("The settings below allow you to configure general functionality of the Block Visibility plugin. To learn more about General Settings, review the plugin documentation using the link below.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-configure-the-general-settings/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)(g,b({tabSlug:"plugin_settings",tabSettings:c,hasUpdates:i,setHasUpdates:o},t))),(0,e.createElement)(a.Slot,{name:"PluginSettingsTop"}),(0,e.createElement)(Si,b({pluginSettings:c,setPluginSettings:u,setHasUpdates:o},t)),(0,e.createElement)(Oi,b({pluginSettings:c,setPluginSettings:u,setHasUpdates:o},t)),(0,e.createElement)(a.Slot,{name:"PluginSettingsMiddle"}),(0,e.createElement)(Li,b({pluginSettings:c,setPluginSettings:u,setHasUpdates:o},t)),(0,e.createElement)(Mi,b({pluginSettings:c,setPluginSettings:u,setHasUpdates:o},t)),(0,e.createElement)(a.Slot,{name:"PluginSettingsBottom"}),(0,e.createElement)(Vi,b({pluginSettings:c,setPluginSettings:u,setHasUpdates:o},t)))}function Ni(t){const{variables:n}=t;return null!=n&&n.is_pro?null:(0,e.createElement)("div",{className:"ads-container"},(0,e.createElement)("div",{className:"ads-container__pro"},(0,e.createElement)("span",{className:"ads-container__header"},(0,l.__)("Upgrade to Pro","block-visibility")),(0,e.createElement)("p",null,(0,l.__)("Enhance the power of Block Visibility with the Pro add-on.","block-visibility")),(0,e.createElement)("ul",null,(0,e.createElement)("li",null,(0,l.__)("Location control","block-visibility")),(0,e.createElement)("li",null,(0,l.__)("Advanced scheduling","block-visibility")),(0,e.createElement)("li",null,(0,l.__)("Referral Source control","block-visibility")),(0,e.createElement)("li",null,(0,l.__)("eCommerce integrations","block-visibility")),(0,e.createElement)("li",null,(0,l.__)("Premium email support","block-visibility")),(0,e.createElement)("li",null,(0,l.__)("No ads!","block-visibility"))),(0,e.createElement)(a.Button,{href:"https://www.blockvisibilitywp.com/pro/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",target:"__blank",isPrimary:!0},(0,l.__)("Get Block Visibility Pro","block-visibility")," →")),(0,e.createElement)("div",{className:"ads-container__support"},(0,e.createElement)("span",{className:"ads-container__header"},(0,l.__)("Need Support?","block-visibility")),(0,e.createElement)("p",null,(0,l.__)("Whether you need help or have a new feature request, please create a topic in the support forum on WordPress.org.","block-visibility"),(0,e.createElement)(a.ExternalLink,{href:"https://wordpress.org/support/plugin/block-visibility/",target:"_blank",rel:"noreferrer"},(0,l.__)("Support Forum","block-visibility"))),(0,e.createElement)("p",null,(0,l.__)("Detailed documentation is also available on the plugin website.","block-visibility"),(0,e.createElement)(a.ExternalLink,{href:"https://www.blockvisibilitywp.com/knowledge-base/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",target:"_blank"},(0,l.__)("View Knowledge Base","block-visibility")))),(0,e.createElement)("div",{className:"ads-container__reviews"},(0,e.createElement)("span",{className:"ads-container__header"},(0,l.__)("Share Your Feedback","block-visibility")),(0,e.createElement)("p",null,(0,l.__)("If you are enjoying Block Visibility and find it useful, please consider leaving a ★★★★★ review on WordPress.org. Your feedback is greatly appreciated and helps others discover the plugin.","block-visibility"),(0,e.createElement)(a.ExternalLink,{href:"https://wordpress.org/support/plugin/block-visibility/reviews/?filter=5",target:"_blank",rel:"noreferrer"},(0,l.__)("Submit a Review","block-visibility")))))}const Ti=(0,a.withFilters)("blockVisibility.MainSettings")((t=>(0,e.createElement)(e.Fragment,null)));function Ii(){const[n,i]=(0,e.useState)("idle"),[r,c]=(0,e.useState)(null),[u,d]=(0,e.useState)(null);function b(e){c(e)}if((0,e.useEffect)((()=>{async function e(e,t){i("fetching");const n=`${blockVisibilityRestUrl}block-visibility/v1/${e}`,o=await fetch(n,{method:"GET"});o.ok?(t(await o.json()),i("fetched")):i("error")}e("settings",c),e("variables?type=simplified",d)}),[]),!r||!u||"fetched"!==n)return(0,e.createElement)(e.Fragment,null,"error"===n&&(0,e.createElement)("div",{className:"notice notice-error"},(0,e.createElement)("p",null,(0,l.__)("Something went wrong when trying to load the Block Visibility settings. Try refreshing the page. If the error persists, please contact support.","block-visibility"))),(0,e.createElement)("div",{className:"loading-settings"},(0,e.createElement)(a.Spinner,null),(0,e.createElement)("span",{className:"description"},(0,l.__)("Loading settings…","block-visibility"))));const g=[{name:"plugin-settings",title:(0,l.__)("General Settings","block-visibility"),className:"setting-tabs__plugin-settings"},{name:"visibility-controls",title:(0,l.__)("Visibility Controls","block-visibility"),className:"setting-tabs__visibility-controls"},{name:"block-manager",title:(0,l.__)("Block Manager","block-visibility"),className:"setting-tabs__blocks-manager"}];(0,s.applyFilters)("blockVisibility.SettingTabs",g);const f=new URLSearchParams(window.location.search),v=f.get("tab"),h=(0,t.findKey)(g,["name",v])?v:"plugin-settings";return(0,e.createElement)(a.SlotFillProvider,null,(0,e.createElement)(Ti,null),(0,e.createElement)(p,{variables:u}),(0,e.createElement)(a.TabPanel,{className:o()({"setting-tabs":!0,is_pro:null==u?void 0:u.is_pro}),activeClass:"active-tab",initialTabName:h,tabs:g,onSelect:e=>(e=>{if(f.set("tab",e),history.pushState){const e=window.location.protocol+"//"+window.location.host+window.location.pathname+"?"+f.toString()+window.location.hash;window.history.replaceState({path:e},"",e)}else window.location.search=f.toString()})(e)},(t=>{switch(t.name){case"visibility-controls":return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ni,{variables:u}),(0,e.createElement)(yi,{settings:r,setSettings:b,variables:u}));case"block-manager":return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ni,{variables:u}),(0,e.createElement)(Ci,{settings:r,setSettings:b,variables:u}));case"plugin-settings":return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ni,{variables:u}),(0,e.createElement)(Pi,{settings:r,setSettings:b,variables:u}));default:return(0,e.createElement)(a.Slot,{name:"SettingsTabs"})}})),(0,e.createElement)(m,{variables:u}))}wp.domReady((()=>{(0,r.registerCoreBlocks)(),(0,e.render)((0,e.createElement)(Ii,null),document.getElementById("block-visibility-settings-container"))}))}()}(); \ No newline at end of file +(0,r._n)("Visibility is disabled for %s block type","Visibility is disabled for %s block types",V.length,"block-visibility"),V.length)),(0,e.createElement)("div",{className:"setting-tabs__block-manager inner-container"},(0,e.createElement)("div",{className:"setting-tabs__setting-controls"},(0,e.createElement)("div",{className:"setting-controls__title"},(0,e.createElement)("span",null,(0,r.__)("Block Manager","block-visibility")),(0,e.createElement)(h,{message:(0,r.__)("Not every block type may need visibility controls. The Block Manager allows you to restrict visibility controls to specific block types. If you are looking for a block, and do not see it listed, you may need to enable Full Control Mode on the General Settings tab.","block-visibility"),subMessage:(0,r.__)("To learn more about the Block Manager, review the plugin documentation using the link below.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-configure-the-block-manager/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)(g,b({tabSlug:"disabled_blocks",tabSettings:k,hasUpdates:s,setHasUpdates:c},n))),(0,e.createElement)("div",{className:"setting-tabs__setting-controls"},(0,e.createElement)(a.TextControl,{className:"setting-controls__search-blocks",type:"search",placeholder:(0,r.__)("Search for a block","block-visibility"),value:u,onChange:e=>p(e)}),(0,e.createElement)("span",{className:"message"},(0,e.createElement)(a.Icon,{icon:P}),N)),(0,e.createElement)("div",{className:"block-manager__category-container"},y.map((n=>(0,e.createElement)(Mi,{key:n.slug,category:n,blockTypes:(0,t.filter)(L,{category:n.slug}),disabledBlocks:M,handleBlockCategoryChange:C,handleBlockTypeChange:S})))))}));function Pi(t){var n,i,o,l,s;const{pluginSettings:c,setPluginSettings:u}=t,d=null===(n=null==c?void 0:c.enable_contextual_indicators)||void 0===n||n,p=null!==(i=null==c?void 0:c.contextual_indicator_color)&&void 0!==i?i:"",m=null!==(o=null==c?void 0:c.enable_block_opacity)&&void 0!==o&&o,b=null!==(l=null==c?void 0:c.block_opacity)&&void 0!==l?l:100,g=null===(s=null==c?void 0:c.enable_toolbar_controls)||void 0===s||s,f=[{name:(0,r.__)("Black","block-visibility"),color:"#121212"},{name:(0,r.__)("Light Grey","block-visibility"),color:"#F1F1F1"},{name:(0,r.__)("Red","block-visibility"),color:"#DC3232"},{name:(0,r.__)("Orange","block-visibility"),color:"#F56E28"},{name:(0,r.__)("Yellow","block-visibility"),color:"#FFB900"},{name:(0,r.__)("Green","block-visibility"),color:"#46B450"},{name:(0,r.__)("Medium Blue","block-visibility"),color:"#00A0D2"},{name:(0,r.__)("WordPress Blue","block-visibility"),color:"#0073AA"},{name:(0,r.__)("Purple","block-visibility"),color:"#826EB4"}],v=p||"var(--wp-admin-theme-color)";let y=(0,e.createElement)("div",{className:"settings-type__color"},(0,e.createElement)("div",null,(0,e.createElement)(a.BaseControl,{id:"indicator-color",className:"settings-type__color-selected",label:(0,r.__)("Indicator color","block-visibility")},(0,e.createElement)(a.ColorIndicator,{colorValue:v})),(0,e.createElement)(a.ColorPalette,{colors:f,value:p,onChange:e=>{u({...c,contextual_indicator_color:e})}})));d||(y=(0,e.createElement)(a.Disabled,null,y));let _=(0,e.createElement)("div",{className:"settings-type__range"},(0,e.createElement)(a.RangeControl,{label:(0,r.__)("Block Opacity","block-visibility"),value:b,onChange:e=>{u({...c,block_opacity:e})},min:10,max:100,step:10}));return m||(_=(0,e.createElement)(a.Disabled,null,_)),(0,e.createElement)("div",{className:"setting-tabs__settings-panel"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,r.__)("Block Editor","block-visibility")),(0,e.createElement)(h,{message:(0,r.__)("Settings that impact the Block Editor, such as contextual indicators for when a block has visibility controls, as well as additional toolbar options. Click the link below for complete details.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-configure-the-general-settings/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-label"},(0,e.createElement)("span",null,(0,r.__)("Contextual Indicators","block-visibility"))),(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Enable contextual indicators.","block-visibility"),checked:d,onChange:()=>{u({...c,enable_contextual_indicators:!d})}}),(0,e.createElement)(h,{message:(0,r.__)("Contextual indicators allow users to quickly tell which blocks in the Block Editor have active visibility controls.","block-visibility")})),y,(0,e.createElement)("div",{className:"settings-label"},(0,e.createElement)("span",null,(0,r.__)("Contextual Block Opacity","block-visibility"))),(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Reduce block opacity when visibility controls are applied.","block-visibility"),checked:m,onChange:()=>{u({...c,enable_block_opacity:!m})}}),(0,e.createElement)(h,{message:(0,r.__)("Reducing block opacity, coupled with contextual indicators, can further help users quickly tell which blocks in the Block Editor have active visibility controls.","block-visibility")})),_,(0,e.createElement)("div",{className:"settings-label"},(0,e.createElement)("span",null,(0,r.__)("Toolbar Controls","block-visibility"))),(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Enable block toolbar controls for visibility settings.","block-visibility"),checked:g,onChange:()=>{u({...c,enable_toolbar_controls:!g})}}),(0,e.createElement)(h,{message:(0,r.__)("Some visibility controls (currently just the Hide Block control) can be made available in the toolbar of each block. This provides a more streamlined workflow and can improve content management.","block-visibility")})),(0,e.createElement)(a.Slot,{name:"BlockEditorSettings"})))}function Ni(n){var i;const{pluginSettings:o,setPluginSettings:l}=n,s=null!==(i=null==o?void 0:o.enabled_user_roles)&&void 0!==i?i:[];return(0,e.createElement)("div",{className:"subsetting"},["editor","author","contributor"].map((n=>{const i=[...s],r=s.includes(n);if(r){const e=i.indexOf(n);e>-1&&i.splice(e,1)}else-1===i.indexOf(n)&&i.push(n);return(0,e.createElement)(a.CheckboxControl,{key:n,checked:r,label:(0,e.createElement)("span",null,(0,t.startCase)(n)+"s"),onChange:()=>{l({...o,enabled_user_roles:i})}})})),(0,e.createElement)("div",{className:"settings-panel__help"},(0,r.__)("Choose which user roles should be allowed to control visibility settings in the Block Editor. Administrators will always have permission.","block-visibility")))}function Ti(t){var n;const{pluginSettings:i,setPluginSettings:o}=t,l=null!==(n=null==i?void 0:i.enable_user_role_restrictions)&&void 0!==n&&n;let s=(0,e.createElement)(Ni,{pluginSettings:i,setPluginSettings:o});return l||(s=(0,e.createElement)(a.Disabled,null,s)),(0,e.createElement)("div",{className:"setting-tabs__settings-panel"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,r.__)("User Permissions","block-visibility"))),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Restrict block visibility controls to selected user roles.","block-visibility"),checked:l,onChange:()=>{o({...i,enable_user_role_restrictions:!l})}}),(0,e.createElement)(h,{message:(0,r.__)("By default, all users that can edit blocks in Block Editor will be able to use the visibility settings provided by Block Visibility. You can limit permissions by user role with these settings.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-configure-the-general-settings/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),s,(0,e.createElement)(a.Slot,{name:"UserPermissionSettings"})))}function Ii(t){var n;const{pluginSettings:i,setPluginSettings:o}=t,l=null!==(n=null==i?void 0:i.enable_full_control_mode)&&void 0!==n&&n;return(0,e.createElement)("div",{className:"setting-tabs__settings-panel"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,r.__)("Full Control Mode","block-visibility"))),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__toggle has-info-popover"},(0,e.createElement)(a.ToggleControl,{label:(0,e.createInterpolateElement)((0,r.__)("Enable Full Control Mode to add visibility controls to every block. Use with caution.","block-visibility"),{strong:(0,e.createElement)("strong",null),a:(0,e.createElement)(a.ExternalLink,{href:"https://www.blockvisibilitywp.com/knowledge-base/how-to-configure-the-general-settings/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",target:"_blank",rel:"noreferrer"})}),checked:l,onChange:()=>{o({...i,enable_full_control_mode:!l})}}),(0,e.createElement)(h,{message:(0,r.__)("By default, not all blocks are provided with visibility controls. These include child blocks and blocks that may exist in WordPress, but cannot actually be added directly to the editor. Most of the time, you will not need Full Control Mode, but it's there in case you do. Use with caution. Click the link below for complete details.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-configure-the-general-settings/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"}))))}function Fi(t){var n;const{pluginSettings:i,setPluginSettings:o}=t,l=null!==(n=null==i?void 0:i.remove_on_uninstall)&&void 0!==n&&n;return(0,e.createElement)("div",{className:"setting-tabs__settings-panel"},(0,e.createElement)("div",{className:"settings-panel__header"},(0,e.createElement)("span",{className:"settings-panel__header-title"},(0,r.__)("Uninstall","block-visibility")),(0,e.createElement)(h,{message:(0,r.__)("Settings that impact what happens when the Block Visibility plugin is uninstalled.","block-visibility")})),(0,e.createElement)("div",{className:"settings-panel__container"},(0,e.createElement)("div",{className:"settings-type__toggle"},(0,e.createElement)(a.ToggleControl,{label:(0,r.__)("Remove all plugin settings when Block Visibility is uninstalled.","block-visibility"),checked:l,onChange:()=>{o({...i,remove_on_uninstall:!l})}}))))}const Ri=(0,a.withFilters)("blockVisibility.PluginSettings")((t=>(0,e.createElement)(e.Fragment,null)));function Ai(t){var n;const[i,o]=(0,e.useState)(!1),{settings:l,setSettings:s}=t,c=null!==(n=null==l?void 0:l.plugin_settings)&&void 0!==n?n:{};function u(e){s({...l,plugin_settings:e}),o(!0)}return(0,e.createElement)("div",{className:"settings-tab__plugin-settings inner-container"},(0,e.createElement)("div",{className:"setting-tabs__setting-controls"},(0,e.createElement)("div",{className:"setting-controls__title"},(0,e.createElement)("span",null,(0,r.__)("General Settings","block-visibility")),(0,e.createElement)(h,{message:(0,r.__)("The settings below allow you to configure general functionality of the Block Visibility plugin. To learn more about General Settings, review the plugin documentation using the link below.","block-visibility"),link:"https://www.blockvisibilitywp.com/knowledge-base/how-to-configure-the-general-settings/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals"})),(0,e.createElement)(g,b({tabSlug:"plugin_settings",tabSettings:c,hasUpdates:i,setHasUpdates:o},t))),(0,e.createElement)(a.Slot,{name:"PluginSettingsTop"}),(0,e.createElement)(Pi,b({pluginSettings:c,setPluginSettings:u,setHasUpdates:o},t)),(0,e.createElement)(Ti,b({pluginSettings:c,setPluginSettings:u,setHasUpdates:o},t)),(0,e.createElement)(a.Slot,{name:"PluginSettingsMiddle"}),(0,e.createElement)(Ii,b({pluginSettings:c,setPluginSettings:u,setHasUpdates:o},t)),(0,e.createElement)(Fi,b({pluginSettings:c,setPluginSettings:u,setHasUpdates:o},t)),(0,e.createElement)(a.Slot,{name:"PluginSettingsBottom"}),(0,e.createElement)(Ri,b({pluginSettings:c,setPluginSettings:u,setHasUpdates:o},t)))}function Bi(t){const{variables:n}=t;return null!=n&&n.is_pro?null:(0,e.createElement)("div",{className:"ads-container"},(0,e.createElement)("div",{className:"ads-container__pro"},(0,e.createElement)("span",{className:"ads-container__header"},(0,r.__)("Upgrade to Pro","block-visibility")),(0,e.createElement)("p",null,(0,r.__)("Enhance the power of Block Visibility with the Pro add-on.","block-visibility")),(0,e.createElement)("ul",null,(0,e.createElement)("li",null,(0,r.__)("Location control","block-visibility")),(0,e.createElement)("li",null,(0,r.__)("Advanced scheduling","block-visibility")),(0,e.createElement)("li",null,(0,r.__)("Referral Source control","block-visibility")),(0,e.createElement)("li",null,(0,r.__)("eCommerce integrations","block-visibility")),(0,e.createElement)("li",null,(0,r.__)("Premium email support","block-visibility")),(0,e.createElement)("li",null,(0,r.__)("No ads!","block-visibility"))),(0,e.createElement)(a.Button,{href:"https://www.blockvisibilitywp.com/pro/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",target:"__blank",isPrimary:!0},(0,r.__)("Get Block Visibility Pro","block-visibility")," →")),(0,e.createElement)("div",{className:"ads-container__support"},(0,e.createElement)("span",{className:"ads-container__header"},(0,r.__)("Need Support?","block-visibility")),(0,e.createElement)("p",null,(0,r.__)("Whether you need help or have a new feature request, please create a topic in the support forum on WordPress.org.","block-visibility"),(0,e.createElement)(a.ExternalLink,{href:"https://wordpress.org/support/plugin/block-visibility/",target:"_blank",rel:"noreferrer"},(0,r.__)("Support Forum","block-visibility"))),(0,e.createElement)("p",null,(0,r.__)("Detailed documentation is also available on the plugin website.","block-visibility"),(0,e.createElement)(a.ExternalLink,{href:"https://www.blockvisibilitywp.com/knowledge-base/?bv_query=learn_more&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",target:"_blank"},(0,r.__)("View Knowledge Base","block-visibility")))),(0,e.createElement)("div",{className:"ads-container__reviews"},(0,e.createElement)("span",{className:"ads-container__header"},(0,r.__)("Share Your Feedback","block-visibility")),(0,e.createElement)("p",null,(0,r.__)("If you are enjoying Block Visibility and find it useful, please consider leaving a ★★★★★ review on WordPress.org. Your feedback is greatly appreciated and helps others discover the plugin.","block-visibility"),(0,e.createElement)(a.ExternalLink,{href:"https://wordpress.org/support/plugin/block-visibility/reviews/?filter=5",target:"_blank",rel:"noreferrer"},(0,r.__)("Submit a Review","block-visibility")))))}const Di=(0,a.withFilters)("blockVisibility.MainSettings")((t=>(0,e.createElement)(e.Fragment,null)));function zi(){const[n,i]=(0,e.useState)("idle"),[l,c]=(0,e.useState)(null),[u,d]=(0,e.useState)(null);function b(e){c(e)}if((0,e.useEffect)((()=>{async function e(e,t){i("fetching");const n=`${blockVisibilityRestUrl}block-visibility/v1/${e}`,o=await fetch(n,{method:"GET"});o.ok?(t(await o.json()),i("fetched")):i("error")}e("settings",c),e("variables?type=simplified",d)}),[]),!l||!u||"fetched"!==n)return(0,e.createElement)(e.Fragment,null,"error"===n&&(0,e.createElement)("div",{className:"notice notice-error"},(0,e.createElement)("p",null,(0,r.__)("Something went wrong when trying to load the Block Visibility settings. Try refreshing the page. If the error persists, please contact support.","block-visibility"))),(0,e.createElement)("div",{className:"loading-settings"},(0,e.createElement)(a.Spinner,null),(0,e.createElement)("span",{className:"description"},(0,r.__)("Loading settings…","block-visibility"))));const g=[{name:"plugin-settings",title:(0,r.__)("General Settings","block-visibility"),className:"setting-tabs__plugin-settings"},{name:"visibility-controls",title:(0,r.__)("Visibility Controls","block-visibility"),className:"setting-tabs__visibility-controls"},{name:"block-manager",title:(0,r.__)("Block Manager","block-visibility"),className:"setting-tabs__blocks-manager"}];(0,s.applyFilters)("blockVisibility.SettingTabs",g);const f=new URLSearchParams(window.location.search),v=f.get("tab"),h=(0,t.findKey)(g,["name",v])?v:"plugin-settings";return(0,e.createElement)(a.SlotFillProvider,null,(0,e.createElement)(Di,null),(0,e.createElement)(p,{variables:u}),(0,e.createElement)(a.TabPanel,{className:o()({"setting-tabs":!0,is_pro:null==u?void 0:u.is_pro}),activeClass:"active-tab",initialTabName:h,tabs:g,onSelect:e=>(e=>{if(f.set("tab",e),history.pushState){const e=window.location.protocol+"//"+window.location.host+window.location.pathname+"?"+f.toString()+window.location.hash;window.history.replaceState({path:e},"",e)}else window.location.search=f.toString()})(e)},(t=>{switch(t.name){case"visibility-controls":return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Bi,{variables:u}),(0,e.createElement)(Si,{settings:l,setSettings:b,variables:u}));case"block-manager":return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Bi,{variables:u}),(0,e.createElement)(Vi,{settings:l,setSettings:b,variables:u}));case"plugin-settings":return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Bi,{variables:u}),(0,e.createElement)(Ai,{settings:l,setSettings:b,variables:u}));default:return(0,e.createElement)(a.Slot,{name:"SettingsTabs"})}})),(0,e.createElement)(m,{variables:u}))}wp.domReady((()=>{(0,l.registerCoreBlocks)(),(0,e.render)((0,e.createElement)(zi,null),document.getElementById("block-visibility-settings-container"))}))}()}(); \ No newline at end of file