__("Featured image generation costs %d requests per image. You don't have enough requests to generate another image.","jetpack"),$):null,_e=(0,k.jsx)(s.Button,{onClick:fe,variant:"primary",disabled:!ne?.image||ne?.generating||ne?.libraryId===A,children:__("Set as featured image","jetpack")});return(0,k.jsxs)(k.Fragment,{children:[(r===d.s6||r===d.wb)&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("p",{className:"jetpack-ai-assistant__help-text",children:__("Based on your post content.","jetpack")}),(0,k.jsx)(s.Button,{onClick:ce,isBusy:e,disabled:t||J,variant:"secondary",__next40pxDefaultSize:!0,children:__("Generate image","jetpack")})]}),(0,k.jsx)(g.A,{autoStart:ke&&!A,autoStartAction:pe,images:oe,currentIndex:Q,title:__("Generate a featured image with AI","jetpack"),cost:$,open:u,placement:r,onClose:le,onTryAgain:me,onGenerate:Y?.current>0||A?he:de,generating:se?.generating,notEnoughRequests:J,requireUpgrade:z,upgradeDescription:we,currentLimit:H,currentUsage:U,isUnlimited:Z,hasError:Boolean(se?.error),handlePreviousImage:te,handleNextImage:re,acceptButton:_e,generateButtonLabel:Y?.current>0?be:ve,instructionsPlaceholder:__("Describe the featured image you'd like to create and select a style.","jetpack"),imageStyles:ae,onGuessStyle:ue,prompt:I,setPrompt:M,initialStyle:B,inputDisabled:xe,actionDisabled:je})]})}},83158:(e,t,r)=>{"use strict";r(85985),r(56427),r(86087),r(27723);varn=r(10067),s=r.n(n);r(72448),r(71508),r(62038),r(96390),r(3620),r(35918),r(10790);s()("jetpack-ai:general-purpose-image")},3620:(e,t,r)=>{"use strict";r.d(t,{A:()=>p});varn=r(47143),s=r(86087),o=r(27723),a=r(93832),i=r(31439),l=r(72448),c=r(62614),u=r(62038),d=r(75988);const__=o.__;functionp({feature:e,type:t,cost:r,autoStart:o=!0,previousMediaId:p}){const{generateImageWithParameters:h}=(0,c.Ay)(),{increaseRequestsCount:m,featuresControl:g}=(0,l.A)(),{saveToMediaLibrary:f}=(0,u.A)(),{createNotice:b}=(0,n.useDispatch)("core/notices"),v=(0,s.useRef)(0),[k,y]=(0,s.useState)(0),[x,j]=(0,s.useState)([{generating:o}]),w=e===d.oW?"featured-image":"image",_=g?.[w],C=_?.styles,A=(0,s.useCallback)(((e,t)=>{j((r=>{constn=[...r];returnn[t]={...n[t],...e},n}))}),[]),S=(0,n.useSelect)((e=>e("core")?.getMedia?.(p)),[p]);(0,s.useEffect)((()=>{S&&A({image:S.source_url,libraryId:S.id,libraryUrl:S.source_url,generating:!1},v.current)}),[S,A]);constE=(0,s.useCallback)((e=>{b("success",e,{type:"snackbar",isDismissible:!0})}),[b]),N=(0,s.useCallback)((()=>{m(r)}),[m,r]),T=(0,s.useCallback)((e=>{if(!e)return"image.png";constt=e.split(" ").slice(0,10).join(" ");return(0,a.cleanForSlug)(t)+".png"}),[]),B=(0,s.useCallback)((({userPrompt:r,postContent:n,notEnoughRequests:s,style:o=null})=>newPromise(((a,i)=>{if(p&&0===v.current&&v.current++,A({generating:!0,error:null},v.current),s)returnA({generating:!1,error:newError(__("You don't have enough requests to generate another image.","jetpack"))},v.current),voida({});constl=h({feature:e,size:"1792x1024",responseFormat:"b64_json",messages:[{role:"jetpack-ai",context:{type:t,request:r||null,content:n,style:o}}],style:o||""}),c=T(r);l.then((e=>{if(e.data.length>0){constt="data:image/png;base64,"+e.data[0].b64_json,n=r||null,s=e.data[0].revised_prompt||null;A({image:t,prompt:n,revisedPrompt:s},v.current),N(),f(t,c).then((e=>{E(__("Image saved to media library.","jetpack")),A({libraryId:e?.id,libraryUrl:e?.url,generating:!1},v.current),v.current+=1,a({image:t,libraryId:e?.id,libraryUrl:e?.url,revisedPrompt:s})})).catch((()=>{A({generating:!1},v.current),v.current+=1,a({image:t})}))}})).catch((e=>{A({generating:!1,error:e},v.current),i(e)}))}))),[A,h,e,t,N,f,E,T,p]),P=(0,s.useCallback)((()=>{y(Math.max(k-1,0))}),[k]),I=(0,s.useCallback)((()=>{y(Math.min(k+1,x.length-1))}),[k,x.length]),M=(0,s.useCallback)((asyncfunction(e,t="",r=""){if(!C||!C.length)returnnull;constn=[{role:"jetpack-ai",context:{type:t||"general-image-guess-style",request:e,content:r}}];try{conste=await(0,i.A)(n,{feature:"jetpack-ai-image-generator"});if(!e)returnnull;constt=C.find((({value:t})=>t===e));returnt?t.value:null}catch(e){Promise.rej
__("You have %1$d requests remaining.","jetpack"),e)}),(0,p.jsx)(n.Button,{variant:"link",onClick:r,href:s,target:s?"_blank":null,children:(0,p.jsx)("span",{children:__("Upgrade now","jetpack")})})]})}functionw({error:e,code:t,onTryAgainClick:r,onUpgradeClick:s,upgradeUrl:a}){consti=e||__("Something went wrong","jetpack");return(0,p.jsxs)(v,{severity:m,children:[(0,p.jsx)("span",{children:(0,o.sprintf)(
constr=__("Requests will reset on %s.","jetpack");return`${t}${(0,l.sprintf)(r,e)}`})((e=>{if(!e?.nextStart)returnnull;constt=newDate(e.nextStart);returnt.toLocaleString("default",{month:"long"})+" "+t.getDate()})(e));return(0,i.createInterpolateElement)(t,{link:(0,m.jsx)("a",{href:"https://jetpack.com/redirect/?source=ai-assistant-fair-usage-policy",target:"_blank",rel:"noreferrer"}),span:(0,m.jsx)("span",{})})})();return"muted"===e?(0,m.jsx)("span",{className:"jetpack-ai-fair-usage-notice-muted-variant",children:t}):"error"===e?(0,m.jsx)(a.Notice,{status:"error",isDismissible:!1,className:"jetpack-ai-fair-usage-notice",children:t}):null},b=e=>{const{upgradeType:t,currentTier:r}=(0,p.A)();return1===r?.value?(0,m.jsx)(f,{}):"vip"===t?(({description:e=null,useLightNudge:t=!1})=>{constr=t?h.U:o.cb,n=(0,i.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. <strong>Please reach out to your VIP account team.</strong>","jetpack"),{strong:(0,m.jsx)("strong",{})});return(0,m.jsx)(r,{buttonText:null,checkoutUrl:null,className:"jetpack-ai-upgrade-banner",description:e||n,goToCheckoutPage:null,isRedirecting:null,visible:!0,align:null,title:null,context:null})})({description:e.description,useLightNudge:e?.useLightNudge}):(({placement:e=null,description:t=null,useLightNudge:r=!1})=>{consta=r?h.U:o.cb,{checkoutUrl:c}=(0,d.A)(),u=(0,s.CP)(),{nextTier:f,tierPlansEnabled:b,currentTier:v,requestsCount:k}=(0,p.A)(),{tracks:y}=(0,s.st)(),x=(0,i.useCallback)((()=>{g("upgrade",e),y.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:v?.slug,requests_count:k,placement:e})}),[v,k,y,e]),j=(0,i.useCallback)((()=>{g("contact us",e),y.recordEvent("jetpack_ai_upgrade_contact_us",{placement:e})}),[y,e]);if(!u){conste=(0,i.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! <strong>Reach out to the site administrator to upgrade and keep using Jetpack AI.</strong>","jetpack"),{strong:(0,m.jsx)("strong",{})});return(0,m.jsx)(a,{showButton:!1,className:"jetpack-ai-upgrade-banner",description:t||e,visible:!0,align:null,title:null,context:null})}if(b){if(!f){conste=(0,n.A)("jetpack-ai-tiers-more-requests-contact"),r=__("You have reached the request limit for your current plan.","jetpack");return(0,m.jsx)(a,{buttonText:__("Contact Us","jetpack"),description:t||r,className:"jetpack-ai-upgrade-banner",checkoutUrl:e,visible:!0,align:null,title:null,context:null,goToCheckoutPage:j,target:"_blank"})}conste=(0,i.createInterpolateElement)((0,l.sprintf)(/* Translators: number of requests */
__("You have reached the requests limit for your current plan. <strong>Upgrade now to increase your requests limit to %d.</strong>","jetpack"),f.limit),{strong:(0,m.jsx)("strong",{})});return(0,m.jsx)(a,{buttonText:(0,l.sprintf)(/* Translators: number of requests */
__("Upgrade to %d requests","jetpack"),f.limit),checkoutUrl:c,className:"jetpack-ai-upgrade-banner",description:t||e,goToCheckoutPage:x,visible:!0,align:"center",title:null,context:null,target:"_blank"})}return(0,m.jsx)(a,{buttonText:__("Upgrade","jetpack"),checkoutUrl:c,className:"jetpack-ai-upgrade-banner",description:(0,i.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! <strong>Upgrade now to keep using it.</strong>","jetpack"),{strong:(0,m.jsx)("strong",{})}),goToCheckoutPage:x,visible:!0,align:null,title:null,context:null,target:"_blank"})})(e)}},71567:(e,t,r)=>{"use strict";r.d(t,{U:()=>a});varn=r(56427),s=r(27723),o=r(10790);const__=s.__,a=({title:e,description:t,buttonText:r=null,checkoutUrl:s=null,goToCheckoutPage:a=null,isRedirecting:i=!1,showButton:l=!0,target:c="_top"})=>{constu=__("Redirecting…","jetpack");return(0,o.jsx)("div",{className:"jetpack-upgrade-plan-banner-light",children:(0,o.jsx)(n.Notice,{status:"error",isDismissible:!1,children:(0,o.jsxs)("p",{children:[e&&(0,o.jsx)("strong",{children:e}),t," ",l&&(0,o.jsx)(n.Button,{href:i?null:s,onClick:a,variant:"link",target:c,children:(0,o.jsx)("span",{children:i?u:r})})]})})})}},43984:(e,t,r)=>{"use strict";r.d(t,{A4:()=>l,DD:()=>j,DT:()=>B,Gm:()=>g,HM:()=>w,JR:()=>_,K2:()=>A,Rq:()=>T,UA:()=>m,UD:()=>C,br:()=>d,d5:()=>v,eJ:()=>h,fD:()=>p,fv:()=>k,im:()=>a,mI:()=>S,mT:()=>N,oZ:()=>o,pE:()=>f,s6:()=>P,sn:()=>i,so:()=>s,u0:()=>y,uQ:()=>x,vE:()=>u,wb:()=>I,yQ:()=>E,yy:()=>c,z5:()=>b});varn=r(27723);const__=n.__,s={en:{label:__("English","jetpack")},es:{label:__("Spanish","jetpack")},fr:{label:__("French","jetpack")},de:{label:__("German","jetpack")},it:{label:__("Italian","jetpack")},pt:{label:__("Portuguese","jetpack")},ru:{label:__("Russian","jetpack")},zh:{label:__("Chinese","jetpack")},ja:{label:__("Japanese","jetpack")},ar:{label:__("Arabic","jetpack")},hi:{label:__("Hindi","jetpack")},ko:{label:__("Korean","jetpack")}},o={formal:{label:__("Formal","jetpack"),emoji:"🎩"},informal:{label:__("Informal","jetpack"),emoji:"😊"},optimistic:{label:__("Optimistic","jetpack"),emoji:"😃"},humorous:{label:__("Humorous","jetpack"),emoji:"😂"},serious:{label:__("Serious","jetpack"),emoji:"😐"},skeptical:{label:__("Skeptical","jetpack"),emoji:"🤨"},empathetic:{label:__("Empathetic","jetpack"),emoji:"💗"},confident:{label:__("Confident","jetpack"),emoji:"😎"},passionate:{label:__("Passionate","jetpack"),emoji:"❤️"},provocative:{label:__("Provocative","jetpack"),emoji:"🔥"}},a="titleSummary",i="continue",l="simplify",c="correctSpelling",u="generateTitle",d="makeLonger",p="makeShorter",h="changeTone",m="summarize",g="changeLanguage",f="userPrompt",b="jetpackFormCustomPrompt",v="transformListToTable",k="writePostFromList",y=__("Translate","jetpack"),x=__("Change tone","jetpack"),j=__("Correct spelling and grammar","jetpack"),w=__("Simplify","jetpack"),_=__("Summarize","jetpack"),C=__("Make shorter","jetpack"),A=__("Expand","jetpack"),S=__("Turn list into a table","jetpack"),E=__("Write a post from this list","jetpack"),N=__("Generate a post title","jetpack"),T=__("Summary based on title","jetpack"),B=__("Continue writing","jetpack"),P="jetpack-sidebar",I="document-settings"},2166:(e,t,r)=>{"use strict";r.d(t,{R:()=>a});varn=r(51609),s=r(10790);consto=(0,n.createContext)({}),a=({value:e,children:t})=>(0,s.jsx)(o.Provider,{value:e,children:t})},13965:(e,t,r)=>{"use strict";r.d(t,{Rb:()=>n.R});varn=r(2166);r(59886),r(53471)},53471:(e,t,r)=>{"use strict";r(51609),r(78836),r(13965)},59886:(e,t,r)=>{"use strict";varn=r(29491),s=r(86087),o=r(46219),a=r(13965),i=r(10790);(0,n.createHigherOrderComponent)((e=>t=>{const{suggestion:r,error:n,requestingState:l,request:c,stopSuggestion:u,eventSource:d}=(0,o.Ay)(),p=(0,s.useMemo)((()=>({suggestion:r,requestingError:n,requestingState:l,eventSource:d,requestSuggestion:c,stopSuggestion:u})),[r,n,l,d,c,u]);return(0,i.jsx)(a.Rb,{value:p,children:(0,i.jsx)(e,{...t})})}),"withAiDataProvider")},42694:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});varn=r(3924
__("%u requests remaining.","jetpack"),j)}),S&&(0,k.jsxs)(k.Fragment,{children:["",(0,k.jsx)(s.Button,{variant:"link",href:A,target:"_blank",onClick:()=>{r(h.AN,{context:V,placement:h.Cn})},children:(0,k.jsx)("span",{children:__("Upgrade","jetpack")})})]}),"",(0,k.jsx)(s.Tooltip,{text:__("Logo generation costs 10 requests; prompt enhancement costs 1 request each","jetpack"),placement:"bottom",children:(0,k.jsx)(a.A,{className:"prompt-footer__icon",icon:i.A})})]}),H&&q&&(0,k.jsx)(v.G,{}),H&&!q&&(0,k.jsx)(b.Q,{}),_&&(0,k.jsx)("div",{className:"jetpack-ai-logo-generator__prompt-error",children:__("Error enhancing prompt. Please try again.","jetpack")}),C&&(0,k.jsx)("div",{className:"jetpack-ai-logo-generator__prompt-error",children:__("Error generating logo. Please try again.","jetpack")})]})]})}},64024:(e,t,r)=>{"use strict";r.d(t,{G:()=>h});varn=r(85985),s=r(56427),o=r(86087),a=r(27723),i=r(51113),l=r(23751),c=r(61356),u=r(60674),d=r(88725),p=r(10790);const__=a.__,h=()=>{const{tracks:e}=(0,n.st)(),{recordEvent:t}=e,r=__("Upgrade","jetpack"),a=(0,o.createInterpolateElement)(__("Not enough requests left to generate a logo. <strong>Upgrade now to increase it.</strong>","jetpack"),{strong:(0,p.jsx)("strong",{})}),{nextTierCheckoutURL:h}=(0,u.Q)(),{context:m}=(0,d.A)();return(0,p.jsx)("div",{className:"jetpack-upgrade-plan-banner",children:(0,p.jsxs)("div",{className:"jetpack-upgrade-plan-banner__wrapper",children:[(0,p.jsxs)("div",{children:[(0,p.jsx)(i.A,{className:"jetpack-upgrade-plan-banner__icon",icon:l.A}),(0,p.jsx)("span",{className:"jetpack-upgrade-plan-banner__banner-description",children:a})]}),(0,p.jsx)(s.Button,{href:h,target:"_blank",className:"is-primary",onClick:()=>{t(c.AN,{context:m,placement:c.tF})},children:(0,p.jsx)("span",{children:r})})]})})}},35421:(e,t,r)=>{"use strict";r.d(t,{R:()=>u});varn=r(3924),s=r(85985),o=r(56427),a=r(27723),i=r(61356),l=r(88725),c=r(10790);const__=a.__,u=({onCancel:e,upgradeURL:t,reason:r})=>{const{tracks:a}=(0,s.st)(),{recordEvent:u}=a,d=__("Upgrade your Jetpack AI for access to logo generation. This upgrade will also increase the amount of monthly requests you can use in for all AI-powered features.","jetpack"),p=__("Not enough requests left to generate a logo. Upgrade your Jetpack AI to increase the amount of requests you can use in all AI-powered features.","jetpack"),h=(0,n.A)("ai-logo-generator-fair-usage-policy",{anchor:"usage-limitations-and-upgrades"}),{context:m}=(0,l.A)();return(0,c.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__notice-message-wrapper",children:[(0,c.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__notice-message",children:[(0,c.jsx)("span",{className:"jetpack-ai-logo-generator-modal__loading-message",children:"feature"===r?d:p}),"",(0,c.jsx)(o.Button,{variant:"link",href:h,target:"_blank",children:(0,c.jsx)("span",{children:__("Learn more about Jetpack AI.","jetpack")})})]}),(0,c.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__notice-actions",children:[(0,c.jsx)(o.Button,{variant:"tertiary",onClick:e,children:(0,c.jsx)("span",{children:__("Cancel","jetpack")})}),(0,c.jsx)(o.Button,{variant:"primary",href:t,target:"_blank",onClick:()=>{u(i.AN,{context:m,placement:i.Tz}),e()},children:(0,c.jsx)("span",{children:__("Upgrade","jetpack")})})]})]})}},48204:(e,t,r)=>{"use strict";r.d(t,{H:()=>c});varn=r(56427),s=r(27723),o=r(53512),a=r(13022),i=r(36791),l=r(10790);const__=s.__,c=({className:e=null,onVisitBlankTarget:t})=>(0,l.jsxs)("div",{className:(0,a.A)("jetpack-ai-logo-generator-modal-visit-site-banner",e),children:[(0,l.jsx)("div",{className:"jetpack-ai-logo-generator-modal-visit-site-banner__jetpack-logo",children:(0,l.jsx)("img",{src:i,alt:"Jetpack"})}),(0,l.jsxs)("div",{className:"jetpack-ai-logo-generator-modal-visit-site-banner__content",children:[(0,l.jsx)("strong",{children:__("Do you want to know all the amazing things you can do with Jetpack AI?","jetpack")}),(0,l.jsx)("span",{children:__("Generate and tweak content, create forms, get feedback and much more.","jetpack")}),(0,l.jsx)("div",{children:(0,l.
constr=__("Requests will reset on %s.","jetpack");return`${t}${(0,a.sprintf)(r,e)}`})((e=>{if(!e?.nextStart)returnnull;constt=newDate(e.nextStart);returnt.toLocaleString("default",{month:"long"})+" "+t.getDate()})(e)),r=(0,n.A)("ai-logo-generator-fair-usage-policy",{anchor:"jetpack-ai-usage-limit"});return(0,o.createInterpolateElement)(t,{link:(0,l.jsx)("a",{href:r,target:"_blank",rel:"noreferrer"}),span:(0,l.jsx)("span",{})})}},88725:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});varn=r(47143),s=r(10067),o=r.n(s),a=r(51609),i=r(31439),l=r(62614),c=r(93869),u=r(51391),d=r(19362),p=r(28229),h=r(74423),m=r(44461);constg=o()("jetpack-ai-calypso:use-logo-generator"),f=()=>{const{setSelectedLogoIndex:e,setIsSavingLogoToLibrary:t,setIsApplyingLogo:r,setIsRequestingImage:s,setIsEnhancingPrompt:o,increaseAiAssistantRequestsCount:f,addLogoToHistory:b,setContext:v,setIsLoadingHistory:k}=(0,n.useDispatch)(h.E),{logos:y,selectedLogoIndex:x,selectedLogo:j,siteDetails:w,isSavingLogoToLibrary:_,isApplyingLogo:C,isEnhancingPrompt:A,isBusy:S,isRequestingImage:E,getAiAssistantFeature:N,requireUpgrade:T,context:B,tierPlansEnabled:P,isLoadingHistory:I}=(0,n.useSelect)((e=>{constt=e(h.E);return{logos:t.getLogos(),selectedLogoIndex:t.getSelectedLogoIndex(),selectedLogo:t.getSelectedLogo(),siteDetails:t.getSiteDetails(),isSavingLogoToLibrary:t.getIsSavingLogoToLibrary(),isApplyingLogo:t.getIsApplyingLogo(),isRequestingImage:t.getIsRequestingImage(),isEnhancingPrompt:t.getIsEnhancingPrompt(),isBusy:t.getIsBusy(),getAiAssistantFeature:t.getAiAssistantFeature,requireUpgrade:t.getRequireUpgrade(),context:t.getContext(),tierPlansEnabled:t.getTierPlansEnabled(),isLoadingHistory:t.getIsLoadingHistory()}}),[]),{setFirstLogoPromptFetchError:M,setEnhancePromptFetchError:L,setLogoFetchError:R,setSaveToLibraryError:D,setLogoUpdateError:F}=(0,m.A)(),{generateImageWithParameters:O}=(0,l.Ay)(),{saveToMediaLibrary:z}=(0,c.A)(),{ID:U=null,name:H=null,description:V=null}=w||{},q=U?String(U):null,G=N(q),$=G?.costs?.["jetpack-ai-logo-generator"]?.logo,W=G?.featuresControl?.["logo-generator"],Z=W?.styles||[],J=(0,a.useCallback)((asyncfunction(){M(null),f();try{conste=await(0,u.A)();if(!e||!e.token)thrownewError("No token provided");g("Generating first prompt for site");constt={question:`Generate a simple and short prompt asking for a logo based on the site's name and description, keeping the same language.\nExample for a site named "The minimalist fashion blog", described as "Daily inspiration for all things fashion": A logo for a minimalist fashion site focused on daily sartorial inspiration with a clean and modern aesthetic that is sleek and sophisticated.\nAnother example, now for a site called "El observatorio de aves", described as "Un sitio dedicado a nuestros compañeros y compañeras entusiastas de la observación de aves.": Un logo para un sitio web dedicado a la observación de aves, capturando la esencia de la naturaleza y la pasión por la avifauna en un diseño elegante y representativo, reflejando una estética natural y apasionada por la vida silvestre.\n\nSite name: ${H}\nSite description: ${V}`,feature:"jetpack-ai-logo-generator",stream:!1},r="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query",n={Authorization:`Bearer ${e.token}`,"Content-Type":"application/json"},s=awaitfetch(r,{method:"POST",headers:n,body:JSON.stringify(t)}).then((e=>e.json()));returns?.choices?.[0]?.message?.content}catch(e){throwf(-1),M(e),e}}),[M,f,H,V]),K=(0,a.useCallback)((asyncfunction(e){if(R(null),!Z||!Z.length)returnnull;constt=[{role:"jetpack-ai",context:{type:"ai-assistant-guess-logo-style",request:e,name:H,description:V}}];try{conste=await(0,i.A)(t,{feature:"jetpack-ai-logo-generator"});if(!e)returnnull;constr=Z.find((({value:t})=>t===e));returnr?r.value:null}catch(e){g("Error guessing style",e),Promise.reject(e)}}),[Z,H,V]),Y=(0,a.useCallback)((asyncfunction({prompt:e,style:t=null}){R(null);try{constr=await(0,u.A)();if(!r||!r.token)thrownewError("No token provided");if("auto"===t)thrownewError("Auto style is not supported");g("Gene
_n("visitor","visitors",parseInt(A),"jetpack",0),N=/* Translators: Number of views */
_n("hit","hits",parseInt(A),"jetpack",0);return(0,h.jsxs)("div",{...C,children:[(0,h.jsx)(i.InspectorControls,{children:(0,h.jsx)(d.z,{attributes:e,setAttributes:r})}),(0,h.jsx)("div",{className:t,children:o||null===k?(0,h.jsx)("p",{className:"jetpack-blog-stats__loading",children:__("Loading stats…","jetpack")}):(0,h.jsxs)("p",{children:[(0,h.jsxs)("span",{children:[(0,s.ZV)(A)," "]}),(0,h.jsx)(i.RichText,{tagName:"span",placeholder:"visitors"===b?E:N,value:f,allowedFormats:["core/bold","core/italic","core/link"],onChange:e=>r({label:e})})]})})]})}},95184:(e,t,r)=>{"use strict";varn=r(74997),s=r(94375),o=r(35116),a=r(20201);(0,s.M)(o,{edit:a.A,save:()=>null,transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"blog-stats"===e,transform:({instance:e})=>{constt=e.raw.title?(0,n.createBlock)("core/heading",{content:e.raw.title,level:3}):null,r=(0,n.createBlock)("jetpack/blog-stats",{label:e.raw.hits});returnt?[t,r]:r}}]}})},51744:(e,t,r)=>{"use strict";r.d(t,{k:()=>c});varn=r(97999),s=r(85985),o=r(56427),a=r(27723),i=r(35116),l=r(10790);const__=a.__,c=({className:e,isLoading:t,changeStatus:r})=>{consta=(0,n.isWoASite)()?"https://wordpress.com/support/stats/":"https://jetpack.com/support/jetpack-stats/";return(0,l.jsx)("div",{className:e,children:(0,l.jsxs)(o.Placeholder,{icon:(0,s.sh)(i),instructions:__("You'll need to activate the Stats module to use this block. Please note that hits are only counted while this module is active.","jetpack"),label:i.title,children:[(0,l.jsx)(o.Button,{disabled:t,isBusy:t,onClick:()=>r(!0),variant:"secondary",children:t?__("Activating Stats","jetpack"):__("Activate Stats","jetpack",0)}),(0,l.jsx)("div",{children:(0,l.jsx)(o.ExternalLink,{href:a,children:__("Learn more about the Stats module.","jetpack")})})]})})}},12169:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});varn=r(1455),s=r.n(n),o=r(94715),a=r(56427),i=r(47143),l=r(86087),c=r(27723),u=r(93832),d=r(13022),p=r(54919),h=r(9075),m=r(10790);const__=c.__,_x=c._x;constg=(0,a.withNotices)((function({attributes:e,noticeOperations:t,noticeUI:r,setAttributes:n}){constg=(0,l.useRef)(!1),{answersLink:f,answersLinkText:b,gravatars:v,promptFetched:k,promptId:y,promptLabel:x,promptText:j,showLabel:w,showResponses:_,tagsAdded:C,isBloganuary:A}=e,S=(0,o.useBlockProps)({className:"jetpack-blogging-prompt"});(0,h.J)(y,C,(e=>n({tagsAdded:e})));constE=(0,i.useSelect)((e=>{const{getEntityRecord:t,hasFinishedResolution:r}=e("core"),n=t("root","site")?.language||"en_US";returnr("getEntityRecord",["root","site"])?n:null}),[]);(0,l.useEffect)((()=>{if(!E||g.current||k)return;conste=()=>{n({promptFetched:!1,promptId:null,tagsAdded:!1}),g.current=!1,t.removeAllNotices()};letr="/wpcom/v3/blogging-prompts";if(y)r+="/"+encodeURIComponent(y);else{conste=newDate;r+=`?after=--${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}&order=desc`}r=(0,u.addQueryArgs)(r,{_locale:E,force_year:(newDate)?.getFullYear()}),g.current=!0,s()({path:r}).then((e=>{constt=y?e:e[0],r=(0,p.i)(E);n({answersLink:t.answered_link+`?locale=${r}`,answersLinkText:t.answered_link_text,gravatars:t.answered_users_sample.map((({avatar:e})=>({url:e}))),promptFetched:!0,promptLabel:t.label,promptText:t.text,promptId:t.id,isBloganuary:!!t.bloganuary_id})})).catch((r=>{n({promptFetched:!0});consts="rest_post_invalid_id"===r.code&&y?(o=y,(0,m.jsxs)(m.Fragment,{children:[(0,c.sprintf)(/* translators: %d is the prompt id. */
__("Prompt with id %d not found.","jetpack"),o)," ",(0,m.jsx)(a.Button,{variant:"link",onClick:e,children:__("Reset prompt","jetpack")})]})):(t=>(0,m.jsxs)(m.Fragment,{children:[(0,c.sprintf)(/* translators: %s is the error message. */
__("Error while fetching prompt: %s","jetpack"),t)," ",(0,m.jsx)(a.Button,{variant:"link",onClick:e,children:__("Retry","jetpack")})]}))(r.message);varo;t.removeAllNotices(),t.createErrorNotice(s)}))}),[g,t,k,y,n,E]);constN=e=>{n({showLabel:e})},T=e=>{n({showResponses:e})},B=(0,d.A)(["jetpack-blogging-prompt__label"],{"is-bloganuary-icon":A});return(0,m.jsxs)("div",{...S,children:[r,(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(o.InspectorControls,{children:(0,m.jsxs)(a.PanelBody,{title:_x("Settings","title of block settings sidebar section","jetpack"),children:[(0,m.jsx)(a.ToggleControl,{label:__("Show prompt label","jetpack"),checked:w,onChange:N,__nextHasNoMarginBottom:!0}),(0,m.jsx)(a.ToggleControl,{label:__("Show other responses","jetpack"),checked:_,onChange:T,__nextHasNoMarginBottom:!0})]})})}),k?(0,m.jsxs)(m.Fragment,{children:[w&&(0,m.jsx)("div",{className:B,children:x}),(0,m.jsx)("div",{className:"jetpack-blogging-prompt__text",children:j}),_&&y&&(0,m.jsxs)("div",{className:"jetpack-blogging-prompt__answers",children:[v&&v.slice(0,3).map((({url:e})=>e&&(0,m.jsx)("img",{className:"jetpack-blogging-prompt__answers-gravatar",src:e},e))),(0,m.jsx)("a",{className:"jetpack-blogging-prompt__answers-link",href:f,target:"_blank",rel:"external noreferrer noopener",children:b})]})]}):(0,m.jsx)("div",{className:"jetpack-blogging-prompt__spinner",children:(0,m.jsx)(a.Spinner,{})})]})}))},87888:(e,t,r)=>{"use strict";varn=r(74997),s=r(47143),o=r(27723),a=r(94375),i=r(27734),l=r(32442),c=r(12169),u=r(63757),d=r(94530),p=r(86239),h=r(57028);const__=o.__,m=newURL(document.location.href),g=m.pathname.endsWith("/wp-admin/post-new.php"),f=g?m.searchParams.get("answer_prompt")??"0":"0",b=parseInt(f),v={edit:c.A,save:h.A,example:{attributes:{answersLink:"https://wordpress.com/tag/dailyprompt",answersLinkText:__("View all responses","jetpack"),gravatars:[{url:u},{url:d},{url:p}],promptLabel:__("Daily writing prompt","jetpack"),promptText:__("What's your favorite place to visit?","jetpack"),promptFetched:!0,promptId:1234,showResponses:!0,showLabel:!0,tagsAdded:!0,isBloganuary:!1}}};b||(0,a.M)(l,v);asyncfunctionk(e){await(0,i.O)();(0,n.getBlockType)("jetpack/blogging-prompt")||awaitnewPromise((e=>{(0,a.M)(l,v),setTimeout(e,0)}));const{insertBlocks:t}=(0,s.dispatch)("core/block-editor");t([(0,n.createBlock)("jetpack/blogging-prompt",{promptFetched:!1,promptId:e,tagsAdded:!0}),(0,n.createBlock)("core/paragraph")],0,void0,!1)}g&&b&&k(b)},57028:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});varn=r(94715),s=r(13022),o=r(10790);consta=function({attributes:e}){const{answersLink:t,answersLinkText:r,gravatars:a,promptId:i,promptLabel:l,promptText:c,showLabel:u,showResponses:d,isBloganuary:p}=e,h=n.useBlockProps.save({className:"jetpack-blogging-prompt"}),m=(0,s.A)(["jetpack-blogging-prompt__label"],{"is-bloganuary-icon":p});return(0,o.jsxs)("div",{...h,children:[u&&(0,o.jsx)("div",{className:m,children:l}),(0,o.jsx)("div",{className:"jetpack-blogging-prompt__text",children:c}),d&&i&&(0,o.jsxs)("div",{className:"jetpack-blogging-prompt__answers",children:[a.map((({url:e})=>e&&(0,o.jsx)("img",{className:"jetpack-blogging-prompt__answers-gravatar","aria-hidden":"true",src:e},e))),(0,o.jsx)("a",{className:"jetpack-blogging-prompt__answers-link",href:t,target:"_blank",rel:"external noreferrer noopener",children:r})]})]})}},9075:(e,t,r)=>{"use strict";r.d(t,{J:()=>c});varn=r(1455),s=r.n(n),o=r(47143),a=r(86087),i=r(89877);functionl(e){constt=(0,i.escapeHTML)(e);returns()({path:"/wp/v2/tags",method:"POST",data:{name:t}}).catch((t=>"term_exists"!==t.code?Promise.reject(t):Promise.resolve({id:t.data.term_id,name:e})))}functionc(e,t,r){const{editPost:n}=(0,o.useDispatch)("core/editor"),s=(0,a.useRef)("not-started"),{getEditedPostAttribute:i}=(0,o.useSelect)((e=>e("core/editor")),[]),c=(0,o.useSelect)((e=>e("core/editor").getEditedPostAttribute("type")),[]),u=(0,o.useSelect)((e=>e("core/editor").getEditedPostAttribute("tags")||[]),[]),d=(0,o.useSelect)((e=>e("core").getPostType("post")?.taxonomies?.includes("post_tag")),[]),p=(0,a.useMemo)((()=>0===
__("No sites found for %s.","jetpack"),r)})]}),e.length>0&&(0,o.jsx)("ul",{"aria-live":"polite",children:e.map(((e,r)=>{constn=i?.some?.((t=>t?.id===e?.blog_id))||!1;return(0,o.jsx)("li",{className:"jetpack-blogroll__appender-result-container",children:(0,o.jsxs)("button",{className:"jetpack-blogroll__appender-result-title",disabled:n,onClick:()=>t(e),children:[(0,o.jsx)("div",{className:"jetpack-blogroll__appender-result-image",children:e.site_icon&&(0,o.jsx)("img",{src:e.site_icon,alt:e.name,onError:e=>{e.target.parentNode.classList.add("empty-site-icon")}})}),(0,o.jsxs)("div",{className:"jetpack-blogroll__appender-result-text",children:[(0,o.jsx)("span",{className:"jetpack-blogroll__appender-result-title",children:e.name}),(0,o.jsx)("span",{className:"jetpack-blogroll__appender-result-description",children:e.description})]})]})},`${e.blog_id}-${r}`)}))})]})}},17454:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});varn=r(56427),s=r(27723),o=r(10790);const__=s.__;functiona({value:e,onChange:t}){return(0,o.jsx)("div",{className:"jetpack-blogroll__appender-search",children:(0,o.jsx)(n.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Search for sites to add","jetpack"),hideLabelFromVision:!0,placeholder:__("Search…","jetpack"),value:e,onChange:e=>t(e)})})}},37127:(e,t,r)=>{"use strict";r.d(t,{A:()=>h});varn=r(56427),s=r(47143),o=r(86087),a=r(27723),i=r(45459),l=r(92507),c=r(85101),u=r(40536),d=r(17454),p=r(10790);const__=a.__;functionh({isLoading:e,subscriptions:t,clientId:r}){const[a,h]=(0,o.useState)(!1),[m,g]=(0,o.useState)(),[f,b]=(0,o.useState)(""),{insertBlock:v}=(0,s.dispatch)("core/block-editor"),{siteDetails:k,isLoading:y}=(0,l.A)({siteURL:f,subscriptions:t,enabled:f});returne?(0,p.jsx)(n.Spinner,{className:"jetpack-blogroll__appender-spinner"}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(n.Button,{className:"block-editor-button-blogroll-block-appender",ref:g,icon:i.A,label:__("Add Blogroll Item","jetpack"),onClick:()=>{h((e=>!e))}}),a&&(0,p.jsxs)(n.Popover,{anchor:m,className:"jetpack-blogroll__appender",children:[(0,p.jsx)(d.A,{value:f,onChange:b}),(0,p.jsx)(u.A,{results:k,onSelect:e=>{v((0,c.FN)(e),void0,r),h(!1)},searchInput:f,isLoading:y})]})]})}},63166:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});varn=r(94715),s=r(74997),o=r(56427),a=r(47143),i=r(86087),l=r(27723),c=r(13022),u=r(2274),d=r(26247),p=r(37127),h=r(32130),m=r(46542),g=r(25688),f=r(85101),b=r(10790);const__=l.__;constv=function({className:e,attributes:t,setAttributes:r,clientId:l}){const{show_avatar:v,show_description:k,open_links_new_window:y,ignore_user_blogs:x,load_placeholders:j}=t,w=(0,d.A)(),{isLoading:_,recommendations:C,errorMessage:A}=(0,h.A)(j),{isLoading:S,subscriptions:E,errorMessage:N}=(0,g.A)({ignore_user_blogs:x});(0,m.b)({clientId:l});const{replaceInnerBlocks:T}=(0,a.dispatch)("core/block-editor");(0,i.useEffect)((()=>{if(j&&C.length){r({load_placeholders:!1});conste=[(0,s.createBlock)("core/heading",{content:__("Blogroll","jetpack"),level:3}),...C.map(f.dy)];T(l,e)}}),[C,j,r,l,T]);constB=(0,n.useBlockProps)({className:(0,c.A)(e,{"hide-avatar":!v,"hide-description":!k})});if(!w)return(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(u.A,{block:"Blogroll",explanation:__("Connect your WordPress.com account to use the Blogroll block.","jetpack")})});constP=A||N;return(0,b.jsxs)("div",{...B,children:[(0,b.jsx)(n.InnerBlocks,{template:[["core/heading",{content:__("Blogroll","jetpack"),level:3}]],allowedBlocks:["jetpack/blogroll-item"],renderAppender:()=>!_&&(0,b.jsx)(p.A,{isLoading:S,subscriptions:E,clientId:l})}),P&&(0,b.jsx)(o.Notice,{status:"error",isDismissible:!1,children:(0,b.jsx)("p",{children:P})}),j&&_&&(0,b.jsx)(o.FlexBlock,{style:{padding:"30px",textAlign:"center"},children:(0,b.jsx)(o.Spinner,{})}),(0,b.jsx)(n.InspectorControls,{children:(0,b.jsxs)(o.PanelBody,{title:__("Settings","jetpack"),children:[(0,b.jsx)(o.ToggleControl,{label:__("Show avatar","jetpack"),checked:!!v,onChange:()=>r({show_avatar:!v}),__nextHasNoMarginBottom:!0}),(0,b.jsx)(o.ToggleControl,{label:__("Show description","jetpack"),checke
__("Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: %s.","jetpack"),`<a href="https://automattic.com/cookies/">${__("Cookie Policy","jetpack")}</a>`)},15216:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});varn=r(94715),s=r(56427),o=r(27723),a=r(68071),i=r(34839),l=r(10790);const__=o.__;constc=function({clientId:e,attributes:t,setAttributes:r}){const{consentExpiryDays:c,align:u,text:d=a.a}=t;(0,i.w)(e);constp=(0,n.useBlockProps)({className:`wp-block-jetpack-cookie-consent align${u}`});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.InspectorControls,{children:(0,l.jsxs)(s.PanelBody,{title:__("Block Settings","jetpack"),children:[(0,l.jsx)(s.SelectControl,{label:__("Alignment","jetpack"),value:u,options:[{label:(0,o.isRTL)()?__("Right","jetpack"):__("Left","jetpack"),value:"left"},{label:__("Full","jetpack"),value:"full"},{label:__("Wide","jetpack"),value:"wide"},{label:(0,o.isRTL)()?__("Left","jetpack"):__("Right","jetpack"),value:"right"}],onChange:e=>function(e){constt=["wide","full"].includes(e)?{width:void0,height:void0}:{};r({...t,align:e})}(e),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(s.TextControl,{label:__("Consent Expiry Time (in days)","jetpack"),value:c,type:"number",min:"1",max:"365",onChange:e=>r({consentExpiryDays:parseInt(e)}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)("p",{children:__("Note: The block position in the editor is not indicative of the position on the front end. The block will always be positioned at the bottom of the page.","jetpack")})]})}),(0,l.jsxs)("div",{...p,style:p.style,children:[(0,l.jsx)(n.RichText,{tagName:"p",value:d,onChange:e=>r({text:e})}),(0,l.jsx)(n.InnerBlocks,{allowedBlocks:["core/button"],template:[["core/button",{text:__("Accept","jetpack")}]],templateLock:"all"})]})]})}},78165:(e,t,r)=>{"use strict";varn=r(94375),s=r(74095),o=r(15216),a=r(75757);(0,n.M)(s,{edit:o.A,save:a.A})},75757:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});varn=r(94715),s=r(68071),o=r(10790);functiona({attributes:e}){constt=n.useBlockProps.save(),{text:r=s.a,consentExpiryDays:a}=e;return(0,o.jsxs)("div",{...t,style:t.style,role:"dialog","aria-modal":"true",children:[(0,o.jsx)(n.RichText.Content,{tagName:"p",value:r}),(0,o.jsx)(n.InnerBlocks.Content,{}),(0,o.jsx)("span",{children:a})]})}},34839:(e,t,r)=>{"use strict";r.d(t,{w:()=>l});varn=r(74997),s=r(29491),o=r(3582),a=r(47143),i=r(86087);functionl(e){constt=(0,a.useSelect)((e=>{const{isSavingPost:t,isSavingNonPostEntityChanges:r}=e("core/editor");returnt()||r()}),[]),r=!(!(0,s.usePrevious)(t)||t),[,l]=(0,o.useEntityProp)("root","site","cookie_consent_template"),{saveEditedEntityRecord:c}=(0,a.useDispatch)(o.store),[u,d]=(0,i.useState)(!1),p=(0,a.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");returnt})),h=(0,i.useCallback)((e=>{d(!0),l(e),c("root","site",void0,{cookie_consent_template:e}).finally((()=>{d(!1)}))}),[d,l,c]);(0,i.useEffect)((()=>()=>{p(e)||h(null)}),[]),(0,i.useEffect)((()=>{r&&!u&&h((0,n.serialize)([p(e)]))}),[r,u,h,p,e])}},75800:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});varn=r(4567),s=r(3975),o=r(94715),a=r(86087),i=r(13022),l=r(72730),c=r(10790);constu=({className:e=null,currency:t=null,defaultValue:r=null,disabled:u=!1,label:d="",onChange:p=null,value:h=""})=>{const[m,g]=(0,a.useState)((0,n.Ay)(h,t,{symbol:""})),[f,b]=(0,a.useState)(!1),[v,k]=(0,a.useState)(!1),y=(0,a.useRef)(null),x=(0,a.useCallback)(((e,r)=>{g((n=>{if(e!==n){constn=(0,l.C_)(e,t);n&&n>=(0,l.dv)(t)?(k(!1),r&&p?.(n)):k(!0)}returne}))}),[t,p]),j=()=>{y.current&&(y.current.focus(),b(!0))};return(0,a.useEffect)((()=>{if(!y.current)return;conste=y.current,s=()=>{b(!1),m||x((0,n.Ay)(r,t,{symbol:""}))};returne.addEventListener("blur",s),()=>{e.removeEventListener("blur",s)}}),[t,r,m,y,x]),(0,a.useEffect)((()=>{f||v||g((0,n.Ay)(h,t,{symbol:""}))}),[t,f,v,h]),(0,a.useEffect)((()=>{x((0,n.Ay)(h,t,{symbol:""}))}),[t,h]),(0,c.jsxs)("div",{className:(0,i.A)("donations__amount",e,{"has-focus":f,"has-er
__("Tier %d","jetpack"),t+1),onChange:e=>((e,t)=>{constr=[...x];r[t]=e,k("amounts",r)})(e,t),value:e},`jetpack-donations-amount-${t}`)))}),m&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(n.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:f,onChange:e=>r({customAmountText:e})}),(0,c.jsx)(i.A,{currency:l,label:__("Custom amount","jetpack"),defaultValue:100*(0,a.dv)(l),className:"donations__custom-amount",disabled:!0})]}),(0,c.jsx)("hr",{className:"donations__separator"}),(0,c.jsx)(n.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:v("extraText")??u.extraText,onChange:e=>k("extraText",e)}),(0,c.jsx)("div",{className:"wp-block-button donations__donate-button-wrapper",children:(0,c.jsx)(n.RichText,{className:"wp-block-button__link donations__donate-button",placeholder:__("Write a message…","jetpack"),value:v("buttonText")||u[b]?.buttonText,onChange:e=>{returnt=e,voidr({oneTimeDonation:{...d,buttonText:t},monthlyDonation:{...p,buttonText:t},annualDonation:{...h,buttonText:t}});vart},allowedFormats:j})})]})}},36580:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});varn=r(86087),s=r(27723),o=r(13022),a=r(57018),i=r(62225),l=r(10790);const__=s.__,c=e=>{const{attributes:t,products:r,setAttributes:s}=e,{oneTimeDonation:c,monthlyDonation:u,annualDonation:d}=t,[p,h]=(0,n.useState)("one-time"),m=(0,n.useCallback)((e=>p===e),[p]),g={"one-time":{title:__("One-Time","jetpack")},...u.show&&{"1 month":{title:__("Monthly","jetpack")}},...d.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,n.useEffect)((()=>{c.planId===r["one-time"]&&u.planId===r["1 month"]&&d.planId===r["1 year"]||s({...r["one-time"]&&{oneTimeDonation:{...c,planId:r["one-time"]}},...r["1 month"]&&{monthlyDonation:{...u,planId:r["1 month"]}},...r["1 year"]&&{annualDonation:{...d,planId:r["1 year"]}}})}),[c,u,d,s,r]),(0,n.useEffect)((()=>{!u.show&&m("1 month")&&h("one-time"),!d.show&&m("1 year")&&h("one-time")}),[u,d,h,m]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"donations__container",children:[Object.keys(g).length>1&&(0,l.jsx)("div",{className:"donations__nav",children:Object.entries(g).map((([e,{title:t}])=>(0,l.jsx)("div",{role:"button",tabIndex:0,className:(0,o.A)("donations__nav-item",{"is-active":m(e)}),onClick:()=>h(e),onKeyDown:()=>h(e),children:t},`jetpack-donations-nav-item-${e}`)))}),(0,l.jsx)("div",{className:"donations__content",children:(0,l.jsx)(i.A,{activeTab:p,attributes:t,setAttributes:s})})]}),(0,l.jsx)(a.A,{...e})]})}},75703:(e,t,r)=>{"use strict";functionn(){if("undefined"==typeofwindow)return{};conste=window.Jetpack_DonationsBlock?.defaultTexts;return"object"!=typeofe?{}:e}r.d(t,{O:()=>n})},36850:(e,t,r)=>{"use strict";r.d(t,{GY:()=>s,_t:()=>n,gQ:()=>o});constn=/^\s*https?:\/\/(?:www\.)?(?:eventbrite\.[a-z.]+)\/e\/[^/]*?(\d+)\/?(?:\?[^/]*)?\s*$/i,s=/^\s*https?:\/\/(?:.+\.)?(?:eventbrite\.[a-z.]+)\/?(?:\?[^/]*)?\s*$/i,o="https://www.eventbrite.com/e/test-event-tickets-123456789"},38449:(e,t,r)=>{"use strict";r.d(t,{o:()=>c,s:()=>u});varn=r(56427),s=r(27723),o=r(5873),a=r(72660),i=r(10790);const__=s.__,_x=s._x,l=[{value:"inline",label:__("In-page Embed","jetpack"),preview:(0,i.jsx)("div",{className:"block-editor-block-preview__container",children:(0,i.jsx)("img",{src:a,alt:__("In page Eventbrite checkout example","jetpack")})})},{value:"modal",label:__("Button & Modal","jetpack")}],c=({setEditingUrl:e})=>(0,i.jsx)(n.ToolbarGroup,{children:(0,i.jsx)(n.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>e(!0)})}),u=({attributes:e,clientId:t,setAttributes:r})=>(0,i.jsx)(o.A,{title:_x("Embed Type","option for how the embed displays on a page, e.g. inline or as a modal","jetpack"),clientId:t,styleOptions:l,onSelectStyle:r,activeStyle:e.style,attributes:e,viewportWidth:130})},77629:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});constn=[r(87879).A]},87879:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});varn=r(94715),s=r(74997),o=r(27723),a=r(13022),i=r(66087),l=r(10790);const_x=o._x,c=["text","backgroundColor","textColor","customBac
_n("There is currently only %s post in your Instagram account.","There are currently only %s posts in your Instagram account.",e,"jetpack"),e):__("There are currently no posts in your Instagram account.","jetpack");return(0,a.jsx)("div",{className:"wp-block-jetpack-instagram-gallery__count-notice",children:(0,a.jsx)(n.Notice,{isDismissible:!1,status:"info",children:t})})})():null,(0,a.jsx)(n.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Number of Posts","jetpack"),value:p,onChange:e=>c({count:e}),min:1,max:o.V}),(0,a.jsx)(n.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Number of Columns","jetpack"),value:d,onChange:e=>c({columns:e}),min:1,max:6}),(0,a.jsx)(n.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Image Spacing (px)","jetpack"),value:g,onChange:e=>c({spacing:e}),min:0,max:50}),(0,a.jsx)(n.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Stack on mobile","jetpack"),checked:m,onChange:()=>c({isStackedOnMobile:!m})})]})]})}},11148:(e,t,r)=>{"use strict";r.d(t,{A:()=>k});varn=r(85985),s=r(94715),o=r(56427),a=r(86087),i=r(27723),l=r(13022),c=r(66087),u=r(78218),d=r(89525),p=r(80427),h=r(57926),m=r(86975),g=r(49783),f=r(53495),b=r(80619),v=r(10790);const__=i.__,k=(0,o.withNotices)((e=>{constt=(0,s.useBlockProps)(),{attributes:r,isSelected:i,noticeOperations:k,noticeUI:y,setAttributes:x}=e,{accessToken:j,align:w,columns:_,count:C,isStackedOnMobile:A,spacing:S}=r;(0,a.useEffect)((()=>{conste=(0,u.y)(d.attributes,r);(0,c.isEqual)(e,r)||x(e)}),[r,x]);const[E,N]=(0,a.useState)(j),{isRequestingWpcomConnectUrl:T,wpcomConnectUrl:B}=(0,f.A)(),{images:P,isLoadingGallery:I,setImages:M}=(0,b.A)({accessToken:j,noticeOperations:k,setAttributes:x,setSelectedAccount:N}),{connectToService:L,disconnectFromService:R,isConnecting:D,isRequestingUserConnections:F,userConnections:O}=(0,g.A)({accessToken:j,noticeOperations:k,selectedAccount:E,setAttributes:x,setImages:M,setSelectedAccount:N}),z=(0,n.gB)(),U=C>P.length?P.length:C,H=!I&&(!j||(0,c.isEmpty)(P)),V=!H,q=j&&I&&(0,c.isEmpty)(P),G=!H&&!q,$=(0,l.A)(t.className,{[`align${w}`]:w}),W=(0,l.A)("wp-block-jetpack-instagram-gallery__grid",`wp-block-jetpack-instagram-gallery__grid-columns-${_}`,{"is-stacked-on-mobile":A}),Z={gridGap:S,"--latest-instagram-posts-spacing":S?`${S}px`:void0},J={padding:S},K=e=>{if(P[e]){constt=P[e];return(0,v.jsx)(m.A,{alt:t.title||t.url,src:t.url,attributes:r,spacing:S})}return(0,v.jsx)("img",{alt:__("Latest Instagram Posts placeholder","jetpack"),src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNMyc2tBwAEOgG/c94mJwAAAABJRU5ErkJggg=="})},Y=()=>{E&&p.B!==E?x({accessToken:E,instagramUser:O.find((e=>e.token===E)).username}):L()};return(0,v.jsxs)("div",{...t,className:$,children:[H&&(0,v.jsx)(o.Placeholder,{icon:"instagram",instructions:z?F||O.length?void0:__("Connect to Instagram to start sharing your images.","jetpack"):__("First, you'll need to connect your WordPress.com account.","jetpack"),label:__("Latest Instagram Posts","jetpack"),notices:y,children:z?(()=>{conste=O.length>0,t=[...O.map((e=>({label:`@${e.username}`,value:e.token}))),{label:__("Add a new account","jetpack"),value:p.B}],r=D||F||e&&!E;return(0,v.jsxs)("div",{children:[e&&(0,v.jsx)(o.RadioControl,{label:__("Select your Instagram account:","jetpack"),onChange:e=>N(e),options:t,selected:E}),p.B===E&&(0,v.jsx)("p",{className:"wp-block-jetpack-instagram-gallery__new-account-instructions",children:__("If you are currently logged in to Instagram on this device, you might need to log out of it first.","jetpack")}),(0,v.jsxs)(o.Button,{disabled:r,variant:"primary",onClick:Y,children:[D&&__("Connecting…","jetpack"),F&&__("Loading your connections…","jetpack"),!D&&!F&&__("Connect to Instagram","jetpack")]})]})})():(0,v.jsx)(o.Button,{disabled:T||!B,href:B,variant:"secondary",children:__("Connect to WordPress.com","jetpack")})}),q&&(0,v.jsxs)("div",{className:"wp-block-embed is-loading",children:[(0,v.jsx)(o.Spinner,{}),(0,v.jsx)("p",{children:__("Embedding…","jetpack")
__("<span>%1$d</span> likes","jetpack"),v.length),{span:(0,h.jsx)("span",{className:"wpl-count-number"})})})})})]})]})}},67511:(e,t,r)=>{"use strict";varn=r(94375),s=r(71969),o=r(434);(0,n.M)(s,{edit:o.A,save:()=>null})},40483:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});varn=r(94715),s=r(56427),o=r(27723),a=r(13022),i=r(54790),l=r(10790);const__=o.__,c={name:"jetpack/button",attributes:{element:"button",text:__("Join my Mailchimp audience","jetpack"),uniqueId:"mailchimp-widget-id"}},u=({attributes:e,setAttributes:t,audition:r})=>{const{emailPlaceholder:o=i.Bd,consentText:u=i.Do,processingLabel:d=i.HD,successLabel:p=i.XO,errorLabel:h=i.Ys}=e,m={[i.k1]:d,[i.EM]:p,[i.Dc]:h}[r];return(0,l.jsxs)("div",{className:(0,a.A)({[`${i.j7}_notication-audition`]:r}),children:[(0,l.jsx)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,"aria-label":o,className:`${i.j7}_text-input`,disabled:!0,onChange:()=>!1,placeholder:o,title:__("You can edit the email placeholder in the sidebar.","jetpack"),type:"email"}),(0,l.jsx)(n.InnerBlocks,{template:[[c.name,c.attributes]],templateLock:"all"}),(0,l.jsx)(n.RichText,{tagName:"p",placeholder:__("Write consent text","jetpack"),value:u,onChange:e=>t({consentText:e}),inlineToolbar:!0}),r&&(0,l.jsx)("div",{className:`${i.j7}_notification ${i.j7}_${r}`,role:r===i.Dc?"alert":"status",children:m})]})}},54790:(e,t,r)=>{"use strict";r.d(t,{Bd:()=>d,Dc:()=>a,Do:()=>p,EM:()=>o,HD:()=>h,JA:()=>c,XO:()=>m,Ys:()=>g,an:()=>l,gI:()=>u,j7:()=>i,k1:()=>s});varn=r(27723);const__=n.__,s="processing",o="success",a="error",i="wp-block-jetpack-mailchimp",l=0,c=1,u=2,d=__("Enter your email","jetpack"),p=__("By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time.","jetpack"),h=__("Processing…","jetpack"),m=__("Success! You're on the list.","jetpack"),g=__("Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.","jetpack")},20093:(e,t,r)=>{"use strict";r.d(t,{o:()=>d});varn=r(94715),s=r(56427),o=r(86087),a=r(27723),i=r(54790),l=r(60462),c=r(10790);const__=a.__,u=({auditionNotification:e,clearAudition:t,setAttributes:r,emailPlaceholder:n=i.Bd,processingLabel:o=i.HD,successLabel:a=i.XO,errorLabel:u=i.Ys,interests:d,signupFieldTag:p,signupFieldValue:h,connectURL:m})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s.PanelBody,{title:__("Text Elements","jetpack"),children:(0,c.jsx)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Email Placeholder","jetpack"),value:n,onChange:e=>{r({emailPlaceholder:e}),t()}})}),(0,c.jsxs)(s.PanelBody,{title:__("Notifications","jetpack"),children:[(0,c.jsx)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Processing text","jetpack"),value:o,onChange:t=>{r({processingLabel:t}),e(i.k1)}}),(0,c.jsx)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Success text","jetpack"),value:a,onChange:t=>{r({successLabel:t}),e(i.EM)}}),(0,c.jsx)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Error text","jetpack"),value:u,onChange:t=>{r({errorLabel:t}),e(i.Dc)}})]}),(0,c.jsxs)(s.PanelBody,{title:__("Mailchimp Groups","jetpack"),children:[(0,c.jsx)(l.A,{interests:d,onChange:(e,t)=>{constn=[...newSet([...d,e])].filter((r=>!(r===e&&!t)&&r));r({interests:n})}}),(0,c.jsx)(s.ExternalLink,{href:"https://mailchimp.com/help/send-groups-audience/",children:__("Learn about groups","jetpack")})]}),(0,c.jsxs)(s.PanelBody,{title:__("Signup Location Tracking","jetpack"),children:[(0,c.jsx)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Signup Field Tag","jetpack"),placeholder:__("SIGNUP","jetpack"),value:p,onChange:e=>r({signupFieldTag:e})}),(0,c.jsx)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Signup Field Value","jetpack"),placeholder:__("website","jetpack"),value:h,onChange:e=>r({signupFieldValue:e})}),(0,c.j
_n("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length,"jetpack","jetpack"),e.length),"assertive"):t(__("No results.","jetpack"),"assertive"))}render(){const{onChange:e,onKeyDown:t}=this,{children:r,instanceId:s,completer:o}=this.props,{selectedIndex:a,filteredOptions:i}=this.state,{key:c=""}=i[a]||{},{className:d}=o,p=i.length>0,h=p?`components-autocomplete-listbox-${s}`:null,m=p?`components-autocomplete-item-${s}-${c}`:null;return(0,u.jsxs)("div",{className:"components-autocomplete",children:[r({isExpanded:p,listBoxId:h,activeId:m,onChange:e,onKeyDown:t}),p&&(0,u.jsx)(n.Popover,{focusOnMount:!1,onClose:this.reset,position:"top center",className:"components-autocomplete__popover",noArrow:!0,children:(0,u.jsx)("div",{id:h,role:"listbox",className:"components-autocomplete__results",children:i.map(((e,t)=>(0,u.jsx)(n.Button,{id:`components-autocomplete-item-${s}-${e.key}`,role:"option","aria-selected":t===a,disabled:e.isDisabled,className:(0,l.A)("components-autocomplete__result",d,{"is-selected":t===a}),onClick:()=>this.select(e),children:e.label},e.key)))})})]})}}consth=(0,s.compose)([n.withSpokenMessages,s.withInstanceId,n.withFocusOutside])(p)},82063:(e,t,r)=>{"use strict";functionn(e,t){return{default:{details:"mapbox://styles/automattic/cjolkhmez0qdd2ro82dwog1in",no_details:"mapbox://styles/automattic/cjolkci3905d82soef4zlmkdo"},black_and_white:{details:"mapbox://styles/automattic/cjolkixvv0ty42spgt2k4j434",no_details:"mapbox://styles/automattic/cjolkgc540tvj2spgzzoq37k4"},satellite:{details:"mapbox://styles/mapbox/satellite-streets-v10",no_details:"mapbox://styles/mapbox/satellite-v9"},terrain:{details:"mapbox://styles/automattic/cjolkf8p405fh2soet2rdt96b",no_details:"mapbox://styles/automattic/cjolke6fz12ys2rpbpvgl12ha"}}[e][t?"details":"no_details"]}r.d(t,{o:()=>n})},16815:(e,t,r)=>{"use strict";r.d(t,{BY:()=>i,ES:()=>s,_t:()=>o,iU:()=>a,jF:()=>n});constn=e=>Object.hasOwn(e,"lat")&&Object.hasOwn(e,"lng")?e:{lat:e.latitude||0,lng:e.longitude||0};functions(e,t){constr=newe.LngLatBounds;returnt.forEach((e=>{r.extend([e.coordinates.longitude,e.coordinates.latitude])})),r}functiono(e,t){e.fitBounds(t,{padding:{top:80,bottom:80,left:40,right:40}})}functiona(e,t){e.innerHTML=`\n\t\t<?xml version="1.0" encoding="UTF-8"?>\n\t\t<svg version="1.1" viewBox="0 0 32 38" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n\t\t\t<g fill-rule="evenodd">\n\t\t\t\t<path id="d" d="m16 38s16-11.308 16-22-7.1634-16-16-16-16 5.3076-16 16 16 22 16 22z" fill="${t}"/>\n\t\t\t</g>\n\t\t</svg>\n\t`}functioni(e){returnnewe.Popup({closeButton:!0,closeOnClick:!1,offset:{left:[0,0],top:[0,5],right:[0,0],bottom:[0,-40]}})}},42470:(e,t,r)=>{"use strict";r.d(t,{IR:()=>d,K5:()=>c,Sm:()=>i,Yc:()=>u,c6:()=>a,nQ:()=>l});varn=r(34377);consts=6371e3;functiono(e){returnMath.abs(s*Math.cos(e*Math.PI/180)*2*Math.PI/256)}functiona(e,t){return512/Math.pow(2,e)*.5*o(t)}functioni(e,t){constr=e/o(t);returnMath.log2(512/(r/.5))}functionl(e,t){if(0===t.length)returnnull;constr=newe.Coordinate(-90,180),n=newe.Coordinate(90,-180);t.forEach((e=>{r.latitude=Math.max(r.latitude,e.coordinates.latitude),r.longitude=Math.min(r.longitude,e.coordinates.longitude),n.latitude=Math.min(n.latitude,e.coordinates.latitude),n.longitude=Math.max(n.longitude,e.coordinates.longitude)}));consts=newe.Coordinate(r.latitude-.5*(r.latitude-n.latitude),r.longitude+.5*(n.longitude-r.longitude)),o=newe.CoordinateSpan(1.3*Math.abs(r.latitude-n.latitude),1.3*Math.abs(n.longitude-r.longitude));returnnewe.CoordinateRegion(s,o)}functionc(e,t){return()=>{constr=e.createElement("div");returnr.classList.add("mapkit-popup-content"),t(r),r}}functionu(e,t){returnnewPromise((r=>{if(t.mapkitScriptIsLoading)(0,n.Cu)(t,"mapkit").then((e=>{r(e)}));else{t.mapkitScriptIsLoading=!0;consts=e.createElement("script");s.addEventListener("load",(async()=>{conste=await(0,n.Cu)(t,"mapkit");t.mapkitScriptIsLoading=!1,r(e)}),{once:!0}),s.src="https://cdn.apple-mapkit.com/mk/5.x
__("Open Table Preview %s","jetpack"),t),scrolling:"no",src:`https://www.opentable.com/widget/reservation/canvas?rid=${Array.isArray(N)?N.join("%2C"):""}&type=${r}&theme=${n}&overlay=false&domain=${B}&lang=${P&&g.L.includes(P)?P:"en-US"}&newtab=${I}&disablega=true`})]})})()]})]})}))},82144:(e,t,r)=>{"use strict";varn=r(94715),s=r(74997),o=r(94375),a=r(79018),i=r(34157),l=r(8100),c=r(71833),u=r(50387),d=r(84260),p=r(10790);(0,o.M)(a,{edit:c.A,save:({attributes:{rid:e}})=>{constt=n.useBlockProps.save();return(0,p.jsx)("div",{...t,children:e?.map(((e,t)=>(0,p.jsx)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`,children:`https://www.opentable.com/restref/client/?rid=${e}`},`${e}-${t}`)))})},attributes:a.attributes,styles:(0,u.Iy)(),transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&0===e.textContent.indexOf("http")&&(d.XA.test(e.textContent)||d.JJ.test(e.textContent)),transform:e=>{constt=(0,d.a9)(e.textContent);return(0,s.createBlock)("jetpack/opentable",t)}}]},deprecated:[i.A,l.A]})},82101:(e,t,r)=>{"use strict";r.d(t,{L:()=>s,P:()=>n});constn=[{value:"en-US",label:"English"},{value:"fr-CA",label:"Français"},{value:"de-DE",label:"Deutsch"},{value:"es-MX",label:"Español"},{value:"ja-JP",label:"日本語"},{value:"nl-NL",label:"Nederlands"},{value:"it-IT",label:"Italiano"}],s=n.map((e=>e.value))},98233:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});varn=r(56427),s=r(86087),o=r(27723),a=r(66087),i=r(10790);const__=o.__,_n=o._n,l=/^\s*(http[s]?:\/\/|<script)/;functionc(e){const[t,r]=(0,s.useState)(""),[o,c]=(0,s.useState)(e.rids||[]),u=/^(\d+)$|\(#(\d+)\)$/,d=(0,i.jsx)(n.FormTokenField,{value:o,saveTransform:e=>l.test(e)?"":e.trim(),onInputChange:r,label:_n("Restaurant ID","Restaurant IDs",o.length,"jetpack"),...e,onChange:t=>{constr=t.map((e=>{constt=u.exec(e);if(t){returnt[1]||t[2]}returne}));c(r),e.onChange&&e.onChange(r)},__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0});return(0,i.jsx)("div",{className:"wp-block-jetpack-opentable-restaurant-picker",children:e.onSubmit?(0,i.jsxs)("form",{onSubmit:r=>{r.preventDefault(),e.onSubmit((0,a.isEmpty)(o)?t:o)},children:[d,(0,i.jsx)(n.Button,{variant:"secondary",type:"submit",children:__("Embed","jetpack")})]}):d})}},50387:(e,t,r)=>{"use strict";r.d(t,{Iy:()=>o,K5:()=>a,i9:()=>s});varn=r(27723);const__=n.__,s={name:"button",label:__("Button (210 x 113 pixels)","jetpack")},o=e=>[{name:"standard",label:__("Standard (224 x 301 pixels)","jetpack"),isDefault:!0},{name:"tall",label:__("Tall (288 x 490 pixels)","jetpack")},{name:"wide",label:__("Wide (840 x 150 pixels)","jetpack")},(!e||1===e.length)&&s].filter(Boolean),a=e=>o(e).map((e=>e.name))},59038:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});varn=r(86087);functions(e){constt=(0,n.useRef)(void0);return(0,n.useEffect)((()=>{t.current=e}),[e]),t.current}},84260:(e,t,r)=>{"use strict";r.d(t,{JJ:()=>s,XA:()=>o,a9:()=>a});constn=/<\s*script[^>]*src\s*=\s*["']?([^"']*)/i,s=/restref=([0-9]+)&/,o=/rid=([0-9]+)&/,a=e=>{if(e)return(e=>{if(!e)return;lett="";if(t=0===e.indexOf("http")?newURL(e):newURL("http:"+e),!t.host||-1===t.host.indexOf("opentable")||!t.search)return;constr=newURLSearchParams(t.search);letn=r.get("theme");"button"===r.get("type")&&(n=r.get("type"));lets=r.getAll("rid");if(s&&0!==s.length||(s=r.getAll("restref")),!s||0===s.length)return;consto={};s&&(o.rid=s);consta=r.get("domain");a&&(o.domain=a);consti=r.get("iframe");i&&(o.iframe=i);constl=r.get("lang");l&&(o.lang=l);constc=r.get("newtab");returnc&&(o.newtab=c),n&&(o.style=n),o})((e=>{constt=e.match(n);returnt&&t[1]?t[1]:s.test(e)||o.test(e)?e:void0})(e))}},72347:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});varn=r(94715),s=r(47143),o=r(86087),a=r(52619),i=r(27723),l=r(13022),c=r(2274),u=r(72462),d=r(53796),p=r(26247),h=r(16521),m=r(10790);const__=i.__,g=["jetpack/recurring-payments"];constf=function({clientId:e,attributes:t}){const{layout:r,fontSize:i}=t,{connectUrl:f,isApiConnected:b}=(0,s.useSelect)((e=>{const{getConnectUrl:t,isApiStateConnected:r}=e(h.M);return{connectUrl:t(),isApiConnected:r()}})),v=(0,p.A)(),k=(0,s.us
`${(0,i.sprintf)(__("Loading: %s","jetpack"),r)}${o}`,"assertive"),!0};loadAndPlay=e=>{this.recordUserInteraction(),this.loadTrack(e)&&this.props.playMediaSource(this.props.playerId)};getTrack=e=>this.props.tracks[e];handleError=e=>{if(!this.state.hasUserInteraction){constt=window.navigator.userAgent.match(/Trident\/7\./)?"IE11: Playing sounds in webpages setting is not checked":e;this.setState((()=>{thrownewError(t)}))}this.props.errorMediaSource(this.props.playerId),(0,n.speak)(`${__("Error: Episode unavailable - Open in a new tab","jetpack")}`,"assertive")};handlePlay=()=>{this.props.playMediaSource(this.props.playerId),this.setState({hasUserInteraction:!0})};handlePause=()=>{this.props.pauseMediaSource(this.props.playerId),this.props.playerState!==u.pF&&this.props.pauseMediaSource(this.props.playerId)};handleTimeChange=e=>{this.props.setMediaSourceCurrentTime(this.props.playerId,e)};handleJump=()=>{this.props.setMediaSourceCurrentTime(this.props.playerId,this.props.currentTime-5)};handleSkip=()=>{this.props.setMediaSourceCurrentTime(this.props.playerId,this.props.currentTime+30)};updateMediaData=e=>{this.props.updateMediaSourceData(this.props.playerId,{duration:e.target?.duration,domId:e.target?.id})};registerPlayer(){conste=this.getTrack(this.state.currentTrack)||{},{playerId:t}=this.props;this.props.registerMediaSource(t,{title:e.title,link:e.link,state:u.vh}),this.props.setDefaultMediaSource(t)}componentDidMount(){this.props.playerId&&this.registerPlayer()}componentWillUnmount(){this.props.playerId&&this.props.unregisterMediaSource(this.props.playerId)}componentDidUpdate(e){constt=e=>e?.length?e.map((e=>e.guid)):[],r=t(this.props.tracks),n=newSet(t(e.tracks));r.length===n.size&&r.every((e=>n.has(e)))||this.loadTrack(0)}staticgetDerivedStateFromProps(e,t){returne.tracks.length<=t.currentTrack?{...t,currentTrack:0}:null}render(){const{playerId:e,title:t,link:r,cover:n,tracks:s,attributes:o,currentTime:a,playerState:u}=this.props,{itemsToShow:m,primaryColor:f,customPrimaryColor:b,hexPrimaryColor:v,secondaryColor:k,customSecondaryColor:y,hexSecondaryColor:x,backgroundColor:j,customBackgroundColor:w,hexBackgroundColor:_,showCoverArt:C,showEpisodeTitle:A,showEpisodeDescription:S}=o,{currentTrack:E}=this.state,N=s.slice(0,m),T=this.getTrack(E),B=(0,d.GU)({primaryColor:f,customPrimaryColor:b,secondaryColor:k,customSecondaryColor:y,backgroundColor:j,customBackgroundColor:w}),P={color:y,backgroundColor:w,"--jetpack-podcast-player-primary":v,"--jetpack-podcast-player-secondary":x,"--jetpack-podcast-player-background":_},I=(0,l.A)("jetpack-podcast-player",u,B.secondary.classes,B.background.classes);return(0,g.jsxs)("section",{className:I,style:P,"aria-labelledby":t||T&&T.title?`${e}__title`:void0,"aria-describedby":T&&T.description?`${e}__track-description`:void0,"data-jetpack-iframe-ignore":!0,children:[(0,g.jsx)(p.A,{playerId:e,title:t,link:r,cover:n,track:this.getTrack(E),showCoverArt:C,showEpisodeTitle:A,showEpisodeDescription:S,colors:B,children:(0,g.jsx)(c.A,{onJumpBack:this.handleJump,onSkipForward:this.handleSkip,trackSource:this.getTrack(E).src,onPlay:this.handlePlay,onPause:this.handlePause,onError:this.handleError,playStatus:u,currentTime:a,onTimeChange:this.handleTimeChange,onMetadataLoaded:this.updateMediaData})}),N.length>1&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h4",{id:`jetpack-podcast-player__tracklist-title--${e}`,className:"jetpack-podcast-player--visually-hidden",children:(0,i.sprintf)(
__("Playlist: %s","jetpack"),t)}),(0,g.jsx)("p",{id:`jetpack-podcast-player__tracklist-description--${e}`,className:"jetpack-podcast-player--visually-hidden",children:__("Select an episode to play it in the audio player.","jetpack")}),(0,g.jsx)(h.A,{playerId:e,playerState:u,currentTrack:E,tracks:N,selectTrack:this.selectTrack,colors:B})]})]})}}f.defaultProps={title:"",cover:"",link:"",attributes:{url:null,itemsToShow:5,showCoverArt:!0,showEpisodeTitle:!0,showEpisodeDescription:!0},tracks:[]};constb=(0,s.compose)([m.A,(0,o.withSelect)(((e,t)=>{const{playerId:r}=t,{getMediaSourceCurrentTime:n,getMediaPlayerState:s}=e(u.ax);return{currentTime:n(r),playerState:s(r)}})),(0,o.withDispatch)((e=>{const{registerMediaSource:t,updateMediaSourceData:r,unregisterMediaSource:n,setDefaultMediaSource:s,playMediaSource:o,pauseMediaSource:a,toggleMediaSource:i,errorMediaSource:l,setMediaSourceCurrentTime:c}=e(u.ax);return{registerMediaSource:t,updateMediaSourceData:r,unregisterMediaSource:n,setDefaultMediaSource:s,playMediaSource:o,pauseMediaSource:a,toggleMediaSource:i,errorMediaSource:l,setMediaSourceCurrentTime:c}}))])(f)},74050:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});varn=r(86087),s=r(27723),o=r(10790);const__=s.__,a=(0,n.memo)((({link:e,title:t,colors:r})=>(0,o.jsxs)("div",{className:"jetpack-podcast-player__track-error",children:[__("Episode unavailable.","jetpack")," ",e&&(0,o.jsx)("span",{className:r.secondary.classes,style:{color:r.secondary.custom},children:(0,o.jsxs)("a",{className:"jetpack-podcast-player__link",href:e,rel:"noopener noreferrer nofollow",target:"_blank",children:[(0,o.jsx)("span",{className:"jetpack-podcast-player--visually-hidden",children:`${(0,s.sprintf)(/* translators: %s is the title of the track. This text is visually hidden from the screen, but available to screen readers. */
__("%s:","jetpack"),t)}`}),__("Open in a new tab","jetpack")]})})]})))},35311:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(86087),s=r(27723),o=r(62796),a=r(10790);const __=s.__,i=(0,n.memo)((({isPlaying:e,isError:t,className:r})=>{let n,s;t?(s="error",
f=t?__("track","jetpack"):void0;return(0,c.jsxs)("li",{className:m,style:Object.keys(g).length?g:null,children:[(0,c.jsxs)("a",{className:"jetpack-podcast-player__link jetpack-podcast-player__track-link",href:e.link||e.src,role:"button","aria-current":f,onClick:e=>{e.shiftKey||e.metaKey||e.altKey||(e.preventDefault(),s(u))},onKeyDown:e=>{" "===event.key&&(e.preventDefault(),s(u))},children:[(0,c.jsx)(l.A,{className:"jetpack-podcast-player__track-status-icon",isPlaying:r,isError:n}),(0,c.jsx)("span",{className:"jetpack-podcast-player__track-title",children:e.title}),e.duration&&(0,c.jsx)("time",{className:"jetpack-podcast-player__track-duration",dateTime:e.duration,children:e.duration})]}),t&&n&&(0,c.jsx)(i.A,{link:e.link,title:e.title,colors:d})]})}))},81166:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});varn=r(86087),s=r(27723),o=r(10790);const__=s.__;functiona(e){classtextendsn.Component{state={didError:!1,isIE11AudioIssue:!1};componentDidCatch=(e,t)=>{this.props.onError(e,t)};staticgetDerivedStateFromError=e=>({didError:!0,isIE11AudioIssue:!!e.message.match(/IE11/)});render(){const{didError:t,isIE11AudioIssue:r}=this.state;returnt?(0,o.jsx)("section",{className:"jetpack-podcast-player",children:(0,o.jsx)("p",{className:"jetpack-podcast-player__error",children:r?__('The podcast player cannot be displayed as your browser settings do not allow for sounds to be played in webpages. This can be changed in your browser’s "Internet options" settings. In the "Advanced" tab you will have to check the box next to "Play sounds in webpages" in the "Multimedia" section. Once you have confirmed that the box is checked, please press "Apply" and then reload this page.',"jetpack"):__("An unexpected error occured within the Podcast Player. Reloading this page might fix the problem.","jetpack",0)})}):(0,o.jsx)(e,{...this.props})}}returnt.defaultProps={onError:()=>{}},t}},38288:(e,t,r)=>{"use strict";r.d(t,{Q:()=>s,g:()=>n});constn="podcast-feed",s="embed-block"},18029:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});varn=r(98329);consts={attributes:{url:{type:"string"},itemsToShow:{type:"integer",default:5},showCoverArt:{type:"boolean",default:!0},showEpisodeDescription:{type:"boolean",default:!0},primaryColor:{type:"string"},customPrimaryColor:{type:"string",validator:n.A},hexPrimaryColor:{type:"string",validator:n.A},secondaryColor:{type:"string"},customSecondaryColor:{type:"string",validator:n.A},hexSecondaryColor:{type:"string",validator:n.A},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:n.A},hexBackgroundColor:{type:"string",validator:n.A},exampleFeedData:{type:"object"}},supports:{align:!1,alignWide:!0,anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0},save:()=>null}},60025:(e,t,r)=>{"use strict";r.d(t,{A:()=>N});varn=r(97999),s=r(94715),o=r(74997),a=r(56427),i=r(29491),l=r(47143),c=r(86087),u=r(27723),d=r(93832),p=r(10067),h=r.n(p),m=r(66087),g=r(49487),f=r(34377),b=r(78218),v=r(50961),k=r(1624),y=r(57162),x=r(38288),j=r(90388),w=r(90764),_=r(19812),C=r(10790);const__=u.__,A=h()("jetpack:podcast-player:edit"),S=()=>{},E=(0,n.isWpcomPlatformSite)()?"http://en.support.wordpress.com/wordpress-editor/blocks/podcast-player-block/":"https://jetpack.com/support/jetpack-blocks/podcast-player-block/",N=(0,i.compose)([(0,l.withDispatch)(((e,{clientId:t,attributes:r})=>({replaceWithEmbedBlock(){e("core/block-editor").replaceBlock(t,(0,o.createBlock)("core/embed",{url:r.url}))}}))),(0,s.withColors)("backgroundColor",{primaryColor:"color"},{secondaryColor:"color"}),a.withNotices,i.withInstanceId,g.T])((({instanceId:e,attributes:t,setAttributes:r,noticeOperations:{createErrorNotice:n,removeAllNotices:o},noticeUI:i,primaryColor:l,setPrimaryColor:u,secondaryColor:p,setSecondaryColor:h,fallbackTextColor:g,backgroundColor:N,setBackgroundColor:T,fallbackBackgroundColor:B,isSelected:P,replaceWithEmbedBlock:I})=>{constM=(0,b.y)(k.attributes,t),{url:L,selectedEpisodes:R,itemsToShow:D,showCoverArt:F,showEpisodeTitle:O,showEpisodeDescription:z,exampleFeedData:U}=M,H=`jetpack-podcast-player-block
_n("This block will only appear to people who have visited this page more than %d time.","This block will only appear to people who have visited this page more than %d times.",+a,"jetpack"),a):1===a?__("This block will only appear to people who are visiting this page for the first time.","jetpack"):(0,l.sprintf)(/* translators: placeholder is a number. */
_n("This block will only appear to people who are visiting this page for %d time.","This block will only appear to people who have visited this page at most %d times.",+a,"jetpack"),a)}),(0,p.jsx)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container",children:(0,p.jsx)(s.InnerBlocks,{})})]})}))},53183:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});varn=r(94715),s=r(10790);consto=()=>{conste=n.useBlockProps.save();return(0,s.jsx)("div",{...e,children:(0,s.jsx)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container",children:(0,s.jsx)(n.InnerBlocks.Content,{})})})}},84730:(e,t,r)=>{"use strict";r.d(t,{DF:()=>n,aV:()=>o,et:()=>s});constn="after-visits",s="before-visits",o=3},31566:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});varn=r(94715),s=r(84730),o=r(10790);consta={attributes:{criteria:{type:"string",default:s.DF},threshold:{type:"number",default:s.aV}},supports:{html:!1},save:({className:e})=>(0,o.jsx)("div",{className:e,children:(0,o.jsx)(n.InnerBlocks.Content,{})})}},79238:(e,t,r)=>{"use strict";varn=r(94375),s=r(20242),o=r(34570),a=r(53183),i=r(31566);(0,n.M)(s,{edit:o.A,save:a.A,deprecated:[i.A]})},24097:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});varn=r(94715),s=r(10790);functiono(){conste=(0,n.useBlockProps)();return(0,s.jsx)("div",{...e,children:(0,s.jsx)(n.InnerBlocks,{template:[["jetpack/whatsapp-button",{}]],allowedBlocks:["jetpack/whatsapp-button"]})})}},38136:(e,t,r)=>{"use strict";varn=r(94375),s=r(58180),o=r(24097),a=r(92908),i=r(92335),l=r(7651);(0,n.M)(s,{edit:o.A,save:a.A,variations:i.A},[{name:l.UU,settings:l.W0}])},92908:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});varn=r(94715),s=r(10790);consto=()=>{conste=n.useBlockProps.save();return(0,s.jsx)("div",{...e,children:(0,s.jsx)(n.InnerBlocks.Content,{})})}},57699:(e,t,r)=>{"use strict";r.d(t,{N:()=>n});constn=[{code:"US",label:"🇺🇸 +1",value:"1US"},{code:"CA",label:"🇨🇦 +1",value:"1CA"},{code:"BS",label:"🇧🇸 +1242",value:"1242BS"},{code:"BB",label:"🇧🇧 +1246",value:"1246BB"},{code:"AI",label:"🇦🇮 +1264",value:"1264AI"},{code:"AG",label:"🇦🇬 +1268",value:"1268AG"},{code:"VG",label:"🇻🇬 +1284",value:"1284VG"},{code:"VI",label:"🇻🇮 +1340",value:"1340VI"},{code:"BM",label:"🇧🇲 +1441",value:"1441BM"},{code:"GD",label:"🇬🇩 +1473",value:"1473GD"},{code:"TC",label:"🇹🇨 +1649",value:"1649TC"},{code:"MS",label:"🇲🇸 +1664",value:"1664MS"},{code:"MP",label:"🇲🇵 +1670",value:"1670MP"},{code:"GU",label:"🇬🇺 +1671",value:"1671GU"},{code:"AS",label:"🇦🇸 +1684",value:"1684AS"},{code:"LC",label:"🇱🇨 +1758",value:"1758LC"},{code:"DM",label:"🇩🇲 +1767",value:"1767DM"},{code:"VC",label:"🇻🇨 +1784",value:"1784VC"},{code:"DO",label:"🇩🇴 +1849",value:"1849DO"},{code:"TT",label:"🇹🇹 +1868",value:"1868TT"},{code:"KN",label:"🇰🇳 +1869",value:"1869KN"},{code:"JM",label:"🇯🇲 +1876",value:"1876JM"},{code:"PR",label:"🇵🇷 +1939",value:"1939PR"},{code:"EG",label:"🇪🇬 +20",value:"20EG"},{code:"MA",label:"🇲🇦 +212",value:"212MA"},{code:"DZ",label:"🇩🇿 +213",value:"213DZ"},{code:"TN",label:"🇹🇳 +216",value:"216TN"},{code:"LY",label:"🇱🇾 +218",value:"218LY"},{code:"GM",label:"🇬🇲 +220",value:"220GM"},{code:"SN",label:"🇸🇳 +221",value:"221SN"},{code:"MR",label:"🇲🇷 +222",value:"222MR"},{code:"ML",label:"🇲🇱 +223",value:"223ML"},{code:"GN",label:"🇬🇳 +224",value:"224GN"},{code:"CI",label:"🇨🇮 +225",value:"225CI"},{code:"BF",label:"🇧🇫 +226",value:"226BF"},{code:"NE",label:"🇳🇪 +227",value:"227NE"},{code:"TG",label:"🇹🇬 +228",value:"228TG"},{code:"BJ",label:"🇧🇯 +229",value:"229BJ"},{code:"MU",label:"🇲🇺 +230",value:"230MU"},{code:"LR",label:"🇱🇷 +231",value:"231LR"},{code:"SL",label:"🇸🇱 +232",value:"232SL"},{code:"GH",label:"🇬🇭 +233",value:"233GH"},{code:"NG",label:"🇳🇬 +234",value:"234NG"},{code:"TD",label:"🇹🇩 +235",value:"235TD"},{code:"CF",label:"🇨🇫 +236",value:"236CF"},{code:"CM",label:"🇨🇲 +237",value:"237CM"},{code:"CV",label:"🇨<EFBFBD><EFBFBD><EFBFBD>
title:__("Native Share","jetpack"),icon:(0,o.jsx)(s.d6,{icon:"share",size:24}),description:__("Share the post using your phone’s built-in sharing menu, or copy the link to the clipboard on desktop.","jetpack")}];a.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.service===t.service)}));consti=a},11906:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});varn=r(94715),s=r(56427),o=r(27723),a=r(83883),i=r(10790);const__=o.__,l=[{name:__("Small","jetpack"),value:"has-small-icon-size"},{name:__("Normal","jetpack"),value:"has-normal-icon-size"},{name:__("Large","jetpack"),value:"has-large-icon-size"},{name:__("Huge","jetpack"),value:"has-huge-icon-size"}],c=e=>{const{attributes:t,setAttributes:r}=e,{size:o}=t,c=e=>o===e||!o&&"has-normal-icon-size"===e;return(0,i.jsx)(n.BlockControls,{group:"other",children:(0,i.jsx)(s.ToolbarDropdownMenu,{label:__("Size","jetpack"),text:__("Size","jetpack"),icon:null,popoverProps:{position:"bottom right"},children:()=>(0,i.jsx)(s.MenuGroup,{children:l.map((({name:e,value:t})=>(0,i.jsx)(s.MenuItem,{icon:c(t)&&a.A,isSelected:c(t),role:"menuitemradio",onClick:()=>{r({size:t})},children:e},t)))})})})}},67650:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});varn=r(94715),s=r(56427),o=r(27723),a=r(10790);const__=o.__,i=(0,n.withColors)({iconColor:"icon-color",iconBackgroundColor:"icon-background-color"})((e=>{const{clientId:t,attributes:r,iconBackgroundColor:o,iconColor:i,setAttributes:l,setIconBackgroundColor:c,setIconColor:u}=e,{iconBackgroundColorValue:d,iconColorValue:p}=r,{styleType:h}=r,m=(0,n.__experimentalUseMultipleOriginColorsAndGradients)(),g=[{value:i.color||p,onChange:e=>{u(e),l({iconColorValue:e})},label:__("Icon color","jetpack"),resetAllFilter:()=>{u(void0),l({iconColorValue:void0})}},{value:o.color||d,gradients:"",onChange:e=>{c(e),l({iconBackgroundColorValue:e})},onGradientChange:()=>{},label:__("Icon background","jetpack"),resetAllFilter:()=>{c(void0),l({iconBackgroundColorValue:void0})}}];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.InspectorControls,{children:(0,a.jsx)(s.PanelBody,{title:__("Settings","jetpack"),children:(0,a.jsx)(s.MenuItemsChoice,{choices:[/* translators: Sharing: Sharing button option label. */
{value:"text",label:__("Text Only","jetpack")}],value:h,onSelect:e=>l({styleType:e})})})}),(0,a.jsxs)(n.InspectorControls,{group:"color",children:[g.map((({onChange:e,label:r,value:s,resetAllFilter:o})=>(0,a.jsx)(n.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:s,label:r,onColorChange:e,isShownByDefault:!0,resetAllFilter:o,enableAlpha:!0,clearable:!0}],panelId:t,gradients:"",...m},`social-links-color-${r}`))),(0,a.jsx)(n.ContrastChecker,{textColor:p,backgroundColor:d,isLargeText:!1})]})]})}))},83597:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});varn=r(94715),s=r(27723),o=r(13022),a=r(11906),i=r(67650),l=r(10790);const__=s.__,c=["jetpack/sharing-button"];constu=function(e){const{attributes:t}=e,{size:r}=t,s=(0,l.jsx)("li",{children:__("Click plus to add a Sharing Button","jetpack")}),u=(0,o.A)(r,"jetpack-sharing-buttons__services-list"),d=(0,n.useBlockProps)({className:u}),p=(0,n.useInnerBlocksProps)(d,{allowedBlocks:c,placeholder:s,templateLock:!1,orientation:t.layout?.orientation??"horizontal",sharingEventsAdded:!0,__experimentalAppenderTagName:"li"});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.A,{...e}),(0,l.jsx)(i.A,{...e}),(0,l.jsx)("ul",{...p})]})}},74956:(e,t,r)=>{"use strict";varn=r(94375),s=r(32870),o=r(83597),a=r(53840);(0,n.M)(s,{edit:o.A,save:a.A})},53840:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});varn=r(94715),s=r(13022),o=r(10790);functiona({attributes:e}){const{size:t}=e,r=(0,s.A)(t,"jetpack-sharing-buttons__services-list"),a=n.useBlockProps.save({className:r}),i=n.useInnerBlocksProps.save(a);return(0,o.jsx)("ul",{...i,id:"jetpack-sharing-serivces-list"})}},48715:(e,t,r)=>{"use strict";varn=r(85985),s=r(18692);(0,n.vp)(s.U,s.W)},18692:(e,t,r)=>{"use strict";r.d(t,{U:()=>u,W:()=>d});varn=r(56427),s=r(47143),o=r(86087),a=r(27723),i=r(71046),l=r(90062),c=r(10790);const__=a.__,u="shortlinks",d={render:()=>(0,c.jsx)(h,{})};classpextendso.Component{render(){const{shortlink:e}=this.props;returne?(0,c.jsx)(l.A,{children:(0,c.jsx)(n.PanelBody,{title:__("Shortlink","jetpack"),className:"jetpack-shortlinks__panel",initialOpen:!1,children:(0,c.jsx)(i.A,{link:e})})}):null}}consth=(0,s.withSelect)((e=>{constt=e("core/editor").getCurrentPost();return{shortlink:t?.jetpack_shortlink??""}}))(p)},94247:(e,t,r)=>{"use strict";r.d(t,{H:()=>c,o:()=>u});varn=r(94715),s=r(56427),o=r(86087),a=r(27723),i=r(66087),l=r(10790);const__=a.__,_x=a._x;functionc({attributes:{autoplay:e,delay:t,effect:r,images:n,sizeSlug:a},imageSizeOptions:c,onChangeImageSize:u,setAttributes:d}){constp="undefined"!=typeofwindow&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,h=[{label:_x("Slide","Slideshow transition effect","jetpack"),value:"slide"},{label:_x("Fade","Slideshow transition effect","jetpack"),value:"fade"}];return(0,l.jsxs)(o.Fragment,{children:[(0,l.jsxs)(s.PanelBody,{title:__("Autoplay","jetpack"),children:[(0,l.jsx)(s.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Autoplay","jetpack"),help:__("Autoplay between slides","jetpack"),checked:e,onChange:e=>{d({autoplay:e})}}),e&&(0,l.jsx)(s.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Delay between transitions (in seconds)","jetpack"),value:t,onChange:e=>{d({delay:e})},min:1,max:5}),e&&p&&(0,l.jsx)("span",{children:__("The Reduce Motion accessibility option is selected, therefore autoplay will be disabled in this browser.","jetpack")})]}),(0,l.jsx)(s.PanelBody,{title:__("Effects","jetpack"),children:(0,l.jsx)(s.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Transition","jetpack"),value:r,onChange:e=>{d({effect:e})},options:h})}),!(0,i.isEmpty)(n)&&!(0,i.isEmpty)(c)&&(0,l.jsx)(s.PanelBody,{title:__("Image Settings","jetpack"),children:(0,l.jsx)(s.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Size","jetpack"),value:a,options:c,onChange:e=>u(e)})})]})}functionu({allowedMediaTypes:e,attributes:{images:t},onSelectImages:r}){return(0,l.jsx)(o.Fragment,{children:!!t.length&&(0,l.jsx)(s.ToolbarGroup,{children:(0,l.jsx
__("Go to slide %s","jetpack"),e)+'"></button>'}elses+=`<div class="swiper-pagination-simple">${t} / ${r}</div>`;returns}},16445:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});varn=r(63162),s=r(94715),o=r(56427),a=r(86087),i=r(27723),l=r(13022),c=r(66087),u=r(94107),d=r(39126),p=r(31837),h=r(57464),m=r(10790);const__=i.__;classgextendsa.Component{pendingRequestAnimationFrame=null;resizeObserver=null;staticdefaultProps={effect:"slide"};constructor(e){super(e),this.slideshowRef=(0,a.createRef)(),this.btnNextRef=(0,a.createRef)(),this.btnPrevRef=(0,a.createRef)(),this.paginationRef=(0,a.createRef)()}componentDidMount(){const{onError:e}=this.props;this.buildSwiper().then((e=>{this.swiperInstance=e,this.initializeResizeObserver(e)})).catch((()=>{e(__("The Swiper library could not be loaded.","jetpack"))}))}componentWillUnmount(){this.clearResizeObserver(),this.clearPendingRequestAnimationFrame()}componentDidUpdate(e){const{align:t,autoplay:r,delay:n,effect:s,images:o,onError:a}=this.props;if(t===e.align&&(0,c.isEqual)(o,e.images)||this.swiperInstance&&this.swiperInstance.update(),s!==e.effect||r!==e.autoplay||n!==e.delay||o!==e.images){lett;t=this.swiperIndex?o.length===e.images.length?this.swiperInstance.realIndex:e.images.length:0,this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.buildSwiper(t).then((e=>{this.swiperInstance=e,this.initializeResizeObserver(e)})).catch((()=>{a(__("The Swiper library could not be loaded.","jetpack"))}))}}initializeResizeObserver=e=>{this.clearResizeObserver(),this.resizeObserver=newu.A((()=>{this.clearPendingRequestAnimationFrame(),this.pendingRequestAnimationFrame=requestAnimationFrame((()=>{(0,h.bz)(e),e.update()}))})),this.resizeObserver.observe(e.el)};clearPendingRequestAnimationFrame=()=>{this.pendingRequestAnimationFrame&&(cancelAnimationFrame(this.pendingRequestAnimationFrame),this.pendingRequestAnimationFrame=null)};clearResizeObserver=()=>{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)};render(){if(!this.props?.images?.length)returnnull;const{autoplay:e,className:t,delay:r,effect:a,images:i}=this.props;return(0,m.jsx)("div",{className:t,"data-autoplay":e||null,"data-delay":e?r:null,"data-effect":a,children:(0,m.jsxs)("div",{className:"wp-block-jetpack-slideshow_container swiper-container",ref:this.slideshowRef,children:[(0,m.jsx)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper",children:i.map((({alt:e,caption:t,id:r,url:a})=>(0,m.jsx)("li",{className:(0,l.A)("wp-block-jetpack-slideshow_slide","swiper-slide",(0,n.isBlobURL)(a)&&"is-transient"),children:(0,m.jsxs)("figure",{children:[(0,m.jsx)("img",{alt:e,className:`wp-block-jetpack-slideshow_image wp-image-${r}`,"data-id":r,src:a}),(0,n.isBlobURL)(a)&&(0,m.jsx)(o.Spinner,{}),t&&(0,m.jsx)(s.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:t})]})},r||a)))}),(0,m.jsx)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),(0,m.jsx)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),(0,m.jsx)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),(0,m.jsx)("div",{className:"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white",ref:this.paginationRef})]})})}prefersReducedMotion=()=>"undefined"!=typeofwindow&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;buildSwiper=(e=0)=>(0,d.A)(this.slideshowRef.current,{autoplay:!(!this.props.autoplay||this.prefersReducedMotion())&&{delay:1e3*this.props.delay,disableOnInteraction:!1},effect:this.props.effect,loop:!0,initialSlide:e,navigation:{nextEl:this.btnNextRef.current,prevEl:this.btnPrevRef.current},pagination:{clickable:!0,el:this.paginationRef.current,type:"custom",renderCustom:p.y}},{init:h.rQ,imagesReady:h.bz,paginationRender:h.n7,transitionEnd:h.WF})}constf=g},82233:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});constn={h
__("Go to slide %s","jetpack"),e)+'"></button>'}elses+=`<div class="swiper-pagination-simple">${t} / ${r}</div>`;returns}},41952:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});varn=r(94715),s=r(241),o=r(10790);consta=({attributes:{align:e,autoplay:t,delay:r,effect:a,images:i},className:l})=>{constc=n.useBlockProps.save({className:l});return(0,o.jsx)(s.A,{align:e,autoplay:t,className:c.className,delay:r,effect:a,images:i})}},241:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});varn=r(63162),s=r(94715),o=r(56427),a=r(86087),i=r(27723),l=r(13022),c=r(66087),u=r(94107),d=r(33170),p=r(30889),h=r(34308),m=r(10790);const__=i.__;classgextendsa.Component{pendingRequestAnimationFrame=null;resizeObserver=null;staticdefaultProps={effect:"slide"};constructor(e){super(e),this.slideshowRef=(0,a.createRef)(),this.btnNextRef=(0,a.createRef)(),this.btnPrevRef=(0,a.createRef)(),this.paginationRef=(0,a.createRef)()}componentDidMount(){const{onError:e}=this.props;this.buildSwiper().then((e=>{this.swiperInstance=e,this.initializeResizeObserver(e)})).catch((()=>{e(__("The Swiper library could not be loaded.","jetpack"))}))}componentWillUnmount(){this.clearResizeObserver(),this.clearPendingRequestAnimationFrame()}componentDidUpdate(e){const{align:t,autoplay:r,delay:n,effect:s,images:o,onError:a}=this.props;if(t===e.align&&(0,c.isEqual)(o,e.images)||this.swiperInstance&&this.swiperInstance.update(),s!==e.effect||r!==e.autoplay||n!==e.delay||o!==e.images){lett;t=this.swiperIndex?o.length===e.images.length?this.swiperInstance.realIndex:e.images.length:0,this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.buildSwiper(t).then((e=>{this.swiperInstance=e,this.initializeResizeObserver(e)})).catch((()=>{a(__("The Swiper library could not be loaded.","jetpack"))}))}}initializeResizeObserver=e=>{this.clearResizeObserver(),this.resizeObserver=newu.A((()=>{this.clearPendingRequestAnimationFrame(),this.pendingRequestAnimationFrame=requestAnimationFrame((()=>{(0,h.bz)(e),e.update()}))})),this.resizeObserver.observe(e.el)};clearPendingRequestAnimationFrame=()=>{this.pendingRequestAnimationFrame&&(cancelAnimationFrame(this.pendingRequestAnimationFrame),this.pendingRequestAnimationFrame=null)};clearResizeObserver=()=>{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)};render(){if(!this.props?.images?.length)returnnull;const{autoplay:e,className:t,delay:r,effect:a,images:i}=this.props;return(0,m.jsx)("div",{className:t,"data-autoplay":e||null,"data-delay":e?r:null,"data-effect":a,style:{"--aspect-ratio":i[0]?.aspectRatio?`calc(${i[0].aspectRatio})`:void0},children:(0,m.jsxs)("div",{className:"wp-block-jetpack-slideshow_container swiper",ref:this.slideshowRef,children:[(0,m.jsx)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper",children:i.map((({alt:e,caption:t,id:r,url:a,aspectRatio:i},c)=>(0,m.jsx)("li",{className:(0,l.A)("wp-block-jetpack-slideshow_slide","swiper-slide",(0,n.isBlobURL)(a)&&"is-transient"),children:(0,m.jsxs)("figure",{children:[(0,m.jsx)("img",{alt:e,className:`wp-block-jetpack-slideshow_image wp-image-${r}`,"data-id":r,"data-aspect-ratio":i,src:a}),(0,n.isBlobURL)(a)&&(0,m.jsx)(o.Spinner,{}),t&&(0,m.jsx)(s.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:t})]})},r?`${r}-${c}`:`${a}-${c}`)))}),(0,m.jsx)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),(0,m.jsx)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),(0,m.jsx)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),(0,m.jsx)("div",{className:"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white",ref:this.paginationRef})]})})}prefersReducedMotion=()=>"undefined"!=typeofwindow&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;buildSwiper=(e=0)=>(0,d.A)(this.slideshowRef.current,{autoplay:!(!this.props.autoplay||this.p
_n("<span>%s reader</span> issubscribed.","<span>%s readers</span> aresubscribed.",M,"jetpack"),(0,o.qe)(M,{numberFormatOptions:{maximumFractionDigits:1}})),{span:(0,h.jsx)("span",{style:{fontWeight:"bold"}})})}),_&&(0,h.jsx)(a.__experimentalPanelColorGradientSettings,{title:__("Color","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",settings:[{colorValue:r.color,onColorChange:T,gradientValue:g.gradientValue,onGradientChange:g.setGradient,label:__("Button Background","jetpack")},{colorValue:L.color,onColorChange:B,label:__("Button Text","jetpack")},{colorValue:m.color,onColorChange:N,label:__("Border","jetpack")}],initialOpen:!0,children:(0,h.jsx)(a.ContrastChecker,{fontSize:j.size,textColor:L.color,backgroundColor:k.color,fallbackButtonBackgroundColor:y,fallbackTextColor:x})}),!_&&(0,h.jsx)(a.PanelColorSettings,{title:__("Background Colors","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",colorSettings:[{value:r.color,onChange:T,label:__("Button Background Color","jetpack")},{value:L.color,onChange:B,label:__("Button Text Color","jetpack")},{value:m.color,onColorChange:N,label:__("Border Color","jetpack")}],initialOpen:!1,children:(0,h.jsx)(a.ContrastChecker,{fontSize:j.size,textColor:L.color,backgroundColor:k.color,fallbackButtonBackgroundColor:y,fallbackTextColor:x})}),(0,h.jsx)(i.PanelBody,{title:__("Typography","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__textpanel",children:(0,h.jsx)(a.FontSizePicker,{withSlider:!0,value:j.size,onChange:e=>{constt=e||p.Fm;E({fontSize:t,customFontSize:t})},__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}),(0,h.jsxs)(i.PanelBody,{title:__("Border","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__borderpanel",children:[(0,h.jsx)(i.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:f,label:__("Border Radius","jetpack"),min:p.rG,max:p.Bs,initialPosition:p.Kn,allowReset:!0,onChange:e=>E({borderRadius:e})}),(0,h.jsx)(i.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:b,label:__("Border Weight","jetpack"),min:p.ZS,max:p.JD,initialPosition:p.aS,allowReset:!0,onChange:e=>E({borderWeight:e})})]}),(0,h.jsxs)(i.PanelBody,{title:__("Spacing","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__spacingpanel",children:[(0,h.jsx)(i.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:C,label:__("Space Inside","jetpack"),min:p.rE,max:p.Vy,initialPosition:p.oi,allowReset:!0,onChange:e=>E({padding:e})}),(0,h.jsx)(i.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:I,label:__("Space Between","jetpack"),min:p.Hq,max:p.Zi,initialPosition:p.E,allowReset:!0,onChange:e=>E({spacing:e})}),(0,h.jsx)(d.s,{width:R,onChange:e=>{E({buttonWidth:e,buttonOnNewLine:v||"100%"===e})}})]}),(0,h.jsxs)(i.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__displaypanel",children:[(0,h.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Show subscriber count","jetpack"),checked:P,onChange:()=>{E({showSubscribersTotal:!P,includeSocialFollowers:void0!==w&&w})},help:()=>{if(!M||M<1)return__("This will remain hidden until there is at least one subscriber.","jetpack")}}),O&&(0,h.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!P,label:__("Include social followers in count","jetpack"),checked:void0===w||w,onChange:()=>{E({includeSocialFollowers:void0!==w&&!w})}}),(0,h.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Place button on new line","jetpack"),checked:v,onChange:()=>{E({buttonOnNewLine:!v})}}),(0,h.jsx)(i.TextareaControl,{__nextHasNoMarginBottom:!0,value:D,label:__("Input placeholder text","jetpack"),help:__("Edit the placeholder text of the email address input.","jetpack"),onChange:e=>E({subscribePlaceholder:e})}),!(0,n.isSimpleSite)()&&(0,h.jsx)(i.TextareaControl,{__nextHasNoMarginBottom:!0,value:F,label:__("Success message","jetpack"),help:__("Edit the message displayed when a user subscribes.","jetpack"),onChange:e=>E({successMessage:e})}),t&&
_n("Join %s other subscriber","Join %s other subscribers",n,"jetpack"),(0,s.qe)(n,{numberFormatOptions:{maximumFractionDigits:1}}))}})),{availableNewsletterCategories:Q,areNewsletterCategoriesEnabled:X}=(0,l.useSelect)((e=>{constt=e(f.M);return{availableNewsletterCategories:t.getNewsletterCategories(),areNewsletterCategoriesEnabled:t.getNewsletterCategoriesEnabled()}})),ee=w({gradientAttribute:"emailFieldGradient",customGradientAttribute:"customEmailFieldGradient"}),te=w({gradientAttribute:"buttonGradient",customGradientAttribute:"customButtonGradient"}),re={"no-border-radius":0===L,[B.class]:B.class,"has-text-color":A.color,[A.class]:A.class},ne={...re,"has-background":n.color||ee.gradientValue,[n.class]:!ee.gradientValue&&n.class,[ee.gradientClass]:ee.gradientClass},se={...re,"has-background":x.color||te.gradientValue,[x.class]:!te.gradientValue&&x.class,[te.gradientClass]:te.gradientClass},oe=e=>e||v.E,ae={color:A.color,borderColor:N.color,borderRadius:L?L+"px":v.Kn+"px",borderWidth:R?R+"px":v.aS+"px",fontSize:B.size?B.size:v.Fm,padding:(e=>{constt=e||v.oi;returnt+"px "+Math.round(1.5*t)+"px "+t+"px "+Math.round(1.5*t)+"px"})(z)},ie={"--subscribe-block-border-radius":L?L+"px":v.Kn+"px"},le={...ae,...!n.color&&ee.gradientValue?{background:ee.gradientValue}:{backgroundColor:n.color}},ce={...ae,...!x.color&&te.gradientValue?{background:te.gradientValue}:{backgroundColor:x.color},width:D?.length?D:"auto"};"button"!==J&&(W?ce.marginTop=oe(V)+"px":ce.marginLeft=oe(V)+"px");constue=(0,i.usePrevious)(x);return(0,c.useEffect)((()=>{ue?.color===N?.color&&N?.color!==x?.color&&T(x.color)}),[x,ue,N,T]),(0,y.jsxs)("div",{...I,className:(0,d.A)(I.className,"wp-block-jetpack-subscriptions__container","wp-block-jetpack-subscriptions__supports-newline",W?"wp-block-jetpack-subscriptions__use-newline":void0,$?"wp-block-jetpack-subscriptions__show-subs":void0),children:[(0,y.jsx)(o.InspectorControls,{children:(0,y.jsx)(k.A,{areNewsletterCategoriesEnabled:X,availableNewsletterCategories:Q,buttonBackgroundColor:x,borderColor:N,buttonGradient:te,borderRadius:L,borderWeight:R,buttonOnNewLine:W,emailFieldBackgroundColor:n,fallbackButtonBackgroundColor:C,fallbackTextColor:S,fontSize:B,includeSocialFollowers:O,isGradientAvailable:j,padding:z,preselectNewsletterCategories:U,setAttributes:r,setBorderColor:T,setButtonBackgroundColor:_,setTextColor:E,showSubscribersTotal:$,spacing:V,subscriberCount:K,textColor:A,buttonWidth:D,selectedNewsletterCategoryIds:H,subscribePlaceholder:G,submitButtonText:q,successMessage:Z})}),(0,y.jsx)(o.BlockControls,{children:(0,y.jsx)(a.ToolbarGroup,{children:(0,y.jsx)(a.ToolbarButton,{href:(0,g.Qu)(P),target:"_blank",children:P?_x("Manage plans","unused context to distinguish translations","jetpack"):__("Set up a paid plan","jetpack")})})}),(0,y.jsxs)("div",{style:ie,children:[(0,y.jsx)("div",{className:"wp-block-jetpack-subscriptions__container is-not-subscriber",children:(0,y.jsx)("div",{className:"wp-block-jetpack-subscriptions__form",role:"form",children:(0,y.jsxs)("div",{className:"wp-block-jetpack-subscriptions__form-elements",children:["button"!==J&&(0,y.jsx)(a.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,placeholder:G,disabled:!0,className:(0,d.A)(ne,"wp-block-jetpack-subscriptions__textfield"),style:le}),(0,y.jsx)(o.RichText,{className:(0,d.A)(se,"wp-block-jetpack-subscriptions__button","wp-block-button__link"),onChange:e=>r({submitButtonText:e}),style:ce,value:q,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/strikethrough"]})]})})}),$&&(0,y.jsx)("div",{className:"wp-block-jetpack-subscriptions__subscount",children:Y})]})]})}))},13554:(e,t,r)=>{"use strict";varn=r(85985),s=r(74997),o=r(47143),a=r(43656),i=r(86087),l=r(52619),c=r(27723),u=r(67709),d=r(62599),p=r(94375),h=r(99876),m=r(63200),g=r(39025),f=r(38387),b=r(3722),v=r(74500),k=r(48313),y=r(10790);const__=c.__,x=h.name.replace("jetpack/","");(0,p.M)(h,{edit:f.h,transforms:{from:[{type:"block",isMultiBlock:!1,blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"blog_subscri
__("image %1$d of %2$d in gallery","jetpack"),t+1,r.length);return(0,d.jsx)(l.A,{alt:e.alt,"aria-label":a,height:e.height,id:e.id,origUrl:e.url,isSelected:s===t,link:e.link,linkTo:n,url:this.photonize(e),width:e.width},t)}render(){const{align:e,children:t,className:r,columns:n,images:s,layoutStyle:o}=this.props,a=h(o)?u.A:c.A,i=this.props.images.map(this.renderImage,this);return(0,d.jsxs)("div",{className:r,children:[(0,d.jsx)(a,{align:e,columns:n,images:s,layoutStyle:o,renderedImages:i}),t]})}}functionh(e){return["circle","square"].includes(e)}functionm(e,t={}){constr={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},n=Object.assign(newURL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,s]ofObject.entries(t))n.searchParams.set(Object.hasOwn(r,e)?r[e]:e,s);returnn.toString()}},58070:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});varn=r(86087),s=r(94107),o=r(29971),a=r(75303),i=r(56237),l=r(34896),c=r(5236),u=r(10790);classdextendsn.Component{gallery=(0,n.createRef)();pendingRaf=null;ro=null;componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}handleGalleryResize=e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame((()=>{for(const{contentRect:t,target:r}ofe){const{width:e}=t;(0,c.S)(r).forEach((t=>(0,c.r)(t,e)))}}))};triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=news.A(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}render(){const{align:e,columns:t,images:r,layoutStyle:n,renderedImages:s}=this.props,c=(0,l.mJ)(r),d="columns"===n?(0,l.FL)(c,t):(0,l.VU)(c,{isWide:["full","wide"].includes(e)});letp=0;return(0,u.jsx)(a.A,{galleryRef:this.gallery,children:d.map(((e,t)=>(0,u.jsx)(i.A,{children:e.map(((e,t)=>{constr=s.slice(p,p+e);returnp+=e,(0,u.jsx)(o.A,{children:r},t)}))},t)))})}}},34896:(e,t,r)=>{"use strict";r.d(t,{FL:()=>a,VU:()=>C,mJ:()=>s});varn=r(66087);functions(e){returne.map(o)}functiono({height:e,width:t}){returne&&t?t/e:1}functiona(e,t){if(e.length<=t)return[Array(e.length).fill(1)];constr=(0,n.sum)(e)/t,s=[];leto=e,a=0;for(lete=0;e<t-1;e++){constt=(0,n.takeWhile)(o,(t=>{constn=a<=(e+1)*r;returnn&&(a+=t),n})).length;s.push(t),o=o.slice(t)}returns.push(o.length),[s]}consti=A([2,1,2],5),l=S([E,E,N,E,E]),c=S([E,E,E,N,E,E,E]),u=A([3,1,3],5),d=S([N,E,E,N]),p=A([1,2,1],5),h=S([N,E,E,E]),m=A([1,3],3),g=S([E,E,E,N]),f=A([3,1],3),b=S([B(1.6),(0,n.overEvery)(T(.9),B(2)),(0,n.overEvery)(T(.9),B(2))]),v=A([1,2],3),k=A([1,1,1,1,1],1),y=A([1,1,1,1],1),x=A([1,1,1],3),j=S([(0,n.overEvery)(T(.9),B(2)),(0,n.overEvery)(T(.9),B(2)),B(1.6)]),w=A([2,1],3),_=S([function(e){returne>=2}]);functionC(e,{isWide:t}={}){constr=(e,s)=>{if(!s.length)returne;leto;o=s.length>15&&l(s)&&i(e)?[2,1,2]:s.length>15&&c(s)&&u(e)?[3,1,3]:5!==s.length&&d(s)&&p(e)?[1,2,1]:h(s)&&m(e)?[1,3]:g(s)&&f(e)?[3,1]:b(s)&&v(e)?[1,2]:t&&(5===s.length||10!==s.length&&s.length>6)&&k(e)&&(0,n.sum)(s.slice(0,5))<5?[1,1,1,1,1]:function(e,t){constr=(0,n.sum)(t.slice(0,4));returny(e)&&r<3.5&&t.length>5||r<7&&4===t.length}(e,s)?[1,1,1,1]:function(e,t,r){consts=(0,n.sum)(t.slice(0,3));returnt.length>=3&&4!==t.length&&6!==t.length&&x(e)&&(s<2.5||s<5&&t.length>=3&&t[0]===t[2]||r)}(e,s,t)?[1,1,1]:j(s)&&w(e)?[2,1]:_(s)?[1]:s.length>3?[1,1]:Array(s.length).fill(1);consta=e.concat([o]),C=(0,n.sum)(o),A=s.slice(C);returnr(a,A)};returnr([],e)}functionA(e,t){returnr=>!r.slice(-t).some((t=>(0,n.isEqual)(t,e)))}functionS(e){returnt=>t.length>=e.length&&(0,n.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))).every(
__("image %1$d of %2$d in gallery","jetpack"),t+1,o.length),{src:h,srcSet:m}=(0,l.A)(e,{layoutStyle:c});return(0,d.jsx)(i.A,{alt:e.alt,"aria-label":p,columns:r,height:e.height,id:e.id,imageFilter:n,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:u===t,link:e.link,linkTo:a,origUrl:e.url,showMovers:o.length>1,srcSet:m,url:h,width:e.width},t)}render(){const{align:e,children:t,className:r,columns:n,images:s,layoutStyle:i,roundedCorners:p}=this.props,h=(0,l.s)(i)?u.A:c.A,m=this.props.images.map(this.renderImage,this),g=i!==a.aQ?Math.min(p,a.WN):0;return(0,d.jsxs)("div",{className:(0,o.A)(r,{[`has-rounded-corners-${g}`]:g>0}),children:[(0,d.jsx)(h,{align:e,columns:n,images:s,layoutStyle:i,renderedImages:m}),t]})}}},84255:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});varn=r(86087),s=r(84394),o=r(38548),a=r(70954),i=r(89195),l=r(10790);classcextendsn.Component{gallery=(0,n.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:r,layoutStyle:n,renderedImages:c}=this.props,u=(0,i.mJ)(r),d="columns"===n?(0,i.FL)(u,t):(0,i.VU)(u,{isWide:["full","wide"].includes(e)});letp=0;return(0,l.jsx)(o.A,{galleryRef:this.gallery,children:d.map(((e,t)=>(0,l.jsx)(a.A,{children:e.map(((e,t)=>{constr=c.slice(p,p+e);returnp+=e,(0,l.jsx)(s.A,{children:r},t)}))},t)))})}}},89195:(e,t,r)=>{"use strict";r.d(t,{FL:()=>a,VU:()=>C,mJ:()=>s});varn=r(66087);functions(e){returne.map(o)}functiono({height:e,width:t}){returne&&t?t/e:1}functiona(e,t){if(e.length<=t)return[Array(e.length).fill(1)];constr=(0,n.sum)(e)/t,s=[];leto=e,a=0;for(lete=0;e<t-1;e++){constt=(0,n.takeWhile)(o,(t=>{constn=a<=(e+1)*r;returnn&&(a+=t),n})).length;s.push(t),o=o.slice(t)}returns.push(o.length),[s]}consti=A([2,1,2],5),l=S([E,E,N,E,E]),c=S([E,E,E,N,E,E,E]),u=A([3,1,3],5),d=S([N,E,E,N]),p=A([1,2,1],5),h=S([N,E,E,E]),m=A([1,3],3),g=S([E,E,E,N]),f=A([3,1],3),b=S([B(1.6),(0,n.overEvery)(T(.9),B(2)),(0,n.overEvery)(T(.9),B(2))]),v=A([1,2],3),k=A([1,1,1,1,1],1),y=A([1,1,1,1],1),x=A([1,1,1],3),j=S([(0,n.overEvery)(T(.9),B(2)),(0,n.overEvery)(T(.9),B(2)),B(1.6)]),w=A([2,1],3),_=S([function(e){returne>=2}]);functionC(e,{isWide:t}={}){constr=(e,s)=>{if(!s.length)returne;leto;o=s.length>15&&l(s)&&i(e)?[2,1,2]:s.length>15&&c(s)&&u(e)?[3,1,3]:5!==s.length&&d(s)&&p(e)?[1,2,1]:h(s)&&m(e)?[1,3]:g(s)&&f(e)?[3,1]:b(s)&&v(e)?[1,2]:t&&(5===s.length||10!==s.length&&s.length>6)&&k(e)&&(0,n.sum)(s.slice(0,5))<5?[1,1,1,1,1]:function(e,t){constr=(0,n.sum)(t.slice(0,4));returny(e)&&r<3.5&&t.length>5||r<7&&4===t.length}(e,s)?[1,1,1,1]:function(e,t,r){consts=(0,n.sum)(t.slice(0,3));returnt.length>=3&&4!==t.length&&6!==t.length&&x(e)&&(s<2.5||s<5&&t.length>=3&&t[0]===t[2]||r)}(e,s,t)?[1,1,1]:j(s)&&w(e)?[2,1]:_(s)?[1]:s.length>3?[1,1]:Array(s.length).fill(1);consta=e.concat([o]),C=(0,n.sum)(o),A=s.slice(C);returnr(a,A)};returnr([],e)}functionA(e,t){returnr=>!r.slice(-t).some((t=>(0,n.isEqual)(t,e)))}functionS(e){returnt=>t.length>=e.length&&(0,n.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))).every(Boolean)}functionE(e){returne>=1&&e<2}functionN(e){returne<1}functionT(e){returnt=>t>=e}functionB(e){returnt=>t<e}},70954:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});varn=r(13022),s=r(10790);functiono({children:e,className:t}){return(0,s.jsx)("div",{className:(0,n.A)("tiled-gallery__row",t),children:e})}},51475:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});varn=r(66087),s=r(43566),o=r(84394),a=r(38548),i=r(70954),l=r(10790);functionc({columns:e,renderedImages:t}){constr=Math.min(s.ZS,e),c=t.length%r;return(0,l.jsx)(a.A,{children:[...c?[t.slice(0,c)]:[],...(0,n.chunk)(t.slice(c),r)].map(((e,t)=>(0,l.jsx)(i.A,{className:`columns-${e.length}`,children:e.map(((e,t)=>(0,l.jsx)(o.A,{children:e},t)))},t)))})}},14294:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});varn=r(90907),s=r(43566),o=r(65378),a=r(10790);functioni(e){returnMath.min(3,e.images.length)}functionl({attributes:e}){const{imageFilter:t,images:r}=e;if(!r.length)returnnull;const{align:l,className:c,columns:u=i(e),linkTo:d,roundedCorners:p}=e;return(0,a.jsx)(o.A,{align:l,className:c,columns:u,imageFilter:t,images:r
__("image %1$d of %2$d in gallery","jetpack"),t+1,o.length),{src:k,srcSet:y}=(0,l.A)(e,{layoutStyle:u});return(0,d.jsx)(i.A,{alt:e.alt,"aria-label":v,columns:r,height:e.height,id:e.id,imageFilter:n,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:f===t,link:e.link,linkTo:c,onMoveBackward:a?void0:p(t),onMoveForward:a?void0:h(t),onRemove:a?void0:m(t),onSelect:a?void0:g(t),origUrl:e.url,setAttributes:a?void0:b(t),showMovers:o.length>1,srcSet:y,url:k,width:e.width},t)}render(){const{align:e,children:t,className:r,columns:n,images:s,layoutStyle:i,roundedCorners:p,onResize:h,isSave:m,columnWidths:g}=this.props,f=(0,l.s)(i)?u.A:c.A,b=this.props.images.map(this.renderImage,this),v=i!==a.aQ?Math.min(p,a.WN):0;return(0,d.jsxs)("div",{className:(0,o.A)(r,{[`has-rounded-corners-${v}`]:v>0}),children:[(0,d.jsx)(f,{align:e,columns:n,columnWidths:m?g:void0,images:s,layoutStyle:i,renderedImages:b,onResize:m?void0:h}),t]})}}},56420:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});varn=r(86087),s=r(54001),o=r(99309),a=r(46479),i=r(70394),l=r(10790);classcextendsn.Component{gallery=(0,n.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:r,layoutStyle:n,renderedImages:c,columnWidths:u}=this.props,d=(0,i.mJ)(r),p="columns"===n?(0,i.FL)(d,t):(0,i.VU)(d,{isWide:["full","wide"].includes(e)});leth=0;return(0,l.jsx)(o.A,{galleryRef:this.gallery,children:p.map(((e,t)=>(0,l.jsx)(a.A,{children:e.map(((e,r)=>{constn=c.slice(h,h+e);returnh+=e,(0,l.jsx)(s.A,{width:u?.[t]?.[r],children:n},r)}))},t)))})}}},70394:(e,t,r)=>{"use strict";r.d(t,{FL:()=>a,VU:()=>C,mJ:()=>s});varn=r(66087);functions(e){returne.map(o)}functiono({height:e,width:t}){returne&&t?t/e:1}functiona(e,t){if(e.length<=t)return[Array(e.length).fill(1)];constr=(0,n.sum)(e)/t,s=[];leto=e,a=0;for(lete=0;e<t-1;e++){constt=(0,n.takeWhile)(o,(t=>{constn=a<=(e+1)*r;returnn&&(a+=t),n})).length;s.push(t),o=o.slice(t)}returns.push(o.length),[s]}consti=A([2,1,2],5),l=S([E,E,N,E,E]),c=S([E,E,E,N,E,E,E]),u=A([3,1,3],5),d=S([N,E,E,N]),p=A([1,2,1],5),h=S([N,E,E,E]),m=A([1,3],3),g=S([E,E,E,N]),f=A([3,1],3),b=S([B(1.6),(0,n.overEvery)(T(.9),B(2)),(0,n.overEvery)(T(.9),B(2))]),v=A([1,2],3),k=A([1,1,1,1,1],1),y=A([1,1,1,1],1),x=A([1,1,1],3),j=S([(0,n.overEvery)(T(.9),B(2)),(0,n.overEvery)(T(.9),B(2)),B(1.6)]),w=A([2,1],3),_=S([function(e){returne>=2}]);functionC(e,{isWide:t}={}){constr=(e,s)=>{if(!s.length)returne;leto;o=s.length>15&&l(s)&&i(e)?[2,1,2]:s.length>15&&c(s)&&u(e)?[3,1,3]:5!==s.length&&d(s)&&p(e)?[1,2,1]:h(s)&&m(e)?[1,3]:g(s)&&f(e)?[3,1]:b(s)&&v(e)?[1,2]:t&&(5===s.length||10!==s.length&&s.length>6)&&k(e)&&(0,n.sum)(s.slice(0,5))<5?[1,1,1,1,1]:function(e,t){constr=(0,n.sum)(t.slice(0,4));returny(e)&&r<3.5&&t.length>5||r<7&&4===t.length}(e,s)?[1,1,1,1]:function(e,t,r){consts=(0,n.sum)(t.slice(0,3));returnt.length>=3&&4!==t.length&&6!==t.length&&x(e)&&(s<2.5||s<5&&t.length>=3&&t[0]===t[2]||r)}(e,s,t)?[1,1,1]:j(s)&&w(e)?[2,1]:_(s)?[1]:s.length>3?[1,1]:Array(s.length).fill(1);consta=e.concat([o]),C=(0,n.sum)(o),A=s.slice(C);returnr(a,A)};returnr([],e)}functionA(e,t){returnr=>!r.slice(-t).some((t=>(0,n.isEqual)(t,e)))}functionS(e){returnt=>t.length>=e.length&&(0,n.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))).every(Boolean)}functionE(e){returne>=1&&e<2}functionN(e){returne<1}functionT(e){returnt=>t>=e}functionB(e){returnt=>t<e}},46479:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});varn=r(13022),s=r(10790);functiono({children:e,className:t}){return(0,s.jsx)("div",{className:(0,n.A)("tiled-gallery__row",t),children:e})}},65216:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});varn=r(66087),s=r(60041),o=r(54001),a=r(99309),i=r(46479),l=r(10790);functionc({columns:e,renderedImages:t}){constr=Math.min(s.ZS,e),c=t.length%r;return(0,l.jsx)(a.A,{children:[...c?[t.slice(0,c)]:[],...(0,n.chunk)(t.slice(c),r)].map(((e,t)=>(0,l.jsx)(i.A,{className:`columns-${e.length}`,children:e.map(((e,t)=>(0,l.jsx)(o.A,{children:e},t)))},t)))})}},28635:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});varn=r(90907),s=r(60041),o=r(77511),a=r(10790);functioni(e){returnMath.min(3,e
__("image %1$d of %2$d in gallery","jetpack"),t+1,o.length),{src:k,srcSet:y}=(0,l.A)(e,{layoutStyle:u});return(0,d.jsx)(i.A,{alt:e.alt,"aria-label":v,columns:r,height:e.height,id:e.id,imageFilter:n,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:f===t,link:e.link,linkTo:c,onMoveBackward:a?void0:p(t),onMoveForward:a?void0:h(t),onRemove:a?void0:m(t),onSelect:a?void0:g(t),origUrl:e.url,setAttributes:a?void0:b(t),showMovers:o.length>1,srcSet:y,url:k,width:e.width},t)}render(){const{align:e,children:t,className:r,columns:n,images:s,layoutStyle:i,roundedCorners:p,onResize:h,style:m,isSave:g,columnWidths:f}=this.props,b=(0,l.s)(i)?u.A:c.A,v=this.props.images.map(this.renderImage,this),k=i!==a.aQ?Math.min(p,a.WN):0;return(0,d.jsxs)("div",{style:m,className:(0,o.A)(r,{[`has-rounded-corners-${k}`]:k>0}),children:[(0,d.jsx)(b,{align:e,columns:n,columnWidths:g?f:void0,images:s,layoutStyle:i,renderedImages:v,onResize:g?void0:h}),t]})}}},91341:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});varn=r(86087),s=r(94107),o=r(78608),a=r(52042),i=r(9276),l=r(71245),c=r(86461),u=r(10790);classdextendsn.Component{gallery=(0,n.createRef)();pendingRaf=null;ro=null;componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}handleGalleryResize=e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame((()=>{for(const{contentRect:t,target:r}ofe){const{width:e}=t,n=[];(0,c.S)(r).forEach((t=>{n.push((0,c.r)(t,e))})),void0!==this.props.onResize&&this.props.onResize(n)}}))};triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=news.A(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}getColumnWidths(e,t,r){letn=0;returne.map((e=>e.map((e=>{constr=t.slice(n,n+e);returnn+=e,r})))).map((e=>(0,c.r)(e,r)))}render(){const{align:e,columns:t,images:r,layoutStyle:s,renderedImages:c}=this.props,d=(0,l.mJ)(r),p="columns"===s?(0,l.FL)(d,t):(0,l.VU)(d,{isWide:["full","wide"].includes(e)}),h=n.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(p,c,1e3)})();letm=0;return(0,u.jsx)(a.A,{galleryRef:this.gallery,children:p.map(((e,t)=>(0,u.jsx)(i.A,{children:e.map(((e,r)=>{constn=c.slice(m,m+e);returnm+=e,(0,u.jsx)(o.A,{width:h?.[t]?.[r],children:n},r)}))},t)))})}}},71245:(e,t,r)=>{"use strict";r.d(t,{FL:()=>a,VU:()=>C,mJ:()=>s});varn=r(66087);functions(e){returne.map(o)}functiono({height:e,width:t}){returne&&t?t/e:1}functiona(e,t){if(e.length<=t)return[Array(e.length).fill(1)];constr=(0,n.sum)(e)/t,s=[];leto=e,a=0;for(lete=0;e<t-1;e++){constt=(0,n.takeWhile)(o,(t=>{constn=a<=(e+1)*r;returnn&&(a+=t),n})).length;s.push(t),o=o.slice(t)}returns.push(o.length),[s]}consti=A([2,1,2],5),l=S([E,E,N,E,E]),c=S([E,E,E,N,E,E,E]),u=A([3,1,3],5),d=S([N,E,E,N]),p=A([1,2,1],5),h=S([N,E,E,E]),m=A([1,3],3),g=S([E,E,E,N]),f=A([3,1],3),b=S([B(1.6),(0,n.overEvery)(T(.9),B(2)),(0,n.overEvery)(T(.9),B(2))]),v=A([1,2],3),k=A([1,1,1,1,1],1),y=A([1,1,1,1],1),x=A([1,1,1],3),j=S([(0,n.overEvery)(T(.9),B(2)),(0,n.overEvery)(T(.9),B(2)),B(1.6)]),w=A([2,1],3),_=S([function(e){returne>=2}]);functionC(e,{isWide:t}={}){constr=(e,s)=>{if(!s.length)returne;leto;o=s.length>15&&l(s)&&i(e)?[2,1,2]:s.length>15&&c(s)&&u(e)?[3,1,3]:5!==s.length&&d(s)&&p(e)?[1,2,1]:h(s)&&m(e)?[1,3]:g(s)&&f(e)?[3,1]:b(s)&&v(e)?[1,2]:t&&(5===s.length||10!==s.length&&s.length>6)&&k(e)&&(0,n.sum)(s.slice(0,5))<5?[1,1,1,1,1]:function(e,t){constr=(0,n.sum)(t.slice(0,4));returny(e)&&r<3.5&&t.length>5||r<7&&4===t.length}(e,s)?[1,1,1,1]:function(e,t,r){consts=(0,n.sum)(t.slice(0,3));returnt.length>=3&&
__("image %1$d of %2$d in gallery","jetpack"),t+1,o.length),{src:k,srcSet:y}=(0,l.A)(e,{layoutStyle:u});return(0,d.jsx)(i.A,{alt:e.alt,"aria-label":v,columns:r,height:e.height,id:e.id,imageFilter:n,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:f===t,link:e.link,linkTo:c,onMoveBackward:a?void0:p(t),onMoveForward:a?void0:h(t),onRemove:a?void0:m(t),onSelect:a?void0:g(t),origUrl:e.url,setAttributes:a?void0:b(t),showMovers:o.length>1,srcSet:y,url:k,width:e.width},t)}render(){const{align:e,children:t,className:r,columns:n,images:s,layoutStyle:i,roundedCorners:p,onResize:h,isSave:m,columnWidths:g}=this.props,f=(0,l.s)(i)?u.A:c.A,b=this.props.images.map(this.renderImage,this),v=i!==a.aQ?Math.min(p,a.WN):0;return(0,d.jsxs)("div",{className:(0,o.A)(r,{[`has-rounded-corners-${v}`]:v>0}),children:[(0,d.jsx)(f,{align:e,columns:n,columnWidths:m?g:void0,images:s,layoutStyle:i,renderedImages:b,onResize:m?void0:h}),t]})}}},62579:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});varn=r(86087),s=r(89798),o=r(38448),a=r(26054),i=r(79167),l=r(10790);classcextendsn.Component{gallery=(0,n.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:r,layoutStyle:n,renderedImages:c,columnWidths:u}=this.props,d=(0,i.mJ)(r),p="columns"===n?(0,i.FL)(d,t):(0,i.VU)(d,{isWide:["full","wide"].includes(e)});leth=0;return(0,l.jsx)(o.A,{galleryRef:this.gallery,children:p.map(((e,t)=>(0,l.jsx)(a.A,{children:e.map(((e,r)=>{constn=c.slice(h,h+e);returnh+=e,(0,l.jsx)(s.A,{width:u?.[t]?.[r],children:n},r)}))},t)))})}}},79167:(e,t,r)=>{"use strict";r.d(t,{FL:()=>a,VU:()=>C,mJ:()=>s});varn=r(66087);functions(e){returne.map(o)}functiono({height:e,width:t}){returne&&t?t/e:1}functiona(e,t){if(e.length<=t)return[Array(e.length).fill(1)];constr=(0,n.sum)(e)/t,s=[];leto=e,a=0;for(lete=0;e<t-1;e++){constt=(0,n.takeWhile)(o,(t=>{constn=a<=(e+1)*r;returnn&&(a+=t),n})).length;s.push(t),o=o.slice(t)}returns.push(o.length),[s]}consti=A([2,1,2],5),l=S([E,E,N,E,E]),c=S([E,E,E,N,E,E,E]),u=A([3,1,3],5),d=S([N,E,E,N]),p=A([1,2,1],5),h=S([N,E,E,E]),m=A([1,3],3),g=S([E,E,E,N]),f=A([3,1],3),b=S([B(1.6),(0,n.overEvery)(T(.9),B(2)),(0,n.overEvery)(T(.9),B(2))]),v=A([1,2],3),k=A([1,1,1,1,1],1),y=A([1,1,1,1],1),x=A([1,1,1],3),j=S([(0,n.overEvery)(T(.9),B(2)),(0,n.overEvery)(T(.9),B(2)),B(1.6)]),w=A([2,1],3),_=S([function(e){returne>=2}]);functionC(e,{isWide:t}={}){constr=(e,s)=>{if(!s.length)returne;leto;o=s.length>15&&l(s)&&i(e)?[2,1,2]:s.length>15&&c(s)&&u(e)?[3,1,3]:5!==s.length&&d(s)&&p(e)?[1,2,1]:h(s)&&m(e)?[1,3]:g(s)&&f(e)?[3,1]:b(s)&&v(e)?[1,2]:t&&(5===s.length||10!==s.length&&s.length>6)&&k(e)&&(0,n.sum)(s.slice(0,5))<5?[1,1,1,1,1]:function(e,t){constr=(0,n.sum)(t.slice(0,4));returny(e)&&r<3.5&&t.length>5||r<7&&4===t.length}(e,s)?[1,1,1,1]:function(e,t,r){consts=(0,n.sum)(t.slice(0,3));returnt.length>=3&&4!==t.length&&6!==t.length&&x(e)&&(s<2.5||s<5&&t.length>=3&&t[0]===t[2]||r)}(e,s,t)?[1,1,1]:j(s)&&w(e)?[2,1]:_(s)?[1]:s.length>3?[1,1]:Array(s.length).fill(1);consta=e.concat([o]),C=(0,n.sum)(o),A=s.slice(C);returnr(a,A)};returnr([],e)}functionA(e,t){returnr=>!r.slice(-t).some((t=>(0,n.isEqual)(t,e)))}functionS(e){returnt=>t.length>=e.length&&(0,n.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))).every(Boolean)}functionE(e){returne>=1&&e<2}functionN(e){returne<1}functionT(e){returnt=>t>=e}functionB(e){returnt=>t<e}},26054:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});varn=r(13022),s=r(10790);functiono({children:e,className:t}){return(0,s.jsx)("div",{className:(0,n.A)("tiled-gallery__row",t),children:e})}},58711:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});varn=r(66087),s=r(41314),o=r(89798),a=r(38448),i=r(26054),l=r(10790);functionc({columns:e,renderedImages:t}){constr=Math.min(s.ZS,e),c=t.length%r;return(0,l.jsx)(a.A,{children:[...c?[t.slice(0,c)]:[],...(0,n.chunk)(t.slice(c),r)].map(((e,t)=>(0,l.jsx)(i.A,{className:`columns-${e.length}`,children:e.map(((e,t)=>(0,l.jsx)(o.A,{children:e},t)))},t)))})}},91162:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});varn=r(94715),s=r(13022),o=r(90907),a=r(35463),i=r(29520),l=r(6454),c=r(10790);f
__("Open image %1$d of %2$d in full-screen","jetpack"),t+1,o.length),k=u.A,{src:y,srcSet:x}=(0,c.A)(e,{layoutStyle:l});return(0,d.jsx)(k,{alt:e.alt,"aria-label":v,columns:r,height:e.height,id:e.id,imageFilter:n,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:f===t,link:e.link,linkTo:i,customLink:e.customLink,onMoveBackward:a?void0:p(t),onMoveForward:a?void0:h(t),onRemove:a?void0:m(t),onSelect:a?void0:g(t),origUrl:e.url,setAttributes:a?void0:b(t),showMovers:o.length>1,srcSet:x,url:y,width:e.width},t)}render(){const{align:e,children:t,className:r,columns:n,images:s,layoutStyle:u,roundedCorners:p,onResize:h,style:m,isSave:g,columnWidths:f}=this.props,b=(0,c.s)(u)?l.A:i.A,v=this.props.images.map(this.renderImage,this),k=u!==a.aQ?Math.min(p,a.WN):0;return(0,d.jsxs)("div",{style:m,className:(0,o.A)(r,{[`has-rounded-corners-${k}`]:k>0}),children:[(0,d.jsx)(b,{align:e,columns:n,columnWidths:g?f:void0,images:s,layoutStyle:u,renderedImages:v,onResize:g?void0:h}),t]})}}},80720:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});varn=r(94715),s=r(13022),o=r(90907),a=r(35463),i=r(29520),l=r(1456),c=r(10790);functionu({attributes:e}){const{imageFilter:t,images:r}=e;if(!r.length)returnnull;const{align:u,className:d,columns:p=(0,i.EB)(e),linkTo:h,roundedCorners:m,columnWidths:g}=e,f=n.useBlockProps.save();return(0,c.jsxs)("div",{...f,className:(0,s.A)(f.className,d),children:[" ",(0,c.jsx)(l.A,{align:u,columns:p,imageFilter:t,images:r,isSave:!0,layoutStyle:(0,o.D)(a.kc,d),linkTo:h,roundedCorners:m,columnWidths:g})]})}},69813:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});constn={align:["center","wide","full"],color:{gradients:!0,text:!1},customClassName:!1,html:!1,spacing:{margin:!0,padding:!0},__experimentalHideChildBlockControls:!0}},29520:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>k,EB:()=>b});varn=r(85985),s=r(94715),o=r(56427),a=r(43656),i=r(86087),l=r(27723),c=r(66087),u=r(90907),d=r(76585),p=r(35463),h=r(77530),m=r(10309),g=r(10790);const__=l.__,f=3;functionb(e){returne.images.length>0?Math.min(f,e.images.length):f}constv=e=>{constt=(0,c.pick)(e,[["alt"],["id"],["link"]]);returnt.url=e?.sizes?.large?.url||e?.media_details?.sizes?.large?.source_url||e.url,t},k=(0,o.withNotices)((({attributes:e,isSelected:t,noticeOperations:r,noticeUI:l,setAttributes:c})=>{const{align:f,columns:k=b(e),imageFilter:y,images:x,linkTo:j,roundedCorners:w,columnWidths:_}=e,C=(0,u.D)(p.kc,e.className),A=(0,s.useBlockProps)(),[S,E]=(0,i.useState)(null),[N,T]=(0,i.useState)(void0===_||0===_?.length),B=e=>{c({images:e,ids:e.map((({id:e})=>parseInt(e,10)))})},P=e=>{(0,a.mediaUpload)({allowedTypes:p.eN,filesList:e,onFileChange:e=>B((x||[]).concat(e.map(v))),onError:r.createErrorNotice}),T(!0)},I=e=>()=>{constt=x.filter(((t,r)=>e!==r));E(null),T(!0),B(t),c({columns:k?Math.min(t.length,k):k})},M=e=>()=>{S!==e&&E(e)},L=e=>{constt=e.map((e=>{constt=x.find((t=>parseInt(t.id,10)===parseInt(e.id,10)));returnt?.customLink?{...v(e),customLink:t.customLink}:v(e)}));B(t),c({columns:k?Math.min(e.length,k):k}),T(!0)},R=(e,t)=>{constr=[...x];r.splice(t,1,x[e]),r.splice(e,1,x[t]),E(t),T(!0),B(r)},D=e=>()=>{e!==x.length-1&&R(e,e+1)},F=e=>()=>{0!==e&&R(e,e-1)},O=e=>{N&&c({columnWidths:e})},z=e=>P(e.target.files),U=e=>t=>{x[e]&&B([...x.slice(0,e),{...x[e],...t},...x.slice(e+1)])};letH;return(0,i.useEffect)((()=>{t||null===S||E(null)}),[t,S,E]),H=0===x.length?(0,g.jsx)(s.MediaPlaceholder,{icon:(0,n.sh)(d),labels:{title:__("Tiled Gallery","jetpack"),name:__("images","jetpack")},onSelect:L,accept:"image/*",allowedTypes:p.eN,multiple:!0,notices:l,onError:r.createErrorNotice}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(h.M,{layoutStyle:C,images:x,columns:k,selectedImage:S,setImageAttributes:U,onColumnsChange:e=>c({columns:e}),roundedCorners:w,onRoundedCornersChange:e=>c({roundedCorners:e}),linkTo:j,onLinkToChange:e=>c({linkTo:e})}),l,(0,g.jsxs)(m.A,{className:"tiled-gallery__wrapper",align:f,columns:k,imageFilter:y,images:x,layoutStyle:C,linkTo:j,onMoveBackward:F,onMoveForward:D,onRemoveImage:I,onSelectImage:M,onResize:O,roundedCorners:w,selectedImage:t?S:null,setImageAttrib
__("image %1$d of %2$d in gallery","jetpack"),t+1,o.length),y=a?l.A:i.A,{src:x,srcSet:j}=(0,c.A)(e,{layoutStyle:d});return(0,p.jsx)(y,{alt:e.alt,"aria-label":k,columns:r,height:e.height,id:e.id,imageFilter:n,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:b===t,link:e.link,linkTo:u,customLink:e.customLink,onMoveBackward:a?void0:h(t),onMoveForward:a?void0:m(t),onRemove:a?void0:g(t),onSelect:a?void0:f(t),origUrl:e.url,setAttributes:a?void0:v(t),showMovers:o.length>1,srcSet:j,url:x,width:e.width},t)}render(){const{align:e,children:t,className:r,columns:n,images:s,layoutStyle:i,roundedCorners:l,onResize:h,style:m,isSave:g,columnWidths:f}=this.props,b=(0,c.s)(i)?d.A:u.A,v=this.props.images.map(this.renderImage,this),k=i!==a.aQ?Math.min(l,a.WN):0;return(0,p.jsxs)("div",{style:m,className:(0,o.A)(r,{[`has-rounded-corners-${k}`]:k>0}),children:[(0,p.jsx)(b,{align:e,columns:n,columnWidths:g?f:void0,images:s,layoutStyle:i,renderedImages:v,onResize:g?void0:h}),t]})}}},31238:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});varn=r(86087),s=r(94107),o=r(98627),a=r(54359),i=r(43645),l=r(74176),c=r(18980),u=r(10790);classdextendsn.Component{gallery=(0,n.createRef)();pendingRaf=null;ro=null;componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}handleGalleryResize=e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame((()=>{for(const{contentRect:t,target:r}ofe){const{width:e}=t,n=[];(0,c.S)(r).forEach((t=>{n.push((0,c.r)(t,e))})),void0!==this.props.onResize&&this.props.onResize(n)}}))};triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=news.A(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}getColumnWidths(e,t,r){letn=0;returne.map((e=>e.map((e=>{constr=t.slice(n,n+e);returnn+=e,r})))).map((e=>(0,c.r)(e,r)))}render(){const{align:e,columns:t,images:r,layoutStyle:s,renderedImages:c}=this.props,d=(0,l.mJ)(r),p="columns"===s?(0,l.FL)(d,t):(0,l.VU)(d,{isWide:["full","wide"].includes(e)}),h=n.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(p,c,1e3)})();letm=0;return(0,u.jsx)(a.A,{galleryRef:this.gallery,children:p.map(((e,t)=>(0,u.jsx)(i.A,{children:e.map(((e,r)=>{constn=c.slice(m,m+e);returnm+=e,(0,u.jsx)(o.A,{width:h?.[t]?.[r],children:n},r)}))},t)))})}}},74176:(e,t,r)=>{"use strict";r.d(t,{FL:()=>a,VU:()=>C,mJ:()=>s});varn=r(66087);functions(e){returne.map(o)}functiono({height:e,width:t}){returne&&t?t/e:1}functiona(e,t){if(e.length<=t)return[Array(e.length).fill(1)];constr=(0,n.sum)(e)/t,s=[];leto=e,a=0;for(lete=0;e<t-1;e++){constt=(0,n.takeWhile)(o,(t=>{constn=a<=(e+1)*r;returnn&&(a+=t),n})).length;s.push(t),o=o.slice(t)}returns.push(o.length),[s]}consti=A([2,1,2],5),l=S([E,E,N,E,E]),c=S([E,E,E,N,E,E,E]),u=A([3,1,3],5),d=S([N,E,E,N]),p=A([1,2,1],5),h=S([N,E,E,E]),m=A([1,3],3),g=S([E,E,E,N]),f=A([3,1],3),b=S([B(1.6),(0,n.overEvery)(T(.9),B(2)),(0,n.overEvery)(T(.9),B(2))]),v=A([1,2],3),k=A([1,1,1,1,1],1),y=A([1,1,1,1],1),x=A([1,1,1],3),j=S([(0,n.overEvery)(T(.9),B(2)),(0,n.overEvery)(T(.9),B(2)),B(1.6)]),w=A([2,1],3),_=S([function(e){returne>=2}]);functionC(e,{isWide:t}={}){constr=(e,s)=>{if(!s.length)returne;leto;o=s.length>15&&l(s)&&i(e)?[2,1,2]:s.length>15&&c(s)&&u(e)?[3,1,3]:5!==s.length&&d(s)&&p(e)?[1,2,1]:h(s)&&m(e)?[1,3]:g(s)&&f(e)?[3,1]:b(s)&&v(e)?[1,2]:t&&(5===s.length||10!==s.length&&s.length>6)&&k(e)&&(0,n.sum)(s.slice(0,5))<5?[1,1,1,1,1]:function(e,t){constr=(0,n.sum)(t.slice(0,4));returny(e)&&r<3.5&&t.length>5||r<7&&4===t.length}(e,s)?[1,1,1,1]:function(e,t,r){consts=(0,n.sum)
__("Display %s","jetpack"),e.label.toLowerCase()),checked:i[e.id]||!1,onChange:(r=e.id,e=>{constn={...i,[r]:e};if(Object.values(n).every((e=>!1===e)))returnf(!0);l(n),t({postTypes:n}),f(!1)})},e.id);varr})),g&&(0,a.jsx)(n.Notice,{className:"jetpack-top-posts__error",status:"error",isDismissible:!1,children:__("At least one item must be selected.","jetpack")})]}),(0,a.jsxs)(n.PanelBody,{title:__("Metadata settings","jetpack"),children:[(0,a.jsx)(n.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Display date","jetpack"),checked:d,onChange:e=>t({displayDate:e})}),(0,a.jsx)(n.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Display author","jetpack"),checked:c,onChange:e=>t({displayAuthor:e})}),(0,a.jsx)(n.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Display context","jetpack"),checked:u,onChange:e=>t({displayContext:e})}),(0,a.jsx)(n.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Display thumbnail","jetpack"),checked:p,onChange:e=>t({displayThumbnail:e})})]})]})}functionl({attributes:e,setAttributes:t}){const{layout:r}=e,s=[{icon:"grid-view",title:__("Grid view","jetpack"),onClick:()=>t({layout:"grid"}),isActive:"grid"===r},{icon:"list-view",title:__("List view","jetpack"),onClick:()=>t({layout:"list"}),isActive:"list"===r}];return(0,a.jsx)(n.ToolbarGroup,{controls:s})}},96894:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});varn=r(85985),s=r(1455),o=r.n(s),a=r(94715),i=r(86087),l=r(13022),c=r(9522),u=r(20600),d=r(8031),p=r(10790);functionh(e){return(0,p.jsxs)("div",{className:"jetpack-top-posts-item",children:[e.displayThumbnail&&e.thumbnail&&(0,p.jsx)("a",{className:"jetpack-top-posts-thumbnail-link",children:(0,p.jsx)("img",{className:"jetpack-top-posts-thumbnail",src:e.thumbnail,alt:e.title,rel:"nofollow noopener noreferrer",target:"_blank"})}),e.displayThumbnail&&!e.thumbnail&&(0,p.jsx)("a",{className:"jetpack-top-posts-thumbnail-link",children:(0,p.jsx)("div",{className:"jetpack-top-posts-mock-thumbnail"})}),(0,p.jsx)("span",{className:"jetpack-top-posts-title",children:(0,p.jsx)("a",{children:e.title})}),e.displayDate&&(0,p.jsx)("span",{className:"jetpack-top-posts-date has-small-font-size",children:e.date}),e.displayAuthor&&(0,p.jsx)("span",{className:"jetpack-top-posts-author has-small-font-size",children:e.author}),e.displayContext&&e.context&&(0,p.jsx)("span",{className:"jetpack-top-posts-context has-small-font-size",children:(0,p.jsx)("a",{children:e.context[0].cat_name})})]})}constm=function({attributes:e,setAttributes:t}){const{isLoadingModules:r,isChangingStatus:s,isModuleActive:m,changeStatus:g}=(0,n.q7)("stats"),f=(0,a.useBlockProps)(),{className:b}=f,[v,k]=(0,i.useState)(),[y,x]=(0,i.useState)(),[j,w]=(0,i.useState)(),[_,C]=(0,i.useState)({}),{displayAuthor:A,displayContext:S,displayDate:E,displayThumbnail:N,layout:T,period:B,postsToShow:P,postTypes:I}=e;letM;return(0,i.useEffect)((()=>{o()({path:"/wpcom/v2/post-types"}).then((e=>{w(e),e.forEach((e=>{I&&I[e.id]&&C((t=>({...t,[e.id]:!0})))}))}))}),[I]),(0,i.useEffect)((()=>{m&&o()({path:`/wpcom/v2/top-posts?period=${B}`}).then((e=>{k(e)}))}),[B,m]),(0,i.useEffect)((()=>{conste=v;if(!e)return;constt=[];for(letr=0;t.length!==P&&(e[r]&&I[e[r].type]&&t.push((0,p.jsx)(h,{title:e[r].title,date:e[r].date,author:e[r].author,thumbnail:e[r].thumbnail,context:e[r].context,displayDate:E,displayAuthor:A,displayThumbnail:N,displayContext:S},"jetpack-top-posts-"+e[r].id)),e[r]);r++);x(t)}),[A,S,E,N,v,I,P,x]),M=m||r?y?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(a.InspectorControls,{children:(0,p.jsx)(u.O,{attributes:e,setAttributes:t,toggleAttributes:_,setToggleAttributes:C,postTypesData:j})}),(0,p.jsx)(a.BlockControls,{children:(0,p.jsx)(u.G,{attributes:e,setAttributes:t})}),(0,p.jsx)("div",{"data-item-count":y.length,children:(0,p.jsx)("div",{className:"jetpack-top-posts-wrapper",children:y})})]}):(0,p.jsx)(c.G,{}):(0,p.jsx)(d.k,{className:b,changeStatus:g,isLoading:s}),(0,p.jsx)("div",{...f,className:(0,l.A)(b,`is-${T}-layout`),children:M})}},99883:(e,t,r)=>{"use strict";varn=r(74997),s=r(94375),o=r(35075),a=r(96894);(0,s.M)(o,{edit:a.A,save:()=>nu
__("Start playing the video as soon as the page loads","jetpack")),onChange:this.toggleAttribute("autoplay"),checked:L,help:this.getAutoplayHelp,__nextHasNoMarginBottom:!0}),(0,C.jsx)(l.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Loop","jetpack"),/* translators: Tooltip describing the "loop" option for the VideoPress player */
__("Restarts the video when it reaches the end","jetpack")),onChange:this.toggleAttribute("loop"),checked:O,__nextHasNoMarginBottom:!0}),(0,C.jsx)(l.ToggleControl,{label:__("Muted","jetpack"),onChange:this.toggleAttribute("muted"),checked:z,__nextHasNoMarginBottom:!0}),(0,C.jsx)(l.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Playback Controls","jetpack"),/* translators: Tooltip describing the "controls" option for the VideoPress player */
__("Display the video playback controls","jetpack")),onChange:this.toggleAttribute("controls"),checked:D,__nextHasNoMarginBottom:!0}),(0,C.jsx)(l.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Play Inline","jetpack"),/* translators: Tooltip describing the "playsinline" option for the VideoPress player */
__("Play the video inline instead of full-screen on mobile devices","jetpack")),onChange:this.toggleAttribute("playsinline"),checked:U,__nextHasNoMarginBottom:!0}),(0,C.jsx)(l.SelectControl,{label:this.renderControlLabelWithTooltip(__("Preload","jetpack"),/* translators: Tooltip describing the "preload" option for the VideoPress player */
__("Content to dowload before the video is played","jetpack")),value:V??"",onChange:e=>u({preload:e}),options:[{value:"auto",label:_x("Auto","VideoPress preload setting","jetpack")},{value:"metadata",label:_x("Metadata","VideoPress preload setting","jetpack")},{value:"none",label:_x("None","VideoPress preload setting","jetpack")}],help:this.getPreloadHelp(),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,C.jsx)(i.MediaUploadCheck,{children:(0,C.jsxs)(l.BaseControl,{className:"editor-video-poster-control",children:[(0,C.jsx)(l.BaseControl.VisualLabel,{children:__("Poster Image","jetpack")}),(0,C.jsx)(i.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:this.onSelectPoster,allowedTypes:A,render:({open:e})=>(0,C.jsx)(l.Button,{variant:"secondary",onClick:e,ref:this.posterImageButton,"aria-describedby":Z,children:J?__("Replace image","jetpack",0):__("Select Poster Image","jetpack")})}),(0,C.jsx)("p",{id:Z,hidden:!0,children:J?(0,h.sprintf)(/* translators: Placeholder is an image URL. */
__("The current poster image url is %s","jetpack"),H??M):__("There is no poster image currently selected","jetpack")}),J&&(0,C.jsx)(l.Button,{onClick:this.onRemovePoster,variant:"link",isDestructive:!0,children:__("Remove Poster Image","jetpack")})]})}),(0,d.createInterpolateElement)(__("Send us your <a>VideoPress feedback</a>","jetpack"),{a:(0,C.jsx)(l.ExternalLink,{href:"https://automattic.survey.fm/videopress-feedback"})})]}),(0,C.jsx)(y.A,{attributes:t,setAttributes:u,useAverageColor:q,toggleAttribute:this.toggleAttribute}),(0,C.jsxs)(l.PanelBody,{title:__("Video File Settings","jetpack"),children:[(0,C.jsx)(l.SelectControl,{label:_x("Rating","The age rating for this video.","jetpack"),value:N??"",disabled:k||j,options:[{label:_x("G",'Video rating for "General Audiences".',"jetpack"),value:"G"},{label:_x("PG-13",'Video rating for "Parental Guidance", unsuitable for children under 13.',"jetpack"),value:"PG-13"},{label:_x("R",'Video rating for "Restricted", not recommended for children under 17.',"jetpack"),value:"R-17"}],onChange:this.onChangeRating,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,C.jsx)(l.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Allow download","jetpack"),/* translators: Tooltip describing the "allow download" option for the VideoPress player */
__("Display download option and allow viewers to download this video","jetpack")),onChange:this.onChangeAllowDownload,checked:T,disabled:k||P,__nextHasNoMarginBottom:!0}),(0,C.jsx)(l.SelectControl,{label:__("Video Privacy","jetpack"),help:this.getPrivacySettingHelp(B),onChange:this.onChangePrivacySetting,value:B??"",options:[{value:b.NF.SITE_DEFAULT,label:_x("Site Default","VideoPress privacy setting","jetpack")},{value:b.NF.PUBLIC,label:_x("Public","VideoPress privacy setting","jetpack")},{value:b.NF.PRIVATE,label:_x("Private","VideoPress privacy setting","jetpack")}],disabled:k||I,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]})]}),Y=e=>{this.setState({fileForUpload:e[0]})},Q=e=>{e&&e.url?(this.props.setAttributes({src:e.url,id:e.id,poster:e.image?.src!==e.icon?e.image?.src:void0}),e.videopress_guid&&this.props.setAttributes({guid:e.videopress_guid})):u({src:void0,id:void0,poster:void0})},X=()=>"videoPressUploadPoster"inwindow,ee=(0,p.escapeHTML)(g?(0,_.T3)(g.name):""),te=({mediaId:e,guid:t,src:r})=>{this.setState({title:this.state.title??ee,fileForUpload:null,isUploadComplete:!!e,isEditingWhileUploading:!!e&&this.state.isEditingWhileUploading,pendingVideoAttributes:e&&t&&r?{id:e,guid:t,src:r}:null})},re=e=>{this.setState({title:e})},ne=e=>{this.setState({videoFrameSelectedInMillis:e,videoPosterImageData:null})},se=()=>{conste=this.state.title;this.updateMetaApiCall({title:e},(()=>this.setState({isUpdatingTitle:!0,title:e})),(()=>this.setState({title:e})),(()=>this.setState({isUpdatingTitle:!1})))},oe=()=>ue({at_time:this.state.videoFrameSelectedInMillis,is_millisec:!0}),ae=()=>ue({poster_attachment_id:this.state.videoPosterImageData.id}),ie=e=>{e.generating?le():ce(e.poster)},le=()=>{setTimeout((()=>{(X()?window.videoPressGetPoster(F):o()({path:`/videos/${F}/poster`,apiNamespace:"rest/v1.1",global:!0,method:"GET"})).then((e=>ie(e)))}),2e3)},ce=e=>{e&&u({poster:e})},ue=e=>{if(X())returnwindow.videoPressUploadPoster(F,e).then((e=>ie(e)));o()({path:`/videos/${F}/poster`,apiNamespace:"rest/v1.1",method:"POST",global:!0,data:e}).catch((e=>e))},de=()=>{const{title:e,videoFrameSelectedInMillis:t}=this.state;e&&se(),M?ae():null!=t&&oe()},pe=()=>{this.state.pendingVideoAttributes&&u(this.state.pendingVideoAttributes),this.setState({isEditingWhileUploading:!1,pendingVideoAttributes:null}),de()};if(null!=g&&g.name||this.state.isEditingWhileUploading){conste=this.state.title??ee;return(0,C.jsx)(S,{fileForUpload:g,filename:ee,uploadFinished:te,blockSettings:K,onDismissEditor:pe,isUploadComplete:this.state.isUploadComplete,onSelectPoster:this.onSelectPoster,onRemovePoster:this.onRemovePoster,onChangeTitle:re,title:e,videoPosterImageData:this.state.videoPosterImageData,onVideoFrameSelected:ne,onSave:de})}consthe=k||n,me=m||s||!F,ge=me&&!s&&!he,fe=(0,C.jsxs)(d.Fragment,{children:[(0,C.jsx)("div",{className:s||he?"":"videopress-block-hide",children:(0,C.jsx)(v.A,{text:s?__("Uploading…","jetpack"):__("Generating preview…","jetpack",0)})}),(0,C.jsx)("div",{className:ge?"":"videopress-block-hide",children:(0,C.jsx)(e,{...this.props})})]});if(me)returnc?(0,C.jsx)(f.f,{onFilesSelected:Y,onMediaItemSelected:Q,children:fe}):(0,C.jsx)(d.Fragment,{children:fe});const{html:be,scripts:ve}=a||{html:null,scripts:null},ke=he||!a;return(0,C.jsxs)(d.Fragment,{children:[K,(0,C.jsx)(E,{...this.props,hideOverlay:this.hideOverlay,html:be,scripts:ve,interactive:w,caption:R,shouldRenderLoadingBlock:ke})]})}}]),"withVideoPressEdit")},27156:(e,t,r)=>{"use strict";varn=r(90372),s=r(97999),o=r(85985),a=r(63162),i=r(94715),l=r(75994),c=r(74997),u=r(56427),d=r(29491),p=r(47143),h=r(43656),m=r(86087),g=r(52619),f=r(27723),b=r(81837),v=r(59257),k=r(21440),y=r(54727),x=r(65390),j=r(77189),w=r(41560),_=r(47960),C=r(51983),A=r(7345),S=r(40932),E=r(10790);const__=f.__,N=(0,d.createHigherOrderComponent)((e=>t=>{const{name:r}=(0,i.useBlockEditContext)();return"core/video"!==r?(0,E.jsx)(e,{...t}):(0,E.jsxs)(e,{...t,disableDropZone:!0,className:"no-videopress-media-placeholder",children:[(0,E.jsx)(u.Button,{disabled:!0,className:"components-but
__("Paused (%s%%)","jetpack"),x):(0,o.sprintf)(/* translators: Placeholder is an upload progress percenatage number, from 0-100. */
__("Uploading (%s%%)","jetpack"),x)}),(0,c.jsx)("div",{className:"resumable-upload__file-size",children:w})]}),(0,c.jsx)("div",{className:"resumable-upload__actions",children:(0,c.jsx)(n.Button,{variant:"link",onClick:()=>{p&&(u?p.start():p.abort(),d(!u))},children:u?"Resume":"Pause"})})]})})}},80534:(e,t,r)=>{"use strict";r.d(t,{Q:()=>s,l:()=>a});varn=r(10781);consts=function(e){returnnewPromise((function(t,r){constn=e?{data:{key:e}}:{};wp.media.ajax("videopress-get-upload-jwt",{async:!0,...n}).done((function(e){t({token:e.upload_token,blogId:e.upload_blog_id,url:e.upload_action_url})})).fail((function(e){r(e)}))}))},o={},a=({onUploadUuidRetrieved:e,onError:t,onProgress:r,onSuccess:a})=>(i,l)=>{constc=newn._O(i,{onError:t,onProgress:r,endpoint:l.url,removeFingerprintOnSuccess:!0,withCredentials:!1,autoRetry:!0,overridePatchMethod:!1,chunkSize:1e7,allowedFileTypes:["video/*"],metadata:{filename:i.name,filetype:i.type},retryDelays:[0,1e3,3e3,5e3,1e4],onAfterResponse:function(t,r){if(r.getStatus()>=400)return;constn=r.getHeader("x-videopress-upload-guid"),s=r.getHeader("x-videopress-upload-media-id"),i=r.getHeader("x-videopress-upload-src-url");if(n&&s&&i)returnvoid(a&&a({mediaId:Number(s),guid:n,src:i}));constl={"x-videopress-upload-key-token":"token","x-videopress-upload-key":"key"},c={};Object.keys(l).forEach((function(e){constt=r.getHeader(e);t&&(c[l[e]]=t)})),c.key&&c.token&&(o[c.key]=c.token),c.key&&e(c.key)},onBeforeRequest:function(e){constt=e._method;["HEAD","OPTIONS"].indexOf(t)>=0&&(e._method="GET",e.setHeader("X-HTTP-Method-Override",t)),["DELETE","PUT","PATCH"].indexOf(t)>=0&&(e._method="POST",e.setHeader("X-HTTP-Method-Override",t)),e._xhr.open(e._method,e._url,!0);for(consttofObject.keys(e._headers))e.setHeader(t,e._headers[t]);if("POST"===t){if(!!!l.token)throw"should never happen";e.setHeader("x-videopress-upload-token",l.token)}if(["OPTIONS","GET","HEAD","DELETE","PUT","PATCH"].indexOf(t)>=0){constr=newURL(e._url).pathname.split("/"),n=r[r.length-1];if(o[n])e.setHeader("x-videopress-upload-token",o[n]);elseif("HEAD"===t)returns(n).then((t=>(o[n]=t.token,e.setHeader("x-videopress-upload-token",t.token),e)))}returnPromise.resolve(e)}});returnc.findPreviousUploads().then((function(e){e.length&&c.resumeFromPreviousUpload(e[0]),c.start()})),c}},41560:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});varn=r(94715),s=r(29491),o=r(13022),a=r(17900),i=r(10790);constl=(0,s.createHigherOrderComponent)((e=>t=>{const{attributes:{autoplay:r,caption:s,controls:l,guid:c,loop:u,muted:d,playsinline:p,poster:h,preload:m,videoPressClassNames:g,className:f,align:b,seekbarColor:v,seekbarPlayedColor:k,seekbarLoadingColor:y,useAverageColor:x,maxWidth:j}={}}=t;if(!c)returne(t);constw=n.useBlockProps.save({className:(0,o.A)("wp-block-video",f,g,{[`align${b}`]:b})}),_=(0,a.e)(c,{autoplay:r,controls:l,loop:u,muted:d,playsinline:p,poster:h,preload:m,seekbarColor:v,seekbarPlayedColor:k,seekbarLoadingColor:y,useAverageColor:x});letC={};returnj&&j.length>0&&"100%"!==j&&(C={maxWidth:j,margin:"auto"}),(0,i.jsxs)("figure",{...w,children:[(0,i.jsx)("div",{className:"wp-block-embed__wrapper",style:C,children:`\n${_}\n`}),!n.RichText.isEmpty(s)&&(0,i.jsx)(n.RichText.Content,{tagName:"figcaption",value:s})]})}),"withVideoPressSave")},57954:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});varn=r(94715),s=r(56427),o=r(86087),a=r(27723),i=r(10790);const__=a.__;classlextendso.Component{constructor(){super(...arguments);const{seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:r}=this.props.attributes;this.state={seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:r}}handleChangeSeekbarColor=e=>{this.setState({seekbarColor:e})};handleChangeSeekbarLoadingColor=e=>{this.setState({seekbarLoadingColor:e})};handleChangeSeekbarPlayedColor=e=>{this.setState({seekbarPlayedColor:e})};saveColors=()=>{const{seekbarColor:e,seekbarLoadingColor:t,seekbarPlayedColor:r}=this.state,{setAttributes:n}=this.props;n({seekbarColor:e,seekbarLoadingColor:t,seekbarPlayedColor:r})};render(){const{seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:
__("Delete %s","jetpack"),o.label),disabled:n===i,children:n===i?__("Deleting","jetpack"):__("Delete","jetpack",0)})})]},i))),(0,d.jsx)(a.MenuGroup,{label:__("Text tracks","jetpack"),className:"videopress-block-tracks-editor__track-list",children:o})}functiony({track:e,guid:t,onChange:r,onClose:n,onCancel:s,trackExists:u}){const[g,f]=(0,l.useState)(),[v=!1,k]=(0,l.useState)(),{label:y="",srcLang:x="",kind:j=p}=e,w=e.tmpFile?e.tmpFile.name:"";if(!(0,i.useSelect)((e=>e(o.store).getSettings().mediaUpload),[]))returnnull;return(0,d.jsx)(a.NavigableMenu,{children:(0,d.jsxs)("div",{className:"videopress-block-tracks-editor__single-track-editor",children:[(0,d.jsx)("span",{className:"videopress-block-tracks-editor__single-track-editor-label",children:__("Edit track","jetpack")}),(0,d.jsxs)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file",children:[(0,d.jsxs)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label",children:[(0,d.jsxs)("span",{children:[__("File","jetpack"),":"]}),""!==w&&(0,d.jsx)("span",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label-name",children:(0,d.jsx)("strong",{children:w})}),(0,d.jsx)(o.MediaUploadCheck,{children:(0,d.jsx)(a.FormFileUpload,{onChange:t=>{constn=t.target.files;!n.length>0||(e.tmpFile=n[0],r(e))},accept:h,render:({openFileDialog:e})=>(0,d.jsx)(a.Button,{variant:"link",onClick:()=>{e()},children:""===w?__("Select track","jetpack"):__("Change track","jetpack",0)}),disabled:v})})]}),(0,d.jsx)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-help",children:/* translators: %s: The allowed file types to be uploaded as a video text track." *//* translators: %s: The allowed file types to be uploaded as a video text track." */
(0,c.sprintf)(__("Allowed formats: %s","jetpack"),h)})]}),(0,d.jsxs)("div",{className:"videopress-block-tracks-editor__single-track-editor-label-language",children:[(0,d.jsx)(a.TextControl,{onChange:t=>r({...e,label:t}),label:__("Label","jetpack"),value:y,help:__("Title of track","jetpack"),disabled:v,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,d.jsx)(a.TextControl,{onChange:t=>r({...e,srcLang:t}),label:__("Source language","jetpack"),value:x,help:__("Language tag (en, fr, etc.)","jetpack"),disabled:v,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]}),(0,d.jsx)(a.SelectControl,{className:"videopress-block-tracks-editor__single-track-editor-kind-select",options:m,value:j,label:/* translators: %s: The kind of video text track e.g: "Subtitles, Captions" */
__("Kind","jetpack"),onChange:t=>{r({...e,kind:t})},disabled:v,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,d.jsxs)("div",{className:"videopress-block-tracks-editor__single-track-editor-buttons-container",children:[v?(0,d.jsx)(a.Spinner,{}):(0,d.jsx)(a.Button,{variant:"secondary",disabled:!e.tmpFile,onClick:()=>{f(null),""===y&&(e.label=__("English","jetpack")),""===x&&(e.srcLang="en"),void0===e.kind&&(e.kind=p),u(e)?f(__("A track already exists for that language and kind.","jetpack")):(k(!0),b(e,t).then((()=>{r(e),f(null),n()})).catch((e=>{e.message&&f(e.message)})).finally((()=>{k(!1)})))},children:__("Save","jetpack")}),(0,d.jsx)(a.Button,{variant:"link",onClick:s,children:__("Close","jetpack")})]}),g&&(0,d.jsx)("div",{className:"videopress-block-tracks-editor__single-track-editor-error",children:/* translators: %s: An error message returned after a failed video track file upload." *//* translators: %s: An error message returned after a failed video track file upload." */
c=__("Upgrade to %s to use this premium block","jetpack"),u=(__("Upgrade your plan to use this premium block","jetpack"),_x("Upgrade","Call to action to buy a new plan","jetpack")),d=({onRedirect:e,align:t,className:r,title:d=l,description:p=null,buttonText:h=u,visible:m=!0,requiredPlan:g,context:f})=>{const[b,v,k]=(0,n._6)(g,e),y=(0,o.useSelect)((e=>{if(p)returnp;constt=e("wordpress-com/plans"),r=t&&t.getPlan(g);returnr?(0,a.sprintf)(c,r.product_name_short):null}),[p,g]);returny&&(0,i.jsx)(s.cb,{align:t,buttonText:h,checkoutUrl:b,className:r,context:f,description:y,goToCheckoutPage:v,isRedirecting:k,title:d,visible:m})}},23887:(e,t,r)=>{"use strict";r.d(t,{W:()=>n,r:()=>s});constn=({plan:e,blockName:t,context:r,tracks:n})=>{n.recordEvent("jetpack_editor_block_upgrade_click",{plan:e,block:t,context:r})},s=({plan:e,blockName:t,context:r,tracks:n})=>{n.recordEvent("jetpack_editor_block_upgrade_banner_impression",{plan:e,block:t,context:r})}},3120:(e,t,r)=>{"use strict";r.d(t,{e:()=>h});varn=r(85985),s=r(94715),o=r(29491),a=r(47143),i=r(86087),l=r(95104),c=r(26845),u=r(23887),d=r(10790);constp=(0,o.createHigherOrderComponent)((e=>t=>{const{name:r,clientId:o,isSelected:p,attributes:h,setAttributes:m}=t||{},g=(0,n.tu)(r);if(!g)return(0,d.jsx)(e,{...t});constf=(0,n.sH)(r),b=(0,n.GT)(r),[v,k]=(0,i.useState)(!f),[y,x]=(0,i.useState)(!1),j="editor-canvas",w=(0,a.useSelect)((e=>e("core/block-editor").hasSelectedInnerBlock(o,!0)),[o]),{hasParentBanner:_}=(0,i.useContext)(l.j)||{},C=(p||w)&&v&&!_,{tracks:A}=(0,n.st)(),S=(0,i.useMemo)((()=>({plan:g,blockName:r,context:j,tracks:A})),[g,r,A]);(0,i.useEffect)((()=>{C&&x(!0)}),[C,x]),(0,i.useEffect)((()=>{!y&&C&&(0,u.r)(S)}),[y,S,C]),(0,i.useEffect)((()=>k(!f)),[h,k,f]),(0,i.useEffect)((()=>{m({shouldDisplayFrontendBanner:!_})}),[m,_]);constE=(0,s.useBlockProps)();return(0,d.jsx)(l.b,{onBannerVisibilityChange:k,hasParentBanner:C,children:(0,d.jsxs)("div",{ref:E.ref,style:{maxWidth:"unset"},children:[(0,d.jsx)(c.Ay,{className:`is-${r.replace(/\//,"-")}-paid-block`,title:null,align:h?.align,visible:C,description:b?.description,requiredPlan:g,context:j,onRedirect:()=>(0,u.W)(S)}),(0,d.jsx)(e,{...t})]})})}),"withUpgradeBanner");functionh(e,t){return(0,n.tu)(t)?{...e,edit:p(e.edit)}:e}},76047:(e,t,r)=>{"use strict";r.d(t,{k6:()=>o,s6:()=>n,wb:()=>s});constn="jetpack-sidebar",s="document-settings",o="pre-publish"},23162:(e,t,r)=>{"use strict";r.d(t,{A:()=>P});varn=r(96865),s=r(85985),o=r(82201),a=r(56427),i=r(3582),l=r(47143),c=r(43656),u=r(27723),d=r(10067),p=r.n(d),h=r(44732),m=r(48499),g=r(90062),f=r(50976),b=r(81932),v=r(37215),k=r(76318),y=r(27970),x=r(76047),j=r(45606),w=r(10790);const__=u.__,_=c.PluginPrePublishPanel,C=c.PluginDocumentSettingPanel,A=p()("jetpack-ai-assistant-plugin:sidebar"),S=window?.Jetpack_Editor_Initial_State?.available_blocks?.["ai-assistant-usage-panel"]?.available||!1,E=window?.Jetpack_Editor_Initial_State?.available_blocks?.["ai-featured-image-generator"]?.available||!1,N=window?.Jetpack_Editor_Initial_State?.available_blocks?.["ai-title-optimization"]?.available||!1,T=(0,m.C)("ai-title-optimization-keywords-support"),B=({placement:e,requireUpgrade:t,upgradeType:r,showUsagePanel:s,showFairUsageNotice:o})=>{const{checkoutUrl:i}=(0,n.ON)(),{productPageUrl:u}=(0,h.A)(),d=(0,b.Ul)(),p=(0,l.useSelect)((e=>e(c.store).isEditedPostEmpty()),[]),m=__("Optimize Publishing","jetpack"),g=__("Optimize Title","jetpack"),x=T?g:m;return(0,w.jsxs)(w.Fragment,{children:[o&&(0,w.jsx)(a.PanelRow,{className:"jetpack-ai-sidebar__feature-section",children:(0,w.jsx)(a.BaseControl,{__nextHasNoMarginBottom:!0,children:(0,w.jsx)(n.QA,{variant:"muted"})})}),p&&(0,w.jsx)(a.PanelRow,{className:"jetpack-ai-sidebar__warning-content",children:(0,w.jsx)(a.Notice,{isDismissible:!1,status:"warning",children:__("The following features require content to work.","jetpack")})}),(0,b.GB)()&&d&&(0,w.jsx)(a.PanelRow,{children:(0,w.jsxs)(a.BaseControl,{__nextHasNoMarginBottom:!0,children:[(0,w.jsx)(a.BaseControl.VisualLabel,{children:__("Write Brief (Beta)","jetpack")}),(0,w.jsx)(f.Lx,{})]})}
__("You have reached the limit of <strong>%d requests</strong>. <button><span>Upgrade to continue generating feedback.</span></button>","jetpack"),p),g=(0,o.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. <strong>Please reach out to your VIP account team.</strong>","jetpack"),{strong:(0,i.jsx)("strong",{})}),f=(0,o.createInterpolateElement)(20===p?h:m,{strong:(0,i.jsx)("strong",{}),button:(0,i.jsx)(s.Button,{variant:"link",onClick:d,href:c,target:"_blank"}),span:(0,i.jsx)("span",{})});return(0,i.jsx)("p",{children:"vip"===t?g:f})}},1661:(e,t,r)=>{"use strict";r.d(t,{S:()=>n});constn="jetpack-ai-breve"},27180:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});varn=r(85985),s=r(56427),o=r(29491),a=r(47143),i=r(27723),l=r(51113),c=r(10748),u=r(51609),d=r(29526),p=r(80555),h=r(81932),m=r(36205),g=r(10790);const__=i.__,f=(0,o.compose)((0,a.withSelect)((e=>({blocks:e("core/block-editor").getBlocks(),disabledFeatures:e("jetpack/ai-breve").getDisabledFeatures()}))))((({blocks:e,disabledFeatures:t})=>{const[r,i]=(0,u.useState)(null),{toggleFeature:f,toggleProofread:b,setPopoverHover:v,setHighlightHover:k,setPopoverAnchor:y}=(0,a.useDispatch)("jetpack/ai-breve"),{tracks:x}=(0,n.st)(),j=(0,a.useSelect)((e=>e("jetpack/ai-breve").isProofreadEnabled()),[]),w=(0,u.useCallback)((()=>{if(!j)return;constt=(0,m.M)(e),r=(0,p.A)(t),n="number"==typeofr?r.toFixed(2):null;i(n)}),[e,j]),_=(0,o.useDebounce)(w,250),C=(0,u.useCallback)((e=>t=>{x.recordEvent("jetpack_ai_breve_feature_toggle",{type:e,on:t}),f(e,t)}),[x,f]),A=(0,u.useCallback)((()=>{x.recordEvent("jetpack_ai_breve_toggle",{on:!j}),b()}),[x,j,b]);return(0,u.useEffect)((()=>{_()}),[_]),(e=>{const[t,r]=(0,u.useState)(!1);t||(e(),r(!0))})(w),(0,u.useEffect)((()=>{v(!1),k(!1),y({target:null,virtual:null})}),[v,k,y,j,t]),(0,g.jsxs)("div",{className:"jetpack-ai-proofread",children:[(0,g.jsx)(s.PanelRow,{children:(0,g.jsx)(s.BaseControl,{__nextHasNoMarginBottom:!0,children:(0,g.jsx)(s.ToggleControl,{checked:j,onChange:A,label:__("Show issues & suggestions","jetpack"),__nextHasNoMarginBottom:!0})})}),j&&(0,g.jsx)(s.PanelRow,{children:(0,g.jsxs)(s.Card,{size:"small",className:"jetpack-ai__write-brief-card",children:[(0,g.jsx)(s.CardBody,{size:"small",children:(0,g.jsx)(s.BaseControl,{__nextHasNoMarginBottom:!0,children:(0,g.jsx)("div",{className:"feature-checkboxes-container",children:d.A.map((e=>(0,h.Ur)(e.config.name)&&(0,g.jsx)(s.CheckboxControl,{className:j?"":"is-disabled",disabled:!j,"data-breve-type":e.config.name,label:e.config.title,checked:!t.includes(e.config.name),onChange:C(e.config.name),__nextHasNoMarginBottom:!0},e.config.name)))})})}),(0,g.jsx)(s.CardFooter,{size:"small",className:"jetpack-ai-proofread__grade-level-container",children:null===r?(0,g.jsx)("p",{className:"jetpack-ai-proofread__help-text",children:__("Write to see your grade level.","jetpack")}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{className:"jetpack-ai-proofread__grade-label",children:[r," ",__("Reading grade score","jetpack")]}),(0,g.jsx)(s.Tooltip,{text:__("To make it easy to read, aim for level 8–12","jetpack"),children:(0,g.jsx)(l.A,{icon:c.A,size:20})})]})})]})})]})}))},64949:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>c,jp:()=>i,zz:()=>a});varn=r(27723),s=r(53817),o=r(80811);const__=n.__,a=o.A,i={name:"complex-words",title:__("Complex words","jetpack"),tagName:"span",className:"jetpack-ai-breve__has-proofread-highlight--complex-words",defaultEnabled:!0},l=newRegExp(`\\b(${Object.keys(o.A).map(s.N).join("|")})\\b`,"gi");functionc(e){constt=e.matchAll(l),r=[];for(consteoft){constt=e[0].trim();r.push({text:t,suggestion:o.A[t],startIndex:e.index,endIndex:e.index+t.length})}returnr}},80811:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});constn={"a and/or b":"a or b or both","able to":"can",accompany:"go with",accomplish:"do",accorded:"given",accordingly:"so",accrue:"add",accurate:"correct",activate:"turn on",additional:"more",address:"discuss","adjacent to":"next to",administer:"manage",advantageous:"helpful","adversely impact on":"hurt",advise:"recommend","afford an opportunity":"a
__("Alt text added to %1$d of %2$d images","jetpack"),t.length,e.length)):v(__("Alt text added to all images","jetpack")):v("")}),[]);constx=(0,i.useMemo)((()=>({"seo-title":m?null:k,"seo-meta-description":g?null:y,"images-alt-text":f?null:b})),[g,b,f,y,k,m]),j=(0,i.useMemo)((()=>Object.values(x).every((e=>!e))),[x]),w=__("Want to fine-tune this metadata further?","jetpack"),_=__("No metadata found. Add it to improve search engine visibility.","jetpack");return(0,h.jsx)(h.Fragment,{children:(0,h.jsxs)(s.PanelRow,{className:"jetpack-seo-sidebar__feature-section jetpack-seo-sidebar__feature-section--toggle",children:[(0,h.jsx)(s.BaseControl,{__nextHasNoMarginBottom:!0,className:"ai-seo-enhancer-toggle",help:j?_:w,label:__("Metadata","jetpack"),id:"jetpack-seo-enhancer-generated-metadata",children:!j&&d.G.map((e=>x[e]?(0,h.jsxs)("div",{className:"jetpack-seo-enhancer-summary-feature",children:[(0,h.jsx)("div",{className:"jetpack-seo-enhancer-summary-feature__icon-container",children:(0,h.jsx)(c.A,{className:"jetpack-seo-enhancer-summary-feature__icon",icon:u.A})}),(0,h.jsx)(s.BaseControl,{className:"jetpack-seo-enhancer-summary-feature__control",label:d.z[e],id:e,help:x[e],__nextHasNoMarginBottom:!0,children:null},e)]},e):null))}),(0,h.jsx)(s.Button,{variant:"secondary",__next40pxDefaultSize:!0,className:"jetpack-seo-enhancer-summary__edit-button",onClick:e,children:__("Edit SEO metadata","jetpack")})]})})}},6363:(e,t,r)=>{"use strict";functionn(e){return{type:"SET_BUSY",isBusy:e}}functions(e){return{type:"SET_TITLE_BUSY",isBusy:e}}functiono(e){return{type:"SET_DESCRIPTION_BUSY",isBusy:e}}functiona(e){return{type:"SET_IS_TOGGLING_AUTO_ENHANCE",isToggling:e}}functioni(e){return{type:"SET_IS_AUTO_ENHANCE_ENABLED",isEnabled:e}}functionl(e,t){return{type:"SET_IMAGE_BUSY",clientId:e,isBusy:t}}functionc(e,t){return{type:"SET_IMAGE_FAILED",clientId:e,failed:t}}functionu(e,t){return{type:"SET_FEATURE_ENABLED",feature:e,enabled:t}}r.r(t),r.d(t,{setBusy:()=>n,setDescriptionBusy:()=>o,setFeatureEnabled:()=>u,setImageBusy:()=>l,setImageFailed:()=>c,setIsAutoEnhanceEnabled:()=>i,setIsTogglingAutoEnhance:()=>a,setTitleBusy:()=>s})},16204:(e,t,r)=>{"use strict";r.d(t,{M:()=>d});varn=r(97999),s=r(85985),o=r(47143),a=r(4167),i=r(6363),l=r(49824),c=r(16886);letu=!1;try{if(!(0,n.isSimpleSite)()){conste=(0,o.select)(s.Ft).getJetpackModules()["seo-tools"],t=e&&"ai_seo_enhancer_enabled"ine.options;u=t&&e.options?.ai_seo_enhancer_enabled?.current_value}}catch{u=!1}constd=(0,o.createReduxStore)("jetpack/seo-enhancer",{reducer:l.A,selectors:c,actions:i,initialState:function(){conste=a.G.reduce(((e,t)=>(e[t]=!0,e)),{});try{constt=localStorage.getItem("jetpack-seo-enhancer-features"),r=t?JSON.parse(t):{};for(consttofa.G)e[t]=r[t]??!0}catch{}return{isBusy:!1,isTogglingAutoEnhance:!1,isAutoEnhanceEnabled:u,busyImages:{},failedImages:{},features:e}}()});(0,o.register)(d)},49824:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});constn=function(e,t){letr=e;switch(t.type){case"SET_BUSY":return{...e,isBusy:t.isBusy};case"SET_TITLE_BUSY":return{...e,isTitleBusy:t.isBusy};case"SET_DESCRIPTION_BUSY":return{...e,isDescriptionBusy:t.isBusy};case"SET_IS_TOGGLING_AUTO_ENHANCE":return{...e,isTogglingAutoEnhance:t.isToggling};case"SET_IS_AUTO_ENHANCE_ENABLED":return{...e,isAutoEnhanceEnabled:t.isEnabled};case"SET_IMAGE_BUSY":return{...e,busyImages:{...e.busyImages,[t.clientId]:t.isBusy}};case"SET_IMAGE_FAILED":return{...e,failedImages:{...e.failedImages,[t.clientId]:t.failed}};case"SET_FEATURE_ENABLED":returnr={...e,features:{...e.features,[t.feature]:t.enabled}},n=r.features,localStorage.setItem("jetpack-seo-enhancer-features",JSON.stringify(n)),r;default:returne}varn}},16886:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getEnabledFeatures:()=>p,hasImageFailed:()=>d,isAnyImageBusy:()=>u,isAutoEnhanceEnabled:()=>l,isBusy:()=>s,isDescriptionBusy:()=>a,isImageAltTextFeatureEnabled:()=>h,isImageBusy:()=>c,isTitleBusy:()=>o,isTogglingAutoEnhance:()=>i});varn=r(47143);functions(e){returne.isBusy}functiono(e){returne.isTitleBusy}functiona(e){returne.isDescrip
__("Requests will reset to <strong>%1$d</strong> on %2$s.","jetpack"),l,d),{strong:(0,c.jsx)("strong",{})}));constb=r/l,v=(0,c.jsxs)(c.Fragment,{children:[t===s.Ti&&(0,c.jsx)("p",{children:__("Unlimited requests.","jetpack")}),(t===s._X||t===s.ds)&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("p",{className:"jetpack-ai-usage-panel__available-requests",children:f}),(0,c.jsx)(u,{usage:b})]})]}),k=(0,c.jsx)(n.A,{height:100,className:"jetpack-ai-usage-panel__loading-placeholder"}),y=(0,c.jsxs)(c.Fragment,{children:[!p&&g.length?g.join(" ").concat(" "):null,!p&&m]});return(0,c.jsxs)(o.BaseControl,{__nextHasNoMarginBottom:!0,help:y,children:[(0,c.jsx)(o.BaseControl.VisualLabel,{children:__("Available Requests","jetpack")}),!p&&v,p&&k]})}},27970:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});varn=r(96865),s=r(3924),o=r(97999),a=r(85985),i=r(56427),l=r(38443),c=r(86087),u=r(27723),d=r(75956),p=r(93471),h=r(10790);const__=u.__,m=e=>e?(0,l.gmdateI18n)("F j",e):null,g=(e,t)=>e===a._X?__("Upgrade","jetpack"):t?(0,u.sprintf)(
__("Get %1$d requests","jetpack"),t):__("Get more requests","jetpack"),f=()=>{conste=(0,s.A)("jetpack-ai-tiers-more-requests-contact"),{autosaveAndRedirect:t,isRedirecting:r}=(0,a.ZR)(e);return{contactUsURL:e,autosaveAndRedirectContactUs:t,isRedirectingContactUs:r}};functionb({isOverLimit:e,requestsCount:t,requestsLimit:r,nextStart:n,planType:s,loading:o,canUpgrade:l,showContactUsCallToAction:c,nextLimit:u,contactUsURL:d,handleContactUsClick:f,checkoutUrl:b,handleUpgradeClick:v}){constk=g(s,u),y=m(n);return(0,h.jsx)("div",{className:"jetpack-ai-usage-panel",children:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(p.A,{isOverLimit:e,requestsCount:t,requestsLimit:r,nextResetDate:y,planType:s,loading:o}),!o&&(s===a._X||s===a.ds)&&l&&(0,h.jsxs)("div",{className:"jetpack-ai-usage-panel-upgrade-button",children:[c&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("p",{children:__("Need more requests?","jetpack")}),(0,h.jsx)(i.Button,{target:"_blank",variant:"primary",label:__("Contact us for more requests","jetpack"),href:d,onClick:f,children:(0,h.jsx)("span",{children:__("Contact Us","jetpack")})})]}),!c&&(0,h.jsx)(i.Button,{target:"_blank",variant:"primary",label:__("Upgrade your Jetpack AI plan","jetpack"),href:b,onClick:v,children:(0,h.jsx)("span",{children:k})})]})]})})}functionv({placement:e=null}){const{checkoutUrl:t}=(0,n.ON)(),{contactUsURL:r}=f(),{tracks:s}=(0,d.A)(),i=(0,a.CP)(),{requestsCount:l,requestsLimit:u,isOverLimit:p,usagePeriod:m,currentTier:g,nextTier:v,loading:k}=(0,n.yM)(),y=(0,a.Bd)(g),x=(0,c.useCallback)((()=>{s.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:g?.slug,requests_count:l,...e?{placement:e}:{}})}),[s,g,l,e]),j=(0,c.useCallback)((()=>{s.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:g?.slug,requests_count:l,...e?{placement:e}:{}})}),[s,g,l,e]),w=(0,o.isWpcomPlatformSite)()&&y===a.ds&&!v;return(0,h.jsx)(b,{isOverLimit:p,requestsCount:l,requestsLimit:u,nextStart:m?.nextStart,nextLimit:v?.limit,planType:y,loading:k,canUpgrade:i,showContactUsCallToAction:w,contactUsURL:r,handleContactUsClick:j,checkoutUrl:t,handleUpgradeClick:x})}},56199:(e,t,r)=>{"use strict";r.d(t,{k:()=>n});constn="block_settings_sidebar"},88797:(e,t,r)=>{"use strict";varn=r(85985),s=r(23806);(0,n.vp)(s.U,s.W)},23806:(e,t,r)=>{"use strict";r.d(t,{U:()=>s,W:()=>o});varn=r(23162);consts="ai-assistant-plugin",o={render:n.A}},1176:(e,t,r)=>{"use strict";r.d(t,{N:()=>u});varn=r(96865),s=r(56427),o=r(27723),a=r(51609),i=r(2162),l=r(62402),c=r(10790);const__=o.__;functionu({minWords:e=10,maxWords:t=100,disabled:r,words:o,onWordsNumberChange:u,language:d,onLanguageChange:p,tone:h,onToneChange:m}){const[g,f]=(0,a.useState)(!1);constb=d?.split(" ")[0],v=n.so[b]?.label||__("Language","jetpack"),k=n.oZ[h]?.label||__("Tone","jetpack");return(0,c.jsxs)("div",{className:"jetpack-ai-generate-excerpt-control",children:[(0,c.jsxs)(s.BaseControl,{className:"jetpack-ai-generate-excerpt-control__header",__nextHasNoMarginBottom:!0,children:[(0,c.jsx)(s.BaseControl.VisualLabel,{children:__("Settings","jetpack")}),(0,c.jsx)(s.Button,{label:__("Advanced AI options","jetpack"),icon:n.cj,onClick:function(){f((e=>!e))},"aria-pressed":g,isSmall:!0})]}),g&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(i.HU,{disabled:r,onChange:p,value:d,label:v}),(0,c.jsx)(l.hN,{disabled:r,label:k,value:h,onChange:m})]}),(0,c.jsx)(s.RangeControl,{label:__("Desired length","jetpack"),value:o,onChange:u,min:e,max:t,help:__("Sets the desired length in words for the auto-generated excerpt. The final count may vary due to how AI works.","jetpack"),showTooltip:!1,disabled:r,__next40pxDefaultSize:!0})]})}},25101:(e,t,r)=>{"use strict";varn=r(85985),s=r(47143),o=r(43656),a=r(52619),i=r(10067),l=r.n(i),c=r(54681),u=r(10821),d=r(33792);constp=l()("jetpack-ai-content-lens:registration"),h=window?.Jetpack_Editor_Initial_State?.available_blocks["ai-content-lens"];h?.available&&((0,a.addFilter)("blocks.registerBlockType","jetpack/ai-content-lens-features",(function(e,t){returnt!==c.name?e:(0,u.Bi)()?((0,n.vp)(d.s,d.$),p("Registered AI Excerpt plugin"),(0,(0,s.d
_n("%1$s word","%1$s words",L,"jetpack"),L),D="requesting"===N||"suggesting"===N||"done"===N&&!y,F="requesting"===N||"suggesting"===N,O=F||"done"===N;const{requireUpgrade:z,isOverLimit:U}=(0,n.yM)();return(0,g.jsxs)("div",{className:"jetpack-ai-post-excerpt",children:[(0,g.jsx)(i.TextareaControl,{__nextHasNoMarginBottom:!0,label:__("Write an excerpt (optional)","jetpack"),onChange:e=>h({excerpt:e}),help:L?R:null,value:M,disabled:O}),(0,s.isWpcomPlatformSite)()?(0,g.jsx)(a.k4,{supportLink:__("https://wordpress.com/support/excerpts/","jetpack"),supportPostId:1569,children:__("Learn more about manual excerpts","jetpack")}):(0,g.jsx)(i.ExternalLink,{href:__("https://jetpack.com/support/create-better-post-excerpts-with-ai/","jetpack"),children:__("Learn more about manual excerpts","jetpack")}),(0,g.jsxs)("div",{className:"jetpack-generated-excerpt__ai-container",children:[T?.code&&"error_quota_exceeded"!==T.code&&(0,g.jsx)(i.Notice,{status:T.severity,isDismissible:!1,className:"jetpack-ai-assistant__error",children:T.message}),U&&(0,g.jsx)(n.Hb,{placement:"excerpt-panel"}),(0,g.jsx)(m.N,{words:v,onWordsNumberChange:e=>{k(e),x(!0)},language:j,onLanguageChange:e=>{w(e),x(!0)},tone:_,onToneChange:e=>{C(e),x(!0)},disabled:F||z}),(0,g.jsx)(i.BaseControl,{help:I?.length?null:__("Add content to generate an excerpt.","jetpack"),__nextHasNoMarginBottom:!0,children:(0,g.jsxs)("div",{className:"jetpack-generated-excerpt__generate-buttons-container",children:[(0,g.jsx)(i.Button,{onClick:function(){h({excerpt:e}),r.recordEvent("jetpack_ai_assistant_block_discard",{feature:"jetpack-ai-content-lens",model:P}),B()},variant:"secondary",isDestructive:!0,disabled:"done"!==N||z,children:__("Discard","jetpack")}),(0,g.jsx)(i.Button,{onClick:function(){h({excerpt:E}),r.recordEvent("jetpack_ai_assistant_block_accept",{feature:"jetpack-ai-content-lens",model:P}),B()},variant:"secondary",disabled:"done"!==N||z,children:__("Accept","jetpack")}),(0,g.jsx)(i.Button,{onClick:function(){x(!1),B();conste=[{role:"jetpack-ai",context:{type:"ai-content-lens",contentType:"post-excerpt",postId:t,words:v,language:j,tone:_,content:`Post content:\n${I}\n`}}];f(),A(e,{feature:"jetpack-ai-content-lens",model:P})},variant:"secondary",isBusy:F,disabled:D||z||!I,children:__("Generate","jetpack")})]})})]})]})}constb=()=>{if((0,l.useSelect)((e=>{const{getCurrentPostType:t}=e(c.store),r=t();return"wp_template"===r||"wp_template_part"===r||"wp_block"===r}),[]))returnnull;conste=e=>{constt=c.PluginDocumentSettingPanel;return(0,g.jsx)(t,{...e})};return(0,g.jsx)(c.PostTypeSupportCheck,{supportKeys:"excerpt",children:(0,g.jsx)(e,{className:(0,h.m)("ai-content-lens")?"is-beta-extension inset-shadow":"",name:"ai-content-lens-plugin",title:__("Excerpt","jetpack"),children:(0,g.jsx)(f,{})})})}},33792:(e,t,r)=>{"use strict";r.d(t,{$:()=>o,s:()=>s});varn=r(33251);consts="ai-content-lens",o={render:n.g}},31009:(e,t,r)=>{"use strict";r.d(t,{m:()=>l});varn=r(3924),s=r(85985),o=r(56427),a=r(27723),i=r(10790);const__=a.__,l=({changeStatus:e,isLoading:t,isModuleActive:r})=>{const{tracks:a}=(0,s.st)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{children:__("Activate the Likes feature to allow others to like your posts.","jetpack")}),(0,i.jsx)(o.Button,{disabled:r||t,isBusy:t,onClick:()=>(a.recordEvent("jetpack_editor_likes_enable"),e(!0)),variant:"secondary",children:t?__("Activating Likes","jetpack"):__("Activate Likes","jetpack",0)}),(0,i.jsx)("div",{className:"components-likes-placeholder__learn-more",children:(0,i.jsx)(o.ExternalLink,{href:(0,n.A)("jetpack-support-likes"),children:__("Learn more about Jetpack Likes.","jetpack")})})]})}},79013:(e,t,r)=>{"use strict";r.d(t,{L:()=>i});varn=r(50723),s=r(11876),o=r(56427),a=r(10790);consti=()=>(0,a.jsx)(n.Ay,{children:(0,a.jsx)(o.Placeholder,{children:(0,a.jsxs)(o.Flex,{gap:2,direction:"column",style:{flexBasis:"100%",padding:"0 1em"},children:[(0,a.jsx)(o.FlexItem,{children:(0,a.jsx)(s.A,{width:"100%",height:30})}),(0,a.jsx)(o.FlexItem,{children:(0,a.jsx)(s.A,{width:"100%",height:90})})]})})})},24938:(e,t,r)=>{"usest
__("To use the SEO feature you need to upgrade to the %s plan","jetpack"),h)}),(0,c.jsx)("div",{className:"components-seo-upsell__learn-more",children:(0,c.jsx)(s.k4,{supportLink:"https://wordpress.com/support/seo-tools/",supportPostId:120916,children:g})}),(0,c.jsx)(o.Button,{href:u?null:t,onClick:e=>{e.preventDefault(),p.recordEvent("jetpack_seo_tools_upsell_click"),r(e)},target:"_top",icon:i.A,className:(0,l.A)("components-seo-upsell__button is-primary",{"jetpack-upgrade-plan__hidden":!t}),isBusy:u,children:u?__("Redirecting…","jetpack"):m})]})}},99463:(e,t,r)=>{"use strict";r.d(t,{P:()=>a});varn=r(56427),s=r(27723),o=r(10790);const__=s.__,_n=s._n,a=({suggestedLimit:e,value:t,label:r,...a})=>{consti=!e||t.length<=e?(0,s.sprintf)(/* translators: Placeholder is a number of characters in a sentence. */
__("It’s recommended to use less than %1$d characters in this field. (%2$d/%1$d)","jetpack"),e,t.length);return(0,o.jsx)("div",{className:"jetpack-seo-message-box",children:(0,o.jsx)(n.TextareaControl,{__nextHasNoMarginBottom:!0,label:r,help:i,value:t,...a})})}},92411:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});varn=r(85985),s=r(86087),o=r(27723),a=r(99463),i=r(53189),l=r(10790);const__=o.__,c=!0===(0,n.FB)("ai-seo-enhancer")?.available;classuextendss.Component{onMessageChange=e=>{this.props.updateMetaValue(e)};render(){const{metaValue:e}=this.props,t=__("Write a description…","jetpack"),r=__("Add a compelling, keyword-rich summary that appears in search results (ideally under 156 characters)","jetpack");return(0,l.jsx)(a.P,{value:e,onChange:this.onMessageChange,label:__("SEO Description","jetpack"),placeholder:c?r:t,suggestedLimit:156,rows:4})}}constd=(0,i.m)("advanced_seo_description")(u)},44921:(e,t,r)=>{"use strict";varn=r(85985),s=r(37802);(0,n.vp)(s.U,s.W)},37802:(e,t,r)=>{"use strict";r.d(t,{U:()=>A,W:()=>B});varn=r(97999),s=r(85985),o=r(82201),a=r(56427),i=r(3582),l=r(47143),c=r(43656),u=r(86087),d=r(27723),p=r(13022),h=r(90062),m=r(89870),g=r(12430),f=r(77682),b=r(96012),v=r(76262),k=r(51626),y=r(24294),x=r(92411),j=r(5664),w=r(9411),_=r(80151),C=r(10790);const__=d.__,A="seo",S="function"==typeof(0,l.select)(c.store).isPublishSidebarOpened,E=!0===(0,s.FB)("ai-seo-enhancer")?.available&&S,N=!(0,n.isSimpleSite)(),T=()=>{const{isLoadingModules:e,isChangingStatus:t,isModuleActive:r,changeStatus:d}=(0,s.q7)("seo-tools"),A=(0,l.useSelect)((e=>e(c.store).isPublishSidebarOpened?.()),[]),{updateSeoData:T,isBusy:B}=(0,b.X)(),P=(0,l.useSelect)((e=>{constt=e(c.store).getCurrentPostType(),r=e(i.store).getPostType(t);returnr?.viewable}),[]),I=(0,u.useRef)(!1),{isEnabled:M,isToggling:L}=(0,f.S)(),{closePublishSidebar:R}=(0,l.useDispatch)(c.store);(0,u.useEffect)((()=>{E&&A&&!I.current&&!B&&M&&!L&&N&&S&&T({trigger:"auto"}),I.current=A}),[A,T,B,M,L]);if(!P)returnnull;constD=(0,s.tu)("advanced-seo"),F=(0,n.isWpcomPlatformSite)(),O=!(0,s.tu)("ai-seo-enhancer"),z={title:__("SEO","jetpack")};if(F&&!1!==D)return(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(h.A,{children:(0,C.jsx)(a.PanelBody,{className:"jetpack-seo-panel",...z,initialOpen:!1,children:(0,C.jsx)(y.A,{requiredPlan:D})})})});if(!r)return(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(h.A,{children:(0,C.jsx)(a.PanelBody,{className:"jetpack-seo-panel",...z,initialOpen:!1,children:e?(0,C.jsx)(k.G,{}):(0,C.jsx)(v.l,{changeStatus:d,isModuleActive:r,isLoading:t})})})});constU={icon:(0,C.jsx)(o.jt,{}),title:__("SEO","jetpack"),initialOpen:E};return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(h.A,{children:(0,C.jsxs)(a.PanelBody,{className:"jetpack-seo-panel",...z,children:[E&&O&&(0,C.jsx)(m.k,{placement:"jetpack-sidebar",disableAutoEnhance:!N}),(0,C.jsx)(a.PanelRow,{className:(0,p.A)({"jetpack-seo-sidebar__feature-section":E}),children:(0,C.jsx)(_.A,{})}),(0,C.jsx)(a.PanelRow,{className:(0,p.A)({"jetpack-seo-sidebar__feature-section":E}),children:(0,C.jsx)(x.A,{})}),(0,C.jsx)(a.PanelRow,{className:(0,p.A)({"jetpack-seo-sidebar__feature-section":E}),children:(0,C.jsx)(j.A,{})})]})}),(0,C.jsx)(c.PluginPrePublishPanel,{...U,children:(0,C.jsxs)("div",{className:"jetpack-seo-panel",children:[E&&O&&(0,C.jsx)(m.k,{placement:"jetpack-prepublish-sidebar",disableAutoEnhance:!N}),(0,C.jsx)(a.PanelRow,{children:(0,C.jsx)(_.A,{})}),(0,C.jsx)(a.PanelRow,{children:(0,C.jsx)(x.A,{})}),(0,C.jsx)(a.PanelRow,{children:(0,C.jsx)(j.A,{})})]})}),E&&(0,C.jsx)(c.PluginPostPublishPanel,{...U,children:(0,C.jsx)("div",{className:"jetpack-seo-panel",children:(0,C.jsx)(g.A,{onEdit:async()=>{awaitR(),(0,w.k)()}})})})]})},B={render:()=>(0,C.jsx)(T,{})}},5664:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});varn=r(56427),s=r(27723),o=r(53189),a=r(10790);const__=s.__,i=(0,o.m)("jetpack_seo_noindex")((({metaValue:e,updateMetaValue:t})=>(0,a.jsx)(n.ToggleControl,{label:__("Hide page from search engines","jetpack"),help:__("Ifselected,a'noindex'tagwillhelpinstructsearchenginestonotincludethispageinsear
__("%1$s / %2$s","jetpack"),o,r)}functionv({onClose:e,product:t}){const{selectedProductIds:r,setSelectedProductIds:n}=(0,h.B)(),{id:s,title:a}=t,i=r&&r.includes(s),c=i?l.A:void0,u=t?" "+b(t):null;return(0,f.jsxs)(o.MenuItem,{icon:c,onClick:t=>{t.preventDefault();consto=i?r.filter((e=>e!==s)):[...r,s];n(o),e()},selected:i,value:s,children:[a," : ",u]})}functionk({onClose:e}){const{clientId:t,productType:r}=(0,h.B)(),n=(0,a.useSelect)((e=>e(d.M).getSiteSlug())),s=(0,m.A)(t);if(p.Wd===(0,p.AU)())return(0,f.jsx)(o.MenuItem,{children:n&&(0,f.jsx)(o.ExternalLink,{href:`https://wordpress.com/earn/payments/${n}#add-new-payment-plan`,children:(0,g.W)("add a new product",r)})});return(0,f.jsx)(o.MenuItem,{onClick:t=>{t.preventDefault(),s(),setTimeout((()=>{conste=document.getElementById("new-product-title");null!==e&&e.focus()}),100),e()},children:(0,g.W)("add a new product",r)})}functiony(){const{products:e,productType:t,selectedProductIds:r}=(0,h.B)(),n=(0,a.useSelect)((e=>e(d.M).getSelectedProducts(r)),[r]);leti=null,l=c.A;returnn.length>1?i=__("Multiple products selected","jetpack"):1===n.length&&(i=b(n[0])),n.length!=n.length&&(i=(0,g.W)("product not found",t),l=u.A),(0,f.jsx)(s.BlockControls,{__experimentalShareWithChildBlocks:!0,group:"block",children:(0,f.jsx)(o.ToolbarDropdownMenu,{className:"product-management-control-toolbar__dropdown-button",icon:l,label:(0,g.W)("select a product",t),text:i,children:({onClose:t})=>(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(o.MenuGroup,{children:e.map((e=>(0,f.jsx)(v,{onClose:t,product:e},e.id)))}),(0,f.jsx)(o.MenuGroup,{children:(0,f.jsx)(k,{onClose:t})})]})})})}},21212:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});varn=r(94715),s=r(47143),o=r(14309),a=r(59340);functioni(e){constt=(0,a.AU)(),{selectBlock:r}=(0,s.useDispatch)(n.store),{enableComplementaryArea:i}=(0,s.useDispatch)("core/interface"),{closePublishSidebar:l}=(0,s.useDispatch)(o.store);return()=>{switch(e&&r(e),t){casea.O3:returni("core/edit-site","edit-site/block-inspector");casea.RZ:returni("core/edit-widgets","edit-widgets/block-inspector");default:l(),i("core/edit-post","edit-post/block")}}}},1990:(e,t,r)=>{"use strict";r.d(t,{G:()=>l,W:()=>a});varn=r(27723),s=r(29726);const__=n.__,o={"add a new product":{[s._$]:__("Add a new payment plan","jetpack"),[s.h5]:__("Add a new subscription","jetpack")},"product not found":{[s._$]:__("Payment plan not found","jetpack"),[s.h5]:__("Subscription not found","jetpack")},"select a product":{[s._$]:__("Select a payment plan","jetpack"),[s.h5]:__("Select a subscription","jetpack")},"default new product title":{[s._$]:__("Monthly Subscription","jetpack"),[s.h5]:__("Monthly Subscription","jetpack")},"manage your products":{[s._$]:__("Manage your payment plans.","jetpack"),[s.h5]:__("Manage your subscriptions.","jetpack")},"saving product":{[s._$]:__("Saving payment plan…","jetpack"),[s.h5]:__("Saving subscription…","jetpack")},"add product":{[s._$]:__("Add payment plan","jetpack"),[s.h5]:__("Add subscription","jetpack")},"product requires a name":{[s._$]:__("Payment plan requires a name","jetpack"),[s.h5]:__("Subscription requires a name","jetpack")},"product requires a valid price":{[s._$]:__("Payment plan requires a valid price","jetpack"),[s.h5]:__("Subscription requires a valid price","jetpack")},"successfully created product":{[s._$]:__("Successfully created payment plan","jetpack"),[s.h5]:__("Successfully created subscription","jetpack")},"there was an error when adding the product":{[s._$]:__("There was an error when adding the payment plan.","jetpack"),[s.h5]:__("There was an error when adding the subscription.","jetpack")},"invalid product configured for this block":{[s._$]:__("Invalid payment plan configured for this block.","jetpack"),[s.h5]:__("Invalid subscription configured for this block.","jetpack")},"the button will be hidden from your visitors until you select a valid product":{[s._$]:__("The button will be hidden from your visitors until you select a valid payment plan.","jetpack"),[s.h5]:__("Thesubscribebuttonwillbehiddenfromyourvisitorsuntil
_n("This post will be sent to everyone subscribed to %1$s (%2$s subscriber).","This post will be sent to everyone subscribed to %1$s (%2$s subscribers).",n??0,"jetpack"),s,o):(0,c.sprintf)(
_n("This post was sent to everyone subscribed to %1$s (<link>%2$s subscriber</link>).","This post was sent to everyone subscribed to %1$s (<link>%2$s subscribers</link>).",n??0,"jetpack"),s,o)};functionf(e,t){return(0,n.getAdminUrl)(`admin.php?page=stats#!/stats/email/opens/day/${t}/${e}`)}constb=function({accessLevel:e,prePublish:t=!1}){constr=(0,a.useSelect)((e=>e("core/block-editor").getBlocks().some((e=>e.name===u.name)))),{isScheduledPost:n,isPostOlderThanADay:b,postCategories:v,postId:k,postMeta:y}=(0,a.useSelect)((e=>{const{isCurrentPostScheduled:t,getEditedPostAttribute:r,getCurrentPost:n}=e(i.store),s=n()?.status,o=newDate(n()?.date),a=newDate(Date.now()-864e5);return{isScheduledPost:t(),isPostOlderThanADay:"publish"===s&&o<a,postCategories:r("categories"),postId:n()?.id,postMeta:r("meta")}})),x=window.Jetpack_Editor_Initial_State?.wpcomBlogId,{emailSubscribersCount:j,hasFinishedLoading:w,newsletterCategories:_,newsletterCategoriesEnabled:C,newsletterCategorySubscriberCount:A,paidSubscribersCount:S,totalEmailsSentCount:E}=(0,a.useSelect)((e=>{const{getNewsletterCategories:t,getNewsletterCategoriesEnabled:r,getNewsletterCategoriesSubscriptionsCount:n,getSubscriberCounts:s,getTotalEmailsSentCount:o,hasFinishedResolution:a}=e(h.M),{emailSubscribers:i,paidSubscribers:l}=s();return{hasFinishedLoading:[a("getSubscriberCounts"),a("getNewsletterCategories"),a("getNewsletterCategoriesSubscriptionsCount")].every(Boolean),emailSubscribersCount:i,newsletterCategories:t(),newsletterCategoriesEnabled:r(),newsletterCategorySubscriberCount:n(),paidSubscribersCount:l,totalEmailsSentCount:b?o(x,k):null}}));if(!w)return(0,m.jsx)(o.Animate,{type:"loading",children:({className:e})=>(0,m.jsx)("p",{className:`jetpack-subscribe-affirmation-loading ${e}`,children:__("Loading…","jetpack")})});constN=e===d.P2.paid_subscribers.key,T=t||n,B=(0,p.Yc)({accessLevel:e,subscribers:b?E:j,paidSubscribers:S,postHasPaywallBlock:r});letP;returnP=y?.[d.KG]?__("Not sent via email.","jetpack"):(0,s.lk)()?__("Your site is in Coming Soon mode. Emails are sent only when your site is public.","jetpack"):C&&_.length>0&&!N?g({futureTense:T,isPaidPost:N,newsletterCategories:_,postCategories:v,reachCount:b?E:A}):(({futureTense:e,isPaidPost:t,postHasPaywallBlock:r,reachCount:n})=>{consts=n.toLocaleString();returne?t&&!r?(0,c.sprintf)(/* translators: %s is the number of subscribers */
_n("This post will be sent to <strong>%s paid subscriber</strong>.","This post will be sent to <strong>%s paid subscribers</strong>.",n,"jetpack"),s):(0,c.sprintf)(/* translators: %s is the number of subscribers */
_n("This post will be sent to <strong>%s subscriber</strong>.","This post will be sent to <strong>%s subscribers</strong>.",n,"jetpack"),s):t&&!r?(0,c.sprintf)(/* translators: %s is the number of subscribers */
_n("This post was sent to <link>%s paid subscriber</link>.","This post was sent to <link>%s paid subscribers</link>.",n,"jetpack"),s):(0,c.sprintf)(/* translators: %s is the number of subscribers */
_n("This post was sent to <link>%s subscriber</link>.","This post was sent to <link>%s subscribers</link>.",n,"jetpack"),s)})({futureTense:T,isPaidPost:N,postHasPaywallBlock:r,reachCount:B}),(0,m.jsx)("p",{children:(0,l.createInterpolateElement)(P,{strong:(0,m.jsx)("strong",{}),link:(0,m.jsx)("a",{href:f(x,k)})})})}},64234:(e,t,r)=>{"use strict";r.d(t,{Qu:()=>l,fI:()=>c,mf:()=>u});varn=r(56427),s=r(86087),o=r(27723),a=r(37906),i=r(10790);const__=o.__,l=e=>{constt="https://wordpress.com/earn/payments/"+location.hostname;returne?t:t+"#add-tier-plan"},c=(e,t)=>"public"!==e&&t!==a.P2.everybody.key,u=()=>(0,i.jsx)(n.Notice,{status:"warning",isDismissible:!1,className:"edit-post-post-misconfiguration__warning",children:(0,s.createInterpolateElement)(__("You’ll need to change the post’s access to Everybody or visibility to Public.<br/><br/>Subscribers aren’t able to view private or password-protected posts.","jetpack"),{br:(0,i.jsx)("br",{})})})},14435:(e,t,r)=>{"use strict";varn=r(97999),s=r(85985),o=r(1455),a=r.n(o),i=r(47143),l=r(27723);r(692);const__=l.__;functionc(){conste=(0,s.GE)();returnwindow?.location&&e?(0,n.isWpcomPlatformSite)()?`https://wordpress.com/plans/my-plan/${e}`:`${window.location.protocol}//${e.replace("::","/")}/wp-admin/admin.php?page=jetpack#/my-plan`:null}(async()=>{if(window?.location){if(newURLSearchParams(window.location.search).get("plan_upgraded")){lete=null;e:try{if((0,n.isSimpleSite)())breake;constt=awaita()({path:"/jetpack/v4/site"});e=JSON.parse(t.data).plan.product_name}finally{constt=c();(0,i.dispatch)("core/notices").createNotice("success",e?(0,l.sprintf)(/* translators: %s is the plan name, such as Jetpack Premium. */
__("Congratulations! Your site is now on the %s plan.","jetpack"),e):__("Congratulations! Your site is now on a paid plan.","jetpack"),{isDismissible:!0,...t&&{actions:[{url:c(),label:__("View my plan","jetpack")}]}})}}}})()},79366:(e,t,r)=>{"object"==typeofwindow&&window.Jetpack_Block_Assets_Base_Url&&(r.p=window.Jetpack_Block_Assets_Base_Url)},59740:(e,t,r)=>{"use strict";varn=r(74997),s=r(47143),o=r(93832),a=r(27734);const{url:i,title:l,text:c,comment_content:u,comment_author:d}=(0,o.getQueryArgs)(window.location.href);i&&(async()=>{await(0,a.O)();conste=[];if(c&&c!==l){constt=`<a href="${i}">${l}</a>`;e.push((0,n.createBlock)("core/quote",{value:`<p>${c}</p>`,citation:t}))}u&&e.push((0,n.createBlock)("core/quote",{value:u,citation:d})),e.push((0,n.createBlock)("core/embed",{url:i,type:"wp-embed"})),(0,s.dispatch)("core/editor").resetEditorBlocks(e)})()},94375:(e,t,r)=>{"use strict";r.d(t,{A:()=>i,M:()=>l});varn=r(85985),s=r(74997),o=r(52619);consta="jetpack/";functioni(e,t,r=[],i=!0){constl="string"==typeofe?e:e.name,c=l.startsWith(a),u=c?l.slice(a.length):l,{available:d,details:p,unavailableReason:h}=(0,n.FB)(u),m=(0,n.aq)(h,p),g=i||c?a:"";if(!d&&!m)return!1;constf=g+u,b=(0,s.registerBlockType)("object"==typeofe?e:f,t);returnm&&(0,o.addFilter)("editor.BlockListBlock",`${f}-with-has-warning-is-interactive-class-names`,(0,n.BT)(f)),r.forEach((e=>(0,s.registerBlockType)(g+e.name,e.settings))),b}functionl(e,t,r,s){returni(e,{...t,icon:(0,n.Cq)(e),attributes:e.attributes||{}},r,s)}},62289:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});varn=r(5573),s=r(10790);consto=(e,t=24,r=24,o="0 0 24 24")=>(0,s.jsxs)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",width:t,height:r,viewBox:o,children:[(0,s.jsx)(n.Path,{fill:"none",d:"M0 0h24v24H0V0z",className:"icon-filler"}),e]})},64882:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});varn=r(94715),s=r(13022),o=r(10790);consta=(e,t,r,a,i,l={})=>{const{isSelected:c}=t,u=t.attributes[e];returnl.className=(0,s.A)(l.className,`jetpack-${e}-block`,{"is-selected":c}),(0,o.jsxs)("div",{...l,children:[!c&&""!==u&&a(t),(c||""===u)&&(0,o.jsx)(n.PlainText,{value:u,placeholder:r,"aria-label":r,onChange:i})]})}},21929:(e,t,r)=>{"use strict";varn=r(47143),s=r(27723);r(692);const__=s.__;if("undefined"!=typeofwindow&&window.location){conste=newURLSearchParams(window.location.search);e.get("stripe_connect_success")?(0,n.dispatch)("core/notices").createNotice("success",__("Congrats! Your site is now connected to Stripe. You can now start accepting funds!","jetpack")):e.get("stripe_connect_cancelled")&&(0,n.dispatch)("core/notices").createNotice("error",__("You cancelled connecting your site to Stripe.","jetpack"))}},56145:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});varn=r(1455),s=r.n(n);consto=()=>{};functiona(e,t=o){returnt(!0),newPromise(((r,n)=>{s()({path:`/wpcom/v2/resolve-redirect/?url=${encodeURIComponent(e)}`}).then((s=>{t(!1);consto=s.status?parseInt(s.status,10):null;o&&o>=400?n():r(s.url||e)}),(()=>{t(!1),n()}))}))}},26247:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});varn=r(39384),s=r(97999);consto=()=>{const{isUserConnected:e}=(0,n.useConnection)();return(0,s.isSimpleSite)()||e}},89303:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});varn=r(86087);consts=e=>{constt=(0,n.useRef)(void0);return(0,n.useEffect)((()=>{t.current=e}),[e]),t.current};functiono({attributes:e,disableEffects:t=!1,setAttributes:r}){const{align:o,width:a}=e,i=s(o);(0,n.useEffect)((()=>{if(t)return;i!==o&&("left"===o||"right"===o)&&a?.includes("%")&&r({width:void0})}),[o,t,i,r,a])}},27734:(e,t,r)=>{"use strict";r.d(t,{O:()=>s});varn=r(47143);consts=async()=>newPromise((e=>{if((0,n.select)("core/editor").isCleanNewPost()||(0,n.select)("core/block-editor").getBlocks().length>0)returnvoide();constt=setTimeout((()=>{r(),e()}),2e3),r=(0,n.subscribe)((()=>{(0,n.select)("core/block-editor").getBlocks().length>0&&(clearTimeout(t),r(),e())}))}))},38062:(e,t,r)=>{"use strict";r.d(t,{D:()=>d,s:()=>p});varn=r(56427),s=r(86087),o=r(27723),a=r(13022),i=r(10790);const__=o.__,l=[{value:"%",label:"%",default:100},{value:"px",label:
__("Minimum allowed price is %s.","jetpack"),(0,n.vv)(k,b)),m),voids(!1);if(!(0,c.kF)(b,v))return(0,d.S)((0,l.W)("product requires a valid price",t),m),voids(!1);try{constn=awaito()({path:"/wpcom/v2/memberships/product",method:"POST",data:e}),a={id:n.id,title:n.title,interval:n.interval,price:n.price,currency:n.currency},c=m.select(u.EF).getProducts();i(p(c.concat([a]))),r([a.id]),h&&(0,d.L)((0,l.W)("successfully created product",t),m),s(!0)}catch{(0,d.S)((0,l.W)("there was an error when adding the product",t),m),s(!1)}},v=e=>({type:"SET_SUBSCRIBER_COUNTS",subscriberCounts:e}),k=e=>({type:"SET_TOTAL_EMAILS_SENT_COUNT",totalEmailsSentCount:e}),y=e=>({type:"SET_NEWSLETTER_CATEGORIES",newsletterCategories:e}),x=e=>({type:"SET_NEWSLETTER_CATEGORIES_SUBSCRIPTIONS_COUNT",newsletterCategoriesSubscriptionsCount:e})},3696:(e,t,r)=>{"use strict";r.d(t,{EF:()=>n,JA:()=>o,an:()=>s,gI:()=>a,ky:()=>i});constn="jetpack/membership-products",s=0,o=1,a=2,i="tier"},16521:(e,t,r)=>{"use strict";r.d(t,{M:()=>c});varn=r(47143),s=r(66314),o=r(3696),a=r(91497),i=r(18410),l=r(92955);constc=(0,n.createReduxStore)(o.EF,{actions:s,reducer:a.A,resolvers:i,selectors:l,__experimentalUseThunks:!0});(0,n.register)(c)},91497:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});constn={products:[],apiState:r(3696).an,connectUrl:null,siteSlug:"",connectedAccountDefaultCurrency:"",subscriberCounts:{totalSubscribers:null,socialFollowers:null,emailSubscribers:null,paidSubscribers:null},newsletterCategories:{enabled:!1,categories:[]}};functions(e=n,t){switch(t.type){case"SET_PRODUCTS":return{...e,products:t.products};case"SET_CONNECT_URL":return{...e,connectUrl:t.connectUrl};case"SET_API_STATE":return{...e,apiState:t.apiState};case"SET_SITE_SLUG":return{...e,siteSlug:t.siteSlug};case"SET_CONNECTED_ACCOUNT_DEFAULT_CURRENCY":return{...e,connectedAccountDefaultCurrency:t.connectedAccountDefaultCurrency};case"SET_SUBSCRIBER_COUNTS":return{...e,subscriberCounts:t.subscriberCounts};case"SET_TOTAL_EMAILS_SENT_COUNT":return{...e,totalEmailsSentCount:t.totalEmailsSentCount};case"SET_NEWSLETTER_CATEGORIES":return{...e,newsletterCategories:t.newsletterCategories};case"SET_NEWSLETTER_CATEGORIES_SUBSCRIPTIONS_COUNT":return{...e,newsletterCategoriesSubscriptionsCount:t.newsletterCategoriesSubscriptionsCount}}returne}},18410:(e,t,r)=>{"use strict";r.r(t),r.d(t,{fetchNewsletterCategoriesSubscriptionsCount:()=>x,getNewsletterCategories:()=>S,getNewsletterCategoriesSubscriptionsCount:()=>E,getNewsletterTierProducts:()=>w,getProducts:()=>_,getSubscriberCounts:()=>C,getTotalEmailsSentCount:()=>A});varn=r(97999),s=r(1455),o=r.n(s),a=r(43656),i=r(93832),l=r(29726),c=r(1990),u=r(56539),d=r(27574),p=r(66314),h=r(3696),m=r(34884);constg="membership-products-resolver-getProducts",f="membership-products-resolver-getSubscriberCounts",b="membership-products-resolver-getTotalEmailsSentCount",v="membership-products-resolver-getNewsletterCategories",k="membership-products-resolver-getNewsletterCategoriesSubscriptionsCount";lety=!1;constx=asynce=>{constt=awaito()({path:`/wpcom/v2/newsletter-categories/count?term_ids=${e.join(",")}`,method:"GET"});if(!t||"object"!=typeoft)thrownewError("Unexpected API response");constr=t?.errors&&Object.values(t.errors)?.[0]?.[0];if(r)thrownewError(r);returnt},j=(e,t,r)=>{if(e.length>0)return;constn=r.getProductsNoResolver()[0]?.id;n&&t([n])},w=(e=l._$,t=[],r=()=>{})=>_(e,t,r,!1),_=(e=l._$,t=[],r=()=>{},n=!0)=>async({dispatch:s,registry:l,select:f})=>{if(awaitu.A.blockExecution(g),y)returnvoidj(t,r,f);constb=u.A.acquire(g);try{constu=await(async()=>{conste=(0,i.getQueryArg)(window.location.href,"origin"),t=(0,i.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===e?"gutenberg-wpcom":"gutenberg",type:"all",is_editable:!0}),r=awaito()({path:t,method:"GET"});if(!r&&"object"!=typeofr)thrownewError("Unexpected API response");constn=r?.errors&&Object.values(r.errors)?.[0]?.[0];if(n)thrownewError(n);returnr})();((e,t,r)=>{constn=t.select(a.store).getCurrentPostId();r((0,p.setConnectUrl)((0,d.A)(n,e.connect_url))),