From fa72428ee71b8d8d123eb15f683811590d50af5a Mon Sep 17 00:00:00 2001 From: Alex Cicovic <23142906+acicovic@users.noreply.github.com> Date: Tue, 14 Jan 2025 18:31:37 +0200 Subject: [PATCH] PCH: Remove beta messaging --- build/content-helper/editor-sidebar-rtl.css | 2 +- build/content-helper/editor-sidebar.asset.php | 2 +- build/content-helper/editor-sidebar.css | 2 +- build/content-helper/editor-sidebar.js | 28 +++++++++---------- .../excerpt-suggestions/component-panel.tsx | 1 - .../excerpt-suggestions.scss | 5 ---- .../smart-linking/smart-linking.tsx | 2 +- .../editor-sidebar/tabs/sidebar-tools-tab.tsx | 6 ++-- 8 files changed, 21 insertions(+), 27 deletions(-) diff --git a/build/content-helper/editor-sidebar-rtl.css b/build/content-helper/editor-sidebar-rtl.css index 79ce5a621..1a3e2fc0c 100644 --- a/build/content-helper/editor-sidebar-rtl.css +++ b/build/content-helper/editor-sidebar-rtl.css @@ -1,4 +1,4 @@ -#wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.editor-post-excerpt,.settings_page_parsely,.wp-parsely-block-overlay,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover,.wp-parsely-preview-editor,.wp-parsely-smart-linking-close-dialog,.wp-parsely-smart-linking-review-modal,.wp-parsely-suggested-title-modal{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green-components:107,42%,46%;--parsely-green:hsl(var(--parsely-green-components));--parsely-green-10:#c7ecb1;--parsely-green-65:#2a691b;--gray-200:#f7f8f9;--gray-300:#edeeef;--gray-400:#d7dbdf;--gray-500:#959da5;--gray-600:#586069;--gray-700:#444d56;--gray-900:#24292e;--blue-500:#44a8e5;--blue-550:#2596db;--green-500:#7bc01b;--green-900:#3d6307;--ref-direct:205,13%,52%;--ref-internal:161,91%,41%;--ref-social:210,72%,41%;--ref-search:42,100%,50%;--ref-other:3,76%,58%;--base-text:var(--gray-900);--base-text-2:var(--gray-600);--base-3:var(--gray-400);--border:var(--gray-400);--data:var(--green-500);--control:var(--blue-500);--grid-unit-5:0.25rem;--grid-unit-10:0.5rem;--grid-unit-15:0.75rem;--grid-unit-20:1rem;--grid-unit-25:1.25rem;--grid-unit-30:1.5rem;--grid-unit-40:2rem;--font-size--smaller:0.688rem;--font-size--small:0.75rem;--font-size--medium:0.875rem;--font-size--large:1rem;--font-size--extra-large:1.2rem;--black:#000;--sidebar-black:#1e1e1e;--sidebar-white:#f0f0f0}.editor-post-excerpt__loading_animation{right:.5625rem;position:absolute;top:1.8125rem}.editor-post-excerpt__textarea{margin-bottom:var(--grid-unit-10)}.editor-post-excerpt .excerpt-suggestions-text{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:.625rem;padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-excerpt-generator.is-doc-set-panel{margin-top:1.25rem}.wp-parsely-excerpt-generator .excerpt-suggestions-settings{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20);padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-excerpt-generator .excerpt-suggestions-settings>div{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-10)}.wp-parsely-excerpt-generator .wp-parsely-excerpt-generator-header{align-items:center;display:flex;justify-content:flex-start}.wp-parsely-excerpt-generator .wp-parsely-excerpt-generator-header .wp-parsely-excerpt-generator-header-label{display:inline-block;font-size:.6875rem;font-weight:600;line-height:1.4;margin-right:.3125rem;padding:0;text-transform:uppercase}.wp-parsely-excerpt-generator .wp-parsely-excerpt-generator-header .wp-parsely-excerpt-generator-header-label span.beta-label{color:var(--Gutenberg-Gray-700,#757575);padding-right:.375rem}.wp-parsely-excerpt-generator .excerpt-suggestions-generate{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;margin:var(--grid-unit-10) 0}.wp-parsely-excerpt-generator .excerpt-suggestions-generate .components-button{align-items:center;align-self:stretch;border-radius:2px;display:flex;height:2.5rem;justify-content:center;padding:var(--grid-unit-10) var(--grid-unit-15)}.wp-parsely-excerpt-generator .wp-parsely-excerpt-suggestions-review-controls{display:flex;gap:var(--grid-unit-10)}.wp-parsely-excerpt-generator .wp-parsely-excerpt-suggestions-review-controls button{flex-grow:1;height:2.5rem;justify-content:center;margin-bottom:var(--grid-unit-10);margin-top:var(--grid-unit-10);padding:var(--grid-unit-10) var(--grid-unit-15)}.wp-parsely-excerpt-generator .components-notice{margin:var(--grid-unit-20) 0 var(--grid-unit-15) 0}.wp-parsely-excerpt-generator .components-notice .components-notice__content{margin:0}.wp-parsely-excerpt-generator .components-notice .components-notice__content .content-helper-error-message{margin-top:0!important}.wp-parsely-excerpt-generator .components-notice .components-notice__content .content-helper-error-message p:last-child{margin-bottom:0!important} +#wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.editor-post-excerpt,.settings_page_parsely,.wp-parsely-block-overlay,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover,.wp-parsely-preview-editor,.wp-parsely-smart-linking-close-dialog,.wp-parsely-smart-linking-review-modal,.wp-parsely-suggested-title-modal{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green-components:107,42%,46%;--parsely-green:hsl(var(--parsely-green-components));--parsely-green-10:#c7ecb1;--parsely-green-65:#2a691b;--gray-200:#f7f8f9;--gray-300:#edeeef;--gray-400:#d7dbdf;--gray-500:#959da5;--gray-600:#586069;--gray-700:#444d56;--gray-900:#24292e;--blue-500:#44a8e5;--blue-550:#2596db;--green-500:#7bc01b;--green-900:#3d6307;--ref-direct:205,13%,52%;--ref-internal:161,91%,41%;--ref-social:210,72%,41%;--ref-search:42,100%,50%;--ref-other:3,76%,58%;--base-text:var(--gray-900);--base-text-2:var(--gray-600);--base-3:var(--gray-400);--border:var(--gray-400);--data:var(--green-500);--control:var(--blue-500);--grid-unit-5:0.25rem;--grid-unit-10:0.5rem;--grid-unit-15:0.75rem;--grid-unit-20:1rem;--grid-unit-25:1.25rem;--grid-unit-30:1.5rem;--grid-unit-40:2rem;--font-size--smaller:0.688rem;--font-size--small:0.75rem;--font-size--medium:0.875rem;--font-size--large:1rem;--font-size--extra-large:1.2rem;--black:#000;--sidebar-black:#1e1e1e;--sidebar-white:#f0f0f0}.editor-post-excerpt__loading_animation{right:.5625rem;position:absolute;top:1.8125rem}.editor-post-excerpt__textarea{margin-bottom:var(--grid-unit-10)}.editor-post-excerpt .excerpt-suggestions-text{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:.625rem;padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-excerpt-generator.is-doc-set-panel{margin-top:1.25rem}.wp-parsely-excerpt-generator .excerpt-suggestions-settings{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20);padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-excerpt-generator .excerpt-suggestions-settings>div{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-10)}.wp-parsely-excerpt-generator .wp-parsely-excerpt-generator-header{align-items:center;display:flex;justify-content:flex-start}.wp-parsely-excerpt-generator .wp-parsely-excerpt-generator-header .wp-parsely-excerpt-generator-header-label{display:inline-block;font-size:.6875rem;font-weight:600;line-height:1.4;margin-right:.3125rem;padding:0;text-transform:uppercase}.wp-parsely-excerpt-generator .excerpt-suggestions-generate{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;margin:var(--grid-unit-10) 0}.wp-parsely-excerpt-generator .excerpt-suggestions-generate .components-button{align-items:center;align-self:stretch;border-radius:2px;display:flex;height:2.5rem;justify-content:center;padding:var(--grid-unit-10) var(--grid-unit-15)}.wp-parsely-excerpt-generator .wp-parsely-excerpt-suggestions-review-controls{display:flex;gap:var(--grid-unit-10)}.wp-parsely-excerpt-generator .wp-parsely-excerpt-suggestions-review-controls button{flex-grow:1;height:2.5rem;justify-content:center;margin-bottom:var(--grid-unit-10);margin-top:var(--grid-unit-10);padding:var(--grid-unit-10) var(--grid-unit-15)}.wp-parsely-excerpt-generator .components-notice{margin:var(--grid-unit-20) 0 var(--grid-unit-15) 0}.wp-parsely-excerpt-generator .components-notice .components-notice__content{margin:0}.wp-parsely-excerpt-generator .components-notice .components-notice__content .content-helper-error-message{margin-top:0!important}.wp-parsely-excerpt-generator .components-notice .components-notice__content .content-helper-error-message p:last-child{margin-bottom:0!important} #wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.editor-post-excerpt,.settings_page_parsely,.wp-parsely-block-overlay,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover,.wp-parsely-preview-editor,.wp-parsely-smart-linking-close-dialog,.wp-parsely-smart-linking-review-modal,.wp-parsely-suggested-title-modal{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green-components:107,42%,46%;--parsely-green:hsl(var(--parsely-green-components));--parsely-green-10:#c7ecb1;--parsely-green-65:#2a691b;--gray-200:#f7f8f9;--gray-300:#edeeef;--gray-400:#d7dbdf;--gray-500:#959da5;--gray-600:#586069;--gray-700:#444d56;--gray-900:#24292e;--blue-500:#44a8e5;--blue-550:#2596db;--green-500:#7bc01b;--green-900:#3d6307;--ref-direct:205,13%,52%;--ref-internal:161,91%,41%;--ref-social:210,72%,41%;--ref-search:42,100%,50%;--ref-other:3,76%,58%;--base-text:var(--gray-900);--base-text-2:var(--gray-600);--base-3:var(--gray-400);--border:var(--gray-400);--data:var(--green-500);--control:var(--blue-500);--grid-unit-5:0.25rem;--grid-unit-10:0.5rem;--grid-unit-15:0.75rem;--grid-unit-20:1rem;--grid-unit-25:1.25rem;--grid-unit-30:1.5rem;--grid-unit-40:2rem;--font-size--smaller:0.688rem;--font-size--small:0.75rem;--font-size--medium:0.875rem;--font-size--large:1rem;--font-size--extra-large:1.2rem;--black:#000;--sidebar-black:#1e1e1e;--sidebar-white:#f0f0f0}.wp-parsely-block-overlay{align-items:center;background-color:hsla(0,0%,100%,.85);box-sizing:border-box;display:flex;font-size:1.125rem;height:100%;justify-content:center;right:0;position:absolute;top:0;width:100%}.wp-parsely-block-overlay .wp-parsely-block-overlay-label{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:var(--grid-unit-10);justify-content:center;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--grid-unit-10)}.wp-parsely-block-overlay .wp-parsely-block-overlay-cancel{font-size:1.125rem;padding:0;pointer-events:all;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:10}.wp-parsely-block-overlay .wp-parsely-block-overlay-cancel:focus{box-shadow:none;outline:none}.wp-parsely-block-overlay svg{height:1.5625rem;width:1.5625rem}.wp-parsely-block-overlay.full-content-overlay{font-size:1.25rem;z-index:999}.wp-parsely-block-overlay.full-content-overlay span{margin-top:.9375rem}.wp-parsely-block-overlay.full-content-overlay svg{height:3.125rem;width:3.125rem}.wp-parsely-panel .components-panel__icon{height:1.5rem;margin:0 0 0 var(--grid-unit-15);order:-1;width:1.5rem}.wp-parsely-smart-linking .components-panel__row{flex-direction:column;margin-bottom:0}.wp-parsely-smart-linking .components-base-control,.wp-parsely-smart-linking .components-base-control .components-panel__row,.wp-parsely-smart-linking .components-base-control:last-child{margin-bottom:0}.wp-parsely-smart-linking .smart-linking-text{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:.625rem;padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-smart-linking .parsely-panel-settings{width:100%}.wp-parsely-smart-linking .parsely-panel-settings-body{display:flex;flex-direction:column;gap:.625rem;padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-block-select{align-self:stretch;display:flex;flex-direction:column;gap:1.5rem;padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-block-select .components-toggle-group-control-option-base{padding:.625rem 0}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-block-select .components-toggle-group-control{height:40px;overflow:hidden}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-block-select .components-toggle-group-control button{background:transparent;outline:2px solid transparent;outline-offset:-3px}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-block-select .components-toggle-group-control button[data-active-item]{background:var(--sidebar-black);border-radius:3px;box-shadow:0 -3px 0 0 #fff,0 3px 0 0 #fff;transition:background 0s .5s,border-radius 0s .5s,box-shadow 0s .5s,color .2s .1s}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-block-select .components-toggle-group-control button:not([data-active-item]){transition:color .2s .1s}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-settings{align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20)}.wp-parsely-smart-linking .smart-linking-generate,.wp-parsely-smart-linking .smart-linking-manage{align-self:stretch;display:flex;flex-direction:column;padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-smart-linking .smart-linking-generate button,.wp-parsely-smart-linking .smart-linking-manage button{align-items:center;align-self:stretch;display:flex;justify-content:center;width:100%}.wp-parsely-smart-linking .wp-parsely-smart-linking-suggested-links{margin:0}.wp-parsely-smart-linking .wp-parsely-smart-linking-hint{margin-top:calc(var(--grid-unit-10)*-1)}.wp-parsely-smart-linking-review-modal{align-items:flex-start;display:flex;flex-direction:column;width:47.875rem}.wp-parsely-smart-linking-review-modal .smart-linking-modal-body{align-self:stretch;display:flex;flex-direction:row;gap:var(--grid-unit-30)}.wp-parsely-smart-linking-review-modal .wp-parsely-link-suggestion-link-details{height:auto;margin-bottom:var(--grid-unit-20);text-align:right}.wp-parsely-smart-linking-review-modal .wp-parsely-link-suggestion-link-details .components-menu-item__item{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-parsely-smart-linking-review-modal .linking-post-details{align-items:center;display:flex;justify-content:space-between;width:100%}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-image{margin-left:.625rem;max-width:3.125rem}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-image .icon-container{align-items:center;display:flex;height:3.125rem;justify-content:center;width:3.125rem}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-title{color:var(--sidebar-black)}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-title a{text-decoration:none}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-info{display:flex;flex-direction:column;flex-grow:1}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-info .linking-post-meta{color:var(--Gutenberg-Gray-700,#757575);font-size:.9em}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-type{color:var(--Gutenberg-Gray-700,#757575);margin-right:.625rem;white-space:nowrap}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20);min-width:13.75rem;padding:.1875rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs{margin-bottom:var(--grid-unit-20)}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs button{align-items:center;display:flex;flex:1 0 0;flex-direction:column;height:var(--grid-unit-40)}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs-item{color:var(--sidebar-black);font-size:.6875rem;font-style:normal;font-weight:600;line-height:var(--grid-unit-20);text-transform:uppercase}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs-item:focus-visible:before{box-shadow:none;outline:none}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tab-content{max-height:23.125rem;overflow-y:auto}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-tip{align-items:center;display:flex;font-size:var(--font-size--small);margin-bottom:.3125rem;margin-top:-.5625rem;padding:.3125rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-tip .review-sidebar-tip svg{flex-shrink:0;height:1.5rem;margin-right:auto;width:1.5rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-header{align-items:center;align-self:stretch;color:var(--sidebar-black);display:flex;font-size:.6875rem;font-style:normal;font-weight:600;gap:.375rem;line-height:var(--grid-unit-20);margin-bottom:var(--grid-unit-15);text-transform:uppercase}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-header>span{color:var(--Gutenberg-Gray-700,#757575)}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button{align-items:center;display:flex;justify-content:space-between;width:13.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button:focus{box-shadow:none;outline:none}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button .smart-linking-menu-label{align-items:center;color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));display:flex;padding-right:var(--grid-unit-10);white-space:nowrap}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button.is-selected{background-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));color:#fff}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button.is-selected .smart-linking-menu-label{color:#fff}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button .components-menu-item__item{padding-left:0;width:100%}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button .smart-linking-menu-item{display:inline;flex-grow:1;overflow:hidden;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion{align-items:flex-start;align-self:stretch;display:flex;flex:1;flex-direction:column;gap:1rem;max-width:28.25rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs{font-size:.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-parent-separator{margin:0 var(--grid-unit-5)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-parent-block{color:var(--Gutenberg-Gray-700,#757575)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-current-block{color:var(--sidebar-black)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-current-block .breadcrumbs-current-block-name{margin-right:var(--grid-unit-10)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestion-post-title{font-size:var(--font-size--large);font-weight:500;line-height:1.5rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .components-divider{border-color:#ccc;height:1px;width:28.25rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .three-dots{color:#ccc;font-size:1rem;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .three-dots.is-top{margin-bottom:.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .three-dots.is-bottom{margin-top:.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls{align-items:center;align-self:stretch;display:flex;flex-shrink:0;justify-content:space-between;margin:0 var(--grid-unit-20);-webkit-user-select:none;-moz-user-select:none;user-select:none;width:28.25rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .reviews-controls-middle{align-items:center;display:flex;flex:1 0 0;gap:var(--grid-unit-20);justify-content:center}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .wp-parsely-review-suggestion-next,.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .wp-parsely-review-suggestion-previous{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .wp-parsely-review-suggestion-reject{background:var(--Gutenberg-White,#fff);border-radius:2px;box-shadow:inset 0 0 0 1px var(--Gutenberg-Alert-Red,#cc1818);color:var(--Gutenberg-Alert-Red,#cc1818)}.wp-parsely-smart-linking-close-dialog{align-items:flex-start;display:flex;flex-direction:column;width:24rem}.wp-parsely-smart-linking-close-dialog .smart-linking-close-dialog-actions{align-items:center;align-self:stretch;display:flex;gap:var(--grid-unit-15);justify-content:flex-end;padding-top:var(--grid-unit-30)}.wp-parsely-preview-editor .editor-styles-wrapper{background:var(--Gutenberg-White,#fff);font-size:var(--font-size--medium);padding-bottom:0}.wp-parsely-preview-editor p[role=document]{margin:0}.wp-parsely-preview-editor .smart-linking-highlight{background:hsla(var(--parsely-green-components),.5);border-radius:2px;color:var(--sidebar-black)!important;mix-blend-mode:multiply;text-decoration-line:underline} #wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.editor-post-excerpt,.settings_page_parsely,.wp-parsely-block-overlay,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover,.wp-parsely-preview-editor,.wp-parsely-smart-linking-close-dialog,.wp-parsely-smart-linking-review-modal,.wp-parsely-suggested-title-modal{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green-components:107,42%,46%;--parsely-green:hsl(var(--parsely-green-components));--parsely-green-10:#c7ecb1;--parsely-green-65:#2a691b;--gray-200:#f7f8f9;--gray-300:#edeeef;--gray-400:#d7dbdf;--gray-500:#959da5;--gray-600:#586069;--gray-700:#444d56;--gray-900:#24292e;--blue-500:#44a8e5;--blue-550:#2596db;--green-500:#7bc01b;--green-900:#3d6307;--ref-direct:205,13%,52%;--ref-internal:161,91%,41%;--ref-social:210,72%,41%;--ref-search:42,100%,50%;--ref-other:3,76%,58%;--base-text:var(--gray-900);--base-text-2:var(--gray-600);--base-3:var(--gray-400);--border:var(--gray-400);--data:var(--green-500);--control:var(--blue-500);--grid-unit-5:0.25rem;--grid-unit-10:0.5rem;--grid-unit-15:0.75rem;--grid-unit-20:1rem;--grid-unit-25:1.25rem;--grid-unit-30:1.5rem;--grid-unit-40:2rem;--font-size--smaller:0.688rem;--font-size--small:0.75rem;--font-size--medium:0.875rem;--font-size--large:1rem;--font-size--extra-large:1.2rem;--black:#000;--sidebar-black:#1e1e1e;--sidebar-white:#f0f0f0}.wp-parsely-content-helper .wp-parsely-performance-panel{border-top:1px solid #ddd;margin-top:-1px;padding:16px}.wp-parsely-content-helper .wp-parsely-performance-panel .content-helper-error-message{margin:0!important}.wp-parsely-content-helper .wp-parsely-performance-panel .components-button.wp-parsely-view-post{align-items:center;display:flex;justify-content:center;width:100%}.wp-parsely-content-helper .wp-parsely-performance-panel .panel-body{width:100%}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:.5rem;padding:.375rem 0 1rem}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel .panel-header{align-items:center;display:flex;gap:.375rem;height:1rem;margin-bottom:0;width:100%}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel .panel-header.level-2{margin-bottom:.9375rem}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel .panel-header.level-2 h2{margin-bottom:0}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel .panel-header.level-3 h3{font-size:var(--font-size--smaller);font-style:normal;font-weight:600;line-height:1rem;margin-bottom:0;text-transform:uppercase}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel .panel-subtitle{align-items:center;align-self:stretch;color:var(--Gutenberg-Gray-700,#757575);display:flex;flex:1 0 0;font-size:var(--font-size--smaller);font-style:normal;font-weight:600;gap:.375rem;height:1rem;line-height:1rem;text-transform:uppercase}.wp-parsely-content-helper .wp-parsely-performance-panel .components-heading{display:block;font-weight:500;line-height:normal;margin:0}.wp-parsely-content-helper .wp-parsely-performance-panel .components-dropdown-menu{line-height:0}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points{align-content:flex-start;align-items:flex-start;align-self:stretch;display:flex;flex-wrap:wrap;gap:1rem var(--grid-unit-20)}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point{align-items:center;background:var(--sidebar-white);border-radius:.25rem;display:flex;flex:1 0 0;flex-direction:column;gap:var(--grid-unit-5);justify-content:center;min-width:100px;padding:var(--grid-unit-20) var(--grid-unit-10)}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point svg{align-items:flex-start;border-radius:.125rem;display:flex}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point .data-point-title{align-self:stretch;color:var(--sidebar-black);font-size:.75rem;font-style:normal;font-weight:400;line-height:1rem;text-align:center}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point .data-point-value{align-self:stretch;color:var(--sidebar-black);font-size:1.25rem;font-style:normal;font-weight:590;line-height:1.75rem;text-align:center}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point .data-point-value.is-small{font-size:var(--font-size--medium)}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar{align-items:flex-start;align-self:stretch;display:flex;height:1rem;margin:1rem 0;position:relative}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill{--radius:2px;align-self:stretch;position:relative;transition:filter .1s ease,transform .1s ease}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill:hover{filter:opacity(1)!important;transform:scaleX(1) scaleY(1)!important}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill:first-child{border-radius:0 var(--radius) var(--radius) 0}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill:last-child{border-radius:var(--radius) 0 0 var(--radius)}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill.direct{background-color:hsl(var(--ref-direct))}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill.internal{background-color:hsl(var(--ref-internal))}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill.search{background-color:hsl(var(--ref-search))}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill.social{background-color:hsl(var(--ref-social))}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill.other{background-color:hsl(var(--ref-other))}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar:hover .bar-fill{filter:opacity(.5);transform:scaleX(1) scaleY(.7)}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20)}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label{align-items:center;align-self:stretch;display:flex;gap:.5rem;justify-content:center}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color{align-items:center;border-radius:.09375rem;display:flex;flex-direction:column;gap:.625rem;height:.625rem;justify-content:center;width:.1875rem}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color.direct{background-color:hsl(var(--ref-direct))}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color.internal{background-color:hsl(var(--ref-internal))}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color.search{background-color:hsl(var(--ref-search))}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color.social{background-color:hsl(var(--ref-social))}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color.other{background-color:hsl(var(--ref-other))}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;color:var(--sidebar-black);flex:1 0 0;font-feature-settings:"ss06" on;font-size:var(--font-size--small);font-style:normal;font-weight:400;line-height:1rem;overflow:hidden;text-overflow:ellipsis}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-value{color:var(--sidebar-black);font-size:var(--font-size--small);font-style:normal;font-weight:590;line-height:1rem;text-align:left}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20);margin:1rem 0}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row{align-items:center;align-self:stretch;display:flex;gap:var(--grid-unit-10);justify-content:space-between}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;color:var(--sidebar-black);flex:1;font-feature-settings:"ss06" on;font-size:var(--font-size--small);font-style:normal;font-weight:400;line-height:1rem;overflow:hidden;text-overflow:ellipsis}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-bar{display:flex;flex:1;flex-direction:column;gap:.625rem;justify-content:center;max-width:6.25rem}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-bar .percentage-bar{--radius:1.5px;background:var(--gray-400);border-radius:var(--radius);display:flex;height:.1875rem;margin:0;overflow:hidden}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-bar .percentage-bar:after{background:var(--blueberry,#3858e9);border-radius:var(--radius);content:"";height:100%;width:var(--bar-fill)}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-value{color:var(--sidebar-black);flex-shrink:0;font-size:var(--font-size--small);font-style:normal;font-weight:590;line-height:1rem;min-width:3.125rem;text-align:left} #wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.editor-post-excerpt,.settings_page_parsely,.wp-parsely-block-overlay,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover,.wp-parsely-preview-editor,.wp-parsely-smart-linking-close-dialog,.wp-parsely-smart-linking-review-modal,.wp-parsely-suggested-title-modal{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green-components:107,42%,46%;--parsely-green:hsl(var(--parsely-green-components));--parsely-green-10:#c7ecb1;--parsely-green-65:#2a691b;--gray-200:#f7f8f9;--gray-300:#edeeef;--gray-400:#d7dbdf;--gray-500:#959da5;--gray-600:#586069;--gray-700:#444d56;--gray-900:#24292e;--blue-500:#44a8e5;--blue-550:#2596db;--green-500:#7bc01b;--green-900:#3d6307;--ref-direct:205,13%,52%;--ref-internal:161,91%,41%;--ref-social:210,72%,41%;--ref-search:42,100%,50%;--ref-other:3,76%,58%;--base-text:var(--gray-900);--base-text-2:var(--gray-600);--base-3:var(--gray-400);--border:var(--gray-400);--data:var(--green-500);--control:var(--blue-500);--grid-unit-5:0.25rem;--grid-unit-10:0.5rem;--grid-unit-15:0.75rem;--grid-unit-20:1rem;--grid-unit-25:1.25rem;--grid-unit-30:1.5rem;--grid-unit-40:2rem;--font-size--smaller:0.688rem;--font-size--small:0.75rem;--font-size--medium:0.875rem;--font-size--large:1rem;--font-size--extra-large:1.2rem;--black:#000;--sidebar-black:#1e1e1e;--sidebar-white:#f0f0f0}.wp-parsely-related-posts{align-items:flex-start;display:flex;flex-direction:column}.wp-parsely-related-posts .related-posts-description{font-size:.8125rem;font-style:normal;font-weight:400;gap:.625rem;line-height:1.25rem}.wp-parsely-related-posts .related-posts-body,.wp-parsely-related-posts .related-posts-description{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-related-posts .related-posts-body{gap:1rem}.wp-parsely-related-posts .related-posts-body>div{width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-settings{align-self:stretch;display:flex;flex-direction:column;gap:1rem;width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-settings .components-base-control__field{margin-bottom:0}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings{display:flex;flex-direction:column;gap:var(--grid-unit-20);width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .components-base-control__field{margin-bottom:0}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-types{width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-types .components-toggle-group-control{height:2.5rem;overflow:hidden}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-types .components-toggle-group-control button{background:transparent;outline:2px solid transparent;outline-offset:-3px}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-types .components-toggle-group-control button[data-active-item]{background:var(--sidebar-black);border-radius:3px;box-shadow:0 -3px 0 0 #fff,0 3px 0 0 #fff;transition:background 0s .5s,border-radius 0s .5s,box-shadow 0s .5s}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-values{width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-values .components-combobox-control__suggestions-container .components-flex{height:2.25rem}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-values .components-combobox-control__suggestions-container .components-flex input{margin:0 var(--grid-unit-15)}.wp-parsely-related-posts .related-posts-body .related-posts-wrapper .related-posts-descr{font-size:.8125rem;font-style:normal;font-weight:400;line-height:1.25rem}.wp-parsely-related-posts .related-posts-body .related-posts-wrapper .related-posts-empty,.wp-parsely-related-posts .related-posts-body .related-posts-wrapper .related-posts-loading-message{color:var(--gray-900);font-size:.75rem;font-style:normal;font-weight:700;line-height:var(--grid-unit-20);overflow:hidden;text-overflow:ellipsis}.wp-parsely-related-posts .related-posts-body .related-posts-list{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20);padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single{align-items:flex-start;align-self:stretch;border:1px solid var(--Gutenberg-Gray-400,#ccc);border-radius:2px;display:flex;flex-direction:column}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-title{align-items:center;align-self:stretch;display:flex;flex-direction:column;font-size:.875rem;font-style:normal;font-weight:600;gap:.5rem;justify-content:center;line-height:1.25rem;overflow:hidden;padding:var(--grid-unit-20);text-decoration-line:underline;text-overflow:ellipsis}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions{align-items:center;align-self:stretch;border-top:1px solid var(--gray-400);display:flex;flex-wrap:wrap;padding:0 var(--grid-unit-10)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info{align-items:center;display:flex;flex-grow:1;gap:var(--grid-unit-10)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info>div:first-child,.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info>div:last-child{display:flex;gap:var(--grid-unit-10)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .related-post-metric{align-items:center;display:flex}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .related-post-metric .parsely-post-metric-data{align-items:center;display:flex;gap:var(--grid-unit-5)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .related-post-linked{align-items:center;display:flex;margin-right:auto;fill:#008a20}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .wp-parsely-icon path{fill:#1e1e1e}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .wp-parsely-icon:hover path{fill:#0073aa} diff --git a/build/content-helper/editor-sidebar.asset.php b/build/content-helper/editor-sidebar.asset.php index dbb30960b..7af5c1bf5 100644 --- a/build/content-helper/editor-sidebar.asset.php +++ b/build/content-helper/editor-sidebar.asset.php @@ -1 +1 @@ - array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url', 'wp-wordcount'), 'version' => 'd7059d961c9fe0a71c34'); + array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url', 'wp-wordcount'), 'version' => 'fe15e7e38c33aff43523'); diff --git a/build/content-helper/editor-sidebar.css b/build/content-helper/editor-sidebar.css index a338d1802..b341ae328 100644 --- a/build/content-helper/editor-sidebar.css +++ b/build/content-helper/editor-sidebar.css @@ -1,4 +1,4 @@ -#wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.editor-post-excerpt,.settings_page_parsely,.wp-parsely-block-overlay,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover,.wp-parsely-preview-editor,.wp-parsely-smart-linking-close-dialog,.wp-parsely-smart-linking-review-modal,.wp-parsely-suggested-title-modal{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green-components:107,42%,46%;--parsely-green:hsl(var(--parsely-green-components));--parsely-green-10:#c7ecb1;--parsely-green-65:#2a691b;--gray-200:#f7f8f9;--gray-300:#edeeef;--gray-400:#d7dbdf;--gray-500:#959da5;--gray-600:#586069;--gray-700:#444d56;--gray-900:#24292e;--blue-500:#44a8e5;--blue-550:#2596db;--green-500:#7bc01b;--green-900:#3d6307;--ref-direct:205,13%,52%;--ref-internal:161,91%,41%;--ref-social:210,72%,41%;--ref-search:42,100%,50%;--ref-other:3,76%,58%;--base-text:var(--gray-900);--base-text-2:var(--gray-600);--base-3:var(--gray-400);--border:var(--gray-400);--data:var(--green-500);--control:var(--blue-500);--grid-unit-5:0.25rem;--grid-unit-10:0.5rem;--grid-unit-15:0.75rem;--grid-unit-20:1rem;--grid-unit-25:1.25rem;--grid-unit-30:1.5rem;--grid-unit-40:2rem;--font-size--smaller:0.688rem;--font-size--small:0.75rem;--font-size--medium:0.875rem;--font-size--large:1rem;--font-size--extra-large:1.2rem;--black:#000;--sidebar-black:#1e1e1e;--sidebar-white:#f0f0f0}.editor-post-excerpt__loading_animation{left:.5625rem;position:absolute;top:1.8125rem}.editor-post-excerpt__textarea{margin-bottom:var(--grid-unit-10)}.editor-post-excerpt .excerpt-suggestions-text{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:.625rem;padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-excerpt-generator.is-doc-set-panel{margin-top:1.25rem}.wp-parsely-excerpt-generator .excerpt-suggestions-settings{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20);padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-excerpt-generator .excerpt-suggestions-settings>div{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-10)}.wp-parsely-excerpt-generator .wp-parsely-excerpt-generator-header{align-items:center;display:flex;justify-content:flex-start}.wp-parsely-excerpt-generator .wp-parsely-excerpt-generator-header .wp-parsely-excerpt-generator-header-label{display:inline-block;font-size:.6875rem;font-weight:600;line-height:1.4;margin-left:.3125rem;padding:0;text-transform:uppercase}.wp-parsely-excerpt-generator .wp-parsely-excerpt-generator-header .wp-parsely-excerpt-generator-header-label span.beta-label{color:var(--Gutenberg-Gray-700,#757575);padding-left:.375rem}.wp-parsely-excerpt-generator .excerpt-suggestions-generate{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;margin:var(--grid-unit-10) 0}.wp-parsely-excerpt-generator .excerpt-suggestions-generate .components-button{align-items:center;align-self:stretch;border-radius:2px;display:flex;height:2.5rem;justify-content:center;padding:var(--grid-unit-10) var(--grid-unit-15)}.wp-parsely-excerpt-generator .wp-parsely-excerpt-suggestions-review-controls{display:flex;gap:var(--grid-unit-10)}.wp-parsely-excerpt-generator .wp-parsely-excerpt-suggestions-review-controls button{flex-grow:1;height:2.5rem;justify-content:center;margin-bottom:var(--grid-unit-10);margin-top:var(--grid-unit-10);padding:var(--grid-unit-10) var(--grid-unit-15)}.wp-parsely-excerpt-generator .components-notice{margin:var(--grid-unit-20) 0 var(--grid-unit-15) 0}.wp-parsely-excerpt-generator .components-notice .components-notice__content{margin:0}.wp-parsely-excerpt-generator .components-notice .components-notice__content .content-helper-error-message{margin-top:0!important}.wp-parsely-excerpt-generator .components-notice .components-notice__content .content-helper-error-message p:last-child{margin-bottom:0!important} +#wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.editor-post-excerpt,.settings_page_parsely,.wp-parsely-block-overlay,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover,.wp-parsely-preview-editor,.wp-parsely-smart-linking-close-dialog,.wp-parsely-smart-linking-review-modal,.wp-parsely-suggested-title-modal{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green-components:107,42%,46%;--parsely-green:hsl(var(--parsely-green-components));--parsely-green-10:#c7ecb1;--parsely-green-65:#2a691b;--gray-200:#f7f8f9;--gray-300:#edeeef;--gray-400:#d7dbdf;--gray-500:#959da5;--gray-600:#586069;--gray-700:#444d56;--gray-900:#24292e;--blue-500:#44a8e5;--blue-550:#2596db;--green-500:#7bc01b;--green-900:#3d6307;--ref-direct:205,13%,52%;--ref-internal:161,91%,41%;--ref-social:210,72%,41%;--ref-search:42,100%,50%;--ref-other:3,76%,58%;--base-text:var(--gray-900);--base-text-2:var(--gray-600);--base-3:var(--gray-400);--border:var(--gray-400);--data:var(--green-500);--control:var(--blue-500);--grid-unit-5:0.25rem;--grid-unit-10:0.5rem;--grid-unit-15:0.75rem;--grid-unit-20:1rem;--grid-unit-25:1.25rem;--grid-unit-30:1.5rem;--grid-unit-40:2rem;--font-size--smaller:0.688rem;--font-size--small:0.75rem;--font-size--medium:0.875rem;--font-size--large:1rem;--font-size--extra-large:1.2rem;--black:#000;--sidebar-black:#1e1e1e;--sidebar-white:#f0f0f0}.editor-post-excerpt__loading_animation{left:.5625rem;position:absolute;top:1.8125rem}.editor-post-excerpt__textarea{margin-bottom:var(--grid-unit-10)}.editor-post-excerpt .excerpt-suggestions-text{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:.625rem;padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-excerpt-generator.is-doc-set-panel{margin-top:1.25rem}.wp-parsely-excerpt-generator .excerpt-suggestions-settings{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20);padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-excerpt-generator .excerpt-suggestions-settings>div{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-10)}.wp-parsely-excerpt-generator .wp-parsely-excerpt-generator-header{align-items:center;display:flex;justify-content:flex-start}.wp-parsely-excerpt-generator .wp-parsely-excerpt-generator-header .wp-parsely-excerpt-generator-header-label{display:inline-block;font-size:.6875rem;font-weight:600;line-height:1.4;margin-left:.3125rem;padding:0;text-transform:uppercase}.wp-parsely-excerpt-generator .excerpt-suggestions-generate{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;margin:var(--grid-unit-10) 0}.wp-parsely-excerpt-generator .excerpt-suggestions-generate .components-button{align-items:center;align-self:stretch;border-radius:2px;display:flex;height:2.5rem;justify-content:center;padding:var(--grid-unit-10) var(--grid-unit-15)}.wp-parsely-excerpt-generator .wp-parsely-excerpt-suggestions-review-controls{display:flex;gap:var(--grid-unit-10)}.wp-parsely-excerpt-generator .wp-parsely-excerpt-suggestions-review-controls button{flex-grow:1;height:2.5rem;justify-content:center;margin-bottom:var(--grid-unit-10);margin-top:var(--grid-unit-10);padding:var(--grid-unit-10) var(--grid-unit-15)}.wp-parsely-excerpt-generator .components-notice{margin:var(--grid-unit-20) 0 var(--grid-unit-15) 0}.wp-parsely-excerpt-generator .components-notice .components-notice__content{margin:0}.wp-parsely-excerpt-generator .components-notice .components-notice__content .content-helper-error-message{margin-top:0!important}.wp-parsely-excerpt-generator .components-notice .components-notice__content .content-helper-error-message p:last-child{margin-bottom:0!important} #wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.editor-post-excerpt,.settings_page_parsely,.wp-parsely-block-overlay,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover,.wp-parsely-preview-editor,.wp-parsely-smart-linking-close-dialog,.wp-parsely-smart-linking-review-modal,.wp-parsely-suggested-title-modal{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green-components:107,42%,46%;--parsely-green:hsl(var(--parsely-green-components));--parsely-green-10:#c7ecb1;--parsely-green-65:#2a691b;--gray-200:#f7f8f9;--gray-300:#edeeef;--gray-400:#d7dbdf;--gray-500:#959da5;--gray-600:#586069;--gray-700:#444d56;--gray-900:#24292e;--blue-500:#44a8e5;--blue-550:#2596db;--green-500:#7bc01b;--green-900:#3d6307;--ref-direct:205,13%,52%;--ref-internal:161,91%,41%;--ref-social:210,72%,41%;--ref-search:42,100%,50%;--ref-other:3,76%,58%;--base-text:var(--gray-900);--base-text-2:var(--gray-600);--base-3:var(--gray-400);--border:var(--gray-400);--data:var(--green-500);--control:var(--blue-500);--grid-unit-5:0.25rem;--grid-unit-10:0.5rem;--grid-unit-15:0.75rem;--grid-unit-20:1rem;--grid-unit-25:1.25rem;--grid-unit-30:1.5rem;--grid-unit-40:2rem;--font-size--smaller:0.688rem;--font-size--small:0.75rem;--font-size--medium:0.875rem;--font-size--large:1rem;--font-size--extra-large:1.2rem;--black:#000;--sidebar-black:#1e1e1e;--sidebar-white:#f0f0f0}.wp-parsely-block-overlay{align-items:center;background-color:hsla(0,0%,100%,.85);box-sizing:border-box;display:flex;font-size:1.125rem;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%}.wp-parsely-block-overlay .wp-parsely-block-overlay-label{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:var(--grid-unit-10);justify-content:center;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--grid-unit-10)}.wp-parsely-block-overlay .wp-parsely-block-overlay-cancel{font-size:1.125rem;padding:0;pointer-events:all;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:10}.wp-parsely-block-overlay .wp-parsely-block-overlay-cancel:focus{box-shadow:none;outline:none}.wp-parsely-block-overlay svg{height:1.5625rem;width:1.5625rem}.wp-parsely-block-overlay.full-content-overlay{font-size:1.25rem;z-index:999}.wp-parsely-block-overlay.full-content-overlay span{margin-top:.9375rem}.wp-parsely-block-overlay.full-content-overlay svg{height:3.125rem;width:3.125rem}.wp-parsely-panel .components-panel__icon{height:1.5rem;margin:0 var(--grid-unit-15) 0 0;order:-1;width:1.5rem}.wp-parsely-smart-linking .components-panel__row{flex-direction:column;margin-bottom:0}.wp-parsely-smart-linking .components-base-control,.wp-parsely-smart-linking .components-base-control .components-panel__row,.wp-parsely-smart-linking .components-base-control:last-child{margin-bottom:0}.wp-parsely-smart-linking .smart-linking-text{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:.625rem;padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-smart-linking .parsely-panel-settings{width:100%}.wp-parsely-smart-linking .parsely-panel-settings-body{display:flex;flex-direction:column;gap:.625rem;padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-block-select{align-self:stretch;display:flex;flex-direction:column;gap:1.5rem;padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-block-select .components-toggle-group-control-option-base{padding:.625rem 0}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-block-select .components-toggle-group-control{height:40px;overflow:hidden}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-block-select .components-toggle-group-control button{background:transparent;outline:2px solid transparent;outline-offset:-3px}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-block-select .components-toggle-group-control button[data-active-item]{background:var(--sidebar-black);border-radius:3px;box-shadow:0 -3px 0 0 #fff,0 3px 0 0 #fff;transition:background 0s .5s,border-radius 0s .5s,box-shadow 0s .5s,color .2s .1s}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-block-select .components-toggle-group-control button:not([data-active-item]){transition:color .2s .1s}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-settings{align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20)}.wp-parsely-smart-linking .smart-linking-generate,.wp-parsely-smart-linking .smart-linking-manage{align-self:stretch;display:flex;flex-direction:column;padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-smart-linking .smart-linking-generate button,.wp-parsely-smart-linking .smart-linking-manage button{align-items:center;align-self:stretch;display:flex;justify-content:center;width:100%}.wp-parsely-smart-linking .wp-parsely-smart-linking-suggested-links{margin:0}.wp-parsely-smart-linking .wp-parsely-smart-linking-hint{margin-top:calc(var(--grid-unit-10)*-1)}.wp-parsely-smart-linking-review-modal{align-items:flex-start;display:flex;flex-direction:column;width:47.875rem}.wp-parsely-smart-linking-review-modal .smart-linking-modal-body{align-self:stretch;display:flex;flex-direction:row;gap:var(--grid-unit-30)}.wp-parsely-smart-linking-review-modal .wp-parsely-link-suggestion-link-details{height:auto;margin-bottom:var(--grid-unit-20);text-align:left}.wp-parsely-smart-linking-review-modal .wp-parsely-link-suggestion-link-details .components-menu-item__item{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-parsely-smart-linking-review-modal .linking-post-details{align-items:center;display:flex;justify-content:space-between;width:100%}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-image{margin-right:.625rem;max-width:3.125rem}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-image .icon-container{align-items:center;display:flex;height:3.125rem;justify-content:center;width:3.125rem}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-title{color:var(--sidebar-black)}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-title a{text-decoration:none}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-info{display:flex;flex-direction:column;flex-grow:1}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-info .linking-post-meta{color:var(--Gutenberg-Gray-700,#757575);font-size:.9em}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-type{color:var(--Gutenberg-Gray-700,#757575);margin-left:.625rem;white-space:nowrap}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20);min-width:13.75rem;padding:.1875rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs{margin-bottom:var(--grid-unit-20)}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs button{align-items:center;display:flex;flex:1 0 0;flex-direction:column;height:var(--grid-unit-40)}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs-item{color:var(--sidebar-black);font-size:.6875rem;font-style:normal;font-weight:600;line-height:var(--grid-unit-20);text-transform:uppercase}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs-item:focus-visible:before{box-shadow:none;outline:none}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tab-content{max-height:23.125rem;overflow-y:auto}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-tip{align-items:center;display:flex;font-size:var(--font-size--small);margin-bottom:.3125rem;margin-top:-.5625rem;padding:.3125rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-tip .review-sidebar-tip svg{flex-shrink:0;height:1.5rem;margin-left:auto;width:1.5rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-header{align-items:center;align-self:stretch;color:var(--sidebar-black);display:flex;font-size:.6875rem;font-style:normal;font-weight:600;gap:.375rem;line-height:var(--grid-unit-20);margin-bottom:var(--grid-unit-15);text-transform:uppercase}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-header>span{color:var(--Gutenberg-Gray-700,#757575)}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button{align-items:center;display:flex;justify-content:space-between;width:13.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button:focus{box-shadow:none;outline:none}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button .smart-linking-menu-label{align-items:center;color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));display:flex;padding-left:var(--grid-unit-10);white-space:nowrap}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button.is-selected{background-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));color:#fff}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button.is-selected .smart-linking-menu-label{color:#fff}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button .components-menu-item__item{padding-right:0;width:100%}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button .smart-linking-menu-item{display:inline;flex-grow:1;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion{align-items:flex-start;align-self:stretch;display:flex;flex:1;flex-direction:column;gap:1rem;max-width:28.25rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs{font-size:.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-parent-separator{margin:0 var(--grid-unit-5)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-parent-block{color:var(--Gutenberg-Gray-700,#757575)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-current-block{color:var(--sidebar-black)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-current-block .breadcrumbs-current-block-name{margin-left:var(--grid-unit-10)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestion-post-title{font-size:var(--font-size--large);font-weight:500;line-height:1.5rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .components-divider{border-color:#ccc;height:1px;width:28.25rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .three-dots{color:#ccc;font-size:1rem;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .three-dots.is-top{margin-bottom:.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .three-dots.is-bottom{margin-top:.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls{align-items:center;align-self:stretch;display:flex;flex-shrink:0;justify-content:space-between;margin:0 var(--grid-unit-20);-webkit-user-select:none;-moz-user-select:none;user-select:none;width:28.25rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .reviews-controls-middle{align-items:center;display:flex;flex:1 0 0;gap:var(--grid-unit-20);justify-content:center}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .wp-parsely-review-suggestion-next,.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .wp-parsely-review-suggestion-previous{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .wp-parsely-review-suggestion-reject{background:var(--Gutenberg-White,#fff);border-radius:2px;box-shadow:inset 0 0 0 1px var(--Gutenberg-Alert-Red,#cc1818);color:var(--Gutenberg-Alert-Red,#cc1818)}.wp-parsely-smart-linking-close-dialog{align-items:flex-start;display:flex;flex-direction:column;width:24rem}.wp-parsely-smart-linking-close-dialog .smart-linking-close-dialog-actions{align-items:center;align-self:stretch;display:flex;gap:var(--grid-unit-15);justify-content:flex-end;padding-top:var(--grid-unit-30)}.wp-parsely-preview-editor .editor-styles-wrapper{background:var(--Gutenberg-White,#fff);font-size:var(--font-size--medium);padding-bottom:0}.wp-parsely-preview-editor p[role=document]{margin:0}.wp-parsely-preview-editor .smart-linking-highlight{background:hsla(var(--parsely-green-components),.5);border-radius:2px;color:var(--sidebar-black)!important;mix-blend-mode:multiply;text-decoration-line:underline} #wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.editor-post-excerpt,.settings_page_parsely,.wp-parsely-block-overlay,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover,.wp-parsely-preview-editor,.wp-parsely-smart-linking-close-dialog,.wp-parsely-smart-linking-review-modal,.wp-parsely-suggested-title-modal{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green-components:107,42%,46%;--parsely-green:hsl(var(--parsely-green-components));--parsely-green-10:#c7ecb1;--parsely-green-65:#2a691b;--gray-200:#f7f8f9;--gray-300:#edeeef;--gray-400:#d7dbdf;--gray-500:#959da5;--gray-600:#586069;--gray-700:#444d56;--gray-900:#24292e;--blue-500:#44a8e5;--blue-550:#2596db;--green-500:#7bc01b;--green-900:#3d6307;--ref-direct:205,13%,52%;--ref-internal:161,91%,41%;--ref-social:210,72%,41%;--ref-search:42,100%,50%;--ref-other:3,76%,58%;--base-text:var(--gray-900);--base-text-2:var(--gray-600);--base-3:var(--gray-400);--border:var(--gray-400);--data:var(--green-500);--control:var(--blue-500);--grid-unit-5:0.25rem;--grid-unit-10:0.5rem;--grid-unit-15:0.75rem;--grid-unit-20:1rem;--grid-unit-25:1.25rem;--grid-unit-30:1.5rem;--grid-unit-40:2rem;--font-size--smaller:0.688rem;--font-size--small:0.75rem;--font-size--medium:0.875rem;--font-size--large:1rem;--font-size--extra-large:1.2rem;--black:#000;--sidebar-black:#1e1e1e;--sidebar-white:#f0f0f0}.wp-parsely-content-helper .wp-parsely-performance-panel{border-top:1px solid #ddd;margin-top:-1px;padding:16px}.wp-parsely-content-helper .wp-parsely-performance-panel .content-helper-error-message{margin:0!important}.wp-parsely-content-helper .wp-parsely-performance-panel .components-button.wp-parsely-view-post{align-items:center;display:flex;justify-content:center;width:100%}.wp-parsely-content-helper .wp-parsely-performance-panel .panel-body{width:100%}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:.5rem;padding:.375rem 0 1rem}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel .panel-header{align-items:center;display:flex;gap:.375rem;height:1rem;margin-bottom:0;width:100%}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel .panel-header.level-2{margin-bottom:.9375rem}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel .panel-header.level-2 h2{margin-bottom:0}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel .panel-header.level-3 h3{font-size:var(--font-size--smaller);font-style:normal;font-weight:600;line-height:1rem;margin-bottom:0;text-transform:uppercase}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel .panel-subtitle{align-items:center;align-self:stretch;color:var(--Gutenberg-Gray-700,#757575);display:flex;flex:1 0 0;font-size:var(--font-size--smaller);font-style:normal;font-weight:600;gap:.375rem;height:1rem;line-height:1rem;text-transform:uppercase}.wp-parsely-content-helper .wp-parsely-performance-panel .components-heading{display:block;font-weight:500;line-height:normal;margin:0}.wp-parsely-content-helper .wp-parsely-performance-panel .components-dropdown-menu{line-height:0}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points{align-content:flex-start;align-items:flex-start;align-self:stretch;display:flex;flex-wrap:wrap;gap:1rem var(--grid-unit-20)}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point{align-items:center;background:var(--sidebar-white);border-radius:.25rem;display:flex;flex:1 0 0;flex-direction:column;gap:var(--grid-unit-5);justify-content:center;min-width:100px;padding:var(--grid-unit-20) var(--grid-unit-10)}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point svg{align-items:flex-start;border-radius:.125rem;display:flex}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point .data-point-title{align-self:stretch;color:var(--sidebar-black);font-size:.75rem;font-style:normal;font-weight:400;line-height:1rem;text-align:center}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point .data-point-value{align-self:stretch;color:var(--sidebar-black);font-size:1.25rem;font-style:normal;font-weight:590;line-height:1.75rem;text-align:center}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point .data-point-value.is-small{font-size:var(--font-size--medium)}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar{align-items:flex-start;align-self:stretch;display:flex;height:1rem;margin:1rem 0;position:relative}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill{--radius:2px;align-self:stretch;position:relative;transition:filter .1s ease,transform .1s ease}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill:hover{filter:opacity(1)!important;transform:scaleX(1) scaleY(1)!important}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill:first-child{border-radius:var(--radius) 0 0 var(--radius)}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill:last-child{border-radius:0 var(--radius) var(--radius) 0}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill.direct{background-color:hsl(var(--ref-direct))}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill.internal{background-color:hsl(var(--ref-internal))}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill.search{background-color:hsl(var(--ref-search))}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill.social{background-color:hsl(var(--ref-social))}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill.other{background-color:hsl(var(--ref-other))}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar:hover .bar-fill{filter:opacity(.5);transform:scaleX(1) scaleY(.7)}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20)}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label{align-items:center;align-self:stretch;display:flex;gap:.5rem;justify-content:center}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color{align-items:center;border-radius:.09375rem;display:flex;flex-direction:column;gap:.625rem;height:.625rem;justify-content:center;width:.1875rem}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color.direct{background-color:hsl(var(--ref-direct))}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color.internal{background-color:hsl(var(--ref-internal))}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color.search{background-color:hsl(var(--ref-search))}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color.social{background-color:hsl(var(--ref-social))}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color.other{background-color:hsl(var(--ref-other))}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;color:var(--sidebar-black);flex:1 0 0;font-feature-settings:"ss06" on;font-size:var(--font-size--small);font-style:normal;font-weight:400;line-height:1rem;overflow:hidden;text-overflow:ellipsis}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-value{color:var(--sidebar-black);font-size:var(--font-size--small);font-style:normal;font-weight:590;line-height:1rem;text-align:right}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20);margin:1rem 0}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row{align-items:center;align-self:stretch;display:flex;gap:var(--grid-unit-10);justify-content:space-between}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;color:var(--sidebar-black);flex:1;font-feature-settings:"ss06" on;font-size:var(--font-size--small);font-style:normal;font-weight:400;line-height:1rem;overflow:hidden;text-overflow:ellipsis}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-bar{display:flex;flex:1;flex-direction:column;gap:.625rem;justify-content:center;max-width:6.25rem}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-bar .percentage-bar{--radius:1.5px;background:var(--gray-400);border-radius:var(--radius);display:flex;height:.1875rem;margin:0;overflow:hidden}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-bar .percentage-bar:after{background:var(--blueberry,#3858e9);border-radius:var(--radius);content:"";height:100%;width:var(--bar-fill)}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-value{color:var(--sidebar-black);flex-shrink:0;font-size:var(--font-size--small);font-style:normal;font-weight:590;line-height:1rem;min-width:3.125rem;text-align:right} #wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.editor-post-excerpt,.settings_page_parsely,.wp-parsely-block-overlay,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover,.wp-parsely-preview-editor,.wp-parsely-smart-linking-close-dialog,.wp-parsely-smart-linking-review-modal,.wp-parsely-suggested-title-modal{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green-components:107,42%,46%;--parsely-green:hsl(var(--parsely-green-components));--parsely-green-10:#c7ecb1;--parsely-green-65:#2a691b;--gray-200:#f7f8f9;--gray-300:#edeeef;--gray-400:#d7dbdf;--gray-500:#959da5;--gray-600:#586069;--gray-700:#444d56;--gray-900:#24292e;--blue-500:#44a8e5;--blue-550:#2596db;--green-500:#7bc01b;--green-900:#3d6307;--ref-direct:205,13%,52%;--ref-internal:161,91%,41%;--ref-social:210,72%,41%;--ref-search:42,100%,50%;--ref-other:3,76%,58%;--base-text:var(--gray-900);--base-text-2:var(--gray-600);--base-3:var(--gray-400);--border:var(--gray-400);--data:var(--green-500);--control:var(--blue-500);--grid-unit-5:0.25rem;--grid-unit-10:0.5rem;--grid-unit-15:0.75rem;--grid-unit-20:1rem;--grid-unit-25:1.25rem;--grid-unit-30:1.5rem;--grid-unit-40:2rem;--font-size--smaller:0.688rem;--font-size--small:0.75rem;--font-size--medium:0.875rem;--font-size--large:1rem;--font-size--extra-large:1.2rem;--black:#000;--sidebar-black:#1e1e1e;--sidebar-white:#f0f0f0}.wp-parsely-related-posts{align-items:flex-start;display:flex;flex-direction:column}.wp-parsely-related-posts .related-posts-description{font-size:.8125rem;font-style:normal;font-weight:400;gap:.625rem;line-height:1.25rem}.wp-parsely-related-posts .related-posts-body,.wp-parsely-related-posts .related-posts-description{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-related-posts .related-posts-body{gap:1rem}.wp-parsely-related-posts .related-posts-body>div{width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-settings{align-self:stretch;display:flex;flex-direction:column;gap:1rem;width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-settings .components-base-control__field{margin-bottom:0}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings{display:flex;flex-direction:column;gap:var(--grid-unit-20);width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .components-base-control__field{margin-bottom:0}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-types{width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-types .components-toggle-group-control{height:2.5rem;overflow:hidden}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-types .components-toggle-group-control button{background:transparent;outline:2px solid transparent;outline-offset:-3px}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-types .components-toggle-group-control button[data-active-item]{background:var(--sidebar-black);border-radius:3px;box-shadow:0 -3px 0 0 #fff,0 3px 0 0 #fff;transition:background 0s .5s,border-radius 0s .5s,box-shadow 0s .5s}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-values{width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-values .components-combobox-control__suggestions-container .components-flex{height:2.25rem}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-values .components-combobox-control__suggestions-container .components-flex input{margin:0 var(--grid-unit-15)}.wp-parsely-related-posts .related-posts-body .related-posts-wrapper .related-posts-descr{font-size:.8125rem;font-style:normal;font-weight:400;line-height:1.25rem}.wp-parsely-related-posts .related-posts-body .related-posts-wrapper .related-posts-empty,.wp-parsely-related-posts .related-posts-body .related-posts-wrapper .related-posts-loading-message{color:var(--gray-900);font-size:.75rem;font-style:normal;font-weight:700;line-height:var(--grid-unit-20);overflow:hidden;text-overflow:ellipsis}.wp-parsely-related-posts .related-posts-body .related-posts-list{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20);padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single{align-items:flex-start;align-self:stretch;border:1px solid var(--Gutenberg-Gray-400,#ccc);border-radius:2px;display:flex;flex-direction:column}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-title{align-items:center;align-self:stretch;display:flex;flex-direction:column;font-size:.875rem;font-style:normal;font-weight:600;gap:.5rem;justify-content:center;line-height:1.25rem;overflow:hidden;padding:var(--grid-unit-20);text-decoration-line:underline;text-overflow:ellipsis}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions{align-items:center;align-self:stretch;border-top:1px solid var(--gray-400);display:flex;flex-wrap:wrap;padding:0 var(--grid-unit-10)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info{align-items:center;display:flex;flex-grow:1;gap:var(--grid-unit-10)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info>div:first-child,.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info>div:last-child{display:flex;gap:var(--grid-unit-10)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .related-post-metric{align-items:center;display:flex}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .related-post-metric .parsely-post-metric-data{align-items:center;display:flex;gap:var(--grid-unit-5)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .related-post-linked{align-items:center;display:flex;margin-left:auto;fill:#008a20}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .wp-parsely-icon path{fill:#1e1e1e}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .wp-parsely-icon:hover path{fill:#0073aa} diff --git a/build/content-helper/editor-sidebar.js b/build/content-helper/editor-sidebar.js index e822c1e8f..ce4af19fd 100644 --- a/build/content-helper/editor-sidebar.js +++ b/build/content-helper/editor-sidebar.js @@ -1,20 +1,20 @@ -!function(){"use strict";var e={20:function(e,t,n){var r=n(609),i=Symbol.for("react.element"),s=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,s={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)o.call(t,r)&&!l.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===s[r]&&(s[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:s,_owner:a.current}}t.Fragment=s,t.jsx=c,t.jsxs=c},848:function(e,t,n){e.exports=n(20)},609:function(e){e.exports=window.React}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(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=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){n.d({},{w:function(){return Sr},_:function(){return jr}});var e,t,r,i,s,o,a,l,c,u,p,d,f=n(848),h=window.wp.components,v=window.wp.data,g=window.wp.domReady,y=n.n(g);void 0!==window.wp&&(p=null!==(t=null===(e=window.wp.editor)||void 0===e?void 0:e.PluginDocumentSettingPanel)&&void 0!==t?t:null!==(i=null===(r=window.wp.editPost)||void 0===r?void 0:r.PluginDocumentSettingPanel)&&void 0!==i?i:null===(s=window.wp.editSite)||void 0===s?void 0:s.PluginDocumentSettingPanel,d=null!==(a=null===(o=window.wp.editor)||void 0===o?void 0:o.PluginSidebar)&&void 0!==a?a:null!==(c=null===(l=window.wp.editPost)||void 0===l?void 0:l.PluginSidebar)&&void 0!==c?c:null===(u=window.wp.editSite)||void 0===u?void 0:u.PluginSidebar);var m,w,b,_=window.wp.element,x=window.wp.i18n,k=window.wp.primitives,S=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{fillRule:"evenodd",d:"M11.25 5h1.5v15h-1.5V5zM6 10h1.5v10H6V10zm12 4h-1.5v6H18v-6z",clipRule:"evenodd"})}),j=window.wp.plugins,P=function(){function e(){this._tkq=[],this.isLoaded=!1,this.isEnabled=!1,"undefined"!=typeof wpParselyTracksTelemetry&&(this.isEnabled=!0,this.loadTrackingLibrary())}return e.getInstance=function(){return window.wpParselyTelemetryInstance||Object.defineProperty(window,"wpParselyTelemetryInstance",{value:new e,writable:!1,configurable:!1,enumerable:!1}),window.wpParselyTelemetryInstance},e.prototype.loadTrackingLibrary=function(){var e=this,t=document.createElement("script");t.async=!0,t.src="//stats.wp.com/w.js",t.onload=function(){e.isLoaded=!0,e._tkq=window._tkq||[]},document.head.appendChild(t)},e.trackEvent=function(t){return n=this,r=arguments,s=function(t,n){var r;return void 0===n&&(n={}),function(e,t){var n,r,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=1e4&&(clearInterval(s),n("Telemetry library not loaded"))}),100);else n("Telemetry not enabled")}))},e.prototype.trackEvent=function(t,n){var r;this.isLoaded?(0!==t.indexOf(e.TRACKS_PREFIX)&&(t=e.TRACKS_PREFIX+t),this.isEventNameValid(t)?(n=this.prepareProperties(n),null===(r=this._tkq)||void 0===r||r.push(["recordEvent",t,n])):console.error("Error tracking event: Invalid event name")):console.error("Error tracking event: Telemetry not loaded")},e.prototype.isTelemetryEnabled=function(){return this.isEnabled},e.prototype.isProprietyValid=function(t){return e.PROPERTY_REGEX.test(t)},e.prototype.isEventNameValid=function(t){return e.EVENT_NAME_REGEX.test(t)},e.prototype.prepareProperties=function(e){return(e=this.sanitizeProperties(e)).parsely_version=wpParselyTracksTelemetry.version,wpParselyTracksTelemetry.user&&(e._ut=wpParselyTracksTelemetry.user.type,e._ui=wpParselyTracksTelemetry.user.id),wpParselyTracksTelemetry.vipgo_env&&(e.vipgo_env=wpParselyTracksTelemetry.vipgo_env),this.sanitizeProperties(e)},e.prototype.sanitizeProperties=function(e){var t=this,n={};return Object.keys(e).forEach((function(r){t.isProprietyValid(r)&&(n[r]=e[r])})),n},e.TRACKS_PREFIX="wpparsely_",e.EVENT_NAME_REGEX=/^(([a-z0-9]+)_){2}([a-z0-9_]+)$/,e.PROPERTY_REGEX=/^[a-z_][a-z0-9_]*$/,e}(),T=(P.trackEvent,function(){return(0,f.jsx)(h.SVG,{"aria-hidden":"true",version:"1.1",viewBox:"0 0 15 15",width:"15",height:"15",xmlns:"http://www.w3.org/2000/svg",children:(0,f.jsx)(h.Path,{d:"M0 14.0025V11.0025L7.5 3.5025L10.5 6.5025L3 14.0025H0ZM12 5.0025L13.56 3.4425C14.15 2.8525 14.15 1.9025 13.56 1.3225L12.68 0.4425C12.09 -0.1475 11.14 -0.1475 10.56 0.4425L9 2.0025L12 5.0025Z"})})}),E=function(e){var t=e.size,n=void 0===t?24:t,r=e.className,i=void 0===r?"wp-parsely-icon":r;return(0,f.jsxs)(h.SVG,{className:i,height:n,viewBox:"0 0 60 65",width:n,xmlns:"http://www.w3.org/2000/svg",children:[(0,f.jsx)(h.Path,{fill:"#5ba745",d:"M23.72,51.53c0-.18,0-.34-.06-.52a13.11,13.11,0,0,0-2.1-5.53A14.74,14.74,0,0,0,19.12,43c-.27-.21-.5-.11-.51.22l-.24,3.42c0,.33-.38.35-.49,0l-1.5-4.8a1.4,1.4,0,0,0-.77-.78,23.91,23.91,0,0,0-3.1-.84c-1.38-.24-3.39-.39-3.39-.39-.34,0-.45.21-.25.49l2.06,3.76c.2.27,0,.54-.29.33l-4.51-3.6a3.68,3.68,0,0,0-2.86-.48c-1,.16-2.44.46-2.44.46a.68.68,0,0,0-.39.25.73.73,0,0,0-.14.45S.41,43,.54,44a3.63,3.63,0,0,0,1.25,2.62L6.48,50c.28.2.09.49-.23.37l-4.18-.94c-.32-.12-.5,0-.4.37,0,0,.69,1.89,1.31,3.16a24,24,0,0,0,1.66,2.74,1.34,1.34,0,0,0,1,.52l5,.13c.33,0,.41.38.1.48L7.51,58c-.31.1-.34.35-.07.55a14.29,14.29,0,0,0,3.05,1.66,13.09,13.09,0,0,0,5.9.5,25.13,25.13,0,0,0,4.34-1,9.55,9.55,0,0,1-.08-1.2,9.32,9.32,0,0,1,3.07-6.91"}),(0,f.jsx)(h.Path,{fill:"#5ba745",d:"M59.7,41.53a.73.73,0,0,0-.14-.45.68.68,0,0,0-.39-.25s-1.43-.3-2.44-.46a3.64,3.64,0,0,0-2.86.48l-4.51,3.6c-.26.21-.49-.06-.29-.33l2.06-3.76c.2-.28.09-.49-.25-.49,0,0-2,.15-3.39.39a23.91,23.91,0,0,0-3.1.84,1.4,1.4,0,0,0-.77.78l-1.5,4.8c-.11.32-.48.3-.49,0l-.24-3.42c0-.33-.24-.43-.51-.22a14.74,14.74,0,0,0-2.44,2.47A13.11,13.11,0,0,0,36.34,51c0,.18,0,.34-.06.52a9.26,9.26,0,0,1,3,8.1,24.1,24.1,0,0,0,4.34,1,13.09,13.09,0,0,0,5.9-.5,14.29,14.29,0,0,0,3.05-1.66c.27-.2.24-.45-.07-.55l-3.22-1.17c-.31-.1-.23-.47.1-.48l5-.13a1.38,1.38,0,0,0,1-.52A24.6,24.6,0,0,0,57,52.92c.61-1.27,1.31-3.16,1.31-3.16.1-.33-.08-.49-.4-.37l-4.18.94c-.32.12-.51-.17-.23-.37l4.69-3.34A3.63,3.63,0,0,0,59.46,44c.13-1,.24-2.47.24-2.47"}),(0,f.jsx)(h.Path,{fill:"#5ba745",d:"M46.5,25.61c0-.53-.35-.72-.8-.43l-4.86,2.66c-.45.28-.56-.27-.23-.69l4.66-6.23a2,2,0,0,0,.28-1.68,36.51,36.51,0,0,0-2.19-4.89,34,34,0,0,0-2.81-3.94c-.33-.41-.74-.35-.91.16l-2.28,5.68c-.16.5-.6.48-.59-.05l.28-8.93a2.54,2.54,0,0,0-.66-1.64S35,4.27,33.88,3.27,30.78.69,30.78.69a1.29,1.29,0,0,0-1.54,0s-1.88,1.49-3.12,2.59-2.48,2.35-2.48,2.35A2.5,2.5,0,0,0,23,7.27l.27,8.93c0,.53-.41.55-.58.05l-2.29-5.69c-.17-.5-.57-.56-.91-.14a35.77,35.77,0,0,0-3,4.2,35.55,35.55,0,0,0-2,4.62,2,2,0,0,0,.27,1.67l4.67,6.24c.33.42.23,1-.22.69l-4.87-2.66c-.45-.29-.82-.1-.82.43a18.6,18.6,0,0,0,.83,5.07,20.16,20.16,0,0,0,5.37,7.77c3.19,3,5.93,7.8,7.45,11.08A9.6,9.6,0,0,1,30,49.09a9.31,9.31,0,0,1,2.86.45c1.52-3.28,4.26-8.11,7.44-11.09a20.46,20.46,0,0,0,5.09-7,19,19,0,0,0,1.11-5.82"}),(0,f.jsx)(h.Path,{fill:"#5ba745",d:"M36.12,58.44A6.12,6.12,0,1,1,30,52.32a6.11,6.11,0,0,1,6.12,6.12"})]})},L=function(){return L=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?"".concat(i," ").concat(n):n)||this).hint=null,s.name=s.constructor.name,s.code=r;var o=[U.AccessToFeatureDisabled,U.ParselyApiForbidden,U.ParselyApiResponseContainsError,U.ParselyApiReturnedNoData,U.ParselyApiReturnedTooManyResults,U.PluginCredentialsNotSetMessageDetected,U.PluginSettingsApiSecretNotSet,U.PluginSettingsSiteIdNotSet,U.PostIsNotPublished,U.UnknownError,U.ParselySuggestionsApiAuthUnavailable,U.ParselySuggestionsApiNoAuthentication,U.ParselySuggestionsApiNoAuthorization,U.ParselySuggestionsApiNoData,U.ParselySuggestionsApiSchemaError];return s.retryFetch=!o.includes(s.code),Object.setPrototypeOf(s,t.prototype),s.code===U.AccessToFeatureDisabled?s.message=(0,x.__)("Access to this feature is disabled by the site's administration.","wp-parsely"):s.code===U.ParselySuggestionsApiNoAuthorization?s.message=(0,x.__)('This AI-powered feature is opt-in. To gain access, please submit a request here.',"wp-parsely"):s.code===U.ParselySuggestionsApiOpenAiError||s.code===U.ParselySuggestionsApiOpenAiUnavailable?s.message=(0,x.__)("The Parse.ly API returned an internal server error. Please retry with a different input, or try again later.","wp-parsely"):s.code===U.HttpRequestFailed&&s.message.includes("cURL error 28")?s.message=(0,x.__)("The Parse.ly API did not respond in a timely manner. Please try again later.","wp-parsely"):s.code===U.ParselySuggestionsApiSchemaError?s.message=(0,x.__)("The Parse.ly API returned a validation error. Please try again with different parameters.","wp-parsely"):s.code===U.ParselySuggestionsApiNoData?s.message=(0,x.__)("The Parse.ly API couldn't find any relevant data to fulfill the request. Please retry with a different input.","wp-parsely"):s.code===U.ParselySuggestionsApiOpenAiSchema?s.message=(0,x.__)("The Parse.ly API returned an incorrect response. Please try again later.","wp-parsely"):s.code===U.ParselySuggestionsApiAuthUnavailable&&(s.message=(0,x.__)("The Parse.ly API is currently unavailable. Please try again later.","wp-parsely")),s}return ee(t,e),t.prototype.Message=function(e){return void 0===e&&(e=null),[U.PluginCredentialsNotSetMessageDetected,U.PluginSettingsSiteIdNotSet,U.PluginSettingsApiSecretNotSet].includes(this.code)?X(e):(this.code===U.FetchError&&(this.hint=this.Hint((0,x.__)("This error can sometimes be caused by ad-blockers or browser tracking protections. Please add this site to any applicable allow lists and try again.","wp-parsely"))),this.code!==U.ParselyApiForbidden&&this.code!==U.ParselySuggestionsApiNoAuthentication||(this.hint=this.Hint((0,x.__)("Please ensure that the Site ID and API Secret given in the plugin's settings are correct.","wp-parsely"))),this.code===U.HttpRequestFailed&&(this.hint=this.Hint((0,x.__)("The Parse.ly API cannot be reached. Please verify that you are online.","wp-parsely"))),(0,f.jsx)(Q,{className:null==e?void 0:e.className,testId:"error",children:"

".concat(this.message,"

").concat(this.hint?this.hint:"")}))},t.prototype.Hint=function(e){return'

'.concat((0,x.__)("Hint:","wp-parsely")," ").concat(e,"

")},t.prototype.createErrorSnackbar=function(){//.test(this.message)||(0,v.dispatch)("core/notices").createNotice("error",this.message,{type:"snackbar"})},t}(Error),ne=window.wp.compose,re=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})}),ie=(0,_.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,_.cloneElement)(e,{width:t,height:t,...n,ref:r})})),se=function(){return(0,f.jsx)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:(0,f.jsx)(h.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M13.5034 7.91642L9 12.0104L4.49662 7.91642L5.25337 7.08398L8.99999 10.49L12.7466 7.08398L13.5034 7.91642Z",fill:"#1E1E1E"})})},oe={journalist:{label:(0,x.__)("Journalist","wp-parsely")},editorialWriter:{label:(0,x.__)("Editorial Writer","wp-parsely")},investigativeReporter:{label:(0,x.__)("Investigative Reporter","wp-parsely")},techAnalyst:{label:(0,x.__)("Tech Analyst","wp-parsely")},businessAnalyst:{label:(0,x.__)("Business Analyst","wp-parsely")},culturalCommentator:{label:(0,x.__)("Cultural Commentator","wp-parsely")},scienceCorrespondent:{label:(0,x.__)("Science Correspondent","wp-parsely")},politicalAnalyst:{label:(0,x.__)("Political Analyst","wp-parsely")},healthWellnessAdvocate:{label:(0,x.__)("Health and Wellness Advocate","wp-parsely")},environmentalJournalist:{label:(0,x.__)("Environmental Journalist","wp-parsely")},custom:{label:(0,x.__)("Custom Persona","wp-parsely"),icon:re}},ae=Object.keys(oe),le=function(e){return"custom"===e||""===e?oe.custom.label:ce(e)?e:oe[e].label},ce=function(e){return!ae.includes(e)||"custom"===e},ue=function(e){var t=e.value,n=e.onChange,r=(0,_.useState)(""),i=r[0],s=r[1],o=(0,ne.useDebounce)(n,500);return(0,f.jsx)("div",{className:"parsely-persona-selector-custom",children:(0,f.jsx)(h.TextControl,{value:i||t,placeholder:(0,x.__)("Enter a custom persona…","wp-parsely"),onChange:function(e){if(""===e)return n(""),void s("");e.length>32&&(e=e.slice(0,32)),o(e),s(e)}})})},pe=function(e){var t=e.persona,n=e.value,r=void 0===n?(0,x.__)("Select a persona…","wp-parsely"):n,i=e.label,s=void 0===i?(0,x.__)("Persona","wp-parsely"):i,o=e.onChange,a=e.onDropdownChange,l=e.disabled,c=void 0!==l&&l,u=e.allowCustom,p=void 0!==u&&u;return(0,f.jsxs)(h.Disabled,{isDisabled:c,children:[s&&(0,f.jsx)("div",{className:"wp-parsely-dropdown-label",children:s}),(0,f.jsx)(h.DropdownMenu,{label:(0,x.__)("Persona","wp-parsely"),className:"parsely-persona-selector-dropdown"+(c?" is-disabled":""),popoverProps:{className:"wp-parsely-popover"},toggleProps:{children:(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{className:"parsely-persona-selector-label",children:ce(t)?oe.custom.label:r}),(0,f.jsx)(se,{})]})},children:function(e){var n=e.onClose;return(0,f.jsx)(h.MenuGroup,{label:(0,x.__)("Persona","wp-parsely"),children:(0,f.jsx)(f.Fragment,{children:ae.map((function(e){if(!p&&"custom"===e)return null;var r=oe[e],i=e===t||ce(t)&&"custom"===e;return(0,f.jsxs)(h.MenuItem,{isSelected:i,className:i?"is-selected":"",role:"menuitemradio",onClick:function(){null==a||a(e),o(e),n(),"custom"===e&&setTimeout((function(){var e=document.querySelector(".parsely-persona-selector-custom input");e&&e.focus()}),0)},children:[r.icon&&(0,f.jsx)(ie,{icon:r.icon}),r.label]},e)}))})})}}),p&&ce(t)&&(0,f.jsx)(ue,{onChange:function(e){o(""!==e?e:"custom")},value:"custom"===t?"":t})]})},de={neutral:{label:(0,x.__)("Neutral","wp-parsely")},formal:{label:(0,x.__)("Formal","wp-parsely")},humorous:{label:(0,x.__)("Humorous","wp-parsely")},confident:{label:(0,x.__)("Confident","wp-parsely")},provocative:{label:(0,x.__)("Provocative","wp-parsely")},serious:{label:(0,x.__)("Serious","wp-parsely")},inspirational:{label:(0,x.__)("Inspirational","wp-parsely")},skeptical:{label:(0,x.__)("Skeptical","wp-parsely")},conversational:{label:(0,x.__)("Conversational","wp-parsely")},analytical:{label:(0,x.__)("Analytical","wp-parsely")},custom:{label:(0,x.__)("Custom Tone","wp-parsely"),icon:re}},fe=Object.keys(de),he=function(e){return"custom"===e||""===e?de.custom.label:ve(e)?e:de[e].label},ve=function(e){return!fe.includes(e)||"custom"===e},ge=function(e){var t=e.value,n=e.onChange,r=(0,_.useState)(""),i=r[0],s=r[1],o=(0,ne.useDebounce)(n,500);return(0,f.jsx)("div",{className:"parsely-tone-selector-custom",children:(0,f.jsx)(h.TextControl,{value:i||t,placeholder:(0,x.__)("Enter a custom tone","wp-parsely"),onChange:function(e){if(""===e)return n(""),void s("");e.length>32&&(e=e.slice(0,32)),o(e),s(e)}})})},ye=function(e){var t=e.tone,n=e.value,r=void 0===n?(0,x.__)("Select a tone","wp-parsely"):n,i=e.label,s=void 0===i?(0,x.__)("Tone","wp-parsely"):i,o=e.onChange,a=e.onDropdownChange,l=e.disabled,c=void 0!==l&&l,u=e.allowCustom,p=void 0!==u&&u;return(0,f.jsxs)(h.Disabled,{isDisabled:c,children:[(0,f.jsx)("div",{className:"wp-parsely-dropdown-label",children:s}),(0,f.jsx)(h.DropdownMenu,{label:(0,x.__)("Tone","wp-parsely"),className:"parsely-tone-selector-dropdown"+(c?" is-disabled":""),popoverProps:{className:"wp-parsely-popover"},toggleProps:{children:(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{className:"parsely-tone-selector-label",children:ve(t)?de.custom.label:r}),(0,f.jsx)(se,{})]})},children:function(e){var n=e.onClose;return(0,f.jsx)(h.MenuGroup,{label:(0,x.__)("Select a tone","wp-parsely"),children:(0,f.jsx)(f.Fragment,{children:fe.map((function(e){if(!p&&"custom"===e)return null;var r=de[e],i=e===t||ve(t)&&"custom"===e;return(0,f.jsxs)(h.MenuItem,{isSelected:i,className:i?"is-selected":"",role:"menuitemradio",onClick:function(){null==a||a(e),o(e),n(),"custom"===e&&setTimeout((function(){var e=document.querySelector(".parsely-tone-selector-custom input");e&&e.focus()}),0)},children:[r.icon&&(0,f.jsx)(ie,{icon:r.icon}),r.label]},e)}))})})}}),p&&ve(t)&&(0,f.jsx)(ge,{onChange:function(e){o(""!==e?e:"custom")},value:"custom"===t?"":t})]})},me=function(e){var t=e.isLoading,n=e.onPersonaChange,r=e.onToneChange,i=e.persona,s=e.tone;return(0,f.jsxs)("div",{className:"excerpt-suggestions-settings",children:[(0,f.jsx)(ye,{tone:s,value:he(s),onChange:function(e){r(e)},onDropdownChange:function(e){P.trackEvent("excerpt_generator_ai_tone_changed",{selectedTone:e})},disabled:t,allowCustom:!0}),(0,f.jsx)(pe,{persona:i,value:le(i),onChange:function(e){n(e)},onDropdownChange:function(e){P.trackEvent("excerpt_generator_ai_persona_changed",{persona:e})},disabled:t,allowCustom:!0})]})},we=window.wp.url,be=function(){function e(){this.abortControllers=new Map}return e.prototype.cancelRequest=function(e){if(e)(t=this.abortControllers.get(e))&&(t.abort(),this.abortControllers.delete(e));else{var t,n=Array.from(this.abortControllers.keys()).pop();n&&(t=this.abortControllers.get(n))&&(t.abort(),this.abortControllers.delete(n))}},e.prototype.cancelAll=function(){this.abortControllers.forEach((function(e){return e.abort()})),this.abortControllers.clear()},e.prototype.getOrCreateController=function(e){if(e&&this.abortControllers.has(e))return{abortController:this.abortControllers.get(e),abortId:e};var t=null!=e?e:"auto-"+Date.now(),n=new AbortController;return this.abortControllers.set(t,n),{abortController:n,abortId:t}},e.prototype.fetch=function(e,t){return n=this,r=void 0,s=function(){var n,r,i,s,o,a;return function(e,t){var n,r,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0?(0,x.sprintf)( +!function(){"use strict";var e={20:function(e,t,n){var r=n(609),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:o,_owner:a.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},848:function(e,t,n){e.exports=n(20)},609:function(e){e.exports=window.React}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(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=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){n.d({},{w:function(){return Sr},_:function(){return jr}});var e,t,r,i,o,s,a,l,c,u,p,d,f=n(848),h=window.wp.components,v=window.wp.data,g=window.wp.domReady,y=n.n(g);void 0!==window.wp&&(p=null!==(t=null===(e=window.wp.editor)||void 0===e?void 0:e.PluginDocumentSettingPanel)&&void 0!==t?t:null!==(i=null===(r=window.wp.editPost)||void 0===r?void 0:r.PluginDocumentSettingPanel)&&void 0!==i?i:null===(o=window.wp.editSite)||void 0===o?void 0:o.PluginDocumentSettingPanel,d=null!==(a=null===(s=window.wp.editor)||void 0===s?void 0:s.PluginSidebar)&&void 0!==a?a:null!==(c=null===(l=window.wp.editPost)||void 0===l?void 0:l.PluginSidebar)&&void 0!==c?c:null===(u=window.wp.editSite)||void 0===u?void 0:u.PluginSidebar);var m,w,b,_=window.wp.element,x=window.wp.i18n,k=window.wp.primitives,S=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{fillRule:"evenodd",d:"M11.25 5h1.5v15h-1.5V5zM6 10h1.5v10H6V10zm12 4h-1.5v6H18v-6z",clipRule:"evenodd"})}),j=window.wp.plugins,P=function(){function e(){this._tkq=[],this.isLoaded=!1,this.isEnabled=!1,"undefined"!=typeof wpParselyTracksTelemetry&&(this.isEnabled=!0,this.loadTrackingLibrary())}return e.getInstance=function(){return window.wpParselyTelemetryInstance||Object.defineProperty(window,"wpParselyTelemetryInstance",{value:new e,writable:!1,configurable:!1,enumerable:!1}),window.wpParselyTelemetryInstance},e.prototype.loadTrackingLibrary=function(){var e=this,t=document.createElement("script");t.async=!0,t.src="//stats.wp.com/w.js",t.onload=function(){e.isLoaded=!0,e._tkq=window._tkq||[]},document.head.appendChild(t)},e.trackEvent=function(t){return n=this,r=arguments,o=function(t,n){var r;return void 0===n&&(n={}),function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=1e4&&(clearInterval(o),n("Telemetry library not loaded"))}),100);else n("Telemetry not enabled")}))},e.prototype.trackEvent=function(t,n){var r;this.isLoaded?(0!==t.indexOf(e.TRACKS_PREFIX)&&(t=e.TRACKS_PREFIX+t),this.isEventNameValid(t)?(n=this.prepareProperties(n),null===(r=this._tkq)||void 0===r||r.push(["recordEvent",t,n])):console.error("Error tracking event: Invalid event name")):console.error("Error tracking event: Telemetry not loaded")},e.prototype.isTelemetryEnabled=function(){return this.isEnabled},e.prototype.isProprietyValid=function(t){return e.PROPERTY_REGEX.test(t)},e.prototype.isEventNameValid=function(t){return e.EVENT_NAME_REGEX.test(t)},e.prototype.prepareProperties=function(e){return(e=this.sanitizeProperties(e)).parsely_version=wpParselyTracksTelemetry.version,wpParselyTracksTelemetry.user&&(e._ut=wpParselyTracksTelemetry.user.type,e._ui=wpParselyTracksTelemetry.user.id),wpParselyTracksTelemetry.vipgo_env&&(e.vipgo_env=wpParselyTracksTelemetry.vipgo_env),this.sanitizeProperties(e)},e.prototype.sanitizeProperties=function(e){var t=this,n={};return Object.keys(e).forEach((function(r){t.isProprietyValid(r)&&(n[r]=e[r])})),n},e.TRACKS_PREFIX="wpparsely_",e.EVENT_NAME_REGEX=/^(([a-z0-9]+)_){2}([a-z0-9_]+)$/,e.PROPERTY_REGEX=/^[a-z_][a-z0-9_]*$/,e}(),T=(P.trackEvent,function(){return(0,f.jsx)(h.SVG,{"aria-hidden":"true",version:"1.1",viewBox:"0 0 15 15",width:"15",height:"15",xmlns:"http://www.w3.org/2000/svg",children:(0,f.jsx)(h.Path,{d:"M0 14.0025V11.0025L7.5 3.5025L10.5 6.5025L3 14.0025H0ZM12 5.0025L13.56 3.4425C14.15 2.8525 14.15 1.9025 13.56 1.3225L12.68 0.4425C12.09 -0.1475 11.14 -0.1475 10.56 0.4425L9 2.0025L12 5.0025Z"})})}),E=function(e){var t=e.size,n=void 0===t?24:t,r=e.className,i=void 0===r?"wp-parsely-icon":r;return(0,f.jsxs)(h.SVG,{className:i,height:n,viewBox:"0 0 60 65",width:n,xmlns:"http://www.w3.org/2000/svg",children:[(0,f.jsx)(h.Path,{fill:"#5ba745",d:"M23.72,51.53c0-.18,0-.34-.06-.52a13.11,13.11,0,0,0-2.1-5.53A14.74,14.74,0,0,0,19.12,43c-.27-.21-.5-.11-.51.22l-.24,3.42c0,.33-.38.35-.49,0l-1.5-4.8a1.4,1.4,0,0,0-.77-.78,23.91,23.91,0,0,0-3.1-.84c-1.38-.24-3.39-.39-3.39-.39-.34,0-.45.21-.25.49l2.06,3.76c.2.27,0,.54-.29.33l-4.51-3.6a3.68,3.68,0,0,0-2.86-.48c-1,.16-2.44.46-2.44.46a.68.68,0,0,0-.39.25.73.73,0,0,0-.14.45S.41,43,.54,44a3.63,3.63,0,0,0,1.25,2.62L6.48,50c.28.2.09.49-.23.37l-4.18-.94c-.32-.12-.5,0-.4.37,0,0,.69,1.89,1.31,3.16a24,24,0,0,0,1.66,2.74,1.34,1.34,0,0,0,1,.52l5,.13c.33,0,.41.38.1.48L7.51,58c-.31.1-.34.35-.07.55a14.29,14.29,0,0,0,3.05,1.66,13.09,13.09,0,0,0,5.9.5,25.13,25.13,0,0,0,4.34-1,9.55,9.55,0,0,1-.08-1.2,9.32,9.32,0,0,1,3.07-6.91"}),(0,f.jsx)(h.Path,{fill:"#5ba745",d:"M59.7,41.53a.73.73,0,0,0-.14-.45.68.68,0,0,0-.39-.25s-1.43-.3-2.44-.46a3.64,3.64,0,0,0-2.86.48l-4.51,3.6c-.26.21-.49-.06-.29-.33l2.06-3.76c.2-.28.09-.49-.25-.49,0,0-2,.15-3.39.39a23.91,23.91,0,0,0-3.1.84,1.4,1.4,0,0,0-.77.78l-1.5,4.8c-.11.32-.48.3-.49,0l-.24-3.42c0-.33-.24-.43-.51-.22a14.74,14.74,0,0,0-2.44,2.47A13.11,13.11,0,0,0,36.34,51c0,.18,0,.34-.06.52a9.26,9.26,0,0,1,3,8.1,24.1,24.1,0,0,0,4.34,1,13.09,13.09,0,0,0,5.9-.5,14.29,14.29,0,0,0,3.05-1.66c.27-.2.24-.45-.07-.55l-3.22-1.17c-.31-.1-.23-.47.1-.48l5-.13a1.38,1.38,0,0,0,1-.52A24.6,24.6,0,0,0,57,52.92c.61-1.27,1.31-3.16,1.31-3.16.1-.33-.08-.49-.4-.37l-4.18.94c-.32.12-.51-.17-.23-.37l4.69-3.34A3.63,3.63,0,0,0,59.46,44c.13-1,.24-2.47.24-2.47"}),(0,f.jsx)(h.Path,{fill:"#5ba745",d:"M46.5,25.61c0-.53-.35-.72-.8-.43l-4.86,2.66c-.45.28-.56-.27-.23-.69l4.66-6.23a2,2,0,0,0,.28-1.68,36.51,36.51,0,0,0-2.19-4.89,34,34,0,0,0-2.81-3.94c-.33-.41-.74-.35-.91.16l-2.28,5.68c-.16.5-.6.48-.59-.05l.28-8.93a2.54,2.54,0,0,0-.66-1.64S35,4.27,33.88,3.27,30.78.69,30.78.69a1.29,1.29,0,0,0-1.54,0s-1.88,1.49-3.12,2.59-2.48,2.35-2.48,2.35A2.5,2.5,0,0,0,23,7.27l.27,8.93c0,.53-.41.55-.58.05l-2.29-5.69c-.17-.5-.57-.56-.91-.14a35.77,35.77,0,0,0-3,4.2,35.55,35.55,0,0,0-2,4.62,2,2,0,0,0,.27,1.67l4.67,6.24c.33.42.23,1-.22.69l-4.87-2.66c-.45-.29-.82-.1-.82.43a18.6,18.6,0,0,0,.83,5.07,20.16,20.16,0,0,0,5.37,7.77c3.19,3,5.93,7.8,7.45,11.08A9.6,9.6,0,0,1,30,49.09a9.31,9.31,0,0,1,2.86.45c1.52-3.28,4.26-8.11,7.44-11.09a20.46,20.46,0,0,0,5.09-7,19,19,0,0,0,1.11-5.82"}),(0,f.jsx)(h.Path,{fill:"#5ba745",d:"M36.12,58.44A6.12,6.12,0,1,1,30,52.32a6.11,6.11,0,0,1,6.12,6.12"})]})},L=function(){return L=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?"".concat(i," ").concat(n):n)||this).hint=null,o.name=o.constructor.name,o.code=r;var s=[U.AccessToFeatureDisabled,U.ParselyApiForbidden,U.ParselyApiResponseContainsError,U.ParselyApiReturnedNoData,U.ParselyApiReturnedTooManyResults,U.PluginCredentialsNotSetMessageDetected,U.PluginSettingsApiSecretNotSet,U.PluginSettingsSiteIdNotSet,U.PostIsNotPublished,U.UnknownError,U.ParselySuggestionsApiAuthUnavailable,U.ParselySuggestionsApiNoAuthentication,U.ParselySuggestionsApiNoAuthorization,U.ParselySuggestionsApiNoData,U.ParselySuggestionsApiSchemaError];return o.retryFetch=!s.includes(o.code),Object.setPrototypeOf(o,t.prototype),o.code===U.AccessToFeatureDisabled?o.message=(0,x.__)("Access to this feature is disabled by the site's administration.","wp-parsely"):o.code===U.ParselySuggestionsApiNoAuthorization?o.message=(0,x.__)('This AI-powered feature is opt-in. To gain access, please submit a request here.',"wp-parsely"):o.code===U.ParselySuggestionsApiOpenAiError||o.code===U.ParselySuggestionsApiOpenAiUnavailable?o.message=(0,x.__)("The Parse.ly API returned an internal server error. Please retry with a different input, or try again later.","wp-parsely"):o.code===U.HttpRequestFailed&&o.message.includes("cURL error 28")?o.message=(0,x.__)("The Parse.ly API did not respond in a timely manner. Please try again later.","wp-parsely"):o.code===U.ParselySuggestionsApiSchemaError?o.message=(0,x.__)("The Parse.ly API returned a validation error. Please try again with different parameters.","wp-parsely"):o.code===U.ParselySuggestionsApiNoData?o.message=(0,x.__)("The Parse.ly API couldn't find any relevant data to fulfill the request. Please retry with a different input.","wp-parsely"):o.code===U.ParselySuggestionsApiOpenAiSchema?o.message=(0,x.__)("The Parse.ly API returned an incorrect response. Please try again later.","wp-parsely"):o.code===U.ParselySuggestionsApiAuthUnavailable&&(o.message=(0,x.__)("The Parse.ly API is currently unavailable. Please try again later.","wp-parsely")),o}return ee(t,e),t.prototype.Message=function(e){return void 0===e&&(e=null),[U.PluginCredentialsNotSetMessageDetected,U.PluginSettingsSiteIdNotSet,U.PluginSettingsApiSecretNotSet].includes(this.code)?X(e):(this.code===U.FetchError&&(this.hint=this.Hint((0,x.__)("This error can sometimes be caused by ad-blockers or browser tracking protections. Please add this site to any applicable allow lists and try again.","wp-parsely"))),this.code!==U.ParselyApiForbidden&&this.code!==U.ParselySuggestionsApiNoAuthentication||(this.hint=this.Hint((0,x.__)("Please ensure that the Site ID and API Secret given in the plugin's settings are correct.","wp-parsely"))),this.code===U.HttpRequestFailed&&(this.hint=this.Hint((0,x.__)("The Parse.ly API cannot be reached. Please verify that you are online.","wp-parsely"))),(0,f.jsx)(Q,{className:null==e?void 0:e.className,testId:"error",children:"

".concat(this.message,"

").concat(this.hint?this.hint:"")}))},t.prototype.Hint=function(e){return'

'.concat((0,x.__)("Hint:","wp-parsely")," ").concat(e,"

")},t.prototype.createErrorSnackbar=function(){//.test(this.message)||(0,v.dispatch)("core/notices").createNotice("error",this.message,{type:"snackbar"})},t}(Error),ne=window.wp.compose,re=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})}),ie=(0,_.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,_.cloneElement)(e,{width:t,height:t,...n,ref:r})})),oe=function(){return(0,f.jsx)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:(0,f.jsx)(h.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M13.5034 7.91642L9 12.0104L4.49662 7.91642L5.25337 7.08398L8.99999 10.49L12.7466 7.08398L13.5034 7.91642Z",fill:"#1E1E1E"})})},se={journalist:{label:(0,x.__)("Journalist","wp-parsely")},editorialWriter:{label:(0,x.__)("Editorial Writer","wp-parsely")},investigativeReporter:{label:(0,x.__)("Investigative Reporter","wp-parsely")},techAnalyst:{label:(0,x.__)("Tech Analyst","wp-parsely")},businessAnalyst:{label:(0,x.__)("Business Analyst","wp-parsely")},culturalCommentator:{label:(0,x.__)("Cultural Commentator","wp-parsely")},scienceCorrespondent:{label:(0,x.__)("Science Correspondent","wp-parsely")},politicalAnalyst:{label:(0,x.__)("Political Analyst","wp-parsely")},healthWellnessAdvocate:{label:(0,x.__)("Health and Wellness Advocate","wp-parsely")},environmentalJournalist:{label:(0,x.__)("Environmental Journalist","wp-parsely")},custom:{label:(0,x.__)("Custom Persona","wp-parsely"),icon:re}},ae=Object.keys(se),le=function(e){return"custom"===e||""===e?se.custom.label:ce(e)?e:se[e].label},ce=function(e){return!ae.includes(e)||"custom"===e},ue=function(e){var t=e.value,n=e.onChange,r=(0,_.useState)(""),i=r[0],o=r[1],s=(0,ne.useDebounce)(n,500);return(0,f.jsx)("div",{className:"parsely-persona-selector-custom",children:(0,f.jsx)(h.TextControl,{value:i||t,placeholder:(0,x.__)("Enter a custom persona…","wp-parsely"),onChange:function(e){if(""===e)return n(""),void o("");e.length>32&&(e=e.slice(0,32)),s(e),o(e)}})})},pe=function(e){var t=e.persona,n=e.value,r=void 0===n?(0,x.__)("Select a persona…","wp-parsely"):n,i=e.label,o=void 0===i?(0,x.__)("Persona","wp-parsely"):i,s=e.onChange,a=e.onDropdownChange,l=e.disabled,c=void 0!==l&&l,u=e.allowCustom,p=void 0!==u&&u;return(0,f.jsxs)(h.Disabled,{isDisabled:c,children:[o&&(0,f.jsx)("div",{className:"wp-parsely-dropdown-label",children:o}),(0,f.jsx)(h.DropdownMenu,{label:(0,x.__)("Persona","wp-parsely"),className:"parsely-persona-selector-dropdown"+(c?" is-disabled":""),popoverProps:{className:"wp-parsely-popover"},toggleProps:{children:(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{className:"parsely-persona-selector-label",children:ce(t)?se.custom.label:r}),(0,f.jsx)(oe,{})]})},children:function(e){var n=e.onClose;return(0,f.jsx)(h.MenuGroup,{label:(0,x.__)("Persona","wp-parsely"),children:(0,f.jsx)(f.Fragment,{children:ae.map((function(e){if(!p&&"custom"===e)return null;var r=se[e],i=e===t||ce(t)&&"custom"===e;return(0,f.jsxs)(h.MenuItem,{isSelected:i,className:i?"is-selected":"",role:"menuitemradio",onClick:function(){null==a||a(e),s(e),n(),"custom"===e&&setTimeout((function(){var e=document.querySelector(".parsely-persona-selector-custom input");e&&e.focus()}),0)},children:[r.icon&&(0,f.jsx)(ie,{icon:r.icon}),r.label]},e)}))})})}}),p&&ce(t)&&(0,f.jsx)(ue,{onChange:function(e){s(""!==e?e:"custom")},value:"custom"===t?"":t})]})},de={neutral:{label:(0,x.__)("Neutral","wp-parsely")},formal:{label:(0,x.__)("Formal","wp-parsely")},humorous:{label:(0,x.__)("Humorous","wp-parsely")},confident:{label:(0,x.__)("Confident","wp-parsely")},provocative:{label:(0,x.__)("Provocative","wp-parsely")},serious:{label:(0,x.__)("Serious","wp-parsely")},inspirational:{label:(0,x.__)("Inspirational","wp-parsely")},skeptical:{label:(0,x.__)("Skeptical","wp-parsely")},conversational:{label:(0,x.__)("Conversational","wp-parsely")},analytical:{label:(0,x.__)("Analytical","wp-parsely")},custom:{label:(0,x.__)("Custom Tone","wp-parsely"),icon:re}},fe=Object.keys(de),he=function(e){return"custom"===e||""===e?de.custom.label:ve(e)?e:de[e].label},ve=function(e){return!fe.includes(e)||"custom"===e},ge=function(e){var t=e.value,n=e.onChange,r=(0,_.useState)(""),i=r[0],o=r[1],s=(0,ne.useDebounce)(n,500);return(0,f.jsx)("div",{className:"parsely-tone-selector-custom",children:(0,f.jsx)(h.TextControl,{value:i||t,placeholder:(0,x.__)("Enter a custom tone","wp-parsely"),onChange:function(e){if(""===e)return n(""),void o("");e.length>32&&(e=e.slice(0,32)),s(e),o(e)}})})},ye=function(e){var t=e.tone,n=e.value,r=void 0===n?(0,x.__)("Select a tone","wp-parsely"):n,i=e.label,o=void 0===i?(0,x.__)("Tone","wp-parsely"):i,s=e.onChange,a=e.onDropdownChange,l=e.disabled,c=void 0!==l&&l,u=e.allowCustom,p=void 0!==u&&u;return(0,f.jsxs)(h.Disabled,{isDisabled:c,children:[(0,f.jsx)("div",{className:"wp-parsely-dropdown-label",children:o}),(0,f.jsx)(h.DropdownMenu,{label:(0,x.__)("Tone","wp-parsely"),className:"parsely-tone-selector-dropdown"+(c?" is-disabled":""),popoverProps:{className:"wp-parsely-popover"},toggleProps:{children:(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{className:"parsely-tone-selector-label",children:ve(t)?de.custom.label:r}),(0,f.jsx)(oe,{})]})},children:function(e){var n=e.onClose;return(0,f.jsx)(h.MenuGroup,{label:(0,x.__)("Select a tone","wp-parsely"),children:(0,f.jsx)(f.Fragment,{children:fe.map((function(e){if(!p&&"custom"===e)return null;var r=de[e],i=e===t||ve(t)&&"custom"===e;return(0,f.jsxs)(h.MenuItem,{isSelected:i,className:i?"is-selected":"",role:"menuitemradio",onClick:function(){null==a||a(e),s(e),n(),"custom"===e&&setTimeout((function(){var e=document.querySelector(".parsely-tone-selector-custom input");e&&e.focus()}),0)},children:[r.icon&&(0,f.jsx)(ie,{icon:r.icon}),r.label]},e)}))})})}}),p&&ve(t)&&(0,f.jsx)(ge,{onChange:function(e){s(""!==e?e:"custom")},value:"custom"===t?"":t})]})},me=function(e){var t=e.isLoading,n=e.onPersonaChange,r=e.onToneChange,i=e.persona,o=e.tone;return(0,f.jsxs)("div",{className:"excerpt-suggestions-settings",children:[(0,f.jsx)(ye,{tone:o,value:he(o),onChange:function(e){r(e)},onDropdownChange:function(e){P.trackEvent("excerpt_generator_ai_tone_changed",{selectedTone:e})},disabled:t,allowCustom:!0}),(0,f.jsx)(pe,{persona:i,value:le(i),onChange:function(e){n(e)},onDropdownChange:function(e){P.trackEvent("excerpt_generator_ai_persona_changed",{persona:e})},disabled:t,allowCustom:!0})]})},we=window.wp.url,be=function(){function e(){this.abortControllers=new Map}return e.prototype.cancelRequest=function(e){if(e)(t=this.abortControllers.get(e))&&(t.abort(),this.abortControllers.delete(e));else{var t,n=Array.from(this.abortControllers.keys()).pop();n&&(t=this.abortControllers.get(n))&&(t.abort(),this.abortControllers.delete(n))}},e.prototype.cancelAll=function(){this.abortControllers.forEach((function(e){return e.abort()})),this.abortControllers.clear()},e.prototype.getOrCreateController=function(e){if(e&&this.abortControllers.has(e))return{abortController:this.abortControllers.get(e),abortId:e};var t=null!=e?e:"auto-"+Date.now(),n=new AbortController;return this.abortControllers.set(t,n),{abortController:n,abortId:t}},e.prototype.fetch=function(e,t){return n=this,r=void 0,o=function(){var n,r,i,o,s,a;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0?(0,x.sprintf)( // Translators: %1$s the number of words in the excerpt. // Translators: %1$s the number of words in the excerpt. -(0,x._n)("%1$s word","%1$s words",e,"wp-parsely"),e):"")}),[u.currentExcerpt,D]),(0,_.useEffect)((function(){var e=document.querySelector(".editor-post-excerpt textarea");e&&(e.scrollTop=0)}),[u.newExcerptGeneratedCount]);var G=(0,f.jsxs)("div",{className:"wp-parsely-excerpt-generator-header",children:[(0,f.jsx)(E,{size:16}),(0,f.jsxs)("div",{className:"wp-parsely-excerpt-generator-header-label",children:[(0,x.__)("Generate With Parse.ly","wp-parsely"),(0,f.jsx)("span",{className:"beta-label",children:(0,x.__)("Beta","wp-parsely")})]})]}),H=n?(0,x.__)("Write an excerpt (optional)","wp-parsely"):(0,x.__)("Excerpt","wp-parsely");return(0,f.jsxs)("div",{className:"editor-post-excerpt",children:[!n&&(0,f.jsxs)("div",{className:"excerpt-suggestions-text",children:[(0,x.__)("Use Parse.ly AI to generate a concise, engaging excerpt for your post.","wp-parsely"),(0,f.jsxs)(h.Button,{href:"https://docs.wpvip.com/parse-ly/wp-parsely-features/excerpt-suggestions/",target:"_blank",variant:"link",rel:"noopener",children:[(0,x.__)("Learn more about Parse.ly AI","wp-parsely"),(0,f.jsx)(h.Icon,{icon:Y,size:18,className:"parsely-external-link-icon"})]})]}),(0,f.jsxs)("div",{style:{position:"relative"},children:[g&&(0,f.jsx)("div",{className:"editor-post-excerpt__loading_animation",children:(0,f.jsx)(Te,{})}),(0,f.jsx)(h.TextareaControl,{__nextHasNoMarginBottom:!0,label:H,className:"editor-post-excerpt__textarea",onChange:function(e){u.isUnderReview||I({excerpt:e}),p(ke(ke({},u),{currentExcerpt:e})),b(!0)},onKeyUp:function(){var e;if(w)b(!1);else{var t=document.querySelector(".editor-post-excerpt textarea"),n=null!==(e=null==t?void 0:t.textContent)&&void 0!==e?e:"";p(ke(ke({},u),{currentExcerpt:n}))}},value:g?"":u.isUnderReview?u.currentExcerpt:D,help:A||null})]}),n&&(0,f.jsxs)(h.Button,{href:(0,x.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),target:"_blank",variant:"link",rel:"noopener",children:[(0,x.__)("Learn more about manual excerpts","wp-parsely"),(0,f.jsx)(h.Icon,{icon:Y,size:18,className:"parsely-external-link-icon"})]}),(0,f.jsxs)("div",{className:"wp-parsely-excerpt-generator"+(n?" is-doc-set-panel":""),children:[a&&(0,f.jsx)(h.Notice,{className:"wp-parsely-excerpt-generator-error",onRemove:function(){return l(void 0)},status:"info",children:a.Message()}),u.isUnderReview?(0,f.jsxs)(f.Fragment,{children:[n&&G,(0,f.jsxs)("div",{className:"wp-parsely-excerpt-suggestions-review-controls",children:[(0,f.jsx)(h.Button,{variant:"secondary",onClick:function(){return Se(void 0,void 0,void 0,(function(){return je(this,(function(e){switch(e.label){case 0:return[4,I({excerpt:u.currentExcerpt})];case 1:return e.sent(),p(ke(ke({},u),{isUnderReview:!1})),P.trackEvent("excerpt_generator_accepted"),[2]}}))}))},children:(0,x.__)("Accept","wp-parsely")}),(0,f.jsx)(h.Button,{isDestructive:!0,variant:"secondary",onClick:function(){return Se(void 0,void 0,void 0,(function(){return je(this,(function(e){return I({excerpt:u.oldExcerpt}),p(ke(ke({},u),{currentExcerpt:u.oldExcerpt,isUnderReview:!1})),P.trackEvent("excerpt_generator_discarded"),[2]}))}))},children:(0,x.__)("Discard","wp-parsely")})]})]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(me,{isLoading:g,onPersonaChange:function(e){R("Persona",e),j(e)},onSettingChange:R,onToneChange:function(e){R("Tone",e),C(e)},persona:i.ExcerptSuggestions.Persona,tone:i.ExcerptSuggestions.Tone}),n&&G,(0,f.jsx)("div",{className:"excerpt-suggestions-generate",children:(0,f.jsxs)(h.Button,{onClick:function(){return Se(void 0,void 0,void 0,(function(){var e,t;return je(this,(function(n){switch(n.label){case 0:y(!0),l(void 0),n.label=1;case 1:return n.trys.push([1,3,4,5]),P.trackEvent("excerpt_generator_pressed"),[4,xe.getInstance().generateExcerpt(V,F,S,L)];case 2:return e=n.sent(),p({currentExcerpt:e,isUnderReview:!0,newExcerptGeneratedCount:u.newExcerptGeneratedCount+1,oldExcerpt:D}),[3,5];case 3:return(t=n.sent())instanceof te?l(t):(l(new te((0,x.__)("An unknown error occurred.","wp-parsely"),U.UnknownError)),console.error(t)),[3,5];case 4:return y(!1),[7];case 5:return[2]}}))}))},variant:"primary",isBusy:g,disabled:g||!F,children:[g&&(0,x.__)("Generating Excerpt…","wp-parsely"),!g&&u.newExcerptGeneratedCount>0&&(0,x.__)("Regenerate Excerpt","wp-parsely"),!g&&0===u.newExcerptGeneratedCount&&(0,x.__)("Generate Excerpt","wp-parsely")]})})]}),n&&(0,f.jsxs)(h.Button,{href:"https://docs.wpvip.com/parse-ly/wp-parsely-features/excerpt-suggestions/",target:"_blank",variant:"link",rel:"noopener",children:[(0,x.__)("Learn more about Parse.ly AI","wp-parsely"),(0,f.jsx)(h.Icon,{icon:Y,size:18,className:"parsely-external-link-icon"})]})]})]})},Te=function(){return(0,f.jsx)(h.Animate,{type:"loading",children:function(e){var t=e.className;return(0,f.jsx)("span",{className:t,children:(0,x.__)("Generating…","wp-parsely")})}})},Ee=function(){return(0,f.jsx)(q.PostTypeSupportCheck,{supportKeys:"excerpt",children:(0,f.jsx)(p,{name:"parsely-post-excerpt",title:(0,x.__)("Excerpt","wp-parsely"),children:(0,f.jsx)(D,{endpoint:"editor-sidebar",defaultSettings:jr(window.wpParselyContentHelperSettings),children:(0,f.jsx)(Pe,{isDocumentSettingPanel:!0})})})})},Le=function(e,t){var n,r,i;return t!==Sr?e:H().ExcerptSuggestions?((null===(n=null===window||void 0===window?void 0:window.Jetpack_Editor_Initial_State)||void 0===n?void 0:n.available_blocks["ai-content-lens"])&&(console.log("Parse.ly: Jetpack AI is enabled and will be disabled."),(0,$.removeFilter)("blocks.registerBlockType","jetpack/ai-content-lens-features")),(0,j.registerPlugin)("wp-parsely-excerpt-suggestions",{render:function(){return(0,f.jsx)(Ee,{})}}),(null===(r=(0,v.dispatch)("core/editor"))||void 0===r?void 0:r.removeEditorPanel)?null===(i=(0,v.dispatch)("core/editor"))||void 0===i||i.removeEditorPanel("post-excerpt"):null==Z||Z.removeEditorPanel("post-excerpt"),e):e};function Ce(){(0,$.addFilter)("plugins.registerPlugin","wp-parsely-excerpt-suggestions",Le,1e3)}var Ne=window.wp.blockEditor;function Ae(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Oe=function(){return Oe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)return r(e.innerBlocks,t[s].innerBlocks);if(JSON.stringify(e)!==JSON.stringify(t[s])){var o=t[s],a=i.parseFromString(e.attributes.content||"","text/html"),l=i.parseFromString((null==o?void 0:o.attributes.content)||"","text/html"),c=Array.from(a.querySelectorAll("a[data-smartlink]")),u=Array.from(l.querySelectorAll("a[data-smartlink]")),p=c.filter((function(e){return!u.some((function(t){return t.dataset.smartlink===e.dataset.smartlink}))})),d=u.filter((function(e){return!c.some((function(t){return t.dataset.smartlink===e.dataset.smartlink}))})),f=c.filter((function(e){var t=u.find((function(t){return t.dataset.smartlink===e.dataset.smartlink}));return t&&t.outerHTML!==e.outerHTML}));(p.length>0||d.length>0||f.length>0)&&n.push({block:e,prevBlock:o,addedLinks:p,removedLinks:d,changedLinks:f})}}}))};return r(e,t),n}(a,l.current);o.length>0&&(o.forEach((function(e){e.changedLinks.length>0&&n&&n(e),e.addedLinks.length>0&&i&&i(e),e.removedLinks.length>0&&r&&r(e)})),l.current=a)}),o);return e(t),function(){e.cancel()}}),[a,o,t,i,n,r]),null},Me=function(e){var t=e.value,n=e.onChange,r=e.max,i=e.min,s=e.suffix,o=e.size,a=e.label,l=e.initialPosition,c=e.disabled,u=e.className;return(0,f.jsxs)("div",{className:"parsely-inputrange-control ".concat(u||""),children:[(0,f.jsx)(h.__experimentalHeading,{className:"parsely-inputrange-control__label",level:3,children:a}),(0,f.jsxs)("div",{className:"parsely-inputrange-control__controls",children:[(0,f.jsx)(h.__experimentalNumberControl,{disabled:c,value:t,suffix:(0,f.jsx)(h.__experimentalInputControlSuffixWrapper,{children:s}),size:null!=o?o:"__unstable-large",min:i,max:r,onChange:function(e){var t=parseInt(e,10);isNaN(t)||n(t)}}),(0,f.jsx)(h.RangeControl,{disabled:c,value:t,showTooltip:!1,initialPosition:l,onChange:function(e){n(e)},withInputField:!1,min:i,max:r})]})]})},De=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))},Fe=function(e,t){var n,r,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]

","\n\x3c!-- /wp:paragraph --\x3e");t&&d((0,Re.parse)(n))}),[s]),(0,f.jsxs)("div",{className:"smart-linking-review-suggestion",children:[(0,f.jsx)(h.KeyboardShortcuts,{shortcuts:{left:o,right:a,up:o,down:a}}),(0,f.jsx)("div",{className:"review-suggestion-post-title",children:null===(t=s.post_data)||void 0===t?void 0:t.title}),(0,f.jsxs)("div",{className:"review-suggestion-preview",children:[!(null===(n=s.post_data)||void 0===n?void 0:n.is_first_paragraph)&&(0,f.jsx)(_t,{topOrBottom:"top"}),(0,f.jsx)(bt,{block:p[0],link:s,useOriginalBlock:!0}),!(null===(r=s.post_data)||void 0===r?void 0:r.is_last_paragraph)&&(0,f.jsx)(_t,{topOrBottom:"bottom"})]}),(0,f.jsx)(h.__experimentalDivider,{}),(0,f.jsx)(xt,{link:s}),(0,f.jsxs)("div",{className:"review-controls",children:[(0,f.jsx)(h.Tooltip,{shortcut:"←",text:(0,x.__)("Previous","wp-parsely"),children:(0,f.jsx)(h.Button,{disabled:!l,className:"wp-parsely-review-suggestion-previous",onClick:o,icon:gt,children:(0,x.__)("Previous","wp-parsely")})}),(0,f.jsx)("div",{className:"reviews-controls-middle",children:(0,f.jsx)(h.Button,{target:"_blank",href:(null===(i=s.post_data)||void 0===i?void 0:i.edit_link)+"&smart-link="+s.uid,variant:"secondary",onClick:function(){P.trackEvent("smart_linking_open_in_editor_pressed",{type:"inbound",uid:s.uid})},children:(0,x.__)("Open in the Editor","wp-parsely")})}),(0,f.jsx)(h.Tooltip,{shortcut:"→",text:(0,x.__)("Next","wp-parsely"),children:(0,f.jsxs)(h.Button,{disabled:!c,onClick:a,className:"wp-parsely-review-suggestion-next",children:[(0,x.__)("Next","wp-parsely"),(0,f.jsx)(ie,{icon:yt})]})})]})]})},St=function(e){var t=e.size,n=void 0===t?24:t,r=e.className,i=void 0===r?"wp-parsely-icon":r;return(0,f.jsxs)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",className:i,width:n,height:n,viewBox:"0 0 24 24",fill:"none",children:[(0,f.jsx)(h.Path,{d:"M8.18983 5.90381L8.83642 7.54325L10.4758 8.18983L8.83642 8.8364L8.18983 10.4759L7.54324 8.8364L5.90381 8.18983L7.54324 7.54325L8.18983 5.90381Z"}),(0,f.jsx)(h.Path,{d:"M15.048 5.90381L15.9101 8.08972L18.0961 8.95186L15.9101 9.81397L15.048 11.9999L14.1859 9.81397L12 8.95186L14.1859 8.08972L15.048 5.90381Z"}),(0,f.jsx)(h.Path,{d:"M11.238 10.4761L12.3157 13.2085L15.048 14.2861L12.3157 15.3638L11.238 18.0962L10.1603 15.3638L7.42798 14.2861L10.1603 13.2085L11.238 10.4761Z"})]})},jt=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;ii.bottom)&&(n.scrollTop=r.offsetTop-n.offsetTop)}}}}),[t,l]);var u=function(){var e=document.querySelector(".smart-linking-review-sidebar-tabs [data-active-item]"),t=null==e?void 0:e.nextElementSibling;t||(t=document.querySelector('.smart-linking-review-sidebar-tabs [role="tab"]')),t&&t.click()},p=(0,f.jsxs)("span",{className:"smart-linking-menu-label",children:[(0,x.__)("NEW","wp-parsely"),(0,f.jsx)(St,{})]}),d=[];n&&n.length>0&&d.push({name:"outbound",title:(0,x.__)("Outbound","wp-parsely")}),r&&r.length>0&&d.push({name:"inbound",title:(0,x.__)("Inbound","wp-parsely")});var v="outbound";return d=d.filter((function(e){return"outbound"===e.name&&r&&0===r.length&&(e.title=(0,x.__)("Outbound Smart Links","wp-parsely"),v="outbound"),"inbound"===e.name&&n&&0===n.length&&(e.title=(0,x.__)("Inbound Smart Links","wp-parsely"),v="inbound"),e})),(0,f.jsxs)("div",{className:"smart-linking-review-sidebar",ref:s,children:[(0,f.jsx)(h.KeyboardShortcuts,{shortcuts:{tab:function(){return u()},"shift+tab":function(){return u()}}}),(0,f.jsx)(h.TabPanel,{className:"smart-linking-review-sidebar-tabs",initialTabName:v,tabs:d,onSelect:function(e){var t,s;"outbound"===e&&n&&n.length>0&&i(n[0]),"inbound"===e&&r&&r.length>0&&i(r[0]),P.trackEvent("smart_linking_modal_tab_selected",{tab:e,total_inbound:null!==(t=null==r?void 0:r.length)&&void 0!==t?t:0,total_outbound:null!==(s=null==n?void 0:n.length)&&void 0!==s?s:0})},children:function(e){return(0,f.jsxs)(f.Fragment,{children:["outbound"===e.name&&(0,f.jsx)(f.Fragment,{children:n&&0!==n.length?n.map((function(e,n){return(0,f.jsxs)(h.MenuItem,{ref:function(e){o.current[n]=e},className:(null==t?void 0:t.uid)===e.uid?"is-selected":"",role:"menuitemradio",isSelected:(null==t?void 0:t.uid)===e.uid,onClick:function(){return i(e)},children:[(0,f.jsx)("span",{className:"smart-linking-menu-item",children:e.text}),!e.applied&&p]},e.uid)})):(0,f.jsxs)(f.Fragment,{children:[" ",(0,x.__)("No outbound links found.","wp-parsely")]})}),"inbound"===e.name&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{className:"review-sidebar-tip",children:(0,x.__)("This section shows external posts that link back to the current post.","wp-parsely")}),r&&0!==r.length?r.map((function(e,r){var s;return(0,f.jsx)(h.MenuItem,{ref:function(e){o.current[(n?n.length:0)+r]=e},className:(null==t?void 0:t.uid)===e.uid?"is-selected":"",role:"menuitemradio",isSelected:(null==t?void 0:t.uid)===e.uid,onClick:function(){return i(e)},children:(0,f.jsx)("span",{className:"smart-linking-menu-item",children:null===(s=e.post_data)||void 0===s?void 0:s.title})},e.uid)})):(0,f.jsxs)(f.Fragment,{children:[" ",(0,x.__)("No inbound links found.","wp-parsely")]})]})]})}})]})},Tt=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.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"})}),Et=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),Lt=function(e){var t,n,r,i,s=null===(t=e.link.match)||void 0===t?void 0:t.blockId,o=(0,v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlock,r=t.getBlockParents;return s?{block:n(s),parents:r(s).map((function(e){return n(e)})).filter((function(e){return void 0!==e}))}:{block:void 0,parents:[]}}),[s]),a=o.block,l=o.parents;return a?(0,f.jsxs)("div",{className:"review-suggestions-breadcrumbs",children:[l.map((function(e,t){var n;return(0,f.jsxs)("span",{children:[(0,f.jsx)("span",{className:"breadcrumbs-parent-block",children:null===(n=(0,Re.getBlockType)(e.name))||void 0===n?void 0:n.title}),(0,f.jsx)("span",{className:"breadcrumbs-parent-separator",children:" / "})]},t)})),(0,f.jsxs)("span",{className:"breadcrumbs-current-block",children:[(0,f.jsx)("span",{className:"breadcrumbs-current-block-type",children:null===(n=(0,Re.getBlockType)(a.name))||void 0===n?void 0:n.title}),(null===(i=null===(r=a.attributes)||void 0===r?void 0:r.metadata)||void 0===i?void 0:i.name)&&(0,f.jsx)("span",{className:"breadcrumbs-current-block-name",children:a.attributes.metadata.name})]})]}):(0,f.jsx)(f.Fragment,{})},Ct=function(e){var t,n=e.link,r=(0,_.useState)(n.href),i=r[0],s=r[1],o=(0,_.useState)(null===(t=n.destination)||void 0===t?void 0:t.post_type),a=o[0],l=o[1],c=(0,_.useRef)(null),u=(0,v.useDispatch)(it).updateSmartLink;return(0,_.useEffect)((function(){n.destination?l(n.destination.post_type):(l((0,x.__)("External","wp-parsely")),dt.getInstance().getPostTypeByURL(n.href).then((function(e){e&&l(e.post_type),n.destination=e,u(n)})))}),[n,u]),(0,_.useEffect)((function(){var e=function(){if(c.current){var e=c.current.offsetWidth,t=Math.floor(e/8);s(function(e,t){var n=e.replace(/(^\w+:|^)\/\//,"").replace(/^www\./,"");if(!t||n.length<=t)return n;var r=n.split("/")[0],i=n.substring(r.length);t-=r.length;var s=Math.floor((t-3)/2),o=i.substring(0,s),a=i.substring(i.length-s);return"".concat(r).concat(o,"...").concat(a)}(n.href,t))}};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[n]),(0,f.jsx)(h.MenuItem,{ref:c,info:i,iconPosition:"left",icon:vt,shortcut:a,className:"block-editor-link-control__search-item wp-parsely-link-suggestion-link-details",children:n.title})},Nt=function(e){var t=e.link,n=e.onNext,r=e.onPrevious,i=e.onAccept,s=e.onReject,o=e.onRemove,a=e.onSelectInEditor,l=e.hasPrevious,c=e.hasNext;if(t&&void 0!==t.post_data)return(0,f.jsx)(kt,{link:t,onNext:n,onPrevious:r,onAccept:i,onReject:s,onRemove:o,onSelectInEditor:a,hasPrevious:l,hasNext:c});if(!(null==t?void 0:t.match))return(0,f.jsx)(f.Fragment,{children:(0,x.__)("This Smart Link does not have any matches in the current content.","wp-parsely")});var u=t.match.blockId,p=(0,v.select)("core/block-editor").getBlock(u),d=t.applied;return p?(0,f.jsxs)("div",{className:"smart-linking-review-suggestion",children:[(0,f.jsx)(h.KeyboardShortcuts,{shortcuts:{left:r,right:n,up:r,down:n,a:function(){t&&!t.applied&&i()},r:function(){t&&(t.applied?o():s())}}}),(0,f.jsx)(Lt,{link:t}),(0,f.jsx)("div",{className:"review-suggestion-preview",children:(0,f.jsx)(bt,{block:p,link:t})}),(0,f.jsx)(h.__experimentalDivider,{}),(0,f.jsx)(Ct,{link:t}),(0,f.jsxs)("div",{className:"review-controls",children:[(0,f.jsx)(h.Tooltip,{shortcut:"←",text:(0,x.__)("Previous","wp-parsely"),children:(0,f.jsx)(h.Button,{disabled:!l,className:"wp-parsely-review-suggestion-previous",onClick:r,icon:gt,children:(0,x.__)("Previous","wp-parsely")})}),(0,f.jsxs)("div",{className:"reviews-controls-middle",children:[!d&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(h.Tooltip,{shortcut:"R",text:(0,x.__)("Reject","wp-parsely"),children:(0,f.jsx)(h.Button,{className:"wp-parsely-review-suggestion-reject",icon:Tt,onClick:s,variant:"secondary",children:(0,x.__)("Reject","wp-parsely")})}),(0,f.jsx)(h.Tooltip,{shortcut:"A",text:(0,x.__)("Accept","wp-parsely"),children:(0,f.jsx)(h.Button,{className:"wp-parsely-review-suggestion-accept",icon:Et,onClick:i,variant:"secondary",children:(0,x.__)("Accept","wp-parsely")})})]}),d&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(h.Tooltip,{shortcut:"R",text:(0,x.__)("Remove","wp-parsely"),children:(0,f.jsx)(h.Button,{className:"wp-parsely-review-suggestion-reject",icon:Tt,onClick:o,variant:"secondary",children:(0,x.__)("Remove","wp-parsely")})}),(0,f.jsx)(h.Button,{className:"wp-parsely-review-suggestion-accept",onClick:a,variant:"secondary",children:(0,x.__)("Select in Editor","wp-parsely")})]})]}),(0,f.jsx)(h.Tooltip,{shortcut:"→",text:(0,x.__)("Next","wp-parsely"),children:(0,f.jsxs)(h.Button,{disabled:!c,onClick:n,className:"wp-parsely-review-suggestion-next",children:[(0,x.__)("Next","wp-parsely"),(0,f.jsx)(ie,{icon:yt})]})})]})]}):(0,f.jsx)(f.Fragment,{children:(0,x.__)("No block is selected.","wp-parsely")})},At=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))},Ot=function(e,t){var n,r,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&(a=o[0],(l=a.parentNode)&&(c=document.createTextNode(null!==(u=a.textContent)&&void 0!==u?u:""),l.replaceChild(c,a),K.updateBlockAttributes(n,{content:s.innerHTML}))),[4,L(t.uid)]):[2]):[2];case 1:return p.sent(),[2]}}))}))},N=(0,_.useCallback)((function(){c(!1),w().filter((function(e){return!e.applied})).length>0?o(!0):(W.unlockPostAutosaving("smart-linking-review-modal"),t())}),[w,t]),A=function(e){o(!1),e?(c(!1),T().then((function(){N()}))):c(!0)},O=function(){if(Ge(k)){var e=g.indexOf(k);if(!g[t=e+1])return;S(g[t])}else{var t;if(e=d.indexOf(k),!d[t=e+1])return;S(d[t])}},I=function(){if(Ge(k)){var e=g.indexOf(k);if(!g[t=e-1])return;S(g[t])}else{var t;if(e=d.indexOf(k),!d[t=e-1])return;S(d[t])}};return(0,_.useEffect)((function(){l?W.lockPostAutosaving("smart-linking-review-modal"):l&&0===p.length&&N()}),[l,t,p,N]),(0,_.useEffect)((function(){c(n)}),[n]),(0,f.jsxs)(f.Fragment,{children:[l&&(0,f.jsx)(h.Modal,{title:(0,x.__)("Review Smart Links","wp-parsely"),className:"wp-parsely-smart-linking-review-modal",onRequestClose:N,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,children:(0,f.jsxs)("div",{className:"smart-linking-modal-body",children:[(0,f.jsx)(Pt,{outboundLinks:d,inboundLinks:g,activeLink:k,setSelectedLink:S}),k&&(Ge(k)?(0,f.jsx)(kt,{link:k,onNext:O,onPrevious:I,hasNext:g.indexOf(k)0}):(0,f.jsx)(Nt,{link:k,hasNext:m().indexOf(k)0,onNext:O,onPrevious:I,onAccept:function(){return At(void 0,void 0,void 0,(function(){var e,t;return Ot(this,(function(n){switch(n.label){case 0:return k.match?(r(k),[4,(i=k.match.blockId,s=k,At(void 0,void 0,void 0,(function(){var e,t;return Ot(this,(function(n){switch(n.label){case 0:return(e=document.createElement("a")).href=s.href,e.title=s.title,e.setAttribute("data-smartlink",s.uid),(t=(0,v.select)("core/block-editor").getBlock(i))?(Ue(t,s,e),s.applied=!0,[4,E(s)]):[2];case 1:return n.sent(),[2]}}))})))]):[2];case 1:return n.sent(),P.trackEvent("smart_linking_link_accepted",{link:k.href,title:k.title,text:k.text,uid:k.uid}),0===y().length?(N(),[2]):(e=d.indexOf(k),d[t=e+1]?S(d[t]):S(d[0]),[2])}var i,s}))}))},onReject:function(){return At(void 0,void 0,void 0,(function(){var e,t;return Ot(this,(function(n){switch(n.label){case 0:return e=d.indexOf(k),d[t=e+1]?S(d[t]):d[0]?S(d[0]):N(),[4,L(k.uid)];case 1:return n.sent(),P.trackEvent("smart_linking_link_rejected",{link:k.href,title:k.title,text:k.text,uid:k.uid}),[2]}}))}))},onRemove:function(){return At(void 0,void 0,void 0,(function(){var e,t,n,r;return Ot(this,(function(i){switch(i.label){case 0:return k.match?(e=(0,v.select)("core/block-editor").getBlock(k.match.blockId))?(t=m(),n=t.indexOf(k),r=n-1,[4,C(e,k)]):[3,2]:[2];case 1:if(i.sent(),P.trackEvent("smart_linking_link_removed",{link:k.href,title:k.title,text:k.text,uid:k.uid}),0===(t=m()).length&&g.length>0)return S(g[0]),[2];if(0===t.length&&0===g.length)return N(),[2];if(t[r])return S(t[r]),[2];S(t[0]),i.label=2;case 2:return[2]}}))}))},onSelectInEditor:function(){if(k.match){var e=(0,v.select)("core/block-editor").getBlock(k.match.blockId);if(e){K.selectBlock(e.clientId);var t=document.querySelector('[data-block="'.concat(e.clientId,'"]'));t&&et(t,k.uid),P.trackEvent("smart_linking_select_in_editor_pressed",{type:"outbound",uid:k.uid}),N()}}}}))]})}),s&&(0,f.jsxs)(h.Modal,{title:(0,x.__)("Review Smart Links","wp-parsely"),onRequestClose:function(){return A(!1)},className:"wp-parsely-smart-linking-close-dialog",children:[(0,x.__)("Are you sure you want to close? All un-accepted smart links will not be added.","wp-parsely"),(0,f.jsxs)("div",{className:"smart-linking-close-dialog-actions",children:[(0,f.jsx)(h.Button,{variant:"secondary",onClick:function(){return A(!1)},children:(0,x.__)("Go Back","wp-parsely")}),(0,f.jsx)(h.Button,{variant:"primary",onClick:function(){return A(!0)},children:(0,x.__)("Close","wp-parsely")})]})]})]})})),Rt=function(){return Rt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&k("success",/* translators: %d: number of smart links applied */ /* translators: %d: number of smart links applied */ -(0,x.sprintf)((0,x.__)("%s smart links successfully applied.","wp-parsely"),g),{type:"snackbar"}):y(0)}),[w]),(0,_.useEffect)((function(){if(!(Object.keys(I).length>0)){var e={maxLinksPerPost:a.SmartLinking.MaxLinks};ee(e)}}),[ee,a]);var pe=(0,v.useSelect)((function(e){var t=e("core/block-editor"),r=t.getSelectedBlock,i=t.getBlock,s=t.getBlocks,o=e("core/editor"),a=o.getEditedPostContent,l=o.getCurrentPostAttribute;return{allBlocks:s(),selectedBlock:n?i(n):r(),postContent:a(),postPermalink:l("link")}}),[n]),de=pe.allBlocks,fe=pe.selectedBlock,he=pe.postContent,ve=pe.postPermalink,ge=function(e){return Bt(void 0,void 0,void 0,(function(){var t,n,r,i,s;return Mt(this,(function(o){switch(o.label){case 0:t=[],o.label=1;case 1:return o.trys.push([1,4,,9]),[4,re((n=L||!fe)?Qe.All:Qe.Selected)];case 2:return o.sent(),a=ve.replace(/^https?:\/\//i,""),r=["http://"+a,"https://"+a],i=function(e){return e.map((function(e){return e.href}))}(F),r.push.apply(r,i),[4,dt.getInstance().generateSmartLinks(fe&&!n?(0,Re.getBlockContent)(fe):he,O,r)];case 3:return t=o.sent(),[3,9];case 4:if((s=o.sent()).code&&s.code===U.ParselyAborted)throw s.numRetries=3-e,s;return e>0&&s.retryFetch?(console.error(s),[4,oe(!0)]):[3,8];case 5:return o.sent(),[4,ae()];case 6:return o.sent(),[4,ge(e-1)];case 7:return[2,o.sent()];case 8:throw s;case 9:return[2,t]}var a}))}))},ye=function(){for(var e=[],t=0;t[type="button"]').forEach((function(e){e.setAttribute("disabled","disabled")}))},be=function(){document.querySelectorAll('.edit-post-header__settings>[type="button"]').forEach((function(e){e.removeAttribute("disabled")})),W.unlockPostSaving("wp-parsely-block-overlay")};return(0,f.jsxs)("div",{className:"wp-parsely-smart-linking",children:[(0,f.jsx)(Be,{isDetectingEnabled:!E,onLinkRemove:function(e){!function(e){De(this,void 0,void 0,(function(){var t,n,r;return Fe(this,(function(i){switch(i.label){case 0:return[4,Ye((0,Re.getBlockContent)(e),e.clientId)];case 1:return t=i.sent(),n=t.missingSmartLinks,r=t.didAnyFixes,n.forEach((function(e){(0,v.dispatch)(it).removeSmartLink(e.uid)})),[2,r]}}))}))}(e.block)}}),(0,f.jsxs)(h.PanelRow,{className:t,children:[(0,f.jsxs)("div",{className:"smart-linking-text",children:[(0,x.__)("Automatically insert links to your most relevant, top performing content.","wp-parsely"),(0,f.jsxs)(h.Button,{href:"https://docs.wpvip.com/parse-ly/wp-parsely-features/smart-linking/",target:"_blank",variant:"link",children:[(0,x.__)("Learn more about Parse.ly AI","wp-parsely"),(0,f.jsx)(ie,{icon:Y,size:18,className:"parsely-external-link-icon"})]})]}),N&&(0,f.jsx)(h.Notice,{status:"info",onRemove:function(){return K(null)},className:"wp-parsely-content-helper-error",children:N.Message()}),w&&g>0&&(0,f.jsx)(h.Notice,{status:"success",onRemove:function(){return b(!1)},className:"wp-parsely-smart-linking-suggested-links",children:(0,x.sprintf)(/* translators: 1 - number of smart links generated */ /* translators: 1 - number of smart links generated */ -(0,x.__)("Successfully added %s smart links.","wp-parsely"),g>0?g:A.length)}),(0,f.jsx)(lt,{disabled:T,selectedBlock:fe,onSettingChange:function(e,t){var n;p({SmartLinking:Rt(Rt({},a.SmartLinking),(n={},n[e]=t,n))}),"MaxLinks"===e&&se(t)}}),(0,f.jsx)("div",{className:"smart-linking-generate",children:(0,f.jsx)(h.Button,{onClick:function(){return Bt(void 0,void 0,void 0,(function(){var e,t,n,r,s,o,a,l;return Mt(this,(function(c){switch(c.label){case 0:return[4,$(!0)];case 1:return c.sent(),[4,le()];case 2:return c.sent(),[4,K(null)];case 3:return c.sent(),b(!1),P.trackEvent("smart_linking_generate_pressed",{is_full_content:L,selected_block:null!==(o=null==fe?void 0:fe.name)&&void 0!==o?o:"none",context:i}),[4,ye(L?"all":null==fe?void 0:fe.clientId)];case 4:c.sent(),e=setTimeout((function(){var e;$(!1),P.trackEvent("smart_linking_generate_timeout",{is_full_content:L,selected_block:null!==(e=null==fe?void 0:fe.name)&&void 0!==e?e:"none",context:i}),me(L?"all":null==fe?void 0:fe.clientId)}),18e4),t=R,c.label=5;case 5:return c.trys.push([5,8,10,15]),[4,ge(3)];case 6:return n=c.sent(),[4,(u=n,Bt(void 0,void 0,void 0,(function(){var e;return Mt(this,(function(t){switch(t.label){case 0:return u=u.filter((function(e){return!F.some((function(t){return t.uid===e.uid&&t.applied}))})),e=ve.replace(/^https?:\/\//,"").replace(/\/+$/,""),u=(u=u.filter((function(t){return!t.href.includes(e)||(console.warn("PCH Smart Linking: Skipping self-reference link: ".concat(t.href)),!1)}))).filter((function(e){return!F.some((function(t){return t.href===e.href?(console.warn("PCH Smart Linking: Skipping duplicate link: ".concat(e.href)),!0):t.text===e.text&&t.offset!==e.offset&&(console.warn("PCH Smart Linking: Skipping duplicate link text: ".concat(e.text)),!0)}))})),u=(u=Ke(L?de:[fe],u,{}).filter((function(e){return e.match}))).filter((function(e){if(!e.match)return!1;var t=e.match.blockLinkPosition,n=t+e.text.length;return!F.some((function(r){if(!r.match)return!1;if(e.match.blockId!==r.match.blockId)return!1;var i=r.match.blockLinkPosition,s=i+r.text.length;return t>=i&&n<=s}))})),[4,Z(u)];case 1:return t.sent(),[2,u]}}))})))];case 7:if(0===c.sent().length)throw new te((0,x.__)("No smart links were generated.","wp-parsely"),U.ParselySuggestionsApiNoData,"");return ce(!0),[3,15];case 8:return r=c.sent(),s=new te(null!==(a=r.message)&&void 0!==a?a:"An unknown error has occurred.",null!==(l=r.code)&&void 0!==l?l:U.UnknownError),r.code&&r.code===U.ParselyAborted&&(s.message=(0,x.sprintf)(/* translators: %d: number of retry attempts, %s: attempt plural */ /* translators: %d: number of retry attempts, %s: attempt plural */ -(0,x.__)("The Smart Linking process was cancelled after %1$d %2$s.","wp-parsely"),r.numRetries,(0,x._n)("attempt","attempts",r.numRetries,"wp-parsely"))),console.error(r),[4,K(s)];case 9:return c.sent(),s.createErrorSnackbar(),[3,15];case 10:return[4,$(!1)];case 11:return c.sent(),[4,re(t)];case 12:return c.sent(),[4,oe(!1)];case 13:return c.sent(),[4,me(L?"all":null==fe?void 0:fe.clientId)];case 14:return c.sent(),clearTimeout(e),[7];case 15:return[2]}var u}))}))},variant:"primary",isBusy:T,disabled:T,children:B?(0,x.sprintf)(/* translators: %1$d: number of retry attempts, %2$d: maximum number of retries */ /* translators: %1$d: number of retry attempts, %2$d: maximum number of retries */ -(0,x.__)("Retrying… Attempt %1$d of %2$d","wp-parsely"),D,3):T?(0,x.__)("Generating Smart Links…","wp-parsely"):(0,x.__)("Add Smart Links","wp-parsely")})}),(G.length>0||V.length>0)&&(0,f.jsx)("div",{className:"smart-linking-manage",children:(0,f.jsx)(h.Button,{onClick:function(){return Bt(void 0,void 0,void 0,(function(){var e,t;return Mt(this,(function(n){switch(n.label){case 0:return[4,Je()];case 1:return e=n.sent(),t=We(),[4,Z(t)];case 2:return n.sent(),ce(!0),P.trackEvent("smart_linking_review_pressed",{num_smart_links:F.length,has_fixed_links:e,context:i}),[2]}}))}))},variant:"secondary",disabled:T,children:(0,x.__)("Review Smart Links","wp-parsely")})})]}),E&&(0,f.jsx)(It,{isOpen:E,onAppliedLink:function(){y((function(e){return e+1}))},onClose:function(){b(!0),ce(!1)}})]})},Gt=function(){return Gt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0)&&(t(),e())}))}))]}))},new((n=void 0)||(n=Promise))((function(i,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}));var e,t,n,r}().then((function(){var t=document.querySelector(".wp-block-post-content");et(t,e)}))})))},Xt=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{d:"M7 11.5h10V13H7z"})}),en=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})}),tn=function(e){var t=e.title,n=e.icon,r=e.subtitle,i=e.level,s=void 0===i?2:i,o=e.children,a=e.controls,l=e.onClick,c=e.isOpen,u=e.isLoading,p=e.dropdownChildren;return(0,f.jsxs)("div",{className:"performance-stat-panel",children:[(0,f.jsxs)(h.__experimentalHStack,{className:"panel-header level-"+s,children:[(0,f.jsx)(h.__experimentalHeading,{level:s,children:t}),r&&!c&&(0,f.jsx)("span",{className:"panel-subtitle",children:r}),a&&!p&&(0,f.jsx)(h.DropdownMenu,{icon:n,label:(0,x.__)("Settings","wp-parsely"),className:"panel-settings-button",controls:a}),p&&(0,f.jsx)(h.DropdownMenu,{icon:n,label:(0,x.__)("Settings","wp-parsely"),className:"panel-settings-button",children:p}),n&&!p&&!a&&(0,f.jsx)(h.Button,{icon:n,className:"panel-settings-button",isPressed:c,onClick:l})]}),(0,f.jsx)("div",{className:"panel-body",children:u?(0,f.jsx)("div",{className:"parsely-spinner-wrapper","data-testid":"parsely-spinner-wrapper",children:(0,f.jsx)(h.Spinner,{})}):o})]})};function nn(e,t,n){void 0===t&&(t=1),void 0===n&&(n="");var r=parseInt(e.replace(/\D/g,""),10);if(r<1e3)return e;r<1e4&&(t=1);var i=r,s=r.toString(),o="",a=0;return Object.entries({1e3:"k","1,000,000":"M","1,000,000,000":"B","1,000,000,000,000":"T","1,000,000,000,000,000":"Q"}).forEach((function(e){var n=e[0],l=e[1],c=parseInt(n.replace(/\D/g,""),10);if(r>=c){var u=t;(i=r/c)%1>1/a&&(u=i>10?1:2),u=parseFloat(i.toFixed(2))===parseFloat(i.toFixed(0))?0:u,s=i.toFixed(u),o=l}a=c})),s+n+o}var rn=function(e){var t=e.data,n=e.isLoading,r=(0,_.useState)(w.Views),i=r[0],s=r[1],o=(0,_.useState)(!1),a=o[0],l=o[1];n||delete t.referrers.types.totals;var c=function(e){switch(e){case"social":return(0,x.__)("Social","wp-parsely");case"search":return(0,x.__)("Search","wp-parsely");case"other":return(0,x.__)("Other","wp-parsely");case"internal":return(0,x.__)("Internal","wp-parsely");case"direct":return(0,x.__)("Direct","wp-parsely")}return e},u=(0,x.sprintf)((0,x.__)("By %s","wp-parsely"),G(i)); -/* translators: %s: metric description */return(0,f.jsxs)(tn,{title:(0,x.__)("Categories","wp-parsely"),level:3,subtitle:u,isOpen:a,onClick:function(){return l(!a)},children:[a&&(0,f.jsx)("div",{className:"panel-settings",children:(0,f.jsx)(h.SelectControl,{value:i,prefix:(0,x.__)("By:","wp-parsely"),onChange:function(e){F(e,w)&&s(e)},children:Object.values(w).map((function(e){return(0,f.jsxs)("option",{value:e,disabled:"avg_engaged"===e,children:[G(e),"avg_engaged"===e&&" "+(0,x.__)("(coming soon)","wp-parsely")]},e)}))})}),n?(0,f.jsx)("div",{className:"parsely-spinner-wrapper","data-testid":"parsely-spinner-wrapper",children:(0,f.jsx)(h.Spinner,{})}):(0,f.jsxs)("div",{children:[(0,f.jsx)("div",{className:"multi-percentage-bar",children:Object.entries(t.referrers.types).map((function(e){var t=e[0],n=e[1],r=(0,x.sprintf)(/* translators: 1: Referrer type, 2: Percentage value, %%: Escaped percent sign */ /* translators: 1: Referrer type, 2: Percentage value, %%: Escaped percent sign */ +(0,x._n)("%1$s word","%1$s words",e,"wp-parsely"),e):"")}),[u.currentExcerpt,D]),(0,_.useEffect)((function(){var e=document.querySelector(".editor-post-excerpt textarea");e&&(e.scrollTop=0)}),[u.newExcerptGeneratedCount]);var G=(0,f.jsxs)("div",{className:"wp-parsely-excerpt-generator-header",children:[(0,f.jsx)(E,{size:16}),(0,f.jsx)("div",{className:"wp-parsely-excerpt-generator-header-label",children:(0,x.__)("Generate With Parse.ly","wp-parsely")})]}),H=n?(0,x.__)("Write an excerpt (optional)","wp-parsely"):(0,x.__)("Excerpt","wp-parsely");return(0,f.jsxs)("div",{className:"editor-post-excerpt",children:[!n&&(0,f.jsxs)("div",{className:"excerpt-suggestions-text",children:[(0,x.__)("Use Parse.ly AI to generate a concise, engaging excerpt for your post.","wp-parsely"),(0,f.jsxs)(h.Button,{href:"https://docs.wpvip.com/parse-ly/wp-parsely-features/excerpt-suggestions/",target:"_blank",variant:"link",rel:"noopener",children:[(0,x.__)("Learn more about Parse.ly AI","wp-parsely"),(0,f.jsx)(h.Icon,{icon:Y,size:18,className:"parsely-external-link-icon"})]})]}),(0,f.jsxs)("div",{style:{position:"relative"},children:[g&&(0,f.jsx)("div",{className:"editor-post-excerpt__loading_animation",children:(0,f.jsx)(Te,{})}),(0,f.jsx)(h.TextareaControl,{__nextHasNoMarginBottom:!0,label:H,className:"editor-post-excerpt__textarea",onChange:function(e){u.isUnderReview||I({excerpt:e}),p(ke(ke({},u),{currentExcerpt:e})),b(!0)},onKeyUp:function(){var e;if(w)b(!1);else{var t=document.querySelector(".editor-post-excerpt textarea"),n=null!==(e=null==t?void 0:t.textContent)&&void 0!==e?e:"";p(ke(ke({},u),{currentExcerpt:n}))}},value:g?"":u.isUnderReview?u.currentExcerpt:D,help:A||null})]}),n&&(0,f.jsxs)(h.Button,{href:(0,x.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),target:"_blank",variant:"link",rel:"noopener",children:[(0,x.__)("Learn more about manual excerpts","wp-parsely"),(0,f.jsx)(h.Icon,{icon:Y,size:18,className:"parsely-external-link-icon"})]}),(0,f.jsxs)("div",{className:"wp-parsely-excerpt-generator"+(n?" is-doc-set-panel":""),children:[a&&(0,f.jsx)(h.Notice,{className:"wp-parsely-excerpt-generator-error",onRemove:function(){return l(void 0)},status:"info",children:a.Message()}),u.isUnderReview?(0,f.jsxs)(f.Fragment,{children:[n&&G,(0,f.jsxs)("div",{className:"wp-parsely-excerpt-suggestions-review-controls",children:[(0,f.jsx)(h.Button,{variant:"secondary",onClick:function(){return Se(void 0,void 0,void 0,(function(){return je(this,(function(e){switch(e.label){case 0:return[4,I({excerpt:u.currentExcerpt})];case 1:return e.sent(),p(ke(ke({},u),{isUnderReview:!1})),P.trackEvent("excerpt_generator_accepted"),[2]}}))}))},children:(0,x.__)("Accept","wp-parsely")}),(0,f.jsx)(h.Button,{isDestructive:!0,variant:"secondary",onClick:function(){return Se(void 0,void 0,void 0,(function(){return je(this,(function(e){return I({excerpt:u.oldExcerpt}),p(ke(ke({},u),{currentExcerpt:u.oldExcerpt,isUnderReview:!1})),P.trackEvent("excerpt_generator_discarded"),[2]}))}))},children:(0,x.__)("Discard","wp-parsely")})]})]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(me,{isLoading:g,onPersonaChange:function(e){R("Persona",e),j(e)},onSettingChange:R,onToneChange:function(e){R("Tone",e),C(e)},persona:i.ExcerptSuggestions.Persona,tone:i.ExcerptSuggestions.Tone}),n&&G,(0,f.jsx)("div",{className:"excerpt-suggestions-generate",children:(0,f.jsxs)(h.Button,{onClick:function(){return Se(void 0,void 0,void 0,(function(){var e,t;return je(this,(function(n){switch(n.label){case 0:y(!0),l(void 0),n.label=1;case 1:return n.trys.push([1,3,4,5]),P.trackEvent("excerpt_generator_pressed"),[4,xe.getInstance().generateExcerpt(V,F,S,L)];case 2:return e=n.sent(),p({currentExcerpt:e,isUnderReview:!0,newExcerptGeneratedCount:u.newExcerptGeneratedCount+1,oldExcerpt:D}),[3,5];case 3:return(t=n.sent())instanceof te?l(t):(l(new te((0,x.__)("An unknown error occurred.","wp-parsely"),U.UnknownError)),console.error(t)),[3,5];case 4:return y(!1),[7];case 5:return[2]}}))}))},variant:"primary",isBusy:g,disabled:g||!F,children:[g&&(0,x.__)("Generating Excerpt…","wp-parsely"),!g&&u.newExcerptGeneratedCount>0&&(0,x.__)("Regenerate Excerpt","wp-parsely"),!g&&0===u.newExcerptGeneratedCount&&(0,x.__)("Generate Excerpt","wp-parsely")]})})]}),n&&(0,f.jsxs)(h.Button,{href:"https://docs.wpvip.com/parse-ly/wp-parsely-features/excerpt-suggestions/",target:"_blank",variant:"link",rel:"noopener",children:[(0,x.__)("Learn more about Parse.ly AI","wp-parsely"),(0,f.jsx)(h.Icon,{icon:Y,size:18,className:"parsely-external-link-icon"})]})]})]})},Te=function(){return(0,f.jsx)(h.Animate,{type:"loading",children:function(e){var t=e.className;return(0,f.jsx)("span",{className:t,children:(0,x.__)("Generating…","wp-parsely")})}})},Ee=function(){return(0,f.jsx)(q.PostTypeSupportCheck,{supportKeys:"excerpt",children:(0,f.jsx)(p,{name:"parsely-post-excerpt",title:(0,x.__)("Excerpt","wp-parsely"),children:(0,f.jsx)(D,{endpoint:"editor-sidebar",defaultSettings:jr(window.wpParselyContentHelperSettings),children:(0,f.jsx)(Pe,{isDocumentSettingPanel:!0})})})})},Le=function(e,t){var n,r,i;return t!==Sr?e:H().ExcerptSuggestions?((null===(n=null===window||void 0===window?void 0:window.Jetpack_Editor_Initial_State)||void 0===n?void 0:n.available_blocks["ai-content-lens"])&&(console.log("Parse.ly: Jetpack AI is enabled and will be disabled."),(0,$.removeFilter)("blocks.registerBlockType","jetpack/ai-content-lens-features")),(0,j.registerPlugin)("wp-parsely-excerpt-suggestions",{render:function(){return(0,f.jsx)(Ee,{})}}),(null===(r=(0,v.dispatch)("core/editor"))||void 0===r?void 0:r.removeEditorPanel)?null===(i=(0,v.dispatch)("core/editor"))||void 0===i||i.removeEditorPanel("post-excerpt"):null==Z||Z.removeEditorPanel("post-excerpt"),e):e};function Ce(){(0,$.addFilter)("plugins.registerPlugin","wp-parsely-excerpt-suggestions",Le,1e3)}var Ne=window.wp.blockEditor;function Ae(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Oe=function(){return Oe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)return r(e.innerBlocks,t[o].innerBlocks);if(JSON.stringify(e)!==JSON.stringify(t[o])){var s=t[o],a=i.parseFromString(e.attributes.content||"","text/html"),l=i.parseFromString((null==s?void 0:s.attributes.content)||"","text/html"),c=Array.from(a.querySelectorAll("a[data-smartlink]")),u=Array.from(l.querySelectorAll("a[data-smartlink]")),p=c.filter((function(e){return!u.some((function(t){return t.dataset.smartlink===e.dataset.smartlink}))})),d=u.filter((function(e){return!c.some((function(t){return t.dataset.smartlink===e.dataset.smartlink}))})),f=c.filter((function(e){var t=u.find((function(t){return t.dataset.smartlink===e.dataset.smartlink}));return t&&t.outerHTML!==e.outerHTML}));(p.length>0||d.length>0||f.length>0)&&n.push({block:e,prevBlock:s,addedLinks:p,removedLinks:d,changedLinks:f})}}}))};return r(e,t),n}(a,l.current);s.length>0&&(s.forEach((function(e){e.changedLinks.length>0&&n&&n(e),e.addedLinks.length>0&&i&&i(e),e.removedLinks.length>0&&r&&r(e)})),l.current=a)}),s);return e(t),function(){e.cancel()}}),[a,s,t,i,n,r]),null},Me=function(e){var t=e.value,n=e.onChange,r=e.max,i=e.min,o=e.suffix,s=e.size,a=e.label,l=e.initialPosition,c=e.disabled,u=e.className;return(0,f.jsxs)("div",{className:"parsely-inputrange-control ".concat(u||""),children:[(0,f.jsx)(h.__experimentalHeading,{className:"parsely-inputrange-control__label",level:3,children:a}),(0,f.jsxs)("div",{className:"parsely-inputrange-control__controls",children:[(0,f.jsx)(h.__experimentalNumberControl,{disabled:c,value:t,suffix:(0,f.jsx)(h.__experimentalInputControlSuffixWrapper,{children:o}),size:null!=s?s:"__unstable-large",min:i,max:r,onChange:function(e){var t=parseInt(e,10);isNaN(t)||n(t)}}),(0,f.jsx)(h.RangeControl,{disabled:c,value:t,showTooltip:!1,initialPosition:l,onChange:function(e){n(e)},withInputField:!1,min:i,max:r})]})]})},De=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},Fe=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]

","\n\x3c!-- /wp:paragraph --\x3e");t&&d((0,Re.parse)(n))}),[o]),(0,f.jsxs)("div",{className:"smart-linking-review-suggestion",children:[(0,f.jsx)(h.KeyboardShortcuts,{shortcuts:{left:s,right:a,up:s,down:a}}),(0,f.jsx)("div",{className:"review-suggestion-post-title",children:null===(t=o.post_data)||void 0===t?void 0:t.title}),(0,f.jsxs)("div",{className:"review-suggestion-preview",children:[!(null===(n=o.post_data)||void 0===n?void 0:n.is_first_paragraph)&&(0,f.jsx)(_t,{topOrBottom:"top"}),(0,f.jsx)(bt,{block:p[0],link:o,useOriginalBlock:!0}),!(null===(r=o.post_data)||void 0===r?void 0:r.is_last_paragraph)&&(0,f.jsx)(_t,{topOrBottom:"bottom"})]}),(0,f.jsx)(h.__experimentalDivider,{}),(0,f.jsx)(xt,{link:o}),(0,f.jsxs)("div",{className:"review-controls",children:[(0,f.jsx)(h.Tooltip,{shortcut:"←",text:(0,x.__)("Previous","wp-parsely"),children:(0,f.jsx)(h.Button,{disabled:!l,className:"wp-parsely-review-suggestion-previous",onClick:s,icon:gt,children:(0,x.__)("Previous","wp-parsely")})}),(0,f.jsx)("div",{className:"reviews-controls-middle",children:(0,f.jsx)(h.Button,{target:"_blank",href:(null===(i=o.post_data)||void 0===i?void 0:i.edit_link)+"&smart-link="+o.uid,variant:"secondary",onClick:function(){P.trackEvent("smart_linking_open_in_editor_pressed",{type:"inbound",uid:o.uid})},children:(0,x.__)("Open in the Editor","wp-parsely")})}),(0,f.jsx)(h.Tooltip,{shortcut:"→",text:(0,x.__)("Next","wp-parsely"),children:(0,f.jsxs)(h.Button,{disabled:!c,onClick:a,className:"wp-parsely-review-suggestion-next",children:[(0,x.__)("Next","wp-parsely"),(0,f.jsx)(ie,{icon:yt})]})})]})]})},St=function(e){var t=e.size,n=void 0===t?24:t,r=e.className,i=void 0===r?"wp-parsely-icon":r;return(0,f.jsxs)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",className:i,width:n,height:n,viewBox:"0 0 24 24",fill:"none",children:[(0,f.jsx)(h.Path,{d:"M8.18983 5.90381L8.83642 7.54325L10.4758 8.18983L8.83642 8.8364L8.18983 10.4759L7.54324 8.8364L5.90381 8.18983L7.54324 7.54325L8.18983 5.90381Z"}),(0,f.jsx)(h.Path,{d:"M15.048 5.90381L15.9101 8.08972L18.0961 8.95186L15.9101 9.81397L15.048 11.9999L14.1859 9.81397L12 8.95186L14.1859 8.08972L15.048 5.90381Z"}),(0,f.jsx)(h.Path,{d:"M11.238 10.4761L12.3157 13.2085L15.048 14.2861L12.3157 15.3638L11.238 18.0962L10.1603 15.3638L7.42798 14.2861L10.1603 13.2085L11.238 10.4761Z"})]})},jt=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;ii.bottom)&&(n.scrollTop=r.offsetTop-n.offsetTop)}}}}),[t,l]);var u=function(){var e=document.querySelector(".smart-linking-review-sidebar-tabs [data-active-item]"),t=null==e?void 0:e.nextElementSibling;t||(t=document.querySelector('.smart-linking-review-sidebar-tabs [role="tab"]')),t&&t.click()},p=(0,f.jsxs)("span",{className:"smart-linking-menu-label",children:[(0,x.__)("NEW","wp-parsely"),(0,f.jsx)(St,{})]}),d=[];n&&n.length>0&&d.push({name:"outbound",title:(0,x.__)("Outbound","wp-parsely")}),r&&r.length>0&&d.push({name:"inbound",title:(0,x.__)("Inbound","wp-parsely")});var v="outbound";return d=d.filter((function(e){return"outbound"===e.name&&r&&0===r.length&&(e.title=(0,x.__)("Outbound Smart Links","wp-parsely"),v="outbound"),"inbound"===e.name&&n&&0===n.length&&(e.title=(0,x.__)("Inbound Smart Links","wp-parsely"),v="inbound"),e})),(0,f.jsxs)("div",{className:"smart-linking-review-sidebar",ref:o,children:[(0,f.jsx)(h.KeyboardShortcuts,{shortcuts:{tab:function(){return u()},"shift+tab":function(){return u()}}}),(0,f.jsx)(h.TabPanel,{className:"smart-linking-review-sidebar-tabs",initialTabName:v,tabs:d,onSelect:function(e){var t,o;"outbound"===e&&n&&n.length>0&&i(n[0]),"inbound"===e&&r&&r.length>0&&i(r[0]),P.trackEvent("smart_linking_modal_tab_selected",{tab:e,total_inbound:null!==(t=null==r?void 0:r.length)&&void 0!==t?t:0,total_outbound:null!==(o=null==n?void 0:n.length)&&void 0!==o?o:0})},children:function(e){return(0,f.jsxs)(f.Fragment,{children:["outbound"===e.name&&(0,f.jsx)(f.Fragment,{children:n&&0!==n.length?n.map((function(e,n){return(0,f.jsxs)(h.MenuItem,{ref:function(e){s.current[n]=e},className:(null==t?void 0:t.uid)===e.uid?"is-selected":"",role:"menuitemradio",isSelected:(null==t?void 0:t.uid)===e.uid,onClick:function(){return i(e)},children:[(0,f.jsx)("span",{className:"smart-linking-menu-item",children:e.text}),!e.applied&&p]},e.uid)})):(0,f.jsxs)(f.Fragment,{children:[" ",(0,x.__)("No outbound links found.","wp-parsely")]})}),"inbound"===e.name&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{className:"review-sidebar-tip",children:(0,x.__)("This section shows external posts that link back to the current post.","wp-parsely")}),r&&0!==r.length?r.map((function(e,r){var o;return(0,f.jsx)(h.MenuItem,{ref:function(e){s.current[(n?n.length:0)+r]=e},className:(null==t?void 0:t.uid)===e.uid?"is-selected":"",role:"menuitemradio",isSelected:(null==t?void 0:t.uid)===e.uid,onClick:function(){return i(e)},children:(0,f.jsx)("span",{className:"smart-linking-menu-item",children:null===(o=e.post_data)||void 0===o?void 0:o.title})},e.uid)})):(0,f.jsxs)(f.Fragment,{children:[" ",(0,x.__)("No inbound links found.","wp-parsely")]})]})]})}})]})},Tt=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.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"})}),Et=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),Lt=function(e){var t,n,r,i,o=null===(t=e.link.match)||void 0===t?void 0:t.blockId,s=(0,v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlock,r=t.getBlockParents;return o?{block:n(o),parents:r(o).map((function(e){return n(e)})).filter((function(e){return void 0!==e}))}:{block:void 0,parents:[]}}),[o]),a=s.block,l=s.parents;return a?(0,f.jsxs)("div",{className:"review-suggestions-breadcrumbs",children:[l.map((function(e,t){var n;return(0,f.jsxs)("span",{children:[(0,f.jsx)("span",{className:"breadcrumbs-parent-block",children:null===(n=(0,Re.getBlockType)(e.name))||void 0===n?void 0:n.title}),(0,f.jsx)("span",{className:"breadcrumbs-parent-separator",children:" / "})]},t)})),(0,f.jsxs)("span",{className:"breadcrumbs-current-block",children:[(0,f.jsx)("span",{className:"breadcrumbs-current-block-type",children:null===(n=(0,Re.getBlockType)(a.name))||void 0===n?void 0:n.title}),(null===(i=null===(r=a.attributes)||void 0===r?void 0:r.metadata)||void 0===i?void 0:i.name)&&(0,f.jsx)("span",{className:"breadcrumbs-current-block-name",children:a.attributes.metadata.name})]})]}):(0,f.jsx)(f.Fragment,{})},Ct=function(e){var t,n=e.link,r=(0,_.useState)(n.href),i=r[0],o=r[1],s=(0,_.useState)(null===(t=n.destination)||void 0===t?void 0:t.post_type),a=s[0],l=s[1],c=(0,_.useRef)(null),u=(0,v.useDispatch)(it).updateSmartLink;return(0,_.useEffect)((function(){n.destination?l(n.destination.post_type):(l((0,x.__)("External","wp-parsely")),dt.getInstance().getPostTypeByURL(n.href).then((function(e){e&&l(e.post_type),n.destination=e,u(n)})))}),[n,u]),(0,_.useEffect)((function(){var e=function(){if(c.current){var e=c.current.offsetWidth,t=Math.floor(e/8);o(function(e,t){var n=e.replace(/(^\w+:|^)\/\//,"").replace(/^www\./,"");if(!t||n.length<=t)return n;var r=n.split("/")[0],i=n.substring(r.length);t-=r.length;var o=Math.floor((t-3)/2),s=i.substring(0,o),a=i.substring(i.length-o);return"".concat(r).concat(s,"...").concat(a)}(n.href,t))}};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[n]),(0,f.jsx)(h.MenuItem,{ref:c,info:i,iconPosition:"left",icon:vt,shortcut:a,className:"block-editor-link-control__search-item wp-parsely-link-suggestion-link-details",children:n.title})},Nt=function(e){var t=e.link,n=e.onNext,r=e.onPrevious,i=e.onAccept,o=e.onReject,s=e.onRemove,a=e.onSelectInEditor,l=e.hasPrevious,c=e.hasNext;if(t&&void 0!==t.post_data)return(0,f.jsx)(kt,{link:t,onNext:n,onPrevious:r,onAccept:i,onReject:o,onRemove:s,onSelectInEditor:a,hasPrevious:l,hasNext:c});if(!(null==t?void 0:t.match))return(0,f.jsx)(f.Fragment,{children:(0,x.__)("This Smart Link does not have any matches in the current content.","wp-parsely")});var u=t.match.blockId,p=(0,v.select)("core/block-editor").getBlock(u),d=t.applied;return p?(0,f.jsxs)("div",{className:"smart-linking-review-suggestion",children:[(0,f.jsx)(h.KeyboardShortcuts,{shortcuts:{left:r,right:n,up:r,down:n,a:function(){t&&!t.applied&&i()},r:function(){t&&(t.applied?s():o())}}}),(0,f.jsx)(Lt,{link:t}),(0,f.jsx)("div",{className:"review-suggestion-preview",children:(0,f.jsx)(bt,{block:p,link:t})}),(0,f.jsx)(h.__experimentalDivider,{}),(0,f.jsx)(Ct,{link:t}),(0,f.jsxs)("div",{className:"review-controls",children:[(0,f.jsx)(h.Tooltip,{shortcut:"←",text:(0,x.__)("Previous","wp-parsely"),children:(0,f.jsx)(h.Button,{disabled:!l,className:"wp-parsely-review-suggestion-previous",onClick:r,icon:gt,children:(0,x.__)("Previous","wp-parsely")})}),(0,f.jsxs)("div",{className:"reviews-controls-middle",children:[!d&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(h.Tooltip,{shortcut:"R",text:(0,x.__)("Reject","wp-parsely"),children:(0,f.jsx)(h.Button,{className:"wp-parsely-review-suggestion-reject",icon:Tt,onClick:o,variant:"secondary",children:(0,x.__)("Reject","wp-parsely")})}),(0,f.jsx)(h.Tooltip,{shortcut:"A",text:(0,x.__)("Accept","wp-parsely"),children:(0,f.jsx)(h.Button,{className:"wp-parsely-review-suggestion-accept",icon:Et,onClick:i,variant:"secondary",children:(0,x.__)("Accept","wp-parsely")})})]}),d&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(h.Tooltip,{shortcut:"R",text:(0,x.__)("Remove","wp-parsely"),children:(0,f.jsx)(h.Button,{className:"wp-parsely-review-suggestion-reject",icon:Tt,onClick:s,variant:"secondary",children:(0,x.__)("Remove","wp-parsely")})}),(0,f.jsx)(h.Button,{className:"wp-parsely-review-suggestion-accept",onClick:a,variant:"secondary",children:(0,x.__)("Select in Editor","wp-parsely")})]})]}),(0,f.jsx)(h.Tooltip,{shortcut:"→",text:(0,x.__)("Next","wp-parsely"),children:(0,f.jsxs)(h.Button,{disabled:!c,onClick:n,className:"wp-parsely-review-suggestion-next",children:[(0,x.__)("Next","wp-parsely"),(0,f.jsx)(ie,{icon:yt})]})})]})]}):(0,f.jsx)(f.Fragment,{children:(0,x.__)("No block is selected.","wp-parsely")})},At=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},Ot=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&(a=s[0],(l=a.parentNode)&&(c=document.createTextNode(null!==(u=a.textContent)&&void 0!==u?u:""),l.replaceChild(c,a),K.updateBlockAttributes(n,{content:o.innerHTML}))),[4,L(t.uid)]):[2]):[2];case 1:return p.sent(),[2]}}))}))},N=(0,_.useCallback)((function(){c(!1),w().filter((function(e){return!e.applied})).length>0?s(!0):(W.unlockPostAutosaving("smart-linking-review-modal"),t())}),[w,t]),A=function(e){s(!1),e?(c(!1),T().then((function(){N()}))):c(!0)},O=function(){if(Ge(k)){var e=g.indexOf(k);if(!g[t=e+1])return;S(g[t])}else{var t;if(e=d.indexOf(k),!d[t=e+1])return;S(d[t])}},I=function(){if(Ge(k)){var e=g.indexOf(k);if(!g[t=e-1])return;S(g[t])}else{var t;if(e=d.indexOf(k),!d[t=e-1])return;S(d[t])}};return(0,_.useEffect)((function(){l?W.lockPostAutosaving("smart-linking-review-modal"):l&&0===p.length&&N()}),[l,t,p,N]),(0,_.useEffect)((function(){c(n)}),[n]),(0,f.jsxs)(f.Fragment,{children:[l&&(0,f.jsx)(h.Modal,{title:(0,x.__)("Review Smart Links","wp-parsely"),className:"wp-parsely-smart-linking-review-modal",onRequestClose:N,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,children:(0,f.jsxs)("div",{className:"smart-linking-modal-body",children:[(0,f.jsx)(Pt,{outboundLinks:d,inboundLinks:g,activeLink:k,setSelectedLink:S}),k&&(Ge(k)?(0,f.jsx)(kt,{link:k,onNext:O,onPrevious:I,hasNext:g.indexOf(k)0}):(0,f.jsx)(Nt,{link:k,hasNext:m().indexOf(k)0,onNext:O,onPrevious:I,onAccept:function(){return At(void 0,void 0,void 0,(function(){var e,t;return Ot(this,(function(n){switch(n.label){case 0:return k.match?(r(k),[4,(i=k.match.blockId,o=k,At(void 0,void 0,void 0,(function(){var e,t;return Ot(this,(function(n){switch(n.label){case 0:return(e=document.createElement("a")).href=o.href,e.title=o.title,e.setAttribute("data-smartlink",o.uid),(t=(0,v.select)("core/block-editor").getBlock(i))?(Ue(t,o,e),o.applied=!0,[4,E(o)]):[2];case 1:return n.sent(),[2]}}))})))]):[2];case 1:return n.sent(),P.trackEvent("smart_linking_link_accepted",{link:k.href,title:k.title,text:k.text,uid:k.uid}),0===y().length?(N(),[2]):(e=d.indexOf(k),d[t=e+1]?S(d[t]):S(d[0]),[2])}var i,o}))}))},onReject:function(){return At(void 0,void 0,void 0,(function(){var e,t;return Ot(this,(function(n){switch(n.label){case 0:return e=d.indexOf(k),d[t=e+1]?S(d[t]):d[0]?S(d[0]):N(),[4,L(k.uid)];case 1:return n.sent(),P.trackEvent("smart_linking_link_rejected",{link:k.href,title:k.title,text:k.text,uid:k.uid}),[2]}}))}))},onRemove:function(){return At(void 0,void 0,void 0,(function(){var e,t,n,r;return Ot(this,(function(i){switch(i.label){case 0:return k.match?(e=(0,v.select)("core/block-editor").getBlock(k.match.blockId))?(t=m(),n=t.indexOf(k),r=n-1,[4,C(e,k)]):[3,2]:[2];case 1:if(i.sent(),P.trackEvent("smart_linking_link_removed",{link:k.href,title:k.title,text:k.text,uid:k.uid}),0===(t=m()).length&&g.length>0)return S(g[0]),[2];if(0===t.length&&0===g.length)return N(),[2];if(t[r])return S(t[r]),[2];S(t[0]),i.label=2;case 2:return[2]}}))}))},onSelectInEditor:function(){if(k.match){var e=(0,v.select)("core/block-editor").getBlock(k.match.blockId);if(e){K.selectBlock(e.clientId);var t=document.querySelector('[data-block="'.concat(e.clientId,'"]'));t&&et(t,k.uid),P.trackEvent("smart_linking_select_in_editor_pressed",{type:"outbound",uid:k.uid}),N()}}}}))]})}),o&&(0,f.jsxs)(h.Modal,{title:(0,x.__)("Review Smart Links","wp-parsely"),onRequestClose:function(){return A(!1)},className:"wp-parsely-smart-linking-close-dialog",children:[(0,x.__)("Are you sure you want to close? All un-accepted smart links will not be added.","wp-parsely"),(0,f.jsxs)("div",{className:"smart-linking-close-dialog-actions",children:[(0,f.jsx)(h.Button,{variant:"secondary",onClick:function(){return A(!1)},children:(0,x.__)("Go Back","wp-parsely")}),(0,f.jsx)(h.Button,{variant:"primary",onClick:function(){return A(!0)},children:(0,x.__)("Close","wp-parsely")})]})]})]})})),Rt=function(){return Rt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&k("success",/* translators: %d: number of smart links applied */ /* translators: %d: number of smart links applied */ +(0,x.sprintf)((0,x.__)("%s smart links successfully applied.","wp-parsely"),g),{type:"snackbar"}):y(0)}),[w]),(0,_.useEffect)((function(){if(!(Object.keys(I).length>0)){var e={maxLinksPerPost:a.SmartLinking.MaxLinks};ee(e)}}),[ee,a]);var pe=(0,v.useSelect)((function(e){var t=e("core/block-editor"),r=t.getSelectedBlock,i=t.getBlock,o=t.getBlocks,s=e("core/editor"),a=s.getEditedPostContent,l=s.getCurrentPostAttribute;return{allBlocks:o(),selectedBlock:n?i(n):r(),postContent:a(),postPermalink:l("link")}}),[n]),de=pe.allBlocks,fe=pe.selectedBlock,he=pe.postContent,ve=pe.postPermalink,ge=function(e){return Bt(void 0,void 0,void 0,(function(){var t,n,r,i,o;return Mt(this,(function(s){switch(s.label){case 0:t=[],s.label=1;case 1:return s.trys.push([1,4,,9]),[4,re((n=L||!fe)?Qe.All:Qe.Selected)];case 2:return s.sent(),a=ve.replace(/^https?:\/\//i,""),r=["http://"+a,"https://"+a],i=function(e){return e.map((function(e){return e.href}))}(F),r.push.apply(r,i),[4,dt.getInstance().generateSmartLinks(fe&&!n?(0,Re.getBlockContent)(fe):he,O,r)];case 3:return t=s.sent(),[3,9];case 4:if((o=s.sent()).code&&o.code===U.ParselyAborted)throw o.numRetries=3-e,o;return e>0&&o.retryFetch?(console.error(o),[4,se(!0)]):[3,8];case 5:return s.sent(),[4,ae()];case 6:return s.sent(),[4,ge(e-1)];case 7:return[2,s.sent()];case 8:throw o;case 9:return[2,t]}var a}))}))},ye=function(){for(var e=[],t=0;t[type="button"]').forEach((function(e){e.setAttribute("disabled","disabled")}))},be=function(){document.querySelectorAll('.edit-post-header__settings>[type="button"]').forEach((function(e){e.removeAttribute("disabled")})),W.unlockPostSaving("wp-parsely-block-overlay")};return(0,f.jsxs)("div",{className:"wp-parsely-smart-linking",children:[(0,f.jsx)(Be,{isDetectingEnabled:!E,onLinkRemove:function(e){!function(e){De(this,void 0,void 0,(function(){var t,n,r;return Fe(this,(function(i){switch(i.label){case 0:return[4,Ye((0,Re.getBlockContent)(e),e.clientId)];case 1:return t=i.sent(),n=t.missingSmartLinks,r=t.didAnyFixes,n.forEach((function(e){(0,v.dispatch)(it).removeSmartLink(e.uid)})),[2,r]}}))}))}(e.block)}}),(0,f.jsxs)(h.PanelRow,{className:t,children:[(0,f.jsxs)("div",{className:"smart-linking-text",children:[(0,x.__)("Automatically insert links to your most relevant, top performing content.","wp-parsely"),(0,f.jsxs)(h.Button,{href:"https://docs.wpvip.com/parse-ly/wp-parsely-features/smart-linking/",target:"_blank",variant:"link",children:[(0,x.__)("Learn more about Parse.ly AI","wp-parsely"),(0,f.jsx)(ie,{icon:Y,size:18,className:"parsely-external-link-icon"})]})]}),N&&(0,f.jsx)(h.Notice,{status:"info",onRemove:function(){return K(null)},className:"wp-parsely-content-helper-error",children:N.Message()}),w&&g>0&&(0,f.jsx)(h.Notice,{status:"success",onRemove:function(){return b(!1)},className:"wp-parsely-smart-linking-suggested-links",children:(0,x.sprintf)(/* translators: 1 - number of smart links generated */ /* translators: 1 - number of smart links generated */ +(0,x.__)("Successfully added %s smart links.","wp-parsely"),g>0?g:A.length)}),(0,f.jsx)(lt,{disabled:T,selectedBlock:fe,onSettingChange:function(e,t){var n;p({SmartLinking:Rt(Rt({},a.SmartLinking),(n={},n[e]=t,n))}),"MaxLinks"===e&&oe(t)}}),(0,f.jsx)("div",{className:"smart-linking-generate",children:(0,f.jsx)(h.Button,{onClick:function(){return Bt(void 0,void 0,void 0,(function(){var e,t,n,r,o,s,a,l;return Mt(this,(function(c){switch(c.label){case 0:return[4,$(!0)];case 1:return c.sent(),[4,le()];case 2:return c.sent(),[4,K(null)];case 3:return c.sent(),b(!1),P.trackEvent("smart_linking_generate_pressed",{is_full_content:L,selected_block:null!==(s=null==fe?void 0:fe.name)&&void 0!==s?s:"none",context:i}),[4,ye(L?"all":null==fe?void 0:fe.clientId)];case 4:c.sent(),e=setTimeout((function(){var e;$(!1),P.trackEvent("smart_linking_generate_timeout",{is_full_content:L,selected_block:null!==(e=null==fe?void 0:fe.name)&&void 0!==e?e:"none",context:i}),me(L?"all":null==fe?void 0:fe.clientId)}),18e4),t=R,c.label=5;case 5:return c.trys.push([5,8,10,15]),[4,ge(3)];case 6:return n=c.sent(),[4,(u=n,Bt(void 0,void 0,void 0,(function(){var e;return Mt(this,(function(t){switch(t.label){case 0:return u=u.filter((function(e){return!F.some((function(t){return t.uid===e.uid&&t.applied}))})),e=ve.replace(/^https?:\/\//,"").replace(/\/+$/,""),u=(u=u.filter((function(t){return!t.href.includes(e)||(console.warn("PCH Smart Linking: Skipping self-reference link: ".concat(t.href)),!1)}))).filter((function(e){return!F.some((function(t){return t.href===e.href?(console.warn("PCH Smart Linking: Skipping duplicate link: ".concat(e.href)),!0):t.text===e.text&&t.offset!==e.offset&&(console.warn("PCH Smart Linking: Skipping duplicate link text: ".concat(e.text)),!0)}))})),u=(u=Ke(L?de:[fe],u,{}).filter((function(e){return e.match}))).filter((function(e){if(!e.match)return!1;var t=e.match.blockLinkPosition,n=t+e.text.length;return!F.some((function(r){if(!r.match)return!1;if(e.match.blockId!==r.match.blockId)return!1;var i=r.match.blockLinkPosition,o=i+r.text.length;return t>=i&&n<=o}))})),[4,Z(u)];case 1:return t.sent(),[2,u]}}))})))];case 7:if(0===c.sent().length)throw new te((0,x.__)("No smart links were generated.","wp-parsely"),U.ParselySuggestionsApiNoData,"");return ce(!0),[3,15];case 8:return r=c.sent(),o=new te(null!==(a=r.message)&&void 0!==a?a:"An unknown error has occurred.",null!==(l=r.code)&&void 0!==l?l:U.UnknownError),r.code&&r.code===U.ParselyAborted&&(o.message=(0,x.sprintf)(/* translators: %d: number of retry attempts, %s: attempt plural */ /* translators: %d: number of retry attempts, %s: attempt plural */ +(0,x.__)("The Smart Linking process was cancelled after %1$d %2$s.","wp-parsely"),r.numRetries,(0,x._n)("attempt","attempts",r.numRetries,"wp-parsely"))),console.error(r),[4,K(o)];case 9:return c.sent(),o.createErrorSnackbar(),[3,15];case 10:return[4,$(!1)];case 11:return c.sent(),[4,re(t)];case 12:return c.sent(),[4,se(!1)];case 13:return c.sent(),[4,me(L?"all":null==fe?void 0:fe.clientId)];case 14:return c.sent(),clearTimeout(e),[7];case 15:return[2]}var u}))}))},variant:"primary",isBusy:T,disabled:T,children:B?(0,x.sprintf)(/* translators: %1$d: number of retry attempts, %2$d: maximum number of retries */ /* translators: %1$d: number of retry attempts, %2$d: maximum number of retries */ +(0,x.__)("Retrying… Attempt %1$d of %2$d","wp-parsely"),D,3):T?(0,x.__)("Generating Smart Links…","wp-parsely"):(0,x.__)("Add Smart Links","wp-parsely")})}),(G.length>0||V.length>0)&&(0,f.jsx)("div",{className:"smart-linking-manage",children:(0,f.jsx)(h.Button,{onClick:function(){return Bt(void 0,void 0,void 0,(function(){var e,t;return Mt(this,(function(n){switch(n.label){case 0:return[4,Je()];case 1:return e=n.sent(),t=We(),[4,Z(t)];case 2:return n.sent(),ce(!0),P.trackEvent("smart_linking_review_pressed",{num_smart_links:F.length,has_fixed_links:e,context:i}),[2]}}))}))},variant:"secondary",disabled:T,children:(0,x.__)("Review Smart Links","wp-parsely")})})]}),E&&(0,f.jsx)(It,{isOpen:E,onAppliedLink:function(){y((function(e){return e+1}))},onClose:function(){b(!0),ce(!1)}})]})},Gt=function(){return Gt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0)&&(t(),e())}))}))]}))},new((n=void 0)||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}));var e,t,n,r}().then((function(){var t=document.querySelector(".wp-block-post-content");et(t,e)}))})))},Xt=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{d:"M7 11.5h10V13H7z"})}),en=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})}),tn=function(e){var t=e.title,n=e.icon,r=e.subtitle,i=e.level,o=void 0===i?2:i,s=e.children,a=e.controls,l=e.onClick,c=e.isOpen,u=e.isLoading,p=e.dropdownChildren;return(0,f.jsxs)("div",{className:"performance-stat-panel",children:[(0,f.jsxs)(h.__experimentalHStack,{className:"panel-header level-"+o,children:[(0,f.jsx)(h.__experimentalHeading,{level:o,children:t}),r&&!c&&(0,f.jsx)("span",{className:"panel-subtitle",children:r}),a&&!p&&(0,f.jsx)(h.DropdownMenu,{icon:n,label:(0,x.__)("Settings","wp-parsely"),className:"panel-settings-button",controls:a}),p&&(0,f.jsx)(h.DropdownMenu,{icon:n,label:(0,x.__)("Settings","wp-parsely"),className:"panel-settings-button",children:p}),n&&!p&&!a&&(0,f.jsx)(h.Button,{icon:n,className:"panel-settings-button",isPressed:c,onClick:l})]}),(0,f.jsx)("div",{className:"panel-body",children:u?(0,f.jsx)("div",{className:"parsely-spinner-wrapper","data-testid":"parsely-spinner-wrapper",children:(0,f.jsx)(h.Spinner,{})}):s})]})};function nn(e,t,n){void 0===t&&(t=1),void 0===n&&(n="");var r=parseInt(e.replace(/\D/g,""),10);if(r<1e3)return e;r<1e4&&(t=1);var i=r,o=r.toString(),s="",a=0;return Object.entries({1e3:"k","1,000,000":"M","1,000,000,000":"B","1,000,000,000,000":"T","1,000,000,000,000,000":"Q"}).forEach((function(e){var n=e[0],l=e[1],c=parseInt(n.replace(/\D/g,""),10);if(r>=c){var u=t;(i=r/c)%1>1/a&&(u=i>10?1:2),u=parseFloat(i.toFixed(2))===parseFloat(i.toFixed(0))?0:u,o=i.toFixed(u),s=l}a=c})),o+n+s}var rn=function(e){var t=e.data,n=e.isLoading,r=(0,_.useState)(w.Views),i=r[0],o=r[1],s=(0,_.useState)(!1),a=s[0],l=s[1];n||delete t.referrers.types.totals;var c=function(e){switch(e){case"social":return(0,x.__)("Social","wp-parsely");case"search":return(0,x.__)("Search","wp-parsely");case"other":return(0,x.__)("Other","wp-parsely");case"internal":return(0,x.__)("Internal","wp-parsely");case"direct":return(0,x.__)("Direct","wp-parsely")}return e},u=(0,x.sprintf)((0,x.__)("By %s","wp-parsely"),G(i)); +/* translators: %s: metric description */return(0,f.jsxs)(tn,{title:(0,x.__)("Categories","wp-parsely"),level:3,subtitle:u,isOpen:a,onClick:function(){return l(!a)},children:[a&&(0,f.jsx)("div",{className:"panel-settings",children:(0,f.jsx)(h.SelectControl,{value:i,prefix:(0,x.__)("By:","wp-parsely"),onChange:function(e){F(e,w)&&o(e)},children:Object.values(w).map((function(e){return(0,f.jsxs)("option",{value:e,disabled:"avg_engaged"===e,children:[G(e),"avg_engaged"===e&&" "+(0,x.__)("(coming soon)","wp-parsely")]},e)}))})}),n?(0,f.jsx)("div",{className:"parsely-spinner-wrapper","data-testid":"parsely-spinner-wrapper",children:(0,f.jsx)(h.Spinner,{})}):(0,f.jsxs)("div",{children:[(0,f.jsx)("div",{className:"multi-percentage-bar",children:Object.entries(t.referrers.types).map((function(e){var t=e[0],n=e[1],r=(0,x.sprintf)(/* translators: 1: Referrer type, 2: Percentage value, %%: Escaped percent sign */ /* translators: 1: Referrer type, 2: Percentage value, %%: Escaped percent sign */ (0,x.__)("%1$s: %2$s%%","wp-parsely"),c(t),n.viewsPercentage);return(0,f.jsx)(h.Tooltip /* translators: %s: percentage value */,{ /* translators: %s: percentage value */ -text:"".concat(c(t)," - ").concat((0,x.sprintf)((0,x.__)("%s%%","wp-parsely"),n.viewsPercentage)),delay:150,children:(0,f.jsx)("div",{"aria-label":r,className:"bar-fill "+t,style:{width:n.viewsPercentage+"%"}})},t)}))}),(0,f.jsx)("div",{className:"percentage-bar-labels",children:Object.entries(t.referrers.types).map((function(e){var t=e[0],n=e[1];return(0,f.jsxs)("div",{className:"single-label "+t,children:[(0,f.jsx)("div",{className:"label-color "+t}),(0,f.jsx)("div",{className:"label-text",children:c(t)}),(0,f.jsx)("div",{className:"label-value",children:nn(n.views)})]},t)}))})]})]})},sn=(0,f.jsx)(k.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,f.jsx)(k.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})}),on=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{d:"M15.5 9.5a1 1 0 100-2 1 1 0 000 2zm0 1.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm-2.25 6v-2a2.75 2.75 0 00-2.75-2.75h-4A2.75 2.75 0 003.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0120.25 15zM9.5 8.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z",fillRule:"evenodd"})}),an=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{d:"M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z"})}),ln=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})}),cn=function(){return cn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]%s has 0 views, or the Parse.ly API returned no data.","wp-parsely"),r),U.ParselyApiReturnedNoData,""))]):n.length>1?[2,Promise.reject(new te((0,x.sprintf)(/* translators: URL of the published post */ /* translators: URL of the published post */ -(0,x.__)("Multiple results were returned for the post %d by the Parse.ly API.","wp-parsely"),t),U.ParselyApiReturnedTooManyResults))]:[2,n[0]]}}))}))},t.prototype.fetchReferrerDataFromWpEndpoint=function(e,t,n){return xn(this,void 0,void 0,(function(){return kn(this,(function(r){switch(r.label){case 0:return[4,this.fetch({path:(0,we.addQueryArgs)("/wp-parsely/v2/stats/post/".concat(t,"/referrers"),bn(bn({},mn(e)),{itm_source:this.itmSource,total_views:n}))})];case 1:return[2,r.sent()]}}))}))},t}(be),jn=function(){return jn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&e.retryFetch?[4,new Promise((function(e){return setTimeout(e,500)}))]:[3,3];case 1:return t.sent(),[4,n(r-1)];case 2:return t.sent(),[3,4];case 3:a(e),i(!1),t.label=4;case 4:return[2]}}))}))})),[2]}))}))};return i(!0),n(1),function(){a(void 0)}}),[t]),(0,f.jsxs)("div",{className:"wp-parsely-performance-panel",children:[(0,f.jsx)(tn,{title:(0,x.__)("Performance Stats","wp-parsely"),icon:en,dropdownChildren:function(e){var t=e.onClose;return(0,f.jsx)(Nn,{onClose:t})},children:(0,f.jsx)("div",{className:"panel-settings",children:(0,f.jsx)(h.SelectControl,{size:"__unstable-large",value:d.PerformanceStats.Period,prefix:(0,f.jsx)(h.__experimentalInputControlPrefixWrapper,{children:(0,x.__)("Period:","wp-parsely")}),onChange:function(e){F(e,m)&&(v({PerformanceStats:jn(jn({},d.PerformanceStats),{Period:e})}),P.trackEvent("editor_sidebar_performance_period_changed",{period:e}))},children:Object.values(m).map((function(e){return(0,f.jsx)("option",{value:e,children:V(e)},e)}))})})}),o?o.Message():(0,f.jsxs)(f.Fragment,{children:[Cn(d,"overview")&&(0,f.jsx)(gn,{data:c,isLoading:r}),Cn(d,"categories")&&(0,f.jsx)(rn,{data:c,isLoading:r}),Cn(d,"referrers")&&(0,f.jsx)(yn,{data:c,isLoading:r})]}),window.wpParselyPostUrl&&(0,f.jsx)(h.Button,{className:"wp-parsely-view-post",variant:"primary",onClick:function(){P.trackEvent("editor_sidebar_view_post_pressed")},href:window.wpParselyPostUrl,rel:"noopener",target:"_blank",children:(0,x.__)("View this in Parse.ly","wp-parsely")})]})},On=function(e){var t=e.period;return(0,f.jsx)(h.Panel,{children:(0,f.jsx)(Ie,{children:(0,f.jsx)(An,{period:t})})})},In=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i=1&&(0,f.jsx)(h.__experimentalToggleGroupControlOption,{value:b.Tag,label:(0,x.__)("Tag","wp-parsely")}),r.categories.length>=1&&(0,f.jsx)(h.__experimentalToggleGroupControlOption,{value:b.Section,label:(0,x.__)("Section","wp-parsely")}),r.authors.length>=1&&(0,f.jsx)(h.__experimentalToggleGroupControlOption,{value:b.Author,label:(0,x.__)("Author","wp-parsely")})]})})},Bn=function(e){var t=e.filter,n=e.label,r=e.postData,i=In(e,["filter","label","postData"]);return(0,f.jsx)("div",{className:"related-posts-filter-values",children:(0,f.jsx)(h.ComboboxControl,{__next40pxDefaultSize:!0,allowReset:!0,label:n,onChange:function(e){return i.onFilterValueChange(e)},options:b.Tag===t.type?r.tags.map((function(e){return{value:e,label:e}})):b.Section===t.type?r.categories.map((function(e){return{value:e,label:e}})):b.Author===t.type?r.authors.map((function(e){return{value:e,label:e}})):[],value:t.value})})},Mn=function(e){var t=e.filter,n=e.postData,r=e.label,i=In(e,["filter","postData","label"]),s=function(){return n.authors.length>0&&n.categories.length>0||n.authors.length>0&&n.tags.length>0||n.tags.length>0&&n.categories.length>0},o=function(){return b.Tag===t.type&&n.tags.length>1||b.Section===t.type&&n.categories.length>1||b.Author===t.type&&n.authors.length>1};return s()||o()?(0,f.jsxs)("div",{className:"related-posts-filter-settings",children:[s()&&(0,f.jsx)(Rn,{filter:t,label:r,onFilterTypeChange:i.onFilterTypeChange,postData:n}),o()&&(0,f.jsx)(Bn,{filter:t,label:s()?void 0:r,onFilterValueChange:i.onFilterValueChange,postData:n})]}):null},Dn=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),Fn=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})}),Vn=function(){return(0,f.jsx)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"1",height:"40",viewBox:"0 0 1 40",fill:"none",children:(0,f.jsx)(h.Rect,{width:"1",height:"40",fill:"#cccccc"})})};function Gn(e){var t=e.metric,n=e.post,r=e.avgEngagedIcon,i=e.viewsIcon;return"views"===t?(0,f.jsxs)("span",{className:"parsely-post-metric-data",children:[(0,f.jsx)("span",{className:"screen-reader-text",children:(0,x.__)("Number of Views","wp-parsely")}),i,nn(n.views.toString())]}):"avg_engaged"===t?(0,f.jsxs)("span",{className:"parsely-post-metric-data",children:[(0,f.jsx)("span",{className:"screen-reader-text",children:(0,x.__)("Average Time","wp-parsely")}),r,n.avgEngaged]}):(0,f.jsx)("span",{className:"parsely-post-metric-data",children:"-"})}var Hn,zn=function(e){var t,n,r=e.metric,i=e.post,s=e.postContent,o=(0,v.useDispatch)("core/notices").createNotice,a=s&&(t=s,n=Ae(i.rawUrl),new RegExp("]*href=[\"'](http://|https://)?.*".concat(n,".*[\"'][^>]*>"),"i").test(t));return(0,f.jsxs)("div",{className:"related-post-single","data-testid":"related-post-single",children:[(0,f.jsx)("div",{className:"related-post-title",children:(0,f.jsxs)("a",{href:i.url,target:"_blank",rel:"noreferrer",children:[(0,f.jsx)("span",{className:"screen-reader-text",children:(0,x.__)("View on website (opens new tab)","wp-parsely")}),i.title]})}),(0,f.jsx)("div",{className:"related-post-actions",children:(0,f.jsxs)("div",{className:"related-post-info",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)("div",{className:"related-post-metric",children:(0,f.jsx)(Gn,{metric:r,post:i,viewsIcon:(0,f.jsx)(ie,{icon:sn}),avgEngagedIcon:(0,f.jsx)(h.Dashicon,{icon:"clock",size:24})})}),a&&(0,f.jsx)("div",{className:"related-post-linked",children:(0,f.jsx)(h.Tooltip,{text:(0,x.__)("This post is linked in the content","wp-parsely"),children:(0,f.jsx)(ie,{icon:Dn,size:24})})})]}),(0,f.jsx)(Vn,{}),(0,f.jsxs)("div",{children:[(0,f.jsx)(h.Button,{icon:Fn,iconSize:24,onClick:function(){navigator.clipboard.writeText(i.rawUrl).then((function(){o("success",(0,x.__)("URL copied to clipboard","wp-parsely"),{type:"snackbar"})}))},label:(0,x.__)("Copy URL to clipboard","wp-parsely")}),(0,f.jsx)(h.Button,{icon:(0,f.jsx)(E,{}),iconSize:18,href:i.dashUrl,target:"_blank",label:(0,x.__)("View in Parse.ly","wp-parsely")})]})]})})]})},Un=window.wp.coreData,qn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function __(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)}}(),$n=function(){return $n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&e.retryFetch?[4,new Promise((function(e){return setTimeout(e,500)}))]:[3,3];case 1:return t.sent(),[4,n(r-1)];case 2:return t.sent(),[3,4];case 3:a(e),i(!1),t.label=4;case 4:return[2]}}))}))})),[2]}))}))};return i(!0),n(1),function(){a(void 0)}}),[t]),(0,f.jsxs)("div",{className:"wp-parsely-performance-panel",children:[(0,f.jsx)(tn,{title:(0,x.__)("Performance Stats","wp-parsely"),icon:en,dropdownChildren:function(e){var t=e.onClose;return(0,f.jsx)(Nn,{onClose:t})},children:(0,f.jsx)("div",{className:"panel-settings",children:(0,f.jsx)(h.SelectControl,{size:"__unstable-large",value:d.PerformanceStats.Period,prefix:(0,f.jsx)(h.__experimentalInputControlPrefixWrapper,{children:(0,x.__)("Period:","wp-parsely")}),onChange:function(e){F(e,m)&&(v({PerformanceStats:jn(jn({},d.PerformanceStats),{Period:e})}),P.trackEvent("editor_sidebar_performance_period_changed",{period:e}))},children:Object.values(m).map((function(e){return(0,f.jsx)("option",{value:e,children:V(e)},e)}))})})}),s?s.Message():(0,f.jsxs)(f.Fragment,{children:[Cn(d,"overview")&&(0,f.jsx)(gn,{data:c,isLoading:r}),Cn(d,"categories")&&(0,f.jsx)(rn,{data:c,isLoading:r}),Cn(d,"referrers")&&(0,f.jsx)(yn,{data:c,isLoading:r})]}),window.wpParselyPostUrl&&(0,f.jsx)(h.Button,{className:"wp-parsely-view-post",variant:"primary",onClick:function(){P.trackEvent("editor_sidebar_view_post_pressed")},href:window.wpParselyPostUrl,rel:"noopener",target:"_blank",children:(0,x.__)("View this in Parse.ly","wp-parsely")})]})},On=function(e){var t=e.period;return(0,f.jsx)(h.Panel,{children:(0,f.jsx)(Ie,{children:(0,f.jsx)(An,{period:t})})})},In=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i=1&&(0,f.jsx)(h.__experimentalToggleGroupControlOption,{value:b.Tag,label:(0,x.__)("Tag","wp-parsely")}),r.categories.length>=1&&(0,f.jsx)(h.__experimentalToggleGroupControlOption,{value:b.Section,label:(0,x.__)("Section","wp-parsely")}),r.authors.length>=1&&(0,f.jsx)(h.__experimentalToggleGroupControlOption,{value:b.Author,label:(0,x.__)("Author","wp-parsely")})]})})},Bn=function(e){var t=e.filter,n=e.label,r=e.postData,i=In(e,["filter","label","postData"]);return(0,f.jsx)("div",{className:"related-posts-filter-values",children:(0,f.jsx)(h.ComboboxControl,{__next40pxDefaultSize:!0,allowReset:!0,label:n,onChange:function(e){return i.onFilterValueChange(e)},options:b.Tag===t.type?r.tags.map((function(e){return{value:e,label:e}})):b.Section===t.type?r.categories.map((function(e){return{value:e,label:e}})):b.Author===t.type?r.authors.map((function(e){return{value:e,label:e}})):[],value:t.value})})},Mn=function(e){var t=e.filter,n=e.postData,r=e.label,i=In(e,["filter","postData","label"]),o=function(){return n.authors.length>0&&n.categories.length>0||n.authors.length>0&&n.tags.length>0||n.tags.length>0&&n.categories.length>0},s=function(){return b.Tag===t.type&&n.tags.length>1||b.Section===t.type&&n.categories.length>1||b.Author===t.type&&n.authors.length>1};return o()||s()?(0,f.jsxs)("div",{className:"related-posts-filter-settings",children:[o()&&(0,f.jsx)(Rn,{filter:t,label:r,onFilterTypeChange:i.onFilterTypeChange,postData:n}),s()&&(0,f.jsx)(Bn,{filter:t,label:o()?void 0:r,onFilterValueChange:i.onFilterValueChange,postData:n})]}):null},Dn=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),Fn=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})}),Vn=function(){return(0,f.jsx)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"1",height:"40",viewBox:"0 0 1 40",fill:"none",children:(0,f.jsx)(h.Rect,{width:"1",height:"40",fill:"#cccccc"})})};function Gn(e){var t=e.metric,n=e.post,r=e.avgEngagedIcon,i=e.viewsIcon;return"views"===t?(0,f.jsxs)("span",{className:"parsely-post-metric-data",children:[(0,f.jsx)("span",{className:"screen-reader-text",children:(0,x.__)("Number of Views","wp-parsely")}),i,nn(n.views.toString())]}):"avg_engaged"===t?(0,f.jsxs)("span",{className:"parsely-post-metric-data",children:[(0,f.jsx)("span",{className:"screen-reader-text",children:(0,x.__)("Average Time","wp-parsely")}),r,n.avgEngaged]}):(0,f.jsx)("span",{className:"parsely-post-metric-data",children:"-"})}var Hn,zn=function(e){var t,n,r=e.metric,i=e.post,o=e.postContent,s=(0,v.useDispatch)("core/notices").createNotice,a=o&&(t=o,n=Ae(i.rawUrl),new RegExp("]*href=[\"'](http://|https://)?.*".concat(n,".*[\"'][^>]*>"),"i").test(t));return(0,f.jsxs)("div",{className:"related-post-single","data-testid":"related-post-single",children:[(0,f.jsx)("div",{className:"related-post-title",children:(0,f.jsxs)("a",{href:i.url,target:"_blank",rel:"noreferrer",children:[(0,f.jsx)("span",{className:"screen-reader-text",children:(0,x.__)("View on website (opens new tab)","wp-parsely")}),i.title]})}),(0,f.jsx)("div",{className:"related-post-actions",children:(0,f.jsxs)("div",{className:"related-post-info",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)("div",{className:"related-post-metric",children:(0,f.jsx)(Gn,{metric:r,post:i,viewsIcon:(0,f.jsx)(ie,{icon:on}),avgEngagedIcon:(0,f.jsx)(h.Dashicon,{icon:"clock",size:24})})}),a&&(0,f.jsx)("div",{className:"related-post-linked",children:(0,f.jsx)(h.Tooltip,{text:(0,x.__)("This post is linked in the content","wp-parsely"),children:(0,f.jsx)(ie,{icon:Dn,size:24})})})]}),(0,f.jsx)(Vn,{}),(0,f.jsxs)("div",{children:[(0,f.jsx)(h.Button,{icon:Fn,iconSize:24,onClick:function(){navigator.clipboard.writeText(i.rawUrl).then((function(){s("success",(0,x.__)("URL copied to clipboard","wp-parsely"),{type:"snackbar"})}))},label:(0,x.__)("Copy URL to clipboard","wp-parsely")}),(0,f.jsx)(h.Button,{icon:(0,f.jsx)(E,{}),iconSize:18,href:i.dashUrl,target:"_blank",label:(0,x.__)("View in Parse.ly","wp-parsely")})]})]})})]})},Un=window.wp.coreData,qn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function __(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)}}(),$n=function(){return $n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&f.every(Number.isInteger)?null!==(n=l("taxonomy","category",{include:f,context:"view"}))&&void 0!==n?n:void 0:null,tagRecords:o=Array.isArray(h)&&h.length>0&&h.every(Number.isInteger)?null!==(r=l("taxonomy","post_tag",{include:h,context:"view"}))&&void 0!==r?r:void 0:null,isLoading:u("getEntityRecords",["root","user",{include:[d],context:"view"}])||u("getEntityRecords",["taxonomy","category",{include:f,context:"view"}])||u("getEntityRecords",["taxonomy","post_tag",{include:h,context:"view"}]),hasResolved:(c("getEntityRecords",["root","user",{include:[d],context:"view"}])||null===i)&&(c("getEntityRecords",["taxonomy","category",{include:f,context:"view"}])||null===s)&&(c("getEntityRecords",["taxonomy","post_tag",{include:h,context:"view"}])||null===o)}}),[]);return(0,_.useEffect)((function(){var e=r.authorRecords,t=r.categoryRecords,i=r.tagRecords,s=r.isLoading;r.hasResolved&&!s&&n({authors:e,categories:t,tags:i,isReady:!0})}),[r]),t}(),c=l.authors,u=l.categories,p=l.tags,d=l.isReady;(0,_.useEffect)((function(){if(d){var e=function(e){return function(e){return!(!Array.isArray(e)||0===e.length)&&e.every((function(e){return"name"in e&&"id"in e&&"slug"in e&&"description"in e&&"link"in e}))}(e)?e.map((function(e){return e.name})):[]};a({authors:e(c),categories:e(u),tags:e(p)})}}),[c,u,p,d]);var g=(0,_.useState)(!0),y=g[0],k=g[1],S=(0,_.useState)(),j=S[0],T=S[1],E=(0,_.useState)(),L=E[0],C=E[1],N=(0,_.useState)([]),A=N[0],O=N[1],I=(0,_.useState)({type:t.RelatedPosts.FilterBy,value:t.RelatedPosts.FilterValue}),R=I[0],B=I[1],D=(0,_.useState)(void 0),H=D[0],z=D[1],U=(0,ne.useDebounce)(z,1e3);(0,v.useSelect)((function(e){if("undefined"==typeof jest){var t=e("core/editor").getEditedPostContent;U(t())}else U("Jest test is running")}),[U]);var q=function(e,r){n({RelatedPosts:Yn(Yn({},t.RelatedPosts),{FilterBy:e,FilterValue:r})})};return(0,_.useEffect)((function(){var e,t,n=function(e){return Jn(void 0,void 0,void 0,(function(){return Qn(this,(function(t){return Zn.getInstance().getRelatedPosts(r,i,R).then((function(e){O(e.posts),C(e.message),k(!1)})).catch((function(t){return Jn(void 0,void 0,void 0,(function(){return Qn(this,(function(r){switch(r.label){case 0:return e>0&&t.retryFetch?[4,new Promise((function(e){return setTimeout(e,500)}))]:[3,3];case 1:return r.sent(),[4,n(e-1)];case 2:return r.sent(),[3,4];case 3:k(!1),T(t),r.label=4;case 4:return[2]}}))}))})),[2]}))}))},s=b.Author===R.type,a=b.Tag===R.type,l=b.Section===R.type,c=b.Unavailable===R.type,u=0===o.authors.length,p=0===o.tags.length,d=0===o.categories.length,f=s&&!o.authors.includes(R.value),h=a&&!o.tags.includes(R.value),v=l&&!o.categories.includes(R.value);return k(!0),c||a&&p||l&&d||s&&u?Object.values(o).every((function(e){return 0===e.length}))||B((e="",t=b.Unavailable,o.tags.length>=1?(t=b.Tag,e=o.tags[0]):o.categories.length>=1?(t=b.Section,e=o.categories[0]):o.authors.length>=1&&(t=b.Author,e=o.authors[0]),{type:t,value:e})):h?B({type:b.Tag,value:o.tags[0]}):v?B({type:b.Section,value:o.categories[0]}):f?B({type:b.Author,value:o.authors[0]}):n(1),function(){k(!1),O([]),C(""),T(void 0)}}),[r,i,R,o]),0===o.authors.length&&0===o.categories.length&&0===o.tags.length&&d?(0,f.jsx)("div",{className:"wp-parsely-related-posts",children:(0,f.jsx)("div",{className:"related-posts-body",children:(0,x.__)("Error: No author, section, or tags could be found for this post.","wp-parsely")})}):(0,f.jsxs)("div",{className:"wp-parsely-related-posts",children:[(0,f.jsx)("div",{className:"related-posts-description",children:(0,x.__)("Find top-performing related posts based on a key metric.","wp-parsely")}),(0,f.jsxs)("div",{className:"related-posts-body",children:[(0,f.jsxs)("div",{className:"related-posts-settings",children:[(0,f.jsx)(h.SelectControl,{size:"__unstable-large",onChange:function(e){var r;F(r=e,w)&&(n({RelatedPosts:Yn(Yn({},t.RelatedPosts),{Metric:r})}),P.trackEvent("related_posts_metric_changed",{metric:r}))},prefix:(0,f.jsx)(h.__experimentalInputControlPrefixWrapper,{children:(0,x.__)("Metric:","wp-parsely")}),value:i,children:Object.values(w).map((function(e){return(0,f.jsx)("option",{value:e,children:G(e)},e)}))}),(0,f.jsx)(h.SelectControl,{size:"__unstable-large",value:r,prefix:(0,f.jsxs)(h.__experimentalInputControlPrefixWrapper,{children:[(0,x.__)("Period:","wp-parsely")," "]}),onChange:function(e){return function(e){F(e,m)&&(n({RelatedPosts:Yn(Yn({},t.RelatedPosts),{Period:e})}),P.trackEvent("related_posts_period_changed",{period:e}))}(e)},children:Object.values(m).map((function(e){return(0,f.jsx)("option",{value:e,children:V(e)},e)}))})]}),(0,f.jsx)(Mn,{label:(0,x.__)("Filter by","wp-parsely"),filter:R,onFilterTypeChange:function(e){if(F(e,b)){var t="",n=e;b.Tag===n&&(t=o.tags[0]),b.Section===n&&(t=o.categories[0]),b.Author===n&&(t=o.authors[0]),""!==t&&(q(n,t),B({type:n,value:t}),P.trackEvent("related_posts_filter_type_changed",{filter_type:n}))}},onFilterValueChange:function(e){"string"==typeof e&&(q(R.type,e),B(Yn(Yn({},R),{value:e})))},postData:o}),(0,f.jsxs)("div",{className:"related-posts-wrapper",children:[(0,f.jsx)("div",{children:(0,f.jsx)("p",{className:"related-posts-descr","data-testid":"parsely-related-posts-descr",children:b.Tag===R.type?(0,x.sprintf)(/* translators: 1: tag name, 2: period */ /* translators: 1: tag name, 2: period */ +message:(0,x.sprintf)((0,x.__)('by author "%1$s"',"wp-parsely"),n.value)};throw new te((0,x.__)("No valid filter type has been specified.","wp-parsely"),U.CannotFormulateApiQuery)},t}(be),Yn=function(){return Yn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&f.every(Number.isInteger)?null!==(n=l("taxonomy","category",{include:f,context:"view"}))&&void 0!==n?n:void 0:null,tagRecords:s=Array.isArray(h)&&h.length>0&&h.every(Number.isInteger)?null!==(r=l("taxonomy","post_tag",{include:h,context:"view"}))&&void 0!==r?r:void 0:null,isLoading:u("getEntityRecords",["root","user",{include:[d],context:"view"}])||u("getEntityRecords",["taxonomy","category",{include:f,context:"view"}])||u("getEntityRecords",["taxonomy","post_tag",{include:h,context:"view"}]),hasResolved:(c("getEntityRecords",["root","user",{include:[d],context:"view"}])||null===i)&&(c("getEntityRecords",["taxonomy","category",{include:f,context:"view"}])||null===o)&&(c("getEntityRecords",["taxonomy","post_tag",{include:h,context:"view"}])||null===s)}}),[]);return(0,_.useEffect)((function(){var e=r.authorRecords,t=r.categoryRecords,i=r.tagRecords,o=r.isLoading;r.hasResolved&&!o&&n({authors:e,categories:t,tags:i,isReady:!0})}),[r]),t}(),c=l.authors,u=l.categories,p=l.tags,d=l.isReady;(0,_.useEffect)((function(){if(d){var e=function(e){return function(e){return!(!Array.isArray(e)||0===e.length)&&e.every((function(e){return"name"in e&&"id"in e&&"slug"in e&&"description"in e&&"link"in e}))}(e)?e.map((function(e){return e.name})):[]};a({authors:e(c),categories:e(u),tags:e(p)})}}),[c,u,p,d]);var g=(0,_.useState)(!0),y=g[0],k=g[1],S=(0,_.useState)(),j=S[0],T=S[1],E=(0,_.useState)(),L=E[0],C=E[1],N=(0,_.useState)([]),A=N[0],O=N[1],I=(0,_.useState)({type:t.RelatedPosts.FilterBy,value:t.RelatedPosts.FilterValue}),R=I[0],B=I[1],D=(0,_.useState)(void 0),H=D[0],z=D[1],U=(0,ne.useDebounce)(z,1e3);(0,v.useSelect)((function(e){if("undefined"==typeof jest){var t=e("core/editor").getEditedPostContent;U(t())}else U("Jest test is running")}),[U]);var q=function(e,r){n({RelatedPosts:Yn(Yn({},t.RelatedPosts),{FilterBy:e,FilterValue:r})})};return(0,_.useEffect)((function(){var e,t,n=function(e){return Jn(void 0,void 0,void 0,(function(){return Qn(this,(function(t){return Zn.getInstance().getRelatedPosts(r,i,R).then((function(e){O(e.posts),C(e.message),k(!1)})).catch((function(t){return Jn(void 0,void 0,void 0,(function(){return Qn(this,(function(r){switch(r.label){case 0:return e>0&&t.retryFetch?[4,new Promise((function(e){return setTimeout(e,500)}))]:[3,3];case 1:return r.sent(),[4,n(e-1)];case 2:return r.sent(),[3,4];case 3:k(!1),T(t),r.label=4;case 4:return[2]}}))}))})),[2]}))}))},o=b.Author===R.type,a=b.Tag===R.type,l=b.Section===R.type,c=b.Unavailable===R.type,u=0===s.authors.length,p=0===s.tags.length,d=0===s.categories.length,f=o&&!s.authors.includes(R.value),h=a&&!s.tags.includes(R.value),v=l&&!s.categories.includes(R.value);return k(!0),c||a&&p||l&&d||o&&u?Object.values(s).every((function(e){return 0===e.length}))||B((e="",t=b.Unavailable,s.tags.length>=1?(t=b.Tag,e=s.tags[0]):s.categories.length>=1?(t=b.Section,e=s.categories[0]):s.authors.length>=1&&(t=b.Author,e=s.authors[0]),{type:t,value:e})):h?B({type:b.Tag,value:s.tags[0]}):v?B({type:b.Section,value:s.categories[0]}):f?B({type:b.Author,value:s.authors[0]}):n(1),function(){k(!1),O([]),C(""),T(void 0)}}),[r,i,R,s]),0===s.authors.length&&0===s.categories.length&&0===s.tags.length&&d?(0,f.jsx)("div",{className:"wp-parsely-related-posts",children:(0,f.jsx)("div",{className:"related-posts-body",children:(0,x.__)("Error: No author, section, or tags could be found for this post.","wp-parsely")})}):(0,f.jsxs)("div",{className:"wp-parsely-related-posts",children:[(0,f.jsx)("div",{className:"related-posts-description",children:(0,x.__)("Find top-performing related posts based on a key metric.","wp-parsely")}),(0,f.jsxs)("div",{className:"related-posts-body",children:[(0,f.jsxs)("div",{className:"related-posts-settings",children:[(0,f.jsx)(h.SelectControl,{size:"__unstable-large",onChange:function(e){var r;F(r=e,w)&&(n({RelatedPosts:Yn(Yn({},t.RelatedPosts),{Metric:r})}),P.trackEvent("related_posts_metric_changed",{metric:r}))},prefix:(0,f.jsx)(h.__experimentalInputControlPrefixWrapper,{children:(0,x.__)("Metric:","wp-parsely")}),value:i,children:Object.values(w).map((function(e){return(0,f.jsx)("option",{value:e,children:G(e)},e)}))}),(0,f.jsx)(h.SelectControl,{size:"__unstable-large",value:r,prefix:(0,f.jsxs)(h.__experimentalInputControlPrefixWrapper,{children:[(0,x.__)("Period:","wp-parsely")," "]}),onChange:function(e){return function(e){F(e,m)&&(n({RelatedPosts:Yn(Yn({},t.RelatedPosts),{Period:e})}),P.trackEvent("related_posts_period_changed",{period:e}))}(e)},children:Object.values(m).map((function(e){return(0,f.jsx)("option",{value:e,children:V(e)},e)}))})]}),(0,f.jsx)(Mn,{label:(0,x.__)("Filter by","wp-parsely"),filter:R,onFilterTypeChange:function(e){if(F(e,b)){var t="",n=e;b.Tag===n&&(t=s.tags[0]),b.Section===n&&(t=s.categories[0]),b.Author===n&&(t=s.authors[0]),""!==t&&(q(n,t),B({type:n,value:t}),P.trackEvent("related_posts_filter_type_changed",{filter_type:n}))}},onFilterValueChange:function(e){"string"==typeof e&&(q(R.type,e),B(Yn(Yn({},R),{value:e})))},postData:s}),(0,f.jsxs)("div",{className:"related-posts-wrapper",children:[(0,f.jsx)("div",{children:(0,f.jsx)("p",{className:"related-posts-descr","data-testid":"parsely-related-posts-descr",children:b.Tag===R.type?(0,x.sprintf)(/* translators: 1: tag name, 2: period */ /* translators: 1: tag name, 2: period */ (0,x.__)("Top related posts with the “%1$s” tag in the %2$s.","wp-parsely"),R.value,V(r,!0)):b.Section===R.type?(0,x.sprintf)(/* translators: 1: section name, 2: period */ /* translators: 1: section name, 2: period */ (0,x.__)("Top related posts in the “%1$s” section in the %2$s.","wp-parsely"),R.value,V(r,!0)):b.Author===R.type?(0,x.sprintf)(/* translators: 1: author name, 2: period */ /* translators: 1: author name, 2: period */ -(0,x.__)("Top related posts by %1$s in the %2$s.","wp-parsely"),R.value,V(r,!0)):null!=L?L:""})}),j&&j.Message(),y&&(0,f.jsx)("div",{className:"related-posts-loading-message","data-testid":"parsely-related-posts-loading-message",children:(0,x.__)("Loading…","wp-parsely")}),!y&&!j&&0===A.length&&(0,f.jsx)("div",{className:"related-posts-empty","data-testid":"parsely-related-posts-empty",children:(0,x.__)("No related posts found.","wp-parsely")}),!y&&A.length>0&&(0,f.jsx)("div",{className:"related-posts-list",children:A.map((function(e){return(0,f.jsx)(zn,{metric:i,post:e,postContent:H},e.id)}))})]})]})]})},er=(0,f.jsx)(k.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,f.jsx)(k.Path,{d:"M10.97 10.159a3.382 3.382 0 0 0-2.857.955l1.724 1.723-2.836 2.913L7 17h1.25l2.913-2.837 1.723 1.723a3.38 3.38 0 0 0 .606-.825c.33-.63.446-1.343.35-2.032L17 10.695 13.305 7l-2.334 3.159Z"})}),tr=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})}),nr=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})}),rr=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{d:"m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z"})}),ir=function(){return ir=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0?(0,f.jsx)("span",{className:"parsely-write-titles-text",children:(0,_.createInterpolateElement)( +(0,x.__)("Top related posts by %1$s in the %2$s.","wp-parsely"),R.value,V(r,!0)):null!=L?L:""})}),j&&j.Message(),y&&(0,f.jsx)("div",{className:"related-posts-loading-message","data-testid":"parsely-related-posts-loading-message",children:(0,x.__)("Loading…","wp-parsely")}),!y&&!j&&0===A.length&&(0,f.jsx)("div",{className:"related-posts-empty","data-testid":"parsely-related-posts-empty",children:(0,x.__)("No related posts found.","wp-parsely")}),!y&&A.length>0&&(0,f.jsx)("div",{className:"related-posts-list",children:A.map((function(e){return(0,f.jsx)(zn,{metric:i,post:e,postContent:H},e.id)}))})]})]})]})},er=(0,f.jsx)(k.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,f.jsx)(k.Path,{d:"M10.97 10.159a3.382 3.382 0 0 0-2.857.955l1.724 1.723-2.836 2.913L7 17h1.25l2.913-2.837 1.723 1.723a3.38 3.38 0 0 0 .606-.825c.33-.63.446-1.343.35-2.032L17 10.695 13.305 7l-2.334 3.159Z"})}),tr=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})}),nr=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})}),rr=(0,f.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,f.jsx)(k.Path,{d:"m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z"})}),ir=function(){return ir=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0?(0,f.jsx)("span",{className:"parsely-write-titles-text",children:(0,_.createInterpolateElement)( // translators: %1$s is the tone, %2$s is the persona. // translators: %1$s is the tone, %2$s is the persona. -(0,x.__)("We've generated a few titles based on the content of your post, written as a .","wp-parsely"),{tone:(0,f.jsx)("strong",{children:he(a)}),persona:(0,f.jsx)("strong",{children:le(u)})})}):(0,x.__)("Use Parse.ly AI to generate a title for your post.","wp-parsely"),(0,f.jsxs)(h.Button,{href:"https://docs.wpvip.com/parse-ly/wp-parsely-features/title-suggestions/",target:"_blank",variant:"link",children:[(0,x.__)("Learn more about Parse.ly AI","wp-parsely"),(0,f.jsx)(ie,{icon:Y,size:18,className:"parsely-external-link-icon"})]})]}),i&&(0,f.jsx)(h.Notice,{className:"wp-parsely-content-helper-error",onRemove:function(){return s(void 0)},status:"info",children:i.Message()}),void 0!==k&&(0,f.jsx)(pr,{title:k,type:Hn.PostTitle,isOriginal:!0}),00&&(0,f.jsx)(dr,{pinnedTitles:m,isOpen:!0}),y.length>0&&(0,f.jsx)(hr,{suggestions:y,isOpen:!0,isLoading:g})]}),(0,f.jsx)(fr,{isLoading:g,onPersonaChange:function(e){N("Persona",e),p(e)},onSettingChange:N,onToneChange:function(e){N("Tone",e),l(e)},persona:t.TitleSuggestions.Persona,tone:t.TitleSuggestions.Tone}),(0,f.jsx)("div",{className:"title-suggestions-generate",children:(0,f.jsxs)(h.Button,{variant:"primary",isBusy:g,disabled:g||"custom"===a||"custom"===u,onClick:function(){return mr(void 0,void 0,void 0,(function(){return wr(this,(function(e){switch(e.label){case 0:return s(void 0),!1!==g?[3,2]:(P.trackEvent("title_suggestions_generate_pressed",{request_more:y.length>0,total_titles:y.length,total_pinned:y.filter((function(e){return e.isPinned})).length,tone:a,persona:u}),[4,(t=Hn.PostTitle,n=A,r=a,i=u,mr(void 0,void 0,void 0,(function(){var e,o,a;return wr(this,(function(l){switch(l.label){case 0:return[4,T(!0)];case 1:l.sent(),e=gr.getInstance(),l.label=2;case 2:return l.trys.push([2,5,,6]),[4,e.generateTitles(n,3,r,i)];case 3:return o=l.sent(),[4,j(t,o)];case 4:return l.sent(),[3,6];case 5:return a=l.sent(),s(a),j(t,[]),[3,6];case 6:return[4,T(!1)];case 7:return l.sent(),[2]}}))})))]);case 1:e.sent(),e.label=2;case 2:return[2]}var t,n,r,i}))}))},children:[g&&(0,x.__)("Generating Titles…","wp-parsely"),!g&&w.length>0&&(0,x.__)("Generate More","wp-parsely"),!g&&0===w.length&&(0,x.__)("Generate Titles","wp-parsely")]})})]})})},_r=function(){return _r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n titles based on the content of your post, written as a .","wp-parsely"),{tone:(0,f.jsx)("strong",{children:he(a)}),persona:(0,f.jsx)("strong",{children:le(u)})})}):(0,x.__)("Use Parse.ly AI to generate a title for your post.","wp-parsely"),(0,f.jsxs)(h.Button,{href:"https://docs.wpvip.com/parse-ly/wp-parsely-features/title-suggestions/",target:"_blank",variant:"link",children:[(0,x.__)("Learn more about Parse.ly AI","wp-parsely"),(0,f.jsx)(ie,{icon:Y,size:18,className:"parsely-external-link-icon"})]})]}),i&&(0,f.jsx)(h.Notice,{className:"wp-parsely-content-helper-error",onRemove:function(){return o(void 0)},status:"info",children:i.Message()}),void 0!==k&&(0,f.jsx)(pr,{title:k,type:Hn.PostTitle,isOriginal:!0}),00&&(0,f.jsx)(dr,{pinnedTitles:m,isOpen:!0}),y.length>0&&(0,f.jsx)(hr,{suggestions:y,isOpen:!0,isLoading:g})]}),(0,f.jsx)(fr,{isLoading:g,onPersonaChange:function(e){N("Persona",e),p(e)},onSettingChange:N,onToneChange:function(e){N("Tone",e),l(e)},persona:t.TitleSuggestions.Persona,tone:t.TitleSuggestions.Tone}),(0,f.jsx)("div",{className:"title-suggestions-generate",children:(0,f.jsxs)(h.Button,{variant:"primary",isBusy:g,disabled:g||"custom"===a||"custom"===u,onClick:function(){return mr(void 0,void 0,void 0,(function(){return wr(this,(function(e){switch(e.label){case 0:return o(void 0),!1!==g?[3,2]:(P.trackEvent("title_suggestions_generate_pressed",{request_more:y.length>0,total_titles:y.length,total_pinned:y.filter((function(e){return e.isPinned})).length,tone:a,persona:u}),[4,(t=Hn.PostTitle,n=A,r=a,i=u,mr(void 0,void 0,void 0,(function(){var e,s,a;return wr(this,(function(l){switch(l.label){case 0:return[4,T(!0)];case 1:l.sent(),e=gr.getInstance(),l.label=2;case 2:return l.trys.push([2,5,,6]),[4,e.generateTitles(n,3,r,i)];case 3:return s=l.sent(),[4,j(t,s)];case 4:return l.sent(),[3,6];case 5:return a=l.sent(),o(a),j(t,[]),[3,6];case 6:return[4,T(!1)];case 7:return l.sent(),[2]}}))})))]);case 1:e.sent(),e.label=2;case 2:return[2]}var t,n,r,i}))}))},children:[g&&(0,x.__)("Generating Titles…","wp-parsely"),!g&&w.length>0&&(0,x.__)("Generate More","wp-parsely"),!g&&0===w.length&&(0,x.__)("Generate Titles","wp-parsely")]})})]})})},_r=function(){return _r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n
{ __( 'Generate With Parse.ly', 'wp-parsely' ) } - { __( 'Beta', 'wp-parsely' ) }
; diff --git a/src/content-helper/editor-sidebar/excerpt-suggestions/excerpt-suggestions.scss b/src/content-helper/editor-sidebar/excerpt-suggestions/excerpt-suggestions.scss index ba12ee00a..97737d051 100644 --- a/src/content-helper/editor-sidebar/excerpt-suggestions/excerpt-suggestions.scss +++ b/src/content-helper/editor-sidebar/excerpt-suggestions/excerpt-suggestions.scss @@ -57,11 +57,6 @@ display: inline-block; padding: 0; margin-left: to_rem(5px); - - span.beta-label { - padding-left: to_rem(6px); - color: var(--Gutenberg-Gray-700, #757575); - } } } diff --git a/src/content-helper/editor-sidebar/smart-linking/smart-linking.tsx b/src/content-helper/editor-sidebar/smart-linking/smart-linking.tsx index cb40a3558..4ec5239d5 100644 --- a/src/content-helper/editor-sidebar/smart-linking/smart-linking.tsx +++ b/src/content-helper/editor-sidebar/smart-linking/smart-linking.tsx @@ -80,7 +80,7 @@ const SmartLinkingInspectorControlPanel = createHigherOrderComponent( ( BlockEdi { /* @ts-ignore */ } } diff --git a/src/content-helper/editor-sidebar/tabs/sidebar-tools-tab.tsx b/src/content-helper/editor-sidebar/tabs/sidebar-tools-tab.tsx index 339bee8b3..504e0e81a 100644 --- a/src/content-helper/editor-sidebar/tabs/sidebar-tools-tab.tsx +++ b/src/content-helper/editor-sidebar/tabs/sidebar-tools-tab.tsx @@ -43,7 +43,7 @@ export const SidebarToolsTab = ( { permissions.TitleSuggestions && { setSettings( { @@ -65,7 +65,7 @@ export const SidebarToolsTab = ( permissions.ExcerptSuggestions && { setSettings( { @@ -86,7 +86,7 @@ export const SidebarToolsTab = ( { permissions.SmartLinking && { setSettings( {