{"use strict";r.d(t,{A:()=>c});var n=r(90907),s=r(86136),o=r(26092),i=r(10790);function a(e){return Math.min(3,e.images.length)}function c({attributes:e}){const{imageFilter:t,images:r}=e;if(!r.length)return null;const{align:c,className:l,columns:u=a(e),linkTo:d,roundedCorners:p,columnWidths:h}=e;return(0,i.jsx)(o.A,{align:c,className:l,columns:u,imageFilter:t,images:r,isSave:!0,layoutStyle:(0,n.D)(s.kc,l),linkTo:d,roundedCorners:p,columnWidths:h})}},21440:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(69479),s=r(31481);const o={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},playsInline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},src:{type:"string"},videoPressClassNames:{type:"string"},align:{type:"wide"}},support:{reusable:!1},isEligible:({videoPressClassNames:e,guid:t})=>t&&void 0===e,migrate:e=>{const{className:t,videoPressClassNames:r}=e;return{...e,...(0,s.j)(t,r)}},save:n.A,isDeprecation:!0}},21604:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(85985);function s(){return(0,n.$i)()?.jetpack?.is_active??!1}},21785:(e,t,r)=>{"use strict";r.d(t,{B:()=>g,Q:()=>f});var n=r(86087),s=r(10067),o=r.n(s),i=r(52998),a=r(27571),c=r(50161),l=r(22352),u=r(53269),d=r(94987),p=r(125);const h=o()("jetpack-ai-assistant:extensions:get-block-handler"),m={"core/heading":c.T,"core/paragraph":p.d,"core/list-item":d.g,"core/list":u.b,"jetpack/contact-form":l.p,...a.l.reduce((e,t)=>({...e,[t]:l.g}),{})},g=(0,n.createContext)({});function f(e,t){let r=m[e];r||(h(`No handler found for block type: ${e}. Using default handler.`),r=i.mt);const n=new r(t);return{onSuggestion:n.onSuggestion.bind(n),onDone:n.onDone.bind(n),getContent:n.getContent.bind(n),getExtensionInputPlaceholder:n.getExtensionInputPlaceholder.bind(n),behavior:n.behavior,isChildBlock:n.isChildBlock,feature:n.feature,adjustPosition:n.adjustPosition,startOpen:n.startOpen,hideOnBlockFocus:n.hideOnBlockFocus,supports:n.supports}}},21902:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(10790);const s=()=>(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon",children:[(0,n.jsx)("path",{d:"M6.99976 3.99994L7.84828 6.15141L9.99976 6.99994L7.84828 7.84847L6.99976 9.99994L6.15123 7.84847L3.99976 6.99994L6.15123 6.15141L6.99976 3.99994Z"}),(0,n.jsx)("path",{d:"M16 4L17.1314 6.86863L20 8L17.1314 9.13137L16 12L14.8686 9.13137L12 8L14.8686 6.86863L16 4Z"}),(0,n.jsx)("path",{d:"M11 10L12.4142 13.5858L16 15L12.4142 16.4142L11 20L9.58579 16.4142L6 15L9.58579 13.5858L11 10Z"})]})},21929:(e,t,r)=>{"use strict";var n=r(47143),s=r(27723);r(692);const __=s.__;if("undefined"!=typeof window&&window.location){const e=new URLSearchParams(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"))}},22128:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(54439);function s(e,t){let r,s,o,i,a="",c="",l=e.pos,u=!0;if(91!==e.src.charCodeAt(e.pos))return!1;const d=e.pos,p=e.posMax,h=e.pos+1,m=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(m<0)return!1;let g=m+1;if(g=p)return!1;if(l=g,o=e.md.helpers.parseLinkDestination(e.src,g,e.posMax),o.ok){for(a=e.md.normalizeLink(o.str),e.md.validateLink(a)?g=o.pos:a="",l=g;g
=p||41!==e.src.charCodeAt(g))&&(u=!0),g++}if(u){if(void 0===e.env.references)return!1;if(g
=0?s=e.src.slice(l,g++):g=m+1):g=m+1,s||(s=e.src.slice(h,m)),i=e.env.references[(0,n.normalizeReference)(s)],!i)return e.pos=d,!1;a=i.href,c=i.title}if(!t){e.pos=h,e.posMax=m;const t=[["href",a]];e.push("link_open","a",1).attrs=t,c&&t.push(["title",c]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=g,e.posMax=p,!0}},22131:(e,t,r)=>{"use strict";r.d(t,{L:()=>p});var n=r(3924),s=r(97999),o=r(85985),i=r(56427),a=r(86087),c=r(27723),l=r(88795),u=r(10790);const __=c.__,d=(0,o.sh)(l),p=({className:e,changeStatus:t,isLoading:r,enable:c})=>{const{tracks:p}=(0,o.st)();(0,a.useEffect)(()=>{p.recordEvent("jetpack_editor_related_posts_placeholder_view")},[p]);const h=(0,s.isWpcomPlatformSite)()?"https://wordpress.com/support/related-posts/":(0,n.A)("jetpack-support-related-posts");return(0,u.jsx)("div",{className:e,children:(0,u.jsxs)(i.Placeholder,{icon:d,instructions:__("You'll need to activate the Related Posts feature to use this block.","jetpack"),label:l.title,children:[(0,u.jsx)(i.Button,{disabled:r,isBusy:r,onClick:()=>{let e=!1;return p.recordEvent("jetpack_editor_related_posts_enable"),(0,s.isSimpleSite)()||(e=t(!0)),e=c(),e},variant:"secondary",children:r?__("Activating Related Posts","jetpack"):__("Activate Related Posts","jetpack",0)}),(0,u.jsx)("div",{className:"components-placeholder__learn-more",children:(0,u.jsx)(i.ExternalLink,{href:h,children:__("Learn more about the Related Posts feature.","jetpack")})})]})})}},22228:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(96865),s=r(74997),o=r(47143),i=r(86087),a=r(10067);const c=r.n(a)()("voice-to-content:use-transcription-inserter");function l(){const{updateBlockAttributes:e,insertBlocks:t,replaceInnerBlocks:r}=(0,o.useDispatch)("core/block-editor"),a=(0,i.useRef)([]);return{upsertTranscription:(0,i.useCallback)(o=>{c("Upserting transcription");const i=(0,n._E)({content:o||""}),l=(0,s.rawHandler)({HTML:i});for(let n=0;n0&&r(t,l[n].innerBlocks)}else t([l[n]],void 0,void 0,!0,null),a.current.push(l[n])},[a,t,e,r])}}},22352:(e,t,r)=>{"use strict";r.d(t,{g:()=>l.g,p:()=>u});var n=r(74997),s=r(47143),o=r(27723),i=r(62514),a=r(96568),c=r(52998),l=r(8663);const __=o.__;class u extends c.mt{currentListOfValidBlocks=[];originalVariationName=null;constructor(e){super(e,[]),this.behavior="action",this.feature="jetpack-form-ai-extension",this.startOpen=!0,this.hideOnBlockFocus=!1,this.adjustPosition=!1,this.supports={file_upload_field:1}}setContent(e,t=!1){const{replaceInnerBlocks:r,updateBlockAttributes:o}=(0,s.dispatch)("core/block-editor"),c=(0,n.parse)(e).find(e=>"jetpack/contact-form"===e.name);c&&c.attributes?.variationName&&(this.originalVariationName=c.attributes.variationName);const l=e.replace(//g,""),u=(0,a.d)(l),d=(0,n.parse)(u).filter(e=>e.isValid&&!["core/freeform","core/missing","core/html"].includes(e.name));let p=!1;if(d.length0){const e=d[d.length-1],t=this.currentListOfValidBlocks[d.length-1];p=!(0,i.w)(e,t)}if(d.length>0&&(d.length!==this.currentListOfValidBlocks.length||p)&&(r(this.clientId,d),this.currentListOfValidBlocks=d),t){if(this.originalVariationName){const e=this.getBlock();e&&e.attributes.variationName!==this.originalVariationName&&o(this.clientId,{variationName:this.originalVariationName})}const e=d.filter(e=>"jetpack/button"===e.name),t=d.some(e=>"jetpack/form-step-navigation"===e.name);if(this.currentListOfValidBlocks=this.currentListOfValidBlocks||[],e.length>1){let t=0;this.currentListOfValidBlocks=this.currentListOfValidBlocks.filter(r=>"jetpack/button"!==r.name||(t++,t===e.length)),r(this.clientId,this.currentListOfValidBlocks)}else 0!==e.length||t||r(this.clientId,[...this.currentListOfValidBlocks,(0,n.createBlock)("jetpack/button",{label:__("Submit","jetpack"),element:"button",text:__("Submit","jetpack"),borderRadius:8,lock:{remove:!0}})]);this.currentListOfValidBlocks=[]}}getExtensionInputPlaceholder(){if(!this.getContent()){const e=[__("Example: a contact form with name, email, and message fields","jetpack"),__("Example: a pizza ordering form with name, address, phone number and toppings","jetpack"),__("Example: a survey form with multiple choice questions","jetpack")];return e[Math.floor(Math.random()*e.length)]}const e=[__("Example: remove email field","jetpack"),__("Example: make email optional","jetpack"),__("Example: add message field and make it required","jetpack")];return e[Math.floor(Math.random()*e.length)]}getContent(){const e=this.getBlock();if(!e)return"";const{innerBlocks:t}=e;return t?.length?t.reduce((e,t)=>e+(0,n.serialize)(t)+"\n\n",""):""}onSuggestion(e){this.setContent(e)}onDone(e){this.setContent(e,!0)}}},22746:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(48931);const s=5;let o=0;async function i(e){if(o+=1,o>s)throw o-=1,new Error("Too many requests");return(0,n.A)(e).finally(()=>{o-=1})}},22857:(e,t,r)=>{"use strict";r.d(t,{d:()=>m});var n=r(62410),s=r(94715),o=r(56427),i=r(86087),a=r(27723),c=r(51113),l=r(13022),u=r(10790);const __=a.__,d=["image"],p=e=>{const{videoPosterImageUrl:t}=e;return(0,u.jsx)("div",{className:"resumable-upload__editor-thumb-placeholder",children:t?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("img",{src:t,alt:"Poster"}),(0,u.jsx)(c.A,{className:"uploading-editor__play-icon",icon:n.ud})]}):(0,u.jsx)("span",{children:"No Poster Selected"})})},h=e=>{const{onSelectPoster:t,onRemovePoster:r}=e;return(0,u.jsxs)(o.BaseControl,{className:(0,l.A)(e.className,"editor-video-poster-control"),children:[(0,u.jsx)(p,{...e}),(0,u.jsx)(s.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:t,allowedTypes:d,render:({open:e})=>(0,u.jsxs)("div",{className:"poster-selector__buttons",children:[(0,u.jsx)(o.Button,{onClick:r,variant:"link",isDestructive:!0,children:__("Remove Poster Image","jetpack")}),(0,u.jsx)(o.Button,{variant:"secondary",onClick:e,children:__("Select Poster Image","jetpack")})]})})]})},m=e=>{const{file:t,onSelectPoster:r,onRemovePoster:a,videoPosterImageData:l,title:p,onChangeTitle:m,onVideoFrameSelected:g}=e,[f,b]=(0,i.useState)(0),[v,y]=(0,i.useState)(!0),k=(0,i.useRef)(null),x=(0,i.useRef)(null),w=()=>{y(!1)};(0,i.useEffect)(()=>{null!==t&&k&&(k.current.src=URL.createObjectURL(t))},[t,k]);const _={};return l&&(_.display="none"),(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)("div",{className:"uploading-editor",children:[(0,u.jsx)("div",{className:"uploading-editor__summary"}),(0,u.jsxs)("div",{className:"uploading-editor__fields",children:[(0,u.jsx)(o.TextControl,{label:__("Video title","jetpack"),className:"uploading-editor__title",onChange:m,value:p,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,u.jsx)("div",{className:"uploading-editor__content",children:(0,u.jsxs)(o.BaseControl,{__nextHasNoMarginBottom:!0,children:[(0,u.jsx)(o.BaseControl.VisualLabel,{children:__("Video poster (optional)","jetpack")}),v?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:"uploading-editor__video-container",children:[(0,u.jsxs)("div",{className:"uploading-editor__video-poster-wrapper",children:[l&&(0,u.jsx)(h,{onSelectPoster:r,onRemovePoster:a,videoPosterImageUrl:l.url}),(0,u.jsx)("video",{ref:k,muted:!0,className:"uploading-editor__video",onDurationChange:e=>{const t=e.target.duration;b(t),k.current&&(k.current.currentTime=t/2)},onError:w,onLoadedMetadata:e=>{e.target.videoHeight||w()},style:_})]}),!l&&(0,u.jsx)(c.A,{className:"uploading-editor__play-icon",icon:n.ud})]}),(0,u.jsx)("span",{style:_,children:(0,u.jsx)(o.RangeControl,{className:"uploading-editor__range",min:"0",step:"0.1",max:f,showTooltip:!1,withInputField:!1,onChange:e=>{g(1e3*e),k.current&&(k.current.currentTime=e)},__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}),(0,u.jsx)("span",{className:"uploading-editor__scrubber-help",style:_,children:(0,i.createInterpolateElement)(__("This is how the video will look. Use the slider to choose a poster or select a custom one.","jetpack"),{a:(0,u.jsx)(s.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:r,allowedTypes:d,render:({open:e})=>(0,u.jsx)("a",{className:"uploading-editor__upload-link",onClick:e,onKeyDown:e,ref:x,role:"button",tabIndex:0,children:__("select a custom one","jetpack")})})})})]}):(0,u.jsx)(h,{onSelectPoster:r,videoPosterImageUrl:l?l.url:null})]})})]})]})})}},23059:(e,t,r)=>{"use strict";var n=r(56427),s=r(5573),o=r(10790);n.SVG,n.G,n.Path,n.Path,n.Path,s.Defs,n.Rect},23101:(e,t,r)=>{"use strict";r.d(t,{T:()=>n.T});var n=r(64537);r(11114)},23117:(e,t,r)=>{"use strict";r.d(t,{ax:()=>n,pF:()=>o,v8:()=>s,vh:()=>i});const n="jetpack/media-source",s="is-playing",o="is-error",i="is-paused"},23636:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(94715),s=r(10790);const o=({attributes:{url:e}})=>{const t=n.useBlockProps.save();return(0,s.jsx)("a",{...t,href:e,children:e})}},23695:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(61356),s=r(9938),o=r(94891);function i(e=o.A,t){switch(t.type){case s.ql:return{...e,_meta:{...e._meta??{},featureFetchError:null},features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!0,asyncRequestCountdown:s.mx,asyncRequestTimerId:0}}}};case s.UU:{const r={"jetpack-ai-logo-generator":{logo:n._S}};return{...e,features:{...e.features,aiAssistantFeature:{costs:r,...t.feature,requireUpgrade:t.feature?.requireUpgrade||0===t.feature?.currentTier?.value,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!1}}}}}case s.Lg:{const r=e?.features?.aiAssistantFeature?.usagePeriod||{requestsCount:0},n=(e?.features?.aiAssistantFeature?.requestsCount||0)+(t.count??1);r.requestsCount+=t.count??1;const o=e?.features?.aiAssistantFeature?.currentTier?.value,i=void 0===o&&!e?.features?.aiAssistantFeature?.hasFeature||0===o,a=void 0===o&&e?.features?.aiAssistantFeature?.hasFeature||1===o;let c=e?.features?.aiAssistantFeature?.currentTier?.limit||s.GB;a?c=s.nb:i&&(c=e?.features?.aiAssistantFeature?.requestsLimit);const l=(a||i?n:e?.features?.aiAssistantFeature?.usagePeriod?.requestsCount||0)>=c,u=i||l&&null!==e?.features?.aiAssistantFeature?.nextTier;return{...e,features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,isOverLimit:l,requestsCount:n,requireUpgrade:u,usagePeriod:{...r}}}}}case s.Kt:return{...e,features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,requireUpgrade:t.requireUpgrade,...t.requireUpgrade?{isOverLimit:!0}:{}}}};case s.c1:return{...e,features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,tierPlansEnabled:t.tierPlansEnabled}}};case s.Bz:return{...e,siteDetails:t.siteDetails};case s.BG:return{...e,selectedLogoIndex:t.selectedLogoIndex};case s.sG:{const r=[...e.history,t.logo];return{...e,history:r,selectedLogoIndex:r.length-1}}case s.E6:return{...e,_meta:{...e._meta??{},isSavingLogoToLibrary:t.isSavingLogoToLibrary}};case s.Ep:return{...e,_meta:{...e._meta??{},isApplyingLogo:t.isApplyingLogo}};case s.r_:{const r=e.history?.[e.selectedLogoIndex];return{...e,history:[...e.history.slice(0,e.selectedLogoIndex),{...r,mediaId:t.mediaId,url:t.url},...e.history.slice(e.selectedLogoIndex+1)]}}case s.vk:return{...e,_meta:{...e._meta??{},isRequestingImage:t.isRequestingImage}};case s.O5:return{...e,_meta:{...e._meta??{},isEnhancingPrompt:t.isEnhancingPrompt}};case s.ZI:return{...e,history:t.history,selectedLogoIndex:t.history?.length?t.history.length-1:0};case s.Rx:return{...e,features:{...e.features,aiAssistantFeature:{...e?.features?.aiAssistantFeature,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!1}}},_meta:{...e._meta??{},featureFetchError:t.error}};case s.MQ:return{...e,_meta:{...e._meta??{},firstLogoPromptFetchError:t.error}};case s.gG:return{...e,_meta:{...e._meta??{},enhancePromptFetchError:t.error}};case s.q_:return{...e,_meta:{...e._meta??{},logoFetchError:t.error}};case s.x0:return{...e,_meta:{...e._meta??{},saveToLibraryError:t.error}};case s.FN:return{...e,_meta:{...e._meta??{},logoUpdateError:t.error}};case s.kZ:return{...e,_meta:{...e._meta??{},context:t.context}};case s.hY:return{...e,_meta:{...e._meta??{},isLoadingHistory:t.isLoadingHistory}}}return e}},23751:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM12.75 8V13H11.25V8H12.75ZM12.75 14.5V16H11.25V14.5H12.75Z"})})},23887:(e,t,r)=>{"use strict";r.d(t,{W:()=>n,r:()=>s});const n=({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})}},23972:(e,t,r)=>{"use strict";r.d(t,{HW:()=>l,_t:()=>s,fF:()=>o,tW:()=>u});const n="s*https?://calendar.google.com/calendar",s=new RegExp(`^${n}`,"i"),o=new RegExp(`