diff --git a/build/block-visibility-editor-styles.css b/build/block-visibility-editor-styles.css index 3779eeb5..1ccfe95d 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{height:22px;min-width:22px;opacity:.3;padding:0}.information-popover .information-popover__button svg{width:22px}.information-popover .information-popover__button:hover,.information-popover .information-popover__button[aria-expanded=true]{opacity:1}.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-external-link svg{margin:0 2px}.information-popover__popover .components-popover__content{font-size:13px;font-weight:400;line-height:1.4;max-width:250px;min-width:220px;padding:12px;text-align:left}.information-popover__popover .components-popover__content>div{padding:0}.block-visibility__react-select .react-select__control{border:1px solid #1e1e1e;border-radius:2px;min-height:40px}.block-visibility__react-select .react-select__control:hover{border:1px solid #1e1e1e}.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__controls-panel{border-top:1px solid #ddd;display:grid;gap:16px;margin-top:-1px;padding:16px}.block-visibility__controls-panel .controls-panel-header{-webkit-box-align:center;-webkit-box-pack:justify;align-items:center;display:flex;flex-direction:row;gap:8px;grid-column:1/-1;justify-content:space-between;width:100%}.block-visibility__controls-panel .controls-panel-header h2{font-weight:500;margin:0}.block-visibility__controls-panel .controls-panel-header .controls-panel-header__dropdown-menus{line-height:0;margin:-4px 0}.block-visibility__controls-panel .controls-panel-header .controls-panel-header__dropdown-menus .components-button{min-width:24px;padding:0}.block-visibility__controls-panel .controls-panel-header .controls-panel-header__dropdown-menus .components-spinner{margin:0 4px}.block-visibility__controls-panel .components-disabled.hide-block-enabled,.block-visibility__controls-panel .controls-panel-container{display:grid;gap:32px}.block-visibility__controls-panel .controls-panel-notices .components-notice{margin:0}.block-visibility__controls-panel .components-button:not(.is-primary):disabled,.block-visibility__controls-panel .components-button[aria-disabled=true]:not(.is-primary){color:currentColor}.controls-panel-container .components-disabled,.preset-manager__content .components-disabled{opacity:.4}.controls-panel-container .components-disabled *,.preset-manager__content .components-disabled *{opacity:1!important}.controls-panel-container .components-button:not(.is-primary):disabled,.controls-panel-container .components-button[aria-disabled=true]:not(.is-primary),.preset-manager__content .components-button:not(.is-primary):disabled,.preset-manager__content .components-button[aria-disabled=true]:not(.is-primary){color:currentColor}.controls-panel-container .components-button.control-tips,.preset-manager__content .components-button.control-tips{height:18px;margin-left:5px;margin-top:-4px;min-width:18px;padding:0!important;vertical-align:middle;width:18px!important}.controls-panel-container .components-button.control-tips:not(:hover),.preset-manager__content .components-button.control-tips:not(:hover){color:#c8c8c8}.controls-panel-container .components-button.control-tips:focus,.preset-manager__content .components-button.control-tips:focus{box-shadow:none!important}.controls-panel-container .components-button.control-tips svg,.preset-manager__content .components-button.control-tips svg{height:18px;width:18px}.controls-panel-container .components-base-control__label,.preset-manager__content .components-base-control__label{display:inline-block;font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase}.controls-panel-container .components-base-control__label .components-base-control__label-hint,.preset-manager__content .components-base-control__label .components-base-control__label-hint{color:#757575}.controls-panel-container .controls-panel-item:last-child,.preset-manager__content .controls-panel-item:last-child{margin-bottom:12px}.controls-panel-container .controls-panel-item .controls-panel-item__header,.preset-manager__content .controls-panel-item .controls-panel-item__header{align-items:center;display:flex;font-size:11px;font-weight:500;line-height:1.4;margin-bottom:14px;margin-top:0;min-height:28px;text-transform:uppercase}.controls-panel-container .controls-panel-item .controls-panel-item__header.has-icon>svg,.preset-manager__content .controls-panel-item .controls-panel-item__header.has-icon>svg{margin-right:8px;width:16px}.controls-panel-container .controls-panel-item .controls-panel-item__header.has-icon span,.preset-manager__content .controls-panel-item .controls-panel-item__header.has-icon span{display:inline-block;margin-right:4px}.controls-panel-container .controls-panel-item .controls-panel-item__header.has-icon .information-popover__button,.preset-manager__content .controls-panel-item .controls-panel-item__header.has-icon .information-popover__button{height:20px;min-width:20px}.controls-panel-container .controls-panel-item .controls-panel-item__header.has-icon .information-popover__button svg,.preset-manager__content .controls-panel-item .controls-panel-item__header.has-icon .information-popover__button svg{width:18px}.controls-panel-container .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar,.preset-manager__content .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar{margin-left:auto}.controls-panel-container .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar button.has-padding,.preset-manager__content .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar button.has-padding{padding:1px}.controls-panel-container .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar .components-button,.preset-manager__content .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar .components-button{height:24px;min-width:24px;padding:0;width:24px}.controls-panel-container .controls-panel-item .controls-panel-item__description,.preset-manager__content .controls-panel-item .controls-panel-item__description{color:#757575;font-size:12px;font-style:normal;margin-bottom:16px}.controls-panel-container .controls-panel-item .controls-panel-item__description strong,.preset-manager__content .controls-panel-item .controls-panel-item__description strong{font-weight:700}.controls-panel-container .controls-panel-item .controls-panel-item__fields :last-child,.preset-manager__content .controls-panel-item .controls-panel-item__fields :last-child{margin-bottom:0}.controls-panel-container .controls-panel-item .controls-panel-item__control-fields .components-base-control,.preset-manager__content .controls-panel-item .controls-panel-item__control-fields .components-base-control{margin-bottom:18px}.controls-panel-container .controls-panel-item .controls-panel-item__control-fields .components-base-control.components-toggle-control,.preset-manager__content .controls-panel-item .controls-panel-item__control-fields .components-base-control.components-toggle-control{margin-bottom:12px}.controls-panel-container .controls-panel-item .controls-panel-item__control-fields .components-base-control .components-base-control__help,.controls-panel-container .controls-panel-item .controls-panel-item__control-fields .components-base-control:last-child,.preset-manager__content .controls-panel-item .controls-panel-item__control-fields .components-base-control .components-base-control__help,.preset-manager__content .controls-panel-item .controls-panel-item__control-fields .components-base-control:last-child{margin-bottom:0}.controls-panel-container .controls-panel-item .controls-panel-item__control-fields .control-fields-item__hide-when,.preset-manager__content .controls-panel-item .controls-panel-item__control-fields .control-fields-item__hide-when{margin-top:20px}.controls-panel-container .control-fields-item,.preset-manager__content .control-fields-item{margin-bottom:18px}.controls-panel-container .control-fields-item.is-open,.preset-manager__content .control-fields-item.is-open{margin-bottom:24px}.controls-panel-container .control-fields-item.is-open>.components-base-control,.preset-manager__content .control-fields-item.is-open>.components-base-control{margin-bottom:12px}.controls-panel-container .control-fields-item:last-child,.preset-manager__content .control-fields-item:last-child{margin-bottom:0}.controls-panel-container .control-fields-item>.block-visibility__react-select,.preset-manager__content .control-fields-item>.block-visibility__react-select{margin:10px 0}.controls-panel-container .control-fields-item__label,.preset-manager__content .control-fields-item__label{color:#757575;font-size:12px;margin-bottom:8px}.controls-panel-container .control-fields-item__sub-label,.preset-manager__content .control-fields-item__sub-label{font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase}.controls-panel-container .control-fields-item__help,.preset-manager__content .control-fields-item__help{color:#757575;font-size:12px;font-style:normal;margin-top:8px}.controls-panel-container .control-fields-item__help a,.preset-manager__content .control-fields-item__help a{cursor:pointer}.controls-panel-container .control-fields-item__help strong,.preset-manager__content .control-fields-item__help strong{font-weight:700}.controls-panel-container .components-base-control__help,.preset-manager__content .components-base-control__help{color:#757575;font-size:12px;font-style:normal;margin-bottom:16px}.controls-panel-container .components-base-control__help strong,.preset-manager__content .components-base-control__help strong{font-weight:700}.controls-panel-container .components-notice,.preset-manager__content .components-notice{margin:18px 0 0}.controls-panel-container .components-notice .components-notice__content,.preset-manager__content .components-notice .components-notice__content{margin:2px 0}.controls-panel-container .components-notice .components-notice__content .components-base-control__help,.preset-manager__content .components-notice .components-notice__content .components-base-control__help{display:inline-block;margin:4px 0 0}.controls-panel-container .section-header,.preset-manager__content .section-header{align-items:center;display:flex;gap:24px;justify-content:space-between;margin-bottom:14px}.controls-panel-container .section-header.main,.preset-manager__content .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)}.controls-panel-container .section-header .section-header__title,.preset-manager__content .section-header .section-header__title{align-items:center;display:inline-flex;font-size:11px;font-weight:500;gap:6px;line-height:1.4;overflow-wrap:anywhere;text-transform:uppercase}.controls-panel-container .section-header .section-header__title .components-dropdown,.preset-manager__content .section-header .section-header__title .components-dropdown{height:18px}.controls-panel-container .section-header .section-header__title .components-dropdown .components-button,.preset-manager__content .section-header .section-header__title .components-dropdown .components-button{height:18px;line-height:16px;min-width:18px;opacity:.3;padding:0;width:18px}.controls-panel-container .section-header .section-header__title .components-dropdown .components-button:hover,.controls-panel-container .section-header .section-header__title .components-dropdown .components-button[aria-expanded=true],.preset-manager__content .section-header .section-header__title .components-dropdown .components-button:hover,.preset-manager__content .section-header .section-header__title .components-dropdown .components-button[aria-expanded=true]{opacity:1}.controls-panel-container .section-header .section-header__toolbar,.preset-manager__content .section-header .section-header__toolbar{display:flex;flex-shrink:0;gap:4px;height:24px;text-align:right}.controls-panel-container .section-header .section-header__toolbar .components-button,.preset-manager__content .section-header .section-header__toolbar .components-button{height:24px;min-width:24px;padding:0;width:24px}.controls-panel-container .section-header .section-header__toolbar .controls-dropdown .components-button.has-icon,.controls-panel-container .section-header .section-header__toolbar>.components-button,.preset-manager__content .section-header .section-header__toolbar .controls-dropdown .components-button.has-icon,.preset-manager__content .section-header .section-header__toolbar>.components-button{padding:1px}.controls-panel-container .section-header .section-header__toolbar .settings-dropdown,.preset-manager__content .section-header .section-header__toolbar .settings-dropdown{margin-left:5px}.controls-panel-container .section-header .section-header__toolbar .settings-dropdown .components-button.has-icon,.preset-manager__content .section-header .section-header__toolbar .settings-dropdown .components-button.has-icon{padding:1px}.controls-panel-container .section-header .section-header__toolbar .components-disabled,.preset-manager__content .section-header .section-header__toolbar .components-disabled{display:inline-block}.controls-panel-container .rule-sets,.preset-manager__content .rule-sets{grid-column-gap:32px;grid-row-gap:16px;display:grid;grid-template-columns:repeat(auto-fit,minmax(248px,1fr))}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules{grid-column-gap:32px;grid-row-gap:16px;display:grid;grid-template-columns:1fr}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header{align-items:center;color:#757575;display:flex;font-size:12px;justify-content:space-between;margin-bottom:8px;min-height:24px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header button,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header button{height:24px;min-width:24px;padding:0;width:24px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container{display:grid;gap:8px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified{display:grid;grid-template-columns:1fr 74px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified .field__ruleField,.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified .field__subField,.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{grid-column-end:3;grid-column-start:1}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-base-control__help,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-base-control__help{margin-bottom:0;margin-top:10px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-base-control__field,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-base-control__field{margin-bottom:0}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-toggle-control,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-toggle-control{margin:4px 0}.controls-panel-container .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 .components-base-control{margin-bottom:0}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .components-text-control__input,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .components-text-control__input{border:1px solid #1e1e1e;min-height:40px;padding:8px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__add-rule,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__add-rule{margin-top:12px}.controls-panel-container .date-time-control .control-fields-item__schedules,.preset-manager__content .date-time-control .control-fields-item__schedules{grid-column-gap:32px;grid-row-gap:20px;display:grid;grid-template-columns:repeat(auto-fit,minmax(248px,1fr))}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item.disabled .date-time-control__schedule--heading span,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item.disabled .date-time-control__schedule--heading span{opacity:.4}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields{display:grid;gap:16px}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields>span,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields>span{display:none}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .control-fields-item__label,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .control-fields-item__label{margin-bottom:12px}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item{align-items:center;display:flex;gap:8px;margin-top:8px}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .control-fields-item__sub-label,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .control-fields-item__sub-label{min-width:40px}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field{align-items:center;border:1px solid #1e1e1e;border-radius:2px;display:flex;justify-content:space-between;min-height:36px;position:relative;width:100%}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field .components-button:first-child,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field .components-button:first-child{padding-right:30px;width:100%}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field .components-button.clear-date-time,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field .components-button.clear-date-time{margin:5px 4px;max-height:34px;min-width:24px;padding:2px;position:absolute;right:0}.controls-panel-container .screen-size-control .components-base-control,.preset-manager__content .screen-size-control .components-base-control{margin-bottom:12px}.controls-panel-container .screen-size-control .components-notice,.preset-manager__content .screen-size-control .components-notice{margin-top:20px}.controls-panel-container .user-role-control .control-fields-item>.components-base-control__help,.preset-manager__content .user-role-control .control-fields-item>.components-base-control__help{margin-top:-8px}.controls-panel-container .query-string-control textarea,.preset-manager__content .query-string-control textarea{white-space:nowrap}.controls-panel-container .acf-control .components-notice,.preset-manager__content .acf-control .components-notice{margin-bottom:20px}.controls-panel-container .wp-fusion-control .components-disabled,.preset-manager__content .wp-fusion-control .components-disabled{margin-bottom:18px}.block-visibility__date-time-popover .components-popover__content{padding:16px}.block-visibility__date-time-popover .date-time-popover__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.block-visibility__date-time-popover .date-time-popover__header h2{color:#1e1e1e;font-size:13px;font-weight:600;line-height:1.2;margin:0}.block-visibility__date-time-popover .components-datetime{padding:0}.block-visibility__control-popover.visibility-controls .components-popover__content{min-width:240px}.block-visibility__control-popover.visibility-controls .components-menu-item__button[aria-disabled=true]:not(.is-tertiary){color:#757575;opacity:1}.block-visibility__control-popover.visibility-controls .components-menu-item__button[aria-disabled=true]:not(.is-tertiary):focus{box-shadow:none;outline:none}.block-visibility__control-popover.visibility-controls .components-menu-item__button[aria-disabled=true]:not(.is-tertiary) .components-menu-item__item .control-branding-icon{opacity:.6}.block-visibility__control-popover.visibility-controls .components-menu-item__button.has-reset .components-menu-item__item{min-width:100%}.block-visibility__control-popover.visibility-controls .components-menu-item__button .components-menu-item__item .control-branding-icon{opacity:1}.block-visibility__control-popover.visibility-controls .components-menu-item__button .components-menu-item__item .menu-item-reset{color:var(--wp-admin-theme-color-darker-10);font-size:11px;font-weight:500;line-height:1.4;margin-left:auto;text-transform:uppercase}.block-visibility__control-popover.control-settings>div{min-width:300px;padding:6px}.block-visibility__control-popover.control-settings>div h3{color:#1e1e1e;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.edit-title .components-popover__content{min-width:240px;padding:12px}.block-visibility__control-popover.edit-title .components-popover__content>div{padding:0}.block-visibility__control-popover.edit-title .components-popover__content .components-base-control__field{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 .components-base-control__help{display:inline-block;margin:4px 0 0}.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__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 .controls-panel-container h3.controls-panel-item__header{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}[data-kadence-active-tab=general] .block-visibility__controls-panel,[data-kadence-active-tab=style] .block-visibility__controls-panel{display:none} +.information-popover{line-height:0}.information-popover .information-popover__button{height:22px;min-width:22px;opacity:.3;padding:0}.information-popover .information-popover__button svg{width:22px}.information-popover .information-popover__button:hover,.information-popover .information-popover__button[aria-expanded=true]{opacity:1}.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-external-link svg{margin:0 2px}.information-popover__popover .components-popover__content{font-size:13px;font-weight:400;line-height:1.4;max-width:250px;min-width:220px;padding:12px;text-align:left}.information-popover__popover .components-popover__content>div{padding:0}.block-visibility__react-select .react-select__control{border:1px solid #1e1e1e;border-radius:2px;min-height:40px}.block-visibility__react-select .react-select__control:hover{border:1px solid #1e1e1e}.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__controls-panel{border-top:1px solid #ddd;display:grid;gap:16px;margin-top:-1px;padding:16px}.block-visibility__controls-panel .controls-panel-header{-webkit-box-align:center;-webkit-box-pack:justify;align-items:center;display:flex;flex-direction:row;gap:8px;grid-column:1/-1;justify-content:space-between;width:100%}.block-visibility__controls-panel .controls-panel-header h2{font-weight:500;margin:0}.block-visibility__controls-panel .controls-panel-header .controls-panel-header__dropdown-menus{line-height:0;margin:-4px 0}.block-visibility__controls-panel .controls-panel-header .controls-panel-header__dropdown-menus .components-button{min-width:24px;padding:0}.block-visibility__controls-panel .controls-panel-header .controls-panel-header__dropdown-menus .components-spinner{margin:0 4px}.block-visibility__controls-panel .components-disabled.hide-block-enabled,.block-visibility__controls-panel .controls-panel-container{display:grid;gap:32px}.block-visibility__controls-panel .controls-panel-notices .components-notice{margin:0}.block-visibility__controls-panel .components-button:not(.is-primary):disabled,.block-visibility__controls-panel .components-button[aria-disabled=true]:not(.is-primary){color:currentColor}.controls-panel-container .components-disabled,.preset-manager__content .components-disabled{opacity:.4}.controls-panel-container .components-disabled *,.preset-manager__content .components-disabled *{opacity:1!important}.controls-panel-container .components-button:not(.is-primary):disabled,.controls-panel-container .components-button[aria-disabled=true]:not(.is-primary),.preset-manager__content .components-button:not(.is-primary):disabled,.preset-manager__content .components-button[aria-disabled=true]:not(.is-primary){color:currentColor}.controls-panel-container .components-button.control-tips,.preset-manager__content .components-button.control-tips{height:18px;margin-left:5px;margin-top:-4px;min-width:18px;padding:0!important;vertical-align:middle;width:18px!important}.controls-panel-container .components-button.control-tips:not(:hover),.preset-manager__content .components-button.control-tips:not(:hover){color:#c8c8c8}.controls-panel-container .components-button.control-tips:focus,.preset-manager__content .components-button.control-tips:focus{box-shadow:none!important}.controls-panel-container .components-button.control-tips svg,.preset-manager__content .components-button.control-tips svg{height:18px;width:18px}.controls-panel-container .components-base-control__label,.preset-manager__content .components-base-control__label{display:inline-block;font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase}.controls-panel-container .components-base-control__label .components-base-control__label-hint,.preset-manager__content .components-base-control__label .components-base-control__label-hint{color:#757575}.controls-panel-container .controls-panel-item:last-child,.preset-manager__content .controls-panel-item:last-child{margin-bottom:12px}.controls-panel-container .controls-panel-item .controls-panel-item__header,.preset-manager__content .controls-panel-item .controls-panel-item__header{align-items:center;display:flex;font-size:11px;font-weight:500;line-height:1.4;margin-bottom:14px;margin-top:0;min-height:28px;text-transform:uppercase}.controls-panel-container .controls-panel-item .controls-panel-item__header.has-icon>svg,.preset-manager__content .controls-panel-item .controls-panel-item__header.has-icon>svg{margin-right:8px;width:16px}.controls-panel-container .controls-panel-item .controls-panel-item__header.has-icon span,.preset-manager__content .controls-panel-item .controls-panel-item__header.has-icon span{display:inline-block;margin-right:4px}.controls-panel-container .controls-panel-item .controls-panel-item__header.has-icon .information-popover__button,.preset-manager__content .controls-panel-item .controls-panel-item__header.has-icon .information-popover__button{height:20px;min-width:20px}.controls-panel-container .controls-panel-item .controls-panel-item__header.has-icon .information-popover__button svg,.preset-manager__content .controls-panel-item .controls-panel-item__header.has-icon .information-popover__button svg{width:18px}.controls-panel-container .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar,.preset-manager__content .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar{margin-left:auto}.controls-panel-container .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar button.has-padding,.preset-manager__content .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar button.has-padding{padding:1px}.controls-panel-container .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar .components-button,.preset-manager__content .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar .components-button{height:24px;min-width:24px;padding:0;width:24px}.controls-panel-container .controls-panel-item .controls-panel-item__description,.preset-manager__content .controls-panel-item .controls-panel-item__description{color:#757575;font-size:12px;font-style:normal;margin-bottom:16px}.controls-panel-container .controls-panel-item .controls-panel-item__description strong,.preset-manager__content .controls-panel-item .controls-panel-item__description strong{font-weight:700}.controls-panel-container .controls-panel-item .controls-panel-item__fields :last-child,.preset-manager__content .controls-panel-item .controls-panel-item__fields :last-child{margin-bottom:0}.controls-panel-container .controls-panel-item .controls-panel-item__control-fields .components-base-control,.preset-manager__content .controls-panel-item .controls-panel-item__control-fields .components-base-control{margin-bottom:18px}.controls-panel-container .controls-panel-item .controls-panel-item__control-fields .components-base-control.components-toggle-control,.preset-manager__content .controls-panel-item .controls-panel-item__control-fields .components-base-control.components-toggle-control{margin-bottom:12px}.controls-panel-container .controls-panel-item .controls-panel-item__control-fields .components-base-control .components-base-control__help,.controls-panel-container .controls-panel-item .controls-panel-item__control-fields .components-base-control:last-child,.preset-manager__content .controls-panel-item .controls-panel-item__control-fields .components-base-control .components-base-control__help,.preset-manager__content .controls-panel-item .controls-panel-item__control-fields .components-base-control:last-child{margin-bottom:0}.controls-panel-container .controls-panel-item .controls-panel-item__control-fields .control-fields-item__hide-when,.preset-manager__content .controls-panel-item .controls-panel-item__control-fields .control-fields-item__hide-when{margin-top:20px}.controls-panel-container .control-fields-item,.preset-manager__content .control-fields-item{margin-bottom:18px}.controls-panel-container .control-fields-item.is-open,.preset-manager__content .control-fields-item.is-open{margin-bottom:24px}.controls-panel-container .control-fields-item.is-open>.components-base-control,.preset-manager__content .control-fields-item.is-open>.components-base-control{margin-bottom:12px}.controls-panel-container .control-fields-item:last-child,.preset-manager__content .control-fields-item:last-child{margin-bottom:0}.controls-panel-container .control-fields-item>.block-visibility__react-select,.preset-manager__content .control-fields-item>.block-visibility__react-select{margin:10px 0}.controls-panel-container .control-fields-item__label,.preset-manager__content .control-fields-item__label{color:#757575;font-size:12px;margin-bottom:8px}.controls-panel-container .control-fields-item__sub-label,.preset-manager__content .control-fields-item__sub-label{font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase}.controls-panel-container .control-fields-item__help,.preset-manager__content .control-fields-item__help{color:#757575;font-size:12px;font-style:normal;margin-top:8px}.controls-panel-container .control-fields-item__help a,.preset-manager__content .control-fields-item__help a{cursor:pointer}.controls-panel-container .control-fields-item__help strong,.preset-manager__content .control-fields-item__help strong{font-weight:700}.controls-panel-container .components-base-control__help,.preset-manager__content .components-base-control__help{color:#757575;font-size:12px;font-style:normal;margin-bottom:16px}.controls-panel-container .components-base-control__help strong,.preset-manager__content .components-base-control__help strong{font-weight:700}.controls-panel-container .components-notice,.preset-manager__content .components-notice{margin:18px 0 0}.controls-panel-container .components-notice .components-notice__content,.preset-manager__content .components-notice .components-notice__content{margin:2px 0}.controls-panel-container .components-notice .components-notice__content .components-base-control__help,.preset-manager__content .components-notice .components-notice__content .components-base-control__help{display:inline-block;margin:4px 0 0}.controls-panel-container .section-header,.preset-manager__content .section-header{align-items:center;display:flex;gap:24px;justify-content:space-between;margin-bottom:14px}.controls-panel-container .section-header.main,.preset-manager__content .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)}.controls-panel-container .section-header .section-header__title,.preset-manager__content .section-header .section-header__title{align-items:center;display:inline-flex;font-size:11px;font-weight:500;gap:6px;line-height:1.4;overflow-wrap:anywhere;text-transform:uppercase}.controls-panel-container .section-header .section-header__title .components-dropdown,.preset-manager__content .section-header .section-header__title .components-dropdown{height:18px}.controls-panel-container .section-header .section-header__title .components-dropdown .components-button,.preset-manager__content .section-header .section-header__title .components-dropdown .components-button{height:18px;line-height:16px;min-width:18px;opacity:.3;padding:0;width:18px}.controls-panel-container .section-header .section-header__title .components-dropdown .components-button:hover,.controls-panel-container .section-header .section-header__title .components-dropdown .components-button[aria-expanded=true],.preset-manager__content .section-header .section-header__title .components-dropdown .components-button:hover,.preset-manager__content .section-header .section-header__title .components-dropdown .components-button[aria-expanded=true]{opacity:1}.controls-panel-container .section-header .section-header__toolbar,.preset-manager__content .section-header .section-header__toolbar{display:flex;flex-shrink:0;gap:4px;height:24px;text-align:right}.controls-panel-container .section-header .section-header__toolbar .components-button,.preset-manager__content .section-header .section-header__toolbar .components-button{height:24px;min-width:24px;padding:0;width:24px}.controls-panel-container .section-header .section-header__toolbar .controls-dropdown .components-button.has-icon,.controls-panel-container .section-header .section-header__toolbar>.components-button,.preset-manager__content .section-header .section-header__toolbar .controls-dropdown .components-button.has-icon,.preset-manager__content .section-header .section-header__toolbar>.components-button{padding:1px}.controls-panel-container .section-header .section-header__toolbar .settings-dropdown,.preset-manager__content .section-header .section-header__toolbar .settings-dropdown{margin-left:5px}.controls-panel-container .section-header .section-header__toolbar .settings-dropdown .components-button.has-icon,.preset-manager__content .section-header .section-header__toolbar .settings-dropdown .components-button.has-icon{padding:1px}.controls-panel-container .section-header .section-header__toolbar .components-disabled,.preset-manager__content .section-header .section-header__toolbar .components-disabled{display:inline-block}.controls-panel-container .rule-sets,.preset-manager__content .rule-sets{grid-column-gap:32px;grid-row-gap:16px;display:grid;grid-template-columns:repeat(auto-fit,minmax(248px,1fr))}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules{grid-column-gap:32px;grid-row-gap:16px;display:grid;grid-template-columns:1fr}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header{align-items:center;color:#757575;display:flex;font-size:12px;justify-content:space-between;margin-bottom:8px;min-height:24px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header button,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header button{height:24px;min-width:24px;padding:0;width:24px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container{display:grid;gap:8px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified{display:grid;grid-template-columns:1fr 74px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified .field__ruleField,.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified .field__subField,.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{grid-column-end:3;grid-column-start:1}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-base-control__help,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-base-control__help{margin-bottom:0;margin-top:10px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-base-control__field,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-base-control__field{margin-bottom:0}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-toggle-control,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-toggle-control{margin:4px 0}.controls-panel-container .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 .components-base-control{margin-bottom:0}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .components-text-control__input,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .components-text-control__input{border:1px solid #1e1e1e;min-height:40px;padding:8px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__add-rule,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__add-rule{margin-top:12px}.controls-panel-container .date-time-control .control-fields-item__schedules,.preset-manager__content .date-time-control .control-fields-item__schedules{grid-column-gap:32px;grid-row-gap:20px;display:grid;grid-template-columns:repeat(auto-fit,minmax(248px,1fr))}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item.disabled .date-time-control__schedule--heading span,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item.disabled .date-time-control__schedule--heading span{opacity:.4}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields{display:grid;gap:16px}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields>span,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields>span{display:none}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .control-fields-item__label,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .control-fields-item__label{margin-bottom:12px}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item{align-items:center;display:flex;gap:8px;margin-top:8px}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .control-fields-item__sub-label,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .control-fields-item__sub-label{min-width:40px}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field{align-items:center;border:1px solid #1e1e1e;border-radius:2px;display:flex;justify-content:space-between;min-height:36px;position:relative;width:100%}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field .components-button:first-child,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field .components-button:first-child{padding-right:30px;width:100%}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field .components-button.clear-date-time,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field .components-button.clear-date-time{margin:5px 4px;max-height:34px;min-width:24px;padding:2px;position:absolute;right:0}.controls-panel-container .screen-size-control .components-base-control,.preset-manager__content .screen-size-control .components-base-control{margin-bottom:12px}.controls-panel-container .screen-size-control .components-notice,.preset-manager__content .screen-size-control .components-notice{margin-top:20px}.controls-panel-container .user-role-control .control-fields-item>.components-base-control__help,.preset-manager__content .user-role-control .control-fields-item>.components-base-control__help{margin-top:-8px}.controls-panel-container .query-string-control textarea,.preset-manager__content .query-string-control textarea{white-space:nowrap}.controls-panel-container .acf-control .components-notice,.preset-manager__content .acf-control .components-notice{margin-bottom:20px}.controls-panel-container .acf-control .rule__fields .fields-container .components-base-control__help,.preset-manager__content .acf-control .rule__fields .fields-container .components-base-control__help{margin-top:8px!important}.controls-panel-container .wp-fusion-control .components-disabled,.preset-manager__content .wp-fusion-control .components-disabled{margin-bottom:18px}.block-visibility__date-time-popover .components-popover__content{padding:16px}.block-visibility__date-time-popover .date-time-popover__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.block-visibility__date-time-popover .date-time-popover__header h2{color:#1e1e1e;font-size:13px;font-weight:600;line-height:1.2;margin:0}.block-visibility__date-time-popover .components-datetime{padding:0}.block-visibility__control-popover.visibility-controls .components-popover__content{min-width:240px}.block-visibility__control-popover.visibility-controls .components-menu-item__button[aria-disabled=true]:not(.is-tertiary){color:#757575;opacity:1}.block-visibility__control-popover.visibility-controls .components-menu-item__button[aria-disabled=true]:not(.is-tertiary):focus{box-shadow:none;outline:none}.block-visibility__control-popover.visibility-controls .components-menu-item__button[aria-disabled=true]:not(.is-tertiary) .components-menu-item__item .control-branding-icon{opacity:.6}.block-visibility__control-popover.visibility-controls .components-menu-item__button.has-reset .components-menu-item__item{min-width:100%}.block-visibility__control-popover.visibility-controls .components-menu-item__button .components-menu-item__item .control-branding-icon{opacity:1}.block-visibility__control-popover.visibility-controls .components-menu-item__button .components-menu-item__item .menu-item-reset{color:var(--wp-admin-theme-color-darker-10);font-size:11px;font-weight:500;line-height:1.4;margin-left:auto;text-transform:uppercase}.block-visibility__control-popover.control-settings>div{min-width:300px;padding:6px}.block-visibility__control-popover.control-settings>div h3{color:#1e1e1e;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.edit-title .components-popover__content{min-width:240px;padding:12px}.block-visibility__control-popover.edit-title .components-popover__content>div{padding:0}.block-visibility__control-popover.edit-title .components-popover__content .components-base-control__field{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 .components-base-control__help{display:inline-block;margin:4px 0 0}.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__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 .controls-panel-container h3.controls-panel-item__header{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}[data-kadence-active-tab=general] .block-visibility__controls-panel,[data-kadence-active-tab=style] .block-visibility__controls-panel{display:none} diff --git a/build/block-visibility-editor.asset.php b/build/block-visibility-editor.asset.php index 3a98fe83..33291172 100644 --- a/build/block-visibility-editor.asset.php +++ b/build/block-visibility-editor.asset.php @@ -1 +1 @@ - array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-date', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => '7716ddd92eb115c122eb'); + array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-date', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => 'a8055582db696fb34060'); diff --git a/build/block-visibility-editor.js b/build/block-visibility-editor.js index 889e3a81..837714e0 100644 --- a/build/block-visibility-editor.js +++ b/build/block-visibility-editor.js @@ -1,27 +1,27 @@ -(()=>{var e={184:(e,t)=>{var n;!function(){"use strict";var i={}.hasOwnProperty;function o(){for(var e=[],t=0;t{"use strict";var i=n(864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},l={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function a(e){return i.isMemo(e)?r:s[e.$$typeof]||o}s[i.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[i.Memo]=r;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,b=Object.prototype;e.exports=function e(t,n,i){if("string"!=typeof n){if(b){var o=m(n);o&&o!==b&&e(t,o,i)}var r=u(n);d&&(r=r.concat(d(n)));for(var s=a(t),f=a(n),v=0;v{"use strict";var n="function"==typeof Symbol&&Symbol.for,i=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,l=n?Symbol.for("react.fragment"):60107,r=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,a=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,m=n?Symbol.for("react.suspense"):60113,b=n?Symbol.for("react.suspense_list"):60120,f=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,h=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case u:case d:case l:case s:case r:case m:return e;default:switch(e=e&&e.$$typeof){case c:case p:case v:case f:case a:return e;default:return t}}case o:return t}}}function E(e){return k(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=a,t.Element=i,t.ForwardRef=p,t.Fragment=l,t.Lazy=v,t.Memo=f,t.Portal=o,t.Profiler=s,t.StrictMode=r,t.Suspense=m,t.isAsyncMode=function(e){return E(e)||k(e)===u},t.isConcurrentMode=E,t.isContextConsumer=function(e){return k(e)===c},t.isContextProvider=function(e){return k(e)===a},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return k(e)===p},t.isFragment=function(e){return k(e)===l},t.isLazy=function(e){return k(e)===v},t.isMemo=function(e){return k(e)===f},t.isPortal=function(e){return k(e)===o},t.isProfiler=function(e){return k(e)===s},t.isStrictMode=function(e){return k(e)===r},t.isSuspense=function(e){return k(e)===m},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===l||e===d||e===s||e===r||e===m||e===b||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===f||e.$$typeof===a||e.$$typeof===c||e.$$typeof===p||e.$$typeof===g||e.$$typeof===y||e.$$typeof===_||e.$$typeof===h)},t.typeOf=k},864:(e,t,n)=>{"use strict";e.exports=n(921)}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var l=t[i]={exports:{}};return e[i](l,l.exports,n),l.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(){return e=Object.assign||function(e){for(var t=1;t"date_time"===e.settingSlug)))return!1;let i=[],o=!1;var l,s;if(t?(i=null!==(l=e.dateTime?.schedules)&&void 0!==l?l:[],o=null!==(s=e.dateTime?.hideOnSchedules)&&void 0!==s&&s):i=e?.scheduling?[e?.scheduling]:[],0===i.length)return!1;const a=[];i.forEach((e=>{var t,n,i;const l=null!==(t=e?.enable)&&void 0!==t&&t,s=null!==(n=e?.start)&&void 0!==n?n:"",c=null!==(i=e?.end)&&void 0!==i?i:"";let u=!0;l||(u=!1),o||!l||s||c||(u=!1),u=(0,r.applyFilters)("blockVisibility.hasDateTimeScheduleIndicator",u,e),l&&s&&c&&s>=c&&(u=!1),a.push(u)}));let c=a.includes(!0);return c=(0,r.applyFilters)("blockVisibility.hasDateTimeIndicator",c,e,t,n),c}function m(e,t,n){var i,o,l,s,a,c;if(t&&!e.hasOwnProperty("userRole"))return!1;const u=t?e.userRole:e,d=null!==(i=u?.visibilityByRole)&&void 0!==i?i:"public",p=null!==(o=u?.restrictedRoles)&&void 0!==o?o:[],m=null!==(l=u?.hideOnRestrictedRoles)&&void 0!==l&&l,b=null!==(s=u?.restrictedUsers)&&void 0!==s?s:[],f=null!==(a=u?.hideOnRestrictedUsers)&&void 0!==a&&a,v=null!==(c=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&&m&&(h=!1),"users"===d&&0===b.length&&f&&(h=!1),"user-rule-sets"===d&&0===v.length&&(h=!1),h=(0,r.applyFilters)("blockVisibility.hasUserRoleIndicator",h,e,t,n),h}function b(e,t,n,i){var o,l;if(t&&!e.hasOwnProperty("screenSize"))return!1;const s=null!==(o=(t?e.screenSize:e)?.hideOnScreenSize)&&void 0!==o?o:{extraLarge:!1,large:!1,medium:!1,small:!1,extraSmall:!1},a=null!==(l=i?.visibility_controls?.screen_size?.controls)&&void 0!==l?l:{extra_large:!0,large:!0,medium:!0,small:!0,extra_small:!0},c=[!(!s.extraLarge||!a.extra_large),!(!s.large||!a.large),!(!s.medium||!a.medium),!(!s.small||!a.small),!(!s.extraSmall||!a.extra_small)];let u=!0;return n.some((e=>"screen_size"===e.settingSlug))&&c.includes(!0)||(u=!1),u=(0,r.applyFilters)("blockVisibility.hasScreenSizeIndicator",u,e,t,n,i),u}function f(e,t,n){var i,o,l;if(t&&!e.hasOwnProperty("queryString"))return!1;if(!n.some((e=>"query_string"===e.settingSlug)))return!1;const s=null!==(i=e?.queryString?.queryStringAny)&&void 0!==i?i:"",a=null!==(o=e?.queryString?.queryStringAll)&&void 0!==o?o:"",c=null!==(l=e?.queryString?.queryStringNot)&&void 0!==l?l:"";let u=!0;return s||a||c||(u=!1),u=(0,r.applyFilters)("blockVisibility.hasQueryStringIndicator",u,e,t,n),u}function v(e,t,n,i){var o,l;if(null===(o=i?.integrations?.acf?.active)||void 0===o||!o||!n.some((e=>"acf"===e.settingSlug)))return!1;if(t&&!e.hasOwnProperty("acf"))return!1;let s=!0;return 0===(null!==(l=e?.acf?.ruleSets)&&void 0!==l?l:[]).length&&(s=!1),s=(0,r.applyFilters)("blockVisibility.hasACFIndicator",s,e,t,n,i),s}function h(e,t,n,i){var o,l,s,a,c,u;if(null===(o=i?.integrations?.wp_fusion?.active)||void 0===o||!o||!n.some((e=>"wp_fusion"===e.settingSlug)))return!1;if(t&&!e.hasOwnProperty("wpFusion"))return!1;const d=null!==(l=e.hasOwnProperty("userRole"))&&void 0!==l&&l,p=null!==(s=e?.userRole?.visibilityByRole)&&void 0!==s?s:"public",m="public"===p||"logged-out"===p,b=null!==(a=e?.wpFusion?.tagsAny)&&void 0!==a?a:[],f=null!==(c=e?.wpFusion?.tagsAll)&&void 0!==c?c:[],v=null!==(u=e?.wpFusion?.tagsNot)&&void 0!==u?u:[];let h=!0;return(!d&&0===v.length||"public"===p&&0===v.length||"logged-out"===p)&&(h=!1),m||0!==b.length||0!==f.length||0!==v.length||(h=!1),h=(0,r.applyFilters)("blockVisibility.hasWPFusionIndicator",h,e,t,n,i),h}function g(e,t){if(!e||0===e.length)return!1;const n=e.disabled_blocks.includes(t),i=(0,s.getBlockSupport)(t,"blockVisibility",!1);return!(n||!i)}function y(e){const{data:t="fetching"}=(0,l.useSelect)((t=>{const{getEntityRecord:n}=t("core");return{data:n("block-visibility/v1",e)}}),[]);return t}function _(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||0===e.length)return!1;const o=e.plugin_settings,l=(0,i.has)(o,t);return l?o[t]:n}(0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256"},(0,t.createElement)(c.Path,{d:"M128 0c70.7 0 128 57.3 128 128s-57.3 128-128 128S0 198.7 0 128 57.3 0 128 0Zm0 67a95.67 95.67 0 0 0-88.56 59.65l-.44 1.09v.52l.47 1.19A95.67 95.67 0 0 0 128 189a95.67 95.67 0 0 0 88.56-59.65l.44-1.09v-.52l-.47-1.19A95.67 95.67 0 0 0 128 67Zm0 21a40 40 0 1 1 0 80 40 40 0 0 1 0-80Zm8 16a16 16 0 1 0 0 32 16 16 0 0 0 0-32Z"}));const k=(0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(c.Path,{d:"M12 16c2.208 0 4-1.792 4-4s-1.792-4-4-4-4 1.792-4 4 1.792 4 4 4Zm0-1.5c-1.3796 0-2.5-1.1204-2.5-2.5s1.1204-2.5 2.5-2.5 2.5 1.1204 2.5 2.5-1.1204 2.5-2.5 2.5Z"}),(0,t.createElement)(c.Path,{d:"M12 16c2.208 0 4-1.792 4-4s-1.792-4-4-4-4 1.792-4 4 1.792 4 4 4Zm0-1.5c-1.3796 0-2.5-1.1204-2.5-2.5s1.1204-2.5 2.5-2.5 2.5 1.1204 2.5 2.5-1.1204 2.5-2.5 2.5Z"}),(0,t.createElement)(c.Path,{d:"M12 4.5c5 0 9.27 3.11 11 7.5-1.73 4.39-6 7.5-11 7.5S2.73 16.39 1 12c1.73-4.39 6-7.5 11-7.5Zm9.3474 7.5C19.6714 8.4585 16.0654 6.1071 12 6.1071c-4.0653 0-7.6714 2.3514-9.3474 5.8929 1.676 3.5415 5.282 5.8929 9.3474 5.8929 4.0653 0 7.6714-2.3514 9.3474-5.8929Z"})),E=(0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(c.Path,{d:"M13.9709 15.481A3.9797 3.9797 0 0 1 12 16c-2.208 0-4-1.792-4-4a3.98 3.98 0 0 1 .4854-1.9106l1.1417 1.1222A2.4937 2.4937 0 0 0 9.5 12c0 1.3796 1.1204 2.5 2.5 2.5.2906 0 .5697-.0497.8292-.141l1.1417 1.122ZM15.8137 13.2094l-1.315-1.2926c-.0436-1.3279-1.1252-2.3955-2.4587-2.4165l-1.315-1.2925A3.9918 3.9918 0 0 1 12 8c2.208 0 4 1.792 4 4a3.994 3.994 0 0 1-.1863 1.2094Z"}),(0,t.createElement)(c.Path,{d:"M16.9542 18.4125C15.4477 19.1105 13.7696 19.5 12 19.5c-5 0-9.27-3.11-11-7.5.8355-2.1201 2.2634-3.9417 4.0798-5.2586l1.1408 1.1212C4.697 8.8849 3.454 10.3063 2.6526 12c1.676 3.5415 5.282 5.8929 9.3474 5.8929 1.3052 0 2.563-.2424 3.7249-.6887l1.2293 1.2083ZM19.4899 16.8186l-1.1243-1.105c1.2566-.9771 2.2857-2.2427 2.9818-3.7136-1.676-3.5415-5.282-5.8929-9.3474-5.8929-1.027 0-2.0246.15-2.9692.4315L7.7566 5.2862C9.0734 4.7784 10.504 4.5 12 4.5c5 0 9.27 3.11 11 7.5-.746 1.8932-1.9645 3.5483-3.5101 4.8186ZM2.7243 4.4261l16.5 16.2175a.75.75 0 0 0 1.0514-1.0697l-16.5-16.2175A.75.75 0 0 0 2.7243 4.426Z"})),S=((0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},(0,t.createElement)(c.Path,{d:"M12 3c4.9706 0 9 4.0294 9 9s-4.0294 9-9 9-9-4.0294-9-9 4.0294-9 9-9Zm0 1.595c-4.0897 0-7.405 3.3153-7.405 7.405 0 4.0897 3.3153 7.405 7.405 7.405 4.0897 0 7.405-3.3153 7.405-7.405 0-4.0897-3.3153-7.405-7.405-7.405Zm0 2.5063c.4066 0 .742.3042.7913.6974l.0062.1v3.7714l2.9563 2.9559a.7975.7975 0 0 1-1.0462 1.1991l-.0816-.0713-3.2213-3.2231-.0749-.0983-.0304-.051a.7931.7931 0 0 1-.0907-.2814l-.0062-.1V7.8987c0-.4404.357-.7974.7975-.7974Z"})),(0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(c.Path,{d:"M5.05 0H24v18.95A5.05 5.05 0 0 1 18.95 24H0V5.05A5.05 5.05 0 0 1 5.05 0Z",fill:"#E55B10"}),(0,t.createElement)(c.Path,{d:"M19.58 9.79c0 .52-.43.95-.95.95h-7.58v7.58c0 .52-.42.94-.94.94h-.64a.95.95 0 0 1-.94-.94V9.47c0-.34.18-.64.45-.8a.95.95 0 0 1 .8-.46h8.85c.52 0 .95.42.95.95v.63Z",fill:"#FFFFFF"}),(0,t.createElement)(c.Path,{d:"M5.05 14.53c0-.53.43-.95.95-.95h7.58V6c0-.52.42-.95.95-.95h.63c.52 0 .95.43.95.95v8.84c0 .34-.19.64-.46.81a.95.95 0 0 1-.8.46H6a.95.95 0 0 1-.95-.95v-.63Z",fill:"#FFFFFF"}))),w=(0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(c.Path,{d:"M19.2 0A4.8 4.8 0 0 1 24 4.8v14.4a4.8 4.8 0 0 1-4.8 4.8H4.8A4.8 4.8 0 0 1 0 19.2V4.8A4.8 4.8 0 0 1 4.8 0h14.4ZM6.89 7.2H5.11l-3.87 9.79-.04.11h2.46l.64-1.63h3.4l.65 1.63h2.45l-.05-.11-.14-.38a4.93 4.93 0 0 0 5.9-1.23l-.01 1.72h2.4v-3.6h3.75v-2.4H18.9V9.6h3.9V7.2h-6.3v1.72a4.94 4.94 0 0 0-8.36 1.43L6.89 7.2Zm5.86 2.28c1.14 0 2.12.72 2.5 1.73l.06.2 1.19-.01v1.8h-1.3a2.67 2.67 0 0 1-2.25 1.61l-.2.01a2.67 2.67 0 1 1 0-5.34ZM6 11.16l.9 2.26H5.1l.9-2.26Z",fill:"#5DE8BF"}));function C(e,t){var n,l;let s=[];if(!e||!t||0===e.length||0===t.length)return s;let a=function(){let e=[{label:(0,o.__)("Hide Block","block-visibility"),attributeSlug:"hideBlock",settingSlug:"hide_block"},{label:(0,o.__)("Date & Time","block-visibility"),attributeSlug:"dateTime",settingSlug:"date_time"},{label:(0,o.__)("User Role","block-visibility"),attributeSlug:"userRole",settingSlug:"visibility_by_role"},{label:(0,o.__)("Screen Size","block-visibility"),attributeSlug:"screenSize",settingSlug:"screen_size"},{label:(0,o.__)("Query String","block-visibility"),attributeSlug:"queryString",settingSlug:"query_string"},{label:(0,o.__)("Advanced Custom Fields","block-visibility"),type:"integration",attributeSlug:"acf",settingSlug:"acf",icon:w},{label:(0,o.__)("WP Fusion","block-visibility"),type:"integration",attributeSlug:"wpFusion",settingSlug:"wp_fusion",icon:S}];return e=(0,r.applyFilters)("blockVisibility.controls",e),e=(0,r.applyFilters)("blockVisibility.coreControls",e),e=(0,r.applyFilters)("blockVisibility.integrationControls",e),e.sort(((e,t)=>e.label.localeCompare(t.label))),e}();a.forEach((function(e){"integration"!==e.type||(e=>{let n=!1;var i;return t?.integrations&&(n=null!==(i=t?.integrations[e]?.active)&&void 0!==i&&i),n})(e.settingSlug)||(a=a.filter((t=>t.settingSlug!==e.settingSlug)))}));const c=null!==(n=e?.visibility_controls)&&void 0!==n?n:{};(0,i.isEmpty)(c)||a.forEach((function(e){var t;let n=!1;(0,i.has)(c,e.settingSlug)||(n=!0),(null===(t=c[e.settingSlug]?.enable)||void 0===t||t)&&(n=!0),n&&s.push(e)}));const u=null!==(l=e?.plugin_settings?.default_controls)&&void 0!==l?l:[];return s.forEach((function(e){u.includes(e.settingSlug)&&(e.isDefault=!0)})),s=(0,r.applyFilters)("blockVisibility.enabledControls",s,e,t),s}(0,r.addFilter)("editor.BlockListBlock","block-visibility/contextual-indicators",(function(n){return i=>{var o,l,s;const a=y("settings"),c=y("variables");if("fetching"===a)return(0,t.createElement)(n,i);const{name:u,attributes:k}=i,E=_(a,"enable_contextual_indicators"),S=g(a,u),w=C(a,c);if(!E||!S||0===w.length)return(0,t.createElement)(n,i);const{blockVisibility:O}=k,x=null!==(o=O?.hideBlock)&&void 0!==o&&o&&w.some((e=>"hide_block"===e.settingSlug)),M=null!==(l=O?.controlSets)&&void 0!==l&&l;let V=null!=O?O:{};M&&(V=0!==O.controlSets.length&&O.controlSets[0]?.controls?O.controlSets[0].controls:{});let R={"date-time":p(V,M,w),"user-role":m(V,M,w),"screen-size":b(V,M,w,a),"query-string":f(V,M,w),acf:v(V,M,w,c),"wp-fusion":h(V,M,w,c)};R=(0,r.applyFilters)("blockVisibility.contextualIndicatorActiveControls",R,O,V,M,w,c),R=(0,r.applyFilters)("blockVisibility.conditionalIndicatorActiveCoreControls",R,O,V,M,w,c),R=Object.keys(R).filter((e=>!0===R[e])),!c?.is_pro||null===(s=a?.visibility_controls?.general?.enable_local_controls)||void 0===s||s||(R=R.filter((e=>"hide-block"===e||"visibility-presets"===e))),R.sort();let P="";R.length>1?P="block-visibility__has-"+R.length+"-controls":0!==R.length&&(P="block-visibility__has-"+R.join("-"));let F=d()({"block-visibility__is-hidden":x},P);F&&(F+=" block-visibility__has-visibility"),F=(0,r.applyFilters)("blockVisibility.contextualIndicatorClasses",F),F=(0,r.applyFilters)("blockVisibility.conditionalIndicatorClasses",F);const I=d()(i?.className,F);return(0,t.createElement)(n,e({},i,{className:I}))}}));const O=window.wp.blockEditor;function x(e,t){var n,i,o;let l=!0;if(null===(n=e?.plugin_settings?.enable_user_role_restrictions)||void 0===n||!n)return l;const r=null!==(i=e?.plugin_settings?.enabled_user_roles)&&void 0!==i?i:[];-1===r.indexOf("administrator")&&r.push("administrator");const s=null!==(o=t?.current_users_roles)&&void 0!==o?o:[];return l=0!==s.length&&s.every((e=>-1!==r.indexOf(e))),l}const M=(0,l.withSelect)((e=>{var t,n;const{getEntityRecord:i}=e("core"),{getBlocks:o,getBlockName:l,getSelectedBlockClientIds:r,getBlockAttributes:s,hasMultiSelection:a}=e("core/block-editor"),{getBlockType:c}=e("core/blocks"),u=!a(),d=r(),p=0===d.length?null:d[0],m=c(l(p)),b=s(p),f=null!==(t=i("block-visibility/v1","settings"))&&void 0!==t?t:"fetching";let v=null!==(n=i("block-visibility/v1","variables"))&&void 0!==n?n:"fetching";const h=o().filter((e=>"core/widget-area"===e.name));return"fetching"!==v&&(v={...v,isWidgetEditor:h.length>0}),{enableMenuItem:u,clientId:p,blockType:m,blockAttributes:b,settings:f,variables:v}}))((function(e){var n;const{flashBlock:r,updateBlockAttributes:s}=(0,l.useDispatch)("core/block-editor"),{createSuccessNotice:a}=(0,l.useDispatch)("core/notices"),{blockAttributes:u,blockType:d,clientId:p,enableMenuItem:m,globallyRestricted:b,settings:f,variables:v,widgetAreaRestricted:h}=e;if("fetching"===f||"fetching"===v)return null;if(!x(f,v))return null;if(!m||!d)return null;if(h.includes(d.name)&&v?.isWidgetEditor||b.includes(d.name))return null;const y=_(f,"enable_toolbar_controls"),S=g(f,d.name),w=C(f,v);if(!y||!S||!w.some((e=>"hide_block"===e.settingSlug)))return null;const{blockVisibility:M}=u,V=null!==(n=M?.hideBlock)&&void 0!==n&&n,R=V?k:E,P=V?(0,o.__)("Enable block","block-visibility"):(0,o.__)("Hide block","block-visibility"),F=d.title,I=V?(0,o.sprintf)( +(()=>{var e={184:(e,t)=>{var n;!function(){"use strict";var i={}.hasOwnProperty;function l(){for(var e=[],t=0;t{"use strict";var i=n(864),l={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function a(e){return i.isMemo(e)?r:s[e.$$typeof]||l}s[i.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[i.Memo]=r;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,b=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,i){if("string"!=typeof n){if(m){var l=b(n);l&&l!==m&&e(t,l,i)}var r=u(n);d&&(r=r.concat(d(n)));for(var s=a(t),f=a(n),v=0;v{"use strict";var n="function"==typeof Symbol&&Symbol.for,i=n?Symbol.for("react.element"):60103,l=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,r=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,a=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,b=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,f=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,h=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case u:case d:case o:case s:case r:case b:return e;default:switch(e=e&&e.$$typeof){case c:case p:case v:case f:case a:return e;default:return t}}case l:return t}}}function E(e){return k(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=a,t.Element=i,t.ForwardRef=p,t.Fragment=o,t.Lazy=v,t.Memo=f,t.Portal=l,t.Profiler=s,t.StrictMode=r,t.Suspense=b,t.isAsyncMode=function(e){return E(e)||k(e)===u},t.isConcurrentMode=E,t.isContextConsumer=function(e){return k(e)===c},t.isContextProvider=function(e){return k(e)===a},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return k(e)===p},t.isFragment=function(e){return k(e)===o},t.isLazy=function(e){return k(e)===v},t.isMemo=function(e){return k(e)===f},t.isPortal=function(e){return k(e)===l},t.isProfiler=function(e){return k(e)===s},t.isStrictMode=function(e){return k(e)===r},t.isSuspense=function(e){return k(e)===b},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===s||e===r||e===b||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===f||e.$$typeof===a||e.$$typeof===c||e.$$typeof===p||e.$$typeof===g||e.$$typeof===y||e.$$typeof===_||e.$$typeof===h)},t.typeOf=k},864:(e,t,n)=>{"use strict";e.exports=n(921)}},t={};function n(i){var l=t[i];if(void 0!==l)return l.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(){return e=Object.assign||function(e){for(var t=1;t"date_time"===e.settingSlug)))return!1;let i=[],l=!1;var o,s;if(t?(i=null!==(o=e.dateTime?.schedules)&&void 0!==o?o:[],l=null!==(s=e.dateTime?.hideOnSchedules)&&void 0!==s&&s):i=e?.scheduling?[e?.scheduling]:[],0===i.length)return!1;const a=[];i.forEach((e=>{var t,n,i;const o=null!==(t=e?.enable)&&void 0!==t&&t,s=null!==(n=e?.start)&&void 0!==n?n:"",c=null!==(i=e?.end)&&void 0!==i?i:"";let u=!0;o||(u=!1),l||!o||s||c||(u=!1),u=(0,r.applyFilters)("blockVisibility.hasDateTimeScheduleIndicator",u,e),o&&s&&c&&s>=c&&(u=!1),a.push(u)}));let c=a.includes(!0);return c=(0,r.applyFilters)("blockVisibility.hasDateTimeIndicator",c,e,t,n),c}function b(e,t,n){var i,l,o,s,a,c;if(t&&!e.hasOwnProperty("userRole"))return!1;const u=t?e.userRole:e,d=null!==(i=u?.visibilityByRole)&&void 0!==i?i:"public",p=null!==(l=u?.restrictedRoles)&&void 0!==l?l:[],b=null!==(o=u?.hideOnRestrictedRoles)&&void 0!==o&&o,m=null!==(s=u?.restrictedUsers)&&void 0!==s?s:[],f=null!==(a=u?.hideOnRestrictedUsers)&&void 0!==a&&a,v=null!==(c=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&&b&&(h=!1),"users"===d&&0===m.length&&f&&(h=!1),"user-rule-sets"===d&&0===v.length&&(h=!1),h=(0,r.applyFilters)("blockVisibility.hasUserRoleIndicator",h,e,t,n),h}function m(e,t,n,i){var l,o;if(t&&!e.hasOwnProperty("screenSize"))return!1;const s=null!==(l=(t?e.screenSize:e)?.hideOnScreenSize)&&void 0!==l?l:{extraLarge:!1,large:!1,medium:!1,small:!1,extraSmall:!1},a=null!==(o=i?.visibility_controls?.screen_size?.controls)&&void 0!==o?o:{extra_large:!0,large:!0,medium:!0,small:!0,extra_small:!0},c=[!(!s.extraLarge||!a.extra_large),!(!s.large||!a.large),!(!s.medium||!a.medium),!(!s.small||!a.small),!(!s.extraSmall||!a.extra_small)];let u=!0;return n.some((e=>"screen_size"===e.settingSlug))&&c.includes(!0)||(u=!1),u=(0,r.applyFilters)("blockVisibility.hasScreenSizeIndicator",u,e,t,n,i),u}function f(e,t,n){var i,l,o;if(t&&!e.hasOwnProperty("queryString"))return!1;if(!n.some((e=>"query_string"===e.settingSlug)))return!1;const s=null!==(i=e?.queryString?.queryStringAny)&&void 0!==i?i:"",a=null!==(l=e?.queryString?.queryStringAll)&&void 0!==l?l:"",c=null!==(o=e?.queryString?.queryStringNot)&&void 0!==o?o:"";let u=!0;return s||a||c||(u=!1),u=(0,r.applyFilters)("blockVisibility.hasQueryStringIndicator",u,e,t,n),u}function v(e,t,n,i){var l,o;if(null===(l=i?.integrations?.acf?.active)||void 0===l||!l||!n.some((e=>"acf"===e.settingSlug)))return!1;if(t&&!e.hasOwnProperty("acf"))return!1;let s=!0;return 0===(null!==(o=e?.acf?.ruleSets)&&void 0!==o?o:[]).length&&(s=!1),s=(0,r.applyFilters)("blockVisibility.hasACFIndicator",s,e,t,n,i),s}function h(e,t,n,i){var l,o,s,a,c,u;if(null===(l=i?.integrations?.wp_fusion?.active)||void 0===l||!l||!n.some((e=>"wp_fusion"===e.settingSlug)))return!1;if(t&&!e.hasOwnProperty("wpFusion"))return!1;const d=null!==(o=e.hasOwnProperty("userRole"))&&void 0!==o&&o,p=null!==(s=e?.userRole?.visibilityByRole)&&void 0!==s?s:"public",b="public"===p||"logged-out"===p,m=null!==(a=e?.wpFusion?.tagsAny)&&void 0!==a?a:[],f=null!==(c=e?.wpFusion?.tagsAll)&&void 0!==c?c:[],v=null!==(u=e?.wpFusion?.tagsNot)&&void 0!==u?u:[];let h=!0;return(!d&&0===v.length||"public"===p&&0===v.length||"logged-out"===p)&&(h=!1),b||0!==m.length||0!==f.length||0!==v.length||(h=!1),h=(0,r.applyFilters)("blockVisibility.hasWPFusionIndicator",h,e,t,n,i),h}function g(e,t){if(!e||0===e.length)return!1;const n=e.disabled_blocks.includes(t),i=(0,s.getBlockSupport)(t,"blockVisibility",!1);return!(n||!i)}function y(e){const{data:t="fetching"}=(0,o.useSelect)((t=>{const{getEntityRecord:n}=t("core");return{data:n("block-visibility/v1",e)}}),[]);return t}function _(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||0===e.length)return!1;const l=e.plugin_settings,o=(0,i.has)(l,t);return o?l[t]:n}(0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256"},(0,t.createElement)(c.Path,{d:"M128 0c70.7 0 128 57.3 128 128s-57.3 128-128 128S0 198.7 0 128 57.3 0 128 0Zm0 67a95.67 95.67 0 0 0-88.56 59.65l-.44 1.09v.52l.47 1.19A95.67 95.67 0 0 0 128 189a95.67 95.67 0 0 0 88.56-59.65l.44-1.09v-.52l-.47-1.19A95.67 95.67 0 0 0 128 67Zm0 21a40 40 0 1 1 0 80 40 40 0 0 1 0-80Zm8 16a16 16 0 1 0 0 32 16 16 0 0 0 0-32Z"}));const k=(0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(c.Path,{d:"M12 16c2.208 0 4-1.792 4-4s-1.792-4-4-4-4 1.792-4 4 1.792 4 4 4Zm0-1.5c-1.3796 0-2.5-1.1204-2.5-2.5s1.1204-2.5 2.5-2.5 2.5 1.1204 2.5 2.5-1.1204 2.5-2.5 2.5Z"}),(0,t.createElement)(c.Path,{d:"M12 16c2.208 0 4-1.792 4-4s-1.792-4-4-4-4 1.792-4 4 1.792 4 4 4Zm0-1.5c-1.3796 0-2.5-1.1204-2.5-2.5s1.1204-2.5 2.5-2.5 2.5 1.1204 2.5 2.5-1.1204 2.5-2.5 2.5Z"}),(0,t.createElement)(c.Path,{d:"M12 4.5c5 0 9.27 3.11 11 7.5-1.73 4.39-6 7.5-11 7.5S2.73 16.39 1 12c1.73-4.39 6-7.5 11-7.5Zm9.3474 7.5C19.6714 8.4585 16.0654 6.1071 12 6.1071c-4.0653 0-7.6714 2.3514-9.3474 5.8929 1.676 3.5415 5.282 5.8929 9.3474 5.8929 4.0653 0 7.6714-2.3514 9.3474-5.8929Z"})),E=(0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(c.Path,{d:"M13.9709 15.481A3.9797 3.9797 0 0 1 12 16c-2.208 0-4-1.792-4-4a3.98 3.98 0 0 1 .4854-1.9106l1.1417 1.1222A2.4937 2.4937 0 0 0 9.5 12c0 1.3796 1.1204 2.5 2.5 2.5.2906 0 .5697-.0497.8292-.141l1.1417 1.122ZM15.8137 13.2094l-1.315-1.2926c-.0436-1.3279-1.1252-2.3955-2.4587-2.4165l-1.315-1.2925A3.9918 3.9918 0 0 1 12 8c2.208 0 4 1.792 4 4a3.994 3.994 0 0 1-.1863 1.2094Z"}),(0,t.createElement)(c.Path,{d:"M16.9542 18.4125C15.4477 19.1105 13.7696 19.5 12 19.5c-5 0-9.27-3.11-11-7.5.8355-2.1201 2.2634-3.9417 4.0798-5.2586l1.1408 1.1212C4.697 8.8849 3.454 10.3063 2.6526 12c1.676 3.5415 5.282 5.8929 9.3474 5.8929 1.3052 0 2.563-.2424 3.7249-.6887l1.2293 1.2083ZM19.4899 16.8186l-1.1243-1.105c1.2566-.9771 2.2857-2.2427 2.9818-3.7136-1.676-3.5415-5.282-5.8929-9.3474-5.8929-1.027 0-2.0246.15-2.9692.4315L7.7566 5.2862C9.0734 4.7784 10.504 4.5 12 4.5c5 0 9.27 3.11 11 7.5-.746 1.8932-1.9645 3.5483-3.5101 4.8186ZM2.7243 4.4261l16.5 16.2175a.75.75 0 0 0 1.0514-1.0697l-16.5-16.2175A.75.75 0 0 0 2.7243 4.426Z"})),S=((0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},(0,t.createElement)(c.Path,{d:"M12 3c4.9706 0 9 4.0294 9 9s-4.0294 9-9 9-9-4.0294-9-9 4.0294-9 9-9Zm0 1.595c-4.0897 0-7.405 3.3153-7.405 7.405 0 4.0897 3.3153 7.405 7.405 7.405 4.0897 0 7.405-3.3153 7.405-7.405 0-4.0897-3.3153-7.405-7.405-7.405Zm0 2.5063c.4066 0 .742.3042.7913.6974l.0062.1v3.7714l2.9563 2.9559a.7975.7975 0 0 1-1.0462 1.1991l-.0816-.0713-3.2213-3.2231-.0749-.0983-.0304-.051a.7931.7931 0 0 1-.0907-.2814l-.0062-.1V7.8987c0-.4404.357-.7974.7975-.7974Z"})),(0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(c.Path,{d:"M5.05 0H24v18.95A5.05 5.05 0 0 1 18.95 24H0V5.05A5.05 5.05 0 0 1 5.05 0Z",fill:"#E55B10"}),(0,t.createElement)(c.Path,{d:"M19.58 9.79c0 .52-.43.95-.95.95h-7.58v7.58c0 .52-.42.94-.94.94h-.64a.95.95 0 0 1-.94-.94V9.47c0-.34.18-.64.45-.8a.95.95 0 0 1 .8-.46h8.85c.52 0 .95.42.95.95v.63Z",fill:"#FFFFFF"}),(0,t.createElement)(c.Path,{d:"M5.05 14.53c0-.53.43-.95.95-.95h7.58V6c0-.52.42-.95.95-.95h.63c.52 0 .95.43.95.95v8.84c0 .34-.19.64-.46.81a.95.95 0 0 1-.8.46H6a.95.95 0 0 1-.95-.95v-.63Z",fill:"#FFFFFF"}))),w=(0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(c.Path,{d:"M19.2 0A4.8 4.8 0 0 1 24 4.8v14.4a4.8 4.8 0 0 1-4.8 4.8H4.8A4.8 4.8 0 0 1 0 19.2V4.8A4.8 4.8 0 0 1 4.8 0h14.4ZM6.89 7.2H5.11l-3.87 9.79-.04.11h2.46l.64-1.63h3.4l.65 1.63h2.45l-.05-.11-.14-.38a4.93 4.93 0 0 0 5.9-1.23l-.01 1.72h2.4v-3.6h3.75v-2.4H18.9V9.6h3.9V7.2h-6.3v1.72a4.94 4.94 0 0 0-8.36 1.43L6.89 7.2Zm5.86 2.28c1.14 0 2.12.72 2.5 1.73l.06.2 1.19-.01v1.8h-1.3a2.67 2.67 0 0 1-2.25 1.61l-.2.01a2.67 2.67 0 1 1 0-5.34ZM6 11.16l.9 2.26H5.1l.9-2.26Z",fill:"#5DE8BF"}));function C(e,t){var n,o;let s=[];if(!e||!t||0===e.length||0===t.length)return s;let a=function(){let e=[{label:(0,l.__)("Hide Block","block-visibility"),attributeSlug:"hideBlock",settingSlug:"hide_block"},{label:(0,l.__)("Date & Time","block-visibility"),attributeSlug:"dateTime",settingSlug:"date_time"},{label:(0,l.__)("User Role","block-visibility"),attributeSlug:"userRole",settingSlug:"visibility_by_role"},{label:(0,l.__)("Screen Size","block-visibility"),attributeSlug:"screenSize",settingSlug:"screen_size"},{label:(0,l.__)("Query String","block-visibility"),attributeSlug:"queryString",settingSlug:"query_string"},{label:(0,l.__)("Advanced Custom Fields","block-visibility"),type:"integration",attributeSlug:"acf",settingSlug:"acf",icon:w},{label:(0,l.__)("WP Fusion","block-visibility"),type:"integration",attributeSlug:"wpFusion",settingSlug:"wp_fusion",icon:S}];return e=(0,r.applyFilters)("blockVisibility.controls",e),e=(0,r.applyFilters)("blockVisibility.coreControls",e),e=(0,r.applyFilters)("blockVisibility.integrationControls",e),e.sort(((e,t)=>e.label.localeCompare(t.label))),e}();a.forEach((function(e){"integration"!==e.type||(e=>{let n=!1;var i;return t?.integrations&&(n=null!==(i=t?.integrations[e]?.active)&&void 0!==i&&i),n})(e.settingSlug)||(a=a.filter((t=>t.settingSlug!==e.settingSlug)))}));const c=null!==(n=e?.visibility_controls)&&void 0!==n?n:{};(0,i.isEmpty)(c)||a.forEach((function(e){var t;let n=!1;(0,i.has)(c,e.settingSlug)||(n=!0),(null===(t=c[e.settingSlug]?.enable)||void 0===t||t)&&(n=!0),n&&s.push(e)}));const u=null!==(o=e?.plugin_settings?.default_controls)&&void 0!==o?o:[];return s.forEach((function(e){u.includes(e.settingSlug)&&(e.isDefault=!0)})),s=(0,r.applyFilters)("blockVisibility.enabledControls",s,e,t),s}(0,r.addFilter)("editor.BlockListBlock","block-visibility/contextual-indicators",(function(n){return i=>{var l,o,s;const a=y("settings"),c=y("variables");if("fetching"===a)return(0,t.createElement)(n,i);const{name:u,attributes:k}=i,E=_(a,"enable_contextual_indicators"),S=g(a,u),w=C(a,c);if(!E||!S||0===w.length)return(0,t.createElement)(n,i);const{blockVisibility:O}=k,x=null!==(l=O?.hideBlock)&&void 0!==l&&l&&w.some((e=>"hide_block"===e.settingSlug)),M=null!==(o=O?.controlSets)&&void 0!==o&&o;let V=null!=O?O:{};M&&(V=0!==O.controlSets.length&&O.controlSets[0]?.controls?O.controlSets[0].controls:{});let R={"date-time":p(V,M,w),"user-role":b(V,M,w),"screen-size":m(V,M,w,a),"query-string":f(V,M,w),acf:v(V,M,w,c),"wp-fusion":h(V,M,w,c)};R=(0,r.applyFilters)("blockVisibility.contextualIndicatorActiveControls",R,O,V,M,w,c),R=(0,r.applyFilters)("blockVisibility.conditionalIndicatorActiveCoreControls",R,O,V,M,w,c),R=Object.keys(R).filter((e=>!0===R[e])),!c?.is_pro||null===(s=a?.visibility_controls?.general?.enable_local_controls)||void 0===s||s||(R=R.filter((e=>"hide-block"===e||"visibility-presets"===e))),R.sort();let T="";R.length>1?T="block-visibility__has-"+R.length+"-controls":0!==R.length&&(T="block-visibility__has-"+R.join("-"));let P=d()({"block-visibility__is-hidden":x},T);P&&(P+=" block-visibility__has-visibility"),P=(0,r.applyFilters)("blockVisibility.contextualIndicatorClasses",P),P=(0,r.applyFilters)("blockVisibility.conditionalIndicatorClasses",P);const F=d()(i?.className,P);return(0,t.createElement)(n,e({},i,{className:F}))}}));const O=window.wp.blockEditor;function x(e,t){var n,i,l;let o=!0;if(null===(n=e?.plugin_settings?.enable_user_role_restrictions)||void 0===n||!n)return o;const r=null!==(i=e?.plugin_settings?.enabled_user_roles)&&void 0!==i?i:[];-1===r.indexOf("administrator")&&r.push("administrator");const s=null!==(l=t?.current_users_roles)&&void 0!==l?l:[];return o=0!==s.length&&s.every((e=>-1!==r.indexOf(e))),o}const M=(0,o.withSelect)((e=>{var t,n;const{getEntityRecord:i}=e("core"),{getBlocks:l,getBlockName:o,getSelectedBlockClientIds:r,getBlockAttributes:s,hasMultiSelection:a}=e("core/block-editor"),{getBlockType:c}=e("core/blocks"),u=!a(),d=r(),p=0===d.length?null:d[0],b=c(o(p)),m=s(p),f=null!==(t=i("block-visibility/v1","settings"))&&void 0!==t?t:"fetching";let v=null!==(n=i("block-visibility/v1","variables"))&&void 0!==n?n:"fetching";const h=l().filter((e=>"core/widget-area"===e.name));return"fetching"!==v&&(v={...v,isWidgetEditor:h.length>0}),{enableMenuItem:u,clientId:p,blockType:b,blockAttributes:m,settings:f,variables:v}}))((function(e){var n;const{flashBlock:r,updateBlockAttributes:s}=(0,o.useDispatch)("core/block-editor"),{createSuccessNotice:a}=(0,o.useDispatch)("core/notices"),{blockAttributes:u,blockType:d,clientId:p,enableMenuItem:b,globallyRestricted:m,settings:f,variables:v,widgetAreaRestricted:h}=e;if("fetching"===f||"fetching"===v)return null;if(!x(f,v))return null;if(!b||!d)return null;if(h.includes(d.name)&&v?.isWidgetEditor||m.includes(d.name))return null;const y=_(f,"enable_toolbar_controls"),S=g(f,d.name),w=C(f,v);if(!y||!S||!w.some((e=>"hide_block"===e.settingSlug)))return null;const{blockVisibility:M}=u,V=null!==(n=M?.hideBlock)&&void 0!==n&&n,R=V?k:E,T=V?(0,l.__)("Enable block","block-visibility"):(0,l.__)("Hide block","block-visibility"),P=d.title,F=V?(0,l.sprintf)( // Translators: Name of the block being made visible, e.g. "Paragraph". -(0,o.__)('"%s" is now visible.'),F):(0,o.sprintf)( +(0,l.__)('"%s" is now visible.'),P):(0,l.sprintf)( // Translators: Name of the block being hidden, e.g. "Paragraph". -(0,o.__)('"%s" is now hidden.'),F);return(0,t.createElement)(O.BlockSettingsMenuControls,null,(0,t.createElement)(c.MenuItem,{onClick:()=>{s(p,{blockVisibility:(0,i.assign)({...M},{hideBlock:!V})}),r(p),a(I,{type:"snackbar"})},icon:R,label:P},P))})),V=window.wp.a11y,R=window.wp.primitives,P=(0,t.createElement)(R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(R.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"})),F=(0,t.createElement)(R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(R.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),I=(0,t.createElement)(R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(R.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),T=function(e){let{icon:n,size:i=24,...o}=e;return(0,t.cloneElement)(n,{width:i,height:i,...o})},A=(0,c.withFilters)("blockVisibility.addControlSetOptions")((e=>(0,t.createElement)(t.Fragment,null))),N=(0,c.withFilters)("blockVisibility.addControlSetModals")((e=>(0,t.createElement)(t.Fragment,null)));function D(n){var l;const[r,s]=(0,t.useState)(!1),{activeControls:a,attributes:u,setAttributes:d,enabledControls:p,controlSetAtts:m,setControlSetAtts:b}=n,f=null!==(l=u?.blockVisibility)&&void 0!==l?l:{},v=p.filter((e=>e.isDefault));v.forEach((e=>{"hideBlock"===e.attributeSlug||"visibilityPresets"===e.attributeSlug?e.hasEdits=f.hasOwnProperty(e.attributeSlug):e.hasEdits=m?.controls?.hasOwnProperty(e.attributeSlug)}));const h=p.filter((e=>"integration"!==e.type&&!e.isDefault)),g=p.filter((e=>"integration"===e.type&&!e.isDefault));function y(e,t){if("hideBlock"===e.attributeSlug||"visibilityPresets"===e.attributeSlug)e.hasEdits||e.isActive&&!e.isDefault?d({blockVisibility:(0,i.omit)({...f},[e.attributeSlug])}):d({blockVisibility:(0,i.assign)({...f},{[e.attributeSlug]:"hideBlock"!==e.attributeSlug&&{}})});else if("reset"===t)b((0,i.assign)({...m},{controls:{...(0,i.omit)({...m.controls},[e.attributeSlug])}}));else{let t;t=e.isActive?(0,i.omit)({...m.controls},[e.attributeSlug]):(0,i.assign)({...m.controls},{[e.attributeSlug]:{}}),b((0,i.assign)({...m},{controls:{...t}}))}}const _=[...v,...h,...g].some((e=>e.isActive&&!e.isDefault||e.isDefault&&e.hasEdits)),k=(0,t.createElement)(c.DropdownMenu,{className:"controls-dropdown",icon:0===a.length?P:F,label:(0,o.__)("Visibility Controls","block-visibility"),popoverProps:{className:"block-visibility__control-popover visibility-controls",focusOnMount:"container"},toggleProps:{isSmall:!0,disabled:0===p.length}},(i=>{let{onClose:l}=i;return(0,t.createElement)(t.Fragment,null,0!==v.length&&(0,t.createElement)(c.MenuGroup,{label:(0,o.__)("Defaults","block-visibility")},v.map(((e,n)=>(0,t.createElement)(B,{key:n,control:e,toggleControls:y})))),(0,t.createElement)(c.MenuGroup,{label:(0,o.__)("Controls","block-visibility")},h.map(((e,n)=>(0,t.createElement)(H,{key:n,control:e,toggleControls:y})))),0!==g.length&&(0,t.createElement)(c.MenuGroup,{label:(0,o.__)("Integrations","block-visibility")},g.map(((e,n)=>(0,t.createElement)(H,{key:n,control:e,toggleControls:y})))),(0,t.createElement)(c.MenuGroup,null,(0,t.createElement)(c.Slot,{name:"ControlSetOptionsToolsTop"}),(0,t.createElement)(c.MenuItem,{"aria-disabled":!_,onClick:()=>{_&&(d({blockVisibility:void 0}),(0,V.speak)((0,o.__)("All controls reset","block-visibility"),"assertive"))},variant:"tertiary"},(0,o.__)("Reset all","block-visibility")),(0,t.createElement)(c.Slot,{name:"ControlSetOptionsToolsBottom"})),(0,t.createElement)(A,e({canResetAll:_,coreControls:h,integrationControls:g,modalOpen:r,onClose:l,setModalOpen:s,toggleControls:y},n)))}));return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"controls-panel-header"},(0,t.createElement)("h2",null,(0,o.__)("Visibility","block-visibility")),(0,t.createElement)("div",{className:"controls-panel-header__dropdown-menus"},k)),r&&(0,t.createElement)(L,e({coreControls:h,integrationControls:g,modalOpen:r,setModalOpen:s,toggleControls:y},n)))}function L(e){return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(c.Slot,{name:"ControlSetModals"}),(0,t.createElement)(N,e))}function H(e){const{control:n,toggleControls:i}=e;return(0,t.createElement)(c.MenuItem,{key:n.attributeSlug,icon:n.isActive&&I,label:(0,o.sprintf)( +(0,l.__)('"%s" is now hidden.'),P);return(0,t.createElement)(O.BlockSettingsMenuControls,null,(0,t.createElement)(c.MenuItem,{onClick:()=>{s(p,{blockVisibility:(0,i.assign)({...M},{hideBlock:!V})}),r(p),a(F,{type:"snackbar"})},icon:R,label:T},T))})),V=window.wp.a11y,R=window.wp.primitives,T=(0,t.createElement)(R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(R.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"})),P=(0,t.createElement)(R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(R.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),F=(0,t.createElement)(R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(R.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),I=function(e){let{icon:n,size:i=24,...l}=e;return(0,t.cloneElement)(n,{width:i,height:i,...l})},A=(0,c.withFilters)("blockVisibility.addControlSetOptions")((e=>(0,t.createElement)(t.Fragment,null))),N=(0,c.withFilters)("blockVisibility.addControlSetModals")((e=>(0,t.createElement)(t.Fragment,null)));function D(n){var o;const[r,s]=(0,t.useState)(!1),{activeControls:a,attributes:u,setAttributes:d,enabledControls:p,controlSetAtts:b,setControlSetAtts:m}=n,f=null!==(o=u?.blockVisibility)&&void 0!==o?o:{},v=p.filter((e=>e.isDefault));v.forEach((e=>{"hideBlock"===e.attributeSlug||"visibilityPresets"===e.attributeSlug?e.hasEdits=f.hasOwnProperty(e.attributeSlug):e.hasEdits=b?.controls?.hasOwnProperty(e.attributeSlug)}));const h=p.filter((e=>"integration"!==e.type&&!e.isDefault)),g=p.filter((e=>"integration"===e.type&&!e.isDefault));function y(e,t){if("hideBlock"===e.attributeSlug||"visibilityPresets"===e.attributeSlug)e.hasEdits||e.isActive&&!e.isDefault?d({blockVisibility:(0,i.omit)({...f},[e.attributeSlug])}):d({blockVisibility:(0,i.assign)({...f},{[e.attributeSlug]:"hideBlock"!==e.attributeSlug&&{}})});else if("reset"===t)m((0,i.assign)({...b},{controls:{...(0,i.omit)({...b.controls},[e.attributeSlug])}}));else{let t;t=e.isActive?(0,i.omit)({...b.controls},[e.attributeSlug]):(0,i.assign)({...b.controls},{[e.attributeSlug]:{}}),m((0,i.assign)({...b},{controls:{...t}}))}}const _=[...v,...h,...g].some((e=>e.isActive&&!e.isDefault||e.isDefault&&e.hasEdits)),k=(0,t.createElement)(c.DropdownMenu,{className:"controls-dropdown",icon:0===a.length?T:P,label:(0,l.__)("Visibility Controls","block-visibility"),popoverProps:{className:"block-visibility__control-popover visibility-controls",focusOnMount:"container"},toggleProps:{isSmall:!0,disabled:0===p.length}},(i=>{let{onClose:o}=i;return(0,t.createElement)(t.Fragment,null,0!==v.length&&(0,t.createElement)(c.MenuGroup,{label:(0,l.__)("Defaults","block-visibility")},v.map(((e,n)=>(0,t.createElement)(B,{key:n,control:e,toggleControls:y})))),(0,t.createElement)(c.MenuGroup,{label:(0,l.__)("Controls","block-visibility")},h.map(((e,n)=>(0,t.createElement)(H,{key:n,control:e,toggleControls:y})))),0!==g.length&&(0,t.createElement)(c.MenuGroup,{label:(0,l.__)("Integrations","block-visibility")},g.map(((e,n)=>(0,t.createElement)(H,{key:n,control:e,toggleControls:y})))),(0,t.createElement)(c.MenuGroup,null,(0,t.createElement)(c.Slot,{name:"ControlSetOptionsToolsTop"}),(0,t.createElement)(c.MenuItem,{"aria-disabled":!_,onClick:()=>{_&&(d({blockVisibility:void 0}),(0,V.speak)((0,l.__)("All controls reset","block-visibility"),"assertive"))},variant:"tertiary"},(0,l.__)("Reset all","block-visibility")),(0,t.createElement)(c.Slot,{name:"ControlSetOptionsToolsBottom"})),(0,t.createElement)(A,e({canResetAll:_,coreControls:h,integrationControls:g,modalOpen:r,onClose:o,setModalOpen:s,toggleControls:y},n)))}));return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"controls-panel-header"},(0,t.createElement)("h2",null,(0,l.__)("Visibility","block-visibility")),(0,t.createElement)("div",{className:"controls-panel-header__dropdown-menus"},k)),r&&(0,t.createElement)(L,e({coreControls:h,integrationControls:g,modalOpen:r,setModalOpen:s,toggleControls:y},n)))}function L(e){return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(c.Slot,{name:"ControlSetModals"}),(0,t.createElement)(N,e))}function H(e){const{control:n,toggleControls:i}=e;return(0,t.createElement)(c.MenuItem,{key:n.attributeSlug,icon:n.isActive&&F,label:(0,l.sprintf)( // translators: %s: The name of the control being toggled e.g. "Hide Block". -(0,o.__)("Toggle %s","block-visibility"),n.label),onClick:()=>{i(n),(0,V.speak)((0,o.sprintf)( +(0,l.__)("Toggle %s","block-visibility"),n.label),onClick:()=>{i(n),(0,V.speak)((0,l.sprintf)( // translators: %s: The name of the control being toggled e.g. "Hide Block". -(0,o.__)("%s toggled","block-visibility"),n.label),"assertive")}},n.icon&&(0,t.createElement)(T,{className:"control-branding-icon",icon:n.icon}),n.label)}function B(e){const{control:n,toggleControls:i}=e;return n.hasEdits?(0,t.createElement)(c.MenuItem,{key:n.attributeSlug,disabled:!n.hasEdits,className:"has-reset",label:(0,o.sprintf)( +(0,l.__)("%s toggled","block-visibility"),n.label),"assertive")}},n.icon&&(0,t.createElement)(I,{className:"control-branding-icon",icon:n.icon}),n.label)}function B(e){const{control:n,toggleControls:i}=e;return n.hasEdits?(0,t.createElement)(c.MenuItem,{key:n.attributeSlug,disabled:!n.hasEdits,className:"has-reset",label:(0,l.sprintf)( // translators: %s: The name of the control being reset e.g. "Hide Block". -(0,o.__)("Reset %s","block-visibility"),n.label),onClick:()=>{i(n,"reset"),(0,V.speak)((0,o.sprintf)( +(0,l.__)("Reset %s","block-visibility"),n.label),onClick:()=>{i(n,"reset"),(0,V.speak)((0,l.sprintf)( // translators: %s: The name of the control being reset e.g. "Hide Block". -(0,o.__)("%s reset to default","block-visibility"),n.label),"assertive")},role:"menuitem"},n.icon&&(0,t.createElement)(T,{className:"control-branding-icon",icon:n.icon}),n.label,n.hasEdits&&(0,t.createElement)("span",{"aria-hidden":"true",className:"menu-item-reset"},(0,o.__)("Reset","block-visibility"))):(0,t.createElement)(c.MenuItem,{"aria-disabled":!0,isSelected:!0,key:n.attributeSlug,role:"menuitemcheckbox"},n.icon&&(0,t.createElement)(T,{className:"control-branding-icon",icon:n.icon}),n.label)}function z(e){var t;const n=null!==(t=e?.integrations?.acf?.fields)&&void 0!==t?t:[],i=[],l=[{value:"notEmpty",label:(0,o.__)("Has any value","block-visibility"),disableValue:!0},{value:"empty",label:(0,o.__)("Has no value","block-visibility"),disableValue:!0},{value:"equal",label:(0,o.__)("Value is equal to","block-visibility")},{value:"notEqual",label:(0,o.__)("Value is not equal to","block-visibility")},{value:"contains",label:(0,o.__)("Value contains","block-visibility")},{value:"notContain",label:(0,o.__)("Value does not contain","block-visibility")}];return 0!==n.length&&n.forEach((e=>{var t,n;const r=null!==(t=e?.key)&&void 0!==t?t:"",s=null!==(n=e?.fields)&&void 0!==n?n:[];0!==s.length&&s.forEach((e=>{var t,n;const s=null!==(t=e?.key)&&void 0!==t?t:"",a=null!==(n=e?.label)&&void 0!==n?n:"";i.push({value:s,label:a,group:r,fields:[{type:"subField",name:"isUserField",valueType:"toggle",placeholder:(0,o.__)("Evaluate as user field","block-visibility")},{type:"operatorField",valueType:"select",options:l,placeholder:(0,o.__)("Select Condition…","block-visibility")},{type:"valueField",valueType:"text",placeholder:(0,o.__)("Enter Value…","block-visibility"),displayConditions:[{dependencyType:"operatorField",dependencyValues:["equal","notEqual","contains","notContain"]}]}]})}))})),i}const U="https://www.blockvisibilitywp.com/",j="https://www.blockvisibilitywp.com/knowledge-base/",$="utm_source=plugin&utm_medium=editor&utm_campaign=plugin_referrals",q="utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",G="bv_query=learn_more",W={blockVisibilityHome:U,blockVisibilityOrgSupport:"https://wordpress.org/support/plugin/block-visibility",blockVisibilityOrgReviews:"https://wordpress.org/support/plugin/block-visibility/reviews/?filter=5",gitHub:"https://github.com/ndiego/block-visibility",twitter:"https://twitter.com/BlockVisibility",settingsHome:U+"?"+G+"&"+q,settingsProUpgrade:U+"pro/?bv_query=get_pro&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_upsells",settingsKnowledgeBase:j+"?"+G+"&"+q,settingsGeneral:j+"how-to-configure-the-general-settings/?"+G+"&"+q,settingsBlockManager:j+"how-to-configure-the-block-manager/?"+G+"&"+q,settingsVisibilityControls:j+"guide-to-visibility-controls-in-block-visibility/?"+G+"&"+q,settingsHideBlock:j+"how-to-use-the-hide-block-control/?"+G+"&"+q,settingsDateTime:j+"how-to-use-the-date-time-control/?"+G+"&"+q,settingsQueryString:j+"how-to-use-the-query-string-control/?"+G+"&"+q,settingsScreenSize:j+"how-to-use-the-screen-size-control//?"+G+"&"+q,settingsUserRole:j+"how-to-use-the-user-role-control/?"+G+"&"+q,settingsVisibilityContolsIntegrations:j+"guide-to-third-party-integrations-in-block-visibility/?"+G+"&"+q,settingsACF:j+"how-to-use-the-advanced-custom-fields-control/?"+G+"&"+q,settingsWpFusion:j+"how-to-use-the-wp-fusion-control/?"+G+"&"+q,editorHideBlock:j+"how-to-use-the-hide-block-control/?"+G+"&"+$,editorDateTime:j+"how-to-use-the-date-time-control/?"+G+"&"+$,editorQueryString:j+"how-to-use-the-query-string-control/?"+G+"&"+$,editorScreenSize:j+"how-to-use-the-screen-size-control//?"+G+"&"+$,editorUserRole:j+"how-to-use-the-user-role-control/?"+G+"&"+$,editorACF:j+"how-to-use-the-advanced-custom-fields-control/?"+G+"&"+$,editorWpFusion:j+"how-to-use-the-wp-fusion-control/?"+G+"&"+$},Z=window.wp.date;function Y(e){const{value:n,onDateChange:i,setPopoverOpen:o,includeTime:l}=e,r=(0,Z.__experimentalGetSettings)(),s=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,t.createElement)(c.Popover,{className:"block-visibility__date-time-popover",onClose:o.bind(null,!1)},[l&&(0,t.createElement)(c.DateTimePicker,{currentDate:n,onChange:e=>{i(e),o(!1)},is12Hour:s}),!l&&(0,t.createElement)(c.DatePicker,{currentDate:n,onChange:e=>{i(e),o(!1)},is12Hour:s})])}const Q=(0,t.createElement)(R.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)(R.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"})),X=(0,t.createElement)(R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(R.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"}));function K(e){const{value:n,setPopoverOpen:i,onClearDateTime:l,includeTime:r}=e;let s=r?(0,o.__)("Select Date and Time…","block-visibility"):(0,o.__)("Select Date…","block-visibility");const a=(0,Z.__experimentalGetSettings)();if(n){const e=r?`${a.formats.date} ${a.formats.time}`:`${a.formats.date}`;s=(0,Z.format)(e,n)}return(0,t.createElement)("div",{className:d()("date-time__date-time-field",{"has-value":n})},(0,t.createElement)(c.Button,{icon:Q,title:(0,o.__)("Select date/time","block-visibility"),onClick:()=>i((e=>!e)),isLink:!0},(0,t.createElement)("span",null,s)),n&&(0,t.createElement)(c.Button,{icon:X,className:"clear-date-time",title:(0,o.__)("Clear date/time","block-visibility"),onClick:()=>l("")}))}function J(e){const{value:n,onChange:i,includeTime:o}=e,[l,r]=(0,t.useState)(!1);return(0,t.createElement)("div",{className:"date-time"},(0,t.createElement)(K,{value:n,setPopoverOpen:r,onClearDateTime:()=>i(""),includeTime:o}),l&&(0,t.createElement)(Y,{value:n,onDateChange:e=>i(e),setPopoverOpen:r,includeTime:o}))}const ee=(0,t.createElement)(R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(R.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 te(e){const{message:n,subMessage:i,link:l,position:r}=e,s=null!=r?r:"middle left";return(0,t.createElement)("div",{className:"information-popover"},(0,t.createElement)(c.DropdownMenu,{label:(0,o.__)("More Information","block-visibility"),icon:ee,toggleProps:{className:"information-popover__button"},popoverProps:{className:"information-popover__popover",focusOnMount:"container",position:s,noArrow:!1}},(()=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("p",null,n),i&&(0,t.createElement)("p",null,i),l&&(0,t.createElement)(c.ExternalLink,{href:l},(0,o.__)("Learn More","block-visibility"))))))}const ne=(0,t.createElement)(R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(R.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));function ie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function le(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,i=new Array(t);n=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}const ue=window.React;var de=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function pe(e,t){for(var n=0;n0?Ce(Ae,--Ie):0,Pe--,10===Te&&(Pe=1,Re--),Te}function He(){return Te=Ie2||je(Te)>3?"":" "}function Ze(e,t){for(;--t&&He()&&!(Te<48||Te>102||Te>57&&Te<65||Te>70&&Te<97););return Ue(e,ze()+(t<6&&32==Be()&&32==He()))}function Ye(e){for(;He();)switch(Te){case e:return Ie;case 34:case 39:34!==e&&39!==e&&Ye(Te);break;case 40:41===e&&Ye(e);break;case 92:He()}return Ie}function Qe(e,t){for(;He()&&e+Te!==57&&(e+Te!==84||47!==Be()););return"/*"+Ue(t,Ie-1)+"*"+_e(47===e?e:He())}function Xe(e){for(;!je(Be());)He();return Ue(e,Ie)}var Ke="-ms-",Je="-moz-",et="-webkit-",tt="comm",nt="rule",it="decl",ot="@keyframes";function lt(e,t){for(var n="",i=Me(e),o=0;o6)switch(Ce(e,t+1)){case 109:if(45!==Ce(e,t+4))break;case 102:return Se(e,/(.+:)(.+)-([^]+)/,"$1"+et+"$2-$3$1"+Je+(108==Ce(e,t+3)?"$3":"$2-$3"))+e;case 115:return~we(e,"stretch")?st(Se(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Ce(e,t+1))break;case 6444:switch(Ce(e,xe(e)-3-(~we(e,"!important")&&10))){case 107:return Se(e,":",":"+et)+e;case 101:return Se(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+et+(45===Ce(e,14)?"inline-":"")+"box$3$1"+et+"$2$3$1"+Ke+"$2box$3")+e}break;case 5936:switch(Ce(e,t+11)){case 114:return et+e+Ke+Se(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return et+e+Ke+Se(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return et+e+Ke+Se(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return et+e+Ke+e+e}return e}function at(e){return qe(ct("",null,null,null,[""],e=$e(e),0,[0],e))}function ct(e,t,n,i,o,l,r,s,a){for(var c=0,u=0,d=r,p=0,m=0,b=0,f=1,v=1,h=1,g=0,y="",_=o,k=l,E=i,S=y;v;)switch(b=g,g=He()){case 40:if(108!=b&&58==S.charCodeAt(d-1)){-1!=we(S+=Se(Ge(g),"&","&\f"),"&\f")&&(h=-1);break}case 34:case 39:case 91:S+=Ge(g);break;case 9:case 10:case 13:case 32:S+=We(b);break;case 92:S+=Ze(ze()-1,7);continue;case 47:switch(Be()){case 42:case 47:Ve(dt(Qe(He(),ze()),t,n),a);break;default:S+="/"}break;case 123*f:s[c++]=xe(S)*h;case 125*f:case 59:case 0:switch(g){case 0:case 125:v=0;case 59+u:m>0&&xe(S)-d&&Ve(m>32?pt(S+";",i,n,d-1):pt(Se(S," ","")+";",i,n,d-2),a);break;case 59:S+=";";default:if(Ve(E=ut(S,t,n,c,u,o,s,y,_=[],k=[],d),l),123===g)if(0===u)ct(S,t,E,E,_,l,d,s,k);else switch(p){case 100:case 109:case 115:ct(e,E,E,i&&Ve(ut(e,E,E,0,0,o,s,y,o,_=[],d),k),o,k,d,s,i?_:k);break;default:ct(S,E,E,E,[""],k,0,s,k)}}c=u=m=0,f=h=1,y=S="",d=r;break;case 58:d=1+xe(S),m=b;default:if(f<1)if(123==g)--f;else if(125==g&&0==f++&&125==Le())continue;switch(S+=_e(g),g*f){case 38:h=u>0?1:(S+="\f",-1);break;case 44:s[c++]=(xe(S)-1)*h,h=1;break;case 64:45===Be()&&(S+=Ge(He())),p=Be(),u=d=xe(y=S+=Xe(ze())),g++;break;case 45:45===b&&2==xe(S)&&(f=0)}}return l}function ut(e,t,n,i,o,l,r,s,a,c,u){for(var d=o-1,p=0===o?l:[""],m=Me(p),b=0,f=0,v=0;b0?p[h]+" "+g:Se(g,/&\f/g,p[h])))&&(a[v++]=y);return Ne(e,t,n,0===o?nt:s,a,c,u)}function dt(e,t,n){return Ne(e,t,n,tt,_e(Te),Oe(e,2,-2),0)}function pt(e,t,n,i){return Ne(e,t,n,it,Oe(e,0,i),Oe(e,i+1,-1),i)}var mt=function(e,t,n){for(var i=0,o=0;i=o,o=Be(),38===i&&12===o&&(t[n]=1),!je(o);)He();return Ue(e,Ie)},bt=new WeakMap,ft=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)||bt.get(n))&&!i){bt.set(e,!0);for(var o=[],l=function(e,t){return qe(function(e,t){var n=-1,i=44;do{switch(je(i)){case 0:38===i&&12===Be()&&(t[n]=1),e[n]+=mt(Ie-1,t,n);break;case 2:e[n]+=Ge(i);break;case 4:if(44===i){e[++n]=58===Be()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=_e(i)}}while(i=He());return e}($e(e),t))}(t,o),r=n.props,s=0,a=0;s-1&&!e.return)switch(e.type){case it:e.return=st(e.value,e.length);break;case ot:return lt([De(e,{value:Se(e.value,"@","@"+et)})],i);case nt: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 lt([De(e,{props:[Se(t,/:(read-\w+)/,":-moz-$1")]})],i);case"::placeholder":return lt([De(e,{props:[Se(t,/:(plac\w+)/,":"+et+"input-$1")]}),De(e,{props:[Se(t,/:(plac\w+)/,":-moz-$1")]}),De(e,{props:[Se(t,/:(plac\w+)/,Ke+"input-$1")]})],i)}return""}))}}];const gt=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||ht,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,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)},kt={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};var Et=/[A-Z]|^ms/g,St=/_EMO_([^_]+?)_([^]*?)_EMO_/g,wt=function(e){return 45===e.charCodeAt(1)},Ct=function(e){return null!=e&&"boolean"!=typeof e},Ot=function(e){var t=Object.create(null);return function(e){return void 0===t[e]&&(t[e]=wt(n=e)?n:n.replace(Et,"-$&").toLowerCase()),t[e];var n}}(),xt=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(St,(function(e,t,n){return Vt={name:t,styles:n,next:Vt},t}))}return 1===kt[e]||wt(e)||"number"!=typeof t||0===t?t:t+"px"};function Mt(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 Vt={name:n.name,styles:n.styles,next:Vt},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)Vt={name:i.name,styles:i.styles,next:Vt},i=i.next;return n.styles+";"}return function(e,t,n){var i="";if(Array.isArray(n))for(var o=0;oe.brand+"/"+e.version)).join(" "):navigator.userAgent}())}["top","right","bottom","left"].reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]),Math.min,Math.max;const Kt=Math.round;function Jt(e,t,n){var i,o,l,r;void 0===t&&(t=!1),void 0===n&&(n=!1);const s=e.getBoundingClientRect();let a=1,c=1;t&&Zt(e)&&(a=e.offsetWidth>0&&Kt(s.width)/e.offsetWidth||1,c=e.offsetHeight>0&&Kt(s.height)/e.offsetHeight||1);const u=Yt(e)?Gt(e):window,d=!Xt()&&n,p=(s.left+(d&&null!=(i=null==(o=u.visualViewport)?void 0:o.offsetLeft)?i:0))/a,m=(s.top+(d&&null!=(l=null==(r=u.visualViewport)?void 0:r.offsetTop)?l:0))/c,b=s.width/a,f=s.height/c;return{width:b,height:f,top:m,right:p+b,bottom:m+f,left:p,x:p,y:m}}function en(e){return"html"===Wt(e)?e:e.assignedSlot||e.parentNode||(function(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Gt(e).ShadowRoot||e instanceof ShadowRoot)}(e)?e.host:null)||function(e){return(t=e,(t instanceof Gt(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}(e)}function tn(e){const t=en(e);return function(e){return["html","body","#document"].includes(Wt(e))}(t)?e.ownerDocument.body:Zt(t)&&Qt(t)?t:tn(t)}function nn(e,t){var n;void 0===t&&(t=[]);const i=tn(e),o=i===(null==(n=e.ownerDocument)?void 0:n.body),l=Gt(i),r=o?[l].concat(l.visualViewport||[],Qt(i)?i:[]):i,s=t.concat(r);return o?s:s.concat(nn(r))}const on=ue.useLayoutEffect;var ln=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],rn=function(){};function sn(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function an(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o-1}function mn(e){return pn(e)?window.pageYOffset:e.scrollTop}function bn(e,t){pn(e)?window.scrollTo(0,t):e.scrollTop=t}function fn(e,t,n,i){return n*((e=e/i-1)*e*e+1)+t}function vn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:rn,o=mn(e),l=t-o,r=10,s=0;function a(){var t=fn(s+=r,o,l,n);bn(e,t),sn.bottom?bn(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):i.top-o=b)return{placement:"bottom",maxHeight:t};if(w>=b&&!r)return l&&vn(a,C,x),{placement:"bottom",maxHeight:t};if(!r&&w>=i||r&&E>=i)return l&&vn(a,C,x),{placement:"bottom",maxHeight:r?E-y:w-y};if("auto"===o||r){var M=t,V=r?k:S;return V>=i&&(M=Math.min(V-y-s,t)),{placement:"top",maxHeight:M}}if("bottom"===o)return l&&bn(a,C),{placement:"bottom",maxHeight:t};break;case"top":if(k>=b)return{placement:"top",maxHeight:t};if(S>=b&&!r)return l&&vn(a,O,x),{placement:"top",maxHeight:t};if(!r&&S>=i||r&&k>=i){var R=t;return(!r&&S>=i||r&&k>=i)&&(R=r?k-_:S-_),l&&vn(a,O,x),{placement:"top",maxHeight:R}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}({maxHeight:i,menuEl:e,minHeight:n,placement:o,shouldScroll:r&&!t,isFixedPosition:t,controlHeight:v});p(s.maxHeight),f(s.placement),null==a||a(s.placement)}}),[i,o,l,r,n,a,v]),t({ref:c,placerProps:le(le({},e),{},{placement:b||On(o),maxHeight:d})})},Vn=function(e,t){var n=e.theme,i=n.spacing.baseUnit,o=n.colors;return le({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*i,"px ").concat(3*i,"px")})},Rn=Vn,Pn=Vn,Fn=function(t){var n=t.children,i=t.innerProps;return Ut("div",e({},dn(t,"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),n)};Fn.defaultProps={children:"No options"};var In=function(t){var n=t.children,i=t.innerProps;return Ut("div",e({},dn(t,"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),n)};In.defaultProps={children:"Loading..."};var Tn,An,Nn,Dn=["size"],Ln={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Hn=function(t){var n=t.size,i=ce(t,Dn);return Ut("svg",e({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Ln},i))},Bn=function(t){return Ut(Hn,e({size:20},t),Ut("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},zn=function(t){return Ut(Hn,e({size:20},t),Ut("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Un=function(e,t){var n=e.isFocused,i=e.theme,o=i.spacing.baseUnit,l=i.colors;return le({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?l.neutral60:l.neutral20,padding:2*o,":hover":{color:n?l.neutral80:l.neutral40}})},jn=Un,$n=Un,qn=function(){var e=jt.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Tn||(An=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],Nn||(Nn=An.slice(0)),Tn=Object.freeze(Object.defineProperties(An,{raw:{value:Object.freeze(Nn)}})))),Gn=function(e){var t=e.delay,n=e.offset;return Ut("span",{css:jt({animation:"".concat(qn," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Wn=function(t){var n=t.innerProps,i=t.isRtl;return Ut("div",e({},dn(t,"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Ut(Gn,{delay:0,offset:i}),Ut(Gn,{delay:160,offset:!0}),Ut(Gn,{delay:320,offset:!i}))};Wn.defaultProps={size:4};var Zn=["data"],Yn=["innerRef","isDisabled","isHidden","inputClassName"],Qn={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Xn={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":le({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Qn)},Kn=function(e){return le({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Qn)},Jn=function(e){var t=e.children,n=e.innerProps;return Ut("div",n,t)},ei={ClearIndicator:function(t){var n=t.children,i=t.innerProps;return Ut("div",e({},dn(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),i),n||Ut(Bn,null))},Control:function(t){var n=t.children,i=t.isDisabled,o=t.isFocused,l=t.innerRef,r=t.innerProps,s=t.menuIsOpen;return Ut("div",e({ref:l},dn(t,"control",{control:!0,"control--is-disabled":i,"control--is-focused":o,"control--menu-is-open":s}),r),n)},DropdownIndicator:function(t){var n=t.children,i=t.innerProps;return Ut("div",e({},dn(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),i),n||Ut(zn,null))},DownChevron:zn,CrossIcon:Bn,Group:function(t){var n=t.children,i=t.cx,o=t.getStyles,l=t.getClassNames,r=t.Heading,s=t.headingProps,a=t.innerProps,c=t.label,u=t.theme,d=t.selectProps;return Ut("div",e({},dn(t,"group",{group:!0}),a),Ut(r,e({},s,{selectProps:d,theme:u,getStyles:o,getClassNames:l,cx:i}),c),Ut("div",null,n))},GroupHeading:function(t){var n=un(t);n.data;var i=ce(n,Zn);return Ut("div",e({},dn(t,"groupHeading",{"group-heading":!0}),i))},IndicatorsContainer:function(t){var n=t.children,i=t.innerProps;return Ut("div",e({},dn(t,"indicatorsContainer",{indicators:!0}),i),n)},IndicatorSeparator:function(t){var n=t.innerProps;return Ut("span",e({},n,dn(t,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(t){var n=t.cx,i=t.value,o=un(t),l=o.innerRef,r=o.isDisabled,s=o.isHidden,a=o.inputClassName,c=ce(o,Yn);return Ut("div",e({},dn(t,"input",{"input-container":!0}),{"data-value":i||""}),Ut("input",e({className:n({input:!0},a),ref:l,style:Kn(s),disabled:r},c)))},LoadingIndicator:Wn,Menu:function(t){var n=t.children,i=t.innerRef,o=t.innerProps;return Ut("div",e({},dn(t,"menu",{menu:!0}),{ref:i},o),n)},MenuList:function(t){var n=t.children,i=t.innerProps,o=t.innerRef,l=t.isMulti;return Ut("div",e({},dn(t,"menuList",{"menu-list":!0,"menu-list--is-multi":l}),{ref:o},i),n)},MenuPortal:function(t){var n=t.appendTo,i=t.children,o=t.controlElement,l=t.innerProps,r=t.menuPlacement,s=t.menuPosition,a=(0,ue.useRef)(null),c=(0,ue.useRef)(null),u=ae((0,ue.useState)(On(r)),2),d=u[0],p=u[1],m=(0,ue.useMemo)((function(){return{setPortalPlacement:p}}),[]),b=ae((0,ue.useState)(null),2),f=b[0],v=b[1],h=(0,ue.useCallback)((function(){if(o){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(o),t="fixed"===s?0:window.pageYOffset,n=e[d]+t;n===(null==f?void 0:f.offset)&&e.left===(null==f?void 0:f.rect.left)&&e.width===(null==f?void 0:f.rect.width)||v({offset:n,rect:e})}}),[o,s,d,null==f?void 0:f.offset,null==f?void 0:f.rect.left,null==f?void 0:f.rect.width]);on((function(){h()}),[h]);var g=(0,ue.useCallback)((function(){"function"==typeof c.current&&(c.current(),c.current=null),o&&a.current&&(c.current=function(e,t,n,i){void 0===i&&(i={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:r=!0,animationFrame:s=!1}=i,a=o&&!s,c=a||l?[...Yt(e)?nn(e):[],...nn(t)]:[];c.forEach((e=>{a&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)}));let u,d=null;if(r){let i=!0;d=new ResizeObserver((()=>{i||n(),i=!1})),Yt(e)&&!s&&d.observe(e),d.observe(t)}let p=s?Jt(e):null;return s&&function t(){const i=Jt(e);!p||i.x===p.x&&i.y===p.y&&i.width===p.width&&i.height===p.height||n(),p=i,u=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{a&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)})),null==(e=d)||e.disconnect(),d=null,s&&cancelAnimationFrame(u)}}(o,a.current,h,{elementResize:"ResizeObserver"in window}))}),[o,h]);on((function(){g()}),[g]);var y=(0,ue.useCallback)((function(e){a.current=e,g()}),[g]);if(!n&&"fixed"!==s||!f)return null;var _=Ut("div",e({ref:y},dn(le(le({},t),{},{offset:f.offset,position:s,rect:f.rect}),"menuPortal",{"menu-portal":!0}),l),i);return Ut(xn.Provider,{value:m},n?(0,$t.createPortal)(_,n):_)},LoadingMessage:In,NoOptionsMessage:Fn,MultiValue:function(e){var t=e.children,n=e.components,i=e.data,o=e.innerProps,l=e.isDisabled,r=e.removeProps,s=e.selectProps,a=n.Container,c=n.Label,u=n.Remove;return Ut(a,{data:i,innerProps:le(le({},dn(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":l})),o),selectProps:s},Ut(c,{data:i,innerProps:le({},dn(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),Ut(u,{data:i,innerProps:le(le({},dn(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},r),selectProps:s}))},MultiValueContainer:Jn,MultiValueLabel:Jn,MultiValueRemove:function(t){var n=t.children,i=t.innerProps;return Ut("div",e({role:"button"},i),n||Ut(Bn,{size:14}))},Option:function(t){var n=t.children,i=t.isDisabled,o=t.isFocused,l=t.isSelected,r=t.innerRef,s=t.innerProps;return Ut("div",e({},dn(t,"option",{option:!0,"option--is-disabled":i,"option--is-focused":o,"option--is-selected":l}),{ref:r,"aria-disabled":i},s),n)},Placeholder:function(t){var n=t.children,i=t.innerProps;return Ut("div",e({},dn(t,"placeholder",{placeholder:!0}),i),n)},SelectContainer:function(t){var n=t.children,i=t.innerProps,o=t.isDisabled,l=t.isRtl;return Ut("div",e({},dn(t,"container",{"--is-disabled":o,"--is-rtl":l}),i),n)},SingleValue:function(t){var n=t.children,i=t.isDisabled,o=t.innerProps;return Ut("div",e({},dn(t,"singleValue",{"single-value":!0,"single-value--is-disabled":i}),o),n)},ValueContainer:function(t){var n=t.children,i=t.innerProps,o=t.isMulti,l=t.hasValue;return Ut("div",e({},dn(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":l}),i),n)}},ti=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function ni(e,t){if(e.length!==t.length)return!1;for(var n=0;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,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(l," focused, ").concat(c(r,n),".");if("menu"===t){var u=s?" disabled":"",d="".concat(a?"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:"",".")}},ri=function(e){var t=e.ariaSelection,n=e.focusedOption,i=e.focusedValue,o=e.focusableOptions,l=e.isFocused,r=e.selectValue,s=e.selectProps,a=e.id,c=s.ariaLiveMessages,u=s.getOptionLabel,d=s.inputValue,p=s.isMulti,m=s.isOptionDisabled,b=s.isSearchable,f=s.menuIsOpen,v=s.options,h=s.screenReaderStatus,g=s.tabSelectsValue,y=s["aria-label"],_=s["aria-live"],k=(0,ue.useMemo)((function(){return le(le({},li),c||{})}),[c]),E=(0,ue.useMemo)((function(){var e,n="";if(t&&k.onChange){var i=t.option,o=t.options,l=t.removedValue,s=t.removedValues,a=t.value,c=l||i||(e=a,Array.isArray(e)?null:e),d=c?u(c):"",p=o||s||void 0,b=p?p.map(u):[],f=le({isDisabled:c&&m(c,r),label:d,labels:b},t);n=k.onChange(f)}return n}),[t,k,m,r,u]),S=(0,ue.useMemo)((function(){var e="",t=n||i,l=!!(n&&r&&r.includes(n));if(t&&k.onFocus){var s={focused:t,label:u(t),isDisabled:m(t,r),isSelected:l,options:o,context:t===n?"menu":"value",selectValue:r};e=k.onFocus(s)}return e}),[n,i,u,m,k,o,r]),w=(0,ue.useMemo)((function(){var e="";if(f&&v.length&&k.onFilter){var t=h({count:o.length});e=k.onFilter({inputValue:d,resultsMessage:t})}return e}),[o,d,f,k,v,h]),C=(0,ue.useMemo)((function(){var e="";if(k.guidance){var t=i?"value":f?"menu":"input";e=k.guidance({"aria-label":y,context:t,isDisabled:n&&m(n,r),isMulti:p,isSearchable:b,tabSelectsValue:g})}return e}),[y,n,i,p,m,b,f,k,r,g]),O="".concat(S," ").concat(w," ").concat(C),x=Ut(ue.Fragment,null,Ut("span",{id:"aria-selection"},E),Ut("span",{id:"aria-context"},O)),M="initial-input-focus"===(null==t?void 0:t.action);return Ut(ue.Fragment,null,Ut(oi,{id:a},M&&x),Ut(oi,{"aria-live":_,"aria-atomic":"false","aria-relevant":"additions text"},l&&!M&&x))},si=[{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źẑżžẓẕƶȥɀⱬꝣ"}],ai=new RegExp("["+si.map((function(e){return e.letters})).join("")+"]","g"),ci={},ui=0;ui1?t-1:0),i=1;i0,f=d-p-u,v=!1;f>t&&r.current&&(i&&i(e),r.current=!1),b&&s.current&&(l&&l(e),s.current=!1),b&&t>f?(n&&!r.current&&n(e),m.scrollTop=d,v=!0,r.current=!0):!b&&-t>u&&(o&&!s.current&&o(e),m.scrollTop=0,v=!0,s.current=!0),v&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[n,i,o,l]),d=(0,ue.useCallback)((function(e){u(e,e.deltaY)}),[u]),p=(0,ue.useCallback)((function(e){a.current=e.changedTouches[0].clientY}),[]),m=(0,ue.useCallback)((function(e){var t=a.current-e.changedTouches[0].clientY;u(e,t)}),[u]),b=(0,ue.useCallback)((function(e){if(e){var t=!!Sn&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",m,t)}}),[m,p,d]),f=(0,ue.useCallback)((function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",m,!1))}),[m,p,d]);return(0,ue.useEffect)((function(){if(t){var e=c.current;return b(e),function(){f(e)}}}),[t,b,f]),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,ue.useRef)({}),l=(0,ue.useRef)(null),r=(0,ue.useCallback)((function(e){if(Ci){var t=document.body,n=t&&t.style;if(i&&yi.forEach((function(e){var t=n&&n[e];o.current[e]=t})),i&&Oi<1){var l=parseInt(o.current.paddingRight,10)||0,r=document.body?document.body.clientWidth:0,s=window.innerWidth-r+l||0;Object.keys(_i).forEach((function(e){var t=_i[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&wi()&&(t.addEventListener("touchmove",ki,xi),e&&(e.addEventListener("touchstart",Si,xi),e.addEventListener("touchmove",Ei,xi))),Oi+=1}}),[i]),s=(0,ue.useCallback)((function(e){if(Ci){var t=document.body,n=t&&t.style;Oi=Math.max(Oi-1,0),i&&Oi<1&&yi.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&wi()&&(t.removeEventListener("touchmove",ki,xi),e&&(e.removeEventListener("touchstart",Si,xi),e.removeEventListener("touchmove",Ei,xi)))}}),[i]);return(0,ue.useEffect)((function(){if(t){var e=l.current;return r(e),function(){s(e)}}}),[t,r,s]),function(e){l.current=e}}({isEnabled:n});return Ut(ue.Fragment,null,n&&Ut("div",{onClick:Mi,css:Vi}),t((function(e){o(e),l(e)})))}var Pi={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Fi=function(e){var t=e.name,n=e.onFocus;return Ut("input",{required:!0,name:t,tabIndex:-1,onFocus:n,css:Pi,value:"",onChange:function(){}})},Ii={clearIndicator:$n,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,t){var n=e.isDisabled,i=e.isFocused,o=e.theme,l=o.colors,r=o.borderRadius;return le({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?l.neutral5:l.neutral0,borderColor:n?l.neutral10:i?l.primary:l.neutral20,borderRadius:r,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(l.primary):void 0,"&:hover":{borderColor:i?l.primary:l.neutral30}})},dropdownIndicator:jn,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,i=n.colors,o=n.spacing;return le({label:"group",cursor:"default",display:"block"},t?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,i=e.theme,o=i.spacing.baseUnit,l=i.colors;return le({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?l.neutral10:l.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,i=e.value,o=e.theme,l=o.spacing,r=o.colors;return le(le({visibility:n?"hidden":"visible",transform:i?"translateZ(0)":""},Xn),t?{}:{margin:l.baseUnit/2,paddingBottom:l.baseUnit/2,paddingTop:l.baseUnit/2,color:r.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,i=e.size,o=e.theme,l=o.colors,r=o.spacing.baseUnit;return le({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?l.neutral60:l.neutral20,padding:2*r})},loadingMessage:Pn,menu:function(e,t){var n,i=e.placement,o=e.theme,l=o.borderRadius,r=o.spacing,s=o.colors;return le((ie(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(i),"100%"),ie(n,"position","absolute"),ie(n,"width","100%"),ie(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:l,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:r.menuGutter,marginTop:r.menuGutter})},menuList:function(e,t){var n=e.maxHeight,i=e.theme.spacing.baseUnit;return le({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:i,paddingTop:i})},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,t){var n=e.theme,i=n.spacing,o=n.borderRadius,l=n.colors;return le({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:l.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,i=n.borderRadius,o=n.colors,l=e.cropWithEllipsis;return le({overflow:"hidden",textOverflow:l||void 0===l?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,i=n.spacing,o=n.borderRadius,l=n.colors,r=e.isFocused;return le({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:r?l.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:l.dangerLight,color:l.danger}})},noOptionsMessage:Rn,option:function(e,t){var n=e.isDisabled,i=e.isFocused,o=e.isSelected,l=e.theme,r=l.spacing,s=l.colors;return le({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:i?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*r.baseUnit,"px ").concat(3*r.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,i=n.spacing,o=n.colors;return le({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,i=e.theme,o=i.spacing,l=i.colors;return le({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?l.neutral40:l.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,i=e.isMulti,o=e.hasValue,l=e.selectProps.controlShouldRenderValue;return le({alignItems:"center",display:i&&o&&l?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},Ti={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}},Ai={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:gn(),captureMenuScroll:!gn(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=le({ignoreCase:!0,ignoreAccents:!0,stringify:vi,trim:!0,matchFrom:"any"},undefined),i=n.ignoreCase,o=n.ignoreAccents,l=n.stringify,r=n.trim,s=n.matchFrom,a=r?fi(t):t,c=r?fi(l(e)):l(e);return i&&(a=a.toLowerCase(),c=c.toLowerCase()),o&&(a=bi(a),c=mi(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,unstyled:!1};function Ni(e,t,n,i){return{type:"option",data:t,isDisabled:Ui(e,t,n),isSelected:ji(e,t,n),label:Bi(e,t),value:zi(e,t),index:i}}function Di(e,t){return e.options.map((function(n,i){if("options"in n){var o=n.options.map((function(n,i){return Ni(e,n,t,i)})).filter((function(t){return Hi(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:i}:void 0}var l=Ni(e,n,t,i);return Hi(e,l)?l:void 0})).filter(wn)}function Li(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,he(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Hi(e,t){var n=e.inputValue,i=void 0===n?"":n,o=t.data,l=t.isSelected,r=t.label,s=t.value;return(!qi(e)||!l)&&$i(e,{label:r,value:s,data:o},i)}var Bi=function(e,t){return e.getOptionLabel(t)},zi=function(e,t){return e.getOptionValue(t)};function Ui(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function ji(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var i=zi(e,t);return n.some((function(t){return zi(e,t)===i}))}function $i(e,t,n){return!e.filterOption||e.filterOption(t,n)}var qi=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},Gi=1,Wi=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&me(e,t)}(a,t);var n,i,o,l,r,s=(l=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=be(l);if(r){var n=be(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ve(this,e)});function a(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=s.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},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.instancePrefix="",t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var i=t.props,o=i.onChange,l=i.name;n.name=l,t.ariaOnChange(e,n),o(e,n)},t.setValue=function(e,n,i){var o=t.props,l=o.closeMenuOnSelect,r=o.isMulti,s=o.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:s}),l&&(t.setState({inputIsHiddenAfterUpdate:!r}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:i})},t.selectOption=function(e){var n=t.props,i=n.blurInputOnSelect,o=n.isMulti,l=n.name,r=t.state.selectValue,s=o&&t.isOptionSelected(e,r),a=t.isOptionDisabled(e,r);if(s){var c=t.getOptionValue(e);t.setValue(r.filter((function(e){return t.getOptionValue(e)!==c})),"deselect-option",e)}else{if(a)return void t.ariaOnChange(e,{action:"select-option",option:e,name:l});o?t.setValue([].concat(he(r),[e]),"select-option",e):t.setValue(e,"select-option")}i&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,i=t.state.selectValue,o=t.getOptionValue(e),l=i.filter((function(e){return t.getOptionValue(e)!==o})),r=Cn(n,l,l[0]||null);t.onChange(r,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange(Cn(t.props.isMulti,[],null),{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,i=n[n.length-1],o=n.slice(0,n.length-1),l=Cn(e,o,o[0]||null);t.onChange(l,{action:"pop-value",removedValue:i})},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),i=0;i5||l>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=t.props.inputValue,i=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(i,{action:"input-change",prevInputValue:n}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var n=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:n}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){t.blockOptionHover||t.state.focusedOption===e||t.setState({focusedOption:e})},t.shouldHideSelectedOptions=function(){return qi(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var n=t.props,i=n.isMulti,o=n.backspaceRemovesValue,l=n.escapeClearsValue,r=n.inputValue,s=n.isClearable,a=n.isDisabled,c=n.menuIsOpen,u=n.onKeyDown,d=n.tabSelectsValue,p=n.openMenuOnFocus,m=t.state,b=m.focusedOption,f=m.focusedValue,v=m.selectValue;if(!(a||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!i||r)return;t.focusValue("previous");break;case"ArrowRight":if(!i||r)return;t.focusValue("next");break;case"Delete":case"Backspace":if(r)return;if(f)t.removeValue(f);else{if(!o)return;i?t.popValue():s&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!c||!d||!b||p&&t.isOptionSelected(b,v))return;t.selectOption(b);break;case"Enter":if(229===e.keyCode)break;if(c){if(!b)return;if(t.isComposing)return;t.selectOption(b);break}return;case"Escape":c?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:r}),t.onMenuClose()):s&&l&&t.clearValue();break;case" ":if(r)return;if(!c){t.openMenu("first");break}if(!b)return;t.selectOption(b);break;case"ArrowUp":c?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":c?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!c)return;t.focusOption("pageup");break;case"PageDown":if(!c)return;t.focusOption("pagedown");break;case"Home":if(!c)return;t.focusOption("first");break;case"End":if(!c)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.instancePrefix="react-select-"+(t.props.instanceId||++Gi),t.state.selectValue=cn(e.value),e.menuIsOpen&&t.state.selectValue.length){var n=t.buildFocusableOptions(),i=n.indexOf(t.state.selectValue[0]);t.state.focusedOption=n[i]}return t}return n=a,i=[{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(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&hn(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,i=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&i&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(hn(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,i=n.selectValue,o=n.isFocused,l=this.buildFocusableOptions(),r="first"===e?0:l.length-1;if(!this.props.isMulti){var s=l.indexOf(i[0]);s>-1&&(r=s)}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(Ti):le(le({},Ti),this.props.theme):Ti}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,i=this.getClassNames,o=this.getValue,l=this.selectOption,r=this.setValue,s=this.props,a=s.isMulti,c=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:i,getValue:o,hasValue:this.hasValue(),isMulti:a,isRtl:c,options:u,selectOption:l,selectProps:s,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 Ui(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return ji(this.props,e,t)}},{key:"filterOption",value:function(e,t){return $i(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 t=this.props,n=t.isDisabled,i=t.isSearchable,o=t.inputId,l=t.inputValue,r=t.tabIndex,s=t.form,a=t.menuIsOpen,c=t.required,u=this.getComponents().Input,d=this.state,p=d.inputIsHidden,m=d.ariaSelection,b=this.commonProps,f=o||this.getElementId("input"),v=le(le(le({"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"],"aria-required":c,role:"combobox"},a&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!i&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==m?void 0:m.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return i?ue.createElement(u,e({},b,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:f,innerRef:this.getInputRef,isDisabled:n,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:r,form:s,type:"text",value:l},v)):ue.createElement(gi,e({id:f,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:rn,onFocus:this.onInputFocus,disabled:n,tabIndex:r,inputMode:"none",form:s,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,n=this.getComponents(),i=n.MultiValue,o=n.MultiValueContainer,l=n.MultiValueLabel,r=n.MultiValueRemove,s=n.SingleValue,a=n.Placeholder,c=this.commonProps,u=this.props,d=u.controlShouldRenderValue,p=u.isDisabled,m=u.isMulti,b=u.inputValue,f=u.placeholder,v=this.state,h=v.selectValue,g=v.focusedValue,y=v.isFocused;if(!this.hasValue()||!d)return b?null:ue.createElement(a,e({},c,{key:"placeholder",isDisabled:p,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),f);if(m)return h.map((function(n,s){var a=n===g,u="".concat(t.getOptionLabel(n),"-").concat(t.getOptionValue(n));return ue.createElement(i,e({},c,{components:{Container:o,Label:l,Remove:r},isFocused:a,isDisabled:p,key:u,index:s,removeProps:{onClick:function(){return t.removeValue(n)},onTouchEnd:function(){return t.removeValue(n)},onMouseDown:function(e){e.preventDefault()}},data:n}),t.formatOptionLabel(n,"value"))}));if(b)return null;var _=h[0];return ue.createElement(s,e({},c,{data:_,isDisabled:p}),this.formatOptionLabel(_,"value"))}},{key:"renderClearIndicator",value:function(){var t=this.getComponents().ClearIndicator,n=this.commonProps,i=this.props,o=i.isDisabled,l=i.isLoading,r=this.state.isFocused;if(!this.isClearable()||!t||o||!this.hasValue()||l)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return ue.createElement(t,e({},n,{innerProps:s,isFocused:r}))}},{key:"renderLoadingIndicator",value:function(){var t=this.getComponents().LoadingIndicator,n=this.commonProps,i=this.props,o=i.isDisabled,l=i.isLoading,r=this.state.isFocused;return t&&l?ue.createElement(t,e({},n,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:r})):null}},{key:"renderIndicatorSeparator",value:function(){var t=this.getComponents(),n=t.DropdownIndicator,i=t.IndicatorSeparator;if(!n||!i)return null;var o=this.commonProps,l=this.props.isDisabled,r=this.state.isFocused;return ue.createElement(i,e({},o,{isDisabled:l,isFocused:r}))}},{key:"renderDropdownIndicator",value:function(){var t=this.getComponents().DropdownIndicator;if(!t)return null;var n=this.commonProps,i=this.props.isDisabled,o=this.state.isFocused,l={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return ue.createElement(t,e({},n,{innerProps:l,isDisabled:i,isFocused:o}))}},{key:"renderMenu",value:function(){var t=this,n=this.getComponents(),i=n.Group,o=n.GroupHeading,l=n.Menu,r=n.MenuList,s=n.MenuPortal,a=n.LoadingMessage,c=n.NoOptionsMessage,u=n.Option,d=this.commonProps,p=this.state.focusedOption,m=this.props,b=m.captureMenuScroll,f=m.inputValue,v=m.isLoading,h=m.loadingMessage,g=m.minMenuHeight,y=m.maxMenuHeight,_=m.menuIsOpen,k=m.menuPlacement,E=m.menuPosition,S=m.menuPortalTarget,w=m.menuShouldBlockScroll,C=m.menuShouldScrollIntoView,O=m.noOptionsMessage,x=m.onMenuScrollToTop,M=m.onMenuScrollToBottom;if(!_)return null;var V,R=function(n,i){var o=n.type,l=n.data,r=n.isDisabled,s=n.isSelected,a=n.label,c=n.value,m=p===l,b=r?void 0:function(){return t.onOptionHover(l)},f=r?void 0:function(){return t.selectOption(l)},v="".concat(t.getElementId("option"),"-").concat(i),h={id:v,onClick:f,onMouseMove:b,onMouseOver:b,tabIndex:-1};return ue.createElement(u,e({},d,{innerProps:h,data:l,isDisabled:r,isSelected:s,key:v,label:a,type:o,value:c,isFocused:m,innerRef:m?t.getFocusedOptionRef:void 0}),t.formatOptionLabel(n.data,"menu"))};if(this.hasOptions())V=this.getCategorizedOptions().map((function(n){if("group"===n.type){var l=n.data,r=n.options,s=n.index,a="".concat(t.getElementId("group"),"-").concat(s),c="".concat(a,"-heading");return ue.createElement(i,e({},d,{key:a,data:l,options:r,Heading:o,headingProps:{id:c,data:n.data},label:t.formatGroupLabel(n.data)}),n.options.map((function(e){return R(e,"".concat(s,"-").concat(e.index))})))}if("option"===n.type)return R(n,"".concat(n.index))}));else if(v){var P=h({inputValue:f});if(null===P)return null;V=ue.createElement(a,d,P)}else{var F=O({inputValue:f});if(null===F)return null;V=ue.createElement(c,d,F)}var I={minMenuHeight:g,maxMenuHeight:y,menuPlacement:k,menuPosition:E,menuShouldScrollIntoView:C},T=ue.createElement(Mn,e({},d,I),(function(n){var i=n.ref,o=n.placerProps,s=o.placement,a=o.maxHeight;return ue.createElement(l,e({},d,I,{innerRef:i,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove,id:t.getElementId("listbox")},isLoading:v,placement:s}),ue.createElement(Ri,{captureEnabled:b,onTopArrive:x,onBottomArrive:M,lockEnabled:w},(function(n){return ue.createElement(r,e({},d,{innerRef:function(e){t.getMenuListRef(e),n(e)},isLoading:v,maxHeight:a,focusedOption:p}),V)})))}));return S||"fixed"===E?ue.createElement(s,e({},d,{appendTo:S,controlElement:this.controlRef,menuPlacement:k,menuPosition:E}),T):T}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,i=t.isDisabled,o=t.isMulti,l=t.name,r=t.required,s=this.state.selectValue;if(l&&!i){if(r&&!this.hasValue())return ue.createElement(Fi,{name:l,onFocus:this.onValueInputFocus});if(o){if(n){var a=s.map((function(t){return e.getOptionValue(t)})).join(n);return ue.createElement("input",{name:l,type:"hidden",value:a})}var c=s.length>0?s.map((function(t,n){return ue.createElement("input",{key:"i-".concat(n),name:l,type:"hidden",value:e.getOptionValue(t)})})):ue.createElement("input",{name:l,type:"hidden",value:""});return ue.createElement("div",null,c)}var u=s[0]?this.getOptionValue(s[0]):"";return ue.createElement("input",{name:l,type:"hidden",value:u})}}},{key:"renderLiveRegion",value:function(){var t=this.commonProps,n=this.state,i=n.ariaSelection,o=n.focusedOption,l=n.focusedValue,r=n.isFocused,s=n.selectValue,a=this.getFocusableOptions();return ue.createElement(ri,e({},t,{id:this.getElementId("live-region"),ariaSelection:i,focusedOption:o,focusedValue:l,isFocused:r,selectValue:s,focusableOptions:a}))}},{key:"render",value:function(){var t=this.getComponents(),n=t.Control,i=t.IndicatorsContainer,o=t.SelectContainer,l=t.ValueContainer,r=this.props,s=r.className,a=r.id,c=r.isDisabled,u=r.menuIsOpen,d=this.state.isFocused,p=this.commonProps=this.getCommonProps();return ue.createElement(o,e({},p,{className:s,innerProps:{id:a,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:d}),this.renderLiveRegion(),ue.createElement(n,e({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:d,menuIsOpen:u}),ue.createElement(l,e({},p,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),ue.createElement(i,e({},p,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],o=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,i=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,l=t.ariaSelection,r=t.isFocused,s=t.prevWasFocused,a=e.options,c=e.value,u=e.menuIsOpen,d=e.inputValue,p=e.isMulti,m=cn(c),b={};if(n&&(c!==n.value||a!==n.options||u!==n.menuIsOpen||d!==n.inputValue)){var f=u?function(e,t){return Li(Di(e,t))}(e,m):[],v=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,f);b={selectValue:m,focusedOption:h,focusedValue:v,clearFocusValueOnUpdate:!1}}var g=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},y=l,_=r&&s;return r&&!_&&(y={value:Cn(p,m,m[0]||null),options:m,action:"initial-input-focus"},_=!s),"initial-input-focus"===(null==l?void 0:l.action)&&(y=null),le(le(le({},b),g),{},{prevProps:e,ariaSelection:y,prevWasFocused:_})}}],i&&pe(n.prototype,i),o&&pe(n,o),Object.defineProperty(n,"prototype",{writable:!1}),a}(ue.Component);Wi.defaultProps=Ai;var Zi=(0,ue.forwardRef)((function(t,n){var i=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,s=e.inputValue,a=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,p=e.onMenuOpen,m=e.value,b=ce(e,de),f=ae((0,ue.useState)(void 0!==s?s:n),2),v=f[0],h=f[1],g=ae((0,ue.useState)(void 0!==a?a:o),2),y=g[0],_=g[1],k=ae((0,ue.useState)(void 0!==m?m:r),2),E=k[0],S=k[1],w=(0,ue.useCallback)((function(e,t){"function"==typeof c&&c(e,t),S(e)}),[c]),C=(0,ue.useCallback)((function(e,t){var n;"function"==typeof u&&(n=u(e,t)),h(void 0!==n?n:e)}),[u]),O=(0,ue.useCallback)((function(){"function"==typeof p&&p(),_(!0)}),[p]),x=(0,ue.useCallback)((function(){"function"==typeof d&&d(),_(!1)}),[d]),M=void 0!==s?s:v,V=void 0!==a?a:y,R=void 0!==m?m:E;return le(le({},b),{},{inputValue:M,menuIsOpen:V,onChange:w,onInputChange:C,onMenuClose:x,onMenuOpen:O,value:R})}(t);return ue.createElement(Wi,e({ref:n},i))}));const Yi=Zi;function Qi(e){const{rule:n,fieldType:i,fieldName:l,valueType:r,options:s,placeholder:a,handleRuleChange:u,triggerReset:p,hasGroupedOptions:m}=e;if(!n.field&&"ruleField"!==i)return null;let b="";var f;if("ruleField"===i)b=null!==(f=n?.field)&&void 0!==f?f:"";else if("subField"===i){var v,h;b=n?.subFields?null!==(v=n.subFields[l])&&void 0!==v?v:"":null!==(h=n?.subField)&&void 0!==h?h:""}else{var g;b=null!==(g=n["operatorField"===i?"operator":"value"])&&void 0!==g?g:""}if("select"===r||"multiSelect"===r){let e="",t=s;if(m){const e=[];s.forEach((t=>{e.push(...t.options)})),t=e}"multiSelect"===r?e=t.filter((e=>b.includes(e.value))):(e=t.filter((e=>e.value===b)),0!==e.length&&(e=e[0])),b=e}const y="field__"+i;if("select"===r||"multiSelect"===r){const e=a||(0,o.__)("Select…","block-visibility");return(0,t.createElement)(Yi,{className:d()("block-visibility__react-select",y),classNamePrefix:"react-select",value:b,options:s,placeholder:e,onChange:e=>u(e,r,i,l,p),isMulti:"multiSelect"===r})}return"date"===r||"dateTime"===r?(0,t.createElement)(J,{className:y,value:b,onChange:e=>u(e,r,i,l,p),includeTime:"dateTime"===r}):"toggle"===r?(0,t.createElement)(c.ToggleControl,{className:y,label:a,checked:b,onChange:()=>u(!b,r,i,l,p)}):(0,t.createElement)(c.TextControl,{className:y,type:r,min:"number"===r?0:"",value:b,placeholder:a,onChange:e=>u(e,"text",i,l,p)})}function Xi(e){var n,l,r,s;const{rule:a,ruleIndex:u,ruleSet:p,ruleSetIndex:m,ruleSets:b,hideOnRuleSets:f,rulePlaceholder:v,ruleLabel:h,controlName:g,controlAtts:y,setControlAtts:_,groupedFields:k,allFields:E}=e;let S=E.filter((e=>e.value===a.field));k||(S=E.filter((e=>"ruleField"===e.type))),0!==S.length&&(S=S[0]);const w=null!==(n=S?.fields)&&void 0!==n?n:[],C=null!==(l=S?.help)&&void 0!==l&&l,O=null!==(r=S?.hasMultipleSubFields)&&void 0!==r&&r,x=null!==(s=S?.hasSimplifiedLayout)&&void 0!==s&&s;let M=h;M||(M=()=>0===u?(0,o.sprintf)( +(0,l.__)("%s reset to default","block-visibility"),n.label),"assertive")},role:"menuitem"},n.icon&&(0,t.createElement)(I,{className:"control-branding-icon",icon:n.icon}),n.label,n.hasEdits&&(0,t.createElement)("span",{"aria-hidden":"true",className:"menu-item-reset"},(0,l.__)("Reset","block-visibility"))):(0,t.createElement)(c.MenuItem,{"aria-disabled":!0,isSelected:!0,key:n.attributeSlug,role:"menuitemcheckbox"},n.icon&&(0,t.createElement)(I,{className:"control-branding-icon",icon:n.icon}),n.label)}const z=[{type:"text",label:(0,l.__)("Text","block-visibility")},{type:"textarea",label:(0,l.__)("Text Area","block-visibility")},{type:"number",label:(0,l.__)("Number","block-visibility"),options:"numeric"},{type:"range",label:(0,l.__)("Range","block-visibility"),options:"numeric"},{type:"email",label:(0,l.__)("Email","block-visibility")},{type:"url",label:(0,l.__)("Url","block-visibility")},{type:"password",label:(0,l.__)("Password","block-visibility")},{type:"image",label:(0,l.__)("Image","block-visibility")},{type:"file",label:(0,l.__)("File","block-visibility")},{type:"wysiwyg",label:(0,l.__)("Wysiwyg Editor","block-visibility")},{type:"oembed",label:(0,l.__)("oEmbed","block-visibility")},{type:"select",label:(0,l.__)("Select","block-visibility")},{type:"checkbox",label:(0,l.__)("Checkbox","block-visibility")},{type:"radio",label:(0,l.__)("Radio Button","block-visibility")},{type:"button_group",label:(0,l.__)("Button Group","block-visibility")},{type:"true_false",label:(0,l.__)("True / False","block-visibility"),options:"boolean"},{type:"link",label:(0,l.__)("Link","block-visibility")},{type:"post_object",label:(0,l.__)("Post Object","block-visibility")},{type:"page_link",label:(0,l.__)("Page Link","block-visibility")},{type:"relationship",label:(0,l.__)("Relationship","block-visibility")},{type:"taxonomy",label:(0,l.__)("Taxonomy","block-visibility")},{type:"user",label:(0,l.__)("User","block-visibility")},{type:"google_map",label:(0,l.__)("Google Map","block-visibility")},{type:"date_picker",label:(0,l.__)("Date Picker","block-visibility"),options:"dateTime"},{type:"date_time_picker",label:(0,l.__)("Date Time Picker","block-visibility"),options:"dateTime"},{type:"time_picker",label:(0,l.__)("Time Picker","block-visibility"),options:"dateTime"},{type:"color_picker",label:(0,l.__)("Color Picker","block-visibility")},{type:"message",label:(0,l.__)("Message","block-visibility")},{type:"accordion",label:(0,l.__)("Accordion","block-visibility")},{type:"tab",label:(0,l.__)("Tab","block-visibility")},{type:"group",label:(0,l.__)("Group","block-visibility")},{type:"repeater",label:(0,l.__)("Repeater","block-visibility")},{type:"flexible_content",label:(0,l.__)("Flexible Content","block-visibility")},{type:"clone",label:(0,l.__)("Clone","block-visibility")}];function U(e){var t;const n=null!==(t=e?.integrations?.acf?.fields)&&void 0!==t?t:[],i=[];return 0!==n.length&&n.forEach((e=>{var t,n;const o=null!==(t=e?.key)&&void 0!==t?t:"",r=null!==(n=e?.fields)&&void 0!==n?n:[];0!==r.length&&r.forEach((e=>{var t,n;const r=null!==(t=e?.key)&&void 0!==t?t:"",s=null!==(n=e?.label)&&void 0!==n?n:"";i.push({value:r,label:s,group:o,help:"Field type: "+z.filter((t=>t?.type===e?.type))[0]?.label,fields:[{type:"subField",name:"isUserField",valueType:"toggle",placeholder:(0,l.__)("Evaluate as user field","block-visibility")},{type:"operatorField",valueType:"select",options:j(e),placeholder:(0,l.__)("Select Condition…","block-visibility")},{type:"valueField",valueType:"text",placeholder:(0,l.__)("Enter Value…","block-visibility"),displayConditions:[{dependencyType:"operatorField",dependencyValues:["equal","notEqual","greaterThan","greaterThanEqual","lessThan","lessThanEqual","contains","notContain"]}]}]})}))})),i}function j(e){const t=z.filter((t=>t?.type===e?.type))[0]?.options,n=[{value:"notEmpty",label:(0,l.__)("True","block-visibility"),disableValue:!0},{value:"empty",label:(0,l.__)("False","block-visibility"),disableValue:!0}],i=[{value:"notEmpty",label:(0,l.__)("Has any value","block-visibility"),disableValue:!0},{value:"empty",label:(0,l.__)("Has no value","block-visibility"),disableValue:!0},{value:"equal",label:(0,l.__)("Value is equal to","block-visibility")},{value:"notEqual",label:(0,l.__)("Value is not equal to","block-visibility")},{value:"greaterThan",label:(0,l.__)("Value is greater than","block-visibility")},{value:"greaterThanEqual",label:(0,l.__)("Value is greater or equal to","block-visibility")},{value:"lessThan",label:(0,l.__)("Value is less than","block-visibility")},{value:"lessThanEqual",label:(0,l.__)("Value is less than or equal to","block-visibility")}],o=[{value:"notEmpty",label:(0,l.__)("Has any value","block-visibility"),disableValue:!0},{value:"empty",label:(0,l.__)("Has no value","block-visibility"),disableValue:!0},{value:"equal",label:(0,l.__)("Value is equal to","block-visibility")},{value:"notEqual",label:(0,l.__)("Value is not equal to","block-visibility")},{value:"contains",label:(0,l.__)("Value contains","block-visibility")},{value:"notContain",label:(0,l.__)("Value does not contain","block-visibility")}];return"boolean"===t?n:"dateTime"===t||"numeric"===t?i:o}const q="https://www.blockvisibilitywp.com/",$="https://www.blockvisibilitywp.com/knowledge-base/",G="utm_source=plugin&utm_medium=editor&utm_campaign=plugin_referrals",W="utm_source=plugin&utm_medium=settings&utm_campaign=plugin_referrals",Z="bv_query=learn_more",Y={blockVisibilityHome:q,blockVisibilityOrgSupport:"https://wordpress.org/support/plugin/block-visibility",blockVisibilityOrgReviews:"https://wordpress.org/support/plugin/block-visibility/reviews/?filter=5",gitHub:"https://github.com/ndiego/block-visibility",twitter:"https://twitter.com/BlockVisibility",settingsHome:q+"?"+Z+"&"+W,settingsProUpgrade:q+"pro/?bv_query=get_pro&utm_source=plugin&utm_medium=settings&utm_campaign=plugin_upsells",settingsKnowledgeBase:$+"?"+Z+"&"+W,settingsGeneral:$+"how-to-configure-the-general-settings/?"+Z+"&"+W,settingsBlockManager:$+"how-to-configure-the-block-manager/?"+Z+"&"+W,settingsVisibilityControls:$+"guide-to-visibility-controls-in-block-visibility/?"+Z+"&"+W,settingsHideBlock:$+"how-to-use-the-hide-block-control/?"+Z+"&"+W,settingsDateTime:$+"how-to-use-the-date-time-control/?"+Z+"&"+W,settingsQueryString:$+"how-to-use-the-query-string-control/?"+Z+"&"+W,settingsScreenSize:$+"how-to-use-the-screen-size-control//?"+Z+"&"+W,settingsUserRole:$+"how-to-use-the-user-role-control/?"+Z+"&"+W,settingsVisibilityContolsIntegrations:$+"guide-to-third-party-integrations-in-block-visibility/?"+Z+"&"+W,settingsACF:$+"how-to-use-the-advanced-custom-fields-control/?"+Z+"&"+W,settingsWpFusion:$+"how-to-use-the-wp-fusion-control/?"+Z+"&"+W,editorHideBlock:$+"how-to-use-the-hide-block-control/?"+Z+"&"+G,editorDateTime:$+"how-to-use-the-date-time-control/?"+Z+"&"+G,editorQueryString:$+"how-to-use-the-query-string-control/?"+Z+"&"+G,editorScreenSize:$+"how-to-use-the-screen-size-control//?"+Z+"&"+G,editorUserRole:$+"how-to-use-the-user-role-control/?"+Z+"&"+G,editorACF:$+"how-to-use-the-advanced-custom-fields-control/?"+Z+"&"+G,editorWpFusion:$+"how-to-use-the-wp-fusion-control/?"+Z+"&"+G},Q=window.wp.date;function X(e){const{value:n,onDateChange:i,setPopoverOpen:l,includeTime:o}=e,r=(0,Q.__experimentalGetSettings)(),s=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,t.createElement)(c.Popover,{className:"block-visibility__date-time-popover",onClose:l.bind(null,!1)},[o&&(0,t.createElement)(c.DateTimePicker,{currentDate:n,onChange:e=>{i(e),l(!1)},is12Hour:s}),!o&&(0,t.createElement)(c.DatePicker,{currentDate:n,onChange:e=>{i(e),l(!1)},is12Hour:s})])}const K=(0,t.createElement)(R.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)(R.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"})),J=(0,t.createElement)(R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(R.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"}));function ee(e){const{value:n,setPopoverOpen:i,onClearDateTime:o,includeTime:r}=e;let s=r?(0,l.__)("Select Date and Time…","block-visibility"):(0,l.__)("Select Date…","block-visibility");const a=(0,Q.__experimentalGetSettings)();if(n){const e=r?`${a.formats.date} ${a.formats.time}`:`${a.formats.date}`;s=(0,Q.format)(e,n)}return(0,t.createElement)("div",{className:d()("date-time__date-time-field",{"has-value":n})},(0,t.createElement)(c.Button,{icon:K,title:(0,l.__)("Select date/time","block-visibility"),onClick:()=>i((e=>!e)),isLink:!0},(0,t.createElement)("span",null,s)),n&&(0,t.createElement)(c.Button,{icon:J,className:"clear-date-time",title:(0,l.__)("Clear date/time","block-visibility"),onClick:()=>o("")}))}function te(e){const{value:n,onChange:i,includeTime:l}=e,[o,r]=(0,t.useState)(!1);return(0,t.createElement)("div",{className:"date-time"},(0,t.createElement)(ee,{value:n,setPopoverOpen:r,onClearDateTime:()=>i(""),includeTime:l}),o&&(0,t.createElement)(X,{value:n,onDateChange:e=>i(e),setPopoverOpen:r,includeTime:l}))}const ne=(0,t.createElement)(R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(R.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 ie(e){const{message:n,subMessage:i,link:o,position:r}=e,s=null!=r?r:"middle left";return(0,t.createElement)("div",{className:"information-popover"},(0,t.createElement)(c.DropdownMenu,{label:(0,l.__)("More Information","block-visibility"),icon:ne,toggleProps:{className:"information-popover__button"},popoverProps:{className:"information-popover__popover",focusOnMount:"container",position:s,noArrow:!1}},(()=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("p",null,n),i&&(0,t.createElement)("p",null,i),o&&(0,t.createElement)(c.ExternalLink,{href:o},(0,l.__)("Learn More","block-visibility"))))))}const le=(0,t.createElement)(R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(R.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));function oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function se(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,i=new Array(t);n=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}const pe=window.React;var be=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function me(e,t){for(var n=0;n0?xe(De,--Ae):0,Fe--,10===Ne&&(Fe=1,Pe--),Ne}function ze(){return Ne=Ae2||$e(Ne)>3?"":" "}function Qe(e,t){for(;--t&&ze()&&!(Ne<48||Ne>102||Ne>57&&Ne<65||Ne>70&&Ne<97););return qe(e,je()+(t<6&&32==Ue()&&32==ze()))}function Xe(e){for(;ze();)switch(Ne){case e:return Ae;case 34:case 39:34!==e&&39!==e&&Xe(Ne);break;case 40:41===e&&Xe(e);break;case 92:ze()}return Ae}function Ke(e,t){for(;ze()&&e+Ne!==57&&(e+Ne!==84||47!==Ue()););return"/*"+qe(t,Ae-1)+"*"+Ee(47===e?e:ze())}function Je(e){for(;!$e(Ue());)ze();return qe(e,Ae)}var et="-ms-",tt="-moz-",nt="-webkit-",it="comm",lt="rule",ot="decl",rt="@keyframes";function st(e,t){for(var n="",i=Re(e),l=0;l6)switch(xe(e,t+1)){case 109:if(45!==xe(e,t+4))break;case 102:return Ce(e,/(.+:)(.+)-([^]+)/,"$1"+nt+"$2-$3$1"+tt+(108==xe(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Oe(e,"stretch")?ct(Ce(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==xe(e,t+1))break;case 6444:switch(xe(e,Ve(e)-3-(~Oe(e,"!important")&&10))){case 107:return Ce(e,":",":"+nt)+e;case 101:return Ce(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+nt+(45===xe(e,14)?"inline-":"")+"box$3$1"+nt+"$2$3$1"+et+"$2box$3")+e}break;case 5936:switch(xe(e,t+11)){case 114:return nt+e+et+Ce(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return nt+e+et+Ce(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return nt+e+et+Ce(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return nt+e+et+e+e}return e}function ut(e){return We(dt("",null,null,null,[""],e=Ge(e),0,[0],e))}function dt(e,t,n,i,l,o,r,s,a){for(var c=0,u=0,d=r,p=0,b=0,m=0,f=1,v=1,h=1,g=0,y="",_=l,k=o,E=i,S=y;v;)switch(m=g,g=ze()){case 40:if(108!=m&&58==S.charCodeAt(d-1)){-1!=Oe(S+=Ce(Ze(g),"&","&\f"),"&\f")&&(h=-1);break}case 34:case 39:case 91:S+=Ze(g);break;case 9:case 10:case 13:case 32:S+=Ye(m);break;case 92:S+=Qe(je()-1,7);continue;case 47:switch(Ue()){case 42:case 47:Te(bt(Ke(ze(),je()),t,n),a);break;default:S+="/"}break;case 123*f:s[c++]=Ve(S)*h;case 125*f:case 59:case 0:switch(g){case 0:case 125:v=0;case 59+u:b>0&&Ve(S)-d&&Te(b>32?mt(S+";",i,n,d-1):mt(Ce(S," ","")+";",i,n,d-2),a);break;case 59:S+=";";default:if(Te(E=pt(S,t,n,c,u,l,s,y,_=[],k=[],d),o),123===g)if(0===u)dt(S,t,E,E,_,o,d,s,k);else switch(p){case 100:case 109:case 115:dt(e,E,E,i&&Te(pt(e,E,E,0,0,l,s,y,l,_=[],d),k),l,k,d,s,i?_:k);break;default:dt(S,E,E,E,[""],k,0,s,k)}}c=u=b=0,f=h=1,y=S="",d=r;break;case 58:d=1+Ve(S),b=m;default:if(f<1)if(123==g)--f;else if(125==g&&0==f++&&125==Be())continue;switch(S+=Ee(g),g*f){case 38:h=u>0?1:(S+="\f",-1);break;case 44:s[c++]=(Ve(S)-1)*h,h=1;break;case 64:45===Ue()&&(S+=Ze(ze())),p=Ue(),u=d=Ve(y=S+=Je(je())),g++;break;case 45:45===m&&2==Ve(S)&&(f=0)}}return o}function pt(e,t,n,i,l,o,r,s,a,c,u){for(var d=l-1,p=0===l?o:[""],b=Re(p),m=0,f=0,v=0;m0?p[h]+" "+g:Ce(g,/&\f/g,p[h])))&&(a[v++]=y);return Le(e,t,n,0===l?lt:s,a,c,u)}function bt(e,t,n){return Le(e,t,n,it,Ee(Ne),Me(e,2,-2),0)}function mt(e,t,n,i){return Le(e,t,n,ot,Me(e,0,i),Me(e,i+1,-1),i)}var ft=function(e,t,n){for(var i=0,l=0;i=l,l=Ue(),38===i&&12===l&&(t[n]=1),!$e(l);)ze();return qe(e,Ae)},vt=new WeakMap,ht=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)||vt.get(n))&&!i){vt.set(e,!0);for(var l=[],o=function(e,t){return We(function(e,t){var n=-1,i=44;do{switch($e(i)){case 0:38===i&&12===Ue()&&(t[n]=1),e[n]+=ft(Ae-1,t,n);break;case 2:e[n]+=Ze(i);break;case 4:if(44===i){e[++n]=58===Ue()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Ee(i)}}while(i=ze());return e}(Ge(e),t))}(t,l),r=n.props,s=0,a=0;s-1&&!e.return)switch(e.type){case ot:e.return=ct(e.value,e.length);break;case rt:return st([He(e,{value:Ce(e.value,"@","@"+nt)})],i);case lt: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 st([He(e,{props:[Ce(t,/:(read-\w+)/,":-moz-$1")]})],i);case"::placeholder":return st([He(e,{props:[Ce(t,/:(plac\w+)/,":"+nt+"input-$1")]}),He(e,{props:[Ce(t,/:(plac\w+)/,":-moz-$1")]}),He(e,{props:[Ce(t,/:(plac\w+)/,et+"input-$1")]})],i)}return""}))}}];const _t=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||yt,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)},St={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};var wt=/[A-Z]|^ms/g,Ct=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ot=function(e){return 45===e.charCodeAt(1)},xt=function(e){return null!=e&&"boolean"!=typeof e},Mt=function(e){var t=Object.create(null);return function(e){return void 0===t[e]&&(t[e]=Ot(n=e)?n:n.replace(wt,"-$&").toLowerCase()),t[e];var n}}(),Vt=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Ct,(function(e,t,n){return Tt={name:t,styles:n,next:Tt},t}))}return 1===St[e]||Ot(e)||"number"!=typeof t||0===t?t:t+"px"};function Rt(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 Tt={name:n.name,styles:n.styles,next:Tt},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)Tt={name:i.name,styles:i.styles,next:Tt},i=i.next;return n.styles+";"}return function(e,t,n){var i="";if(Array.isArray(n))for(var l=0;le.brand+"/"+e.version)).join(" "):navigator.userAgent}())}["top","right","bottom","left"].reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]),Math.min,Math.max;const en=Math.round;function tn(e,t,n){var i,l,o,r;void 0===t&&(t=!1),void 0===n&&(n=!1);const s=e.getBoundingClientRect();let a=1,c=1;t&&Qt(e)&&(a=e.offsetWidth>0&&en(s.width)/e.offsetWidth||1,c=e.offsetHeight>0&&en(s.height)/e.offsetHeight||1);const u=Xt(e)?Zt(e):window,d=!Jt()&&n,p=(s.left+(d&&null!=(i=null==(l=u.visualViewport)?void 0:l.offsetLeft)?i:0))/a,b=(s.top+(d&&null!=(o=null==(r=u.visualViewport)?void 0:r.offsetTop)?o:0))/c,m=s.width/a,f=s.height/c;return{width:m,height:f,top:b,right:p+m,bottom:b+f,left:p,x:p,y:b}}function nn(e){return"html"===Yt(e)?e:e.assignedSlot||e.parentNode||(function(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Zt(e).ShadowRoot||e instanceof ShadowRoot)}(e)?e.host:null)||function(e){return(t=e,(t instanceof Zt(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}(e)}function ln(e){const t=nn(e);return function(e){return["html","body","#document"].includes(Yt(e))}(t)?e.ownerDocument.body:Qt(t)&&Kt(t)?t:ln(t)}function on(e,t){var n;void 0===t&&(t=[]);const i=ln(e),l=i===(null==(n=e.ownerDocument)?void 0:n.body),o=Zt(i),r=l?[o].concat(o.visualViewport||[],Kt(i)?i:[]):i,s=t.concat(r);return l?s:s.concat(on(r))}const rn=pe.useLayoutEffect;var sn=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],an=function(){};function cn(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function un(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),l=2;l-1}function fn(e){return mn(e)?window.pageYOffset:e.scrollTop}function vn(e,t){mn(e)?window.scrollTo(0,t):e.scrollTop=t}function hn(e,t,n,i){return n*((e=e/i-1)*e*e+1)+t}function gn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:an,l=fn(e),o=t-l,r=10,s=0;function a(){var t=hn(s+=r,l,o,n);vn(e,t),sn.bottom?vn(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+l,e.scrollHeight)):i.top-l=m)return{placement:"bottom",maxHeight:t};if(w>=m&&!r)return o&&gn(a,C,x),{placement:"bottom",maxHeight:t};if(!r&&w>=i||r&&E>=i)return o&&gn(a,C,x),{placement:"bottom",maxHeight:r?E-y:w-y};if("auto"===l||r){var M=t,V=r?k:S;return V>=i&&(M=Math.min(V-y-s,t)),{placement:"top",maxHeight:M}}if("bottom"===l)return o&&vn(a,C),{placement:"bottom",maxHeight:t};break;case"top":if(k>=m)return{placement:"top",maxHeight:t};if(S>=m&&!r)return o&&gn(a,O,x),{placement:"top",maxHeight:t};if(!r&&S>=i||r&&k>=i){var R=t;return(!r&&S>=i||r&&k>=i)&&(R=r?k-_:S-_),o&&gn(a,O,x),{placement:"top",maxHeight:R}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(l,'".'))}return c}({maxHeight:i,menuEl:e,minHeight:n,placement:l,shouldScroll:r&&!t,isFixedPosition:t,controlHeight:v});p(s.maxHeight),f(s.placement),null==a||a(s.placement)}}),[i,l,o,r,n,a,v]),t({ref:c,placerProps:se(se({},e),{},{placement:m||Mn(l),maxHeight:d})})},Tn=function(e,t){var n=e.theme,i=n.spacing.baseUnit,l=n.colors;return se({textAlign:"center"},t?{}:{color:l.neutral40,padding:"".concat(2*i,"px ").concat(3*i,"px")})},Pn=Tn,Fn=Tn,In=function(t){var n=t.children,i=t.innerProps;return qt("div",e({},bn(t,"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),n)};In.defaultProps={children:"No options"};var An=function(t){var n=t.children,i=t.innerProps;return qt("div",e({},bn(t,"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),n)};An.defaultProps={children:"Loading..."};var Nn,Dn,Ln,Hn=["size"],Bn={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},zn=function(t){var n=t.size,i=de(t,Hn);return qt("svg",e({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Bn},i))},Un=function(t){return qt(zn,e({size:20},t),qt("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},jn=function(t){return qt(zn,e({size:20},t),qt("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},qn=function(e,t){var n=e.isFocused,i=e.theme,l=i.spacing.baseUnit,o=i.colors;return se({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?o.neutral60:o.neutral20,padding:2*l,":hover":{color:n?o.neutral80:o.neutral40}})},$n=qn,Gn=qn,Wn=function(){var e=$t.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Nn||(Dn=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],Ln||(Ln=Dn.slice(0)),Nn=Object.freeze(Object.defineProperties(Dn,{raw:{value:Object.freeze(Ln)}})))),Zn=function(e){var t=e.delay,n=e.offset;return qt("span",{css:$t({animation:"".concat(Wn," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Yn=function(t){var n=t.innerProps,i=t.isRtl;return qt("div",e({},bn(t,"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),qt(Zn,{delay:0,offset:i}),qt(Zn,{delay:160,offset:!0}),qt(Zn,{delay:320,offset:!i}))};Yn.defaultProps={size:4};var Qn=["data"],Xn=["innerRef","isDisabled","isHidden","inputClassName"],Kn={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Jn={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":se({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Kn)},ei=function(e){return se({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Kn)},ti=function(e){var t=e.children,n=e.innerProps;return qt("div",n,t)},ni={ClearIndicator:function(t){var n=t.children,i=t.innerProps;return qt("div",e({},bn(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),i),n||qt(Un,null))},Control:function(t){var n=t.children,i=t.isDisabled,l=t.isFocused,o=t.innerRef,r=t.innerProps,s=t.menuIsOpen;return qt("div",e({ref:o},bn(t,"control",{control:!0,"control--is-disabled":i,"control--is-focused":l,"control--menu-is-open":s}),r),n)},DropdownIndicator:function(t){var n=t.children,i=t.innerProps;return qt("div",e({},bn(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),i),n||qt(jn,null))},DownChevron:jn,CrossIcon:Un,Group:function(t){var n=t.children,i=t.cx,l=t.getStyles,o=t.getClassNames,r=t.Heading,s=t.headingProps,a=t.innerProps,c=t.label,u=t.theme,d=t.selectProps;return qt("div",e({},bn(t,"group",{group:!0}),a),qt(r,e({},s,{selectProps:d,theme:u,getStyles:l,getClassNames:o,cx:i}),c),qt("div",null,n))},GroupHeading:function(t){var n=pn(t);n.data;var i=de(n,Qn);return qt("div",e({},bn(t,"groupHeading",{"group-heading":!0}),i))},IndicatorsContainer:function(t){var n=t.children,i=t.innerProps;return qt("div",e({},bn(t,"indicatorsContainer",{indicators:!0}),i),n)},IndicatorSeparator:function(t){var n=t.innerProps;return qt("span",e({},n,bn(t,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(t){var n=t.cx,i=t.value,l=pn(t),o=l.innerRef,r=l.isDisabled,s=l.isHidden,a=l.inputClassName,c=de(l,Xn);return qt("div",e({},bn(t,"input",{"input-container":!0}),{"data-value":i||""}),qt("input",e({className:n({input:!0},a),ref:o,style:ei(s),disabled:r},c)))},LoadingIndicator:Yn,Menu:function(t){var n=t.children,i=t.innerRef,l=t.innerProps;return qt("div",e({},bn(t,"menu",{menu:!0}),{ref:i},l),n)},MenuList:function(t){var n=t.children,i=t.innerProps,l=t.innerRef,o=t.isMulti;return qt("div",e({},bn(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:l},i),n)},MenuPortal:function(t){var n=t.appendTo,i=t.children,l=t.controlElement,o=t.innerProps,r=t.menuPlacement,s=t.menuPosition,a=(0,pe.useRef)(null),c=(0,pe.useRef)(null),u=ue((0,pe.useState)(Mn(r)),2),d=u[0],p=u[1],b=(0,pe.useMemo)((function(){return{setPortalPlacement:p}}),[]),m=ue((0,pe.useState)(null),2),f=m[0],v=m[1],h=(0,pe.useCallback)((function(){if(l){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(l),t="fixed"===s?0:window.pageYOffset,n=e[d]+t;n===(null==f?void 0:f.offset)&&e.left===(null==f?void 0:f.rect.left)&&e.width===(null==f?void 0:f.rect.width)||v({offset:n,rect:e})}}),[l,s,d,null==f?void 0:f.offset,null==f?void 0:f.rect.left,null==f?void 0:f.rect.width]);rn((function(){h()}),[h]);var g=(0,pe.useCallback)((function(){"function"==typeof c.current&&(c.current(),c.current=null),l&&a.current&&(c.current=function(e,t,n,i){void 0===i&&(i={});const{ancestorScroll:l=!0,ancestorResize:o=!0,elementResize:r=!0,animationFrame:s=!1}=i,a=l&&!s,c=a||o?[...Xt(e)?on(e):[],...on(t)]:[];c.forEach((e=>{a&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));let u,d=null;if(r){let i=!0;d=new ResizeObserver((()=>{i||n(),i=!1})),Xt(e)&&!s&&d.observe(e),d.observe(t)}let p=s?tn(e):null;return s&&function t(){const i=tn(e);!p||i.x===p.x&&i.y===p.y&&i.width===p.width&&i.height===p.height||n(),p=i,u=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{a&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==(e=d)||e.disconnect(),d=null,s&&cancelAnimationFrame(u)}}(l,a.current,h,{elementResize:"ResizeObserver"in window}))}),[l,h]);rn((function(){g()}),[g]);var y=(0,pe.useCallback)((function(e){a.current=e,g()}),[g]);if(!n&&"fixed"!==s||!f)return null;var _=qt("div",e({ref:y},bn(se(se({},t),{},{offset:f.offset,position:s,rect:f.rect}),"menuPortal",{"menu-portal":!0}),o),i);return qt(Vn.Provider,{value:b},n?(0,Gt.createPortal)(_,n):_)},LoadingMessage:An,NoOptionsMessage:In,MultiValue:function(e){var t=e.children,n=e.components,i=e.data,l=e.innerProps,o=e.isDisabled,r=e.removeProps,s=e.selectProps,a=n.Container,c=n.Label,u=n.Remove;return qt(a,{data:i,innerProps:se(se({},bn(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),l),selectProps:s},qt(c,{data:i,innerProps:se({},bn(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),qt(u,{data:i,innerProps:se(se({},bn(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},r),selectProps:s}))},MultiValueContainer:ti,MultiValueLabel:ti,MultiValueRemove:function(t){var n=t.children,i=t.innerProps;return qt("div",e({role:"button"},i),n||qt(Un,{size:14}))},Option:function(t){var n=t.children,i=t.isDisabled,l=t.isFocused,o=t.isSelected,r=t.innerRef,s=t.innerProps;return qt("div",e({},bn(t,"option",{option:!0,"option--is-disabled":i,"option--is-focused":l,"option--is-selected":o}),{ref:r,"aria-disabled":i},s),n)},Placeholder:function(t){var n=t.children,i=t.innerProps;return qt("div",e({},bn(t,"placeholder",{placeholder:!0}),i),n)},SelectContainer:function(t){var n=t.children,i=t.innerProps,l=t.isDisabled,o=t.isRtl;return qt("div",e({},bn(t,"container",{"--is-disabled":l,"--is-rtl":o}),i),n)},SingleValue:function(t){var n=t.children,i=t.isDisabled,l=t.innerProps;return qt("div",e({},bn(t,"singleValue",{"single-value":!0,"single-value--is-disabled":i}),l),n)},ValueContainer:function(t){var n=t.children,i=t.innerProps,l=t.isMulti,o=t.hasValue;return qt("div",e({},bn(t,"valueContainer",{"value-container":!0,"value-container--is-multi":l,"value-container--has-value":o}),i),n)}},ii=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function li(e,t){if(e.length!==t.length)return!1;for(var n=0;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:"",".")}},ai=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,b=s.isOptionDisabled,m=s.isSearchable,f=s.menuIsOpen,v=s.options,h=s.screenReaderStatus,g=s.tabSelectsValue,y=s["aria-label"],_=s["aria-live"],k=(0,pe.useMemo)((function(){return se(se({},si),c||{})}),[c]),E=(0,pe.useMemo)((function(){var e,n="";if(t&&k.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):[],f=se({isDisabled:c&&b(c,r),label:d,labels:m},t);n=k.onChange(f)}return n}),[t,k,b,r,u]),S=(0,pe.useMemo)((function(){var e="",t=n||i,o=!!(n&&r&&r.includes(n));if(t&&k.onFocus){var s={focused:t,label:u(t),isDisabled:b(t,r),isSelected:o,options:l,context:t===n?"menu":"value",selectValue:r};e=k.onFocus(s)}return e}),[n,i,u,b,k,l,r]),w=(0,pe.useMemo)((function(){var e="";if(f&&v.length&&k.onFilter){var t=h({count:l.length});e=k.onFilter({inputValue:d,resultsMessage:t})}return e}),[l,d,f,k,v,h]),C=(0,pe.useMemo)((function(){var e="";if(k.guidance){var t=i?"value":f?"menu":"input";e=k.guidance({"aria-label":y,context:t,isDisabled:n&&b(n,r),isMulti:p,isSearchable:m,tabSelectsValue:g})}return e}),[y,n,i,p,b,m,f,k,r,g]),O="".concat(S," ").concat(w," ").concat(C),x=qt(pe.Fragment,null,qt("span",{id:"aria-selection"},E),qt("span",{id:"aria-context"},O)),M="initial-input-focus"===(null==t?void 0:t.action);return qt(pe.Fragment,null,qt(ri,{id:a},M&&x),qt(ri,{"aria-live":_,"aria-atomic":"false","aria-relevant":"additions text"},o&&!M&&x))},ci=[{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źẑżžẓẕƶȥɀⱬꝣ"}],ui=new RegExp("["+ci.map((function(e){return e.letters})).join("")+"]","g"),di={},pi=0;pi1?t-1:0),i=1;i0,f=d-p-u,v=!1;f>t&&r.current&&(i&&i(e),r.current=!1),m&&s.current&&(o&&o(e),s.current=!1),m&&t>f?(n&&!r.current&&n(e),b.scrollTop=d,v=!0,r.current=!0):!m&&-t>u&&(l&&!s.current&&l(e),b.scrollTop=0,v=!0,s.current=!0),v&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[n,i,l,o]),d=(0,pe.useCallback)((function(e){u(e,e.deltaY)}),[u]),p=(0,pe.useCallback)((function(e){a.current=e.changedTouches[0].clientY}),[]),b=(0,pe.useCallback)((function(e){var t=a.current-e.changedTouches[0].clientY;u(e,t)}),[u]),m=(0,pe.useCallback)((function(e){if(e){var t=!!Cn&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",b,t)}}),[b,p,d]),f=(0,pe.useCallback)((function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",b,!1))}),[b,p,d]);return(0,pe.useEffect)((function(){if(t){var e=c.current;return m(e),function(){f(e)}}}),[t,m,f]),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,pe.useRef)({}),o=(0,pe.useRef)(null),r=(0,pe.useCallback)((function(e){if(xi){var t=document.body,n=t&&t.style;if(i&&ki.forEach((function(e){var t=n&&n[e];l.current[e]=t})),i&&Mi<1){var o=parseInt(l.current.paddingRight,10)||0,r=document.body?document.body.clientWidth:0,s=window.innerWidth-r+o||0;Object.keys(Ei).forEach((function(e){var t=Ei[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&Oi()&&(t.addEventListener("touchmove",Si,Vi),e&&(e.addEventListener("touchstart",Ci,Vi),e.addEventListener("touchmove",wi,Vi))),Mi+=1}}),[i]),s=(0,pe.useCallback)((function(e){if(xi){var t=document.body,n=t&&t.style;Mi=Math.max(Mi-1,0),i&&Mi<1&&ki.forEach((function(e){var t=l.current[e];n&&(n[e]=t)})),t&&Oi()&&(t.removeEventListener("touchmove",Si,Vi),e&&(e.removeEventListener("touchstart",Ci,Vi),e.removeEventListener("touchmove",wi,Vi)))}}),[i]);return(0,pe.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 qt(pe.Fragment,null,n&&qt("div",{onClick:Ri,css:Ti}),t((function(e){l(e),o(e)})))}var Fi={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Ii=function(e){var t=e.name,n=e.onFocus;return qt("input",{required:!0,name:t,tabIndex:-1,onFocus:n,css:Fi,value:"",onChange:function(){}})},Ai={clearIndicator:Gn,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,t){var n=e.isDisabled,i=e.isFocused,l=e.theme,o=l.colors,r=l.borderRadius;return se({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?o.neutral5:o.neutral0,borderColor:n?o.neutral10:i?o.primary:o.neutral20,borderRadius:r,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:i?o.primary:o.neutral30}})},dropdownIndicator:$n,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,i=n.colors,l=n.spacing;return se({label:"group",cursor:"default",display:"block"},t?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*l.baseUnit,paddingRight:3*l.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,i=e.theme,l=i.spacing.baseUnit,o=i.colors;return se({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?o.neutral10:o.neutral20,marginBottom:2*l,marginTop:2*l})},input:function(e,t){var n=e.isDisabled,i=e.value,l=e.theme,o=l.spacing,r=l.colors;return se(se({visibility:n?"hidden":"visible",transform:i?"translateZ(0)":""},Jn),t?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:r.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,i=e.size,l=e.theme,o=l.colors,r=l.spacing.baseUnit;return se({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?o.neutral60:o.neutral20,padding:2*r})},loadingMessage:Fn,menu:function(e,t){var n,i=e.placement,l=e.theme,o=l.borderRadius,r=l.spacing,s=l.colors;return se((oe(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(i),"100%"),oe(n,"position","absolute"),oe(n,"width","100%"),oe(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:r.menuGutter,marginTop:r.menuGutter})},menuList:function(e,t){var n=e.maxHeight,i=e.theme.spacing.baseUnit;return se({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:i,paddingTop:i})},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,t){var n=e.theme,i=n.spacing,l=n.borderRadius,o=n.colors;return se({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:o.neutral10,borderRadius:l/2,margin:i.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,i=n.borderRadius,l=n.colors,o=e.cropWithEllipsis;return se({overflow:"hidden",textOverflow:o||void 0===o?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:i/2,color:l.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,i=n.spacing,l=n.borderRadius,o=n.colors,r=e.isFocused;return se({alignItems:"center",display:"flex"},t?{}:{borderRadius:l/2,backgroundColor:r?o.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},noOptionsMessage:Pn,option:function(e,t){var n=e.isDisabled,i=e.isFocused,l=e.isSelected,o=e.theme,r=o.spacing,s=o.colors;return se({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:l?s.primary:i?s.primary25:"transparent",color:n?s.neutral20:l?s.neutral0:"inherit",padding:"".concat(2*r.baseUnit,"px ").concat(3*r.baseUnit,"px"),":active":{backgroundColor:n?void 0:l?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,i=n.spacing,l=n.colors;return se({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:l.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,i=e.theme,l=i.spacing,o=i.colors;return se({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?o.neutral40:o.neutral80,marginLeft:l.baseUnit/2,marginRight:l.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,i=e.isMulti,l=e.hasValue,o=e.selectProps.controlShouldRenderValue;return se({alignItems:"center",display:i&&l&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},Ni={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}},Di={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:kn(),captureMenuScroll:!kn(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=se({ignoreCase:!0,ignoreAccents:!0,stringify:gi,trim:!0,matchFrom:"any"},undefined),i=n.ignoreCase,l=n.ignoreAccents,o=n.stringify,r=n.trim,s=n.matchFrom,a=r?hi(t):t,c=r?hi(o(e)):o(e);return i&&(a=a.toLowerCase(),c=c.toLowerCase()),l&&(a=vi(a),c=fi(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,unstyled:!1};function Li(e,t,n,i){return{type:"option",data:t,isDisabled:qi(e,t,n),isSelected:$i(e,t,n),label:Ui(e,t),value:ji(e,t),index:i}}function Hi(e,t){return e.options.map((function(n,i){if("options"in n){var l=n.options.map((function(n,i){return Li(e,n,t,i)})).filter((function(t){return zi(e,t)}));return l.length>0?{type:"group",data:n,options:l,index:i}:void 0}var o=Li(e,n,t,i);return zi(e,o)?o:void 0})).filter(On)}function Bi(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,ye(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function zi(e,t){var n=e.inputValue,i=void 0===n?"":n,l=t.data,o=t.isSelected,r=t.label,s=t.value;return(!Wi(e)||!o)&&Gi(e,{label:r,value:s,data:l},i)}var Ui=function(e,t){return e.getOptionLabel(t)},ji=function(e,t){return e.getOptionValue(t)};function qi(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function $i(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var i=ji(e,t);return n.some((function(t){return ji(e,t)===i}))}function Gi(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Wi=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},Zi=1,Yi=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fe(e,t)}(a,t);var n,i,l,o,r,s=(o=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ve(o);if(r){var n=ve(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ge(this,e)});function a(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=s.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},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.instancePrefix="",t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var i=t.props,l=i.onChange,o=i.name;n.name=o,t.ariaOnChange(e,n),l(e,n)},t.setValue=function(e,n,i){var l=t.props,o=l.closeMenuOnSelect,r=l.isMulti,s=l.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:s}),o&&(t.setState({inputIsHiddenAfterUpdate:!r}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:i})},t.selectOption=function(e){var n=t.props,i=n.blurInputOnSelect,l=n.isMulti,o=n.name,r=t.state.selectValue,s=l&&t.isOptionSelected(e,r),a=t.isOptionDisabled(e,r);if(s){var c=t.getOptionValue(e);t.setValue(r.filter((function(e){return t.getOptionValue(e)!==c})),"deselect-option",e)}else{if(a)return void t.ariaOnChange(e,{action:"select-option",option:e,name:o});l?t.setValue([].concat(ye(r),[e]),"select-option",e):t.setValue(e,"select-option")}i&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,i=t.state.selectValue,l=t.getOptionValue(e),o=i.filter((function(e){return t.getOptionValue(e)!==l})),r=xn(n,o,o[0]||null);t.onChange(r,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange(xn(t.props.isMulti,[],null),{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,i=n[n.length-1],l=n.slice(0,n.length-1),o=xn(e,l,l[0]||null);t.onChange(o,{action:"pop-value",removedValue:i})},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),i=0;i5||o>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=t.props.inputValue,i=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(i,{action:"input-change",prevInputValue:n}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var n=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:n}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){t.blockOptionHover||t.state.focusedOption===e||t.setState({focusedOption:e})},t.shouldHideSelectedOptions=function(){return Wi(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var n=t.props,i=n.isMulti,l=n.backspaceRemovesValue,o=n.escapeClearsValue,r=n.inputValue,s=n.isClearable,a=n.isDisabled,c=n.menuIsOpen,u=n.onKeyDown,d=n.tabSelectsValue,p=n.openMenuOnFocus,b=t.state,m=b.focusedOption,f=b.focusedValue,v=b.selectValue;if(!(a||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!i||r)return;t.focusValue("previous");break;case"ArrowRight":if(!i||r)return;t.focusValue("next");break;case"Delete":case"Backspace":if(r)return;if(f)t.removeValue(f);else{if(!l)return;i?t.popValue():s&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!c||!d||!m||p&&t.isOptionSelected(m,v))return;t.selectOption(m);break;case"Enter":if(229===e.keyCode)break;if(c){if(!m)return;if(t.isComposing)return;t.selectOption(m);break}return;case"Escape":c?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:r}),t.onMenuClose()):s&&o&&t.clearValue();break;case" ":if(r)return;if(!c){t.openMenu("first");break}if(!m)return;t.selectOption(m);break;case"ArrowUp":c?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":c?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!c)return;t.focusOption("pageup");break;case"PageDown":if(!c)return;t.focusOption("pagedown");break;case"Home":if(!c)return;t.focusOption("first");break;case"End":if(!c)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.instancePrefix="react-select-"+(t.props.instanceId||++Zi),t.state.selectValue=dn(e.value),e.menuIsOpen&&t.state.selectValue.length){var n=t.buildFocusableOptions(),i=n.indexOf(t.state.selectValue[0]);t.state.focusedOption=n[i]}return t}return n=a,i=[{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(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&yn(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,i=t.menuIsOpen,l=this.state.isFocused;(l&&!n&&e.isDisabled||l&&i&&!e.menuIsOpen)&&this.focusInput(),l&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):l||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(yn(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,i=n.selectValue,l=n.isFocused,o=this.buildFocusableOptions(),r="first"===e?0:o.length-1;if(!this.props.isMulti){var s=o.indexOf(i[0]);s>-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(Ni):se(se({},Ni),this.props.theme):Ni}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,i=this.getClassNames,l=this.getValue,o=this.selectOption,r=this.setValue,s=this.props,a=s.isMulti,c=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:i,getValue:l,hasValue:this.hasValue(),isMulti:a,isRtl:c,options:u,selectOption:o,selectProps:s,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 qi(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return $i(this.props,e,t)}},{key:"filterOption",value:function(e,t){return Gi(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 t=this.props,n=t.isDisabled,i=t.isSearchable,l=t.inputId,o=t.inputValue,r=t.tabIndex,s=t.form,a=t.menuIsOpen,c=t.required,u=this.getComponents().Input,d=this.state,p=d.inputIsHidden,b=d.ariaSelection,m=this.commonProps,f=l||this.getElementId("input"),v=se(se(se({"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"],"aria-required":c,role:"combobox"},a&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!i&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==b?void 0:b.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return i?pe.createElement(u,e({},m,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:f,innerRef:this.getInputRef,isDisabled:n,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:r,form:s,type:"text",value:o},v)):pe.createElement(_i,e({id:f,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:an,onFocus:this.onInputFocus,disabled:n,tabIndex:r,inputMode:"none",form:s,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,n=this.getComponents(),i=n.MultiValue,l=n.MultiValueContainer,o=n.MultiValueLabel,r=n.MultiValueRemove,s=n.SingleValue,a=n.Placeholder,c=this.commonProps,u=this.props,d=u.controlShouldRenderValue,p=u.isDisabled,b=u.isMulti,m=u.inputValue,f=u.placeholder,v=this.state,h=v.selectValue,g=v.focusedValue,y=v.isFocused;if(!this.hasValue()||!d)return m?null:pe.createElement(a,e({},c,{key:"placeholder",isDisabled:p,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),f);if(b)return h.map((function(n,s){var a=n===g,u="".concat(t.getOptionLabel(n),"-").concat(t.getOptionValue(n));return pe.createElement(i,e({},c,{components:{Container:l,Label:o,Remove:r},isFocused:a,isDisabled:p,key:u,index:s,removeProps:{onClick:function(){return t.removeValue(n)},onTouchEnd:function(){return t.removeValue(n)},onMouseDown:function(e){e.preventDefault()}},data:n}),t.formatOptionLabel(n,"value"))}));if(m)return null;var _=h[0];return pe.createElement(s,e({},c,{data:_,isDisabled:p}),this.formatOptionLabel(_,"value"))}},{key:"renderClearIndicator",value:function(){var t=this.getComponents().ClearIndicator,n=this.commonProps,i=this.props,l=i.isDisabled,o=i.isLoading,r=this.state.isFocused;if(!this.isClearable()||!t||l||!this.hasValue()||o)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return pe.createElement(t,e({},n,{innerProps:s,isFocused:r}))}},{key:"renderLoadingIndicator",value:function(){var t=this.getComponents().LoadingIndicator,n=this.commonProps,i=this.props,l=i.isDisabled,o=i.isLoading,r=this.state.isFocused;return t&&o?pe.createElement(t,e({},n,{innerProps:{"aria-hidden":"true"},isDisabled:l,isFocused:r})):null}},{key:"renderIndicatorSeparator",value:function(){var t=this.getComponents(),n=t.DropdownIndicator,i=t.IndicatorSeparator;if(!n||!i)return null;var l=this.commonProps,o=this.props.isDisabled,r=this.state.isFocused;return pe.createElement(i,e({},l,{isDisabled:o,isFocused:r}))}},{key:"renderDropdownIndicator",value:function(){var t=this.getComponents().DropdownIndicator;if(!t)return null;var n=this.commonProps,i=this.props.isDisabled,l=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return pe.createElement(t,e({},n,{innerProps:o,isDisabled:i,isFocused:l}))}},{key:"renderMenu",value:function(){var t=this,n=this.getComponents(),i=n.Group,l=n.GroupHeading,o=n.Menu,r=n.MenuList,s=n.MenuPortal,a=n.LoadingMessage,c=n.NoOptionsMessage,u=n.Option,d=this.commonProps,p=this.state.focusedOption,b=this.props,m=b.captureMenuScroll,f=b.inputValue,v=b.isLoading,h=b.loadingMessage,g=b.minMenuHeight,y=b.maxMenuHeight,_=b.menuIsOpen,k=b.menuPlacement,E=b.menuPosition,S=b.menuPortalTarget,w=b.menuShouldBlockScroll,C=b.menuShouldScrollIntoView,O=b.noOptionsMessage,x=b.onMenuScrollToTop,M=b.onMenuScrollToBottom;if(!_)return null;var V,R=function(n,i){var l=n.type,o=n.data,r=n.isDisabled,s=n.isSelected,a=n.label,c=n.value,b=p===o,m=r?void 0:function(){return t.onOptionHover(o)},f=r?void 0:function(){return t.selectOption(o)},v="".concat(t.getElementId("option"),"-").concat(i),h={id:v,onClick:f,onMouseMove:m,onMouseOver:m,tabIndex:-1};return pe.createElement(u,e({},d,{innerProps:h,data:o,isDisabled:r,isSelected:s,key:v,label:a,type:l,value:c,isFocused:b,innerRef:b?t.getFocusedOptionRef:void 0}),t.formatOptionLabel(n.data,"menu"))};if(this.hasOptions())V=this.getCategorizedOptions().map((function(n){if("group"===n.type){var o=n.data,r=n.options,s=n.index,a="".concat(t.getElementId("group"),"-").concat(s),c="".concat(a,"-heading");return pe.createElement(i,e({},d,{key:a,data:o,options:r,Heading:l,headingProps:{id:c,data:n.data},label:t.formatGroupLabel(n.data)}),n.options.map((function(e){return R(e,"".concat(s,"-").concat(e.index))})))}if("option"===n.type)return R(n,"".concat(n.index))}));else if(v){var T=h({inputValue:f});if(null===T)return null;V=pe.createElement(a,d,T)}else{var P=O({inputValue:f});if(null===P)return null;V=pe.createElement(c,d,P)}var F={minMenuHeight:g,maxMenuHeight:y,menuPlacement:k,menuPosition:E,menuShouldScrollIntoView:C},I=pe.createElement(Rn,e({},d,F),(function(n){var i=n.ref,l=n.placerProps,s=l.placement,a=l.maxHeight;return pe.createElement(o,e({},d,F,{innerRef:i,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove,id:t.getElementId("listbox")},isLoading:v,placement:s}),pe.createElement(Pi,{captureEnabled:m,onTopArrive:x,onBottomArrive:M,lockEnabled:w},(function(n){return pe.createElement(r,e({},d,{innerRef:function(e){t.getMenuListRef(e),n(e)},isLoading:v,maxHeight:a,focusedOption:p}),V)})))}));return S||"fixed"===E?pe.createElement(s,e({},d,{appendTo:S,controlElement:this.controlRef,menuPlacement:k,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=t.required,s=this.state.selectValue;if(o&&!i){if(r&&!this.hasValue())return pe.createElement(Ii,{name:o,onFocus:this.onValueInputFocus});if(l){if(n){var a=s.map((function(t){return e.getOptionValue(t)})).join(n);return pe.createElement("input",{name:o,type:"hidden",value:a})}var c=s.length>0?s.map((function(t,n){return pe.createElement("input",{key:"i-".concat(n),name:o,type:"hidden",value:e.getOptionValue(t)})})):pe.createElement("input",{name:o,type:"hidden",value:""});return pe.createElement("div",null,c)}var u=s[0]?this.getOptionValue(s[0]):"";return pe.createElement("input",{name:o,type:"hidden",value:u})}}},{key:"renderLiveRegion",value:function(){var t=this.commonProps,n=this.state,i=n.ariaSelection,l=n.focusedOption,o=n.focusedValue,r=n.isFocused,s=n.selectValue,a=this.getFocusableOptions();return pe.createElement(ai,e({},t,{id:this.getElementId("live-region"),ariaSelection:i,focusedOption:l,focusedValue:o,isFocused:r,selectValue:s,focusableOptions:a}))}},{key:"render",value:function(){var t=this.getComponents(),n=t.Control,i=t.IndicatorsContainer,l=t.SelectContainer,o=t.ValueContainer,r=this.props,s=r.className,a=r.id,c=r.isDisabled,u=r.menuIsOpen,d=this.state.isFocused,p=this.commonProps=this.getCommonProps();return pe.createElement(l,e({},p,{className:s,innerProps:{id:a,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:d}),this.renderLiveRegion(),pe.createElement(n,e({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:d,menuIsOpen:u}),pe.createElement(o,e({},p,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),pe.createElement(i,e({},p,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],l=[{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,b=dn(c),m={};if(n&&(c!==n.value||a!==n.options||u!==n.menuIsOpen||d!==n.inputValue)){var f=u?function(e,t){return Bi(Hi(e,t))}(e,b):[],v=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,f);m={selectValue:b,focusedOption:h,focusedValue:v,clearFocusValueOnUpdate:!1}}var g=null!=l&&e!==n?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},y=o,_=r&&s;return r&&!_&&(y={value:xn(p,b,b[0]||null),options:b,action:"initial-input-focus"},_=!s),"initial-input-focus"===(null==o?void 0:o.action)&&(y=null),se(se(se({},m),g),{},{prevProps:e,ariaSelection:y,prevWasFocused:_})}}],i&&me(n.prototype,i),l&&me(n,l),Object.defineProperty(n,"prototype",{writable:!1}),a}(pe.Component);Yi.defaultProps=Di;var Qi=(0,pe.forwardRef)((function(t,n){var i=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,b=e.value,m=de(e,be),f=ue((0,pe.useState)(void 0!==s?s:n),2),v=f[0],h=f[1],g=ue((0,pe.useState)(void 0!==a?a:l),2),y=g[0],_=g[1],k=ue((0,pe.useState)(void 0!==b?b:r),2),E=k[0],S=k[1],w=(0,pe.useCallback)((function(e,t){"function"==typeof c&&c(e,t),S(e)}),[c]),C=(0,pe.useCallback)((function(e,t){var n;"function"==typeof u&&(n=u(e,t)),h(void 0!==n?n:e)}),[u]),O=(0,pe.useCallback)((function(){"function"==typeof p&&p(),_(!0)}),[p]),x=(0,pe.useCallback)((function(){"function"==typeof d&&d(),_(!1)}),[d]),M=void 0!==s?s:v,V=void 0!==a?a:y,R=void 0!==b?b:E;return se(se({},m),{},{inputValue:M,menuIsOpen:V,onChange:w,onInputChange:C,onMenuClose:x,onMenuOpen:O,value:R})}(t);return pe.createElement(Yi,e({ref:n},i))}));const Xi=Qi;function Ki(e){const{rule:n,fieldType:i,fieldName:o,valueType:r,options:s,placeholder:a,help:u,handleRuleChange:p,triggerReset:b,hasGroupedOptions:m}=e;if(!n.field&&"ruleField"!==i)return null;let f="";var v;if("ruleField"===i)f=null!==(v=n?.field)&&void 0!==v?v:"";else if("subField"===i){var h,g;f=n?.subFields?null!==(h=n.subFields[o])&&void 0!==h?h:"":null!==(g=n?.subField)&&void 0!==g?g:""}else{var y;f=null!==(y=n["operatorField"===i?"operator":"value"])&&void 0!==y?y:""}if("select"===r||"multiSelect"===r){let e="",t=s;if(m){const e=[];s.forEach((t=>{e.push(...t.options)})),t=e}"multiSelect"===r?e=t.filter((e=>f.includes(e.value))):(e=t.filter((e=>e.value===f)),0!==e.length&&(e=e[0])),f=e}const _="field__"+i;if("select"===r||"multiSelect"===r){const e=a||(0,l.__)("Select…","block-visibility"),n=(0,t.createElement)(Xi,{className:d()("block-visibility__react-select",_),classNamePrefix:"react-select",value:f,options:s,placeholder:e,onChange:e=>p(e,r,i,o,b),isMulti:"multiSelect"===r});return u?(0,t.createElement)("div",{className:"block-visibility__react-select-wrapper"},n,(0,t.createElement)("div",{className:"components-base-control__help"},u)):n}return"date"===r||"dateTime"===r?(0,t.createElement)(te,{className:_,value:f,onChange:e=>p(e,r,i,o,b),includeTime:"dateTime"===r}):"toggle"===r?(0,t.createElement)(c.ToggleControl,{className:_,label:a,checked:f,help:u,onChange:()=>p(!f,r,i,o,b)}):(0,t.createElement)(c.TextControl,{className:_,type:r,min:"number"===r?0:"",value:f,placeholder:a,help:u,onChange:e=>p(e,"text",i,o,b)})}function Ji(e){var n,o,r;const{rule:s,ruleIndex:a,ruleSet:u,ruleSetIndex:p,ruleSets:b,hideOnRuleSets:m,rulePlaceholder:f,ruleLabel:v,controlName:h,controlAtts:g,setControlAtts:y,groupedFields:_,allFields:k}=e;let E=k.filter((e=>e.value===s.field));_||(E=k.filter((e=>"ruleField"===e.type))),0!==E.length&&(E=E[0]);const S=null!==(n=E?.fields)&&void 0!==n?n:[],w=null!==(o=E?.hasMultipleSubFields)&&void 0!==o&&o,C=null!==(r=E?.hasSimplifiedLayout)&&void 0!==r&&r;let O=v;O||(O=()=>0===a?(0,l.sprintf)( // Translators: Whether the block is hidden or visible. -(0,o.__)("%s the block if","block-visibility"),f?(0,o.__)("Hide","block-visibility"):(0,o.__)("Show","block-visibility")):(0,o.__)("And if","block-visibility"));const V=function(e,t,n){let o,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];"select"===t?o=e.value:"multiSelect"===t?(o=[],0!==e.length&&e.forEach((e=>{o.push(e.value)}))):o=e;const s=[...b],a=[...p.rules];if("ruleField"===n)a[u]=k?{field:o}:(0,i.assign)({...a[u]},{field:o});else if("subField"===n)a[u]=O?(0,i.assign)({...a[u]},{subFields:{...a[u].subFields,[l]:o}}):(0,i.assign)({...a[u]},{subField:o}),r&&delete a[u].value;else{const e="operatorField"===n?"operator":"value";a[u]=(0,i.assign)({...a[u]},{[e]:o})}s[m]=(0,i.assign)({...p},{rules:a}),_(g,(0,i.assign)({...y},{ruleSets:[...s]}))};return(0,t.createElement)("div",{key:u,className:"rule"},(0,t.createElement)("div",{className:"rule__header"},(0,t.createElement)("span",null,M(u)),p.rules.length>1&&(0,t.createElement)(c.Button,{label:(0,o.__)("Remove Rule","block-visibility"),icon:X,onClick:()=>(()=>{const e=[...b],t=p.rules.filter(((e,t)=>t!==u));e[m]=(0,i.assign)({...p},{rules:[...t]}),_(g,(0,i.assign)({...y},{ruleSets:[...e]}))})()})),(0,t.createElement)("div",{className:"rule__fields"},(0,t.createElement)("div",{className:d()("fields-container",{"is-simplified":x})},(0,t.createElement)(Qi,{rule:a,fieldType:"ruleField",valueType:"select",options:k,placeholder:null!=v?v:(0,o.__)("Select Rule…","block-visibility"),handleRuleChange:V,hasGroupedOptions:!0}),w.map((e=>{var n,i,o,l,r,s,c,u;const d=null!==(n=e?.displayConditions)&&void 0!==n?n:[];if(0!==d.length){const e=[];if(d.forEach((t=>{let n;if(O&&"subField"===t.dependencyType){var i,o;const e=null!==(i=a?.subFields)&&void 0!==i?i:[];n=null!==(o=e[t.dependencyName])&&void 0!==o?o:""}else{var l;const e="operatorField"===t.dependencyType?"operator":"subField";n=null!==(l=a[e])&&void 0!==l?l:""}var r;"dynamic"===t.dependencyValues?0!==(null!==(r=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 p,m;const b=null!==(i=e?.conditionalOptions)&&void 0!==i?i:[];var f,v;return 0!==b.length?b.forEach((e=>{let t;if(O&&"subField"===e.dependencyType){var n,i;const o=null!==(n=a?.subFields)&&void 0!==n?n:[];t=null!==(i=o[e.dependencyName])&&void 0!==i?i:""}else{var o;t=null!==(o=a[e.dependencyType])&&void 0!==o?o:""}if("dynamic"===e.dependencyValues){var l,r,s;const n=(null!==(l=e?.options)&&void 0!==l?l:[]).filter((e=>e.value===t));p=null!==(r=n[0]?.valueOptions)&&void 0!==r?r:[],m=null!==(s=e?.placeholder)&&void 0!==s?s:""}else if(e.dependencyValues.includes(t)){var c,u;p=null!==(c=e?.options)&&void 0!==c?c:[],m=null!==(u=e?.placeholder)&&void 0!==u?u:""}})):(p=null!==(f=e?.options)&&void 0!==f?f:[],m=null!==(v=e?.placeholder)&&void 0!==v?v:""),(0,t.createElement)(Qi,{key:null!==(o=e?.type)&&void 0!==o?o:"valueField",rule:a,fieldType:null!==(l=e?.type)&&void 0!==l?l:"valueField",fieldName:null!==(r=e?.name)&&void 0!==r?r:"",valueType:null!==(s=e?.valueType)&&void 0!==s?s:"text",options:p,placeholder:m,handleRuleChange:V,triggerReset:null!==(c=e?.triggerReset)&&void 0!==c&&c,hasGroupedOptions:null!==(u=e?.hasGroupedOptions)&&void 0!==u&&u})}))),C&&(0,t.createElement)("div",{className:"components-base-control__help"},S.help)))}function Ki(n){var l,r,s;const{ruleSet:a,ruleSetIndex:u,ruleSets:p,controlName:m,controlAtts:b,setControlAtts:f}=n,v=null!==(l=a?.title)&&void 0!==l?l:"",h=v||(0,o.__)("Rule Set","block-visibility"),g=null===(r=a?.enable)||void 0===r||r,y=null!==(s=a?.rules)&&void 0!==s?s:[];0===y.length&&y.push({field:""});const _=(e,t)=>{const n={...a},o=[...p];n[e]=t,o[u]=n,f(m,(0,i.assign)({...b},{ruleSets:[...o]}))},k=(0,t.createElement)(c.DropdownMenu,{label:(0,o.__)("Edit","block-visibility"),icon:ne,popoverProps:{className:"block-visibility__control-popover edit-title",focusOnMount:"container"}},(()=>(0,t.createElement)(c.TextControl,{value:v,label:(0,o.__)("Rule set title","block-visibility"),placeholder:(0,o.__)("Rule Set","block-visibility"),onChange:e=>_("title",e)}))),E=p.length<=1?(0,o.__)("Clear rule set","block-visibility"):(0,o.__)("Remove rule set","block-visibility"),S=(0,t.createElement)(c.DropdownMenu,{className:"options-dropdown",label:(0,o.__)("Options","block-visibility"),icon:F,popoverProps:{focusOnMount:"container"}},(e=>{let{onClose:n}=e;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(c.Slot,{name:"RuleSetOptionsTop"}),(0,t.createElement)(c.MenuGroup,{label:(0,o.__)("Tools","block-visibility")},(0,t.createElement)(c.Slot,{name:"RuleSetMoreSettingsTools"}),(0,t.createElement)(c.MenuItem,{onClick:()=>_("enable",!g)},g?(0,o.__)("Disable","block-visibility"):(0,o.__)("Enable","block-visibility")),(0,t.createElement)(c.MenuItem,{className:"more-settings__tools-duplicate",onClick:()=>{!function(){const e=[...p,a];f(m,(0,i.assign)({...b},{ruleSets:[...e]}))}(),n()}},(0,o.__)("Duplicate","block-visibility"))),(0,t.createElement)(c.Slot,{name:"RuleSetOptionsMiddle"}),(0,t.createElement)(c.MenuGroup,null,(0,t.createElement)(c.MenuItem,{onClick:()=>{!function(){const e=p.filter(((e,t)=>t!==u));f(m,(0,i.assign)({...b},{ruleSets:[...e]}))}(),n()}},E)),(0,t.createElement)(c.Slot,{name:"RuleSetOptionsBottom"}))}));let w=(0,t.createElement)("div",{className:"rule-set__fields"},(0,t.createElement)("div",{className:"rule-set__rules"},y.map(((i,o)=>(0,t.createElement)(Xi,e({key:o,rule:i,ruleIndex:o,ruleSet:a,ruleSetIndex:u,ruleSets:p},n))))),(0,t.createElement)("div",{className:"rule-set__add-rule"},(0,t.createElement)(c.Button,{onClick:()=>function(){const e=[...p],t=[...a.rules,{field:""}];e[u]=(0,i.assign)({...a},{rules:t}),f(m,(0,i.assign)({...b},{ruleSets:[...e]}))}(),isLink:!0},(0,o.__)("Add rule","block-visibility"))));return g||(w=(0,t.createElement)(c.Disabled,null,w)),(0,t.createElement)("div",{key:u,className:d()("rule-sets__rule-set",{disabled:!g})},(0,t.createElement)("div",{className:"rule-set__header section-header"},(0,t.createElement)("div",{className:"section-header__title"},(0,t.createElement)("span",null,h),k),(0,t.createElement)("div",{className:"section-header__toolbar"},S)),w)}function Ji(n){var l,r,s,a,u,d;const{controlSetAtts:p,enabledControls:m,setControlAtts:b,settings:f,variables:v}=n,h=null!==(l=v?.integrations?.acf?.active)&&void 0!==l&&l;if(!m.some((e=>"acf"===e.settingSlug&&e?.isActive))||!h)return null;const g=null===(r=f?.plugin_settings?.enable_editor_notices)||void 0===r||r,y=null!==(s=v?.integrations?.acf?.fields)&&void 0!==s?s:[],_=null!==(a=p?.controls?.acf)&&void 0!==a?a:{},k=null!==(u=_?.hideOnRuleSets)&&void 0!==u&&u;let E=null!==(d=_?.ruleSets)&&void 0!==d?d:[];if(0===E.length)E.push({enable:!0,rules:[{field:""}]});else if(1===E.length&&!E[0]?.rules){const e=E[0];0!==e.length&&e.forEach((e=>{var t;const n=null!==(t=e?.operator)&&void 0!==t?t:"";e.operator="!=empty"===n?"notEmpty":"==empty"===n?"empty":"=="===n?"equal":"!="===n?"notEqual":"==contains"===n?"contains":"!=contains"===n?"notContain":""})),E=[{enable:!0,rules:e}]}const S=function(e){const t=function(e){var t;const n=null!==(t=e?.integrations?.acf?.fields)&&void 0!==t?t:[],i=[];return 0!==n.length&&n.forEach((e=>{var t,n;const o=null!==(t=e?.key)&&void 0!==t?t:"",l=null!==(n=e?.title)&&void 0!==n?n:"";i.push({value:o,label:l})})),i}(e),n=z(e),i=[];return t.forEach((e=>{var t,o;const l=null!==(t=e?.value)&&void 0!==t?t:"",r=null!==(o=e?.label)&&void 0!==o?o:"",s=n.filter((e=>e.group===l));i.push({value:l,label:r,options:s})})),i}(v),C=z(v);return(0,t.createElement)("div",{className:"controls-panel-item acf-control"},(0,t.createElement)("h3",{className:"controls-panel-item__header has-icon"},(0,t.createElement)(T,{icon:w}),(0,t.createElement)("span",null,(0,o.__)("Advanced Custom Fields","block-visibility")),g&&(0,t.createElement)(te,{message:(0,o.__)("The Advanced Custom Fields (ACF) control allows you to configure block visibility based on various field-related rules, which form rule sets.","block-visibility"),link:W.editorACF,position:"bottom center"}),(0,t.createElement)("div",{className:"controls-panel-item__header-toolbar"},(0,t.createElement)(c.Button,{icon:P,onClick:()=>(()=>{const e=[...E,{enable:!0,rules:[{field:""}]}];b("acf",(0,i.assign)({..._},{ruleSets:[...e]}))})(),label:(0,o.__)("Add rule set","block-visibility"),isSmall:!0}))),g&&(0,t.createElement)("div",{className:"controls-panel-item__description"},(0,o.sprintf)( +(0,l.__)("%s the block if","block-visibility"),m?(0,l.__)("Hide","block-visibility"):(0,l.__)("Show","block-visibility")):(0,l.__)("And if","block-visibility"));const x=function(e,t,n){let l,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];"select"===t?l=e.value:"multiSelect"===t?(l=[],0!==e.length&&e.forEach((e=>{l.push(e.value)}))):l=e;const s=[...b],c=[...u.rules];if("ruleField"===n)c[a]=_?{field:l}:(0,i.assign)({...c[a]},{field:l});else if("subField"===n)c[a]=w?(0,i.assign)({...c[a]},{subFields:{...c[a].subFields,[o]:l}}):(0,i.assign)({...c[a]},{subField:l}),r&&delete c[a].value;else{const e="operatorField"===n?"operator":"value";c[a]=(0,i.assign)({...c[a]},{[e]:l})}s[p]=(0,i.assign)({...u},{rules:c}),y(h,(0,i.assign)({...g},{ruleSets:[...s]}))};return(0,t.createElement)("div",{key:a,className:"rule"},(0,t.createElement)("div",{className:"rule__header"},(0,t.createElement)("span",null,O(a)),u.rules.length>1&&(0,t.createElement)(c.Button,{label:(0,l.__)("Remove Rule","block-visibility"),icon:J,onClick:()=>(()=>{const e=[...b],t=u.rules.filter(((e,t)=>t!==a));e[p]=(0,i.assign)({...u},{rules:[...t]}),y(h,(0,i.assign)({...g},{ruleSets:[...e]}))})()})),(0,t.createElement)("div",{className:"rule__fields"},(0,t.createElement)("div",{className:d()("fields-container",{"is-simplified":C})},(0,t.createElement)(Ki,{rule:s,fieldType:"ruleField",valueType:"select",options:_,placeholder:null!=f?f:(0,l.__)("Select Rule…","block-visibility"),handleRuleChange:x,hasGroupedOptions:!0,help:E?.help}),S.map((e=>{var n,i,l,o,r,a,c,u;const d=null!==(n=e?.displayConditions)&&void 0!==n?n:[];if(0!==d.length){const e=[];if(d.forEach((t=>{let n;if(w&&"subField"===t.dependencyType){var i,l;const e=null!==(i=s?.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=s[e])&&void 0!==o?o:""}var r;"dynamic"===t.dependencyValues?0!==(null!==(r=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 p,b;const m=null!==(i=e?.conditionalOptions)&&void 0!==i?i:[];var f,v;return 0!==m.length?m.forEach((e=>{let t;if(w&&"subField"===e.dependencyType){var n,i;const l=null!==(n=s?.subFields)&&void 0!==n?n:[];t=null!==(i=l[e.dependencyName])&&void 0!==i?i:""}else{var l;t=null!==(l=s[e.dependencyType])&&void 0!==l?l:""}if("dynamic"===e.dependencyValues){var o,r,a;const n=(null!==(o=e?.options)&&void 0!==o?o:[]).filter((e=>e.value===t));p=null!==(r=n[0]?.valueOptions)&&void 0!==r?r:[],b=null!==(a=e?.placeholder)&&void 0!==a?a:""}else if(e.dependencyValues.includes(t)){var c,u;p=null!==(c=e?.options)&&void 0!==c?c:[],b=null!==(u=e?.placeholder)&&void 0!==u?u:""}})):(p=null!==(f=e?.options)&&void 0!==f?f:[],b=null!==(v=e?.placeholder)&&void 0!==v?v:""),(0,t.createElement)(Ki,{key:null!==(l=e?.type)&&void 0!==l?l:"valueField",rule:s,fieldType:null!==(o=e?.type)&&void 0!==o?o:"valueField",fieldName:null!==(r=e?.name)&&void 0!==r?r:"",valueType:null!==(a=e?.valueType)&&void 0!==a?a:"text",options:p,placeholder:b,help:e?.help,handleRuleChange:x,triggerReset:null!==(c=e?.triggerReset)&&void 0!==c&&c,hasGroupedOptions:null!==(u=e?.hasGroupedOptions)&&void 0!==u&&u})})))))}function el(n){var o,r,s;const{ruleSet:a,ruleSetIndex:u,ruleSets:p,controlName:b,controlAtts:m,setControlAtts:f}=n,v=null!==(o=a?.title)&&void 0!==o?o:"",h=v||(0,l.__)("Rule Set","block-visibility"),g=null===(r=a?.enable)||void 0===r||r,y=null!==(s=a?.rules)&&void 0!==s?s:[];0===y.length&&y.push({field:""});const _=(e,t)=>{const n={...a},l=[...p];n[e]=t,l[u]=n,f(b,(0,i.assign)({...m},{ruleSets:[...l]}))},k=(0,t.createElement)(c.DropdownMenu,{label:(0,l.__)("Edit","block-visibility"),icon:le,popoverProps:{className:"block-visibility__control-popover edit-title",focusOnMount:"container"}},(()=>(0,t.createElement)(c.TextControl,{value:v,label:(0,l.__)("Rule set title","block-visibility"),placeholder:(0,l.__)("Rule Set","block-visibility"),onChange:e=>_("title",e)}))),E=p.length<=1?(0,l.__)("Clear rule set","block-visibility"):(0,l.__)("Remove rule set","block-visibility"),S=(0,t.createElement)(c.DropdownMenu,{className:"options-dropdown",label:(0,l.__)("Options","block-visibility"),icon:P,popoverProps:{focusOnMount:"container"}},(e=>{let{onClose:n}=e;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(c.Slot,{name:"RuleSetOptionsTop"}),(0,t.createElement)(c.MenuGroup,{label:(0,l.__)("Tools","block-visibility")},(0,t.createElement)(c.Slot,{name:"RuleSetMoreSettingsTools"}),(0,t.createElement)(c.MenuItem,{onClick:()=>_("enable",!g)},g?(0,l.__)("Disable","block-visibility"):(0,l.__)("Enable","block-visibility")),(0,t.createElement)(c.MenuItem,{className:"more-settings__tools-duplicate",onClick:()=>{!function(){const e=[...p,a];f(b,(0,i.assign)({...m},{ruleSets:[...e]}))}(),n()}},(0,l.__)("Duplicate","block-visibility"))),(0,t.createElement)(c.Slot,{name:"RuleSetOptionsMiddle"}),(0,t.createElement)(c.MenuGroup,null,(0,t.createElement)(c.MenuItem,{onClick:()=>{!function(){const e=p.filter(((e,t)=>t!==u));f(b,(0,i.assign)({...m},{ruleSets:[...e]}))}(),n()}},E)),(0,t.createElement)(c.Slot,{name:"RuleSetOptionsBottom"}))}));let w=(0,t.createElement)("div",{className:"rule-set__fields"},(0,t.createElement)("div",{className:"rule-set__rules"},y.map(((i,l)=>(0,t.createElement)(Ji,e({key:l,rule:i,ruleIndex:l,ruleSet:a,ruleSetIndex:u,ruleSets:p},n))))),(0,t.createElement)("div",{className:"rule-set__add-rule"},(0,t.createElement)(c.Button,{onClick:()=>function(){const e=[...p],t=[...a.rules,{field:""}];e[u]=(0,i.assign)({...a},{rules:t}),f(b,(0,i.assign)({...m},{ruleSets:[...e]}))}(),isLink:!0},(0,l.__)("Add rule","block-visibility"))));return g||(w=(0,t.createElement)(c.Disabled,null,w)),(0,t.createElement)("div",{key:u,className:d()("rule-sets__rule-set",{disabled:!g})},(0,t.createElement)("div",{className:"rule-set__header section-header"},(0,t.createElement)("div",{className:"section-header__title"},(0,t.createElement)("span",null,h),k),(0,t.createElement)("div",{className:"section-header__toolbar"},S)),w)}function tl(n){var o,r,s,a,u,d;const{controlSetAtts:p,enabledControls:b,setControlAtts:m,settings:f,variables:v}=n,h=null!==(o=v?.integrations?.acf?.active)&&void 0!==o&&o;if(!b.some((e=>"acf"===e.settingSlug&&e?.isActive))||!h)return null;const g=null===(r=f?.plugin_settings?.enable_editor_notices)||void 0===r||r,y=null!==(s=v?.integrations?.acf?.fields)&&void 0!==s?s:[],_=null!==(a=p?.controls?.acf)&&void 0!==a?a:{},k=null!==(u=_?.hideOnRuleSets)&&void 0!==u&&u;let E=null!==(d=_?.ruleSets)&&void 0!==d?d:[];if(0===E.length)E.push({enable:!0,rules:[{field:""}]});else if(1===E.length&&!E[0]?.rules){const e=E[0];0!==e.length&&e.forEach((e=>{var t;const n=null!==(t=e?.operator)&&void 0!==t?t:"";e.operator="!=empty"===n?"notEmpty":"==empty"===n?"empty":"=="===n?"equal":"!="===n?"notEqual":"==contains"===n?"contains":"!=contains"===n?"notContain":""})),E=[{enable:!0,rules:e}]}const S=function(e){const t=function(e){var t;const n=null!==(t=e?.integrations?.acf?.fields)&&void 0!==t?t:[],i=[];return 0!==n.length&&n.forEach((e=>{var t,n;const l=null!==(t=e?.key)&&void 0!==t?t:"",o=null!==(n=e?.title)&&void 0!==n?n:"";i.push({value:l,label:o})})),i}(e),n=U(e),i=[];return t.forEach((e=>{var t,l;const o=null!==(t=e?.value)&&void 0!==t?t:"",r=null!==(l=e?.label)&&void 0!==l?l:"",s=n.filter((e=>e.group===o));i.push({value:o,label:r,options:s})})),i}(v),C=U(v);return(0,t.createElement)("div",{className:"controls-panel-item acf-control"},(0,t.createElement)("h3",{className:"controls-panel-item__header has-icon"},(0,t.createElement)(I,{icon:w}),(0,t.createElement)("span",null,(0,l.__)("Advanced Custom Fields","block-visibility")),g&&(0,t.createElement)(ie,{message:(0,l.__)("The Advanced Custom Fields (ACF) control allows you to configure block visibility based on various field-related rules, which form rule sets.","block-visibility"),link:Y.editorACF,position:"bottom right"}),(0,t.createElement)("div",{className:"controls-panel-item__header-toolbar"},(0,t.createElement)(c.Button,{icon:T,onClick:()=>(()=>{const e=[...E,{enable:!0,rules:[{field:""}]}];m("acf",(0,i.assign)({..._},{ruleSets:[...e]}))})(),label:(0,l.__)("Add rule set","block-visibility"),isSmall:!0}))),g&&(0,t.createElement)("div",{className:"controls-panel-item__description"},(0,l.sprintf)( // Translators: Whether the block is hidden or visible. -(0,o.__)("%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"),k?(0,o.__)("Hide","block-visibility"):(0,o.__)("Show","block-visibility"))),(0,t.createElement)("div",{className:"controls-panel-item__control-fields"},0===y.length&&(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,o.__)("It does not appear that your website contains any published fields yet.","block-visibility")),(0,t.createElement)("div",{className:"rule-sets"},E.map(((i,l)=>(0,t.createElement)(Ki,e({key:l,ruleSet:i,ruleSetIndex:l,ruleSets:E,groupedFields:S,allFields:C,controlName:"acf",controlAtts:_,hideOnRuleSets:k,rulePlaceholder:(0,o.__)("Select Field…","block-visibility")},n))))),(0,t.createElement)("div",{className:"control-fields-item__hide-when"},(0,t.createElement)(c.ToggleControl,{label:(0,o.__)("Hide when rules apply","block-visibility"),checked:k,onChange:()=>b("acf",(0,i.assign)({..._},{hideOnRuleSets:!k}))}))))}function eo(e){const{currentDate:n,label:i,setAttribute:l,setPickerOpen:r,pickerType:s}=e,a=(0,Z.__experimentalGetSettings)(),u=/a(?!\\)/i.test(a.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,t.createElement)(c.Popover,{className:"block-visibility__date-time-popover",focusOnMount:!0,onClose:()=>r(!1),placement:"left-start",offset:8},(0,t.createElement)("div",{className:"date-time-popover__header"},(0,t.createElement)("h2",null,i),(0,t.createElement)(c.Button,{label:(0,o.__)("Close","block-visibility"),onClick:()=>r(!1),icon:X,isSmall:!0})),(0,t.createElement)(c.DateTimePicker,{currentDate:n,onChange:e=>{l(s,e)},is12Hour:u,__nextRemoveHelpButton:!0,__nextRemoveResetButton:!0}))}function to(e){const{dateType:n,label:i,title:l,hasDateTime:r,setAttribute:s,setPickerOpen:a,setPickerType:u}=e;return(0,t.createElement)("div",{className:"date-time-item__field"},(0,t.createElement)(c.Button,{title:l,onClick:()=>{u(n),a(!0)}},(0,t.createElement)("span",null,i)),r&&(0,t.createElement)(c.Button,{icon:X,className:"clear-date-time",title:(0,o.__)("Clear date/time","block-visibility"),onClick:()=>s(n,""),isSmall:!0}))}function no(e,t){const n=(0,Z.__experimentalGetSettings)();let i=t;return e&&(i=(0,Z.format)(`M j, Y ${n.formats.time}`,e)),i}const io=(0,c.withFilters)("blockVisibility.addDateTimeScheduleControls")((e=>(0,t.createElement)(t.Fragment,null)));function oo(n){var l,r,s,a;const{type:u,dateTime:p,schedules:m,scheduleIndex:b,scheduleAtts:f,controlSetAtts:v,setControlAtts:h,hideOnSchedules:g}=n,[y,_]=(0,t.useState)(!1),[k,E]=(0,t.useState)(null),S="single"===u?u+"-"+b:u+"-"+v?.id+"-"+b,w=null!==(l=f?.title)&&void 0!==l?l:"",C=null===(r=f?.enable)||void 0===r||r,O=null!==(s=f?.start)&&void 0!==s?s:null,x=null!==(a=f?.end)&&void 0!==a?a:null,M=new Date((new Date).setHours(0,0,0,0)),V=w||(0,o.__)("Schedule","block-visibility"),R=no(O,(0,o.__)("Now","block-visibility")),P=no(x,(0,o.__)("Forever","block-visibility"));let I=!1;O&&x&&(I=O>=x);const T=(e,t)=>{const n={...f},o=[...m];n[e]=t,o[b]=n,h("dateTime",(0,i.assign)({...p},{schedules:[...o]}))},A=(0,t.createElement)(c.DropdownMenu,{label:(0,o.__)("Edit","block-visibility"),icon:ne,popoverProps:{className:"block-visibility__control-popover edit-title",focusOnMount:"container"},toggleProps:{isSmall:!0}},(()=>(0,t.createElement)(c.TextControl,{value:w,label:(0,o.__)("Schedule title","block-visibility"),placeholder:(0,o.__)("Schedule","block-visibility"),onChange:e=>T("title",e)}))),N=m.length<=1?(0,o.__)("Clear schedule","block-visibility"):(0,o.__)("Remove schedule","block-visibility"),D=(0,t.createElement)(c.DropdownMenu,{className:"options-dropdown",label:(0,o.__)("Options","block-visibility"),icon:F,popoverProps:{focusOnMount:"container"}},(e=>{let{onClose:n}=e;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(c.Slot,{name:"ScheduleOptionsTop"}),(0,t.createElement)(c.MenuGroup,{label:(0,o.__)("Tools","block-visibility")},(0,t.createElement)(c.Slot,{name:"ScheduleOptionsTools"}),(0,t.createElement)(c.MenuItem,{onClick:()=>T("enable",!C)},C?(0,o.__)("Disable","block-visibility"):(0,o.__)("Enable","block-visibility")),(0,t.createElement)(c.MenuItem,{onClick:()=>{!function(){const e=[...m,f];h("dateTime",(0,i.assign)({...p},{schedules:[...e]}))}(),n()}},(0,o.__)("Duplicate","block-visibility"))),(0,t.createElement)(c.Slot,{name:"ScheduleOptionsMiddle"}),(0,t.createElement)(c.MenuGroup,null,(0,t.createElement)(c.MenuItem,{onClick:()=>{!function(){const e=m.filter(((e,t)=>t!==b));h("dateTime",(0,i.assign)({...p},{schedules:[...e]}))}(),n()}},N)),(0,t.createElement)(c.Slot,{name:"ScheduleOptionsBottom"}))}));let L=(0,t.createElement)("div",{className:"schedules-item__fields"},(0,t.createElement)(c.Slot,{name:"DateTimeScheduleControlsTop-"+S}),(0,t.createElement)("div",{className:"schedules-item__fields__date-time"},(0,t.createElement)("div",{className:"control-fields-item__label"},(0,o.sprintf)( +(0,l.__)("%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"),k?(0,l.__)("Hide","block-visibility"):(0,l.__)("Show","block-visibility"))),(0,t.createElement)("div",{className:"controls-panel-item__control-fields"},0===y.length&&(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,l.__)("It does not appear that your website contains any published fields yet.","block-visibility")),(0,t.createElement)("div",{className:"rule-sets"},E.map(((i,o)=>(0,t.createElement)(el,e({key:o,ruleSet:i,ruleSetIndex:o,ruleSets:E,groupedFields:S,allFields:C,controlName:"acf",controlAtts:_,hideOnRuleSets:k,rulePlaceholder:(0,l.__)("Select Field…","block-visibility")},n))))),(0,t.createElement)("div",{className:"control-fields-item__hide-when"},(0,t.createElement)(c.ToggleControl,{label:(0,l.__)("Hide when rules apply","block-visibility"),checked:k,onChange:()=>m("acf",(0,i.assign)({..._},{hideOnRuleSets:!k}))}))))}function nl(e){const{currentDate:n,label:i,setAttribute:o,setPickerOpen:r,pickerType:s}=e,a=(0,Q.__experimentalGetSettings)(),u=/a(?!\\)/i.test(a.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,t.createElement)(c.Popover,{className:"block-visibility__date-time-popover",focusOnMount:!0,onClose:()=>r(!1),placement:"left-start",offset:8},(0,t.createElement)("div",{className:"date-time-popover__header"},(0,t.createElement)("h2",null,i),(0,t.createElement)(c.Button,{label:(0,l.__)("Close","block-visibility"),onClick:()=>r(!1),icon:J,isSmall:!0})),(0,t.createElement)(c.DateTimePicker,{currentDate:n,onChange:e=>{o(s,e)},is12Hour:u,__nextRemoveHelpButton:!0,__nextRemoveResetButton:!0}))}function il(e){const{dateType:n,label:i,title:o,hasDateTime:r,setAttribute:s,setPickerOpen:a,setPickerType:u}=e;return(0,t.createElement)("div",{className:"date-time-item__field"},(0,t.createElement)(c.Button,{title:o,onClick:()=>{u(n),a(!0)}},(0,t.createElement)("span",null,i)),r&&(0,t.createElement)(c.Button,{icon:J,className:"clear-date-time",title:(0,l.__)("Clear date/time","block-visibility"),onClick:()=>s(n,""),isSmall:!0}))}function ll(e,t){const n=(0,Q.__experimentalGetSettings)();let i=t;return e&&(i=(0,Q.format)(`M j, Y ${n.formats.time}`,e)),i}const ol=(0,c.withFilters)("blockVisibility.addDateTimeScheduleControls")((e=>(0,t.createElement)(t.Fragment,null)));function rl(n){var o,r,s,a;const{type:u,dateTime:p,schedules:b,scheduleIndex:m,scheduleAtts:f,controlSetAtts:v,setControlAtts:h,hideOnSchedules:g}=n,[y,_]=(0,t.useState)(!1),[k,E]=(0,t.useState)(null),S="single"===u?u+"-"+m:u+"-"+v?.id+"-"+m,w=null!==(o=f?.title)&&void 0!==o?o:"",C=null===(r=f?.enable)||void 0===r||r,O=null!==(s=f?.start)&&void 0!==s?s:null,x=null!==(a=f?.end)&&void 0!==a?a:null,M=new Date((new Date).setHours(0,0,0,0)),V=w||(0,l.__)("Schedule","block-visibility"),R=ll(O,(0,l.__)("Now","block-visibility")),T=ll(x,(0,l.__)("Forever","block-visibility"));let F=!1;O&&x&&(F=O>=x);const I=(e,t)=>{const n={...f},l=[...b];n[e]=t,l[m]=n,h("dateTime",(0,i.assign)({...p},{schedules:[...l]}))},A=(0,t.createElement)(c.DropdownMenu,{label:(0,l.__)("Edit","block-visibility"),icon:le,popoverProps:{className:"block-visibility__control-popover edit-title",focusOnMount:"container"},toggleProps:{isSmall:!0}},(()=>(0,t.createElement)(c.TextControl,{value:w,label:(0,l.__)("Schedule title","block-visibility"),placeholder:(0,l.__)("Schedule","block-visibility"),onChange:e=>I("title",e)}))),N=b.length<=1?(0,l.__)("Clear schedule","block-visibility"):(0,l.__)("Remove schedule","block-visibility"),D=(0,t.createElement)(c.DropdownMenu,{className:"options-dropdown",label:(0,l.__)("Options","block-visibility"),icon:P,popoverProps:{focusOnMount:"container"}},(e=>{let{onClose:n}=e;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(c.Slot,{name:"ScheduleOptionsTop"}),(0,t.createElement)(c.MenuGroup,{label:(0,l.__)("Tools","block-visibility")},(0,t.createElement)(c.Slot,{name:"ScheduleOptionsTools"}),(0,t.createElement)(c.MenuItem,{onClick:()=>I("enable",!C)},C?(0,l.__)("Disable","block-visibility"):(0,l.__)("Enable","block-visibility")),(0,t.createElement)(c.MenuItem,{onClick:()=>{!function(){const e=[...b,f];h("dateTime",(0,i.assign)({...p},{schedules:[...e]}))}(),n()}},(0,l.__)("Duplicate","block-visibility"))),(0,t.createElement)(c.Slot,{name:"ScheduleOptionsMiddle"}),(0,t.createElement)(c.MenuGroup,null,(0,t.createElement)(c.MenuItem,{onClick:()=>{!function(){const e=b.filter(((e,t)=>t!==m));h("dateTime",(0,i.assign)({...p},{schedules:[...e]}))}(),n()}},N)),(0,t.createElement)(c.Slot,{name:"ScheduleOptionsBottom"}))}));let L=(0,t.createElement)("div",{className:"schedules-item__fields"},(0,t.createElement)(c.Slot,{name:"DateTimeScheduleControlsTop-"+S}),(0,t.createElement)("div",{className:"schedules-item__fields__date-time"},(0,t.createElement)("div",{className:"control-fields-item__label"},(0,l.sprintf)( // Translators: Whether the block is hidden or visible. -(0,o.__)("%s the block","block-visibility"),g?(0,o.__)("Hide","block-visibility"):(0,o.__)("Show","block-visibility"))),(0,t.createElement)("div",{className:"date-time-items"},(0,t.createElement)("div",{className:"date-time-item"},(0,t.createElement)("span",{className:"control-fields-item__sub-label"},(0,o.__)("From","block-visibility")),(0,t.createElement)(to,{label:R,title:(0,o.__)("Choose a start date/time","block-visibility"),dateType:"start",hasDateTime:O,setAttribute:T,setPickerType:E,setPickerOpen:_})),(0,t.createElement)("div",{className:"date-time-item"},(0,t.createElement)("span",{className:"control-fields-item__sub-label"},(0,o.__)("To","block-visibility")),(0,t.createElement)(to,{label:P,title:(0,o.__)("Choose a end date/time","block-visibility"),dateType:"end",hasDateTime:x,setAttribute:T,setPickerType:E,setPickerOpen:_})),y&&k&&(0,t.createElement)(eo,{currentDate:"start"===k?((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})(O,x,M):((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})(O,x,M),label:"start"===k?(0,o.__)("Start Date/Time","block-visibility"):(0,o.__)("End Date/Time","block-visibility"),isOpen:_,setAttribute:T,setPickerOpen:_,pickerType:k})),I&&(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,o.__)("The start time is after the stop time. Please fix for date/time settings to function properly.","block-visibility"))),(0,t.createElement)(c.Slot,{name:"DateTimeScheduleControlsBottom-"+S}));return C||(L=(0,t.createElement)(c.Disabled,null,L)),(0,t.createElement)("div",{className:d()("schedules-item",{disabled:!C})},(0,t.createElement)("div",{className:"section-header"},(0,t.createElement)("div",{className:"section-header__title"},(0,t.createElement)("span",null,V),A),(0,t.createElement)("div",{className:"section-header__toolbar"},(0,t.createElement)(c.Slot,{name:"DateTimeScheduleToolbar-"+S}),D)),L,(0,t.createElement)(io,e({uniqueIndex:S},n)))}function lo(n){var l,r,s,a;const{enabledControls:u,controlSetAtts:d,setControlAtts:p,settings:m}=n;if(!u.some((e=>"date_time"===e.settingSlug&&e?.isActive)))return null;const b=null===(l=m?.plugin_settings?.enable_editor_notices)||void 0===l||l,f=null!==(r=d?.controls?.dateTime)&&void 0!==r?r:{},v=null!==(s=f?.hideOnSchedules)&&void 0!==s&&s;let h=null!==(a=f?.schedules)&&void 0!==a?a:[];if(0===h.length){const e={enable:!0,start:"",end:""};f.schedules=[e],h=f.schedules}return(0,t.createElement)("div",{className:"controls-panel-item date-time-control"},(0,t.createElement)("h3",{className:"controls-panel-item__header has-icon"},(0,t.createElement)("span",null,(0,o.__)("Date & Time","block-visibility")),b&&(0,t.createElement)(te,{message:(0,o.__)("The Date & Time control allows you to schedule when the block should be visible.","block-visibility"),link:W.editorDateTime,position:"bottom center"}),(0,t.createElement)("div",{className:"controls-panel-item__header-toolbar"},(0,t.createElement)(c.Button,{icon:P,onClick:()=>(()=>{const e=[...h];e.push({enable:!0,start:"",end:""}),p("dateTime",(0,i.assign)({...f},{schedules:[...e]}))})(),label:(0,o.__)("Add schedule","block-visibility"),isSmall:!0}))),b&&(0,t.createElement)("div",{className:"controls-panel-item__description"},(0,o.sprintf)( +(0,l.__)("%s the block","block-visibility"),g?(0,l.__)("Hide","block-visibility"):(0,l.__)("Show","block-visibility"))),(0,t.createElement)("div",{className:"date-time-items"},(0,t.createElement)("div",{className:"date-time-item"},(0,t.createElement)("span",{className:"control-fields-item__sub-label"},(0,l.__)("From","block-visibility")),(0,t.createElement)(il,{label:R,title:(0,l.__)("Choose a start date/time","block-visibility"),dateType:"start",hasDateTime:O,setAttribute:I,setPickerType:E,setPickerOpen:_})),(0,t.createElement)("div",{className:"date-time-item"},(0,t.createElement)("span",{className:"control-fields-item__sub-label"},(0,l.__)("To","block-visibility")),(0,t.createElement)(il,{label:T,title:(0,l.__)("Choose a end date/time","block-visibility"),dateType:"end",hasDateTime:x,setAttribute:I,setPickerType:E,setPickerOpen:_})),y&&k&&(0,t.createElement)(nl,{currentDate:"start"===k?((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})(O,x,M):((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})(O,x,M),label:"start"===k?(0,l.__)("Start Date/Time","block-visibility"):(0,l.__)("End Date/Time","block-visibility"),isOpen:_,setAttribute:I,setPickerOpen:_,pickerType:k})),F&&(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,l.__)("The start time is after the stop time. Please fix for date/time settings to function properly.","block-visibility"))),(0,t.createElement)(c.Slot,{name:"DateTimeScheduleControlsBottom-"+S}));return C||(L=(0,t.createElement)(c.Disabled,null,L)),(0,t.createElement)("div",{className:d()("schedules-item",{disabled:!C})},(0,t.createElement)("div",{className:"section-header"},(0,t.createElement)("div",{className:"section-header__title"},(0,t.createElement)("span",null,V),A),(0,t.createElement)("div",{className:"section-header__toolbar"},(0,t.createElement)(c.Slot,{name:"DateTimeScheduleToolbar-"+S}),D)),L,(0,t.createElement)(ol,e({uniqueIndex:S},n)))}function sl(n){var o,r,s,a;const{enabledControls:u,controlSetAtts:d,setControlAtts:p,settings:b}=n;if(!u.some((e=>"date_time"===e.settingSlug&&e?.isActive)))return null;const m=null===(o=b?.plugin_settings?.enable_editor_notices)||void 0===o||o,f=null!==(r=d?.controls?.dateTime)&&void 0!==r?r:{},v=null!==(s=f?.hideOnSchedules)&&void 0!==s&&s;let h=null!==(a=f?.schedules)&&void 0!==a?a:[];if(0===h.length){const e={enable:!0,start:"",end:""};f.schedules=[e],h=f.schedules}return(0,t.createElement)("div",{className:"controls-panel-item date-time-control"},(0,t.createElement)("h3",{className:"controls-panel-item__header has-icon"},(0,t.createElement)("span",null,(0,l.__)("Date & Time","block-visibility")),m&&(0,t.createElement)(ie,{message:(0,l.__)("The Date & Time control allows you to schedule when the block should be visible.","block-visibility"),link:Y.editorDateTime,position:"bottom center"}),(0,t.createElement)("div",{className:"controls-panel-item__header-toolbar"},(0,t.createElement)(c.Button,{icon:T,onClick:()=>(()=>{const e=[...h];e.push({enable:!0,start:"",end:""}),p("dateTime",(0,i.assign)({...f},{schedules:[...e]}))})(),label:(0,l.__)("Add schedule","block-visibility"),isSmall:!0}))),m&&(0,t.createElement)("div",{className:"controls-panel-item__description"},(0,l.sprintf)( // Translators: Whether the block is hidden or visible. -(0,o.__)("%s the block if at least one schedule applies.","block-visibility"),v?(0,o.__)("Hide","block-visibility"):(0,o.__)("Show","block-visibility"))),(0,t.createElement)("div",{className:"controls-panel-item__control-fields"},(0,t.createElement)("div",{className:"control-fields-item__schedules"},h.map(((i,o)=>(0,t.createElement)(oo,e({key:o,dateTime:f,schedules:h,scheduleIndex:o,scheduleAtts:i,hideOnSchedules:v},n))))),(0,t.createElement)(c.Slot,{name:"DateTimeControls"}),(0,t.createElement)("div",{className:"control-fields-item__hide-when"},(0,t.createElement)(c.ToggleControl,{label:(0,o.__)("Hide when schedules apply","block-visibility"),checked:v,onChange:()=>p("dateTime",(0,i.assign)({...f},{hideOnSchedules:!v}))}))))}function ro(e){var n,l;const{attributes:r,setAttributes:s,enabledControls:a,settings:u}=e;if(!a.some((e=>"hide_block"===e.settingSlug&&e.isActive)))return null;const{blockVisibility:d}=r,p=null!==(n=d?.hideBlock)&&void 0!==n&&n,m=null===(l=u?.plugin_settings?.enable_editor_notices)||void 0===l||l;return(0,t.createElement)("div",{className:"controls-panel-item hide-block-control"},(0,t.createElement)("h3",{className:"controls-panel-item__header has-icon"},(0,t.createElement)("span",null,(0,o.__)("Hide Block","block-visibility")),m&&(0,t.createElement)(te,{message:(0,o.__)("The Hide Block control overrides all other visibility controls when enabled.","block-visibility"),link:W.editorHideBlock,position:"bottom center"})),(0,t.createElement)("div",{className:"controls-panel-item__control-fields"},(0,t.createElement)(c.ToggleControl,{label:(0,o.__)("Hide the block from everyone","block-visibility"),checked:p,onChange:()=>{s({blockVisibility:(0,i.assign)({...d},{hideBlock:!p})})}})))}function so(e){var n,l,r,s,a;const{enabledControls:u,controlSetAtts:d,setControlAtts:p,settings:m}=e;if(!u.some((e=>"query_string"===e.settingSlug&&e.isActive)))return null;const b=null!==(n=d?.controls?.queryString)&&void 0!==n?n:{},f=null!==(l=b?.queryStringAny)&&void 0!==l?l:"",v=null!==(r=b?.queryStringAll)&&void 0!==r?r:"",h=null!==(s=b?.queryStringNot)&&void 0!==s?s:"",g=null===(a=m?.plugin_settings?.enable_editor_notices)||void 0===a||a,y=(e,t)=>p("queryString",(0,i.assign)({...b},{[e]:t}));return(0,t.createElement)("div",{className:"controls-panel-item query-string-control"},(0,t.createElement)("h3",{className:"controls-panel-item__header has-icon"},(0,t.createElement)("span",null,(0,o.__)("Query String","block-visibility")),g&&(0,t.createElement)(te,{message:(0,o.__)("The Query String control allows you to configure block visibility based on URL query strings.","block-visibility"),link:W.editorQueryString,position:"bottom center"})),(0,t.createElement)("div",{className:"controls-panel-item__description"},(0,o.__)("Enter one URL query string per line.","block-visibility")),(0,t.createElement)("div",{className:"controls-panel-item__control-fields"},(0,t.createElement)(c.TextareaControl,{label:(0,t.createInterpolateElement)((0,o.__)("Required Queries (Any)","block-visibility"),{span:(0,t.createElement)("span",{className:"components-base-control__label-hint"})}),help:g&&(0,o.__)("Show the block if at least one of the provided URL query strings is present.","block-visibility"),value:f,onChange:e=>y("queryStringAny",e),rows:"2"}),(0,t.createElement)(c.TextareaControl,{label:(0,t.createInterpolateElement)((0,o.__)("Required Queries (All)","block-visibility"),{span:(0,t.createElement)("span",{className:"components-base-control__label-hint"})}),help:g&&(0,t.createInterpolateElement)((0,o.__)("Show the block if all of the provided URL query strings are present.","block-visibility"),{strong:(0,t.createElement)("strong",null)}),value:v,onChange:e=>y("queryStringAll",e),rows:"2"}),(0,t.createElement)(c.TextareaControl,{label:(0,t.createInterpolateElement)((0,o.__)("Required Queries (Not)","block-visibility"),{span:(0,t.createElement)("span",{className:"components-base-control__label-hint"})}),help:g&&(0,o.__)("Hide the block if at least one of the provided URL query strings is present.","block-visibility"),value:h,onChange:e=>y("queryStringNot",e),rows:"2"})))}function ao(e,t,n){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!e||0===e.length)return!1;const l=e.visibility_controls,r=(0,i.has)(l,t);if(!r)return o;const s=(0,i.has)(l[t],n);return s?l[t][n]:o}function co(e){var n,l,s,a,u,d,p,m,b;const{name:f,settings:v,enabledControls:h,controlSetAtts:g,setControlAtts:y}=e;if(!h.some((e=>"screen_size"===e.settingSlug&&e.isActive)))return null;const _=null!==(n=g?.controls?.screenSize)&&void 0!==n?n:{},k=null!==(l=_?.hideOnScreenSize)&&void 0!==l?l:{},E=ao(v,"screen_size","enable_advanced_controls",!1),S=null!==(s=v?.visibility_controls?.screen_size?.controls)&&void 0!==s?s:{extraLarge:!0,large:!0,medium:!0,small:!0,extraSmall:!0},w=null===(a=v?.plugin_settings?.enable_editor_notices)||void 0===a||a,C=(e,t)=>y("screenSize",(0,i.assign)({..._},{hideOnScreenSize:(0,i.assign)({...k},{[e]:t})})),O=null!==(u=k?.extraLarge)&&void 0!==u&&u,x=null!==(d=k?.large)&&void 0!==d&&d,M=null!==(p=k?.medium)&&void 0!==p&&p,V=null!==(m=k?.small)&&void 0!==m&&m,R=null!==(b=k?.extraSmall)&&void 0!==b&&b;let P=(0,t.createElement)(t.Fragment,null,E&&S.extra_large&&(0,t.createElement)(c.ToggleControl,{label:(0,o.__)("Hide on large desktop","block-visibility"),checked:O,onChange:()=>{C("extraLarge",!O)}}),S.large&&(0,t.createElement)(c.ToggleControl,{label:(0,o.__)("Hide on desktop","block-visibility"),checked:x,onChange:()=>{C("large",!x)}}),S.medium&&(0,t.createElement)(c.ToggleControl,{label:(0,o.__)("Hide on tablet","block-visibility"),checked:M,onChange:()=>{C("medium",!M)}}),S.small&&(0,t.createElement)(c.ToggleControl,{label:[!E&&(0,o.__)("Hide on mobile","block-visibility"),E&&(0,o.__)("Hide on mobile (landscape)","block-visibility")],checked:V,onChange:()=>{C("small",!V)}}),E&&S.extra_small&&(0,t.createElement)(c.ToggleControl,{label:(0,o.__)("Hide on mobile (portrait)","block-visibility"),checked:R,onChange:()=>{C("extraSmall",!R)}}));const F=(0,r.applyFilters)("blockVisibility.screenSizeIncompatibleBlockTypes",["core/shortcode","core/html","meow-gallery/gallery"]);return F.includes(f)&&(P=(0,t.createElement)(c.Disabled,null,P)),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"controls-panel-item screen-size-control"},(0,t.createElement)("h3",{className:"controls-panel-item__header has-icon"},(0,t.createElement)("span",null,(0,o.__)("Screen Size","block-visibility")),w&&(0,t.createElement)(te,{message:(0,o.__)("The Screen Size control allows you to configure block visibility based on the width of the current screen.","block-visibility"),link:W.editorScreenSize,position:"bottom center"})),(0,t.createElement)("div",{className:"controls-panel-item__control-fields"},P,F.includes(f)&&(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,t.createInterpolateElement)((0,o.__)("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,t.createElement)(c.ExternalLink,{href:W.editorScreenSize,target:"_blank",rel:"noreferrer"})})))))}function uo(e){var n,l,r;const{variables:s,userRole:a,setControlAtts:u,enableNotices:d}=e,p=null!==(n=a?.restrictedRoles)&&void 0!==n?n:[],m=null!==(l=a?.hideOnRestrictedRoles)&&void 0!==l&&l,b=null!==(r=s?.user_roles)&&void 0!==r?r:[],f=m?(0,o.__)("Hide the block from","block-visibility"):(0,o.__)("Show the block to","block-visibility"),v=b.filter((e=>p.includes(e.value)));return(0,t.createElement)("div",{className:"control-fields-item"},d&&(0,t.createElement)("div",{className:"components-base-control__help"},(0,o.sprintf)( +(0,l.__)("%s the block if at least one schedule applies.","block-visibility"),v?(0,l.__)("Hide","block-visibility"):(0,l.__)("Show","block-visibility"))),(0,t.createElement)("div",{className:"controls-panel-item__control-fields"},(0,t.createElement)("div",{className:"control-fields-item__schedules"},h.map(((i,l)=>(0,t.createElement)(rl,e({key:l,dateTime:f,schedules:h,scheduleIndex:l,scheduleAtts:i,hideOnSchedules:v},n))))),(0,t.createElement)(c.Slot,{name:"DateTimeControls"}),(0,t.createElement)("div",{className:"control-fields-item__hide-when"},(0,t.createElement)(c.ToggleControl,{label:(0,l.__)("Hide when schedules apply","block-visibility"),checked:v,onChange:()=>p("dateTime",(0,i.assign)({...f},{hideOnSchedules:!v}))}))))}function al(e){var n,o;const{attributes:r,setAttributes:s,enabledControls:a,settings:u}=e;if(!a.some((e=>"hide_block"===e.settingSlug&&e.isActive)))return null;const{blockVisibility:d}=r,p=null!==(n=d?.hideBlock)&&void 0!==n&&n,b=null===(o=u?.plugin_settings?.enable_editor_notices)||void 0===o||o;return(0,t.createElement)("div",{className:"controls-panel-item hide-block-control"},(0,t.createElement)("h3",{className:"controls-panel-item__header has-icon"},(0,t.createElement)("span",null,(0,l.__)("Hide Block","block-visibility")),b&&(0,t.createElement)(ie,{message:(0,l.__)("The Hide Block control overrides all other visibility controls when enabled.","block-visibility"),link:Y.editorHideBlock,position:"bottom center"})),(0,t.createElement)("div",{className:"controls-panel-item__control-fields"},(0,t.createElement)(c.ToggleControl,{label:(0,l.__)("Hide the block from everyone","block-visibility"),checked:p,onChange:()=>{s({blockVisibility:(0,i.assign)({...d},{hideBlock:!p})})}})))}function cl(e){var n,o,r,s,a;const{enabledControls:u,controlSetAtts:d,setControlAtts:p,settings:b}=e;if(!u.some((e=>"query_string"===e.settingSlug&&e.isActive)))return null;const m=null!==(n=d?.controls?.queryString)&&void 0!==n?n:{},f=null!==(o=m?.queryStringAny)&&void 0!==o?o:"",v=null!==(r=m?.queryStringAll)&&void 0!==r?r:"",h=null!==(s=m?.queryStringNot)&&void 0!==s?s:"",g=null===(a=b?.plugin_settings?.enable_editor_notices)||void 0===a||a,y=(e,t)=>p("queryString",(0,i.assign)({...m},{[e]:t}));return(0,t.createElement)("div",{className:"controls-panel-item query-string-control"},(0,t.createElement)("h3",{className:"controls-panel-item__header has-icon"},(0,t.createElement)("span",null,(0,l.__)("Query String","block-visibility")),g&&(0,t.createElement)(ie,{message:(0,l.__)("The Query String control allows you to configure block visibility based on URL query strings.","block-visibility"),link:Y.editorQueryString,position:"bottom center"})),(0,t.createElement)("div",{className:"controls-panel-item__description"},(0,l.__)("Enter one URL query string per line.","block-visibility")),(0,t.createElement)("div",{className:"controls-panel-item__control-fields"},(0,t.createElement)(c.TextareaControl,{label:(0,t.createInterpolateElement)((0,l.__)("Required Queries (Any)","block-visibility"),{span:(0,t.createElement)("span",{className:"components-base-control__label-hint"})}),help:g&&(0,l.__)("Show the block if at least one of the provided URL query strings is present.","block-visibility"),value:f,onChange:e=>y("queryStringAny",e),rows:"2"}),(0,t.createElement)(c.TextareaControl,{label:(0,t.createInterpolateElement)((0,l.__)("Required Queries (All)","block-visibility"),{span:(0,t.createElement)("span",{className:"components-base-control__label-hint"})}),help:g&&(0,t.createInterpolateElement)((0,l.__)("Show the block if all of the provided URL query strings are present.","block-visibility"),{strong:(0,t.createElement)("strong",null)}),value:v,onChange:e=>y("queryStringAll",e),rows:"2"}),(0,t.createElement)(c.TextareaControl,{label:(0,t.createInterpolateElement)((0,l.__)("Required Queries (Not)","block-visibility"),{span:(0,t.createElement)("span",{className:"components-base-control__label-hint"})}),help:g&&(0,l.__)("Hide the block if at least one of the provided URL query strings is present.","block-visibility"),value:h,onChange:e=>y("queryStringNot",e),rows:"2"})))}function ul(e,t,n){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,i.has)(o,t);if(!r)return l;const s=(0,i.has)(o[t],n);return s?o[t][n]:l}function dl(e){var n,o,s,a,u,d,p,b,m;const{name:f,settings:v,enabledControls:h,controlSetAtts:g,setControlAtts:y}=e;if(!h.some((e=>"screen_size"===e.settingSlug&&e.isActive)))return null;const _=null!==(n=g?.controls?.screenSize)&&void 0!==n?n:{},k=null!==(o=_?.hideOnScreenSize)&&void 0!==o?o:{},E=ul(v,"screen_size","enable_advanced_controls",!1),S=null!==(s=v?.visibility_controls?.screen_size?.controls)&&void 0!==s?s:{extraLarge:!0,large:!0,medium:!0,small:!0,extraSmall:!0},w=null===(a=v?.plugin_settings?.enable_editor_notices)||void 0===a||a,C=(e,t)=>y("screenSize",(0,i.assign)({..._},{hideOnScreenSize:(0,i.assign)({...k},{[e]:t})})),O=null!==(u=k?.extraLarge)&&void 0!==u&&u,x=null!==(d=k?.large)&&void 0!==d&&d,M=null!==(p=k?.medium)&&void 0!==p&&p,V=null!==(b=k?.small)&&void 0!==b&&b,R=null!==(m=k?.extraSmall)&&void 0!==m&&m;let T=(0,t.createElement)(t.Fragment,null,E&&S.extra_large&&(0,t.createElement)(c.ToggleControl,{label:(0,l.__)("Hide on large desktop","block-visibility"),checked:O,onChange:()=>{C("extraLarge",!O)}}),S.large&&(0,t.createElement)(c.ToggleControl,{label:(0,l.__)("Hide on desktop","block-visibility"),checked:x,onChange:()=>{C("large",!x)}}),S.medium&&(0,t.createElement)(c.ToggleControl,{label:(0,l.__)("Hide on tablet","block-visibility"),checked:M,onChange:()=>{C("medium",!M)}}),S.small&&(0,t.createElement)(c.ToggleControl,{label:[!E&&(0,l.__)("Hide on mobile","block-visibility"),E&&(0,l.__)("Hide on mobile (landscape)","block-visibility")],checked:V,onChange:()=>{C("small",!V)}}),E&&S.extra_small&&(0,t.createElement)(c.ToggleControl,{label:(0,l.__)("Hide on mobile (portrait)","block-visibility"),checked:R,onChange:()=>{C("extraSmall",!R)}}));const P=(0,r.applyFilters)("blockVisibility.screenSizeIncompatibleBlockTypes",["core/shortcode","core/html","meow-gallery/gallery"]);return P.includes(f)&&(T=(0,t.createElement)(c.Disabled,null,T)),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"controls-panel-item screen-size-control"},(0,t.createElement)("h3",{className:"controls-panel-item__header has-icon"},(0,t.createElement)("span",null,(0,l.__)("Screen Size","block-visibility")),w&&(0,t.createElement)(ie,{message:(0,l.__)("The Screen Size control allows you to configure block visibility based on the width of the current screen.","block-visibility"),link:Y.editorScreenSize,position:"bottom center"})),(0,t.createElement)("div",{className:"controls-panel-item__control-fields"},T,P.includes(f)&&(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,t.createInterpolateElement)((0,l.__)("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,t.createElement)(c.ExternalLink,{href:Y.editorScreenSize,target:"_blank",rel:"noreferrer"})})))))}function pl(e){var n,o,r;const{variables:s,userRole:a,setControlAtts:u,enableNotices:d}=e,p=null!==(n=a?.restrictedRoles)&&void 0!==n?n:[],b=null!==(o=a?.hideOnRestrictedRoles)&&void 0!==o&&o,m=null!==(r=s?.user_roles)&&void 0!==r?r:[],f=b?(0,l.__)("Hide the block from","block-visibility"):(0,l.__)("Show the block to","block-visibility"),v=m.filter((e=>p.includes(e.value)));return(0,t.createElement)("div",{className:"control-fields-item"},d&&(0,t.createElement)("div",{className:"components-base-control__help"},(0,l.sprintf)( // Translators: Whether the block is hidden or visible. -(0,o.__)("%s users with at least one of the selected roles.","block-visibility"),f)),(0,t.createElement)(Yi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:b,value:v,placeholder:(0,o.__)("Select Role…","block-visibility"),onChange:e=>(e=>{const t=[];0!==e.length&&e.forEach((e=>{t.push(e.value)})),u("userRole",(0,i.assign)({...a},{restrictedRoles:t}))})(e),isMulti:!0}),(0,t.createElement)("div",{className:"control-fields-item__hide-when"},(0,t.createElement)(c.ToggleControl,{label:(0,o.__)("Hide from selected roles","block-visibility"),checked:m,onChange:()=>u("userRole",(0,i.assign)({...a},{hideOnRestrictedRoles:!m}))})))}function po(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=(0,l.useSelect)((t=>{if(!e)return[];const n=t("core").getUsers({per_page:-1,_fields:"id,name"}),i=[];return n&&0!==n.length&&n.forEach((e=>{const t={value:e.id,label:e.name};i.push(t)})),i}),[]);return t}function mo(e){var t;const n=po();let i=null!==(t=e?.user_roles)&&void 0!==t?t:[];i=i.filter((e=>"logged-out"!==e.value));const l=[{value:"any",label:(0,o.__)("Is any of the selected","block-visibility")},{value:"none",label:(0,o.__)("Is none of the selected","block-visibility")}],r=[{value:"atLeastOne",label:(0,o.__)("Is at least one of the selected","block-visibility")},{value:"all",label:(0,o.__)("Is all of the selected","block-visibility")},{value:"none",label:(0,o.__)("Is none of the selected","block-visibility")}],s=(0,o.__)("Select Condition…","block-visibility");return[{value:"logged-out",label:(0,o.__)("User is logged-out","block-visibility"),group:"type"},{value:"logged-in",label:(0,o.__)("User is logged-in","block-visibility"),group:"type"},{value:"user-role",label:(0,o.__)("User's role","block-visibility"),group:"type",fields:[{type:"operatorField",valueType:"select",options:r,placeholder:s},{type:"valueField",valueType:"multiSelect",options:i,placeholder:(0,o.__)("Select User Roles…","block-visibility"),isMulti:!0}]},{value:"users",label:(0,o.__)("User","block-visibility"),group:"type",fields:[{type:"operatorField",valueType:"select",options:l,placeholder:s},{type:"valueField",valueType:"multiSelect",options:n,placeholder:(0,o.__)("Select Users…","block-visibility"),isMulti:!0}]}]}function bo(n){var l,r,s;const{ruleSets:a,setControlAtts:u,userRole:d,variables:p,enableNotices:m}=n,b=null!==(l=d?.hideOnRuleSets)&&void 0!==l&&l,f=function(e){const t=[{value:"type",label:(0,o.__)("User Rule Type","block-visibility")}],n=mo(e),i=[];return t.forEach((e=>{var t,o;const l=null!==(t=e?.value)&&void 0!==t?t:"",r=null!==(o=e?.label)&&void 0!==o?o:"",s=n.filter((e=>e.group===l));i.push({value:l,label:r,options:s})})),i}(),v=mo(p);return null!==(s=(null!==(r=p?.current_users_roles)&&void 0!==r?r:[]).includes("administrator"))&&void 0!==s&&s?(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"control-fields-item"},m&&(0,t.createElement)("div",{className:"components-base-control__help"},(0,o.sprintf)( +(0,l.__)("%s users with at least one of the selected roles.","block-visibility"),f)),(0,t.createElement)(Xi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:m,value:v,placeholder:(0,l.__)("Select Role…","block-visibility"),onChange:e=>(e=>{const t=[];0!==e.length&&e.forEach((e=>{t.push(e.value)})),u("userRole",(0,i.assign)({...a},{restrictedRoles:t}))})(e),isMulti:!0}),(0,t.createElement)("div",{className:"control-fields-item__hide-when"},(0,t.createElement)(c.ToggleControl,{label:(0,l.__)("Hide from selected roles","block-visibility"),checked:b,onChange:()=>u("userRole",(0,i.assign)({...a},{hideOnRestrictedRoles:!b}))})))}function bl(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=(0,o.useSelect)((t=>{if(!e)return[];const n=t("core").getUsers({per_page:-1,_fields:"id,name"}),i=[];return n&&0!==n.length&&n.forEach((e=>{const t={value:e.id,label:e.name};i.push(t)})),i}),[]);return t}function ml(e){var t;const n=bl();let i=null!==(t=e?.user_roles)&&void 0!==t?t:[];i=i.filter((e=>"logged-out"!==e.value));const o=[{value:"any",label:(0,l.__)("Is any of the selected","block-visibility")},{value:"none",label:(0,l.__)("Is none of the selected","block-visibility")}],r=[{value:"atLeastOne",label:(0,l.__)("Is at least one of the selected","block-visibility")},{value:"all",label:(0,l.__)("Is all of the selected","block-visibility")},{value:"none",label:(0,l.__)("Is none of the selected","block-visibility")}],s=(0,l.__)("Select Condition…","block-visibility");return[{value:"logged-out",label:(0,l.__)("User is logged-out","block-visibility"),group:"type"},{value:"logged-in",label:(0,l.__)("User is logged-in","block-visibility"),group:"type"},{value:"user-role",label:(0,l.__)("User's role","block-visibility"),group:"type",fields:[{type:"operatorField",valueType:"select",options:r,placeholder:s},{type:"valueField",valueType:"multiSelect",options:i,placeholder:(0,l.__)("Select User Roles…","block-visibility"),isMulti:!0}]},{value:"users",label:(0,l.__)("User","block-visibility"),group:"type",fields:[{type:"operatorField",valueType:"select",options:o,placeholder:s},{type:"valueField",valueType:"multiSelect",options:n,placeholder:(0,l.__)("Select Users…","block-visibility"),isMulti:!0}]}]}function fl(n){var o,r,s;const{ruleSets:a,setControlAtts:u,userRole:d,variables:p,enableNotices:b}=n,m=null!==(o=d?.hideOnRuleSets)&&void 0!==o&&o,f=function(e){const t=[{value:"type",label:(0,l.__)("User Rule Type","block-visibility")}],n=ml(e),i=[];return t.forEach((e=>{var t,l;const o=null!==(t=e?.value)&&void 0!==t?t:"",r=null!==(l=e?.label)&&void 0!==l?l:"",s=n.filter((e=>e.group===o));i.push({value:o,label:r,options:s})})),i}(),v=ml(p);return null!==(s=(null!==(r=p?.current_users_roles)&&void 0!==r?r:[]).includes("administrator"))&&void 0!==s&&s?(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"control-fields-item"},b&&(0,t.createElement)("div",{className:"components-base-control__help"},(0,l.sprintf)( // Translators: Whether the block is hidden or visible. -(0,o.__)("%s the block if at least one user rule set applies.","block-visibility"),b?(0,o.__)("Hide","block-visibility"):(0,o.__)("Show","block-visibility"))),(0,t.createElement)("div",{className:"rule-sets"},a.map(((i,o)=>(0,t.createElement)(Ki,e({key:o,ruleSet:i,ruleSetIndex:o,ruleSets:a,groupedFields:f,allFields:v,controlName:"userRole",controlAtts:d,hideOnRuleSets:b},n))))),(0,t.createElement)("div",{className:"control-fields-item__hide-when"},(0,t.createElement)(c.ToggleControl,{label:(0,o.__)("Hide when rules apply","block-visibility"),checked:b,onChange:()=>u("userRole",(0,i.assign)({...d},{hideOnRuleSets:!b}))})))):(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,o.__)("Website Administrators can only configure the User rule sets option. Please choose another option.","block-visibility"))}function fo(e){var n,l,r,s;const{variables:a,userRole:u,setControlAtts:d,enableNotices:p}=e,m=null!==(n=u?.restrictedUsers)&&void 0!==n?n:[],b=null!==(l=u?.hideOnRestrictedUsers)&&void 0!==l&&l,f=null!==(s=(null!==(r=a?.current_users_roles)&&void 0!==r?r:[]).includes("administrator"))&&void 0!==s&&s,v=po(f);if(!f)return(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,o.__)("Website Administrators can only configure the Users option. Please choose another option.","block-visibility"));const h=v.filter((e=>m.includes(e.value))),g=b?(0,o.__)("Hide the block from","block-visibility"):(0,o.__)("Show the block to","block-visibility");return(0,t.createElement)("div",{className:"control-fields-item"},p&&(0,t.createElement)("div",{className:"components-base-control__help"},(0,o.sprintf)( +(0,l.__)("%s the block if at least one user rule set applies.","block-visibility"),m?(0,l.__)("Hide","block-visibility"):(0,l.__)("Show","block-visibility"))),(0,t.createElement)("div",{className:"rule-sets"},a.map(((i,l)=>(0,t.createElement)(el,e({key:l,ruleSet:i,ruleSetIndex:l,ruleSets:a,groupedFields:f,allFields:v,controlName:"userRole",controlAtts:d,hideOnRuleSets:m},n))))),(0,t.createElement)("div",{className:"control-fields-item__hide-when"},(0,t.createElement)(c.ToggleControl,{label:(0,l.__)("Hide when rules apply","block-visibility"),checked:m,onChange:()=>u("userRole",(0,i.assign)({...d},{hideOnRuleSets:!m}))})))):(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,l.__)("Website Administrators can only configure the User rule sets option. Please choose another option.","block-visibility"))}function vl(e){var n,o,r,s;const{variables:a,userRole:u,setControlAtts:d,enableNotices:p}=e,b=null!==(n=u?.restrictedUsers)&&void 0!==n?n:[],m=null!==(o=u?.hideOnRestrictedUsers)&&void 0!==o&&o,f=null!==(s=(null!==(r=a?.current_users_roles)&&void 0!==r?r:[]).includes("administrator"))&&void 0!==s&&s,v=bl(f);if(!f)return(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,l.__)("Website Administrators can only configure the Users option. Please choose another option.","block-visibility"));const h=v.filter((e=>b.includes(e.value))),g=m?(0,l.__)("Hide the block from","block-visibility"):(0,l.__)("Show the block to","block-visibility");return(0,t.createElement)("div",{className:"control-fields-item"},p&&(0,t.createElement)("div",{className:"components-base-control__help"},(0,l.sprintf)( // Translators: Whether the block is hidden or visible. -(0,o.__)("%s the selected users.","block-visibility"),g)),(0,t.createElement)(Yi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:v,value:h,placeholder:(0,o.__)("Select Users…","block-visibility"),onChange:e=>(e=>{const t=[];0!==e.length&&e.forEach((e=>{t.push(e.value)})),d("userRole",(0,i.assign)({...u},{restrictedUsers:t}))})(e),isMulti:!0,isLoading:0===v.length}),(0,t.createElement)("div",{className:"control-fields-item__hide-when"},(0,t.createElement)(c.ToggleControl,{label:(0,o.__)("Hide from selected users","block-visibility"),checked:b,onChange:()=>d("userRole",(0,i.assign)({...u},{hideOnRestrictedUsers:!b}))})))}function vo(n){var l,r,s,a,u,d;const{settings:p,variables:m,enabledControls:b,setControlAtts:f,controlSetAtts:v}=n;if(!b.some((e=>"visibility_by_role"===e.settingSlug&&e.isActive)))return null;const h=null!==(l=v?.controls?.userRole)&&void 0!==l?l:{},g=null!==(r=h?.visibilityByRole)&&void 0!==r?r:"public",y=null!==(s=m?.plugin_variables.settings_url)&&void 0!==s?s:"",_=null===(a=p?.plugin_settings?.enable_editor_notices)||void 0===a||a,k=ao(p,"visibility_by_role","enable_user_roles"),E=ao(p,"visibility_by_role","enable_users"),S=ao(p,"visibility_by_role","enable_user_rule_sets");let w=[{label:(0,o.__)("Public","block-visibility"),value:"public"},{label:(0,o.__)("Logged-out","block-visibility"),value:"logged-out"},{label:(0,o.__)("Logged-in","block-visibility"),value:"logged-in"},{label:(0,o.__)("User roles","block-visibility"),value:"user-role"},{label:(0,o.__)("Users","block-visibility"),value:"users"},{label:(0,o.__)("User rule sets","block-visibility"),value:"user-rule-sets"}];const C=[{label:(0,o.__)("Block is visible to everyone.","block-visibility"),value:"public"},{label:(0,o.__)("Block is only visible to logged-out users.","block-visibility"),value:"logged-out"},{label:(0,o.__)("Block is only visible to logged-in users.","block-visibility"),value:"logged-in"}];k||(w=w.filter((e=>"user-role"!==e.value))),E||(w=w.filter((e=>"users"!==e.value))),S||(w=w.filter((e=>"user-rule-sets"!==e.value)));const O=w.filter((e=>e.value===g)),x=null!==(u=C.filter((e=>e.value===g))[0]?.label)&&void 0!==u?u:"",M=S&&"user-rule-sets"===g,V=null!==(d=h?.ruleSets)&&void 0!==d?d:[];return 0===V.length&&V.push({enable:!0,rules:[{field:""}]}),(0,t.createElement)("div",{className:"controls-panel-item user-role-control"},(0,t.createElement)("h3",{className:"controls-panel-item__header has-icon"},(0,t.createElement)("span",null,(0,o.__)("User Role","block-visibility")),_&&(0,t.createElement)(te,{message:(0,o.__)("The User Role control allows you to configure block visibility based on the current user's role or specific users.","block-visibility"),link:W.editorUserRole,position:"bottom center"}),M&&(0,t.createElement)("div",{className:"controls-panel-item__header-toolbar"},(0,t.createElement)(c.Button,{icon:P,onClick:()=>(()=>{const e=[...V,{enable:!0,rules:[{field:""}]}];f("userRole",(0,i.assign)({...h},{ruleSets:[...e]}))})(),label:(0,o.__)("Add rule set","block-visibility"),isSmall:!0}))),(0,t.createElement)("div",{className:"controls-panel-item__control-fields"},(0,t.createElement)("div",{className:"control-fields-item"},(0,t.createElement)(Yi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:w,value:O,onChange:e=>f("userRole",(0,i.assign)({...h},{visibilityByRole:e.value}))}),_&&x&&(0,t.createElement)("div",{className:"control-fields-item__help"},x)),"user-role"===g&&k&&(0,t.createElement)(uo,e({variables:m,userRole:h,setControlAtts:f,enableNotices:_},n)),"users"===g&&E&&(0,t.createElement)(fo,e({variables:m,userRole:h,setControlAtts:f,enableNotices:_},n)),"user-rule-sets"===g&&S&&(0,t.createElement)(bo,e({ruleSets:V,setControlAtts:f,userRole:h,variables:m,enableNotices:_},n)),!w.some((e=>e.value===g))&&(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,t.createInterpolateElement)((0,o.__)("The previously selected User Role option has been disabled. Choose another option or update the Visibility Control settings.","block-visibility"),{a:(0,t.createElement)("a",{href:y+"&tab=visibility-controls",target:"_blank",rel:"noreferrer"})}))))}function ho(e){var n,l,r,s,a,u,d,p,m;const{controlSetAtts:b,enabledControls:f,setControlAtts:v,settings:h,variables:g}=e,y=null!==(n=g?.integrations?.wp_fusion?.active)&&void 0!==n&&n;if(!f.some((e=>"wp_fusion"===e.settingSlug&&e?.isActive))||!y)return null;const _=null===(l=h?.plugin_settings?.enable_editor_notices)||void 0===l||l,k=null!==(r=b?.controls.hasOwnProperty("userRole"))&&void 0!==r&&r,E=null!==(s=b?.controls?.userRole?.visibilityByRole)&&void 0!==s?s:"public",w=null!==(a=g?.integrations?.wp_fusion?.tags)&&void 0!==a?a:[],C=e=>w.filter((t=>e.includes(t.value))),O=null!==(u=b?.controls?.wpFusion)&&void 0!==u?u:{},x=C(null!==(d=O?.tagsAny)&&void 0!==d?d:[]),M=C(null!==(p=O?.tagsAll)&&void 0!==p?p:[]),V=C(null!==(m=O?.tagsNot)&&void 0!==m?m:[]),R=(e,t)=>{const n=[];0!==t.length&&t.forEach((e=>{n.push(e.value)})),v("wpFusion",(0,i.assign)({...O},{[e]:n}))};let P=(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"control-fields-item"},(0,t.createElement)("div",{className:"components-base-control__label"},(0,t.createInterpolateElement)((0,o.__)("Required Tags (Any)","block-visibility"),{span:(0,t.createElement)("span",{className:"components-base-control__label-hint"})})),(0,t.createElement)(Yi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:w,value:x,placeholder:(0,o.__)("Select Tag…","block-visibility"),onChange:e=>R("tagsAny",e),isMulti:!0}),_&&(0,t.createElement)("div",{className:"components-base-control__help"},(0,o.__)("Only visible to logged-in users with at least one of the selected tags.","block-visibility"))),(0,t.createElement)("div",{className:"control-fields-item"},(0,t.createElement)("div",{className:"components-base-control__label"},(0,t.createInterpolateElement)((0,o.__)("Required Tags (All)","block-visibility"),{span:(0,t.createElement)("span",{className:"components-base-control__label-hint"})})),(0,t.createElement)(Yi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:w,value:M,placeholder:(0,o.__)("Select Tag…","block-visibility"),onChange:e=>R("tagsAll",e),isMulti:!0}),_&&(0,t.createElement)("div",{className:"components-base-control__help"},(0,t.createInterpolateElement)((0,o.__)("Only visible to logged-in users with all of the selected tags.","block-visibility"),{strong:(0,t.createElement)("strong",null)}))));"public"!==E&&"logged-out"!==E||(P=(0,t.createElement)(c.Disabled,null,P));let F=(0,t.createElement)("div",{className:"control-fields-item"},(0,t.createElement)("div",{className:"components-base-control__label"},(0,t.createInterpolateElement)((0,o.__)("Required Tags (Not)","block-visibility"),{span:(0,t.createElement)("span",{className:"components-base-control__label-hint"})})),(0,t.createElement)(Yi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:w,value:V,placeholder:(0,o.__)("Select Tag…","block-visibility"),onChange:e=>R("tagsNot",e),isMulti:!0}),_&&(0,t.createElement)("div",{className:"components-base-control__help"},(0,o.__)("Hide from logged-in users with at least one of the selected tags.","block-visibility")));return"logged-out"===E&&(F=(0,t.createElement)(c.Disabled,null,F)),(0,t.createElement)("div",{className:"controls-panel-item wp-fusion-control"},(0,t.createElement)("h3",{className:"controls-panel-item__header has-icon"},(0,t.createElement)(T,{icon:S}),(0,t.createElement)("span",null,(0,o.__)("WP Fusion","block-visibility")),_&&(0,t.createElement)(te,{message:(0,o.__)("The WP Fusion control allows you to configure block visibility based on WP Fusion tags.","block-visibility"),subMessage:(0,o.__)("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:W.editorWpFusion,position:"bottom center"})),(0,t.createElement)("div",{className:"controls-panel-item__control-fields"},P,F,!k&&(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,o.__)("The WP Fusion control works best in coordination with the User Role control, which has been disabled.","block-visibility"))))}const go=(0,c.withFilters)("blockVisibility.addControlSetControls")((e=>(0,t.createElement)(t.Fragment,null)));function yo(n){var l,r;const{attributes:s,controlSetAtts:a,setControlSetAtts:u,enabledControls:d,variables:p}=n,m=null!==(l=s?.blockVisibility)&&void 0!==l?l:{},b=null!==(r=p?.plugin_variables?.settings_url)&&void 0!==r?r:"",f="inspector-controls-panel";d.forEach((e=>{(m?.hasOwnProperty(e.attributeSlug)||a?.controls.hasOwnProperty(e.attributeSlug)||e?.isDefault)&&(e.isActive=!0)}));const v=d.filter((e=>e.isActive));function h(e,t){var n;const o=null!==(n=a?.controls)&&void 0!==n?n:{},l=(0,i.assign)({...a},{controls:(0,i.assign)({...o},{[e]:t})});u(l)}let g=(0,t.createElement)(t.Fragment,null,(0,t.createElement)(c.Slot,{name:"ControlPanelContainer"}),(0,t.createElement)(c.Slot,{name:"ControlSetControlsTop-"+f}),(0,t.createElement)(lo,e({setControlAtts:h,type:f},n)),(0,t.createElement)(vo,e({setControlAtts:h},n)),(0,t.createElement)(co,e({setControlAtts:h},n)),(0,t.createElement)(so,e({setControlAtts:h},n)),(0,t.createElement)(c.Slot,{name:"ControlSetControlsMiddle-"+f}),(0,t.createElement)(Ji,e({setControlAtts:h},n)),(0,t.createElement)(ho,e({setControlAtts:h},n)),(0,t.createElement)(c.Slot,{name:"ControlSetControlsBottom-"+f}));return m?.hideBlock&&(g=v.length>1?(0,t.createElement)(c.Disabled,{className:"hide-block-enabled"},g):null),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(D,e({activeControls:v,enabledControls:d,setControlSetAtts:u},n)),0!==v.length&&(0,t.createElement)("div",{className:"controls-panel-container"},(0,t.createElement)(ro,n),g,(0,t.createElement)(go,e({uniqueIndex:f,setControlAtts:h},n))),0===d.length&&(0,t.createElement)("div",{className:"controls-panel-notices"},(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,t.createInterpolateElement)((0,o.__)("All visibility controls have been manually disabled. Visit the plugin settings to re-enable.","block-visibility"),{a:(0,t.createElement)("a",{href:b+"&tab=visibility-controls",target:"_blank",rel:"noreferrer"})}))))}const _o=(0,c.withFilters)("blockVisibility.addInspectorControls")((e=>(0,t.createElement)(t.Fragment,null))),ko=(0,l.withSelect)((e=>{var t,n;const{getEntityRecord:i}=e("core"),{getBlocks:o}=e("core/block-editor"),l=null!==(t=i("block-visibility/v1","settings"))&&void 0!==t?t:"fetching";let r=null!==(n=i("block-visibility/v1","variables"))&&void 0!==n?n:"fetching";const s=o().filter((e=>"core/widget-area"===e.name));return"fetching"!==r&&(r={...r,isWidgetEditor:s.length>0}),{settings:l,variables:r}}))((function(n){var l,r,s;const{attributes:a,globallyRestricted:u,name:d,setAttributes:p,settings:m,variables:b,widgetAreaRestricted:f}=n;if("fetching"===m||"fetching"===b)return(0,t.createElement)(O.InspectorControls,{group:"settings"},(0,t.createElement)("div",{className:"block-visibility__controls-panel"},(0,t.createElement)("div",{className:"controls-panel-header"},(0,t.createElement)("h2",null,(0,o.__)("Visibility","block-visibility")),(0,t.createElement)("div",{className:"controls-panel-header__dropdown-menus"},(0,t.createElement)(c.Spinner,null)))));if(f.includes(d)&&b?.isWidgetEditor||u.includes(d))return null;if(!x(m,b)||!g(m,d))return null;let v=C(m,b);const h=null!==(l=m?.plugin_settings?.default_controls)&&void 0!==l?l:[],y=[];(0,i.isEmpty)(h)||v.forEach((e=>{h.includes(e.settingSlug)&&y.push[e.attributeSlug]}));let _=a?.blockVisibility,k=null!==(r=_?.controlSets)&&void 0!==r?r:[];return 0===k.length&&(k=[{id:1,enable:!0,controls:Object.fromEntries(y.map((e=>[e,{}])))}],_=(0,i.assign)({..._},{controlSets:k})),!b?.is_pro||null===(s=m?.visibility_controls?.general?.enable_local_controls)||void 0===s||s||(v=v.filter((e=>"hideBlock"===e.attributeSlug||"visibilityPresets"===e.attributeSlug))),(0,t.createElement)(O.InspectorControls,{group:"settings"},(0,t.createElement)("div",{className:"block-visibility__controls-panel"},(0,t.createElement)(yo,e({controlSets:k,controlSetAtts:k[0],setControlSetAtts:function(e){p({blockVisibility:(0,i.assign)({...a.blockVisibility},{controlSets:[e]})})},enabledControls:v,defaultControls:y},n))),(0,t.createElement)(_o,e({blockAtts:_,enabledControls:v},n)))}));(0,l.dispatch)("core").addEntities([{label:(0,o.__)("Block Visibility Settings","block-visibility"),kind:"block-visibility/v1",name:"settings",baseURL:"/block-visibility/v1/settings"},{label:(0,o.__)("Block Visibility Variables","block-visibility"),kind:"block-visibility/v1",name:"variables",baseURL:"/block-visibility/v1/variables"}]);const Eo=["core/freeform","core/legacy-widget","core/widget-area"],So=["core/html"];(0,r.addFilter)("blocks.registerBlockType","block-visibility/add-attributes",(function(e){if(Eo.includes(e.name))return e;const t=blockVisibilityFullControlMode;let n={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 n=(0,r.applyFilters)("blockVisibility.attributes",n),(t||(0,s.hasBlockSupport)(e,"inserter",!0)&&!e.hasOwnProperty("parent"))&&(e.attributes=(0,i.assign)(e.attributes,n),e.supports=(0,i.assign)(e.supports,{blockVisibility:!0})),e})),(0,r.addFilter)("editor.BlockEdit","block-visibility/add-inspector-controls",(function(n){return i=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(n,i),(0,t.createElement)(ko,e({globallyRestricted:Eo,widgetAreaRestricted:So},i)))}),100),(0,r.addFilter)("blockVisibilityPro.addPresetManagerControlSet","block-visibility/preset-manager-control-set",(function(){return e=>{const{controlSetAtts:n,index:i}=e,o="multiple-"+n?.id;return(0,t.createElement)(c.Fill,{name:"PresetManagerControlSet-"+i},(0,t.createElement)("div",{className:"control-set__controls"},(0,t.createElement)(c.Slot,{name:"ControlSetControlsTop-"+o}),(0,t.createElement)(lo,e),(0,t.createElement)(vo,e),(0,t.createElement)(co,e),(0,t.createElement)(so,e),(0,t.createElement)(c.Slot,{name:"ControlSetControlsMiddle-"+o}),(0,t.createElement)(Ji,e),(0,t.createElement)(ho,e),(0,t.createElement)(c.Slot,{name:"ControlSetControlsBottom-"+o})))}})),(0,a.registerPlugin)("block-visibility-toolbar-options-hide-block",{render:n=>(0,t.createElement)(M,e({globallyRestricted:Eo,widgetAreaRestricted:So},n))})})()})(); \ No newline at end of file +(0,l.__)("%s the selected users.","block-visibility"),g)),(0,t.createElement)(Xi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:v,value:h,placeholder:(0,l.__)("Select Users…","block-visibility"),onChange:e=>(e=>{const t=[];0!==e.length&&e.forEach((e=>{t.push(e.value)})),d("userRole",(0,i.assign)({...u},{restrictedUsers:t}))})(e),isMulti:!0,isLoading:0===v.length}),(0,t.createElement)("div",{className:"control-fields-item__hide-when"},(0,t.createElement)(c.ToggleControl,{label:(0,l.__)("Hide from selected users","block-visibility"),checked:m,onChange:()=>d("userRole",(0,i.assign)({...u},{hideOnRestrictedUsers:!m}))})))}function hl(n){var o,r,s,a,u,d;const{settings:p,variables:b,enabledControls:m,setControlAtts:f,controlSetAtts:v}=n;if(!m.some((e=>"visibility_by_role"===e.settingSlug&&e.isActive)))return null;const h=null!==(o=v?.controls?.userRole)&&void 0!==o?o:{},g=null!==(r=h?.visibilityByRole)&&void 0!==r?r:"public",y=null!==(s=b?.plugin_variables.settings_url)&&void 0!==s?s:"",_=null===(a=p?.plugin_settings?.enable_editor_notices)||void 0===a||a,k=ul(p,"visibility_by_role","enable_user_roles"),E=ul(p,"visibility_by_role","enable_users"),S=ul(p,"visibility_by_role","enable_user_rule_sets");let w=[{label:(0,l.__)("Public","block-visibility"),value:"public"},{label:(0,l.__)("Logged-out","block-visibility"),value:"logged-out"},{label:(0,l.__)("Logged-in","block-visibility"),value:"logged-in"},{label:(0,l.__)("User roles","block-visibility"),value:"user-role"},{label:(0,l.__)("Users","block-visibility"),value:"users"},{label:(0,l.__)("User rule sets","block-visibility"),value:"user-rule-sets"}];const C=[{label:(0,l.__)("Block is visible to everyone.","block-visibility"),value:"public"},{label:(0,l.__)("Block is only visible to logged-out users.","block-visibility"),value:"logged-out"},{label:(0,l.__)("Block is only visible to logged-in users.","block-visibility"),value:"logged-in"}];k||(w=w.filter((e=>"user-role"!==e.value))),E||(w=w.filter((e=>"users"!==e.value))),S||(w=w.filter((e=>"user-rule-sets"!==e.value)));const O=w.filter((e=>e.value===g)),x=null!==(u=C.filter((e=>e.value===g))[0]?.label)&&void 0!==u?u:"",M=S&&"user-rule-sets"===g,V=null!==(d=h?.ruleSets)&&void 0!==d?d:[];return 0===V.length&&V.push({enable:!0,rules:[{field:""}]}),(0,t.createElement)("div",{className:"controls-panel-item user-role-control"},(0,t.createElement)("h3",{className:"controls-panel-item__header has-icon"},(0,t.createElement)("span",null,(0,l.__)("User Role","block-visibility")),_&&(0,t.createElement)(ie,{message:(0,l.__)("The User Role control allows you to configure block visibility based on the current user's role or specific users.","block-visibility"),link:Y.editorUserRole,position:"bottom center"}),M&&(0,t.createElement)("div",{className:"controls-panel-item__header-toolbar"},(0,t.createElement)(c.Button,{icon:T,onClick:()=>(()=>{const e=[...V,{enable:!0,rules:[{field:""}]}];f("userRole",(0,i.assign)({...h},{ruleSets:[...e]}))})(),label:(0,l.__)("Add rule set","block-visibility"),isSmall:!0}))),(0,t.createElement)("div",{className:"controls-panel-item__control-fields"},(0,t.createElement)("div",{className:"control-fields-item"},(0,t.createElement)(Xi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:w,value:O,onChange:e=>f("userRole",(0,i.assign)({...h},{visibilityByRole:e.value}))}),_&&x&&(0,t.createElement)("div",{className:"control-fields-item__help"},x)),"user-role"===g&&k&&(0,t.createElement)(pl,e({variables:b,userRole:h,setControlAtts:f,enableNotices:_},n)),"users"===g&&E&&(0,t.createElement)(vl,e({variables:b,userRole:h,setControlAtts:f,enableNotices:_},n)),"user-rule-sets"===g&&S&&(0,t.createElement)(fl,e({ruleSets:V,setControlAtts:f,userRole:h,variables:b,enableNotices:_},n)),!w.some((e=>e.value===g))&&(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,t.createInterpolateElement)((0,l.__)("The previously selected User Role option has been disabled. Choose another option or update the Visibility Control settings.","block-visibility"),{a:(0,t.createElement)("a",{href:y+"&tab=visibility-controls",target:"_blank",rel:"noreferrer"})}))))}function gl(e){var n,o,r,s,a,u,d,p,b;const{controlSetAtts:m,enabledControls:f,setControlAtts:v,settings:h,variables:g}=e,y=null!==(n=g?.integrations?.wp_fusion?.active)&&void 0!==n&&n;if(!f.some((e=>"wp_fusion"===e.settingSlug&&e?.isActive))||!y)return null;const _=null===(o=h?.plugin_settings?.enable_editor_notices)||void 0===o||o,k=null!==(r=m?.controls.hasOwnProperty("userRole"))&&void 0!==r&&r,E=null!==(s=m?.controls?.userRole?.visibilityByRole)&&void 0!==s?s:"public",w=null!==(a=g?.integrations?.wp_fusion?.tags)&&void 0!==a?a:[],C=e=>w.filter((t=>e.includes(t.value))),O=null!==(u=m?.controls?.wpFusion)&&void 0!==u?u:{},x=C(null!==(d=O?.tagsAny)&&void 0!==d?d:[]),M=C(null!==(p=O?.tagsAll)&&void 0!==p?p:[]),V=C(null!==(b=O?.tagsNot)&&void 0!==b?b:[]),R=(e,t)=>{const n=[];0!==t.length&&t.forEach((e=>{n.push(e.value)})),v("wpFusion",(0,i.assign)({...O},{[e]:n}))};let T=(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"control-fields-item"},(0,t.createElement)("div",{className:"components-base-control__label"},(0,t.createInterpolateElement)((0,l.__)("Required Tags (Any)","block-visibility"),{span:(0,t.createElement)("span",{className:"components-base-control__label-hint"})})),(0,t.createElement)(Xi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:w,value:x,placeholder:(0,l.__)("Select Tag…","block-visibility"),onChange:e=>R("tagsAny",e),isMulti:!0}),_&&(0,t.createElement)("div",{className:"components-base-control__help"},(0,l.__)("Only visible to logged-in users with at least one of the selected tags.","block-visibility"))),(0,t.createElement)("div",{className:"control-fields-item"},(0,t.createElement)("div",{className:"components-base-control__label"},(0,t.createInterpolateElement)((0,l.__)("Required Tags (All)","block-visibility"),{span:(0,t.createElement)("span",{className:"components-base-control__label-hint"})})),(0,t.createElement)(Xi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:w,value:M,placeholder:(0,l.__)("Select Tag…","block-visibility"),onChange:e=>R("tagsAll",e),isMulti:!0}),_&&(0,t.createElement)("div",{className:"components-base-control__help"},(0,t.createInterpolateElement)((0,l.__)("Only visible to logged-in users with all of the selected tags.","block-visibility"),{strong:(0,t.createElement)("strong",null)}))));"public"!==E&&"logged-out"!==E||(T=(0,t.createElement)(c.Disabled,null,T));let P=(0,t.createElement)("div",{className:"control-fields-item"},(0,t.createElement)("div",{className:"components-base-control__label"},(0,t.createInterpolateElement)((0,l.__)("Required Tags (Not)","block-visibility"),{span:(0,t.createElement)("span",{className:"components-base-control__label-hint"})})),(0,t.createElement)(Xi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:w,value:V,placeholder:(0,l.__)("Select Tag…","block-visibility"),onChange:e=>R("tagsNot",e),isMulti:!0}),_&&(0,t.createElement)("div",{className:"components-base-control__help"},(0,l.__)("Hide from logged-in users with at least one of the selected tags.","block-visibility")));return"logged-out"===E&&(P=(0,t.createElement)(c.Disabled,null,P)),(0,t.createElement)("div",{className:"controls-panel-item wp-fusion-control"},(0,t.createElement)("h3",{className:"controls-panel-item__header has-icon"},(0,t.createElement)(I,{icon:S}),(0,t.createElement)("span",null,(0,l.__)("WP Fusion","block-visibility")),_&&(0,t.createElement)(ie,{message:(0,l.__)("The WP Fusion control allows you to configure block visibility based on WP Fusion tags.","block-visibility"),subMessage:(0,l.__)("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:Y.editorWpFusion,position:"bottom center"})),(0,t.createElement)("div",{className:"controls-panel-item__control-fields"},T,P,!k&&(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,l.__)("The WP Fusion control works best in coordination with the User Role control, which has been disabled.","block-visibility"))))}const yl=(0,c.withFilters)("blockVisibility.addControlSetControls")((e=>(0,t.createElement)(t.Fragment,null)));function _l(n){var o,r;const{attributes:s,controlSetAtts:a,setControlSetAtts:u,enabledControls:d,variables:p}=n,b=null!==(o=s?.blockVisibility)&&void 0!==o?o:{},m=null!==(r=p?.plugin_variables?.settings_url)&&void 0!==r?r:"",f="inspector-controls-panel";d.forEach((e=>{(b?.hasOwnProperty(e.attributeSlug)||a?.controls.hasOwnProperty(e.attributeSlug)||e?.isDefault)&&(e.isActive=!0)}));const v=d.filter((e=>e.isActive));function h(e,t){var n;const l=null!==(n=a?.controls)&&void 0!==n?n:{},o=(0,i.assign)({...a},{controls:(0,i.assign)({...l},{[e]:t})});u(o)}let g=(0,t.createElement)(t.Fragment,null,(0,t.createElement)(c.Slot,{name:"ControlPanelContainer"}),(0,t.createElement)(c.Slot,{name:"ControlSetControlsTop-"+f}),(0,t.createElement)(sl,e({setControlAtts:h,type:f},n)),(0,t.createElement)(hl,e({setControlAtts:h},n)),(0,t.createElement)(dl,e({setControlAtts:h},n)),(0,t.createElement)(cl,e({setControlAtts:h},n)),(0,t.createElement)(c.Slot,{name:"ControlSetControlsMiddle-"+f}),(0,t.createElement)(tl,e({setControlAtts:h},n)),(0,t.createElement)(gl,e({setControlAtts:h},n)),(0,t.createElement)(c.Slot,{name:"ControlSetControlsBottom-"+f}));return b?.hideBlock&&(g=v.length>1?(0,t.createElement)(c.Disabled,{className:"hide-block-enabled"},g):null),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(D,e({activeControls:v,enabledControls:d,setControlSetAtts:u},n)),0!==v.length&&(0,t.createElement)("div",{className:"controls-panel-container"},(0,t.createElement)(al,n),g,(0,t.createElement)(yl,e({uniqueIndex:f,setControlAtts:h},n))),0===d.length&&(0,t.createElement)("div",{className:"controls-panel-notices"},(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,t.createInterpolateElement)((0,l.__)("All visibility controls have been manually disabled. Visit the plugin settings to re-enable.","block-visibility"),{a:(0,t.createElement)("a",{href:m+"&tab=visibility-controls",target:"_blank",rel:"noreferrer"})}))))}const kl=(0,c.withFilters)("blockVisibility.addInspectorControls")((e=>(0,t.createElement)(t.Fragment,null))),El=(0,o.withSelect)((e=>{var t,n;const{getEntityRecord:i}=e("core"),{getBlocks:l}=e("core/block-editor"),o=null!==(t=i("block-visibility/v1","settings"))&&void 0!==t?t:"fetching";let r=null!==(n=i("block-visibility/v1","variables"))&&void 0!==n?n:"fetching";const s=l().filter((e=>"core/widget-area"===e.name));return"fetching"!==r&&(r={...r,isWidgetEditor:s.length>0}),{settings:o,variables:r}}))((function(n){var o,r,s;const{attributes:a,globallyRestricted:u,name:d,setAttributes:p,settings:b,variables:m,widgetAreaRestricted:f}=n;if("fetching"===b||"fetching"===m)return(0,t.createElement)(O.InspectorControls,{group:"settings"},(0,t.createElement)("div",{className:"block-visibility__controls-panel"},(0,t.createElement)("div",{className:"controls-panel-header"},(0,t.createElement)("h2",null,(0,l.__)("Visibility","block-visibility")),(0,t.createElement)("div",{className:"controls-panel-header__dropdown-menus"},(0,t.createElement)(c.Spinner,null)))));if(f.includes(d)&&m?.isWidgetEditor||u.includes(d))return null;if(!x(b,m)||!g(b,d))return null;let v=C(b,m);const h=null!==(o=b?.plugin_settings?.default_controls)&&void 0!==o?o:[],y=[];(0,i.isEmpty)(h)||v.forEach((e=>{h.includes(e.settingSlug)&&y.push[e.attributeSlug]}));let _=a?.blockVisibility,k=null!==(r=_?.controlSets)&&void 0!==r?r:[];return 0===k.length&&(k=[{id:1,enable:!0,controls:Object.fromEntries(y.map((e=>[e,{}])))}],_=(0,i.assign)({..._},{controlSets:k})),!m?.is_pro||null===(s=b?.visibility_controls?.general?.enable_local_controls)||void 0===s||s||(v=v.filter((e=>"hideBlock"===e.attributeSlug||"visibilityPresets"===e.attributeSlug))),(0,t.createElement)(O.InspectorControls,{group:"settings"},(0,t.createElement)("div",{className:"block-visibility__controls-panel"},(0,t.createElement)(_l,e({controlSets:k,controlSetAtts:k[0],setControlSetAtts:function(e){p({blockVisibility:(0,i.assign)({...a.blockVisibility},{controlSets:[e]})})},enabledControls:v,defaultControls:y},n))),(0,t.createElement)(kl,e({blockAtts:_,enabledControls:v},n)))}));(0,o.dispatch)("core").addEntities([{label:(0,l.__)("Block Visibility Settings","block-visibility"),kind:"block-visibility/v1",name:"settings",baseURL:"/block-visibility/v1/settings"},{label:(0,l.__)("Block Visibility Variables","block-visibility"),kind:"block-visibility/v1",name:"variables",baseURL:"/block-visibility/v1/variables"}]);const Sl=["core/freeform","core/legacy-widget","core/widget-area"],wl=["core/html"];(0,r.addFilter)("blocks.registerBlockType","block-visibility/add-attributes",(function(e){if(Sl.includes(e.name))return e;const t=blockVisibilityFullControlMode;let n={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 n=(0,r.applyFilters)("blockVisibility.attributes",n),(t||(0,s.hasBlockSupport)(e,"inserter",!0)&&!e.hasOwnProperty("parent"))&&(e.attributes=(0,i.assign)(e.attributes,n),e.supports=(0,i.assign)(e.supports,{blockVisibility:!0})),e})),(0,r.addFilter)("editor.BlockEdit","block-visibility/add-inspector-controls",(function(n){return i=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(n,i),(0,t.createElement)(El,e({globallyRestricted:Sl,widgetAreaRestricted:wl},i)))}),100),(0,r.addFilter)("blockVisibilityPro.addPresetManagerControlSet","block-visibility/preset-manager-control-set",(function(){return e=>{const{controlSetAtts:n,index:i}=e,l="multiple-"+n?.id;return(0,t.createElement)(c.Fill,{name:"PresetManagerControlSet-"+i},(0,t.createElement)("div",{className:"control-set__controls"},(0,t.createElement)(c.Slot,{name:"ControlSetControlsTop-"+l}),(0,t.createElement)(sl,e),(0,t.createElement)(hl,e),(0,t.createElement)(dl,e),(0,t.createElement)(cl,e),(0,t.createElement)(c.Slot,{name:"ControlSetControlsMiddle-"+l}),(0,t.createElement)(tl,e),(0,t.createElement)(gl,e),(0,t.createElement)(c.Slot,{name:"ControlSetControlsBottom-"+l})))}})),(0,a.registerPlugin)("block-visibility-toolbar-options-hide-block",{render:n=>(0,t.createElement)(M,e({globallyRestricted:Sl,widgetAreaRestricted:wl},n))})})()})(); \ No newline at end of file