diff --git a/README.md b/README.md index c3b6de0af..700fd1d56 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,9 @@ You can report security bugs through the Patchstack Vulnerability Disclosure Pro ## ChangeLog +## 3.5.6.1 +* FIX: Compatibility with jetBooking 4.0.0 + ## 3.5.6 * ADD: Bricks builder ajax popup compatibility * ADD: Added aria-label to hidden input in advanced choices block for better accessibility diff --git a/assets/build/editor/form.builder.asset.php b/assets/build/editor/form.builder.asset.php index 14d7dddf1..d5ae08301 100644 --- a/assets/build/editor/form.builder.asset.php +++ b/assets/build/editor/form.builder.asset.php @@ -1 +1 @@ - array('react', 'wp-components', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins'), 'version' => '04c25c7639869450381a'); + array('react', 'wp-components', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins'), 'version' => 'eeb2550dc0a099d1a88e'); diff --git a/assets/build/editor/form.builder.css b/assets/build/editor/form.builder.css index 23fbf2bb0..79a68b3a1 100644 --- a/assets/build/editor/form.builder.css +++ b/assets/build/editor/form.builder.css @@ -1,4 +1,4 @@ -.jfb-progress-type--default{padding-bottom:1.5em;flex-wrap:wrap;display:flex;justify-content:space-between;align-items:center}.jfb-progress-type--default .jet-form-builder-progress-pages__item{display:flex;flex-direction:column;align-items:center;padding:0.5em 2em;position:relative}.jfb-progress-type--default .jet-form-builder-progress-pages__item--circle{width:2.5em;height:2.5em;border:1px solid grey;border-radius:50%;display:flex;justify-content:center;align-items:center}.jfb-progress-type--default .jet-form-builder-progress-pages__item--label{position:absolute;top:100%;max-width:300px;text-align:center;white-space:nowrap}.jfb-progress-type--default .jet-form-builder-progress-pages__item--wrapper.passed-page .jet-form-builder-progress-pages__item--circle{border:2px solid #617BE5}.jfb-progress-type--default .jet-form-builder-progress-pages__item--wrapper.active-page .jet-form-builder-progress-pages__item--circle{border:2px solid #34D7A1}.jfb-progress-type--default .jet-form-builder-progress-pages__item--wrapper{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5em}.jfb-progress-type--default .jet-form-builder-progress-pages__item--wrapper:not(:last-child){flex:1 1}.jfb-progress-type--default .jet-form-builder-progress-pages__item--wrapper.passed-page{color:#617BE5;font-weight:bold}.jfb-progress-type--default .jet-form-builder-progress-pages__item--wrapper.active-page{color:#34D7A1;font-weight:bold}.jfb-progress-type--default .jet-form-builder-progress-pages__separator{flex:1 1;height:1px;background:grey}.jfb-progress-type--default .jet-form-builder-progress-pages__item--wrapper.passed-page .jet-form-builder-progress-pages__item+.jet-form-builder-progress-pages__separator{background-color:#617BE5;height:3px}.jfb-progress-type--default .jet-form-builder-progress-pages__item--wrapper.active-page .jet-form-builder-progress-pages__item+.jet-form-builder-progress-pages__separator{background-color:#34D7A1;height:3px}.jet-form-builder__action-button-wrapper{display:flex;width:100%}.jet-form-builder__submit-wrap{display:flex;align-items:flex-start;flex-direction:row;width:100%}.jet-form-builder{background:#fff;margin:20px 0 0 0;padding:0;border:1px solid #ccd0d4}.jet-form-builder>.components-drop-zone__provider{display:flex;justify-content:space-between;min-height:60vh;flex-wrap:wrap}.jet-form-builder__sidebar{flex:0 0 30%;order:2;border-left:1px solid #e2e4e7}body.post-type-jet-form-builder .editor-styles-wrapper{background:#f4f4f4 !important;padding:0 !important}body.post-type-jet-form-builder .editor-visual-editor__post-title-wrapper{margin:0 0 30px !important;padding:20px 60px;border-bottom:1px solid #e0e0e0;background:#fff}body.post-type-jet-form-builder h1.wp-block.wp-block-post-title{margin:0;padding:0;font-size:30px;line-height:40px;min-height:40px;box-shadow:none;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}body.post-type-jet-form-builder .is-root-container.block-editor-block-list__layout{padding:0 45px}body.post-type-jet-form-builder .wp-block{max-width:100%}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block{margin-block-start:24px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block.jfb-collapse-block-margin{margin-block-start:5px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block.jfb-collapse-block-border{box-shadow:none !important}body.post-type-jet-form-builder .wp-block-column>.block-editor-block-list__block.wp-block:first-child,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block.wp-block-columns>.wp-block-column,body.post-type-jet-form-builder .jet-form-builder-choice--item>.block-editor-block-list__block.wp-block:first-child{margin-block-start:0}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"]{padding:10px 15px !important;box-shadow:0 0 0 1px #e0e0e0;min-height:0;background:#fff}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-base-control__field{margin:0}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-base-control__label>small,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__desc--wrapper>small{display:none}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__desc--wrapper{padding-top:5px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__field-preview label,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__field-preview input,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__field-preview textarea,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__field-preview select{pointer-events:none;opacity:.6}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__field-preview label[type="file"],body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__field-preview input[type="file"],body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__field-preview textarea[type="file"],body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__field-preview select[type="file"]{padding:5px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"].is-selected:after{bottom:0;content:"";left:0;outline-color:var(--wp-admin-theme-color);outline-offset:calc(((-1* var(--wp-admin-border-width-focus))/var(--wp-block-editor-iframe-zoom-out-scale,1))* 1);outline-style:solid;outline-width:calc((var(--wp-admin-border-width-focus)/var(--wp-block-editor-iframe-zoom-out-scale,1))* 1);pointer-events:none;position:absolute;right:0;top:0;z-index:1}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .inside-block-options{background:#f3f3f3;padding:10px 15px;display:flex;flex-direction:column;gap:10px;box-shadow:none;margin:10px 0;align-items:flex-start}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .inside-block-options .components-toggle-control{margin:0}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .inside-block-options .components-base-control{align-self:stretch}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .inside-block-options .components-button.is-secondary{background:#fff}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] svg{max-width:100%}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder{border:none;box-shadow:none;margin:5px 0;background:#f3f3f3;gap:10px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .components-placeholder__fieldset .block-editor-block-variation-picker__variations{display:flex;gap:10px;padding:5px 0 0;align-items:flex-start}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .components-placeholder__fieldset .block-editor-block-variation-picker__variations li{flex:0 0 90px;display:flex;flex-direction:column;align-items:center;justify-content:center;margin:0}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .components-placeholder__fieldset .block-editor-block-variation-picker__variations li .block-editor-block-variation-picker__variation-label{text-align:center;font-size:11px;opacity:.7;padding:3px 0 0 0}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .components-placeholder__fieldset .block-editor-block-variation-picker__variations li button.components-button{width:100%;border:1px solid var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));background:#fff;box-shadow:none;color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));display:flex;align-items:center;justify-content:center;height:auto;height:70px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .components-placeholder__fieldset .block-editor-block-variation-picker__variations li button.components-button .dashicon{padding:0}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .components-placeholder__fieldset .block-editor-block-variation-picker__variations li button.components-button svg{width:32px;height:32px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .components-placeholder__fieldset .block-editor-block-variation-picker__variations li button.components-button svg path{fill:currentColor}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .components-placeholder__fieldset .block-editor-block-variation-picker__variations li button.components-button:hover{background:var(--jet-fb__light-accent-color) !important}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .components-button.is-secondary{background:#fff;padding:4px 15px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .components-button.is-secondary:hover{background:var(--jet-fb__light-accent-color) !important}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder+.block-list-appender{margin-bottom:5px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .jfb-block-variation-picker-toggle .components-flex{gap:5px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .block-editor-block-variation-picker__or{display:flex;align-items:center;height:70px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"]{background:#fff;padding:0 !important}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card{border:none;box-shadow:none;border-radius:0}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__header,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__body{padding:10px 15px;font-size:14px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__header .components-base-control,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__body .components-base-control{margin:0}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__header .components-base-control:last-child,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__body .components-base-control:last-child{padding-bottom:5px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__header .components-base-control .components-base-control__label,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__body .components-base-control .components-base-control__label{margin-bottom:4px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__header .components-base-control+.components-base-control,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__body .components-base-control+.components-base-control{margin-top:10px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__header .components-select-control,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__body .components-select-control{gap:4px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__header .components-base-control__help,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__body .components-base-control__help{margin-top:4px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__body,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-elevation{border-radius:0;box-shadow:none}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/conditional-block"]{padding:10px 30px 30px !important;border:1px solid rgba(0,107,161,0.4);background:var(--jet-fb__light-accent-color)}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/conditional-block"] .block-editor-block-list__block.wp-block[data-type*="jet-forms/"]:not(:first-child){margin-block-start:1.2em}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/repeater-field"]{background:rgb(244,247,255);box-shadow:0 0 0 1px rgba(66,114,249,0.6)}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/repeater-field"] .jet-form-builder-repeater__row{display:flex;gap:10px;margin-top:10px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/repeater-field"] .jet-form-builder-repeater__row .jet-form-builder-repeater__remove{width:36px;height:36px;flex:0 0 36px;display:flex;align-items:center;justify-content:center;pointer-events:none;opacity:.7;font-size:16px;background:#fff}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/repeater-field"] .jet-form-builder-repeater__row .block-editor-inner-blocks{flex:1 1 auto}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/repeater-field"] .jet-form-builder-repeater__row .block-editor-inner-blocks .wp-block{margin-top:0;margin-bottom:0}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/repeater-field"] .jet-form-builder-repeater__row .block-editor-inner-blocks .wp-block+.wp-block:not(.wp-block-column){margin-top:28px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/repeater-field"] .jet-form-builder-repeater__actions{margin-top:20px;pointer-events:none;opacity:.7}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/repeater-field"] .jet-form-builder-repeater__actions .jet-form-builder-repeater__new{background:#fff}.block-editor-block-list__block[data-type="jet-forms/form-break-field"]{max-width:100%;margin-top:28px;margin-bottom:28px}.block-editor-block-list__block[data-type="jet-forms/group-break-field"]{margin-top:28px;margin-bottom:28px}.block-editor-block-list__block[data-type="jet-forms/captcha-container"] .components-base-control{margin-top:10px}.block-editor-block-list__block[data-type="jet-forms/captcha-container"] .components-base-control .components-flex{gap:4px;align-items:center}.jet-form-builder__field-wrap.range-wrap fieldset.components-input-control__backdrop{border:none}.jet-form-builder__field-wrap.range-wrap{width:100%}.jet-form-builder__field-wrap.range-wrap input[type="range"]{margin-right:10px;-webkit-appearance:none;min-height:18px;border:0}.jet-form-builder__field-wrap.range-wrap input[type="range"]:focus{padding:0;background:transparent;border:none;border-radius:0;box-shadow:none;outline:none}.jet-form-builder__field-wrap.range-wrap .range-flex-wrap{display:flex;display:-ms-flexbox;align-items:center}.jet-form-builder__field-wrap.range-wrap .range-flex-wrap .components-input-control{margin-right:auto;flex:1}.jet-form-builder__field-wrap.range-wrap .range-flex-wrap .jet-form-builder__field-value{white-space:nowrap;margin-left:10px;display:flex}.jet-form-builder__field-wrap.range-wrap .range-flex-wrap .components-input-control__container{background-color:rgba(255,255,255,0)}.jet-form-builder__field-wrap.range-wrap input[type="range"]::-webkit-slider-runnable-track{width:100%;height:var(--jet-fb__range-field-range--height,4px);cursor:pointer;background:#e3ddd8;box-shadow:none;border:none}.jet-form-builder__field-wrap.range-wrap input[type="range"]::-moz-range-track{width:100%;height:var(--jet-fb__range-field-range--height,4px);cursor:pointer;background:#e3ddd8;box-shadow:none;border:none}.jet-form-builder__field-wrap.range-wrap input[type="range"]::-ms-track{width:100%;height:var(--jet-fb__range-field-range--height,4px);cursor:pointer;background:#e3ddd8;box-shadow:none;border:none;color:transparent}.jet-form-builder__field-wrap.range-wrap input[type="range"]::-ms-fill-lower{background:transparent}.jet-form-builder__field-wrap.range-wrap input[type="range"]::-ms-fill-upper{background:transparent}.jet-form-builder__field-wrap.range-wrap input[type="range"]::-webkit-slider-thumb{width:var(--jet-fb__range-field-slider--size,18px);height:var(--jet-fb__range-field-slider--size,18px);background:#ccc;border-radius:50%;cursor:pointer;box-shadow:none;border:none;margin-top:calc((var(--jet-fb__range-field-slider--size,18px) - var(--jet-fb__range-field-range--height,4px)) / -2);-webkit-appearance:none}.jet-form-builder__field-wrap.range-wrap input[type="range"]::-moz-range-thumb{width:var(--jet-fb__range-field-slider--size,18px);height:var(--jet-fb__range-field-slider--size,18px);background:#ccc;border-radius:50%;cursor:pointer;box-shadow:none;border:none}.jet-form-builder__field-wrap.range-wrap input[type="range"]::-ms-thumb{width:var(--jet-fb__range-field-slider--size,18px);height:var(--jet-fb__range-field-slider--size,18px);background:#ccc;border-radius:50%;cursor:pointer;box-shadow:none;border:none}.jet-form-builder__field-wrap.range-wrap .components-input-control__backdrop[aria-hidden="true"]{border-width:0}body.wp-admin.buddypress .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-card>div,body.wp-admin.theme-buddyboss-theme .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-card>div{height:auto}.jet-form-edit-modal .components-select-control .components-flex-item,.jet-form-edit-modal .components-select-control .components-flex__item{flex:1}.jet-form-edit-modal .components-base-control__label{flex:1;padding-top:6px;margin-right:6px}.jet-form-edit-modal .components-custom-select-control{flex:3.1}.jet-form-edit-modal .components-custom-select-control__item.is-disabled{background-color:mistyrose}.jet-form-edit-modal .components-custom-select-control__button{width:100%}.jet-form-edit-modal .control-flex .components-base-control__label+*{flex:3.1}.jet-form-edit-modal .control-flex.field-display-grid .components-base-control__field .components-base-control__field{display:grid}.jet-form-edit-modal .jet-user-meta__row{display:flex;gap:4px;padding:1em;border:1px solid #ccc;align-items:center;border-radius:3px;box-shadow:0 2px 4px rgba(22,43,64,.1);justify-content:space-between}.jet-form-edit-modal .jet-user-meta__row:not(:last-child){margin-bottom:1em}.jet-form-edit-modal .jet-user-meta__row .jet-field-map__row-label,.jet-form-edit-modal .jet-user-meta__row .components-base-control__label{flex:1;min-width:150px;overflow:hidden;text-overflow:ellipsis;max-width:none}.jet-form-edit-modal .jet-user-meta__row .components-base-control,.jet-form-edit-modal .jet-user-meta__row .components-text-control__input{flex:1}.jet-form-edit-modal .components-base-control:first-child .components-base-control__field{border-top:none;padding-top:0}.jet-form-edit-modal .jet-post-field-control .components-base-control:nth-child(2) .components-select-control .components-flex__item{display:none}.jet-form-edit-modal .jet-user-meta__row .components-base-control__field{border:none;padding:0;margin:0}.jet-form-edit-modal .components-base-control__field{display:flex;padding:12px 0 5px;border-top:1px solid #ddd;gap:8px}.jet-form-edit-modal .components-base-control__field>.input_with_button{width:55%}.jet-form-edit-modal .input_with_button{display:flex;align-items:center;justify-content:space-between}.jet-form-edit-modal .input_with_button .components-base-control{margin-right:1em}.jet-form-edit-modal .input_with_button select.components-select-control__input{min-width:26em}.jet-form-edit-modal .components-notice{margin:0 0 2em 0}.jet-form-edit-modal .jet-form-editor__macros-wrap{position:relative}.jet-form-edit-modal .jet-form-editor__macros-wrap .components-base-control .components-base-control__field{padding-top:12px;border-top:1px solid #ddd}.jet-form-edit-modal .jfb-conditions-tab-panel .components-tab-panel__tabs{margin-bottom:1em;border-bottom:1px solid #ddd}.jet-form-edit-modal.width-60{width:60vw}.jet-form-edit-modal.width-45{width:45vw}.jet-form-edit-modal.without-margin .components-modal__content:before{display:none}.jet-form-edit-modal__actions{position:sticky;bottom:0;left:0;padding:18px 24px 20px 0;background-color:#fff;width:100%;border-top:1px solid #ddd;z-index:100}.jet-form-edit-modal__content{padding:1em 0 2em 0}.jet-form-edit-modal .components-modal__content{padding-bottom:unset}.jet-form-edit-modal .jet-fb-buttons-flex{display:flex;gap:0.8em;flex-wrap:wrap;justify-content:flex-start}.jet-form-edit-modal .jet-fb-buttons-flex>button{padding:0 4px;border-radius:5px;color:#5c5c5c;font-size:.9em;background-color:#f3f4f5;cursor:pointer;border:0;font-family:monospace}.jet-form-edit-modal .repeater__item__header{padding:0.5em}body.wp-admin.buddypress .jet-form-edit-modal__content,body.wp-admin.theme-buddyboss-theme .jet-form-edit-modal__content{padding:5em 0 2em 0;display:flex}body.wp-admin.buddypress .jet-form-edit-modal__content .components-flex,body.wp-admin.theme-buddyboss-theme .jet-form-edit-modal__content .components-flex{min-height:auto}body.wp-admin.buddypress .jet-form-edit-modal__content .components-flex>*,body.wp-admin.theme-buddyboss-theme .jet-form-edit-modal__content .components-flex>*{min-height:auto}.block-editor-block-toolbar__slot .jet-fb-block-toolbar{display:flex;gap:0.8em}.block-editor-block-toolbar__slot .jet-fb-block-toolbar .jet-input-with-button{position:relative}.block-editor-block-toolbar__slot .jet-fb-block-toolbar .components-base-control{display:flex;align-items:center}.block-editor-block-toolbar__slot .jet-fb-block-toolbar .components-base-control__field{margin-bottom:unset}.jfb-variations-toolbar-toggle .components-base-control__field{margin:0}.jfb-variations-toolbar-toggle .components-toggle-group-control{border-radius:0;border-top:none;border-left:none;border-bottom:none}.jfb-variations-toolbar-toggle .components-toggle-group-control .components-toggle-group-control-option-base{height:42px}.jet-fb-is-thick.is-small{padding:unset;min-width:unset}.jet-fb-is-thick.is-tertiary{box-shadow:none}.jet-fb-button.line-with-input{height:32px}.jet-fb-button.w-100.w-100.w-100{width:100%}.jet-fb-button.jc-center.jc-center.jc-center{justify-content:center}.jet-fb-button.components-button.has-icon{position:relative}.jet-fb-button.components-button.has-icon span.dashicons-randomize[data-count]:after{content:attr(data-count);position:absolute;font-size:0.7em;background-color:var(--wp-admin-theme-color);color:#fff;padding:2px;border-radius:5px;top:0;font-family:monospace}.jet-form-builder__repeater-component-item{margin-bottom:1.5em}.jet-form-builder__repeater-component-item .repeater-item__content{flex:1 1 100%}.jet-form-builder__repeater-component-item .repeater-item__remove{flex:1}.jet-form-builder__repeater-component-item .repeater__item__header .repeater-item__left-heading{max-width:85%;word-break:break-all;display:flex;align-items:center}.jet-form-builder__repeater-component-item .repeater__item__header .components-base-control__field{margin:0;padding:0;border-top:none}.jet-form-builder__repeater-component-item .repeater__item__header .repeater-action-button{margin-right:1em}.jet-form-builder__repeater-component-item .repeater__item__header span.repeater-item-title{font-size:1.1em;font-style:italic;color:#8e8e8e}.jet-form-builder__repeater-component-item .repeater__item__header .jet-fb-toggle-group-control{min-height:auto;height:auto}.jet-form-builder__repeater-component-item .repeater__item__header .jet-fb-toggle-group-control:hover,.jet-form-builder__repeater-component-item .repeater__item__header .jet-fb-toggle-group-control:focus,.jet-form-builder__repeater-component-item .repeater__item__header .jet-fb-toggle-group-control:focus-within{border-color:transparent;box-shadow:none}.jet-fb.flex{display:flex}.jet-fb.flex-center{display:flex;justify-content:center;align-items:center}.jet-fb.flex-dir-column{flex-direction:column}.jet-fb.jc-space-between{justify-content:space-between}.jet-fb.jc-center{justify-content:center}.jet-fb.ai-center{align-items:center}.jet-fb.mb-24{margin-bottom:24px}.jet-fb.mb-05-em{margin-bottom:0.5em}.jet-fb.p-06em{padding:0.6em}.jet-fb.m-unset{margin:unset}.jet-fb.m-top-05em{margin-top:0.5em}.jet-fb.label-reset-margin .components-base-control__label{margin-right:unset}.jet-fb.show{opacity:1}.jet-fb.hide{opacity:0}.jet-fb.container{border:1px solid rgba(0,107,161,0.4);background:rgba(0,107,161,0.05);padding:12px 15px 15px}.jet-fb.p-absolute{position:absolute}.jet-fb.p-relative{position:relative}.jet-fb.w-100{width:100%}.jet-fb.h-100{height:100%}.jet-fb.wh-100{width:100%;height:100%}.jet-fb.gap-1em{gap:1em}.jet-fb.gap-05em{gap:0.5em}.jet-fb.gap-default{gap:8px}.jet-fb [data-title]:before{content:attr(data-title);color:darkgrey;margin-right:0.5em}.jet-fb.clear-control .components-base-control__field{padding-top:unset;border-top:unset;margin:unset;padding-bottom:unset}.jet-fb.label{font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase;box-sizing:border-box;display:block;padding-top:0;padding-bottom:0;max-width:100%;z-index:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jet-fb.with-button{display:flex;justify-content:space-between}.jet-fb.with-button>*:first-child{flex:0.97}.jet-fb.with-button>button{margin-bottom:1.1em}.jet-fb.with-button.clear-label .components-form-token-field__label{display:none}.jet-fb.toggle-toolbar-group.components-toolbar-group .components-base-control__field,.jet-fb.toggle-toolbar-group.components-toolbar .components-base-control__field{margin-bottom:unset}.jet-fb.toggle-toolbar-group.components-toolbar-group .components-base-control,.jet-fb.toggle-toolbar-group.components-toolbar .components-base-control{display:flex;align-items:center}.jet-fb.gap-unset .components-base-control__field{gap:unset}.components-toggle-group-control [aria-checked="true"] svg path{fill:currentColor}.components-toggle-group-control.jfb-toggle-group-control:hover,.components-toggle-group-control.jfb-toggle-group-control:focus,.components-toggle-group-control.jfb-toggle-group-control:focus-within{border-color:transparent;box-shadow:none}.components-toggle-group-control.jfb-toggle-group-control--no-gap .components-button{border-radius:0}.components-toggle-group-control.jfb-toggle-group-control--no-gap .components-button+.components-button{box-shadow:inset 0 1px 0 0 var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9)),inset -1px 0 0 0 var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9)),inset 0 -1px 0 0 var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9)),0 0 0 currentColor}.block-editor-block-inspector__tabs .components-grid.components-tools-panel.components-tools-panel .color-block-support-panel__inner-wrapper{grid-column:1/-1}.block-editor-block-inspector__tabs .components-grid.components-tools-panel.components-tools-panel .color-block-support-panel__inner-wrapper>*:first-child{border-top:1px solid rgba(0,0,0,.1);border-top-left-radius:2px;border-top-right-radius:2px}.post-type-jet-form-builder .editor-post-content-information,.post-type-jet-form-builder .editor-post-last-edited-panel{display:none}.components-panel .jet-form-action{border-radius:0;box-shadow:0 0 0 1px #e0e0e0;border:none}.components-panel .jet-form-action .components-card__body{border-radius:0;box-shadow:none;padding:8px 5px}.components-panel .jet-form-action .components-elevation{display:none}.jfb-actions-grid .jfb-action-grid-item h5{font-size:14px;padding:10px 0 0 0}.jfb-actions-grid .jfb-action-grid-item:hover{border-color:var(--wp-admin-theme-color);background:var(--jet-fb__light-accent-color) !important}:root{--jet-fb__range-field-slider--size:18px;--jet-fb__range-field-range--height:4px;--jet-fb__light-accent-color:rgba(240,246,250)}.block-editor-block-contextual-toolbar:not([data-align="wide"]):not([data-align="full"]) .block-editor-block-mover:not(.is-horizontal).is-visible{opacity:1}.jet-form-builder__header{width:100%;flex:0 0 100%;box-sizing:border-box;display:flex;padding:0 40px 0 6px;justify-content:space-between;align-items:center;border-bottom:1px solid #e2e4e7;height:60px}.jet-form-editor__macros-trigger{height:36px;min-height:36px}.jet-form-editor__macros-inserter{position:absolute;right:1px;top:14px;z-index:20;background:whitesmoke}.jet-form-dynamic-preset{position:relative}.jet-form-dynamic-preset .components-base-control{flex:3}.jet-form-dynamic-preset .components-base-control .components-base-control__field{border-top:unset}.jet-form-dynamic-preset .components-base-control .components-base-control__field textarea{padding-right:36px;width:calc(100% - 31px)}.jet-form-dynamic-preset .components-base-control .components-base-control__field input{padding-right:28px}.jet-form-dynamic-preset .jet-control-with-dynamic .components-base-control__field input{margin-left:6px}.jet-form-dynamic-preset__trigger{width:31px;height:31px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;border-radius:0 2px 2px 0;border:1px solid #757575;margin:26px 0 0 0;cursor:pointer;position:absolute;right:0;top:0;z-index:20}.jet-form-dynamic-preset__trigger.trigger__textarea{margin-top:unset;border-radius:0 0 0 5px;border-width:0 0 1px 1px;background-color:white;top:20px;right:1px}.jet-form-dynamic-preset__trigger.trigger__text-control{margin:0;border-width:0 1px 1px 1px;top:14px;right:0;border-left:unset}.jet-form-dynamic-preset__trigger:not(.trigger__textarea){border-left-width:0}.jet-form-dynamic-preset__trigger:hover svg path{fill:#007cba;fill:var(--wp-admin-theme-color)}.jet-form-dynamic-preset__trigger svg{width:50%}.jet-form-builder__flex-controls{display:flex}.jet-form-builder__flex-controls .repeater-item-column label{flex:0 0 1em;margin-right:1em}.jet-form-builder__flex-controls .repeater-item-column input{margin-right:1em}.field-mime-types.field-mime-types select[multiple]{height:7rem}.field-mime-types.field-mime-types svg{display:none}.jet-user-meta-rows{flex:0 0 40%}.jet-user-fields-map__list{flex:3;padding-top:0.5em;margin-left:-6px}.jet-user-fields-map__list .components-flex__item{flex:2}.jet-form-builder__bottom-line{display:block;white-space:nowrap}.jet-form-builder__bottom-line:before{content:"";position:absolute;bottom:0;left:0;right:0;border-top:1px solid #ccc}.jet-form-builder__bottom-line>span{font-size:13px;position:relative;display:inline-block;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#757575;border-radius:4px;background:#fff;padding:6px 8px;height:24px}.jet-form-builder__field-settings .help-input{margin-bottom:2em;font-size:12px;color:rgb(117,117,117)}.jet-form-edit-modal .jet-post-field-control{display:flex;position:relative}.jet-form-edit-modal .jet-post-field-control .components-base-control__field{padding:0;border:none}.jet-form-edit-modal .jet-post-field-control .components-base-control:nth-child(2){position:absolute;left:25em}.jet-field-map__row-label .fields-map__required{color:red;font-weight:900}.jet-form-load-button.components-button.loading i,.jet-form-validate-button.components-button.loading i{animation:jet-form-editor-spin 2s infinite linear}.jet-form-validate-button.components-button i.dashicons{margin-right:4px}.jet-form-validate-button.components-button i.dashicons:before{content:""}.jet-form-validate-button.components-button.is-valid{color:#46b450;box-shadow:inset 0 0 0 1px #46b450}.jet-form-validate-button.components-button.is-valid:hover:not(:disabled){color:darken(#46b450,10%);box-shadow:inset 0 0 0 1px darken(#46b450,10%)}.jet-form-validate-button.components-button.is-valid i.dashicons:before{content:""}.jet-form-validate-button.components-button.is-invalid i.dashicons:before{content:""}@keyframes jet-form-editor-spin{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.jet-form-edit-modal__content .description-controls{color:#999;display:block;margin-bottom:1.2em}.jet-form-builder-row{display:block}.rtl .jet-form-editor__macros-inserter{left:15px;right:unset}.rtl .jet-form-builder__field-wrap.range-wrap .range-flex-wrap .jet-form-builder__field-value{margin-left:unset;margin-right:10px}.jet-form-edit-modal .input-with-button .components-input-control__container,.jet-form-edit-modal .input-with-button .components-text-control__input{width:30em;margin-right:1em}.jet-form-edit-modal .with-wrap .components-base-control__field{flex-wrap:wrap}select.components-select-control__input.components-select-control__input.components-select-control__input{max-width:100vw;width:100%;line-height:1.5;padding:1px 24px 1px 8px}.jet-form-builder__calculated-field{display:flex;width:100%}.components-text-control__input{margin:unset;box-sizing:border-box;flex:3}.flex-column .components-base-control__field{flex-direction:column}.edit-post-sidebar .components-input-control.components-number-control:not(.components-range-control__number,.components-unit-control){margin-bottom:2em}.jet-label-overflow{overflow:hidden;text-overflow:ellipsis;display:block;white-space:nowrap}.jet-control-clear .components-base-control__field{padding-top:unset;border-top:unset}.jet-control-clear-full{flex:3}.jet-control-clear-full .components-base-control__field{display:block;padding:unset;border-top:unset}.editor-styles-wrapper p.components-base-control__help{font-size:12px;line-height:1.5}.components-button.has-icon:not(.has-text) .dashicon.dashicon{margin:unset}.interface-complementary-area-header.components-panel__header{z-index:100}.jet-form-edit-modal .jet-inline-radio .components-radio-control__option:not(:nth-child(1)):not(:nth-child(2)){margin-left:1em}.jet-control-full{padding:12px 0 5px;border-top:1px solid #ddd}.jet-border-unset.components-base-control div.components-base-control__field.components-base-control__field{border-top:unset}.jet-user-meta__row .components-flex.components-select-control{display:block;flex:1}.jet-modal-fixed-height .jet-form-edit-modal__wrapper{display:flex;flex-direction:column;height:calc(100% - 86px);justify-content:space-between}.jet-custom-select-control{display:flex}.jet-custom-select-control .components-custom-select-control__label{margin-right:7.7em}.jet-margin-bottom-wrapper>div:not(:last-child){margin-bottom:1.2em}.jet-form-builder-row .components-base-control__label{display:flex}.jet-form-builder-row.jet-form-builder-row__flex .components-base-control__label{display:block}.jet-form-builder__desc--wrapper{display:flex}.jet-form-builder-row__flex .jet-form-builder__desc--wrapper{display:block}.jet-form-builder-row__flex--label{flex:1 1 0}.jet-form-builder-row__flex--label .components-base-control__label{margin-bottom:1em}.jet-form-builder-row__flex--content{flex:3 1 0}.jet-form-builder-row__flex--content .components-input-control{display:block}.components-base-control__label .jet-form-builder__label{width:100%;text-transform:none;font-size:16px}.components-base-control__label .jet-form-builder__label>div,.components-base-control__label .jet-form-builder__label>span{display:inline-block}.components-base-control__label .jet-form-builder__label .rich-text::after{content:' '}.jet-form-builder__desc{width:100%;text-transform:none}.jet-form-builder__desc small{font-size:13px}.has-fixed-toolbar .jet-form-toggle-box{padding:1px 12px 0 12px}.jet-form-toggle-box{padding:0 12px}.jet-form-toggle-box .components-clipboard-button.has-icon{position:absolute;right:-8px;padding:0;height:30px}.jet-form-toggle-box input.components-text-control__input{padding-right:2.5em}.jet-form-toggle-box .components-base-control__field{margin:0}.jet-fb-control__input.jet-fb-control__input{max-width:unset;padding:0 24px 0 8px;width:100%}.jet-fb-with-border:not(:last-child){border-bottom:1px solid #ddd;margin-bottom:1.2em;padding-bottom:1.2em}.jet-form-edit-modal div.components-input-control__container{flex:3;margin-left:unset}.jet-form-edit-modal .components-textarea-control__input{flex:3}.jet-form-edit-modal .components-base-control__label+select.components-select-control__input{flex:3;margin-left:6px}.jet-form-builder-row__flex>.components-base-control__field{display:flex}.jet-d-flex-between{display:flex;justify-content:space-between}.jet-d-flex-between>div{flex:0.9}.jet-required-field label.components-base-control__label::after,.jet-required-field label.components-input-control__label::after{content:' *';color:red;font-weight:700}.jet-fb-notice>a{transition:.2s ease-in-out;text-decoration:none;display:flex;gap:0.8em;width:-moz-fit-content;width:fit-content;padding:0.3em;padding-left:unset;background-color:#eee;border-radius:50px;opacity:0.5}.jet-fb-notice>a .dashicons:before{content:"\f14c";border-radius:50px;background:#4272f9;background:radial-gradient(circle,#4272f9 1%,#fff 100%);color:#fff;padding:2px}.jet-fb-notice>a:hover{opacity:1}ul.jet-fb-ul-revert-layer{list-style:revert-layer}ul.jet-fb-ul-revert-layer li{list-style:revert-layer}.edit-post-sidebar .components-panel>.components-panel__body .components-base-control:not(:last-child){margin-bottom:24px} +.jfb-progress-type--default{padding-bottom:1.5em;flex-wrap:wrap;display:flex;justify-content:space-between;align-items:center}.jfb-progress-type--default .jet-form-builder-progress-pages__item{display:flex;flex-direction:column;align-items:center;padding:0.5em 2em;position:relative}.jfb-progress-type--default .jet-form-builder-progress-pages__item--circle{width:2.5em;height:2.5em;border:1px solid grey;border-radius:50%;display:flex;justify-content:center;align-items:center}.jfb-progress-type--default .jet-form-builder-progress-pages__item--label{position:absolute;top:100%;max-width:300px;text-align:center;white-space:nowrap}.jfb-progress-type--default .jet-form-builder-progress-pages__item--wrapper.passed-page .jet-form-builder-progress-pages__item--circle{border:2px solid #617BE5}.jfb-progress-type--default .jet-form-builder-progress-pages__item--wrapper.active-page .jet-form-builder-progress-pages__item--circle{border:2px solid #34D7A1}.jfb-progress-type--default .jet-form-builder-progress-pages__item--wrapper{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5em}.jfb-progress-type--default .jet-form-builder-progress-pages__item--wrapper:not(:last-child){flex:1 1}.jfb-progress-type--default .jet-form-builder-progress-pages__item--wrapper.passed-page{color:#617BE5;font-weight:bold}.jfb-progress-type--default .jet-form-builder-progress-pages__item--wrapper.active-page{color:#34D7A1;font-weight:bold}.jfb-progress-type--default .jet-form-builder-progress-pages__separator{flex:1 1;height:1px;background:grey}.jfb-progress-type--default .jet-form-builder-progress-pages__item--wrapper.passed-page .jet-form-builder-progress-pages__item+.jet-form-builder-progress-pages__separator{background-color:#617BE5;height:3px}.jfb-progress-type--default .jet-form-builder-progress-pages__item--wrapper.active-page .jet-form-builder-progress-pages__item+.jet-form-builder-progress-pages__separator{background-color:#34D7A1;height:3px}.jet-form-builder__action-button-wrapper{display:flex;width:100%}.jet-form-builder__submit-wrap{display:flex;align-items:flex-start;flex-direction:row;width:100%}.jet-form-builder{background:#fff;margin:20px 0 0 0;padding:0;border:1px solid #ccd0d4}.jet-form-builder>.components-drop-zone__provider{display:flex;justify-content:space-between;min-height:60vh;flex-wrap:wrap}.jet-form-builder__sidebar{flex:0 0 30%;order:2;border-left:1px solid #e2e4e7}body.post-type-jet-form-builder .editor-styles-wrapper{background:#f4f4f4 !important;padding:0 !important}body.post-type-jet-form-builder .editor-visual-editor__post-title-wrapper{margin:0 0 30px !important;padding:20px 60px;border-bottom:1px solid #e0e0e0;background:#fff}body.post-type-jet-form-builder h1.wp-block.wp-block-post-title{margin:0;padding:0;font-size:30px;line-height:40px;min-height:40px;box-shadow:none;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}body.post-type-jet-form-builder .is-root-container.block-editor-block-list__layout{padding:0 45px}body.post-type-jet-form-builder .wp-block{max-width:100%}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block{margin-block-start:24px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block.jfb-collapse-block-margin{margin-block-start:5px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block.jfb-collapse-block-border{box-shadow:none !important}body.post-type-jet-form-builder .wp-block-column>.block-editor-block-list__block.wp-block:first-child,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block.wp-block-columns>.wp-block-column,body.post-type-jet-form-builder .jet-form-builder-choice--item>.block-editor-block-list__block.wp-block:first-child{margin-block-start:0}body.post-type-jet-form-builder .jet-form-builder__field-preview>.components-base-control__field label,body.post-type-jet-form-builder .jet-form-builder__field-preview>.components-base-control__field input,body.post-type-jet-form-builder .jet-form-builder__field-preview>.components-base-control__field textarea,body.post-type-jet-form-builder .jet-form-builder__field-preview>.components-base-control__field select{border-color:var(--wp-components-color-gray-600,#949494);border-radius:inherit;border-style:solid;border-width:1px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"]{padding:10px 15px !important;box-shadow:0 0 0 1px #e0e0e0;min-height:0;background:#fff}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-base-control__field{margin:0}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-base-control__label>small,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__desc--wrapper>small{display:none}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__desc--wrapper{padding-top:5px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__field-preview .components-input-control__backdrop{display:none}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__field-preview label,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__field-preview input,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__field-preview textarea,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__field-preview select{pointer-events:none;opacity:.6}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__field-preview label[type="file"],body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__field-preview input[type="file"],body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__field-preview textarea[type="file"],body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .jet-form-builder__field-preview select[type="file"]{padding:5px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"].is-selected:after{bottom:0;content:"";left:0;outline-color:var(--wp-admin-theme-color);outline-offset:calc(((-1* var(--wp-admin-border-width-focus))/var(--wp-block-editor-iframe-zoom-out-scale,1))* 1);outline-style:solid;outline-width:calc((var(--wp-admin-border-width-focus)/var(--wp-block-editor-iframe-zoom-out-scale,1))* 1);pointer-events:none;position:absolute;right:0;top:0;z-index:1}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .inside-block-options{background:#f3f3f3;padding:10px 15px;display:flex;flex-direction:column;gap:10px;box-shadow:none;margin:10px 0;align-items:flex-start}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .inside-block-options .components-toggle-control{margin:0}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .inside-block-options .components-base-control{align-self:stretch}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .inside-block-options .components-button.is-secondary{background:#fff}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] svg{max-width:100%}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder{border:none;box-shadow:none;margin:5px 0;background:#f3f3f3;gap:10px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .components-placeholder__fieldset .block-editor-block-variation-picker__variations{display:flex;gap:10px;padding:5px 0 0;align-items:flex-start}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .components-placeholder__fieldset .block-editor-block-variation-picker__variations li{flex:0 0 90px;display:flex;flex-direction:column;align-items:center;justify-content:center;margin:0}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .components-placeholder__fieldset .block-editor-block-variation-picker__variations li .block-editor-block-variation-picker__variation-label{text-align:center;font-size:11px;opacity:.7;padding:3px 0 0 0}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .components-placeholder__fieldset .block-editor-block-variation-picker__variations li button.components-button{width:100%;border:1px solid var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));background:#fff;box-shadow:none;color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));display:flex;align-items:center;justify-content:center;height:auto;height:70px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .components-placeholder__fieldset .block-editor-block-variation-picker__variations li button.components-button .dashicon{padding:0}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .components-placeholder__fieldset .block-editor-block-variation-picker__variations li button.components-button svg{width:32px;height:32px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .components-placeholder__fieldset .block-editor-block-variation-picker__variations li button.components-button svg path{fill:currentColor}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .components-placeholder__fieldset .block-editor-block-variation-picker__variations li button.components-button:hover{background:var(--jet-fb__light-accent-color) !important}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .components-button.is-secondary{background:#fff;padding:4px 15px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .components-button.is-secondary:hover{background:var(--jet-fb__light-accent-color) !important}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder+.block-list-appender{margin-bottom:5px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .jfb-block-variation-picker-toggle .components-flex{gap:5px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-placeholder .block-editor-block-variation-picker__or{display:flex;align-items:center;height:70px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"]{background:#fff;padding:0 !important}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card{border:none;box-shadow:none;border-radius:0}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__header,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__body{padding:10px 15px;font-size:14px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__header .components-base-control,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__body .components-base-control{margin:0}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__header .components-base-control:last-child,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__body .components-base-control:last-child{padding-bottom:5px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__header .components-base-control .components-base-control__label,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__body .components-base-control .components-base-control__label{margin-bottom:4px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__header .components-base-control+.components-base-control,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__body .components-base-control+.components-base-control{margin-top:10px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__header .components-select-control,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__body .components-select-control{gap:4px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__header .components-base-control__help,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__body .components-base-control__help{margin-top:4px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-card__body,body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/hidden-field"] .components-elevation{border-radius:0;box-shadow:none}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/conditional-block"]{padding:10px 30px 30px !important;border:1px solid rgba(0,107,161,0.4);background:var(--jet-fb__light-accent-color)}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/conditional-block"] .block-editor-block-list__block.wp-block[data-type*="jet-forms/"]:not(:first-child){margin-block-start:1.2em}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/repeater-field"]{background:rgb(244,247,255);box-shadow:0 0 0 1px rgba(66,114,249,0.6)}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/repeater-field"] .jet-form-builder-repeater__row{display:flex;gap:10px;margin-top:10px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/repeater-field"] .jet-form-builder-repeater__row .jet-form-builder-repeater__remove{width:36px;height:36px;flex:0 0 36px;display:flex;align-items:center;justify-content:center;pointer-events:none;opacity:.7;font-size:16px;background:#fff}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/repeater-field"] .jet-form-builder-repeater__row .block-editor-inner-blocks{flex:1 1 auto}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/repeater-field"] .jet-form-builder-repeater__row .block-editor-inner-blocks .wp-block{margin-top:0;margin-bottom:0}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/repeater-field"] .jet-form-builder-repeater__row .block-editor-inner-blocks .wp-block+.wp-block:not(.wp-block-column){margin-top:28px}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/repeater-field"] .jet-form-builder-repeater__actions{margin-top:20px;pointer-events:none;opacity:.7}body.post-type-jet-form-builder .block-editor-block-list__block.wp-block[data-type="jet-forms/repeater-field"] .jet-form-builder-repeater__actions .jet-form-builder-repeater__new{background:#fff}.block-editor-block-list__block[data-type="jet-forms/form-break-field"]{max-width:100%;margin-top:28px;margin-bottom:28px}.block-editor-block-list__block[data-type="jet-forms/group-break-field"]{margin-top:28px;margin-bottom:28px}.block-editor-block-list__block[data-type="jet-forms/captcha-container"] .components-base-control{margin-top:10px}.block-editor-block-list__block[data-type="jet-forms/captcha-container"] .components-base-control .components-flex{gap:4px;align-items:center}.jet-form-builder__field-wrap.range-wrap fieldset.components-input-control__backdrop{border:none}.jet-form-builder__field-wrap.range-wrap{width:100%}.jet-form-builder__field-wrap.range-wrap input[type="range"]{margin-right:10px;-webkit-appearance:none;min-height:18px;border:0}.jet-form-builder__field-wrap.range-wrap input[type="range"]:focus{padding:0;background:transparent;border:none;border-radius:0;box-shadow:none;outline:none}.jet-form-builder__field-wrap.range-wrap .range-flex-wrap{display:flex;display:-ms-flexbox;align-items:center}.jet-form-builder__field-wrap.range-wrap .range-flex-wrap .components-input-control{margin-right:auto;flex:1}.jet-form-builder__field-wrap.range-wrap .range-flex-wrap .jet-form-builder__field-value{white-space:nowrap;margin-left:10px;display:flex}.jet-form-builder__field-wrap.range-wrap .range-flex-wrap .components-input-control__container{background-color:rgba(255,255,255,0)}.jet-form-builder__field-wrap.range-wrap input[type="range"]::-webkit-slider-runnable-track{width:100%;height:var(--jet-fb__range-field-range--height,4px);cursor:pointer;background:#e3ddd8;box-shadow:none;border:none}.jet-form-builder__field-wrap.range-wrap input[type="range"]::-moz-range-track{width:100%;height:var(--jet-fb__range-field-range--height,4px);cursor:pointer;background:#e3ddd8;box-shadow:none;border:none}.jet-form-builder__field-wrap.range-wrap input[type="range"]::-ms-track{width:100%;height:var(--jet-fb__range-field-range--height,4px);cursor:pointer;background:#e3ddd8;box-shadow:none;border:none;color:transparent}.jet-form-builder__field-wrap.range-wrap input[type="range"]::-ms-fill-lower{background:transparent}.jet-form-builder__field-wrap.range-wrap input[type="range"]::-ms-fill-upper{background:transparent}.jet-form-builder__field-wrap.range-wrap input[type="range"]::-webkit-slider-thumb{width:var(--jet-fb__range-field-slider--size,18px);height:var(--jet-fb__range-field-slider--size,18px);background:#ccc;border-radius:50%;cursor:pointer;box-shadow:none;border:none;margin-top:calc((var(--jet-fb__range-field-slider--size,18px) - var(--jet-fb__range-field-range--height,4px)) / -2);-webkit-appearance:none}.jet-form-builder__field-wrap.range-wrap input[type="range"]::-moz-range-thumb{width:var(--jet-fb__range-field-slider--size,18px);height:var(--jet-fb__range-field-slider--size,18px);background:#ccc;border-radius:50%;cursor:pointer;box-shadow:none;border:none}.jet-form-builder__field-wrap.range-wrap input[type="range"]::-ms-thumb{width:var(--jet-fb__range-field-slider--size,18px);height:var(--jet-fb__range-field-slider--size,18px);background:#ccc;border-radius:50%;cursor:pointer;box-shadow:none;border:none}.jet-form-builder__field-wrap.range-wrap .components-input-control__backdrop[aria-hidden="true"]{border-width:0}body.wp-admin.buddypress .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-card>div,body.wp-admin.theme-buddyboss-theme .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] .components-card>div{height:auto}.jet-form-edit-modal .components-select-control .components-flex-item,.jet-form-edit-modal .components-select-control .components-flex__item{flex:1}.jet-form-edit-modal .components-base-control__label{flex:1;padding-top:6px;margin-right:6px}.jet-form-edit-modal .components-custom-select-control{flex:3.1}.jet-form-edit-modal .components-custom-select-control__item.is-disabled{background-color:mistyrose}.jet-form-edit-modal .components-custom-select-control__button{width:100%}.jet-form-edit-modal .control-flex .components-base-control__label+*{flex:3.1}.jet-form-edit-modal .control-flex.field-display-grid .components-base-control__field .components-base-control__field{display:grid}.jet-form-edit-modal .jet-user-meta__row{display:flex;gap:4px;padding:1em;border:1px solid #ccc;align-items:center;border-radius:3px;box-shadow:0 2px 4px rgba(22,43,64,.1);justify-content:space-between}.jet-form-edit-modal .jet-user-meta__row:not(:last-child){margin-bottom:1em}.jet-form-edit-modal .jet-user-meta__row .jet-field-map__row-label,.jet-form-edit-modal .jet-user-meta__row .components-base-control__label{flex:1;min-width:150px;overflow:hidden;text-overflow:ellipsis;max-width:none}.jet-form-edit-modal .jet-user-meta__row .components-base-control,.jet-form-edit-modal .jet-user-meta__row .components-text-control__input{flex:1}.jet-form-edit-modal .components-base-control:first-child .components-base-control__field{border-top:none;padding-top:0}.jet-form-edit-modal .jet-post-field-control .components-base-control:nth-child(2) .components-select-control .components-flex__item{display:none}.jet-form-edit-modal .jet-user-meta__row .components-base-control__field{border:none;padding:0;margin:0}.jet-form-edit-modal .components-base-control__field{display:flex;padding:12px 0 5px;border-top:1px solid #ddd;gap:8px}.jet-form-edit-modal .components-base-control__field>.input_with_button{width:55%}.jet-form-edit-modal .input_with_button{display:flex;align-items:center;justify-content:space-between}.jet-form-edit-modal .input_with_button .components-base-control{margin-right:1em}.jet-form-edit-modal .input_with_button select.components-select-control__input{min-width:26em}.jet-form-edit-modal .components-notice{margin:0 0 2em 0}.jet-form-edit-modal .jet-form-editor__macros-wrap{position:relative}.jet-form-edit-modal .jet-form-editor__macros-wrap .components-base-control .components-base-control__field{padding-top:12px;border-top:1px solid #ddd}.jet-form-edit-modal .jfb-conditions-tab-panel .components-tab-panel__tabs{margin-bottom:1em;border-bottom:1px solid #ddd}.jet-form-edit-modal.width-60{width:60vw}.jet-form-edit-modal.width-45{width:45vw}.jet-form-edit-modal.without-margin .components-modal__content:before{display:none}.jet-form-edit-modal__actions{position:sticky;bottom:0;left:0;padding:18px 24px 20px 0;background-color:#fff;width:100%;border-top:1px solid #ddd;z-index:100}.jet-form-edit-modal__content{padding:1em 0 2em 0}.jet-form-edit-modal .components-modal__content{padding-bottom:unset}.jet-form-edit-modal .jet-fb-buttons-flex{display:flex;gap:0.8em;flex-wrap:wrap;justify-content:flex-start}.jet-form-edit-modal .jet-fb-buttons-flex>button{padding:0 4px;border-radius:5px;color:#5c5c5c;font-size:.9em;background-color:#f3f4f5;cursor:pointer;border:0;font-family:monospace}.jet-form-edit-modal .repeater__item__header{padding:0.5em}body.wp-admin.buddypress .jet-form-edit-modal__content,body.wp-admin.theme-buddyboss-theme .jet-form-edit-modal__content{padding:5em 0 2em 0;display:flex}body.wp-admin.buddypress .jet-form-edit-modal__content .components-flex,body.wp-admin.theme-buddyboss-theme .jet-form-edit-modal__content .components-flex{min-height:auto}body.wp-admin.buddypress .jet-form-edit-modal__content .components-flex>*,body.wp-admin.theme-buddyboss-theme .jet-form-edit-modal__content .components-flex>*{min-height:auto}.block-editor-block-toolbar__slot .jet-fb-block-toolbar{display:flex;gap:0.8em}.block-editor-block-toolbar__slot .jet-fb-block-toolbar .jet-input-with-button{position:relative}.block-editor-block-toolbar__slot .jet-fb-block-toolbar .components-base-control{display:flex;align-items:center}.block-editor-block-toolbar__slot .jet-fb-block-toolbar .components-base-control__field{margin-bottom:unset}.jfb-variations-toolbar-toggle .components-base-control__field{margin:0}.jfb-variations-toolbar-toggle .components-toggle-group-control{border-radius:0;border-top:none;border-left:none;border-bottom:none}.jfb-variations-toolbar-toggle .components-toggle-group-control .components-toggle-group-control-option-base{height:42px}.jet-fb-is-thick.is-small{padding:unset;min-width:unset}.jet-fb-is-thick.is-tertiary{box-shadow:none}.jet-fb-button.line-with-input{height:32px}.jet-fb-button.w-100.w-100.w-100{width:100%}.jet-fb-button.jc-center.jc-center.jc-center{justify-content:center}.jet-fb-button.components-button.has-icon{position:relative}.jet-fb-button.components-button.has-icon span.dashicons-randomize[data-count]:after{content:attr(data-count);position:absolute;font-size:0.7em;background-color:var(--wp-admin-theme-color);color:#fff;padding:2px;border-radius:5px;top:0;font-family:monospace}.jet-form-builder__repeater-component-item{margin-bottom:1.5em}.jet-form-builder__repeater-component-item .repeater-item__content{flex:1 1 100%}.jet-form-builder__repeater-component-item .repeater-item__remove{flex:1}.jet-form-builder__repeater-component-item .repeater__item__header .repeater-item__left-heading{max-width:85%;word-break:break-all;display:flex;align-items:center}.jet-form-builder__repeater-component-item .repeater__item__header .components-base-control__field{margin:0;padding:0;border-top:none}.jet-form-builder__repeater-component-item .repeater__item__header .repeater-action-button{margin-right:1em}.jet-form-builder__repeater-component-item .repeater__item__header span.repeater-item-title{font-size:1.1em;font-style:italic;color:#8e8e8e}.jet-form-builder__repeater-component-item .repeater__item__header .jet-fb-toggle-group-control{min-height:auto;height:auto}.jet-form-builder__repeater-component-item .repeater__item__header .jet-fb-toggle-group-control:hover,.jet-form-builder__repeater-component-item .repeater__item__header .jet-fb-toggle-group-control:focus,.jet-form-builder__repeater-component-item .repeater__item__header .jet-fb-toggle-group-control:focus-within{border-color:transparent;box-shadow:none}.jet-fb.flex{display:flex}.jet-fb.flex-center{display:flex;justify-content:center;align-items:center}.jet-fb.flex-dir-column{flex-direction:column}.jet-fb.jc-space-between{justify-content:space-between}.jet-fb.jc-center{justify-content:center}.jet-fb.ai-center{align-items:center}.jet-fb.mb-24{margin-bottom:24px}.jet-fb.mb-05-em{margin-bottom:0.5em}.jet-fb.p-06em{padding:0.6em}.jet-fb.m-unset{margin:unset}.jet-fb.m-top-05em{margin-top:0.5em}.jet-fb.label-reset-margin .components-base-control__label{margin-right:unset}.jet-fb.show{opacity:1}.jet-fb.hide{opacity:0}.jet-fb.container{border:1px solid rgba(0,107,161,0.4);background:rgba(0,107,161,0.05);padding:12px 15px 15px}.jet-fb.p-absolute{position:absolute}.jet-fb.p-relative{position:relative}.jet-fb.w-100{width:100%}.jet-fb.h-100{height:100%}.jet-fb.wh-100{width:100%;height:100%}.jet-fb.gap-1em{gap:1em}.jet-fb.gap-05em{gap:0.5em}.jet-fb.gap-default{gap:8px}.jet-fb [data-title]:before{content:attr(data-title);color:darkgrey;margin-right:0.5em}.jet-fb.clear-control .components-base-control__field{padding-top:unset;border-top:unset;margin:unset;padding-bottom:unset}.jet-fb.label{font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase;box-sizing:border-box;display:block;padding-top:0;padding-bottom:0;max-width:100%;z-index:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jet-fb.with-button{display:flex;justify-content:space-between}.jet-fb.with-button>*:first-child{flex:0.97}.jet-fb.with-button>button{margin-bottom:1.1em}.jet-fb.with-button.clear-label .components-form-token-field__label{display:none}.jet-fb.toggle-toolbar-group.components-toolbar-group .components-base-control__field,.jet-fb.toggle-toolbar-group.components-toolbar .components-base-control__field{margin-bottom:unset}.jet-fb.toggle-toolbar-group.components-toolbar-group .components-base-control,.jet-fb.toggle-toolbar-group.components-toolbar .components-base-control{display:flex;align-items:center}.jet-fb.gap-unset .components-base-control__field{gap:unset}.components-toggle-group-control [aria-checked="true"] svg path{fill:currentColor}.components-toggle-group-control.jfb-toggle-group-control:hover,.components-toggle-group-control.jfb-toggle-group-control:focus,.components-toggle-group-control.jfb-toggle-group-control:focus-within{border-color:transparent;box-shadow:none}.components-toggle-group-control.jfb-toggle-group-control--no-gap .components-button{border-radius:0}.components-toggle-group-control.jfb-toggle-group-control--no-gap .components-button+.components-button{box-shadow:inset 0 1px 0 0 var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9)),inset -1px 0 0 0 var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9)),inset 0 -1px 0 0 var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9)),0 0 0 currentColor}.block-editor-block-inspector__tabs .components-grid.components-tools-panel.components-tools-panel .color-block-support-panel__inner-wrapper{grid-column:1/-1}.block-editor-block-inspector__tabs .components-grid.components-tools-panel.components-tools-panel .color-block-support-panel__inner-wrapper>*:first-child{border-top:1px solid rgba(0,0,0,.1);border-top-left-radius:2px;border-top-right-radius:2px}.post-type-jet-form-builder .editor-post-content-information,.post-type-jet-form-builder .editor-post-last-edited-panel{display:none}.components-panel .jet-form-action{border-radius:0;box-shadow:0 0 0 1px #e0e0e0;border:none}.components-panel .jet-form-action .components-card__body{border-radius:0;box-shadow:none;padding:8px 5px}.components-panel .jet-form-action .components-elevation{display:none}.jfb-actions-grid .jfb-action-grid-item h5{font-size:14px;padding:10px 0 0 0}.jfb-actions-grid .jfb-action-grid-item:hover{border-color:var(--wp-admin-theme-color);background:var(--jet-fb__light-accent-color) !important}:root{--jet-fb__range-field-slider--size:18px;--jet-fb__range-field-range--height:4px;--jet-fb__light-accent-color:rgba(240,246,250)}.block-editor-block-contextual-toolbar:not([data-align="wide"]):not([data-align="full"]) .block-editor-block-mover:not(.is-horizontal).is-visible{opacity:1}.jet-form-builder__header{width:100%;flex:0 0 100%;box-sizing:border-box;display:flex;padding:0 40px 0 6px;justify-content:space-between;align-items:center;border-bottom:1px solid #e2e4e7;height:60px}.jet-form-editor__macros-trigger{height:36px;min-height:36px}.jet-form-editor__macros-inserter{position:absolute;right:1px;top:14px;z-index:20;background:whitesmoke}.jet-form-dynamic-preset{position:relative}.jet-form-dynamic-preset .components-base-control{flex:3}.jet-form-dynamic-preset .components-base-control .components-base-control__field{border-top:unset}.jet-form-dynamic-preset .components-base-control .components-base-control__field textarea{padding-right:36px;width:calc(100% - 31px)}.jet-form-dynamic-preset .components-base-control .components-base-control__field input{padding-right:28px}.jet-form-dynamic-preset .jet-control-with-dynamic .components-base-control__field input{margin-left:6px}.jet-form-dynamic-preset__trigger{width:31px;height:31px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;border-radius:0 2px 2px 0;border:1px solid #757575;margin:26px 0 0 0;cursor:pointer;position:absolute;right:0;top:0;z-index:20}.jet-form-dynamic-preset__trigger.trigger__textarea{margin-top:unset;border-radius:0 0 0 5px;border-width:0 0 1px 1px;background-color:white;top:20px;right:1px}.jet-form-dynamic-preset__trigger.trigger__text-control{margin:0;border-width:0 1px 1px 1px;top:14px;right:0;border-left:unset}.jet-form-dynamic-preset__trigger:not(.trigger__textarea){border-left-width:0}.jet-form-dynamic-preset__trigger:hover svg path{fill:#007cba;fill:var(--wp-admin-theme-color)}.jet-form-dynamic-preset__trigger svg{width:50%}.jet-form-builder__flex-controls{display:flex}.jet-form-builder__flex-controls .repeater-item-column label{flex:0 0 1em;margin-right:1em}.jet-form-builder__flex-controls .repeater-item-column input{margin-right:1em}.field-mime-types.field-mime-types select[multiple]{height:7rem}.field-mime-types.field-mime-types svg{display:none}.jet-user-meta-rows{flex:0 0 40%}.jet-user-fields-map__list{flex:3;padding-top:0.5em;margin-left:-6px}.jet-user-fields-map__list .components-flex__item{flex:2}.jet-form-builder__bottom-line{display:block;white-space:nowrap}.jet-form-builder__bottom-line:before{content:"";position:absolute;bottom:0;left:0;right:0;border-top:1px solid #ccc}.jet-form-builder__bottom-line>span{font-size:13px;position:relative;display:inline-block;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#757575;border-radius:4px;background:#fff;padding:6px 8px;height:24px}.jet-form-builder__field-settings .help-input{margin-bottom:2em;font-size:12px;color:rgb(117,117,117)}.jet-form-edit-modal .jet-post-field-control{display:flex;position:relative}.jet-form-edit-modal .jet-post-field-control .components-base-control__field{padding:0;border:none}.jet-form-edit-modal .jet-post-field-control .components-base-control:nth-child(2){position:absolute;left:25em}.jet-field-map__row-label .fields-map__required{color:red;font-weight:900}.jet-form-load-button.components-button.loading i,.jet-form-validate-button.components-button.loading i{animation:jet-form-editor-spin 2s infinite linear}.jet-form-validate-button.components-button i.dashicons{margin-right:4px}.jet-form-validate-button.components-button i.dashicons:before{content:""}.jet-form-validate-button.components-button.is-valid{color:#46b450;box-shadow:inset 0 0 0 1px #46b450}.jet-form-validate-button.components-button.is-valid:hover:not(:disabled){color:darken(#46b450,10%);box-shadow:inset 0 0 0 1px darken(#46b450,10%)}.jet-form-validate-button.components-button.is-valid i.dashicons:before{content:""}.jet-form-validate-button.components-button.is-invalid i.dashicons:before{content:""}@keyframes jet-form-editor-spin{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.jet-form-edit-modal__content .description-controls{color:#999;display:block;margin-bottom:1.2em}.jet-form-builder-row{display:block}.rtl .jet-form-editor__macros-inserter{left:15px;right:unset}.rtl .jet-form-builder__field-wrap.range-wrap .range-flex-wrap .jet-form-builder__field-value{margin-left:unset;margin-right:10px}.jet-form-edit-modal .input-with-button .components-input-control__container,.jet-form-edit-modal .input-with-button .components-text-control__input{width:30em;margin-right:1em}.jet-form-edit-modal .with-wrap .components-base-control__field{flex-wrap:wrap}select.components-select-control__input.components-select-control__input.components-select-control__input{max-width:100vw;width:100%;line-height:1.5;padding:1px 24px 1px 8px}.jet-form-builder__calculated-field{display:flex;width:100%}.components-text-control__input{margin:unset;box-sizing:border-box;flex:3}.flex-column .components-base-control__field{flex-direction:column}.edit-post-sidebar .components-input-control.components-number-control:not(.components-range-control__number,.components-unit-control){margin-bottom:2em}.jet-label-overflow{overflow:hidden;text-overflow:ellipsis;display:block;white-space:nowrap}.jet-control-clear .components-base-control__field{padding-top:unset;border-top:unset}.jet-control-clear-full{flex:3}.jet-control-clear-full .components-base-control__field{display:block;padding:unset;border-top:unset}.editor-styles-wrapper p.components-base-control__help{font-size:12px;line-height:1.5}.components-button.has-icon:not(.has-text) .dashicon.dashicon{margin:unset}.interface-complementary-area-header.components-panel__header{z-index:100}.jet-form-edit-modal .jet-inline-radio .components-radio-control__option:not(:nth-child(1)):not(:nth-child(2)){margin-left:1em}.jet-control-full{padding:12px 0 5px;border-top:1px solid #ddd}.jet-border-unset.components-base-control div.components-base-control__field.components-base-control__field{border-top:unset}.jet-user-meta__row .components-flex.components-select-control{display:block;flex:1}.jet-modal-fixed-height .jet-form-edit-modal__wrapper{display:flex;flex-direction:column;height:calc(100% - 86px);justify-content:space-between}.jet-custom-select-control{display:flex}.jet-custom-select-control .components-custom-select-control__label{margin-right:7.7em}.jet-margin-bottom-wrapper>div:not(:last-child){margin-bottom:1.2em}.jet-form-builder-row .components-base-control__label{display:flex}.jet-form-builder-row.jet-form-builder-row__flex .components-base-control__label{display:block}.jet-form-builder__desc--wrapper{display:flex}.jet-form-builder-row__flex .jet-form-builder__desc--wrapper{display:block}.jet-form-builder-row__flex--label{flex:1 1 0}.jet-form-builder-row__flex--label .components-base-control__label{margin-bottom:1em}.jet-form-builder-row__flex--content{flex:3 1 0}.jet-form-builder-row__flex--content .components-input-control{display:block}.components-base-control__label .jet-form-builder__label{width:100%;text-transform:none;font-size:16px}.components-base-control__label .jet-form-builder__label>div,.components-base-control__label .jet-form-builder__label>span{display:inline-block}.components-base-control__label .jet-form-builder__label .rich-text::after{content:' '}.jet-form-builder__desc{width:100%;text-transform:none}.jet-form-builder__desc small{font-size:13px}.has-fixed-toolbar .jet-form-toggle-box{padding:1px 12px 0 12px}.jet-form-toggle-box{padding:0 12px}.jet-form-toggle-box .components-clipboard-button.has-icon{position:absolute;right:-8px;padding:0;height:30px}.jet-form-toggle-box input.components-text-control__input{padding-right:2.5em}.jet-form-toggle-box .components-base-control__field{margin:0}.jet-fb-control__input.jet-fb-control__input{max-width:unset;padding:0 24px 0 8px;width:100%}.jet-fb-with-border:not(:last-child){border-bottom:1px solid #ddd;margin-bottom:1.2em;padding-bottom:1.2em}.jet-form-edit-modal div.components-input-control__container{flex:3;margin-left:unset}.jet-form-edit-modal .components-textarea-control__input{flex:3}.jet-form-edit-modal .components-base-control__label+select.components-select-control__input{flex:3;margin-left:6px}.jet-form-builder-row__flex>.components-base-control__field{display:flex}.jet-d-flex-between{display:flex;justify-content:space-between}.jet-d-flex-between>div{flex:0.9}.jet-required-field label.components-base-control__label::after,.jet-required-field label.components-input-control__label::after{content:' *';color:red;font-weight:700}.jet-fb-notice>a{transition:.2s ease-in-out;text-decoration:none;display:flex;gap:0.8em;width:-moz-fit-content;width:fit-content;padding:0.3em;padding-left:unset;background-color:#eee;border-radius:50px;opacity:0.5}.jet-fb-notice>a .dashicons:before{content:"\f14c";border-radius:50px;background:#4272f9;background:radial-gradient(circle,#4272f9 1%,#fff 100%);color:#fff;padding:2px}.jet-fb-notice>a:hover{opacity:1}ul.jet-fb-ul-revert-layer{list-style:revert-layer}ul.jet-fb-ul-revert-layer li{list-style:revert-layer}.edit-post-sidebar .components-panel>.components-panel__body .components-base-control:not(:last-child){margin-bottom:24px} diff --git a/assets/build/editor/package.asset.php b/assets/build/editor/package.asset.php index 12cb590f3..290d28a71 100644 --- a/assets/build/editor/package.asset.php +++ b/assets/build/editor/package.asset.php @@ -1 +1 @@ - array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '441a2a59f6bc265dd39f'); + array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '918e94a4652ca83bd03d'); diff --git a/assets/build/editor/package.js b/assets/build/editor/package.js index d0307671a..2a19ea5c5 100644 --- a/assets/build/editor/package.js +++ b/assets/build/editor/package.js @@ -1 +1 @@ -(()=>{var e={115:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(6758),l=n.n(r),o=n(935),a=n.n(o)()(l());a.push([e.id,".syma2t4{height:40px;min-height:40px;line-height:1.5;}\n",""]);const i=a},483:(e,t,n)=>{var r=n(4239);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals),(0,n(611).A)("62ebcc8a",r,!1,{})},611:(e,t,n)=>{"use strict";function r(e,t){for(var n=[],r={},l=0;lf});var l="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!l)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o={},a=l&&(document.head||document.getElementsByTagName("head")[0]),i=null,s=0,c=!1,u=function(){},d=null,m="data-vue-ssr-id",p="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function f(e,t,n,l){c=n,d=l||{};var a=r(e,t);return h(a),function(t){for(var n=[],l=0;ln.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(l=0;l{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,l,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var i=0;i0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),l&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=l):u[4]="".concat(l)),t.push(u))}},t}},4023:(e,t,n)=>{var r=n(115);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals),(0,n(611).A)("55433ea3",r,!1,{})},4180:()=>{const e=()=>{const{select:e}=wp.data;return e("core/editor").getEditedPostAttribute("meta")},t=(t,n)=>{const{dispatch:r}=wp.data,{editPost:l}=r("core/editor");l({meta:{...e(),[t]:JSON.stringify(n)}})},n=e=>{const t=[];for(const[n,{active:r=!1}]of Object.entries(e))r&&t.push(+n);return t};wp.domReady((()=>(async()=>{await(async()=>new Promise((e=>{const t=setInterval((()=>{wp.data.select("core/editor").getCurrentPostType()&&(clearInterval(t),e())}),100)})))();let r={},l=[];try{[r={},l=[]]=(()=>{const t=e();let n={},r=[];try{n=JSON.parse(t._jf_gateways)}catch(e){return[]}if(1===n.last_migrate)throw"migrated";try{r=JSON.parse(t._jf_actions)}catch(e){return[n]}return[n,r]})()}catch(e){return}r.last_migrate=1,t("_jf_gateways",r);const o=[];try{o.push(...((e,t)=>{var r,l,o,a;const i=n(null!==(r=e.notifications_success)&&void 0!==r?r:{}),s=n(null!==(l=e.notifications_failed)&&void 0!==l?l:{}),c=n(null!==(o=e.notifications_before)&&void 0!==o?o:{}),u=null!==(a=e.use_success_redirect)&&void 0!==a&&a;let d=!1;if(!(i.length||s.length||c.length||u))throw"nothing_to_migrate";return t.map((e=>{var t;return e.events=null!==(t=e.events)&&void 0!==t?t:[],i.includes(e.id)&&e.events.push("GATEWAY.SUCCESS"),s.includes(e.id)&&e.events.push("GATEWAY.FAILED"),c.includes(e.id)&&e.events.push("DEFAULT.PROCESS"),u&&!d&&"redirect_to_page"===e.type&&(e.events.push("GATEWAY.SUCCESS"),d=!0),e}))})(r,l))}catch(e){return}t("_jf_actions",o)})()))},4239:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(6758),l=n.n(r),o=n(935),a=n.n(o)()(l());a.push([e.id,".sfqmk5y svg{height:24px;width:24px;}\n",""]);const i=a},6758:e=>{"use strict";e.exports=function(e){return e[1]}}},t={};function n(r){var l=t[r];if(void 0!==l)return l.exports;var o=t[r]={id:r,exports:{}};return e[r](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 r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";const e=window.React,{createContext:t}=wp.element,r=t({name:"",data:{},index:0}),l=window.jfb.components,o=window.wp.element,{createContext:a}=wp.element,i=a({actionClick:null,onRequestClose:()=>{}}),{createSlotFill:s}=wp.components,c=s("JFBActionModalFooter"),u=window.wp.components,d=window.wp.i18n,{Slot:m}=c;let{ToggleGroupControl:p,__experimentalToggleGroupControl:f}=wp.components;p=p||f;const h=function({onRequestClose:t,children:n,title:r="",classNames:l=[],className:a="",onUpdateClick:s,onCancelClick:c,updateBtnLabel:f="Update",updateBtnProps:h={},cancelBtnProps:b={},cancelBtnLabel:g="Cancel",fixedHeight:y="",...v}){const w=["jet-form-edit-modal",...l,a],[E,_]=(0,o.useState)(null),C=()=>{s&&s(),_(!0)},k=()=>{c&&c(),_(!1)};let S={};return y&&(S={height:y},w.push("jet-modal-fixed-height")),(0,e.createElement)(u.Modal,{onRequestClose:t,className:w.join(" "),title:r,style:S,...v},!n&&(0,e.createElement)("div",{className:"jet-form-edit-modal__content"},(0,d.__)("Action callback is not found.","jet-form-builder")),n&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"jet-form-edit-modal__wrapper"},(0,e.createElement)(i.Provider,{value:{actionClick:E,onRequestClose:t}},(0,e.createElement)("div",{className:"jet-form-edit-modal__content"},"function"==typeof n&&n({actionClick:E,onRequestClose:t}),"function"!=typeof n&&n))),(0,e.createElement)(m,{fillProps:{updateClick:C,cancelClick:k}},(t=>Boolean(t?.length)?t:(0,e.createElement)(p,{className:"jet-form-edit-modal__actions jfb-toggle-group-control",hideLabelFromVision:!0},(0,e.createElement)(u.Button,{isPrimary:!0,onClick:C,...h},f),(0,e.createElement)(u.Button,{isSecondary:!0,style:{margin:"0 0 0 10px"},onClick:k,...b},g))))))},{RawHTML:b,useContext:g}=wp.element;function y(e,t){return e?.length?e.map((e=>"object"==typeof e?e[t]:e)):[]}const v=(0,window.wp.hooks.applyFilters)("jet.fb.tools.convertSymbols",{checkCyrRegex:/[а-яёїєґі]/i,cyrRegex:/[а-яёїєґі]/gi,charsMap:{а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"io",ж:"zh",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"ts",ч:"ch",ш:"sh",щ:"shch",ы:"y",э:"e",ю:"iu",я:"ia",ї:"i",є:"ie",ґ:"g",і:"i"}});function w(e){return v.checkCyrRegex.test(e)&&(e=e.replace(v.cyrRegex,(function(e){return void 0===v.charsMap[e]?"":v.charsMap[e]}))),e}function E(e){let t=e.toLowerCase();t=t.normalize("NFD").replace(/[\u0300-\u036f]/g,""),t=w(t);const n=t.match(/\b(\w+)\b/g);t="";for(const[e,r]of Object.entries(n)){t+=(0===+e?"":"_")+r;const l=+e+1===n.length;if(t.length>60)return t+(l?"":"__")}return t}function _(...e){const t=[],n=e=>{e.forEach((e=>{if(e&&(Array.isArray(e)&&n(e),"string"==typeof e&&t.push(e.trim()),"object"==typeof e))for(const n in e)e[n]&&t.push((n+"").trim())}))};return n(e),t.join(" ")}function C(e){return null==e||("object"!=typeof e||Array.isArray(e)?"number"==typeof e?0===e:!e?.length:!Object.keys(e)?.length)}const k=class{static withPlaceholder(e,t="--",n=""){return[{label:t,value:n},...e]}static getRandomID(){return Math.floor(8999*Math.random())+1e3}},{select:S}=wp.data,j=function(e){const t=(n,r=null)=>{(n=n||S("core/block-editor").getBlocks()).forEach((n=>{if(e(n,r),n.innerBlocks.length){const e="jet-forms/repeater-field"===n.name?n:r;return void t(n.innerBlocks,e)}if("core/block"!==n.name)return;let l=S("core/block-editor")?.__unstableGetClientIdsTree?.(n.clientId);if(!l?.length)return;const o=l.map((({clientId:e})=>e));l=S("core/block-editor").getBlocksByClientId(o),t(l)}))};t()},{applyFilters:x}=wp.hooks,{select:N}=wp.data,F=function(e=[],t=!1,n=!1,r="default"){let l=[];const o=["submit","form-break","heading","group-break","conditional",...e];return j((e=>{if(e.name.includes("jet-forms/")&&!o.find((t=>e.name.includes(t)))){const t=N("core/blocks").getBlockType(e.name);let{fields:n=[]}=t.jfbResolveBlock.call(e,r);t.hasOwnProperty("jfbGetFields")&&(n=t.jfbGetFields.call(e,r)),l.push(...n.filter((e=>!l.some((({value:t})=>t===e.value)))))}})),l=t?[{value:"",label:t},...l]:l,n?l:x("jet.fb.getFormFieldsBlocks",l,r)},T=function(e=[],t="default"){const n=[],r=F(e,!1,!1,t);return r&&r.forEach((e=>n.push(e.name))),n},{__:I}=wp.i18n,{applyFilters:B}=wp.hooks,{select:A}=wp.data,O=function(e=!1,t=!1,n="default"){const r=["submit","form-break","heading","group-break","conditional"];let l=[];const o=wp.data.select("core/block-editor").getSelectedBlock();return j((e=>{if(e.name.includes("jet-forms/")&&o?.clientId!==e.clientId&&!r.find((t=>e.name.includes(t)))){const t=A("core/blocks").getBlockType(e.name);let{fields:r=[]}=t.jfbResolveBlock.call(e,n);t.hasOwnProperty("jfbGetFields")&&(r=t.jfbGetFields.call(e,n)),l.push(...r.filter((e=>!l.some((({value:t})=>t===e.value)))))}})),l=e?[{value:"",label:e},...l]:l,t?l:B("jet.fb.getFormFieldsBlocks",l,n)},R=function(e){const t=wp.data.select("core/block-editor").getBlock(e);return t?t.innerBlocks:[]},{addFilter:M}=wp.hooks,P=function(e=!1,t=""){const n=window.JetFormEditorData.gateways;if(!e)return n;if(!n[e])return!1;const r=n[e];return e=>r[e]?r[e]:t},G=function(e,t=""){const n=P("labels");return r=>n(e)?n(e)[r]:t},L=function(e,t="cred"){return window.JetFBGatewaysList&&window.JetFBGatewaysList[e]&&window.JetFBGatewaysList[e][t]},D=function(t,n,r="cred"){if(!L(t,r))return null;const l=window.JetFBGatewaysList[t][r];return(0,e.createElement)(l,{...n})},{useState:q,useEffect:V}=wp.element,{useDispatch:J}=wp.data,$=function(e,t={}){const[n,r]=q(!1),l=J(wp.notices.store);return V((()=>{n&&l.createWarningNotice(e,{type:"snackbar",...t})}),[n]),r},{useSelect:U}=wp.data,H=function(e){const t=U((e=>e("core/editor").getEditedPostAttribute("meta")||{}));return JSON.parse(t[e]||"{}")},W=function(e){const{actionClick:t,onRequestClose:n}=(0,o.useContext)(i);(0,o.useEffect)((()=>{t&&e(),null!==t&&n()}),[t])},{applyFilters:z}=wp.hooks,Y=(e,t)=>{t.forEach((t=>{e(t),t.innerBlocks.length&&Y(e,t.innerBlocks)}))},K=window.jfb.actions,X=function(e){const t=e("jet-forms/gateways"),n=t.getCurrentRequestId(),r=t.getGatewaySpecific(),l=t.getScenario(),o=t.getGatewayId(),{id:a="PAY_NOW"}=l,{use_global:i=!1}=r,s=(0,K.globalTab)({slug:o}),c=P("additional")(o),u=e("jet-forms/actions").getLoading(n),d=P("labels"),m=G(o),p=function(e){return d(`${o}.${e}`)};return{gatewayGeneral:t.getGateway(),gatewayRequest:t.getCurrentRequest(),scenarioSource:c[a]||{},currentScenario:l[a]||{},CURRENT_SCENARIO:a,gatewayScenario:l,additionalSourceGateway:c,gatewaySpecific:r,gatewayRequestId:n,loadingGateway:u,getSpecificOrGlobal:(e,t="")=>i?s[e]||t:r[e]||t,globalGatewayLabel:d,specificGatewayLabel:m,customGatewayLabel:p,scenarioLabel:function(e){return p(`scenario.${a}.${e}`)}}},{useSelect:Z}=wp.data,Q=function(){const e=Z((e=>e("jet-forms/events").getAlwaysTypes())),t=[];for(const{value:n}of e)t.push(n);return[...new Set(t)]},{useSelect:ee}=wp.data,te=function(){var e;const t=H("_jf_gateways"),{scenario:n={}}=null!==(e=t[t?.gateway])&&void 0!==e?e:{};return ee((e=>{const r=e("jet-forms/events").getGatewayTypes(),l=[];for(const e of r){const r=!e.gateway||e.gateway===t.gateway,o=!e.scenario||e.scenario===n?.id;r&&o&&l.push(e.value)}return[...new Set(l)]}),[t.gateway,n?.id])},{useSelect:ne}=wp.data,re=function({index:e}){const t=H("_jf_actions"),n=ne((e=>e("jet-forms/actions").getActionsMap()),[]);t.splice(e,1);const r=[];for(const e of t){const t=n?.[e.type]?.provideEvents;if("function"!=typeof t)continue;const{[e.type]:l={}}=e.settings;r.push(...t(l))}return[...new Set(r)]},{useSelect:le}=wp.data,{useSelect:oe}=wp.data,ae=function(e){const t=[...Q(),...te(),...re(e),...le((e=>e("jet-forms/events").getDynamicTypes().map((({value:e})=>e))))];return oe((n=>n("jet-forms/events").filterList(e.type,t)))},{useSelect:ie}=wp.data,{useSelect:se}=wp.data,ce=function(){const[e,t]=se((e=>[e("jet-forms/block-conditions").getOperators(),e("jet-forms/block-conditions").getFunctions()]),[]);return{operators:e,functions:t}},{useBlockEditContext:ue}=wp.blockEditor,de=function(){const{clientId:e}=ue();return t=>t+"-"+e},me=window.wp.blockEditor,pe=window.wp.data,fe=function(e=null){const t=(0,me.useBlockEditContext)();let{clientId:n}=t;e&&(n=e);const r=(0,pe.useSelect)((e=>e("core/block-editor").getBlockAttributes(n)),[n]),{updateBlock:l}=(0,pe.useDispatch)("core/block-editor");return[r,e=>{e="object"==typeof e?e:e(r),e=(0,pe.select)("jet-forms/fields").getSanitizedAttributes(e,t),l(n,{attributes:e})}]},he=function(e){const t=(0,me.useBlockProps)()["data-type"];return(0,pe.useSelect)((n=>!!n("core/blocks").getBlockType(t).attributes[e]),[e,t])},{applyFilters:be}=wp.hooks,ge=function(t){return function(n){return(0,e.createElement)(t,{key:"wrapped-preset-editor",...n,parseValue:()=>{let e={};if("object"==typeof n.value)e={...n.value};else if(n.value&&"string"==typeof n.value)try{if(e=JSON.parse(n.value),"number"==typeof e)throw new Error}catch(t){e={}}return e.jet_preset=!0,e},isVisible:(e,t,n)=>(t.position&&n===t.position||!t.position||"query_var"!==e.from)&&((e,t)=>!t.condition&&!t.custom_condition||(t.custom_condition?"query_var"===t.custom_condition?"post"===e.from&&"query_var"===e.post_from||"user"===e.from&&"query_var"===e.user_from||"term"===e.from&&"query_var"===e.term_from||"query_var"===e.from:be("jet.fb.preset.editor.custom.condition",!1,t.custom_condition,e):!t.condition||e[t.condition.field]===t.condition.value))(e,t),isMapFieldVisible:(e,t,n)=>!((t.condition||t.parent_condition)&&(t.parent_condition&&!t.condition?e[t.parent_condition.field]!==t.parent_condition.value:t.parent_condition&&t.condition?!e.fields_map||!e.fields_map[n]||e.fields_map[n][t.condition.field]!==t.condition.value||e[t.parent_condition.field]!==t.parent_condition.value:!t.parent_condition&&t.condition&&(!e.fields_map||!e.fields_map[n]||e.fields_map[n][t.condition.field]!==t.condition.value))),isCurrentFieldVisible:(e,t,n)=>!((t.condition||t.parent_condition)&&(t.position&&n!==t.position||(t.parent_condition&&!t.condition?e[t.parent_condition.field]!==t.parent_condition.value:t.parent_condition&&t.condition?e["current_field_"+t.condition.field]!==t.condition.value||e[t.parent_condition.field]!==t.parent_condition.value:!t.parent_condition&&t.condition&&e["current_field_"+t.condition.field]!==t.condition.value))),excludeOptions:e=>{const t=[...e];return t.forEach(((e,r)=>{n.excludeSources&&n.excludeSources.includes(e.value)&&t.splice(r,1)})),t}})}},ye=function({data:t,value:n,index:r,onChangeValue:o,isVisible:a,excludeOptions:i=e=>e,position:s}){switch(t.type){case"text":return a(n,t,s)&&(0,e.createElement)("div",{key:"field_"+t.name+r,className:"jet-form-preset__row"},(0,e.createElement)(l.StyledTextControl,{key:t.name+r,label:t.label,value:n[t.name],onChange:e=>{o(e,t.name)}}));case"select":return a(n,t,s)&&(0,e.createElement)("div",{key:"field_"+t.name+r,className:"jet-form-preset__row"},(0,e.createElement)(l.StyledSelectControl,{key:t.name+r,options:i(t.options),label:t.label,value:n[t.name],onChange:e=>{o(e,t.name)}}))}return null};function ve(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var we=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Ee=ve((function(e){return we.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),_e=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),t={},n=[];e.forEach((e=>{(e?e.split(" "):[]).forEach((e=>{if(e.startsWith("atm_")){const[,n]=e.split("_");t[n]=e}else n.push(e)}))}));const r=[];for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.push(t[e]);return r.push(...n),r.join(" ")},Ce=(e,t)=>{const n={};return Object.keys(e).filter((e=>t=>-1===e.indexOf(t))(t)).forEach((t=>{n[t]=e[t]})),n},ke=function(t){let n="";return r=>{const l=(l,o)=>{const{as:a=t,class:i=n}=l;var s;const c=function(e,t){const n=Ce(t,["as","class"]);if(!e){const e="function"==typeof Ee?{default:Ee}:Ee;Object.keys(n).forEach((t=>{e.default(t)||delete n[t]}))}return n}(void 0===r.propsAsIs?!("string"==typeof a&&-1===a.indexOf("-")&&(s=a[0],s.toUpperCase()!==s)):r.propsAsIs,l);c.ref=o,c.className=r.atomic?_e(r.class,c.className||i):_e(c.className||i,r.class);const{vars:u}=r;if(u){const e={};for(const t in u){const n=u[t],o=n[0],a=n[1]||"",i="function"==typeof o?o(l):o;r.name,e[`--${t}`]=`${i}${a}`}const t=c.style||{},n=Object.keys(t);n.length>0&&n.forEach((n=>{e[n]=t[n]})),c.style=e}return t.__wyw_meta&&t!==a?(c.as=a,(0,e.createElement)(t,c)):(0,e.createElement)(a,c)},o=e.forwardRef?(0,e.forwardRef)(l):e=>{const t=Ce(e,["innerRef"]);return l(t,e.innerRef)};return o.displayName=r.name,o.__wyw_meta={className:r.class||n,extends:t},o}};const Se=ke("select")({name:"StyledSelect",class:"syma2t4",propsAsIs:!1}),je=function({id:t,label:n,onChange:r,options:l=[],value:o}){return!C(l)&&(0,e.createElement)(Se,{id:t,className:"components-select-control__input",onChange:e=>{r(e.target.value)},value:o},(0,e.createElement)("option",{key:`${n}-placeholder`,value:""},"--"),l.map(((t,n)=>!C(t.values)&&(0,e.createElement)("optgroup",{key:`${t.label}-${n}`,label:t.label},t.values.map(((t,r)=>(0,e.createElement)("option",{key:`${t.value}-${r}-${n}`,value:t.value,disabled:t.disabled},t.label)))))))};n(4023);const xe=function({data:t,value:n,index:r,currentState:o,onChangeValue:a,isCurrentFieldVisible:i}){switch(t.type){case"text":return i(o,t)&&(0,e.createElement)("div",{key:t.name+r,className:"jet-form-preset__row"},(0,e.createElement)(l.StyledTextControl,{key:"control_"+t.name+r,placeholder:t.label,value:n,onChange:e=>{a(e,"current_field_"+t.name)}}));case"select":return i(o,t)&&(0,e.createElement)("div",{key:t.name+r,className:"jet-form-preset__row"},(0,e.createElement)(l.StyledSelectControl,{key:"control_"+t.name+r,options:t.options,label:t.label,value:n,onChange:e=>{a(e,"current_field_"+t.name)}}));case"custom_select":return i(o,t)&&(0,e.createElement)("div",{key:t.name+r,className:"jet-form-preset__row"},(0,e.createElement)(u.CustomSelectControl,{className:"jet-custom-select-control",label:t.label,options:t.options,onChange:({selectedItem:e})=>{n=e.key,a(n,"current_field_"+t.name)},value:t.options.find((e=>e.key===n))}));case"grouped_select":return i(o,t)&&(0,e.createElement)("div",{key:t.name+r},(0,e.createElement)(l.Label,null,t.label),(0,e.createElement)(je,{options:t.options,value:n,onChange:e=>{a(e,"current_field_"+t.name)}}))}return null},{createContext:Ne}=wp.element,Fe=Ne({});let Te=function({value:t,onChange:n,parseValue:r,excludeOptions:a,isCurrentFieldVisible:i,isVisible:s}){var c,m;const p="dynamic",f=r(t),h=(0,o.useContext)(Fe),b=(e,t)=>{n((()=>JSON.stringify({...f,[t]:e})))};return(0,e.createElement)(l.StyledFlexControl,{direction:"column",gap:4},window.JetFormEditorData.presetConfig.global_fields.map(((t,n)=>(0,e.createElement)(ye,{key:`current_field_${t.name}_${n}`,value:f,index:n,data:t,excludeOptions:a,onChangeValue:b,isVisible:s,position:p}))),window.JetFormEditorData.presetConfig.map_fields.map(((t,n)=>(0,e.createElement)(xe,{key:`current_field_${t.name}_${n}`,currentState:f,value:f["current_field_"+t.name],index:n,data:t,onChangeValue:b,isCurrentFieldVisible:i,position:p}))),h?.show&&(0,e.createElement)(u.ToggleControl,{label:(0,d.__)("Restrict access","jet-form-builder"),help:null===(c=f.restricted)||void 0===c||c?(0,d.__)("Will set default value from preset only for users who allowed to edit this value","jet-form-builder"):(0,d.__)("Always set default value from preset. Make sure it can't be accidentally changed from form Actions","jet-form-builder"),checked:null===(m=f.restricted)||void 0===m||m,onChange:e=>{b(e?void 0:e,"restricted")}}))};Te=ge(Te);const Ie=Te,{SelectControl:Be,TextControl:Ae}=wp.components;class Oe extends wp.element.Component{constructor(e){super(e),this.fieldTypes=this.props.fieldTypes,this.taxonomiesList=this.props.taxonomiesList,this.className=this.props.className,this.metaProp=this.props.metaProp?this.props.metaProp:"post_meta",this.termsProp=this.props.termsProp?this.props.termsProp:"post_terms",this.index=this.props.index,this.init(),this.bindFunctions(),this.state={type:this.getFieldType(this.props.fieldValue)}}bindFunctions(){this.onChangeType=this.onChangeType.bind(this),this.onChangeValue=this.onChangeValue.bind(this)}init(){if(this.id=`inspector-select-control-${this.index}`,this.preparedTaxes=[],this.taxPrefix="jet_tax__",this.taxonomiesList)for(let e=0;e{const t=wp.data.select(De).getBlockType(`jet-forms/${e}`);return{title:t.title,icon:t.icon.src}})))}},Ve=class{constructor(){this.items=[]}push(e){this.items.push(new qe(e))}},{messages:Je}=window.jetFormValidation,{useState:$e}=wp.element,Ue=Je.sort(((e,t)=>e.supported.length-t.supported.length));function He(){const e=new Ve;for(const t of Ue)e.push(t);return e.items}const We=function(e,t){1>=e.label.length||e.name&&"field_name"!==e.name||t({name:E(e.label)})},{BaseControl:ze}=wp.components,{RichText:Ye}=wp.blockEditor;let{__experimentalUseFocusOutside:Ke,useFocusOutside:Xe}=wp.compose;Xe=Xe||Ke;const{__:Ze}=wp.i18n;function Qe(t){return(0,e.createElement)("small",{style:{whiteSpace:"nowrap",padding:"0.2em 0.8em 0 0",color:"#8e8a8a"}},t)}const{Button:et,Popover:tt,PanelBody:nt}=wp.components,{useState:rt}=wp.element,{__:lt}=wp.i18n,{TextControl:ot}=wp.components,at=function({label:t,help:n}){const[r,l]=fe();return he("placeholder")?(0,e.createElement)(ot,{label:null!=t?t:lt("Placeholder","jet-form-builder"),value:r.placeholder,help:null!=n?n:"",onChange:e=>l({placeholder:e})}):null},{__:it}=wp.i18n,{ToggleControl:st}=wp.components,ct=function({label:t,help:n}){const[r,l]=fe();return he("add_prev")?(0,e.createElement)(st,{label:null!=t?t:it("Add Prev Page Button","jet-form-builder"),help:null!=n?n:it('It is recommended to use the "Action Button" block with the "Go to Prev Page" type',"jet-form-builder"),checked:r.add_prev,onChange:e=>l({add_prev:e})}):null},ut=function({children:t,className:n="",style:r={},...l}){return(0,e.createElement)("p",{className:"jet-fb-base-control__help"+(n?` ${n}`:""),style:{fontSize:"12px",fontStyle:"normal",color:"rgb(117, 117, 117)",marginTop:"0px",...r},...l},t)},{useBlockEditContext:dt}=wp.blockEditor,{useSelect:mt}=wp.data,{__:pt}=wp.i18n,ft=function({name:t=!1,children:n=null}){const{name:r}=dt(),l=mt((e=>{var n;if(!1===t)return!1;const l=e("core/blocks").getBlockType(r);return null!==(n=l.attributes[t]?.jfb)&&void 0!==n&&n}),[r,t]);return l?(0,e.createElement)(ut,{className:"jet-fb mb-24"},n&&(0,e.createElement)(e.Fragment,null,n," "),l?.shortcode&&!l.rich&&!n&&pt("You can use shortcodes here.","jet-form-builder"),l?.shortcode&&!l.rich&&n&&pt("You can also use shortcodes here.","jet-form-builder")):Boolean(n)&&(0,e.createElement)(ut,{className:"jet-fb mb-24"},n)},{__:ht}=wp.i18n,{TextControl:bt}=wp.components,gt=function({label:t,help:n}){const[r,l]=fe();return r.add_prev?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bt,{label:null!=t?t:ht("Prev Page Button Label","jet-form-builder"),value:r.prev_label,className:"jet-fb m-unset",onChange:e=>l({prev_label:e})}),(0,e.createElement)(ft,{name:"prev_label"},null!=n?n:"")):null},{__:yt}=wp.i18n,{SelectControl:vt}=wp.components,wt=function({label:t,help:n}){const[r,l]=fe();return he("visibility")?(0,e.createElement)(vt,{options:[{value:"all",label:yt("For all","jet-form-builder")},{value:"logged_id",label:yt("Only for logged in users","jet-form-builder")},{value:"not_logged_in",label:yt("Only for NOT-logged in users","jet-form-builder")}],label:null!=t?t:yt("Field Visibility","jet-form-builder"),help:null!=n?n:"",value:r.visibility,onChange:e=>l({visibility:e})}):null},{__:Et}=wp.i18n,{TextControl:_t}=wp.components,Ct=function({label:t,help:n}){const[r,l]=fe();return(0,e.createElement)(_t,{label:null!=t?t:Et("CSS Class Name","jet-form-builder"),value:r.class_name,help:null!=n?n:"",onChange:e=>l({class_name:e})})},{InspectorAdvancedControls:kt}=wp.blockEditor,{__:St}=wp.i18n,{TextControl:jt}=wp.components;let{__experimentalUseFocusOutside:xt,useFocusOutside:Nt}=wp.compose;Nt=Nt||xt;const Ft=function({label:t,help:n}){const[r,l]=fe(),o=Nt((function(){We(r,l)}));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(jt,{label:null!=t?t:St("Field Label","jet-form-builder"),className:"jet-fb m-unset",value:r.label,onChange:e=>l({label:e}),...o}),(0,e.createElement)(ft,{name:"label"},null!=n?n:""))},Tt={};for(const{id:e,name:t}of window.jetFormActionTypes)Tt[e]=t;const{__:It}=wp.i18n,{TextControl:Bt,Icon:At,Flex:Ot,Tooltip:Rt}=wp.components,{useInstanceId:Mt}=wp.compose,Pt=function t({label:n,help:r}){const[l,o]=fe(),{message:a}=function(){const{clientId:e}=(0,me.useBlockEditContext)(),t=(0,K.useRequestFields)({returnOnEmptyCurrentAction:!1}),{inFormFields:n,hasParent:r,fieldNames:l}=(0,pe.useSelect)((t=>{var n;const r=t("jet-forms/fields").getBlockById(e);return{hasParent:!!r?.parentBlock,fieldNames:null!==(n=r?.fields?.map?.((({value:e})=>e)))&&void 0!==n?n:[],inFormFields:t("jet-forms/fields").isUniqueName(e)}}),[e]);if(!n)return{error:"not_unique_in_fields",message:(0,d.__)("The form field name must be unique. Please change it","jet-form-builder")};if(r)return{};const o=t.find((({value:e})=>l.includes(e)));return o?{error:"not_unique_in_actions",message:o?.from?(0,d.sprintf)((0,d.__)("The %s action already uses this field name. Please change it","jet-form-builder"),Tt[o.from]):(0,d.__)("The form field name must be unique. Please change it","jet-form-builder")}:{}}(),i=Mt(t,"AdvancedInspectorControl");return he("name")?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ot,{align:"center",justify:"flex-start",style:{marginBottom:"8px"}},(0,e.createElement)("label",{htmlFor:i,className:"jet-fb label"},null!=n?n:It("Form field name","jet-form-builder")),!!a&&(0,e.createElement)(Rt,{text:a,delay:200,placement:"top"},(0,e.createElement)(At,{icon:"warning",style:{color:"orange",cursor:"help"}}))),(0,e.createElement)(Bt,{id:i,value:l.name,help:null!=r?r:It("Should contain only lowercase Latin letters, numbers, “-”, or “_”. No spaces allowed.","jet-form-builder"),onChange:e=>o({name:e})})):null},{__:Gt}=wp.i18n,{TextControl:Lt}=wp.components,Dt=function({label:t,help:n}){const[r,l]=fe();return he("desc")?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Lt,{label:null!=t?t:Gt("Field Description","jet-form-builder"),value:r.desc,className:"jet-fb m-unset",onChange:e=>l({desc:e})}),(0,e.createElement)(ft,{name:"desc"},null!=n?n:"")):null},qt=function({value:t,onChange:n,title:r}){const[a,i]=(0,o.useState)(!1),[s,c]=(0,o.useState)(t);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(u.Button,{icon:"database",variant:"tertiary",isSmall:!0,className:"jet-fb-is-thick",onClick:()=>i(!0)}),a&&(0,e.createElement)(u.Modal,{size:"medium",title:null!=r?r:(0,d.__)("Edit Preset","jet-form-builder"),onRequestClose:()=>i(!1),className:l.ModalFooterStyle},(0,e.createElement)(Ie,{key:"dynamic_key_preset",value:s,onChange:c}),(0,e.createElement)(l.StickyModalActions,null,(0,e.createElement)(u.Button,{isPrimary:!0,onClick:()=>{n(s),i(!1)}},(0,d.__)("Update","jet-form-builder")),(0,e.createElement)(u.Button,{isSecondary:!0,onClick:()=>{i(!1)}},(0,d.__)("Cancel","jet-form-builder")))))},{createContext:Vt}=wp.element,Jt=Vt(!1),{useState:$t,useRef:Ut}=wp.element,{Button:Ht,Popover:Wt}=wp.components,zt=function({children:t,...n}){const[r,l]=$t(!1),o=Ut();return(0,e.createElement)(Jt.Provider,{value:{showPopover:r,setShowPopover:l}},(0,e.createElement)(Ht,{ref:o,icon:"admin-tools",variant:"tertiary",isSmall:!0,className:"jet-fb-is-thick",onClick:()=>l((e=>!e)),...n}),r&&(0,e.createElement)(Wt,{anchor:o.current,position:"top-start",noArrow:!1,variant:"toolbar",onFocusOutside:e=>{e.relatedTarget!==o.current&&l(!1)},onClose:()=>l(!1)},t))},{createContext:Yt}=wp.element,Kt=Yt([]),{createContext:Xt}=wp.element,Zt=Xt({name:""});function Qt(){}Qt.prototype={fullName(){},fullHelp(){}};const en=Qt,{useState:tn}=wp.element,{Button:nn}=wp.components,rn=function({current:t,children:n}){const[r,l]=tn(!1);if(!(t instanceof en))return(0,e.createElement)("li",null,(0,e.createElement)(Zt.Provider,{value:t},n));const o=t.fullHelp.bind(t);return(0,e.createElement)("li",null,(0,e.createElement)(Zt.Provider,{value:t},(0,e.createElement)("div",{style:{display:"flex",alignItems:"center",gap:"0.6em"}},(0,e.createElement)(nn,{isSmall:!0,variant:"tertiary",icon:r?"arrow-down":"arrow-right",className:"jet-fb-is-thick",onClick:()=>l((e=>!e))}),n),r&&(0,e.createElement)(o,null)))},{Children:ln,cloneElement:on}=wp.element,{PanelBody:an}=wp.components,sn=function({title:t,items:n,children:r,initialOpen:l}){const o=n.map(((t,n)=>(0,e.createElement)(rn,{key:n,current:t})));return(0,e.createElement)(an,{title:t,initialOpen:l},(0,e.createElement)("ul",{style:{padding:"0 0.5em"}},ln.map(o,(e=>on(e,{},r)))))},{useContext:cn}=wp.element,{__:un}=wp.i18n,dn=function({children:t,fields:n,...r}){var l,o;const a=cn(Kt),i=[...null!==(l=a.beforeFields)&&void 0!==l?l:[],...n,...null!==(o=a.afterFields)&&void 0!==o?o:[]];return i.length||a?.extra?.length||a?.filters?.length?(0,e.createElement)(zt,{...r},Boolean(i.length)&&(0,e.createElement)(sn,{title:un("Fields:","jet-form-builder"),items:i,initialOpen:!0},t),Boolean(a?.extra?.length)&&(0,e.createElement)(sn,{title:un("Extra macros:","jet-form-builder"),items:a.extra},t),Boolean(a?.filters?.length)&&(0,e.createElement)(sn,{title:un("Filters:","jet-form-builder"),items:a.filters},t)):null},{useContext:mn}=wp.element,{Button:pn}=wp.components,fn=function({onClick:t}){const n=mn(Zt),r=n.fullName?n.fullName():`%${n.value}%`,l="function"==typeof n.label?n.label():r;return(0,e.createElement)(pn,{isLink:!0,onClick:()=>t(r)},l)},hn=window.jfb.blocksToActions,bn=function({onClick:t=()=>{},withCurrent:n=!1,...r}){const l=(0,hn.useFields)({excludeCurrent:!n});return(0,e.createElement)(dn,{withCurrent:n,fields:l,...r},(0,e.createElement)(fn,{onClick:t}))},{Flex:gn}=wp.components,yn=function({label:t,children:n,...r}){return(0,e.createElement)(gn,{align:"center",justify:"flex-start",style:{marginBottom:"8px"}},(0,e.createElement)("label",{className:"jet-fb label",...r},t),n)},{FlexItem:vn}=wp.components,{useInstanceId:wn}=wp.compose,En=function({children:t,value:n,label:r,onChangePreset:l=!1,onChangeMacros:o=!1}){const a=wn(vn,"jfb-AdvancedInspectorControl");return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(yn,{label:r,htmlFor:a},!1!==l&&(0,e.createElement)(qt,{value:n,onChange:l}),!1!==o&&(0,e.createElement)(bn,{onClick:o})),"function"==typeof t?t({instanceId:a}):t)};function _n(){en.call(this)}_n.prototype=Object.create(en.prototype),_n.prototype.isServerSide=!1,_n.prototype.isClientSide=!1,_n.prototype.name="",_n.prototype.namespace="CT",_n.prototype.help=null,_n.prototype.fullHelp=function(){return this.help},_n.prototype.fullName=function(){return`%${this.namespace}::${this.name}%`};const Cn=_n,{useSelect:kn}=wp.data,{__:Sn}=wp.i18n,jn=new Cn;jn.fullName=()=>"%this%",jn.fullHelp=()=>Sn("Returns current field value","jet-form-builder");const xn=function({children:t,withThis:n=!1}){const r=kn((e=>e("jet-forms/macros").getClientMacros()),[]),l=kn((e=>e("jet-forms/macros").getClientFilters()),[]),o=n?{extra:r,afterFields:[jn],filters:l}:{extra:r,filters:l};return(0,e.createElement)(Kt.Provider,{value:o},t)};function Nn(e,t,n){const r=n.selectionStart,l=n.selectionEnd;(e=null!=e?e:"").length||(t=`'${t}'`);let o=e.slice(0,r);const a=e.slice(l);return o+=t,setTimeout((()=>{n.focus(),n.selectionStart=o.length,n.selectionEnd=o.length})),o+a}const{useRef:Fn}=wp.element,Tn=function(e){var t;const[n,r]=fe(),l=null!==(t=n[e])&&void 0!==t?t:"",o=Fn();return[o,t=>{r({[e]:Nn(l,t,o.current)})}]},{__:In}=wp.i18n,{TextControl:Bn}=wp.components,An=function({label:t,help:n,hasMacro:r=!0}){const[l,o]=fe(),[a,i]=Tn("default");return he("default")?(0,e.createElement)(Fe.Provider,{value:{show:!0}},(0,e.createElement)(xn,null,(0,e.createElement)(En,{value:l.default,label:null!=t?t:In("Default Value","jet-form-builder"),onChangePreset:e=>o({default:e}),onChangeMacros:!!r&&i},(({instanceId:t})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Bn,{ref:a,id:t,value:l.default,className:"jet-fb m-unset",onChange:e=>o({default:e})}),(0,e.createElement)(ft,{name:"default"},null!=n?n:"")))))):null},{PanelBody:On}=wp.components,{__:Rn}=wp.i18n,{BlockControls:Mn}=wp.blockEditor,{useCopyToClipboard:Pn}=wp.compose,{TextControl:Gn,ToolbarGroup:Ln,ToolbarItem:Dn,ToolbarButton:qn}=wp.components,Vn=function({children:t=null}){const n=de(),[r,l]=fe(),o=$(`Copied "${r.name}" to clipboard.`),a=Pn(r.name,(()=>o(!0)));return(0,e.createElement)(Mn,{key:n("ToolBarFields-BlockControls")},(0,e.createElement)(Ln,{key:n("ToolBarFields-ToolbarGroup"),className:"jet-fb-block-toolbar"},(0,e.createElement)(qn,{isSmall:!0,icon:"admin-page",showTooltip:!0,shortcut:"Copy name",ref:a}),(0,e.createElement)(Dn,{as:Gn,value:r.name,onChange:e=>l({name:e})}),t))},{__:Jn}=wp.i18n,{ToolbarButton:$n}=wp.components,{BlockControls:Un}=wp.blockEditor,{SVG:Hn,Path:Wn}=wp.primitives,zn=function(){const[t,n]=fe();return he("required")?(0,e.createElement)(Un,{group:"block"},(0,e.createElement)($n,{icon:(0,e.createElement)(Hn,{xmlns:"http://www.w3.org/2000/svg",width:"24px",height:"24px",viewBox:"0 0 24 24",fill:"none"},(0,e.createElement)(Wn,{d:"M12 4L12 20",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,e.createElement)(Wn,{d:"M17.3137 6.00024L6.00001 17.314",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,e.createElement)(Wn,{d:"M20 12L4 12",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,e.createElement)(Wn,{d:"M17.3137 17.3137L6.00001 6.00001",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),title:t.required?Jn("Click to make this field optional","jet-form-builder"):Jn("Click to make this field required","jet-form-builder"),onClick:()=>n({required:!t.required}),isActive:t.required})):null},{__:Yn}=wp.i18n,{PanelBody:Kn}=wp.components,{applyFilters:Xn}=wp.hooks,{useBlockProps:Zn}=wp.blockEditor,{applyFilters:Qn}=wp.hooks,er=()=>Qn("jet.fb.register.fields.controls",{}),tr=window.wp.compose,nr=(0,tr.compose)((0,pe.withSelect)(X))((function({initialLabel:t="Valid",label:n="InValid",apiArgs:r={},gatewayRequestId:l,loadingGateway:o,onLoading:a=()=>{},onSuccess:i=()=>{},onFail:s=()=>{},isHidden:c=!1}){return(0,e.createElement)(K.FetchApiButton,{id:l,loadingState:o,initialLabel:t,label:n,apiArgs:r,onFail:s,onLoading:a,onSuccess:i,isHidden:c})})),rr="CLEAR_GATEWAY",lr="CLEAR_SCENARIO",or="SET_CURRENT_GATEWAY_SCENARIO",ar="SET_CURRENT_GATEWAY",ir="SET_CURRENT_GATEWAY_SPECIFIC",sr="SET_CURRENT_GATEWAY_INNER",cr="SET_CURRENT_REQUEST",ur="SET_CURRENT_SCENARIO",dr="REGISTER_EVENT_TYPE",mr="HARD_SET_CURRENT_GATEWAY",pr="HARD_SET_CURRENT_GATEWAY_SPECIFIC",fr={getCurrentRequestId:e=>e.currentRequest.id,getCurrentRequest:e=>e.currentRequest,getScenario:e=>e.currentScenario,getScenarioId:e=>e.currentScenario?.id,getGatewayId:e=>e.currentGateway?.gateway,getGateway:e=>e.currentGateway,getEventTypes:e=>e.eventTypes},hr={...fr,getGatewaySpecific:e=>e.currentGateway[fr.getGatewayId(e)]||{}},br={[rr]:e=>({...e,currentGateway:{}}),[lr]:e=>({...e,currentScenario:{}}),[or]:(e,t)=>({...e,currentScenario:{...e.currentScenario,...t.item||{}}}),[ar]:(e,t)=>({...e,currentGateway:{...e.currentGateway,...t.item}}),[ir]:(e,t)=>({...e,currentGateway:{...e.currentGateway,[e.currentGateway.gateway]:{...hr.getGatewaySpecific(e),...t.item}}}),[sr]:(e,t)=>{const{key:n,value:r}=t.item;return{...e,currentGateway:{...e.currentGateway,[n]:{...e.currentGateway[n]||{},...r}}}},[cr]:(e,t)=>{const n=[hr.getGatewayId(e),t.item?.id].filter((e=>e));return t.item.id=n.join("/"),{...e,currentRequest:t.item}},[ur]:(e,t)=>({...e,currentScenario:{...e.currentScenario,[e.currentScenario?.id]:{...e.currentScenario[e.currentScenario?.id]||{},...t.item||{}}}}),[mr]:(e,t)=>(t.item&&(e.currentGateway[t.item]=t.value),{...e}),[pr]:(e,t)=>(t.item&&e.currentGateway?.gateway&&(e.currentGateway[e.currentGateway?.gateway]={},e.currentGateway[e.currentGateway?.gateway][t.item]=t.value),{...e}),[dr]:(e,t)=>{var n,r;const l={...t.item,gateway:null!==(n=t.item?.gateway)&&void 0!==n?n:e.currentGateway?.gateway,scenario:null!==(r=t.item?.scenario)&&void 0!==r?r:e.currentScenario?.id};return e.eventTypes.push(l),e}},gr={currentRequest:{id:-1},currentGateway:{},currentScenario:{},eventTypes:[]},yr={clearGateway:()=>({type:rr}),clearScenario:()=>({type:lr}),setRequest:e=>({type:cr,item:e}),setGateway:e=>({type:ar,item:e}),setGatewayInner:e=>({type:sr,item:e}),setGatewaySpecific:e=>({type:ir,item:e}),setScenario:e=>({type:or,item:e}),setCurrentScenario:e=>({type:ur,item:e}),registerEventType:e=>({type:dr,item:e}),hardSetGateway:(e,t="")=>({type:mr,item:e,value:t}),hardSetGatewaySpecific:(e,t="")=>({type:pr,item:e,value:t})},{createReduxStore:vr}=wp.data,wr=vr("jet-forms/gateways",{reducer:function(e=gr,t){const n=br[t?.type];return n?n(e,t):e},actions:yr,selectors:hr}),Er="REGISTER",_r="UNREGISTER",Cr="LOCK_ACTIONS",kr="CLEAR_DYNAMIC_EVENTS",Sr={getTypeIndex:(e,t)=>e.types.findIndex((e=>e.value===t)),getTypes:e=>e.types,getGatewayTypes:e=>e.types.filter((e=>"gateway"in e)),getAlwaysTypes:e=>e.types.filter((e=>"always"in e)),getDynamicTypes:e=>e.types.filter((({isDynamic:e})=>e)),getType(e,t){const n=Sr.getTypeIndex(e,t);return e.types[n]},getUnsupported(e,t){var n;const r=null!==(n=e.lockedActions[t])&&void 0!==n&&n;return!1===r?[]:r.unsupported},getSupported(e,t){var n;const r=null!==(n=e.lockedActions[t])&&void 0!==n&&n;return!1===r?[]:r.supported},isValid(e,t,n){const r=Sr.getUnsupported(e,t);if(r.length&&r.includes(n))return!1;const l=Sr.getSupported(e,t);return!l.length||l.includes(n)},filterList:(e,t,n)=>n.filter((n=>Sr.isValid(e,t,n))),getHelpMap(e){const t={};for(const{value:n,help:r}of e.types)t[n]=r;return t}},jr={...Sr},xr={[Er](e,t){const{types:n}=e;for(const r of t.items){r.title=r.label;const t=jr.getTypeIndex(e,r.value);-1===t?n.push({...r}):n[t]={...r}}return{...e,types:n}},[Cr](e){for(const{id:n,self:r}of window.jetFormActionTypes){var t;const l=null!==(t=window[r])&&void 0!==t&&t;if(!1===l)continue;const{__unsupported_events:o,__supported_events:a}=l,i={unsupported:e.types.filter((({self:e})=>o.includes(e))).map((({value:e})=>e)),supported:e.types.filter((({self:e})=>a.includes(e))).map((({value:e})=>e))};(i.supported.length||i.unsupported.length)&&(e.lockedActions[n]=i)}return e},[_r](e,t){const{types:n}=t;return e.types=e.types.filter((({value:e})=>!n.includes(e))),e},[kr]:e=>(e.types=e.types.filter((({isDynamic:e=!1})=>!e)),e)},Nr={types:[],labels:{},lockedActions:{}},Fr={register:e=>({type:Er,items:e}),lockActions:()=>({type:Cr}),unRegister:e=>({type:_r,types:e}),clearDynamicEvents:()=>({type:kr})},{createReduxStore:Tr}=wp.data,Ir=Tr("jet-forms/events",{reducer:function(e=Nr,t){const n=xr[t?.type];return n?n(e,t):e},actions:Fr,selectors:jr}),Br="REGISTER",Ar="ADD_RENDER_STATE",Or="ADD_RENDER_STATES",Rr="DELETE_RENDER_STATES",{doAction:Mr}=wp.hooks,Pr={...{[Br](e,t){const{operators:n,functions:r,render_states:l}=t.items;return e.operators=[...n],e.functions=[...r],e.renderStates=[...l],Mr("jet.fb.change.blockConditions.renderState",e.renderStates),e},[Ar]:(e,t)=>(e.renderStates.push(t.item),Mr("jet.fb.change.blockConditions.renderState",e.renderStates),e),[Or](e,t){for(const n of t.items)e.renderStates.push(n);return Mr("jet.fb.change.blockConditions.renderState",e.renderStates),e},[Rr](e,t){const n=Array.isArray(t.items)?[...t.items]:[t.items];return e.renderStates=e.renderStates.filter((({value:e})=>!n.includes(e))),Mr("jet.fb.change.blockConditions.renderState",e.renderStates),e}}},{__:Gr}=wp.i18n,Lr=function(e,t="code"){var n;if(!function(e){let t;try{t=JSON.parse(e)}catch(e){return!1}return!!t?.jet_preset}(e=null!=e?e:""))return e;const r=JSON.parse(e),l=Gr("Preset from","jet-form-builder"),o=null!==(n=r?.from)&&void 0!==n?n:"(empty)";let a;switch(t){case"code":a=`${o}`;break;case"b":a=`${o}`}return[l,a].join(" ")},{select:Dr}=wp.data,{__:qr}=wp.i18n,Vr=function(e){const t=Dr("jet-forms/block-conditions").getOperator(e?.operator);return t?[`${e?.field||"(no field)"}`,t.label].join(" "):""},Jr={functions:[],operators:[],conditionReaders:{default(e){const t=Dr("jet-forms/block-conditions").getOperator(e?.operator);if(!t)return"";const n=e?.field||"(no field)",r=Lr(e.value,"b")||"(no value)";return[`${n}`,t.label,`${r}`].join(" ")},empty:Vr,not_empty:Vr,render_state(e){var t;const n=(null!==(t=e?.render_state)&&void 0!==t?t:[]).map((e=>`${e}`));return[1===n.length?qr("Is render state","jet-form-builder"):qr("One of the render states","jet-form-builder"),n.join(", ")].join(": ")}},renderStates:[]},$r={register:e=>({type:Br,items:e}),addRenderState:e=>({type:Ar,item:e}),addRenderStates:e=>({type:Or,items:e}),deleteRenderStates:e=>({type:Rr,items:e})},Ur={getFunctions:e=>e.functions,getOperators:e=>e.operators,getRenderStates:e=>e.renderStates,getSwitchableRenderStates:e=>e.renderStates.filter((({is_custom:e=!1,can_be_switched:t=!1})=>e||t)),getCustomRenderStates:e=>e.renderStates.filter((({is_custom:e=!1})=>e)),getOperator(e,t){const n=e.operators.findIndex((({value:e})=>e===t));return-1!==n&&e.operators[n]},readCondition(e,t){var n;const{operator:r=""}=t;if(!r)return"";const l=null!==(n=e.conditionReaders[r])&&void 0!==n&&n;return"function"==typeof l?l(t):e.conditionReaders.default(t)},getFunction:(e,t)=>e.functions.find((({value:e})=>e===t)),getFunctionDisplay:(e,t)=>Ur.getFunction(e,t)?.display},Hr={...Ur},{createReduxStore:Wr}=wp.data,zr=Wr("jet-forms/block-conditions",{reducer:function(e=Jr,t){const n=Pr[t?.type];return n?n(e,t):e},actions:$r,selectors:Hr}),Yr="REGISTER_MACRO",Kr={[Yr](e,t){const{items:n,isClient:r}=t,l=Array.isArray(n)?n:[n];for(const e of l)if(!(e instanceof Cn))throw new Error("^^^ Invalid macro item ^^^");return r?e.clientMacros.push(...l):e.serverMacros.push(...l),e}},{__:Xr}=wp.i18n;function Zr(){Cn.call(this),this.name="CurrentDate",this.isClientSide=!0,this.fullHelp=()=>(0,e.createElement)(e.Fragment,null,Xr("Returns the current timestamp. Replacing","jet-form-builder")," ",(0,e.createElement)("code",null,"Date.now()"))}Zr.prototype=Object.create(Cn.prototype);const Qr=Zr,{__:el}=wp.i18n;function tl(){Cn.call(this),this.name="Min_In_Sec",this.isClientSide=!0,this.help=el("Number of milliseconds in one minute","jet-form-builder")}tl.prototype=Object.create(Cn.prototype);const nl=tl,{__:rl}=wp.i18n;function ll(){Cn.call(this),this.name="Month_In_Sec",this.isClientSide=!0,this.help=rl("Number of milliseconds in one month","jet-form-builder")}ll.prototype=Object.create(Cn.prototype);const ol=ll,{__:al}=wp.i18n;function il(){Cn.call(this),this.name="Day_In_Sec",this.isClientSide=!0,this.help=al("Number of milliseconds in one day","jet-form-builder")}il.prototype=Object.create(Cn.prototype);const sl=il,{__:cl}=wp.i18n;function ul(){Cn.call(this),this.name="Year_In_Sec",this.isClientSide=!0,this.help=cl("Number of milliseconds in one year","jet-form-builder")}ul.prototype=Object.create(Cn.prototype);const dl=ul,{__:ml}=wp.i18n;function pl(){en.call(this)}pl.prototype=Object.create(en.prototype),pl.prototype.docArgument=!1,pl.prototype.help=null,pl.prototype.isServerSide=!1,pl.prototype.isClientSide=!1,pl.prototype.getArgumentsList=function(){if(!this.docArgument||!this.docArgument.length)return null;const e=Array.isArray(this.docArgument)?this.docArgument:[this.docArgument],t=[];for(const n of e)switch(n){case"string":case String:t.push(ml("String","jet-form-builder"));break;case"number":case Number:t.push(ml("Number","jet-form-builder"));break;case"array":case Array:t.push(ml("Array","jet-form-builder"));break;case"any":t.push(ml("Anything","jet-form-builder"))}return t.join(" | ")},pl.prototype.fullHelp=function(){if(!this.docArgument&&!this.help)return null;const t=this.help,n=this.getArgumentsList();return(0,e.createElement)(e.Fragment,null,n&&(0,e.createElement)("div",{style:{marginBottom:"0.5em"}},ml("Arguments:","jet-form-builder")+" ",(0,e.createElement)("code",null,n)),"function"!=typeof t?t:(0,e.createElement)(t,null))};const fl=pl,{__:hl}=wp.i18n;function bl(){fl.call(this),this.label=()=>hl("addDay","jet-form-builder"),this.fullName=()=>"|addDay",this.docArgument=Number,this.isClientSide=!0,this.help=hl("Adds the passed number of days via an argument to a macro that returns a date or a timestamp.","jet-form-builder")}bl.prototype=Object.create(fl.prototype);const gl=bl,{__:yl}=wp.i18n;function vl(){fl.call(this),this.label=()=>yl("addMonth","jet-form-builder"),this.fullName=()=>"|addMonth",this.docArgument=Number,this.isClientSide=!0,this.help=yl("Adds the passed number of months via an argument to a macro that returns a date or a timestamp.","jet-form-builder")}vl.prototype=Object.create(fl.prototype);const wl=vl,{__:El}=wp.i18n;function _l(){fl.call(this),this.label=()=>El("addYear","jet-form-builder"),this.fullName=()=>"|addYear",this.docArgument=Number,this.isClientSide=!0,this.help=El("Adds the passed number of years through an argument to a macro that returns a date or a timestamp.","jet-form-builder")}_l.prototype=Object.create(fl.prototype);const Cl=_l,{__:kl}=wp.i18n;function Sl(){fl.call(this),this.label=()=>kl("ifEmpty","jet-form-builder"),this.fullName=()=>"|ifEmpty",this.docArgument="any",this.isClientSide=!0,this.help=kl("If the macro returns an empty value, then the filter returns the value passed in the argument","jet-form-builder")}Sl.prototype=Object.create(fl.prototype);const jl=Sl,{__:xl}=wp.i18n;function Nl(){fl.call(this),this.label=()=>xl("length","jet-form-builder"),this.fullName=()=>"|length",this.isClientSide=!0,this.help=xl("Returns the length of a string or array","jet-form-builder")}Nl.prototype=Object.create(fl.prototype);const Fl=Nl,{__:Tl}=wp.i18n;function Il(){fl.call(this),this.label=()=>Tl("toDate","jet-form-builder"),this.fullName=()=>"|toDate",this.docArgument=Boolean,this.isClientSide=!0,this.help=()=>(0,e.createElement)(e.Fragment,null,Tl("Formats the timestamp according to the Date Field format.","jet-form-builder"),(0,e.createElement)("hr",null),Tl("Example:","jet-form-builder")+" ",(0,e.createElement)("code",null,"2022-02-24"),(0,e.createElement)("hr",null),Tl("Optionally accepts ","jet-form-builder"),(0,e.createElement)("code",null,"false"),Tl(" to use the user’s local timezone instead of UTC (default: ","jet-form-builder"),(0,e.createElement)("code",null,"true"),Tl(").","jet-form-builder"),(0,e.createElement)("hr",null),Tl("Example:","jet-form-builder")+" ",(0,e.createElement)("code",{style:{fontSize:"12px"}},"toDate(false)"))}Il.prototype=Object.create(fl.prototype);const Bl=Il,{__:Al}=wp.i18n;function Ol(){fl.call(this),this.label=()=>Al("toDateTime","jet-form-builder"),this.fullName=()=>"|toDateTime",this.docArgument=Boolean,this.isClientSide=!0,this.help=()=>(0,e.createElement)(e.Fragment,null,Al("Formats the timestamp according to the Datetime Field format.","jet-form-builder"),(0,e.createElement)("hr",null),Al("Example:","jet-form-builder")+" ",(0,e.createElement)("code",null,"2022-02-24T04:25"),(0,e.createElement)("hr",null),Al("Optionally accepts ","jet-form-builder"),(0,e.createElement)("code",null,"false"),Al(" to use the user’s local timezone instead of UTC (default: ","jet-form-builder"),(0,e.createElement)("code",null,"true"),Al(").","jet-form-builder"),(0,e.createElement)("hr",null),Al("Example:","jet-form-builder")+" ",(0,e.createElement)("code",{style:{fontSize:"12px"}},"toDateTime(false)"))}Ol.prototype=Object.create(fl.prototype);const Rl=Ol,{__:Ml}=wp.i18n;function Pl(){fl.call(this),this.label=()=>Ml("toTime","jet-form-builder"),this.fullName=()=>"|toTime",this.docArgument=Boolean,this.isClientSide=!0,this.help=()=>(0,e.createElement)(e.Fragment,null,Ml("Formats the timestamp according to the Time Field format.","jet-form-builder"),(0,e.createElement)("hr",null),Ml("Example:","jet-form-builder")+" ",(0,e.createElement)("code",null,"04:25"),(0,e.createElement)("hr",null),Ml("Optionally accepts ","jet-form-builder"),(0,e.createElement)("code",null,"false"),Ml(" to use the user’s local timezone instead of UTC (default: ","jet-form-builder"),(0,e.createElement)("code",null,"true"),Ml(").","jet-form-builder"),(0,e.createElement)("hr",null),Ml("Example:","jet-form-builder")+" ",(0,e.createElement)("code",{style:{fontSize:"12px"}},"toTime(false)"))}Pl.prototype=Object.create(fl.prototype);const Gl=Pl,{__:Ll}=wp.i18n;function Dl(){fl.call(this),this.label=()=>Ll("subDay","jet-form-builder"),this.fullName=()=>"|subDay",this.docArgument=Number,this.isClientSide=!0,this.help=Ll("Subtracts the number of days by argument from a macro that returns a date or timestamp.","jet-form-builder")}Dl.prototype=Object.create(fl.prototype);const ql=Dl,{__:Vl}=wp.i18n;function Jl(){fl.call(this),this.label=()=>Vl("subMonth","jet-form-builder"),this.fullName=()=>"|subMonth",this.docArgument=Number,this.isClientSide=!0,this.help=Vl("Subtracts the number of months by argument from a macro that returns a date or timestamp.","jet-form-builder")}Jl.prototype=Object.create(fl.prototype);const $l=Jl,{__:Ul}=wp.i18n;function Hl(){fl.call(this),this.label=()=>Ul("subYear","jet-form-builder"),this.fullName=()=>"|subYear",this.docArgument=Number,this.isClientSide=!0,this.help=Ul("Subtracts the number of years by argument from a macro that returns a date or timestamp.","jet-form-builder")}Hl.prototype=Object.create(fl.prototype);const Wl=Hl,{__:zl}=wp.i18n;function Yl(){fl.call(this),this.label=()=>zl("toDayInMs","jet-form-builder"),this.fullName=()=>"|toDayInMs",this.isClientSide=!0,this.help=()=>(0,e.createElement)(e.Fragment,null,zl("Converts a number of days into milliseconds.","jet-form-builder"))}Yl.prototype=Object.create(fl.prototype);const Kl=Yl,{__:Xl}=wp.i18n;function Zl(){fl.call(this),this.label=()=>Xl("toHourInMs","jet-form-builder"),this.fullName=()=>"|toHourInMs",this.isClientSide=!0,this.help=()=>(0,e.createElement)(e.Fragment,null,Xl("Converts a number of hours into milliseconds.","jet-form-builder"))}Zl.prototype=Object.create(fl.prototype);const Ql=Zl,{__:eo}=wp.i18n;function to(){fl.call(this),this.label=()=>eo("toMinuteInMs","jet-form-builder"),this.fullName=()=>"|toMinuteInMs",this.isClientSide=!0,this.help=()=>(0,e.createElement)(e.Fragment,null,eo("Converts a number of minutes into milliseconds.","jet-form-builder"))}to.prototype=Object.create(fl.prototype);const no=to,{__:ro}=wp.i18n;function lo(){fl.call(this),this.label=()=>ro("toMonthInMs","jet-form-builder"),this.fullName=()=>"|toMonthInMs",this.isClientSide=!0,this.help=()=>(0,e.createElement)(e.Fragment,null,ro("Converts a number of months into milliseconds.","jet-form-builder"))}lo.prototype=Object.create(fl.prototype);const oo=lo,{__:ao}=wp.i18n;function io(){fl.call(this),this.label=()=>ao("toWeekInMs","jet-form-builder"),this.fullName=()=>"|toWeekInMs",this.isClientSide=!0,this.help=()=>(0,e.createElement)(e.Fragment,null,ao("Converts a number of weeks into milliseconds.","jet-form-builder"))}io.prototype=Object.create(fl.prototype);const so=io,{__:co}=wp.i18n;function uo(){fl.call(this),this.label=()=>co("toYearInMs","jet-form-builder"),this.fullName=()=>"|toYearInMs",this.isClientSide=!0,this.help=()=>(0,e.createElement)(e.Fragment,null,co("Converts a number of years into milliseconds.","jet-form-builder"))}uo.prototype=Object.create(fl.prototype);const mo=uo,{__:po}=wp.i18n;function fo(){fl.call(this),this.label=()=>po("Timestamp","jet-form-builder"),this.fullName=()=>"|T",this.isClientSide=!0,this.help=po("Returns the time stamp. Usually used in conjunction with Date & Datetime and Time Field.","jet-form-builder",'Example\nFor Date Field\n%date_field|T%\nResult if date_field is filled with value "2022-10-22"')}fo.prototype=Object.create(fl.prototype);const ho=fo,bo={macros:[new Qr,new nl,new sl,new ol,new dl],filters:[new jl,new ho,new Fl,new gl,new wl,new Cl,new ql,new $l,new Wl,new Bl,new Rl,new Gl,new no,new Ql,new Kl,new so,new oo,new mo]},go={registerMacro:(e,t=!0)=>({type:Yr,items:e,isClient:t})},yo={getClientMacros:e=>e.macros.filter((function(e){return e.isClientSide})),getServerMacros:e=>e.macros.filter((function(e){return e.isServerSide})),getClientFilters:e=>e.filters.filter((function(e){return e.isClientSide})),getServerFilters:e=>e.filters.filter((function(e){return e.isServerSide}))},{createReduxStore:vo}=wp.data,wo=vo("jet-forms/macros",{reducer:function(e=bo,t){const n=Kr[t?.type];return n?n(e,t):e},actions:go,selectors:yo}),Eo="REGISTER",_o={[Eo](e,t){const{messages:n,ssr_callbacks:r,formats:l,rule_types:o}=t.items;return e.messages=JSON.parse(JSON.stringify(n)),e.ssrCallbacks=JSON.parse(JSON.stringify(r)),e.formats=JSON.parse(JSON.stringify(l)),e.ruleTypes=JSON.parse(JSON.stringify(o)),e}},Co={..._o},{select:ko}=wp.data,{__:So}=wp.i18n,jo={messages:[],ssrCallbacks:[],formats:[],ruleTypes:[],ruleReaders:{default(e){const t=ko("jet-forms/validation").getRule(e.type);if(!t)return"";let n=e?.field||e?.value||"";return n=Lr(n,"b")||"(no value)",[t.label,`${n}`].join(" ")},ssr:e=>[So("Function:","jet-form-builder"),e?.value].join(" ")}},xo={register:e=>({type:Eo,items:e})},No={...{getRule(e,t){const n=e.ruleTypes.findIndex((({value:e})=>e===t));return-1!==n&&e.ruleTypes[n]},readRule(e,t){var n;const{type:r=""}=t;if(!r)return"";const l=null!==(n=e.ruleReaders[r])&&void 0!==n&&n;return"function"==typeof l?l(t):e.ruleReaders.default(t)}}},{createReduxStore:Fo}=wp.data,To=Fo("jet-forms/validation",{reducer:function(e=jo,t){const n=Co[t?.type];return n?n(e,t):e},actions:xo,selectors:No}),Io="SET_BLOCKS",Bo="SET_BLOCKS_FIRST",Ao="TOGGLE_EXECUTE",Oo={...{[Io](e,t){const n=[];for(const r in t.blockMap)t.blockMap.hasOwnProperty(r)&&!e.blockMap.hasOwnProperty(r)&&n.push(r);return{...e,blocks:t.blocks,blockMap:t.blockMap,recentlyAdded:n}},[Bo]:(e,t)=>({...e,blocks:t.blocks,blockMap:t.blockMap}),[Ao]:e=>({...e,executed:!0})}},Ro={blocks:[],blockMap:{},executed:!1,recentlyAdded:[],sanitizers:{name:[e=>e.replace(/[^\w\-]/gi,""),e=>"children"===e?"_"+e:e]}},{select:Mo}=wp.data,Po=function(){const e=[],t={};return j(((n,r)=>{var l;if(!n?.name?.includes("jet-forms/"))return;const o=Mo("core/blocks").getBlockType(n.name),a=o.jfbResolveBlock.call(n);if(o.hasOwnProperty("jfbGetFields")&&(a.fields=o.jfbGetFields.call(n)),!r?.name)return e.push(a),void(t[a.clientId]=a);const i=null!==(l=t[r?.clientId])&&void 0!==l&&l;i&&(Object.defineProperty(a,"parentBlock",{get:()=>i}),i.innerBlocks=i?.innerBlocks||[],i.innerBlocks.push(a),t[a.clientId]=a)})),{blocks:e,blockMap:t}},{select:Go,dispatch:Lo}=wp.data,Do={setBlocks(e=null){null===e&&(e=Po());const t=Go(Wo).isExecuted();return t||Lo(Wo).toggleExecute(),{type:t?Io:Bo,blocks:e.blocks,blockMap:e.blockMap}},toggleExecute:()=>({type:Ao})},qo={getBlocks:e=>e.blocks,getBlockMap:e=>e.blockMap,getFields(e,{withInner:t=!0,currentId:n=!1}){const r=[],l=e=>{for(const o of e)o.fields?.length&&o.clientId!==n&&r.push(...o.fields),t&&o.innerBlocks?.length&&l(o.innerBlocks)};return l(e.blocks),r},isExecuted:e=>e.executed,isRecentlyAdded:(e,t)=>-1!==e.recentlyAdded.indexOf(t),getUniqueNames(e,t){var n,r;const l=null!==(n=e.blockMap[t])&&void 0!==n&&n;if(!l)return{hasChanged:!1};let o=!1;const a=null!==(r=l?.fields?.map?.((({value:e})=>e)))&&void 0!==r?r:[],i=l.hasOwnProperty("parentBlock")?l.parentBlock.innerBlocks:e.blocks,s=e=>{for(const t of e){const n=a.indexOf(t.value);-1!==n&&("field_name"!==t.value?(a[n]=`${a[n]}_copy`,o=!0,s(e)):o=!0)}};for(const e of i){var c;t!==e.clientId&&s(null!==(c=e?.fields)&&void 0!==c?c:[])}return{hasChanged:o,names:a.join("|")}},getSanitizedAttributes(e,t,{name:n}={}){for(const o in t){var r,l;if(!t.hasOwnProperty(o))continue;const a=null!==(r=null!==(l=e.sanitizers?.[n]?.[o])&&void 0!==l?l:e.sanitizers?.[o])&&void 0!==r&&r;if(a?.length)for(const e of a)"function"==typeof e&&(t[o]=e(t[o]))}return t},isUniqueName(e,t){const{hasChanged:n}=qo.getUniqueNames(e,t);return!n},getBlock:(e,t)=>e.blocks.find((({name:e,clientId:n})=>[e,n].includes(t))),getBlockByName(e,t){if(!t)return!1;const n=e=>{for(const r of e){if(r.fields.some((({value:e})=>e===t)))return r;r.innerBlocks?.length&&n(r.innerBlocks)}};return n(e.blocks),!1},getBlockNameByName(e,t){var n;const r=qo.getBlockByName(e,t);return null!==(n=r?.name)&&void 0!==n?n:""},getBlockById(e,t){var n;return null!==(n=e.blockMap[t])&&void 0!==n&&n}},Vo={...qo},{createReduxStore:Jo,dispatch:$o,select:Uo,subscribe:Ho}=wp.data,Wo="jet-forms/fields";let zo,Yo;Ho((()=>{const{debounce:e}=window._,{setBlocks:t}=$o(Wo);e((()=>{const e=Uo("core/block-editor").getGlobalBlockCount();if(zo!==e)return zo=e,void t();const n=Po(),r=JSON.stringify(n.blocks);r!==Yo&&(Yo=r,t(n))}),100)()}));const Ko=Jo(Wo,{reducer:function(e=Ro,t){const n=Oo[t?.type];return n?n(e,t):e},actions:Do,selectors:Vo});n(4180);const{register:Xo,dispatch:Zo}=wp.data,{addAction:Qo}=wp.hooks;[wr,Ir,zr,wo,To,Ko].forEach(Xo),Zo("jet-forms/events").register(window.jetFormEvents.types),Zo("jet-forms/events").lockActions(),Zo("jet-forms/validation").register(window.jetFormValidation),Qo("jet.fb.change.blockConditions.renderState","jet-form-builder/events",(function(e){Zo("jet-forms/events").clearDynamicEvents();const t=e.map((({value:e})=>({value:e="ON."+e,label:e,isDynamic:!0})));Zo("jet-forms/events").register(t)})),Zo("jet-forms/block-conditions").register(window.jetFormBlockConditions);const{createContext:ea}=wp.element,ta=ea(!1),{createContext:na}=wp.element,ra=na({currentItem:{},changeCurrentItem:()=>{},currentIndex:-1}),la=(0,o.createContext)({isSupported:e=>!1,render:({children:e})=>e}),oa=(0,o.createContext)({isSupported:e=>!1,render:({currentItem:e,index:t})=>null}),aa=(0,o.createContext)({edit:e=>!0,move:e=>!0,clone:e=>!0,delete:e=>!0}),{createContext:ia}=wp.element,sa=ia({}),{ToggleControl:ca}=wp.components,{__:ua}=wp.i18n,{useState:da}=wp.element,{useContext:ma}=wp.element,pa=function(e){if(void 0===e)return null;const t=ma(ta),n=function({oldIndex:t,newIndex:n}){e((e=>{const r=JSON.parse(JSON.stringify(e));return[r[n],r[t]]=[r[t],r[n]],r}))};return{changeCurrentItem:function(t,n){e((e=>{const r=JSON.parse(JSON.stringify(e));return r[n]={...e[n],...t},r}))},toggleVisible:function(t){e((e=>{const n=JSON.parse(JSON.stringify(e));return n[t].__visible=!n[t].__visible,n}))},moveDown:function(e){n({oldIndex:e,newIndex:e+1})},moveUp:function(e){n({oldIndex:e,newIndex:e-1})},cloneItem:function(t){e((e=>{const n=JSON.parse(JSON.stringify(e)),[r,l]=[n.slice(0,t+1),n.slice(t+1)];return[...r,n[t],...l]}))},addNewItem:function(t){e((e=>[...e,{__visible:!0,...t}]))},removeOption:function(n){t&&!(e=>confirm((0,d.sprintf)((0,d.__)("Are you sure you want to remove item %d?","jet-form-builder"),e+1)))(n)||e((e=>{const t=JSON.parse(JSON.stringify(e));return t.splice(n,1),t}))}}},{createContext:fa}=wp.element,ha=fa(!1),{Button:ba}=wp.components,{useContext:ga}=wp.element,ya=function(t){var n;const{item:r,onSetState:l,functions:o,children:a}=t,{addNewItem:i}=null!==(n=null!=o?o:pa(l))&&void 0!==n?n:ga(ha);return(0,e.createElement)(ba,{icon:"plus-alt2",isSecondary:!0,onClick:()=>i(r)},a)};let{Card:va,Button:wa,CardHeader:Ea,CardBody:_a,ToggleGroupControl:Ca,__experimentalToggleGroupControl:ka}=wp.components;const{useContext:Sa}=wp.element,{__:ja}=wp.i18n;Ca=Ca||ka;const xa=function(t){var n;const{items:r,onSetState:l,functions:o,children:a}=t,{cloneItem:i,moveUp:s,moveDown:c,toggleVisible:u,changeCurrentItem:d,removeOption:m}=null!==(n=null!=o?o:pa(l))&&void 0!==n?n:Sa(ha),{isSupported:p,render:f}=Sa(oa),{edit:h,move:b,clone:g,delete:y}=Sa(aa),v=({currentItem:t,index:n})=>p(t)?(0,e.createElement)(f,{currentItem:t,index:n}):(0,e.createElement)("span",{className:"repeater-item-title"},`#${n+1}`);return(0,e.createElement)("div",{className:"jet-form-builder__repeater-component",key:"jet-form-builder-repeater"},r.map(((t,n)=>(0,e.createElement)(va,{size:"small",elevation:2,className:"jet-form-builder__repeater-component-item",key:`jet-form-builder__repeater-component-item-${n}`},(0,e.createElement)(Ea,{className:"repeater__item__header"},(0,e.createElement)("div",{className:"repeater-item__left-heading"},(0,e.createElement)(Ca,{className:"repeater-action-buttons jet-fb-toggle-group-control",hideLabelFromVision:!0},(!h||h(t))&&(0,e.createElement)(wa,{variant:"tertiary",isSmall:!0,icon:t.__visible?"no-alt":"edit",onClick:()=>u(n),className:"repeater-action-button jet-fb-is-thick"}),(!b||b(t))&&(0,e.createElement)(wa,{variant:"tertiary",isSmall:!0,isSecondary:!0,disabled:!Boolean(n),icon:"arrow-up-alt2",onClick:()=>s(n),className:"repeater-action-button jet-fb-is-thick"}),(!b||b(t))&&(0,e.createElement)(wa,{variant:"tertiary",isSmall:!0,isSecondary:!0,disabled:!(nc(n),className:"repeater-action-button jet-fb-is-thick"})),(0,e.createElement)(v,{currentItem:t,index:n})),(0,e.createElement)(Ca,{className:"jet-fb-toggle-group-control",hideLabelFromVision:!0},(!g||g(t))&&(0,e.createElement)(wa,{variant:"tertiary",isSmall:!0,isSecondary:!0,onClick:()=>i(n),className:"jet-fb-is-thick",icon:"admin-page"}),(!y||y(t))&&(0,e.createElement)(zt,{icon:"trash",isDestructive:!0},(0,e.createElement)(Jt.Consumer,null,(({setShowPopover:t})=>(0,e.createElement)("div",{style:{padding:"0.5em",width:"max-content"}},(0,e.createElement)("span",null,ja("Delete this item?","jet-form-builder"))," ",(0,e.createElement)(wa,{isLink:!0,isDestructive:!0,onClick:()=>m(n)},ja("Yes","jet-form-builder"))," / ",(0,e.createElement)(wa,{isLink:!0,onClick:()=>t(!1)},ja("No","jet-form-builder")))))))),t.__visible&&(0,e.createElement)(_a,{className:"repeater-item__content",key:`jet-form-builder__card-body-${n}`},(()=>{const r={currentItem:t,changeCurrentItem:e=>d(e,n),currentIndex:n};return(0,e.createElement)(ra.Provider,{value:r},!a&&"Set up your Repeater Template, please.","function"==typeof a?a(r):a)})())))))},{__experimentalToggleGroupControl:Na,__experimentalToggleGroupControlOption:Fa}=wp.components,{__:Ta}=wp.i18n;let{formats:Ia}=window.jetFormValidation;const Ba=window.jfb.data,{messages:Aa}=window.jetFormValidation,Oa=function(e){return Aa.find((({id:t})=>e===t))},{TextControl:Ra}=wp.components,Ma=ke((0,o.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,o.cloneElement)(e,{width:t,height:t,...n,ref:r})})))({name:"StyledIcon",class:"sfqmk5y",propsAsIs:!0});n(483);const{createContext:Pa}=wp.element,Ga=Pa({FieldSelect:null,property:""}),La=function({state:t,children:n}){const r=pa(t);return(0,e.createElement)(ha.Provider,{value:r},n)},Da=window.wp.apiFetch;var qa=n.n(Da);const{rest_add_state:Va,rest_delete_state:Ja}=window.jetFormBlockConditions,{Fill:$a}=c,Ua=({setShowModal:t,changeCurrentItem:n,currentItem:r})=>{var l;const[a,i]=(0,o.useState)(!1),[s,c]=(0,o.useState)({}),[m,p]=(0,o.useState)("");let f=[...null!==(l=r.render_state)&&void 0!==l?l:[]];const{addRenderState:b,deleteRenderStates:g}=(0,pe.useDispatch)("jet-forms/block-conditions"),y=(0,pe.useSelect)((e=>e("jet-forms/block-conditions").getCustomRenderStates()),[a,s]);return(0,e.createElement)(h,{title:(0,d.__)("Register custom render state","jet-form-builder"),onRequestClose:()=>t(!1),classNames:["width-45"]},(0,e.createElement)("div",{className:"jet-fb with-button"},(0,e.createElement)(u.TextControl,{value:m,onChange:e=>p(e),placeholder:(0,d.__)("Set your custom state name","jet-form-builder")}),(0,e.createElement)(u.Button,{variant:"secondary",onClick:()=>{i(!0),Va.data={value:m},qa()(Va).then((e=>{var r;r=e.state,b(r),f.push(r.value),n({render_state:f}),i(!1),t(!1)})).catch((e=>{console.error(e),i(!1)}))},disabled:a,isBusy:a,style:{padding:"7px 12px",height:"unset"}},(0,d.__)("Add","jet-form-builder"))),Boolean(y?.length)&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("b",{className:"jet-fb flex mb-05-em"},(0,d.__)("Manage your custom states:","jet-form-builder")),(0,e.createElement)("div",{className:"jet-fb-buttons-flex"},y.map((t=>{var r;return(0,e.createElement)(u.Button,{key:t.value,icon:"no-alt",iconPosition:"right",onClick:()=>{return e=t.value,Ja.data={list:[e]},c((t=>({...t,[e]:!0}))),void qa()(Ja).then((()=>{(e=>{g(e),f=f.filter((t=>t!==e)),n({render_state:f})})(e)})).catch(console.error).finally((()=>{c((t=>({...t,[e]:!1})))}));var e},isBusy:null!==(r=s[t.value])&&void 0!==r&&r},t.label)})))),(0,e.createElement)($a,null,(0,e.createElement)("span",null)))},{Button:Ha,BaseControl:Wa,FormTokenField:za}=wp.components,{__:Ya}=wp.i18n,{useState:Ka}=wp.element,{useSelect:Xa}=wp.data,Za=({currentItem:t,changeCurrentItem:n})=>{const[r,l]=Ka(!1),o=Xa((e=>y(e("jet-forms/block-conditions").getRenderStates(),"value")),[r]);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Wa,{label:Ya("Render State","jet-form-builder"),className:"control-flex"},(0,e.createElement)("div",null,(0,e.createElement)("label",{className:"jet-fb label mb-05-em"},Ya("Add render state","jet-form-builder")),(0,e.createElement)("div",{className:"jet-fb with-button clear-label"},(0,e.createElement)(za,{value:t.render_state,suggestions:o,onChange:e=>n({render_state:e}),tokenizeOnSpace:!0,__experimentalExpandOnFocus:!0}),(0,e.createElement)(Ha,{label:Ya("New render state","jet-form-builder"),variant:"secondary",icon:"plus-alt2",onClick:()=>l(!0)})))),r&&(0,e.createElement)(Ua,{setShowModal:l,changeCurrentItem:n,currentItem:t}))},Qa=function({children:t,value:n,label:r,onChangePreset:l=!1,onChangeMacros:o=!1,macroWithCurrent:a=!1}){const i=(0,tr.useInstanceId)(u.FlexItem,"jfb-AdvancedModalControl");return(0,e.createElement)("div",{className:"components-base-control"},(0,e.createElement)(u.Flex,{align:"flex-start",className:"components-base-control__field"},(0,e.createElement)(u.FlexItem,{isBlock:!0},(0,e.createElement)(u.Flex,{align:"center",justify:"flex-start"},(0,e.createElement)("label",{htmlFor:i,className:"jet-fb label"},r),!1!==l&&(0,e.createElement)(qt,{value:n,onChange:l}),!1!==o&&(0,e.createElement)(bn,{onClick:o,withCurrent:a}))),(0,e.createElement)(u.FlexItem,{isBlock:!0,style:{flex:3,marginLeft:"unset"}},"function"==typeof t?t({instanceId:i}):t)))},{TextareaControl:ei,withFilters:ti}=wp.components,{__:ni}=wp.i18n,ri=ti("jet.fb.block.conditions.options")((t=>{const{currentItem:n,changeCurrentItem:r}=t,l=de();return["empty","not_empty"].includes(n.operator)?null:"render_state"===n.operator?(0,e.createElement)(Za,{key:l("RenderStateOptions"),changeCurrentItem:r,currentItem:n}):(0,e.createElement)(xn,null,(0,e.createElement)(Qa,{value:n.value,label:ni("Value to compare","jet-form-builder"),onChangePreset:e=>r({value:e}),onChangeMacros:e=>{var t;return r({value:(null!==(t=n.value)&&void 0!==t?t:"")+e})}},(({instanceId:t})=>(0,e.createElement)(ei,{id:t,value:n.value,onChange:e=>r({value:e})}))))})),{SelectControl:li,withFilters:oi}=wp.components,{__:ai}=wp.i18n,ii=oi("jet.fb.block.conditions.options")((t=>{const{currentItem:n,changeCurrentItem:r}=t,l=(0,hn.useFields)({placeholder:"--"});return"render_state"===n.operator?null:(0,e.createElement)(li,{label:ai("Field","jet-form-builder"),labelPosition:"side",value:n.field,options:l,onChange:e=>{r({field:e})}})})),{useContext:si}=wp.element,{SelectControl:ci}=wp.components,{__:ui}=wp.i18n,di=function(){const{currentItem:t,changeCurrentItem:n}=si(ra),r=de(),{operators:l}=ce();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ii,{currentItem:t,changeCurrentItem:n}),(0,e.createElement)(ci,{key:r("SelectControl-operator"),label:ui("Operator","jet-form-builder"),labelPosition:"side",value:t.operator,options:l,onChange:e=>n({operator:e})}),(0,e.createElement)(ri,{currentItem:t,changeCurrentItem:n}))},{select:mi}=wp.data,pi=function(e){return mi("jet-forms/block-conditions").readCondition(e)},{__:fi}=wp.i18n,hi=function({children:t}){return(0,e.createElement)(oa.Provider,{value:{isSupported:()=>!0,render:({currentItem:t})=>(0,e.createElement)("span",{className:"repeater-item-title",dangerouslySetInnerHTML:{__html:t?.or_operator?fi("OR","jet-form-builder"):pi(t)}})}},(0,e.createElement)(aa.Provider,{value:{edit:e=>!e.or_operator}},t))},{__:bi}=wp.i18n,{useState:gi,useContext:yi,Fragment:vi,useEffect:wi,useRef:Ei}=wp.element,{SelectControl:_i,TextareaControl:Ci,FlexItem:ki,Flex:Si,ToggleControl:ji}=wp.components,xi=[{key:"commas",render:()=>(0,e.createElement)("li",null,bi("If this field supports multiple values, you can separate them with commas. If a string value is expected, wrap it in single quotes like '%value_field%'.","jet-form-builder"))}],Ni=[{value:"on_change",label:bi("On change conditions result","jet-form-builder"),help:bi("The value will be applied if condition check-ups return a result different from the first check-up's cached value","jet-form-builder")},{value:"once",label:bi("Once","jet-form-builder"),help:bi("The value will be applied only the first time the condition is matched","jet-form-builder")},{value:"always",label:bi("Always","jet-form-builder"),help:bi("The value will be applied every time the condition is matched","jet-form-builder")}],Fi=e=>Ni.find((t=>t.value===(null!=e?e:"on_change"))).help,Ti=function(){var t,n,r,l;const{current:o,update:a}=yi(sa),[i,s]=gi((()=>o)),c=Ei(null),[u,d]=gi((()=>Fi(i.frequency)));wi((()=>{d(Fi(i.frequency))}),[i.frequency]);const m=e=>{s((t=>({...t,...e})))};return W((()=>a(i))),(0,e.createElement)(vi,null,(0,e.createElement)(Si,{align:"flex-start"},(0,e.createElement)(ki,{isBlock:!0},(0,e.createElement)(Si,{align:"center",justify:"flex-start"},(0,e.createElement)("span",{className:"jet-fb label"},bi("Value to set","jet-form-builder")),(0,e.createElement)(qt,{value:i.to_set,onChange:e=>m({to_set:e})}),(0,e.createElement)(xn,{withThis:!0},(0,e.createElement)(bn,{onClick:e=>(e=>{const t=c.current;if(t){const n=t.selectionStart,r=t.selectionEnd,l=i.to_set||"",o=l.slice(0,n)+e+l.slice(r);m({to_set:`${o}`}),setTimeout((()=>{t.focus(),t.selectionStart=t.selectionEnd=n+e.length}),0)}})(e)}))),(0,e.createElement)(ut,null,(0,e.createElement)("ul",null,xi.map((t=>(0,e.createElement)(vi,{key:t.key},t.render())))))),(0,e.createElement)(ki,{isBlock:!0,style:{flex:3,marginLeft:"unset"}},(0,e.createElement)(Ci,{className:"jet-control-clear",hideLabelFromVision:!0,value:null!==(t=i.to_set)&&void 0!==t?t:"",onChange:e=>m({to_set:e}),ref:c}))),(0,e.createElement)(_i,{options:Ni,value:null!==(n=i.frequency)&&void 0!==n?n:"on_change",label:bi("Apply type","jet-form-builder"),labelPosition:"side",onChange:e=>m({frequency:e}),help:u}),(0,e.createElement)(La,{state:e=>{var t;m({conditions:"function"==typeof e?e(null!==(t=i.conditions)&&void 0!==t?t:[]):e})}},(0,e.createElement)(hi,null,(0,e.createElement)(xa,{items:null!==(r=i.conditions)&&void 0!==r?r:[]},(0,e.createElement)(di,null))),(0,e.createElement)("div",{className:"jet-fb flex jc-space-between ai-center"},(0,e.createElement)(ya,null,bi("Add New Condition","jet-form-builder")),(0,e.createElement)(ji,{className:"jet-fb m-unset clear-control",label:bi("Set value only if field is empty","jet-form-builder"),checked:null!==(l=i.set_on_empty)&&void 0!==l&&l,onChange:e=>m({set_on_empty:e})}))))},{__:Ii}=wp.i18n,{Children:Bi,cloneElement:Ai}=wp.element,Oi=function({conditions:t,showWarning:n=!1}){let r=[],l="";return Boolean(t?.length)&&(l=pi(t[0]),r=t.filter(((e,t)=>0!==t)).map(((t,n)=>(0,e.createElement)("span",{key:n,"data-title":Ii("And","jet-form-builder")+":",dangerouslySetInnerHTML:{__html:pi(t)}})))),l?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{"data-title":Ii("If","jet-form-builder")+":",dangerouslySetInnerHTML:{__html:l}}),Bi.map(r,Ai)):n&&(0,e.createElement)("span",{"data-title":Ii("The condition is not fully configured.","jet-form-builder")})},Ri=function({isHover:t=!1,children:n}){return(0,e.createElement)("div",{className:["jet-fb",t?"show":"hide","p-absolute","wh-100","flex-center","gap-05em"].join(" "),style:{backgroundColor:"#ffffffcc",transition:"0.3s"}},n)},Mi=function({children:t}){return(0,e.createElement)("div",{className:["jet-fb","flex","flex-dir-column","container","gap-1em"].join(" ")},t)},{__:Pi}=wp.i18n,{useState:Gi}=wp.element,{Button:Li}=wp.components,Di=function({current:t,update:n,isOpenModal:r,setOpenModal:l}){const[o,a]=Gi(!1),[i,s]=Gi(!1),c=1>=Object.keys(t)?.length;return(0,e.createElement)(sa.Provider,{value:{update:e=>{n((n=>{const r=JSON.parse(JSON.stringify(n.groups));for(const n in r)r.hasOwnProperty(n)&&t.id===r[n].id&&(r[n]={...r[n],...e});return{groups:r}}))},current:t}},(0,e.createElement)("div",{className:"jet-fb p-relative",onMouseOver:()=>s(!0),onFocus:()=>s(!0),onMouseOut:()=>s(!1),onBlur:()=>s(!1)},(0,e.createElement)(Ri,{isHover:i},(0,e.createElement)(Li,{isSmall:!0,isSecondary:!0,icon:o?"no-alt":"edit",onClick:()=>a((e=>!e))},Pi("Edit","jet-form-builder")),(0,e.createElement)(Li,{isSmall:!0,isDestructive:!0,icon:"trash",onClick:()=>{n((e=>({groups:JSON.parse(JSON.stringify(e.groups)).filter((({id:e})=>e!==t.id))})))}},Pi("Delete","jet-form-builder"))),(0,e.createElement)(Mi,null,c?(0,e.createElement)("div",{"data-title":Pi("This value item is empty","jet-form-builder")}):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{"data-title":Pi("Set","jet-form-builder")+":",dangerouslySetInnerHTML:{__html:Lr(t.to_set)}}),(0,e.createElement)(Oi,{conditions:t?.conditions})))),(o||r===t.id)&&(0,e.createElement)(h,{classNames:["width-60"],onRequestClose:()=>{a(!1),l(!1)},title:Pi("Edit Dynamic Value","jet-form-builder")},(0,e.createElement)(Ti,null)))},qi=function({children:t,...n}){return(0,e.createElement)("div",{className:"jet-fb flex flex-dir-column gap-default",style:{marginBottom:"1em"},...n},t)},{__:Vi}=wp.i18n,{useState:Ji}=wp.element,{Button:$i}=wp.components,Ui=function(){var t,n;const[r,l]=fe(),o=de(),a=null!==(t=r.value)&&void 0!==t?t:{},i=null!==(n=a.groups)&&void 0!==n?n:[],[s,c]=Ji(!1);if(!he("value"))return null;const u=i.filter(((e,t)=>0!==t)),d=e=>{l({...r,value:{...a,..."function"==typeof e?e(a):e}})};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ut,null,Vi("Or use a condition-dependent value","jet-form-builder")+" ",(0,e.createElement)($i,{isLink:!0,onClick:()=>{},label:Vi("Former Set Value functionality, moved from the Conditional Block","jet-form-builder"),showTooltip:!0},"(?)")),Boolean(i.length)?(0,e.createElement)(qi,null,(0,e.createElement)(Di,{key:o(i[0].id),current:i[0],update:d,isOpenModal:s,setOpenModal:c}),Boolean(u.length)&&u.map((t=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("b",null,Vi("OR","jet-form-builder")),(0,e.createElement)(Di,{key:o(t.id),current:t,update:d,isOpenModal:s,setOpenModal:c}))))):null,(0,e.createElement)($i,{icon:"plus-alt2",isSecondary:!0,onClick:()=>{const e=k.getRandomID();d({groups:[...i,{id:e,conditions:[{__visible:!0}]}]}),c(e)}},Vi("Add Dynamic Value","jet-form-builder")))},{Button:Hi}=wp.components,{useContext:Wi}=wp.element,{SelectControl:zi}=wp.components,{useContext:Yi,useMemo:Ki}=wp.element,{__:Xi}=wp.i18n,Zi=function(){const{currentItem:t,changeCurrentItem:n}=Yi(ra),r=Ki((()=>O(Xi("Custom value","jet-form-builder"))),[]);return(0,e.createElement)(zi,{labelPosition:"side",options:r,label:Xi("Choose field","jet-form-builder"),value:t.field,onChange:e=>n({field:e})})},{SelectControl:Qi,TextareaControl:es,TextControl:ts,withFilters:ns}=wp.components,{useContext:rs,useState:ls,useEffect:os}=wp.element,{__:as}=wp.i18n,{addFilter:is}=wp.hooks,{rule_types:ss,ssr_callbacks:cs}=window.jetFormValidation,us=cs.map((({value:e})=>e));function ds(e){var t;const n=ss.findIndex((({value:t})=>t===e)),r=as("Enter value","jet-form-builder");return-1===n?r:null!==(t=ss[n]?.control_label)&&void 0!==t?t:r}is("jet.fb.advanced.rule.controls","jet-form-builder",(t=>n=>{const{currentItem:r,changeCurrentItem:l}=n,[o,a]=ls(!1),[i]=(0,K.useActions)(),s=i.some((e=>"save_record"===e.type&&(void 0===e.is_execute||!0===e.is_execute)))?"success":"error";if("ssr"!==r.type)return(0,e.createElement)(t,{...n});const c=r.value||"custom_jfb_field_validation";return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Qi,{labelPosition:"side",options:k.withPlaceholder(cs,as("Custom function","jet-form-builder")),label:as("Choose callback","jet-form-builder"),value:r.value,onChange:e=>l({value:e})}),"is_field_value_unique"===r.value&&(0,e.createElement)(u.Notice,{status:s,isDismissible:!1},as("This callback requires the Save Form Record action to work correctly.","jet-form-builder")),"is_user_password_valid"===r.value&&(0,e.createElement)(u.Notice,{status:"success",isDismissible:!1},as("Works only for logged users.","jet-form-builder")),!us.includes(r.value)&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ts,{label:as("Function name","jet-form-builder"),value:r.value,onChange:e=>l({value:e})}),(0,e.createElement)(ut,null,as("Example of registering a function below.","jet-form-builder")+" ",(0,e.createElement)("a",{href:"javascript:void(0)",onClick:()=>a((e=>!e))},as(o?"Hide":"Show","jet-form-builder"))),o&&(0,e.createElement)("pre",null,`/**\n * To get all the values of the fields in the form, you can use the expression:\n * jet_fb_request_handler()->get_request() or $context->get_request()\n *\n * If the field is located in the middle of the repeater, then only\n * jet_fb_request_handler()->get_request(), but $context->get_request() \n * will return the values of all fields of the current repeater element\n *\n * @param $value mixed\n * @param $context \\Jet_Form_Builder\\Request\\Parser_Context\n *\n * @return bool\n */\nfunction ${c}( $value, $context ): bool {\n\t// your logic\n\treturn true;\n}`)))}));const ms=ns("jet.fb.advanced.rule.controls")((function({currentItem:t,changeCurrentItem:n}){const[r,l]=ls((()=>ds(t.type)));switch(os((()=>{l(ds(t.type))}),[t.type]),t.type){case"equal":case"contain":case"contain_not":case"regexp":case"regexp_not":return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Zi,null),!Boolean(t.field)&&(0,e.createElement)(Qa,{value:t.value,label:r,onChangePreset:e=>n({value:e}),onChangeMacros:e=>{var r;return n({value:(null!==(r=t.value)&&void 0!==r?r:"")+e})}},(({instanceId:r})=>(0,e.createElement)(es,{id:r,value:t.value,onChange:e=>n({value:e})}))));default:return null}})),ps=function(){const{currentItem:t,changeCurrentItem:n}=rs(ra);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Qi,{labelPosition:"side",options:k.withPlaceholder(ss),label:as("Rule type","jet-form-builder"),value:t.type,onChange:e=>n({type:e})}),(0,e.createElement)(ms,{currentItem:t,changeCurrentItem:n}),(0,e.createElement)(es,{label:as("Error message","jet-form-builder"),value:t.message,onChange:e=>n({message:e})}))},{select:fs}=wp.data,hs=function(e){return fs("jet-forms/validation").readRule(e)},{useState:bs}=wp.element,{__:gs}=wp.i18n,ys=function(){const[t,n]=fe(),[r,l]=bs((()=>{var e;return null!==(e=t.validation?.rules)&&void 0!==e?e:[]}));return W((()=>{n((e=>({...e,validation:{...t.validation,rules:r}})))})),(0,e.createElement)(La,{state:l},(0,e.createElement)(oa.Provider,{value:{isSupported:()=>!0,render:({currentItem:t})=>(0,e.createElement)("span",{className:"repeater-item-title",dangerouslySetInnerHTML:{__html:hs(t)}})}},(0,e.createElement)(xa,{items:r},(0,e.createElement)(ps,null))),(0,e.createElement)(ya,null,gs("Add Rule","jet-form-builder")))},{createContext:vs}=wp.element,ws=vs({showModal:!1,setShowModal:()=>{}}),{useContext:Es,useState:_s}=wp.element,{__:Cs}=wp.i18n,{Button:ks}=wp.components,Ss=function(){const{setShowModal:t}=Es(ws),[n,r]=fe(),[l,o]=_s(!1);return(0,e.createElement)("div",{className:"jet-fb p-relative",onMouseOver:()=>o(!0),onFocus:()=>o(!0),onMouseOut:()=>o(!1),onBlur:()=>o(!1)},(0,e.createElement)(Ri,{isHover:l},(0,e.createElement)(ks,{isSmall:!0,isSecondary:!0,icon:"plus-alt2",onClick:()=>{r({validation:{...n.validation,rules:[{__visible:!0}]}}),t((e=>!e))}},Cs("Add new","jet-form-builder"))),(0,e.createElement)(Mi,null,(0,e.createElement)("span",{"data-title":Cs("You have no rules for this field.","jet-form-builder")}),(0,e.createElement)("span",{"data-title":Cs("Please click here to add new.","jet-form-builder")})))},{__:js}=wp.i18n,xs=function({rule:t}){return t.type?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{"data-title":js("Rule:","jet-form-builder"),dangerouslySetInnerHTML:{__html:hs(t)}}),Boolean(t.message)&&(0,e.createElement)("span",{"data-title":js("Message:","jet-form-builder"),dangerouslySetInnerHTML:{__html:t.message}})):(0,e.createElement)("span",{"data-title":js("The rule is not fully configured.","jet-form-builder")})},{useContext:Ns,useState:Fs}=wp.element,{__:Ts}=wp.i18n,{Button:Is}=wp.components,Bs=function({rule:t,index:n=0}){const{setShowModal:r}=Ns(ws),[l,o]=fe(),[a,i]=Fs(!1);return(0,e.createElement)("div",{className:"jet-fb p-relative",onMouseOver:()=>i(!0),onFocus:()=>i(!0),onMouseOut:()=>i(!1),onBlur:()=>i(!1)},(0,e.createElement)(Ri,{isHover:a},(0,e.createElement)(Is,{isSmall:!0,isSecondary:!0,icon:"edit",onClick:()=>{o({validation:{...l.validation,rules:l.validation.rules.map(((e,t)=>(e.__visible=n===t,e)))}}),r((e=>!e))}},Ts("Edit","jet-form-builder")),(0,e.createElement)(Is,{isSmall:!0,isDestructive:!0,icon:"trash",onClick:()=>{o({validation:{...l.validation,rules:l.validation.rules.filter(((e,t)=>t!==n))}})}},Ts("Delete","jet-form-builder"))),(0,e.createElement)(Mi,null,(0,e.createElement)(xs,{rule:t})))},{__:As}=wp.i18n,{Children:Os,cloneElement:Rs}=wp.element;const Ms=function(){const[t]=fe();return t?.validation?.rules?.length?(0,e.createElement)(qi,null,Os.map(function(t){const n=t.filter(((e,t)=>0!==t));return[(0,e.createElement)(Bs,{rule:t[0],key:"first_item"}),...n.map(((t,n)=>((t,n)=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("b",null,As("AND","jet-form-builder")),(0,e.createElement)(Bs,{rule:t,index:n})))(t,n+1)))]}(t.validation.rules),Rs)):(0,e.createElement)(Ss,null)},{useState:Ps}=wp.element,{__:Gs}=wp.i18n,{useBlockProps:Ls}=wp.blockEditor,{TextControl:Ds,SelectControl:qs,ToggleControl:Vs,BaseControl:Js,__experimentalNumberControl:$s}=wp.components;let{NumberControl:Us}=wp.components;void 0===Us&&(Us=$s);const{FormToggle:Hs,BaseControl:Ws,Flex:zs}=wp.components,{useInstanceId:Ys}=wp.compose,{useBlockProps:Ks}=wp.blockEditor,{useEffect:Xs}=wp.element,{useSelect:Zs}=wp.data,{useBlockProps:Qs}=wp.blockEditor,{useSelect:ec}=wp.data,{CustomSelectControl:tc,Icon:nc}=wp.components,{useBlockEditContext:rc}=wp.blockEditor,{Children:lc,cloneElement:oc,useContext:ac}=wp.element,{useSelect:ic}=wp.data,{useBlockEditContext:sc}=wp.blockEditor;let{__experimentalToggleGroupControl:cc,__experimentalToggleGroupControlOptionIcon:uc,__experimentalToolbarContext:dc,ToggleGroupControl:mc,ToggleGroupControlOptionIcon:pc,ToolbarItem:fc,ToolbarGroup:hc,ToolbarContext:bc}=wp.components;function gc({value:t}){const{name:n}=sc(),r=ac(bc),[,l]=fe(),{variations:o,components:a}=ic((t=>{const{getBlockVariations:l}=t("core/blocks"),o=l(n,"block");return{variations:o,components:o.map((t=>{var n;return(null!==(n=r?.currentId)&&void 0!==n?n:r?.baseId)?(0,e.createElement)(fc,{key:t.name,as:pc,value:t.name,label:t.title,icon:t.icon}):(0,e.createElement)(pc,{key:t.name,value:t.name,label:t.title,icon:t.icon})}))}}),[]);return o.length?(0,e.createElement)("div",{className:"jfb-variations-toolbar-toggle"},(0,e.createElement)(mc,{hideLabelFromVision:!0,onChange:e=>l({...o.find((({name:t})=>t===e)).attributes}),value:t,isBlock:!0},lc.map(a,oc))):null}mc=mc||cc,pc=pc||uc,bc=bc||dc;const{useSelect:yc}=wp.data,{useBlockEditContext:vc}=wp.blockEditor,{get:wc}=window._,{useBlockProps:Ec,RichText:_c}=wp.blockEditor,{Button:Cc}=wp.components,{createContext:kc}=wp.element,Sc=kc({}),{useContext:jc}=wp.element,{useState:xc}=wp.element,{get:Nc}=window._,{useSelect:Fc,useDispatch:Tc}=wp.data;var Ic,Bc,Ac;window.JetFBComponents={...null!==(Ic=window?.JetFBComponents)&&void 0!==Ic?Ic:{},BaseLabel:yn,ActionFieldsMap:function({fields:t=[],label:n="[Empty label]",children:a=null,plainHelp:i="",customHelp:s=!1}){return(0,e.createElement)(l.RowControl,{align:"flex-start"},(0,e.createElement)(l.Label,null,n),(0,e.createElement)(l.RowControlEnd,null,s&&"function"==typeof s&&s(),Boolean(i.length)&&(0,e.createElement)("span",{className:"description-controls"},i),t.map((([t,n],l)=>(0,e.createElement)(o.Fragment,{key:`field_in_map_${t+l}`},(0,e.createElement)(r.Provider,{value:{name:t,data:n,index:l}},"function"==typeof a?a({fieldId:t,fieldData:n,index:l}):a))))))},ActionModal:h,ActionModalContext:i,SafeDeleteContext:ta,RepeaterItemContext:ra,RepeaterBodyContext:la,RepeaterHeadContext:oa,RepeaterButtonsContext:aa,ActionFieldsMapContext:r,CurrentPropertyMapContext:Ga,BlockValueItemContext:sa,DynamicPropertySelect:function({dynamic:t=[],parseValue:n=null,children:a=null,properties:i=null}){const{source:s,settings:c,setMapField:u}=(0,o.useContext)(K.CurrentActionEditContext);i=null!=i?i:s.properties;const{name:d,index:m}=(0,o.useContext)(r),{fields_map:p={}}=c;function f(e){var r;for(const t of i)if(e===t.value)return e;return n?n(e):null!==(r=t[0])&&void 0!==r?r:""}const[h,b]=(0,o.useState)((()=>{var e;return f(null!==(e=p[d])&&void 0!==e?e:"")})),g=(0,e.createElement)(l.StyledSelectControl,{key:d+m,value:h,options:i,help:(()=>{var e;const t=i.find((({value:e})=>e===h));return null!==(e=t?.help)&&void 0!==e?e:""})(),onChange:e=>{const n=f(e);b(n),u({nameField:d,value:t.includes(e)?"":e})}});return(0,e.createElement)(Ga.Provider,{value:{FieldSelect:g,property:h}},a&&a,!a&&g)},SafeDeleteToggle:function(t){const[n,r]=da(!0);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ca,{label:ua("Safe deleting","jet-form-builder"),checked:n,onChange:r}),(0,e.createElement)(ta.Provider,{value:n},t.children))},RepeaterAddNew:ya,RepeaterAddOrOperator:function(t){var n;const{onSetState:r,functions:l,children:o}=t,{addNewItem:a}=null!==(n=null!=l?l:pa(r))&&void 0!==n?n:Wi(ha);return(0,e.createElement)(Hi,{isSecondary:!0,icon:"randomize",onClick:()=>a({__visible:!1,or_operator:!0})},o)},Repeater:xa,WrapperRequiredControl:function({children:t,labelKey:n="label",requiredKey:l="required",helpKey:o="help",field:a=[]}){let{name:i,data:s}=g(r);return a.length&&([i,s]=a),(0,e.createElement)("div",{className:"jet-user-meta__row",key:"user_meta_"+i},(0,e.createElement)("div",{className:"jet-field-map__row-label"},(0,e.createElement)("span",{className:"fields-map__label"},s.hasOwnProperty(n)&&s[n]&&s[n],!s.hasOwnProperty(n)&&s),s.hasOwnProperty(l)&&s[l]&&(0,e.createElement)("span",{className:"fields-map__required"}," *"),s[o]&&(0,e.createElement)("p",{className:"components-base-control__help",style:{color:"rgb(117, 117, 117)",margin:"1em 0 0 0"}},(0,e.createElement)(b,null,s[o]))),t)},DynamicPreset:Ie,JetFieldsMapControl:Re,FieldWithPreset:function({children:t=null,ModalEditor:n,triggerClasses:r=[],baseControlProps:l={}}){const[o,a]=Le(!1),i=()=>{a((e=>!e))},s=["jet-form-dynamic-preset__trigger",...r].join(" ");return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ge,{className:"jet-form-dynamic-preset",...l},t,(0,e.createElement)("div",{className:s,onClick:i},(0,e.createElement)(Pe,{viewBox:"0 0 54 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(Me,{d:"M42.6396 26.4347C37.8682 27.3436 32.5666 28.0252 27.1894 28.0252C21.8121 28.0252 16.4348 27.3436 11.7391 26.4347C6.96774 25.4502 3.18093 23.8597 0.37868 21.9663L0.37868 28.0252C0.37868 29.5399 1.59046 31.1304 3.78682 32.4179C5.98317 33.7054 9.46704 34.9172 13.6325 35.5988C17.798 36.2805 22.115 36.8106 27.1894 36.8106C32.2637 36.8106 36.6564 36.5077 40.7462 35.5988C44.8359 34.69 48.3198 33.7054 50.5162 32.4179C52.7125 31.1304 54 29.5399 54 28.0252L54 21.9663C51.122 23.8597 47.3352 25.4502 42.6396 26.4347ZM42.6396 53.5484C37.8682 54.5329 32.5666 55.1388 27.1894 55.1388C21.8121 55.1388 16.4348 54.5329 11.7391 53.5484C7.04348 52.5638 3.18093 51.0491 0.378682 49.1556L0.378682 55.1388C0.378683 56.7293 1.59046 58.3197 3.78682 59.5315C6.36186 60.819 9.46705 62.1066 13.6325 62.7125C17.7223 63.697 22.115 64 27.1894 64C32.2637 64 36.6564 63.697 40.7462 62.7125C44.8359 61.8036 48.3198 60.819 50.5162 59.5315C52.7125 57.9411 54 56.7293 54 54.8359L54 48.8527C51.122 51.0491 47.3352 52.2608 42.6396 53.5484ZM42.6396 39.9915C37.8682 40.9004 32.5666 41.582 27.1894 41.582C21.8121 41.582 16.4348 40.9004 11.7391 39.9915C6.96774 39.007 3.18093 37.4922 0.378681 35.5988L0.378681 41.582C0.378681 43.1725 1.59046 44.6872 3.78682 45.9747C6.36185 47.2622 9.46705 48.474 13.6325 49.1556C17.7223 50.0645 22.115 50.3674 27.1894 50.3674C32.2637 50.3674 36.6564 50.0645 40.7462 49.1556C44.8359 48.1711 48.3198 47.2622 50.5162 45.9747C52.7125 44.3843 54 43.1725 54 41.582L54 35.5988C51.122 37.4922 47.3352 39.007 42.6396 39.9915ZM40.4432 2.12337C36.3535 1.13879 31.885 0.835848 26.8864 0.835849C21.8878 0.835849 17.4194 1.13879 13.2539 2.12337C9.08836 3.10794 5.68022 4.01678 3.48387 5.3043C1.28751 6.59181 -3.4782e-06 8.10654 -3.33916e-06 9.697L-2.95513e-06 14.0897C-2.81609e-06 15.6802 1.28752 17.2706 3.48387 18.5582C6.05891 19.7699 9.1641 21.0575 13.2539 21.6633C17.3436 22.2692 21.8121 22.9509 26.8864 22.9509C31.9607 22.9509 36.3535 22.9509 40.4432 22.345C44.533 21.7391 48.0169 20.4516 50.2132 19.164C52.7125 17.5736 54 15.9831 54 14.3927L54 9.99995C54 8.40948 52.7125 6.81902 50.5162 5.60724C48.3198 4.39546 44.533 2.72926 40.4432 2.12337Z",fill:"#7E8993"})))),o&&(0,e.createElement)(h,{onRequestClose:i,classNames:["width-60"],title:"Edit Preset"},(t=>(0,e.createElement)(n,{...t}))))},GlobalField:ye,AvailableMapField:function({fieldsMap:t,field:n,index:r,value:a,onChangeValue:i,isMapFieldVisible:s}){let c=null;t||(t={}),c=t[n],c&&"object"==typeof c||(c={});const d=({field:t,name:n,index:r,fIndex:o,children:a})=>(0,e.createElement)(u.Card,{key:t+n+r+o,size:"extraSmall",style:{marginBottom:"10px"}},(0,e.createElement)(u.CardHeader,null,(0,e.createElement)("span",{className:"jet-label-overflow"},t)),(0,e.createElement)(l.StyledCardBodyControl,{key:t+n+r+o,className:"jet-form-preset__fields-map-item"},a));return(0,e.createElement)(o.Fragment,{key:`map_field_preset_${n+r}`},window.JetFormEditorData.presetConfig.map_fields.map(((o,m)=>{const p={field:n,name:o.name,index:r,fIndex:m},f="control_"+n+o.name+r+m;switch(o.type){case"text":return s(a,o,n)&&function({field:t,name:n,index:r,fIndex:o},a){return(0,e.createElement)(u.Card,{key:t+n+r+o,size:"extraSmall",style:{marginBottom:"10px"}},(0,e.createElement)(u.CardHeader,null,(0,e.createElement)("span",{className:"jet-label-overflow"},t)),(0,e.createElement)(l.StyledCardBodyControl,{key:t+n+r+o,className:"jet-form-preset__fields-map-item"},a))}(p,(0,e.createElement)(l.StyledTextControl,{key:f+"TextControl",placeholder:o.label,value:c[o.name],onChange:e=>{c[o.name]=e,i({...t,[n]:c},"fields_map")}}));case"select":return s(a,o,n)&&(0,e.createElement)(d,{...p,key:f},(0,e.createElement)(l.StyledSelectControl,{options:o.options,value:c[o.name],onChange:e=>{c[o.name]=e,i({...t,[n]:c},"fields_map")}}));case"custom_select":return s(a,o,n)&&(0,e.createElement)(d,{...p,key:f},(0,e.createElement)(u.CustomSelectControl,{options:o.options,onChange:({selectedItem:e})=>{c[o.name]=e.key,i({...t,[n]:c},"fields_map")},value:o.options.find((e=>e.key===c[o.name]))}));case"grouped_select":return s(a,o,n)&&(0,e.createElement)(d,{...p,key:f},(0,e.createElement)(je,{options:o.options,value:c[o.name],onChange:e=>{c[o.name]=e,i({...t,[n]:c},"fields_map")}}));default:return null}})))},MapField:xe,FieldWrapper:function(t){const{attributes:n,children:r,wrapClasses:l=[],valueIfEmptyLabel:o="",setAttributes:a,childrenPosition:i="between"}=t,s=de(),c=H("_jf_args"),u=Xe((function(){We(n,a)}));function d(){return(0,e.createElement)(ze.VisualLabel,null,Qe(Ze("input label:","jet-form-builder")),(0,e.createElement)("div",{className:"jet-form-builder__label"},(0,e.createElement)(Ye,{key:s("rich-label"),placeholder:"Label...",allowedFormats:[],value:n.label?n.label:o,onChange:e=>a({label:e}),isSelected:!1,...u}),n.required&&(0,e.createElement)("span",{className:"jet-form-builder__required"},c.required_mark?c.required_mark:"*")))}function m(){return(0,e.createElement)("div",{className:"jet-form-builder__desc--wrapper"},Qe(Ze("input description:","jet-form-builder")),(0,e.createElement)(ze,{key:"custom_help_description",className:"jet-form-builder__desc"},(0,e.createElement)("div",{className:"components-base-control__help"},(0,e.createElement)(Ye,{key:s("rich-description"),tagName:"small",placeholder:"Description...",allowedFormats:[],value:n.desc,onChange:e=>a({desc:e}),style:{marginTop:"0px"}}))))}return"row"===c.fields_layout&&l.push("jet-form-builder-row__flex"),(0,e.createElement)(ze,{key:s("placeHolder_block"),className:_("jet-form-builder__field-wrap","jet-form-builder-row",l)},"row"!==c.fields_layout&&(0,e.createElement)(e.Fragment,null,"top"===i&&r,d(),"between"===i&&r,m(),"bottom"===i&&r),"row"===c.fields_layout&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"jet-form-builder-row__flex--label"},d(),m()),(0,e.createElement)("div",{className:"jet-form-builder-row__flex--content"},r)))},MacrosInserter:function({children:t,fields:n,onFieldClick:r,customMacros:l,zIndex:o=1e6,...a}){const[i,s]=rt((()=>!1));return(0,e.createElement)("div",{className:"jet-form-editor__macros-inserter"},(0,e.createElement)(et,{isTertiary:!0,isSmall:!0,icon:i?"no-alt":"admin-tools",label:"Insert macros",className:"jet-form-editor__macros-trigger",onClick:()=>{s((e=>!e))}}),i&&(0,e.createElement)(tt,{style:{zIndex:o},position:"bottom left",...a},n.length&&(0,e.createElement)(nt,{title:"Form Fields"},n.map((t=>(0,e.createElement)("div",{key:"field_"+t.name},(0,e.createElement)(et,{isLink:!0,onClick:()=>{r(t.name)}},"%"+t.name+"%"))))),l&&(0,e.createElement)(nt,{title:"Custom Macros"},l.map((t=>(0,e.createElement)("div",{key:"macros_"+t},(0,e.createElement)(et,{isLink:!0,onClick:()=>{r(t)}},"%"+t+"%")))))))},RepeaterWithState:function({children:t,ItemHeading:n,repeaterClasses:r=[],repeaterItemClasses:l=[],newItem:a,addNewButtonLabel:i="Add New",items:s=[],isSaveAction:c,onSaveItems:m,onUnMount:p,onAddNewItem:f,onRemoveItem:h,help:b={helpSource:{},helpVisible:()=>!1,helpKey:""},additionalControls:g=null}){const y=["jet-form-builder__repeater-component",...r].join(" "),v=["jet-form-builder__repeater-component-item",...l].join(" "),[w,E]=(0,o.useState)([]);(0,o.useEffect)((()=>{E(s&&s.length>0?s.map((e=>(e.__visible=!1,e))):[{...a,__visible:!0}])}),[]);const[_,C]=(0,o.useState)(!0),k=(e,t)=>{E((n=>{const r=JSON.parse(JSON.stringify(n));return r[t]={...n[t],...e},r}))},S=({oldIndex:e,newIndex:t})=>{E((n=>{const r=JSON.parse(JSON.stringify(n));return[r[t],r[e]]=[r[e],r[t]],r}))},j=e=>!(e{if(!0===c){for(const e in w)for(const t in w[e])t.startsWith("__")&&delete w[e][t];m(w),p()}else!1===c&&p()}),[c]);const x=e=>`jet-form-builder-repeater__item_${e}`,{helpSource:N,helpVisible:F,helpKey:T}=b,I=F(w)&&N&&N[T];return(0,e.createElement)("div",{className:y,key:"jet-form-builder-repeater"},I&&(0,e.createElement)("p",null,N[T].label),0(0,e.createElement)(u.Card,{elevation:2,className:v,key:x(l)},(0,e.createElement)(u.CardHeader,{className:"repeater__item__header"},(0,e.createElement)("div",{className:"repeater-item__left-heading"},(0,e.createElement)(u.ButtonGroup,{className:"repeater-action-buttons"},(0,e.createElement)(u.Button,{isSmall:!0,icon:r.__visible?"no-alt":"edit",onClick:()=>(e=>{E((t=>{const n=JSON.parse(JSON.stringify(t));return n[e].__visible=!n[e].__visible,n}))})(l),className:"repeater-action-button"}),(0,e.createElement)(u.Button,{isSmall:!0,isSecondary:!0,disabled:!Boolean(l),icon:"arrow-up-alt2",onClick:()=>(e=>{S({oldIndex:e,newIndex:e-1})})(l),className:"repeater-action-button"}),(0,e.createElement)(u.Button,{isSmall:!0,isSecondary:!0,disabled:j(l),icon:"arrow-down-alt2",onClick:()=>(e=>{S({oldIndex:e,newIndex:e+1})})(l),className:"repeater-action-button"})),(0,e.createElement)("span",{className:"repeater-item-title"},n&&(0,e.createElement)(n,{currentItem:r,index:l,changeCurrentItem:e=>k(e,l)}),!n&&`#${l+1}`)),(0,e.createElement)(u.ButtonGroup,null,(0,e.createElement)(u.Button,{isSmall:!0,isSecondary:!0,onClick:()=>(e=>{E((t=>{const n=JSON.parse(JSON.stringify(t)),[r,l]=[n.slice(0,e+1),n.slice(e+1)];return[...r,n[e],...l]}))})(l)},(0,d.__)("Clone","jet-form-builder")),(0,e.createElement)(u.Button,{isSmall:!0,isSecondary:!0,isDestructive:!0,onClick:()=>(e=>{_&&!(e=>confirm((0,d.sprintf)((0,d.__)("Are you sure you want to remove item %d?","jet-form-builder"),e+1)))(e)||h&&!h(e,w)||E((t=>{const n=JSON.parse(JSON.stringify(t));return n.splice(e,1),n}))})(l)},(0,d.__)("Delete","jet-form-builder")))),r.__visible&&(0,e.createElement)(u.CardBody,{className:"repeater-item__content"},t&&(0,e.createElement)(o.Fragment,{key:`repeater-component__item_${l}`},"function"==typeof t&&t({currentItem:r,changeCurrentItem:e=>k(e,l),currentIndex:l}),"function"!=typeof t&&t),!t&&"Set up your Repeater Template, please.")))),1{return e=a,f&&f(e,w),void E((t=>[...t,{...e,__visible:!0}]));var e}},i))},AdvancedFields:function(){return(0,e.createElement)(kt,null,(0,e.createElement)(at,null),(0,e.createElement)(ct,null),(0,e.createElement)(gt,null),(0,e.createElement)(wt,null),(0,e.createElement)(Ct,null))},GeneralFields:function({hasMacro:t=!0}){return(0,e.createElement)(On,{title:Rn("General","jet-form-builder"),key:"jet-form-general-fields"},(0,e.createElement)(Ft,null),(0,e.createElement)(Pt,null),(0,e.createElement)(Dt,null),(0,e.createElement)(An,{hasMacro:t}))},ToolBarFields:function({children:t=null}){return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Vn,null,t),(0,e.createElement)(zn,null))},FieldControl:function(t){const{setAttributes:n,attributes:r}=t,l=function({type:e,attributes:t,attrsSettings:n={}}){const r=Ls()["data-type"],l=er();return l[e]?l[e].attrs.filter((({attrName:e,label:l,...o})=>{const a=e in t,i=(e=>{if(!e.condition)return!0;if(r&&e.condition.blockName){if("string"==typeof e.condition.blockName&&r!==e.condition.blockName)return!1;if("object"==typeof e.condition.blockName&&e.condition.blockName.length&&!e.condition.blockName.includes(r))return!1}return!(!function(){if("object"!=typeof e.condition.attr)return!0;const{operator:n="and",items:r={}}=e.condition.attr;if("or"===n.toLowerCase())for(const e in r)if(r[e]===t[e])return!0;return"and"!==n.toLowerCase()||function(){for(const e in r)if(r[e]!==t[e])return!1;return!0}()}()||"string"==typeof e.condition.attr&&e.condition.attr&&!t[e.condition.attr]||"string"==typeof e.condition&&!t[e.condition])})(o),s=e in n&&"show"in n[e]&&!1===n[e].show;return a&&i&&!s})):[]}(t),o=(e,t)=>{n({[t]:e})};return l.map((({help:t="",attrName:n,label:l,...a})=>{switch(a.type){case"text":return(0,e.createElement)(Ds,{key:`${a.type}-${n}-TextControl`,label:l,help:t,value:r[n],onChange:e=>o(e,n)});case"select":return(0,e.createElement)(qs,{key:`${a.type}-${n}-SelectControl`,label:l,help:t,value:r[n],options:a.options,onChange:e=>{o(e,n)}});case"toggle":return(0,e.createElement)(Vs,{key:`${a.type}-${n}-ToggleControl`,label:l,help:t,checked:r[n],onChange:e=>{o(e,n)}});case"number":return(0,e.createElement)(Js,{key:`${a.type}-${n}-BaseControl`,label:l},(0,e.createElement)(Us,{key:`${a.type}-${n}-NumberControl`,value:r[n],onChange:e=>{o(Number(e),n)}}),(0,e.createElement)("p",{className:"components-base-control__help",style:{color:"rgb(117, 117, 117)"}},t));default:return null}}))},HorizontalLine:function(t){return(0,e.createElement)("hr",{style:{...t}})},FieldSettingsWrapper:function(t){const{title:n,children:r}=t,l=Zn()["data-type"].replace("/","-"),o=Xn(`jet.fb.render.settings.${l}`,null);return(r||o)&&(0,e.createElement)(Kn,{title:n||Yn("Field","jet-form-builder")},r,o)},GroupedSelectControl:je,BaseHelp:ut,GatewayFetchButton:nr,ValidationToggleGroup:function({excludeBrowser:t=!1}){var n;const[r,l]=fe(),o=de();return Ia=Ia.filter((({value:e})=>"browser"!==e||!t)),(0,e.createElement)(Na,{onChange:e=>l((t=>({...t,validation:{...r.validation,type:e}}))),value:null!==(n=r.validation?.type)&&void 0!==n?n:"inherit",label:Ta("Validation type","jet-form-builder"),isBlock:!0,isAdaptiveWidth:!1},(0,e.createElement)(Fa,{label:Ta("Inherit","jet-form-builder"),value:"inherit","aria-label":Ta("Inherit from form's args","jet-form-builder"),showTooltip:!0}),Ia.map((t=>(0,e.createElement)(Fa,{key:o(t.value+"_key"),label:t.label,value:t.value,"aria-label":t.title,showTooltip:!0}))))},ValidationBlockMessage:function({name:t}){var n,r,l;const o=de(),[a,i]=fe(),[s]=(0,Ba.useMetaState)("_jf_validation","{}",[]),c=!a.validation?.type,u=c?null!==(n=s?.messages)&&void 0!==n?n:{}:null!==(r=a.validation?.messages)&&void 0!==r?r:{},d=Oa(t);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ra,{disabled:c,key:o("massage_"+t),label:d?.label,help:d?.help,value:null!==(l=u[t])&&void 0!==l?l:d?.initial,onChange:e=>i((n=>({...n,validation:{...a.validation,messages:{...u,[t]:e}}})))}))},ValidationMetaMessage:function({message:t,update:n,value:r=null,help:o=null}){const a=Oa(t.id);return(0,e.createElement)(l.StyledFlexControl,{direction:"column"},(0,e.createElement)(u.Flex,null,(0,e.createElement)(l.Label,{htmlFor:t.id},a.label),(0,e.createElement)(u.Flex,{style:{width:"auto"}},t.blocks.map((t=>(0,e.createElement)(u.Tooltip,{key:"message_block_item"+t.title,text:t.title,delay:200,placement:"top"},(0,e.createElement)(Ma,{icon:t.icon})))))),(0,e.createElement)(l.StyledTextControl,{className:l.ClearBaseControlStyle,id:t.id,help:null!=o?o:a?.help,value:null!=r?r:a?.initial,onChange:e=>n((n=>({...n,[t.id]:e})))}))},DynamicValues:Ui,EditAdvancedRulesButton:function(){const[t,n]=Ps(!1);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ws.Provider,{value:{showModal:t,setShowModal:n}},(0,e.createElement)("div",{className:"jet-fb mb-24"},(0,e.createElement)(Ms,null))),t&&(0,e.createElement)(h,{title:Gs("Edit Advanced Rules","jet-form-builder"),classNames:["width-60"],onRequestClose:()=>n(!1)},(0,e.createElement)(ys,null)))},RepeaterStateContext:ha,RepeaterState:La,BlockLabel:Ft,BlockName:Pt,BlockDescription:Dt,BlockDefaultValue:An,BlockPlaceholder:at,BlockAddPrevButton:ct,BlockPrevButtonLabel:gt,BlockVisibility:wt,BlockClassName:Ct,BlockAdvancedValue:function({help:t,label:n,hasMacro:r=!0,...l}){return(0,e.createElement)("div",{...l},(0,e.createElement)(An,{help:t,label:n,hasMacro:r}),(0,e.createElement)("hr",null),(0,e.createElement)(Ui,null))},MacrosFields:bn,MacrosButtonTemplate:zt,MacrosFieldsTemplate:dn,ShowPopoverContext:Jt,PopoverItem:Zt,PresetButton:qt,ConditionItem:di,AdvancedInspectorControl:En,AdvancedModalControl:Qa,ClientSideMacros:xn,ToggleControl:function t({checked:n=!1,disabled:r=!1,onChange:l=()=>{},children:o=null,help:a=null,flexLabelProps:i={},outsideLabel:s=null,__nextHasNoMarginBottom:c=!1,...u}){const d=a,m=`inspector-jfb-toggle-control-${Ys(t)}`;return(0,e.createElement)(Ws,{id:m},(0,e.createElement)(zs,{direction:"column"},(0,e.createElement)(zs,{gap:3,align:"flex-start",justify:"flex-start",...i},(0,e.createElement)(Hs,{id:m,checked:n,onChange:e=>l(e.target.checked),disabled:r,...u}),(0,e.createElement)("label",{htmlFor:m},o),s),"string"==typeof d?(0,e.createElement)(ut,null,d):d&&(0,e.createElement)(d,null)))},DetailsContainer:Mi,HoverContainer:Ri,ContainersList:qi,HumanReadableConditions:Oi,ConditionsRepeaterContextProvider:hi,ServerSideMacros:function({children:t}){const n=(0,K.useRequestFields)();return(0,e.createElement)(Kt.Provider,{value:{afterFields:n}},t)},SelectVariations:function({value:t}){const{name:n}=rc(),[,r]=fe(),{variations:l,rawVariations:o}=ec((t=>{const{getBlockVariations:r}=t("core/blocks"),l=r(n,"block"),o=[],a={};for(const t of l)o.push({key:t.name,name:(0,e.createElement)("span",{className:"jet-fb flex gap-1em ai-center"},(0,e.createElement)(nc,{icon:t.icon}),t.title)}),a[t.name]=t;return{variations:o,rawVariations:a}}),[n]);return l.length?(0,e.createElement)(tc,{__nextUnconstrainedWidth:!0,hideLabelFromVision:!0,options:l,size:"__unstable-large",onChange:({selectedItem:e})=>r({...o[e.key].attributes}),value:l.find((({key:e})=>e===t))}):null},ToggleGroupVariations:function(t){const n=ac(bc);return n?.currentId?(0,e.createElement)(hc,{className:"jet-fb toggle-toolbar-group"},(0,e.createElement)(gc,{...t})):(0,e.createElement)(gc,{...t})},AttributeHelp:ft,ActionButtonPlaceholder:function(t){const n=Ec();return(0,e.createElement)("div",{...n},(0,e.createElement)("div",{className:t.wrapperClasses.join(" ")},(0,e.createElement)(Cc,{isPrimary:!0,className:t.buttonClasses.join(" ")},(0,e.createElement)(_c,{placeholder:"Input Submit label...",allowedFormats:[],value:t.attributes.label,onChange:e=>t.setAttributes({label:e})}))))},ActionModalFooterSlotFill:c,ScopedAttributesProvider:function({children:t}){const[n,r]=fe(),[l,o]=xc((()=>n));return(0,e.createElement)(Sc.Provider,{value:{realAttributes:n,setRealAttributes:r,attributes:l,setAttributes:o}},t)}},window.JetFBActions={...null!==(Bc=window?.JetFBActions)&&void 0!==Bc?Bc:{},withPreset:ge,getInnerBlocks:R,getAvailableFieldsString:function(e){const t=T([e]),n=[];return t.forEach((function(e){n.push("%FIELD::"+e+"%")})),I("Available fields: ","jet-form-builder")+n.join(", ")},getAvailableFields:T,getFormFieldsBlocks:F,getFieldsWithoutCurrent:O,gatewayAttr:P,gatewayLabel:G,registerGateway:function(e,t,n="cred"){window.JetFBGatewaysList=window.JetFBGatewaysList||{},window.JetFBGatewaysList[e]=window.JetFBGatewaysList[e]||{},window.JetFBGatewaysList[e][n]=t},Tools:k,event:e=>{const t=new Event(e);return()=>document.dispatchEvent(t)},listen:(e,t)=>{document.addEventListener(e,t)},renderGateway:D,renderGatewayWithPlaceholder:function(e,t,n="cred",r=null){return L(e,n)?(t.Placeholder=r,D(e,t,n)):r},maybeCyrToLatin:w,getConvertedName:E,getBlockControls:function(e="all"){if(!e)return!1;const t=er();return"all"===e?t:!!(t[e]&&t[e].attrs&&Array.isArray(t[e].attrs)&&0{e.includes(n.name)&&t.push(n)})),t},convertObjectToOptionsList:function(e=[],{usePlaceholder:t=!0,label:n="--",value:r=""}={}){const l={label:n,value:r};if(!e)return t?[l]:[];const o=Object.entries(e).map((e=>({value:e.value,label:e.label})));return t?[l,...o]:o},appendField:function(e,t=[]){M("jet.fb.register.fields","jet-form-builder",(n=>n.map((n=>t.length&&!t.includes(n.name)?n:e(n)))))},insertMacro:Nn,column:y,getCurrentInnerBlocks:function(){const{"data-block":e}=Ks();return R(e)},humanReadableCondition:pi,assetUrl:function(e=""){return JetFormEditorData.assetsUrl+e},set:function(e,t,n){const r=JSON.parse(JSON.stringify(e));let l,o=r;for(let e=0;e{function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t}},window.JetFBHooks={...null!==(Ac=window?.JetFBHooks)&&void 0!==Ac?Ac:{},useSelectPostMeta:H,useSuccessNotice:$,useEvents:ae,useRequestEvents:function(){const e=ie((e=>e("jet-forms/actions").getCurrentAction()));return ae(e)},useBlockConditions:ce,useUniqKey:de,useBlockAttributes:fe,useIsAdvancedValidation:function(){const{type:e}=H("_jf_validation"),[t]=fe();return t.validation?.type?"advanced"===t.validation?.type:"advanced"===e},useGroupedValidationMessages:function(){const[e]=$e(He);return e},withSelectFormFields:(e=[],t=!1,n=!1)=>r=>{let l=[];const o=["submit","form-break","heading","group-break","conditional",...e];return Y((e=>{e.name.includes("jet-forms/")&&e.attributes.name&&!o.find((t=>e.name.includes(t)))&&l.push({blockName:e.name,name:e.attributes.name,label:e.attributes.label||e.attributes.name,value:e.attributes.name})}),r("core/block-editor").getBlocks()),l=t?[{value:"",label:t},...l]:l,{formFields:n?l:z("jet.fb.getFormFieldsBlocks",l)}},withSelectGateways:X,withDispatchGateways:function(e){const t=e("jet-forms/gateways");return{setGatewayRequest:t.setRequest,setGatewayScenario:t.setScenario,setScenario:t.setCurrentScenario,setGateway:t.setGateway,setGatewayInner:t.setGatewayInner,setGatewaySpecific:t.setGatewaySpecific,clearGateway:t.clearGateway,clearScenario:t.clearScenario}},useOnUpdateModal:W,useInsertMacro:Tn,useIsHasAttribute:he,useUniqueNameOnDuplicate:function(e=null){const t=Qs(),[,n]=fe(),r=t["data-block"],l=Zs((e=>{if(!e(Wo).isRecentlyAdded(r))return!1;const{hasChanged:t,names:n}=e(Wo).getUniqueNames(r);return!!t&&n}),[r]);Xs((()=>{l&&("function"!=typeof e?n({name:l.split("|")[0]}):e(l))}),[l])},useSupport:function(e){const{name:t}=vc();return yc((n=>{const r=n("core/blocks").getBlockType(t);return wc(r,["supports",e],!1)}),[t,e])},useScopedAttributesContext:function(){return jc(Sc)},useOpenEditorPanel:function(e){const{enableComplementaryArea:t}=Tc("core/interface"),{toggleEditorPanelOpened:n}=Tc("core/edit-post"),r=Fc((t=>t("core/edit-post").isEditorPanelOpened(e)),[e]);return()=>{t("core/edit-post","edit-post/document"),!r&&n(e)}}}})()})(); \ No newline at end of file +(()=>{var e={115:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(6758),l=n.n(r),o=n(935),a=n.n(o)()(l());a.push([e.id,".syma2t4{height:40px;min-height:40px;line-height:1.5;}\n",""]);const i=a},483:(e,t,n)=>{var r=n(4239);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals),(0,n(611).A)("62ebcc8a",r,!1,{})},611:(e,t,n)=>{"use strict";function r(e,t){for(var n=[],r={},l=0;lf});var l="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!l)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o={},a=l&&(document.head||document.getElementsByTagName("head")[0]),i=null,s=0,c=!1,u=function(){},d=null,m="data-vue-ssr-id",p="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function f(e,t,n,l){c=n,d=l||{};var a=r(e,t);return h(a),function(t){for(var n=[],l=0;ln.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(l=0;l{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,l,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var i=0;i0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),l&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=l):u[4]="".concat(l)),t.push(u))}},t}},4023:(e,t,n)=>{var r=n(115);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals),(0,n(611).A)("55433ea3",r,!1,{})},4180:()=>{const e=()=>{const{select:e}=wp.data;return e("core/editor").getEditedPostAttribute("meta")},t=(t,n)=>{const{dispatch:r}=wp.data,{editPost:l}=r("core/editor");l({meta:{...e(),[t]:JSON.stringify(n)}})},n=e=>{const t=[];for(const[n,{active:r=!1}]of Object.entries(e))r&&t.push(+n);return t};wp.domReady((()=>(async()=>{await(async()=>new Promise((e=>{const t=setInterval((()=>{wp.data.select("core/editor").getCurrentPostType()&&(clearInterval(t),e())}),100)})))();let r={},l=[];try{[r={},l=[]]=(()=>{const t=e();let n={},r=[];try{n=JSON.parse(t._jf_gateways)}catch(e){return[]}if(1===n.last_migrate)throw"migrated";try{r=JSON.parse(t._jf_actions)}catch(e){return[n]}return[n,r]})()}catch(e){return}r.last_migrate=1,t("_jf_gateways",r);const o=[];try{o.push(...((e,t)=>{var r,l,o,a;const i=n(null!==(r=e.notifications_success)&&void 0!==r?r:{}),s=n(null!==(l=e.notifications_failed)&&void 0!==l?l:{}),c=n(null!==(o=e.notifications_before)&&void 0!==o?o:{}),u=null!==(a=e.use_success_redirect)&&void 0!==a&&a;let d=!1;if(!(i.length||s.length||c.length||u))throw"nothing_to_migrate";return t.map((e=>{var t;return e.events=null!==(t=e.events)&&void 0!==t?t:[],i.includes(e.id)&&e.events.push("GATEWAY.SUCCESS"),s.includes(e.id)&&e.events.push("GATEWAY.FAILED"),c.includes(e.id)&&e.events.push("DEFAULT.PROCESS"),u&&!d&&"redirect_to_page"===e.type&&(e.events.push("GATEWAY.SUCCESS"),d=!0),e}))})(r,l))}catch(e){return}t("_jf_actions",o)})()))},4239:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(6758),l=n.n(r),o=n(935),a=n.n(o)()(l());a.push([e.id,".sfqmk5y svg{height:24px;width:24px;}\n",""]);const i=a},6758:e=>{"use strict";e.exports=function(e){return e[1]}}},t={};function n(r){var l=t[r];if(void 0!==l)return l.exports;var o=t[r]={id:r,exports:{}};return e[r](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 r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";const e=window.React,{createContext:t}=wp.element,r=t({name:"",data:{},index:0}),l=window.jfb.components,o=window.wp.element,{createContext:a}=wp.element,i=a({actionClick:null,onRequestClose:()=>{}}),{createSlotFill:s}=wp.components,c=s("JFBActionModalFooter"),u=window.wp.components,d=window.wp.i18n,{Slot:m}=c;let{ToggleGroupControl:p,__experimentalToggleGroupControl:f}=wp.components;p=p||f;const h=function({onRequestClose:t,children:n,title:r="",classNames:l=[],className:a="",onUpdateClick:s,onCancelClick:c,updateBtnLabel:f="Update",updateBtnProps:h={},cancelBtnProps:b={},cancelBtnLabel:g="Cancel",fixedHeight:y="",...v}){const w=["jet-form-edit-modal",...l,a],[E,_]=(0,o.useState)(null),C=()=>{s&&s(),_(!0)},k=()=>{c&&c(),_(!1)};let S={};return y&&(S={height:y},w.push("jet-modal-fixed-height")),(0,e.createElement)(u.Modal,{onRequestClose:t,className:w.join(" "),title:r,style:S,...v},!n&&(0,e.createElement)("div",{className:"jet-form-edit-modal__content"},(0,d.__)("Action callback is not found.","jet-form-builder")),n&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"jet-form-edit-modal__wrapper"},(0,e.createElement)(i.Provider,{value:{actionClick:E,onRequestClose:t}},(0,e.createElement)("div",{className:"jet-form-edit-modal__content"},"function"==typeof n&&n({actionClick:E,onRequestClose:t}),"function"!=typeof n&&n))),(0,e.createElement)(m,{fillProps:{updateClick:C,cancelClick:k}},(t=>Boolean(t?.length)?t:(0,e.createElement)(p,{className:"jet-form-edit-modal__actions jfb-toggle-group-control",hideLabelFromVision:!0},(0,e.createElement)(u.Button,{isPrimary:!0,onClick:C,...h},f),(0,e.createElement)(u.Button,{isSecondary:!0,style:{margin:"0 0 0 10px"},onClick:k,...b},g))))))},{RawHTML:b,useContext:g}=wp.element;function y(e,t){return e?.length?e.map((e=>"object"==typeof e?e[t]:e)):[]}const v=(0,window.wp.hooks.applyFilters)("jet.fb.tools.convertSymbols",{checkCyrRegex:/[а-яёїєґі]/i,cyrRegex:/[а-яёїєґі]/gi,charsMap:{а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"io",ж:"zh",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"ts",ч:"ch",ш:"sh",щ:"shch",ы:"y",э:"e",ю:"iu",я:"ia",ї:"i",є:"ie",ґ:"g",і:"i"}});function w(e){return v.checkCyrRegex.test(e)&&(e=e.replace(v.cyrRegex,(function(e){return void 0===v.charsMap[e]?"":v.charsMap[e]}))),e}function E(e){let t=e.toLowerCase();t=t.normalize("NFD").replace(/[\u0300-\u036f]/g,""),t=w(t);const n=t.match(/\b(\w+)\b/g);t="";for(const[e,r]of Object.entries(n)){t+=(0===+e?"":"_")+r;const l=+e+1===n.length;if(t.length>60)return t+(l?"":"__")}return t}function _(...e){const t=[],n=e=>{e.forEach((e=>{if(e&&(Array.isArray(e)&&n(e),"string"==typeof e&&t.push(e.trim()),"object"==typeof e))for(const n in e)e[n]&&t.push((n+"").trim())}))};return n(e),t.join(" ")}function C(e){return null==e||("object"!=typeof e||Array.isArray(e)?"number"==typeof e?0===e:!e?.length:!Object.keys(e)?.length)}const k=class{static withPlaceholder(e,t="--",n=""){return[{label:t,value:n},...e]}static getRandomID(){return Math.floor(8999*Math.random())+1e3}},{select:S}=wp.data,j=function(e){const t=(n,r=null)=>{(n=n||S("core/block-editor").getBlocks()).forEach((n=>{if(e(n,r),n.innerBlocks.length){const e="jet-forms/repeater-field"===n.name?n:r;return void t(n.innerBlocks,e)}if("core/block"!==n.name)return;let l=S("core/block-editor")?.__unstableGetClientIdsTree?.(n.clientId);if(!l?.length)return;const o=l.map((({clientId:e})=>e));l=S("core/block-editor").getBlocksByClientId(o),t(l)}))};t()},{applyFilters:x}=wp.hooks,{select:N}=wp.data,F=function(e=[],t=!1,n=!1,r="default"){let l=[];const o=["submit","form-break","heading","group-break","conditional",...e];return j((e=>{if(e.name.includes("jet-forms/")&&!o.find((t=>e.name.includes(t)))){const t=N("core/blocks").getBlockType(e.name);let{fields:n=[]}=t.jfbResolveBlock.call(e,r);t.hasOwnProperty("jfbGetFields")&&(n=t.jfbGetFields.call(e,r)),l.push(...n.filter((e=>!l.some((({value:t})=>t===e.value)))))}})),l=t?[{value:"",label:t},...l]:l,n?l:x("jet.fb.getFormFieldsBlocks",l,r)},T=function(e=[],t="default"){const n=[],r=F(e,!1,!1,t);return r&&r.forEach((e=>n.push(e.name))),n},{__:I}=wp.i18n,{applyFilters:B}=wp.hooks,{select:A}=wp.data,O=function(e=!1,t=!1,n="default"){const r=["submit","form-break","heading","group-break","conditional"];let l=[];const o=wp.data.select("core/block-editor").getSelectedBlock();return j((e=>{if(e.name.includes("jet-forms/")&&o?.clientId!==e.clientId&&!r.find((t=>e.name.includes(t)))){const t=A("core/blocks").getBlockType(e.name);let{fields:r=[]}=t.jfbResolveBlock.call(e,n);t.hasOwnProperty("jfbGetFields")&&(r=t.jfbGetFields.call(e,n)),l.push(...r.filter((e=>!l.some((({value:t})=>t===e.value)))))}})),l=e?[{value:"",label:e},...l]:l,t?l:B("jet.fb.getFormFieldsBlocks",l,n)},R=function(e){const t=wp.data.select("core/block-editor").getBlock(e);return t?t.innerBlocks:[]},{addFilter:M}=wp.hooks,P=function(e=!1,t=""){const n=window.JetFormEditorData.gateways;if(!e)return n;if(!n[e])return!1;const r=n[e];return e=>r[e]?r[e]:t},G=function(e,t=""){const n=P("labels");return r=>n(e)?n(e)[r]:t},L=function(e,t="cred"){return window.JetFBGatewaysList&&window.JetFBGatewaysList[e]&&window.JetFBGatewaysList[e][t]},D=function(t,n,r="cred"){if(!L(t,r))return null;const l=window.JetFBGatewaysList[t][r];return(0,e.createElement)(l,{...n})},{useState:q,useEffect:V}=wp.element,{useDispatch:J}=wp.data,$=function(e,t={}){const[n,r]=q(!1),l=J(wp.notices.store);return V((()=>{n&&l.createWarningNotice(e,{type:"snackbar",...t})}),[n]),r},{useSelect:U}=wp.data,H=function(e){const t=U((e=>e("core/editor").getEditedPostAttribute("meta")||{}));return JSON.parse(t[e]||"{}")},W=function(e){const{actionClick:t,onRequestClose:n}=(0,o.useContext)(i);(0,o.useEffect)((()=>{t&&e(),null!==t&&n()}),[t])},{applyFilters:z}=wp.hooks,Y=(e,t)=>{t.forEach((t=>{e(t),t.innerBlocks.length&&Y(e,t.innerBlocks)}))},K=window.jfb.actions,X=function(e){const t=e("jet-forms/gateways"),n=t.getCurrentRequestId(),r=t.getGatewaySpecific(),l=t.getScenario(),o=t.getGatewayId(),{id:a="PAY_NOW"}=l,{use_global:i=!1}=r,s=(0,K.globalTab)({slug:o}),c=P("additional")(o),u=e("jet-forms/actions").getLoading(n),d=P("labels"),m=G(o),p=function(e){return d(`${o}.${e}`)};return{gatewayGeneral:t.getGateway(),gatewayRequest:t.getCurrentRequest(),scenarioSource:c[a]||{},currentScenario:l[a]||{},CURRENT_SCENARIO:a,gatewayScenario:l,additionalSourceGateway:c,gatewaySpecific:r,gatewayRequestId:n,loadingGateway:u,getSpecificOrGlobal:(e,t="")=>i?s[e]||t:r[e]||t,globalGatewayLabel:d,specificGatewayLabel:m,customGatewayLabel:p,scenarioLabel:function(e){return p(`scenario.${a}.${e}`)}}},{useSelect:Z}=wp.data,Q=function(){const e=Z((e=>e("jet-forms/events").getAlwaysTypes())),t=[];for(const{value:n}of e)t.push(n);return[...new Set(t)]},{useSelect:ee}=wp.data,te=function(){var e;const t=H("_jf_gateways"),{scenario:n={}}=null!==(e=t[t?.gateway])&&void 0!==e?e:{};return ee((e=>{const r=e("jet-forms/events").getGatewayTypes(),l=[];for(const e of r){const r=!e.gateway||e.gateway===t.gateway,o=!e.scenario||e.scenario===n?.id;r&&o&&l.push(e.value)}return[...new Set(l)]}),[t.gateway,n?.id])},{useSelect:ne}=wp.data,re=function({index:e}){const t=H("_jf_actions"),n=ne((e=>e("jet-forms/actions").getActionsMap()),[]);t.splice(e,1);const r=[];for(const e of t){const t=n?.[e.type]?.provideEvents;if("function"!=typeof t)continue;const{[e.type]:l={}}=e.settings;r.push(...t(l))}return[...new Set(r)]},{useSelect:le}=wp.data,{useSelect:oe}=wp.data,ae=function(e){const t=[...Q(),...te(),...re(e),...le((e=>e("jet-forms/events").getDynamicTypes().map((({value:e})=>e))))];return oe((n=>n("jet-forms/events").filterList(e.type,t)))},{useSelect:ie}=wp.data,{useSelect:se}=wp.data,ce=function(){const[e,t]=se((e=>[e("jet-forms/block-conditions").getOperators(),e("jet-forms/block-conditions").getFunctions()]),[]);return{operators:e,functions:t}},{useBlockEditContext:ue}=wp.blockEditor,de=function(){const{clientId:e}=ue();return t=>t+"-"+e},me=window.wp.blockEditor,pe=window.wp.data,fe=function(e=null){const t=(0,me.useBlockEditContext)();let{clientId:n}=t;e&&(n=e);const r=(0,pe.useSelect)((e=>e("core/block-editor").getBlockAttributes(n)),[n]),{updateBlock:l}=(0,pe.useDispatch)("core/block-editor");return[r,e=>{e="object"==typeof e?e:e(r),e=(0,pe.select)("jet-forms/fields").getSanitizedAttributes(e,t),l(n,{attributes:e})}]},he=function(e){const t=(0,me.useBlockProps)()["data-type"];return(0,pe.useSelect)((n=>!!n("core/blocks").getBlockType(t).attributes[e]),[e,t])},{applyFilters:be}=wp.hooks,ge=function(t){return function(n){return(0,e.createElement)(t,{key:"wrapped-preset-editor",...n,parseValue:()=>{let e={};if("object"==typeof n.value)e={...n.value};else if(n.value&&"string"==typeof n.value)try{if(e=JSON.parse(n.value),"number"==typeof e)throw new Error}catch(t){e={}}return e.jet_preset=!0,e},isVisible:(e,t,n)=>(t.position&&n===t.position||!t.position||"query_var"!==e.from)&&((e,t)=>!t.condition&&!t.custom_condition||(t.custom_condition?"query_var"===t.custom_condition?"post"===e.from&&"query_var"===e.post_from||"user"===e.from&&"query_var"===e.user_from||"term"===e.from&&"query_var"===e.term_from||"query_var"===e.from:be("jet.fb.preset.editor.custom.condition",!1,t.custom_condition,e):!t.condition||e[t.condition.field]===t.condition.value))(e,t),isMapFieldVisible:(e,t,n)=>!((t.condition||t.parent_condition)&&(t.parent_condition&&!t.condition?e[t.parent_condition.field]!==t.parent_condition.value:t.parent_condition&&t.condition?!e.fields_map||!e.fields_map[n]||e.fields_map[n][t.condition.field]!==t.condition.value||e[t.parent_condition.field]!==t.parent_condition.value:!t.parent_condition&&t.condition&&(!e.fields_map||!e.fields_map[n]||e.fields_map[n][t.condition.field]!==t.condition.value))),isCurrentFieldVisible:(e,t,n)=>!((t.condition||t.parent_condition)&&(t.position&&n!==t.position||(t.parent_condition&&!t.condition?e[t.parent_condition.field]!==t.parent_condition.value:t.parent_condition&&t.condition?e["current_field_"+t.condition.field]!==t.condition.value||e[t.parent_condition.field]!==t.parent_condition.value:!t.parent_condition&&t.condition&&e["current_field_"+t.condition.field]!==t.condition.value))),excludeOptions:e=>{const t=[...e];return t.forEach(((e,r)=>{n.excludeSources&&n.excludeSources.includes(e.value)&&t.splice(r,1)})),t}})}},ye=function({data:t,value:n,index:r,onChangeValue:o,isVisible:a,excludeOptions:i=e=>e,position:s}){switch(t.type){case"text":return a(n,t,s)&&(0,e.createElement)("div",{key:"field_"+t.name+r,className:"jet-form-preset__row"},(0,e.createElement)(l.StyledTextControl,{key:t.name+r,label:t.label,value:n[t.name],onChange:e=>{o(e,t.name)}}));case"select":return a(n,t,s)&&(0,e.createElement)("div",{key:"field_"+t.name+r,className:"jet-form-preset__row"},(0,e.createElement)(l.StyledSelectControl,{key:t.name+r,options:i(t.options),label:t.label,value:n[t.name],onChange:e=>{o(e,t.name)}}))}return null};function ve(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var we=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Ee=ve((function(e){return we.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),_e=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),t={},n=[];e.forEach((e=>{(e?e.split(" "):[]).forEach((e=>{if(e.startsWith("atm_")){const[,n]=e.split("_");t[n]=e}else n.push(e)}))}));const r=[];for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.push(t[e]);return r.push(...n),r.join(" ")},Ce=(e,t)=>{const n={};return Object.keys(e).filter((e=>t=>-1===e.indexOf(t))(t)).forEach((t=>{n[t]=e[t]})),n},ke=function(t){let n="";return r=>{const l=(l,o)=>{const{as:a=t,class:i=n}=l;var s;const c=function(e,t){const n=Ce(t,["as","class"]);if(!e){const e="function"==typeof Ee?{default:Ee}:Ee;Object.keys(n).forEach((t=>{e.default(t)||delete n[t]}))}return n}(void 0===r.propsAsIs?!("string"==typeof a&&-1===a.indexOf("-")&&(s=a[0],s.toUpperCase()!==s)):r.propsAsIs,l);c.ref=o,c.className=r.atomic?_e(r.class,c.className||i):_e(c.className||i,r.class);const{vars:u}=r;if(u){const e={};for(const t in u){const n=u[t],o=n[0],a=n[1]||"",i="function"==typeof o?o(l):o;r.name,e[`--${t}`]=`${i}${a}`}const t=c.style||{},n=Object.keys(t);n.length>0&&n.forEach((n=>{e[n]=t[n]})),c.style=e}return t.__wyw_meta&&t!==a?(c.as=a,(0,e.createElement)(t,c)):(0,e.createElement)(a,c)},o=e.forwardRef?(0,e.forwardRef)(l):e=>{const t=Ce(e,["innerRef"]);return l(t,e.innerRef)};return o.displayName=r.name,o.__wyw_meta={className:r.class||n,extends:t},o}};const Se=ke("select")({name:"StyledSelect",class:"syma2t4",propsAsIs:!1}),je=function({id:t,label:n,onChange:r,options:l=[],value:o}){return!C(l)&&(0,e.createElement)(Se,{id:t,className:"components-select-control__input",onChange:e=>{r(e.target.value)},value:o},(0,e.createElement)("option",{key:`${n}-placeholder`,value:""},"--"),l.map(((t,n)=>!C(t.values)&&(0,e.createElement)("optgroup",{key:`${t.label}-${n}`,label:t.label},t.values.map(((t,r)=>(0,e.createElement)("option",{key:`${t.value}-${r}-${n}`,value:t.value,disabled:t.disabled},t.label)))))))};n(4023);const xe=function({data:t,value:n,index:r,currentState:o,onChangeValue:a,isCurrentFieldVisible:i}){switch(t.type){case"text":return i(o,t)&&(0,e.createElement)("div",{key:t.name+r,className:"jet-form-preset__row"},(0,e.createElement)(l.StyledTextControl,{key:"control_"+t.name+r,placeholder:t.label,value:n,onChange:e=>{a(e,"current_field_"+t.name)}}));case"select":return i(o,t)&&(0,e.createElement)("div",{key:t.name+r,className:"jet-form-preset__row"},(0,e.createElement)(l.StyledSelectControl,{key:"control_"+t.name+r,options:t.options,label:t.label,value:n,onChange:e=>{a(e,"current_field_"+t.name)}}));case"custom_select":return i(o,t)&&(0,e.createElement)("div",{key:t.name+r,className:"jet-form-preset__row"},(0,e.createElement)(u.CustomSelectControl,{className:"jet-custom-select-control",label:t.label,options:t.options,onChange:({selectedItem:e})=>{n=e.key,a(n,"current_field_"+t.name)},value:t.options.find((e=>e.key===n))}));case"grouped_select":return i(o,t)&&(0,e.createElement)("div",{key:t.name+r},(0,e.createElement)(l.Label,null,t.label),(0,e.createElement)(je,{options:t.options,value:n,onChange:e=>{a(e,"current_field_"+t.name)}}))}return null},{createContext:Ne}=wp.element,Fe=Ne({});let Te=function({value:t,onChange:n,parseValue:r,excludeOptions:a,isCurrentFieldVisible:i,isVisible:s}){var c,m;const p="dynamic",f=r(t),h=(0,o.useContext)(Fe),b=(e,t)=>{n((()=>JSON.stringify({...f,[t]:e})))};return(0,e.createElement)(l.StyledFlexControl,{direction:"column",gap:4},window.JetFormEditorData.presetConfig.global_fields.map(((t,n)=>(0,e.createElement)(ye,{key:`current_field_${t.name}_${n}`,value:f,index:n,data:t,excludeOptions:a,onChangeValue:b,isVisible:s,position:p}))),window.JetFormEditorData.presetConfig.map_fields.map(((t,n)=>(0,e.createElement)(xe,{key:`current_field_${t.name}_${n}`,currentState:f,value:f["current_field_"+t.name],index:n,data:t,onChangeValue:b,isCurrentFieldVisible:i,position:p}))),h?.show&&(0,e.createElement)(u.ToggleControl,{label:(0,d.__)("Restrict access","jet-form-builder"),help:null===(c=f.restricted)||void 0===c||c?(0,d.__)("Will set default value from preset only for users who allowed to edit this value","jet-form-builder"):(0,d.__)("Always set default value from preset. Make sure it can't be accidentally changed from form Actions","jet-form-builder"),checked:null===(m=f.restricted)||void 0===m||m,onChange:e=>{b(e?void 0:e,"restricted")}}))};Te=ge(Te);const Ie=Te,{SelectControl:Be,TextControl:Ae}=wp.components;class Oe extends wp.element.Component{constructor(e){super(e),this.fieldTypes=this.props.fieldTypes,this.taxonomiesList=this.props.taxonomiesList,this.className=this.props.className,this.metaProp=this.props.metaProp?this.props.metaProp:"post_meta",this.termsProp=this.props.termsProp?this.props.termsProp:"post_terms",this.index=this.props.index,this.init(),this.bindFunctions(),this.state={type:this.getFieldType(this.props.fieldValue)}}bindFunctions(){this.onChangeType=this.onChangeType.bind(this),this.onChangeValue=this.onChangeValue.bind(this)}init(){if(this.id=`inspector-select-control-${this.index}`,this.preparedTaxes=[],this.taxPrefix="jet_tax__",this.taxonomiesList)for(let e=0;e{const t=wp.data.select(De).getBlockType(`jet-forms/${e}`);return{title:t.title,icon:t.icon.src}})))}},Ve=class{constructor(){this.items=[]}push(e){this.items.push(new qe(e))}},{messages:Je}=window.jetFormValidation,{useState:$e}=wp.element,Ue=Je.sort(((e,t)=>e.supported.length-t.supported.length));function He(){const e=new Ve;for(const t of Ue)e.push(t);return e.items}const We=function(e,t){1>=e.label.length||e.name&&"field_name"!==e.name||t({name:E(e.label)})},{BaseControl:ze}=wp.components,{RichText:Ye}=wp.blockEditor;let{__experimentalUseFocusOutside:Ke,useFocusOutside:Xe}=wp.compose;Xe=Xe||Ke;const{__:Ze}=wp.i18n;function Qe(t){return(0,e.createElement)("small",{style:{whiteSpace:"nowrap",padding:"0.2em 0.8em 0 0",color:"#8e8a8a"}},t)}const{Button:et,Popover:tt,PanelBody:nt}=wp.components,{useState:rt}=wp.element,{__:lt}=wp.i18n,{TextControl:ot}=wp.components,at=function({label:t,help:n}){const[r,l]=fe();return he("placeholder")?(0,e.createElement)(ot,{label:null!=t?t:lt("Placeholder","jet-form-builder"),value:r.placeholder,help:null!=n?n:"",onChange:e=>l({placeholder:e})}):null},{__:it}=wp.i18n,{ToggleControl:st}=wp.components,ct=function({label:t,help:n}){const[r,l]=fe();return he("add_prev")?(0,e.createElement)(st,{label:null!=t?t:it("Add Prev Page Button","jet-form-builder"),help:null!=n?n:it('It is recommended to use the "Action Button" block with the "Go to Prev Page" type',"jet-form-builder"),checked:r.add_prev,onChange:e=>l({add_prev:e})}):null},ut=function({children:t,className:n="",style:r={},...l}){return(0,e.createElement)("p",{className:"jet-fb-base-control__help"+(n?` ${n}`:""),style:{fontSize:"12px",fontStyle:"normal",color:"rgb(117, 117, 117)",marginTop:"0px",...r},...l},t)},{useBlockEditContext:dt}=wp.blockEditor,{useSelect:mt}=wp.data,{__:pt}=wp.i18n,ft=function({name:t=!1,children:n=null}){const{name:r}=dt(),l=mt((e=>{var n;if(!1===t)return!1;const l=e("core/blocks").getBlockType(r);return null!==(n=l.attributes[t]?.jfb)&&void 0!==n&&n}),[r,t]);return l?(0,e.createElement)(ut,{className:"jet-fb mb-24"},n&&(0,e.createElement)(e.Fragment,null,n," "),l?.shortcode&&!l.rich&&!n&&pt("You can use shortcodes here.","jet-form-builder"),l?.shortcode&&!l.rich&&n&&pt("You can also use shortcodes here.","jet-form-builder")):Boolean(n)&&(0,e.createElement)(ut,{className:"jet-fb mb-24"},n)},{__:ht}=wp.i18n,{TextControl:bt}=wp.components,gt=function({label:t,help:n}){const[r,l]=fe();return r.add_prev?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bt,{label:null!=t?t:ht("Prev Page Button Label","jet-form-builder"),value:r.prev_label,className:"jet-fb m-unset",onChange:e=>l({prev_label:e})}),(0,e.createElement)(ft,{name:"prev_label"},null!=n?n:"")):null},{__:yt}=wp.i18n,{SelectControl:vt}=wp.components,wt=function({label:t,help:n}){const[r,l]=fe();return he("visibility")?(0,e.createElement)(vt,{options:[{value:"all",label:yt("For all","jet-form-builder")},{value:"logged_id",label:yt("Only for logged in users","jet-form-builder")},{value:"not_logged_in",label:yt("Only for NOT-logged in users","jet-form-builder")}],label:null!=t?t:yt("Field Visibility","jet-form-builder"),help:null!=n?n:"",value:r.visibility,onChange:e=>l({visibility:e})}):null},{__:Et}=wp.i18n,{TextControl:_t}=wp.components,Ct=function({label:t,help:n}){const[r,l]=fe();return(0,e.createElement)(_t,{label:null!=t?t:Et("CSS Class Name","jet-form-builder"),value:r.class_name,help:null!=n?n:"",onChange:e=>l({class_name:e})})},{InspectorAdvancedControls:kt}=wp.blockEditor,{__:St}=wp.i18n,{TextControl:jt}=wp.components;let{__experimentalUseFocusOutside:xt,useFocusOutside:Nt}=wp.compose;Nt=Nt||xt;const Ft=function({label:t,help:n}){const[r,l]=fe(),o=Nt((function(){We(r,l)}));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(jt,{label:null!=t?t:St("Field Label","jet-form-builder"),className:"jet-fb m-unset",value:r.label,onChange:e=>l({label:e}),...o}),(0,e.createElement)(ft,{name:"label"},null!=n?n:""))},Tt={};for(const{id:e,name:t}of window.jetFormActionTypes)Tt[e]=t;const{__:It}=wp.i18n,{TextControl:Bt,Icon:At,Flex:Ot,Tooltip:Rt}=wp.components,{useInstanceId:Mt}=wp.compose,Pt=function t({label:n,help:r}){const[l,o]=fe(),{message:a}=function(){const{clientId:e}=(0,me.useBlockEditContext)(),t=(0,K.useRequestFields)({returnOnEmptyCurrentAction:!1}),{inFormFields:n,hasParent:r,fieldNames:l}=(0,pe.useSelect)((t=>{var n;const r=t("jet-forms/fields").getBlockById(e);return{hasParent:!!r?.parentBlock,fieldNames:null!==(n=r?.fields?.map?.((({value:e})=>e)))&&void 0!==n?n:[],inFormFields:t("jet-forms/fields").isUniqueName(e)}}),[e]);if(!n)return{error:"not_unique_in_fields",message:(0,d.__)("The form field name must be unique. Please change it","jet-form-builder")};if(r)return{};const o=t.find((({value:e})=>l.includes(e)));return o?{error:"not_unique_in_actions",message:o?.from?(0,d.sprintf)((0,d.__)("The %s action already uses this field name. Please change it","jet-form-builder"),Tt[o.from]):(0,d.__)("The form field name must be unique. Please change it","jet-form-builder")}:{}}(),i=Mt(t,"AdvancedInspectorControl");return he("name")?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ot,{align:"center",justify:"flex-start",style:{marginBottom:"8px"}},(0,e.createElement)("label",{htmlFor:i,className:"jet-fb label"},null!=n?n:It("Form field name","jet-form-builder")),!!a&&(0,e.createElement)(Rt,{text:a,delay:200,placement:"top"},(0,e.createElement)(At,{icon:"warning",style:{color:"orange",cursor:"help"}}))),(0,e.createElement)(Bt,{id:i,value:l.name,help:null!=r?r:It("Should contain only lowercase Latin letters, numbers, “-”, or “_”. No spaces allowed.","jet-form-builder"),onChange:e=>o({name:e})})):null},{__:Gt}=wp.i18n,{TextControl:Lt}=wp.components,Dt=function({label:t,help:n}){const[r,l]=fe();return he("desc")?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Lt,{label:null!=t?t:Gt("Field Description","jet-form-builder"),value:r.desc,className:"jet-fb m-unset",onChange:e=>l({desc:e})}),(0,e.createElement)(ft,{name:"desc"},null!=n?n:"")):null},qt=function({value:t,onChange:n,title:r}){const[a,i]=(0,o.useState)(!1),[s,c]=(0,o.useState)(t);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(u.Button,{icon:"database",variant:"tertiary",isSmall:!0,className:"jet-fb-is-thick",onClick:()=>i(!0)}),a&&(0,e.createElement)(u.Modal,{size:"medium",title:null!=r?r:(0,d.__)("Edit Preset","jet-form-builder"),onRequestClose:()=>i(!1),className:l.ModalFooterStyle},(0,e.createElement)(Ie,{key:"dynamic_key_preset",value:s,onChange:c}),(0,e.createElement)(l.StickyModalActions,null,(0,e.createElement)(u.Button,{isPrimary:!0,onClick:()=>{n(s),i(!1)}},(0,d.__)("Update","jet-form-builder")),(0,e.createElement)(u.Button,{isSecondary:!0,onClick:()=>{i(!1)}},(0,d.__)("Cancel","jet-form-builder")))))},{createContext:Vt}=wp.element,Jt=Vt(!1),{useState:$t,useRef:Ut}=wp.element,{Button:Ht,Popover:Wt}=wp.components,zt=function({children:t,...n}){const[r,l]=$t(!1),o=Ut();return(0,e.createElement)(Jt.Provider,{value:{showPopover:r,setShowPopover:l}},(0,e.createElement)(Ht,{ref:o,icon:"admin-tools",variant:"tertiary",isSmall:!0,className:"jet-fb-is-thick",onClick:()=>l((e=>!e)),...n}),r&&(0,e.createElement)(Wt,{anchor:o.current,position:"top-start",noArrow:!1,variant:"toolbar",onFocusOutside:e=>{e.relatedTarget!==o.current&&l(!1)},onClose:()=>l(!1)},t))},{createContext:Yt}=wp.element,Kt=Yt([]),{createContext:Xt}=wp.element,Zt=Xt({name:""});function Qt(){}Qt.prototype={fullName(){},fullHelp(){}};const en=Qt,{useState:tn}=wp.element,{Button:nn}=wp.components,rn=function({current:t,children:n}){const[r,l]=tn(!1);if(!(t instanceof en))return(0,e.createElement)("li",null,(0,e.createElement)(Zt.Provider,{value:t},n));const o=t.fullHelp.bind(t);return(0,e.createElement)("li",null,(0,e.createElement)(Zt.Provider,{value:t},(0,e.createElement)("div",{style:{display:"flex",alignItems:"center",gap:"0.6em"}},(0,e.createElement)(nn,{isSmall:!0,variant:"tertiary",icon:r?"arrow-down":"arrow-right",className:"jet-fb-is-thick",onClick:()=>l((e=>!e))}),n),r&&(0,e.createElement)(o,null)))},{Children:ln,cloneElement:on}=wp.element,{PanelBody:an}=wp.components,sn=function({title:t,items:n,children:r,initialOpen:l}){const o=n.map(((t,n)=>(0,e.createElement)(rn,{key:n,current:t})));return(0,e.createElement)(an,{title:t,initialOpen:l},(0,e.createElement)("ul",{style:{padding:"0 0.5em"}},ln.map(o,(e=>on(e,{},r)))))},{useContext:cn}=wp.element,{__:un}=wp.i18n,dn=function({children:t,fields:n,...r}){var l,o;const a=cn(Kt),i=[...null!==(l=a.beforeFields)&&void 0!==l?l:[],...n,...null!==(o=a.afterFields)&&void 0!==o?o:[]];return i.length||a?.extra?.length||a?.filters?.length?(0,e.createElement)(zt,{...r},Boolean(i.length)&&(0,e.createElement)(sn,{title:un("Fields:","jet-form-builder"),items:i,initialOpen:!0},t),Boolean(a?.extra?.length)&&(0,e.createElement)(sn,{title:un("Extra macros:","jet-form-builder"),items:a.extra},t),Boolean(a?.filters?.length)&&(0,e.createElement)(sn,{title:un("Filters:","jet-form-builder"),items:a.filters},t)):null},{useContext:mn}=wp.element,{Button:pn}=wp.components,fn=function({onClick:t}){const n=mn(Zt),r=n.fullName?n.fullName():`%${n.value}%`,l="function"==typeof n.label?n.label():r;return(0,e.createElement)(pn,{isLink:!0,onClick:()=>t(r)},l)},hn=window.jfb.blocksToActions,bn=function({onClick:t=()=>{},withCurrent:n=!1,...r}){const l=(0,hn.useFields)({excludeCurrent:!n});return(0,e.createElement)(dn,{withCurrent:n,fields:l,...r},(0,e.createElement)(fn,{onClick:t}))},{Flex:gn}=wp.components,yn=function({label:t,children:n,...r}){return(0,e.createElement)(gn,{align:"center",justify:"flex-start",style:{marginBottom:"8px"}},(0,e.createElement)("label",{className:"jet-fb label",...r},t),n)},{FlexItem:vn}=wp.components,{useInstanceId:wn}=wp.compose,En=function({children:t,value:n,label:r,onChangePreset:l=!1,onChangeMacros:o=!1}){const a=wn(vn,"jfb-AdvancedInspectorControl");return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(yn,{label:r,htmlFor:a},!1!==l&&(0,e.createElement)(qt,{value:n,onChange:l}),!1!==o&&(0,e.createElement)(bn,{onClick:o})),"function"==typeof t?t({instanceId:a}):t)};function _n(){en.call(this)}_n.prototype=Object.create(en.prototype),_n.prototype.isServerSide=!1,_n.prototype.isClientSide=!1,_n.prototype.name="",_n.prototype.namespace="CT",_n.prototype.help=null,_n.prototype.fullHelp=function(){return this.help},_n.prototype.fullName=function(){return`%${this.namespace}::${this.name}%`};const Cn=_n,{useSelect:kn}=wp.data,{__:Sn}=wp.i18n,jn=new Cn;jn.fullName=()=>"%this%",jn.fullHelp=()=>Sn("Returns current field value","jet-form-builder");const xn=function({children:t,withThis:n=!1}){const r=kn((e=>e("jet-forms/macros").getClientMacros()),[]),l=kn((e=>e("jet-forms/macros").getClientFilters()),[]),o=n?{extra:r,afterFields:[jn],filters:l}:{extra:r,filters:l};return(0,e.createElement)(Kt.Provider,{value:o},t)};function Nn(e,t,n){const r=n.selectionStart,l=n.selectionEnd;(e=null!=e?e:"").length||(t=`'${t}'`);let o=e.slice(0,r);const a=e.slice(l);return o+=t,setTimeout((()=>{n.focus(),n.selectionStart=o.length,n.selectionEnd=o.length})),o+a}const{useRef:Fn}=wp.element,Tn=function(e){var t;const[n,r]=fe(),l=null!==(t=n[e])&&void 0!==t?t:"",o=Fn();return[o,t=>{r({[e]:Nn(l,t,o.current)})}]},{__:In}=wp.i18n,{TextControl:Bn}=wp.components,An=function({label:t,help:n,hasMacro:r=!0}){const[l,o]=fe(),[a,i]=Tn("default");return he("default")?(0,e.createElement)(Fe.Provider,{value:{show:!0}},(0,e.createElement)(xn,null,(0,e.createElement)(En,{value:l.default,label:null!=t?t:In("Default Value","jet-form-builder"),onChangePreset:e=>o({default:e}),onChangeMacros:!!r&&i},(({instanceId:t})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Bn,{ref:a,id:t,value:l.default,className:"jet-fb m-unset",onChange:e=>o({default:e})}),(0,e.createElement)(ft,{name:"default"},null!=n?n:"")))))):null},{PanelBody:On}=wp.components,{__:Rn}=wp.i18n,{BlockControls:Mn}=wp.blockEditor,{useCopyToClipboard:Pn}=wp.compose,{TextControl:Gn,ToolbarGroup:Ln,ToolbarItem:Dn,ToolbarButton:qn}=wp.components,Vn=function({children:t=null}){const n=de(),[r,l]=fe(),o=$(`Copied "${r.name}" to clipboard.`),a=Pn(r.name,(()=>o(!0)));return(0,e.createElement)(Mn,{key:n("ToolBarFields-BlockControls")},(0,e.createElement)(Ln,{key:n("ToolBarFields-ToolbarGroup"),className:"jet-fb-block-toolbar"},(0,e.createElement)(qn,{isSmall:!0,icon:"admin-page",showTooltip:!0,shortcut:"Copy name",ref:a}),(0,e.createElement)(Dn,{as:Gn,value:r.name,onChange:e=>l({name:e})}),t))},{__:Jn}=wp.i18n,{ToolbarButton:$n}=wp.components,{BlockControls:Un}=wp.blockEditor,{SVG:Hn,Path:Wn}=wp.primitives,zn=function(){const[t,n]=fe();return he("required")?(0,e.createElement)(Un,{group:"block"},(0,e.createElement)($n,{icon:(0,e.createElement)(Hn,{xmlns:"http://www.w3.org/2000/svg",width:"24px",height:"24px",viewBox:"0 0 24 24",fill:"none"},(0,e.createElement)(Wn,{d:"M12 4L12 20",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,e.createElement)(Wn,{d:"M17.3137 6.00024L6.00001 17.314",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,e.createElement)(Wn,{d:"M20 12L4 12",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,e.createElement)(Wn,{d:"M17.3137 17.3137L6.00001 6.00001",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),title:t.required?Jn("Click to make this field optional","jet-form-builder"):Jn("Click to make this field required","jet-form-builder"),onClick:()=>n({required:!t.required}),isActive:t.required})):null},{__:Yn}=wp.i18n,{PanelBody:Kn}=wp.components,{applyFilters:Xn}=wp.hooks,{useBlockProps:Zn}=wp.blockEditor,{applyFilters:Qn}=wp.hooks,er=()=>Qn("jet.fb.register.fields.controls",{}),tr=window.wp.compose,nr=(0,tr.compose)((0,pe.withSelect)(X))((function({initialLabel:t="Valid",label:n="InValid",apiArgs:r={},gatewayRequestId:l,loadingGateway:o,onLoading:a=()=>{},onSuccess:i=()=>{},onFail:s=()=>{},isHidden:c=!1}){return(0,e.createElement)(K.FetchApiButton,{id:l,loadingState:o,initialLabel:t,label:n,apiArgs:r,onFail:s,onLoading:a,onSuccess:i,isHidden:c})})),rr="CLEAR_GATEWAY",lr="CLEAR_SCENARIO",or="SET_CURRENT_GATEWAY_SCENARIO",ar="SET_CURRENT_GATEWAY",ir="SET_CURRENT_GATEWAY_SPECIFIC",sr="SET_CURRENT_GATEWAY_INNER",cr="SET_CURRENT_REQUEST",ur="SET_CURRENT_SCENARIO",dr="REGISTER_EVENT_TYPE",mr="HARD_SET_CURRENT_GATEWAY",pr="HARD_SET_CURRENT_GATEWAY_SPECIFIC",fr={getCurrentRequestId:e=>e.currentRequest.id,getCurrentRequest:e=>e.currentRequest,getScenario:e=>e.currentScenario,getScenarioId:e=>e.currentScenario?.id,getGatewayId:e=>e.currentGateway?.gateway,getGateway:e=>e.currentGateway,getEventTypes:e=>e.eventTypes},hr={...fr,getGatewaySpecific:e=>e.currentGateway[fr.getGatewayId(e)]||{}},br={[rr]:e=>({...e,currentGateway:{}}),[lr]:e=>({...e,currentScenario:{}}),[or]:(e,t)=>({...e,currentScenario:{...e.currentScenario,...t.item||{}}}),[ar]:(e,t)=>({...e,currentGateway:{...e.currentGateway,...t.item}}),[ir]:(e,t)=>({...e,currentGateway:{...e.currentGateway,[e.currentGateway.gateway]:{...hr.getGatewaySpecific(e),...t.item}}}),[sr]:(e,t)=>{const{key:n,value:r}=t.item;return{...e,currentGateway:{...e.currentGateway,[n]:{...e.currentGateway[n]||{},...r}}}},[cr]:(e,t)=>{const n=[hr.getGatewayId(e),t.item?.id].filter((e=>e));return t.item.id=n.join("/"),{...e,currentRequest:t.item}},[ur]:(e,t)=>({...e,currentScenario:{...e.currentScenario,[e.currentScenario?.id]:{...e.currentScenario[e.currentScenario?.id]||{},...t.item||{}}}}),[mr]:(e,t)=>(t.item&&(e.currentGateway[t.item]=t.value),{...e}),[pr]:(e,t)=>(t.item&&e.currentGateway?.gateway&&(e.currentGateway[e.currentGateway?.gateway]={},e.currentGateway[e.currentGateway?.gateway][t.item]=t.value),{...e}),[dr]:(e,t)=>{var n,r;const l={...t.item,gateway:null!==(n=t.item?.gateway)&&void 0!==n?n:e.currentGateway?.gateway,scenario:null!==(r=t.item?.scenario)&&void 0!==r?r:e.currentScenario?.id};return e.eventTypes.push(l),e}},gr={currentRequest:{id:-1},currentGateway:{},currentScenario:{},eventTypes:[]},yr={clearGateway:()=>({type:rr}),clearScenario:()=>({type:lr}),setRequest:e=>({type:cr,item:e}),setGateway:e=>({type:ar,item:e}),setGatewayInner:e=>({type:sr,item:e}),setGatewaySpecific:e=>({type:ir,item:e}),setScenario:e=>({type:or,item:e}),setCurrentScenario:e=>({type:ur,item:e}),registerEventType:e=>({type:dr,item:e}),hardSetGateway:(e,t="")=>({type:mr,item:e,value:t}),hardSetGatewaySpecific:(e,t="")=>({type:pr,item:e,value:t})},{createReduxStore:vr}=wp.data,wr=vr("jet-forms/gateways",{reducer:function(e=gr,t){const n=br[t?.type];return n?n(e,t):e},actions:yr,selectors:hr}),Er="REGISTER",_r="UNREGISTER",Cr="LOCK_ACTIONS",kr="CLEAR_DYNAMIC_EVENTS",Sr={getTypeIndex:(e,t)=>e.types.findIndex((e=>e.value===t)),getTypes:e=>e.types,getGatewayTypes:e=>e.types.filter((e=>"gateway"in e)),getAlwaysTypes:e=>e.types.filter((e=>"always"in e)),getDynamicTypes:e=>e.types.filter((({isDynamic:e})=>e)),getType(e,t){const n=Sr.getTypeIndex(e,t);return e.types[n]},getUnsupported(e,t){var n;const r=null!==(n=e.lockedActions[t])&&void 0!==n&&n;return!1===r?[]:r.unsupported},getSupported(e,t){var n;const r=null!==(n=e.lockedActions[t])&&void 0!==n&&n;return!1===r?[]:r.supported},isValid(e,t,n){const r=Sr.getUnsupported(e,t);if(r.length&&r.includes(n))return!1;const l=Sr.getSupported(e,t);return!l.length||l.includes(n)},filterList:(e,t,n)=>n.filter((n=>Sr.isValid(e,t,n))),getHelpMap(e){const t={};for(const{value:n,help:r}of e.types)t[n]=r;return t}},jr={...Sr},xr={[Er](e,t){const{types:n}=e;for(const r of t.items){r.title=r.label;const t=jr.getTypeIndex(e,r.value);-1===t?n.push({...r}):n[t]={...r}}return{...e,types:n}},[Cr](e){for(const{id:n,self:r}of window.jetFormActionTypes){var t;const l=null!==(t=window[r])&&void 0!==t&&t;if(!1===l)continue;const{__unsupported_events:o,__supported_events:a}=l,i={unsupported:e.types.filter((({self:e})=>o.includes(e))).map((({value:e})=>e)),supported:e.types.filter((({self:e})=>a.includes(e))).map((({value:e})=>e))};(i.supported.length||i.unsupported.length)&&(e.lockedActions[n]=i)}return e},[_r](e,t){const{types:n}=t;return e.types=e.types.filter((({value:e})=>!n.includes(e))),e},[kr]:e=>(e.types=e.types.filter((({isDynamic:e=!1})=>!e)),e)},Nr={types:[],labels:{},lockedActions:{}},Fr={register:e=>({type:Er,items:e}),lockActions:()=>({type:Cr}),unRegister:e=>({type:_r,types:e}),clearDynamicEvents:()=>({type:kr})},{createReduxStore:Tr}=wp.data,Ir=Tr("jet-forms/events",{reducer:function(e=Nr,t){const n=xr[t?.type];return n?n(e,t):e},actions:Fr,selectors:jr}),Br="REGISTER",Ar="ADD_RENDER_STATE",Or="ADD_RENDER_STATES",Rr="DELETE_RENDER_STATES",{doAction:Mr}=wp.hooks,Pr={...{[Br](e,t){const{operators:n,functions:r,render_states:l}=t.items;return e.operators=[...n],e.functions=[...r],e.renderStates=[...l],Mr("jet.fb.change.blockConditions.renderState",e.renderStates),e},[Ar]:(e,t)=>(e.renderStates.push(t.item),Mr("jet.fb.change.blockConditions.renderState",e.renderStates),e),[Or](e,t){for(const n of t.items)e.renderStates.push(n);return Mr("jet.fb.change.blockConditions.renderState",e.renderStates),e},[Rr](e,t){const n=Array.isArray(t.items)?[...t.items]:[t.items];return e.renderStates=e.renderStates.filter((({value:e})=>!n.includes(e))),Mr("jet.fb.change.blockConditions.renderState",e.renderStates),e}}},{__:Gr}=wp.i18n,Lr=function(e,t="code"){var n;if(!function(e){let t;try{t=JSON.parse(e)}catch(e){return!1}return!!t?.jet_preset}(e=null!=e?e:""))return e;const r=JSON.parse(e),l=Gr("Preset from","jet-form-builder"),o=null!==(n=r?.from)&&void 0!==n?n:"(empty)";let a;switch(t){case"code":a=`${o}`;break;case"b":a=`${o}`}return[l,a].join(" ")},{select:Dr}=wp.data,{__:qr}=wp.i18n,Vr=function(e){const t=Dr("jet-forms/block-conditions").getOperator(e?.operator);return t?[`${e?.field||"(no field)"}`,t.label].join(" "):""},Jr={functions:[],operators:[],conditionReaders:{default(e){const t=Dr("jet-forms/block-conditions").getOperator(e?.operator);if(!t)return"";const n=e?.field||"(no field)",r=Lr(e.value,"b")||"(no value)";return[`${n}`,t.label,`${r}`].join(" ")},empty:Vr,not_empty:Vr,render_state(e){var t;const n=(null!==(t=e?.render_state)&&void 0!==t?t:[]).map((e=>`${e}`));return[1===n.length?qr("Is render state","jet-form-builder"):qr("One of the render states","jet-form-builder"),n.join(", ")].join(": ")}},renderStates:[]},$r={register:e=>({type:Br,items:e}),addRenderState:e=>({type:Ar,item:e}),addRenderStates:e=>({type:Or,items:e}),deleteRenderStates:e=>({type:Rr,items:e})},Ur={getFunctions:e=>e.functions,getOperators:e=>e.operators,getRenderStates:e=>e.renderStates,getSwitchableRenderStates:e=>e.renderStates.filter((({is_custom:e=!1,can_be_switched:t=!1})=>e||t)),getCustomRenderStates:e=>e.renderStates.filter((({is_custom:e=!1})=>e)),getOperator(e,t){const n=e.operators.findIndex((({value:e})=>e===t));return-1!==n&&e.operators[n]},readCondition(e,t){var n;const{operator:r=""}=t;if(!r)return"";const l=null!==(n=e.conditionReaders[r])&&void 0!==n&&n;return"function"==typeof l?l(t):e.conditionReaders.default(t)},getFunction:(e,t)=>e.functions.find((({value:e})=>e===t)),getFunctionDisplay:(e,t)=>Ur.getFunction(e,t)?.display},Hr={...Ur},{createReduxStore:Wr}=wp.data,zr=Wr("jet-forms/block-conditions",{reducer:function(e=Jr,t){const n=Pr[t?.type];return n?n(e,t):e},actions:$r,selectors:Hr}),Yr="REGISTER_MACRO",Kr={[Yr](e,t){const{items:n,isClient:r}=t,l=Array.isArray(n)?n:[n];for(const e of l)if(!(e instanceof Cn))throw new Error("^^^ Invalid macro item ^^^");return r?e.clientMacros.push(...l):e.serverMacros.push(...l),e}},{__:Xr}=wp.i18n;function Zr(){Cn.call(this),this.name="CurrentDate",this.isClientSide=!0,this.fullHelp=()=>(0,e.createElement)(e.Fragment,null,Xr("Returns the current timestamp. Replacing","jet-form-builder")," ",(0,e.createElement)("code",null,"Date.now()"))}Zr.prototype=Object.create(Cn.prototype);const Qr=Zr,{__:el}=wp.i18n;function tl(){Cn.call(this),this.name="Min_In_Sec",this.isClientSide=!0,this.help=el("Number of milliseconds in one minute","jet-form-builder")}tl.prototype=Object.create(Cn.prototype);const nl=tl,{__:rl}=wp.i18n;function ll(){Cn.call(this),this.name="Month_In_Sec",this.isClientSide=!0,this.help=rl("Number of milliseconds in one month","jet-form-builder")}ll.prototype=Object.create(Cn.prototype);const ol=ll,{__:al}=wp.i18n;function il(){Cn.call(this),this.name="Day_In_Sec",this.isClientSide=!0,this.help=al("Number of milliseconds in one day","jet-form-builder")}il.prototype=Object.create(Cn.prototype);const sl=il,{__:cl}=wp.i18n;function ul(){Cn.call(this),this.name="Year_In_Sec",this.isClientSide=!0,this.help=cl("Number of milliseconds in one year","jet-form-builder")}ul.prototype=Object.create(Cn.prototype);const dl=ul,{__:ml}=wp.i18n;function pl(){en.call(this)}pl.prototype=Object.create(en.prototype),pl.prototype.docArgument=!1,pl.prototype.help=null,pl.prototype.isServerSide=!1,pl.prototype.isClientSide=!1,pl.prototype.getArgumentsList=function(){if(!this.docArgument||!this.docArgument.length)return null;const e=Array.isArray(this.docArgument)?this.docArgument:[this.docArgument],t=[];for(const n of e)switch(n){case"string":case String:t.push(ml("String","jet-form-builder"));break;case"number":case Number:t.push(ml("Number","jet-form-builder"));break;case"array":case Array:t.push(ml("Array","jet-form-builder"));break;case"any":t.push(ml("Anything","jet-form-builder"))}return t.join(" | ")},pl.prototype.fullHelp=function(){if(!this.docArgument&&!this.help)return null;const t=this.help,n=this.getArgumentsList();return(0,e.createElement)(e.Fragment,null,n&&(0,e.createElement)("div",{style:{marginBottom:"0.5em"}},ml("Arguments:","jet-form-builder")+" ",(0,e.createElement)("code",null,n)),"function"!=typeof t?t:(0,e.createElement)(t,null))};const fl=pl,{__:hl}=wp.i18n;function bl(){fl.call(this),this.label=()=>hl("addDay","jet-form-builder"),this.fullName=()=>"|addDay",this.docArgument=Number,this.isClientSide=!0,this.help=hl("Adds the passed number of days via an argument to a macro that returns a date or a timestamp.","jet-form-builder")}bl.prototype=Object.create(fl.prototype);const gl=bl,{__:yl}=wp.i18n;function vl(){fl.call(this),this.label=()=>yl("addMonth","jet-form-builder"),this.fullName=()=>"|addMonth",this.docArgument=Number,this.isClientSide=!0,this.help=yl("Adds the passed number of months via an argument to a macro that returns a date or a timestamp.","jet-form-builder")}vl.prototype=Object.create(fl.prototype);const wl=vl,{__:El}=wp.i18n;function _l(){fl.call(this),this.label=()=>El("addYear","jet-form-builder"),this.fullName=()=>"|addYear",this.docArgument=Number,this.isClientSide=!0,this.help=El("Adds the passed number of years through an argument to a macro that returns a date or a timestamp.","jet-form-builder")}_l.prototype=Object.create(fl.prototype);const Cl=_l,{__:kl}=wp.i18n;function Sl(){fl.call(this),this.label=()=>kl("ifEmpty","jet-form-builder"),this.fullName=()=>"|ifEmpty",this.docArgument="any",this.isClientSide=!0,this.help=kl("If the macro returns an empty value, then the filter returns the value passed in the argument","jet-form-builder")}Sl.prototype=Object.create(fl.prototype);const jl=Sl,{__:xl}=wp.i18n;function Nl(){fl.call(this),this.label=()=>xl("length","jet-form-builder"),this.fullName=()=>"|length",this.isClientSide=!0,this.help=xl("Returns the length of a string or array","jet-form-builder")}Nl.prototype=Object.create(fl.prototype);const Fl=Nl,{__:Tl}=wp.i18n;function Il(){fl.call(this),this.label=()=>Tl("toDate","jet-form-builder"),this.fullName=()=>"|toDate",this.docArgument=Boolean,this.isClientSide=!0,this.help=()=>(0,e.createElement)(e.Fragment,null,Tl("Formats the timestamp according to the Date Field format.","jet-form-builder"),(0,e.createElement)("hr",null),Tl("Example:","jet-form-builder")+" ",(0,e.createElement)("code",null,"2022-02-24"),(0,e.createElement)("hr",null),Tl("Optionally accepts ","jet-form-builder"),(0,e.createElement)("code",null,"false"),Tl(" to use the user’s local timezone instead of UTC (default: ","jet-form-builder"),(0,e.createElement)("code",null,"true"),Tl(").","jet-form-builder"),(0,e.createElement)("hr",null),Tl("Example:","jet-form-builder")+" ",(0,e.createElement)("code",{style:{fontSize:"12px"}},"toDate(false)"))}Il.prototype=Object.create(fl.prototype);const Bl=Il,{__:Al}=wp.i18n;function Ol(){fl.call(this),this.label=()=>Al("toDateTime","jet-form-builder"),this.fullName=()=>"|toDateTime",this.docArgument=Boolean,this.isClientSide=!0,this.help=()=>(0,e.createElement)(e.Fragment,null,Al("Formats the timestamp according to the Datetime Field format.","jet-form-builder"),(0,e.createElement)("hr",null),Al("Example:","jet-form-builder")+" ",(0,e.createElement)("code",null,"2022-02-24T04:25"),(0,e.createElement)("hr",null),Al("Optionally accepts ","jet-form-builder"),(0,e.createElement)("code",null,"false"),Al(" to use the user’s local timezone instead of UTC (default: ","jet-form-builder"),(0,e.createElement)("code",null,"true"),Al(").","jet-form-builder"),(0,e.createElement)("hr",null),Al("Example:","jet-form-builder")+" ",(0,e.createElement)("code",{style:{fontSize:"12px"}},"toDateTime(false)"))}Ol.prototype=Object.create(fl.prototype);const Rl=Ol,{__:Ml}=wp.i18n;function Pl(){fl.call(this),this.label=()=>Ml("toTime","jet-form-builder"),this.fullName=()=>"|toTime",this.docArgument=Boolean,this.isClientSide=!0,this.help=()=>(0,e.createElement)(e.Fragment,null,Ml("Formats the timestamp according to the Time Field format.","jet-form-builder"),(0,e.createElement)("hr",null),Ml("Example:","jet-form-builder")+" ",(0,e.createElement)("code",null,"04:25"),(0,e.createElement)("hr",null),Ml("Optionally accepts ","jet-form-builder"),(0,e.createElement)("code",null,"false"),Ml(" to use the user’s local timezone instead of UTC (default: ","jet-form-builder"),(0,e.createElement)("code",null,"true"),Ml(").","jet-form-builder"),(0,e.createElement)("hr",null),Ml("Example:","jet-form-builder")+" ",(0,e.createElement)("code",{style:{fontSize:"12px"}},"toTime(false)"))}Pl.prototype=Object.create(fl.prototype);const Gl=Pl,{__:Ll}=wp.i18n;function Dl(){fl.call(this),this.label=()=>Ll("subDay","jet-form-builder"),this.fullName=()=>"|subDay",this.docArgument=Number,this.isClientSide=!0,this.help=Ll("Subtracts the number of days by argument from a macro that returns a date or timestamp.","jet-form-builder")}Dl.prototype=Object.create(fl.prototype);const ql=Dl,{__:Vl}=wp.i18n;function Jl(){fl.call(this),this.label=()=>Vl("subMonth","jet-form-builder"),this.fullName=()=>"|subMonth",this.docArgument=Number,this.isClientSide=!0,this.help=Vl("Subtracts the number of months by argument from a macro that returns a date or timestamp.","jet-form-builder")}Jl.prototype=Object.create(fl.prototype);const $l=Jl,{__:Ul}=wp.i18n;function Hl(){fl.call(this),this.label=()=>Ul("subYear","jet-form-builder"),this.fullName=()=>"|subYear",this.docArgument=Number,this.isClientSide=!0,this.help=Ul("Subtracts the number of years by argument from a macro that returns a date or timestamp.","jet-form-builder")}Hl.prototype=Object.create(fl.prototype);const Wl=Hl,{__:zl}=wp.i18n;function Yl(){fl.call(this),this.label=()=>zl("toDayInMs","jet-form-builder"),this.fullName=()=>"|toDayInMs",this.isClientSide=!0,this.help=()=>(0,e.createElement)(e.Fragment,null,zl("Converts a number of days into milliseconds.","jet-form-builder"))}Yl.prototype=Object.create(fl.prototype);const Kl=Yl,{__:Xl}=wp.i18n;function Zl(){fl.call(this),this.label=()=>Xl("toHourInMs","jet-form-builder"),this.fullName=()=>"|toHourInMs",this.isClientSide=!0,this.help=()=>(0,e.createElement)(e.Fragment,null,Xl("Converts a number of hours into milliseconds.","jet-form-builder"))}Zl.prototype=Object.create(fl.prototype);const Ql=Zl,{__:eo}=wp.i18n;function to(){fl.call(this),this.label=()=>eo("toMinuteInMs","jet-form-builder"),this.fullName=()=>"|toMinuteInMs",this.isClientSide=!0,this.help=()=>(0,e.createElement)(e.Fragment,null,eo("Converts a number of minutes into milliseconds.","jet-form-builder"))}to.prototype=Object.create(fl.prototype);const no=to,{__:ro}=wp.i18n;function lo(){fl.call(this),this.label=()=>ro("toMonthInMs","jet-form-builder"),this.fullName=()=>"|toMonthInMs",this.isClientSide=!0,this.help=()=>(0,e.createElement)(e.Fragment,null,ro("Converts a number of months into milliseconds.","jet-form-builder"))}lo.prototype=Object.create(fl.prototype);const oo=lo,{__:ao}=wp.i18n;function io(){fl.call(this),this.label=()=>ao("toWeekInMs","jet-form-builder"),this.fullName=()=>"|toWeekInMs",this.isClientSide=!0,this.help=()=>(0,e.createElement)(e.Fragment,null,ao("Converts a number of weeks into milliseconds.","jet-form-builder"))}io.prototype=Object.create(fl.prototype);const so=io,{__:co}=wp.i18n;function uo(){fl.call(this),this.label=()=>co("toYearInMs","jet-form-builder"),this.fullName=()=>"|toYearInMs",this.isClientSide=!0,this.help=()=>(0,e.createElement)(e.Fragment,null,co("Converts a number of years into milliseconds.","jet-form-builder"))}uo.prototype=Object.create(fl.prototype);const mo=uo,{__:po}=wp.i18n;function fo(){fl.call(this),this.label=()=>po("Timestamp","jet-form-builder"),this.fullName=()=>"|T",this.isClientSide=!0,this.help=po("Returns the time stamp. Usually used in conjunction with Date & Datetime and Time Field.","jet-form-builder",'Example\nFor Date Field\n%date_field|T%\nResult if date_field is filled with value "2022-10-22"')}fo.prototype=Object.create(fl.prototype);const ho=fo,bo={macros:[new Qr,new nl,new sl,new ol,new dl],filters:[new jl,new ho,new Fl,new gl,new wl,new Cl,new ql,new $l,new Wl,new Bl,new Rl,new Gl,new no,new Ql,new Kl,new so,new oo,new mo]},go={registerMacro:(e,t=!0)=>({type:Yr,items:e,isClient:t})},yo={getClientMacros:e=>e.macros.filter((function(e){return e.isClientSide})),getServerMacros:e=>e.macros.filter((function(e){return e.isServerSide})),getClientFilters:e=>e.filters.filter((function(e){return e.isClientSide})),getServerFilters:e=>e.filters.filter((function(e){return e.isServerSide}))},{createReduxStore:vo}=wp.data,wo=vo("jet-forms/macros",{reducer:function(e=bo,t){const n=Kr[t?.type];return n?n(e,t):e},actions:go,selectors:yo}),Eo="REGISTER",_o={[Eo](e,t){const{messages:n,ssr_callbacks:r,formats:l,rule_types:o}=t.items;return e.messages=JSON.parse(JSON.stringify(n)),e.ssrCallbacks=JSON.parse(JSON.stringify(r)),e.formats=JSON.parse(JSON.stringify(l)),e.ruleTypes=JSON.parse(JSON.stringify(o)),e}},Co={..._o},{select:ko}=wp.data,{__:So}=wp.i18n,jo={messages:[],ssrCallbacks:[],formats:[],ruleTypes:[],ruleReaders:{default(e){const t=ko("jet-forms/validation").getRule(e.type);if(!t)return"";let n=e?.field||e?.value||"";return n=Lr(n,"b")||"(no value)",[t.label,`${n}`].join(" ")},ssr:e=>[So("Function:","jet-form-builder"),e?.value].join(" ")}},xo={register:e=>({type:Eo,items:e})},No={...{getRule(e,t){const n=e.ruleTypes.findIndex((({value:e})=>e===t));return-1!==n&&e.ruleTypes[n]},readRule(e,t){var n;const{type:r=""}=t;if(!r)return"";const l=null!==(n=e.ruleReaders[r])&&void 0!==n&&n;return"function"==typeof l?l(t):e.ruleReaders.default(t)}}},{createReduxStore:Fo}=wp.data,To=Fo("jet-forms/validation",{reducer:function(e=jo,t){const n=Co[t?.type];return n?n(e,t):e},actions:xo,selectors:No}),Io="SET_BLOCKS",Bo="SET_BLOCKS_FIRST",Ao="TOGGLE_EXECUTE",Oo={...{[Io](e,t){const n=[];for(const r in t.blockMap)t.blockMap.hasOwnProperty(r)&&!e.blockMap.hasOwnProperty(r)&&n.push(r);return{...e,blocks:t.blocks,blockMap:t.blockMap,recentlyAdded:n}},[Bo]:(e,t)=>({...e,blocks:t.blocks,blockMap:t.blockMap}),[Ao]:e=>({...e,executed:!0})}},Ro={blocks:[],blockMap:{},executed:!1,recentlyAdded:[],sanitizers:{name:[e=>e.replace(/[^\w\-]/gi,""),e=>"children"===e?"_"+e:e]}},{select:Mo}=wp.data,Po=function(){const e=[],t={};return j(((n,r)=>{var l;if(!n?.name?.includes("jet-forms/"))return;const o=Mo("core/blocks").getBlockType(n.name),a=o.jfbResolveBlock.call(n);if(o.hasOwnProperty("jfbGetFields")&&(a.fields=o.jfbGetFields.call(n)),!r?.name)return e.push(a),void(t[a.clientId]=a);const i=null!==(l=t[r?.clientId])&&void 0!==l&&l;i&&(Object.defineProperty(a,"parentBlock",{get:()=>i}),i.innerBlocks=i?.innerBlocks||[],i.innerBlocks.push(a),t[a.clientId]=a)})),{blocks:e,blockMap:t}},{select:Go,dispatch:Lo}=wp.data,Do={setBlocks(e=null){null===e&&(e=Po());const t=Go(Wo).isExecuted();return t||Lo(Wo).toggleExecute(),{type:t?Io:Bo,blocks:e.blocks,blockMap:e.blockMap}},toggleExecute:()=>({type:Ao})},qo={getBlocks:e=>e.blocks,getBlockMap:e=>e.blockMap,getFields(e,{withInner:t=!0,currentId:n=!1}){const r=[],l=e=>{for(const o of e)o.fields?.length&&o.clientId!==n&&r.push(...o.fields),t&&o.innerBlocks?.length&&l(o.innerBlocks)};return l(e.blocks),r},isExecuted:e=>e.executed,isRecentlyAdded:(e,t)=>-1!==e.recentlyAdded.indexOf(t),getUniqueNames(e,t){var n,r;const l=null!==(n=e.blockMap[t])&&void 0!==n&&n;if(!l)return{hasChanged:!1};let o=!1;const a=null!==(r=l?.fields?.map?.((({value:e})=>e)))&&void 0!==r?r:[],i=l.hasOwnProperty("parentBlock")?l.parentBlock.innerBlocks:e.blocks,s=e=>{for(const t of e){const n=a.indexOf(t.value);-1!==n&&("field_name"!==t.value?(a[n]=`${a[n]}_copy`,o=!0,s(e)):o=!0)}};for(const e of i){var c;t!==e.clientId&&s(null!==(c=e?.fields)&&void 0!==c?c:[])}return{hasChanged:o,names:a.join("|")}},getSanitizedAttributes(e,t,{name:n}={}){for(const o in t){var r,l;if(!t.hasOwnProperty(o))continue;const a=null!==(r=null!==(l=e.sanitizers?.[n]?.[o])&&void 0!==l?l:e.sanitizers?.[o])&&void 0!==r&&r;if(a?.length)for(const e of a)"function"==typeof e&&(t[o]=e(t[o]))}return t},isUniqueName(e,t){const{hasChanged:n}=qo.getUniqueNames(e,t);return!n},getBlock:(e,t)=>e.blocks.find((({name:e,clientId:n})=>[e,n].includes(t))),getBlockByName(e,t){if(!t)return!1;const n=e=>{for(const r of e){if(r.fields.some((({value:e})=>e===t)))return r;r.innerBlocks?.length&&n(r.innerBlocks)}};return n(e.blocks),!1},getBlockNameByName(e,t){var n;const r=qo.getBlockByName(e,t);return null!==(n=r?.name)&&void 0!==n?n:""},getBlockById(e,t){var n;return null!==(n=e.blockMap[t])&&void 0!==n&&n}},Vo={...qo},{createReduxStore:Jo,dispatch:$o,select:Uo,subscribe:Ho}=wp.data,Wo="jet-forms/fields";let zo,Yo;Ho((()=>{const{debounce:e}=window._,{setBlocks:t}=$o(Wo);e((()=>{const e=Uo("core/block-editor").getGlobalBlockCount();if(zo!==e)return zo=e,void t();const n=Po(),r=JSON.stringify(n.blocks);r!==Yo&&(Yo=r,t(n))}),100)()}));const Ko=Jo(Wo,{reducer:function(e=Ro,t){const n=Oo[t?.type];return n?n(e,t):e},actions:Do,selectors:Vo});n(4180);const{register:Xo,dispatch:Zo}=wp.data,{addAction:Qo}=wp.hooks;[wr,Ir,zr,wo,To,Ko].forEach(Xo),Zo("jet-forms/events").register(window.jetFormEvents.types),Zo("jet-forms/events").lockActions(),Zo("jet-forms/validation").register(window.jetFormValidation),Qo("jet.fb.change.blockConditions.renderState","jet-form-builder/events",(function(e){Zo("jet-forms/events").clearDynamicEvents();const t=e.map((({value:e})=>({value:e="ON."+e,label:e,isDynamic:!0})));Zo("jet-forms/events").register(t)})),Zo("jet-forms/block-conditions").register(window.jetFormBlockConditions);const{createContext:ea}=wp.element,ta=ea(!1),{createContext:na}=wp.element,ra=na({currentItem:{},changeCurrentItem:()=>{},currentIndex:-1}),la=(0,o.createContext)({isSupported:e=>!1,render:({children:e})=>e}),oa=(0,o.createContext)({isSupported:e=>!1,render:({currentItem:e,index:t})=>null}),aa=(0,o.createContext)({edit:e=>!0,move:e=>!0,clone:e=>!0,delete:e=>!0}),{createContext:ia}=wp.element,sa=ia({}),{ToggleControl:ca}=wp.components,{__:ua}=wp.i18n,{useState:da}=wp.element,{useContext:ma}=wp.element,pa=function(e){if(void 0===e)return null;const t=ma(ta),n=function({oldIndex:t,newIndex:n}){e((e=>{const r=JSON.parse(JSON.stringify(e));return[r[n],r[t]]=[r[t],r[n]],r}))};return{changeCurrentItem:function(t,n){e((e=>{const r=JSON.parse(JSON.stringify(e));return r[n]={...e[n],...t},r}))},toggleVisible:function(t){e((e=>{const n=JSON.parse(JSON.stringify(e));return n[t].__visible=!n[t].__visible,n}))},moveDown:function(e){n({oldIndex:e,newIndex:e+1})},moveUp:function(e){n({oldIndex:e,newIndex:e-1})},cloneItem:function(t){e((e=>{const n=JSON.parse(JSON.stringify(e)),[r,l]=[n.slice(0,t+1),n.slice(t+1)];return[...r,n[t],...l]}))},addNewItem:function(t){e((e=>[...e,{__visible:!0,...t}]))},removeOption:function(n){t&&!(e=>confirm((0,d.sprintf)((0,d.__)("Are you sure you want to remove item %d?","jet-form-builder"),e+1)))(n)||e((e=>{const t=JSON.parse(JSON.stringify(e));return t.splice(n,1),t}))}}},{createContext:fa}=wp.element,ha=fa(!1),{Button:ba}=wp.components,{useContext:ga}=wp.element,ya=function(t){var n;const{item:r,onSetState:l,functions:o,children:a}=t,{addNewItem:i}=null!==(n=null!=o?o:pa(l))&&void 0!==n?n:ga(ha);return(0,e.createElement)(ba,{icon:"plus-alt2",isSecondary:!0,onClick:()=>i(r)},a)};let{Card:va,Button:wa,CardHeader:Ea,CardBody:_a,ToggleGroupControl:Ca,__experimentalToggleGroupControl:ka}=wp.components;const{useContext:Sa}=wp.element,{__:ja}=wp.i18n;Ca=Ca||ka;const xa=function(t){var n;const{items:r,onSetState:l,functions:o,children:a}=t,{cloneItem:i,moveUp:s,moveDown:c,toggleVisible:u,changeCurrentItem:d,removeOption:m}=null!==(n=null!=o?o:pa(l))&&void 0!==n?n:Sa(ha),{isSupported:p,render:f}=Sa(oa),{edit:h,move:b,clone:g,delete:y}=Sa(aa),v=({currentItem:t,index:n})=>p(t)?(0,e.createElement)(f,{currentItem:t,index:n}):(0,e.createElement)("span",{className:"repeater-item-title"},`#${n+1}`);return(0,e.createElement)("div",{className:"jet-form-builder__repeater-component",key:"jet-form-builder-repeater"},r.map(((t,n)=>(0,e.createElement)(va,{size:"small",elevation:2,className:"jet-form-builder__repeater-component-item",key:`jet-form-builder__repeater-component-item-${n}`},(0,e.createElement)(Ea,{className:"repeater__item__header"},(0,e.createElement)("div",{className:"repeater-item__left-heading"},(0,e.createElement)(Ca,{className:"repeater-action-buttons jet-fb-toggle-group-control",hideLabelFromVision:!0},(!h||h(t))&&(0,e.createElement)(wa,{variant:"tertiary",isSmall:!0,icon:t.__visible?"no-alt":"edit",onClick:()=>u(n),className:"repeater-action-button jet-fb-is-thick"}),(!b||b(t))&&(0,e.createElement)(wa,{variant:"tertiary",isSmall:!0,isSecondary:!0,disabled:!Boolean(n),icon:"arrow-up-alt2",onClick:()=>s(n),className:"repeater-action-button jet-fb-is-thick"}),(!b||b(t))&&(0,e.createElement)(wa,{variant:"tertiary",isSmall:!0,isSecondary:!0,disabled:!(nc(n),className:"repeater-action-button jet-fb-is-thick"})),(0,e.createElement)(v,{currentItem:t,index:n})),(0,e.createElement)(Ca,{className:"jet-fb-toggle-group-control",hideLabelFromVision:!0},(!g||g(t))&&(0,e.createElement)(wa,{variant:"tertiary",isSmall:!0,isSecondary:!0,onClick:()=>i(n),className:"jet-fb-is-thick",icon:"admin-page"}),(!y||y(t))&&(0,e.createElement)(zt,{icon:"trash",isDestructive:!0},(0,e.createElement)(Jt.Consumer,null,(({setShowPopover:t})=>(0,e.createElement)("div",{style:{padding:"0.5em",width:"max-content"}},(0,e.createElement)("span",null,ja("Delete this item?","jet-form-builder"))," ",(0,e.createElement)(wa,{isLink:!0,isDestructive:!0,onClick:()=>m(n)},ja("Yes","jet-form-builder"))," / ",(0,e.createElement)(wa,{isLink:!0,onClick:()=>t(!1)},ja("No","jet-form-builder")))))))),t.__visible&&(0,e.createElement)(_a,{className:"repeater-item__content",key:`jet-form-builder__card-body-${n}`},(()=>{const r={currentItem:t,changeCurrentItem:e=>d(e,n),currentIndex:n};return(0,e.createElement)(ra.Provider,{value:r},!a&&"Set up your Repeater Template, please.","function"==typeof a?a(r):a)})())))))},{__experimentalToggleGroupControl:Na,__experimentalToggleGroupControlOption:Fa}=wp.components,{__:Ta}=wp.i18n;let{formats:Ia}=window.jetFormValidation;const Ba=window.jfb.data,{messages:Aa}=window.jetFormValidation,Oa=function(e){return Aa.find((({id:t})=>e===t))},{TextControl:Ra}=wp.components,Ma=ke((0,o.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,o.cloneElement)(e,{width:t,height:t,...n,ref:r})})))({name:"StyledIcon",class:"sfqmk5y",propsAsIs:!0});n(483);const{createContext:Pa}=wp.element,Ga=Pa({FieldSelect:null,property:""}),La=function({state:t,children:n}){const r=pa(t);return(0,e.createElement)(ha.Provider,{value:r},n)},Da=window.wp.apiFetch;var qa=n.n(Da);const{rest_add_state:Va,rest_delete_state:Ja}=window.jetFormBlockConditions,{Fill:$a}=c,Ua=({setShowModal:t,changeCurrentItem:n,currentItem:r})=>{var l;const[a,i]=(0,o.useState)(!1),[s,c]=(0,o.useState)({}),[m,p]=(0,o.useState)("");let f=[...null!==(l=r.render_state)&&void 0!==l?l:[]];const{addRenderState:b,deleteRenderStates:g}=(0,pe.useDispatch)("jet-forms/block-conditions"),y=(0,pe.useSelect)((e=>e("jet-forms/block-conditions").getCustomRenderStates()),[a,s]);return(0,e.createElement)(h,{title:(0,d.__)("Register custom render state","jet-form-builder"),onRequestClose:()=>t(!1),classNames:["width-45"]},(0,e.createElement)("div",{className:"jet-fb with-button"},(0,e.createElement)(u.TextControl,{value:m,onChange:e=>p(e),placeholder:(0,d.__)("Set your custom state name","jet-form-builder")}),(0,e.createElement)(u.Button,{variant:"secondary",onClick:()=>{i(!0),Va.data={value:m},qa()(Va).then((e=>{var r;r=e.state,b(r),f.push(r.value),n({render_state:f}),i(!1),t(!1)})).catch((e=>{console.error(e),i(!1)}))},disabled:a,isBusy:a,style:{padding:"7px 12px",height:"unset"}},(0,d.__)("Add","jet-form-builder"))),Boolean(y?.length)&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("b",{className:"jet-fb flex mb-05-em"},(0,d.__)("Manage your custom states:","jet-form-builder")),(0,e.createElement)("div",{className:"jet-fb-buttons-flex"},y.map((t=>{var r;return(0,e.createElement)(u.Button,{key:t.value,icon:"no-alt",iconPosition:"right",onClick:()=>{return e=t.value,Ja.data={list:[e]},c((t=>({...t,[e]:!0}))),void qa()(Ja).then((()=>{(e=>{g(e),f=f.filter((t=>t!==e)),n({render_state:f})})(e)})).catch(console.error).finally((()=>{c((t=>({...t,[e]:!1})))}));var e},isBusy:null!==(r=s[t.value])&&void 0!==r&&r},t.label)})))),(0,e.createElement)($a,null,(0,e.createElement)("span",null)))},{Button:Ha,BaseControl:Wa,FormTokenField:za}=wp.components,{__:Ya}=wp.i18n,{useState:Ka}=wp.element,{useSelect:Xa}=wp.data,Za=({currentItem:t,changeCurrentItem:n})=>{const[r,l]=Ka(!1),o=Xa((e=>y(e("jet-forms/block-conditions").getRenderStates(),"value")),[r]);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Wa,{label:Ya("Render State","jet-form-builder"),className:"control-flex"},(0,e.createElement)("div",null,(0,e.createElement)("label",{className:"jet-fb label mb-05-em"},Ya("Add render state","jet-form-builder")),(0,e.createElement)("div",{className:"jet-fb with-button clear-label"},(0,e.createElement)(za,{value:t.render_state,suggestions:o,onChange:e=>n({render_state:e}),tokenizeOnSpace:!0,__experimentalExpandOnFocus:!0}),(0,e.createElement)(Ha,{label:Ya("New render state","jet-form-builder"),variant:"secondary",icon:"plus-alt2",onClick:()=>l(!0)})))),r&&(0,e.createElement)(Ua,{setShowModal:l,changeCurrentItem:n,currentItem:t}))},Qa=function({children:t,value:n,label:r,onChangePreset:l=!1,onChangeMacros:o=!1,macroWithCurrent:a=!1}){const i=(0,tr.useInstanceId)(u.FlexItem,"jfb-AdvancedModalControl");return(0,e.createElement)("div",{className:"components-base-control"},(0,e.createElement)(u.Flex,{align:"flex-start",className:"components-base-control__field"},(0,e.createElement)(u.FlexItem,{isBlock:!0},(0,e.createElement)(u.Flex,{align:"center",justify:"flex-start"},(0,e.createElement)("label",{htmlFor:i,className:"jet-fb label"},r),!1!==l&&(0,e.createElement)(qt,{value:n,onChange:l}),!1!==o&&(0,e.createElement)(bn,{onClick:o,withCurrent:a}))),(0,e.createElement)(u.FlexItem,{isBlock:!0,style:{flex:3,marginLeft:"unset"}},"function"==typeof t?t({instanceId:i}):t)))},{TextareaControl:ei,withFilters:ti}=wp.components,{__:ni}=wp.i18n,ri=ti("jet.fb.block.conditions.options")((t=>{const{currentItem:n,changeCurrentItem:r}=t,l=de();return["empty","not_empty"].includes(n.operator)?null:"render_state"===n.operator?(0,e.createElement)(Za,{key:l("RenderStateOptions"),changeCurrentItem:r,currentItem:n}):(0,e.createElement)(xn,null,(0,e.createElement)(Qa,{value:n.value,label:ni("Value to compare","jet-form-builder"),onChangePreset:e=>r({value:e}),onChangeMacros:e=>{var t;return r({value:(null!==(t=n.value)&&void 0!==t?t:"")+e})}},(({instanceId:t})=>(0,e.createElement)(ei,{id:t,value:n.value,onChange:e=>r({value:e})}))))})),{SelectControl:li,withFilters:oi}=wp.components,{__:ai}=wp.i18n,ii=oi("jet.fb.block.conditions.options")((t=>{const{currentItem:n,changeCurrentItem:r}=t,l=(0,hn.useFields)({placeholder:"--"});return"render_state"===n.operator?null:(0,e.createElement)(li,{label:ai("Field","jet-form-builder"),labelPosition:"side",value:n.field,options:l,onChange:e=>{r({field:e})}})})),{useContext:si}=wp.element,{SelectControl:ci}=wp.components,{__:ui}=wp.i18n,di=function(){const{currentItem:t,changeCurrentItem:n}=si(ra),r=de(),{operators:l}=ce();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ii,{currentItem:t,changeCurrentItem:n}),(0,e.createElement)(ci,{key:r("SelectControl-operator"),label:ui("Operator","jet-form-builder"),labelPosition:"side",value:t.operator,options:l,onChange:e=>n({operator:e})}),(0,e.createElement)(ri,{currentItem:t,changeCurrentItem:n}))},{select:mi}=wp.data,pi=function(e){return mi("jet-forms/block-conditions").readCondition(e)},{__:fi}=wp.i18n,hi=function({children:t}){return(0,e.createElement)(oa.Provider,{value:{isSupported:()=>!0,render:({currentItem:t})=>(0,e.createElement)("span",{className:"repeater-item-title",dangerouslySetInnerHTML:{__html:t?.or_operator?fi("OR","jet-form-builder"):pi(t)}})}},(0,e.createElement)(aa.Provider,{value:{edit:e=>!e.or_operator}},t))},{__:bi}=wp.i18n,{useState:gi,useContext:yi,Fragment:vi,useEffect:wi,useRef:Ei}=wp.element,{SelectControl:_i,TextareaControl:Ci,FlexItem:ki,Flex:Si,ToggleControl:ji}=wp.components,xi=[{key:"commas",render:()=>(0,e.createElement)("li",null,bi("If this field supports multiple values, you can separate them with commas. If a string value is expected, wrap it in single quotes like '%value_field%'.","jet-form-builder"))}],Ni=[{value:"on_change",label:bi("On change conditions result","jet-form-builder"),help:bi("The value will be applied if condition check-ups return a result different from the first check-up's cached value","jet-form-builder")},{value:"once",label:bi("Once","jet-form-builder"),help:bi("The value will be applied only the first time the condition is matched","jet-form-builder")},{value:"always",label:bi("Always","jet-form-builder"),help:bi("The value will be applied every time the condition is matched","jet-form-builder")}],Fi=e=>Ni.find((t=>t.value===(null!=e?e:"on_change"))).help,Ti=function(){var t,n,r,l;const{current:o,update:a}=yi(sa),[i,s]=gi((()=>o)),c=Ei(null),[u,d]=gi((()=>Fi(i.frequency)));wi((()=>{d(Fi(i.frequency))}),[i.frequency]);const m=e=>{s((t=>({...t,...e})))};return W((()=>a(i))),(0,e.createElement)(vi,null,(0,e.createElement)(Si,{align:"flex-start"},(0,e.createElement)(ki,{isBlock:!0},(0,e.createElement)(Si,{align:"center",justify:"flex-start"},(0,e.createElement)("span",{className:"jet-fb label"},bi("Value to set","jet-form-builder")),(0,e.createElement)(qt,{value:i.to_set,onChange:e=>m({to_set:e})}),(0,e.createElement)(xn,{withThis:!0},(0,e.createElement)(bn,{onClick:e=>(e=>{const t=c.current;if(t){const n=t.selectionStart,r=t.selectionEnd,l=i.to_set||"",o=l.slice(0,n)+e+l.slice(r);m({to_set:`${o}`}),setTimeout((()=>{t.focus(),t.selectionStart=t.selectionEnd=n+e.length}),0)}})(e)}))),(0,e.createElement)(ut,null,(0,e.createElement)("ul",null,xi.map((t=>(0,e.createElement)(vi,{key:t.key},t.render())))))),(0,e.createElement)(ki,{isBlock:!0,style:{flex:3,marginLeft:"unset"}},(0,e.createElement)(Ci,{className:"jet-control-clear",hideLabelFromVision:!0,value:null!==(t=i.to_set)&&void 0!==t?t:"",onChange:e=>m({to_set:e}),ref:c}))),(0,e.createElement)(_i,{options:Ni,value:null!==(n=i.frequency)&&void 0!==n?n:"on_change",label:bi("Apply type","jet-form-builder"),labelPosition:"side",onChange:e=>m({frequency:e}),help:u}),(0,e.createElement)(La,{state:e=>{var t;m({conditions:"function"==typeof e?e(null!==(t=i.conditions)&&void 0!==t?t:[]):e})}},(0,e.createElement)(hi,null,(0,e.createElement)(xa,{items:null!==(r=i.conditions)&&void 0!==r?r:[]},(0,e.createElement)(di,null))),(0,e.createElement)("div",{className:"jet-fb flex jc-space-between ai-center"},(0,e.createElement)(ya,null,bi("Add New Condition","jet-form-builder")),(0,e.createElement)(ji,{className:"jet-fb m-unset clear-control",label:bi("Set value only if field is empty","jet-form-builder"),checked:null!==(l=i.set_on_empty)&&void 0!==l&&l,onChange:e=>m({set_on_empty:e})}))))},{__:Ii}=wp.i18n,{Children:Bi,cloneElement:Ai}=wp.element,Oi=function({conditions:t,showWarning:n=!1}){let r=[],l="";return Boolean(t?.length)&&(l=pi(t[0]),r=t.filter(((e,t)=>0!==t)).map(((t,n)=>(0,e.createElement)("span",{key:n,"data-title":Ii("And","jet-form-builder")+":",dangerouslySetInnerHTML:{__html:pi(t)}})))),l?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{"data-title":Ii("If","jet-form-builder")+":",dangerouslySetInnerHTML:{__html:l}}),Bi.map(r,Ai)):n&&(0,e.createElement)("span",{"data-title":Ii("The condition is not fully configured.","jet-form-builder")})},Ri=function({isHover:t=!1,children:n}){return(0,e.createElement)("div",{className:["jet-fb",t?"show":"hide","p-absolute","wh-100","flex-center","gap-05em"].join(" "),style:{backgroundColor:"#ffffffcc",transition:"0.3s"}},n)},Mi=function({children:t}){return(0,e.createElement)("div",{className:["jet-fb","flex","flex-dir-column","container","gap-1em"].join(" ")},t)},{__:Pi}=wp.i18n,{useState:Gi}=wp.element,{Button:Li}=wp.components,Di=function({current:t,update:n,isOpenModal:r,setOpenModal:l}){const[o,a]=Gi(!1),[i,s]=Gi(!1),c=1>=Object.keys(t)?.length;return(0,e.createElement)(sa.Provider,{value:{update:e=>{n((n=>{const r=JSON.parse(JSON.stringify(n.groups));for(const n in r)r.hasOwnProperty(n)&&t.id===r[n].id&&(r[n]={...r[n],...e});return{groups:r}}))},current:t}},(0,e.createElement)("div",{className:"jet-fb p-relative",onMouseOver:()=>s(!0),onFocus:()=>s(!0),onMouseOut:()=>s(!1),onBlur:()=>s(!1)},(0,e.createElement)(Ri,{isHover:i},(0,e.createElement)(Li,{isSmall:!0,isSecondary:!0,icon:o?"no-alt":"edit",onClick:()=>a((e=>!e))},Pi("Edit","jet-form-builder")),(0,e.createElement)(Li,{isSmall:!0,isDestructive:!0,icon:"trash",onClick:()=>{n((e=>({groups:JSON.parse(JSON.stringify(e.groups)).filter((({id:e})=>e!==t.id))})))}},Pi("Delete","jet-form-builder"))),(0,e.createElement)(Mi,null,c?(0,e.createElement)("div",{"data-title":Pi("This value item is empty","jet-form-builder")}):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{"data-title":Pi("Set","jet-form-builder")+":",dangerouslySetInnerHTML:{__html:Lr(t.to_set)}}),(0,e.createElement)(Oi,{conditions:t?.conditions})))),(o||r===t.id)&&(0,e.createElement)(h,{classNames:["width-60"],onRequestClose:()=>{a(!1),l(!1)},title:Pi("Edit Dynamic Value","jet-form-builder")},(0,e.createElement)(Ti,null)))},qi=function({children:t,...n}){return(0,e.createElement)("div",{className:"jet-fb flex flex-dir-column gap-default",style:{marginBottom:"1em"},...n},t)},{__:Vi}=wp.i18n,{useState:Ji}=wp.element,{Button:$i}=wp.components,Ui=function(){var t,n;const[r,l]=fe(),o=de(),a=null!==(t=r.value)&&void 0!==t?t:{},i=null!==(n=a.groups)&&void 0!==n?n:[],[s,c]=Ji(!1);if(!he("value"))return null;const u=i.filter(((e,t)=>0!==t)),d=e=>{l({...r,value:{...a,..."function"==typeof e?e(a):e}})};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ut,null,Vi("Or use a condition-dependent value","jet-form-builder")+" ",(0,e.createElement)($i,{isLink:!0,onClick:()=>{},label:Vi("Former Set Value functionality, moved from the Conditional Block","jet-form-builder"),showTooltip:!0},"(?)")),Boolean(i.length)?(0,e.createElement)(qi,null,(0,e.createElement)(Di,{key:o(i[0].id),current:i[0],update:d,isOpenModal:s,setOpenModal:c}),Boolean(u.length)&&u.map((t=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("b",null,Vi("OR","jet-form-builder")),(0,e.createElement)(Di,{key:o(t.id),current:t,update:d,isOpenModal:s,setOpenModal:c}))))):null,(0,e.createElement)($i,{icon:"plus-alt2",isSecondary:!0,onClick:()=>{const e=k.getRandomID();d({groups:[...i,{id:e,conditions:[{__visible:!0}]}]}),c(e)}},Vi("Add Dynamic Value","jet-form-builder")))},{Button:Hi}=wp.components,{useContext:Wi}=wp.element,{SelectControl:zi}=wp.components,{useContext:Yi,useMemo:Ki}=wp.element,{__:Xi}=wp.i18n,Zi=function(){const{currentItem:t,changeCurrentItem:n}=Yi(ra),r=Ki((()=>O(Xi("Custom value","jet-form-builder"))),[]);return(0,e.createElement)(zi,{labelPosition:"side",options:r,label:Xi("Choose field","jet-form-builder"),value:t.field,onChange:e=>n({field:e})})},{SelectControl:Qi,TextareaControl:es,TextControl:ts,withFilters:ns}=wp.components,{useContext:rs,useState:ls,useEffect:os}=wp.element,{__:as}=wp.i18n,{addFilter:is}=wp.hooks,{rule_types:ss,ssr_callbacks:cs}=window.jetFormValidation,us=cs.map((({value:e})=>e));function ds(e){var t;const n=ss.findIndex((({value:t})=>t===e)),r=as("Enter value","jet-form-builder");return-1===n?r:null!==(t=ss[n]?.control_label)&&void 0!==t?t:r}is("jet.fb.advanced.rule.controls","jet-form-builder",(t=>n=>{const{currentItem:r,changeCurrentItem:l}=n,[o,a]=ls(!1),[i]=(0,K.useActions)(),s=i.some((e=>"save_record"===e.type&&(void 0===e.is_execute||!0===e.is_execute)))?"success":"error";if("ssr"!==r.type)return(0,e.createElement)(t,{...n});const c=r.value||"custom_jfb_field_validation";return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Qi,{labelPosition:"side",options:k.withPlaceholder(cs,as("Custom function","jet-form-builder")),label:as("Choose callback","jet-form-builder"),value:r.value,onChange:e=>l({value:e})}),"is_field_value_unique"===r.value&&(0,e.createElement)(u.Notice,{status:s,isDismissible:!1},as("This callback requires the Save Form Record action to work correctly.","jet-form-builder")),"is_user_password_valid"===r.value&&(0,e.createElement)(u.Notice,{status:"success",isDismissible:!1},as("Works only for logged users.","jet-form-builder")),!us.includes(r.value)&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ts,{label:as("Function name","jet-form-builder"),value:r.value,onChange:e=>l({value:e})}),(0,e.createElement)(ut,null,as("Example of registering a function below.","jet-form-builder")+" ",(0,e.createElement)("a",{href:"javascript:void(0)",onClick:()=>a((e=>!e))},as(o?"Hide":"Show","jet-form-builder"))),o&&(0,e.createElement)("pre",null,`/**\n * To get all the values of the fields in the form, you can use the expression:\n * jet_fb_request_handler()->get_request() or $context->get_request()\n *\n * If the field is located in the middle of the repeater, then only\n * jet_fb_request_handler()->get_request(), but $context->get_request() \n * will return the values of all fields of the current repeater element\n *\n * @param $value mixed\n * @param $context \\Jet_Form_Builder\\Request\\Parser_Context\n *\n * @return bool\n */\nfunction ${c}( $value, $context ): bool {\n\t// your logic\n\treturn true;\n}`)))}));const ms=ns("jet.fb.advanced.rule.controls")((function({currentItem:t,changeCurrentItem:n}){const[r,l]=ls((()=>ds(t.type)));switch(os((()=>{l(ds(t.type))}),[t.type]),t.type){case"equal":case"contain":case"contain_not":case"regexp":case"regexp_not":return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Zi,null),!Boolean(t.field)&&(0,e.createElement)(Qa,{value:t.value,label:r,onChangePreset:e=>n({value:e}),onChangeMacros:e=>{var r;return n({value:(null!==(r=t.value)&&void 0!==r?r:"")+e})}},(({instanceId:r})=>(0,e.createElement)(es,{id:r,value:t.value,onChange:e=>n({value:e})}))));default:return null}})),ps=function(){const{currentItem:t,changeCurrentItem:n}=rs(ra);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Qi,{labelPosition:"side",options:k.withPlaceholder(ss),label:as("Rule type","jet-form-builder"),value:t.type,onChange:e=>n({type:e})}),(0,e.createElement)(ms,{currentItem:t,changeCurrentItem:n}),(0,e.createElement)(es,{label:as("Error message","jet-form-builder"),value:t.message,onChange:e=>n({message:e})}))},{select:fs}=wp.data,hs=function(e){return fs("jet-forms/validation").readRule(e)},{useState:bs}=wp.element,{__:gs}=wp.i18n,ys=function(){const[t,n]=fe(),[r,l]=bs((()=>{var e;return null!==(e=t.validation?.rules)&&void 0!==e?e:[]}));return W((()=>{n((e=>({...e,validation:{...t.validation,rules:r}})))})),(0,e.createElement)(La,{state:l},(0,e.createElement)(oa.Provider,{value:{isSupported:()=>!0,render:({currentItem:t})=>(0,e.createElement)("span",{className:"repeater-item-title",dangerouslySetInnerHTML:{__html:hs(t)}})}},(0,e.createElement)(xa,{items:r},(0,e.createElement)(ps,null))),(0,e.createElement)(ya,null,gs("Add Rule","jet-form-builder")))},{createContext:vs}=wp.element,ws=vs({showModal:!1,setShowModal:()=>{}}),{useContext:Es,useState:_s}=wp.element,{__:Cs}=wp.i18n,{Button:ks}=wp.components,Ss=function(){const{setShowModal:t}=Es(ws),[n,r]=fe(),[l,o]=_s(!1);return(0,e.createElement)("div",{className:"jet-fb p-relative",onMouseOver:()=>o(!0),onFocus:()=>o(!0),onMouseOut:()=>o(!1),onBlur:()=>o(!1)},(0,e.createElement)(Ri,{isHover:l},(0,e.createElement)(ks,{isSmall:!0,isSecondary:!0,icon:"plus-alt2",onClick:()=>{r({validation:{...n.validation,rules:[{__visible:!0}]}}),t((e=>!e))}},Cs("Add new","jet-form-builder"))),(0,e.createElement)(Mi,null,(0,e.createElement)("span",{"data-title":Cs("You have no rules for this field.","jet-form-builder")}),(0,e.createElement)("span",{"data-title":Cs("Please click here to add new.","jet-form-builder")})))},{__:js}=wp.i18n,xs=function({rule:t}){return t.type?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{"data-title":js("Rule:","jet-form-builder"),dangerouslySetInnerHTML:{__html:hs(t)}}),Boolean(t.message)&&(0,e.createElement)("span",{"data-title":js("Message:","jet-form-builder"),dangerouslySetInnerHTML:{__html:t.message}})):(0,e.createElement)("span",{"data-title":js("The rule is not fully configured.","jet-form-builder")})},{useContext:Ns,useState:Fs}=wp.element,{__:Ts}=wp.i18n,{Button:Is}=wp.components,Bs=function({rule:t,index:n=0}){const{setShowModal:r}=Ns(ws),[l,o]=fe(),[a,i]=Fs(!1);return(0,e.createElement)("div",{className:"jet-fb p-relative",onMouseOver:()=>i(!0),onFocus:()=>i(!0),onMouseOut:()=>i(!1),onBlur:()=>i(!1)},(0,e.createElement)(Ri,{isHover:a},(0,e.createElement)(Is,{isSmall:!0,isSecondary:!0,icon:"edit",onClick:()=>{o({validation:{...l.validation,rules:l.validation.rules.map(((e,t)=>(e.__visible=n===t,e)))}}),r((e=>!e))}},Ts("Edit","jet-form-builder")),(0,e.createElement)(Is,{isSmall:!0,isDestructive:!0,icon:"trash",onClick:()=>{o({validation:{...l.validation,rules:l.validation.rules.filter(((e,t)=>t!==n))}})}},Ts("Delete","jet-form-builder"))),(0,e.createElement)(Mi,null,(0,e.createElement)(xs,{rule:t})))},{__:As}=wp.i18n,{Children:Os,cloneElement:Rs}=wp.element;const Ms=function(){const[t]=fe();return t?.validation?.rules?.length?(0,e.createElement)(qi,null,Os.map(function(t){const n=t.filter(((e,t)=>0!==t));return[(0,e.createElement)(Bs,{rule:t[0],key:"first_item"}),...n.map(((t,n)=>((t,n)=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("b",null,As("AND","jet-form-builder")),(0,e.createElement)(Bs,{rule:t,index:n})))(t,n+1)))]}(t.validation.rules),Rs)):(0,e.createElement)(Ss,null)},{useState:Ps}=wp.element,{__:Gs}=wp.i18n,{useBlockProps:Ls}=wp.blockEditor,{TextControl:Ds,SelectControl:qs,ToggleControl:Vs,BaseControl:Js,__experimentalNumberControl:$s}=wp.components;let{NumberControl:Us}=wp.components;void 0===Us&&(Us=$s);const{FormToggle:Hs,BaseControl:Ws,Flex:zs}=wp.components,{useInstanceId:Ys}=wp.compose,{useBlockProps:Ks}=wp.blockEditor,{useEffect:Xs}=wp.element,{useSelect:Zs}=wp.data,{useBlockProps:Qs}=wp.blockEditor,{useSelect:ec}=wp.data,{CustomSelectControl:tc,Icon:nc}=wp.components,{useBlockEditContext:rc}=wp.blockEditor,{Children:lc,cloneElement:oc,useContext:ac}=wp.element,{useSelect:ic}=wp.data,{useBlockEditContext:sc}=wp.blockEditor;let{__experimentalToggleGroupControl:cc,__experimentalToggleGroupControlOptionIcon:uc,__experimentalToolbarContext:dc,ToggleGroupControl:mc,ToggleGroupControlOptionIcon:pc,ToolbarItem:fc,ToolbarGroup:hc,ToolbarContext:bc}=wp.components;function gc({value:t}){const{name:n}=sc(),r=ac(bc),[,l]=fe(),{variations:o,components:a}=ic((t=>{const{getBlockVariations:l}=t("core/blocks"),o=l(n,"block");return{variations:o,components:o.map((t=>{var n;return(null!==(n=r?.currentId)&&void 0!==n?n:r?.baseId)?(0,e.createElement)(fc,{key:t.name,as:pc,value:t.name,label:t.title,icon:t.icon}):(0,e.createElement)(pc,{key:t.name,value:t.name,label:t.title,icon:t.icon})}))}}),[]);return o.length?(0,e.createElement)("div",{className:"jfb-variations-toolbar-toggle"},(0,e.createElement)(mc,{hideLabelFromVision:!0,onChange:e=>l({...o.find((({name:t})=>t===e)).attributes}),value:t,isBlock:!0},lc.map(a,oc))):null}mc=mc||cc,pc=pc||uc,bc=bc||dc;const{useSelect:yc}=wp.data,{useBlockEditContext:vc}=wp.blockEditor,{get:wc}=window._,{useBlockProps:Ec,RichText:_c}=wp.blockEditor,{Button:Cc}=wp.components,{createContext:kc}=wp.element,Sc=kc({}),{useContext:jc}=wp.element,{useState:xc}=wp.element,{get:Nc}=window._,{useSelect:Fc,useDispatch:Tc}=wp.data;var Ic,Bc,Ac;window.JetFBComponents={...null!==(Ic=window?.JetFBComponents)&&void 0!==Ic?Ic:{},BaseLabel:yn,ActionFieldsMap:function({fields:t=[],label:n="[Empty label]",children:a=null,plainHelp:i="",customHelp:s=!1}){return(0,e.createElement)(l.RowControl,{align:"flex-start"},(0,e.createElement)(l.Label,null,n),(0,e.createElement)(l.RowControlEnd,null,s&&"function"==typeof s&&s(),Boolean(i.length)&&(0,e.createElement)("span",{className:"description-controls"},i),t.map((([t,n],l)=>(0,e.createElement)(o.Fragment,{key:`field_in_map_${t+l}`},(0,e.createElement)(r.Provider,{value:{name:t,data:n,index:l}},"function"==typeof a?a({fieldId:t,fieldData:n,index:l}):a))))))},ActionModal:h,ActionModalContext:i,SafeDeleteContext:ta,RepeaterItemContext:ra,RepeaterBodyContext:la,RepeaterHeadContext:oa,RepeaterButtonsContext:aa,ActionFieldsMapContext:r,CurrentPropertyMapContext:Ga,BlockValueItemContext:sa,DynamicPropertySelect:function({dynamic:t=[],parseValue:n=null,children:a=null,properties:i=null}){const{source:s,settings:c,setMapField:u}=(0,o.useContext)(K.CurrentActionEditContext);i=null!=i?i:s.properties;const{name:d,index:m}=(0,o.useContext)(r),{fields_map:p={}}=c;function f(e){var r;for(const t of i)if(e===t.value)return e;return n?n(e):null!==(r=t[0])&&void 0!==r?r:""}const[h,b]=(0,o.useState)((()=>{var e;return f(null!==(e=p[d])&&void 0!==e?e:"")})),g=(0,e.createElement)(l.StyledSelectControl,{key:d+m,value:h,options:i,help:(()=>{var e;const t=i.find((({value:e})=>e===h));return null!==(e=t?.help)&&void 0!==e?e:""})(),onChange:e=>{const n=f(e);b(n),u({nameField:d,value:t.includes(e)?"":e})}});return(0,e.createElement)(Ga.Provider,{value:{FieldSelect:g,property:h}},a&&a,!a&&g)},SafeDeleteToggle:function(t){const[n,r]=da(!0);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ca,{label:ua("Safe deleting","jet-form-builder"),checked:n,onChange:r}),(0,e.createElement)(ta.Provider,{value:n},t.children))},RepeaterAddNew:ya,RepeaterAddOrOperator:function(t){var n;const{onSetState:r,functions:l,children:o}=t,{addNewItem:a}=null!==(n=null!=l?l:pa(r))&&void 0!==n?n:Wi(ha);return(0,e.createElement)(Hi,{isSecondary:!0,icon:"randomize",onClick:()=>a({__visible:!1,or_operator:!0})},o)},Repeater:xa,WrapperRequiredControl:function({children:t,labelKey:n="label",requiredKey:l="required",helpKey:o="help",field:a=[]}){let{name:i,data:s}=g(r);return a.length&&([i,s]=a),(0,e.createElement)("div",{className:"jet-user-meta__row",key:"user_meta_"+i},(0,e.createElement)("div",{className:"jet-field-map__row-label"},(0,e.createElement)("span",{className:"fields-map__label"},s.hasOwnProperty(n)&&s[n]&&s[n],!s.hasOwnProperty(n)&&s),s.hasOwnProperty(l)&&s[l]&&(0,e.createElement)("span",{className:"fields-map__required"}," *"),s[o]&&(0,e.createElement)("p",{className:"components-base-control__help",style:{color:"rgb(117, 117, 117)",margin:"1em 0 0 0"}},(0,e.createElement)(b,null,s[o]))),t)},DynamicPreset:Ie,JetFieldsMapControl:Re,FieldWithPreset:function({children:t=null,ModalEditor:n,triggerClasses:r=[],baseControlProps:l={}}){const[o,a]=Le(!1),i=()=>{a((e=>!e))},s=["jet-form-dynamic-preset__trigger",...r].join(" ");return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ge,{className:"jet-form-dynamic-preset",...l},t,(0,e.createElement)("div",{className:s,onClick:i},(0,e.createElement)(Pe,{viewBox:"0 0 54 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(Me,{d:"M42.6396 26.4347C37.8682 27.3436 32.5666 28.0252 27.1894 28.0252C21.8121 28.0252 16.4348 27.3436 11.7391 26.4347C6.96774 25.4502 3.18093 23.8597 0.37868 21.9663L0.37868 28.0252C0.37868 29.5399 1.59046 31.1304 3.78682 32.4179C5.98317 33.7054 9.46704 34.9172 13.6325 35.5988C17.798 36.2805 22.115 36.8106 27.1894 36.8106C32.2637 36.8106 36.6564 36.5077 40.7462 35.5988C44.8359 34.69 48.3198 33.7054 50.5162 32.4179C52.7125 31.1304 54 29.5399 54 28.0252L54 21.9663C51.122 23.8597 47.3352 25.4502 42.6396 26.4347ZM42.6396 53.5484C37.8682 54.5329 32.5666 55.1388 27.1894 55.1388C21.8121 55.1388 16.4348 54.5329 11.7391 53.5484C7.04348 52.5638 3.18093 51.0491 0.378682 49.1556L0.378682 55.1388C0.378683 56.7293 1.59046 58.3197 3.78682 59.5315C6.36186 60.819 9.46705 62.1066 13.6325 62.7125C17.7223 63.697 22.115 64 27.1894 64C32.2637 64 36.6564 63.697 40.7462 62.7125C44.8359 61.8036 48.3198 60.819 50.5162 59.5315C52.7125 57.9411 54 56.7293 54 54.8359L54 48.8527C51.122 51.0491 47.3352 52.2608 42.6396 53.5484ZM42.6396 39.9915C37.8682 40.9004 32.5666 41.582 27.1894 41.582C21.8121 41.582 16.4348 40.9004 11.7391 39.9915C6.96774 39.007 3.18093 37.4922 0.378681 35.5988L0.378681 41.582C0.378681 43.1725 1.59046 44.6872 3.78682 45.9747C6.36185 47.2622 9.46705 48.474 13.6325 49.1556C17.7223 50.0645 22.115 50.3674 27.1894 50.3674C32.2637 50.3674 36.6564 50.0645 40.7462 49.1556C44.8359 48.1711 48.3198 47.2622 50.5162 45.9747C52.7125 44.3843 54 43.1725 54 41.582L54 35.5988C51.122 37.4922 47.3352 39.007 42.6396 39.9915ZM40.4432 2.12337C36.3535 1.13879 31.885 0.835848 26.8864 0.835849C21.8878 0.835849 17.4194 1.13879 13.2539 2.12337C9.08836 3.10794 5.68022 4.01678 3.48387 5.3043C1.28751 6.59181 -3.4782e-06 8.10654 -3.33916e-06 9.697L-2.95513e-06 14.0897C-2.81609e-06 15.6802 1.28752 17.2706 3.48387 18.5582C6.05891 19.7699 9.1641 21.0575 13.2539 21.6633C17.3436 22.2692 21.8121 22.9509 26.8864 22.9509C31.9607 22.9509 36.3535 22.9509 40.4432 22.345C44.533 21.7391 48.0169 20.4516 50.2132 19.164C52.7125 17.5736 54 15.9831 54 14.3927L54 9.99995C54 8.40948 52.7125 6.81902 50.5162 5.60724C48.3198 4.39546 44.533 2.72926 40.4432 2.12337Z",fill:"#7E8993"})))),o&&(0,e.createElement)(h,{onRequestClose:i,classNames:["width-60"],title:"Edit Preset"},(t=>(0,e.createElement)(n,{...t}))))},GlobalField:ye,AvailableMapField:function({fieldsMap:t,field:n,index:r,value:a,onChangeValue:i,isMapFieldVisible:s}){let c=null;t||(t={}),c=t[n],c&&"object"==typeof c||(c={});const d=({field:t,name:n,index:r,fIndex:o,children:a})=>(0,e.createElement)(u.Card,{key:t+n+r+o,size:"extraSmall",style:{marginBottom:"10px"}},(0,e.createElement)(u.CardHeader,null,(0,e.createElement)("span",{className:"jet-label-overflow"},t)),(0,e.createElement)(l.StyledCardBodyControl,{key:t+n+r+o,className:"jet-form-preset__fields-map-item"},a));return(0,e.createElement)(o.Fragment,{key:`map_field_preset_${n+r}`},window.JetFormEditorData.presetConfig.map_fields.map(((o,m)=>{const p={field:n,name:o.name,index:r,fIndex:m},f="control_"+n+o.name+r+m;switch(o.type){case"text":return s(a,o,n)&&function({field:t,name:n,index:r,fIndex:o},a){return(0,e.createElement)(u.Card,{key:t+n+r+o,size:"extraSmall",style:{marginBottom:"10px"}},(0,e.createElement)(u.CardHeader,null,(0,e.createElement)("span",{className:"jet-label-overflow"},t)),(0,e.createElement)(l.StyledCardBodyControl,{key:t+n+r+o,className:"jet-form-preset__fields-map-item"},a))}(p,(0,e.createElement)(l.StyledTextControl,{key:f+"TextControl",placeholder:o.label,value:c[o.name],onChange:e=>{c[o.name]=e,i({...t,[n]:c},"fields_map")}}));case"select":return s(a,o,n)&&(0,e.createElement)(d,{...p,key:f},(0,e.createElement)(l.StyledSelectControl,{options:o.options,value:c[o.name],onChange:e=>{c[o.name]=e,i({...t,[n]:c},"fields_map")}}));case"custom_select":return s(a,o,n)&&(0,e.createElement)(d,{...p,key:f},(0,e.createElement)(u.CustomSelectControl,{options:o.options,onChange:({selectedItem:e})=>{c[o.name]=e.key,i({...t,[n]:c},"fields_map")},value:o.options.find((e=>e.key===c[o.name]))}));case"grouped_select":return s(a,o,n)&&(0,e.createElement)(d,{...p,key:f},(0,e.createElement)(je,{options:o.options,value:c[o.name],onChange:e=>{c[o.name]=e,i({...t,[n]:c},"fields_map")}}));default:return null}})))},MapField:xe,FieldWrapper:function(t){const{attributes:n,children:r,wrapClasses:l=[],valueIfEmptyLabel:o="",setAttributes:a,childrenPosition:i="between"}=t,s=de(),c=H("_jf_args"),u=Xe((function(){We(n,a)}));function d(){return(0,e.createElement)(ze.VisualLabel,null,Qe(Ze("input label:","jet-form-builder")),(0,e.createElement)("div",{className:"jet-form-builder__label"},(0,e.createElement)(Ye,{key:s("rich-label"),placeholder:"Label...",allowedFormats:[],value:n.label?n.label:o,onChange:e=>a({label:e}),isSelected:!1,...u}),n.required&&(0,e.createElement)("span",{className:"jet-form-builder__required"},c.required_mark?c.required_mark:"*")))}function m(){return(0,e.createElement)("div",{className:"jet-form-builder__desc--wrapper"},Qe(Ze("input description:","jet-form-builder")),(0,e.createElement)(ze,{key:"custom_help_description",className:"jet-form-builder__desc"},(0,e.createElement)("div",{className:"components-base-control__help"},(0,e.createElement)(Ye,{key:s("rich-description"),tagName:"small",placeholder:"Description...",allowedFormats:[],value:n.desc,onChange:e=>a({desc:e}),style:{marginTop:"0px"}}))))}return"row"===c.fields_layout&&l.push("jet-form-builder-row__flex"),n?.crocoblock_styles?._uniqueClassName&&l.push(n.crocoblock_styles._uniqueClassName),(0,e.createElement)(ze,{key:s("placeHolder_block"),className:_("jet-form-builder__field-wrap","jet-form-builder-row",l)},"row"!==c.fields_layout&&(0,e.createElement)(e.Fragment,null,"top"===i&&r,d(),"between"===i&&r,m(),"bottom"===i&&r),"row"===c.fields_layout&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"jet-form-builder-row__flex--label"},d(),m()),(0,e.createElement)("div",{className:"jet-form-builder-row__flex--content"},r)))},MacrosInserter:function({children:t,fields:n,onFieldClick:r,customMacros:l,zIndex:o=1e6,...a}){const[i,s]=rt((()=>!1));return(0,e.createElement)("div",{className:"jet-form-editor__macros-inserter"},(0,e.createElement)(et,{isTertiary:!0,isSmall:!0,icon:i?"no-alt":"admin-tools",label:"Insert macros",className:"jet-form-editor__macros-trigger",onClick:()=>{s((e=>!e))}}),i&&(0,e.createElement)(tt,{style:{zIndex:o},position:"bottom left",...a},n.length&&(0,e.createElement)(nt,{title:"Form Fields"},n.map((t=>(0,e.createElement)("div",{key:"field_"+t.name},(0,e.createElement)(et,{isLink:!0,onClick:()=>{r(t.name)}},"%"+t.name+"%"))))),l&&(0,e.createElement)(nt,{title:"Custom Macros"},l.map((t=>(0,e.createElement)("div",{key:"macros_"+t},(0,e.createElement)(et,{isLink:!0,onClick:()=>{r(t)}},"%"+t+"%")))))))},RepeaterWithState:function({children:t,ItemHeading:n,repeaterClasses:r=[],repeaterItemClasses:l=[],newItem:a,addNewButtonLabel:i="Add New",items:s=[],isSaveAction:c,onSaveItems:m,onUnMount:p,onAddNewItem:f,onRemoveItem:h,help:b={helpSource:{},helpVisible:()=>!1,helpKey:""},additionalControls:g=null}){const y=["jet-form-builder__repeater-component",...r].join(" "),v=["jet-form-builder__repeater-component-item",...l].join(" "),[w,E]=(0,o.useState)([]);(0,o.useEffect)((()=>{E(s&&s.length>0?s.map((e=>(e.__visible=!1,e))):[{...a,__visible:!0}])}),[]);const[_,C]=(0,o.useState)(!0),k=(e,t)=>{E((n=>{const r=JSON.parse(JSON.stringify(n));return r[t]={...n[t],...e},r}))},S=({oldIndex:e,newIndex:t})=>{E((n=>{const r=JSON.parse(JSON.stringify(n));return[r[t],r[e]]=[r[e],r[t]],r}))},j=e=>!(e{if(!0===c){for(const e in w)for(const t in w[e])t.startsWith("__")&&delete w[e][t];m(w),p()}else!1===c&&p()}),[c]);const x=e=>`jet-form-builder-repeater__item_${e}`,{helpSource:N,helpVisible:F,helpKey:T}=b,I=F(w)&&N&&N[T];return(0,e.createElement)("div",{className:y,key:"jet-form-builder-repeater"},I&&(0,e.createElement)("p",null,N[T].label),0(0,e.createElement)(u.Card,{elevation:2,className:v,key:x(l)},(0,e.createElement)(u.CardHeader,{className:"repeater__item__header"},(0,e.createElement)("div",{className:"repeater-item__left-heading"},(0,e.createElement)(u.ButtonGroup,{className:"repeater-action-buttons"},(0,e.createElement)(u.Button,{isSmall:!0,icon:r.__visible?"no-alt":"edit",onClick:()=>(e=>{E((t=>{const n=JSON.parse(JSON.stringify(t));return n[e].__visible=!n[e].__visible,n}))})(l),className:"repeater-action-button"}),(0,e.createElement)(u.Button,{isSmall:!0,isSecondary:!0,disabled:!Boolean(l),icon:"arrow-up-alt2",onClick:()=>(e=>{S({oldIndex:e,newIndex:e-1})})(l),className:"repeater-action-button"}),(0,e.createElement)(u.Button,{isSmall:!0,isSecondary:!0,disabled:j(l),icon:"arrow-down-alt2",onClick:()=>(e=>{S({oldIndex:e,newIndex:e+1})})(l),className:"repeater-action-button"})),(0,e.createElement)("span",{className:"repeater-item-title"},n&&(0,e.createElement)(n,{currentItem:r,index:l,changeCurrentItem:e=>k(e,l)}),!n&&`#${l+1}`)),(0,e.createElement)(u.ButtonGroup,null,(0,e.createElement)(u.Button,{isSmall:!0,isSecondary:!0,onClick:()=>(e=>{E((t=>{const n=JSON.parse(JSON.stringify(t)),[r,l]=[n.slice(0,e+1),n.slice(e+1)];return[...r,n[e],...l]}))})(l)},(0,d.__)("Clone","jet-form-builder")),(0,e.createElement)(u.Button,{isSmall:!0,isSecondary:!0,isDestructive:!0,onClick:()=>(e=>{_&&!(e=>confirm((0,d.sprintf)((0,d.__)("Are you sure you want to remove item %d?","jet-form-builder"),e+1)))(e)||h&&!h(e,w)||E((t=>{const n=JSON.parse(JSON.stringify(t));return n.splice(e,1),n}))})(l)},(0,d.__)("Delete","jet-form-builder")))),r.__visible&&(0,e.createElement)(u.CardBody,{className:"repeater-item__content"},t&&(0,e.createElement)(o.Fragment,{key:`repeater-component__item_${l}`},"function"==typeof t&&t({currentItem:r,changeCurrentItem:e=>k(e,l),currentIndex:l}),"function"!=typeof t&&t),!t&&"Set up your Repeater Template, please.")))),1{return e=a,f&&f(e,w),void E((t=>[...t,{...e,__visible:!0}]));var e}},i))},AdvancedFields:function(){return(0,e.createElement)(kt,null,(0,e.createElement)(at,null),(0,e.createElement)(ct,null),(0,e.createElement)(gt,null),(0,e.createElement)(wt,null),(0,e.createElement)(Ct,null))},GeneralFields:function({hasMacro:t=!0}){return(0,e.createElement)(On,{title:Rn("General","jet-form-builder"),key:"jet-form-general-fields"},(0,e.createElement)(Ft,null),(0,e.createElement)(Pt,null),(0,e.createElement)(Dt,null),(0,e.createElement)(An,{hasMacro:t}))},ToolBarFields:function({children:t=null}){return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Vn,null,t),(0,e.createElement)(zn,null))},FieldControl:function(t){const{setAttributes:n,attributes:r}=t,l=function({type:e,attributes:t,attrsSettings:n={}}){const r=Ls()["data-type"],l=er();return l[e]?l[e].attrs.filter((({attrName:e,label:l,...o})=>{const a=e in t,i=(e=>{if(!e.condition)return!0;if(r&&e.condition.blockName){if("string"==typeof e.condition.blockName&&r!==e.condition.blockName)return!1;if("object"==typeof e.condition.blockName&&e.condition.blockName.length&&!e.condition.blockName.includes(r))return!1}return!(!function(){if("object"!=typeof e.condition.attr)return!0;const{operator:n="and",items:r={}}=e.condition.attr;if("or"===n.toLowerCase())for(const e in r)if(r[e]===t[e])return!0;return"and"!==n.toLowerCase()||function(){for(const e in r)if(r[e]!==t[e])return!1;return!0}()}()||"string"==typeof e.condition.attr&&e.condition.attr&&!t[e.condition.attr]||"string"==typeof e.condition&&!t[e.condition])})(o),s=e in n&&"show"in n[e]&&!1===n[e].show;return a&&i&&!s})):[]}(t),o=(e,t)=>{n({[t]:e})};return l.map((({help:t="",attrName:n,label:l,...a})=>{switch(a.type){case"text":return(0,e.createElement)(Ds,{key:`${a.type}-${n}-TextControl`,label:l,help:t,value:r[n],onChange:e=>o(e,n)});case"select":return(0,e.createElement)(qs,{key:`${a.type}-${n}-SelectControl`,label:l,help:t,value:r[n],options:a.options,onChange:e=>{o(e,n)}});case"toggle":return(0,e.createElement)(Vs,{key:`${a.type}-${n}-ToggleControl`,label:l,help:t,checked:r[n],onChange:e=>{o(e,n)}});case"number":return(0,e.createElement)(Js,{key:`${a.type}-${n}-BaseControl`,label:l},(0,e.createElement)(Us,{key:`${a.type}-${n}-NumberControl`,value:r[n],onChange:e=>{o(Number(e),n)}}),(0,e.createElement)("p",{className:"components-base-control__help",style:{color:"rgb(117, 117, 117)"}},t));default:return null}}))},HorizontalLine:function(t){return(0,e.createElement)("hr",{style:{...t}})},FieldSettingsWrapper:function(t){const{title:n,children:r}=t,l=Zn()["data-type"].replace("/","-"),o=Xn(`jet.fb.render.settings.${l}`,null);return(r||o)&&(0,e.createElement)(Kn,{title:n||Yn("Field","jet-form-builder")},r,o)},GroupedSelectControl:je,BaseHelp:ut,GatewayFetchButton:nr,ValidationToggleGroup:function({excludeBrowser:t=!1}){var n;const[r,l]=fe(),o=de();return Ia=Ia.filter((({value:e})=>"browser"!==e||!t)),(0,e.createElement)(Na,{onChange:e=>l((t=>({...t,validation:{...r.validation,type:e}}))),value:null!==(n=r.validation?.type)&&void 0!==n?n:"inherit",label:Ta("Validation type","jet-form-builder"),isBlock:!0,isAdaptiveWidth:!1},(0,e.createElement)(Fa,{label:Ta("Inherit","jet-form-builder"),value:"inherit","aria-label":Ta("Inherit from form's args","jet-form-builder"),showTooltip:!0}),Ia.map((t=>(0,e.createElement)(Fa,{key:o(t.value+"_key"),label:t.label,value:t.value,"aria-label":t.title,showTooltip:!0}))))},ValidationBlockMessage:function({name:t}){var n,r,l;const o=de(),[a,i]=fe(),[s]=(0,Ba.useMetaState)("_jf_validation","{}",[]),c=!a.validation?.type,u=c?null!==(n=s?.messages)&&void 0!==n?n:{}:null!==(r=a.validation?.messages)&&void 0!==r?r:{},d=Oa(t);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ra,{disabled:c,key:o("massage_"+t),label:d?.label,help:d?.help,value:null!==(l=u[t])&&void 0!==l?l:d?.initial,onChange:e=>i((n=>({...n,validation:{...a.validation,messages:{...u,[t]:e}}})))}))},ValidationMetaMessage:function({message:t,update:n,value:r=null,help:o=null}){const a=Oa(t.id);return(0,e.createElement)(l.StyledFlexControl,{direction:"column"},(0,e.createElement)(u.Flex,null,(0,e.createElement)(l.Label,{htmlFor:t.id},a.label),(0,e.createElement)(u.Flex,{style:{width:"auto"}},t.blocks.map((t=>(0,e.createElement)(u.Tooltip,{key:"message_block_item"+t.title,text:t.title,delay:200,placement:"top"},(0,e.createElement)(Ma,{icon:t.icon})))))),(0,e.createElement)(l.StyledTextControl,{className:l.ClearBaseControlStyle,id:t.id,help:null!=o?o:a?.help,value:null!=r?r:a?.initial,onChange:e=>n((n=>({...n,[t.id]:e})))}))},DynamicValues:Ui,EditAdvancedRulesButton:function(){const[t,n]=Ps(!1);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ws.Provider,{value:{showModal:t,setShowModal:n}},(0,e.createElement)("div",{className:"jet-fb mb-24"},(0,e.createElement)(Ms,null))),t&&(0,e.createElement)(h,{title:Gs("Edit Advanced Rules","jet-form-builder"),classNames:["width-60"],onRequestClose:()=>n(!1)},(0,e.createElement)(ys,null)))},RepeaterStateContext:ha,RepeaterState:La,BlockLabel:Ft,BlockName:Pt,BlockDescription:Dt,BlockDefaultValue:An,BlockPlaceholder:at,BlockAddPrevButton:ct,BlockPrevButtonLabel:gt,BlockVisibility:wt,BlockClassName:Ct,BlockAdvancedValue:function({help:t,label:n,hasMacro:r=!0,...l}){return(0,e.createElement)("div",{...l},(0,e.createElement)(An,{help:t,label:n,hasMacro:r}),(0,e.createElement)("hr",null),(0,e.createElement)(Ui,null))},MacrosFields:bn,MacrosButtonTemplate:zt,MacrosFieldsTemplate:dn,ShowPopoverContext:Jt,PopoverItem:Zt,PresetButton:qt,ConditionItem:di,AdvancedInspectorControl:En,AdvancedModalControl:Qa,ClientSideMacros:xn,ToggleControl:function t({checked:n=!1,disabled:r=!1,onChange:l=()=>{},children:o=null,help:a=null,flexLabelProps:i={},outsideLabel:s=null,__nextHasNoMarginBottom:c=!1,...u}){const d=a,m=`inspector-jfb-toggle-control-${Ys(t)}`;return(0,e.createElement)(Ws,{id:m},(0,e.createElement)(zs,{direction:"column"},(0,e.createElement)(zs,{gap:3,align:"flex-start",justify:"flex-start",...i},(0,e.createElement)(Hs,{id:m,checked:n,onChange:e=>l(e.target.checked),disabled:r,...u}),(0,e.createElement)("label",{htmlFor:m},o),s),"string"==typeof d?(0,e.createElement)(ut,null,d):d&&(0,e.createElement)(d,null)))},DetailsContainer:Mi,HoverContainer:Ri,ContainersList:qi,HumanReadableConditions:Oi,ConditionsRepeaterContextProvider:hi,ServerSideMacros:function({children:t}){const n=(0,K.useRequestFields)();return(0,e.createElement)(Kt.Provider,{value:{afterFields:n}},t)},SelectVariations:function({value:t}){const{name:n}=rc(),[,r]=fe(),{variations:l,rawVariations:o}=ec((t=>{const{getBlockVariations:r}=t("core/blocks"),l=r(n,"block"),o=[],a={};for(const t of l)o.push({key:t.name,name:(0,e.createElement)("span",{className:"jet-fb flex gap-1em ai-center"},(0,e.createElement)(nc,{icon:t.icon}),t.title)}),a[t.name]=t;return{variations:o,rawVariations:a}}),[n]);return l.length?(0,e.createElement)(tc,{__nextUnconstrainedWidth:!0,hideLabelFromVision:!0,options:l,size:"__unstable-large",onChange:({selectedItem:e})=>r({...o[e.key].attributes}),value:l.find((({key:e})=>e===t))}):null},ToggleGroupVariations:function(t){const n=ac(bc);return n?.currentId?(0,e.createElement)(hc,{className:"jet-fb toggle-toolbar-group"},(0,e.createElement)(gc,{...t})):(0,e.createElement)(gc,{...t})},AttributeHelp:ft,ActionButtonPlaceholder:function(t){const n=Ec();return(0,e.createElement)("div",{...n},(0,e.createElement)("div",{className:t.wrapperClasses.join(" ")},(0,e.createElement)(Cc,{isPrimary:!0,className:t.buttonClasses.join(" ")},(0,e.createElement)(_c,{placeholder:"Input Submit label...",allowedFormats:[],value:t.attributes.label,onChange:e=>t.setAttributes({label:e})}))))},ActionModalFooterSlotFill:c,ScopedAttributesProvider:function({children:t}){const[n,r]=fe(),[l,o]=xc((()=>n));return(0,e.createElement)(Sc.Provider,{value:{realAttributes:n,setRealAttributes:r,attributes:l,setAttributes:o}},t)}},window.JetFBActions={...null!==(Bc=window?.JetFBActions)&&void 0!==Bc?Bc:{},withPreset:ge,getInnerBlocks:R,getAvailableFieldsString:function(e){const t=T([e]),n=[];return t.forEach((function(e){n.push("%FIELD::"+e+"%")})),I("Available fields: ","jet-form-builder")+n.join(", ")},getAvailableFields:T,getFormFieldsBlocks:F,getFieldsWithoutCurrent:O,gatewayAttr:P,gatewayLabel:G,registerGateway:function(e,t,n="cred"){window.JetFBGatewaysList=window.JetFBGatewaysList||{},window.JetFBGatewaysList[e]=window.JetFBGatewaysList[e]||{},window.JetFBGatewaysList[e][n]=t},Tools:k,event:e=>{const t=new Event(e);return()=>document.dispatchEvent(t)},listen:(e,t)=>{document.addEventListener(e,t)},renderGateway:D,renderGatewayWithPlaceholder:function(e,t,n="cred",r=null){return L(e,n)?(t.Placeholder=r,D(e,t,n)):r},maybeCyrToLatin:w,getConvertedName:E,getBlockControls:function(e="all"){if(!e)return!1;const t=er();return"all"===e?t:!!(t[e]&&t[e].attrs&&Array.isArray(t[e].attrs)&&0{e.includes(n.name)&&t.push(n)})),t},convertObjectToOptionsList:function(e=[],{usePlaceholder:t=!0,label:n="--",value:r=""}={}){const l={label:n,value:r};if(!e)return t?[l]:[];const o=Object.entries(e).map((e=>({value:e.value,label:e.label})));return t?[l,...o]:o},appendField:function(e,t=[]){M("jet.fb.register.fields","jet-form-builder",(n=>n.map((n=>t.length&&!t.includes(n.name)?n:e(n)))))},insertMacro:Nn,column:y,getCurrentInnerBlocks:function(){const{"data-block":e}=Ks();return R(e)},humanReadableCondition:pi,assetUrl:function(e=""){return JetFormEditorData.assetsUrl+e},set:function(e,t,n){const r=JSON.parse(JSON.stringify(e));let l,o=r;for(let e=0;e{function t(){e.call(this)}return t.prototype=Object.create(e.prototype),t}},window.JetFBHooks={...null!==(Ac=window?.JetFBHooks)&&void 0!==Ac?Ac:{},useSelectPostMeta:H,useSuccessNotice:$,useEvents:ae,useRequestEvents:function(){const e=ie((e=>e("jet-forms/actions").getCurrentAction()));return ae(e)},useBlockConditions:ce,useUniqKey:de,useBlockAttributes:fe,useIsAdvancedValidation:function(){const{type:e}=H("_jf_validation"),[t]=fe();return t.validation?.type?"advanced"===t.validation?.type:"advanced"===e},useGroupedValidationMessages:function(){const[e]=$e(He);return e},withSelectFormFields:(e=[],t=!1,n=!1)=>r=>{let l=[];const o=["submit","form-break","heading","group-break","conditional",...e];return Y((e=>{e.name.includes("jet-forms/")&&e.attributes.name&&!o.find((t=>e.name.includes(t)))&&l.push({blockName:e.name,name:e.attributes.name,label:e.attributes.label||e.attributes.name,value:e.attributes.name})}),r("core/block-editor").getBlocks()),l=t?[{value:"",label:t},...l]:l,{formFields:n?l:z("jet.fb.getFormFieldsBlocks",l)}},withSelectGateways:X,withDispatchGateways:function(e){const t=e("jet-forms/gateways");return{setGatewayRequest:t.setRequest,setGatewayScenario:t.setScenario,setScenario:t.setCurrentScenario,setGateway:t.setGateway,setGatewayInner:t.setGatewayInner,setGatewaySpecific:t.setGatewaySpecific,clearGateway:t.clearGateway,clearScenario:t.clearScenario}},useOnUpdateModal:W,useInsertMacro:Tn,useIsHasAttribute:he,useUniqueNameOnDuplicate:function(e=null){const t=Qs(),[,n]=fe(),r=t["data-block"],l=Zs((e=>{if(!e(Wo).isRecentlyAdded(r))return!1;const{hasChanged:t,names:n}=e(Wo).getUniqueNames(r);return!!t&&n}),[r]);Xs((()=>{l&&("function"!=typeof e?n({name:l.split("|")[0]}):e(l))}),[l])},useSupport:function(e){const{name:t}=vc();return yc((n=>{const r=n("core/blocks").getBlockType(t);return wc(r,["supports",e],!1)}),[t,e])},useScopedAttributesContext:function(){return jc(Sc)},useOpenEditorPanel:function(e){const{enableComplementaryArea:t}=Tc("core/interface"),{toggleEditorPanelOpened:n}=Tc("core/edit-post"),r=Fc((t=>t("core/edit-post").isEditorPanelOpened(e)),[e]);return()=>{t("core/edit-post","edit-post/document"),!r&&n(e)}}}})()})(); \ No newline at end of file diff --git a/assets/src/editor/editor-styles/components/builder-blocks.pcss b/assets/src/editor/editor-styles/components/builder-blocks.pcss index a0217cbef..b960ffc52 100644 --- a/assets/src/editor/editor-styles/components/builder-blocks.pcss +++ b/assets/src/editor/editor-styles/components/builder-blocks.pcss @@ -19,6 +19,18 @@ body.post-type-jet-form-builder { margin-block-start: 0; } + .jet-form-builder__field-preview > .components-base-control__field { + label, + input, + textarea, + select { + border-color: var(--wp-components-color-gray-600, #949494); + border-radius: inherit; + border-style: solid; + border-width: 1px; + } + } + .block-editor-block-list__block.wp-block[data-type*="jet-forms/"] { padding: 10px 15px !important; box-shadow: 0 0 0 1px #e0e0e0; @@ -37,6 +49,9 @@ body.post-type-jet-form-builder { padding-top: 5px; } .jet-form-builder__field-preview { + .components-input-control__backdrop { + display: none; + } label, input, textarea, diff --git a/assets/src/package/blocks/components/FieldWrapper.js b/assets/src/package/blocks/components/FieldWrapper.js index 7be2001de..57efedfc5 100644 --- a/assets/src/package/blocks/components/FieldWrapper.js +++ b/assets/src/package/blocks/components/FieldWrapper.js @@ -103,6 +103,12 @@ function FieldWrapper( props ) { wrapClasses.push( 'jet-form-builder-row__flex' ); } + if ( attributes?.crocoblock_styles?._uniqueClassName ) { + wrapClasses.push( + attributes.crocoblock_styles._uniqueClassName, + ); + } + return ( 'style', - 'label' => esc_html__( 'Background color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => 'color', 'css' => array( array( 'property' => '--jfb-label-bgc' ) ), ) @@ -405,7 +405,7 @@ public function controls_description_style() { 'description_bg_color', array( 'tab' => 'style', - 'label' => esc_html__( 'Background color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => 'color', 'css' => array( array( 'property' => '--jfb-desc-bgc' ) ), ) @@ -505,7 +505,7 @@ public function controls_input_style() { 'input_bg_color', array( 'tab' => 'style', - 'label' => esc_html__( 'Background color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => 'color', 'css' => array( array( @@ -750,7 +750,7 @@ public function controls_checkradio_style() { 'checkradio_fields_box_bg_color', array( 'tab' => 'style', - 'label' => esc_html__( 'Background color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => 'color', 'css' => array( array( 'property' => '--jfb-checkradio-input-bgc' ) ), ) @@ -769,7 +769,7 @@ public function controls_checkradio_style() { 'checkradio_fields_box_checked_bg', array( 'tab' => 'style', - 'label' => esc_html__( 'Background color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => 'color', 'css' => array( array( 'property' => '--jfb-checkradio-input-checked-bgc' ) ), ) @@ -898,7 +898,7 @@ public function controls_calc_fields_style() { 'calc_fields_bg_color', array( 'tab' => 'style', - 'label' => esc_html__( 'Background color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => 'color', 'css' => array( array( 'property' => '--jfb-calc-bgc' ) ), ) @@ -1196,7 +1196,7 @@ public function controls_heading_style() { 'heading_label_bg_color', array( 'tab' => 'style', - 'label' => esc_html__( 'Background color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => 'color', 'css' => array( array( 'property' => '--jfb-heading-bgc' ) ), ) @@ -1275,7 +1275,7 @@ public function controls_heading_style() { 'heading_desc_bg_color', array( 'tab' => 'style', - 'label' => esc_html__( 'Background color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => 'color', 'css' => array( array( 'property' => '--jfb-heading-desc-bgc' ) ), ) @@ -1417,7 +1417,7 @@ public function controls_repeater_style() { 'booking_form_repeater_bg_color', array( 'tab' => 'style', - 'label' => esc_html__( 'Background color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => 'color', 'css' => array( array( @@ -1524,7 +1524,7 @@ public function controls_repeater_style() { 'booking_form_repeater_rem_bg_color', array( 'tab' => 'style', - 'label' => esc_html__( 'Background color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => 'color', 'css' => array( array( 'property' => '--jfb-repeater-rem-button-bgc' ) ), ) @@ -1612,7 +1612,7 @@ public function controls_conditional_style() { 'conditional_bg_color', array( 'tab' => 'style', - 'label' => esc_html__( 'Background color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => 'color', 'css' => array( array( 'property' => '--jfb-conditional-bgc' ) ), ) @@ -1732,7 +1732,7 @@ public function controls_submit_style() { 'booking_form_submit_bg_color', array( 'tab' => 'style', - 'label' => esc_html__( 'Background color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => 'color', 'css' => array( array( @@ -1927,7 +1927,7 @@ public function controls_form_break_buttons_style() { 'form_break_button_bg_color', array( 'tab' => 'style', - 'label' => esc_html__( 'Background color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => 'color', 'css' => array( array( @@ -2038,7 +2038,7 @@ public function controls_form_break_message_style() { 'form_break_message_bg_color', array( 'tab' => 'style', - 'label' => esc_html__( 'Background color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => 'color', 'css' => array( array( 'property' => '--jfb-break-message-bgc' ) ), ) @@ -2111,7 +2111,7 @@ public function controls_form_progress_wrap_style() { 'jet_fb_progress_wrapper_bg_color', array( 'tab' => 'style', - 'label' => esc_html__( 'Background color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => 'color', 'css' => array( array( 'property' => '--jfb-progress-wrapper-bgc' ) ), ) @@ -2209,7 +2209,7 @@ public function controls_form_progress_pages_style() { 'jet_fb_progress_pages_bg_color', array( 'tab' => 'style', - 'label' => esc_html__( 'Background color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => 'color', 'css' => array( array( 'property' => '--jfb-progress-default-page-bgc' ) ), ) @@ -2326,7 +2326,7 @@ public function controls_form_progress_pages_style() { 'jet_fb_progress_passed_page_bg_color', array( 'tab' => 'style', - 'label' => esc_html__( 'Background color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => 'color', 'css' => array( array( 'property' => '--jfb-progress-passed-page-bgc' ) ), ) @@ -2413,7 +2413,7 @@ public function controls_form_progress_pages_style() { 'jet_fb_progress_active_page_bg_color', array( 'tab' => 'style', - 'label' => esc_html__( 'Background color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => 'color', 'css' => array( array( 'property' => '--jfb-progress-active-page-bgc' ) ), ) @@ -2561,7 +2561,7 @@ public function controls_message_style() { 'message_success_bg_color', array( 'tab' => 'style', - 'label' => esc_html__( 'Background color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => 'color', 'css' => array( array( 'property' => '--jfb-message-success-bgc' ) ), ) @@ -2610,7 +2610,7 @@ public function controls_message_style() { 'message_error_bg_color', array( 'tab' => 'style', - 'label' => esc_html__( 'Background color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => 'color', 'css' => array( array( 'property' => '--jfb-message-error-bgc' ) ), ) diff --git a/compatibility/elementor/widgets/form.php b/compatibility/elementor/widgets/form.php index 14a897729..86fd055ca 100644 --- a/compatibility/elementor/widgets/form.php +++ b/compatibility/elementor/widgets/form.php @@ -341,7 +341,7 @@ public function after_section_checkradio_fields_style( $booking_form, $args ) { $booking_form->add_control( 'builder__checkbox_state--normal__bg_color', array( - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '__field-wrap .for-checkbox span::before' ) => 'background-color: {{VALUE}}', @@ -366,7 +366,7 @@ public function after_section_checkradio_fields_style( $booking_form, $args ) { $booking_form->add_control( 'builder__checkbox_state--checked__bg_color', array( - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '__field-wrap label.for-checkbox :checked + span::before' ) => 'background-color: {{VALUE}}', @@ -446,7 +446,7 @@ public function after_section_checkradio_fields_style( $booking_form, $args ) { $booking_form->add_control( 'builder__radio_state--normal__bg_color', array( - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '__field-wrap .for-radio span::before' ) => 'background-color: {{VALUE}}', @@ -470,7 +470,7 @@ public function after_section_checkradio_fields_style( $booking_form, $args ) { $booking_form->add_control( 'builder__radio_state--checked__bg_color', array( - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '__field-wrap label.for-radio :checked + span::before' ) => 'background-color: {{VALUE}}', @@ -653,7 +653,7 @@ public function run_form_progress_controls( $instance, $selector_callable, $add_ $instance->add_control( 'jet_fb_progress_wrapper_bg_color', array( - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $selector_callable( '-progress-pages' ) => 'background-color: {{VALUE}}', @@ -746,7 +746,7 @@ public function run_form_progress_controls( $instance, $selector_callable, $add_ $instance->add_control( 'jet_fb_progress_pages_tab--current_bg_color', array( - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $selector_callable( $scheme['active-item'] ) => 'background-color: {{VALUE}}', @@ -856,7 +856,7 @@ public function run_form_progress_controls( $instance, $selector_callable, $add_ $instance->add_control( 'jet_fb_progress_pages_tab--next_bg_color', array( - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $selector_callable( $scheme['next-item'] ) => 'background-color: {{VALUE}}', @@ -966,7 +966,7 @@ public function run_form_progress_controls( $instance, $selector_callable, $add_ $instance->add_control( 'jet_fb_progress_pages_tab--prev_bg_color', array( - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $selector_callable( $scheme['prev-item'] ) => 'background-color: {{VALUE}}', @@ -1349,7 +1349,7 @@ private function section_label_style() { $this->add_control( 'form_label_bg_color', array( - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '__label' ) => 'background-color: {{VALUE}};', @@ -1472,7 +1472,7 @@ private function section_description_style() { $this->add_control( 'form_description_bg_color', array( - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '__desc' ) => 'background-color: {{VALUE}};', @@ -1614,7 +1614,7 @@ private function section_checkradio_fields_style() { $this->add_control( 'checkradio_fields_background_color', array( - 'label' => __( 'Background color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '__field-wrap label' ) => 'background-color: {{VALUE}}', @@ -1645,10 +1645,10 @@ private function section_checkradio_fields_style() { $this->add_control( 'tab__checkradio_control_bg_color__normal', array( - 'label' => esc_html__( 'Background Color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( - $this->selector( '__field-wrap label > span::before' ) => 'background-color: {{VALUE}};', + $this->selector( '__field-wrap label.jet-form-builder__field-label > span::before' ) => 'background-color: {{VALUE}};', ), ) ); @@ -1671,7 +1671,7 @@ private function section_checkradio_fields_style() { $this->add_control( 'tab__checkradio_control_bg_color__hover', array( - 'label' => esc_html__( 'Background Color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '__field-wrap label :not(:disabled):not(:checked):hover + span::before' ) => 'background-color: {{VALUE}};', @@ -1697,7 +1697,7 @@ private function section_checkradio_fields_style() { $this->add_control( 'tab__checkradio_control_bg_color__focus', array( - 'label' => esc_html__( 'Background Color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '__field-wrap label :focus:not(:checked) + span::before' ) => 'background-color: {{VALUE}};', @@ -1723,7 +1723,7 @@ private function section_checkradio_fields_style() { $this->add_control( 'tab__checkradio_control_bg_color__checked', array( - 'label' => esc_html__( 'Background Color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '__field-wrap label :checked + span::before' ) => 'background-color: {{VALUE}};', @@ -1783,7 +1783,7 @@ private function section_form_input_fields() { $this->add_control( 'fields_background_color', array( - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( $simple_input ) => 'background-color: {{VALUE}};', @@ -1992,7 +1992,7 @@ private function section_calc_fields_style() { $this->add_control( 'calc_fields_background_color', array( - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '__calculated-field' ) => 'background-color: {{VALUE}}', @@ -2448,7 +2448,7 @@ private function section_repeater_style() { $this->add_control( 'booking_form_repeater_bg_color', array( - 'label' => esc_html__( 'Background Color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '-repeater__new' ) => 'background-color: {{VALUE}};', @@ -2479,7 +2479,7 @@ private function section_repeater_style() { $this->add_control( 'booking_form_repeater_bg_color_hover', array( - 'label' => esc_html__( 'Background Color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '-repeater__new:hover' ) => 'background-color: {{VALUE}};', @@ -2629,7 +2629,7 @@ private function section_repeater_style() { $this->add_control( 'booking_form_repeater_del_bg_color', array( - 'label' => esc_html__( 'Background Color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '-repeater__remove' ) => 'background-color: {{VALUE}}', @@ -2660,7 +2660,7 @@ private function section_repeater_style() { $this->add_control( 'booking_form_repeater_del_bg_color_hover', array( - 'label' => esc_html__( 'Background Color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '-repeater__remove:hover' ) => 'background-color: {{VALUE}}', @@ -2866,7 +2866,7 @@ private function conditional_style() { $this->add_control( 'conditional_bg_color', array( - 'label' => esc_html__( 'Background Color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '__conditional' ) => 'background-color: {{VALUE}}', @@ -2899,7 +2899,7 @@ private function form_submit_style() { $this->add_control( 'booking_form_submit_bg_color', array( - 'label' => esc_html__( 'Background Color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '__action-button' ) => 'background-color: {{VALUE}}', @@ -2930,7 +2930,7 @@ private function form_submit_style() { $this->add_control( 'booking_form_submit_bg_color_hover', array( - 'label' => esc_html__( 'Background Color', 'jet-form-builder' ), + 'label' => esc_html__( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '__action-button:hover' ) => 'background-color: {{VALUE}}', @@ -3301,7 +3301,7 @@ private function section_form_break_next_style() { $this->add_control( 'form_break_next_bg_color--normal', array( - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '__next-page' ) => 'background-color: {{VALUE}};', @@ -3345,7 +3345,7 @@ private function section_form_break_next_style() { $this->add_control( 'form_break_next_bg_color--hover', array( - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '__next-page:hover' ) => 'background-color: {{VALUE}};', @@ -3392,7 +3392,7 @@ private function section_form_break_next_style() { $this->add_control( 'form_break_next_bg_color--disabled', array( - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '__next-page:disabled' ) => 'background-color: {{VALUE}};', @@ -3501,7 +3501,7 @@ private function section_form_break_next_style() { $this->add_control( 'form_break_prev_bg_color--normal', array( - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '__prev-page' ) => 'background-color: {{VALUE}};', @@ -3545,7 +3545,7 @@ private function section_form_break_next_style() { $this->add_control( 'form_break_prev_bg_color--hover', array( - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '__prev-page:hover' ) => 'background-color: {{VALUE}};', @@ -3700,7 +3700,7 @@ private function section_message_error_style() { $this->add_control( 'form_success_bg_color', array( - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '-message--success' ) => 'background-color: {{VALUE}};', @@ -3796,7 +3796,7 @@ private function section_message_error_style() { $this->add_control( 'form_error_bg_color', array( - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( $this->selector( '-message--error' ) => 'background-color: {{VALUE}};', diff --git a/compatibility/jet-booking/assets/build/frontend.asset.php b/compatibility/jet-booking/assets/build/frontend.asset.php index f10897e56..b4032db35 100644 --- a/compatibility/jet-booking/assets/build/frontend.asset.php +++ b/compatibility/jet-booking/assets/build/frontend.asset.php @@ -1 +1 @@ - array(), 'version' => '6eb3a0ab639117abb803'); + array(), 'version' => '575a25df8a77e253481c'); diff --git a/compatibility/jet-booking/assets/build/frontend.js b/compatibility/jet-booking/assets/build/frontend.js index 6399dd2c0..04d3e39fc 100644 --- a/compatibility/jet-booking/assets/build/frontend.js +++ b/compatibility/jet-booking/assets/build/frontend.js @@ -1 +1 @@ -(()=>{"use strict";const t="YYYY-MM-DD";function e(){return window?.JetABAFInput?.field_format??t}function n(){return window?.JetABAFInput?.layout??"single"}function i(t){return window?.JetABAFData?.[t]}const{InputData:o}=JetFormBuilderAbstract,{isEmpty:r}=JetFormBuilderFunctions;function a(){o.call(this),this.sanitize((function(n){return r(n)||!Array.isArray(n)&&"string"!=typeof n?[]:Array.isArray(n)?n:(n=n.split(" - ")).length?n.map((n=>moment(n,e()).format(t))):[]})),this.isSupported=function(t){return"checkin-checkout"===t.dataset.field},this.addListeners=function(){this.reporting.makeInvalid=()=>{},this.reporting.makeValid=()=>{};const[t]=this.nodes;jQuery(t).on("change.JetFormBuilderMain",(()=>{this.value.current=this.value.isMaked?t.value:this.value.applySanitizers(t.value)}));const e=t.parentElement.querySelectorAll(".jet-abaf-field__input");for(const t of e)t.addEventListener("blur",(()=>this.reportOnBlur()))},this.setValue=function(){this.value.current=this.value.applySanitizers(this.nodes[0].value)},this.checkIsRequired=function(){const[t]=this.nodes;return!!t.required||!!t.parentElement.querySelector(".jet-abaf-field__input[required]")},this.setNode=function(t){if(o.prototype.setNode.call(this,t),this.inputType="checkin-checkout","single"===n())return;const e=t.closest(".jet-abaf-separate-fields");this.nodes.push(...e.querySelectorAll('.jet-abaf-field__input[type="text"]'),e)}}a.prototype=Object.create(o.prototype),a.prototype.parseValueForCalculated=function(){if(!this.getValue()?.length)return 0;if(window?.JetBooking?.calcBookedDates){const n=this.getValue().map((n=>moment(n,t).format(e())));return JetBooking.calcBookedDates(n.join(" - "))}if(i("one_day_bookings"))return 1;const n=this.value.current.map((t=>moment(t)));let o=n[1].diff(n[0],"days");return o=Number(o),i("per_nights")||o++,o};const u=a,{BaseSignal:s}=JetFormBuilderAbstract;function c(){s.call(this),this.isSupported=function(t,e){return e instanceof u},this.runSignal=function(t){"single"===n()?this.runSignalForSingle():this.runSignalForSeparate(t)},this.runSignalForSingle=function(){const[n]=this.input.nodes,{current:i}=this.input.value;i.length?n.value=i.map((n=>moment(n,t).format(e()))).join(" - "):n.value=""},this.runSignalForSeparate=function(n){const[,i,o]=this.input.nodes,{current:r}=this.input.value;if(r?.toString?.()!==n?.toString?.()){if(!r.length)return i.value="",o.value="",void this.updateCalendar();i.value=moment(r[0],t).format(e()),o.value=moment(r[1]??r[0],t).format(e()),this.updateCalendar()}},this.updateCalendar=function(){const{current:t}=this.input.value,[,,,n]=this.input.nodes;if(!t.length)return void jQuery(n).data("dateRangePicker").clear();const i=e();jQuery(n).data("dateRangePicker").setDateRange(moment(t[0]).format(i),moment(t[1]??t[0]).format(i),!0)}}c.prototype=Object.create(s.prototype);const l=c,{addAction:d,addFilter:f}=JetPlugins.hooks;d("jet.fb.observe.before","jet-form-builder/booking-compatibility",(function(t){const{rootNode:e}=t;for(const t of e.querySelectorAll(".field-type-check-in-out")){const e=t.querySelector('input[data-field="checkin-checkout"]');e&&(e.dataset.jfbSync=1)}})),f("jet.fb.inputs","jet-form-builder/booking-compatibility",(function(t){return[u,...t]})),f("jet.fb.signals","jet-form-builder/booking-compatibility",(function(t){return[l,...t]})),f("jet.fb.formula.node.exists","jet-form-builder/booking-compatibility",(function(t,e,n){const i=e.match(/ADVANCED_PRICE::([\w\-]+)/);return i&&i?.length&&(t=n.root.rootNode[i[1]]),t})),f("jet.fb.onCalculate.part","jet-form-builder/booking-compatibility",(function(t,e){if("string"!=typeof t)return t;const n=t.match(/ADVANCED_PRICE::([\w\-]+)/);if(!n?.length||!e?.input)return t;const[,i]=n,o=e.input.root.getInput(i);return o?(e.cachedFields=e.cachedFields||[],e.cachedFields.includes(o.name)||(e.cachedFields.push(o.name),o.watch((()=>e.setResult()))),t):0})),f("jet.fb.calculated.callback","jet-form-builder/booking-field-parser",(function(t,e,n){return!1!==t||"checkin-checkout"!==e.inputType?t:e.parseValueForCalculated()}))})(); \ No newline at end of file +(()=>{"use strict";const t="YYYY-MM-DD";function e(){return window?.JetABAFInput?.field_format??t}function n(){return window?.JetABAFInput?.layout??"single"}function i(t){return window?.JetABAFData?.[t]}const{InputData:r}=JetFormBuilderAbstract,{isEmpty:o}=JetFormBuilderFunctions;function a(){r.call(this),this.sanitize(function(n){return o(n)||!Array.isArray(n)&&"string"!=typeof n?[]:Array.isArray(n)?n:(n=n.split(" - ")).length?n.map(n=>moment(n,e()).format(t)):[]}),this.isSupported=function(t){return"checkin-checkout"===t.dataset.field},this.addListeners=function(){this.reporting.makeInvalid=()=>{},this.reporting.makeValid=()=>{};const[t]=this.nodes;jQuery(t).on("change.JetFormBuilderMain",()=>{this.value.current=this.value.isMaked?t.value:this.value.applySanitizers(t.value)});const e=t.parentElement.querySelectorAll(".jet-abaf-field__input");for(const t of e)t.addEventListener("blur",()=>this.reportOnBlur())},this.setValue=function(){this.value.current=this.value.applySanitizers(this.nodes[0].value)},this.checkIsRequired=function(){const[t]=this.nodes;return!!t.required||!!t.parentElement.querySelector(".jet-abaf-field__input[required]")},this.setNode=function(t){if(r.prototype.setNode.call(this,t),this.inputType="checkin-checkout","single"===n())return;const e=t.closest(".jet-abaf-separate-fields");this.nodes.push(...e.querySelectorAll('.jet-abaf-field__input[type="text"]'),e)}}a.prototype=Object.create(r.prototype),a.prototype.parseValueForCalculated=function(){if(!this.getValue()?.length)return 0;if(window?.JetBooking?.calcBookedDates){const n=this.getValue().map(n=>moment(n,t).format(e()));return JetBooking.calcBookedDates(n.join(" - "))}if(i("one_day_bookings"))return 1;const n=this.value.current.map(t=>moment(t));let r=n[1].diff(n[0],"days");return r=Number(r),i("per_nights")||r++,r};const u=a,{BaseSignal:s}=JetFormBuilderAbstract;function c(){s.call(this),this.isSupported=function(t,e){return e instanceof u},this.runSignal=function(t){"single"===n()?this.runSignalForSingle():this.runSignalForSeparate(t)},this.runSignalForSingle=function(){const[n]=this.input.nodes,{current:i}=this.input.value;i.length?n.value=i.map(n=>moment(n,t).format(e())).join(" - "):n.value=""},this.runSignalForSeparate=function(n){const[,i,r]=this.input.nodes,{current:o}=this.input.value;if(o?.toString?.()!==n?.toString?.()){if(!o.length)return i.value="",r.value="",void this.updateCalendar();i.value=moment(o[0],t).format(e()),r.value=moment(o[1]??o[0],t).format(e()),this.updateCalendar()}},this.updateCalendar=function(){const{current:t}=this.input.value,[,,,n]=this.input.nodes;if(!t.length)return void jQuery(n).data("dateRangePicker").clear();const i=e();jQuery(n).data("dateRangePicker").setDateRange(moment(t[0]).format(i),moment(t[1]??t[0]).format(i),!0)}}c.prototype=Object.create(s.prototype);const l=c,{addAction:d,addFilter:f}=JetPlugins.hooks;d("jet.fb.observe.before","jet-form-builder/booking-compatibility",function(t){const{rootNode:e}=t;for(const t of e.querySelectorAll(".field-type-check-in-out")){const e=t.querySelector('input[data-field="checkin-checkout"]');e&&(e.dataset.jfbSync=1)}}),f("jet.fb.inputs","jet-form-builder/booking-compatibility",function(t){return[u,...t]}),f("jet.fb.signals","jet-form-builder/booking-compatibility",function(t){return[l,...t]}),f("jet.fb.formula.node.exists","jet-form-builder/booking-compatibility",function(t,e,n){const i=e.match(/ADVANCED_PRICE::([\w\-]+)/);return i&&i?.length&&(t=n.root.rootNode[i[1]]),t}),f("jet.fb.onCalculate.part","jet-form-builder/booking-compatibility",function(t,e){if("string"!=typeof t)return t;if(!e?.input)return t;const n=t.match(/(ADVANCED_PRICE|BOOKING_TIME)::([\w\-]+)/);if(!n?.length)return t;const[,i,r]=n;if("ADVANCED_PRICE"===i){const t=e.input.root.getInput(r);if(!t)return 0;e.cachedFields=e.cachedFields||[],e.cachedFields.includes(t.name)||(e.cachedFields.push(t.name),t.watch(()=>e.setResult()))}else{const t=document.getElementById(r);if(!t)return 0;t.addEventListener("change",()=>{e.setResult()})}return t}),f("jet.fb.calculated.callback","jet-form-builder/booking-field-parser",function(t,e,n){return!1!==t||"checkin-checkout"!==e.inputType?t:e.parseValueForCalculated()})})(); \ No newline at end of file diff --git a/compatibility/jet-booking/assets/src/frontend/jet-booking.js b/compatibility/jet-booking/assets/src/frontend/jet-booking.js index 18932e767..0e4ef8126 100644 --- a/compatibility/jet-booking/assets/src/frontend/jet-booking.js +++ b/compatibility/jet-booking/assets/src/frontend/jet-booking.js @@ -1,10 +1,7 @@ import CheckOutInput from './CheckOutInput'; import CheckOutSignal from './CheckOutSignal'; -const { - addAction, - addFilter, - } = JetPlugins.hooks; +const { addAction, addFilter } = JetPlugins.hooks; addAction( 'jet.fb.observe.before', @@ -79,30 +76,45 @@ addFilter( * @return {*} */ function ( macroPart, formula ) { - if ( 'string' !== typeof macroPart ) { return macroPart; } - const matches = macroPart.match( /ADVANCED_PRICE::([\w\-]+)/ ); - - if ( !matches?.length || !formula?.input ) { + if ( ! formula?.input ) { return macroPart; } - const [ , fieldName ] = matches; - const checkoutField = formula.input.root.getInput( fieldName ); + const matches = macroPart.match( /(ADVANCED_PRICE|BOOKING_TIME)::([\w\-]+)/ ); - if ( !checkoutField ) { - return 0; + if ( ! matches?.length ) { + return macroPart; } + const [ , macros, fieldName ] = matches; + + if ( 'ADVANCED_PRICE' === macros ) { + const checkoutField = formula.input.root.getInput( fieldName ); + + if ( ! checkoutField ) { + return 0; + } + + formula.cachedFields = formula.cachedFields || []; - formula.cachedFields = formula.cachedFields || []; + if ( ! formula.cachedFields.includes( checkoutField.name ) ) { + formula.cachedFields.push( checkoutField.name ); - if ( !formula.cachedFields.includes( checkoutField.name ) ) { - formula.cachedFields.push( checkoutField.name ); + checkoutField.watch( () => formula.setResult() ); + } + } else { + const timeField = document.getElementById( fieldName ); + + if ( ! timeField ) { + return 0; + } - checkoutField.watch( () => formula.setResult() ); + timeField.addEventListener( 'change', () => { + formula.setResult() + } ); } return macroPart; diff --git a/compatibility/jet-style-manager/blocks/form-break.php b/compatibility/jet-style-manager/blocks/form-break.php index e36d71092..c8278e93c 100644 --- a/compatibility/jet-style-manager/blocks/form-break.php +++ b/compatibility/jet-style-manager/blocks/form-break.php @@ -199,7 +199,7 @@ public function process_controls() { array( 'id' => 'next_button_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'next-button' ) => 'background-color: {{VALUE}}', ), @@ -232,7 +232,7 @@ public function process_controls() { array( 'id' => 'next_button_hover_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'next-button' ) . ':hover:not(:disabled)' => 'background-color: {{VALUE}}', ), @@ -321,7 +321,7 @@ public function process_controls() { array( 'id' => 'prev_button_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'prev-button' ) => 'background-color: {{VALUE}}', ), @@ -354,7 +354,7 @@ public function process_controls() { array( 'id' => 'prev_button_hover_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'prev-button' ) . ':hover:not(:disabled)' => 'background-color: {{VALUE}}', ), @@ -471,7 +471,7 @@ public function process_controls() { array( 'id' => 'form_progress_pages_wrapper--bg_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( '-progress-pages' ) => 'background-color: {{VALUE}}', ), @@ -876,7 +876,7 @@ public function process_controls() { array( 'id' => 'form_progress_pages_current_circle--bg_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'active-circle' ) => 'background-color: {{VALUE}};', ), @@ -934,7 +934,7 @@ public function process_controls() { array( 'id' => 'form_progress_pages_next_circle--bg_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'next-circle' ) => 'background-color: {{VALUE}};', ), @@ -992,7 +992,7 @@ public function process_controls() { array( 'id' => 'form_progress_pages_prev_circle--bg_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'prev-circle' ) => 'background-color: {{VALUE}};', ), diff --git a/compatibility/jet-style-manager/blocks/form.php b/compatibility/jet-style-manager/blocks/form.php index 13156690c..6dff2edae 100644 --- a/compatibility/jet-style-manager/blocks/form.php +++ b/compatibility/jet-style-manager/blocks/form.php @@ -211,7 +211,7 @@ private function process_field_label() { array( 'id' => 'label_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( '__label' ) => 'background-color: {{VALUE}}', ), @@ -265,7 +265,7 @@ private function process_field_required_mark() { array( 'id' => 'required_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'required' ) => 'background-color: {{VALUE}}', ), @@ -368,7 +368,7 @@ private function process_field_description() { array( 'id' => 'description_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( '__desc' ) => 'background-color: {{VALUE}}', ), @@ -445,7 +445,7 @@ private function process_text_field() { array( 'id' => 'input_normal_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'attributes' => array( 'default' => array( 'value' => '#FFFFFF', @@ -550,7 +550,7 @@ private function process_textarea_field() { array( 'id' => 'textarea_normal_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'field' ) => 'background-color: {{VALUE}}', ), @@ -590,7 +590,7 @@ private function process_select_field() { 'css_selector' => array( $this->selector( '-row.field-type-select-field %1$s__field-wrap' - ) => 'max-width: {{VALUE}}%', + ) => 'max-width: {{VALUE}}{{UNIT}};', ), ) ); @@ -647,7 +647,7 @@ private function process_select_field() { array( 'id' => 'item_normal_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'select' ) => 'background-color: {{VALUE}}', ), @@ -774,7 +774,7 @@ private function process_checkradio_field() { array( 'id' => 'checkradio_fields_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'front-label' ) => 'background-color: {{VALUE}}', ), @@ -812,7 +812,7 @@ private function process_checkradio_field() { array( 'id' => 'checkradio_control_bg_color__normal', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'front-label' ) . ' > span::before' => 'background-color: {{VALUE}};', ), @@ -844,7 +844,7 @@ private function process_checkradio_field() { array( 'id' => 'checkradio_control_bg_color__checked', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'front-label' ) . ' :checked + span::before' => 'background-color: {{VALUE}};', ), @@ -1142,7 +1142,7 @@ private function process_calculated_field() { array( 'id' => 'calc_fields_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( '__calculated-field' ) => 'background-color: {{VALUE}}', ), @@ -1508,7 +1508,7 @@ private function process_repeater_field() { array( 'id' => 'repeater_new_button_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'new-button' ) => 'background-color: {{VALUE}}', ), @@ -1541,7 +1541,7 @@ private function process_repeater_field() { array( 'id' => 'repeater_new_button_hover_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'new-button' ) . ':hover:not(:disabled)' => 'background-color: {{VALUE}}', ), @@ -1628,7 +1628,7 @@ private function process_repeater_field() { array( 'id' => 'repeater_remove_button_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'remove-button' ) => 'background-color: {{VALUE}}', ), @@ -1661,7 +1661,7 @@ private function process_repeater_field() { array( 'id' => 'repeater_remove_button_hover_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'remove-button' ) . ':hover:not(:disabled)' => 'background-color: {{VALUE}}', ), @@ -1717,7 +1717,7 @@ private function process_conditional_block() { array( 'id' => 'conditional_bg_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( '__conditional' ) => 'background-color: {{VALUE}}', ), @@ -1832,7 +1832,7 @@ private function process_action_button() { array( 'id' => 'action_button_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector() => 'background-color: {{VALUE}}', ), @@ -1865,7 +1865,7 @@ private function process_action_button() { array( 'id' => 'action_button_hover_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector() . ':hover:not(:disabled)' => 'background-color: {{VALUE}}', ), @@ -1974,7 +1974,7 @@ private function process_message_success() { array( 'id' => 'success_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'separator' => 'after', 'attributes' => array( 'default' => array( @@ -2098,7 +2098,7 @@ private function process_message_error() { array( 'id' => 'error_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'separator' => 'after', 'attributes' => array( 'default' => array( diff --git a/includes/blocks/blocks-repository-base.php b/includes/blocks/blocks-repository-base.php index 8393cda92..6433660a1 100644 --- a/includes/blocks/blocks-repository-base.php +++ b/includes/blocks/blocks-repository-base.php @@ -23,6 +23,8 @@ abstract class Blocks_Repository_Base { public function rep_before_install_item( $block_type ) { /** @var Types\Base $block_type */ + do_action( 'jet-form-builder/block-type/before-intall', $block_type ); + // throw exception & exclude from repository if block is not supported if ( ! $block_type->is_supported() ) { $this->_rep_abort_this(); diff --git a/includes/blocks/modules/general-style.php b/includes/blocks/modules/general-style.php index e870c9b4d..f24f298fb 100644 --- a/includes/blocks/modules/general-style.php +++ b/includes/blocks/modules/general-style.php @@ -53,23 +53,23 @@ public function general_style_unregister() { } public function get_label_selector() { - return '__label.%1$s__label.%1$s__label'; + return '__label'; } public function get_required_selector() { - return '__label span.%1$s__required.%1$s__required.%1$s__required'; + return '__label span.%1$s__required'; } public function get_description_selector() { - return '__desc.%1$s__desc.%1$s__desc'; + return '__desc'; } public function get_field_wrap() { - return '-row.%1$s-row.%1$s-row.%1$s-row'; + return '.%1$s-row'; } public function get_field_input() { - return '-row.%1$s-row.%1$s-row input'; + return '.%1$s-row input'; } @@ -188,7 +188,7 @@ private function add_content_controls() { ); $this->add_margin_padding( - $this->selector( 'wrap' ), + $this->selector_no_space( $this->get_field_wrap() ), array( 'margin' => array( 'id' => 'field_margin', @@ -223,7 +223,7 @@ private function add_content_controls() { ), ), 'css_selector' => array( - $this->selector( 'wrap' ) => 'text-align: {{VALUE}};', + $this->selector_no_space( $this->get_field_wrap() ) => 'text-align: {{VALUE}};', ), ) ); @@ -235,7 +235,7 @@ private function add_content_controls() { 'label' => __( 'Border', 'jet-form-builder' ), 'separator' => 'after', 'css_selector' => array( - $this->selector( 'wrap' ) => 'border-style:{{STYLE}};border-width:{{WIDTH}};border-radius:{{RADIUS}};border-color:{{COLOR}};', + $this->selector_no_space( $this->get_field_wrap() ) => 'border-style:{{STYLE}};border-width:{{WIDTH}};border-radius:{{RADIUS}};border-color:{{COLOR}};', ), ) ); @@ -244,9 +244,9 @@ private function add_content_controls() { array( 'id' => 'field_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( - $this->selector( 'wrap' ) => 'background-color: {{VALUE}}', + $this->selector_no_space( $this->get_field_wrap() ) => 'background-color: {{VALUE}}', ), ) ); @@ -342,7 +342,7 @@ private function add_label_controls() { array( 'id' => 'label_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'label' ) => 'background-color: {{VALUE}}', ), @@ -440,7 +440,7 @@ private function add_description_controls() { array( 'id' => 'description_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'description' ) => 'background-color: {{VALUE}}', ), @@ -493,7 +493,7 @@ private function add_required_mark_controls() { array( 'id' => 'required_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'required' ) => 'background-color: {{VALUE}}', ), @@ -513,7 +513,7 @@ private function add_input_controls() { ); $this->add_margin_padding( - $this->selector( 'input' ), + $this->selector_no_space( $this->get_field_input() ), array( 'margin' => array( 'id' => 'input_margin', @@ -548,7 +548,7 @@ private function add_input_controls() { ), ), 'css_selector' => array( - $this->selector( 'input' ) => 'text-align: {{VALUE}};', + $this->selector_no_space( $this->get_field_input() ) => 'text-align: {{VALUE}};', ), ), $this->get_additional_styles( 'input_alignment' ) @@ -561,7 +561,7 @@ private function add_input_controls() { 'type' => 'typography', 'separator' => 'after', 'css_selector' => array( - $this->selector( 'input' ) => 'font-family: {{FAMILY}}; font-weight: {{WEIGHT}}; text-transform: {{TRANSFORM}}; font-style: {{STYLE}}; text-decoration: {{DECORATION}}; line-height: {{LINEHEIGHT}}{{LH_UNIT}}; letter-spacing: {{LETTERSPACING}}{{LS_UNIT}}; font-size: {{SIZE}}{{S_UNIT}};', + $this->selector_no_space( $this->get_field_input() ) => 'font-family: {{FAMILY}}; font-weight: {{WEIGHT}}; text-transform: {{TRANSFORM}}; font-style: {{STYLE}}; text-decoration: {{DECORATION}}; line-height: {{LINEHEIGHT}}{{LH_UNIT}}; letter-spacing: {{LETTERSPACING}}{{LS_UNIT}}; font-size: {{SIZE}}{{S_UNIT}};', ), ) ); @@ -573,7 +573,7 @@ private function add_input_controls() { 'label' => __( 'Border', 'jet-form-builder' ), 'separator' => 'after', 'css_selector' => array( - $this->selector( 'input' ) => 'border-style:{{STYLE}};border-width:{{WIDTH}};border-radius:{{RADIUS}};border-color:{{COLOR}};', + $this->selector_no_space( $this->get_field_input() ) => 'border-style:{{STYLE}};border-width:{{WIDTH}};border-radius:{{RADIUS}};border-color:{{COLOR}};', ), ) ); @@ -585,7 +585,7 @@ private function add_input_controls() { 'separator' => 'after', 'label' => __( 'Text Color', 'jet-form-builder' ), 'css_selector' => array( - $this->selector( 'input' ) => 'color: {{VALUE}}', + $this->selector_no_space( $this->get_field_input() ) => 'color: {{VALUE}}', ), ) ); @@ -594,9 +594,9 @@ private function add_input_controls() { array( 'id' => 'input_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( - $this->selector( 'input' ) => 'background-color: {{VALUE}}', + $this->selector_no_space( $this->get_field_input() ) => 'background-color: {{VALUE}}', ), ) ); diff --git a/includes/blocks/types/action-button.php b/includes/blocks/types/action-button.php index 96e0eed73..8d4061c54 100644 --- a/includes/blocks/types/action-button.php +++ b/includes/blocks/types/action-button.php @@ -102,12 +102,7 @@ public function jsm_controls() { ), ), 'css_selector' => array( - $this->selector( '__action-button' ) => 'width: {{VALUE}}%; max-width: {{VALUE}}%', - ), - 'attributes' => array( - 'default' => array( - 'value' => 20, - ), + $this->selector( '__action-button' ) => 'width: {{VALUE}}{{UNIT}}; max-width: {{VALUE}}{{UNIT}};', ), ) ); @@ -228,7 +223,7 @@ public function jsm_controls() { array( 'id' => 'submit_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( '__action-button' ) => 'background-color: {{VALUE}}', ), @@ -261,7 +256,7 @@ public function jsm_controls() { array( 'id' => 'submit_hover_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( '__action-button' ) . ':hover:not(:disabled)' => 'background-color: {{VALUE}}', ), diff --git a/includes/blocks/types/base.php b/includes/blocks/types/base.php index 4000b2e1c..a13a95b03 100644 --- a/includes/blocks/types/base.php +++ b/includes/blocks/types/base.php @@ -102,7 +102,6 @@ public function get_extra_fields( Base_Source $source ): array { * @see \Jet_Form_Builder\Blocks\Blocks_Repository_Base::rep_before_install_item */ public function register_block_type() { - $this->maybe_init_style_manager(); $this->register_block(); } @@ -170,7 +169,7 @@ protected function register_block() { // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped static::class . '::' . __FUNCTION__, esc_html__( - 'Unsuccessful field (block) registration. + 'Unsuccessful field (block) registration. Perhaps the path to the block scheme (block.json) is incorrectly specified', 'jet-form-builder' ), @@ -199,16 +198,23 @@ public function get_provides_context(): array { return $this->provides_context; } - private function maybe_init_style_manager() { - if ( ! Compatibility::has_jet_sm() || ! $this->use_style_manager ) { - return; - } + /** + * Initialize style manager for the block + * + * @param Object $style_manager Actual style manager instance. + */ + public function maybe_init_style_manager( $style_manager ) { + $style_manager->register_block_support( + $this->block_name() + ); + + $proxy = $style_manager->get_proxy( $this->block_name() ); + + $this->controls_manager = $proxy; $this->css_scheme = array_merge( $this->general_css_scheme(), $this->get_css_scheme() ); - $this->controls_manager = new Controls_Manager( $this->block_name() ); $this->run_jsm_controls(); - $this->general_style_manager_options(); } diff --git a/includes/blocks/types/calculated-field.php b/includes/blocks/types/calculated-field.php index f68d3da6b..49448b416 100644 --- a/includes/blocks/types/calculated-field.php +++ b/includes/blocks/types/calculated-field.php @@ -53,28 +53,28 @@ public function general_style_unregister() { } public function get_field_input() { - return '-row .%1$s__calculated-field, {{WRAPPER}} .%1$s-row .%1$s__calculated-field--child'; + return '-row .%1$s__calculated-field, {{WRAPPER}} .%1$s-row .%1$s__calculated-field--child, {{WRAPPER}} .jet-form-builder__calculated-field-val'; } public function additional_selectors_for_controls() { return array( 'input_alignment' => array( - 'options' => array( + 'options' => array( 'flex-start' => array( 'shortcut' => __( 'Left', 'jet-form-builder' ), - 'icon' => 'dashicons-editor-alignleft', + 'icon' => 'dashicons-editor-alignleft', ), - 'center' => array( + 'center' => array( 'shortcut' => __( 'Center', 'jet-form-builder' ), - 'icon' => 'dashicons-editor-aligncenter', + 'icon' => 'dashicons-editor-aligncenter', ), - 'flex-end' => array( + 'flex-end' => array( 'shortcut' => __( 'Right', 'jet-form-builder' ), - 'icon' => 'dashicons-editor-alignright', + 'icon' => 'dashicons-editor-alignright', ), ), 'css_selector' => array( - $this->selector( 'input' ) => 'justify-content: {{VALUE}};', + $this->selector( 'input' ) => 'justify-content: {{VALUE}}; display: flex; width: 100%;', ), ), diff --git a/includes/blocks/types/conditional-block.php b/includes/blocks/types/conditional-block.php index 4006f3019..120bcef77 100644 --- a/includes/blocks/types/conditional-block.php +++ b/includes/blocks/types/conditional-block.php @@ -92,7 +92,7 @@ protected function jsm_controls() { array( 'id' => 'style_bg_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( '__conditional' ) => 'background-color: {{VALUE}}', ), diff --git a/includes/blocks/types/form-break-field.php b/includes/blocks/types/form-break-field.php index 4524cb84a..996605a3d 100644 --- a/includes/blocks/types/form-break-field.php +++ b/includes/blocks/types/form-break-field.php @@ -46,6 +46,16 @@ public function register_scripts() { ); } + /** + * Initialize style manager for the block + * + * @param Object $style_manager Actual style manager instance. + */ + public function maybe_init_style_manager( $style_manager ) { + // Form Break Field does not use style manager + return; + } + /** * @param array $attrs * @param null $content diff --git a/includes/blocks/types/hidden-field.php b/includes/blocks/types/hidden-field.php index e7e35ebfe..73abcb6c3 100644 --- a/includes/blocks/types/hidden-field.php +++ b/includes/blocks/types/hidden-field.php @@ -33,6 +33,16 @@ public function get_name() { return 'hidden-field'; } + /** + * Initialize style manager for the block + * + * @param Object $style_manager Actual style manager instance. + */ + public function maybe_init_style_manager( $style_manager ) { + // Hidden Field does not use style manager + return; + } + public function render_row_layout() { return false; } diff --git a/includes/blocks/types/number-field.php b/includes/blocks/types/number-field.php index 51f037373..c24826c43 100644 --- a/includes/blocks/types/number-field.php +++ b/includes/blocks/types/number-field.php @@ -78,15 +78,6 @@ public function jsm_controls() { 'css_selector' => array( '{{WRAPPER}} ' . $this->css_scheme['front-field'] => 'border-style:{{STYLE}};border-width:{{WIDTH}};border-radius:{{RADIUS}};border-color:{{COLOR}};', '{{WRAPPER}} ' . $this->css_scheme['field'] => 'border-style:{{STYLE}};border-width:{{WIDTH}};border-radius:{{RADIUS}};border-color:{{COLOR}};', - '{{WRAPPER}} ' . $this->css_scheme['backdrop'] => 'border: unset;', - '{{WRAPPER}} ' . $this->css_scheme['container_backdrop'] => 'border-radius:{{RADIUS}};', - ), - 'attributes' => array( - 'default' => array( - 'value' => array( - 'borderStyle' => 'solid', - ), - ), ), ) ); @@ -109,7 +100,7 @@ public function jsm_controls() { array( 'id' => 'item_normal_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( '{{WRAPPER}} ' . $this->css_scheme['field'] => 'background-color: {{VALUE}}', '{{WRAPPER}} ' . $this->css_scheme['front-field'] => 'background-color: {{VALUE}}', diff --git a/includes/blocks/types/progress-bar.php b/includes/blocks/types/progress-bar.php index c8d65ef06..690e8407a 100644 --- a/includes/blocks/types/progress-bar.php +++ b/includes/blocks/types/progress-bar.php @@ -16,10 +16,6 @@ */ class Progress_Bar extends Base { - public function general_style_unregister() { - return array( 'input', 'label', 'description', 'required' ); - } - /** * Returns block name * @@ -37,6 +33,16 @@ public function render_row_layout() { return false; } + /** + * Initialize style manager for the block + * + * @param Object $style_manager Actual style manager instance. + */ + public function maybe_init_style_manager( $style_manager ) { + // At the moment Progress Bar does not use style manager + return; + } + public function after_set_pages( Form_Break $form_break ) { $context_last_name = 'jet-forms/conditional-block--last_page_name'; $last_name = $this->block_context[ $context_last_name ] ?? ''; diff --git a/includes/blocks/types/textarea-field.php b/includes/blocks/types/textarea-field.php index ba7aae284..d2475945d 100644 --- a/includes/blocks/types/textarea-field.php +++ b/includes/blocks/types/textarea-field.php @@ -58,7 +58,7 @@ public function jsm_controls() { ), ), 'css_selector' => array( - $this->selector( 'field' ) => 'height: {{VALUE}}px; min-height: {{VALUE}}px;', + $this->selector( 'field' ) => 'height: {{VALUE}}{{UNIT}}; min-height: {{VALUE}}{{UNIT}};', ), 'attributes' => array( 'default' => array( @@ -118,7 +118,7 @@ public function jsm_controls() { array( 'id' => 'item_normal_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( $this->selector( 'field' ) => 'background-color: {{VALUE}}', ), diff --git a/jet-form-builder.php b/jet-form-builder.php index b4a81adeb..040b1a723 100644 --- a/jet-form-builder.php +++ b/jet-form-builder.php @@ -3,7 +3,7 @@ * Plugin Name: JetFormBuilder * Plugin URI: https://jetformbuilder.com/ * Description: Advanced form builder plugin for WordPress block editor. Create forms from the ground up, customize the existing ones, and style them up – all in one editor. - * Version: 3.5.6 + * Version: 3.5.6.1 * Author: Crocoblock * Author URI: https://crocoblock.com/ * Text Domain: jet-form-builder @@ -18,7 +18,7 @@ die(); } -const JET_FORM_BUILDER_VERSION = '3.5.6'; +const JET_FORM_BUILDER_VERSION = '3.5.6.1'; const JET_FORM_BUILDER__FILE__ = __FILE__; const JET_FORM_BUILDER_SITE = 'https://jetformbuilder.com'; diff --git a/modules/advanced-choices/block-types/choice.php b/modules/advanced-choices/block-types/choice.php index 5bada05c6..4c87920df 100644 --- a/modules/advanced-choices/block-types/choice.php +++ b/modules/advanced-choices/block-types/choice.php @@ -28,6 +28,10 @@ public function render_row_layout() { return false; } + public function general_style_unregister() { + return array( 'description', 'required' ); + } + /** * @param null|array $wp_block * diff --git a/modules/blocks-v2/repeater-field/block-type.php b/modules/blocks-v2/repeater-field/block-type.php index e2365d031..ed00ca614 100644 --- a/modules/blocks-v2/repeater-field/block-type.php +++ b/modules/blocks-v2/repeater-field/block-type.php @@ -180,7 +180,7 @@ public function jsm_controls() { array( 'id' => 'new_button_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( '{{WRAPPER}} ' . $this->css_scheme['new-button'] => 'background-color: {{VALUE}}', ), @@ -213,7 +213,7 @@ public function jsm_controls() { array( 'id' => 'new_button_hover_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( '{{WRAPPER}} ' . $this->css_scheme['new-button'] . ':hover:not(:disabled)' => 'background-color: {{VALUE}}', ), @@ -300,7 +300,7 @@ public function jsm_controls() { array( 'id' => 'remove_button_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( '{{WRAPPER}} ' . $this->css_scheme['remove-button'] => 'background-color: {{VALUE}}', ), @@ -333,7 +333,7 @@ public function jsm_controls() { array( 'id' => 'remove_button_hover_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( '{{WRAPPER}} ' . $this->css_scheme['remove-button'] . ':hover:not(:disabled)' => 'background-color: {{VALUE}}', ), diff --git a/modules/blocks-v2/text-field/block-type.php b/modules/blocks-v2/text-field/block-type.php index 39f51142e..65064ff13 100644 --- a/modules/blocks-v2/text-field/block-type.php +++ b/modules/blocks-v2/text-field/block-type.php @@ -108,7 +108,7 @@ public function jsm_controls() { array( 'id' => 'item_normal_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'attributes' => array( 'default' => array( 'value' => '#FFFFFF', diff --git a/modules/captcha/assets/build/friendly.captcha/frontend.asset.php b/modules/captcha/assets/build/friendly.captcha/frontend.asset.php index 3dee1356b..5b863ea05 100644 --- a/modules/captcha/assets/build/friendly.captcha/frontend.asset.php +++ b/modules/captcha/assets/build/friendly.captcha/frontend.asset.php @@ -1 +1 @@ - array(), 'version' => 'a7c8be9c428837ed2535'); + array(), 'version' => '8e50e07438c640962da8'); diff --git a/modules/captcha/assets/build/friendly.captcha/frontend.js b/modules/captcha/assets/build/friendly.captcha/frontend.js index 6d19a8aa8..5836debde 100644 --- a/modules/captcha/assets/build/friendly.captcha/frontend.js +++ b/modules/captcha/assets/build/friendly.captcha/frontend.js @@ -1 +1 @@ -(()=>{"use strict";const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e="=".charCodeAt(0),r=new Uint8Array(256);for(let e=0;e<64;e++)r[t.charCodeAt(e)]=e;function i(e){const r=e.length;let i="";for(let o=0;o>>2),s+=t.charAt((3&r)<<4|n>>>4),s+=t.charAt((15&n)<<2|a>>>6),s+=t.charAt(63&a),i+=s}return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i}const o='',n='';function a(t,e,r,i,o,n,a,s=!1,A,l){return`
\n\n
\n ${o}\n ${a?``:""}\n ${s?'0%':""}\n
\n
FriendlyCaptcha ⇗\n${"-"===t?"":``}`}function s(t,e,r,i=!0,o=!1){return a(t,e.rtl,n,!0,`${e.text_error}
${r}`,o?".HEADLESS_ERROR":".ERROR",i?e.button_retry:void 0)}let A,l;async function c(t,e,r){let i=1e3;return fetch(t,e).catch((async o=>{if(0===r)throw o;return await new Promise((t=>setTimeout(t,i))),i*=4,c(t,e,r-1)}))}"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&(A=navigator,l=A.userAgent.toLowerCase());const g={text_init:" Aktiverer...",text_ready:"Jeg er ikke en robot",button_start:"Klikk for å starte verifiseringen",text_fetching:"Henter data",text_solving:"Sjekker at du er et menneske...",text_completed:"Jeg er et menneske",text_completed_sr:"Automatisk spam-sjekk fullført",text_expired:"Verifisering kunne ikke fullføres",button_restart:"Omstart",text_error:"Bekreftelsen mislyktes",button_retry:"Prøv på nytt",text_fetch_error:"Tilkoblingen mislyktes"},u={en:{text_init:"Initializing...",text_ready:"Anti-Robot Verification",button_start:"Click to start verification",text_fetching:"Fetching Challenge",text_solving:"Verifying you are human...",text_completed:"I am human",text_completed_sr:"Automatic spam check completed",text_expired:"Anti-Robot verification expired",button_restart:"Restart",text_error:"Verification failed",button_retry:"Retry",text_fetch_error:"Failed to connect to"},de:{text_init:"Initialisierung...",text_ready:"Anti-Roboter-Verifizierung",button_start:"Hier klicken",text_fetching:"Herausforderung laden...",text_solving:"Verifizierung, dass Sie ein Mensch sind...",text_completed:"Ich bin ein Mensch",text_completed_sr:"Automatische Spamprüfung abgeschlossen",text_expired:"Verifizierung abgelaufen",button_restart:"Erneut starten",text_error:"Verifizierung fehlgeschlagen",button_retry:"Erneut versuchen",text_fetch_error:"Verbindungsproblem mit"},nl:{text_init:"Initializeren...",text_ready:"Anti-robotverificatie",button_start:"Klik om te starten",text_fetching:"Aan het laden...",text_solving:"Anti-robotverificatie bezig...",text_completed:"Ik ben een mens",text_completed_sr:"Automatische anti-spamcheck voltooid",text_expired:"Verificatie verlopen",button_restart:"Opnieuw starten",text_error:"Verificatie mislukt",button_retry:"Opnieuw proberen",text_fetch_error:"Verbinding mislukt met"},fr:{text_init:"Chargement...",text_ready:"Vérification Anti-Robot",button_start:"Clique ici pour vérifier",text_fetching:"Chargement du défi",text_solving:"Nous vérifions que vous n'êtes pas un robot...",text_completed:"Je ne suis pas un robot",text_completed_sr:"Vérification automatique des spams terminée",text_expired:"Vérification anti-robot expirée",button_restart:"Redémarrer",text_error:"Échec de la vérification",button_retry:"Recommencer",text_fetch_error:"Problème de connexion avec"},it:{text_init:"Inizializzazione...",text_ready:"Verifica Anti-Robot",button_start:"Clicca per iniziare",text_fetching:"Caricamento...",text_solving:"Verificando che sei umano...",text_completed:"Non sono un robot",text_completed_sr:"Controllo automatico dello spam completato",text_expired:"Verifica Anti-Robot scaduta",button_restart:"Ricomincia",text_error:"Verifica fallita",button_retry:"Riprova",text_fetch_error:"Problema di connessione con"},pt:{text_init:"Inicializando...",text_ready:"Verificação Anti-Robô",button_start:"Clique para iniciar verificação",text_fetching:"Carregando...",text_solving:"Verificando se você é humano...",text_completed:"Eu sou humano",text_completed_sr:"Verificação automática de spam concluída",text_expired:"Verificação Anti-Robô expirada",button_restart:"Reiniciar",text_error:"Verificação falhou",button_retry:"Tentar novamente",text_fetch_error:"Falha de conexão com"},es:{text_init:"Inicializando...",text_ready:"Verificación Anti-Robot",button_start:"Haga clic para iniciar la verificación",text_fetching:"Cargando desafío",text_solving:"Verificando que eres humano...",text_completed:"Soy humano",text_completed_sr:"Verificación automática de spam completada",text_expired:"Verificación Anti-Robot expirada",button_restart:"Reiniciar",text_error:"Ha fallado la verificación",button_retry:"Intentar de nuevo",text_fetch_error:"Error al conectarse a"},ca:{text_init:"Inicialitzant...",text_ready:"Verificació Anti-Robot",button_start:"Fes clic per començar la verificació",text_fetching:"Carregant repte",text_solving:"Verificant que ets humà...",text_completed:"Soc humà",text_completed_sr:"Verificació automàtica de correu brossa completada",text_expired:"La verificació Anti-Robot ha expirat",button_restart:"Reiniciar",text_error:"Ha fallat la verificació",button_retry:"Tornar a provar",text_fetch_error:"Error connectant a"},ja:{text_init:"開始しています...",text_ready:"アンチロボット認証",button_start:"クリックして認証を開始",text_fetching:"ロードしています",text_solving:"認証中...",text_completed:"私はロボットではありません",text_completed_sr:"自動スパムチェックが完了しました",text_expired:"認証の期限が切れています",button_restart:"再度認証を行う",text_error:"認証にエラーが発生しました",button_retry:"再度認証を行う",text_fetch_error:"接続ができませんでした"},da:{text_init:"Aktiverer...",text_ready:"Jeg er ikke en robot",button_start:"Klik for at starte verifikationen",text_fetching:"Henter data",text_solving:"Kontrollerer at du er et menneske...",text_completed:"Jeg er et menneske.",text_completed_sr:"Automatisk spamkontrol gennemført",text_expired:"Verifikationen kunne ikke fuldføres",button_restart:"Genstart",text_error:"Bekræftelse mislykkedes",button_retry:"Prøv igen",text_fetch_error:"Forbindelsen mislykkedes"},ru:{text_init:"Инициализация...",text_ready:"АнтиРобот проверка",button_start:"Нажмите, чтобы начать проверку",text_fetching:"Получаю задачу",text_solving:"Проверяю, что вы человек...",text_completed:"Я человек",text_completed_sr:"Aвтоматическая проверка на спам завершена",text_expired:"Срок АнтиРоботной проверки истёк",button_restart:"Начать заново",text_error:"Ошибка проверки",button_retry:"Повторить ещё раз",text_fetch_error:"Ошибка подключения"},sv:{text_init:"Aktiverar...",text_ready:"Jag är inte en robot",button_start:"Klicka för att verifiera",text_fetching:"Hämtar data",text_solving:"Kontrollerar att du är människa...",text_completed:"Jag är en människa",text_completed_sr:"Automatisk spamkontroll slutförd",text_expired:"Anti-robot-verifieringen har löpt ut",button_restart:"Börja om",text_error:"Verifiering kunde inte slutföras",button_retry:"Omstart",text_fetch_error:"Verifiering misslyckades"},tr:{text_init:"Başlatılıyor...",text_ready:"Anti-Robot Doğrulaması",button_start:"Doğrulamayı başlatmak için tıklayın",text_fetching:"Yükleniyor",text_solving:"Robot olmadığınız doğrulanıyor...",text_completed:"Ben bir insanım",text_completed_sr:"Otomatik spam kontrolü tamamlandı",text_expired:"Anti-Robot doğrulamasının süresi doldu",button_restart:"Yeniden başlat",text_error:"Doğrulama başarısız oldu",button_retry:"Tekrar dene",text_fetch_error:"Bağlantı başarısız oldu"},el:{text_init:"Προετοιμασία...",text_ready:"Anti-Robot Επαλήθευση",button_start:" Κάντε κλικ για να ξεκινήσει η επαλήθευση",text_fetching:" Λήψη πρόκλησης",text_solving:" Επιβεβαίωση ανθρώπου...",text_completed:"Είμαι άνθρωπος",text_completed_sr:" Ο αυτόματος έλεγχος ανεπιθύμητου περιεχομένου ολοκληρώθηκε",text_expired:" Η επαλήθευση Anti-Robot έληξε",button_restart:" Επανεκκίνηση",text_error:" Η επαλήθευση απέτυχε",button_retry:" Δοκιμάστε ξανά",text_fetch_error:" Αποτυχία σύνδεσης με"},uk:{text_init:"Ініціалізація...",text_ready:"Антиробот верифікація",button_start:"Натисніть, щоб розпочати верифікацію",text_fetching:"З’єднання",text_solving:"Перевірка, що ви не робот...",text_completed:"Я не робот",text_completed_sr:"Автоматична перевірка спаму завершена",text_expired:"Час вичерпано",button_restart:"Почати знову",text_error:"Верифікація не вдалась",button_retry:"Спробувати знову",text_fetch_error:"Не вдалось з’єднатись"},bg:{text_init:"Инициализиране...",text_ready:"Анти-робот проверка",button_start:"Щракнете, за да започнете проверката",text_fetching:"Предизвикателство",text_solving:"Проверяваме дали си човек...",text_completed:"Аз съм човек",text_completed_sr:"Автоматичната проверка за спам е завършена",text_expired:"Анти-Робот проверката изтече",button_restart:"Рестартирайте",text_error:"Неуспешна проверка",button_retry:"Опитайте пак",text_fetch_error:"Неуспешно свързване с"},cs:{text_init:"Inicializace...",text_ready:"Ověření proti robotům",button_start:"Klikněte pro ověření",text_fetching:"Problém při načítání",text_solving:"Ověření, že jste člověk...",text_completed:"Jsem člověk",text_completed_sr:"Automatická kontrola spamu dokončena",text_expired:"Ověření proti robotům vypršelo",button_restart:"Restartovat",text_error:"Ověření se nezdařilo",button_retry:"Zkusit znovu",text_fetch_error:"Připojení se nezdařilo"},sk:{text_init:"Inicializácia...",text_ready:"Overenie proti robotom",button_start:"Kliknite pre overenie",text_fetching:"Problém pri načítaní",text_solving:"Overenie, že ste človek...",text_completed:"Som človek",text_completed_sr:"Automatická kontrola spamu dokončená",text_expired:"Overenie proti robotom vypršalo",button_restart:"Reštartovať",text_error:"Overenie sa nepodarilo",button_retry:"Skúsiť znova",text_fetch_error:"Pripojenie sa nepodarilo"},no:g,fi:{text_init:"Aktivoidaan...",text_ready:"En ole robotti",button_start:"Aloita vahvistus klikkaamalla",text_fetching:"Haetaan tietoja",text_solving:"Tarkistaa, että olet ihminen...",text_completed:"Olen ihminen",text_completed_sr:"Automaattinen roskapostin tarkistus suoritettu",text_expired:"Vahvistusta ei voitu suorittaa loppuun",button_restart:"Uudelleenkäynnistys",text_error:"Vahvistus epäonnistui",button_retry:"Yritä uudelleen",text_fetch_error:"Yhteys epäonnistui"},lv:{text_init:"Notiek inicializēšana...",text_ready:"Verifikācija, ka neesat robots",button_start:"Noklikšķiniet, lai sāktu verifikāciju",text_fetching:"Notiek drošības uzdevuma izgūšana",text_solving:"Notiek pārbaude, vai esat cilvēks...",text_completed:"Es esmu cilvēks",text_completed_sr:"Automātiska surogātpasta pārbaude pabeigta",text_expired:"Verifikācijas, ka neesat robots, derīgums beidzies",button_restart:"Restartēt",text_error:"Verifikācija neizdevās",button_retry:"Mēģināt vēlreiz",text_fetch_error:"Neizdevās izveidot savienojumu ar"},lt:{text_init:"Inicijuojama...",text_ready:"Patikrinimas, ar nesate robotas",button_start:"Spustelėkite patikrinimui pradėti",text_fetching:"Gavimo iššūkis",text_solving:"Tikrinama, ar esate žmogus...",text_completed:"Esu žmogus",text_completed_sr:"Automatinė patikra dėl pašto šiukšlių atlikta",text_expired:"Patikrinimas, ar nesate robotas, baigė galioti",button_restart:"Pradėti iš naujo",text_error:"Patikrinimas nepavyko",button_retry:"Kartoti",text_fetch_error:"Nepavyko prisijungti prie"},pl:{text_init:"Inicjowanie...",text_ready:"Weryfikacja antybotowa",button_start:"Kliknij, aby rozpocząć weryfikację",text_fetching:"Pobieranie",text_solving:"Weryfikacja, czy nie jesteś robotem...",text_completed:"Nie jestem robotem",text_completed_sr:"Zakończono automatyczne sprawdzanie spamu",text_expired:"Weryfikacja antybotowa wygasła",button_restart:"Uruchom ponownie",text_error:"Weryfikacja nie powiodła się",button_retry:"Spróbuj ponownie",text_fetch_error:"Nie udało się połączyć z"},et:{text_init:"Initsialiseerimine...",text_ready:"Robotivastane kinnitus",button_start:"Kinnitamisega alustamiseks klõpsake",text_fetching:"Väljakutse toomine",text_solving:"Kinnitatakse, et sa oled inimene...",text_completed:"Ma olen inimene",text_completed_sr:"Automaatne rämpsposti kontroll on lõpetatud",text_expired:"Robotivastane kinnitus aegus",button_restart:"Taaskäivita",text_error:"Kinnitamine nurjus",button_retry:"Proovi uuesti",text_fetch_error:"Ühenduse loomine nurjus"},hr:{text_init:"Početno postavljanje...",text_ready:"Provjera protiv robota",button_start:"Kliknite za početak provjere",text_fetching:"Dohvaćanje izazova",text_solving:"Provjeravamo jeste li čovjek...",text_completed:"Nisam robot",text_completed_sr:"Automatska provjera je završena",text_expired:"Vrijeme za provjeru protiv robota je isteklo",button_restart:"Osvježi",text_error:"Provjera nije uspjlela",button_retry:" Ponovo pokreni",text_fetch_error:"Nije moguće uspostaviti vezu"},sr:{text_init:"Pokretanje...",text_ready:"Anti-Robot Verifikacija",button_start:"Kliknite da biste započeli verifikaciju",text_fetching:"Učitavanje izazova",text_solving:"Verifikacija da ste čovek...",text_completed:"Ja sam čovek",text_completed_sr:"Automatska provera neželjene pošte je završena",text_expired:"Anti-Robot verifikacija je istekla",button_restart:"Ponovo pokrenuti",text_error:"Verifikacija nije uspela",button_retry:"Pokušajte ponovo",text_fetch_error:"Neuspelo povezivanje sa..."},sl:{text_init:"Inicializiranje...",text_ready:"Preverjanje robotov",button_start:"Kliknite za začetek preverjanja",text_fetching:"Prenašanje izziva",text_solving:"Preverjamo, ali ste človek",text_completed:"Nisem robot",text_completed_sr:"Avtomatsko preverjanje je zaključeno",text_expired:"Preverjanje robotov je poteklo",button_restart:"Osveži",text_error:"Preverjanje ni uspelo",button_retry:"Poskusi ponovno",text_fetch_error:"Povezave ni bilo mogoče vzpostaviti"},hu:{text_init:"Inicializálás...",text_ready:"Robotellenes ellenőrzés",button_start:"Kattintson az ellenőrzés megkezdéséhez",text_fetching:"Feladvány lekérése",text_solving:"Annak igazolása, hogy Ön nem robot...",text_completed:"Nem vagyok robot",text_completed_sr:"Automatikus spam ellenőrzés befejeződött",text_expired:"Robotellenes ellenőrzés lejárt",button_restart:"Újraindítás",text_error:"Az ellenőrzés nem sikerült",button_retry:"Próbálja újra",text_fetch_error:"Nem sikerült csatlakozni"},ro:{text_init:"Se inițializează...",text_ready:"Verificare anti-robot",button_start:"Click pentru a începe verificarea",text_fetching:"Downloading",text_solving:"Verificare că ești om...",text_completed:"Sunt om",text_completed_sr:"Verificarea automată a spam-ului a fost finalizată",text_expired:"Verificarea anti-robot a expirat",button_restart:"Restart",text_error:"Verificare eșuată",button_retry:"Reîncearcă",text_fetch_error:"Nu s-a putut conecta"},zh:{text_init:"初始化中……",text_ready:"人机验证",button_start:"点击开始",text_fetching:"正在加载",text_solving:"人机校验中……",text_completed:"我不是机器人",text_completed_sr:"人机验证完成",text_expired:"验证已过期",button_restart:"重新开始",text_error:"校验失败",button_retry:"重试",text_fetch_error:"无法连接到"},zh_tw:{text_init:"正在初始化……",text_ready:"反機器人驗證",button_start:"點擊開始驗證",text_fetching:"載入中",text_solving:"反機器人驗證中……",text_completed:"我不是機器人",text_completed_sr:"驗證完成",text_expired:"驗證超時",button_restart:"重新開始",text_error:"驗證失敗",button_retry:"重試",text_fetch_error:"無法連線到"},vi:{text_init:"Đang khởi tạo...",text_ready:"Xác minh chống Robot",button_start:"Bấm vào đây để xác minh",text_fetching:"Tìm nạp và xử lý thử thách",text_solving:"Xác minh bạn là người...",text_completed:"Bạn là con người",text_completed_sr:"Xác minh hoàn tất",text_expired:"Xác minh đã hết hạn",button_restart:"Khởi động lại",text_error:"Xác minh thất bại",button_retry:"Thử lại",text_fetch_error:"Không kết nối được"},he:{text_init:"בביצוע...",text_ready:"אימות אנוש",button_start:"צריך ללחוץ להתחלת האימות",text_fetching:"אתגר המענה בהכנה",text_solving:"מתבצע אימות אנוש...",text_completed:"אני לא רובוט",text_completed_sr:"בדיקת הספאם האוטומטית הסתיימה",text_expired:"פג תוקף אימות האנוש",button_restart:"להתחיל שוב",text_error:"אימות האנוש נכשל",button_retry:"לנסות שוב",text_fetch_error:"נכשל החיבור אל",rtl:!0},th:{text_init:"การเริ่มต้น...",text_ready:" การตรวจสอบต่อต้านหุ่นยนต์",button_start:"คลิกเพื่อเริ่มการตรวจสอบ",text_fetching:"การดึงความท้าทาย",text_solving:"ยืนยันว่าคุณเป็นมนุษย์...",text_completed:"ฉันเป็นมนุษย์",text_completed_sr:"การตรวจสอบสแปมอัตโนมัติเสร็จสมบูรณ์",text_expired:"การตรวจสอบ ต่อต้านหุ่นยนต์ หมดอายุ",button_restart:"รีสตาร์ท",text_error:"การยืนยันล้มเหลว",button_retry:"ลองใหม่",text_fetch_error:"ไม่สามารถเชื่อมต่อได้"},kr:{text_init:"초기화 중",text_ready:"Anti-Robot 검증",button_start:"검증을 위해 클릭해 주세요",text_fetching:"검증 준비 중",text_solving:"검증 중",text_completed:"검증이 완료되었습니다",text_completed_sr:"자동 스팸 확인 완료",text_expired:"Anti-Robot 검증 만료",button_restart:"다시 시작합니다",text_error:"검증 실패",button_retry:"다시 시도해 주세요",text_fetch_error:"연결하지 못했습니다"},ar:{text_init:"...التهيئة",text_ready:"يتم التحقيق",button_start:"إضغط هنا للتحقيق",text_fetching:"تهيئة التحدي",text_solving:"نتحقق من أنك لست روبوتًا...",text_completed:"أنا لست روبوتًا",text_completed_sr:"تم الانتهاء من التحقق التلقائي من البريد العشوائي",text_expired:"انتهت صلاحية التحقق",button_restart:"إعادة تشغيل",text_error:"فشل التحقق",button_retry:"ابدأ مرة أخرى",text_fetch_error:"مشكلة في الاتصال مع"},nb:g};function h(t,e){const r=new Uint8Array(3),i=new DataView(r.buffer);return i.setUint8(0,t),i.setUint16(1,e),r}let d;"undefined"!=typeof window&&(d=window.URL||window.webkitURL);class p{constructor(){this.workers=[],this.puzzleNumber=0,this.numPuzzles=0,this.threshold=0,this.startTime=0,this.progress=0,this.totalHashes=0,this.puzzleSolverInputs=[],this.puzzleIndex=0,this.solutionBuffer=new Uint8Array(0),this.solverType=1,this.readyPromise=new Promise((()=>{})),this.readyCount=0,this.startCount=0,this.progressCallback=()=>0,this.readyCallback=()=>0,this.startedCallback=()=>0,this.doneCallback=()=>0,this.errorCallback=()=>0}init(){let t;this.terminateWorkers(),this.progress=0,this.totalHashes=0,this.readyPromise=new Promise((e=>t=e)),this.readyCount=0,this.startCount=0,this.workers=new Array(4);const e=new Blob(['!function(){"use strict";const A="=".charCodeAt(0),I=new Uint8Array(256);for(let A=0;A<64;A++)I["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(A)]=A;function g(A){const I={},g=A.exports,C=g.memory,Q=g.__alloc,t=g.__retain,B=g.__rtti_base||-1;return I.__allocArray=(A,I)=>{const g=function(A){return new Uint32Array(C.buffer)[(B+4>>>2)+2*A]}(A),e=31-Math.clz32(g>>>6&31),o=I.length,i=Q(o<>>2]=t(i),n[r+4>>>2]=i,n[r+8>>>2]=o<>>e)+A]=t(I[A]);else s.set(I,i>>>e);return r},I.__getUint8Array=A=>{const I=new Uint32Array(C.buffer),g=I[A+4>>>2];return new Uint8Array(C.buffer,g,I[g-4>>>2]>>>0)},function(A,I={}){const g=A.__argumentsLength?I=>{A.__argumentsLength.value=I}:A.__setArgumentsLength||A.__setargc||(()=>({}));for(const C in A){if(!Object.prototype.hasOwnProperty.call(A,C))continue;const Q=A[C],t=C.split(".")[0];"function"==typeof Q&&Q!==g?(I[t]=(...A)=>(g(A.length),Q(...A))).original=Q:I[t]=Q}return I}(g,I)}class C{constructor(A){this.b=new Uint8Array(128),this.h=new Uint32Array(16),this.t=0,this.c=0,this.v=new Uint32Array(32),this.m=new Uint32Array(32),this.outlen=A}}function Q(A,I){return A[I]^A[I+1]<<8^A[I+2]<<16^A[I+3]<<24}function t(A,I,g,C,Q,t,B,e){const o=I[B],i=I[B+1],r=I[e],n=I[e+1];let E,s,w,a,c=A[g],D=A[g+1],f=A[C],h=A[C+1],y=A[Q],l=A[Q+1],u=A[t],N=A[t+1];E=c+f,s=(c&f|(c|f)&~E)>>>31,c=E,D=D+h+s,E=c+o,s=(c&o|(c|o)&~E)>>>31,c=E,D=D+i+s,w=u^c,a=N^D,u=a,N=w,E=y+u,s=(y&u|(y|u)&~E)>>>31,y=E,l=l+N+s,w=f^y,a=h^l,f=w>>>24^a<<8,h=a>>>24^w<<8,E=c+f,s=(c&f|(c|f)&~E)>>>31,c=E,D=D+h+s,E=c+r,s=(c&r|(c|r)&~E)>>>31,c=E,D=D+n+s,w=u^c,a=N^D,u=w>>>16^a<<16,N=a>>>16^w<<16,E=y+u,s=(y&u|(y|u)&~E)>>>31,y=E,l=l+N+s,w=f^y,a=h^l,f=a>>>31^w<<1,h=w>>>31^a<<1,A[g]=c,A[g+1]=D,A[C]=f,A[C+1]=h,A[Q]=y,A[Q+1]=l,A[t]=u,A[t+1]=N}const B=[4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225],e=[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,28,20,8,16,18,30,26,12,2,24,0,4,22,14,10,6,22,16,24,0,10,4,30,26,20,28,6,12,14,2,18,8,14,18,6,2,26,24,22,28,4,12,10,20,8,0,30,16,18,0,10,14,4,8,20,30,28,2,22,24,12,16,6,26,4,24,12,20,0,22,16,6,8,26,14,10,30,28,2,18,24,10,2,30,28,26,8,20,0,14,12,6,18,4,16,22,26,22,14,28,24,2,6,18,10,0,30,8,16,12,4,20,12,30,28,18,22,6,0,16,24,4,26,14,2,8,20,10,20,4,16,8,14,12,2,10,30,22,18,28,6,24,26,0,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,28,20,8,16,18,30,26,12,2,24,0,4,22,14,10,6];function o(A,I){const g=A.v,C=A.m;for(let I=0;I<16;I++)g[I]=A.h[I],g[I+16]=B[I];g[24]=g[24]^A.t,g[25]=g[25]^A.t/4294967296,I&&(g[28]=~g[28],g[29]=~g[29]);for(let I=0;I<32;I++)C[I]=Q(A.b,4*I);for(let A=0;A<12;A++)t(g,C,0,8,16,24,e[16*A+0],e[16*A+1]),t(g,C,2,10,18,26,e[16*A+2],e[16*A+3]),t(g,C,4,12,20,28,e[16*A+4],e[16*A+5]),t(g,C,6,14,22,30,e[16*A+6],e[16*A+7]),t(g,C,0,10,20,30,e[16*A+8],e[16*A+9]),t(g,C,2,12,22,24,e[16*A+10],e[16*A+11]),t(g,C,4,14,16,26,e[16*A+12],e[16*A+13]),t(g,C,6,8,18,28,e[16*A+14],e[16*A+15]);for(let I=0;I<16;I++)A.h[I]=A.h[I]^g[I]^g[I+16]}function i(A,I){for(let I=0;I<16;I++)A.h[I]=B[I];A.b.set(I),A.h[0]^=16842752^A.outlen}async function r(){return(A,I,g=4294967295)=>{const Q=function(A,I,g){if(128!=A.length)throw Error("Invalid input");const Q=A.buffer,t=new DataView(Q),B=new C(32);B.t=128;const e=t.getUint32(124,!0),r=e+g;for(let g=e;gE=A));self.onerror=A=>{self.postMessage({type:"error",message:JSON.stringify(A)})},self.onmessage=async C=>{const Q=C.data;try{if("solver"===Q.type){if(Q.forceJS){n=1;const A=await r();E(A)}else try{n=2;const C=WebAssembly.compile(function(g){let C=3285;g.charCodeAt(4379)===A&&C--,g.charCodeAt(4378)===A&&C--;const Q=new Uint8Array(C);for(let A=0,C=0;A<4380;A+=4){const t=I[g.charCodeAt(A+0)],B=I[g.charCodeAt(A+1)],e=I[g.charCodeAt(A+2)],o=I[g.charCodeAt(A+3)];Q[C++]=t<<2|B>>4,Q[C++]=(15&B)<<4|e>>2,Q[C++]=(3&e)<<6|63&o}return Q}("AGFzbQEAAAABKghgAABgAn9/AGADf39/AX9gAX8AYAR/f39/AGAAAX9gAX8Bf2ACf38BfwINAQNlbnYFYWJvcnQABAMMCwcGAwAAAQIFAQIABQMBAAEGFgR/AUEAC38BQQALfwBBAwt/AEHgDAsHbgkGbWVtb3J5AgAHX19hbGxvYwABCF9fcmV0YWluAAIJX19yZWxlYXNlAAMJX19jb2xsZWN0AAQHX19yZXNldAAFC19fcnR0aV9iYXNlAwMNVWludDhBcnJheV9JRAMCDHNvbHZlQmxha2UyYgAKCAELCvQSC5IBAQV/IABB8P///wNLBEAACyMBQRBqIgQgAEEPakFwcSICQRAgAkEQSxsiBmoiAj8AIgVBEHQiA0sEQCAFIAIgA2tB//8DakGAgHxxQRB2IgMgBSADShtAAEEASARAIANAAEEASARAAAsLCyACJAEgBEEQayICIAY2AgAgAkEBNgIEIAIgATYCCCACIAA2AgwgBAsEACAACwMAAQsDAAELBgAjACQBC7sCAQF/AkAgAUUNACAAQQA6AAAgACABakEEayICQQA6AAMgAUECTQ0AIABBADoAASAAQQA6AAIgAkEAOgACIAJBADoAASABQQZNDQAgAEEAOgADIAJBADoAACABQQhNDQAgAEEAIABrQQNxIgJqIgBBADYCACAAIAEgAmtBfHEiAmpBHGsiAUEANgIYIAJBCE0NACAAQQA2AgQgAEEANgIIIAFBADYCECABQQA2AhQgAkEYTQ0AIABBADYCDCAAQQA2AhAgAEEANgIUIABBADYCGCABQQA2AgAgAUEANgIEIAFBADYCCCABQQA2AgwgACAAQQRxQRhqIgFqIQAgAiABayEBA0AgAUEgTwRAIABCADcDACAAQgA3AwggAEIANwMQIABCADcDGCABQSBrIQEgAEEgaiEADAELCwsLcgACfyAARQRAQQxBAhABIQALIAALQQA2AgAgAEEANgIEIABBADYCCCABQfD///8DIAJ2SwRAQcAKQfAKQRJBORAAAAsgASACdCIBQQAQASICIAEQBiAAKAIAGiAAIAI2AgAgACACNgIEIAAgATYCCCAAC88BAQJ/QaABQQAQASIAQQxBAxABQYABQQAQBzYCACAAQQxBBBABQQhBAxAHNgIEIABCADcDCCAAQQA2AhAgAEIANwMYIABCADcDICAAQgA3AyggAEIANwMwIABCADcDOCAAQgA3A0AgAEIANwNIIABCADcDUCAAQgA3A1ggAEIANwNgIABCADcDaCAAQgA3A3AgAEIANwN4IABCADcDgAEgAEIANwOIASAAQgA3A5ABQYABQQUQASIBQYABEAYgACABNgKYASAAQSA2ApwBIAAL2AkCA38SfiAAKAIEIQIgACgCmAEhAwNAIARBgAFIBEAgAyAEaiABIARqKQMANwMAIARBCGohBAwBCwsgAigCBCkDACEMIAIoAgQpAwghDSACKAI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BDw4NBAoABwYDCQIICw0LBw4MAQMJBQAPBAgGAgoGDw4JCwMACAwCDQcBBAoFCgIIBAcGAQUPCwkOAwwNAAABAgMEBQYHCAkKCwwNDg8OCgQICQ8NBgEMAAILBwUDAEHACQspGgAAAAEAAAABAAAAGgAAAEkAbgB2AGEAbABpAGQAIABpAG4AcAB1AHQAQfAJCzEiAAAAAQAAAAEAAAAiAAAAcwByAGMALwBzAG8AbAB2AGUAcgBXAGEAcwBtAC4AdABzAEGwCgsrHAAAAAEAAAABAAAAHAAAAEkAbgB2AGEAbABpAGQAIABsAGUAbgBnAHQAaABB4AoLNSYAAAABAAAAAQAAACYAAAB+AGwAaQBiAC8AYQByAHIAYQB5AGIAdQBmAGYAZQByAC4AdABzAEGgCws1JgAAAAEAAAABAAAAJgAAAH4AbABpAGIALwBzAHQAYQB0AGkAYwBhAHIAcgBhAHkALgB0AHMAQeALCzMkAAAAAQAAAAEAAAAkAAAASQBuAGQAZQB4ACAAbwB1AHQAIABvAGYAIAByAGEAbgBnAGUAQaAMCzMkAAAAAQAAAAEAAAAkAAAAfgBsAGkAYgAvAHQAeQBwAGUAZABhAHIAcgBhAHkALgB0AHMAQeAMCy4GAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAYQAAAAIAAAAhAgAAAgAAACQC")),Q=await async function(A){const I=await async function(A){const I={env:{abort(){throw Error("Wasm aborted")}}};return{exports:g(await WebAssembly.instantiate(A,I))}}(A),C=I.exports.__retain(I.exports.__allocArray(I.exports.Uint8Array_ID,new Uint8Array(128)));let Q=I.exports.__getUint8Array(C);return(A,g,t=4294967295)=>{Q.set(A);const B=I.exports.solveBlake2b(C,g,t);Q=I.exports.__getUint8Array(C);const e=I.exports.__getUint8Array(B);return I.exports.__release(B),[Q,e]}}(await C);E(Q)}catch(A){console.log("FriendlyCaptcha failed to initialize WebAssembly, falling back to Javascript solver: "+A.toString()),n=1;const I=await r();E(I)}self.postMessage({type:"ready",solver:n})}else if("start"===Q.type){const A=await s;self.postMessage({type:"started"});let I,g=0;for(let C=0;C<256;C++){Q.puzzleSolverInput[123]=C;const[t,B]=A(Q.puzzleSolverInput,Q.threshold);if(0!==B.length){I=t;break}console.warn("FC: Internal error or no solution found"),g+=Math.pow(2,32)-1}g+=new DataView(I.slice(-4).buffer).getUint32(0,!0),self.postMessage({type:"done",solution:I.slice(-8),h:g,puzzleIndex:Q.puzzleIndex,puzzleNumber:Q.puzzleNumber})}}catch(A){setTimeout((()=>{throw A}))}}}();'],{type:"text/javascript"});for(let r=0;rthis.errorCallback(t),this.workers[r].onmessage=e=>{const i=e.data;if(i)if("ready"===i.type)this.readyCount++,this.solverType=i.solver,this.readyCount==this.workers.length&&(t(),this.readyCallback());else if("started"===i.type)this.startCount++,1==this.startCount&&(this.startTime=Date.now(),this.startedCallback());else if("done"===i.type){if(i.puzzleNumber!==this.puzzleNumber)return;if(this.puzzleIndex0,readyCallback:()=>0,doneCallback:()=>0,errorCallback:()=>0,sitekey:t.dataset.sitekey||"",language:t.dataset.lang||"en",solutionFieldName:t.dataset.solutionFieldName||"frc-captcha-solution",styleNonce:null},e),this.e=t,this.e.friendlyChallengeWidget=this,this.loadLanguage(),t.innerText=this.lang.text_init,this.opts.skipStyleInjection||function(t=null){if(!document.querySelector("#frc-style")){const e=document.createElement("style");e.id="frc-style",e.innerHTML=".frc-captcha *{margin:0;padding:0;border:0;text-align:initial;border-radius:0;filter:none!important;transition:none!important;font-weight:400;font-size:14px;line-height:1.2;text-decoration:none;background-color:initial;color:#222}.frc-captcha{position:relative;min-width:250px;max-width:312px;border:1px solid #f4f4f4;padding-bottom:12px;background-color:#fff}.frc-captcha b{font-weight:700}.frc-container{display:flex;align-items:center;min-height:52px}.frc-icon{fill:#222;stroke:#222;flex-shrink:0;margin:8px 8px 0}.frc-icon.frc-warning{fill:#c00}.frc-success .frc-icon{animation:1s ease-in both frc-fade-in}.frc-content{white-space:nowrap;display:flex;flex-direction:column;margin:4px 6px 0 0;overflow-x:auto;flex-grow:1}.frc-banner{position:absolute;bottom:0;right:6px;line-height:1}.frc-banner *{font-size:10px;opacity:.8;text-decoration:none}.frc-progress{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:3px 0;height:4px;border:none;background-color:#eee;color:#222;width:100%;transition:.5s linear}.frc-progress::-webkit-progress-bar{background:#eee}.frc-progress::-webkit-progress-value{background:#222}.frc-progress::-moz-progress-bar{background:#222}.frc-button{cursor:pointer;padding:2px 6px;background-color:#f1f1f1;border:1px solid transparent;text-align:center;font-weight:600;text-transform:none}.frc-button:focus{border:1px solid #333}.frc-button:hover{background-color:#ddd}.frc-captcha-solution{display:none}.frc-err-url{text-decoration:underline;font-size:.9em}.frc-rtl{direction:rtl}.frc-rtl .frc-content{margin:4px 0 0 6px}.frc-banner.frc-rtl{left:6px;right:auto}.dark.frc-captcha{color:#fff;background-color:#222;border-color:#333}.dark.frc-captcha *{color:#fff}.dark.frc-captcha button{background-color:#444}.dark .frc-icon{fill:#fff;stroke:#fff}.dark .frc-progress{background-color:#444}.dark .frc-progress::-webkit-progress-bar{background:#444}.dark .frc-progress::-webkit-progress-value{background:#ddd}.dark .frc-progress::-moz-progress-bar{background:#ddd}@keyframes frc-fade-in{from{opacity:0}to{opacity:1}}",t&&e.setAttribute("nonce",t),document.head.appendChild(e)}}(this.opts.styleNonce),this.init("auto"===this.opts.startMode||"auto"===this.e.dataset.start)}init(t){var e;if(this.hasBeenDestroyed)console.error("FriendlyCaptcha widget has been destroyed using destroy(), it can not be used anymore.");else if(this.initWorkerGroup(),t)this.start();else if("none"!==this.e.dataset.start&&("focus"===this.opts.startMode||"focus"===this.e.dataset.start)){const t=function(t){for(;"FORM"!==t.tagName;)if(!(t=t.parentElement))return null;return t}(this.e);t?(e=()=>this.start(),t.addEventListener("focusin",e,{once:!0,passive:!0})):console.log("FriendlyCaptcha div seems not to be contained in a form, autostart will not work")}}loadLanguage(t){if(void 0!==t?this.opts.language=t:this.e.dataset.lang&&(this.opts.language=this.e.dataset.lang),"string"==typeof this.opts.language){let t=this.opts.language.toLowerCase(),e=u[t];void 0===e&&"-"===t[2]&&(t=t.substring(0,2),e=u[t]),void 0===e&&(console.error('FriendlyCaptcha: language "'+this.opts.language+'" not found.'),e=u.en),this.lang=e}else this.lang=Object.assign(Object.assign({},u.en),this.opts.language)}makeButtonStart(){const t=this.e.querySelector("button");t&&(t.addEventListener("click",(t=>this.start()),{once:!0,passive:!0}),t.addEventListener("touchstart",(t=>this.start()),{once:!0,passive:!0}))}onWorkerError(t){this.hasBeenStarted=!1,this.needsReInit=!0,this.expiryTimeout&&clearTimeout(this.expiryTimeout),console.error("[FRC]",t),this.e.innerHTML=s(this.opts.solutionFieldName,this.lang,"Background worker error "+t.message),this.makeButtonStart(),this.opts.forceJSFallback=!0}initWorkerGroup(){this.workerGroup.progressCallback=t=>{!function(t,e){const r=t.querySelector(".frc-progress"),i=(e.i+1)/e.n;r&&(r.value=i,r.innerText=(100*i).toFixed(1)+"%",r.title=e.i+1+"/"+e.n+" ("+(e.h/e.t*.001).toFixed(0)+"K/s)")}(this.e,t)},this.workerGroup.readyCallback=()=>{var t;this.e.innerHTML=a(this.opts.solutionFieldName,(t=this.lang).rtl,'',!0,t.text_ready,".UNSTARTED",t.button_start,!1),this.makeButtonStart(),this.opts.readyCallback()},this.workerGroup.startedCallback=()=>{var t;this.e.innerHTML=a(this.opts.solutionFieldName,(t=this.lang).rtl,o,!0,t.text_solving,".UNFINISHED",void 0,!0),this.opts.startedCallback()},this.workerGroup.doneCallback=t=>{const e=this.handleDone(t);this.opts.doneCallback(e);const r=this.e.dataset.callback;r&&window[r](e)},this.workerGroup.errorCallback=t=>{this.onWorkerError(t)},this.workerGroup.init(),this.workerGroup.setupSolver(this.opts.forceJSFallback)}expire(){var t;this.hasBeenStarted=!1,!1!==this.e.isConnected&&(this.e.innerHTML=a(this.opts.solutionFieldName,(t=this.lang).rtl,n,!0,t.text_expired,".EXPIRED",t.button_restart),this.makeButtonStart())}async start(){if(this.hasBeenDestroyed)return void console.error("Can not start FriendlyCaptcha widget which has been destroyed");if(this.hasBeenStarted)return void console.warn("Can not start FriendlyCaptcha widget which has already been started");const t=this.opts.sitekey||this.e.dataset.sitekey;if(!t)return console.error("FriendlyCaptcha: sitekey not set on frc-captcha element"),void(this.e.innerHTML=s(this.opts.solutionFieldName,this.lang,"Website problem: sitekey not set",!1));if(-1===l.indexOf("headless")&&-1===A.appVersion.indexOf("Headless")&&-1===l.indexOf("bot")&&-1===l.indexOf("crawl")&&!0!==A.webdriver&&A.language&&(void 0===A.languages||A.languages.length)){if(this.needsReInit)return this.needsReInit=!1,void this.init(!0);this.hasBeenStarted=!0;try{this.e.innerHTML=a(this.opts.solutionFieldName,(i=this.lang).rtl,o,!0,i.text_fetching,".FETCHING",void 0,!0),this.puzzle=function(t){const i=t.split("."),o=i[1],n=function(t){const i=t.length;let o=3*i>>>2;t.charCodeAt(i-1)===e&&o--,t.charCodeAt(i-2)===e&&o--;const n=new Uint8Array(o);for(let e=0,o=0;e>4,n[o++]=(15&a)<<4|s>>2,n[o++]=(3&s)<<6|63&A}return n}(o);return{signature:i[0],base64:o,buffer:n,n:n[14],threshold:(a=n[15],a>255?a=255:a<0&&(a=0),Math.pow(2,(255.999-a)/8)>>>0),expiry:3e5*n[13]};var a}(await async function(t,e,r){const i=t.split(",");for(let t=0;t${i[t]}`);throw o.rawError=e,o}throw Error("Internal error")}(this.opts.puzzleEndpoint,t,this.lang)),this.expiryTimeout&&clearTimeout(this.expiryTimeout),this.expiryTimeout=setTimeout((()=>this.expire()),this.puzzle.expiry-3e4)}catch(t){console.error("[FRC]",t),this.hasBeenStarted=!1,this.expiryTimeout&&clearTimeout(this.expiryTimeout),this.e.innerHTML=s(this.opts.solutionFieldName,this.lang,t.message),this.makeButtonStart();const e="error_getting_puzzle";this.opts.errorCallback({code:e,description:t.toString(),error:t});const r=this.e.dataset["callback-error"];return void(r&&window[r](this))}var i;await this.workerGroup.start(this.puzzle)}else this.e.innerHTML=s(this.opts.solutionFieldName,this.lang,"Browser check failed, try a different browser",!1,!0)}handleDone(t){this.valid=!0;const e=`${this.puzzle.signature}.${this.puzzle.base64}.${i(t.solution)}.${i(t.diagnostics)}`;return this.e.innerHTML=function(t,e,r,i){const o=`${i.t.toFixed(0)}s (${(i.h/i.t*.001).toFixed(0)}K/s)${1===i.solver?" JS Fallback":""}`;return a(t,e.rtl,`${e.text_completed_sr}`,!1,e.text_completed,r,void 0,!1,o,"frc-success")}(this.opts.solutionFieldName,this.lang,e,t),this.needsReInit=!0,e}destroy(){this.workerGroup.terminateWorkers(),this.needsReInit=!1,this.hasBeenStarted=!1,this.expiryTimeout&&clearTimeout(this.expiryTimeout),this.e&&(this.e.remove(),delete this.e),this.hasBeenDestroyed=!0}reset(){this.hasBeenDestroyed?console.error("FriendlyCaptcha widget has been destroyed, it can not be used anymore"):(this.workerGroup.terminateWorkers(),this.needsReInit=!1,this.hasBeenStarted=!1,this.expiryTimeout&&clearTimeout(this.expiryTimeout),this.init("auto"===this.opts.startMode||"auto"===this.e.dataset.start))}}const{applyFilters:x}=JetPlugins.hooks,{addAction:f}=JetPlugins.hooks;f("jet.fb.observe.after","jet-form-builder/friendly.captcha",(function(t){var e;if(t.parent)return;const r=t.getInput("_captcha_token"),i=t.getSubmit().getFormId(),o=r?.nodes?.[0]?.nextElementSibling;let n=null!==(e=window?.JetFormBuilderCaptchaConfig?.[i])&&void 0!==e&&e;if(!o||!n)return;r.isVisible=()=>!0,n={...n,doneCallback(t){r.value.current=t,r.loading.end()},startedCallback:()=>r.loading.start(),errorCallback:()=>r.loading.end()},n=x("jet.fb.friendlyCaptcha.options",n,t);const a=new _(o,n);t.getSubmit().submitter?.status?.watch?.((()=>{a.reset(),r.onClear()}))}))})(); \ No newline at end of file +(()=>{"use strict";const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e="=".charCodeAt(0),r=new Uint8Array(256);for(let e=0;e<64;e++)r[t.charCodeAt(e)]=e;function i(e){const r=e.length;let i="";for(let o=0;o>>2),s+=t.charAt((3&r)<<4|n>>>4),s+=t.charAt((15&n)<<2|a>>>6),s+=t.charAt(63&a),i+=s}return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i}const o='',n='';function a(t,e,r,i,o,n,a,s=!1,A,l){return`
\n\n
\n ${o}\n ${a?``:""}\n ${s?'0%':""}\n
\n
FriendlyCaptcha ⇗\n${"-"===t?"":``}`}function s(t,e,r,i=!0,o=!1){return a(t,e.rtl,n,!0,`${e.text_error}
${r}`,o?".HEADLESS_ERROR":".ERROR",i?e.button_retry:void 0)}let A,l;async function c(t,e,r){let i=1e3;return fetch(t,e).catch((async o=>{if(0===r)throw o;return await new Promise((t=>setTimeout(t,i))),i*=4,c(t,e,r-1)}))}"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&(A=navigator,l=A.userAgent.toLowerCase());const g={text_init:" Aktiverer...",text_ready:"Jeg er ikke en robot",button_start:"Klikk for å starte verifiseringen",text_fetching:"Henter data",text_solving:"Sjekker at du er et menneske...",text_completed:"Jeg er et menneske",text_completed_sr:"Automatisk spam-sjekk fullført",text_expired:"Verifisering kunne ikke fullføres",button_restart:"Omstart",text_error:"Bekreftelsen mislyktes",button_retry:"Prøv på nytt",text_fetch_error:"Tilkoblingen mislyktes"},u={en:{text_init:"Initializing...",text_ready:"Anti-Robot Verification",button_start:"Click to start verification",text_fetching:"Fetching Challenge",text_solving:"Verifying you are human...",text_completed:"I am human",text_completed_sr:"Automatic spam check completed",text_expired:"Anti-Robot verification expired",button_restart:"Restart",text_error:"Verification failed",button_retry:"Retry",text_fetch_error:"Failed to connect to"},de:{text_init:"Initialisierung...",text_ready:"Anti-Roboter-Verifizierung",button_start:"Hier klicken",text_fetching:"Herausforderung laden...",text_solving:"Verifizierung, dass Sie ein Mensch sind...",text_completed:"Ich bin ein Mensch",text_completed_sr:"Automatische Spamprüfung abgeschlossen",text_expired:"Verifizierung abgelaufen",button_restart:"Erneut starten",text_error:"Verifizierung fehlgeschlagen",button_retry:"Erneut versuchen",text_fetch_error:"Verbindungsproblem mit"},nl:{text_init:"Initializeren...",text_ready:"Anti-robotverificatie",button_start:"Klik om te starten",text_fetching:"Aan het laden...",text_solving:"Anti-robotverificatie bezig...",text_completed:"Ik ben een mens",text_completed_sr:"Automatische anti-spamcheck voltooid",text_expired:"Verificatie verlopen",button_restart:"Opnieuw starten",text_error:"Verificatie mislukt",button_retry:"Opnieuw proberen",text_fetch_error:"Verbinding mislukt met"},fr:{text_init:"Chargement...",text_ready:"Vérification Anti-Robot",button_start:"Clique ici pour vérifier",text_fetching:"Chargement du défi",text_solving:"Nous vérifions que vous n'êtes pas un robot...",text_completed:"Je ne suis pas un robot",text_completed_sr:"Vérification automatique des spams terminée",text_expired:"Vérification anti-robot expirée",button_restart:"Redémarrer",text_error:"Échec de la vérification",button_retry:"Recommencer",text_fetch_error:"Problème de connexion avec"},it:{text_init:"Inizializzazione...",text_ready:"Verifica Anti-Robot",button_start:"Clicca per iniziare",text_fetching:"Caricamento...",text_solving:"Verificando che sei umano...",text_completed:"Non sono un robot",text_completed_sr:"Controllo automatico dello spam completato",text_expired:"Verifica Anti-Robot scaduta",button_restart:"Ricomincia",text_error:"Verifica fallita",button_retry:"Riprova",text_fetch_error:"Problema di connessione con"},pt:{text_init:"Inicializando...",text_ready:"Verificação Anti-Robô",button_start:"Clique para iniciar verificação",text_fetching:"Carregando...",text_solving:"Verificando se você é humano...",text_completed:"Eu sou humano",text_completed_sr:"Verificação automática de spam concluída",text_expired:"Verificação Anti-Robô expirada",button_restart:"Reiniciar",text_error:"Verificação falhou",button_retry:"Tentar novamente",text_fetch_error:"Falha de conexão com"},es:{text_init:"Inicializando...",text_ready:"Verificación Anti-Robot",button_start:"Haga clic para iniciar la verificación",text_fetching:"Cargando desafío",text_solving:"Verificando que eres humano...",text_completed:"Soy humano",text_completed_sr:"Verificación automática de spam completada",text_expired:"Verificación Anti-Robot expirada",button_restart:"Reiniciar",text_error:"Ha fallado la verificación",button_retry:"Intentar de nuevo",text_fetch_error:"Error al conectarse a"},ca:{text_init:"Inicialitzant...",text_ready:"Verificació Anti-Robot",button_start:"Fes clic per començar la verificació",text_fetching:"Carregant repte",text_solving:"Verificant que ets humà...",text_completed:"Soc humà",text_completed_sr:"Verificació automàtica de correu brossa completada",text_expired:"La verificació Anti-Robot ha expirat",button_restart:"Reiniciar",text_error:"Ha fallat la verificació",button_retry:"Tornar a provar",text_fetch_error:"Error connectant a"},ja:{text_init:"開始しています...",text_ready:"アンチロボット認証",button_start:"クリックして認証を開始",text_fetching:"ロードしています",text_solving:"認証中...",text_completed:"私はロボットではありません",text_completed_sr:"自動スパムチェックが完了しました",text_expired:"認証の期限が切れています",button_restart:"再度認証を行う",text_error:"認証にエラーが発生しました",button_retry:"再度認証を行う",text_fetch_error:"接続ができませんでした"},da:{text_init:"Aktiverer...",text_ready:"Jeg er ikke en robot",button_start:"Klik for at starte verifikationen",text_fetching:"Henter data",text_solving:"Kontrollerer at du er et menneske...",text_completed:"Jeg er et menneske.",text_completed_sr:"Automatisk spamkontrol gennemført",text_expired:"Verifikationen kunne ikke fuldføres",button_restart:"Genstart",text_error:"Bekræftelse mislykkedes",button_retry:"Prøv igen",text_fetch_error:"Forbindelsen mislykkedes"},ru:{text_init:"Инициализация...",text_ready:"АнтиРобот проверка",button_start:"Нажмите, чтобы начать проверку",text_fetching:"Получаю задачу",text_solving:"Проверяю, что вы человек...",text_completed:"Я человек",text_completed_sr:"Aвтоматическая проверка на спам завершена",text_expired:"Срок АнтиРоботной проверки истёк",button_restart:"Начать заново",text_error:"Ошибка проверки",button_retry:"Повторить ещё раз",text_fetch_error:"Ошибка подключения"},sv:{text_init:"Aktiverar...",text_ready:"Jag är inte en robot",button_start:"Klicka för att verifiera",text_fetching:"Hämtar data",text_solving:"Kontrollerar att du är människa...",text_completed:"Jag är en människa",text_completed_sr:"Automatisk spamkontroll slutförd",text_expired:"Anti-robot-verifieringen har löpt ut",button_restart:"Börja om",text_error:"Verifiering kunde inte slutföras",button_retry:"Omstart",text_fetch_error:"Verifiering misslyckades"},tr:{text_init:"Başlatılıyor...",text_ready:"Anti-Robot Doğrulaması",button_start:"Doğrulamayı başlatmak için tıklayın",text_fetching:"Yükleniyor",text_solving:"Robot olmadığınız doğrulanıyor...",text_completed:"Ben bir insanım",text_completed_sr:"Otomatik spam kontrolü tamamlandı",text_expired:"Anti-Robot doğrulamasının süresi doldu",button_restart:"Yeniden başlat",text_error:"Doğrulama başarısız oldu",button_retry:"Tekrar dene",text_fetch_error:"Bağlantı başarısız oldu"},el:{text_init:"Προετοιμασία...",text_ready:"Anti-Robot Επαλήθευση",button_start:" Κάντε κλικ για να ξεκινήσει η επαλήθευση",text_fetching:" Λήψη πρόκλησης",text_solving:" Επιβεβαίωση ανθρώπου...",text_completed:"Είμαι άνθρωπος",text_completed_sr:" Ο αυτόματος έλεγχος ανεπιθύμητου περιεχομένου ολοκληρώθηκε",text_expired:" Η επαλήθευση Anti-Robot έληξε",button_restart:" Επανεκκίνηση",text_error:" Η επαλήθευση απέτυχε",button_retry:" Δοκιμάστε ξανά",text_fetch_error:" Αποτυχία σύνδεσης με"},uk:{text_init:"Ініціалізація...",text_ready:"Антиробот верифікація",button_start:"Натисніть, щоб розпочати верифікацію",text_fetching:"З’єднання",text_solving:"Перевірка, що ви не робот...",text_completed:"Я не робот",text_completed_sr:"Автоматична перевірка спаму завершена",text_expired:"Час вичерпано",button_restart:"Почати знову",text_error:"Верифікація не вдалась",button_retry:"Спробувати знову",text_fetch_error:"Не вдалось з’єднатись"},bg:{text_init:"Инициализиране...",text_ready:"Анти-робот проверка",button_start:"Щракнете, за да започнете проверката",text_fetching:"Предизвикателство",text_solving:"Проверяваме дали си човек...",text_completed:"Аз съм човек",text_completed_sr:"Автоматичната проверка за спам е завършена",text_expired:"Анти-Робот проверката изтече",button_restart:"Рестартирайте",text_error:"Неуспешна проверка",button_retry:"Опитайте пак",text_fetch_error:"Неуспешно свързване с"},cs:{text_init:"Inicializace...",text_ready:"Ověření proti robotům",button_start:"Klikněte pro ověření",text_fetching:"Problém při načítání",text_solving:"Ověření, že jste člověk...",text_completed:"Jsem člověk",text_completed_sr:"Automatická kontrola spamu dokončena",text_expired:"Ověření proti robotům vypršelo",button_restart:"Restartovat",text_error:"Ověření se nezdařilo",button_retry:"Zkusit znovu",text_fetch_error:"Připojení se nezdařilo"},sk:{text_init:"Inicializácia...",text_ready:"Overenie proti robotom",button_start:"Kliknite pre overenie",text_fetching:"Problém pri načítaní",text_solving:"Overenie, že ste človek...",text_completed:"Som človek",text_completed_sr:"Automatická kontrola spamu dokončená",text_expired:"Overenie proti robotom vypršalo",button_restart:"Reštartovať",text_error:"Overenie sa nepodarilo",button_retry:"Skúsiť znova",text_fetch_error:"Pripojenie sa nepodarilo"},no:g,fi:{text_init:"Aktivoidaan...",text_ready:"En ole robotti",button_start:"Aloita vahvistus klikkaamalla",text_fetching:"Haetaan tietoja",text_solving:"Tarkistaa, että olet ihminen...",text_completed:"Olen ihminen",text_completed_sr:"Automaattinen roskapostin tarkistus suoritettu",text_expired:"Vahvistusta ei voitu suorittaa loppuun",button_restart:"Uudelleenkäynnistys",text_error:"Vahvistus epäonnistui",button_retry:"Yritä uudelleen",text_fetch_error:"Yhteys epäonnistui"},lv:{text_init:"Notiek inicializēšana...",text_ready:"Verifikācija, ka neesat robots",button_start:"Noklikšķiniet, lai sāktu verifikāciju",text_fetching:"Notiek drošības uzdevuma izgūšana",text_solving:"Notiek pārbaude, vai esat cilvēks...",text_completed:"Es esmu cilvēks",text_completed_sr:"Automātiska surogātpasta pārbaude pabeigta",text_expired:"Verifikācijas, ka neesat robots, derīgums beidzies",button_restart:"Restartēt",text_error:"Verifikācija neizdevās",button_retry:"Mēģināt vēlreiz",text_fetch_error:"Neizdevās izveidot savienojumu ar"},lt:{text_init:"Inicijuojama...",text_ready:"Patikrinimas, ar nesate robotas",button_start:"Spustelėkite patikrinimui pradėti",text_fetching:"Gavimo iššūkis",text_solving:"Tikrinama, ar esate žmogus...",text_completed:"Esu žmogus",text_completed_sr:"Automatinė patikra dėl pašto šiukšlių atlikta",text_expired:"Patikrinimas, ar nesate robotas, baigė galioti",button_restart:"Pradėti iš naujo",text_error:"Patikrinimas nepavyko",button_retry:"Kartoti",text_fetch_error:"Nepavyko prisijungti prie"},pl:{text_init:"Inicjowanie...",text_ready:"Weryfikacja antybotowa",button_start:"Kliknij, aby rozpocząć weryfikację",text_fetching:"Pobieranie",text_solving:"Weryfikacja, czy nie jesteś robotem...",text_completed:"Nie jestem robotem",text_completed_sr:"Zakończono automatyczne sprawdzanie spamu",text_expired:"Weryfikacja antybotowa wygasła",button_restart:"Uruchom ponownie",text_error:"Weryfikacja nie powiodła się",button_retry:"Spróbuj ponownie",text_fetch_error:"Nie udało się połączyć z"},et:{text_init:"Initsialiseerimine...",text_ready:"Robotivastane kinnitus",button_start:"Kinnitamisega alustamiseks klõpsake",text_fetching:"Väljakutse toomine",text_solving:"Kinnitatakse, et sa oled inimene...",text_completed:"Ma olen inimene",text_completed_sr:"Automaatne rämpsposti kontroll on lõpetatud",text_expired:"Robotivastane kinnitus aegus",button_restart:"Taaskäivita",text_error:"Kinnitamine nurjus",button_retry:"Proovi uuesti",text_fetch_error:"Ühenduse loomine nurjus"},hr:{text_init:"Početno postavljanje...",text_ready:"Provjera protiv robota",button_start:"Kliknite za početak provjere",text_fetching:"Dohvaćanje izazova",text_solving:"Provjeravamo jeste li čovjek...",text_completed:"Nisam robot",text_completed_sr:"Automatska provjera je završena",text_expired:"Vrijeme za provjeru protiv robota je isteklo",button_restart:"Osvježi",text_error:"Provjera nije uspjlela",button_retry:" Ponovo pokreni",text_fetch_error:"Nije moguće uspostaviti vezu"},sr:{text_init:"Pokretanje...",text_ready:"Anti-Robot Verifikacija",button_start:"Kliknite da biste započeli verifikaciju",text_fetching:"Učitavanje izazova",text_solving:"Verifikacija da ste čovek...",text_completed:"Ja sam čovek",text_completed_sr:"Automatska provera neželjene pošte je završena",text_expired:"Anti-Robot verifikacija je istekla",button_restart:"Ponovo pokrenuti",text_error:"Verifikacija nije uspela",button_retry:"Pokušajte ponovo",text_fetch_error:"Neuspelo povezivanje sa..."},sl:{text_init:"Inicializiranje...",text_ready:"Preverjanje robotov",button_start:"Kliknite za začetek preverjanja",text_fetching:"Prenašanje izziva",text_solving:"Preverjamo, ali ste človek",text_completed:"Nisem robot",text_completed_sr:"Avtomatsko preverjanje je zaključeno",text_expired:"Preverjanje robotov je poteklo",button_restart:"Osveži",text_error:"Preverjanje ni uspelo",button_retry:"Poskusi ponovno",text_fetch_error:"Povezave ni bilo mogoče vzpostaviti"},hu:{text_init:"Inicializálás...",text_ready:"Robotellenes ellenőrzés",button_start:"Kattintson az ellenőrzés megkezdéséhez",text_fetching:"Feladvány lekérése",text_solving:"Annak igazolása, hogy Ön nem robot...",text_completed:"Nem vagyok robot",text_completed_sr:"Automatikus spam ellenőrzés befejeződött",text_expired:"Robotellenes ellenőrzés lejárt",button_restart:"Újraindítás",text_error:"Az ellenőrzés nem sikerült",button_retry:"Próbálja újra",text_fetch_error:"Nem sikerült csatlakozni"},ro:{text_init:"Se inițializează...",text_ready:"Verificare anti-robot",button_start:"Click pentru a începe verificarea",text_fetching:"Downloading",text_solving:"Verificare că ești om...",text_completed:"Sunt om",text_completed_sr:"Verificarea automată a spam-ului a fost finalizată",text_expired:"Verificarea anti-robot a expirat",button_restart:"Restart",text_error:"Verificare eșuată",button_retry:"Reîncearcă",text_fetch_error:"Nu s-a putut conecta"},zh:{text_init:"初始化中……",text_ready:"人机验证",button_start:"点击开始",text_fetching:"正在加载",text_solving:"人机校验中……",text_completed:"我不是机器人",text_completed_sr:"人机验证完成",text_expired:"验证已过期",button_restart:"重新开始",text_error:"校验失败",button_retry:"重试",text_fetch_error:"无法连接到"},zh_tw:{text_init:"正在初始化……",text_ready:"反機器人驗證",button_start:"點擊開始驗證",text_fetching:"載入中",text_solving:"反機器人驗證中……",text_completed:"我不是機器人",text_completed_sr:"驗證完成",text_expired:"驗證超時",button_restart:"重新開始",text_error:"驗證失敗",button_retry:"重試",text_fetch_error:"無法連線到"},vi:{text_init:"Đang khởi tạo...",text_ready:"Xác minh chống Robot",button_start:"Bấm vào đây để xác minh",text_fetching:"Tìm nạp và xử lý thử thách",text_solving:"Xác minh bạn là người...",text_completed:"Bạn là con người",text_completed_sr:"Xác minh hoàn tất",text_expired:"Xác minh đã hết hạn",button_restart:"Khởi động lại",text_error:"Xác minh thất bại",button_retry:"Thử lại",text_fetch_error:"Không kết nối được"},he:{text_init:"בביצוע...",text_ready:"אימות אנוש",button_start:"צריך ללחוץ להתחלת האימות",text_fetching:"אתגר המענה בהכנה",text_solving:"מתבצע אימות אנוש...",text_completed:"אני לא רובוט",text_completed_sr:"בדיקת הספאם האוטומטית הסתיימה",text_expired:"פג תוקף אימות האנוש",button_restart:"להתחיל שוב",text_error:"אימות האנוש נכשל",button_retry:"לנסות שוב",text_fetch_error:"נכשל החיבור אל",rtl:!0},th:{text_init:"การเริ่มต้น...",text_ready:" การตรวจสอบต่อต้านหุ่นยนต์",button_start:"คลิกเพื่อเริ่มการตรวจสอบ",text_fetching:"การดึงความท้าทาย",text_solving:"ยืนยันว่าคุณเป็นมนุษย์...",text_completed:"ฉันเป็นมนุษย์",text_completed_sr:"การตรวจสอบสแปมอัตโนมัติเสร็จสมบูรณ์",text_expired:"การตรวจสอบ ต่อต้านหุ่นยนต์ หมดอายุ",button_restart:"รีสตาร์ท",text_error:"การยืนยันล้มเหลว",button_retry:"ลองใหม่",text_fetch_error:"ไม่สามารถเชื่อมต่อได้"},kr:{text_init:"초기화 중",text_ready:"Anti-Robot 검증",button_start:"검증을 위해 클릭해 주세요",text_fetching:"검증 준비 중",text_solving:"검증 중",text_completed:"검증이 완료되었습니다",text_completed_sr:"자동 스팸 확인 완료",text_expired:"Anti-Robot 검증 만료",button_restart:"다시 시작합니다",text_error:"검증 실패",button_retry:"다시 시도해 주세요",text_fetch_error:"연결하지 못했습니다"},ar:{text_init:"...التهيئة",text_ready:"يتم التحقيق",button_start:"إضغط هنا للتحقيق",text_fetching:"تهيئة التحدي",text_solving:"نتحقق من أنك لست روبوتًا...",text_completed:"أنا لست روبوتًا",text_completed_sr:"تم الانتهاء من التحقق التلقائي من البريد العشوائي",text_expired:"انتهت صلاحية التحقق",button_restart:"إعادة تشغيل",text_error:"فشل التحقق",button_retry:"ابدأ مرة أخرى",text_fetch_error:"مشكلة في الاتصال مع"},nb:g};function h(t,e){const r=new Uint8Array(3),i=new DataView(r.buffer);return i.setUint8(0,t),i.setUint16(1,e),r}let d;"undefined"!=typeof window&&(d=window.URL||window.webkitURL);class p{constructor(){this.workers=[],this.puzzleNumber=0,this.numPuzzles=0,this.threshold=0,this.startTime=0,this.progress=0,this.totalHashes=0,this.puzzleSolverInputs=[],this.puzzleIndex=0,this.solutionBuffer=new Uint8Array(0),this.solverType=1,this.readyPromise=new Promise((()=>{})),this.readyCount=0,this.startCount=0,this.progressCallback=()=>0,this.readyCallback=()=>0,this.startedCallback=()=>0,this.doneCallback=()=>0,this.errorCallback=()=>0}init(){let t;this.terminateWorkers(),this.progress=0,this.totalHashes=0,this.readyPromise=new Promise((e=>t=e)),this.readyCount=0,this.startCount=0,this.workers=new Array(4);const e=new Blob(['!function(){"use strict";const A="=".charCodeAt(0),I=new Uint8Array(256);for(let A=0;A<64;A++)I["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(A)]=A;function g(A){const I={},g=A.exports,C=g.memory,Q=g.__alloc,t=g.__retain,B=g.__rtti_base||-1;return I.__allocArray=(A,I)=>{const g=function(A){return new Uint32Array(C.buffer)[(B+4>>>2)+2*A]}(A),e=31-Math.clz32(g>>>6&31),o=I.length,i=Q(o<>>2]=t(i),n[r+4>>>2]=i,n[r+8>>>2]=o<>>e)+A]=t(I[A]);else s.set(I,i>>>e);return r},I.__getUint8Array=A=>{const I=new Uint32Array(C.buffer),g=I[A+4>>>2];return new Uint8Array(C.buffer,g,I[g-4>>>2]>>>0)},function(A,I={}){const g=A.__argumentsLength?I=>{A.__argumentsLength.value=I}:A.__setArgumentsLength||A.__setargc||(()=>({}));for(const C in A){if(!Object.prototype.hasOwnProperty.call(A,C))continue;const Q=A[C],t=C.split(".")[0];"function"==typeof Q&&Q!==g?(I[t]=(...A)=>(g(A.length),Q(...A))).original=Q:I[t]=Q}return I}(g,I)}class C{constructor(A){this.b=new Uint8Array(128),this.h=new Uint32Array(16),this.t=0,this.c=0,this.v=new Uint32Array(32),this.m=new Uint32Array(32),this.outlen=A}}function Q(A,I){return A[I]^A[I+1]<<8^A[I+2]<<16^A[I+3]<<24}function t(A,I,g,C,Q,t,B,e){const o=I[B],i=I[B+1],r=I[e],n=I[e+1];let E,s,w,a,c=A[g],D=A[g+1],f=A[C],h=A[C+1],y=A[Q],l=A[Q+1],u=A[t],N=A[t+1];E=c+f,s=(c&f|(c|f)&~E)>>>31,c=E,D=D+h+s,E=c+o,s=(c&o|(c|o)&~E)>>>31,c=E,D=D+i+s,w=u^c,a=N^D,u=a,N=w,E=y+u,s=(y&u|(y|u)&~E)>>>31,y=E,l=l+N+s,w=f^y,a=h^l,f=w>>>24^a<<8,h=a>>>24^w<<8,E=c+f,s=(c&f|(c|f)&~E)>>>31,c=E,D=D+h+s,E=c+r,s=(c&r|(c|r)&~E)>>>31,c=E,D=D+n+s,w=u^c,a=N^D,u=w>>>16^a<<16,N=a>>>16^w<<16,E=y+u,s=(y&u|(y|u)&~E)>>>31,y=E,l=l+N+s,w=f^y,a=h^l,f=a>>>31^w<<1,h=w>>>31^a<<1,A[g]=c,A[g+1]=D,A[C]=f,A[C+1]=h,A[Q]=y,A[Q+1]=l,A[t]=u,A[t+1]=N}const B=[4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225],e=[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,28,20,8,16,18,30,26,12,2,24,0,4,22,14,10,6,22,16,24,0,10,4,30,26,20,28,6,12,14,2,18,8,14,18,6,2,26,24,22,28,4,12,10,20,8,0,30,16,18,0,10,14,4,8,20,30,28,2,22,24,12,16,6,26,4,24,12,20,0,22,16,6,8,26,14,10,30,28,2,18,24,10,2,30,28,26,8,20,0,14,12,6,18,4,16,22,26,22,14,28,24,2,6,18,10,0,30,8,16,12,4,20,12,30,28,18,22,6,0,16,24,4,26,14,2,8,20,10,20,4,16,8,14,12,2,10,30,22,18,28,6,24,26,0,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,28,20,8,16,18,30,26,12,2,24,0,4,22,14,10,6];function o(A,I){const g=A.v,C=A.m;for(let I=0;I<16;I++)g[I]=A.h[I],g[I+16]=B[I];g[24]=g[24]^A.t,g[25]=g[25]^A.t/4294967296,I&&(g[28]=~g[28],g[29]=~g[29]);for(let I=0;I<32;I++)C[I]=Q(A.b,4*I);for(let A=0;A<12;A++)t(g,C,0,8,16,24,e[16*A+0],e[16*A+1]),t(g,C,2,10,18,26,e[16*A+2],e[16*A+3]),t(g,C,4,12,20,28,e[16*A+4],e[16*A+5]),t(g,C,6,14,22,30,e[16*A+6],e[16*A+7]),t(g,C,0,10,20,30,e[16*A+8],e[16*A+9]),t(g,C,2,12,22,24,e[16*A+10],e[16*A+11]),t(g,C,4,14,16,26,e[16*A+12],e[16*A+13]),t(g,C,6,8,18,28,e[16*A+14],e[16*A+15]);for(let I=0;I<16;I++)A.h[I]=A.h[I]^g[I]^g[I+16]}function i(A,I){for(let I=0;I<16;I++)A.h[I]=B[I];A.b.set(I),A.h[0]^=16842752^A.outlen}async function r(){return(A,I,g=4294967295)=>{const Q=function(A,I,g){if(128!=A.length)throw Error("Invalid input");const Q=A.buffer,t=new DataView(Q),B=new C(32);B.t=128;const e=t.getUint32(124,!0),r=e+g;for(let g=e;gE=A));self.onerror=A=>{self.postMessage({type:"error",message:JSON.stringify(A)})},self.onmessage=async C=>{const Q=C.data;try{if("solver"===Q.type){if(Q.forceJS){n=1;const A=await r();E(A)}else try{n=2;const C=WebAssembly.compile(function(g){let C=3285;g.charCodeAt(4379)===A&&C--,g.charCodeAt(4378)===A&&C--;const Q=new Uint8Array(C);for(let A=0,C=0;A<4380;A+=4){const t=I[g.charCodeAt(A+0)],B=I[g.charCodeAt(A+1)],e=I[g.charCodeAt(A+2)],o=I[g.charCodeAt(A+3)];Q[C++]=t<<2|B>>4,Q[C++]=(15&B)<<4|e>>2,Q[C++]=(3&e)<<6|63&o}return Q}("AGFzbQEAAAABKghgAABgAn9/AGADf39/AX9gAX8AYAR/f39/AGAAAX9gAX8Bf2ACf38BfwINAQNlbnYFYWJvcnQABAMMCwcGAwAAAQIFAQIABQMBAAEGFgR/AUEAC38BQQALfwBBAwt/AEHgDAsHbgkGbWVtb3J5AgAHX19hbGxvYwABCF9fcmV0YWluAAIJX19yZWxlYXNlAAMJX19jb2xsZWN0AAQHX19yZXNldAAFC19fcnR0aV9iYXNlAwMNVWludDhBcnJheV9JRAMCDHNvbHZlQmxha2UyYgAKCAELCvQSC5IBAQV/IABB8P///wNLBEAACyMBQRBqIgQgAEEPakFwcSICQRAgAkEQSxsiBmoiAj8AIgVBEHQiA0sEQCAFIAIgA2tB//8DakGAgHxxQRB2IgMgBSADShtAAEEASARAIANAAEEASARAAAsLCyACJAEgBEEQayICIAY2AgAgAkEBNgIEIAIgATYCCCACIAA2AgwgBAsEACAACwMAAQsDAAELBgAjACQBC7sCAQF/AkAgAUUNACAAQQA6AAAgACABakEEayICQQA6AAMgAUECTQ0AIABBADoAASAAQQA6AAIgAkEAOgACIAJBADoAASABQQZNDQAgAEEAOgADIAJBADoAACABQQhNDQAgAEEAIABrQQNxIgJqIgBBADYCACAAIAEgAmtBfHEiAmpBHGsiAUEANgIYIAJBCE0NACAAQQA2AgQgAEEANgIIIAFBADYCECABQQA2AhQgAkEYTQ0AIABBADYCDCAAQQA2AhAgAEEANgIUIABBADYCGCABQQA2AgA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YQB0AGkAYwBhAHIAcgBhAHkALgB0AHMAQeALCzMkAAAAAQAAAAEAAAAkAAAASQBuAGQAZQB4ACAAbwB1AHQAIABvAGYAIAByAGEAbgBnAGUAQaAMCzMkAAAAAQAAAAEAAAAkAAAAfgBsAGkAYgAvAHQAeQBwAGUAZABhAHIAcgBhAHkALgB0AHMAQeAMCy4GAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAYQAAAAIAAAAhAgAAAgAAACQC")),Q=await async function(A){const I=await async function(A){const I={env:{abort(){throw Error("Wasm aborted")}}};return{exports:g(await WebAssembly.instantiate(A,I))}}(A),C=I.exports.__retain(I.exports.__allocArray(I.exports.Uint8Array_ID,new Uint8Array(128)));let Q=I.exports.__getUint8Array(C);return(A,g,t=4294967295)=>{Q.set(A);const B=I.exports.solveBlake2b(C,g,t);Q=I.exports.__getUint8Array(C);const e=I.exports.__getUint8Array(B);return I.exports.__release(B),[Q,e]}}(await C);E(Q)}catch(A){console.log("FriendlyCaptcha failed to initialize WebAssembly, falling back to Javascript solver: "+A.toString()),n=1;const I=await r();E(I)}self.postMessage({type:"ready",solver:n})}else if("start"===Q.type){const A=await s;self.postMessage({type:"started"});let I,g=0;for(let C=0;C<256;C++){Q.puzzleSolverInput[123]=C;const[t,B]=A(Q.puzzleSolverInput,Q.threshold);if(0!==B.length){I=t;break}console.warn("FC: Internal error or no solution found"),g+=Math.pow(2,32)-1}g+=new DataView(I.slice(-4).buffer).getUint32(0,!0),self.postMessage({type:"done",solution:I.slice(-8),h:g,puzzleIndex:Q.puzzleIndex,puzzleNumber:Q.puzzleNumber})}}catch(A){setTimeout((()=>{throw A}))}}}();'],{type:"text/javascript"});for(let r=0;rthis.errorCallback(t),this.workers[r].onmessage=e=>{const i=e.data;if(i)if("ready"===i.type)this.readyCount++,this.solverType=i.solver,this.readyCount==this.workers.length&&(t(),this.readyCallback());else if("started"===i.type)this.startCount++,1==this.startCount&&(this.startTime=Date.now(),this.startedCallback());else if("done"===i.type){if(i.puzzleNumber!==this.puzzleNumber)return;if(this.puzzleIndex0,readyCallback:()=>0,doneCallback:()=>0,errorCallback:()=>0,sitekey:t.dataset.sitekey||"",language:t.dataset.lang||"en",solutionFieldName:t.dataset.solutionFieldName||"frc-captcha-solution",styleNonce:null},e),this.e=t,this.e.friendlyChallengeWidget=this,this.loadLanguage(),t.innerText=this.lang.text_init,this.opts.skipStyleInjection||function(t=null){if(!document.querySelector("#frc-style")){const e=document.createElement("style");e.id="frc-style",e.innerHTML=".frc-captcha *{margin:0;padding:0;border:0;text-align:initial;border-radius:0;filter:none!important;transition:none!important;font-weight:400;font-size:14px;line-height:1.2;text-decoration:none;background-color:initial;color:#222}.frc-captcha{position:relative;min-width:250px;max-width:312px;border:1px solid #f4f4f4;padding-bottom:12px;background-color:#fff}.frc-captcha b{font-weight:700}.frc-container{display:flex;align-items:center;min-height:52px}.frc-icon{fill:#222;stroke:#222;flex-shrink:0;margin:8px 8px 0}.frc-icon.frc-warning{fill:#c00}.frc-success .frc-icon{animation:1s ease-in both frc-fade-in}.frc-content{white-space:nowrap;display:flex;flex-direction:column;margin:4px 6px 0 0;overflow-x:auto;flex-grow:1}.frc-banner{position:absolute;bottom:0;right:6px;line-height:1}.frc-banner *{font-size:10px;opacity:.8;text-decoration:none}.frc-progress{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:3px 0;height:4px;border:none;background-color:#eee;color:#222;width:100%;transition:.5s linear}.frc-progress::-webkit-progress-bar{background:#eee}.frc-progress::-webkit-progress-value{background:#222}.frc-progress::-moz-progress-bar{background:#222}.frc-button{cursor:pointer;padding:2px 6px;background-color:#f1f1f1;border:1px solid transparent;text-align:center;font-weight:600;text-transform:none}.frc-button:focus{border:1px solid #333}.frc-button:hover{background-color:#ddd}.frc-captcha-solution{display:none}.frc-err-url{text-decoration:underline;font-size:.9em}.frc-rtl{direction:rtl}.frc-rtl .frc-content{margin:4px 0 0 6px}.frc-banner.frc-rtl{left:6px;right:auto}.dark.frc-captcha{color:#fff;background-color:#222;border-color:#333}.dark.frc-captcha *{color:#fff}.dark.frc-captcha button{background-color:#444}.dark .frc-icon{fill:#fff;stroke:#fff}.dark .frc-progress{background-color:#444}.dark .frc-progress::-webkit-progress-bar{background:#444}.dark .frc-progress::-webkit-progress-value{background:#ddd}.dark .frc-progress::-moz-progress-bar{background:#ddd}@keyframes frc-fade-in{from{opacity:0}to{opacity:1}}",t&&e.setAttribute("nonce",t),document.head.appendChild(e)}}(this.opts.styleNonce),this.init("auto"===this.opts.startMode||"auto"===this.e.dataset.start)}init(t){var e;if(this.hasBeenDestroyed)console.error("FriendlyCaptcha widget has been destroyed using destroy(), it can not be used anymore.");else if(this.initWorkerGroup(),t)this.start();else if("none"!==this.e.dataset.start&&("focus"===this.opts.startMode||"focus"===this.e.dataset.start)){const t=function(t){for(;"FORM"!==t.tagName;)if(!(t=t.parentElement))return null;return t}(this.e);t?(e=()=>this.start(),t.addEventListener("focusin",e,{once:!0,passive:!0})):console.log("FriendlyCaptcha div seems not to be contained in a form, autostart will not work")}}loadLanguage(t){if(void 0!==t?this.opts.language=t:this.e.dataset.lang&&(this.opts.language=this.e.dataset.lang),"string"==typeof this.opts.language){let t=this.opts.language.toLowerCase(),e=u[t];void 0===e&&"-"===t[2]&&(t=t.substring(0,2),e=u[t]),void 0===e&&(console.error('FriendlyCaptcha: language "'+this.opts.language+'" not found.'),e=u.en),this.lang=e}else this.lang=Object.assign(Object.assign({},u.en),this.opts.language)}makeButtonStart(){const t=this.e.querySelector("button");t&&(t.addEventListener("click",(t=>this.start()),{once:!0,passive:!0}),t.addEventListener("touchstart",(t=>this.start()),{once:!0,passive:!0}))}onWorkerError(t){this.hasBeenStarted=!1,this.needsReInit=!0,this.expiryTimeout&&clearTimeout(this.expiryTimeout),console.error("[FRC]",t),this.e.innerHTML=s(this.opts.solutionFieldName,this.lang,"Background worker error "+t.message),this.makeButtonStart(),this.opts.forceJSFallback=!0}initWorkerGroup(){this.workerGroup.progressCallback=t=>{!function(t,e){const r=t.querySelector(".frc-progress"),i=(e.i+1)/e.n;r&&(r.value=i,r.innerText=(100*i).toFixed(1)+"%",r.title=e.i+1+"/"+e.n+" ("+(e.h/e.t*.001).toFixed(0)+"K/s)")}(this.e,t)},this.workerGroup.readyCallback=()=>{var t;this.e.innerHTML=a(this.opts.solutionFieldName,(t=this.lang).rtl,'',!0,t.text_ready,".UNSTARTED",t.button_start,!1),this.makeButtonStart(),this.opts.readyCallback()},this.workerGroup.startedCallback=()=>{var t;this.e.innerHTML=a(this.opts.solutionFieldName,(t=this.lang).rtl,o,!0,t.text_solving,".UNFINISHED",void 0,!0),this.opts.startedCallback()},this.workerGroup.doneCallback=t=>{const e=this.handleDone(t);this.opts.doneCallback(e);const r=this.e.dataset.callback;r&&window[r](e)},this.workerGroup.errorCallback=t=>{this.onWorkerError(t)},this.workerGroup.init(),this.workerGroup.setupSolver(this.opts.forceJSFallback)}expire(){var t;this.hasBeenStarted=!1,!1!==this.e.isConnected&&(this.e.innerHTML=a(this.opts.solutionFieldName,(t=this.lang).rtl,n,!0,t.text_expired,".EXPIRED",t.button_restart),this.makeButtonStart())}async start(){if(this.hasBeenDestroyed)return void console.error("Can not start FriendlyCaptcha widget which has been destroyed");if(this.hasBeenStarted)return void console.warn("Can not start FriendlyCaptcha widget which has already been started");const t=this.opts.sitekey||this.e.dataset.sitekey;if(!t)return console.error("FriendlyCaptcha: sitekey not set on frc-captcha element"),void(this.e.innerHTML=s(this.opts.solutionFieldName,this.lang,"Website problem: sitekey not set",!1));if(-1===l.indexOf("headless")&&-1===A.appVersion.indexOf("Headless")&&-1===l.indexOf("bot")&&-1===l.indexOf("crawl")&&!0!==A.webdriver&&A.language&&(void 0===A.languages||A.languages.length)){if(this.needsReInit)return this.needsReInit=!1,void this.init(!0);this.hasBeenStarted=!0;try{this.e.innerHTML=a(this.opts.solutionFieldName,(i=this.lang).rtl,o,!0,i.text_fetching,".FETCHING",void 0,!0),this.puzzle=function(t){const i=t.split("."),o=i[1],n=function(t){const i=t.length;let o=3*i>>>2;t.charCodeAt(i-1)===e&&o--,t.charCodeAt(i-2)===e&&o--;const n=new Uint8Array(o);for(let e=0,o=0;e>4,n[o++]=(15&a)<<4|s>>2,n[o++]=(3&s)<<6|63&A}return n}(o);return{signature:i[0],base64:o,buffer:n,n:n[14],threshold:(a=n[15],a>255?a=255:a<0&&(a=0),Math.pow(2,(255.999-a)/8)>>>0),expiry:3e5*n[13]};var a}(await async function(t,e,r){const i=t.split(",");for(let t=0;t${i[t]}`);throw o.rawError=e,o}throw Error("Internal error")}(this.opts.puzzleEndpoint,t,this.lang)),this.expiryTimeout&&clearTimeout(this.expiryTimeout),this.expiryTimeout=setTimeout((()=>this.expire()),this.puzzle.expiry-3e4)}catch(t){console.error("[FRC]",t),this.hasBeenStarted=!1,this.expiryTimeout&&clearTimeout(this.expiryTimeout),this.e.innerHTML=s(this.opts.solutionFieldName,this.lang,t.message),this.makeButtonStart();const e="error_getting_puzzle";this.opts.errorCallback({code:e,description:t.toString(),error:t});const r=this.e.dataset["callback-error"];return void(r&&window[r](this))}var i;await this.workerGroup.start(this.puzzle)}else this.e.innerHTML=s(this.opts.solutionFieldName,this.lang,"Browser check failed, try a different browser",!1,!0)}handleDone(t){this.valid=!0;const e=`${this.puzzle.signature}.${this.puzzle.base64}.${i(t.solution)}.${i(t.diagnostics)}`;return this.e.innerHTML=function(t,e,r,i){const o=`${i.t.toFixed(0)}s (${(i.h/i.t*.001).toFixed(0)}K/s)${1===i.solver?" JS Fallback":""}`;return a(t,e.rtl,`${e.text_completed_sr}`,!1,e.text_completed,r,void 0,!1,o,"frc-success")}(this.opts.solutionFieldName,this.lang,e,t),this.needsReInit=!0,e}destroy(){this.workerGroup.terminateWorkers(),this.needsReInit=!1,this.hasBeenStarted=!1,this.expiryTimeout&&clearTimeout(this.expiryTimeout),this.e&&(this.e.remove(),delete this.e),this.hasBeenDestroyed=!0}reset(){this.hasBeenDestroyed?console.error("FriendlyCaptcha widget has been destroyed, it can not be used anymore"):(this.workerGroup.terminateWorkers(),this.needsReInit=!1,this.hasBeenStarted=!1,this.expiryTimeout&&clearTimeout(this.expiryTimeout),this.init("auto"===this.opts.startMode||"auto"===this.e.dataset.start))}}const{applyFilters:x}=JetPlugins.hooks,{addAction:f}=JetPlugins.hooks;f("jet.fb.observe.after","jet-form-builder/friendly.captcha",(function(t){var e;if(t.parent)return;const r=t.getInput("_captcha_token"),i=t.getSubmit().getFormId(),o=r?.nodes?.[0]?.nextElementSibling;let n=null!==(e=window?.JetFormBuilderCaptchaConfig?.[i])&&void 0!==e&&e;if(!o||!n)return;r.isVisible=()=>!0,n={...n,doneCallback(t){r.value.current=t,r.loading.end()},startedCallback:()=>r.loading.start(),errorCallback:()=>r.loading.end()},n=x("jet.fb.friendlyCaptcha.options",n,t);const a=new _(o,n);t.getSubmit().submitter?.status?.watch?.((()=>{a.reset(),r.onClear()}))}))})(); \ No newline at end of file diff --git a/modules/captcha/block-types/captcha-container.php b/modules/captcha/block-types/captcha-container.php index 9a21ddc9b..a031b559d 100644 --- a/modules/captcha/block-types/captcha-container.php +++ b/modules/captcha/block-types/captcha-container.php @@ -31,6 +31,16 @@ public function render_row_layout() { return false; } + /** + * Initialize style manager for the block + * + * @param Object $style_manager Actual style manager instance. + */ + public function maybe_init_style_manager( $style_manager ) { + // Captcha Field does not use style manager + return; + } + /** * Returns current block render instance * diff --git a/modules/components/assets/build/index.asset.php b/modules/components/assets/build/index.asset.php index 89836a9c9..81a8eb535 100644 --- a/modules/components/assets/build/index.asset.php +++ b/modules/components/assets/build/index.asset.php @@ -1 +1 @@ - array('react', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n'), 'version' => 'c86b66b25b0641232f69'); + array('react', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n'), 'version' => '7c9cdd7ffd33b1a9eb0f'); diff --git a/modules/components/assets/build/index.js b/modules/components/assets/build/index.js index 5a4a2c811..6cff1d7a9 100644 --- a/modules/components/assets/build/index.js +++ b/modules/components/assets/build/index.js @@ -1,2 +1,2 @@ /*! For license information please see index.js.LICENSE.txt */ -(()=>{var e={2:(e,t,n)=>{"use strict";n.r(t)},8:(e,t,n)=>{"use strict";n.r(t)},21:(e,t,n)=>{"use strict";n.r(t)},22:(e,t,n)=>{"use strict";n.r(t)},32:(e,t,n)=>{"use strict";n.r(t)},55:(e,t,n)=>{"use strict";n.r(t)},156:(e,t,n)=>{"use strict";n.r(t)},189:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t{"use strict";n.r(t)},250:(e,t,n)=>{"use strict";n.r(t)},337:(e,t,n)=>{"use strict";function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function r(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,o=new Array(t);nwt,Sortable:()=>Xe,Swap:()=>ct,default:()=>xt});var u=c(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),d=c(/Edge/i),p=c(/firefox/i),h=c(/safari/i)&&!c(/chrome/i)&&!c(/android/i),f=c(/iP(ad|od|hone)/i),m=c(/chrome/i)&&c(/android/i),g={capture:!1,passive:!1};function v(e,t,n){e.addEventListener(t,n,!u&&g)}function b(e,t,n){e.removeEventListener(t,n,!u&&g)}function y(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function w(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function E(e,t,n,o){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&y(e,t):y(e,t))||o&&e===n)return e;if(e===n)break}while(e=w(e))}return null}var S,x=/\s+/g;function D(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(x," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(x," ")}}function C(e,t,n){var o=e&&e.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in o||-1!==t.indexOf("webkit")||(t="-webkit-"+t),o[t]=n+("string"==typeof n?"":"px")}}function _(e,t){var n="";if("string"==typeof e)n=e;else do{var o=C(e,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function O(e,t,n){if(e){var o=e.getElementsByTagName(t),r=0,i=o.length;if(n)for(;r=i:r<=i))return o;if(o===I())break;o=R(o,!1)}return!1}function k(e,t,n,o){for(var r=0,i=0,a=e.children;i2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(n,K);U.pluginEvent.bind(Xe)(e,t,r({dragEl:J,parentEl:Z,ghostEl:Q,rootEl:ee,nextEl:te,lastDownEl:ne,cloneEl:oe,cloneHidden:re,dragStarted:ve,putSortable:ue,activeSortable:Xe.active,originalEvent:o,oldIndex:ie,oldDraggableIndex:le,newIndex:ae,newDraggableIndex:se,hideGhostForTarget:Fe,unhideGhostForTarget:Le,cloneNowHidden:function(){re=!0},cloneNowShown:function(){re=!1},dispatchSortableEvent:function(e){V({sortable:t,name:e,originalEvent:o})}},i))};function V(e){q(r({putSortable:ue,cloneEl:oe,targetEl:J,rootEl:ee,oldIndex:ie,oldDraggableIndex:le,newIndex:ae,newDraggableIndex:se},e))}var J,Z,Q,ee,te,ne,oe,re,ie,ae,le,se,ce,ue,de,pe,he,fe,me,ge,ve,be,ye,we,Ee,Se=!1,xe=!1,De=[],Ce=!1,_e=!1,Oe=[],Ie=!1,Te=[],Ae="undefined"!=typeof document,ke=f,Me=d||u?"cssFloat":"float",Pe=Ae&&!m&&!f&&"draggable"in document.createElement("div"),Ne=function(){if(Ae){if(u)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Re=function(e,t){var n=C(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=k(e,0,t),i=k(e,1,t),a=r&&C(r),l=i&&C(i),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+T(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+T(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!i||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return r&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[Me]||i&&"none"===n[Me]&&s+c>o)?"vertical":"horizontal"},je=function(e){function t(e,n){return function(o,r,i,a){var l=o.options.group.name&&r.options.group.name&&o.options.group.name===r.options.group.name;if(null==e&&(n||l))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(o,r,i,a),n)(o,r,i,a);var s=(n?o:r).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var n={},o=e.group;o&&"object"==i(o)||(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},Fe=function(){!Ne&&Q&&C(Q,"display","none")},Le=function(){!Ne&&Q&&C(Q,"display","")};Ae&&!m&&document.addEventListener("click",(function(e){if(xe)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),xe=!1,!1}),!0);var Be=function(e){if(J){e=e.touches?e.touches[0]:e;var t=(r=e.clientX,i=e.clientY,De.some((function(e){var t=e[$].options.emptyInsertThreshold;if(t&&!M(e)){var n=T(e),o=r>=n.left-t&&r<=n.right+t,l=i>=n.top-t&&i<=n.bottom+t;return o&&l?a=e:void 0}})),a);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[$]._onDragOver(n)}}var r,i,a},He=function(e){J&&J.parentNode[$]._isOutsideThisEl(e.target)};function Xe(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=l({},t),e[$]=this;var n,o,i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Re(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Xe.supportPointer&&"PointerEvent"in window&&(!h||f),emptyInsertThreshold:5};for(var a in U.initializePlugins(this,e,i),i)!(a in t)&&(t[a]=i[a]);for(var s in je(t),this)"_"===s.charAt(0)&&"function"==typeof this[s]&&(this[s]=this[s].bind(this));this.nativeDraggable=!t.forceFallback&&Pe,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?v(e,"pointerdown",this._onTapStart):(v(e,"mousedown",this._onTapStart),v(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(v(e,"dragover",this),v(e,"dragenter",this)),De.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),l(this,(o=[],{captureAnimationState:function(){o=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==C(e,"display")&&e!==Xe.ghost){o.push({target:e,rect:T(e)});var t=r({},o[o.length-1].rect);if(e.thisAnimationDuration){var n=_(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}}))},addAnimationState:function(e){o.push(e)},removeAnimationState:function(e){o.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var o in t)if(t.hasOwnProperty(o)&&t[o]===e[n][o])return Number(n);return-1}(o,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var r=!1,i=0;o.forEach((function(e){var n=0,o=e.target,a=o.fromRect,l=T(o),s=o.prevFromRect,c=o.prevToRect,u=e.rect,d=_(o,!0);d&&(l.top-=d.f,l.left-=d.e),o.toRect=l,o.thisAnimationDuration&&j(s,l)&&!j(a,l)&&(u.top-l.top)/(u.left-l.left)==(a.top-l.top)/(a.left-l.left)&&(n=function(e,t,n,o){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*o.animation}(u,s,c,t.options)),j(l,a)||(o.prevFromRect=a,o.prevToRect=l,n||(n=t.options.animation),t.animate(o,u,l,n)),n&&(r=!0,i=Math.max(i,n),clearTimeout(o.animationResetTimer),o.animationResetTimer=setTimeout((function(){o.animationTime=0,o.prevFromRect=null,o.fromRect=null,o.prevToRect=null,o.thisAnimationDuration=null}),n),o.thisAnimationDuration=n)})),clearTimeout(n),r?n=setTimeout((function(){"function"==typeof e&&e()}),i):"function"==typeof e&&e(),o=[]},animate:function(e,t,n,o){if(o){C(e,"transition",""),C(e,"transform","");var r=_(this.el),i=r&&r.a,a=r&&r.d,l=(t.left-n.left)/(i||1),s=(t.top-n.top)/(a||1);e.animatingX=!!l,e.animatingY=!!s,C(e,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),C(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),C(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){C(e,"transition",""),C(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),o)}}}))}function Ye(e,t,n,o,r,i,a,l){var s,c,p=e[$],h=p.options.onMove;return!window.CustomEvent||u||d?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=n,s.draggedRect=o,s.related=r||t,s.relatedRect=i||T(t),s.willInsertAfter=l,s.originalEvent=a,e.dispatchEvent(s),h&&(c=h.call(p,s,a)),c}function $e(e){e.draggable=!1}function ze(){Ie=!1}function We(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,o=0;n--;)o+=t.charCodeAt(n);return o.toString(36)}function Ue(e){return setTimeout(e,0)}function qe(e){return clearTimeout(e)}Xe.prototype={constructor:Xe,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(be=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,J):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,r=o.preventOnFilter,i=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=o.filter;if(function(e){Te.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var o=t[n];o.checked&&Te.push(o)}}(n),!J&&!(/mousedown|pointerdown/.test(i)&&0!==e.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!h||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=E(l,o.draggable,n,!1))&&l.animated||ne===l)){if(ie=P(l),le=P(l,o.draggable),"function"==typeof c){if(c.call(this,e,l,this))return V({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),G("filter",t,{evt:e}),void(r&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=E(s,o.trim(),n,!1))return V({sortable:t,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),G("filter",t,{evt:e}),!0}))))return void(r&&e.preventDefault());o.handle&&!E(s,o.handle,n,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(e,t,n){var o,r=this,i=r.el,a=r.options,l=i.ownerDocument;if(n&&!J&&n.parentNode===i){var s=T(n);if(ee=i,Z=(J=n).parentNode,te=J.nextSibling,ne=n,ce=a.group,Xe.dragged=J,de={target:J,clientX:(t||e).clientX,clientY:(t||e).clientY},me=de.clientX-s.left,ge=de.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,J.style["will-change"]="all",o=function(){G("delayEnded",r,{evt:e}),Xe.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!p&&r.nativeDraggable&&(J.draggable=!0),r._triggerDragStart(e,t),V({sortable:r,name:"choose",originalEvent:e}),D(J,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){O(J,e.trim(),$e)})),v(l,"dragover",Be),v(l,"mousemove",Be),v(l,"touchmove",Be),a.supportPointer?(v(l,"pointerup",r._onDrop),!this.nativeDraggable&&v(l,"pointercancel",r._onDrop)):(v(l,"mouseup",r._onDrop),v(l,"touchend",r._onDrop),v(l,"touchcancel",r._onDrop)),p&&this.nativeDraggable&&(this.options.touchStartThreshold=4,J.draggable=!0),G("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(d||u))o();else{if(Xe.eventCanceled)return void this._onDrop();a.supportPointer?(v(l,"pointerup",r._disableDelayedDrag),v(l,"pointercancel",r._disableDelayedDrag)):(v(l,"mouseup",r._disableDelayedDrag),v(l,"touchend",r._disableDelayedDrag),v(l,"touchcancel",r._disableDelayedDrag)),v(l,"mousemove",r._delayedDragTouchMoveHandler),v(l,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&v(l,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){J&&$e(J),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;b(e,"mouseup",this._disableDelayedDrag),b(e,"touchend",this._disableDelayedDrag),b(e,"touchcancel",this._disableDelayedDrag),b(e,"pointerup",this._disableDelayedDrag),b(e,"pointercancel",this._disableDelayedDrag),b(e,"mousemove",this._delayedDragTouchMoveHandler),b(e,"touchmove",this._delayedDragTouchMoveHandler),b(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?v(document,"pointermove",this._onTouchMove):v(document,t?"touchmove":"mousemove",this._onTouchMove):(v(J,"dragend",this),v(ee,"dragstart",this._onDragStart));try{document.selection?Ue((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(Se=!1,ee&&J){G("dragStarted",this,{evt:t}),this.nativeDraggable&&v(document,"dragover",He);var n=this.options;!e&&D(J,n.dragClass,!1),D(J,n.ghostClass,!0),Xe.active=this,e&&this._appendGhost(),V({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(pe){this._lastX=pe.clientX,this._lastY=pe.clientY,Fe();for(var e=document.elementFromPoint(pe.clientX,pe.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(pe.clientX,pe.clientY))!==t;)t=e;if(J.parentNode[$]._isOutsideThisEl(e),t)do{if(t[$]&&t[$]._onDragOver({clientX:pe.clientX,clientY:pe.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=w(t));Le()}},_onTouchMove:function(e){if(de){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,r=e.touches?e.touches[0]:e,i=Q&&_(Q,!0),a=Q&&i&&i.a,l=Q&&i&&i.d,s=ke&&Ee&&N(Ee),c=(r.clientX-de.clientX+o.x)/(a||1)+(s?s[0]-Oe[0]:0)/(a||1),u=(r.clientY-de.clientY+o.y)/(l||1)+(s?s[1]-Oe[1]:0)/(l||1);if(!Xe.active&&!Se){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))r.right+10||e.clientY>o.bottom&&e.clientX>o.left:e.clientY>r.bottom+10||e.clientX>o.right&&e.clientY>o.top}(e,i,this)&&!g.animated){if(g===J)return X(!1);if(g&&a===e.target&&(l=g),l&&(n=T(l)),!1!==Ye(ee,a,J,t,l,n,e,!!l))return H(),g&&g.nextSibling?a.insertBefore(J,g.nextSibling):a.appendChild(J),Z=a,z(),X(!0)}else if(g&&function(e,t,n){var o=T(k(n.el,0,n.options,!0)),r=Y(n.el,n.options,Q);return t?e.clientXu+c*i/2:sd-we)return-ye}else if(s>u+c*(1-r)/2&&sd-c*i/2)?s>u+c/2?1:-1:0}(e,l,n,i,x?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,_e,be===l),0!==b){var N=P(J);do{N-=b,w=Z.children[N]}while(w&&("none"===C(w,"display")||w===Q))}if(0===b||w===l)return X(!1);be=l,ye=b;var R=l.nextElementSibling,j=!1,F=Ye(ee,a,J,t,l,n,e,j=1===b);if(!1!==F)return 1!==F&&-1!==F||(j=1===F),Ie=!0,setTimeout(ze,30),H(),j&&!R?a.appendChild(J):l.parentNode.insertBefore(J,j?R:l),O&&L(O,0,I-O.scrollTop),Z=J.parentNode,void 0===y||_e||(we=Math.abs(y-T(l)[_])),z(),X(!0)}if(a.contains(J))return X(!1)}return!1}function B(s,c){G(s,f,r({evt:e,isOwner:d,axis:i?"vertical":"horizontal",revert:o,dragRect:t,targetRect:n,canSort:p,fromSortable:h,target:l,completed:X,onMove:function(n,o){return Ye(ee,a,J,t,n,T(n),e,o)},changed:z},c))}function H(){B("dragOverAnimationCapture"),f.captureAnimationState(),f!==h&&h.captureAnimationState()}function X(t){return B("dragOverCompleted",{insertion:t}),t&&(d?u._hideClone():u._showClone(f),f!==h&&(D(J,ue?ue.options.ghostClass:u.options.ghostClass,!1),D(J,s.ghostClass,!0)),ue!==f&&f!==Xe.active?ue=f:f===Xe.active&&ue&&(ue=null),h===f&&(f._ignoreWhileAnimating=l),f.animateAll((function(){B("dragOverAnimationComplete"),f._ignoreWhileAnimating=null})),f!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(l===J&&!J.animated||l===a&&!l.animated)&&(be=null),s.dragoverBubble||e.rootEl||l===document||(J.parentNode[$]._isOutsideThisEl(e.target),!t&&Be(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function z(){ae=P(J),se=P(J,s.draggable),V({sortable:f,name:"change",toEl:a,newIndex:ae,newDraggableIndex:se,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){b(document,"mousemove",this._onTouchMove),b(document,"touchmove",this._onTouchMove),b(document,"pointermove",this._onTouchMove),b(document,"dragover",Be),b(document,"mousemove",Be),b(document,"touchmove",Be)},_offUpEvents:function(){var e=this.el.ownerDocument;b(e,"mouseup",this._onDrop),b(e,"touchend",this._onDrop),b(e,"pointerup",this._onDrop),b(e,"pointercancel",this._onDrop),b(e,"touchcancel",this._onDrop),b(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;ae=P(J),se=P(J,n.draggable),G("drop",this,{evt:e}),Z=J&&J.parentNode,ae=P(J),se=P(J,n.draggable),Xe.eventCanceled||(Se=!1,_e=!1,Ce=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),qe(this.cloneId),qe(this._dragStartId),this.nativeDraggable&&(b(document,"drop",this),b(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),h&&C(document.body,"user-select",""),C(J,"transform",""),e&&(ve&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Q&&Q.parentNode&&Q.parentNode.removeChild(Q),(ee===Z||ue&&"clone"!==ue.lastPutMode)&&oe&&oe.parentNode&&oe.parentNode.removeChild(oe),J&&(this.nativeDraggable&&b(J,"dragend",this),$e(J),J.style["will-change"]="",ve&&!Se&&D(J,ue?ue.options.ghostClass:this.options.ghostClass,!1),D(J,this.options.chosenClass,!1),V({sortable:this,name:"unchoose",toEl:Z,newIndex:null,newDraggableIndex:null,originalEvent:e}),ee!==Z?(ae>=0&&(V({rootEl:Z,name:"add",toEl:Z,fromEl:ee,originalEvent:e}),V({sortable:this,name:"remove",toEl:Z,originalEvent:e}),V({rootEl:Z,name:"sort",toEl:Z,fromEl:ee,originalEvent:e}),V({sortable:this,name:"sort",toEl:Z,originalEvent:e})),ue&&ue.save()):ae!==ie&&ae>=0&&(V({sortable:this,name:"update",toEl:Z,originalEvent:e}),V({sortable:this,name:"sort",toEl:Z,originalEvent:e})),Xe.active&&(null!=ae&&-1!==ae||(ae=ie,se=le),V({sortable:this,name:"end",toEl:Z,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){G("nulling",this),ee=J=Z=Q=te=oe=ne=re=de=pe=ve=ae=se=ie=le=be=ye=ue=ce=Xe.dragged=Xe.ghost=Xe.clone=Xe.active=null,Te.forEach((function(e){e.checked=!0})),Te.length=he=fe=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":J&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,o=0,r=n.length,i=this.options;o1&&(mt.forEach((function(e){o.addAnimationState({target:e,rect:bt?T(e):r}),X(e),e.fromRect=r,t.removeAnimationState(e)})),bt=!1,function(e,t){mt.forEach((function(n,o){var r=t.children[n.sortableIndex+(e?Number(o):0)];r?t.insertBefore(n,r):t.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,o=e.insertion,r=e.activeSortable,i=e.parentEl,a=e.putSortable,l=this.options;if(o){if(n&&r._hideClone(),vt=!1,l.animation&&mt.length>1&&(bt||!n&&!r.options.sort&&!a)){var s=T(pt,!1,!0,!0);mt.forEach((function(e){e!==pt&&(H(e,s),i.appendChild(e))})),bt=!0}if(!n)if(bt||St(),mt.length>1){var c=ft;r._showClone(t),r.options.animation&&!ft&&c&>.forEach((function(e){r.addAnimationState({target:e,rect:ht}),e.fromRect=ht,e.thisAnimationDuration=null}))}else r._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,o=e.activeSortable;if(mt.forEach((function(e){e.thisAnimationDuration=null})),o.options.animation&&!n&&o.multiDrag.isMultiDrag){ht=l({},t);var r=_(pt,!0);ht.top-=r.f,ht.left-=r.e}},dragOverAnimationComplete:function(){bt&&(bt=!1,St())},drop:function(e){var t=e.originalEvent,n=e.rootEl,o=e.parentEl,r=e.sortable,i=e.dispatchSortableEvent,a=e.oldIndex,l=e.putSortable,s=l||this.sortable;if(t){var c=this.options,u=o.children;if(!yt)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),D(pt,c.selectedClass,!~mt.indexOf(pt)),~mt.indexOf(pt))mt.splice(mt.indexOf(pt),1),ut=null,q({sortable:r,rootEl:n,name:"deselect",targetEl:pt,originalEvent:t});else{if(mt.push(pt),q({sortable:r,rootEl:n,name:"select",targetEl:pt,originalEvent:t}),t.shiftKey&&ut&&r.el.contains(ut)){var d=P(ut),p=P(pt);~d&&~p&&d!==p&&function(){var e,i;p>d?(i=d,e=p):(i=p,e=d+1);for(var a=c.filter;i1){var h=T(pt),f=P(pt,":not(."+this.options.selectedClass+")");if(!vt&&c.animation&&(pt.thisAnimationDuration=null),s.captureAnimationState(),!vt&&(c.animation&&(pt.fromRect=h,mt.forEach((function(e){if(e.thisAnimationDuration=null,e!==pt){var t=bt?T(e):h;e.fromRect=t,s.addAnimationState({target:e,rect:t})}}))),St(),mt.forEach((function(e){u[f]?o.insertBefore(e,u[f]):o.appendChild(e),f++})),a===P(pt))){var m=!1;mt.forEach((function(e){e.sortableIndex===P(e)||(m=!0)})),m&&(i("update"),i("sort"))}mt.forEach((function(e){X(e)})),s.animateAll()}dt=s}(n===o||l&&"clone"!==l.lastPutMode)&>.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=yt=!1,gt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),b(document,"pointerup",this._deselectMultiDrag),b(document,"mouseup",this._deselectMultiDrag),b(document,"touchend",this._deselectMultiDrag),b(document,"keydown",this._checkKeyDown),b(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==yt&&yt||dt!==this.sortable||e&&E(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;mt.length;){var t=mt[0];D(t,this.options.selectedClass,!1),mt.shift(),q({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvent:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},l(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[$];t&&t.options.multiDrag&&!~mt.indexOf(e)&&(dt&&dt!==t&&(dt.multiDrag._deselectMultiDrag(),dt=t),D(e,t.options.selectedClass,!0),mt.push(e))},deselect:function(e){var t=e.parentNode[$],n=mt.indexOf(e);t&&t.options.multiDrag&&~n&&(D(e,t.options.selectedClass,!1),mt.splice(n,1))}},eventProperties:function(){var e,t=this,n=[],o=[];return mt.forEach((function(e){var r;n.push({multiDragElement:e,index:e.sortableIndex}),r=bt&&e!==pt?-1:bt?P(e,":not(."+t.options.selectedClass+")"):P(e),o.push({multiDragElement:e,index:r})})),{items:(e=mt,function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(gt),oldIndicies:n,newIndicies:o}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function Et(e,t){gt.forEach((function(n,o){var r=t.children[n.sortableIndex+(e?Number(o):0)];r?t.insertBefore(n,r):t.appendChild(n)}))}function St(){mt.forEach((function(e){e!==pt&&e.parentNode&&e.parentNode.removeChild(e)}))}Xe.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):this.options.supportPointer?v(document,"pointermove",this._handleFallbackAutoScroll):t.touches?v(document,"touchmove",this._handleFallbackAutoScroll):v(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):(b(document,"pointermove",this._handleFallbackAutoScroll),b(document,"touchmove",this._handleFallbackAutoScroll),b(document,"mousemove",this._handleFallbackAutoScroll)),ot(),nt(),clearTimeout(S),S=void 0},nulling:function(){Ze=Ge=Ke=tt=Qe=Ve=Je=null,et.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,o=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,i=document.elementFromPoint(o,r);if(Ze=e,t||this.options.forceAutoScrollFallback||d||u||h){it(e,this.options,i,t);var a=R(i,!0);!tt||Qe&&o===Ve&&r===Je||(Qe&&ot(),Qe=setInterval((function(){var i=R(document.elementFromPoint(o,r),!0);i!==a&&(a=i,nt()),it(e,n.options,i,t)}),10),Ve=o,Je=r)}else{if(!this.options.bubbleScroll||R(i,!0)===I())return void nt();it(e,this.options,R(i,!1),!1)}}},l(e,{pluginName:"scroll",initializeByDefault:!0})}),Xe.mount(st,lt);const xt=Xe},379:(e,t,n)=>{"use strict";n.r(t)},404:(e,t,n)=>{"use strict";n.r(t)},471:(e,t,n)=>{"use strict";n.r(t)},582:(e,t,n)=>{"use strict";n.r(t)},609:e=>{"use strict";e.exports=window.React},627:(e,t,n)=>{"use strict";n.r(t)},676:(e,t,n)=>{"use strict";n.r(t)},722:(e,t,n)=>{"use strict";n.r(t)},791:(e,t,n)=>{"use strict";n.r(t)},804:(e,t,n)=>{"use strict";n.r(t)},843:(e,t,n)=>{"use strict";n.r(t)},872:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var o=!0,r="Invariant failed";function i(e,t){if(!e){if(o)throw new Error(r);var n="function"==typeof t?t():t;throw new Error(n?r+": "+n:r)}}},884:(e,t,n)=>{"use strict";n.r(t)},885:(e,t,n)=>{"use strict";n.r(t)},971:(e,t,n)=>{"use strict";n.r(t)},980:(e,t,n)=>{"use strict";n.r(t)},998:(e,t,n)=>{var o=n(337),r=n(189),i=n(609),a=n(872);function l(e){return e&&e.__esModule?e.default:e}function s(e,t,n,o){Object.defineProperty(e,t,{get:n,set:o,enumerable:!0,configurable:!0})}function c(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function u(e){e.forEach((e=>c(e.element)))}function d(e){e.forEach((e=>{!function(e,t,n){const o=e.children[n]||null;e.insertBefore(t,o)}(e.parentElement,e.element,e.oldIndex)}))}function p(e,t){const n=m(e),o={parentElement:e.from};let r=[];switch(n){case"normal":r=[{element:e.item,newIndex:e.newIndex,oldIndex:e.oldIndex,parentElement:e.from}];break;case"swap":r=[{element:e.item,oldIndex:e.oldIndex,newIndex:e.newIndex,...o},{element:e.swapItem,oldIndex:e.newIndex,newIndex:e.oldIndex,...o}];break;case"multidrag":r=e.oldIndicies.map(((t,n)=>({element:t.multiDragElement,oldIndex:t.index,newIndex:e.newIndicies[n].index,...o})))}const i=function(e,t){return e.map((e=>({...e,item:t[e.oldIndex]}))).sort(((e,t)=>e.oldIndex-t.oldIndex))}(r,t);return i}function h(e,t){const n=[...t];return e.concat().reverse().forEach((e=>n.splice(e.oldIndex,1))),n}function f(e,t,n,o){const r=[...t];return e.forEach((e=>{const t=o&&n&&o(e.item,n);r.splice(e.newIndex,0,t||e.item)})),r}function m(e){return e.oldIndicies&&e.oldIndicies.length>0?"multidrag":e.swapItem?"swap":"normal"}s(e.exports,"Sortable",(()=>$882b6d93070905b3$re_export$Sortable)),s(e.exports,"Direction",(()=>$882b6d93070905b3$re_export$Direction)),s(e.exports,"DOMRect",(()=>$882b6d93070905b3$re_export$DOMRect)),s(e.exports,"GroupOptions",(()=>$882b6d93070905b3$re_export$GroupOptions)),s(e.exports,"MoveEvent",(()=>$882b6d93070905b3$re_export$MoveEvent)),s(e.exports,"Options",(()=>$882b6d93070905b3$re_export$Options)),s(e.exports,"PullResult",(()=>$882b6d93070905b3$re_export$PullResult)),s(e.exports,"PutResult",(()=>$882b6d93070905b3$re_export$PutResult)),s(e.exports,"SortableEvent",(()=>$882b6d93070905b3$re_export$SortableEvent)),s(e.exports,"SortableOptions",(()=>$882b6d93070905b3$re_export$SortableOptions)),s(e.exports,"Utils",(()=>$882b6d93070905b3$re_export$Utils)),s(e.exports,"ReactSortable",(()=>v));const g={dragging:null};class v extends i.Component{static defaultProps={clone:e=>e};constructor(e){super(e),this.ref=(0,i.createRef)();const t=[...e.list].map((e=>Object.assign(e,{chosen:!1,selected:!1})));e.setList(t,this.sortable,g),l(a)(!e.plugins,'\nPlugins prop is no longer supported.\nInstead, mount it with "Sortable.mount(new MultiDrag())"\nPlease read the updated README.md at https://github.com/SortableJS/react-sortablejs.\n ')}componentDidMount(){if(null===this.ref.current)return;const e=this.makeOptions();l(o).create(this.ref.current,e)}componentDidUpdate(e){e.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){const{tag:e,style:t,className:n,id:o}=this.props,r={style:t,className:n,id:o},a=e&&null!==e?e:"div";return(0,i.createElement)(a,{ref:this.ref,...r},this.getChildren())}getChildren(){const{children:e,dataIdAttr:t,selectedClass:n="sortable-selected",chosenClass:o="sortable-chosen",dragClass:a="sortable-drag",fallbackClass:s="sortable-falback",ghostClass:c="sortable-ghost",swapClass:u="sortable-swap-highlight",filter:d="sortable-filter",list:p}=this.props;if(!e||null==e)return null;const h=t||"data-id";return i.Children.map(e,((e,t)=>{if(void 0===e)return;const a=p[t]||{},{className:s}=e.props,c="string"==typeof d&&{[d.replace(".","")]:!!a.filtered},u=l(r)(s,{[n]:a.selected,[o]:a.chosen,...c});return(0,i.cloneElement)(e,{[h]:e.key,className:u})}))}get sortable(){const e=this.ref.current;if(null===e)return null;const t=Object.keys(e).find((e=>e.includes("Sortable")));return t?e[t]:null}makeOptions(){const e=function(e){const{list:t,setList:n,children:o,tag:r,style:i,className:a,clone:l,onAdd:s,onChange:c,onChoose:u,onClone:d,onEnd:p,onFilter:h,onRemove:f,onSort:m,onStart:g,onUnchoose:v,onUpdate:b,onMove:y,onSpill:w,onSelect:E,onDeselect:S,...x}=e;return x}(this.props);return["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"].forEach((t=>e[t]=this.prepareOnHandlerPropAndDOM(t))),["onChange","onClone","onFilter","onSort"].forEach((t=>e[t]=this.prepareOnHandlerProp(t))),{...e,onMove:(e,t)=>{const{onMove:n}=this.props,o=e.willInsertAfter||-1;if(!n)return o;const r=n(e,t,this.sortable,g);return void 0!==r&&r}}}prepareOnHandlerPropAndDOM(e){return t=>{this.callOnHandlerProp(t,e),this[e](t)}}prepareOnHandlerProp(e){return t=>{this.callOnHandlerProp(t,e)}}callOnHandlerProp(e,t){const n=this.props[t];n&&n(e,this.sortable,g)}onAdd(e){const{list:t,setList:n,clone:o}=this.props,r=p(e,[...g.dragging.props.list]);u(r),n(f(r,t,e,o).map((e=>Object.assign(e,{selected:!1}))),this.sortable,g)}onRemove(e){const{list:t,setList:n}=this.props,o=m(e),r=p(e,t);d(r);let i=[...t];if("clone"!==e.pullMode)i=h(r,i);else{let t=r;switch(o){case"multidrag":t=r.map(((t,n)=>({...t,element:e.clones[n]})));break;case"normal":t=r.map((t=>({...t,element:e.clone})));break;default:l(a)(!0,`mode "${o}" cannot clone. Please remove "props.clone" from when using the "${o}" plugin`)}u(t),r.forEach((t=>{const n=t.oldIndex,o=this.props.clone(t.item,e);i.splice(n,1,o)}))}i=i.map((e=>Object.assign(e,{selected:!1}))),n(i,this.sortable,g)}onUpdate(e){const{list:t,setList:n}=this.props,o=p(e,t);return u(o),d(o),n(function(e,t){return f(e,h(e,t))}(o,t),this.sortable,g)}onStart(){g.dragging=this}onEnd(){g.dragging=null}onChoose(e){const{list:t,setList:n}=this.props;n(t.map(((t,n)=>{let o=t;return n===e.oldIndex&&(o=Object.assign(t,{chosen:!0})),o})),this.sortable,g)}onUnchoose(e){const{list:t,setList:n}=this.props;n(t.map(((t,n)=>{let o=t;return n===e.oldIndex&&(o=Object.assign(o,{chosen:!1})),o})),this.sortable,g)}onSpill(e){const{removeOnSpill:t,revertOnSpill:n}=this.props;t&&!n&&c(e.item)}onSelect(e){const{list:t,setList:n}=this.props,o=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((t=>{const n=t.index;if(-1===n)return console.log(`"${e.type}" had indice of "${t.index}", which is probably -1 and doesn't usually happen here.`),void console.log(e);o[n].selected=!0})),n(o,this.sortable,g)}onDeselect(e){const{list:t,setList:n}=this.props,o=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((e=>{const t=e.index;-1!==t&&(o[t].selected=!0)})),n(o,this.sortable,g)}}var b,y;b=e.exports,y={},Object.keys(y).forEach((function(e){"default"===e||"__esModule"===e||b.hasOwnProperty(e)||Object.defineProperty(b,e,{enumerable:!0,get:function(){return y[e]}})}))}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";function e(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.r(o),n.d(o,{ClearBaseControlStyle:()=>b,ControlWithErrorStyle:()=>S,FormLabeledTokenField:()=>X,Help:()=>m,IconText:()=>O,Label:()=>c,LabelWithActions:()=>f,ModalFooterStyle:()=>B,PopoverStandard:()=>W,RequiredLabel:()=>u,ResponsiveModal:()=>v,RowControl:()=>E,RowControlEnd:()=>T,RowControlEndStyle:()=>x,RowControlStart:()=>A,RowControlStartStyle:()=>d,Sortable:()=>g,StickyModalActions:()=>L,StyledButtonControl:()=>j,StyledCardBodyControl:()=>R,StyledComboboxControl:()=>N,StyledFlexControl:()=>M,StyledFormTokenFieldControl:()=>F,StyledSelectControl:()=>k,StyledTextControl:()=>P,TableListStyle:()=>Y,WideLine:()=>H,useTriggerPopover:()=>z});var t=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,r=e((function(e){return t.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),i=n(609),a=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),t={},n=[];e.forEach((e=>{(e?e.split(" "):[]).forEach((e=>{if(e.startsWith("atm_")){const[,n]=e.split("_");t[n]=e}else n.push(e)}))}));const o=[];for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.push(t[e]);return o.push(...n),o.join(" ")},l=(e,t)=>{const n={};return Object.keys(e).filter((e=>t=>-1===e.indexOf(t))(t)).forEach((t=>{n[t]=e[t]})),n},s=function(e){let t="";return n=>{const o=(o,s)=>{const{as:c=e,class:u=t}=o;var d;const p=function(e,t){const n=l(t,["as","class"]);if(!e){const e="function"==typeof r?{default:r}:r;Object.keys(n).forEach((t=>{e.default(t)||delete n[t]}))}return n}(void 0===n.propsAsIs?!("string"==typeof c&&-1===c.indexOf("-")&&(d=c[0],d.toUpperCase()!==d)):n.propsAsIs,o);p.ref=s,p.className=n.atomic?a(n.class,p.className||u):a(p.className||u,n.class);const{vars:h}=n;if(h){const e={};for(const t in h){const r=h[t],i=r[0],a=r[1]||"",l="function"==typeof i?i(o):i;n.name,e[`--${t}`]=`${l}${a}`}const t=p.style||{},r=Object.keys(t);r.length>0&&r.forEach((n=>{e[n]=t[n]})),p.style=e}return e.__wyw_meta&&e!==c?(p.as=c,i.createElement(e,p)):i.createElement(c,p)},s=i.forwardRef?i.forwardRef(o):e=>{const t=l(e,["innerRef"]);return o(t,e.innerRef)};return s.displayName=n.name,s.__wyw_meta={className:n.class||t,extends:e},s}};const c=s("label")({name:"Label",class:"lnj4cxf",propsAsIs:!1});n(250);const u=s(c)({name:"RequiredLabel",class:"rta9zu",propsAsIs:!0,vars:{"rta9zu-0":[({size:e=1.5})=>e+"em"]}});n(627);const d="r8cg2q0";n(471);const p=window.wp.components;function h({children:e,className:t,...n}){return(0,i.createElement)(p.Flex,{justify:"flex-start",className:a(d,t),...n},e)}const f=s(h)({name:"LabelWithActions",class:"lm6imcb",propsAsIs:!0});n(21);const m=s("p")({name:"Help",class:"h1u00eq1",propsAsIs:!1});n(2);const g=n(998).ReactSortable,v=s(p.Modal)({name:"ResponsiveModal",class:"rnqs1ii",propsAsIs:!0});n(582);const b="cswoqso";n(379);const y=window.wp.compose,w=window.wp.element,E=s((0,w.forwardRef)((function e({children:t,className:n,createId:o=!0,controlSize:r=3,...a},l){const s=(0,y.useInstanceId)(e,"jfb-control",o?"":"1");return(0,i.createElement)(p.Flex,{ref:l,className:[n,b].join(" "),gap:2,align:"flex-start",...a},"function"==typeof t?t({id:s}):t)})))({name:"RowControl",class:"rv9blu0",propsAsIs:!0,vars:{"rv9blu0-0":[({controlSize:e=3})=>e]}});n(722);const S="cuape64";n(55);const x="rxii470";n(980);const D=(0,w.forwardRef)((function({icon:e,size:t=24,...n},o){return(0,w.cloneElement)(e,{width:t,height:t,...n,ref:o})})),C=s(p.Flex)({name:"StyledFlex",class:"s82flgq",propsAsIs:!0}),_=(0,i.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none"},(0,i.createElement)("path",{d:"M12 16.99V17M12 7V14M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),O=function({children:e,icon:t,...n}){return(0,i.createElement)(C,{justify:"flex-start",...n},(0,i.createElement)(D,{size:24,icon:null!=t?t:_}),e)};n(885);const I=window.wp.i18n,T=function({children:e,hasError:t=!1,showDefaultNotice:n=!0,errorText:o="",className:r,...l}){const s=(0,I.__)("Please fill this required field","jet-form-builder");let c="";return o.length&&(c=(0,I.__)(o,"jet-form-builder")),(0,i.createElement)(p.Flex,{className:a(x,t&&S,r),direction:"column",...l},t&&n&&(0,i.createElement)(O,null,c.length?c:s),e)},A=function({className:e,...t}){return(0,i.createElement)("div",{className:a(e,d),...t})},k=s(p.SelectControl)({name:"StyledSelectControl",class:"s1c2yukw",propsAsIs:!0});n(791);const M=s(p.Flex)({name:"StyledFlexControl",class:"smynwlj",propsAsIs:!0});n(32);const P=s(p.TextControl)({name:"StyledTextControl",class:"sanpaay",propsAsIs:!0});n(676);const N=s(p.ComboboxControl)({name:"StyledComboboxControl",class:"s1ucdx31",propsAsIs:!0});n(804);const R=s(p.CardBody)({name:"StyledCardBodyControl",class:"s11rga5u",propsAsIs:!0});n(209);const j=s(p.Button)({name:"StyledButtonControl",class:"s1slln9b",propsAsIs:!0});n(971);const F=s(p.FormTokenField)({name:"StyledFormTokenFieldControl",class:"s1c0necn",propsAsIs:!0});n(22),n(843);const L=function({className:e="",...t}){return(0,i.createElement)(p.Flex,{justify:"flex-start",className:("sh0lqos "+e).trim(),...t})},B="madeb2s";n(884);const H=s("hr")({name:"WideLine",class:"w1m59y8q",propsAsIs:!1});n(156);const X=function({suggestions:e=[],value:t=[],valueProp:n="value",labelProp:o="label",__experimentalValidateInput:r=e=>!0,...a}){const[l,s]=(0,w.useMemo)((()=>{const t={},r={};for(const l of e){var i,a;const e=null!==(i=l[n])&&void 0!==i?i:"",s=null!==(a=l[o])&&void 0!==a?a:"";t[e]=s,r[s]=e}return[t,r]}),[]),c=(0,w.useMemo)((()=>e.map((e=>e[o]||"")).filter((e=>e&&!t.includes(s[e])))),[t]);return(0,i.createElement)(F,{displayTransform:e=>{var t;return null!==(t=l[e])&&void 0!==t?t:e},saveTransform:e=>{var t;return null!==(t=s[e])&&void 0!==t?t:e},suggestions:c,value:t,__experimentalValidateInput:e=>{var t;return r(null!==(t=s[e])&&void 0!==t?t:e)},...a})},Y={Container:"c5pz5n1",Wrap:"wmfgvut",Label:"l1hoyu1i",WhiteSpaceNormal:"w11rzgzd",Card:"cf32tkz",Th:"t8jbc7u",ThItem:"twa9inx",Td:"tkkz475",TdItem:"t1evp1yb"};function $(){const[e,t]=(0,w.useState)(!1),n=(0,w.useRef)(),o={anchor:n.current,onFocusOutside:e=>{e.relatedTarget!==n.current&&t(!1)},onClose:()=>t(!1)};return{ref:n,setShowPopover:t,showPopover:e,popoverProps:o}}n(404),window.JetFBHooks=window.JetFBHooks||{},window.JetFBHooks.useTriggerPopover=$;const z=$,W=s(p.Popover)({name:"PopoverStandard",class:"pp9mjqr",propsAsIs:!0});n(8)})(),(window.jfb=window.jfb||{}).components=o})(); \ No newline at end of file +(()=>{var e={2:(e,t,n)=>{"use strict";n.r(t)},8:(e,t,n)=>{"use strict";n.r(t)},21:(e,t,n)=>{"use strict";n.r(t)},22:(e,t,n)=>{"use strict";n.r(t)},32:(e,t,n)=>{"use strict";n.r(t)},55:(e,t,n)=>{"use strict";n.r(t)},156:(e,t,n)=>{"use strict";n.r(t)},189:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t{"use strict";n.r(t)},250:(e,t,n)=>{"use strict";n.r(t)},337:(e,t,n)=>{"use strict";function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function r(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,o=new Array(t);nwt,Sortable:()=>Xe,Swap:()=>ct,default:()=>xt});var u=c(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),d=c(/Edge/i),p=c(/firefox/i),h=c(/safari/i)&&!c(/chrome/i)&&!c(/android/i),f=c(/iP(ad|od|hone)/i),m=c(/chrome/i)&&c(/android/i),g={capture:!1,passive:!1};function v(e,t,n){e.addEventListener(t,n,!u&&g)}function b(e,t,n){e.removeEventListener(t,n,!u&&g)}function y(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function w(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function E(e,t,n,o){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&y(e,t):y(e,t))||o&&e===n)return e;if(e===n)break}while(e=w(e))}return null}var S,x=/\s+/g;function D(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(x," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(x," ")}}function C(e,t,n){var o=e&&e.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in o||-1!==t.indexOf("webkit")||(t="-webkit-"+t),o[t]=n+("string"==typeof n?"":"px")}}function _(e,t){var n="";if("string"==typeof e)n=e;else do{var o=C(e,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function O(e,t,n){if(e){var o=e.getElementsByTagName(t),r=0,i=o.length;if(n)for(;r=i:r<=i))return o;if(o===I())break;o=R(o,!1)}return!1}function k(e,t,n,o){for(var r=0,i=0,a=e.children;i2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(n,K);U.pluginEvent.bind(Xe)(e,t,r({dragEl:J,parentEl:Z,ghostEl:Q,rootEl:ee,nextEl:te,lastDownEl:ne,cloneEl:oe,cloneHidden:re,dragStarted:ve,putSortable:ue,activeSortable:Xe.active,originalEvent:o,oldIndex:ie,oldDraggableIndex:le,newIndex:ae,newDraggableIndex:se,hideGhostForTarget:Fe,unhideGhostForTarget:Le,cloneNowHidden:function(){re=!0},cloneNowShown:function(){re=!1},dispatchSortableEvent:function(e){V({sortable:t,name:e,originalEvent:o})}},i))};function V(e){q(r({putSortable:ue,cloneEl:oe,targetEl:J,rootEl:ee,oldIndex:ie,oldDraggableIndex:le,newIndex:ae,newDraggableIndex:se},e))}var J,Z,Q,ee,te,ne,oe,re,ie,ae,le,se,ce,ue,de,pe,he,fe,me,ge,ve,be,ye,we,Ee,Se=!1,xe=!1,De=[],Ce=!1,_e=!1,Oe=[],Ie=!1,Te=[],Ae="undefined"!=typeof document,ke=f,Me=d||u?"cssFloat":"float",Pe=Ae&&!m&&!f&&"draggable"in document.createElement("div"),Ne=function(){if(Ae){if(u)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Re=function(e,t){var n=C(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=k(e,0,t),i=k(e,1,t),a=r&&C(r),l=i&&C(i),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+T(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+T(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!i||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return r&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[Me]||i&&"none"===n[Me]&&s+c>o)?"vertical":"horizontal"},je=function(e){function t(e,n){return function(o,r,i,a){var l=o.options.group.name&&r.options.group.name&&o.options.group.name===r.options.group.name;if(null==e&&(n||l))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(o,r,i,a),n)(o,r,i,a);var s=(n?o:r).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var n={},o=e.group;o&&"object"==i(o)||(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},Fe=function(){!Ne&&Q&&C(Q,"display","none")},Le=function(){!Ne&&Q&&C(Q,"display","")};Ae&&!m&&document.addEventListener("click",(function(e){if(xe)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),xe=!1,!1}),!0);var Be=function(e){if(J){e=e.touches?e.touches[0]:e;var t=(r=e.clientX,i=e.clientY,De.some((function(e){var t=e[$].options.emptyInsertThreshold;if(t&&!M(e)){var n=T(e),o=r>=n.left-t&&r<=n.right+t,l=i>=n.top-t&&i<=n.bottom+t;return o&&l?a=e:void 0}})),a);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[$]._onDragOver(n)}}var r,i,a},He=function(e){J&&J.parentNode[$]._isOutsideThisEl(e.target)};function Xe(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=l({},t),e[$]=this;var n,o,i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Re(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Xe.supportPointer&&"PointerEvent"in window&&(!h||f),emptyInsertThreshold:5};for(var a in U.initializePlugins(this,e,i),i)!(a in t)&&(t[a]=i[a]);for(var s in je(t),this)"_"===s.charAt(0)&&"function"==typeof this[s]&&(this[s]=this[s].bind(this));this.nativeDraggable=!t.forceFallback&&Pe,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?v(e,"pointerdown",this._onTapStart):(v(e,"mousedown",this._onTapStart),v(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(v(e,"dragover",this),v(e,"dragenter",this)),De.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),l(this,(o=[],{captureAnimationState:function(){o=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==C(e,"display")&&e!==Xe.ghost){o.push({target:e,rect:T(e)});var t=r({},o[o.length-1].rect);if(e.thisAnimationDuration){var n=_(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}}))},addAnimationState:function(e){o.push(e)},removeAnimationState:function(e){o.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var o in t)if(t.hasOwnProperty(o)&&t[o]===e[n][o])return Number(n);return-1}(o,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var r=!1,i=0;o.forEach((function(e){var n=0,o=e.target,a=o.fromRect,l=T(o),s=o.prevFromRect,c=o.prevToRect,u=e.rect,d=_(o,!0);d&&(l.top-=d.f,l.left-=d.e),o.toRect=l,o.thisAnimationDuration&&j(s,l)&&!j(a,l)&&(u.top-l.top)/(u.left-l.left)===(a.top-l.top)/(a.left-l.left)&&(n=function(e,t,n,o){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*o.animation}(u,s,c,t.options)),j(l,a)||(o.prevFromRect=a,o.prevToRect=l,n||(n=t.options.animation),t.animate(o,u,l,n)),n&&(r=!0,i=Math.max(i,n),clearTimeout(o.animationResetTimer),o.animationResetTimer=setTimeout((function(){o.animationTime=0,o.prevFromRect=null,o.fromRect=null,o.prevToRect=null,o.thisAnimationDuration=null}),n),o.thisAnimationDuration=n)})),clearTimeout(n),r?n=setTimeout((function(){"function"==typeof e&&e()}),i):"function"==typeof e&&e(),o=[]},animate:function(e,t,n,o){if(o){C(e,"transition",""),C(e,"transform","");var r=_(this.el),i=r&&r.a,a=r&&r.d,l=(t.left-n.left)/(i||1),s=(t.top-n.top)/(a||1);e.animatingX=!!l,e.animatingY=!!s,C(e,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),C(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),C(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){C(e,"transition",""),C(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),o)}}}))}function Ye(e,t,n,o,r,i,a,l){var s,c,p=e[$],h=p.options.onMove;return!window.CustomEvent||u||d?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=n,s.draggedRect=o,s.related=r||t,s.relatedRect=i||T(t),s.willInsertAfter=l,s.originalEvent=a,e.dispatchEvent(s),h&&(c=h.call(p,s,a)),c}function $e(e){e.draggable=!1}function ze(){Ie=!1}function We(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,o=0;n--;)o+=t.charCodeAt(n);return o.toString(36)}function Ue(e){return setTimeout(e,0)}function qe(e){return clearTimeout(e)}Xe.prototype={constructor:Xe,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(be=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,J):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,r=o.preventOnFilter,i=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=o.filter;if(function(e){Te.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var o=t[n];o.checked&&Te.push(o)}}(n),!J&&!(/mousedown|pointerdown/.test(i)&&0!==e.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!h||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=E(l,o.draggable,n,!1))&&l.animated||ne===l)){if(ie=P(l),le=P(l,o.draggable),"function"==typeof c){if(c.call(this,e,l,this))return V({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),G("filter",t,{evt:e}),void(r&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=E(s,o.trim(),n,!1))return V({sortable:t,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),G("filter",t,{evt:e}),!0}))))return void(r&&e.preventDefault());o.handle&&!E(s,o.handle,n,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(e,t,n){var o,r=this,i=r.el,a=r.options,l=i.ownerDocument;if(n&&!J&&n.parentNode===i){var s=T(n);if(ee=i,Z=(J=n).parentNode,te=J.nextSibling,ne=n,ce=a.group,Xe.dragged=J,de={target:J,clientX:(t||e).clientX,clientY:(t||e).clientY},me=de.clientX-s.left,ge=de.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,J.style["will-change"]="all",o=function(){G("delayEnded",r,{evt:e}),Xe.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!p&&r.nativeDraggable&&(J.draggable=!0),r._triggerDragStart(e,t),V({sortable:r,name:"choose",originalEvent:e}),D(J,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){O(J,e.trim(),$e)})),v(l,"dragover",Be),v(l,"mousemove",Be),v(l,"touchmove",Be),a.supportPointer?(v(l,"pointerup",r._onDrop),!this.nativeDraggable&&v(l,"pointercancel",r._onDrop)):(v(l,"mouseup",r._onDrop),v(l,"touchend",r._onDrop),v(l,"touchcancel",r._onDrop)),p&&this.nativeDraggable&&(this.options.touchStartThreshold=4,J.draggable=!0),G("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(d||u))o();else{if(Xe.eventCanceled)return void this._onDrop();a.supportPointer?(v(l,"pointerup",r._disableDelayedDrag),v(l,"pointercancel",r._disableDelayedDrag)):(v(l,"mouseup",r._disableDelayedDrag),v(l,"touchend",r._disableDelayedDrag),v(l,"touchcancel",r._disableDelayedDrag)),v(l,"mousemove",r._delayedDragTouchMoveHandler),v(l,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&v(l,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){J&&$e(J),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;b(e,"mouseup",this._disableDelayedDrag),b(e,"touchend",this._disableDelayedDrag),b(e,"touchcancel",this._disableDelayedDrag),b(e,"pointerup",this._disableDelayedDrag),b(e,"pointercancel",this._disableDelayedDrag),b(e,"mousemove",this._delayedDragTouchMoveHandler),b(e,"touchmove",this._delayedDragTouchMoveHandler),b(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?v(document,"pointermove",this._onTouchMove):v(document,t?"touchmove":"mousemove",this._onTouchMove):(v(J,"dragend",this),v(ee,"dragstart",this._onDragStart));try{document.selection?Ue((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(Se=!1,ee&&J){G("dragStarted",this,{evt:t}),this.nativeDraggable&&v(document,"dragover",He);var n=this.options;!e&&D(J,n.dragClass,!1),D(J,n.ghostClass,!0),Xe.active=this,e&&this._appendGhost(),V({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(pe){this._lastX=pe.clientX,this._lastY=pe.clientY,Fe();for(var e=document.elementFromPoint(pe.clientX,pe.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(pe.clientX,pe.clientY))!==t;)t=e;if(J.parentNode[$]._isOutsideThisEl(e),t)do{if(t[$]&&t[$]._onDragOver({clientX:pe.clientX,clientY:pe.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=w(t));Le()}},_onTouchMove:function(e){if(de){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,r=e.touches?e.touches[0]:e,i=Q&&_(Q,!0),a=Q&&i&&i.a,l=Q&&i&&i.d,s=ke&&Ee&&N(Ee),c=(r.clientX-de.clientX+o.x)/(a||1)+(s?s[0]-Oe[0]:0)/(a||1),u=(r.clientY-de.clientY+o.y)/(l||1)+(s?s[1]-Oe[1]:0)/(l||1);if(!Xe.active&&!Se){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))r.right+10||e.clientY>o.bottom&&e.clientX>o.left:e.clientY>r.bottom+10||e.clientX>o.right&&e.clientY>o.top}(e,i,this)&&!g.animated){if(g===J)return X(!1);if(g&&a===e.target&&(l=g),l&&(n=T(l)),!1!==Ye(ee,a,J,t,l,n,e,!!l))return H(),g&&g.nextSibling?a.insertBefore(J,g.nextSibling):a.appendChild(J),Z=a,z(),X(!0)}else if(g&&function(e,t,n){var o=T(k(n.el,0,n.options,!0)),r=Y(n.el,n.options,Q);return t?e.clientXu+c*i/2:sd-we)return-ye}else if(s>u+c*(1-r)/2&&sd-c*i/2)?s>u+c/2?1:-1:0}(e,l,n,i,x?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,_e,be===l),0!==b){var N=P(J);do{N-=b,w=Z.children[N]}while(w&&("none"===C(w,"display")||w===Q))}if(0===b||w===l)return X(!1);be=l,ye=b;var R=l.nextElementSibling,j=!1,F=Ye(ee,a,J,t,l,n,e,j=1===b);if(!1!==F)return 1!==F&&-1!==F||(j=1===F),Ie=!0,setTimeout(ze,30),H(),j&&!R?a.appendChild(J):l.parentNode.insertBefore(J,j?R:l),O&&L(O,0,I-O.scrollTop),Z=J.parentNode,void 0===y||_e||(we=Math.abs(y-T(l)[_])),z(),X(!0)}if(a.contains(J))return X(!1)}return!1}function B(s,c){G(s,f,r({evt:e,isOwner:d,axis:i?"vertical":"horizontal",revert:o,dragRect:t,targetRect:n,canSort:p,fromSortable:h,target:l,completed:X,onMove:function(n,o){return Ye(ee,a,J,t,n,T(n),e,o)},changed:z},c))}function H(){B("dragOverAnimationCapture"),f.captureAnimationState(),f!==h&&h.captureAnimationState()}function X(t){return B("dragOverCompleted",{insertion:t}),t&&(d?u._hideClone():u._showClone(f),f!==h&&(D(J,ue?ue.options.ghostClass:u.options.ghostClass,!1),D(J,s.ghostClass,!0)),ue!==f&&f!==Xe.active?ue=f:f===Xe.active&&ue&&(ue=null),h===f&&(f._ignoreWhileAnimating=l),f.animateAll((function(){B("dragOverAnimationComplete"),f._ignoreWhileAnimating=null})),f!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(l===J&&!J.animated||l===a&&!l.animated)&&(be=null),s.dragoverBubble||e.rootEl||l===document||(J.parentNode[$]._isOutsideThisEl(e.target),!t&&Be(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function z(){ae=P(J),se=P(J,s.draggable),V({sortable:f,name:"change",toEl:a,newIndex:ae,newDraggableIndex:se,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){b(document,"mousemove",this._onTouchMove),b(document,"touchmove",this._onTouchMove),b(document,"pointermove",this._onTouchMove),b(document,"dragover",Be),b(document,"mousemove",Be),b(document,"touchmove",Be)},_offUpEvents:function(){var e=this.el.ownerDocument;b(e,"mouseup",this._onDrop),b(e,"touchend",this._onDrop),b(e,"pointerup",this._onDrop),b(e,"pointercancel",this._onDrop),b(e,"touchcancel",this._onDrop),b(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;ae=P(J),se=P(J,n.draggable),G("drop",this,{evt:e}),Z=J&&J.parentNode,ae=P(J),se=P(J,n.draggable),Xe.eventCanceled||(Se=!1,_e=!1,Ce=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),qe(this.cloneId),qe(this._dragStartId),this.nativeDraggable&&(b(document,"drop",this),b(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),h&&C(document.body,"user-select",""),C(J,"transform",""),e&&(ve&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Q&&Q.parentNode&&Q.parentNode.removeChild(Q),(ee===Z||ue&&"clone"!==ue.lastPutMode)&&oe&&oe.parentNode&&oe.parentNode.removeChild(oe),J&&(this.nativeDraggable&&b(J,"dragend",this),$e(J),J.style["will-change"]="",ve&&!Se&&D(J,ue?ue.options.ghostClass:this.options.ghostClass,!1),D(J,this.options.chosenClass,!1),V({sortable:this,name:"unchoose",toEl:Z,newIndex:null,newDraggableIndex:null,originalEvent:e}),ee!==Z?(ae>=0&&(V({rootEl:Z,name:"add",toEl:Z,fromEl:ee,originalEvent:e}),V({sortable:this,name:"remove",toEl:Z,originalEvent:e}),V({rootEl:Z,name:"sort",toEl:Z,fromEl:ee,originalEvent:e}),V({sortable:this,name:"sort",toEl:Z,originalEvent:e})),ue&&ue.save()):ae!==ie&&ae>=0&&(V({sortable:this,name:"update",toEl:Z,originalEvent:e}),V({sortable:this,name:"sort",toEl:Z,originalEvent:e})),Xe.active&&(null!=ae&&-1!==ae||(ae=ie,se=le),V({sortable:this,name:"end",toEl:Z,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){G("nulling",this),ee=J=Z=Q=te=oe=ne=re=de=pe=ve=ae=se=ie=le=be=ye=ue=ce=Xe.dragged=Xe.ghost=Xe.clone=Xe.active=null,Te.forEach((function(e){e.checked=!0})),Te.length=he=fe=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":J&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,o=0,r=n.length,i=this.options;o1&&(mt.forEach((function(e){o.addAnimationState({target:e,rect:bt?T(e):r}),X(e),e.fromRect=r,t.removeAnimationState(e)})),bt=!1,function(e,t){mt.forEach((function(n,o){var r=t.children[n.sortableIndex+(e?Number(o):0)];r?t.insertBefore(n,r):t.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,o=e.insertion,r=e.activeSortable,i=e.parentEl,a=e.putSortable,l=this.options;if(o){if(n&&r._hideClone(),vt=!1,l.animation&&mt.length>1&&(bt||!n&&!r.options.sort&&!a)){var s=T(pt,!1,!0,!0);mt.forEach((function(e){e!==pt&&(H(e,s),i.appendChild(e))})),bt=!0}if(!n)if(bt||St(),mt.length>1){var c=ft;r._showClone(t),r.options.animation&&!ft&&c&>.forEach((function(e){r.addAnimationState({target:e,rect:ht}),e.fromRect=ht,e.thisAnimationDuration=null}))}else r._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,o=e.activeSortable;if(mt.forEach((function(e){e.thisAnimationDuration=null})),o.options.animation&&!n&&o.multiDrag.isMultiDrag){ht=l({},t);var r=_(pt,!0);ht.top-=r.f,ht.left-=r.e}},dragOverAnimationComplete:function(){bt&&(bt=!1,St())},drop:function(e){var t=e.originalEvent,n=e.rootEl,o=e.parentEl,r=e.sortable,i=e.dispatchSortableEvent,a=e.oldIndex,l=e.putSortable,s=l||this.sortable;if(t){var c=this.options,u=o.children;if(!yt)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),D(pt,c.selectedClass,!~mt.indexOf(pt)),~mt.indexOf(pt))mt.splice(mt.indexOf(pt),1),ut=null,q({sortable:r,rootEl:n,name:"deselect",targetEl:pt,originalEvent:t});else{if(mt.push(pt),q({sortable:r,rootEl:n,name:"select",targetEl:pt,originalEvent:t}),t.shiftKey&&ut&&r.el.contains(ut)){var d=P(ut),p=P(pt);~d&&~p&&d!==p&&function(){var e,i;p>d?(i=d,e=p):(i=p,e=d+1);for(var a=c.filter;i1){var h=T(pt),f=P(pt,":not(."+this.options.selectedClass+")");if(!vt&&c.animation&&(pt.thisAnimationDuration=null),s.captureAnimationState(),!vt&&(c.animation&&(pt.fromRect=h,mt.forEach((function(e){if(e.thisAnimationDuration=null,e!==pt){var t=bt?T(e):h;e.fromRect=t,s.addAnimationState({target:e,rect:t})}}))),St(),mt.forEach((function(e){u[f]?o.insertBefore(e,u[f]):o.appendChild(e),f++})),a===P(pt))){var m=!1;mt.forEach((function(e){e.sortableIndex===P(e)||(m=!0)})),m&&(i("update"),i("sort"))}mt.forEach((function(e){X(e)})),s.animateAll()}dt=s}(n===o||l&&"clone"!==l.lastPutMode)&>.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=yt=!1,gt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),b(document,"pointerup",this._deselectMultiDrag),b(document,"mouseup",this._deselectMultiDrag),b(document,"touchend",this._deselectMultiDrag),b(document,"keydown",this._checkKeyDown),b(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==yt&&yt||dt!==this.sortable||e&&E(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;mt.length;){var t=mt[0];D(t,this.options.selectedClass,!1),mt.shift(),q({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvent:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},l(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[$];t&&t.options.multiDrag&&!~mt.indexOf(e)&&(dt&&dt!==t&&(dt.multiDrag._deselectMultiDrag(),dt=t),D(e,t.options.selectedClass,!0),mt.push(e))},deselect:function(e){var t=e.parentNode[$],n=mt.indexOf(e);t&&t.options.multiDrag&&~n&&(D(e,t.options.selectedClass,!1),mt.splice(n,1))}},eventProperties:function(){var e,t=this,n=[],o=[];return mt.forEach((function(e){var r;n.push({multiDragElement:e,index:e.sortableIndex}),r=bt&&e!==pt?-1:bt?P(e,":not(."+t.options.selectedClass+")"):P(e),o.push({multiDragElement:e,index:r})})),{items:(e=mt,function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(gt),oldIndicies:n,newIndicies:o}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function Et(e,t){gt.forEach((function(n,o){var r=t.children[n.sortableIndex+(e?Number(o):0)];r?t.insertBefore(n,r):t.appendChild(n)}))}function St(){mt.forEach((function(e){e!==pt&&e.parentNode&&e.parentNode.removeChild(e)}))}Xe.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):this.options.supportPointer?v(document,"pointermove",this._handleFallbackAutoScroll):t.touches?v(document,"touchmove",this._handleFallbackAutoScroll):v(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):(b(document,"pointermove",this._handleFallbackAutoScroll),b(document,"touchmove",this._handleFallbackAutoScroll),b(document,"mousemove",this._handleFallbackAutoScroll)),ot(),nt(),clearTimeout(S),S=void 0},nulling:function(){Ze=Ge=Ke=tt=Qe=Ve=Je=null,et.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,o=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,i=document.elementFromPoint(o,r);if(Ze=e,t||this.options.forceAutoScrollFallback||d||u||h){it(e,this.options,i,t);var a=R(i,!0);!tt||Qe&&o===Ve&&r===Je||(Qe&&ot(),Qe=setInterval((function(){var i=R(document.elementFromPoint(o,r),!0);i!==a&&(a=i,nt()),it(e,n.options,i,t)}),10),Ve=o,Je=r)}else{if(!this.options.bubbleScroll||R(i,!0)===I())return void nt();it(e,this.options,R(i,!1),!1)}}},l(e,{pluginName:"scroll",initializeByDefault:!0})}),Xe.mount(st,lt);const xt=Xe},379:(e,t,n)=>{"use strict";n.r(t)},404:(e,t,n)=>{"use strict";n.r(t)},471:(e,t,n)=>{"use strict";n.r(t)},582:(e,t,n)=>{"use strict";n.r(t)},609:e=>{"use strict";e.exports=window.React},627:(e,t,n)=>{"use strict";n.r(t)},676:(e,t,n)=>{"use strict";n.r(t)},722:(e,t,n)=>{"use strict";n.r(t)},791:(e,t,n)=>{"use strict";n.r(t)},804:(e,t,n)=>{"use strict";n.r(t)},843:(e,t,n)=>{"use strict";n.r(t)},872:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var o=!0,r="Invariant failed";function i(e,t){if(!e){if(o)throw new Error(r);var n="function"==typeof t?t():t;throw new Error(n?r+": "+n:r)}}},884:(e,t,n)=>{"use strict";n.r(t)},885:(e,t,n)=>{"use strict";n.r(t)},971:(e,t,n)=>{"use strict";n.r(t)},980:(e,t,n)=>{"use strict";n.r(t)},998:(e,t,n)=>{var o=n(337),r=n(189),i=n(609),a=n(872);function l(e){return e&&e.__esModule?e.default:e}function s(e,t,n,o){Object.defineProperty(e,t,{get:n,set:o,enumerable:!0,configurable:!0})}function c(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function u(e){e.forEach((e=>c(e.element)))}function d(e){e.forEach((e=>{!function(e,t,n){const o=e.children[n]||null;e.insertBefore(t,o)}(e.parentElement,e.element,e.oldIndex)}))}function p(e,t){const n=m(e),o={parentElement:e.from};let r=[];switch(n){case"normal":r=[{element:e.item,newIndex:e.newIndex,oldIndex:e.oldIndex,parentElement:e.from}];break;case"swap":r=[{element:e.item,oldIndex:e.oldIndex,newIndex:e.newIndex,...o},{element:e.swapItem,oldIndex:e.newIndex,newIndex:e.oldIndex,...o}];break;case"multidrag":r=e.oldIndicies.map(((t,n)=>({element:t.multiDragElement,oldIndex:t.index,newIndex:e.newIndicies[n].index,...o})))}const i=function(e,t){return e.map((e=>({...e,item:t[e.oldIndex]}))).sort(((e,t)=>e.oldIndex-t.oldIndex))}(r,t);return i}function h(e,t){const n=[...t];return e.concat().reverse().forEach((e=>n.splice(e.oldIndex,1))),n}function f(e,t,n,o){const r=[...t];return e.forEach((e=>{const t=o&&n&&o(e.item,n);r.splice(e.newIndex,0,t||e.item)})),r}function m(e){return e.oldIndicies&&e.oldIndicies.length>0?"multidrag":e.swapItem?"swap":"normal"}s(e.exports,"Sortable",(()=>$882b6d93070905b3$re_export$Sortable)),s(e.exports,"Direction",(()=>$882b6d93070905b3$re_export$Direction)),s(e.exports,"DOMRect",(()=>$882b6d93070905b3$re_export$DOMRect)),s(e.exports,"GroupOptions",(()=>$882b6d93070905b3$re_export$GroupOptions)),s(e.exports,"MoveEvent",(()=>$882b6d93070905b3$re_export$MoveEvent)),s(e.exports,"Options",(()=>$882b6d93070905b3$re_export$Options)),s(e.exports,"PullResult",(()=>$882b6d93070905b3$re_export$PullResult)),s(e.exports,"PutResult",(()=>$882b6d93070905b3$re_export$PutResult)),s(e.exports,"SortableEvent",(()=>$882b6d93070905b3$re_export$SortableEvent)),s(e.exports,"SortableOptions",(()=>$882b6d93070905b3$re_export$SortableOptions)),s(e.exports,"Utils",(()=>$882b6d93070905b3$re_export$Utils)),s(e.exports,"ReactSortable",(()=>v));const g={dragging:null};class v extends i.Component{static defaultProps={clone:e=>e};constructor(e){super(e),this.ref=(0,i.createRef)();const t=[...e.list].map((e=>Object.assign(e,{chosen:!1,selected:!1})));e.setList(t,this.sortable,g),l(a)(!e.plugins,'\nPlugins prop is no longer supported.\nInstead, mount it with "Sortable.mount(new MultiDrag())"\nPlease read the updated README.md at https://github.com/SortableJS/react-sortablejs.\n ')}componentDidMount(){if(null===this.ref.current)return;const e=this.makeOptions();l(o).create(this.ref.current,e)}componentDidUpdate(e){e.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){const{tag:e,style:t,className:n,id:o}=this.props,r={style:t,className:n,id:o},a=e&&null!==e?e:"div";return(0,i.createElement)(a,{ref:this.ref,...r},this.getChildren())}getChildren(){const{children:e,dataIdAttr:t,selectedClass:n="sortable-selected",chosenClass:o="sortable-chosen",dragClass:a="sortable-drag",fallbackClass:s="sortable-falback",ghostClass:c="sortable-ghost",swapClass:u="sortable-swap-highlight",filter:d="sortable-filter",list:p}=this.props;if(!e||null==e)return null;const h=t||"data-id";return i.Children.map(e,((e,t)=>{if(void 0===e)return;const a=p[t]||{},{className:s}=e.props,c="string"==typeof d&&{[d.replace(".","")]:!!a.filtered},u=l(r)(s,{[n]:a.selected,[o]:a.chosen,...c});return(0,i.cloneElement)(e,{[h]:e.key,className:u})}))}get sortable(){const e=this.ref.current;if(null===e)return null;const t=Object.keys(e).find((e=>e.includes("Sortable")));return t?e[t]:null}makeOptions(){const e=function(e){const{list:t,setList:n,children:o,tag:r,style:i,className:a,clone:l,onAdd:s,onChange:c,onChoose:u,onClone:d,onEnd:p,onFilter:h,onRemove:f,onSort:m,onStart:g,onUnchoose:v,onUpdate:b,onMove:y,onSpill:w,onSelect:E,onDeselect:S,...x}=e;return x}(this.props);return["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"].forEach((t=>e[t]=this.prepareOnHandlerPropAndDOM(t))),["onChange","onClone","onFilter","onSort"].forEach((t=>e[t]=this.prepareOnHandlerProp(t))),{...e,onMove:(e,t)=>{const{onMove:n}=this.props,o=e.willInsertAfter||-1;if(!n)return o;const r=n(e,t,this.sortable,g);return void 0!==r&&r}}}prepareOnHandlerPropAndDOM(e){return t=>{this.callOnHandlerProp(t,e),this[e](t)}}prepareOnHandlerProp(e){return t=>{this.callOnHandlerProp(t,e)}}callOnHandlerProp(e,t){const n=this.props[t];n&&n(e,this.sortable,g)}onAdd(e){const{list:t,setList:n,clone:o}=this.props,r=p(e,[...g.dragging.props.list]);u(r),n(f(r,t,e,o).map((e=>Object.assign(e,{selected:!1}))),this.sortable,g)}onRemove(e){const{list:t,setList:n}=this.props,o=m(e),r=p(e,t);d(r);let i=[...t];if("clone"!==e.pullMode)i=h(r,i);else{let t=r;switch(o){case"multidrag":t=r.map(((t,n)=>({...t,element:e.clones[n]})));break;case"normal":t=r.map((t=>({...t,element:e.clone})));break;default:l(a)(!0,`mode "${o}" cannot clone. Please remove "props.clone" from when using the "${o}" plugin`)}u(t),r.forEach((t=>{const n=t.oldIndex,o=this.props.clone(t.item,e);i.splice(n,1,o)}))}i=i.map((e=>Object.assign(e,{selected:!1}))),n(i,this.sortable,g)}onUpdate(e){const{list:t,setList:n}=this.props,o=p(e,t);return u(o),d(o),n(function(e,t){return f(e,h(e,t))}(o,t),this.sortable,g)}onStart(){g.dragging=this}onEnd(){g.dragging=null}onChoose(e){const{list:t,setList:n}=this.props;n(t.map(((t,n)=>{let o=t;return n===e.oldIndex&&(o=Object.assign(t,{chosen:!0})),o})),this.sortable,g)}onUnchoose(e){const{list:t,setList:n}=this.props;n(t.map(((t,n)=>{let o=t;return n===e.oldIndex&&(o=Object.assign(o,{chosen:!1})),o})),this.sortable,g)}onSpill(e){const{removeOnSpill:t,revertOnSpill:n}=this.props;t&&!n&&c(e.item)}onSelect(e){const{list:t,setList:n}=this.props,o=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((t=>{const n=t.index;if(-1===n)return console.log(`"${e.type}" had indice of "${t.index}", which is probably -1 and doesn't usually happen here.`),void console.log(e);o[n].selected=!0})),n(o,this.sortable,g)}onDeselect(e){const{list:t,setList:n}=this.props,o=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((e=>{const t=e.index;-1!==t&&(o[t].selected=!0)})),n(o,this.sortable,g)}}var b,y;b=e.exports,y={},Object.keys(y).forEach((function(e){"default"===e||"__esModule"===e||b.hasOwnProperty(e)||Object.defineProperty(b,e,{enumerable:!0,get:function(){return y[e]}})}))}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";function e(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.r(o),n.d(o,{ClearBaseControlStyle:()=>b,ControlWithErrorStyle:()=>S,FormLabeledTokenField:()=>X,Help:()=>m,IconText:()=>O,Label:()=>c,LabelWithActions:()=>f,ModalFooterStyle:()=>B,PopoverStandard:()=>W,RequiredLabel:()=>u,ResponsiveModal:()=>v,RowControl:()=>E,RowControlEnd:()=>T,RowControlEndStyle:()=>x,RowControlStart:()=>A,RowControlStartStyle:()=>d,Sortable:()=>g,StickyModalActions:()=>L,StyledButtonControl:()=>j,StyledCardBodyControl:()=>R,StyledComboboxControl:()=>N,StyledFlexControl:()=>M,StyledFormTokenFieldControl:()=>F,StyledSelectControl:()=>k,StyledTextControl:()=>P,TableListStyle:()=>Y,WideLine:()=>H,useTriggerPopover:()=>z});var t=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,r=e((function(e){return t.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),i=n(609),a=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),t={},n=[];e.forEach((e=>{(e?e.split(" "):[]).forEach((e=>{if(e.startsWith("atm_")){const[,n]=e.split("_");t[n]=e}else n.push(e)}))}));const o=[];for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.push(t[e]);return o.push(...n),o.join(" ")},l=(e,t)=>{const n={};return Object.keys(e).filter((e=>t=>-1===e.indexOf(t))(t)).forEach((t=>{n[t]=e[t]})),n},s=function(e){let t="";return n=>{const o=(o,s)=>{const{as:c=e,class:u=t}=o;var d;const p=function(e,t){const n=l(t,["as","class"]);if(!e){const e="function"==typeof r?{default:r}:r;Object.keys(n).forEach((t=>{e.default(t)||delete n[t]}))}return n}(void 0===n.propsAsIs?!("string"==typeof c&&-1===c.indexOf("-")&&(d=c[0],d.toUpperCase()!==d)):n.propsAsIs,o);p.ref=s,p.className=n.atomic?a(n.class,p.className||u):a(p.className||u,n.class);const{vars:h}=n;if(h){const e={};for(const t in h){const r=h[t],i=r[0],a=r[1]||"",l="function"==typeof i?i(o):i;n.name,e[`--${t}`]=`${l}${a}`}const t=p.style||{},r=Object.keys(t);r.length>0&&r.forEach((n=>{e[n]=t[n]})),p.style=e}return e.__wyw_meta&&e!==c?(p.as=c,(0,i.createElement)(e,p)):(0,i.createElement)(c,p)},s=i.forwardRef?(0,i.forwardRef)(o):e=>{const t=l(e,["innerRef"]);return o(t,e.innerRef)};return s.displayName=n.name,s.__wyw_meta={className:n.class||t,extends:e},s}};const c=s("label")({name:"Label",class:"lnj4cxf",propsAsIs:!1});n(250);const u=s(c)({name:"RequiredLabel",class:"rta9zu",propsAsIs:!0,vars:{"rta9zu-0":[({size:e=1.5})=>e+"em"]}});n(627);const d="r8cg2q0";n(471);const p=window.wp.components;function h({children:e,className:t,...n}){return(0,i.createElement)(p.Flex,{justify:"flex-start",className:a(d,t),...n},e)}const f=s(h)({name:"LabelWithActions",class:"lm6imcb",propsAsIs:!0});n(21);const m=s("p")({name:"Help",class:"h1u00eq1",propsAsIs:!1});n(2);const g=n(998).ReactSortable,v=s(p.Modal)({name:"ResponsiveModal",class:"rnqs1ii",propsAsIs:!0});n(582);const b="cswoqso";n(379);const y=window.wp.compose,w=window.wp.element,E=s((0,w.forwardRef)((function e({children:t,className:n,createId:o=!0,controlSize:r=3,...a},l){const s=(0,y.useInstanceId)(e,"jfb-control",o?"":"1");return(0,i.createElement)(p.Flex,{ref:l,className:[n,b].join(" "),gap:2,align:"flex-start",...a},"function"==typeof t?t({id:s}):t)})))({name:"RowControl",class:"rv9blu0",propsAsIs:!0,vars:{"rv9blu0-0":[({controlSize:e=3})=>e]}});n(722);const S="cuape64";n(55);const x="rxii470";n(980);const D=(0,w.forwardRef)((function({icon:e,size:t=24,...n},o){return(0,w.cloneElement)(e,{width:t,height:t,...n,ref:o})})),C=s(p.Flex)({name:"StyledFlex",class:"s82flgq",propsAsIs:!0}),_=(0,i.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none"},(0,i.createElement)("path",{d:"M12 16.99V17M12 7V14M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),O=function({children:e,icon:t,...n}){return(0,i.createElement)(C,{justify:"flex-start",...n},(0,i.createElement)(D,{size:24,icon:null!=t?t:_}),e)};n(885);const I=window.wp.i18n,T=function({children:e,hasError:t=!1,showDefaultNotice:n=!0,errorText:o="",className:r,...l}){const s=(0,I.__)("Please fill this required field","jet-form-builder");let c="";return o.length&&(c=(0,I.__)(o,"jet-form-builder")),(0,i.createElement)(p.Flex,{className:a(x,t&&S,r),direction:"column",...l},t&&n&&(0,i.createElement)(O,null,c.length?c:s),e)},A=function({className:e,...t}){return(0,i.createElement)("div",{className:a(e,d),...t})},k=s(p.SelectControl)({name:"StyledSelectControl",class:"s1c2yukw",propsAsIs:!0});n(791);const M=s(p.Flex)({name:"StyledFlexControl",class:"smynwlj",propsAsIs:!0});n(32);const P=s(p.TextControl)({name:"StyledTextControl",class:"sanpaay",propsAsIs:!0});n(676);const N=s(p.ComboboxControl)({name:"StyledComboboxControl",class:"s1ucdx31",propsAsIs:!0});n(804);const R=s(p.CardBody)({name:"StyledCardBodyControl",class:"s11rga5u",propsAsIs:!0});n(209);const j=s(p.Button)({name:"StyledButtonControl",class:"s1slln9b",propsAsIs:!0});n(971);const F=s(p.FormTokenField)({name:"StyledFormTokenFieldControl",class:"s1c0necn",propsAsIs:!0});n(22),n(843);const L=function({className:e="",...t}){return(0,i.createElement)(p.Flex,{justify:"flex-start",className:("sh0lqos "+e).trim(),...t})},B="madeb2s";n(884);const H=s("hr")({name:"WideLine",class:"w1m59y8q",propsAsIs:!1});n(156);const X=function({suggestions:e=[],value:t=[],valueProp:n="value",labelProp:o="label",__experimentalValidateInput:r=e=>!0,...a}){const[l,s]=(0,w.useMemo)((()=>{const t={},r={};for(const l of e){var i,a;const e=null!==(i=l[n])&&void 0!==i?i:"",s=null!==(a=l[o])&&void 0!==a?a:"";t[e]=s,r[s]=e}return[t,r]}),[]),c=(0,w.useMemo)((()=>e.map((e=>e[o]||"")).filter((e=>e&&!t.includes(s[e])))),[t]);return(0,i.createElement)(F,{displayTransform:e=>{var t;return null!==(t=l[e])&&void 0!==t?t:e},saveTransform:e=>{var t;return null!==(t=s[e])&&void 0!==t?t:e},suggestions:c,value:t,__experimentalValidateInput:e=>{var t;return r(null!==(t=s[e])&&void 0!==t?t:e)},...a})},Y={Container:"c5pz5n1",Wrap:"wmfgvut",Label:"l1hoyu1i",WhiteSpaceNormal:"w11rzgzd",Card:"cf32tkz",Th:"t8jbc7u",ThItem:"twa9inx",Td:"tkkz475",TdItem:"t1evp1yb"};function $(){const[e,t]=(0,w.useState)(!1),n=(0,w.useRef)(),o={anchor:n.current,onFocusOutside:e=>{e.relatedTarget!==n.current&&t(!1)},onClose:()=>t(!1)};return{ref:n,setShowPopover:t,showPopover:e,popoverProps:o}}n(404),window.JetFBHooks=window.JetFBHooks||{},window.JetFBHooks.useTriggerPopover=$;const z=$,W=s(p.Popover)({name:"PopoverStandard",class:"pp9mjqr",propsAsIs:!0});n(8)})(),(window.jfb=window.jfb||{}).components=o})(); \ No newline at end of file diff --git a/modules/gateways/assets/build/admin/pages/jfb-payments-single.asset.php b/modules/gateways/assets/build/admin/pages/jfb-payments-single.asset.php index fb72c714d..c2b9bdd30 100644 --- a/modules/gateways/assets/build/admin/pages/jfb-payments-single.asset.php +++ b/modules/gateways/assets/build/admin/pages/jfb-payments-single.asset.php @@ -1 +1 @@ - array(), 'version' => 'f1b3e0ce05ec27b49a2b'); + array(), 'version' => 'ac034eca66c212237907'); diff --git a/modules/gateways/assets/build/admin/pages/jfb-payments-single.js b/modules/gateways/assets/build/admin/pages/jfb-payments-single.js index 379a09680..42f9df65c 100644 --- a/modules/gateways/assets/build/admin/pages/jfb-payments-single.js +++ b/modules/gateways/assets/build/admin/pages/jfb-payments-single.js @@ -1 +1,329 @@ -(()=>{"use strict";var e=function(){var e=this.$createElement,t=this._self._c||e;return t("FormBuilderPage",[t("PostBoxGrid")],1)};e._withStripped=!0;const{PostBoxGrid:t,FormBuilderPage:r}=JetFBComponents,{mapGetters:n,mapMutations:o,mapActions:s}=Vuex;var a=function(e,t){var r,n=e;if(t&&(n.render=t,n.staticRenderFns=[],n._compiled=!0),r)if(n.functional){n._injectStyles=r;var o=n.render;n.render=function(e,t){return r.call(t),o(e,t)}}else{var s=n.beforeCreate;n.beforeCreate=s?[].concat(s,r):[r]}return{exports:e,options:n}}({name:"jfb-payments-single",components:{PostBoxGrid:t,FormBuilderPage:r},created(){jfbEventBus.$on("payment-details-delete",(()=>{this["scope-payment-details/actions/defaultDelete"]()}))},methods:{...s(["scope-payment-details/actions/defaultDelete"])}},e);const i=a.exports,{BaseStore:c,SingleMetaBoxesPlugin:l}=JetFBStore,{renderCurrentPage:d}=window.JetFBActions;d(i,{store:new Vuex.Store({...c,plugins:[l]})})})(); \ No newline at end of file +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ "../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/@wyw-in-js/webpack-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./admin/pages/jfb-payments-single/SinglePayment.vue?vue&type=script&lang=js": +/*!***************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/@wyw-in-js/webpack-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./admin/pages/jfb-payments-single/SinglePayment.vue?vue&type=script&lang=js ***! + \***************************************************************************************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +// +// +// +// +// +// + +const { + PostBoxGrid, + FormBuilderPage +} = JetFBComponents; +const { + mapGetters, + mapMutations, + mapActions +} = Vuex; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + name: 'jfb-payments-single', + components: { + PostBoxGrid, + FormBuilderPage + }, + created() { + jfbEventBus.$on('payment-details-delete', () => { + this['scope-payment-details/actions/defaultDelete'](); + }); + }, + methods: { + ...mapActions(['scope-payment-details/actions/defaultDelete']) + } +}); + +/***/ }), + +/***/ "../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./admin/pages/jfb-payments-single/SinglePayment.vue?vue&type=template&id=263e5547": +/*!****************************************************************************************************************************************************************************************************************************************************!*\ + !*** ../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./admin/pages/jfb-payments-single/SinglePayment.vue?vue&type=template&id=263e5547 ***! + \****************************************************************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ render: () => (/* binding */ render), +/* harmony export */ staticRenderFns: () => (/* binding */ staticRenderFns) +/* harmony export */ }); +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('FormBuilderPage',[_c('PostBoxGrid')],1)} +var staticRenderFns = [] +render._withStripped = true + + +/***/ }), + +/***/ "../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js": +/*!******************************************************************************!*\ + !*** ../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ normalizeComponent) +/* harmony export */ }); +/* globals __VUE_SSR_CONTEXT__ */ + +// IMPORTANT: Do NOT use ES2015 features in this file (except for modules). +// This module is a runtime utility for cleaner component module output and will +// be included in the final webpack user bundle. + +function normalizeComponent( + scriptExports, + render, + staticRenderFns, + functionalTemplate, + injectStyles, + scopeId, + moduleIdentifier /* server only */, + shadowMode /* vue-cli only */ +) { + // Vue.extend constructor export interop + var options = + typeof scriptExports === 'function' ? scriptExports.options : scriptExports + + // render functions + if (render) { + options.render = render + options.staticRenderFns = staticRenderFns + options._compiled = true + } + + // functional template + if (functionalTemplate) { + options.functional = true + } + + // scopedId + if (scopeId) { + options._scopeId = 'data-v-' + scopeId + } + + var hook + if (moduleIdentifier) { + // server build + hook = function (context) { + // 2.3 injection + context = + context || // cached call + (this.$vnode && this.$vnode.ssrContext) || // stateful + (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional + // 2.2 with runInNewContext: true + if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { + context = __VUE_SSR_CONTEXT__ + } + // inject component styles + if (injectStyles) { + injectStyles.call(this, context) + } + // register component module identifier for async chunk inferrence + if (context && context._registeredComponents) { + context._registeredComponents.add(moduleIdentifier) + } + } + // used by ssr in case component is cached and beforeCreate + // never gets called + options._ssrRegister = hook + } else if (injectStyles) { + hook = shadowMode + ? function () { + injectStyles.call( + this, + (options.functional ? this.parent : this).$root.$options.shadowRoot + ) + } + : injectStyles + } + + if (hook) { + if (options.functional) { + // for template-only hot-reload because in that case the render fn doesn't + // go through the normalizer + options._injectStyles = hook + // register for functional component in vue file + var originalRender = options.render + options.render = function renderWithStyleInjection(h, context) { + hook.call(context) + return originalRender(h, context) + } + } else { + // inject component registration as beforeCreate hook + var existing = options.beforeCreate + options.beforeCreate = existing ? [].concat(existing, hook) : [hook] + } + } + + return { + exports: scriptExports, + options: options + } +} + + +/***/ }), + +/***/ "./admin/pages/jfb-payments-single/SinglePayment.vue": +/*!***********************************************************!*\ + !*** ./admin/pages/jfb-payments-single/SinglePayment.vue ***! + \***********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _SinglePayment_vue_vue_type_template_id_263e5547__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SinglePayment.vue?vue&type=template&id=263e5547 */ "./admin/pages/jfb-payments-single/SinglePayment.vue?vue&type=template&id=263e5547"); +/* harmony import */ var _SinglePayment_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SinglePayment.vue?vue&type=script&lang=js */ "./admin/pages/jfb-payments-single/SinglePayment.vue?vue&type=script&lang=js"); +/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js"); + + + + + +/* normalize component */ +; +var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])( + _SinglePayment_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], + _SinglePayment_vue_vue_type_template_id_263e5547__WEBPACK_IMPORTED_MODULE_0__.render, + _SinglePayment_vue_vue_type_template_id_263e5547__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var api; } +component.options.__file = "admin/pages/jfb-payments-single/SinglePayment.vue" +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports); + +/***/ }), + +/***/ "./admin/pages/jfb-payments-single/SinglePayment.vue?vue&type=script&lang=js": +/*!***********************************************************************************!*\ + !*** ./admin/pages/jfb-payments-single/SinglePayment.vue?vue&type=script&lang=js ***! + \***********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_wyw_in_js_webpack_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SinglePayment_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../../node_modules/@wyw-in-js/webpack-loader/lib/index.js!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SinglePayment.vue?vue&type=script&lang=js */ "../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/@wyw-in-js/webpack-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./admin/pages/jfb-payments-single/SinglePayment.vue?vue&type=script&lang=js"); + /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_node_modules_wyw_in_js_webpack_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SinglePayment_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + +/***/ }), + +/***/ "./admin/pages/jfb-payments-single/SinglePayment.vue?vue&type=template&id=263e5547": +/*!*****************************************************************************************!*\ + !*** ./admin/pages/jfb-payments-single/SinglePayment.vue?vue&type=template&id=263e5547 ***! + \*****************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ render: () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_SinglePayment_vue_vue_type_template_id_263e5547__WEBPACK_IMPORTED_MODULE_0__.render), +/* harmony export */ staticRenderFns: () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_SinglePayment_vue_vue_type_template_id_263e5547__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns) +/* harmony export */ }); +/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_SinglePayment_vue_vue_type_template_id_263e5547__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SinglePayment.vue?vue&type=template&id=263e5547 */ "../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./admin/pages/jfb-payments-single/SinglePayment.vue?vue&type=template&id=263e5547"); + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +/*!**************************************************!*\ + !*** ./admin/pages/jfb-payments-single/index.js ***! + \**************************************************/ +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _SinglePayment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SinglePayment */ "./admin/pages/jfb-payments-single/SinglePayment.vue"); + +const { + BaseStore, + SingleMetaBoxesPlugin +} = JetFBStore; +const { + renderCurrentPage +} = window.JetFBActions; +const store = new Vuex.Store({ + ...BaseStore, + plugins: [SingleMetaBoxesPlugin] +}); +renderCurrentPage(_SinglePayment__WEBPACK_IMPORTED_MODULE_0__["default"], { + store +}); +})(); + +/******/ })() +; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRtaW4vcGFnZXMvamZiLXBheW1lbnRzLXNpbmdsZS5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFPQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUdBO0FBQ0E7Ozs7Ozs7Ozs7Ozs7OztBQ2xDQTtBQUNBO0FBQ0E7Ozs7Ozs7Ozs7Ozs7OztBQ0ZBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQ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cclxuXHJcbmNvbnN0IHtcclxuXHRCYXNlU3RvcmUsXHJcblx0U2luZ2xlTWV0YUJveGVzUGx1Z2luXHJcbn0gPSBKZXRGQlN0b3JlO1xyXG5cclxuY29uc3QgeyByZW5kZXJDdXJyZW50UGFnZSB9ID0gd2luZG93LkpldEZCQWN0aW9ucztcclxuXHJcbmNvbnN0IHN0b3JlID0gbmV3IFZ1ZXguU3RvcmUoIHtcclxuXHQuLi5CYXNlU3RvcmUsXHJcblx0cGx1Z2luczogWyBTaW5nbGVNZXRhQm94ZXNQbHVnaW4gXSxcclxufSApO1xyXG5cclxucmVuZGVyQ3VycmVudFBhZ2UoIFNpbmdsZVBheW1lbnQsIHsgc3RvcmUgfSApO1xyXG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/modules/gateways/assets/build/admin/pages/jfb-payments.asset.php b/modules/gateways/assets/build/admin/pages/jfb-payments.asset.php index c7dfd9db1..791e22993 100644 --- a/modules/gateways/assets/build/admin/pages/jfb-payments.asset.php +++ b/modules/gateways/assets/build/admin/pages/jfb-payments.asset.php @@ -1 +1 @@ - array(), 'version' => '110300a2a245a6c96cf9'); + array(), 'version' => '15cac21de243ce32eeb9'); diff --git a/modules/gateways/assets/build/admin/pages/jfb-payments.js b/modules/gateways/assets/build/admin/pages/jfb-payments.js index 904d27df1..5dd230602 100644 --- a/modules/gateways/assets/build/admin/pages/jfb-payments.js +++ b/modules/gateways/assets/build/admin/pages/jfb-payments.js @@ -1 +1,310 @@ -(()=>{"use strict";var e=function(){var e=this.$createElement;return(this._self._c||e)("PaymentsComponent")};e._withStripped=!0;const{PaymentsPage:{PaymentsComponent:n}}=window.JetFBComponents;var t=function(e,n){var t,o=e;if(n&&(o.render=n,o.staticRenderFns=[],o._compiled=!0),t)if(o.functional){o._injectStyles=t;var r=o.render;o.render=function(e,n){return t.call(n),r(e,n)}}else{var s=o.beforeCreate;o.beforeCreate=s?[].concat(s,t):[t]}return{exports:e,options:o}}({name:"jfb-payments",components:{PaymentsComponent:n}},e);const o=t.exports,{PaymentsPage:{options:r}}=window.JetFBComponents,{renderCurrentPage:s}=window.JetFBActions;r.store=new Vuex.Store(r.store),s(o,r)})(); \ No newline at end of file +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ "../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/@wyw-in-js/webpack-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./admin/pages/jfb-payments/PaymentsPage.vue?vue&type=script&lang=js": +/*!*******************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/@wyw-in-js/webpack-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./admin/pages/jfb-payments/PaymentsPage.vue?vue&type=script&lang=js ***! + \*******************************************************************************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +// +// +// +// + +const { + PaymentsPage: { + PaymentsComponent + } +} = window.JetFBComponents; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + name: "jfb-payments", + components: { + PaymentsComponent + } +}); + +/***/ }), + +/***/ "../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./admin/pages/jfb-payments/PaymentsPage.vue?vue&type=template&id=18604964": +/*!********************************************************************************************************************************************************************************************************************************************!*\ + !*** ../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./admin/pages/jfb-payments/PaymentsPage.vue?vue&type=template&id=18604964 ***! + \********************************************************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ render: () => (/* binding */ render), +/* harmony export */ staticRenderFns: () => (/* binding */ staticRenderFns) +/* harmony export */ }); +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('PaymentsComponent')} +var staticRenderFns = [] +render._withStripped = true + + +/***/ }), + +/***/ "../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js": +/*!******************************************************************************!*\ + !*** ../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ normalizeComponent) +/* harmony export */ }); +/* globals __VUE_SSR_CONTEXT__ */ + +// IMPORTANT: Do NOT use ES2015 features in this file (except for modules). +// This module is a runtime utility for cleaner component module output and will +// be included in the final webpack user bundle. + +function normalizeComponent( + scriptExports, + render, + staticRenderFns, + functionalTemplate, + injectStyles, + scopeId, + moduleIdentifier /* server only */, + shadowMode /* vue-cli only */ +) { + // Vue.extend constructor export interop + var options = + typeof scriptExports === 'function' ? scriptExports.options : scriptExports + + // render functions + if (render) { + options.render = render + options.staticRenderFns = staticRenderFns + options._compiled = true + } + + // functional template + if (functionalTemplate) { + options.functional = true + } + + // scopedId + if (scopeId) { + options._scopeId = 'data-v-' + scopeId + } + + var hook + if (moduleIdentifier) { + // server build + hook = function (context) { + // 2.3 injection + context = + context || // cached call + (this.$vnode && this.$vnode.ssrContext) || // stateful + (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional + // 2.2 with runInNewContext: true + if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { + context = __VUE_SSR_CONTEXT__ + } + // inject component styles + if (injectStyles) { + injectStyles.call(this, context) + } + // register component module identifier for async chunk inferrence + if (context && context._registeredComponents) { + context._registeredComponents.add(moduleIdentifier) + } + } + // used by ssr in case component is cached and beforeCreate + // never gets called + options._ssrRegister = hook + } else if (injectStyles) { + hook = shadowMode + ? function () { + injectStyles.call( + this, + (options.functional ? this.parent : this).$root.$options.shadowRoot + ) + } + : injectStyles + } + + if (hook) { + if (options.functional) { + // for template-only hot-reload because in that case the render fn doesn't + // go through the normalizer + options._injectStyles = hook + // register for functional component in vue file + var originalRender = options.render + options.render = function renderWithStyleInjection(h, context) { + hook.call(context) + return originalRender(h, context) + } + } else { + // inject component registration as beforeCreate hook + var existing = options.beforeCreate + options.beforeCreate = existing ? [].concat(existing, hook) : [hook] + } + } + + return { + exports: scriptExports, + options: options + } +} + + +/***/ }), + +/***/ "./admin/pages/jfb-payments/PaymentsPage.vue": +/*!***************************************************!*\ + !*** ./admin/pages/jfb-payments/PaymentsPage.vue ***! + \***************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _PaymentsPage_vue_vue_type_template_id_18604964__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PaymentsPage.vue?vue&type=template&id=18604964 */ "./admin/pages/jfb-payments/PaymentsPage.vue?vue&type=template&id=18604964"); +/* harmony import */ var _PaymentsPage_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PaymentsPage.vue?vue&type=script&lang=js */ "./admin/pages/jfb-payments/PaymentsPage.vue?vue&type=script&lang=js"); +/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js"); + + + + + +/* normalize component */ +; +var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])( + _PaymentsPage_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], + _PaymentsPage_vue_vue_type_template_id_18604964__WEBPACK_IMPORTED_MODULE_0__.render, + _PaymentsPage_vue_vue_type_template_id_18604964__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var api; } +component.options.__file = "admin/pages/jfb-payments/PaymentsPage.vue" +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports); + +/***/ }), + +/***/ "./admin/pages/jfb-payments/PaymentsPage.vue?vue&type=script&lang=js": +/*!***************************************************************************!*\ + !*** ./admin/pages/jfb-payments/PaymentsPage.vue?vue&type=script&lang=js ***! + \***************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_wyw_in_js_webpack_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PaymentsPage_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../../node_modules/@wyw-in-js/webpack-loader/lib/index.js!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PaymentsPage.vue?vue&type=script&lang=js */ "../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/@wyw-in-js/webpack-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./admin/pages/jfb-payments/PaymentsPage.vue?vue&type=script&lang=js"); + /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_node_modules_wyw_in_js_webpack_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PaymentsPage_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + +/***/ }), + +/***/ "./admin/pages/jfb-payments/PaymentsPage.vue?vue&type=template&id=18604964": +/*!*********************************************************************************!*\ + !*** ./admin/pages/jfb-payments/PaymentsPage.vue?vue&type=template&id=18604964 ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ render: () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_PaymentsPage_vue_vue_type_template_id_18604964__WEBPACK_IMPORTED_MODULE_0__.render), +/* harmony export */ staticRenderFns: () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_PaymentsPage_vue_vue_type_template_id_18604964__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns) +/* harmony export */ }); +/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_PaymentsPage_vue_vue_type_template_id_18604964__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PaymentsPage.vue?vue&type=template&id=18604964 */ "../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./admin/pages/jfb-payments/PaymentsPage.vue?vue&type=template&id=18604964"); + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +/*!*******************************************!*\ + !*** ./admin/pages/jfb-payments/index.js ***! + \*******************************************/ +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _PaymentsPage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PaymentsPage */ "./admin/pages/jfb-payments/PaymentsPage.vue"); + +const { + PaymentsPage: { + options + } +} = window.JetFBComponents; +const { + renderCurrentPage +} = window.JetFBActions; +options.store = new Vuex.Store(options.store); +renderCurrentPage(_PaymentsPage__WEBPACK_IMPORTED_MODULE_0__["default"], options); +})(); + +/******/ })() +; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRtaW4vcGFnZXMvamZiLXBheW1lbnRzLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFLQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7Ozs7Ozs7Ozs7QUNaQTtBQUNBO0FBQ0E7Ozs7Ozs7Ozs7Ozs7OztBQ0ZBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Q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leHBvcnRzLCAnX19lc01vZHVsZScsIHsgdmFsdWU6IHRydWUgfSk7XG59OyIsImltcG9ydCBQYXltZW50c1BhZ2UgZnJvbSAnLi9QYXltZW50c1BhZ2UnO1xyXG5cclxuY29uc3QgeyBQYXltZW50c1BhZ2U6IHsgb3B0aW9ucyB9IH0gPSB3aW5kb3cuSmV0RkJDb21wb25lbnRzO1xyXG5jb25zdCB7IHJlbmRlckN1cnJlbnRQYWdlIH0gPSB3aW5kb3cuSmV0RkJBY3Rpb25zO1xyXG5cclxub3B0aW9ucy5zdG9yZSA9IG5ldyBWdWV4LlN0b3JlKCBvcHRpb25zLnN0b3JlIClcclxuXHJcbnJlbmRlckN1cnJlbnRQYWdlKCBQYXltZW50c1BhZ2UsIG9wdGlvbnMgKTtcclxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9 \ No newline at end of file diff --git a/modules/gateways/assets/build/admin/pages/payment-print.asset.php b/modules/gateways/assets/build/admin/pages/payment-print.asset.php index b3f58dcf2..b338884ed 100644 --- a/modules/gateways/assets/build/admin/pages/payment-print.asset.php +++ b/modules/gateways/assets/build/admin/pages/payment-print.asset.php @@ -1 +1 @@ - array(), 'version' => '497d5777aa642442f3a7'); + array(), 'version' => '82de8bdd074d3f9b2588'); diff --git a/modules/gateways/assets/build/admin/pages/payment-print.js b/modules/gateways/assets/build/admin/pages/payment-print.js index 0de1caed3..2c6fa4a71 100644 --- a/modules/gateways/assets/build/admin/pages/payment-print.js +++ b/modules/gateways/assets/build/admin/pages/payment-print.js @@ -1 +1,326 @@ -(()=>{"use strict";var e=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("FormBuilderPage",{scopedSlots:e._u([{key:"heading-after",fn:function(){return[r("PrintButton")]},proxy:!0}])},[e._v(" "),r("PostBoxGrid")],1)};e._withStripped=!0;const{PostBoxGrid:t,FormBuilderPage:r,PrintButton:n}=JetFBComponents,{mapGetters:o,mapMutations:i,mapActions:s}=Vuex;var a=function(e,t){var r,n=e;if(t&&(n.render=t,n.staticRenderFns=[],n._compiled=!0),r)if(n.functional){n._injectStyles=r;var o=n.render;n.render=function(e,t){return r.call(t),o(e,t)}}else{var i=n.beforeCreate;n.beforeCreate=i?[].concat(i,r):[r]}return{exports:e,options:n}}({name:"payment-print",components:{PostBoxGrid:t,FormBuilderPage:r,PrintButton:n}},e);const u=a.exports,{BaseStore:c,SingleMetaBoxesPlugin:d}=JetFBStore,{renderCurrentPage:p}=window.JetFBActions;p(u,{store:new Vuex.Store({...c,plugins:[d]})})})(); \ No newline at end of file +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ "../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/@wyw-in-js/webpack-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./admin/pages/payment-print/PaymentPrint.vue?vue&type=script&lang=js": +/*!********************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/@wyw-in-js/webpack-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./admin/pages/payment-print/PaymentPrint.vue?vue&type=script&lang=js ***! + \********************************************************************************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +// +// +// +// +// +// +// +// +// + +const { + PostBoxGrid, + FormBuilderPage, + PrintButton +} = JetFBComponents; +const { + mapGetters, + mapMutations, + mapActions +} = Vuex; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + name: 'payment-print', + components: { + PostBoxGrid, + FormBuilderPage, + PrintButton + } +}); + +/***/ }), + +/***/ "../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./admin/pages/payment-print/PaymentPrint.vue?vue&type=template&id=a92b1dae": +/*!*********************************************************************************************************************************************************************************************************************************************!*\ + !*** ../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./admin/pages/payment-print/PaymentPrint.vue?vue&type=template&id=a92b1dae ***! + \*********************************************************************************************************************************************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ render: () => (/* binding */ render), +/* harmony export */ staticRenderFns: () => (/* binding */ staticRenderFns) +/* harmony export */ }); +var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('FormBuilderPage',{scopedSlots:_vm._u([{key:"heading-after",fn:function(){return [_c('PrintButton')]},proxy:true}])},[_vm._v(" "),_c('PostBoxGrid')],1)} +var staticRenderFns = [] +render._withStripped = true + + +/***/ }), + +/***/ "../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js": +/*!******************************************************************************!*\ + !*** ../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ normalizeComponent) +/* harmony export */ }); +/* globals __VUE_SSR_CONTEXT__ */ + +// IMPORTANT: Do NOT use ES2015 features in this file (except for modules). +// This module is a runtime utility for cleaner component module output and will +// be included in the final webpack user bundle. + +function normalizeComponent( + scriptExports, + render, + staticRenderFns, + functionalTemplate, + injectStyles, + scopeId, + moduleIdentifier /* server only */, + shadowMode /* vue-cli only */ +) { + // Vue.extend constructor export interop + var options = + typeof scriptExports === 'function' ? scriptExports.options : scriptExports + + // render functions + if (render) { + options.render = render + options.staticRenderFns = staticRenderFns + options._compiled = true + } + + // functional template + if (functionalTemplate) { + options.functional = true + } + + // scopedId + if (scopeId) { + options._scopeId = 'data-v-' + scopeId + } + + var hook + if (moduleIdentifier) { + // server build + hook = function (context) { + // 2.3 injection + context = + context || // cached call + (this.$vnode && this.$vnode.ssrContext) || // stateful + (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional + // 2.2 with runInNewContext: true + if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { + context = __VUE_SSR_CONTEXT__ + } + // inject component styles + if (injectStyles) { + injectStyles.call(this, context) + } + // register component module identifier for async chunk inferrence + if (context && context._registeredComponents) { + context._registeredComponents.add(moduleIdentifier) + } + } + // used by ssr in case component is cached and beforeCreate + // never gets called + options._ssrRegister = hook + } else if (injectStyles) { + hook = shadowMode + ? function () { + injectStyles.call( + this, + (options.functional ? this.parent : this).$root.$options.shadowRoot + ) + } + : injectStyles + } + + if (hook) { + if (options.functional) { + // for template-only hot-reload because in that case the render fn doesn't + // go through the normalizer + options._injectStyles = hook + // register for functional component in vue file + var originalRender = options.render + options.render = function renderWithStyleInjection(h, context) { + hook.call(context) + return originalRender(h, context) + } + } else { + // inject component registration as beforeCreate hook + var existing = options.beforeCreate + options.beforeCreate = existing ? [].concat(existing, hook) : [hook] + } + } + + return { + exports: scriptExports, + options: options + } +} + + +/***/ }), + +/***/ "./admin/pages/payment-print/PaymentPrint.vue": +/*!****************************************************!*\ + !*** ./admin/pages/payment-print/PaymentPrint.vue ***! + \****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _PaymentPrint_vue_vue_type_template_id_a92b1dae__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PaymentPrint.vue?vue&type=template&id=a92b1dae */ "./admin/pages/payment-print/PaymentPrint.vue?vue&type=template&id=a92b1dae"); +/* harmony import */ var _PaymentPrint_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PaymentPrint.vue?vue&type=script&lang=js */ "./admin/pages/payment-print/PaymentPrint.vue?vue&type=script&lang=js"); +/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js"); + + + + + +/* normalize component */ +; +var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])( + _PaymentPrint_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], + _PaymentPrint_vue_vue_type_template_id_a92b1dae__WEBPACK_IMPORTED_MODULE_0__.render, + _PaymentPrint_vue_vue_type_template_id_a92b1dae__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var api; } +component.options.__file = "admin/pages/payment-print/PaymentPrint.vue" +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports); + +/***/ }), + +/***/ "./admin/pages/payment-print/PaymentPrint.vue?vue&type=script&lang=js": +/*!****************************************************************************!*\ + !*** ./admin/pages/payment-print/PaymentPrint.vue?vue&type=script&lang=js ***! + \****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_wyw_in_js_webpack_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PaymentPrint_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../../node_modules/@wyw-in-js/webpack-loader/lib/index.js!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PaymentPrint.vue?vue&type=script&lang=js */ "../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/@wyw-in-js/webpack-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./admin/pages/payment-print/PaymentPrint.vue?vue&type=script&lang=js"); + /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_node_modules_wyw_in_js_webpack_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PaymentPrint_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + +/***/ }), + +/***/ "./admin/pages/payment-print/PaymentPrint.vue?vue&type=template&id=a92b1dae": +/*!**********************************************************************************!*\ + !*** ./admin/pages/payment-print/PaymentPrint.vue?vue&type=template&id=a92b1dae ***! + \**********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ render: () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_PaymentPrint_vue_vue_type_template_id_a92b1dae__WEBPACK_IMPORTED_MODULE_0__.render), +/* harmony export */ staticRenderFns: () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_PaymentPrint_vue_vue_type_template_id_a92b1dae__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns) +/* harmony export */ }); +/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_PaymentPrint_vue_vue_type_template_id_a92b1dae__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PaymentPrint.vue?vue&type=template&id=a92b1dae */ "../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./admin/pages/payment-print/PaymentPrint.vue?vue&type=template&id=a92b1dae"); + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +/*!********************************************!*\ + !*** ./admin/pages/payment-print/index.js ***! + \********************************************/ +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _PaymentPrint__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PaymentPrint */ "./admin/pages/payment-print/PaymentPrint.vue"); + +const { + BaseStore, + SingleMetaBoxesPlugin +} = JetFBStore; +const { + renderCurrentPage +} = window.JetFBActions; +const store = new Vuex.Store({ + ...BaseStore, + plugins: [SingleMetaBoxesPlugin] +}); +renderCurrentPage(_PaymentPrint__WEBPACK_IMPORTED_MODULE_0__["default"], { + store +}); +})(); + +/******/ })() +; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRtaW4vcGFnZXMvcGF5bWVudC1wcmludC5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFVQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7Ozs7Ozs7OztBQzdCQTtBQUNBO0FBQ0E7Ozs7Ozs7Ozs7Ozs7OztBQ0ZBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFD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bWVudFByaW50IGZyb20gJy4vUGF5bWVudFByaW50JztcclxuXHJcbmNvbnN0IHtcclxuXHRCYXNlU3RvcmUsXHJcblx0U2luZ2xlTWV0YUJveGVzUGx1Z2luXHJcbn0gPSBKZXRGQlN0b3JlO1xyXG5cclxuY29uc3QgeyByZW5kZXJDdXJyZW50UGFnZSB9ID0gd2luZG93LkpldEZCQWN0aW9ucztcclxuXHJcbmNvbnN0IHN0b3JlID0gbmV3IFZ1ZXguU3RvcmUoIHtcclxuXHQuLi5CYXNlU3RvcmUsXHJcblx0cGx1Z2luczogWyBTaW5nbGVNZXRhQm94ZXNQbHVnaW4gXSxcclxufSApO1xyXG5cclxucmVuZGVyQ3VycmVudFBhZ2UoIFBheW1lbnRQcmludCwgeyBzdG9yZSB9ICk7XHJcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file diff --git a/modules/gateways/assets/build/editor.asset.php b/modules/gateways/assets/build/editor.asset.php index 13a48ddae..7e07c3f73 100644 --- a/modules/gateways/assets/build/editor.asset.php +++ b/modules/gateways/assets/build/editor.asset.php @@ -1 +1 @@ - array('react'), 'version' => '5eff2d4b7b6555167783'); + array('react'), 'version' => '5ff58e063caa9de1f23d'); diff --git a/modules/gateways/assets/build/editor.js b/modules/gateways/assets/build/editor.js index b850180ba..c3f4d7cc8 100644 --- a/modules/gateways/assets/build/editor.js +++ b/modules/gateways/assets/build/editor.js @@ -1 +1,724 @@ -(()=>{"use strict";const e=window.React,{compose:t}=wp.compose,{withSelect:a,withDispatch:n}=wp.data,{__:l}=wp.i18n,{TextControl:o,SelectControl:s,withNotices:i}=wp.components,{useEffect:c}=wp.element,{renderGateway:r}=JetFBActions,{withSelectGateways:w,withDispatchGateways:m}=JetFBHooks,{ToggleControl:y}=JetFBComponents,p=t(a(w),n(m),i)((function({setGatewayRequest:t,gatewaySpecific:a,setGatewaySpecific:n,gatewayScenario:i,setGatewayScenario:w,getSpecificOrGlobal:m,additionalSourceGateway:p,specificGatewayLabel:u,noticeOperations:d,noticeUI:g}){const{id:_="PAY_NOW"}=i;return c((()=>{t({id:_})}),[_]),c((()=>{t({id:_})}),[]),(0,e.createElement)(e.Fragment,null,g,(0,e.createElement)(y,{checked:a.use_global,onChange:e=>n({use_global:e})},l("Use","jet-form-builder")+" ",(0,e.createElement)("a",{href:JetFormEditorData.global_settings_url+"#payments-gateways__paypal"},l("Global Settings","jet-form-builder"))),(0,e.createElement)(o,{label:u("client_id"),key:"paypal_client_id_setting",value:m("client_id"),onChange:e=>n({client_id:e}),disabled:a.use_global}),(0,e.createElement)(o,{label:u("secret"),key:"paypal_secret_setting",value:m("secret"),onChange:e=>n({secret:e}),disabled:a.use_global}),(0,e.createElement)(s,{labelPosition:"side",label:u("gateway_type"),value:_,onChange:e=>{w({id:e})},options:p.scenarios}),r("paypal",{noticeOperations:d},_))})),{compose:u}=wp.compose,{withSelect:d,withDispatch:g}=wp.data,{TextControl:_,SelectControl:f,BaseControl:h,RadioControl:b}=wp.components,{withSelectFormFields:E,withSelectGateways:G,withDispatchGateways:S,withSelectActionsByType:C}=JetFBHooks,{GatewayFetchButton:F}=JetFBComponents,k=u(d(((...e)=>({...E([],"--")(...e),...G(...e)}))),g(((...e)=>({...S(...e)}))))((function({gatewayGeneral:t,gatewaySpecific:a,setGateway:n,setGatewaySpecific:l,formFields:o,getSpecificOrGlobal:s,loadingGateway:i,scenarioSource:c,noticeOperations:r,scenarioLabel:w,globalGatewayLabel:m}){return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(h,{label:w("fetch_button_label")},(0,e.createElement)("div",{className:"jet-user-fields-map__list"},!i.success&&!i.loading&&(0,e.createElement)("span",{className:"description-controls"},w("fetch_button_help")),(0,e.createElement)(F,{initialLabel:w("fetch_button"),label:w("fetch_button_retry"),apiArgs:{...c.fetch,data:{client_id:s("client_id"),secret:s("secret")}},onFail:e=>{r.removeNotice(t.gateway),r.createNotice({status:"error",content:e.message,id:t.gateway})}}))),i.success&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(_,{label:w("currency"),key:"paypal_currency_code_setting",value:a.currency,onChange:e=>l({currency:e})}),(0,e.createElement)(f,{label:m("price_field"),key:"form_fields_price_field",value:t.price_field,labelPosition:"side",onChange:e=>{n({price_field:e})},options:o})))})),{gatewayAttr:v,renderGateway:j,renderGatewayWithPlaceholder:B}=JetFBActions,{__:N}=wp.i18n,{TextareaControl:A,BaseControl:J}=wp.components,{withSelect:R,withDispatch:D}=wp.data,{compose:O}=wp.compose,{withSelectGateways:T,withDispatchGateways:I}=JetFBHooks,L=v(),P=v("labels"),U=O(R(((...e)=>({...T(...e)}))),D(I))((function({gatewayGeneral:t,setGatewayInner:a,loadingGateway:n,gatewayRequest:l,CURRENT_SCENARIO:o,currentScenario:s}){const i=(e,t,n)=>{a({key:e,value:{[t]:n}})},c=(e,a,n=!1)=>t[e]&&t[e][a]?t[e][a]:n,r=(e,t)=>{i("messages",e,t)},w=e=>c("messages",e,L.messages[e]),m=(0,e.createElement)(e.Fragment,null,B(t.gateway,{gatewayGeneral:t,CURRENT_SCENARIO:o,currentScenario:s},"macrosList",(0,e.createElement)(J,{key:"payment_result_macros_base_control"},(0,e.createElement)("h4",null,N("Available macros list: ","jet-form-builder"),(0,e.createElement)("br",null),N("%gateway_amount% - payment amount returned from gateway template;","jet-form-builder"),(0,e.createElement)("br",null),N("%gateway_status% - payment status returned from payment gateway;","jet-form-builder"),(0,e.createElement)("br",null),N('%field_name% - replace "field_name" with any field name from the form;',"jet-form-builder"),(0,e.createElement)("br",null)))),(0,e.createElement)(A,{key:"payment_result_message_success",label:P("message_success"),value:w("success"),onChange:e=>r("success",e)}),(0,e.createElement)(A,{key:"payment_result_message_failed",label:P("message_failed"),value:w("failed"),onChange:e=>r("failed",e)}));return(0,e.createElement)(e.Fragment,null,j(t.gateway,{setValueInObject:i,getNotifications:c}),(-1===l.id||n.success||!l.id.includes(t.gateway))&&m)})),{RadioControl:H,Button:q}=wp.components,{withDispatch:x,withSelect:W}=wp.data,{useState:M,useEffect:Y}=wp.element,{__:V}=wp.i18n,{compose:$}=wp.compose,{ActionModal:z}=JetFBComponents,{withDispatchGateways:K,withSelectGateways:Q,useMetaState:X}=JetFBHooks,Z=window.JetFormEditorData.gateways,ee=$(x(K),W(Q))((function(t){var a;const{setGateway:n,setGatewayScenario:l,clearGateway:o,clearScenario:s,gatewayGeneral:i,gatewayScenario:c}=t,[r,w]=X("_jf_gateways"),[m,y]=M(!1);Y((()=>{m?(n(r),l(r[r.gateway]?.scenario)):(o(),s())}),[m]);const p=(e=!1)=>{!1!==e&&w(e),y(!1)};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(H,{key:"gateways_radio_control",selected:null!==(a=r.gateway)&&void 0!==a?a:"none",options:[{label:"None",value:"none"},...Z.list],onChange:e=>{w({...r,gateway:e})}}),"none"!==r.gateway&&r.gateway&&(0,e.createElement)(q,{onClick:()=>y(!0),icon:"admin-tools",style:{margin:"1em 0"},isSecondary:!0},V("Edit","jet-form-builder")),m&&(0,e.createElement)(z,{classNames:["width-60"],onRequestClose:()=>p(),onCancelClick:()=>p(),onUpdateClick:()=>p({...i,[i.gateway]:{...i[i.gateway]||{},scenario:c}}),title:`Edit ${u=r.gateway,Z.list.find((e=>e.value===u)).label} Settings`},(0,e.createElement)(U,null)));var u})),{__:te}=wp.i18n,ae={base:{name:"jf-gateways-panel",title:te("Gateways Settings","jet-form-builder")},settings:{render:ee,icon:"money-alt"}},{registerGateway:ne}=JetFBActions,{addFilter:le}=wp.hooks,{__:oe}=wp.i18n,se="paypal";ne(se,p),ne(se,k,"PAY_NOW"),le("jet.fb.register.plugin.jf-validation-panel.after","jet-form-builder/gateways",(function(e){return e.push(ae),e}))})(); \ No newline at end of file +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ "./editor/components/gateways-editor.js": +/*!**********************************************!*\ + !*** ./editor/components/gateways-editor.js ***! + \**********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +const { + gatewayAttr, + renderGateway, + renderGatewayWithPlaceholder +} = JetFBActions; +const { + __ +} = wp.i18n; +const { + TextareaControl, + BaseControl +} = wp.components; +const { + withSelect, + withDispatch +} = wp.data; +const { + compose +} = wp.compose; +const { + withSelectGateways, + withDispatchGateways +} = JetFBHooks; +const gatewaysData = gatewayAttr(); +const label = gatewayAttr('labels'); +function GatewaysEditor({ + gatewayGeneral, + setGatewayInner, + loadingGateway, + gatewayRequest, + CURRENT_SCENARIO, + currentScenario +}) { + /** + * Used for set notifications and gateway type settings + * + * @param when + * @param type + * @param newValue + */ + const setValueInObject = (when, type, newValue) => { + setGatewayInner({ + key: when, + value: { + [type]: newValue + } + }); + }; + /** + * Used for get notifications and gateway type settings + * + * @param when + * @param type + * @param isEmptyResult + * @returns {boolean|*} + */ + const getNotifications = (when, type, isEmptyResult = false) => { + if (gatewayGeneral[when] && gatewayGeneral[when][type]) { + return gatewayGeneral[when][type]; + } + return isEmptyResult; + }; + const setResultMessage = (key, value) => { + setValueInObject('messages', key, value); + }; + const getResultMessage = key => { + return getNotifications('messages', key, gatewaysData.messages[key]); + }; + const GatewayFooter = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, renderGatewayWithPlaceholder(gatewayGeneral.gateway, { + gatewayGeneral, + CURRENT_SCENARIO, + currentScenario + }, 'macrosList', (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(BaseControl, { + key: "payment_result_macros_base_control" + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h4", null, __('Available macros list: ', 'jet-form-builder'), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("br", null), __('%gateway_amount% - payment amount returned from gateway template;', 'jet-form-builder'), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("br", null), __('%gateway_status% - payment status returned from payment gateway;', 'jet-form-builder'), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("br", null), __('%field_name% - replace "field_name" with any field name from the form;', 'jet-form-builder'), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("br", null)))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(TextareaControl, { + key: "payment_result_message_success", + label: label('message_success'), + value: getResultMessage('success'), + onChange: newValue => setResultMessage('success', newValue) + }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(TextareaControl, { + key: "payment_result_message_failed", + label: label('message_failed'), + value: getResultMessage('failed'), + onChange: newValue => setResultMessage('failed', newValue) + })); + return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, renderGateway(gatewayGeneral.gateway, { + setValueInObject, + getNotifications + }), (-1 === gatewayRequest.id || loadingGateway.success || !gatewayRequest.id.includes(gatewayGeneral.gateway)) && GatewayFooter); +} +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (compose(withSelect((...props) => ({ + ...withSelectGateways(...props) +})), withDispatch(withDispatchGateways))(GatewaysEditor)); + +/***/ }), + +/***/ "./editor/paypal/main.js": +/*!*******************************!*\ + !*** ./editor/paypal/main.js ***! + \*******************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +const { + compose +} = wp.compose; +const { + withSelect, + withDispatch +} = wp.data; +const { + __ +} = wp.i18n; +const { + TextControl, + SelectControl, + withNotices +} = wp.components; +const { + useEffect +} = wp.element; +const { + renderGateway +} = JetFBActions; +const { + withSelectGateways, + withDispatchGateways +} = JetFBHooks; +const { + ToggleControl +} = JetFBComponents; +function PaypalMain({ + setGatewayRequest, + gatewaySpecific, + setGatewaySpecific, + gatewayScenario, + setGatewayScenario, + getSpecificOrGlobal, + additionalSourceGateway, + specificGatewayLabel, + noticeOperations, + noticeUI +}) { + const { + id: scenario = 'PAY_NOW' + } = gatewayScenario; + useEffect(() => { + setGatewayRequest({ + id: scenario + }); + }, [scenario]); + useEffect(() => { + setGatewayRequest({ + id: scenario + }); + }, []); + return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, noticeUI, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ToggleControl, { + checked: gatewaySpecific.use_global, + onChange: use_global => setGatewaySpecific({ + use_global + }) + }, __('Use', 'jet-form-builder') + ' ', (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { + href: JetFormEditorData.global_settings_url + '#payments-gateways__paypal' + }, __('Global Settings', 'jet-form-builder'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(TextControl, { + label: specificGatewayLabel('client_id'), + key: "paypal_client_id_setting", + value: getSpecificOrGlobal('client_id'), + onChange: client_id => setGatewaySpecific({ + client_id + }), + disabled: gatewaySpecific.use_global + }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(TextControl, { + label: specificGatewayLabel('secret'), + key: "paypal_secret_setting", + value: getSpecificOrGlobal('secret'), + onChange: secret => setGatewaySpecific({ + secret + }), + disabled: gatewaySpecific.use_global + }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(SelectControl, { + labelPosition: "side", + label: specificGatewayLabel('gateway_type'), + value: scenario, + onChange: id => { + setGatewayScenario({ + id + }); + }, + options: additionalSourceGateway.scenarios + }), renderGateway('paypal', { + noticeOperations + }, scenario)); +} +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (compose(withSelect(withSelectGateways), withDispatch(withDispatchGateways), withNotices)(PaypalMain)); + +/***/ }), + +/***/ "./editor/paypal/pay-now-scenario.js": +/*!*******************************************!*\ + !*** ./editor/paypal/pay-now-scenario.js ***! + \*******************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +const { + compose +} = wp.compose; +const { + withSelect, + withDispatch +} = wp.data; +const { + TextControl, + SelectControl, + BaseControl, + RadioControl +} = wp.components; +const { + withSelectFormFields, + withSelectGateways, + withDispatchGateways, + withSelectActionsByType +} = JetFBHooks; +const { + GatewayFetchButton +} = JetFBComponents; +function PayNowScenario({ + gatewayGeneral, + gatewaySpecific, + setGateway, + setGatewaySpecific, + formFields, + getSpecificOrGlobal, + loadingGateway, + scenarioSource, + noticeOperations, + scenarioLabel, + globalGatewayLabel +}) { + const displayNotice = status => response => { + noticeOperations.removeNotice(gatewayGeneral.gateway); + noticeOperations.createNotice({ + status, + content: response.message, + id: gatewayGeneral.gateway + }); + }; + return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(BaseControl, { + label: scenarioLabel('fetch_button_label') + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "jet-user-fields-map__list" + }, !loadingGateway.success && !loadingGateway.loading && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { + className: 'description-controls' + }, scenarioLabel('fetch_button_help')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(GatewayFetchButton, { + initialLabel: scenarioLabel('fetch_button'), + label: scenarioLabel('fetch_button_retry'), + apiArgs: { + ...scenarioSource.fetch, + data: { + client_id: getSpecificOrGlobal('client_id'), + secret: getSpecificOrGlobal('secret') + } + }, + onFail: displayNotice('error') + }))), loadingGateway.success && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(TextControl, { + label: scenarioLabel('currency'), + key: "paypal_currency_code_setting", + value: gatewaySpecific.currency, + onChange: currency => setGatewaySpecific({ + currency + }) + }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(SelectControl, { + label: globalGatewayLabel('price_field'), + key: 'form_fields_price_field', + value: gatewayGeneral.price_field, + labelPosition: "side", + onChange: price_field => { + setGateway({ + price_field + }); + }, + options: formFields + }))); +} +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (compose(withSelect((...props) => ({ + ...withSelectFormFields([], '--')(...props), + ...withSelectGateways(...props) +})), withDispatch((...props) => ({ + ...withDispatchGateways(...props) +})))(PayNowScenario)); + +/***/ }), + +/***/ "./editor/plugin/index.js": +/*!********************************!*\ + !*** ./editor/plugin/index.js ***! + \********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _render__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./render */ "./editor/plugin/render.js"); + +const { + __ +} = wp.i18n; +const base = { + name: 'jf-gateways-panel', + title: __('Gateways Settings', 'jet-form-builder') +}; +const settings = { + render: _render__WEBPACK_IMPORTED_MODULE_0__["default"], + icon: 'money-alt' +}; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + base, + settings +}); + +/***/ }), + +/***/ "./editor/plugin/render.js": +/*!*********************************!*\ + !*** ./editor/plugin/render.js ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _components_gateways_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/gateways-editor */ "./editor/components/gateways-editor.js"); + + +const { + Button, + ToggleControl, + Notice, + __experimentalItemGroup: ItemGroup, + __experimentalItem: Item +} = wp.components; +const { + withDispatch, + withSelect, + useSelect, + dispatch +} = wp.data; +const { + useState, + useEffect +} = wp.element; +const { + __ +} = wp.i18n; +const { + compose +} = wp.compose; +const { + createBlock +} = wp.blocks; +const { + ActionModal +} = JetFBComponents; +const { + withDispatchGateways, + withSelectGateways, + useMetaState +} = JetFBHooks; +const gatewaysData = window.JetFormEditorData.gateways; +const MODE_SINGLE = 'single'; +const MODE_MANUAL = 'manual'; +const MULTI_GATEWAY_BLOCK = 'jet-forms/multi-gateway'; +const getGatewayLabel = type => { + return gatewaysData.list.find(el => el.value === type)?.label || type; +}; +const hasBlockRecursive = (blocks, name) => { + for (const block of blocks) { + if (block.name === name) { + return true; + } + if (block.innerBlocks?.length && hasBlockRecursive(block.innerBlocks, name)) { + return true; + } + } + return false; +}; +function PluginGateways(props) { + var _meta$gateway; + const { + setGateway, + setGatewayScenario, + clearGateway, + clearScenario, + gatewayGeneral, + gatewayScenario + } = props; + const [meta, setMeta] = useMetaState('_jf_gateways'); + const [isEdit, setEdit] = useState(false); + + // UI-selected value (can be "manual" without touching meta.gateway) + const [selectedGateway, setSelectedGateway] = useState((_meta$gateway = meta?.gateway) !== null && _meta$gateway !== void 0 ? _meta$gateway : 'none'); + + // which gateway is currently being edited in modal + const [editGateway, setEditGateway] = useState(null); + const isManualMode = meta?.mode === MODE_MANUAL; + const hasMultiGatewayBlock = useSelect(select => { + const editor = select('core/block-editor'); + if (!editor?.getBlocks) { + return false; + } + return hasBlockRecursive(editor.getBlocks(), MULTI_GATEWAY_BLOCK); + }, []); + const insertMultiGatewayBlock = () => { + dispatch('core/block-editor').insertBlocks(createBlock(MULTI_GATEWAY_BLOCK)); + }; + useEffect(() => { + var _meta$gateway2; + if (isManualMode) { + setSelectedGateway(MODE_MANUAL); + return; + } + setSelectedGateway((_meta$gateway2 = meta?.gateway) !== null && _meta$gateway2 !== void 0 ? _meta$gateway2 : 'none'); + }, [meta?.gateway, meta?.mode]); + useEffect(() => { + if (!isEdit) { + clearGateway(); + clearScenario(); + return; + } + const gw = editGateway || meta?.gateway; + if (!gw || gw === 'none') { + return; + } + if (isManualMode && !editGateway) { + return; + } + setGateway({ + ...meta, + gateway: gw + }); + setGatewayScenario(meta?.[gw]?.scenario); + }, [isEdit, editGateway]); + const closeModal = (newMeta = false) => { + if (false !== newMeta) { + setMeta(newMeta); + } + setEdit(false); + setEditGateway(null); + }; + const options = [{ + label: 'None', + value: 'none' + }, ...gatewaysData.list, { + label: 'Manual', + value: MODE_MANUAL + }]; + const styles = { + row: { + display: 'flex', + alignItems: 'center', + justifyContent: 'space-between', + width: '100%' + }, + item: { + display: 'flex', + minHeight: '50px', + flexDirection: 'column', + justifyContent: 'center' + }, + toggle: { + paddingTop: '10px', + flexDirection: 'column' + }, + notice: { + marginTop: '10px' + }, + notice__btn: { + marginLeft: '0' + } + }; + return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ItemGroup, { + className: "jfb-gateways", + isBordered: true, + isSeparated: true + }, options.map(opt => { + const isSelected = selectedGateway === opt.value; + const canEdit = opt.value !== 'none' && opt.value !== MODE_MANUAL && (isManualMode || isSelected); + const canToggle = isManualMode && opt.value !== 'none' && opt.value !== MODE_MANUAL; + return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Item, { + key: opt.value, + className: "jfb-gateways__item", + style: styles.item + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "jfb-gateways__row", + style: styles.row + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { + className: "jfb-gateways__option" + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", { + type: "radio", + name: "jfb_gateway", + value: opt.value, + checked: isSelected, + onChange: () => { + setSelectedGateway(opt.value); + if (opt.value === MODE_MANUAL) { + setMeta({ + ...meta, + mode: MODE_MANUAL + }); + return; + } + setMeta({ + ...meta, + mode: MODE_SINGLE, + gateway: opt.value + }); + } + }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { + className: "jfb-gateways__label" + }, opt.label)), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "jfb-gateways__actions" + }, canEdit ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, { + onClick: () => { + setEditGateway(opt.value); + setEdit(true); + }, + icon: "admin-tools", + isSecondary: true, + size: "small" + }, __('Edit', 'jet-form-builder')) : + // spacer to prevent jumps + (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { + className: "jfb-gateways__edit-spacer", + "aria-hidden": "true" + }))), canToggle && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "jfb-gateways__toggle", + style: styles.toggle + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ToggleControl, { + label: __('Show on frontend', 'jet-form-builder'), + checked: !!meta?.[opt.value]?.show_on_front, + onChange: value => { + setMeta({ + ...meta, + [opt.value]: { + ...(meta?.[opt.value] || {}), + show_on_front: value + } + }); + } + })), opt.value === MODE_MANUAL && isManualMode && !hasMultiGatewayBlock && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "jfb-gateways__notice", + style: styles.notice + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Notice, { + status: "warning", + isDismissible: false + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, __('To display gateways on the frontend in Manual mode, add the Multi Gateway block to the form.', 'jet-form-builder')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, { + isSecondary: true, + onClick: insertMultiGatewayBlock, + size: "small", + style: styles.notice__btn + }, __('Add block', 'jet-form-builder'))))); + })), isEdit && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ActionModal, { + classNames: ['width-60'], + onRequestClose: () => closeModal(), + onCancelClick: () => closeModal(), + onUpdateClick: () => closeModal({ + ...gatewayGeneral, + [gatewayGeneral.gateway]: { + ...(gatewayGeneral[gatewayGeneral.gateway] || {}), + scenario: gatewayScenario + } + }), + title: `Edit ${getGatewayLabel(editGateway || meta?.gateway)} Settings` + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_gateways_editor__WEBPACK_IMPORTED_MODULE_1__["default"], null))); +} +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (compose(withDispatch(withDispatchGateways), withSelect(withSelectGateways))(PluginGateways)); + +/***/ }), + +/***/ "react": +/*!************************!*\ + !*** external "React" ***! + \************************/ +/***/ ((module) => { + +module.exports = window["React"]; + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +/*!************************!*\ + !*** ./editor/main.js ***! + \************************/ +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _paypal_main__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./paypal/main */ "./editor/paypal/main.js"); +/* harmony import */ var _paypal_pay_now_scenario__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./paypal/pay-now-scenario */ "./editor/paypal/pay-now-scenario.js"); +/* harmony import */ var _plugin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./plugin */ "./editor/plugin/index.js"); + + + +const { + registerGateway +} = JetFBActions; +const { + addFilter +} = wp.hooks; +const { + __ +} = wp.i18n; +const gatewayID = 'paypal'; +registerGateway(gatewayID, _paypal_main__WEBPACK_IMPORTED_MODULE_0__["default"]); +registerGateway(gatewayID, _paypal_pay_now_scenario__WEBPACK_IMPORTED_MODULE_1__["default"], 'PAY_NOW'); +addFilter('jet.fb.register.plugin.jf-validation-panel.after', 'jet-form-builder/gateways', function (plugins) { + plugins.push(_plugin__WEBPACK_IMPORTED_MODULE_2__["default"]); + return plugins; +}); +})(); + +/******/ })() +; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWRpdG9yLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQUE7QUFBQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUFBO0FBQUE7QUFHQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Q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L3BsdWdpbic7XHJcblxyXG5jb25zdCB7XHJcblx0ICAgICAgcmVnaXN0ZXJHYXRld2F5LFxyXG4gICAgICB9ID0gSmV0RkJBY3Rpb25zO1xyXG5cclxuY29uc3Qge1xyXG5cdCAgICAgIGFkZEZpbHRlcixcclxuICAgICAgfSA9IHdwLmhvb2tzO1xyXG5cclxuY29uc3QgeyBfXyB9ID0gd3AuaTE4bjtcclxuXHJcbmNvbnN0IGdhdGV3YXlJRCA9ICdwYXlwYWwnO1xyXG5cclxucmVnaXN0ZXJHYXRld2F5KFxyXG5cdGdhdGV3YXlJRCxcclxuXHRQYXlwYWxNYWluLFxyXG4pO1xyXG5cclxucmVnaXN0ZXJHYXRld2F5KFxyXG5cdGdhdGV3YXlJRCxcclxuXHRQYXlOb3dTY2VuYXJpbyxcclxuXHQnUEFZX05PVycsXHJcbik7XHJcblxyXG5hZGRGaWx0ZXIoXHJcblx0J2pldC5mYi5yZWdpc3Rlci5wbHVnaW4uamYtdmFsaWRhdGlvbi1wYW5lbC5hZnRlcicsXHJcblx0J2pldC1mb3JtLWJ1aWxkZXIvZ2F0ZXdheXMnLFxyXG5cdGZ1bmN0aW9uICggcGx1Z2lucyApIHtcclxuXHRcdHBsdWdpbnMucHVzaCggZ2F0ZXdheVBsdWdpbiApO1xyXG5cclxuXHRcdHJldHVybiBwbHVnaW5zO1xyXG5cdH0sXHJcbik7Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9 \ No newline at end of file diff --git a/modules/gateways/assets/src/editor/plugin/render.js b/modules/gateways/assets/src/editor/plugin/render.js index c3f8594b2..b0f040ba4 100644 --- a/modules/gateways/assets/src/editor/plugin/render.js +++ b/modules/gateways/assets/src/editor/plugin/render.js @@ -1,121 +1,291 @@ import GatewaysEditor from '../components/gateways-editor'; const { - RadioControl, - Button, - } = wp.components; + Button, + ToggleControl, + Notice, + __experimentalItemGroup: ItemGroup, + __experimentalItem: Item, +} = wp.components; -const { - withDispatch, - withSelect, - } = wp.data; +const { withDispatch, withSelect, useSelect, dispatch } = wp.data; +const { useState, useEffect } = wp.element; +const { __ } = wp.i18n; +const { compose } = wp.compose; +const { createBlock } = wp.blocks; -const { - useState, - useEffect, - } = wp.element; -const { - __, - } = wp.i18n; -const { - compose, - } = wp.compose; +const { ActionModal } = JetFBComponents; const { - ActionModal, - } = JetFBComponents; -const { - withDispatchGateways, - withSelectGateways, - useMetaState, - } = JetFBHooks; + withDispatchGateways, + withSelectGateways, + useMetaState, +} = JetFBHooks; const gatewaysData = window.JetFormEditorData.gateways; +const MODE_SINGLE = 'single'; +const MODE_MANUAL = 'manual'; + +const MULTI_GATEWAY_BLOCK = 'jet-forms/multi-gateway'; + const getGatewayLabel = ( type ) => { - return ( - gatewaysData.list.find( el => el.value === type ).label - ); + return gatewaysData.list.find( el => el.value === type )?.label || type; }; -function PluginGateways( props ) { +const hasBlockRecursive = ( blocks, name ) => { + for ( const block of blocks ) { + if ( block.name === name ) { + return true; + } + if ( block.innerBlocks?.length && hasBlockRecursive( block.innerBlocks, name ) ) { + return true; + } + } + return false; +}; +function PluginGateways( props ) { const { - setGateway, - setGatewayScenario, - clearGateway, - clearScenario, - gatewayGeneral, - gatewayScenario, - } = props; - - const [ meta, setMeta ] = useMetaState( '_jf_gateways' ); + setGateway, + setGatewayScenario, + clearGateway, + clearScenario, + gatewayGeneral, + gatewayScenario, + } = props; + + const [ meta, setMeta ] = useMetaState( '_jf_gateways' ); const [ isEdit, setEdit ] = useState( false ); + // UI-selected value (can be "manual" without touching meta.gateway) + const [ selectedGateway, setSelectedGateway ] = useState( meta?.gateway ?? 'none' ); + + // which gateway is currently being edited in modal + const [ editGateway, setEditGateway ] = useState( null ); + + const isManualMode = meta?.mode === MODE_MANUAL; + + const hasMultiGatewayBlock = useSelect( + ( select ) => { + const editor = select( 'core/block-editor' ); + if ( !editor?.getBlocks ) { + return false; + } + return hasBlockRecursive( editor.getBlocks(), MULTI_GATEWAY_BLOCK ); + }, + [] + ); + + const insertMultiGatewayBlock = () => { + dispatch( 'core/block-editor' ).insertBlocks( + createBlock( MULTI_GATEWAY_BLOCK ) + ); + }; + useEffect( () => { - if ( isEdit ) { - setGateway( meta ); - setGatewayScenario( - meta[ meta.gateway ]?.scenario ); + if ( isManualMode ) { + setSelectedGateway( MODE_MANUAL ); + return; } - else { + setSelectedGateway( meta?.gateway ?? 'none' ); + }, [ meta?.gateway, meta?.mode ] ); + + useEffect( () => { + if ( !isEdit ) { clearGateway(); clearScenario(); + return; } - }, [ isEdit ] ); + + const gw = editGateway || meta?.gateway; + + if ( !gw || gw === 'none' ) { + return; + } + + if ( isManualMode && !editGateway ) { + return; + } + + setGateway( { ...meta, gateway: gw } ); + setGatewayScenario( meta?.[ gw ]?.scenario ); + }, [ isEdit, editGateway ] ); const closeModal = ( newMeta = false ) => { if ( false !== newMeta ) { setMeta( newMeta ); } setEdit( false ); + setEditGateway( null ); }; - return <> - { - setMeta( { ...meta, gateway } ); - } } - /> - { ( - 'none' !== meta.gateway && meta.gateway - ) && } - - { isEdit && ( - closeModal() } - onCancelClick={ () => closeModal() } - onUpdateClick={ () => closeModal( { - ...gatewayGeneral, - [ gatewayGeneral.gateway ]: { - ...( - gatewayGeneral[ gatewayGeneral.gateway ] || {} - ), - scenario: gatewayScenario, - }, + const options = [ + { label: 'None', value: 'none' }, + ...gatewaysData.list, + { label: 'Manual', value: MODE_MANUAL }, + ]; + + const styles = { + row: { + display: 'flex', + alignItems: 'center', + justifyContent: 'space-between', + width: '100%', + }, + item: { + display: 'flex', + minHeight: '50px', + flexDirection: 'column', + justifyContent: 'center', + }, + toggle: { + paddingTop: '10px', + flexDirection: 'column', + }, + notice: { + marginTop: '10px', + }, + notice__btn: { + marginLeft: '0', + } + }; + + return ( + <> + + { options.map( ( opt ) => { + const isSelected = selectedGateway === opt.value; + + const canEdit = + opt.value !== 'none' + && opt.value !== MODE_MANUAL + && ( isManualMode || isSelected ); + + const canToggle = + isManualMode + && opt.value !== 'none' + && opt.value !== MODE_MANUAL; + + return ( + +
+ + +
+ { canEdit ? ( + + ) : ( + // spacer to prevent jumps +
+
+ + { canToggle && ( +
+ { + setMeta( { + ...meta, + [ opt.value ]: { + ...( meta?.[ opt.value ] || {} ), + show_on_front: value, + }, + } ); + } } + /> +
+ ) } + + { opt.value === MODE_MANUAL && isManualMode && !hasMultiGatewayBlock && ( +
+ + +
+ { __( + 'To display gateways on the frontend in Manual mode, add the Multi Gateway block to the form.', + 'jet-form-builder' + ) } +
+ + + +
+
+ ) } +
+ ); } ) } - title={ `Edit ${ getGatewayLabel( meta.gateway ) } Settings` } - > - -
- ) } - ; + + + { isEdit && ( + closeModal() } + onCancelClick={ () => closeModal() } + onUpdateClick={ () => closeModal( { + ...gatewayGeneral, + [ gatewayGeneral.gateway ]: { + ...( gatewayGeneral[ gatewayGeneral.gateway ] || {} ), + scenario: gatewayScenario, + }, + } ) } + title={ `Edit ${ getGatewayLabel( editGateway || meta?.gateway ) } Settings` } + > + + + ) } + + ); } export default compose( diff --git a/modules/html-parser/assets/build/parser.asset.php b/modules/html-parser/assets/build/parser.asset.php index cbf9e16e9..116fd0c29 100644 --- a/modules/html-parser/assets/build/parser.asset.php +++ b/modules/html-parser/assets/build/parser.asset.php @@ -1 +1 @@ - array(), 'version' => '068ab8b170c6d65bc80c'); + array(), 'version' => '5688eb8ce1330f0c2256'); diff --git a/modules/html-parser/assets/build/parser.js b/modules/html-parser/assets/build/parser.js index 15e13287b..67b575c58 100644 --- a/modules/html-parser/assets/build/parser.js +++ b/modules/html-parser/assets/build/parser.js @@ -1,2 +1,2 @@ /*! For license information please see parser.js.LICENSE.txt */ -(()=>{var e={12:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((function(e){return e.charCodeAt(0)})))},259:(e,t,r)=>{"use strict";let n=r(4318),i=r(6973);class s extends Error{constructor(e,t,r,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==t&&void 0!==r&&("number"==typeof t?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=n.isColorSupported);let r=e=>e,s=e=>e,o=e=>e;if(e){let{bold:e,gray:t,red:a}=n.createColors(!0);s=t=>e(a(t)),r=e=>t(e),i&&(o=e=>i(e))}let a=t.split(/\r?\n/),l=Math.max(this.line-3,0),c=Math.min(this.line+2,a.length),u=String(c).length;return a.slice(l,c).map(((e,t)=>{let n=l+1+t,i=" "+(" "+n).slice(-u)+" | ";if(n===this.line){if(e.length>160){let t=20,n=Math.max(0,this.column-t),a=Math.max(this.column+t,this.endColumn+t),l=e.slice(n,a),c=r(i.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,t-1)).replace(/[^\t]/g," ");return s(">")+r(i)+o(l)+"\n "+c+s("^")}let t=r(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(i)+o(e)+"\n "+t+s("^")}return" "+r(i)+o(e)})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=s,s.default=s},349:(e,t)=>{"use strict";function r(e){for(var t=1;t{"use strict";let n=r(1173);class i{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new n(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}}e.exports=i,i.default=i},874:()=>{},887:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCodePoint=t.fromCodePoint=void 0;var n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function i(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=n.get(e))&&void 0!==t?t:e}t.fromCodePoint=null!==(r=String.fromCodePoint)&&void 0!==r?r:function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+String.fromCharCode(e)},t.replaceCodePoint=i,t.default=function(e){return(0,t.fromCodePoint)(i(e))}},1047:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r");case a.Comment:return"\x3c!--".concat(e.data,"--\x3e");case a.CDATA:return function(e){return"")}(e);case a.Script:case a.Style:case a.Tag:return function(e,t){var r;"foreign"===t.xmlMode&&(e.name=null!==(r=c.elementNames.get(e.name))&&void 0!==r?r:e.name,e.parent&&m.has(e.parent.name)&&(t=n(n({},t),{xmlMode:!1}))),!t.xmlMode&&g.has(e.name)&&(t=n(n({},t),{xmlMode:"foreign"}));var i="<".concat(e.name),s=function(e,t){var r;if(e){var n=!1===(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)?h:t.xmlMode||"utf8"!==t.encodeEntities?l.encodeXML:l.escapeAttribute;return Object.keys(e).map((function(r){var i,s,o=null!==(i=e[r])&&void 0!==i?i:"";return"foreign"===t.xmlMode&&(r=null!==(s=c.attributeNames.get(r))&&void 0!==s?s:r),t.emptyAttrs||t.xmlMode||""!==o?"".concat(r,'="').concat(n(o),'"'):r})).join(" ")}}(e.attribs,t);return s&&(i+=" ".concat(s)),0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&d.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=p(e.children,t)),!t.xmlMode&&d.has(e.name)||(i+=""))),i}(e,t);case a.Text:return function(e,t){var r,n=e.data||"";return!1===(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)||!t.xmlMode&&e.parent&&u.has(e.parent.name)||(n=t.xmlMode||"utf8"!==t.encodeEntities?(0,l.encodeXML)(n):(0,l.escapeText)(n)),n}(e,t)}}t.render=p,t.default=p;var m=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),g=new Set(["svg","math"])},1173:e=>{"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},1176:(e,t,r)=>{"use strict";let n=r(5621);class i extends n{constructor(e){super(e),this.type="comment"}}e.exports=i,i.default=i},1210:(e,t,r)=>{"use strict";let n=r(6099),i=r(3922);const s=r(780);let o=r(9068);r(3471);class a{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=i;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){let i;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let a=o;this.result=new s(this._processor,i,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get:()=>l.root});let c=new n(a,i,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}}e.exports=a,a.default=a},1281:(e,t,r)=>{"use strict";let n=r(5621);class i extends n{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}}e.exports=i,i.default=i},1866:()=>{},2133:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,i(r(3380),t),i(r(7427),t),i(r(2472),t),i(r(6841),t),i(r(5622),t),i(r(3632),t),i(r(9332),t);var s=r(4576);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return s.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return s.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return s.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return s.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return s.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return s.hasChildren}})},2312:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.getCodePoint=t.xmlReplacer=void 0,t.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var r=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);function n(e){for(var n,i="",s=0;null!==(n=t.xmlReplacer.exec(e));){var o=n.index,a=e.charCodeAt(o),l=r.get(a);void 0!==l?(i+=e.substring(s,o)+l,s=o+1):(i+="".concat(e.substring(s,o),"&#x").concat((0,t.getCodePoint)(e,o).toString(16),";"),s=t.xmlReplacer.lastIndex+=Number(55296==(64512&a)))}return i+e.substr(s)}function i(e,t){return function(r){for(var n,i=0,s="";n=e.exec(r);)i!==n.index&&(s+=r.substring(i,n.index)),s+=t.get(n[0].charCodeAt(0)),i=n.index+1;return s+r.substring(i)}}t.getCodePoint=null!=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){return 55296==(64512&e.charCodeAt(t))?1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t)},t.encodeXML=n,t.escape=n,t.escapeUTF8=i(/[&<>'"]/g,r),t.escapeAttribute=i(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),t.escapeText=i(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))},2472:(e,t)=>{"use strict";function r(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children,r=t.lastIndexOf(e);r>=0&&t.splice(r,1)}e.next=null,e.prev=null,e.parent=null}Object.defineProperty(t,"__esModule",{value:!0}),t.removeElement=r,t.replaceElement=function(e,t){var r=t.prev=e.prev;r&&(r.next=t);var n=t.next=e.next;n&&(n.prev=t);var i=t.parent=e.parent;if(i){var s=i.children;s[s.lastIndexOf(e)]=t,e.parent=null}},t.appendChild=function(e,t){if(r(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null},t.append=function(e,t){r(t);var n=e.parent,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=n,i){if(i.prev=t,n){var s=n.children;s.splice(s.lastIndexOf(i),0,t)}}else n&&n.children.push(t)},t.prependChild=function(e,t){if(r(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){var n=e.children[1];n.prev=t,t.next=n}else t.next=null},t.prepend=function(e,t){r(t);var n=e.parent;if(n){var i=n.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}},2648:(e,t,r)=>{"use strict";let n,i,s=r(9062);class o extends s{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new n(new i,this,e).stringify()}}o.registerLazyResult=e=>{n=e},o.registerProcessor=e=>{i=e},e.exports=o,o.default=o},2803:e=>{"use strict";const t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class r{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let i=(e.raws.between||"")+(t?";":"");this.builder(r+n+i,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&"root"!==n.type;)i+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n{if(i=e.raws[r],void 0!==i)return!1}))}var a;return void 0===i&&(i=t[n]),o.rawCache[n]=i,i}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}e.exports=r,r.default=r},2957:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var o=s(r(6181)),a=r(6861),l=new Set(["input","option","optgroup","select","button","datalist","textarea"]),c=new Set(["p"]),u=new Set(["thead","tbody"]),h=new Set(["dd","dt"]),d=new Set(["rt","rp"]),p=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",c],["h1",c],["h2",c],["h3",c],["h4",c],["h5",c],["h6",c],["select",l],["input",l],["output",l],["button",l],["datalist",l],["textarea",l],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",h],["dt",h],["address",c],["article",c],["aside",c],["blockquote",c],["details",c],["div",c],["dl",c],["fieldset",c],["figcaption",c],["figure",c],["footer",c],["form",c],["header",c],["hr",c],["main",c],["nav",c],["ol",c],["pre",c],["section",c],["table",c],["ul",c],["rt",d],["rp",d],["tbody",u],["tfoot",u]]),f=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),m=new Set(["math","svg"]),g=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),b=/\s|\//,y=function(){function e(e,t){var r,n,i,s,a;void 0===t&&(t={}),this.options=t,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!==(r=t.lowerCaseTags)&&void 0!==r?r:!t.xmlMode,this.lowerCaseAttributeNames=null!==(n=t.lowerCaseAttributeNames)&&void 0!==n?n:!t.xmlMode,this.tokenizer=new(null!==(i=t.Tokenizer)&&void 0!==i?i:o.default)(this.options,this),null===(a=(s=this.cbs).onparserinit)||void 0===a||a.call(s,this)}return e.prototype.ontext=function(e,t){var r,n,i=this.getSlice(e,t);this.endIndex=t-1,null===(n=(r=this.cbs).ontext)||void 0===n||n.call(r,i),this.startIndex=t},e.prototype.ontextentity=function(e){var t,r,n=this.tokenizer.getSectionStart();this.endIndex=n-1,null===(r=(t=this.cbs).ontext)||void 0===r||r.call(t,(0,a.fromCodePoint)(e)),this.startIndex=n},e.prototype.isVoidElement=function(e){return!this.options.xmlMode&&f.has(e)},e.prototype.onopentagname=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);this.lowerCaseTagNames&&(r=r.toLowerCase()),this.emitOpenTag(r)},e.prototype.emitOpenTag=function(e){var t,r,n,i;this.openTagStart=this.startIndex,this.tagname=e;var s=!this.options.xmlMode&&p.get(e);if(s)for(;this.stack.length>0&&s.has(this.stack[this.stack.length-1]);){var o=this.stack.pop();null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,o,!0)}this.isVoidElement(e)||(this.stack.push(e),m.has(e)?this.foreignContext.push(!0):g.has(e)&&this.foreignContext.push(!1)),null===(i=(n=this.cbs).onopentagname)||void 0===i||i.call(n,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(e){var t,r;this.startIndex=this.openTagStart,this.attribs&&(null===(r=(t=this.cbs).onopentag)||void 0===r||r.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},e.prototype.onclosetag=function(e,t){var r,n,i,s,o,a;this.endIndex=t;var l=this.getSlice(e,t);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),(m.has(l)||g.has(l))&&this.foreignContext.pop(),this.isVoidElement(l))this.options.xmlMode||"br"!==l||(null===(n=(r=this.cbs).onopentagname)||void 0===n||n.call(r,"br"),null===(s=(i=this.cbs).onopentag)||void 0===s||s.call(i,"br",{},!0),null===(a=(o=this.cbs).onclosetag)||void 0===a||a.call(o,"br",!1));else{var c=this.stack.lastIndexOf(l);if(-1!==c)if(this.cbs.onclosetag)for(var u=this.stack.length-c;u--;)this.cbs.onclosetag(this.stack.pop(),0!==u);else this.stack.length=c;else this.options.xmlMode||"p"!==l||(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1},e.prototype.onselfclosingtag=function(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)},e.prototype.closeCurrentTag=function(e){var t,r,n=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===n&&(null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,n,!e),this.stack.pop())},e.prototype.onattribname=function(e,t){this.startIndex=e;var r=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r},e.prototype.onattribdata=function(e,t){this.attribvalue+=this.getSlice(e,t)},e.prototype.onattribentity=function(e){this.attribvalue+=(0,a.fromCodePoint)(e)},e.prototype.onattribend=function(e,t){var r,n;this.endIndex=t,null===(n=(r=this.cbs).onattribute)||void 0===n||n.call(r,this.attribname,this.attribvalue,e===o.QuoteType.Double?'"':e===o.QuoteType.Single?"'":e===o.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(b),r=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r},e.prototype.ondeclaration=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("!".concat(n),"!".concat(r))}this.startIndex=t+1},e.prototype.onprocessinginstruction=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("?".concat(n),"?".concat(r))}this.startIndex=t+1},e.prototype.oncomment=function(e,t,r){var n,i,s,o;this.endIndex=t,null===(i=(n=this.cbs).oncomment)||void 0===i||i.call(n,this.getSlice(e,t-r)),null===(o=(s=this.cbs).oncommentend)||void 0===o||o.call(s),this.startIndex=t+1},e.prototype.oncdata=function(e,t,r){var n,i,s,o,a,l,c,u,h,d;this.endIndex=t;var p=this.getSlice(e,t-r);this.options.xmlMode||this.options.recognizeCDATA?(null===(i=(n=this.cbs).oncdatastart)||void 0===i||i.call(n),null===(o=(s=this.cbs).ontext)||void 0===o||o.call(s,p),null===(l=(a=this.cbs).oncdataend)||void 0===l||l.call(a)):(null===(u=(c=this.cbs).oncomment)||void 0===u||u.call(c,"[CDATA[".concat(p,"]]")),null===(d=(h=this.cbs).oncommentend)||void 0===d||d.call(h)),this.startIndex=t+1},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var r=this.stack.length;r>0;this.cbs.onclosetag(this.stack[--r],!0));}null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,r,n;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,null===(n=(r=this.cbs).onparserinit)||void 0===n||n.call(r,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.getSlice=function(e,t){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var r=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,t-this.bufferOffset);return r},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))},e.prototype.end=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLAttribute=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.DecodingMode=t.EntityDecoder=t.encodeHTML5=t.encodeHTML4=t.encodeNonAsciiHTML=t.encodeHTML=t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.encode=t.decodeStrict=t.decode=t.EncodingMode=t.EntityLevel=void 0;var n,i,s=r(6861),o=r(9061),a=r(2312);function l(e,t){if(void 0===t&&(t=n.XML),("number"==typeof t?t:t.level)===n.HTML){var r="object"==typeof t?t.mode:void 0;return(0,s.decodeHTML)(e,r)}return(0,s.decodeXML)(e)}!function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"}(n=t.EntityLevel||(t.EntityLevel={})),function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"}(i=t.EncodingMode||(t.EncodingMode={})),t.decode=l,t.decodeStrict=function(e,t){var r;void 0===t&&(t=n.XML);var i="number"==typeof t?{level:t}:t;return null!==(r=i.mode)&&void 0!==r||(i.mode=s.DecodingMode.Strict),l(e,i)},t.encode=function(e,t){void 0===t&&(t=n.XML);var r="number"==typeof t?{level:t}:t;return r.mode===i.UTF8?(0,a.escapeUTF8)(e):r.mode===i.Attribute?(0,a.escapeAttribute)(e):r.mode===i.Text?(0,a.escapeText)(e):r.level===n.HTML?r.mode===i.ASCII?(0,o.encodeNonAsciiHTML)(e):(0,o.encodeHTML)(e):(0,a.encodeXML)(e)};var c=r(2312);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return c.encodeXML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return c.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return c.escapeUTF8}}),Object.defineProperty(t,"escapeAttribute",{enumerable:!0,get:function(){return c.escapeAttribute}}),Object.defineProperty(t,"escapeText",{enumerable:!0,get:function(){return c.escapeText}});var u=r(9061);Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return u.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return u.encodeNonAsciiHTML}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return u.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return u.encodeHTML}});var h=r(6861);Object.defineProperty(t,"EntityDecoder",{enumerable:!0,get:function(){return h.EntityDecoder}}),Object.defineProperty(t,"DecodingMode",{enumerable:!0,get:function(){return h.DecodingMode}}),Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return h.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTMLAttribute",{enumerable:!0,get:function(){return h.decodeHTMLAttribute}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return h.decodeXML}})},3149:(e,t,r)=>{"use strict";let n=r(2648),i=r(4333),s=r(1210),o=r(9901);class a{constructor(e=[]){this.version="8.5.3",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new i(this,e,t):new s(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=a,a.default=a,o.registerProcessor(a),n.registerProcessor(a)},3380:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getOuterHTML=a,t.getInnerHTML=function(e,t){return(0,i.hasChildren)(e)?e.children.map((function(e){return a(e,t)})).join(""):""},t.getText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.isTag)(t)?"br"===t.name?"\n":e(t.children):(0,i.isCDATA)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.textContent=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&!(0,i.isComment)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.innerText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&(t.type===o.ElementType.Tag||(0,i.isCDATA)(t))?e(t.children):(0,i.isText)(t)?t.data:""};var i=r(4576),s=n(r(1047)),o=r(8788);function a(e,t){return(0,s.default)(e,t)}},3407:e=>{"use strict";e.exports=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},3471:e=>{"use strict";let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},3632:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentPosition=void 0,t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0)e.splice(t,1);else for(var n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e},t.compareDocumentPosition=s,t.uniqueSort=function(e){return(e=e.filter((function(e,t,r){return!r.includes(e,t+1)}))).sort((function(e,t){var r=s(e,t);return r&n.PRECEDING?-1:r&n.FOLLOWING?1:0})),e};var n,i=r(4576);function s(e,t){var r=[],s=[];if(e===t)return 0;for(var o=(0,i.hasChildren)(e)?e:e.parent;o;)r.unshift(o),o=o.parent;for(o=(0,i.hasChildren)(t)?t:t.parent;o;)s.unshift(o),o=o.parent;for(var a=Math.min(r.length,s.length),l=0;lu.indexOf(d)?c===t?n.FOLLOWING|n.CONTAINED_BY:n.FOLLOWING:c===e?n.PRECEDING|n.CONTAINS:n.PRECEDING}!function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"}(n||(t.DocumentPosition=n={}))},3663:(e,t)=>{"use strict";function r(e){return"[object Object]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=function(e){var t,n;return!1!==r(e)&&(void 0===(t=e.constructor)||!1!==r(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}},3708:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((function(e){return e.charCodeAt(0)})))},3838:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=this&&this.__assign||function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=d;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=o.ElementType.CDATA,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(d);t.CDATA=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=o.ElementType.Root,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(d);t.Document=f;var m=function(e){function t(t,r,n,i){void 0===n&&(n=[]),void 0===i&&(i="script"===t?o.ElementType.Script:"style"===t?o.ElementType.Style:o.ElementType.Tag);var s=e.call(this,n)||this;return s.name=t,s.attribs=r,s.type=i,s}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var r,n;return{name:t,value:e.attribs[t],namespace:null===(r=e["x-attribsNamespace"])||void 0===r?void 0:r[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}}))},enumerable:!1,configurable:!0}),t}(d);function g(e){return(0,o.isTag)(e)}function b(e){return e.type===o.ElementType.CDATA}function y(e){return e.type===o.ElementType.Text}function v(e){return e.type===o.ElementType.Comment}function w(e){return e.type===o.ElementType.Directive}function x(e){return e.type===o.ElementType.Root}function S(e,t){var r;if(void 0===t&&(t=!1),y(e))r=new c(e.data);else if(v(e))r=new u(e.data);else if(g(e)){var n=t?T(e.children):[],i=new m(e.name,s({},e.attribs),n);n.forEach((function(e){return e.parent=i})),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=s({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=s({},e["x-attribsPrefix"])),r=i}else if(b(e)){n=t?T(e.children):[];var o=new p(n);n.forEach((function(e){return e.parent=o})),r=o}else if(x(e)){n=t?T(e.children):[];var a=new f(n);n.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),r=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new h(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),r=l}return r.startIndex=e.startIndex,r.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function T(e){for(var t=e.map((function(e){return S(e,!0)})),r=1;r{"use strict";let n=r(9062),i=r(6173),s=r(5266);function o(e,t){let r=new i(e,t),n=new s(r);try{n.parse()}catch(e){throw e}return n.root}e.exports=o,o.default=o,n.registerParse(o)},4318:e=>{var t=String,r=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};e.exports=r(),e.exports.createColors=r},4333:(e,t,r)=>{"use strict";let n=r(9062),i=r(2648),s=r(6099),o=r(3922),a=r(780),l=r(9901),c=r(9068),{isClean:u,my:h}=r(6644);r(3471);const d={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},p={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},f={Once:!0,postcssPlugin:!0,prepare:!0};function m(e){return"object"==typeof e&&"function"==typeof e.then}function g(e){let t=!1,r=d[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function b(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:g(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function y(e){return e[u]=!1,e.nodes&&e.nodes.forEach((e=>y(e))),e}let v={};class w{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,r){let i;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof w||t instanceof a)i=y(t.root),t.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let e=o;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{i=e(t,r)}catch(e){this.processed=!0,this.error=e}i&&!i[h]&&n.rebuild(i)}else i=y(t);this.result=new a(e,i,r),this.helpers={...v,postcss:v,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!p[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let e=this.visitTick(t);if(m(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return m(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=c;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new s(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(m(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[u];)e[u]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(m(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:n}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(n.length>0&&t.visitorIndex{e[u]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}}w.registerPostcss=e=>{v=e},e.exports=w,w.default=w,l.registerLazyResult(w),i.registerLazyResult(w)},4576:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var s=r(8788),o=r(3838);i(r(3838),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,r){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(r=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=r?r:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var r=this.options.xmlMode?s.ElementType.Tag:void 0,n=new o.Element(e,t,void 0,r);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===s.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var r=new o.Text(e);this.addNode(r),this.lastNode=r}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===s.ElementType.Comment)this.lastNode.data+=e;else{var t=new o.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new o.Text(""),t=new o.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var r=new o.ProcessingInstruction(e,t);this.addNode(r)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],r=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),r&&(e.prev=r,r.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},5266:(e,t,r)=>{"use strict";let n=r(5571),i=r(1176),s=r(1281),o=r(9901),a=r(9463),l=r(6120);const c={empty:!0,space:!0};e.exports=class{constructor(e){this.input=e,this.root=new o,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,i,s=new n;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);let o=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(l.length>0){for(i=l.length-1,r=l[i];r&&"space"===r[0];)r=l[--i];r&&(s.source.end=this.getPosition(r[3]||r[2]),s.source.end.offset++)}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(s.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(s,"params",l),o&&(e=l[l.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,n=0;for(let i=t-1;i>=0&&(r=e[i],"space"===r[0]||(n+=1,2!==n));i--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,n,i=0;for(let[s,o]of e.entries()){if(r=o,n=r[0],"("===n&&(i+=1),")"===n&&(i-=1),0===i&&":"===n){if(t){if("word"===t[0]&&"progid"===t[1])continue;return s}this.doubleColon(r)}t=r}return!1}comment(e){let t=new i;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=l(this.input)}decl(e,t){let r=new s;this.init(r,e[0][2]);let n,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(n=e.shift(),":"===n[0]){r.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,a=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(n=e[t],"!important"===n[1].toLowerCase()){r.important=!0;let n=this.stringFrom(e,t);n=this.spacesFromEnd(e)+n," !important"!==n&&(r.raws.important=n);break}if("important"===n[1].toLowerCase()){let n=e.slice(0),i="";for(let e=t;e>0;e--){let t=n[e][0];if(i.trim().startsWith("!")&&"space"!==t)break;i=n.pop()[1]+i}i.trim().startsWith("!")&&(r.important=!0,r.raws.important=i,e=n)}if("space"!==n[0]&&"comment"!==n[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=a.map((e=>e[1])).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new a;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,i=null,s=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)i||(i=l),s.push("("===r?")":"]");else if(o&&n&&"{"===r)i||(i=l),s.push("}");else if(0===s.length){if(";"===r){if(n)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(i=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),s.length>0&&this.unclosedBracket(i),t&&n){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let i,s,o,a,l=r.length,u="",h=!0;for(let e=0;ee+t[1]),"");e.raws[t]={raw:n,value:u}}e[t]=u}rule(e){e.pop();let t=new a;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let n=t;n{"use strict";let n=r(9062);class i extends n{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=i,i.default=i,n.registerAtRule(i)},5621:(e,t,r)=>{"use strict";let n=r(259),i=r(2803),s=r(9068),{isClean:o,my:a}=r(6644);function l(e,t){let r=new e.constructor;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if("proxyCache"===n)continue;let i=e[n],s=typeof i;"parent"===n&&"object"===s?t&&(r[n]=t):"source"===n?r[n]=i:Array.isArray(i)?r[n]=i.map((e=>l(e,r))):("object"===s&&null!==i&&(i=l(i)),r[n]=i)}return r}function c(e,t){if(t&&void 0!==t.offset)return t.offset;let r=1,n=1,i=0;for(let s=0;s"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markClean(){this[o]=!0}markDirty(){if(this[o]){this[o]=!1;let e=this;for(;e=e.parent;)e[o]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,n=r.slice(c(r,this.source.start),c(r,this.source.end)).indexOf(e.word);-1!==n&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,r=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,i=c(n,this.source.start),s=i+e;for(let e=i;e"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){let s=t.get(n.input);null==s&&(s=i,t.set(n.input,i),i++),r[e]={end:n.end,inputId:s,start:n.start}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=s){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}}e.exports=u,u.default=u},5622:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.testElement=function(e,t){var r=l(e);return!r||r(t)},t.getElements=function(e,t,r,n){void 0===n&&(n=1/0);var s=l(e);return s?(0,i.filter)(s,t,r,n):[]},t.getElementById=function(e,t,r){return void 0===r&&(r=!0),Array.isArray(t)||(t=[t]),(0,i.findOne)(o("id",e),t,r)},t.getElementsByTagName=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,i.filter)(s.tag_name(e),t,r,n)},t.getElementsByClassName=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,i.filter)(o("class",e),t,r,n)},t.getElementsByTagType=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,i.filter)(s.tag_type(e),t,r,n)};var n=r(4576),i=r(6841),s={tag_name:function(e){return"function"==typeof e?function(t){return(0,n.isTag)(t)&&e(t.name)}:"*"===e?n.isTag:function(t){return(0,n.isTag)(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return(0,n.isText)(t)&&e(t.data)}:function(t){return(0,n.isText)(t)&&t.data===e}}};function o(e,t){return"function"==typeof t?function(r){return(0,n.isTag)(r)&&t(r.attribs[e])}:function(r){return(0,n.isTag)(r)&&r.attribs[e]===t}}function a(e,t){return function(r){return e(r)||t(r)}}function l(e){var t=Object.keys(e).map((function(t){var r=e[t];return Object.prototype.hasOwnProperty.call(s,t)?s[t](r):o(t,r)}));return 0===t.length?null:t.reduce(a)}},5653:e=>{"use strict";let t={comma:e=>t.split(e,[","],!0),space:e=>t.split(e,[" ","\n","\t"]),split(e,t,r){let n=[],i="",s=!1,o=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?o+=1:")"===r?o>0&&(o-=1):0===o&&t.includes(r)&&(s=!0),s?(""!==i&&n.push(i.trim()),i="",s=!1):i+=r;return(r||""!==i)&&n.push(i.trim()),n}};e.exports=t,t.default=t},5887:()=>{},5923:(e,t,r)=>{"use strict";let{existsSync:n,readFileSync:i}=r(874),{dirname:s,join:o}=r(8818),{SourceMapConsumer:a,SourceMapGenerator:l}=r(5887);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=s(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new a(this.text)),this.consumerCache}decodeInline(e){let t=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(t)return decodeURIComponent(e.substr(t[0].length));let r=e.match(/^data:application\/json;charset=utf-?8;base64,/)||e.match(/^data:application\/json;base64,/);if(r)return n=e.substr(r[0].length),Buffer?Buffer.from(n,"base64").toString():window.atob(n);var n;let i=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=s(e),n(e))return this.mapFile=e,i(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof a)return l.fromSourceMap(t).toString();if(t instanceof l)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=o(s(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}e.exports=c,c.default=c},6099:(e,t,r)=>{"use strict";let{dirname:n,relative:i,resolve:s,sep:o}=r(8818),{SourceMapConsumer:a,SourceMapGenerator:l}=r(5887),{pathToFileURL:c}=r(1866),u=r(6173),h=Boolean(a&&l),d=Boolean(n&&s&&i&&o);e.exports=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),i=e.root||n(e.file);!1===this.mapOpts.sourcesContent?(t=new a(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),d&&h&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=l.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new l({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new l({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,n=1,i="",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(s.generated.line=r,s.generated.column=n-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=i,s.original.line=1,s.original.column=0,this.map.addMapping(s))),t=o.match(/\n/g),t?(r+=t.length,e=o.lastIndexOf("\n"),n=o.length-e):n+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=r,s.generated.column=n-2,this.map.addMapping(s)):(s.source=i,s.original.line=1,s.original.column=0,s.generated.line=r,s.generated.column=n-1,this.map.addMapping(s)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?n(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=n(s(r,this.mapOpts.annotation)));let o=i(r,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new u(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(c){let t=c(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===o&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}}},6120:e=>{"use strict";const t="'".charCodeAt(0),r='"'.charCodeAt(0),n="\\".charCodeAt(0),i="/".charCodeAt(0),s="\n".charCodeAt(0),o=" ".charCodeAt(0),a="\f".charCodeAt(0),l="\t".charCodeAt(0),c="\r".charCodeAt(0),u="[".charCodeAt(0),h="]".charCodeAt(0),d="(".charCodeAt(0),p=")".charCodeAt(0),f="{".charCodeAt(0),m="}".charCodeAt(0),g=";".charCodeAt(0),b="*".charCodeAt(0),y=":".charCodeAt(0),v="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,T=/[\da-f]/i;e.exports=function(e,E={}){let A,C,k,O,N,I,P,D,L,q,M=e.css.valueOf(),B=E.ignoreErrors,j=M.length,R=0,_=[],U=[];function H(t){throw e.error("Unclosed "+t,R)}return{back:function(e){U.push(e)},endOfFile:function(){return 0===U.length&&R>=j},nextToken:function(e){if(U.length)return U.pop();if(R>=j)return;let E=!!e&&e.ignoreUnclosed;switch(A=M.charCodeAt(R),A){case s:case o:case l:case c:case a:O=R;do{O+=1,A=M.charCodeAt(O)}while(A===o||A===s||A===l||A===c||A===a);I=["space",M.slice(R,O)],R=O-1;break;case u:case h:case f:case m:case y:case g:case p:{let e=String.fromCharCode(A);I=[e,e,R];break}case d:if(q=_.length?_.pop()[1]:"",L=M.charCodeAt(R+1),"url"===q&&L!==t&&L!==r&&L!==o&&L!==s&&L!==l&&L!==a&&L!==c){O=R;do{if(P=!1,O=M.indexOf(")",O+1),-1===O){if(B||E){O=R;break}H("bracket")}for(D=O;M.charCodeAt(D-1)===n;)D-=1,P=!P}while(P);I=["brackets",M.slice(R,O+1),R,O],R=O}else O=M.indexOf(")",R+1),C=M.slice(R,O+1),-1===O||S.test(C)?I=["(","(",R]:(I=["brackets",C,R,O],R=O);break;case t:case r:N=A===t?"'":'"',O=R;do{if(P=!1,O=M.indexOf(N,O+1),-1===O){if(B||E){O=R+1;break}H("string")}for(D=O;M.charCodeAt(D-1)===n;)D-=1,P=!P}while(P);I=["string",M.slice(R,O+1),R,O],R=O;break;case v:w.lastIndex=R+1,w.test(M),O=0===w.lastIndex?M.length-1:w.lastIndex-2,I=["at-word",M.slice(R,O+1),R,O],R=O;break;case n:for(O=R,k=!0;M.charCodeAt(O+1)===n;)O+=1,k=!k;if(A=M.charCodeAt(O+1),k&&A!==i&&A!==o&&A!==s&&A!==l&&A!==c&&A!==a&&(O+=1,T.test(M.charAt(O)))){for(;T.test(M.charAt(O+1));)O+=1;M.charCodeAt(O+1)===o&&(O+=1)}I=["word",M.slice(R,O+1),R,O],R=O;break;default:A===i&&M.charCodeAt(R+1)===b?(O=M.indexOf("*/",R+2)+1,0===O&&(B||E?O=M.length:H("comment")),I=["comment",M.slice(R,O+1),R,O],R=O):(x.lastIndex=R+1,x.test(M),O=0===x.lastIndex?M.length-1:x.lastIndex-2,I=["word",M.slice(R,O+1),R,O],_.push(I),R=O)}return R++,I},position:function(){return R}}}},6173:(e,t,r)=>{"use strict";let{nanoid:n}=r(6703),{isAbsolute:i,resolve:s}=r(8818),{SourceMapConsumer:o,SourceMapGenerator:a}=r(5887),{fileURLToPath:l,pathToFileURL:c}=r(1866),u=r(259),h=r(5923),d=r(6973),p=Symbol("fromOffsetCache"),f=Boolean(o&&a),m=Boolean(s&&i);class g{get from(){return this.file||this.id}constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!m||/^\w+:\/\//.test(t.from)||i(t.from)?this.file=t.from:this.file=s(t.from)),m&&f){let e=new h(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let i,s,o;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);s=e.line,i=e.col}else s=n.line,i=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,s,i);return o=a?new u(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,n.plugin):new u(e,void 0===s?t:{column:r,line:t},void 0===s?r:{column:i,line:s},this.css,this.file,n.plugin),o.input={column:r,endColumn:i,endLine:s,line:t,source:this.css},this.file&&(c&&(o.input.url=c(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[p])r=this[p];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let n=0,i=e.length;n=t)n=r.length-1;else{let t,i=r.length-2;for(;n>1),e=r[t+1])){n=t;break}n=t+1}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:s(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){if(!this.map)return!1;let s,o,a=this.map.consumer(),u=a.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof r&&(s=a.originalPositionFor({column:n,line:r})),o=i(u.source)?c(u.source):new URL(u.source,this.map.consumer().sourceRoot||c(this.map.mapFile));let h={column:u.column,endColumn:s&&s.column,endLine:s&&s.line,line:u.line,url:o.toString()};if("file:"===o.protocol){if(!l)throw new Error("file: protocol is not available in this PostCSS build");h.file=l(o)}let d=a.sourceContentFor(u.source);return d&&(h.source=d),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}}e.exports=g,g.default=g,d&&d.registerInput&&d.registerInput(g)},6181:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteType=void 0;var n,i,s,o=r(6861);function a(e){return e===n.Space||e===n.NewLine||e===n.Tab||e===n.FormFeed||e===n.CarriageReturn}function l(e){return e===n.Slash||e===n.Gt||a(e)}function c(e){return e>=n.Zero&&e<=n.Nine}!function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"}(n||(n={})),function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.SpecialStartSequence=23]="SpecialStartSequence",e[e.InSpecialTag=24]="InSpecialTag",e[e.BeforeEntity=25]="BeforeEntity",e[e.BeforeNumericEntity=26]="BeforeNumericEntity",e[e.InNamedEntity=27]="InNamedEntity",e[e.InNumericEntity=28]="InNumericEntity",e[e.InHexEntity=29]="InHexEntity"}(i||(i={})),function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"}(s=t.QuoteType||(t.QuoteType={}));var u={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},h=function(){function e(e,t){var r=e.xmlMode,n=void 0!==r&&r,s=e.decodeEntities,a=void 0===s||s;this.cbs=t,this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=n,this.decodeEntities=a,this.entityTrie=n?o.xmlDecodeTree:o.htmlDecodeTree}return e.prototype.reset=function(){this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},e.prototype.write=function(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()},e.prototype.end=function(){this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=i.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===n.Amp&&(this.state=i.BeforeEntity)},e.prototype.stateSpecialStartSequence=function(e){var t=this.sequenceIndex===this.currentSequence.length;if(t?l(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.isSpecial=!1;this.sequenceIndex=0,this.state=i.InTagName,this.stateInTagName(e)},e.prototype.stateInSpecialTag=function(e){if(this.sequenceIndex===this.currentSequence.length){if(e===n.Gt||a(e)){var t=this.index-this.currentSequence.length;if(this.sectionStart=n.LowerA&&e<=n.LowerZ||e>=n.UpperA&&e<=n.UpperZ}(e)},e.prototype.startSpecial=function(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=i.SpecialStartSequence},e.prototype.stateBeforeTagName=function(e){if(e===n.ExclamationMark)this.state=i.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===n.Questionmark)this.state=i.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){var t=32|e;this.sectionStart=this.index,this.xmlMode||t!==u.TitleEnd[2]?this.state=this.xmlMode||t!==u.ScriptEnd[2]?i.InTagName:i.BeforeSpecialS:this.startSpecial(u.TitleEnd,3)}else e===n.Slash?this.state=i.BeforeClosingTagName:(this.state=i.Text,this.stateText(e))},e.prototype.stateInTagName=function(e){l(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateBeforeClosingTagName=function(e){a(e)||(e===n.Gt?this.state=i.Text:(this.state=this.isTagStartChar(e)?i.InClosingTagName:i.InSpecialComment,this.sectionStart=this.index))},e.prototype.stateInClosingTagName=function(e){(e===n.Gt||a(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterClosingTagName,this.stateAfterClosingTagName(e))},e.prototype.stateAfterClosingTagName=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.state=i.Text,this.baseState=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeAttributeName=function(e){e===n.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=i.InSpecialTag,this.sequenceIndex=0):this.state=i.Text,this.baseState=this.state,this.sectionStart=this.index+1):e===n.Slash?this.state=i.InSelfClosingTag:a(e)||(this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateInSelfClosingTag=function(e){e===n.Gt?(this.cbs.onselfclosingtag(this.index),this.state=i.Text,this.baseState=i.Text,this.sectionStart=this.index+1,this.isSpecial=!1):a(e)||(this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateInAttributeName=function(e){(e===n.Eq||l(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterAttributeName,this.stateAfterAttributeName(e))},e.prototype.stateAfterAttributeName=function(e){e===n.Eq?this.state=i.BeforeAttributeValue:e===n.Slash||e===n.Gt?(this.cbs.onattribend(s.NoValue,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):a(e)||(this.cbs.onattribend(s.NoValue,this.index),this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateBeforeAttributeValue=function(e){e===n.DoubleQuote?(this.state=i.InAttributeValueDq,this.sectionStart=this.index+1):e===n.SingleQuote?(this.state=i.InAttributeValueSq,this.sectionStart=this.index+1):a(e)||(this.sectionStart=this.index,this.state=i.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))},e.prototype.handleInAttributeValue=function(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===n.DoubleQuote?s.Double:s.Single,this.index),this.state=i.BeforeAttributeName):this.decodeEntities&&e===n.Amp&&(this.baseState=this.state,this.state=i.BeforeEntity)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,n.DoubleQuote)},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,n.SingleQuote)},e.prototype.stateInAttributeValueNoQuotes=function(e){a(e)||e===n.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(s.Unquoted,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===n.Amp&&(this.baseState=this.state,this.state=i.BeforeEntity)},e.prototype.stateBeforeDeclaration=function(e){e===n.OpeningSquareBracket?(this.state=i.CDATASequence,this.sequenceIndex=0):this.state=e===n.Dash?i.BeforeComment:i.InDeclaration},e.prototype.stateInDeclaration=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateInProcessingInstruction=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeComment=function(e){e===n.Dash?(this.state=i.InCommentLike,this.currentSequence=u.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=i.InDeclaration},e.prototype.stateInSpecialComment=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeSpecialS=function(e){var t=32|e;t===u.ScriptEnd[3]?this.startSpecial(u.ScriptEnd,4):t===u.StyleEnd[3]?this.startSpecial(u.StyleEnd,4):(this.state=i.InTagName,this.stateInTagName(e))},e.prototype.stateBeforeEntity=function(e){this.entityExcess=1,this.entityResult=0,e===n.Number?this.state=i.BeforeNumericEntity:e===n.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=i.InNamedEntity,this.stateInNamedEntity(e))},e.prototype.stateInNamedEntity=function(e){if(this.entityExcess+=1,this.trieIndex=(0,o.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,e),this.trieIndex<0)return this.emitNamedEntity(),void this.index--;this.trieCurrent=this.entityTrie[this.trieIndex];var t=this.trieCurrent&o.BinTrieFlags.VALUE_LENGTH;if(t){var r=(t>>14)-1;if(this.allowLegacyEntity()||e===n.Semi){var i=this.index-this.entityExcess+1;i>this.sectionStart&&this.emitPartial(this.sectionStart,i),this.entityResult=this.trieIndex,this.trieIndex+=r,this.entityExcess=0,this.sectionStart=this.index+1,0===r&&this.emitNamedEntity()}else this.trieIndex+=r}},e.prototype.emitNamedEntity=function(){if(this.state=this.baseState,0!==this.entityResult)switch((this.entityTrie[this.entityResult]&o.BinTrieFlags.VALUE_LENGTH)>>14){case 1:this.emitCodePoint(this.entityTrie[this.entityResult]&~o.BinTrieFlags.VALUE_LENGTH);break;case 2:this.emitCodePoint(this.entityTrie[this.entityResult+1]);break;case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}},e.prototype.stateBeforeNumericEntity=function(e){(32|e)===n.LowerX?(this.entityExcess++,this.state=i.InHexEntity):(this.state=i.InNumericEntity,this.stateInNumericEntity(e))},e.prototype.emitNumericEntity=function(e){var t=this.index-this.entityExcess-1;t+2+Number(this.state===i.InHexEntity)!==this.index&&(t>this.sectionStart&&this.emitPartial(this.sectionStart,t),this.sectionStart=this.index+Number(e),this.emitCodePoint((0,o.replaceCodePoint)(this.entityResult))),this.state=this.baseState},e.prototype.stateInNumericEntity=function(e){e===n.Semi?this.emitNumericEntity(!0):c(e)?(this.entityResult=10*this.entityResult+(e-n.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.stateInHexEntity=function(e){e===n.Semi?this.emitNumericEntity(!0):c(e)?(this.entityResult=16*this.entityResult+(e-n.Zero),this.entityExcess++):function(e){return e>=n.UpperA&&e<=n.UpperF||e>=n.LowerA&&e<=n.LowerF}(e)?(this.entityResult=16*this.entityResult+((32|e)-n.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===i.Text||this.baseState===i.InSpecialTag)},e.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===i.Text||this.state===i.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):this.state!==i.InAttributeValueDq&&this.state!==i.InAttributeValueSq&&this.state!==i.InAttributeValueNq||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},e.prototype.shouldContinue=function(){return this.index{"use strict";let n=r(5571),i=r(1176),s=r(1281),o=r(6173),a=r(5923),l=r(9901),c=r(9463);function u(e,t){if(Array.isArray(e))return e.map((e=>u(e)));let{inputs:r,...h}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:o.prototype};r.map&&(r.map={...r.map,__proto__:a.prototype}),t.push(r)}}if(h.nodes&&(h.nodes=e.nodes.map((e=>u(e,t)))),h.source){let{inputId:e,...r}=h.source;h.source=r,null!=e&&(h.source.input=t[e])}if("root"===h.type)return new l(h);if("decl"===h.type)return new s(h);if("rule"===h.type)return new c(h);if("comment"===h.type)return new i(h);if("atrule"===h.type)return new n(h);throw new Error("Unknown node type: "+e.type)}e.exports=u,u.default=u},6644:e=>{"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},6703:e=>{e.exports={nanoid:(e=21)=>{let t="",r=0|e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let n="",i=0|r;for(;i--;)n+=e[Math.random()*e.length|0];return n}}},6841:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filter=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),i(e,Array.isArray(t)?t:[t],r,n)},t.find=i,t.findOneChild=function(e,t){return t.find(e)},t.findOne=function e(t,r,i){void 0===i&&(i=!0);for(var s=Array.isArray(r)?r:[r],o=0;o0){var l=e(t,a.children,!0);if(l)return l}}return null},t.existsOne=function e(t,r){return(Array.isArray(r)?r:[r]).some((function(r){return(0,n.isTag)(r)&&t(r)||(0,n.hasChildren)(r)&&e(t,r.children)}))},t.findAll=function(e,t){for(var r=[],i=[Array.isArray(t)?t:[t]],s=[0];;)if(s[0]>=i[0].length){if(1===i.length)return r;i.shift(),s.shift()}else{var o=i[0][s[0]++];(0,n.isTag)(o)&&e(o)&&r.push(o),(0,n.hasChildren)(o)&&o.children.length>0&&(s.unshift(0),i.unshift(o.children))}};var n=r(4576);function i(e,t,r,i){for(var s=[],o=[Array.isArray(t)?t:[t]],a=[0];;)if(a[0]>=o[0].length){if(1===a.length)return s;o.shift(),a.shift()}else{var l=o[0][a[0]++];if(e(l)&&(s.push(l),--i<=0))return s;r&&(0,n.hasChildren)(l)&&l.children.length>0&&(a.unshift(0),o.unshift(l.children))}}},6861:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXML=t.decodeHTMLStrict=t.decodeHTMLAttribute=t.decodeHTML=t.determineBranch=t.EntityDecoder=t.DecodingMode=t.BinTrieFlags=t.fromCodePoint=t.replaceCodePoint=t.decodeCodePoint=t.xmlDecodeTree=t.htmlDecodeTree=void 0;var a=o(r(3708));t.htmlDecodeTree=a.default;var l=o(r(12));t.xmlDecodeTree=l.default;var c=s(r(887));t.decodeCodePoint=c.default;var u,h,d,p,f=r(887);function m(e){return e>=u.ZERO&&e<=u.NINE}Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return f.replaceCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return f.fromCodePoint}}),function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(u||(u={})),function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(h=t.BinTrieFlags||(t.BinTrieFlags={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(d||(d={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(p=t.DecodingMode||(t.DecodingMode={}));var g=function(){function e(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=d.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=p.Strict}return e.prototype.startEntity=function(e){this.decodeMode=e,this.state=d.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},e.prototype.write=function(e,t){switch(this.state){case d.EntityStart:return e.charCodeAt(t)===u.NUM?(this.state=d.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=d.NamedEntity,this.stateNamedEntity(e,t));case d.NumericStart:return this.stateNumericStart(e,t);case d.NumericDecimal:return this.stateNumericDecimal(e,t);case d.NumericHex:return this.stateNumericHex(e,t);case d.NamedEntity:return this.stateNamedEntity(e,t)}},e.prototype.stateNumericStart=function(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===u.LOWER_X?(this.state=d.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=d.NumericDecimal,this.stateNumericDecimal(e,t))},e.prototype.addToNumericResult=function(e,t,r,n){if(t!==r){var i=r-t;this.result=this.result*Math.pow(n,i)+parseInt(e.substr(t,i),n),this.consumed+=i}},e.prototype.stateNumericHex=function(e,t){for(var r,n=t;t=u.UPPER_A&&r<=u.UPPER_F||r>=u.LOWER_A&&r<=u.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(i,3);t+=1}return this.addToNumericResult(e,n,t,16),-1},e.prototype.stateNumericDecimal=function(e,t){for(var r=t;t>14;t=u.UPPER_A&&e<=u.UPPER_Z||e>=u.LOWER_A&&e<=u.LOWER_Z||m(e)}(o)))?0:this.emitNotTerminatedNamedEntity();if(0!=(i=((n=r[this.treeIndex])&h.VALUE_LENGTH)>>14)){if(s===u.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==p.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}var o;return-1},e.prototype.emitNotTerminatedNamedEntity=function(){var e,t=this.result,r=(this.decodeTree[t]&h.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed},e.prototype.emitNamedEntityData=function(e,t,r){var n=this.decodeTree;return this.emitCodePoint(1===t?n[e]&~h.VALUE_LENGTH:n[e+1],r),3===t&&this.emitCodePoint(n[e+2],r),r},e.prototype.end=function(){var e;switch(this.state){case d.NamedEntity:return 0===this.result||this.decodeMode===p.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case d.NumericDecimal:return this.emitNumericEntity(0,2);case d.NumericHex:return this.emitNumericEntity(0,3);case d.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case d.EntityStart:return 0}},e}();function b(e){var t="",r=new g(e,(function(e){return t+=(0,c.fromCodePoint)(e)}));return function(e,n){for(var i=0,s=0;(s=e.indexOf("&",s))>=0;){t+=e.slice(i,s),r.startEntity(n);var o=r.write(e,s+1);if(o<0){i=s+r.end();break}i=s+o,s=0===o?i+1:i}var a=t+e.slice(i);return t="",a}}function y(e,t,r,n){var i=(t&h.BRANCH_LENGTH)>>7,s=t&h.JUMP_TABLE;if(0===i)return 0!==s&&n===s?r:-1;if(s){var o=n-s;return o<0||o>=i?-1:e[r+o]-1}for(var a=r,l=a+i-1;a<=l;){var c=a+l>>>1,u=e[c];if(un))return e[c+i];l=c-1}}return-1}t.EntityDecoder=g,t.determineBranch=y;var v=b(a.default),w=b(l.default);t.decodeHTML=function(e,t){return void 0===t&&(t=p.Legacy),v(e,t)},t.decodeHTMLAttribute=function(e){return v(e,p.Attribute)},t.decodeHTMLStrict=function(e){return v(e,p.Strict)},t.decodeXML=function(e){return w(e,p.Strict)}},6973:()=>{},7427:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getChildren=i,t.getParent=s,t.getSiblings=function(e){var t=s(e);if(null!=t)return i(t);for(var r=[e],n=e.prev,o=e.next;null!=n;)r.unshift(n),n=n.prev;for(;null!=o;)r.push(o),o=o.next;return r},t.getAttributeValue=function(e,t){var r;return null===(r=e.attribs)||void 0===r?void 0:r[t]},t.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]},t.getName=function(e){return e.name},t.nextElementSibling=function(e){for(var t=e.next;null!==t&&!(0,n.isTag)(t);)t=t.next;return t},t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!(0,n.isTag)(t);)t=t.prev;return t};var n=r(4576);function i(e){return(0,n.hasChildren)(e)?e.children:[]}function s(e){return e.parent||null}},8059:(e,t,r)=>{const n=r(616),i=r(3407),{isPlainObject:s}=r(3663),o=r(9465),a=r(9369),{parse:l}=r(9044),c=["img","audio","video","picture","svg","object","map","iframe","embed"],u=["script","style"];function h(e,t){e&&Object.keys(e).forEach((function(r){t(e[r],r)}))}function d(e,t){return{}.hasOwnProperty.call(e,t)}function p(e,t){const r=[];return h(e,(function(e){t(e)&&r.push(e)})),r}e.exports=m;const f=/^[^\0\t\n\f\r /<=>]+$/;function m(e,t,r){if(null==e)return"";"number"==typeof e&&(e=e.toString());let b="",y="";function v(e,t){const r=this;this.tag=e,this.attribs=t||{},this.tagPosition=b.length,this.text="",this.openingTagLength=0,this.mediaChildren=[],this.updateParentNodeText=function(){I.length&&(I[I.length-1].text+=r.text)},this.updateParentNodeMediaChildren=function(){I.length&&c.includes(this.tag)&&I[I.length-1].mediaChildren.push(this.tag)}}(t=Object.assign({},m.defaults,t)).parser=Object.assign({},g,t.parser);const w=function(e){return!1===t.allowedTags||(t.allowedTags||[]).indexOf(e)>-1};u.forEach((function(e){w(e)&&!t.allowVulnerableTags&&console.warn(`\n\n⚠️ Your \`allowedTags\` option includes, \`${e}\`, which is inherently\nvulnerable to XSS attacks. Please remove it from \`allowedTags\`.\nOr, to disable this warning, add the \`allowVulnerableTags\` option\nand ensure you are accounting for this risk.\n\n`)}));const x=t.nonTextTags||["script","style","textarea","option"];let S,T;t.allowedAttributes&&(S={},T={},h(t.allowedAttributes,(function(e,t){S[t]=[];const r=[];e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?r.push(i(e).replace(/\\\*/g,".*")):S[t].push(e)})),r.length&&(T[t]=new RegExp("^("+r.join("|")+")$"))})));const E={},A={},C={};h(t.allowedClasses,(function(e,t){if(S&&(d(S,t)||(S[t]=[]),S[t].push("class")),E[t]=e,Array.isArray(e)){const r=[];E[t]=[],C[t]=[],e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?r.push(i(e).replace(/\\\*/g,".*")):e instanceof RegExp?C[t].push(e):E[t].push(e)})),r.length&&(A[t]=new RegExp("^("+r.join("|")+")$"))}}));const k={};let O,N,I,P,D,L,q;h(t.transformTags,(function(e,t){let r;"function"==typeof e?r=e:"string"==typeof e&&(r=m.simpleTransform(e)),"*"===t?O=r:k[t]=r}));let M=!1;j();const B=new n.Parser({onopentag:function(e,r){if(t.onOpenTag&&t.onOpenTag(e,r),t.enforceHtmlBoundary&&"html"===e&&j(),L)return void q++;const n=new v(e,r);I.push(n);let i=!1;const c=!!n.text;let u;if(d(k,e)&&(u=k[e](e,r),n.attribs=r=u.attribs,void 0!==u.text&&(n.innerText=u.text),e!==u.tagName&&(n.name=e=u.tagName,D[N]=u.tagName)),O&&(u=O(e,r),n.attribs=r=u.attribs,e!==u.tagName&&(n.name=e=u.tagName,D[N]=u.tagName)),(!w(e)||"recursiveEscape"===t.disallowedTagsMode&&!function(e){for(const t in e)if(d(e,t))return!1;return!0}(P)||null!=t.nestingLimit&&N>=t.nestingLimit)&&(i=!0,P[N]=!0,"discard"!==t.disallowedTagsMode&&"completelyDiscard"!==t.disallowedTagsMode||-1!==x.indexOf(e)&&(L=!0,q=1)),N++,i){if("discard"===t.disallowedTagsMode||"completelyDiscard"===t.disallowedTagsMode){if(n.innerText&&!c){const r=R(n.innerText);t.textFilter?b+=t.textFilter(r,e):b+=r,M=!0}return}y=b,b=""}b+="<"+e,"script"===e&&(t.allowedScriptHostnames||t.allowedScriptDomains)&&(n.innerText=""),i&&("escape"===t.disallowedTagsMode||"recursiveEscape"===t.disallowedTagsMode)&&t.preserveEscapedAttributes?h(r,(function(e,t){b+=" "+t+'="'+R(e||"",!0)+'"'})):(!S||d(S,e)||S["*"])&&h(r,(function(r,i){if(!f.test(i))return void delete n.attribs[i];if(""===r&&!t.allowedEmptyAttributes.includes(i)&&(t.nonBooleanAttributes.includes(i)||t.nonBooleanAttributes.includes("*")))return void delete n.attribs[i];let c=!1;if(!S||d(S,e)&&-1!==S[e].indexOf(i)||S["*"]&&-1!==S["*"].indexOf(i)||d(T,e)&&T[e].test(i)||T["*"]&&T["*"].test(i))c=!0;else if(S&&S[e])for(const t of S[e])if(s(t)&&t.name&&t.name===i){c=!0;let e="";if(!0===t.multiple){const n=r.split(" ");for(const r of n)-1!==t.values.indexOf(r)&&(""===e?e=r:e+=" "+r)}else t.values.indexOf(r)>=0&&(e=r);r=e}if(c){if(-1!==t.allowedSchemesAppliedToAttributes.indexOf(i)&&_(e,r))return void delete n.attribs[i];if("script"===e&&"src"===i){let e=!0;try{const n=U(r);if(t.allowedScriptHostnames||t.allowedScriptDomains){const r=(t.allowedScriptHostnames||[]).find((function(e){return e===n.url.hostname})),i=(t.allowedScriptDomains||[]).find((function(e){return n.url.hostname===e||n.url.hostname.endsWith(`.${e}`)}));e=r||i}}catch(t){e=!1}if(!e)return void delete n.attribs[i]}if("iframe"===e&&"src"===i){let e=!0;try{const n=U(r);if(n.isRelativeUrl)e=d(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const r=(t.allowedIframeHostnames||[]).find((function(e){return e===n.url.hostname})),i=(t.allowedIframeDomains||[]).find((function(e){return n.url.hostname===e||n.url.hostname.endsWith(`.${e}`)}));e=r||i}}catch(t){e=!1}if(!e)return void delete n.attribs[i]}if("srcset"===i)try{let e=a(r);if(e.forEach((function(e){_("srcset",e.url)&&(e.evil=!0)})),e=p(e,(function(e){return!e.evil})),!e.length)return void delete n.attribs[i];r=p(e,(function(e){return!e.evil})).map((function(e){if(!e.url)throw new Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")})).join(", "),n.attribs[i]=r}catch(e){return void delete n.attribs[i]}if("class"===i){const t=E[e],s=E["*"],a=A[e],l=C[e],c=C["*"],d=[a,A["*"]].concat(l,c).filter((function(e){return e}));if(!(u=r,h=t&&s?o(t,s):t||s,m=d,r=h?(u=u.split(/\s+/)).filter((function(e){return-1!==h.indexOf(e)||m.some((function(t){return t.test(e)}))})).join(" "):u).length)return void delete n.attribs[i]}if("style"===i)if(t.parseStyleAttributes)try{if(r=function(e){return e.nodes[0].nodes.reduce((function(e,t){return e.push(`${t.prop}:${t.value}${t.important?" !important":""}`),e}),[]).join(";")}(function(e,t){if(!t)return e;const r=e.nodes[0];let n;return n=t[r.selector]&&t["*"]?o(t[r.selector],t["*"]):t[r.selector]||t["*"],n&&(e.nodes[0].nodes=r.nodes.reduce(function(e){return function(t,r){return d(e,r.prop)&&e[r.prop].some((function(e){return e.test(r.value)}))&&t.push(r),t}}(n),[])),e}(l(e+" {"+r+"}",{map:!1}),t.allowedStyles)),0===r.length)return void delete n.attribs[i]}catch(t){return"undefined"!=typeof window&&console.warn('Failed to parse "'+e+" {"+r+"}\", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547"),void delete n.attribs[i]}else if(t.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.");b+=" "+i,r&&r.length?b+='="'+R(r,!0)+'"':t.allowedEmptyAttributes.includes(i)&&(b+='=""')}else delete n.attribs[i];var u,h,m})),-1!==t.selfClosing.indexOf(e)?b+=" />":(b+=">",!n.innerText||c||t.textFilter||(b+=R(n.innerText),M=!0)),i&&(b=y+R(b),y=""),n.openingTagLength=b.length-n.tagPosition},ontext:function(e){if(L)return;const r=I[I.length-1];let n;if(r&&(n=r.tag,e=void 0!==r.innerText?r.innerText:e),"completelyDiscard"!==t.disallowedTagsMode||w(n))if("discard"!==t.disallowedTagsMode&&"completelyDiscard"!==t.disallowedTagsMode||"script"!==n&&"style"!==n){if(!M){const r=R(e,!1);t.textFilter?b+=t.textFilter(r,n):b+=r}}else b+=e;else e="";I.length&&(I[I.length-1].text+=e)},onclosetag:function(e,r){if(t.onCloseTag&&t.onCloseTag(e,r),L){if(q--,q)return;L=!1}const n=I.pop();if(!n)return;if(n.tag!==e)return void I.push(n);L=!!t.enforceHtmlBoundary&&"html"===e,N--;const i=P[N];if(i){if(delete P[N],"discard"===t.disallowedTagsMode||"completelyDiscard"===t.disallowedTagsMode)return void n.updateParentNodeText();y=b,b=""}if(D[N]&&(e=D[N],delete D[N]),t.exclusiveFilter){const e=t.exclusiveFilter(n);if("excludeTag"===e)return i&&(b=y,y=""),void(b=b.substring(0,n.tagPosition)+b.substring(n.tagPosition+n.openingTagLength));if(e)return void(b=b.substring(0,n.tagPosition))}n.updateParentNodeMediaChildren(),n.updateParentNodeText(),-1!==t.selfClosing.indexOf(e)||r&&!w(e)&&["escape","recursiveEscape"].indexOf(t.disallowedTagsMode)>=0?i&&(b=y,y=""):(b+="",i&&(b=y+R(b),y=""),M=!1)}},t.parser);return B.write(e),B.end(),b;function j(){b="",N=0,I=[],P={},D={},L=!1,q=0}function R(e,r){return"string"!=typeof e&&(e+=""),t.parser.decodeEntities&&(e=e.replace(/&/g,"&").replace(//g,">"),r&&(e=e.replace(/"/g,"""))),e=e.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(//g,">"),r&&(e=e.replace(/"/g,""")),e}function _(e,r){for(r=r.replace(/[\x00-\x20]+/g,"");;){const e=r.indexOf("\x3c!--");if(-1===e)break;const t=r.indexOf("--\x3e",e+4);if(-1===t)break;r=r.substring(0,e)+r.substring(t+3)}const n=r.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!n)return!!r.match(/^[/\\]{2}/)&&!t.allowProtocolRelative;const i=n[1].toLowerCase();return d(t.allowedSchemesByTag,e)?-1===t.allowedSchemesByTag[e].indexOf(i):!t.allowedSchemes||-1===t.allowedSchemes.indexOf(i)}function U(e){if((e=e.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw new Error("relative: exploit attempt");let t="relative://relative-site";for(let e=0;e<100;e++)t+=`/${e}`;const r=new URL(e,t);return{isRelativeUrl:r&&"relative-site"===r.hostname&&"relative:"===r.protocol,url:r}}}const g={decodeEntities:!0};m.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","menu","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0,preserveEscapedAttributes:!1},m.simpleTransform=function(e,t,r){return r=void 0===r||r,t=t||{},function(n,i){let s;if(r)for(s in t)i[s]=t[s];else i=t;return{tagName:e,attribs:i}}}},8788:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(r=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style},t.Root=r.Root,t.Text=r.Text,t.Directive=r.Directive,t.Comment=r.Comment,t.Script=r.Script,t.Style=r.Style,t.Tag=r.Tag,t.CDATA=r.CDATA,t.Doctype=r.Doctype},8818:()=>{},9044:(e,t,r)=>{"use strict";let n=r(5571),i=r(1176),s=r(9062),o=r(259),a=r(1281),l=r(2648),c=r(6251),u=r(6173),h=r(4333),d=r(5653),p=r(5621),f=r(3922),m=r(3149),g=r(780),b=r(9901),y=r(9463),v=r(9068),w=r(1173);function x(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new m(e)}x.plugin=function(e,t){let r,n=!1;function i(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let i=t(...r);return i.postcssPlugin=e,i.postcssVersion=(new m).version,i}return Object.defineProperty(i,"postcss",{get:()=>(r||(r=i()),r)}),i.process=function(e,t,r){return x([i(r)]).process(e,t)},i},x.stringify=v,x.parse=f,x.fromJSON=c,x.list=d,x.comment=e=>new i(e),x.atRule=e=>new n(e),x.decl=e=>new a(e),x.rule=e=>new y(e),x.root=e=>new b(e),x.document=e=>new l(e),x.CssSyntaxError=o,x.Declaration=a,x.Container=s,x.Processor=m,x.Document=l,x.Comment=i,x.Warning=w,x.AtRule=n,x.Result=g,x.Input=u,x.Rule=y,x.Root=b,x.Node=p,h.registerPostcss(x),e.exports=x,x.default=x},9061:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.encodeNonAsciiHTML=t.encodeHTML=void 0;var i=n(r(349)),s=r(2312),o=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function a(e,t){for(var r,n="",o=0;null!==(r=e.exec(t));){var a=r.index;n+=t.substring(o,a);var l=t.charCodeAt(a),c=i.default.get(l);if("object"==typeof c){if(a+1{"use strict";let n,i,s,o,a=r(1176),l=r(1281),c=r(5621),{isClean:u,my:h}=r(6644);function d(e){return e.map((e=>(e.nodes&&(e.nodes=d(e.nodes)),delete e.source,e)))}function p(e){if(e[u]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)p(t)}class f extends c{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,n=this.getIterator();for(;this.indexes[n]"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),i=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of i)this.proxyOf.nodes.splice(n+1,0,e);for(let e in this.indexes)r=this.indexes[e],n(e[h]||f.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[u]&&p(e),e.raws||(e.raws={}),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)})):this.walk(((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)})):this.walk(((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)})):this.walk(((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}}f.registerParse=e=>{i=e},f.registerRule=e=>{o=e},f.registerAtRule=e=>{n=e},f.registerRoot=e=>{s=e},e.exports=f,f.default=f,f.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,n.prototype):"rule"===e.type?Object.setPrototypeOf(e,o.prototype):"decl"===e.type?Object.setPrototypeOf(e,l.prototype):"comment"===e.type?Object.setPrototypeOf(e,a.prototype):"root"===e.type&&Object.setPrototypeOf(e,s.prototype),e[h]=!0,e.nodes&&e.nodes.forEach((e=>{f.rebuild(e)}))}},9068:(e,t,r)=>{"use strict";let n=r(2803);function i(e,t){new n(t).stringify(e)}e.exports=i,i.default=i},9332:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeed=function(e){var t=l(h,e);return t?"feed"===t.name?function(e){var t,r=e.children,n={type:"atom",items:(0,i.getElementsByTagName)("entry",r).map((function(e){var t,r=e.children,n={media:a(r)};u(n,"id","id",r),u(n,"title","title",r);var i=null===(t=l("link",r))||void 0===t?void 0:t.attribs.href;i&&(n.link=i);var s=c("summary",r)||c("content",r);s&&(n.description=s);var o=c("updated",r);return o&&(n.pubDate=new Date(o)),n}))};u(n,"id","id",r),u(n,"title","title",r);var s=null===(t=l("link",r))||void 0===t?void 0:t.attribs.href;s&&(n.link=s),u(n,"description","subtitle",r);var o=c("updated",r);return o&&(n.updated=new Date(o)),u(n,"author","email",r,!0),n}(t):function(e){var t,r,n=null!==(r=null===(t=l("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==r?r:[],s={type:e.name.substr(0,3),id:"",items:(0,i.getElementsByTagName)("item",e.children).map((function(e){var t=e.children,r={media:a(t)};u(r,"id","guid",t),u(r,"title","title",t),u(r,"link","link",t),u(r,"description","description",t);var n=c("pubDate",t)||c("dc:date",t);return n&&(r.pubDate=new Date(n)),r}))};u(s,"title","title",n),u(s,"link","link",n),u(s,"description","description",n);var o=c("lastBuildDate",n);return o&&(s.updated=new Date(o)),u(s,"author","managingEditor",n,!0),s}(t):null};var n=r(3380),i=r(5622),s=["url","type","lang"],o=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function a(e){return(0,i.getElementsByTagName)("media:content",e).map((function(e){for(var t=e.attribs,r={medium:t.medium,isDefault:!!t.isDefault},n=0,i=s;n=l)return g;n=r(h),i=[],","===n.slice(-1)?(n=n.replace(d,""),y()):b()}function b(){for(r(c),s="",o="in descriptor";;){if(a=e.charAt(m),"in descriptor"===o)if(t(a))s&&(i.push(s),s="",o="after descriptor");else{if(","===a)return m+=1,s&&i.push(s),void y();if("("===a)s+=a,o="in parens";else{if(""===a)return s&&i.push(s),void y();s+=a}}else if("in parens"===o)if(")"===a)s+=a,o="in descriptor";else{if(""===a)return i.push(s),void y();s+=a}else if("after descriptor"===o)if(t(a));else{if(""===a)return void y();o="in descriptor",m-=1}m+=1}}function y(){var t,r,s,o,a,l,c,u,h,d=!1,m={};for(o=0;o{"use strict";let n=r(9062),i=r(5653);class s extends n{get selectors(){return i.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}}e.exports=s,s.default=s,n.registerRule(s)},9465:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===r}(e)}(e)},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function i(e,t,r){return e.concat(t).map((function(e){return n(e,r)}))}function s(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,r,l){(l=l||{}).arrayMerge=l.arrayMerge||i,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=n;var c=Array.isArray(r);return c===Array.isArray(e)?c?l.arrayMerge(e,r,l):function(e,t,r){var i={};return r.isMergeableObject(e)&&s(e).forEach((function(t){i[t]=n(e[t],r)})),s(t).forEach((function(s){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,s)||(o(e,s)&&r.isMergeableObject(t[s])?i[s]=function(e,t){if(!t.customMerge)return a;var r=t.customMerge(e);return"function"==typeof r?r:a}(s,r)(e[s],t[s],r):i[s]=n(t[s],r))})),i}(e,r,l):n(r,l)}a.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return a(e,r,t)}),{})};var l=a;e.exports=l},9899:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeNames=t.elementNames=void 0,t.elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((function(e){return[e.toLowerCase(),e]}))),t.attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((function(e){return[e.toLowerCase(),e]})))},9901:(e,t,r)=>{"use strict";let n,i,s=r(9062);class o extends s{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before;return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new n(new i,this,e).stringify()}}o.registerLazyResult=e=>{n=e},o.registerProcessor=e=>{i=e},e.exports=o,o.default=o,s.registerRoot(o)}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=function(e){let t=e.closest("label");return e.id&&!t&&(t=e.getRootNode().querySelector(`label[for="${e.id}"]`)),t?(t.querySelectorAll("input, select, textarea").forEach((e=>e.remove())),t.innerHTML):""},t=function(e){const t=e.closest("fieldset")?.querySelector?.("legend");return t?(t.querySelectorAll("input, select, textarea").forEach((e=>e.remove())),t.innerHTML):""},n=function(t){const r={name:t.name,class_name:t.className,default:t.value,label:e(t),required:t.required};return t.hasAttribute("min")&&(r.min=t.min),t.hasAttribute("max")&&(r.max=t.max),r},i=function(t){return"#text"===t?.nextSibling?.nodeName?t.nextSibling.nodeValue:e(t)},{mimes:s}=window.JetFormBuilderParserConfig,o={email:a,tel:a,url:a,password:a,text:a,color:function*(t){const r={name:t.name,class_name:t.className,default:t.value,label:e(t),required:t.required};yield{name:"jet-forms/color-picker-field",attributes:r,innerBlocks:[]}},radio:function*(r){if(r.jfbObserved)return;const n=r.getRootNode(),s=Array.from(n.querySelectorAll(`input[type="radio"][name="${r.name}"]`));s.forEach((e=>{e.jfbObserved=!0}));const o={name:r.name,class_name:r.className,field_options:[],label:t(r)||e(r),required:r.required};for(const e of s)o.field_options.push({value:e.value,label:i(e)}),e.checked&&(o.default=e.value);yield{name:"jet-forms/radio-field",attributes:o,innerBlocks:[]}},checkbox:function*(r){if(r.jfbObserved)return;const n=r.getRootNode(),s=Array.from(n.querySelectorAll(`input[type="checkbox"][name="${r.name}"]`));s.forEach((e=>{e.jfbObserved=!0}));const o={name:r.name,class_name:r.className,field_options:[],label:t(r)||e(r),required:r.required};for(const e of s)o.field_options.push({value:e.value,label:i(e)}),e.checked&&(o.default=e.value);yield{name:"jet-forms/checkbox-field",attributes:o,innerBlocks:[]}},date:function*(e){yield{name:"jet-forms/date-field",attributes:n(e),innerBlocks:[]}},datetime:l,"datetime-local":l,time:function*(e){yield{name:"jet-forms/time-field",attributes:n(e),innerBlocks:[]}},file:function*(t){const r={name:t.name,class_name:t.className,label:e(t),required:t.required,allowed_mimes:[]};r.allowed_mimes=t.accept.split(",").map((e=>function(e){let t=!1;for(const r in s){if(!s.hasOwnProperty(r))continue;const n=new RegExp(".("+r+")$","i");e.match(n)&&(t=s[r])}return t}(e.trim()))),yield{name:"jet-forms/media-field",attributes:r,innerBlocks:[]}},hidden:function*(e){yield{name:"jet-forms/hidden-field",attributes:{name:e.name,class_name:e.className,default:e.value},innerBlocks:[]}},number:function*(e){const t=n(e);t.placeholder=e.placeholder,e.hasAttribute("step")&&(t.step=e.step),yield{name:"jet-forms/number-field",attributes:t,innerBlocks:[]}},range:function*(e){const t=n(e);e.hasAttribute("step")&&(t.step=e.step),yield{name:"jet-forms/range-field",attributes:t,innerBlocks:[]}},submit:function*(e){yield{name:"jet-forms/submit-field",attributes:{label:e.value||"Submit",class_name:e.className},innerBlocks:[]}}};function*a(t){const r={field_type:t.type,name:t.name,class_name:t.className,default:t.value,label:e(t),required:t.required,placeholder:t.placeholder};t.hasAttribute("maxlength")&&(r.maxlength=t.maxLength),t.hasAttribute("minlength")&&(r.minlength=t.minLength),yield{name:"jet-forms/text-field",attributes:r,innerBlocks:[]}}function*l(e){yield{name:"jet-forms/datetime-field",attributes:n(e),innerBlocks:[]}}const{applyFilters:c}=JetPlugins.hooks,u={INPUT:function*(e){if(e.type=e.type||"text",!o.hasOwnProperty(e.type))return;const t=o[e.type];yield*t(e)},SELECT:function*(t){const r={name:t.name,class_name:t.className,label:e(t),required:t.required,field_options:[]},n=Object.entries(t.options);for(const[e,t]of n)0!==+e||t.value?(r.field_options.push({value:t.value,label:t.label}),t.selected&&(r.default=t.value)):r.placeholder=t.label;yield{name:"jet-forms/select-field",attributes:r,innerBlocks:[]}},TEXTAREA:function*(t){const r={name:t.name,class_name:t.className,label:e(t),required:t.required,placeholder:t.placeholder};t.hasAttribute("maxlength")&&(r.maxlength=t.maxLength),t.hasAttribute("minlength")&&(r.minlength=t.minLength),yield{name:"jet-forms/textarea-field",attributes:r,innerBlocks:[]}},BUTTON:function*(e){!e.type||e.type&&"submit"!==e.type||(yield{name:"jet-forms/submit-field",attributes:{label:e.innerHTML.trim(),class_name:e.className},innerBlocks:[]})}};var h=r(8059),d=r.n(h);document.createElement("div");window.JetFormBuilderParser={parseHTMLtoBlocks:function(e){const t=document.createElement("div");t.innerHTML=e;const r=[],n=t.querySelectorAll("input, textarea, select, button");for(const e of n){const t=c("jet.fb.parse.node",!1,e);if(Array.isArray(t)){r.push(...t);continue}const n=u[e.nodeName];r.push(...Array.from(n(e)))}return r},resolveLabel:e,getFormInnerFields:function(e){const t=d()(e,{allowedTags:["form","input","select","option","textarea","button","fieldset","legend","label","div","h1","h2","h3","h4","h5","h6","span","p","br"],allowedAttributes:!1}),r=document.createElement("div");r.innerHTML=t;const n=r.querySelector("form");return n?n.innerHTML:""}}})()})(); \ No newline at end of file +(()=>{var e={12:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((function(e){return e.charCodeAt(0)})))},259:(e,t,r)=>{"use strict";let n=r(4318),i=r(6973);class s extends Error{constructor(e,t,r,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==t&&void 0!==r&&("number"==typeof t?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=n.isColorSupported);let r=e=>e,s=e=>e,o=e=>e;if(e){let{bold:e,gray:t,red:a}=n.createColors(!0);s=t=>e(a(t)),r=e=>t(e),i&&(o=e=>i(e))}let a=t.split(/\r?\n/),l=Math.max(this.line-3,0),c=Math.min(this.line+2,a.length),u=String(c).length;return a.slice(l,c).map(((e,t)=>{let n=l+1+t,i=" "+(" "+n).slice(-u)+" | ";if(n===this.line){if(e.length>160){let t=20,n=Math.max(0,this.column-t),a=Math.max(this.column+t,this.endColumn+t),l=e.slice(n,a),c=r(i.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,t-1)).replace(/[^\t]/g," ");return s(">")+r(i)+o(l)+"\n "+c+s("^")}let t=r(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(i)+o(e)+"\n "+t+s("^")}return" "+r(i)+o(e)})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=s,s.default=s},349:(e,t)=>{"use strict";function r(e){for(var t=1;t{"use strict";let n=r(1173);class i{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new n(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}}e.exports=i,i.default=i},874:()=>{},887:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCodePoint=t.fromCodePoint=void 0;var n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function i(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=n.get(e))&&void 0!==t?t:e}t.fromCodePoint=null!==(r=String.fromCodePoint)&&void 0!==r?r:function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+String.fromCharCode(e)},t.replaceCodePoint=i,t.default=function(e){return(0,t.fromCodePoint)(i(e))}},1047:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r");case a.Comment:return"\x3c!--".concat(e.data,"--\x3e");case a.CDATA:return function(e){return"")}(e);case a.Script:case a.Style:case a.Tag:return function(e,t){var r;"foreign"===t.xmlMode&&(e.name=null!==(r=c.elementNames.get(e.name))&&void 0!==r?r:e.name,e.parent&&m.has(e.parent.name)&&(t=n(n({},t),{xmlMode:!1}))),!t.xmlMode&&g.has(e.name)&&(t=n(n({},t),{xmlMode:"foreign"}));var i="<".concat(e.name),s=function(e,t){var r;if(e){var n=!1===(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)?h:t.xmlMode||"utf8"!==t.encodeEntities?l.encodeXML:l.escapeAttribute;return Object.keys(e).map((function(r){var i,s,o=null!==(i=e[r])&&void 0!==i?i:"";return"foreign"===t.xmlMode&&(r=null!==(s=c.attributeNames.get(r))&&void 0!==s?s:r),t.emptyAttrs||t.xmlMode||""!==o?"".concat(r,'="').concat(n(o),'"'):r})).join(" ")}}(e.attribs,t);return s&&(i+=" ".concat(s)),0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&d.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=p(e.children,t)),!t.xmlMode&&d.has(e.name)||(i+=""))),i}(e,t);case a.Text:return function(e,t){var r,n=e.data||"";return!1===(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)||!t.xmlMode&&e.parent&&u.has(e.parent.name)||(n=t.xmlMode||"utf8"!==t.encodeEntities?(0,l.encodeXML)(n):(0,l.escapeText)(n)),n}(e,t)}}t.render=p,t.default=p;var m=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),g=new Set(["svg","math"])},1173:e=>{"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},1176:(e,t,r)=>{"use strict";let n=r(5621);class i extends n{constructor(e){super(e),this.type="comment"}}e.exports=i,i.default=i},1210:(e,t,r)=>{"use strict";let n=r(6099),i=r(3922);const s=r(780);let o=r(9068);r(3471);class a{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=i;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){let i;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let a=o;this.result=new s(this._processor,i,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get:()=>l.root});let c=new n(a,i,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}}e.exports=a,a.default=a},1281:(e,t,r)=>{"use strict";let n=r(5621);class i extends n{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}}e.exports=i,i.default=i},1866:()=>{},2133:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,i(r(3380),t),i(r(7427),t),i(r(2472),t),i(r(6841),t),i(r(5622),t),i(r(3632),t),i(r(9332),t);var s=r(4576);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return s.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return s.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return s.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return s.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return s.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return s.hasChildren}})},2312:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.getCodePoint=t.xmlReplacer=void 0,t.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var r=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);function n(e){for(var n,i="",s=0;null!==(n=t.xmlReplacer.exec(e));){var o=n.index,a=e.charCodeAt(o),l=r.get(a);void 0!==l?(i+=e.substring(s,o)+l,s=o+1):(i+="".concat(e.substring(s,o),"&#x").concat((0,t.getCodePoint)(e,o).toString(16),";"),s=t.xmlReplacer.lastIndex+=Number(55296==(64512&a)))}return i+e.substr(s)}function i(e,t){return function(r){for(var n,i=0,s="";n=e.exec(r);)i!==n.index&&(s+=r.substring(i,n.index)),s+=t.get(n[0].charCodeAt(0)),i=n.index+1;return s+r.substring(i)}}t.getCodePoint=null!=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){return 55296==(64512&e.charCodeAt(t))?1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t)},t.encodeXML=n,t.escape=n,t.escapeUTF8=i(/[&<>'"]/g,r),t.escapeAttribute=i(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),t.escapeText=i(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))},2472:(e,t)=>{"use strict";function r(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children,r=t.lastIndexOf(e);r>=0&&t.splice(r,1)}e.next=null,e.prev=null,e.parent=null}Object.defineProperty(t,"__esModule",{value:!0}),t.removeElement=r,t.replaceElement=function(e,t){var r=t.prev=e.prev;r&&(r.next=t);var n=t.next=e.next;n&&(n.prev=t);var i=t.parent=e.parent;if(i){var s=i.children;s[s.lastIndexOf(e)]=t,e.parent=null}},t.appendChild=function(e,t){if(r(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null},t.append=function(e,t){r(t);var n=e.parent,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=n,i){if(i.prev=t,n){var s=n.children;s.splice(s.lastIndexOf(i),0,t)}}else n&&n.children.push(t)},t.prependChild=function(e,t){if(r(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){var n=e.children[1];n.prev=t,t.next=n}else t.next=null},t.prepend=function(e,t){r(t);var n=e.parent;if(n){var i=n.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}},2648:(e,t,r)=>{"use strict";let n,i,s=r(9062);class o extends s{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new n(new i,this,e).stringify()}}o.registerLazyResult=e=>{n=e},o.registerProcessor=e=>{i=e},e.exports=o,o.default=o},2803:e=>{"use strict";const t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class r{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let i=(e.raws.between||"")+(t?";":"");this.builder(r+n+i,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&"root"!==n.type;)i+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n{if(i=e.raws[r],void 0!==i)return!1}))}var a;return void 0===i&&(i=t[n]),o.rawCache[n]=i,i}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}e.exports=r,r.default=r},2957:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var o=s(r(6181)),a=r(6861),l=new Set(["input","option","optgroup","select","button","datalist","textarea"]),c=new Set(["p"]),u=new Set(["thead","tbody"]),h=new Set(["dd","dt"]),d=new Set(["rt","rp"]),p=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",c],["h1",c],["h2",c],["h3",c],["h4",c],["h5",c],["h6",c],["select",l],["input",l],["output",l],["button",l],["datalist",l],["textarea",l],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",h],["dt",h],["address",c],["article",c],["aside",c],["blockquote",c],["details",c],["div",c],["dl",c],["fieldset",c],["figcaption",c],["figure",c],["footer",c],["form",c],["header",c],["hr",c],["main",c],["nav",c],["ol",c],["pre",c],["section",c],["table",c],["ul",c],["rt",d],["rp",d],["tbody",u],["tfoot",u]]),f=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),m=new Set(["math","svg"]),g=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),b=/\s|\//,y=function(){function e(e,t){var r,n,i,s,a;void 0===t&&(t={}),this.options=t,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!==(r=t.lowerCaseTags)&&void 0!==r?r:!t.xmlMode,this.lowerCaseAttributeNames=null!==(n=t.lowerCaseAttributeNames)&&void 0!==n?n:!t.xmlMode,this.tokenizer=new(null!==(i=t.Tokenizer)&&void 0!==i?i:o.default)(this.options,this),null===(a=(s=this.cbs).onparserinit)||void 0===a||a.call(s,this)}return e.prototype.ontext=function(e,t){var r,n,i=this.getSlice(e,t);this.endIndex=t-1,null===(n=(r=this.cbs).ontext)||void 0===n||n.call(r,i),this.startIndex=t},e.prototype.ontextentity=function(e){var t,r,n=this.tokenizer.getSectionStart();this.endIndex=n-1,null===(r=(t=this.cbs).ontext)||void 0===r||r.call(t,(0,a.fromCodePoint)(e)),this.startIndex=n},e.prototype.isVoidElement=function(e){return!this.options.xmlMode&&f.has(e)},e.prototype.onopentagname=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);this.lowerCaseTagNames&&(r=r.toLowerCase()),this.emitOpenTag(r)},e.prototype.emitOpenTag=function(e){var t,r,n,i;this.openTagStart=this.startIndex,this.tagname=e;var s=!this.options.xmlMode&&p.get(e);if(s)for(;this.stack.length>0&&s.has(this.stack[this.stack.length-1]);){var o=this.stack.pop();null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,o,!0)}this.isVoidElement(e)||(this.stack.push(e),m.has(e)?this.foreignContext.push(!0):g.has(e)&&this.foreignContext.push(!1)),null===(i=(n=this.cbs).onopentagname)||void 0===i||i.call(n,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(e){var t,r;this.startIndex=this.openTagStart,this.attribs&&(null===(r=(t=this.cbs).onopentag)||void 0===r||r.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},e.prototype.onclosetag=function(e,t){var r,n,i,s,o,a;this.endIndex=t;var l=this.getSlice(e,t);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),(m.has(l)||g.has(l))&&this.foreignContext.pop(),this.isVoidElement(l))this.options.xmlMode||"br"!==l||(null===(n=(r=this.cbs).onopentagname)||void 0===n||n.call(r,"br"),null===(s=(i=this.cbs).onopentag)||void 0===s||s.call(i,"br",{},!0),null===(a=(o=this.cbs).onclosetag)||void 0===a||a.call(o,"br",!1));else{var c=this.stack.lastIndexOf(l);if(-1!==c)if(this.cbs.onclosetag)for(var u=this.stack.length-c;u--;)this.cbs.onclosetag(this.stack.pop(),0!==u);else this.stack.length=c;else this.options.xmlMode||"p"!==l||(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1},e.prototype.onselfclosingtag=function(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)},e.prototype.closeCurrentTag=function(e){var t,r,n=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===n&&(null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,n,!e),this.stack.pop())},e.prototype.onattribname=function(e,t){this.startIndex=e;var r=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r},e.prototype.onattribdata=function(e,t){this.attribvalue+=this.getSlice(e,t)},e.prototype.onattribentity=function(e){this.attribvalue+=(0,a.fromCodePoint)(e)},e.prototype.onattribend=function(e,t){var r,n;this.endIndex=t,null===(n=(r=this.cbs).onattribute)||void 0===n||n.call(r,this.attribname,this.attribvalue,e===o.QuoteType.Double?'"':e===o.QuoteType.Single?"'":e===o.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(b),r=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r},e.prototype.ondeclaration=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("!".concat(n),"!".concat(r))}this.startIndex=t+1},e.prototype.onprocessinginstruction=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("?".concat(n),"?".concat(r))}this.startIndex=t+1},e.prototype.oncomment=function(e,t,r){var n,i,s,o;this.endIndex=t,null===(i=(n=this.cbs).oncomment)||void 0===i||i.call(n,this.getSlice(e,t-r)),null===(o=(s=this.cbs).oncommentend)||void 0===o||o.call(s),this.startIndex=t+1},e.prototype.oncdata=function(e,t,r){var n,i,s,o,a,l,c,u,h,d;this.endIndex=t;var p=this.getSlice(e,t-r);this.options.xmlMode||this.options.recognizeCDATA?(null===(i=(n=this.cbs).oncdatastart)||void 0===i||i.call(n),null===(o=(s=this.cbs).ontext)||void 0===o||o.call(s,p),null===(l=(a=this.cbs).oncdataend)||void 0===l||l.call(a)):(null===(u=(c=this.cbs).oncomment)||void 0===u||u.call(c,"[CDATA[".concat(p,"]]")),null===(d=(h=this.cbs).oncommentend)||void 0===d||d.call(h)),this.startIndex=t+1},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var r=this.stack.length;r>0;this.cbs.onclosetag(this.stack[--r],!0));}null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,r,n;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,null===(n=(r=this.cbs).onparserinit)||void 0===n||n.call(r,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.getSlice=function(e,t){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var r=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,t-this.bufferOffset);return r},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))},e.prototype.end=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLAttribute=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.DecodingMode=t.EntityDecoder=t.encodeHTML5=t.encodeHTML4=t.encodeNonAsciiHTML=t.encodeHTML=t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.encode=t.decodeStrict=t.decode=t.EncodingMode=t.EntityLevel=void 0;var n,i,s=r(6861),o=r(9061),a=r(2312);function l(e,t){if(void 0===t&&(t=n.XML),("number"==typeof t?t:t.level)===n.HTML){var r="object"==typeof t?t.mode:void 0;return(0,s.decodeHTML)(e,r)}return(0,s.decodeXML)(e)}!function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"}(n=t.EntityLevel||(t.EntityLevel={})),function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"}(i=t.EncodingMode||(t.EncodingMode={})),t.decode=l,t.decodeStrict=function(e,t){var r;void 0===t&&(t=n.XML);var i="number"==typeof t?{level:t}:t;return null!==(r=i.mode)&&void 0!==r||(i.mode=s.DecodingMode.Strict),l(e,i)},t.encode=function(e,t){void 0===t&&(t=n.XML);var r="number"==typeof t?{level:t}:t;return r.mode===i.UTF8?(0,a.escapeUTF8)(e):r.mode===i.Attribute?(0,a.escapeAttribute)(e):r.mode===i.Text?(0,a.escapeText)(e):r.level===n.HTML?r.mode===i.ASCII?(0,o.encodeNonAsciiHTML)(e):(0,o.encodeHTML)(e):(0,a.encodeXML)(e)};var c=r(2312);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return c.encodeXML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return c.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return c.escapeUTF8}}),Object.defineProperty(t,"escapeAttribute",{enumerable:!0,get:function(){return c.escapeAttribute}}),Object.defineProperty(t,"escapeText",{enumerable:!0,get:function(){return c.escapeText}});var u=r(9061);Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return u.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return u.encodeNonAsciiHTML}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return u.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return u.encodeHTML}});var h=r(6861);Object.defineProperty(t,"EntityDecoder",{enumerable:!0,get:function(){return h.EntityDecoder}}),Object.defineProperty(t,"DecodingMode",{enumerable:!0,get:function(){return h.DecodingMode}}),Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return h.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTMLAttribute",{enumerable:!0,get:function(){return h.decodeHTMLAttribute}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return h.decodeXML}})},3149:(e,t,r)=>{"use strict";let n=r(2648),i=r(4333),s=r(1210),o=r(9901);class a{constructor(e=[]){this.version="8.5.5",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new i(this,e,t):new s(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=a,a.default=a,o.registerProcessor(a),n.registerProcessor(a)},3380:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getOuterHTML=a,t.getInnerHTML=function(e,t){return(0,i.hasChildren)(e)?e.children.map((function(e){return a(e,t)})).join(""):""},t.getText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.isTag)(t)?"br"===t.name?"\n":e(t.children):(0,i.isCDATA)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.textContent=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&!(0,i.isComment)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.innerText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&(t.type===o.ElementType.Tag||(0,i.isCDATA)(t))?e(t.children):(0,i.isText)(t)?t.data:""};var i=r(4576),s=n(r(1047)),o=r(8788);function a(e,t){return(0,s.default)(e,t)}},3407:e=>{"use strict";e.exports=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},3471:e=>{"use strict";let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},3632:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentPosition=void 0,t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0)e.splice(t,1);else for(var n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e},t.compareDocumentPosition=s,t.uniqueSort=function(e){return(e=e.filter((function(e,t,r){return!r.includes(e,t+1)}))).sort((function(e,t){var r=s(e,t);return r&n.PRECEDING?-1:r&n.FOLLOWING?1:0})),e};var n,i=r(4576);function s(e,t){var r=[],s=[];if(e===t)return 0;for(var o=(0,i.hasChildren)(e)?e:e.parent;o;)r.unshift(o),o=o.parent;for(o=(0,i.hasChildren)(t)?t:t.parent;o;)s.unshift(o),o=o.parent;for(var a=Math.min(r.length,s.length),l=0;lu.indexOf(d)?c===t?n.FOLLOWING|n.CONTAINED_BY:n.FOLLOWING:c===e?n.PRECEDING|n.CONTAINS:n.PRECEDING}!function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"}(n||(t.DocumentPosition=n={}))},3663:(e,t)=>{"use strict";function r(e){return"[object Object]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=function(e){var t,n;return!1!==r(e)&&(void 0===(t=e.constructor)||!1!==r(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}},3708:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((function(e){return e.charCodeAt(0)})))},3838:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=this&&this.__assign||function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=d;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=o.ElementType.CDATA,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(d);t.CDATA=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=o.ElementType.Root,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(d);t.Document=f;var m=function(e){function t(t,r,n,i){void 0===n&&(n=[]),void 0===i&&(i="script"===t?o.ElementType.Script:"style"===t?o.ElementType.Style:o.ElementType.Tag);var s=e.call(this,n)||this;return s.name=t,s.attribs=r,s.type=i,s}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var r,n;return{name:t,value:e.attribs[t],namespace:null===(r=e["x-attribsNamespace"])||void 0===r?void 0:r[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}}))},enumerable:!1,configurable:!0}),t}(d);function g(e){return(0,o.isTag)(e)}function b(e){return e.type===o.ElementType.CDATA}function y(e){return e.type===o.ElementType.Text}function v(e){return e.type===o.ElementType.Comment}function w(e){return e.type===o.ElementType.Directive}function x(e){return e.type===o.ElementType.Root}function S(e,t){var r;if(void 0===t&&(t=!1),y(e))r=new c(e.data);else if(v(e))r=new u(e.data);else if(g(e)){var n=t?T(e.children):[],i=new m(e.name,s({},e.attribs),n);n.forEach((function(e){return e.parent=i})),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=s({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=s({},e["x-attribsPrefix"])),r=i}else if(b(e)){n=t?T(e.children):[];var o=new p(n);n.forEach((function(e){return e.parent=o})),r=o}else if(x(e)){n=t?T(e.children):[];var a=new f(n);n.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),r=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new h(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),r=l}return r.startIndex=e.startIndex,r.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function T(e){for(var t=e.map((function(e){return S(e,!0)})),r=1;r{"use strict";let n=r(9062),i=r(6173),s=r(5266);function o(e,t){let r=new i(e,t),n=new s(r);try{n.parse()}catch(e){throw e}return n.root}e.exports=o,o.default=o,n.registerParse(o)},4318:e=>{var t=String,r=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};e.exports=r(),e.exports.createColors=r},4333:(e,t,r)=>{"use strict";let n=r(9062),i=r(2648),s=r(6099),o=r(3922),a=r(780),l=r(9901),c=r(9068),{isClean:u,my:h}=r(6644);r(3471);const d={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},p={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},f={Once:!0,postcssPlugin:!0,prepare:!0};function m(e){return"object"==typeof e&&"function"==typeof e.then}function g(e){let t=!1,r=d[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function b(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:g(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function y(e){return e[u]=!1,e.nodes&&e.nodes.forEach((e=>y(e))),e}let v={};class w{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,r){let i;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof w||t instanceof a)i=y(t.root),t.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let e=o;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{i=e(t,r)}catch(e){this.processed=!0,this.error=e}i&&!i[h]&&n.rebuild(i)}else i=y(t);this.result=new a(e,i,r),this.helpers={...v,postcss:v,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!p[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let e=this.visitTick(t);if(m(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return m(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=c;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new s(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(m(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[u];)e[u]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(m(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:n}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(n.length>0&&t.visitorIndex{e[u]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}}w.registerPostcss=e=>{v=e},e.exports=w,w.default=w,l.registerLazyResult(w),i.registerLazyResult(w)},4576:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var s=r(8788),o=r(3838);i(r(3838),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,r){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(r=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=r?r:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var r=this.options.xmlMode?s.ElementType.Tag:void 0,n=new o.Element(e,t,void 0,r);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===s.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var r=new o.Text(e);this.addNode(r),this.lastNode=r}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===s.ElementType.Comment)this.lastNode.data+=e;else{var t=new o.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new o.Text(""),t=new o.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var r=new o.ProcessingInstruction(e,t);this.addNode(r)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],r=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),r&&(e.prev=r,r.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},5266:(e,t,r)=>{"use strict";let n=r(5571),i=r(1176),s=r(1281),o=r(9901),a=r(9463),l=r(6120);const c={empty:!0,space:!0};e.exports=class{constructor(e){this.input=e,this.root=new o,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,i,s=new n;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);let o=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(l.length>0){for(i=l.length-1,r=l[i];r&&"space"===r[0];)r=l[--i];r&&(s.source.end=this.getPosition(r[3]||r[2]),s.source.end.offset++)}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(s.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(s,"params",l),o&&(e=l[l.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,n=0;for(let i=t-1;i>=0&&(r=e[i],"space"===r[0]||(n+=1,2!==n));i--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,n,i=0;for(let[s,o]of e.entries()){if(r=o,n=r[0],"("===n&&(i+=1),")"===n&&(i-=1),0===i&&":"===n){if(t){if("word"===t[0]&&"progid"===t[1])continue;return s}this.doubleColon(r)}t=r}return!1}comment(e){let t=new i;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=l(this.input)}decl(e,t){let r=new s;this.init(r,e[0][2]);let n,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(n=e.shift(),":"===n[0]){r.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,a=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(n=e[t],"!important"===n[1].toLowerCase()){r.important=!0;let n=this.stringFrom(e,t);n=this.spacesFromEnd(e)+n," !important"!==n&&(r.raws.important=n);break}if("important"===n[1].toLowerCase()){let n=e.slice(0),i="";for(let e=t;e>0;e--){let t=n[e][0];if(i.trim().startsWith("!")&&"space"!==t)break;i=n.pop()[1]+i}i.trim().startsWith("!")&&(r.important=!0,r.raws.important=i,e=n)}if("space"!==n[0]&&"comment"!==n[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=a.map((e=>e[1])).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new a;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,i=null,s=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)i||(i=l),s.push("("===r?")":"]");else if(o&&n&&"{"===r)i||(i=l),s.push("}");else if(0===s.length){if(";"===r){if(n)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(i=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),s.length>0&&this.unclosedBracket(i),t&&n){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let i,s,o,a,l=r.length,u="",h=!0;for(let e=0;ee+t[1]),"");e.raws[t]={raw:n,value:u}}e[t]=u}rule(e){e.pop();let t=new a;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let n=t;n{"use strict";let n=r(9062);class i extends n{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=i,i.default=i,n.registerAtRule(i)},5621:(e,t,r)=>{"use strict";let n=r(259),i=r(2803),s=r(9068),{isClean:o,my:a}=r(6644);function l(e,t){let r=new e.constructor;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if("proxyCache"===n)continue;let i=e[n],s=typeof i;"parent"===n&&"object"===s?t&&(r[n]=t):"source"===n?r[n]=i:Array.isArray(i)?r[n]=i.map((e=>l(e,r))):("object"===s&&null!==i&&(i=l(i)),r[n]=i)}return r}function c(e,t){if(t&&void 0!==t.offset)return t.offset;let r=1,n=1,i=0;for(let s=0;s"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markClean(){this[o]=!0}markDirty(){if(this[o]){this[o]=!1;let e=this;for(;e=e.parent;)e[o]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,n=r.slice(c(r,this.source.start),c(r,this.source.end)).indexOf(e.word);-1!==n&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,r=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,i=c(n,this.source.start),s=i+e;for(let e=i;e"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){if(null==n)continue;let s=t.get(n.input);null==s&&(s=i,t.set(n.input,i),i++),r[e]={end:n.end,inputId:s,start:n.start}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=s){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r={}){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}}e.exports=u,u.default=u},5622:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.testElement=function(e,t){var r=l(e);return!r||r(t)},t.getElements=function(e,t,r,n){void 0===n&&(n=1/0);var s=l(e);return s?(0,i.filter)(s,t,r,n):[]},t.getElementById=function(e,t,r){return void 0===r&&(r=!0),Array.isArray(t)||(t=[t]),(0,i.findOne)(o("id",e),t,r)},t.getElementsByTagName=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,i.filter)(s.tag_name(e),t,r,n)},t.getElementsByClassName=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,i.filter)(o("class",e),t,r,n)},t.getElementsByTagType=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,i.filter)(s.tag_type(e),t,r,n)};var n=r(4576),i=r(6841),s={tag_name:function(e){return"function"==typeof e?function(t){return(0,n.isTag)(t)&&e(t.name)}:"*"===e?n.isTag:function(t){return(0,n.isTag)(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return(0,n.isText)(t)&&e(t.data)}:function(t){return(0,n.isText)(t)&&t.data===e}}};function o(e,t){return"function"==typeof t?function(r){return(0,n.isTag)(r)&&t(r.attribs[e])}:function(r){return(0,n.isTag)(r)&&r.attribs[e]===t}}function a(e,t){return function(r){return e(r)||t(r)}}function l(e){var t=Object.keys(e).map((function(t){var r=e[t];return Object.prototype.hasOwnProperty.call(s,t)?s[t](r):o(t,r)}));return 0===t.length?null:t.reduce(a)}},5653:e=>{"use strict";let t={comma:e=>t.split(e,[","],!0),space:e=>t.split(e,[" ","\n","\t"]),split(e,t,r){let n=[],i="",s=!1,o=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?o+=1:")"===r?o>0&&(o-=1):0===o&&t.includes(r)&&(s=!0),s?(""!==i&&n.push(i.trim()),i="",s=!1):i+=r;return(r||""!==i)&&n.push(i.trim()),n}};e.exports=t,t.default=t},5887:()=>{},5923:(e,t,r)=>{"use strict";let{existsSync:n,readFileSync:i}=r(874),{dirname:s,join:o}=r(8818),{SourceMapConsumer:a,SourceMapGenerator:l}=r(5887);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=s(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new a(this.text)),this.consumerCache}decodeInline(e){let t=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(t)return decodeURIComponent(e.substr(t[0].length));let r=e.match(/^data:application\/json;charset=utf-?8;base64,/)||e.match(/^data:application\/json;base64,/);if(r)return n=e.substr(r[0].length),Buffer?Buffer.from(n,"base64").toString():window.atob(n);var n;let i=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=s(e),n(e))return this.mapFile=e,i(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof a)return l.fromSourceMap(t).toString();if(t instanceof l)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=o(s(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}e.exports=c,c.default=c},6099:(e,t,r)=>{"use strict";let{dirname:n,relative:i,resolve:s,sep:o}=r(8818),{SourceMapConsumer:a,SourceMapGenerator:l}=r(5887),{pathToFileURL:c}=r(1866),u=r(6173),h=Boolean(a&&l),d=Boolean(n&&s&&i&&o);e.exports=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),i=e.root||n(e.file);!1===this.mapOpts.sourcesContent?(t=new a(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),d&&h&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=l.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new l({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new l({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,n=1,i="",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(s.generated.line=r,s.generated.column=n-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=i,s.original.line=1,s.original.column=0,this.map.addMapping(s))),t=o.match(/\n/g),t?(r+=t.length,e=o.lastIndexOf("\n"),n=o.length-e):n+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=r,s.generated.column=n-2,this.map.addMapping(s)):(s.source=i,s.original.line=1,s.original.column=0,s.generated.line=r,s.generated.column=n-1,this.map.addMapping(s)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?n(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=n(s(r,this.mapOpts.annotation)));let o=i(r,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new u(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(c){let t=c(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===o&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}}},6120:e=>{"use strict";const t="'".charCodeAt(0),r='"'.charCodeAt(0),n="\\".charCodeAt(0),i="/".charCodeAt(0),s="\n".charCodeAt(0),o=" ".charCodeAt(0),a="\f".charCodeAt(0),l="\t".charCodeAt(0),c="\r".charCodeAt(0),u="[".charCodeAt(0),h="]".charCodeAt(0),d="(".charCodeAt(0),p=")".charCodeAt(0),f="{".charCodeAt(0),m="}".charCodeAt(0),g=";".charCodeAt(0),b="*".charCodeAt(0),y=":".charCodeAt(0),v="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,T=/[\da-f]/i;e.exports=function(e,A={}){let E,C,k,O,N,I,P,D,L,q,M=e.css.valueOf(),B=A.ignoreErrors,j=M.length,R=0,_=[],U=[];function H(t){throw e.error("Unclosed "+t,R)}return{back:function(e){U.push(e)},endOfFile:function(){return 0===U.length&&R>=j},nextToken:function(e){if(U.length)return U.pop();if(R>=j)return;let A=!!e&&e.ignoreUnclosed;switch(E=M.charCodeAt(R),E){case s:case o:case l:case c:case a:O=R;do{O+=1,E=M.charCodeAt(O)}while(E===o||E===s||E===l||E===c||E===a);I=["space",M.slice(R,O)],R=O-1;break;case u:case h:case f:case m:case y:case g:case p:{let e=String.fromCharCode(E);I=[e,e,R];break}case d:if(q=_.length?_.pop()[1]:"",L=M.charCodeAt(R+1),"url"===q&&L!==t&&L!==r&&L!==o&&L!==s&&L!==l&&L!==a&&L!==c){O=R;do{if(P=!1,O=M.indexOf(")",O+1),-1===O){if(B||A){O=R;break}H("bracket")}for(D=O;M.charCodeAt(D-1)===n;)D-=1,P=!P}while(P);I=["brackets",M.slice(R,O+1),R,O],R=O}else O=M.indexOf(")",R+1),C=M.slice(R,O+1),-1===O||S.test(C)?I=["(","(",R]:(I=["brackets",C,R,O],R=O);break;case t:case r:N=E===t?"'":'"',O=R;do{if(P=!1,O=M.indexOf(N,O+1),-1===O){if(B||A){O=R+1;break}H("string")}for(D=O;M.charCodeAt(D-1)===n;)D-=1,P=!P}while(P);I=["string",M.slice(R,O+1),R,O],R=O;break;case v:w.lastIndex=R+1,w.test(M),O=0===w.lastIndex?M.length-1:w.lastIndex-2,I=["at-word",M.slice(R,O+1),R,O],R=O;break;case n:for(O=R,k=!0;M.charCodeAt(O+1)===n;)O+=1,k=!k;if(E=M.charCodeAt(O+1),k&&E!==i&&E!==o&&E!==s&&E!==l&&E!==c&&E!==a&&(O+=1,T.test(M.charAt(O)))){for(;T.test(M.charAt(O+1));)O+=1;M.charCodeAt(O+1)===o&&(O+=1)}I=["word",M.slice(R,O+1),R,O],R=O;break;default:E===i&&M.charCodeAt(R+1)===b?(O=M.indexOf("*/",R+2)+1,0===O&&(B||A?O=M.length:H("comment")),I=["comment",M.slice(R,O+1),R,O],R=O):(x.lastIndex=R+1,x.test(M),O=0===x.lastIndex?M.length-1:x.lastIndex-2,I=["word",M.slice(R,O+1),R,O],_.push(I),R=O)}return R++,I},position:function(){return R}}}},6173:(e,t,r)=>{"use strict";let{nanoid:n}=r(6703),{isAbsolute:i,resolve:s}=r(8818),{SourceMapConsumer:o,SourceMapGenerator:a}=r(5887),{fileURLToPath:l,pathToFileURL:c}=r(1866),u=r(259),h=r(5923),d=r(6973),p=Symbol("lineToIndexCache"),f=Boolean(o&&a),m=Boolean(s&&i);function g(e){if(e[p])return e[p];let t=e.css.split("\n"),r=new Array(t.length),n=0;for(let e=0,i=t.length;e"),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let i,s,o,a,l;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){a=e.offset;let n=this.fromOffset(a);t=n.line,r=n.col}else t=e.line,r=e.column,a=this.fromLineAndColumn(t,r);if("number"==typeof n.offset){o=n.offset;let e=this.fromOffset(o);s=e.line,i=e.col}else s=n.line,i=n.column,o=this.fromLineAndColumn(n.line,n.column)}else if(r)a=this.fromLineAndColumn(t,r);else{a=t;let e=this.fromOffset(a);t=e.line,r=e.col}let h=this.origin(t,r,s,i);return l=h?new u(e,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,n.plugin):new u(e,void 0===s?t:{column:r,line:t},void 0===s?r:{column:i,line:s},this.css,this.file,n.plugin),l.input={column:r,endColumn:i,endLine:s,endOffset:o,line:t,offset:a,source:this.css},this.file&&(c&&(l.input.url=c(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(e,t){return g(this)[e-1]+t-1}fromOffset(e){let t=g(this),r=0;if(e>=t[t.length-1])r=t.length-1;else{let n,i=t.length-2;for(;r>1),e=t[n+1])){r=n;break}r=n+1}}return{col:e-t[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:s(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){if(!this.map)return!1;let s,o,a=this.map.consumer(),u=a.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof r&&(s=a.originalPositionFor({column:n,line:r})),o=i(u.source)?c(u.source):new URL(u.source,this.map.consumer().sourceRoot||c(this.map.mapFile));let h={column:u.column,endColumn:s&&s.column,endLine:s&&s.line,line:u.line,url:o.toString()};if("file:"===o.protocol){if(!l)throw new Error("file: protocol is not available in this PostCSS build");h.file=l(o)}let d=a.sourceContentFor(u.source);return d&&(h.source=d),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}}e.exports=b,b.default=b,d&&d.registerInput&&d.registerInput(b)},6181:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteType=void 0;var n,i,s,o=r(6861);function a(e){return e===n.Space||e===n.NewLine||e===n.Tab||e===n.FormFeed||e===n.CarriageReturn}function l(e){return e===n.Slash||e===n.Gt||a(e)}function c(e){return e>=n.Zero&&e<=n.Nine}!function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"}(n||(n={})),function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.SpecialStartSequence=23]="SpecialStartSequence",e[e.InSpecialTag=24]="InSpecialTag",e[e.BeforeEntity=25]="BeforeEntity",e[e.BeforeNumericEntity=26]="BeforeNumericEntity",e[e.InNamedEntity=27]="InNamedEntity",e[e.InNumericEntity=28]="InNumericEntity",e[e.InHexEntity=29]="InHexEntity"}(i||(i={})),function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"}(s=t.QuoteType||(t.QuoteType={}));var u={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},h=function(){function e(e,t){var r=e.xmlMode,n=void 0!==r&&r,s=e.decodeEntities,a=void 0===s||s;this.cbs=t,this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=n,this.decodeEntities=a,this.entityTrie=n?o.xmlDecodeTree:o.htmlDecodeTree}return e.prototype.reset=function(){this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},e.prototype.write=function(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()},e.prototype.end=function(){this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=i.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===n.Amp&&(this.state=i.BeforeEntity)},e.prototype.stateSpecialStartSequence=function(e){var t=this.sequenceIndex===this.currentSequence.length;if(t?l(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.isSpecial=!1;this.sequenceIndex=0,this.state=i.InTagName,this.stateInTagName(e)},e.prototype.stateInSpecialTag=function(e){if(this.sequenceIndex===this.currentSequence.length){if(e===n.Gt||a(e)){var t=this.index-this.currentSequence.length;if(this.sectionStart=n.LowerA&&e<=n.LowerZ||e>=n.UpperA&&e<=n.UpperZ}(e)},e.prototype.startSpecial=function(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=i.SpecialStartSequence},e.prototype.stateBeforeTagName=function(e){if(e===n.ExclamationMark)this.state=i.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===n.Questionmark)this.state=i.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){var t=32|e;this.sectionStart=this.index,this.xmlMode||t!==u.TitleEnd[2]?this.state=this.xmlMode||t!==u.ScriptEnd[2]?i.InTagName:i.BeforeSpecialS:this.startSpecial(u.TitleEnd,3)}else e===n.Slash?this.state=i.BeforeClosingTagName:(this.state=i.Text,this.stateText(e))},e.prototype.stateInTagName=function(e){l(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateBeforeClosingTagName=function(e){a(e)||(e===n.Gt?this.state=i.Text:(this.state=this.isTagStartChar(e)?i.InClosingTagName:i.InSpecialComment,this.sectionStart=this.index))},e.prototype.stateInClosingTagName=function(e){(e===n.Gt||a(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterClosingTagName,this.stateAfterClosingTagName(e))},e.prototype.stateAfterClosingTagName=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.state=i.Text,this.baseState=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeAttributeName=function(e){e===n.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=i.InSpecialTag,this.sequenceIndex=0):this.state=i.Text,this.baseState=this.state,this.sectionStart=this.index+1):e===n.Slash?this.state=i.InSelfClosingTag:a(e)||(this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateInSelfClosingTag=function(e){e===n.Gt?(this.cbs.onselfclosingtag(this.index),this.state=i.Text,this.baseState=i.Text,this.sectionStart=this.index+1,this.isSpecial=!1):a(e)||(this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateInAttributeName=function(e){(e===n.Eq||l(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterAttributeName,this.stateAfterAttributeName(e))},e.prototype.stateAfterAttributeName=function(e){e===n.Eq?this.state=i.BeforeAttributeValue:e===n.Slash||e===n.Gt?(this.cbs.onattribend(s.NoValue,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):a(e)||(this.cbs.onattribend(s.NoValue,this.index),this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateBeforeAttributeValue=function(e){e===n.DoubleQuote?(this.state=i.InAttributeValueDq,this.sectionStart=this.index+1):e===n.SingleQuote?(this.state=i.InAttributeValueSq,this.sectionStart=this.index+1):a(e)||(this.sectionStart=this.index,this.state=i.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))},e.prototype.handleInAttributeValue=function(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===n.DoubleQuote?s.Double:s.Single,this.index),this.state=i.BeforeAttributeName):this.decodeEntities&&e===n.Amp&&(this.baseState=this.state,this.state=i.BeforeEntity)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,n.DoubleQuote)},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,n.SingleQuote)},e.prototype.stateInAttributeValueNoQuotes=function(e){a(e)||e===n.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(s.Unquoted,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===n.Amp&&(this.baseState=this.state,this.state=i.BeforeEntity)},e.prototype.stateBeforeDeclaration=function(e){e===n.OpeningSquareBracket?(this.state=i.CDATASequence,this.sequenceIndex=0):this.state=e===n.Dash?i.BeforeComment:i.InDeclaration},e.prototype.stateInDeclaration=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateInProcessingInstruction=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeComment=function(e){e===n.Dash?(this.state=i.InCommentLike,this.currentSequence=u.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=i.InDeclaration},e.prototype.stateInSpecialComment=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeSpecialS=function(e){var t=32|e;t===u.ScriptEnd[3]?this.startSpecial(u.ScriptEnd,4):t===u.StyleEnd[3]?this.startSpecial(u.StyleEnd,4):(this.state=i.InTagName,this.stateInTagName(e))},e.prototype.stateBeforeEntity=function(e){this.entityExcess=1,this.entityResult=0,e===n.Number?this.state=i.BeforeNumericEntity:e===n.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=i.InNamedEntity,this.stateInNamedEntity(e))},e.prototype.stateInNamedEntity=function(e){if(this.entityExcess+=1,this.trieIndex=(0,o.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,e),this.trieIndex<0)return this.emitNamedEntity(),void this.index--;this.trieCurrent=this.entityTrie[this.trieIndex];var t=this.trieCurrent&o.BinTrieFlags.VALUE_LENGTH;if(t){var r=(t>>14)-1;if(this.allowLegacyEntity()||e===n.Semi){var i=this.index-this.entityExcess+1;i>this.sectionStart&&this.emitPartial(this.sectionStart,i),this.entityResult=this.trieIndex,this.trieIndex+=r,this.entityExcess=0,this.sectionStart=this.index+1,0===r&&this.emitNamedEntity()}else this.trieIndex+=r}},e.prototype.emitNamedEntity=function(){if(this.state=this.baseState,0!==this.entityResult)switch((this.entityTrie[this.entityResult]&o.BinTrieFlags.VALUE_LENGTH)>>14){case 1:this.emitCodePoint(this.entityTrie[this.entityResult]&~o.BinTrieFlags.VALUE_LENGTH);break;case 2:this.emitCodePoint(this.entityTrie[this.entityResult+1]);break;case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}},e.prototype.stateBeforeNumericEntity=function(e){(32|e)===n.LowerX?(this.entityExcess++,this.state=i.InHexEntity):(this.state=i.InNumericEntity,this.stateInNumericEntity(e))},e.prototype.emitNumericEntity=function(e){var t=this.index-this.entityExcess-1;t+2+Number(this.state===i.InHexEntity)!==this.index&&(t>this.sectionStart&&this.emitPartial(this.sectionStart,t),this.sectionStart=this.index+Number(e),this.emitCodePoint((0,o.replaceCodePoint)(this.entityResult))),this.state=this.baseState},e.prototype.stateInNumericEntity=function(e){e===n.Semi?this.emitNumericEntity(!0):c(e)?(this.entityResult=10*this.entityResult+(e-n.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.stateInHexEntity=function(e){e===n.Semi?this.emitNumericEntity(!0):c(e)?(this.entityResult=16*this.entityResult+(e-n.Zero),this.entityExcess++):function(e){return e>=n.UpperA&&e<=n.UpperF||e>=n.LowerA&&e<=n.LowerF}(e)?(this.entityResult=16*this.entityResult+((32|e)-n.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===i.Text||this.baseState===i.InSpecialTag)},e.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===i.Text||this.state===i.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):this.state!==i.InAttributeValueDq&&this.state!==i.InAttributeValueSq&&this.state!==i.InAttributeValueNq||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},e.prototype.shouldContinue=function(){return this.index{"use strict";let n=r(5571),i=r(1176),s=r(1281),o=r(6173),a=r(5923),l=r(9901),c=r(9463);function u(e,t){if(Array.isArray(e))return e.map((e=>u(e)));let{inputs:r,...h}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:o.prototype};r.map&&(r.map={...r.map,__proto__:a.prototype}),t.push(r)}}if(h.nodes&&(h.nodes=e.nodes.map((e=>u(e,t)))),h.source){let{inputId:e,...r}=h.source;h.source=r,null!=e&&(h.source.input=t[e])}if("root"===h.type)return new l(h);if("decl"===h.type)return new s(h);if("rule"===h.type)return new c(h);if("comment"===h.type)return new i(h);if("atrule"===h.type)return new n(h);throw new Error("Unknown node type: "+e.type)}e.exports=u,u.default=u},6644:e=>{"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},6703:e=>{e.exports={nanoid:(e=21)=>{let t="",r=0|e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let n="",i=0|r;for(;i--;)n+=e[Math.random()*e.length|0];return n}}},6841:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filter=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),i(e,Array.isArray(t)?t:[t],r,n)},t.find=i,t.findOneChild=function(e,t){return t.find(e)},t.findOne=function e(t,r,i){void 0===i&&(i=!0);for(var s=Array.isArray(r)?r:[r],o=0;o0){var l=e(t,a.children,!0);if(l)return l}}return null},t.existsOne=function e(t,r){return(Array.isArray(r)?r:[r]).some((function(r){return(0,n.isTag)(r)&&t(r)||(0,n.hasChildren)(r)&&e(t,r.children)}))},t.findAll=function(e,t){for(var r=[],i=[Array.isArray(t)?t:[t]],s=[0];;)if(s[0]>=i[0].length){if(1===i.length)return r;i.shift(),s.shift()}else{var o=i[0][s[0]++];(0,n.isTag)(o)&&e(o)&&r.push(o),(0,n.hasChildren)(o)&&o.children.length>0&&(s.unshift(0),i.unshift(o.children))}};var n=r(4576);function i(e,t,r,i){for(var s=[],o=[Array.isArray(t)?t:[t]],a=[0];;)if(a[0]>=o[0].length){if(1===a.length)return s;o.shift(),a.shift()}else{var l=o[0][a[0]++];if(e(l)&&(s.push(l),--i<=0))return s;r&&(0,n.hasChildren)(l)&&l.children.length>0&&(a.unshift(0),o.unshift(l.children))}}},6861:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXML=t.decodeHTMLStrict=t.decodeHTMLAttribute=t.decodeHTML=t.determineBranch=t.EntityDecoder=t.DecodingMode=t.BinTrieFlags=t.fromCodePoint=t.replaceCodePoint=t.decodeCodePoint=t.xmlDecodeTree=t.htmlDecodeTree=void 0;var a=o(r(3708));t.htmlDecodeTree=a.default;var l=o(r(12));t.xmlDecodeTree=l.default;var c=s(r(887));t.decodeCodePoint=c.default;var u,h,d,p,f=r(887);function m(e){return e>=u.ZERO&&e<=u.NINE}Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return f.replaceCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return f.fromCodePoint}}),function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(u||(u={})),function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(h=t.BinTrieFlags||(t.BinTrieFlags={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(d||(d={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(p=t.DecodingMode||(t.DecodingMode={}));var g=function(){function e(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=d.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=p.Strict}return e.prototype.startEntity=function(e){this.decodeMode=e,this.state=d.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},e.prototype.write=function(e,t){switch(this.state){case d.EntityStart:return e.charCodeAt(t)===u.NUM?(this.state=d.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=d.NamedEntity,this.stateNamedEntity(e,t));case d.NumericStart:return this.stateNumericStart(e,t);case d.NumericDecimal:return this.stateNumericDecimal(e,t);case d.NumericHex:return this.stateNumericHex(e,t);case d.NamedEntity:return this.stateNamedEntity(e,t)}},e.prototype.stateNumericStart=function(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===u.LOWER_X?(this.state=d.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=d.NumericDecimal,this.stateNumericDecimal(e,t))},e.prototype.addToNumericResult=function(e,t,r,n){if(t!==r){var i=r-t;this.result=this.result*Math.pow(n,i)+parseInt(e.substr(t,i),n),this.consumed+=i}},e.prototype.stateNumericHex=function(e,t){for(var r,n=t;t=u.UPPER_A&&r<=u.UPPER_F||r>=u.LOWER_A&&r<=u.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(i,3);t+=1}return this.addToNumericResult(e,n,t,16),-1},e.prototype.stateNumericDecimal=function(e,t){for(var r=t;t>14;t=u.UPPER_A&&e<=u.UPPER_Z||e>=u.LOWER_A&&e<=u.LOWER_Z||m(e)}(o)))?0:this.emitNotTerminatedNamedEntity();if(0!=(i=((n=r[this.treeIndex])&h.VALUE_LENGTH)>>14)){if(s===u.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==p.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}var o;return-1},e.prototype.emitNotTerminatedNamedEntity=function(){var e,t=this.result,r=(this.decodeTree[t]&h.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed},e.prototype.emitNamedEntityData=function(e,t,r){var n=this.decodeTree;return this.emitCodePoint(1===t?n[e]&~h.VALUE_LENGTH:n[e+1],r),3===t&&this.emitCodePoint(n[e+2],r),r},e.prototype.end=function(){var e;switch(this.state){case d.NamedEntity:return 0===this.result||this.decodeMode===p.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case d.NumericDecimal:return this.emitNumericEntity(0,2);case d.NumericHex:return this.emitNumericEntity(0,3);case d.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case d.EntityStart:return 0}},e}();function b(e){var t="",r=new g(e,(function(e){return t+=(0,c.fromCodePoint)(e)}));return function(e,n){for(var i=0,s=0;(s=e.indexOf("&",s))>=0;){t+=e.slice(i,s),r.startEntity(n);var o=r.write(e,s+1);if(o<0){i=s+r.end();break}i=s+o,s=0===o?i+1:i}var a=t+e.slice(i);return t="",a}}function y(e,t,r,n){var i=(t&h.BRANCH_LENGTH)>>7,s=t&h.JUMP_TABLE;if(0===i)return 0!==s&&n===s?r:-1;if(s){var o=n-s;return o<0||o>=i?-1:e[r+o]-1}for(var a=r,l=a+i-1;a<=l;){var c=a+l>>>1,u=e[c];if(un))return e[c+i];l=c-1}}return-1}t.EntityDecoder=g,t.determineBranch=y;var v=b(a.default),w=b(l.default);t.decodeHTML=function(e,t){return void 0===t&&(t=p.Legacy),v(e,t)},t.decodeHTMLAttribute=function(e){return v(e,p.Attribute)},t.decodeHTMLStrict=function(e){return v(e,p.Strict)},t.decodeXML=function(e){return w(e,p.Strict)}},6973:()=>{},7427:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getChildren=i,t.getParent=s,t.getSiblings=function(e){var t=s(e);if(null!=t)return i(t);for(var r=[e],n=e.prev,o=e.next;null!=n;)r.unshift(n),n=n.prev;for(;null!=o;)r.push(o),o=o.next;return r},t.getAttributeValue=function(e,t){var r;return null===(r=e.attribs)||void 0===r?void 0:r[t]},t.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]},t.getName=function(e){return e.name},t.nextElementSibling=function(e){for(var t=e.next;null!==t&&!(0,n.isTag)(t);)t=t.next;return t},t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!(0,n.isTag)(t);)t=t.prev;return t};var n=r(4576);function i(e){return(0,n.hasChildren)(e)?e.children:[]}function s(e){return e.parent||null}},8059:(e,t,r)=>{const n=r(616),i=r(3407),{isPlainObject:s}=r(3663),o=r(9465),a=r(9369),{parse:l}=r(9044),c=["img","audio","video","picture","svg","object","map","iframe","embed"],u=["script","style"];function h(e,t){e&&Object.keys(e).forEach((function(r){t(e[r],r)}))}function d(e,t){return{}.hasOwnProperty.call(e,t)}function p(e,t){const r=[];return h(e,(function(e){t(e)&&r.push(e)})),r}e.exports=m;const f=/^[^\0\t\n\f\r /<=>]+$/;function m(e,t,r){if(null==e)return"";"number"==typeof e&&(e=e.toString());let b="",y="";function v(e,t){const r=this;this.tag=e,this.attribs=t||{},this.tagPosition=b.length,this.text="",this.openingTagLength=0,this.mediaChildren=[],this.updateParentNodeText=function(){I.length&&(I[I.length-1].text+=r.text)},this.updateParentNodeMediaChildren=function(){I.length&&c.includes(this.tag)&&I[I.length-1].mediaChildren.push(this.tag)}}(t=Object.assign({},m.defaults,t)).parser=Object.assign({},g,t.parser);const w=function(e){return!1===t.allowedTags||(t.allowedTags||[]).indexOf(e)>-1};u.forEach((function(e){w(e)&&!t.allowVulnerableTags&&console.warn(`\n\n⚠️ Your \`allowedTags\` option includes, \`${e}\`, which is inherently\nvulnerable to XSS attacks. Please remove it from \`allowedTags\`.\nOr, to disable this warning, add the \`allowVulnerableTags\` option\nand ensure you are accounting for this risk.\n\n`)}));const x=t.nonTextTags||["script","style","textarea","option"];let S,T;t.allowedAttributes&&(S={},T={},h(t.allowedAttributes,(function(e,t){S[t]=[];const r=[];e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?r.push(i(e).replace(/\\\*/g,".*")):S[t].push(e)})),r.length&&(T[t]=new RegExp("^("+r.join("|")+")$"))})));const A={},E={},C={};h(t.allowedClasses,(function(e,t){if(S&&(d(S,t)||(S[t]=[]),S[t].push("class")),A[t]=e,Array.isArray(e)){const r=[];A[t]=[],C[t]=[],e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?r.push(i(e).replace(/\\\*/g,".*")):e instanceof RegExp?C[t].push(e):A[t].push(e)})),r.length&&(E[t]=new RegExp("^("+r.join("|")+")$"))}}));const k={};let O,N,I,P,D,L,q;h(t.transformTags,(function(e,t){let r;"function"==typeof e?r=e:"string"==typeof e&&(r=m.simpleTransform(e)),"*"===t?O=r:k[t]=r}));let M=!1;j();const B=new n.Parser({onopentag:function(e,r){if(t.onOpenTag&&t.onOpenTag(e,r),t.enforceHtmlBoundary&&"html"===e&&j(),L)return void q++;const n=new v(e,r);I.push(n);let i=!1;const c=!!n.text;let u;if(d(k,e)&&(u=k[e](e,r),n.attribs=r=u.attribs,void 0!==u.text&&(n.innerText=u.text),e!==u.tagName&&(n.name=e=u.tagName,D[N]=u.tagName)),O&&(u=O(e,r),n.attribs=r=u.attribs,e!==u.tagName&&(n.name=e=u.tagName,D[N]=u.tagName)),(!w(e)||"recursiveEscape"===t.disallowedTagsMode&&!function(e){for(const t in e)if(d(e,t))return!1;return!0}(P)||null!=t.nestingLimit&&N>=t.nestingLimit)&&(i=!0,P[N]=!0,"discard"!==t.disallowedTagsMode&&"completelyDiscard"!==t.disallowedTagsMode||-1!==x.indexOf(e)&&(L=!0,q=1)),N++,i){if("discard"===t.disallowedTagsMode||"completelyDiscard"===t.disallowedTagsMode){if(n.innerText&&!c){const r=R(n.innerText);t.textFilter?b+=t.textFilter(r,e):b+=r,M=!0}return}y=b,b=""}b+="<"+e,"script"===e&&(t.allowedScriptHostnames||t.allowedScriptDomains)&&(n.innerText=""),i&&("escape"===t.disallowedTagsMode||"recursiveEscape"===t.disallowedTagsMode)&&t.preserveEscapedAttributes?h(r,(function(e,t){b+=" "+t+'="'+R(e||"",!0)+'"'})):(!S||d(S,e)||S["*"])&&h(r,(function(r,i){if(!f.test(i))return void delete n.attribs[i];if(""===r&&!t.allowedEmptyAttributes.includes(i)&&(t.nonBooleanAttributes.includes(i)||t.nonBooleanAttributes.includes("*")))return void delete n.attribs[i];let c=!1;if(!S||d(S,e)&&-1!==S[e].indexOf(i)||S["*"]&&-1!==S["*"].indexOf(i)||d(T,e)&&T[e].test(i)||T["*"]&&T["*"].test(i))c=!0;else if(S&&S[e])for(const t of S[e])if(s(t)&&t.name&&t.name===i){c=!0;let e="";if(!0===t.multiple){const n=r.split(" ");for(const r of n)-1!==t.values.indexOf(r)&&(""===e?e=r:e+=" "+r)}else t.values.indexOf(r)>=0&&(e=r);r=e}if(c){if(-1!==t.allowedSchemesAppliedToAttributes.indexOf(i)&&_(e,r))return void delete n.attribs[i];if("script"===e&&"src"===i){let e=!0;try{const n=U(r);if(t.allowedScriptHostnames||t.allowedScriptDomains){const r=(t.allowedScriptHostnames||[]).find((function(e){return e===n.url.hostname})),i=(t.allowedScriptDomains||[]).find((function(e){return n.url.hostname===e||n.url.hostname.endsWith(`.${e}`)}));e=r||i}}catch(t){e=!1}if(!e)return void delete n.attribs[i]}if("iframe"===e&&"src"===i){let e=!0;try{const n=U(r);if(n.isRelativeUrl)e=d(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const r=(t.allowedIframeHostnames||[]).find((function(e){return e===n.url.hostname})),i=(t.allowedIframeDomains||[]).find((function(e){return n.url.hostname===e||n.url.hostname.endsWith(`.${e}`)}));e=r||i}}catch(t){e=!1}if(!e)return void delete n.attribs[i]}if("srcset"===i)try{let e=a(r);if(e.forEach((function(e){_("srcset",e.url)&&(e.evil=!0)})),e=p(e,(function(e){return!e.evil})),!e.length)return void delete n.attribs[i];r=p(e,(function(e){return!e.evil})).map((function(e){if(!e.url)throw new Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")})).join(", "),n.attribs[i]=r}catch(e){return void delete n.attribs[i]}if("class"===i){const t=A[e],s=A["*"],a=E[e],l=C[e],c=C["*"],d=[a,E["*"]].concat(l,c).filter((function(e){return e}));if(!(u=r,h=t&&s?o(t,s):t||s,m=d,r=h?(u=u.split(/\s+/)).filter((function(e){return-1!==h.indexOf(e)||m.some((function(t){return t.test(e)}))})).join(" "):u).length)return void delete n.attribs[i]}if("style"===i)if(t.parseStyleAttributes)try{if(r=function(e){return e.nodes[0].nodes.reduce((function(e,t){return e.push(`${t.prop}:${t.value}${t.important?" !important":""}`),e}),[]).join(";")}(function(e,t){if(!t)return e;const r=e.nodes[0];let n;return n=t[r.selector]&&t["*"]?o(t[r.selector],t["*"]):t[r.selector]||t["*"],n&&(e.nodes[0].nodes=r.nodes.reduce(function(e){return function(t,r){return d(e,r.prop)&&e[r.prop].some((function(e){return e.test(r.value)}))&&t.push(r),t}}(n),[])),e}(l(e+" {"+r+"}",{map:!1}),t.allowedStyles)),0===r.length)return void delete n.attribs[i]}catch(t){return"undefined"!=typeof window&&console.warn('Failed to parse "'+e+" {"+r+"}\", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547"),void delete n.attribs[i]}else if(t.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.");b+=" "+i,r&&r.length?b+='="'+R(r,!0)+'"':t.allowedEmptyAttributes.includes(i)&&(b+='=""')}else delete n.attribs[i];var u,h,m})),-1!==t.selfClosing.indexOf(e)?b+=" />":(b+=">",!n.innerText||c||t.textFilter||(b+=R(n.innerText),M=!0)),i&&(b=y+R(b),y=""),n.openingTagLength=b.length-n.tagPosition},ontext:function(e){if(L)return;const r=I[I.length-1];let n;if(r&&(n=r.tag,e=void 0!==r.innerText?r.innerText:e),"completelyDiscard"!==t.disallowedTagsMode||w(n))if("discard"!==t.disallowedTagsMode&&"completelyDiscard"!==t.disallowedTagsMode||"script"!==n&&"style"!==n){if(!M){const r=R(e,!1);t.textFilter?b+=t.textFilter(r,n):b+=r}}else b+=e;else e="";I.length&&(I[I.length-1].text+=e)},onclosetag:function(e,r){if(t.onCloseTag&&t.onCloseTag(e,r),L){if(q--,q)return;L=!1}const n=I.pop();if(!n)return;if(n.tag!==e)return void I.push(n);L=!!t.enforceHtmlBoundary&&"html"===e,N--;const i=P[N];if(i){if(delete P[N],"discard"===t.disallowedTagsMode||"completelyDiscard"===t.disallowedTagsMode)return void n.updateParentNodeText();y=b,b=""}if(D[N]&&(e=D[N],delete D[N]),t.exclusiveFilter){const e=t.exclusiveFilter(n);if("excludeTag"===e)return i&&(b=y,y=""),void(b=b.substring(0,n.tagPosition)+b.substring(n.tagPosition+n.openingTagLength));if(e)return void(b=b.substring(0,n.tagPosition))}n.updateParentNodeMediaChildren(),n.updateParentNodeText(),-1!==t.selfClosing.indexOf(e)||r&&!w(e)&&["escape","recursiveEscape"].indexOf(t.disallowedTagsMode)>=0?i&&(b=y,y=""):(b+="",i&&(b=y+R(b),y=""),M=!1)}},t.parser);return B.write(e),B.end(),b;function j(){b="",N=0,I=[],P={},D={},L=!1,q=0}function R(e,r){return"string"!=typeof e&&(e+=""),t.parser.decodeEntities&&(e=e.replace(/&/g,"&").replace(//g,">"),r&&(e=e.replace(/"/g,"""))),e=e.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(//g,">"),r&&(e=e.replace(/"/g,""")),e}function _(e,r){for(r=r.replace(/[\x00-\x20]+/g,"");;){const e=r.indexOf("\x3c!--");if(-1===e)break;const t=r.indexOf("--\x3e",e+4);if(-1===t)break;r=r.substring(0,e)+r.substring(t+3)}const n=r.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!n)return!!r.match(/^[/\\]{2}/)&&!t.allowProtocolRelative;const i=n[1].toLowerCase();return d(t.allowedSchemesByTag,e)?-1===t.allowedSchemesByTag[e].indexOf(i):!t.allowedSchemes||-1===t.allowedSchemes.indexOf(i)}function U(e){if((e=e.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw new Error("relative: exploit attempt");let t="relative://relative-site";for(let e=0;e<100;e++)t+=`/${e}`;const r=new URL(e,t);return{isRelativeUrl:r&&"relative-site"===r.hostname&&"relative:"===r.protocol,url:r}}}const g={decodeEntities:!0};m.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","menu","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0,preserveEscapedAttributes:!1},m.simpleTransform=function(e,t,r){return r=void 0===r||r,t=t||{},function(n,i){let s;if(r)for(s in t)i[s]=t[s];else i=t;return{tagName:e,attribs:i}}}},8788:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(r=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style},t.Root=r.Root,t.Text=r.Text,t.Directive=r.Directive,t.Comment=r.Comment,t.Script=r.Script,t.Style=r.Style,t.Tag=r.Tag,t.CDATA=r.CDATA,t.Doctype=r.Doctype},8818:()=>{},9044:(e,t,r)=>{"use strict";let n=r(5571),i=r(1176),s=r(9062),o=r(259),a=r(1281),l=r(2648),c=r(6251),u=r(6173),h=r(4333),d=r(5653),p=r(5621),f=r(3922),m=r(3149),g=r(780),b=r(9901),y=r(9463),v=r(9068),w=r(1173);function x(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new m(e)}x.plugin=function(e,t){let r,n=!1;function i(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let i=t(...r);return i.postcssPlugin=e,i.postcssVersion=(new m).version,i}return Object.defineProperty(i,"postcss",{get:()=>(r||(r=i()),r)}),i.process=function(e,t,r){return x([i(r)]).process(e,t)},i},x.stringify=v,x.parse=f,x.fromJSON=c,x.list=d,x.comment=e=>new i(e),x.atRule=e=>new n(e),x.decl=e=>new a(e),x.rule=e=>new y(e),x.root=e=>new b(e),x.document=e=>new l(e),x.CssSyntaxError=o,x.Declaration=a,x.Container=s,x.Processor=m,x.Document=l,x.Comment=i,x.Warning=w,x.AtRule=n,x.Result=g,x.Input=u,x.Rule=y,x.Root=b,x.Node=p,h.registerPostcss(x),e.exports=x,x.default=x},9061:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.encodeNonAsciiHTML=t.encodeHTML=void 0;var i=n(r(349)),s=r(2312),o=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function a(e,t){for(var r,n="",o=0;null!==(r=e.exec(t));){var a=r.index;n+=t.substring(o,a);var l=t.charCodeAt(a),c=i.default.get(l);if("object"==typeof c){if(a+1{"use strict";let n,i,s,o,a=r(1176),l=r(1281),c=r(5621),{isClean:u,my:h}=r(6644);function d(e){return e.map((e=>(e.nodes&&(e.nodes=d(e.nodes)),delete e.source,e)))}function p(e){if(e[u]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)p(t)}class f extends c{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,n=this.getIterator();for(;this.indexes[n]"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),i=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of i)this.proxyOf.nodes.splice(n+1,0,e);for(let e in this.indexes)r=this.indexes[e],n(e[h]||f.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[u]&&p(e),e.raws||(e.raws={}),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)})):this.walk(((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)})):this.walk(((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)})):this.walk(((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}}f.registerParse=e=>{i=e},f.registerRule=e=>{o=e},f.registerAtRule=e=>{n=e},f.registerRoot=e=>{s=e},e.exports=f,f.default=f,f.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,n.prototype):"rule"===e.type?Object.setPrototypeOf(e,o.prototype):"decl"===e.type?Object.setPrototypeOf(e,l.prototype):"comment"===e.type?Object.setPrototypeOf(e,a.prototype):"root"===e.type&&Object.setPrototypeOf(e,s.prototype),e[h]=!0,e.nodes&&e.nodes.forEach((e=>{f.rebuild(e)}))}},9068:(e,t,r)=>{"use strict";let n=r(2803);function i(e,t){new n(t).stringify(e)}e.exports=i,i.default=i},9332:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeed=function(e){var t=l(h,e);return t?"feed"===t.name?function(e){var t,r=e.children,n={type:"atom",items:(0,i.getElementsByTagName)("entry",r).map((function(e){var t,r=e.children,n={media:a(r)};u(n,"id","id",r),u(n,"title","title",r);var i=null===(t=l("link",r))||void 0===t?void 0:t.attribs.href;i&&(n.link=i);var s=c("summary",r)||c("content",r);s&&(n.description=s);var o=c("updated",r);return o&&(n.pubDate=new Date(o)),n}))};u(n,"id","id",r),u(n,"title","title",r);var s=null===(t=l("link",r))||void 0===t?void 0:t.attribs.href;s&&(n.link=s),u(n,"description","subtitle",r);var o=c("updated",r);return o&&(n.updated=new Date(o)),u(n,"author","email",r,!0),n}(t):function(e){var t,r,n=null!==(r=null===(t=l("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==r?r:[],s={type:e.name.substr(0,3),id:"",items:(0,i.getElementsByTagName)("item",e.children).map((function(e){var t=e.children,r={media:a(t)};u(r,"id","guid",t),u(r,"title","title",t),u(r,"link","link",t),u(r,"description","description",t);var n=c("pubDate",t)||c("dc:date",t);return n&&(r.pubDate=new Date(n)),r}))};u(s,"title","title",n),u(s,"link","link",n),u(s,"description","description",n);var o=c("lastBuildDate",n);return o&&(s.updated=new Date(o)),u(s,"author","managingEditor",n,!0),s}(t):null};var n=r(3380),i=r(5622),s=["url","type","lang"],o=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function a(e){return(0,i.getElementsByTagName)("media:content",e).map((function(e){for(var t=e.attribs,r={medium:t.medium,isDefault:!!t.isDefault},n=0,i=s;n=l)return g;n=r(h),i=[],","===n.slice(-1)?(n=n.replace(d,""),y()):b()}function b(){for(r(c),s="",o="in descriptor";;){if(a=e.charAt(m),"in descriptor"===o)if(t(a))s&&(i.push(s),s="",o="after descriptor");else{if(","===a)return m+=1,s&&i.push(s),void y();if("("===a)s+=a,o="in parens";else{if(""===a)return s&&i.push(s),void y();s+=a}}else if("in parens"===o)if(")"===a)s+=a,o="in descriptor";else{if(""===a)return i.push(s),void y();s+=a}else if("after descriptor"===o)if(t(a));else{if(""===a)return void y();o="in descriptor",m-=1}m+=1}}function y(){var t,r,s,o,a,l,c,u,h,d=!1,m={};for(o=0;o{"use strict";let n=r(9062),i=r(5653);class s extends n{get selectors(){return i.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}}e.exports=s,s.default=s,n.registerRule(s)},9465:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===r}(e)}(e)},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function i(e,t,r){return e.concat(t).map((function(e){return n(e,r)}))}function s(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,r,l){(l=l||{}).arrayMerge=l.arrayMerge||i,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=n;var c=Array.isArray(r);return c===Array.isArray(e)?c?l.arrayMerge(e,r,l):function(e,t,r){var i={};return r.isMergeableObject(e)&&s(e).forEach((function(t){i[t]=n(e[t],r)})),s(t).forEach((function(s){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,s)||(o(e,s)&&r.isMergeableObject(t[s])?i[s]=function(e,t){if(!t.customMerge)return a;var r=t.customMerge(e);return"function"==typeof r?r:a}(s,r)(e[s],t[s],r):i[s]=n(t[s],r))})),i}(e,r,l):n(r,l)}a.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return a(e,r,t)}),{})};var l=a;e.exports=l},9899:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeNames=t.elementNames=void 0,t.elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((function(e){return[e.toLowerCase(),e]}))),t.attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((function(e){return[e.toLowerCase(),e]})))},9901:(e,t,r)=>{"use strict";let n,i,s=r(9062);class o extends s{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before;return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new n(new i,this,e).stringify()}}o.registerLazyResult=e=>{n=e},o.registerProcessor=e=>{i=e},e.exports=o,o.default=o,s.registerRoot(o)}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=function(e){let t=e.closest("label");return e.id&&!t&&(t=e.getRootNode().querySelector(`label[for="${e.id}"]`)),t?(t.querySelectorAll("input, select, textarea").forEach((e=>e.remove())),t.innerHTML):""},t=function(e){const t=e.closest("fieldset")?.querySelector?.("legend");return t?(t.querySelectorAll("input, select, textarea").forEach((e=>e.remove())),t.innerHTML):""},n=function(t){const r={name:t.name,class_name:t.className,default:t.value,label:e(t),required:t.required};return t.hasAttribute("min")&&(r.min=t.min),t.hasAttribute("max")&&(r.max=t.max),r},i=function(t){return"#text"===t?.nextSibling?.nodeName?t.nextSibling.nodeValue:e(t)},{mimes:s}=window.JetFormBuilderParserConfig,o={email:a,tel:a,url:a,password:a,text:a,color:function*(t){const r={name:t.name,class_name:t.className,default:t.value,label:e(t),required:t.required};yield{name:"jet-forms/color-picker-field",attributes:r,innerBlocks:[]}},radio:function*(r){if(r.jfbObserved)return;const n=r.getRootNode(),s=Array.from(n.querySelectorAll(`input[type="radio"][name="${r.name}"]`));s.forEach((e=>{e.jfbObserved=!0}));const o={name:r.name,class_name:r.className,field_options:[],label:t(r)||e(r),required:r.required};for(const e of s)o.field_options.push({value:e.value,label:i(e)}),e.checked&&(o.default=e.value);yield{name:"jet-forms/radio-field",attributes:o,innerBlocks:[]}},checkbox:function*(r){if(r.jfbObserved)return;const n=r.getRootNode(),s=Array.from(n.querySelectorAll(`input[type="checkbox"][name="${r.name}"]`));s.forEach((e=>{e.jfbObserved=!0}));const o={name:r.name,class_name:r.className,field_options:[],label:t(r)||e(r),required:r.required};for(const e of s)o.field_options.push({value:e.value,label:i(e)}),e.checked&&(o.default=e.value);yield{name:"jet-forms/checkbox-field",attributes:o,innerBlocks:[]}},date:function*(e){yield{name:"jet-forms/date-field",attributes:n(e),innerBlocks:[]}},datetime:l,"datetime-local":l,time:function*(e){yield{name:"jet-forms/time-field",attributes:n(e),innerBlocks:[]}},file:function*(t){const r={name:t.name,class_name:t.className,label:e(t),required:t.required,allowed_mimes:[]};r.allowed_mimes=t.accept.split(",").map((e=>function(e){let t=!1;for(const r in s){if(!s.hasOwnProperty(r))continue;const n=new RegExp(".("+r+")$","i");e.match(n)&&(t=s[r])}return t}(e.trim()))),yield{name:"jet-forms/media-field",attributes:r,innerBlocks:[]}},hidden:function*(e){yield{name:"jet-forms/hidden-field",attributes:{name:e.name,class_name:e.className,default:e.value},innerBlocks:[]}},number:function*(e){const t=n(e);t.placeholder=e.placeholder,e.hasAttribute("step")&&(t.step=e.step),yield{name:"jet-forms/number-field",attributes:t,innerBlocks:[]}},range:function*(e){const t=n(e);e.hasAttribute("step")&&(t.step=e.step),yield{name:"jet-forms/range-field",attributes:t,innerBlocks:[]}},submit:function*(e){yield{name:"jet-forms/submit-field",attributes:{label:e.value||"Submit",class_name:e.className},innerBlocks:[]}}};function*a(t){const r={field_type:t.type,name:t.name,class_name:t.className,default:t.value,label:e(t),required:t.required,placeholder:t.placeholder};t.hasAttribute("maxlength")&&(r.maxlength=t.maxLength),t.hasAttribute("minlength")&&(r.minlength=t.minLength),yield{name:"jet-forms/text-field",attributes:r,innerBlocks:[]}}function*l(e){yield{name:"jet-forms/datetime-field",attributes:n(e),innerBlocks:[]}}const{applyFilters:c}=JetPlugins.hooks,u={INPUT:function*(e){if(e.type=e.type||"text",!o.hasOwnProperty(e.type))return;const t=o[e.type];yield*t(e)},SELECT:function*(t){const r={name:t.name,class_name:t.className,label:e(t),required:t.required,field_options:[]},n=Object.entries(t.options);for(const[e,t]of n)0!==+e||t.value?(r.field_options.push({value:t.value,label:t.label}),t.selected&&(r.default=t.value)):r.placeholder=t.label;yield{name:"jet-forms/select-field",attributes:r,innerBlocks:[]}},TEXTAREA:function*(t){const r={name:t.name,class_name:t.className,label:e(t),required:t.required,placeholder:t.placeholder};t.hasAttribute("maxlength")&&(r.maxlength=t.maxLength),t.hasAttribute("minlength")&&(r.minlength=t.minLength),yield{name:"jet-forms/textarea-field",attributes:r,innerBlocks:[]}},BUTTON:function*(e){!e.type||e.type&&"submit"!==e.type||(yield{name:"jet-forms/submit-field",attributes:{label:e.innerHTML.trim(),class_name:e.className},innerBlocks:[]})}};var h=r(8059),d=r.n(h);document.createElement("div");window.JetFormBuilderParser={parseHTMLtoBlocks:function(e){const t=document.createElement("div");t.innerHTML=e;const r=[],n=t.querySelectorAll("input, textarea, select, button");for(const e of n){const t=c("jet.fb.parse.node",!1,e);if(Array.isArray(t)){r.push(...t);continue}const n=u[e.nodeName];r.push(...Array.from(n(e)))}return r},resolveLabel:e,getFormInnerFields:function(e){const t=d()(e,{allowedTags:["form","input","select","option","textarea","button","fieldset","legend","label","div","h1","h2","h3","h4","h5","h6","span","p","br"],allowedAttributes:!1}),r=document.createElement("div");r.innerHTML=t;const n=r.querySelector("form");return n?n.innerHTML:""}}})()})(); \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/build/editor-rtl.css b/modules/jet-style/framework/blocks-style-manager/assets/build/editor-rtl.css new file mode 100644 index 000000000..db4129da5 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/build/editor-rtl.css @@ -0,0 +1 @@ +:root{--csm-border-color:#e0e0e0;--csm-border-dark-color:#757575;--csm-accent-color:#0073aa}.crocoblock-style-manager__inline-control>.components-base-control__field{align-items:flex-start;display:flex;gap:20px;justify-content:space-between}.crocoblock-style-manager__inline-control>.components-base-control__field>.components-base-control__label{line-height:16px;margin:0}.crocoblock-style-manager__heading-control{font-size:13px;font-weight:600;line-height:18px;margin:0;text-transform:uppercase}.crocoblock-style-manager__control.is-control--text{padding:0 0 10px}.crocoblock-style-manager__color-indicator{align-items:center;cursor:pointer;display:flex;flex:0 0 100px;gap:5px;width:100px}.crocoblock-style-manager__color-indicator .component-color-indicator{height:16px;width:16px}.crocoblock-style-manager__color-indicator-label{font-size:12px;line-height:16px}.crocoblock-style-manager__usage-marker{border-radius:50%;height:6px;right:-10px;position:absolute;top:5px;width:6px}.is-control--dimensions .crocoblock-style-manager__usage-marker{top:11px}.is-control--border .crocoblock-style-manager__usage-marker,.is-control--choose .crocoblock-style-manager__usage-marker,.is-control--range .crocoblock-style-manager__usage-marker{top:4px}.is-control--typography .crocoblock-style-manager__usage-marker{top:5px}.crocoblock-style-manager__usage-marker.is-used{background-color:var(--csm-accent-color)}.crocoblock-style-manager__usage-marker.is-inherited{background-color:var(--csm-border-color)}.crocoblock-style-manager__control,.crocoblock-style-manager__with-spacing{padding:0 0 25px;position:relative}.crocoblock-style-manager__control .components-base-control .components-base-control__field,.crocoblock-style-manager__with-spacing .components-base-control .components-base-control__field{padding-top:0}.crocoblock-style-manager__control:last-child,.crocoblock-style-manager__with-spacing:last-child{padding-bottom:0}.crocoblock-style-manager__control:last-child .crocoblock-style-manager__controls-tabs,.crocoblock-style-manager__with-spacing:last-child .crocoblock-style-manager__controls-tabs{border-bottom:none}.crocoblock-style-manager__control .components-input-control,.crocoblock-style-manager__with-spacing .components-input-control{margin:0}.crocoblock-style-manager__control>div[data-wp-component=Grid],.crocoblock-style-manager__with-spacing>div[data-wp-component=Grid]{align-items:center}.crocoblock-style-manager__control>div[data-wp-component=Grid] .components-base-control__label,.crocoblock-style-manager__with-spacing>div[data-wp-component=Grid] .components-base-control__label{margin:0}.crocoblock-style-manager__control>div[data-wp-component=Grid] div[data-wp-component=HStack],.crocoblock-style-manager__with-spacing>div[data-wp-component=Grid] div[data-wp-component=HStack]{gap:16px}.crocoblock-style-manager__border-control,.crocoblock-style-manager__control .components-border-radius-control,.crocoblock-style-manager__dimensions-control,.crocoblock-style-manager__with-spacing .components-border-radius-control{margin:0}.crocoblock-style-manager__color-palette-item{height:28px;width:28px}.crocoblock-style-manager__color-palette-item-indicator{border-radius:50%;cursor:pointer;height:100%;width:100%}.crocoblock-style-manager__color-palette-item-indicator--active{outline:2px solid var(--csm-border-dark-color);outline-offset:1px}.crocoblock-style-manager__typography-controls{min-width:300px}.crocoblock-style-manager__typography-indicator{align-items:center;cursor:pointer;display:flex;gap:5px;width:100px}.crocoblock-style-manager__typography-indicator-label{font-size:11px;line-height:16px;max-width:67px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crocoblock-style-manager__controls-tabs{border-bottom:1px solid var(--csm-border-color);border-top:1px solid var(--csm-border-color);margin:0 -16px}.crocoblock-style-manager__controls-tabs-navigation{background-color:#efefef;border-bottom:1px solid var(--csm-border-color);display:flex;gap:10px;padding:8px 16px}.crocoblock-style-manager__controls-tabs-navigation button.crocoblock-style-manager__controls-tabs-button{background:transparent;border:none;cursor:pointer;flex:1;padding:8px 0;text-align:center}.crocoblock-style-manager__controls-tabs-navigation button.crocoblock-style-manager__controls-tabs-button.is-active{background-color:#1e1e1e;color:#fff}.crocoblock-style-manager__controls-tabs-content{padding:15px 16px 0}.crocoblock-style-manager__controls-tabs-content:last-child{padding-bottom:15px}.is-control--tabs+.is-control--tabs .crocoblock-style-manager__controls-tabs{border-top:none;margin-top:-25px}.crocoblock-style-manager__popover{min-width:250px}.crocoblock-style-manager__popover-content{padding:20px}.crocoblock-style-manager__popover-content .components-input-control__container{width:100%}.crocoblock-style-manager__popover-header{align-items:center;border-bottom:1px solid var(--csm-border-color);display:flex;font-weight:700;justify-content:space-between;line-height:24px;padding:10px 20px}.crocoblock-style-manager__popover-header button.crocoblock-style-manager__popover-close{height:24px;min-width:0;padding:0;width:24px}.crocoblock-style-manager__popover-trigger{border:1px solid var(--csm-border-color);border-radius:3px;cursor:pointer;margin-top:-5px;padding:5px;position:relative}.crocoblock-style-manager__popover-trigger svg{display:block;height:16px;width:16px}.crocoblock-style-manager__popover-trigger svg path{fill:currentColor}.crocoblock-style-manager__popover-clear{height:20px!important;right:-23px;min-width:20px!important;padding:0!important;position:absolute;top:50%;transform:translateY(-50%)}.crocoblock-style-manager__popover-clear svg{height:12px;width:12px}.crocoblock-style-manager__popover-control{padding-bottom:10px}.crocoblock-style-manager__popover-control-text-row{font-size:12px;line-height:16px;margin-bottom:10px;margin-top:-3px}.crocoblock-style-manager__popover-controls-row{display:flex;gap:10px;width:100%}.crocoblock-style-manager__popover-controls-row .w-50{flex:0 0 calc(50% - 5px);width:calc(50% - 5px)} diff --git a/modules/jet-style/framework/blocks-style-manager/assets/build/editor.asset.php b/modules/jet-style/framework/blocks-style-manager/assets/build/editor.asset.php new file mode 100644 index 000000000..2ff30c21c --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/build/editor.asset.php @@ -0,0 +1 @@ + array('react-jsx-runtime', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks'), 'version' => 'df456a9a93a8c3ed1402'); diff --git a/modules/jet-style/framework/blocks-style-manager/assets/build/editor.css b/modules/jet-style/framework/blocks-style-manager/assets/build/editor.css new file mode 100644 index 000000000..06f49d1e3 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/build/editor.css @@ -0,0 +1 @@ +:root{--csm-border-color:#e0e0e0;--csm-border-dark-color:#757575;--csm-accent-color:#0073aa}.crocoblock-style-manager__inline-control>.components-base-control__field{align-items:flex-start;display:flex;gap:20px;justify-content:space-between}.crocoblock-style-manager__inline-control>.components-base-control__field>.components-base-control__label{line-height:16px;margin:0}.crocoblock-style-manager__heading-control{font-size:13px;font-weight:600;line-height:18px;margin:0;text-transform:uppercase}.crocoblock-style-manager__control.is-control--text{padding:0 0 10px}.crocoblock-style-manager__color-indicator{align-items:center;cursor:pointer;display:flex;flex:0 0 100px;gap:5px;width:100px}.crocoblock-style-manager__color-indicator .component-color-indicator{height:16px;width:16px}.crocoblock-style-manager__color-indicator-label{font-size:12px;line-height:16px}.crocoblock-style-manager__usage-marker{border-radius:50%;height:6px;left:-10px;position:absolute;top:5px;width:6px}.is-control--dimensions .crocoblock-style-manager__usage-marker{top:11px}.is-control--border .crocoblock-style-manager__usage-marker,.is-control--choose .crocoblock-style-manager__usage-marker,.is-control--range .crocoblock-style-manager__usage-marker{top:4px}.is-control--typography .crocoblock-style-manager__usage-marker{top:5px}.crocoblock-style-manager__usage-marker.is-used{background-color:var(--csm-accent-color)}.crocoblock-style-manager__usage-marker.is-inherited{background-color:var(--csm-border-color)}.crocoblock-style-manager__control,.crocoblock-style-manager__with-spacing{padding:0 0 25px;position:relative}.crocoblock-style-manager__control .components-base-control .components-base-control__field,.crocoblock-style-manager__with-spacing .components-base-control .components-base-control__field{padding-top:0}.crocoblock-style-manager__control:last-child,.crocoblock-style-manager__with-spacing:last-child{padding-bottom:0}.crocoblock-style-manager__control:last-child .crocoblock-style-manager__controls-tabs,.crocoblock-style-manager__with-spacing:last-child .crocoblock-style-manager__controls-tabs{border-bottom:none}.crocoblock-style-manager__control .components-input-control,.crocoblock-style-manager__with-spacing .components-input-control{margin:0}.crocoblock-style-manager__control>div[data-wp-component=Grid],.crocoblock-style-manager__with-spacing>div[data-wp-component=Grid]{align-items:center}.crocoblock-style-manager__control>div[data-wp-component=Grid] .components-base-control__label,.crocoblock-style-manager__with-spacing>div[data-wp-component=Grid] .components-base-control__label{margin:0}.crocoblock-style-manager__control>div[data-wp-component=Grid] div[data-wp-component=HStack],.crocoblock-style-manager__with-spacing>div[data-wp-component=Grid] div[data-wp-component=HStack]{gap:16px}.crocoblock-style-manager__border-control,.crocoblock-style-manager__control .components-border-radius-control,.crocoblock-style-manager__dimensions-control,.crocoblock-style-manager__with-spacing .components-border-radius-control{margin:0}.crocoblock-style-manager__color-palette-item{height:28px;width:28px}.crocoblock-style-manager__color-palette-item-indicator{border-radius:50%;cursor:pointer;height:100%;width:100%}.crocoblock-style-manager__color-palette-item-indicator--active{outline:2px solid var(--csm-border-dark-color);outline-offset:1px}.crocoblock-style-manager__typography-controls{min-width:300px}.crocoblock-style-manager__typography-indicator{align-items:center;cursor:pointer;display:flex;gap:5px;width:100px}.crocoblock-style-manager__typography-indicator-label{font-size:11px;line-height:16px;max-width:67px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crocoblock-style-manager__controls-tabs{border-bottom:1px solid var(--csm-border-color);border-top:1px solid var(--csm-border-color);margin:0 -16px}.crocoblock-style-manager__controls-tabs-navigation{background-color:#efefef;border-bottom:1px solid var(--csm-border-color);display:flex;gap:10px;padding:8px 16px}.crocoblock-style-manager__controls-tabs-navigation button.crocoblock-style-manager__controls-tabs-button{background:transparent;border:none;cursor:pointer;flex:1;padding:8px 0;text-align:center}.crocoblock-style-manager__controls-tabs-navigation button.crocoblock-style-manager__controls-tabs-button.is-active{background-color:#1e1e1e;color:#fff}.crocoblock-style-manager__controls-tabs-content{padding:15px 16px 0}.crocoblock-style-manager__controls-tabs-content:last-child{padding-bottom:15px}.is-control--tabs+.is-control--tabs .crocoblock-style-manager__controls-tabs{border-top:none;margin-top:-25px}.crocoblock-style-manager__popover{min-width:250px}.crocoblock-style-manager__popover-content{padding:20px}.crocoblock-style-manager__popover-content .components-input-control__container{width:100%}.crocoblock-style-manager__popover-header{align-items:center;border-bottom:1px solid var(--csm-border-color);display:flex;font-weight:700;justify-content:space-between;line-height:24px;padding:10px 20px}.crocoblock-style-manager__popover-header button.crocoblock-style-manager__popover-close{height:24px;min-width:0;padding:0;width:24px}.crocoblock-style-manager__popover-trigger{border:1px solid var(--csm-border-color);border-radius:3px;cursor:pointer;margin-top:-5px;padding:5px;position:relative}.crocoblock-style-manager__popover-trigger svg{display:block;height:16px;width:16px}.crocoblock-style-manager__popover-trigger svg path{fill:currentColor}.crocoblock-style-manager__popover-clear{height:20px!important;left:-23px;min-width:20px!important;padding:0!important;position:absolute;top:50%;transform:translateY(-50%)}.crocoblock-style-manager__popover-clear svg{height:12px;width:12px}.crocoblock-style-manager__popover-control{padding-bottom:10px}.crocoblock-style-manager__popover-control-text-row{font-size:12px;line-height:16px;margin-bottom:10px;margin-top:-3px}.crocoblock-style-manager__popover-controls-row{display:flex;gap:10px;width:100%}.crocoblock-style-manager__popover-controls-row .w-50{flex:0 0 calc(50% - 5px);width:calc(50% - 5px)} diff --git a/modules/jet-style/framework/blocks-style-manager/assets/build/editor.css.map b/modules/jet-style/framework/blocks-style-manager/assets/build/editor.css.map new file mode 100644 index 000000000..786aaf38e --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/build/editor.css.map @@ -0,0 +1 @@ +{"version":3,"file":"editor.css","mappings":";;;AAAA;EACC;EACA;EACA;AACD;;AAGE;EACC;EACA;EACA;EACA;AAAH;AACG;EACC;EACA;AACJ;AAIC;EACC;EACA;EACA;AAFF;AAGE;EACC;AADH;AAKC;EACC;EACA;EACA;EACA;EACA;EACA;AAHF;AAIE;EACC;AAFH;AAIE;EAGC;AAJH;AAME;EACC;AAJH;AAME;EACC;AAJH;AAQC;EAEC;EACA;AAPF;AAUE;EACC;AARH;AAUE;EACC;AARH;AASG;EACC;AAPJ;AASG;EACC;AAPJ;AAWE;EACC;AATH;AAaC;EAEC;AAZF;AAgBE;EACC;EACA;AAdH;AAeG;EACC;EACA;EACA;EACA;AAbJ;AAcI;EACC;EACA;AAZL;AAkBC;EACC;AAhBF;AAmBC;EACC;EACA;EACA;AAjBF;AAkBE;EACC;EACA;EACA;EACA;EACA;AAhBH;AAiBG;EACC;EACA;EACA;EACA;EACA;EACA;AAfJ;AAgBI;EACC;EACA;AAdL;AAkBE;EACC;AAhBH;AAoBC;EACC;AAlBF;AAmBE;EACC;AAjBH;AAkBG;EACC;AAhBJ;AAmBE;EACC;EACA;EACA;EACA;EACA;EACA;EACA;AAjBH;AAkBG;EACC;EACA;EACA;EACA;AAhBJ;AAmBE;EACC;EACA;EACA;EACA;EACA;AAjBH;AAkBG;EACC;EACA;EACA;AAhBJ;AAiBI;EACC;AAfL;AAmBE;EACC;AAjBH;AAmBE;EACC;EACA;EACA;AAjBH;AAkBG;EACC;EACA;AAhBJ,C","sources":["webpack://crocoblock-style-manager/./assets/src/editor.scss"],"sourcesContent":[":root {\n\t--csm-border-color: #e0e0e0;\n\t--csm-border-dark-color: #757575;\n\t--csm-accent-color: #0073aa;\n}\n.crocoblock-style-manager {\n\t&__inline-control {\n\t\t> .components-base-control__field {\n\t\t\tdisplay: flex;\n\t\t\talign-items: flex-start;\n\t\t\tjustify-content: space-between;\n\t\t\tgap: 15px;\n\t\t\t> .components-base-control__label {\n\t\t\t\tmargin: 0;\n\t\t\t\tline-height: 20px;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__color-indicator {\n\t\tcursor: pointer;\n\t\tdisplay: flex;\n\t\tgap: 5px;\n\t\t&-label {\n\t\t\tfont-size: 12px;\n\t\t}\n\t}\n\n\t&__usage-marker {\n\t\tposition: absolute;\n\t\ttop: 7px;\n\t\tleft: -10px;\n\t\twidth: 6px;\n\t\theight: 6px;\n\t\tborder-radius: 50%;\n\t\t.is-control--dimensions & {\n\t\t\ttop: 11px;\n\t\t}\n\t\t.is-control--choose &,\n\t\t.is-control--range &,\n\t\t.is-control--border & {\n\t\t\ttop: 4px;\n\t\t}\n\t\t&.is-used {\n\t\t\tbackground-color: var(--csm-accent-color);\n\t\t}\n\t\t&.is-inherited {\n\t\t\tbackground-color: var(--csm-border-color);\n\t\t}\n\t}\n\n\t&__control,\n\t&__with-spacing {\n\t\tposition: relative;\n\t\tpadding: 0 0 25px;\n\n\t\t// Fixes for vertical alignment of controls\n\t\t.components-input-control {\n\t\t\tmargin: 0;\n\t\t}\n\t\t> div[data-wp-component=\"Grid\"] {\n\t\t\talign-items: center;\n\t\t\t.components-base-control__label {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\tdiv[data-wp-component=\"HStack\"] {\n\t\t\t\tgap: 16px;\n\t\t\t}\n\t\t}\n\n\t\t.components-border-radius-control {\n\t\t\tmargin: 0;\n\t\t}\n\t}\n\n\t&__border-control,\n\t&__dimensions-control {\n\t\tmargin: 0;\n\t}\n\n\t&__color-palette {\n\t\t&-item {\n\t\t\twidth: 28px;\n\t\t\theight: 28px;\n\t\t\t&-indicator {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tborder-radius: 50%;\n\t\t\t\tcursor: pointer;\n\t\t\t\t&--active {\n\t\t\t\t\toutline: 2px solid var( --csm-border-dark-color );\n\t\t\t\t\toutline-offset: 1px;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t&__typography-controls {\n\t\tmin-width: 300px;\n\t}\n\n\t&__controls-tabs {\n\t\tmargin: 0 -16px;\n\t\tborder-top: 1px solid var(--csm-border-color);\n\t\tborder-bottom: 1px solid var(--csm-border-color);\n\t\t&-navigation {\n\t\t\tdisplay: flex;\n\t\t\tgap: 10px;\n\t\t\tborder-bottom: 1px solid var(--csm-border-color);\n\t\t\tbackground-color: #efefef;\n\t\t\tpadding: 8px 16px;\n\t\t\tbutton.crocoblock-style-manager__controls-tabs-button {\n\t\t\t\tflex: 1;\n\t\t\t\ttext-align: center;\n\t\t\t\tborder: none;\n\t\t\t\tbackground: transparent;\n\t\t\t\tpadding: 8px 0;\n\t\t\t\tcursor: pointer;\n\t\t\t\t&.is-active {\n\t\t\t\t\tbackground-color: #1e1e1e;\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t&-content {\n\t\t\tpadding: 15px 16px 0;\n\t\t}\n\t}\n\n\t&__popover {\n\t\tmin-width: 250px;\n\t\t&-content {\n\t\t\tpadding: 20px;\n\t\t\t.components-input-control__container {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t}\n\t\t&-header {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tborder-bottom: 1px solid var(--csm-border-color);\n\t\t\tpadding: 10px 20px;\n\t\t\tfont-weight: bold;\n\t\t\tline-height: 24px;\n\t\t\tbutton.crocoblock-style-manager__popover-close {\n\t\t\t\twidth: 24px;\n\t\t\t\theight: 24px;\n\t\t\t\tmin-width: 0;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t}\n\t\t&-trigger {\n\t\t\tcursor: pointer;\n\t\t\tborder: 1px solid var(--csm-border-color);\n\t\t\tpadding: 5px;\n\t\t\tborder-radius: 3px;\n\t\t\tmargin-top: -3px;\n\t\t\tsvg {\n\t\t\t\twidth: 16px;\n\t\t\t\theight: 16pxr;\n\t\t\t\tdisplay: block;\n\t\t\t\tpath {\n\t\t\t\t\tfill: currentColor;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t&-control {\n\t\t\tpadding-bottom: 10px;\n\t\t}\n\t\t&-controls-row {\n\t\t\tdisplay: flex;\n\t\t\tgap: 10px;\n\t\t\twidth: 100%;\n\t\t\t.w-50 {\n\t\t\t\twidth: calc( 50% - 5px );\n\t\t\t\tflex: 0 0 calc( 50% - 5px );\n\t\t\t}\n\t\t}\n\t}\n}"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/build/editor.js b/modules/jet-style/framework/blocks-style-manager/assets/build/editor.js new file mode 100644 index 000000000..2c6c23dcf --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/build/editor.js @@ -0,0 +1 @@ +(()=>{"use strict";const e=window.wp.hooks,t=window.wp.compose,o=window.wp.element,r=window.wp.blockEditor,l=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),s=e=>null==e||"string"==typeof e&&""===e.trim()||!(!Array.isArray(e)||0!==e.length)||!(!l(e)||0!==Object.keys(e).length),a=e=>!!s(e)||!!(l(e)&&Object.keys(e).length>0&&Object.values(e).every(e=>s(e))),n=window.wp.components,i=window.ReactJSXRuntime,c=({control:e,value:t,handleChange:o})=>(0,i.jsx)(n.TextControl,{label:e.label,value:t,onChange:e=>o(e),placeholder:e.placeholder,className:"crocoblock-style-manager__text-control",help:e.help,disabled:e.disabled,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),u=({control:e,value:t,handleChange:o})=>{let r=t;return void 0===r&&e.options&&(r=Object.keys(e.options)[0]),(0,i.jsx)(n.__experimentalToggleGroupControl,{label:e.label,value:t,onChange:o,isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:e.options&&Object.entries(e.options).map(([e,t])=>{var o=t.icon||!1;return o&&(o.includes("dashicons-")&&(o=o.replace("dashicons-","")),o=(0,i.jsx)(n.Dashicon,{icon:o})),o?(0,i.jsx)(n.__experimentalToggleGroupControlOptionIcon,{icon:o,value:e,label:t.label,"aria-label":t.label}):(0,i.jsx)(n.__experimentalToggleGroupControlOption,{value:e,label:t.label,"aria-label":t.label},e)})})},d=({control:e,value:t,handleChange:o})=>{const s=wp.data.select("core/block-editor").getSettings().colors,a=t||{},c=()=>void 0===e.hide_radius||!e.hide_radius,u=(e,t)=>{const r={...a};var s=!1;if(l(t)){const o=a[e]||{};"border"===e&&((t.color||t.style||t.width)&&(delete o.top,delete o.right,delete o.bottom,delete o.left,t.width&&!t.style?s="solid":t.style&&(s=t.style)),(t.top||t.right||t.bottom||t.left)&&((o.color||o.style||o.width)&&(t.top={...o,...t.top},t.right={...o,...t.right},t.bottom={...o,...t.bottom},t.left={...o,...t.left}),delete o.color,delete o.style,delete o.width),t.hasOwnProperty("style")&&t.hasOwnProperty("color")&&void 0===t.style&&void 0===t.color&&(delete t.style,delete t.color,delete t.width,delete o.width,delete o.style,delete o.color,s=!1)),s&&(t.style=s),r[e]={...o,...t}}else r[e]=t;!c()&&r.radius&&delete r.radius,o(r)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.BorderBoxControl,{label:e.label,value:a.border,onChange:e=>u("border",e),className:"crocoblock-style-manager__border-control crocoblock-style-manager__with-spacing",help:e.help,colors:s,enableStyle:!0,__experimentalIsRenderedInSidebar:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),c()&&(0,i.jsx)(r.__experimentalBorderRadiusControl,{label:"Radius",values:a.radius,value:a.radius,onChange:e=>u("radius",e),className:"crocoblock-style-manager__border-radius-control",__experimentalIsRenderedInSidebar:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]})},h=({children:e,isOpen:t,onClose:o,label:r,anchor:l})=>{if(!t)return null;const s=(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"16",height:"16","aria-hidden":"true",focusable:"false",children:(0,i.jsx)("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"})});return(0,i.jsx)(n.Popover,{className:"crocoblock-style-manager__popover",placement:"left",onClose:o,shouldCloseOnClickOutside:!0,anchor:l,noArrow:!1,offset:10,children:(0,i.jsxs)("div",{className:"crocoblock-style-manager__popover",children:[(0,i.jsxs)("div",{className:"crocoblock-style-manager__popover-header",children:[r,(0,i.jsx)(n.Button,{className:"crocoblock-style-manager__popover-close",onClick:o,icon:s,label:"Close"})]}),(0,i.jsx)("div",{className:"crocoblock-style-manager__popover-content",children:e})]})})},p=({children:e,trigger:t,label:r})=>{const[l,s]=(0,o.useState)(null),[a,n]=(0,o.useState)(!1);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{ref:s,onClick:()=>{n(!a)},children:t}),(0,i.jsx)(h,{anchor:l,label:r,isOpen:a,onClose:()=>{n(!1)},children:e})]})},m=({control:e,value:t,handleChange:o})=>{const r=wp.data.select("core/block-editor").getSettings().colors,l=(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",children:(0,i.jsx)("path",{d:"M12 0c-3.31 0-6.291 1.353-8.459 3.522l-2.48-2.48-1.061 7.341 7.437-.966-2.489-2.488c1.808-1.808 4.299-2.929 7.052-2.929 5.514 0 10 4.486 10 10s-4.486 10-10 10c-3.872 0-7.229-2.216-8.89-5.443l-1.717 1.046c2.012 3.803 6.005 6.397 10.607 6.397 6.627 0 12-5.373 12-12s-5.373-12-12-12z"})}),s=(0,i.jsx)(n.BaseControl,{label:e.label,id:e.id,className:"crocoblock-style-manager__inline-control",__nextHasNoMarginBottom:!0,children:(0,i.jsxs)("div",{className:"crocoblock-style-manager__color-indicator crocoblock-style-manager__popover-trigger",children:[t&&(0,i.jsx)(n.Button,{className:"crocoblock-style-manager__popover-clear",onClick:e=>{e.stopPropagation(),o("")},"aria-label":"Reset ",icon:l}),(0,i.jsx)(n.ColorIndicator,{colorValue:t}),t&&(0,i.jsx)("span",{className:"crocoblock-style-manager__color-indicator-label",children:t})]})});return(0,i.jsxs)(p,{trigger:s,label:e.label,children:[(0,i.jsx)(n.ColorPicker,{onChange:e=>{o(e)},color:t,enableAlpha:!0}),(0,i.jsx)(n.Flex,{className:"crocoblock-style-manager__color-palette",justify:"flex-start",align:"center",direction:"row",wrap:!0,gap:2,children:r.map(e=>(0,i.jsx)(n.FlexItem,{className:"crocoblock-style-manager__color-palette-item",children:(0,i.jsx)(n.ColorIndicator,{colorValue:e.color,onClick:()=>{o(e.color)},className:{"crocoblock-style-manager__color-palette-item-indicator":!0,"crocoblock-style-manager__color-palette-item-indicator--active":e.color===t}})},e.slug))})]})},g=({control:e,value:t,handleChange:o})=>{const l=(0,i.jsx)("svg",{clipRule:"evenodd",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"m19 20.25c0-.402-.356-.75-.75-.75-2.561 0-11.939 0-14.5 0-.394 0-.75.348-.75.75s.356.75.75.75h14.5c.394 0 .75-.348.75-.75zm-7.403-3.398 9.124-9.125c.171-.171.279-.423.279-.684 0-.229-.083-.466-.28-.662l-3.115-3.104c-.185-.185-.429-.277-.672-.277s-.486.092-.672.277l-9.143 9.103c-.569 1.763-1.555 4.823-1.626 5.081-.02.075-.029.15-.029.224 0 .461.349.848.765.848.511 0 .991-.189 5.369-1.681zm-3.27-3.342 2.137 2.137-3.168 1.046zm.955-1.166 7.651-7.616 2.335 2.327-7.637 7.638z",fillRule:"nonzero"})}),s=[{label:"Default",value:""}];if(window?.crocoStyleEditorData?.fonts)for(const e of window?.crocoStyleEditorData?.fonts)s.push(e);const a=t||{},c=(e,t)=>{const r={...a,[e]:t};o(r)},u=[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"},{a11yLabel:"Ems (em)",label:"em",step:.1,value:"em"},{a11yLabel:"Percent (%)",label:"%",step:1,value:"%"},{a11yLabel:"Rems (rem)",label:"rem",step:.1,value:"rem"}],d=e.label||"Typography",h=e=>!(e&&0!==Object.keys(e).length&&!Object.values(e).every(e=>!e)),m=(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",children:(0,i.jsx)("path",{d:"M12 0c-3.31 0-6.291 1.353-8.459 3.522l-2.48-2.48-1.061 7.341 7.437-.966-2.489-2.488c1.808-1.808 4.299-2.929 7.052-2.929 5.514 0 10 4.486 10 10s-4.486 10-10 10c-3.872 0-7.229-2.216-8.89-5.443l-1.717 1.046c2.012 3.803 6.005 6.397 10.607 6.397 6.627 0 12-5.373 12-12s-5.373-12-12-12z"})}),g=(0,i.jsx)(n.BaseControl,{label:d,id:e.id,className:"crocoblock-style-manager__inline-control",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,children:(0,i.jsxs)("div",{className:"crocoblock-style-manager__typography-indicator crocoblock-style-manager__popover-trigger",children:[!h(a)&&(0,i.jsx)(n.Button,{className:"crocoblock-style-manager__popover-clear",onClick:e=>{e.stopPropagation(),o({})},"aria-label":"Reset",icon:m}),l,(e=>{if(h(e))return(0,i.jsx)("span",{className:"crocoblock-style-manager__typography-indicator-label",children:"Default"});const{family:t,size:o,weight:r,style:l,transform:s,decoration:a,letterSpacing:n}=e,c=[t||"Default",o,r,l,s,a].filter(Boolean).join(", ");return c?(0,i.jsx)("span",{className:"crocoblock-style-manager__typography-indicator-label",children:c}):(0,i.jsx)("span",{className:"crocoblock-style-manager__typography-indicator-label",children:"Default"})})(a)]})});return(0,i.jsx)(p,{trigger:g,label:d,children:(0,i.jsxs)("div",{className:"crocoblock-style-manager__typography-controls",children:[(0,i.jsx)(n.SelectControl,{label:"Font Family",value:a.family,onChange:e=>{c("family",e)},options:s,className:"crocoblock-style-manager__popover-control",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,i.jsxs)("div",{className:"crocoblock-style-manager__popover-control-text-row",children:["You can manage installed fonts ",(0,i.jsx)("a",{href:window?.crocoStyleEditorData?.fonts_manager_url,target:"_blank",children:"here"})]}),(0,i.jsxs)("div",{className:"crocoblock-style-manager__popover-controls-row",children:[(0,i.jsx)(n.__experimentalUnitControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:"Font Size",value:a.size,onChange:e=>{c("size",e)},units:u,allowEmpty:!0,className:"crocoblock-style-manager__popover-control w-50"}),(0,i.jsx)(n.__experimentalUnitControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:"Line Height",value:a.lineHeight,onChange:e=>{c("lineHeight",e)},units:u,allowEmpty:!0,className:"crocoblock-style-manager__popover-control w-50"})]}),(0,i.jsxs)("div",{className:"crocoblock-style-manager__popover-controls-row",children:[(0,i.jsx)("div",{className:"w-50",children:(0,i.jsx)(n.SelectControl,{label:"Font Weight",value:a.weight,onChange:e=>{c("weight",e)},options:[{label:"Default",value:""},{label:"Thin 100",value:"100"},{label:"Extra Light 200",value:"200"},{label:"Light 300",value:"300"},{label:"Regular 400",value:"400"},{label:"Medium 500",value:"500"},{label:"Semi Bold 600",value:"600"},{label:"Bold 700",value:"700"},{label:"Extra Bold 800",value:"800"},{label:"Black 900",value:"900"}],className:"crocoblock-style-manager__popover-control",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})}),(0,i.jsx)("div",{className:"w-50",children:(0,i.jsx)(n.SelectControl,{label:"Font Style",value:a.style,onChange:e=>{c("style",e)},options:[{label:"Default",value:""},{label:"Normal",value:"normal"},{label:"Italic",value:"italic"},{label:"Oblique",value:"oblique"}],className:"crocoblock-style-manager__popover-control",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})})]}),(0,i.jsxs)("div",{className:"crocoblock-style-manager__popover-controls-row",children:[(0,i.jsx)("div",{className:"w-50",children:(0,i.jsx)(r.__experimentalTextTransformControl,{label:"Text Transform",value:a.transform,onChange:e=>{c("transform",e)},className:"crocoblock-style-manager__popover-control",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})}),(0,i.jsx)("div",{className:"w-50",children:(0,i.jsx)(r.__experimentalTextDecorationControl,{label:"Text Decoration",value:a.decoration,onChange:e=>{c("decoration",e)},className:"crocoblock-style-manager__popover-control",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})})]}),(0,i.jsx)(n.__experimentalUnitControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:"Letter Spacing",value:a.letterSpacing,onChange:e=>{c("letterSpacing",e)},units:u,allowEmpty:!0,className:"crocoblock-style-manager__popover-control"})]})})},b=({control:e,value:t,handleChange:o})=>(0,i.jsx)(n.BoxControl,{label:e.label,values:t,value:t,onChange:e=>o(e),className:"crocoblock-style-manager__dimensions-control",__experimentalIsRenderedInSidebar:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),_=({control:e,value:t,handleChange:r})=>{const l=e=>e?parseFloat(e):0,s=t=>{let o=t;const r=e.min||0,a=e.max||100;if("number"==typeof o&&(oa&&(o=a)),"object"==typeof o&&null!==o){let e="";for(const t in o)o.hasOwnProperty(t)&&(e+=s(o[t]));o=e}return!0===e.cut_units&&(o=l(o)),o},[a,c]=(0,o.useState)(s(t)),u=()=>{if(!0===e.cut_units)return"";if(a){const e=("number"==typeof a?a.toString():a).match(/[a-zA-Z%]+/);if(e&&e.length>0)return e[0]}return e.units&&e.units.length>0?e.units[0].value:""},d=e=>{const t=u();return t?`${e}${t}`:e};if(!e.units){const t=e.min||0,o=e.max||100;return(0,i.jsx)(n.RangeControl,{label:e.label,value:a,onChange:e=>{c(e),r(e)},placeholder:e.placeholder,className:"crocoblock-style-manager__text-control",help:e.help,min:t,max:o,disabled:e.disabled,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}return(0,i.jsx)(n.BaseControl,{label:e.label,help:e.help,className:"crocoblock-style-manager__range-control",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,children:(0,i.jsxs)(n.__experimentalHStack,{className:"crocoblock-style-manager__range-control__hstack",alignment:"center",children:[(0,i.jsx)("div",{style:{flex:"1 1 0%"},children:(0,i.jsx)(n.RangeControl,{value:l(a),onChange:e=>{c(d(e)),r(d(e))},placeholder:e.placeholder,className:"crocoblock-style-manager__text-control",withInputField:!1,min:(()=>{const t=u(),o=e.units.find(e=>e.value===t);return o&&o.intervals?o.intervals.min:0})(),max:(()=>{const t=u(),o=e.units.find(e=>e.value===t);return o&&o.intervals?o.intervals.max:100})(),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}),(0,i.jsx)("div",{style:{flex:"0 0 80px"},children:(0,i.jsx)(n.__experimentalUnitControl,{value:a,onChange:e=>{r(e),c(e)},units:(()=>{const t=[];if(e.units&&e.units.length>0)for(const o of e.units)t.push({value:o.value,label:o.label||o.value,default:o.default||0});return t})(),className:"crocoblock-style-manager__unit-control",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})})]})})},x=({control:e,value:t,handleChange:o})=>(0,i.jsx)(n.ToggleControl,{label:e.label,checked:t,onChange:o,help:e.help,disabled:e.disabled,className:"crocoblock-style-manager__toggle-control"}),f=({control:e})=>e.content?(0,i.jsx)("h5",{className:"crocoblock-style-manager__heading-control",dangerouslySetInnerHTML:{__html:e.content}}):null,y=e=>(0,i.jsx)("div",{className:"crocoblock-style-manager__controls-tabs-navigation",children:e.tabs.map(t=>{return(0,i.jsx)("button",{className:(o=t.id,"crocoblock-style-manager__controls-tabs-button "+(e.activeTab===o?"is-active":"")),onClick:()=>e.onTabChange(t.id),children:t.title},t.id);var o})}),v=e=>{const[t,r]=(0,o.useState)(e.control.children[0].id);return(0,i.jsxs)("div",{className:"crocoblock-style-manager__controls-tabs",children:[(0,i.jsx)(y,{tabs:e.control.children,activeTab:t,onTabChange:r}),(0,i.jsx)("div",{className:"crocoblock-style-manager__controls-tabs-content",children:(()=>{const o=e.control.children.find(e=>e.id===t);return o&&o.children?o.children.map(t=>(0,i.jsx)(V,{control:t,props:e},t.id)):null})()})]})},w=window.wp.data,j={__desktop:{minWidth:992},__tablet:{maxWidth:991},__mobile:{maxWidth:478}},k=()=>j,C=(e,t)=>{const o=j[t];if(!o)return e;let r="";return o.minWidth&&(r+=`(min-width: ${o.minWidth}px)`),o.maxWidth&&(r&&(r+=" and "),r+=`(max-width: ${o.maxWidth}px)`),r?`@media ${r} { ${e} }`:e};function S(e,t){if(!e||!t)return!0;for(const[o,r]of Object.entries(e))if(Array.isArray(r)){if(!r.includes(t[o]))return!1}else if(t[o]!==r)return!1;return!0}function N(e){const t=e?.attributes||{},o=window.crocoStyleEditorData.support_name,r=t?.[o]||{};return{...t,...r}}const V=({control:e,props:t})=>{if(e.condition&&!S(e.condition,N(t)))return null;const{attributes:o,setAttributes:r}=t,l=window.crocoStyleEditorData.support_name,s=(0,w.useSelect)(e=>{const t=e("core/edit-post");let o="Desktop";return t&&"function"==typeof t.__experimentalGetPreviewDeviceType&&(o=t.__experimentalGetPreviewDeviceType()),`__${o.toLowerCase()}`},[]),h=Object.keys(j);o[l]?.[e.id]||(o[l][e.id]=e.defaultValue);const p=(e,t)=>{let o=null;for(const[r,l]of Object.entries(e)){if(l===t)return r;if("object"==typeof l&&(o=p(l,t),o))break}return o},y=t=>{if(e.return_value){let o=p(e.return_value,t);o&&("true"===(t=o)?t=!0:"false"===t&&(t=!1))}return t},k=t=>{e.return_value&&("boolean"==typeof t?t=!0===t?e.return_value.true||null:!1===t&&e.return_value.false||null:"string"!=typeof t&&"number"!=typeof t||(t=e.return_value?.[t]||null)),V(e.id,t)},C=e=>{if("__desktop"===s)return o[l][e];if(o[l][s]?.[e])return o[l][s][e];{const t=h.indexOf(s)-1,r=h[t];return t&&r&&o[l][r]?.[e]?o[l][r][e]:o[l][e]}},V=(e,t)=>{let a={};a="__desktop"===s?{...o[l],[e]:t}:{...o[l],[s]:{...o[l][s],[e]:t}},r({[l]:a})};return(0,i.jsxs)("div",{className:`crocoblock-style-manager__control is-control--${e.type}`,children:[(()=>{const t=C(e.id);if(e.default&&e.default===t)return null;if(a(t))return null;let r=!1,c="Is inherited from the previous breakpoints";return("__desktop"!==s||a(o[l][e.id]))&&a(o[l]?.[s]?.[e.id])||(r=!0,c="Explicitly set for the current device"),(0,i.jsx)(n.Tooltip,{text:c,placement:"top",delay:300,children:(0,i.jsx)("div",{className:"crocoblock-style-manager__usage-marker is-"+(r?"used":"inherited")})})})(),(()=>{const t={control:e,value:y(C(e.id)),handleChange:k};switch(e.type){case"text":return(0,i.jsx)(f,{...t});case"input":return(0,i.jsx)(c,{...t});case"color-picker":return(0,i.jsx)(m,{...t});case"toggle":return(0,i.jsx)(x,{...t});case"range":return(0,i.jsx)(_,{...t});case"choose":return(0,i.jsx)(u,{...t});case"dimensions":return(0,i.jsx)(b,{...t});case"border":return(0,i.jsx)(d,{...t});case"typography":return(0,i.jsx)(g,{...t});case"select":return(0,i.jsx)(i.Fragment,{});case"tabs":return(0,i.jsx)(v,{control:e,attributes:o,setAttributes:r});default:return null}})()]})},B=({section:e,props:t})=>{return e.condition&&!S(e.condition,N(t))?null:(0,i.jsx)(n.PanelBody,{title:e.title,initialOpen:e.initialOpen,className:"crocoblock-style-manager__control-section",children:(o=e,!!o.children&&!!(Array.isArray(o.children)&&o.children.length>0)&&e.children.map(e=>(0,i.jsx)(V,{control:e,props:t},e.id)))});var o},D=e=>{const t=(o=e.name,window.crocoBlockStyleEditor.getBlockControls(o)||{});var o;return(0,i.jsx)(r.InspectorControls,{group:"styles",children:t.map(t=>(0,i.jsx)(B,{section:t,props:e},t.id))})};class T{static getType(){return"base-field"}constructor(e,t){this.uniqueClassName=e,this.rawValue=t}getSelectorMacros(){return{wrapper:"body .is-root-container ."+this.uniqueClassName,id:this.uniqueClassName}}parseSelector(e,t){const o=this.getSelectorMacros();return` ${e=this.replaceData(e,o)} { ${t=this.getParsedProps(t)} }`}getParsedProps(e){const t=this.getParsedValue();return this.replaceData(e,t)}replaceData(e,t){return e.replace(/{{\s*([\w-]+)\s*}}/g,(e,o)=>(o=o.toLowerCase(),void 0!==t[o]?t[o]:e))}getParsedValue(){return{value:this.rawValue}}cssVarValueFormat(){return"{{VALUE}}"}isValidValueForVar(e,t){return!("inherit"===e||"initial"===e||"unset"===e||null==e||"object"==typeof e&&!Object.keys(e).length||"string"==typeof e&&!e.trim()||"number"==typeof e&&isNaN(e)||"function"==typeof e)}parseVariable(e){const t=e.prefix||"",o=e.name||!1;let r=e.full_name||t+"-"+o;if(!r)return"";e.suffix&&(r+=e.suffix);let l=this.getParsedValue(),s={};if(l.value)s[r]=l.value;else for(const e in l)l.hasOwnProperty(e)&&this.isValidValueForVar(l[e],e)&&(s[r+"__"+e]=l[e]);return s}}class z extends T{static getType(){return"color-picker"}}class E extends T{static getType(){return"typography"}getParsedValue(){return{family:this.rawValue.family||"inherit",weight:this.rawValue.weight||"inherit",transform:this.rawValue.transform||"inherit",style:this.rawValue.style||"inherit",decoration:this.rawValue.decoration||"inherit",lineheight:this.rawValue.lineheight||this.rawValue.lineHeight||"inherit",lh_unit:"",letterspacing:this.rawValue.letterSpacing||"inherit",ls_unit:"",size:this.rawValue.size||"inherit",s_unit:""}}}class M extends T{static getType(){return"border"}getParsedValue(){return this.rawValue?{border:this.parseBorderValue(this.rawValue.border),radius:this.rawValue.radius}:{border:{},radius:{}}}parseBorderValue(e){return e?e.color||e.width||e.style?{global:{color:e.color||"inherit",width:e.width||"inherit",style:e.style||"inherit"}}:e:{}}getParsedProps(e){const t=this.getParsedValue();let o="";if(t.border)for(const[e,r]of Object.entries(t.border))o+="global"===e?this.getBorderCSS(r):this.getBorderCSS(r,e);if(t.radius)if(l(t.radius)){const e={"border-top-left-radius":"topLeft","border-top-right-radius":"topRight","border-bottom-right-radius":"bottomRight","border-bottom-left-radius":"bottomLeft"};for(const[r,l]of Object.entries(e))t.radius[l]&&(o+=`${r}: ${t.radius[l]};`)}else o+=`border-radius: ${t.radius};`;return o}parseVariable(e){const t=void 0!==e.prefix?e.prefix:"",o=void 0!==e.name&&e.name;let r=e.full_name?e.full_name:t+"-"+o;if(!r)return{};e.suffix&&(r+=e.suffix);const l=this.getParsedValue(),s={};if(l.radius){let e="";"string"==typeof l.radius?e=l.radius:(["topLeft","topRight","bottomRight","bottomLeft"].forEach(t=>{e+=l.radius[t]?l.radius[t]+" ":"0 "}),e=e.trim()),s[r+"__radius"]=e}if(l.border&&"object"==typeof l.border){const e=l.border.global||{};["top","right","bottom","left"].forEach(t=>{const o=l.border[t]&&"object"==typeof l.border[t]?l.border[t]:{},a=o.color||e.color||"transparent",n=o.width||e.width||"0",i=o.style||e.style||"solid";s[r+"__"+t]=n+" "+i+" "+a})}return s}getBorderCSS(e,t){let o="";return t=t?"-"+t:"",e&&e.color&&(o+=`border${t}-color: ${e.color};`),e&&e.width&&(o+=`border${t}-width: ${e.width};`),e&&e.style&&(o+=`border${t}-style: ${e.style};`),o}}class H extends T{static getType(){return"dimensions"}parseVariable(e){const t=e.prefix||"",o=e.name||!1;let r=e.full_name||t+"-"+o;if(!r)return"";e.suffix&&(r+=e.suffix);let s=this.getParsedValue(),a="",n={};if(!l(s))return n;let i=["top","right","bottom","left"],c=!0;for(const e of i)s[e]&&(c=!1),a+=`${s[e]||0} `;return c||(n[r]=a.trim()),n}getParsedValue(){if(!this.rawValue)return{top:"",right:"",bottom:"",left:""};let e={};e=l(this.rawValue)?{top:this.rawValue.top||"",right:this.rawValue.right||"",bottom:this.rawValue.bottom||"",left:this.rawValue.left||""}:{top:this.rawValue,right:this.rawValue,bottom:this.rawValue,left:this.rawValue};for(const t in e)e[t]||(e[t]="0"),e[t].match(/[^\d]+$/)||(e[t]+="px");return e}}class P extends T{static getType(){return"range"}getParsedValue(){return{value:this.rawValue||0,unit:""}}}class O extends T{static getType(){return"choose"}getSelectorMacros(){return{wrapper:"body .is-root-container ."+this.uniqueClassName}}replaceData(e,t){return e.replace(/{{\s*([\w-]+)\s*}}/g,(e,o)=>(o=o.toLowerCase(),void 0!==t[o]?t[o]:e))}getParsedValue(){return{value:this.rawValue}}}class R extends T{static getType(){return"toggle"}getParsedValue(){return{value:this.rawValue||null}}}class L{constructor(e,t){this.blockName=e,this.attributes=t,this.uniqueClassName=t._uniqueClassName||!1,this.css="",this.cssVariables={},this.responsiveCSS={},this.controlHandlers={[z.getType()]:z,[E.getType()]:E,[M.getType()]:M,[H.getType()]:H,[P.getType()]:P,[O.getType()]:O,[R.getType()]:R}}getControlHandler(e){const t=e.type||!1;return t&&this.controlHandlers[t]||!1}getCSS(){this.css="";const{blockName:e}=this;if(!window.crocoBlockStyleEditor.blocks[e])return this.css;for(const t of window.crocoBlockStyleEditor.blocks[e])this.generateControlStyles(t);for(const e in this.responsiveCSS){if(!this.responsiveCSS[e])continue;const t=C(this.responsiveCSS[e],e);t&&(this.css+=t)}return{styles:this.css,variables:this.cssVariables}}generateResponsiveStyles(e,t){const o=e.id||!1,r=e.css_selector||!1;if(o&&r)for(const e in k()){if(!this.attributes?.[e]?.[o])continue;const l=new t(this.uniqueClassName,this.attributes[e][o]);for(const t in r){const o=l.parseSelector(t,r[t]);this.responsiveCSS[e]||(this.responsiveCSS[e]=""),this.responsiveCSS[e]+=o}}}generateResponsiveVariables(e,t,o){for(const r in k()){if(t.suffix="",!this.attributes?.[r]?.[e])continue;t.suffix=r;const l=new o(this.uniqueClassName,this.attributes[r][e]);this.cssVariables={...this.cssVariables,...l.parseVariable(t)}}}generateControlStyles(e){const t=this.getControlHandler(e),o=e.id||!1,{attributes:r}=this;if(t&&o){if(r[o]){const r=new t(this.uniqueClassName,this.attributes[o]);if(e.css_selector)for(const t in e.css_selector)this.css+=r.parseSelector(t,e.css_selector[t]);e.css_var&&(this.cssVariables={...this.cssVariables,...r.parseVariable(e.css_var)})}e.css_selector&&this.generateResponsiveStyles(e,t),e.css_var&&this.generateResponsiveVariables(o,e.css_var,t)}if(e.children)for(const t of e.children)this.generateControlStyles(t)}}const $=(0,t.createHigherOrderComponent)(e=>t=>{const{name:r,className:l="",clientId:s,setAttributes:a,attributes:n}=t,c=(0,w.useSelect)(e=>e("core/blocks").getBlockType(r),[r]);if(c?.supports?.crocoblock_styles){const r=t?.attributes?.[window.crocoStyleEditorData.support_name]?._uniqueClassName;return(0,o.useEffect)(()=>{if(window.crocoBlockStyleEditor.classIsUsed(r,s)){const e=F();a({[window.crocoStyleEditorData.support_name]:{...n[window.crocoStyleEditorData.support_name],_uniqueClassName:e}})}},[]),(0,i.jsx)(e,{...t,className:`${l} ${r}`.trim()})}return(0,i.jsx)(e,{...t})},"withBlockUniqueClass"),F=()=>{let e="";for(let t=0;t<8;t++)e+="abcdefghijklmnopqrstuvwxyz0123456789".charAt(0!==t?Math.floor(36*Math.random()):Math.floor(26*Math.random()));return window.crocoStyleEditorData.class_prefix+e},I=(0,t.createHigherOrderComponent)(e=>t=>{const{attributes:r,clientId:l,setAttributes:a}=t,n=window.crocoStyleEditorData.support_name;if(!r||!r[n])return(0,i.jsx)(e,{...t});(0,o.useEffect)(()=>{r[n]._uniqueClassName||a({[n]:{...r[n],_uniqueClassName:F()}})},[l]);const c=new L(t.name,r[n]),{styles:u,variables:d}=c.getCSS();return(0,i.jsxs)(i.Fragment,{children:[!s(u)&&(0,i.jsx)("style",{children:u}),!s(d)&&(0,i.jsx)("div",{style:d,className:"wp-block",children:(0,i.jsx)(e,{...t})}),s(d)&&(0,i.jsx)(e,{...t}),(0,i.jsx)(D,{...t})]})},"withStylesControls");window.crocoBlockStyleEditor=new class{init(){this.blocks=window?.crocoStyleEditorData?.blocks_supports||{},this.supportName=window?.crocoStyleEditorData?.support_name,this.defaults=window?.crocoStyleEditorData?.defaults||{},this.usedClasses={},(0,e.addFilter)("blocks.registerBlockType","crocoblock-style-manager/enable-block-support",this.registerBlock.bind(this)),(0,e.addFilter)("editor.BlockEdit","crocoblock-style-manager/enable-block-support",I),(0,e.addFilter)("editor.BlockListBlock","crocoblock-style-manager/with-crocoblock-editor-class",$,0)}classIsUsed(e,t){return!(!e||!t||(this.usedClasses[e]?this.usedClasses[e]===t:(this.usedClasses[e]=t,1)))}getBlockControls(e){return this.blocks[e]||!1}registerBlock(e,t){if(!this.getBlockControls(t))return e;const o=e.supports||{};o[this.supportName]=!0;const r=e.attributes||{};if(!r[this.supportName]){let e={_uniqueClassName:""};this.defaults[t]&&(e={...e,...this.defaults[t]}),r[this.supportName]={type:"object",default:e,style:!0}}return{...e,supports:o,attributes:r}}},window.crocoBlockStyleEditor.init()})(); \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/build/editor.js.map b/modules/jet-style/framework/blocks-style-manager/assets/build/editor.js.map new file mode 100644 index 000000000..bfc2d84cf --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/build/editor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"editor.js","mappings":";;;;;;;;;;;;;;;;;;AAAwD;AAAA;AAExD,MAAMM,eAAe,GAAGA,CAAE;EAAEC,QAAQ;EAAEC,MAAM;EAAEC,OAAO;EAAEC,KAAK;EAAEC;AAAO,CAAC,KAAM;EAE3E,IAAK,CAAEH,MAAM,EAAG;IACf,OAAO,IAAI;EACZ;EAEA,MAAMI,SAAS,gBACdT,sDAAA;IAAKU,KAAK,EAAC,4BAA4B;IAACC,OAAO,EAAC,WAAW;IAACC,KAAK,EAAC,IAAI;IAACC,MAAM,EAAC,IAAI;IAAC,eAAY,MAAM;IAACC,SAAS,EAAC,OAAO;IAAAV,QAAA,eAACJ,sDAAA;MAAMe,CAAC,EAAC;IAAiJ,CAAO;EAAC,CAAK,CAC9R;EAED,oBACCf,sDAAA,CAACH,0DAAO;IACPmB,SAAS,EAAC,mCAAmC;IAC7CC,SAAS,EAAC,MAAM;IAChBX,OAAO,EAAGA,OAAS;IACnBY,yBAAyB,EAAG,IAAM;IAClCV,MAAM,EAAGA,MAAQ;IACjBW,OAAO,EAAG,KAAO;IACjBC,MAAM,EAAG,EAAI;IAAAhB,QAAA,eAEbF,u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;IAEA,OAAO;MACN,GAAGoB,QAAQ;MACXzB,QAAQ,EAAEA,QAAQ;MAClBhQ,UAAU,EAAEA;IACb,CAAC;EACF;AACD;AAEAG,MAAM,CAACwN,qBAAqB,GAAG,IAAIwD,qBAAqB,CAAC,CAAC;AAC1DhR,MAAM,CAACwN,qBAAqB,CAACyD,IAAI,CAAC,CAAC,C","sources":["webpack://crocoblock-style-manager/./assets/src/components/common/controls-popover.jsx","webpack://crocoblock-style-manager/./assets/src/components/common/controls-tabs-navigation.jsx","webpack://crocoblock-style-manager/./assets/src/components/common/controls-tabs.jsx","webpack://crocoblock-style-manager/./assets/src/components/common/popover-container.jsx","webpack://crocoblock-style-manager/./assets/src/components/control-component.jsx","webpack://crocoblock-style-manager/./assets/src/components/control-section.jsx","webpack://crocoblock-style-manager/./assets/src/components/control-stack.jsx","webpack://crocoblock-style-manager/./assets/src/components/controls/border.jsx","webpack://crocoblock-style-manager/./assets/src/components/controls/choose.jsx","webpack://crocoblock-style-manager/./assets/src/components/controls/color.jsx","webpack://crocoblock-style-manager/./assets/src/components/controls/dimensions.jsx","webpack://crocoblock-style-manager/./assets/src/components/controls/range.jsx","webpack://crocoblock-style-manager/./assets/src/components/controls/text.jsx","webpack://crocoblock-style-manager/./assets/src/components/controls/typography.jsx","webpack://crocoblock-style-manager/./assets/src/css-engine/fields/base-field.js","webpack://crocoblock-style-manager/./assets/src/css-engine/fields/border.js","webpack://crocoblock-style-manager/./assets/src/css-engine/fields/color.js","webpack://crocoblock-style-manager/./assets/src/css-engine/fields/dimensions.js","webpack://crocoblock-style-manager/./assets/src/css-engine/fields/index.js","webpack://crocoblock-style-manager/./assets/src/css-engine/fields/range.js","webpack://crocoblock-style-manager/./assets/src/css-engine/fields/typography.js","webpack://crocoblock-style-manager/./assets/src/css-engine/generator.js","webpack://crocoblock-style-manager/./assets/src/editor.scss","webpack://crocoblock-style-manager/./assets/src/helpers/breakpoints.js","webpack://crocoblock-style-manager/./assets/src/helpers/utils.js","webpack://crocoblock-style-manager/./assets/src/hoc-wrappers/with-block-class.js","webpack://crocoblock-style-manager/./assets/src/hoc-wrappers/with-styles-controls.js","webpack://crocoblock-style-manager/external window [\"wp\",\"blockEditor\"]","webpack://crocoblock-style-manager/external window [\"wp\",\"components\"]","webpack://crocoblock-style-manager/external window [\"wp\",\"compose\"]","webpack://crocoblock-style-manager/external window [\"wp\",\"data\"]","webpack://crocoblock-style-manager/external window [\"wp\",\"element\"]","webpack://crocoblock-style-manager/external window [\"wp\",\"hooks\"]","webpack://crocoblock-style-manager/external window \"ReactJSXRuntime\"","webpack://crocoblock-style-manager/webpack/bootstrap","webpack://crocoblock-style-manager/webpack/runtime/compat get default export","webpack://crocoblock-style-manager/webpack/runtime/define property getters","webpack://crocoblock-style-manager/webpack/runtime/hasOwnProperty shorthand","webpack://crocoblock-style-manager/webpack/runtime/make namespace object","webpack://crocoblock-style-manager/./assets/src/editor.js"],"sourcesContent":["import { Popover, Button } from '@wordpress/components';\n\nconst ControlsPopover = ( { children, isOpen, onClose, label, anchor } ) => {\n\n\tif ( ! isOpen ) {\n\t\treturn null;\n\t}\n\n\tconst closeIcon = (\n\t\t\n\t);\n\n\treturn (\n\t\t\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{ label}\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{ children }\n\t\t\t\t
\n\t\t\t
\n\t\t\n\t);\n};\n\nexport default ControlsPopover;\n","const ControlsTabsNavigation = ( props ) => {\n\n\tconst tabClasses = ( tabId ) => {\n\t\treturn `crocoblock-style-manager__controls-tabs-button ${ props.activeTab === tabId ? 'is-active' : '' }`;\n\t}\n\n\treturn (\n\t\t
\n\t\t\t{ props.tabs.map( ( tab ) => (\n\t\t\t\t props.onTabChange( tab.id ) }\n\t\t\t\t>\n\t\t\t\t\t{ tab.title }\n\t\t\t\t\n\t\t\t) ) }\n\t\t
\n\t);\n}\n\nexport default ControlsTabsNavigation;","import { useState } from '@wordpress/element';\nimport ControlsTabsNavigation from './controls-tabs-navigation';\nimport ControlComponent from '../control-component';\n\nconst ControlsTabs = ( props ) => {\n\n\tconst [ activeTab, setActiveTab ] = useState( props.control.children[ 0 ].id );\n\n\tconst activeTabContent = () => {\n\t\tconst activeTabControl = props.control.children.find( ( tab ) => tab.id === activeTab );\n\n\t\tif ( ! activeTabControl || ! activeTabControl.children ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn activeTabControl.children.map( ( control ) => {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t);\n\t\t} );\n\t}\n\n\treturn (\n\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t{ activeTabContent() }\n\t\t\t
\n\t\t
\n\t);\n}\n\nexport default ControlsTabs;","import { useState } from '@wordpress/element';\nimport ControlsPopover from './controls-popover';\n\nconst PopoverContainer = ( { children, trigger, label } ) => {\n\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\tconst [ showPopover, setShowPopover ] = useState( false );\n\n\treturn (\n\t\t<>\n\t\t\t {\n\t\t\t\t\tsetShowPopover( ! showPopover );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ trigger }\n\t\t\t\n\t\t\t {\n\t\t\t\t\tsetShowPopover( false );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t\n\t\t\n\t);\n}\n\nexport default PopoverContainer;","import ControlText from './controls/text';\nimport ControlChoose from './controls/choose';\nimport ControlBorder from './controls/border';\nimport ControlColor from './controls/color';\nimport ControlTypography from './controls/typography';\nimport ControlDimensions from './controls/dimensions';\nimport ControlRange from './controls/range';\nimport ControlsTabs from './common/controls-tabs';\n\nimport { useSelect } from '@wordpress/data';\nimport { getBreakpointsHierarchy } from '../helpers/breakpoints';\nimport { Tooltip } from '@wordpress/components';\n\n/**\n * Renders control depending on it's type and attach attributes handlers.\n */\nconst ControlComponent = ( { control, props } ) => {\n\n\tconst { attributes, setAttributes } = props;\n\tconst supportName = window.crocoStyleEditorData.support_name;\n\n\tconst prefixedName = ( name ) => {\n\t\treturn `__${ name.toLowerCase() }`\n\t}\n\n\tconst device = useSelect(\n\t\t( select ) => {\n\t\t\tconst editPost = select( 'core/edit-post' );\n\t\t\tlet previewDevice = 'Desktop';\n\n\t\t\tif ( editPost && typeof editPost.__experimentalGetPreviewDeviceType === 'function' ) {\n\t\t\t\tpreviewDevice = editPost.__experimentalGetPreviewDeviceType();\n\t\t\t}\n\n\t\t\treturn prefixedName( previewDevice );\n\t\t}, []\n\t);\n\n\tconst devicesHierarchy = getBreakpointsHierarchy();\n\n\t// Check if the control has a value in the attributes\n\tif ( ! attributes[ supportName ]?.[ control.id ] ) {\n\t\tattributes[ supportName ][ control.id ] = control.defaultValue;\n\t}\n\n\tconst handleChange = ( value ) => {\n\t\tsetStyleAttr( control.id, value );\n\t};\n\n\tconst getResponsiveValue = ( attr ) => {\n\t\tif ( '__desktop' === device ) {\n\t\t\treturn attributes[ supportName ][ attr ];\n\t\t} else if ( attributes[ supportName ][ device ]?.[ attr ] ) {\n\t\t\treturn attributes[ supportName ][ device ][ attr ];\n\t\t} else {\n\n\t\t\t// If the value is not set for the current device - get previous device value\n\t\t\tconst currentDeviceIndex = devicesHierarchy.indexOf( device );\n\t\t\tconst prevDeviceIndex = currentDeviceIndex - 1;\n\t\t\tconst previousDevice = devicesHierarchy[ prevDeviceIndex ];\n\n\t\t\tif ( prevDeviceIndex\n\t\t\t\t&& previousDevice\n\t\t\t\t&& attributes[ supportName ][ previousDevice ]?.[ attr ]\n\t\t\t) {\n\t\t\t\treturn attributes[ supportName ][ previousDevice ][ attr ];\n\t\t\t}\n\n\t\t\t// If no previous device value - return desktop value\n\t\t\treturn attributes[ supportName ][ attr ];\n\t\t}\n\t};\n\n\tconst usageMarker = () => {\n\n\t\tconst value = getResponsiveValue( control.id );\n\n\t\tif ( ! value ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet isUsedForCurrentDevice = false;\n\t\tlet tooltipText = 'Is inherited from the previous breakpoints';\n\n\t\t// Check if the value is set for the current device\n\t\tif ( '__desktop' === device && attributes[ supportName ][ control.id ] ) {\n\t\t\tisUsedForCurrentDevice = true;\n\t\t\ttooltipText = 'Explicitly set for the current device';\n\t\t} else if ( attributes[ supportName ]?.[ device ]?.[ control.id ] ) {\n\t\t\tisUsedForCurrentDevice = true;\n\t\t\ttooltipText = 'Explicitly set for the current device';\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t}\n\n\tconst setStyleAttr = ( attr, value ) => {\n\n\t\tlet newStyles = {};\n\n\t\tif ( '__desktop' === device ) {\n\t\t\tnewStyles = {\n\t\t\t\t...attributes[ supportName ],\n\t\t\t\t[ attr ]: value,\n\t\t\t};\n\t\t} else {\n\t\t\tnewStyles = {\n\t\t\t\t...attributes[ supportName ],\n\t\t\t\t[ device ]: {\n\t\t\t\t\t...attributes[ supportName ][ device ],\n\t\t\t\t\t[ attr ]: value,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\n\t\tsetAttributes( {\n\t\t\t[ supportName ]: newStyles,\n\t\t} );\n\t};\n\n\tconst renderControl = () => {\n\n\t\tconst controlProps = {\n\t\t\tcontrol: control,\n\t\t\tvalue: getResponsiveValue( control.id ),\n\t\t\thandleChange: handleChange,\n\t\t};\n\n\t\tswitch ( control.type ) {\n\t\t\tcase 'text':\n\t\t\tcase 'input':\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\tcase 'color-picker':\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\tcase 'toggle':\n\t\t\t\treturn (\n\t\t\t\t\t<>\n\t\t\t\t);\n\t\t\tcase 'range':\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\tcase 'choose':\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\tcase 'dimensions':\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\tcase 'border':\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\tcase 'typography':\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\tcase 'select':\n\t\t\t\treturn (\n\t\t\t\t\t<>\n\t\t\t\t);\n\t\t\tcase 'tabs':\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t};\n\n\treturn (\n\t\t
\n\t\t\t{ usageMarker() }\n\t\t\t{ renderControl() }\n\t\t
\n\t);\n};\n\nexport default ControlComponent;","import { PanelBody } from '@wordpress/components';\nimport { hasChildren } from '../helpers/utils';\nimport ControlComponent from './control-component';\n\nconst ControlSection = ( { section, props } ) => {\n\n\treturn (\n\t\t\n\t\t\t{ hasChildren( section ) && section.children.map( ( control ) => {\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\t} ) }\n\t\t\n\t);\n};\n\nexport default ControlSection;","import { InspectorControls } from '@wordpress/block-editor';\nimport { getBlockControls } from '../helpers/utils';\nimport ControlSection from './control-section';\n\nconst ControlStack = ( props ) => {\n\n\tconst blockControls = getBlockControls( props.name );\n\n\treturn (\n\t\t\n\t\t\t{ blockControls.map( ( control ) => {\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\t} ) }\n\t\t\n\t);\n};\n\nexport default ControlStack;","import { BorderBoxControl } from '@wordpress/components';\nimport { __experimentalBorderRadiusControl as BorderRadiusControl } from '@wordpress/block-editor';\nimport { isObject } from '../../helpers/utils';\n\nconst ControlBorder = ( { control, value, handleChange } ) => {\n\n\tconst colorsList = wp.data.select( 'core/block-editor' ).getSettings().colors;\n\tconst currentValue = value || {};\n\n\tconst updateValue = ( property, newValue ) => {\n\n\t\tconst newBorderValue = {\n\t\t\t...currentValue,\n\t\t}\n\n\t\tif ( isObject( newValue ) ) {\n\t\t\tconst curretSubValue = currentValue[ property ] || {};\n\n\t\t\tnewBorderValue[ property ] = {\n\t\t\t\t...curretSubValue,\n\t\t\t\t...newValue\n\t\t\t};\n\t\t} else {\n\t\t\tnewBorderValue[ property ] = newValue;\n\t\t}\n\n\t\thandleChange( newBorderValue );\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t updateValue( 'border', newValue ) }\n\t\t\t\tclassName=\"crocoblock-style-manager__border-control crocoblock-style-manager__with-spacing\"\n\t\t\t\thelp={ control.help }\n\t\t\t\tcolors={ colorsList }\n\t\t\t\tenableStyle={ true }\n\t\t\t\t__experimentalIsRenderedInSidebar={ true }\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t/>\n\t\t\t updateValue( 'radius', newValue ) }\n\t\t\t\tclassName=\"crocoblock-style-manager__border-radius-control\"\n\t\t\t\t__experimentalIsRenderedInSidebar={ true }\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t/>\n\t\t\n\t);\n}\n\nexport default ControlBorder;","import {\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n\tDashicon,\n} from '@wordpress/components';\n\nconst ControlChoose = ( { control, value, handleChange } ) => {\n\n\tlet controlValue = value;\n\n\tif ( undefined === controlValue && control.options ) {\n\t\t// If the value is undefined, set it to the first option\n\t\tcontrolValue = Object.keys( control.options )[ 0 ];\n\t}\n\n\treturn (\n\t\t\n\t\t\t{ control.options && Object.entries( control.options ).map( ( [ optionValue, optionData ] ) => {\n\n\t\t\t\tvar icon = optionData.icon || false;\n\n\t\t\t\tif ( icon ) {\n\t\t\t\t\tif ( icon.includes( 'dashicons-' ) ) {\n\t\t\t\t\t\ticon = icon.replace( 'dashicons-', '' );\n\t\t\t\t\t}\n\n\t\t\t\t\ticon = ;\n\t\t\t\t}\n\n\t\t\t\tif ( icon ) {\n\t\t\t\t\treturn ( );\n\t\t\t\t} else {\n\t\t\t\t\treturn ( );\n\t\t\t\t}\n\n \t\t\t} ) }\n\t\t\n\t);\n}\n\nexport default ControlChoose;","import {\n\tColorPicker,\n\tColorIndicator,\n\tBaseControl,\n\tFlex,\n\tFlexItem,\n} from '@wordpress/components';\nimport PopoverContainer from '../common/popover-container';\n\nconst ControlColor = ( { control, value, handleChange } ) => {\n\n\t// Get color palette from the global WP data store\n\tconst colorsList = wp.data.select( 'core/block-editor' ).getSettings().colors;\n\n\tconst popoverTrigger = (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t{ value }\n\t\t\t\n\t\t
\n\t);\n\n\treturn (\n\t\t\n\t\t\t {\n\t\t\t\t\thandleChange( newValue );\n\t\t\t\t} }\n\t\t\t\tcolor={ value }\n\t\t\t\tenableAlpha={ true }\n\t\t\t/>\n\t\t\t\n\t\t\t\t{ colorsList.map( ( color ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\thandleChange( color.color );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tclassName={ {\n\t\t\t\t\t\t\t\t\t'crocoblock-style-manager__color-palette-item-indicator': true,\n\t\t\t\t\t\t\t\t\t'crocoblock-style-manager__color-palette-item-indicator--active': color.color === value,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t\n\t\t\n\t);\n}\n\nexport default ControlColor;","import { BoxControl } from '@wordpress/components';\nimport { isObject } from '../../helpers/utils';\n\nconst ControlDimensions = ( { control, value, handleChange } ) => {\n\n\treturn (\n\t\t handleChange( newValue ) }\n\t\t\tclassName=\"crocoblock-style-manager__dimensions-control\"\n\t\t\t__experimentalIsRenderedInSidebar={ true }\n\t\t\t__next40pxDefaultSize\n\t\t\t__nextHasNoMarginBottom\n\t\t/>\n\t);\n}\n\nexport default ControlDimensions;","import {\n\tBaseControl,\n\tRangeControl,\n\t__experimentalHStack as HStack,\n\t__experimentalUnitControl as UnitControl\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\n\n/**\n * Allowed units format:\n * [\n * { value: 'px', intervals: { step: 1, min: 1, max: 1000 } },\n * { value: '%', intervals: { step: 1, min: 1, max: 100 } },\n * { value: 'vw', intervals: { step: 1, min: 1, max: 100 } },\n * ]\n */\nconst ControlRange = ( { control, value, handleChange } ) => {\n\n\tconst [ currentValue, setCurrentValue ] = useState( value );\n\n\tconst getDefaultUnit = () => {\n\t\t// Return the first unit from the allowed units or 'px' if no units are specified\n\t\treturn control.units && control.units.length > 0 ? control.units[ 0 ].value : '';\n\t}\n\n\tconst getCurrentUnit = () => {\n\n\t\tif ( currentValue ) {\n\t\t\tconst match = currentValue.match( /[a-zA-Z%]+/ );\n\t\t\tif ( match && match.length > 0 ) {\n\t\t\t\treturn match[ 0 ];\n\t\t\t}\n\t\t}\n\n\t\treturn getDefaultUnit();\n\t}\n\n\tconst addUnits = ( value ) => {\n\n\t\t// Get current unit from current value\n\t\tconst currentUnit = getCurrentUnit();\n\t\tconst result = currentUnit ? `${ value }${ currentUnit }` : value;\n\n\t\treturn result;\n\t}\n\n\tconst withoutUnits = ( value ) => {\n\t\t// Remove units from the value\n\t\treturn value ? parseFloat( value ) : 0;\n\t}\n\n\tconst allowedUnits = () => {\n\n\t\t// Return allowed units list in the format required by UnitControl\n\t\tconst units = [];\n\n\t\tif ( control.units && control.units.length > 0 ) {\n\t\t\tfor ( const unit of control.units ) {\n\t\t\t\tunits.push( {\n\t\t\t\t\tvalue: unit.value,\n\t\t\t\t\tlabel: unit.label || unit.value,\n\t\t\t\t\tdefault: unit.default || 0,\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\treturn units;\n\t}\n\n\tconst getCurrentUnitMin = () => {\n\t\t// Get the minimum value for the current unit\n\t\tconst currentUnit = getCurrentUnit();\n\t\tconst unit = control.units.find( ( u ) => u.value === currentUnit );\n\n\t\treturn unit && unit.intervals ? unit.intervals.min : 0;\n\t}\n\n\n\tconst getCurrentUnitMax = () => {\n\t\t// Get the maximum value for the current unit\n\t\tconst currentUnit = getCurrentUnit();\n\t\tconst unit = control.units.find( ( u ) => u.value === currentUnit );\n\n\t\treturn unit && unit.intervals ? unit.intervals.max : 100;\n\t}\n\n\t// Return simple RangeControl if no units are specified\n\tif ( ! control.units ) {\n\n\t\tconst min = control.min || 0;\n\t\tconst max = control.max || 100;\n\n\t\treturn (\n\t\t\t {\n\t\t\t\t\tsetCurrentValue( newValue );\n\t\t\t\t\thandleChange( newValue );\n\t\t\t\t} }\n\t\t\t\tplaceholder={ control.placeholder }\n\t\t\t\tclassName=\"crocoblock-style-manager__text-control\"\n\t\t\t\thelp={ control.help }\n\t\t\t\tmin={ min }\n\t\t\t\tmax={ max }\n\t\t\t\tdisabled={ control.disabled }\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t__next40pxDefaultSize\n\t\t\t/>\n\t\t);\n\t}\n\n\t// Return RangeControl with units if specified\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetCurrentValue( addUnits( newValue ) );\n\t\t\t\t\t\t\thandleChange( addUnits( newValue ) );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tplaceholder={ control.placeholder }\n\t\t\t\t\t\tclassName=\"crocoblock-style-manager__text-control\"\n\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t\tmin={ getCurrentUnitMin() }\n\t\t\t\t\t\tmax={ getCurrentUnitMax() }\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\thandleChange( newValue );\n\t\t\t\t\t\t\tsetCurrentValue( newValue );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tunits={ allowedUnits() }\n\t\t\t\t\t\tclassName=\"crocoblock-style-manager__unit-control\"\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n\nexport default ControlRange;","import { TextControl } from '@wordpress/components';\n\nconst ControlText = ( { control, value, handleChange } ) => {\n\n\treturn (\n\t\t handleChange( newValue ) }\n\t\t\tplaceholder={ control.placeholder }\n\t\t\tclassName=\"crocoblock-style-manager__text-control\"\n\t\t\thelp={ control.help }\n\t\t\tdisabled={ control.disabled }\n\t\t\t__nextHasNoMarginBottom\n\t\t\t__next40pxDefaultSize\n\t\t/>\n\t);\n}\n\nexport default ControlText;","import {\n\tBaseControl,\n\tSelectControl,\n\t__experimentalUnitControl as UnitControl,\n} from '@wordpress/components';\nimport {\n\t__experimentalFontFamilyControl as FontFamilyControl,\n\t__experimentalTextDecorationControl as TextDecorationControl,\n\t__experimentalTextTransformControl as TextTransformControl,\n} from '@wordpress/block-editor';\nimport { useSettings } from '@wordpress/block-editor';\nimport PopoverContainer from '../common/popover-container';\n\nconst ControlTypography = ( { control, value, handleChange } ) => {\n\n\tconst editIcon = (\n\t\t\n\t);\n\n\tconst [ blockLevelFontFamilies ] = useSettings( 'typography.fontFamilies' );\n\tconst fontFamilies = [ {\n\t\tlabel: 'Default',\n\t\tvalue: ''\n\t} ];\n\n\tconst fontWeights = [\n\t\t{\n\t\t\tlabel: 'Default',\n\t\t\tvalue: ''\n\t\t},\n\t\t{\n\t\t\tlabel: 'Thin 100',\n\t\t\tvalue: '100'\n\t\t},\n\t\t{\n\t\t\tlabel: 'Extra Light 200',\n\t\t\tvalue: '200'\n\t\t},\n\t\t{\n\t\t\tlabel: 'Light 300',\n\t\t\tvalue: '300'\n\t\t},\n\t\t{\n\t\t\tlabel: 'Regular 400',\n\t\t\tvalue: '400'\n\t\t},\n\t\t{\n\t\t\tlabel: 'Medium 500',\n\t\t\tvalue: '500'\n\t\t},\n\t\t{\n\t\t\tlabel: 'Semi Bold 600',\n\t\t\tvalue: '600'\n\t\t},\n\t\t{\n\t\t\tlabel: 'Bold 700',\n\t\t\tvalue: '700'\n\t\t},\n\t\t{\n\t\t\tlabel: 'Extra Bold 800',\n\t\t\tvalue: '800'\n\t\t},\n\t\t{\n\t\t\tlabel: 'Black 900',\n\t\t\tvalue: '900'\n\t\t}\n\t];\n\n\tconst fontStyle = [\n\t\t{\n\t\t\tlabel: 'Default',\n\t\t\tvalue: '',\n\t\t},\n\t\t{\n\t\t\tlabel: 'Normal',\n\t\t\tvalue: 'normal',\n\t\t},\n\t\t{\n\t\t\tlabel: 'Italic',\n\t\t\tvalue: 'italic',\n\t\t},\n\t\t{\n\t\t\tlabel: 'Oblique',\n\t\t\tvalue: 'oblique',\n\t\t}\n\t];\n\n\tfor ( const fontsType in blockLevelFontFamilies ) {\n\t\tfor ( const font of blockLevelFontFamilies[ fontsType ] ) {\n\t\t\t//fontFamilies.push( font );\n\t\t\tfontFamilies.push( {\n\t\t\t\tlabel: font.name,\n\t\t\t\tvalue: font.fontFamily\n\t\t\t} );\n\t\t}\n\t}\n\n\tconst currentValue = value || {};\n\tconst updateTypography = ( key, value ) => {\n\n\t\tconst newValue = {\n\t\t\t...currentValue,\n\t\t\t[ key ]: value,\n\t\t};\n\n\t\thandleChange( newValue );\n\t};\n\n\tconst unitsList = [\n\t\t{\n\t\t\ta11yLabel: 'Pixels (px)',\n\t\t\tlabel: 'px',\n\t\t\tstep: 1,\n\t\t\tvalue: 'px'\n\t\t},\n\t\t{\n\t\t\ta11yLabel: 'Ems (em)',\n\t\t\tlabel: 'em',\n\t\t\tstep: 0.1,\n\t\t\tvalue: 'em'\n\t\t},\n\t\t{\n\t\t\ta11yLabel: 'Percent (%)',\n\t\t\tlabel: '%',\n\t\t\tstep: 1,\n\t\t\tvalue: '%'\n\t\t},\n\t\t{\n\t\t\ta11yLabel: 'Rems (rem)',\n\t\t\tlabel: 'rem',\n\t\t\tstep: 0.1,\n\t\t\tvalue: 'rem'\n\t\t},\n\t];\n\n\tconst popoverTrigger = (\n\t\t\n\t\t\t
\n\t\t\t\t{ editIcon }\n\t\t\t
\n\t\t\n\t);\n\n\treturn (\n\t\t\n\t\t\t
\n\t\t\t\t {\n\t\t\t\t\t\tupdateTypography( 'family', newValue );\n\t\t\t\t\t}}\n\t\t\t\t\toptions={ fontFamilies }\n\t\t\t\t\tclassName=\"crocoblock-style-manager__popover-control\"\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t/>\n\t\t\t\t
\n\t\t\t\t\t {\n\t\t\t\t\t\t\tupdateTypography( 'size', newValue );\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tunits={ unitsList }\n\t\t\t\t\t\tallowEmpty={ true }\n\t\t\t\t\t\tclassName=\"crocoblock-style-manager__popover-control w-50\"\n\t\t\t\t\t/>\n\t\t\t\t\t {\n\t\t\t\t\t\t\tupdateTypography( 'lineHeight', newValue );\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tunits={ unitsList }\n\t\t\t\t\t\tallowEmpty={ true }\n\t\t\t\t\t\tclassName=\"crocoblock-style-manager__popover-control w-50\"\n\t\t\t\t\t/>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tupdateTypography( 'weight', newValue );\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\toptions={ fontWeights }\n\t\t\t\t\t\t\tclassName=\"crocoblock-style-manager__popover-control\"\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t/>\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tupdateTypography( 'style', newValue );\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\toptions={ fontStyle }\n\t\t\t\t\t\t\tclassName=\"crocoblock-style-manager__popover-control\"\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t/>\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tupdateTypography( 'transform', newValue );\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tclassName=\"crocoblock-style-manager__popover-control\"\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t/>\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tupdateTypography( 'decoration', newValue );\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tclassName=\"crocoblock-style-manager__popover-control\"\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t/>\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t {\n\t\t\t\t\t\tupdateTypography( 'letterSpacing', newValue );\n\t\t\t\t\t}}\n\t\t\t\t\tunits={ unitsList }\n\t\t\t\t\tallowEmpty={ true }\n\t\t\t\t\tclassName=\"crocoblock-style-manager__popover-control\"\n\t\t\t\t/>\n\t\t\t
\n\t\t\n\t);\n}\n\n/*\n+ {{SIZE}}{{S_UNIT}}\n+ {{LINEHEIGHT}}{{LH_UNIT}}\n+ {{WEIGHT}}\n{{TRANSFORM}}\n{{STYLE}}\n{{DECORATION}}\n+ {{LETTERSPACING}}{{LS_UNIT}}\n*/\n\nexport default ControlTypography;","export default class BaseField {\n\n\tstatic getType() {\n\t\treturn 'base-field';\n\t}\n\n\tconstructor( uniqueClassName, rawValue ) {\n\t\tthis.uniqueClassName = uniqueClassName;\n\t\tthis.rawValue = rawValue;\n\t}\n\n\tgetSelectorMacros() {\n\t\treturn {\n\t\t\twrapper: '.' + this.uniqueClassName\n\t\t};\n\t}\n\n\tparseSelector( selector, props ) {\n\n\t\tconst macros = this.getSelectorMacros();\n\n\t\tselector = this.replaceData( selector, macros );\n\t\tprops = this.getParsedProps( props );\n\n\t\tlet css = ` ${ selector } { ${ props } }`;\n\n\t\treturn css;\n\t}\n\n\tgetParsedProps( props ) {\n\t\tconst values = this.getParsedValue();\n\t\treturn this.replaceData( props, values );\n\t}\n\n\t/**\n\t * Replace in the give string macros with an actual values from the data.\n\t *\n\t * Expected formats:\n\t * - string: {{ WRAPPER }} .my-class\n\t * - data: { 'wrapper': '.csm-block-unique-class' }\n\t */\n\treplaceData( string, data ) {\n\n\t\treturn string.replace( /{{\\s*([\\w-]+)\\s*}}/g, ( match, p1 ) => {\n\t\t\tp1 = p1.toLowerCase();\n\t\t\tif ( undefined !== data[ p1 ] ) {\n\t\t\t\treturn data[ p1 ];\n\t\t\t} else {\n\t\t\t\treturn match;\n\t\t\t}\n\t\t} );\n\t}\n\n\tgetParsedValue() {\n\t\treturn {\n\t\t\t'value': this.rawValue,\n\t\t};\n\t}\n\n\tcssVarValueFormat() {\n\t\treturn '{{VALUE}}';\n\t}\n\n\tparseVariable( variable ) {\n\n\t\tconst prefix = variable.prefix || '';\n\t\tconst name = variable.name || false;\n\n\t\tlet fullName = variable.full_name || prefix + '-' + name;\n\n\t\tif ( ! fullName ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif ( variable.suffix ) {\n\t\t\tfullName += variable.suffix;\n\t\t}\n\n\t\tlet parsedValues = this.getParsedValue();\n\t\tlet result = {};\n\n\t\tif ( parsedValues.value ) {\n\t\t\tresult[ fullName ] = parsedValues.value;\n\t\t} else {\n\n\t\t\tresult[ fullName ] = this.replaceData(\n\t\t\t\tthis.cssVarValueFormat(),\n\t\t\t\tparsedValues\n\t\t\t);\n\t\t}\n\n\t\treturn result;\n\t}\n}","import BaseField from \"./base-field\";\nimport { isObject } from \"../../helpers/utils\";\n\nexport default class Border extends BaseField {\n\tstatic getType() {\n\t\treturn 'border';\n\t}\n\n\tgetParsedValue() {\n\n\t\tif ( ! this.rawValue ) {\n\t\t\treturn {\n\t\t\t\tborder: {},\n\t\t\t\tradius: {},\n\t\t\t}\n\t\t} else {\n\t\t\treturn {\n\t\t\t\tborder: this.parseBorderValue( this.rawValue.border ),\n\t\t\t\tradius: this.rawValue.radius,\n\t\t\t}\n\t\t}\n\t}\n\n\tparseBorderValue( value ) {\n\n\t\tif ( ! value ) {\n\t\t\treturn {}\n\t\t}\n\n\t\tif ( value.color || value.width || value.style ) {\n\t\t\treturn {\n\t\t\t\tglobal: {\n\t\t\t\t\tcolor: value.color || 'inherit',\n\t\t\t\t\twidth: value.width || 'inherit',\n\t\t\t\t\tstyle: value.style || 'inherit',\n\t\t\t\t}\n\t\t\t};\n\t\t} else {\n\t\t\treturn value;\n\t\t}\n\t}\n\n\tgetParsedProps( props ) {\n\n\t\tconst values = this.getParsedValue();\n\n\t\tlet result = '';\n\n\t\tif ( values.border ) {\n\t\t\tfor ( const [ key, value ] of Object.entries( values.border ) ) {\n\t\t\t\tif ( 'global' === key ) {\n\t\t\t\t\tresult += this.getBorderCSS( value );\n\t\t\t\t} else {\n\t\t\t\t\tresult += this.getBorderCSS( value, key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( values.radius ) {\n\t\t\tif ( isObject( values.radius ) ) {\n\n\t\t\t\tconst propsMap = {\n\t\t\t\t\t'border-top-left-radius': 'topLeft',\n\t\t\t\t\t'border-top-right-radius': 'topRight',\n\t\t\t\t\t'border-bottom-right-radius': 'bottomRight',\n\t\t\t\t\t'border-bottom-left-radius': 'bottomLeft',\n\t\t\t\t};\n\n\t\t\t\tfor ( const [ key, value ] of Object.entries( propsMap ) ) {\n\t\t\t\t\tif ( values.radius[ value ] ) {\n\t\t\t\t\t\tresult += `${ key }: ${ values.radius[ value ] };`;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tresult += `border-radius: ${ values.radius };`;\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tgetBorderCSS( props, key ) {\n\n\t\tlet css = '';\n\n\t\tif ( key ) {\n\t\t\tkey = '-' + key;\n\t\t} else {\n\t\t\tkey = '';\n\t\t}\n\n\t\tif ( props && props.color ) {\n\t\t\tcss += `border${ key }-color: ${ props.color };`;\n\t\t}\n\n\t\tif ( props && props.width ) {\n\t\t\tcss += `border${ key }-width: ${ props.width };`;\n\t\t}\n\n\t\tif ( props && props.style ) {\n\t\t\tcss += `border${ key }-style: ${ props.style };`;\n\t\t}\n\n\t\treturn css;\n\t}\n}\n","import BaseField from \"./base-field\";\n\nexport default class Color extends BaseField {\n\tstatic getType() {\n\t\treturn 'color-picker';\n\t}\n}\n","import BaseField from \"./base-field\";\nimport { isObject } from \"../../helpers/utils\";\n\nexport default class Dimensions extends BaseField {\n\n\tstatic getType() {\n\t\treturn 'dimensions';\n\t}\n\n\tgetParsedValue() {\n\n\t\tif ( ! this.rawValue ) {\n\t\t\treturn {\n\t\t\t\ttop: '',\n\t\t\t\tright: '',\n\t\t\t\tbottom: '',\n\t\t\t\tleft: '',\n\t\t\t};\n\t\t}\n\n\t\tif ( isObject( this.rawValue ) ) {\n\t\t\treturn {\n\t\t\t\ttop: this.rawValue.top || '',\n\t\t\t\tright: this.rawValue.right || '',\n\t\t\t\tbottom: this.rawValue.bottom || '',\n\t\t\t\tleft: this.rawValue.left || '',\n\t\t\t};\n\t\t} else {\n\t\t\treturn {\n\t\t\t\ttop: this.rawValue,\n\t\t\t\tright: this.rawValue,\n\t\t\t\tbottom: this.rawValue,\n\t\t\t\tleft: this.rawValue,\n\t\t\t};\n\t\t}\n\t}\n}\n","import BaseField from './base-field.js';\nimport Color from './color.js';\nimport Typography from './typography.js';\nimport Border from './border.js';\nimport Dimensions from './dimensions.js';\nimport Range from './range.js';\n\nexport {\n\tColor,\n\tBorder,\n\tTypography,\n\tBaseField,\n\tDimensions,\n\tRange,\n};","import BaseField from \"./base-field\";\n\nexport default class Range extends BaseField {\n\n\tstatic getType() {\n\t\treturn 'range';\n\t}\n\n\tgetParsedValue() {\n\t\treturn {\n\t\t\tvalue: this.rawValue || 0,\n\t\t\tunit: '',\n\t\t}\n\t}\n}\n","import BaseField from \"./base-field\";\n\nexport default class Typography extends BaseField {\n\n\tstatic getType() {\n\t\treturn 'typography';\n\t}\n\n\tgetParsedValue() {\n\t\treturn {\n\t\t\tfamily: this.rawValue.family || 'inherit',\n\t\t\tweight: this.rawValue.weight || 'inherit',\n\t\t\ttransform: this.rawValue.transform || 'inherit',\n\t\t\tstyle: this.rawValue.style || 'inherit',\n\t\t\tdecoration: this.rawValue.decoration || 'inherit',\n\t\t\tlineheight: this.rawValue.lineheight || 'inherit',\n\t\t\tlh_unit: '', // legacy from old SM for style decorations consisitency\n\t\t\tletterspacing: this.rawValue.letterSpacing || 'inherit',\n\t\t\tls_unit: '', // legacy from old SM for style decorations consisitency\n\t\t\tsize: this.rawValue.size || 'inherit',\n\t\t\ts_unit: '', // legacy from old SM for style decorations consisitency\n\t\t};\n\t}\n}\n","import * as Fields from './fields';\nimport { getBreakpoints, withMediaQuery } from '../helpers/breakpoints';\n\nexport class Generator {\n\n\tconstructor( blockName, attributes ) {\n\n\t\tthis.blockName = blockName;\n\t\tthis.attributes = attributes;\n\t\tthis.uniqueClassName = attributes._uniqueClassName || false;\n\t\tthis.css = '';\n\t\tthis.cssVariables = {};\n\t\tthis.responsiveCSS = {};\n\n\t\tthis.controlHandlers = {\n\t\t\t[ Fields.Color.getType() ]: Fields.Color,\n\t\t\t[ Fields.Typography.getType() ]: Fields.Typography,\n\t\t\t[ Fields.Border.getType() ]: Fields.Border,\n\t\t\t[ Fields.Dimensions.getType() ]: Fields.Dimensions,\n\t\t\t[ Fields.Range.getType() ]: Fields.Range,\n\t\t};\n\t}\n\n\tgetControlHandler( control ) {\n\n\t\tconst controlType = control.type || false;\n\t\tif ( ! controlType ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this.controlHandlers[ controlType ] || false;\n\t}\n\n\tgetCSS() {\n\n\t\t// Ensure we reset CSS on block re-render\n\t\tthis.css = '';\n\n\t\tconst { blockName } = this;\n\n\t\tif ( ! window.crocoBlockStyleEditor.blocks[ blockName ] ) {\n\t\t\treturn this.css;\n\t\t}\n\n\t\tfor ( const control of window.crocoBlockStyleEditor.blocks[ blockName ] ) {\n\t\t\tthis.generateControlStyles( control );\n\t\t}\n\n\t\tfor ( const device in this.responsiveCSS ) {\n\n\t\t\tif ( ! this.responsiveCSS[ device ] ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst mediaQueryCSS = withMediaQuery( this.responsiveCSS[ device ], device );\n\n\t\t\tif ( mediaQueryCSS ) {\n\t\t\t\tthis.css += mediaQueryCSS;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tstyles: this.css,\n\t\t\tvariables: this.cssVariables,\n\t\t}\n\t}\n\n\tgenerateResponsiveStyles( controlID, cssSelectors, ControlHandler ) {\n\t\tfor ( const device in getBreakpoints() ) {\n\t\t\tif ( ! this.attributes?.[ device ]?.[ controlID ] ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst controlInstance = new ControlHandler(\n\t\t\t\tthis.uniqueClassName,\n\t\t\t\tthis.attributes[ device ][ controlID ]\n\t\t\t);\n\n\t\t\tfor ( const selector in cssSelectors ) {\n\t\t\t\tconst selectorStyles = controlInstance.parseSelector(\n\t\t\t\t\tselector,\n\t\t\t\t\tcssSelectors[ selector ]\n\t\t\t\t);\n\n\t\t\t\tif ( ! this.responsiveCSS[ device ] ) {\n\t\t\t\t\tthis.responsiveCSS[ device ] = '';\n\t\t\t\t}\n\n\t\t\t\tthis.responsiveCSS[ device ] += selectorStyles;\n\t\t\t}\n\t\t}\n\t}\n\n\tgenerateResponsiveVariables( controlID, cssVar, ControlHandler ) {\n\n\t\tfor ( const device in getBreakpoints() ) {\n\n\t\t\tcssVar.suffix = '';\n\n\t\t\tif ( ! this.attributes?.[ device ]?.[ controlID ] ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tcssVar.suffix = device;\n\n\t\t\tconst controlInstance = new ControlHandler(\n\t\t\t\tthis.uniqueClassName,\n\t\t\t\tthis.attributes[ device ][ controlID ]\n\t\t\t);\n\n\t\t\tthis.cssVariables = {\n\t\t\t\t...this.cssVariables,\n\t\t\t\t...controlInstance.parseVariable( cssVar ),\n\t\t\t};\n\t\t}\n\t}\n\n\tgenerateControlStyles( control ) {\n\n\t\tconst ControlHandler = this.getControlHandler( control );\n\t\tconst controlID = control.id || false;\n\t\tconst { attributes } = this;\n\n\t\tif ( ControlHandler && controlID && attributes[ controlID ] ) {\n\n\t\t\tconst controlInstance = new ControlHandler(\n\t\t\t\tthis.uniqueClassName,\n\t\t\t\tthis.attributes[ controlID ]\n\t\t\t);\n\n\t\t\tif ( control.css_selector ) {\n\t\t\t\tfor ( const selector in control.css_selector ) {\n\t\t\t\t\tthis.css += controlInstance.parseSelector(\n\t\t\t\t\t\tselector,\n\t\t\t\t\t\tcontrol.css_selector[ selector ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tthis.generateResponsiveStyles( controlID, control.css_selector, ControlHandler );\n\t\t\t}\n\n\t\t\tif ( control.css_var ) {\n\n\t\t\t\tthis.cssVariables = {\n\t\t\t\t\t...this.cssVariables,\n\t\t\t\t\t...controlInstance.parseVariable( control.css_var ),\n\t\t\t\t};\n\n\t\t\t\tthis.generateResponsiveVariables( controlID, control.css_var, ControlHandler );\n\t\t\t}\n\t\t}\n\n\t\tif ( control.children ) {\n\t\t\tfor ( const childControl of control.children ) {\n\t\t\t\tthis.generateControlStyles( childControl );\n\t\t\t}\n\t\t}\n\t}\n}","// extracted by mini-css-extract-plugin\nexport {};","const breakpoints = {\n\t__desktop: {\n\t\tminWidth: 992,\n\t},\n\t__tablet: {\n\t\tmaxWidth: 991,\n\t},\n\t__mobile: {\n\t\tmaxWidth: 478,\n\t},\n}\n\nexport const getBreakpoints = () => {\n\treturn breakpoints;\n}\n\nexport const getBreakpointsHierarchy = () => {\n\treturn Object.keys( breakpoints );\n}\n\nexport const withMediaQuery = ( css, device ) => {\n\n\tconst mediaQuery = breakpoints[ device ];\n\n\tif ( ! mediaQuery ) {\n\t\treturn css;\n\t}\n\n\tlet mediaQueryString = '';\n\n\tif ( mediaQuery.minWidth ) {\n\t\tmediaQueryString += `(min-width: ${ mediaQuery.minWidth }px)`;\n\t}\n\n\tif ( mediaQuery.maxWidth ) {\n\t\tif ( mediaQueryString ) {\n\t\t\tmediaQueryString += ' and ';\n\t\t}\n\t\tmediaQueryString += `(max-width: ${ mediaQuery.maxWidth }px)`;\n\t}\n\n\tif ( ! mediaQueryString ) {\n\t\treturn css;\n\t}\n\n\treturn `@media ${ mediaQueryString } { ${ css } }`;\n}\n","/**\n * Get all block controls for given block\n *\n * @param {string} blockName\n * @returns {object} blockControls\n */\nexport const getBlockControls = ( blockName ) => {\n\n\tconst blockControls = window.crocoBlockStyleEditor.getBlockControls( blockName );\n\n\tif ( ! blockControls ) {\n\t\treturn {};\n\t}\n\n\treturn blockControls;\n}\n\n/**\n * Check if given stack has children\n *\n * @param {object} stack\n * @returns {boolean}\n */\nexport const hasChildren = ( stack ) => {\n\tif ( ! stack.children ) {\n\t\treturn false;\n\t}\n\n\tif ( Array.isArray( stack.children ) && stack.children.length > 0 ) {\n\t\treturn true;\n\t}\n\n\t// Otherwise, return false\n\treturn false;\n}\n\n/**\n * Check if given variable is an object\n *\n * @param {any} variable\n * @returns {boolean}\n */\nexport const isObject = ( variable ) => {\n\treturn typeof variable === 'object' && variable !== null && !Array.isArray(variable);\n}\n\nexport const isEmpty = ( variable ) => {\n\n\tif ( variable === null || variable === undefined ) {\n\t\treturn true;\n\t}\n\n\tif ( typeof variable === 'string' && variable.trim() === '' ) {\n\t\treturn true;\n\t}\n\n\tif ( Array.isArray( variable ) && variable.length === 0 ) {\n\t\treturn true;\n\t}\n\n\tif ( isObject( variable ) && Object.keys( variable ).length === 0 ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n","import { createHigherOrderComponent } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\nexport const withBlockUniqueClass = createHigherOrderComponent( ( BlockListBlockComponent ) => {\n\treturn ( props ) => {\n\t\tconst {\n\t\t\tname,\n\t\t\tclassName = '',\n\t\t\tclientId,\n\t\t\tsetAttributes,\n\t\t\tattributes,\n\t\t} = props;\n\n\t\t// Pull the block’s registration info\n\t\tconst blockType = useSelect(\n\t\t\t( select ) => select( 'core/blocks' ).getBlockType( name ),\n\t\t\t[ name ]\n\t\t);\n\n\t\t// If crocoblock_styles support is present, add our class\n\t\tif ( blockType?.supports?.crocoblock_styles ) {\n\n\t\t\tconst uniqueClass = props?.attributes?.[ window.crocoStyleEditorData.support_name ]?.[ '_uniqueClassName' ];\n\n\n\t\t\tuseEffect( () => {\n\t\t\t\tif ( window.crocoBlockStyleEditor.classIsUsed( uniqueClass, clientId ) ) {\n\t\t\t\t\t// If the class is already used, we need to generate a new one\n\t\t\t\t\tconst newUniqueClass = generateUniqueClassName();\n\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t[ window.crocoStyleEditorData.support_name ]: {\n\t\t\t\t\t\t\t...attributes[ window.crocoStyleEditorData.support_name ],\n\t\t\t\t\t\t\t_uniqueClassName: newUniqueClass,\n\t\t\t\t\t\t},\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}, [] );\n\n\t\t\treturn (\n\t\t\t\t\n\t\t\t);\n\t\t}\n\n\t\t// Otherwise render unmodified\n\t\treturn ;\n\t};\n}, 'withBlockUniqueClass' );\n\nexport const generateUniqueClassName = () => {\n\n\tconst length = 8;\n\n\tlet chars = 'abcdefghijklmnopqrstuvwxyz0123456789';\n\tlet result = '';\n\n\tfor ( let i = 0; i < length; i++ ) {\n\n\t\tif ( i === 0 ) {\n\t\t\t// Ensure the first character is a letter\n\t\t\tresult += chars.charAt( Math.floor( Math.random() * 26 ) );\n\t\t\tcontinue;\n\t\t}\n\n\t\tresult += chars.charAt( Math.floor( Math.random() * chars.length ) );\n\t}\n\n\treturn window.crocoStyleEditorData.class_prefix + result;\n}\n","import { createHigherOrderComponent } from '@wordpress/compose';\nimport ControlStack from '../components/control-stack';\nimport { Generator } from '../css-engine/generator';\nimport { isEmpty } from '../helpers/utils';\n\nexport const withStylesControls = createHigherOrderComponent( ( BlockEdit ) => {\n\n\treturn ( props ) => {\n\n\t\tconst { attributes } = props;\n\t\tconst supportName = window.crocoStyleEditorData.support_name;\n\n\t\tconsole.log( 'withStylesControls', props );\n\n\t\t// We need to check it by attributes, because 'supports' are not available in the props\n\t\tif ( ! attributes || ! attributes[ supportName ] ) {\n\t\t\treturn ;\n\t\t}\n\n\t\tconst cssGenerator = new Generator(\n\t\t\tprops.name,\n\t\t\tattributes[ supportName ]\n\t\t);\n\n\t\tconst {\n\t\t\tstyles,\n\t\t\tvariables\n\t\t} = cssGenerator.getCSS();\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ ! isEmpty( styles ) && }\n\t\t\t\t{ ! isEmpty( variables ) &&
\n\t\t\t\t\t\n\t\t\t\t
}\n\t\t\t\t{ isEmpty( variables ) && }\n\t\t\t\t\n\t\t\t\n\t\t);\n\t};\n}, 'withStylesControls' );\n","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"compose\"];","module.exports = window[\"wp\"][\"data\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"hooks\"];","module.exports = window[\"ReactJSXRuntime\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import './editor.scss';\nimport { addFilter } from '@wordpress/hooks';\nimport { withStylesControls } from './hoc-wrappers/with-styles-controls';\nimport { withBlockUniqueClass, generateUniqueClassName } from './hoc-wrappers/with-block-class';\n\nclass CrocoBlockStyleEditor {\n\n\tinit() {\n\n\t\tthis.blocks = window?.crocoStyleEditorData?.blocks_supports || {};\n\t\tthis.supportName = window.crocoStyleEditorData.support_name;\n\t\tthis.usedClasses = {};\n\n\t\taddFilter(\n\t\t\t'blocks.registerBlockType',\n\t\t\t'crocoblock-style-manager/enable-block-support',\n\t\t\tthis.registerBlock.bind( this )\n\t\t);\n\n\t\taddFilter(\n\t\t\t'editor.BlockEdit',\n\t\t\t'crocoblock-style-manager/enable-block-support',\n\t\t\twithStylesControls\n\t\t);\n\n\t\taddFilter(\n\t\t\t'editor.BlockListBlock',\n\t\t\t'crocoblock-style-manager/with-crocoblock-editor-class',\n\t\t\twithBlockUniqueClass\n\t\t);\n\t}\n\n\tclassIsUsed( className, clientId ) {\n\n\t\tif ( ! className || ! clientId ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( this.usedClasses[ className ] ) {\n\t\t\tif ( this.usedClasses[ className ] === clientId ) {\n\t\t\t\t// It's the same clientId, so we can use this class\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\t// The class is already used by another block\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\t// The class is not used yet, so we can use it\n\t\t\tthis.usedClasses[ className ] = clientId;\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tgetBlockControls( blockName ) {\n\t\treturn this.blocks[ blockName ] || false;\n\t}\n\n\tregisterBlock( settings, name ) {\n\n\t\tif ( ! this.getBlockControls( name ) ) {\n\t\t\treturn settings;\n\t\t}\n\n\t\tconst supports = settings.supports || {};\n\t\tsupports[ this.supportName ] = true;\n\n\t\tconst attributes = settings.attributes || {};\n\n\t\tif ( ! attributes[ this.supportName ] ) {\n\t\t\tattributes[ this.supportName ] = {\n\t\t\t\ttype: 'object',\n\t\t\t\tdefault: {\n\t\t\t\t\t_uniqueClassName: generateUniqueClassName(),\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\t...settings,\n\t\t\tsupports: supports,\n\t\t\tattributes: attributes,\n\t\t};\n\t}\n}\n\nwindow.crocoBlockStyleEditor = new CrocoBlockStyleEditor();\nwindow.crocoBlockStyleEditor.init();"],"names":["Popover","Button","jsx","_jsx","jsxs","_jsxs","ControlsPopover","children","isOpen","onClose","label","anchor","closeIcon","xmlns","viewBox","width","height","focusable","d","className","placement","shouldCloseOnClickOutside","noArrow","offset","onClick","icon","ControlsTabsNavigation","props","tabClasses","tabId","activeTab","tabs","map","tab","id","onTabChange","title","useState","ControlComponent","ControlsTabs","setActiveTab","control","activeTabContent","activeTabControl","find","Fragment","_Fragment","PopoverContainer","trigger","popoverAnchor","setPopoverAnchor","showPopover","setShowPopover","ref","ControlText","ControlChoose","ControlBorder","ControlColor","ControlTypography","ControlDimensions","ControlRange","useSelect","getBreakpointsHierarchy","Tooltip","attributes","setAttributes","supportName","window","crocoStyleEditorData","support_name","prefixedName","name","toLowerCase","device","select","editPost","previewDevice","__experimentalGetPreviewDeviceType","devicesHierarchy","defaultValue","handleChange","value","setStyleAttr","getResponsiveValue","attr","currentDeviceIndex","indexOf","prevDeviceIndex","previousDevice","usageMarker","isUsedForCurrentDevice","tooltipText","text","delay","newStyles","renderControl","controlProps","type","PanelBody","hasChildren","ControlSection","section","initialOpen","InspectorControls","getBlockControls","ControlStack","blockControls","group","BorderBoxControl","__experimentalBorderRadiusControl","BorderRadiusControl","isObject","colorsList","wp","data","getSettings","colors","currentValue","updateValue","property","newValue","newBorderValue","curretSubValue","border","onChange","help","enableStyle","__experimentalIsRenderedInSidebar","__next40pxDefaultSize","__nextHasNoMarginBottom","values","radius","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","__experimentalToggleGroupControlOptionIcon","ToggleGroupControlOptionIcon","Dashicon","controlValue","undefined","options","Object","keys","isBlock","entries","optionValue","optionData","includes","replace","ColorPicker","ColorIndicator","BaseControl","Flex","FlexItem","popoverTrigger","colorValue","color","enableAlpha","justify","align","direction","wrap","gap","slug","BoxControl","RangeControl","__experimentalHStack","HStack","__experimentalUnitControl","UnitControl","setCurrentValue","getDefaultUnit","units","length","getCurrentUnit","match","addUnits","currentUnit","result","withoutUnits","parseFloat","allowedUnits","unit","push","default","getCurrentUnitMin","u","intervals","min","getCurrentUnitMax","max","placeholder","disabled","alignment","style","flex","withInputField","TextControl","SelectControl","__experimentalFontFamilyControl","FontFamilyControl","__experimentalTextDecorationControl","TextDecorationControl","__experimentalTextTransformControl","TextTransformControl","useSettings","editIcon","blockLevelFontFamilies","fontFamilies","fontWeights","fontStyle","fontsType","font","fontFamily","updateTypography","key","unitsList","a11yLabel","step","class","family","size","allowEmpty","lineHeight","weight","transform","decoration","letterSpacing","BaseField","getType","constructor","uniqueClassName","rawValue","getSelectorMacros","wrapper","parseSelector","selector","macros","replaceData","getParsedProps","css","getParsedValue","string","p1","cssVarValueFormat","parseVariable","variable","prefix","fullName","full_name","suffix","parsedValues","Border","parseBorderValue","global","getBorderCSS","propsMap","Color","Dimensions","top","right","bottom","left","Typography","Range","lineheight","lh_unit","letterspacing","ls_unit","s_unit","Fields","getBreakpoints","withMediaQuery","Generator","blockName","_uniqueClassName","cssVariables","responsiveCSS","controlHandlers","getControlHandler","controlType","getCSS","crocoBlockStyleEditor","blocks","generateControlStyles","mediaQueryCSS","styles","variables","generateResponsiveStyles","controlID","cssSelectors","ControlHandler","controlInstance","selectorStyles","generateResponsiveVariables","cssVar","css_selector","css_var","childControl","breakpoints","__desktop","minWidth","__tablet","maxWidth","__mobile","mediaQuery","mediaQueryString","stack","Array","isArray","isEmpty","trim","createHigherOrderComponent","useEffect","withBlockUniqueClass","BlockListBlockComponent","clientId","blockType","getBlockType","supports","crocoblock_styles","uniqueClass","classIsUsed","newUniqueClass","generateUniqueClassName","chars","i","charAt","Math","floor","random","class_prefix","withStylesControls","BlockEdit","console","log","cssGenerator","addFilter","CrocoBlockStyleEditor","init","blocks_supports","usedClasses","registerBlock","bind","settings"],"sourceRoot":""} \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/components/common/controls-popover.jsx b/modules/jet-style/framework/blocks-style-manager/assets/src/components/common/controls-popover.jsx new file mode 100644 index 000000000..d91620b24 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/components/common/controls-popover.jsx @@ -0,0 +1,40 @@ +import { Popover, Button } from '@wordpress/components'; + +const ControlsPopover = ( { children, isOpen, onClose, label, anchor } ) => { + + if ( ! isOpen ) { + return null; + } + + const closeIcon = ( + + ); + + return ( + +
+
+ { label} + +
+
+ { children } +
+
+
+ ); +}; + +export default ControlsPopover; diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/components/common/controls-tabs-navigation.jsx b/modules/jet-style/framework/blocks-style-manager/assets/src/components/common/controls-tabs-navigation.jsx new file mode 100644 index 000000000..dd8a871f9 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/components/common/controls-tabs-navigation.jsx @@ -0,0 +1,22 @@ +const ControlsTabsNavigation = ( props ) => { + + const tabClasses = ( tabId ) => { + return `crocoblock-style-manager__controls-tabs-button ${ props.activeTab === tabId ? 'is-active' : '' }`; + } + + return ( +
+ { props.tabs.map( ( tab ) => ( + + ) ) } +
+ ); +} + +export default ControlsTabsNavigation; \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/components/common/controls-tabs.jsx b/modules/jet-style/framework/blocks-style-manager/assets/src/components/common/controls-tabs.jsx new file mode 100644 index 000000000..5e0d1c2c3 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/components/common/controls-tabs.jsx @@ -0,0 +1,41 @@ +import { useState } from '@wordpress/element'; +import ControlsTabsNavigation from './controls-tabs-navigation'; +import ControlComponent from '../control-component'; + +const ControlsTabs = ( props ) => { + + const [ activeTab, setActiveTab ] = useState( props.control.children[ 0 ].id ); + + const activeTabContent = () => { + const activeTabControl = props.control.children.find( ( tab ) => tab.id === activeTab ); + + if ( ! activeTabControl || ! activeTabControl.children ) { + return null; + } + + return activeTabControl.children.map( ( control ) => { + return ( + + ); + } ); + } + + return ( +
+ +
+ { activeTabContent() } +
+
+ ); +} + +export default ControlsTabs; \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/components/common/popover-container.jsx b/modules/jet-style/framework/blocks-style-manager/assets/src/components/common/popover-container.jsx new file mode 100644 index 000000000..087150194 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/components/common/popover-container.jsx @@ -0,0 +1,33 @@ +import { useState } from '@wordpress/element'; +import ControlsPopover from './controls-popover'; + +const PopoverContainer = ( { children, trigger, label } ) => { + + const [ popoverAnchor, setPopoverAnchor ] = useState( null ); + const [ showPopover, setShowPopover ] = useState( false ); + + return ( + <> +
{ + setShowPopover( ! showPopover ); + } } + > + { trigger } +
+ { + setShowPopover( false ); + } } + > + { children } + + + ); +} + +export default PopoverContainer; \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/components/control-component.jsx b/modules/jet-style/framework/blocks-style-manager/assets/src/components/control-component.jsx new file mode 100644 index 000000000..6a5ca1982 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/components/control-component.jsx @@ -0,0 +1,269 @@ +import ControlText from './controls/text'; +import ControlChoose from './controls/choose'; +import ControlBorder from './controls/border'; +import ControlColor from './controls/color'; +import ControlTypography from './controls/typography'; +import ControlDimensions from './controls/dimensions'; +import ControlRange from './controls/range'; +import ControlToggle from './controls/toggle'; +import ControlHeading from './controls/heading'; +import ControlsTabs from './common/controls-tabs'; + +import { useSelect } from '@wordpress/data'; +import { getBreakpointsHierarchy } from '../helpers/breakpoints'; +import { valueIsEmpty } from '../helpers/utils'; +import { Tooltip } from '@wordpress/components'; +import { isVisible, getContextFromProps } from '../helpers/conditions-checker'; + +/** + * Renders control depending on it's type and attach attributes handlers. + */ +const ControlComponent = ( { control, props } ) => { + + if ( control.condition && ! isVisible( control.condition, getContextFromProps( props ) ) ) { + return null; + } + + const { attributes, setAttributes } = props; + const supportName = window.crocoStyleEditorData.support_name; + + const prefixedName = ( name ) => { + return `__${ name.toLowerCase() }` + } + + const device = useSelect( + ( select ) => { + const editPost = select( 'core/edit-post' ); + let previewDevice = 'Desktop'; + + if ( editPost && typeof editPost.__experimentalGetPreviewDeviceType === 'function' ) { + previewDevice = editPost.__experimentalGetPreviewDeviceType(); + } + + return prefixedName( previewDevice ); + }, [] + ); + + const devicesHierarchy = getBreakpointsHierarchy(); + + // Check if the control has a value in the attributes + if ( ! attributes[ supportName ]?.[ control.id ] ) { + attributes[ supportName ][ control.id ] = control.defaultValue; + } + + const findProp = ( obj, search ) => { + + let result = null; + + for ( const [ k, v ] of Object.entries( obj ) ) { + if ( v === search ) { + return k; + } else if ( 'object' === typeof v ) { + result = findProp( v, search ); + if ( result ) { + break; + } + } + } + + return result; + }; + + const maybeConvertFromReturnValue = ( value ) => { + + if ( control.return_value ) { + + let found = findProp( control.return_value, value ); + + if ( found ) { + + value = found; + + // convert string 'true'/'false' to boolean + if ( 'true' === value ) { + value = true; + } else if ( 'false' === value ) { + value = false; + } + } + } + + return value; + }; + + const handleChange = ( value ) => { + + if ( control.return_value ) { + + if ( 'boolean' === typeof value ) { + if ( true === value ) { + value = control.return_value.true || null; + } else if ( false === value ) { + value = control.return_value.false || null; + } else { + value = null; + } + } else if ( 'string' === typeof value || 'number' === typeof value ) { + value = control.return_value?.[ value ] || null; + } + } + + setStyleAttr( control.id, value ); + }; + + const getResponsiveValue = ( attr ) => { + if ( '__desktop' === device ) { + return attributes[ supportName ][ attr ]; + } else if ( attributes[ supportName ][ device ]?.[ attr ] ) { + return attributes[ supportName ][ device ][ attr ]; + } else { + + // If the value is not set for the current device - get previous device value + const currentDeviceIndex = devicesHierarchy.indexOf( device ); + const prevDeviceIndex = currentDeviceIndex - 1; + const previousDevice = devicesHierarchy[ prevDeviceIndex ]; + + if ( prevDeviceIndex + && previousDevice + && attributes[ supportName ][ previousDevice ]?.[ attr ] + ) { + return attributes[ supportName ][ previousDevice ][ attr ]; + } + + // If no previous device value - return desktop value + return attributes[ supportName ][ attr ]; + } + }; + + const usageMarker = () => { + + const value = getResponsiveValue( control.id ); + + if ( control.default && control.default === value ) { + return null; + } + + if ( valueIsEmpty( value ) ) { + return null; + } + + let isUsedForCurrentDevice = false; + let tooltipText = 'Is inherited from the previous breakpoints'; + + // Check if the value is set for the current device + if ( '__desktop' === device + && ! valueIsEmpty( attributes[ supportName ][ control.id ] ) + ) { + isUsedForCurrentDevice = true; + tooltipText = 'Explicitly set for the current device'; + } else if ( ! valueIsEmpty( attributes[ supportName ]?.[ device ]?.[ control.id ] ) ) { + isUsedForCurrentDevice = true; + tooltipText = 'Explicitly set for the current device'; + } + + return ( + +
+
+ ); + } + + const setStyleAttr = ( attr, value ) => { + + let newStyles = {}; + + if ( '__desktop' === device ) { + newStyles = { + ...attributes[ supportName ], + [ attr ]: value, + }; + } else { + newStyles = { + ...attributes[ supportName ], + [ device ]: { + ...attributes[ supportName ][ device ], + [ attr ]: value, + }, + }; + } + + setAttributes( { + [ supportName ]: newStyles, + } ); + }; + + const renderControl = () => { + + const controlProps = { + control: control, + value: maybeConvertFromReturnValue( getResponsiveValue( control.id ) ), + handleChange: handleChange, + }; + + switch ( control.type ) { + case 'text': + return ( + + ); + case 'input': + return ( + + ); + case 'color-picker': + return ( + + ); + case 'toggle': + return ( + + ); + case 'range': + return ( + + ); + case 'choose': + return ( + + ); + case 'dimensions': + return ( + + ); + case 'border': + return ( + + ); + case 'typography': + return ( + + ); + case 'select': + return ( + <> + ); + case 'tabs': + return ( + + ); + default: + return null; + } + }; + + return ( +
+ { usageMarker() } + { renderControl() } +
+ ); +}; + +export default ControlComponent; \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/components/control-section.jsx b/modules/jet-style/framework/blocks-style-manager/assets/src/components/control-section.jsx new file mode 100644 index 000000000..654ac01dd --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/components/control-section.jsx @@ -0,0 +1,31 @@ +import { PanelBody } from '@wordpress/components'; +import { hasChildren } from '../helpers/utils'; +import ControlComponent from './control-component'; +import { isVisible, getContextFromProps } from '../helpers/conditions-checker'; + +const ControlSection = ( { section, props } ) => { + + if ( section.condition && ! isVisible( section.condition, getContextFromProps( props ) ) ) { + return null; + } + + return ( + + { hasChildren( section ) && section.children.map( ( control ) => { + return ( + + ); + } ) } + + ); +}; + +export default ControlSection; \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/components/control-stack.jsx b/modules/jet-style/framework/blocks-style-manager/assets/src/components/control-stack.jsx new file mode 100644 index 000000000..39d9c2cb7 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/components/control-stack.jsx @@ -0,0 +1,24 @@ +import { InspectorControls } from '@wordpress/block-editor'; +import { getBlockControls } from '../helpers/utils'; +import ControlSection from './control-section'; + +const ControlStack = ( props ) => { + + const blockControls = getBlockControls( props.name ); + + return ( + + { blockControls.map( ( control ) => { + return ( + + ); + } ) } + + ); +}; + +export default ControlStack; \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/border.jsx b/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/border.jsx new file mode 100644 index 000000000..ee649a2f2 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/border.jsx @@ -0,0 +1,161 @@ +import { BorderBoxControl } from '@wordpress/components'; +import { __experimentalBorderRadiusControl as BorderRadiusControl } from '@wordpress/block-editor'; +import { isObject } from '../../helpers/utils'; + +/** + * Value format: + * { + * border: { + * color: string, + * style: string, + * width: string, + * }, + * radius: { + * top: string, + * right: string, + * bottom: string, + * left: string, + * } + * } + * + * or + * + * { + * border: { + * top: { + * color: string, + * style: string, + * width: string, + * }, + * right: { + * color: string, + * style: string, + * width: string, + * }, + * }, + * radius: string, + * } + */ +const ControlBorder = ( { control, value, handleChange } ) => { + + const colorsList = wp.data.select( 'core/block-editor' ).getSettings().colors; + const currentValue = value || {}; + + const isRadiusAllowed = () => { + + if ( undefined === control.hide_radius ) { + return true; + } + + if ( control.hide_radius ) { + return false; + } + + return true; + } + + const updateValue = ( property, newValue ) => { + + const newBorderValue = { + ...currentValue, + } + + var defaultStyle = false; + + if ( isObject( newValue ) ) { + + const curretSubValue = currentValue[ property ] || {}; + + if ( 'border' === property ) { + + if ( newValue.color || newValue.style || newValue.width ) { + delete curretSubValue.top; + delete curretSubValue.right; + delete curretSubValue.bottom; + delete curretSubValue.left; + + if ( newValue.width && ! newValue.style ) { + defaultStyle = 'solid'; + } else if ( newValue.style ) { + defaultStyle = newValue.style; + } + } + + if ( newValue.top || newValue.right || newValue.bottom || newValue.left ) { + + if ( curretSubValue.color || curretSubValue.style || curretSubValue.width ) { + newValue.top = { ...curretSubValue, ...newValue.top }; + newValue.right = { ...curretSubValue, ...newValue.right }; + newValue.bottom = { ...curretSubValue, ...newValue.bottom }; + newValue.left = { ...curretSubValue, ...newValue.left }; + } + + delete curretSubValue.color; + delete curretSubValue.style; + delete curretSubValue.width; + } + + if ( + newValue.hasOwnProperty( 'style' ) + && newValue.hasOwnProperty( 'color' ) + && undefined === newValue.style + && undefined === newValue.color + ) { + delete newValue.style; + delete newValue.color; + delete newValue.width; + delete curretSubValue.width; + delete curretSubValue.style; + delete curretSubValue.color; + defaultStyle = false; + } + } + + if ( defaultStyle ) { + newValue.style = defaultStyle; + } + + newBorderValue[ property ] = { + ...curretSubValue, + ...newValue + }; + } else { + newBorderValue[ property ] = newValue; + } + + if ( ! isRadiusAllowed() && newBorderValue.radius ) { + delete newBorderValue.radius; + } + + handleChange( newBorderValue ); + } + + return ( + <> + updateValue( 'border', newValue ) } + className="crocoblock-style-manager__border-control crocoblock-style-manager__with-spacing" + help={ control.help } + colors={ colorsList } + enableStyle={ true } + __experimentalIsRenderedInSidebar={ true } + __next40pxDefaultSize + __nextHasNoMarginBottom + /> + { isRadiusAllowed() && updateValue( 'radius', newValue ) } + className="crocoblock-style-manager__border-radius-control" + __experimentalIsRenderedInSidebar={ true } + __next40pxDefaultSize + __nextHasNoMarginBottom + /> } + + ); +} + +export default ControlBorder; \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/choose.jsx b/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/choose.jsx new file mode 100644 index 000000000..e197d23ea --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/choose.jsx @@ -0,0 +1,59 @@ +import { + __experimentalToggleGroupControl as ToggleGroupControl, + __experimentalToggleGroupControlOption as ToggleGroupControlOption, + __experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon, + Dashicon, +} from '@wordpress/components'; + +const ControlChoose = ( { control, value, handleChange } ) => { + + let controlValue = value; + + if ( undefined === controlValue && control.options ) { + // If the value is undefined, set it to the first option + controlValue = Object.keys( control.options )[ 0 ]; + } + + return ( + + { control.options && Object.entries( control.options ).map( ( [ optionValue, optionData ] ) => { + + var icon = optionData.icon || false; + + if ( icon ) { + if ( icon.includes( 'dashicons-' ) ) { + icon = icon.replace( 'dashicons-', '' ); + } + + icon = ; + } + + if ( icon ) { + return ( ); + } else { + return ( ); + } + + } ) } + + ); +} + +export default ControlChoose; \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/color.jsx b/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/color.jsx new file mode 100644 index 000000000..64ba5a9b7 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/color.jsx @@ -0,0 +1,91 @@ +import { + ColorPicker, + ColorIndicator, + BaseControl, + Flex, + FlexItem, + Button, +} from '@wordpress/components'; +import PopoverContainer from '../common/popover-container'; + +const ControlColor = ( { control, value, handleChange } ) => { + + // Get color palette from the global WP data store + const colorsList = wp.data.select( 'core/block-editor' ).getSettings().colors; + + const clearIcon = ( + + ); + + const popoverTrigger = ( + +
+ { value && } + + { value && { value } } +
+
+ ); + + return ( + + { + handleChange( newValue ); + } } + color={ value } + enableAlpha={ true } + /> + + { colorsList.map( ( color ) => { + return ( + + { + handleChange( color.color ); + } } + className={ { + 'crocoblock-style-manager__color-palette-item-indicator': true, + 'crocoblock-style-manager__color-palette-item-indicator--active': color.color === value, + } } + /> + + ); + } ) } + + + ); +} + +export default ControlColor; \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/dimensions.jsx b/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/dimensions.jsx new file mode 100644 index 000000000..b8c49d939 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/dimensions.jsx @@ -0,0 +1,19 @@ +import { BoxControl } from '@wordpress/components'; + +const ControlDimensions = ( { control, value, handleChange } ) => { + + return ( + handleChange( newValue ) } + className="crocoblock-style-manager__dimensions-control" + __experimentalIsRenderedInSidebar={ true } + __next40pxDefaultSize + __nextHasNoMarginBottom + /> + ); +} + +export default ControlDimensions; \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/heading.jsx b/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/heading.jsx new file mode 100644 index 000000000..c471babb8 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/heading.jsx @@ -0,0 +1,13 @@ +const ControlHeading = ( { control } ) => { + + if ( ! control.content ) { + return null; + } + + return (
); +} + +export default ControlHeading; \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/range.jsx b/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/range.jsx new file mode 100644 index 000000000..94aeddb2c --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/range.jsx @@ -0,0 +1,214 @@ +import { + BaseControl, + RangeControl, + __experimentalHStack as HStack, + __experimentalUnitControl as UnitControl +} from '@wordpress/components'; +import { useState } from '@wordpress/element'; + +/** + * Allowed units format: + * [ + * { value: 'px', intervals: { step: 1, min: 1, max: 1000 } }, + * { value: '%', intervals: { step: 1, min: 1, max: 100 } }, + * { value: 'vw', intervals: { step: 1, min: 1, max: 100 } }, + * ] + */ +const ControlRange = ( { control, value, handleChange } ) => { + + const withoutUnits = ( value ) => { + // Remove units from the value + return value ? parseFloat( value ) : 0; + } + + const sanitizeValue = ( val ) => { + + // Sanitize the value based on min and max + let sanitizedValue = val; + + const min = control.min || 0; + const max = control.max || 100; + + if ( typeof sanitizedValue === 'number' ) { + if ( sanitizedValue < min ) { + sanitizedValue = min; + } else if ( sanitizedValue > max ) { + sanitizedValue = max; + } + } + + if ( typeof sanitizedValue === 'object' && sanitizedValue !== null ) { + + let result = ''; + + for ( const key in sanitizedValue ) { + if ( sanitizedValue.hasOwnProperty( key ) ) { + result += sanitizeValue( sanitizedValue[ key ] ); + } + } + + sanitizedValue = result; + } + + if ( true === control.cut_units ) { + // Remove units from the value + sanitizedValue = withoutUnits( sanitizedValue ); + } + + return sanitizedValue; + } + + const [ currentValue, setCurrentValue ] = useState( sanitizeValue( value ) ); + + const getDefaultUnit = () => { + // Return the first unit from the allowed units or 'px' if no units are specified + return control.units && control.units.length > 0 ? control.units[ 0 ].value : ''; + } + + const getCurrentUnit = () => { + + if ( true === control.cut_units ) { + return ''; + } + + if ( currentValue ) { + + // adjust current value to string in case it's number + let currentValueStr = typeof currentValue === 'number' ? currentValue.toString() : currentValue; + + const match = currentValueStr.match( /[a-zA-Z%]+/ ); + + if ( match && match.length > 0 ) { + return match[ 0 ]; + } + } + + return getDefaultUnit(); + } + + const addUnits = ( value ) => { + + // Get current unit from current value + const currentUnit = getCurrentUnit(); + const result = currentUnit ? `${ value }${ currentUnit }` : value; + + return result; + } + + const allowedUnits = () => { + + // Return allowed units list in the format required by UnitControl + const units = []; + + if ( control.units && control.units.length > 0 ) { + for ( const unit of control.units ) { + units.push( { + value: unit.value, + label: unit.label || unit.value, + default: unit.default || 0, + } ); + } + } + + return units; + } + + const getCurrentUnitMin = () => { + // Get the minimum value for the current unit + const currentUnit = getCurrentUnit(); + const unit = control.units.find( ( u ) => u.value === currentUnit ); + + return unit && unit.intervals ? unit.intervals.min : 0; + } + + + const getCurrentUnitMax = () => { + // Get the maximum value for the current unit + const currentUnit = getCurrentUnit(); + const unit = control.units.find( ( u ) => u.value === currentUnit ); + + return unit && unit.intervals ? unit.intervals.max : 100; + } + + // Return simple RangeControl if no units are specified + if ( ! control.units ) { + + const min = control.min || 0; + const max = control.max || 100; + + return ( + { + setCurrentValue( newValue ); + handleChange( newValue ); + } } + placeholder={ control.placeholder } + className="crocoblock-style-manager__text-control" + help={ control.help } + min={ min } + max={ max } + disabled={ control.disabled } + __nextHasNoMarginBottom + __next40pxDefaultSize + /> + ); + } + + // Return RangeControl with units if specified + return ( + + +
+ { + setCurrentValue( addUnits( newValue ) ); + handleChange( addUnits( newValue ) ); + } } + placeholder={ control.placeholder } + className="crocoblock-style-manager__text-control" + withInputField={ false } + min={ getCurrentUnitMin() } + max={ getCurrentUnitMax() } + __nextHasNoMarginBottom + __next40pxDefaultSize + /> +
+
+ { + handleChange( newValue ); + setCurrentValue( newValue ); + } } + units={ allowedUnits() } + className="crocoblock-style-manager__unit-control" + __nextHasNoMarginBottom + __next40pxDefaultSize + /> +
+
+
+ ); +} + +export default ControlRange; \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/text.jsx b/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/text.jsx new file mode 100644 index 000000000..20bf97b95 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/text.jsx @@ -0,0 +1,20 @@ +import { TextControl } from '@wordpress/components'; + +const ControlText = ( { control, value, handleChange } ) => { + + return ( + handleChange( newValue ) } + placeholder={ control.placeholder } + className="crocoblock-style-manager__text-control" + help={ control.help } + disabled={ control.disabled } + __nextHasNoMarginBottom + __next40pxDefaultSize + /> + ); +} + +export default ControlText; \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/toggle.jsx b/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/toggle.jsx new file mode 100644 index 000000000..8612c735b --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/toggle.jsx @@ -0,0 +1,17 @@ +import { ToggleControl } from '@wordpress/components'; + +const ControlToggle = ( { control, value, handleChange } ) => { + + return ( + + ); +} + +export default ControlToggle; \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/typography.jsx b/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/typography.jsx new file mode 100644 index 000000000..14a776fda --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/components/controls/typography.jsx @@ -0,0 +1,322 @@ +import { + BaseControl, + Button, + SelectControl, + __experimentalUnitControl as UnitControl, +} from '@wordpress/components'; +import { + __experimentalFontFamilyControl as FontFamilyControl, + __experimentalTextDecorationControl as TextDecorationControl, + __experimentalTextTransformControl as TextTransformControl, +} from '@wordpress/block-editor'; +import { useSettings } from '@wordpress/block-editor'; +import PopoverContainer from '../common/popover-container'; + +const ControlTypography = ( { control, value, handleChange } ) => { + + const editIcon = ( + + ); + + const fontFamilies = [ { + label: 'Default', + value: '' + } ]; + + const fontWeights = [ + { + label: 'Default', + value: '' + }, + { + label: 'Thin 100', + value: '100' + }, + { + label: 'Extra Light 200', + value: '200' + }, + { + label: 'Light 300', + value: '300' + }, + { + label: 'Regular 400', + value: '400' + }, + { + label: 'Medium 500', + value: '500' + }, + { + label: 'Semi Bold 600', + value: '600' + }, + { + label: 'Bold 700', + value: '700' + }, + { + label: 'Extra Bold 800', + value: '800' + }, + { + label: 'Black 900', + value: '900' + } + ]; + + const fontStyle = [ + { + label: 'Default', + value: '', + }, + { + label: 'Normal', + value: 'normal', + }, + { + label: 'Italic', + value: 'italic', + }, + { + label: 'Oblique', + value: 'oblique', + } + ]; + + if ( window?.crocoStyleEditorData?.fonts ) { + for ( const font of window?.crocoStyleEditorData?.fonts ) { + fontFamilies.push( font ); + } + } + + const currentValue = value || {}; + const updateTypography = ( key, value ) => { + + const newValue = { + ...currentValue, + [ key ]: value, + }; + + handleChange( newValue ); + }; + + const unitsList = [ + { + a11yLabel: 'Pixels (px)', + label: 'px', + step: 1, + value: 'px' + }, + { + a11yLabel: 'Ems (em)', + label: 'em', + step: 0.1, + value: 'em' + }, + { + a11yLabel: 'Percent (%)', + label: '%', + step: 1, + value: '%' + }, + { + a11yLabel: 'Rems (rem)', + label: 'rem', + step: 0.1, + value: 'rem' + }, + ]; + + const controlLabel = control.label || 'Typography'; + + const valueIsEmpty = ( value ) => { + if ( ! value + || Object.keys( value ).length === 0 + || Object.values( value ).every( val => !val ) + ) { + return true; + } + + return false; + }; + + const typographyIndicatorLabel = ( value ) => { + + if ( valueIsEmpty( value ) ) { + return Default; + } + + const { family, size, weight, style, transform, decoration, letterSpacing } = value; + + const label = [ + family || 'Default', + size, + weight, + style, + transform, + decoration + ].filter( Boolean ).join( ', ' ); + + if ( ! label ) { + return Default; + } + + return ( + + { label } + + ); + }; + + + const clearIcon = ( + + ); + + const popoverTrigger = ( + +
+ { ! valueIsEmpty( currentValue ) && } + { editIcon } + { typographyIndicatorLabel( currentValue ) } +
+
+ ); + + return ( + +
+ { + updateTypography( 'family', newValue ); + }} + options={ fontFamilies } + className="crocoblock-style-manager__popover-control" + __next40pxDefaultSize + __nextHasNoMarginBottom + /> +
+ You can manage installed fonts here +
+
+ { + updateTypography( 'size', newValue ); + }} + units={ unitsList } + allowEmpty={ true } + className="crocoblock-style-manager__popover-control w-50" + /> + { + updateTypography( 'lineHeight', newValue ); + }} + units={ unitsList } + allowEmpty={ true } + className="crocoblock-style-manager__popover-control w-50" + /> +
+
+
+ { + updateTypography( 'weight', newValue ); + }} + options={ fontWeights } + className="crocoblock-style-manager__popover-control" + __next40pxDefaultSize + __nextHasNoMarginBottom + /> +
+
+ { + updateTypography( 'style', newValue ); + }} + options={ fontStyle } + className="crocoblock-style-manager__popover-control" + __next40pxDefaultSize + __nextHasNoMarginBottom + /> +
+
+
+
+ { + updateTypography( 'transform', newValue ); + }} + className="crocoblock-style-manager__popover-control" + __next40pxDefaultSize + __nextHasNoMarginBottom + /> +
+
+ { + updateTypography( 'decoration', newValue ); + }} + className="crocoblock-style-manager__popover-control" + __next40pxDefaultSize + __nextHasNoMarginBottom + /> +
+
+ { + updateTypography( 'letterSpacing', newValue ); + }} + units={ unitsList } + allowEmpty={ true } + className="crocoblock-style-manager__popover-control" + /> +
+
+ ); +} + +export default ControlTypography; \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/base-field.js b/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/base-field.js new file mode 100644 index 000000000..7aa113730 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/base-field.js @@ -0,0 +1,128 @@ +export default class BaseField { + + static getType() { + return 'base-field'; + } + + constructor( uniqueClassName, rawValue ) { + this.uniqueClassName = uniqueClassName; + this.rawValue = rawValue; + } + + getSelectorMacros() { + return { + wrapper: 'body .is-root-container .' + this.uniqueClassName, + id: this.uniqueClassName + }; + } + + parseSelector( selector, props ) { + + const macros = this.getSelectorMacros(); + + selector = this.replaceData( selector, macros ); + props = this.getParsedProps( props ); + + let css = ` ${ selector } { ${ props } }`; + + return css; + } + + getParsedProps( props ) { + const values = this.getParsedValue(); + return this.replaceData( props, values ); + } + + /** + * Replace in the give string macros with an actual values from the data. + * + * Expected formats: + * - string: {{ WRAPPER }} .my-class + * - data: { 'wrapper': '.csm-block-unique-class' } + */ + replaceData( string, data ) { + + return string.replace( /{{\s*([\w-]+)\s*}}/g, ( match, p1 ) => { + p1 = p1.toLowerCase(); + if ( undefined !== data[ p1 ] ) { + return data[ p1 ]; + } else { + return match; + } + } ); + } + + getParsedValue() { + return { + 'value': this.rawValue, + }; + } + + cssVarValueFormat() { + return '{{VALUE}}'; + } + + isValidValueForVar( value, key ) { + + if ( 'inherit' === value || 'initial' === value || 'unset' === value ) { + return false; + } + + if ( 'undefined' === typeof value || null === value ) { + return false; + } + + if ( 'object' === typeof value && ! Object.keys( value ).length ) { + return false; + } + + if ( 'string' === typeof value && ! value.trim() ) { + return false; + } + + if ( 'number' === typeof value && isNaN( value ) ) { + return false; + } + + if ( 'function' === typeof value ) { + return false; + } + + return true; + } + + parseVariable( variable ) { + + const prefix = variable.prefix || ''; + const name = variable.name || false; + + let fullName = variable.full_name || prefix + '-' + name; + + if ( ! fullName ) { + return ''; + } + + if ( variable.suffix ) { + fullName += variable.suffix; + } + + let parsedValues = this.getParsedValue(); + let result = {}; + + if ( parsedValues.value ) { + result[ fullName ] = parsedValues.value; + } else { + + for ( const key in parsedValues ) { + if ( + parsedValues.hasOwnProperty( key ) + && this.isValidValueForVar( parsedValues[ key ], key ) + ) { + result[ fullName + '__' + key ] = parsedValues[ key ]; + } + } + } + + return result; + } +} \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/border.js b/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/border.js new file mode 100644 index 000000000..59d097517 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/border.js @@ -0,0 +1,159 @@ +import BaseField from "./base-field"; +import { isObject } from "../../helpers/utils"; + +export default class Border extends BaseField { + static getType() { + return 'border'; + } + + getParsedValue() { + + if ( ! this.rawValue ) { + return { + border: {}, + radius: {}, + } + } else { + return { + border: this.parseBorderValue( this.rawValue.border ), + radius: this.rawValue.radius, + } + } + } + + parseBorderValue( value ) { + + if ( ! value ) { + return {} + } + + if ( value.color || value.width || value.style ) { + return { + global: { + color: value.color || 'inherit', + width: value.width || 'inherit', + style: value.style || 'inherit', + } + }; + } else { + return value; + } + } + + getParsedProps( props ) { + + const values = this.getParsedValue(); + + let result = ''; + + if ( values.border ) { + for ( const [ key, value ] of Object.entries( values.border ) ) { + if ( 'global' === key ) { + result += this.getBorderCSS( value ); + } else { + result += this.getBorderCSS( value, key ); + } + } + } + + if ( values.radius ) { + if ( isObject( values.radius ) ) { + + const propsMap = { + 'border-top-left-radius': 'topLeft', + 'border-top-right-radius': 'topRight', + 'border-bottom-right-radius': 'bottomRight', + 'border-bottom-left-radius': 'bottomLeft', + }; + + for ( const [ key, value ] of Object.entries( propsMap ) ) { + if ( values.radius[ value ] ) { + result += `${ key }: ${ values.radius[ value ] };`; + } + } + + } else { + result += `border-radius: ${ values.radius };`; + } + } + + return result; + } + + parseVariable( variable ) { + + const prefix = variable.prefix !== undefined ? variable.prefix : ''; + const name = variable.name !== undefined ? variable.name : false; + let full_name = variable.full_name ? variable.full_name : prefix + '-' + name; + + if (!full_name) { + return {}; + } + + if (variable.suffix) { + full_name += variable.suffix; + } + + const values = this.getParsedValue(); + const result = {}; + + if (values.radius) { + let radius = ''; + + if (typeof values.radius === 'string') { + radius = values.radius; + } else { + const propsOrder = ['topLeft', 'topRight', 'bottomRight', 'bottomLeft']; + + propsOrder.forEach(prop => { + radius += values.radius[prop] ? values.radius[prop] + ' ' : '0 '; + }); + + radius = radius.trim(); + } + + result[ full_name + '__radius' ] = radius; + } + + if (values.border && typeof values.border === 'object') { + const globalProps = values.border.global || {}; + const sides = ['top', 'right', 'bottom', 'left']; + + sides.forEach(side => { + const side_props = (values.border[side] && typeof values.border[side] === 'object') ? values.border[side] : {}; + const color = side_props.color || globalProps.color || 'transparent'; + const width = side_props.width || globalProps.width || '0'; + const style = side_props.style || globalProps.style || 'solid'; + + result[ full_name + '__' + side ] = width + ' ' + style + ' ' + color; + }); + } + + return result; + } + + getBorderCSS( props, key ) { + + let css = ''; + + if ( key ) { + key = '-' + key; + } else { + key = ''; + } + + if ( props && props.color ) { + css += `border${ key }-color: ${ props.color };`; + } + + if ( props && props.width ) { + css += `border${ key }-width: ${ props.width };`; + } + + if ( props && props.style ) { + css += `border${ key }-style: ${ props.style };`; + } + + return css; + } +} diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/choose.js b/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/choose.js new file mode 100644 index 000000000..2781f14d2 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/choose.js @@ -0,0 +1,39 @@ +import BaseField from "./base-field"; + +export default class Choose extends BaseField { + + static getType() { + return 'choose'; + } + + getSelectorMacros() { + return { + wrapper: 'body .is-root-container .' + this.uniqueClassName + }; + } + + /** + * Replace in the give string macros with an actual values from the data. + * + * Expected formats: + * - string: {{ WRAPPER }} .my-class + * - data: { 'wrapper': '.csm-block-unique-class' } + */ + replaceData( string, data ) { + + return string.replace( /{{\s*([\w-]+)\s*}}/g, ( match, p1 ) => { + p1 = p1.toLowerCase(); + if ( undefined !== data[ p1 ] ) { + return data[ p1 ]; + } else { + return match; + } + } ); + } + + getParsedValue() { + return { + 'value': this.rawValue, + }; + } +} \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/color.js b/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/color.js new file mode 100644 index 000000000..923058a09 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/color.js @@ -0,0 +1,7 @@ +import BaseField from "./base-field"; + +export default class Color extends BaseField { + static getType() { + return 'color-picker'; + } +} diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/dimensions.js b/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/dimensions.js new file mode 100644 index 000000000..aa515f6ae --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/dimensions.js @@ -0,0 +1,99 @@ +import BaseField from "./base-field"; +import { isObject } from "../../helpers/utils"; + +export default class Dimensions extends BaseField { + + static getType() { + return 'dimensions'; + } + + parseVariable( variable ) { + + const prefix = variable.prefix || ''; + const name = variable.name || false; + + let fullName = variable.full_name || prefix + '-' + name; + + if ( ! fullName ) { + return ''; + } + + if ( variable.suffix ) { + fullName += variable.suffix; + } + + let parsedValues = this.getParsedValue(); + let parsedVar = ''; + let result = {}; + + if ( ! isObject( parsedValues ) ) { + return result; + } + + let sidesMap = [ 'top', 'right', 'bottom', 'left' ]; + let eachEmpty = true; + + for ( const side of sidesMap ) { + + if ( parsedValues[ side ] ) { + eachEmpty = false; + } + + parsedVar += `${ parsedValues[ side ] || 0 } `; + } + + if ( eachEmpty ) { + return result; + } else { + result[ fullName ] = parsedVar.trim(); + } + + return result; + } + + getParsedValue() { + + if ( ! this.rawValue ) { + return { + top: '', + right: '', + bottom: '', + left: '', + }; + } + + let value = {}; + + if ( isObject( this.rawValue ) ) { + value = { + top: this.rawValue.top || '', + right: this.rawValue.right || '', + bottom: this.rawValue.bottom || '', + left: this.rawValue.left || '', + }; + } else { + value = { + top: this.rawValue, + right: this.rawValue, + bottom: this.rawValue, + left: this.rawValue, + }; + } + + /** + * Check - if values has no other units provided - assume it's pixels + */ + for ( const side in value ) { + + if ( ! value[ side ] ) { + value[ side ] = '0'; + } + + if ( ! value[ side ].match( /[^\d]+$/ ) ) { + value[ side ] += 'px'; + } + } + + return value; + } +} diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/index.js b/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/index.js new file mode 100644 index 000000000..9833047ad --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/index.js @@ -0,0 +1,19 @@ +import BaseField from './base-field.js'; +import Color from './color.js'; +import Typography from './typography.js'; +import Border from './border.js'; +import Dimensions from './dimensions.js'; +import Range from './range.js'; +import Choose from './choose.js'; +import Toggle from './toggle.js'; + +export { + Color, + Border, + Typography, + BaseField, + Dimensions, + Range, + Choose, + Toggle, +}; \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/range.js b/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/range.js new file mode 100644 index 000000000..8ac0d5fad --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/range.js @@ -0,0 +1,15 @@ +import BaseField from "./base-field"; + +export default class Range extends BaseField { + + static getType() { + return 'range'; + } + + getParsedValue() { + return { + value: this.rawValue || 0, + unit: '', + } + } +} diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/toggle.js b/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/toggle.js new file mode 100644 index 000000000..bfe7f505e --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/toggle.js @@ -0,0 +1,14 @@ +import BaseField from "./base-field"; + +export default class Toggle extends BaseField { + + static getType() { + return 'toggle'; + } + + getParsedValue() { + return { + value: this.rawValue || null, + } + } +} diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/typography.js b/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/typography.js new file mode 100644 index 000000000..e789d099f --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/fields/typography.js @@ -0,0 +1,24 @@ +import BaseField from "./base-field"; + +export default class Typography extends BaseField { + + static getType() { + return 'typography'; + } + + getParsedValue() { + return { + family: this.rawValue.family || 'inherit', + weight: this.rawValue.weight || 'inherit', + transform: this.rawValue.transform || 'inherit', + style: this.rawValue.style || 'inherit', + decoration: this.rawValue.decoration || 'inherit', + lineheight: this.rawValue.lineheight || this.rawValue.lineHeight || 'inherit', + lh_unit: '', // legacy from old SM for style decorations consisitency + letterspacing: this.rawValue.letterSpacing || 'inherit', + ls_unit: '', // legacy from old SM for style decorations consisitency + size: this.rawValue.size || 'inherit', + s_unit: '', // legacy from old SM for style decorations consisitency + }; + } +} diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/generator.js b/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/generator.js new file mode 100644 index 000000000..9efed5448 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/css-engine/generator.js @@ -0,0 +1,177 @@ +import * as Fields from './fields'; +import { getBreakpoints, withMediaQuery } from '../helpers/breakpoints'; + +export class Generator { + + constructor( blockName, attributes ) { + + this.blockName = blockName; + this.attributes = attributes; + this.uniqueClassName = attributes._uniqueClassName || false; + this.css = ''; + this.cssVariables = {}; + this.responsiveCSS = {}; + + this.controlHandlers = { + [ Fields.Color.getType() ]: Fields.Color, + [ Fields.Typography.getType() ]: Fields.Typography, + [ Fields.Border.getType() ]: Fields.Border, + [ Fields.Dimensions.getType() ]: Fields.Dimensions, + [ Fields.Range.getType() ]: Fields.Range, + [ Fields.Choose.getType() ]: Fields.Choose, + [ Fields.Toggle.getType() ]: Fields.Toggle, + }; + } + + getControlHandler( control ) { + + const controlType = control.type || false; + + if ( ! controlType ) { + return false; + } + + return this.controlHandlers[ controlType ] || false; + } + + getCSS() { + + // Ensure we reset CSS on block re-render + this.css = ''; + + const { blockName } = this; + + if ( ! window.crocoBlockStyleEditor.blocks[ blockName ] ) { + return this.css; + } + + for ( const control of window.crocoBlockStyleEditor.blocks[ blockName ] ) { + this.generateControlStyles( control ); + } + + for ( const device in this.responsiveCSS ) { + + if ( ! this.responsiveCSS[ device ] ) { + continue; + } + + const mediaQueryCSS = withMediaQuery( this.responsiveCSS[ device ], device ); + + if ( mediaQueryCSS ) { + this.css += mediaQueryCSS; + } + } + + return { + styles: this.css, + variables: this.cssVariables, + } + } + + generateResponsiveStyles( control, ControlHandler ) { + + const controlID = control.id || false; + const cssSelectors = control.css_selector || false; + + if ( ! controlID || ! cssSelectors ) { + return; + } + + for ( const device in getBreakpoints() ) { + + if ( ! this.attributes?.[ device ]?.[ controlID ] ) { + continue; + } + + const controlInstance = new ControlHandler( + this.uniqueClassName, + this.attributes[ device ][ controlID ] + ); + + for ( const selector in cssSelectors ) { + const selectorStyles = controlInstance.parseSelector( + selector, + cssSelectors[ selector ] + ); + + if ( ! this.responsiveCSS[ device ] ) { + this.responsiveCSS[ device ] = ''; + } + + this.responsiveCSS[ device ] += selectorStyles; + } + } + } + + generateResponsiveVariables( controlID, cssVar, ControlHandler ) { + + for ( const device in getBreakpoints() ) { + + cssVar.suffix = ''; + + if ( ! this.attributes?.[ device ]?.[ controlID ] ) { + continue; + } + + cssVar.suffix = device; + + const controlInstance = new ControlHandler( + this.uniqueClassName, + this.attributes[ device ][ controlID ] + ); + + this.cssVariables = { + ...this.cssVariables, + ...controlInstance.parseVariable( cssVar ), + }; + } + } + + generateControlStyles( control ) { + + const ControlHandler = this.getControlHandler( control ); + const controlID = control.id || false; + const { attributes } = this; + + if ( ControlHandler && controlID ) { + + if ( attributes[ controlID ] ) { + + const controlInstance = new ControlHandler( + this.uniqueClassName, + this.attributes[ controlID ] + ); + + if ( control.css_selector ) { + for ( const selector in control.css_selector ) { + this.css += controlInstance.parseSelector( + selector, + control.css_selector[ selector ] + ); + } + } + + if ( control.css_var ) { + this.cssVariables = { + ...this.cssVariables, + ...controlInstance.parseVariable( control.css_var ), + }; + } + } + + if ( control.css_selector ) { + this.generateResponsiveStyles( control, ControlHandler ); + } + + if ( control.css_var ) { + this.generateResponsiveVariables( controlID, control.css_var, ControlHandler ); + } + } + + if ( control.children ) { + for ( const childControl of control.children ) { + this.generateControlStyles( childControl ); + } + } + } +} \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/editor.js b/modules/jet-style/framework/blocks-style-manager/assets/src/editor.js new file mode 100644 index 000000000..f1279de35 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/editor.js @@ -0,0 +1,100 @@ +import './editor.scss'; +import { addFilter } from '@wordpress/hooks'; +import { withStylesControls } from './hoc-wrappers/with-styles-controls'; +import { withBlockUniqueClass } from './hoc-wrappers/with-block-class'; + +class CrocoBlockStyleEditor { + + init() { + + this.blocks = window?.crocoStyleEditorData?.blocks_supports || {}; + this.supportName = window?.crocoStyleEditorData?.support_name; + this.defaults = window?.crocoStyleEditorData?.defaults || {}; + this.usedClasses = {}; + + addFilter( + 'blocks.registerBlockType', + 'crocoblock-style-manager/enable-block-support', + this.registerBlock.bind( this ) + ); + + addFilter( + 'editor.BlockEdit', + 'crocoblock-style-manager/enable-block-support', + withStylesControls + ); + + addFilter( + 'editor.BlockListBlock', + 'crocoblock-style-manager/with-crocoblock-editor-class', + withBlockUniqueClass, + 0 + ); + } + + classIsUsed( className, clientId ) { + + if ( ! className || ! clientId ) { + return false; + } + + if ( this.usedClasses[ className ] ) { + if ( this.usedClasses[ className ] === clientId ) { + // It's the same clientId, so we can use this class + return false; + } else { + // The class is already used by another block + return true; + } + } else { + // The class is not used yet, so we can use it + this.usedClasses[ className ] = clientId; + return false; + } + } + + getBlockControls( blockName ) { + return this.blocks[ blockName ] || false; + } + + registerBlock( settings, name ) { + + if ( ! this.getBlockControls( name ) ) { + return settings; + } + + const supports = settings.supports || {}; + supports[ this.supportName ] = true; + + const attributes = settings.attributes || {}; + + if ( ! attributes[ this.supportName ] ) { + + let defaults = { + _uniqueClassName: '', + }; + + if ( this.defaults[ name ] ) { + defaults = { + ...defaults, + ...this.defaults[ name ], + }; + } + + attributes[ this.supportName ] = { + type: 'object', + default: defaults, + style: true, + }; + } + + return { + ...settings, + supports: supports, + attributes: attributes, + }; + } +} + +window.crocoBlockStyleEditor = new CrocoBlockStyleEditor(); +window.crocoBlockStyleEditor.init(); \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/editor.scss b/modules/jet-style/framework/blocks-style-manager/assets/src/editor.scss new file mode 100644 index 000000000..7de2d171b --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/editor.scss @@ -0,0 +1,259 @@ +:root { + --csm-border-color: #e0e0e0; + --csm-border-dark-color: #757575; + --csm-accent-color: #0073aa; +} +.crocoblock-style-manager { + &__inline-control { + > .components-base-control__field { + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 20px; + > .components-base-control__label { + margin: 0; + line-height: 16px; + } + } + } + + &__heading-control { + margin: 0; + font-size: 13px; + line-height: 18px; + font-weight: 600; + text-transform: uppercase; + } + + &__control.is-control--text { + padding: 0 0 10px; + } + + &__color-indicator { + cursor: pointer; + display: flex; + align-items: center; + gap: 5px; + width: 100px; + flex: 0 0 100px; + .component-color-indicator { + width: 16px; + height: 16px; + } + &-label { + font-size: 12px; + line-height: 16px; + } + } + + &__usage-marker { + position: absolute; + top: 5px; + left: -10px; + width: 6px; + height: 6px; + border-radius: 50%; + .is-control--dimensions & { + top: 11px; + } + .is-control--choose &, + .is-control--range &, + .is-control--border & { + top: 4px; + } + .is-control--typography & { + top: 5px; + } + &.is-used { + background-color: var(--csm-accent-color); + } + &.is-inherited { + background-color: var(--csm-border-color); + } + } + + &__control, + &__with-spacing { + position: relative; + padding: 0 0 25px; + + .components-base-control .components-base-control__field { + padding-top: 0; + } + + &:last-child { + padding-bottom: 0; + .crocoblock-style-manager__controls-tabs { + border-bottom: none; + } + } + + // Fixes for vertical alignment of controls + .components-input-control { + margin: 0; + } + > div[data-wp-component="Grid"] { + align-items: center; + .components-base-control__label { + margin: 0; + } + div[data-wp-component="HStack"] { + gap: 16px; + } + } + + .components-border-radius-control { + margin: 0; + } + } + + &__border-control, + &__dimensions-control { + margin: 0; + } + + &__color-palette { + &-item { + width: 28px; + height: 28px; + &-indicator { + width: 100%; + height: 100%; + border-radius: 50%; + cursor: pointer; + &--active { + outline: 2px solid var( --csm-border-dark-color ); + outline-offset: 1px; + } + } + } + } + + &__typography { + &-controls { + min-width: 300px; + } + &-indicator { + display: flex; + align-items: center; + gap: 5px; + cursor: pointer; + width: 100px; + &-label { + font-size: 11px; + line-height: 16px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 67px; + } + } + } + + &__controls-tabs { + margin: 0 -16px; + border-top: 1px solid var(--csm-border-color); + border-bottom: 1px solid var(--csm-border-color); + &-navigation { + display: flex; + gap: 10px; + border-bottom: 1px solid var(--csm-border-color); + background-color: #efefef; + padding: 8px 16px; + button.crocoblock-style-manager__controls-tabs-button { + flex: 1; + text-align: center; + border: none; + background: transparent; + padding: 8px 0; + cursor: pointer; + &.is-active { + background-color: #1e1e1e; + color: #fff; + } + } + } + &-content { + padding: 15px 16px 0; + &:last-child { + padding-bottom: 15px; + } + } + .is-control--tabs + .is-control--tabs & { + margin-top: -25px; + border-top: none; + } + } + + &__popover { + min-width: 250px; + &-content { + padding: 20px; + .components-input-control__container { + width: 100%; + } + } + &-header { + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 1px solid var(--csm-border-color); + padding: 10px 20px; + font-weight: bold; + line-height: 24px; + button.crocoblock-style-manager__popover-close { + width: 24px; + height: 24px; + min-width: 0; + padding: 0; + } + } + &-trigger { + cursor: pointer; + border: 1px solid var(--csm-border-color); + padding: 5px; + border-radius: 3px; + margin-top: -5px; + position: relative; + svg { + width: 16px; + height: 16px; + display: block; + path { + fill: currentColor; + } + } + } + &-clear { + position: absolute; + top: 50%; + left: -23px; + transform: translateY(-50%); + padding: 0 !important; + min-width: 20px !important; + height: 20px !important; + svg { + width: 12px; + height: 12px; + } + } + &-control { + padding-bottom: 10px; + &-text-row { + font-size: 12px; + line-height: 16px; + margin-top: -3px; + margin-bottom: 10px; + } + } + &-controls-row { + display: flex; + gap: 10px; + width: 100%; + .w-50 { + width: calc( 50% - 5px ); + flex: 0 0 calc( 50% - 5px ); + } + } + } +} \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/helpers/breakpoints.js b/modules/jet-style/framework/blocks-style-manager/assets/src/helpers/breakpoints.js new file mode 100644 index 000000000..0e298abf2 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/helpers/breakpoints.js @@ -0,0 +1,47 @@ +const breakpoints = { + __desktop: { + minWidth: 992, + }, + __tablet: { + maxWidth: 991, + }, + __mobile: { + maxWidth: 478, + }, +} + +export const getBreakpoints = () => { + return breakpoints; +} + +export const getBreakpointsHierarchy = () => { + return Object.keys( breakpoints ); +} + +export const withMediaQuery = ( css, device ) => { + + const mediaQuery = breakpoints[ device ]; + + if ( ! mediaQuery ) { + return css; + } + + let mediaQueryString = ''; + + if ( mediaQuery.minWidth ) { + mediaQueryString += `(min-width: ${ mediaQuery.minWidth }px)`; + } + + if ( mediaQuery.maxWidth ) { + if ( mediaQueryString ) { + mediaQueryString += ' and '; + } + mediaQueryString += `(max-width: ${ mediaQuery.maxWidth }px)`; + } + + if ( ! mediaQueryString ) { + return css; + } + + return `@media ${ mediaQueryString } { ${ css } }`; +} diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/helpers/conditions-checker.js b/modules/jet-style/framework/blocks-style-manager/assets/src/helpers/conditions-checker.js new file mode 100644 index 000000000..554e1a099 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/helpers/conditions-checker.js @@ -0,0 +1,36 @@ +export function isVisible( conditions, context ) { + + if ( ! conditions || ! context ) { + return true; + } + + for ( const [ key, value ] of Object.entries( conditions ) ) { + + if ( Array.isArray( value ) ) { + + if ( ! value.includes( context[ key ] ) ) { + return false; + } + + continue; + } + + if ( context[ key ] !== value ) { + return false; + } + } + + return true; +} + +export function getContextFromProps( props ) { + + const attrs = props?.attributes || {}; + const supportName = window.crocoStyleEditorData.support_name; + const stylesContext = attrs?.[ supportName ] || {}; + + return { + ...attrs, + ...stylesContext + }; +} diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/helpers/utils.js b/modules/jet-style/framework/blocks-style-manager/assets/src/helpers/utils.js new file mode 100644 index 000000000..a99238665 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/helpers/utils.js @@ -0,0 +1,81 @@ +/** + * Get all block controls for given block + * + * @param {string} blockName + * @returns {object} blockControls + */ +export const getBlockControls = ( blockName ) => { + + const blockControls = window.crocoBlockStyleEditor.getBlockControls( blockName ); + + if ( ! blockControls ) { + return {}; + } + + return blockControls; +} + +/** + * Check if given stack has children + * + * @param {object} stack + * @returns {boolean} + */ +export const hasChildren = ( stack ) => { + if ( ! stack.children ) { + return false; + } + + if ( Array.isArray( stack.children ) && stack.children.length > 0 ) { + return true; + } + + // Otherwise, return false + return false; +} + +/** + * Check if given variable is an object + * + * @param {any} variable + * @returns {boolean} + */ +export const isObject = ( variable ) => { + return typeof variable === 'object' && variable !== null && !Array.isArray(variable); +} + +export const isEmpty = ( variable ) => { + + if ( variable === null || variable === undefined ) { + return true; + } + + if ( typeof variable === 'string' && variable.trim() === '' ) { + return true; + } + + if ( Array.isArray( variable ) && variable.length === 0 ) { + return true; + } + + if ( isObject( variable ) && Object.keys( variable ).length === 0 ) { + return true; + } + + return false; +} + +export const valueIsEmpty = ( value ) => { + + if ( isEmpty( value ) ) { + return true; + } + + if ( isObject( value ) && Object.keys( value ).length > 0 ) { + if ( Object.values( value ).every( ( v ) => isEmpty( v ) ) ) { + return true; + } + } + + return false; +} diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/hoc-wrappers/with-block-class.js b/modules/jet-style/framework/blocks-style-manager/assets/src/hoc-wrappers/with-block-class.js new file mode 100644 index 000000000..0189e56ba --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/hoc-wrappers/with-block-class.js @@ -0,0 +1,74 @@ +import { createHigherOrderComponent } from '@wordpress/compose'; +import { useSelect } from '@wordpress/data'; +import { useEffect } from '@wordpress/element'; + +export const withBlockUniqueClass = createHigherOrderComponent( ( BlockListBlockComponent ) => { + return ( props ) => { + const { + name, + className = '', + clientId, + setAttributes, + attributes, + } = props; + + // Pull the block’s registration info + const blockType = useSelect( + ( select ) => select( 'core/blocks' ).getBlockType( name ), + [ name ] + ); + + // If crocoblock_styles support is present, add our class + if ( blockType?.supports?.crocoblock_styles ) { + + const uniqueClass = props?.attributes?.[ window.crocoStyleEditorData.support_name ]?.[ '_uniqueClassName' ]; + + useEffect( () => { + if ( window.crocoBlockStyleEditor.classIsUsed( uniqueClass, clientId ) ) { + // If the class is already used, we need to generate a new one + const newUniqueClass = generateUniqueClassName(); + + setAttributes( { + [ window.crocoStyleEditorData.support_name ]: { + ...attributes[ window.crocoStyleEditorData.support_name ], + _uniqueClassName: newUniqueClass, + }, + } ); + } + }, [] ); + + return ( + + ); + } + + // Otherwise render unmodified + return ; + }; +}, 'withBlockUniqueClass' ); + +export const generateUniqueClassName = () => { + + const length = 8; + + let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; + let result = ''; + + for ( let i = 0; i < length; i++ ) { + + if ( i === 0 ) { + // Ensure the first character is a letter + result += chars.charAt( Math.floor( Math.random() * 26 ) ); + continue; + } + + result += chars.charAt( Math.floor( Math.random() * chars.length ) ); + } + + return window.crocoStyleEditorData.class_prefix + result; +} diff --git a/modules/jet-style/framework/blocks-style-manager/assets/src/hoc-wrappers/with-styles-controls.js b/modules/jet-style/framework/blocks-style-manager/assets/src/hoc-wrappers/with-styles-controls.js new file mode 100644 index 000000000..d813f131e --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/assets/src/hoc-wrappers/with-styles-controls.js @@ -0,0 +1,53 @@ +import { createHigherOrderComponent } from '@wordpress/compose'; +import { useEffect } from '@wordpress/element'; +import ControlStack from '../components/control-stack'; +import { Generator } from '../css-engine/generator'; +import { isEmpty } from '../helpers/utils'; +import { generateUniqueClassName } from './with-block-class'; + +export const withStylesControls = createHigherOrderComponent( ( BlockEdit ) => { + + return ( props ) => { + + const { attributes, clientId, setAttributes } = props; + const supportName = window.crocoStyleEditorData.support_name; + + // We need to check it by attributes, because 'supports' are not available in the props + if ( ! attributes || ! attributes[ supportName ] ) { + return ; + } + + // Ensure block class is really unique and not inherited from default block definition + useEffect( () => { + if ( ! attributes[ supportName ][ '_uniqueClassName' ] ) { + setAttributes( { + [ supportName ]: { + ...attributes[ supportName ], + _uniqueClassName: generateUniqueClassName(), + }, + } ); + } + }, [ clientId ] ); + + const cssGenerator = new Generator( + props.name, + attributes[ supportName ] + ); + + const { + styles, + variables + } = cssGenerator.getCSS(); + + return ( + <> + { ! isEmpty( styles ) && } + { ! isEmpty( variables ) &&
+ +
} + { isEmpty( variables ) && } + + + ); + }; +}, 'withStylesControls' ); diff --git a/modules/jet-style/framework/blocks-style-manager/block.php b/modules/jet-style/framework/blocks-style-manager/block.php new file mode 100644 index 000000000..503ac0ed2 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/block.php @@ -0,0 +1,517 @@ + array(), + ); + + /** + * Whether the block is rendered via REST API. + * + * @var bool + */ + protected $is_rest_render = false; + + /** + * Currently processed section for registration. + */ + protected $_current_section = null; + + /** + * Currently processed tabs for registration. + */ + protected $_current_tabs = null; + + /** + * Currently processed tab for registration. + */ + protected $_current_tab = null; + + protected $css_props = array(); + + protected $defaults = null; + + /** + * Constructor + * + * @param string $name Block name. + * @param array $attributes Block attributes. + */ + public function __construct( $name, $attributes = array() ) { + $this->name = $name; + $this->attributes = $attributes; + + add_filter( + 'rest_request_before_callbacks', + array( $this, 'prevent_styles_on_self_render' ), + 10, 3 + ); + + add_filter( + 'render_block_' . $this->get_block_name(), + array( $this, 'render_block_styles' ), + 10, 3 + ); + } + + /** + * Set block attributes + * + * @param array $attributes Block attributes. + */ + public function set_attributes( $attributes ) { + $this->attributes = array_merge( $this->attributes, $attributes ); + } + + /** + * Prevent styles from being rendered when there is a Rest API request + * to render the block itself. + * + * @param mixed $response The response object. + * @param mixed $handler The handler for the request. + * @param WP_REST_Request $request The request object. + * @return mixed + */ + public function prevent_styles_on_self_render( $response, $handler, $request ) { + + if ( strpos( $request->get_route(), '/wp/v2/block-renderer/' ) === 0 ) { + $block_name = $request->get_param( 'name' ); + + if ( ! $block_name ) { + $route_parts = explode( '/', trim( $request->get_route(), '/' ) ); + $block_name = end( $route_parts ); + } + + if ( $block_name === $this->get_block_name() ) { + /*remove_filter( + 'render_block_' . $this->get_block_name(), + array( $this, 'render_block_styles' ), + 10, 3 + );*/ + $this->is_rest_render = true; + } + } + + return $response; + } + + /** + * Render block styles + * + * @param string $block_content Block content. + * @param array $block Block data. + * @param bool $is_preview Is preview mode. + * @return string + */ + public function render_block_styles( $block_content, $parsed_block, $wp_block ) { + + if ( ! empty( $parsed_block['attrs'][ Registry::instance()->get_support_name() ] ) ) { + + if ( $this->is_rest_render ) { + + $block_class_name = Style_Engine::get_classname_from_attrs( + $parsed_block['attrs'][ Registry::instance()->get_support_name() ] + ); + + $style_inserter = new Style_Inserter( $block_class_name, [] ); + + return $style_inserter->with_class_name( $block_content ); + } + + $style_engine = new Style_Engine( + $parsed_block['attrs'][ Registry::instance()->get_support_name() ], + $this->css_props + ); + + $styles_data = Style_Cache::get_instance()->get_cached( $style_engine ); + + $style_inserter = new Style_Inserter( + $style_engine->get_class_name(), + $styles_data + ); + + $block_content = $style_inserter->insert_styles( $block_content ); + + if ( ! apply_filters( 'jet-styles-manager/block/force-print-styles', false, $this ) ) { + Style_Cache::get_instance()->add_printed( $style_engine->get_class_name() ); + } + } + + return $block_content; + } + + /** + * Get block name + * + * @return string + */ + public function get_block_name() { + return $this->name; + } + + /** + * Get currently registered controls. + * + * @return array + */ + public function get_controls_stack() { + return $this->controls_stack['children']; + } + + /** + * Get default values for the registered controls, + * if there were any. + * + * @return array|null + */ + public function get_defaults() { + return $this->defaults; + } + + /** + * Whether to register full controls or only CSS-render-related. + * + * @return bool + */ + public function should_register_full_controls() { + return is_admin(); + } + + /** + * Start a new section for block styles + * + * @param array $args + * @return void + */ + public function start_section( $args = array() ) { + + if ( ! $this->should_register_full_controls() ) { + return; + } + + if ( ! isset( $args['id'] ) ) { + _doing_it_wrong( + 'Blocks_Style\Proxy::start_section', + 'Section id is required.', + '1.0.0' + ); + return; + } + + $section_id = $args['id']; + + $this->_current_section = $section_id; + + if ( ! isset( $this->controls_stack['children'][ $this->_current_section ] ) ) { + $this->controls_stack['children'][ $this->_current_section ] = $args; + $this->controls_stack['children'][ $this->_current_section ]['children'] = array(); + } + } + + /** + * End the current section + * + * @return void + */ + public function end_section() { + + if ( ! $this->should_register_full_controls() ) { + return; + } + + $this->_current_section = null; + } + + /** + * Add a new control to the current section + * + * @param array $args + * @return void + */ + public function add_control( $args = array() ) { + + if ( ! $this->should_register_full_controls() ) { + + $control_id = ! empty( $args['id'] ) ? $args['id'] : false; + + $this->css_props[ $control_id ] = array( + 'type' => ! empty( $args['type'] ) ? $args['type'] : 'text', + 'css_var' => ! empty( $args['css_var'] ) ? $args['css_var'] : array(), + 'css_selector' => ! empty( $args['css_selector'] ) ? $args['css_selector'] : array(), + ); + + return; + } + + if ( ! $this->_current_section ) { + + _doing_it_wrong( + 'Block::add_control', + 'You must call start_section() before adding controls.', + '1.0.0' + ); + + return; + } + + $control_id = ! empty( $args['id'] ) ? $args['id'] : false; + + if ( ! $control_id ) { + _doing_it_wrong( + 'Block::add_control', + 'You must provide a control `id` parameter.', + '1.0.0' + ); + + return; + } + + // Ensure correct format of CSS variable prop + $css_var = ! empty( $args['css_var'] ) ? (array) $args['css_var'] : array(); + + if ( ! empty( $css_var ) ) { + + $css_var = array_merge( + array( + 'prefix' => '--csm', + 'name' => $control_id, + ), + $css_var + ); + + $args['css_var'] = $css_var; + } + + if ( $this->_current_tabs && $this->_current_tab ) { + $this->register_children( + array( $this->_current_section, $this->_current_tabs, $this->_current_tab ), + $control_id, + $args + ); + } else { + $this->register_children( + array( $this->_current_section ), + $control_id, + $args + ); + } + + if ( ! empty( $args['default'] ) ) { + + if ( is_null( $this->defaults ) ) { + $this->defaults = array(); + } + + $this->defaults[ $control_id ] = $args['default']; + } + + $this->css_props[ $control_id ] = array( + 'type' => ! empty( $args['type'] ) ? $args['type'] : 'text', + 'css_var' => ! empty( $args['css_var'] ) ? $args['css_var'] : array(), + 'css_selector' => ! empty( $args['css_selector'] ) ? $args['css_selector'] : array(), + ); + } + + /** + * Start tabs group + * + * @param array $args + * @return void + */ + public function start_tabs( $args = array() ) { + + if ( ! $this->should_register_full_controls() ) { + return; + } + + if ( ! empty( $args['id'] ) ) { + $id = $args['id']; + } else { + _doing_it_wrong( + 'Block::start_tabs', + 'You must provide a tabs `id` parameter.', + '1.0.0' + ); + return; + } + + $this->_current_tabs = $id; + + $args['type'] = 'tabs'; + + $this->register_children( + array( $this->_current_section ), + $this->_current_tabs, + $args + ); + } + + /** + * Start a new tab + * + * @param array $args + * @return void + */ + public function start_tab( $args = array() ) { + + if ( ! $this->should_register_full_controls() ) { + return; + } + + if ( ! empty( $args['id'] ) ) { + $id = $args['id']; + } else { + _doing_it_wrong( + 'Block::start_tab', + 'You must provide a tabs `id` parameter.', + '1.0.0' + ); + return; + } + + $this->_current_tab = $id; + + $args['type'] = 'tab'; + + $this->register_children( + array( $this->_current_section, $this->_current_tabs ), + $this->_current_tab, + $args + ); + } + + /** + * End tabs group + * + * @return void + */ + public function end_tabs() { + + if ( ! $this->should_register_full_controls() ) { + return; + } + + $this->_current_tabs = null; + $this->_current_tab = null; + } + + /** + * End the current tab + * + * @return void + */ + public function end_tab() { + + if ( ! $this->should_register_full_controls() ) { + return; + } + + $this->_current_tab = null; + } + + /** + * Register children controls recursively + * + * This method registers child controls under the specified parent trace. + * + * @param array $parents_trace Array of parent keys representing the trace. + * Example: ['section1', 'tabs1', 'tab1']. + * Each key must be a non-empty string. + * @param string $control_id The control ID. Must be a unique, non-empty string. + * Example: 'control1'. + * @param array $args The control arguments. Should include control-specific + * settings such as 'type', 'label', etc. + * Example: ['type' => 'text', 'label' => 'Enter text']. + * @return void + */ + public function register_children( $parents_trace, $control_id, $args ) { + + // Validate $parents_trace to ensure it contains valid keys + if ( ! is_array( $parents_trace ) || empty( $parents_trace ) ) { + _doing_it_wrong( + 'Block::register_children', + 'The $parents_trace parameter must be a non-empty array of valid keys.', + '1.0.0' + ); + return; + } + + // Validate $control_id to ensure it's a non-empty string + if ( ! is_string( $control_id ) || empty( $control_id ) ) { + _doing_it_wrong( + 'Block::register_children', + 'The $control_id parameter must be a non-empty string.', + '1.0.0' + ); + return; + } + + // Validate $args to ensure it's an array + if ( ! is_array( $args ) || empty( $args ) ) { + _doing_it_wrong( + 'Block::register_children', + 'The $args parameter must be a non-empty array.', + '1.0.0' + ); + return; + } + + $controls = &$this->controls_stack; + + foreach ( $parents_trace as $parent ) { + + if ( ! isset( $controls['children'][ $parent ] ) ) { + _doing_it_wrong( + 'Block::register_children', + "Parent control `$parent` not found in the controls stack.", + '1.0.0' + ); + return; + } + + $controls = &$controls['children'][ $parent ]; + + if ( ! isset( $controls['children'] ) ) { + $controls['children'] = array(); + } + + // Check if is last parent in the trace and register the control + if ( end( $parents_trace ) === $parent ) { + $controls['children'][ $control_id ] = $args; + } + } + } +} \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/editor.php b/modules/jet-style/framework/blocks-style-manager/editor.php new file mode 100644 index 000000000..52ce3a464 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/editor.php @@ -0,0 +1,194 @@ +inited ) { + return; + } + + $this->inited = true; + add_action( 'enqueue_block_editor_assets', array( $this, 'editor_assets' ), -10 ); + } + + /** + * Enqueue editor assets + * + * @return void + */ + public function editor_assets() { + + $asset_file = $this->get_path( 'assets/build/editor.asset.php' ); + $js_file = $this->get_path( 'assets/build/editor.js' ); + $js_url = $this->get_url( 'assets/build/editor.js' ); + + if ( ! file_exists( $js_file ) || ! file_exists( $asset_file ) ) { + return; + } + + $asset = include $asset_file; + + wp_enqueue_script( + 'crocoblock-blocks-style-editor', + $js_url, + $asset['dependencies'], + $asset['version'], + true + ); + + $fonts_manager_url = esc_url( admin_url( 'site-editor.php?p=/styles§ion=/typography' ) ); + $settings = wp_get_global_settings(); + $fonts = []; + + if ( ! empty( $settings['typography']['fontFamilies'] ) ) { + foreach ( $settings['typography']['fontFamilies'] as $fonts_set ) { + if ( is_array( $fonts_set ) ) { + foreach ( $fonts_set as $font ) { + if ( ! empty( $font['name'] ) && ! empty( $font['fontFamily'] ) ) { + $fonts[] = [ + 'value' => $font['fontFamily'], + 'label' => $font['name'], + ]; + } + } + } + } + } + + /** + * Note! + * + * get_blocks_supports() always must be called before get_block_defaults() + * because it internally calls extract_children(), + * which extract also defaults of these children. + */ + $supports = $this->get_blocks_supports(); + $defaults = $this->get_block_defaults(); + + wp_localize_script( + 'crocoblock-blocks-style-editor', + 'crocoStyleEditorData', + array( + 'blocks_supports' => $supports, + 'support_name' => Registry::instance()->get_support_name(), + 'defaults' => $defaults, + 'class_prefix' => 'cb-', + 'fonts_manager_url' => $fonts_manager_url, + 'fonts' => $fonts, + ) + ); + + $rtl_suffix = is_rtl() ? '-rtl' : ''; + + wp_enqueue_style( + 'crocoblock-blocks-style-editor', + $this->get_url( 'assets/build/editor' . $rtl_suffix . '.css' ), + array(), + $asset['version'] + ); + } + + /** + * Get blocks supports + * + * @return array + */ + public function get_blocks_supports() { + + $result = array(); + $blocks = Registry::instance()->get_blocks(); + + foreach ( $blocks as $block ) { + + $this->defaults[ $block->get_block_name() ] = $block->get_defaults(); + + $result[ $block->get_block_name() ] = $this->extract_children( + $block->get_controls_stack() + ); + } + + return $result; + } + + public function get_block_defaults() { + + $result = array(); + $blocks = Registry::instance()->get_blocks(); + + foreach ( $blocks as $block ) { + $result[ $block->get_block_name() ] = $block->get_defaults(); + } + + return $result; + } + + /** + * Recursively convert children prop of ech control (if exists) + * to indexed array instead of associative array to process in JS as array + * and not as object, because we can't keep order of object properties in JS + * (they always be sorted alphabetically). + * + * @param array $controls Controls stack. + * @return array + */ + public function extract_children( array $controls = array() ) { + + $result = array(); + + foreach ( $controls as $control ) { + + if ( ! isset( $control['children'] ) ) { + $result[] = $control; + continue; + } + + $children = $this->extract_children( $control['children'] ); + + if ( ! empty( $children ) ) { + $control['children'] = array_values( $children ); + } + + $result[] = $control; + } + + return $result; + } +} diff --git a/modules/jet-style/framework/blocks-style-manager/field-handlers/base.php b/modules/jet-style/framework/blocks-style-manager/field-handlers/base.php new file mode 100644 index 000000000..99cddd3a2 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/field-handlers/base.php @@ -0,0 +1,118 @@ +raw_value = $raw_value; + } + + /** + * Get the parsed value. + * + * @return array + */ + public function get_parsed_value() { + return array( + 'value' => $this->raw_value, + ); + } + + /** + * String with CSS variable macros. + * Should be rewritten in the classes with multiple parameters + * returned by get_parsed_value() method. + */ + public function css_var_value_format() { + return '{{VALUE}}'; + } + + /** + * Replace data in the string with CSS variable macros. + * + * @param string $string String with macros. + * @param array $data Data to replace in the string. + * + * @return array + */ + public function parse_variable( $variable = array() ) { + + $prefix = isset($variable['prefix']) ? $variable['prefix'] : ''; + $name = isset($variable['name']) ? $variable['name'] : false; + $full_name = isset($variable['full_name']) ? $variable['full_name'] : $prefix . '-' . $name; + + if ( ! $full_name ) { + return array(); + } + + if ( isset( $variable['suffix'] ) ) { + $full_name .= $variable['suffix']; + } + + $parsed_values = $this->get_parsed_value(); + $result = array(); + + if ( ! empty( $parsed_values['value'] ) ) { + $result[] = $full_name . ':' . $parsed_values['value']; + } else { + $values = self::replace_data( $this->css_var_value_format(), $parsed_values ); + $values = trim( $values ); + + if ( ! empty( $values ) ) { + $result[] = $full_name . ':' . $values; + } + } + + return $result; + } + + /** + * Parses data with macros. + * + * @param string $data Data to parse. + * @param array $macros Macros to replace. + * @return string Parsed data. + */ + public static function replace_data( $data = '', $macros = array() ) { + + if ( empty( $data ) || ! is_string( $data ) ) { + return ''; + } + + if ( ! empty( $macros ) && is_array( $macros ) ) { + $data = preg_replace_callback( + '/\{\{\s*([\w-]+)\s*\}\}/', + function ( $matches ) use ( $macros ) { + $key = strtolower( $matches[1] ); + return isset( $macros[ $key ] ) ? $macros[ $key ] : ''; + }, + $data + ); + } + + return trim( $data ); + } + + /** + * Get CSS rule string with replaced macros. + * + * @param string $rule_string String with CSS rule and macros. + * @return string Parsed CSS rule. + */ + public function get_css_rule( $rule_string = '' ) { + $parsed_values = $this->get_parsed_value(); + + if ( empty( $parsed_values ) || ! is_array( $parsed_values ) ) { + return ''; + } + + return self::replace_data( $rule_string, $parsed_values ); + } +} \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/field-handlers/border.php b/modules/jet-style/framework/blocks-style-manager/field-handlers/border.php new file mode 100644 index 000000000..8338f54a9 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/field-handlers/border.php @@ -0,0 +1,195 @@ +get_parsed_value(); + $result = array(); + + if ( ! empty( $values['radius'] ) ) { + + $radius = ''; + + if ( is_string( $values['radius'] ) ) { + $radius = $values['radius']; + } else { + $props_order = [ + 'topLeft', + 'topRight', + 'bottomRight', + 'bottomLeft', + ]; + + foreach ( $props_order as $prop ) { + $radius .= isset( $values['radius'][ $prop ] ) ? $values['radius'][ $prop ] . ' ' : '0 '; + } + + $radius = trim( $radius ); + } + + $result[] = $full_name . '__radius: ' . $radius; + } + + if ( ! empty( $values['border'] ) && is_array( $values['border'] ) ) { + + $global = isset( $values['border']['global'] ) ? $values['border']['global'] : []; + $sides = [ 'top', 'right', 'bottom', 'left' ]; + + foreach ( $sides as $side ) { + $side_props = isset( $values['border'][ $side ] ) && is_array( $values['border'][ $side ] ) + ? $values['border'][ $side ] + : []; + + $color = isset( $side_props['color'] ) ? $side_props['color'] : ( isset( $global['color'] ) ? $global['color'] : 'transparent' ); + $width = isset( $side_props['width'] ) ? $side_props['width'] : ( isset( $global['width'] ) ? $global['width'] : '0' ); + $style = isset( $side_props['style'] ) ? $side_props['style'] : ( isset( $global['style'] ) ? $global['style'] : 'solid' ); + + $result[] = $full_name . '__' . $side . ': ' . $width . ' ' . $style . ' ' . $color; + } + } + + return $result; + } + + /** + * Get the parsed value. + * + * @return array + */ + public function get_parsed_value() { + if ( ! $this->raw_value ) { + return [ + 'border' => [], + 'radius' => [], + ]; + } else { + return [ + 'border' => $this->parse_border_value(isset($this->raw_value['border']) ? $this->raw_value['border'] : null), + 'radius' => isset($this->raw_value['radius']) ? $this->raw_value['radius'] : null, + ]; + } + } + + /** + * Parse the border value. + * + * @param mixed $value The raw border value. + * @return array Parsed border value. + */ + public function parse_border_value($value) { + + if ( ! $value ) { + return []; + } + + if ( isset($value['color']) || isset($value['width']) || isset($value['style']) ) { + return [ + 'global' => [ + 'color' => isset($value['color']) ? $value['color'] : 'inherit', + 'width' => isset($value['width']) ? $value['width'] : 'inherit', + 'style' => isset($value['style']) ? $value['style'] : 'inherit', + ] + ]; + } else { + return $value; + } + } + + /** + * Get parsed properties for CSS. + * We ignore the $rule_string parameter as it is not used for this type of field. + * + * @param string $rule_string Properties to parse. + * @return string Parsed CSS properties. + */ + public function get_css_rule( $rule_string = '' ) { + + $values = $this->get_parsed_value(); + + $result = ''; + + if ( isset($values['border']) && is_array($values['border']) ) { + foreach ( $values['border'] as $key => $value ) { + if ( $key === 'global' ) { + $result .= $this->get_border_css($value); + } else { + $result .= $this->get_border_css($value, $key); + } + } + } + + if ( isset($values['radius']) ) { + if ( is_array($values['radius']) ) { + $props_map = [ + 'border-top-left-radius' => 'topLeft', + 'border-top-right-radius' => 'topRight', + 'border-bottom-right-radius' => 'bottomRight', + 'border-bottom-left-radius' => 'bottomLeft', + ]; + + foreach ( $props_map as $css_prop => $radius_key ) { + if ( isset($values['radius'][$radius_key]) ) { + $result .= $css_prop . ': ' . $values['radius'][$radius_key] . ';'; + } + } + } else { + $result .= 'border-radius: ' . $values['radius'] . ';'; + } + } + + return $result; + } + + /** + * Get CSS for border properties by key. + * + * @param array $props Properties to generate CSS for. + * @param string $key Optional key for specific border side. + * @return string Generated CSS string. + */ + public function get_border_css($props, $key = '') { + $css = ''; + + if ( $key ) { + $key = '-' . $key; + } else { + $key = ''; + } + + if ( isset($props['color']) ) { + $css .= "border{$key}-color: " . $props['color'] . ";"; + } + + if ( isset($props['width']) ) { + $css .= "border{$key}-width: " . $props['width'] . ";"; + } + + if ( isset($props['style']) ) { + $css .= "border{$key}-style: " . $props['style'] . ";"; + } + + return $css; + } +} diff --git a/modules/jet-style/framework/blocks-style-manager/field-handlers/dimensions.php b/modules/jet-style/framework/blocks-style-manager/field-handlers/dimensions.php new file mode 100644 index 000000000..782694494 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/field-handlers/dimensions.php @@ -0,0 +1,52 @@ +raw_value ) { + return [ + 'top' => '', + 'right' => '', + 'bottom' => '', + 'left' => '', + ]; + } + + if ( is_array( $this->raw_value ) ) { + $value = [ + 'top' => isset( $this->raw_value['top'] ) ? $this->raw_value['top'] : '0', + 'right' => isset( $this->raw_value['right'] ) ? $this->raw_value['right'] : '0', + 'bottom' => isset( $this->raw_value['bottom'] ) ? $this->raw_value['bottom'] : '0', + 'left' => isset( $this->raw_value['left'] ) ? $this->raw_value['left'] : '0', + ]; + } else { + $value = [ + 'top' => $this->raw_value, + 'right' => $this->raw_value, + 'bottom' => $this->raw_value, + 'left' => $this->raw_value, + ]; + } + + /** + * Check - if values has no other units provided - assume it's pixels + */ + foreach ( $value as $side => $val ) { + if ( ! preg_match( '/\d+[^\d]+/', $val ) ) { + $value[ $side ] = $val . 'px'; + } + } + + return $value; + } +} diff --git a/modules/jet-style/framework/blocks-style-manager/field-handlers/range.php b/modules/jet-style/framework/blocks-style-manager/field-handlers/range.php new file mode 100644 index 000000000..58817fb38 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/field-handlers/range.php @@ -0,0 +1,28 @@ +raw_value ) + && isset( $this->raw_value['value'] ) + && isset( $this->raw_value['unit'] ) + ) { + return array( + 'value' => ! empty( $this->raw_value['value'] ) ? esc_attr( $this->raw_value['value'] ) : 0, + 'unit' => esc_attr( $this->raw_value['unit'] ), + ); + } + + return array( + 'value' => ! empty( $this->raw_value ) ? esc_attr( $this->raw_value ) : 0, + 'unit' => '', + ); + } +} diff --git a/modules/jet-style/framework/blocks-style-manager/field-handlers/typography.php b/modules/jet-style/framework/blocks-style-manager/field-handlers/typography.php new file mode 100644 index 000000000..de32332f3 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/field-handlers/typography.php @@ -0,0 +1,73 @@ +get_parsed_value(); + $result = array(); + $skip_keys = array( 'lh_unit', 'ls_unit', 's_unit' ); + + foreach ( $parsed_values as $key => $value ) { + + if ( in_array( $key, $skip_keys, true ) ) { + continue; // Skip legacy units. + } + + if ( 'inherit' === $value ) { + continue; // Skip inherit values. + } + + $result[] = $full_name . '__' . $key . ':'. $value; + } + + return $result; + } + + /** + * Get the parsed value. + * + * @return array + */ + public function get_parsed_value() { + + if ( isset( $this->raw_value['lineHeight'] ) ) { + $this->raw_value['lineheight'] = $this->raw_value['lineHeight']; + } + + return [ + 'family' => isset($this->raw_value['family']) ? $this->raw_value['family'] : 'inherit', + 'weight' => isset($this->raw_value['weight']) ? $this->raw_value['weight'] : 'inherit', + 'transform' => isset($this->raw_value['transform']) ? $this->raw_value['transform'] : 'inherit', + 'style' => isset($this->raw_value['style']) ? $this->raw_value['style'] : 'inherit', + 'decoration' => isset($this->raw_value['decoration']) ? $this->raw_value['decoration'] : 'inherit', + 'lineheight' => isset($this->raw_value['lineheight']) ? $this->raw_value['lineheight'] : 'inherit', + 'lh_unit' => '', // legacy from old SM for style decorations consistency + 'letterspacing' => isset($this->raw_value['letterSpacing']) ? $this->raw_value['letterSpacing'] : 'inherit', + 'ls_unit' => '', // legacy from old SM for style decorations consistency + 'size' => isset($this->raw_value['size']) ? $this->raw_value['size'] : 'inherit', + 's_unit' => '', // legacy from old SM for style decorations consistency + ]; + } +} diff --git a/modules/jet-style/framework/blocks-style-manager/migrator/data-normalizer.php b/modules/jet-style/framework/blocks-style-manager/migrator/data-normalizer.php new file mode 100644 index 000000000..73e09939f --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/migrator/data-normalizer.php @@ -0,0 +1,282 @@ +input_data = $data; + + $normalized_tablet = []; + $normalized_mobile = []; + + foreach ( $data as $key => $item ) { + if ( ! isset( $item['value'] ) ) { + continue; + } + + $this->current_key = $key; + + $value = $item['value']; + + $normalized[ $key ] = $this->get_normalized_value( $value, $key ); + + if ( ! empty( $item['tablet'] ) ) { + $normalized_tablet[ $key ] = $this->get_normalized_value( $item['tablet'], $key ); + } + + if ( ! empty( $item['mobile'] ) ) { + $normalized_mobile[ $key ] = $this->get_normalized_value( $item['mobile'], $key ); + } + } + + $this->current_key = null; + $this->input_data = []; + + if ( ! empty( $normalized_tablet ) ) { + $normalized['__tablet'] = $normalized_tablet; + } + + if ( ! empty( $normalized_mobile ) ) { + $normalized['__mobile'] = $normalized_mobile; + } + + return $normalized; + } + + /** + * Get normalized value based on its type. + * + * @param mixed $value The value to normalize. + * @param string $key The key associated with the value. + * @return mixed The normalized value. + */ + private function get_normalized_value( $value, $key ) { + + if ( is_scalar( $value ) ) { + return $value; + } + + if ( $this->is_typography( $value ) ) { + return $this->normalize_typography( $value ); + } elseif ( $this->is_edges( $value ) ) { + return $this->normalize_edges( $value ); + } elseif ( $this->is_border( $value ) ) { + return $this->normalize_border( $value ); + } elseif ( is_array( $value ) && isset( $value['value'] ) && isset( $value['unit'] ) ) { + return $value['value'] . $value['unit']; + } elseif ( in_array( $key, [ 'icon_size', 'icon_gap' ], true ) ) { + return isset( $value['value'] ) ? (int) $value['value'] : 0; + } else { + return $value; + } + } + + /** + * Check if the value is a border array. + * + * @param array $value The value to check. + * @return bool True if it is a border array, false otherwise. + */ + private function is_border( array $value ): bool { + return isset( $value['width'], $value['color'], $value['style'] ); + } + + /** + * Check if the value is a typography array. + * + * @param array $value The value to check. + * @return bool True if it is a typography array, false otherwise. + */ + private function is_typography( array $value ): bool { + return isset( $value['family'], $value['size'], $value['weight'] ); + } + + /** + * Check if the value contains at least two edges. + * + * @param array $value The value to check. + * @return bool True if it contains at least two edges, false otherwise. + */ + private function is_edges( array $value ): bool { + return count( array_intersect( array_keys( $value ), self::EDGES ) ) >= 2; + } + + /** + * Normalize typography values. + * + * @param array $value The typography value to normalize. + * @return array The normalized typography value. + */ + private function normalize_typography( array $value ): array { + + $typography = []; + + if ( isset( $value['size'] ) ) { + $typography['size'] = $value['size'] . ( $value['s_unit'] ?? 'px' ); + } + + if ( isset( $value['lineHeight'] ) ) { + $typography['lineHeight'] = $value['lineHeight'] . ( $value['lh_unit'] ?? '' ); + } + + if ( isset( $value['letterSpacing'] ) ) { + $typography['letterSpacing'] = $value['letterSpacing'] . ( $value['ls_unit'] ?? 'px' ); + } + + foreach ( [ 'family', 'weight', 'style', 'transform', 'decoration' ] as $attr ) { + if ( isset( $value[ $attr ] ) && 'inherit' !== $value[ $attr ] ) { + $typography[ $attr ] = $value[ $attr ]; + } + } + + return $typography; + } + + /** + * Normalize edges values. + * + * @param array $value The edges value to normalize. + * @return array The normalized edges value. + */ + private function normalize_edges( array $value ): array { + return $value; + } + + /** + * Normalize border values. + * + * @param array $value The border value to normalize. + * @return array The normalized border value. + */ + private function normalize_border( array $value ): array { + + $result = [ 'border' => [] ]; + $border = []; + + if ( isset( $value['width'] ) && is_array( $value['width'] ) ) { + + $width = $this->get_uniform_edge_value( $value['width'] ); + + if ( null !== $width ) { + $border['width'] = $width; + } else { + foreach ( self::EDGES as $edge ) { + if ( isset( $value['width'][ $edge ] ) && ! empty( $value['width'][ $edge ] ) ) { + $border[ $edge ]['width'] = $value['width'][ $edge ]; + } else { + $border[ $edge ]['width'] = '0'; + } + } + } + } + + if ( ! empty( $value['color'] ) && ! empty( $border ) ) { + if ( $this->has_any_edges( $border ) ) { + foreach ( self::EDGES as $edge ) { + $border[ $edge ]['color'] = $value['color']; + } + } else { + $border['color'] = $value['color']; + } + } + + if ( ! empty( $value['style'] ) && 'none' !== $value['style'] && ! empty( $border ) ) { + if ( $this->has_any_edges( $border ) ) { + foreach ( self::EDGES as $edge ) { + $border[ $edge ]['style'] = $value['style']; + } + } else { + $border['style'] = 'solid'; // Default style if not set. + } + } + + if ( ! empty( $border ) ) { + $result['border'] = $border; + } + + if ( isset( $value['radius'] ) && is_array( $value['radius'] ) ) { + $radius = $this->get_uniform_edge_value( $value['radius'] ); + if ( null !== $radius ) { + $result['radius'] = $radius; + } + } + + $keys = array_keys( $this->input_data ); + $curernt_index = array_search( $this->current_key, $keys, true ); + + if ( false !== $curernt_index ) { + $next_index = $curernt_index + 1; + $next_key = isset( $keys[ $next_index ] ) ? $keys[ $next_index ] : null; + + if ( $next_key && false !== strpos( $next_key, 'radius' ) ) { + $next_data = $this->input_data[ $next_key ]['value'] ?? []; + + if ( ! empty( $next_data ) && is_array( $next_data ) ) { + $radius = $this->get_uniform_edge_value( $next_data ); + if ( null !== $radius ) { + $result['radius'] = $radius; + } else { + $radius_map = [ + 'top' => 'topLeft', + 'right' => 'topRight', + 'bottom' => 'bottomRight', + 'left' => 'bottomLeft', + ]; + + $result['radius'] = []; + + foreach ( self::EDGES as $edge ) { + + $current_edge = $radius_map[ $edge ]; + if ( isset( $next_data[ $edge ] ) && ! empty( $next_data[ $edge ] ) ) { + $result['radius'][ $current_edge ] = $next_data[ $edge ]; + } else { + $result['radius'][ $current_edge ] = '0'; + } + } + } + } + } + } + + return $result; + } + + /** + * Check if the value has any edges. + * + * @param array $value The value to check. + * @return bool True if it has any edges, false otherwise. + */ + private function has_any_edges( array $value ): bool { + return count( array_intersect( array_keys( $value ), self::EDGES ) ) > 0; + } + + /** + * Get a uniform edge value from an array of edges. + * + * If all edges have the same value, return that value; otherwise, return null. + * + * @param array $edges An associative array of edges (e.g., ['top' => '10px', 'right' => '10px']). + * @return string|null The uniform edge value or null if not uniform. + */ + private function get_uniform_edge_value( array $edges ): ?string { + $values = array_values( $edges ); + $unique = array_unique( $values ); + + return count( $unique ) === 1 ? $unique[0] : null; + } + +} diff --git a/modules/jet-style/framework/blocks-style-manager/migrator/post-handler.php b/modules/jet-style/framework/blocks-style-manager/migrator/post-handler.php new file mode 100644 index 000000000..520d35054 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/migrator/post-handler.php @@ -0,0 +1,82 @@ +post_id = $post_id; + $this->data = json_decode( $json_data, true ); + $this->normalizer = new Data_Normalizer(); + } + + /** + * Migrate data. + * + * return bool + */ + public function migrate_data() { + + if ( ! $this->post_id || ! $this->data ) { + return false; + } + + foreach ( $this->data as $block_id => $block_controls ) { + $new_data = $this->normalizer->normalize( $block_controls ); + $post_blocks[ $block_id ] = $new_data; + } + + $post = get_post( $this->post_id ); + + if ( ! $post ) { + return false; + } + + $post_content = $post->post_content; + + foreach ( $post_blocks as $block_id => $controls ) { + $controls_json = $this->controls_json( $controls ); + $block_id_pattern = '"blockID":"' . $block_id . '"'; + + // Add new controls only if they are not already present. + if ( false === strpos( $post_content, $block_id_pattern . ',"crocoblock_styles"' ) ) { + $post_content = str_replace( + $block_id_pattern, + $block_id_pattern . ',' . $controls_json, + $post_content + ); + } + } + + $post_content = wp_slash( $post_content ); + + // Update post content with new controls. + wp_update_post( [ + 'ID' => $this->post_id, + 'post_content' => $post_content, + ] ); + + return true; + } + + /** + * Convert controls to JSON. + * + * @param array $controls Controls to convert. + * + * @return string JSON encoded controls. + */ + private function controls_json( array $controls ): string { + $controls['_uniqueClassName'] = substr( uniqid('cb-'), 0, 11 ); + return '"crocoblock_styles":' . json_encode( $controls, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ); + } +} \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/migrator/ui.php b/modules/jet-style/framework/blocks-style-manager/migrator/ui.php new file mode 100644 index 000000000..577d26a44 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/migrator/ui.php @@ -0,0 +1,418 @@ +migrator_dir = plugin_dir_path( __FILE__ ); + + // Add admin notice about migration + add_action( 'admin_notices', [ $this, 'migration_notice' ] ); + // Add admin menu for migration + add_action( 'admin_menu', [ $this, 'add_migration_page' ] ); + add_action( 'admin_init', [ $this, 'process_migration' ] ); + add_action( 'admin_init', [ $this, 'process_cleanup' ] ); + add_action( 'admin_init', [ $this, 'process_rollback' ] ); + } + + /** + * Process rollback to legacy JetStyleManager + */ + public function process_rollback() { + + if ( ! isset( $_GET['rollback'] ) || ! current_user_can( 'manage_options' ) ) { + return; + } + + if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], $this->page_slug ) ) { + wp_send_json_error( esc_html__( 'The link is expired. Please reload the page and try again.', 'jet-engine' ) ); + } + + delete_option( 'jet_sm_migration_completed' ); + } + + /** + * Process cleanup of legacy data after migration + */ + public function process_cleanup() { + + if ( ! isset( $_GET['clean_up_migration'] ) || ! current_user_can( 'manage_options' ) ) { + return; + } + + if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], $this->page_slug ) ) { + wp_send_json_error( esc_html__( 'The link is expired. Please reload the page and try again.', 'jet-engine' ) ); + } + + $migrated = get_option( 'jet_sm_migration_completed', false ); + + if ( ! $migrated || 2 == (int) $migrated ) { + wp_send_json_error( esc_html__( 'Migration process is not completed or already cleaned up.', 'jet-engine' ) ); + } + + $clear_meta_keys = [ + '_jet_sm_ready_style', + '_jet_sm_style', + '_jet_sm_controls_values', + '_jet_sm_fonts_collection', + '_jet_sm_fonts_links', + ]; + + global $wpdb; + + foreach ( $clear_meta_keys as $meta_key ) { + $wpdb->query( $wpdb->prepare( + "DELETE FROM {$wpdb->postmeta} WHERE meta_key = %s", + $meta_key + ) ); + } + + update_option( 'jet_sm_migration_completed', 2 ); + + wp_send_json_success( [ + 'message' => esc_html__( 'Legacy data cleaned up successfully. You can now deactivate the JetStyleManager plugin to optimize your website performance.', 'jet-engine' ), + ] ); + } + + /** + * Process migration of the old JetStyleManager data to the new Style Manager module + */ + public function process_migration() { + + if ( ! isset( $_GET['run_migration'] ) || ! current_user_can( 'manage_options' ) ) { + return; + } + + if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], $this->page_slug ) ) { + wp_send_json_error( esc_html__( 'The link is expired. Please reload the page and try again.', 'jet-engine' ) ); + } + + global $wpdb; + $step = isset( $_REQUEST['step'] ) ? intval( $_REQUEST['step'] ) : 1; + $limit = 20; + $offset = ( $step - 1 ) * $limit; + $items = $wpdb->get_results( "SELECT post_id, meta_value FROM {$wpdb->postmeta} WHERE meta_key = '_jet_sm_controls_values' LIMIT $limit OFFSET $offset" ); + + if ( empty( $items ) ) { + wp_send_json_error( esc_html__( 'No more posts to migrate.', 'jet-engine' ) ); + } + + $total = $this->total_items_to_migrate(); + $migrated = $offset; + + if ( ! class_exists( '\Crocoblock\Blocks_Style\Migrator\Post_Handler' ) ) { + require_once $this->migrator_dir . 'post-handler.php'; + require_once $this->migrator_dir . 'data-normalizer.php'; + } + + foreach ( $items as $item ) { + $post_handler = new Post_Handler( $item->post_id, $item->meta_value ); + $res = $post_handler->migrate_data(); + + if ( $res ) { + $migrated++; + } + } + + if ( $total <= $offset + $limit ) { + + update_option( 'jet_sm_migration_completed', 1 ); + + wp_send_json_success( [ + 'message' => sprintf( + esc_html__( 'Migrated %d posts successfully. Migration completed.', 'jet-engine' ), + $migrated, + ), + 'next_step' => 0, + ] ); + } + + wp_send_json_success( [ + 'message' => sprintf( + esc_html__( 'Migrated %d posts successfully.', 'jet-engine' ), + $migrated, + ), + 'next_step' => $step + 1, + ] ); + } + + /** + * Add migration page to admin menu + */ + public function add_migration_page() { + add_submenu_page( + '', + esc_html__( 'JetStyleManager Migration', 'jet-engine' ), + esc_html__( 'Migration', 'jet-engine' ), + 'manage_options', + $this->page_slug, + [ $this, 'render_migration_page' ] + ); + } + + /** + * Render migration page + */ + public function render_migration_page() { + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'jet-engine' ) ); + } + + $migration_completed = get_option( 'jet_sm_migration_completed', false ); + $fonts_manager_url = esc_url( admin_url( 'site-editor.php?p=/styles§ion=/typography' ) ); + + $fonts_manager_message = '

' . esc_html__( 'Please note:', 'jet-engine' ) . ' '; + $fonts_manager_message .= sprintf( + esc_html__( ' The new Styles Manager uses fonts installed on your website. You can %1$smanage these fonts here%1$s.', 'jet-engine' ), + '', + '' + ); + $fonts_manager_message .= '

'; + + if ( $migration_completed && 2 == (int) $migration_completed ) { + echo '
'; + echo '

' . esc_html__( 'JetStyleManager Migration', 'jet-engine' ) . '

'; + echo '

' . esc_html__( 'Migration process is already completed. You can now deactivate the JetStyleManager plugin to optimize your website performance.', 'jet-engine' ) . '

'; + + echo $fonts_manager_message; + + echo '
'; + exit; + } + + echo '
'; + echo '

' . esc_html__( 'JetStyleManager Migration', 'jet-engine' ) . '

'; + echo '

' . esc_html__( 'This page allows you to migrate your styling settings to the new Style Manager module.', 'jet-engine' ) . '

'; + + $completed_style = 'style="display: none;"'; + $run_style = ''; + + if ( $migration_completed && 1 == (int) $migration_completed ) { + $completed_style = ''; + $run_style = 'style="display: none;"'; + } + + echo '
'; + + echo '

' . esc_html__( 'Migration process is completed. Please check your content. If everything is ok, you can click the button below to remove the legacy data and then deactivate JetStyleManager plugin.', 'jet-engine' ) . '

'; + + echo $fonts_manager_message; + + echo '

' . esc_html__( 'Cleanup Legacy Data', 'jet-engine' ) . '

'; + + echo '

' . esc_html__( 'If something went wrong click the button below to rollback to the legacy JetStyleManager.', 'jet-engine' ) . '

'; + + echo '

' . esc_html__( 'Rollback to legacy JetStyleManager', 'jet-engine' ) . '

'; + + echo '
'; + + echo '
'; + + echo '

' . esc_html__( 'Click the button below to start the migration process. After migration, you can deactivate the JetStyleManager plugin to optimize your website performance.', 'jet-engine' ) . '

'; + + $total_items = $this->total_items_to_migrate(); + + if ( $total_items > 0 ) { + echo '

' . sprintf( + esc_html__( 'Total posts to migrate: %d', 'jet-engine' ), + $total_items + ) . '

'; + + echo '

' . esc_html__( 'Start Migration', 'jet-engine' ) . '

'; + + echo '
'; + } else { + echo '

' . esc_html__( 'No posts to migrate. You can just disable an old JetStyleManager plugin and use the new functionality.', 'jet-engine' ) . '

'; + } + + echo '
'; + + $this->inline_scripts(); + + echo '
'; + } + + /** + * Get the total number of items to migrate + * + * @return int + */ + public function total_items_to_migrate() { + + global $wpdb; + $count = $wpdb->get_var( "SELECT count(meta_id) FROM {$wpdb->postmeta} WHERE meta_key = '_jet_sm_controls_values';" ); + return $count; + } + + /** + * Inline scripts for the migration page + */ + protected function inline_scripts() { + ?> + + $this->page_slug ]; + + if ( $run_migration ) { + $url_args['run_migration'] = 1; + } + + if ( $cleanup ) { + $url_args['clean_up_migration'] = 1; + } + + if ( $rollback ) { + $url_args['rollback'] = 1; + } + + $url = add_query_arg( $url_args, admin_url( 'admin.php' ) ); + + return esc_url( wp_nonce_url( $url, $this->page_slug ) ); + } + + /** + * Notice about migration if there is a new style manager version + */ + public function migration_notice() { + + if ( + ! current_user_can( 'manage_options' ) + || isset( $_GET['page'] ) && $_GET['page'] === $this->page_slug + ) { + return; + } + + echo '
'; + echo '

' . esc_html__( 'JetStyleManager as a separate plugin has been replaced with a built-in Style Manager module for the plugins that support it. You can migrate your styling settings to the new style manager module and deactivate JetStyleManager plugin to optimize your website performance.', 'jet-engine' ) . '

'; + echo '

' . esc_html__( 'Go to Migration Page', 'jet-engine' ) . '

'; + echo '
'; + } +} \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/package.json b/modules/jet-style/framework/blocks-style-manager/package.json new file mode 100644 index 000000000..76be06ec7 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/package.json @@ -0,0 +1,22 @@ +{ + "name": "crocoblock-style-manager", + "version": "1.0.0", + "scripts": { + "start": "wp-scripts start", + "build": "wp-scripts build" + }, + "devDependencies": { + "@wordpress/scripts": "^30.9.0", + "webpack": "^5.98.0", + "webpack-cli": "^6.0.1", + "webpack-remove-empty-scripts": "^1.0.4" + }, + "dependencies": { + "@wordpress/dataviews": "^4.12.0", + "@wordpress/interface": "^9.1.0", + "@yudiel/react-qr-scanner": "2.1.0", + "html5-qrcode": "^2.3.8", + "react-select": "^5.10.0", + "yet-another-react-lightbox": "^3.21.7" + } +} diff --git a/modules/jet-style/framework/blocks-style-manager/path-url-trait.php b/modules/jet-style/framework/blocks-style-manager/path-url-trait.php new file mode 100644 index 000000000..f70691bed --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/path-url-trait.php @@ -0,0 +1,78 @@ +path = $path; + return $this; + } + + /** + * Get module directory path to file + * + * @param string $file File name. + * @return string + */ + public function get_path( string $file = '' ) { + if ( ! $this->path ) { + $this->path = trailingslashit( plugin_dir_path( __FILE__ ) ); + } + + return $this->path . $file; + } + + /** + * Set module directory URL + * + * @param string $url URL. + * @return self + */ + public function set_url( $url ) { + $this->url = $url; + return $this; + } + + /** + * Get module directory URL to file + * + * @param string $file File name. + * @return string + */ + public function get_url( string $file = '' ) { + if ( ! $this->url ) { + $this->url = trailingslashit( plugin_dir_url( __FILE__ ) ); + } + + return $this->url . $file; + } +} diff --git a/modules/jet-style/framework/blocks-style-manager/proxy.php b/modules/jet-style/framework/blocks-style-manager/proxy.php new file mode 100644 index 000000000..b668ec339 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/proxy.php @@ -0,0 +1,242 @@ +block = $block; + + if ( $this->has_legacy_style_manager() ) { + $this->legacy_block_manager = \JET_SM\Gutenberg\Block_Manager::get_instance(); + $this->legacy_controls_manager = new \JET_SM\Gutenberg\Controls_Manager( + $this->block->get_block_name() + ); + } + } + + /** + * Get the Block instance + * + * @return Block + */ + public function get_block() { + return $this->block; + } + + /** + * Check we has a legacy style manage plugin. + * + * @return boolean + */ + public function has_legacy_style_manager() { + + if ( self::$is_migrated ) { + return false; + } + + self::$is_migrated = get_option( 'jet_sm_migration_completed', false ); + + return class_exists( '\JET_SM\Gutenberg\Block_Manager' ); + } + + /** + * Start a new section for block styles + * + * @param string $section_id + * @param array $args + * @return void + */ + public function start_section( $section_id, $args = array() ) { + + if ( $this->has_legacy_style_manager() ) { + $this->legacy_controls_manager->start_section( $section_id, $args ); + } + + $this->block->start_section( $args ); + } + + /** + * End the current section + * + * @return void + */ + public function end_section() { + + if ( $this->has_legacy_style_manager() ) { + $this->legacy_controls_manager->end_section(); + } + + $this->block->end_section(); + } + + /** + * Add a new control to the current section + * + * @param array $args + * @return void + */ + public function add_control( $args = array() ) { + + if ( $this->has_legacy_style_manager() ) { + + $is_responsive = ! empty( $args['is_responsive'] ) && $args['is_responsive']; + + if ( ! empty( $args['legacy_css_selector'] ) ) { + $args['css_selector'] = $args['legacy_css_selector']; + unset( $args['legacy_css_selector'] ); + } + + if ( $is_responsive ) { + $this->legacy_controls_manager->add_responsive_control( $args ); + } else { + $this->legacy_controls_manager->add_control( $args ); + } + } + + if ( ! empty( $args['is_legacy'] ) ) { + // If the control is marked as legacy, so do not add it + return; + } + + // rewrite default attribute + if ( + ! empty( $args['attributes'] ) + && ! empty( $args['attributes']['default'] ) + ) { + $raw_default = $args['attributes']['default']; + $default = null; + + if ( is_array( $raw_default ) ) { + if ( ! empty( $raw_default['value'] ) ) { + if ( is_array( $raw_default['value'] ) ) { + + if ( isset( $raw_default['value']['value'] ) ) { + $default = $raw_default['value']['value']; + } + + if ( ! empty( $raw_default['value']['unit'] ) && null !== $default ) { + $default .= $raw_default['value']['unit']; + } + } else { + $default = (string) $raw_default['value']; + } + } + + if ( ! empty( $raw_default['unit'] ) && null !== $default ) { + $default .= $raw_default['unit']; + } + } else { + $default = $raw_default; + } + + if ( null !== $default ) { + + if ( ! empty( $args['return_value'] ) ) { + $default = $this->find_value_by_return_value( $args['return_value'], $default ); + } + + $args['default'] = $default; + } + + unset( $args['attributes']['default'] ); + } + + $this->block->add_control( $args ); + } + + /** + * Find the value by return value array + * + * @param array $return_value + * @param mixed $default + * @return mixed + */ + protected function find_value_by_return_value( $return_value, $default ) { + if ( is_array( $return_value ) ) { + + $key = $default; + + if ( is_bool( $key ) ) { + $key = ( $key ) ? 'true' : 'false'; + } elseif ( is_null( $key ) ) { + $key = 'null'; + } elseif ( is_array( $key ) ) { + $key = json_encode( $key ); + } else { + $key = (string) $key; + } + + return ( isset( $return_value[ $key ] ) ) ? $return_value[ $key ] : $default; + } + + return $default; + } + + /** + * Add a new control to the current section. + * Fallback for legacy style manager. + * + * @param array $args + * @return void + */ + public function add_responsive_control( $args = array() ) { + $args['is_responsive'] = true; + $this->add_control( $args ); + } + + /** + * Start tabs group + * + * @param string $id + * @param array $args + * @return void + */ + public function start_tabs( $id, $args = array() ) { + $this->block->start_tabs( $args ); + } + + /** + * Start a new tab + * + * @param string $id + * @param array $args + * @return void + */ + public function start_tab( $id, $args = array() ) { + $this->block->start_tab( $args ); + } + + /** + * End tabs group + * + * @return void + */ + public function end_tabs() { + $this->block->end_tabs(); + } + + /** + * End the current tab + * + * @return void + */ + public function end_tab() { + $this->block->end_tab(); + } +} \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/registry.php b/modules/jet-style/framework/blocks-style-manager/registry.php new file mode 100644 index 000000000..2e3c4ae1c --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/registry.php @@ -0,0 +1,167 @@ +get_support_name() ] = true; + + // Ensure attributes array exists. + if ( empty( $block_args['attributes'] ) ) { + $block_args['attributes'] = array(); + } + + if ( empty( $block_args['attributes'][ $this->get_support_name() ] ) ) { + $defaults = array( + '_uniqueClassName' => '', + ); + + $block_args['attributes'][ $this->get_support_name() ] = array( + 'type' => 'object', + 'default' => $defaults, + ); + } + + return $block_args; + }, + 10, 2 + ); + + if ( ! class_exists( 'Crocoblock\Blocks_Style\Block' ) ) { + require_once $this->get_path( 'style-cache.php' ); + require_once $this->get_path( 'style-engine.php' ); + require_once $this->get_path( 'block.php' ); + } + + // Also, when first block is registered we need to load editor ans style render engine + if ( ! $this->handles_inited ) { + + $this->handles_inited = true; + + if ( ! class_exists( '\Crocoblock\Blocks_Style\Editor' ) ) { + require_once $this->get_path( 'editor.php' ); + } + + Editor::instance()->set_url( $this->url )->init(); + } + + if ( ! isset( $this->registry[ $block_name ] ) ) { + $this->registry[ $block_name ] = new Block( $block_name, $args ); + } else { + $this->registry[ $block_name ]->set_attributes( $args ); + } + + return $this->registry[ $block_name ]; + } + + /** + * Get blocks support name + * + * @return string + */ + public function get_support_name() { + return 'crocoblock_styles'; + } + + /** + * Get block instance by name + * + * @param string $block_name + * @return Block|false + */ + public function get_block( $block_name = '' ) { + + if ( empty( $block_name ) ) { + return false; + } + + if ( ! isset( $this->registry[ $block_name ] ) ) { + return false; + } + + return $this->registry[ $block_name ]; + } + + /** + * Apply block support + * + * @param \WP_Block_Type $block_type + * @param array $block_attributes + * @return array + */ + public function apply_support( $block_type, array $block_attributes ): array { + return array(); + } + + /** + * Get all registered blocks + * + * @return array + */ + public function get_blocks() { + return $this->registry; + } +} diff --git a/modules/jet-style/framework/blocks-style-manager/style-cache.php b/modules/jet-style/framework/blocks-style-manager/style-cache.php new file mode 100644 index 000000000..6446334cc --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/style-cache.php @@ -0,0 +1,100 @@ +printed_css, true ); + } + + /** + * Get cached or generated styles. + * + * @param Style_Engine $style_engine + * @return void + */ + public function get_cached( $style_engine ) { + + if ( ! $style_engine instanceof Style_Engine ) { + return array(); + } + + $class_name = $style_engine->get_class_name(); + + if ( isset( $this->generated_css[ $class_name ] ) ) { + return $this->generated_css[ $class_name ]; + } + + $styles_data = $style_engine->get_styles(); + + if ( ! empty( $styles_data ) ) { + $this->generated_css[ $class_name ] = $styles_data; + } + + return $styles_data; + } + + /** + * Add a class to the printed CSS classes list + * + * @param string $class_name + */ + public function add_printed( $class_name ) { + + if ( ! is_string( $class_name ) || empty( $class_name ) ) { + return; + } + if ( ! in_array( $class_name, $this->printed_css, true ) ) { + $this->printed_css[] = $class_name; + } + } + + /** + * Get the instance of the Style_Cache class + * + * @return Style_Cache + */ + public static function get_instance() { + + if ( null === self::$instance ) { + self::$instance = new self(); + } + + return self::$instance; + } +} \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/style-engine.php b/modules/jet-style/framework/blocks-style-manager/style-engine.php new file mode 100644 index 000000000..253a11cba --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/style-engine.php @@ -0,0 +1,394 @@ + array( + 'minWidth' => 992, + ), + '__tablet' => array( + 'maxWidth' => 991, + ), + '__mobile' => array( + 'maxWidth' => 478, + ), + ); + + /** + * Constructor + * + * @param array $attrs Block attributes. + * @param array $css_props CSS properties. + */ + public function __construct( $attrs = array(), $css_props = array() ) { + + $this->class_name = self::get_classname_from_attrs( $attrs ); + + if ( ! empty( $attrs['_uniqueClassName'] ) ) { + unset( $attrs['_uniqueClassName'] ); + } + + $this->attrs = $attrs; + $this->css_props = $css_props; + } + + /** + * Get class name from attributes. + * + * @param array $attrs Block attributes. + * @return string + */ + public static function get_classname_from_attrs( $attrs = array() ) { + return ! empty( $attrs['_uniqueClassName'] ) ? $attrs['_uniqueClassName'] : ''; + } + + /** + * Get class name of the block + * + * @return string + */ + public function get_class_name() { + return $this->class_name; + } + + /** + * Load field handlers. + * + * This method is used to load field handlers for the block styles. + * It checks if the base class exists and includes it if not. + */ + public function load_field_handlers() { + + if ( ! class_exists( '\Crocoblock\Blocks_Style\Field_Handlers\Base' ) ) { + require_once dirname( __FILE__ ) . '/field-handlers/base.php'; + } + } + + /** + * Get styles for the block. + * + * @return array + */ + public function get_styles() { + + $this->load_field_handlers(); + + foreach ( array_keys( $this->breakpoints ) as $breakpoint ) { + + $this->current_breakpoint = $breakpoint; + + if ( ! empty( $this->attrs[ $breakpoint ] ) && is_array( $this->attrs[ $breakpoint ] ) ) { + + foreach ( $this->attrs[ $breakpoint ] as $prop_id => $prop_value ) { + + if ( ! empty( $this->css_props[ $prop_id ] ) ) { + $prop = $this->css_props[ $prop_id ]; + } else { + continue; + } + + if ( ! empty( $prop['css_selector'] ) && is_array( $prop['css_selector'] ) ) { + foreach ( $prop['css_selector'] as $selector => $definition ) { + $this->add_selector_to_styles( array( + 'prop' => $prop_id, + 'type' => $prop['type'], + 'selectoor' => $selector, + 'definition' => $definition, + 'value' => $prop_value, + ) ); + } + } + + if ( ! empty( $prop['css_var'] ) && is_array( $prop['css_var'] ) ) { + $handler = $this->get_field_handler( $prop['type'], $prop_value ); + if ( $handler ) { + $prop['css_var']['suffix'] = $breakpoint; + $variable = $handler->parse_variable( $prop['css_var'] ); + if ( ! empty( $variable ) ) { + $this->variables = array_merge( $this->variables, $variable ); + } + $prop['css_var']['suffix'] = false; + } + } + } + + unset( $this->attrs[ $breakpoint ] ); + } + + $this->current_breakpoint = ''; + } + + foreach ( $this->attrs as $prop_id => $prop_value ) { + + if ( ! empty( $this->css_props[ $prop_id ] ) ) { + $prop = $this->css_props[ $prop_id ]; + } else { + continue; + } + + if ( ! empty( $prop['css_selector'] ) && is_array( $prop['css_selector'] ) ) { + foreach ( $prop['css_selector'] as $selector => $definition ) { + $this->add_selector_to_styles( array( + 'prop' => $prop_id, + 'type' => $prop['type'], + 'selectoor' => $selector, + 'definition' => $definition, + 'value' => $prop_value, + ) ); + } + } + + if ( ! empty( $prop['css_var'] ) && is_array( $prop['css_var'] ) ) { + $handler = $this->get_field_handler( $prop['type'], $prop_value ); + if ( $handler ) { + $variable = $handler->parse_variable( $prop['css_var'] ); + if ( ! empty( $variable ) ) { + $this->variables = array_merge( $this->variables, $variable ); + } + } + } + } + + return array( + 'styles' => $this->stringify_selectors( $this->styles ) . $this->get_responsive_styles(), + 'variables' => $this->stringify_props( $this->variables ), + ); + } + + /** + * Get responsive styles. + * + * @return string + */ + public function get_responsive_styles() { + + $css = ''; + + if ( ! empty( $this->responsive_styles ) && is_array( $this->responsive_styles ) ) { + foreach ( $this->responsive_styles as $breakpoint => $selectors ) { + if ( ! empty( $selectors ) && is_array( $selectors ) ) { + $css .= '@media screen and ('; + if ( ! empty( $this->breakpoints[ $breakpoint ]['minWidth'] ) ) { + $css .= 'min-width: ' . $this->breakpoints[ $breakpoint ]['minWidth'] . 'px'; + } + if ( ! empty( $this->breakpoints[ $breakpoint ]['maxWidth'] ) ) { + $css .= 'max-width: ' . $this->breakpoints[ $breakpoint ]['maxWidth'] . 'px'; + } + $css .= ') { '; + $css .= $this->stringify_selectors( $selectors ); + $css .= ' } '; + } + } + } + + return ' ' . $css; + } + + /** + * Adds selector to styles. + * + * @param array $selector_data Selector data. + */ + public function add_selector_to_styles( $selector_data = array() ) { + + $parsed_rule = $this->generate_css_rules( + $selector_data['prop'], + $selector_data['type'], + $selector_data['definition'], + $selector_data['value'] + ); + + if ( empty( $parsed_rule ) ) { + return; + } + + $parsed_selector = $this->generate_css_selector( $selector_data['selectoor'] ); + + if ( ! $this->current_breakpoint ) { + + if ( empty( $this->styles[ $parsed_selector ] ) ) { + $this->styles[ $parsed_selector ] = array(); + } + + $this->styles[ $parsed_selector ][] = $parsed_rule; + } else { + + $breakpoint = $this->current_breakpoint; + + if ( empty( $this->responsive_styles[ $breakpoint ][ $parsed_selector ] ) ) { + $this->responsive_styles[ $breakpoint ][ $parsed_selector ] = array(); + } + + $this->responsive_styles[ $breakpoint ][ $parsed_selector ][] = $parsed_rule; + } + } + + /** + * Generates a valid CSS selector. + * + * @param string $selector CSS selector to generate. + * @return string Parsed CSS selector. + */ + public function generate_css_selector( $selector = '' ) { + + if ( empty( $selector ) ) { + return ''; + } + + return Field_Handlers\Base::replace_data( + $selector, + apply_filters( 'crocoblock/style-manager/css-selector-macros', array( + 'wrapper' => '.' . $this->class_name, + 'id' => $this->class_name, + ), $this ) + ); + } + + /** + * Generates a valid CSS props set for given selector + * and actual attributes data. + * + * @param string $prop_id Property ID (to get it form attributes). + * @param string $prop_type Property type to get correct parser. + * @param string $def CSS rule definition with macros, which will be replaced with values. + * @param array $value Value to parse (optional, if not set, will be taken from attributes). + * @return void + */ + public function generate_css_rules( $prop_id, $prop_type, $def = '', $value = array() ) { + + if ( empty($value ) ) { + return; + } + + $handler = $this->get_field_handler( $prop_type, $value ); + + if ( ! $handler ) { + return; + } + + return $handler->get_css_rule( $def ); + } + + /** + * Get field handler by type. + * + * @param string $type Field type. + * @param mixed $raw_value Raw value to parse. + * @return \Crocoblock\Blocks_Style\Field_Handlers\Base|false + */ + public function get_field_handler( $type = '', $raw_value = '' ) { + + switch ( $type ) { + + case 'range': + + if ( ! class_exists( '\Crocoblock\Blocks_Style\Field_Handlers\Range' ) ) { + require_once dirname( __FILE__ ) . '/field-handlers/range.php'; + } + + return new Field_Handlers\Range( $raw_value ); + + case 'typography': + + if ( ! class_exists( '\Crocoblock\Blocks_Style\Field_Handlers\Typography' ) ) { + require_once dirname( __FILE__ ) . '/field-handlers/typography.php'; + } + + return new Field_Handlers\Typography( $raw_value ); + + case 'border': + + if ( ! class_exists( '\Crocoblock\Blocks_Style\Field_Handlers\Border' ) ) { + require_once dirname( __FILE__ ) . '/field-handlers/border.php'; + } + + return new Field_Handlers\Border( $raw_value ); + + case 'dimensions': + + if ( ! class_exists( '\Crocoblock\Blocks_Style\Field_Handlers\Dimensions' ) ) { + require_once dirname( __FILE__ ) . '/field-handlers/dimensions.php'; + } + + return new Field_Handlers\Dimensions( $raw_value ); + + default: + return new Field_Handlers\Base( $raw_value ); + } + } + + /** + * Generates a valid CSS selectors set. + * + * Input format: + * array( + * 'selector_1' => array( 'css_prop_1:value_1', 'css_prop_2:value_2' ), + * 'selector_2' => array( 'css_prop_3:value_3', 'css_prop_4:value_4' ), + * ); + * + * Output format: + * '.selector_1 { css_prop_1: value_1; css_prop_2: value_2; } + * .selector_2 { css_prop_3: value_3; css_prop_4: value_4; }' + * + * @param array $selectors + * @return void + */ + public function stringify_selectors( $selectors = array() ) { + + $css = ''; + + if ( ! empty( $selectors ) && is_array( $selectors ) ) { + foreach ( $selectors as $selector => $props ) { + if ( ! empty( $props ) && is_array( $props ) ) { + $css .= $selector . ' { ' . $this->stringify_props( $props ) . ' } '; + } + } + } + + return trim( $css ); + } + + /** + * Generates a valid CSS definitions set. + * + * Input format: + * array( + * 'css_prop_1: value_1', + * 'css_prop_2: value_2', + * ); + * + * Output format: + * 'css_prop_1: value_1; css_prop_2: value_2;' + * + * @param array $props + * @return void + */ + public function stringify_props( $props = array() ) { + + if ( empty( $props ) || ! is_array( $props ) ) { + return ''; + } + + return implode( ';', array_map( function( $prop ) { + return rtrim( $prop, ';' ); + }, $props ) ) . ';'; + } +} \ No newline at end of file diff --git a/modules/jet-style/framework/blocks-style-manager/style-inserter.php b/modules/jet-style/framework/blocks-style-manager/style-inserter.php new file mode 100644 index 000000000..e1910c09f --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/style-inserter.php @@ -0,0 +1,169 @@ +class_name = $class_name; + $this->data = $data; + } + + /** + * Set current styles collection. + * + * @param string|null $name + * @return void + */ + public static function set_collection( $name = null ) { + self::$current_collection = $name; + } + + /** + * Insert styles into the given content. + * + * 1. If the content is empty, it returns an empty string. + * 2. If $this->data contains not empty 'styles' key, + * it returns the styles wrapped in a '; + } +} diff --git a/modules/jet-style/framework/blocks-style-manager/style-manager.php b/modules/jet-style/framework/blocks-style-manager/style-manager.php new file mode 100644 index 000000000..0f3a3182c --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/style-manager.php @@ -0,0 +1,200 @@ +path = $args['path']; + $this->url = $args['url']; + require_once $this->path . 'path-url-trait.php'; + + if ( $this->is_migrator_enabled() ) { + + if ( ! class_exists( '\Crocoblock\Blocks_Style\Migrator\UI' ) ) { + require_once $this->path . 'migrator/ui.php'; + } + + new Migrator\UI(); + self::$migrator_registered = true; + } + } + + /** + * Check if migrator is enabled. + * + * @return bool + */ + public function is_migrator_enabled() { + return ! self::$migrator_registered && self::$requires_migration; + } + + /** + * Regsiter new block to supported blocks registry. + * + * Should be called before after init hook but wp_loaded hook with 999 priority. + * + * @since 1.0.0 + * @access public + * @param string $block_name Block name. + * @param array $args Style-manager related arguments. + * @return void + */ + public function register_block_support( $block_name = '', $args = array() ) { + + if ( ! $block_name ) { + _doing_it_wrong( + 'Crocoblock\Blocks_Style\Manager::register_block_support', + 'Block name is required.', + $this->version + ); + + return; + } + + $this->ensure_block_registry(); + Registry::instance()->register_block( $block_name, $args ); + } + + /** + * Start collecting styles for the given blocks set. + * Collected styles could be get/printed at once. + * + * @param string $name + * @return void + */ + public function start_collection( $name ) { + $this->ensure_block_registry(); + Style_Inserter::set_collection( $name ); + } + + /** + * Start collecting styles for the given blocks set. + * Collected styles could be get/printed at once. + * + * @param string $name + * @return void + */ + public function stop_current_collection() { + $this->ensure_block_registry(); + Style_Inserter::set_collection( null ); + } + + /** + * Get styles collection by name. + * + * @param string|null $name + * @return string + */ + public function get_styles_collection( $name = null ) { + $this->ensure_block_registry(); + return Style_Inserter::get_styles_collection( $name ); + } + + /** + * Get proxy class instance. + * + * @param string $block_name + * @return Proxy|false + */ + public function get_proxy( $block_name = '' ) { + + $this->ensure_block_registry(); + $block = Registry::instance()->get_block( $block_name ); + + if ( ! $block ) { + return false; + } + + if ( ! class_exists( '\Crocoblock\Blocks_Style\Proxy' ) ) { + require_once $this->path . 'proxy.php'; + } + + return new Proxy( $block ); + } + + /** + * Get block instance by name. + * + * @param string $block_name + * @return Block|false + */ + public function get_block( $block_name = '' ) { + $this->ensure_block_registry(); + return Registry::instance()->get_block( $block_name ); + } + + /** + * Allow to manually enqueue block editor assets + * + * @return void + */ + public function enqueue_editor_assets() { + + if ( ! class_exists( '\Crocoblock\Blocks_Style\Editor' ) ) { + require_once $this->path . 'editor.php'; + } + + Editor::instance() + ->set_url( $this->url ) + ->set_path( $this->path ) + ->editor_assets(); + } + + /** + * Ensure block registry is initialized. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function ensure_block_registry() { + if ( ! class_exists( '\Crocoblock\Blocks_Style\Registry' ) ) { + require_once $this->path . 'registry.php'; + require_once $this->path . 'style-inserter.php'; + + // Must be always called before registering the 1st block. + Registry::instance()->set_path( $this->path )->set_url( $this->url ); + } + } + +} diff --git a/modules/jet-style/framework/blocks-style-manager/webpack.config.js b/modules/jet-style/framework/blocks-style-manager/webpack.config.js new file mode 100644 index 000000000..132c912d2 --- /dev/null +++ b/modules/jet-style/framework/blocks-style-manager/webpack.config.js @@ -0,0 +1,18 @@ +const defaultConfig = require('@wordpress/scripts/config/webpack.config'); +const path = require('path'); + +module.exports = { + ...defaultConfig, + resolve: { + ...defaultConfig.resolve, + fullySpecified: false, + }, + entry: { + 'editor': path.resolve( __dirname, 'assets/src/editor.js' ), + //'editor-style': path.resolve( __dirname, 'assets/src/editor-style.scss' ), + }, + output: { + path: path.resolve(__dirname, 'assets/build'), + filename: '[name].js', + }, +}; diff --git a/modules/jet-style/framework/loader.php b/modules/jet-style/framework/loader.php new file mode 100644 index 000000000..61998096b --- /dev/null +++ b/modules/jet-style/framework/loader.php @@ -0,0 +1,155 @@ +modules = $modules; + $this->include_modules(); + } + + /** + * Include latest versions of modules in current loader instance. + * All available version preiously stored by 'store_versions' methods of each loader instance. + * + * @return boolean + */ + public function include_modules() { + + $modules_data = wp_cache_get( $this->key ); + + foreach ( $this->modules as $module_path ) { + + // If module path not passed, skip it. + if ( empty( $module_path ) || ! is_string( $module_path ) ) { + continue; + } + + // If module already included, skip it. + if ( isset( $this->included_modules[ $module_path ] ) ) { + continue; + } + + $module_slug = basename( $module_path ); + + if ( ! empty( $modules_data[ $module_slug ] ) ) { + $module_path = $this->get_latest_version_path( $modules_data[ $module_slug ] ); + } else { + + $modules_data[ $module_slug ] = array( + '1.0.0' => $module_path, + ); + + wp_cache_set( $this->key, $modules_data ); + + require_once $module_path; + } + + $module_dir = pathinfo( $module_path, PATHINFO_DIRNAME ); + $module_url = $this->get_module_url( $module_dir ); + $module_dir = trailingslashit( $module_dir ); + + $this->included_modules[ $module_slug ] = array( + 'path' => $module_dir, + 'url' => $module_url, + ); + } + } + + /** + * Get URL of module directory by it's path. + * + * @param string $dir Directory path. + * @return string Returns normalized path to module directory. + */ + public function get_module_url( $dir ) { + $normalize_dir = wp_normalize_path( $dir ); + $plugin_dir = wp_normalize_path( WP_PLUGIN_DIR ); + + if ( 0 === strpos( $normalize_dir, $plugin_dir ) ) { + $url = str_replace( + '\\', + '/', + str_replace( $plugin_dir, plugins_url(), $normalize_dir ) + ); + } else { + $url = str_replace( + '\\', + '/', + str_replace( wp_normalize_path( WP_CONTENT_DIR ), content_url(), $normalize_dir ) + ); + } + + return apply_filters( 'cx_include_module_url', trailingslashit( $url ), $dir ); + } + + /** + * Get latest version of module by paths and versions. + * + * @param array $paths_by_versions Array of paths by versions. + * @return string|boolean Returns path to latest version of module or false if not found. + */ + public function get_latest_version_path( $paths_by_versions = array() ) { + + if ( empty( $paths_by_versions ) || ! is_array( $paths_by_versions ) ) { + return false; + } + + $latest_version = false; + $highest_version = null; + foreach ( $paths_by_versions as $version => $path ) { + if ( null === $highest_version || version_compare( $version, $highest_version, '>' ) ) { + $highest_version = $version; + $latest_version = $path; + } + } + + if ( ! file_exists( $latest_version ) ) { + return false; + } + + return $latest_version; + } + + /** + * Retireve path and URL of included module directory + * + * @param [type] $file [description] + * @return [type] [description] + */ + public function get_included_module_data( $file ) { + return isset( $this->included_modules[ $file ] ) ? $this->included_modules[ $file ] : false; + } +} diff --git a/modules/jet-style/module.php b/modules/jet-style/module.php index 2fd9d52a1..654a13112 100644 --- a/modules/jet-style/module.php +++ b/modules/jet-style/module.php @@ -52,6 +52,9 @@ public function condition(): bool { } public function on_install() { + + Style_Manager::instance(); + $this->compiler = new Css_Compiler_Manager(); \WP_Block_Supports::get_instance()->register( diff --git a/modules/jet-style/style-manager.php b/modules/jet-style/style-manager.php new file mode 100644 index 000000000..14b507e4a --- /dev/null +++ b/modules/jet-style/style-manager.php @@ -0,0 +1,46 @@ +get_included_module_data( 'style-manager.php' ); + + $this->manager = new \Crocoblock\Blocks_Style\Manager( array( + 'path' => $module_data['path'], + 'url' => $module_data['url'], + ) ); + + add_action( 'jet-form-builder/block-type/before-intall', array( $this, 'register_block' ) ); + } + + /** + * Get style manager instance + * + * @return \Crocoblock\Blocks_Style\Manager + */ + public function get_manager() { + return $this->manager; + } + + /** + * Register support for the blocks + * + * @return void + */ + public function register_block( $block_type ) { + $block_type->maybe_init_style_manager( $this->manager ); + } +} \ No newline at end of file diff --git a/modules/modules-controller.php b/modules/modules-controller.php index 705633c63..089325dd1 100644 --- a/modules/modules-controller.php +++ b/modules/modules-controller.php @@ -12,6 +12,7 @@ use JFB_Components\Module\Module_Controller_It; use JFB_Components\Module\Module_Controller_Trait; use Jet_Form_Builder\Gateways\Gateway_Manager; + class Modules_Controller implements Module_Controller_It { use Module_Controller_Trait; @@ -62,6 +63,7 @@ public function rep_instances(): array { new Promo_Banner\Module(), new Fields_Render_Validator\Module(), new User_Journey\Module(), + new Multi_Gateway\Module(), ); } diff --git a/modules/multi-gateway/.babelrc b/modules/multi-gateway/.babelrc new file mode 100644 index 000000000..bedc22b83 --- /dev/null +++ b/modules/multi-gateway/.babelrc @@ -0,0 +1,3 @@ +{ + "extends": "../../.babelrc" +} \ No newline at end of file diff --git a/modules/multi-gateway/.gitattributes b/modules/multi-gateway/.gitattributes new file mode 100644 index 000000000..64da4024d --- /dev/null +++ b/modules/multi-gateway/.gitattributes @@ -0,0 +1,4 @@ +assets/src export-ignore +package.json export-ignore +.babelrc export-ignore +webpack.config.js export-ignore \ No newline at end of file diff --git a/modules/multi-gateway/assets/build/editor.asset.php b/modules/multi-gateway/assets/build/editor.asset.php new file mode 100644 index 000000000..e5d7a9d43 --- /dev/null +++ b/modules/multi-gateway/assets/build/editor.asset.php @@ -0,0 +1 @@ + array('react', 'wp-hooks'), 'version' => 'ca64342c859165474b36'); diff --git a/modules/multi-gateway/assets/build/editor.css b/modules/multi-gateway/assets/build/editor.css new file mode 100644 index 000000000..05ff6083b --- /dev/null +++ b/modules/multi-gateway/assets/build/editor.css @@ -0,0 +1,54 @@ +/*!*********************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/postcss-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./editor/blocks/multi-gateway/block.scss ***! + \*********************************************************************************************************************************************************************************************************/ +.jfb-multi-gateway, +.jfb-multi-gateway * { + box-sizing: border-box; +} + +.jfb-multi-gateway h3 { + margin: 0 0 6px; +} + +.jfb-multi-gateway p { + margin: 0 0 14px; + opacity: 0.75; +} + +.jfb-multi-gateway__list { + display: flex; + flex-direction: column; + gap: 10px; +} + +.jfb-multi-gateway__item { + display: flex; + align-items: flex-start; + gap: 10px; + width: 100%; + padding: 16px; + margin: 0; + border-top: 1px solid #dcdcde; + cursor: pointer; +} + +.jfb-multi-gateway__item:first-child { + border-top: 0; +} + +.jfb-multi-gateway__item .jet-form-builder__field[type=radio] { + margin: 0; + flex: 0 0 auto; +} + +.jfb-multi-gateway__content { + flex: 1 1 auto; + min-width: 0; +} + +.jfb-multi-gateway__empty { + padding: 16px; + opacity: 0.7; +} + +/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWRpdG9yLmNzcyIsIm1hcHBpbmdzIjoiOzs7QUFBQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovL2pmYi1tdWx0aS1nYXRld2F5Ly4vZWRpdG9yL2Jsb2Nrcy9tdW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aW4td2lkdGg6IDA7XHJcbn1cclxuXHJcbi5qZmItbXVsdGktZ2F0ZXdheV9fZW1wdHkge1xyXG4gIHBhZGRpbmc6IDE2cHg7XHJcbiAgb3BhY2l0eTogMC43O1xyXG59XHJcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==*/ \ No newline at end of file diff --git a/modules/multi-gateway/assets/build/editor.js b/modules/multi-gateway/assets/build/editor.js new file mode 100644 index 000000000..221a15d28 --- /dev/null +++ b/modules/multi-gateway/assets/build/editor.js @@ -0,0 +1,331 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ "../../blocks/multi-gateway/block.json": +/*!*********************************************!*\ + !*** ../../blocks/multi-gateway/block.json ***! + \*********************************************/ +/***/ ((module) => { + +module.exports = /*#__PURE__*/JSON.parse('{"apiVersion":2,"name":"jet-forms/multi-gateway","title":"Multi Gateway","description":"Displays available payment gateways selected in form settings.","category":"jet-form-builder-fields","textdomain":"jet-form-builder","keywords":["jetformbuilder","gateway","payment"],"icon":"","supports":{"html":false,"multiple":false},"attributes":{"isPreview":{"type":"boolean","default":false},"title":{"type":"string","default":""},"description":{"type":"string","default":""},"gatewaysSettings":{"type":"object","default":{}}},"viewScript":"jet-fb-multi-gateway","style":"jet-fb-multi-gateway"}'); + +/***/ }), + +/***/ "./editor/blocks/multi-gateway/block.scss": +/*!************************************************!*\ + !*** ./editor/blocks/multi-gateway/block.scss ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }), + +/***/ "./editor/blocks/multi-gateway/edit.js": +/*!*********************************************!*\ + !*** ./editor/blocks/multi-gateway/edit.js ***! + \*********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ MultiGatewayEdit) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +const { + useBlockProps, + RichText +} = wp.blockEditor; +const { + useMetaState +} = JetFBHooks; +const gatewaysData = window?.JetFormEditorData?.gateways; +const MODE_MANUAL = 'manual'; +const getGatewayLabel = type => gatewaysData?.list?.find(el => el.value === type)?.label || type; +function MultiGatewayEdit({ + attributes, + setAttributes +}) { + const blockProps = useBlockProps(); + const [meta] = useMetaState('_jf_gateways'); + const mode = meta?.mode || 'single'; + let selected = []; + if (mode === MODE_MANUAL) { + selected = (gatewaysData?.list || []).map(({ + value + }) => value).filter(key => !!meta?.[key]?.show_on_front); + } else { + const gw = meta?.gateway; + if (gw && gw !== 'none') { + selected = [gw]; + } + } + const gatewaysSettings = attributes.gatewaysSettings || {}; + const updateGatewaySetting = (key, field, value) => { + setAttributes({ + gatewaysSettings: { + ...gatewaysSettings, + [key]: { + ...(gatewaysSettings[key] || {}), + [field]: value + } + } + }); + }; + return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + ...blockProps + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "jfb-multi-gateway" + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(RichText, { + tagName: "h3", + className: "jfb-multi-gateway__title", + value: attributes.title || '', + placeholder: "Optional: add a heading for payment options\u2026", + onChange: title => setAttributes({ + title + }) + }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(RichText, { + tagName: "p", + className: "jfb-multi-gateway__desc", + value: attributes.description || '', + placeholder: "Optional: add a short description for this step\u2026", + onChange: description => setAttributes({ + description + }) + }), selected.length ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "jfb-multi-gateway__list" + }, selected.map((key, index) => { + const saved = gatewaysSettings?.[key] || {}; + const itemLabel = typeof saved.label === 'string' ? saved.label : getGatewayLabel(key); + const itemDesc = typeof saved.description === 'string' ? saved.description : ''; + return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { + key: key, + className: "jfb-multi-gateway__item", + onClickCapture: e => { + if (e.target?.closest?.('[contenteditable="true"]')) { + e.preventDefault(); + e.stopPropagation(); + } + } + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", { + type: "radio", + className: "jet-form-builder__field", + checked: index === 0, + readOnly: true + }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "jfb-multi-gateway__content", + onMouseDown: e => { + if (!e.target?.closest?.('[contenteditable="true"]')) { + e.preventDefault(); + } + } + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(RichText, { + tagName: "div", + className: "jfb-multi-gateway__label", + value: itemLabel, + placeholder: getGatewayLabel(key), + onChange: value => updateGatewaySetting(key, 'label', value) + }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "jfb-multi-gateway__description" + }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(RichText, { + tagName: "span", + value: itemDesc, + placeholder: "You can add description here", + onChange: value => updateGatewaySetting(key, 'description', value) + }))))); + })) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "jfb-multi-gateway__empty" + }, "No gateways selected"))); +} + +/***/ }), + +/***/ "./editor/blocks/multi-gateway/index.js": +/*!**********************************************!*\ + !*** ./editor/blocks/multi-gateway/index.js ***! + \**********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ metadata: () => (/* reexport default export from named module */ _root_blocks_multi_gateway_block_json__WEBPACK_IMPORTED_MODULE_2__), +/* harmony export */ name: () => (/* binding */ name), +/* harmony export */ settings: () => (/* binding */ settings) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./edit */ "./editor/blocks/multi-gateway/edit.js"); +/* harmony import */ var _root_blocks_multi_gateway_block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @root/blocks/multi-gateway/block.json */ "../../blocks/multi-gateway/block.json"); +/* harmony import */ var _block_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block.scss */ "./editor/blocks/multi-gateway/block.scss"); + + + + +const { + __ +} = wp.i18n; +const { + createBlock +} = wp.blocks; +const { + name, + icon = '' +} = _root_blocks_multi_gateway_block_json__WEBPACK_IMPORTED_MODULE_2__; +_root_blocks_multi_gateway_block_json__WEBPACK_IMPORTED_MODULE_2__.attributes.isPreview = { + 'type': 'boolean', + 'default': false +}; +const settings = { + icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { + dangerouslySetInnerHTML: { + __html: icon + } + }), + description: __(`Displays available payment gateways selected in form settings.`, 'jet-form-builder'), + edit: _edit__WEBPACK_IMPORTED_MODULE_1__["default"], + example: { + attributes: { + isPreview: true + } + }, + transforms: { + to: [{ + type: 'block', + blocks: ['jet-forms/text-field'], + transform: attributes => { + return createBlock('jet-forms/text-field', { + ...attributes + }); + }, + priority: 0 + }], + from: [{ + type: 'block', + blocks: ['jet-forms/checkbox-field', 'jet-forms/radio-field', 'jet-forms/select-field'], + transform: attributes => { + return createBlock(name, { + ...attributes + }); + }, + priority: 0 + }] + } +}; + + +/***/ }), + +/***/ "@wordpress/hooks": +/*!*******************************!*\ + !*** external ["wp","hooks"] ***! + \*******************************/ +/***/ ((module) => { + +module.exports = window["wp"]["hooks"]; + +/***/ }), + +/***/ "react": +/*!************************!*\ + !*** external "React" ***! + \************************/ +/***/ ((module) => { + +module.exports = window["React"]; + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +/*!************************!*\ + !*** ./editor/main.js ***! + \************************/ +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _blocks_multi_gateway__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./blocks/multi-gateway */ "./editor/blocks/multi-gateway/index.js"); +/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); +/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__); + + +(0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__.addFilter)('jet.fb.register.fields', 'jet-form-builder/multi-gateway', function (blocks) { + blocks.push(_blocks_multi_gateway__WEBPACK_IMPORTED_MODULE_0__); + return blocks; +}); +})(); + +/******/ })() +; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWRpdG9yLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7QUNBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQUE7QUFBQTtBQUVBO0FBQ0E7QUFFQTtBQUlBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFFQTtBQUVBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7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iwiLy8gZGVmaW5lIF9fZXNNb2R1bGUgb24gZXhwb3J0c1xuX193ZWJwYWNrX3JlcXVpcmVfXy5yID0gKGV4cG9ydHMpID0+IHtcblx0aWYodHlwZW9mIFN5bWJvbCAhPT0gJ3VuZGVmaW5lZCcgJiYgU3ltYm9sLnRvU3RyaW5nVGFnKSB7XG5cdFx0T2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFN5bWJvbC50b1N0cmluZ1RhZywgeyB2YWx1ZTogJ01vZHVsZScgfSk7XG5cdH1cblx0T2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICdfX2VzTW9kdWxlJywgeyB2YWx1ZTogdHJ1ZSB9KTtcbn07IiwiaW1wb3J0ICogYXMgTXVsdGlHYXRld2F5IGZyb20gJy4vYmxvY2tzL211bHRpLWdhdGV3YXknO1xyXG5cclxuaW1wb3J0IHsgYWRkRmlsdGVyIH0gZnJvbSAnQHdvcmRwcmVzcy9ob29rcyc7XHJcblxyXG5hZGRGaWx0ZXIoXHJcblx0J2pldC5mYi5yZWdpc3Rlci5maWVsZHMnLFxyXG5cdCdqZXQtZm9ybS1idWlsZGVyL211bHRpLWdhdGV3YXknLFxyXG5cdGZ1bmN0aW9uICggYmxvY2tzICkge1xyXG5cdFx0YmxvY2tzLnB1c2goXHJcblx0XHRcdE11bHRpR2F0ZXdheSxcclxuXHRcdCk7XHJcblxyXG5cdFx0cmV0dXJuIGJsb2NrcztcclxuXHR9LFxyXG4pOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file diff --git a/modules/multi-gateway/assets/build/multi-gateway.asset.php b/modules/multi-gateway/assets/build/multi-gateway.asset.php new file mode 100644 index 000000000..8f0c57058 --- /dev/null +++ b/modules/multi-gateway/assets/build/multi-gateway.asset.php @@ -0,0 +1 @@ + array(), 'version' => 'fc11dc696fe96f71d520'); diff --git a/modules/multi-gateway/assets/build/multi-gateway.css b/modules/multi-gateway/assets/build/multi-gateway.css new file mode 100644 index 000000000..19e8654c2 --- /dev/null +++ b/modules/multi-gateway/assets/build/multi-gateway.css @@ -0,0 +1,34 @@ +/*!*******************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/postcss-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./frontend/blocks/multi-gateway/multi-gateway.scss ***! + \*******************************************************************************************************************************************************************************************************************/ +.wp-block-jet-forms-multi-gateway .jfb-multi-gateway__list { + display: grid; + gap: 10px; +} +.wp-block-jet-forms-multi-gateway .jfb-multi-gateway__item { + display: grid !important; + grid-template-columns: 18px 1fr; + align-items: center; + column-gap: 10px; + width: 100%; + margin: 0; + text-align: left !important; + padding: 10px 12px; + border: 1px solid rgba(0, 0, 0, 0.12); + border-radius: 10px; + cursor: pointer; + user-select: none; +} +.wp-block-jet-forms-multi-gateway .jfb-multi-gateway__item input[type=radio] { + margin: 0 !important; + width: auto !important; + justify-self: start; +} +.wp-block-jet-forms-multi-gateway .jfb-multi-gateway__label { + margin: 0 !important; + width: auto !important; + text-align: left !important; + justify-self: start; +} + +/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXVsdGktZ2F0ZXdheS5jc3MiLCJtYXBwaW5ncyI6Ijs7O0FBRUE7QUFDQTtBQUNBO0FBREE7QUFJQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUxBO0FBUUE7QUFDQTtBQUNBO0FBQ0E7QUFOQTtBQVNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFQQSIsInNvdXJjZXMiOlsid2VicGFjazovL2pmYi1tdWx0aS1nYXRld2F5Ly4vZnJvbnRlbmQvYmxvY2tzL211bHRpLWdhdGV3YXkvbXVsdGktZ2F0ZXdheS5zY3NzIl0sInNvdXJjZXNDb250ZW50Ijp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NlbGY6IHN0YXJ0O1xyXG4gIH1cclxufVxyXG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=*/ \ No newline at end of file diff --git a/modules/multi-gateway/assets/build/multi-gateway.js b/modules/multi-gateway/assets/build/multi-gateway.js new file mode 100644 index 000000000..f8ddfa558 --- /dev/null +++ b/modules/multi-gateway/assets/build/multi-gateway.js @@ -0,0 +1,69 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ "./frontend/blocks/multi-gateway/multi-gateway.scss": +/*!**********************************************************!*\ + !*** ./frontend/blocks/multi-gateway/multi-gateway.scss ***! + \**********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +/*!***********************************************!*\ + !*** ./frontend/blocks/multi-gateway/main.js ***! + \***********************************************/ +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _multi_gateway_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./multi-gateway.scss */ "./frontend/blocks/multi-gateway/multi-gateway.scss"); + +})(); + +/******/ })() +; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXVsdGktZ2F0ZXdheS5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBOzs7Ozs7O0FDQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7O0FDdkJBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vamZiLW11bHRpLWdhdGV3YXkvLi9mcm9udGVuZC9ibG9ja3MvbXVsdGktZ2F0ZXdheS9tdWx0aS1nYXRld2F5LnNjc3M/MjlhNCIsIndlYnBhY2s6Ly9qZmItbXVsdGktZ2F0ZXdheS93ZWJwYWNrL2Jvb3RzdHJhcCIsIndlYnBhY2s6Ly9qZmItbXVsdGktZ2F0ZXdheS93ZWJwYWNrL3J1bnRpbWUvbWFrZSBuYW1lc3BhY2Ugb2JqZWN0Iiwid2VicGFjazovL2pmYi1tdWx0aS1nYXRld2F5Ly4vZnJvbnRlbmQvYmxvY2tzL211bHRpLWdhdGV3YXkvbWFpbi5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCB7fTsiLCIvL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aW5nVGFnKSB7XG5cdFx0T2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFN5bWJvbC50b1N0cmluZ1RhZywgeyB2YWx1ZTogJ01vZHVsZScgfSk7XG5cdH1cblx0T2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICdfX2VzTW9kdWxlJywgeyB2YWx1ZTogdHJ1ZSB9KTtcbn07IiwiaW1wb3J0ICcuL211bHRpLWdhdGV3YXkuc2Nzcyc7Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9 \ No newline at end of file diff --git a/modules/multi-gateway/assets/src/editor/blocks/multi-gateway/block.scss b/modules/multi-gateway/assets/src/editor/blocks/multi-gateway/block.scss new file mode 100644 index 000000000..7cb08332e --- /dev/null +++ b/modules/multi-gateway/assets/src/editor/blocks/multi-gateway/block.scss @@ -0,0 +1,49 @@ +.jfb-multi-gateway, +.jfb-multi-gateway * { + box-sizing: border-box; +} + +.jfb-multi-gateway h3 { + margin: 0 0 6px; +} + +.jfb-multi-gateway p { + margin: 0 0 14px; + opacity: 0.75; +} + +.jfb-multi-gateway__list { + display: flex; + flex-direction: column; + gap: 10px; +} + +.jfb-multi-gateway__item { + display: flex; + align-items: flex-start; + gap: 10px; + width: 100%; + padding: 16px; + margin: 0; + border-top: 1px solid #dcdcde; + cursor: pointer; +} + +.jfb-multi-gateway__item:first-child { + border-top: 0; +} + +.jfb-multi-gateway__item .jet-form-builder__field[type="radio"] { + margin: 0; + flex: 0 0 auto; +} + +.jfb-multi-gateway__content { + flex: 1 1 auto; + min-width: 0; +} + +.jfb-multi-gateway__empty { + padding: 16px; + opacity: 0.7; +} diff --git a/modules/multi-gateway/assets/src/editor/blocks/multi-gateway/edit.js b/modules/multi-gateway/assets/src/editor/blocks/multi-gateway/edit.js new file mode 100644 index 000000000..c93b1d99a --- /dev/null +++ b/modules/multi-gateway/assets/src/editor/blocks/multi-gateway/edit.js @@ -0,0 +1,137 @@ +const { useBlockProps, RichText } = wp.blockEditor; +const { useMetaState } = JetFBHooks; + +const gatewaysData = window?.JetFormEditorData?.gateways; +const MODE_MANUAL = 'manual'; + +const getGatewayLabel = ( type ) => ( + gatewaysData?.list?.find( el => el.value === type )?.label || type +); + +export default function MultiGatewayEdit( { attributes, setAttributes } ) { + const blockProps = useBlockProps(); + + const [ meta ] = useMetaState( '_jf_gateways' ); + + const mode = meta?.mode || 'single'; + + let selected = []; + if ( mode === MODE_MANUAL ) { + selected = ( gatewaysData?.list || [] ) + .map( ( { value } ) => value ) + .filter( ( key ) => !!meta?.[ key ]?.show_on_front ); + } else { + const gw = meta?.gateway; + if ( gw && gw !== 'none' ) { + selected = [ gw ]; + } + } + + const gatewaysSettings = attributes.gatewaysSettings || {}; + + const updateGatewaySetting = ( key, field, value ) => { + setAttributes( { + gatewaysSettings: { + ...gatewaysSettings, + [ key ]: { + ...( gatewaysSettings[ key ] || {} ), + [ field ]: value, + }, + }, + } ); + }; + + return ( +
+
+ setAttributes( { title } ) } + /> + + setAttributes( { description } ) } + /> + + { selected.length ? ( +
+ { selected.map( ( key, index ) => { + const saved = gatewaysSettings?.[ key ] || {}; + + const itemLabel = ( typeof saved.label === 'string' ) + ? saved.label + : getGatewayLabel( key ); + + const itemDesc = ( typeof saved.description === 'string' ) + ? saved.description + : ''; + + return ( + + ); + } ) } +
+ ) : ( +
+ No gateways selected +
+ ) } +
+
+ ); +} diff --git a/modules/multi-gateway/assets/src/editor/blocks/multi-gateway/index.js b/modules/multi-gateway/assets/src/editor/blocks/multi-gateway/index.js new file mode 100644 index 000000000..fe82800a0 --- /dev/null +++ b/modules/multi-gateway/assets/src/editor/blocks/multi-gateway/index.js @@ -0,0 +1,63 @@ +import MultiGatewayEdit from './edit'; +import metadata from '@root/blocks/multi-gateway/block.json'; +import './block.scss'; + +const { __ } = wp.i18n; + +const { createBlock } = wp.blocks; + +const { name, icon = '' } = metadata; + +metadata.attributes.isPreview = { + 'type': 'boolean', + 'default': false, +}; + +const settings = { + icon: , + description: __( + `Displays available payment gateways selected in form settings.`, + 'jet-form-builder', + ), + edit: MultiGatewayEdit, + example: { + attributes: { + isPreview: true, + }, + }, + transforms: { + to: [ + { + type: 'block', + blocks: [ + 'jet-forms/text-field', + ], + transform: ( attributes ) => { + return createBlock( 'jet-forms/text-field', + { ...attributes } ); + }, + priority: 0, + }, + ], + from: [ + { + type: 'block', + blocks: [ + 'jet-forms/checkbox-field', + 'jet-forms/radio-field', + 'jet-forms/select-field', + ], + transform: ( attributes ) => { + return createBlock( name, { ...attributes } ); + }, + priority: 0, + }, + ], + }, +}; + +export { + metadata, + name, + settings, +}; \ No newline at end of file diff --git a/modules/multi-gateway/assets/src/editor/blocks/multi-gateway/preview.js b/modules/multi-gateway/assets/src/editor/blocks/multi-gateway/preview.js new file mode 100644 index 000000000..5894a7d8a --- /dev/null +++ b/modules/multi-gateway/assets/src/editor/blocks/multi-gateway/preview.js @@ -0,0 +1,12 @@ +const preview = ( + + + + + + + +); + +export default preview; \ No newline at end of file diff --git a/modules/multi-gateway/assets/src/editor/main.js b/modules/multi-gateway/assets/src/editor/main.js new file mode 100644 index 000000000..9b9f1845b --- /dev/null +++ b/modules/multi-gateway/assets/src/editor/main.js @@ -0,0 +1,15 @@ +import * as MultiGateway from './blocks/multi-gateway'; + +import { addFilter } from '@wordpress/hooks'; + +addFilter( + 'jet.fb.register.fields', + 'jet-form-builder/multi-gateway', + function ( blocks ) { + blocks.push( + MultiGateway, + ); + + return blocks; + }, +); \ No newline at end of file diff --git a/modules/multi-gateway/assets/src/frontend/blocks/multi-gateway/main.js b/modules/multi-gateway/assets/src/frontend/blocks/multi-gateway/main.js new file mode 100644 index 000000000..67fb818a8 --- /dev/null +++ b/modules/multi-gateway/assets/src/frontend/blocks/multi-gateway/main.js @@ -0,0 +1 @@ +import './multi-gateway.scss'; \ No newline at end of file diff --git a/modules/multi-gateway/assets/src/frontend/blocks/multi-gateway/multi-gateway.scss b/modules/multi-gateway/assets/src/frontend/blocks/multi-gateway/multi-gateway.scss new file mode 100644 index 000000000..b76bfd40b --- /dev/null +++ b/modules/multi-gateway/assets/src/frontend/blocks/multi-gateway/multi-gateway.scss @@ -0,0 +1,38 @@ +.wp-block-jet-forms-multi-gateway { + + .jfb-multi-gateway__list { + display: grid; + gap: 10px; + } + + .jfb-multi-gateway__item { + display: grid !important; + grid-template-columns: 18px 1fr; + align-items: center; + column-gap: 10px; + + width: 100%; + margin: 0; + text-align: left !important; + + padding: 10px 12px; + border: 1px solid rgba(0,0,0,.12); + border-radius: 10px; + + cursor: pointer; + user-select: none; + } + + .jfb-multi-gateway__item input[type="radio"] { + margin: 0 !important; + width: auto !important; + justify-self: start; + } + + .jfb-multi-gateway__label { + margin: 0 !important; + width: auto !important; + text-align: left !important; + justify-self: start; + } +} diff --git a/modules/multi-gateway/blocks/multi-gateway/block-render.php b/modules/multi-gateway/blocks/multi-gateway/block-render.php new file mode 100644 index 000000000..c2712ea1b --- /dev/null +++ b/modules/multi-gateway/blocks/multi-gateway/block-render.php @@ -0,0 +1,21 @@ +form_id; + +$parent = wp_is_post_revision( $form_id ); +if ( $parent ) { + $form_id = (int) $parent; +} + +$parent = wp_is_post_autosave( $form_id ); +if ( $parent ) { + $form_id = (int) $parent; +} + +$parent = wp_get_post_parent_id( $form_id ); +if ( $parent ) { + $form_id = (int) $parent; +} + +$raw = get_post_meta( $form_id, '_jf_gateways', true ); +$meta = is_string( $raw ) ? json_decode( $raw, true ) : (array) $raw; +$meta = is_array( $meta ) ? $meta : array(); + +$mode = $meta['mode'] ?? 'single'; +$list = array(); + +if ( 'manual' === $mode ) { + foreach ( $meta as $key => $value ) { + if ( ! is_string( $key ) ) { + continue; + } + if ( in_array( $key, array( 'mode', 'gateway' ), true ) ) { + continue; + } + if ( is_array( $value ) && ! empty( $value['show_on_front'] ) ) { + $list[] = $key; + } + } +} else { + $gw = $meta['gateway'] ?? 'none'; + if ( is_string( $gw ) && $gw && 'none' !== $gw ) { + $list[] = $gw; + } +} + +$title = $args['title'] ?? ''; +$description = $args['description'] ?? ''; + +$field_name = ! empty( $args['name'] ) ? $args['name'] : 'multi_gateway'; +$name = $this->block_type->get_field_name( $field_name ); + +// Per-gateway settings stored in block attributes. +$gw_settings_raw = $args['gatewaysSettings'] ?? array(); +$gw_settings = is_string( $gw_settings_raw ) + ? json_decode( $gw_settings_raw, true ) + : (array) $gw_settings_raw; + +$gw_settings = is_array( $gw_settings ) ? $gw_settings : array(); + + +?> +
+
+ +

+ +

+ + + +

+ +

+ + + +
+ +
+ +
+ $gateway_key ) : ?> + + + +
+ +
+
diff --git a/modules/multi-gateway/blocks/multi-gateway/block-type.php b/modules/multi-gateway/blocks/multi-gateway/block-type.php new file mode 100644 index 000000000..1617c0125 --- /dev/null +++ b/modules/multi-gateway/blocks/multi-gateway/block-type.php @@ -0,0 +1,445 @@ +render(); + } + + /** + * @return string + * @throws Repository_Exception + */ + public function get_path_metadata_block() { + /** @var Module $module */ + $module = jet_form_builder()->module( 'multi-gateway' ); + + return $module->get_dir( 'blocks/multi-gateway' ); + } + + public function get_field_template( $path ) { + /** @var Module $module */ + $module = jet_form_builder()->module( 'multi-gateway' ); + + return $module->get_dir( 'blocks/multi-gateway/block-template.php' ); + } + + public function get_css_scheme() { + return array( + 'container' => '.jfb-multi-gateway', + + // Heading (block title/desc at the top) + 'title' => '.jfb-multi-gateway__title', + 'desc' => '.jfb-multi-gateway__desc', + + 'empty' => '.jfb-multi-gateway__empty', + 'list' => '.jfb-multi-gateway__list', + 'item' => '.jfb-multi-gateway__item', + 'item_hover' => '.jfb-multi-gateway__item:hover', + 'item_input' => '.jfb-multi-gateway__item .jet-form-builder__field', + 'item_content' => '.jfb-multi-gateway__content', + 'item_title' => '.jfb-multi-gateway__label', + 'item_desc' => '.jfb-multi-gateway__description', + 'item_title_hover' => '.jfb-multi-gateway__item:hover .jfb-multi-gateway__label', + 'item_desc_hover' => '.jfb-multi-gateway__item:hover .jfb-multi-gateway__description', + ); + } + + public function general_style_unregister() { + return array( 'wrap', 'input', 'label', 'required', 'description' ); + } + + public function jsm_controls() { + + /** + * Wrapper (block container) + */ + $this->controls_manager->start_section( + 'style_controls', + array( + 'id' => 'mg_wrapper', + 'title' => __( 'Wrapper', 'jet-form-builder' ), + ) + ); + + $this->add_margin_padding( + '{{WRAPPER}} ' . $this->css_scheme['container'], + array( + 'padding' => array( + 'id' => 'mg_wrapper_padding', + 'separator' => 'after', + ), + ), + array( 'padding' ) + ); + + $this->controls_manager->add_control( + array( + 'id' => 'mg_wrapper_bg', + 'type' => 'color-picker', + 'label' => __( 'Background', 'jet-form-builder' ), + 'separator' => 'after', + 'css_selector' => array( + '{{WRAPPER}} ' . $this->css_scheme['container'] => 'background-color: {{VALUE}};', + ), + ) + ); + + $this->controls_manager->add_control( + array( + 'id' => 'mg_wrapper_border', + 'type' => 'border', + 'label' => __( 'Border', 'jet-form-builder' ), + 'separator' => 'after', + 'css_selector' => array( + '{{WRAPPER}} ' . $this->css_scheme['container'] => 'border-style:{{STYLE}};border-width:{{WIDTH}};border-radius:{{RADIUS}};border-color:{{COLOR}};', + ), + 'attributes' => array( + 'default' => array( + 'value' => array( + 'borderStyle' => 'solid', + ), + ), + ), + ) + ); + + $this->controls_manager->end_section(); + + /** + * Heading (top title + description) + * NOTE: attributes title/description already exist — we only style them here. + */ + $this->controls_manager->start_section( + 'style_controls', + array( + 'id' => 'mg_heading', + 'title' => __( 'Heading', 'jet-form-builder' ), + ) + ); + + // Title color + $this->controls_manager->add_control( + array( + 'id' => 'mg_heading_title_color', + 'type' => 'color-picker', + 'label' => __( 'Title Color', 'jet-form-builder' ), + 'separator' => 'after', + 'css_selector' => array( + '{{WRAPPER}} ' . $this->css_scheme['title'] => 'color: {{VALUE}};', + ), + ) + ); + + // Title typography + $this->controls_manager->add_control( + array( + 'id' => 'mg_heading_title_typography', + 'type' => 'typography', + 'label' => __( 'Title Typography', 'jet-form-builder' ), + 'separator' => 'after', + 'css_selector' => array( + '{{WRAPPER}} ' . $this->css_scheme['title'] => + 'font-family: {{FAMILY}};' + . ' font-weight: {{WEIGHT}};' + . ' text-transform: {{TRANSFORM}};' + . ' font-style: {{STYLE}};' + . ' text-decoration: {{DECORATION}};' + . ' line-height: {{LINEHEIGHT}}{{LH_UNIT}};' + . ' letter-spacing: {{LETTERSPACING}}{{LS_UNIT}};' + . ' font-size: {{SIZE}}{{S_UNIT}};', + ), + ) + ); + + // Description color + $this->controls_manager->add_control( + array( + 'id' => 'mg_heading_desc_color', + 'type' => 'color-picker', + 'label' => __( 'Description Color', 'jet-form-builder' ), + 'separator' => 'after', + 'css_selector' => array( + '{{WRAPPER}} ' . $this->css_scheme['desc'] => 'color: {{VALUE}};', + ), + ) + ); + + // Description typography + $this->controls_manager->add_control( + array( + 'id' => 'mg_heading_desc_typography', + 'type' => 'typography', + 'label' => __( 'Description Typography', 'jet-form-builder' ), + 'separator' => 'after', + 'css_selector' => array( + '{{WRAPPER}} ' . $this->css_scheme['desc'] => + 'font-family: {{FAMILY}};' + . ' font-weight: {{WEIGHT}};' + . ' text-transform: {{TRANSFORM}};' + . ' font-style: {{STYLE}};' + . ' text-decoration: {{DECORATION}};' + . ' line-height: {{LINEHEIGHT}}{{LH_UNIT}};' + . ' letter-spacing: {{LETTERSPACING}}{{LS_UNIT}};' + . ' font-size: {{SIZE}}{{S_UNIT}};', + ), + ) + ); + + $this->controls_manager->end_section(); + + /** + * List layout (direction / gap) + */ + $this->controls_manager->start_section( + 'style_controls', + array( + 'id' => 'mg_list_layout', + 'title' => __( 'List Layout', 'jet-form-builder' ), + ) + ); + + $this->controls_manager->add_control( + array( + 'id' => 'mg_list_direction', + 'type' => 'choose', + 'label' => __( 'Direction', 'jet-form-builder' ), + 'options' => array( + 'column' => array( + 'label' => __( 'Vertical', 'jet-form-builder' ), + ), + 'row' => array( + 'label' => __( 'Horizontal', 'jet-form-builder' ), + ), + ), + 'default' => 'column', + 'separator' => 'after', + 'css_selector' => array( + '{{WRAPPER}} ' . $this->css_scheme['list'] => 'display:flex;flex-direction: {{VALUE}};', + ), + ) + ); + + $this->controls_manager->add_control( + array( + 'id' => 'mg_list_gap', + 'type' => 'range', + 'label' => __( 'Gap', 'jet-form-builder' ), + 'units' => array( 'px' ), + 'default' => array( + 'value' => 10, + 'unit' => 'px', + ), + 'separator' => 'after', + 'css_selector' => array( + '{{WRAPPER}} ' . $this->css_scheme['list'] => 'gap: {{VALUE}}{{UNIT}};', + ), + ) + ); + + $this->controls_manager->end_section(); + + /** + * Item (background, border, radius, padding + hover bg/border) + */ + $this->controls_manager->start_section( + 'style_controls', + array( + 'id' => 'mg_item', + 'title' => __( 'Item', 'jet-form-builder' ), + ) + ); + + $this->controls_manager->add_control( + array( + 'id' => 'mg_item_bg', + 'type' => 'color-picker', + 'label' => __( 'Background', 'jet-form-builder' ), + 'separator' => 'after', + 'css_selector' => array( + '{{WRAPPER}} ' . $this->css_scheme['item'] => 'background-color: {{VALUE}};', + ), + ) + ); + + $this->controls_manager->add_control( + array( + 'id' => 'mg_item_border', + 'type' => 'border', + 'label' => __( 'Border', 'jet-form-builder' ), + 'separator' => 'after', + 'css_selector' => array( + '{{WRAPPER}} ' . $this->css_scheme['item'] => 'border-style:{{STYLE}};border-width:{{WIDTH}};border-radius:{{RADIUS}};border-color:{{COLOR}};', + ), + 'attributes' => array( + 'default' => array( + 'value' => array( + 'borderStyle' => 'solid', + ), + ), + ), + ) + ); + + $this->add_margin_padding( + '{{WRAPPER}} ' . $this->css_scheme['item'], + array( + 'padding' => array( + 'id' => 'mg_item_padding', + 'separator' => 'after', + ), + ), + array( 'padding' ) + ); + + $this->controls_manager->add_control( + array( + 'id' => 'mg_item_hover_bg', + 'type' => 'color-picker', + 'label' => __( 'Hover Background', 'jet-form-builder' ), + 'separator' => 'after', + 'css_selector' => array( + '{{WRAPPER}} ' . $this->css_scheme['item_hover'] => 'background-color: {{VALUE}};', + ), + ) + ); + + $this->controls_manager->add_control( + array( + 'id' => 'mg_item_hover_border_color', + 'type' => 'color-picker', + 'label' => __( 'Hover Border Color', 'jet-form-builder' ), + 'separator' => 'after', + 'css_selector' => array( + '{{WRAPPER}} ' . $this->css_scheme['item_hover'] => 'border-color: {{VALUE}};', + ), + ) + ); + + $this->controls_manager->end_section(); + + /** + * Label / Description (colors + typography + hover colors) + */ + $this->controls_manager->start_section( + 'style_controls', + array( + 'id' => 'mg_text', + 'title' => __( 'Label & Description', 'jet-form-builder' ), + ) + ); + + // Label color + $this->controls_manager->add_control( + array( + 'id' => 'mg_label_color', + 'type' => 'color-picker', + 'label' => __( 'Label Color', 'jet-form-builder' ), + 'separator' => 'after', + 'css_selector' => array( + '{{WRAPPER}} ' . $this->css_scheme['item_title'] => 'color: {{VALUE}};', + ), + ) + ); + + // Label typography + $this->controls_manager->add_control( + array( + 'id' => 'mg_label_typography', + 'type' => 'typography', + 'label' => __( 'Label Typography', 'jet-form-builder' ), + 'separator' => 'after', + 'css_selector' => array( + '{{WRAPPER}} ' . $this->css_scheme['item_title'] => + 'font-family: {{FAMILY}};' + . ' font-weight: {{WEIGHT}};' + . ' text-transform: {{TRANSFORM}};' + . ' font-style: {{STYLE}};' + . ' text-decoration: {{DECORATION}};' + . ' line-height: {{LINEHEIGHT}}{{LH_UNIT}};' + . ' letter-spacing: {{LETTERSPACING}}{{LS_UNIT}};' + . ' font-size: {{SIZE}}{{S_UNIT}};', + ), + ) + ); + + // Label hover color + $this->controls_manager->add_control( + array( + 'id' => 'mg_label_hover_color', + 'type' => 'color-picker', + 'label' => __( 'Label Hover Color', 'jet-form-builder' ), + 'separator' => 'after', + 'css_selector' => array( + '{{WRAPPER}} ' . $this->css_scheme['item_title_hover'] => 'color: {{VALUE}};', + ), + ) + ); + + // Description color + $this->controls_manager->add_control( + array( + 'id' => 'mg_desc_color', + 'type' => 'color-picker', + 'label' => __( 'Description Color', 'jet-form-builder' ), + 'separator' => 'after', + 'css_selector' => array( + '{{WRAPPER}} ' . $this->css_scheme['item_desc'] => 'color: {{VALUE}};', + ), + ) + ); + + // Description typography + $this->controls_manager->add_control( + array( + 'id' => 'mg_desc_typography', + 'type' => 'typography', + 'label' => __( 'Description Typography', 'jet-form-builder' ), + 'separator' => 'after', + 'css_selector' => array( + '{{WRAPPER}} ' . $this->css_scheme['item_desc'] => + 'font-family: {{FAMILY}};' + . ' font-weight: {{WEIGHT}};' + . ' text-transform: {{TRANSFORM}};' + . ' font-style: {{STYLE}};' + . ' text-decoration: {{DECORATION}};' + . ' line-height: {{LINEHEIGHT}}{{LH_UNIT}};' + . ' letter-spacing: {{LETTERSPACING}}{{LS_UNIT}};' + . ' font-size: {{SIZE}}{{S_UNIT}};', + ), + ) + ); + + // Description hover color + $this->controls_manager->add_control( + array( + 'id' => 'mg_desc_hover_color', + 'type' => 'color-picker', + 'label' => __( 'Description Hover Color', 'jet-form-builder' ), + 'separator' => 'after', + 'css_selector' => array( + '{{WRAPPER}} ' . $this->css_scheme['item_desc_hover'] => 'color: {{VALUE}};', + ), + ) + ); + + $this->controls_manager->end_section(); + } + +} diff --git a/modules/multi-gateway/blocks/multi-gateway/block.json b/modules/multi-gateway/blocks/multi-gateway/block.json new file mode 100644 index 000000000..d21fa71ec --- /dev/null +++ b/modules/multi-gateway/blocks/multi-gateway/block.json @@ -0,0 +1,25 @@ +{ + "apiVersion": 2, + "name": "jet-forms/multi-gateway", + "title": "Multi Gateway", + "description": "Displays available payment gateways selected in form settings.", + "category": "jet-form-builder-fields", + "textdomain": "jet-form-builder", + "keywords": ["jetformbuilder", "gateway", "payment"], + "icon": "", + "supports": { + "html": false, + "multiple": false + }, + "attributes": { + "isPreview": { + "type": "boolean", + "default": false + }, + "title": { "type": "string", "default": "" }, + "description": { "type": "string", "default": "" }, + "gatewaysSettings": { "type": "object", "default": {} } + }, + "viewScript": "jet-fb-multi-gateway", + "style": "jet-fb-multi-gateway" +} \ No newline at end of file diff --git a/modules/multi-gateway/module.php b/modules/multi-gateway/module.php new file mode 100644 index 000000000..185214d38 --- /dev/null +++ b/modules/multi-gateway/module.php @@ -0,0 +1,184 @@ +has_module( 'jet-style' ); + } + + public function on_install() { + } + + public function on_uninstall() { + } + + public function init_hooks() { + add_filter( 'jet-form-builder/blocks/items', array( $this, 'add_blocks_types' ) ); + add_action( 'jet-form-builder/editor-assets/before', array( $this, 'enqueue_admin_assets' ) ); + add_action( 'wp_enqueue_scripts', array( $this, 'register_frontend_scripts' ) ); + add_action( 'jet_plugins/frontend/register_scripts', array( $this, 'register_frontend_scripts' ) ); + add_action( 'enqueue_block_editor_assets', array( $this, 'preview_styles' ) ); + + add_action( + 'jet-form-builder/form-handler/before-send', + array( $this, 'set_gateway_from_submitted_multi_gateway' ), + 0 + ); + } + + public function remove_hooks() { + remove_filter( 'jet-form-builder/blocks/items', array( $this, 'add_blocks_types' ) ); + remove_action( 'jet-form-builder/editor-assets/before', array( $this, 'enqueue_admin_assets' ) ); + remove_action( 'wp_enqueue_scripts', array( $this, 'register_frontend_scripts' ) ); + remove_action( 'jet_plugins/frontend/register_scripts', array( $this, 'register_frontend_scripts' ) ); + remove_action( 'jet-form-builder/form-handler/before-send', array( $this, 'set_gateway_from_submitted_multi_gateway' ), 0 ); + } + + public function add_blocks_types( array $types ): array { + $types[] = new Blocks\Multi_Gateway\Block_Type(); + + return $types; + } + + public function preview_styles() { + + $script_asset = require $this->get_dir( 'assets/build/editor.asset.php' ); + + wp_enqueue_style( + $this->get_handle(), + $this->get_url( 'assets/build/editor.css' ), + array(), + $script_asset['version'] + ); + } + + public function enqueue_admin_assets() { + + $script_asset = require $this->get_dir( 'assets/build/editor.asset.php' ); + + wp_enqueue_script( + $this->get_handle(), + $this->get_url( 'assets/build/editor.js' ), + $script_asset['dependencies'], + $script_asset['version'], + true + ); + + wp_enqueue_style( + $this->get_handle(), + $this->get_url( 'assets/build/editor.css' ), + array(), + $script_asset['version'] + ); + } + + public function register_frontend_scripts() { + $script_asset = require $this->get_dir( 'assets/build/multi-gateway.asset.php' ); + + $deps = $script_asset['dependencies'] ?? array(); + $ver = $script_asset['version'] ?? false; + + $deps[] = BlocksModule::MAIN_SCRIPT_HANDLE; + + wp_register_script( + $this->get_handle(), + $this->get_url( 'assets/build/multi-gateway.js' ), + $deps, + $ver, + true + ); + + wp_register_style( + $this->get_handle(), + $this->get_url( 'assets/build/multi-gateway.css' ), + array(), + $ver + ); + + // ✅ временно, чтобы проверить что реально грузится + //wp_enqueue_style( $this->get_handle() ); + } + + /** + * Set active gateway for current submission from Multi-Gateway field value. + * + * @param Form_Handler $handler + */ + public function set_gateway_from_submitted_multi_gateway( Form_Handler $handler ) { + + $selected = jet_fb_context()->get_request( 'multi_gateway' ); + + if ( ! is_string( $selected ) || '' === $selected ) { + return; + } + + $selected = sanitize_key( $selected ); + + $handler_form_id = (int) $handler->get_form_id(); + + + + // ADDED: normalize to parent for meta read (_jf_gateways stored on parent form post) + $real_form_id = $handler_form_id; + + $parent = wp_is_post_revision( $real_form_id ); + if ( $parent ) { + $real_form_id = (int) $parent; + } + + $parent = wp_is_post_autosave( $real_form_id ); + if ( $parent ) { + $real_form_id = (int) $parent; + } + + $parent = wp_get_post_parent_id( $real_form_id ); + if ( $parent ) { + $real_form_id = (int) $parent; + } + + + + $gateways_module = \JFB_Modules\Gateways\Module::instance(); + + $gateways = $gateways_module->get_form_gateways_by_id( $real_form_id ); + + + + $gateways['gateway'] = $selected; + + // IMPORTANT: set module form_id to handler form id (revision), + // so Default_With_Gateway_Executor won't overwrite our runtime selection. + $gateways_module->set_form_id( $handler_form_id ); + $gateways_module->save_gateways_form_data( $gateways ); + } +} diff --git a/modules/multi-gateway/package.json b/modules/multi-gateway/package.json new file mode 100644 index 000000000..1adda10fe --- /dev/null +++ b/modules/multi-gateway/package.json @@ -0,0 +1,11 @@ +{ + "name": "jet-form-builder-multi-gateway", + "description": "Multi gateway module for JetFormBuilder Plugin", + "version": "1.0.0", + "license": "MIT", + "private": true, + "scripts": { + "build": "npx webpack build --mode production", + "dev": "npx webpack build --mode development -w" + } +} \ No newline at end of file diff --git a/modules/multi-gateway/webpack.config.js b/modules/multi-gateway/webpack.config.js new file mode 100644 index 000000000..0075eb068 --- /dev/null +++ b/modules/multi-gateway/webpack.config.js @@ -0,0 +1,46 @@ +const WPExtractorPlugin = require( '@wordpress/dependency-extraction-webpack-plugin' ); +const MiniCssExtractPlugin = require( 'mini-css-extract-plugin' ); +const path = require( 'path' ); + +const devMode = !process.argv.join( ':' ).includes( '--mode:production' ); + +module.exports = { + context: path.resolve( __dirname, 'assets/src' ), + entry: { + editor: './editor/main.js', + 'multi-gateway': './frontend/blocks/multi-gateway/main.js', + }, + output: { + path: path.resolve( __dirname, 'assets/build' ), + devtoolNamespace: 'jfb-multi-gateway', + }, + devtool: devMode ? 'inline-cheap-module-source-map' : false, + resolve: { + extensions: [ '.js', '.jsx' ], + alias: { + '@root': path.resolve( __dirname ), + }, + }, + module: { + rules: [ + { + test: /\.js(x)?$/, + use: [ 'babel-loader', '@wyw-in-js/webpack-loader' ], + exclude: /node_modules/, + }, + { + test: /\.(sa|sc|c)ss$/i, + use: [ + MiniCssExtractPlugin.loader, + 'css-loader', + 'postcss-loader', + 'sass-loader', + ], + }, + ], + }, + plugins: [ + new WPExtractorPlugin(), + new MiniCssExtractPlugin(), + ], +}; diff --git a/modules/option-field/blocks/checkbox/block-type.php b/modules/option-field/blocks/checkbox/block-type.php index 47bff27d4..d14243481 100644 --- a/modules/option-field/blocks/checkbox/block-type.php +++ b/modules/option-field/blocks/checkbox/block-type.php @@ -36,7 +36,7 @@ public function get_css_scheme() { 'item' => '.jet-form-builder__field-wrap.checkboxes-wrap', 'option-label' => '.jet-form-builder__field-wrap label', 'checkbox-editor' => '.jet-form-builder__field-wrap .components-checkbox-control__input-container', - 'checkbox-front' => '.jet-form-builder__field-wrap span::before', + 'checkbox-front' => '.jet-form-builder__field-wrap .jet-form-builder__field-label.for-checkbox>span::before', 'wrapper' => '.jet-form-builder__fields-group', ); } @@ -188,7 +188,7 @@ public function jsm_controls() { array( 'id' => 'item_normal_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( '{{WRAPPER}} ' . $this->css_scheme['item'] . ' > .components-base-control__field label' => 'background-color: {{VALUE}}', '{{WRAPPER}} ' . $this->css_scheme['option-label'] => 'background-color: {{VALUE}}', @@ -246,7 +246,7 @@ public function jsm_controls() { ), ), 'css_selector' => array( - '{{WRAPPER}} ' . $this->css_scheme['checkbox-front'] => 'font-size: {{VALUE}}{{UNIT}};', + '{{WRAPPER}} ' . $this->css_scheme['checkbox-front'] => 'font-size: {{VALUE}}{{UNIT}}; width: {{VALUE}}{{UNIT}}; height: {{VALUE}}{{UNIT}};', '{{WRAPPER}} ' . $this->css_scheme['checkbox-editor'] => 'height: {{VALUE}}{{UNIT}}; width: {{VALUE}}{{UNIT}};', '{{WRAPPER}} ' . $this->css_scheme['checkbox-editor'] . ' input' => 'height: {{VALUE}}{{UNIT}}; width: {{VALUE}}{{UNIT}}; min-width: {{VALUE}}{{UNIT}};', ), @@ -285,7 +285,7 @@ public function jsm_controls() { array( 'id' => 'checkbox_normal_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'attributes' => array( 'default' => array( 'value' => '#FFFFFF', @@ -325,7 +325,7 @@ public function jsm_controls() { array( 'id' => 'checkbox_checked_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'attributes' => array( 'default' => array( 'value' => '#398ffc', diff --git a/modules/option-field/blocks/radio/block-type.php b/modules/option-field/blocks/radio/block-type.php index 6abbb7ec0..b296932c1 100644 --- a/modules/option-field/blocks/radio/block-type.php +++ b/modules/option-field/blocks/radio/block-type.php @@ -202,7 +202,7 @@ public function jsm_controls() { array( 'id' => 'item_normal_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( // editor @@ -295,7 +295,7 @@ public function jsm_controls() { 'separator' => 'after', 'css_selector' => array( '{{WRAPPER}} ' . $this->css_scheme['radio'] => 'border-style:{{STYLE}};border-width:{{WIDTH}};border-radius:{{RADIUS}};border-color:{{COLOR}};', - '{{WRAPPER}} ' . $this->css_scheme['front-label'] . ' > span::before' => 'border-style:{{STYLE}};border-width:{{WIDTH}};border-radius:{{RADIUS}};border-color:{{COLOR}};', + '{{WRAPPER}} ' . $this->css_scheme['front-label'] . '.jet-form-builder__field-label > span::before' => 'border-style:{{STYLE}};border-width:{{WIDTH}};border-radius:{{RADIUS}};border-color:{{COLOR}};', ), ) ); @@ -304,7 +304,7 @@ public function jsm_controls() { array( 'id' => 'radio_normal_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'attributes' => array( 'default' => array( 'value' => '#FFFFFF', @@ -314,7 +314,7 @@ public function jsm_controls() { // editor '{{WRAPPER}} ' . $this->css_scheme['radio'] => 'background-color: {{VALUE}}', // front - '{{WRAPPER}} ' . $this->css_scheme['front-label'] . ' > span::before' => 'background-color: {{VALUE}}', + '{{WRAPPER}} ' . $this->css_scheme['front-label'] . '.jet-form-builder__field-label > span::before' => 'background-color: {{VALUE}}', ), ) ); @@ -337,7 +337,7 @@ public function jsm_controls() { 'separator' => 'after', 'css_selector' => array( '{{WRAPPER}} ' . $this->css_scheme['radio'] . ':checked' => 'border-style:{{STYLE}};border-width:{{WIDTH}};border-radius:{{RADIUS}};border-color:{{COLOR}};', - '{{WRAPPER}} ' . $this->css_scheme['front-label'] . ' :checked + span::before' => 'border-style:{{STYLE}};border-width:{{WIDTH}};border-radius:{{RADIUS}};border-color:{{COLOR}};', + '{{WRAPPER}} ' . $this->css_scheme['front-label'] . '.jet-form-builder__field-label :checked + span::before' => 'border-style:{{STYLE}};border-width:{{WIDTH}};border-radius:{{RADIUS}};border-color:{{COLOR}};', ), ) ); @@ -346,7 +346,7 @@ public function jsm_controls() { array( 'id' => 'radio_checked_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'attributes' => array( 'default' => array( 'value' => '#398ffc', @@ -356,7 +356,7 @@ public function jsm_controls() { // editor '{{WRAPPER}} ' . $this->css_scheme['radio'] . ':checked' => 'background-color: {{VALUE}}', // front - '{{WRAPPER}} ' . $this->css_scheme['front-label'] . ' :checked + span::before' => 'background-color: {{VALUE}}', + '{{WRAPPER}} ' . $this->css_scheme['front-label'] . '.jet-form-builder__field-label :checked + span::before' => 'background-color: {{VALUE}}', ), ) ); diff --git a/modules/option-field/blocks/select/block-type.php b/modules/option-field/blocks/select/block-type.php index 9e47279f8..e46f0d2db 100644 --- a/modules/option-field/blocks/select/block-type.php +++ b/modules/option-field/blocks/select/block-type.php @@ -69,7 +69,7 @@ public function jsm_controls() { ), ), 'css_selector' => array( - '{{WRAPPER}} ' . $this->css_scheme['select-wrapper'] => 'width: {{VALUE}}%; max-width: {{VALUE}}%', + '{{WRAPPER}} ' . $this->css_scheme['select-wrapper'] => 'width: {{VALUE}}{{UNIT}}; max-width: {{VALUE}}{{UNIT}};', ), 'attributes' => array( 'default' => array( @@ -135,7 +135,7 @@ public function jsm_controls() { array( 'id' => 'item_normal_background_color', 'type' => 'color-picker', - 'label' => __( 'Background Color', 'jet-form-builder' ), + 'label' => __( 'Background', 'jet-form-builder' ), 'css_selector' => array( '{{WRAPPER}} ' . $this->css_scheme['select'] => 'background-color: {{VALUE}}', ), diff --git a/readme.txt b/readme.txt index bb48356eb..aaebf1174 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: blocks, forms, form builder, contact form, gutenberg, gutenberg forms, mul Requires at least: 6.1 Tested up to: 6.7.1 Requires PHP: 7.0 -Stable tag: 3.5.6 +Stable tag: 3.5.6.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -275,6 +275,9 @@ You can report security bugs through the Patchstack Vulnerability Disclosure Pro == Changelog == +**3.5.6.1** +- FIX: Compatibility with jetBooking 4.0.0 + **3.5.6** - ADD: Bricks builder ajax popup compatibility - ADD: Added aria-label to hidden input in advanced choices block for better accessibility