@automattic/newspack-blocks 4.30.2 → 4.30.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## @automattic/newspack-blocks [4.30.3](https://github.com/Automattic/newspack-workspace/compare/newspack-blocks@4.30.2...newspack-blocks@4.30.3) (2026-08-20)
2
+
3
+
4
+ ### Dependencies
5
+
6
+ * **newspack-components:** upgraded to 4.6.3
7
+
1
8
  ## @automattic/newspack-blocks [4.30.2](https://github.com/Automattic/newspack-workspace/compare/newspack-blocks@4.30.1...newspack-blocks@4.30.2) (2026-08-18)
2
9
 
3
10
 
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-url'), 'version' => 'ddda9fe554fee3d5213c');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-url'), 'version' => '78111562a587559545c6');
package/dist/editor.js CHANGED
@@ -9,7 +9,7 @@
9
9
  // Translators: %s: The name of the type.
10
10
  (0,g.__)("%s type","newspack-plugin"),T.charAt(0).toUpperCase()+T.slice(1)),value:re,options:C.map(function(e){return{label:e.label,value:e.slug}}),onChange:function(e){return ae(e)}}),(0,l.jsx)(z,{tokens:[],onChange:ue,fetchSuggestions:function(){var e=R(U().m(function e(t){return U().w(function(e){for(;;)if(0===e.n)return e.a(2,ce(t,0,re))},e)}));return function(t){return e.apply(this,arguments)}}(),fetchSavedInfo:function(e){return le(e)},label:f,loading:H,help:!d&&c,returnFullObjects:!0}),function(){if(0===K.length)return null;var e=w?"newspack-autocomplete-with-suggestions__search-suggestions-multiselect":"newspack-autocomplete-with-suggestions__search-suggestions";return(0,l.jsxs)(l.Fragment,{children:[!d&&(0,l.jsx)("p",{className:"newspack-autocomplete-with-suggestions__label",children:/* Translators: %s: the name of a post type. */ /* Translators: %s: the name of a post type. */(0,g.sprintf)((0,g.__)("Or, select a recent %s:","newspack-plugin"),T)}),(0,l.jsxs)("div",{className:e,children:[K.map(de),K.length<(v||ee)&&(0,l.jsx)(a.Button,{disabled:X,isSecondary:!0,onClick:function(){return Y(!0)},children:X?(0,g.__)("Loading…","newspack-plugin"):(0,g.__)("Load more","newspack-plugin")})]})]})}()]})},Y=function(e){var t=e.text,n=e.level,r=void 0===n?"default":n,a=i()("newspack-badge","is-".concat(r));return(0,l.jsx)("span",{className:a,children:t})},Z=function(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(e=>n.searchParams.append("args[]",e)),`Base UI error #${e}; visit ${n} for the full message.`};var K=n(1609),Q=n.t(K,2),J=n.n(K);const ee={};function te(e,t){const n=K.useRef(ee);return n.current===ee&&(n.current=e(t)),n}function ne(e,t,n,r){const a=te(re).current;return function(e,t,n,r,a){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==a}(a,e,t,n,r)&&ae(a,[e,t,n,r]),a.callback}function re(){return{callback:null,cleanup:null,refs:[]}}function ae(e,t){e.refs=t,t.every(e=>null==e)?e.callback=null:e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=n){const r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){const a=t[e];if(null!=a)switch(typeof a){case"function":{const t=a(n);"function"==typeof t&&(r[e]=t);break}case"object":a.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){const n=t[e];if(null!=n)switch(typeof n){case"function":{const t=r[e];"function"==typeof t?t():n(null);break}case"object":n.current=null}}}}}}const se=parseInt(K.version,10);function oe(e){return se>=e}function ie(e){if(!K.isValidElement(e))return null;const t=e,n=t.props;return(oe(19)?n?.ref:t.ref)??null}function le(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}function ce(){}const ue=Object.freeze([]),de=Object.freeze({}),pe={};function fe(e,t,n,r,a){if(!(n||r||a||e))return he(t);let s=he(e);return t&&(s=ge(s,t)),n&&(s=ge(s,n)),r&&(s=ge(s,r)),a&&(s=ge(s,a)),s}function he(e){return ve(e)?{...be(e,pe)}:function(e){const t={...e};for(const e in t){const n=t[e];me(e,n)&&(t[e]=ye(n))}return t}(e)}function ge(e,t){return ve(t)?be(t,e):function(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":e[n]=le(e.style,r);break;case"className":e[n]=xe(e.className,r);break;default:me(n,r)?e[n]=we(e[n],r):e[n]=r}}return e}(e,t)}function me(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),a=e.charCodeAt(2);return 111===n&&110===r&&a>=65&&a<=90&&("function"==typeof t||void 0===t)}function ve(e){return"function"==typeof e}function be(e,t){return ve(e)?e(t):e??pe}function we(e,t){return t?e?(...n)=>{const r=n[0];if(ke(r)){const a=r;_e(a);const s=t(...n);return a.baseUIHandlerPrevented||e?.(...n),s}const a=t(...n);return e?.(...n),a}:ye(t):e}function ye(e){return e?(...t)=>{const n=t[0];return ke(n)&&_e(n),e(...t)}:e}function _e(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function xe(e,t){return t?e?t+" "+e:t:e}function ke(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}function Se(e,t,n={}){const r=t.render,a=function(e,t={}){const{className:n,style:r,render:a}=e,{state:s=de,ref:o,props:i,stateAttributesMapping:l,enabled:c=!0}=t,u=c?function(e,t){return"function"==typeof e?e(t):e}(n,s):void 0,d=c?function(e,t){return"function"==typeof e?e(t):e}(r,s):void 0,p=c?function(e,t){const n={};for(const r in e){const a=e[r];if(t?.hasOwnProperty(r)){const e=t[r](a);null!=e&&Object.assign(n,e);continue}!0===a?n[`data-${r.toLowerCase()}`]="":a&&(n[`data-${r.toLowerCase()}`]=a.toString())}return n}(s,l):de,f=c&&i?function(e){return Array.isArray(e)?function(e){if(0===e.length)return pe;if(1===e.length)return he(e[0]);let t=he(e[0]);for(let n=1;n<e.length;n+=1)t=ge(t,e[n]);return t}(e):fe(void 0,e)}(i):void 0,h=c?le(p,f)??{}:de;return"undefined"!=typeof document&&(c?Array.isArray(o)?h.ref=function(e){const t=te(re).current;return function(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}(t,e)&&ae(t,e),t.callback}([h.ref,ie(a),...o]):h.ref=ne(h.ref,ie(a),o):ne(null,null)),c?(void 0!==u&&(h.className=xe(h.className,u)),void 0!==d&&(h.style=le(h.style,d)),h):de}(t,n);return!1===n.enabled?null:function(e,t,n,r){if(t){if("function"==typeof t)return t(n,r);const e=fe(n,t.props);e.ref=n.ref;let a=t;return a?.$$typeof===je&&(a=K.Children.toArray(t)[0]),K.cloneElement(a,e)}if(e&&"string"==typeof e)return function(e,t){return"button"===e?(0,K.createElement)("button",{type:"button",...t,key:t.key}):"img"===e?(0,K.createElement)("img",{alt:"",...t,key:t.key}):K.createElement(e,t)}(e,n);throw new Error(Z(8))}(e,r,a,n.state??de)}const je=Symbol.for("react.lazy");function Ce(e){return Se(e.defaultTagName??"div",e,e)}var Ee="data-wp-hash";function Te(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=Te();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[n,r]of t.styles)Pe(e,n,r)}(document)),e.__wpStyleRuntime}function Pe(e,t,n){if(!e.head)return;const r=Te();let a=r.injectedStyles.get(e);if(a||(a=new Set,r.injectedStyles.set(e,a)),a.has(t))return;if(function(e,t){if(!e.head)return!1;for(const n of e.head.querySelectorAll(`style[${Ee}]`))if(n.getAttribute(Ee)===t)return!0;return!1}(e,t))return void a.add(t);const s=e.createElement("style");s.setAttribute(Ee,t),s.appendChild(e.createTextNode(n)),e.head.appendChild(s),a.add(t)}!function(e,t){const n=Te();n.styles.set(e,t);for(const r of n.documents.keys())Pe(r,e,t)}("32aba35fe1","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");var Oe={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},Me=(0,s.forwardRef)(function({direction:e,gap:t,align:n,justify:r,wrap:a,render:s,...o},i){return Ce({render:s,ref:i,props:fe(o,{style:{gap:t&&Oe[t],alignItems:n,justifyContent:r,flexDirection:e,flexWrap:a},className:"_19ce0419607e1896__stack"})})});function Ae(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=Ae(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const Le=function(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Ae(e))&&(r&&(r+=" "),r+=t);return r};var Ne="data-wp-hash";function Ie(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=Ie();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[n,r]of t.styles)De(e,n,r)}(document)),e.__wpStyleRuntime}function De(e,t,n){if(!e.head)return;const r=Ie();let a=r.injectedStyles.get(e);if(a||(a=new Set,r.injectedStyles.set(e,a)),a.has(t))return;if(function(e,t){if(!e.head)return!1;for(const n of e.head.querySelectorAll(`style[${Ne}]`))if(n.getAttribute(Ne)===t)return!0;return!1}(e,t))return void a.add(t);const s=e.createElement("style");s.setAttribute(Ne,t),s.appendChild(e.createTextNode(n)),e.head.appendChild(s),a.add(t)}function ze(e,t){const n=Ie();n.styles.set(e,t);for(const r of n.documents.keys())De(r,e,t)}ze("0c5702ddca",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');var Be={text:"_83ed8a8da5dd50ea__text","heading-2xl":"_14437cfb77831647__heading-2xl","heading-xl":"_3c78b7fa9b4072dd__heading-xl","heading-lg":"aa58f227716bcde2__heading-lg","heading-md":"fc4da56d8dfe52c4__heading-md","heading-sm":"a9b78c7c82e8dff7__heading-sm","body-xl":"_305ff559e52180d5__body-xl","body-lg":"ca1aa3fc2029e958__body-lg","body-md":"_131101940be12424__body-md","body-sm":"_0e8d87a42c1f75fa__body-sm"};ze("d390e935a7","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");var Re=(0,s.forwardRef)(function({variant:e="body-md",render:t,className:n,...r},a){return Ce({render:t,defaultTagName:"span",ref:a,props:fe(r,{className:Le(Be.text,"e97669c6d9a38497__heading","_43cec3e1eec1066d__p",Be[e],n)})})}),He="data-wp-hash";function Ve(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=Ve();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[n,r]of t.styles)$e(e,n,r)}(document)),e.__wpStyleRuntime}function $e(e,t,n){if(!e.head)return;const r=Ve();let a=r.injectedStyles.get(e);if(a||(a=new Set,r.injectedStyles.set(e,a)),a.has(t))return;if(function(e,t){if(!e.head)return!1;for(const n of e.head.querySelectorAll(`style[${He}]`))if(n.getAttribute(He)===t)return!0;return!1}(e,t))return void a.add(t);const s=e.createElement("style");s.setAttribute(He,t),s.appendChild(e.createTextNode(n)),e.head.appendChild(s),a.add(t)}function Fe(e,t){const n=Ve();n.styles.set(e,t);for(const r of n.documents.keys())$e(r,e,t)}Fe("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");Fe("5f8e7aa0bc","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");Fe("7e0119b657",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.d4250949359b05ce__link{text-decoration-thickness:from-font;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{display:inline-block;font-weight:var(--wpds-typography-font-weight-regular,400);line-height:1;margin-inline-start:var(--wpds-dimension-padding-xs,4px);text-decoration:none}._0cb411afac4c86c7__link-icon:after{content:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}}');var Ge={link:"d4250949359b05ce__link","is-brand":"c6055659b8e2cd2c__is-brand","is-neutral":"_92e0dfcaeee15b88__is-neutral","is-unstyled":"cf122a9bf1035d42__is-unstyled","link-icon":"_0cb411afac4c86c7__link-icon"};Fe("d390e935a7","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");var qe=(0,s.forwardRef)(function({children:e,variant:t="default",tone:n="brand",openInNewTab:r=!1,render:a,className:s,...o},i){return Ce({render:a,defaultTagName:"a",ref:i,props:fe(o,{className:Le("_2c0831b0499dbd6e__a","_336cd3e4e743482f__box-sizing","_08e8a2e44959f892__outset-ring--focus","unstyled"!==t&&Ge.link,"unstyled"!==t&&Ge[`is-${n}`],"unstyled"===t&&Ge["is-unstyled"],s),target:r?"_blank":void 0,children:(0,l.jsxs)(l.Fragment,{children:[e,r&&(0,l.jsx)("span",{className:Ge["link-icon"],role:"img","aria-label":
11
11
  /* translators: accessibility text appended to link text */
12
- /* translators: accessibility text appended to link text */(0,g.__)("(opens in a new tab)")})]})})})});const Ue=function(e){var t=e.items,n=void 0===t?[]:t;if(!n.length)return null;var r=n.slice(0,-1),a=n[n.length-1];return(0,l.jsx)("nav",{"aria-label":(0,g.__)("Breadcrumbs","newspack-plugin"),children:(0,l.jsxs)(Me,{render:(0,l.jsx)("ul",{}),direction:"row",align:"center",className:"newspack-breadcrumbs__list",children:[r.map(function(e,t){return(0,l.jsxs)("li",{children:[e.url?(0,l.jsx)(Re,{variant:"body-lg",render:(0,l.jsx)(qe,{tone:"neutral",render:(0,l.jsx)("a",{href:e.url})}),children:e.label}):(0,l.jsx)(Re,{variant:"body-lg",children:e.label}),(0,l.jsx)(Re,{variant:"body-lg","aria-hidden":"true",className:"newspack-breadcrumbs__separator",children:"/"})]},e.url||t)}),a&&a.label&&(0,l.jsx)("li",{children:(0,l.jsx)(Re,{variant:"heading-lg",render:(0,l.jsx)("h1",{}),className:"newspack-breadcrumbs__current",children:a.label})})]})})};var We=n(4722);function Xe(e,t){if(null==e)return{};var n,r,a=(0,We.A)(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Ye(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,M(e,t)}var Ze=n(5821),Ke=n.n(Ze),Qe=n(4347);function Je(e){return"/"===e.charAt(0)}function et(e,t){for(var n=t,r=n+1,a=e.length;r<a;n+=1,r+=1)e[n]=e[r];e.pop()}function tt(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}const nt=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every(function(t,r){return e(t,n[r])});if("object"==typeof t||"object"==typeof n){var r=tt(t),a=tt(n);return r!==t||a!==n?e(r,a):Object.keys(Object.assign({},t,n)).every(function(r){return e(t[r],n[r])})}return!1};function rt(e,t){if(!e)throw new Error("Invariant failed")}function at(e){return"/"===e.charAt(0)?e:"/"+e}function st(e){return"/"===e.charAt(0)?e.substr(1):e}function ot(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function it(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function lt(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function ct(e,t,n,r){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var s=t.indexOf("?");return-1!==s&&(n=t.substr(s),t=t.substr(0,s)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),a.state=t):(void 0===(a=(0,Qe.A)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(a.key=n),r?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],a=t&&t.split("/")||[],s=e&&Je(e),o=t&&Je(t),i=s||o;if(e&&Je(e)?a=r:r.length&&(a.pop(),a=a.concat(r)),!a.length)return"/";if(a.length){var l=a[a.length-1];n="."===l||".."===l||""===l}else n=!1;for(var c=0,u=a.length;u>=0;u--){var d=a[u];"."===d?et(a,u):".."===d?(et(a,u),c++):c&&(et(a,u),c--)}if(!i)for(;c--;c)a.unshift("..");!i||""===a[0]||a[0]&&Je(a[0])||a.unshift("");var p=a.join("/");return n&&"/"!==p.substr(-1)&&(p+="/"),p}(a.pathname,r.pathname)):a.pathname=r.pathname:a.pathname||(a.pathname="/"),a}function ut(){var e=null,t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var s="function"==typeof e?e(t,n):e;"string"==typeof s?"function"==typeof r?r(s,a):a(!0):a(!1!==s)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter(function(e){return e!==r})}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach(function(e){return e.apply(void 0,n)})}}}var dt=!("undefined"==typeof window||!window.document||!window.document.createElement);function pt(e,t){t(window.confirm(e))}var ft="popstate",ht="hashchange";function gt(){try{return window.history.state||{}}catch(e){return{}}}var mt="hashchange",vt={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+st(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:st,decodePath:at},slash:{encodePath:at,decodePath:at}};function bt(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function wt(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function yt(e){window.location.replace(bt(window.location.href)+"#"+e)}function _t(e,t,n){return Math.min(Math.max(e,t),n)}var xt=n(634),kt=n.n(xt),St=(n(7020),n(4674)),jt=n.n(St),Ct=1073741823,Et="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:{},Tt=J().createContext||function(e,t){var n,r,a,s="__create-react-context-"+((Et[a="__global_unique_id__"]=(Et[a]||0)+1)+"__"),o=function(e){function n(){for(var t,n,r,a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];return(t=e.call.apply(e,[this].concat(s))||this).emitter=(n=t.props.value,r=[],{on:function(e){r.push(e)},off:function(e){r=r.filter(function(t){return t!==e})},get:function(){return n},set:function(e,t){n=e,r.forEach(function(e){return e(n,t)})}}),t}Ye(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[s]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,a=e.value;!function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(r,a)?(n="function"==typeof t?t(r,a):Ct,0!=(n|=0)&&this.emitter.set(e.value,n)):n=0}},r.render=function(){return this.props.children},n}(J().Component);o.childContextTypes=((n={})[s]=Ke().object.isRequired,n);var i=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(e=t.call.apply(t,[this].concat(r))||this).observedBits=void 0,e.state={value:e.getValue()},e.onUpdate=function(t,n){(0|e.observedBits)&n&&e.setState({value:e.getValue()})},e}Ye(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?Ct:t},r.componentDidMount=function(){this.context[s]&&this.context[s].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?Ct:e},r.componentWillUnmount=function(){this.context[s]&&this.context[s].off(this.onUpdate)},r.getValue=function(){return this.context[s]?this.context[s].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(J().Component);return i.contextTypes=((r={})[s]=Ke().object,r),{Provider:o,Consumer:i}},Pt=function(e){var t=Tt();return t.displayName=e,t},Ot=Pt("Router-History"),Mt=Pt("Router"),At=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen(function(e){n._pendingLocation=e})),n}Ye(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){var e=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen(function(t){e._isMounted&&e.setState({location:t})})),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return J().createElement(Mt.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},J().createElement(Ot.Provider,{children:this.props.children||null,value:this.props.history}))},t}(J().Component),Lt=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=function(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,r=t.initialEntries,a=void 0===r?["/"]:r,s=t.initialIndex,o=void 0===s?0:s,i=t.keyLength,l=void 0===i?6:i,c=ut();function u(e){(0,Qe.A)(m,e),m.length=m.entries.length,c.notifyListeners(m.location,m.action)}function d(){return Math.random().toString(36).substr(2,l)}var p=_t(o,0,a.length-1),f=a.map(function(e){return ct(e,void 0,"string"==typeof e?d():e.key||d())}),h=lt;function g(e){var t=_t(m.index+e,0,m.entries.length-1),r=m.entries[t];c.confirmTransitionTo(r,"POP",n,function(e){e?u({action:"POP",location:r,index:t}):u()})}var m={length:f.length,action:"POP",location:f[p],index:p,entries:f,createHref:h,push:function(e,t){var r="PUSH",a=ct(e,t,d(),m.location);c.confirmTransitionTo(a,r,n,function(e){if(e){var t=m.index+1,n=m.entries.slice(0);n.length>t?n.splice(t,n.length-t,a):n.push(a),u({action:r,location:a,index:t,entries:n})}})},replace:function(e,t){var r="REPLACE",a=ct(e,t,d(),m.location);c.confirmTransitionTo(a,r,n,function(e){e&&(m.entries[m.index]=a,u({action:r,location:a}))})},go:g,goBack:function(){g(-1)},goForward:function(){g(1)},canGo:function(e){var t=m.index+e;return t>=0&&t<m.entries.length},block:function(e){return void 0===e&&(e=!1),c.setPrompt(e)},listen:function(e){return c.appendListener(e)}};return m}(t.props),t}return Ye(t,e),t.prototype.render=function(){return J().createElement(At,{history:this.history,children:this.props.children})},t}(J().Component),Nt=function(e){function t(){return e.apply(this,arguments)||this}Ye(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(e){this.props.onUpdate&&this.props.onUpdate.call(this,this,e)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},t}(J().Component);function It(e){var t=e.message,n=e.when,r=void 0===n||n;return J().createElement(Mt.Consumer,null,function(e){if(e||rt(!1),!r||e.staticContext)return null;var n=e.history.block;return J().createElement(Nt,{onMount:function(e){e.release=n(t)},onUpdate:function(e,r){r.message!==t&&(e.release(),e.release=n(t))},onUnmount:function(e){e.release()},message:t})})}var Dt={},zt=0;function Bt(e,t){return void 0===e&&(e="/"),void 0===t&&(t={}),"/"===e?e:function(e){if(Dt[e])return Dt[e];var t=kt().compile(e);return zt<1e4&&(Dt[e]=t,zt++),t}(e)(t,{pretty:!0})}function Rt(e){var t=e.computedMatch,n=e.to,r=e.push,a=void 0!==r&&r;return J().createElement(Mt.Consumer,null,function(e){e||rt(!1);var r=e.history,s=e.staticContext,o=a?r.push:r.replace,i=ct(t?"string"==typeof n?Bt(n,t.params):(0,Qe.A)({},n,{pathname:Bt(n.pathname,t.params)}):n);return s?(o(i),null):J().createElement(Nt,{onMount:function(){o(i)},onUpdate:function(e,t){var n=ct(t.to);(function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&nt(e.state,t.state)})(n,(0,Qe.A)({},i,{key:n.key}))||o(i)},to:n})})}var Ht={},Vt=0;function $t(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,a=n.exact,s=void 0!==a&&a,o=n.strict,i=void 0!==o&&o,l=n.sensitive,c=void 0!==l&&l;return[].concat(r).reduce(function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=Ht[n]||(Ht[n]={});if(r[e])return r[e];var a=[],s={regexp:kt()(e,a,t),keys:a};return Vt<1e4&&(r[e]=s,Vt++),s}(n,{end:s,strict:i,sensitive:c}),a=r.regexp,o=r.keys,l=a.exec(e);if(!l)return null;var u=l[0],d=l.slice(1),p=e===u;return s&&!p?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:p,params:o.reduce(function(e,t,n){return e[t.name]=d[n],e},{})}},null)}var Ft=function(e){function t(){return e.apply(this,arguments)||this}return Ye(t,e),t.prototype.render=function(){var e=this;return J().createElement(Mt.Consumer,null,function(t){t||rt(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?$t(n.pathname,e.props):t.match,a=(0,Qe.A)({},t,{location:n,match:r}),s=e.props,o=s.children,i=s.component,l=s.render;return Array.isArray(o)&&function(e){return 0===J().Children.count(e)}(o)&&(o=null),J().createElement(Mt.Provider,{value:a},a.match?o?"function"==typeof o?o(a):o:i?J().createElement(i,a):l?l(a):null:"function"==typeof o?o(a):null)})},t}(J().Component);function Gt(e){return"/"===e.charAt(0)?e:"/"+e}function qt(e,t){if(!e)return t;var n=Gt(e);return 0!==t.pathname.indexOf(n)?t:(0,Qe.A)({},t,{pathname:t.pathname.substr(n.length)})}function Ut(e){return"string"==typeof e?e:lt(e)}function Wt(e){return function(){rt(!1)}}function Xt(){}var Yt=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handlePush=function(e){return t.navigateTo(e,"PUSH")},t.handleReplace=function(e){return t.navigateTo(e,"REPLACE")},t.handleListen=function(){return Xt},t.handleBlock=function(){return Xt},t}Ye(t,e);var n=t.prototype;return n.navigateTo=function(e,t){var n=this.props,r=n.basename,a=void 0===r?"":r,s=n.context,o=void 0===s?{}:s;o.action=t,o.location=function(e,t){return e?(0,Qe.A)({},t,{pathname:Gt(e)+t.pathname}):t}(a,ct(e)),o.url=Ut(o.location)},n.render=function(){var e=this.props,t=e.basename,n=void 0===t?"":t,r=e.context,a=void 0===r?{}:r,s=e.location,o=void 0===s?"/":s,i=(0,We.A)(e,["basename","context","location"]),l={createHref:function(e){return Gt(n+Ut(e))},action:"POP",location:qt(n,ct(o)),push:this.handlePush,replace:this.handleReplace,go:Wt(),goBack:Wt(),goForward:Wt(),listen:this.handleListen,block:this.handleBlock};return J().createElement(At,(0,Qe.A)({},i,{history:l,staticContext:a}))},t}(J().Component),Zt=function(e){function t(){return e.apply(this,arguments)||this}return Ye(t,e),t.prototype.render=function(){var e=this;return J().createElement(Mt.Consumer,null,function(t){t||rt(!1);var n,r,a=e.props.location||t.location;return J().Children.forEach(e.props.children,function(e){if(null==r&&J().isValidElement(e)){n=e;var s=e.props.path||e.props.from;r=s?$t(a.pathname,(0,Qe.A)({},e.props,{path:s})):t.match}}),r?J().cloneElement(n,{location:a,computedMatch:r}):null})},t}(J().Component);function Kt(e){var t="withRouter("+(e.displayName||e.name)+")",n=function(t){var n=t.wrappedComponentRef,r=(0,We.A)(t,["wrappedComponentRef"]);return J().createElement(Mt.Consumer,null,function(t){return t||rt(!1),J().createElement(e,(0,Qe.A)({},r,t,{ref:n}))})};return n.displayName=t,n.WrappedComponent=e,jt()(n,e)}var Qt=J().useContext;function Jt(){return Qt(Ot)}function en(){return Qt(Mt).location}function tn(){var e=Qt(Mt).match;return e?e.params:{}}function nn(e){var t=en(),n=Qt(Mt).match;return e?$t(t.pathname,e):n}function rn(e,t){return rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rn(e,t)}function an(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,rn(e,t)}function sn(){return sn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sn.apply(null,arguments)}function on(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var ln=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=function(e){void 0===e&&(e={}),dt||rt(!1);var t,n=window.history,r=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,a=!(-1===window.navigator.userAgent.indexOf("Trident")),s=e,o=s.forceRefresh,i=void 0!==o&&o,l=s.getUserConfirmation,c=void 0===l?pt:l,u=s.keyLength,d=void 0===u?6:u,p=e.basename?it(at(e.basename)):"";function f(e){var t=e||{},n=t.key,r=t.state,a=window.location,s=a.pathname+a.search+a.hash;return p&&(s=ot(s,p)),ct(s,r,n)}function h(){return Math.random().toString(36).substr(2,d)}var g=ut();function m(e){(0,Qe.A)(T,e),T.length=n.length,g.notifyListeners(T.location,T.action)}function v(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||y(f(e.state))}function b(){y(f(gt()))}var w=!1;function y(e){w?(w=!1,m()):g.confirmTransitionTo(e,"POP",c,function(t){t?m({action:"POP",location:e}):function(e){var t=T.location,n=x.indexOf(t.key);-1===n&&(n=0);var r=x.indexOf(e.key);-1===r&&(r=0);var a=n-r;a&&(w=!0,S(a))}(e)})}var _=f(gt()),x=[_.key];function k(e){return p+lt(e)}function S(e){n.go(e)}var j=0;function C(e){1===(j+=e)&&1===e?(window.addEventListener(ft,v),a&&window.addEventListener(ht,b)):0===j&&(window.removeEventListener(ft,v),a&&window.removeEventListener(ht,b))}var E=!1,T={length:n.length,action:"POP",location:_,createHref:k,push:function(e,t){var a="PUSH",s=ct(e,t,h(),T.location);g.confirmTransitionTo(s,a,c,function(e){if(e){var t=k(s),o=s.key,l=s.state;if(r)if(n.pushState({key:o,state:l},null,t),i)window.location.href=t;else{var c=x.indexOf(T.location.key),u=x.slice(0,c+1);u.push(s.key),x=u,m({action:a,location:s})}else window.location.href=t}})},replace:function(e,t){var a="REPLACE",s=ct(e,t,h(),T.location);g.confirmTransitionTo(s,a,c,function(e){if(e){var t=k(s),o=s.key,l=s.state;if(r)if(n.replaceState({key:o,state:l},null,t),i)window.location.replace(t);else{var c=x.indexOf(T.location.key);-1!==c&&(x[c]=s.key),m({action:a,location:s})}else window.location.replace(t)}})},go:S,goBack:function(){S(-1)},goForward:function(){S(1)},block:function(e){void 0===e&&(e=!1);var t=g.setPrompt(e);return E||(C(1),E=!0),function(){return E&&(E=!1,C(-1)),t()}},listen:function(e){var t=g.appendListener(e);return C(1),function(){C(-1),t()}}};return T}(t.props),t}return an(t,e),t.prototype.render=function(){return J().createElement(At,{history:this.history,children:this.props.children})},t}(J().Component),cn=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=function(e){void 0===e&&(e={}),dt||rt(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),r=n.getUserConfirmation,a=void 0===r?pt:r,s=n.hashType,o=void 0===s?"slash":s,i=e.basename?it(at(e.basename)):"",l=vt[o],c=l.encodePath,u=l.decodePath;function d(){var e=u(wt());return i&&(e=ot(e,i)),ct(e)}var p=ut();function f(e){(0,Qe.A)(j,e),j.length=t.length,p.notifyListeners(j.location,j.action)}var h=!1,g=null;function m(){var e=wt(),t=c(e);if(e!==t)yt(t);else{var n=d(),r=j.location;if(!h&&function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash}(r,n))return;if(g===lt(n))return;g=null,function(e){h?(h=!1,f()):p.confirmTransitionTo(e,"POP",a,function(t){t?f({action:"POP",location:e}):function(e){var t=j.location,n=y.lastIndexOf(lt(t));-1===n&&(n=0);var r=y.lastIndexOf(lt(e));-1===r&&(r=0);var a=n-r;a&&(h=!0,_(a))}(e)})}(n)}}var v=wt(),b=c(v);v!==b&&yt(b);var w=d(),y=[lt(w)];function _(e){t.go(e)}var x=0;function k(e){1===(x+=e)&&1===e?window.addEventListener(mt,m):0===x&&window.removeEventListener(mt,m)}var S=!1,j={length:t.length,action:"POP",location:w,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=bt(window.location.href)),n+"#"+c(i+lt(e))},push:function(e,t){var n="PUSH",r=ct(e,void 0,void 0,j.location);p.confirmTransitionTo(r,n,a,function(e){if(e){var t=lt(r),a=c(i+t);if(wt()!==a){g=t,function(e){window.location.hash=e}(a);var s=y.lastIndexOf(lt(j.location)),o=y.slice(0,s+1);o.push(t),y=o,f({action:n,location:r})}else f()}})},replace:function(e,t){var n="REPLACE",r=ct(e,void 0,void 0,j.location);p.confirmTransitionTo(r,n,a,function(e){if(e){var t=lt(r),a=c(i+t);wt()!==a&&(g=t,yt(a));var s=y.indexOf(lt(j.location));-1!==s&&(y[s]=t),f({action:n,location:r})}})},go:_,goBack:function(){_(-1)},goForward:function(){_(1)},block:function(e){void 0===e&&(e=!1);var t=p.setPrompt(e);return S||(k(1),S=!0),function(){return S&&(S=!1,k(-1)),t()}},listen:function(e){var t=p.appendListener(e);return k(1),function(){k(-1),t()}}};return j}(t.props),t}return an(t,e),t.prototype.render=function(){return J().createElement(At,{history:this.history,children:this.props.children})},t}(J().Component),un=function(e,t){return"function"==typeof e?e(t):e},dn=function(e,t){return"string"==typeof e?ct(e,null,null,t):e},pn=function(e){return e},fn=J().forwardRef;void 0===fn&&(fn=pn);var hn=fn(function(e,t){var n=e.innerRef,r=e.navigate,a=e.onClick,s=on(e,["innerRef","navigate","onClick"]),o=s.target,i=sn({},s,{onClick:function(e){try{a&&a(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||o&&"_self"!==o||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return i.ref=pn!==fn&&t||n,J().createElement("a",i)}),gn=fn(function(e,t){var n=e.component,r=void 0===n?hn:n,a=e.replace,s=e.to,o=e.innerRef,i=on(e,["component","replace","to","innerRef"]);return J().createElement(Mt.Consumer,null,function(e){e||rt(!1);var n=e.history,l=dn(un(s,e.location),e.location),c=l?n.createHref(l):"",u=sn({},i,{href:c,navigate:function(){var t=un(s,e.location),r=lt(e.location)===lt(dn(t));(a||r?n.replace:n.push)(t)}});return pn!==fn?u.ref=t||o:u.innerRef=o,J().createElement(r,u)})}),mn=function(e){return e},vn=J().forwardRef;void 0===vn&&(vn=mn);var bn=vn(function(e,t){var n=e["aria-current"],r=void 0===n?"page":n,a=e.activeClassName,s=void 0===a?"active":a,o=e.activeStyle,i=e.className,l=e.exact,c=e.isActive,u=e.location,d=e.sensitive,p=e.strict,f=e.style,h=e.to,g=e.innerRef,m=on(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return J().createElement(Mt.Consumer,null,function(e){e||rt(!1);var n=u||e.location,a=dn(un(h,n),n),v=a.pathname,b=v&&v.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),w=b?$t(n.pathname,{path:b,exact:l,sensitive:d,strict:p}):null,y=!!(c?c(w,n):w),_="function"==typeof i?i(y):i,x="function"==typeof f?f(y):f;y&&(_=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(function(e){return e}).join(" ")}(_,s),x=sn({},x,o));var k=sn({"aria-current":y&&r||null,className:_,style:x,to:a},m);return mn!==vn?k.ref=t||g:k.innerRef=g,J().createElement(gn,k)})});const wn=r;var yn=["href","loading","onClick"];function xn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kn(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function s(n,r,a,s){var l=r&&r.prototype instanceof i?r:i,c=Object.create(l.prototype);return Sn(c,"_invoke",function(n,r,a){var s,i,l,c=0,u=a||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return s=t,i=0,l=e,p.n=n,o}};function f(n,r){for(i=n,l=r,t=0;!d&&c&&!a&&t<u.length;t++){var a,s=u[t],f=p.p,h=s[2];n>3?(a=h===r)&&(l=s[(i=s[4])?5:(i=3,3)],s[4]=s[5]=e):s[0]<=f&&((a=n<2&&f<s[1])?(i=0,p.v=r,p.n=s[1]):f<h&&(a=n<3||s[0]>r||r>h)&&(s[4]=n,s[5]=r,p.n=h,i=0))}if(a||n>1)return o;throw d=!0,r}return function(a,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&f(u,h),i=u,l=h;(t=i<2?e:l)||!d;){s||(i?i<3?(i>1&&(p.n=-1),f(i,l)):p.n=l:p.v=l);try{if(c=2,s){if(i||(a="next"),t=s[a]){if(!(t=t.call(s,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,i<2&&(i=0)}else 1===i&&(t=s.return)&&t.call(s),i<2&&(l=TypeError("The iterator does not provide a '"+a+"' method"),i=1);s=e}else if((t=(d=p.n<0)?l:n.call(r,p))!==o)break}catch(t){s=e,i=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,a,s),!0),c}var o={};function i(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(Sn(t={},r,function(){return this}),t),d=c.prototype=i.prototype=Object.create(u);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Sn(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,Sn(d,"constructor",c),Sn(c,"constructor",l),l.displayName="GeneratorFunction",Sn(c,a,"GeneratorFunction"),Sn(d),Sn(d,a,"Generator"),Sn(d,r,function(){return this}),Sn(d,"toString",function(){return"[object Generator]"}),(kn=function(){return{w:s,m:p}})()}function Sn(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}Sn=function(e,t,n,r){function s(t,n){Sn(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(s("next",0),s("throw",1),s("return",2))},Sn(e,t,n,r)}var jn=wn.useHistory;const Cn=function(e){var t=e.href,n=e.loading,r=void 0===n?void 0:n,o=e.onClick,i=Xe(e,yn),c=jn(),u=h((0,s.useState)(!1),2),p=u[0],f=u[1];return t&&o?i.onClick=R(kn().m(function e(){return kn().w(function(e){for(;;)switch(e.n){case 0:return f(!0),e.n=1,o();case 1:f(!1),c.push((t||"").replace("#",""));case 2:return e.a(2)}},e)})):(i.href=t,i.onClick=o),p&&(i.disabled=!0),(0,l.jsx)(a.Button,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xn(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({loading:!!r||void 0},i))};var En=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),Tn=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})}),Pn=["actions","actionType","as","buttonsCard","className","footer","header","headerAction","headerStyle","childrenStyle","footerStyle","disabled","icon","iconElement","iconBackgroundColor","isActive","isDraggable","isFirstTarget","isLastTarget","isNarrow","isSmall","dragIndex","onDragCallback","onToggle","onHeaderClick","noBorder","noMargin","children","hasGreyHeader","hasHeaderBorder"];function On(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?On(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):On(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const An=function(e){var t=e.actions,n=e.actionType,r=e.as,s=e.buttonsCard,o=e.className,c=e.footer,u=e.header,d=e.headerAction,p=e.headerStyle,f=e.childrenStyle,h=e.footerStyle,v=e.disabled,b=e.icon,x=e.iconElement,k=e.iconBackgroundColor,S=e.isActive,j=e.isDraggable,C=e.isFirstTarget,E=e.isLastTarget,T=e.isNarrow,P=e.isSmall,O=e.dragIndex,M=e.onDragCallback,A=void 0===M?function(){}:M,L=e.onToggle,N=void 0===L?function(){}:L,I=e.onHeaderClick,D=e.noBorder,z=e.noMargin,B=e.children,R=void 0===B?null:B,H=e.hasGreyHeader,V=e.hasHeaderBorder,$=void 0===V||V,F=Xe(e,Pn),G=i()("newspack-card--core",o,(s||"a"===r)&&"newspack-card--core__buttons-card",(null==t?void 0:t.length)>0&&"newspack-card--core__header--has-actions",j&&"newspack-card--core__is-draggable",T&&"newspack-card--core__is-narrow",P&&"newspack-card--core__is-small",(b||x)&&"newspack-card--core__has-icon",k&&"newspack-card--core__has-icon-background-color",S&&"newspack-card--core__is-active",v&&"newspack-card--core__is-disabled",R&&"newspack-card--core__has-children",z&&"newspack-card--core__no-margin",H&&"newspack-card--core__has-grey-header"),q=P?"small":F.size;(s||"a"===r)&&(P||(q="large"),"a"!==r&&(F.as="a")),D&&(F.isBorderless=!0);var U="toggle"===n||!!d||(null==t?void 0:t.length)>0||j,W=!!I&&!U;return(0,l.jsxs)(a.Card,Mn(Mn({as:r,className:G},F),{},{children:[(u||b||x)&&(0,l.jsxs)(a.CardHeader,{as:W?"button":void 0,className:i()("newspack-card--core__header",j&&"newspack-card--core__header--is-draggable",!$&&"newspack-card--core__header--no-border"),style:p,size:q,gap:4,onClick:W&&!v?I:void 0,disabled:!(!W||!v)||void 0,"aria-disabled":!(!W||!v)||void 0,children:[j&&(0,l.jsxs)("div",{className:"newspack-card--core__header__draggable-controls",children:[(0,l.jsx)("div",{className:"newspack-card--core__header__draggable-controls__drag-handle",children:(0,l.jsx)(m.A,{icon:_})}),(0,l.jsxs)("div",{className:"newspack-card--core__header__draggable-controls__move-buttons",children:[(0,l.jsx)(a.Button,{icon:w,onClick:function(){return A(O,O-1)},disabled:C,label:(0,g.__)("Move one position up","newspack-plugin"),size:"small"}),(0,l.jsx)(a.Button,{icon:y,onClick:function(){return A(O,O+1)},disabled:E,label:(0,g.__)("Move one position down","newspack-plugin"),size:"small"})]})]}),x?(0,l.jsx)("div",{className:"newspack-card--core__icon-slot",children:x}):b&&(0,l.jsx)("div",{className:"newspack-card--core__icon",children:(0,l.jsx)(m.A,{icon:b,height:P?24:48,width:P?24:48})}),(null==t?void 0:t.length)>0&&"toggle"===n&&(0,l.jsx)(a.ToggleControl,{className:"newspack-card--core__action",label:F.title,hideLabelFromVision:!0,checked:S,onChange:N}),u&&(0,l.jsx)("div",{className:"newspack-card--core__header-content",children:u}),!(null!=t&&t.length)>0&&"chevron"===n&&(0,l.jsx)(m.A,{className:"newspack-card--core__action",icon:En,height:24,width:24}),!(null!=t&&t.length)>0&&"toggle"===n&&(0,l.jsx)(a.ToggleControl,{className:"newspack-card--core__action",label:F.title,hideLabelFromVision:!0,checked:S,onChange:N}),(null==t?void 0:t.length)>0&&(0,l.jsx)(a.DropdownMenu,{icon:Tn,label:(0,g.__)("More","newspack-plugin"),children:function(){return t.map(function(e,t){return Array.isArray(e)?(0,l.jsx)(a.MenuGroup,{children:e.map(function(e,t){return(0,l.jsx)(a.MenuItem,{icon:e.icon,onClick:e.action,href:e.href,disabled:e.disabled||!1,isDestructive:e.destructive||!1,children:e.label},t)})},t):(0,l.jsx)(a.MenuItem,{icon:e.icon,onClick:e.action,href:e.href,disabled:e.disabled||!1,isDestructive:e.destructive||!1,children:e.label},t)})}}),d&&(0,l.jsx)(a.Button,{className:"newspack-card--core__header__action",icon:d.icon,href:d.href,disabled:d.disabled||!1,isDestructive:d.destructive||!1,onClick:d.onClick,tone:d.tone||"primary",variant:d.variant||"secondary",children:d.label})]}),R&&(0,l.jsx)("div",{className:i()("newspack-card--core__body",!$&&"newspack-card--core__body--no-header-border"),style:f,children:R}),c&&(0,l.jsx)(a.CardFooter,{size:q,style:h,children:c})]}))};var Ln=["buttonsCard","className","headerActions","isNarrow","isMedium","isSmall","isWhite","noBorder","__experimentalCoreCard","__experimentalCoreProps"];function Nn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function In(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nn(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Dn(e,t,n){return t=O(t),P(e,zn()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function zn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zn=function(){return!!e})()}var Bn=function(e){function t(){return C(this,t),Dn(this,t,arguments)}return A(t,e),T(t,[{key:"render",value:function(){var e=this.props,t=e.buttonsCard,n=e.className,r=e.headerActions,a=e.isNarrow,s=e.isMedium,o=e.isSmall,c=e.isWhite,u=e.noBorder,d=e.__experimentalCoreCard,p=e.__experimentalCoreProps,f=void 0===p?{actionType:null,header:null,icon:null,footer:null,noMargin:!1,isDraggable:!1,dragIndex:null,hasGreyHeader:!1,onDragCallback:function(){}}:p,h=Xe(e,Ln);if(d){var g=In(In({buttonsCard:t,className:n,isMedium:s,isNarrow:a,isSmall:o,isWhite:c,noBorder:u},h),f);return(0,l.jsx)(An,In({},g))}var m=i()("newspack-card",n,r&&"newspack-card__header-actions",s&&"newspack-card__is-medium",a&&"newspack-card__is-narrow",o&&"newspack-card__is-small",c&&"newspack-card__is-white",u&&"newspack-card__no-border");return(0,l.jsx)("div",In({className:m},h))}}])}(s.Component);const Rn=Bn;var Hn=n(9491);v.SVG,v.Path;var Vn=n(7183),$n=n.n(Vn),Fn=n(8662),Gn=n.n(Fn);function qn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qn(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Wn(e,t,n){return t=O(t),P(e,Xn()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function Xn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Xn=function(){return!!e})()}var Yn=function(e){function t(e){var n;return C(this,t),d(n=Wn(this,t,[e]),"state",{suggestions:{},allCategories:{},isLoading:!1}),d(n,"handleOnChange",function(e){var t=n.props.onChange,r=n.state.suggestions;t(e.filter(function(e){return void 0!==e}).map(function(e){return"string"==typeof e?r[e]:e}).filter(Boolean))}),d(n,"getAvailableSuggestions",function(){var e=n.props.value,t=n.state.suggestions,r=e.reduce(function(e,t){return null!=t&&t.id&&e.push(t.id),e},[]);return Gn()(t,function(e){var t=e.id;return-1===r.indexOf(t)}).map(function(e){return e.name})}),n.debouncedUpdateSuggestions=N()(n.updateSuggestions,100),n}return A(t,e),T(t,[{key:"componentDidMount",value:function(){var e=this;this.setState({isLoading:!0}),V()({path:(0,F.addQueryArgs)("/wp/v2/".concat(this.props.taxonomy),{per_page:-1,_fields:"id,name"})}).then(function(t){return e.setState({allCategories:t})}).finally(function(){return e.setState({isLoading:!1})})}},{key:"componentWillUnmount",value:function(){this.debouncedUpdateSuggestions.cancel()}},{key:"updateSuggestions",value:function(e){var t=this;this.setState({isLoading:!0}),V()({path:(0,F.addQueryArgs)("/wp/v2/".concat(this.props.taxonomy),{search:e,per_page:20,_fields:"id,name",orderby:"count",order:"desc"})}).then(function(e){t.setState({suggestions:e.reduce(function(e,t){return Un(Un({},e),{},d({},t.name,t))},{})})}).finally(function(){return t.setState({isLoading:!1})})}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.disabled,s=t.description,o=t.hideHelpFromVision,c=t.hideLabelFromVision,u=t.label,d=t.value,p=this.state,f=p.allCategories,h=p.isLoading,g=i()("newspack-category-autocomplete",n);return(0,l.jsxs)("div",{className:g,children:[(0,l.jsx)(Qr,{onInputChange:function(t){return e.debouncedUpdateSuggestions(t)},value:d.reduce(function(e,t){var n="number"==typeof t?$n()(f,["id",t]):t;return n&&e.push({id:n.term_id||n.id,value:n.value||n.name}),e},[]),suggestions:this.getAvailableSuggestions(),onChange:this.handleOnChange,label:u,disabled:r,description:s,hideHelpFromVision:o,hideLabelFromVision:c}),h?(0,l.jsx)("span",{className:"newspack-category-autocomplete__suggestions-spinner",children:(0,l.jsx)(a.Spinner,{})}):null]})}}])}(s.Component);Yn.defaultProps={taxonomy:"categories"};var Zn={grad:.9,turn:360,rad:360/(2*Math.PI)},Kn=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Qn=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Jn=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},er=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},tr=function(e){return{r:Jn(e.r,0,255),g:Jn(e.g,0,255),b:Jn(e.b,0,255),a:Jn(e.a)}},nr=function(e){return{r:Qn(e.r),g:Qn(e.g),b:Qn(e.b),a:Qn(e.a,3)}},rr=/^#([0-9a-f]{3,8})$/i,ar=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},sr=function(e){var t=e.r,n=e.g,r=e.b,a=e.a,s=Math.max(t,n,r),o=s-Math.min(t,n,r),i=o?s===t?(n-r)/o:s===n?2+(r-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:s?o/s*100:0,v:s/255*100,a}},or=function(e){var t=e.h,n=e.s,r=e.v,a=e.a;t=t/360*6,n/=100,r/=100;var s=Math.floor(t),o=r*(1-n),i=r*(1-(t-s)*n),l=r*(1-(1-t+s)*n),c=s%6;return{r:255*[r,i,o,o,l,r][c],g:255*[l,r,r,i,o,o][c],b:255*[o,o,l,r,r,i][c],a}},ir=function(e){return{h:er(e.h),s:Jn(e.s,0,100),l:Jn(e.l,0,100),a:Jn(e.a)}},lr=function(e){return{h:Qn(e.h),s:Qn(e.s),l:Qn(e.l),a:Qn(e.a,3)}},cr=function(e){return or((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},ur=function(e){return{h:(t=sr(e)).h,s:(a=(200-(n=t.s))*(r=t.v)/100)>0&&a<200?n*r/100/(a<=100?a:200-a)*100:0,l:a/2,a:t.a};var t,n,r,a},dr=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,pr=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,fr=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,hr=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,gr={string:[[function(e){var t=rr.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Qn(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?Qn(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=fr.exec(e)||hr.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:tr({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=dr.exec(e)||pr.exec(e);if(!t)return null;var n,r,a=ir({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(Zn[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return cr(a)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,a=e.a,s=void 0===a?1:a;return Kn(t)&&Kn(n)&&Kn(r)?tr({r:Number(t),g:Number(n),b:Number(r),a:Number(s)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,a=e.a,s=void 0===a?1:a;if(!Kn(t)||!Kn(n)||!Kn(r))return null;var o=ir({h:Number(t),s:Number(n),l:Number(r),a:Number(s)});return cr(o)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,a=e.a,s=void 0===a?1:a;if(!Kn(t)||!Kn(n)||!Kn(r))return null;var o=function(e){return{h:er(e.h),s:Jn(e.s,0,100),v:Jn(e.v,0,100),a:Jn(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(s)});return or(o)},"hsv"]]},mr=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},vr=function(e,t){var n=ur(e);return{h:n.h,s:Jn(n.s+100*t,0,100),l:n.l,a:n.a}},br=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},wr=function(e,t){var n=ur(e);return{h:n.h,s:n.s,l:Jn(n.l+100*t,0,100),a:n.a}},yr=function(){function e(e){this.parsed=function(e){return"string"==typeof e?mr(e.trim(),gr.string):"object"==typeof e&&null!==e?mr(e,gr.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return Qn(br(this.rgba),2)},e.prototype.isDark=function(){return br(this.rgba)<.5},e.prototype.isLight=function(){return br(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=nr(this.rgba)).r,n=e.g,r=e.b,s=(a=e.a)<1?ar(Qn(255*a)):"","#"+ar(t)+ar(n)+ar(r)+s;var e,t,n,r,a,s},e.prototype.toRgb=function(){return nr(this.rgba)},e.prototype.toRgbString=function(){return t=(e=nr(this.rgba)).r,n=e.g,r=e.b,(a=e.a)<1?"rgba("+t+", "+n+", "+r+", "+a+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,a},e.prototype.toHsl=function(){return lr(ur(this.rgba))},e.prototype.toHslString=function(){return t=(e=lr(ur(this.rgba))).h,n=e.s,r=e.l,(a=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+a+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,a},e.prototype.toHsv=function(){return e=sr(this.rgba),{h:Qn(e.h),s:Qn(e.s),v:Qn(e.v),a:Qn(e.a,3)};var e},e.prototype.invert=function(){return _r({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),_r(vr(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),_r(vr(this.rgba,-e))},e.prototype.grayscale=function(){return _r(vr(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),_r(wr(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),_r(wr(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?_r({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Qn(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=ur(this.rgba);return"number"==typeof e?_r({h:e,s:t.s,l:t.l,a:t.a}):Qn(t.h)},e.prototype.isEqual=function(e){return this.toHex()===_r(e).toHex()},e}(),_r=function(e){return e instanceof yr?e:new yr(e)},xr=[];Object.defineProperty(jr,"name",{value:"default",configurable:!0});var kr=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Sr=function(e){return.2126*kr(e.r)+.7152*kr(e.g)+.0722*kr(e.b)};function jr(e){e.prototype.luminance=function(){return e=Sr(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,r,a,s,o,i,l,c=t instanceof e?t:new e(t);return s=this.rgba,o=c.toRgb(),n=(i=Sr(s))>(l=Sr(o))?(i+.05)/(l+.05):(l+.05)/(i+.05),void 0===(r=2)&&(r=0),void 0===a&&(a=Math.pow(10,r)),Math.floor(a*n)/a+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(o=void 0===(s=(n=t).size)?"normal":s,"AAA"===(a=void 0===(r=n.level)?"AA":r)&&"normal"===o?7:"AA"===a&&"large"===o?3:4.5);var n,r,a,s,o}}var Cr=wn.useHistory;const Er=function(e,t){var n=Cr(),r=(0,s.useRef)(null),a=function(n){if(e)return void 0===n&&(n=window.event),t};return(0,s.useEffect)(function(){return e&&(r.current=n.block(t),window.addEventListener("beforeunload",a)),function(){r.current&&r.current(),window.removeEventListener("beforeunload",a)}},[t,e]),r.current||function(){}};(Object.getOwnPropertyDescriptor(Er,"name")||{}).writable||Object.defineProperty(Er,"name",{value:"default",configurable:!0});var Tr=n(5e3),Pr=n.n(Tr),Or=n(4198),Mr=n.n(Or),Ar=function(e,t){if(Pr()(e))return t};const Lr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=h((0,s.useState)(e),2),n=t[0],r=t[1],a=function(e){return r(function(t){return Mr()({},t,e,Ar)})};return[n,function(e){if("string"==typeof e)return function(t){return a(d({},e,t))};a(e)}]};(Object.getOwnPropertyDescriptor(Lr,"name")||{}).writable||Object.defineProperty(Lr,"name",{value:"default",configurable:!0});var Nr=["className","size","hideTitle","isDestructive","onConfirm","onCancel","when","isOpen","children"];function Ir(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Dr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ir(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ir(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var zr=wn.useHistory,Br={small:"newspack-modal--size-small",medium:"newspack-modal--size-medium",large:"newspack-modal--size-large","x-large":"newspack-modal--size-x-large",full:"newspack-modal--size-full"},Rr=function(){};const Hr=(0,s.forwardRef)(function(e,t){var n=e.className,r=e.size,o=void 0===r?"small":r,c=e.hideTitle,u=e.isDestructive,d=e.onConfirm,p=void 0===d?Rr:d,f=e.onCancel,g=void 0===f?Rr:f,m=e.when,v=void 0!==m&&m,b=e.isOpen,w=void 0!==b&&b,y=e.children,_=Xe(e,Nr),x=h((0,s.useState)(w),2),k=x[0],S=x[1],j=zr(),C=(0,s.useRef)(null),E=(0,s.useRef)(!1),T=(0,s.useCallback)(function(){var e;S(!1),null===(e=C.current)||void 0===e||e.call(C),C.current=null,p()},[p,C]),P=(0,s.useCallback)(function(){S(!1),C.current=null,E.current=!0;try{j.replace(j.location)}finally{E.current=!1}g()},[g,j]);if((0,s.useEffect)(function(){if(v)return j.block(function(e,t){if(!E.current)return C.current=function(){E.current=!0;try{j.replace(j.location),"REPLACE"===t?j.replace(e):j.push(e)}finally{E.current=!1}},S(!0),!1})},[v,j]),(0,s.useEffect)(function(){w&&S(!0)},[w]),!k)return null;var O=i()("newspack-modal",Br[o],c&&"newspack-modal--hide-title",u&&"newspack-modal--destructive",n);return(0,l.jsx)(a.__experimentalConfirmDialog,Dr(Dr({className:O},_),{},{ref:t,onConfirm:T,onCancel:P,__experimentalHideHeader:!1,children:y}))});var Vr=["message","when"];function $r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Fr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$r(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const Gr={usePrompt:Er,useObjectState:Lr,useOnClickOutside:function(e,t){(0,s.useEffect)(function(){var n=function(n){e.current&&!e.current.contains(n.target)&&t(n)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),function(){document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[e,t])},useUniqueId:function(e){return(0,s.useRef)("".concat(e,"-").concat(Math.round(99999*Math.random()))).current},useConfirmDialog:function(e){var t=e.message,n=e.when,r=Xe(e,Vr),a=h((0,s.useState)(null),2),o=a[0],i=a[1],c=(0,s.useRef)(n);c.current=n;var u=(0,s.useCallback)(function(e){!1!==c.current?i(function(){return e}):e()},[]);return{confirmDialog:(0,l.jsx)(Hr,Fr(Fr({},r),{},{when:n,isOpen:!!o,onConfirm:function(){null==o||o(),i(null)},onCancel:function(){return i(null)},children:t})),requestConfirm:u}}};window.wp.keycodes;var qr=n(7143);n(8490),v.SVG,v.Path,function(e){e.forEach(function(e){xr.indexOf(e)<0&&(e(yr,gr),xr.push(e))})}([jr]);var Ur=["className","description","hideHelpFromVision","hideLabelFromVision"];function Wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Xr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wr(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Yr(e,t,n){return t=O(t),P(e,Zr()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function Zr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Zr=function(){return!!e})()}var Kr=function(e){function t(){return C(this,t),Yr(this,t,arguments)}return A(t,e),T(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.description,r=e.hideHelpFromVision,s=e.hideLabelFromVision,o=Xe(e,Ur),c=i()("newspack-form-token-field__input-container",t);return(0,l.jsxs)("div",{className:i()({"newspack-form-token-field--label-hidden":s,"newspack-form-token-field--help-hidden":r},"newspack-form-token-field"),children:[(0,l.jsx)(a.FormTokenField,Xr({className:c},o)),n&&(0,l.jsx)("p",{className:"newspack-form-token-field__help",children:n})]})}}])}(s.Component);const Qr=Kr,Jr=function(e){var t=e.simple,n=void 0===t?void 0:t,r=window.newspack_urls||{},s=r.components_demo,o=void 0!==s&&s,i=r.support,c=void 0!==i&&i,u=r.setup_wizard,d=void 0!==u&&u,p=r.reset_url,f=void 0!==p&&p,h=r.plugin_version,m=void 0===h?{label:"Newspack"}:h,v=r.remove_starter_content,b=void 0!==v&&v,w=r.support_email,y=[{label:m.label,url:"https://newspack.com/category/release-notes/",external:!0},{label:(0,g.__)("About","newspack-plugin"),url:"https://newspack.com/",external:!0},{label:(0,g.__)("Documentation","newspack-plugin"),url:c,external:!0}];return o&&y.push({label:(0,g.__)("Components Demo","newspack-plugin"),url:o}),d&&y.push({label:(0,g.__)("Setup Wizard","newspack-plugin"),url:d}),f&&y.push({label:(0,g.__)("Reset Newspack","newspack-plugin"),url:f}),b&&y.push({label:(0,g.__)("Remove Starter Content","newspack-plugin"),url:b}),w&&y.push({label:(0,g.__)("Contact Support","newspack-plugin"),url:"mailto:".concat(w)}),(0,l.jsx)("div",{className:"newspack-footer",children:!n&&(0,l.jsx)("ul",{children:y.map(function(e,t){var n=e.url,r=e.label,s=e.external;return(0,l.jsx)("li",{children:s?(0,l.jsx)(a.ExternalLink,{href:n,children:r}):(0,l.jsx)("a",{href:n,children:r})},t)})})})};var ea=n(6661),ta=n.n(ea),na=["className","children","compact","useModal","modalTitle","modalBody","onReady","editLink","bannerText","bannerButtonText","url"];function ra(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function aa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ra(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ra(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sa(e,t,n){return t=O(t),P(e,oa()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function oa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(oa=function(){return!!e})()}var ia=function(e){function t(){var e;return C(this,t),d(e=sa(this,t,arguments),"componentDidMount",function(){e._isMounted=!0;var t=e.props,n=t.plugin,r=t.url;n&&!r&&e.retrievePluginInfo(n)}),d(e,"componentWillUnmount",function(){e._isMounted=!1}),d(e,"retrievePluginInfo",function(t){var n=e.props.onReady;V()({path:"/newspack/v1/plugins/"+t}).then(function(t){e._isMounted&&(n(t),e.setState({pluginInfo:t}))})}),d(e,"textForPlugin",function(t){var n={modalBody:null,modalTitle:t.Name&&"".concat((0,g.__)("Manage","newspack-plugin")," ").concat(t.Name),primaryButton:t.Name&&"".concat((0,g.__)("Manage","newspack-plugin")," ").concat(t.Name),primaryModalButton:(0,g.__)("Manage","newspack-plugin"),dismissModalButton:(0,g.__)("Dismiss","newspack-plugin")};return ta()(n,e.props)}),d(e,"goToUrl",function(){var t=e.props,n=t.url,r=t.showOnBlockEditor,a=t.bannerText,s=t.bannerButtonText;V()({path:"/newspack/v1/handoff",method:"POST",data:{destinationUrl:n,handoffReturnUrl:window&&window.location.href,showOnBlockEditor:!!r,bannerText:a,bannerButtonText:s}}).then(function(e){window.location.href=e.HandoffLink})}),d(e,"goToPlugin",function(t){var n=e.props,r=n.editLink,a=n.showOnBlockEditor,s=n.bannerText,o=n.bannerButtonText;V()({path:"/newspack/v1/plugins/"+t+"/handoff",method:"POST",data:{editLink:r,handoffReturnUrl:window&&window.location.href,showOnBlockEditor:!!a,bannerText:s,bannerButtonText:o}}).then(function(e){window.location.href=e.HandoffLink})}),e.state={pluginInfo:[],showModal:!1},e}return A(t,e),T(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.children,o=t.compact,c=t.useModal,u=(t.modalTitle,t.modalBody,t.onReady,t.editLink,t.bannerText,t.bannerButtonText,t.url),d=Xe(t,na),p=this.state,f=p.pluginInfo,h=p.showModal,m=this.textForPlugin(f),v=m.modalBody,b=m.modalTitle,w=m.primaryButton,y=m.primaryModalButton,_=m.dismissModalButton,x=f.Configured,k=f.Name,S=f.Slug,j=f.Status,C=i()(x&&"is-configured",n),E=function(){return u?e.goToUrl():e.goToPlugin(S)};return(0,l.jsxs)(s.Fragment,{children:[u&&(0,l.jsx)(Cn,aa(aa({className:C,isSecondary:!d.isPrimary&&!d.isTertiary&&!d.isLink},d),{},{onClick:function(){return c&&r?e.setState({showModal:!0}):E()},children:r||w})),!u&&k&&"active"===j&&(0,l.jsx)(Cn,aa(aa({className:C,isSecondary:!d.isPrimary&&!d.isTertiary&&!d.isLink},d),{},{onClick:function(){return c?e.setState({showModal:!0}):E()},children:r||w})),!u&&k&&"active"!==j&&(0,l.jsx)(Cn,aa(aa({className:C,variant:"secondary",disabled:!0},d),{},{children:k+(0,g.__)(" not installed","newspack-plugin")})),!u&&!k&&(0,l.jsx)(Cn,aa(aa({className:C,isSecondary:!d.isPrimary&&!d.isTertiary&&!d.isLink},d),{},{children:(0,l.jsxs)(s.Fragment,{children:[!o&&(0,l.jsx)(Ki,{isLeft:!0}),(0,g.__)("Retrieving Plugin Info","newspack-plugin")]})})),h&&(0,l.jsxs)(Ca,{title:b,onRequestClose:function(){return e.setState({showModal:!1})},children:[(0,l.jsx)("p",{children:v}),(0,l.jsxs)(a.__experimentalHStack,{justify:"flex-end",spacing:4,wrap:!0,className:"newspack-modal__footer",children:[(0,l.jsx)(Cn,{variant:"secondary",onClick:function(){return e.setState({showModal:!1})},children:_}),(0,l.jsx)(Cn,{variant:"primary",onClick:E,children:y})]})]})]})}}])}(s.Component);ia.defaultProps={onReady:function(){}};const la=ia;var ca="newspack_wizard_handoff_message";function ua(){var e=h((0,s.useState)(!1),2),t=e[0],n=e[1];return(0,s.useEffect)(function(){setTimeout(function(){var e=JSON.parse(localStorage.getItem(ca));null!=e&&e.message?n(e.message):n(!1),null!=e&&e.url&&-1===window.location.href.indexOf(e.url)&&(window.localStorage.removeItem(ca),n(!1))},100)},[]),t?(0,l.jsx)(Ia,{isHandoff:!0,isDismissible:!1,rawHTML:!0,noticeText:t}):null}var da=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})}),pa=["className"];function fa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ha(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fa(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fa(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ga(e,t,n){return t=O(t),P(e,ma()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function ma(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ma=function(){return!!e})()}var va=function(e){function t(){return C(this,t),ga(this,t,arguments)}return A(t,e),T(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=Xe(e,pa);return(0,l.jsx)(a.Tooltip,ha(ha({},n),{},{children:(0,l.jsx)("span",{className:i()("newspack-info-button",t),children:(0,l.jsx)(m.A,{icon:da})})}))}}])}(s.Component);const ba=va;var wa=["className","borders","columns","gutter","noMargin","rowGap"];function ya(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}const _a=function(e){var t=e.className,n=void 0===t?"":t,r=e.borders,a=void 0!==r&&r,s=e.columns,o=void 0===s?2:s,c=e.gutter,u=void 0===c?32:c,p=e.noMargin,f=void 0!==p&&p,h=e.rowGap,g=void 0===h?0:h,m=Xe(e,wa),v=i()("newspack-grid",a&&"newspack-grid__borders",f&&"newspack-grid--no-margin",o&&"newspack-grid__columns-"+o,u&&"newspack-grid__gutter-"+u,g&&"newspack-grid__row-gap-"+g,n);return(0,l.jsx)("div",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ya(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ya(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({className:v},m))};var xa=["className","size","hideTitle"];function ka(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Sa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ka(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ka(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ja={small:"newspack-modal--size-small",medium:"newspack-modal--size-medium",large:"newspack-modal--size-large","x-large":"newspack-modal--size-x-large",full:"newspack-modal--size-full"};const Ca=(0,s.forwardRef)(function(e,t){var n=e.className,r=e.size,s=void 0===r?"medium":r,o=e.hideTitle,c=Xe(e,xa),u=i()("newspack-modal",o&&"newspack-modal--hide-title",function(e){return ja[e]||ja.medium}(s),n);return(0,l.jsx)(a.Modal,Sa(Sa({className:u},c),{},{ref:t}))});function Ea(e,t,n){return t=O(t),P(e,Ta()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function Ta(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ta=function(){return!!e})()}var Pa=function(e){function t(){return C(this,t),Ea(this,t,arguments)}return A(t,e),T(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.simple,r=e.size,s=e.white,o=i()("newspack-icon",n&&"newspack-icon--simple",s&&"newspack-icon--white",t);return(0,l.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",height:r,width:r,viewBox:"0 0 24 24",className:o,children:(0,l.jsx)(a.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M24 12C24 18.6271 18.6271 24 12 24C5.37213 24 0 18.6271 0 12C0 5.3729 5.3729 0 12 0C18.6271 0 24 5.3729 24 12ZM17.4545 17.4546L6.54545 6.54545V17.4545H8.72727V11.8182L14.3636 17.4546H17.4545ZM11.2727 8.18182H17.4545V6.54545H9.63636L11.2727 8.18182ZM17.4545 11.2727H14.3636L12.7273 9.63636H17.4545V11.2727ZM17.4545 12.7273V14.3636L15.8182 12.7273H17.4545Z"})})}}])}(s.Component);Pa.defaultProps={size:32};var Oa=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{d:"M12 4a8 8 0 1 1 .001 16.001A8 8 0 0 1 12 4Zm0 1.5a6.5 6.5 0 1 0-.001 13.001A6.5 6.5 0 0 0 12 5.5Zm.75 11h-1.5V15h1.5v1.5Zm-.445-9.234a3 3 0 0 1 .445 5.89V14h-1.5v-1.25c0-.57.452-.958.917-1.01A1.5 1.5 0 0 0 12 8.75a1.5 1.5 0 0 0-1.5 1.5H9a3 3 0 0 1 3.305-2.984Z"})}),Ma=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.13 5.5l1.926 1.927A4.975 4.975 0 007.025 10H5v1.5h2V13H5v1.5h2.1a5.002 5.002 0 009.8 0H19V13h-2v-1.5h2V10h-2.025a4.979 4.979 0 00-1.167-2.74l1.76-1.76-1.061-1.06-1.834 1.834A4.977 4.977 0 0012 5.5c-1.062 0-2.046.33-2.855.895L7.19 4.44 6.13 5.5zm2.37 5v3a3.5 3.5 0 107 0v-3a3.5 3.5 0 10-7 0z"})});function Aa(e,t,n){return t=O(t),P(e,La()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function La(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(La=function(){return!!e})()}var Na=function(e){function t(){return C(this,t),Aa(this,t,arguments)}return A(t,e),T(t,[{key:"render",value:function(){var e,t=this.props,n=t.className,r=t.debugMode,a=t.isError,o=t.isHandoff,c=t.isHelp,u=t.isSuccess,d=t.isWarning,p=t.noticeText,f=t.rawHTML,h=t.style,g=void 0===h?{}:h,v=t.children,w=void 0===v?null:v,y=i()("newspack-notice",n,r&&"newspack-notice__is-debug",a&&"newspack-notice__is-error",o&&"newspack-notice__is-handoff",c&&"newspack-notice__is-help",u&&"newspack-notice__is-success",d&&"newspack-notice__is-warning");return e=c?Oa:u?b:r?Ma:da,(0,l.jsxs)("div",{className:y,style:g,children:[(0,l.jsx)(m.A,{icon:e}),(0,l.jsxs)("div",{className:"newspack-notice__content",children:[f?(0,l.jsx)(s.RawHTML,{children:p}):p,w||null]})]})}}])}(s.Component);const Ia=Na;var Da=(0,s.forwardRef)(({children:e,className:t,ariaLabel:n,as:r="div",...a},s)=>(0,l.jsx)(r,{ref:s,className:Le("admin-ui-navigable-region",t),"aria-label":n,role:"region",tabIndex:"-1",...a,children:e}));Da.displayName="NavigableRegion";var za=Da;const Ba=(0,l.jsxs)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:[(0,l.jsx)(v.Path,{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",fill:"#003da5"}),(0,l.jsx)(v.Path,{d:"M16.09 13.773V12.546H14.864L16.09 13.773ZM13.773 11.454H16.091V10.227H12.546L13.773 11.454ZM11.454 9.136H16.091V7.91H10.227L11.454 9.137V9.136ZM7.91 7.91L16.092 16.092H13.774L9.546 11.865V16.092H7.91V7.91Z",fill:"white"})]}),Ra=function(e){var t,n=e.breadcrumbItems,r=void 0===n?[]:n,o=e.badges,c=e.subTitle,u=e.actions,d=e.tabbedNavigation,p=e.className,f=e.children,h=null===(t=r[r.length-1])||void 0===t?void 0:t.label,g=function(e,t){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(Me,{direction:"column",className:"newspack-page__header-region",children:[(0,l.jsxs)(Me,{direction:"column",className:"newspack-page__header",children:[(0,l.jsxs)(Me,{direction:"row",gap:"sm",justify:"space-between",children:[(0,l.jsxs)(Me,{direction:"row",gap:"sm",align:"center",justify:"start",children:[(0,l.jsx)("div",{className:"newspack-page__header-visual","aria-hidden":"true",children:(0,l.jsx)(m.A,{icon:Ba})}),(0,l.jsx)(a.__experimentalHStack,{className:"newspack-page__breadcrumbs",justify:"flex-start",children:(0,l.jsx)(Ue,{items:r})}),o]}),u&&(0,l.jsx)(Me,{direction:"row",gap:"sm",align:"center",className:"newspack-page__header-actions",children:u})]}),c&&(0,l.jsx)(Re,{render:(0,l.jsx)("p",{}),variant:"body-md",className:"newspack-page__header-subtitle",children:c})]}),e]}),t]})};return(0,l.jsx)(za,{className:i()("newspack-page",p),ariaLabel:h,children:(0,s.isValidElement)(d)?(0,s.cloneElement)(d,{renderShell:g,content:f}):g(null,f)})};function Ha(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Va(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ha(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ha(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $a(e,t,n){return t=O(t),P(e,Fa()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function Fa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Fa=function(){return!!e})()}var Ga=function(e){function t(){var e;return C(this,t),d(e=$a(this,t,arguments),"componentDidMount",function(){var t=e.props.plugins;e.retrievePluginInfo(t).then(function(){e.props.autoInstall&&e.installAllPlugins()})}),d(e,"componentDidUpdate",function(t){var n=e.props,r=n.autoInstall,a=n.plugins,s=e.state.installationInitialized;a!==t.plugins&&e.retrievePluginInfo(a),r&&!s&&e.installAllPlugins()}),d(e,"retrievePluginInfo",function(t){return new Promise(function(n){V()({path:"/newspack/v1/plugins/"}).then(function(r){var a=Object.keys(r).reduce(function(e,n){return-1===t.indexOf(n)||(e[n]=Va(Va({},r[n]),{},{installationStatus:"active"===r[n].Status?1:0})),e},{});e.updatePluginInfo(a).then(function(){return n()})})})}),d(e,"installAllPlugins",function(){var t=e.state.pluginInfo;e.setState({installationInitialized:!0}),Object.keys(t).filter(function(e){return"active"!==t[e].Status}).map(function(t){return function(){return e.installPlugin(t)}}).reduce(function(e,t){return e.then(function(e){return t().then(Array.prototype.concat.bind(e))})},Promise.resolve([]))}),d(e,"installPlugin",function(t){e.setInstallationStatus(t,2);var n={path:"/newspack/v1/plugins/".concat(t,"/configure/"),method:"post"};return V()(n).then(function(n){return e.props.onInstalled(t),e.updatePluginInfo(function(e){return Va(Va({},e),{},d({},t,Va(Va({},n),{},{installationStatus:1})))})}).catch(function(n){e.setInstallationStatus(t,3,n.message)})}),d(e,"setChecked",function(t,n){e.updatePluginInfo(function(e){return Va(Va({},e),{},d({},t,Va(Va({},e[t]),{},{checked:n})))})}),d(e,"setInstallationStatus",function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e.updatePluginInfo(function(e){return Va(Va({},e),{},d({},t,Va(Va({},e[t]),{},{installationStatus:n,notification:r})))})}),d(e,"updatePluginInfo",function(t){return new Promise(function(n){var r=e.props.onStatus;e.setState(function(e){return{pluginInfo:"function"==typeof t?t(e.pluginInfo):t}},function(){var t=e.state.pluginInfo,a=Object.values(t).every(function(e){return"active"===e.Status});r({complete:a,pluginInfo:t}),n()})})}),d(e,"classForInstallationStatus",function(e){switch(e){case 1:return"newspack-plugin-installer__status-active";case 2:return"newspack-plugin-installer__status-installing";case 3:return"newspack-plugin-installer__status-error";default:return"newspack-plugin-installer__status-none"}}),e.state={pluginInfo:{},installationInitialized:!1},e}return A(t,e),T(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.autoInstall,r=t.isSmall,a=t.withoutFooterButton,s=this.state.pluginInfo,o=(window.newspack_aux_data||{}).is_managed,c=Object.keys(s),u=[];c.forEach(function(e){var t=s[e];u.push(t.Status)});var d=function(e){return"active"===e||"inactive"===e},p=u.every(d)?(0,g.__)("Activate","newspack-plugin"):(0,g.__)("Install","newspack-plugin"),f=c.some(function(e){var t=s[e];return"active"!==t.Status&&0===t.installationStatus});return(0,l.jsxs)(l.Fragment,{children:[(!s||!Object.keys(s).length)&&(0,l.jsxs)("div",{className:"newspack-plugin-installer_is-waiting",children:[(0,l.jsx)(Ki,{isLeft:!0}),(0,g.__)("Retrieving plugin information…","newspack-plugin")]}),s&&c.length>0&&c.map(function(t){var n,a=s[t],c=a.Name,u=a.Description,p=a.Download,f=a.Status,h=a.installationStatus,v=a.notification,w=2===h,y=!w&&"active"!==f,_=p||d(f);2===h?n="inactive"===f?(0,g.__)("Activating…"):(0,g.__)("Installing…"):_?"uninstalled"===f?n=(0,l.jsxs)("span",{className:"newspack-plugin-installer__status",children:[(0,g.__)("Install","newspack"),(0,l.jsx)("span",{className:"newspack-checkbox-icon"})]}):"inactive"===f?n=(0,l.jsxs)("span",{className:"newspack-plugin-installer__status",children:[(0,g.__)("Activate","newspack-plugin"),(0,l.jsx)("span",{className:"newspack-checkbox-icon"})]}):"active"===f&&(n=(0,l.jsxs)("span",{className:"newspack-plugin-installer__status",children:[(0,g.__)("Installed","newspack-plugin"),(0,l.jsx)("span",{className:"newspack-checkbox-icon newspack-checkbox-icon--checked",children:(0,l.jsx)(m.A,{icon:b})})]})):n=(0,l.jsxs)("span",{className:"newspack-plugin-installer__status",children:[o?(0,g.__)("Contact Newspack support to install","newspack-plugin"):(0,g.__)("Plugin must be installed manually","newspack-plugin"),(0,l.jsx)("span",{className:"newspack-checkbox-icon"})]});var x=i()("newspack-action-card__plugin-installer",e.classForInstallationStatus(h)),k=y?function(){return e.installPlugin(t)}:null;return(0,l.jsx)(S,{title:c,description:u,disabled:!_,actionText:n,isSmall:r,isWaiting:w,onClick:k,notification:v,notificationLevel:"error",notificationHTML:!0,className:x},t)}),!a&&!n&&s&&c.length>0&&(0,l.jsx)("div",{className:"newspack-buttons-card",children:(0,l.jsx)(Cn,{disabled:!f,isPrimary:!0,onClick:this.installAllPlugins,children:p})})]})}}])}(s.Component);Ga.defaultProps={onStatus:function(){},onInstalled:function(){}};const qa=Ga;var Ua=n(2619);function Wa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var Xa=function(e){return Array.isArray(e.options)&&e.options.length},Ya=function(e){switch(e.type){case"int":case"integer":case"float":case"number":return"number";case"string":case"text":return"text";case"password":return"password";case"boolean":case"checkbox":return"checkbox";default:return null}};const Za=function(e){var t,n=h((0,s.useState)(!0),2),r=n[0],o=n[1],i=e.error,c=e.sectionKey,u=e.active,p=e.title,f=e.description,m=e.fields,v=e.disabled,b=e.onChange,w=e.onUpdate,y=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(0,Ua.applyFilters)("newspack.settingSection.".concat(c,".").concat(t),n,e)},_=2;return m.length%3==0?_=3:1===m.length&&(_=1),(0,l.jsx)(S,{id:null!==(t=e.id)&&void 0!==t?t:null,isMedium:!0,disabled:v,title:p,description:f,toggleChecked:u,hasGreyHeader:u||null===u,toggleOnChange:null!==u?function(e){return w({active:e})}:null,actionContent:(u||null===u)&&y("buttons",(0,l.jsx)(Cn,{variant:"primary",disabled:v||r,onClick:function(){w(),o(!0)},children:(0,g.__)("Save Settings","newspack")})),children:(u||null===u)&&(0,l.jsxs)(s.Fragment,{children:[(null==i?void 0:i.message)&&(0,l.jsx)(Ia,{noticeText:i.message,isError:!0}),y("beforeControls"),(0,l.jsx)(_a,{columns:_,gutter:32,children:m.map(function(e){var t=function(e){if(Xa(e))return xs;switch(e.type){case"checkbox":case"boolean":return a.CheckboxControl;default:return qi}}(e);return(0,Ua.applyFilters)("newspack.settingsSection.".concat(c,".control"),(0,l.jsx)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wa(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wa(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},function(e){var t;return{disabled:v,name:"".concat(e.section,"_").concat(e.key),type:Ya(e),label:e.description,help:e.help||null,options:(null===(t=e.options)||void 0===t?void 0:t.map(function(e){return{value:e.value,label:e.name||e.label}}))||null,value:e.value,multiple:!(!Xa(e)||!e.multiple)||null,checked:"boolean"===e.type?!!e.value:null,onChange:function(t){b(e.key,t),o(!1)}}}(e)),e.key),{sectionKey:c,setting:e,onChange:b})})})]})})};function Ka(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ka(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ka(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ja(e,t,n){return t=O(t),P(e,es()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function es(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(es=function(){return!!e})()}var ts=function(e){function t(){var e;return C(this,t),d(e=Ja(this,t,arguments),"fetchSettings",function(){var t=e.props,n=t.afterFetch,r=t.pluginSlug,a=t.isWizard;e.setState({inFlight:!0}),V()({path:a?"/newspack/v1/wizard/".concat(r,"/settings"):"/".concat(r,"/v1/settings")}).then(function(t){e.setState({settings:t,error:null}),"function"==typeof n&&n(t)}).catch(function(t){e.setState({error:t})}).finally(function(){e.setState({inFlight:!1})})}),d(e,"getSettingsValues",function(t){var n;return(null===(n=e.state.settings[t])||void 0===n?void 0:n.reduce(function(e,t){return e[t.key]=t.value,e},{}))||{}}),d(e,"handleSettingChange",function(t){return function(n,r){var a=j(e.state.settings[t]);a.forEach(function(e){e.key===n&&(e.value=r)}),e.setState({settings:Qa(Qa({},e.state.settings),{},d({},t,a))})}}),d(e,"handleSectionUpdate",function(t){return function(n){var r=e.props,a=r.afterUpdate,s=r.pluginSlug,o=r.isWizard;e.setState({inFlight:!0}),V()({path:o?"/newspack/v1/wizard/".concat(s,"/settings"):"/".concat(s,"/v1/settings"),method:"POST",data:{section:t,settings:n||e.getSettingsValues(t)}}).then(function(n){e.setState({settings:Qa(Qa({},e.state.settings),{},d({},t,n[t])),error:null}),"function"==typeof a&&a(n)}).catch(function(t){e.setState({error:t})}).finally(function(){e.setState({inFlight:!1})})}}),d(e,"getSectionInfo",function(t){var n;return null===(n=e.state.settings[t])||void 0===n?void 0:n.find(function(e){return!e.key||"active"===e.key})}),d(e,"getSectionTitle",function(t){var n;return null===(n=e.getSectionInfo(t))||void 0===n?void 0:n.description}),d(e,"getSectionDescription",function(t){var n;return null===(n=e.getSectionInfo(t))||void 0===n?void 0:n.help}),d(e,"isSectionActive",function(t){var n,r=null===(n=e.state.settings[t])||void 0===n?void 0:n.find(function(e){return"active"===e.key});return r?r.value:null}),d(e,"getSectionFields",function(t){var n;return null===(n=e.state.settings[t])||void 0===n?void 0:n.filter(function(e){return e.key&&"active"!==e.key})}),e.state={inFlight:!1,settings:{},error:null},e}return A(t,e),T(t,[{key:"componentDidMount",value:function(){this.fetchSettings()}},{key:"render",value:function(){var e=this,t=this.props,n=t.title,r=t.description,a=t.hasGreyHeader,o=t.children,c=t.titleLevel,u=void 0===c?1:c,d=this.state,p=d.settings,f=d.inFlight,h=d.error;return(0,l.jsxs)(s.Fragment,{children:[n&&(0,l.jsx)(ls,{title:n,heading:u,description:r}),h&&(0,l.jsx)(Ia,{isError:!0,noticeText:h.message}),(0,l.jsxs)("div",{className:i()("newspack-plugin-settings",{"newspack-wizard-section__is-loading":f&&!Object.keys(p).length}),children:[Object.keys(p).map(function(t){return(0,l.jsx)(Za,{disabled:f,id:"plugin-settings-".concat(t),sectionKey:t,title:e.getSectionTitle(t),description:e.getSectionDescription(t),active:e.isSectionActive(t),fields:e.getSectionFields(t),onChange:e.handleSettingChange(t),onUpdate:e.handleSectionUpdate(t),hasGreyHeader:a},t)}),o]})]})}}])}(s.Component);ts.defaultProps={title:(0,g.__)("General Settings","newspack-plugin")},ts.Section=Za;var ns=["className","padding"];function rs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function as(e,t,n){return t=O(t),P(e,ss()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function ss(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ss=function(){return!!e})()}var os=function(e){function t(){return C(this,t),as(this,t,arguments)}return A(t,e),T(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.padding,r=Xe(e,ns),s=i()("newspack-popover",n&&"newspack-popover__padding-"+n,t);return(0,l.jsx)(a.Popover,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rs(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({className:s},r))}}])}(s.Component);os.defaultProps={padding:!1};var is=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});const ls=function(e){var t=e.backNav,n=void 0===t?"":t,r=e.badges,o=e.centered,c=void 0!==o&&o,u=e.className,d=void 0===u?null:u,p=e.description,f=void 0===p?"":p,h=e.heading,v=void 0===h?2:h,b=e.icon,w=void 0===b?null:b,y=e.isWhite,_=void 0!==y&&y,x=e.noMargin,k=void 0!==x&&x,S=e.pageHeader,j=void 0!==S&&S,C=e.title,E=e.id,T=void 0===E?null:E,P=e.menu,O=e.primaryAction,M=e.secondaryAction,A=e.children,L=void 0===A?null:A,N=(0,s.useRef)();(0,s.useEffect)(function(){var e=new Proxy(new URLSearchParams(window.location.search),{get:function(e,t){return e.get(t)}}).scrollTo;e&&e===T&&window.setTimeout(function(){return N.current.scrollIntoView({behavior:"smooth"})},250)},[]);var I=i()("newspack-section-header",c&&"newspack-section-header--is-centered",_&&"newspack-section-header--is-white",k&&"newspack-section-header--no-margin",j&&"newspack-section-header--page-header"),D="h".concat(v),z=null;return"string"==typeof C?z=(0,l.jsxs)("div",{className:"newspack-section-header__title-container",children:[(0,l.jsxs)(D,{className:"newspack-section-header__title",children:[C,null!=r&&r.length?r.map(function(e,t){return(0,l.jsx)(Y,{text:e.label,level:e.level||"default"},t)}):null]}),M&&(0,l.jsx)("div",{className:"newspack-section-header__secondary-action",children:(0,l.jsx)(Cn,{variant:"link",href:M.href,onClick:M.action,children:M.label})}),(null==P?void 0:P.length)>0&&(0,l.jsx)(a.DropdownMenu,{className:"newspack-section-header__menu",icon:Tn,label:(0,g.__)("More options","newspack-plugin"),children:function(){return P.map(function(e,t){return(0,l.jsx)(a.MenuItem,{icon:e.icon,href:e.href,onClick:e.action,disabled:e.disabled||!1,isDestructive:e.destructive||!1,children:e.label},t)})}})]}):"function"==typeof C&&(z=(0,l.jsx)(D,{className:"newspack-section-header__title",children:C()})),(0,l.jsxs)("div",{id:T,className:i()("newspack-section-header__container",n&&"newspack-section-header--has-back-nav",O&&"newspack-section-header--has-primary-action",d),ref:N,children:[(0,l.jsxs)(_a,{columns:1,gutter:8,className:I,children:[w&&(0,l.jsx)("div",{className:"newspack-section-header__icon",children:(0,l.jsx)(m.A,{icon:w,size:48})}),n?(0,l.jsxs)(a.__experimentalHStack,{alignment:"left",style:{position:"relative"},children:[(0,l.jsx)("div",{className:"newspack-section-header__back-nav",children:(0,l.jsx)(a.Tooltip,{text:(0,g.__)("Go back","newspack-plugin"),children:(0,l.jsx)(Cn,{href:n,icon:is,variant:"tertiary"})})}),z]}):z,f&&"string"==typeof f&&(0,l.jsx)("p",{children:f}),"function"==typeof f&&(0,l.jsx)("p",{children:f()}),f&&"string"!=typeof f&&"function"!=typeof f&&(0,l.jsx)("p",{children:f}),L&&(0,l.jsx)("div",{className:"newspack-section-header__children",children:L})]}),O&&(0,l.jsx)("div",{className:"newspack-section-header__primary-action",children:(0,l.jsx)(Cn,{href:O.href,variant:"primary",onClick:O.action,children:O.label})})]})};var cs=n(2636),us=n.n(cs),ds=["help","label","onChange","optgroups","className","hideLabelFromVision"];function ps(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ps(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ps(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hs(e){var t=e.help,n=e.label,r=e.onChange,s=e.optgroups,o=void 0===s?[]:s,c=e.className,u=e.hideLabelFromVision,d=Xe(e,ds),p=Gr.useUniqueId("group-select");return(0,l.jsx)(a.BaseControl,{label:n,hideLabelFromVision:u,id:p,help:t,className:i()(c,"components-select-control"),children:(0,l.jsxs)("div",{className:"newspack-grouped-select-control__field",children:[(0,l.jsxs)("select",fs(fs({id:p,className:"components-select-control__input",onChange:function(e){var t=e.target.value,n=$n()(o,function(e){return us()(e.options,["value",t])});r(t,n)},"aria-describedby":t?"".concat(p,"__help"):void 0},d),{},{children:[(0,l.jsx)("option",{value:"",children:(0,g.__)("-- Select --","newspack-plugin")}),o.map(function(e,t){var n=e.label,r=e.options;return(0,l.jsx)("optgroup",{label:n,children:r.map(function(e,t){return(0,l.jsx)("option",{value:e.value,disabled:e.disabled,children:e.label},"".concat(e.label,"-").concat(e.value,"-").concat(t))})},t)})]})),(0,l.jsx)("div",{className:"components-select-control__arrow-wrapper",children:(0,l.jsx)(m.A,{icon:y,size:18})})]})})}const gs=function(e){var t=e.buttonOptions,n=e.buttonSmall,r=e.className,s=e.help,o=e.hideLabelFromVision,c=e.label,u=e.onChange,d=e.value,p=Gr.useUniqueId("button-group");return(0,l.jsx)(a.BaseControl,{label:c,help:s,hideLabelFromVision:o,id:p.current,className:i()(r,"components-select-control"),children:(0,l.jsx)(a.ButtonGroup,{children:t.map(function(e){var t=d===e.value,r=function(){return e.label};return e.icon&&(r=function(){return(0,l.jsx)(m.A,{icon:e.icon})}),(0,l.jsx)(a.Button,{variant:t?"primary":null,isPressed:t,onClick:function(){return u(e.value)},isSmall:n,children:(0,l.jsx)(r,{})},e.value)})})})};var ms=["className","optgroups","buttonOptions","buttonSmall"];function vs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vs(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ws(e,t,n){return t=O(t),P(e,ys()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function ys(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ys=function(){return!!e})()}var _s=function(e){function t(){return C(this,t),ws(this,t,arguments)}return A(t,e),T(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.optgroups,r=e.buttonOptions,s=e.buttonSmall,o=Xe(e,ms),c=i()("newspack-select-control",n&&"newspack-grouped-select-control",r&&"newspack-buttons-select-control",t);return(0,l.jsx)("div",{className:c,children:n?(0,l.jsx)(hs,bs({optgroups:n},o)):r?(0,l.jsx)(gs,bs({buttonOptions:r,buttonSmall:s},o)):(0,l.jsx)(a.SelectControl,bs({},o))})}}])}(s.Component);const xs=_s,ks={...Q},Ss=ks.useInsertionEffect,js=Ss&&Ss!==ks.useLayoutEffect?Ss:e=>e();function Cs(e){const t=te(Es).current;return t.next=e,js(t.effect),t.trampoline}function Es(){const e={next:void 0,callback:Ts,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Ts(){}const Ps="undefined"!=typeof document?K.useLayoutEffect:()=>{},Os=K.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Ms(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:a}=e,s=Cs(a),o=K.useRef(0),i=te(Ls).current,c=te(As).current,[u,d]=K.useState(0),p=K.useRef(u),f=Cs((e,t)=>{c.set(e,t??null),p.current+=1,d(p.current)}),h=Cs(e=>{c.delete(e),p.current+=1,d(p.current)}),g=K.useMemo(()=>{const e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(Ns).forEach((t,n)=>{const r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,u]);Ps(()=>{if("function"!=typeof MutationObserver||0===g.size)return;const e=new MutationObserver(e=>{const t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),0===t.size&&(p.current+=1,d(p.current))});return g.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[g]),Ps(()=>{p.current===u&&(n.current.length!==g.size&&(n.current.length=g.size),r&&r.current.length!==g.size&&(r.current.length=g.size),o.current=g.size),s(g)},[s,g,n,r,u]),Ps(()=>()=>{n.current=[]},[n]),Ps(()=>()=>{r&&(r.current=[])},[r]);const m=Cs(e=>(i.add(e),()=>{i.delete(e)}));Ps(()=>{i.forEach(e=>e(g))},[i,g]);const v=K.useMemo(()=>({register:f,unregister:h,subscribeMapChange:m,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,h,m,n,r,o]);return(0,l.jsx)(Os.Provider,{value:v,children:t})}function As(){return new Map}function Ls(){return new Set}function Ns(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function Is(){return"undefined"!=typeof window}function Ds(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function zs(e){return!!Is()&&(e instanceof HTMLElement||e instanceof Ds(e).HTMLElement)}function Bs(e){return Ds(e).getComputedStyle(e)}const Rs="ArrowUp",Hs="ArrowDown",Vs="ArrowLeft",$s="ArrowRight",Fs="Home",Gs="End",qs=new Set([Vs,$s]),Us=new Set([Vs,$s,Fs,Gs]),Ws=new Set([Rs,Hs]),Xs=new Set([Rs,Hs,Fs,Gs]),Ys=new Set([...qs,...Ws]),Zs=new Set([...Ys,Fs,Gs]),Ks=new Set(["Shift","Control","Alt","Meta"]);function Qs(e){return!(!function(e){return zs(e)&&"INPUT"===e.tagName}(e)||null==e.selectionStart)||!(!zs(e)||"TEXTAREA"!==e.tagName)}function Js(e,t,n,r){if(!e||!t||!t.scrollTo)return;let a=e.scrollLeft,s=e.scrollTop;const o=e.clientWidth<e.scrollWidth,i=e.clientHeight<e.scrollHeight;if(o&&"vertical"!==r){const r=eo(e,t,"left"),s=to(e),o=to(t);"ltr"===n&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-s.scrollPaddingRight?a=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+s.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+s.scrollPaddingLeft&&(a=r-o.scrollMarginLeft-s.scrollPaddingLeft)),"rtl"===n&&(r-o.scrollMarginRight<e.scrollLeft+s.scrollPaddingLeft?a=r-o.scrollMarginLeft-s.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-s.scrollPaddingRight&&(a=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+s.scrollPaddingRight))}if(i&&"horizontal"!==r){const n=eo(e,t,"top"),r=to(e),a=to(t);n-a.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?s=n-a.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+a.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(s=n+t.offsetHeight+a.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:a,top:s,behavior:"auto"})}function eo(e,t,n){const r="left"===n?"offsetLeft":"offsetTop";let a=0;for(;t.offsetParent&&(a+=t[r],t.offsetParent!==e);)t=t.offsetParent;return a}function to(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}Math.min,Math.max;const no=Math.round,ro=Math.floor;function ao(e){e.preventDefault(),e.stopPropagation()}const so="ArrowLeft",oo="ArrowRight";function io(e,t,n){return Math.floor(e/t)!==n}function lo(e,t){return t<0||t>=e.length}function co(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:a=1}={}){let s=t;do{s+=n?-a:a}while(s>=0&&s<=e.length-1&&fo(e,s,r));return s}function uo(e,t,n,r,a){if(-1===e)return-1;const s=n.indexOf(e),o=t[e];switch(a){case"tl":return s;case"tr":return o?s+o.width-1:s;case"bl":return o?s+(o.height-1)*r:s;case"br":return n.lastIndexOf(e);default:return-1}}function po(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function fo(e,t,n){if("function"==typeof n?n(t):n?.includes(t))return!0;const r=e[t];return!!r&&(!function(e,t=(e?Bs(e):null)){return!(!(e&&e.isConnected&&t)||function(e){return"hidden"===e.visibility||"collapse"===e.visibility}(t))&&("function"==typeof e.checkVisibility?e.checkVisibility():"none"!==t.display&&"contents"!==t.display)}(r)||!n&&(r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")))}const ho="data-composite-item-active";function go(e){return"composedPath"in e?e.composedPath()[0]:e.target}const mo=[];const vo=K.createContext(void 0);function bo(e=!1){const t=K.useContext(vo);if(void 0===t&&!e)throw new Error(Z(16));return t}const wo=K.createContext(void 0);function yo(e){const{render:t,className:n,style:r,refs:a=ue,props:s=ue,state:o=de,stateAttributesMapping:i,highlightedIndex:c,onHighlightedIndexChange:u,orientation:d,dense:p,itemSizes:f,loopFocus:h,onLoop:g,cols:m,enableHomeAndEndKeys:v,onMapChange:b,stopEventPropagation:w=!0,rootRef:y,disabledIndices:_,modifierKeys:x,highlightItemOnHover:k=!1,tag:S="div",...j}=e,C=function(){const e=K.useContext(wo);return e?.direction??"ltr"}(),{props:E,highlightedIndex:T,onHighlightedIndexChange:P,elementsRef:O,onMapChange:M,relayKeyboardEvent:A}=function(e){const{itemSizes:t,cols:n=1,loopFocus:r=!0,onLoop:a,dense:s=!1,orientation:o="both",direction:i,highlightedIndex:l,onHighlightedIndexChange:c,rootRef:u,enableHomeAndEndKeys:d=!1,stopEventPropagation:p=!1,disabledIndices:f,modifierKeys:h=mo}=e,[g,m]=K.useState(0),v=n>1,b=K.useRef(null),w=ne(b,u),y=K.useRef([]),_=K.useRef(!1),x=l??g,k=Cs((e,t=!1)=>{if((c??m)(e),t){const t=y.current[e];Js(b.current,t,i,o)}}),S=Cs(e=>{if(0===e.size||_.current)return;_.current=!0;const t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(ho))??null,r=n?t.indexOf(n):-1;-1!==r&&k(r),Js(b.current,n,i,o)}),j=Cs((e,t,n)=>a?a?.(e,t,n,y):n),C=K.useMemo(()=>({"aria-orientation":"both"===o?void 0:o,ref:w,onFocus(e){const t=b.current,n=go(e.nativeEvent);t&&null!=n&&Qs(n)&&n.setSelectionRange(0,n.value.length??0)},onKeyDown(e){const l=d?Zs:Ys;if(!l.has(e.key))return;if(function(e,t){for(const n of Ks.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}(e,h))return;if(!b.current)return;const c="rtl"===i,u=c?Vs:$s,g={horizontal:u,vertical:Hs,both:u}[o],m=c?$s:Vs,w={horizontal:m,vertical:Rs,both:m}[o],_=go(e.nativeEvent);if(null!=_&&Qs(_)&&null!=(S=_)&&!S.hasAttribute("disabled")&&"true"!==S.getAttribute("aria-disabled")){const t=_.selectionStart,n=_.selectionEnd,r=_.value??"";if(null==t||e.shiftKey||t!==n)return;if(e.key!==w&&t<r.length)return;if(e.key!==g&&t>0)return}var S;let C=x;const E=function(e,t){return co(e.current,{disabledIndices:t})}(y,f),T=function(e,t){return co(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}(y,f);if(v){const a=t||Array.from({length:y.current.length},()=>({width:1,height:1})),i=function(e,t,n){const r=[];let a=0;return e.forEach(({width:e,height:s},o)=>{let i=!1;for(n&&(a=0);!i;){const n=[];for(let r=0;r<e;r+=1)for(let e=0;e<s;e+=1)n.push(a+r+e*t);a%t+e<=t&&n.every(e=>null==r[e])?(n.forEach(e=>{r[e]=o}),i=!0):a+=1}}),[...r]}(a,n,s),l=i.findIndex(e=>null!=e&&!fo(y.current,e,f)),u=i.reduce((e,t,n)=>null==t||fo(y.current,t,f)?e:n,-1);C=i[function(e,{event:t,orientation:n,loopFocus:r,onLoop:a,rtl:s,cols:o,disabledIndices:i,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}){let p,f=u;if("ArrowUp"===t.key?p="up":"ArrowDown"===t.key&&(p="down"),p){const n=[],s=[];let h=!1,g=0;{let t=null,r=-1;e.forEach((e,a)=>{if(null==e)return;g+=1;const o=e.closest('[role="row"]');o&&(h=!0),o===t&&-1!==r||(t=o,r+=1,n[r]=[]),n[r].push(a),s[a]=r})}let m=!1,v=0;if(h)for(const e of n){const t=e.length;t>v&&(v=t),t!==o&&(m=!0)}const b=m&&g<e.length,w=v||o,y=o=>{if(!m||-1===u)return;const l=s[u];if(null==l)return;const c=n[l].indexOf(u),d="up"===o?-1:1;for(let o=l+d,p=0;p<n.length;p+=1,o+=d){if(o<0||o>=n.length){if(!r||b)return;if(o=o<0?n.length-1:0,a){const e=Math.min(c,n[o].length-1),r=n[o][e]??n[o][0],i=a(t,u,r);o=s[i]??o}}const l=n[o];for(let t=Math.min(c,l.length-1);t>=0;t-=1){const n=l[t];if(!fo(e,n,i))return n}}},_=t=>{if(!b||-1===u)return;const n=u%w,a="up"===t?-w:w,s=c-c%w,o=ro(c/w)+1;for(let t=u-n+a,l=0;l<o;l+=1,t+=a){if(t<0||t>c){if(!r)return;t=t<0?s:0}const a=Math.min(t+w-1,c);for(let r=Math.min(t+n,a);r>=t;r-=1)if(!fo(e,r,i))return r}};d&&ao(t);const x=y(p)??_(p);if(void 0!==x)f=x;else if(-1===u)f="up"===p?c:l;else if(f=co(e,{startingIndex:u,amount:w,decrement:"up"===p,disabledIndices:i}),r){if("up"===p&&(u-w<l||f<0)){const e=u%w,n=c%w,r=c-(n-e);f=n===e?c:n>e?r:r-w,a&&(f=a(t,u,f))}"down"===p&&u+w>c&&(f=co(e,{startingIndex:u%w-w,amount:w,disabledIndices:i}),a&&(f=a(t,u,f)))}lo(e,f)&&(f=u)}if("both"===n){const n=ro(u/o);t.key===(s?so:oo)&&(d&&ao(t),u%o!==o-1?(f=co(e,{startingIndex:u,disabledIndices:i}),r&&io(f,o,n)&&(f=co(e,{startingIndex:u-u%o-1,disabledIndices:i}),a&&(f=a(t,u,f)))):r&&(f=co(e,{startingIndex:u-u%o-1,disabledIndices:i}),a&&(f=a(t,u,f))),io(f,o,n)&&(f=u)),t.key===(s?oo:so)&&(d&&ao(t),u%o!==0?(f=co(e,{startingIndex:u,decrement:!0,disabledIndices:i}),r&&io(f,o,n)&&(f=co(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:i}),a&&(f=a(t,u,f)))):r&&(f=co(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:i}),a&&(f=a(t,u,f))),io(f,o,n)&&(f=u));const l=ro(c/o)===n;lo(e,f)&&(r&&l?(f=t.key===(s?oo:so)?c:co(e,{startingIndex:u-u%o-1,disabledIndices:i}),a&&(f=a(t,u,f))):f=u)}return f}(i.map(e=>null!=e?y.current[e]:null),{event:e,orientation:o,loopFocus:r,onLoop:j,cols:n,disabledIndices:po([...f||y.current.map((e,t)=>fo(y.current,t)?t:void 0),void 0],i),minIndex:l,maxIndex:u,prevIndex:uo(x>T?E:x,a,i,n,e.key===Hs?"bl":e.key===$s?"tr":"tl"),rtl:c})]}const P={horizontal:[u],vertical:[Hs],both:[u,Hs]}[o],O={horizontal:[m],vertical:[Rs],both:[m,Rs]}[o],M=v?l:{horizontal:d?Us:qs,vertical:d?Xs:Ws,both:l}[o];d&&(e.key===Fs?C=E:e.key===Gs&&(C=T)),C===x&&(P.includes(e.key)||O.includes(e.key))&&(r&&C===T&&P.includes(e.key)?(C=E,a&&(C=a(e,x,C,y))):r&&C===E&&O.includes(e.key)?(C=T,a&&(C=a(e,x,C,y))):C=co(y.current,{startingIndex:C,decrement:O.includes(e.key),disabledIndices:f})),C===x||lo(y.current,C)||(p&&e.stopPropagation(),M.has(e.key)&&e.preventDefault(),k(C,!0),queueMicrotask(()=>{y.current[C]?.focus()}))}}),[n,s,i,f,y,d,x,v,t,r,a,j,w,h,k,o,p]);return K.useMemo(()=>({props:C,highlightedIndex:x,onHighlightedIndexChange:k,elementsRef:y,disabledIndices:f,onMapChange:S,relayKeyboardEvent:C.onKeyDown}),[C,x,k,y,f,S])}({itemSizes:f,cols:m,loopFocus:h,onLoop:g,dense:p,orientation:d,highlightedIndex:c,onHighlightedIndexChange:u,rootRef:y,stopEventPropagation:w,enableHomeAndEndKeys:v,direction:C,disabledIndices:_,modifierKeys:x}),L=Se(S,e,{state:o,ref:a,props:[E,...s,j],stateAttributesMapping:i}),N=K.useMemo(()=>({highlightedIndex:T,onHighlightedIndexChange:P,highlightItemOnHover:k,relayKeyboardEvent:A}),[T,P,k,A]);return(0,l.jsx)(vo.Provider,{value:N,children:(0,l.jsx)(Ms,{elementsRef:O,onMapChange:e=>{b?.(e),M(e)},children:L})})}let _o=function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e}({});const xo={tabActivationDirection:e=>({[_o.activationDirection]:e})},ko=K.createContext(void 0);function So(){const e=K.useContext(ko);if(void 0===e)throw new Error(Z(64));return e}const jo=K.createContext(void 0);function Co(){const e=K.useContext(jo);if(void 0===e)throw new Error(Z(65));return e}const Eo=K.forwardRef(function(e,t){const{activateOnFocus:n=!1,className:r,loopFocus:a=!0,render:s,style:o,...i}=e,{onValueChange:c,orientation:u,value:d,setTabMap:p,tabActivationDirection:f}=So(),[h,g]=K.useState(0),[m,v]=K.useState(null),b=K.useRef(new Set),w=K.useRef(new Set),y=K.useRef(null);K.useEffect(()=>{if("undefined"==typeof ResizeObserver)return;const e=new ResizeObserver(()=>{b.current.forEach(e=>{e()})});return y.current=e,m&&e.observe(m),w.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),y.current=null}},[m]);const _=Cs(e=>(b.current.add(e),()=>{b.current.delete(e)})),x=Cs(e=>(w.current.add(e),y.current?.observe(e),()=>{w.current.delete(e),y.current?.unobserve(e)})),k=Cs((e,t)=>{e!==d&&c(e,t)}),S={orientation:u,tabActivationDirection:f},j={"aria-orientation":"vertical"===u?"vertical":void 0,role:"tablist"},C=K.useMemo(()=>({activateOnFocus:n,highlightedTabIndex:h,registerIndicatorUpdateListener:_,registerTabResizeObserverElement:x,onTabActivation:k,setHighlightedTabIndex:g,tabsListElement:m}),[n,h,_,x,k,g,m]);return(0,l.jsx)(jo.Provider,{value:C,children:(0,l.jsx)(yo,{render:s,className:r,style:o,state:S,refs:[t,v],props:[j,i],stateAttributesMapping:xo,highlightedIndex:h,enableHomeAndEndKeys:!0,loopFocus:a,orientation:u,onHighlightedIndexChange:g,onMapChange:p,disabledIndices:ue})})});function To(e){const t=Bs(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=zs(e),s=a?e.offsetWidth:n,o=a?e.offsetHeight:r;return(no(n)!==s||no(r)!==o)&&(n=s,r=o),{width:n,height:r}}var Po=n(3098);function Oo(){return ce}function Mo(){return!1}function Ao(){return!0}let Lo=function(e){return e.activeTabLeft="--active-tab-left",e.activeTabRight="--active-tab-right",e.activeTabTop="--active-tab-top",e.activeTabBottom="--active-tab-bottom",e.activeTabWidth="--active-tab-width",e.activeTabHeight="--active-tab-height",e}({});const No=K.createContext(void 0),Io={disableStyleElements:!1},Do={...xo,activeTabPosition:()=>null,activeTabSize:()=>null},zo=K.forwardRef(function(e,t){const{className:n,render:r,renderBeforeHydration:a=!1,style:s,...o}=e,{nonce:i}=K.useContext(No)??Io,{getTabElementBySelectedValue:c,orientation:u,tabActivationDirection:d,value:p}=So(),{tabsListElement:f,registerIndicatorUpdateListener:h}=Co(),g=(0,Po.useSyncExternalStore)(Oo,Mo,Ao),m=function(){const[,e]=K.useState({});return K.useCallback(()=>{e({})},[])}();K.useEffect(()=>h(m),[h,m]);let v=0,b=0,w=0,y=0,_=0,x=0,k=!1;if(null!=p&&null!=f){const e=c(p);if(k=!0,null!=e){const{width:t,height:n}=To(e),{width:r,height:a}=To(f),s=e.getBoundingClientRect(),o=f.getBoundingClientRect(),i=r>0?o.width/r:1,l=a>0?o.height/a:1;if(Math.abs(i)>Number.EPSILON&&Math.abs(l)>Number.EPSILON){const e=s.left-o.left,t=s.top-o.top;v=e/i+f.scrollLeft-f.clientLeft,w=t/l+f.scrollTop-f.clientTop}else v=e.offsetLeft,w=e.offsetTop;_=t,x=n,b=f.scrollWidth-v-_,y=f.scrollHeight-w-x}}const S=Se("span",e,{state:{orientation:u,activeTabPosition:k?{left:v,right:b,top:w,bottom:y}:null,activeTabSize:k?{width:_,height:x}:null,tabActivationDirection:d},ref:t,props:[{role:"presentation",style:k?{[Lo.activeTabLeft]:`${v}px`,[Lo.activeTabRight]:`${b}px`,[Lo.activeTabTop]:`${w}px`,[Lo.activeTabBottom]:`${y}px`,[Lo.activeTabWidth]:`${_}px`,[Lo.activeTabHeight]:`${x}px`}:void 0,hidden:!(k&&_>0&&x>0)},o,{suppressHydrationWarning:!0}],stateAttributesMapping:Do});return null==p?null:(0,l.jsxs)(K.Fragment,{children:[S,g&&a&&(0,l.jsx)("script",{nonce:i,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var Bo="data-wp-hash";function Ro(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=Ro();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[n,r]of t.styles)Ho(e,n,r)}(document)),e.__wpStyleRuntime}function Ho(e,t,n){if(!e.head)return;const r=Ro();let a=r.injectedStyles.get(e);if(a||(a=new Set,r.injectedStyles.set(e,a)),a.has(t))return;if(function(e,t){if(!e.head)return!1;for(const n of e.head.querySelectorAll(`style[${Bo}]`))if(n.getAttribute(Bo)===t)return!0;return!1}(e,t))return void a.add(t);const s=e.createElement("style");s.setAttribute(Bo,t),s.appendChild(e.createTextNode(n)),e.head.appendChild(s),a.add(t)}!function(e,t){const n=Ro();n.styles.set(e,t);for(const r of n.documents.keys())Ho(r,e,t)}("bb8cbb8f31",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7313adbc8a112e90__tablist{--direction-factor:1;--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-factor:-1;--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:transparent 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,transparent 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid transparent;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6e6e6e);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\n\t\t\t&[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:transparent;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:var(--wpds-dimension-size-lg,40px);padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\n\t\t\t\t[role=tab]:is([aria-selected=true])\n\t\t\t\t&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}');var Vo={tablist:"_7313adbc8a112e90__tablist","is-overflowing-first":"_9f2ac729c68a735a__is-overflowing-first","is-overflowing-last":"_81c799c1f3cdd261__is-overflowing-last","is-minimal-variant":"_59228b5227f38a99__is-minimal-variant",indicator:"_1c37dcfaa1ad8cda__indicator",tab:"a5fd8814f195aa5e__tab","tab-children":"_5dfc77e6edd345d4__tab-children","tab-chevron":"_4a20e969d15e5ac1__tab-chevron"},$o=(0,s.forwardRef)(function({children:e,variant:t="default",className:n,activateOnFocus:r,...a},o){const[i,c]=(0,s.useState)(null),[u,d]=(0,s.useState)({first:!1,last:!1,isScrolling:!1});(0,s.useEffect)(()=>{if(!i)return;const e=()=>{const{scrollWidth:e,clientWidth:t,scrollLeft:n}=i,r=Math.max(e-t,0),a="rtl"===(i.dir||("undefined"!=typeof window?window.getComputedStyle(i).direction:"ltr"))&&n<0?-n:n;d({first:a>1,last:a<r-1,isScrolling:e>t})},t=new ResizeObserver(e);t.observe(i);let n=!1;const r=()=>{n||(requestAnimationFrame(()=>{e(),n=!1}),n=!0)};return i.addEventListener("scroll",r,{passive:!0}),e(),()=>{i.removeEventListener("scroll",r),t.disconnect()}},[i]);const p=(0,Hn.useMergeRefs)([o,e=>c(e)]);return(0,l.jsxs)(Eo,{ref:p,activateOnFocus:r,"data-select-on-move":r?"true":"false",className:Le(Vo.tablist,u.first&&Vo["is-overflowing-first"],u.last&&Vo["is-overflowing-last"],Vo[`is-${t}-variant`],n),...a,tabIndex:a.tabIndex??(u.isScrolling?-1:void 0),children:[e,(0,l.jsx)(zo,{className:Vo.indicator})]})});function Fo(e){return e?.ownerDocument||document}let Go=0;const qo=ks.useId;function Uo(e){return function(e,t){if(void 0!==qo){const n=qo();return e??(t?`${t}-${n}`:n)}return function(e,t="mui"){const[n,r]=K.useState(e),a=e||n;return K.useEffect(()=>{null==n&&(Go+=1,r(`${t}-${Go}`))},[n,t]),a}(e,t)}(e,"base-ui")}function Wo(e){return zs(e)&&"BUTTON"===e.tagName}let Xo=function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e}({});function Yo(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:a,index:s}=e,{register:o,unregister:i,subscribeMapChange:l,elementsRef:c,labelsRef:u,nextIndexRef:d}=K.useContext(Os),p=K.useRef(-1),[f,h]=K.useState(s??(a===Xo.GuessFromOrder?()=>{if(-1===p.current){const e=d.current;d.current+=1,p.current=e}return p.current}:-1)),g=K.useRef(null),m=K.useCallback(e=>{if(g.current=e,-1!==f&&null!==e&&(c.current[f]=e,u)){const n=void 0!==t;u.current[f]=n?t:r?.current?.textContent??e.textContent}},[f,c,u,t,r]);return Ps(()=>{if(null!=s)return;const e=g.current;return e?(o(e,n),()=>{i(e)}):void 0},[s,o,i,n]),Ps(()=>{if(null==s)return l(e=>{const t=g.current?e.get(g.current)?.index:null;null!=t&&h(t)})},[s,l,h]),K.useMemo(()=>({ref:m,index:f}),[f,m])}function Zo(e,t,n,r){let a=!1,s=!1;const o=r??de;return{reason:e,event:t??new Event("base-ui"),cancel(){a=!0},allowPropagation(){s=!0},get isCanceled(){return a},get isPropagationAllowed(){return s},trigger:n,...o}}const Ko="none",Qo="missing",Jo="initial",ei=K.forwardRef(function(e,t){const{className:n,disabled:r=!1,render:a,value:s,id:o,nativeButton:i=!0,style:l,...c}=e,{value:u,getTabPanelIdByValue:d,orientation:p}=So(),{activateOnFocus:f,highlightedTabIndex:h,onTabActivation:g,registerTabResizeObserverElement:m,setHighlightedTabIndex:v,tabsListElement:b}=Co(),w=Uo(o),y=K.useMemo(()=>({disabled:r,id:w,value:s}),[r,w,s]),{compositeProps:_,compositeRef:x,index:k}=function(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=bo(),{ref:a,index:s}=Yo(e),o=n===s,i=K.useRef(null),l=ne(a,i),c=K.useMemo(()=>({tabIndex:o?0:-1,onFocus(){r(s)},onMouseMove(){const e=i.current;if(!t||!e)return;const n=e.hasAttribute("disabled")||"true"===e.ariaDisabled;o||n||e.focus()}}),[o,r,s,t]);return{compositeProps:c,compositeRef:l,index:s}}({metadata:y}),S=s===u,j=K.useRef(!1),C=K.useRef(null);K.useEffect(()=>{const e=C.current;if(e)return m(e)},[m]),Ps(()=>{if(j.current)return void(j.current=!1);if(!(S&&k>-1&&h!==k))return;const e=b;if(null!=e){const t=function(e){let t=e.activeElement;for(;null!=t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}(Fo(e));if(t&&function(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&function(e){return!(!Is()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ds(e).ShadowRoot)}(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}(e,t))return}r||v(k)},[S,k,h,v,r,b]);const{getButtonProps:E,buttonRef:T}=function(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:a=!0,composite:s}=e,o=K.useRef(null),i=bo(!0),l=s??void 0!==i,{props:c}=function(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:a=0,isNativeButton:s}=e,o=r&&!1!==t,i=r&&!1===t;return{props:K.useMemo(()=>{const e={onKeyDown(e){n&&t&&"Tab"!==e.key&&e.preventDefault()}};return r||(e.tabIndex=a,!s&&n&&(e.tabIndex=t?a:-1)),(s&&(t||o)||!s&&n)&&(e["aria-disabled"]=n),!s||t&&!i||(e.disabled=n),e},[r,n,t,o,i,s,a])}}({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:a}),u=K.useCallback(()=>{const e=o.current;Wo(e)&&l&&t&&void 0===c.disabled&&e.disabled&&(e.disabled=!1)},[t,c.disabled,l]);return Ps(u,[u]),{getButtonProps:K.useCallback((e={})=>{const{onClick:n,onMouseDown:r,onKeyUp:s,onKeyDown:o,onPointerDown:i,...u}=e;return fe({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t)return;if(_e(e),o?.(e),e.baseUIHandlerPrevented)return;const r=e.target===e.currentTarget,s=e.currentTarget,i=Wo(s),c=!a&&(u=s,Boolean("A"===u?.tagName&&u?.href));var u;const d=r&&(a?i:!c),p="Enter"===e.key,f=" "===e.key,h=s.getAttribute("role"),g=h?.startsWith("menuitem")||"option"===h||"gridcell"===h;if(r&&l&&f){if(e.defaultPrevented&&g)return;return e.preventDefault(),void(c||a&&i?(s.click(),e.preventBaseUIHandler()):d&&(n?.(e),e.preventBaseUIHandler()))}d&&(a||!f&&!p||e.preventDefault(),!a&&p&&n?.(e))},onKeyUp(e){t||(_e(e),s?.(e),e.target===e.currentTarget&&a&&l&&Wo(e.currentTarget)&&" "===e.key?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||a||l||" "!==e.key||n?.(e))},onPointerDown(e){t?e.preventDefault():i?.(e)}},a?{type:"button"}:{role:"button"},c,u)},[t,c,l,a]),buttonRef:Cs(e=>{o.current=e,u()})}}({disabled:r,native:i,focusableWhenDisabled:!0}),P=d(s),O=K.useRef(!1),M=K.useRef(!1);return Se("button",e,{state:{disabled:r,active:S,orientation:p},ref:[t,T,x,C],props:[_,{role:"tab","aria-controls":P,"aria-selected":S,id:w,onClick:function(e){S||r||g(s,Zo(Ko,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){S||(k>-1&&!r&&v(k),r||f&&(!O.current||O.current&&M.current)&&g(s,Zo(Ko,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){S||r||(O.current=!0,e.button&&0!==e.button)||(M.current=!0,Fo(e.currentTarget).addEventListener("pointerup",function(){O.current=!1,M.current=!1},{once:!0}))},[ho]:S?"":void 0,onKeyDownCapture(){j.current=!0}},c,E]})});var ti=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)(v.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),ni=(0,s.forwardRef)(function({icon:e,size:t=24,...n},r){return(0,l.jsx)(v.SVG,{ref:r,...e.props,...n,width:t,height:t})}),ri=function({children:e}){return(0,l.jsx)(l.Fragment,{children:e})},ai="data-wp-hash";function si(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=si();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[n,r]of t.styles)oi(e,n,r)}(document)),e.__wpStyleRuntime}function oi(e,t,n){if(!e.head)return;const r=si();let a=r.injectedStyles.get(e);if(a||(a=new Set,r.injectedStyles.set(e,a)),a.has(t))return;if(function(e,t){if(!e.head)return!1;for(const n of e.head.querySelectorAll(`style[${ai}]`))if(n.getAttribute(ai)===t)return!0;return!1}(e,t))return void a.add(t);const s=e.createElement("style");s.setAttribute(ai,t),s.appendChild(e.createTextNode(n)),e.head.appendChild(s),a.add(t)}!function(e,t){const n=si();n.styles.set(e,t);for(const r of n.documents.keys())oi(r,e,t)}("bb8cbb8f31",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7313adbc8a112e90__tablist{--direction-factor:1;--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-factor:-1;--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:transparent 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,transparent 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid transparent;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6e6e6e);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\n\t\t\t&[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:transparent;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:var(--wpds-dimension-size-lg,40px);padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\n\t\t\t\t[role=tab]:is([aria-selected=true])\n\t\t\t\t&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}');var ii=(0,s.forwardRef)(function({className:e,children:t,...n},r){return(0,l.jsxs)(ei,{ref:r,className:Le("a5fd8814f195aa5e__tab",e),...n,children:[(0,l.jsx)("span",{className:"_5dfc77e6edd345d4__tab-children",children:t}),(0,l.jsx)(ni,{icon:ti,className:"_4a20e969d15e5ac1__tab-chevron"})]})});function li(e){return oe(19)?e:e?"true":void 0}let ci=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const ui={[ci.startingStyle]:""},di={[ci.endingStyle]:""},pi={transitionStatus:e=>"starting"===e?ui:"ending"===e?di:null},fi=window.ReactDOM,hi=[],gi=null;globalThis.requestAnimationFrame;const mi=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;const t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){const t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){const t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,this.callbacksCount-=1)}};class vi{static create(){return new vi}static request(e){return mi.request(e)}static cancel(e){return mi.cancel(e)}currentId=gi;request(e){this.cancel(),this.currentId=mi.request(()=>{this.currentId=gi,e()})}cancel=()=>{this.currentId!==gi&&(mi.cancel(this.currentId),this.currentId=gi)};disposeEffect=()=>this.cancel}function bi(e){const{enabled:t=!0,open:n,ref:r,onComplete:a}=e,s=Cs(a),o=function(e,t=!1,n=!0){const r=function(){const e=te(vi.create).current;var t;return t=e.disposeEffect,K.useEffect(t,hi),e}();return Cs((a,s=null)=>{r.cancel();const o=null==(i=e)?i:"current"in i?i.current:i;var i;if(null==o)return;const l=o,c=()=>{fi.flushSync(a)};if("function"!=typeof l.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)a();else{if(t){const e=ci.startingStyle;if(!l.hasAttribute(e))return void r.request(u);const t=new MutationObserver(()=>{l.hasAttribute(e)||(t.disconnect(),u())});return t.observe(l,{attributes:!0,attributeFilter:[e]}),void s?.addEventListener("abort",()=>t.disconnect(),{once:!0})}r.request(u)}function u(){Promise.all(l.getAnimations().map(e=>e.finished)).then(()=>{s?.aborted||c()}).catch(()=>{if(n)return void(s?.aborted||c());const e=l.getAnimations();!s?.aborted&&e.length>0&&e.some(e=>e.pending||"finished"!==e.playState)&&u()})}})}(r,n,!1);K.useEffect(()=>{if(!t)return;const e=new AbortController;return o(s,e.signal),()=>{e.abort()}},[t,n,s,o])}let wi=function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e[e.startingStyle=ci.startingStyle]="startingStyle",e[e.endingStyle=ci.endingStyle]="endingStyle",e}({});const yi={...xo,...pi},_i=K.forwardRef(function(e,t){const{className:n,value:r,render:a,keepMounted:s=!1,style:o,...i}=e,{value:l,getTabIdByPanelValue:c,orientation:u,tabActivationDirection:d,registerMountedTabPanel:p,unregisterMountedTabPanel:f}=So(),h=Uo(),g=K.useMemo(()=>({id:h,value:r}),[h,r]),{ref:m,index:v}=Yo({metadata:g}),b=r===l,{mounted:w,transitionStatus:y,setMounted:_}=function(e,t=!1,n=!1){const[r,a]=K.useState(e&&t?"idle":void 0),[s,o]=K.useState(e);return e&&!s&&(o(!0),a("starting")),e||!s||"ending"===r||n||a("ending"),e||s||"ending"!==r||a(void 0),Ps(()=>{if(!e&&s&&"ending"!==r&&n){const e=vi.request(()=>{a("ending")});return()=>{vi.cancel(e)}}},[e,s,r,n]),Ps(()=>{if(!e||t)return;const n=vi.request(()=>{a(void 0)});return()=>{vi.cancel(n)}},[t,e]),Ps(()=>{if(!e||!t)return;e&&s&&"idle"!==r&&a("starting");const n=vi.request(()=>{a("idle")});return()=>{vi.cancel(n)}},[t,e,s,r]),{mounted:s,setMounted:o,transitionStatus:r}}(b),x=!w,k=c(r),S={hidden:x,orientation:u,tabActivationDirection:d,transitionStatus:y},j=K.useRef(null),C=Se("div",e,{state:S,ref:[t,m,j],props:[{"aria-labelledby":k,hidden:x,id:h,role:"tabpanel",tabIndex:b?0:-1,inert:li(!b),[wi.index]:v},i],stateAttributesMapping:yi});return bi({open:b,ref:j,onComplete(){b||_(!1)}}),Ps(()=>{if((!x||s)&&null!=h)return p(r,h),()=>{f(r,h)}},[x,s,r,h,p,f]),s||w?C:null});var xi="data-wp-hash";function ki(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=ki();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[n,r]of t.styles)Si(e,n,r)}(document)),e.__wpStyleRuntime}function Si(e,t,n){if(!e.head)return;const r=ki();let a=r.injectedStyles.get(e);if(a||(a=new Set,r.injectedStyles.set(e,a)),a.has(t))return;if(function(e,t){if(!e.head)return!1;for(const n of e.head.querySelectorAll(`style[${xi}]`))if(n.getAttribute(xi)===t)return!0;return!1}(e,t))return void a.add(t);const s=e.createElement("style");s.setAttribute(xi,t),s.appendChild(e.createTextNode(n)),e.head.appendChild(s),a.add(t)}function ji(e,t){const n=ki();n.styles.set(e,t);for(const r of n.documents.keys())Si(r,e,t)}ji("d390e935a7","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");ji("5f8e7aa0bc","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");var Ci=(0,s.forwardRef)(function({className:e,...t},n){return(0,l.jsx)(_i,{ref:n,className:Le("_8c15fd0ed9f28ba4__div","d0541bc9dd9dc7b6__outset-ring--focus-visible",e),...t})});const Ei=K.forwardRef(function(e,t){const{className:n,defaultValue:r=0,onValueChange:a,orientation:s="horizontal",render:o,value:i,style:c,...u}=e,d=void 0!==e.defaultValue,p=K.useRef([]),[f,h]=K.useState(()=>new Map),[g,m]=function({controlled:e,default:t,name:n,state:r="value"}){const{current:a}=K.useRef(void 0!==e),[s,o]=K.useState(t);return[a?e:s,K.useCallback(e=>{a||o(e)},[])]}({controlled:i,default:r,name:"Tabs",state:"value"}),v=void 0!==i,[b,w]=K.useState(()=>new Map),y=K.useCallback(e=>{if(void 0===e)return null;for(const[t,n]of b.entries())if(null!=n&&e===(n.value??n.index))return t;return null},[b]),[_,x]=K.useState(()=>({previousValue:g,tabActivationDirection:"none"})),{previousValue:k,tabActivationDirection:S}=_;let j=S,C=!1;k!==g&&(j=Ti(k,g,s,b),C=null!=k&&null!=g&&null==y(g));const E=C?k:g,T=k!==E||S!==j;Ps(()=>{T&&x({previousValue:E,tabActivationDirection:j})},[E,T,j]);const P=Cs((e,t)=>{const n=Ti(g,e,s,b);t.activationDirection=n,a?.(e,t),t.isCanceled||m(e)}),O=Cs((e,t)=>{a?.(e,Zo(t,void 0,void 0,{activationDirection:"none"}))}),M=Cs((e,t)=>{h(n=>{if(n.get(e)===t)return n;const r=new Map(n);return r.set(e,t),r})}),A=Cs((e,t)=>{h(n=>{if(!n.has(e)||n.get(e)!==t)return n;const r=new Map(n);return r.delete(e),r})}),L=K.useCallback(e=>f.get(e),[f]),N=K.useCallback(e=>{for(const t of b.values())if(e===t?.value)return t?.id},[b]),I=K.useMemo(()=>({getTabElementBySelectedValue:y,getTabIdByPanelValue:N,getTabPanelIdByValue:L,onValueChange:P,orientation:s,registerMountedTabPanel:M,setTabMap:w,unregisterMountedTabPanel:A,tabActivationDirection:j,value:g}),[y,N,L,P,s,M,w,A,j,g]),D=K.useMemo(()=>{for(const e of b.values())if(null!=e&&e.value===g)return e},[b,g]),z=K.useMemo(()=>{for(const e of b.values())if(null!=e&&!e.disabled)return e.value},[b]),B=K.useRef(!d),R=K.useRef(d),H=K.useRef(!1);Ps(()=>{if(v)return;function e(e,t){m(e),x(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),O(e,t),B.current=!1}if(0===b.size){if(!H.current||null===g)return;return void e(null,Qo)}H.current=!0;const t=D?.disabled,n=null==D&&null!==g;if(t||g!==r||(R.current=!1),R.current&&t&&g===r)return;const a=B.current;if(t||n){const n=z??null;if(g===n)return void(B.current=!1);let r=Qo;return a?r=Jo:t&&(r="disabled"),void e(n,r)}a&&null!=D&&(O(g,Jo),B.current=!1)},[r,z,v,O,D,m,b,g]);const V=Se("div",e,{state:{orientation:s,tabActivationDirection:j},ref:t,props:u,stateAttributesMapping:xo});return(0,l.jsx)(ko.Provider,{value:I,children:(0,l.jsx)(Ms,{elementsRef:p,children:V})})});function Ti(e,t,n,r){if(null==e||null==t)return"none";let a=null,s=null;for(const[n,o]of r.entries()){if(null==o)continue;const r=o.value??o.index;if(e===r&&(a=n),t===r&&(s=n),null!=a&&null!=s)break}if(null==a||null==s)return a===s||"number"!=typeof e&&"string"!=typeof e||typeof e!=typeof t?"none":"horizontal"===n?t>e?"right":"left":t>e?"down":"up";const o=a.getBoundingClientRect(),i=s.getBoundingClientRect();if("horizontal"===n){if(i.left<o.left)return"left";if(i.left>o.left)return"right"}else{if(i.top<o.top)return"up";if(i.top>o.top)return"down"}return"none"}var Pi=(0,s.forwardRef)(function({...e},t){return(0,l.jsx)(ri,{children:(0,l.jsx)(Ei,{ref:t,...e})})}),Oi=wn.matchPath,Mi=function(e,t){if(Array.isArray(e.activeTabPaths)){var n=e.activeTabPaths.some(function(e){return e.endsWith("*")?function(e,t){var n=e.slice(0,-1).replace(/\/$/,"");return t===n||t.startsWith(n+"/")}(e,t):e===t});if(n)return!0}if(!e.path)return!1;var r="/"===e.path||!0===e.exact;return!!Oi(t,{path:e.path,exact:r})};function Ai(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Li(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ai(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ai(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ni=wn.useHistory,Ii=wn.useLocation,Di=function(e,t){return e.path||e.href||"item-".concat(t)},zi=function(e,t){return!!e.selected||(null===t?Boolean(e.href)&&window.location.href===e.href:Mi(e,t))},Bi=function(e,t){return(0,l.jsxs)(l.Fragment,{children:[e,t]})},Ri=function(e){var t=e.items,n=e.className,r=e.disableUpcoming,a=e.content,s=void 0===a?null:a,o=e.renderShell,c=void 0===o?Bi:o,u=e.children,d=void 0===u?null:u,p=Ni(),f=Ii().pathname,h=t.filter(function(e){return!e.isHiddenInTabbedNavigation}),g=h.reduce(function(e,t,n){var r,a;return zi(t,f)&&(-1===e||((null===(r=t.path)||void 0===r?void 0:r.length)||0)>((null===(a=h[e].path)||void 0===a?void 0:a.length)||0))?n:e},-1),m=g>-1?Di(h[g],g):null,v=(0,l.jsxs)("div",{className:i()("newspack-tabbed-navigation",n),children:[(0,l.jsx)($o,{activateOnFocus:!1,children:h.map(function(e,t){var n=r&&t>g,a=e.path?"#".concat(e.path):e.href;return(0,l.jsx)(ii,{value:Di(e,t),disabled:n,nativeButton:!1,render:(0,l.jsx)("a",{href:n?void 0:a,onClick:n||!e.path?void 0:function(t){return function(e,t){e.defaultPrevented||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),t.path!==f&&p.push(t.path))}(t,e)}}),children:e.label},Di(e,t))})}),d]}),b=h.map(function(e,t){var n=Di(e,t);return(0,l.jsx)(Ci,{value:n,tabIndex:-1,className:"newspack-tabbed-navigation__panel",children:n===m?s:null},n)}),w=null===m?s:null;return(0,l.jsx)(Pi,{value:m,className:"newspack-tabbed-navigation__root",children:c(v,(0,l.jsxs)(l.Fragment,{children:[b,w]}))})},Hi=function(e){var t=e.items,n=e.className,r=e.content,a=void 0===r?null:r,s=e.renderShell,o=void 0===s?Bi:s,c=e.children,u=void 0===c?null:c,d=t.filter(function(e){return!e.isHiddenInTabbedNavigation});return o((0,l.jsxs)("nav",{className:i()("newspack-tabbed-navigation","newspack-tabbed-navigation--links",n),"aria-label":(0,g.__)("Secondary navigation","newspack-plugin"),children:[d.map(function(e,t){return(0,l.jsx)("a",{href:e.href,className:"newspack-tabbed-navigation__link","aria-current":zi(e,null)?"page":void 0,children:e.label},Di(e,t))}),u]}),a)};const Vi=function(e){return e.items.some(function(e){return e.path})?(0,l.jsx)(Ri,Li({},e)):(0,l.jsx)(Hi,Li({},e))};var $i=["className","required","isWide","withMargin"];function Fi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Gi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fi(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const qi=function(e){var t=e.className,n=void 0===t?"":t,r=e.required,o=void 0!==r&&r,c=e.isWide,u=void 0!==c&&c,d=e.withMargin,p=void 0===d||d,f=Xe(e,$i),h=(0,s.useRef)(null);(0,s.useEffect)(function(){if(null!==h.current){var e=h.current.querySelector("label");e&&e.setAttribute("data-required-text",(0,g.__)("(required)","newspack-plugin"))}},[h.current]);var m=i()("newspack-text-control",{"newspack-text-control--wide":u,"newspack-text-control--with-margin":p},n);return o?(0,l.jsx)("div",{ref:h,className:"newspack-text-control--required",children:(0,l.jsx)(a.TextControl,Gi({className:m,required:o},f))}):(0,l.jsx)(a.TextControl,Gi({className:m},f))};var Ui=["className","isRight","isLeft","isCenter","noMargin"];function Wi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Xi(e,t,n){return t=O(t),P(e,Yi()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function Yi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Yi=function(){return!!e})()}var Zi=function(e){function t(){return C(this,t),Xi(this,t,arguments)}return A(t,e),T(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.isRight,r=e.isLeft,s=e.isCenter,o=e.noMargin,c=Xe(e,Ui),u=i()("newspack-waiting",t,{"is-right":n,"is-left":r,"is-center":s,"no-margin":o});return(0,l.jsx)(a.Spinner,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wi(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({className:u},c))}}])}(s.Component);const Ki=Zi;var Qi=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})}),Ji=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})}),el=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{d:"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z"})}),tl=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})});function nl(e,t,n){return t=O(t),P(e,rl()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function rl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rl=function(){return!!e})()}var al="newspack-components-web-preview-wrapper";(function(e){function t(e){var n;return C(this,t),d(n=nl(this,t,[e]),"state",{device:"desktop",loaded:!1,isPreviewVisible:!1}),d(n,"handleKeyDown",function(e){"Escape"===e.key&&n.state.isPreviewVisible&&n.closePreview()}),d(n,"closePreview",function(){var e=n.props.onClose;(void 0===e?function(){}:e)(),n.setState({isPreviewVisible:!1,loaded:!1})}),d(n,"getWebPreviewModal",function(){var e=n.props,t=e.beforeLoad,r=void 0===t?function(){}:t,o=e.url,c=e.title,u=n.state,d=u.device,p=u.loaded,f=u.isPreviewVisible;if(!n.modalDOMElement||!f)return null;var h=i()("newspack-web-preview",d,p&&"is-loaded"),m=Qi;return"desktop"===d?m=Ji:"tablet"===d&&(m=el),r(),(0,s.createPortal)((0,l.jsx)("div",{className:h,children:(0,l.jsxs)("div",{className:"newspack-web-preview__interior",children:[(0,l.jsxs)("div",{className:"newspack-web-preview__toolbar",children:[c&&(0,l.jsx)("div",{className:"newspack-web-preview__toolbar-left",children:(0,l.jsx)("h3",{children:c})}),(0,l.jsxs)("div",{className:"newspack-web-preview__toolbar-right",children:[(0,l.jsx)(a.DropdownMenu,{icon:m,label:(0,g.__)("Preview Size","newspack-plugin"),children:function(e){var t=e.onClose;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.MenuItem,{icon:"desktop"===d?b:null,role:"menuitemradio",isSelected:"desktop"===d,onClick:function(){n.setState({device:"desktop"}),t()},children:(0,g.__)("Desktop","newspack-plugin")}),(0,l.jsx)(a.MenuItem,{icon:"tablet"===d?b:null,role:"menuitemradio",isSelected:"tablet"===d,onClick:function(){n.setState({device:"tablet"}),t()},children:(0,g.__)("Tablet","newspack-plugin")}),(0,l.jsx)(a.MenuItem,{icon:"phone"===d?b:null,role:"menuitemradio",isSelected:"phone"===d,onClick:function(){n.setState({device:"phone"}),t()},children:(0,g.__)("Phone","newspack-plugin")})]})}}),(0,l.jsx)(a.Button,{onClick:n.closePreview,icon:tl,label:(0,g.__)("Close Preview","newspack-plugin")})]})]}),(0,l.jsxs)("div",{className:"newspack-web-preview__content",children:[!p&&(0,l.jsxs)("div",{className:"newspack-web-preview__is-waiting",children:[(0,l.jsx)(Ki,{isLeft:!0}),(0,g.__)("Loading…","newspack-plugin")]}),(0,l.jsx)("iframe",{ref:n.iframeRef,title:"web-preview",src:o,onLoad:function(){n.setState({loaded:!0}),n.props.onLoad(n.iframeRef.current)}})]})]})}),n.modalDOMElement)}),d(n,"showPreview",function(){n.setState({isPreviewVisible:!0})}),n.iframeRef=(0,s.createRef)(),n}return A(t,e),T(t,[{key:"componentDidMount",value:function(){var e=document.getElementById(al);this.modalDOMElement=e||document.createElement("div"),e||(this.modalDOMElement.id=al,document.body.appendChild(this.modalDOMElement))}},{key:"componentDidUpdate",value:function(e,t){!0===this.state.isPreviewVisible?(document.body.classList.add("newspack-web-preview--open"),!1===t.isPreviewVisible&&document.addEventListener("keydown",this.handleKeyDown)):(document.body.classList.remove("newspack-web-preview--open"),!0===t.isPreviewVisible&&document.removeEventListener("keydown",this.handleKeyDown))}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown),document.body.classList.remove("newspack-web-preview--open")}},{key:"render",value:function(){var e=this.props,t=e.label,n=e.variant,r=e.renderButton;return(0,l.jsxs)(s.Fragment,{children:[r?r({showPreview:this.showPreview}):(0,l.jsx)(a.Button,{variant:n,onClick:this.showPreview,tabIndex:"0",children:t}),this.getWebPreviewModal()]})}}])}(s.Component)).defaultProps={url:"//newspack.com",label:(0,g.__)("Preview","newspack-plugin"),onLoad:function(){}};var sl=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z"})}),ol=n(2154),il=n.n(ol),ll=n(2438),cl=n.n(ll),ul=n(483),dl=n.n(ul),pl=function(e){return function(t){return{type:e,payload:t}}};function fl(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function s(n,r,a,s){var l=r&&r.prototype instanceof i?r:i,c=Object.create(l.prototype);return hl(c,"_invoke",function(n,r,a){var s,i,l,c=0,u=a||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return s=t,i=0,l=e,p.n=n,o}};function f(n,r){for(i=n,l=r,t=0;!d&&c&&!a&&t<u.length;t++){var a,s=u[t],f=p.p,h=s[2];n>3?(a=h===r)&&(l=s[(i=s[4])?5:(i=3,3)],s[4]=s[5]=e):s[0]<=f&&((a=n<2&&f<s[1])?(i=0,p.v=r,p.n=s[1]):f<h&&(a=n<3||s[0]>r||r>h)&&(s[4]=n,s[5]=r,p.n=h,i=0))}if(a||n>1)return o;throw d=!0,r}return function(a,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&f(u,h),i=u,l=h;(t=i<2?e:l)||!d;){s||(i?i<3?(i>1&&(p.n=-1),f(i,l)):p.n=l:p.v=l);try{if(c=2,s){if(i||(a="next"),t=s[a]){if(!(t=t.call(s,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,i<2&&(i=0)}else 1===i&&(t=s.return)&&t.call(s),i<2&&(l=TypeError("The iterator does not provide a '"+a+"' method"),i=1);s=e}else if((t=(d=p.n<0)?l:n.call(r,p))!==o)break}catch(t){s=e,i=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,a,s),!0),c}var o={};function i(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(hl(t={},r,function(){return this}),t),d=c.prototype=i.prototype=Object.create(u);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,hl(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,hl(d,"constructor",c),hl(c,"constructor",l),l.displayName="GeneratorFunction",hl(c,a,"GeneratorFunction"),hl(d),hl(d,a,"Generator"),hl(d,r,function(){return this}),hl(d,"toString",function(){return"[object Generator]"}),(fl=function(){return{w:s,m:p}})()}function hl(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}hl=function(e,t,n,r){function s(t,n){hl(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(s("next",0),s("throw",1),s("return",2))},hl(e,t,n,r)}function gl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ml(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gl(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var vl="newspack/wizards",bl={headerData:{actions:[],backNav:"",badges:[],sectionDescription:"",sectionName:"",sectionTitle:""},isLoading:!1,isQuietLoading:!1,apiData:{},notices:[],error:null},wl=function(e){return JSON.parse(JSON.stringify(e))},yl={setHeaderData:pl("SET_HEADER_DATA"),resetHeaderData:pl("RESET_HEADER_DATA"),startLoadingData:pl("START_LOADING_DATA"),finishLoadingData:pl("FINISH_LOADING_DATA"),fetchFromAPI:pl("FETCH_FROM_API"),setAPIDataForWizard:pl("SET_API_DATA"),updateWizardSettings:pl("UPDATE_WIZARD_SETTINGS"),addNotice:pl("ADD_NOTICE"),removeNotice:pl("REMOVE_NOTICE"),resetNotices:pl("RESET_NOTICES"),setError:pl("SET_ERROR"),saveWizardSettings:function(e){var t=e.slug,n=e.section,r=void 0===n?"":n,a=e.payloadPath,s=void 0!==a&&a,o=e.auxData,i=void 0===o?{}:o,l=e.updatePayload,c=void 0===l?null:l;return fl().m(function e(){var n,a,o;return fl().w(function(e){for(;;)switch(e.n){case 0:if(!c){e.n=1;break}return e.n=1,yl.updateWizardSettings(ml({slug:t},c));case 1:return n=(0,qr.select)(vl).getWizardAPIData(t),a=s?cl()(n,s):n,e.n=2,yl.fetchFromAPI({path:"/newspack/v1/wizard/".concat(t,"/").concat(r),method:"POST",data:ml(ml({},a),i),isQuietFetch:!0});case 2:if(o=e.v,dl()(o)||o.error){e.n=3;break}return e.a(2,yl.setAPIDataForWizard({slug:t,data:o}));case 3:return e.a(2)}},e)})()},wizardApiFetch:fl().m(function e(t){var n;return fl().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,yl.fetchFromAPI(t);case 1:return n=e.v,e.a(2,n)}},e)})},_l=(0,qr.createReduxStore)(vl,{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bl,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.payload,a=void 0===r?{}:r;switch(n){case"SET_HEADER_DATA":return ml(ml({},e),{},{headerData:ml(ml({},e.headerData),a)});case"RESET_HEADER_DATA":return ml(ml({},e),{},{headerData:ml({},bl.headerData)});case"START_LOADING_DATA":return a.isQuietLoading?ml(ml({},e),{},{isQuietLoading:!0}):ml(ml({},e),{},{isLoading:!0});case"FINISH_LOADING_DATA":return ml(ml({},e),{},{isLoading:!1,isQuietLoading:!1});case"SET_API_DATA":return ml(ml({},e),{},{apiData:il()(wl(e.apiData),[a.slug],a.data)});case"UPDATE_WIZARD_SETTINGS":return ml(ml({},e),{},{apiData:il()(wl(e.apiData),[a.slug].concat(j(a.path)),a.value)});case"ADD_NOTICE":return ml(ml({},e),{},{notices:[].concat(j(e.notices),[a])});case"REMOVE_NOTICE":return ml(ml({},e),{},{notices:e.notices.filter(function(e){return e.id!==a})});case"SET_ERROR":return ml(ml({},e),{},{error:a});case"RESET_NOTICES":return ml(ml({},e),{},{notices:bl.notices});default:return e}},actions:yl,selectors:{getHeaderData:function(e){return e.headerData},isLoading:function(e){return e.isLoading},isQuietLoading:function(e){return e.isQuietLoading},getWizardAPIData:function(e,t){return e.apiData[t]||{}},getWizardData:function(e,t){var n;return null!==(n=e.apiData[t])&&void 0!==n?n:{}},getNotices:function(e){return e.notices},getError:function(e){return e.error}},controls:{FETCH_FROM_API:function(e){var t=e.payload,n=t.isLocalError,r=void 0!==n&&n,a=t.isQuietFetch,s=void 0!==a&&a;return(0,qr.dispatch)(vl).startLoadingData({isQuietLoading:Boolean(s)}),V()(e.payload).then(function(e){return(0,qr.dispatch)(vl).setError(null),e}).catch(function(e){if(r)throw e;(0,qr.dispatch)(vl).setError(e)}).finally(function(e){return(0,qr.dispatch)(vl).finishLoadingData(),e})}},resolvers:{getWizardAPIData:fl().m(function e(t){var n;return fl().w(function(e){for(;;)switch(e.n){case 0:if(!t){e.n=2;break}return e.n=1,yl.fetchFromAPI({path:"/newspack/v1/wizard/".concat(t)});case 1:return n=e.v,e.a(2,yl.setAPIDataForWizard({slug:t,data:n}));case 2:return e.a(2,yl.finishLoadingData())}},e)})}});const xl=function(){return(0,qr.register)(_l)};(Object.getOwnPropertyDescriptor(xl,"name")||{}).writable||Object.defineProperty(xl,"name",{value:"default",configurable:!0});var kl=["children","type","actions"];function Sl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sl(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const Cl=function(e){var t=e.children,n=e.type,r=e.actions,s=void 0===r?[]:r,o=Xe(e,kl),c=i()("newspack-wizard__snackbar",o.className),u="error"===n?"assertive":"polite",d=(0,qr.useDispatch)(vl),p=d.removeNotice,f=d.resetNotices;return(0,l.jsx)(a.Snackbar,jl(jl({},o),{},{className:c,politeness:u,onRemove:function(){o.onRemove&&o.onRemove(),o.id?p(o.id):f()},actions:s,children:t}))},El=function(){var e=(0,qr.useSelect)(function(e){return e(vl).getError()});if(!e)return null;var t=function(e){var t=e.data,n=e.message,r=e.code,a="fatal";return t&&"level"in t?a=t.level:"rest_invalid_param"===r&&(a="notice"),{message:n,level:a}}(e),n=t.level,r=t.message;if("fatal"===n){var s="undefined"!=typeof newspack_urls&&newspack_urls.dashboard;return(0,l.jsxs)(Ca,{title:(0,g.__)("Unrecoverable error"),onRequestClose:s?function(){return window.location=s}:void 0,children:[(0,l.jsx)(Ia,{noticeText:r,isError:!0,rawHTML:!0}),s&&(0,l.jsx)(a.__experimentalHStack,{justify:"flex-end",spacing:4,wrap:!0,className:"newspack-modal__footer",children:(0,l.jsx)(Cn,{isPrimary:!0,href:s,children:(0,g.__)("Return to Dashboard","newspack-plugin")})})]})}return(0,l.jsx)(Ia,{isError:!0,className:"newspack-wizard__above-header",noticeText:r,rawHTML:!0})};function Tl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Pl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tl(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}xl();var Ol={chevronLeft:is,category:sl,moreVertical:Tn},Ml=wn.HashRouter,Al=wn.Redirect,Ll=wn.Route,Nl=wn.Switch,Il=wn.useLocation,Dl=function(){var e=Il(),t=(0,qr.useDispatch)(vl).resetHeaderData;return(0,s.useEffect)(function(){t(),window.scrollTo(0,0)},[e.pathname,t]),null},zl=function(e){var t=e.hideHeader,n=e.headerText,r=e.sections,a=e.sectionName,o=e.subTitle,i=e.actions,c=e.tabbedNavigation,u=e.children,d=Il().pathname;if(t)return(0,s.isValidElement)(c)?(0,s.cloneElement)(c,{content:u}):u;var p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return null!=e&&e.length&&(e.find(function(e){return Mi(e,t)})||e[0]).breadcrumbs||[]}(r,d);return!p.length&&n&&(p=[{label:n}]),p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t?(Array.isArray(t)?t:[{label:t}]).filter(function(e){return null==e?void 0:e.label}).reduce(function(e,t){var n;return(null===(n=e[e.length-1])||void 0===n?void 0:n.label)===t.label?e:[].concat(j(e),[t])},e):e}(p,a),(0,l.jsx)(Ra,{breadcrumbItems:p,subTitle:o,actions:i,tabbedNavigation:c,children:u})};(0,s.forwardRef)(function(e,t){var n=e.sections,r=void 0===n?[]:n,o=e.headerText,c=e.apiSlug,u=e.sharedProps,d=void 0===u?{}:u,p=e.subHeaderText,f=e.hasSimpleFooter,m=e.className,v=e.renderAboveSections,b=e.requiredPlugins,w=void 0===b?[]:b,y=e.isInitialFetchTriggered,_=void 0===y||y,x=e.hideHeader,k=void 0!==x&&x,S=(0,qr.useSelect)(function(e){return e(vl).isLoading()}),j=(0,qr.useSelect)(function(e){return e(vl).isQuietLoading()}),C=(0,qr.useSelect)(function(e){return e(vl).getHeaderData()}),E=(0,qr.useSelect)(function(e){return e(vl).getNotices()}),T=C.actions,P=C.backNav,O=C.badges,M=C.sectionDescription,A=C.sectionMenu,L=C.sectionName,N=C.sectionTitle,I=C.sectionPrimaryAction,D=C.sectionSecondaryAction,z=null==T?void 0:T.filter(function(e){return"primary"===e.type||"secondary"===e.type}),B=null==T?void 0:T.filter(function(e){return"more"===e.type});(0,qr.useSelect)(function(e){return _&&e(vl).getWizardAPIData(c)});var R=r.filter(function(e){return!e.isHidden}),H=h((0,s.useState)(0===w.length),2),V=H[0],$=H[1];V||(o=w.length>1?(0,g.__)("Required plugins","newspack-plugin"):(0,g.__)("Required plugin","newspack-plugin"),R=[{path:"/",render:function(){return(0,l.jsx)(qa,{plugins:w,onStatus:function(e){var t=e.complete;return $(t)}})}}]);var F=V?r:R,G=R.length>1&&(0,l.jsx)(Vi,{items:R,children:(0,l.jsx)(El,{})}),q=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ua,{}),r.length>1&&(0,l.jsx)(Dl,{}),(0,l.jsx)("div",{className:"newspack-wizard__main",children:(0,l.jsxs)(Nl,{children:[F.map(function(e,t){var n,r=e.render,a=e.props||{};return(0,l.jsx)(Ll,{exact:null!==(n=e.exact)&&void 0!==n&&n,path:e.path,render:function(t){return(0,l.jsxs)("div",{className:i()("newspack-wizard__content",m,{"newspack-wizard__content--full-width":e.fullWidth}),children:["function"==typeof v?v():null,(N||e.title)&&(0,l.jsx)(ls,{className:"newspack-wizard__section-header",backNav:P||e.backNav,title:N||e.title,description:M||e.description,badges:O||e.badges,menu:A||e.menu,primaryAction:I||e.primaryAction,secondaryAction:D||e.secondaryAction,heading:2,noMargin:!0}),(0,l.jsx)(r,Pl(Pl(Pl({},t),a),d))]})}},t)}),(0,l.jsx)(Al,{to:R[0].path})]})})]}),U=(null==T?void 0:T.length)>0?(0,l.jsxs)(l.Fragment,{children:[z.map(function(e,t){return(0,l.jsx)(Cn,{className:"newspack-wizard__actions__main",href:e.href,icon:(n=e.icon,"string"==typeof n?Ol[n]||null:n),variant:e.type,onClick:e.action,disabled:e.disabled||!1,isDestructive:e.destructive||!1,children:e.label},t);var n}),(0,l.jsx)(a.DropdownMenu,{className:0===(null==B?void 0:B.length)?"newspack-wizard__actions__more--primary-only":"",icon:Tn,label:(0,g.__)("More","newspack-plugin"),popoverProps:{className:"newspack-wizard__actions__more"},children:function(){return T.reduce(function(e,t){return(t.separator||0===e.length)&&e.push([]),e[e.length-1].push(t),e},[]).map(function(e,t){return(0,l.jsx)(a.MenuGroup,{children:e.map(function(e,t){return(0,l.jsx)(a.MenuItem,{className:"primary"===e.type||"secondary"===e.type?"newspack-wizard__actions__more__main":"newspack-wizard__actions__more__more",icon:e.icon,href:e.href,onClick:e.action,disabled:e.disabled||!1,isDestructive:e.destructive||!1,children:e.label},t)})},t)})}})]}):void 0;return(0,l.jsxs)("div",{ref:t,children:[(0,l.jsxs)("div",{className:i()(S?"newspack-wizard__is-loading":"newspack-wizard__is-loaded",{"newspack-wizard__is-loading-quiet":j}),children:[(0,l.jsxs)(Ml,{hashType:"slash",children:[newspack_aux_data.is_debug_mode&&(0,l.jsx)(Ia,{debugMode:!0}),(0,l.jsx)(zl,{hideHeader:k,headerText:o,sections:F,sectionName:L,subTitle:p,actions:U,tabbedNavigation:G,children:q})]}),(null==E?void 0:E.length)>0&&(0,l.jsx)("div",{className:"newspack-wizard__snackbar-list",children:E.map(function(e,t){return(0,l.jsx)(Cl,{id:e.id,type:e.type,actions:e.actions,children:e.message},e.id||t)})})]}),!S&&(0,l.jsx)(Jr,{simple:f})]})}),n(860),n(9323),n(9589)},9551(e,t,n){"use strict";n.d(t,{dM:()=>j,Ay:()=>O,$A:()=>S,MD:()=>k});var r=n(1455),a=n.n(r),s=n(4715),o=n(4997),i=n(6427);const l=window.wp.coreData;var c=n(6087),u=n(7143),d=n(8537),p=n(509),f=n(8618),h=n(6533),g=n(554),m=n(7723),v=n(3832),b=n(8492),w=n(1727);const y=(0,c.createContext)(null);"undefined"!=typeof window&&(window.NewspackAuthorContext=y);var _=n(715),x=n(790);window.__newspackAuthorsByBlock=window.__newspackAuthorsByBlock||{},"function"==typeof o.registerBlockBindingsSource&&(0,o.registerBlockBindingsSource)({name:"newspack-blocks/author",label:(0,m.__)("Author Profile","newspack-blocks"),getValues({bindings:e,clientId:t,select:n}){const r=n("core/block-editor").getBlockParents(t),a=window.__newspackAuthorsByBlock,s=r.find(e=>a[e]),o=s&&a[s]||{},i="placeholder"===o.id;return Object.fromEntries(Object.entries(e).map(([e,{args:t}])=>{const n=t?.key;if(!n||i)return[e,""];if("url"===n||"archive_url"===n)return[e,o.url||""];if("archive_link_text"===n){const t=o.name?(0,m.sprintf)(/* translators: %s: author name */ /* translators: %s: author name */
12
+ /* translators: accessibility text appended to link text */(0,g.__)("(opens in a new tab)")})]})})})});const Ue=function(e){var t=e.items,n=void 0===t?[]:t;if(!n.length)return null;var r=n.slice(0,-1),a=n[n.length-1];return(0,l.jsx)("nav",{"aria-label":(0,g.__)("Breadcrumbs","newspack-plugin"),children:(0,l.jsxs)(Me,{render:(0,l.jsx)("ul",{}),direction:"row",align:"center",className:"newspack-breadcrumbs__list",children:[r.map(function(e,t){return(0,l.jsxs)("li",{children:[e.url?(0,l.jsx)(Re,{variant:"body-lg",render:(0,l.jsx)(qe,{tone:"neutral",render:(0,l.jsx)("a",{href:e.url})}),children:e.label}):(0,l.jsx)(Re,{variant:"body-lg",children:e.label}),(0,l.jsx)(Re,{variant:"body-lg","aria-hidden":"true",className:"newspack-breadcrumbs__separator",children:"/"})]},e.url||t)}),a&&a.label&&(0,l.jsx)("li",{children:(0,l.jsx)(Re,{variant:"heading-lg",render:(0,l.jsx)("h1",{}),className:"newspack-breadcrumbs__current",children:a.label})})]})})};var We=n(4722);function Xe(e,t){if(null==e)return{};var n,r,a=(0,We.A)(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Ye(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,M(e,t)}var Ze=n(5821),Ke=n.n(Ze),Qe=n(4347);function Je(e){return"/"===e.charAt(0)}function et(e,t){for(var n=t,r=n+1,a=e.length;r<a;n+=1,r+=1)e[n]=e[r];e.pop()}function tt(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}const nt=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every(function(t,r){return e(t,n[r])});if("object"==typeof t||"object"==typeof n){var r=tt(t),a=tt(n);return r!==t||a!==n?e(r,a):Object.keys(Object.assign({},t,n)).every(function(r){return e(t[r],n[r])})}return!1};function rt(e,t){if(!e)throw new Error("Invariant failed")}function at(e){return"/"===e.charAt(0)?e:"/"+e}function st(e){return"/"===e.charAt(0)?e.substr(1):e}function ot(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function it(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function lt(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function ct(e,t,n,r){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var s=t.indexOf("?");return-1!==s&&(n=t.substr(s),t=t.substr(0,s)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),a.state=t):(void 0===(a=(0,Qe.A)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(a.key=n),r?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],a=t&&t.split("/")||[],s=e&&Je(e),o=t&&Je(t),i=s||o;if(e&&Je(e)?a=r:r.length&&(a.pop(),a=a.concat(r)),!a.length)return"/";if(a.length){var l=a[a.length-1];n="."===l||".."===l||""===l}else n=!1;for(var c=0,u=a.length;u>=0;u--){var d=a[u];"."===d?et(a,u):".."===d?(et(a,u),c++):c&&(et(a,u),c--)}if(!i)for(;c--;c)a.unshift("..");!i||""===a[0]||a[0]&&Je(a[0])||a.unshift("");var p=a.join("/");return n&&"/"!==p.substr(-1)&&(p+="/"),p}(a.pathname,r.pathname)):a.pathname=r.pathname:a.pathname||(a.pathname="/"),a}function ut(){var e=null,t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var s="function"==typeof e?e(t,n):e;"string"==typeof s?"function"==typeof r?r(s,a):a(!0):a(!1!==s)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter(function(e){return e!==r})}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach(function(e){return e.apply(void 0,n)})}}}var dt=!("undefined"==typeof window||!window.document||!window.document.createElement);function pt(e,t){t(window.confirm(e))}var ft="popstate",ht="hashchange";function gt(){try{return window.history.state||{}}catch(e){return{}}}var mt="hashchange",vt={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+st(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:st,decodePath:at},slash:{encodePath:at,decodePath:at}};function bt(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function wt(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function yt(e){window.location.replace(bt(window.location.href)+"#"+e)}function _t(e,t,n){return Math.min(Math.max(e,t),n)}var xt=n(634),kt=n.n(xt),St=(n(7020),n(4674)),jt=n.n(St),Ct=1073741823,Et="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:{},Tt=J().createContext||function(e,t){var n,r,a,s="__create-react-context-"+((Et[a="__global_unique_id__"]=(Et[a]||0)+1)+"__"),o=function(e){function n(){for(var t,n,r,a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];return(t=e.call.apply(e,[this].concat(s))||this).emitter=(n=t.props.value,r=[],{on:function(e){r.push(e)},off:function(e){r=r.filter(function(t){return t!==e})},get:function(){return n},set:function(e,t){n=e,r.forEach(function(e){return e(n,t)})}}),t}Ye(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[s]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,a=e.value;!function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(r,a)?(n="function"==typeof t?t(r,a):Ct,0!=(n|=0)&&this.emitter.set(e.value,n)):n=0}},r.render=function(){return this.props.children},n}(J().Component);o.childContextTypes=((n={})[s]=Ke().object.isRequired,n);var i=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(e=t.call.apply(t,[this].concat(r))||this).observedBits=void 0,e.state={value:e.getValue()},e.onUpdate=function(t,n){(0|e.observedBits)&n&&e.setState({value:e.getValue()})},e}Ye(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?Ct:t},r.componentDidMount=function(){this.context[s]&&this.context[s].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?Ct:e},r.componentWillUnmount=function(){this.context[s]&&this.context[s].off(this.onUpdate)},r.getValue=function(){return this.context[s]?this.context[s].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(J().Component);return i.contextTypes=((r={})[s]=Ke().object,r),{Provider:o,Consumer:i}},Pt=function(e){var t=Tt();return t.displayName=e,t},Ot=Pt("Router-History"),Mt=Pt("Router"),At=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen(function(e){n._pendingLocation=e})),n}Ye(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){var e=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen(function(t){e._isMounted&&e.setState({location:t})})),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return J().createElement(Mt.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},J().createElement(Ot.Provider,{children:this.props.children||null,value:this.props.history}))},t}(J().Component),Lt=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=function(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,r=t.initialEntries,a=void 0===r?["/"]:r,s=t.initialIndex,o=void 0===s?0:s,i=t.keyLength,l=void 0===i?6:i,c=ut();function u(e){(0,Qe.A)(m,e),m.length=m.entries.length,c.notifyListeners(m.location,m.action)}function d(){return Math.random().toString(36).substr(2,l)}var p=_t(o,0,a.length-1),f=a.map(function(e){return ct(e,void 0,"string"==typeof e?d():e.key||d())}),h=lt;function g(e){var t=_t(m.index+e,0,m.entries.length-1),r=m.entries[t];c.confirmTransitionTo(r,"POP",n,function(e){e?u({action:"POP",location:r,index:t}):u()})}var m={length:f.length,action:"POP",location:f[p],index:p,entries:f,createHref:h,push:function(e,t){var r="PUSH",a=ct(e,t,d(),m.location);c.confirmTransitionTo(a,r,n,function(e){if(e){var t=m.index+1,n=m.entries.slice(0);n.length>t?n.splice(t,n.length-t,a):n.push(a),u({action:r,location:a,index:t,entries:n})}})},replace:function(e,t){var r="REPLACE",a=ct(e,t,d(),m.location);c.confirmTransitionTo(a,r,n,function(e){e&&(m.entries[m.index]=a,u({action:r,location:a}))})},go:g,goBack:function(){g(-1)},goForward:function(){g(1)},canGo:function(e){var t=m.index+e;return t>=0&&t<m.entries.length},block:function(e){return void 0===e&&(e=!1),c.setPrompt(e)},listen:function(e){return c.appendListener(e)}};return m}(t.props),t}return Ye(t,e),t.prototype.render=function(){return J().createElement(At,{history:this.history,children:this.props.children})},t}(J().Component),Nt=function(e){function t(){return e.apply(this,arguments)||this}Ye(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(e){this.props.onUpdate&&this.props.onUpdate.call(this,this,e)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},t}(J().Component);function It(e){var t=e.message,n=e.when,r=void 0===n||n;return J().createElement(Mt.Consumer,null,function(e){if(e||rt(!1),!r||e.staticContext)return null;var n=e.history.block;return J().createElement(Nt,{onMount:function(e){e.release=n(t)},onUpdate:function(e,r){r.message!==t&&(e.release(),e.release=n(t))},onUnmount:function(e){e.release()},message:t})})}var Dt={},zt=0;function Bt(e,t){return void 0===e&&(e="/"),void 0===t&&(t={}),"/"===e?e:function(e){if(Dt[e])return Dt[e];var t=kt().compile(e);return zt<1e4&&(Dt[e]=t,zt++),t}(e)(t,{pretty:!0})}function Rt(e){var t=e.computedMatch,n=e.to,r=e.push,a=void 0!==r&&r;return J().createElement(Mt.Consumer,null,function(e){e||rt(!1);var r=e.history,s=e.staticContext,o=a?r.push:r.replace,i=ct(t?"string"==typeof n?Bt(n,t.params):(0,Qe.A)({},n,{pathname:Bt(n.pathname,t.params)}):n);return s?(o(i),null):J().createElement(Nt,{onMount:function(){o(i)},onUpdate:function(e,t){var n=ct(t.to);(function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&nt(e.state,t.state)})(n,(0,Qe.A)({},i,{key:n.key}))||o(i)},to:n})})}var Ht={},Vt=0;function $t(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,a=n.exact,s=void 0!==a&&a,o=n.strict,i=void 0!==o&&o,l=n.sensitive,c=void 0!==l&&l;return[].concat(r).reduce(function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=Ht[n]||(Ht[n]={});if(r[e])return r[e];var a=[],s={regexp:kt()(e,a,t),keys:a};return Vt<1e4&&(r[e]=s,Vt++),s}(n,{end:s,strict:i,sensitive:c}),a=r.regexp,o=r.keys,l=a.exec(e);if(!l)return null;var u=l[0],d=l.slice(1),p=e===u;return s&&!p?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:p,params:o.reduce(function(e,t,n){return e[t.name]=d[n],e},{})}},null)}var Ft=function(e){function t(){return e.apply(this,arguments)||this}return Ye(t,e),t.prototype.render=function(){var e=this;return J().createElement(Mt.Consumer,null,function(t){t||rt(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?$t(n.pathname,e.props):t.match,a=(0,Qe.A)({},t,{location:n,match:r}),s=e.props,o=s.children,i=s.component,l=s.render;return Array.isArray(o)&&function(e){return 0===J().Children.count(e)}(o)&&(o=null),J().createElement(Mt.Provider,{value:a},a.match?o?"function"==typeof o?o(a):o:i?J().createElement(i,a):l?l(a):null:"function"==typeof o?o(a):null)})},t}(J().Component);function Gt(e){return"/"===e.charAt(0)?e:"/"+e}function qt(e,t){if(!e)return t;var n=Gt(e);return 0!==t.pathname.indexOf(n)?t:(0,Qe.A)({},t,{pathname:t.pathname.substr(n.length)})}function Ut(e){return"string"==typeof e?e:lt(e)}function Wt(e){return function(){rt(!1)}}function Xt(){}var Yt=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handlePush=function(e){return t.navigateTo(e,"PUSH")},t.handleReplace=function(e){return t.navigateTo(e,"REPLACE")},t.handleListen=function(){return Xt},t.handleBlock=function(){return Xt},t}Ye(t,e);var n=t.prototype;return n.navigateTo=function(e,t){var n=this.props,r=n.basename,a=void 0===r?"":r,s=n.context,o=void 0===s?{}:s;o.action=t,o.location=function(e,t){return e?(0,Qe.A)({},t,{pathname:Gt(e)+t.pathname}):t}(a,ct(e)),o.url=Ut(o.location)},n.render=function(){var e=this.props,t=e.basename,n=void 0===t?"":t,r=e.context,a=void 0===r?{}:r,s=e.location,o=void 0===s?"/":s,i=(0,We.A)(e,["basename","context","location"]),l={createHref:function(e){return Gt(n+Ut(e))},action:"POP",location:qt(n,ct(o)),push:this.handlePush,replace:this.handleReplace,go:Wt(),goBack:Wt(),goForward:Wt(),listen:this.handleListen,block:this.handleBlock};return J().createElement(At,(0,Qe.A)({},i,{history:l,staticContext:a}))},t}(J().Component),Zt=function(e){function t(){return e.apply(this,arguments)||this}return Ye(t,e),t.prototype.render=function(){var e=this;return J().createElement(Mt.Consumer,null,function(t){t||rt(!1);var n,r,a=e.props.location||t.location;return J().Children.forEach(e.props.children,function(e){if(null==r&&J().isValidElement(e)){n=e;var s=e.props.path||e.props.from;r=s?$t(a.pathname,(0,Qe.A)({},e.props,{path:s})):t.match}}),r?J().cloneElement(n,{location:a,computedMatch:r}):null})},t}(J().Component);function Kt(e){var t="withRouter("+(e.displayName||e.name)+")",n=function(t){var n=t.wrappedComponentRef,r=(0,We.A)(t,["wrappedComponentRef"]);return J().createElement(Mt.Consumer,null,function(t){return t||rt(!1),J().createElement(e,(0,Qe.A)({},r,t,{ref:n}))})};return n.displayName=t,n.WrappedComponent=e,jt()(n,e)}var Qt=J().useContext;function Jt(){return Qt(Ot)}function en(){return Qt(Mt).location}function tn(){var e=Qt(Mt).match;return e?e.params:{}}function nn(e){var t=en(),n=Qt(Mt).match;return e?$t(t.pathname,e):n}function rn(e,t){return rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rn(e,t)}function an(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,rn(e,t)}function sn(){return sn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sn.apply(null,arguments)}function on(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var ln=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=function(e){void 0===e&&(e={}),dt||rt(!1);var t,n=window.history,r=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,a=!(-1===window.navigator.userAgent.indexOf("Trident")),s=e,o=s.forceRefresh,i=void 0!==o&&o,l=s.getUserConfirmation,c=void 0===l?pt:l,u=s.keyLength,d=void 0===u?6:u,p=e.basename?it(at(e.basename)):"";function f(e){var t=e||{},n=t.key,r=t.state,a=window.location,s=a.pathname+a.search+a.hash;return p&&(s=ot(s,p)),ct(s,r,n)}function h(){return Math.random().toString(36).substr(2,d)}var g=ut();function m(e){(0,Qe.A)(T,e),T.length=n.length,g.notifyListeners(T.location,T.action)}function v(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||y(f(e.state))}function b(){y(f(gt()))}var w=!1;function y(e){w?(w=!1,m()):g.confirmTransitionTo(e,"POP",c,function(t){t?m({action:"POP",location:e}):function(e){var t=T.location,n=x.indexOf(t.key);-1===n&&(n=0);var r=x.indexOf(e.key);-1===r&&(r=0);var a=n-r;a&&(w=!0,S(a))}(e)})}var _=f(gt()),x=[_.key];function k(e){return p+lt(e)}function S(e){n.go(e)}var j=0;function C(e){1===(j+=e)&&1===e?(window.addEventListener(ft,v),a&&window.addEventListener(ht,b)):0===j&&(window.removeEventListener(ft,v),a&&window.removeEventListener(ht,b))}var E=!1,T={length:n.length,action:"POP",location:_,createHref:k,push:function(e,t){var a="PUSH",s=ct(e,t,h(),T.location);g.confirmTransitionTo(s,a,c,function(e){if(e){var t=k(s),o=s.key,l=s.state;if(r)if(n.pushState({key:o,state:l},null,t),i)window.location.href=t;else{var c=x.indexOf(T.location.key),u=x.slice(0,c+1);u.push(s.key),x=u,m({action:a,location:s})}else window.location.href=t}})},replace:function(e,t){var a="REPLACE",s=ct(e,t,h(),T.location);g.confirmTransitionTo(s,a,c,function(e){if(e){var t=k(s),o=s.key,l=s.state;if(r)if(n.replaceState({key:o,state:l},null,t),i)window.location.replace(t);else{var c=x.indexOf(T.location.key);-1!==c&&(x[c]=s.key),m({action:a,location:s})}else window.location.replace(t)}})},go:S,goBack:function(){S(-1)},goForward:function(){S(1)},block:function(e){void 0===e&&(e=!1);var t=g.setPrompt(e);return E||(C(1),E=!0),function(){return E&&(E=!1,C(-1)),t()}},listen:function(e){var t=g.appendListener(e);return C(1),function(){C(-1),t()}}};return T}(t.props),t}return an(t,e),t.prototype.render=function(){return J().createElement(At,{history:this.history,children:this.props.children})},t}(J().Component),cn=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=function(e){void 0===e&&(e={}),dt||rt(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),r=n.getUserConfirmation,a=void 0===r?pt:r,s=n.hashType,o=void 0===s?"slash":s,i=e.basename?it(at(e.basename)):"",l=vt[o],c=l.encodePath,u=l.decodePath;function d(){var e=u(wt());return i&&(e=ot(e,i)),ct(e)}var p=ut();function f(e){(0,Qe.A)(j,e),j.length=t.length,p.notifyListeners(j.location,j.action)}var h=!1,g=null;function m(){var e=wt(),t=c(e);if(e!==t)yt(t);else{var n=d(),r=j.location;if(!h&&function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash}(r,n))return;if(g===lt(n))return;g=null,function(e){h?(h=!1,f()):p.confirmTransitionTo(e,"POP",a,function(t){t?f({action:"POP",location:e}):function(e){var t=j.location,n=y.lastIndexOf(lt(t));-1===n&&(n=0);var r=y.lastIndexOf(lt(e));-1===r&&(r=0);var a=n-r;a&&(h=!0,_(a))}(e)})}(n)}}var v=wt(),b=c(v);v!==b&&yt(b);var w=d(),y=[lt(w)];function _(e){t.go(e)}var x=0;function k(e){1===(x+=e)&&1===e?window.addEventListener(mt,m):0===x&&window.removeEventListener(mt,m)}var S=!1,j={length:t.length,action:"POP",location:w,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=bt(window.location.href)),n+"#"+c(i+lt(e))},push:function(e,t){var n="PUSH",r=ct(e,void 0,void 0,j.location);p.confirmTransitionTo(r,n,a,function(e){if(e){var t=lt(r),a=c(i+t);if(wt()!==a){g=t,function(e){window.location.hash=e}(a);var s=y.lastIndexOf(lt(j.location)),o=y.slice(0,s+1);o.push(t),y=o,f({action:n,location:r})}else f()}})},replace:function(e,t){var n="REPLACE",r=ct(e,void 0,void 0,j.location);p.confirmTransitionTo(r,n,a,function(e){if(e){var t=lt(r),a=c(i+t);wt()!==a&&(g=t,yt(a));var s=y.indexOf(lt(j.location));-1!==s&&(y[s]=t),f({action:n,location:r})}})},go:_,goBack:function(){_(-1)},goForward:function(){_(1)},block:function(e){void 0===e&&(e=!1);var t=p.setPrompt(e);return S||(k(1),S=!0),function(){return S&&(S=!1,k(-1)),t()}},listen:function(e){var t=p.appendListener(e);return k(1),function(){k(-1),t()}}};return j}(t.props),t}return an(t,e),t.prototype.render=function(){return J().createElement(At,{history:this.history,children:this.props.children})},t}(J().Component),un=function(e,t){return"function"==typeof e?e(t):e},dn=function(e,t){return"string"==typeof e?ct(e,null,null,t):e},pn=function(e){return e},fn=J().forwardRef;void 0===fn&&(fn=pn);var hn=fn(function(e,t){var n=e.innerRef,r=e.navigate,a=e.onClick,s=on(e,["innerRef","navigate","onClick"]),o=s.target,i=sn({},s,{onClick:function(e){try{a&&a(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||o&&"_self"!==o||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return i.ref=pn!==fn&&t||n,J().createElement("a",i)}),gn=fn(function(e,t){var n=e.component,r=void 0===n?hn:n,a=e.replace,s=e.to,o=e.innerRef,i=on(e,["component","replace","to","innerRef"]);return J().createElement(Mt.Consumer,null,function(e){e||rt(!1);var n=e.history,l=dn(un(s,e.location),e.location),c=l?n.createHref(l):"",u=sn({},i,{href:c,navigate:function(){var t=un(s,e.location),r=lt(e.location)===lt(dn(t));(a||r?n.replace:n.push)(t)}});return pn!==fn?u.ref=t||o:u.innerRef=o,J().createElement(r,u)})}),mn=function(e){return e},vn=J().forwardRef;void 0===vn&&(vn=mn);var bn=vn(function(e,t){var n=e["aria-current"],r=void 0===n?"page":n,a=e.activeClassName,s=void 0===a?"active":a,o=e.activeStyle,i=e.className,l=e.exact,c=e.isActive,u=e.location,d=e.sensitive,p=e.strict,f=e.style,h=e.to,g=e.innerRef,m=on(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return J().createElement(Mt.Consumer,null,function(e){e||rt(!1);var n=u||e.location,a=dn(un(h,n),n),v=a.pathname,b=v&&v.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),w=b?$t(n.pathname,{path:b,exact:l,sensitive:d,strict:p}):null,y=!!(c?c(w,n):w),_="function"==typeof i?i(y):i,x="function"==typeof f?f(y):f;y&&(_=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(function(e){return e}).join(" ")}(_,s),x=sn({},x,o));var k=sn({"aria-current":y&&r||null,className:_,style:x,to:a},m);return mn!==vn?k.ref=t||g:k.innerRef=g,J().createElement(gn,k)})});const wn=r;var yn=["href","loading","onClick"];function xn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kn(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function s(n,r,a,s){var l=r&&r.prototype instanceof i?r:i,c=Object.create(l.prototype);return Sn(c,"_invoke",function(n,r,a){var s,i,l,c=0,u=a||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return s=t,i=0,l=e,p.n=n,o}};function f(n,r){for(i=n,l=r,t=0;!d&&c&&!a&&t<u.length;t++){var a,s=u[t],f=p.p,h=s[2];n>3?(a=h===r)&&(l=s[(i=s[4])?5:(i=3,3)],s[4]=s[5]=e):s[0]<=f&&((a=n<2&&f<s[1])?(i=0,p.v=r,p.n=s[1]):f<h&&(a=n<3||s[0]>r||r>h)&&(s[4]=n,s[5]=r,p.n=h,i=0))}if(a||n>1)return o;throw d=!0,r}return function(a,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&f(u,h),i=u,l=h;(t=i<2?e:l)||!d;){s||(i?i<3?(i>1&&(p.n=-1),f(i,l)):p.n=l:p.v=l);try{if(c=2,s){if(i||(a="next"),t=s[a]){if(!(t=t.call(s,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,i<2&&(i=0)}else 1===i&&(t=s.return)&&t.call(s),i<2&&(l=TypeError("The iterator does not provide a '"+a+"' method"),i=1);s=e}else if((t=(d=p.n<0)?l:n.call(r,p))!==o)break}catch(t){s=e,i=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,a,s),!0),c}var o={};function i(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(Sn(t={},r,function(){return this}),t),d=c.prototype=i.prototype=Object.create(u);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Sn(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,Sn(d,"constructor",c),Sn(c,"constructor",l),l.displayName="GeneratorFunction",Sn(c,a,"GeneratorFunction"),Sn(d),Sn(d,a,"Generator"),Sn(d,r,function(){return this}),Sn(d,"toString",function(){return"[object Generator]"}),(kn=function(){return{w:s,m:p}})()}function Sn(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}Sn=function(e,t,n,r){function s(t,n){Sn(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(s("next",0),s("throw",1),s("return",2))},Sn(e,t,n,r)}var jn=wn.useHistory;const Cn=function(e){var t=e.href,n=e.loading,r=void 0===n?void 0:n,o=e.onClick,i=Xe(e,yn),c=jn(),u=h((0,s.useState)(!1),2),p=u[0],f=u[1];return t&&o?i.onClick=R(kn().m(function e(){return kn().w(function(e){for(;;)switch(e.n){case 0:return f(!0),e.n=1,o();case 1:f(!1),c.push((t||"").replace("#",""));case 2:return e.a(2)}},e)})):(i.href=t,i.onClick=o),p&&(i.disabled=!0),(0,l.jsx)(a.Button,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xn(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({loading:!!r||void 0},i))};var En=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),Tn=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})}),Pn=["actions","actionType","as","buttonsCard","className","footer","header","headerAction","headerStyle","childrenStyle","footerStyle","disabled","icon","iconElement","iconBackgroundColor","isActive","isDraggable","isFirstTarget","isLastTarget","isNarrow","isSmall","dragIndex","onDragCallback","onToggle","onHeaderClick","noBorder","noMargin","children","hasGreyHeader","hasHeaderBorder"];function On(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?On(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):On(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const An=function(e){var t=e.actions,n=e.actionType,r=e.as,s=e.buttonsCard,o=e.className,c=e.footer,u=e.header,d=e.headerAction,p=e.headerStyle,f=e.childrenStyle,h=e.footerStyle,v=e.disabled,b=e.icon,x=e.iconElement,k=e.iconBackgroundColor,S=e.isActive,j=e.isDraggable,C=e.isFirstTarget,E=e.isLastTarget,T=e.isNarrow,P=e.isSmall,O=e.dragIndex,M=e.onDragCallback,A=void 0===M?function(){}:M,L=e.onToggle,N=void 0===L?function(){}:L,I=e.onHeaderClick,D=e.noBorder,z=e.noMargin,B=e.children,R=void 0===B?null:B,H=e.hasGreyHeader,V=e.hasHeaderBorder,$=void 0===V||V,F=Xe(e,Pn),G=i()("newspack-card--core",o,(s||"a"===r)&&"newspack-card--core__buttons-card",(null==t?void 0:t.length)>0&&"newspack-card--core__header--has-actions",j&&"newspack-card--core__is-draggable",T&&"newspack-card--core__is-narrow",P&&"newspack-card--core__is-small",(b||x)&&"newspack-card--core__has-icon",k&&"newspack-card--core__has-icon-background-color",S&&"newspack-card--core__is-active",v&&"newspack-card--core__is-disabled",R&&"newspack-card--core__has-children",z&&"newspack-card--core__no-margin",H&&"newspack-card--core__has-grey-header"),q=P?"small":F.size;(s||"a"===r)&&(P||(q="large"),"a"!==r&&(F.as="a")),D&&(F.isBorderless=!0);var U="toggle"===n||!!d||(null==t?void 0:t.length)>0||j,W=!!I&&!U;return(0,l.jsxs)(a.Card,Mn(Mn({as:r,className:G},F),{},{children:[(u||b||x)&&(0,l.jsxs)(a.CardHeader,{as:W?"button":void 0,className:i()("newspack-card--core__header",j&&"newspack-card--core__header--is-draggable",!$&&"newspack-card--core__header--no-border"),style:p,size:q,gap:4,onClick:W&&!v?I:void 0,disabled:!(!W||!v)||void 0,"aria-disabled":!(!W||!v)||void 0,children:[j&&(0,l.jsxs)("div",{className:"newspack-card--core__header__draggable-controls",children:[(0,l.jsx)("div",{className:"newspack-card--core__header__draggable-controls__drag-handle",children:(0,l.jsx)(m.A,{icon:_})}),(0,l.jsxs)("div",{className:"newspack-card--core__header__draggable-controls__move-buttons",children:[(0,l.jsx)(a.Button,{icon:w,onClick:function(){return A(O,O-1)},disabled:C,label:(0,g.__)("Move one position up","newspack-plugin"),size:"small"}),(0,l.jsx)(a.Button,{icon:y,onClick:function(){return A(O,O+1)},disabled:E,label:(0,g.__)("Move one position down","newspack-plugin"),size:"small"})]})]}),x?(0,l.jsx)("div",{className:"newspack-card--core__icon-slot",children:x}):b&&(0,l.jsx)("div",{className:"newspack-card--core__icon",children:(0,l.jsx)(m.A,{icon:b,height:P?24:48,width:P?24:48})}),(null==t?void 0:t.length)>0&&"toggle"===n&&(0,l.jsx)(a.ToggleControl,{className:"newspack-card--core__action",label:F.title,hideLabelFromVision:!0,checked:S,onChange:N}),u&&(0,l.jsx)("div",{className:"newspack-card--core__header-content",children:u}),!(null!=t&&t.length)>0&&"chevron"===n&&(0,l.jsx)(m.A,{className:"newspack-card--core__action",icon:En,height:24,width:24}),!(null!=t&&t.length)>0&&"toggle"===n&&(0,l.jsx)(a.ToggleControl,{className:"newspack-card--core__action",label:F.title,hideLabelFromVision:!0,checked:S,onChange:N}),(null==t?void 0:t.length)>0&&(0,l.jsx)(a.DropdownMenu,{icon:Tn,label:(0,g.__)("More","newspack-plugin"),children:function(){return t.map(function(e,t){return Array.isArray(e)?(0,l.jsx)(a.MenuGroup,{children:e.map(function(e,t){return(0,l.jsx)(a.MenuItem,{icon:e.icon,onClick:e.action,href:e.href,disabled:e.disabled||!1,isDestructive:e.destructive||!1,children:e.label},t)})},t):(0,l.jsx)(a.MenuItem,{icon:e.icon,onClick:e.action,href:e.href,disabled:e.disabled||!1,isDestructive:e.destructive||!1,children:e.label},t)})}}),d&&(0,l.jsx)(a.Button,{className:"newspack-card--core__header__action",icon:d.icon,href:d.href,disabled:d.disabled||!1,isDestructive:d.destructive||!1,onClick:d.onClick,tone:d.tone||"primary",variant:d.variant||"secondary",children:d.label})]}),R&&(0,l.jsx)("div",{className:i()("newspack-card--core__body",!$&&"newspack-card--core__body--no-header-border"),style:f,children:R}),c&&(0,l.jsx)(a.CardFooter,{size:q,style:h,children:c})]}))};var Ln=["buttonsCard","className","headerActions","isNarrow","isMedium","isSmall","isWhite","noBorder","__experimentalCoreCard","__experimentalCoreProps"];function Nn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function In(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nn(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Dn(e,t,n){return t=O(t),P(e,zn()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function zn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zn=function(){return!!e})()}var Bn=function(e){function t(){return C(this,t),Dn(this,t,arguments)}return A(t,e),T(t,[{key:"render",value:function(){var e=this.props,t=e.buttonsCard,n=e.className,r=e.headerActions,a=e.isNarrow,s=e.isMedium,o=e.isSmall,c=e.isWhite,u=e.noBorder,d=e.__experimentalCoreCard,p=e.__experimentalCoreProps,f=void 0===p?{actionType:null,header:null,icon:null,footer:null,noMargin:!1,isDraggable:!1,dragIndex:null,hasGreyHeader:!1,onDragCallback:function(){}}:p,h=Xe(e,Ln);if(d){var g=In(In({buttonsCard:t,className:n,isMedium:s,isNarrow:a,isSmall:o,isWhite:c,noBorder:u},h),f);return(0,l.jsx)(An,In({},g))}var m=i()("newspack-card",n,r&&"newspack-card__header-actions",s&&"newspack-card__is-medium",a&&"newspack-card__is-narrow",o&&"newspack-card__is-small",c&&"newspack-card__is-white",u&&"newspack-card__no-border");return(0,l.jsx)("div",In({className:m},h))}}])}(s.Component);const Rn=Bn;var Hn=n(9491);v.SVG,v.Path;var Vn=n(7183),$n=n.n(Vn),Fn=n(8662),Gn=n.n(Fn);function qn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qn(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Wn(e,t,n){return t=O(t),P(e,Xn()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function Xn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Xn=function(){return!!e})()}var Yn=function(e){function t(e){var n;return C(this,t),d(n=Wn(this,t,[e]),"state",{suggestions:{},allCategories:{},isLoading:!1}),d(n,"handleOnChange",function(e){var t=n.props.onChange,r=n.state.suggestions;t(e.filter(function(e){return void 0!==e}).map(function(e){return"string"==typeof e?r[e]:e}).filter(Boolean))}),d(n,"getAvailableSuggestions",function(){var e=n.props.value,t=n.state.suggestions,r=e.reduce(function(e,t){return null!=t&&t.id&&e.push(t.id),e},[]);return Gn()(t,function(e){var t=e.id;return-1===r.indexOf(t)}).map(function(e){return e.name})}),n.debouncedUpdateSuggestions=N()(n.updateSuggestions,100),n}return A(t,e),T(t,[{key:"componentDidMount",value:function(){var e=this;this.setState({isLoading:!0}),V()({path:(0,F.addQueryArgs)("/wp/v2/".concat(this.props.taxonomy),{per_page:-1,_fields:"id,name"})}).then(function(t){return e.setState({allCategories:t})}).finally(function(){return e.setState({isLoading:!1})})}},{key:"componentWillUnmount",value:function(){this.debouncedUpdateSuggestions.cancel()}},{key:"updateSuggestions",value:function(e){var t=this;this.setState({isLoading:!0}),V()({path:(0,F.addQueryArgs)("/wp/v2/".concat(this.props.taxonomy),{search:e,per_page:20,_fields:"id,name",orderby:"count",order:"desc"})}).then(function(e){t.setState({suggestions:e.reduce(function(e,t){return Un(Un({},e),{},d({},t.name,t))},{})})}).finally(function(){return t.setState({isLoading:!1})})}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.disabled,s=t.description,o=t.hideHelpFromVision,c=t.hideLabelFromVision,u=t.label,d=t.value,p=this.state,f=p.allCategories,h=p.isLoading,g=i()("newspack-category-autocomplete",n);return(0,l.jsxs)("div",{className:g,children:[(0,l.jsx)(Qr,{onInputChange:function(t){return e.debouncedUpdateSuggestions(t)},value:d.reduce(function(e,t){var n="number"==typeof t?$n()(f,["id",t]):t;return n&&e.push({id:n.term_id||n.id,value:n.value||n.name}),e},[]),suggestions:this.getAvailableSuggestions(),onChange:this.handleOnChange,label:u,disabled:r,description:s,hideHelpFromVision:o,hideLabelFromVision:c}),h?(0,l.jsx)("span",{className:"newspack-category-autocomplete__suggestions-spinner",children:(0,l.jsx)(a.Spinner,{})}):null]})}}])}(s.Component);Yn.defaultProps={taxonomy:"categories"};var Zn={grad:.9,turn:360,rad:360/(2*Math.PI)},Kn=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Qn=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Jn=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},er=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},tr=function(e){return{r:Jn(e.r,0,255),g:Jn(e.g,0,255),b:Jn(e.b,0,255),a:Jn(e.a)}},nr=function(e){return{r:Qn(e.r),g:Qn(e.g),b:Qn(e.b),a:Qn(e.a,3)}},rr=/^#([0-9a-f]{3,8})$/i,ar=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},sr=function(e){var t=e.r,n=e.g,r=e.b,a=e.a,s=Math.max(t,n,r),o=s-Math.min(t,n,r),i=o?s===t?(n-r)/o:s===n?2+(r-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:s?o/s*100:0,v:s/255*100,a}},or=function(e){var t=e.h,n=e.s,r=e.v,a=e.a;t=t/360*6,n/=100,r/=100;var s=Math.floor(t),o=r*(1-n),i=r*(1-(t-s)*n),l=r*(1-(1-t+s)*n),c=s%6;return{r:255*[r,i,o,o,l,r][c],g:255*[l,r,r,i,o,o][c],b:255*[o,o,l,r,r,i][c],a}},ir=function(e){return{h:er(e.h),s:Jn(e.s,0,100),l:Jn(e.l,0,100),a:Jn(e.a)}},lr=function(e){return{h:Qn(e.h),s:Qn(e.s),l:Qn(e.l),a:Qn(e.a,3)}},cr=function(e){return or((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},ur=function(e){return{h:(t=sr(e)).h,s:(a=(200-(n=t.s))*(r=t.v)/100)>0&&a<200?n*r/100/(a<=100?a:200-a)*100:0,l:a/2,a:t.a};var t,n,r,a},dr=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,pr=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,fr=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,hr=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,gr={string:[[function(e){var t=rr.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Qn(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?Qn(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=fr.exec(e)||hr.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:tr({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=dr.exec(e)||pr.exec(e);if(!t)return null;var n,r,a=ir({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(Zn[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return cr(a)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,a=e.a,s=void 0===a?1:a;return Kn(t)&&Kn(n)&&Kn(r)?tr({r:Number(t),g:Number(n),b:Number(r),a:Number(s)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,a=e.a,s=void 0===a?1:a;if(!Kn(t)||!Kn(n)||!Kn(r))return null;var o=ir({h:Number(t),s:Number(n),l:Number(r),a:Number(s)});return cr(o)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,a=e.a,s=void 0===a?1:a;if(!Kn(t)||!Kn(n)||!Kn(r))return null;var o=function(e){return{h:er(e.h),s:Jn(e.s,0,100),v:Jn(e.v,0,100),a:Jn(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(s)});return or(o)},"hsv"]]},mr=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},vr=function(e,t){var n=ur(e);return{h:n.h,s:Jn(n.s+100*t,0,100),l:n.l,a:n.a}},br=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},wr=function(e,t){var n=ur(e);return{h:n.h,s:n.s,l:Jn(n.l+100*t,0,100),a:n.a}},yr=function(){function e(e){this.parsed=function(e){return"string"==typeof e?mr(e.trim(),gr.string):"object"==typeof e&&null!==e?mr(e,gr.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return Qn(br(this.rgba),2)},e.prototype.isDark=function(){return br(this.rgba)<.5},e.prototype.isLight=function(){return br(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=nr(this.rgba)).r,n=e.g,r=e.b,s=(a=e.a)<1?ar(Qn(255*a)):"","#"+ar(t)+ar(n)+ar(r)+s;var e,t,n,r,a,s},e.prototype.toRgb=function(){return nr(this.rgba)},e.prototype.toRgbString=function(){return t=(e=nr(this.rgba)).r,n=e.g,r=e.b,(a=e.a)<1?"rgba("+t+", "+n+", "+r+", "+a+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,a},e.prototype.toHsl=function(){return lr(ur(this.rgba))},e.prototype.toHslString=function(){return t=(e=lr(ur(this.rgba))).h,n=e.s,r=e.l,(a=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+a+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,a},e.prototype.toHsv=function(){return e=sr(this.rgba),{h:Qn(e.h),s:Qn(e.s),v:Qn(e.v),a:Qn(e.a,3)};var e},e.prototype.invert=function(){return _r({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),_r(vr(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),_r(vr(this.rgba,-e))},e.prototype.grayscale=function(){return _r(vr(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),_r(wr(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),_r(wr(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?_r({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Qn(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=ur(this.rgba);return"number"==typeof e?_r({h:e,s:t.s,l:t.l,a:t.a}):Qn(t.h)},e.prototype.isEqual=function(e){return this.toHex()===_r(e).toHex()},e}(),_r=function(e){return e instanceof yr?e:new yr(e)},xr=[];Object.defineProperty(jr,"name",{value:"default",configurable:!0});var kr=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Sr=function(e){return.2126*kr(e.r)+.7152*kr(e.g)+.0722*kr(e.b)};function jr(e){e.prototype.luminance=function(){return e=Sr(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,r,a,s,o,i,l,c=t instanceof e?t:new e(t);return s=this.rgba,o=c.toRgb(),n=(i=Sr(s))>(l=Sr(o))?(i+.05)/(l+.05):(l+.05)/(i+.05),void 0===(r=2)&&(r=0),void 0===a&&(a=Math.pow(10,r)),Math.floor(a*n)/a+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(o=void 0===(s=(n=t).size)?"normal":s,"AAA"===(a=void 0===(r=n.level)?"AA":r)&&"normal"===o?7:"AA"===a&&"large"===o?3:4.5);var n,r,a,s,o}}var Cr=wn.useHistory;const Er=function(e,t){var n=Cr(),r=(0,s.useRef)(null),a=function(n){if(e)return void 0===n&&(n=window.event),t};return(0,s.useEffect)(function(){return e&&(r.current=n.block(t),window.addEventListener("beforeunload",a)),function(){r.current&&r.current(),window.removeEventListener("beforeunload",a)}},[t,e]),r.current||function(){}};(Object.getOwnPropertyDescriptor(Er,"name")||{}).writable||Object.defineProperty(Er,"name",{value:"default",configurable:!0});var Tr=n(5e3),Pr=n.n(Tr),Or=n(4198),Mr=n.n(Or),Ar=function(e,t){if(Pr()(e))return t};const Lr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=h((0,s.useState)(e),2),n=t[0],r=t[1],a=function(e){return r(function(t){return Mr()({},t,e,Ar)})};return[n,function(e){if("string"==typeof e)return function(t){return a(d({},e,t))};a(e)}]};(Object.getOwnPropertyDescriptor(Lr,"name")||{}).writable||Object.defineProperty(Lr,"name",{value:"default",configurable:!0});var Nr=["className","size","hideTitle","isDestructive","onConfirm","onCancel","when","isOpen","children"];function Ir(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Dr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ir(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ir(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var zr=wn.useHistory,Br={small:"newspack-modal--size-small",medium:"newspack-modal--size-medium",large:"newspack-modal--size-large","x-large":"newspack-modal--size-x-large",full:"newspack-modal--size-full"},Rr=function(){};const Hr=(0,s.forwardRef)(function(e,t){var n=e.className,r=e.size,o=void 0===r?"small":r,c=e.hideTitle,u=e.isDestructive,d=e.onConfirm,p=void 0===d?Rr:d,f=e.onCancel,g=void 0===f?Rr:f,m=e.when,v=void 0!==m&&m,b=e.isOpen,w=void 0!==b&&b,y=e.children,_=Xe(e,Nr),x=h((0,s.useState)(w),2),k=x[0],S=x[1],j=zr(),C=(0,s.useRef)(null),E=(0,s.useRef)(!1),T=(0,s.useCallback)(function(){var e;S(!1),null===(e=C.current)||void 0===e||e.call(C),C.current=null,p()},[p,C]),P=(0,s.useCallback)(function(){S(!1),C.current=null,E.current=!0;try{j.replace(j.location)}finally{E.current=!1}g()},[g,j]);if((0,s.useEffect)(function(){if(v)return j.block(function(e,t){if(!E.current)return C.current=function(){E.current=!0;try{j.replace(j.location),"REPLACE"===t?j.replace(e):j.push(e)}finally{E.current=!1}},S(!0),!1})},[v,j]),(0,s.useEffect)(function(){w&&S(!0)},[w]),!k)return null;var O=i()("newspack-modal",Br[o],c&&"newspack-modal--hide-title",u&&"newspack-modal--destructive",n);return(0,l.jsx)(a.__experimentalConfirmDialog,Dr(Dr({className:O},_),{},{ref:t,onConfirm:T,onCancel:P,__experimentalHideHeader:!1,children:y}))});var Vr=["message","when"];function $r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Fr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$r(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const Gr={usePrompt:Er,useObjectState:Lr,useOnClickOutside:function(e,t){(0,s.useEffect)(function(){var n=function(n){e.current&&!e.current.contains(n.target)&&t(n)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),function(){document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[e,t])},useUniqueId:function(e){return(0,s.useRef)("".concat(e,"-").concat(Math.round(99999*Math.random()))).current},useConfirmDialog:function(e){var t=e.message,n=e.when,r=Xe(e,Vr),a=h((0,s.useState)(null),2),o=a[0],i=a[1],c=(0,s.useRef)(n);c.current=n;var u=(0,s.useCallback)(function(e){!1!==c.current?i(function(){return e}):e()},[]);return{confirmDialog:(0,l.jsx)(Hr,Fr(Fr({},r),{},{when:n,isOpen:!!o,onConfirm:function(){null==o||o(),i(null)},onCancel:function(){return i(null)},children:t})),requestConfirm:u}}};window.wp.keycodes;var qr=n(7143);n(8490),v.SVG,v.Path,function(e){e.forEach(function(e){xr.indexOf(e)<0&&(e(yr,gr),xr.push(e))})}([jr]);var Ur=["className","description","hideHelpFromVision","hideLabelFromVision"];function Wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Xr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wr(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Yr(e,t,n){return t=O(t),P(e,Zr()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function Zr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Zr=function(){return!!e})()}var Kr=function(e){function t(){return C(this,t),Yr(this,t,arguments)}return A(t,e),T(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.description,r=e.hideHelpFromVision,s=e.hideLabelFromVision,o=Xe(e,Ur),c=i()("newspack-form-token-field__input-container",t);return(0,l.jsxs)("div",{className:i()({"newspack-form-token-field--label-hidden":s,"newspack-form-token-field--help-hidden":r},"newspack-form-token-field"),children:[(0,l.jsx)(a.FormTokenField,Xr({className:c},o)),n&&(0,l.jsx)("p",{className:"newspack-form-token-field__help",children:n})]})}}])}(s.Component);const Qr=Kr,Jr=function(e){var t=e.simple,n=void 0===t?void 0:t,r=window.newspack_urls||{},s=r.components_demo,o=void 0!==s&&s,i=r.support,c=void 0!==i&&i,u=r.setup_wizard,d=void 0!==u&&u,p=r.reset_url,f=void 0!==p&&p,h=r.plugin_version,m=void 0===h?{label:"Newspack"}:h,v=r.remove_starter_content,b=void 0!==v&&v,w=r.support_email,y=[{label:m.label,url:"https://newspack.com/category/release-notes/",external:!0},{label:(0,g.__)("About","newspack-plugin"),url:"https://newspack.com/",external:!0},{label:(0,g.__)("Documentation","newspack-plugin"),url:c,external:!0}];return o&&y.push({label:(0,g.__)("Components Demo","newspack-plugin"),url:o}),d&&y.push({label:(0,g.__)("Setup Wizard","newspack-plugin"),url:d}),f&&y.push({label:(0,g.__)("Reset Newspack","newspack-plugin"),url:f}),b&&y.push({label:(0,g.__)("Remove Starter Content","newspack-plugin"),url:b}),w&&y.push({label:(0,g.__)("Contact Support","newspack-plugin"),url:"mailto:".concat(w)}),(0,l.jsx)("div",{className:"newspack-footer",children:!n&&(0,l.jsx)("ul",{children:y.map(function(e,t){var n=e.url,r=e.label,s=e.external;return(0,l.jsx)("li",{children:s?(0,l.jsx)(a.ExternalLink,{href:n,children:r}):(0,l.jsx)("a",{href:n,children:r})},t)})})})};var ea=n(6661),ta=n.n(ea),na=["className","children","compact","useModal","modalTitle","modalBody","onReady","editLink","bannerText","bannerButtonText","url"];function ra(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function aa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ra(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ra(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sa(e,t,n){return t=O(t),P(e,oa()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function oa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(oa=function(){return!!e})()}var ia=function(e){function t(){var e;return C(this,t),d(e=sa(this,t,arguments),"componentDidMount",function(){e._isMounted=!0;var t=e.props,n=t.plugin,r=t.url;n&&!r&&e.retrievePluginInfo(n)}),d(e,"componentWillUnmount",function(){e._isMounted=!1}),d(e,"retrievePluginInfo",function(t){var n=e.props.onReady;V()({path:"/newspack/v1/plugins/"+t}).then(function(t){e._isMounted&&(n(t),e.setState({pluginInfo:t}))})}),d(e,"textForPlugin",function(t){var n={modalBody:null,modalTitle:t.Name&&"".concat((0,g.__)("Manage","newspack-plugin")," ").concat(t.Name),primaryButton:t.Name&&"".concat((0,g.__)("Manage","newspack-plugin")," ").concat(t.Name),primaryModalButton:(0,g.__)("Manage","newspack-plugin"),dismissModalButton:(0,g.__)("Dismiss","newspack-plugin")};return ta()(n,e.props)}),d(e,"goToUrl",function(){var t=e.props,n=t.url,r=t.showOnBlockEditor,a=t.bannerText,s=t.bannerButtonText;V()({path:"/newspack/v1/handoff",method:"POST",data:{destinationUrl:n,handoffReturnUrl:window&&window.location.href,showOnBlockEditor:!!r,bannerText:a,bannerButtonText:s}}).then(function(e){window.location.href=e.HandoffLink})}),d(e,"goToPlugin",function(t){var n=e.props,r=n.editLink,a=n.showOnBlockEditor,s=n.bannerText,o=n.bannerButtonText;V()({path:"/newspack/v1/plugins/"+t+"/handoff",method:"POST",data:{editLink:r,handoffReturnUrl:window&&window.location.href,showOnBlockEditor:!!a,bannerText:s,bannerButtonText:o}}).then(function(e){window.location.href=e.HandoffLink})}),e.state={pluginInfo:[],showModal:!1},e}return A(t,e),T(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.children,o=t.compact,c=t.useModal,u=(t.modalTitle,t.modalBody,t.onReady,t.editLink,t.bannerText,t.bannerButtonText,t.url),d=Xe(t,na),p=this.state,f=p.pluginInfo,h=p.showModal,m=this.textForPlugin(f),v=m.modalBody,b=m.modalTitle,w=m.primaryButton,y=m.primaryModalButton,_=m.dismissModalButton,x=f.Configured,k=f.Name,S=f.Slug,j=f.Status,C=i()(x&&"is-configured",n),E=function(){return u?e.goToUrl():e.goToPlugin(S)};return(0,l.jsxs)(s.Fragment,{children:[u&&(0,l.jsx)(Cn,aa(aa({className:C,isSecondary:!d.isPrimary&&!d.isTertiary&&!d.isLink},d),{},{onClick:function(){return c&&r?e.setState({showModal:!0}):E()},children:r||w})),!u&&k&&"active"===j&&(0,l.jsx)(Cn,aa(aa({className:C,isSecondary:!d.isPrimary&&!d.isTertiary&&!d.isLink},d),{},{onClick:function(){return c?e.setState({showModal:!0}):E()},children:r||w})),!u&&k&&"active"!==j&&(0,l.jsx)(Cn,aa(aa({className:C,variant:"secondary",disabled:!0},d),{},{children:k+(0,g.__)(" not installed","newspack-plugin")})),!u&&!k&&(0,l.jsx)(Cn,aa(aa({className:C,isSecondary:!d.isPrimary&&!d.isTertiary&&!d.isLink},d),{},{children:(0,l.jsxs)(s.Fragment,{children:[!o&&(0,l.jsx)(Ki,{isLeft:!0}),(0,g.__)("Retrieving Plugin Info","newspack-plugin")]})})),h&&(0,l.jsxs)(Ca,{title:b,onRequestClose:function(){return e.setState({showModal:!1})},children:[(0,l.jsx)("p",{children:v}),(0,l.jsxs)(a.__experimentalHStack,{justify:"flex-end",spacing:4,wrap:!0,className:"newspack-modal__footer",children:[(0,l.jsx)(Cn,{variant:"secondary",onClick:function(){return e.setState({showModal:!1})},children:_}),(0,l.jsx)(Cn,{variant:"primary",onClick:E,children:y})]})]})]})}}])}(s.Component);ia.defaultProps={onReady:function(){}};const la=ia;var ca="newspack_wizard_handoff_message";function ua(){var e=h((0,s.useState)(!1),2),t=e[0],n=e[1];return(0,s.useEffect)(function(){setTimeout(function(){var e=JSON.parse(localStorage.getItem(ca));null!=e&&e.message?n(e.message):n(!1),null!=e&&e.url&&-1===window.location.href.indexOf(e.url)&&(window.localStorage.removeItem(ca),n(!1))},100)},[]),t?(0,l.jsx)(Ia,{isHandoff:!0,isDismissible:!1,rawHTML:!0,noticeText:t}):null}var da=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})}),pa=["className"];function fa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ha(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fa(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fa(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ga(e,t,n){return t=O(t),P(e,ma()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function ma(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ma=function(){return!!e})()}var va=function(e){function t(){return C(this,t),ga(this,t,arguments)}return A(t,e),T(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=Xe(e,pa);return(0,l.jsx)(a.Tooltip,ha(ha({},n),{},{children:(0,l.jsx)("span",{className:i()("newspack-info-button",t),children:(0,l.jsx)(m.A,{icon:da})})}))}}])}(s.Component);const ba=va;var wa=["className","borders","columns","gutter","noMargin","rowGap"];function ya(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}const _a=function(e){var t=e.className,n=void 0===t?"":t,r=e.borders,a=void 0!==r&&r,s=e.columns,o=void 0===s?2:s,c=e.gutter,u=void 0===c?32:c,p=e.noMargin,f=void 0!==p&&p,h=e.rowGap,g=void 0===h?0:h,m=Xe(e,wa),v=i()("newspack-grid",a&&"newspack-grid__borders",f&&"newspack-grid--no-margin",o&&"newspack-grid__columns-"+o,u&&"newspack-grid__gutter-"+u,g&&"newspack-grid__row-gap-"+g,n);return(0,l.jsx)("div",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ya(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ya(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({className:v},m))};var xa=["className","size","hideTitle"];function ka(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Sa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ka(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ka(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ja={small:"newspack-modal--size-small",medium:"newspack-modal--size-medium",large:"newspack-modal--size-large","x-large":"newspack-modal--size-x-large",full:"newspack-modal--size-full"};const Ca=(0,s.forwardRef)(function(e,t){var n=e.className,r=e.size,s=void 0===r?"medium":r,o=e.hideTitle,c=Xe(e,xa),u=i()("newspack-modal",o&&"newspack-modal--hide-title",function(e){return ja[e]||ja.medium}(s),n);return(0,l.jsx)(a.Modal,Sa(Sa({className:u},c),{},{ref:t}))});function Ea(e,t,n){return t=O(t),P(e,Ta()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function Ta(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ta=function(){return!!e})()}var Pa=function(e){function t(){return C(this,t),Ea(this,t,arguments)}return A(t,e),T(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.simple,r=e.size,s=e.white,o=i()("newspack-icon",n&&"newspack-icon--simple",s&&"newspack-icon--white",t);return(0,l.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",height:r,width:r,viewBox:"0 0 24 24",className:o,children:(0,l.jsx)(a.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M24 12C24 18.6271 18.6271 24 12 24C5.37213 24 0 18.6271 0 12C0 5.3729 5.3729 0 12 0C18.6271 0 24 5.3729 24 12ZM17.4545 17.4546L6.54545 6.54545V17.4545H8.72727V11.8182L14.3636 17.4546H17.4545ZM11.2727 8.18182H17.4545V6.54545H9.63636L11.2727 8.18182ZM17.4545 11.2727H14.3636L12.7273 9.63636H17.4545V11.2727ZM17.4545 12.7273V14.3636L15.8182 12.7273H17.4545Z"})})}}])}(s.Component);Pa.defaultProps={size:32};var Oa=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{d:"M12 4a8 8 0 1 1 .001 16.001A8 8 0 0 1 12 4Zm0 1.5a6.5 6.5 0 1 0-.001 13.001A6.5 6.5 0 0 0 12 5.5Zm.75 11h-1.5V15h1.5v1.5Zm-.445-9.234a3 3 0 0 1 .445 5.89V14h-1.5v-1.25c0-.57.452-.958.917-1.01A1.5 1.5 0 0 0 12 8.75a1.5 1.5 0 0 0-1.5 1.5H9a3 3 0 0 1 3.305-2.984Z"})}),Ma=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.13 5.5l1.926 1.927A4.975 4.975 0 007.025 10H5v1.5h2V13H5v1.5h2.1a5.002 5.002 0 009.8 0H19V13h-2v-1.5h2V10h-2.025a4.979 4.979 0 00-1.167-2.74l1.76-1.76-1.061-1.06-1.834 1.834A4.977 4.977 0 0012 5.5c-1.062 0-2.046.33-2.855.895L7.19 4.44 6.13 5.5zm2.37 5v3a3.5 3.5 0 107 0v-3a3.5 3.5 0 10-7 0z"})});function Aa(e,t,n){return t=O(t),P(e,La()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function La(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(La=function(){return!!e})()}var Na=function(e){function t(){return C(this,t),Aa(this,t,arguments)}return A(t,e),T(t,[{key:"render",value:function(){var e,t=this.props,n=t.className,r=t.debugMode,a=t.isError,o=t.isHandoff,c=t.isHelp,u=t.isSuccess,d=t.isWarning,p=t.noticeText,f=t.rawHTML,h=t.style,g=void 0===h?{}:h,v=t.children,w=void 0===v?null:v,y=i()("newspack-notice",n,r&&"newspack-notice__is-debug",a&&"newspack-notice__is-error",o&&"newspack-notice__is-handoff",c&&"newspack-notice__is-help",u&&"newspack-notice__is-success",d&&"newspack-notice__is-warning");return e=c?Oa:u?b:r?Ma:da,(0,l.jsxs)("div",{className:y,style:g,children:[(0,l.jsx)(m.A,{icon:e}),(0,l.jsxs)("div",{className:"newspack-notice__content",children:[f?(0,l.jsx)(s.RawHTML,{children:p}):p,w||null]})]})}}])}(s.Component);const Ia=Na;var Da=(0,s.forwardRef)(({children:e,className:t,ariaLabel:n,as:r="div",...a},s)=>(0,l.jsx)(r,{ref:s,className:Le("admin-ui-navigable-region",t),"aria-label":n,role:"region",tabIndex:"-1",...a,children:e}));Da.displayName="NavigableRegion";var za=Da;const Ba=(0,l.jsxs)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:[(0,l.jsx)(v.Path,{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",fill:"#003da5"}),(0,l.jsx)(v.Path,{d:"M16.09 13.773V12.546H14.864L16.09 13.773ZM13.773 11.454H16.091V10.227H12.546L13.773 11.454ZM11.454 9.136H16.091V7.91H10.227L11.454 9.137V9.136ZM7.91 7.91L16.092 16.092H13.774L9.546 11.865V16.092H7.91V7.91Z",fill:"white"})]}),Ra=function(e){var t,n=e.breadcrumbItems,r=void 0===n?[]:n,o=e.badges,c=e.subTitle,u=e.actions,d=e.tabbedNavigation,p=e.className,f=e.children,h=null===(t=r[r.length-1])||void 0===t?void 0:t.label,g=function(e,t){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(Me,{direction:"column",className:"newspack-page__header-region",children:[(0,l.jsxs)(Me,{direction:"column",className:"newspack-page__header",children:[(0,l.jsxs)(Me,{direction:"row",gap:"sm",justify:"space-between",children:[(0,l.jsxs)(Me,{direction:"row",gap:"sm",align:"center",justify:"start",children:[(0,l.jsx)("div",{className:"newspack-page__header-visual","aria-hidden":"true",children:(0,l.jsx)(m.A,{icon:Ba})}),(0,l.jsx)(a.__experimentalHStack,{className:"newspack-page__breadcrumbs",justify:"flex-start",children:(0,l.jsx)(Ue,{items:r})}),o]}),u&&(0,l.jsx)(Me,{direction:"row",gap:"sm",align:"center",className:"newspack-page__header-actions",children:u})]}),c&&(0,l.jsx)(Re,{render:(0,l.jsx)("p",{}),variant:"body-md",className:"newspack-page__header-subtitle",children:c})]}),e]}),t]})};return(0,l.jsx)(za,{className:i()("newspack-page",p),ariaLabel:h,children:(0,s.isValidElement)(d)?(0,s.cloneElement)(d,{renderShell:g,content:f}):g(null,f)})};function Ha(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Va(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ha(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ha(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $a(e,t,n){return t=O(t),P(e,Fa()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function Fa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Fa=function(){return!!e})()}var Ga=function(e){function t(){var e;return C(this,t),d(e=$a(this,t,arguments),"componentDidMount",function(){var t=e.props.plugins;e.retrievePluginInfo(t).then(function(){e.props.autoInstall&&e.installAllPlugins()})}),d(e,"componentDidUpdate",function(t){var n=e.props,r=n.autoInstall,a=n.plugins,s=e.state.installationInitialized;a!==t.plugins&&e.retrievePluginInfo(a),r&&!s&&e.installAllPlugins()}),d(e,"retrievePluginInfo",function(t){return new Promise(function(n){V()({path:"/newspack/v1/plugins/"}).then(function(r){var a=Object.keys(r).reduce(function(e,n){return-1===t.indexOf(n)||(e[n]=Va(Va({},r[n]),{},{installationStatus:"active"===r[n].Status?1:0})),e},{});e.updatePluginInfo(a).then(function(){return n()})})})}),d(e,"installAllPlugins",function(){var t=e.state.pluginInfo;e.setState({installationInitialized:!0}),Object.keys(t).filter(function(e){return"active"!==t[e].Status}).map(function(t){return function(){return e.installPlugin(t)}}).reduce(function(e,t){return e.then(function(e){return t().then(Array.prototype.concat.bind(e))})},Promise.resolve([]))}),d(e,"installPlugin",function(t){e.setInstallationStatus(t,2);var n={path:"/newspack/v1/plugins/".concat(t,"/configure/"),method:"post"};return V()(n).then(function(n){return e.props.onInstalled(t),e.updatePluginInfo(function(e){return Va(Va({},e),{},d({},t,Va(Va({},n),{},{installationStatus:1})))})}).catch(function(n){e.setInstallationStatus(t,3,n.message)})}),d(e,"setChecked",function(t,n){e.updatePluginInfo(function(e){return Va(Va({},e),{},d({},t,Va(Va({},e[t]),{},{checked:n})))})}),d(e,"setInstallationStatus",function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e.updatePluginInfo(function(e){return Va(Va({},e),{},d({},t,Va(Va({},e[t]),{},{installationStatus:n,notification:r})))})}),d(e,"updatePluginInfo",function(t){return new Promise(function(n){var r=e.props.onStatus;e.setState(function(e){return{pluginInfo:"function"==typeof t?t(e.pluginInfo):t}},function(){var t=e.state.pluginInfo,a=Object.values(t).every(function(e){return"active"===e.Status});r({complete:a,pluginInfo:t}),n()})})}),d(e,"classForInstallationStatus",function(e){switch(e){case 1:return"newspack-plugin-installer__status-active";case 2:return"newspack-plugin-installer__status-installing";case 3:return"newspack-plugin-installer__status-error";default:return"newspack-plugin-installer__status-none"}}),e.state={pluginInfo:{},installationInitialized:!1},e}return A(t,e),T(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.autoInstall,r=t.isSmall,a=t.withoutFooterButton,s=this.state.pluginInfo,o=(window.newspack_aux_data||{}).is_managed,c=Object.keys(s),u=[];c.forEach(function(e){var t=s[e];u.push(t.Status)});var d=function(e){return"active"===e||"inactive"===e},p=u.every(d)?(0,g.__)("Activate","newspack-plugin"):(0,g.__)("Install","newspack-plugin"),f=c.some(function(e){var t=s[e];return"active"!==t.Status&&0===t.installationStatus});return(0,l.jsxs)(l.Fragment,{children:[(!s||!Object.keys(s).length)&&(0,l.jsxs)("div",{className:"newspack-plugin-installer_is-waiting",children:[(0,l.jsx)(Ki,{isLeft:!0}),(0,g.__)("Retrieving plugin information…","newspack-plugin")]}),s&&c.length>0&&c.map(function(t){var n,a=s[t],c=a.Name,u=a.Description,p=a.Download,f=a.Status,h=a.installationStatus,v=a.notification,w=2===h,y=!w&&"active"!==f,_=p||d(f);2===h?n="inactive"===f?(0,g.__)("Activating…"):(0,g.__)("Installing…"):_?"uninstalled"===f?n=(0,l.jsxs)("span",{className:"newspack-plugin-installer__status",children:[(0,g.__)("Install","newspack"),(0,l.jsx)("span",{className:"newspack-checkbox-icon"})]}):"inactive"===f?n=(0,l.jsxs)("span",{className:"newspack-plugin-installer__status",children:[(0,g.__)("Activate","newspack-plugin"),(0,l.jsx)("span",{className:"newspack-checkbox-icon"})]}):"active"===f&&(n=(0,l.jsxs)("span",{className:"newspack-plugin-installer__status",children:[(0,g.__)("Installed","newspack-plugin"),(0,l.jsx)("span",{className:"newspack-checkbox-icon newspack-checkbox-icon--checked",children:(0,l.jsx)(m.A,{icon:b})})]})):n=(0,l.jsxs)("span",{className:"newspack-plugin-installer__status",children:[o?(0,g.__)("Contact Newspack support to install","newspack-plugin"):(0,g.__)("Plugin must be installed manually","newspack-plugin"),(0,l.jsx)("span",{className:"newspack-checkbox-icon"})]});var x=i()("newspack-action-card__plugin-installer",e.classForInstallationStatus(h)),k=y?function(){return e.installPlugin(t)}:null;return(0,l.jsx)(S,{title:c,description:u,disabled:!_,actionText:n,isSmall:r,isWaiting:w,onClick:k,notification:v,notificationLevel:"error",notificationHTML:!0,className:x},t)}),!a&&!n&&s&&c.length>0&&(0,l.jsx)("div",{className:"newspack-buttons-card",children:(0,l.jsx)(Cn,{disabled:!f,isPrimary:!0,onClick:this.installAllPlugins,children:p})})]})}}])}(s.Component);Ga.defaultProps={onStatus:function(){},onInstalled:function(){}};const qa=Ga;var Ua=n(2619);function Wa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var Xa=function(e){return Array.isArray(e.options)&&e.options.length},Ya=function(e){switch(e.type){case"int":case"integer":case"float":case"number":return"number";case"string":case"text":return"text";case"password":return"password";case"boolean":case"checkbox":return"checkbox";default:return null}};const Za=function(e){var t,n=h((0,s.useState)(!0),2),r=n[0],o=n[1],i=e.error,c=e.sectionKey,u=e.active,p=e.title,f=e.description,m=e.fields,v=e.disabled,b=e.onChange,w=e.onUpdate,y=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(0,Ua.applyFilters)("newspack.settingSection.".concat(c,".").concat(t),n,e)},_=2;return m.length%3==0?_=3:1===m.length&&(_=1),(0,l.jsx)(S,{id:null!==(t=e.id)&&void 0!==t?t:null,isMedium:!0,disabled:v,title:p,description:f,toggleChecked:u,hasGreyHeader:u||null===u,toggleOnChange:null!==u?function(e){return w({active:e})}:null,actionContent:(u||null===u)&&y("buttons",(0,l.jsx)(Cn,{variant:"primary",disabled:v||r,onClick:function(){w(),o(!0)},children:(0,g.__)("Save Settings","newspack")})),children:(u||null===u)&&(0,l.jsxs)(s.Fragment,{children:[(null==i?void 0:i.message)&&(0,l.jsx)(Ia,{noticeText:i.message,isError:!0}),y("beforeControls"),(0,l.jsx)(_a,{columns:_,gutter:32,children:m.map(function(e){var t=function(e){if(Xa(e))return xs;switch(e.type){case"checkbox":case"boolean":return a.CheckboxControl;default:return qi}}(e);return(0,Ua.applyFilters)("newspack.settingsSection.".concat(c,".control"),(0,l.jsx)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wa(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wa(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},function(e){var t;return{disabled:v,name:"".concat(e.section,"_").concat(e.key),type:Ya(e),label:e.description,help:e.help||null,options:(null===(t=e.options)||void 0===t?void 0:t.map(function(e){return{value:e.value,label:e.name||e.label}}))||null,value:e.value,multiple:!(!Xa(e)||!e.multiple)||null,checked:"boolean"===e.type?!!e.value:null,onChange:function(t){b(e.key,t),o(!1)}}}(e)),e.key),{sectionKey:c,setting:e,onChange:b})})})]})})};function Ka(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ka(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ka(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ja(e,t,n){return t=O(t),P(e,es()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function es(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(es=function(){return!!e})()}var ts=function(e){function t(){var e;return C(this,t),d(e=Ja(this,t,arguments),"fetchSettings",function(){var t=e.props,n=t.afterFetch,r=t.pluginSlug,a=t.isWizard;e.setState({inFlight:!0}),V()({path:a?"/newspack/v1/wizard/".concat(r,"/settings"):"/".concat(r,"/v1/settings")}).then(function(t){e.setState({settings:t,error:null}),"function"==typeof n&&n(t)}).catch(function(t){e.setState({error:t})}).finally(function(){e.setState({inFlight:!1})})}),d(e,"getSettingsValues",function(t){var n;return(null===(n=e.state.settings[t])||void 0===n?void 0:n.reduce(function(e,t){return e[t.key]=t.value,e},{}))||{}}),d(e,"handleSettingChange",function(t){return function(n,r){var a=j(e.state.settings[t]);a.forEach(function(e){e.key===n&&(e.value=r)}),e.setState({settings:Qa(Qa({},e.state.settings),{},d({},t,a))})}}),d(e,"handleSectionUpdate",function(t){return function(n){var r=e.props,a=r.afterUpdate,s=r.pluginSlug,o=r.isWizard;e.setState({inFlight:!0}),V()({path:o?"/newspack/v1/wizard/".concat(s,"/settings"):"/".concat(s,"/v1/settings"),method:"POST",data:{section:t,settings:n||e.getSettingsValues(t)}}).then(function(n){e.setState({settings:Qa(Qa({},e.state.settings),{},d({},t,n[t])),error:null}),"function"==typeof a&&a(n)}).catch(function(t){e.setState({error:t})}).finally(function(){e.setState({inFlight:!1})})}}),d(e,"getSectionInfo",function(t){var n;return null===(n=e.state.settings[t])||void 0===n?void 0:n.find(function(e){return!e.key||"active"===e.key})}),d(e,"getSectionTitle",function(t){var n;return null===(n=e.getSectionInfo(t))||void 0===n?void 0:n.description}),d(e,"getSectionDescription",function(t){var n;return null===(n=e.getSectionInfo(t))||void 0===n?void 0:n.help}),d(e,"isSectionActive",function(t){var n,r=null===(n=e.state.settings[t])||void 0===n?void 0:n.find(function(e){return"active"===e.key});return r?r.value:null}),d(e,"getSectionFields",function(t){var n;return null===(n=e.state.settings[t])||void 0===n?void 0:n.filter(function(e){return e.key&&"active"!==e.key})}),e.state={inFlight:!1,settings:{},error:null},e}return A(t,e),T(t,[{key:"componentDidMount",value:function(){this.fetchSettings()}},{key:"render",value:function(){var e=this,t=this.props,n=t.title,r=t.description,a=t.hasGreyHeader,o=t.children,c=t.titleLevel,u=void 0===c?1:c,d=this.state,p=d.settings,f=d.inFlight,h=d.error;return(0,l.jsxs)(s.Fragment,{children:[n&&(0,l.jsx)(ls,{title:n,heading:u,description:r}),h&&(0,l.jsx)(Ia,{isError:!0,noticeText:h.message}),(0,l.jsxs)("div",{className:i()("newspack-plugin-settings",{"newspack-wizard-section__is-loading":f&&!Object.keys(p).length}),children:[Object.keys(p).map(function(t){return(0,l.jsx)(Za,{disabled:f,id:"plugin-settings-".concat(t),sectionKey:t,title:e.getSectionTitle(t),description:e.getSectionDescription(t),active:e.isSectionActive(t),fields:e.getSectionFields(t),onChange:e.handleSettingChange(t),onUpdate:e.handleSectionUpdate(t),hasGreyHeader:a},t)}),o]})]})}}])}(s.Component);ts.defaultProps={title:(0,g.__)("General Settings","newspack-plugin")},ts.Section=Za;var ns=["className","padding"];function rs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function as(e,t,n){return t=O(t),P(e,ss()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function ss(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ss=function(){return!!e})()}var os=function(e){function t(){return C(this,t),as(this,t,arguments)}return A(t,e),T(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.padding,r=Xe(e,ns),s=i()("newspack-popover",n&&"newspack-popover__padding-"+n,t);return(0,l.jsx)(a.Popover,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rs(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({className:s},r))}}])}(s.Component);os.defaultProps={padding:!1};var is=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});const ls=function(e){var t=e.backNav,n=void 0===t?"":t,r=e.badges,o=e.centered,c=void 0!==o&&o,u=e.className,d=void 0===u?null:u,p=e.description,f=void 0===p?"":p,h=e.heading,v=void 0===h?2:h,b=e.icon,w=void 0===b?null:b,y=e.isWhite,_=void 0!==y&&y,x=e.noMargin,k=void 0!==x&&x,S=e.pageHeader,j=void 0!==S&&S,C=e.title,E=e.id,T=void 0===E?null:E,P=e.menu,O=e.primaryAction,M=e.secondaryAction,A=e.children,L=void 0===A?null:A,N=(0,s.useRef)();(0,s.useEffect)(function(){var e=new Proxy(new URLSearchParams(window.location.search),{get:function(e,t){return e.get(t)}}).scrollTo;e&&e===T&&window.setTimeout(function(){return N.current.scrollIntoView({behavior:"smooth"})},250)},[]);var I=i()("newspack-section-header",c&&"newspack-section-header--is-centered",_&&"newspack-section-header--is-white",k&&"newspack-section-header--no-margin",j&&"newspack-section-header--page-header"),D="h".concat(v),z=null;return"string"==typeof C?z=(0,l.jsxs)("div",{className:"newspack-section-header__title-container",children:[(0,l.jsxs)(D,{className:"newspack-section-header__title",children:[C,null!=r&&r.length?r.map(function(e,t){return(0,l.jsx)(Y,{text:e.label,level:e.level||"default"},t)}):null]}),M&&(0,l.jsx)("div",{className:"newspack-section-header__secondary-action",children:(0,l.jsx)(Cn,{variant:"link",href:M.href,onClick:M.action,children:M.label})}),(null==P?void 0:P.length)>0&&(0,l.jsx)(a.DropdownMenu,{className:"newspack-section-header__menu",icon:Tn,label:(0,g.__)("More options","newspack-plugin"),children:function(){return P.map(function(e,t){return(0,l.jsx)(a.MenuItem,{icon:e.icon,href:e.href,onClick:e.action,disabled:e.disabled||!1,isDestructive:e.destructive||!1,children:e.label},t)})}})]}):"function"==typeof C&&(z=(0,l.jsx)(D,{className:"newspack-section-header__title",children:C()})),(0,l.jsxs)("div",{id:T,className:i()("newspack-section-header__container",n&&"newspack-section-header--has-back-nav",O&&"newspack-section-header--has-primary-action",d),ref:N,children:[(0,l.jsxs)(_a,{columns:1,gutter:8,className:I,children:[w&&(0,l.jsx)("div",{className:"newspack-section-header__icon",children:(0,l.jsx)(m.A,{icon:w,size:48})}),n?(0,l.jsxs)(a.__experimentalHStack,{alignment:"left",style:{position:"relative"},children:[(0,l.jsx)("div",{className:"newspack-section-header__back-nav",children:(0,l.jsx)(a.Tooltip,{text:(0,g.__)("Go back","newspack-plugin"),children:(0,l.jsx)(Cn,{href:n,icon:is,variant:"tertiary"})})}),z]}):z,f&&"string"==typeof f&&(0,l.jsx)("p",{children:f}),"function"==typeof f&&(0,l.jsx)("p",{children:f()}),f&&"string"!=typeof f&&"function"!=typeof f&&(0,l.jsx)("p",{children:f}),L&&(0,l.jsx)("div",{className:"newspack-section-header__children",children:L})]}),O&&(0,l.jsx)("div",{className:"newspack-section-header__primary-action",children:(0,l.jsx)(Cn,{href:O.href,variant:"primary",onClick:O.action,children:O.label})})]})};var cs=n(2636),us=n.n(cs),ds=["help","label","onChange","optgroups","className","hideLabelFromVision"];function ps(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ps(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ps(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hs(e){var t=e.help,n=e.label,r=e.onChange,s=e.optgroups,o=void 0===s?[]:s,c=e.className,u=e.hideLabelFromVision,d=Xe(e,ds),p=Gr.useUniqueId("group-select");return(0,l.jsx)(a.BaseControl,{label:n,hideLabelFromVision:u,id:p,help:t,className:i()(c,"components-select-control"),children:(0,l.jsxs)("div",{className:"newspack-grouped-select-control__field",children:[(0,l.jsxs)("select",fs(fs({id:p,className:"components-select-control__input",onChange:function(e){var t=e.target.value,n=$n()(o,function(e){return us()(e.options,["value",t])});r(t,n)},"aria-describedby":t?"".concat(p,"__help"):void 0},d),{},{children:[(0,l.jsx)("option",{value:"",children:(0,g.__)("-- Select --","newspack-plugin")}),o.map(function(e,t){var n=e.label,r=e.options;return(0,l.jsx)("optgroup",{label:n,children:r.map(function(e,t){return(0,l.jsx)("option",{value:e.value,disabled:e.disabled,children:e.label},"".concat(e.label,"-").concat(e.value,"-").concat(t))})},t)})]})),(0,l.jsx)("div",{className:"components-select-control__arrow-wrapper",children:(0,l.jsx)(m.A,{icon:y,size:18})})]})})}const gs=function(e){var t=e.buttonOptions,n=e.buttonSmall,r=e.className,s=e.help,o=e.hideLabelFromVision,c=e.label,u=e.onChange,d=e.value,p=Gr.useUniqueId("button-group");return(0,l.jsx)(a.BaseControl,{label:c,help:s,hideLabelFromVision:o,id:p.current,className:i()(r,"components-select-control"),children:(0,l.jsx)(a.ButtonGroup,{children:t.map(function(e){var t=d===e.value,r=function(){return e.label};return e.icon&&(r=function(){return(0,l.jsx)(m.A,{icon:e.icon})}),(0,l.jsx)(a.Button,{variant:t?"primary":null,isPressed:t,onClick:function(){return u(e.value)},isSmall:n,children:(0,l.jsx)(r,{})},e.value)})})})};var ms=["className","optgroups","buttonOptions","buttonSmall"];function vs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vs(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ws(e,t,n){return t=O(t),P(e,ys()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function ys(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ys=function(){return!!e})()}var _s=function(e){function t(){return C(this,t),ws(this,t,arguments)}return A(t,e),T(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.optgroups,r=e.buttonOptions,s=e.buttonSmall,o=Xe(e,ms),c=i()("newspack-select-control",n&&"newspack-grouped-select-control",r&&"newspack-buttons-select-control",t);return(0,l.jsx)("div",{className:c,children:n?(0,l.jsx)(hs,bs({optgroups:n},o)):r?(0,l.jsx)(gs,bs({buttonOptions:r,buttonSmall:s},o)):(0,l.jsx)(a.SelectControl,bs({},o))})}}])}(s.Component);const xs=_s,ks={...Q},Ss=ks.useInsertionEffect,js=Ss&&Ss!==ks.useLayoutEffect?Ss:e=>e();function Cs(e){const t=te(Es).current;return t.next=e,js(t.effect),t.trampoline}function Es(){const e={next:void 0,callback:Ts,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Ts(){}const Ps="undefined"!=typeof document?K.useLayoutEffect:()=>{},Os=K.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Ms(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:a}=e,s=Cs(a),o=K.useRef(0),i=te(Ls).current,c=te(As).current,[u,d]=K.useState(0),p=K.useRef(u),f=Cs((e,t)=>{c.set(e,t??null),p.current+=1,d(p.current)}),h=Cs(e=>{c.delete(e),p.current+=1,d(p.current)}),g=K.useMemo(()=>{const e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(Ns).forEach((t,n)=>{const r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,u]);Ps(()=>{if("function"!=typeof MutationObserver||0===g.size)return;const e=new MutationObserver(e=>{const t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),0===t.size&&(p.current+=1,d(p.current))});return g.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[g]),Ps(()=>{p.current===u&&(n.current.length!==g.size&&(n.current.length=g.size),r&&r.current.length!==g.size&&(r.current.length=g.size),o.current=g.size),s(g)},[s,g,n,r,u]),Ps(()=>()=>{n.current=[]},[n]),Ps(()=>()=>{r&&(r.current=[])},[r]);const m=Cs(e=>(i.add(e),()=>{i.delete(e)}));Ps(()=>{i.forEach(e=>e(g))},[i,g]);const v=K.useMemo(()=>({register:f,unregister:h,subscribeMapChange:m,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,h,m,n,r,o]);return(0,l.jsx)(Os.Provider,{value:v,children:t})}function As(){return new Map}function Ls(){return new Set}function Ns(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function Is(){return"undefined"!=typeof window}function Ds(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function zs(e){return!!Is()&&(e instanceof HTMLElement||e instanceof Ds(e).HTMLElement)}function Bs(e){return Ds(e).getComputedStyle(e)}const Rs="ArrowUp",Hs="ArrowDown",Vs="ArrowLeft",$s="ArrowRight",Fs="Home",Gs="End",qs=new Set([Vs,$s]),Us=new Set([Vs,$s,Fs,Gs]),Ws=new Set([Rs,Hs]),Xs=new Set([Rs,Hs,Fs,Gs]),Ys=new Set([...qs,...Ws]),Zs=new Set([...Ys,Fs,Gs]),Ks=new Set(["Shift","Control","Alt","Meta"]);function Qs(e){return!(!function(e){return zs(e)&&"INPUT"===e.tagName}(e)||null==e.selectionStart)||!(!zs(e)||"TEXTAREA"!==e.tagName)}function Js(e,t,n,r){if(!e||!t||!t.scrollTo)return;let a=e.scrollLeft,s=e.scrollTop;const o=e.clientWidth<e.scrollWidth,i=e.clientHeight<e.scrollHeight;if(o&&"vertical"!==r){const r=eo(e,t,"left"),s=to(e),o=to(t);"ltr"===n&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-s.scrollPaddingRight?a=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+s.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+s.scrollPaddingLeft&&(a=r-o.scrollMarginLeft-s.scrollPaddingLeft)),"rtl"===n&&(r-o.scrollMarginRight<e.scrollLeft+s.scrollPaddingLeft?a=r-o.scrollMarginLeft-s.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-s.scrollPaddingRight&&(a=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+s.scrollPaddingRight))}if(i&&"horizontal"!==r){const n=eo(e,t,"top"),r=to(e),a=to(t);n-a.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?s=n-a.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+a.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(s=n+t.offsetHeight+a.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:a,top:s,behavior:"auto"})}function eo(e,t,n){const r="left"===n?"offsetLeft":"offsetTop";let a=0;for(;t.offsetParent&&(a+=t[r],t.offsetParent!==e);)t=t.offsetParent;return a}function to(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}Math.min,Math.max;const no=Math.round,ro=Math.floor;function ao(e){e.preventDefault(),e.stopPropagation()}const so="ArrowLeft",oo="ArrowRight";function io(e,t,n){return Math.floor(e/t)!==n}function lo(e,t){return t<0||t>=e.length}function co(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:a=1}={}){let s=t;do{s+=n?-a:a}while(s>=0&&s<=e.length-1&&fo(e,s,r));return s}function uo(e,t,n,r,a){if(-1===e)return-1;const s=n.indexOf(e),o=t[e];switch(a){case"tl":return s;case"tr":return o?s+o.width-1:s;case"bl":return o?s+(o.height-1)*r:s;case"br":return n.lastIndexOf(e);default:return-1}}function po(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function fo(e,t,n){if("function"==typeof n?n(t):n?.includes(t))return!0;const r=e[t];return!!r&&(!function(e,t=(e?Bs(e):null)){return!(!(e&&e.isConnected&&t)||function(e){return"hidden"===e.visibility||"collapse"===e.visibility}(t))&&("function"==typeof e.checkVisibility?e.checkVisibility():"none"!==t.display&&"contents"!==t.display)}(r)||!n&&(r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")))}const ho="data-composite-item-active";function go(e){return"composedPath"in e?e.composedPath()[0]:e.target}const mo=[];const vo=K.createContext(void 0);function bo(e=!1){const t=K.useContext(vo);if(void 0===t&&!e)throw new Error(Z(16));return t}const wo=K.createContext(void 0);function yo(e){const{render:t,className:n,style:r,refs:a=ue,props:s=ue,state:o=de,stateAttributesMapping:i,highlightedIndex:c,onHighlightedIndexChange:u,orientation:d,dense:p,itemSizes:f,loopFocus:h,onLoop:g,cols:m,enableHomeAndEndKeys:v,onMapChange:b,stopEventPropagation:w=!0,rootRef:y,disabledIndices:_,modifierKeys:x,highlightItemOnHover:k=!1,tag:S="div",...j}=e,C=function(){const e=K.useContext(wo);return e?.direction??"ltr"}(),{props:E,highlightedIndex:T,onHighlightedIndexChange:P,elementsRef:O,onMapChange:M,relayKeyboardEvent:A}=function(e){const{itemSizes:t,cols:n=1,loopFocus:r=!0,onLoop:a,dense:s=!1,orientation:o="both",direction:i,highlightedIndex:l,onHighlightedIndexChange:c,rootRef:u,enableHomeAndEndKeys:d=!1,stopEventPropagation:p=!1,disabledIndices:f,modifierKeys:h=mo}=e,[g,m]=K.useState(0),v=n>1,b=K.useRef(null),w=ne(b,u),y=K.useRef([]),_=K.useRef(!1),x=l??g,k=Cs((e,t=!1)=>{if((c??m)(e),t){const t=y.current[e];Js(b.current,t,i,o)}}),S=Cs(e=>{if(0===e.size||_.current)return;_.current=!0;const t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(ho))??null,r=n?t.indexOf(n):-1;-1!==r&&k(r),Js(b.current,n,i,o)}),j=Cs((e,t,n)=>a?a?.(e,t,n,y):n),C=K.useMemo(()=>({"aria-orientation":"both"===o?void 0:o,ref:w,onFocus(e){const t=b.current,n=go(e.nativeEvent);t&&null!=n&&Qs(n)&&n.setSelectionRange(0,n.value.length??0)},onKeyDown(e){const l=d?Zs:Ys;if(!l.has(e.key))return;if(function(e,t){for(const n of Ks.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}(e,h))return;if(!b.current)return;const c="rtl"===i,u=c?Vs:$s,g={horizontal:u,vertical:Hs,both:u}[o],m=c?$s:Vs,w={horizontal:m,vertical:Rs,both:m}[o],_=go(e.nativeEvent);if(null!=_&&Qs(_)&&null!=(S=_)&&!S.hasAttribute("disabled")&&"true"!==S.getAttribute("aria-disabled")){const t=_.selectionStart,n=_.selectionEnd,r=_.value??"";if(null==t||e.shiftKey||t!==n)return;if(e.key!==w&&t<r.length)return;if(e.key!==g&&t>0)return}var S;let C=x;const E=function(e,t){return co(e.current,{disabledIndices:t})}(y,f),T=function(e,t){return co(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}(y,f);if(v){const a=t||Array.from({length:y.current.length},()=>({width:1,height:1})),i=function(e,t,n){const r=[];let a=0;return e.forEach(({width:e,height:s},o)=>{let i=!1;for(n&&(a=0);!i;){const n=[];for(let r=0;r<e;r+=1)for(let e=0;e<s;e+=1)n.push(a+r+e*t);a%t+e<=t&&n.every(e=>null==r[e])?(n.forEach(e=>{r[e]=o}),i=!0):a+=1}}),[...r]}(a,n,s),l=i.findIndex(e=>null!=e&&!fo(y.current,e,f)),u=i.reduce((e,t,n)=>null==t||fo(y.current,t,f)?e:n,-1);C=i[function(e,{event:t,orientation:n,loopFocus:r,onLoop:a,rtl:s,cols:o,disabledIndices:i,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}){let p,f=u;if("ArrowUp"===t.key?p="up":"ArrowDown"===t.key&&(p="down"),p){const n=[],s=[];let h=!1,g=0;{let t=null,r=-1;e.forEach((e,a)=>{if(null==e)return;g+=1;const o=e.closest('[role="row"]');o&&(h=!0),o===t&&-1!==r||(t=o,r+=1,n[r]=[]),n[r].push(a),s[a]=r})}let m=!1,v=0;if(h)for(const e of n){const t=e.length;t>v&&(v=t),t!==o&&(m=!0)}const b=m&&g<e.length,w=v||o,y=o=>{if(!m||-1===u)return;const l=s[u];if(null==l)return;const c=n[l].indexOf(u),d="up"===o?-1:1;for(let o=l+d,p=0;p<n.length;p+=1,o+=d){if(o<0||o>=n.length){if(!r||b)return;if(o=o<0?n.length-1:0,a){const e=Math.min(c,n[o].length-1),r=n[o][e]??n[o][0],i=a(t,u,r);o=s[i]??o}}const l=n[o];for(let t=Math.min(c,l.length-1);t>=0;t-=1){const n=l[t];if(!fo(e,n,i))return n}}},_=t=>{if(!b||-1===u)return;const n=u%w,a="up"===t?-w:w,s=c-c%w,o=ro(c/w)+1;for(let t=u-n+a,l=0;l<o;l+=1,t+=a){if(t<0||t>c){if(!r)return;t=t<0?s:0}const a=Math.min(t+w-1,c);for(let r=Math.min(t+n,a);r>=t;r-=1)if(!fo(e,r,i))return r}};d&&ao(t);const x=y(p)??_(p);if(void 0!==x)f=x;else if(-1===u)f="up"===p?c:l;else if(f=co(e,{startingIndex:u,amount:w,decrement:"up"===p,disabledIndices:i}),r){if("up"===p&&(u-w<l||f<0)){const e=u%w,n=c%w,r=c-(n-e);f=n===e?c:n>e?r:r-w,a&&(f=a(t,u,f))}"down"===p&&u+w>c&&(f=co(e,{startingIndex:u%w-w,amount:w,disabledIndices:i}),a&&(f=a(t,u,f)))}lo(e,f)&&(f=u)}if("both"===n){const n=ro(u/o);t.key===(s?so:oo)&&(d&&ao(t),u%o!==o-1?(f=co(e,{startingIndex:u,disabledIndices:i}),r&&io(f,o,n)&&(f=co(e,{startingIndex:u-u%o-1,disabledIndices:i}),a&&(f=a(t,u,f)))):r&&(f=co(e,{startingIndex:u-u%o-1,disabledIndices:i}),a&&(f=a(t,u,f))),io(f,o,n)&&(f=u)),t.key===(s?oo:so)&&(d&&ao(t),u%o!==0?(f=co(e,{startingIndex:u,decrement:!0,disabledIndices:i}),r&&io(f,o,n)&&(f=co(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:i}),a&&(f=a(t,u,f)))):r&&(f=co(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:i}),a&&(f=a(t,u,f))),io(f,o,n)&&(f=u));const l=ro(c/o)===n;lo(e,f)&&(r&&l?(f=t.key===(s?oo:so)?c:co(e,{startingIndex:u-u%o-1,disabledIndices:i}),a&&(f=a(t,u,f))):f=u)}return f}(i.map(e=>null!=e?y.current[e]:null),{event:e,orientation:o,loopFocus:r,onLoop:j,cols:n,disabledIndices:po([...f||y.current.map((e,t)=>fo(y.current,t)?t:void 0),void 0],i),minIndex:l,maxIndex:u,prevIndex:uo(x>T?E:x,a,i,n,e.key===Hs?"bl":e.key===$s?"tr":"tl"),rtl:c})]}const P={horizontal:[u],vertical:[Hs],both:[u,Hs]}[o],O={horizontal:[m],vertical:[Rs],both:[m,Rs]}[o],M=v?l:{horizontal:d?Us:qs,vertical:d?Xs:Ws,both:l}[o];d&&(e.key===Fs?C=E:e.key===Gs&&(C=T)),C===x&&(P.includes(e.key)||O.includes(e.key))&&(r&&C===T&&P.includes(e.key)?(C=E,a&&(C=a(e,x,C,y))):r&&C===E&&O.includes(e.key)?(C=T,a&&(C=a(e,x,C,y))):C=co(y.current,{startingIndex:C,decrement:O.includes(e.key),disabledIndices:f})),C===x||lo(y.current,C)||(p&&e.stopPropagation(),M.has(e.key)&&e.preventDefault(),k(C,!0),queueMicrotask(()=>{y.current[C]?.focus()}))}}),[n,s,i,f,y,d,x,v,t,r,a,j,w,h,k,o,p]);return K.useMemo(()=>({props:C,highlightedIndex:x,onHighlightedIndexChange:k,elementsRef:y,disabledIndices:f,onMapChange:S,relayKeyboardEvent:C.onKeyDown}),[C,x,k,y,f,S])}({itemSizes:f,cols:m,loopFocus:h,onLoop:g,dense:p,orientation:d,highlightedIndex:c,onHighlightedIndexChange:u,rootRef:y,stopEventPropagation:w,enableHomeAndEndKeys:v,direction:C,disabledIndices:_,modifierKeys:x}),L=Se(S,e,{state:o,ref:a,props:[E,...s,j],stateAttributesMapping:i}),N=K.useMemo(()=>({highlightedIndex:T,onHighlightedIndexChange:P,highlightItemOnHover:k,relayKeyboardEvent:A}),[T,P,k,A]);return(0,l.jsx)(vo.Provider,{value:N,children:(0,l.jsx)(Ms,{elementsRef:O,onMapChange:e=>{b?.(e),M(e)},children:L})})}let _o=function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e}({});const xo={tabActivationDirection:e=>({[_o.activationDirection]:e})},ko=K.createContext(void 0);function So(){const e=K.useContext(ko);if(void 0===e)throw new Error(Z(64));return e}const jo=K.createContext(void 0);function Co(){const e=K.useContext(jo);if(void 0===e)throw new Error(Z(65));return e}const Eo=K.forwardRef(function(e,t){const{activateOnFocus:n=!1,className:r,loopFocus:a=!0,render:s,style:o,...i}=e,{onValueChange:c,orientation:u,value:d,setTabMap:p,tabActivationDirection:f}=So(),[h,g]=K.useState(0),[m,v]=K.useState(null),b=K.useRef(new Set),w=K.useRef(new Set),y=K.useRef(null);K.useEffect(()=>{if("undefined"==typeof ResizeObserver)return;const e=new ResizeObserver(()=>{b.current.forEach(e=>{e()})});return y.current=e,m&&e.observe(m),w.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),y.current=null}},[m]);const _=Cs(e=>(b.current.add(e),()=>{b.current.delete(e)})),x=Cs(e=>(w.current.add(e),y.current?.observe(e),()=>{w.current.delete(e),y.current?.unobserve(e)})),k=Cs((e,t)=>{e!==d&&c(e,t)}),S={orientation:u,tabActivationDirection:f},j={"aria-orientation":"vertical"===u?"vertical":void 0,role:"tablist"},C=K.useMemo(()=>({activateOnFocus:n,highlightedTabIndex:h,registerIndicatorUpdateListener:_,registerTabResizeObserverElement:x,onTabActivation:k,setHighlightedTabIndex:g,tabsListElement:m}),[n,h,_,x,k,g,m]);return(0,l.jsx)(jo.Provider,{value:C,children:(0,l.jsx)(yo,{render:s,className:r,style:o,state:S,refs:[t,v],props:[j,i],stateAttributesMapping:xo,highlightedIndex:h,enableHomeAndEndKeys:!0,loopFocus:a,orientation:u,onHighlightedIndexChange:g,onMapChange:p,disabledIndices:ue})})});function To(e){const t=Bs(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=zs(e),s=a?e.offsetWidth:n,o=a?e.offsetHeight:r;return(no(n)!==s||no(r)!==o)&&(n=s,r=o),{width:n,height:r}}var Po=n(3098);function Oo(){return ce}function Mo(){return!1}function Ao(){return!0}let Lo=function(e){return e.activeTabLeft="--active-tab-left",e.activeTabRight="--active-tab-right",e.activeTabTop="--active-tab-top",e.activeTabBottom="--active-tab-bottom",e.activeTabWidth="--active-tab-width",e.activeTabHeight="--active-tab-height",e}({});const No=K.createContext(void 0),Io={disableStyleElements:!1},Do={...xo,activeTabPosition:()=>null,activeTabSize:()=>null},zo=K.forwardRef(function(e,t){const{className:n,render:r,renderBeforeHydration:a=!1,style:s,...o}=e,{nonce:i}=K.useContext(No)??Io,{getTabElementBySelectedValue:c,orientation:u,tabActivationDirection:d,value:p}=So(),{tabsListElement:f,registerIndicatorUpdateListener:h}=Co(),g=(0,Po.useSyncExternalStore)(Oo,Mo,Ao),m=function(){const[,e]=K.useState({});return K.useCallback(()=>{e({})},[])}();K.useEffect(()=>h(m),[h,m]);let v=0,b=0,w=0,y=0,_=0,x=0,k=!1;if(null!=p&&null!=f){const e=c(p);if(k=!0,null!=e){const{width:t,height:n}=To(e),{width:r,height:a}=To(f),s=e.getBoundingClientRect(),o=f.getBoundingClientRect(),i=r>0?o.width/r:1,l=a>0?o.height/a:1;if(Math.abs(i)>Number.EPSILON&&Math.abs(l)>Number.EPSILON){const e=s.left-o.left,t=s.top-o.top;v=e/i+f.scrollLeft-f.clientLeft,w=t/l+f.scrollTop-f.clientTop}else v=e.offsetLeft,w=e.offsetTop;_=t,x=n,b=f.scrollWidth-v-_,y=f.scrollHeight-w-x}}const S=Se("span",e,{state:{orientation:u,activeTabPosition:k?{left:v,right:b,top:w,bottom:y}:null,activeTabSize:k?{width:_,height:x}:null,tabActivationDirection:d},ref:t,props:[{role:"presentation",style:k?{[Lo.activeTabLeft]:`${v}px`,[Lo.activeTabRight]:`${b}px`,[Lo.activeTabTop]:`${w}px`,[Lo.activeTabBottom]:`${y}px`,[Lo.activeTabWidth]:`${_}px`,[Lo.activeTabHeight]:`${x}px`}:void 0,hidden:!(k&&_>0&&x>0)},o,{suppressHydrationWarning:!0}],stateAttributesMapping:Do});return null==p?null:(0,l.jsxs)(K.Fragment,{children:[S,g&&a&&(0,l.jsx)("script",{nonce:i,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var Bo="data-wp-hash";function Ro(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=Ro();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[n,r]of t.styles)Ho(e,n,r)}(document)),e.__wpStyleRuntime}function Ho(e,t,n){if(!e.head)return;const r=Ro();let a=r.injectedStyles.get(e);if(a||(a=new Set,r.injectedStyles.set(e,a)),a.has(t))return;if(function(e,t){if(!e.head)return!1;for(const n of e.head.querySelectorAll(`style[${Bo}]`))if(n.getAttribute(Bo)===t)return!0;return!1}(e,t))return void a.add(t);const s=e.createElement("style");s.setAttribute(Bo,t),s.appendChild(e.createTextNode(n)),e.head.appendChild(s),a.add(t)}!function(e,t){const n=Ro();n.styles.set(e,t);for(const r of n.documents.keys())Ho(r,e,t)}("bb8cbb8f31",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7313adbc8a112e90__tablist{--direction-factor:1;--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-factor:-1;--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:transparent 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,transparent 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid transparent;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6e6e6e);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\n\t\t\t&[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:transparent;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:var(--wpds-dimension-size-lg,40px);padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\n\t\t\t\t[role=tab]:is([aria-selected=true])\n\t\t\t\t&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}');var Vo={tablist:"_7313adbc8a112e90__tablist","is-overflowing-first":"_9f2ac729c68a735a__is-overflowing-first","is-overflowing-last":"_81c799c1f3cdd261__is-overflowing-last","is-minimal-variant":"_59228b5227f38a99__is-minimal-variant",indicator:"_1c37dcfaa1ad8cda__indicator",tab:"a5fd8814f195aa5e__tab","tab-children":"_5dfc77e6edd345d4__tab-children","tab-chevron":"_4a20e969d15e5ac1__tab-chevron"},$o=(0,s.forwardRef)(function({children:e,variant:t="default",className:n,activateOnFocus:r,...a},o){const[i,c]=(0,s.useState)(null),[u,d]=(0,s.useState)({first:!1,last:!1,isScrolling:!1});(0,s.useEffect)(()=>{if(!i)return;const e=()=>{const{scrollWidth:e,clientWidth:t,scrollLeft:n}=i,r=Math.max(e-t,0),a="rtl"===(i.dir||("undefined"!=typeof window?window.getComputedStyle(i).direction:"ltr"))&&n<0?-n:n;d({first:a>1,last:a<r-1,isScrolling:e>t})},t=new ResizeObserver(e);t.observe(i);let n=!1;const r=()=>{n||(requestAnimationFrame(()=>{e(),n=!1}),n=!0)};return i.addEventListener("scroll",r,{passive:!0}),e(),()=>{i.removeEventListener("scroll",r),t.disconnect()}},[i]);const p=(0,Hn.useMergeRefs)([o,e=>c(e)]);return(0,l.jsxs)(Eo,{ref:p,activateOnFocus:r,"data-select-on-move":r?"true":"false",className:Le(Vo.tablist,u.first&&Vo["is-overflowing-first"],u.last&&Vo["is-overflowing-last"],Vo[`is-${t}-variant`],n),...a,tabIndex:a.tabIndex??(u.isScrolling?-1:void 0),children:[e,(0,l.jsx)(zo,{className:Vo.indicator})]})});function Fo(e){return e?.ownerDocument||document}let Go=0;const qo=ks.useId;function Uo(e){return function(e,t){if(void 0!==qo){const n=qo();return e??(t?`${t}-${n}`:n)}return function(e,t="mui"){const[n,r]=K.useState(e),a=e||n;return K.useEffect(()=>{null==n&&(Go+=1,r(`${t}-${Go}`))},[n,t]),a}(e,t)}(e,"base-ui")}function Wo(e){return zs(e)&&"BUTTON"===e.tagName}let Xo=function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e}({});function Yo(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:a,index:s}=e,{register:o,unregister:i,subscribeMapChange:l,elementsRef:c,labelsRef:u,nextIndexRef:d}=K.useContext(Os),p=K.useRef(-1),[f,h]=K.useState(s??(a===Xo.GuessFromOrder?()=>{if(-1===p.current){const e=d.current;d.current+=1,p.current=e}return p.current}:-1)),g=K.useRef(null),m=K.useCallback(e=>{if(g.current=e,-1!==f&&null!==e&&(c.current[f]=e,u)){const n=void 0!==t;u.current[f]=n?t:r?.current?.textContent??e.textContent}},[f,c,u,t,r]);return Ps(()=>{if(null!=s)return;const e=g.current;return e?(o(e,n),()=>{i(e)}):void 0},[s,o,i,n]),Ps(()=>{if(null==s)return l(e=>{const t=g.current?e.get(g.current)?.index:null;null!=t&&h(t)})},[s,l,h]),K.useMemo(()=>({ref:m,index:f}),[f,m])}function Zo(e,t,n,r){let a=!1,s=!1;const o=r??de;return{reason:e,event:t??new Event("base-ui"),cancel(){a=!0},allowPropagation(){s=!0},get isCanceled(){return a},get isPropagationAllowed(){return s},trigger:n,...o}}const Ko="none",Qo="missing",Jo="initial",ei=K.forwardRef(function(e,t){const{className:n,disabled:r=!1,render:a,value:s,id:o,nativeButton:i=!0,style:l,...c}=e,{value:u,getTabPanelIdByValue:d,orientation:p}=So(),{activateOnFocus:f,highlightedTabIndex:h,onTabActivation:g,registerTabResizeObserverElement:m,setHighlightedTabIndex:v,tabsListElement:b}=Co(),w=Uo(o),y=K.useMemo(()=>({disabled:r,id:w,value:s}),[r,w,s]),{compositeProps:_,compositeRef:x,index:k}=function(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=bo(),{ref:a,index:s}=Yo(e),o=n===s,i=K.useRef(null),l=ne(a,i),c=K.useMemo(()=>({tabIndex:o?0:-1,onFocus(){r(s)},onMouseMove(){const e=i.current;if(!t||!e)return;const n=e.hasAttribute("disabled")||"true"===e.ariaDisabled;o||n||e.focus()}}),[o,r,s,t]);return{compositeProps:c,compositeRef:l,index:s}}({metadata:y}),S=s===u,j=K.useRef(!1),C=K.useRef(null);K.useEffect(()=>{const e=C.current;if(e)return m(e)},[m]),Ps(()=>{if(j.current)return void(j.current=!1);if(!(S&&k>-1&&h!==k))return;const e=b;if(null!=e){const t=function(e){let t=e.activeElement;for(;null!=t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}(Fo(e));if(t&&function(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&function(e){return!(!Is()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ds(e).ShadowRoot)}(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}(e,t))return}r||v(k)},[S,k,h,v,r,b]);const{getButtonProps:E,buttonRef:T}=function(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:a=!0,composite:s}=e,o=K.useRef(null),i=bo(!0),l=s??void 0!==i,{props:c}=function(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:a=0,isNativeButton:s}=e,o=r&&!1!==t,i=r&&!1===t;return{props:K.useMemo(()=>{const e={onKeyDown(e){n&&t&&"Tab"!==e.key&&e.preventDefault()}};return r||(e.tabIndex=a,!s&&n&&(e.tabIndex=t?a:-1)),(s&&(t||o)||!s&&n)&&(e["aria-disabled"]=n),!s||t&&!i||(e.disabled=n),e},[r,n,t,o,i,s,a])}}({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:a}),u=K.useCallback(()=>{const e=o.current;Wo(e)&&l&&t&&void 0===c.disabled&&e.disabled&&(e.disabled=!1)},[t,c.disabled,l]);return Ps(u,[u]),{getButtonProps:K.useCallback((e={})=>{const{onClick:n,onMouseDown:r,onKeyUp:s,onKeyDown:o,onPointerDown:i,...u}=e;return fe({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t)return;if(_e(e),o?.(e),e.baseUIHandlerPrevented)return;const r=e.target===e.currentTarget,s=e.currentTarget,i=Wo(s),c=!a&&(u=s,Boolean("A"===u?.tagName&&u?.href));var u;const d=r&&(a?i:!c),p="Enter"===e.key,f=" "===e.key,h=s.getAttribute("role"),g=h?.startsWith("menuitem")||"option"===h||"gridcell"===h;if(r&&l&&f){if(e.defaultPrevented&&g)return;return e.preventDefault(),void(c||a&&i?(s.click(),e.preventBaseUIHandler()):d&&(n?.(e),e.preventBaseUIHandler()))}d&&(a||!f&&!p||e.preventDefault(),!a&&p&&n?.(e))},onKeyUp(e){t||(_e(e),s?.(e),e.target===e.currentTarget&&a&&l&&Wo(e.currentTarget)&&" "===e.key?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||a||l||" "!==e.key||n?.(e))},onPointerDown(e){t?e.preventDefault():i?.(e)}},a?{type:"button"}:{role:"button"},c,u)},[t,c,l,a]),buttonRef:Cs(e=>{o.current=e,u()})}}({disabled:r,native:i,focusableWhenDisabled:!0}),P=d(s),O=K.useRef(!1),M=K.useRef(!1);return Se("button",e,{state:{disabled:r,active:S,orientation:p},ref:[t,T,x,C],props:[_,{role:"tab","aria-controls":P,"aria-selected":S,id:w,onClick:function(e){S||r||g(s,Zo(Ko,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){S||(k>-1&&!r&&v(k),r||f&&(!O.current||O.current&&M.current)&&g(s,Zo(Ko,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){S||r||(O.current=!0,e.button&&0!==e.button)||(M.current=!0,Fo(e.currentTarget).addEventListener("pointerup",function(){O.current=!1,M.current=!1},{once:!0}))},[ho]:S?"":void 0,onKeyDownCapture(){j.current=!0}},c,E]})});var ti=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)(v.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),ni=(0,s.forwardRef)(function({icon:e,size:t=24,...n},r){return(0,l.jsx)(v.SVG,{ref:r,...e.props,...n,width:t,height:t})}),ri=function({children:e}){return(0,l.jsx)(l.Fragment,{children:e})},ai="data-wp-hash";function si(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=si();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[n,r]of t.styles)oi(e,n,r)}(document)),e.__wpStyleRuntime}function oi(e,t,n){if(!e.head)return;const r=si();let a=r.injectedStyles.get(e);if(a||(a=new Set,r.injectedStyles.set(e,a)),a.has(t))return;if(function(e,t){if(!e.head)return!1;for(const n of e.head.querySelectorAll(`style[${ai}]`))if(n.getAttribute(ai)===t)return!0;return!1}(e,t))return void a.add(t);const s=e.createElement("style");s.setAttribute(ai,t),s.appendChild(e.createTextNode(n)),e.head.appendChild(s),a.add(t)}!function(e,t){const n=si();n.styles.set(e,t);for(const r of n.documents.keys())oi(r,e,t)}("bb8cbb8f31",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7313adbc8a112e90__tablist{--direction-factor:1;--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-factor:-1;--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:transparent 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,transparent 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid transparent;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6e6e6e);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\n\t\t\t&[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:transparent;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:var(--wpds-dimension-size-lg,40px);padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\n\t\t\t\t[role=tab]:is([aria-selected=true])\n\t\t\t\t&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}');var ii=(0,s.forwardRef)(function({className:e,children:t,...n},r){return(0,l.jsxs)(ei,{ref:r,className:Le("a5fd8814f195aa5e__tab",e),...n,children:[(0,l.jsx)("span",{className:"_5dfc77e6edd345d4__tab-children",children:t}),(0,l.jsx)(ni,{icon:ti,className:"_4a20e969d15e5ac1__tab-chevron"})]})});function li(e){return oe(19)?e:e?"true":void 0}let ci=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const ui={[ci.startingStyle]:""},di={[ci.endingStyle]:""},pi={transitionStatus:e=>"starting"===e?ui:"ending"===e?di:null},fi=window.ReactDOM,hi=[],gi=null;globalThis.requestAnimationFrame;const mi=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;const t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){const t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){const t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,this.callbacksCount-=1)}};class vi{static create(){return new vi}static request(e){return mi.request(e)}static cancel(e){return mi.cancel(e)}currentId=gi;request(e){this.cancel(),this.currentId=mi.request(()=>{this.currentId=gi,e()})}cancel=()=>{this.currentId!==gi&&(mi.cancel(this.currentId),this.currentId=gi)};disposeEffect=()=>this.cancel}function bi(e){const{enabled:t=!0,open:n,ref:r,onComplete:a}=e,s=Cs(a),o=function(e,t=!1,n=!0){const r=function(){const e=te(vi.create).current;var t;return t=e.disposeEffect,K.useEffect(t,hi),e}();return Cs((a,s=null)=>{r.cancel();const o=null==(i=e)?i:"current"in i?i.current:i;var i;if(null==o)return;const l=o,c=()=>{fi.flushSync(a)};if("function"!=typeof l.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)a();else{if(t){const e=ci.startingStyle;if(!l.hasAttribute(e))return void r.request(u);const t=new MutationObserver(()=>{l.hasAttribute(e)||(t.disconnect(),u())});return t.observe(l,{attributes:!0,attributeFilter:[e]}),void s?.addEventListener("abort",()=>t.disconnect(),{once:!0})}r.request(u)}function u(){Promise.all(l.getAnimations().map(e=>e.finished)).then(()=>{s?.aborted||c()}).catch(()=>{if(n)return void(s?.aborted||c());const e=l.getAnimations();!s?.aborted&&e.length>0&&e.some(e=>e.pending||"finished"!==e.playState)&&u()})}})}(r,n,!1);K.useEffect(()=>{if(!t)return;const e=new AbortController;return o(s,e.signal),()=>{e.abort()}},[t,n,s,o])}let wi=function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e[e.startingStyle=ci.startingStyle]="startingStyle",e[e.endingStyle=ci.endingStyle]="endingStyle",e}({});const yi={...xo,...pi},_i=K.forwardRef(function(e,t){const{className:n,value:r,render:a,keepMounted:s=!1,style:o,...i}=e,{value:l,getTabIdByPanelValue:c,orientation:u,tabActivationDirection:d,registerMountedTabPanel:p,unregisterMountedTabPanel:f}=So(),h=Uo(),g=K.useMemo(()=>({id:h,value:r}),[h,r]),{ref:m,index:v}=Yo({metadata:g}),b=r===l,{mounted:w,transitionStatus:y,setMounted:_}=function(e,t=!1,n=!1){const[r,a]=K.useState(e&&t?"idle":void 0),[s,o]=K.useState(e);return e&&!s&&(o(!0),a("starting")),e||!s||"ending"===r||n||a("ending"),e||s||"ending"!==r||a(void 0),Ps(()=>{if(!e&&s&&"ending"!==r&&n){const e=vi.request(()=>{a("ending")});return()=>{vi.cancel(e)}}},[e,s,r,n]),Ps(()=>{if(!e||t)return;const n=vi.request(()=>{a(void 0)});return()=>{vi.cancel(n)}},[t,e]),Ps(()=>{if(!e||!t)return;e&&s&&"idle"!==r&&a("starting");const n=vi.request(()=>{a("idle")});return()=>{vi.cancel(n)}},[t,e,s,r]),{mounted:s,setMounted:o,transitionStatus:r}}(b),x=!w,k=c(r),S={hidden:x,orientation:u,tabActivationDirection:d,transitionStatus:y},j=K.useRef(null),C=Se("div",e,{state:S,ref:[t,m,j],props:[{"aria-labelledby":k,hidden:x,id:h,role:"tabpanel",tabIndex:b?0:-1,inert:li(!b),[wi.index]:v},i],stateAttributesMapping:yi});return bi({open:b,ref:j,onComplete(){b||_(!1)}}),Ps(()=>{if((!x||s)&&null!=h)return p(r,h),()=>{f(r,h)}},[x,s,r,h,p,f]),s||w?C:null});var xi="data-wp-hash";function ki(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=ki();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[n,r]of t.styles)Si(e,n,r)}(document)),e.__wpStyleRuntime}function Si(e,t,n){if(!e.head)return;const r=ki();let a=r.injectedStyles.get(e);if(a||(a=new Set,r.injectedStyles.set(e,a)),a.has(t))return;if(function(e,t){if(!e.head)return!1;for(const n of e.head.querySelectorAll(`style[${xi}]`))if(n.getAttribute(xi)===t)return!0;return!1}(e,t))return void a.add(t);const s=e.createElement("style");s.setAttribute(xi,t),s.appendChild(e.createTextNode(n)),e.head.appendChild(s),a.add(t)}function ji(e,t){const n=ki();n.styles.set(e,t);for(const r of n.documents.keys())Si(r,e,t)}ji("d390e935a7","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");ji("5f8e7aa0bc","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");var Ci=(0,s.forwardRef)(function({className:e,...t},n){return(0,l.jsx)(_i,{ref:n,className:Le("_8c15fd0ed9f28ba4__div","d0541bc9dd9dc7b6__outset-ring--focus-visible",e),...t})});const Ei=K.forwardRef(function(e,t){const{className:n,defaultValue:r=0,onValueChange:a,orientation:s="horizontal",render:o,value:i,style:c,...u}=e,d=void 0!==e.defaultValue,p=K.useRef([]),[f,h]=K.useState(()=>new Map),[g,m]=function({controlled:e,default:t,name:n,state:r="value"}){const{current:a}=K.useRef(void 0!==e),[s,o]=K.useState(t);return[a?e:s,K.useCallback(e=>{a||o(e)},[])]}({controlled:i,default:r,name:"Tabs",state:"value"}),v=void 0!==i,[b,w]=K.useState(()=>new Map),y=K.useCallback(e=>{if(void 0===e)return null;for(const[t,n]of b.entries())if(null!=n&&e===(n.value??n.index))return t;return null},[b]),[_,x]=K.useState(()=>({previousValue:g,tabActivationDirection:"none"})),{previousValue:k,tabActivationDirection:S}=_;let j=S,C=!1;k!==g&&(j=Ti(k,g,s,b),C=null!=k&&null!=g&&null==y(g));const E=C?k:g,T=k!==E||S!==j;Ps(()=>{T&&x({previousValue:E,tabActivationDirection:j})},[E,T,j]);const P=Cs((e,t)=>{const n=Ti(g,e,s,b);t.activationDirection=n,a?.(e,t),t.isCanceled||m(e)}),O=Cs((e,t)=>{a?.(e,Zo(t,void 0,void 0,{activationDirection:"none"}))}),M=Cs((e,t)=>{h(n=>{if(n.get(e)===t)return n;const r=new Map(n);return r.set(e,t),r})}),A=Cs((e,t)=>{h(n=>{if(!n.has(e)||n.get(e)!==t)return n;const r=new Map(n);return r.delete(e),r})}),L=K.useCallback(e=>f.get(e),[f]),N=K.useCallback(e=>{for(const t of b.values())if(e===t?.value)return t?.id},[b]),I=K.useMemo(()=>({getTabElementBySelectedValue:y,getTabIdByPanelValue:N,getTabPanelIdByValue:L,onValueChange:P,orientation:s,registerMountedTabPanel:M,setTabMap:w,unregisterMountedTabPanel:A,tabActivationDirection:j,value:g}),[y,N,L,P,s,M,w,A,j,g]),D=K.useMemo(()=>{for(const e of b.values())if(null!=e&&e.value===g)return e},[b,g]),z=K.useMemo(()=>{for(const e of b.values())if(null!=e&&!e.disabled)return e.value},[b]),B=K.useRef(!d),R=K.useRef(d),H=K.useRef(!1);Ps(()=>{if(v)return;function e(e,t){m(e),x(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),O(e,t),B.current=!1}if(0===b.size){if(!H.current||null===g)return;return void e(null,Qo)}H.current=!0;const t=D?.disabled,n=null==D&&null!==g;if(t||g!==r||(R.current=!1),R.current&&t&&g===r)return;const a=B.current;if(t||n){const n=z??null;if(g===n)return void(B.current=!1);let r=Qo;return a?r=Jo:t&&(r="disabled"),void e(n,r)}a&&null!=D&&(O(g,Jo),B.current=!1)},[r,z,v,O,D,m,b,g]);const V=Se("div",e,{state:{orientation:s,tabActivationDirection:j},ref:t,props:u,stateAttributesMapping:xo});return(0,l.jsx)(ko.Provider,{value:I,children:(0,l.jsx)(Ms,{elementsRef:p,children:V})})});function Ti(e,t,n,r){if(null==e||null==t)return"none";let a=null,s=null;for(const[n,o]of r.entries()){if(null==o)continue;const r=o.value??o.index;if(e===r&&(a=n),t===r&&(s=n),null!=a&&null!=s)break}if(null==a||null==s)return a===s||"number"!=typeof e&&"string"!=typeof e||typeof e!=typeof t?"none":"horizontal"===n?t>e?"right":"left":t>e?"down":"up";const o=a.getBoundingClientRect(),i=s.getBoundingClientRect();if("horizontal"===n){if(i.left<o.left)return"left";if(i.left>o.left)return"right"}else{if(i.top<o.top)return"up";if(i.top>o.top)return"down"}return"none"}var Pi=(0,s.forwardRef)(function({...e},t){return(0,l.jsx)(ri,{children:(0,l.jsx)(Ei,{ref:t,...e})})}),Oi=wn.matchPath,Mi=function(e,t){if(Array.isArray(e.activeTabPaths)){var n=e.activeTabPaths.some(function(e){return e.endsWith("*")?function(e,t){var n=e.slice(0,-1).replace(/\/$/,"");return t===n||t.startsWith(n+"/")}(e,t):e===t});if(n)return!0}if(!e.path)return!1;var r="/"===e.path||!0===e.exact;return!!Oi(t,{path:e.path,exact:r})};function Ai(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Li(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ai(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ai(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ni=wn.useHistory,Ii=wn.useLocation,Di=function(e,t){return e.path||e.href||"item-".concat(t)},zi=function(e,t){return!!e.selected||(null===t?Boolean(e.href)&&window.location.href===e.href:Mi(e,t))},Bi=function(e,t){return(0,l.jsxs)(l.Fragment,{children:[e,t]})},Ri=function(e){var t=e.items,n=e.className,r=e.disableUpcoming,a=e.content,s=void 0===a?null:a,o=e.renderShell,c=void 0===o?Bi:o,u=e.children,d=void 0===u?null:u,p=Ni(),f=Ii().pathname,h=t.filter(function(e){return!e.isHiddenInTabbedNavigation}),g=h.reduce(function(e,t,n){var r,a;return zi(t,f)&&(-1===e||((null===(r=t.path)||void 0===r?void 0:r.length)||0)>((null===(a=h[e].path)||void 0===a?void 0:a.length)||0))?n:e},-1),m=g>-1?Di(h[g],g):null,v=(0,l.jsxs)("div",{className:i()("newspack-tabbed-navigation",n),children:[(0,l.jsx)($o,{activateOnFocus:!1,children:h.map(function(e,t){var n=r&&t>g,a=e.path?"#".concat(e.path):e.href;return(0,l.jsx)(ii,{value:Di(e,t),disabled:n,nativeButton:!1,render:(0,l.jsx)("a",{href:n?void 0:a,onClick:n||!e.path?void 0:function(t){return function(e,t){e.defaultPrevented||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),t.path!==f&&p.push(t.path))}(t,e)}}),children:e.label},Di(e,t))})}),d]}),b=h.map(function(e,t){var n=Di(e,t);return(0,l.jsx)(Ci,{value:n,tabIndex:-1,className:"newspack-tabbed-navigation__panel",children:n===m?s:null},n)}),w=null===m?s:null;return(0,l.jsx)(Pi,{value:m,className:"newspack-tabbed-navigation__root",children:c(v,(0,l.jsxs)(l.Fragment,{children:[b,w]}))})},Hi=function(e){var t=e.items,n=e.className,r=e.content,a=void 0===r?null:r,s=e.renderShell,o=void 0===s?Bi:s,c=e.children,u=void 0===c?null:c,d=t.filter(function(e){return!e.isHiddenInTabbedNavigation});return o((0,l.jsxs)("nav",{className:i()("newspack-tabbed-navigation","newspack-tabbed-navigation--links",n),"aria-label":(0,g.__)("Secondary navigation","newspack-plugin"),children:[d.map(function(e,t){return(0,l.jsx)("a",{href:e.href,className:"newspack-tabbed-navigation__link","aria-current":zi(e,null)?"page":void 0,children:e.label},Di(e,t))}),u]}),a)};const Vi=function(e){return e.items.some(function(e){return e.path})?(0,l.jsx)(Ri,Li({},e)):(0,l.jsx)(Hi,Li({},e))};var $i=["className","required","isWide","withMargin"];function Fi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Gi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fi(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const qi=function(e){var t=e.className,n=void 0===t?"":t,r=e.required,o=void 0!==r&&r,c=e.isWide,u=void 0!==c&&c,d=e.withMargin,p=void 0===d||d,f=Xe(e,$i),h=(0,s.useRef)(null);(0,s.useEffect)(function(){if(null!==h.current){var e=h.current.querySelector("label");e&&e.setAttribute("data-required-text",(0,g.__)("(required)","newspack-plugin"))}},[h.current]);var m=i()("newspack-text-control",{"newspack-text-control--wide":u,"newspack-text-control--with-margin":p},n);return o?(0,l.jsx)("div",{ref:h,className:"newspack-text-control--required",children:(0,l.jsx)(a.TextControl,Gi({className:m,required:o},f))}):(0,l.jsx)(a.TextControl,Gi({className:m},f))};var Ui=["className","isRight","isLeft","isCenter","noMargin"];function Wi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Xi(e,t,n){return t=O(t),P(e,Yi()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function Yi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Yi=function(){return!!e})()}var Zi=function(e){function t(){return C(this,t),Xi(this,t,arguments)}return A(t,e),T(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.isRight,r=e.isLeft,s=e.isCenter,o=e.noMargin,c=Xe(e,Ui),u=i()("newspack-waiting",t,{"is-right":n,"is-left":r,"is-center":s,"no-margin":o});return(0,l.jsx)(a.Spinner,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wi(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({className:u},c))}}])}(s.Component);const Ki=Zi;var Qi=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})}),Ji=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})}),el=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{d:"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z"})}),tl=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})});function nl(e,t,n){return t=O(t),P(e,rl()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function rl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rl=function(){return!!e})()}var al="newspack-components-web-preview-wrapper";(function(e){function t(e){var n;return C(this,t),d(n=nl(this,t,[e]),"state",{device:"desktop",loaded:!1,isPreviewVisible:!1}),d(n,"handleKeyDown",function(e){"Escape"===e.key&&n.state.isPreviewVisible&&n.closePreview()}),d(n,"closePreview",function(){var e=n.props.onClose;(void 0===e?function(){}:e)(),n.setState({isPreviewVisible:!1,loaded:!1})}),d(n,"getWebPreviewModal",function(){var e=n.props,t=e.beforeLoad,r=void 0===t?function(){}:t,o=e.url,c=e.title,u=n.state,d=u.device,p=u.loaded,f=u.isPreviewVisible;if(!n.modalDOMElement||!f)return null;var h=i()("newspack-web-preview",d,p&&"is-loaded"),m=Qi;return"desktop"===d?m=Ji:"tablet"===d&&(m=el),r(),(0,s.createPortal)((0,l.jsx)("div",{className:h,children:(0,l.jsxs)("div",{className:"newspack-web-preview__interior",children:[(0,l.jsxs)("div",{className:"newspack-web-preview__toolbar",children:[c&&(0,l.jsx)("div",{className:"newspack-web-preview__toolbar-left",children:(0,l.jsx)("h3",{children:c})}),(0,l.jsxs)("div",{className:"newspack-web-preview__toolbar-right",children:[(0,l.jsx)(a.DropdownMenu,{icon:m,label:(0,g.__)("Preview Size","newspack-plugin"),children:function(e){var t=e.onClose;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.MenuItem,{icon:"desktop"===d?b:null,role:"menuitemradio",isSelected:"desktop"===d,onClick:function(){n.setState({device:"desktop"}),t()},children:(0,g.__)("Desktop","newspack-plugin")}),(0,l.jsx)(a.MenuItem,{icon:"tablet"===d?b:null,role:"menuitemradio",isSelected:"tablet"===d,onClick:function(){n.setState({device:"tablet"}),t()},children:(0,g.__)("Tablet","newspack-plugin")}),(0,l.jsx)(a.MenuItem,{icon:"phone"===d?b:null,role:"menuitemradio",isSelected:"phone"===d,onClick:function(){n.setState({device:"phone"}),t()},children:(0,g.__)("Phone","newspack-plugin")})]})}}),(0,l.jsx)(a.Button,{onClick:n.closePreview,icon:tl,label:(0,g.__)("Close Preview","newspack-plugin")})]})]}),(0,l.jsxs)("div",{className:"newspack-web-preview__content",children:[!p&&(0,l.jsxs)("div",{className:"newspack-web-preview__is-waiting",children:[(0,l.jsx)(Ki,{isLeft:!0}),(0,g.__)("Loading…","newspack-plugin")]}),(0,l.jsx)("iframe",{ref:n.iframeRef,title:"web-preview",src:o,onLoad:function(){n.setState({loaded:!0}),n.props.onLoad(n.iframeRef.current)}})]})]})}),n.modalDOMElement)}),d(n,"showPreview",function(){n.setState({isPreviewVisible:!0})}),n.iframeRef=(0,s.createRef)(),n}return A(t,e),T(t,[{key:"componentDidMount",value:function(){var e=document.getElementById(al);this.modalDOMElement=e||document.createElement("div"),e||(this.modalDOMElement.id=al,document.body.appendChild(this.modalDOMElement))}},{key:"componentDidUpdate",value:function(e,t){!0===this.state.isPreviewVisible?(document.body.classList.add("newspack-web-preview--open"),!1===t.isPreviewVisible&&document.addEventListener("keydown",this.handleKeyDown)):(document.body.classList.remove("newspack-web-preview--open"),!0===t.isPreviewVisible&&document.removeEventListener("keydown",this.handleKeyDown))}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown),document.body.classList.remove("newspack-web-preview--open")}},{key:"render",value:function(){var e=this.props,t=e.label,n=e.variant,r=e.renderButton;return(0,l.jsxs)(s.Fragment,{children:[r?r({showPreview:this.showPreview}):(0,l.jsx)(a.Button,{variant:n,onClick:this.showPreview,tabIndex:"0",children:t}),this.getWebPreviewModal()]})}}])}(s.Component)).defaultProps={url:"//newspack.com",label:(0,g.__)("Preview","newspack-plugin"),onLoad:function(){}};var sl=(0,l.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(v.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z"})}),ol=n(2154),il=n.n(ol),ll=n(2438),cl=n.n(ll),ul=n(483),dl=n.n(ul),pl=function(e){return function(t){return{type:e,payload:t}}};function fl(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function s(n,r,a,s){var l=r&&r.prototype instanceof i?r:i,c=Object.create(l.prototype);return hl(c,"_invoke",function(n,r,a){var s,i,l,c=0,u=a||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return s=t,i=0,l=e,p.n=n,o}};function f(n,r){for(i=n,l=r,t=0;!d&&c&&!a&&t<u.length;t++){var a,s=u[t],f=p.p,h=s[2];n>3?(a=h===r)&&(l=s[(i=s[4])?5:(i=3,3)],s[4]=s[5]=e):s[0]<=f&&((a=n<2&&f<s[1])?(i=0,p.v=r,p.n=s[1]):f<h&&(a=n<3||s[0]>r||r>h)&&(s[4]=n,s[5]=r,p.n=h,i=0))}if(a||n>1)return o;throw d=!0,r}return function(a,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&f(u,h),i=u,l=h;(t=i<2?e:l)||!d;){s||(i?i<3?(i>1&&(p.n=-1),f(i,l)):p.n=l:p.v=l);try{if(c=2,s){if(i||(a="next"),t=s[a]){if(!(t=t.call(s,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,i<2&&(i=0)}else 1===i&&(t=s.return)&&t.call(s),i<2&&(l=TypeError("The iterator does not provide a '"+a+"' method"),i=1);s=e}else if((t=(d=p.n<0)?l:n.call(r,p))!==o)break}catch(t){s=e,i=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,a,s),!0),c}var o={};function i(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(hl(t={},r,function(){return this}),t),d=c.prototype=i.prototype=Object.create(u);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,hl(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,hl(d,"constructor",c),hl(c,"constructor",l),l.displayName="GeneratorFunction",hl(c,a,"GeneratorFunction"),hl(d),hl(d,a,"Generator"),hl(d,r,function(){return this}),hl(d,"toString",function(){return"[object Generator]"}),(fl=function(){return{w:s,m:p}})()}function hl(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}hl=function(e,t,n,r){function s(t,n){hl(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(s("next",0),s("throw",1),s("return",2))},hl(e,t,n,r)}function gl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ml(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gl(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var vl="newspack/wizards",bl={headerData:{actions:[],backNav:"",badges:[],sectionDescription:"",sectionName:"",sectionTitle:""},isLoading:!1,isQuietLoading:!1,apiData:{},notices:[],error:null},wl=function(e){return JSON.parse(JSON.stringify(e))},yl={setHeaderData:pl("SET_HEADER_DATA"),resetHeaderData:pl("RESET_HEADER_DATA"),startLoadingData:pl("START_LOADING_DATA"),finishLoadingData:pl("FINISH_LOADING_DATA"),fetchFromAPI:pl("FETCH_FROM_API"),setAPIDataForWizard:pl("SET_API_DATA"),updateWizardSettings:pl("UPDATE_WIZARD_SETTINGS"),addNotice:pl("ADD_NOTICE"),removeNotice:pl("REMOVE_NOTICE"),resetNotices:pl("RESET_NOTICES"),setError:pl("SET_ERROR"),saveWizardSettings:function(e){var t=e.slug,n=e.section,r=void 0===n?"":n,a=e.payloadPath,s=void 0!==a&&a,o=e.auxData,i=void 0===o?{}:o,l=e.updatePayload,c=void 0===l?null:l;return fl().m(function e(){var n,a,o;return fl().w(function(e){for(;;)switch(e.n){case 0:if(!c){e.n=1;break}return e.n=1,yl.updateWizardSettings(ml({slug:t},c));case 1:return n=(0,qr.select)(vl).getWizardAPIData(t),a=s?cl()(n,s):n,e.n=2,yl.fetchFromAPI({path:"/newspack/v1/wizard/".concat(t,"/").concat(r),method:"POST",data:ml(ml({},a),i),isQuietFetch:!0});case 2:if(o=e.v,dl()(o)||o.error){e.n=3;break}return e.a(2,yl.setAPIDataForWizard({slug:t,data:o}));case 3:return e.a(2)}},e)})()},wizardApiFetch:fl().m(function e(t){var n;return fl().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,yl.fetchFromAPI(t);case 1:return n=e.v,e.a(2,n)}},e)})},_l=(0,qr.createReduxStore)(vl,{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bl,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.payload,a=void 0===r?{}:r;switch(n){case"SET_HEADER_DATA":return ml(ml({},e),{},{headerData:ml(ml({},e.headerData),a)});case"RESET_HEADER_DATA":return ml(ml({},e),{},{headerData:ml({},bl.headerData)});case"START_LOADING_DATA":return a.isQuietLoading?ml(ml({},e),{},{isQuietLoading:!0}):ml(ml({},e),{},{isLoading:!0});case"FINISH_LOADING_DATA":return ml(ml({},e),{},{isLoading:!1,isQuietLoading:!1});case"SET_API_DATA":return ml(ml({},e),{},{apiData:il()(wl(e.apiData),[a.slug],a.data)});case"UPDATE_WIZARD_SETTINGS":return ml(ml({},e),{},{apiData:il()(wl(e.apiData),[a.slug].concat(j(a.path)),a.value)});case"ADD_NOTICE":return ml(ml({},e),{},{notices:[].concat(j(e.notices),[a])});case"REMOVE_NOTICE":return ml(ml({},e),{},{notices:e.notices.filter(function(e){return e.id!==a})});case"SET_ERROR":return ml(ml({},e),{},{error:a});case"RESET_NOTICES":return ml(ml({},e),{},{notices:bl.notices});default:return e}},actions:yl,selectors:{getHeaderData:function(e){return e.headerData},isLoading:function(e){return e.isLoading},isQuietLoading:function(e){return e.isQuietLoading},getWizardAPIData:function(e,t){return e.apiData[t]||{}},getWizardData:function(e,t){var n;return null!==(n=e.apiData[t])&&void 0!==n?n:{}},getNotices:function(e){return e.notices},getError:function(e){return e.error}},controls:{FETCH_FROM_API:function(e){var t=e.payload,n=t.isLocalError,r=void 0!==n&&n,a=t.isQuietFetch,s=void 0!==a&&a;return(0,qr.dispatch)(vl).startLoadingData({isQuietLoading:Boolean(s)}),V()(e.payload).then(function(e){return(0,qr.dispatch)(vl).setError(null),e}).catch(function(e){if(r)throw e;(0,qr.dispatch)(vl).setError(e)}).finally(function(e){return(0,qr.dispatch)(vl).finishLoadingData(),e})}},resolvers:{getWizardAPIData:fl().m(function e(t){var n;return fl().w(function(e){for(;;)switch(e.n){case 0:if(!t){e.n=2;break}return e.n=1,yl.fetchFromAPI({path:"/newspack/v1/wizard/".concat(t)});case 1:return n=e.v,e.a(2,yl.setAPIDataForWizard({slug:t,data:n}));case 2:return e.a(2,yl.finishLoadingData())}},e)})}});const xl=function(){return(0,qr.register)(_l)};(Object.getOwnPropertyDescriptor(xl,"name")||{}).writable||Object.defineProperty(xl,"name",{value:"default",configurable:!0});var kl=["children","type","actions"];function Sl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sl(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const Cl=function(e){var t=e.children,n=e.type,r=e.actions,s=void 0===r?[]:r,o=Xe(e,kl),c=i()("newspack-wizard__snackbar",o.className),u="error"===n?"assertive":"polite",d=(0,qr.useDispatch)(vl),p=d.removeNotice,f=d.resetNotices;return(0,l.jsx)(a.Snackbar,jl(jl({},o),{},{className:c,politeness:u,onRemove:function(){o.onRemove&&o.onRemove(),o.id?p(o.id):f()},actions:s,children:t}))},El=function(){var e=(0,qr.useSelect)(function(e){return e(vl).getError()});if(!e)return null;var t=function(e){var t=e.data,n=e.message,r=e.code,a="fatal";return t&&"level"in t?a=t.level:"rest_invalid_param"===r&&(a="notice"),{message:n,level:a}}(e),n=t.level,r=t.message;if("fatal"===n){var s="undefined"!=typeof newspack_urls&&newspack_urls.dashboard;return(0,l.jsxs)(Ca,{title:(0,g.__)("Unrecoverable error"),onRequestClose:s?function(){return window.location=s}:void 0,children:[(0,l.jsx)(Ia,{noticeText:r,isError:!0,rawHTML:!0}),s&&(0,l.jsx)(a.__experimentalHStack,{justify:"flex-end",spacing:4,wrap:!0,className:"newspack-modal__footer",children:(0,l.jsx)(Cn,{isPrimary:!0,href:s,children:(0,g.__)("Return to Dashboard","newspack-plugin")})})]})}return(0,l.jsx)(Ia,{isError:!0,className:"newspack-wizard__above-header",noticeText:r,rawHTML:!0})};function Tl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Pl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tl(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}xl();var Ol={chevronLeft:is,category:sl,moreVertical:Tn},Ml=wn.HashRouter,Al=wn.Redirect,Ll=wn.Route,Nl=wn.Switch,Il=wn.useLocation,Dl=function(){var e=Il(),t=(0,qr.useDispatch)(vl).resetHeaderData;return(0,s.useEffect)(function(){t(),window.scrollTo(0,0)},[e.pathname,t]),null},zl=function(e){var t=e.hideHeader,n=e.headerText,r=e.sections,a=e.sectionName,o=e.subTitle,i=e.actions,c=e.tabbedNavigation,u=e.children,d=Il().pathname;if(t)return(0,s.isValidElement)(c)?(0,s.cloneElement)(c,{content:u}):u;var p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return null!=e&&e.length&&(e.find(function(e){return Mi(e,t)})||e[0]).breadcrumbs||[]}(r,d);return!p.length&&n&&(p=[{label:n}]),p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t?(Array.isArray(t)?t:[{label:t}]).filter(function(e){return null==e?void 0:e.label}).reduce(function(e,t){var n;return(null===(n=e[e.length-1])||void 0===n?void 0:n.label)===t.label?e:[].concat(j(e),[t])},e):e}(p,a),(0,l.jsx)(Ra,{breadcrumbItems:p,subTitle:o,actions:i,tabbedNavigation:c,children:u})};(0,s.forwardRef)(function(e,t){var n=e.sections,r=void 0===n?[]:n,o=e.headerText,c=e.apiSlug,u=e.sharedProps,d=void 0===u?{}:u,p=e.subHeaderText,f=e.hasSimpleFooter,m=e.className,v=e.renderAboveSections,b=e.requiredPlugins,w=void 0===b?[]:b,y=e.isInitialFetchTriggered,_=void 0===y||y,x=e.hideHeader,k=void 0!==x&&x,S=(0,qr.useSelect)(function(e){return e(vl).isLoading()}),j=(0,qr.useSelect)(function(e){return e(vl).isQuietLoading()}),C=(0,qr.useSelect)(function(e){return e(vl).getHeaderData()}),E=(0,qr.useSelect)(function(e){return e(vl).getNotices()}),T=(0,qr.useDispatch)(vl).invalidateResolution,P=C.actions,O=C.backNav,M=C.badges,A=C.sectionDescription,L=C.sectionMenu,N=C.sectionName,I=C.sectionTitle,D=C.sectionPrimaryAction,z=C.sectionSecondaryAction,B=null==P?void 0:P.filter(function(e){return"primary"===e.type||"secondary"===e.type}),R=null==P?void 0:P.filter(function(e){return"more"===e.type});(0,qr.useSelect)(function(e){return _&&e(vl).getWizardAPIData(c)});var H=r.filter(function(e){return!e.isHidden}),V=h((0,s.useState)(0===w.length),2),$=V[0],F=V[1],G=(0,s.useRef)(!1),q=function(e){var t=e.complete;F(t),t?G.current&&(G.current=!1,c&&_&&T("getWizardAPIData",[c])):G.current=!0};$||(o=w.length>1?(0,g.__)("Required plugins","newspack-plugin"):(0,g.__)("Required plugin","newspack-plugin"),H=[{path:"/",render:function(){return(0,l.jsx)(qa,{plugins:w,onStatus:q})}}]);var U=$?r:H,W=H.length>1&&(0,l.jsx)(Vi,{items:H,children:(0,l.jsx)(El,{})}),X=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ua,{}),r.length>1&&(0,l.jsx)(Dl,{}),(0,l.jsx)("div",{className:"newspack-wizard__main",children:(0,l.jsxs)(Nl,{children:[U.map(function(e,t){var n,r=e.render,a=e.props||{};return(0,l.jsx)(Ll,{exact:null!==(n=e.exact)&&void 0!==n&&n,path:e.path,render:function(t){return(0,l.jsxs)("div",{className:i()("newspack-wizard__content",m,{"newspack-wizard__content--full-width":e.fullWidth}),children:["function"==typeof v?v():null,(I||e.title)&&(0,l.jsx)(ls,{className:"newspack-wizard__section-header",backNav:O||e.backNav,title:I||e.title,description:A||e.description,badges:M||e.badges,menu:L||e.menu,primaryAction:D||e.primaryAction,secondaryAction:z||e.secondaryAction,heading:2,noMargin:!0}),(0,l.jsx)(r,Pl(Pl(Pl({},t),a),d))]})}},t)}),(0,l.jsx)(Al,{to:H[0].path})]})})]}),Y=(null==P?void 0:P.length)>0?(0,l.jsxs)(l.Fragment,{children:[B.map(function(e,t){return(0,l.jsx)(Cn,{className:"newspack-wizard__actions__main",href:e.href,icon:(n=e.icon,"string"==typeof n?Ol[n]||null:n),variant:e.type,onClick:e.action,disabled:e.disabled||!1,isDestructive:e.destructive||!1,children:e.label},t);var n}),(0,l.jsx)(a.DropdownMenu,{className:0===(null==R?void 0:R.length)?"newspack-wizard__actions__more--primary-only":"",icon:Tn,label:(0,g.__)("More","newspack-plugin"),popoverProps:{className:"newspack-wizard__actions__more"},children:function(){return P.reduce(function(e,t){return(t.separator||0===e.length)&&e.push([]),e[e.length-1].push(t),e},[]).map(function(e,t){return(0,l.jsx)(a.MenuGroup,{children:e.map(function(e,t){return(0,l.jsx)(a.MenuItem,{className:"primary"===e.type||"secondary"===e.type?"newspack-wizard__actions__more__main":"newspack-wizard__actions__more__more",icon:e.icon,href:e.href,onClick:e.action,disabled:e.disabled||!1,isDestructive:e.destructive||!1,children:e.label},t)})},t)})}})]}):void 0;return(0,l.jsxs)("div",{ref:t,children:[(0,l.jsxs)("div",{className:i()(S?"newspack-wizard__is-loading":"newspack-wizard__is-loaded",{"newspack-wizard__is-loading-quiet":j}),children:[(0,l.jsxs)(Ml,{hashType:"slash",children:[newspack_aux_data.is_debug_mode&&(0,l.jsx)(Ia,{debugMode:!0}),(0,l.jsx)(zl,{hideHeader:k,headerText:o,sections:U,sectionName:N,subTitle:p,actions:Y,tabbedNavigation:W,children:X})]}),(null==E?void 0:E.length)>0&&(0,l.jsx)("div",{className:"newspack-wizard__snackbar-list",children:E.map(function(e,t){return(0,l.jsx)(Cl,{id:e.id,type:e.type,actions:e.actions,children:e.message},e.id||t)})})]}),!S&&(0,l.jsx)(Jr,{simple:f})]})}),n(860),n(9323),n(9589)},9551(e,t,n){"use strict";n.d(t,{dM:()=>j,Ay:()=>O,$A:()=>S,MD:()=>k});var r=n(1455),a=n.n(r),s=n(4715),o=n(4997),i=n(6427);const l=window.wp.coreData;var c=n(6087),u=n(7143),d=n(8537),p=n(509),f=n(8618),h=n(6533),g=n(554),m=n(7723),v=n(3832),b=n(8492),w=n(1727);const y=(0,c.createContext)(null);"undefined"!=typeof window&&(window.NewspackAuthorContext=y);var _=n(715),x=n(790);window.__newspackAuthorsByBlock=window.__newspackAuthorsByBlock||{},"function"==typeof o.registerBlockBindingsSource&&(0,o.registerBlockBindingsSource)({name:"newspack-blocks/author",label:(0,m.__)("Author Profile","newspack-blocks"),getValues({bindings:e,clientId:t,select:n}){const r=n("core/block-editor").getBlockParents(t),a=window.__newspackAuthorsByBlock,s=r.find(e=>a[e]),o=s&&a[s]||{},i="placeholder"===o.id;return Object.fromEntries(Object.entries(e).map(([e,{args:t}])=>{const n=t?.key;if(!n||i)return[e,""];if("url"===n||"archive_url"===n)return[e,o.url||""];if("archive_link_text"===n){const t=o.name?(0,m.sprintf)(/* translators: %s: author name */ /* translators: %s: author name */
13
13
  (0,m.__)("More by %s","newspack-blocks"),o.name):"",n=o.url||"#";return[e,t?`<a href="${n}" class="no-op">${t}</a>`:""]}return[e,o[n]||""]}))}});const k=[{value:"%",label:"%"},{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"}],S=[{value:"small",label:/* translators: label for small text size option */ /* translators: label for small text size option */(0,m.__)("Small","newspack-blocks"),shortName:/* translators: abbreviation for small text size option */ /* translators: abbreviation for small text size option */(0,m.__)("S","newspack-blocks")},{value:"medium",label:/* translators: label for medium text size option */ /* translators: label for medium text size option */(0,m.__)("Medium","newspack-blocks"),shortName:/* translators: abbreviation for medium text size option */ /* translators: abbreviation for medium text size option */(0,m.__)("M","newspack-blocks")},{value:"large",label:/* translators: label for small text size option */ /* translators: label for small text size option */(0,m.__)("Large","newspack-blocks"),shortName:/* translators: abbreviation for large text size option */ /* translators: abbreviation for large text size option */(0,m.__)("L","newspack-blocks")},{value:"extra-large",label:/* translators: label for extra-large text size option */ /* translators: label for extra-large text size option */(0,m.__)("Extra Large","newspack-blocks"),shortName:/* translators: abbreviation for small text size option */ /* translators: abbreviation for small text size option */(0,m.__)("XL","newspack-blocks")}],j=[{value:72,label:/* translators: label for small avatar size option */ /* translators: label for small avatar size option */(0,m.__)("Small","newspack-blocks"),shortName:/* translators: abbreviation for small avatar size option */ /* translators: abbreviation for small avatar size option */(0,m.__)("S","newspack-blocks")},{value:128,label:/* translators: label for medium avatar size option */ /* translators: label for medium avatar size option */(0,m.__)("Medium","newspack-blocks"),shortName:/* translators: abbreviation for medium avatar size option */ /* translators: abbreviation for medium avatar size option */(0,m.__)("M","newspack-blocks")},{value:192,label:/* translators: label for large avatar size option */ /* translators: label for large avatar size option */(0,m.__)("Large","newspack-blocks"),shortName:/* translators: abbreviation for large avatar size option */ /* translators: abbreviation for large avatar size option */(0,m.__)("L","newspack-blocks")},{value:256,label:/* translators: label for extra-large avatar size option */ /* translators: label for extra-large avatar size option */(0,m.__)("Extra-large","newspack-blocks"),shortName:/* translators: abbreviation for extra-large avatar size option */ /* translators: abbreviation for extra-large avatar size option */(0,m.__)("XL","newspack-blocks")}];function C({clientId:e,name:t,setAttributes:n}){const{blockType:r,defaultVariation:a,variations:i}=(0,u.useSelect)(e=>{const{getBlockVariations:n,getBlockType:r,getDefaultBlockVariation:a}=e(o.store);return{blockType:r(t),defaultVariation:a(t,"block"),variations:n(t,"block")}},[t]),{replaceInnerBlocks:l}=(0,u.useDispatch)(s.store),c=(0,s.useBlockProps)();return(0,x.jsx)("div",{...c,children:(0,x.jsx)(s.__experimentalBlockVariationPicker,{icon:r?.icon?.src,label:r?.title,variations:i,instructions:(0,m.__)("Select a layout to start with:","newspack-blocks"),onSelect:(t=a)=>{n({...t.attributes,variation:t.name}),t.innerBlocks&&l(e,(0,o.createBlocksFromInnerBlocksTemplate)(t.innerBlocks),!0)}})})}let E=null;const T=Object.freeze({id:"placeholder",url:"#",avatar:"",social:Object.freeze({}),email:Object.freeze({url:"mailto:placeholder@example.com",svg:""}),newspack_phone_number:Object.freeze({url:"tel:0000000000",svg:""})}),P=(e={})=>{if(!(Object.keys(e).length>0))return T;const t=Object.fromEntries(Object.entries(e).filter(([e])=>!["email","phone"].includes(e)).map(([e,t])=>[e,{url:"#",svg:t||""}]));return{...T,social:t,email:{url:"mailto:placeholder@example.com",svg:e.email||""},newspack_phone_number:{url:"tel:0000000000",svg:e.phone||""}}},O=({attributes:e,setAttributes:t,context:n,clientId:r})=>{const{replaceInnerBlocks:T}=(0,u.useDispatch)(s.store),[O,M]=(0,c.useState)(null),[A,L]=(0,c.useState)([]),[N,I]=(0,c.useState)(null),[D,z]=(0,c.useState)(null),[B,R]=(0,c.useState)(!1),[H,V]=(0,c.useState)(0),[$,F]=(0,c.useState)(!1),[G,q]=(0,c.useState)(0),[U,W]=(0,c.useState)({}),{authorId:X,isGuestAuthor:Y,isContextual:Z,layoutVersion:K,showSocial:Q,showEmail:J,textSize:ee,showAvatar:te,avatarAlignment:ne,avatarBorderRadius:re,avatarSize:ae,avatarHideDefault:se,showEmptyBio:oe,variation:ie}=e,le=(0,s.useBlockProps)(),ce=(0,u.useSelect)(e=>e("core/editor")?.getCurrentPostId?.(),[]),ue=n?.postId||ce,{customBylineActive:de,bylineAuthorIdsStr:pe}=(0,u.useSelect)(e=>{if(!Z)return{customBylineActive:!1,bylineAuthorIdsStr:""};const t=e("core/editor")?.getEditedPostAttribute?.("meta");return t?._newspack_byline_active?{customBylineActive:!0,bylineAuthorIdsStr:[...(t?._newspack_byline??"").matchAll(/\[Author\s+id\s*=\s*(\d+)\]/gi)].map(e=>e[1]).join(",")}:{customBylineActive:!1,bylineAuthorIdsStr:""}},[Z]),fe=pe?pe.split(",").map(Number):[],he=(0,u.useSelect)(e=>{const t=e("core/editor")?.getCurrentPostType?.();return"wp_template"===t||"wp_template_part"===t},[]);(0,c.useEffect)(()=>{he&&(E||(E=a()({path:"/newspack/v1/social-icons"}).catch(()=>({}))),E).then(W)},[he]);const ge=(0,u.useSelect)(e=>{const t=e(l.store).getCurrentTheme();return(t?.is_block_theme??!1)&&!!(0,o.getBlockType)("newspack/avatar")&&!!(0,o.getBlockType)("newspack/author-profile-social")},[]),me=(0,u.useSelect)(e=>!!e(s.store).getBlocks(r).length,[r]),ve=(0,u.useSelect)(e=>e(o.store).getBlockVariations("newspack-blocks/author-profile","block"),[]),be=(0,c.useMemo)(()=>ve?.find(e=>e.isDefault),[ve]),we=(0,c.useMemo)(()=>{const e=ve?.find(e=>e.name===ie);return e?.innerBlocks||be?.innerBlocks},[ve,ie,be]),ye=0===X&&!Z;(0,c.useEffect)(()=>{ge&&1===K&&ye&&t({layoutVersion:2})},[ge,K,ye,t]);const[_e,xe]=(0,c.useState)(me);(0,c.useEffect)(()=>{!_e&&ie&&!me&&we&&(T(r,(0,o.createBlocksFromInnerBlocksTemplate)(we),!0),xe(!0))},[_e,ie,me,we,r,T]),(0,c.useEffect)(()=>{Z||0===X||ke()},[X,se,Y,Z]),(0,c.useEffect)(()=>{Z&&!he?de?fe.length?je():L([]):ue?Se():L([]):L([])},[Z,ue,se,J,de,pe,he]);const ke=async()=>{z(null),R(!0);try{const e={author_id:X,is_guest_author:Y?1:0,fields:"id,name,bio,email,social,avatar,url"};se&&(e.avatar_hide_default=1);const t=(await a()({path:(0,v.addQueryArgs)("/newspack-blocks/v1/authors",e)})).pop();if(!t)throw(0,m.sprintf)(/* translators: %s: error text for when no authors are found. */ /* translators: %s: error text for when no authors are found. */
14
14
  (0,m.__)("No authors or guest authors found for ID %s.","newspack-blocks"),X);M(t)}catch(e){z(e.message||e||(0,m.sprintf)(/* translators: %s: error text for when no authors are found. */ /* translators: %s: error text for when no authors are found. */
15
15
  (0,m.__)("No authors or guest authors found for ID %s.","newspack-blocks"),X))}R(!1)},Se=async()=>{z(null),R(!0);try{const e=["id","name","bio","social","avatar","url"];J&&e.push("email");const t={post_id:ue,fields:e.join(",")};se&&(t.avatar_hide_default=1);const n=await a()({path:(0,v.addQueryArgs)("/newspack-blocks/v1/authors",t)});L(n||[])}catch(e){z(e.message||e||(0,m.__)("Error fetching authors for this post.","newspack-blocks")),L([])}R(!1)},je=async()=>{z(null),R(!0);try{const e=["id","name","bio","social","avatar","url"];J&&e.push("email");const t=await Promise.all(fe.map(t=>{const n={author_id:t,is_guest_author:0,fields:e.join(",")};return se&&(n.avatar_hide_default=1),a()({path:(0,v.addQueryArgs)("/newspack-blocks/v1/authors",n)})}));L(t.flat().filter(Boolean))}catch(e){z(e.message||e||(0,m.__)("Error fetching byline authors.","newspack-blocks")),L([])}R(!1)},Ce=(0,c.useMemo)(()=>{let e;if(Z){if(he)return[P(U)];e=A}else e=O?[O]:[];return oe||(e=e.filter(e=>e.bio)),e},[Z,oe,he,U,A,O]);(0,c.useEffect)(()=>{q(0)},[Ce.length]),(0,c.useEffect)(()=>{if(2!==K)return;const e=Math.min(G,Math.max(0,Ce.length-1)),t=Ce[e]||null;return window.__newspackAuthorsByBlock[r]=t,()=>{delete window.__newspackAuthorsByBlock[r]}},[Ce,G,K,r]);const Ee=e=>{const t=Q&&e?.social||{};return J&&e?.email?t.email=e.email:delete t.email,t},Te=2===K,Pe=(0,x.jsxs)(s.InspectorControls,{children:[Te&&(0,x.jsx)(i.PanelBody,{title:(0,m.__)("Display","newspack-blocks"),children:(0,x.jsx)(i.ToggleControl,{label:(0,m.__)("Show authors without bio","newspack-blocks"),help:(0,m.__)("Display author profiles even if their bio is empty.","newspack-blocks"),checked:oe,onChange:()=>t({showEmptyBio:!oe}),__nextHasNoMarginBottom:!0})}),!Te&&(0,x.jsxs)(i.PanelBody,{title:(0,m.__)("Settings","newspack-blocks"),children:[(0,x.jsx)(i.__experimentalToggleGroupControl,{label:(0,m.__)("Text size","newspack-blocks"),value:ee,onChange:e=>t({textSize:e}),isBlock:!0,__next40pxDefaultSize:!0,children:S.map(e=>(0,x.jsx)(i.__experimentalToggleGroupControlOption,{label:e.shortName,value:e.value},e.value))}),(0,x.jsx)(w.P,{attributes:e,setAttributes:t})]}),!Te&&(0,x.jsxs)(i.PanelBody,{title:(0,m.__)("Avatar","newspack-blocks"),children:[(0,x.jsx)(i.ToggleControl,{label:(0,m.__)("Display avatar","newspack-blocks"),checked:te,onChange:()=>t({showAvatar:!te}),__nextHasNoMarginBottom:!0}),te&&(0,x.jsx)(i.ToggleControl,{label:(0,m.__)("Hide default avatar","newspack-blocks"),checked:se,onChange:()=>t({avatarHideDefault:!se}),__nextHasNoMarginBottom:!0}),te&&(0,x.jsx)(i.__experimentalToggleGroupControl,{label:(0,m.__)("Size","newspack-blocks"),"aria-label":(0,m.__)("Avatar size","newspack-blocks"),value:ae,onChange:e=>t({avatarSize:e}),isBlock:!0,__next40pxDefaultSize:!0,children:j.map(e=>(0,x.jsx)(i.__experimentalToggleGroupControlOption,{label:e.shortName,value:e.value},e.value))}),te&&(0,x.jsx)(i.__experimentalUnitControl,{label:(0,m.__)("Border radius","newspack-blocks"),"aria-label":(0,m.__)("Avatar border radius","newspack-blocks"),labelPosition:"edge",__next40pxDefaultSize:!0,__unstableInputWidth:"80px",units:k,value:re,onChange:e=>t({avatarBorderRadius:0>parseFloat(e)?"0":e})})]})]}),Oe=(0,x.jsxs)("div",{...le,children:[Pe,(0,x.jsx)(i.Placeholder,{className:"newspack-blocks-author-profile",icon:p.A,label:(0,m.__)("Author Profile","newspack-blocks"),children:(0,x.jsxs)(i.__experimentalVStack,{alignment:"center",style:{width:"100%"},children:[(0,x.jsx)(i.Spinner,{style:{margin:"0"}}),(0,x.jsx)("span",{style:{fontWeight:"500"},children:(0,m.__)("Fetching authors…","newspack-blocks")})]})})]}),Me=Ce.length>0&&(0,x.jsxs)(s.BlockControls,{children:[!Te&&te&&!e.className?.includes("is-style-center")&&(0,x.jsx)(i.Toolbar,{controls:[{icon:f.A,title:(0,m.__)("Show avatar on left","newspack-blocks"),isActive:"left"===ne,onClick:()=>t({avatarAlignment:"left"})},{icon:h.A,title:(0,m.__)("Show avatar on right","newspack-blocks"),isActive:"right"===ne,onClick:()=>t({avatarAlignment:"right"})}]}),!Z&&(0,x.jsx)(i.Toolbar,{controls:[{icon:g.A,title:(0,m.__)("Edit selection","newspack-blocks"),onClick:()=>{t({authorId:0}),M(null)}}]})]}),Ae=(0,x.jsxs)("div",{...le,children:[Pe,(0,x.jsxs)(i.Placeholder,{className:"newspack-blocks-author-profile",icon:p.A,label:(0,m.__)("Author Profile","newspack-blocks"),instructions:(0,m.__)("Select a type:","newspack-blocks"),children:[(0,x.jsx)(i.Button,{variant:"primary",onClick:()=>t({isContextual:!0}),children:(0,m.__)("Contextual","newspack-blocks")}),(0,x.jsx)(i.Button,{variant:"secondary",onClick:()=>F(!0),children:(0,m.__)("Specific","newspack-blocks")})]})]});if(Te){if(!ge)return(0,x.jsxs)("div",{...le,children:[Pe,(0,x.jsx)(i.Placeholder,{className:"newspack-blocks-author-profile",icon:p.A,label:(0,m.__)("Author Profile","newspack-blocks"),children:(0,x.jsx)(i.Notice,{status:"warning",isDismissible:!1,children:(0,m.__)("This block was created with a block theme and is not supported in the current theme. It will render using the classic layout on the frontend.","newspack-blocks")})})]});if(!me)return(0,x.jsx)(C,{clientId:r,name:"newspack-blocks/author-profile",setAttributes:t});if(!X&&!Z&&!$)return Ae;if(B)return Oe;if(Z&&de&&!fe.length)return(0,x.jsxs)("div",{...le,children:[Pe,(0,x.jsx)("div",{className:"newspack-author-profile-disabled",children:(0,x.jsx)(i.Notice,{status:"warning",isDismissible:!1,children:(0,m.__)("Author bio is hidden because Custom Byline is active on this post.","newspack-blocks")})})]});if(!Z&&!X)return(0,x.jsxs)("div",{...le,children:[Pe,(0,x.jsxs)(i.Placeholder,{className:"newspack-blocks-author-profile",icon:p.A,label:(0,m.__)("Author Profile","newspack-blocks"),children:[D&&(0,x.jsx)(i.Notice,{status:"error",isDismissible:!1,children:D}),(0,x.jsx)(_.IW,{label:(0,m.__)("Search for an author to display","newspack-blocks"),help:(0,m.__)("Begin typing name, click autocomplete result to select.","newspack-blocks"),fetchSuggestions:async(e=null,t=0)=>{if(I(null),X&&!D)return[];const n=await a()({parse:!1,path:(0,v.addQueryArgs)("/newspack-blocks/v1/authors",{search:e,offset:t,fields:"id,name"})}),r=parseInt(n.headers.get("x-wp-total")||0,10),s=await n.json();H||e||V(r);const o=s.map(e=>({value:e.id,label:(0,d.decodeEntities)(e.name)||(0,m.__)("(no name)","newspack-blocks"),isGuestAuthor:e.is_guest}));return I(o),o},maxItemsToSuggest:H,onChange:e=>{let n=!1;const r=e[0];N&&N.forEach(e=>{parseInt(r?.value,10)===parseInt(e?.value,10)&&e?.isGuestAuthor&&(n=!0)}),t({authorId:parseInt(r?.value||0,10),isGuestAuthor:n})},postTypeLabel:(0,m.__)("author","newspack-blocks"),postTypeLabelPlural:(0,m.__)("authors","newspack-blocks"),selectedItems:[]})]})]});if(Z&&!Ce.length)return(0,x.jsxs)("div",{...le,children:[Pe,(0,x.jsx)(i.Placeholder,{className:"newspack-blocks-author-profile",icon:p.A,label:(0,m.__)("Author Profile","newspack-blocks"),children:(0,m.__)("No authors found for this post.","newspack-blocks")})]});const e=Math.min(G,Ce.length-1),n=Ce[e];window.__newspackAuthorsByBlock[r]=n;const o={...le,className:`${le.className} wp-block-newspack-blocks-author-profile is-nested-mode`};return(0,x.jsx)(y.Provider,{value:n,children:(0,x.jsxs)("div",{...o,children:[Pe,Me,Z&&Ce.length>1&&(0,x.jsx)(i.Card,{isRounded:!1,size:"small",style:{marginBottom:"32px"},variant:"secondary",children:(0,x.jsx)(i.CardBody,{children:(0,x.jsx)(i.SelectControl,{label:(0,m.__)("Preview author","newspack-blocks"),value:e,options:Ce.map((e,t)=>({label:e.name,value:t})),onChange:e=>q(parseInt(e,10)),help:(0,m.sprintf)(/* translators: %d: number of authors */ /* translators: %d: number of authors */
@@ -7,7 +7,7 @@
7
7
  * Author URI: https://newspack.com/
8
8
  * Text Domain: newspack-blocks
9
9
  * Domain Path: /languages
10
- * Version: 4.30.2
10
+ * Version: 4.30.3
11
11
  *
12
12
  * @package Newspack_Blocks
13
13
  */
@@ -15,7 +15,7 @@
15
15
  define( 'NEWSPACK_BLOCKS__PLUGIN_FILE', __FILE__ );
16
16
  define( 'NEWSPACK_BLOCKS__BLOCKS_DIRECTORY', 'dist/' );
17
17
  define( 'NEWSPACK_BLOCKS__PLUGIN_DIR', plugin_dir_path( NEWSPACK_BLOCKS__PLUGIN_FILE ) );
18
- define( 'NEWSPACK_BLOCKS__VERSION', '4.30.2' );
18
+ define( 'NEWSPACK_BLOCKS__VERSION', '4.30.3' );
19
19
 
20
20
  require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks.php';
21
21
  require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks-api.php';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/newspack-blocks",
3
- "version": "4.30.2",
3
+ "version": "4.30.3",
4
4
  "author": "Automattic",
5
5
  "description": "=== Newspack Blocks === Contributors: (this should be a list of wordpress.org userid's) Donate link: https://example.com/ Tags: comments, spam Requires at least: 4.5 Tested up to: 5.1.1 Stable tag: 0.1.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html",
6
6
  "repository": {
@@ -55,7 +55,7 @@
55
55
  },
56
56
  "devDependencies": {
57
57
  "@types/lodash": "^4.17.23",
58
- "newspack-components": "4.6.2",
58
+ "newspack-components": "4.6.3",
59
59
  "newspack-scripts": "5.11.0"
60
60
  },
61
61
  "overrides": {
@@ -3,7 +3,7 @@
3
3
  'name' => 'automattic/newspack-blocks',
4
4
  'pretty_version' => 'dev-main',
5
5
  'version' => 'dev-main',
6
- 'reference' => '86eecfeef6eb07440afc8d5ffa239907cceb45a3',
6
+ 'reference' => '6b239026e4a3dad5118443d9bc384d53248f38fa',
7
7
  'type' => 'wordpress-plugin',
8
8
  'install_path' => __DIR__ . '/../../',
9
9
  'aliases' => array(),
@@ -13,7 +13,7 @@
13
13
  'automattic/newspack-blocks' => array(
14
14
  'pretty_version' => 'dev-main',
15
15
  'version' => 'dev-main',
16
- 'reference' => '86eecfeef6eb07440afc8d5ffa239907cceb45a3',
16
+ 'reference' => '6b239026e4a3dad5118443d9bc384d53248f38fa',
17
17
  'type' => 'wordpress-plugin',
18
18
  'install_path' => __DIR__ . '/../../',
19
19
  'aliases' => array(),