(globalThis.webpackChunknewspack=globalThis.webpackChunknewspack||[]).push([[223],{7677:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6087);const o=(0,r.forwardRef)((function({icon:e,size:t=24,...n},o){return(0,r.cloneElement)(e,{width:t,height:t,...n,ref:o})}))},8349:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5573),o=n(790);const i=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.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"})}),a=/^(8(28|4|41)|[46]06|1|498|930)$/.test(n.j)?i:null},591:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5573),o=n(790);const i=(0,o.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(r.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"})}),a=/^(8(28|4|41)|[46]06|1|498|930)$/.test(n.j)?i:null},8351:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5573),o=n(790);const i=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),a=/^(8(28|4|41)|[46]06|1|498|617|930)$/.test(n.j)?i:null},2485:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5573),o=n(790);const i=(0,o.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(r.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})}),a=/^(8(28|4|41)|[46]06|1|498|930)$/.test(n.j)?i:null},6655:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5573),o=n(790);const i=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),a=/^(1|406|828|930)$/.test(n.j)?i:null},3756:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5573),o=n(790);const i=(0,o.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(r.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),a=/^(8(28|4|41)|[46]06|1|498|930)$/.test(n.j)?i:null},8176:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5573),o=n(790);const i=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z"})}),a=/^(8(28|4|41)|[46]06|1|498|930)$/.test(n.j)?i:null},8851:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5573),o=n(790);const i=(0,o.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(r.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"})}),a=/^(8(28|4|41)|[46]06|1|498|930)$/.test(n.j)?i:null},5095:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5573),o=n(790);const i=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})}),a=/^(406|925)$/.test(n.j)?i:null},4818:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5573),o=n(790);const i=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.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"})}),a=/^(617|795)$/.test(n.j)?i:null},6122:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5573),o=n(790);const i=(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"})}),a=/^(617|741|795)$/.test(n.j)?i:null},227:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5573),o=n(790);const i=(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.62041C12.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"})}),a=/^(617|740)$/.test(n.j)?i:null},6028:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(4164),o=n(4715),i=n(7723),a=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)(a.PanelBody,{title:(0,i.__)("Settings","newspack-plugin"),children:[(0,f.jsx)(a.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,i.__)("Image size","newspack-plugin"),onChange:t=>e({size:t}),min:16,max:128,initialPosition:t.size,value:t.size}),(0,f.jsx)(a.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Link to author archive","newspack-plugin"),onChange:()=>e({linkToAuthorArchive:!t.linkToAuthorArchive}),checked:t.linkToAuthorArchive})]})}),g=({avatar:e,size:t,attributes:n})=>{const{className:i}=(0,o.useBlockProps)(),a=i?i.split(" ").filter((e=>e.includes("wp-duotone"))):"",c=(0,r.A)("newspack-avatar-wrapper",a),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:a}=t,s=function({postId:e,postType:t}){const{authorDetails:n}=(0,l.useSelect)((n=>{const{getEditedEntityRecord:r,getUser:o}=n(c.store),i=r("postType",t,e)?.author;return{authorDetails:i?o(i):null}}),[t,e]),r=n?.avatar_urls?Object.values(n.avatar_urls):null,a=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)}}(a),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? // translators: %s: Author name. // translators: %s: Author name. (0,i.sprintf)((0,i.__)("%s Avatar","newspack-plugin"),n?.name):(0,i.__)("Default Avatar","newspack-plugin")}}({userId:e?.userId,postId:r,postType:a}),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:a}),y=(0,o.useBlockProps)(),v=p?.length?p:null;if(!s?.src&&!v?.length)return(0,f.jsx)("div",{...y,children:(0,i.__)("Loading avatar…","newspack-plugin")});const 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")]})}},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 i=n(7143),a=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,a.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,i.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})]})}},9936:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(6087),o=n(6427),i=n(7677),a=n(8351),s=n(3756),c=n(2485),l=n(5135),u=n(6942),p=n.n(u),d=n(790);class f extends r.Component{state={expanded:!1};componentDidUpdate(e){!e.collapse&&this.props.collapse&&this.state.expanded&&this.setState({expanded:!1})}render(){var e;const{badge:t,badgeLevel:n="info",className:r,checkbox:u,children:f,disabled:h,title:g,description:y,handoff:v,editLink:m,href:w,notification:b,notificationLevel:x,notificationHTML:_,actionContent:j,actionText:k,secondaryActionText:S,secondaryDestructive:A,image:P,imageLink:C,indent:O,isSmall:E,isMedium:N,simple:I,onClick:T,onSecondaryActionClick:L,isWaiting:R,titleLink:M,toggleChecked:F,toggleOnChange:D,hasGreyHeader:$,hasWhiteHeader:z,noBorder:B,isPending:U,expandable:V=!1,isButtonEnabled:H=!1}=this.props,{expanded:W}=this.state,q=b||f,G=p()("newspack-action-card",I&&"newspack-card--is-clickable",$&&"newspack-card--has-grey-header",z&&"newspack-card--has-white-header",q&&"newspack-card--has-children",O&&"newspack-card--indent",E&&"is-small",N&&"is-medium",u&&"has-checkbox",V&&"is-expandable",j&&"has-action-content",r),K=!D||M||h?{}:{onClick:()=>D(!F),tabIndex:"0"},Q=w&&0!==w.indexOf("http"),J=S&&L,Z=!Array.isArray(t)&&t?[t]:t;return(0,d.jsxs)(l.Zp,{className:G,onClick:I&&T,id:null!==(e=this.props.id)&&void 0!==e?e:null,noBorder:B,children:[(0,d.jsxs)("div",{className:"newspack-action-card__region newspack-action-card__region-top",children:[D&&(0,d.jsx)(o.ToggleControl,{checked:F,onChange:D,disabled:h}),P&&!D&&(0,d.jsx)("div",{className:"newspack-action-card__region newspack-action-card__region-left",children:(0,d.jsx)("a",{href:C,children:(0,d.jsx)("div",{className:"newspack-action-card__image",style:(Y=P,Y?{backgroundImage:`url(${Y})`}:{})})})}),u&&!D&&(0,d.jsx)("div",{className:"newspack-action-card__region newspack-action-card__region-left",children:(0,d.jsx)("span",{className:p()("newspack-checkbox-icon","is-primary","checked"===u&&"newspack-checkbox-icon--checked",U&&"newspack-checkbox-icon--pending"),children:"checked"===u&&(0,d.jsx)(i.A,{icon:a.A})})}),(0,d.jsx)("div",{className:"newspack-action-card__region newspack-action-card__region-center",children:(0,d.jsxs)(l.xA,{columns:1,gutter:8,noMargin:!0,children:[(0,d.jsxs)("h2",{children:[(0,d.jsxs)("span",{className:"newspack-action-card__title",...K,children:[M&&(0,d.jsx)("a",{href:M,children:g}),!M&&V&&(0,d.jsx)(l.$n,{isLink:!0,onClick:()=>this.setState({expanded:!W}),children:g}),!M&&!V&&g]}),Z?.length&&Z.map(((e,t)=>(0,d.jsx)("span",{className:`newspack-action-card__badge newspack-action-card__badge-level-${n}`,children:e},`badge-${t}`)))]}),y&&(0,d.jsxs)("p",{children:["string"==typeof y&&y,"function"==typeof y&&y()]})]})}),!V&&(k||J||j)&&(0,d.jsxs)("div",{className:"newspack-action-card__region newspack-action-card__region-right",children:[j&&j,k&&(v?(0,d.jsx)(l.Pj,{plugin:v,editLink:m,compact:!0,isLink:!0,children:k}):T||Q?(0,d.jsx)(l.$n,{disabled:h&&!H,isLink:!0,href:w,onClick:T,className:"newspack-action-card__primary_button",children:k}):w?(0,d.jsx)(o.ExternalLink,{href:w,className:"newspack-action-card__primary_button",children:k}):(0,d.jsxs)("div",{className:"newspack-action-card__container",children:[k,R&&(0,d.jsx)(l.E$,{isRight:!0})]})),J&&(0,d.jsx)(l.$n,{isLink:!0,onClick:L,className:"newspack-action-card__secondary_button",isDestructive:A,children:S})]}),V&&(0,d.jsx)(l.$n,{onClick:()=>this.setState({expanded:!W}),children:(0,d.jsx)(i.A,{icon:W?s.A:c.A,height:24,width:24})})]}),b&&(0,d.jsxs)("div",{className:"newspack-action-card__notification newspack-action-card__region-children",children:["error"===x&&(0,d.jsx)(l.$T,{noticeText:b,isError:!0,rawHTML:_}),"info"===x&&(0,d.jsx)(l.$T,{noticeText:b,rawHTML:_}),"success"===x&&(0,d.jsx)(l.$T,{noticeText:b,isSuccess:!0,rawHTML:_}),"warning"===x&&(0,d.jsx)(l.$T,{noticeText:b,isWarning:!0,rawHTML:_})]}),f&&(V&&W||!V)&&(0,d.jsx)("div",{className:"newspack-action-card__region-children",children:f})]});var Y}}f.defaultProps={toggleChecked:!1};const h=/^(8(28|4|41)|[46]06|1|498|930)$/.test(n.j)?f:null},5255:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(8221),o=n.n(r),i=n(6087),a=n(6427),s=n(790);class c extends i.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;e.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}=this.props,{suggestions:o,loading:i}=this.state,c=["newspack-autocomplete-tokenfield__input-container"];return t&&c.push("has-label"),(0,s.jsxs)("div",{className:"newspack-autocomplete-tokenfield",children:[(0,s.jsxs)("div",{className:c.join(" "),children:[(0,s.jsx)(a.FormTokenField,{value:this.getTokens(),suggestions:o.map((e=>e.label)),onChange:e=>this.handleOnChange(e),onInputChange:e=>this.debouncedUpdateSuggestions(e),label:t,maxLength:r,placeholder:n}),i&&(0,s.jsx)(a.Spinner,{})]}),e&&(0,s.jsx)("p",{className:"newspack-autocomplete-tokenfield__help",children:e})]})}}const l=/^(1|406)$/.test(n.j)?c:null},1821:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(6427),o=n(6087),i=n(216),a=n(790);const{useHistory:s}=i.A,c=/^(8(28|4|41)|[46]06|1|498|930)$/.test(n.j)?({href:e,onClick:t,...n})=>{const i=s(),[c,l]=(0,o.useState)(!1);return e&&t?n.onClick=async()=>{l(!0),await t(),l(!1),i.push((e||"").replace("#",""))}:(n.href=e,n.onClick=t),c&&(n.disabled=!0),(0,a.jsx)(r.Button,{...n})}:null},9026:(e,t,n)=>{"use strict";n.d(t,{J:()=>r});const r="newspack_wizard_handoff_message"},5135:(e,t,n)=>{"use strict";n.d(t,{Lz:()=>s.A,wg:()=>c.A,IW:()=>g,Kk:()=>_,$n:()=>y.A,dr:()=>b,Zp:()=>k,vn:()=>I,sk:()=>we,Jv:()=>xe,wi:()=>ke,Q5:()=>je,Du:()=>Fe,xA:()=>De,Pj:()=>Ce,uC:()=>Ee,BR:()=>Re,H7:()=>Te,aF:()=>$e,qV:()=>Be,$T:()=>qe,I2:()=>Ke,x5:()=>et,g:()=>nt,AM:()=>ot,z2:()=>at,bh:()=>ct,Ix:()=>ce.A,X3:()=>lt,Yq:()=>yt,wB:()=>vt,_y:()=>wt,Fx:()=>xt,mi:()=>jt,pe:()=>Ct,xt:()=>Ot,E$:()=>Nt,LQ:()=>$t,sQ:()=>zt.A,JL:()=>ge,Wp:()=>ve,Aq:()=>Ht,c_:()=>Yt});var r=n(6087),o=n(6942),i=n.n(o),a=n(790),s=n(9936),c=n(5255),l=n(1455),u=n.n(l),p=n(6427),d=n(8537),f=n(7723),h=n(3832);const g=/^(1|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:i=(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:w=(0,f.__)("items","newspack-plugin"),selectedItems:b=[],selectedPost:x=0,suggestionsToFetch:_=10})=>{const[j,k]=(0,r.useState)(!0),[S,A]=(0,r.useState)(!1),[P,C]=(0,r.useState)([]),[O,E]=(0,r.useState)(0),[N,I]=(0,r.useState)(v[0].slug),T=["newspack-autocomplete-with-suggestions"];o&&T.push("hide-help"),(0,r.useEffect)((()=>{y&&y(N),k(!0),R(null,0,N).then((e=>{0k(!1)))}),[N]),(0,r.useEffect)((()=>{S&&R(null,P.length,N).then((e=>{0A(!1)))}),[S]);const L=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")})))}),R=t||(async(e=null,t=0,n=null)=>{const r=n||N,o="post"===r||"page"===r?r+"s":r,i=await u()({parse:!1,path:(0,h.addQueryArgs)("/wp/v2/"+o,{search:e,offset:t,per_page:_,_fields:"id,title"})}),a=parseInt(i.headers.get("x-wp-total")||0),s=await i.json();return E(a),s.reduce(((e,t)=>(e.push({value:parseInt(t.id),label:(0,d.decodeEntities)(t?.title.rendered)||(0,f.__)("(no title)","newspack-plugin")}),e)),[])}),M=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({...e,postType:N}))))},F=e=>{if(l){const t=!!(x?[...b,x]:[...b]).find((t=>parseInt(t.value)===parseInt(e.value)&&t.label===e.label));return(0,a.jsx)(p.CheckboxControl,{checked:t,onChange:()=>M([e]),label:e.label},e.value)}return(0,a.jsx)(p.Button,{isLink:!0,onClick:()=>M([e]),children:e.label},e.value)};return(0,a.jsxs)("div",{className:T.join(" "),children:[0{const e=x?[...b,x]:b,t=l?(0,f.sprintf)( // Translators: %1: the length of selections. %2: the selection leabel. // Translators: %1: the length of selections. %2: the selection leabel. (0,f.__)("%1$s %2$s selected","newspack-plugin"),e.length,e.length>1?w:m):(0,f.sprintf)( // Translators: %s: The label for the selection. // Translators: %s: The label for the selection. (0,f.__)("Selected %s","newspack-plugin"),m);return(0,a.jsxs)("div",{className:"newspack-autocomplete-with-suggestions__selected-items",children:[(0,a.jsxs)("p",{className:"newspack-autocomplete-with-suggestions__label",children:[t,1g([]),isLink:!0,isDestructive:!0,children:(0,f.__)("Clear all","newspack-plugin")})]}),e.map((t=>(0,a.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({label:e.label,value:e.slug}))),onChange:e=>I(e)}),(0,a.jsx)(c.A,{tokens:[],onChange:M,fetchSuggestions:async e=>R(e,0,N),fetchSavedInfo:e=>L(e),label:i,loading:j,help:!o&&n,returnFullObjects:!0}),(()=>{if(0===P.length)return null;const e=l?"newspack-autocomplete-with-suggestions__search-suggestions-multiselect":"newspack-autocomplete-with-suggestions__search-suggestions";return(0,a.jsxs)(a.Fragment,{children:[!o&&(0,a.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,a.jsxs)("div",{className:e,children:[P.map(F),P.length<(s||O)&&(0,a.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(1821);if(/^(1|406|828|930)$/.test(n.j))var v=n(7677);if(/^(1|406|828|930)$/.test(n.j))var m=n(6655);class w extends(/^(1|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=i()("newspack-button-card",t,e&&"has-chevron",r&&"grouped",o&&"has-icon",s&&"is-destructive",c&&"is-pressed",l&&"is-small");return(0,a.jsxs)("a",{className:d,...p,children:[o&&(0,a.jsx)(v.A,{icon:o,height:48,width:48}),(0,a.jsxs)(De,{noMargin:!0,columns:1,gutter:8,children:[u&&(0,a.jsx)("h3",{children:u}),n&&(0,a.jsx)("p",{children:n})]}),e&&(0,a.jsx)(v.A,{icon:m.A,height:24,width:24})]})}}const b=/^(1|406|828|930)$/.test(n.j)?w:null;if(/^(1|406)$/.test(n.j))var x=n(8875);const _=/^(1|406)$/.test(n.j)?({hexColor:e,isInverted:t=!1,children:n,...r})=>{let o;o="#f0f0f0"===e?"#1e1e1e":(0,x.b)(e);const i=t?{color:e,backgoundColor:o}:{backgroundColor:e,color:o};return(0,a.jsx)("div",{...r,style:i,children:n})}:null;class j 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=i()("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,a.jsx)("div",{className:p,...u})}}const k=j;var S=n(8221),A=n.n(S),P=n(7309),C=n.n(P),O=n(7612),E=n.n(O);class N extends r.Component{state={suggestions:{},allCategories:{},isLoading:!1};constructor(e){super(e),this.debouncedUpdateSuggestions=A()(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)=>({...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 E()(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=i()("newspack-category-autocomplete",e);return(0,a.jsxs)("div",{className:d,children:[(0,a.jsx)(je,{onInputChange:e=>this.debouncedUpdateSuggestions(e),value:c.reduce(((e,t)=>{const n="number"==typeof t?C()(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,a.jsx)("span",{className:"newspack-category-autocomplete__suggestions-spinner",children:(0,a.jsx)(p.Spinner,{})}):null]})}}N.defaultProps={taxonomy:"categories"};const I=/^(1|828)$/.test(n.j)?N:null;var T={grad:.9,turn:360,rad:360/(2*Math.PI)},L=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},M=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},D=function(e){return{r:M(e.r,0,255),g:M(e.g,0,255),b:M(e.b,0,255),a:M(e.a)}},$=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,B=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},U=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:60*(s<0?s+6:s),s:i?a/i*100:0,v:i/255*100,a:o}},V=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),a=r*(1-n),s=r*(1-(t-i)*n),c=r*(1-(1-t+i)*n),l=i%6;return{r:255*[r,s,a,a,c,r][l],g:255*[c,r,r,s,a,a][l],b:255*[a,a,c,r,r,s][l],a:o}},H=function(e){return{h:F(e.h),s:M(e.s,0,100),l:M(e.l,0,100),a:M(e.a)}},W=function(e){return{h:R(e.h),s:R(e.s),l:R(e.l),a:R(e.a,3)}},q=function(e){return V((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},G=function(e){return{h:(t=U(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,Z=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Y={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)||Z.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:D({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=H({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(T[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return q(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=void 0===o?1:o;return L(t)&&L(n)&&L(r)?D({r:Number(t),g:Number(n),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,i=void 0===o?1:o;if(!L(t)||!L(n)||!L(r))return null;var a=H({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return q(a)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=void 0===o?1:o;if(!L(t)||!L(n)||!L(r))return null;var a=function(e){return{h:F(e.h),s:M(e.s,0,100),v:M(e.v,0,100),a:M(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return V(a)},"hsv"]]},X=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=(e=$(this.rgba)).r,n=e.g,r=e.b,i=(o=e.a)<1?B(R(255*o)):"","#"+B(t)+B(n)+B(r)+i;var e,t,n,r,o,i},e.prototype.toRgb=function(){return $(this.rgba)},e.prototype.toRgbString=function(){return t=(e=$(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(G(this.rgba))},e.prototype.toHslString=function(){return t=(e=W(G(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=U(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 oe({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),oe(ee(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),oe(ee(this.rgba,-e))},e.prototype.grayscale=function(){return oe(ee(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),oe(ne(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),oe(ne(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?oe({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=G(this.rgba);return"number"==typeof e?oe({h:e,s:t.s,l:t.l,a:t.a}):R(t.h)},e.prototype.isEqual=function(e){return this.toHex()===oe(e).toHex()},e}(),oe=function(e){return e instanceof re?e:new re(e)},ie=[],ae=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},se=function(e){return.2126*ae(e.r)+.7152*ae(e.g)+.0722*ae(e.b)},ce=n(216);const{useHistory:le}=ce.A;var ue=n(6449),pe=n.n(ue),de=n(6924),fe=n.n(de);const he=(e,t)=>{if(pe()(e))return t},ge={usePrompt:(e,t)=>{const n=le(),o=(0,r.useRef)(null),i=n=>{if(e)return void 0===n&&(n=window.event),t};return(0,r.useEffect)((()=>(e&&(o.current=n.block(t),window.addEventListener("beforeunload",i)),()=>{o.current&&o.current(),window.removeEventListener("beforeunload",i)})),[t,e]),o.current||(()=>{})},useObjectState:(e={})=>{const[t,n]=(0,r.useState)(e),o=e=>n((t=>fe()({},t,e,he)));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 ye=n(8558);const ve={InteractiveDiv:({style:e={},...t})=>(0,a.jsx)("div",{tabIndex:"0",role:"button",onKeyDown:e=>ye.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(re,Y),ie.push(e))}))}([function(e){e.prototype.luminance=function(){return e=se(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,i,a,s,c,l=t instanceof e?t:new e(t);return i=this.rgba,a=l.toRgb(),n=(s=se(i))>(c=se(a))?(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)>=(a=void 0===(i=(n=t).size)?"normal":i,"AAA"===(o=void 0===(r=n.level)?"AA":r)&&"normal"===a?7:"AA"===o&&"large"===a?3:4.5);var n,r,o,i,a}}]);const{InteractiveDiv:me}=ve,we=/^(1|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=oe(t);return ge.useOnClickOutside(l,(()=>c(!1))),(0,a.jsxs)("div",{className:i()("newspack-color-picker",o),children:[(0,a.jsx)("div",{className:"newspack-color-picker__label",children:e}),(0,a.jsx)(me,{className:"newspack-color-picker__expander",onClick:()=>c(!s),style:{backgroundColor:t,color:u.contrast()>u.contrast("#000")?"#fff":"#000"},children:t}),(0,a.jsx)("div",{className:"newspack-color-picker__main",ref:l,children:s&&(0,a.jsx)(p.ColorPicker,{color:t,onChange:e=>n(e),enableAlpha:!1})})]})}:null;class be extends(1==n.j?r.Component:null){render(){const{className:e,...t}=this.props,n=i()("newspack-custom-select-control",e);return(0,a.jsx)(p.CustomSelectControl,{className:n,...t})}}const xe=1==n.j?be:null;class _e extends r.Component{render(){const{className:e,description:t,hideHelpFromVision:n,hideLabelFromVision:r,...o}=this.props,s=i()("newspack-form-token-field__input-container",e);return(0,a.jsxs)("div",{className:i()({"newspack-form-token-field--label-hidden":r,"newspack-form-token-field--help-hidden":n},"newspack-form-token-field"),children:[(0,a.jsx)(p.FormTokenField,{className:s,...o}),t&&(0,a.jsx)("p",{className:"newspack-form-token-field__help",children:t})]})}}const je=_e,ke=({simple:e})=>{const{components_demo:t=!1,support:n=!1,setup_wizard:r=!1,reset_url:o=!1,plugin_version:i={label:"Newspack"},remove_starter_content:s=!1,support_email:c}=window.newspack_urls||{},l=[{label:i.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,a.jsx)("div",{className:"newspack-footer",children:!e&&(0,a.jsx)("ul",{children:l.map((({url:e,label:t,external:n},r)=>(0,a.jsx)("li",{children:n?(0,a.jsx)(p.ExternalLink,{href:e,children:t}):(0,a.jsx)("a",{href:e,children:t})},r)))})})};var Se=n(6139),Ae=n.n(Se);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 Ae()(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:v,primaryButton:m,primaryModalButton:w,dismissModalButton:b}=this.textForPlugin(d),{Configured:x,Name:_,Slug:j,Status:S}=d,A=i()(x&&"is-configured",e);return(0,a.jsxs)(r.Fragment,{children:[_&&"active"===S&&(0,a.jsx)(y.A,{className:A,isSecondary:!p.isPrimary&&!p.isTertiary&&!p.isLink,...p,onClick:()=>o?this.setState({showModal:!0}):this.goToPlugin(j),children:t||m}),_&&"active"!==S&&(0,a.jsx)(y.A,{className:A,variant:"secondary",disabled:!0,...p,children:_+(0,f.__)(" not installed","newspack-plugin")}),!_&&(0,a.jsx)(y.A,{className:A,isSecondary:!p.isPrimary&&!p.isTertiary&&!p.isLink,...p,children:(0,a.jsxs)(r.Fragment,{children:[!n&&(0,a.jsx)(Nt,{isLeft:!0}),(0,f.__)("Retrieving Plugin Info","newspack-plugin")]})}),h&&(0,a.jsxs)($e,{title:v,onRequestClose:()=>this.setState({showModal:!1}),children:[(0,a.jsx)("p",{children:g}),(0,a.jsxs)(k,{buttonsCard:!0,noBorder:!0,className:"justify-end",children:[(0,a.jsx)(y.A,{variant:"secondary",onClick:()=>this.setState({showModal:!1}),children:b}),(0,a.jsx)(y.A,{variant:"primary",onClick:()=>this.goToPlugin(j),children:w})]})]})]})}}Pe.defaultProps={onReady:()=>{}};const Ce=Pe;var Oe=n(9026);function Ee(){const[e,t]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{setTimeout((()=>{const e=JSON.parse(localStorage.getItem(Oe.J));t(!!e?.message&&e.message),e?.url&&-1===window.location.href.indexOf(e.url)&&(window.localStorage.removeItem(Oe.J),t(!1))}),100)}),[]),e?(0,a.jsx)(qe,{isHandoff:!0,isDismissible:!1,rawHTML:!0,noticeText:e}):null}/^(1|406|828|930)$/.test(n.j)||(v=n(7677));var Ne=n(8851);class Ie extends r.Component{render(){const{className:e,...t}=this.props;return(0,a.jsx)(p.Tooltip,{...t,children:(0,a.jsx)("span",{className:i()("newspack-info-button",e),children:(0,a.jsx)(v.A,{icon:Ne.A})})})}}const Te=Ie;class Le 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,onChange:u,style:p={}}=this.props,d=i()("newspack-image-upload__image",{"newspack-image-upload__image--has-image":o},{"newspack-image-upload__image--covering":c});return(0,a.jsxs)("div",{className:i()("newspack-image-upload",t),children:[(0,a.jsxs)("div",{className:"newspack-image-upload__header",children:[l&&(0,a.jsx)("label",{className:"newspack-image-upload__label",children:l}),s&&(0,a.jsx)(Te,{text:s})]}),(0,a.jsx)("div",{className:d,style:{...p},children:o?.url?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("img",{"data-testid":"image-upload",src:o.url,alt:(0,f.__)("Image preview","newspack-plugin")}),(0,a.jsxs)("div",{className:"newspack-image-upload__controls",children:[(0,a.jsx)(y.A,{disabled:n,onClick:this.openModal,isLink:!0,children:(0,f.__)("Replace","newspack-plugin")}),(0,a.jsx)("span",{className:"sep"}),(0,a.jsx)(y.A,{disabled:n,onClick:()=>u(null),isLink:!0,isDestructive:!0,children:(0,f.__)("Remove","newspack-plugin")})]})]}):(0,a.jsx)(y.A,{disabled:n,onClick:this.openModal,isLink:!0,children:e||(0,f.__)("Upload","newspack-plugin")})}),r&&(0,a.jsx)("p",{className:"newspack-image-upload__help",children:r})]})}}const Re=/^(1|406|930)$/.test(n.j)?Le:null;if(/^(1|930)$/.test(n.j))var Me=n(5373);const Fe=/^(1|930)$/.test(n.j)?()=>{const e=(0,Me.parse)(window.location.search)["newspack-notice"];return e?e.split(",").map(((e,t)=>0===e.indexOf("_error_")?(0,a.jsx)(qe,{isError:!0,noticeText:e.replace("_error_",""),rawHTML:!0},t):(0,a.jsx)(qe,{isSuccess:!0,noticeText:e},t))):null}:null,De=({className:e="",columns:t=2,gutter:n=32,noMargin:r=!1,rowGap:o=0,...s})=>{const c=i()("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,a.jsx)("div",{className:c,...s})},$e=(0,r.forwardRef)((function({className:e,isWide:t,isNarrow:n,hideTitle:r,...o},s){const c=i()("newspack-modal",t&&"newspack-modal--wide",n&&"newspack-modal--narrow",r&&"newspack-modal--hide-title",e);return(0,a.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=i()("newspack-icon",t&&"newspack-icon--simple",r&&"newspack-icon--white",e);return(0,a.jsx)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",height:n,width:n,viewBox:"0 0 24 24",className:o,children:(0,a.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 Be=ze;var Ue=n(8176),Ve=n(8351),He=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=i()("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?Ue.A:c?Ve.A:t?He.A:Ne.A,(0,a.jsxs)("div",{className:h,style:d,children:[(0,a.jsx)(v.A,{icon:g}),(0,a.jsxs)("div",{className:"newspack-notice__content",children:[p?(0,a.jsx)(r.RawHTML,{children:u}):u,f||null]})]})}}const qe=We;class Ge 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)=>e.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,a.jsxs)(a.Fragment,{children:[(!r||!Object.keys(r).length)&&(0,a.jsxs)("div",{className:"newspack-plugin-installer_is-waiting",children:[(0,a.jsx)(Nt,{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,m=!y&&"active"!==d,w=p||u(d);let b;2===h?b="inactive"===d?(0,f.__)("Activating…"):(0,f.__)("Installing…"):w?"uninstalled"===d?b=(0,a.jsxs)("span",{className:"newspack-plugin-installer__status",children:[(0,f.__)("Install","newspack"),(0,a.jsx)("span",{className:"newspack-checkbox-icon"})]}):"inactive"===d?b=(0,a.jsxs)("span",{className:"newspack-plugin-installer__status",children:[(0,f.__)("Activate","newspack-plugin"),(0,a.jsx)("span",{className:"newspack-checkbox-icon"})]}):"active"===d&&(b=(0,a.jsxs)("span",{className:"newspack-plugin-installer__status",children:[(0,f.__)("Installed","newspack-plugin"),(0,a.jsx)("span",{className:"newspack-checkbox-icon newspack-checkbox-icon--checked",children:(0,a.jsx)(v.A,{icon:Ve.A})})]})):b=(0,a.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,a.jsx)("span",{className:"newspack-checkbox-icon"})]});const x=i()("newspack-action-card__plugin-installer",this.classForInstallationStatus(h)),_=m?()=>this.installPlugin(e):null;return(0,a.jsx)(s.A,{title:c,description:l,disabled:!w,actionText:b,isSmall:t,isWaiting:y,onClick:_,notification:g,notificationLevel:"error",notificationHTML:!0,className:x},e)})),!n&&!e&&r&&c.length>0&&(0,a.jsx)("div",{className:"newspack-buttons-card",children:(0,a.jsx)(y.A,{disabled:!d,isPrimary:!0,onClick:this.installAllPlugins,children:p})})]})}}Ge.defaultProps={onStatus:()=>{},onInstalled:()=>{}};const Ke=Ge;var Qe=n(2619);const Je=e=>Array.isArray(e.options)&&e.options.length,Ze=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}},Ye=e=>{var t;const[n,o]=(0,r.useState)(!0),{error:i,sectionKey:c,active:l,title:u,description:d,fields:h,disabled:g,onChange:v,onUpdate:m}=e,w=e=>({disabled:g,name:`${e.section}_${e.key}`,type:Ze(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=>{v(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,a.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=>m({active:e}):null,actionContent:(l||null===l)&&b("buttons",(0,a.jsx)(y.A,{variant:"primary",disabled:g||n,onClick:()=>{m(),o(!0)},children:(0,f.__)("Save Settings","newspack")})),children:(l||null===l)&&(0,a.jsxs)(r.Fragment,{children:[i?.message&&(0,a.jsx)(qe,{noticeText:i.message,isError:!0}),b("beforeControls"),(0,a.jsx)(De,{columns:x,gutter:32,children:h.map((e=>{const t=(e=>{if(Je(e))return yt;switch(e.type){case"checkbox":case"boolean":return p.CheckboxControl;default:return Ot}})(e);return(0,Qe.applyFilters)(`newspack.settingsSection.${c}.control`,(0,a.jsx)(t,{...w(e)},e.key),{sectionKey:c,setting:e,onChange:v})}))})]})})};class Xe 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,a.jsxs)(r.Fragment,{children:[e&&(0,a.jsx)(lt,{title:e,heading:s,description:t}),u&&(0,a.jsx)(qe,{isError:!0,noticeText:u.message}),(0,a.jsxs)("div",{className:i()("newspack-plugin-settings",{"newspack-wizard-section__is-loading":l&&!Object.keys(c).length}),children:[Object.keys(c).map((e=>(0,a.jsx)(Ye,{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]})]})}}Xe.defaultProps={title:(0,f.__)("General Settings","newspack-plugin")},Xe.Section=Ye;const et=/^(1|406|828)$/.test(n.j)?Xe:null;class tt 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",i={path:`/newspack/v1/plugins/${e}/${o}/`,method:"post"};this.setState({pluginInfo:{...r,[e]:{...r[e],inFlight:o}}},(()=>{u()(i).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:i,slug:c,editPath:l}=e,u=this.isPluginInstalledAndActive(e),p=!i&&u&&l?c:null,d=this.errorForPlugin(e);return(0,a.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:i,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:i,name:s}=e;return"configure"===i?(0,a.jsxs)(r.Fragment,{children:[(0,f.__)("Installing…","newspack-plugin")," ",(0,a.jsx)(Nt,{isRight:!0})]}):"deactivate"===i?(0,a.jsxs)(r.Fragment,{children:[(0,f.__)("Deactivating…","newspack-plugin")," ",(0,a.jsx)(Nt,{isRight:!0})]}):s?this.isPluginInstalledAndActive(e)?o||n?t||(0,f.__)("Configure","newspack-plugin"):void 0:null:(0,a.jsxs)(r.Fragment,{children:[(0,f.__)("Loading…","newspack-plugin")," ",(0,a.jsx)(Nt,{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 nt=/^(406|828)$/.test(n.j)?tt:null;class rt extends r.Component{render(){const{className:e,padding:t,...n}=this.props,r=i()("newspack-popover",t&&"newspack-popover__padding-"+t,e);return(0,a.jsx)(p.Popover,{className:r,...n})}}rt.defaultProps={padding:!1};const ot=/^(1|828)$/.test(n.j)?rt:null;class it extends(/^(1|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),i=Math.max(0,Math.min(parseInt(t)||0,parseInt(o))),s={width:this.getCompletionPercentage(i,o)+"%"};return(0,a.jsxs)("div",{className:"newspack-progress-bar",children:[(e||r)&&(0,a.jsxs)("div",{className:"newspack-progress-bar__headings",children:[e&&(0,a.jsx)("h2",{children:e}),r&&(0,a.jsx)("p",{className:"is-dark",children:(0,a.jsxs)("strong",{children:[i,"/",o]})})]}),(0,a.jsx)("div",{className:"newspack-progress-bar__container",children:(0,a.jsx)("div",{className:"newspack-progress-bar__bar",style:s,"data-testid":"progress-bar-indicator"})})]})}}const at=/^(1|406|930)$/.test(n.j)?it:null;class st extends(1==n.j?r.Component:null){render(){const{className:e,...t}=this.props,n=i()("newspack-radio-control",e);return(0,a.jsx)(p.RadioControl,{className:n,...t})}}const ct=1==n.j?st:null,lt=({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=i()("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,a.jsx)("div",{id:u,className:"newspack-section-header__container",ref:p,children:(0,a.jsxs)(De,{columns:1,gutter:8,className:d,children:["string"==typeof l&&(0,a.jsx)(f,{children:l}),"function"==typeof l&&(0,a.jsx)(f,{children:l()}),n&&"string"==typeof n&&(0,a.jsx)("p",{children:n}),"function"==typeof n&&(0,a.jsx)("p",{children:n()})]})})};var ut=n(2485),pt=n(2426),dt=n.n(pt);function ft({help:e,label:t,onChange:n,optgroups:r=[],className:o,hideLabelFromVision:s,...c}){const l=ge.useUniqueId("group-select");return(0,a.jsx)(p.BaseControl,{label:t,hideLabelFromVision:s,id:l,help:e,className:i()(o,"components-select-control"),children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("select",{id:l,className:"components-select-control__input",onChange:e=>{const{value:t}=e.target,o=C()(r,(e=>dt()(e.options,["value",t])));n(t,o)},"aria-describedby":e?`${l}__help`:void 0,...c,children:[(0,a.jsx)("option",{value:"",children:(0,f.__)("-- Select --","newspack-plugin")}),r.map((({label:e,options:t},n)=>(0,a.jsx)("optgroup",{label:e,children:t.map(((e,t)=>(0,a.jsx)("option",{value:e.value,disabled:e.disabled,children:e.label},`${e.label}-${e.value}-${t}`)))},n)))]}),(0,a.jsx)("div",{className:"components-select-control__arrow-wrapper",children:(0,a.jsx)(v.A,{icon:ut.A,size:18})})]})})}const ht=({buttonOptions:e,buttonSmall:t,className:n,help:r,hideLabelFromVision:o,label:s,onChange:c,value:l})=>{const u=ge.useUniqueId("button-group");return(0,a.jsx)(p.BaseControl,{label:s,help:r,hideLabelFromVision:o,id:u.current,className:i()(n,"components-select-control"),children:(0,a.jsx)(p.ButtonGroup,{children:e.map((e=>{const n=l===e.value;let r=()=>e.label;return e.icon&&(r=()=>(0,a.jsx)(v.A,{icon:e.icon})),(0,a.jsx)(p.Button,{variant:n?"primary":null,isPressed:n,onClick:()=>c(e.value),isSmall:t,children:(0,a.jsx)(r,{})},e.value)}))})})};class gt extends r.Component{render(){const{className:e,optgroups:t,buttonOptions:n,buttonSmall:r,...o}=this.props,s=i()("newspack-select-control",t&&"newspack-grouped-select-control",n&&"newspack-buttons-select-control",e);return(0,a.jsx)("div",{className:s,children:t?(0,a.jsx)(ft,{optgroups:t,...o}):n?(0,a.jsx)(ht,{buttonOptions:n,buttonSmall:r,...o}):(0,a.jsx)(p.SelectControl,{...o})})}}const yt=gt,vt={SettingsCard:({children:e,className:t,columns:n=3,gutter:r=32,noBorder:o,rowGap:c,...l})=>{const u=i()("newspack-settings__card",o&&"newspack-settings__no-border",t);return(0,a.jsx)(s.A,{...l,className:u,notificationLevel:"info",noBorder:o,children:(0,a.jsx)(De,{columns:n,gutter:r,rowGap:c,children:e})})},SettingsSection:({title:e,description:t,children:n})=>(0,a.jsxs)(De,{columns:1,gutter:8,className:"newspack-settings__section",children:[(0,a.jsxs)("div",{className:"newspack-settings__section__title",children:[(0,a.jsx)("span",{children:e}),t&&(0,a.jsx)(Te,{text:t})]}),(0,a.jsx)("div",{className:"newspack-settings__section__content",children:n})]}),MinMaxSetting:({min:e,max:t,onChangeMin:n,onChangeMax:r,minPlaceholder:o,maxPlaceholder:i,...s})=>(0,a.jsxs)("div",{...s,children:[(0,a.jsxs)("div",{className:"newspack-settings__min-max",children:[(0,a.jsx)(p.CheckboxControl,{checked:e>0,onChange:e=>n(e?1:0),label:(0,f.__)("Min","newspack-plugin")}),(0,a.jsx)(Ot,{"data-testid":"min",type:"number",value:e,placeholder:o,onChange:e=>n(e>0?e:0)})]}),(0,a.jsxs)("div",{className:"newspack-settings__min-max","data-testid":"max",children:[(0,a.jsx)(p.CheckboxControl,{checked:t>0,onChange:t=>r(t?e||1:0),label:(0,f.__)("Max","newspack-plugin")}),(0,a.jsx)(Ot,{"data-testid":"max",type:"number",value:t,placeholder:i,onChange:e=>r(e>0?e:0)})]})]})};class mt extends(1==n.j?r.Component:null){render(){const{className:e,stepsListItems:t,narrowList:n,style:r={}}=this.props,o=i()("steps-list",e,n&&"steps-list__narrow-list");return(0,a.jsx)("div",{className:o,style:r,children:t.map(((e,t)=>(0,a.jsx)(xt,{listItemCount:t+1,listItemText:e},t)))})}}const wt=1==n.j?mt:null;class bt extends(1==n.j?r.Component:null){render(){const{className:e,listItemCount:t,listItemText:n,style:r={}}=this.props,o=i()("steps-list-item",e);return(0,a.jsxs)("div",{className:o,style:r,children:[(0,a.jsx)("div",{className:"steps-list-item__number",children:t}),(0,a.jsx)("div",{className:"steps-list-item__content",dangerouslySetInnerHTML:{__html:n}})]})}}const xt=1==n.j?bt:null;class _t extends(/^(1|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=i()("newspack-style-card",c&&"newspack-style-card__is-active",t);return(0,a.jsxs)("div",{className:d,id:u,children:[(0,a.jsxs)("div",{className:"newspack-style-card__image",children:["html"===s?(0,a.jsx)("div",{className:"newspack-style-card__image-html",dangerouslySetInnerHTML:o}):(0,a.jsx)("img",{src:o,alt:n+" "+(0,f.__)("Thumbnail","newspack-plugin")}),(0,a.jsxs)("div",{className:"newspack-style-card__actions",children:[c?(0,a.jsx)("span",{className:"newspack-style-card__actions__badge",children:(0,f.__)("Selected","newspack-plugin")}):(0,a.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,a.jsx)($t,{url:r,label:(0,f.__)("View Demo","newspack-plugin"),variant:"link"})]})]}),n&&(0,a.jsx)("div",{className:"newspack-style-card__title",children:n})]})}}const jt=/^(1|930)$/.test(n.j)?_t:null;var kt=n(4713),St=n.n(kt);const{NavLink:At,useHistory:Pt}=ce.A,Ct=({items:e,className:t,disableUpcoming:n,children:r=null})=>{const o=e.filter((e=>!e.isHiddenInTabbedNavigation)),{location:s}=Pt(),c=St()(o,["path",s.pathname]);return(0,a.jsxs)("div",{className:i()("newspack-tabbed-navigation",t),children:[(0,a.jsx)("ul",{children:o.map(((e,t)=>(0,a.jsx)("li",{children:(0,a.jsx)(At,{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:i()({disabled:n&&t>c}),children:e.label})},t)))}),r]})},Ot=({className:e="",required:t=!1,isWide:n=!1,withMargin:o=!0,...s})=>{const c=(0,r.useRef)(null);(0,r.useEffect)((()=>{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=i()("newspack-text-control",{"newspack-text-control--wide":n,"newspack-text-control--with-margin":o},e);return t?(0,a.jsx)("div",{ref:c,className:"newspack-text-control--required",children:(0,a.jsx)(p.TextControl,{className:l,required:t,...s})}):(0,a.jsx)(p.TextControl,{className:l,...s})};class Et extends r.Component{render(){const{className:e,isRight:t,isLeft:n,isCenter:r,...o}=this.props,s=i()("newspack-waiting",e,{"is-right":t,"is-left":n,"is-center":r});return(0,a.jsx)(p.Spinner,{className:s,...o})}}const Nt=Et;var It=n(5573);const Tt=(0,a.jsx)(It.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.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"})}),Lt=(0,a.jsx)(It.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.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"})}),Rt=(0,a.jsx)(It.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.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"})}),Mt=(0,a.jsx)(It.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(It.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})}),Ft="newspack-components-web-preview-wrapper";class Dt 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}=this.props,{device:o,loaded:s,isPreviewVisible:c}=this.state;if(!this.modalDOMElement||!c)return null;const l=i()("newspack-web-preview",o,s&&"is-loaded");return e(),(0,r.createPortal)((0,a.jsx)("div",{className:l,children:(0,a.jsxs)("div",{className:"newspack-web-preview__interior",children:[(0,a.jsxs)("div",{className:"newspack-web-preview__toolbar",children:[(0,a.jsx)("div",{className:"newspack-web-preview__toolbar-left",children:(0,a.jsxs)(p.ButtonGroup,{children:[(0,a.jsx)(p.Button,{onClick:()=>this.setState({device:"desktop"}),variant:"desktop"===o&&"primary",icon:Tt,label:(0,f.__)("Preview Desktop Size","newspack-plugin")}),(0,a.jsx)(p.Button,{onClick:()=>this.setState({device:"tablet"}),variant:"tablet"===o&&"primary",icon:Lt,label:(0,f.__)("Preview Tablet Size","newspack-plugin")}),(0,a.jsx)(p.Button,{onClick:()=>this.setState({device:"phone"}),variant:"phone"===o&&"primary",icon:Rt,label:(0,f.__)("Preview Phone Size","newspack-plugin")})]})}),(0,a.jsx)("div",{className:"newspack-web-preview__toolbar-right",children:(0,a.jsx)(p.Button,{onClick:()=>{t(),this.setState({isPreviewVisible:!1,loaded:!1})},icon:Mt,label:(0,f.__)("Close Preview","newspack-plugin")})})]}),(0,a.jsxs)("div",{className:"newspack-web-preview__content",children:[!s&&(0,a.jsxs)("div",{className:"newspack-web-preview__is-waiting",children:[(0,a.jsx)(Nt,{isLeft:!0}),(0,f.__)("Loading…","newspack-plugin")]}),(0,a.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,a.jsxs)(r.Fragment,{children:[n?n({showPreview:this.showPreview}):(0,a.jsx)(p.Button,{variant:t,onClick:this.showPreview,tabIndex:"0",children:e}),this.getWebPreviewModal()]})}}Dt.defaultProps={url:"//newspack.com",label:(0,f.__)("Preview","newspack-plugin"),onLoad:()=>{}};const $t=/^(1|406|930)$/.test(n.j)?Dt:null;var zt=n(2098);if(/^(1|828|841|930)$/.test(n.j))var Bt=n(591);const{Redirect:Ut,Route:Vt}=ce.A;function Ht(e,t){return class extends r.Component{constructor(e){super(e),this.state={complete:null,error:null,loading:t&&t.length>0?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,a.jsx)(qe,{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,a.jsxs)($e,{title:(0,f.__)("Unrecoverable error"),onRequestClose:()=>window.location=t,children:[(0,a.jsx)(qe,{noticeText:n,isError:!0,rawHTML:!0}),(0,a.jsx)(k,{buttonsCard:!0,noBorder:!0,className:"justify-end",children:(0,a.jsx)(y.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,a.jsx)(Ut,{from:"/plugin-requirements",to:"/"}):(0,a.jsx)(Vt,{path:"/",render:()=>(0,a.jsxs)(r.Fragment,{children:[null!==e&&(0,a.jsx)("div",{className:"newspack-wizard__header",children:(0,a.jsx)("div",{className:"newspack-wizard__header__inner",children:(0,a.jsxs)("div",{className:"newspack-wizard__title",children:[(0,a.jsx)(y.A,{isLink:!0,href:newspack_urls.dashboard,label:(0,f.__)("Return to Dashboard","newspack-plugin"),showTooltip:!0,icon:Bt.A,iconSize:36,children:(0,a.jsx)(Be,{size:36})}),(0,a.jsx)("div",{children:(0,a.jsx)("h2",{children:t.length>1?(0,f.__)("Required plugins","newspack-plugin"):(0,f.__)("Required plugin","newspack-plugin")})})]})})}),(0,a.jsx)("div",{className:"newspack-wizard newspack-wizard__content",children:(0,a.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,a.jsxs)($e,{isNarrow:!0,hideTitle:!e,title:e,onRequestClose:()=>this.setState({confirmation:null}),children:[(0,a.jsx)("p",{children:t}),(0,a.jsxs)(k,{buttonsCard:!0,noBorder:!0,className:"justify-end",children:[(0,a.jsx)(y.A,{variant:"secondary",onClick:()=>this.setState({confirmation:null}),children:r}),(0,a.jsx)(y.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:i,error:s}=this.state,c=[o?"newspack-wizard__is-loading":"newspack-wizard__is-loaded"];return i&&c.push("newspack-wizard__is-loading-quiet"),(0,a.jsxs)(r.Fragment,{children:[this.getError(),this.getModal(),(0,a.jsx)("div",{className:c.join(" "),children:(0,a.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,a.jsx)(ke,{simple:n})]})}}}var Wt=n(1882),qt=n.n(Wt),Gt=n(3805),Kt=n.n(Gt),Qt=n(5015),Jt=n.n(Qt);function Zt(e){const t={};return qt()(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 Yt(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:v}=n,m=Zt(s),w=Zt(h),b=w.plugin?Ce:y.A,x=o&&s,_=d&&h,j=(e={})=>m.plugin?(0,a.jsx)(Ce,{isPrimary:!0,...m,...e,children:o}):(0,a.jsx)(y.A,{isPrimary:!c,isSecondary:!!c,disabled:c,children:o,...m,...e});return(0,a.jsxs)(a.Fragment,{children:[newspack_aux_data.is_debug_mode&&(0,a.jsx)(qe,{debugMode:!0}),(0,a.jsx)("div",{className:"newspack-wizard__header",children:(0,a.jsx)("div",{className:"newspack-wizard__header__inner",children:(0,a.jsxs)("div",{className:"newspack-wizard__title",children:[(0,a.jsx)(y.A,{isLink:!0,href:newspack_urls.dashboard,label:(0,f.__)("Return to Dashboard","newspack-plugin"),showTooltip:!0,icon:Bt.A,iconSize:36,children:(0,a.jsx)(Be,{size:36})}),(0,a.jsxs)("div",{children:[l&&(0,a.jsx)("h2",{children:l}),u&&(0,a.jsx)("span",{children:u})]})]})})}),p&&(0,a.jsx)(Ct,{disableUpcoming:v,items:p.filter((e=>!e.isHiddenInNav))}),(0,a.jsx)(Ee,{}),(0,a.jsxs)("div",{className:i()("newspack-wizard newspack-wizard__content",r),children:["function"==typeof g?g():null,(0,a.jsx)(e,{...n,renderPrimaryButton:j}),(x||_)&&(0,a.jsxs)("div",{className:"newspack-buttons-card",children:[x&&!t&&j(),_&&(0,a.jsx)(b,{isSecondary:!0,...w,children:d})]})]})]})}}},216:(e,t,n)=>{"use strict";if(n.d(t,{A:()=>o}),/^(8(28|4|41)|[46]06|1|498|930)$/.test(n.j))var r=n(1125);const o=/^(8(28|4|41)|[46]06|1|498|930)$/.test(n.j)?r:null},8875:(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})},2098:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var r=n(6942),o=n.n(r),i=n(7143),a=n(6087),s=n(7723),c=n(591),l=n(5135),u=n(216),p=n(3276),d=n(790);const f=()=>{const e=(0,i.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")})})]})}return(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,a.forwardRef)((({sections:e=[],headerText:t,apiSlug:n,subHeaderText:r,hasSimpleFooter:u,className:m,renderAboveSections:w,requiredPlugins:b=[],isInitialFetchTriggered:x=!0},_)=>{const j=(0,i.useSelect)((e=>e(p.S).isLoading())),k=(0,i.useSelect)((e=>e(p.S).isQuietLoading()));(0,i.useSelect)((e=>x&&e(p.S).getWizardAPIData(n)));let S=e.filter((e=>!e.isHidden));const[A,P]=(0,a.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})=>P(e)})}]);const C=window.location.href.split("#")[0];return(0,d.jsxs)("div",{ref:_,children:[(0,d.jsx)("div",{className:o()(j?"newspack-wizard__is-loading":"newspack-wizard__is-loaded",{"newspack-wizard__is-loading-quiet":k}),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!==C?(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})]})]})}),!j&&(0,d.jsx)(l.wi,{simple:u})]})}))},3276:(e,t,n)=>{"use strict";n.d(t,{A:()=>m,S:()=>f});var r=n(3560),o=n.n(r),i=n(8156),a=n.n(i),s=n(2193),c=n.n(s),l=n(1455),u=n.n(l),p=n(7143),d=n(9445);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 i=(0,p.select)(f).getWizardAPIData(e),s=n?a()(i,n):i,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)},9445:(e,t,n)=>{"use strict";n.d(t,{V:()=>i,l:()=>a});var r=n(7143),o=n(3276);const i=e=>t=>({type:e,payload:t}),a=(e,t={})=>(0,r.useSelect)((t=>t(o.S).getWizardAPIData(e)))||t},6123:(e,t,n)=>{"use strict";var r=n(1622);window.newspackRAS=window.newspackRAS||[];let o=null;function i({detail:{overlays:e}}){setTimeout((()=>{e.length||(o?(window.location.href=o,o=null):window.location.reload(),window.newspackReaderActivation.off("overlay",i))}),50)}function a(){window.newspackRAS.push((e=>{setTimeout((()=>{e.overlays.get().length?e.on("overlay",i):o?(window.location.href=o,o=null):window.location.reload()}),50)}))}function s(e,t,n,r,i){const s=document.createElement("div");s.classList.add("newspack-ui"),s.innerHTML='
';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?o=`${newspackMyAccountV1.myAccountUrl}/view-subscription/${n[0]}`:t?o=`${newspackMyAccountV1.myAccountUrl}/view-subscription/${t}`:r&&(o=`${newspackMyAccountV1.myAccountUrl}/view-order/${r}`)}(e),r&&r(e)},onClose:i||a})})(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]}])}))}))}))},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];n.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})},8905:(e,t,n)=>{"use strict";n.d(t,{A:()=>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")=>{"function"==typeof window.gtag&&e&&window.gtag("event",t,e)},i={},a=(e,t,n)=>{n||(n=`np_${e}`),t||(t=e=>e),i[e]={cb:t,eventName:n}},s=()=>{a("reader_registered",(e=>({registration_method:e?.registration_method||"unknown"}))),a("reader_logged_in",(e=>({login_method:e?.login_method||"unknown"}))),a("newsletter_signup",(e=>({newsletters_subscription_method:e?.newsletters_subscription_method||"unknown",lists:e?.lists||[]})),"np_newsletter_subscribed"),a("subscription_cancelled"),a("subscription_reactivated"),a("subscription_switched"),a("payment_method_deleted"),a("payment_method_added"),a("payment_method_changed"),a("address_updated"),a("product_reordered"),a("subscription_renewal_early")};function c(e){s(),e.on("activity",(function(e){const{action:t,data:n}=e.detail;if(!i[t])return;const{cb:a,eventName:s}=i[t],c=a(n);o(r(c,n),s)}))}},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 i=6-o.getDay();o.setDate(o.getDate()+i);const a=o.getTime(),s=e.store.get("article_view_per_week")||{};s[a]||(s[a]={}),s[a][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})},5325:(e,t,n)=>{"use strict";n.d(t,{_:()=>i,m:()=>a});var r=n(5920),o=n(8621);function i(e=!1){o.M_.set("pending_checkout",e,!1),(0,r.Ic)(r.qY.reader,(0,o.OO)())}function a(){return o.M_.get("pending_checkout")||!1}},6500:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5920),o=n(2952);const i=[],a={get:function(){return i||[]},add:function(e=""){return e||(e=(0,o.ni)()),i.push(e),(0,r.Ic)(r.qY.overlay,{overlays:i,added:e}),e},remove:function(e){if(!e)return i;const t=i.indexOf(e);return t>-1&&i.splice(t,1),(0,r.Ic)(r.qY.overlay,{overlays:i,removed:e}),i}}},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 i(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 a(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(i(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 a;o.storage.setItem(i(e,n),(a=t,JSON.stringify(a))),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((()=>a(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&&(a(t),e.push(t))},delete:t=>{if(!t)throw new Error("Key is required.");o.storage.removeItem(i(t)),(0,r.Ic)(r.qY.data,{key:t,value:void 0}),a(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{"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 i(e=9){let t="";for(let n=0;nr,TV:()=>o,cY:()=>a,ni:()=>i})},8209:(e,t,n)=>{"object"==typeof window&&window.newspack_urls&&(n.p=window.newspack_urls.public_path)},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 i(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:()=>i})},133:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(7723),o=n(1455),i=n.n(o),a=n(6087),s=n(5135),c=n(7896),l=n(3737),u=n(790);function p({onUpdate:e,onSuccess:t}){const n=(0,a.useRef)(null),[o,p]=(0,a.useState)(""),[d,f]=(0,a.useState)(!1),[h,g]=(0,a.useState)(""),[y,v]=(0,a.useState)(!1),[m,w]=(0,a.useState)(null);return(0,a.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)(a.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)(a.Fragment,{children:y?(0,u.jsx)(s.$T,{isSuccess:!0,noticeText:(0,r.__)("We're all set here!","newspack-plugin")}):(0,u.jsxs)(a.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),i()({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)))}})]})})]})})}},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"))}}))}},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=/^(1|828|930)$/.test(n.j)?r:null},7153:(e,t,n)=>{"use strict";n.d(t,{M1:()=>a,Ss:()=>i.A,u:()=>o.A});var r=n(7723),o=n(4058),i=n(1075);const a={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")}}},2005:(e,t,n)=>{"use strict";n.d(t,{L:()=>d});var r=n(7143),o=n(8537),i=n(6087),a=n(3276),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,i.useState)(!1),{wizardApiFetch:d,updateWizardSettings:f}=(0,r.useDispatch)(a.S),h=(0,r.useSelect)((t=>t(a.S).getWizardData(e)),[e]),[g,y]=(0,i.useState)(null!==(t=h.error)&&void 0!==t?t:null),v=(0,i.useRef)([]);function m(){y(null)}return(0,i.useEffect)((()=>{f({slug:e,path:["error"],value:g})}),[g,f,e]),{wizardApiFetch:(0,i.useCallback)((async(t,n)=>{const{on:r}=p(null!=n?n:{}),o=function(t){return(n,r,o=t)=>{const i=o?c(o):o;f({slug:e,path:[i,...Array.isArray(n)?n:[n]].filter((e=>"string"==typeof e)),value:r})}}(t.path),{path:i,method:a="GET"}=t,g=c(null!=i?i:""),{isCached:m="GET"===a,updateCacheKey:w=null,updateCacheMethods:b=[],...x}=t,{error:_,[g]:{[a]:j=null}={}}=h;function k(e){if(m&&o(a,e),w&&w.constructor===Object){const[t,n]=Object.entries(w)[0],r=h[t][n];let i;i=r&&r.constructor===Object?{...r,...e}:e,o(Object.entries(w)[0],i,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(k).catch(S).finally(A)):m&&(_||j)?(y(_),r("onSuccess",j),j):(s(!0),r("onStart"),v.current.push(g),l[g]=d({isQuietFetch:!0,isLocalError:!0,...x}).then(k).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}}},7896:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(7723),o=n(6087),i=n(5135),a=n(6837),s=n(2005),c=n(7153),l=n(790);const u=/^(1|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)(a.A,{title:(0,r.__)("Google","newspack-plugin"),description:y?(0,r.__)("Loading…","newspack-plugin"):d?(0,r.sprintf)( // Translators: connected user's email address. // Translators: connected user's email address. (0,r.__)("Connected as %s","newspack-plugin"),p?.email):(0,r.__)("Not connected","newspack-plugin"),isChecked:d,actionText:(0,l.jsx)(i.$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},6837:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(5135),o=n(790);const i=/^(1|828|930)$/.test(n.j)?({description:e,error:t,isChecked:n,notificationLevel:i="error",children:a,...s})=>{let c;return void 0!==n&&(c=n?"checked":"unchecked"),(0,o.jsx)(r.Lz,{description:e,checkbox:c,notification:t,notificationLevel:i,...s,children:a})}:null},8075:(e,t,n)=>{"use strict";var r=n(453),o=n(487),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},487:(e,t,n)=>{"use strict";var r=n(6743),o=n(453),i=n(6897),a=n(9675),s=o("%Function.prototype.apply%"),c=o("%Function.prototype.call%"),l=o("%Reflect.apply%",!0)||r.call(c,s),u=n(655),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=l(r,c,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return l(r,s,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},41:(e,t,n)=>{"use strict";var r=n(655),o=n(8068),i=n(9675),a=n(5795);e.exports=function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],p=!!a&&a(e,t);if(r)r(e,t,{configurable:null===l&&p?p.configurable:!l,enumerable:null===s&&p?p.enumerable:!s,value:n,writable:null===c&&p?p.writable:!c});else{if(!u&&(s||c||l))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},655:(e,t,n)=>{"use strict";var r=n(453)("%Object.defineProperty%",!0)||!1;if(r)try{r({},"a",{value:1})}catch(e){r=!1}e.exports=r},1237:e=>{"use strict";e.exports=EvalError},9383:e=>{"use strict";e.exports=Error},9290:e=>{"use strict";e.exports=RangeError},9538:e=>{"use strict";e.exports=ReferenceError},8068:e=>{"use strict";e.exports=SyntaxError},9675:e=>{"use strict";e.exports=TypeError},5345:e=>{"use strict";e.exports=URIError},9353:e=>{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r{"use strict";var r=n(9353);e.exports=Function.prototype.bind||r},453:(e,t,n)=>{"use strict";var r,o=n(9383),i=n(1237),a=n(9290),s=n(9538),c=n(8068),l=n(9675),u=n(5345),p=Function,d=function(e){try{return p('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var h=function(){throw new l},g=f?function(){try{return h}catch(e){try{return f(arguments,"callee").get}catch(e){return h}}}():h,y=n(4039)(),v=n(24)(),m=Object.getPrototypeOf||(v?function(e){return e.__proto__}:null),w={},b="undefined"!=typeof Uint8Array&&m?m(Uint8Array):r,x={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":y&&m?m([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":w,"%AsyncGenerator%":w,"%AsyncGeneratorFunction%":w,"%AsyncIteratorPrototype%":w,"%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%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":w,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":y&&m?m(m([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&y&&m?m((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&y&&m?m((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":y&&m?m(""[Symbol.iterator]()):r,"%Symbol%":y?Symbol:r,"%SyntaxError%":c,"%ThrowTypeError%":g,"%TypedArray%":b,"%TypeError%":l,"%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%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(m)try{null.error}catch(e){var _=m(m(e));x["%Error.prototype%"]=_}var j=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&m&&(n=m(o.prototype))}return x[t]=n,n},k={__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"]},S=n(6743),A=n(9957),P=S.call(Function.call,Array.prototype.concat),C=S.call(Function.apply,Array.prototype.splice),O=S.call(Function.call,String.prototype.replace),E=S.call(Function.call,String.prototype.slice),N=S.call(Function.call,RegExp.prototype.exec),I=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,L=function(e,t){var n,r=e;if(A(k,r)&&(r="%"+(n=k[r])[0]+"%"),A(x,r)){var o=x[r];if(o===w&&(o=j(r)),void 0===o&&!t)throw new l("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new c("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new l('"allowMissing" argument must be a boolean');if(null===N(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=E(e,0,1),n=E(e,-1);if("%"===t&&"%"!==n)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return O(e,I,(function(e,t,n,o){r[r.length]=n?O(o,T,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=L("%"+r+"%",t),i=o.name,a=o.value,s=!1,u=o.alias;u&&(r=u[0],C(n,P([0,1],u)));for(var p=1,d=!0;p=n.length){var v=f(a,h);a=(d=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:a[h]}else d=A(a,h),a=a[h];d&&!s&&(x[i]=a)}}return a}},5795:(e,t,n)=>{"use strict";var r=n(453)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},592:(e,t,n)=>{"use strict";var r=n(655),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},24:e=>{"use strict";var t={__proto__:null,foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof 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()}},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(t 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 r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9957:(e,t,n)=>{"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=n(6743);e.exports=i.call(r,o)},4146:(e,t,n)=>{"use strict";var r=n(3404),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;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 a=u(n);p&&(a=a.concat(p(n)));for(var s=c(t),g=c(n),y=0;y{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=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 i:case s:case a: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=i,t.Lazy=y,t.Memo=g,t.Portal=o,t.Profiler=s,t.StrictMode=a,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)===i},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)===a},t.isSuspense=function(e){return x(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===p||e===s||e===a||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},3404:(e,t,n)=>{"use strict";e.exports=n(3072)},5580:(e,t,n)=>{var r=n(6110)(n(9325),"DataView");e.exports=r},1549:(e,t,n)=>{var r=n(2032),o=n(3862),i=n(6721),a=n(2749),s=n(5749);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(3702),o=n(80),i=n(4739),a=n(8655),s=n(1175);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(6110)(n(9325),"Map");e.exports=r},3661:(e,t,n)=>{var r=n(3040),o=n(7670),i=n(289),a=n(4509),s=n(2949);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(6110)(n(9325),"Promise");e.exports=r},6545:(e,t,n)=>{var r=n(6110)(n(9325),"Set");e.exports=r},8859:(e,t,n)=>{var r=n(3661),o=n(1380),i=n(1459);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t{var r=n(79),o=n(1420),i=n(938),a=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=i,l.prototype.get=a,l.prototype.has=s,l.prototype.set=c,e.exports=l},1873:(e,t,n)=>{var r=n(9325).Symbol;e.exports=r},7828:(e,t,n)=>{var r=n(9325).Uint8Array;e.exports=r},8303:(e,t,n)=>{var r=n(6110)(n(9325),"WeakMap");e.exports=r},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)}},9770:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n{var r=n(8096),o=n(2428),i=n(6449),a=n(3656),s=n(361),c=n(7167),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),u=!n&&o(e),p=!n&&!u&&a(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}},4932:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n{e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++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)}},6547:(e,t,n)=>{var r=n(3360),o=n(5288),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},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}},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}},9344:(e,t,n)=>{var r=n(3805),o=Object.create,i=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=i},909:(e,t,n)=>{var r=n(641),o=n(8329)(r);e.exports=o},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}},2523:e=>{e.exports=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i{var r=n(3221)();e.exports=r},641:(e,t,n)=>{var r=n(6649),o=n(5950);e.exports=function(e,t){return e&&r(e,t,o)}},7422:(e,t,n)=>{var r=n(1769),o=n(7797);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n{var r=n(4528),o=n(6449);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},2552:(e,t,n)=>{var r=n(1873),o=n(659),i=n(9350),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},8077:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},7534:(e,t,n)=>{var r=n(2552),o=n(346);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},270:(e,t,n)=>{var r=n(7068),o=n(346);e.exports=function e(t,n,i,a,s){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,s))}},7068:(e,t,n)=>{var r=n(7217),o=n(5911),i=n(1986),a=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,j=(x=x==p?f:x)==f,k=b==x;if(k&&l(e)){if(!l(t))return!1;m=!0,_=!1}if(k&&!_)return v||(v=new r),m||u(e)?o(e,t,n,g,y,v):i(e,t,b,n,g,y,v);if(!(1&n)){var S=_&&h.call(e,"__wrapped__"),A=j&&h.call(t,"__wrapped__");if(S||A){var P=S?e.value():e,C=A?t.value():t;return v||(v=new r),y(P,C,n,g,v)}}return!!k&&(v||(v=new r),a(e,t,n,g,y,v))}},1799:(e,t,n)=>{var r=n(7217),o=n(270);e.exports=function(e,t,n,i){var a=n.length,s=a,c=!i;if(null==e)return!s;for(e=Object(e);a--;){var l=n[a];if(c&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a{var r=n(1882),o=n(7296),i=n(3805),a=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!(!i(e)||o(e))&&(r(e)?d:s).test(a(e))}},4901:(e,t,n)=>{var r=n(2552),o=n(294),i=n(346),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},5389:(e,t,n)=>{var r=n(3663),o=n(7978),i=n(3488),a=n(6449),s=n(583);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):s(e)}},8984:(e,t,n)=>{var r=n(5527),o=n(3650),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},2903:(e,t,n)=>{var r=n(3805),o=n(5527),i=n(181),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},3663:(e,t,n)=>{var r=n(1799),o=n(776),i=n(7197);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},7978:(e,t,n)=>{var r=n(270),o=n(8156),i=n(631),a=n(8586),s=n(756),c=n(7197),l=n(7797);e.exports=function(e,t){return a(e)&&s(t)?c(l(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,3)}}},5250:(e,t,n)=>{var r=n(7217),o=n(7805),i=n(6649),a=n(2824),s=n(3805),c=n(7241),l=n(4974);e.exports=function e(t,n,u,p,d){t!==n&&i(n,(function(i,c){if(d||(d=new r),s(i))a(t,n,c,u,e,p,d);else{var f=p?p(l(t,c),i,c+"",t,n,d):void 0;void 0===f&&(f=i),o(t,c,f)}}),c)}},2824:(e,t,n)=>{var r=n(7805),o=n(3290),i=n(1961),a=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),j=y(t,n),k=x.get(j);if(k)r(e,n,k);else{var S=b?b(_,j,n+"",e,t,x):void 0,A=void 0===S;if(A){var P=l(j),C=!P&&p(j),O=!P&&!C&&g(j);S=j,P||C||O?l(_)?S=_:u(_)?S=a(_):C?(A=!1,S=o(j,!0)):O?(A=!1,S=i(j,!0)):S=[]:h(j)||c(j)?(S=_,c(_)?S=v(_):f(_)&&!d(_)||(S=s(j))):A=!1}A&&(x.set(j,S),w(S,j,m,b,x),x.delete(j)),r(e,n,S)}}},7237:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},7255:(e,t,n)=>{var r=n(7422);e.exports=function(e){return function(t){return r(t,e)}}},9302:(e,t,n)=>{var r=n(3488),o=n(6757),i=n(2865);e.exports=function(e,t){return i(o(e,t,r),e+"")}},3170:(e,t,n)=>{var r=n(6547),o=n(1769),i=n(361),a=n(3805),s=n(7797);e.exports=function(e,t,n,c){if(!a(e))return e;for(var l=-1,u=(t=o(t,e)).length,p=u-1,d=e;null!=d&&++l{var r=n(7334),o=n(3243),i=n(3488),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=a},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 i=Array(o);++r{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}},8096:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n{var r=n(1873),o=n(4932),i=n(6449),a=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(i(t))return o(t,e)+"";if(a(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},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}},7301:e=>{e.exports=function(e){return function(t){return e(t)}}},514:(e,t,n)=>{var r=n(4932);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},9219:e=>{e.exports=function(e,t){return e.has(t)}},1769:(e,t,n)=>{var r=n(6449),o=n(8586),i=n(1802),a=n(3222);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},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}},3290:(e,t,n)=>{e=n.nmd(e);var r=n(9325),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,s=a?a.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}},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)}},3007:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n{var r=n(6547),o=n(3360);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var s=-1,c=t.length;++s{var r=n(9325)["__core-js_shared__"];e.exports=r},999:(e,t,n)=>{var r=n(9302),o=n(6800);e.exports=function(e){return r((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++r{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 i=n.length,a=t?i:-1,s=Object(n);(t?a--:++a{e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var c=a[e?s:++o];if(!1===n(i[c],c,i))break}return t}}},2006:(e,t,n)=>{var r=n(5389),o=n(4894),i=n(5950);e.exports=function(e){return function(t,n,a){var s=Object(t);if(!o(t)){var c=r(n,3);t=i(t),n=function(e){return c(s[e],e,s)}}var l=e(t,n,a);return l>-1?s[c?t[l]:l]:void 0}}},3243:(e,t,n)=>{var r=n(6110),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},5911:(e,t,n)=>{var r=n(8859),o=n(4248),i=n(9219);e.exports=function(e,t,n,a,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{var r=n(1873),o=n(7828),i=n(5288),a=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 i(+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=a(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}},689:(e,t,n)=>{var r=n(2),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,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{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},2:(e,t,n)=>{var r=n(2199),o=n(4664),i=n(5950);e.exports=function(e){return r(e,i,o)}},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}},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 i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}},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}},8879:(e,t,n)=>{var r=n(4335)(Object.getPrototypeOf,Object);e.exports=r},659:(e,t,n)=>{var r=n(1873),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}},4664:(e,t,n)=>{var r=n(9770),o=n(3345),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=s},5861:(e,t,n)=>{var r=n(5580),o=n(8223),i=n(2804),a=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(i),m=l(a),w=l(s),b=c;(r&&b(new r(new ArrayBuffer(1)))!=h||o&&b(new o)!=u||i&&b(i.resolve())!=p||a&&b(new a)!=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},392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},9326:(e,t,n)=>{var r=n(1769),o=n(2428),i=n(6449),a=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{var r=n(1042);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},3862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},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}},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)}},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}},5529:(e,t,n)=>{var r=n(9344),o=n(8879),i=n(5527);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(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{var r=n(5288),o=n(4894),i=n(361),a=n(3805);e.exports=function(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?o(n)&&i(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},8586:(e,t,n)=>{var r=n(6449),o=n(4394),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\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))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}},4218:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},7296:(e,t,n)=>{var r,o=n(5481),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},5527:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},756:(e,t,n)=>{var r=n(3805);e.exports=function(e){return e==e&&!r(e)}},3702:e=>{e.exports=function(){this.__data__=[],this.size=0}},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))}},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]}},8655:(e,t,n)=>{var r=n(6025);e.exports=function(e){return r(this.__data__,e)>-1}},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}},3040:(e,t,n)=>{var r=n(1549),o=n(79),i=n(8223);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},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}},289:(e,t,n)=>{var r=n(2651);e.exports=function(e){return r(this,e).get(e)}},4509:(e,t,n)=>{var r=n(2651);e.exports=function(e){return r(this,e).has(e)}},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}},317:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},7197:e=>{e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},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}},1042:(e,t,n)=>{var r=n(6110)(Object,"create");e.exports=r},3650:(e,t,n)=>{var r=n(4335)(Object.keys,Object);e.exports=r},181:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},6009:(e,t,n)=>{e=n.nmd(e);var r=n(4840),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,s=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},9350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},4335:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},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 i=arguments,a=-1,s=o(i.length-t,0),c=Array(s);++a{var r=n(4840),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},4974:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},1380:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1459:e=>{e.exports=function(e){return this.__data__.has(e)}},4247:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},2865:(e,t,n)=>{var r=n(9570),o=n(1811)(r);e.exports=o},1811:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var o=t(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},1420:(e,t,n)=>{var r=n(79);e.exports=function(){this.__data__=new r,this.size=0}},938:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},3605:e=>{e.exports=function(e){return this.__data__.get(e)}},9817:e=>{e.exports=function(e){return this.__data__.has(e)}},945:(e,t,n)=>{var r=n(79),o=n(8223),i=n(3661);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},1802:(e,t,n)=>{var r=n(2224),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=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(i,"$1"):n||e)})),t}));e.exports=a},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}},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""}},1800:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},6139:(e,t,n)=>{var r=n(6547),o=n(1791),i=n(999),a=n(4894),s=n(5527),c=n(5950),l=Object.prototype.hasOwnProperty,u=i((function(e,t){if(s(t)||a(t))o(t,c(t),e);else for(var n in t)l.call(t,n)&&r(e,n,t[n])}));e.exports=u},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}}},7334:e=>{e.exports=function(e){return function(){return e}}},8221:(e,t,n)=>{var r=n(3805),o=n(124),i=n(9374),a=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=i(t)||0,r(n)&&(g=!!n.leading,u=(y="maxWait"in n)?a(i(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())},_}},5288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},7612:(e,t,n)=>{var r=n(9770),o=n(6574),i=n(5389),a=n(6449);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},7309:(e,t,n)=>{var r=n(2006)(n(4713));e.exports=r},4713:(e,t,n)=>{var r=n(2523),o=n(5389),i=n(1489),a=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var c=null==n?0:i(n);return c<0&&(c=a(s+c,0)),r(e,o(t,3),c)}},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}},631:(e,t,n)=>{var r=n(8077),o=n(9326);e.exports=function(e,t){return null!=e&&o(e,t,r)}},3488:e=>{e.exports=function(e){return e}},2428:(e,t,n)=>{var r=n(7534),o=n(346),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=c},6449:e=>{var t=Array.isArray;e.exports=t},4894:(e,t,n)=>{var r=n(1882),o=n(294);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},3693:(e,t,n)=>{var r=n(4894),o=n(346);e.exports=function(e){return o(e)&&r(e)}},3656:(e,t,n)=>{e=n.nmd(e);var r=n(9325),o=n(9935),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||o;e.exports=c},2193:(e,t,n)=>{var r=n(8984),o=n(5861),i=n(2428),a=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)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||c(e)||u(e)||i(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}},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}},294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},1331:(e,t,n)=>{var r=n(2552),o=n(8879),i=n(346),a=Function.prototype,s=Object.prototype,c=a.toString,l=s.hasOwnProperty,u=c.call(Object);e.exports=function(e){if(!i(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}},5015:(e,t,n)=>{var r=n(2552),o=n(6449),i=n(346);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},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)}},7167:(e,t,n)=>{var r=n(4901),o=n(7301),i=n(6009),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},5950:(e,t,n)=>{var r=n(695),o=n(8984),i=n(4894);e.exports=function(e){return i(e)?r(e):o(e)}},7241:(e,t,n)=>{var r=n(695),o=n(2903),i=n(4894);e.exports=function(e){return i(e)?r(e,!0):o(e)}},3916:(e,t,n)=>{var r=n(3360),o=n(641),i=n(5389);e.exports=function(e,t){var n={};return t=i(t,3),o(e,(function(e,o,i){r(n,o,t(e,o,i))})),n}},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],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},6924:(e,t,n)=>{var r=n(5250),o=n(999)((function(e,t,n,o){r(e,t,n,o)}));e.exports=o},124:(e,t,n)=>{var r=n(9325);e.exports=function(){return r.Date.now()}},8059:(e,t,n)=>{var r=n(2177);e.exports=function(e){return r(2,e)}},583:(e,t,n)=>{var r=n(7237),o=n(7255),i=n(8586),a=n(7797);e.exports=function(e){return i(e)?r(a(e)):o(e)}},3560:(e,t,n)=>{var r=n(3170);e.exports=function(e,t,n){return null==e?e:r(e,t,n)}},2426:(e,t,n)=>{var r=n(4248),o=n(5389),i=n(916),a=n(6449),s=n(6800);e.exports=function(e,t,n){var c=a(e)?r:i;return n&&s(e,t,n)&&(t=void 0),c(e,o(t,3))}},3345:e=>{e.exports=function(){return[]}},9935:e=>{e.exports=function(){return!1}},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}},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}},9374:(e,t,n)=>{var r=n(4128),o=n(3805),i=n(4394),a=/^[-+]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(i(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):a.test(e)?NaN:+e}},9884:(e,t,n)=>{var r=n(1791),o=n(7241);e.exports=function(e){return r(e,o(e))}},3222:(e,t,n)=>{var r=n(7556);e.exports=function(e){return null==e?"":r(e)}},5880:(e,t,n)=>{var r=n(514),o=n(5950);e.exports=function(e){return null==e?[]:r(e,o(e))}},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"}},1240:(e,t,n)=>{var r="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"==typeof o.get?o.get:null,a=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=s&&c&&"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,j=Array.prototype.concat,k=Array.prototype.join,S=Array.prototype.slice,A=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,C=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,I=Object.prototype.propertyIsEnumerable,T=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function L(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),i=m.call(t,o.length+1);return w.call(o,n,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(t,n,"$&_")}var R=n(2634),M=R.custom,F=U(M)?M:null;function D(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function $(e){return w.call(String(e),/"/g,""")}function z(e){return!("[object Array]"!==W(e)||N&&"object"==typeof e&&N in e)}function B(e){return!("[object RegExp]"!==W(e)||N&&"object"==typeof e&&N in e)}function U(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(H(c,"quoteStyle")&&"single"!==c.quoteStyle&&"double"!==c.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(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=!H(c,"customInspect")||c.customInspect;if("boolean"!=typeof g&&"symbol"!==g)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(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(H(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 G(t,c);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var _=String(t);return b?L(t,_):_}if("bigint"==typeof t){var A=String(t)+"n";return b?L(t,A):A}var C=void 0===c.depth?5:c.depth;if(void 0===o&&(o=0),o>=C&&C>0&&"object"==typeof t)return z(t)?"[Array]":"[Object]";var M,V=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=k.call(Array(e.indent+1)," ")}return{base:n,prev:k.call(Array(t+1),n)}}(c,o);if(void 0===s)s=[];else if(q(s,t)>=0)return"[Circular]";function K(t,n,r){if(n&&(s=S.call(s)).push(n),r){var i={depth:c.depth};return H(c,"quoteStyle")&&(i.quoteStyle=c.quoteStyle),e(t,i,o+1,s)}return e(t,c,o+1,s)}if("function"==typeof t&&!B(t)){var ee=function(e){if(e.name)return e.name;var t=v.call(y.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),te=X(t,K);return"[Function"+(ee?": "+ee:" (anonymous)")+"]"+(te.length>0?" { "+k.call(te,", ")+" }":"")}if(U(t)){var ne=E?w.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(t);return"object"!=typeof t||E?ne:Q(ne)}if((M=t)&&"object"==typeof M&&("undefined"!=typeof HTMLElement&&M instanceof HTMLElement||"string"==typeof M.nodeName&&"function"==typeof M.getAttribute)){for(var re="<"+x.call(String(t.nodeName)),oe=t.attributes||[],ie=0;ie"}if(z(t)){if(0===t.length)return"[]";var ae=X(t,K);return V&&!function(e){for(var t=0;t=0)return!1;return!0}(ae)?"["+Y(ae,V)+"]":"[ "+k.call(ae,", ")+" ]"}if(function(e){return!("[object Error]"!==W(e)||N&&"object"==typeof e&&N in e)}(t)){var se=X(t,K);return"cause"in Error.prototype||!("cause"in t)||I.call(t,"cause")?0===se.length?"["+String(t)+"]":"{ ["+String(t)+"] "+k.call(se,", ")+" }":"{ ["+String(t)+"] "+k.call(j.call("[cause]: "+K(t.cause),se),", ")+" }"}if("object"==typeof t&&g){if(F&&"function"==typeof t[F]&&R)return R(t,{depth:C-o});if("symbol"!==g&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{l.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ce=[];return a&&a.call(t,(function(e,n){ce.push(K(n,t,!0)+" => "+K(e,t))})),Z("Map",i.call(t),ce,V)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var le=[];return u&&u.call(t,(function(e){le.push(K(e,t))})),Z("Set",l.call(t),le,V)}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 J("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 J("WeakSet");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{return f.call(e),!0}catch(e){}return!1}(t))return J("WeakRef");if(function(e){return!("[object Number]"!==W(e)||N&&"object"==typeof e&&N in e)}(t))return Q(K(Number(t)));if(function(e){if(!e||"object"!=typeof e||!P)return!1;try{return P.call(e),!0}catch(e){}return!1}(t))return Q(K(P.call(t)));if(function(e){return!("[object Boolean]"!==W(e)||N&&"object"==typeof e&&N in e)}(t))return Q(h.call(t));if(function(e){return!("[object String]"!==W(e)||N&&"object"==typeof e&&N in e)}(t))return Q(K(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===n.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==W(e)||N&&"object"==typeof e&&N in e)}(t)&&!B(t)){var ue=X(t,K),pe=T?T(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",fe=!pe&&N&&Object(t)===t&&N in t?m.call(W(t),8,-1):de?"Object":"",he=(pe||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||de?"["+k.call(j.call([],fe||[],de||[]),": ")+"] ":"");return 0===ue.length?he+"{}":V?he+"{"+Y(ue,V)+"}":he+"{ "+k.call(ue,", ")+" }"}return String(t)};var V=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return V.call(e,t)}function W(e){return g.call(e)}function q(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return G(m.call(e,0,t.maxStringLength),t)+r}return D(w.call(w.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",t)}function K(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 Q(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function Z(e,t,n,r){return e+" ("+t+") {"+(r?Y(n,r):k.call(n,", "))+"}"}function Y(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+k.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=z(e),r=[];if(n){r.length=e.length;for(var o=0;o{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{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},2694:(e,t,n)=>{"use strict";var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==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:i,resetWarningCache:o};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},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}},5373:(e,t,n)=>{"use strict";var r=n(8636),o=n(2642),i=n(4765);e.exports={formats:i,parse:o,stringify:r}},2642:(e,t,n)=>{"use strict";var r=n(7720),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={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},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(i),l=s?i.slice(0,s.index):i,u=[];if(l){if(!n.plainObjects&&o.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var p=0;n.depth>0&&null!==(s=a.exec(i))&&p=0;--i){var a,s=e[i];if("[]"===s&&n.parseArrays)a=n.allowEmptyArrays&&(""===o||n.strictNullHandling&&null===o)?[]:[].concat(o);else{a=n.plainObjects?{__proto__:null}:{};var l="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,p=parseInt(u,10);n.parseArrays||""!==u?!isNaN(p)&&s!==u&&String(p)===u&&p>=0&&n.parseArrays&&p<=n.arrayLimit?(a=[])[p]=o:"__proto__"!==u&&(a[u]=o):a={0:o}}o=a}return o}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;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");var t=void 0===e.charset?a.charset:e.charset,n=void 0===e.duplicates?a.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||a.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:a.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,duplicates:n,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:a.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(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,p=t.parameterLimit===1/0?void 0:t.parameterLimit,d=l.split(t.delimiter,p),f=-1,h=t.charset;if(t.charsetSentinel)for(u=0;u-1&&(y=i(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}(e,n):e,p=n.plainObjects?{__proto__:null}:{},d=Object.keys(u),f=0;f{"use strict";var r=n(920),o=n(7720),i=n(4765),a=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=i.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:i.formatters[d],indices:!1,serializeDate:function(e){return p.call(e)},skipNulls:!1,strictNullHandling:!1},h={},g=function e(t,n,i,a,s,l,p,d,g,y,v,m,w,b,x,_,j,k){for(var S,A=t,P=k,C=0,O=!1;void 0!==(P=P.get(h))&&!O;){var E=P.get(t);if(C+=1,void 0!==E){if(E===C)throw new RangeError("Cyclic object value");O=!0}void 0===P.get(h)&&(C=0)}if("function"==typeof y?A=y(n,A):A instanceof Date?A=w(A):"comma"===i&&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,j,"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,j,"key",b))+"="+x(g(A,f.encoder,j,"value",b))]:[x(n)+"="+x(String(A))];var N,I=[];if(void 0===A)return I;if("comma"===i&&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 T=Object.keys(A);N=v?T.sort(v):T}var L=d?String(n).replace(/\./g,"%2E"):String(n),R=a&&c(A)&&1===A.length?L+"[]":L;if(s&&c(A)&&0===A.length)return R+"[]";for(var M=0;M0?x+b:""}},7720:(e,t,n)=>{"use strict";var r=n(4765),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=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;r1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],o=0;o=c?s.slice(u,u+c):s,d=[],f=0;f=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||i===r.RFC1738&&(40===h||41===h)?d[d.length]=p.charAt(f):h<128?d[d.length]=a[h]:h<2048?d[d.length]=a[192|h>>6]+a[128|63&h]:h<55296||h>=57344?d[d.length]=a[224|h>>12]+a[128|h>>6&63]+a[128|63&h]:(f+=1,h=65536+((1023&h)<<10|1023&p.charCodeAt(f)),d[d.length]=a[240|h>>18]+a[128|h>>12&63]+a[128|h>>6&63]+a[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(i(e)){for(var n=[],r=0;r{"use strict";n.r(t),n.d(t,{BrowserRouter:()=>ye,HashRouter:()=>ve,Link:()=>je,MemoryRouter:()=>H,NavLink:()=>Ae,Prompt:()=>q,Redirect:()=>Z,Route:()=>ne,Router:()=>V,StaticRouter:()=>ce,Switch:()=>le,generatePath:()=>J,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 i=n(1609),a=n.n(i),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(),i=n.valueOf();if(o!==t||i!==n)return e(o,i);var a=Object.keys(t),s=Object.keys(n);return a.length===s.length&&a.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 i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{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 i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}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=0?t:0)+"#"+e)}function N(e,t,n){return Math.min(Math.max(e,t),n)}var I=n(5302),T=n.n(I);function L(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(7564);var R=n(4146),M=n.n(R),F=1073741823,D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},$=a().createContext||function(e,t){var n,r,i,s="__create-react-context-"+((D[i="__global_unique_id__"]=(D[i]||0)+1)+"__"),l=function(e){function n(){for(var t,n,r,o=arguments.length,i=new Array(o),a=0;at?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{"use strict";var n="function"==typeof Symbol&&Symbol.for;n&&Symbol.for("react.element"),n&&Symbol.for("react.portal"),n&&Symbol.for("react.fragment"),n&&Symbol.for("react.strict_mode"),n&&Symbol.for("react.profiler"),n&&Symbol.for("react.provider"),n&&Symbol.for("react.context"),n&&Symbol.for("react.async_mode"),n&&Symbol.for("react.concurrent_mode"),n&&Symbol.for("react.forward_ref"),n&&Symbol.for("react.suspense"),n&&Symbol.for("react.suspense_list"),n&&Symbol.for("react.memo"),n&&Symbol.for("react.lazy"),n&&Symbol.for("react.block"),n&&Symbol.for("react.fundamental"),n&&Symbol.for("react.responder"),n&&Symbol.for("react.scope")},7564:(e,t,n)=>{"use strict";n(4912)},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;ri});const i=/^(8(28|4|41)|[46]06|1|498|930)$/.test(n.j)?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e&&e.split("/")||[],i=t&&t.split("/")||[],a=e&&r(e),s=t&&r(t),c=a||s;if(e&&r(e)?i=n:n.length&&(i.pop(),i=i.concat(n)),!i.length)return"/";var l=void 0;if(i.length){var u=i[i.length-1];l="."===u||".."===u||""===u}else l=!1;for(var p=0,d=i.length;d>=0;d--){var f=i[d];"."===f?o(i,d):".."===f?(o(i,d),p++):p&&(o(i,d),p--)}if(!c)for(;p--;p)i.unshift("..");!c||""===i[0]||i[0]&&r(i[0])||i.unshift("");var h=i.join("/");return l&&"/"!==h.substr(-1)&&(h+="/"),h}:null},6897:(e,t,n)=>{"use strict";var r=n(453),o=n(41),i=n(592)(),a=n(5795),s=n(9675),c=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||c(t)!==t)throw new s("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,l=!0;if("length"in e&&a){var u=a(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(l=!1)}return(r||l||!n)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},920:(e,t,n)=>{"use strict";var r=n(453),o=n(8075),i=n(1240),a=n(9675),s=r("%WeakMap%",!0),c=r("%Map%",!0),l=o("WeakMap.prototype.get",!0),u=o("WeakMap.prototype.set",!0),p=o("WeakMap.prototype.has",!0),d=o("Map.prototype.get",!0),f=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),g=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+i(e))},get:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(e)return l(e,r)}else if(c){if(t)return d(t,r)}else if(n)return function(e,t){var n=g(e,t);return n&&n.value}(n,r)},has:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(e)return p(e,r)}else if(c){if(t)return h(t,r)}else if(n)return function(e,t){return!!g(e,t)}(n,r);return!1},set:function(r,o){s&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new s),u(e,r,o)):c?(t||(t=new c),f(t,r,o)):(n||(n={key:{},next:null}),function(e,t,n){var r=g(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,o))}};return r}},2634:()=>{},6942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;tr})},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})},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 i=e.length;for(t=0;to});const o=/^(617|740)$/.test(n.j)?function(){for(var e,t,n=0,o="",i=arguments.length;n{"use strict";n.d(t,{A:()=>i});var r=!!/^(8(28|4|41)|[46]06|1|498|930)$/.test(n.j)||null,o="Invariant failed";function i(e,t){if(!e){if(r)throw new Error(o);var n="function"==typeof t?t():t,i=n?"".concat(o,": ").concat(n):o;throw new Error(i)}}}}]);