1(globalThis.webpackChunknewspack=globalThis.webpackChunknewspack||[]).push([[223],{2:(e,t,n)=>{var r=n(2199),o=n(4664),a=n(5950);e.exports=function(e){return r(e,a,o)}},76:e=>{"use strict";e.exports=Function.prototype.call},79:(e,t,n)=>{var r=n(3702),o=n(80),a=n(4739),i=n(8655),s=n(1175);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=i,c.prototype.set=s,e.exports=c},80:(e,t,n)=>{var r=n(6025),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}},104:(e,t,n)=>{var r=n(3661);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},124:(e,t,n)=>{var r=n(9325);e.exports=function(){return r.Date.now()}},133:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(7723),o=n(1455),a=n.n(o),i=n(6087),s=n(1311),c=n(7896),l=n(3737),u=n(790);function p({onUpdate:e,onSuccess:t}){const n=(0,i.useRef)(null),[o,p]=(0,i.useState)(""),[d,f]=(0,i.useState)(!1),[h,g]=(0,i.useState)(""),[y,v]=(0,i.useState)(!1),[m,w]=(0,i.useState)(null);return(0,i.useEffect)(()=>{"function"==typeof e&&e({networkCode:h})},[h]),(0,u.jsx)(s.Zp,{noBorder:!0,children:(0,u.jsxs)("div",{className:"ads-onboarding",children:[newspack_ads_wizard.can_connect_google&&(!0===m||null===m)&&(0,u.jsxs)(i.Fragment,{children:[m&&(0,u.jsx)("p",{children:(0,r.__)("Authenticate with Google in order to connect your Google Ad Manager account:","newspack-plugin")}),(0,u.jsx)(c.A,{onInit:e=>w(!e),onSuccess:t,isOnboarding:!0})]}),(!newspack_ads_wizard.can_connect_google||!1===m)&&(0,u.jsx)(i.Fragment,{children:y?(0,u.jsx)(s.$T,{isSuccess:!0,noticeText:(0,r.__)("We're all set here!","newspack-plugin")}):(0,u.jsxs)(i.Fragment,{children:[(0,u.jsx)("p",{children:(0,r.__)("Enter your Google Ad Manager network code and service account credentials for a full integration:","newspack-plugin")}),(0,u.jsx)(s.xt,{disabled:d,isWide:!0,name:"network_code",label:(0,r.__)("Network code","newspack-plugin"),value:h,onChange:g}),(0,u.jsx)(s.dr,{disabled:d,onClick:()=>n.current.click(),title:(0,r.__)("Upload credentials","newspack-plugin"),desc:[(0,r.__)("Upload your Service Account credentials file to connect your GAM account.","newspack-plugin"),o&&(0,u.jsx)(s.$T,{noticeText:o,isError:!0})],chevron:!0}),(0,u.jsxs)("p",{children:[(0,u.jsx)("a",{href:"https://developers.google.com/ad-manager/api/authentication",target:"_blank",rel:"noopener noreferrer",children:(0,r.__)("How to get a service account user for API access","newspack-plugin")}),"."]}),(0,u.jsx)("input",{type:"file",accept:".json",ref:n,style:{display:"none"},onChange:e=>{e.target.files.length&&e.target.files[0]&&(0,l.b)(e.target.files[0]).then(e=>(e=>{f(!0),a()({path:"/newspack/v1/wizard/billboard/credentials",method:"post",data:{credentials:e,onboarding:!0}}).then(()=>{v(!0),"function"==typeof t&&t()}).finally(()=>{f(!1)})})(e)).catch(e=>p(e))}})]})})]})})}},181:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},200:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(5573),o=n(790);const a=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M20 4H22.5V5.5H20V8H18.5V5.5H16V4H18.5V1.5H20V4ZM14 12.25H10C9.27065 12.25 8.57118 12.5397 8.05546 13.0555C7.53973 13.5712 7.25 14.2707 7.25 15V17H8.75V15C8.75 14.31 9.31 13.75 10 13.75H14C14.69 13.75 15.25 14.31 15.25 15V17H16.75V15C16.75 14.2707 16.4603 13.5712 15.9445 13.0555C15.4288 12.5397 14.7293 12.25 14 12.25ZM9.5 8.5C9.5 7.83696 9.76339 7.20107 10.2322 6.73223C10.7011 6.26339 11.337 6 12 6C12.663 6 13.2989 6.26339 13.7678 6.73223C14.2366 7.20107 14.5 7.83696 14.5 8.5C14.5 9.16304 14.2366 9.79893 13.7678 10.2678C13.2989 10.7366 12.663 11 12 11C11.337 11 10.7011 10.7366 10.2322 10.2678C9.76339 9.79893 9.5 9.16304 9.5 8.5ZM11 8.5C11 8.76522 11.1054 9.01957 11.2929 9.20711C11.4804 9.39464 11.7348 9.5 12 9.5C12.2652 9.5 12.5196 9.39464 12.7071 9.20711C12.8946 9.01957 13 8.76522 13 8.5C13 8.23478 12.8946 7.98043 12.7071 7.79289C12.5196 7.60536 12.2652 7.5 12 7.5C11.7348 7.5 11.4804 7.60536 11.2929 7.79289C11.1054 7.98043 11 8.23478 11 8.5Z"})}),i=/^(406|617)$/.test(n.j)?a:null},227:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(5573),o=n(790);const a=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M4 18.5H13V20H4V18.5ZM4 16H20V14.5H4V16ZM9 7.5C9.39782 7.5 9.77936 7.34196 10.0607 7.06066C10.342 6.77936 10.5 6.39782 10.5 6C10.5 5.60218 10.342 5.22064 10.0607 4.93934C9.77936 4.65804 9.39782 4.5 9 4.5C8.60218 4.5 8.22064 4.65804 7.93934 4.93934C7.65804 5.22064 7.5 5.60218 7.5 6C7.5 6.39782 7.65804 6.77936 7.93934 7.06066C8.22064 7.34196 8.60218 7.5 9 7.5ZM4 7C4 5.67392 4.52678 4.40215 5.46447 3.46447C6.40215 2.52678 7.67392 2 9 2C10.3261 2 11.5979 2.52678 12.5355 3.46447C13.4732 4.40215 14 5.67392 14 7C14 8.32608 13.4732 9.59785 12.5355 10.5355C11.5979 11.4732 10.3261 12 9 12C7.67392 12 6.40215 11.4732 5.46447 10.5355C4.52678 9.59785 4 8.32608 4 7ZM10.632 10.097C10.5644 9.99092 10.4711 9.90361 10.3608 9.84313C10.2506 9.78265 10.1268 9.75097 10.001 9.751H7.999C7.87321 9.75097 7.74945 9.78265 7.63916 9.84313C7.52886 9.90361 7.4356 9.99092 7.368 10.097C7.855 10.354 8.41 10.5 9 10.5C9.59 10.5 10.145 10.354 10.632 10.097ZM5.5 7C5.5 7.8 5.768 8.536 6.219 9.125C6.42896 8.85274 6.69865 8.63235 7.00727 8.48082C7.31589 8.32928 7.65519 8.25066 7.999 8.251H10.001C10.725 8.251 11.37 8.593 11.781 9.125C12.1185 8.68329 12.346 8.16752 12.4446 7.62
1041C12.5431 7.0733 12.5099 6.51059 12.3478 5.97885C12.1856 5.44712 11.8991 4.96166 11.512 4.56268C11.1248 4.1637 10.6483 3.86266 10.1217 3.68451C9.59508 3.50635 9.03362 3.45619 8.48378 3.53818C7.93395 3.62017 7.41155 3.83196 6.95984 4.156C6.50814 4.48005 6.14012 4.90703 5.88625 5.40159C5.63239 5.89616 5.49998 6.44408 5.5 7Z"})}),i=/^(406|617|740)$/.test(n.j)?a:null},270:(e,t,n)=>{var r=n(7068),o=n(346);e.exports=function e(t,n,a,i,s){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,a,i,e,s))}},289:(e,t,n)=>{var r=n(2651);e.exports=function(e){return r(this,e).get(e)}},294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},317:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},361:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},414:e=>{"use strict";e.exports=Math.round},453:(e,t,n)=>{"use strict";var r,o=n(9612),a=n(9383),i=n(1237),s=n(9290),c=n(9538),l=n(8068),u=n(9675),p=n(5345),d=n(1514),f=n(8968),h=n(6188),g=n(8002),y=n(3499),v=n(414),m=n(3093),w=Function,b=function(e){try{return w('"use strict"; return ('+e+").constructor;")()}catch(e){}},x=n(5795),_=n(655),k=function(){throw new u},j=x?function(){try{return k}catch(e){try{return x(arguments,"callee").get}catch(e){return k}}}():k,S=n(4039)(),A=n(3628),C=n(1064),P=n(8648),O=n(1002),E=n(76),N={},L="undefined"!=typeof Uint8Array&&A?A(Uint8Array):r,I={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":S&&A?A([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":a,"%eval%":eval,"%EvalError%":i,"%Float16Array%":"undefined"==typeof Float16Array?r:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":N,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%
1IteratorPrototype%":S&&A?A(A([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&S&&A?A((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":s,"%ReferenceError%":c,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&S&&A?A((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&A?A(""[Symbol.iterator]()):r,"%Symbol%":S?Symbol:r,"%SyntaxError%":l,"%ThrowTypeError%":j,"%TypedArray%":L,"%TypeError%":u,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":p,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet,"%Function.prototype.call%":E,"%Function.prototype.apply%":O,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":C,"%Math.abs%":d,"%Math.floor%":f,"%Math.max%":h,"%Math.min%":g,"%Math.pow%":y,"%Math.round%":v,"%Math.sign%":m,"%Reflect.getPrototypeOf%":P};if(A)try{null.error}catch(e){var M=A(A(e));I["%Error.prototype%"]=M}var T=function e(t){var n;if("%AsyncFunction%"===t)n=b("async function () {}");else if("%GeneratorFunction%"===t)n=b("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=b("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&A&&(n=A(o.prototype))}return I[t]=n,n},R={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},D=n(6743),F=n(9957),$=D.call(E,Array.prototype.concat),V=D.call(O,Array.prototype.splice),z=D.call(E,String.prototype.replace),H=D.call(E,String.prototype.slice),B=D.call(E,RegExp.prototype.exec),U=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,q=/\\(\\)?/g,W=function(e,t){var n,r=e;if(F(R,r)&&(r="%"+(n=R[r])[0]+"%"),F(I,r)){var o=I[r];if(o===N&&(o=T(r)),void 0===o&&!t)throw new u("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new l("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new u('"allowMissing" argument must be a boolean');if(null===B(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=H(e,0,1),n=H(e,-1);if("%"===t&&"%"!==n)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var r=[];return z(e,U,function(e,t,n,o){r[r.length]=n?z(o,q,"$1"):t||e}),r}(e),r=n.length>0?n[0]:"",o=W("%"+r+"%",t),a=o.name,i=o.value,s=!1,c=o.alias;c&&(r=c[0],V(n,$([0,1],c)));for(var p=1,d=!0;p<n.length;p+=1){var f=n[p],h=H(f,0,1),g=H(f,-1);if(('"'===h||"'"===h||"`"===h||'"'===g||"'"===g||"`"===g)&&h!==g)throw new l("property names with quotes must have matching quotes");if("constructor"!==f&&d||(s=!0),F(I,a="%"+(r+="."+f)+"%"))i=I[a];else if(null!=i){if(!(f in i)){if(!t)throw new u("base intrinsic for "+e+" exists, but the property is not available.");return}if(x&&p+1>=n.length){var y=x(i,f);i=(d=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:i[f]}else d=F(i,f),i=i[f];d&&!s&&(I[a]=i)}}return i}},507:(e,t,n)=>{"use strict";var r=n(453),o=n(6556),a=n(1240),i=n(9675),s=r("%Map%",!0),c=o("Map.prototype.get",!0),l=o("Map.prototype.set",!0),u=o("Map.prototype.has",!0),p=o("Map.prototype.delete",!0),d=o("Map.prototype.size",!0);e.exports=!!s&&function(){var e,t={assert:function(e){if(!t.has(e))throw new i("Side channel does not contain "+a(e))},delete:function(t){if(e){var n=p(e,t);return 0===d(e)&&(e=void 0),n}return!1},get:function(t){if(e)return c(e,t)},has:function(t){return!!e&&u(e,t)},set:function(t,n){e||(e=new s),l(e,t,n)}};return t}}
1,514:(e,t,n)=>{var r=n(4932);e.exports=function(e,t){return r(t,function(t){return e[t]})}},550:(e,t,n)=>{"use strict";function r(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}n.d(t,{A:()=>a});const a=/^(8(28|4|41)|[46]06|382|498|617|930)$/.test(n.j)?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e&&e.split("/")||[],a=t&&t.split("/")||[],i=e&&r(e),s=t&&r(t),c=i||s;if(e&&r(e)?a=n:n.length&&(a.pop(),a=a.concat(n)),!a.length)return"/";var l=void 0;if(a.length){var u=a[a.length-1];l="."===u||".."===u||""===u}else l=!1;for(var p=0,d=a.length;d>=0;d--){var f=a[d];"."===f?o(a,d):".."===f?(o(a,d),p++):p&&(o(a,d),p--)}if(!c)for(;p--;p)a.unshift("..");!c||""===a[0]||a[0]&&r(a[0])||a.unshift("");var h=a.join("/");return l&&"/"!==h.substr(-1)&&(h+="/"),h}:null},583:(e,t,n)=>{var r=n(7237),o=n(7255),a=n(8586),i=n(7797);e.exports=function(e){return a(e)?r(i(e)):o(e)}},591:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(790),o=n(5573),a=(0,r.jsx)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(o.Path,{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",fillRule:"evenodd",clipRule:"evenodd"})})},631:(e,t,n)=>{var r=n(8077),o=n(9326);e.exports=function(e,t){return null!=e&&o(e,t,r)}},641:(e,t,n)=>{var r=n(6649),o=n(5950);e.exports=function(e,t){return e&&r(e,t,o)}},655:e=>{"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},659:(e,t,n)=>{var r=n(1873),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[s]=n:delete e[s]),o}},689:(e,t,n)=>{var r=n(2),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,a,i,s){var c=1&n,l=r(e),u=l.length;if(u!=r(t).length&&!c)return!1;for(var p=u;p--;){var d=l[p];if(!(c?d in t:o.call(t,d)))return!1}var f=s.get(e),h=s.get(t);if(f&&h)return f==t&&h==e;var g=!0;s.set(e,t),s.set(t,e);for(var y=c;++p<u;){var v=e[d=l[p]],m=t[d];if(a)var w=c?a(m,v,d,t,e,s):a(v,m,d,e,t,s);if(!(void 0===w?v===m||i(v,m,n,a,s):w)){g=!1;break}y||(y="constructor"==d)}if(g&&!y){var b=e.constructor,x=t.constructor;b==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x||(g=!1)}return s.delete(e),s.delete(t),g}},695:(e,t,n)=>{var r=n(8096),o=n(2428),a=n(6449),i=n(3656),s=n(361),c=n(7167),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),u=!n&&o(e),p=!n&&!u&&i(e),d=!n&&!u&&!p&&c(e),f=n||u||p||d,h=f?r(e.length,String):[],g=h.length;for(var y in e)!t&&!l.call(e,y)||f&&("length"==y||p&&("offset"==y||"parent"==y)||d&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,g))||h.push(y);return h}},756:(e,t,n)=>{var r=n(3805);e.exports=function(e){return e==e&&!r(e)}},776:(e,t,n)=>{var r=n(756),o=n(5950);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var a=t[n],i=e[a];t[n]=[a,i,r(i)]}return t}},909:(e,t,n)=>{var r=n(641),o=n(8329)(r);e.exports=o},916:(e,t,n)=>{var r=n(909);e.exports=function(e,t){var n;return r(e,function(e,r,o){return!(n=t(e,r,o))}),!!n}},920:(e,t,n)=>{"use strict";var r=n(9675),o=n(1240),a=n(4803),i=n(507),s=n(4652)||i||a;e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new r("Side channel does not contain "+o(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,n){e||(e=s()),e.set(t,n)}};return t}},938:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},945:(e,t,n)=>{var r=n(79),o=n(8223),a=n(3661);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}}
1,999:(e,t,n)=>{var r=n(9302),o=n(6800);e.exports=function(e){return r(function(t,n){var r=-1,a=n.length,i=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(a--,i):void 0,s&&o(n[0],n[1],s)&&(i=a<3?void 0:i,a=1),t=Object(t);++r<a;){var c=n[r];c&&e(t,c,r,i)}return t})}},1002:e=>{"use strict";e.exports=Function.prototype.apply},1033:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},1042:(e,t,n)=>{var r=n(6110)(Object,"create");e.exports=r},1064:(e,t,n)=>{"use strict";var r=n(9612);e.exports=r.getPrototypeOf||null},1093:(e,t,n)=>{"use strict";n.d(t,{J:()=>r});const r="newspack_wizard_handoff_message"},1125:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BrowserRouter:()=>ye,HashRouter:()=>ve,Link:()=>ke,MemoryRouter:()=>U,NavLink:()=>Ae,Prompt:()=>W,Redirect:()=>J,Route:()=>ne,Router:()=>B,StaticRouter:()=>ce,Switch:()=>le,generatePath:()=>Q,matchPath:()=>te,useHistory:()=>de,useLocation:()=>fe,useParams:()=>he,useRouteMatch:()=>ge,withRouter:()=>ue});var r=n(3662);function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,r.A)(e,t)}var a=n(1609),i=n.n(a),s=n(5556),c=n.n(s),l=n(8168),u=n(550),p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};const d=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])});var r=void 0===t?"undefined":p(t);if(r!==(void 0===n?"undefined":p(n)))return!1;if("object"===r){var o=t.valueOf(),a=n.valueOf();if(o!==t||a!==n)return e(o,a);var i=Object.keys(t),s=Object.keys(n);return i.length===s.length&&i.every(function(r){return e(t[r],n[r])})}return!1};var f=n(1561);function h(e){return"/"===e.charAt(0)?e:"/"+e}function g(e){return"/"===e.charAt(0)?e.substr(1):e}function y(e,t){return function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)}(e,t)?e.substr(t.length):e}function v(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function m(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function w(e,t,n,r){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,l.A)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=(0,u.A)(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function b(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&d(e.state,t.state)}function x(){var e=null,t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!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 _=!("undefined"==typeof window||!window.document||!window.document.createElement);function k(e,t){t(window.confirm(e))}var j="popstate",S="hashchange";function A(){try{return window.history.state||{}}catch(e){return{}}}var C="hashchange",P={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+g(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:g,decodePath:h},slash:{encodePath:h,decodePath:h}};function O(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function E(e){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+e)}function N(e,t,n){return Math.min(Math.max(e,t),n)}var L=n(5302),I=n.n(L);function M(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}n(4363);var T=n(4146),R=n.n(T),D=1073741823,F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},$=i().createContext||function(e,t){var n,r,a,s="__create-react-context-"+((F[a="__global_unique_id__"]=(F[a]||0)+1)+"__"),l=function(e){function n(){for(var t,n,r,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(t=e.call.apply(e,[this].concat(a))||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}o(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,o=e.value;((a=r)===(i=o)?0!==a||1/a==1/i:a!=a&&i!=i)?n=0:(n="function"==typeof t?t(r,o):D,0!=(n|=0)&&this.emitter.set(e.value,n))}var a,i},r.render=function(){return this.props.children},n}(i().Component);l.childContextTypes=((n={})[s]=c().object.isRequired,n);var u=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];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}o(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?D:t},r.componentDidMount=function(){this.context[s]&&this.context[s].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?D: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}(i().Component);return u.contextTypes=((r={})[s]=c().object,r),{Provider:l,Consumer:u}},V=function(e){var t=$();return t.displayName=e,t},z=V("Router-History"),H=V("Router"),B=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}o(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})}
1)),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return i().createElement(H.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},i().createElement(z.Provider,{children:this.props.children||null,value:this.props.history}))},t}(i().Component),U=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];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,o=void 0===r?["/"]:r,a=t.initialIndex,i=void 0===a?0:a,s=t.keyLength,c=void 0===s?6:s,u=x();function p(e){(0,l.A)(v,e),v.length=v.entries.length,u.notifyListeners(v.location,v.action)}function d(){return Math.random().toString(36).substr(2,c)}var f=N(i,0,o.length-1),h=o.map(function(e){return w(e,void 0,"string"==typeof e?d():e.key||d())}),g=m;function y(e){var t=N(v.index+e,0,v.entries.length-1),r=v.entries[t];u.confirmTransitionTo(r,"POP",n,function(e){e?p({action:"POP",location:r,index:t}):p()})}var v={length:h.length,action:"POP",location:h[f],index:f,entries:h,createHref:g,push:function(e,t){var r="PUSH",o=w(e,t,d(),v.location);u.confirmTransitionTo(o,r,n,function(e){if(e){var t=v.index+1,n=v.entries.slice(0);n.length>t?n.splice(t,n.length-t,o):n.push(o),p({action:r,location:o,index:t,entries:n})}})},replace:function(e,t){var r="REPLACE",o=w(e,t,d(),v.location);u.confirmTransitionTo(o,r,n,function(e){e&&(v.entries[v.index]=o,p({action:r,location:o}))})},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=v.index+e;return t>=0&&t<v.entries.length},block:function(e){return void 0===e&&(e=!1),u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return v}(t.props),t}return o(t,e),t.prototype.render=function(){return i().createElement(B,{history:this.history,children:this.props.children})},t}(i().Component),q=function(e){function t(){return e.apply(this,arguments)||this}o(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}(i().Component);function W(e){var t=e.message,n=e.when,r=void 0===n||n;return i().createElement(H.Consumer,null,function(e){if(e||(0,f.A)(!1),!r||e.staticContext)return null;var n=e.history.block;return i().createElement(q,{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 G={},Z=1e4,K=0;function Q(e,t){return void 0===e&&(e="/"),void 0===t&&(t={}),"/"===e?e:function(e){if(G[e])return G[e];var t=I().compile(e);return K<Z&&(G[e]=t,K++),t}(e)(t,{pretty:!0})}function J(e){var t=e.computedMatch,n=e.to,r=e.push,o=void 0!==r&&r;return i().createElement(H.Consumer,null,function(e){e||(0,f.A)(!1);var r=e.history,a=e.staticContext,s=o?r.push:r.replace,c=w(t?"string"==typeof n?Q(n,t.params):(0,l.A)({},n,{pathname:Q(n.pathname,t.params)}):n);return a?(s(c),null):i().createElement(q,{onMount:function(){s(c)},onUpdate:function(e,t){var n=w(t.to);b(n,(0,l.A)({},c,{key:n.key}))||s(c)},to:n})})}var Y={},X=1e4,ee=0;function te(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,a=void 0!==o&&o,i=n.strict,s=void 0!==i&&i,c=n.sensitive,l=void 0!==c&&c;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=Y[n]||(Y[n]={});if(r[e])return r[e];var o=[],a={regexp:I()(e,o,t),keys:o};return ee<X&&(r[e]=a,ee++),a}(n,{end:a,strict:s,sensitive:l}),o=r.regexp,i=r.keys,c=o.exec(e);if(!c)return null;var u=c[0],p=c.slice(1),d=e===u;return a&&!d?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:d,params:i.reduce(function(e,t,n){return e[t.name]=p[n],e},{})}},null)}var ne=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this;return i().createElement(H.Consumer,null,function(t){t||(0,f.A)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?te(n.pathname,e.props):t.match,o=(0,l.A)({},t,{location:n,match:r}
1),a=e.props,s=a.children,c=a.component,u=a.render;return Array.isArray(s)&&function(e){return 0===i().Children.count(e)}(s)&&(s=null),i().createElement(H.Provider,{value:o},o.match?s?"function"==typeof s?s(o):s:c?i().createElement(c,o):u?u(o):null:"function"==typeof s?s(o):null)})},t}(i().Component);function re(e){return"/"===e.charAt(0)?e:"/"+e}function oe(e,t){if(!e)return t;var n=re(e);return 0!==t.pathname.indexOf(n)?t:(0,l.A)({},t,{pathname:t.pathname.substr(n.length)})}function ae(e){return"string"==typeof e?e:m(e)}function ie(e){return function(){(0,f.A)(!1)}}function se(){}var ce=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];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 se},t.handleBlock=function(){return se},t}o(t,e);var n=t.prototype;return n.navigateTo=function(e,t){var n=this.props,r=n.basename,o=void 0===r?"":r,a=n.context,i=void 0===a?{}:a;i.action=t,i.location=function(e,t){return e?(0,l.A)({},t,{pathname:re(e)+t.pathname}):t}(o,w(e)),i.url=ae(i.location)},n.render=function(){var e=this.props,t=e.basename,n=void 0===t?"":t,r=e.context,o=void 0===r?{}:r,a=e.location,s=void 0===a?"/":a,c=M(e,["basename","context","location"]),u={createHref:function(e){return re(n+ae(e))},action:"POP",location:oe(n,w(s)),push:this.handlePush,replace:this.handleReplace,go:ie(),goBack:ie(),goForward:ie(),listen:this.handleListen,block:this.handleBlock};return i().createElement(B,(0,l.A)({},c,{history:u,staticContext:o}))},t}(i().Component),le=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this;return i().createElement(H.Consumer,null,function(t){t||(0,f.A)(!1);var n,r,o=e.props.location||t.location;return i().Children.forEach(e.props.children,function(e){if(null==r&&i().isValidElement(e)){n=e;var a=e.props.path||e.props.from;r=a?te(o.pathname,(0,l.A)({},e.props,{path:a})):t.match}}),r?i().cloneElement(n,{location:o,computedMatch:r}):null})},t}(i().Component);function ue(e){var t="withRouter("+(e.displayName||e.name)+")",n=function(t){var n=t.wrappedComponentRef,r=M(t,["wrappedComponentRef"]);return i().createElement(H.Consumer,null,function(t){return t||(0,f.A)(!1),i().createElement(e,(0,l.A)({},r,t,{ref:n}))})};return n.displayName=t,n.WrappedComponent=e,R()(n,e)}var pe=i().useContext;function de(){return pe(z)}function fe(){return pe(H).location}function he(){var e=pe(H).match;return e?e.params:{}}function ge(e){var t=fe(),n=pe(H).match;return e?te(t.pathname,e):n}var ye=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).history=function(e){void 0===e&&(e={}),_||(0,f.A)(!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,o=!(-1===window.navigator.userAgent.indexOf("Trident")),a=e,i=a.forceRefresh,s=void 0!==i&&i,c=a.getUserConfirmation,u=void 0===c?k:c,p=a.keyLength,d=void 0===p?6:p,g=e.basename?v(h(e.basename)):"";function b(e){var t=e||{},n=t.key,r=t.state,o=window.location,a=o.pathname+o.search+o.hash;return g&&(a=y(a,g)),w(a,r,n)}function C(){return Math.random().toString(36).substr(2,d)}var P=x();function O(e){(0,l.A)(z,e),z.length=n.length,P.notifyListeners(z.location,z.action)}function E(e){(function(e){void 0===e.state&&navigator.userAgent.indexOf("CriOS")})(e)||I(b(e.state))}function N(){I(b(A()))}var L=!1;function I(e){L?(L=!1,O()):P.confirmTransitionTo(e,"POP",u,function(t){t?O({action:"POP",location:e}):function(e){var t=z.location,n=T.indexOf(t.key);-1===n&&(n=0);var r=T.indexOf(e.key);-1===r&&(r=0);var o=n-r;o&&(L=!0,D(o))}(e)})}var M=b(A()),T=[M.key];function R(e){return g+m(e)}function D(e){n.go(e)}var F=0;function $(e){1===(F+=e)&&1===e?(window.addEventListener(j,E),o&&window.addEventListener(S,N)):0===F&&(window.removeEventListener(j,E),o&&window.removeEventListener(S,N))}var V=!1,z={length:n.length,action:"POP",location:M,createHref:R,push:function(e,t){var o="PUSH",a=w(e,t,C(),z.location);P.confirmTransitionTo(a,o,u,function(e){if(e){var t=R(a),i=a.key,c=a.state;if(r)if(n.pushState({key:i,state:c},null,t),s)window.location.href=t;else{var l=T.indexOf(z.location.key),u=T.slice(0,-1===l?0:l+1);u.push(a.key),T=u,O({action:o,location:a})}else window.location.href=t}})},replace:function(e,t){var o="REPLACE",a=w(e,t,C(),z.location);P.confirmTransitionTo(a,o,u,function(e){if(e){var t=R(a),i=a.key,c=a.state;if(r)if(n.replaceState({key:i,state:c},null,t),s)window.location.replace(t);else{var l=T.indexOf(z.location.key);-1!==l&&(T[l]=a.key),O({action:o,location:a})}else window.location.replace(t)}})},go:D,goBack:function(){D(-1)},goForward:function(){D(1)},block:function(e){void 0===e&&(e=!1);var t=P.setPrompt(e);return V||($(1),V=!0),function(){return V&&(V=!1,$(-1)),t()}},listen:function(e){var t=P.appendListener(e);return $(1),function(){$(-1),t()}}};return z}(t.props),t}return o(t,e),t.prototype.render=function(){return i().createElement(B,{history:this.history,children:this.props.children})},t}(i().Component),ve=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).history=function(e){void 0===e&&(e={}),_||(0,f.A)(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),r=n.getUserConfirmation,o=void 0===r?k:r,a=n.hashType,i=void 0===a?"slash":a,s=e.basename?v(h(e.basename)):"",c=P[i],u=c.encodePath,p=c.decodePath;function d(){var e=p(O());return s&&(e=y(e,s)),w(e)}var g=x();function j(e){(0,l.A)(V,e),V.length=t.length,g.notifyListeners(V.location,V.action)}var S=!1,A=null;function N(){var e=O(),t=u(e);if(e!==t)E(t);else{var n=d(),r=V.location;if(!S&&b(r,n))return;if(A===m(n))return;
1A=null,function(e){S?(S=!1,j()):g.confirmTransitionTo(e,"POP",o,function(t){t?j({action:"POP",location:e}):function(e){var t=V.location,n=T.lastIndexOf(m(t));-1===n&&(n=0);var r=T.lastIndexOf(m(e));-1===r&&(r=0);var o=n-r;o&&(S=!0,R(o))}(e)})}(n)}}var L=O(),I=u(L);L!==I&&E(I);var M=d(),T=[m(M)];function R(e){t.go(e)}var D=0;function F(e){1===(D+=e)&&1===e?window.addEventListener(C,N):0===D&&window.removeEventListener(C,N)}var $=!1,V={length:t.length,action:"POP",location:M,createHref:function(e){return"#"+u(s+m(e))},push:function(e,t){var n="PUSH",r=w(e,void 0,void 0,V.location);g.confirmTransitionTo(r,n,o,function(e){if(e){var t=m(r),o=u(s+t);if(O()!==o){A=t,function(e){window.location.hash=e}(o);var a=T.lastIndexOf(m(V.location)),i=T.slice(0,-1===a?0:a+1);i.push(t),T=i,j({action:n,location:r})}else j()}})},replace:function(e,t){var n="REPLACE",r=w(e,void 0,void 0,V.location);g.confirmTransitionTo(r,n,o,function(e){if(e){var t=m(r),o=u(s+t);O()!==o&&(A=t,E(o));var a=T.indexOf(m(V.location));-1!==a&&(T[a]=t),j({action:n,location:r})}})},go:R,goBack:function(){R(-1)},goForward:function(){R(1)},block:function(e){void 0===e&&(e=!1);var t=g.setPrompt(e);return $||(F(1),$=!0),function(){return $&&($=!1,F(-1)),t()}},listen:function(e){var t=g.appendListener(e);return F(1),function(){F(-1),t()}}};return V}(t.props),t}return o(t,e),t.prototype.render=function(){return i().createElement(B,{history:this.history,children:this.props.children})},t}(i().Component),me=function(e,t){return"function"==typeof e?e(t):e},we=function(e,t){return"string"==typeof e?w(e,null,null,t):e},be=function(e){return e},xe=i().forwardRef;void 0===xe&&(xe=be);var _e=xe(function(e,t){var n=e.innerRef,r=e.navigate,o=e.onClick,a=M(e,["innerRef","navigate","onClick"]),s=a.target,c=(0,l.A)({},a,{onClick:function(e){try{o&&o(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||s&&"_self"!==s||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return c.ref=be!==xe&&t||n,i().createElement("a",c)}),ke=xe(function(e,t){var n=e.component,r=void 0===n?_e:n,o=e.replace,a=e.to,s=e.innerRef,c=M(e,["component","replace","to","innerRef"]);return i().createElement(H.Consumer,null,function(e){e||(0,f.A)(!1);var n=e.history,u=we(me(a,e.location),e.location),p=u?n.createHref(u):"",d=(0,l.A)({},c,{href:p,navigate:function(){var t=me(a,e.location),r=m(e.location)===m(we(t));(o||r?n.replace:n.push)(t)}});return be!==xe?d.ref=t||s:d.innerRef=s,i().createElement(r,d)})}),je=function(e){return e},Se=i().forwardRef;void 0===Se&&(Se=je);var Ae=Se(function(e,t){var n=e["aria-current"],r=void 0===n?"page":n,o=e.activeClassName,a=void 0===o?"active":o,s=e.activeStyle,c=e.className,u=e.exact,p=e.isActive,d=e.location,h=e.sensitive,g=e.strict,y=e.style,v=e.to,m=e.innerRef,w=M(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return i().createElement(H.Consumer,null,function(e){e||(0,f.A)(!1);var n=d||e.location,o=we(me(v,n),n),b=o.pathname,x=b&&b.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),_=x?te(n.pathname,{path:x,exact:u,sensitive:h,strict:g}):null,k=!!(p?p(_,n):_),j="function"==typeof c?c(k):c,S="function"==typeof y?y(k):y;k&&(j=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(" ")}(j,a),S=(0,l.A)({},S,s));var A=(0,l.A)({"aria-current":k&&r||null,className:j,style:S,to:o},w);return je!==Se?A.ref=t||m:A.innerRef=m,i().createElement(ke,A)})})},1175:(e,t,n)=>{var r=n(6025);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},1237:e=>{"use strict";e.exports=EvalError},1240:(e,t,n)=>{var r="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,a=r&&o&&"function"==typeof o.get?o.get:null,i=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=s&&
vendor: 4,985 bytes, line 1
1c&&"function"==typeof c.get?c.get:null,u=s&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,y=Function.prototype.toString,v=String.prototype.match,m=String.prototype.slice,w=String.prototype.replace,b=String.prototype.toUpperCase,x=String.prototype.toLowerCase,_=RegExp.prototype.test,k=Array.prototype.concat,j=Array.prototype.join,S=Array.prototype.slice,A=Math.floor,C="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,E="function"==typeof Symbol&&"object"==typeof Symbol.iterator,N="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,L=Object.prototype.propertyIsEnumerable,I=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||_.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-A(-e):A(e);if(r!==e){var o=String(r),a=m.call(t,o.length+1);return w.call(o,n,"$&_")+"."+w.call(w.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(t,n,"$&_")}var T=n(2634),R=T.custom,D=q(R)?R:null,F={__proto__:null,double:'"',single:"'"},$={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function V(e,t,n){var r=n.quoteStyle||t,o=F[r];return o+e+o}function z(e){return w.call(String(e),/"/g,""")}function H(e){return!N||!("object"==typeof e&&(N in e||void 0!==e[N]))}function B(e){return"[object Array]"===Z(e)&&H(e)}function U(e){return"[object RegExp]"===Z(e)&&H(e)}function q(e){if(E)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!O)return!1;try{return O.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,o,s){var c=r||{};if(G(c,"quoteStyle")&&!G(F,c.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var g=!G(c,"customInspect")||c.customInspect;if("boolean"!=typeof g&&"symbol"!==g)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var b=c.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return Q(t,c);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var _=String(t);return b?M(t,_):_}if("bigint"==typeof t){var A=String(t)+"n";return b?M(t,A):A}var P=void 0===c.depth?5:c.depth;if(void 0===o&&(o=0),o>=P&&P>0&&"object"==typeof t)return B(t)?"[Array]":"[Object]";var R,$=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=j.call(Array(e.indent+1)," ")}return{base:n,prev:j.call(Array(t+1),n)}}(c,o);if(void 0===s)s=[];else if(K(s,t)>=0)return"[Circular]";function W(t,n,r){if(n&&(s=S.call(s)).push(n),r){var a={depth:c.depth};return G(c,"quoteStyle")&&(a.quoteStyle=c.quoteStyle),e(t,a,o+1,s)}return e(t,c,o+1,s)}if("function"==typeof t&&!U(t)){var J=function(e){if(e.name)return e.name;var t=v.call(y.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),re=ne(t,W);return"[Function"+(J?": "+J:" (anonymous)")+"]"+(re.length>0?" { "+j.call(re,", ")+" }":"")}if(q(t)){var oe=E?w.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(t);return"object"!=typeof t||E?oe:Y(oe)}if((R=t)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var ae="<"+x.call(String(t.nodeName)),ie=t.attributes||[],se=0;se<ie.length;se++)ae+=" "+ie[se].name+"="+V(z(ie[se].value),"double",c);return ae+=">",t.childNodes&&t.childNodes.length&&(ae+="..."),ae+"</"+x.call(String(t.nodeName))+">"}if(B(t)){if(0===t.length)return"[]";var ce=ne(t,W);return $&&!function(e){for(var t=0;t<e.length;t++)if(K(e[t],"\n")>=0)return!1;return!0}(ce)?"["+te(ce,$)+"]":"[ "+j.call(ce,", ")+" ]"}if(function(e){return"[object Error]"===Z(e)&&H(e)}(t)){var le=ne(t,W);return"cause"in Error.prototype||!("cause"in t)||L.call(t,"cause")?0===le.length?"["+String(t)+"]":"{ ["+String(t)+"] "+j.call(le,", ")+" }
1":"{ ["+String(t)+"] "+j.call(k.call("[cause]: "+W(t.cause),le),", ")+" }"}if("object"==typeof t&&g){if(D&&"function"==typeof t[D]&&T)return T(t,{depth:P-o});if("symbol"!==g&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!a||!e||"object"!=typeof e)return!1;try{a.call(e);try{l.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ue=[];return i&&i.call(t,function(e,n){ue.push(W(n,t,!0)+" => "+W(e,t))}),ee("Map",a.call(t),ue,$)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e);try{a.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var pe=[];return u&&u.call(t,function(e){pe.push(W(e,t))}),ee("Set",l.call(t),pe,$)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return X("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return X("WeakSet");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{return f.call(e),!0}catch(e){}return!1}(t))return X("WeakRef");if(function(e){return"[object Number]"===Z(e)&&H(e)}(t))return Y(W(Number(t)));if(function(e){if(!e||"object"!=typeof e||!C)return!1;try{return C.call(e),!0}catch(e){}return!1}(t))return Y(W(C.call(t)));if(function(e){return"[object Boolean]"===Z(e)&&H(e)}(t))return Y(h.call(t));if(function(e){return"[object String]"===Z(e)&&H(e)}(t))return Y(W(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==n.g&&t===n.g)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===Z(e)&&H(e)}(t)&&!U(t)){var de=ne(t,W),fe=I?I(t)===Object.prototype:t instanceof Object||t.constructor===Object,he=t instanceof Object?"":"null prototype",ge=!fe&&N&&Object(t)===t&&N in t?m.call(Z(t),8,-1):he?"Object":"",ye=(fe||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(ge||he?"["+j.call(k.call([],ge||[],he||[]),": ")+"] ":"");return 0===de.length?ye+"{}":$?ye+"{"+te(de,$)+"}":ye+"{ "+j.call(de,", ")+" }"}return String(t)};var W=Object.prototype.hasOwnProperty||function(e){return e in this};function G(e,t){return W.call(e,t)}function Z(e){return g.call(e)}function K(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function Q(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Q(m.call(e,0,t.maxStringLength),t)+r}var o=$[t.quoteStyle||"single"];return o.lastIndex=0,V(w.call(w.call(e,o,"\\$1"),/[\x00-\x1f]/g,J),"single",t)}function J(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+b.call(t.toString(16))}function Y(e){return"Object("+e+")"}function X(e){return e+" { ? }"}function ee(e,t,n,r){return e+" ("+t+") {"+(r?te(n,r):j.call(n,", "))+"}"}function te(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+j.call(e,","+n)+"\n"+t.prev}function ne(e,t){var n=B(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=G(e,o)?t(e[o],e):""}var a,i="function"==typeof P?P(e):[];if(E){a={};for(var s=0;s<i.length;s++)a["$"+i[s]]=i[s]}for(var c in e)G(e,c)&&(n&&String(Number(c))===c&&c<e.length||E&&a["$"+c]instanceof Symbol||(_.call(/[^\w$]/,c)?r.push(t(c,e)+": "+t(e[c],e)):r.push(c+": "+t(e[c],e))));if("function"==typeof P)for(var l=0;l<i.length;l++)L.call(e,i[l])&&r.push("["+t(i[l])+"]: "+t(e[i[l]],e));return r}},1311:(e,t,n)=>{"use strict";n.d(t,{Lz:()=>s.A,wg:()=>c.A,fF:()=>m,IW:()=>g,Kk:()=>S,$n:()=>w.A,dr:()=>k,Zp:()=>C,vn:()=>I,sk:()=>be,Jv:()=>_e,wi:()=>Se,Q5:()=>je,Du:()=>Fe,xA:()=>$e,Pj:()=>Oe,uC:()=>Ne,BR:()=>Re,H7:()=>Me,aF:()=>Ve,qV:()=>He,$T:()=>Ge,I2:()=>Ke,x5:()=>tt,g:()=>rt,AM:()=>at,z2:()=>st,bh:()=>lt,Ix:()=>le.A,X3:()=>ut,Yq:()=>vt,wB:()=>mt,_y:()=>bt,Fx:()=>_t,mi:()=>jt,pe:()=>Ot,xt:()=>Et,E$:()=>Lt,LQ:()=>Vt,sQ:()=>zt.A,JL:()=>ye,Wp:()=>me,Aq:()=>qt,c_:()=>Xt});var r=n(6087),o=n(6942),a=n.n(o),i=n(790),s=n(7093),c=n(7958),l=n(1455),u=n.n(l),p=n(6427),d=n(8537),f=n(7723),h=n(3832);const g=/^(382|406)$/.test(n.j)?({fetchSavedPosts:e=!1,fetchSuggestions:t=!1,help:n=(0,f.__)("Begin typing search term, click autocomplete result to select.","newspack-plugin"),hideHelp:o=!1,label:a=(0,f.__)("Search","newspack-plugin"),maxItemsToSuggest:s=0,multiSelect:l=!1,onChange:g=!1,onPostTypeChange:y=!1,postTypes:v=[{slug:"post",label:"Post"}],postTypeLabel:m=(0,f.__)("item","newspack-plugin"),postTypeLabelPlural
1:w=(0,f.__)("items","newspack-plugin"),selectedItems:b=[],selectedPost:x=0,suggestionsToFetch:_=10})=>{const[k,j]=(0,r.useState)(!0),[S,A]=(0,r.useState)(!1),[C,P]=(0,r.useState)([]),[O,E]=(0,r.useState)(0),[N,L]=(0,r.useState)(v[0].slug),I=["newspack-autocomplete-with-suggestions"];o&&I.push("hide-help"),(0,r.useEffect)(()=>{y&&y(N),j(!0),T(null,0,N).then(e=>{0<e.length&&P(e)}).finally(()=>j(!1))},[N]),(0,r.useEffect)(()=>{S&&T(null,C.length,N).then(e=>{0<e.length&&P(C.concat(e))}).finally(()=>A(!1))},[S]);const M=e||(async(e=[],t=null)=>{const n=t||N,r="post"===n||"page"===n?n+"s":n;return(await u()({path:(0,h.addQueryArgs)("/wp/v2/"+r,{per_page:100,include:e.join(","),_fields:"id,title"})})).map(e=>({value:parseInt(e.id),label:(0,d.decodeEntities)(e.title)||(0,f.__)("(no title)","newspack-plugin")}))}),T=t||(async(e=null,t=0,n=null)=>{const r=n||N,o="post"===r||"page"===r?r+"s":r,a=await u()({parse:!1,path:(0,h.addQueryArgs)("/wp/v2/"+o,{search:e,offset:t,per_page:_,_fields:"id,title"})}),i=parseInt(a.headers.get("x-wp-total")||0),s=await a.json();return E(i),s.reduce((e,t)=>(e.push({value:parseInt(t.id),label:(0,d.decodeEntities)(t?.title.rendered)||(0,f.__)("(no title)","newspack-plugin")}),e),[])}),R=e=>{if(!l)return g(e);const t=x?[...b,x]:[...b];e.forEach(e=>{const n=t.findIndex(t=>parseInt(t.value)===parseInt(e.value));-1<n?t.splice(n,1):t.push(e)}),g(t.map(e=>({...e,postType:N})))},D=e=>{if(l){const t=!!(x?[...b,x]:[...b]).find(t=>parseInt(t.value)===parseInt(e.value)&&t.label===e.label);return(0,i.jsx)(p.CheckboxControl,{checked:t,onChange:()=>R([e]),label:e.label},e.value)}return(0,i.jsx)(p.Button,{isLink:!0,onClick:()=>R([e]),children:e.label},e.value)};return(0,i.jsxs)("div",{className:I.join(" "),children:[0<b.length&&(()=>{const e=x?[...b,x]:b,t=l?(0,f.sprintf)( 2// Translators: %1: the length of selections. %2: the selection leabel. 3// Translators: %1: the length of selections. %2: the selection leabel. 4(0,f.__)("%1$s %2$s selected","newspack-plugin"),e.length,e.length>1?w:m):(0,f.sprintf)( 5// Translators: %s: The label for the selection. 6// Translators: %s: The label for the selection. 7(0,f.__)("Selected %s","newspack-plugin"),m);return(0,i.jsxs)("div",{className:"newspack-autocomplete-with-suggestions__selected-items",children:[(0,i.jsxs)("p",{className:"newspack-autocomplete-with-suggestions__label",children:[t,1<e.length&&(0,f._x)(" â ","separator character","newspack-plugin"),1<e.length&&(0,i.jsx)(p.Button,{onClick:()=>g([]),isLink:!0,isDestructive:!0,children:(0,f.__)("Clear all","newspack-plugin")})]}),e.map(t=>(0,i.jsx)(p.Button,{className:"newspack-autocomplete-with-suggestions__selected-item-button",isTertiary:!0,onClick:()=>g(e.filter(e=>e.value!==t.value)),children:t.label},t.value))]})})(),1<v.length&&(0,i.jsx)(p.SelectControl,{label:(0,f.sprintf)( 8// Translators: %s: The name of the type. 9// Translators: %s: The name of the type. 10(0,f.__)("%s type","newspack-plugin"),m.charAt(0).toUpperCase()+m.slice(1)),value:N,options:v.map(e=>({label:e.label,value:e.slug})),onChange:e=>L(e)}),(0,i.jsx)(c.A,{tokens:[],onChange:R,fetchSuggestions:async e=>T(e,0,N),fetchSavedInfo:e=>M(e),label:a,loading:k,help:!o&&n,returnFullObjects:!0}),(()=>{if(0===C.length)return null;const e=l?"newspack-autocomplete-with-suggestions__search-suggestions-multiselect":"newspack-autocomplete-with-suggestions__search-suggestions";return(0,i.jsxs)(i.Fragment,{children:[!o&&(0,i.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,f.sprintf)((0,f.__)("Or, select a recent %s:","newspack-plugin"),m)}),(0,i.jsxs)("div",{className:e,children:[C.map(D),C.length<(s||O)&&(0,i.jsx)(p.Button,{disabled:S,isSecondary:!0,onClick:()=>A(!0),children:S?(0,f.__)("Loadingâ¦","newspack-plugin"):(0,f.__)("Load more","newspack-plugin")})]})]})})()]})}:null;var y=n(8221),v=n.n(y);const m=406==n.j?({fetchSuggestions:e=!1,help:t=(0,f.__)("Begin typing search term, click autocomplete result to select.","newspack-plugin"),hideHelp:n=!0,hideFormTokenHelp:o=!0,label:a=(0,f.__)("Search","newspack-plugin"),maxItemsToSuggest:s=0,multiSelect:c=!1,onChange:l=!1,selectedItems:g=[],suggestionsToFetch:y=20})=>{const[m,w]=(0,r.useState)(!0),[b,x]=(0,r.useState)(!1),[_,k]=(0,r.useState)([]),[j,S]=(0,r.useState)(0),[A,C]=(0,r.useState)([]),[P,O]=(0,r.useState)({}),[E,N]=(0,r.useState)(!1),L="post",I=["newspack-autocomplete-with-latest-posts"];o&&I.push("hide-form-token-help"),n&&I.push("hide-help");const M=v()(e=>{if(!e||e.length<2)return C([]),void N(!1);N(!0),T(e,0,L).then(e=>{C(e);const t={...P};
10e.forEach(e=>{t[e.value]=e.label}),O(t)}).finally(()=>N(!1))},500);(0,r.useEffect)(()=>{w(!0),T(null,0,L).then(e=>{if(0<e.length){k(e);const t={...P};e.forEach(e=>{t[e.value]=e.label}),O(t)}}).finally(()=>w(!1))},[]),(0,r.useEffect)(()=>{b&&T(null,_.length,L).then(e=>{0<e.length&&k(_.concat(e))}).finally(()=>x(!1))},[b]);const T=e||(async(e=null,t=0,n=null)=>{const r=n||L,o="post"===r||"page"===r?r+"s":r,a=await u()({parse:!1,path:(0,h.addQueryArgs)("/wp/v2/"+o,{search:e,offset:t,per_page:y,_fields:"id,title"})}),i=parseInt(a.headers.get("x-wp-total")||0),s=await a.json();return S(i),s.reduce((e,t)=>(e.push({value:parseInt(t.id),label:(0,d.decodeEntities)(t?.title.rendered)||(0,f.__)("(no title)","newspack-plugin")}),e),[])}),R=e=>{const t=e.reduce((e,t)=>(Object.keys(P).forEach(n=>{if(P[n]===t){const r=isNaN(parseInt(n))?n.toString():parseInt(n);e.push({value:r,label:t})}}),e),[]);if(!c){const e=t[t.length-1];return l(e?[{...e,postType:L}]:[])}l(t.map(e=>({...e,postType:L})))},D=()=>g.reduce((e,t)=>t?t.label?[...e,t.label]:P[t]?[...e,P[t]]:e:e,[]),F=e=>{if(c){const t=!!g.find(t=>parseInt(t.value)===parseInt(e.value)&&t.label===e.label);return(0,i.jsx)(p.CheckboxControl,{checked:t,onChange:()=>{const n=D(),r=e.label;if(t){const e=n.filter(e=>e!==r);R(e)}else R([...n,r])},label:e.label},e.value)}return(0,i.jsx)(p.Button,{isLink:!0,onClick:()=>R([...D(),e.label]),children:e.label},e.value)};return(0,i.jsxs)("div",{className:I.join(" "),children:[(0,i.jsxs)("div",{className:"newspack-autocomplete-with-latest-posts__input-container",children:[(0,i.jsx)(p.FormTokenField,{value:D(),suggestions:A.map(e=>e.label),onChange:R,onInputChange:M,label:a,help:!n&&t,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(m||E)&&(0,i.jsx)(p.Spinner,{})]}),(()=>{if(0===_.length)return null;const e=c?"newspack-autocomplete-with-latest-posts__search-suggestions-multiselect":"newspack-autocomplete-with-latest-posts__search-suggestions";return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"newspack-autocomplete-with-latest-posts__search-suggestions-container",children:[(0,i.jsx)("p",{className:"newspack-autocomplete-with-suggestions__label",children:(0,f.__)("Latest Posts","newspack-plugin")}),(0,i.jsxs)("div",{className:e,children:[_.map(F),_.length<(s||j)&&(0,i.jsx)(p.Button,{disabled:b,isSecondary:!0,onClick:()=>x(!0),children:b?(0,f.__)("Loadingâ¦","newspack-plugin"):(0,f.__)("Load more","newspack-plugin")})]})]})})})()]})}:null;var w=n(6732);if(/^(382|406|828|930)$/.test(n.j))var b=n(7677);if(/^(382|406|828|930)$/.test(n.j))var x=n(6655);class _ extends(/^(382|406|828|930)$/.test(n.j)?r.Component:null){render(){const{chevron:e,className:t,desc:n,grouped:r,icon:o,isDestructive:s,isPressed:c,isSmall:l,title:u,...p}=this.props,d=a()("newspack-button-card",t,e&&"has-chevron",r&&"grouped",o&&"has-icon",s&&"is-destructive",c&&"is-pressed",l&&"is-small");return(0,i.jsxs)("a",{className:d,...p,children:[o&&(0,i.jsx)(b.A,{icon:o,height:48,width:48}),(0,i.jsxs)($e,{noMargin:!0,columns:1,gutter:8,children:[u&&(0,i.jsx)("h3",{children:u}),n&&(0,i.jsx)("p",{children:n})]}),e&&(0,i.jsx)(b.A,{icon:x.A,height:24,width:24})]})}}const k=/^(382|406|828|930)$/.test(n.j)?_:null;if(/^(382|406)$/.test(n.j))var j=n(7022);const S=/^(382|406)$/.test(n.j)?({hexColor:e,isInverted:t=!1,children:n,...r})=>{let o;o="#f0f0f0"===e?"#1e1e1e":(0,j.b)(e);const a=t?{color:e,backgoundColor:o}:{backgroundColor:e,color:o};return(0,i.jsx)("div",{...r,style:a,children:n})}:null;class A extends r.Component{render(){const{buttonsCard:e,className:t,headerActions:n,isNarrow:r,isMedium:o,isSmall:s,isWhite:c,noBorder:l,...u}=this.props,p=a()("newspack-card",t,e&&"newspack-card__buttons-card",n&&"newspack-card__header-actions",o&&"newspack-card__is-medium",r&&"newspack-card__is-narrow",s&&"newspack-card__is-small",c&&"newspack-card__is-white",l&&"newspack-card__no-border");return(0,i.jsx)("div",{className:p,...u})}}const C=A;var P=n(7309),O=n.n(P),E=n(7612),N=n.n(E);class L extends r.Component{state={suggestions:{},allCategories:{},isLoading:!1};constructor(e){super(e),this.debouncedUpdateSuggestions=v()(this.updateSuggestions,100)}componentDidMount(){this.setState({isLoading:!0}),u()({path:(0,h.addQueryArgs)(`/wp/v2/${this.props.taxonomy}`,{per_page:-1,_fields:"id,name"})}).then(e=>this.setState({allCategories:e})).finally(()=>this.setState({isLoading:!1}))}componentWillUnmount(){this.debouncedUpdateSuggestions.cancel()}updateSuggestions(e){this.setState({isLoading:!0}),u()({path:(0,h.addQueryArgs)(`/wp/v2/${this.props.taxonomy}`,{search:e,per_page:20,_fields:"id,name",orderby:"count",order:"desc"})}).then(e=>{this.setState({suggestions:e.reduce((e,t)=>
10({...e,[t.name]:t}),{})})}).finally(()=>this.setState({isLoading:!1}))}handleOnChange=e=>{const{onChange:t}=this.props,{suggestions:n}=this.state;t(e.filter(e=>void 0!==e).map(e=>"string"==typeof e?n[e]:e).filter(Boolean))};getAvailableSuggestions=()=>{const{value:e}=this.props,{suggestions:t}=this.state,n=e.reduce((e,t)=>(t?.id&&e.push(t.id),e),[]);return N()(t,({id:e})=>-1===n.indexOf(e)).map(e=>e.name)};render(){const{className:e,disabled:t,description:n,hideHelpFromVision:r,hideLabelFromVision:o,label:s,value:c}=this.props,{allCategories:l,isLoading:u}=this.state,d=a()("newspack-category-autocomplete",e);return(0,i.jsxs)("div",{className:d,children:[(0,i.jsx)(je,{onInputChange:e=>this.debouncedUpdateSuggestions(e),value:c.reduce((e,t)=>{const n="number"==typeof t?O()(l,["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:s,disabled:t,description:n,hideHelpFromVision:r,hideLabelFromVision:o}),u?(0,i.jsx)("span",{className:"newspack-category-autocomplete__suggestions-spinner",children:(0,i.jsx)(p.Spinner,{})}):null]})}}L.defaultProps={taxonomy:"categories"};const I=/^(382|828)$/.test(n.j)?L:null;var M={grad:.9,turn:360,rad:360/(2*Math.PI)},T=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},R=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},D=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},F=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},$=function(e){return{r:D(e.r,0,255),g:D(e.g,0,255),b:D(e.b,0,255),a:D(e.a)}},V=function(e){return{r:R(e.r),g:R(e.g),b:R(e.b),a:R(e.a,3)}},z=/^#([0-9a-f]{3,8})$/i,H=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},B=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),i=a-Math.min(t,n,r),s=i?a===t?(n-r)/i:a===n?2+(r-t)/i:4+(t-n)/i:0;return{h:60*(s<0?s+6:s),s:a?i/a*100:0,v:a/255*100,a:o}},U=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),i=r*(1-n),s=r*(1-(t-a)*n),c=r*(1-(1-t+a)*n),l=a%6;return{r:255*[r,s,i,i,c,r][l],g:255*[c,r,r,s,i,i][l],b:255*[i,i,c,r,r,s][l],a:o}},q=function(e){return{h:F(e.h),s:D(e.s,0,100),l:D(e.l,0,100),a:D(e.a)}},W=function(e){return{h:R(e.h),s:R(e.s),l:R(e.l),a:R(e.a,3)}},G=function(e){return U((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},Z=function(e){return{h:(t=B(e)).h,s:(o=(200-(n=t.s))*(r=t.v)/100)>0&&o<200?n*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,r,o},K=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Q=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,J=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Y=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,X={string:[[function(e){var t=z.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?R(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?R(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=J.exec(e)||Y.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:$({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=K.exec(e)||Q.exec(e);if(!t)return null;var n,r,o=q({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(M[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return G(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=void 0===o?1:o;return T(t)&&T(n)&&T(r)?$({r:Number(t),g:Number(n),b:Number(r),a:Number(a)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,a=void 0===o?1:o;if(!T(t)||!T(n)||!T(r))return null;var i=q({h:Number(t),s:Number(n),l:Number(r),a:Number(a)});return G(i)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,a=void 0===o?1:o;if(!T(t)||!T(n)||!T(r))return null;var i=function(e){return{h:F(e.h),s:D(e.s,0,100),v:D(e.v,0,100),a:D(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(a)});return U(i)},"hsv"]]},ee=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]},te=function(e,t){var n=Z(e);return{h:n.h,s:D(n.s+100*t,0,100),l:n.l,a:n.a}},ne=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},re=function(e,t){var n=Z(e);return{h:n.h,s:n.s,l:D(n.l+100*t,0,100),a:n.a}
10},oe=function(){function e(e){this.parsed=function(e){return"string"==typeof e?ee(e.trim(),X.string):"object"==typeof e&&null!==e?ee(e,X.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 R(ne(this.rgba),2)},e.prototype.isDark=function(){return ne(this.rgba)<.5},e.prototype.isLight=function(){return ne(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=V(this.rgba)).r,n=e.g,r=e.b,a=(o=e.a)<1?H(R(255*o)):"","#"+H(t)+H(n)+H(r)+a;var e,t,n,r,o,a},e.prototype.toRgb=function(){return V(this.rgba)},e.prototype.toRgbString=function(){return t=(e=V(this.rgba)).r,n=e.g,r=e.b,(o=e.a)<1?"rgba("+t+", "+n+", "+r+", "+o+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,o},e.prototype.toHsl=function(){return W(Z(this.rgba))},e.prototype.toHslString=function(){return t=(e=W(Z(this.rgba))).h,n=e.s,r=e.l,(o=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+o+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,o},e.prototype.toHsv=function(){return e=B(this.rgba),{h:R(e.h),s:R(e.s),v:R(e.v),a:R(e.a,3)};var e},e.prototype.invert=function(){return ae({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),ae(te(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),ae(te(this.rgba,-e))},e.prototype.grayscale=function(){return ae(te(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),ae(re(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),ae(re(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?ae({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):R(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Z(this.rgba);return"number"==typeof e?ae({h:e,s:t.s,l:t.l,a:t.a}):R(t.h)},e.prototype.isEqual=function(e){return this.toHex()===ae(e).toHex()},e}(),ae=function(e){return e instanceof oe?e:new oe(e)},ie=[],se=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},ce=function(e){return.2126*se(e.r)+.7152*se(e.g)+.0722*se(e.b)},le=n(2247);const{useHistory:ue}=le.A;var pe=n(6449),de=n.n(pe),fe=n(6924),he=n.n(fe);const ge=(e,t)=>{if(de()(e))return t},ye={usePrompt:(e,t)=>{const n=ue(),o=(0,r.useRef)(null),a=n=>{if(e)return void 0===n&&(n=window.event),t};return(0,r.useEffect)(()=>(e&&(o.current=n.block(t),window.addEventListener("beforeunload",a)),()=>{o.current&&o.current(),window.removeEventListener("beforeunload",a)}),[t,e]),o.current||(()=>{})},useObjectState:(e={})=>{const[t,n]=(0,r.useState)(e),o=e=>n(t=>he()({},t,e,ge));return[t,e=>{if("string"==typeof e)return t=>o({[e]:t});o(e)}]},useOnClickOutside:(e,t)=>{(0,r.useEffect)(()=>{const n=n=>{e.current&&!e.current.contains(n.target)&&t(n)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[e,t])},useUniqueId:e=>(0,r.useRef)(`${e}-${Math.round(99999*Math.random())}`).current};var ve=n(8558);const me={InteractiveDiv:({style:e={},...t})=>(0,i.jsx)("div",{tabIndex:"0",role:"button",onKeyDown:e=>ve.ENTER===e.keyCode&&t.onClick(),style:{cursor:"pointer",...e},...t}),confirmAction:e=>!!confirm(e)};!function(e){e.forEach(function(e){ie.indexOf(e)<0&&(e(oe,X),ie.push(e))})}([function(e){e.prototype.luminance=function(){return e=ce(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,o,a,i,s,c,l=t instanceof e?t:new e(t);return a=this.rgba,i=l.toRgb(),n=(s=ce(a))>(c=ce(i))?(s+.05)/(c+.05):(c+.05)/(s+.05),void 0===(r=2)&&(r=0),void 0===o&&(o=Math.pow(10,r)),Math.floor(o*n)/o+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(i=void 0===(a=(n=t).size)?"normal":a,"AAA"===(o=void 0===(r=n.level)?"AA":r)&&"normal"===i?7:"AA"===o&&"large"===i?3:4.5);var n,r,o,a,i}}]);const{InteractiveDiv:we}=me,be=/^(382|406|930)$/.test(n.j)?({label:e,color:t="#fff",onChange:n,className:o})=>{const[s,c]=(0,r.useState)(!1),l=(0,r.useRef)(),u=ae(t);return ye.useOnClickOutside(l,()=>c(!1)),(0,i.jsxs)("div",{className:a()("newspack-color-picker",o),children:[(0,i.jsx)("div",{className:"newspack-color-picker__label",children:e}),(0,i.jsx)(we,{className:"newspack-color-picker__expander",onClick:()=>c(!s),style:{backgroundColor:t,color:u.contrast()>u.contrast("#000")?"#fff":"#000"},children:t}),(0,i.jsx)("div",{className:"newspack-color-picker__main",ref:l,children:s&&(0,i.jsx)(p.ColorPicker,{color:t,onChange:e=>
10n(e),enableAlpha:!1})})]})}:null;class xe extends(382==n.j?r.Component:null){render(){const{className:e,...t}=this.props,n=a()("newspack-custom-select-control",e);return(0,i.jsx)(p.CustomSelectControl,{className:n,...t})}}const _e=382==n.j?xe:null;class ke extends r.Component{render(){const{className:e,description:t,hideHelpFromVision:n,hideLabelFromVision:r,...o}=this.props,s=a()("newspack-form-token-field__input-container",e);return(0,i.jsxs)("div",{className:a()({"newspack-form-token-field--label-hidden":r,"newspack-form-token-field--help-hidden":n},"newspack-form-token-field"),children:[(0,i.jsx)(p.FormTokenField,{className:s,...o}),t&&(0,i.jsx)("p",{className:"newspack-form-token-field__help",children:t})]})}}const je=ke,Se=({simple:e})=>{const{components_demo:t=!1,support:n=!1,setup_wizard:r=!1,reset_url:o=!1,plugin_version:a={label:"Newspack"},remove_starter_content:s=!1,support_email:c}=window.newspack_urls||{},l=[{label:a.label,url:"https://newspack.com/category/release-notes/",external:!0},{label:(0,f.__)("About","newspack-plugin"),url:"https://newspack.com/",external:!0},{label:(0,f.__)("Documentation","newspack-plugin"),url:n,external:!0}];return t&&l.push({label:(0,f.__)("Components Demo","newspack-plugin"),url:t}),r&&l.push({label:(0,f.__)("Setup Wizard","newspack-plugin"),url:r}),o&&l.push({label:(0,f.__)("Reset Newspack","newspack-plugin"),url:o}),s&&l.push({label:(0,f.__)("Remove Starter Content","newspack-plugin"),url:s}),c&&l.push({label:(0,f.__)("Contact Support","newspack-plugin"),url:`mailto:${c}`}),(0,i.jsx)("div",{className:"newspack-footer",children:!e&&(0,i.jsx)("ul",{children:l.map(({url:e,label:t,external:n},r)=>(0,i.jsx)("li",{children:n?(0,i.jsx)(p.ExternalLink,{href:e,children:t}):(0,i.jsx)("a",{href:e,children:t})},r))})})};var Ae=n(6139),Ce=n.n(Ae);class Pe extends r.Component{constructor(){super(...arguments),this.state={pluginInfo:[],showModal:!1}}componentDidMount=()=>{this._isMounted=!0;const{plugin:e}=this.props;this.retrievePluginInfo(e)};componentWillUnmount=()=>{this._isMounted=!1};retrievePluginInfo=e=>{const{onReady:t}=this.props;u()({path:"/newspack/v1/plugins/"+e}).then(e=>{this._isMounted&&(t(e),this.setState({pluginInfo:e}))})};textForPlugin=e=>{const t={modalBody:null,modalTitle:e.Name&&`${(0,f.__)("Manage","newspack-plugin")} ${e.Name}`,primaryButton:e.Name&&`${(0,f.__)("Manage","newspack-plugin")} ${e.Name}`,primaryModalButton:(0,f.__)("Manage","newspack-plugin"),dismissModalButton:(0,f.__)("Dismiss","newspack-plugin")};return Ce()(t,this.props)};goToPlugin=e=>{const{editLink:t,showOnBlockEditor:n}=this.props;u()({path:"/newspack/v1/plugins/"+e+"/handoff",method:"POST",data:{editLink:t,handoffReturnUrl:window&&window.location.href,showOnBlockEditor:!!n}}).then(e=>{window.location.href=e.HandoffLink})};render(){const{className:e,children:t,compact:n,useModal:o,modalTitle:s,modalBody:c,onReady:l,editLink:u,...p}=this.props,{pluginInfo:d,showModal:h}=this.state,{modalBody:g,modalTitle:y,primaryButton:v,primaryModalButton:m,dismissModalButton:b}=this.textForPlugin(d),{Configured:x,Name:_,Slug:k,Status:j}=d,S=a()(x&&"is-configured",e);return(0,i.jsxs)(r.Fragment,{children:[_&&"active"===j&&(0,i.jsx)(w.A,{className:S,isSecondary:!p.isPrimary&&!p.isTertiary&&!p.isLink,...p,onClick:()=>o?this.setState({showModal:!0}):this.goToPlugin(k),children:t||v}),_&&"active"!==j&&(0,i.jsx)(w.A,{className:S,variant:"secondary",disabled:!0,...p,children:_+(0,f.__)(" not installed","newspack-plugin")}),!_&&(0,i.jsx)(w.A,{className:S,isSecondary:!p.isPrimary&&!p.isTertiary&&!p.isLink,...p,children:(0,i.jsxs)(r.Fragment,{children:[!n&&(0,i.jsx)(Lt,{isLeft:!0}),(0,f.__)("Retrieving Plugin Info","newspack-plugin")]})}),h&&(0,i.jsxs)(Ve,{title:y,onRequestClose:()=>this.setState({showModal:!1}),children:[(0,i.jsx)("p",{children:g}),(0,i.jsxs)(C,{buttonsCard:!0,noBorder:!0,className:"justify-end",children:[(0,i.jsx)(w.A,{variant:"secondary",onClick:()=>this.setState({showModal:!1}),children:b}),(0,i.jsx)(w.A,{variant:"primary",onClick:()=>this.goToPlugin(k),children:m})]})]})]})}}Pe.defaultProps={onReady:()=>{}};const Oe=Pe;var Ee=n(1093);function Ne(){const[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{setTimeout(()=>{const e=JSON.parse(localStorage.getItem(Ee.J));t(!!e?.message&&e.message),e?.url&&-1===window.location.href.indexOf(e.url)&&(window.localStorage.removeItem(Ee.J),t(!1))},100)},[]),e?(0,i.jsx)(Ge,{isHandoff:!0,isDismissible:!1,rawHTML:!0,noticeText:e}):null}/^(382|406|828|930)$/.test(n.j)||(b=n(7677));var Le=n(8851);class Ie extends r.Component{render(){const{className:e,...t}=this.props;return(0,i.jsx)(p.Tooltip,{...t,children:(0,i.jsx)("span",{className:a()("newspack-info-button",e),children:(0,i.jsx)(b.A,{icon:Le.A})})})}}const Me=Ie;class Te extends r.Component{constructor(){super(...arguments),this.state={frame:!1}}openModal=()=>{this.state.frame?this.state.frame.open():this.setState({frame:wp.media({title:(0,f.__)("Select or upload image"),button:{text:(0,f.__)("Select")},library:{type:"image"},multiple:!1})},()=>{this.state.frame.on("select",this.handleImageSelect),this.state.frame.open()})};handleImageSelect=()=>{const{onChange:e}=this.props;e(this.state.frame.state().get("selection").first().toJSON())};render=()=>{const{buttonLabel:e,className:t,disabled:n,help:r,image:o,info:s,isCovering:c,label:l,onCh
10ange:u,style:p={}}=this.props,d=a()("newspack-image-upload__image",{"newspack-image-upload__image--has-image":o},{"newspack-image-upload__image--covering":c});return(0,i.jsxs)("div",{className:a()("newspack-image-upload",t),children:[(0,i.jsxs)("div",{className:"newspack-image-upload__header",children:[l&&(0,i.jsx)("label",{className:"newspack-image-upload__label",children:l}),s&&(0,i.jsx)(Me,{text:s})]}),(0,i.jsx)("div",{className:d,style:{...p},children:o?.url?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("img",{"data-testid":"image-upload",src:o.url,alt:(0,f.__)("Image preview","newspack-plugin")}),(0,i.jsxs)("div",{className:"newspack-image-upload__controls",children:[(0,i.jsx)(w.A,{disabled:n,onClick:this.openModal,isLink:!0,children:(0,f.__)("Replace","newspack-plugin")}),(0,i.jsx)("span",{className:"sep"}),(0,i.jsx)(w.A,{disabled:n,onClick:()=>u(null),isLink:!0,isDestructive:!0,children:(0,f.__)("Remove","newspack-plugin")})]})]}):(0,i.jsx)(w.A,{disabled:n,onClick:this.openModal,isLink:!0,children:e||(0,f.__)("Upload","newspack-plugin")})}),r&&(0,i.jsx)("p",{className:"newspack-image-upload__help",children:r})]})}}const Re=/^(382|406|930)$/.test(n.j)?Te:null;if(/^(382|930)$/.test(n.j))var De=n(5373);const Fe=/^(382|930)$/.test(n.j)?()=>{const e=(0,De.parse)(window.location.search)["newspack-notice"];return e?e.split(",").map((e,t)=>0===e.indexOf("_error_")?(0,i.jsx)(Ge,{isError:!0,noticeText:e.replace("_error_",""),rawHTML:!0},t):(0,i.jsx)(Ge,{isSuccess:!0,noticeText:e},t)):null}:null,$e=({className:e="",columns:t=2,gutter:n=32,noMargin:r=!1,rowGap:o=0,...s})=>{const c=a()("newspack-grid",r&&"newspack-grid--no-margin",t&&"newspack-grid__columns-"+t,n&&"newspack-grid__gutter-"+n,o&&"newspack-grid__row-gap-"+o,e);return(0,i.jsx)("div",{className:c,...s})},Ve=(0,r.forwardRef)(function({className:e,isWide:t,isNarrow:n,hideTitle:r,...o},s){const c=a()("newspack-modal",t&&"newspack-modal--wide",n&&"newspack-modal--narrow",r&&"newspack-modal--hide-title",e);return(0,i.jsx)(p.Modal,{className:c,...o,ref:s})});class ze extends r.Component{render(){const{className:e,simple:t,size:n,white:r}=this.props,o=a()("newspack-icon",t&&"newspack-icon--simple",r&&"newspack-icon--white",e);return(0,i.jsx)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",height:n,width:n,viewBox:"0 0 24 24",className:o,children:(0,i.jsx)(p.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"})})}}ze.defaultProps={size:32};const He=ze;var Be=n(8176),Ue=n(8351),qe=n(8349);class We extends r.Component{render(){const{className:e,debugMode:t,isError:n,isHandoff:o,isHelp:s,isSuccess:c,isWarning:l,noticeText:u,rawHTML:p,style:d={},children:f=null}=this.props,h=a()("newspack-notice",e,t&&"newspack-notice__is-debug",n&&"newspack-notice__is-error",o&&"newspack-notice__is-handoff",s&&"newspack-notice__is-help",c&&"newspack-notice__is-success",l&&"newspack-notice__is-warning");let g;return g=s?Be.A:c?Ue.A:t?qe.A:Le.A,(0,i.jsxs)("div",{className:h,style:d,children:[(0,i.jsx)(b.A,{icon:g}),(0,i.jsxs)("div",{className:"newspack-notice__content",children:[p?(0,i.jsx)(r.RawHTML,{children:u}):u,f||null]})]})}}const Ge=We;class Ze extends r.Component{constructor(){super(...arguments),this.state={pluginInfo:{},installationInitialized:!1}}componentDidMount=()=>{const{plugins:e}=this.props;this.retrievePluginInfo(e).then(()=>{this.props.autoInstall&&this.installAllPlugins()})};componentDidUpdate=e=>{const{autoInstall:t,plugins:n}=this.props,{installationInitialized:r}=this.state;n!==e.plugins&&this.retrievePluginInfo(n),t&&!r&&this.installAllPlugins()};retrievePluginInfo=e=>new Promise(t=>{u()({path:"/newspack/v1/plugins/"}).then(n=>{const r=Object.keys(n).reduce((t,r)=>(-1===e.indexOf(r)||(t[r]={...n[r],installationStatus:"active"===n[r].Status?1:0}),t),{});this.updatePluginInfo(r).then(()=>t())})});installAllPlugins=()=>{const{pluginInfo:e}=this.state;this.setState({installationInitialized:!0}),Object.keys(e).filter(t=>"active"!==e[t].Status).map(e=>()=>this.installPlugin(e)).reduce((e,t)=>
10e.then(e=>t().then(Array.prototype.concat.bind(e))),Promise.resolve([]))};installPlugin=e=>{this.setInstallationStatus(e,2);const t={path:`/newspack/v1/plugins/${e}/configure/`,method:"post"};return u()(t).then(t=>{const{pluginInfo:n}=this.state;this.props.onInstalled(e),this.updatePluginInfo({...n,[e]:{...t,installationStatus:1}})}).catch(t=>{this.setInstallationStatus(e,3,t.message)})};setChecked=(e,t)=>{const{pluginInfo:n}=this.state;this.updatePluginInfo({...n,[e]:{...n[e],checked:t}})};setInstallationStatus=(e,t,n=null)=>{const{pluginInfo:r}=this.state;this.updatePluginInfo({...r,[e]:{...r[e],installationStatus:t,notification:n}})};updatePluginInfo=e=>new Promise(t=>{const{onStatus:n}=this.props;this.setState({pluginInfo:e},()=>{const r=Object.values(e).every(e=>"active"===e.Status);n({complete:r,pluginInfo:e}),t()})});classForInstallationStatus=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"}};render(){const{autoInstall:e,isSmall:t,withoutFooterButton:n}=this.props,{pluginInfo:r}=this.state,{is_managed:o}=window.newspack_aux_data||{},c=Object.keys(r),l=[];c.forEach(e=>{const t=r[e];l.push(t.Status)});const u=e=>"active"===e||"inactive"===e,p=l.every(u)?(0,f.__)("Activate","newspack-plugin"):(0,f.__)("Install","newspack-plugin"),d=c.some(e=>{const t=r[e];return"active"!==t.Status&&0===t.installationStatus});return(0,i.jsxs)(i.Fragment,{children:[(!r||!Object.keys(r).length)&&(0,i.jsxs)("div",{className:"newspack-plugin-installer_is-waiting",children:[(0,i.jsx)(Lt,{isLeft:!0}),(0,f.__)("Retrieving plugin informationâ¦","newspack-plugin")]}),r&&c.length>0&&c.map(e=>{const n=r[e],{Name:c,Description:l,Download:p,Status:d,installationStatus:h,notification:g}=n,y=2===h,v=!y&&"active"!==d,m=p||u(d);let w;2===h?w="inactive"===d?(0,f.__)("Activatingâ¦"):(0,f.__)("Installingâ¦"):m?"uninstalled"===d?w=(0,i.jsxs)("span",{className:"newspack-plugin-installer__status",children:[(0,f.__)("Install","newspack"),(0,i.jsx)("span",{className:"newspack-checkbox-icon"})]}):"inactive"===d?w=(0,i.jsxs)("span",{className:"newspack-plugin-installer__status",children:[(0,f.__)("Activate","newspack-plugin"),(0,i.jsx)("span",{className:"newspack-checkbox-icon"})]}):"active"===d&&(w=(0,i.jsxs)("span",{className:"newspack-plugin-installer__status",children:[(0,f.__)("Installed","newspack-plugin"),(0,i.jsx)("span",{className:"newspack-checkbox-icon newspack-checkbox-icon--checked",children:(0,i.jsx)(b.A,{icon:Ue.A})})]})):w=(0,i.jsxs)("span",{className:"newspack-plugin-installer__status",children:[o?(0,f.__)("Contact Newspack support to install","newspack-plugin"):(0,f.__)("Plugin must be installed manually","newspack-plugin"),(0,i.jsx)("span",{className:"newspack-checkbox-icon"})]});const x=a()("newspack-action-card__plugin-installer",this.classForInstallationStatus(h)),_=v?()=>this.installPlugin(e):null;return(0,i.jsx)(s.A,{title:c,description:l,disabled:!m,actionText:w,isSmall:t,isWaiting:y,onClick:_,notification:g,notificationLevel:"error",notificationHTML:!0,className:x},e)}),!n&&!e&&r&&c.length>0&&(0,i.jsx)("div",{className:"newspack-buttons-card",children:(0,i.jsx)(w.A,{disabled:!d,isPrimary:!0,onClick:this.installAllPlugins,children:p})})]})}}Ze.defaultProps={onStatus:()=>{},onInstalled:()=>{}};const Ke=Ze;var Qe=n(2619);const Je=e=>Array.isArray(e.options)&&e.options.length,Ye=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}},Xe=e=>{var t;const[n,o]=(0,r.useState)(!0),{error:a,sectionKey:c,active:l,title:u,description:d,fields:h,disabled:g,onChange:y,onUpdate:v}=e,m=e=>({disabled:g,name:`${e.section}_${e.key}`,type:Ye(e),label:e.description,help:e.help||null,options:e.options?.map(e=>({value:e.value,label:e.name||e.label}))||null,value:e.value,multiple:!(!Je(e)||!e.multiple)||null,checked:"boolean"===e.type?!!e.value:null,onChange:t=>{y(e.key,t),o(!1)}}),b=(t,n=null)=>(0,Qe.applyFilters)(`newspack.settingSection.${c}.${t}`,n,e);let x=2;return h.length%3==0?x=3:1===h.length&&(x=1),(0,i.jsx)(s.A,{id:null!==(t=e.id)&&void 0!==t?t:null,isMedium:!0,disabled:g,title:u,description:d,toggleChecked:l,hasGreyHeader:l||null===l,toggleOnChange:null!==l?e=>v({active:e}):null,actionContent:(l||null===l)&&b("buttons",(0,i.jsx)(w.A,{variant:"primary",disabled:g||n,onClick:()=>{v(),o(!0)},children:(0,f.__)("Save Settings","newspack")})),children:(l||null===l)&&(0,i.jsxs)(r.Fragment,{children:[a?.message&&(0,i.jsx)(Ge,{noticeText:a.message,isError:!0}),b("beforeControls"),(0,i.jsx)($e,{columns:x,gutter:32,children:h.map(e=>{const t=(e=>{if(Je(e))return vt;switch(e.type){case"checkbox":case"boolean":return p.CheckboxControl;default:return Et}})(e);return(0,Qe.applyFilters)(`newspack.settingsSection.${c}.control`,(0,i.jsx)(t,{...m(e)}
10,e.key),{sectionKey:c,setting:e,onChange:y})})})]})})};class et extends r.Component{constructor(){super(...arguments),this.state={inFlight:!1,settings:{},error:null}}fetchSettings=()=>{const{afterFetch:e,pluginSlug:t,isWizard:n}=this.props;this.setState({inFlight:!0}),u()({path:n?`/newspack/v1/wizard/${t}/settings`:`/${t}/v1/settings`}).then(t=>{this.setState({settings:t,error:null}),"function"==typeof e&&e(t)}).catch(e=>{this.setState({error:e})}).finally(()=>{this.setState({inFlight:!1})})};componentDidMount(){this.fetchSettings()}getSettingsValues=e=>this.state.settings[e]?.reduce((e,t)=>(e[t.key]=t.value,e),{})||{};handleSettingChange=e=>(t,n)=>{const r=[...this.state.settings[e]];r.forEach(e=>{e.key===t&&(e.value=n)}),this.setState({settings:{...this.state.settings,[e]:r}})};handleSectionUpdate=e=>t=>{const{afterUpdate:n,pluginSlug:r,isWizard:o}=this.props;this.setState({inFlight:!0}),u()({path:o?`/newspack/v1/wizard/${r}/settings`:`/${r}/v1/settings`,method:"POST",data:{section:e,settings:t||this.getSettingsValues(e)}}).then(t=>{this.setState({settings:{...this.state.settings,[e]:t[e]},error:null}),"function"==typeof n&&n(t)}).catch(e=>{this.setState({error:e})}).finally(()=>{this.setState({inFlight:!1})})};getSectionInfo=e=>this.state.settings[e]?.find(e=>!e.key||"active"===e.key);getSectionTitle=e=>this.getSectionInfo(e)?.description;getSectionDescription=e=>this.getSectionInfo(e)?.help;isSectionActive=e=>{const{settings:t}=this.state,n=t[e]?.find(e=>"active"===e.key);return n?n.value:null};getSectionFields=e=>this.state.settings[e]?.filter(e=>e.key&&"active"!==e.key);render(){const{title:e,description:t,hasGreyHeader:n,children:o,titleLevel:s=1}=this.props,{settings:c,inFlight:l,error:u}=this.state;return(0,i.jsxs)(r.Fragment,{children:[e&&(0,i.jsx)(ut,{title:e,heading:s,description:t}),u&&(0,i.jsx)(Ge,{isError:!0,noticeText:u.message}),(0,i.jsxs)("div",{className:a()("newspack-plugin-settings",{"newspack-wizard-section__is-loading":l&&!Object.keys(c).length}),children:[Object.keys(c).map(e=>(0,i.jsx)(Xe,{disabled:l,id:`plugin-settings-${e}`,sectionKey:e,title:this.getSectionTitle(e),description:this.getSectionDescription(e),active:this.isSectionActive(e),fields:this.getSectionFields(e),onChange:this.handleSettingChange(e),onUpdate:this.handleSectionUpdate(e),hasGreyHeader:n},e)),o]})]})}}et.defaultProps={title:(0,f.__)("General Settings","newspack-plugin")},et.Section=Xe;const tt=/^(382|406|828)$/.test(n.j)?et:null;class nt extends(/^(406|828)$/.test(n.j)?r.Component:null){state={pluginInfo:{}};componentDidMount=()=>{this.retrievePluginInfo()};retrievePluginInfo=()=>new Promise(()=>{u()({path:"/newspack/v1/plugins/"}).then(e=>this.setState({pluginInfo:e}))});managePlugin=(e,t)=>{const{plugins:n}=this.props,{pluginInfo:r}=this.state,o=t?"configure":"deactivate",a={path:`/newspack/v1/plugins/${e}/${o}/`,method:"post"};this.setState({pluginInfo:{...r,[e]:{...r[e],inFlight:o}}},()=>{u()(a).then(t=>{const{shouldRefreshAfterUpdate:r}=n[e];this.setState(({pluginInfo:n})=>({pluginInfo:{...n,[e]:t}}),()=>r&&location.reload())}).catch(t=>{this.setState({pluginInfo:{...r,[e]:{...r[e],error:t.message||(0,f.__)("There was an error managing this plugin.","newspack-plugin")}}})})})};render(){const{plugins:e}=this.props,{pluginInfo:t}=this.state;return this.prepareDataForRender(e,t).map((e,t)=>{var n;const{name:r,description:o,href:a,slug:c,editPath:l}=e,u=this.isPluginInstalledAndActive(e),p=!a&&u&&l?c:null,d=this.errorForPlugin(e);return(0,i.jsx)(s.A,{className:this.classNameForPlugin(e),title:r,description:o,actionText:this.actionTextForPlugin(e),handoff:p,onClick:null!==(n=e.onClick)&&void 0!==n?n:null,href:a,toggle:!0,toggleChecked:this.isPluginInstalledAndActive(e),toggleOnChange:e=>this.managePlugin(c,e),notification:d,notificationHTML:d,notificationLevel:"error"},t)})}prepareDataForRender=(e,t)=>Object.keys(e).map(e=>t[e]?Object.keys(t[e]).reduce((n,r)=>({...n,[r.charAt(0).toLowerCase()+r.slice(1)]:t[e][r]}),{}):{}).map(t=>Object.assign(t,e[t.slug]));classNameForPlugin=e=>{const{status:t,inFlight:n}=e;return n?"in-flight":t?void 0:"loading"};actionTextForPlugin=e=>{const{actionText:t,editPath:n,href:o,inFlight:a,name:s}=e;return"configure"===a?(0,i.jsxs)(r.Fragment,{children:[(0,f.__)("Installingâ¦","newspack-plugin")," ",(0,i.jsx)(Lt,{isRight:!0})]}):"deactivate"===a?(0,i.jsxs)(r.Fragment,{children:[(0,f.__)("Deactivatingâ¦","newspack-plugin")," ",(0,i.jsx)(Lt,{isRight:!0})]}):s?this.isPluginInstalledAndActive(e)?o||n?t||(0,f.__)("Configure","newspack-plugin"):void 0:null:(0,i.jsxs)(r.Fragment,{children:[(0,f.__)("Loadingâ¦","newspack-plugin")," ",(0,i.jsx)(Lt,{isRight:!0})]})};errorForPlugin=e=>{const{slug:t}=e,{pluginInfo:n}=this.state;return n[t]?.error||null};isPluginInstalledAndActive=e=>{const{status:t}=e;return"active"===t}}const rt=/^(406|828)$/.test(n.j)?nt:null;class ot extends r.Component{render(){const{className:e,padding:t,...n}=this.props,r=a()("newspack-popover",t&&"newspack-popover__padding-"+t,e);return(0,i.jsx)(p.Popover,{className:r,...n})}}ot.defaultProps={padding:!1};const at=/^(382|828)$/.test(n.j)?ot:null;class it extends(/^(382|406|930)$/.test(n.j)?r.Component:null){getCompletionPercentage(e,t){return t?Math.max(Math.min(Math.round(e/t*100),100),0):100}render(){const{label:e,completed:t,total:n,displayFraction:r}=this.props,o=Math.max(0,parseInt(n)||0),a=Math.max(0,Math.min(parseInt(t)||0,parseInt(o))),s={width:this.getCompletionPercentage(a,o)+"%"};return(0,i.jsxs)("div",{className:"newspack-progress-bar",children:[(e||r)&&(0,i.jsxs)("div",{className:"newspack-progress-bar__headings",children:[e&&(0,i.jsx)("h2",{children:e}),r&&(0,i.jsx)("p",{className:"is-dark",children:(0,i.jsxs)("strong",{children:[a,"/",o]})})]}),(0,i.jsx)("div",{className:"newspack-progress-bar__container",children:(0,i.jsx)("div",{className:"newspack-progress-bar__bar",style:s,"data-testid":"progress-bar-indicator"})})]})}}const st=/^(382|406|930)$/.test(n.j)?it:null;class ct extends(382==n.j?r.Component:null){render(){const{className:e,...t}=this.props,n=a()("newspack-radio-control",e);return(0,i.jsx)(p.RadioControl,{className:n,...t})}}const lt=382==n.j?ct:null,ut=({centered:e=!1,className:t=null,description:n="",heading:o=2,isWhite:s=!1,noMargin:c=!1,title:l,id:u=null})=>{const p=(0,r.useRef)();(0,r.useEffect)(()=>{const e=new Proxy(new URLSearchParams(window.location.search),{get:(e,t)=>e.get(t)}).scrollTo;e&&e===u&&window.setTimeout(()=>p.current.scrollIntoView({behavior:"smooth"}),250)},[]);const d=a()("newspack-section-header",e&&"newspack-section-header--is-centered",s&&"newspack-section-header--is-white",c&&"newspack-section-header--no-margin",t),f=`h${o}`;return(0,i.jsx)("div",{id:u,className:"newspack-section-header__container",ref:p,children:(0,i.jsxs)($e,{columns:1,gutter:8,className:d,children:["string"==typeof l&&(0,i.jsx)(f,{children:l}),"function"==typeof l&&(0,i.jsx)(f,{children:l()}),n&&"string"==typeof n&&(0,i.jsx)("p",{children:n}),"function"==typeof n&&(0,i.jsx)("p",{children:n()}),n&&"string"!=typeof n&&"function"!=typeof n&&(0,i.jsx)("p",{children:n})]})})};var pt=n(2485),dt=n(2426),ft=n.n(dt);function ht({help:e,label:t,onChange:n,optgroups:r=[],className:o,hideLabelFromVision:s,...c}){const l=ye.useUniqueId("group-select");return(0,i.jsx)(p.BaseControl,{label:t,hideLabelFromVision:s,id:l,help:e,className:a()(o,"components-select-control"),children:(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsxs)("select",{id:l,className:"components-select-control__input",onChange:e=>{const{value:t}=e.target,o=O()(r,e=>ft()(e.options,["value",t]));n(t,o)},"aria-describedby":e?`${l}__help`:void 0,...c,children:[(0,i.jsx)("option",{value:"",children:(0,f.__)("-- Select --","newspack-plugin")}),r.map(({label:e,options:t},n)=>(0,i.jsx)("optgroup",{label:e,children:t.map((e,t)=>(0,i.jsx)("option",{value:e.value,disabled:e.disabled,children:e.label},`${e.label}-${e.value}-${t}`))},n))]}),(0,i.jsx)("div",{className:"components-select-control__arrow-wrapper",children:(0,i.jsx)(b.A,{icon:pt.A,size:18})})]})})}const gt=({buttonOptions:e,buttonSmall:t,className:n,help:r,hideLabelFromVision:o,label:s,onChange:c,value:l})=>{const u=ye.useUniqueId("button-group");return(0,i.jsx)(p.BaseControl,{label:s,help:r,hideLabelFromVision:o,id:u.current,className:a()(n,"components-select-control"),children:(0,i.jsx)(p.ButtonGroup,{children:e.map(e=>{const n=l===e.value;let r=()=>e.label;return e.icon&&(r=()=>(0,i.jsx)(b.A,{icon:e.icon})),(0,i.jsx)(p.Button,{variant:n?"primary":null,isPressed:n,onClick:()=>c(e.value),isSmall:t,children:(0,i.jsx)(r,{})},e.value)})})})};class yt extends r.Component{render(){const{className:e,optgroups:t,buttonOptions:n,buttonSmall:r,...o}=this.props,s=a()("newspack-select-control",t&&"newspack-grouped-select-control",n&&"newspack-buttons-select-control",e);return(0,i.jsx)("div",{className:s,children:t?(0,i.jsx)(ht,{optgroups:t,...o}):n?(0,i.jsx)(gt,{buttonOptions:n,buttonSmall:r,...o}):(0,i.jsx)(p.SelectControl,{...o})})}}const vt=yt,mt={SettingsCard:({children:e,className:t,columns:n=3,gutter:r=32,noBorder:o,rowGap:c,...l})=>{const u=a()("newspack-settings__card",o&&"newspack-settings__no-border",t);return(0,i.jsx)(s.A,{...l,className:u,notificationLevel:"info",noBorder:o,children:(0,i.jsx)($e,{columns:n,gutter:r,rowGap:c,children:e})})},SettingsSection:({title:e,description:t,children:n})=>(0,i.jsxs)($e,{columns:1,gutter:8,className:"newspack-settings__section",children:[(0,i.jsxs)("div",{className:"newspack-settings__section__title",children:[(0,i.jsx)("span",{children:e}),t&&(0,i.jsx)(Me,{text:t})]}),(0,i.jsx)("div",{className:"newspack-settings__section__content",children:n})]}),MinMaxSetting:({min:e,max:t,onChangeMin:n,onChangeMax:r,minPlaceholder:o,maxPlaceholder:a,...s})=>(0,i.jsxs)("div",{...s,children:[(0,i.jsxs)("div",{className:"newspack-settings__min-max",children:[(0,i.jsx)(p.CheckboxControl,{checked:e>0,onChange:e=>n(e?1:0),label:(0,f.__)("Min","newspack-plugin")}),(0,i.jsx)(Et,{"data-testid":"min",type:"number",value:e,placeholder:o,onChange:e=>n(e>0?e:0)})]}),(0,i.jsxs)("div",{className:"newspack-settings__min-max","data-testid":"max",children:[(0,i.jsx)(p.CheckboxControl,{checked:t>0,onChange:t=>r(t?e||1:0),label:(0,f.__)("Max","newspack-plugin")}),(0,i.jsx)(Et,{"data-testid":"max",type:"number",value:t,placeholder:a,onChange:e=>r(e>0?e:0)})]})]})};class wt extends(382==n.j?r.Component:null){render(){const{className:e,stepsListItems:t,narrowList:n,style:r={}}=this.props,o=a()("steps-list",e,n&&"steps-list__narrow-list");return(0,i.jsx)("div",{className:o,style:r,children:t.map((e,t)=>(0,i.jsx)(_t,{listItemCount:t+1,listItemText:e},t))})}}const bt=382==n.j?wt:null;class xt extends(382==n.j?r.Component:null){render(){const{className:e,listItemCount:t,listItemText:n,style:r={}}=this.props,o=a()("steps-list-item",e);return(0,i.jsxs)("div",{className:o,style:r,children:[(0,i.jsx)("div",{className:"steps-list-item__number",children:t}),(0,i.jsx)("div",{className:"steps-list-item__content",dangerouslySetInnerHTML:{__html:n}})]})}}const _t=382==n.j?xt:null;class kt extends(/^(382|930)$/.test(n.j)?r.Component:null){render(){const{ariaLabel:e,className:t,cardTitle:n,url:r,image:o,imageType:s,isActive:c,onClick:l,id:u}=this.props,d=a()("newspack-style-card",c&&"newspack-style-card__is-active",t);return(0,i.jsxs)("div",{className:d,id:u,children:[(0,i.jsxs)("div",{className:"newspack-style-card__image",children:["html"===s?(0,i.jsx)("div",{className:"newspack-style-card__image-html",dangerouslySetInnerHTML:o}):(0,i.jsx)("img",{src:o,alt:n+" "+(0,f.__)("Thumbnail","newspack-plugin")}),(0,i.jsxs)("div",{className:"newspack-style-card__actions",children:[c?(0,i.jsx)("span",{className:"newspack-style-card__actions__badge",children:(0,f.__)("Selected","newspack-plugin")}):(0,i.jsx)(p.Button,{variant:"link",onClick:l,"aria-label":e||(0,f.__)("Select","newspack-plugin")+" "+n,tabIndex:"0",children:(0,f.__)("Select","newspack-plugin")}),r&&(0,i.jsx)(Vt,{url:r,label:(0,f.__)("View Demo","newspack-plugin"),variant:"link"})]})]}),n&&(0,i.jsx)("div",{className:"newspack-style-card__title",children:n})]})}}const jt=/^(382|930)$/.test(n.j)?kt:null;var St=n(4713),At=n.n(St);const{NavLink:Ct,useHistory:Pt}=le.A,Ot=({items:e,className:t,disableUpcoming:n,children:r=null})=>{const o=e.filter(e=>!e.isHiddenInTabbedNavigation),{location:s}=Pt(),c=At()(o,["path",s.pathname]);return(0,i.jsxs)("div",{className:a()("newspack-tabbed-navigation",t),children:[(0,i.jsx)("ul",{children:o.map((e,t)=>(0,i.jsx)("li",{children:(0,i.jsx)(Ct,{to:e.path,isActive:(t,{pathname:n})=>function(e,t,n){return e.path===n||(Array.isArray(e?.activeTabPaths)?e.activeTabPaths.some(t=>{if(t.endsWith("*")){const e=t.slice(0,-1);return n.startsWith(e)}return e.activeTabPaths.includes(n)}):t)}(e,t,n),exact:!e.hasOwnProperty("exact")||e.exact,activeClassName:"selected",className:a()({disabled:n&&t>c}),children:e.label})},t))}),r]})},Et=({className:e="",required:t=!1,isWide:n=!1,withMargin:o=!0,...s})=>{const c=(0,r.useRef)(null);(0,r.useEffect)(()=>
10{if(null===c.current)return;const e=c.current.querySelector("label");e&&e.setAttribute("data-required-text",(0,f.__)("(required)","newspack-plugin"))},[c.current]);const l=a()("newspack-text-control",{"newspack-text-control--wide":n,"newspack-text-control--with-margin":o},e);return t?(0,i.jsx)("div",{ref:c,className:"newspack-text-control--required",children:(0,i.jsx)(p.TextControl,{className:l,required:t,...s})}):(0,i.jsx)(p.TextControl,{className:l,...s})};class Nt extends r.Component{render(){const{className:e,isRight:t,isLeft:n,isCenter:r,...o}=this.props,s=a()("newspack-waiting",e,{"is-right":t,"is-left":n,"is-center":r});return(0,i.jsx)(p.Spinner,{className:s,...o})}}const Lt=Nt;var It=n(5573),Mt=(0,i.jsx)(It.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(It.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"})}),Tt=(0,i.jsx)(It.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(It.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"})}),Rt=(0,i.jsx)(It.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(It.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"})}),Dt=n(4707);const Ft="newspack-components-web-preview-wrapper";class $t extends r.Component{state={device:"desktop",loaded:!1,isPreviewVisible:!1};constructor(e){super(e),this.iframeRef=(0,r.createRef)()}componentDidMount(){const e=document.getElementById(Ft);this.modalDOMElement=e||document.createElement("div"),e||(this.modalDOMElement.id=Ft,document.body.appendChild(this.modalDOMElement))}componentDidUpdate(){!0===this.state.isPreviewVisible?document.body.classList.add("newspack-web-preview--open"):document.body.classList.remove("newspack-web-preview--open")}getWebPreviewModal=()=>{const{beforeLoad:e=()=>{},onClose:t=()=>{},url:n,title:o}=this.props,{device:s,loaded:c,isPreviewVisible:l}=this.state;if(!this.modalDOMElement||!l)return null;const u=a()("newspack-web-preview",s,c&&"is-loaded");let d=Mt;return"desktop"===s?d=Tt:"tablet"===s&&(d=Rt),e(),(0,r.createPortal)((0,i.jsx)("div",{className:u,children:(0,i.jsxs)("div",{className:"newspack-web-preview__interior",children:[(0,i.jsxs)("div",{className:"newspack-web-preview__toolbar",children:[o&&(0,i.jsx)("div",{className:"newspack-web-preview__toolbar-left",children:(0,i.jsx)("h2",{children:o})}),(0,i.jsxs)("div",{className:"newspack-web-preview__toolbar-right",children:[(0,i.jsx)(p.DropdownMenu,{icon:d,label:(0,f.__)("Preview Size","newspack-plugin"),children:({onClose:e})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.MenuItem,{icon:"desktop"===s?Ue.A:null,role:"menuitemradio",isSelected:"desktop"===s,onClick:()=>{this.setState({device:"desktop"}),e()},children:(0,f.__)("Desktop","newspack-plugin")}),(0,i.jsx)(p.MenuItem,{icon:"tablet"===s?Ue.A:null,role:"menuitemradio",isSelected:"tablet"===s,onClick:()=>{this.setState({device:"tablet"}),e()},children:(0,f.__)("Tablet","newspack-plugin")}),(0,i.jsx)(p.MenuItem,{icon:"phone"===s?Ue.A:null,role:"menuitemradio",isSelected:"phone"===s,onClick:()=>{this.setState({device:"phone"}),e()},children:(0,f.__)("Phone","newspack-plugin")})]})}),(0,i.jsx)(p.Button,{onClick:()=>{t(),this.setState({isPreviewVisible:!1,loaded:!1})},icon:Dt.A,label:(0,f.__)("Close Preview","newspack-plugin")})]})]}),(0,i.jsxs)("div",{className:"newspack-web-preview__content",children:[!c&&(0,i.jsxs)("div",{className:"newspack-web-preview__is-waiting",children:[(0,i.jsx)(Lt,{isLeft:!0}),(0,f.__)("Loadingâ¦","newspack-plugin")]}),(0,i.jsx)("iframe",{ref:this.iframeRef,title:"web-preview",src:n,onLoad:()=>{this.setState({loaded:!0}),this.props.onLoad(this.iframeRef.current)}})]})]})}),this.modalDOMElement)};showPreview=()=>{this.setState({isPreviewVisible:!0})};render(){const{label:e,variant:t,renderButton:n}=this.props;return(0,i.jsxs)(r.Fragment,{children:[n?n({showPreview:this.showPreview}):(0,i.jsx)(p.Button,{variant:t,onClick:this.showPreview,tabIndex:"0",children:e}),this.getWebPreviewModal()]})}}$t.defaultProps={url:"//newspack.com",label:(0,f.__)("Preview","newspack-plugin"),onLoad:()=>{}};const Vt=/^(382|406|930)$/.test(n.j)?$t:null;var zt=n(7791);if(/^(382|828|841|930)$/.test(n.j))var Ht=n(591);const{Redirect:Bt,Route:Ut}=le.A;function qt(e,t){return class extends r.Component{constructor(e){super(e),this.state={complete:null,error:null,loading:t&&t.length>
100?1:0,quietLoading:!1,confirmation:null},this.wrappedComponentRef=(0,r.createRef)()}componentDidMount=()=>{if(!t){const e=this.wrappedComponentRef.current;e&&e.onWizardReady&&e.onWizardReady()}};setError=e=>new Promise(t=>{this.setState({error:e||null},()=>t())});getError=()=>{const{error:e}=this.state;if(!e)return null;const t=this.parseError(e),{level:n}=t;return"fatal"===n?this.getFatalError(t):this.getErrorNotice(t)};getErrorNotice=e=>{const{message:t}=e;return(0,i.jsx)(Ge,{isError:!0,className:"newspack-wizard__above-header",noticeText:t,rawHTML:!0})};getFatalError=e=>{const t=this.getFallbackURL();if(!t)return null;const{message:n}=e;return(0,i.jsxs)(Ve,{title:(0,f.__)("Unrecoverable error"),onRequestClose:()=>window.location=t,children:[(0,i.jsx)(Ge,{noticeText:n,isError:!0,rawHTML:!0}),(0,i.jsx)(C,{buttonsCard:!0,noBorder:!0,className:"justify-end",children:(0,i.jsx)(w.A,{isPrimary:!0,href:t,children:(0,f.__)("Return to Dashboard","newspack-plugin")})})]})};parseError=e=>{const{data:t,message:n,code:r}=e;let o="fatal";return t&&"level"in t?o=t.level:"rest_invalid_param"===r&&(o="notice"),{message:n,level:o}};pluginInstallationStatus=({complete:e})=>{this.state.loading&&this.doneLoading();const t=this.wrappedComponentRef.current;this.setState({complete:e},()=>{e&&t&&t.onWizardReady&&t.onWizardReady()})};startLoading=e=>{e?this.setState(e=>({quietLoading:e.quietLoading+1})):this.setState(e=>({loading:e.loading+1}))};doneLoading=e=>{e?this.setState(e=>({quietLoading:e.quietLoading-1})):this.setState(e=>({loading:e.loading-1}))};wizardApiFetch=e=>{const{quiet:t}=e;return this.startLoading(t),new Promise((n,r)=>{u()(e).then(e=>{this.doneLoading(t),n(e)}).catch(e=>{this.doneLoading(t),r(e)})})};pluginRequirements=()=>{const{complete:e}=this.state;return e?(0,i.jsx)(Bt,{from:"/plugin-requirements",to:"/"}):(0,i.jsx)(Ut,{path:"/",render:()=>(0,i.jsxs)(r.Fragment,{children:[null!==e&&(0,i.jsx)("div",{className:"newspack-wizard__header",children:(0,i.jsx)("div",{className:"newspack-wizard__header__inner",children:(0,i.jsxs)("div",{className:"newspack-wizard__title",children:[(0,i.jsx)(w.A,{isLink:!0,href:newspack_urls.dashboard,label:(0,f.__)("Return to Dashboard","newspack-plugin"),showTooltip:!0,icon:Ht.A,iconSize:36,children:(0,i.jsx)(He,{size:36})}),(0,i.jsx)("div",{children:(0,i.jsx)("h2",{children:t.length>1?(0,f.__)("Required plugins","newspack-plugin"):(0,f.__)("Required plugin","newspack-plugin")})})]})})}),(0,i.jsx)("div",{className:"newspack-wizard newspack-wizard__content",children:(0,i.jsx)(Ke,{plugins:t,onStatus:e=>this.pluginInstallationStatus(e)})})]})})};confirmAction=e=>{const t={title:null,message:(0,f.__)("Are you sure?","newpack-plugin"),confirmText:(0,f.__)("OK","newspack-plugin"),cancelText:(0,f.__)("Cancel","newspack-plugin"),callback:null,...e};this.setState({confirmation:t})};getModal=()=>{if(!this.state.confirmation)return null;const{title:e,message:t,confirmText:n,cancelText:r,callback:o}=this.state.confirmation;return t&&o&&(0,i.jsxs)(Ve,{isNarrow:!0,hideTitle:!e,title:e,onRequestClose:()=>this.setState({confirmation:null}),children:[(0,i.jsx)("p",{children:t}),(0,i.jsxs)(C,{buttonsCard:!0,noBorder:!0,className:"justify-end",children:[(0,i.jsx)(w.A,{variant:"secondary",onClick:()=>this.setState({confirmation:null}),children:r}),(0,i.jsx)(w.A,{variant:"primary",onClick:()=>{this.setState({confirmation:null}),o()},children:n})]})]})};getFallbackURL=()=>{if("undefined"!=typeof newspack_urls)return newspack_urls.dashboard};render(){const{simpleFooter:n}=this.props,{loading:o,quietLoading:a,error:s}=this.state,c=[o?"newspack-wizard__is-loading":"newspack-wizard__is-loaded"];return a&&c.push("newspack-wizard__is-loading-quiet"),(0,i.jsxs)(r.Fragment,{children:[this.getError(),this.getModal(),(0,i.jsx)("div",{className:c.join(" "),children:(0,i.jsx)(e,{confirmAction:this.confirmAction,pluginRequirements:t&&this.pluginRequirements(),clearError:this.clearError,getError:this.getError,errorData:s,setError:this.setError,isLoading:o,startLoading:this.startLoading,doneLoading:this.doneLoading,wizardApiFetch:this.wizardApiFetch,ref:this.wrappedComponentRef,...this.props})}),!o&&(0,i.jsx)(Se,{simple:n})]})}}}var Wt=n(1882),Gt=n.n(Wt),Zt=n(3805),Kt=n.n(Zt),Qt=n(5015),Jt=n.n(Qt);function Yt(e){const t={};return Gt()(e)&&(t.onClick=e),Jt()(e)&&(t.href=e),Kt()(e)&&(e.handoff&&(t.plugin=e.handoff,e.editLink&&(t.editLink=e.editLink)),e.onClick&&(t.onClick=e.onClick),e.href&&(t.href=e.href)),t}function Xt(e,{hidePrimaryButton:t}={}){return n=>{const{className:r,buttonText:o,buttonAction:s,buttonDisabled:c,headerText:l,subHeaderText:u,tabbedNavigation:p,secondaryButtonText:d,secondaryButtonAction:h,renderAboveContent:g,disableUpcomingInTabbedNavigation:y}=n,v=Yt(s),m=Yt(h),b=m.plugin?Oe:w.A,x=o&&s,_=d&&h,k=(e={})=>v.plugin?(0,i.jsx)(Oe,{isPrimary:!0,...v,...e,children:o}
10):(0,i.jsx)(w.A,{isPrimary:!c,isSecondary:!!c,disabled:c,children:o,...v,...e});return(0,i.jsxs)(i.Fragment,{children:[newspack_aux_data.is_debug_mode&&(0,i.jsx)(Ge,{debugMode:!0}),(0,i.jsx)("div",{className:"newspack-wizard__header",children:(0,i.jsx)("div",{className:"newspack-wizard__header__inner",children:(0,i.jsxs)("div",{className:"newspack-wizard__title",children:[(0,i.jsx)(w.A,{isLink:!0,href:newspack_urls.dashboard,label:(0,f.__)("Return to Dashboard","newspack-plugin"),showTooltip:!0,icon:Ht.A,iconSize:36,children:(0,i.jsx)(He,{size:36})}),(0,i.jsxs)("div",{children:[l&&(0,i.jsx)("h2",{children:l}),u&&(0,i.jsx)("span",{children:u})]})]})})}),p&&(0,i.jsx)(Ot,{disableUpcoming:y,items:p.filter(e=>!e.isHiddenInNav)}),(0,i.jsx)(Ne,{}),(0,i.jsxs)("div",{className:a()("newspack-wizard newspack-wizard__content",r),children:["function"==typeof g?g():null,(0,i.jsx)(e,{...n,renderPrimaryButton:k}),(x||_)&&(0,i.jsxs)("div",{className:"newspack-buttons-card",children:[x&&!t&&k(),_&&(0,i.jsx)(b,{isSecondary:!0,...m,children:d})]})]})]})}}},1331:(e,t,n)=>{var r=n(2552),o=n(8879),a=n(346),i=Function.prototype,s=Object.prototype,c=i.toString,l=s.hasOwnProperty,u=c.call(Object);e.exports=function(e){if(!a(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==u}},1333:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var r in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0}},1349:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={"primary-000":"#dfe7f4","primary-050":"#bfcfe9","primary-100":"#9fb6dd","primary-200":"#809ed2","primary-300":"#6086c7","primary-400":"#406ebc","primary-500":"#2055b0","primary-600":"#003da5","primary-700":"#00296e","primary-800":"#001f53","primary-900":"#001437","primary-1000":"#000a1c","secondary-000":"#eff9f2","secondary-050":"#ddf3e3","secondary-100":"#c8ecd4","secondary-200":"#b1e6c3","secondary-300":"#95dfaf","secondary-400":"#6fd898","secondary-500":"#26d07c","secondary-600":"#1fb36a","secondary-700":"#1ba25f","secondary-800":"#178e53","secondary-900":"#117644","secondary-1000":"#09552f","tertiary-000":"#fff4f6","tertiary-050":"#fee8ed","tertiary-100":"#fedbe3","tertiary-200":"#fcded8","tertiary-300":"#fdbfcd","tertiary-400":"#fcaec0","tertiary-500":"#fc9bb3","tertiary-600":"#d9859a","tertiary-700":"#c5788b","tertiary-800":"#ad697a","tertiary-900":"#905665","tertiary-1000":"#683d48","quaternary-000":"#fff5ee","quaternary-050":"#ffeadc","quaternary-100":"#ffdec7","quaternary-200":"#ffd1af","quaternary-300":"#ffc392","quaternary-400":"#ffb46a","quaternary-500":"#ffa300","quaternary-600":"#dc8c00","quaternary-700":"#c77e00","quaternary-800":"#af6e00","quaternary-900":"#925b00","quaternary-1000":"#6a4100","neutral-000":"#fff","neutral-050":"#f7f7f7","neutral-100":"#f0f0f0","neutral-200":"#e0e0e0","neutral-300":"#ddd","neutral-400":"#ccc","neutral-500":"#949494","neutral-600":"#6c6c6c","neutral-700":"rgba(0,0,0,.702)","neutral-800":"#3e3e3e","neutral-900":"#1e1e1e","neutral-1000":"#000","success-000":"#edfaef","success-050":"#b8e6bf","success-500":"#008a20","success-600":"#007017","error-000":"#fcf0f1","error-050":"#facfd2","error-500":"#d63638","error-600":"#b32d2e","warning-000":"#fcf9e8","warning-050":"#f5e6ab","warning-300":"#dba617","warning-400":"#bd8600"}},1380:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1420:(e,t,n)=>{var r=n(79);e.exports=function(){this.__data__=new r,this.size=0}},1459:e=>{e.exports=function(e){return this.__data__.has(e)}}
10,1472:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(5573),o=n(790);const a=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M19 5H5C4.46957 5 3.96086 5.21071 3.58579 5.58579C3.21071 5.96086 3 6.46957 3 7V17C3 17.5304 3.21071 18.0391 3.58579 18.4142C3.96086 18.7893 4.46957 19 5 19H19C19.5304 19 20.0391 18.7893 20.4142 18.4142C20.7893 18.0391 21 17.5304 21 17V7C21 6.46957 20.7893 5.96086 20.4142 5.58579C20.0391 5.21071 19.5304 5 19 5ZM19.5 17C19.5 17.1326 19.4473 17.2598 19.3536 17.3536C19.2598 17.4473 19.1326 17.5 19 17.5H5C4.86739 17.5 4.74021 17.4473 4.64645 17.3536C4.55268 17.2598 4.5 17.1326 4.5 17V7C4.5 6.86739 4.55268 6.74021 4.64645 6.64645C4.74021 6.55268 4.86739 6.5 5 6.5H19C19.1326 6.5 19.2598 6.55268 19.3536 6.64645C19.4473 6.74021 19.5 6.86739 19.5 7V17ZM16.602 9.4H17.626V15H16.786L14.226 11.16V15H13.202V9.4H14.21L16.602 13.016V9.4ZM11.291 9.4H12.291L10.147 15.68H9.147L11.29 9.4H11.291ZM7.15 9.4H7.934V15H6.91V10.848C6.80429 10.9156 6.69325 10.9744 6.578 11.024C6.45891 11.076 6.33402 11.1136 6.206 11.136L6.118 10.272C6.25527 10.2381 6.38534 10.1799 6.502 10.1C6.643 10.01 6.774 9.903 6.894 9.78C7.014 9.655 7.099 9.528 7.15 9.4Z"})}),i=/^(104|406|617)$/.test(n.j)?a:null},1489:(e,t,n)=>{var r=n(7400);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},1514:e=>{"use strict";e.exports=Math.abs}
10,1549:(e,t,n)=>{var r=n(2032),o=n(3862),a=n(6721),i=n(2749),s=n(5749);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=i,c.prototype.set=s,e.exports=c},1561:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=!!/^(8(28|4|41)|[46]06|382|498|617|930)$/.test(n.j)||null,o="Invariant failed";function a(e,t){if(!e){if(r)throw new Error(o);var n="function"==typeof t?t():t,a=n?"".concat(o,": ").concat(n):o;throw new Error(a)}}},1622:(e,t,n)=>{"use strict";function r(e){"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",e):e())}function o(e){const t=e%60;return`${Math.floor(e/60)}:${t<10?"0":""}${t}`}function a(e,t=[]){return Array.from(e.entries()).reduce((e,[n,r])=>t.includes(n)?(n.indexOf("[]")>-1?(e[n=n.replace("[]","")]=e[n]||[],e[n].push(r)):e[n]=r,e):e,{})}n.d(t,{Qc:()=>r,fU:()=>o,wJ:()=>a})},1702:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(7723);if(/^(617|795)$/.test(n.j))var o=n(4818);var a=n(7143),i=n(6087),s=n(4871),c=n.n(s),l=n(4715),u=n(6427),p=n(9782),d=n(790);function f({attributes:e,setAttributes:t}){const[n,s]=(0,i.useState)(!1);function f(){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{children:(0,r.__)("This is the Corrections block, it will display all the corrections and clarifications.","newspack-plugin")}),(0,d.jsx)("p",{children:(0,r.__)("If there are no corrections or clarifications, this block will not be displayed.","newspack-plugin")})]})}function h(){return(0,d.jsx)(l.InspectorControls,{children:(0,d.jsx)(u.PanelBody,{title:(0,r.__)("Correction Box Settings","newspack-plugin"),children:(0,d.jsx)(u.PanelRow,{children:(0,d.jsx)(u.SelectControl,{label:(0,r.__)("Corrections by Priority","newspack-plugin"),help:(0,r.__)("Filter corrections by their priority.","newspack-plugin"),value:e.priority,options:[{label:(0,r.__)("High","newspack-plugin"),value:"high"},{label:(0,r.__)("Low","newspack-plugin"),value:"low"},{label:(0,r.__)("All","newspack-plugin"),value:"all"}],onChange:e=>t({priority:e})})})})})}return"wp_template"===(0,a.useSelect)(e=>e("core/editor").getCurrentPostType(),[])?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(f,{}),(0,d.jsx)(h,{})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h,{}),(0,d.jsx)(l.BlockControls,{children:(0,d.jsx)(u.ToolbarGroup,{children:(0,d.jsx)(u.ToolbarButton,{icon:o.A,label:(0,r.__)("Refresh","newspack-plugin"),onClick:()=>{s(!n)}})})}),(0,d.jsx)(c(),{block:p.name,EmptyResponsePlaceholder:f,refresh:n,attributes:e})]})}},1769:(e,t,n)=>{var r=n(6449),o=n(8586),a=n(1802),i=n(3222);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:a(i(e))}},1791:(e,t,n)=>{var r=n(6547),o=n(3360);e.exports=function(e,t,n,a){var i=!n;n||(n={});for(var s=-1,c=t.length;++s<c;){var l=t[s],u=a?a(n[l],e[l],l,n,e):void 0;void 0===u&&(u=e[l]),i?o(n,l,u):r(n,l,u)}return n}},1799:(e,t,n)=>{var r=n(7217),o=n(270);e.exports=function(e,t,n,a){var i=n.length,s=i,c=!a;if(null==e)return!s;for(e=Object(e);i--;){var l=n[i];if(c&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<s;){var u=(l=n[i])[0],p=e[u],d=l[1];if(c&&l[2]){if(void 0===p&&!(u in e))return!1}else{var f=new r;if(a)var h=a(p,d,u,e,t,f);if(!(void 0===h?o(d,p,3,a,f):h))return!1}}return!0}},1800:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},1802:(e,t,n)=>{var r=n(2224),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,i=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,function(e,n,r,o){t.push(r?o.replace(a,"$1"):n||e)}),t});e.exports=i},1811:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var o=t(),a=16-(o-r);if(r=o,a>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},1873:(e,t,n)=>{var r=n(9325).Symbol;e.exports=r},1882:(e,t,n)=>{var r=n(2552),o=n(3805);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1961:(e,t,n)=>{var r=n(9653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},1986:(e,t,n)=>{var r=n(1873),o=n(7828),a=n(5288),i=n(5911),s=n(317),c=n(4247),l=r?r.prototype:void 0,u=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,p,d){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!p(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var f=s;case"[object Set]":var h=1&r;if(f||(f=c),e.size!=t.size&&!h)return!1;var g=d.get(e);if(g)return g==t;r|=2,d.set(e,t);var y=i(f(e),f(t),r,l,p,d);return d.delete(e),y;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},2005:(e,t,n)=>{"use strict";n.d(t,{L:()=>d});var r=n(7143),o=n(8537),a=n(6087),i=n(3076),s=n(7153);function c(e){var t;return null!==(t=e.split("?").at(0))&&void 0!==t?t:e}let l={};const u=e=>{const t={message:"An unknown API error occurred.",statusCode:500,errorCode:"api_unknown_error",details:""};if(!e)return null;if("string"==typeof e)t.message=e;else if(e instanceof Error||"message"in e){var n,r,o;t.message=null!==(n=e.message)&&void 0!==n?n:t.message,t.statusCode=null!==(r=e.data?.status)&&void 0!==r?r:t.statusCode,t.errorCode=null!==(o=e.code)&&void 0!==o?o:t.errorCode,t.details=""}return new s.Ss(t.message,t.statusCode,t.errorCode,t.details)},p=e=>({on(t,n=null){const r=e?.[t];r&&"function"==typeof r&&r(n)}});function d(e){var t;const[n,s]=(0,a.useState)(!1),{wizardApiFetch:d,updateWizardSettings:f}=(0,r.useDispatch)(i.S),h=(0,r.useSelect)(t=>t(i.S).getWizardData(e),[e]),[g,y]=(0,a.useState)(null!==(t=h.error)&&void 0!==t?t:null),v=(0,a.useRef)([]);function m(){y(null)}return(0,a.useEffect)(()=>{f({slug:e,path:["error"],value:g})},[g,f,e]),{wizardApiFetch:(0,a.useCallback)(async(t,n)=>{const{on:r}
10=p(null!=n?n:{}),o=function(t){return(n,r,o=t)=>{const a=o?c(o):o;f({slug:e,path:[a,...Array.isArray(n)?n:[n]].filter(e=>"string"==typeof e),value:r})}}(t.path),{path:a,method:i="GET"}=t,g=c(null!=a?a:""),{isCached:m="GET"===i,updateCacheKey:w=null,updateCacheMethods:b=[],...x}=t,{error:_,[g]:{[i]:k=null}={}}=h;function j(e){if(m&&o(i,e),w&&w.constructor===Object){const[t,n]=Object.entries(w)[0],r=h[t][n];let a;a=r&&r.constructor===Object?{...r,...e}:e,o(Object.entries(w)[0],a,null)}for(const t of b)o(t,e);return r("onSuccess",e),e}function S(e){const t=u(e);throw y(t),r("onError",t),t}function A(){const{[g]:e,...t}=l;l=t,v.current=v.current.filter(e=>e!==g),s(v.current.length>0),r("onFinally")}return l[g]?(s(!0),l[g].then(j).catch(S).finally(A)):m&&(_||k)?(y(_),r("onSuccess",k),k):(s(!0),r("onStart"),v.current.push(g),l[g]=d({isQuietFetch:!0,isLocalError:!0,...x}).then(j).catch(S).finally(A),l[e])},[d,h,f,n,e]),isFetching:n,errorMessage:g?(0,o.decodeEntities)(g.message):null,error:g,cache:t=>({get:(e="GET")=>h[t][e],set(n,r="GET"){f({slug:e,path:[t,r],value:n})}}),setError(e){null===e?m():y(u(e))},resetError:m}}},2006:(e,t,n)=>{var r=n(5389),o=n(4894),a=n(5950);e.exports=function(e){return function(t,n,i){var s=Object(t);if(!o(t)){var c=r(n,3);t=a(t),n=function(e){return c(s[e],e,s)}}var l=e(t,n,i);return l>-1?s[c?t[l]:l]:void 0}}},2032:(e,t,n)=>{var r=n(1042);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},2177:(e,t,n)=>{var r=n(1489);e.exports=function(e,t){var n;if("function"!=typeof t)throw new TypeError("Expected a function");return e=r(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}},2193:(e,t,n)=>{var r=n(8984),o=n(5861),a=n(2428),i=n(6449),s=n(4894),c=n(3656),l=n(5527),u=n(7167),p=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(i(e)||"string"==typeof e||"function"==typeof e.splice||c(e)||u(e)||a(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(l(e))return!r(e).length;for(var n in e)if(p.call(e,n))return!1;return!0}},2199:(e,t,n)=>{var r=n(4528),o=n(6449);e.exports=function(e,t,n){var a=t(e);return o(e)?a:r(a,n(e))}},2224:(e,t,n)=>{var r=n(104);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},2247:(e,t,n)=>{"use strict";if(n.d(t,{A:()=>o}),/^(8(28|4|41)|[46]06|382|498|617|930)$/.test(n.j))var r=n(1125);const o=/^(8(28|4|41)|[46]06|382|498|617|930)$/.test(n.j)?r:null},2426:(e,t,n)=>{var r=n(4248),o=n(5389),a=n(916),i=n(6449),s=n(6800);e.exports=function(e,t,n){var c=i(e)?r:a;return n&&s(e,t,n)&&(t=void 0),c(e,o(t,3))}},2428:(e,t,n)=>{var r=n(7534),o=n(346),a=Object.prototype,i=a.hasOwnProperty,s=a.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!s.call(e,"callee")};e.exports=c},2485:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(790),o=n(5573),a=(0,r.jsx)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(o.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})})},2523:e=>{e.exports=function(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}},2552:(e,t,n)=>{var r=n(1873),o=n(659),a=n(9350),i=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},2578:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(790),o=n(5573),a=(0,r.jsx)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(o.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 12v-1.5h1.5V16h-1.5Zm0-8v5h1.5V8h-1.5Z"})})},2634:()=>{},2642:(e,t,n)=>{"use strict";var r=n(7720),o=Object.prototype.hasOwnProperty,a=Array.isArray,i={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},s=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},c=function(e,t,n){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},l=function(e,t,n,a){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/g,l=n.depth>0&&/(\[[^[\]]*])/.exec(i),u=l?i.slice(0,l.index):i,p=[];if(u){if(!n.plainObjects&&o.call(Object.prototype,u)&&!n.allowPrototypes)return;p.push(u)}for(var d=0;n.depth>0&&null!==(l=s.exec(i))&&d<n.depth;){if(d+=1,!n.plainObjects&&o.call(Object.prototype,l[1].slice(1,-1))&&!n.allowPrototypes)return;p.push(l[1])}if(l){if(!0===n.strictDepth)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");p.push("["+i.slice(l.index)+"]")}return function(e,t,n,o){var a=0;if(e.length>0&&"[]"===e[e.length-1]){var i=e.slice(0,-1).join("");a=Array.isArray(t)&&t[i]?t[i].length:0}for(var s=o?t:c(t,n,a),l=e.length-1;l>=0;--l){var u,p=e[l];
vendor: 4,143 bytes, line 10
10if("[]"===p&&n.parseArrays)u=n.allowEmptyArrays&&(""===s||n.strictNullHandling&&null===s)?[]:r.combine([],s);else{u=n.plainObjects?{__proto__:null}:{};var d="["===p.charAt(0)&&"]"===p.charAt(p.length-1)?p.slice(1,-1):p,f=n.decodeDotInKeys?d.replace(/%2E/g,"."):d,h=parseInt(f,10);n.parseArrays||""!==f?!isNaN(h)&&p!==f&&String(h)===f&&h>=0&&n.parseArrays&&h<=n.arrayLimit?(u=[])[h]=s:"__proto__"!==f&&(u[f]=s):u={0:s}}s=u}return s}(p,t,n,a)}};e.exports=function(e,t){var n=function(e){if(!e)return i;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?i.charset:e.charset,n=void 0===e.duplicates?i.duplicates:e.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||i.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:i.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:i.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:i.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:i.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:i.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:i.depth,duplicates:n,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:i.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:i.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}}(t);if(""===e||null==e)return n.plainObjects?{__proto__:null}:{};for(var u="string"==typeof e?function(e,t){var n={__proto__:null},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;l=l.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u=t.parameterLimit===1/0?void 0:t.parameterLimit,p=l.split(t.delimiter,t.throwOnLimitExceeded?u+1:u);if(t.throwOnLimitExceeded&&p.length>u)throw new RangeError("Parameter limit exceeded. Only "+u+" parameter"+(1===u?"":"s")+" allowed.");var d,f=-1,h=t.charset;if(t.charsetSentinel)for(d=0;d<p.length;++d)0===p[d].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[d]?h="utf-8":"utf8=%26%2310003%3B"===p[d]&&(h="iso-8859-1"),f=d,d=p.length);for(d=0;d<p.length;++d)if(d!==f){var g,y,v=p[d],m=v.indexOf("]="),w=-1===m?v.indexOf("="):m+1;-1===w?(g=t.decoder(v,i.decoder,h,"key"),y=t.strictNullHandling?null:""):(g=t.decoder(v.slice(0,w),i.decoder,h,"key"),y=r.maybeMap(c(v.slice(w+1),t,a(n[g])?n[g].length:0),function(e){return t.decoder(e,i.decoder,h,"value")})),y&&t.interpretNumericEntities&&"iso-8859-1"===h&&(y=s(String(y))),v.indexOf("[]=")>-1&&(y=a(y)?[y]:y);var b=o.call(n,g);b&&"combine"===t.duplicates?n[g]=r.combine(n[g],y):b&&"last"!==t.duplicates||(n[g]=y)}return n}
vendor: 4,111 bytes, line 10
10(e,n):e,p=n.plainObjects?{__proto__:null}:{},d=Object.keys(u),f=0;f<d.length;++f){var h=d[f],g=l(h,u[h],n,"string"==typeof e);p=r.merge(p,g,n)}return!0===n.allowSparse?p:r.compact(p)}},2651:(e,t,n)=>{var r=n(4218);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},2694:(e,t,n)=>{"use strict";var r=n(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},2749:(e,t,n)=>{var r=n(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},2799:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,c=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,y=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,m=n?Symbol.for("react.fundamental"):60117,w=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case p:case a:case s:case i:case f:return e;default:switch(e=e&&e.$$typeof){case l:case d:case y:case g:case c:return e;default:return t}}case o:return t}}}function _(e){return x(e)===p}t.AsyncMode=u,t.ConcurrentMode=p,t.ContextConsumer=l,t.ContextProvider=c,t.Element=r,t.ForwardRef=d,t.Fragment=a,t.Lazy=y,t.Memo=g,t.Portal=o,t.Profiler=s,t.StrictMode=i,t.Suspense=f,t.isAsyncMode=function(e){return _(e)||x(e)===u},t.isConcurrentMode=_,t.isContextConsumer=function(e){return x(e)===l},t.isContextProvider=function(e){return x(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===d},t.isFragment=function(e){return x(e)===a},t.isLazy=function(e){return x(e)===y},t.isMemo=function(e){return x(e)===g},t.isPortal=function(e){return x(e)===o},t.isProfiler=function(e){return x(e)===s},t.isStrictMode=function(e){return x(e)===i},t.isSuspense=function(e){return x(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===s||e===i||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===g||e.$$typeof===c||e.$$typeof===l||e.$$typeof===d||e.$$typeof===m||e.$$typeof===w||e.$$typeof===b||e.$$typeof===v)},t.typeOf=x},2804:(e,t,n)=>{var r=n(6110)(n(9325),"Promise");e.exports=r},2824:(e,t,n)=>{var r=n(7805),o=n(3290),a=n(1961),i=n(3007),s=n(5529),c=n(2428),l=n(6449),u=n(3693),p=n(3656),d=n(1882),f=n(3805),h=n(1331),g=n(7167),y=n(4974),v=n(9884);e.exports=function(e,t,n,m,w,b,x){var _=y(e,n),k=y(t,n),j=x.get(k);if(j)r(e,n,j);else{var S=b?b(_,k,n+"",e,t,x):void 0,A=void 0===S;if(A){var C=l(k),P=!C&&p(k),O=!C&&!P&&g(k);S=k,C||P||O?l(_)?S=_:u(_)?S=i(_):P?(A=!1,S=o(k,!0)):O?(A=!1,S=a(k,!0)):S=[]:h(k)||c(k)?(S=_,c(_)?S=v(_):f(_)&&!d(_)||(S=s(k))):A=!1}A&&(x.set(k,S),w(S,k,m,b,x),x.delete(k)),r(e,n,S)}}},2865:(e,t,n)=>{var r=n(9570),o=n(1811)(r);e.exports=o},2903:(e,t,n)=>{var r=n(3805),o=n(5527),a=n(181),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var s in e)("constructor"!=s||!t&&i.call(e,s))&&n.push(s);return n}}
10,2949:(e,t,n)=>{var r=n(2651);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},2952:(e,t,n)=>{"use strict";function r(e){if(!e)return"";const t=`; ${document.cookie}`.split(`; ${e}=`);return 2===t.length?decodeURIComponent(t.pop().split(";").shift()):""}function o(e,t,n=365){const r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3),document.cookie=`${e}=${t}; expires=${r.toUTCString()}; path=/`}function a(e=9){let t="";for(let n=0;n<e;n++){const e=Math.floor(62*Math.random());t+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".charAt(e)}return t}function i(e="log",...t){"true"===localStorage.getItem("newspack-reader-activation-debug")&&console["error"===e?"error":"log"](...t)}function s(e){window.newspackRAS=window.newspackRAS||[],window.newspackRAS.push(t=>{setTimeout(()=>{if(t.overlays.get().length){const n=({detail:{overlays:t}})=>{setTimeout(()=>{t.length||(e(),window.newspackReaderActivation.off("overlay",n))},50)};return void t.on("overlay",n)}e()},50)})}function c(){s(()=>window.location.reload())}n.d(t,{Ri:()=>r,TV:()=>o,ZZ:()=>s,cY:()=>i,ni:()=>a,q9:()=>c})},3007:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},3040:(e,t,n)=>{var r=n(1549),o=n(79),a=n(8223);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),str
10ing:new r}}},3076:(e,t,n)=>{"use strict";n.d(t,{A:()=>m,S:()=>f});var r=n(3560),o=n.n(r),a=n(8156),i=n.n(a),s=n(2193),c=n.n(s),l=n(1455),u=n.n(l),p=n(7143),d=n(5186);const f="newspack/wizards",h={isLoading:!1,isQuietLoading:!1,apiData:{},error:null},g=e=>JSON.parse(JSON.stringify(e)),y={startLoadingData:(0,d.V)("START_LOADING_DATA"),finishLoadingData:(0,d.V)("FINISH_LOADING_DATA"),fetchFromAPI:(0,d.V)("FETCH_FROM_API"),setAPIDataForWizard:(0,d.V)("SET_API_DATA"),updateWizardSettings:(0,d.V)("UPDATE_WIZARD_SETTINGS"),setError:(0,d.V)("SET_ERROR"),*saveWizardSettings({slug:e,section:t="",payloadPath:n=!1,auxData:r={},updatePayload:o=null}){o&&(yield y.updateWizardSettings({slug:e,...o}));const a=(0,p.select)(f).getWizardAPIData(e),s=n?i()(a,n):a,l=yield y.fetchFromAPI({path:`/newspack/v1/wizard/${e}/${t}`,method:"POST",data:{...s,...r},isQuietFetch:!0});if(!c()(l)&&!l.error)return y.setAPIDataForWizard({slug:e,data:l})},*wizardApiFetch(e){return yield y.fetchFromAPI(e)}},v=(0,p.createReduxStore)(f,{reducer:(e=h,{type:t,payload:n={}})=>{switch(t){case"START_LOADING_DATA":return n.isQuietLoading?{...e,isQuietLoading:!0}:{...e,isLoading:!0};case"FINISH_LOADING_DATA":return{...e,isLoading:!1,isQuietLoading:!1};case"SET_API_DATA":return o()(g(e),["apiData",n.slug],n.data);case"UPDATE_WIZARD_SETTINGS":return o()(g(e),["apiData",n.slug,...n.path],n.value);case"SET_ERROR":return{...e,error:n};default:return e}},actions:y,selectors:{isLoading:e=>e.isLoading,isQuietLoading:e=>e.isQuietLoading,getWizardAPIData:(e,t)=>e.apiData[t]||{},getWizardData:(e,t)=>{var n;return null!==(n=e.apiData[t])&&void 0!==n?n:{}},getError:e=>e.error},controls:{FETCH_FROM_API:e=>{const{isLocalError:t=!1,isQuietFetch:n=!1}=e.payload;return(0,p.dispatch)(f).startLoadingData({isQuietLoading:Boolean(n)}),u()(e.payload).then(e=>((0,p.dispatch)(f).setError(null),e)).catch(e=>{if(t)throw e;(0,p.dispatch)(f).setError(e)}).finally(e=>((0,p.dispatch)(f).finishLoadingData(),e))}},resolvers:{*getWizardAPIData(e){if(e){const t=yield y.fetchFromAPI({path:`/newspack/v1/wizard/${e}`});return y.setAPIDataForWizard({slug:e,data:t})}return y.finishLoadingData()}}}),m=()=>(0,p.register)(v)},3093:(e,t,n)=>{"use strict";var r=n(4459);e.exports=function(e){return r(e)||0===e?e:e<0?-1:1}},3126:(e,t,n)=>{"use strict";var r=n(6743),o=n(9675),a=n(76),i=n(3144);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new o("a function is required");return i(r,a,e)}},3144:(e,t,n)=>{"use strict";var r=n(6743),o=n(1002),a=n(76),i=n(7119);e.exports=i||r.call(a,o)},3170:(e,t,n)=>{var r=n(6547),o=n(1769),a=n(361),i=n(3805),s=n(7797);e.exports=function(e,t,n,c){if(!i(e))return e;for(var l=-1,u=(t=o(t,e)).length,p=u-1,d=e;null!=d&&++l<u;){var f=s(t[l]),h=n;if("__proto__"===f||"constructor"===f||"prototype"===f)return e;if(l!=p){var g=d[f];void 0===(h=c?c(g,f,d):void 0)&&(h=i(g)?g:a(t[l+1])?[]:{})}r(d,f,h),d=d[f]}return e}},3221:e=>{e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),s=i.length;s--;){var c=i[e?s:++o];if(!1===n(a[c],c,a))break}return t}}},3222:(e,t,n)=>{var r=n(7556);e.exports=function(e){return null==e?"":r(e)}},3243:(e,t,n)=>{var r=n(6110),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},3290:(e,t,n)=>{e=n.nmd(e);var r=n(9325),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,s=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},3345:e=>{e.exports=function(){return[]}},3360:(e,t,n)=>{var r=n(3243);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},3488:e=>{e.exports=function(e){return e}},3497:(e,t,n)=>{"use strict";function r(e){e.on("activity",({detail:{action:t,data:n,timestamp:r}})=>{if("article_view"!==t)return;const o=new Date(r);o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0);const a=6-o.getDay();o.setDate(o.getDate()+a);const i=o.getTime(),s=e.store.get("article_view_per_week")||{};s[i]||(s[i]={}),s[i][n.post_id]=!0,e.store.set("article_view_per_week",s),o.setMonth(o.getMonth()+1),o.setDate(1);const c=o.getTime(),l=e.store.get("article_view_per_month")||{};l[c]||(l[c]={}),l[c][n.post_id]=!0,e.store.set("article_view_per_month",l)})}n.d(t,{A:()=>r})},3499:e=>{"use strict";e.exports=Math.pow},3560:(e,t,n)=>{var r=n(3170);e.exports=function(e,t,n){return null==e?e:r(e,t,n)}},3605:e=>{e.exports=function(e){return this.__data__.get(e)}}
10,3628:(e,t,n)=>{"use strict";var r=n(8648),o=n(1064),a=n(7176);e.exports=r?function(e){return r(e)}:o?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return o(e)}:a?function(e){return a(e)}:null},3650:(e,t,n)=>{var r=n(4335)(Object.keys,Object);e.exports=r},3656:(e,t,n)=>{e=n.nmd(e);var r=n(9325),o=n(9935),a=t&&!t.nodeType&&t,i=a&&e&&!e.nodeType&&e,s=i&&i.exports===a?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||o;e.exports=c},3661:(e,t,n)=>{var r=n(3040),o=n(7670),a=n(289),i=n(4509),s=n(2949);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=i,c.prototype.set=s,e.exports=c},3662:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:()=>r})},3663:(e,t,n)=>{var r=n(1799),o=n(776),a=n(7197);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},3693:(e,t,n)=>{var r=n(4894),o=n(346);e.exports=function(e){return o(e)&&r(e)}},3702:e=>{e.exports=function(){this.__data__=[],this.size=0}},3737:(e,t,n)=>{"use strict";n.d(t,{b:()=>o});var r=n(7723);function o(e){return new Promise((t,n)=>{const o=new FileReader;o.readAsText(e,"UTF-8"),o.onload=function(e){let o;try{o=JSON.parse(e.target.result)}catch(e){n((0,r.__)("Invalid JSON file","newspack-plugin"))}t(o)},o.onerror=function(){n((0,r.__)("Unable to read file","newspack-plugin"))}})}},3756:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(790),o=n(5573),a=(0,r.jsx)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(o.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})})},3784:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(790),o=n(5573),a=(0,r.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(o.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})})},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},3916:(e,t,n)=>{var r=n(3360),o=n(641),a=n(5389);e.exports=function(e,t){var n={};return t=a(t,3),o(e,function(e,o,a){r(n,o,t(e,o,a))}),n}},4039:(e,t,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1333);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&o()}},4058:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});class r extends Error{constructor(e,t,n=""){super(e),this.name="WizardError",this.errorCode=t,this.details=n,Object.setPrototypeOf&&Object.setPrototypeOf(this,new.target.prototype)}toJSON(){return{name:this.name,message:this.message,errorCode:this.errorCode,details:this.details,stackTrace:this.stack}}}const o=/^(382|828|930)$/.test(n.j)?r:null},4128:(e,t,n)=>{var r=n(1800),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},4146:(e,t,n)=>{"use strict";var r=n(4363),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?i:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var l=Object.defineProperty,u=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=f(n);o&&o!==h&&e(t,o,r)}var i=u(n);p&&(i=i.concat(p(n)));for(var s=c(t),g=c(n),y=0;y<i.length;++y){var v=i[y];if(!(a[v]||r&&r[v]||g&&g[v]||s&&s[v])){var m=d(n,v);try{l(t,v,m)}catch(e){}}}}return t}}
10,4164:(e,t,n)=>{"use strict";function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=r(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}n.d(t,{A:()=>o});const o=/^(617|740)$/.test(n.j)?function(){for(var e,t,n=0,o="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=r(e))&&(o&&(o+=" "),o+=t);return o}:null},4218:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},4247:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},4248:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},4335:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},4363:(e,t,n)=>{"use strict";e.exports=n(2799)},4394:(e,t,n)=>{var r=n(2552),o=n(346);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},4459:e=>{"use strict";e.exports=Number.isNaN||function(e){return e!=e}},4509:(e,t,n)=>{var r=n(2651);e.exports=function(e){return r(this,e).has(e)}},4528:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},4652:(e,t,n)=>{"use strict";var r=n(453),o=n(6556),a=n(1240),i=n(507),s=n(9675),c=r("%WeakMap%",!0),l=o("WeakMap.prototype.get",!0),u=o("WeakMap.prototype.set",!0),p=o("WeakMap.prototype.has",!0),d=o("WeakMap.prototype.delete",!0);e.exports=c?function(){var e,t,n={assert:function(e){if(!n.has(e))throw new s("Side channel does not contain "+a(e))},delete:function(n){if(c&&n&&("object"==typeof n||"function"==typeof n)){if(e)return d(e,n)}else if(i&&t)return t.delete(n);return!1},get:function(n){return c&&n&&("object"==typeof n||"function"==typeof n)&&e?l(e,n):t&&t.get(n)},has:function(n){return c&&n&&("object"==typeof n||"function"==typeof n)&&e?p(e,n):!!t&&t.has(n)},set:function(n,r){c&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new c),u(e,n,r)):i&&(t||(t=i()),t.set(n,r))}};return n}:i},4664:(e,t,n)=>{var r=n(9770),o=n(3345),a=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,s=i?function(e){return null==e?[]:(e=Object(e),r(i(e),function(t){return a.call(e,t)}))}:o;e.exports=s},4707:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(790),o=n(5573),a=(0,r.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(o.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"})})},4713:(e,t,n)=>{var r=n(2523),o=n(5389),a=n(1489),i=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var c=null==n?0:a(n);return c<0&&(c=i(s+c,0)),r(e,o(t,3),c)}},4739:(e,t,n)=>{var r=n(6025);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},4765:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC3986";e.exports={default:r,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:r}},4803:(e,t,n)=>{"use strict";var r=n(1240),o=n(9675),a=function(e,t,n){for(var r,o=e;null!=(r=o.next);o=r)if(r.key===t)return o.next=r.next,n||(r.next=e.next,e.next=r),r};e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new o("Side channel does not contain "+r(e))},delete:function(t){var n=e&&e.next,r=function(e,t){if(e)return a(e,t,!0)}(e,t);return r&&n&&n===r&&(e=void 0),!!r},get:function(t){return function(e,t){if(e){var n=a(e,t);return n&&n.value}}(e,t)},has:function(t){return function(e,t){return!!e&&!!a(e,t)}(e,t)},set:function(t,n){e||(e={next:void 0}),function(e,t,n){var r=a(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(e,t,n)}};return t}},4818:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(790),o=n(5573),a=(0,r.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(o.Path,{d:"m11.3 17.2-5-5c-.1-.1-.1-.3 0-.4l2.3-2.3-1.1-1-2.3 2.3c-.7.7-.7 1.8 0 2.5l5 5H7.5v1.5h5.3v-5.2h-1.5v2.6zm7.5-6.4-5-5h2.7V4.2h-5.2v5.2h1.5V6.8l5 5c.1.1.1.3 0 .4l-2.3 2.3 1.1 1.1 2.3-2.3c.6-.7.6-1.9-.1-2.5z"})})},4840:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},4894:(e,t,n)=>{var r=n(1882),o=n(294);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},4901:(e,t,n)=>{var r=n(2552),o=n(294),a=n(346),i={};
10i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return a(e)&&o(e.length)&&!!i[r(e)]}},4916:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(5920);window.newspack_reader_data=window.newspack_reader_data||{};const o={storePrefix:newspack_reader_data?.store_prefix||"np_reader_",storage:newspack_reader_data?.is_temporary?window.sessionStorage:window.localStorage,collections:{maxItems:1e3,maxAge:2592e6}};function a(e,t=!1){if(!e)throw new Error("Key is required.");const n=[o.storePrefix];return t&&n.push("_"),n.push(e),n.join("")}function i(e){const t=s("unsynced",!0)||[];t.includes(e)||(t.push(e),c("unsynced",t,!0))}function s(e,t=!1){if(!e)throw new Error("Key is required.");return(n=o.storage.getItem(a(e,t)))&&"string"==typeof n?JSON.parse(n):n;var n}function c(e,t,n=!1){if(!e)throw new Error("Key is required.");if(null==t)throw new Error("Value cannot be undefined or null.");if("_"===e[0])throw new Error("Key cannot start with an underscore.");var i;o.storage.setItem(a(e,n),(i=t,JSON.stringify(i))),n||(0,r.Ic)(r.qY.data,{key:e,value:t})}function l(){if(window.newspackRASInitialized&&window.newspackReaderActivation?.store)return window.newspackReaderActivation.store;const e=[];var t;t=e,setInterval(()=>{if(!t.length||newspack_reader_data?.is_temporary)return;const e=t.shift();(function(e){if(!e)return Promise.reject("Key is required.");if(!newspack_reader_data.api_url||!newspack_reader_data.nonce)return Promise.reject("API not available.");const t=s(e),n={key:e};if(t&&(n.value=JSON.stringify(t)),newspack_reader_data?.items&&newspack_reader_data.items[e]===n.value)return Promise.resolve();const r=new XMLHttpRequest;return r.open(n.value?"POST":"DELETE",newspack_reader_data.api_url,!0),r.setRequestHeader("Content-Type","application/json"),r.setRequestHeader("X-WP-Nonce",newspack_reader_data.nonce),r.send(JSON.stringify(n)),new Promise((t,o)=>{r.onreadystatechange=()=>{if(4===r.readyState)return 200!==r.status?o(r):(newspack_reader_data.items[e]=n.value,t(r))}})})(e).then(()=>function(e){const t=s("unsynced",!0)||[];t.includes(e)&&(t.splice(t.indexOf(e),1),c("unsynced",t,!0))}(e)).catch(()=>i(e))},1e3);const n=s("unsynced",!0)||[];for(const t of n)e.includes(t)||e.push(t);if(newspack_reader_data?.items&&!newspack_reader_data?.is_temporary){const e=Object.keys(newspack_reader_data.items);for(const t of e)n.includes(t)||c(t,JSON.parse(newspack_reader_data.items[t]))}return{get:e=>{if(!e)throw new Error("Key is required.");return s(e)},set:(t,n,r=!0)=>{c(t,n,!1),r&&(i(t),e.push(t))},delete:t=>{if(!t)throw new Error("Key is required.");o.storage.removeItem(a(t)),(0,r.Ic)(r.qY.data,{key:t,value:void 0}),i(t),e.push(t)},add:(e,t)=>{if(!e)throw new Error("Key cannot be empty.");if(!t)throw new Error("Value cannot be empty.");let n=s(e)||[];if(!Array.isArray(n))throw new Error(`Store key '${e}' is not an array.`);if(o.collections.maxAge){const e=Date.now();n=n.filter(t=>!t.timestamp||e-t.timestamp<o.collections.maxAge)}n.push(t),n=n.slice(-o.collections.maxItems),c(e,n)}}}},4932:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},4974:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},5015:(e,t,n)=>{var r=n(2552),o=n(6449),a=n(346);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},5095:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(790),o=n(5573),a=(0,r.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(o.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})})},5160:e=>{e.exports=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}},5186:(e,t,n)=>{"use strict";n.d(t,{V:()=>a,l:()=>i});var r=n(7143),o=n(3076);const a=e=>t=>({type:e,payload:t}),i=(e,t={})=>(0,r.useSelect)(t=>t(o.S).getWizardAPIData(e))||t},5250:(e,t,n)=>{var r=n(7217),o=n(7805),a=n(6649),i=n(2824),s=n(3805),c=n(7241),l=n(4974);e.exports=function e(t,n,u,p,d){t!==n&&a(n,function(a,c){if(d||(d=new r),s(a))i(t,n,c,u,e,p,d);else{var f=p?p(l(t,c),a,c+"",t,n,d):void 0;void 0===f&&(f=a),o(t,c,f)}},c)}},5288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}}
10,5302:(e,t,n)=>{var r=n(7291);e.exports=function e(t,n,o){return r(n)||(o=n||o,n=[]),o=o||{},t instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return p(e,t)}(t,n):r(t)?function(t,n,r){for(var o=[],a=0;a<t.length;a++)o.push(e(t[a],n,r).source);return p(new RegExp("(?:"+o.join("|")+")",d(r)),n)}(t,n,o):function(e,t,n){return f(a(e,n),t,n)}(t,n,o)},e.exports.parse=a,e.exports.compile=function(e,t){return c(a(e,t))},e.exports.tokensToFunction=c,e.exports.tokensToRegExp=f;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function a(e,t){for(var n,r=[],a=0,i=0,s="",c=t&&t.delimiter||"/";null!=(n=o.exec(e));){var p=n[0],d=n[1],f=n.index;if(s+=e.slice(i,f),i=f+p.length,d)s+=d[1];else{var h=e[i],g=n[2],y=n[3],v=n[4],m=n[5],w=n[6],b=n[7];s&&(r.push(s),s="");var x=null!=g&&null!=h&&h!==g,_="+"===w||"*"===w,k="?"===w||"*"===w,j=n[2]||c,S=v||m;r.push({name:y||a++,prefix:g||"",delimiter:j,optional:k,repeat:_,partial:x,asterisk:!!b,pattern:S?u(S):b?".*":"[^"+l(j)+"]+?"})}}return i<e.length&&(s+=e.substr(i)),s&&r.push(s),r}function i(e){return encodeURI(e).replace(/[\/?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function s(e){return encodeURI(e).replace(/[?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function c(e){for(var t=new Array(e.length),n=0;n<e.length;n++)"object"==typeof e[n]&&(t[n]=new RegExp("^(?:"+e[n].pattern+")$"));return function(n,o){for(var a="",c=n||{},l=(o||{}).pretty?i:encodeURIComponent,u=0;u<e.length;u++){var p=e[u];if("string"!=typeof p){var d,f=c[p.name];if(null==f){if(p.optional){p.partial&&(a+=p.prefix);continue}throw new TypeError('Expected "'+p.name+'" to be defined')}if(r(f)){if(!p.repeat)throw new TypeError('Expected "'+p.name+'" to not repeat, but received `'+JSON.stringify(f)+"`");if(0===f.length){if(p.optional)continue;throw new TypeError('Expected "'+p.name+'" to not be empty')}for(var h=0;h<f.length;h++){if(d=l(f[h]),!t[u].test(d))throw new TypeError('Expected all "'+p.name+'" to match "'+p.pattern+'", but received `'+JSON.stringify(d)+"`");a+=(0===h?p.prefix:p.delimiter)+d}}else{if(d=p.asterisk?s(f):l(f),!t[u].test(d))throw new TypeError('Expected "'+p.name+'" to match "'+p.pattern+'", but received "'+d+'"');a+=p.prefix+d}}else a+=p}return a}}function l(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function u(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function p(e,t){return e.keys=t,e}function d(e){return e.sensitive?"":"i"}function f(e,t,n){r(t)||(n=t||n,t=[]);for(var o=(n=n||{}).strict,a=!1!==n.end,i="",s=0;s<e.length;s++){var c=e[s];if("string"==typeof c)i+=l(c);else{var u=l(c.prefix),f="(?:"+c.pattern+")";t.push(c),c.repeat&&(f+="(?:"+u+f+")*"),i+=f=c.optional?c.partial?u+"("+f+")?":"(?:"+u+"("+f+"))?":u+"("+f+")"}}var h=l(n.delimiter||"/"),g=i.slice(-h.length)===h;return o||(i=(g?i.slice(0,-h.length):i)+"(?:"+h+"(?=$))?"),i+=a?"$":o&&g?"":"(?="+h+"|$)",p(new RegExp("^"+i,d(n)),t)}},5325:(e,t,n)=>{"use strict";n.d(t,{_:()=>a,m:()=>i});var r=n(5920),o=n(8621);function a(e=!1){o.M_.set("pending_checkout",e,!1),(0,r.Ic)(r.qY.reader,(0,o.OO)())}function i(){return o.M_.get("pending_checkout")||!1}},5345:e=>{"use strict";e.exports=URIError},5373:(e,t,n)=>{"use strict";var r=n(8636),o=n(2642),a=n(4765);e.exports={formats:a,parse:o,stringify:r}},5389:(e,t,n)=>{var r=n(3663),o=n(7978),a=n(3488),i=n(6449),s=n(583);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?i(e)?o(e[0],e[1]):r(e):s(e)}},5402:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(5573),o=n(790);const a=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M18.5 12C18.5 10.2761 17.8152 8.62279 16.5962 7.40381C15.3772 6.18482 13.7239 5.5 12 5.5C10.2761 5.5 8.62279 6.18482 7.40381 7.40381C6.18482 8.62279 5.5 10.2761 5.5 12C5.5 13.7239 6.18482 15.3772 7.40381 16.5962C8.62279 17.8152 10.2761 18.5 12 18.5C13.7239 18.5 15.3772 17.8152 16.5962 16.5962C17.8152 15.3772 18.5 13.7239 18.5 12ZM20 12C20 14.1217 19.1571 16.1566 17.6569
1017.6569C16.1566 19.1571 14.1217 20 12 20C9.87827 20 7.84344 19.1571 6.34315 17.6569C4.84285 16.1566 4 14.1217 4 12C4 9.87827 4.84285 7.84344 6.34315 6.34315C7.84344 4.84285 9.87827 4 12 4C14.1217 4 16.1566 4.84285 17.6569 6.34315C19.1571 7.84344 20 9.87827 20 12ZM15.5 12C15.5 11.5404 15.4095 11.0852 15.2336 10.6606C15.0577 10.236 14.7999 9.85013 14.4749 9.52513C14.1499 9.20012 13.764 8.94231 13.3394 8.76642C12.9148 8.59053 12.4596 8.5 12 8.5C11.5404 8.5 11.0852 8.59053 10.6606 8.76642C10.236 8.94231 9.85013 9.20012 9.52513 9.52513C9.20012 9.85013 8.94231 10.236 8.76642 10.6606C8.59053 11.0852 8.5 11.5404 8.5 12C8.5 12.9283 8.86875 13.8185 9.52513 14.4749C10.1815 15.1313 11.0717 15.5 12 15.5C12.9283 15.5 13.8185 15.1313 14.4749 14.4749C15.1313 13.8185 15.5 12.9283 15.5 12ZM17 12C17 13.3261 16.4732 14.5979 15.5355 15.5355C14.5979 16.4732 13.3261 17 12 17C10.6739 17 9.40215 16.4732 8.46447 15.5355C7.52678 14.5979 7 13.3261 7 12C7 10.6739 7.52678 9.40215 8.46447 8.46447C9.40215 7.52678 10.6739 7 12 7C13.3261 7 14.5979 7.52678 15.5355 8.46447C16.4732 9.40215 17 10.6739 17 12ZM12.5 12C12.5 11.8674 12.4473 11.7402 12.3536 11.6464C12.2598 11.5527 12.1326 11.5 12 11.5C11.8674 11.5 11.7402 11.5527 11.6464 11.6464C11.5527 11.7402 11.5 11.8674 11.5 12C11.5 12.1326 11.5527 12.2598 11.6464 12.3536C11.7402 12.4473 11.8674 12.5 12 12.5C12.1326 12.5 12.2598 12.4473 12.3536 12.3536C12.4473 12.2598 12.5 12.1326 12.5 12ZM14 12C14 12.5304 13.7893 13.0391 13.4142 13.4142C13.0391 13.7893 12.5304 14 12 14C11.4696 14 10.9609 13.7893 10.5858 13.4142C10.2107 13.0391 10 12.5304 10 12C10 11.4696 10.2107 10.9609 10.5858 10.5858C10.9609 10.2107 11.4696 10 12 10C12.5304 10 13.0391 10.2107 13.4142 10.5858C13.7893 10.9609 14 11.4696 14 12Z"})}),i=/^(1|406)$/.test(n.j)?a:null},5481:(e,t,n)=>{var r=n(9325)["__core-js_shared__"];e.exports=r},5527:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},5529:(e,t,n)=>{var r=n(9344),o=n(8879),a=n(5527);e.exports=function(e){return"function"!=typeof e.constructor||a(e)?{}:r(o(e))}},5547:(e,t,n)=>{"use strict";if(n.d(t,{A:()=>a}),/^(193|619)$/.test(n.j))var r=n(1622);if(/^(193|619)$/.test(n.j))var o=n(2952);function a(){(0,r.Qc)(()=>{const e=new URLSearchParams(window.location.search),t=e.get("upgrade-subscription")||e.get("switch");if(e.get("upgrade-subscription")||e.get("tiers-modal")||e.get("switch")){const t=new URLSearchParams(e);t.delete("upgrade-subscription"),t.delete("tiers-modal"),t.delete("switch");const n=t.toString()?"?"+t.toString():"";window.history.replaceState({},"",window.location.pathname+n)}window.newspackRAS.push(n=>{const r=n.getReader();t&&!r?.authenticated&&n.openAuthModal({labels:{signin:{title:window.newspack_reader_activation_labels.sign_in_to_upgrade},register:{title:window.newspack_reader_activation_labels.register_to_upgrade}},skipSuccess:!0,skipNewslettersSignup:!0,closeOnSuccess:!1,onSuccess:()=>{window.location.href=window.location.pathname+"?"+e.toString()}})});const n=document.querySelectorAll(".newspack__subscription-tiers__form");n.length&&[...n].forEach(e=>{const n=e.closest(".newspack-ui__modal-container"),r=e.querySelector('button[type="submit"]'),a=e.querySelector(".newspack-ui__modal__cancel"),i=e.classList.contains("nyp"),s=r.textContent;let c=!1;const l=()=>{e.querySelectorAll('input[type="radio"], input[type="number"], select').forEach(e=>{e.addEventListener("input",u),e.addEventListener("change",u)}),u()},u=()=>{if(i){const t=e.querySelector("#nyp_amount");if(t?.value){const e=parseFloat(t.value).toLocaleString(document.documentElement.lang,{style:"currency",currency:t.dataset.currency,currencyDisplay:"narrowSymbol"});r.textContent=s+": "+e+" / "+t.dataset.frequency}else r.textContent=s}if(i){const t=e.querySelector("#nyp_amount.current");!t||t.value&&t.value!==t.dataset.originalValue?(e.querySelector('button[type="submit"]').disabled=!1,c=!0):(e.querySelector('button[type="submit"]').disabled=!0,c=!1)}else e.querySelector('.current input[type="radio"]:checked')?(e.querySelector('button[type="submit"]').disabled=!0,c=!1):(e.querySelector('button[type="submit"]').disabled=!1,c=!0)},p=e.querySelector(".newspack-ui__segmented-control");p&&p.addEventListener("content-selected",l),l(),u(),n?a.addEventListener("click",()=>{n?.setAttribute("data-state","closed")}):a.style.display="none",e.addEventListener("submit",t=>{if(!c)return void t.preventDefault();if(n?.classList.contains("newspack-blocks__modal-variation"))return;
10if(!window.newspackOpenModalCheckout)return;t.preventDefault();let r=!1;const a=new FormData(e);n?.setAttribute("data-state","closed");const i=new URL(e.action);for(const e of a.entries())i.searchParams.append(e[0],e[1]);window.newspackOpenModalCheckout({url:i.toString(),title:e.dataset.title,onCheckoutComplete:()=>{r=!0},onClose:()=>function(e){e&&(0,o.q9)()}(r)})});const d=e.querySelector(".signin-link");d&&d.addEventListener("click",r=>{r.preventDefault(),n&&n.setAttribute("data-state","closed"),window.newspackRAS.push(r=>{r.openAuthModal({skipSuccess:!0,skipNewslettersSignup:!0,onSuccess:()=>{const n=new URLSearchParams(window.location.search);n.set("tiers-modal",e.dataset.productId||""),t&&n.set("switch","1"),window.location.href=window.location.pathname+"?"+n.toString()},onDismiss:()=>{n&&n.setAttribute("data-state","open")}})})})})})}window.newspackRAS=window.newspackRAS||[]},5556:(e,t,n)=>{e.exports=n(2694)()},5580:(e,t,n)=>{var r=n(6110)(n(9325),"DataView");e.exports=r},5749:(e,t,n)=>{var r=n(1042);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},5795:(e,t,n)=>{"use strict";var r=n(6549);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},5861:(e,t,n)=>{var r=n(5580),o=n(8223),a=n(2804),i=n(6545),s=n(8303),c=n(2552),l=n(7473),u="[object Map]",p="[object Promise]",d="[object Set]",f="[object WeakMap]",h="[object DataView]",g=l(r),y=l(o),v=l(a),m=l(i),w=l(s),b=c;(r&&b(new r(new ArrayBuffer(1)))!=h||o&&b(new o)!=u||a&&b(a.resolve())!=p||i&&b(new i)!=d||s&&b(new s)!=f)&&(b=function(e){var t=c(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case g:return h;case y:return u;case v:return p;case m:return d;case w:return f}return t}),e.exports=b},5880:(e,t,n)=>{var r=n(514),o=n(5950);e.exports=function(e){return null==e?[]:r(e,o(e))}},5911:(e,t,n)=>{var r=n(8859),o=n(4248),a=n(9219);e.exports=function(e,t,n,i,s,c){var l=1&n,u=e.length,p=t.length;if(u!=p&&!(l&&p>u))return!1;var d=c.get(e),f=c.get(t);if(d&&f)return d==t&&f==e;var h=-1,g=!0,y=2&n?new r:void 0;for(c.set(e,t),c.set(t,e);++h<u;){var v=e[h],m=t[h];if(i)var w=l?i(m,v,h,t,e,c):i(v,m,h,e,t,c);if(void 0!==w){if(w)continue;g=!1;break}if(y){if(!o(t,function(e,t){if(!a(y,t)&&(v===e||s(v,e,n,i,c)))return y.push(t)})){g=!1;break}}else if(v!==m&&!s(v,m,n,i,c)){g=!1;break}}return c.delete(e),c.delete(t),g}},5950:(e,t,n)=>{var r=n(695),o=n(8984),a=n(4894);e.exports=function(e){return a(e)?r(e):o(e)}},5974:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(5573),o=n(790);const a=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M5.5 17.0009V18.5009H7.5V17.0009H5.5ZM5.5 20.0009C4.67188 20.0009 4 19.329 4 18.5009V17.0009V16.2509V15.5009V8.50092V7.75092V7.00092V5.50092C4 4.6728 4.67188 4.00092 5.5 4.00092C7.33333 4.00092 9.16667 4.00092 11 4.00092C11.6438 4.00092 12.1906 4.40405 12.4062 4.9728C12.5813 4.78217 12.8094 4.63842 13.075 4.56655L14.9344 4.05092C15.7063 3.83842 16.5 4.3103 16.7063 5.10717L17.2688 7.26967L17.4563 7.99467L19.3875 15.4415L19.575 16.1665L19.9469 17.604C20.1531 18.4009 19.6969 19.2197 18.925 19.4322L17.0625 19.9478C16.2906 20.1603 15.4969 19.6884 15.2906 18.8915L14.7281 16.729L14.5406 16.004L12.6125 8.5603L12.5 8.13217V8.50092V15.5009V16.2509V17.0009V18.5009C12.5 19.329 11.8281 20.0009 11 20.0009C9.08318 20.0009 7.41682 20.0009 5.5 20.0009ZM9 18.5009H11V17.0009H9V18.5009ZM7.5 5.50092H5.5V7.00092H7.5V5.50092ZM7.5 8.50092H5.5V15.5009H7.5V8.50092ZM9 7.00092H11V5.50092H9V7.00092ZM11 15.5009V8.50092H9V15.5009H11ZM17.7531 15.1165L16.0094 8.3978L14.2437 8.8853L15.9875 15.604L17.7531 15.1165ZM16.3656 17.0572L16.7375 18.4853L18.5 17.9978C18.5 17.9947 18.5 17.9915 18.5 17.9884V17.9853L18.1344 16.5728L16.3687 17.0603L16.3656 17.0572ZM13.8687 7.43217L15.6344 6.94467L15.2625 5.51655L13.5 6.00405C13.5 6.00717 13.5 6.0103 13.5 6.01655L13.8656 7.42905L13.8687 7.43217Z"})}),i=/^(406|617)$/.test(n.j)?a:null},6009:(e,t,n)=>{e=n.nmd(e);var r=n(4840),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,s=function(){try{return a&&a.require&&a.require("util").t
10ypes||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=s},6025:(e,t,n)=>{var r=n(5288);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},6028:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(4164),o=n(4715),a=n(7723),i=n(6427),s=n(3832),c=n(3582),l=n(7143),u=n(6087),p=n(1455),d=n.n(p);var f=n(790);const h=({setAttributes:e,attributes:t})=>(0,f.jsx)(o.InspectorControls,{children:(0,f.jsxs)(i.PanelBody,{title:(0,a.__)("Settings","newspack-plugin"),children:[(0,f.jsx)(i.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,a.__)("Image size","newspack-plugin"),onChange:t=>e({size:t}),min:16,max:128,initialPosition:t.size,value:t.size}),(0,f.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Link to author archive","newspack-plugin"),onChange:()=>e({linkToAuthorArchive:!t.linkToAuthorArchive}),checked:t.linkToAuthorArchive})]})}),g=({avatar:e,size:t,attributes:n})=>{const{className:a}=(0,o.useBlockProps)(),i=a?a.split(" ").filter(e=>e.includes("wp-duotone")):"",c=(0,r.A)("newspack-avatar-wrapper",i),l=(0,o.__experimentalUseBorderProps)(n),u=(0,s.addQueryArgs)((0,s.removeQueryArgs)(e?.src,["s"]),{s:2*n?.size}),p=(0,f.jsx)("img",{src:u,alt:e.alt,className:(0,r.A)("avatar","avatar-"+t,"photo","wp-block-newspack-avatar__image",l.className),style:{width:t,height:t,...l.style}});return(0,f.jsx)("div",{className:c,style:{"--avatar-size":t+"px"},children:n.linkToAuthorArchive?(0,f.jsx)("a",{href:"#avatar-pseudo-link",className:"wp-block-newspack-avatar__link",onClick:e=>e.preventDefault(),children:p}):p})},y=({attributes:e,context:t,setAttributes:n})=>{const{postId:r,postType:i}=t,s=function({postId:e,postType:t}){const{authorDetails:n}=(0,l.useSelect)(n=>{const{getEditedEntityRecord:r,getUser:o}=n(c.store),a=r("postType",t,e)?.author;return{authorDetails:a?o(a):null}},[t,e]),r=n?.avatar_urls?Object.values(n.avatar_urls):null,i=n?.avatar_urls?Object.keys(n.avatar_urls):null,{minSize:s,maxSize:u}=function(e){const t=e?e[0]:24,n=e?e[e.length-1]:128;return{minSize:t,maxSize:Math.floor(2.5*n)}}(i),p=function(){const{avatarURL:e}=(0,l.useSelect)(e=>{const{getSettings:t}=e(o.store),{__experimentalDiscussionSettings:n}=t();return n});return e}();return{src:r?r[r.length-1]:p,minSize:s,maxSize:u,alt:n? 11// translators: %s: Author name. 12// translators: %s: Author name. 13(0,a.sprintf)((0,a.__)("%s Avatar","newspack-plugin"),n?.name):(0,a.__)("Default Avatar","newspack-plugin")}}({userId:e?.userId,postId:r,postType:i}),p=function({postId:e}){const[t,n]=(0,u.useState)([]);return(0,u.useEffect)(()=>{const t=new AbortController,r=t.signal;return d()({path:`/coauthors/v1/coauthors?post_id=${e}`,signal:r}).then(e=>{Array.isArray(e)&&n(e)}),()=>{t.abort()}},[e]),t}({postId:r,postType:i}),y=(0,o.useBlockProps)(),v=p?.length?p:null;if(!s?.src&&!v?.length)return(0,f.jsx)("div",{...y,children:(0,a.__)("Loading avatarâ¦","newspack-plugin")});
13const m=(t,n)=>(0,f.jsx)(g,{avatar:t,size:e.size,attributes:e},n);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(h,{attributes:e,setAttributes:n}),v?.length?v.map((e,t)=>m({src:e?.avatar_urls?.[96],alt:e?.name,minSize:16,maxSize:128},e.id||t)):m(s,"single-author")]})}},6110:(e,t,n)=>{var r=n(7464),o=n(392);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},6122:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(5573),o=n(790);const a=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M4 14.5H20V16H4V14.5ZM4 20H13V18.5H4V20ZM12 5.9L10.1 4L4.7 9.4L4.1 12L6.7 11.4L12.1 6L12 5.9Z"})}),i=/^(406|617|741|795)$/.test(n.j)?a:null},6123:(e,t,n)=>{"use strict";var r=n(1622),o=n(2952);window.newspackRAS=window.newspackRAS||[];let a=null;function i(){if(a){const e=a;a=null,(0,o.ZZ)(()=>{window.location.href=e})}else(0,o.q9)()}function s(e,t,n,r,o){const s=document.createElement("div");s.classList.add("newspack-ui"),s.innerHTML='<div class="newspack-ui__spinner"><span></span></div>';e.addEventListener("click",c=>{document.body.appendChild(s);const l=e.getAttribute("href");if(l)try{(async e=>{const s=await fetch(e);window.newspackOpenModalCheckout({url:s.url,title:t,actionType:n,onCheckoutComplete:e=>{!function(e){const{subscription_renewal:t,subscription_ids:n,order_id:r}=e;n?.length?a=`${newspackMyAccountV1.myAccountUrl}/view-subscription/${n[0]}`:t?a=`${newspackMyAccountV1.myAccountUrl}/view-subscription/${t}`:r&&(a=`${newspackMyAccountV1.myAccountUrl}/view-order/${r}`)}(e),r&&r(e)},onClose:o||i})})(l),c.preventDefault()}catch(e){document.body.removeChild(s),console.error(e)}})}window.newspackRAS=window.newspackRAS||[],(0,r.Qc)(()=>{document.querySelectorAll(".resubscribe").forEach(e=>{s(e,newspackMyAccountV1.labels.resubscribe_title,"resubscribe",e=>{window.newspackRAS.push(["subscription_reactivated",{subscription_id:e.subscription_ids?.[0]}])})}),document.querySelectorAll(".subscription_renewal_early").forEach(e=>{s(e,newspackMyAccountV1.labels.renewal_early_title,"renewal_early",e=>{window.newspackRAS.push(["renewal_early",{subscription_id:e.subscription_renewal}])})}),document.querySelectorAll(".change_payment_method").forEach(e=>{s(e,newspackMyAccountV1.labels.change_payment_method_title,"change_payment_method",e=>{window.newspackRAS.push(["change_payment_method",{subscription_id:e.subscription_ids?.[0]}])})}),document.querySelectorAll("p.order-again a").forEach(e=>{s(e,null,"order_again",e=>{window.newspackRAS.push(["product_reordered",{order_id:e.order_id,product_id:e.product_id}])})}),document.querySelectorAll(".pay").forEach(e=>{const t=e.dataset?.subscriptionId,n=e.dataset?.action||"pay_order";s(e,e.dataset?.title||null,n,e=>{window.newspackRAS.push([n,{subscription_id:t||e.subscription_renewal?e.subscription_renewal:e.subscription_ids?.[0]}])})})})},6139:(e,t,n)=>{var r=n(6547),o=n(1791),a=n(999),i=n(4894),s=n(5527),c=n(5950),l=Object.prototype.hasOwnProperty,u=a(function(e,t){if(s(t)||i(t))o(t,c(t),e);else for(var n in t)l.call(t,n)&&r(e,n,t[n])});e.exports=u},6188:e=>{"use strict";e.exports=Math.max},6449:e=>{var t=Array.isArray;e.exports=t},6500:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(5920),o=n(2952);const a=[],i={get:function(){return a||[]},add:function(e=""){return e||(e=(0,o.ni)()),a.push(e),(0,r.Ic)(r.qY.overlay,{overlays:a,added:e}),e},remove:function(e){if(!e)return a;const t=a.indexOf(e);return t>-1&&a.splice(t,1),(0,r.Ic)(r.qY.overlay,{overlays:a,removed:e}),a}}},6545:(e,t,n)=>{var r=n(6110)(n(9325),"Set");e.exports=r},6547:(e,t,n)=>{var r=n(3360),o=n(5288),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var i=e[t];a.call(e,t)&&o(i,n)&&(void 0!==n||t in e)||r(e,t,n)}},6549:e=>{"use strict";e.exports=Object.getOwnPropertyDescriptor},6556:(e,t,n)=>{"use strict";var r=n(453),o=n(3126),a=o([r("%String.prototype.indexOf%")]);e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&a(e,".prototype.")>-1?o([n]):n}},6574:(e,t,n)=>{var r=n(909);e.exports=function(e,t){var n=[];return r(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}}
13,6649:(e,t,n)=>{var r=n(3221)();e.exports=r},6655:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(790),o=n(5573),a=(0,r.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(o.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})})},6721:(e,t,n)=>{var r=n(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},6732:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(6427),o=n(6087),a=n(2247),i=n(790);const{useHistory:s}=a.A,c=/^(8(28|4|41)|[46]06|382|498|617|930)$/.test(n.j)?({href:e,onClick:t,...n})=>{const a=s(),[c,l]=(0,o.useState)(!1);return e&&t?n.onClick=async()=>{l(!0),await t(),l(!1),a.push((e||"").replace("#",""))}:(n.href=e,n.onClick=t),c&&(n.disabled=!0),(0,i.jsx)(r.Button,{...n})}:null},6743:(e,t,n)=>{"use strict";var r=n(9353);e.exports=Function.prototype.bind||r},6757:(e,t,n)=>{var r=n(1033),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var a=arguments,i=-1,s=o(a.length-t,0),c=Array(s);++i<s;)c[i]=a[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=a[i];return l[t]=n(c),r(e,this,l)}}},6800:(e,t,n)=>{var r=n(5288),o=n(4894),a=n(361),i=n(3805);e.exports=function(e,t,n){if(!i(n))return!1;var s=typeof t;return!!("number"==s?o(n)&&a(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},6837:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(1311),o=n(790);const a=/^(382|828|930)$/.test(n.j)?({description:e,error:t,isChecked:n,notificationLevel:a="error",children:i,...s})=>{let c;return void 0!==n&&(c=n?"checked":"unchecked"),(0,o.jsx)(r.Lz,{description:e,checkbox:c,notification:t,notificationLevel:a,...s,children:i})}:null},6924:(e,t,n)=>{var r=n(5250),o=n(999)(function(e,t,n,o){r(e,t,n,o)});e.exports=o},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,a(n)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=i(t,n));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},7022:(e,t,n)=>{"use strict";function r(e){return"#"===e.charAt(0)&&(e=e.slice(1)),3===e.length&&(e=e.split("").map(function(e){return e+e}).join("")),(299*parseInt(e.substring(0,2),16)+587*parseInt(e.substring(2,4),16)+114*parseInt(e.substring(4),16))/1e3>=128?"black":"white"}n.d(t,{b:()=>r})},7068:(e,t,n)=>{var r=n(7217),o=n(5911),a=n(1986),i=n(689),s=n(5861),c=n(6449),l=n(3656),u=n(7167),p="[object Arguments]",d="[object Array]",f="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,y,v){var m=c(e),w=c(t),b=m?d:s(e),x=w?d:s(t),_=(b=b==p?f:b)==f,k=(x=x==p?f:x)==f,j=b==x;if(j&&l(e)){if(!l(t))return!1;m=!0,_=!1}if(j&&!_)return v||(v=new r),m||u(e)?o(e,t,n,g,y,v):a(e,t,b,n,g,y,v);if(!(1&n)){var S=_&&h.call(e,"__wrapped__"),A=k&&h.call(t,"__wrapped__");
13if(S||A){var C=S?e.value():e,P=A?t.value():t;return v||(v=new r),y(C,P,n,g,v)}}return!!j&&(v||(v=new r),i(e,t,n,g,y,v))}},7093:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(6427),o=n(6087),a=n(7723);if(/^(8(28|4|41)|[46]06|382|498|617|930)$/.test(n.j))var i=n(7677);if(/^(8(28|4|41)|[46]06|382|498|617|930)$/.test(n.j))var s=n(8351);if(/^(8(28|4|41)|[46]06|382|498|617|930)$/.test(n.j))var c=n(2485);if(/^(8(28|4|41)|[46]06|382|498|617|930)$/.test(n.j))var l=n(3756);if(/^(8(28|4|41)|[46]06|382|498|617|930)$/.test(n.j))var u=n(3784);var p=n(1311),d=n(6942),f=n.n(d),h=n(790);const g=/^(8(28|4|41)|[46]06|382|498|617|930)$/.test(n.j)?({badge:e,badgeLevel:t="info",className:n,checkbox:d,children:g,collapse:y,disabled:v,title:m,description:w,handoff:b,editLink:x,href:_,notification:k,notificationLevel:j,notificationHTML:S,actionContent:A,actionText:C,secondaryActionText:P,secondaryDestructive:O,id:E,image:N,imageLink:L,indent:I,isSmall:M,isMedium:T,simple:R,onClick:D,onSecondaryActionClick:F,isWaiting:$,titleLink:V,toggleChecked:z=!1,toggleOnChange:H,togglePosition:B="leading",hasGreyHeader:U,hasWhiteHeader:q,noBorder:W,isPending:G,expandable:Z=!1,isButtonEnabled:K=!1,draggable:Q=!1,dragIndex:J,dragWrapperRef:Y,onDragCallback:X})=>{const[ee,te]=(0,o.useState)(!1),[ne,re]=(0,o.useState)(!1),[oe,ae]=(0,o.useState)(null),[ie,se]=(0,o.useState)(null);(0,o.useEffect)(()=>{Y&&!ie&&se(Y)},[Y?.current]),(0,o.useEffect)(()=>{y&&ee&&te(!1)},[y]);const ce=k||g,le=f()("newspack-action-card",R&&"newspack-card--is-clickable",U&&"newspack-card--has-grey-header",q&&"newspack-card--has-white-header",ce&&"newspack-card--has-children",I&&"newspack-card--indent",M&&"is-small",T&&"is-medium",d&&"has-checkbox",Z&&"is-expandable",Q&&"is-draggable",A&&"has-action-content",n),ue=!H||V||v?{}:{onClick:()=>H(!z),tabIndex:"0"},pe="trailing"===B?"is-toggle-trailing":"is-toggle-leading",de=_&&0!==_.indexOf("http"),fe=P&&F,he=!Array.isArray(e)&&e?[e]:e,ge=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("div",{className:"newspack-action-card__region newspack-action-card__region-top",children:[H&&(0,h.jsx)(r.ToggleControl,{checked:z,onChange:H,disabled:v,className:pe}),N&&!H&&(0,h.jsx)("div",{className:"newspack-action-card__region newspack-action-card__region-left",children:(0,h.jsx)("a",{href:L,children:(0,h.jsx)("div",{className:"newspack-action-card__image",style:(ye=N,ye?{backgroundImage:`url(${ye})`}:{})})})}),d&&!H&&(0,h.jsx)("div",{className:"newspack-action-card__region newspack-action-card__region-left",children:(0,h.jsx)("span",{className:f()("newspack-checkbox-icon","is-primary","checked"===d&&"newspack-checkbox-icon--checked",G&&"newspack-checkbox-icon--pending"),children:"checked"===d&&(0,h.jsx)(i.A,{icon:s.A})})}),(0,h.jsx)("div",{className:"newspack-action-card__region newspack-action-card__region-center",children:(0,h.jsxs)(p.xA,{columns:1,gutter:8,noMargin:!0,children:[(0,h.jsxs)("h2",{children:[(0,h.jsxs)("span",{className:"newspack-action-card__title",...ue,children:[V&&(0,h.jsx)("a",{href:V,children:m}),!V&&Z&&(0,h.jsx)(p.$n,{isLink:!0,onClick:()=>te(!ee),children:m}),!V&&!Z&&m]}),he?.length&&he.map((e,n)=>(0,h.jsx)("span",{className:`newspack-action-card__badge newspack-action-card__badge-level-${t}`,children:e},`badge-${n}`))]}),w&&(0,h.jsxs)("p",{children:["string"==typeof w&&w,"function"==typeof w&&w()]})]})}),!Z&&(C||fe||A)&&(0,h.jsxs)("div",{className:"newspack-action-card__region newspack-action-card__region-right",children:[A&&A,C&&(b?(0,h.jsx)(p.Pj,{plugin:b,editLink:x,compact:!0,isLink:!0,children:C}):D||de?(0,h.jsx)(p.$n,{disabled:v&&!K,isLink:!0,href:_,onClick:D,className:"newspack-action-card__primary_button",children:C}):_?(0,h.jsx)(r.ExternalLink,{href:_,className:"newspack-action-card__primary_button",children:C}):(0,h.jsxs)("div",{className:"newspack-action-card__container",children:[C,$&&(0,h.jsx)(p.E$,{isRight:!0})]})),fe&&(0,h.jsx)(p.$n,{isLink:!0,onClick:F,className:"newspack-action-card__secondary_button",isDestructive:O,children:P})]}),Z&&(0,h.jsx)(p.$n,{onClick:()=>te(!ee),children:(0,h.jsx)(i.A,{icon:ee?l.A:c.A,height:24,width:24})})]}
13),k&&(0,h.jsxs)("div",{className:"newspack-action-card__notification newspack-action-card__region-children",children:["error"===j&&(0,h.jsx)(p.$T,{noticeText:k,isError:!0,rawHTML:S}),"info"===j&&(0,h.jsx)(p.$T,{noticeText:k,rawHTML:S}),"success"===j&&(0,h.jsx)(p.$T,{noticeText:k,isSuccess:!0,rawHTML:S}),"warning"===j&&(0,h.jsx)(p.$T,{noticeText:k,isWarning:!0,rawHTML:S})]}),g&&(Z&&ee||!Z)&&(0,h.jsx)("div",{className:"newspack-action-card__region-children",children:g})]});var ye;if(Q&&ie?.current&&"number"==typeof J&&X&&E){let e=ie.current.getBoundingClientRect(),t=Array.prototype.slice.call(ie.current.querySelectorAll(".newspack-action-card__draggable-wrapper"));const n=0===J,o=J===t.length-1,s=()=>{t=Array.prototype.slice.call(ie.current.querySelectorAll(".newspack-action-card__draggable-wrapper")),e=ie.current.getBoundingClientRect(),ne||(ae(J),re(!0))},d=()=>{null!==oe&&oe!==J&&X(oe),ae(null),re(!1)},f=n=>{const r=n.pageY<=e.top+window.scrollY,o=n.pageY>=e.bottom+window.scrollY,a=n.target.closest(".newspack-action-card__draggable-wrapper");(r||o||a)&&(ae(t.indexOf(a)),(0>oe||oe===J+1)&&ae(J),r&&ae(0),o&&ae(t.length))};return(0,h.jsx)("div",{className:"newspack-action-card__draggable-wrapper"+(ne?" is-dragging":""),id:`draggable-card-${E}`,children:(0,h.jsx)(r.Draggable,{elementId:`draggable-card-${E}`,transferData:{},onDragStart:s,onDragEnd:d,onDragOver:f,children:({onDraggableStart:e,onDraggableEnd:t})=>(0,h.jsxs)(p.Zp,{className:le,onClick:R&&D,id:null!=E?E:null,noBorder:W,children:[(0,h.jsxs)("div",{className:"newspack-action-card__draggable-controls",children:[(0,h.jsx)("div",{className:"drag-handle",draggable:!0,onDragStart:e,onDragEnd:t,children:(0,h.jsx)(i.A,{icon:u.A,height:18,width:18})}),(0,h.jsxs)("div",{className:"movers",children:[(0,h.jsx)(p.$n,{icon:l.A,onClick:()=>X(J-1),disabled:n,label:(0,a.__)("Move one position up","newspack-plugin")}),(0,h.jsx)(p.$n,{icon:c.A,onClick:()=>X(J+1),disabled:o,label:(0,a.__)("Move one position down","newspack-plugin")})]})]}),ge]})})})}return(0,h.jsx)(p.Zp,{className:le,onClick:R&&D,id:null!=E?E:null,noBorder:W,children:ge})}:null},7119:e=>{"use strict";e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},7153:(e,t,n)=>{"use strict";n.d(t,{M1:()=>i,Ss:()=>a.A,u:()=>o.A});var r=n(7723),o=n(4058),a=n(1075);const i={MAILCHIMP_API_KEY_INVALID:(0,r.__)("Invalid Mailchimp API Key.","newspack-plugin"),GOOGLEOAUTH_REFRESH_TOKEN_EXPIRED:(0,r.__)("Missing Google refresh token. Please re-authenticate site.","newspack-plugin"),GOOGLE:{OAUTH_POPUP_BLOCKED:(0,r.__)("Popup blocked by browser. Disable any popup blocking settings and try again.","newspack-plugin"),URL_INVALID:(0,r.__)("URL is invalid. Please try again or contact support if the issue persists.","newspack-plugin")}}},7167:(e,t,n)=>{var r=n(4901),o=n(7301),a=n(6009),i=a&&a.isTypedArray,s=i?o(i):r;e.exports=s},7176:(e,t,n)=>{"use strict";var r,o=n(3126),a=n(5795);try{r=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var i=!!r&&a&&a(Object.prototype,"__proto__"),s=Object,c=s.getPrototypeOf;e.exports=i&&"function"==typeof i.get?o([i.get]):"function"==typeof c&&function(e){return c(null==e?e:s(e))}},7197:e=>{e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},7209:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(4715),o=n(6427),a=n(7723);if(/^(104|617)$/.test(n.j))var i=n(2578);var s=n(790);function c(){const{loggedin_metered_views:e,anonymous_metered_views:t,metering_period:n}=newspack_blocks.content_gate_data||{},c=(0,r.useBlockProps)({className:"newspack-content-gate-countdown-box__wrapper"}),{children:l,...u}=(0,r.useInnerBlocksProps)({className:"newspack-content-gate-countdown-box__content"},{template:[["core/group",{layout:{type:"flex",orientation:"horizontal",flexWrap:"nowrap",justifyContent:"space-between"}},[["core/group",{layout:{type:"flex",orientation:"vertical",flexWrap:"nowrap"},style:{spacing:{blockGap:"var:preset|spacing|20"}}},[["core/group",{layout:{type:"flex",orientation:"horizontal",flexWrap:"nowrap"},style:{spacing:{blockGap:"0.25em"}}},[["newspack/content-gate-countdown",{fontSize:"small",lock:{move:!1,remove:!0},style:{typography:{fontStyle:"normal",fontWeight:"700"}}}],["core/paragraph",{content:(0,a.sprintf)(/* translators: %s is the metered period, e.g. "month" or "week". */ /* translators: %s is the metered period, e.g. "month" or "week". */ 14(0,a.__)("free articles this %s","newspack-plugin"),n),fontSize:"small",style:{typography:{fontStyle:"normal",fontWeight:"700",textTransform:"uppercase"}}}]]],["core/paragraph",{content:(0,a.sprintf)(/* translators: %1$s is subscribe message, %2$s is sign in link */ /* translators: %1$s is subscribe message, %2$s is sign in link */ 15(0,a.__)("%1$s %2$s","newspack-plugin"),(0,a.__)("Subscribe now and get unlimited access.","newspack-plugin"),'<a href="#signin_modal">'+(0,a.__)("Sign in to an existing account.","newspack-plugin")+"</a>"),fontSize:"small",style:{elements:{link:{color:{text:"var:preset|color|medium-gray"}}}},textColor:"medium-gray"}]]],["newspack-blocks/checkout-button",{text:(0,a.__)("Subscribe now","newspack-plugin")}]]]]});return e||t?(0,s.jsx)("div",{...c,children:(0,s.jsx)("div",{...u,children:l})}):(0,s.jsx)("div",{...c,children:(0,s.jsx)(o.Placeholder,{icon:i.A,label:(0,a.__)("Content Gate Countdown","newspack-plugin"),className:"newspack-content-gate-countdown-box__placeholder",children:(0,a.__)("The content gate countdown block will only display in restricted content when metering is enabled.","newspack-plugin")})})}},7217:(e,t,n)=>{var r=n(79),o=n(1420),a=n(938),i=n(3605),s=n(9817),c=n(945);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=a,l.prototype.get=i,l.prototype.has=s,l.prototype.set=c,e.exports=l},7237:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},7241:(e,t,n)=>{var r=n(695),o=n(2903),a=n(4894);e.exports=function(e){return a(e)?r(e,!0):o(e)}},7255:(e,t,n)=>{var r=n(7422);e.exports=function(e){return function(t){return r(t,e)}}},7291:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},7296:(e,t,n)=>{var r,o=n(5481),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(sr
15c)_1."+r:"";e.exports=function(e){return!!a&&a in e}},7301:e=>{e.exports=function(e){return function(t){return e(t)}}},7309:(e,t,n)=>{var r=n(2006)(n(4713));e.exports=r},7334:e=>{e.exports=function(e){return function(){return e}}},7400:(e,t,n)=>{var r=n(9374),o=1/0;e.exports=function(e){return e?(e=r(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},7422:(e,t,n)=>{var r=n(1769),o=n(7797);e.exports=function(e,t){for(var n=0,a=(t=r(t,e)).length;null!=e&&n<a;)e=e[o(t[n++])];return n&&n==a?e:void 0}},7464:(e,t,n)=>{var r=n(1882),o=n(7296),a=n(3805),i=n(7473),s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,p=l.hasOwnProperty,d=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?d:s).test(i(e))}},7473:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7534:(e,t,n)=>{var r=n(2552),o=n(346);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},7556:(e,t,n)=>{var r=n(1873),o=n(4932),a=n(6449),i=n(4394),s=r?r.prototype:void 0,c=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(a(t))return o(t,e)+"";if(i(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},7612:(e,t,n)=>{var r=n(9770),o=n(6574),a=n(5389),i=n(6449);e.exports=function(e,t){return(i(e)?r:o)(e,a(t,3))}},7670:(e,t,n)=>{var r=n(2651);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},7677:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6087),o=(0,r.forwardRef)(({icon:e,size:t=24,...n},o)=>(0,r.cloneElement)(e,{width:t,height:t,...n,ref:o}))},7720:(e,t,n)=>{"use strict";var r=n(4765),o=Object.prototype.hasOwnProperty,a=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n},c=1024;e.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce(function(e,n){return e[n]=t[n],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var o=t[r],i=o.obj[o.prop],s=Object.keys(i),c=0;c<s.length;++c){var l=s[c],u=i[l];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:i,prop:l}),n.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(a(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n,o,a){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var l="",u=0;u<s.length;u+=c){for(var p=s.length>=c?s.slice(u,u+c):s,d=[],f=0;f<p.length;++f){var h=p.charCodeAt(f);45===h||46===h||95===h||126===h||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||a===r.RFC1738&&(40===h||41===h)?d[d.length]=p.charAt(f):h<128?d[d.length]=i[h]:h<2048?d[d.length]=i[192|h>>6]+i[128|63&h]:h<55296||h>=57344?d[d.length]=i[224|h>>12]+i[128|h>>6&63]+i[128|63&h]:(f+=1,h=65536+((1023&h)<<10|1023&p.charCodeAt(f)),d[d.length]=i[240|h>>18]+i[128|h>>12&63]+i[128|h>>6&63]+i[128|63&h])}l+=d.join("")}return l},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n&&"function"!=typeof n){if(a(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!o.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var i=t;return a(t)&&!a(n)&&(i=s(t,r)),a(t)&&a(n)?(n.forEach(function(n,a){if(o.c
15all(t,a)){var i=t[a];i&&"object"==typeof i&&n&&"object"==typeof n?t[a]=e(i,n,r):t.push(n)}else t[a]=n}),t):Object.keys(n).reduce(function(t,a){var i=n[a];return o.call(t,a)?t[a]=e(t[a],i,r):t[a]=i,t},i)}}},7791:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var r=n(6942),o=n.n(r),a=n(7143),i=n(6087),s=n(7723),c=n(591),l=n(1311),u=n(2247),p=n(3076),d=n(790);const f=()=>{const e=(0,a.useSelect)(e=>e(p.S).getError());if(!e)return null;const{level:t,message:n}=(({data:e,message:t,code:n})=>{let r="fatal";return e&&"level"in e?r=e.level:"rest_invalid_param"===n&&(r="notice"),{message:t,level:r}})(e);if("fatal"===t){const e="undefined"!=typeof newspack_urls&&newspack_urls.dashboard;return(0,d.jsxs)(l.aF,{title:(0,s.__)("Unrecoverable error"),onRequestClose:e?()=>window.location=e:void 0,children:[(0,d.jsx)(l.$T,{noticeText:n,isError:!0,rawHTML:!0}),e&&(0,d.jsx)(l.Zp,{buttonsCard:!0,noBorder:!0,className:"justify-end",children:(0,d.jsx)(l.$n,{isPrimary:!0,href:e,children:(0,s.__)("Return to Dashboard","newspack-plugin")})})]})}
15return(0,d.jsx)(l.$T,{isError:!0,className:"newspack-wizard__above-header",noticeText:n,rawHTML:!0})};(0,p.A)();const{HashRouter:h,Redirect:g,Route:y,Switch:v}=u.A,m=(0,i.forwardRef)(({sections:e=[],headerText:t,apiSlug:n,subHeaderText:r,hasSimpleFooter:u,className:m,renderAboveSections:w,requiredPlugins:b=[],isInitialFetchTriggered:x=!0},_)=>{const k=(0,a.useSelect)(e=>e(p.S).isLoading()),j=(0,a.useSelect)(e=>e(p.S).isQuietLoading());(0,a.useSelect)(e=>x&&e(p.S).getWizardAPIData(n));let S=e.filter(e=>!e.isHidden);const[A,C]=(0,i.useState)(0===b.length);A||(t=b.length>1?(0,s.__)("Required plugins","newspack-plugin"):(0,s.__)("Required plugin","newspack-plugin"),S=[{path:"/",render:()=>(0,d.jsx)(l.I2,{plugins:b,onStatus:({complete:e})=>C(e)})}]);const P=window.location.href.split("#")[0];return(0,d.jsxs)("div",{ref:_,children:[(0,d.jsx)("div",{className:o()(k?"newspack-wizard__is-loading":"newspack-wizard__is-loaded",{"newspack-wizard__is-loading-quiet":j}),children:(0,d.jsxs)(h,{hashType:"slash",children:[newspack_aux_data.is_debug_mode&&(0,d.jsx)(l.$T,{debugMode:!0}),(0,d.jsx)("div",{className:"bg-white",children:(0,d.jsx)("div",{className:"newspack-wizard__header__inner",children:(0,d.jsxs)("div",{className:"newspack-wizard__title",children:[newspack_urls.dashboard!==P?(0,d.jsx)(l.$n,{isLink:!0,href:newspack_urls.dashboard,label:(0,s.__)("Return to Dashboard","newspack-plugin"),showTooltip:!0,icon:c.A,iconSize:36,children:(0,d.jsx)(l.qV,{size:36})}):(0,d.jsx)(l.qV,{size:36}),(0,d.jsxs)("div",{children:[t&&(0,d.jsx)("h2",{children:t}),r&&(0,d.jsx)("span",{children:r})]})]})})}),S.length>1&&(0,d.jsx)(l.pe,{items:S,children:(0,d.jsx)(f,{})}),(0,d.jsx)(l.uC,{}),(0,d.jsxs)(v,{children:[S.map((e,t)=>{var n;const r=e.render;return(0,d.jsx)(y,{exact:null!==(n=e.exact)&&void 0!==n&&n,path:e.path,children:(0,d.jsxs)("div",{className:o()("newspack-wizard__content",m),children:["function"==typeof w?w():null,(0,d.jsx)(r,{})]})},t)}),(0,d.jsx)(g,{to:S[0].path})]})]})}),!k&&(0,d.jsx)(l.wi,{simple:u})]})})},7797:(e,t,n)=>{var r=n(4394);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7805:(e,t,n)=>{var r=n(3360),o=n(5288);e.exports=function(e,t,n){(void 0!==n&&!o(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},7828:(e,t,n)=>{var r=n(9325).Uint8Array;e.exports=r},7896:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(7723),o=n(6087),a=n(1311),i=n(6837),s=n(2005),c=n(7153),l=n(790);const u=/^(382|828|930)$/.test(n.j)?function({onSuccess:e,isOnboarding:t}){const[n,u]=(0,o.useState)({}),p=n?.user_basic_info,d=Boolean(p&&p.email),{setError:f,errorMessage:h,wizardApiFetch:g,isFetching:y}=(0,s.L)("/newspack-settings/connections/apis/google-oauth");function v(){(function(){const e=new URLSearchParams(window.location.search),t={};for(const[n,r]of e.entries())t[n]=r;return t})().access_token||g({path:"/newspack/v1/oauth/google",isCached:!1},{onSuccess(t){u(t),t?.user_basic_info&&("function"==typeof e&&e(t),f(null))}})}return(0,o.useEffect)(()=>{t||v()},[]),(0,o.useEffect)(()=>{d&&p&&!p.has_refresh_token&&f(new c.u(c.M1.GOOGLEOAUTH_REFRESH_TOKEN_EXPIRED,"googleoauth_refresh_token_expired"))},[d]),(0,l.jsx)(i.A,{title:(0,r.__)("Google","newspack-plugin"),description:y?(0,r.__)("Loadingâ¦","newspack-plugin"):d?(0,r.sprintf)( 16// translators: %s: connected user's email address. 17// translators: %s: connected user's email address. 18(0,r.__)("Connected as %s","newspack-plugin"),p?.email):(0,r.__)("Not connected","newspack-plugin"),isChecked:d,actionText:(0,l.jsx)(a.$n,{variant:"link",isDestructive:d,onClick:d?function(){g({path:"/newspack/v1/oauth/google/revoke",method:"DELETE"},{onSuccess:()=>u({})})}:function(){let e=null;g({path:"/newspack/v1/oauth/google/start",isCached:!1},{onSuccess(t){if(null===t)return void f(new c.u(c.M1.GOOGLE.URL_INVALID,"googleoauth_popup_blocked"));if(e=window.open(t,"newspack_google_oauth","width=500,height=600"),null===e)return void f(new c.u(c.M1.GOOGLE.OAUTH_POPUP_BLOCKED,"googleoauth_popup_blocked"));const n=setInterval(()=>{e?.closed&&(clearInterval(n),v())},500)},onError(){e&&e.close()}})},disabled:y,children:d?(0,r.__)("Disconnect","newspack-plugin"):(0,r.__)("Connect","newspack-plugin")}),error:h,isMedium:!0})}:null},7958:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(8221),o=n.n(r),a=n(6087),i=n(6427),s=n(790);class c extends a.Component{constructor(e){super(e),this.state={suggestions:[],validValues:{},loading:this.isFetchingInfoOnLoad()},this.debouncedUpdateSuggestions=o()(this.updateSuggestions,500)}isFetchingInfoOnLoad=()=>{const{tokens:e,fetchSavedInfo:t}=this.props;return Boolean(e.length&&t)};componentDidMount(){if(this.isFetchingInfoOnLoad()){const{tokens:e,fetchSavedInfo:t}=this.props;t(e).then(e=>{const{validValues:t}=this.state;
18e.forEach(e=>{t[e.value]=e.label}),this.setState({validValues:t,loading:!1})})}}componentDidUpdate(e){const{tokens:t,fetchSavedInfo:n}=this.props;t!==e.tokens&&this.isFetchingInfoOnLoad()&&n(t).then(e=>{const{validValues:t}=this.state;e.forEach(e=>{t[e.value]=e.label}),this.setState({validValues:t,loading:!1})})}componentWillUnmount(){delete this.suggestionsRequest,this.debouncedUpdateSuggestions.cancel()}getLabelsForValues(e){const{validValues:t}=this.state;return e.reduce((e,n)=>n?n.label?[...e,n.label]:t[n]?[...e,t[n]]:e:e,[])}getValuesForLabels(e){const{returnFullObjects:t}=this.props,{validValues:n}=this.state;return t?e.reduce((e,t)=>(Object.keys(n).forEach(r=>{if(n[r]===t){const n=isNaN(parseInt(r))?r.toString():parseInt(r);e.push({value:n,label:t})}}),e),[]):e.map(e=>Object.keys(n).map(e=>isNaN(parseInt(e))?e.toString():parseInt(e)).find(t=>n[t]===e))}updateSuggestions(e){const{fetchSuggestions:t}=this.props;t&&this.setState({loading:!0},()=>{const n=t(e);n.then(e=>{if(this.suggestionsRequest!==n)return;const{validValues:t}=this.state,r=[...e];e.forEach(e=>{t[e.value]=e.label}),this.setState({suggestions:r,validValues:t,loading:!1})}).catch(()=>{this.suggestionsRequest===n&&this.setState({loading:!1})}),this.suggestionsRequest=n})}handleOnChange(e){const{onChange:t}=this.props;t(this.getValuesForLabels(e))}getTokens(){const{tokens:e}=this.props;return this.getLabelsForValues(e)}render(){const{help:e,label:t="",placeholder:n="",maxLength:r,style:o,__next40pxDefaultSize:a}=this.props,{suggestions:c,loading:l}=this.state,u=["newspack-autocomplete-tokenfield__input-container"];return t&&u.push("has-label"),(0,s.jsxs)("div",{className:"newspack-autocomplete-tokenfield",style:o,children:[(0,s.jsxs)("div",{className:u.join(" "),children:[(0,s.jsx)(i.FormTokenField,{value:this.getTokens(),suggestions:c.map(e=>e.label),onChange:e=>this.handleOnChange(e),onInputChange:e=>this.debouncedUpdateSuggestions(e),label:t,maxLength:r,placeholder:n,__next40pxDefaultSize:a}),l&&(0,s.jsx)(i.Spinner,{})]}),e&&(0,s.jsx)("p",{className:"newspack-autocomplete-tokenfield__help",children:e})]})}}const l=/^(382|406|617)$/.test(n.j)?c:null},7978:(e,t,n)=>{var r=n(270),o=n(8156),a=n(631),i=n(8586),s=n(756),c=n(7197),l=n(7797);e.exports=function(e,t){return i(e)&&s(t)?c(l(e),t):function(n){var i=o(n,e);return void 0===i&&i===t?a(n,e):r(t,i,3)}}},8002:e=>{"use strict";e.exports=Math.min},8059:(e,t,n)=>{var r=n(2177);e.exports=function(e){return r(2,e)}},8068:e=>{"use strict";e.exports=SyntaxError},8077:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},8096:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},8130:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(5573),o=n(790);const a=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M19.585 11.33L5.08501 4.07999C4.94513 4.01048 4.78703 3.98638 4.63278 4.01105C4.47854 4.03572 4.33585 4.10794 4.22463 4.21762C4.11341 4.3273 4.03921 4.46896 4.01238 4.62285C3.98556 4.77673 4.00746 4.93515 4.07501 5.07599L7.41701 12L4.07501 18.924C4.0071 19.0649 3.98493 19.2235 4.01159 19.3776C4.03826 19.5316 4.11243 19.6736 4.22373 19.7834C4.33503 19.8933 4.47788 19.9656 4.63232 19.9903C4.78675 20.0149 4.94503 19.9907 5.08501 19.921L19.585 12.671C19.7097 12.6087 19.8145 12.513 19.8878 12.3945C19.9611 12.2759 20 12.1393 20 12C20 11.8606 19.9611 11.724 19.8878 11.6055C19.8145 11.487 19.7097 11.3922 19.585 11.33ZM6.38101 17.595L8.72101 12.749H12V11.249H8.72001L6.38201 6.40399L17.573 12L6.38101 17.596V17.595Z"})}),i=/^(406|617)$/.test(n.j)?a:null},8156:(e,t,n)=>{var r=n(7422);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},8168:(e,t,n)=>{"use strict";function r(){return r=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},r.apply(null,arguments)}n.d(t,{A:()=>r})},8176:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(790),o=n(5573),a=(0,r.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(o.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"})})},8209:(e,t,n)=>
vendor: 4,577 bytes, line 18
18{"object"==typeof window&&window.newspack_urls&&(n.p=window.newspack_urls.public_path)},8221:(e,t,n)=>{var r=n(3805),o=n(124),a=n(9374),i=Math.max,s=Math.min;e.exports=function(e,t,n){var c,l,u,p,d,f,h=0,g=!1,y=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=c,r=l;return c=l=void 0,h=t,p=e.apply(r,n)}function w(e){var n=e-f;return void 0===f||n>=t||n<0||y&&e-h>=u}function b(){var e=o();if(w(e))return x(e);d=setTimeout(b,function(e){var n=t-(e-f);return y?s(n,u-(e-h)):n}(e))}function x(e){return d=void 0,v&&c?m(e):(c=l=void 0,p)}function _(){var e=o(),n=w(e);if(c=arguments,l=this,f=e,n){if(void 0===d)return function(e){return h=e,d=setTimeout(b,t),g?m(e):p}(f);if(y)return clearTimeout(d),d=setTimeout(b,t),m(f)}return void 0===d&&(d=setTimeout(b,t)),p}return t=a(t)||0,r(n)&&(g=!!n.leading,u=(y="maxWait"in n)?i(a(n.maxWait)||0,t):u,v="trailing"in n?!!n.trailing:v),_.cancel=function(){void 0!==d&&clearTimeout(d),h=0,c=f=l=d=void 0},_.flush=function(){return void 0===d?p:x(o())},_}},8223:(e,t,n)=>{var r=n(6110)(n(9325),"Map");e.exports=r},8303:(e,t,n)=>{var r=n(6110)(n(9325),"WeakMap");e.exports=r},8329:(e,t,n)=>{var r=n(4894);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var a=n.length,i=t?a:-1,s=Object(n);(t?i--:++i<a)&&!1!==o(s[i],i,s););return n}}},8349:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(790),o=n(5573),a=(0,r.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(o.Path,{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",fillRule:"evenodd",clipRule:"evenodd"})})},8351:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(790),o=n(5573),a=(0,r.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(o.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})})},8586:(e,t,n)=>{var r=n(6449),o=n(4394),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||i.test(e)||!a.test(e)||null!=t&&e in Object(t)}},8636:(e,t,n)=>{"use strict";var r=n(920),o=n(7720),a=n(4765),i=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,l=Array.prototype.push,u=function(e,t){l.apply(e,c(t)?t:[t])},p=Date.prototype.toISOString,d=a.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:o.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:a.formatters[d],indices:!1,serializeDate:function(e){return p.call(e)},skipNulls:!1,strictNullHandling:!1},h={},g=function e(t,n,a,i,s,l,p,d,g,y,v,m,w,b,x,_,k,j){for(var S,A=t,C=j,P=0,O=!1;void 0!==(C=C.get(h))&&!O;){var E=C.get(t);if(P+=1,void 0!==E){if(E===P)throw new RangeError("Cyclic object value");O=!0}void 0===C.get(h)&&(P=0)}if("function"==typeof y?A=y(n,A):A instanceof Date?A=w(A):"comma"===a&&c(A)&&(A=o.maybeMap(A,function(e){return e instanceof Date?w(e):e})),null===A){if(l)return g&&!_?g(n,f.encoder,k,"key",b):n;A=""}if("string"==typeof(S=A)||"number"==typeof S||"boolean"==typeof S||"symbol"==typeof S||"bigint"==typeof S||o.isBuffer(A))return g?[x(_?n:g(n,f.encoder,k,"key",b))+"="+x(g(A,f.encoder,k,"value",b))]:[x(n)+"="+x(String(A))];var N,L=[];if(void 0===A)return L;if("comma"===a&&c(A))_&&g&&(A=o.maybeMap(A,g)),N=[{value:A.length>0?A.join(",")||null:void 0}];else if(c(y))N=y;else{var I=Object.keys(A);N=v?I.sort(v):I}var M=d?String(n).replace(/\./g,"%2E"):String(n),T=i&&c(A)&&1===A.length?M+"[]":M;if(s&&c(A)&&0===A.length)return T+"[]";for(var R=0;R<N.length;++R){var D=N[R],F="object"==typeof D&&D&&void 0!==D.value?D.value:A[D];if(!p||null!==F){var $=m&&d?String(D).replace(/\./g,"%2E"):String(D),V=c(A)?"function"==typeof a?a(T,$):T:T+(m?"."+$:"["+$+"]");j.set(t,P);var z=r();z.set(h,j),u(L,e(F,V,a,i,s,l,p,d,"comma"===a&&_&&c(A)?null:g,y,v,m,w,b,x,_,k,z))}}return L};e.exports=function(e,t){var n,o=e,l=function(e){if(!e)return f;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
18if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||f.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=a.default;if(void 0!==e.format){if(!i.call(a.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r,o=a.formatters[n],l=f.filter;if(("function"==typeof e.filter||c(e.filter))&&(l=e.filter),r=e.arrayFormat in s?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":f.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=void 0===e.allowDots?!0===e.encodeDotInKeys||f.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:f.addQueryPrefix,allowDots:u,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:f.allowEmptyArrays,arrayFormat:r,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:f.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?f.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:f.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:f.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:f.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:f.encodeValuesOnly,filter:l,format:n,formatter:o,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:f.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:f.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:f.strictNullHandling}}(t);"function"==typeof l.filter?o=(0,l.filter)("",o):c(l.filter)&&(n=l.filter);var p=[];if("object"!=typeof o||null===o)return"";var d=s[l.arrayFormat],h="comma"===d&&l.commaRoundTrip;n||(n=Object.keys(o)),l.sort&&n.sort(l.sort);for(var y=r(),v=0;v<n.length;++v){var m=n[v],w=o[m];l.skipNulls&&null===w||u(p,g(w,m,d,h,l.allowEmptyArrays,l.strictNullHandling,l.skipNulls,l.encodeDotInKeys,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.format,l.formatter,l.encodeValuesOnly,l.charset,y))}var b=p.join(l.delimiter),x=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?x+="utf8=%26%2310003%3B&":x+="utf8=%E2%9C%93&"),b.length>0?x+b:""}},8648:e=>{"use strict";e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},8655:(e,t,n)=>{var r=n(6025);e.exports=function(e){return r(this.__data__,e)>-1}},8851:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(790),o=n(5573),a=(0,r.jsx)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(o.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"})})},8859:(e,t,n)=>{var r=n(3661),o=n(1380),a=n(1459);function i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}i.prototype.add=i.prototype.push=o,i.prototype.has=a,e.exports=i},8879:(e,t,n)=>{var r=n(4335)(Object.getPrototypeOf,Object);e.exports=r},8905:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>c});const r=(e={},t={})=>{const n={...e};return t?.newspack_popup_id&&(n.newspack_popup_id=t.newspack_popup_id),t?.gate_post_id&&(n.gate_post_id=t.gate_post_id),t?.sso&&(n.sso=t.sso),n},o=(e,t="np_reader_activation_interaction")=>{if("function"==typeof window.gtag&&e){for(const t of Object.keys(e))"boolean"==typeof e[t]?e[t]=e[t]?"yes":"no":"true"===e[t]?e[t]="yes":"false"===e[t]&&(e[t]="no"),e[t]=e[t].toString();window.gtag("event",t,e)}},a={},i=(e,t,n)=>{n||(n=`np_${e}`),t||(t=e=>e),a[e]={cb:t,eventName:n}},s=()=>{i("reader_registered",e=>({registration_method:e?.registration_method||"unknown"})),i("reader_logged_in",e=>({login_method:e?.login_method||"unknown"})),i("newsletter_signup",e=>({newsletters_subscription_method:e?.newsletters_subscription_method||"unknown",lists:e?.lists||[]}),"np_newsletter_subscribed"),i("subscription_cancelled"),i("subscription_reactivated"),i("subscription_switched"),i("payment_method_deleted"),i("payment_method_added"),i("payment_method_changed"),i("address_updated"),i("product_reordered"),i("subscription_renewal_early")};function c(e){s(),e.on("activity",function(e){const{action:t,data:n}=e.detail;if(!a[t])return;const{cb:i,eventName:s}=a[t],c=i(n);o(r(c,n),s)})}},8968:e=>{"use strict";e.exports=Math.floor},8984:(e,t,n)=>{var r=n(5527),o=n(3650),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}},9219:e=>{e.exports=function(e,t){return e.has(t)}},9290:e=>{"use strict";e.exports=RangeError}
18,9302:(e,t,n)=>{var r=n(3488),o=n(6757),a=n(2865);e.exports=function(e,t){return a(o(e,t,r),e+"")}},9325:(e,t,n)=>{var r=n(4840),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},9326:(e,t,n)=>{var r=n(1769),o=n(2428),a=n(6449),i=n(361),s=n(294),c=n(7797);e.exports=function(e,t,n){for(var l=-1,u=(t=r(t,e)).length,p=!1;++l<u;){var d=c(t[l]);if(!(p=null!=e&&n(e,d)))break;e=e[d]}return p||++l!=u?p:!!(u=null==e?0:e.length)&&s(u)&&i(d,u)&&(a(e)||o(e))}},9344:(e,t,n)=>{var r=n(3805),o=Object.create,a=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=a},9350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9353:e=>{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n};e.exports=function(e){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var a,i=function(e){for(var t=[],n=1,r=0;n<e.length;n+=1,r+=1)t[r]=e[n];return t}(arguments),s=n(0,o.length-i.length),c=[],l=0;l<s;l++)c[l]="$"+l;if(a=Function("binder","return function ("+function(e){for(var t="",n=0;n<e.length;n+=1)t+=e[n],n+1<e.length&&(t+=",");return t}(c)+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof a){var t=o.apply(this,r(i,arguments));return Object(t)===t?t:this}return o.apply(e,r(i,arguments))}),o.prototype){var u=function(){};u.prototype=o.prototype,a.prototype=new u,u.prototype=null}return a}},9374:(e,t,n)=>{var r=n(4128),o=n(3805),a=n(4394),i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(a(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||c.test(e)?l(e.slice(2),n?2:8):i.test(e)?NaN:+e}},9383:e=>{"use strict";e.exports=Error},9430:(e,t,n)=>{"use strict";function r(e){const t=[],n=e.querySelectorAll('button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])');if(0===n.length)return!1;const r=n?.[0];
18n.forEach(function(e,n){null!==e.offsetParent&&(t[n]=e)});const o=t[t.length-1];r.focus(),document.addEventListener("keydown",function(e){("Tab"===e.key||9===e.keyCode)&&(e.shiftKey?document.activeElement===r&&(o.focus(),e.preventDefault()):document.activeElement===o&&(r.focus(),e.preventDefault()))})}n.d(t,{o:()=>r})},9538:e=>{"use strict";e.exports=ReferenceError},9570:(e,t,n)=>{var r=n(7334),o=n(3243),a=n(3488),i=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:a;e.exports=i},9612:e=>{"use strict";e.exports=Object},9653:(e,t,n)=>{var r=n(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},9675:e=>{"use strict";e.exports=TypeError},9770:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}},9817:e=>{e.exports=function(e){return this.__data__.has(e)}},9884:(e,t,n)=>{var r=n(1791),o=n(7241);e.exports=function(e){return r(e,o(e))}},9935:e=>{e.exports=function(){return!1}},9957:(e,t,n)=>{"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,a=n(6743);e.exports=a.call(r,o)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.