From ca1f9e54539a6458c6ec279f4daa93f30255d476 Mon Sep 17 00:00:00 2001 From: samiff Date: Mon, 29 Jan 2024 20:03:03 +0000 Subject: [PATCH] Updated package versions for automattic/jetpack-mu-wpcom-plugin Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7701689056 --- CHANGELOG.md | 37 +- _inc/blocks/editor-beta.asset.php | 2 +- _inc/blocks/editor-beta.js | 4 +- _inc/blocks/editor-experimental.asset.php | 2 +- _inc/blocks/editor-experimental.js | 4 +- _inc/blocks/editor.asset.php | 2 +- _inc/blocks/editor.js | 4 +- _inc/build/admin.asset.php | 2 +- _inc/build/admin.js | 2 +- ...s-wpcom-rest-api-v2-endpoint-app-media.php | 4 +- composer.json | 23 +- jetpack.php | 4 +- .../automattic/jetpack-admin-ui/CHANGELOG.md | 9 +- .../jetpack-admin-ui/src/class-admin-menu.php | 2 +- .../automattic/jetpack-backup/CHANGELOG.md | 5 + .../automattic/jetpack-backup/package.json | 4 +- .../src/class-package-version.php | 2 +- .../automattic/jetpack-blaze/CHANGELOG.md | 5 + .../jetpack-blaze/src/class-dashboard.php | 2 +- .../jetpack-connection/CHANGELOG.md | 8 - .../src/class-package-version.php | 2 +- .../automattic/jetpack-forms/CHANGELOG.md | 5 + .../jetpack-forms/src/class-jetpack-forms.php | 2 +- .../jetpack-jitm/build/index.asset.php | 2 +- .../automattic/jetpack-jitm/build/index.css | 2 +- .../jetpack-jitm/build/index.rtl.css | 2 +- .../jetpack-my-jetpack/CHANGELOG.md | 11 +- .../src/class-initializer.php | 2 +- .../automattic/jetpack-publicize/CHANGELOG.md | 8 - .../src/class-publicize-base.php | 6 +- .../automattic/jetpack-search/CHANGELOG.md | 5 + .../jetpack-search/src/class-package.php | 2 +- .../jetpack-videopress/CHANGELOG.md | 5 + .../src/class-package-version.php | 2 +- .../automattic/jetpack-wordads/CHANGELOG.md | 5 + .../jetpack-wordads/src/class-package.php | 2 +- jetpack_vendor/i18n-map.php | 20 +- readme.txt | 8 +- vendor/autoload.php | 2 +- vendor/autoload_packages.php | 2 +- vendor/composer/autoload_real.php | 10 +- vendor/composer/autoload_static.php | 8 +- vendor/composer/installed.json | 1711 +++++++---------- vendor/composer/installed.php | 192 +- vendor/composer/jetpack_autoload_classmap.php | 352 ++-- vendor/composer/jetpack_autoload_filemap.php | 4 +- .../class-autoloader-handler.php | 2 +- .../class-autoloader-locator.php | 2 +- .../jetpack-autoloader/class-autoloader.php | 2 +- vendor/jetpack-autoloader/class-container.php | 2 +- .../jetpack-autoloader/class-hook-manager.php | 2 +- .../class-latest-autoloader-guard.php | 2 +- .../class-manifest-reader.php | 2 +- .../class-path-processor.php | 2 +- .../class-php-autoloader.php | 2 +- .../class-plugin-locator.php | 2 +- .../class-plugins-handler.php | 2 +- .../class-shutdown-handler.php | 2 +- .../class-version-loader.php | 2 +- .../class-version-selector.php | 2 +- 60 files changed, 1103 insertions(+), 1424 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 187d395868..4f1ef72a38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,31 +2,28 @@ ### This is a list detailing changes for all Jetpack releases. -## 13.1-a.8 - unreleased - -This is an alpha version! The changes listed here are not final. - +## 13.1-a.9 - 2024-01-29 ### Enhancements -- Subject: A new way to upload media via the Jetpack App +- Subject: A new way to upload media via the Jetpack App [#34179] ### Improved compatibility -- RNMobile: Disable Story block +- RNMobile: Disable Story block [#35202] ### Other changes -- Adding serivce to a feature which is not live for the users yet. -- AI Assistant: add accept event on title suggestion request -- AI Assistant: add events on block control -- AI Assistant: add menu show events on both control and extension (form) -- AI Assistant: change tool property on event -- AI Content Lens (excerpt): add events on generate, discard and accept -- AI Forms Extension: add events on ai actions -- Feature is not yet released. -- Jetpack_PostImages::from_attachment: Prevent warning when $thumb_post_data cannot be found -- Move Jetpack to the same menu position as standalone Jetpack site. -- Remove the dashboard swither for the wp-admin interface. -- Remove the dotcom warning for wp-admin in Writing and Discussion settings page -- Sharing Buttons Block: Add size controls to the block -- youtube-shortcode: Handle being given an array with a 'url' key insteadad of the URL as a string +- Adding serivce to a feature which is not live for the users yet. [#35183] +- AI Assistant: add accept event on title suggestion request [#35281] +- AI Assistant: add events on block control [#35254] +- AI Assistant: add menu show events on both control and extension (form) [#35256] +- AI Assistant: change tool property on event [#35280] +- AI Content Lens (excerpt): add events on generate, discard and accept [#35251] +- AI Forms Extension: add events on ai actions [#35257] +- Feature is not yet released. [#35184] +- Jetpack_PostImages::from_attachment: Prevent warning when $thumb_post_data cannot be found [#35264] +- Move Jetpack to the same menu position as standalone Jetpack site. [#35154] +- Remove the dashboard swither for the wp-admin interface. [#35210] +- Remove the dotcom warning for wp-admin in Writing and Discussion settings page [#35241] +- Sharing Buttons Block: Add size controls to the block [#35267] +- youtube-shortcode: Handle being given an array with a 'url' key insteadad of the URL as a string [#35181] ## 13.1-a.7 - 2024-01-25 ### Enhancements diff --git a/_inc/blocks/editor-beta.asset.php b/_inc/blocks/editor-beta.asset.php index f979f9e47a..38f3e3eb39 100644 --- a/_inc/blocks/editor-beta.asset.php +++ b/_inc/blocks/editor-beta.asset.php @@ -1 +1 @@ - array('lodash', 'moment', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => 'a4c5bca92f5f6e80ff0d'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => 'ec63998e4948ba4d20e2'); diff --git a/_inc/blocks/editor-beta.js b/_inc/blocks/editor-beta.js index a67f0b62e9..3f1e45833b 100644 --- a/_inc/blocks/editor-beta.js +++ b/_inc/blocks/editor-beta.js @@ -4,9 +4,9 @@ _n("This post will be shared to %d connection.","This post will be shared to %d _n("%d character remaining","%d characters remaining",o,"jetpack"),o)})}},62578:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(55609),a=n(65736),s=n(61074),o=n(6163),i=n(65235),l=n.n(i),c=n(25162),u=n.n(c),d=n(82283);const __=a.__,p=({children:e,type:t="default",actions:n=[],onDismiss:a})=>{const i=l()(d.Z.notice,d.Z[`notice--${t}`]);return React.createElement("div",{className:i},React.createElement("div",{className:d.Z.content}," ",e," "),a&&React.createElement("button",{className:d.Z.dismiss,onClick:a},React.createElement(r.VisuallyHidden,null,__("Dismiss notice","jetpack")),React.createElement(s.Z,{icon:o.Z})),n&&n.length>0&&React.createElement("div",{className:d.Z.actions},n.map((e=>e))))};p.propTypes={children:u().node.isRequired,type:u().oneOf(["default","highlight","warning","error"]),actions:u().arrayOf(u().element),onDismiss:u().func};const m=p},8714:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(55609),a=n(9818),s=n(12238),o=n(69307),i=n(65736),l=n(14085),c=n(86419),u=n(37568),d=n(49021),p=n(95788),m=n(3176),h=n(91474),g=n(23761);const __=i.__,f=({prePublish:e,children:t})=>{const{refresh:n,hasConnections:i,hasEnabledConnections:f}=(0,u.Z)(),b=(0,a.useSelect)((e=>e(s.store).isCurrentPostPublished()),[]),{isPublicizeEnabled:v,hidePublicizeFeature:k,togglePublicizeFeature:y}=(0,l.Z)();(0,c.M1)((function(){f&&n()}),[f,n]);const w=e?o.Fragment:r.PanelBody,E=e?{}:{title:__("Share this post","jetpack"),className:g.Z.panel};return React.createElement(w,E,t,!k&&React.createElement(o.Fragment,null,!b&&React.createElement(r.ToggleControl,{label:v?__("Share when publishing","jetpack"):__("Sharing is disabled","jetpack",0),onChange:y,checked:v,disabled:!i}),React.createElement(d.Z,null),React.createElement(p.Z,null),React.createElement(h.o,null)),b&&React.createElement(m.u,null))}},91750:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(88275),a=n(13419),s=n(9818),o=n(72067),i=n(12238),l=n(65736),c=n(37548),u=n(34607),d=n(45078);const __=l.__;function p(){const{isCurrentPostPublished:e}=(0,s.useSelect)((e=>e(i.store)),[]);return e()?React.createElement(o.PluginPostPublishPanel,{initialOpen:!0,title:__("Manual sharing","jetpack"),id:"publicize-manual-sharing",icon:React.createElement(a.Pm,null)},React.createElement(r.ZP,null,React.createElement(c.T,{className:d.Z.description,variant:"body-small"}),React.createElement(u.n,null))):null}},52403:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(6895),a=n(13419),s=n(86989),o=n.n(s),i=n(72067),l=n(69307),c=n(14085),u=n(86419),d=n(37568),p=n(19649);const m=()=>{const[e,t]=(0,l.useState)((0,a.Pb)()?.social?.reviewRequestDismissed??!0),[n,s]=(0,l.useState)(!1),{hasEnabledConnections:m}=(0,d.Z)(),{isPublicizeEnabled:h,isPostAlreadyShared:g}=(0,c.Z)();(0,u.e3)((()=>{s(!g&&h&&m)}),[g,m,h]);const f=(0,l.useCallback)((()=>{const e=(0,a.Pb)()?.social?.dismissReviewRequestPath??null;o()({path:e,method:"POST",data:{dismissed:!0}}).catch((e=>{throw e})),t(!0)}),[]);return e||!n?null:React.createElement(i.PluginPostPublishPanel,{id:"publicize-title"},React.createElement(p.Z,{href:(0,r.Z)("jetpack-social-plugin-reviews"),onClose:f}))}},77106:(e,t,n)=>{"use strict";n(9818),n(23177)},19649:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(88275),a=n(90526),s=n(13419),o=n(65736),i=n(99196),l=n(2097);const __=o.__,c=({href:e,onClose:t})=>{const{recordEvent:n}=(0,s.z$)({pageViewEventName:"social_plugin_review_prompt",pageViewNamespace:"jetpack",pageViewSuffix:"view"}),c=(0,i.useCallback)((()=>{n("jetpack_social_plugin_review_prompt_new_review_click")}),[n]),u=(0,i.useCallback)((()=>{n("jetpack_social_plugin_review_prompt_dismiss_click"),t()}),[n,t]);return React.createElement(r.ZP,null,React.createElement("div",{className:l.Z.prompt},React.createElement("h2",{className:l.Z.header},/* translators: %s is the celebration emoji */ /* translators: %s is the celebration emoji */ (0,o.sprintf)(__("Presto! %s","jetpack"),String.fromCodePoint(127881))),React.createElement("p",null,__("Just like that, Jetpack Social has shared your post to your connected social accounts.","jetpack")),React.createElement("p",null,__("Please leave a review to let others know how easy getting your posts on social media can be!","jetpack")),React.createElement("div",{className:l.Z.buttons},React.createElement(a.Z,{onClick:c,isExternalLink:!0,href:e,className:l.Z.button},__("Leave a Review","jetpack")),React.createElement(a.Z,{onClick:u,variant:"link",className:l.Z.button},__("Dismiss","jetpack")))))}},69709:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(65736),a=n(14085),s=n(78619);const __=r.__;function o(){const{connectionsAdminUrl:e}=(0,a.Z)();return React.createElement("a",{className:s.Z["settings-link"],href:e,target:"_blank",rel:"noreferrer",title:__("Connect an account","jetpack")},React.createElement("svg",{width:"24",height:"24",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("rect",{x:"0.375",y:"0.375",width:"27.25",height:"27.25",rx:"1.125",fill:"#F6F7F7"}),React.createElement("path",{d:"M19 13.3333H14.6667V9H13.3333V13.3333H9V14.6667H13.3333V19H14.6667V14.6667H19V13.3333Z",fill:"black"}),React.createElement("rect",{x:"0.375",y:"0.375",width:"27.25",height:"27.25",rx:"1.125",stroke:"#A7AAAD",strokeWidth:"0.75",strokeDasharray:"2 2"})))}},2817:(e,t,n)=>{"use strict";n.d(t,{o:()=>a});var r=n(65736);const __=r.__,a=[{label:__("X","jetpack"),networkName:"x",url:"https://x.com/intent/tweet?text={{text}}&url={{url}}"},{label:__("WhatsApp","jetpack"),networkName:"whatsapp",url:"https://api.whatsapp.com/send?text={{text}}"},{label:__("Facebook","jetpack"),networkName:"facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"}]},22917:(e,t,n)=>{"use strict";n(34607)},34607:(e,t,n)=>{"use strict";n.d(t,{n:()=>g});var r=n(3396),a=n(90526),s=n(45106),o=n(14203),i=n(13419),l=n(69307),c=n(65736),u=n(65235),d=n.n(u),p=n(2817),m=n(30664),h=n(38730);const __=c.__;function g({buttonStyle:e="icon",buttonVariant:t}){const n=(0,h.S)(),{recordEvent:u}=(0,i.z$)(),g=(0,l.useCallback)((()=>{u("jetpack_social_share_button_clicked",{network:"clipboard"})}),[u]),f=(0,l.useCallback)((()=>n("{{text}}\n{{url}}",!1)),[n]),b=(0,l.useCallback)((function(e,t){return function(n){n.preventDefault(),u("jetpack_social_share_button_clicked",t),window.open(e,"","menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600")}}),[u]);return React.createElement("div",{className:d()(m.Z["share-buttons"],{[m.Z.vertical]:e.includes("text")})},p.o.map((({label:o,networkName:i,url:l})=>{const u=n(l),d="icon"===e?React.createElement(r.av,{serviceName:i}):null,p=(0,c.sprintf)(/* translators: %s is the name of a social network, e.g. Twitter. */ __("Share on %s","jetpack"),o);return React.createElement("div",{className:m.Z.container,key:i},React.createElement(a.Z,{icon:d,variant:t,"aria-label":p,href:u,target:"_blank",rel:"noopener noreferrer",onClick:b(u,{network:i}),className:"icon"===e?m.Z[i]:"has-text"},"icon"===e?null:React.createElement(React.Fragment,null,"icon-text"===e&&React.createElement(r.av,{className:m.Z[i],serviceName:i}),React.createElement(s.ZP,{className:m.Z.label,component:"span"},p))))})),React.createElement("div",{className:m.Z.container},React.createElement(o.Z,{buttonStyle:e,onCopy:g,textToCopy:f,className:"icon"===e?m.Z.clipboard:" has-text",variant:t},"icon"===e?null:React.createElement(s.ZP,{className:m.Z.label,component:"span"},__("Copy to clipboard","jetpack")))))}},38730:(e,t,n)=>{"use strict";n.d(t,{S:()=>o});var r=n(9818),a=n(69307),s=n(71806);function o(){const{shareMessage:e}=(0,s.R)(),{message:t,link:n}=(0,r.useSelect)((t=>{const n=t("core/editor").getEditedPostAttribute;return{link:n("link"),message:e||n("meta")?.jetpack_seo_html_title||n("title")}}),[e]);return(0,a.useCallback)(((e,r=!0)=>{let a=t,s=n;return e.includes("{{url}}")||(a=a+"\n\n"+s,s=""),r&&(a=encodeURIComponent(a),s=encodeURIComponent(s)),e.replace("{{text}}",a).replace("{{url}}",s)}),[n,t])}},32637:(e,t,n)=>{"use strict";n.d(t,{r:()=>d});var r=n(43521),a=n(69307),s=n(65736),o=n(65235),i=n.n(o),l=n(73640);const __=s.__,_x=s._x,c={error:"var(--jp-red-50)",warning:"var(--jp-yellow-20)",default:"var(--jp-green)"},u={error:"var(--jp-red-50)",warning:"var(--jp-yellow-20)",default:"var(--jp-green-5)"},d=({usedCount:e,scheduledCount:t,remainingCount:n,className:s,noticeType:o="default",legendCaption:d})=>{const p=(0,a.useMemo)((()=>{const r=__("scheduled","jetpack"),a=__("used or scheduled","jetpack");return[("default"===o||0===t)&&{count:e,backgroundColor:c[o],label:__("used","jetpack")},t>0&&{count:"default"===o?t:t+e,backgroundColor:u[o],label:"default"===o?r:a},{count:n,backgroundColor:"var(--jp-gray-off)",label:_x("left","Referring to the quantity remaning, not the direction - left/right.","jetpack")}].filter(Boolean)}),[e,o,t,n]);return React.createElement("div",{className:i()(l.Z.wrapper,s)},React.createElement(r.Z,{totalCount:e+t+n,items:p,className:l.Z["bar-wrapper"],tableCaption:d,legendTitle:d,recordTypeLabel:__("Share type","jetpack"),recordCountLabel:__("Usage","jetpack")}))}},91474:(e,t,n)=>{"use strict";n.d(t,{o:()=>h});var r=n(55609),a=n(9818),s=n(12238),o=n(69307),i=n(65736),l=n(53961),c=n(14085),u=n(45579),d=n(37568);const __=i.__;function p(e=__("Unable to share the Post","jetpack")){const{createErrorNotice:t}=(0,a.dispatch)(l.store);t(e,{id:"publicize-post-share-message"})}function m(){const{hasEnabledConnections:e}=(0,d.Z)(),{isPublicizeEnabled:t}=(0,c.Z)(),{isFetching:n,isError:i,isSuccess:m,doPublicize:h}=(0,u.Z)(),g=(0,a.useSelect)((e=>e(s.store).isCurrentPostPublished()),[]);(0,o.useEffect)((()=>{if(!n)return i?p():void(m&&function(){const{createSuccessNotice:e}=(0,a.dispatch)(l.store);e(__("Post shared","jetpack"),{id:"publicize-post-share-message",type:"snackbar"})}())}),[n,i,m]);const f=!t||!e||!g||n,b=(0,o.useCallback)((()=>{if(!g)return p(__("You must publish your post before you can share it.","jetpack"));(0,a.dispatch)(l.store).removeNotice("publicize-post-share-message"),h()}),[h,g]);return React.createElement(r.Button,{variant:"secondary",onClick:b,disabled:f,isBusy:n},__("Share post","jetpack"))}function h(){const{isRePublicizeUpgradableViaUpsell:e}=(0,c.Z)();return(0,a.useSelect)((e=>e(s.store).isCurrentPostPublished()),[])?e?null:React.createElement(r.PanelRow,null,React.createElement(m,null)):null}},54005:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(55609),a=n(69307),s=n(65736),o=n(75263),i=n(9888),l=n(81469);const __=s.__,c=({prePublish:e=!1})=>{const t=e?a.Fragment:r.PanelBody,n=e?{}:{title:__("Social Image Generator","jetpack")},{isEnabled:s,setIsEnabled:c}=(0,o.Z)(),[u,d]=(0,a.useState)(!1),p=(0,a.useCallback)((()=>d(!0)),[]),m=(0,a.useCallback)((()=>d(!1)),[]);return React.createElement(t,n,u&&React.createElement(l.Z,{onClose:m}),React.createElement(r.ToggleControl,{label:__("Enable Social Image","jetpack"),help:s?"":__("Social Image is disabled for this post.","jetpack"),checked:s,onChange:c}),s&&React.createElement(React.Fragment,null,React.createElement("hr",null),React.createElement(i.ZP,null),React.createElement("hr",null),React.createElement(r.Button,{variant:"secondary",onClick:p,label:__("Open the Social Image Generator settings","jetpack")},__("Settings","jetpack"))))}},81469:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(88275),a=n(55609),s=n(69307),o=n(65736),i=n(75263),l=n(98811),c=n(9888),u=n(88649),d=n(39356),p=n(40088);const __=o.__,m=["image/jpeg","image/png"],h=__("Choose Image","jetpack"),g=({onClose:e})=>{const{customText:t,imageType:n,imageId:o,template:g,updateSettings:f}=(0,i.Z)(),[b,v]=(0,s.useState)(o),[k,y]=(0,s.useState)(n||"featured"),[w,E]=(0,s.useState)(t),[_,C]=(0,s.useState)(g),[x]=(0,l.Z)(b),j=(0,s.useCallback)((()=>{f({template:_,image_type:k,custom_text:w||"",..."custom"===k&&{image_id:b}}),e()}),[f,_,k,b,w,e]),S=(0,s.useCallback)((e=>{v(e?.id)}),[v]);return React.createElement(r.ZP,{targetDom:document.body},React.createElement(a.Modal,{onRequestClose:e},React.createElement(c.ZP,{className:p.Z.preview,imageId:b,customText:w,imageType:k,template:_}),React.createElement(a.SelectControl,{label:__("Image Type","jetpack"),value:k||"featured",options:[{label:__("Featured Image","jetpack"),value:"featured"},{label:__("Custom Image","jetpack"),value:"custom"},{label:__("No Image","jetpack"),value:"none"}],onChange:y}),"custom"===k&&React.createElement(u.Z,{buttonLabel:h,subTitle:__("Add a custom image","jetpack"),mediaId:b,mediaDetails:x,onChange:S,allowedMediaTypes:m,wrapperClassName:p.Z.mediaPicker}),React.createElement(a.TextControl,{className:p.Z.customText,value:w||"",onChange:E,label:__("Custom Header","jetpack"),help:__("By default the post title is used for the image. You can use this field to set your own text.","jetpack")}),React.createElement(a.BaseControl,{label:__("Templates","jetpack"),className:p.Z.templateControl},React.createElement(d.Z,{value:_,onTemplateSelected:C})),React.createElement(a.Button,{onClick:e,variant:"tertiary"},__("Cancel","jetpack")),React.createElement(a.Button,{onClick:j,variant:"primary"},__("Save","jetpack"))))}},79631:(e,t,n)=>{"use strict";n(9818),n(69307),n(65736),n(99196),n(23177),n(8350)},8350:(e,t,n)=>{"use strict";n(55609),n(69307),n(65736),n(39356),n(15214)},39356:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(69307),a=n(65736),s=n(65235),o=n.n(s),i=n(47320),l=n(57227);const __=a.__,c=({value:e=null,onTemplateSelected:t=null})=>{const n=(0,r.useCallback)((e=>{const n=e.target.id;t?.(n)}),[t]);return React.createElement("div",{className:i.Z.templates},l.Z.map((t=>React.createElement("button",{onClick:n,id:t.name,key:t.name,className:o()(i.Z.template,{[i.Z["template--active"]]:t.name===e})},React.createElement("img",{src:t.image,alt:t.label}),React.createElement("span",{className:"screen-reader-text"},/* translators: %s is the name of the template */ /* translators: %s is the name of the template */ -(0,a.sprintf)(__("Pick the %s template","jetpack"),t.label))))))}},57227:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(30253),a=n(91948),s=n(5353);const o=[{name:"highway",label:"Highway",image:n(27956)},{name:"dois",label:"Dois",image:r},{name:"edge",label:"Edge",image:a},{name:"fullscreen",label:"Fullscreen",image:s}]},76848:(e,t,n)=>{"use strict";n(9818),n(69307),n(99196),n(23177)},53513:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(88275),a=n(55609),s=n(69307),o=n(65736),i=n(88219),l=n(89696);const __=o.__,c=__("You need a featured image or media attached to your post to be able to share as a social post.","jetpack"),u=__("By default, the image and text appear on social media as a link preview. To optimize engagement, share as a social post.","jetpack");function d({disabled:e=!1}){const{shouldUploadAttachedMedia:t,updateShouldUploadAttachedMedia:n}=(0,i.Z)(),o=(0,s.useCallback)((e=>{n(e)}),[n]),d=e?a.Disabled:s.Fragment,p=e?{className:l.Z.disabled}:{};return React.createElement(r.ZP,null,React.createElement(d,p,React.createElement(a.CheckboxControl,{className:l.Z.checkbox,checked:t,onChange:o,label:__("Share as a social post","jetpack"),help:e?c:u})))}},63855:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(82674),a=n.n(r),s=n(13477),o=n(9818),i=n(48751),l=n(23177);const c=(0,o.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{excerpt:t("excerpt"),content:t("content").split("\x3c!--more")[0]}}))((e=>{const{message:t}=(0,i.Z)(),{title:n,excerpt:r,content:c}=e,u=(0,o.useSelect)((e=>{const{displayName:t,profileImage:n}=e(l.Eg).getConnectionProfileDetails(l.uJ);return{displayName:t,avatarUrl:n}}));return React.createElement(s.S,a()({},e,{type:"article",user:u,customText:t||r||c||n}))}))},83704:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(82674),a=n.n(r),s=n(17915),o=n(9818),i=n(22629),l=n(99196),c=n.n(l);const u=function(e){const t=(0,o.useSelect)((e=>{const{getEntityRecord:t}=e("core");return(0,i.decodeEntities)(t("root","site").title)}));return c().createElement(s.X,a()({},e,{siteTitle:t}))}},4124:(e,t,n)=>{"use strict";n.d(t,{m:()=>c});var r=n(4049),a=n(9818),s=n(99196),o=n.n(s),i=n(48751),l=n(23177);function c(e){const{title:t,image:n,media:s}=e,{username:c,profileImage:u}=(0,a.useSelect)((e=>e(l.Eg).getConnectionProfileDetails(l.M$))),{message:d}=(0,i.Z)(),p=d||t;return o().createElement(r.V,{image:n,media:s,name:c,profileImage:u,caption:p})}},27725:(e,t,n)=>{"use strict";n.d(t,{y:()=>u});var r=n(93453),a=n(9818),s=n(65736),o=n(99196),i=n.n(o),l=n(48751),c=n(23177);const __=s.__;function u(e){const{title:t,url:n,image:s,media:o}=e,{displayName:u,profileImage:d}=(0,a.useSelect)((e=>e(c.Eg).getConnectionProfileDetails(c.qk))),{message:p}=(0,l.Z)(),m=`${p||t} ${o.length?n:""}`.trim();return i().createElement(r.S,{jobTitle:__("Job Title (Company Name)","jetpack"),image:s,name:u,profileImage:d,title:t,description:m,url:n,media:o})}},28586:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(82674),a=n.n(r),s=n(60312),o=n(9818),i=n(22629),l=n(71806),c=n(48751),u=n(23177);const d=e=>{const{message:t}=(0,c.Z)(),{content:n,siteName:r}=(0,o.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor"),{getSite:n}=e("core");return{content:t("content").split("\x3c!--more")[0],siteName:(0,i.decodeEntities)(n().title)}})),{shouldUploadAttachedMedia:d}=(0,l.R)(),p=(0,o.useSelect)((e=>{const{displayName:t,profileImage:n,username:r}=e(u.Eg).getConnectionProfileDetails(u.cs);return{displayName:t,avatarUrl:n,address:r}})),m=e.media?.[0],h=m?.type.startsWith("image/")?m.url:null;return React.createElement(s.I,a()({},e,{siteName:r,user:p,description:n,customText:t,customImage:h,isSocialPost:d}))}},8454:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(55609),a=n(65736),s=n(39517),o=n(41809),i=n(9279);const __=a.__,l=function({onClose:e,initialTabName:t}){const n=(0,o.P)(),{image:a,media:l,title:c,description:u,url:d}=(0,i.u)();return React.createElement(r.Modal,{onRequestClose:e,className:"jetpack-social-previews__modal",__experimentalHideHeader:!0},React.createElement(r.Button,{className:"jetpack-social-previews__modal--close-btn",onClick:e,icon:s.Z,label:__("Close","jetpack")}),React.createElement(r.TabPanel,{className:"jetpack-social-previews__modal-previews",tabs:n,initialTabName:t},(e=>React.createElement("div",null,React.createElement(e.preview,{title:c,description:u,url:d,image:a,media:l})))))}},18553:(e,t,n)=>{"use strict";n.d(t,{T:()=>c});var r=n(93122),a=n(9818),s=n(99196),o=n.n(s),i=n(48751),l=n(23177);function c(e){const{title:t,url:n,image:s,media:c}=e,{displayName:u,profileImage:d}=(0,a.useSelect)((e=>e(l.Eg).getConnectionProfileDetails(l.Cd))),{message:p}=(0,i.Z)(),m=`${p||t} ${c.length?n:""}`.trim();return o().createElement(r.m,{image:s,name:u,profileImage:d,title:t,description:m,url:n,media:c})}},74140:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(55609),a=n(65736),s=n(41809);const __=a.__,_x=a._x,o=({openModal:e})=>{const t=(0,s.P)();return React.createElement("div",{className:"jetpack-social-previews__panel"},React.createElement("p",null,__("Preview what this will look like on social networks and Google search.","jetpack")),React.createElement("div",{className:"jetpack-gutenberg-social-icons"},t.map((e=>React.createElement(e.icon,{key:e.name,className:"jetpack-social-previews__icon"})))),React.createElement(r.Button,{variant:"secondary",onClick:e,label:__("Open Social Previews","jetpack")},_x("Preview","Button label that opens the social previews modal","jetpack")))}},94714:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(82674),a=n.n(r),s=n(1044),o=n(9818),i=n(48751),l=n(23177);const c=e=>{const{content:t,author:n}=(0,o.useSelect)((e=>{const{getUser:t}=e("core"),{getEditedPostAttribute:n}=e("core/editor"),r=n("author"),a=r&&t(r);return{content:n("content").split("\x3c!--more")[0],author:a?.name}})),{message:r}=(0,i.Z)(),c=(0,o.useSelect)((e=>{const{displayName:t,profileImage:r}=e(l.Eg).getConnectionProfileDetails(l.Bb);return{displayName:t||n,avatarUrl:r}}),[n]);return React.createElement(s.b,a()({},e,{user:c,description:t,customText:r}))}},24766:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(835),a=n(9818),s=n(99196),o=n.n(s),i=n(71806),l=n(23177);const c=function({title:e,description:t,image:n,url:s,media:c}){const{shareMessage:u}=(0,i.R)(),d=(0,a.useSelect)((r=>{const{displayName:a,profileImage:o,username:i}=r(l.Eg).getConnectionProfileDetails(l.wV);return[{name:a,profileImage:o,screenName:i,text:u+(c.length?` ${s}`:""),cardType:n?"summary_large_image":"summary",title:e,description:t,image:n,media:c,url:s}]}),[e,n,t,c,s,u]);return o().createElement(r.c,{tweets:d,hidePostPreview:!0})}},41809:(e,t,n)=>{"use strict";n.d(t,{P:()=>k});var r=n(82674),a=n.n(r),s=n(3396),o=n(65736),i=n(99196),l=n.n(i),c=n(23177),u=n(42032),d=n(63855),p=n(83704),m=n(4124),h=n(27725),g=n(28586),f=n(18553),b=n(94714),v=n(24766);const __=o.__;function k(){const e=(0,u.getSupportedAdditionalConnections)(),t=e.includes(c.M$),n=e.includes(c.cs),r=e.includes(c.Cd);return(0,i.useMemo)((()=>[{title:__("Google Search","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"google"},e)),name:"google",preview:p.Z},{title:__("X","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"x"},e)),name:"x",preview:v.Z},{title:__("Facebook","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"facebook"},e)),name:"facebook",preview:d.Z},t?{title:__("Instagram","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"instagram"},e)),name:"instagram",preview:m.m}:null,{title:__("LinkedIn","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"linkedin"},e)),name:"linkedin",preview:h.y},r?{title:__("Nextdoor","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"nextdoor"},e)),name:"nextdoor",preview:f.T}:null,{title:__("Tumblr","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"tumblr-alt"},e)),name:"tumblr",preview:b.Z},n?{title:__("Mastodon","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"mastodon"},e)),name:"mastodon",preview:g.Z}:null].filter(Boolean)),[t,n,r])}},9279:(e,t,n)=>{"use strict";n.d(t,{u:()=>l});var r=n(9818),a=n(65736),s=n(71806),o=n(90785),i=n(25399);const __=a.__;function l(){const{attachedMedia:e,imageGeneratorSettings:t,shouldUploadAttachedMedia:n}=(0,s.R)();return(0,r.useSelect)((r=>{const{getMedia:a}=r("core"),{getEditedPostAttribute:s,getEditedPostContent:l}=r("core/editor"),c=s("featured_media");let u=c?(0,i.i)(a(c)):"";const d=t.enabled?(0,o.t)(t.token):"";if(d)u=d;else if(e?.[0]?.id){const[t]=e;!!t.id&&a(t.id)?.mime_type?.startsWith("image/")&&t.url&&(u=t.url)}if(!u){const e=(0,i.T)(l());e&&(u=e)}const p=[];if(n)if(d)p.push({type:"image/jpeg",url:d,alt:""});else{const t=e=>{const t=a(e);return t?{type:t.mime_type,url:(0,i.i)(t),alt:t.alt_text}:null};for(const{id:n}of e){const e=t(n);e&&p.push(e)}if(0===p.length&&c){const e=t(c);e&&p.push(e)}}return{title:s("meta")?.jetpack_seo_html_title||s("title"),description:s("meta")?.advanced_seo_description||s("excerpt")||s("content").split("\x3c!--more")[0]||__("Visit the post for more.","jetpack"),url:s("link"),image:u,media:p,initialTabName:null}}),[n,e,t])}},25399:(e,t,n)=>{"use strict";function r(e){return e?e.media_details?.sizes?.large?.source_url||e.source_url:null}function a(e){const t=(new DOMParser).parseFromString(e,"text/html"),n=Array.from(t.querySelectorAll("img")),r=n[0]?.src;return r??null}n.d(t,{T:()=>a,i:()=>r})},13858:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(69307),a=n(87728);const s=({sourceUrl:e,mime:t,duration:n})=>{const[s,o]=(0,r.useState)(!1),[i,l]=(0,r.useState)(0),c=(0,r.useRef)(null),u=(0,r.useRef)(null),d=(0,r.useRef)(null);(0,r.useEffect)((()=>{c.current?.load()}),[e]);const p=(0,r.useCallback)((()=>{c.current.pause(),c.current.currentTime=0,clearInterval(u.current),clearTimeout(d.current),l(0),o(!1)}),[]),m=(0,r.useCallback)((()=>{d.current=setTimeout((()=>{s||(c.current.play(),o(!0),u.current=setInterval((()=>{l((e=>e+1))}),1e3))}),500)}),[s]),h=()=>{const e=n-i,t=Math.floor(e/60),r=String(Math.floor(e%60)).padStart(2,"0");return React.createElement("div",{className:a.Z.progress},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"8",fill:"none"},React.createElement("path",{fill:"#fff",d:"M5.25 3.567a.5.5 0 0 1 0 .866L.75 7.031A.5.5 0 0 1 0 6.598V1.402A.5.5 0 0 1 .75.969l4.5 2.598Z"})),React.createElement("span",{className:a.Z.duration},`${t}:${r}`))};return React.createElement("div",{className:a.Z.wrapper,onMouseEnter:m,onMouseLeave:p},React.createElement("video",{ref:c,onEnded:p,muted:!0},React.createElement("source",{src:e,type:t})),React.createElement(h,null))}},88219:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(71806);function a(){const{attachedMedia:e,shouldUploadAttachedMedia:t,updateJetpackSocialOptions:n}=(0,r.R)();return{attachedMedia:e,shouldUploadAttachedMedia:t,updateAttachedMedia:e=>n("attached_media",e),updateShouldUploadAttachedMedia:e=>n("should_upload_attached_media",e)}}},75323:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(13419),a=n(86989),s=n.n(a),o=n(69307);const i={instagram:"instagram",advancedUpgradeEditor:"advanced-upgrade-nudge-editor",advancedUpgradeAdmin:"advanced-upgrade-nudge-admin",autoConversion:"auto-conversion-editor-notice"},l=e=>-1===e?0:new Date(Date.now()+1e3*e).getTime();function c(){const[e,t]=(0,o.useState)((()=>(0,r.Pb)()?.social?.dismissedNotices??window?.jetpackSocialInitialState?.jetpackSettings?.dismissedNotices??{})),n=(0,o.useCallback)(((e,n=-1)=>{const r=l(n);t((t=>({...t,[e]:r}))),s()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_dismissed_notices:{[e]:r}}})}),[]),a=(0,o.useCallback)((t=>{const n=e[t];return!(0===n||n>Date.now())}),[e]);return(0,o.useMemo)((()=>({dismissedNotices:e,shouldShowNotice:a,dismissNotice:n,NOTICES:i})),[e,a,n])}},39118:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(9818),a=n(12238);const s=()=>(0,r.useSelect)((e=>e(a.store).getEditedPostAttribute("featured_media")))},75263:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9818),a=n(12238),s=n(69307),o=n(71806);const i=(e,t)=>({isEnabled:e?.enabled??!t,customText:e?.custom_text??null,imageType:e?.image_type??null,imageId:e?.image_id??null,template:e?.template??null,token:e?.token??null});function l(){const{imageGeneratorSettings:e,jetpackSocialOptions:t,updateJetpackSocialOptions:n}=(0,o.R)(),{isPostPublished:l}=(0,r.useSelect)((e=>({isPostPublished:e(a.store).isCurrentPostPublished()}))),c=(0,s.useCallback)(((t,r)=>{const a={...e,[t]:r};n("image_generator_settings",a)}),[e,n]),u=(0,s.useCallback)((t=>{const r={...e,...t};n("image_generator_settings",r)}),[e,n]);return{...i(t.image_generator_settings,l),setIsEnabled:e=>c("enabled",e),setToken:e=>c("token",e),updateSettings:u}}},98811:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9818),a=n(69307);const s=async e=>{if(!e)return{};let t={mime:e.mime_type,fileSize:e.media_details.filesize,length:e.media_details?.length};"video/videopress"===e.mime_type&&(t=await(async e=>{if(!e?.media_details?.videopress?.original||!e?.media_details?.videopress?.duration)return{};const t=await fetch(e?.media_details?.videopress?.original,{method:"HEAD"}),n=t.headers.get("content-length"),r=t.headers.get("content-type");return n&&r?{mime:r,fileSize:n,length:Math.round(e.media_details.videopress.duration/1e3)}:{}})(e));const n=e?.media_details?.sizes??{};if(!n.full)return{mediaData:{width:e.media_details.width,height:e.media_details.height,sourceUrl:e.source_url},metaData:t};const r=n.medium||n.large,a={width:r.width,height:r.height,sourceUrl:r.source_url};return{mediaData:{width:n.full.width,height:n.full.height,sourceUrl:n.full.source_url},metaData:t,previewData:a}};function o(e=null){const[t,n]=(0,a.useState)([{}]),o=(0,r.useSelect)((t=>t("core").getMedia(e,{context:"view"})),[e]),i=(0,a.useCallback)((async()=>{try{const e=await s(o);n([e??{}])}catch{n([{}])}}),[o]);return(0,a.useEffect)((()=>{i()}),[i]),t}},46791:(e,t,n)=>{"use strict";n.d(t,{Wv:()=>l,ZP:()=>d,rs:()=>s});var r=n(69307),a=n(1795);const s="NO_MEDIA_ERROR",o="FILE_SIZE_ERROR",i="DIMENSION_ERROR";function l(e){return"video"===e.split("/")[0]}const c=e=>{if(!e?.mime||!e?.fileSize)return!1;const{mime:t,fileSize:n}=e;if(l(t))return!1;if(!a.bD.includes(t))return!1;return!((n?n/Math.pow(1e3,2):null)>=55)},u=(e,t,n,r)=>{const c=a.$8[n]??a.ay;if(!e||0===Object.keys(e).length)return c.requiresMedia?s:null;if(!c.requiresMedia&&!r)return null;const{mime:u,fileSize:d}=e;if(!u||!c.allowedMediaTypes.includes(u.toLowerCase()))return"FILE_TYPE_ERROR";if(!t?.width||!t?.height)return i;const p=d?d/Math.pow(1e3,2):null;return l(u)?((e,t,n,r,s)=>{const{minSize:l=0,maxSize:c=a.zc,minLength:u=0,maxLength:d=a.zc,maxWidth:p=a.zc,aspectRatio:m=a.ay.video.aspectRatio}=s;if(!e||e>c||ed)return"VIDEO_LENGTH_TOO_LONG_ERROR";const h=n/r;return hm.max||n>p?i:null})(p,e.length,t.width,t.height,c.video):((e,t,n,r)=>{const{maxSize:s=a.zc,minWidth:l=0,maxWidth:c=a.zc,aspectRatio:u=a.ay.image.aspectRatio}=r,d=t/n;return du.max||t>c||ts?o:null})(p,t.width,t.height,c.image)},d=(e,t,{isSocialImageGeneratorEnabledForPost:n,shouldUploadAttachedMedia:a})=>{const s=(0,r.useRef)({});return(0,r.useMemo)((()=>{const r=n?{}:e.reduce(((e,{connection_id:n,service_name:r})=>{const s=u(t.metaData,t.mediaData,r,a);return s&&(e[n]=s),e}),{});return JSON.stringify(r)!==JSON.stringify(s.current)&&(s.current=r),{validationErrors:s.current,isConvertible:c(t.metaData)}}),[n,e,t.metaData,t.mediaData,a])}},1795:(e,t,n)=>{"use strict";n.d(t,{$8:()=>g,ay:()=>h,bD:()=>f,uo:()=>b,zc:()=>m});const r="video/mp4",a="video/mov",s="video/videopress",o=["image/jpeg","image/jpg","image/png"],i=o.concat(["image/gif","image/bmp"]),l=["video/3g2","video/3gp","video/3gpp","video/asf","video/avi","video/dat","video/divx","video/dv","video/f4v","video/flv","video/gif","video/m2ts","video/m4v","video/mkv","video/mod","video/mov","video/mp4","video/mpe","video/mpeg","video/mpeg4","video/mpg","video/mts","video/nsv","video/ogm","video/ogv","video/qt","video/tod","video/ts","video/vob","video/wmv"],c=o.concat(["image/gif","image/heic","image/heif","image/webp","image/avif"]),u=["video/webm","video/quicktime","video/ogg"],d=o.concat(["image/gif","image/jpe","image/tif","image/tiff","image/webp"]),p=[a,"video/avi","video/mpg","video/mpeg","video/m4v"],m=1e5,h={requiresMedia:!1,allowedMediaTypes:o.concat([r,s,a]),image:{maxSize:4,minWidth:0,maxWidth:m,aspectRatio:{min:0,max:m}},video:{minLength:0,minSize:0,maxSize:m,maxLength:m,maxWidth:m,aspectRatio:{min:0,max:m}}},g={twitter:{allowedMediaTypes:o.concat([r,s]),image:{maxSize:5},video:{maxSize:512,maxLength:140}},facebook:{allowedMediaTypes:i.concat([s,...l]),image:{maxSize:8},video:{maxSize:1e4,maxLength:14400}},tumblr:{allowedMediaTypes:o.concat([r,a,s]),image:{maxSize:20},video:{maxSize:500,maxLength:600}},linkedin:{allowedMediaTypes:o.concat([r,s]),image:{maxSize:20},video:{minSize:.075,maxSize:200,maxLength:600,minLength:3}},"instagram-business":{requiresMedia:!0,allowedMediaTypes:["image/jpg","image/jpeg",r,a,s],image:{maxSize:8,minWidth:320,maxWidth:1440,aspectRatio:{min:.8,max:1.91}},video:{maxLength:90,minLength:3,maxSize:1e3,maxWidth:1920,aspectRatio:{min:.01,max:10}}},mastodon:{allowedMediaTypes:c.concat([...u,r,s]),image:{maxSize:10},video:{maxSize:40}},nextdoor:{allowedMediaTypes:d.concat([...p,r,s]),image:{maxSize:10},video:{maxSize:500}}},f=["image/png","image/jpeg","image/jpg","image/heic","image/heif","image/webp"],b=[...new Set([...o,...i,...c,...l,...u,...f])]},71806:(e,t,n)=>{"use strict";n.d(t,{R:()=>i});var r=n(9818),a=n(12238),s=n(69307),o=n(42032);function i(){const{editPost:e}=(0,r.useDispatch)(a.store),t=(0,r.useSelect)((e=>{const t=e(a.store).getEditedPostAttribute("meta")||{},n=t.jetpack_publicize_feature_enabled??!0,r=t.jetpack_social_options||{};return{isPublicizeEnabled:n,jetpackSocialOptions:r,attachedMedia:r.attached_media||[],imageGeneratorSettings:r.image_generator_settings??{enabled:!1},isPostAlreadyShared:t.jetpack_social_post_already_shared??!1,shareMessage:`${t.jetpack_publicize_message||""}`.substring(0,(0,o.getShareMessageMaxLength)()),shouldUploadAttachedMedia:r.should_upload_attached_media??!1}}),[]),n=(0,s.useCallback)(((t,n)=>{e({meta:{[t]:n}})}),[e]),i=(0,s.useCallback)((()=>{n("jetpack_publicize_feature_enabled",!t.isPublicizeEnabled)}),[t.isPublicizeEnabled,n]),l=(0,s.useCallback)(((e,r)=>{n("jetpack_social_options",{...t.jetpackSocialOptions,[e]:r})}),[t.jetpackSocialOptions,n]);return(0,s.useMemo)((()=>({...t,togglePublicizeFeature:i,updateJetpackSocialOptions:l,updateMeta:n})),[t,i,l,n])}},14085:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(13419),a=n(9818),s=n(12238),o=n(71806);const i="republicize";function l(){const e=(0,r.Pb)()?.social?.sharesData??{},t=(0,r.Pb)()?.wpcomBlogId,n=e.is_share_limit_enabled,l=(0,r.OZ)(i)?.available||n,c=(0,a.useSelect)((e=>e(s.store).isCurrentPostPublished()),[]),u=(0,r.Pb)()?.social?.publicizeConnectionsUrl??"https://wordpress.com/marketing/connections/",{isPublicizeEnabled:d,togglePublicizeFeature:p,isPostAlreadyShared:m}=(0,o.R)(),h=(0,r.X1)(i)&&!l,g=c?l:d,f=c&&h,b=c&&!l,v=!!(0,r.Pb)()?.social?.hasPaidPlan,k=!!(0,r.Pb)()?.social?.isEnhancedPublishingEnabled,y=!!(0,r.Pb)()?.social?.isAutoConversionEnabled;return{isPublicizeEnabledMeta:d,isPublicizeEnabled:g,togglePublicizeFeature:p,isPublicizeDisabledBySitePlan:f,isRePublicizeFeatureAvailable:l,isRePublicizeUpgradableViaUpsell:h,hidePublicizeFeature:b,isShareLimitEnabled:n,isPostAlreadyShared:m,numberOfSharesRemaining:e.shares_remaining,shouldShowAdvancedPlanNudge:e.show_advanced_plan_upgrade_nudge,hasPaidPlan:v,isEnhancedPublishingEnabled:k,isSocialImageGeneratorAvailable:!!(0,r.Pb)()?.social?.isSocialImageGeneratorAvailable,isSocialImageGeneratorEnabled:!!(0,r.Pb)()?.social?.isSocialImageGeneratorEnabled,connectionsAdminUrl:u+(t??(0,r.lQ)()),adminUrl:(0,r.Pb)()?.social?.adminUrl,isAutoConversionEnabled:y,jetpackSharingSettingsUrl:(0,r.Pb)()?.social?.jetpackSharingSettingsUrl}}},6230:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(9818),a=n(69307),s=n(22552),o=n(23177);function i(){const e=(0,s.Z)(),t=(0,a.useRef)(!1),n=(0,r.useDispatch)(o.Eg).refreshAutoConversionSettings;return{refreshAutoConversionSettings:()=>{e||(t.current=!0),e&&t.current&&(n(),t.current=!1)}}}},96672:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(94333),a=n(69307),s=n(22552),o=n(37568);function i(){const e=(0,a.useRef)(!1),t=(0,s.Z)(),{refresh:n}=(0,o.Z)(),i=(0,r.useDebounce)(n,2e3);return()=>{t||(e.current=!0,i.cancel()),t&&e.current&&(i(),e.current=!1)}}},86419:(e,t,n)=>{"use strict";n.d(t,{M1:()=>i,e3:()=>l});var r=n(94333),a=n(9818),s=n(12238),o=n(69307);function i(e,t){const n=(0,a.useSelect)((e=>e(s.store).isPublishingPost()),[]),i=(0,r.usePrevious)(n);(0,o.useEffect)((()=>{i&&!n&&e()}),[n,i,e,t])}function l(e,t){const n=(0,a.useSelect)((e=>e(s.store).isPublishingPost()),[]),i=(0,r.usePrevious)(n);(0,o.useEffect)((()=>{!i&&n&&e()}),[n,i,e,t])}},34431:(e,t,n)=>{"use strict";n.d(t,{U:()=>o});var r=n(9818),a=n(65736),s=n(23177);const __=a.__,_n=a._n;function o({scheduledCountAdjustment:e=0,usedCountAdjustment:t=0}={}){return(0,r.useSelect)((n=>{const r=n(s.h),o=r.getShareLimit(),i=r.getScheduledSharesCount()+e,l=r.getSharesUsedCount()+t,c=l+i,u=r.numberOfSharesRemaining(),d=function(e){const t=Number.isFinite(e)?(0,a.sprintf)( +(0,a.sprintf)(__("Pick the %s template","jetpack"),t.label))))))}},57227:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(30253),a=n(91948),s=n(5353);const o=[{name:"highway",label:"Highway",image:n(27956)},{name:"dois",label:"Dois",image:r},{name:"edge",label:"Edge",image:a},{name:"fullscreen",label:"Fullscreen",image:s}]},76848:(e,t,n)=>{"use strict";n(9818),n(69307),n(99196),n(23177)},53513:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(88275),a=n(55609),s=n(69307),o=n(65736),i=n(88219),l=n(89696);const __=o.__,c=__("You need a featured image or media attached to your post to be able to share as a social post.","jetpack"),u=__("By default, the image and text appear on social media as a link preview. To optimize engagement, share as a social post.","jetpack");function d({disabled:e=!1}){const{shouldUploadAttachedMedia:t,updateShouldUploadAttachedMedia:n}=(0,i.Z)(),o=(0,s.useCallback)((e=>{n(e)}),[n]),d=e?a.Disabled:s.Fragment,p=e?{className:l.Z.disabled}:{};return React.createElement(r.ZP,null,React.createElement(d,p,React.createElement(a.CheckboxControl,{className:l.Z.checkbox,checked:t,onChange:o,label:__("Share as a social post","jetpack"),help:e?c:u})))}},63855:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(82674),a=n.n(r),s=n(13477),o=n(9818),i=n(48751),l=n(23177);const c=(0,o.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{excerpt:t("excerpt"),content:t("content").split("\x3c!--more")[0]}}))((e=>{const{message:t}=(0,i.Z)(),{title:n,excerpt:r,content:c}=e,u=(0,o.useSelect)((e=>{const{displayName:t,profileImage:n}=e(l.Eg).getConnectionProfileDetails(l.uJ);return{displayName:t,avatarUrl:n}}));return React.createElement(s.S,a()({},e,{type:"article",user:u,customText:t||r||c||n}))}))},83704:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(82674),a=n.n(r),s=n(17915),o=n(9818),i=n(22629),l=n(99196),c=n.n(l);const u=function(e){const t=(0,o.useSelect)((e=>{const{getEntityRecord:t}=e("core");return(0,i.decodeEntities)(t("root","site").title)}));return c().createElement(s.X,a()({},e,{siteTitle:t}))}},4124:(e,t,n)=>{"use strict";n.d(t,{m:()=>c});var r=n(4049),a=n(9818),s=n(99196),o=n.n(s),i=n(48751),l=n(23177);function c(e){const{title:t,image:n,media:s}=e,{username:c,profileImage:u}=(0,a.useSelect)((e=>e(l.Eg).getConnectionProfileDetails(l.M$))),{message:d}=(0,i.Z)(),p=d||t;return o().createElement(r.V,{image:n,media:s,name:c,profileImage:u,caption:p})}},27725:(e,t,n)=>{"use strict";n.d(t,{y:()=>u});var r=n(93453),a=n(9818),s=n(65736),o=n(99196),i=n.n(o),l=n(48751),c=n(23177);const __=s.__;function u(e){const{title:t,url:n,image:s,media:o}=e,{displayName:u,profileImage:d}=(0,a.useSelect)((e=>e(c.Eg).getConnectionProfileDetails(c.qk))),{message:p}=(0,l.Z)(),m=`${p||t} ${o.length?n:""}`.trim();return i().createElement(r.S,{jobTitle:__("Job Title (Company Name)","jetpack"),image:s,name:u,profileImage:d,title:t,description:m,url:n,media:o})}},28586:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(82674),a=n.n(r),s=n(60312),o=n(9818),i=n(22629),l=n(71806),c=n(48751),u=n(23177);const d=e=>{const{message:t}=(0,c.Z)(),{content:n,siteName:r}=(0,o.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor"),{getSite:n}=e("core");return{content:t("content").split("\x3c!--more")[0],siteName:(0,i.decodeEntities)(n().title)}})),{shouldUploadAttachedMedia:d}=(0,l.R)(),p=(0,o.useSelect)((e=>{const{displayName:t,profileImage:n,username:r}=e(u.Eg).getConnectionProfileDetails(u.cs);return{displayName:t,avatarUrl:n,address:r}})),m=e.media?.[0],h=m?.type.startsWith("image/")?m.url:null;return React.createElement(s.I,a()({},e,{siteName:r,user:p,description:n,customText:t,customImage:h,isSocialPost:d}))}},8454:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(55609),a=n(65736),s=n(39517),o=n(41809),i=n(9279);const __=a.__,l=function({onClose:e,initialTabName:t}){const n=(0,o.P)(),{image:a,media:l,title:c,description:u,url:d}=(0,i.u)();return React.createElement(r.Modal,{onRequestClose:e,className:"jetpack-social-previews__modal",__experimentalHideHeader:!0},React.createElement(r.Button,{className:"jetpack-social-previews__modal--close-btn",onClick:e,icon:s.Z,label:__("Close","jetpack")}),React.createElement(r.TabPanel,{className:"jetpack-social-previews__modal-previews",tabs:n,initialTabName:t},(e=>React.createElement("div",null,React.createElement(e.preview,{title:c,description:u,url:d,image:a,media:l})))))}},18553:(e,t,n)=>{"use strict";n.d(t,{T:()=>c});var r=n(93122),a=n(9818),s=n(99196),o=n.n(s),i=n(48751),l=n(23177);function c(e){const{title:t,url:n,image:s,media:c}=e,{displayName:u,profileImage:d}=(0,a.useSelect)((e=>e(l.Eg).getConnectionProfileDetails(l.Cd))),{message:p}=(0,i.Z)(),m=`${p||t} ${c.length?n:""}`.trim();return o().createElement(r.m,{image:s,name:u,profileImage:d,title:t,description:m,url:n,media:c})}},74140:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(55609),a=n(65736),s=n(41809);const __=a.__,_x=a._x,o=({openModal:e})=>{const t=(0,s.P)();return React.createElement("div",{className:"jetpack-social-previews__panel"},React.createElement("p",null,__("Preview what this will look like on social networks and Google search.","jetpack")),React.createElement("div",{className:"jetpack-gutenberg-social-icons"},t.map((e=>React.createElement(e.icon,{key:e.name,className:"jetpack-social-previews__icon"})))),React.createElement(r.Button,{variant:"secondary",onClick:e,label:__("Open Social Previews","jetpack")},_x("Preview","Button label that opens the social previews modal","jetpack")))}},94714:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(82674),a=n.n(r),s=n(1044),o=n(9818),i=n(48751),l=n(23177);const c=e=>{const{content:t,author:n}=(0,o.useSelect)((e=>{const{getUser:t}=e("core"),{getEditedPostAttribute:n}=e("core/editor"),r=n("author"),a=r&&t(r);return{content:n("content").split("\x3c!--more")[0],author:a?.name}})),{message:r}=(0,i.Z)(),c=(0,o.useSelect)((e=>{const{displayName:t,profileImage:r}=e(l.Eg).getConnectionProfileDetails(l.Bb);return{displayName:t||n,avatarUrl:r}}),[n]);return React.createElement(s.b,a()({},e,{user:c,description:t,customText:r}))}},24766:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(835),a=n(9818),s=n(99196),o=n.n(s),i=n(71806),l=n(23177);const c=function({title:e,description:t,image:n,url:s,media:c}){const{shareMessage:u}=(0,i.R)(),d=(0,a.useSelect)((r=>{const{displayName:a,profileImage:o,username:i}=r(l.Eg).getConnectionProfileDetails(l.wV);return[{name:a,profileImage:o,screenName:i,text:u+(c.length?` ${s}`:""),cardType:n?"summary_large_image":"summary",title:e,description:t,image:n,media:c,url:s}]}),[e,n,t,c,s,u]);return o().createElement(r.c,{tweets:d,hidePostPreview:!0})}},41809:(e,t,n)=>{"use strict";n.d(t,{P:()=>k});var r=n(82674),a=n.n(r),s=n(3396),o=n(65736),i=n(99196),l=n.n(i),c=n(23177),u=n(42032),d=n(63855),p=n(83704),m=n(4124),h=n(27725),g=n(28586),f=n(18553),b=n(94714),v=n(24766);const __=o.__;function k(){const e=(0,u.getSupportedAdditionalConnections)(),t=e.includes(c.M$),n=e.includes(c.cs),r=e.includes(c.Cd);return(0,i.useMemo)((()=>[{title:__("Google Search","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"google"},e)),name:"google",preview:p.Z},{title:__("X","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"x"},e)),name:"x",preview:v.Z},{title:__("Facebook","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"facebook"},e)),name:"facebook",preview:d.Z},t?{title:__("Instagram","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"instagram"},e)),name:"instagram",preview:m.m}:null,{title:__("LinkedIn","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"linkedin"},e)),name:"linkedin",preview:h.y},r?{title:__("Nextdoor","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"nextdoor"},e)),name:"nextdoor",preview:f.T}:null,{title:__("Tumblr","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"tumblr-alt"},e)),name:"tumblr",preview:b.Z},n?{title:__("Mastodon","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"mastodon"},e)),name:"mastodon",preview:g.Z}:null].filter(Boolean)),[t,n,r])}},9279:(e,t,n)=>{"use strict";n.d(t,{u:()=>l});var r=n(9818),a=n(65736),s=n(71806),o=n(90785),i=n(25399);const __=a.__;function l(){const{attachedMedia:e,imageGeneratorSettings:t,shouldUploadAttachedMedia:n}=(0,s.R)();return(0,r.useSelect)((r=>{const{getMedia:a}=r("core"),{getEditedPostAttribute:s,getEditedPostContent:l}=r("core/editor"),c=s("featured_media");let u=c?(0,i.i)(a(c)):"";const d=t.enabled?(0,o.t)(t.token):"";if(d)u=d;else if(e?.[0]?.id){const[t]=e;!!t.id&&a(t.id)?.mime_type?.startsWith("image/")&&t.url&&(u=t.url)}if(!u){const e=(0,i.T)(l());e&&(u=e)}const p=[];if(n)if(d)p.push({type:"image/jpeg",url:d,alt:""});else{const t=e=>{const t=a(e);return t?{type:t.mime_type,url:(0,i.i)(t),alt:t.alt_text}:null};for(const{id:n}of e){const e=t(n);e&&p.push(e)}if(0===p.length&&c){const e=t(c);e&&p.push(e)}}return{title:s("meta")?.jetpack_seo_html_title||s("title"),description:s("meta")?.advanced_seo_description||s("excerpt")||s("content").split("\x3c!--more")[0]||__("Visit the post for more.","jetpack"),url:s("link"),image:u,media:p,initialTabName:null}}),[n,e,t])}},25399:(e,t,n)=>{"use strict";function r(e){return e?e.media_details?.sizes?.large?.source_url||e.source_url:null}function a(e){const t=(new DOMParser).parseFromString(e,"text/html"),n=Array.from(t.querySelectorAll("img")),r=n[0]?.src;return r??null}n.d(t,{T:()=>a,i:()=>r})},13858:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(69307),a=n(87728);const s=({sourceUrl:e,mime:t,duration:n})=>{const[s,o]=(0,r.useState)(!1),[i,l]=(0,r.useState)(0),c=(0,r.useRef)(null),u=(0,r.useRef)(null),d=(0,r.useRef)(null);(0,r.useEffect)((()=>{c.current?.load()}),[e]);const p=(0,r.useCallback)((()=>{c.current.pause(),c.current.currentTime=0,clearInterval(u.current),clearTimeout(d.current),l(0),o(!1)}),[]),m=(0,r.useCallback)((()=>{d.current=setTimeout((()=>{s||(c.current.play(),o(!0),u.current=setInterval((()=>{l((e=>e+1))}),1e3))}),500)}),[s]),h=()=>{const e=n-i,t=Math.floor(e/60),r=String(Math.floor(e%60)).padStart(2,"0");return React.createElement("div",{className:a.Z.progress},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"8",fill:"none"},React.createElement("path",{fill:"#fff",d:"M5.25 3.567a.5.5 0 0 1 0 .866L.75 7.031A.5.5 0 0 1 0 6.598V1.402A.5.5 0 0 1 .75.969l4.5 2.598Z"})),React.createElement("span",{className:a.Z.duration},`${t}:${r}`))};return React.createElement("div",{className:a.Z.wrapper,onMouseEnter:m,onMouseLeave:p},React.createElement("video",{ref:c,onEnded:p,muted:!0},React.createElement("source",{src:e,type:t})),React.createElement(h,null))}},88219:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(71806);function a(){const{attachedMedia:e,shouldUploadAttachedMedia:t,updateJetpackSocialOptions:n}=(0,r.R)();return{attachedMedia:e,shouldUploadAttachedMedia:t,updateAttachedMedia:e=>n("attached_media",e),updateShouldUploadAttachedMedia:e=>n("should_upload_attached_media",e)}}},75323:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(13419),a=n(86989),s=n.n(a),o=n(69307);const i={instagram:"instagram",advancedUpgradeEditor:"advanced-upgrade-nudge-editor",advancedUpgradeAdmin:"advanced-upgrade-nudge-admin",autoConversion:"auto-conversion-editor-notice"},l=e=>-1===e?0:new Date(Date.now()+1e3*e).getTime();function c(){const[e,t]=(0,o.useState)((()=>(0,r.Pb)()?.social?.dismissedNotices??window?.jetpackSocialInitialState?.jetpackSettings?.dismissedNotices??{})),n=(0,o.useCallback)(((e,n=-1)=>{const r=l(n);t((t=>({...t,[e]:r}))),s()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_dismissed_notices:{[e]:r}}})}),[]),a=(0,o.useCallback)((t=>{const n=e[t];return!(0===n||n>Date.now())}),[e]);return(0,o.useMemo)((()=>({dismissedNotices:e,shouldShowNotice:a,dismissNotice:n,NOTICES:i})),[e,a,n])}},39118:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(9818),a=n(12238);const s=()=>(0,r.useSelect)((e=>e(a.store).getEditedPostAttribute("featured_media")))},75263:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9818),a=n(12238),s=n(69307),o=n(71806);const i=(e,t)=>({isEnabled:e?.enabled??!t,customText:e?.custom_text??null,imageType:e?.image_type??null,imageId:e?.image_id??null,template:e?.template??null,token:e?.token??null});function l(){const{imageGeneratorSettings:e,jetpackSocialOptions:t,updateJetpackSocialOptions:n}=(0,o.R)(),{isPostPublished:l}=(0,r.useSelect)((e=>({isPostPublished:e(a.store).isCurrentPostPublished()}))),c=(0,s.useCallback)(((t,r)=>{const a={...e,[t]:r};n("image_generator_settings",a)}),[e,n]),u=(0,s.useCallback)((t=>{const r={...e,...t};n("image_generator_settings",r)}),[e,n]);return{...i(t.image_generator_settings,l),setIsEnabled:e=>c("enabled",e),setToken:e=>c("token",e),updateSettings:u}}},98811:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9818),a=n(69307);const s=async e=>{if(!e)return{};let t={mime:e.mime_type,fileSize:e.media_details.filesize,length:e.media_details?.length};"video/videopress"===e.mime_type&&(t=await(async e=>{if(!e?.media_details?.videopress?.original||!e?.media_details?.videopress?.duration)return{};const t=await fetch(e?.media_details?.videopress?.original,{method:"HEAD"}),n=t.headers.get("content-length"),r=t.headers.get("content-type");return n&&r?{mime:r,fileSize:n,length:Math.round(e.media_details.videopress.duration/1e3)}:{}})(e));const n=e?.media_details?.sizes??{};if(!n.full)return{mediaData:{width:e.media_details.width,height:e.media_details.height,sourceUrl:e.source_url},metaData:t};const r=n.medium||n.large,a={width:r.width,height:r.height,sourceUrl:r.source_url};return{mediaData:{width:n.full.width,height:n.full.height,sourceUrl:n.full.source_url},metaData:t,previewData:a}};function o(e=null){const[t,n]=(0,a.useState)([{}]),o=(0,r.useSelect)((t=>t("core").getMedia(e,{context:"view"})),[e]),i=(0,a.useCallback)((async()=>{try{const e=await s(o);n([e??{}])}catch{n([{}])}}),[o]);return(0,a.useEffect)((()=>{i()}),[i]),t}},46791:(e,t,n)=>{"use strict";n.d(t,{Wv:()=>l,ZP:()=>d,rs:()=>s});var r=n(69307),a=n(1795);const s="NO_MEDIA_ERROR",o="FILE_SIZE_ERROR",i="DIMENSION_ERROR";function l(e){return"video"===e.split("/")[0]}const c=e=>{if(!e?.mime||!e?.fileSize)return!1;const{mime:t,fileSize:n}=e;if(l(t))return!1;if(!a.bD.includes(t))return!1;return!((n?n/Math.pow(1e3,2):null)>=55)},u=(e,t,n,r)=>{const c=a.$8[n]??a.ay;if(!e||0===Object.keys(e).length)return c.requiresMedia?s:null;if(!c.requiresMedia&&!r)return null;const{mime:u,fileSize:d}=e;if(!u||!c.allowedMediaTypes.includes(u.toLowerCase()))return"FILE_TYPE_ERROR";if(!t?.width||!t?.height)return i;const p=d?d/Math.pow(1e3,2):null;return l(u)?((e,t,n,r,s)=>{const{minSize:l=0,maxSize:c=a.zc,minLength:u=0,maxLength:d=a.zc,maxWidth:p=a.zc,aspectRatio:m=a.ay.video.aspectRatio}=s;if(!e||e>c||ed)return"VIDEO_LENGTH_TOO_LONG_ERROR";const h=n/r;return hm.max||n>p?i:null})(p,e.length,t.width,t.height,c.video):((e,t,n,r)=>{const{maxSize:s=a.zc,minWidth:l=0,maxWidth:c=a.zc,aspectRatio:u=a.ay.image.aspectRatio}=r,d=t/n;return du.max||t>c||ts?o:null})(p,t.width,t.height,c.image)},d=(e,t,{isSocialImageGeneratorEnabledForPost:n,shouldUploadAttachedMedia:a})=>{const s=(0,r.useRef)({});return(0,r.useMemo)((()=>{const r=n?{}:e.reduce(((e,{connection_id:n,service_name:r})=>{const s=u(t.metaData,t.mediaData,r,a);return s&&(e[n]=s),e}),{});return JSON.stringify(r)!==JSON.stringify(s.current)&&(s.current=r),{validationErrors:s.current,isConvertible:c(t.metaData)}}),[n,e,t.metaData,t.mediaData,a])}},1795:(e,t,n)=>{"use strict";n.d(t,{$8:()=>g,ay:()=>h,bD:()=>f,uo:()=>b,zc:()=>m});const r="video/mp4",a="video/mov",s="video/videopress",o=["image/jpeg","image/jpg","image/png"],i=o.concat(["image/gif","image/bmp"]),l=["video/3g2","video/3gp","video/3gpp","video/asf","video/avi","video/dat","video/divx","video/dv","video/f4v","video/flv","video/gif","video/m2ts","video/m4v","video/mkv","video/mod","video/mov","video/mp4","video/mpe","video/mpeg","video/mpeg4","video/mpg","video/mts","video/nsv","video/ogm","video/ogv","video/qt","video/tod","video/ts","video/vob","video/wmv"],c=o.concat(["image/gif","image/heic","image/heif","image/webp","image/avif"]),u=["video/webm","video/quicktime","video/ogg"],d=o.concat(["image/gif","image/jpe","image/tif","image/tiff","image/webp"]),p=[a,"video/avi","video/mpg","video/mpeg","video/m4v"],m=1e5,h={requiresMedia:!1,allowedMediaTypes:o.concat([r,s,a]),image:{maxSize:4,minWidth:0,maxWidth:m,aspectRatio:{min:0,max:m}},video:{minLength:0,minSize:0,maxSize:m,maxLength:m,maxWidth:m,aspectRatio:{min:0,max:m}}},g={twitter:{allowedMediaTypes:o.concat([r,s]),image:{maxSize:5},video:{maxSize:512,maxLength:140}},facebook:{allowedMediaTypes:i.concat([s,...l]),image:{maxSize:8},video:{maxSize:1e4,maxLength:14400}},tumblr:{allowedMediaTypes:o.concat([r,a,s]),image:{maxSize:20},video:{maxSize:500,maxLength:600}},linkedin:{allowedMediaTypes:o.concat([r,s]),image:{maxSize:20},video:{minSize:.075,maxSize:200,maxLength:600,minLength:3}},"instagram-business":{requiresMedia:!0,allowedMediaTypes:["image/jpg","image/jpeg",r,a,s],image:{maxSize:8,minWidth:320,maxWidth:1440,aspectRatio:{min:.8,max:1.91}},video:{maxLength:90,minLength:3,maxSize:1e3,maxWidth:1920,aspectRatio:{min:.01,max:10}}},mastodon:{allowedMediaTypes:c.concat([...u,r,s]),image:{maxSize:10},video:{maxSize:40}},nextdoor:{allowedMediaTypes:d.concat([...p,r,s]),image:{maxSize:10},video:{maxSize:500}}},f=["image/png","image/jpeg","image/jpg","image/heic","image/heif","image/webp"],b=[...new Set([...o,...i,...c,...l,...u,...f])]},71806:(e,t,n)=>{"use strict";n.d(t,{R:()=>i});var r=n(9818),a=n(12238),s=n(69307),o=n(42032);function i(){const{editPost:e}=(0,r.useDispatch)(a.store),t=(0,r.useSelect)((e=>{const t=e(a.store).getEditedPostAttribute("meta")||{},n=t.jetpack_publicize_feature_enabled??!0,r=t.jetpack_social_options||{};return{isPublicizeEnabled:n,jetpackSocialOptions:r,attachedMedia:r.attached_media||[],imageGeneratorSettings:r.image_generator_settings??{enabled:!1},isPostAlreadyShared:t.jetpack_social_post_already_shared??!1,shareMessage:`${t.jetpack_publicize_message||""}`.substring(0,(0,o.getShareMessageMaxLength)()),shouldUploadAttachedMedia:r.should_upload_attached_media??!1}}),[]),n=(0,s.useCallback)(((t,n)=>{e({meta:{[t]:n}})}),[e]),i=(0,s.useCallback)((()=>{n("jetpack_publicize_feature_enabled",!t.isPublicizeEnabled)}),[t.isPublicizeEnabled,n]),l=(0,s.useCallback)(((e,r)=>{n("jetpack_social_options",{...t.jetpackSocialOptions,[e]:r})}),[t.jetpackSocialOptions,n]);return(0,s.useMemo)((()=>({...t,togglePublicizeFeature:i,updateJetpackSocialOptions:l,updateMeta:n})),[t,i,l,n])}},14085:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(13419),a=n(9818),s=n(12238),o=n(71806);const i="republicize";function l(){const e=(0,r.Pb)()?.social?.sharesData??{},t=e.is_share_limit_enabled,n=(0,r.OZ)(i)?.available||t,l=(0,a.useSelect)((e=>e(s.store).isCurrentPostPublished()),[]),c=(0,r.Pb)()?.social?.publicizeConnectionsUrl??"https://wordpress.com/marketing/connections/",{isPublicizeEnabled:u,togglePublicizeFeature:d,isPostAlreadyShared:p}=(0,o.R)(),m=(0,r.X1)(i)&&!n,h=l?n:u,g=l&&m,f=l&&!n,b=!!(0,r.Pb)()?.social?.hasPaidPlan,v=!!(0,r.Pb)()?.social?.isEnhancedPublishingEnabled,k=!!(0,r.Pb)()?.social?.isAutoConversionEnabled;return{isPublicizeEnabledMeta:u,isPublicizeEnabled:h,togglePublicizeFeature:d,isPublicizeDisabledBySitePlan:g,isRePublicizeFeatureAvailable:n,isRePublicizeUpgradableViaUpsell:m,hidePublicizeFeature:f,isShareLimitEnabled:t,isPostAlreadyShared:p,numberOfSharesRemaining:e.shares_remaining,shouldShowAdvancedPlanNudge:e.show_advanced_plan_upgrade_nudge,hasPaidPlan:b,isEnhancedPublishingEnabled:v,isSocialImageGeneratorAvailable:!!(0,r.Pb)()?.social?.isSocialImageGeneratorAvailable,isSocialImageGeneratorEnabled:!!(0,r.Pb)()?.social?.isSocialImageGeneratorEnabled,connectionsAdminUrl:c+(0,r.lQ)(),adminUrl:(0,r.Pb)()?.social?.adminUrl,isAutoConversionEnabled:k,jetpackSharingSettingsUrl:(0,r.Pb)()?.social?.jetpackSharingSettingsUrl}}},6230:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(9818),a=n(69307),s=n(22552),o=n(23177);function i(){const e=(0,s.Z)(),t=(0,a.useRef)(!1),n=(0,r.useDispatch)(o.Eg).refreshAutoConversionSettings;return{refreshAutoConversionSettings:()=>{e||(t.current=!0),e&&t.current&&(n(),t.current=!1)}}}},96672:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(94333),a=n(69307),s=n(22552),o=n(37568);function i(){const e=(0,a.useRef)(!1),t=(0,s.Z)(),{refresh:n}=(0,o.Z)(),i=(0,r.useDebounce)(n,2e3);return()=>{t||(e.current=!0,i.cancel()),t&&e.current&&(i(),e.current=!1)}}},86419:(e,t,n)=>{"use strict";n.d(t,{M1:()=>i,e3:()=>l});var r=n(94333),a=n(9818),s=n(12238),o=n(69307);function i(e,t){const n=(0,a.useSelect)((e=>e(s.store).isPublishingPost()),[]),i=(0,r.usePrevious)(n);(0,o.useEffect)((()=>{i&&!n&&e()}),[n,i,e,t])}function l(e,t){const n=(0,a.useSelect)((e=>e(s.store).isPublishingPost()),[]),i=(0,r.usePrevious)(n);(0,o.useEffect)((()=>{!i&&n&&e()}),[n,i,e,t])}},34431:(e,t,n)=>{"use strict";n.d(t,{U:()=>o});var r=n(9818),a=n(65736),s=n(23177);const __=a.__,_n=a._n;function o({scheduledCountAdjustment:e=0,usedCountAdjustment:t=0}={}){return(0,r.useSelect)((n=>{const r=n(s.h),o=r.getShareLimit(),i=r.getScheduledSharesCount()+e,l=r.getSharesUsedCount()+t,c=l+i,u=r.numberOfSharesRemaining(),d=function(e){const t=Number.isFinite(e)?(0,a.sprintf)( // translators: %d: The number of shares to social media remaining -_n("You have %d auto-share remaining.","You have %d auto-shares remaining.",e,"jetpack"),e):"";return{default:"",exceeded:__("You have reached your auto-share limit. Scheduled posts will not be shared until shares become available.","jetpack"),full:__("You have reached your auto-share limit.","jetpack"),approaching:t}}(u);let p="default",m="none",h=d.default;return c>o?(p="error",m="exceeded",h=d.exceeded):c===o?(m="full",p="error",h=d.full):c>=.9*o?(m="approaching",p="error",h=d.approaching):c>=.8*o&&(m="approaching",p="warning",h=d.approaching),{status:m,noticeType:p,message:h,usedCount:l,scheduledCount:i,remainingCount:u}}),[e,t])}},45579:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(13419),a=n(86989),s=n.n(a),o=n(9818),i=n(12238),l=n(69307),c=n(65736),u=n(37568),d=n(48751);const __=c.__;function p(e){const t=e?.code,n=e?.errors?.length;if(!t&&!n)return!1;let r="";return t&&(r=__("Unable to share the Post","jetpack")),n&&(r=__("Unable to share the Post","jetpack")),{message:r,result:e}}function m(e){const{message:t}=(0,d.Z)(),{skippedConnections:n}=(0,u.Z)(),a=(0,o.useSelect)((e=>e(i.store).getCurrentPostId()),[]);e=e||a;const[c,m]=(0,l.useState)({data:[],error:{}}),h=((0,r.Pb)()?.social?.resharePath??"/wpcom/v2/posts/{postId}/publicize").replace("{postId}",e),g=(0,l.useCallback)((function(){const r={isFetching:!1,isError:!1,isSuccess:!1,data:[],error:{},postId:e};if(!c.isFetching)return m({...r,isFetching:!0}),s()({path:h,method:"POST",data:{message:t,skipped_connections:n}}).then(((e={})=>{const t=p(e);if(t)return m((e=>({...e,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:t})));m((t=>({...t,isFetching:!1,isSuccess:!0,isError:!1,data:e?.results,error:{}})))})).catch((e=>{m((t=>({...t,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:p(e)})))})),function(){m(r)}}),[e,t,n,c.isFetching,h]);return{...c,doPublicize:g}}},37568:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(9818),a=n(23177);function s(){const{refreshConnectionTestResults:e,toggleConnectionById:t}=(0,r.useDispatch)(a.h);return{...(0,r.useSelect)((e=>{const t=e(a.h),n=t.getConnections(),r=t.getEnabledConnections(),s=t.getDisabledConnections().map((e=>e.id));return{connections:n,hasConnections:n.length>0,hasEnabledConnections:r.length>0,skippedConnections:s,enabledConnections:r}}),[]),toggleById:t,refresh:e}}},48751:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(42032),a=n(71806);function s(){const{updateMeta:e,shareMessage:t}=(0,a.R)();return{message:t,maxLength:(0,r.getShareMessageMaxLength)(),updateMessage:function(t){e("jetpack_publicize_message",t)}}}},19890:(e,t,n)=>{"use strict";n.d(t,{N:()=>i});var r=n(9818),a=n(12238),s=n(23177),o=n(86419);function i(){const{mergeConnections:e}=(0,r.useDispatch)(s.h),{didPostSaveRequestSucceed:t,isCurrentPostPublished:n,getEditedPostAttribute:i}=(0,r.useSelect)((e=>e(a.store)),[]);(0,o.M1)((()=>{if(t()&&n()){const t=i("jetpack_publicize_connections");t?.length&&e(t)}}),[t,n,i])}},21052:(e,t,n)=>{"use strict";n.d(t,{Au:()=>l,Wh:()=>c,ZP:()=>u,hi:()=>i,wO:()=>o});var r=n(9818),a=n(23177),s=n(4957);const o="SET_AUTO_CONVERSION_SETTINGS";function i(){return c({isUpdating:!0})}function l(){return c({isUpdating:!1})}function c(e){return{type:o,options:e}}const u={updateAutoConversionSettings:function*(e){try{yield i(),yield c(e),yield(0,s.Fl)(e);const t=yield(0,s.wi)();return yield c(t.jetpack_social_autoconvert_images),!0}catch(e){const t=(0,r.select)(a.Eg).getAutoConversionSettings();return yield c(t),!1}finally{yield l()}},setAutoConversionSettings:c,refreshAutoConversionSettings:function*(){try{yield i();const e=yield(0,s.wi)();return yield c(e.jetpack_social_autoconvert_images),!0}catch(e){return!1}finally{yield l()}}}},23013:(e,t,n)=>{"use strict";n.r(t),n.d(t,{mergeConnections:()=>u,refreshConnectionTestResults:()=>d,setConnections:()=>l,syncConnectionsToPostMeta:()=>p,toggleConnection:()=>c,toggleConnectionById:()=>m});var r=n(13419),a=n(86989),s=n.n(a),o=n(12238),i=n(74442);function l(e){return{type:i.b,connections:e}}function c(e){return{type:i.L,connectionId:e}}function u(e){return function({dispatch:t,select:n}){const r=n.getConnections(),a=[],s={done:!1,enabled:Boolean(n.numberOfSharesRemaining()),toggleable:!0};for(const t of e){const e={...s,...r.find((e=>e.connection_id?e.connection_id===t.connection_id:e.id===t.id)),...t,is_healthy:t.test_success};a.push(e)}t(l(a))}}function d(e=!1){return async function({dispatch:t}){try{const n=(0,r.Pb)()?.social?.connectionRefreshPath||"/wpcom/v2/publicize/connection-test-results";t(u(await s()({path:n}))),e&&t(p())}catch(e){}}}function p(){return function({registry:e,select:t}){const n=t.getConnections();return e.dispatch(o.store).editPost({jetpack_publicize_connections:n})}}function m(e,t=!0){return function({dispatch:n}){n(c(e)),t&&n(p())}}},74442:(e,t,n)=>{"use strict";n.d(t,{L:()=>a,b:()=>r});const r="SET_CONNECTIONS",a="TOGGLE_CONNECTION"},54725:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(21052),a=n(23013),s=n(371),o=n(72438),i=n(4462);const l={...s.ZP,...i.ZP,...r.ZP,...o.Z,...a}},371:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>l,dz:()=>o,ff:()=>i});var r=n(9818),a=n(23177),s=n(4957);const o="SET_JETPACK_SETTINGS";function i(e){return{type:o,options:e}}const l={updateJetpackSettings:function*(e){try{yield i({is_updating:!0}),yield i(e),yield(0,s.RF)(e);const t=yield(0,s.es)();return yield i(t),!0}catch(e){const t=(0,r.select)(a.Eg).getJetpackSettings();return yield i(t),!1}finally{yield i({is_updating:!1})}},setJetpackSettings:i}},72438:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(4957),a=n(21052),s=n(4462);const o={refreshJetpackSocialSettings:function*(){try{yield(0,a.hi)(),yield(0,s.ds)();const e=yield(0,r.mu)();return yield(0,a.Wh)(e.jetpack_social_autoconvert_images),yield(0,s.ch)(e.jetpack_social_image_generator_settings),!0}catch(e){return!1}finally{yield(0,a.Au)(),yield(0,s.Gr)()}}}},4462:(e,t,n)=>{"use strict";n.d(t,{Gr:()=>l,ZP:()=>u,ch:()=>c,ds:()=>i,kg:()=>o});var r=n(9818),a=n(23177),s=n(4957);const o="SET_SOCIAL_IMAGE_GENERATOR_SETTINGS";function i(){return c({isUpdating:!0})}function l(){return c({isUpdating:!1})}function c(e){return{type:o,options:e}}const u={updateSocialImageGeneratorSettings:function*(e){try{yield i(),yield c(e),yield(0,s.Ux)(e);const t=yield(0,s.oB)();return yield c(t.jetpack_social_image_generator_settings),!0}catch(e){const t=(0,r.select)(a.Eg).getSocialImageGeneratorSettings();return yield c(t),!1}finally{yield l()}},setSocialImageGeneratorSettings:c,refreshSocialImageGeneratorSettings:function*(){try{yield i();const e=yield(0,s.oB)();return yield c(e.jetpack_social_image_generator_settings),!0}catch(e){return!1}finally{yield l()}}}},4957:(e,t,n)=>{"use strict";n.d(t,{Fl:()=>v,RF:()=>m,Ux:()=>g,ZP:()=>k,es:()=>p,mu:()=>b,oB:()=>h,wi:()=>f});var r=n(86989),a=n.n(r);const s="FETCH_JETPACK_SETTINGS",o="UPDATE_JETPACK_SETTINGS",i="FETCH_SOCIAL_IMAGE_GENERATOR_SETTINGS",l="UPDATE_SOCIAL_IMAGE_GENERATOR_SETTINGS",c="FETCH_AUTO_CONVERSION_SETTINGS",u="UPDATE_AUTO_CONVERSION_SETTINGS",d="FETCH_JETPACK_SOCIAL_SETTINGS",p=()=>({type:s}),m=e=>({type:o,settings:e}),h=()=>({type:i}),g=e=>({type:l,settings:e}),f=()=>({type:c}),b=()=>({type:d}),v=e=>({type:u,settings:e}),k={[s]:function(){return a()({path:"/jetpack/v4/social/settings"})},[o]:function(e){return a()({path:"/jetpack/v4/social/settings",method:"POST",data:e.settings})},[i]:function(){return a()({path:"/wp/v2/settings?_fields=jetpack_social_image_generator_settings"})},[l]:function(e){return a()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_image_generator_settings:e.settings}})},[c]:function(){return a()({path:"/wp/v2/settings?_fields=jetpack_social_autoconvert_images"})},[u]:function(e){return a()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_autoconvert_images:e.settings}})},[d]:function(){return a()({path:"/wp/v2/settings?_fields=jetpack_social_autoconvert_images,jetpack_social_image_generator_settings"})}}},23177:(e,t,n)=>{"use strict";n.d(t,{Bb:()=>f,Cd:()=>g,Eg:()=>c,M$:()=>p,cs:()=>h,h:()=>v,qk:()=>m,uJ:()=>d,wV:()=>b});var r=n(9818),a=n(54725),s=n(4957),o=n(45272),i=n(15781),l=n(22987);const c="jetpack-social-plugin",u={reducer:o.Z,actions:a.Z,selectors:l.Z,resolvers:i.ZP,controls:s.ZP,initialState:window?.jetpackSocialInitialState||window?.Initial_State?.socialInitialState||window?.Jetpack_Editor_Initial_State?.social||{}},d="facebook",p="instagram-business",m="linkedin",h="mastodon",g="nextdoor",f="tumblr",b="twitter",v=(0,r.createReduxStore)(c,u);(0,r.register)(v)},20750:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(21052);const a=(e={},t)=>t.type===r.wO?{...e,...t.options}:e},71837:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74442);const a=(e={},t)=>{switch(t.type){case r.b:return{...e,connections:t.connections};case r.L:return{...e,connections:e.connections.map((e=>(e.connection_id?e.connection_id===t.connectionId:e.id===t.connectionId)?{...e,enabled:!e.enabled}:e))}}return e}},45272:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(9818),a=n(20750),s=n(71837),o=n(80697),i=n(35652),l=n(28696),c=n(54489);const u=(0,r.combineReducers)({sharesData:i.Z,siteData:l.Z,connectionData:s.Z,jetpackSettings:o.Z,socialImageGeneratorSettings:c.Z,autoConversionSettings:a.Z,hasPaidPlan:(e=!1)=>e})},80697:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(371);const a=(e={},t)=>t.type===r.dz?{...e,...t.options}:e},35652:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(e={})=>e},28696:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(e={})=>e},54489:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(4462);const a=(e={},t)=>t.type===r.kg?{...e,...t.options}:e},15781:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>c});var r=n(12238),a=n(21052),s=n(23013),o=n(371),i=n(4462),l=n(4957);const c={getJetpackSettings:function*(){try{const e=yield(0,l.es)();if(e)return(0,o.ff)(e)}catch(e){console.log(e)}},getSocialImageGeneratorSettings:function*(){try{const e=yield(0,l.oB)();if(e)return(0,i.ch)(e.jetpack_social_image_generator_settings)}catch(e){console.log(e)}},getAutoConversionSettings:function*(){try{const e=yield(0,l.wi)();if(e)return(0,a.Wh)(e.jetpack_social_autoconvert_images)}catch(e){console.log(e)}},getConnections:function(){return function({dispatch:e,registry:t}){const n=t.select(r.store).getEditedPostAttribute("jetpack_publicize_connections");e((0,s.setConnections)(n||[]))}}}},68113:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getAutoConversionSettings:e=>e.autoConversionSettings,isAutoConversionAvailable:e=>e.autoConversionSettings.available,isAutoConversionEnabled:e=>e.autoConversionSettings.available&&e.autoConversionSettings.enabled,isAutoConversionSettingsUpdating:e=>e.autoConversionSettings.isUpdating}},43354:(e,t,n)=>{"use strict";function r(e){return e.connectionData?.connections??[]}function a(e){return e.connectionData?.adminUrl??null}function s(e){return r(e).length>0}function o(e){return r(e).filter((e=>!1===e.test_success))}function i(e){return r(e).filter((e=>"must_reauth"===e.test_success)).map((e=>e.service_name))}function l(e){return r(e).filter((e=>e.enabled))}function c(e){return r(e).filter((e=>!e.enabled))}function u(e,t,{forceDefaults:n=!1}={}){let a="",s="",o="";if(!n){const n=r(e).find((({service_name:e})=>t===e));if(n){const{display_name:e,profile_display_name:r,profile_picture:i}=n;a="twitter"===t?r:e,o="twitter"===t?e:n.username,s=i}}return{displayName:a,profileImage:s,username:o}}n.r(t),n.d(t,{getConnectionProfileDetails:()=>u,getConnections:()=>r,getConnectionsAdminUrl:()=>a,getDisabledConnections:()=>c,getEnabledConnections:()=>l,getFailedConnections:()=>o,getMustReauthConnections:()=>i,hasConnections:()=>s})},22987:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(68113),a=n(43354),s=n(82836),o=n(31473),i=n(85675),l=n(45073);const c={...i.Z,...a,...s.Z,...o,...l.Z,...r.Z}},82836:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getJetpackSettings:e=>e.jetpackSettings,isModuleEnabled:e=>e.jetpackSettings.publicize_active,showPricingPage:e=>e.jetpackSettings.show_pricing_page,isUpdatingJetpackSettings:e=>e.jetpackSettings.is_updating,hasPaidPlan:e=>!(e.jetpackSettings?.showNudge??1),isEnhancedPublishingEnabled:e=>e.jetpackSettings?.isEnhancedPublishingEnabled??!1,getDismissedNotices:e=>e.jetpackSettings?.dismissedNotices}},31473:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getScheduledSharesCount:()=>l,getShareLimit:()=>o,getSharedPostsCount:()=>u,getSharesUsedCount:()=>i,getTotalSharesCount:()=>c,isShareLimitEnabled:()=>a,numberOfSharesRemaining:()=>p,shouldShowAdvancedPlanNudge:()=>d,showShareLimits:()=>s});var r=n(82836);function a(e){return e.sharesData?.is_share_limit_enabled??!1}function s(e){return!r.Z.hasPaidPlan(e)&&!e.hasPaidPlan&&a(e)}function o(e){return e.sharesData?.share_limit??30}function i(e){return e.sharesData?.publicized_count??0}function l(e){return e.sharesData?.to_be_publicized_count??0}function c(e){const t=i(e)+l(e);return Math.max(t,0)}function u(e){return e.sharesData?.shared_posts_count??0}function d(e){return e.sharesData?.show_advanced_plan_upgrade_nudge??!1}function p(e,t={}){if(!s(e))return 1/0;const{includeScheduled:n}={includeScheduled:!0,...t},r=i(e),a=o(e),c=n?l(e):0;return Math.max(a-r-c,0)}},85675:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getAdminUrl:e=>e.siteData?.adminUrl??null,getAPIRootUrl:e=>e.siteData?.apiRoot??null,getAPINonce:e=>e.siteData?.apiNonce??null,getRegistrationNonce:e=>e.siteData?.registrationNonce??null,getSiteSuffix:e=>e.siteData?.siteSuffix??null,getBlogID:e=>e.siteData?.blogID??null,getPluginVersion:e=>e.siteData?.pluginVersion??null}},45073:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getSocialImageGeneratorSettings:e=>e.socialImageGeneratorSettings,isSocialImageGeneratorAvailable:e=>e.socialImageGeneratorSettings.available,isSocialImageGeneratorEnabled:e=>e.socialImageGeneratorSettings.enabled,isUpdatingSocialImageGeneratorSettings:e=>e.socialImageGeneratorSettings.isUpdating,getSocialImageGeneratorDefaultTemplate:e=>e.socialImageGeneratorSettings.template}},5463:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r=255;function a(){return r}},12677:(e,t,n)=>{"use strict";n.d(t,{h:()=>a});var r=n(13419);function a(){return(0,r.Pb)()?.social?.supportedAdditionalConnections||[]}},42032:(e,t,n)=>{"use strict";n.d(t,{getShareMessageMaxLength:()=>r.A,getSupportedAdditionalConnections:()=>a.h});var r=n(5463),a=n(12677),s=n(581);n.o(s,"useSyncPostDataToStore")&&n.d(t,{useSyncPostDataToStore:function(){return s.useSyncPostDataToStore}})},581:()=>{},13419:(e,t,n)=>{"use strict";n.d(t,{Dp:()=>u.Z,FK:()=>c.FK,HD:()=>c.HD,M6:()=>s.M6,OZ:()=>o.Z,Pb:()=>r.Z,Pm:()=>m.Z,Qq:()=>c.Qq,Rl:()=>c.Rl,T:()=>l.Z,Ug:()=>s.Ug,Wp:()=>s.Wp,X1:()=>c.X1,_D:()=>c._D,aQ:()=>s.aQ,dM:()=>h.d,el:()=>p.Z,lQ:()=>a.Z,lt:()=>h.l,m3:()=>c.m3,o_:()=>i.Z,og:()=>g.Z,z$:()=>d.Z});var r=n(50148),a=n(35004),s=n(99505),o=n(48052),i=n(76714),l=n(80354),c=n(75404),u=n(68586),d=n(61053),p=n(11380),m=n(6342),h=n(96959),g=n(19499);n(39058)},6342:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(78868),a=n(99196),s=n.n(a);const o=()=>s().createElement(r.Z,{className:"jetpack-editor-panel-logo",height:16,logoColor:"#1E1E1E",showText:!1})},96959:(e,t,n)=>{"use strict";n.d(t,{d:()=>s,l:()=>o});var r=n(69307),a=n(12953);function s(e){const t={};let n="span",a=e.icon;const s=document.createElement("div");s.innerHTML=e.icon;const o=s.querySelector("svg");return o&&(n="svg",a=o.innerHTML,Array.from(o.attributes).forEach((({nodeName:e,nodeValue:n})=>t[e]=n))),(0,r.createElement)(n,{...t,dangerouslySetInnerHTML:{__html:a||""}})}function o(e){return{src:s(e),foreground:(0,a.Z)()}}},12953:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(99505);const a="#069e08";function s(){return(0,r.Ug)()||(0,r.Wp)()?null:a}},19499:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(50148);function a(){const e=(0,r.Z)();return e?.blocks_variation??"production"}},50148:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r="Jetpack_Editor_Initial_State";function a(){return"object"==typeof window?window?.[r]??null:null}},48052:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(50148);function a(e){const t=(0,r.Z)(),n=t?.available_blocks?.[e]?.available??!1,a=t?.available_blocks?.[e]?.unavailable_reason??"unknown";return{available:n,...!n&&{details:t?.available_blocks?.[e]?.details??[],unavailableReason:a}}}},35004:(e,t,n)=>{"use strict";function r(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:null}n.d(t,{Z:()=>r})},61053:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(6975),a=n(31294),s=n(69307);const{tracks:o}=r.Z,{recordEvent:i}=o,l=({pageViewEventName:e=null,pageViewNamespace:t="jetpack",pageViewSuffix:n="page_view",pageViewEventProperties:l={}}={})=>{const[c,u]=(0,s.useState)(!1),{isUserConnected:d,isRegistered:p,userConnectionData:m={}}=(0,a.Z)(),{wpcomUser:{login:h,ID:g}={},blogId:f}=m.currentUser||{},b=(0,s.useCallback)((async(e,t={})=>{d&&g&&h&&i(e,t)}),[d,g,h]);return(0,s.useEffect)((()=>{d&&g&&h&&f&&r.Z.initialize(g,h,{blog_id:f})}),[f,g,h,d]),(0,s.useEffect)((()=>{const r=e?`${t}_${e}_${n}`:null;p&&r&&(c||(b(r,l),u(!0)))}),[c,t,e,n,p,l,b]),{recordEvent:b,tracks:o}}},11380:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9818),a=n(69307),s=n(39058);const o=e=>{const{isModuleActive:t,isChangingStatus:n,isLoadingModules:o}=(0,r.useSelect)((t=>{const n=t(s.p);return{isModuleActive:n.isModuleActive(e),isChangingStatus:n.isModuleUpdating(e),isLoadingModules:n.areModulesLoading(e)}}),[s.p]),{updateJetpackModuleStatus:i}=(0,r.useDispatch)(s.p),l=(0,a.useCallback)((t=>i({name:e,active:t})),[e,i]);return(0,a.useMemo)((()=>({isLoadingModules:o,isChangingStatus:n,isModuleActive:t,changeStatus:l})),[o,n,t,l])}},68586:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(50148);function a(){return(0,r.Z)()?.jetpack?.is_current_user_connected??!1}},44166:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>p,rW:()=>d});var r=n(9818),a=n(99505),s=n(82162),o=n(39058);const i="SET_JETPACK_MODULES",l="SET_MODULE_UPDATING";function c(e){return d({isLoading:e})}function u(e,t){return{type:l,name:e,isUpdating:t}}function d(e){return{type:i,options:e}}const p={updateJetpackModuleStatus:function*(e){try{yield u(e.name,!0),yield(0,s.zL)(e);const t=yield(0,s.Bs)();return yield d({data:t}),!0}catch(e){const t=(0,r.select)(o.p).getJetpackModules();return yield d(t),!1}finally{yield u(e.name,!1)}},setJetpackModules:d,fetchModules:function*(){if((0,a.Wp)())return!0;try{yield c(!0);const e=yield(0,s.Bs)();return yield d({data:e}),!0}catch(e){const t=(0,r.select)(o.p).getJetpackModules();return yield d(t),!1}finally{yield c(!1)}}}},82162:(e,t,n)=>{"use strict";n.d(t,{Bs:()=>i,ZP:()=>c,zL:()=>l});var r=n(86989),a=n.n(r);const s="FETCH_JETPACK_MODULES",o="UPDATE_JETPACK_MODULE_STATUS",i=()=>({type:s}),l=e=>({type:o,settings:e}),c={[s]:function(){return a()({path:"/jetpack/v4/module/all",method:"GET"})},[o]:function({settings:e}){return a()({path:`/jetpack/v4/module/${e.name}/active`,method:"POST",data:{active:e.active}})}}},39058:(e,t,n)=>{"use strict";n.d(t,{p:()=>c});var r=n(9818),a=n(44166),s=n(82162),o=n(42469),i=n(55133),l=n(43524);const c="jetpack-modules",u=(0,r.createReduxStore)(c,{reducer:o.Z,actions:a.ZP,controls:s.ZP,resolvers:i.Z,selectors:l.Z});(0,r.register)(u);const d=window?.Initial_State?.getModules||window?.Jetpack_Editor_Initial_State?.modules||null;null!==d&&(0,r.dispatch)(c).setJetpackModules({data:{...d}})},42469:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r={isLoading:!1,isUpdating:{},data:{}},a=(e=r,t)=>{switch(t.type){case"SET_JETPACK_MODULES":return{...e,...t.options};case"SET_MODULE_UPDATING":return{...e,isUpdating:{...e.isUpdating,[t.name]:t.isUpdating}}}return e}},55133:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(44166),a=n(82162);const s={getJetpackModules:function*(){try{const e=yield(0,a.Bs)();if(e)return(0,r.rW)({data:e})}catch(e){console.error(e)}}}},43524:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(99505);const a={getJetpackModules:e=>e.data,isModuleActive:(e,t)=>(0,r.Wp)()||(e?.data?.[t]?.activated??!1),areModulesLoading:e=>e.isLoading??!1,isModuleUpdating:(e,t)=>e?.isUpdating?.[t]??!1}},75404:(e,t,n)=>{"use strict";n.d(t,{FK:()=>g,HD:()=>f,Qq:()=>u,Rl:()=>m,X1:()=>d,_D:()=>p,m3:()=>b});var r=n(65736),a=n(96483),s=n(92819),o=n(50148),i=n(48052),l=n(35004),c=n(99505);const __=r.__;function u({planSlug:e,plan:t,postId:n,postType:r}){const o=(0,s.startsWith)(e,"jetpack_")?e:(0,s.get)(t,["path_slug"]),i=(void 0===r?()=>{const e=new URLSearchParams(window.location.search);return(0,a.addQueryArgs)(window.location.protocol+`//${(0,l.Z)().replace("::","/")}/wp-admin/site-editor.php`,{postId:e.get("postId"),postType:e.get("postType"),plan_upgraded:1})}:()=>{const e=["page","post"].includes(r)?"":"edit";return(0,c.Wp)()?(0,a.addQueryArgs)("/"+(0,s.compact)([e,r,(0,l.Z)(),n]).join("/"),{plan_upgraded:1}):(0,a.addQueryArgs)(window.location.protocol+`//${(0,l.Z)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:n,plan_upgraded:1})})();return(0,c.Ug)()?(0,a.addQueryArgs)(`https://wordpress.com/plans/${(0,l.Z)()}`,{redirect_to:i,customerType:"business"}):o&&(0,a.addQueryArgs)(`https://wordpress.com/checkout/${(0,l.Z)()}/${o}`,{redirect_to:i})}function d(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{available:n,unavailableReason:r}=(0,i.Z)(t);return!n&&"missing_plan"===r}function p(e,t){return"missing_plan"===e&&t.required_plan}function m(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{details:n,unavailableReason:r}=(0,i.Z)(t);return p(r,n)}const h=[{name:"core/cover",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"video",description:__("Upgrade your plan to use video covers","jetpack")},{name:"core/audio",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"audio",description:__("Upgrade your plan to upload audio","jetpack")}];function g(){return(0,s.get)((0,o.Z)(),"jetpack.enable_upgrade_nudge",!1)}const f=e=>(0,s.map)(h,"name").includes(e),b=e=>(0,s.head)((0,s.filter)(h,(({name:t})=>t===e)))},76714:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(98817),a=n(48052);function s(e,t){const{available:n,unavailableReason:s}=(0,a.Z)(e);return!!n&&(0,r.registerPlugin)(`jetpack-${e}`,t)}},99505:(e,t,n)=>{"use strict";n.d(t,{M6:()=>i,Ug:()=>o,Wp:()=>s,aQ:()=>l});var r=n(50148);function a(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function s(){return"simple"===a()}function o(){return"atomic"===a()}function i(){const e=(0,r.Z)();return e?.jetpack?.is_private_site??!1}function l(){const e=(0,r.Z)();return e?.jetpack?.is_coming_soon??!1}},80354:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(82674),a=n.n(r),s=n(94333);const o=e=>(0,s.createHigherOrderComponent)((t=>n=>React.createElement(t,a()({},n,{className:n.name===e?"has-warning is-interactive":n.className}))),"withHasWarningIsInteractiveClassNames")},83059:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>S});var r=n(51806),a=n(42290),s=n(13419),o=n(4981),i=n(55609),l=n(9818),c=n(69307),u=n(65736),d=n(586),p=n(3639),m=n(92710),h=n(58532),g=n(51128),f=n.n(g),b=(n(99196),n(49259)),v=n(63634),k=n(854),y=n(6747),w=n(81612),E=n(27298);const __=u.__,_=f()("jetpack-ai-assistant:dropdown"),C=[{name:__("Correct spelling and grammar","jetpack"),key:"correct-spelling",aiSuggestion:v.Hd,icon:d.Z},{name:__("Simplify","jetpack"),key:"simplify",aiSuggestion:v.hI,icon:p.Z},{name:__("Summarize","jetpack"),key:"summarize",aiSuggestion:v.Lq,icon:m.Z},{name:__("Expand","jetpack"),key:"make-longer",aiSuggestion:v.TV,icon:h.Z}];function x(e){return e.filter((e=>null!=e)).map((e=>(0,o.getBlockContent)(e))).join("\n\n")}function j({onClose:e,blockType:t}){const[n,o]=(0,c.useState)(!1),{getSelectedBlockClientIds:u,getBlocksByClientId:d}=(0,l.useSelect)("core/block-editor"),{removeBlocks:p,replaceBlock:m}=(0,l.useDispatch)("core/block-editor");(0,c.useEffect)((()=>{const e=u(),t=x(d(e)),n=(0,k.t$)(t);return o(!n.length)}),[d,u]);const{tracks:h}=(0,s.z$)(),g=(n,r={})=>{const a=u(),s=d(a),o=x(s);e(),_("requestSuggestion",n,r),h.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:n,block_type:t});const[i]=s,[l,...c]=a,g={...i?.attributes||{},content:o},f=(0,y.b)(t,g),v={clientId:l,type:n,options:{...r,contentType:"generated",fromExtension:!0}};localStorage.setItem((0,b.$M)(f.clientId),JSON.stringify(v)),m(l,f),p(c)};return(0,r.createElement)(r.Fragment,null,n&&(0,r.createElement)(i.Notice,{status:"warning",isDismissible:!1,className:"jetpack-ai-assistant__info"},__("Add content to activate the tools below","jetpack")),(0,r.createElement)(i.MenuGroup,null,(0,r.createElement)(i.MenuItem,{icon:a.u_,iconPosition:"left",key:"key-ai-assistant",onClick:()=>{const e=u(),n=d(e),r=x(n),[a,...s]=e,[o]=n,i={...o?.attributes||{},content:r};m(a,(0,y.b)(t,i)),p(s),h.recordEvent("jetpack_ai_assistant_prompt_show",{block_type:t})},disabled:n},(0,r.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},__("Ask AI Assistant","jetpack"))),C.map((e=>(0,r.createElement)(i.MenuItem,{icon:e?.icon,iconPosition:"left",key:`key-${e.key}`,onClick:()=>{g(e.aiSuggestion,{})},disabled:n},(0,r.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},e.name)))),(0,r.createElement)(E.IP,{onChange:e=>{g(v.Lg,{tone:e})},disabled:n}),(0,r.createElement)(w.xK,{onChange:e=>{g(v.Nw,{language:e})},disabled:n})))}function S({blockType:e}){const{tracks:t}=(0,s.z$)();return(0,r.createElement)(i.Dropdown,{popoverProps:{variant:"toolbar"},renderToggle:({isOpen:e,onToggle:t})=>(0,r.createElement)(i.ToolbarButton,{className:"jetpack-ai-assistant__button",showTooltip:!0,onClick:t,"aria-haspopup":"true","aria-expanded":e,label:__("AI Assistant","jetpack"),icon:a.u_}),onToggle:n=>{n&&t.recordEvent("jetpack_ai_assistant_extension_toolbar_menu_show",{block_type:e})},renderContent:({onClose:t})=>(0,r.createElement)(j,{onClose:t,blockType:e})})}},3180:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(65736),s=n(26546),o=n(46867);const __=a.__,i=()=>{const e=`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/connection`,{autosaveAndRedirect:t,isRedirecting:n}=(0,o.Z)(e);return(0,r.createElement)(s.p,{buttonText:__("Reconnect Jetpack","jetpack"),checkoutUrl:e,className:"jetpack-ai-connect-banner",description:__("Your account is not connected to Jetpack at the moment.","jetpack"),goToCheckoutPage:e=>{t(e)},isRedirecting:n,visible:!0,align:null,title:null,context:null})}},87445:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(6895),s=n(55609),o=n(65736);const __=o.__;const i=function(){const e=(0,a.Z)("jetpack-ai-feedback");return(0,r.createElement)("div",{className:"jetpack-ai-feedback-control"},(0,r.createElement)(s.BaseControl,{label:__("Feedback","jetpack")},(0,r.createElement)("p",null,__("Your feedback is valuable in our commitment to refine and improve this feature.","jetpack")),(0,r.createElement)(s.ExternalLink,{href:e},__("Share your feedback","jetpack"))))}},81612:(e,t,n)=>{"use strict";n.d(t,{QA:()=>h,ZP:()=>f,xK:()=>b});var r=n(51806),a=n(13419),s=n(55609),o=n(65736),i=n(61074),l=n(46936),c=n(43618);n(99196);const __=o.__,u=["en","es","fr","de","it","pt","ru","zh","ja","ar","hi","ko"],d=window?.Jetpack_Editor_Initial_State?.siteLocale||navigator?.language,p=__("Translate","jetpack"),m=d?.split("-")[0]||"en",h=(d?.split("-"),{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")},id:{label:__("Indonesian","jetpack")},tl:{label:__("Filipino","jetpack")},vi:{label:__("Vietnamese","jetpack")}}),g=({value:e,onChange:t})=>{const n=[...u.filter((e=>e!==m))];return u.includes(m)&&n.unshift(m),(0,r.createElement)(s.MenuGroup,{label:__("Select language","jetpack")},n.map((n=>(0,r.createElement)(s.MenuItem,{key:`key-${n}`,onClick:()=>t(n+" ("+h[n].label+")"),isSelected:e===n},h[n].label))))};function f({value:e=m,label:t=p,onChange:n,disabled:o=!1}){const{tracks:l}=(0,a.z$)();return o?(0,r.createElement)(s.Tooltip,{text:t},(0,r.createElement)(s.Button,{disabled:!0},(0,r.createElement)(i.Z,{icon:c.Z}))):(0,r.createElement)(s.ToolbarDropdownMenu,{icon:c.Z,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&l.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"i18n"})}},(()=>(0,r.createElement)(g,{value:e,onChange:n})))}function b({value:e=m,label:t=p,onChange:n,disabled:a=!1}){return(0,r.createElement)(s.DropdownMenu,{className:"ai-assistant__i18n-dropdown",icon:c.Z,label:t,toggleProps:{children:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"ai-assistant__i18n-dropdown__toggle-label"},t),(0,r.createElement)(i.Z,{icon:l.Z})),disabled:a}},(({onClose:t})=>(0,r.createElement)(g,{onChange:e=>{n(e),t()},value:e})))}},50297:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(51806),a=n(55609),s=n(65736);const __=s.__,o=({image:e,inModal:t=!1,saveImage:n,setImageModal:s})=>(0,r.createElement)(a.Flex,{direction:"column"},t&&(0,r.createElement)(a.FlexItem,{style:{textAlign:"center"}},(0,r.createElement)(a.Button,{variant:"primary",onClick:()=>n(e)},__("Use this image","jetpack"))),(0,r.createElement)(a.FlexBlock,null,(0,r.createElement)("input",{type:"image",className:"wp-block-ai-image-image",src:e,alt:"",onClick:()=>s(e)})),!t&&(0,r.createElement)(a.FlexBlock,null,(0,r.createElement)(a.Flex,{direction:"column",style:{alignItems:"center"}},(0,r.createElement)(a.FlexItem,null,(0,r.createElement)(a.Button,{variant:"primary",onClick:()=>n(e)},__("Use this image","jetpack"))))))},24404:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>g});var r=n(51806),a=n(13419),s=n(55609),o=n(65736),i=n(77840);n(99196);const __=o.__,l="make-longer",c="makeLonger",u="make-shorter",d="makeShorter",p="summarize",m="summarize",h=[{name:__("Summarize","jetpack"),key:p,aiSuggestion:m},{name:__("Make longer","jetpack"),key:l,aiSuggestion:c},{name:__("Make shorter","jetpack"),key:u,aiSuggestion:d}];function g({key:e,label:t=__("Improve","jetpack"),exclude:n=[],onChange:o,disabled:l=!1}){const{tracks:c}=(0,a.z$)();return l?(0,r.createElement)(s.Tooltip,{text:t},(0,r.createElement)(s.Button,{disabled:!0},(0,r.createElement)(s.Icon,{icon:i.Z}))):(0,r.createElement)(s.ToolbarDropdownMenu,{icon:i.Z,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&c.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"improve"})}},(()=>{const a=h.filter((e=>!n.includes(e.key)));return(0,r.createElement)(s.MenuGroup,{label:t},a.map((t=>(0,r.createElement)(s.MenuItem,{key:`key-${t.key}`,onClick:()=>o(t.aiSuggestion,{contentType:"generated"}),isSelected:e===t.key},t.name))))}))}},85642:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>g});var r=n(51806),a=n(13419),s=n(55609),o=n(65736),i=n(77840),l=n(58532),c=n(586),u=n(3639),d=n(92710),p=n(32677);n(99196);const __=o.__,m=[{label:__("Post about…","jetpack"),description:{original:"Write a post about ",translated:__("Write a post about ","jetpack")}},{label:__("Informative article on…","jetpack"),description:{original:"Craft an informative article explaining ",translated:__("Craft an informative article explaining ","jetpack")}},{label:__("Step-by-step tutorial on…","jetpack"),description:{original:"Write a step-by-step tutorial on ",translated:__("Write a step-by-step tutorial on ","jetpack")}},{label:__("Motivational post on…","jetpack"),description:{original:"Create a motivational post on ",translated:__("Create a motivational post on ","jetpack")}}],h=[{label:__("Say it differently…","jetpack"),description:{original:"Rewrite it in a way that ",translated:__("Rewrite it in a way that ","jetpack")}},{label:__("Add…","jetpack"),description:{original:"Add more details about ",translated:__("Add more details about ","jetpack")}},{label:__("Remove…","jetpack"),description:{original:"Remove unnecessary details about ",translated:__("Remove unnecessary details about ","jetpack")}}];function g({hasContentBefore:e,hasContent:t,hasPostTitle:n,contentIsLoaded:o,onPromptSelect:g,onSuggestionSelect:f}){const b=__("Write with AI…","jetpack"),{tracks:v}=(0,a.z$)();return(0,r.createElement)(s.ToolbarDropdownMenu,{className:"jetpack-ai-assistant__templates-control",icon:null,label:b,text:b,onToggle:e=>{e&&v.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"write-with-ai"})}},(({onClose:a})=>o?(0,r.createElement)(s.MenuGroup,{label:__("Write…","jetpack")},h.map(((e,t)=>(0,r.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",key:`key-${t}`,onClick:()=>{a(),g(e.description)}},e.label)))):(0,r.createElement)(r.Fragment,null,e&&(0,r.createElement)(s.MenuGroup,{label:__("Based on preceding content…","jetpack")},(0,r.createElement)(s.MenuItem,{icon:l.Z,iconPosition:"left",onClick:()=>f("continue")},__("Continue writing","jetpack")),(0,r.createElement)(s.MenuItem,{icon:c.Z,iconPosition:"left",onClick:()=>f("correctSpelling")},__("Correct spelling and grammar","jetpack")),(0,r.createElement)(s.MenuItem,{icon:u.Z,iconPosition:"left",onClick:()=>f("simplify")},__("Simplify","jetpack"))),t&&(0,r.createElement)(s.MenuGroup,{label:__("Based on entire content…","jetpack")},t&&(0,r.createElement)(s.MenuItem,{icon:d.Z,iconPosition:"left",onClick:()=>f("summarize")},__("Summarize","jetpack")),t&&(0,r.createElement)(s.MenuItem,{icon:p.Z,iconPosition:"left",onClick:()=>f("generateTitle")},__("Generate a post title","jetpack"))),(0,r.createElement)(s.MenuGroup,{label:__("Write…","jetpack")},n&&(0,r.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",onClick:()=>f("titleSummary")},__("Summary based on title","jetpack")),m.map(((e,t)=>(0,r.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",key:`key-${t}`,onClick:()=>{a(),g(e.description)}},e.label)))))))}},27298:(e,t,n)=>{"use strict";n.d(t,{IP:()=>m,Nj:()=>u,ZP:()=>h,bu:()=>d});var r=n(51806),a=n(42290),s=n(13419),o=n(55609),i=n(65736),l=n(46936);n(99196);const __=i.__,c=["formal","informal","optimistic","humorous","serious","skeptical","empathetic","confident","passionate","provocative"],u="formal",d={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:"🔥"}},p=({value:e,onChange:t})=>(0,r.createElement)(o.MenuGroup,{label:__("Select tone","jetpack")},c.map((n=>(0,r.createElement)(o.MenuItem,{key:`key-${n}`,onClick:()=>t(n),isSelected:e===n},`${d[n].emoji} ${d[n].label}`))));function m({label:e=__("Change tone","jetpack"),value:t=u,onChange:n,disabled:s=!1}){return(0,r.createElement)(o.DropdownMenu,{icon:a.v_,label:e,className:"ai-assistant__tone-dropdown",popoverProps:{variant:"toolbar"},toggleProps:{children:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"ai-assistant__tone-dropdown__toggle-label"},e),(0,r.createElement)(o.Icon,{icon:l.Z})),disabled:s}},(({onClose:e})=>(0,r.createElement)(p,{value:t,onChange:t=>{n(t),e()}})))}function h({value:e=u,onChange:t,disabled:n=!1}){const i=__("Change tone","jetpack"),{tracks:l}=(0,s.z$)();return n?(0,r.createElement)(o.Tooltip,{text:i},(0,r.createElement)(o.Button,{disabled:!0},(0,r.createElement)(o.Icon,{icon:a.v_}))):(0,r.createElement)(o.ToolbarDropdownMenu,{icon:a.v_,label:i,popoverProps:{variant:"toolbar"},disabled:n,onToggle:e=>{e&&l.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"tone"})}},(()=>(0,r.createElement)(p,{value:e,onChange:t})))}},4965:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(51806),a=n(52175),s=n(55609),o=n(65736),i=n(79201),l=n(48381),c=(n(75022),n(63634)),u=n(81612),d=n(24404),p=n(85642),m=n(27298);const __=o.__,h=({contentIsLoaded:e,getSuggestionFromOpenAI:t,retryRequest:n,handleAcceptContent:o,handleImageRequest:h,handleTryAgain:g,showRetry:f,contentBefore:b,hasPostTitle:v,wholeContent:k,setUserPrompt:y,recordEvent:w,isGeneratingTitle:E})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.BlockControls,null,!f&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.ToolbarGroup,null,(0,r.createElement)(p.ZP,{hasContentBefore:!!b?.length,hasContent:!!k?.length,hasPostTitle:v,contentIsLoaded:e,onPromptSelect:e=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"prompt-template",prompt:e.original}),y(e.translated)},onSuggestionSelect:e=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:e}),t(e)}})),(0,r.createElement)(a.BlockControls,{group:"block"},(0,r.createElement)(m.ZP,{value:"neutral",onChange:n=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:c.Lg}),t(c.Lg,{tone:n,contentType:e?"generated":null})},disabled:!e&&!k?.length}),(0,r.createElement)(u.ZP,{value:"en",onChange:n=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:c.Nw}),t(c.Nw,{language:n,contentType:e?"generated":null})},disabled:!e&&!k?.length}),(0,r.createElement)(d.ZP,{onChange:t,exclude:E?["summarize"]:[],disabled:!e}))),(f||g)&&(0,r.createElement)(s.ToolbarGroup,null,!f&&e&&g&&(0,r.createElement)(s.ToolbarButton,{onClick:g},__("Try Again","jetpack")),f&&e&&(0,r.createElement)(s.ToolbarButton,{icon:i.Z,onClick:o},__("Accept","jetpack")),f&&(0,r.createElement)(s.ToolbarButton,{icon:l.Z,onClick:n},__("Retry","jetpack"))),false))},5246:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(51806),a=n(6895),s=n(13419),o=n(69307),i=n(65736),l=n(51128),c=n.n(l),u=n(99196),d=n(26546),p=n(23795),m=n(63206),h=n(18135),g=n(71449);const __=i.__,f=c()("jetpack-ai-assistant:upgrade-prompt"),b=e=>{const{upgradeType:t}=(0,h.Z)();return"vip"===t?(0,r.createElement)(d.p,{buttonText:null,checkoutUrl:null,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. Please reach out to your VIP account team.","jetpack"),{strong:(0,r.createElement)("strong",null)}),goToCheckoutPage:null,isRedirecting:null,visible:!0,align:null,title:null,context:null}):(({placement:e=null})=>{const{checkoutUrl:t,autosaveAndRedirect:n,isRedirecting:l}=(0,m.Z)(),c=(0,g.d)(),{nextTier:b,tierPlansEnabled:v,currentTier:k,requestsCount:y,usagePeriod:w}=(0,h.Z)(),E=(0,p.U_)(k)===p.dt?w?.requestsCount:y,{tracks:_}=(0,s.z$)(),C=(0,u.useCallback)((t=>{f("upgrade",e),_.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:k?.slug,requests_count:E,placement:e}),n(t)}),[n,k,E,_,e]),x=(0,u.useCallback)((()=>{f("contact us",e),_.recordEvent("jetpack_ai_upgrade_contact_us",{placement:e})}),[_,e]);if(!c)return(0,r.createElement)(d.p,{showButton:!1,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! Reach out to the site administrator to upgrade and keep using Jetpack AI.","jetpack"),{strong:(0,r.createElement)("strong",null)}),visible:!0,align:null,title:null,context:null});if(v){if(!b){const e=(0,a.Z)("jetpack-ai-tiers-more-requests-contact");return(0,r.createElement)(d.p,{buttonText:__("Contact Us","jetpack"),description:__("You have reached the request limit for your current plan.","jetpack"),className:"jetpack-ai-upgrade-banner",checkoutUrl:e,visible:!0,align:null,title:null,context:null,goToCheckoutPage:x})}return(0,r.createElement)(d.p,{buttonText:(0,i.sprintf)(/* Translators: number of requests */ +_n("You have %d auto-share remaining.","You have %d auto-shares remaining.",e,"jetpack"),e):"";return{default:"",exceeded:__("You have reached your auto-share limit. Scheduled posts will not be shared until shares become available.","jetpack"),full:__("You have reached your auto-share limit.","jetpack"),approaching:t}}(u);let p="default",m="none",h=d.default;return c>o?(p="error",m="exceeded",h=d.exceeded):c===o?(m="full",p="error",h=d.full):c>=.9*o?(m="approaching",p="error",h=d.approaching):c>=.8*o&&(m="approaching",p="warning",h=d.approaching),{status:m,noticeType:p,message:h,usedCount:l,scheduledCount:i,remainingCount:u}}),[e,t])}},45579:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(13419),a=n(86989),s=n.n(a),o=n(9818),i=n(12238),l=n(69307),c=n(65736),u=n(37568),d=n(48751);const __=c.__;function p(e){const t=e?.code,n=e?.errors?.length;if(!t&&!n)return!1;let r="";return t&&(r=__("Unable to share the Post","jetpack")),n&&(r=__("Unable to share the Post","jetpack")),{message:r,result:e}}function m(e){const{message:t}=(0,d.Z)(),{skippedConnections:n}=(0,u.Z)(),a=(0,o.useSelect)((e=>e(i.store).getCurrentPostId()),[]);e=e||a;const[c,m]=(0,l.useState)({data:[],error:{}}),h=((0,r.Pb)()?.social?.resharePath??"/wpcom/v2/posts/{postId}/publicize").replace("{postId}",e),g=(0,l.useCallback)((function(){const r={isFetching:!1,isError:!1,isSuccess:!1,data:[],error:{},postId:e};if(!c.isFetching)return m({...r,isFetching:!0}),s()({path:h,method:"POST",data:{message:t,skipped_connections:n}}).then(((e={})=>{const t=p(e);if(t)return m((e=>({...e,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:t})));m((t=>({...t,isFetching:!1,isSuccess:!0,isError:!1,data:e?.results,error:{}})))})).catch((e=>{m((t=>({...t,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:p(e)})))})),function(){m(r)}}),[e,t,n,c.isFetching,h]);return{...c,doPublicize:g}}},37568:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(9818),a=n(23177);function s(){const{refreshConnectionTestResults:e,toggleConnectionById:t}=(0,r.useDispatch)(a.h);return{...(0,r.useSelect)((e=>{const t=e(a.h),n=t.getConnections(),r=t.getEnabledConnections(),s=t.getDisabledConnections().map((e=>e.id));return{connections:n,hasConnections:n.length>0,hasEnabledConnections:r.length>0,skippedConnections:s,enabledConnections:r}}),[]),toggleById:t,refresh:e}}},48751:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(42032),a=n(71806);function s(){const{updateMeta:e,shareMessage:t}=(0,a.R)();return{message:t,maxLength:(0,r.getShareMessageMaxLength)(),updateMessage:function(t){e("jetpack_publicize_message",t)}}}},19890:(e,t,n)=>{"use strict";n.d(t,{N:()=>i});var r=n(9818),a=n(12238),s=n(23177),o=n(86419);function i(){const{mergeConnections:e}=(0,r.useDispatch)(s.h),{didPostSaveRequestSucceed:t,isCurrentPostPublished:n,getEditedPostAttribute:i}=(0,r.useSelect)((e=>e(a.store)),[]);(0,o.M1)((()=>{if(t()&&n()){const t=i("jetpack_publicize_connections");t?.length&&e(t)}}),[t,n,i])}},21052:(e,t,n)=>{"use strict";n.d(t,{Au:()=>l,Wh:()=>c,ZP:()=>u,hi:()=>i,wO:()=>o});var r=n(9818),a=n(23177),s=n(4957);const o="SET_AUTO_CONVERSION_SETTINGS";function i(){return c({isUpdating:!0})}function l(){return c({isUpdating:!1})}function c(e){return{type:o,options:e}}const u={updateAutoConversionSettings:function*(e){try{yield i(),yield c(e),yield(0,s.Fl)(e);const t=yield(0,s.wi)();return yield c(t.jetpack_social_autoconvert_images),!0}catch(e){const t=(0,r.select)(a.Eg).getAutoConversionSettings();return yield c(t),!1}finally{yield l()}},setAutoConversionSettings:c,refreshAutoConversionSettings:function*(){try{yield i();const e=yield(0,s.wi)();return yield c(e.jetpack_social_autoconvert_images),!0}catch(e){return!1}finally{yield l()}}}},23013:(e,t,n)=>{"use strict";n.r(t),n.d(t,{mergeConnections:()=>u,refreshConnectionTestResults:()=>d,setConnections:()=>l,syncConnectionsToPostMeta:()=>p,toggleConnection:()=>c,toggleConnectionById:()=>m});var r=n(13419),a=n(86989),s=n.n(a),o=n(12238),i=n(74442);function l(e){return{type:i.b,connections:e}}function c(e){return{type:i.L,connectionId:e}}function u(e){return function({dispatch:t,select:n}){const r=n.getConnections(),a=[],s={done:!1,enabled:Boolean(n.numberOfSharesRemaining()),toggleable:!0};for(const t of e){const e={...s,...r.find((e=>e.connection_id?e.connection_id===t.connection_id:e.id===t.id)),...t,is_healthy:t.test_success};a.push(e)}t(l(a))}}function d(e=!1){return async function({dispatch:t}){try{const n=(0,r.Pb)()?.social?.connectionRefreshPath||"/wpcom/v2/publicize/connection-test-results";t(u(await s()({path:n}))),e&&t(p())}catch(e){}}}function p(){return function({registry:e,select:t}){const n=t.getConnections();return e.dispatch(o.store).editPost({jetpack_publicize_connections:n})}}function m(e,t=!0){return function({dispatch:n}){n(c(e)),t&&n(p())}}},74442:(e,t,n)=>{"use strict";n.d(t,{L:()=>a,b:()=>r});const r="SET_CONNECTIONS",a="TOGGLE_CONNECTION"},54725:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(21052),a=n(23013),s=n(371),o=n(72438),i=n(4462);const l={...s.ZP,...i.ZP,...r.ZP,...o.Z,...a}},371:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>l,dz:()=>o,ff:()=>i});var r=n(9818),a=n(23177),s=n(4957);const o="SET_JETPACK_SETTINGS";function i(e){return{type:o,options:e}}const l={updateJetpackSettings:function*(e){try{yield i({is_updating:!0}),yield i(e),yield(0,s.RF)(e);const t=yield(0,s.es)();return yield i(t),!0}catch(e){const t=(0,r.select)(a.Eg).getJetpackSettings();return yield i(t),!1}finally{yield i({is_updating:!1})}},setJetpackSettings:i}},72438:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(4957),a=n(21052),s=n(4462);const o={refreshJetpackSocialSettings:function*(){try{yield(0,a.hi)(),yield(0,s.ds)();const e=yield(0,r.mu)();return yield(0,a.Wh)(e.jetpack_social_autoconvert_images),yield(0,s.ch)(e.jetpack_social_image_generator_settings),!0}catch(e){return!1}finally{yield(0,a.Au)(),yield(0,s.Gr)()}}}},4462:(e,t,n)=>{"use strict";n.d(t,{Gr:()=>l,ZP:()=>u,ch:()=>c,ds:()=>i,kg:()=>o});var r=n(9818),a=n(23177),s=n(4957);const o="SET_SOCIAL_IMAGE_GENERATOR_SETTINGS";function i(){return c({isUpdating:!0})}function l(){return c({isUpdating:!1})}function c(e){return{type:o,options:e}}const u={updateSocialImageGeneratorSettings:function*(e){try{yield i(),yield c(e),yield(0,s.Ux)(e);const t=yield(0,s.oB)();return yield c(t.jetpack_social_image_generator_settings),!0}catch(e){const t=(0,r.select)(a.Eg).getSocialImageGeneratorSettings();return yield c(t),!1}finally{yield l()}},setSocialImageGeneratorSettings:c,refreshSocialImageGeneratorSettings:function*(){try{yield i();const e=yield(0,s.oB)();return yield c(e.jetpack_social_image_generator_settings),!0}catch(e){return!1}finally{yield l()}}}},4957:(e,t,n)=>{"use strict";n.d(t,{Fl:()=>v,RF:()=>m,Ux:()=>g,ZP:()=>k,es:()=>p,mu:()=>b,oB:()=>h,wi:()=>f});var r=n(86989),a=n.n(r);const s="FETCH_JETPACK_SETTINGS",o="UPDATE_JETPACK_SETTINGS",i="FETCH_SOCIAL_IMAGE_GENERATOR_SETTINGS",l="UPDATE_SOCIAL_IMAGE_GENERATOR_SETTINGS",c="FETCH_AUTO_CONVERSION_SETTINGS",u="UPDATE_AUTO_CONVERSION_SETTINGS",d="FETCH_JETPACK_SOCIAL_SETTINGS",p=()=>({type:s}),m=e=>({type:o,settings:e}),h=()=>({type:i}),g=e=>({type:l,settings:e}),f=()=>({type:c}),b=()=>({type:d}),v=e=>({type:u,settings:e}),k={[s]:function(){return a()({path:"/jetpack/v4/social/settings"})},[o]:function(e){return a()({path:"/jetpack/v4/social/settings",method:"POST",data:e.settings})},[i]:function(){return a()({path:"/wp/v2/settings?_fields=jetpack_social_image_generator_settings"})},[l]:function(e){return a()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_image_generator_settings:e.settings}})},[c]:function(){return a()({path:"/wp/v2/settings?_fields=jetpack_social_autoconvert_images"})},[u]:function(e){return a()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_autoconvert_images:e.settings}})},[d]:function(){return a()({path:"/wp/v2/settings?_fields=jetpack_social_autoconvert_images,jetpack_social_image_generator_settings"})}}},23177:(e,t,n)=>{"use strict";n.d(t,{Bb:()=>f,Cd:()=>g,Eg:()=>c,M$:()=>p,cs:()=>h,h:()=>v,qk:()=>m,uJ:()=>d,wV:()=>b});var r=n(9818),a=n(54725),s=n(4957),o=n(45272),i=n(15781),l=n(22987);const c="jetpack-social-plugin",u={reducer:o.Z,actions:a.Z,selectors:l.Z,resolvers:i.ZP,controls:s.ZP,initialState:window?.jetpackSocialInitialState||window?.Initial_State?.socialInitialState||window?.Jetpack_Editor_Initial_State?.social||{}},d="facebook",p="instagram-business",m="linkedin",h="mastodon",g="nextdoor",f="tumblr",b="twitter",v=(0,r.createReduxStore)(c,u);(0,r.register)(v)},20750:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(21052);const a=(e={},t)=>t.type===r.wO?{...e,...t.options}:e},71837:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74442);const a=(e={},t)=>{switch(t.type){case r.b:return{...e,connections:t.connections};case r.L:return{...e,connections:e.connections.map((e=>(e.connection_id?e.connection_id===t.connectionId:e.id===t.connectionId)?{...e,enabled:!e.enabled}:e))}}return e}},45272:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(9818),a=n(20750),s=n(71837),o=n(80697),i=n(35652),l=n(28696),c=n(54489);const u=(0,r.combineReducers)({sharesData:i.Z,siteData:l.Z,connectionData:s.Z,jetpackSettings:o.Z,socialImageGeneratorSettings:c.Z,autoConversionSettings:a.Z,hasPaidPlan:(e=!1)=>e})},80697:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(371);const a=(e={},t)=>t.type===r.dz?{...e,...t.options}:e},35652:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(e={})=>e},28696:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(e={})=>e},54489:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(4462);const a=(e={},t)=>t.type===r.kg?{...e,...t.options}:e},15781:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>c});var r=n(12238),a=n(21052),s=n(23013),o=n(371),i=n(4462),l=n(4957);const c={getJetpackSettings:function*(){try{const e=yield(0,l.es)();if(e)return(0,o.ff)(e)}catch(e){console.log(e)}},getSocialImageGeneratorSettings:function*(){try{const e=yield(0,l.oB)();if(e)return(0,i.ch)(e.jetpack_social_image_generator_settings)}catch(e){console.log(e)}},getAutoConversionSettings:function*(){try{const e=yield(0,l.wi)();if(e)return(0,a.Wh)(e.jetpack_social_autoconvert_images)}catch(e){console.log(e)}},getConnections:function(){return function({dispatch:e,registry:t}){const n=t.select(r.store).getEditedPostAttribute("jetpack_publicize_connections");e((0,s.setConnections)(n||[]))}}}},68113:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getAutoConversionSettings:e=>e.autoConversionSettings,isAutoConversionAvailable:e=>e.autoConversionSettings.available,isAutoConversionEnabled:e=>e.autoConversionSettings.available&&e.autoConversionSettings.enabled,isAutoConversionSettingsUpdating:e=>e.autoConversionSettings.isUpdating}},43354:(e,t,n)=>{"use strict";function r(e){return e.connectionData?.connections??[]}function a(e){return e.connectionData?.adminUrl??null}function s(e){return r(e).length>0}function o(e){return r(e).filter((e=>!1===e.test_success))}function i(e){return r(e).filter((e=>"must_reauth"===e.test_success)).map((e=>e.service_name))}function l(e){return r(e).filter((e=>e.enabled))}function c(e){return r(e).filter((e=>!e.enabled))}function u(e,t,{forceDefaults:n=!1}={}){let a="",s="",o="";if(!n){const n=r(e).find((({service_name:e})=>t===e));if(n){const{display_name:e,profile_display_name:r,profile_picture:i}=n;a="twitter"===t?r:e,o="twitter"===t?e:n.username,s=i}}return{displayName:a,profileImage:s,username:o}}n.r(t),n.d(t,{getConnectionProfileDetails:()=>u,getConnections:()=>r,getConnectionsAdminUrl:()=>a,getDisabledConnections:()=>c,getEnabledConnections:()=>l,getFailedConnections:()=>o,getMustReauthConnections:()=>i,hasConnections:()=>s})},22987:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(68113),a=n(43354),s=n(82836),o=n(31473),i=n(85675),l=n(45073);const c={...i.Z,...a,...s.Z,...o,...l.Z,...r.Z}},82836:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getJetpackSettings:e=>e.jetpackSettings,isModuleEnabled:e=>e.jetpackSettings.publicize_active,showPricingPage:e=>e.jetpackSettings.show_pricing_page,isUpdatingJetpackSettings:e=>e.jetpackSettings.is_updating,hasPaidPlan:e=>!(e.jetpackSettings?.showNudge??1),isEnhancedPublishingEnabled:e=>e.jetpackSettings?.isEnhancedPublishingEnabled??!1,getDismissedNotices:e=>e.jetpackSettings?.dismissedNotices}},31473:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getScheduledSharesCount:()=>l,getShareLimit:()=>o,getSharedPostsCount:()=>u,getSharesUsedCount:()=>i,getTotalSharesCount:()=>c,isShareLimitEnabled:()=>a,numberOfSharesRemaining:()=>p,shouldShowAdvancedPlanNudge:()=>d,showShareLimits:()=>s});var r=n(82836);function a(e){return e.sharesData?.is_share_limit_enabled??!1}function s(e){return!r.Z.hasPaidPlan(e)&&!e.hasPaidPlan&&a(e)}function o(e){return e.sharesData?.share_limit??30}function i(e){return e.sharesData?.publicized_count??0}function l(e){return e.sharesData?.to_be_publicized_count??0}function c(e){const t=i(e)+l(e);return Math.max(t,0)}function u(e){return e.sharesData?.shared_posts_count??0}function d(e){return e.sharesData?.show_advanced_plan_upgrade_nudge??!1}function p(e,t={}){if(!s(e))return 1/0;const{includeScheduled:n}={includeScheduled:!0,...t},r=i(e),a=o(e),c=n?l(e):0;return Math.max(a-r-c,0)}},85675:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getAdminUrl:e=>e.siteData?.adminUrl??null,getAPIRootUrl:e=>e.siteData?.apiRoot??null,getAPINonce:e=>e.siteData?.apiNonce??null,getRegistrationNonce:e=>e.siteData?.registrationNonce??null,getSiteSuffix:e=>e.siteData?.siteSuffix??null,getPluginVersion:e=>e.siteData?.pluginVersion??null}},45073:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getSocialImageGeneratorSettings:e=>e.socialImageGeneratorSettings,isSocialImageGeneratorAvailable:e=>e.socialImageGeneratorSettings.available,isSocialImageGeneratorEnabled:e=>e.socialImageGeneratorSettings.enabled,isUpdatingSocialImageGeneratorSettings:e=>e.socialImageGeneratorSettings.isUpdating,getSocialImageGeneratorDefaultTemplate:e=>e.socialImageGeneratorSettings.template}},5463:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r=255;function a(){return r}},12677:(e,t,n)=>{"use strict";n.d(t,{h:()=>a});var r=n(13419);function a(){return(0,r.Pb)()?.social?.supportedAdditionalConnections||[]}},42032:(e,t,n)=>{"use strict";n.d(t,{getShareMessageMaxLength:()=>r.A,getSupportedAdditionalConnections:()=>a.h});var r=n(5463),a=n(12677),s=n(581);n.o(s,"useSyncPostDataToStore")&&n.d(t,{useSyncPostDataToStore:function(){return s.useSyncPostDataToStore}})},581:()=>{},13419:(e,t,n)=>{"use strict";n.d(t,{Dp:()=>u.Z,FK:()=>c.FK,HD:()=>c.HD,M6:()=>s.M6,OZ:()=>o.Z,Pb:()=>r.Z,Pm:()=>m.Z,Qq:()=>c.Qq,Rl:()=>c.Rl,T:()=>l.Z,Ug:()=>s.Ug,Wp:()=>s.Wp,X1:()=>c.X1,_D:()=>c._D,aQ:()=>s.aQ,dM:()=>h.d,el:()=>p.Z,lQ:()=>a.Z,lt:()=>h.l,m3:()=>c.m3,o_:()=>i.Z,og:()=>g.Z,z$:()=>d.Z});var r=n(50148),a=n(35004),s=n(99505),o=n(48052),i=n(76714),l=n(80354),c=n(75404),u=n(68586),d=n(61053),p=n(11380),m=n(6342),h=n(96959),g=n(19499);n(39058)},6342:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(78868),a=n(99196),s=n.n(a);const o=()=>s().createElement(r.Z,{className:"jetpack-editor-panel-logo",height:16,logoColor:"#1E1E1E",showText:!1})},96959:(e,t,n)=>{"use strict";n.d(t,{d:()=>s,l:()=>o});var r=n(69307),a=n(12953);function s(e){const t={};let n="span",a=e.icon;const s=document.createElement("div");s.innerHTML=e.icon;const o=s.querySelector("svg");return o&&(n="svg",a=o.innerHTML,Array.from(o.attributes).forEach((({nodeName:e,nodeValue:n})=>t[e]=n))),(0,r.createElement)(n,{...t,dangerouslySetInnerHTML:{__html:a||""}})}function o(e){return{src:s(e),foreground:(0,a.Z)()}}},12953:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(99505);const a="#069e08";function s(){return(0,r.Ug)()||(0,r.Wp)()?null:a}},19499:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(50148);function a(){const e=(0,r.Z)();return e?.blocks_variation??"production"}},50148:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r="Jetpack_Editor_Initial_State";function a(){return"object"==typeof window?window?.[r]??null:null}},48052:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(50148);function a(e){const t=(0,r.Z)(),n=t?.available_blocks?.[e]?.available??!1,a=t?.available_blocks?.[e]?.unavailable_reason??"unknown";return{available:n,...!n&&{details:t?.available_blocks?.[e]?.details??[],unavailableReason:a}}}},35004:(e,t,n)=>{"use strict";function r(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:null}n.d(t,{Z:()=>r})},61053:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(6975),a=n(31294),s=n(69307);const{tracks:o}=r.Z,{recordEvent:i}=o,l=({pageViewEventName:e=null,pageViewNamespace:t="jetpack",pageViewSuffix:n="page_view",pageViewEventProperties:l={}}={})=>{const[c,u]=(0,s.useState)(!1),{isUserConnected:d,isRegistered:p,userConnectionData:m={}}=(0,a.Z)(),{wpcomUser:{login:h,ID:g}={},blogId:f}=m.currentUser||{},b=(0,s.useCallback)((async(e,t={})=>{d&&g&&h&&i(e,t)}),[d,g,h]);return(0,s.useEffect)((()=>{d&&g&&h&&f&&r.Z.initialize(g,h,{blog_id:f})}),[f,g,h,d]),(0,s.useEffect)((()=>{const r=e?`${t}_${e}_${n}`:null;p&&r&&(c||(b(r,l),u(!0)))}),[c,t,e,n,p,l,b]),{recordEvent:b,tracks:o}}},11380:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9818),a=n(69307),s=n(39058);const o=e=>{const{isModuleActive:t,isChangingStatus:n,isLoadingModules:o}=(0,r.useSelect)((t=>{const n=t(s.p);return{isModuleActive:n.isModuleActive(e),isChangingStatus:n.isModuleUpdating(e),isLoadingModules:n.areModulesLoading(e)}}),[s.p]),{updateJetpackModuleStatus:i}=(0,r.useDispatch)(s.p),l=(0,a.useCallback)((t=>i({name:e,active:t})),[e,i]);return(0,a.useMemo)((()=>({isLoadingModules:o,isChangingStatus:n,isModuleActive:t,changeStatus:l})),[o,n,t,l])}},68586:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(50148);function a(){return(0,r.Z)()?.jetpack?.is_current_user_connected??!1}},44166:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>p,rW:()=>d});var r=n(9818),a=n(99505),s=n(82162),o=n(39058);const i="SET_JETPACK_MODULES",l="SET_MODULE_UPDATING";function c(e){return d({isLoading:e})}function u(e,t){return{type:l,name:e,isUpdating:t}}function d(e){return{type:i,options:e}}const p={updateJetpackModuleStatus:function*(e){try{yield u(e.name,!0),yield(0,s.zL)(e);const t=yield(0,s.Bs)();return yield d({data:t}),!0}catch(e){const t=(0,r.select)(o.p).getJetpackModules();return yield d(t),!1}finally{yield u(e.name,!1)}},setJetpackModules:d,fetchModules:function*(){if((0,a.Wp)())return!0;try{yield c(!0);const e=yield(0,s.Bs)();return yield d({data:e}),!0}catch(e){const t=(0,r.select)(o.p).getJetpackModules();return yield d(t),!1}finally{yield c(!1)}}}},82162:(e,t,n)=>{"use strict";n.d(t,{Bs:()=>i,ZP:()=>c,zL:()=>l});var r=n(86989),a=n.n(r);const s="FETCH_JETPACK_MODULES",o="UPDATE_JETPACK_MODULE_STATUS",i=()=>({type:s}),l=e=>({type:o,settings:e}),c={[s]:function(){return a()({path:"/jetpack/v4/module/all",method:"GET"})},[o]:function({settings:e}){return a()({path:`/jetpack/v4/module/${e.name}/active`,method:"POST",data:{active:e.active}})}}},39058:(e,t,n)=>{"use strict";n.d(t,{p:()=>c});var r=n(9818),a=n(44166),s=n(82162),o=n(42469),i=n(55133),l=n(43524);const c="jetpack-modules",u=(0,r.createReduxStore)(c,{reducer:o.Z,actions:a.ZP,controls:s.ZP,resolvers:i.Z,selectors:l.Z});(0,r.register)(u);const d=window?.Initial_State?.getModules||window?.Jetpack_Editor_Initial_State?.modules||null;null!==d&&(0,r.dispatch)(c).setJetpackModules({data:{...d}})},42469:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r={isLoading:!1,isUpdating:{},data:{}},a=(e=r,t)=>{switch(t.type){case"SET_JETPACK_MODULES":return{...e,...t.options};case"SET_MODULE_UPDATING":return{...e,isUpdating:{...e.isUpdating,[t.name]:t.isUpdating}}}return e}},55133:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(44166),a=n(82162);const s={getJetpackModules:function*(){try{const e=yield(0,a.Bs)();if(e)return(0,r.rW)({data:e})}catch(e){console.error(e)}}}},43524:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(99505);const a={getJetpackModules:e=>e.data,isModuleActive:(e,t)=>(0,r.Wp)()||(e?.data?.[t]?.activated??!1),areModulesLoading:e=>e.isLoading??!1,isModuleUpdating:(e,t)=>e?.isUpdating?.[t]??!1}},75404:(e,t,n)=>{"use strict";n.d(t,{FK:()=>g,HD:()=>f,Qq:()=>u,Rl:()=>m,X1:()=>d,_D:()=>p,m3:()=>b});var r=n(65736),a=n(96483),s=n(92819),o=n(50148),i=n(48052),l=n(35004),c=n(99505);const __=r.__;function u({planSlug:e,plan:t,postId:n,postType:r}){const o=(0,s.startsWith)(e,"jetpack_")?e:(0,s.get)(t,["path_slug"]),i=(void 0===r?()=>{const e=new URLSearchParams(window.location.search);return(0,a.addQueryArgs)(window.location.protocol+`//${(0,l.Z)().replace("::","/")}/wp-admin/site-editor.php`,{postId:e.get("postId"),postType:e.get("postType"),plan_upgraded:1})}:()=>{const e=["page","post"].includes(r)?"":"edit";return(0,c.Wp)()?(0,a.addQueryArgs)("/"+(0,s.compact)([e,r,(0,l.Z)(),n]).join("/"),{plan_upgraded:1}):(0,a.addQueryArgs)(window.location.protocol+`//${(0,l.Z)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:n,plan_upgraded:1})})();return(0,c.Ug)()?(0,a.addQueryArgs)(`https://wordpress.com/plans/${(0,l.Z)()}`,{redirect_to:i,customerType:"business"}):o&&(0,a.addQueryArgs)(`https://wordpress.com/checkout/${(0,l.Z)()}/${o}`,{redirect_to:i})}function d(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{available:n,unavailableReason:r}=(0,i.Z)(t);return!n&&"missing_plan"===r}function p(e,t){return"missing_plan"===e&&t.required_plan}function m(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{details:n,unavailableReason:r}=(0,i.Z)(t);return p(r,n)}const h=[{name:"core/cover",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"video",description:__("Upgrade your plan to use video covers","jetpack")},{name:"core/audio",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"audio",description:__("Upgrade your plan to upload audio","jetpack")}];function g(){return(0,s.get)((0,o.Z)(),"jetpack.enable_upgrade_nudge",!1)}const f=e=>(0,s.map)(h,"name").includes(e),b=e=>(0,s.head)((0,s.filter)(h,(({name:t})=>t===e)))},76714:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(98817),a=n(48052);function s(e,t){const{available:n,unavailableReason:s}=(0,a.Z)(e);return!!n&&(0,r.registerPlugin)(`jetpack-${e}`,t)}},99505:(e,t,n)=>{"use strict";n.d(t,{M6:()=>i,Ug:()=>o,Wp:()=>s,aQ:()=>l});var r=n(50148);function a(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function s(){return"simple"===a()}function o(){return"atomic"===a()}function i(){const e=(0,r.Z)();return e?.jetpack?.is_private_site??!1}function l(){const e=(0,r.Z)();return e?.jetpack?.is_coming_soon??!1}},80354:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(82674),a=n.n(r),s=n(94333);const o=e=>(0,s.createHigherOrderComponent)((t=>n=>React.createElement(t,a()({},n,{className:n.name===e?"has-warning is-interactive":n.className}))),"withHasWarningIsInteractiveClassNames")},83059:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>S});var r=n(51806),a=n(42290),s=n(13419),o=n(4981),i=n(55609),l=n(9818),c=n(69307),u=n(65736),d=n(586),p=n(3639),m=n(92710),h=n(58532),g=n(51128),f=n.n(g),b=(n(99196),n(49259)),v=n(63634),k=n(854),y=n(6747),w=n(81612),E=n(27298);const __=u.__,_=f()("jetpack-ai-assistant:dropdown"),C=[{name:__("Correct spelling and grammar","jetpack"),key:"correct-spelling",aiSuggestion:v.Hd,icon:d.Z},{name:__("Simplify","jetpack"),key:"simplify",aiSuggestion:v.hI,icon:p.Z},{name:__("Summarize","jetpack"),key:"summarize",aiSuggestion:v.Lq,icon:m.Z},{name:__("Expand","jetpack"),key:"make-longer",aiSuggestion:v.TV,icon:h.Z}];function x(e){return e.filter((e=>null!=e)).map((e=>(0,o.getBlockContent)(e))).join("\n\n")}function j({onClose:e,blockType:t}){const[n,o]=(0,c.useState)(!1),{getSelectedBlockClientIds:u,getBlocksByClientId:d}=(0,l.useSelect)("core/block-editor"),{removeBlocks:p,replaceBlock:m}=(0,l.useDispatch)("core/block-editor");(0,c.useEffect)((()=>{const e=u(),t=x(d(e)),n=(0,k.t$)(t);return o(!n.length)}),[d,u]);const{tracks:h}=(0,s.z$)(),g=(n,r={})=>{const a=u(),s=d(a),o=x(s);e(),_("requestSuggestion",n,r),h.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:n,block_type:t});const[i]=s,[l,...c]=a,g={...i?.attributes||{},content:o},f=(0,y.b)(t,g),v={clientId:l,type:n,options:{...r,contentType:"generated",fromExtension:!0}};localStorage.setItem((0,b.$M)(f.clientId),JSON.stringify(v)),m(l,f),p(c)};return(0,r.createElement)(r.Fragment,null,n&&(0,r.createElement)(i.Notice,{status:"warning",isDismissible:!1,className:"jetpack-ai-assistant__info"},__("Add content to activate the tools below","jetpack")),(0,r.createElement)(i.MenuGroup,null,(0,r.createElement)(i.MenuItem,{icon:a.u_,iconPosition:"left",key:"key-ai-assistant",onClick:()=>{const e=u(),n=d(e),r=x(n),[a,...s]=e,[o]=n,i={...o?.attributes||{},content:r};m(a,(0,y.b)(t,i)),p(s),h.recordEvent("jetpack_ai_assistant_prompt_show",{block_type:t})},disabled:n},(0,r.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},__("Ask AI Assistant","jetpack"))),C.map((e=>(0,r.createElement)(i.MenuItem,{icon:e?.icon,iconPosition:"left",key:`key-${e.key}`,onClick:()=>{g(e.aiSuggestion,{})},disabled:n},(0,r.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},e.name)))),(0,r.createElement)(E.IP,{onChange:e=>{g(v.Lg,{tone:e})},disabled:n}),(0,r.createElement)(w.xK,{onChange:e=>{g(v.Nw,{language:e})},disabled:n})))}function S({blockType:e}){const{tracks:t}=(0,s.z$)();return(0,r.createElement)(i.Dropdown,{popoverProps:{variant:"toolbar"},renderToggle:({isOpen:e,onToggle:t})=>(0,r.createElement)(i.ToolbarButton,{className:"jetpack-ai-assistant__button",showTooltip:!0,onClick:t,"aria-haspopup":"true","aria-expanded":e,label:__("AI Assistant","jetpack"),icon:a.u_}),onToggle:n=>{n&&t.recordEvent("jetpack_ai_assistant_extension_toolbar_menu_show",{block_type:e})},renderContent:({onClose:t})=>(0,r.createElement)(j,{onClose:t,blockType:e})})}},3180:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(65736),s=n(26546),o=n(46867);const __=a.__,i=()=>{const e=`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/connection`,{autosaveAndRedirect:t,isRedirecting:n}=(0,o.Z)(e);return(0,r.createElement)(s.p,{buttonText:__("Reconnect Jetpack","jetpack"),checkoutUrl:e,className:"jetpack-ai-connect-banner",description:__("Your account is not connected to Jetpack at the moment.","jetpack"),goToCheckoutPage:e=>{t(e)},isRedirecting:n,visible:!0,align:null,title:null,context:null})}},87445:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(6895),s=n(55609),o=n(65736);const __=o.__;const i=function(){const e=(0,a.Z)("jetpack-ai-feedback");return(0,r.createElement)("div",{className:"jetpack-ai-feedback-control"},(0,r.createElement)(s.BaseControl,{label:__("Feedback","jetpack")},(0,r.createElement)("p",null,__("Your feedback is valuable in our commitment to refine and improve this feature.","jetpack")),(0,r.createElement)(s.ExternalLink,{href:e},__("Share your feedback","jetpack"))))}},81612:(e,t,n)=>{"use strict";n.d(t,{QA:()=>h,ZP:()=>f,xK:()=>b});var r=n(51806),a=n(13419),s=n(55609),o=n(65736),i=n(61074),l=n(46936),c=n(43618);n(99196);const __=o.__,u=["en","es","fr","de","it","pt","ru","zh","ja","ar","hi","ko"],d=window?.Jetpack_Editor_Initial_State?.siteLocale||navigator?.language,p=__("Translate","jetpack"),m=d?.split("-")[0]||"en",h=(d?.split("-"),{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")},id:{label:__("Indonesian","jetpack")},tl:{label:__("Filipino","jetpack")},vi:{label:__("Vietnamese","jetpack")}}),g=({value:e,onChange:t})=>{const n=[...u.filter((e=>e!==m))];return u.includes(m)&&n.unshift(m),(0,r.createElement)(s.MenuGroup,{label:__("Select language","jetpack")},n.map((n=>(0,r.createElement)(s.MenuItem,{key:`key-${n}`,onClick:()=>t(n+" ("+h[n].label+")"),isSelected:e===n},h[n].label))))};function f({value:e=m,label:t=p,onChange:n,disabled:o=!1}){const{tracks:l}=(0,a.z$)();return o?(0,r.createElement)(s.Tooltip,{text:t},(0,r.createElement)(s.Button,{disabled:!0},(0,r.createElement)(i.Z,{icon:c.Z}))):(0,r.createElement)(s.ToolbarDropdownMenu,{icon:c.Z,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&l.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"i18n"})}},(()=>(0,r.createElement)(g,{value:e,onChange:n})))}function b({value:e=m,label:t=p,onChange:n,disabled:a=!1}){return(0,r.createElement)(s.DropdownMenu,{className:"ai-assistant__i18n-dropdown",icon:c.Z,label:t,toggleProps:{children:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"ai-assistant__i18n-dropdown__toggle-label"},t),(0,r.createElement)(i.Z,{icon:l.Z})),disabled:a}},(({onClose:t})=>(0,r.createElement)(g,{onChange:e=>{n(e),t()},value:e})))}},50297:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(51806),a=n(55609),s=n(65736);const __=s.__,o=({image:e,inModal:t=!1,saveImage:n,setImageModal:s})=>(0,r.createElement)(a.Flex,{direction:"column"},t&&(0,r.createElement)(a.FlexItem,{style:{textAlign:"center"}},(0,r.createElement)(a.Button,{variant:"primary",onClick:()=>n(e)},__("Use this image","jetpack"))),(0,r.createElement)(a.FlexBlock,null,(0,r.createElement)("input",{type:"image",className:"wp-block-ai-image-image",src:e,alt:"",onClick:()=>s(e)})),!t&&(0,r.createElement)(a.FlexBlock,null,(0,r.createElement)(a.Flex,{direction:"column",style:{alignItems:"center"}},(0,r.createElement)(a.FlexItem,null,(0,r.createElement)(a.Button,{variant:"primary",onClick:()=>n(e)},__("Use this image","jetpack"))))))},24404:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>g});var r=n(51806),a=n(13419),s=n(55609),o=n(65736),i=n(77840);n(99196);const __=o.__,l="make-longer",c="makeLonger",u="make-shorter",d="makeShorter",p="summarize",m="summarize",h=[{name:__("Summarize","jetpack"),key:p,aiSuggestion:m},{name:__("Make longer","jetpack"),key:l,aiSuggestion:c},{name:__("Make shorter","jetpack"),key:u,aiSuggestion:d}];function g({key:e,label:t=__("Improve","jetpack"),exclude:n=[],onChange:o,disabled:l=!1}){const{tracks:c}=(0,a.z$)();return l?(0,r.createElement)(s.Tooltip,{text:t},(0,r.createElement)(s.Button,{disabled:!0},(0,r.createElement)(s.Icon,{icon:i.Z}))):(0,r.createElement)(s.ToolbarDropdownMenu,{icon:i.Z,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&c.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"improve"})}},(()=>{const a=h.filter((e=>!n.includes(e.key)));return(0,r.createElement)(s.MenuGroup,{label:t},a.map((t=>(0,r.createElement)(s.MenuItem,{key:`key-${t.key}`,onClick:()=>o(t.aiSuggestion,{contentType:"generated"}),isSelected:e===t.key},t.name))))}))}},85642:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>g});var r=n(51806),a=n(13419),s=n(55609),o=n(65736),i=n(77840),l=n(58532),c=n(586),u=n(3639),d=n(92710),p=n(32677);n(99196);const __=o.__,m=[{label:__("Post about…","jetpack"),description:{original:"Write a post about ",translated:__("Write a post about ","jetpack")}},{label:__("Informative article on…","jetpack"),description:{original:"Craft an informative article explaining ",translated:__("Craft an informative article explaining ","jetpack")}},{label:__("Step-by-step tutorial on…","jetpack"),description:{original:"Write a step-by-step tutorial on ",translated:__("Write a step-by-step tutorial on ","jetpack")}},{label:__("Motivational post on…","jetpack"),description:{original:"Create a motivational post on ",translated:__("Create a motivational post on ","jetpack")}}],h=[{label:__("Say it differently…","jetpack"),description:{original:"Rewrite it in a way that ",translated:__("Rewrite it in a way that ","jetpack")}},{label:__("Add…","jetpack"),description:{original:"Add more details about ",translated:__("Add more details about ","jetpack")}},{label:__("Remove…","jetpack"),description:{original:"Remove unnecessary details about ",translated:__("Remove unnecessary details about ","jetpack")}}];function g({hasContentBefore:e,hasContent:t,hasPostTitle:n,contentIsLoaded:o,onPromptSelect:g,onSuggestionSelect:f}){const b=__("Write with AI…","jetpack"),{tracks:v}=(0,a.z$)();return(0,r.createElement)(s.ToolbarDropdownMenu,{className:"jetpack-ai-assistant__templates-control",icon:null,label:b,text:b,onToggle:e=>{e&&v.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"write-with-ai"})}},(({onClose:a})=>o?(0,r.createElement)(s.MenuGroup,{label:__("Write…","jetpack")},h.map(((e,t)=>(0,r.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",key:`key-${t}`,onClick:()=>{a(),g(e.description)}},e.label)))):(0,r.createElement)(r.Fragment,null,e&&(0,r.createElement)(s.MenuGroup,{label:__("Based on preceding content…","jetpack")},(0,r.createElement)(s.MenuItem,{icon:l.Z,iconPosition:"left",onClick:()=>f("continue")},__("Continue writing","jetpack")),(0,r.createElement)(s.MenuItem,{icon:c.Z,iconPosition:"left",onClick:()=>f("correctSpelling")},__("Correct spelling and grammar","jetpack")),(0,r.createElement)(s.MenuItem,{icon:u.Z,iconPosition:"left",onClick:()=>f("simplify")},__("Simplify","jetpack"))),t&&(0,r.createElement)(s.MenuGroup,{label:__("Based on entire content…","jetpack")},t&&(0,r.createElement)(s.MenuItem,{icon:d.Z,iconPosition:"left",onClick:()=>f("summarize")},__("Summarize","jetpack")),t&&(0,r.createElement)(s.MenuItem,{icon:p.Z,iconPosition:"left",onClick:()=>f("generateTitle")},__("Generate a post title","jetpack"))),(0,r.createElement)(s.MenuGroup,{label:__("Write…","jetpack")},n&&(0,r.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",onClick:()=>f("titleSummary")},__("Summary based on title","jetpack")),m.map(((e,t)=>(0,r.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",key:`key-${t}`,onClick:()=>{a(),g(e.description)}},e.label)))))))}},27298:(e,t,n)=>{"use strict";n.d(t,{IP:()=>m,Nj:()=>u,ZP:()=>h,bu:()=>d});var r=n(51806),a=n(42290),s=n(13419),o=n(55609),i=n(65736),l=n(46936);n(99196);const __=i.__,c=["formal","informal","optimistic","humorous","serious","skeptical","empathetic","confident","passionate","provocative"],u="formal",d={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:"🔥"}},p=({value:e,onChange:t})=>(0,r.createElement)(o.MenuGroup,{label:__("Select tone","jetpack")},c.map((n=>(0,r.createElement)(o.MenuItem,{key:`key-${n}`,onClick:()=>t(n),isSelected:e===n},`${d[n].emoji} ${d[n].label}`))));function m({label:e=__("Change tone","jetpack"),value:t=u,onChange:n,disabled:s=!1}){return(0,r.createElement)(o.DropdownMenu,{icon:a.v_,label:e,className:"ai-assistant__tone-dropdown",popoverProps:{variant:"toolbar"},toggleProps:{children:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"ai-assistant__tone-dropdown__toggle-label"},e),(0,r.createElement)(o.Icon,{icon:l.Z})),disabled:s}},(({onClose:e})=>(0,r.createElement)(p,{value:t,onChange:t=>{n(t),e()}})))}function h({value:e=u,onChange:t,disabled:n=!1}){const i=__("Change tone","jetpack"),{tracks:l}=(0,s.z$)();return n?(0,r.createElement)(o.Tooltip,{text:i},(0,r.createElement)(o.Button,{disabled:!0},(0,r.createElement)(o.Icon,{icon:a.v_}))):(0,r.createElement)(o.ToolbarDropdownMenu,{icon:a.v_,label:i,popoverProps:{variant:"toolbar"},disabled:n,onToggle:e=>{e&&l.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"tone"})}},(()=>(0,r.createElement)(p,{value:e,onChange:t})))}},4965:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(51806),a=n(52175),s=n(55609),o=n(65736),i=n(79201),l=n(48381),c=(n(75022),n(63634)),u=n(81612),d=n(24404),p=n(85642),m=n(27298);const __=o.__,h=({contentIsLoaded:e,getSuggestionFromOpenAI:t,retryRequest:n,handleAcceptContent:o,handleImageRequest:h,handleTryAgain:g,showRetry:f,contentBefore:b,hasPostTitle:v,wholeContent:k,setUserPrompt:y,recordEvent:w,isGeneratingTitle:E})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.BlockControls,null,!f&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.ToolbarGroup,null,(0,r.createElement)(p.ZP,{hasContentBefore:!!b?.length,hasContent:!!k?.length,hasPostTitle:v,contentIsLoaded:e,onPromptSelect:e=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"prompt-template",prompt:e.original}),y(e.translated)},onSuggestionSelect:e=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:e}),t(e)}})),(0,r.createElement)(a.BlockControls,{group:"block"},(0,r.createElement)(m.ZP,{value:"neutral",onChange:n=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:c.Lg}),t(c.Lg,{tone:n,contentType:e?"generated":null})},disabled:!e&&!k?.length}),(0,r.createElement)(u.ZP,{value:"en",onChange:n=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:c.Nw}),t(c.Nw,{language:n,contentType:e?"generated":null})},disabled:!e&&!k?.length}),(0,r.createElement)(d.ZP,{onChange:t,exclude:E?["summarize"]:[],disabled:!e}))),(f||g)&&(0,r.createElement)(s.ToolbarGroup,null,!f&&e&&g&&(0,r.createElement)(s.ToolbarButton,{onClick:g},__("Try Again","jetpack")),f&&e&&(0,r.createElement)(s.ToolbarButton,{icon:i.Z,onClick:o},__("Accept","jetpack")),f&&(0,r.createElement)(s.ToolbarButton,{icon:l.Z,onClick:n},__("Retry","jetpack"))),false))},5246:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(51806),a=n(6895),s=n(13419),o=n(69307),i=n(65736),l=n(51128),c=n.n(l),u=n(99196),d=n(26546),p=n(23795),m=n(63206),h=n(18135),g=n(71449);const __=i.__,f=c()("jetpack-ai-assistant:upgrade-prompt"),b=e=>{const{upgradeType:t}=(0,h.Z)();return"vip"===t?(0,r.createElement)(d.p,{buttonText:null,checkoutUrl:null,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. Please reach out to your VIP account team.","jetpack"),{strong:(0,r.createElement)("strong",null)}),goToCheckoutPage:null,isRedirecting:null,visible:!0,align:null,title:null,context:null}):(({placement:e=null})=>{const{checkoutUrl:t,autosaveAndRedirect:n,isRedirecting:l}=(0,m.Z)(),c=(0,g.d)(),{nextTier:b,tierPlansEnabled:v,currentTier:k,requestsCount:y,usagePeriod:w}=(0,h.Z)(),E=(0,p.U_)(k)===p.dt?w?.requestsCount:y,{tracks:_}=(0,s.z$)(),C=(0,u.useCallback)((t=>{f("upgrade",e),_.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:k?.slug,requests_count:E,placement:e}),n(t)}),[n,k,E,_,e]),x=(0,u.useCallback)((()=>{f("contact us",e),_.recordEvent("jetpack_ai_upgrade_contact_us",{placement:e})}),[_,e]);if(!c)return(0,r.createElement)(d.p,{showButton:!1,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! Reach out to the site administrator to upgrade and keep using Jetpack AI.","jetpack"),{strong:(0,r.createElement)("strong",null)}),visible:!0,align:null,title:null,context:null});if(v){if(!b){const e=(0,a.Z)("jetpack-ai-tiers-more-requests-contact");return(0,r.createElement)(d.p,{buttonText:__("Contact Us","jetpack"),description:__("You have reached the request limit for your current plan.","jetpack"),className:"jetpack-ai-upgrade-banner",checkoutUrl:e,visible:!0,align:null,title:null,context:null,goToCheckoutPage:x})}return(0,r.createElement)(d.p,{buttonText:(0,i.sprintf)(/* Translators: number of requests */ __("Upgrade to %d requests","jetpack"),b.limit),checkoutUrl:t,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)((0,i.sprintf)(/* Translators: number of requests */ __("You have reached the requests limit for your current plan. Upgrade now to increase your requests limit to %d.","jetpack"),b.limit),{strong:(0,r.createElement)("strong",null)}),goToCheckoutPage:C,isRedirecting:l,visible:!0,align:"center",title:null,context:null})}return(0,r.createElement)(d.p,{buttonText:"Upgrade",checkoutUrl:t,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! Upgrade now to keep using it.","jetpack"),{strong:(0,r.createElement)("strong",null)}),goToCheckoutPage:n,isRedirecting:l,visible:!0,align:null,title:null,context:null})})(e)}},45624:(e,t,n)=>{"use strict";n.d(t,{Z:()=>B});var r=n(82674),a=n.n(r),s=n(51806),o=n(42290),i=n(13419),l=n(52175),c=n(4981),u=n(55609),d=n(94333),p=n(9818),m=n(69307),h=n(65736),g=n(65235),f=n.n(g),b=n(10185),v=n.n(b),k=n(99196),y=n(84102),w=n(80013),E=n(3180),_=n(87445),C=n(50297),x=n(4965),j=n(5246),S=n(49259),P=n(18135),N=n(60751),L=n(71449),T=n(3687),A=n(63634);const __=h.__,M=new(v())({breaks:!0}),R="post"===window?.Jetpack_Editor_Initial_State?.screenBase,Z=window?.Jetpack_Editor_Initial_State?.["ai-assistant"]?.["is-playground-visible"];function B({attributes:e,setAttributes:t,clientId:n,isSelected:r}){const[h,g]=(0,m.useState)({}),[b,v]=(0,m.useState)(!1),[B,I]=(0,m.useState)([]),[z,D]=(0,m.useState)(null),[F,O]=(0,m.useState)(null),{tracks:U}=(0,i.z$)(),H=(0,p.useSelect)((e=>e("core/editor").getCurrentPostId())),{getBlock:V}=(0,p.useSelect)("core/block-editor"),q=(0,k.useRef)(null),G=(0,k.useRef)(null),{replaceBlocks:$,replaceBlock:W,removeBlock:J}=(0,p.useDispatch)("core/block-editor"),{editPost:K}=(0,p.useDispatch)("core/editor"),{mediaUpload:Y}=(0,p.useSelect)((e=>{const{getSettings:t}=e("core/block-editor");return{mediaUpload:t().mediaUpload}}),[]),{isOverLimit:X,requireUpgrade:Q,increaseRequestsCount:ee}=(0,P.Z)(),te=()=>{setTimeout((()=>{q.current?.focus?.()}),100)},ne=()=>{setTimeout((()=>{G.current?.focus?.()}),100)},re=(0,d.useViewportMatch)("medium","<"),{isLoadingCategories:ae,isLoadingCompletion:se,wasCompletionJustRequested:oe,getSuggestionFromOpenAI:ie,stopSuggestion:le,showRetry:ce,contentBefore:ue,postTitle:de,retryRequest:pe,wholeContent:me,requestingState:he}=(0,N.Z)({onSuggestionDone:(0,m.useCallback)((()=>{te(),ee()}),[ee]),onUnclearPrompt:(0,m.useCallback)((()=>{ne(),ee()}),[ee]),onModeration:te,attributes:e,clientId:n,content:e.content,setError:g,tracks:U,userPrompt:e.userPrompt,requireUpgrade:Q,requestingState:e.requestingState}),ge=(0,L.b)(),fe=(0,S.$M)(n);(0,k.useEffect)((()=>{if(!fe)return;const e=JSON.parse(localStorage.getItem(fe));if(!e)return;const{type:t,options:n}=e;localStorage.removeItem(fe),ie(t,n)}),[fe,ie]),(0,k.useEffect)((()=>{h&&O(!1)}),[h]);const be=(0,k.useRef)(e?.content);(0,k.useEffect)((()=>{if(!e?.useGutenbergSyntax)return;if(!be?.current?.length)return;const t=V(n);if(t?.innerBlocks?.length)return;const r=(0,c.parse)(be.current);r?.length&&$(n,r)}),[be,n,$,V,e?.useGutenbergSyntax]),(0,k.useEffect)((()=>{["init","done"].includes(he)&&t({requestingState:he})}),[he,t]);const ve=async t=>{if(b)return;v(!0),g({});const r=await fetch(t),a=await r.blob(),s=new File([a],"jetpack_ai_image.png",{type:"image/png"});Y({filesList:[s],onFileChange:([t])=>{t.id&&W(n,(0,c.createBlock)("core/image",{url:t.url,caption:e.requestedPrompt,alt:e.requestedPrompt}))},allowedTypes:["image"],onError:e=>{console.error(e),v(!1)}}),U.recordEvent("jetpack_ai_dalle_generation_upload",{post_id:H})},ke=e?.useGutenbergSyntax,ye=se||ae,we=!!e.content,Ee="generateTitle"===e.promptType,_e=__("Accept","jetpack"),Ce=__("Accept title","jetpack"),xe=Ee?Ce:_e,je=(...e)=>{ie(...e),ne()},Se=async()=>{let t=[];if(ke)t=V(n),t=t?.innerBlocks||[];else{const n=M.render(e.content||"").replace(/
  • \s+

    /g,"

  • ").replace(/<\/p>\s+<\/li>/g,"
  • ");t=(0,c.rawHandler)({HTML:n})}await $(n,t);const r=(e=>{let t=null;return e.forEach((e=>{const n=document.querySelector(`.wp-block[data-block="${e.clientId}"]`);if(!n)return;"true"===n.contentEditable&&(t=n);const r=n.querySelectorAll("[contenteditable=true]");t=r.length?r[r.length-1]:t})),t})(t);r&&(e=>{const t=window.getSelection();t.selectAllChildren(e),t.collapseToEnd(),e.focus()})(r)},Pe=()=>{Se(),U.recordEvent("jetpack_ai_assistant_block_accept",{feature:"ai-assistant"})},Ne=()=>{R?(K({title:e.content?e.content.trim():""}),J(n),U.recordEvent("jetpack_ai_assistant_block_accept",{feature:"ai-assistant"})):Pe()},Le=()=>{le(),te(),U.recordEvent("jetpack_ai_assistant_block_stop",{feature:"ai-assistant"})},[Te,Ae]=(0,m.useState)(!1),Me=()=>{Ae(!Te)},Re=(0,l.useBlockProps)({ref:G,className:f()({"is-waiting-response":oe})}),Ze=(0,l.useInnerBlocksProps)(Re),Be=__("Ask Jetpack AI…","jetpack"),Ie=__("Write about… Make a table for…","jetpack"),ze=(0,s.createElement)(s.Fragment,null,X&&r&&(0,s.createElement)(j.Z,{placement:"ai-assistant-block"}),!ge&&(0,s.createElement)(E.Z,null));return(0,s.createElement)(u.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{esc:()=>{["requesting","suggesting"].includes(he)&&Le()}}},(0,s.createElement)("div",Re,h?.message&&!F&&"error_quota_exceeded"!==h?.code&&(0,s.createElement)(u.Notice,{status:h.status,isDismissible:!1,className:"jetpack-ai-assistant__error"},h.message),we&&!ke&&(0,s.createElement)("div",{className:"jetpack-ai-assistant__content"},(0,s.createElement)(m.RawHTML,null,M.render(e.content))),we&&ke&&(0,s.createElement)("div",a()({className:"jetpack-ai-assistant__content is-layout-building-mode"},Ze)),(0,s.createElement)(l.InspectorControls,null,(0,s.createElement)(u.PanelBody,{initialOpen:!0},(0,s.createElement)(u.PanelRow,null,(0,s.createElement)(y.Z,{placement:w.I}))),(0,s.createElement)(u.PanelBody,{initialOpen:!0},(0,s.createElement)(u.PanelRow,null,(0,s.createElement)(_.Z,null)))),Z&&(0,s.createElement)(l.InspectorControls,null,(0,s.createElement)(u.PanelBody,{title:__("AI Playground","jetpack"),initialOpen:!0},(0,s.createElement)(u.PanelRow,null,(0,s.createElement)(u.ToggleControl,{label:__("Gutenberg Syntax","jetpack"),onChange:e=>t({useGutenbergSyntax:e}),checked:e.useGutenbergSyntax})),(0,s.createElement)(u.PanelRow,null,(0,s.createElement)(u.ToggleControl,{label:__("GPT-4","jetpack"),onChange:e=>t({useGpt4:e}),checked:e.useGpt4})),(0,s.createElement)(u.PanelRow,null,Te&&(0,s.createElement)(u.Modal,{title:__("Custom System Prompt","jetpack"),onRequestClose:Me},(0,s.createElement)(u.TextareaControl,{rows:20,label:__("Set up the custom system prompt ","jetpack"),onChange:e=>t({customSystemPrompt:e}),className:"jetpack-ai-assistant__custom-prompt",value:e.customSystemPrompt||(0,A.t4)({useGutenbergSyntax:e.useGutenbergSyntax,useGpt4:e.useGpt4})?.content}),(0,s.createElement)("div",{className:"jetpack-ai-assistant__custom-prompt__footer"},(0,s.createElement)(u.Button,{onClick:()=>t({customSystemPrompt:""}),variant:"secondary"},__("Restore the prompt","jetpack")),(0,s.createElement)(u.Button,{onClick:Me,variant:"secondary"},__("Close","jetpack")))),(0,s.createElement)(u.Button,{onClick:Me,variant:"secondary"},__("Set system custom prompt","jetpack"))))),!ye&&ge&&!Q&&(0,s.createElement)(x.Z,{isWaitingState:ye,contentIsLoaded:we,getSuggestionFromOpenAI:ie,retryRequest:pe,handleAcceptContent:Pe,handleAcceptTitle:Ne,handleGetSuggestion:je,handleImageRequest:()=>{I([]),g({}),(0,T.b)(""===e.userPrompt.trim()?__("What would you like to see?","jetpack"):e.userPrompt,t,v,I,g,H),U.recordEvent("jetpack_ai_dalle_generation",{post_id:H})},handleTryAgain:null,showRetry:ce,contentBefore:ue,hasPostTitle:!!de?.length,wholeContent:me,promptType:e.promptType,setUserPrompt:e=>{if(!q?.current)return;q.current.focus(),t({userPrompt:e})},recordEvent:U.recordEvent,isGeneratingTitle:Ee}),(0,s.createElement)(o.tK,{ref:q,disabled:Q||!ge,value:e.userPrompt,placeholder:e?.content?Be:Ie,onChange:e=>{O(!0),t({userPrompt:e})},onSend:()=>{je("userPrompt"),U.recordEvent("jetpack_ai_assistant_block_generate",{feature:"ai-assistant"})},onStop:Le,onAccept:()=>{Ee?Ne():Pe()},onDiscard:()=>{const r=e?.content===V(n).attributes?.content;t({content:e?.originalContent,promptType:void 0,messages:e?.originalMessages}),Se(),r?U.recordEvent("jetpack_ai_assistant_block_dismiss"):U.recordEvent("jetpack_ai_assistant_block_discard",{feature:"ai-assistant"})},state:he,isTransparent:Q||!ge,showButtonLabels:!re,showAccept:"init"!==he&&we&&!ye,acceptLabel:xe,showGuideLine:we,showRemove:e?.content?.length>0,bannerComponent:ze}),!b&&B.length>0&&(0,s.createElement)(u.Flex,{direction:"column",style:{width:"100%"}},(0,s.createElement)(u.FlexBlock,{style:{textAlign:"center",margin:"12px",fontStyle:"italic",width:"100%"}},e.requestedPrompt),(0,s.createElement)(u.FlexBlock,{style:{fontSize:"20px",lineHeight:"38px"}},__("Please choose your image","jetpack")),(0,s.createElement)(u.Flex,{direction:"row",wrap:!0},B.map((e=>(0,s.createElement)(C.Z,{setImageModal:D,saveImage:ve,image:e,key:e}))))),!b&&z&&(0,s.createElement)(u.Modal,{onRequestClose:()=>D(null)},(0,s.createElement)(C.Z,{saveImage:ve,setImageModal:D,image:z,inModal:!0}))))}},27559:(e,t,n)=>{"use strict";var r=n(31985),a=n(23536),s=n(45624),o=n(6747);n(81765),n(54765),n(94662);(0,r.S)(a,{edit:s.Z,save:()=>null,transforms:o.Z})},54765:(e,t,n)=>{"use strict";n.d(t,{J7:()=>u,NP:()=>l});var r=n(4981),a=n(9818),s=n(92694),o=n(23536),i=n(71449);const l=["core/paragraph","core/heading","core/list"],c=window?.Jetpack_Editor_Initial_State?.available_blocks?.["ai-assistant-support"];function u(){if(!(0,r.getBlockType)(o.name))return!1;if(!c)return!1;if(!(0,i.b)())return!1;const{errorCode:e}=(0,a.select)("wordpress-com/plans")?.getAiAssistantFeature?.()||{};if(e)return!1;const{getHiddenBlockTypes:t}=(0,a.select)("core/edit-post")||{};return!(t?.()||[]).includes(o.name)}(0,s.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support",(function(e,t){return l.includes(t)&&u()?{...e,supports:{...e.supports,"jetpack/ai":{assistant:!0}}}:e}),100)},49259:(e,t,n)=>{"use strict";n.d(t,{$M:()=>i,ZP:()=>l});var r=n(51806),a=n(52175),s=n(94333),o=(n(99196),n(83059));function i(e){return`ai-assistant-block-${e}`}const l=(0,s.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(e,t),(0,r.createElement)(a.BlockControls,{group:"block"},(0,r.createElement)(o.ZP,{blockType:n})))}),"withAIAssistant")},79191:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(51806),a=n(42290),s=n(13419),o=n(4981),i=n(55609),l=n(94333),c=n(9818),u=n(69307),d=n(65736),p=n(53961),m=n(65235),h=n.n(m),g=(n(99196),n(3180)),f=n(5246),b=n(18135),v=n(71449),k=n(63634),y=n(79817),w=n(44110);const __=d.__,E={huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480};function _(e){if(!e?.length)return"";const t=(0,c.select)("core/block-editor").getBlock(e);if(!t)return"";const{innerBlocks:n}=t;return n?.length?n.reduce(((e,t)=>e+(0,o.serialize)(t)+"\n\n"),""):""}function C({clientId:e,className:t=""}){const n=(0,u.useRef)(null),o=(0,u.useRef)(null),{tracks:d}=(0,s.z$)(),m=(0,v.b)(),{inputValue:C,setInputValue:x,isVisible:j,assistantAnchor:S}=(0,u.useContext)(y.D),{dequeueAiAssistantFeatureAyncRequest:P}=(0,c.useDispatch)("wordpress-com/plans"),N=()=>{setTimeout((()=>{o.current?.focus?.()}),100)},{requestSuggestion:L,requestingState:T,stopSuggestion:A,requestingError:M}=(0,a.X_)({onDone:N}),{requireUpgrade:R}=(0,b.Z)(),Z=M?.code===a.$L||R,B="requesting"===T||"suggesting"===T,I="suggesting"===T||"done"===T,z=__("Ask Jetpack AI to create your form","jetpack"),D=__("Creating your form. Please wait a few moments.","jetpack"),{removeNotice:F}=(0,c.useDispatch)(p.store),O=(0,u.useCallback)((()=>{if(!C?.length)return;F(w.uu);const t=(0,k.r1)(k.Re,{request:C,content:_(e)});P(),L(t,{feature:"jetpack-form-ai-extension"}),d.recordEvent("jetpack_ai_assistant_block_generate",{feature:"jetpack-form-ai-extension"}),n?.current?.focus()}),[e,P,C,F,L,d]),U=(0,u.useCallback)((()=>{A(),N(),d.recordEvent("jetpack_ai_assistant_block_stop",{feature:"jetpack-form-ai-extension"})}),[A,d]),H=(0,l.useViewportMatch)("medium","<"),V=H&&S,q=(0,u.useRef)(null),G=(0,u.useRef)(H),[$,W]=(0,u.useState)(H);if((0,u.useEffect)((()=>{const e=n?.current;if(e)return q?.current||(q.current=new ResizeObserver((e=>{if(!j)return;if(V)return;const t=e[0].contentRect.width{q?.current?.disconnect()}}),[V,j]),(0,u.useEffect)((()=>{j&&d.recordEvent("jetpack_ai_assistant_prompt_show",{block_type:"jetpack/contact-form"})}),[j,d]),(0,u.useEffect)((()=>{const e=setTimeout((()=>{j&&o?.current&&o.current.focus()}),300);return function(){clearTimeout(e)}}),[]),!j)return null;const J=(0,r.createElement)("div",{className:"jetpack-ai-assistant__bar-wrapper"},(0,r.createElement)(i.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{esc:()=>{["requesting","suggesting"].includes(T)&&U()}}},(0,r.createElement)("div",{ref:n,className:h()("jetpack-ai-assistant__bar",{[t]:t,"is-fixed":V,"is-mobile-mode":$}),tabIndex:-1},Z&&(0,r.createElement)(f.Z,{placement:"jetpack-form-block"}),!m&&(0,r.createElement)(g.Z,null),(0,r.createElement)(a.tK,{ref:o,disabled:Z||!m,value:C,placeholder:B?D:z,onChange:x,onSend:O,onStop:U,state:T,isTransparent:Z||!m,showButtonLabels:!$,showGuideLine:I}))));return V?(0,u.createPortal)(J,S):J}},81732:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(51806),a=n(42290),s=n(55609),o=n(94333),i=n(69307),l=n(65736),c=n(99196),u=n(79817),d=n(44110);const __=l.__,p="jetpack-ai-assistant-bar__slot";function m({jetpackFormClientId:e}){const{isVisible:t,toggle:n,setAnchor:l,assistantAnchor:m}=(0,i.useContext)(u.D),{requestingState:h}=(0,a.X_)(),g=(0,i.useRef)(null),f=(0,o.useViewportMatch)("medium","<");(0,c.useEffect)((()=>{if(!g.current)return;const e=g.current.closest(".block-editor-block-contextual-toolbar");if(!e)return;let t=e.parentElement?.querySelector(`.${p}`);if(t)return e.after(t),l(t);t=document.createElement("div"),t.setAttribute("role","toolbar"),t.setAttribute("aria-label",__("AI Assistant","jetpack")),t.setAttribute("aria-orientation","horizontal"),t.className=p;const n=e.offsetHeight;t.style.top=`${n}px`,e.after(t),l(t)}),[l]),(0,c.useEffect)((()=>{f||m?.remove()}),[f,m]);const b=(0,i.useCallback)((()=>{if(!e)return n();(0,d.Vl)(e,n)}),[e,n]),v="requesting"===h||"suggesting"===h;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{"mod+/":n}}),(0,r.createElement)(s.ToolbarButton,{ref:g,showTooltip:!0,onClick:b,"aria-haspopup":"true","aria-expanded":t,label:__("Ask AI Assistant","jetpack"),icon:a.u_,disabled:v}))}},59090:(e,t,n)=>{"use strict";n.d(t,{aE:()=>r,nB:()=>a});const r=window?.Jetpack_Editor_Initial_State?.available_blocks?.["ai-assistant-form-support"]?.available,a=["jetpack/field-name","jetpack/field-email","jetpack/field-text","jetpack/field-textarea","jetpack/field-checkbox","jetpack/field-date","jetpack/field-telephone","jetpack/field-url","jetpack/field-checkbox-multiple","jetpack/field-radio","jetpack/field-select","jetpack/field-consent","jetpack/button"]},94662:(e,t,n)=>{"use strict";n.d(t,{G:()=>f});var r=n(51806),a=n(42290),s=n(13419),o=n(52175),i=n(4981),l=n(94333),c=n(9818),u=n(69307),d=n(92694),p=(n(99196),n(79191)),m=n(81732),h=n(59090),g=n(44110);function f(e,{checkChildrenBlocks:t=!1,clientId:n}={clientId:""}){const r=(0,i.getBlockType)("jetpack/ai-assistant"),{isModuleActive:a}=(0,s.el)("contact-form");if(!a)return!1;if(!r)return!1;if("string"!=typeof e)return!1;if(!h.aE)return!1;if(!n?.length)return!1;if(t){if(!h.nB.includes(e))return!1}else if("jetpack/contact-form"!==e)return!1;const{getHiddenBlockTypes:o}=(0,c.select)("core/edit-post")||{};return!(o?.()||[]).includes(e)}const b=(0,l.createHigherOrderComponent)((e=>t=>{const n=f(t?.name,{clientId:t.clientId}),{increaseAiAssistantRequestsCount:s}=(0,c.useDispatch)("wordpress-com/plans"),{eventSource:i}=(0,a.X_)({onDone:(0,u.useCallback)((()=>{s()}),[s]),onError:(0,u.useCallback)((e=>{"error_network"!==e.code&&"error_quota_exceeded"!==e.code&&s()}),[s])}),l=(0,u.useCallback)((()=>{i&&i?.close()}),[i]);if((0,u.useEffect)((()=>()=>{"jetpack/contact-form"===t?.name&&l()}),[l,t?.name]),!n)return(0,r.createElement)(e,t);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(e,t),(0,r.createElement)(p.Z,{clientId:t.clientId}),(0,r.createElement)(o.BlockControls,{group:"block"},(0,r.createElement)(m.Z,null)))}),"jetpackFormEditWithAiComponents");(0,d.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support",(function(e,t){return"jetpack/contact-form"!==t?e:{...e,edit:(0,a.oN)((0,g.ZP)(b(e.edit)))}}),100);const v=(0,l.createHigherOrderComponent)((e=>t=>{const n=(0,c.useSelect)((e=>{const n=e("core/block-editor"),{getBlockParentsByBlockName:r}=n;return r(t.clientId,"jetpack/contact-form")?.[0]}),[t.clientId]);if(!f(t?.name,{checkChildrenBlocks:!0,clientId:n}))return(0,r.createElement)(e,t);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(e,t),(0,r.createElement)(o.BlockControls,{group:"parent"},(0,r.createElement)(m.Z,{jetpackFormClientId:n})))}),"jetpackFormChildrenEditWithAiComponents");(0,d.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support",(function(e,t){return h.nB.includes(t)?{...e,edit:v(e.edit)}:e}))},79817:(e,t,n)=>{"use strict";n.d(t,{D:()=>s,v:()=>o});var r=n(51806),a=n(69307);const s=(0,a.createContext)({}),o=({value:e,children:t})=>(0,r.createElement)(s.Provider,{value:e,children:t})},44110:(e,t,n)=>{"use strict";n.d(t,{Vl:()=>b,ZP:()=>v,uu:()=>f});var r=n(51806),a=n(42290),s=n(4981),o=n(55609),i=n(94333),l=n(9818),c=n(69307),u=n(65736),d=n(53961),p=(n(99196),n(94662)),m=n(5863),h=n(56359),g=n(79817);const __=u.__,f="ai-assistant";function b(e,t){(0,l.dispatch)("core/block-editor").selectBlock(e).then(t)}const v=(0,i.createHigherOrderComponent)((e=>t=>{const{clientId:n,isSelected:i}=t,{replaceInnerBlocks:u}=(0,l.useDispatch)("core/block-editor"),v=(0,l.useSelect)((e=>e("core/editor")),[]),k=(0,l.useSelect)((e=>e("core/block-editor")),[]),y=v.getCurrentPostId(),w=k.getBlock(n),[E,_]=(0,c.useState)(""),C="jetpack/contact-form"===w?.name&&0===w?.innerBlocks?.length,[x,j]=(0,c.useState)(C),[S,P]=(0,c.useState)(!1),[N,L]=(0,c.useState)(null),T=(0,c.useRef)([]),A=(0,c.useCallback)((()=>{j(!0)}),[]),M=(0,c.useCallback)((()=>{j(!1)}),[]),R=(0,c.useCallback)((()=>{j(!x)}),[x]),Z=(0,c.useCallback)((e=>{L(e)}),[]),{createNotice:B}=(0,l.useDispatch)(d.store),I=(0,c.useCallback)((({severity:e,message:t,code:n})=>{n!==a.$L&&B(e,t,{isDismissible:!0,id:f})}),[B]);(0,c.useEffect)((()=>{i||M()}),[i,M]);const z=(0,c.useMemo)((()=>({inputValue:E,setInputValue:_,isVisible:x,show:A,hide:M,toggle:R,isFixed:S,setAssistantFixed:P,assistantAnchor:N,setAnchor:Z})),[E,x,A,M,R,S,N,Z]),D=(0,c.useCallback)(((e,t=!1)=>{const r=e.replace(//g,""),a=(0,h.J)(r),o=(0,s.parse)(a).filter((e=>e.isValid&&!["core/freeform","core/missing","core/html"].includes(e.name)));let i=!1;if(o.length0){const e=o[o.length-1],t=T.current[o.length-1];i=!(0,m.c)(e,t)}if(o.length>0&&(o.length!==T.current.length||i)&&(u(n,o),T.current=o),t){const e=o.filter((e=>"jetpack/button"===e.name));if(T.current=T.current||[],e.length>1){let t=0;T.current=T.current.filter((n=>"jetpack/button"!==n.name||(t++,t===e.length))),u(n,T.current)}else 0===e.length&&u(n,[...T.current,(0,s.createBlock)("jetpack/button",{label:__("Submit","jetpack"),element:"button",text:__("Submit","jetpack"),borderRadius:8,lock:{remove:!0}})]);T.current=[]}}),[n,u]);return(0,a.X_)({askQuestionOptions:{postId:y},onDone:e=>{D(e,!0),_("")},onSuggestion:D,onError:I}),(0,p.G)(t.name,{clientId:t.clientId})?(0,r.createElement)(g.v,{value:z},(0,r.createElement)(o.KeyboardShortcuts,{shortcuts:{"mod+/":()=>b(n,A)}},(0,r.createElement)(e,t))):(0,r.createElement)(e,t)}),"withUiHandlerDataProvider")},63206:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(6895),a=n(13419),s=n(46867),o=n(18135);function i(){const{nextTier:e,tierPlansEnabled:t}=(0,o.Z)(),n=t?(0,r.Z)("jetpack-ai-yearly-tier-upgrade-nudge",{site:(0,a.lQ)(),path:`jetpack_ai_yearly:-q-${e?.limit}`,query:`redirect_to=${window.location.href}`}):(0,r.Z)("jetpack-ai-monthly-plan-ai-assistant-block-banner",{site:(0,a.lQ)()}),i=(0,a.Ug)()||(0,a.Wp)()?n:`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/add-jetpack-ai`,{autosaveAndRedirect:l,isRedirecting:c}=(0,s.Z)(i);return{checkoutUrl:i,autosaveAndRedirect:l,isRedirecting:c}}},18135:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(9818);function a(){const{data:e,loading:t}=(0,r.useSelect)((e=>{const{getAiAssistantFeature:t,getIsRequestingAiAssistantFeature:n}=e("wordpress-com/plans");return{data:t(),loading:n()}}),[]),{fetchAiAssistantFeature:n,increaseAiAssistantRequestsCount:a}=(0,r.useDispatch)("wordpress-com/plans");return{...e,loading:t,error:null,refresh:n,increaseRequestsCount:a}}},42890:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(6975),a=n(69307);const s=window?.Jetpack_Editor_Initial_State?.tracksUserData||null,o=parseInt(window?.Jetpack_Editor_Initial_State?.wpcomBlogId)||0,i=()=>((0,a.useEffect)((()=>{s&&r.Z.initialize(s?.userid,s?.username,o?{blog_id:o}:{})}),[]),r.Z)},60751:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(42290),a=n(4981),s=n(9818),o=n(69307),i=n(65736),l=n(51128),c=n.n(l),u=n(27298),d=n(63634),p=n(854);const __=i.__,m=c()("jetpack-ai-assistant:event"),h=c()("jetpack-ai-assistant:prompt"),g=({attributes:e,clientId:t,content:n,setError:i,tracks:l,userPrompt:c,onSuggestionDone:g,onUnclearPrompt:f,onModeration:b,requireUpgrade:v,requestingState:k})=>{const[y,w]=(0,o.useState)(!1),[E,_]=(0,o.useState)(!1),[C,x]=(0,o.useState)(!1),[j,S]=(0,o.useState)(!1),[P,N]=(0,o.useState)(""),{updateBlockAttributes:L}=(0,s.useDispatch)("core/block-editor"),{dequeueAiAssistantFeatureAyncRequest:T,setAiAssistantFeatureRequireUpgrade:A}=(0,s.useDispatch)("wordpress-com/plans"),[M,R]=(0,o.useState)(k||"init"),Z=(0,o.useRef)(),B=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("title")));let I=!1;const z=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("categories")))||[],D=(0,s.useSelect)((e=>z.map((t=>{const n=e("core").getEntityRecord("taxonomy","category",t);if(n)return n;I=!0})).filter(Boolean)),[z]),F=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("tags")),[])||[],O=(0,s.useSelect)((e=>F.map((t=>{const n=e("core").getEntityRecord("taxonomy","post_tag",t);if(n)return n;I=!0})).filter(Boolean)),[F]);(0,o.useEffect)((()=>(w(I),()=>{Z?.current&&(m("Cleaning things up..."),Z?.current?.close())})),[I,Z]);const U=(0,s.useSelect)((e=>e("core/editor").getCurrentPostId())),H=(D.filter((e=>1!==e.id)).map((({name:e})=>e)).join(", "),O.map((({name:e})=>e)).join(", "),async(o,g={})=>{T();const k=g?.functions?.reduce(((e,{name:t,implementation:n})=>({...e,[t]:n})),{});if(v)return R("error"),_(!1),x(!1),S(!1),void i({code:"error_quota_exceeded",message:__("You have reached the limit of requests for this site.","jetpack"),status:"info"});if(g={retryRequest:!1,tone:u.Nj,...g},E)return;S(!1),i({});let y=P;l.recordEvent("jetpack_ai_chat_completion",{post_id:U});const w=[...e.messages]??[];let C={};if(g.retryRequest)C=y[y.length-1];else{const r=e?.isLayoutBuldingModeEnable?(0,p.WN)(t):(0,p.xN)();y=(0,d.Iq)({generatedContent:n,allPostContent:r,postContentAbove:(0,p.h7)(t),currentPostTitle:B,options:g,userPrompt:c,type:o,isGeneratingTitle:"generateTitle"===e.promptType,useGutenbergSyntax:!!e?.useGutenbergSyntax,customSystemPrompt:e?.customSystemPrompt}),C=y.pop(),y=[...y,...w],y.push(C),N(y),"generateTitle"!==e.promptType&&L(t,{promptType:o})}try{_(!0),x(!0),y.forEach((({role:e,content:t},n)=>h("(%s/%s) %o\n%s",n+1,y.length,`[${e}]`,t))),R("requesting"),Z.current=await(0,r.jt)(y,{postId:U,requireUpgrade:v,feature:e?.useGpt4?"ai-assistant-experimental":"ai-assistant",functions:g?.functions}),R("suggesting")}catch(e){e.message?i({message:e.message,code:e?.code||"unknown",status:"error"}):i({message:__("Whoops, we have encountered an error. AI is like really, really hard and this is an experimental feature. Please try again later.","jetpack"),code:"unknown",status:"error"}),S(!0),_(!1),x(!1)}const j=async t=>{const{detail:n}=t,a={role:"assistant",content:null,function_call:n},s=await(k[n.name]?.(JSON.parse(n.arguments))),o={role:"function",name:n?.name,content:JSON.stringify(s)};y=[...y,a,o],Z?.current?.removeEventListener("function_done",j),Z?.current?.removeEventListener("done",M),Z?.current?.removeEventListener("error_unclear_prompt",I),Z?.current?.removeEventListener("error_network",D),Z?.current?.removeEventListener("error_context_too_large",z),Z?.current?.removeEventListener("error_service_unavailable",F),Z?.current?.removeEventListener("error_quota_exceeded",O),Z?.current?.removeEventListener("error_moderation",H),Z?.current?.removeEventListener("suggestion",q),Z.current=await(0,r.jt)(y,{postId:U,requireUpgrade:v,feature:e?.useGpt4?"ai-assistant-experimental":null,functions:g.functions}),Z?.current?.addEventListener("function_done",j),Z?.current?.addEventListener("done",M),Z?.current?.addEventListener("error_unclear_prompt",I),Z?.current?.addEventListener("error_network",D),Z?.current?.addEventListener("error_context_too_large",z),Z?.current?.addEventListener("error_service_unavailable",F),Z?.current?.addEventListener("error_quota_exceeded",O),Z?.current?.addEventListener("error_moderation",H),Z?.current?.addEventListener("suggestion",q)},M=n=>{const{detail:r}=n;R("done");const o=r.replaceAll(d._W,""),i={role:"assistant",content:o};w.push(C,i),h("Add %o\n%s",`[${C.role}]`,C.content),h("Add %o\n%s",`[${i.role}]`,i.content),w.length>20&&w.splice(0,w.length-20),V();const l=e?.useGutenbergSyntax;if(L(t,{content:o,messages:w}),!l)return;const{replaceInnerBlocks:c}=(0,s.dispatch)("core/block-editor"),u=(0,a.parse)(r).filter((e=>e.isValid));c(t,u)},I=()=>{R("error"),Z?.current?.close(),_(!1),x(!1),i({code:"error_unclear_prompt",message:__("Your request was unclear. Mind trying again?","jetpack"),status:"info"}),f?.()},z=()=>{R("error"),Z?.current?.close(),_(!1),x(!1),S(!1),i({code:"error_context_too_large",message:__("The content is too large to be processed all at once. Please try to shorten it or divide it into smaller parts.","jetpack"),status:"info"})},D=({detail:r})=>{R("error");const{name:a,message:s}=r;"TypeError"===a&&"Failed to fetch"===s&&(w.splice(0,8),L(t,{messages:w}),y=(0,d.Iq)({generatedContent:n,allPostContent:(0,p.xN)(),postContentAbove:(0,p.h7)(t),currentPostTitle:B,options:g,userPrompt:c,type:o,isGeneratingTitle:"generateTitle"===e.promptType,useGutenbergSyntax:!!e?.useGutenbergSyntax,customSystemPrompt:e?.customSystemPrompt}),N([...y,...w,C])),Z?.current?.close(),_(!1),x(!1),S(!0),i({code:"error_network",message:__("It was not possible to process your request. Mind trying again?","jetpack"),status:"info"})},F=()=>{R("error"),Z?.current?.close(),_(!1),x(!1),S(!0),i({code:"error_service_unavailable",message:__("Jetpack AI services are currently unavailable. Sorry for the inconvenience.","jetpack"),status:"info"})},O=()=>{R("error"),Z?.current?.close(),_(!1),x(!1),S(!1),A(!0),i({code:"error_quota_exceeded",message:__("You have reached the limit of requests for this site.","jetpack"),status:"info"})},H=()=>{R("error"),Z?.current?.close(),_(!1),x(!1),S(!1),i({code:"error_moderation",message:__("This request has been flagged by our moderation system. Please try to rephrase it and try again.","jetpack"),status:"info"}),b?.()},q=e=>{x(!1),m("(suggestion)",e?.detail),L(t,{content:e?.detail?.replaceAll(d._W,"")})};return Z?.current?.addEventListener("function_done",j),Z?.current?.addEventListener("done",M),Z?.current?.addEventListener("error_unclear_prompt",I),Z?.current?.addEventListener("error_network",D),Z?.current?.addEventListener("error_context_too_large",z),Z?.current?.addEventListener("error_service_unavailable",F),Z?.current?.addEventListener("error_quota_exceeded",O),Z?.current?.addEventListener("error_moderation",H),Z?.current?.addEventListener("suggestion",q),Z?.current});function V(){Z?.current&&(Z?.current?.close(),_(!1),x(!1),g?.(),R("done"))}return{isLoadingCategories:y,isLoadingCompletion:E,wasCompletionJustRequested:C,setIsLoadingCategories:w,setShowRetry:S,showRetry:j,postTitle:B,contentBefore:(0,p.h7)(t),wholeContent:(0,p.xN)(),requestingState:M,getSuggestionFromOpenAI:H,stopSuggestion:V,retryRequest:()=>H("",{retryRequest:!0})}}},71449:(e,t,n)=>{"use strict";n.d(t,{b:()=>u,d:()=>d});var r=n(13419),a=n(51128),s=n.n(a);const o=window?.JP_CONNECTION_INITIAL_STATE,i=s()("jetpack-ai-assistant:connection");let l=!1;const c=e=>{l||(i(e),l=!0)};function u(){return(0,r.Wp)()?(c("Simple site connected ✅"),!0):(0,r.Ug)()?(c("Atomic site connected ✅"),!0):o?.connectionStatus?.isUserConnected?(c("Jetpack user is connected ✅"),!0):(c("User is not connected ❌"),!1)}function d(){if((0,r.Wp)())return!0;return!1==!(o?.userConnectionData?.currentUser?.permissions??{}).manage_options}},3687:(e,t,n)=>{"use strict";n.d(t,{b:()=>o});var r=n(86989),a=n.n(r),s=n(65736);const __=s.__;function o(e,t,n,r,s,o){n(!0),s(null),t({requestedPrompt:e}),a()({path:"/wpcom/v2/jetpack-ai/images/generations",method:"POST",data:{prompt:e,post_id:o}}).then((e=>{n(!1);const t=e.data.map((e=>"data:image/png;base64,"+e.b64_json));r(t)})).catch((e=>{e.message?s(e.message):s(__("Whoops, we have encountered an error. AI is like really, really hard and this is an experimental feature. Please try again later.","jetpack")),n(!1)}))}},57832:(e,t,n)=>{"use strict";n.d(t,{v_:()=>i,x1:()=>l});var r=n(63634);const a="title",s="content",o=null;function i(e,t){return{role:"jetpack-ai",context:{type:"ai-assistant-initial-prompt",for:u(e),...t?.length?{custom_system_prompt:t}:{}}}}function l({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:a,options:s,type:o,userPrompt:i,isGeneratingTitle:l}){const u=[],d="generated"===s?.contentType;let p=null;switch(o){case r.qA:p=a;break;case r.sz:case r.hI:case r.Hd:p=n;break;case r.jf:p=t;break;case r.TV:case r.DR:p=e;break;case r.Lg:case r.Lq:case r.Nw:p=d?e:t;break;case r.Gh:p=e||t}const m=function(e,t){return!e&&t?.length>0?{role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:t}}:null}(o===r.Gh?!!e?.length:d,p);return m&&u.push(m),u.push({role:"jetpack-ai",context:c({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:a,options:s,type:o,userPrompt:i,isGeneratingTitle:l})}),u}function c({options:e,type:t,userPrompt:n,isGeneratingTitle:i}){const l=function(e,t,n){return e?a:!t||n?s:o}(i,"generated"===e?.contentType,e?.fromExtension||!1);return{type:u(t),...l?{subject:l}:{},...t===r.Lg&&e?.tone?{tone:e.tone}:{},...t===r.Nw&&e?.language?{language:e.language}:{},...t===r.Gh&&n?{request:n}:{}}}function u(e){return{[r.qA]:"ai-assistant-summary-by-title",[r.sz]:"ai-assistant-continue-writing",[r.hI]:"ai-assistant-simplify",[r.Hd]:"ai-assistant-correct-spelling",[r.jf]:"ai-assistant-generate-title",[r.TV]:"ai-assistant-make-longer",[r.DR]:"ai-assistant-make-shorter",[r.Lg]:"ai-assistant-change-tone",[r.Lq]:"ai-assistant-summarize",[r.Nw]:"ai-assistant-change-language",[r.Gh]:"ai-assistant-user-prompt"}[e]}},63634:(e,t,n)=>{"use strict";n.d(t,{DR:()=>p,Gh:()=>f,Hd:()=>c,Iq:()=>T,Lg:()=>m,Lq:()=>h,Nw:()=>g,Re:()=>b,SV:()=>v,TV:()=>d,_W:()=>y,hI:()=>l,jf:()=>u,qA:()=>o,r1:()=>A,sz:()=>i,t4:()=>w});var r=n(51128),a=n.n(r),s=n(57832);const o="titleSummary",i="continue",l="simplify",c="correctSpelling",u="generateTitle",d="makeLonger",p="makeShorter",m="changeTone",h="summarize",g="changeLanguage",f="userPrompt",b="jetpackFormCustomPrompt",v=!0,k=a()("jetpack-ai-assistant:prompt"),y="````";function w({context:e="You are an advanced polyglot ghostwriter. Your task is to generate and modify content based on user requests. This functionality is integrated into the Jetpack product developed by Automattic. Users interact with you through a Gutenberg block, you are inside the WordPress editor",rules:t,useGutenbergSyntax:n=!1,useMarkdown:r=!0,customSystemPrompt:a=null}){let s="";t?.length&&(s=t.map((e=>`- ${e}.`)).join("\n")+"\n");let o=`${e}. Strictly follow these rules:\n\n${s}${r?"- Format your responses in Markdown syntax, ready to be published.":""}\n- Execute the request without any acknowledgement to the user.\n- Avoid sensitive or controversial topics and ensure your responses are grammatically correct and coherent.\n- If you cannot generate a meaningful response to a user's request, reply with “__JETPACK_AI_ERROR__“. This term should only be used in this context, it is used to generate user facing errors.\n`;return n&&(o=`${e}. Strictly follow these rules:\n\t\n${s}- Format your responses in Gutenberg HTML format including HTML comments for WordPress blocks. All responses must be valid Gutenberg HTML.\n- Use only WordPress core blocks\n- Execute the request without any acknowledgement to the user.\n- Avoid sensitive or controversial topics and ensure your responses are grammatically correct and coherent.\n- If you cannot generate a meaningful response to a user's request, reply with “__JETPACK_AI_ERROR__“. This term should only be used in this context, it is used to generate user facing errors.\n`),a&&(o=a),{role:"system",content:o}}function E(e){return`${y}${e.replaceAll(y,"")}${y}`}function _({content:e,role:t="user"}){return[{role:t,content:`Repeat the text delimited with ${y}, without the delimiter, correcting any spelling and grammar mistakes directly in the text without providing feedback about the corrections, keeping the language of the text: ${E(e)}`}]}function C({content:e,role:t="user"}){return[{role:t,content:`Simplify the text delimited with ${y}, using words and phrases that are easier to understand and keeping the language of the text: ${E(e)}`}]}function x({content:e,role:t="user"}){return[{role:t,content:`Summarize the text delimited with ${y}, keeping the language of the text: ${E(e)}`}]}function j({content:e,role:t="user"}){return[{role:t,content:`Expand the text delimited with ${y} to about double its size, keeping the language of the text: ${E(e)}`}]}function S({content:e,language:t,role:n="user"}){return[{role:n,content:`Translate the text delimited with ${y} to ${t}, preserving the same core meaning and tone: ${E(e)}`}]}function P({content:e,tone:t,role:n="user"}){return[{role:n,content:`Rewrite the text delimited with ${y}, with a ${t} tone, keeping the language of the text: ${E(e)}`}]}function N({content:e,request:t}){if(!t)throw new Error("You must provide a custom prompt for the Jetpack Form Custom Prompt");return[{role:"jetpack-ai",context:{type:"form-ai-extension",content:e,request:t}}]}const L=({rules:e=[],request:t=null,relevantContent:n=null,isContentGenerated:r=!1,isGeneratingTitle:a=!1,useGutenbergSyntax:s=!1,customSystemPrompt:o=null})=>{if(!t&&!n)throw new Error("You must provide either a request or content");const i=[w({rules:e,useGutenbergSyntax:s,customSystemPrompt:o})];if(null!=n&&n?.length){const e=n.replaceAll(y,"");r||i.push({role:"user",content:`The specific relevant content for this request, if necessary, delimited with ${y} characters: ${y}${e}${y}`})}const l={role:"user",content:t};return a&&(l.content+=" Only output a title, do not generate body content."),i.push(l),i.forEach((e=>{k(`Role: ${e?.role}.\nMessage: ${e?.content}\n---`)})),i};function T({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:r,options:a,type:b,userPrompt:k,isGeneratingTitle:y,useGutenbergSyntax:w,customSystemPrompt:E}){if(v){return[(0,s.v_)(b,E),...(0,s.x1)({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:r,options:a,type:b,userPrompt:k,isGeneratingTitle:y})]}const _="generated"===a?.contentType,C=function(e,t=!1,n){const r="generated"===n?.contentType;let a="the title";t||(a=r?"your last answer":"the content");const s=`. Do not switch to any language other than the language of ${a} in your response`;switch(e){case o:return{request:`Write a short piece for a blog post based on ${a}, keeping the same language`};case i:return{request:`Continue writing from ${a}${s}.`,rules:r?[]:["Only output the continuation of the content, without repeating it"]};case l:return{request:`Simplify ${a}${s}.`,rules:["Use words and phrases that are easier to understand for non-technical people","Use as much of the original language as possible"]};case c:return{request:`Repeat ${a}, correcting any spelling and grammar mistakes, and do not add new content${s}.`};case u:return{request:"Generate a new title for this blog post and only output the title.",rules:["Only output the raw title, without any prefix or quotes"]};case d:return{request:`Make ${a} longer${s}.`};case p:return{request:`Make ${a} shorter${s}.`};case m:return{request:`Rewrite ${a} with ${/^[aeiou]/i.test(n.tone)?"an":"a"} ${n.tone} tone${s}.`};case h:return{request:`Summarize ${a}${s}.`};case g:return{request:`Translate ${a} to the following language: ${n.language}.`};default:return null}}(b,y,a);if(b!==f){let a;switch(b){case o:a=r;break;case i:case l:case c:a=n;break;case u:a=t;break;case d:case p:a=e;break;case m:case h:case g:a=_?e:t}return L({...C,relevantContent:a,isContentGenerated:_,isGeneratingTitle:y,useGutenbergSyntax:w,customSystemPrompt:E})}return L({request:k,relevantContent:e||t,isContentGenerated:!!e?.length,isGeneratingTitle:y,useGutenbergSyntax:w,customSystemPrompt:E})}function A(e,t){k("Addressing prompt type: %o %o",e,t);const{prevMessages:n=[]}=t,r={role:"system",content:"You are an advanced polyglot ghostwriter. Your task is to help the user create and modify content based on their requests.\nWriting rules:\n- Execute the request without any acknowledgment or explanation to the user.\n- Avoid sensitive or controversial topics and ensure your responses are grammatically correct and coherent.\n- If you cannot generate a meaningful response to a user's request, reply with “__JETPACK_AI_ERROR__“. This term should only be used in this context, it is used to generate user facing errors.\n"},a=[...n];switch(a.push(r),e){case c:return[...a,..._(t)];case l:return[...a,...C(t)];case h:return[...a,...x(t)];case d:return[...a,...j(t)];case g:return[...a,...S(t)];case m:return[...a,...P(t)];case b:return[...n,...N(t)];default:throw new Error(`Unknown prompt type: ${e}`)}}},74359:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r=new(n(92213).Z)({emDelimiter:"_",headingStyle:"atx"});r.addRule("strikethrough",{filter:["del","s","strike"],replacement:function(e){return"~~"+e+"~~"}});const a=r},854:(e,t,n)=>{"use strict";n.d(t,{WN:()=>l,h7:()=>o,t$:()=>c,xN:()=>i});var r=n(4981),a=n(9818),s=n(74359);function o(e){if(!e)return"";const t=(0,a.select)("core/block-editor"),n=t.getBlockIndex(e),o=t.getBlocks().slice(0,n)??[];return o?.length?s.Z.turndown((0,r.serialize)(o)):""}function i(){const e=(0,a.select)("core/block-editor").getBlocks();return e?.length?s.Z.turndown((0,r.serialize)(e)):""}function l(e){const t=(0,a.select)("core/block-editor").getBlock(e);return t?.innerBlocks?.length?t.innerBlocks.filter((e=>null!=e)).map((e=>(0,r.getBlockContent)(e.clientId))).join("\n\n"):""}function c(e){if(!e?.replace(/\s+/,"").length)return"";const t=document.createElement("div");t.innerHTML=e;const{textContent:n,innerText:r}=t;return n&&!n.replace(/\s+/,"").length||r&&!r.replace(/\s+/,"").length?"":t.textContent||t.innerText||""}},5863:(e,t,n)=>{"use strict";n.d(t,{c:()=>s});const r=e=>{delete e.clientId;for(const t of e.innerBlocks??[])r(t);return e},a=e=>r((e=>JSON.parse(JSON.stringify(e)))(e));function s(e,t){const n=a(e),r=a(t);return JSON.stringify(n)===JSON.stringify(r)}},56359:(e,t,n)=>{"use strict";function r(e){const t=document.createElement("div");return t.innerHTML=e,t.innerHTML}n.d(t,{J:()=>r})},81765:(e,t,n)=>{"use strict";var r=n(4981),a=n(92694),s=n(54765),o=n(49259);(0,a.addFilter)("blocks.registerBlockType","jetpack/handle-jetpack-ai-supports",(function(e){const t=(0,r.getBlockSupport)(e,"jetpack/ai");return t&&t?.assistant&&(0,s.J7)()?{...e,edit:(0,o.ZP)(e.edit)}:e}),100)},6747:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u,b:()=>c});var r=n(4981),a=n(23536),s=n(54765),o=n(63634),i=n(74359);const l=[];function c(e,t){const{content:n,...s}=t;let l=n;"core/heading"===e&&t?.level&&(l=l.replace(/<(\/?)h\d([^>]*)>/g,`<$1h${t.level}$2>`));const c=i.Z.turndown(l),u=[];return o.SV?u.push({role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:c}}):(u.push({role:"user",content:"Tell me some content for this block, please."}),u.push({role:"assistant",content:c})),(0,r.createBlock)(a.name,{...s,content:c,originalContent:c,messages:u,originalMessages:u})}for(const e of s.NP)l.push({type:"block",blocks:[e],isMatch:()=>(0,s.J7)(),transform:(t,n)=>{const a=(0,r.getSaveContent)(e,t,n);return c(e,{...t,content:a})}});const u={from:l}},98825:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(65736),s=n(26546),o=n(46867);const __=a.__,i=()=>{const e=`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/connection`,{autosaveAndRedirect:t,isRedirecting:n}=(0,o.Z)(e);if(window?.Jetpack_Editor_Initial_State?.jetpack?.is_current_user_connected)return null;return(0,r.createElement)(s.p,{buttonText:__("Reconnect Jetpack","jetpack"),checkoutUrl:e,className:"jetpack-ai-connect-banner",description:__("Your account is not connected to Jetpack at the moment.","jetpack"),goToCheckoutPage:e=>{t(e)},isRedirecting:n,visible:!0,align:null,title:null,context:null})}},56352:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(65736),s=n(26546),o=n(46867);const __=a.__,i=()=>{let e=window?.Jetpack_Editor_Initial_State?.adminUrl||"";e=e.replace(/wp-admin\/\?frame-nonce=[a-z0-9]+/,"wp-admin/");const t=`${e}admin.php?page=jetpack-search`,{autosaveAndRedirect:n,isRedirecting:a}=(0,o.Z)(t);if(window?.Jetpack_AIChatBlock?.jetpackSettings?.instant_search_enabled)return null;return(0,r.createElement)(s.p,{buttonText:__("Enable Jetpack Search","jetpack"),checkoutUrl:t,className:"jetpack-ai-connect-banner",description:__("You need to enable Jetpack Search so that Jetpack AI can index your site.","jetpack"),goToCheckoutPage:e=>{n(e)},isRedirecting:a,visible:!0,align:null,title:null,context:null})}},23719:(e,t,n)=>{"use strict";n.d(t,{V:()=>l});var r=n(51806),a=n(52175),s=n(55609),o=n(37798),i=n(65736);const __=i.__;function l({setAttributes:e,placeholder:t,showCopy:n,showFeedback:i,showSources:l}){const[c,u]=(0,o.useEntityProp)("root","site","jetpack_search_ai_prompt_override");return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,r.createElement)(s.BaseControl,{label:__("Placeholder Text","jetpack"),className:"jetpack-ai-chat__ask-button-text"},(0,r.createElement)(s.TextControl,{placeholder:__("Ask a question about this site.","jetpack"),onChange:t=>e({placeholder:t}),value:t})))),(0,r.createElement)(a.InspectorAdvancedControls,null,(0,r.createElement)(s.BaseControl,{label:__("Additional instructions","jetpack"),help:__("Give Jetpack AI additional instructions for answer length, format, and tone.","jetpack")},(0,r.createElement)(s.TextareaControl,{value:c,onChange:u})),(0,r.createElement)(s.ToggleControl,{label:__("Show copy answer button.","jetpack"),help:__("Allow users to easily copy the answer.","jetpack"),checked:n,onChange:t=>e({showCopy:t})}),(0,r.createElement)(s.ToggleControl,{label:__("Show rating button.","jetpack"),help:__("Allow users to rate the answer and give feedback.","jetpack"),checked:i,onChange:t=>e({showFeedback:t})}),(0,r.createElement)(s.ToggleControl,{label:__("Show list of sources.","jetpack"),help:__("Show used sources at the bottom of the answer.","jetpack"),checked:l,onChange:t=>e({showSources:t})})))}},74021:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(51806),a=n(42290),s=n(52175),o=n(55609),i=n(9818),l=n(98825),c=n(56352),u=n(23719);function d({attributes:e,setAttributes:t,clientId:n}){const d=(0,s.useBlockProps)(),p=(0,i.useSelect)((e=>e("core/block-editor").isBlockSelected(n)),[n]);return(0,r.createElement)("div",d,(0,r.createElement)(l.Z,null),(0,r.createElement)(c.Z,null),(0,r.createElement)("div",{className:"jetpack-ai-chat-question-wrapper"},(0,r.createElement)(o.TextControl,{className:"jetpack-ai-chat-question-input",placeholder:e.placeholder,disabled:!0}),(0,r.createElement)(s.RichText,{className:"wp-block-button__link jetpack-ai-chat-question-button",onChange:e=>t({askButtonLabel:e}),value:e.askButtonLabel,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/strikethrough"]})),p&&(0,r.createElement)(a.Eo,null),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(u.V,{askButtonLabel:e.askButtonLabel,placeholder:e.placeholder,setAttributes:t,showCopy:e.showCopy,showFeedback:e.showFeedback,showSources:e.showSources})))}},86116:(e,t,n)=>{"use strict";var r=n(31985),a=n(21540),s=n(74021),o=n(148);(0,r.S)(a,{edit:s.Z,save:o.Z})},148:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(51806),a=n(52175);function s({attributes:e}){const t=a.useBlockProps.save({"data-ask-button-label":e.askButtonLabel});return(0,r.createElement)("div",t)}},77567:(e,t,n)=>{"use strict";n.d(t,{K:()=>r});const r=["A digital Illustration of the a purely mechanical television, 4k, detailed, fantasy vivid colors","3D render of a floating futuristic castle in a clear sky, digital art","Hedgehog smelling a flower | clear blue sky | intricate artwork by Beatrix Potter | cottagecore aesthetic | 8K | highly detailed | wide angle |","Hyper realistic photo of a high end futuristic single-level house where walls are made of windows, light coming through the window, mid century modern style, cinematic lighting","Pink ape Astronaut in space holding a claymate in a photorealistic style, digital art","Studio photography set of high detail irregular marble stones with gold lines stacked in impossible balance, perfect composition, cinematic light photo studio, beige color scheme, indirect lighting, 8k, elegant and luxury style","Ultrawide, highway, with golden ratio style, 4K , sides are prairies, light is Golden hour, sky with red Clouds, ultrarealistic, CinémaScope, ultra wide format, ratio 16/9, 1/1000 sec, maximum resolution, Sharp details","A photo of cat flying out to space as an astronaut, digital art","A hyper realistic rilakkuma enjoying an icecream in the snow","A lush tropical forest with a waterfall.","A majestic snowy mountain peak.","A beautiful sunset over a beach.","A serene lake surrounded by trees.","A picturesque countryside with rolling hills.","A colorful hot air balloon in the sky.","A peaceful Zen garden.","A grand castle on a hill.","A lively street market in a bustling city.","A delightful flower garden in full bloom.","A cozy cabin in the woods.","A vibrant coral reef teeming with sea life.","A classic European city with cobblestone streets.","A stunning waterfall cascading into a crystal clear pool.","A secluded cabin on the edge of a lake.","A beautiful desert landscape with sand dunes.","A majestic elephant in its natural habitat.","A charming countryside village with thatched roof cottages.","A dreamy castle floating on a cloud.","A whimsical tree house in a forest.","A vibrant city skyline at night.","A picturesque vineyard with rows of grapevines.","A peaceful Japanese garden with a koi pond.","A charming lighthouse on a rocky coastline.","A beautiful waterfall surrounded by greenery.","A dreamy castle with a moat and drawbridge.","A colorful hot air balloon festival.","A beautiful garden with a fountain and sculptures.","A picturesque countryside with a windmill.","A stunning mountain landscape with a rainbow."]},84295:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(51806),a=n(13419),s=n(86989),o=n.n(s),i=n(52175),l=n(4981),c=n(55609),u=n(9818),d=n(69307),p=n(65736),m=n(77567);const __=p.__;function h({attributes:e,setAttributes:t,clientId:n}){const[s,p]=(0,d.useState)(!1),[h,g]=(0,d.useState)([]),[f,b]=(0,d.useState)(null),[v,k]=(0,d.useState)(""),{replaceBlock:y}=(0,u.useDispatch)(i.store),[w,E]=(0,d.useState)(null),[_]=(0,d.useState)((C=m.K)[Math.floor(Math.random()*C.length)]);var C;const x=__("Retry","jetpack"),j=__("Submit","jetpack"),S=w?x:j,{tracks:P}=(0,a.z$)(),{mediaUpload:N}=(0,u.useSelect)((e=>{const{getSettings:t}=e(i.store);return{mediaUpload:t().mediaUpload}}),[]),L=(0,u.useSelect)((e=>e("core/editor").getCurrentPostId())),T=({image:e,inModal:t=!1})=>(0,r.createElement)(c.Flex,{direction:"column"},t&&(0,r.createElement)(c.FlexItem,{style:{"text-align":"center"}},(0,r.createElement)(c.Button,{variant:"primary",onClick:()=>A(e)},__("Use this image","jetpack"))),(0,r.createElement)(c.FlexBlock,null,(0,r.createElement)("img",{className:"wp-block-ai-image-image",src:e,alt:"",onClick:()=>b(e)})),!t&&(0,r.createElement)(c.FlexBlock,null,(0,r.createElement)(c.Flex,{direction:"column",style:{"align-items":"center"}},(0,r.createElement)(c.FlexItem,null,(0,r.createElement)(c.Button,{variant:"primary",onClick:()=>A(e)},__("Use this image","jetpack")))))),A=async t=>{if(s)return;p(!0),E(null);const r=await fetch(t),a=await r.blob(),o=new File([a],"jetpack_ai_image.png",{type:"image/png"});N({filesList:[o],onFileChange:([t])=>{t.id&&y(n,(0,l.createBlock)("core/image",{url:t.url,caption:e.requestedPrompt,alt:e.requestedPrompt}))},allowedTypes:["image"],onError:e=>{console.error(e),p(!1)}}),P.recordEvent("jetpack_ai_dalle_generation_upload",{post_id:L})};return(0,r.createElement)("div",(0,i.useBlockProps)(),(0,r.createElement)(c.Placeholder,{label:__("AI Image","jetpack"),notices:w&&[(0,r.createElement)("div",null,w)]},!s&&0===h.length&&(0,r.createElement)(c.Flex,{expanded:!0},(0,r.createElement)(c.FlexBlock,null,(0,r.createElement)(c.TextareaControl,{label:__("What would you like to see?","jetpack"),placeholder:_,allowedFormats:[],onChange:k,rows:6}),(0,r.createElement)(c.Button,{variant:"primary",onClick:()=>{p(!1),g([]),E(null),function(e,t,n,r,a,s){n(!0),a(null),t({requestedPrompt:e}),o()({path:"/wpcom/v2/jetpack-ai/images/generations",method:"POST",data:{prompt:e,post_id:s}}).then((e=>{n(!1);const t=e.data.map((e=>"data:image/png;base64,"+e.b64_json));r(t)})).catch((e=>{e.message?a(e.message):a(__("Whoops, we have encountered an error. AI is like really, really hard and this is an experimental feature. Please try again later.","jetpack")),n(!1)}))}(""===v.trim()?_:v,t,p,g,E,L),P.recordEvent("jetpack_ai_dalle_generation",{post_id:L})}},S))),!s&&h.length>0&&(0,r.createElement)(c.Flex,{direction:"column",style:{width:"100%"}},(0,r.createElement)(c.FlexBlock,{style:{textAlign:"center",margin:"12px",fontStyle:"italic",width:"100%"}},e.requestedPrompt),(0,r.createElement)(c.FlexBlock,{style:{fontSize:"20px",lineHeight:"38px"}},__("Please choose your image","jetpack")),(0,r.createElement)(c.Flex,{direction:"row",wrap:!0},h.map((e=>(0,r.createElement)(T,{image:e}))))),!s&&f&&(0,r.createElement)(c.Modal,{onRequestClose:()=>b(null)},(0,r.createElement)(T,{image:f,inModal:!0})),e.content&&(0,r.createElement)("div",{className:"content"},e.content),s&&(0,r.createElement)(c.FlexBlock,{style:{padding:"10px",textAlign:"center"}},(0,r.createElement)(c.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}}))))}},6454:(e,t,n)=>{"use strict";var r=n(31985),a=n(41107),s=n(84295);(0,r.S)(a,{edit:s.Z,save:()=>""})},55410:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>g});var r=n(51806),a=n(13419),s=n(86989),o=n.n(s),i=n(52175),l=n(55609),c=n(9818),u=n(69307),d=n(65736),p=n(59958);const __=d.__,m=(e="",t=[],n="",r="")=>{const a=t.filter((function(e){return e&&e.attributes&&e.attributes.content})).map((function(e){return e.attributes.content.replaceAll("
    ","\n")})).join("\n").slice(-1024);if(!(e||a||n||r))return!1;let s="";return s=e?(0,d.sprintf)(/** translators: This will be the beginning of a prompt that will be sent to OpenAI based on the post title. */ __("Please help me write a short piece of a blog post titled '%1$s'","jetpack"),e):__("Please help me write a short piece of a blog post","jetpack"),n&&( diff --git a/_inc/blocks/editor-experimental.asset.php b/_inc/blocks/editor-experimental.asset.php index 1834bf8e9c..0de8dc1897 100644 --- a/_inc/blocks/editor-experimental.asset.php +++ b/_inc/blocks/editor-experimental.asset.php @@ -1 +1 @@ - array('lodash', 'moment', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => '77f959dd51d857cf2c7e'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => '162bf27545f0a9062fad'); diff --git a/_inc/blocks/editor-experimental.js b/_inc/blocks/editor-experimental.js index e26626a39c..a071a53d45 100644 --- a/_inc/blocks/editor-experimental.js +++ b/_inc/blocks/editor-experimental.js @@ -4,9 +4,9 @@ _n("This post will be shared to %d connection.","This post will be shared to %d _n("%d character remaining","%d characters remaining",o,"jetpack"),o)})}},62578:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(55609),a=n(65736),s=n(61074),o=n(6163),i=n(65235),l=n.n(i),c=n(25162),u=n.n(c),d=n(82283);const __=a.__,p=({children:e,type:t="default",actions:n=[],onDismiss:a})=>{const i=l()(d.Z.notice,d.Z[`notice--${t}`]);return React.createElement("div",{className:i},React.createElement("div",{className:d.Z.content}," ",e," "),a&&React.createElement("button",{className:d.Z.dismiss,onClick:a},React.createElement(r.VisuallyHidden,null,__("Dismiss notice","jetpack")),React.createElement(s.Z,{icon:o.Z})),n&&n.length>0&&React.createElement("div",{className:d.Z.actions},n.map((e=>e))))};p.propTypes={children:u().node.isRequired,type:u().oneOf(["default","highlight","warning","error"]),actions:u().arrayOf(u().element),onDismiss:u().func};const m=p},8714:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(55609),a=n(9818),s=n(12238),o=n(69307),i=n(65736),l=n(14085),c=n(86419),u=n(37568),d=n(49021),p=n(95788),m=n(3176),h=n(91474),g=n(23761);const __=i.__,f=({prePublish:e,children:t})=>{const{refresh:n,hasConnections:i,hasEnabledConnections:f}=(0,u.Z)(),b=(0,a.useSelect)((e=>e(s.store).isCurrentPostPublished()),[]),{isPublicizeEnabled:v,hidePublicizeFeature:k,togglePublicizeFeature:y}=(0,l.Z)();(0,c.M1)((function(){f&&n()}),[f,n]);const w=e?o.Fragment:r.PanelBody,E=e?{}:{title:__("Share this post","jetpack"),className:g.Z.panel};return React.createElement(w,E,t,!k&&React.createElement(o.Fragment,null,!b&&React.createElement(r.ToggleControl,{label:v?__("Share when publishing","jetpack"):__("Sharing is disabled","jetpack",0),onChange:y,checked:v,disabled:!i}),React.createElement(d.Z,null),React.createElement(p.Z,null),React.createElement(h.o,null)),b&&React.createElement(m.u,null))}},91750:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(88275),a=n(13419),s=n(9818),o=n(72067),i=n(12238),l=n(65736),c=n(37548),u=n(34607),d=n(45078);const __=l.__;function p(){const{isCurrentPostPublished:e}=(0,s.useSelect)((e=>e(i.store)),[]);return e()?React.createElement(o.PluginPostPublishPanel,{initialOpen:!0,title:__("Manual sharing","jetpack"),id:"publicize-manual-sharing",icon:React.createElement(a.Pm,null)},React.createElement(r.ZP,null,React.createElement(c.T,{className:d.Z.description,variant:"body-small"}),React.createElement(u.n,null))):null}},52403:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(6895),a=n(13419),s=n(86989),o=n.n(s),i=n(72067),l=n(69307),c=n(14085),u=n(86419),d=n(37568),p=n(19649);const m=()=>{const[e,t]=(0,l.useState)((0,a.Pb)()?.social?.reviewRequestDismissed??!0),[n,s]=(0,l.useState)(!1),{hasEnabledConnections:m}=(0,d.Z)(),{isPublicizeEnabled:h,isPostAlreadyShared:g}=(0,c.Z)();(0,u.e3)((()=>{s(!g&&h&&m)}),[g,m,h]);const f=(0,l.useCallback)((()=>{const e=(0,a.Pb)()?.social?.dismissReviewRequestPath??null;o()({path:e,method:"POST",data:{dismissed:!0}}).catch((e=>{throw e})),t(!0)}),[]);return e||!n?null:React.createElement(i.PluginPostPublishPanel,{id:"publicize-title"},React.createElement(p.Z,{href:(0,r.Z)("jetpack-social-plugin-reviews"),onClose:f}))}},77106:(e,t,n)=>{"use strict";n(9818),n(23177)},19649:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(88275),a=n(90526),s=n(13419),o=n(65736),i=n(99196),l=n(2097);const __=o.__,c=({href:e,onClose:t})=>{const{recordEvent:n}=(0,s.z$)({pageViewEventName:"social_plugin_review_prompt",pageViewNamespace:"jetpack",pageViewSuffix:"view"}),c=(0,i.useCallback)((()=>{n("jetpack_social_plugin_review_prompt_new_review_click")}),[n]),u=(0,i.useCallback)((()=>{n("jetpack_social_plugin_review_prompt_dismiss_click"),t()}),[n,t]);return React.createElement(r.ZP,null,React.createElement("div",{className:l.Z.prompt},React.createElement("h2",{className:l.Z.header},/* translators: %s is the celebration emoji */ /* translators: %s is the celebration emoji */ (0,o.sprintf)(__("Presto! %s","jetpack"),String.fromCodePoint(127881))),React.createElement("p",null,__("Just like that, Jetpack Social has shared your post to your connected social accounts.","jetpack")),React.createElement("p",null,__("Please leave a review to let others know how easy getting your posts on social media can be!","jetpack")),React.createElement("div",{className:l.Z.buttons},React.createElement(a.Z,{onClick:c,isExternalLink:!0,href:e,className:l.Z.button},__("Leave a Review","jetpack")),React.createElement(a.Z,{onClick:u,variant:"link",className:l.Z.button},__("Dismiss","jetpack")))))}},69709:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(65736),a=n(14085),s=n(78619);const __=r.__;function o(){const{connectionsAdminUrl:e}=(0,a.Z)();return React.createElement("a",{className:s.Z["settings-link"],href:e,target:"_blank",rel:"noreferrer",title:__("Connect an account","jetpack")},React.createElement("svg",{width:"24",height:"24",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("rect",{x:"0.375",y:"0.375",width:"27.25",height:"27.25",rx:"1.125",fill:"#F6F7F7"}),React.createElement("path",{d:"M19 13.3333H14.6667V9H13.3333V13.3333H9V14.6667H13.3333V19H14.6667V14.6667H19V13.3333Z",fill:"black"}),React.createElement("rect",{x:"0.375",y:"0.375",width:"27.25",height:"27.25",rx:"1.125",stroke:"#A7AAAD",strokeWidth:"0.75",strokeDasharray:"2 2"})))}},2817:(e,t,n)=>{"use strict";n.d(t,{o:()=>a});var r=n(65736);const __=r.__,a=[{label:__("X","jetpack"),networkName:"x",url:"https://x.com/intent/tweet?text={{text}}&url={{url}}"},{label:__("WhatsApp","jetpack"),networkName:"whatsapp",url:"https://api.whatsapp.com/send?text={{text}}"},{label:__("Facebook","jetpack"),networkName:"facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"}]},22917:(e,t,n)=>{"use strict";n(34607)},34607:(e,t,n)=>{"use strict";n.d(t,{n:()=>g});var r=n(3396),a=n(90526),s=n(45106),o=n(14203),i=n(13419),l=n(69307),c=n(65736),u=n(65235),d=n.n(u),p=n(2817),m=n(30664),h=n(38730);const __=c.__;function g({buttonStyle:e="icon",buttonVariant:t}){const n=(0,h.S)(),{recordEvent:u}=(0,i.z$)(),g=(0,l.useCallback)((()=>{u("jetpack_social_share_button_clicked",{network:"clipboard"})}),[u]),f=(0,l.useCallback)((()=>n("{{text}}\n{{url}}",!1)),[n]),b=(0,l.useCallback)((function(e,t){return function(n){n.preventDefault(),u("jetpack_social_share_button_clicked",t),window.open(e,"","menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600")}}),[u]);return React.createElement("div",{className:d()(m.Z["share-buttons"],{[m.Z.vertical]:e.includes("text")})},p.o.map((({label:o,networkName:i,url:l})=>{const u=n(l),d="icon"===e?React.createElement(r.av,{serviceName:i}):null,p=(0,c.sprintf)(/* translators: %s is the name of a social network, e.g. Twitter. */ __("Share on %s","jetpack"),o);return React.createElement("div",{className:m.Z.container,key:i},React.createElement(a.Z,{icon:d,variant:t,"aria-label":p,href:u,target:"_blank",rel:"noopener noreferrer",onClick:b(u,{network:i}),className:"icon"===e?m.Z[i]:"has-text"},"icon"===e?null:React.createElement(React.Fragment,null,"icon-text"===e&&React.createElement(r.av,{className:m.Z[i],serviceName:i}),React.createElement(s.ZP,{className:m.Z.label,component:"span"},p))))})),React.createElement("div",{className:m.Z.container},React.createElement(o.Z,{buttonStyle:e,onCopy:g,textToCopy:f,className:"icon"===e?m.Z.clipboard:" has-text",variant:t},"icon"===e?null:React.createElement(s.ZP,{className:m.Z.label,component:"span"},__("Copy to clipboard","jetpack")))))}},38730:(e,t,n)=>{"use strict";n.d(t,{S:()=>o});var r=n(9818),a=n(69307),s=n(71806);function o(){const{shareMessage:e}=(0,s.R)(),{message:t,link:n}=(0,r.useSelect)((t=>{const n=t("core/editor").getEditedPostAttribute;return{link:n("link"),message:e||n("meta")?.jetpack_seo_html_title||n("title")}}),[e]);return(0,a.useCallback)(((e,r=!0)=>{let a=t,s=n;return e.includes("{{url}}")||(a=a+"\n\n"+s,s=""),r&&(a=encodeURIComponent(a),s=encodeURIComponent(s)),e.replace("{{text}}",a).replace("{{url}}",s)}),[n,t])}},32637:(e,t,n)=>{"use strict";n.d(t,{r:()=>d});var r=n(43521),a=n(69307),s=n(65736),o=n(65235),i=n.n(o),l=n(73640);const __=s.__,_x=s._x,c={error:"var(--jp-red-50)",warning:"var(--jp-yellow-20)",default:"var(--jp-green)"},u={error:"var(--jp-red-50)",warning:"var(--jp-yellow-20)",default:"var(--jp-green-5)"},d=({usedCount:e,scheduledCount:t,remainingCount:n,className:s,noticeType:o="default",legendCaption:d})=>{const p=(0,a.useMemo)((()=>{const r=__("scheduled","jetpack"),a=__("used or scheduled","jetpack");return[("default"===o||0===t)&&{count:e,backgroundColor:c[o],label:__("used","jetpack")},t>0&&{count:"default"===o?t:t+e,backgroundColor:u[o],label:"default"===o?r:a},{count:n,backgroundColor:"var(--jp-gray-off)",label:_x("left","Referring to the quantity remaning, not the direction - left/right.","jetpack")}].filter(Boolean)}),[e,o,t,n]);return React.createElement("div",{className:i()(l.Z.wrapper,s)},React.createElement(r.Z,{totalCount:e+t+n,items:p,className:l.Z["bar-wrapper"],tableCaption:d,legendTitle:d,recordTypeLabel:__("Share type","jetpack"),recordCountLabel:__("Usage","jetpack")}))}},91474:(e,t,n)=>{"use strict";n.d(t,{o:()=>h});var r=n(55609),a=n(9818),s=n(12238),o=n(69307),i=n(65736),l=n(53961),c=n(14085),u=n(45579),d=n(37568);const __=i.__;function p(e=__("Unable to share the Post","jetpack")){const{createErrorNotice:t}=(0,a.dispatch)(l.store);t(e,{id:"publicize-post-share-message"})}function m(){const{hasEnabledConnections:e}=(0,d.Z)(),{isPublicizeEnabled:t}=(0,c.Z)(),{isFetching:n,isError:i,isSuccess:m,doPublicize:h}=(0,u.Z)(),g=(0,a.useSelect)((e=>e(s.store).isCurrentPostPublished()),[]);(0,o.useEffect)((()=>{if(!n)return i?p():void(m&&function(){const{createSuccessNotice:e}=(0,a.dispatch)(l.store);e(__("Post shared","jetpack"),{id:"publicize-post-share-message",type:"snackbar"})}())}),[n,i,m]);const f=!t||!e||!g||n,b=(0,o.useCallback)((()=>{if(!g)return p(__("You must publish your post before you can share it.","jetpack"));(0,a.dispatch)(l.store).removeNotice("publicize-post-share-message"),h()}),[h,g]);return React.createElement(r.Button,{variant:"secondary",onClick:b,disabled:f,isBusy:n},__("Share post","jetpack"))}function h(){const{isRePublicizeUpgradableViaUpsell:e}=(0,c.Z)();return(0,a.useSelect)((e=>e(s.store).isCurrentPostPublished()),[])?e?null:React.createElement(r.PanelRow,null,React.createElement(m,null)):null}},54005:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(55609),a=n(69307),s=n(65736),o=n(75263),i=n(9888),l=n(81469);const __=s.__,c=({prePublish:e=!1})=>{const t=e?a.Fragment:r.PanelBody,n=e?{}:{title:__("Social Image Generator","jetpack")},{isEnabled:s,setIsEnabled:c}=(0,o.Z)(),[u,d]=(0,a.useState)(!1),p=(0,a.useCallback)((()=>d(!0)),[]),m=(0,a.useCallback)((()=>d(!1)),[]);return React.createElement(t,n,u&&React.createElement(l.Z,{onClose:m}),React.createElement(r.ToggleControl,{label:__("Enable Social Image","jetpack"),help:s?"":__("Social Image is disabled for this post.","jetpack"),checked:s,onChange:c}),s&&React.createElement(React.Fragment,null,React.createElement("hr",null),React.createElement(i.ZP,null),React.createElement("hr",null),React.createElement(r.Button,{variant:"secondary",onClick:p,label:__("Open the Social Image Generator settings","jetpack")},__("Settings","jetpack"))))}},81469:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(88275),a=n(55609),s=n(69307),o=n(65736),i=n(75263),l=n(98811),c=n(9888),u=n(88649),d=n(39356),p=n(40088);const __=o.__,m=["image/jpeg","image/png"],h=__("Choose Image","jetpack"),g=({onClose:e})=>{const{customText:t,imageType:n,imageId:o,template:g,updateSettings:f}=(0,i.Z)(),[b,v]=(0,s.useState)(o),[k,y]=(0,s.useState)(n||"featured"),[w,E]=(0,s.useState)(t),[_,C]=(0,s.useState)(g),[x]=(0,l.Z)(b),S=(0,s.useCallback)((()=>{f({template:_,image_type:k,custom_text:w||"",..."custom"===k&&{image_id:b}}),e()}),[f,_,k,b,w,e]),j=(0,s.useCallback)((e=>{v(e?.id)}),[v]);return React.createElement(r.ZP,{targetDom:document.body},React.createElement(a.Modal,{onRequestClose:e},React.createElement(c.ZP,{className:p.Z.preview,imageId:b,customText:w,imageType:k,template:_}),React.createElement(a.SelectControl,{label:__("Image Type","jetpack"),value:k||"featured",options:[{label:__("Featured Image","jetpack"),value:"featured"},{label:__("Custom Image","jetpack"),value:"custom"},{label:__("No Image","jetpack"),value:"none"}],onChange:y}),"custom"===k&&React.createElement(u.Z,{buttonLabel:h,subTitle:__("Add a custom image","jetpack"),mediaId:b,mediaDetails:x,onChange:j,allowedMediaTypes:m,wrapperClassName:p.Z.mediaPicker}),React.createElement(a.TextControl,{className:p.Z.customText,value:w||"",onChange:E,label:__("Custom Header","jetpack"),help:__("By default the post title is used for the image. You can use this field to set your own text.","jetpack")}),React.createElement(a.BaseControl,{label:__("Templates","jetpack"),className:p.Z.templateControl},React.createElement(d.Z,{value:_,onTemplateSelected:C})),React.createElement(a.Button,{onClick:e,variant:"tertiary"},__("Cancel","jetpack")),React.createElement(a.Button,{onClick:S,variant:"primary"},__("Save","jetpack"))))}},79631:(e,t,n)=>{"use strict";n(9818),n(69307),n(65736),n(99196),n(23177),n(8350)},8350:(e,t,n)=>{"use strict";n(55609),n(69307),n(65736),n(39356),n(15214)},39356:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(69307),a=n(65736),s=n(65235),o=n.n(s),i=n(47320),l=n(57227);const __=a.__,c=({value:e=null,onTemplateSelected:t=null})=>{const n=(0,r.useCallback)((e=>{const n=e.target.id;t?.(n)}),[t]);return React.createElement("div",{className:i.Z.templates},l.Z.map((t=>React.createElement("button",{onClick:n,id:t.name,key:t.name,className:o()(i.Z.template,{[i.Z["template--active"]]:t.name===e})},React.createElement("img",{src:t.image,alt:t.label}),React.createElement("span",{className:"screen-reader-text"},/* translators: %s is the name of the template */ /* translators: %s is the name of the template */ -(0,a.sprintf)(__("Pick the %s template","jetpack"),t.label))))))}},57227:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(30253),a=n(91948),s=n(5353);const o=[{name:"highway",label:"Highway",image:n(27956)},{name:"dois",label:"Dois",image:r},{name:"edge",label:"Edge",image:a},{name:"fullscreen",label:"Fullscreen",image:s}]},76848:(e,t,n)=>{"use strict";n(9818),n(69307),n(99196),n(23177)},53513:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(88275),a=n(55609),s=n(69307),o=n(65736),i=n(88219),l=n(89696);const __=o.__,c=__("You need a featured image or media attached to your post to be able to share as a social post.","jetpack"),u=__("By default, the image and text appear on social media as a link preview. To optimize engagement, share as a social post.","jetpack");function d({disabled:e=!1}){const{shouldUploadAttachedMedia:t,updateShouldUploadAttachedMedia:n}=(0,i.Z)(),o=(0,s.useCallback)((e=>{n(e)}),[n]),d=e?a.Disabled:s.Fragment,p=e?{className:l.Z.disabled}:{};return React.createElement(r.ZP,null,React.createElement(d,p,React.createElement(a.CheckboxControl,{className:l.Z.checkbox,checked:t,onChange:o,label:__("Share as a social post","jetpack"),help:e?c:u})))}},63855:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(82674),a=n.n(r),s=n(13477),o=n(9818),i=n(48751),l=n(23177);const c=(0,o.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{excerpt:t("excerpt"),content:t("content").split("\x3c!--more")[0]}}))((e=>{const{message:t}=(0,i.Z)(),{title:n,excerpt:r,content:c}=e,u=(0,o.useSelect)((e=>{const{displayName:t,profileImage:n}=e(l.Eg).getConnectionProfileDetails(l.uJ);return{displayName:t,avatarUrl:n}}));return React.createElement(s.S,a()({},e,{type:"article",user:u,customText:t||r||c||n}))}))},83704:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(82674),a=n.n(r),s=n(17915),o=n(9818),i=n(22629),l=n(99196),c=n.n(l);const u=function(e){const t=(0,o.useSelect)((e=>{const{getEntityRecord:t}=e("core");return(0,i.decodeEntities)(t("root","site").title)}));return c().createElement(s.X,a()({},e,{siteTitle:t}))}},4124:(e,t,n)=>{"use strict";n.d(t,{m:()=>c});var r=n(4049),a=n(9818),s=n(99196),o=n.n(s),i=n(48751),l=n(23177);function c(e){const{title:t,image:n,media:s}=e,{username:c,profileImage:u}=(0,a.useSelect)((e=>e(l.Eg).getConnectionProfileDetails(l.M$))),{message:d}=(0,i.Z)(),p=d||t;return o().createElement(r.V,{image:n,media:s,name:c,profileImage:u,caption:p})}},27725:(e,t,n)=>{"use strict";n.d(t,{y:()=>u});var r=n(93453),a=n(9818),s=n(65736),o=n(99196),i=n.n(o),l=n(48751),c=n(23177);const __=s.__;function u(e){const{title:t,url:n,image:s,media:o}=e,{displayName:u,profileImage:d}=(0,a.useSelect)((e=>e(c.Eg).getConnectionProfileDetails(c.qk))),{message:p}=(0,l.Z)(),m=`${p||t} ${o.length?n:""}`.trim();return i().createElement(r.S,{jobTitle:__("Job Title (Company Name)","jetpack"),image:s,name:u,profileImage:d,title:t,description:m,url:n,media:o})}},28586:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(82674),a=n.n(r),s=n(60312),o=n(9818),i=n(22629),l=n(71806),c=n(48751),u=n(23177);const d=e=>{const{message:t}=(0,c.Z)(),{content:n,siteName:r}=(0,o.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor"),{getSite:n}=e("core");return{content:t("content").split("\x3c!--more")[0],siteName:(0,i.decodeEntities)(n().title)}})),{shouldUploadAttachedMedia:d}=(0,l.R)(),p=(0,o.useSelect)((e=>{const{displayName:t,profileImage:n,username:r}=e(u.Eg).getConnectionProfileDetails(u.cs);return{displayName:t,avatarUrl:n,address:r}})),m=e.media?.[0],h=m?.type.startsWith("image/")?m.url:null;return React.createElement(s.I,a()({},e,{siteName:r,user:p,description:n,customText:t,customImage:h,isSocialPost:d}))}},8454:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(55609),a=n(65736),s=n(39517),o=n(41809),i=n(9279);const __=a.__,l=function({onClose:e,initialTabName:t}){const n=(0,o.P)(),{image:a,media:l,title:c,description:u,url:d}=(0,i.u)();return React.createElement(r.Modal,{onRequestClose:e,className:"jetpack-social-previews__modal",__experimentalHideHeader:!0},React.createElement(r.Button,{className:"jetpack-social-previews__modal--close-btn",onClick:e,icon:s.Z,label:__("Close","jetpack")}),React.createElement(r.TabPanel,{className:"jetpack-social-previews__modal-previews",tabs:n,initialTabName:t},(e=>React.createElement("div",null,React.createElement(e.preview,{title:c,description:u,url:d,image:a,media:l})))))}},18553:(e,t,n)=>{"use strict";n.d(t,{T:()=>c});var r=n(93122),a=n(9818),s=n(99196),o=n.n(s),i=n(48751),l=n(23177);function c(e){const{title:t,url:n,image:s,media:c}=e,{displayName:u,profileImage:d}=(0,a.useSelect)((e=>e(l.Eg).getConnectionProfileDetails(l.Cd))),{message:p}=(0,i.Z)(),m=`${p||t} ${c.length?n:""}`.trim();return o().createElement(r.m,{image:s,name:u,profileImage:d,title:t,description:m,url:n,media:c})}},74140:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(55609),a=n(65736),s=n(41809);const __=a.__,_x=a._x,o=({openModal:e})=>{const t=(0,s.P)();return React.createElement("div",{className:"jetpack-social-previews__panel"},React.createElement("p",null,__("Preview what this will look like on social networks and Google search.","jetpack")),React.createElement("div",{className:"jetpack-gutenberg-social-icons"},t.map((e=>React.createElement(e.icon,{key:e.name,className:"jetpack-social-previews__icon"})))),React.createElement(r.Button,{variant:"secondary",onClick:e,label:__("Open Social Previews","jetpack")},_x("Preview","Button label that opens the social previews modal","jetpack")))}},94714:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(82674),a=n.n(r),s=n(1044),o=n(9818),i=n(48751),l=n(23177);const c=e=>{const{content:t,author:n}=(0,o.useSelect)((e=>{const{getUser:t}=e("core"),{getEditedPostAttribute:n}=e("core/editor"),r=n("author"),a=r&&t(r);return{content:n("content").split("\x3c!--more")[0],author:a?.name}})),{message:r}=(0,i.Z)(),c=(0,o.useSelect)((e=>{const{displayName:t,profileImage:r}=e(l.Eg).getConnectionProfileDetails(l.Bb);return{displayName:t||n,avatarUrl:r}}),[n]);return React.createElement(s.b,a()({},e,{user:c,description:t,customText:r}))}},24766:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(835),a=n(9818),s=n(99196),o=n.n(s),i=n(71806),l=n(23177);const c=function({title:e,description:t,image:n,url:s,media:c}){const{shareMessage:u}=(0,i.R)(),d=(0,a.useSelect)((r=>{const{displayName:a,profileImage:o,username:i}=r(l.Eg).getConnectionProfileDetails(l.wV);return[{name:a,profileImage:o,screenName:i,text:u+(c.length?` ${s}`:""),cardType:n?"summary_large_image":"summary",title:e,description:t,image:n,media:c,url:s}]}),[e,n,t,c,s,u]);return o().createElement(r.c,{tweets:d,hidePostPreview:!0})}},41809:(e,t,n)=>{"use strict";n.d(t,{P:()=>k});var r=n(82674),a=n.n(r),s=n(3396),o=n(65736),i=n(99196),l=n.n(i),c=n(23177),u=n(42032),d=n(63855),p=n(83704),m=n(4124),h=n(27725),g=n(28586),f=n(18553),b=n(94714),v=n(24766);const __=o.__;function k(){const e=(0,u.getSupportedAdditionalConnections)(),t=e.includes(c.M$),n=e.includes(c.cs),r=e.includes(c.Cd);return(0,i.useMemo)((()=>[{title:__("Google Search","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"google"},e)),name:"google",preview:p.Z},{title:__("X","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"x"},e)),name:"x",preview:v.Z},{title:__("Facebook","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"facebook"},e)),name:"facebook",preview:d.Z},t?{title:__("Instagram","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"instagram"},e)),name:"instagram",preview:m.m}:null,{title:__("LinkedIn","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"linkedin"},e)),name:"linkedin",preview:h.y},r?{title:__("Nextdoor","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"nextdoor"},e)),name:"nextdoor",preview:f.T}:null,{title:__("Tumblr","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"tumblr-alt"},e)),name:"tumblr",preview:b.Z},n?{title:__("Mastodon","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"mastodon"},e)),name:"mastodon",preview:g.Z}:null].filter(Boolean)),[t,n,r])}},9279:(e,t,n)=>{"use strict";n.d(t,{u:()=>l});var r=n(9818),a=n(65736),s=n(71806),o=n(90785),i=n(25399);const __=a.__;function l(){const{attachedMedia:e,imageGeneratorSettings:t,shouldUploadAttachedMedia:n}=(0,s.R)();return(0,r.useSelect)((r=>{const{getMedia:a}=r("core"),{getEditedPostAttribute:s,getEditedPostContent:l}=r("core/editor"),c=s("featured_media");let u=c?(0,i.i)(a(c)):"";const d=t.enabled?(0,o.t)(t.token):"";if(d)u=d;else if(e?.[0]?.id){const[t]=e;!!t.id&&a(t.id)?.mime_type?.startsWith("image/")&&t.url&&(u=t.url)}if(!u){const e=(0,i.T)(l());e&&(u=e)}const p=[];if(n)if(d)p.push({type:"image/jpeg",url:d,alt:""});else{const t=e=>{const t=a(e);return t?{type:t.mime_type,url:(0,i.i)(t),alt:t.alt_text}:null};for(const{id:n}of e){const e=t(n);e&&p.push(e)}if(0===p.length&&c){const e=t(c);e&&p.push(e)}}return{title:s("meta")?.jetpack_seo_html_title||s("title"),description:s("meta")?.advanced_seo_description||s("excerpt")||s("content").split("\x3c!--more")[0]||__("Visit the post for more.","jetpack"),url:s("link"),image:u,media:p,initialTabName:null}}),[n,e,t])}},25399:(e,t,n)=>{"use strict";function r(e){return e?e.media_details?.sizes?.large?.source_url||e.source_url:null}function a(e){const t=(new DOMParser).parseFromString(e,"text/html"),n=Array.from(t.querySelectorAll("img")),r=n[0]?.src;return r??null}n.d(t,{T:()=>a,i:()=>r})},13858:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(69307),a=n(87728);const s=({sourceUrl:e,mime:t,duration:n})=>{const[s,o]=(0,r.useState)(!1),[i,l]=(0,r.useState)(0),c=(0,r.useRef)(null),u=(0,r.useRef)(null),d=(0,r.useRef)(null);(0,r.useEffect)((()=>{c.current?.load()}),[e]);const p=(0,r.useCallback)((()=>{c.current.pause(),c.current.currentTime=0,clearInterval(u.current),clearTimeout(d.current),l(0),o(!1)}),[]),m=(0,r.useCallback)((()=>{d.current=setTimeout((()=>{s||(c.current.play(),o(!0),u.current=setInterval((()=>{l((e=>e+1))}),1e3))}),500)}),[s]),h=()=>{const e=n-i,t=Math.floor(e/60),r=String(Math.floor(e%60)).padStart(2,"0");return React.createElement("div",{className:a.Z.progress},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"8",fill:"none"},React.createElement("path",{fill:"#fff",d:"M5.25 3.567a.5.5 0 0 1 0 .866L.75 7.031A.5.5 0 0 1 0 6.598V1.402A.5.5 0 0 1 .75.969l4.5 2.598Z"})),React.createElement("span",{className:a.Z.duration},`${t}:${r}`))};return React.createElement("div",{className:a.Z.wrapper,onMouseEnter:m,onMouseLeave:p},React.createElement("video",{ref:c,onEnded:p,muted:!0},React.createElement("source",{src:e,type:t})),React.createElement(h,null))}},88219:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(71806);function a(){const{attachedMedia:e,shouldUploadAttachedMedia:t,updateJetpackSocialOptions:n}=(0,r.R)();return{attachedMedia:e,shouldUploadAttachedMedia:t,updateAttachedMedia:e=>n("attached_media",e),updateShouldUploadAttachedMedia:e=>n("should_upload_attached_media",e)}}},75323:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(13419),a=n(86989),s=n.n(a),o=n(69307);const i={instagram:"instagram",advancedUpgradeEditor:"advanced-upgrade-nudge-editor",advancedUpgradeAdmin:"advanced-upgrade-nudge-admin",autoConversion:"auto-conversion-editor-notice"},l=e=>-1===e?0:new Date(Date.now()+1e3*e).getTime();function c(){const[e,t]=(0,o.useState)((()=>(0,r.Pb)()?.social?.dismissedNotices??window?.jetpackSocialInitialState?.jetpackSettings?.dismissedNotices??{})),n=(0,o.useCallback)(((e,n=-1)=>{const r=l(n);t((t=>({...t,[e]:r}))),s()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_dismissed_notices:{[e]:r}}})}),[]),a=(0,o.useCallback)((t=>{const n=e[t];return!(0===n||n>Date.now())}),[e]);return(0,o.useMemo)((()=>({dismissedNotices:e,shouldShowNotice:a,dismissNotice:n,NOTICES:i})),[e,a,n])}},39118:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(9818),a=n(12238);const s=()=>(0,r.useSelect)((e=>e(a.store).getEditedPostAttribute("featured_media")))},75263:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9818),a=n(12238),s=n(69307),o=n(71806);const i=(e,t)=>({isEnabled:e?.enabled??!t,customText:e?.custom_text??null,imageType:e?.image_type??null,imageId:e?.image_id??null,template:e?.template??null,token:e?.token??null});function l(){const{imageGeneratorSettings:e,jetpackSocialOptions:t,updateJetpackSocialOptions:n}=(0,o.R)(),{isPostPublished:l}=(0,r.useSelect)((e=>({isPostPublished:e(a.store).isCurrentPostPublished()}))),c=(0,s.useCallback)(((t,r)=>{const a={...e,[t]:r};n("image_generator_settings",a)}),[e,n]),u=(0,s.useCallback)((t=>{const r={...e,...t};n("image_generator_settings",r)}),[e,n]);return{...i(t.image_generator_settings,l),setIsEnabled:e=>c("enabled",e),setToken:e=>c("token",e),updateSettings:u}}},98811:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9818),a=n(69307);const s=async e=>{if(!e)return{};let t={mime:e.mime_type,fileSize:e.media_details.filesize,length:e.media_details?.length};"video/videopress"===e.mime_type&&(t=await(async e=>{if(!e?.media_details?.videopress?.original||!e?.media_details?.videopress?.duration)return{};const t=await fetch(e?.media_details?.videopress?.original,{method:"HEAD"}),n=t.headers.get("content-length"),r=t.headers.get("content-type");return n&&r?{mime:r,fileSize:n,length:Math.round(e.media_details.videopress.duration/1e3)}:{}})(e));const n=e?.media_details?.sizes??{};if(!n.full)return{mediaData:{width:e.media_details.width,height:e.media_details.height,sourceUrl:e.source_url},metaData:t};const r=n.medium||n.large,a={width:r.width,height:r.height,sourceUrl:r.source_url};return{mediaData:{width:n.full.width,height:n.full.height,sourceUrl:n.full.source_url},metaData:t,previewData:a}};function o(e=null){const[t,n]=(0,a.useState)([{}]),o=(0,r.useSelect)((t=>t("core").getMedia(e,{context:"view"})),[e]),i=(0,a.useCallback)((async()=>{try{const e=await s(o);n([e??{}])}catch{n([{}])}}),[o]);return(0,a.useEffect)((()=>{i()}),[i]),t}},46791:(e,t,n)=>{"use strict";n.d(t,{Wv:()=>l,ZP:()=>d,rs:()=>s});var r=n(69307),a=n(1795);const s="NO_MEDIA_ERROR",o="FILE_SIZE_ERROR",i="DIMENSION_ERROR";function l(e){return"video"===e.split("/")[0]}const c=e=>{if(!e?.mime||!e?.fileSize)return!1;const{mime:t,fileSize:n}=e;if(l(t))return!1;if(!a.bD.includes(t))return!1;return!((n?n/Math.pow(1e3,2):null)>=55)},u=(e,t,n,r)=>{const c=a.$8[n]??a.ay;if(!e||0===Object.keys(e).length)return c.requiresMedia?s:null;if(!c.requiresMedia&&!r)return null;const{mime:u,fileSize:d}=e;if(!u||!c.allowedMediaTypes.includes(u.toLowerCase()))return"FILE_TYPE_ERROR";if(!t?.width||!t?.height)return i;const p=d?d/Math.pow(1e3,2):null;return l(u)?((e,t,n,r,s)=>{const{minSize:l=0,maxSize:c=a.zc,minLength:u=0,maxLength:d=a.zc,maxWidth:p=a.zc,aspectRatio:m=a.ay.video.aspectRatio}=s;if(!e||e>c||ed)return"VIDEO_LENGTH_TOO_LONG_ERROR";const h=n/r;return hm.max||n>p?i:null})(p,e.length,t.width,t.height,c.video):((e,t,n,r)=>{const{maxSize:s=a.zc,minWidth:l=0,maxWidth:c=a.zc,aspectRatio:u=a.ay.image.aspectRatio}=r,d=t/n;return du.max||t>c||ts?o:null})(p,t.width,t.height,c.image)},d=(e,t,{isSocialImageGeneratorEnabledForPost:n,shouldUploadAttachedMedia:a})=>{const s=(0,r.useRef)({});return(0,r.useMemo)((()=>{const r=n?{}:e.reduce(((e,{connection_id:n,service_name:r})=>{const s=u(t.metaData,t.mediaData,r,a);return s&&(e[n]=s),e}),{});return JSON.stringify(r)!==JSON.stringify(s.current)&&(s.current=r),{validationErrors:s.current,isConvertible:c(t.metaData)}}),[n,e,t.metaData,t.mediaData,a])}},1795:(e,t,n)=>{"use strict";n.d(t,{$8:()=>g,ay:()=>h,bD:()=>f,uo:()=>b,zc:()=>m});const r="video/mp4",a="video/mov",s="video/videopress",o=["image/jpeg","image/jpg","image/png"],i=o.concat(["image/gif","image/bmp"]),l=["video/3g2","video/3gp","video/3gpp","video/asf","video/avi","video/dat","video/divx","video/dv","video/f4v","video/flv","video/gif","video/m2ts","video/m4v","video/mkv","video/mod","video/mov","video/mp4","video/mpe","video/mpeg","video/mpeg4","video/mpg","video/mts","video/nsv","video/ogm","video/ogv","video/qt","video/tod","video/ts","video/vob","video/wmv"],c=o.concat(["image/gif","image/heic","image/heif","image/webp","image/avif"]),u=["video/webm","video/quicktime","video/ogg"],d=o.concat(["image/gif","image/jpe","image/tif","image/tiff","image/webp"]),p=[a,"video/avi","video/mpg","video/mpeg","video/m4v"],m=1e5,h={requiresMedia:!1,allowedMediaTypes:o.concat([r,s,a]),image:{maxSize:4,minWidth:0,maxWidth:m,aspectRatio:{min:0,max:m}},video:{minLength:0,minSize:0,maxSize:m,maxLength:m,maxWidth:m,aspectRatio:{min:0,max:m}}},g={twitter:{allowedMediaTypes:o.concat([r,s]),image:{maxSize:5},video:{maxSize:512,maxLength:140}},facebook:{allowedMediaTypes:i.concat([s,...l]),image:{maxSize:8},video:{maxSize:1e4,maxLength:14400}},tumblr:{allowedMediaTypes:o.concat([r,a,s]),image:{maxSize:20},video:{maxSize:500,maxLength:600}},linkedin:{allowedMediaTypes:o.concat([r,s]),image:{maxSize:20},video:{minSize:.075,maxSize:200,maxLength:600,minLength:3}},"instagram-business":{requiresMedia:!0,allowedMediaTypes:["image/jpg","image/jpeg",r,a,s],image:{maxSize:8,minWidth:320,maxWidth:1440,aspectRatio:{min:.8,max:1.91}},video:{maxLength:90,minLength:3,maxSize:1e3,maxWidth:1920,aspectRatio:{min:.01,max:10}}},mastodon:{allowedMediaTypes:c.concat([...u,r,s]),image:{maxSize:10},video:{maxSize:40}},nextdoor:{allowedMediaTypes:d.concat([...p,r,s]),image:{maxSize:10},video:{maxSize:500}}},f=["image/png","image/jpeg","image/jpg","image/heic","image/heif","image/webp"],b=[...new Set([...o,...i,...c,...l,...u,...f])]},71806:(e,t,n)=>{"use strict";n.d(t,{R:()=>i});var r=n(9818),a=n(12238),s=n(69307),o=n(42032);function i(){const{editPost:e}=(0,r.useDispatch)(a.store),t=(0,r.useSelect)((e=>{const t=e(a.store).getEditedPostAttribute("meta")||{},n=t.jetpack_publicize_feature_enabled??!0,r=t.jetpack_social_options||{};return{isPublicizeEnabled:n,jetpackSocialOptions:r,attachedMedia:r.attached_media||[],imageGeneratorSettings:r.image_generator_settings??{enabled:!1},isPostAlreadyShared:t.jetpack_social_post_already_shared??!1,shareMessage:`${t.jetpack_publicize_message||""}`.substring(0,(0,o.getShareMessageMaxLength)()),shouldUploadAttachedMedia:r.should_upload_attached_media??!1}}),[]),n=(0,s.useCallback)(((t,n)=>{e({meta:{[t]:n}})}),[e]),i=(0,s.useCallback)((()=>{n("jetpack_publicize_feature_enabled",!t.isPublicizeEnabled)}),[t.isPublicizeEnabled,n]),l=(0,s.useCallback)(((e,r)=>{n("jetpack_social_options",{...t.jetpackSocialOptions,[e]:r})}),[t.jetpackSocialOptions,n]);return(0,s.useMemo)((()=>({...t,togglePublicizeFeature:i,updateJetpackSocialOptions:l,updateMeta:n})),[t,i,l,n])}},14085:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(13419),a=n(9818),s=n(12238),o=n(71806);const i="republicize";function l(){const e=(0,r.Pb)()?.social?.sharesData??{},t=(0,r.Pb)()?.wpcomBlogId,n=e.is_share_limit_enabled,l=(0,r.OZ)(i)?.available||n,c=(0,a.useSelect)((e=>e(s.store).isCurrentPostPublished()),[]),u=(0,r.Pb)()?.social?.publicizeConnectionsUrl??"https://wordpress.com/marketing/connections/",{isPublicizeEnabled:d,togglePublicizeFeature:p,isPostAlreadyShared:m}=(0,o.R)(),h=(0,r.X1)(i)&&!l,g=c?l:d,f=c&&h,b=c&&!l,v=!!(0,r.Pb)()?.social?.hasPaidPlan,k=!!(0,r.Pb)()?.social?.isEnhancedPublishingEnabled,y=!!(0,r.Pb)()?.social?.isAutoConversionEnabled;return{isPublicizeEnabledMeta:d,isPublicizeEnabled:g,togglePublicizeFeature:p,isPublicizeDisabledBySitePlan:f,isRePublicizeFeatureAvailable:l,isRePublicizeUpgradableViaUpsell:h,hidePublicizeFeature:b,isShareLimitEnabled:n,isPostAlreadyShared:m,numberOfSharesRemaining:e.shares_remaining,shouldShowAdvancedPlanNudge:e.show_advanced_plan_upgrade_nudge,hasPaidPlan:v,isEnhancedPublishingEnabled:k,isSocialImageGeneratorAvailable:!!(0,r.Pb)()?.social?.isSocialImageGeneratorAvailable,isSocialImageGeneratorEnabled:!!(0,r.Pb)()?.social?.isSocialImageGeneratorEnabled,connectionsAdminUrl:u+(t??(0,r.lQ)()),adminUrl:(0,r.Pb)()?.social?.adminUrl,isAutoConversionEnabled:y,jetpackSharingSettingsUrl:(0,r.Pb)()?.social?.jetpackSharingSettingsUrl}}},6230:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(9818),a=n(69307),s=n(22552),o=n(23177);function i(){const e=(0,s.Z)(),t=(0,a.useRef)(!1),n=(0,r.useDispatch)(o.Eg).refreshAutoConversionSettings;return{refreshAutoConversionSettings:()=>{e||(t.current=!0),e&&t.current&&(n(),t.current=!1)}}}},96672:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(94333),a=n(69307),s=n(22552),o=n(37568);function i(){const e=(0,a.useRef)(!1),t=(0,s.Z)(),{refresh:n}=(0,o.Z)(),i=(0,r.useDebounce)(n,2e3);return()=>{t||(e.current=!0,i.cancel()),t&&e.current&&(i(),e.current=!1)}}},86419:(e,t,n)=>{"use strict";n.d(t,{M1:()=>i,e3:()=>l});var r=n(94333),a=n(9818),s=n(12238),o=n(69307);function i(e,t){const n=(0,a.useSelect)((e=>e(s.store).isPublishingPost()),[]),i=(0,r.usePrevious)(n);(0,o.useEffect)((()=>{i&&!n&&e()}),[n,i,e,t])}function l(e,t){const n=(0,a.useSelect)((e=>e(s.store).isPublishingPost()),[]),i=(0,r.usePrevious)(n);(0,o.useEffect)((()=>{!i&&n&&e()}),[n,i,e,t])}},34431:(e,t,n)=>{"use strict";n.d(t,{U:()=>o});var r=n(9818),a=n(65736),s=n(23177);const __=a.__,_n=a._n;function o({scheduledCountAdjustment:e=0,usedCountAdjustment:t=0}={}){return(0,r.useSelect)((n=>{const r=n(s.h),o=r.getShareLimit(),i=r.getScheduledSharesCount()+e,l=r.getSharesUsedCount()+t,c=l+i,u=r.numberOfSharesRemaining(),d=function(e){const t=Number.isFinite(e)?(0,a.sprintf)( +(0,a.sprintf)(__("Pick the %s template","jetpack"),t.label))))))}},57227:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(30253),a=n(91948),s=n(5353);const o=[{name:"highway",label:"Highway",image:n(27956)},{name:"dois",label:"Dois",image:r},{name:"edge",label:"Edge",image:a},{name:"fullscreen",label:"Fullscreen",image:s}]},76848:(e,t,n)=>{"use strict";n(9818),n(69307),n(99196),n(23177)},53513:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(88275),a=n(55609),s=n(69307),o=n(65736),i=n(88219),l=n(89696);const __=o.__,c=__("You need a featured image or media attached to your post to be able to share as a social post.","jetpack"),u=__("By default, the image and text appear on social media as a link preview. To optimize engagement, share as a social post.","jetpack");function d({disabled:e=!1}){const{shouldUploadAttachedMedia:t,updateShouldUploadAttachedMedia:n}=(0,i.Z)(),o=(0,s.useCallback)((e=>{n(e)}),[n]),d=e?a.Disabled:s.Fragment,p=e?{className:l.Z.disabled}:{};return React.createElement(r.ZP,null,React.createElement(d,p,React.createElement(a.CheckboxControl,{className:l.Z.checkbox,checked:t,onChange:o,label:__("Share as a social post","jetpack"),help:e?c:u})))}},63855:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(82674),a=n.n(r),s=n(13477),o=n(9818),i=n(48751),l=n(23177);const c=(0,o.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{excerpt:t("excerpt"),content:t("content").split("\x3c!--more")[0]}}))((e=>{const{message:t}=(0,i.Z)(),{title:n,excerpt:r,content:c}=e,u=(0,o.useSelect)((e=>{const{displayName:t,profileImage:n}=e(l.Eg).getConnectionProfileDetails(l.uJ);return{displayName:t,avatarUrl:n}}));return React.createElement(s.S,a()({},e,{type:"article",user:u,customText:t||r||c||n}))}))},83704:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(82674),a=n.n(r),s=n(17915),o=n(9818),i=n(22629),l=n(99196),c=n.n(l);const u=function(e){const t=(0,o.useSelect)((e=>{const{getEntityRecord:t}=e("core");return(0,i.decodeEntities)(t("root","site").title)}));return c().createElement(s.X,a()({},e,{siteTitle:t}))}},4124:(e,t,n)=>{"use strict";n.d(t,{m:()=>c});var r=n(4049),a=n(9818),s=n(99196),o=n.n(s),i=n(48751),l=n(23177);function c(e){const{title:t,image:n,media:s}=e,{username:c,profileImage:u}=(0,a.useSelect)((e=>e(l.Eg).getConnectionProfileDetails(l.M$))),{message:d}=(0,i.Z)(),p=d||t;return o().createElement(r.V,{image:n,media:s,name:c,profileImage:u,caption:p})}},27725:(e,t,n)=>{"use strict";n.d(t,{y:()=>u});var r=n(93453),a=n(9818),s=n(65736),o=n(99196),i=n.n(o),l=n(48751),c=n(23177);const __=s.__;function u(e){const{title:t,url:n,image:s,media:o}=e,{displayName:u,profileImage:d}=(0,a.useSelect)((e=>e(c.Eg).getConnectionProfileDetails(c.qk))),{message:p}=(0,l.Z)(),m=`${p||t} ${o.length?n:""}`.trim();return i().createElement(r.S,{jobTitle:__("Job Title (Company Name)","jetpack"),image:s,name:u,profileImage:d,title:t,description:m,url:n,media:o})}},28586:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(82674),a=n.n(r),s=n(60312),o=n(9818),i=n(22629),l=n(71806),c=n(48751),u=n(23177);const d=e=>{const{message:t}=(0,c.Z)(),{content:n,siteName:r}=(0,o.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor"),{getSite:n}=e("core");return{content:t("content").split("\x3c!--more")[0],siteName:(0,i.decodeEntities)(n().title)}})),{shouldUploadAttachedMedia:d}=(0,l.R)(),p=(0,o.useSelect)((e=>{const{displayName:t,profileImage:n,username:r}=e(u.Eg).getConnectionProfileDetails(u.cs);return{displayName:t,avatarUrl:n,address:r}})),m=e.media?.[0],h=m?.type.startsWith("image/")?m.url:null;return React.createElement(s.I,a()({},e,{siteName:r,user:p,description:n,customText:t,customImage:h,isSocialPost:d}))}},8454:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(55609),a=n(65736),s=n(39517),o=n(41809),i=n(9279);const __=a.__,l=function({onClose:e,initialTabName:t}){const n=(0,o.P)(),{image:a,media:l,title:c,description:u,url:d}=(0,i.u)();return React.createElement(r.Modal,{onRequestClose:e,className:"jetpack-social-previews__modal",__experimentalHideHeader:!0},React.createElement(r.Button,{className:"jetpack-social-previews__modal--close-btn",onClick:e,icon:s.Z,label:__("Close","jetpack")}),React.createElement(r.TabPanel,{className:"jetpack-social-previews__modal-previews",tabs:n,initialTabName:t},(e=>React.createElement("div",null,React.createElement(e.preview,{title:c,description:u,url:d,image:a,media:l})))))}},18553:(e,t,n)=>{"use strict";n.d(t,{T:()=>c});var r=n(93122),a=n(9818),s=n(99196),o=n.n(s),i=n(48751),l=n(23177);function c(e){const{title:t,url:n,image:s,media:c}=e,{displayName:u,profileImage:d}=(0,a.useSelect)((e=>e(l.Eg).getConnectionProfileDetails(l.Cd))),{message:p}=(0,i.Z)(),m=`${p||t} ${c.length?n:""}`.trim();return o().createElement(r.m,{image:s,name:u,profileImage:d,title:t,description:m,url:n,media:c})}},74140:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(55609),a=n(65736),s=n(41809);const __=a.__,_x=a._x,o=({openModal:e})=>{const t=(0,s.P)();return React.createElement("div",{className:"jetpack-social-previews__panel"},React.createElement("p",null,__("Preview what this will look like on social networks and Google search.","jetpack")),React.createElement("div",{className:"jetpack-gutenberg-social-icons"},t.map((e=>React.createElement(e.icon,{key:e.name,className:"jetpack-social-previews__icon"})))),React.createElement(r.Button,{variant:"secondary",onClick:e,label:__("Open Social Previews","jetpack")},_x("Preview","Button label that opens the social previews modal","jetpack")))}},94714:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(82674),a=n.n(r),s=n(1044),o=n(9818),i=n(48751),l=n(23177);const c=e=>{const{content:t,author:n}=(0,o.useSelect)((e=>{const{getUser:t}=e("core"),{getEditedPostAttribute:n}=e("core/editor"),r=n("author"),a=r&&t(r);return{content:n("content").split("\x3c!--more")[0],author:a?.name}})),{message:r}=(0,i.Z)(),c=(0,o.useSelect)((e=>{const{displayName:t,profileImage:r}=e(l.Eg).getConnectionProfileDetails(l.Bb);return{displayName:t||n,avatarUrl:r}}),[n]);return React.createElement(s.b,a()({},e,{user:c,description:t,customText:r}))}},24766:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(835),a=n(9818),s=n(99196),o=n.n(s),i=n(71806),l=n(23177);const c=function({title:e,description:t,image:n,url:s,media:c}){const{shareMessage:u}=(0,i.R)(),d=(0,a.useSelect)((r=>{const{displayName:a,profileImage:o,username:i}=r(l.Eg).getConnectionProfileDetails(l.wV);return[{name:a,profileImage:o,screenName:i,text:u+(c.length?` ${s}`:""),cardType:n?"summary_large_image":"summary",title:e,description:t,image:n,media:c,url:s}]}),[e,n,t,c,s,u]);return o().createElement(r.c,{tweets:d,hidePostPreview:!0})}},41809:(e,t,n)=>{"use strict";n.d(t,{P:()=>k});var r=n(82674),a=n.n(r),s=n(3396),o=n(65736),i=n(99196),l=n.n(i),c=n(23177),u=n(42032),d=n(63855),p=n(83704),m=n(4124),h=n(27725),g=n(28586),f=n(18553),b=n(94714),v=n(24766);const __=o.__;function k(){const e=(0,u.getSupportedAdditionalConnections)(),t=e.includes(c.M$),n=e.includes(c.cs),r=e.includes(c.Cd);return(0,i.useMemo)((()=>[{title:__("Google Search","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"google"},e)),name:"google",preview:p.Z},{title:__("X","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"x"},e)),name:"x",preview:v.Z},{title:__("Facebook","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"facebook"},e)),name:"facebook",preview:d.Z},t?{title:__("Instagram","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"instagram"},e)),name:"instagram",preview:m.m}:null,{title:__("LinkedIn","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"linkedin"},e)),name:"linkedin",preview:h.y},r?{title:__("Nextdoor","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"nextdoor"},e)),name:"nextdoor",preview:f.T}:null,{title:__("Tumblr","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"tumblr-alt"},e)),name:"tumblr",preview:b.Z},n?{title:__("Mastodon","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"mastodon"},e)),name:"mastodon",preview:g.Z}:null].filter(Boolean)),[t,n,r])}},9279:(e,t,n)=>{"use strict";n.d(t,{u:()=>l});var r=n(9818),a=n(65736),s=n(71806),o=n(90785),i=n(25399);const __=a.__;function l(){const{attachedMedia:e,imageGeneratorSettings:t,shouldUploadAttachedMedia:n}=(0,s.R)();return(0,r.useSelect)((r=>{const{getMedia:a}=r("core"),{getEditedPostAttribute:s,getEditedPostContent:l}=r("core/editor"),c=s("featured_media");let u=c?(0,i.i)(a(c)):"";const d=t.enabled?(0,o.t)(t.token):"";if(d)u=d;else if(e?.[0]?.id){const[t]=e;!!t.id&&a(t.id)?.mime_type?.startsWith("image/")&&t.url&&(u=t.url)}if(!u){const e=(0,i.T)(l());e&&(u=e)}const p=[];if(n)if(d)p.push({type:"image/jpeg",url:d,alt:""});else{const t=e=>{const t=a(e);return t?{type:t.mime_type,url:(0,i.i)(t),alt:t.alt_text}:null};for(const{id:n}of e){const e=t(n);e&&p.push(e)}if(0===p.length&&c){const e=t(c);e&&p.push(e)}}return{title:s("meta")?.jetpack_seo_html_title||s("title"),description:s("meta")?.advanced_seo_description||s("excerpt")||s("content").split("\x3c!--more")[0]||__("Visit the post for more.","jetpack"),url:s("link"),image:u,media:p,initialTabName:null}}),[n,e,t])}},25399:(e,t,n)=>{"use strict";function r(e){return e?e.media_details?.sizes?.large?.source_url||e.source_url:null}function a(e){const t=(new DOMParser).parseFromString(e,"text/html"),n=Array.from(t.querySelectorAll("img")),r=n[0]?.src;return r??null}n.d(t,{T:()=>a,i:()=>r})},13858:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(69307),a=n(87728);const s=({sourceUrl:e,mime:t,duration:n})=>{const[s,o]=(0,r.useState)(!1),[i,l]=(0,r.useState)(0),c=(0,r.useRef)(null),u=(0,r.useRef)(null),d=(0,r.useRef)(null);(0,r.useEffect)((()=>{c.current?.load()}),[e]);const p=(0,r.useCallback)((()=>{c.current.pause(),c.current.currentTime=0,clearInterval(u.current),clearTimeout(d.current),l(0),o(!1)}),[]),m=(0,r.useCallback)((()=>{d.current=setTimeout((()=>{s||(c.current.play(),o(!0),u.current=setInterval((()=>{l((e=>e+1))}),1e3))}),500)}),[s]),h=()=>{const e=n-i,t=Math.floor(e/60),r=String(Math.floor(e%60)).padStart(2,"0");return React.createElement("div",{className:a.Z.progress},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"8",fill:"none"},React.createElement("path",{fill:"#fff",d:"M5.25 3.567a.5.5 0 0 1 0 .866L.75 7.031A.5.5 0 0 1 0 6.598V1.402A.5.5 0 0 1 .75.969l4.5 2.598Z"})),React.createElement("span",{className:a.Z.duration},`${t}:${r}`))};return React.createElement("div",{className:a.Z.wrapper,onMouseEnter:m,onMouseLeave:p},React.createElement("video",{ref:c,onEnded:p,muted:!0},React.createElement("source",{src:e,type:t})),React.createElement(h,null))}},88219:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(71806);function a(){const{attachedMedia:e,shouldUploadAttachedMedia:t,updateJetpackSocialOptions:n}=(0,r.R)();return{attachedMedia:e,shouldUploadAttachedMedia:t,updateAttachedMedia:e=>n("attached_media",e),updateShouldUploadAttachedMedia:e=>n("should_upload_attached_media",e)}}},75323:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(13419),a=n(86989),s=n.n(a),o=n(69307);const i={instagram:"instagram",advancedUpgradeEditor:"advanced-upgrade-nudge-editor",advancedUpgradeAdmin:"advanced-upgrade-nudge-admin",autoConversion:"auto-conversion-editor-notice"},l=e=>-1===e?0:new Date(Date.now()+1e3*e).getTime();function c(){const[e,t]=(0,o.useState)((()=>(0,r.Pb)()?.social?.dismissedNotices??window?.jetpackSocialInitialState?.jetpackSettings?.dismissedNotices??{})),n=(0,o.useCallback)(((e,n=-1)=>{const r=l(n);t((t=>({...t,[e]:r}))),s()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_dismissed_notices:{[e]:r}}})}),[]),a=(0,o.useCallback)((t=>{const n=e[t];return!(0===n||n>Date.now())}),[e]);return(0,o.useMemo)((()=>({dismissedNotices:e,shouldShowNotice:a,dismissNotice:n,NOTICES:i})),[e,a,n])}},39118:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(9818),a=n(12238);const s=()=>(0,r.useSelect)((e=>e(a.store).getEditedPostAttribute("featured_media")))},75263:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9818),a=n(12238),s=n(69307),o=n(71806);const i=(e,t)=>({isEnabled:e?.enabled??!t,customText:e?.custom_text??null,imageType:e?.image_type??null,imageId:e?.image_id??null,template:e?.template??null,token:e?.token??null});function l(){const{imageGeneratorSettings:e,jetpackSocialOptions:t,updateJetpackSocialOptions:n}=(0,o.R)(),{isPostPublished:l}=(0,r.useSelect)((e=>({isPostPublished:e(a.store).isCurrentPostPublished()}))),c=(0,s.useCallback)(((t,r)=>{const a={...e,[t]:r};n("image_generator_settings",a)}),[e,n]),u=(0,s.useCallback)((t=>{const r={...e,...t};n("image_generator_settings",r)}),[e,n]);return{...i(t.image_generator_settings,l),setIsEnabled:e=>c("enabled",e),setToken:e=>c("token",e),updateSettings:u}}},98811:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9818),a=n(69307);const s=async e=>{if(!e)return{};let t={mime:e.mime_type,fileSize:e.media_details.filesize,length:e.media_details?.length};"video/videopress"===e.mime_type&&(t=await(async e=>{if(!e?.media_details?.videopress?.original||!e?.media_details?.videopress?.duration)return{};const t=await fetch(e?.media_details?.videopress?.original,{method:"HEAD"}),n=t.headers.get("content-length"),r=t.headers.get("content-type");return n&&r?{mime:r,fileSize:n,length:Math.round(e.media_details.videopress.duration/1e3)}:{}})(e));const n=e?.media_details?.sizes??{};if(!n.full)return{mediaData:{width:e.media_details.width,height:e.media_details.height,sourceUrl:e.source_url},metaData:t};const r=n.medium||n.large,a={width:r.width,height:r.height,sourceUrl:r.source_url};return{mediaData:{width:n.full.width,height:n.full.height,sourceUrl:n.full.source_url},metaData:t,previewData:a}};function o(e=null){const[t,n]=(0,a.useState)([{}]),o=(0,r.useSelect)((t=>t("core").getMedia(e,{context:"view"})),[e]),i=(0,a.useCallback)((async()=>{try{const e=await s(o);n([e??{}])}catch{n([{}])}}),[o]);return(0,a.useEffect)((()=>{i()}),[i]),t}},46791:(e,t,n)=>{"use strict";n.d(t,{Wv:()=>l,ZP:()=>d,rs:()=>s});var r=n(69307),a=n(1795);const s="NO_MEDIA_ERROR",o="FILE_SIZE_ERROR",i="DIMENSION_ERROR";function l(e){return"video"===e.split("/")[0]}const c=e=>{if(!e?.mime||!e?.fileSize)return!1;const{mime:t,fileSize:n}=e;if(l(t))return!1;if(!a.bD.includes(t))return!1;return!((n?n/Math.pow(1e3,2):null)>=55)},u=(e,t,n,r)=>{const c=a.$8[n]??a.ay;if(!e||0===Object.keys(e).length)return c.requiresMedia?s:null;if(!c.requiresMedia&&!r)return null;const{mime:u,fileSize:d}=e;if(!u||!c.allowedMediaTypes.includes(u.toLowerCase()))return"FILE_TYPE_ERROR";if(!t?.width||!t?.height)return i;const p=d?d/Math.pow(1e3,2):null;return l(u)?((e,t,n,r,s)=>{const{minSize:l=0,maxSize:c=a.zc,minLength:u=0,maxLength:d=a.zc,maxWidth:p=a.zc,aspectRatio:m=a.ay.video.aspectRatio}=s;if(!e||e>c||ed)return"VIDEO_LENGTH_TOO_LONG_ERROR";const h=n/r;return hm.max||n>p?i:null})(p,e.length,t.width,t.height,c.video):((e,t,n,r)=>{const{maxSize:s=a.zc,minWidth:l=0,maxWidth:c=a.zc,aspectRatio:u=a.ay.image.aspectRatio}=r,d=t/n;return du.max||t>c||ts?o:null})(p,t.width,t.height,c.image)},d=(e,t,{isSocialImageGeneratorEnabledForPost:n,shouldUploadAttachedMedia:a})=>{const s=(0,r.useRef)({});return(0,r.useMemo)((()=>{const r=n?{}:e.reduce(((e,{connection_id:n,service_name:r})=>{const s=u(t.metaData,t.mediaData,r,a);return s&&(e[n]=s),e}),{});return JSON.stringify(r)!==JSON.stringify(s.current)&&(s.current=r),{validationErrors:s.current,isConvertible:c(t.metaData)}}),[n,e,t.metaData,t.mediaData,a])}},1795:(e,t,n)=>{"use strict";n.d(t,{$8:()=>g,ay:()=>h,bD:()=>f,uo:()=>b,zc:()=>m});const r="video/mp4",a="video/mov",s="video/videopress",o=["image/jpeg","image/jpg","image/png"],i=o.concat(["image/gif","image/bmp"]),l=["video/3g2","video/3gp","video/3gpp","video/asf","video/avi","video/dat","video/divx","video/dv","video/f4v","video/flv","video/gif","video/m2ts","video/m4v","video/mkv","video/mod","video/mov","video/mp4","video/mpe","video/mpeg","video/mpeg4","video/mpg","video/mts","video/nsv","video/ogm","video/ogv","video/qt","video/tod","video/ts","video/vob","video/wmv"],c=o.concat(["image/gif","image/heic","image/heif","image/webp","image/avif"]),u=["video/webm","video/quicktime","video/ogg"],d=o.concat(["image/gif","image/jpe","image/tif","image/tiff","image/webp"]),p=[a,"video/avi","video/mpg","video/mpeg","video/m4v"],m=1e5,h={requiresMedia:!1,allowedMediaTypes:o.concat([r,s,a]),image:{maxSize:4,minWidth:0,maxWidth:m,aspectRatio:{min:0,max:m}},video:{minLength:0,minSize:0,maxSize:m,maxLength:m,maxWidth:m,aspectRatio:{min:0,max:m}}},g={twitter:{allowedMediaTypes:o.concat([r,s]),image:{maxSize:5},video:{maxSize:512,maxLength:140}},facebook:{allowedMediaTypes:i.concat([s,...l]),image:{maxSize:8},video:{maxSize:1e4,maxLength:14400}},tumblr:{allowedMediaTypes:o.concat([r,a,s]),image:{maxSize:20},video:{maxSize:500,maxLength:600}},linkedin:{allowedMediaTypes:o.concat([r,s]),image:{maxSize:20},video:{minSize:.075,maxSize:200,maxLength:600,minLength:3}},"instagram-business":{requiresMedia:!0,allowedMediaTypes:["image/jpg","image/jpeg",r,a,s],image:{maxSize:8,minWidth:320,maxWidth:1440,aspectRatio:{min:.8,max:1.91}},video:{maxLength:90,minLength:3,maxSize:1e3,maxWidth:1920,aspectRatio:{min:.01,max:10}}},mastodon:{allowedMediaTypes:c.concat([...u,r,s]),image:{maxSize:10},video:{maxSize:40}},nextdoor:{allowedMediaTypes:d.concat([...p,r,s]),image:{maxSize:10},video:{maxSize:500}}},f=["image/png","image/jpeg","image/jpg","image/heic","image/heif","image/webp"],b=[...new Set([...o,...i,...c,...l,...u,...f])]},71806:(e,t,n)=>{"use strict";n.d(t,{R:()=>i});var r=n(9818),a=n(12238),s=n(69307),o=n(42032);function i(){const{editPost:e}=(0,r.useDispatch)(a.store),t=(0,r.useSelect)((e=>{const t=e(a.store).getEditedPostAttribute("meta")||{},n=t.jetpack_publicize_feature_enabled??!0,r=t.jetpack_social_options||{};return{isPublicizeEnabled:n,jetpackSocialOptions:r,attachedMedia:r.attached_media||[],imageGeneratorSettings:r.image_generator_settings??{enabled:!1},isPostAlreadyShared:t.jetpack_social_post_already_shared??!1,shareMessage:`${t.jetpack_publicize_message||""}`.substring(0,(0,o.getShareMessageMaxLength)()),shouldUploadAttachedMedia:r.should_upload_attached_media??!1}}),[]),n=(0,s.useCallback)(((t,n)=>{e({meta:{[t]:n}})}),[e]),i=(0,s.useCallback)((()=>{n("jetpack_publicize_feature_enabled",!t.isPublicizeEnabled)}),[t.isPublicizeEnabled,n]),l=(0,s.useCallback)(((e,r)=>{n("jetpack_social_options",{...t.jetpackSocialOptions,[e]:r})}),[t.jetpackSocialOptions,n]);return(0,s.useMemo)((()=>({...t,togglePublicizeFeature:i,updateJetpackSocialOptions:l,updateMeta:n})),[t,i,l,n])}},14085:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(13419),a=n(9818),s=n(12238),o=n(71806);const i="republicize";function l(){const e=(0,r.Pb)()?.social?.sharesData??{},t=e.is_share_limit_enabled,n=(0,r.OZ)(i)?.available||t,l=(0,a.useSelect)((e=>e(s.store).isCurrentPostPublished()),[]),c=(0,r.Pb)()?.social?.publicizeConnectionsUrl??"https://wordpress.com/marketing/connections/",{isPublicizeEnabled:u,togglePublicizeFeature:d,isPostAlreadyShared:p}=(0,o.R)(),m=(0,r.X1)(i)&&!n,h=l?n:u,g=l&&m,f=l&&!n,b=!!(0,r.Pb)()?.social?.hasPaidPlan,v=!!(0,r.Pb)()?.social?.isEnhancedPublishingEnabled,k=!!(0,r.Pb)()?.social?.isAutoConversionEnabled;return{isPublicizeEnabledMeta:u,isPublicizeEnabled:h,togglePublicizeFeature:d,isPublicizeDisabledBySitePlan:g,isRePublicizeFeatureAvailable:n,isRePublicizeUpgradableViaUpsell:m,hidePublicizeFeature:f,isShareLimitEnabled:t,isPostAlreadyShared:p,numberOfSharesRemaining:e.shares_remaining,shouldShowAdvancedPlanNudge:e.show_advanced_plan_upgrade_nudge,hasPaidPlan:b,isEnhancedPublishingEnabled:v,isSocialImageGeneratorAvailable:!!(0,r.Pb)()?.social?.isSocialImageGeneratorAvailable,isSocialImageGeneratorEnabled:!!(0,r.Pb)()?.social?.isSocialImageGeneratorEnabled,connectionsAdminUrl:c+(0,r.lQ)(),adminUrl:(0,r.Pb)()?.social?.adminUrl,isAutoConversionEnabled:k,jetpackSharingSettingsUrl:(0,r.Pb)()?.social?.jetpackSharingSettingsUrl}}},6230:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(9818),a=n(69307),s=n(22552),o=n(23177);function i(){const e=(0,s.Z)(),t=(0,a.useRef)(!1),n=(0,r.useDispatch)(o.Eg).refreshAutoConversionSettings;return{refreshAutoConversionSettings:()=>{e||(t.current=!0),e&&t.current&&(n(),t.current=!1)}}}},96672:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(94333),a=n(69307),s=n(22552),o=n(37568);function i(){const e=(0,a.useRef)(!1),t=(0,s.Z)(),{refresh:n}=(0,o.Z)(),i=(0,r.useDebounce)(n,2e3);return()=>{t||(e.current=!0,i.cancel()),t&&e.current&&(i(),e.current=!1)}}},86419:(e,t,n)=>{"use strict";n.d(t,{M1:()=>i,e3:()=>l});var r=n(94333),a=n(9818),s=n(12238),o=n(69307);function i(e,t){const n=(0,a.useSelect)((e=>e(s.store).isPublishingPost()),[]),i=(0,r.usePrevious)(n);(0,o.useEffect)((()=>{i&&!n&&e()}),[n,i,e,t])}function l(e,t){const n=(0,a.useSelect)((e=>e(s.store).isPublishingPost()),[]),i=(0,r.usePrevious)(n);(0,o.useEffect)((()=>{!i&&n&&e()}),[n,i,e,t])}},34431:(e,t,n)=>{"use strict";n.d(t,{U:()=>o});var r=n(9818),a=n(65736),s=n(23177);const __=a.__,_n=a._n;function o({scheduledCountAdjustment:e=0,usedCountAdjustment:t=0}={}){return(0,r.useSelect)((n=>{const r=n(s.h),o=r.getShareLimit(),i=r.getScheduledSharesCount()+e,l=r.getSharesUsedCount()+t,c=l+i,u=r.numberOfSharesRemaining(),d=function(e){const t=Number.isFinite(e)?(0,a.sprintf)( // translators: %d: The number of shares to social media remaining -_n("You have %d auto-share remaining.","You have %d auto-shares remaining.",e,"jetpack"),e):"";return{default:"",exceeded:__("You have reached your auto-share limit. Scheduled posts will not be shared until shares become available.","jetpack"),full:__("You have reached your auto-share limit.","jetpack"),approaching:t}}(u);let p="default",m="none",h=d.default;return c>o?(p="error",m="exceeded",h=d.exceeded):c===o?(m="full",p="error",h=d.full):c>=.9*o?(m="approaching",p="error",h=d.approaching):c>=.8*o&&(m="approaching",p="warning",h=d.approaching),{status:m,noticeType:p,message:h,usedCount:l,scheduledCount:i,remainingCount:u}}),[e,t])}},45579:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(13419),a=n(86989),s=n.n(a),o=n(9818),i=n(12238),l=n(69307),c=n(65736),u=n(37568),d=n(48751);const __=c.__;function p(e){const t=e?.code,n=e?.errors?.length;if(!t&&!n)return!1;let r="";return t&&(r=__("Unable to share the Post","jetpack")),n&&(r=__("Unable to share the Post","jetpack")),{message:r,result:e}}function m(e){const{message:t}=(0,d.Z)(),{skippedConnections:n}=(0,u.Z)(),a=(0,o.useSelect)((e=>e(i.store).getCurrentPostId()),[]);e=e||a;const[c,m]=(0,l.useState)({data:[],error:{}}),h=((0,r.Pb)()?.social?.resharePath??"/wpcom/v2/posts/{postId}/publicize").replace("{postId}",e),g=(0,l.useCallback)((function(){const r={isFetching:!1,isError:!1,isSuccess:!1,data:[],error:{},postId:e};if(!c.isFetching)return m({...r,isFetching:!0}),s()({path:h,method:"POST",data:{message:t,skipped_connections:n}}).then(((e={})=>{const t=p(e);if(t)return m((e=>({...e,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:t})));m((t=>({...t,isFetching:!1,isSuccess:!0,isError:!1,data:e?.results,error:{}})))})).catch((e=>{m((t=>({...t,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:p(e)})))})),function(){m(r)}}),[e,t,n,c.isFetching,h]);return{...c,doPublicize:g}}},37568:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(9818),a=n(23177);function s(){const{refreshConnectionTestResults:e,toggleConnectionById:t}=(0,r.useDispatch)(a.h);return{...(0,r.useSelect)((e=>{const t=e(a.h),n=t.getConnections(),r=t.getEnabledConnections(),s=t.getDisabledConnections().map((e=>e.id));return{connections:n,hasConnections:n.length>0,hasEnabledConnections:r.length>0,skippedConnections:s,enabledConnections:r}}),[]),toggleById:t,refresh:e}}},48751:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(42032),a=n(71806);function s(){const{updateMeta:e,shareMessage:t}=(0,a.R)();return{message:t,maxLength:(0,r.getShareMessageMaxLength)(),updateMessage:function(t){e("jetpack_publicize_message",t)}}}},19890:(e,t,n)=>{"use strict";n.d(t,{N:()=>i});var r=n(9818),a=n(12238),s=n(23177),o=n(86419);function i(){const{mergeConnections:e}=(0,r.useDispatch)(s.h),{didPostSaveRequestSucceed:t,isCurrentPostPublished:n,getEditedPostAttribute:i}=(0,r.useSelect)((e=>e(a.store)),[]);(0,o.M1)((()=>{if(t()&&n()){const t=i("jetpack_publicize_connections");t?.length&&e(t)}}),[t,n,i])}},21052:(e,t,n)=>{"use strict";n.d(t,{Au:()=>l,Wh:()=>c,ZP:()=>u,hi:()=>i,wO:()=>o});var r=n(9818),a=n(23177),s=n(4957);const o="SET_AUTO_CONVERSION_SETTINGS";function i(){return c({isUpdating:!0})}function l(){return c({isUpdating:!1})}function c(e){return{type:o,options:e}}const u={updateAutoConversionSettings:function*(e){try{yield i(),yield c(e),yield(0,s.Fl)(e);const t=yield(0,s.wi)();return yield c(t.jetpack_social_autoconvert_images),!0}catch(e){const t=(0,r.select)(a.Eg).getAutoConversionSettings();return yield c(t),!1}finally{yield l()}},setAutoConversionSettings:c,refreshAutoConversionSettings:function*(){try{yield i();const e=yield(0,s.wi)();return yield c(e.jetpack_social_autoconvert_images),!0}catch(e){return!1}finally{yield l()}}}},23013:(e,t,n)=>{"use strict";n.r(t),n.d(t,{mergeConnections:()=>u,refreshConnectionTestResults:()=>d,setConnections:()=>l,syncConnectionsToPostMeta:()=>p,toggleConnection:()=>c,toggleConnectionById:()=>m});var r=n(13419),a=n(86989),s=n.n(a),o=n(12238),i=n(74442);function l(e){return{type:i.b,connections:e}}function c(e){return{type:i.L,connectionId:e}}function u(e){return function({dispatch:t,select:n}){const r=n.getConnections(),a=[],s={done:!1,enabled:Boolean(n.numberOfSharesRemaining()),toggleable:!0};for(const t of e){const e={...s,...r.find((e=>e.connection_id?e.connection_id===t.connection_id:e.id===t.id)),...t,is_healthy:t.test_success};a.push(e)}t(l(a))}}function d(e=!1){return async function({dispatch:t}){try{const n=(0,r.Pb)()?.social?.connectionRefreshPath||"/wpcom/v2/publicize/connection-test-results";t(u(await s()({path:n}))),e&&t(p())}catch(e){}}}function p(){return function({registry:e,select:t}){const n=t.getConnections();return e.dispatch(o.store).editPost({jetpack_publicize_connections:n})}}function m(e,t=!0){return function({dispatch:n}){n(c(e)),t&&n(p())}}},74442:(e,t,n)=>{"use strict";n.d(t,{L:()=>a,b:()=>r});const r="SET_CONNECTIONS",a="TOGGLE_CONNECTION"},54725:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(21052),a=n(23013),s=n(371),o=n(72438),i=n(4462);const l={...s.ZP,...i.ZP,...r.ZP,...o.Z,...a}},371:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>l,dz:()=>o,ff:()=>i});var r=n(9818),a=n(23177),s=n(4957);const o="SET_JETPACK_SETTINGS";function i(e){return{type:o,options:e}}const l={updateJetpackSettings:function*(e){try{yield i({is_updating:!0}),yield i(e),yield(0,s.RF)(e);const t=yield(0,s.es)();return yield i(t),!0}catch(e){const t=(0,r.select)(a.Eg).getJetpackSettings();return yield i(t),!1}finally{yield i({is_updating:!1})}},setJetpackSettings:i}},72438:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(4957),a=n(21052),s=n(4462);const o={refreshJetpackSocialSettings:function*(){try{yield(0,a.hi)(),yield(0,s.ds)();const e=yield(0,r.mu)();return yield(0,a.Wh)(e.jetpack_social_autoconvert_images),yield(0,s.ch)(e.jetpack_social_image_generator_settings),!0}catch(e){return!1}finally{yield(0,a.Au)(),yield(0,s.Gr)()}}}},4462:(e,t,n)=>{"use strict";n.d(t,{Gr:()=>l,ZP:()=>u,ch:()=>c,ds:()=>i,kg:()=>o});var r=n(9818),a=n(23177),s=n(4957);const o="SET_SOCIAL_IMAGE_GENERATOR_SETTINGS";function i(){return c({isUpdating:!0})}function l(){return c({isUpdating:!1})}function c(e){return{type:o,options:e}}const u={updateSocialImageGeneratorSettings:function*(e){try{yield i(),yield c(e),yield(0,s.Ux)(e);const t=yield(0,s.oB)();return yield c(t.jetpack_social_image_generator_settings),!0}catch(e){const t=(0,r.select)(a.Eg).getSocialImageGeneratorSettings();return yield c(t),!1}finally{yield l()}},setSocialImageGeneratorSettings:c,refreshSocialImageGeneratorSettings:function*(){try{yield i();const e=yield(0,s.oB)();return yield c(e.jetpack_social_image_generator_settings),!0}catch(e){return!1}finally{yield l()}}}},4957:(e,t,n)=>{"use strict";n.d(t,{Fl:()=>v,RF:()=>m,Ux:()=>g,ZP:()=>k,es:()=>p,mu:()=>b,oB:()=>h,wi:()=>f});var r=n(86989),a=n.n(r);const s="FETCH_JETPACK_SETTINGS",o="UPDATE_JETPACK_SETTINGS",i="FETCH_SOCIAL_IMAGE_GENERATOR_SETTINGS",l="UPDATE_SOCIAL_IMAGE_GENERATOR_SETTINGS",c="FETCH_AUTO_CONVERSION_SETTINGS",u="UPDATE_AUTO_CONVERSION_SETTINGS",d="FETCH_JETPACK_SOCIAL_SETTINGS",p=()=>({type:s}),m=e=>({type:o,settings:e}),h=()=>({type:i}),g=e=>({type:l,settings:e}),f=()=>({type:c}),b=()=>({type:d}),v=e=>({type:u,settings:e}),k={[s]:function(){return a()({path:"/jetpack/v4/social/settings"})},[o]:function(e){return a()({path:"/jetpack/v4/social/settings",method:"POST",data:e.settings})},[i]:function(){return a()({path:"/wp/v2/settings?_fields=jetpack_social_image_generator_settings"})},[l]:function(e){return a()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_image_generator_settings:e.settings}})},[c]:function(){return a()({path:"/wp/v2/settings?_fields=jetpack_social_autoconvert_images"})},[u]:function(e){return a()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_autoconvert_images:e.settings}})},[d]:function(){return a()({path:"/wp/v2/settings?_fields=jetpack_social_autoconvert_images,jetpack_social_image_generator_settings"})}}},23177:(e,t,n)=>{"use strict";n.d(t,{Bb:()=>f,Cd:()=>g,Eg:()=>c,M$:()=>p,cs:()=>h,h:()=>v,qk:()=>m,uJ:()=>d,wV:()=>b});var r=n(9818),a=n(54725),s=n(4957),o=n(45272),i=n(15781),l=n(22987);const c="jetpack-social-plugin",u={reducer:o.Z,actions:a.Z,selectors:l.Z,resolvers:i.ZP,controls:s.ZP,initialState:window?.jetpackSocialInitialState||window?.Initial_State?.socialInitialState||window?.Jetpack_Editor_Initial_State?.social||{}},d="facebook",p="instagram-business",m="linkedin",h="mastodon",g="nextdoor",f="tumblr",b="twitter",v=(0,r.createReduxStore)(c,u);(0,r.register)(v)},20750:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(21052);const a=(e={},t)=>t.type===r.wO?{...e,...t.options}:e},71837:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74442);const a=(e={},t)=>{switch(t.type){case r.b:return{...e,connections:t.connections};case r.L:return{...e,connections:e.connections.map((e=>(e.connection_id?e.connection_id===t.connectionId:e.id===t.connectionId)?{...e,enabled:!e.enabled}:e))}}return e}},45272:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(9818),a=n(20750),s=n(71837),o=n(80697),i=n(35652),l=n(28696),c=n(54489);const u=(0,r.combineReducers)({sharesData:i.Z,siteData:l.Z,connectionData:s.Z,jetpackSettings:o.Z,socialImageGeneratorSettings:c.Z,autoConversionSettings:a.Z,hasPaidPlan:(e=!1)=>e})},80697:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(371);const a=(e={},t)=>t.type===r.dz?{...e,...t.options}:e},35652:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(e={})=>e},28696:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(e={})=>e},54489:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(4462);const a=(e={},t)=>t.type===r.kg?{...e,...t.options}:e},15781:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>c});var r=n(12238),a=n(21052),s=n(23013),o=n(371),i=n(4462),l=n(4957);const c={getJetpackSettings:function*(){try{const e=yield(0,l.es)();if(e)return(0,o.ff)(e)}catch(e){console.log(e)}},getSocialImageGeneratorSettings:function*(){try{const e=yield(0,l.oB)();if(e)return(0,i.ch)(e.jetpack_social_image_generator_settings)}catch(e){console.log(e)}},getAutoConversionSettings:function*(){try{const e=yield(0,l.wi)();if(e)return(0,a.Wh)(e.jetpack_social_autoconvert_images)}catch(e){console.log(e)}},getConnections:function(){return function({dispatch:e,registry:t}){const n=t.select(r.store).getEditedPostAttribute("jetpack_publicize_connections");e((0,s.setConnections)(n||[]))}}}},68113:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getAutoConversionSettings:e=>e.autoConversionSettings,isAutoConversionAvailable:e=>e.autoConversionSettings.available,isAutoConversionEnabled:e=>e.autoConversionSettings.available&&e.autoConversionSettings.enabled,isAutoConversionSettingsUpdating:e=>e.autoConversionSettings.isUpdating}},43354:(e,t,n)=>{"use strict";function r(e){return e.connectionData?.connections??[]}function a(e){return e.connectionData?.adminUrl??null}function s(e){return r(e).length>0}function o(e){return r(e).filter((e=>!1===e.test_success))}function i(e){return r(e).filter((e=>"must_reauth"===e.test_success)).map((e=>e.service_name))}function l(e){return r(e).filter((e=>e.enabled))}function c(e){return r(e).filter((e=>!e.enabled))}function u(e,t,{forceDefaults:n=!1}={}){let a="",s="",o="";if(!n){const n=r(e).find((({service_name:e})=>t===e));if(n){const{display_name:e,profile_display_name:r,profile_picture:i}=n;a="twitter"===t?r:e,o="twitter"===t?e:n.username,s=i}}return{displayName:a,profileImage:s,username:o}}n.r(t),n.d(t,{getConnectionProfileDetails:()=>u,getConnections:()=>r,getConnectionsAdminUrl:()=>a,getDisabledConnections:()=>c,getEnabledConnections:()=>l,getFailedConnections:()=>o,getMustReauthConnections:()=>i,hasConnections:()=>s})},22987:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(68113),a=n(43354),s=n(82836),o=n(31473),i=n(85675),l=n(45073);const c={...i.Z,...a,...s.Z,...o,...l.Z,...r.Z}},82836:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getJetpackSettings:e=>e.jetpackSettings,isModuleEnabled:e=>e.jetpackSettings.publicize_active,showPricingPage:e=>e.jetpackSettings.show_pricing_page,isUpdatingJetpackSettings:e=>e.jetpackSettings.is_updating,hasPaidPlan:e=>!(e.jetpackSettings?.showNudge??1),isEnhancedPublishingEnabled:e=>e.jetpackSettings?.isEnhancedPublishingEnabled??!1,getDismissedNotices:e=>e.jetpackSettings?.dismissedNotices}},31473:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getScheduledSharesCount:()=>l,getShareLimit:()=>o,getSharedPostsCount:()=>u,getSharesUsedCount:()=>i,getTotalSharesCount:()=>c,isShareLimitEnabled:()=>a,numberOfSharesRemaining:()=>p,shouldShowAdvancedPlanNudge:()=>d,showShareLimits:()=>s});var r=n(82836);function a(e){return e.sharesData?.is_share_limit_enabled??!1}function s(e){return!r.Z.hasPaidPlan(e)&&!e.hasPaidPlan&&a(e)}function o(e){return e.sharesData?.share_limit??30}function i(e){return e.sharesData?.publicized_count??0}function l(e){return e.sharesData?.to_be_publicized_count??0}function c(e){const t=i(e)+l(e);return Math.max(t,0)}function u(e){return e.sharesData?.shared_posts_count??0}function d(e){return e.sharesData?.show_advanced_plan_upgrade_nudge??!1}function p(e,t={}){if(!s(e))return 1/0;const{includeScheduled:n}={includeScheduled:!0,...t},r=i(e),a=o(e),c=n?l(e):0;return Math.max(a-r-c,0)}},85675:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getAdminUrl:e=>e.siteData?.adminUrl??null,getAPIRootUrl:e=>e.siteData?.apiRoot??null,getAPINonce:e=>e.siteData?.apiNonce??null,getRegistrationNonce:e=>e.siteData?.registrationNonce??null,getSiteSuffix:e=>e.siteData?.siteSuffix??null,getBlogID:e=>e.siteData?.blogID??null,getPluginVersion:e=>e.siteData?.pluginVersion??null}},45073:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getSocialImageGeneratorSettings:e=>e.socialImageGeneratorSettings,isSocialImageGeneratorAvailable:e=>e.socialImageGeneratorSettings.available,isSocialImageGeneratorEnabled:e=>e.socialImageGeneratorSettings.enabled,isUpdatingSocialImageGeneratorSettings:e=>e.socialImageGeneratorSettings.isUpdating,getSocialImageGeneratorDefaultTemplate:e=>e.socialImageGeneratorSettings.template}},5463:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r=255;function a(){return r}},12677:(e,t,n)=>{"use strict";n.d(t,{h:()=>a});var r=n(13419);function a(){return(0,r.Pb)()?.social?.supportedAdditionalConnections||[]}},42032:(e,t,n)=>{"use strict";n.d(t,{getShareMessageMaxLength:()=>r.A,getSupportedAdditionalConnections:()=>a.h});var r=n(5463),a=n(12677),s=n(581);n.o(s,"useSyncPostDataToStore")&&n.d(t,{useSyncPostDataToStore:function(){return s.useSyncPostDataToStore}})},581:()=>{},13419:(e,t,n)=>{"use strict";n.d(t,{Dp:()=>u.Z,FK:()=>c.FK,HD:()=>c.HD,M6:()=>s.M6,OZ:()=>o.Z,Pb:()=>r.Z,Pm:()=>m.Z,Qq:()=>c.Qq,Rl:()=>c.Rl,T:()=>l.Z,Ug:()=>s.Ug,Wp:()=>s.Wp,X1:()=>c.X1,_D:()=>c._D,aQ:()=>s.aQ,dM:()=>h.d,el:()=>p.Z,lQ:()=>a.Z,lt:()=>h.l,m3:()=>c.m3,o_:()=>i.Z,og:()=>g.Z,z$:()=>d.Z});var r=n(50148),a=n(35004),s=n(99505),o=n(48052),i=n(76714),l=n(80354),c=n(75404),u=n(68586),d=n(61053),p=n(11380),m=n(6342),h=n(96959),g=n(19499);n(39058)},6342:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(78868),a=n(99196),s=n.n(a);const o=()=>s().createElement(r.Z,{className:"jetpack-editor-panel-logo",height:16,logoColor:"#1E1E1E",showText:!1})},96959:(e,t,n)=>{"use strict";n.d(t,{d:()=>s,l:()=>o});var r=n(69307),a=n(12953);function s(e){const t={};let n="span",a=e.icon;const s=document.createElement("div");s.innerHTML=e.icon;const o=s.querySelector("svg");return o&&(n="svg",a=o.innerHTML,Array.from(o.attributes).forEach((({nodeName:e,nodeValue:n})=>t[e]=n))),(0,r.createElement)(n,{...t,dangerouslySetInnerHTML:{__html:a||""}})}function o(e){return{src:s(e),foreground:(0,a.Z)()}}},12953:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(99505);const a="#069e08";function s(){return(0,r.Ug)()||(0,r.Wp)()?null:a}},19499:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(50148);function a(){const e=(0,r.Z)();return e?.blocks_variation??"production"}},50148:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r="Jetpack_Editor_Initial_State";function a(){return"object"==typeof window?window?.[r]??null:null}},48052:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(50148);function a(e){const t=(0,r.Z)(),n=t?.available_blocks?.[e]?.available??!1,a=t?.available_blocks?.[e]?.unavailable_reason??"unknown";return{available:n,...!n&&{details:t?.available_blocks?.[e]?.details??[],unavailableReason:a}}}},35004:(e,t,n)=>{"use strict";function r(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:null}n.d(t,{Z:()=>r})},61053:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(6975),a=n(31294),s=n(69307);const{tracks:o}=r.Z,{recordEvent:i}=o,l=({pageViewEventName:e=null,pageViewNamespace:t="jetpack",pageViewSuffix:n="page_view",pageViewEventProperties:l={}}={})=>{const[c,u]=(0,s.useState)(!1),{isUserConnected:d,isRegistered:p,userConnectionData:m={}}=(0,a.Z)(),{wpcomUser:{login:h,ID:g}={},blogId:f}=m.currentUser||{},b=(0,s.useCallback)((async(e,t={})=>{d&&g&&h&&i(e,t)}),[d,g,h]);return(0,s.useEffect)((()=>{d&&g&&h&&f&&r.Z.initialize(g,h,{blog_id:f})}),[f,g,h,d]),(0,s.useEffect)((()=>{const r=e?`${t}_${e}_${n}`:null;p&&r&&(c||(b(r,l),u(!0)))}),[c,t,e,n,p,l,b]),{recordEvent:b,tracks:o}}},11380:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9818),a=n(69307),s=n(39058);const o=e=>{const{isModuleActive:t,isChangingStatus:n,isLoadingModules:o}=(0,r.useSelect)((t=>{const n=t(s.p);return{isModuleActive:n.isModuleActive(e),isChangingStatus:n.isModuleUpdating(e),isLoadingModules:n.areModulesLoading(e)}}),[s.p]),{updateJetpackModuleStatus:i}=(0,r.useDispatch)(s.p),l=(0,a.useCallback)((t=>i({name:e,active:t})),[e,i]);return(0,a.useMemo)((()=>({isLoadingModules:o,isChangingStatus:n,isModuleActive:t,changeStatus:l})),[o,n,t,l])}},68586:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(50148);function a(){return(0,r.Z)()?.jetpack?.is_current_user_connected??!1}},44166:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>p,rW:()=>d});var r=n(9818),a=n(99505),s=n(82162),o=n(39058);const i="SET_JETPACK_MODULES",l="SET_MODULE_UPDATING";function c(e){return d({isLoading:e})}function u(e,t){return{type:l,name:e,isUpdating:t}}function d(e){return{type:i,options:e}}const p={updateJetpackModuleStatus:function*(e){try{yield u(e.name,!0),yield(0,s.zL)(e);const t=yield(0,s.Bs)();return yield d({data:t}),!0}catch(e){const t=(0,r.select)(o.p).getJetpackModules();return yield d(t),!1}finally{yield u(e.name,!1)}},setJetpackModules:d,fetchModules:function*(){if((0,a.Wp)())return!0;try{yield c(!0);const e=yield(0,s.Bs)();return yield d({data:e}),!0}catch(e){const t=(0,r.select)(o.p).getJetpackModules();return yield d(t),!1}finally{yield c(!1)}}}},82162:(e,t,n)=>{"use strict";n.d(t,{Bs:()=>i,ZP:()=>c,zL:()=>l});var r=n(86989),a=n.n(r);const s="FETCH_JETPACK_MODULES",o="UPDATE_JETPACK_MODULE_STATUS",i=()=>({type:s}),l=e=>({type:o,settings:e}),c={[s]:function(){return a()({path:"/jetpack/v4/module/all",method:"GET"})},[o]:function({settings:e}){return a()({path:`/jetpack/v4/module/${e.name}/active`,method:"POST",data:{active:e.active}})}}},39058:(e,t,n)=>{"use strict";n.d(t,{p:()=>c});var r=n(9818),a=n(44166),s=n(82162),o=n(42469),i=n(55133),l=n(43524);const c="jetpack-modules",u=(0,r.createReduxStore)(c,{reducer:o.Z,actions:a.ZP,controls:s.ZP,resolvers:i.Z,selectors:l.Z});(0,r.register)(u);const d=window?.Initial_State?.getModules||window?.Jetpack_Editor_Initial_State?.modules||null;null!==d&&(0,r.dispatch)(c).setJetpackModules({data:{...d}})},42469:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r={isLoading:!1,isUpdating:{},data:{}},a=(e=r,t)=>{switch(t.type){case"SET_JETPACK_MODULES":return{...e,...t.options};case"SET_MODULE_UPDATING":return{...e,isUpdating:{...e.isUpdating,[t.name]:t.isUpdating}}}return e}},55133:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(44166),a=n(82162);const s={getJetpackModules:function*(){try{const e=yield(0,a.Bs)();if(e)return(0,r.rW)({data:e})}catch(e){console.error(e)}}}},43524:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(99505);const a={getJetpackModules:e=>e.data,isModuleActive:(e,t)=>(0,r.Wp)()||(e?.data?.[t]?.activated??!1),areModulesLoading:e=>e.isLoading??!1,isModuleUpdating:(e,t)=>e?.isUpdating?.[t]??!1}},75404:(e,t,n)=>{"use strict";n.d(t,{FK:()=>g,HD:()=>f,Qq:()=>u,Rl:()=>m,X1:()=>d,_D:()=>p,m3:()=>b});var r=n(65736),a=n(96483),s=n(92819),o=n(50148),i=n(48052),l=n(35004),c=n(99505);const __=r.__;function u({planSlug:e,plan:t,postId:n,postType:r}){const o=(0,s.startsWith)(e,"jetpack_")?e:(0,s.get)(t,["path_slug"]),i=(void 0===r?()=>{const e=new URLSearchParams(window.location.search);return(0,a.addQueryArgs)(window.location.protocol+`//${(0,l.Z)().replace("::","/")}/wp-admin/site-editor.php`,{postId:e.get("postId"),postType:e.get("postType"),plan_upgraded:1})}:()=>{const e=["page","post"].includes(r)?"":"edit";return(0,c.Wp)()?(0,a.addQueryArgs)("/"+(0,s.compact)([e,r,(0,l.Z)(),n]).join("/"),{plan_upgraded:1}):(0,a.addQueryArgs)(window.location.protocol+`//${(0,l.Z)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:n,plan_upgraded:1})})();return(0,c.Ug)()?(0,a.addQueryArgs)(`https://wordpress.com/plans/${(0,l.Z)()}`,{redirect_to:i,customerType:"business"}):o&&(0,a.addQueryArgs)(`https://wordpress.com/checkout/${(0,l.Z)()}/${o}`,{redirect_to:i})}function d(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{available:n,unavailableReason:r}=(0,i.Z)(t);return!n&&"missing_plan"===r}function p(e,t){return"missing_plan"===e&&t.required_plan}function m(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{details:n,unavailableReason:r}=(0,i.Z)(t);return p(r,n)}const h=[{name:"core/cover",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"video",description:__("Upgrade your plan to use video covers","jetpack")},{name:"core/audio",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"audio",description:__("Upgrade your plan to upload audio","jetpack")}];function g(){return(0,s.get)((0,o.Z)(),"jetpack.enable_upgrade_nudge",!1)}const f=e=>(0,s.map)(h,"name").includes(e),b=e=>(0,s.head)((0,s.filter)(h,(({name:t})=>t===e)))},76714:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(98817),a=n(48052);function s(e,t){const{available:n,unavailableReason:s}=(0,a.Z)(e);return!!n&&(0,r.registerPlugin)(`jetpack-${e}`,t)}},99505:(e,t,n)=>{"use strict";n.d(t,{M6:()=>i,Ug:()=>o,Wp:()=>s,aQ:()=>l});var r=n(50148);function a(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function s(){return"simple"===a()}function o(){return"atomic"===a()}function i(){const e=(0,r.Z)();return e?.jetpack?.is_private_site??!1}function l(){const e=(0,r.Z)();return e?.jetpack?.is_coming_soon??!1}},80354:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(82674),a=n.n(r),s=n(94333);const o=e=>(0,s.createHigherOrderComponent)((t=>n=>React.createElement(t,a()({},n,{className:n.name===e?"has-warning is-interactive":n.className}))),"withHasWarningIsInteractiveClassNames")},83059:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>j});var r=n(51806),a=n(42290),s=n(13419),o=n(4981),i=n(55609),l=n(9818),c=n(69307),u=n(65736),d=n(586),p=n(3639),m=n(92710),h=n(58532),g=n(51128),f=n.n(g),b=(n(99196),n(49259)),v=n(63634),k=n(854),y=n(6747),w=n(81612),E=n(27298);const __=u.__,_=f()("jetpack-ai-assistant:dropdown"),C=[{name:__("Correct spelling and grammar","jetpack"),key:"correct-spelling",aiSuggestion:v.Hd,icon:d.Z},{name:__("Simplify","jetpack"),key:"simplify",aiSuggestion:v.hI,icon:p.Z},{name:__("Summarize","jetpack"),key:"summarize",aiSuggestion:v.Lq,icon:m.Z},{name:__("Expand","jetpack"),key:"make-longer",aiSuggestion:v.TV,icon:h.Z}];function x(e){return e.filter((e=>null!=e)).map((e=>(0,o.getBlockContent)(e))).join("\n\n")}function S({onClose:e,blockType:t}){const[n,o]=(0,c.useState)(!1),{getSelectedBlockClientIds:u,getBlocksByClientId:d}=(0,l.useSelect)("core/block-editor"),{removeBlocks:p,replaceBlock:m}=(0,l.useDispatch)("core/block-editor");(0,c.useEffect)((()=>{const e=u(),t=x(d(e)),n=(0,k.t$)(t);return o(!n.length)}),[d,u]);const{tracks:h}=(0,s.z$)(),g=(n,r={})=>{const a=u(),s=d(a),o=x(s);e(),_("requestSuggestion",n,r),h.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:n,block_type:t});const[i]=s,[l,...c]=a,g={...i?.attributes||{},content:o},f=(0,y.b)(t,g),v={clientId:l,type:n,options:{...r,contentType:"generated",fromExtension:!0}};localStorage.setItem((0,b.$M)(f.clientId),JSON.stringify(v)),m(l,f),p(c)};return(0,r.createElement)(r.Fragment,null,n&&(0,r.createElement)(i.Notice,{status:"warning",isDismissible:!1,className:"jetpack-ai-assistant__info"},__("Add content to activate the tools below","jetpack")),(0,r.createElement)(i.MenuGroup,null,(0,r.createElement)(i.MenuItem,{icon:a.u_,iconPosition:"left",key:"key-ai-assistant",onClick:()=>{const e=u(),n=d(e),r=x(n),[a,...s]=e,[o]=n,i={...o?.attributes||{},content:r};m(a,(0,y.b)(t,i)),p(s),h.recordEvent("jetpack_ai_assistant_prompt_show",{block_type:t})},disabled:n},(0,r.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},__("Ask AI Assistant","jetpack"))),C.map((e=>(0,r.createElement)(i.MenuItem,{icon:e?.icon,iconPosition:"left",key:`key-${e.key}`,onClick:()=>{g(e.aiSuggestion,{})},disabled:n},(0,r.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},e.name)))),(0,r.createElement)(E.IP,{onChange:e=>{g(v.Lg,{tone:e})},disabled:n}),(0,r.createElement)(w.xK,{onChange:e=>{g(v.Nw,{language:e})},disabled:n})))}function j({blockType:e}){const{tracks:t}=(0,s.z$)();return(0,r.createElement)(i.Dropdown,{popoverProps:{variant:"toolbar"},renderToggle:({isOpen:e,onToggle:t})=>(0,r.createElement)(i.ToolbarButton,{className:"jetpack-ai-assistant__button",showTooltip:!0,onClick:t,"aria-haspopup":"true","aria-expanded":e,label:__("AI Assistant","jetpack"),icon:a.u_}),onToggle:n=>{n&&t.recordEvent("jetpack_ai_assistant_extension_toolbar_menu_show",{block_type:e})},renderContent:({onClose:t})=>(0,r.createElement)(S,{onClose:t,blockType:e})})}},3180:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(65736),s=n(26546),o=n(46867);const __=a.__,i=()=>{const e=`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/connection`,{autosaveAndRedirect:t,isRedirecting:n}=(0,o.Z)(e);return(0,r.createElement)(s.p,{buttonText:__("Reconnect Jetpack","jetpack"),checkoutUrl:e,className:"jetpack-ai-connect-banner",description:__("Your account is not connected to Jetpack at the moment.","jetpack"),goToCheckoutPage:e=>{t(e)},isRedirecting:n,visible:!0,align:null,title:null,context:null})}},87445:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(6895),s=n(55609),o=n(65736);const __=o.__;const i=function(){const e=(0,a.Z)("jetpack-ai-feedback");return(0,r.createElement)("div",{className:"jetpack-ai-feedback-control"},(0,r.createElement)(s.BaseControl,{label:__("Feedback","jetpack")},(0,r.createElement)("p",null,__("Your feedback is valuable in our commitment to refine and improve this feature.","jetpack")),(0,r.createElement)(s.ExternalLink,{href:e},__("Share your feedback","jetpack"))))}},81612:(e,t,n)=>{"use strict";n.d(t,{QA:()=>h,ZP:()=>f,xK:()=>b});var r=n(51806),a=n(13419),s=n(55609),o=n(65736),i=n(61074),l=n(46936),c=n(43618);n(99196);const __=o.__,u=["en","es","fr","de","it","pt","ru","zh","ja","ar","hi","ko"],d=window?.Jetpack_Editor_Initial_State?.siteLocale||navigator?.language,p=__("Translate","jetpack"),m=d?.split("-")[0]||"en",h=(d?.split("-"),{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")},id:{label:__("Indonesian","jetpack")},tl:{label:__("Filipino","jetpack")},vi:{label:__("Vietnamese","jetpack")}}),g=({value:e,onChange:t})=>{const n=[...u.filter((e=>e!==m))];return u.includes(m)&&n.unshift(m),(0,r.createElement)(s.MenuGroup,{label:__("Select language","jetpack")},n.map((n=>(0,r.createElement)(s.MenuItem,{key:`key-${n}`,onClick:()=>t(n+" ("+h[n].label+")"),isSelected:e===n},h[n].label))))};function f({value:e=m,label:t=p,onChange:n,disabled:o=!1}){const{tracks:l}=(0,a.z$)();return o?(0,r.createElement)(s.Tooltip,{text:t},(0,r.createElement)(s.Button,{disabled:!0},(0,r.createElement)(i.Z,{icon:c.Z}))):(0,r.createElement)(s.ToolbarDropdownMenu,{icon:c.Z,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&l.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"i18n"})}},(()=>(0,r.createElement)(g,{value:e,onChange:n})))}function b({value:e=m,label:t=p,onChange:n,disabled:a=!1}){return(0,r.createElement)(s.DropdownMenu,{className:"ai-assistant__i18n-dropdown",icon:c.Z,label:t,toggleProps:{children:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"ai-assistant__i18n-dropdown__toggle-label"},t),(0,r.createElement)(i.Z,{icon:l.Z})),disabled:a}},(({onClose:t})=>(0,r.createElement)(g,{onChange:e=>{n(e),t()},value:e})))}},50297:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(51806),a=n(55609),s=n(65736);const __=s.__,o=({image:e,inModal:t=!1,saveImage:n,setImageModal:s})=>(0,r.createElement)(a.Flex,{direction:"column"},t&&(0,r.createElement)(a.FlexItem,{style:{textAlign:"center"}},(0,r.createElement)(a.Button,{variant:"primary",onClick:()=>n(e)},__("Use this image","jetpack"))),(0,r.createElement)(a.FlexBlock,null,(0,r.createElement)("input",{type:"image",className:"wp-block-ai-image-image",src:e,alt:"",onClick:()=>s(e)})),!t&&(0,r.createElement)(a.FlexBlock,null,(0,r.createElement)(a.Flex,{direction:"column",style:{alignItems:"center"}},(0,r.createElement)(a.FlexItem,null,(0,r.createElement)(a.Button,{variant:"primary",onClick:()=>n(e)},__("Use this image","jetpack"))))))},24404:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>g});var r=n(51806),a=n(13419),s=n(55609),o=n(65736),i=n(77840);n(99196);const __=o.__,l="make-longer",c="makeLonger",u="make-shorter",d="makeShorter",p="summarize",m="summarize",h=[{name:__("Summarize","jetpack"),key:p,aiSuggestion:m},{name:__("Make longer","jetpack"),key:l,aiSuggestion:c},{name:__("Make shorter","jetpack"),key:u,aiSuggestion:d}];function g({key:e,label:t=__("Improve","jetpack"),exclude:n=[],onChange:o,disabled:l=!1}){const{tracks:c}=(0,a.z$)();return l?(0,r.createElement)(s.Tooltip,{text:t},(0,r.createElement)(s.Button,{disabled:!0},(0,r.createElement)(s.Icon,{icon:i.Z}))):(0,r.createElement)(s.ToolbarDropdownMenu,{icon:i.Z,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&c.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"improve"})}},(()=>{const a=h.filter((e=>!n.includes(e.key)));return(0,r.createElement)(s.MenuGroup,{label:t},a.map((t=>(0,r.createElement)(s.MenuItem,{key:`key-${t.key}`,onClick:()=>o(t.aiSuggestion,{contentType:"generated"}),isSelected:e===t.key},t.name))))}))}},85642:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>g});var r=n(51806),a=n(13419),s=n(55609),o=n(65736),i=n(77840),l=n(58532),c=n(586),u=n(3639),d=n(92710),p=n(32677);n(99196);const __=o.__,m=[{label:__("Post about…","jetpack"),description:{original:"Write a post about ",translated:__("Write a post about ","jetpack")}},{label:__("Informative article on…","jetpack"),description:{original:"Craft an informative article explaining ",translated:__("Craft an informative article explaining ","jetpack")}},{label:__("Step-by-step tutorial on…","jetpack"),description:{original:"Write a step-by-step tutorial on ",translated:__("Write a step-by-step tutorial on ","jetpack")}},{label:__("Motivational post on…","jetpack"),description:{original:"Create a motivational post on ",translated:__("Create a motivational post on ","jetpack")}}],h=[{label:__("Say it differently…","jetpack"),description:{original:"Rewrite it in a way that ",translated:__("Rewrite it in a way that ","jetpack")}},{label:__("Add…","jetpack"),description:{original:"Add more details about ",translated:__("Add more details about ","jetpack")}},{label:__("Remove…","jetpack"),description:{original:"Remove unnecessary details about ",translated:__("Remove unnecessary details about ","jetpack")}}];function g({hasContentBefore:e,hasContent:t,hasPostTitle:n,contentIsLoaded:o,onPromptSelect:g,onSuggestionSelect:f}){const b=__("Write with AI…","jetpack"),{tracks:v}=(0,a.z$)();return(0,r.createElement)(s.ToolbarDropdownMenu,{className:"jetpack-ai-assistant__templates-control",icon:null,label:b,text:b,onToggle:e=>{e&&v.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"write-with-ai"})}},(({onClose:a})=>o?(0,r.createElement)(s.MenuGroup,{label:__("Write…","jetpack")},h.map(((e,t)=>(0,r.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",key:`key-${t}`,onClick:()=>{a(),g(e.description)}},e.label)))):(0,r.createElement)(r.Fragment,null,e&&(0,r.createElement)(s.MenuGroup,{label:__("Based on preceding content…","jetpack")},(0,r.createElement)(s.MenuItem,{icon:l.Z,iconPosition:"left",onClick:()=>f("continue")},__("Continue writing","jetpack")),(0,r.createElement)(s.MenuItem,{icon:c.Z,iconPosition:"left",onClick:()=>f("correctSpelling")},__("Correct spelling and grammar","jetpack")),(0,r.createElement)(s.MenuItem,{icon:u.Z,iconPosition:"left",onClick:()=>f("simplify")},__("Simplify","jetpack"))),t&&(0,r.createElement)(s.MenuGroup,{label:__("Based on entire content…","jetpack")},t&&(0,r.createElement)(s.MenuItem,{icon:d.Z,iconPosition:"left",onClick:()=>f("summarize")},__("Summarize","jetpack")),t&&(0,r.createElement)(s.MenuItem,{icon:p.Z,iconPosition:"left",onClick:()=>f("generateTitle")},__("Generate a post title","jetpack"))),(0,r.createElement)(s.MenuGroup,{label:__("Write…","jetpack")},n&&(0,r.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",onClick:()=>f("titleSummary")},__("Summary based on title","jetpack")),m.map(((e,t)=>(0,r.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",key:`key-${t}`,onClick:()=>{a(),g(e.description)}},e.label)))))))}},27298:(e,t,n)=>{"use strict";n.d(t,{IP:()=>m,Nj:()=>u,ZP:()=>h,bu:()=>d});var r=n(51806),a=n(42290),s=n(13419),o=n(55609),i=n(65736),l=n(46936);n(99196);const __=i.__,c=["formal","informal","optimistic","humorous","serious","skeptical","empathetic","confident","passionate","provocative"],u="formal",d={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:"🔥"}},p=({value:e,onChange:t})=>(0,r.createElement)(o.MenuGroup,{label:__("Select tone","jetpack")},c.map((n=>(0,r.createElement)(o.MenuItem,{key:`key-${n}`,onClick:()=>t(n),isSelected:e===n},`${d[n].emoji} ${d[n].label}`))));function m({label:e=__("Change tone","jetpack"),value:t=u,onChange:n,disabled:s=!1}){return(0,r.createElement)(o.DropdownMenu,{icon:a.v_,label:e,className:"ai-assistant__tone-dropdown",popoverProps:{variant:"toolbar"},toggleProps:{children:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"ai-assistant__tone-dropdown__toggle-label"},e),(0,r.createElement)(o.Icon,{icon:l.Z})),disabled:s}},(({onClose:e})=>(0,r.createElement)(p,{value:t,onChange:t=>{n(t),e()}})))}function h({value:e=u,onChange:t,disabled:n=!1}){const i=__("Change tone","jetpack"),{tracks:l}=(0,s.z$)();return n?(0,r.createElement)(o.Tooltip,{text:i},(0,r.createElement)(o.Button,{disabled:!0},(0,r.createElement)(o.Icon,{icon:a.v_}))):(0,r.createElement)(o.ToolbarDropdownMenu,{icon:a.v_,label:i,popoverProps:{variant:"toolbar"},disabled:n,onToggle:e=>{e&&l.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"tone"})}},(()=>(0,r.createElement)(p,{value:e,onChange:t})))}},4965:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(51806),a=n(52175),s=n(55609),o=n(65736),i=n(79201),l=n(48381),c=(n(75022),n(63634)),u=n(81612),d=n(24404),p=n(85642),m=n(27298);const __=o.__,h=({contentIsLoaded:e,getSuggestionFromOpenAI:t,retryRequest:n,handleAcceptContent:o,handleImageRequest:h,handleTryAgain:g,showRetry:f,contentBefore:b,hasPostTitle:v,wholeContent:k,setUserPrompt:y,recordEvent:w,isGeneratingTitle:E})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.BlockControls,null,!f&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.ToolbarGroup,null,(0,r.createElement)(p.ZP,{hasContentBefore:!!b?.length,hasContent:!!k?.length,hasPostTitle:v,contentIsLoaded:e,onPromptSelect:e=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"prompt-template",prompt:e.original}),y(e.translated)},onSuggestionSelect:e=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:e}),t(e)}})),(0,r.createElement)(a.BlockControls,{group:"block"},(0,r.createElement)(m.ZP,{value:"neutral",onChange:n=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:c.Lg}),t(c.Lg,{tone:n,contentType:e?"generated":null})},disabled:!e&&!k?.length}),(0,r.createElement)(u.ZP,{value:"en",onChange:n=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:c.Nw}),t(c.Nw,{language:n,contentType:e?"generated":null})},disabled:!e&&!k?.length}),(0,r.createElement)(d.ZP,{onChange:t,exclude:E?["summarize"]:[],disabled:!e}))),(f||g)&&(0,r.createElement)(s.ToolbarGroup,null,!f&&e&&g&&(0,r.createElement)(s.ToolbarButton,{onClick:g},__("Try Again","jetpack")),f&&e&&(0,r.createElement)(s.ToolbarButton,{icon:i.Z,onClick:o},__("Accept","jetpack")),f&&(0,r.createElement)(s.ToolbarButton,{icon:l.Z,onClick:n},__("Retry","jetpack"))),false))},5246:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(51806),a=n(6895),s=n(13419),o=n(69307),i=n(65736),l=n(51128),c=n.n(l),u=n(99196),d=n(26546),p=n(23795),m=n(63206),h=n(18135),g=n(71449);const __=i.__,f=c()("jetpack-ai-assistant:upgrade-prompt"),b=e=>{const{upgradeType:t}=(0,h.Z)();return"vip"===t?(0,r.createElement)(d.p,{buttonText:null,checkoutUrl:null,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. Please reach out to your VIP account team.","jetpack"),{strong:(0,r.createElement)("strong",null)}),goToCheckoutPage:null,isRedirecting:null,visible:!0,align:null,title:null,context:null}):(({placement:e=null})=>{const{checkoutUrl:t,autosaveAndRedirect:n,isRedirecting:l}=(0,m.Z)(),c=(0,g.d)(),{nextTier:b,tierPlansEnabled:v,currentTier:k,requestsCount:y,usagePeriod:w}=(0,h.Z)(),E=(0,p.U_)(k)===p.dt?w?.requestsCount:y,{tracks:_}=(0,s.z$)(),C=(0,u.useCallback)((t=>{f("upgrade",e),_.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:k?.slug,requests_count:E,placement:e}),n(t)}),[n,k,E,_,e]),x=(0,u.useCallback)((()=>{f("contact us",e),_.recordEvent("jetpack_ai_upgrade_contact_us",{placement:e})}),[_,e]);if(!c)return(0,r.createElement)(d.p,{showButton:!1,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! Reach out to the site administrator to upgrade and keep using Jetpack AI.","jetpack"),{strong:(0,r.createElement)("strong",null)}),visible:!0,align:null,title:null,context:null});if(v){if(!b){const e=(0,a.Z)("jetpack-ai-tiers-more-requests-contact");return(0,r.createElement)(d.p,{buttonText:__("Contact Us","jetpack"),description:__("You have reached the request limit for your current plan.","jetpack"),className:"jetpack-ai-upgrade-banner",checkoutUrl:e,visible:!0,align:null,title:null,context:null,goToCheckoutPage:x})}return(0,r.createElement)(d.p,{buttonText:(0,i.sprintf)(/* Translators: number of requests */ +_n("You have %d auto-share remaining.","You have %d auto-shares remaining.",e,"jetpack"),e):"";return{default:"",exceeded:__("You have reached your auto-share limit. Scheduled posts will not be shared until shares become available.","jetpack"),full:__("You have reached your auto-share limit.","jetpack"),approaching:t}}(u);let p="default",m="none",h=d.default;return c>o?(p="error",m="exceeded",h=d.exceeded):c===o?(m="full",p="error",h=d.full):c>=.9*o?(m="approaching",p="error",h=d.approaching):c>=.8*o&&(m="approaching",p="warning",h=d.approaching),{status:m,noticeType:p,message:h,usedCount:l,scheduledCount:i,remainingCount:u}}),[e,t])}},45579:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(13419),a=n(86989),s=n.n(a),o=n(9818),i=n(12238),l=n(69307),c=n(65736),u=n(37568),d=n(48751);const __=c.__;function p(e){const t=e?.code,n=e?.errors?.length;if(!t&&!n)return!1;let r="";return t&&(r=__("Unable to share the Post","jetpack")),n&&(r=__("Unable to share the Post","jetpack")),{message:r,result:e}}function m(e){const{message:t}=(0,d.Z)(),{skippedConnections:n}=(0,u.Z)(),a=(0,o.useSelect)((e=>e(i.store).getCurrentPostId()),[]);e=e||a;const[c,m]=(0,l.useState)({data:[],error:{}}),h=((0,r.Pb)()?.social?.resharePath??"/wpcom/v2/posts/{postId}/publicize").replace("{postId}",e),g=(0,l.useCallback)((function(){const r={isFetching:!1,isError:!1,isSuccess:!1,data:[],error:{},postId:e};if(!c.isFetching)return m({...r,isFetching:!0}),s()({path:h,method:"POST",data:{message:t,skipped_connections:n}}).then(((e={})=>{const t=p(e);if(t)return m((e=>({...e,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:t})));m((t=>({...t,isFetching:!1,isSuccess:!0,isError:!1,data:e?.results,error:{}})))})).catch((e=>{m((t=>({...t,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:p(e)})))})),function(){m(r)}}),[e,t,n,c.isFetching,h]);return{...c,doPublicize:g}}},37568:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(9818),a=n(23177);function s(){const{refreshConnectionTestResults:e,toggleConnectionById:t}=(0,r.useDispatch)(a.h);return{...(0,r.useSelect)((e=>{const t=e(a.h),n=t.getConnections(),r=t.getEnabledConnections(),s=t.getDisabledConnections().map((e=>e.id));return{connections:n,hasConnections:n.length>0,hasEnabledConnections:r.length>0,skippedConnections:s,enabledConnections:r}}),[]),toggleById:t,refresh:e}}},48751:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(42032),a=n(71806);function s(){const{updateMeta:e,shareMessage:t}=(0,a.R)();return{message:t,maxLength:(0,r.getShareMessageMaxLength)(),updateMessage:function(t){e("jetpack_publicize_message",t)}}}},19890:(e,t,n)=>{"use strict";n.d(t,{N:()=>i});var r=n(9818),a=n(12238),s=n(23177),o=n(86419);function i(){const{mergeConnections:e}=(0,r.useDispatch)(s.h),{didPostSaveRequestSucceed:t,isCurrentPostPublished:n,getEditedPostAttribute:i}=(0,r.useSelect)((e=>e(a.store)),[]);(0,o.M1)((()=>{if(t()&&n()){const t=i("jetpack_publicize_connections");t?.length&&e(t)}}),[t,n,i])}},21052:(e,t,n)=>{"use strict";n.d(t,{Au:()=>l,Wh:()=>c,ZP:()=>u,hi:()=>i,wO:()=>o});var r=n(9818),a=n(23177),s=n(4957);const o="SET_AUTO_CONVERSION_SETTINGS";function i(){return c({isUpdating:!0})}function l(){return c({isUpdating:!1})}function c(e){return{type:o,options:e}}const u={updateAutoConversionSettings:function*(e){try{yield i(),yield c(e),yield(0,s.Fl)(e);const t=yield(0,s.wi)();return yield c(t.jetpack_social_autoconvert_images),!0}catch(e){const t=(0,r.select)(a.Eg).getAutoConversionSettings();return yield c(t),!1}finally{yield l()}},setAutoConversionSettings:c,refreshAutoConversionSettings:function*(){try{yield i();const e=yield(0,s.wi)();return yield c(e.jetpack_social_autoconvert_images),!0}catch(e){return!1}finally{yield l()}}}},23013:(e,t,n)=>{"use strict";n.r(t),n.d(t,{mergeConnections:()=>u,refreshConnectionTestResults:()=>d,setConnections:()=>l,syncConnectionsToPostMeta:()=>p,toggleConnection:()=>c,toggleConnectionById:()=>m});var r=n(13419),a=n(86989),s=n.n(a),o=n(12238),i=n(74442);function l(e){return{type:i.b,connections:e}}function c(e){return{type:i.L,connectionId:e}}function u(e){return function({dispatch:t,select:n}){const r=n.getConnections(),a=[],s={done:!1,enabled:Boolean(n.numberOfSharesRemaining()),toggleable:!0};for(const t of e){const e={...s,...r.find((e=>e.connection_id?e.connection_id===t.connection_id:e.id===t.id)),...t,is_healthy:t.test_success};a.push(e)}t(l(a))}}function d(e=!1){return async function({dispatch:t}){try{const n=(0,r.Pb)()?.social?.connectionRefreshPath||"/wpcom/v2/publicize/connection-test-results";t(u(await s()({path:n}))),e&&t(p())}catch(e){}}}function p(){return function({registry:e,select:t}){const n=t.getConnections();return e.dispatch(o.store).editPost({jetpack_publicize_connections:n})}}function m(e,t=!0){return function({dispatch:n}){n(c(e)),t&&n(p())}}},74442:(e,t,n)=>{"use strict";n.d(t,{L:()=>a,b:()=>r});const r="SET_CONNECTIONS",a="TOGGLE_CONNECTION"},54725:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(21052),a=n(23013),s=n(371),o=n(72438),i=n(4462);const l={...s.ZP,...i.ZP,...r.ZP,...o.Z,...a}},371:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>l,dz:()=>o,ff:()=>i});var r=n(9818),a=n(23177),s=n(4957);const o="SET_JETPACK_SETTINGS";function i(e){return{type:o,options:e}}const l={updateJetpackSettings:function*(e){try{yield i({is_updating:!0}),yield i(e),yield(0,s.RF)(e);const t=yield(0,s.es)();return yield i(t),!0}catch(e){const t=(0,r.select)(a.Eg).getJetpackSettings();return yield i(t),!1}finally{yield i({is_updating:!1})}},setJetpackSettings:i}},72438:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(4957),a=n(21052),s=n(4462);const o={refreshJetpackSocialSettings:function*(){try{yield(0,a.hi)(),yield(0,s.ds)();const e=yield(0,r.mu)();return yield(0,a.Wh)(e.jetpack_social_autoconvert_images),yield(0,s.ch)(e.jetpack_social_image_generator_settings),!0}catch(e){return!1}finally{yield(0,a.Au)(),yield(0,s.Gr)()}}}},4462:(e,t,n)=>{"use strict";n.d(t,{Gr:()=>l,ZP:()=>u,ch:()=>c,ds:()=>i,kg:()=>o});var r=n(9818),a=n(23177),s=n(4957);const o="SET_SOCIAL_IMAGE_GENERATOR_SETTINGS";function i(){return c({isUpdating:!0})}function l(){return c({isUpdating:!1})}function c(e){return{type:o,options:e}}const u={updateSocialImageGeneratorSettings:function*(e){try{yield i(),yield c(e),yield(0,s.Ux)(e);const t=yield(0,s.oB)();return yield c(t.jetpack_social_image_generator_settings),!0}catch(e){const t=(0,r.select)(a.Eg).getSocialImageGeneratorSettings();return yield c(t),!1}finally{yield l()}},setSocialImageGeneratorSettings:c,refreshSocialImageGeneratorSettings:function*(){try{yield i();const e=yield(0,s.oB)();return yield c(e.jetpack_social_image_generator_settings),!0}catch(e){return!1}finally{yield l()}}}},4957:(e,t,n)=>{"use strict";n.d(t,{Fl:()=>v,RF:()=>m,Ux:()=>g,ZP:()=>k,es:()=>p,mu:()=>b,oB:()=>h,wi:()=>f});var r=n(86989),a=n.n(r);const s="FETCH_JETPACK_SETTINGS",o="UPDATE_JETPACK_SETTINGS",i="FETCH_SOCIAL_IMAGE_GENERATOR_SETTINGS",l="UPDATE_SOCIAL_IMAGE_GENERATOR_SETTINGS",c="FETCH_AUTO_CONVERSION_SETTINGS",u="UPDATE_AUTO_CONVERSION_SETTINGS",d="FETCH_JETPACK_SOCIAL_SETTINGS",p=()=>({type:s}),m=e=>({type:o,settings:e}),h=()=>({type:i}),g=e=>({type:l,settings:e}),f=()=>({type:c}),b=()=>({type:d}),v=e=>({type:u,settings:e}),k={[s]:function(){return a()({path:"/jetpack/v4/social/settings"})},[o]:function(e){return a()({path:"/jetpack/v4/social/settings",method:"POST",data:e.settings})},[i]:function(){return a()({path:"/wp/v2/settings?_fields=jetpack_social_image_generator_settings"})},[l]:function(e){return a()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_image_generator_settings:e.settings}})},[c]:function(){return a()({path:"/wp/v2/settings?_fields=jetpack_social_autoconvert_images"})},[u]:function(e){return a()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_autoconvert_images:e.settings}})},[d]:function(){return a()({path:"/wp/v2/settings?_fields=jetpack_social_autoconvert_images,jetpack_social_image_generator_settings"})}}},23177:(e,t,n)=>{"use strict";n.d(t,{Bb:()=>f,Cd:()=>g,Eg:()=>c,M$:()=>p,cs:()=>h,h:()=>v,qk:()=>m,uJ:()=>d,wV:()=>b});var r=n(9818),a=n(54725),s=n(4957),o=n(45272),i=n(15781),l=n(22987);const c="jetpack-social-plugin",u={reducer:o.Z,actions:a.Z,selectors:l.Z,resolvers:i.ZP,controls:s.ZP,initialState:window?.jetpackSocialInitialState||window?.Initial_State?.socialInitialState||window?.Jetpack_Editor_Initial_State?.social||{}},d="facebook",p="instagram-business",m="linkedin",h="mastodon",g="nextdoor",f="tumblr",b="twitter",v=(0,r.createReduxStore)(c,u);(0,r.register)(v)},20750:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(21052);const a=(e={},t)=>t.type===r.wO?{...e,...t.options}:e},71837:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74442);const a=(e={},t)=>{switch(t.type){case r.b:return{...e,connections:t.connections};case r.L:return{...e,connections:e.connections.map((e=>(e.connection_id?e.connection_id===t.connectionId:e.id===t.connectionId)?{...e,enabled:!e.enabled}:e))}}return e}},45272:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(9818),a=n(20750),s=n(71837),o=n(80697),i=n(35652),l=n(28696),c=n(54489);const u=(0,r.combineReducers)({sharesData:i.Z,siteData:l.Z,connectionData:s.Z,jetpackSettings:o.Z,socialImageGeneratorSettings:c.Z,autoConversionSettings:a.Z,hasPaidPlan:(e=!1)=>e})},80697:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(371);const a=(e={},t)=>t.type===r.dz?{...e,...t.options}:e},35652:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(e={})=>e},28696:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(e={})=>e},54489:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(4462);const a=(e={},t)=>t.type===r.kg?{...e,...t.options}:e},15781:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>c});var r=n(12238),a=n(21052),s=n(23013),o=n(371),i=n(4462),l=n(4957);const c={getJetpackSettings:function*(){try{const e=yield(0,l.es)();if(e)return(0,o.ff)(e)}catch(e){console.log(e)}},getSocialImageGeneratorSettings:function*(){try{const e=yield(0,l.oB)();if(e)return(0,i.ch)(e.jetpack_social_image_generator_settings)}catch(e){console.log(e)}},getAutoConversionSettings:function*(){try{const e=yield(0,l.wi)();if(e)return(0,a.Wh)(e.jetpack_social_autoconvert_images)}catch(e){console.log(e)}},getConnections:function(){return function({dispatch:e,registry:t}){const n=t.select(r.store).getEditedPostAttribute("jetpack_publicize_connections");e((0,s.setConnections)(n||[]))}}}},68113:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getAutoConversionSettings:e=>e.autoConversionSettings,isAutoConversionAvailable:e=>e.autoConversionSettings.available,isAutoConversionEnabled:e=>e.autoConversionSettings.available&&e.autoConversionSettings.enabled,isAutoConversionSettingsUpdating:e=>e.autoConversionSettings.isUpdating}},43354:(e,t,n)=>{"use strict";function r(e){return e.connectionData?.connections??[]}function a(e){return e.connectionData?.adminUrl??null}function s(e){return r(e).length>0}function o(e){return r(e).filter((e=>!1===e.test_success))}function i(e){return r(e).filter((e=>"must_reauth"===e.test_success)).map((e=>e.service_name))}function l(e){return r(e).filter((e=>e.enabled))}function c(e){return r(e).filter((e=>!e.enabled))}function u(e,t,{forceDefaults:n=!1}={}){let a="",s="",o="";if(!n){const n=r(e).find((({service_name:e})=>t===e));if(n){const{display_name:e,profile_display_name:r,profile_picture:i}=n;a="twitter"===t?r:e,o="twitter"===t?e:n.username,s=i}}return{displayName:a,profileImage:s,username:o}}n.r(t),n.d(t,{getConnectionProfileDetails:()=>u,getConnections:()=>r,getConnectionsAdminUrl:()=>a,getDisabledConnections:()=>c,getEnabledConnections:()=>l,getFailedConnections:()=>o,getMustReauthConnections:()=>i,hasConnections:()=>s})},22987:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(68113),a=n(43354),s=n(82836),o=n(31473),i=n(85675),l=n(45073);const c={...i.Z,...a,...s.Z,...o,...l.Z,...r.Z}},82836:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getJetpackSettings:e=>e.jetpackSettings,isModuleEnabled:e=>e.jetpackSettings.publicize_active,showPricingPage:e=>e.jetpackSettings.show_pricing_page,isUpdatingJetpackSettings:e=>e.jetpackSettings.is_updating,hasPaidPlan:e=>!(e.jetpackSettings?.showNudge??1),isEnhancedPublishingEnabled:e=>e.jetpackSettings?.isEnhancedPublishingEnabled??!1,getDismissedNotices:e=>e.jetpackSettings?.dismissedNotices}},31473:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getScheduledSharesCount:()=>l,getShareLimit:()=>o,getSharedPostsCount:()=>u,getSharesUsedCount:()=>i,getTotalSharesCount:()=>c,isShareLimitEnabled:()=>a,numberOfSharesRemaining:()=>p,shouldShowAdvancedPlanNudge:()=>d,showShareLimits:()=>s});var r=n(82836);function a(e){return e.sharesData?.is_share_limit_enabled??!1}function s(e){return!r.Z.hasPaidPlan(e)&&!e.hasPaidPlan&&a(e)}function o(e){return e.sharesData?.share_limit??30}function i(e){return e.sharesData?.publicized_count??0}function l(e){return e.sharesData?.to_be_publicized_count??0}function c(e){const t=i(e)+l(e);return Math.max(t,0)}function u(e){return e.sharesData?.shared_posts_count??0}function d(e){return e.sharesData?.show_advanced_plan_upgrade_nudge??!1}function p(e,t={}){if(!s(e))return 1/0;const{includeScheduled:n}={includeScheduled:!0,...t},r=i(e),a=o(e),c=n?l(e):0;return Math.max(a-r-c,0)}},85675:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getAdminUrl:e=>e.siteData?.adminUrl??null,getAPIRootUrl:e=>e.siteData?.apiRoot??null,getAPINonce:e=>e.siteData?.apiNonce??null,getRegistrationNonce:e=>e.siteData?.registrationNonce??null,getSiteSuffix:e=>e.siteData?.siteSuffix??null,getPluginVersion:e=>e.siteData?.pluginVersion??null}},45073:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getSocialImageGeneratorSettings:e=>e.socialImageGeneratorSettings,isSocialImageGeneratorAvailable:e=>e.socialImageGeneratorSettings.available,isSocialImageGeneratorEnabled:e=>e.socialImageGeneratorSettings.enabled,isUpdatingSocialImageGeneratorSettings:e=>e.socialImageGeneratorSettings.isUpdating,getSocialImageGeneratorDefaultTemplate:e=>e.socialImageGeneratorSettings.template}},5463:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r=255;function a(){return r}},12677:(e,t,n)=>{"use strict";n.d(t,{h:()=>a});var r=n(13419);function a(){return(0,r.Pb)()?.social?.supportedAdditionalConnections||[]}},42032:(e,t,n)=>{"use strict";n.d(t,{getShareMessageMaxLength:()=>r.A,getSupportedAdditionalConnections:()=>a.h});var r=n(5463),a=n(12677),s=n(581);n.o(s,"useSyncPostDataToStore")&&n.d(t,{useSyncPostDataToStore:function(){return s.useSyncPostDataToStore}})},581:()=>{},13419:(e,t,n)=>{"use strict";n.d(t,{Dp:()=>u.Z,FK:()=>c.FK,HD:()=>c.HD,M6:()=>s.M6,OZ:()=>o.Z,Pb:()=>r.Z,Pm:()=>m.Z,Qq:()=>c.Qq,Rl:()=>c.Rl,T:()=>l.Z,Ug:()=>s.Ug,Wp:()=>s.Wp,X1:()=>c.X1,_D:()=>c._D,aQ:()=>s.aQ,dM:()=>h.d,el:()=>p.Z,lQ:()=>a.Z,lt:()=>h.l,m3:()=>c.m3,o_:()=>i.Z,og:()=>g.Z,z$:()=>d.Z});var r=n(50148),a=n(35004),s=n(99505),o=n(48052),i=n(76714),l=n(80354),c=n(75404),u=n(68586),d=n(61053),p=n(11380),m=n(6342),h=n(96959),g=n(19499);n(39058)},6342:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(78868),a=n(99196),s=n.n(a);const o=()=>s().createElement(r.Z,{className:"jetpack-editor-panel-logo",height:16,logoColor:"#1E1E1E",showText:!1})},96959:(e,t,n)=>{"use strict";n.d(t,{d:()=>s,l:()=>o});var r=n(69307),a=n(12953);function s(e){const t={};let n="span",a=e.icon;const s=document.createElement("div");s.innerHTML=e.icon;const o=s.querySelector("svg");return o&&(n="svg",a=o.innerHTML,Array.from(o.attributes).forEach((({nodeName:e,nodeValue:n})=>t[e]=n))),(0,r.createElement)(n,{...t,dangerouslySetInnerHTML:{__html:a||""}})}function o(e){return{src:s(e),foreground:(0,a.Z)()}}},12953:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(99505);const a="#069e08";function s(){return(0,r.Ug)()||(0,r.Wp)()?null:a}},19499:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(50148);function a(){const e=(0,r.Z)();return e?.blocks_variation??"production"}},50148:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r="Jetpack_Editor_Initial_State";function a(){return"object"==typeof window?window?.[r]??null:null}},48052:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(50148);function a(e){const t=(0,r.Z)(),n=t?.available_blocks?.[e]?.available??!1,a=t?.available_blocks?.[e]?.unavailable_reason??"unknown";return{available:n,...!n&&{details:t?.available_blocks?.[e]?.details??[],unavailableReason:a}}}},35004:(e,t,n)=>{"use strict";function r(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:null}n.d(t,{Z:()=>r})},61053:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(6975),a=n(31294),s=n(69307);const{tracks:o}=r.Z,{recordEvent:i}=o,l=({pageViewEventName:e=null,pageViewNamespace:t="jetpack",pageViewSuffix:n="page_view",pageViewEventProperties:l={}}={})=>{const[c,u]=(0,s.useState)(!1),{isUserConnected:d,isRegistered:p,userConnectionData:m={}}=(0,a.Z)(),{wpcomUser:{login:h,ID:g}={},blogId:f}=m.currentUser||{},b=(0,s.useCallback)((async(e,t={})=>{d&&g&&h&&i(e,t)}),[d,g,h]);return(0,s.useEffect)((()=>{d&&g&&h&&f&&r.Z.initialize(g,h,{blog_id:f})}),[f,g,h,d]),(0,s.useEffect)((()=>{const r=e?`${t}_${e}_${n}`:null;p&&r&&(c||(b(r,l),u(!0)))}),[c,t,e,n,p,l,b]),{recordEvent:b,tracks:o}}},11380:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9818),a=n(69307),s=n(39058);const o=e=>{const{isModuleActive:t,isChangingStatus:n,isLoadingModules:o}=(0,r.useSelect)((t=>{const n=t(s.p);return{isModuleActive:n.isModuleActive(e),isChangingStatus:n.isModuleUpdating(e),isLoadingModules:n.areModulesLoading(e)}}),[s.p]),{updateJetpackModuleStatus:i}=(0,r.useDispatch)(s.p),l=(0,a.useCallback)((t=>i({name:e,active:t})),[e,i]);return(0,a.useMemo)((()=>({isLoadingModules:o,isChangingStatus:n,isModuleActive:t,changeStatus:l})),[o,n,t,l])}},68586:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(50148);function a(){return(0,r.Z)()?.jetpack?.is_current_user_connected??!1}},44166:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>p,rW:()=>d});var r=n(9818),a=n(99505),s=n(82162),o=n(39058);const i="SET_JETPACK_MODULES",l="SET_MODULE_UPDATING";function c(e){return d({isLoading:e})}function u(e,t){return{type:l,name:e,isUpdating:t}}function d(e){return{type:i,options:e}}const p={updateJetpackModuleStatus:function*(e){try{yield u(e.name,!0),yield(0,s.zL)(e);const t=yield(0,s.Bs)();return yield d({data:t}),!0}catch(e){const t=(0,r.select)(o.p).getJetpackModules();return yield d(t),!1}finally{yield u(e.name,!1)}},setJetpackModules:d,fetchModules:function*(){if((0,a.Wp)())return!0;try{yield c(!0);const e=yield(0,s.Bs)();return yield d({data:e}),!0}catch(e){const t=(0,r.select)(o.p).getJetpackModules();return yield d(t),!1}finally{yield c(!1)}}}},82162:(e,t,n)=>{"use strict";n.d(t,{Bs:()=>i,ZP:()=>c,zL:()=>l});var r=n(86989),a=n.n(r);const s="FETCH_JETPACK_MODULES",o="UPDATE_JETPACK_MODULE_STATUS",i=()=>({type:s}),l=e=>({type:o,settings:e}),c={[s]:function(){return a()({path:"/jetpack/v4/module/all",method:"GET"})},[o]:function({settings:e}){return a()({path:`/jetpack/v4/module/${e.name}/active`,method:"POST",data:{active:e.active}})}}},39058:(e,t,n)=>{"use strict";n.d(t,{p:()=>c});var r=n(9818),a=n(44166),s=n(82162),o=n(42469),i=n(55133),l=n(43524);const c="jetpack-modules",u=(0,r.createReduxStore)(c,{reducer:o.Z,actions:a.ZP,controls:s.ZP,resolvers:i.Z,selectors:l.Z});(0,r.register)(u);const d=window?.Initial_State?.getModules||window?.Jetpack_Editor_Initial_State?.modules||null;null!==d&&(0,r.dispatch)(c).setJetpackModules({data:{...d}})},42469:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r={isLoading:!1,isUpdating:{},data:{}},a=(e=r,t)=>{switch(t.type){case"SET_JETPACK_MODULES":return{...e,...t.options};case"SET_MODULE_UPDATING":return{...e,isUpdating:{...e.isUpdating,[t.name]:t.isUpdating}}}return e}},55133:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(44166),a=n(82162);const s={getJetpackModules:function*(){try{const e=yield(0,a.Bs)();if(e)return(0,r.rW)({data:e})}catch(e){console.error(e)}}}},43524:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(99505);const a={getJetpackModules:e=>e.data,isModuleActive:(e,t)=>(0,r.Wp)()||(e?.data?.[t]?.activated??!1),areModulesLoading:e=>e.isLoading??!1,isModuleUpdating:(e,t)=>e?.isUpdating?.[t]??!1}},75404:(e,t,n)=>{"use strict";n.d(t,{FK:()=>g,HD:()=>f,Qq:()=>u,Rl:()=>m,X1:()=>d,_D:()=>p,m3:()=>b});var r=n(65736),a=n(96483),s=n(92819),o=n(50148),i=n(48052),l=n(35004),c=n(99505);const __=r.__;function u({planSlug:e,plan:t,postId:n,postType:r}){const o=(0,s.startsWith)(e,"jetpack_")?e:(0,s.get)(t,["path_slug"]),i=(void 0===r?()=>{const e=new URLSearchParams(window.location.search);return(0,a.addQueryArgs)(window.location.protocol+`//${(0,l.Z)().replace("::","/")}/wp-admin/site-editor.php`,{postId:e.get("postId"),postType:e.get("postType"),plan_upgraded:1})}:()=>{const e=["page","post"].includes(r)?"":"edit";return(0,c.Wp)()?(0,a.addQueryArgs)("/"+(0,s.compact)([e,r,(0,l.Z)(),n]).join("/"),{plan_upgraded:1}):(0,a.addQueryArgs)(window.location.protocol+`//${(0,l.Z)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:n,plan_upgraded:1})})();return(0,c.Ug)()?(0,a.addQueryArgs)(`https://wordpress.com/plans/${(0,l.Z)()}`,{redirect_to:i,customerType:"business"}):o&&(0,a.addQueryArgs)(`https://wordpress.com/checkout/${(0,l.Z)()}/${o}`,{redirect_to:i})}function d(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{available:n,unavailableReason:r}=(0,i.Z)(t);return!n&&"missing_plan"===r}function p(e,t){return"missing_plan"===e&&t.required_plan}function m(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{details:n,unavailableReason:r}=(0,i.Z)(t);return p(r,n)}const h=[{name:"core/cover",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"video",description:__("Upgrade your plan to use video covers","jetpack")},{name:"core/audio",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"audio",description:__("Upgrade your plan to upload audio","jetpack")}];function g(){return(0,s.get)((0,o.Z)(),"jetpack.enable_upgrade_nudge",!1)}const f=e=>(0,s.map)(h,"name").includes(e),b=e=>(0,s.head)((0,s.filter)(h,(({name:t})=>t===e)))},76714:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(98817),a=n(48052);function s(e,t){const{available:n,unavailableReason:s}=(0,a.Z)(e);return!!n&&(0,r.registerPlugin)(`jetpack-${e}`,t)}},99505:(e,t,n)=>{"use strict";n.d(t,{M6:()=>i,Ug:()=>o,Wp:()=>s,aQ:()=>l});var r=n(50148);function a(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function s(){return"simple"===a()}function o(){return"atomic"===a()}function i(){const e=(0,r.Z)();return e?.jetpack?.is_private_site??!1}function l(){const e=(0,r.Z)();return e?.jetpack?.is_coming_soon??!1}},80354:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(82674),a=n.n(r),s=n(94333);const o=e=>(0,s.createHigherOrderComponent)((t=>n=>React.createElement(t,a()({},n,{className:n.name===e?"has-warning is-interactive":n.className}))),"withHasWarningIsInteractiveClassNames")},83059:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>j});var r=n(51806),a=n(42290),s=n(13419),o=n(4981),i=n(55609),l=n(9818),c=n(69307),u=n(65736),d=n(586),p=n(3639),m=n(92710),h=n(58532),g=n(51128),f=n.n(g),b=(n(99196),n(49259)),v=n(63634),k=n(854),y=n(6747),w=n(81612),E=n(27298);const __=u.__,_=f()("jetpack-ai-assistant:dropdown"),C=[{name:__("Correct spelling and grammar","jetpack"),key:"correct-spelling",aiSuggestion:v.Hd,icon:d.Z},{name:__("Simplify","jetpack"),key:"simplify",aiSuggestion:v.hI,icon:p.Z},{name:__("Summarize","jetpack"),key:"summarize",aiSuggestion:v.Lq,icon:m.Z},{name:__("Expand","jetpack"),key:"make-longer",aiSuggestion:v.TV,icon:h.Z}];function x(e){return e.filter((e=>null!=e)).map((e=>(0,o.getBlockContent)(e))).join("\n\n")}function S({onClose:e,blockType:t}){const[n,o]=(0,c.useState)(!1),{getSelectedBlockClientIds:u,getBlocksByClientId:d}=(0,l.useSelect)("core/block-editor"),{removeBlocks:p,replaceBlock:m}=(0,l.useDispatch)("core/block-editor");(0,c.useEffect)((()=>{const e=u(),t=x(d(e)),n=(0,k.t$)(t);return o(!n.length)}),[d,u]);const{tracks:h}=(0,s.z$)(),g=(n,r={})=>{const a=u(),s=d(a),o=x(s);e(),_("requestSuggestion",n,r),h.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:n,block_type:t});const[i]=s,[l,...c]=a,g={...i?.attributes||{},content:o},f=(0,y.b)(t,g),v={clientId:l,type:n,options:{...r,contentType:"generated",fromExtension:!0}};localStorage.setItem((0,b.$M)(f.clientId),JSON.stringify(v)),m(l,f),p(c)};return(0,r.createElement)(r.Fragment,null,n&&(0,r.createElement)(i.Notice,{status:"warning",isDismissible:!1,className:"jetpack-ai-assistant__info"},__("Add content to activate the tools below","jetpack")),(0,r.createElement)(i.MenuGroup,null,(0,r.createElement)(i.MenuItem,{icon:a.u_,iconPosition:"left",key:"key-ai-assistant",onClick:()=>{const e=u(),n=d(e),r=x(n),[a,...s]=e,[o]=n,i={...o?.attributes||{},content:r};m(a,(0,y.b)(t,i)),p(s),h.recordEvent("jetpack_ai_assistant_prompt_show",{block_type:t})},disabled:n},(0,r.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},__("Ask AI Assistant","jetpack"))),C.map((e=>(0,r.createElement)(i.MenuItem,{icon:e?.icon,iconPosition:"left",key:`key-${e.key}`,onClick:()=>{g(e.aiSuggestion,{})},disabled:n},(0,r.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},e.name)))),(0,r.createElement)(E.IP,{onChange:e=>{g(v.Lg,{tone:e})},disabled:n}),(0,r.createElement)(w.xK,{onChange:e=>{g(v.Nw,{language:e})},disabled:n})))}function j({blockType:e}){const{tracks:t}=(0,s.z$)();return(0,r.createElement)(i.Dropdown,{popoverProps:{variant:"toolbar"},renderToggle:({isOpen:e,onToggle:t})=>(0,r.createElement)(i.ToolbarButton,{className:"jetpack-ai-assistant__button",showTooltip:!0,onClick:t,"aria-haspopup":"true","aria-expanded":e,label:__("AI Assistant","jetpack"),icon:a.u_}),onToggle:n=>{n&&t.recordEvent("jetpack_ai_assistant_extension_toolbar_menu_show",{block_type:e})},renderContent:({onClose:t})=>(0,r.createElement)(S,{onClose:t,blockType:e})})}},3180:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(65736),s=n(26546),o=n(46867);const __=a.__,i=()=>{const e=`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/connection`,{autosaveAndRedirect:t,isRedirecting:n}=(0,o.Z)(e);return(0,r.createElement)(s.p,{buttonText:__("Reconnect Jetpack","jetpack"),checkoutUrl:e,className:"jetpack-ai-connect-banner",description:__("Your account is not connected to Jetpack at the moment.","jetpack"),goToCheckoutPage:e=>{t(e)},isRedirecting:n,visible:!0,align:null,title:null,context:null})}},87445:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(6895),s=n(55609),o=n(65736);const __=o.__;const i=function(){const e=(0,a.Z)("jetpack-ai-feedback");return(0,r.createElement)("div",{className:"jetpack-ai-feedback-control"},(0,r.createElement)(s.BaseControl,{label:__("Feedback","jetpack")},(0,r.createElement)("p",null,__("Your feedback is valuable in our commitment to refine and improve this feature.","jetpack")),(0,r.createElement)(s.ExternalLink,{href:e},__("Share your feedback","jetpack"))))}},81612:(e,t,n)=>{"use strict";n.d(t,{QA:()=>h,ZP:()=>f,xK:()=>b});var r=n(51806),a=n(13419),s=n(55609),o=n(65736),i=n(61074),l=n(46936),c=n(43618);n(99196);const __=o.__,u=["en","es","fr","de","it","pt","ru","zh","ja","ar","hi","ko"],d=window?.Jetpack_Editor_Initial_State?.siteLocale||navigator?.language,p=__("Translate","jetpack"),m=d?.split("-")[0]||"en",h=(d?.split("-"),{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")},id:{label:__("Indonesian","jetpack")},tl:{label:__("Filipino","jetpack")},vi:{label:__("Vietnamese","jetpack")}}),g=({value:e,onChange:t})=>{const n=[...u.filter((e=>e!==m))];return u.includes(m)&&n.unshift(m),(0,r.createElement)(s.MenuGroup,{label:__("Select language","jetpack")},n.map((n=>(0,r.createElement)(s.MenuItem,{key:`key-${n}`,onClick:()=>t(n+" ("+h[n].label+")"),isSelected:e===n},h[n].label))))};function f({value:e=m,label:t=p,onChange:n,disabled:o=!1}){const{tracks:l}=(0,a.z$)();return o?(0,r.createElement)(s.Tooltip,{text:t},(0,r.createElement)(s.Button,{disabled:!0},(0,r.createElement)(i.Z,{icon:c.Z}))):(0,r.createElement)(s.ToolbarDropdownMenu,{icon:c.Z,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&l.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"i18n"})}},(()=>(0,r.createElement)(g,{value:e,onChange:n})))}function b({value:e=m,label:t=p,onChange:n,disabled:a=!1}){return(0,r.createElement)(s.DropdownMenu,{className:"ai-assistant__i18n-dropdown",icon:c.Z,label:t,toggleProps:{children:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"ai-assistant__i18n-dropdown__toggle-label"},t),(0,r.createElement)(i.Z,{icon:l.Z})),disabled:a}},(({onClose:t})=>(0,r.createElement)(g,{onChange:e=>{n(e),t()},value:e})))}},50297:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(51806),a=n(55609),s=n(65736);const __=s.__,o=({image:e,inModal:t=!1,saveImage:n,setImageModal:s})=>(0,r.createElement)(a.Flex,{direction:"column"},t&&(0,r.createElement)(a.FlexItem,{style:{textAlign:"center"}},(0,r.createElement)(a.Button,{variant:"primary",onClick:()=>n(e)},__("Use this image","jetpack"))),(0,r.createElement)(a.FlexBlock,null,(0,r.createElement)("input",{type:"image",className:"wp-block-ai-image-image",src:e,alt:"",onClick:()=>s(e)})),!t&&(0,r.createElement)(a.FlexBlock,null,(0,r.createElement)(a.Flex,{direction:"column",style:{alignItems:"center"}},(0,r.createElement)(a.FlexItem,null,(0,r.createElement)(a.Button,{variant:"primary",onClick:()=>n(e)},__("Use this image","jetpack"))))))},24404:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>g});var r=n(51806),a=n(13419),s=n(55609),o=n(65736),i=n(77840);n(99196);const __=o.__,l="make-longer",c="makeLonger",u="make-shorter",d="makeShorter",p="summarize",m="summarize",h=[{name:__("Summarize","jetpack"),key:p,aiSuggestion:m},{name:__("Make longer","jetpack"),key:l,aiSuggestion:c},{name:__("Make shorter","jetpack"),key:u,aiSuggestion:d}];function g({key:e,label:t=__("Improve","jetpack"),exclude:n=[],onChange:o,disabled:l=!1}){const{tracks:c}=(0,a.z$)();return l?(0,r.createElement)(s.Tooltip,{text:t},(0,r.createElement)(s.Button,{disabled:!0},(0,r.createElement)(s.Icon,{icon:i.Z}))):(0,r.createElement)(s.ToolbarDropdownMenu,{icon:i.Z,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&c.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"improve"})}},(()=>{const a=h.filter((e=>!n.includes(e.key)));return(0,r.createElement)(s.MenuGroup,{label:t},a.map((t=>(0,r.createElement)(s.MenuItem,{key:`key-${t.key}`,onClick:()=>o(t.aiSuggestion,{contentType:"generated"}),isSelected:e===t.key},t.name))))}))}},85642:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>g});var r=n(51806),a=n(13419),s=n(55609),o=n(65736),i=n(77840),l=n(58532),c=n(586),u=n(3639),d=n(92710),p=n(32677);n(99196);const __=o.__,m=[{label:__("Post about…","jetpack"),description:{original:"Write a post about ",translated:__("Write a post about ","jetpack")}},{label:__("Informative article on…","jetpack"),description:{original:"Craft an informative article explaining ",translated:__("Craft an informative article explaining ","jetpack")}},{label:__("Step-by-step tutorial on…","jetpack"),description:{original:"Write a step-by-step tutorial on ",translated:__("Write a step-by-step tutorial on ","jetpack")}},{label:__("Motivational post on…","jetpack"),description:{original:"Create a motivational post on ",translated:__("Create a motivational post on ","jetpack")}}],h=[{label:__("Say it differently…","jetpack"),description:{original:"Rewrite it in a way that ",translated:__("Rewrite it in a way that ","jetpack")}},{label:__("Add…","jetpack"),description:{original:"Add more details about ",translated:__("Add more details about ","jetpack")}},{label:__("Remove…","jetpack"),description:{original:"Remove unnecessary details about ",translated:__("Remove unnecessary details about ","jetpack")}}];function g({hasContentBefore:e,hasContent:t,hasPostTitle:n,contentIsLoaded:o,onPromptSelect:g,onSuggestionSelect:f}){const b=__("Write with AI…","jetpack"),{tracks:v}=(0,a.z$)();return(0,r.createElement)(s.ToolbarDropdownMenu,{className:"jetpack-ai-assistant__templates-control",icon:null,label:b,text:b,onToggle:e=>{e&&v.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"write-with-ai"})}},(({onClose:a})=>o?(0,r.createElement)(s.MenuGroup,{label:__("Write…","jetpack")},h.map(((e,t)=>(0,r.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",key:`key-${t}`,onClick:()=>{a(),g(e.description)}},e.label)))):(0,r.createElement)(r.Fragment,null,e&&(0,r.createElement)(s.MenuGroup,{label:__("Based on preceding content…","jetpack")},(0,r.createElement)(s.MenuItem,{icon:l.Z,iconPosition:"left",onClick:()=>f("continue")},__("Continue writing","jetpack")),(0,r.createElement)(s.MenuItem,{icon:c.Z,iconPosition:"left",onClick:()=>f("correctSpelling")},__("Correct spelling and grammar","jetpack")),(0,r.createElement)(s.MenuItem,{icon:u.Z,iconPosition:"left",onClick:()=>f("simplify")},__("Simplify","jetpack"))),t&&(0,r.createElement)(s.MenuGroup,{label:__("Based on entire content…","jetpack")},t&&(0,r.createElement)(s.MenuItem,{icon:d.Z,iconPosition:"left",onClick:()=>f("summarize")},__("Summarize","jetpack")),t&&(0,r.createElement)(s.MenuItem,{icon:p.Z,iconPosition:"left",onClick:()=>f("generateTitle")},__("Generate a post title","jetpack"))),(0,r.createElement)(s.MenuGroup,{label:__("Write…","jetpack")},n&&(0,r.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",onClick:()=>f("titleSummary")},__("Summary based on title","jetpack")),m.map(((e,t)=>(0,r.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",key:`key-${t}`,onClick:()=>{a(),g(e.description)}},e.label)))))))}},27298:(e,t,n)=>{"use strict";n.d(t,{IP:()=>m,Nj:()=>u,ZP:()=>h,bu:()=>d});var r=n(51806),a=n(42290),s=n(13419),o=n(55609),i=n(65736),l=n(46936);n(99196);const __=i.__,c=["formal","informal","optimistic","humorous","serious","skeptical","empathetic","confident","passionate","provocative"],u="formal",d={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:"🔥"}},p=({value:e,onChange:t})=>(0,r.createElement)(o.MenuGroup,{label:__("Select tone","jetpack")},c.map((n=>(0,r.createElement)(o.MenuItem,{key:`key-${n}`,onClick:()=>t(n),isSelected:e===n},`${d[n].emoji} ${d[n].label}`))));function m({label:e=__("Change tone","jetpack"),value:t=u,onChange:n,disabled:s=!1}){return(0,r.createElement)(o.DropdownMenu,{icon:a.v_,label:e,className:"ai-assistant__tone-dropdown",popoverProps:{variant:"toolbar"},toggleProps:{children:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"ai-assistant__tone-dropdown__toggle-label"},e),(0,r.createElement)(o.Icon,{icon:l.Z})),disabled:s}},(({onClose:e})=>(0,r.createElement)(p,{value:t,onChange:t=>{n(t),e()}})))}function h({value:e=u,onChange:t,disabled:n=!1}){const i=__("Change tone","jetpack"),{tracks:l}=(0,s.z$)();return n?(0,r.createElement)(o.Tooltip,{text:i},(0,r.createElement)(o.Button,{disabled:!0},(0,r.createElement)(o.Icon,{icon:a.v_}))):(0,r.createElement)(o.ToolbarDropdownMenu,{icon:a.v_,label:i,popoverProps:{variant:"toolbar"},disabled:n,onToggle:e=>{e&&l.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"tone"})}},(()=>(0,r.createElement)(p,{value:e,onChange:t})))}},4965:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(51806),a=n(52175),s=n(55609),o=n(65736),i=n(79201),l=n(48381),c=(n(75022),n(63634)),u=n(81612),d=n(24404),p=n(85642),m=n(27298);const __=o.__,h=({contentIsLoaded:e,getSuggestionFromOpenAI:t,retryRequest:n,handleAcceptContent:o,handleImageRequest:h,handleTryAgain:g,showRetry:f,contentBefore:b,hasPostTitle:v,wholeContent:k,setUserPrompt:y,recordEvent:w,isGeneratingTitle:E})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.BlockControls,null,!f&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.ToolbarGroup,null,(0,r.createElement)(p.ZP,{hasContentBefore:!!b?.length,hasContent:!!k?.length,hasPostTitle:v,contentIsLoaded:e,onPromptSelect:e=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"prompt-template",prompt:e.original}),y(e.translated)},onSuggestionSelect:e=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:e}),t(e)}})),(0,r.createElement)(a.BlockControls,{group:"block"},(0,r.createElement)(m.ZP,{value:"neutral",onChange:n=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:c.Lg}),t(c.Lg,{tone:n,contentType:e?"generated":null})},disabled:!e&&!k?.length}),(0,r.createElement)(u.ZP,{value:"en",onChange:n=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:c.Nw}),t(c.Nw,{language:n,contentType:e?"generated":null})},disabled:!e&&!k?.length}),(0,r.createElement)(d.ZP,{onChange:t,exclude:E?["summarize"]:[],disabled:!e}))),(f||g)&&(0,r.createElement)(s.ToolbarGroup,null,!f&&e&&g&&(0,r.createElement)(s.ToolbarButton,{onClick:g},__("Try Again","jetpack")),f&&e&&(0,r.createElement)(s.ToolbarButton,{icon:i.Z,onClick:o},__("Accept","jetpack")),f&&(0,r.createElement)(s.ToolbarButton,{icon:l.Z,onClick:n},__("Retry","jetpack"))),false))},5246:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(51806),a=n(6895),s=n(13419),o=n(69307),i=n(65736),l=n(51128),c=n.n(l),u=n(99196),d=n(26546),p=n(23795),m=n(63206),h=n(18135),g=n(71449);const __=i.__,f=c()("jetpack-ai-assistant:upgrade-prompt"),b=e=>{const{upgradeType:t}=(0,h.Z)();return"vip"===t?(0,r.createElement)(d.p,{buttonText:null,checkoutUrl:null,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. Please reach out to your VIP account team.","jetpack"),{strong:(0,r.createElement)("strong",null)}),goToCheckoutPage:null,isRedirecting:null,visible:!0,align:null,title:null,context:null}):(({placement:e=null})=>{const{checkoutUrl:t,autosaveAndRedirect:n,isRedirecting:l}=(0,m.Z)(),c=(0,g.d)(),{nextTier:b,tierPlansEnabled:v,currentTier:k,requestsCount:y,usagePeriod:w}=(0,h.Z)(),E=(0,p.U_)(k)===p.dt?w?.requestsCount:y,{tracks:_}=(0,s.z$)(),C=(0,u.useCallback)((t=>{f("upgrade",e),_.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:k?.slug,requests_count:E,placement:e}),n(t)}),[n,k,E,_,e]),x=(0,u.useCallback)((()=>{f("contact us",e),_.recordEvent("jetpack_ai_upgrade_contact_us",{placement:e})}),[_,e]);if(!c)return(0,r.createElement)(d.p,{showButton:!1,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! Reach out to the site administrator to upgrade and keep using Jetpack AI.","jetpack"),{strong:(0,r.createElement)("strong",null)}),visible:!0,align:null,title:null,context:null});if(v){if(!b){const e=(0,a.Z)("jetpack-ai-tiers-more-requests-contact");return(0,r.createElement)(d.p,{buttonText:__("Contact Us","jetpack"),description:__("You have reached the request limit for your current plan.","jetpack"),className:"jetpack-ai-upgrade-banner",checkoutUrl:e,visible:!0,align:null,title:null,context:null,goToCheckoutPage:x})}return(0,r.createElement)(d.p,{buttonText:(0,i.sprintf)(/* Translators: number of requests */ __("Upgrade to %d requests","jetpack"),b.limit),checkoutUrl:t,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)((0,i.sprintf)(/* Translators: number of requests */ __("You have reached the requests limit for your current plan. Upgrade now to increase your requests limit to %d.","jetpack"),b.limit),{strong:(0,r.createElement)("strong",null)}),goToCheckoutPage:C,isRedirecting:l,visible:!0,align:"center",title:null,context:null})}return(0,r.createElement)(d.p,{buttonText:"Upgrade",checkoutUrl:t,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! Upgrade now to keep using it.","jetpack"),{strong:(0,r.createElement)("strong",null)}),goToCheckoutPage:n,isRedirecting:l,visible:!0,align:null,title:null,context:null})})(e)}},45624:(e,t,n)=>{"use strict";n.d(t,{Z:()=>I});var r=n(82674),a=n.n(r),s=n(51806),o=n(42290),i=n(13419),l=n(52175),c=n(4981),u=n(55609),d=n(94333),p=n(9818),m=n(69307),h=n(65736),g=n(65235),f=n.n(g),b=n(10185),v=n.n(b),k=n(99196),y=n(84102),w=n(80013),E=n(3180),_=n(87445),C=n(50297),x=n(4965),S=n(5246),j=n(49259),P=n(18135),N=n(60751),L=n(71449),T=n(3687),A=n(63634);const __=h.__,M=new(v())({breaks:!0}),R="post"===window?.Jetpack_Editor_Initial_State?.screenBase,Z=window?.Jetpack_Editor_Initial_State?.["ai-assistant"]?.["is-playground-visible"];function I({attributes:e,setAttributes:t,clientId:n,isSelected:r}){const[h,g]=(0,m.useState)({}),[b,v]=(0,m.useState)(!1),[I,B]=(0,m.useState)([]),[z,D]=(0,m.useState)(null),[F,O]=(0,m.useState)(null),{tracks:U}=(0,i.z$)(),H=(0,p.useSelect)((e=>e("core/editor").getCurrentPostId())),{getBlock:V}=(0,p.useSelect)("core/block-editor"),q=(0,k.useRef)(null),G=(0,k.useRef)(null),{replaceBlocks:$,replaceBlock:W,removeBlock:J}=(0,p.useDispatch)("core/block-editor"),{editPost:K}=(0,p.useDispatch)("core/editor"),{mediaUpload:Y}=(0,p.useSelect)((e=>{const{getSettings:t}=e("core/block-editor");return{mediaUpload:t().mediaUpload}}),[]),{isOverLimit:X,requireUpgrade:Q,increaseRequestsCount:ee}=(0,P.Z)(),te=()=>{setTimeout((()=>{q.current?.focus?.()}),100)},ne=()=>{setTimeout((()=>{G.current?.focus?.()}),100)},re=(0,d.useViewportMatch)("medium","<"),{isLoadingCategories:ae,isLoadingCompletion:se,wasCompletionJustRequested:oe,getSuggestionFromOpenAI:ie,stopSuggestion:le,showRetry:ce,contentBefore:ue,postTitle:de,retryRequest:pe,wholeContent:me,requestingState:he}=(0,N.Z)({onSuggestionDone:(0,m.useCallback)((()=>{te(),ee()}),[ee]),onUnclearPrompt:(0,m.useCallback)((()=>{ne(),ee()}),[ee]),onModeration:te,attributes:e,clientId:n,content:e.content,setError:g,tracks:U,userPrompt:e.userPrompt,requireUpgrade:Q,requestingState:e.requestingState}),ge=(0,L.b)(),fe=(0,j.$M)(n);(0,k.useEffect)((()=>{if(!fe)return;const e=JSON.parse(localStorage.getItem(fe));if(!e)return;const{type:t,options:n}=e;localStorage.removeItem(fe),ie(t,n)}),[fe,ie]),(0,k.useEffect)((()=>{h&&O(!1)}),[h]);const be=(0,k.useRef)(e?.content);(0,k.useEffect)((()=>{if(!e?.useGutenbergSyntax)return;if(!be?.current?.length)return;const t=V(n);if(t?.innerBlocks?.length)return;const r=(0,c.parse)(be.current);r?.length&&$(n,r)}),[be,n,$,V,e?.useGutenbergSyntax]),(0,k.useEffect)((()=>{["init","done"].includes(he)&&t({requestingState:he})}),[he,t]);const ve=async t=>{if(b)return;v(!0),g({});const r=await fetch(t),a=await r.blob(),s=new File([a],"jetpack_ai_image.png",{type:"image/png"});Y({filesList:[s],onFileChange:([t])=>{t.id&&W(n,(0,c.createBlock)("core/image",{url:t.url,caption:e.requestedPrompt,alt:e.requestedPrompt}))},allowedTypes:["image"],onError:e=>{console.error(e),v(!1)}}),U.recordEvent("jetpack_ai_dalle_generation_upload",{post_id:H})},ke=e?.useGutenbergSyntax,ye=se||ae,we=!!e.content,Ee="generateTitle"===e.promptType,_e=__("Accept","jetpack"),Ce=__("Accept title","jetpack"),xe=Ee?Ce:_e,Se=(...e)=>{ie(...e),ne()},je=async()=>{let t=[];if(ke)t=V(n),t=t?.innerBlocks||[];else{const n=M.render(e.content||"").replace(/
  • \s+

    /g,"

  • ").replace(/<\/p>\s+<\/li>/g,"
  • ");t=(0,c.rawHandler)({HTML:n})}await $(n,t);const r=(e=>{let t=null;return e.forEach((e=>{const n=document.querySelector(`.wp-block[data-block="${e.clientId}"]`);if(!n)return;"true"===n.contentEditable&&(t=n);const r=n.querySelectorAll("[contenteditable=true]");t=r.length?r[r.length-1]:t})),t})(t);r&&(e=>{const t=window.getSelection();t.selectAllChildren(e),t.collapseToEnd(),e.focus()})(r)},Pe=()=>{je(),U.recordEvent("jetpack_ai_assistant_block_accept",{feature:"ai-assistant"})},Ne=()=>{R?(K({title:e.content?e.content.trim():""}),J(n),U.recordEvent("jetpack_ai_assistant_block_accept",{feature:"ai-assistant"})):Pe()},Le=()=>{le(),te(),U.recordEvent("jetpack_ai_assistant_block_stop",{feature:"ai-assistant"})},[Te,Ae]=(0,m.useState)(!1),Me=()=>{Ae(!Te)},Re=(0,l.useBlockProps)({ref:G,className:f()({"is-waiting-response":oe})}),Ze=(0,l.useInnerBlocksProps)(Re),Ie=__("Ask Jetpack AI…","jetpack"),Be=__("Write about… Make a table for…","jetpack"),ze=(0,s.createElement)(s.Fragment,null,X&&r&&(0,s.createElement)(S.Z,{placement:"ai-assistant-block"}),!ge&&(0,s.createElement)(E.Z,null));return(0,s.createElement)(u.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{esc:()=>{["requesting","suggesting"].includes(he)&&Le()}}},(0,s.createElement)("div",Re,h?.message&&!F&&"error_quota_exceeded"!==h?.code&&(0,s.createElement)(u.Notice,{status:h.status,isDismissible:!1,className:"jetpack-ai-assistant__error"},h.message),we&&!ke&&(0,s.createElement)("div",{className:"jetpack-ai-assistant__content"},(0,s.createElement)(m.RawHTML,null,M.render(e.content))),we&&ke&&(0,s.createElement)("div",a()({className:"jetpack-ai-assistant__content is-layout-building-mode"},Ze)),(0,s.createElement)(l.InspectorControls,null,(0,s.createElement)(u.PanelBody,{initialOpen:!0},(0,s.createElement)(u.PanelRow,null,(0,s.createElement)(y.Z,{placement:w.I}))),(0,s.createElement)(u.PanelBody,{initialOpen:!0},(0,s.createElement)(u.PanelRow,null,(0,s.createElement)(_.Z,null)))),Z&&(0,s.createElement)(l.InspectorControls,null,(0,s.createElement)(u.PanelBody,{title:__("AI Playground","jetpack"),initialOpen:!0},(0,s.createElement)(u.PanelRow,null,(0,s.createElement)(u.ToggleControl,{label:__("Gutenberg Syntax","jetpack"),onChange:e=>t({useGutenbergSyntax:e}),checked:e.useGutenbergSyntax})),(0,s.createElement)(u.PanelRow,null,(0,s.createElement)(u.ToggleControl,{label:__("GPT-4","jetpack"),onChange:e=>t({useGpt4:e}),checked:e.useGpt4})),(0,s.createElement)(u.PanelRow,null,Te&&(0,s.createElement)(u.Modal,{title:__("Custom System Prompt","jetpack"),onRequestClose:Me},(0,s.createElement)(u.TextareaControl,{rows:20,label:__("Set up the custom system prompt ","jetpack"),onChange:e=>t({customSystemPrompt:e}),className:"jetpack-ai-assistant__custom-prompt",value:e.customSystemPrompt||(0,A.t4)({useGutenbergSyntax:e.useGutenbergSyntax,useGpt4:e.useGpt4})?.content}),(0,s.createElement)("div",{className:"jetpack-ai-assistant__custom-prompt__footer"},(0,s.createElement)(u.Button,{onClick:()=>t({customSystemPrompt:""}),variant:"secondary"},__("Restore the prompt","jetpack")),(0,s.createElement)(u.Button,{onClick:Me,variant:"secondary"},__("Close","jetpack")))),(0,s.createElement)(u.Button,{onClick:Me,variant:"secondary"},__("Set system custom prompt","jetpack"))))),!ye&&ge&&!Q&&(0,s.createElement)(x.Z,{isWaitingState:ye,contentIsLoaded:we,getSuggestionFromOpenAI:ie,retryRequest:pe,handleAcceptContent:Pe,handleAcceptTitle:Ne,handleGetSuggestion:Se,handleImageRequest:()=>{B([]),g({}),(0,T.b)(""===e.userPrompt.trim()?__("What would you like to see?","jetpack"):e.userPrompt,t,v,B,g,H),U.recordEvent("jetpack_ai_dalle_generation",{post_id:H})},handleTryAgain:null,showRetry:ce,contentBefore:ue,hasPostTitle:!!de?.length,wholeContent:me,promptType:e.promptType,setUserPrompt:e=>{if(!q?.current)return;q.current.focus(),t({userPrompt:e})},recordEvent:U.recordEvent,isGeneratingTitle:Ee}),(0,s.createElement)(o.tK,{ref:q,disabled:Q||!ge,value:e.userPrompt,placeholder:e?.content?Ie:Be,onChange:e=>{O(!0),t({userPrompt:e})},onSend:()=>{Se("userPrompt"),U.recordEvent("jetpack_ai_assistant_block_generate",{feature:"ai-assistant"})},onStop:Le,onAccept:()=>{Ee?Ne():Pe()},onDiscard:()=>{const r=e?.content===V(n).attributes?.content;t({content:e?.originalContent,promptType:void 0,messages:e?.originalMessages}),je(),r?U.recordEvent("jetpack_ai_assistant_block_dismiss"):U.recordEvent("jetpack_ai_assistant_block_discard",{feature:"ai-assistant"})},state:he,isTransparent:Q||!ge,showButtonLabels:!re,showAccept:"init"!==he&&we&&!ye,acceptLabel:xe,showGuideLine:we,showRemove:e?.content?.length>0,bannerComponent:ze}),!b&&I.length>0&&(0,s.createElement)(u.Flex,{direction:"column",style:{width:"100%"}},(0,s.createElement)(u.FlexBlock,{style:{textAlign:"center",margin:"12px",fontStyle:"italic",width:"100%"}},e.requestedPrompt),(0,s.createElement)(u.FlexBlock,{style:{fontSize:"20px",lineHeight:"38px"}},__("Please choose your image","jetpack")),(0,s.createElement)(u.Flex,{direction:"row",wrap:!0},I.map((e=>(0,s.createElement)(C.Z,{setImageModal:D,saveImage:ve,image:e,key:e}))))),!b&&z&&(0,s.createElement)(u.Modal,{onRequestClose:()=>D(null)},(0,s.createElement)(C.Z,{saveImage:ve,setImageModal:D,image:z,inModal:!0}))))}},27559:(e,t,n)=>{"use strict";var r=n(31985),a=n(23536),s=n(45624),o=n(6747);n(81765),n(54765),n(94662);(0,r.S)(a,{edit:s.Z,save:()=>null,transforms:o.Z})},54765:(e,t,n)=>{"use strict";n.d(t,{J7:()=>u,NP:()=>l});var r=n(4981),a=n(9818),s=n(92694),o=n(23536),i=n(71449);const l=["core/paragraph","core/heading","core/list"],c=window?.Jetpack_Editor_Initial_State?.available_blocks?.["ai-assistant-support"];function u(){if(!(0,r.getBlockType)(o.name))return!1;if(!c)return!1;if(!(0,i.b)())return!1;const{errorCode:e}=(0,a.select)("wordpress-com/plans")?.getAiAssistantFeature?.()||{};if(e)return!1;const{getHiddenBlockTypes:t}=(0,a.select)("core/edit-post")||{};return!(t?.()||[]).includes(o.name)}(0,s.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support",(function(e,t){return l.includes(t)&&u()?{...e,supports:{...e.supports,"jetpack/ai":{assistant:!0}}}:e}),100)},49259:(e,t,n)=>{"use strict";n.d(t,{$M:()=>i,ZP:()=>l});var r=n(51806),a=n(52175),s=n(94333),o=(n(99196),n(83059));function i(e){return`ai-assistant-block-${e}`}const l=(0,s.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(e,t),(0,r.createElement)(a.BlockControls,{group:"block"},(0,r.createElement)(o.ZP,{blockType:n})))}),"withAIAssistant")},79191:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(51806),a=n(42290),s=n(13419),o=n(4981),i=n(55609),l=n(94333),c=n(9818),u=n(69307),d=n(65736),p=n(53961),m=n(65235),h=n.n(m),g=(n(99196),n(3180)),f=n(5246),b=n(18135),v=n(71449),k=n(63634),y=n(79817),w=n(44110);const __=d.__,E={huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480};function _(e){if(!e?.length)return"";const t=(0,c.select)("core/block-editor").getBlock(e);if(!t)return"";const{innerBlocks:n}=t;return n?.length?n.reduce(((e,t)=>e+(0,o.serialize)(t)+"\n\n"),""):""}function C({clientId:e,className:t=""}){const n=(0,u.useRef)(null),o=(0,u.useRef)(null),{tracks:d}=(0,s.z$)(),m=(0,v.b)(),{inputValue:C,setInputValue:x,isVisible:S,assistantAnchor:j}=(0,u.useContext)(y.D),{dequeueAiAssistantFeatureAyncRequest:P}=(0,c.useDispatch)("wordpress-com/plans"),N=()=>{setTimeout((()=>{o.current?.focus?.()}),100)},{requestSuggestion:L,requestingState:T,stopSuggestion:A,requestingError:M}=(0,a.X_)({onDone:N}),{requireUpgrade:R}=(0,b.Z)(),Z=M?.code===a.$L||R,I="requesting"===T||"suggesting"===T,B="suggesting"===T||"done"===T,z=__("Ask Jetpack AI to create your form","jetpack"),D=__("Creating your form. Please wait a few moments.","jetpack"),{removeNotice:F}=(0,c.useDispatch)(p.store),O=(0,u.useCallback)((()=>{if(!C?.length)return;F(w.uu);const t=(0,k.r1)(k.Re,{request:C,content:_(e)});P(),L(t,{feature:"jetpack-form-ai-extension"}),d.recordEvent("jetpack_ai_assistant_block_generate",{feature:"jetpack-form-ai-extension"}),n?.current?.focus()}),[e,P,C,F,L,d]),U=(0,u.useCallback)((()=>{A(),N(),d.recordEvent("jetpack_ai_assistant_block_stop",{feature:"jetpack-form-ai-extension"})}),[A,d]),H=(0,l.useViewportMatch)("medium","<"),V=H&&j,q=(0,u.useRef)(null),G=(0,u.useRef)(H),[$,W]=(0,u.useState)(H);if((0,u.useEffect)((()=>{const e=n?.current;if(e)return q?.current||(q.current=new ResizeObserver((e=>{if(!S)return;if(V)return;const t=e[0].contentRect.width{q?.current?.disconnect()}}),[V,S]),(0,u.useEffect)((()=>{S&&d.recordEvent("jetpack_ai_assistant_prompt_show",{block_type:"jetpack/contact-form"})}),[S,d]),(0,u.useEffect)((()=>{const e=setTimeout((()=>{S&&o?.current&&o.current.focus()}),300);return function(){clearTimeout(e)}}),[]),!S)return null;const J=(0,r.createElement)("div",{className:"jetpack-ai-assistant__bar-wrapper"},(0,r.createElement)(i.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{esc:()=>{["requesting","suggesting"].includes(T)&&U()}}},(0,r.createElement)("div",{ref:n,className:h()("jetpack-ai-assistant__bar",{[t]:t,"is-fixed":V,"is-mobile-mode":$}),tabIndex:-1},Z&&(0,r.createElement)(f.Z,{placement:"jetpack-form-block"}),!m&&(0,r.createElement)(g.Z,null),(0,r.createElement)(a.tK,{ref:o,disabled:Z||!m,value:C,placeholder:I?D:z,onChange:x,onSend:O,onStop:U,state:T,isTransparent:Z||!m,showButtonLabels:!$,showGuideLine:B}))));return V?(0,u.createPortal)(J,j):J}},81732:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(51806),a=n(42290),s=n(55609),o=n(94333),i=n(69307),l=n(65736),c=n(99196),u=n(79817),d=n(44110);const __=l.__,p="jetpack-ai-assistant-bar__slot";function m({jetpackFormClientId:e}){const{isVisible:t,toggle:n,setAnchor:l,assistantAnchor:m}=(0,i.useContext)(u.D),{requestingState:h}=(0,a.X_)(),g=(0,i.useRef)(null),f=(0,o.useViewportMatch)("medium","<");(0,c.useEffect)((()=>{if(!g.current)return;const e=g.current.closest(".block-editor-block-contextual-toolbar");if(!e)return;let t=e.parentElement?.querySelector(`.${p}`);if(t)return e.after(t),l(t);t=document.createElement("div"),t.setAttribute("role","toolbar"),t.setAttribute("aria-label",__("AI Assistant","jetpack")),t.setAttribute("aria-orientation","horizontal"),t.className=p;const n=e.offsetHeight;t.style.top=`${n}px`,e.after(t),l(t)}),[l]),(0,c.useEffect)((()=>{f||m?.remove()}),[f,m]);const b=(0,i.useCallback)((()=>{if(!e)return n();(0,d.Vl)(e,n)}),[e,n]),v="requesting"===h||"suggesting"===h;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{"mod+/":n}}),(0,r.createElement)(s.ToolbarButton,{ref:g,showTooltip:!0,onClick:b,"aria-haspopup":"true","aria-expanded":t,label:__("Ask AI Assistant","jetpack"),icon:a.u_,disabled:v}))}},59090:(e,t,n)=>{"use strict";n.d(t,{aE:()=>r,nB:()=>a});const r=window?.Jetpack_Editor_Initial_State?.available_blocks?.["ai-assistant-form-support"]?.available,a=["jetpack/field-name","jetpack/field-email","jetpack/field-text","jetpack/field-textarea","jetpack/field-checkbox","jetpack/field-date","jetpack/field-telephone","jetpack/field-url","jetpack/field-checkbox-multiple","jetpack/field-radio","jetpack/field-select","jetpack/field-consent","jetpack/button"]},94662:(e,t,n)=>{"use strict";n.d(t,{G:()=>f});var r=n(51806),a=n(42290),s=n(13419),o=n(52175),i=n(4981),l=n(94333),c=n(9818),u=n(69307),d=n(92694),p=(n(99196),n(79191)),m=n(81732),h=n(59090),g=n(44110);function f(e,{checkChildrenBlocks:t=!1,clientId:n}={clientId:""}){const r=(0,i.getBlockType)("jetpack/ai-assistant"),{isModuleActive:a}=(0,s.el)("contact-form");if(!a)return!1;if(!r)return!1;if("string"!=typeof e)return!1;if(!h.aE)return!1;if(!n?.length)return!1;if(t){if(!h.nB.includes(e))return!1}else if("jetpack/contact-form"!==e)return!1;const{getHiddenBlockTypes:o}=(0,c.select)("core/edit-post")||{};return!(o?.()||[]).includes(e)}const b=(0,l.createHigherOrderComponent)((e=>t=>{const n=f(t?.name,{clientId:t.clientId}),{increaseAiAssistantRequestsCount:s}=(0,c.useDispatch)("wordpress-com/plans"),{eventSource:i}=(0,a.X_)({onDone:(0,u.useCallback)((()=>{s()}),[s]),onError:(0,u.useCallback)((e=>{"error_network"!==e.code&&"error_quota_exceeded"!==e.code&&s()}),[s])}),l=(0,u.useCallback)((()=>{i&&i?.close()}),[i]);if((0,u.useEffect)((()=>()=>{"jetpack/contact-form"===t?.name&&l()}),[l,t?.name]),!n)return(0,r.createElement)(e,t);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(e,t),(0,r.createElement)(p.Z,{clientId:t.clientId}),(0,r.createElement)(o.BlockControls,{group:"block"},(0,r.createElement)(m.Z,null)))}),"jetpackFormEditWithAiComponents");(0,d.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support",(function(e,t){return"jetpack/contact-form"!==t?e:{...e,edit:(0,a.oN)((0,g.ZP)(b(e.edit)))}}),100);const v=(0,l.createHigherOrderComponent)((e=>t=>{const n=(0,c.useSelect)((e=>{const n=e("core/block-editor"),{getBlockParentsByBlockName:r}=n;return r(t.clientId,"jetpack/contact-form")?.[0]}),[t.clientId]);if(!f(t?.name,{checkChildrenBlocks:!0,clientId:n}))return(0,r.createElement)(e,t);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(e,t),(0,r.createElement)(o.BlockControls,{group:"parent"},(0,r.createElement)(m.Z,{jetpackFormClientId:n})))}),"jetpackFormChildrenEditWithAiComponents");(0,d.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support",(function(e,t){return h.nB.includes(t)?{...e,edit:v(e.edit)}:e}))},79817:(e,t,n)=>{"use strict";n.d(t,{D:()=>s,v:()=>o});var r=n(51806),a=n(69307);const s=(0,a.createContext)({}),o=({value:e,children:t})=>(0,r.createElement)(s.Provider,{value:e,children:t})},44110:(e,t,n)=>{"use strict";n.d(t,{Vl:()=>b,ZP:()=>v,uu:()=>f});var r=n(51806),a=n(42290),s=n(4981),o=n(55609),i=n(94333),l=n(9818),c=n(69307),u=n(65736),d=n(53961),p=(n(99196),n(94662)),m=n(5863),h=n(56359),g=n(79817);const __=u.__,f="ai-assistant";function b(e,t){(0,l.dispatch)("core/block-editor").selectBlock(e).then(t)}const v=(0,i.createHigherOrderComponent)((e=>t=>{const{clientId:n,isSelected:i}=t,{replaceInnerBlocks:u}=(0,l.useDispatch)("core/block-editor"),v=(0,l.useSelect)((e=>e("core/editor")),[]),k=(0,l.useSelect)((e=>e("core/block-editor")),[]),y=v.getCurrentPostId(),w=k.getBlock(n),[E,_]=(0,c.useState)(""),C="jetpack/contact-form"===w?.name&&0===w?.innerBlocks?.length,[x,S]=(0,c.useState)(C),[j,P]=(0,c.useState)(!1),[N,L]=(0,c.useState)(null),T=(0,c.useRef)([]),A=(0,c.useCallback)((()=>{S(!0)}),[]),M=(0,c.useCallback)((()=>{S(!1)}),[]),R=(0,c.useCallback)((()=>{S(!x)}),[x]),Z=(0,c.useCallback)((e=>{L(e)}),[]),{createNotice:I}=(0,l.useDispatch)(d.store),B=(0,c.useCallback)((({severity:e,message:t,code:n})=>{n!==a.$L&&I(e,t,{isDismissible:!0,id:f})}),[I]);(0,c.useEffect)((()=>{i||M()}),[i,M]);const z=(0,c.useMemo)((()=>({inputValue:E,setInputValue:_,isVisible:x,show:A,hide:M,toggle:R,isFixed:j,setAssistantFixed:P,assistantAnchor:N,setAnchor:Z})),[E,x,A,M,R,j,N,Z]),D=(0,c.useCallback)(((e,t=!1)=>{const r=e.replace(//g,""),a=(0,h.J)(r),o=(0,s.parse)(a).filter((e=>e.isValid&&!["core/freeform","core/missing","core/html"].includes(e.name)));let i=!1;if(o.length0){const e=o[o.length-1],t=T.current[o.length-1];i=!(0,m.c)(e,t)}if(o.length>0&&(o.length!==T.current.length||i)&&(u(n,o),T.current=o),t){const e=o.filter((e=>"jetpack/button"===e.name));if(T.current=T.current||[],e.length>1){let t=0;T.current=T.current.filter((n=>"jetpack/button"!==n.name||(t++,t===e.length))),u(n,T.current)}else 0===e.length&&u(n,[...T.current,(0,s.createBlock)("jetpack/button",{label:__("Submit","jetpack"),element:"button",text:__("Submit","jetpack"),borderRadius:8,lock:{remove:!0}})]);T.current=[]}}),[n,u]);return(0,a.X_)({askQuestionOptions:{postId:y},onDone:e=>{D(e,!0),_("")},onSuggestion:D,onError:B}),(0,p.G)(t.name,{clientId:t.clientId})?(0,r.createElement)(g.v,{value:z},(0,r.createElement)(o.KeyboardShortcuts,{shortcuts:{"mod+/":()=>b(n,A)}},(0,r.createElement)(e,t))):(0,r.createElement)(e,t)}),"withUiHandlerDataProvider")},63206:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(6895),a=n(13419),s=n(46867),o=n(18135);function i(){const{nextTier:e,tierPlansEnabled:t}=(0,o.Z)(),n=t?(0,r.Z)("jetpack-ai-yearly-tier-upgrade-nudge",{site:(0,a.lQ)(),path:`jetpack_ai_yearly:-q-${e?.limit}`,query:`redirect_to=${window.location.href}`}):(0,r.Z)("jetpack-ai-monthly-plan-ai-assistant-block-banner",{site:(0,a.lQ)()}),i=(0,a.Ug)()||(0,a.Wp)()?n:`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/add-jetpack-ai`,{autosaveAndRedirect:l,isRedirecting:c}=(0,s.Z)(i);return{checkoutUrl:i,autosaveAndRedirect:l,isRedirecting:c}}},18135:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(9818);function a(){const{data:e,loading:t}=(0,r.useSelect)((e=>{const{getAiAssistantFeature:t,getIsRequestingAiAssistantFeature:n}=e("wordpress-com/plans");return{data:t(),loading:n()}}),[]),{fetchAiAssistantFeature:n,increaseAiAssistantRequestsCount:a}=(0,r.useDispatch)("wordpress-com/plans");return{...e,loading:t,error:null,refresh:n,increaseRequestsCount:a}}},42890:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(6975),a=n(69307);const s=window?.Jetpack_Editor_Initial_State?.tracksUserData||null,o=parseInt(window?.Jetpack_Editor_Initial_State?.wpcomBlogId)||0,i=()=>((0,a.useEffect)((()=>{s&&r.Z.initialize(s?.userid,s?.username,o?{blog_id:o}:{})}),[]),r.Z)},60751:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(42290),a=n(4981),s=n(9818),o=n(69307),i=n(65736),l=n(51128),c=n.n(l),u=n(27298),d=n(63634),p=n(854);const __=i.__,m=c()("jetpack-ai-assistant:event"),h=c()("jetpack-ai-assistant:prompt"),g=({attributes:e,clientId:t,content:n,setError:i,tracks:l,userPrompt:c,onSuggestionDone:g,onUnclearPrompt:f,onModeration:b,requireUpgrade:v,requestingState:k})=>{const[y,w]=(0,o.useState)(!1),[E,_]=(0,o.useState)(!1),[C,x]=(0,o.useState)(!1),[S,j]=(0,o.useState)(!1),[P,N]=(0,o.useState)(""),{updateBlockAttributes:L}=(0,s.useDispatch)("core/block-editor"),{dequeueAiAssistantFeatureAyncRequest:T,setAiAssistantFeatureRequireUpgrade:A}=(0,s.useDispatch)("wordpress-com/plans"),[M,R]=(0,o.useState)(k||"init"),Z=(0,o.useRef)(),I=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("title")));let B=!1;const z=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("categories")))||[],D=(0,s.useSelect)((e=>z.map((t=>{const n=e("core").getEntityRecord("taxonomy","category",t);if(n)return n;B=!0})).filter(Boolean)),[z]),F=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("tags")),[])||[],O=(0,s.useSelect)((e=>F.map((t=>{const n=e("core").getEntityRecord("taxonomy","post_tag",t);if(n)return n;B=!0})).filter(Boolean)),[F]);(0,o.useEffect)((()=>(w(B),()=>{Z?.current&&(m("Cleaning things up..."),Z?.current?.close())})),[B,Z]);const U=(0,s.useSelect)((e=>e("core/editor").getCurrentPostId())),H=(D.filter((e=>1!==e.id)).map((({name:e})=>e)).join(", "),O.map((({name:e})=>e)).join(", "),async(o,g={})=>{T();const k=g?.functions?.reduce(((e,{name:t,implementation:n})=>({...e,[t]:n})),{});if(v)return R("error"),_(!1),x(!1),j(!1),void i({code:"error_quota_exceeded",message:__("You have reached the limit of requests for this site.","jetpack"),status:"info"});if(g={retryRequest:!1,tone:u.Nj,...g},E)return;j(!1),i({});let y=P;l.recordEvent("jetpack_ai_chat_completion",{post_id:U});const w=[...e.messages]??[];let C={};if(g.retryRequest)C=y[y.length-1];else{const r=e?.isLayoutBuldingModeEnable?(0,p.WN)(t):(0,p.xN)();y=(0,d.Iq)({generatedContent:n,allPostContent:r,postContentAbove:(0,p.h7)(t),currentPostTitle:I,options:g,userPrompt:c,type:o,isGeneratingTitle:"generateTitle"===e.promptType,useGutenbergSyntax:!!e?.useGutenbergSyntax,customSystemPrompt:e?.customSystemPrompt}),C=y.pop(),y=[...y,...w],y.push(C),N(y),"generateTitle"!==e.promptType&&L(t,{promptType:o})}try{_(!0),x(!0),y.forEach((({role:e,content:t},n)=>h("(%s/%s) %o\n%s",n+1,y.length,`[${e}]`,t))),R("requesting"),Z.current=await(0,r.jt)(y,{postId:U,requireUpgrade:v,feature:e?.useGpt4?"ai-assistant-experimental":"ai-assistant",functions:g?.functions}),R("suggesting")}catch(e){e.message?i({message:e.message,code:e?.code||"unknown",status:"error"}):i({message:__("Whoops, we have encountered an error. AI is like really, really hard and this is an experimental feature. Please try again later.","jetpack"),code:"unknown",status:"error"}),j(!0),_(!1),x(!1)}const S=async t=>{const{detail:n}=t,a={role:"assistant",content:null,function_call:n},s=await(k[n.name]?.(JSON.parse(n.arguments))),o={role:"function",name:n?.name,content:JSON.stringify(s)};y=[...y,a,o],Z?.current?.removeEventListener("function_done",S),Z?.current?.removeEventListener("done",M),Z?.current?.removeEventListener("error_unclear_prompt",B),Z?.current?.removeEventListener("error_network",D),Z?.current?.removeEventListener("error_context_too_large",z),Z?.current?.removeEventListener("error_service_unavailable",F),Z?.current?.removeEventListener("error_quota_exceeded",O),Z?.current?.removeEventListener("error_moderation",H),Z?.current?.removeEventListener("suggestion",q),Z.current=await(0,r.jt)(y,{postId:U,requireUpgrade:v,feature:e?.useGpt4?"ai-assistant-experimental":null,functions:g.functions}),Z?.current?.addEventListener("function_done",S),Z?.current?.addEventListener("done",M),Z?.current?.addEventListener("error_unclear_prompt",B),Z?.current?.addEventListener("error_network",D),Z?.current?.addEventListener("error_context_too_large",z),Z?.current?.addEventListener("error_service_unavailable",F),Z?.current?.addEventListener("error_quota_exceeded",O),Z?.current?.addEventListener("error_moderation",H),Z?.current?.addEventListener("suggestion",q)},M=n=>{const{detail:r}=n;R("done");const o=r.replaceAll(d._W,""),i={role:"assistant",content:o};w.push(C,i),h("Add %o\n%s",`[${C.role}]`,C.content),h("Add %o\n%s",`[${i.role}]`,i.content),w.length>20&&w.splice(0,w.length-20),V();const l=e?.useGutenbergSyntax;if(L(t,{content:o,messages:w}),!l)return;const{replaceInnerBlocks:c}=(0,s.dispatch)("core/block-editor"),u=(0,a.parse)(r).filter((e=>e.isValid));c(t,u)},B=()=>{R("error"),Z?.current?.close(),_(!1),x(!1),i({code:"error_unclear_prompt",message:__("Your request was unclear. Mind trying again?","jetpack"),status:"info"}),f?.()},z=()=>{R("error"),Z?.current?.close(),_(!1),x(!1),j(!1),i({code:"error_context_too_large",message:__("The content is too large to be processed all at once. Please try to shorten it or divide it into smaller parts.","jetpack"),status:"info"})},D=({detail:r})=>{R("error");const{name:a,message:s}=r;"TypeError"===a&&"Failed to fetch"===s&&(w.splice(0,8),L(t,{messages:w}),y=(0,d.Iq)({generatedContent:n,allPostContent:(0,p.xN)(),postContentAbove:(0,p.h7)(t),currentPostTitle:I,options:g,userPrompt:c,type:o,isGeneratingTitle:"generateTitle"===e.promptType,useGutenbergSyntax:!!e?.useGutenbergSyntax,customSystemPrompt:e?.customSystemPrompt}),N([...y,...w,C])),Z?.current?.close(),_(!1),x(!1),j(!0),i({code:"error_network",message:__("It was not possible to process your request. Mind trying again?","jetpack"),status:"info"})},F=()=>{R("error"),Z?.current?.close(),_(!1),x(!1),j(!0),i({code:"error_service_unavailable",message:__("Jetpack AI services are currently unavailable. Sorry for the inconvenience.","jetpack"),status:"info"})},O=()=>{R("error"),Z?.current?.close(),_(!1),x(!1),j(!1),A(!0),i({code:"error_quota_exceeded",message:__("You have reached the limit of requests for this site.","jetpack"),status:"info"})},H=()=>{R("error"),Z?.current?.close(),_(!1),x(!1),j(!1),i({code:"error_moderation",message:__("This request has been flagged by our moderation system. Please try to rephrase it and try again.","jetpack"),status:"info"}),b?.()},q=e=>{x(!1),m("(suggestion)",e?.detail),L(t,{content:e?.detail?.replaceAll(d._W,"")})};return Z?.current?.addEventListener("function_done",S),Z?.current?.addEventListener("done",M),Z?.current?.addEventListener("error_unclear_prompt",B),Z?.current?.addEventListener("error_network",D),Z?.current?.addEventListener("error_context_too_large",z),Z?.current?.addEventListener("error_service_unavailable",F),Z?.current?.addEventListener("error_quota_exceeded",O),Z?.current?.addEventListener("error_moderation",H),Z?.current?.addEventListener("suggestion",q),Z?.current});function V(){Z?.current&&(Z?.current?.close(),_(!1),x(!1),g?.(),R("done"))}return{isLoadingCategories:y,isLoadingCompletion:E,wasCompletionJustRequested:C,setIsLoadingCategories:w,setShowRetry:j,showRetry:S,postTitle:I,contentBefore:(0,p.h7)(t),wholeContent:(0,p.xN)(),requestingState:M,getSuggestionFromOpenAI:H,stopSuggestion:V,retryRequest:()=>H("",{retryRequest:!0})}}},71449:(e,t,n)=>{"use strict";n.d(t,{b:()=>u,d:()=>d});var r=n(13419),a=n(51128),s=n.n(a);const o=window?.JP_CONNECTION_INITIAL_STATE,i=s()("jetpack-ai-assistant:connection");let l=!1;const c=e=>{l||(i(e),l=!0)};function u(){return(0,r.Wp)()?(c("Simple site connected ✅"),!0):(0,r.Ug)()?(c("Atomic site connected ✅"),!0):o?.connectionStatus?.isUserConnected?(c("Jetpack user is connected ✅"),!0):(c("User is not connected ❌"),!1)}function d(){if((0,r.Wp)())return!0;return!1==!(o?.userConnectionData?.currentUser?.permissions??{}).manage_options}},3687:(e,t,n)=>{"use strict";n.d(t,{b:()=>o});var r=n(86989),a=n.n(r),s=n(65736);const __=s.__;function o(e,t,n,r,s,o){n(!0),s(null),t({requestedPrompt:e}),a()({path:"/wpcom/v2/jetpack-ai/images/generations",method:"POST",data:{prompt:e,post_id:o}}).then((e=>{n(!1);const t=e.data.map((e=>"data:image/png;base64,"+e.b64_json));r(t)})).catch((e=>{e.message?s(e.message):s(__("Whoops, we have encountered an error. AI is like really, really hard and this is an experimental feature. Please try again later.","jetpack")),n(!1)}))}},57832:(e,t,n)=>{"use strict";n.d(t,{v_:()=>i,x1:()=>l});var r=n(63634);const a="title",s="content",o=null;function i(e,t){return{role:"jetpack-ai",context:{type:"ai-assistant-initial-prompt",for:u(e),...t?.length?{custom_system_prompt:t}:{}}}}function l({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:a,options:s,type:o,userPrompt:i,isGeneratingTitle:l}){const u=[],d="generated"===s?.contentType;let p=null;switch(o){case r.qA:p=a;break;case r.sz:case r.hI:case r.Hd:p=n;break;case r.jf:p=t;break;case r.TV:case r.DR:p=e;break;case r.Lg:case r.Lq:case r.Nw:p=d?e:t;break;case r.Gh:p=e||t}const m=function(e,t){return!e&&t?.length>0?{role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:t}}:null}(o===r.Gh?!!e?.length:d,p);return m&&u.push(m),u.push({role:"jetpack-ai",context:c({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:a,options:s,type:o,userPrompt:i,isGeneratingTitle:l})}),u}function c({options:e,type:t,userPrompt:n,isGeneratingTitle:i}){const l=function(e,t,n){return e?a:!t||n?s:o}(i,"generated"===e?.contentType,e?.fromExtension||!1);return{type:u(t),...l?{subject:l}:{},...t===r.Lg&&e?.tone?{tone:e.tone}:{},...t===r.Nw&&e?.language?{language:e.language}:{},...t===r.Gh&&n?{request:n}:{}}}function u(e){return{[r.qA]:"ai-assistant-summary-by-title",[r.sz]:"ai-assistant-continue-writing",[r.hI]:"ai-assistant-simplify",[r.Hd]:"ai-assistant-correct-spelling",[r.jf]:"ai-assistant-generate-title",[r.TV]:"ai-assistant-make-longer",[r.DR]:"ai-assistant-make-shorter",[r.Lg]:"ai-assistant-change-tone",[r.Lq]:"ai-assistant-summarize",[r.Nw]:"ai-assistant-change-language",[r.Gh]:"ai-assistant-user-prompt"}[e]}},63634:(e,t,n)=>{"use strict";n.d(t,{DR:()=>p,Gh:()=>f,Hd:()=>c,Iq:()=>T,Lg:()=>m,Lq:()=>h,Nw:()=>g,Re:()=>b,SV:()=>v,TV:()=>d,_W:()=>y,hI:()=>l,jf:()=>u,qA:()=>o,r1:()=>A,sz:()=>i,t4:()=>w});var r=n(51128),a=n.n(r),s=n(57832);const o="titleSummary",i="continue",l="simplify",c="correctSpelling",u="generateTitle",d="makeLonger",p="makeShorter",m="changeTone",h="summarize",g="changeLanguage",f="userPrompt",b="jetpackFormCustomPrompt",v=!0,k=a()("jetpack-ai-assistant:prompt"),y="````";function w({context:e="You are an advanced polyglot ghostwriter. Your task is to generate and modify content based on user requests. This functionality is integrated into the Jetpack product developed by Automattic. Users interact with you through a Gutenberg block, you are inside the WordPress editor",rules:t,useGutenbergSyntax:n=!1,useMarkdown:r=!0,customSystemPrompt:a=null}){let s="";t?.length&&(s=t.map((e=>`- ${e}.`)).join("\n")+"\n");let o=`${e}. Strictly follow these rules:\n\n${s}${r?"- Format your responses in Markdown syntax, ready to be published.":""}\n- Execute the request without any acknowledgement to the user.\n- Avoid sensitive or controversial topics and ensure your responses are grammatically correct and coherent.\n- If you cannot generate a meaningful response to a user's request, reply with “__JETPACK_AI_ERROR__“. This term should only be used in this context, it is used to generate user facing errors.\n`;return n&&(o=`${e}. Strictly follow these rules:\n\t\n${s}- Format your responses in Gutenberg HTML format including HTML comments for WordPress blocks. All responses must be valid Gutenberg HTML.\n- Use only WordPress core blocks\n- Execute the request without any acknowledgement to the user.\n- Avoid sensitive or controversial topics and ensure your responses are grammatically correct and coherent.\n- If you cannot generate a meaningful response to a user's request, reply with “__JETPACK_AI_ERROR__“. This term should only be used in this context, it is used to generate user facing errors.\n`),a&&(o=a),{role:"system",content:o}}function E(e){return`${y}${e.replaceAll(y,"")}${y}`}function _({content:e,role:t="user"}){return[{role:t,content:`Repeat the text delimited with ${y}, without the delimiter, correcting any spelling and grammar mistakes directly in the text without providing feedback about the corrections, keeping the language of the text: ${E(e)}`}]}function C({content:e,role:t="user"}){return[{role:t,content:`Simplify the text delimited with ${y}, using words and phrases that are easier to understand and keeping the language of the text: ${E(e)}`}]}function x({content:e,role:t="user"}){return[{role:t,content:`Summarize the text delimited with ${y}, keeping the language of the text: ${E(e)}`}]}function S({content:e,role:t="user"}){return[{role:t,content:`Expand the text delimited with ${y} to about double its size, keeping the language of the text: ${E(e)}`}]}function j({content:e,language:t,role:n="user"}){return[{role:n,content:`Translate the text delimited with ${y} to ${t}, preserving the same core meaning and tone: ${E(e)}`}]}function P({content:e,tone:t,role:n="user"}){return[{role:n,content:`Rewrite the text delimited with ${y}, with a ${t} tone, keeping the language of the text: ${E(e)}`}]}function N({content:e,request:t}){if(!t)throw new Error("You must provide a custom prompt for the Jetpack Form Custom Prompt");return[{role:"jetpack-ai",context:{type:"form-ai-extension",content:e,request:t}}]}const L=({rules:e=[],request:t=null,relevantContent:n=null,isContentGenerated:r=!1,isGeneratingTitle:a=!1,useGutenbergSyntax:s=!1,customSystemPrompt:o=null})=>{if(!t&&!n)throw new Error("You must provide either a request or content");const i=[w({rules:e,useGutenbergSyntax:s,customSystemPrompt:o})];if(null!=n&&n?.length){const e=n.replaceAll(y,"");r||i.push({role:"user",content:`The specific relevant content for this request, if necessary, delimited with ${y} characters: ${y}${e}${y}`})}const l={role:"user",content:t};return a&&(l.content+=" Only output a title, do not generate body content."),i.push(l),i.forEach((e=>{k(`Role: ${e?.role}.\nMessage: ${e?.content}\n---`)})),i};function T({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:r,options:a,type:b,userPrompt:k,isGeneratingTitle:y,useGutenbergSyntax:w,customSystemPrompt:E}){if(v){return[(0,s.v_)(b,E),...(0,s.x1)({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:r,options:a,type:b,userPrompt:k,isGeneratingTitle:y})]}const _="generated"===a?.contentType,C=function(e,t=!1,n){const r="generated"===n?.contentType;let a="the title";t||(a=r?"your last answer":"the content");const s=`. Do not switch to any language other than the language of ${a} in your response`;switch(e){case o:return{request:`Write a short piece for a blog post based on ${a}, keeping the same language`};case i:return{request:`Continue writing from ${a}${s}.`,rules:r?[]:["Only output the continuation of the content, without repeating it"]};case l:return{request:`Simplify ${a}${s}.`,rules:["Use words and phrases that are easier to understand for non-technical people","Use as much of the original language as possible"]};case c:return{request:`Repeat ${a}, correcting any spelling and grammar mistakes, and do not add new content${s}.`};case u:return{request:"Generate a new title for this blog post and only output the title.",rules:["Only output the raw title, without any prefix or quotes"]};case d:return{request:`Make ${a} longer${s}.`};case p:return{request:`Make ${a} shorter${s}.`};case m:return{request:`Rewrite ${a} with ${/^[aeiou]/i.test(n.tone)?"an":"a"} ${n.tone} tone${s}.`};case h:return{request:`Summarize ${a}${s}.`};case g:return{request:`Translate ${a} to the following language: ${n.language}.`};default:return null}}(b,y,a);if(b!==f){let a;switch(b){case o:a=r;break;case i:case l:case c:a=n;break;case u:a=t;break;case d:case p:a=e;break;case m:case h:case g:a=_?e:t}return L({...C,relevantContent:a,isContentGenerated:_,isGeneratingTitle:y,useGutenbergSyntax:w,customSystemPrompt:E})}return L({request:k,relevantContent:e||t,isContentGenerated:!!e?.length,isGeneratingTitle:y,useGutenbergSyntax:w,customSystemPrompt:E})}function A(e,t){k("Addressing prompt type: %o %o",e,t);const{prevMessages:n=[]}=t,r={role:"system",content:"You are an advanced polyglot ghostwriter. Your task is to help the user create and modify content based on their requests.\nWriting rules:\n- Execute the request without any acknowledgment or explanation to the user.\n- Avoid sensitive or controversial topics and ensure your responses are grammatically correct and coherent.\n- If you cannot generate a meaningful response to a user's request, reply with “__JETPACK_AI_ERROR__“. This term should only be used in this context, it is used to generate user facing errors.\n"},a=[...n];switch(a.push(r),e){case c:return[...a,..._(t)];case l:return[...a,...C(t)];case h:return[...a,...x(t)];case d:return[...a,...S(t)];case g:return[...a,...j(t)];case m:return[...a,...P(t)];case b:return[...n,...N(t)];default:throw new Error(`Unknown prompt type: ${e}`)}}},74359:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r=new(n(92213).Z)({emDelimiter:"_",headingStyle:"atx"});r.addRule("strikethrough",{filter:["del","s","strike"],replacement:function(e){return"~~"+e+"~~"}});const a=r},854:(e,t,n)=>{"use strict";n.d(t,{WN:()=>l,h7:()=>o,t$:()=>c,xN:()=>i});var r=n(4981),a=n(9818),s=n(74359);function o(e){if(!e)return"";const t=(0,a.select)("core/block-editor"),n=t.getBlockIndex(e),o=t.getBlocks().slice(0,n)??[];return o?.length?s.Z.turndown((0,r.serialize)(o)):""}function i(){const e=(0,a.select)("core/block-editor").getBlocks();return e?.length?s.Z.turndown((0,r.serialize)(e)):""}function l(e){const t=(0,a.select)("core/block-editor").getBlock(e);return t?.innerBlocks?.length?t.innerBlocks.filter((e=>null!=e)).map((e=>(0,r.getBlockContent)(e.clientId))).join("\n\n"):""}function c(e){if(!e?.replace(/\s+/,"").length)return"";const t=document.createElement("div");t.innerHTML=e;const{textContent:n,innerText:r}=t;return n&&!n.replace(/\s+/,"").length||r&&!r.replace(/\s+/,"").length?"":t.textContent||t.innerText||""}},5863:(e,t,n)=>{"use strict";n.d(t,{c:()=>s});const r=e=>{delete e.clientId;for(const t of e.innerBlocks??[])r(t);return e},a=e=>r((e=>JSON.parse(JSON.stringify(e)))(e));function s(e,t){const n=a(e),r=a(t);return JSON.stringify(n)===JSON.stringify(r)}},56359:(e,t,n)=>{"use strict";function r(e){const t=document.createElement("div");return t.innerHTML=e,t.innerHTML}n.d(t,{J:()=>r})},81765:(e,t,n)=>{"use strict";var r=n(4981),a=n(92694),s=n(54765),o=n(49259);(0,a.addFilter)("blocks.registerBlockType","jetpack/handle-jetpack-ai-supports",(function(e){const t=(0,r.getBlockSupport)(e,"jetpack/ai");return t&&t?.assistant&&(0,s.J7)()?{...e,edit:(0,o.ZP)(e.edit)}:e}),100)},6747:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u,b:()=>c});var r=n(4981),a=n(23536),s=n(54765),o=n(63634),i=n(74359);const l=[];function c(e,t){const{content:n,...s}=t;let l=n;"core/heading"===e&&t?.level&&(l=l.replace(/<(\/?)h\d([^>]*)>/g,`<$1h${t.level}$2>`));const c=i.Z.turndown(l),u=[];return o.SV?u.push({role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:c}}):(u.push({role:"user",content:"Tell me some content for this block, please."}),u.push({role:"assistant",content:c})),(0,r.createBlock)(a.name,{...s,content:c,originalContent:c,messages:u,originalMessages:u})}for(const e of s.NP)l.push({type:"block",blocks:[e],isMatch:()=>(0,s.J7)(),transform:(t,n)=>{const a=(0,r.getSaveContent)(e,t,n);return c(e,{...t,content:a})}});const u={from:l}},98825:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(65736),s=n(26546),o=n(46867);const __=a.__,i=()=>{const e=`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/connection`,{autosaveAndRedirect:t,isRedirecting:n}=(0,o.Z)(e);if(window?.Jetpack_Editor_Initial_State?.jetpack?.is_current_user_connected)return null;return(0,r.createElement)(s.p,{buttonText:__("Reconnect Jetpack","jetpack"),checkoutUrl:e,className:"jetpack-ai-connect-banner",description:__("Your account is not connected to Jetpack at the moment.","jetpack"),goToCheckoutPage:e=>{t(e)},isRedirecting:n,visible:!0,align:null,title:null,context:null})}},56352:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(65736),s=n(26546),o=n(46867);const __=a.__,i=()=>{let e=window?.Jetpack_Editor_Initial_State?.adminUrl||"";e=e.replace(/wp-admin\/\?frame-nonce=[a-z0-9]+/,"wp-admin/");const t=`${e}admin.php?page=jetpack-search`,{autosaveAndRedirect:n,isRedirecting:a}=(0,o.Z)(t);if(window?.Jetpack_AIChatBlock?.jetpackSettings?.instant_search_enabled)return null;return(0,r.createElement)(s.p,{buttonText:__("Enable Jetpack Search","jetpack"),checkoutUrl:t,className:"jetpack-ai-connect-banner",description:__("You need to enable Jetpack Search so that Jetpack AI can index your site.","jetpack"),goToCheckoutPage:e=>{n(e)},isRedirecting:a,visible:!0,align:null,title:null,context:null})}},23719:(e,t,n)=>{"use strict";n.d(t,{V:()=>l});var r=n(51806),a=n(52175),s=n(55609),o=n(37798),i=n(65736);const __=i.__;function l({setAttributes:e,placeholder:t,showCopy:n,showFeedback:i,showSources:l}){const[c,u]=(0,o.useEntityProp)("root","site","jetpack_search_ai_prompt_override");return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,r.createElement)(s.BaseControl,{label:__("Placeholder Text","jetpack"),className:"jetpack-ai-chat__ask-button-text"},(0,r.createElement)(s.TextControl,{placeholder:__("Ask a question about this site.","jetpack"),onChange:t=>e({placeholder:t}),value:t})))),(0,r.createElement)(a.InspectorAdvancedControls,null,(0,r.createElement)(s.BaseControl,{label:__("Additional instructions","jetpack"),help:__("Give Jetpack AI additional instructions for answer length, format, and tone.","jetpack")},(0,r.createElement)(s.TextareaControl,{value:c,onChange:u})),(0,r.createElement)(s.ToggleControl,{label:__("Show copy answer button.","jetpack"),help:__("Allow users to easily copy the answer.","jetpack"),checked:n,onChange:t=>e({showCopy:t})}),(0,r.createElement)(s.ToggleControl,{label:__("Show rating button.","jetpack"),help:__("Allow users to rate the answer and give feedback.","jetpack"),checked:i,onChange:t=>e({showFeedback:t})}),(0,r.createElement)(s.ToggleControl,{label:__("Show list of sources.","jetpack"),help:__("Show used sources at the bottom of the answer.","jetpack"),checked:l,onChange:t=>e({showSources:t})})))}},74021:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(51806),a=n(42290),s=n(52175),o=n(55609),i=n(9818),l=n(98825),c=n(56352),u=n(23719);function d({attributes:e,setAttributes:t,clientId:n}){const d=(0,s.useBlockProps)(),p=(0,i.useSelect)((e=>e("core/block-editor").isBlockSelected(n)),[n]);return(0,r.createElement)("div",d,(0,r.createElement)(l.Z,null),(0,r.createElement)(c.Z,null),(0,r.createElement)("div",{className:"jetpack-ai-chat-question-wrapper"},(0,r.createElement)(o.TextControl,{className:"jetpack-ai-chat-question-input",placeholder:e.placeholder,disabled:!0}),(0,r.createElement)(s.RichText,{className:"wp-block-button__link jetpack-ai-chat-question-button",onChange:e=>t({askButtonLabel:e}),value:e.askButtonLabel,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/strikethrough"]})),p&&(0,r.createElement)(a.Eo,null),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(u.V,{askButtonLabel:e.askButtonLabel,placeholder:e.placeholder,setAttributes:t,showCopy:e.showCopy,showFeedback:e.showFeedback,showSources:e.showSources})))}},86116:(e,t,n)=>{"use strict";var r=n(31985),a=n(21540),s=n(74021),o=n(148);(0,r.S)(a,{edit:s.Z,save:o.Z})},148:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(51806),a=n(52175);function s({attributes:e}){const t=a.useBlockProps.save({"data-ask-button-label":e.askButtonLabel});return(0,r.createElement)("div",t)}},77567:(e,t,n)=>{"use strict";n.d(t,{K:()=>r});const r=["A digital Illustration of the a purely mechanical television, 4k, detailed, fantasy vivid colors","3D render of a floating futuristic castle in a clear sky, digital art","Hedgehog smelling a flower | clear blue sky | intricate artwork by Beatrix Potter | cottagecore aesthetic | 8K | highly detailed | wide angle |","Hyper realistic photo of a high end futuristic single-level house where walls are made of windows, light coming through the window, mid century modern style, cinematic lighting","Pink ape Astronaut in space holding a claymate in a photorealistic style, digital art","Studio photography set of high detail irregular marble stones with gold lines stacked in impossible balance, perfect composition, cinematic light photo studio, beige color scheme, indirect lighting, 8k, elegant and luxury style","Ultrawide, highway, with golden ratio style, 4K , sides are prairies, light is Golden hour, sky with red Clouds, ultrarealistic, CinémaScope, ultra wide format, ratio 16/9, 1/1000 sec, maximum resolution, Sharp details","A photo of cat flying out to space as an astronaut, digital art","A hyper realistic rilakkuma enjoying an icecream in the snow","A lush tropical forest with a waterfall.","A majestic snowy mountain peak.","A beautiful sunset over a beach.","A serene lake surrounded by trees.","A picturesque countryside with rolling hills.","A colorful hot air balloon in the sky.","A peaceful Zen garden.","A grand castle on a hill.","A lively street market in a bustling city.","A delightful flower garden in full bloom.","A cozy cabin in the woods.","A vibrant coral reef teeming with sea life.","A classic European city with cobblestone streets.","A stunning waterfall cascading into a crystal clear pool.","A secluded cabin on the edge of a lake.","A beautiful desert landscape with sand dunes.","A majestic elephant in its natural habitat.","A charming countryside village with thatched roof cottages.","A dreamy castle floating on a cloud.","A whimsical tree house in a forest.","A vibrant city skyline at night.","A picturesque vineyard with rows of grapevines.","A peaceful Japanese garden with a koi pond.","A charming lighthouse on a rocky coastline.","A beautiful waterfall surrounded by greenery.","A dreamy castle with a moat and drawbridge.","A colorful hot air balloon festival.","A beautiful garden with a fountain and sculptures.","A picturesque countryside with a windmill.","A stunning mountain landscape with a rainbow."]},84295:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(51806),a=n(13419),s=n(86989),o=n.n(s),i=n(52175),l=n(4981),c=n(55609),u=n(9818),d=n(69307),p=n(65736),m=n(77567);const __=p.__;function h({attributes:e,setAttributes:t,clientId:n}){const[s,p]=(0,d.useState)(!1),[h,g]=(0,d.useState)([]),[f,b]=(0,d.useState)(null),[v,k]=(0,d.useState)(""),{replaceBlock:y}=(0,u.useDispatch)(i.store),[w,E]=(0,d.useState)(null),[_]=(0,d.useState)((C=m.K)[Math.floor(Math.random()*C.length)]);var C;const x=__("Retry","jetpack"),S=__("Submit","jetpack"),j=w?x:S,{tracks:P}=(0,a.z$)(),{mediaUpload:N}=(0,u.useSelect)((e=>{const{getSettings:t}=e(i.store);return{mediaUpload:t().mediaUpload}}),[]),L=(0,u.useSelect)((e=>e("core/editor").getCurrentPostId())),T=({image:e,inModal:t=!1})=>(0,r.createElement)(c.Flex,{direction:"column"},t&&(0,r.createElement)(c.FlexItem,{style:{"text-align":"center"}},(0,r.createElement)(c.Button,{variant:"primary",onClick:()=>A(e)},__("Use this image","jetpack"))),(0,r.createElement)(c.FlexBlock,null,(0,r.createElement)("img",{className:"wp-block-ai-image-image",src:e,alt:"",onClick:()=>b(e)})),!t&&(0,r.createElement)(c.FlexBlock,null,(0,r.createElement)(c.Flex,{direction:"column",style:{"align-items":"center"}},(0,r.createElement)(c.FlexItem,null,(0,r.createElement)(c.Button,{variant:"primary",onClick:()=>A(e)},__("Use this image","jetpack")))))),A=async t=>{if(s)return;p(!0),E(null);const r=await fetch(t),a=await r.blob(),o=new File([a],"jetpack_ai_image.png",{type:"image/png"});N({filesList:[o],onFileChange:([t])=>{t.id&&y(n,(0,l.createBlock)("core/image",{url:t.url,caption:e.requestedPrompt,alt:e.requestedPrompt}))},allowedTypes:["image"],onError:e=>{console.error(e),p(!1)}}),P.recordEvent("jetpack_ai_dalle_generation_upload",{post_id:L})};return(0,r.createElement)("div",(0,i.useBlockProps)(),(0,r.createElement)(c.Placeholder,{label:__("AI Image","jetpack"),notices:w&&[(0,r.createElement)("div",null,w)]},!s&&0===h.length&&(0,r.createElement)(c.Flex,{expanded:!0},(0,r.createElement)(c.FlexBlock,null,(0,r.createElement)(c.TextareaControl,{label:__("What would you like to see?","jetpack"),placeholder:_,allowedFormats:[],onChange:k,rows:6}),(0,r.createElement)(c.Button,{variant:"primary",onClick:()=>{p(!1),g([]),E(null),function(e,t,n,r,a,s){n(!0),a(null),t({requestedPrompt:e}),o()({path:"/wpcom/v2/jetpack-ai/images/generations",method:"POST",data:{prompt:e,post_id:s}}).then((e=>{n(!1);const t=e.data.map((e=>"data:image/png;base64,"+e.b64_json));r(t)})).catch((e=>{e.message?a(e.message):a(__("Whoops, we have encountered an error. AI is like really, really hard and this is an experimental feature. Please try again later.","jetpack")),n(!1)}))}(""===v.trim()?_:v,t,p,g,E,L),P.recordEvent("jetpack_ai_dalle_generation",{post_id:L})}},j))),!s&&h.length>0&&(0,r.createElement)(c.Flex,{direction:"column",style:{width:"100%"}},(0,r.createElement)(c.FlexBlock,{style:{textAlign:"center",margin:"12px",fontStyle:"italic",width:"100%"}},e.requestedPrompt),(0,r.createElement)(c.FlexBlock,{style:{fontSize:"20px",lineHeight:"38px"}},__("Please choose your image","jetpack")),(0,r.createElement)(c.Flex,{direction:"row",wrap:!0},h.map((e=>(0,r.createElement)(T,{image:e}))))),!s&&f&&(0,r.createElement)(c.Modal,{onRequestClose:()=>b(null)},(0,r.createElement)(T,{image:f,inModal:!0})),e.content&&(0,r.createElement)("div",{className:"content"},e.content),s&&(0,r.createElement)(c.FlexBlock,{style:{padding:"10px",textAlign:"center"}},(0,r.createElement)(c.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}}))))}},6454:(e,t,n)=>{"use strict";var r=n(31985),a=n(41107),s=n(84295);(0,r.S)(a,{edit:s.Z,save:()=>""})},55410:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>g});var r=n(51806),a=n(13419),s=n(86989),o=n.n(s),i=n(52175),l=n(55609),c=n(9818),u=n(69307),d=n(65736),p=n(59958);const __=d.__,m=(e="",t=[],n="",r="")=>{const a=t.filter((function(e){return e&&e.attributes&&e.attributes.content})).map((function(e){return e.attributes.content.replaceAll("
    ","\n")})).join("\n").slice(-1024);if(!(e||a||n||r))return!1;let s="";return s=e?(0,d.sprintf)(/** translators: This will be the beginning of a prompt that will be sent to OpenAI based on the post title. */ __("Please help me write a short piece of a blog post titled '%1$s'","jetpack"),e):__("Please help me write a short piece of a blog post","jetpack"),n&&( diff --git a/_inc/blocks/editor.asset.php b/_inc/blocks/editor.asset.php index 4dab916b64..eea590df42 100644 --- a/_inc/blocks/editor.asset.php +++ b/_inc/blocks/editor.asset.php @@ -1 +1 @@ - array('lodash', 'moment', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => 'd7c69cd0df890502492e'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => '7ca37b7df911b311f9f6'); diff --git a/_inc/blocks/editor.js b/_inc/blocks/editor.js index a2b0f1bee6..b4ffe9405f 100644 --- a/_inc/blocks/editor.js +++ b/_inc/blocks/editor.js @@ -4,9 +4,9 @@ _n("This post will be shared to %d connection.","This post will be shared to %d _n("%d character remaining","%d characters remaining",o,"jetpack"),o)})}},62578:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(55609),a=n(65736),s=n(61074),o=n(6163),i=n(65235),l=n.n(i),c=n(25162),u=n.n(c),d=n(82283);const __=a.__,p=({children:e,type:t="default",actions:n=[],onDismiss:a})=>{const i=l()(d.Z.notice,d.Z[`notice--${t}`]);return React.createElement("div",{className:i},React.createElement("div",{className:d.Z.content}," ",e," "),a&&React.createElement("button",{className:d.Z.dismiss,onClick:a},React.createElement(r.VisuallyHidden,null,__("Dismiss notice","jetpack")),React.createElement(s.Z,{icon:o.Z})),n&&n.length>0&&React.createElement("div",{className:d.Z.actions},n.map((e=>e))))};p.propTypes={children:u().node.isRequired,type:u().oneOf(["default","highlight","warning","error"]),actions:u().arrayOf(u().element),onDismiss:u().func};const m=p},8714:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(55609),a=n(9818),s=n(12238),o=n(69307),i=n(65736),l=n(14085),c=n(86419),u=n(37568),d=n(49021),p=n(95788),m=n(3176),h=n(91474),g=n(23761);const __=i.__,f=({prePublish:e,children:t})=>{const{refresh:n,hasConnections:i,hasEnabledConnections:f}=(0,u.Z)(),b=(0,a.useSelect)((e=>e(s.store).isCurrentPostPublished()),[]),{isPublicizeEnabled:v,hidePublicizeFeature:k,togglePublicizeFeature:y}=(0,l.Z)();(0,c.M1)((function(){f&&n()}),[f,n]);const w=e?o.Fragment:r.PanelBody,E=e?{}:{title:__("Share this post","jetpack"),className:g.Z.panel};return React.createElement(w,E,t,!k&&React.createElement(o.Fragment,null,!b&&React.createElement(r.ToggleControl,{label:v?__("Share when publishing","jetpack"):__("Sharing is disabled","jetpack",0),onChange:y,checked:v,disabled:!i}),React.createElement(d.Z,null),React.createElement(p.Z,null),React.createElement(h.o,null)),b&&React.createElement(m.u,null))}},91750:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(88275),a=n(13419),s=n(9818),o=n(72067),i=n(12238),l=n(65736),c=n(37548),u=n(34607),d=n(45078);const __=l.__;function p(){const{isCurrentPostPublished:e}=(0,s.useSelect)((e=>e(i.store)),[]);return e()?React.createElement(o.PluginPostPublishPanel,{initialOpen:!0,title:__("Manual sharing","jetpack"),id:"publicize-manual-sharing",icon:React.createElement(a.Pm,null)},React.createElement(r.ZP,null,React.createElement(c.T,{className:d.Z.description,variant:"body-small"}),React.createElement(u.n,null))):null}},52403:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(6895),a=n(13419),s=n(86989),o=n.n(s),i=n(72067),l=n(69307),c=n(14085),u=n(86419),d=n(37568),p=n(19649);const m=()=>{const[e,t]=(0,l.useState)((0,a.Pb)()?.social?.reviewRequestDismissed??!0),[n,s]=(0,l.useState)(!1),{hasEnabledConnections:m}=(0,d.Z)(),{isPublicizeEnabled:h,isPostAlreadyShared:g}=(0,c.Z)();(0,u.e3)((()=>{s(!g&&h&&m)}),[g,m,h]);const f=(0,l.useCallback)((()=>{const e=(0,a.Pb)()?.social?.dismissReviewRequestPath??null;o()({path:e,method:"POST",data:{dismissed:!0}}).catch((e=>{throw e})),t(!0)}),[]);return e||!n?null:React.createElement(i.PluginPostPublishPanel,{id:"publicize-title"},React.createElement(p.Z,{href:(0,r.Z)("jetpack-social-plugin-reviews"),onClose:f}))}},77106:(e,t,n)=>{"use strict";n(9818),n(23177)},19649:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(88275),a=n(90526),s=n(13419),o=n(65736),i=n(99196),l=n(2097);const __=o.__,c=({href:e,onClose:t})=>{const{recordEvent:n}=(0,s.z$)({pageViewEventName:"social_plugin_review_prompt",pageViewNamespace:"jetpack",pageViewSuffix:"view"}),c=(0,i.useCallback)((()=>{n("jetpack_social_plugin_review_prompt_new_review_click")}),[n]),u=(0,i.useCallback)((()=>{n("jetpack_social_plugin_review_prompt_dismiss_click"),t()}),[n,t]);return React.createElement(r.ZP,null,React.createElement("div",{className:l.Z.prompt},React.createElement("h2",{className:l.Z.header},/* translators: %s is the celebration emoji */ /* translators: %s is the celebration emoji */ (0,o.sprintf)(__("Presto! %s","jetpack"),String.fromCodePoint(127881))),React.createElement("p",null,__("Just like that, Jetpack Social has shared your post to your connected social accounts.","jetpack")),React.createElement("p",null,__("Please leave a review to let others know how easy getting your posts on social media can be!","jetpack")),React.createElement("div",{className:l.Z.buttons},React.createElement(a.Z,{onClick:c,isExternalLink:!0,href:e,className:l.Z.button},__("Leave a Review","jetpack")),React.createElement(a.Z,{onClick:u,variant:"link",className:l.Z.button},__("Dismiss","jetpack")))))}},69709:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(65736),a=n(14085),s=n(78619);const __=r.__;function o(){const{connectionsAdminUrl:e}=(0,a.Z)();return React.createElement("a",{className:s.Z["settings-link"],href:e,target:"_blank",rel:"noreferrer",title:__("Connect an account","jetpack")},React.createElement("svg",{width:"24",height:"24",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("rect",{x:"0.375",y:"0.375",width:"27.25",height:"27.25",rx:"1.125",fill:"#F6F7F7"}),React.createElement("path",{d:"M19 13.3333H14.6667V9H13.3333V13.3333H9V14.6667H13.3333V19H14.6667V14.6667H19V13.3333Z",fill:"black"}),React.createElement("rect",{x:"0.375",y:"0.375",width:"27.25",height:"27.25",rx:"1.125",stroke:"#A7AAAD",strokeWidth:"0.75",strokeDasharray:"2 2"})))}},2817:(e,t,n)=>{"use strict";n.d(t,{o:()=>a});var r=n(65736);const __=r.__,a=[{label:__("X","jetpack"),networkName:"x",url:"https://x.com/intent/tweet?text={{text}}&url={{url}}"},{label:__("WhatsApp","jetpack"),networkName:"whatsapp",url:"https://api.whatsapp.com/send?text={{text}}"},{label:__("Facebook","jetpack"),networkName:"facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"}]},22917:(e,t,n)=>{"use strict";n(34607)},34607:(e,t,n)=>{"use strict";n.d(t,{n:()=>g});var r=n(3396),a=n(90526),s=n(45106),o=n(14203),i=n(13419),l=n(69307),c=n(65736),u=n(65235),d=n.n(u),p=n(2817),m=n(30664),h=n(38730);const __=c.__;function g({buttonStyle:e="icon",buttonVariant:t}){const n=(0,h.S)(),{recordEvent:u}=(0,i.z$)(),g=(0,l.useCallback)((()=>{u("jetpack_social_share_button_clicked",{network:"clipboard"})}),[u]),f=(0,l.useCallback)((()=>n("{{text}}\n{{url}}",!1)),[n]),b=(0,l.useCallback)((function(e,t){return function(n){n.preventDefault(),u("jetpack_social_share_button_clicked",t),window.open(e,"","menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600")}}),[u]);return React.createElement("div",{className:d()(m.Z["share-buttons"],{[m.Z.vertical]:e.includes("text")})},p.o.map((({label:o,networkName:i,url:l})=>{const u=n(l),d="icon"===e?React.createElement(r.av,{serviceName:i}):null,p=(0,c.sprintf)(/* translators: %s is the name of a social network, e.g. Twitter. */ __("Share on %s","jetpack"),o);return React.createElement("div",{className:m.Z.container,key:i},React.createElement(a.Z,{icon:d,variant:t,"aria-label":p,href:u,target:"_blank",rel:"noopener noreferrer",onClick:b(u,{network:i}),className:"icon"===e?m.Z[i]:"has-text"},"icon"===e?null:React.createElement(React.Fragment,null,"icon-text"===e&&React.createElement(r.av,{className:m.Z[i],serviceName:i}),React.createElement(s.ZP,{className:m.Z.label,component:"span"},p))))})),React.createElement("div",{className:m.Z.container},React.createElement(o.Z,{buttonStyle:e,onCopy:g,textToCopy:f,className:"icon"===e?m.Z.clipboard:" has-text",variant:t},"icon"===e?null:React.createElement(s.ZP,{className:m.Z.label,component:"span"},__("Copy to clipboard","jetpack")))))}},38730:(e,t,n)=>{"use strict";n.d(t,{S:()=>o});var r=n(9818),a=n(69307),s=n(71806);function o(){const{shareMessage:e}=(0,s.R)(),{message:t,link:n}=(0,r.useSelect)((t=>{const n=t("core/editor").getEditedPostAttribute;return{link:n("link"),message:e||n("meta")?.jetpack_seo_html_title||n("title")}}),[e]);return(0,a.useCallback)(((e,r=!0)=>{let a=t,s=n;return e.includes("{{url}}")||(a=a+"\n\n"+s,s=""),r&&(a=encodeURIComponent(a),s=encodeURIComponent(s)),e.replace("{{text}}",a).replace("{{url}}",s)}),[n,t])}},32637:(e,t,n)=>{"use strict";n.d(t,{r:()=>d});var r=n(43521),a=n(69307),s=n(65736),o=n(65235),i=n.n(o),l=n(73640);const __=s.__,_x=s._x,c={error:"var(--jp-red-50)",warning:"var(--jp-yellow-20)",default:"var(--jp-green)"},u={error:"var(--jp-red-50)",warning:"var(--jp-yellow-20)",default:"var(--jp-green-5)"},d=({usedCount:e,scheduledCount:t,remainingCount:n,className:s,noticeType:o="default",legendCaption:d})=>{const p=(0,a.useMemo)((()=>{const r=__("scheduled","jetpack"),a=__("used or scheduled","jetpack");return[("default"===o||0===t)&&{count:e,backgroundColor:c[o],label:__("used","jetpack")},t>0&&{count:"default"===o?t:t+e,backgroundColor:u[o],label:"default"===o?r:a},{count:n,backgroundColor:"var(--jp-gray-off)",label:_x("left","Referring to the quantity remaning, not the direction - left/right.","jetpack")}].filter(Boolean)}),[e,o,t,n]);return React.createElement("div",{className:i()(l.Z.wrapper,s)},React.createElement(r.Z,{totalCount:e+t+n,items:p,className:l.Z["bar-wrapper"],tableCaption:d,legendTitle:d,recordTypeLabel:__("Share type","jetpack"),recordCountLabel:__("Usage","jetpack")}))}},91474:(e,t,n)=>{"use strict";n.d(t,{o:()=>h});var r=n(55609),a=n(9818),s=n(12238),o=n(69307),i=n(65736),l=n(53961),c=n(14085),u=n(45579),d=n(37568);const __=i.__;function p(e=__("Unable to share the Post","jetpack")){const{createErrorNotice:t}=(0,a.dispatch)(l.store);t(e,{id:"publicize-post-share-message"})}function m(){const{hasEnabledConnections:e}=(0,d.Z)(),{isPublicizeEnabled:t}=(0,c.Z)(),{isFetching:n,isError:i,isSuccess:m,doPublicize:h}=(0,u.Z)(),g=(0,a.useSelect)((e=>e(s.store).isCurrentPostPublished()),[]);(0,o.useEffect)((()=>{if(!n)return i?p():void(m&&function(){const{createSuccessNotice:e}=(0,a.dispatch)(l.store);e(__("Post shared","jetpack"),{id:"publicize-post-share-message",type:"snackbar"})}())}),[n,i,m]);const f=!t||!e||!g||n,b=(0,o.useCallback)((()=>{if(!g)return p(__("You must publish your post before you can share it.","jetpack"));(0,a.dispatch)(l.store).removeNotice("publicize-post-share-message"),h()}),[h,g]);return React.createElement(r.Button,{variant:"secondary",onClick:b,disabled:f,isBusy:n},__("Share post","jetpack"))}function h(){const{isRePublicizeUpgradableViaUpsell:e}=(0,c.Z)();return(0,a.useSelect)((e=>e(s.store).isCurrentPostPublished()),[])?e?null:React.createElement(r.PanelRow,null,React.createElement(m,null)):null}},54005:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(55609),a=n(69307),s=n(65736),o=n(75263),i=n(9888),l=n(81469);const __=s.__,c=({prePublish:e=!1})=>{const t=e?a.Fragment:r.PanelBody,n=e?{}:{title:__("Social Image Generator","jetpack")},{isEnabled:s,setIsEnabled:c}=(0,o.Z)(),[u,d]=(0,a.useState)(!1),p=(0,a.useCallback)((()=>d(!0)),[]),m=(0,a.useCallback)((()=>d(!1)),[]);return React.createElement(t,n,u&&React.createElement(l.Z,{onClose:m}),React.createElement(r.ToggleControl,{label:__("Enable Social Image","jetpack"),help:s?"":__("Social Image is disabled for this post.","jetpack"),checked:s,onChange:c}),s&&React.createElement(React.Fragment,null,React.createElement("hr",null),React.createElement(i.ZP,null),React.createElement("hr",null),React.createElement(r.Button,{variant:"secondary",onClick:p,label:__("Open the Social Image Generator settings","jetpack")},__("Settings","jetpack"))))}},81469:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(88275),a=n(55609),s=n(69307),o=n(65736),i=n(75263),l=n(98811),c=n(9888),u=n(88649),d=n(39356),p=n(40088);const __=o.__,m=["image/jpeg","image/png"],h=__("Choose Image","jetpack"),g=({onClose:e})=>{const{customText:t,imageType:n,imageId:o,template:g,updateSettings:f}=(0,i.Z)(),[b,v]=(0,s.useState)(o),[k,y]=(0,s.useState)(n||"featured"),[w,E]=(0,s.useState)(t),[_,C]=(0,s.useState)(g),[x]=(0,l.Z)(b),S=(0,s.useCallback)((()=>{f({template:_,image_type:k,custom_text:w||"",..."custom"===k&&{image_id:b}}),e()}),[f,_,k,b,w,e]),j=(0,s.useCallback)((e=>{v(e?.id)}),[v]);return React.createElement(r.ZP,{targetDom:document.body},React.createElement(a.Modal,{onRequestClose:e},React.createElement(c.ZP,{className:p.Z.preview,imageId:b,customText:w,imageType:k,template:_}),React.createElement(a.SelectControl,{label:__("Image Type","jetpack"),value:k||"featured",options:[{label:__("Featured Image","jetpack"),value:"featured"},{label:__("Custom Image","jetpack"),value:"custom"},{label:__("No Image","jetpack"),value:"none"}],onChange:y}),"custom"===k&&React.createElement(u.Z,{buttonLabel:h,subTitle:__("Add a custom image","jetpack"),mediaId:b,mediaDetails:x,onChange:j,allowedMediaTypes:m,wrapperClassName:p.Z.mediaPicker}),React.createElement(a.TextControl,{className:p.Z.customText,value:w||"",onChange:E,label:__("Custom Header","jetpack"),help:__("By default the post title is used for the image. You can use this field to set your own text.","jetpack")}),React.createElement(a.BaseControl,{label:__("Templates","jetpack"),className:p.Z.templateControl},React.createElement(d.Z,{value:_,onTemplateSelected:C})),React.createElement(a.Button,{onClick:e,variant:"tertiary"},__("Cancel","jetpack")),React.createElement(a.Button,{onClick:S,variant:"primary"},__("Save","jetpack"))))}},79631:(e,t,n)=>{"use strict";n(9818),n(69307),n(65736),n(99196),n(23177),n(8350)},8350:(e,t,n)=>{"use strict";n(55609),n(69307),n(65736),n(39356),n(15214)},39356:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(69307),a=n(65736),s=n(65235),o=n.n(s),i=n(47320),l=n(57227);const __=a.__,c=({value:e=null,onTemplateSelected:t=null})=>{const n=(0,r.useCallback)((e=>{const n=e.target.id;t?.(n)}),[t]);return React.createElement("div",{className:i.Z.templates},l.Z.map((t=>React.createElement("button",{onClick:n,id:t.name,key:t.name,className:o()(i.Z.template,{[i.Z["template--active"]]:t.name===e})},React.createElement("img",{src:t.image,alt:t.label}),React.createElement("span",{className:"screen-reader-text"},/* translators: %s is the name of the template */ /* translators: %s is the name of the template */ -(0,a.sprintf)(__("Pick the %s template","jetpack"),t.label))))))}},57227:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(30253),a=n(91948),s=n(5353);const o=[{name:"highway",label:"Highway",image:n(27956)},{name:"dois",label:"Dois",image:r},{name:"edge",label:"Edge",image:a},{name:"fullscreen",label:"Fullscreen",image:s}]},76848:(e,t,n)=>{"use strict";n(9818),n(69307),n(99196),n(23177)},53513:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(88275),a=n(55609),s=n(69307),o=n(65736),i=n(88219),l=n(89696);const __=o.__,c=__("You need a featured image or media attached to your post to be able to share as a social post.","jetpack"),u=__("By default, the image and text appear on social media as a link preview. To optimize engagement, share as a social post.","jetpack");function d({disabled:e=!1}){const{shouldUploadAttachedMedia:t,updateShouldUploadAttachedMedia:n}=(0,i.Z)(),o=(0,s.useCallback)((e=>{n(e)}),[n]),d=e?a.Disabled:s.Fragment,p=e?{className:l.Z.disabled}:{};return React.createElement(r.ZP,null,React.createElement(d,p,React.createElement(a.CheckboxControl,{className:l.Z.checkbox,checked:t,onChange:o,label:__("Share as a social post","jetpack"),help:e?c:u})))}},63855:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(82674),a=n.n(r),s=n(13477),o=n(9818),i=n(48751),l=n(23177);const c=(0,o.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{excerpt:t("excerpt"),content:t("content").split("\x3c!--more")[0]}}))((e=>{const{message:t}=(0,i.Z)(),{title:n,excerpt:r,content:c}=e,u=(0,o.useSelect)((e=>{const{displayName:t,profileImage:n}=e(l.Eg).getConnectionProfileDetails(l.uJ);return{displayName:t,avatarUrl:n}}));return React.createElement(s.S,a()({},e,{type:"article",user:u,customText:t||r||c||n}))}))},83704:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(82674),a=n.n(r),s=n(17915),o=n(9818),i=n(22629),l=n(99196),c=n.n(l);const u=function(e){const t=(0,o.useSelect)((e=>{const{getEntityRecord:t}=e("core");return(0,i.decodeEntities)(t("root","site").title)}));return c().createElement(s.X,a()({},e,{siteTitle:t}))}},4124:(e,t,n)=>{"use strict";n.d(t,{m:()=>c});var r=n(4049),a=n(9818),s=n(99196),o=n.n(s),i=n(48751),l=n(23177);function c(e){const{title:t,image:n,media:s}=e,{username:c,profileImage:u}=(0,a.useSelect)((e=>e(l.Eg).getConnectionProfileDetails(l.M$))),{message:d}=(0,i.Z)(),p=d||t;return o().createElement(r.V,{image:n,media:s,name:c,profileImage:u,caption:p})}},27725:(e,t,n)=>{"use strict";n.d(t,{y:()=>u});var r=n(93453),a=n(9818),s=n(65736),o=n(99196),i=n.n(o),l=n(48751),c=n(23177);const __=s.__;function u(e){const{title:t,url:n,image:s,media:o}=e,{displayName:u,profileImage:d}=(0,a.useSelect)((e=>e(c.Eg).getConnectionProfileDetails(c.qk))),{message:p}=(0,l.Z)(),m=`${p||t} ${o.length?n:""}`.trim();return i().createElement(r.S,{jobTitle:__("Job Title (Company Name)","jetpack"),image:s,name:u,profileImage:d,title:t,description:m,url:n,media:o})}},28586:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(82674),a=n.n(r),s=n(60312),o=n(9818),i=n(22629),l=n(71806),c=n(48751),u=n(23177);const d=e=>{const{message:t}=(0,c.Z)(),{content:n,siteName:r}=(0,o.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor"),{getSite:n}=e("core");return{content:t("content").split("\x3c!--more")[0],siteName:(0,i.decodeEntities)(n().title)}})),{shouldUploadAttachedMedia:d}=(0,l.R)(),p=(0,o.useSelect)((e=>{const{displayName:t,profileImage:n,username:r}=e(u.Eg).getConnectionProfileDetails(u.cs);return{displayName:t,avatarUrl:n,address:r}})),m=e.media?.[0],h=m?.type.startsWith("image/")?m.url:null;return React.createElement(s.I,a()({},e,{siteName:r,user:p,description:n,customText:t,customImage:h,isSocialPost:d}))}},8454:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(55609),a=n(65736),s=n(39517),o=n(41809),i=n(9279);const __=a.__,l=function({onClose:e,initialTabName:t}){const n=(0,o.P)(),{image:a,media:l,title:c,description:u,url:d}=(0,i.u)();return React.createElement(r.Modal,{onRequestClose:e,className:"jetpack-social-previews__modal",__experimentalHideHeader:!0},React.createElement(r.Button,{className:"jetpack-social-previews__modal--close-btn",onClick:e,icon:s.Z,label:__("Close","jetpack")}),React.createElement(r.TabPanel,{className:"jetpack-social-previews__modal-previews",tabs:n,initialTabName:t},(e=>React.createElement("div",null,React.createElement(e.preview,{title:c,description:u,url:d,image:a,media:l})))))}},18553:(e,t,n)=>{"use strict";n.d(t,{T:()=>c});var r=n(93122),a=n(9818),s=n(99196),o=n.n(s),i=n(48751),l=n(23177);function c(e){const{title:t,url:n,image:s,media:c}=e,{displayName:u,profileImage:d}=(0,a.useSelect)((e=>e(l.Eg).getConnectionProfileDetails(l.Cd))),{message:p}=(0,i.Z)(),m=`${p||t} ${c.length?n:""}`.trim();return o().createElement(r.m,{image:s,name:u,profileImage:d,title:t,description:m,url:n,media:c})}},74140:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(55609),a=n(65736),s=n(41809);const __=a.__,_x=a._x,o=({openModal:e})=>{const t=(0,s.P)();return React.createElement("div",{className:"jetpack-social-previews__panel"},React.createElement("p",null,__("Preview what this will look like on social networks and Google search.","jetpack")),React.createElement("div",{className:"jetpack-gutenberg-social-icons"},t.map((e=>React.createElement(e.icon,{key:e.name,className:"jetpack-social-previews__icon"})))),React.createElement(r.Button,{variant:"secondary",onClick:e,label:__("Open Social Previews","jetpack")},_x("Preview","Button label that opens the social previews modal","jetpack")))}},94714:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(82674),a=n.n(r),s=n(1044),o=n(9818),i=n(48751),l=n(23177);const c=e=>{const{content:t,author:n}=(0,o.useSelect)((e=>{const{getUser:t}=e("core"),{getEditedPostAttribute:n}=e("core/editor"),r=n("author"),a=r&&t(r);return{content:n("content").split("\x3c!--more")[0],author:a?.name}})),{message:r}=(0,i.Z)(),c=(0,o.useSelect)((e=>{const{displayName:t,profileImage:r}=e(l.Eg).getConnectionProfileDetails(l.Bb);return{displayName:t||n,avatarUrl:r}}),[n]);return React.createElement(s.b,a()({},e,{user:c,description:t,customText:r}))}},24766:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(835),a=n(9818),s=n(99196),o=n.n(s),i=n(71806),l=n(23177);const c=function({title:e,description:t,image:n,url:s,media:c}){const{shareMessage:u}=(0,i.R)(),d=(0,a.useSelect)((r=>{const{displayName:a,profileImage:o,username:i}=r(l.Eg).getConnectionProfileDetails(l.wV);return[{name:a,profileImage:o,screenName:i,text:u+(c.length?` ${s}`:""),cardType:n?"summary_large_image":"summary",title:e,description:t,image:n,media:c,url:s}]}),[e,n,t,c,s,u]);return o().createElement(r.c,{tweets:d,hidePostPreview:!0})}},41809:(e,t,n)=>{"use strict";n.d(t,{P:()=>k});var r=n(82674),a=n.n(r),s=n(3396),o=n(65736),i=n(99196),l=n.n(i),c=n(23177),u=n(42032),d=n(63855),p=n(83704),m=n(4124),h=n(27725),g=n(28586),f=n(18553),b=n(94714),v=n(24766);const __=o.__;function k(){const e=(0,u.getSupportedAdditionalConnections)(),t=e.includes(c.M$),n=e.includes(c.cs),r=e.includes(c.Cd);return(0,i.useMemo)((()=>[{title:__("Google Search","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"google"},e)),name:"google",preview:p.Z},{title:__("X","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"x"},e)),name:"x",preview:v.Z},{title:__("Facebook","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"facebook"},e)),name:"facebook",preview:d.Z},t?{title:__("Instagram","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"instagram"},e)),name:"instagram",preview:m.m}:null,{title:__("LinkedIn","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"linkedin"},e)),name:"linkedin",preview:h.y},r?{title:__("Nextdoor","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"nextdoor"},e)),name:"nextdoor",preview:f.T}:null,{title:__("Tumblr","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"tumblr-alt"},e)),name:"tumblr",preview:b.Z},n?{title:__("Mastodon","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"mastodon"},e)),name:"mastodon",preview:g.Z}:null].filter(Boolean)),[t,n,r])}},9279:(e,t,n)=>{"use strict";n.d(t,{u:()=>l});var r=n(9818),a=n(65736),s=n(71806),o=n(90785),i=n(25399);const __=a.__;function l(){const{attachedMedia:e,imageGeneratorSettings:t,shouldUploadAttachedMedia:n}=(0,s.R)();return(0,r.useSelect)((r=>{const{getMedia:a}=r("core"),{getEditedPostAttribute:s,getEditedPostContent:l}=r("core/editor"),c=s("featured_media");let u=c?(0,i.i)(a(c)):"";const d=t.enabled?(0,o.t)(t.token):"";if(d)u=d;else if(e?.[0]?.id){const[t]=e;!!t.id&&a(t.id)?.mime_type?.startsWith("image/")&&t.url&&(u=t.url)}if(!u){const e=(0,i.T)(l());e&&(u=e)}const p=[];if(n)if(d)p.push({type:"image/jpeg",url:d,alt:""});else{const t=e=>{const t=a(e);return t?{type:t.mime_type,url:(0,i.i)(t),alt:t.alt_text}:null};for(const{id:n}of e){const e=t(n);e&&p.push(e)}if(0===p.length&&c){const e=t(c);e&&p.push(e)}}return{title:s("meta")?.jetpack_seo_html_title||s("title"),description:s("meta")?.advanced_seo_description||s("excerpt")||s("content").split("\x3c!--more")[0]||__("Visit the post for more.","jetpack"),url:s("link"),image:u,media:p,initialTabName:null}}),[n,e,t])}},25399:(e,t,n)=>{"use strict";function r(e){return e?e.media_details?.sizes?.large?.source_url||e.source_url:null}function a(e){const t=(new DOMParser).parseFromString(e,"text/html"),n=Array.from(t.querySelectorAll("img")),r=n[0]?.src;return r??null}n.d(t,{T:()=>a,i:()=>r})},13858:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(69307),a=n(87728);const s=({sourceUrl:e,mime:t,duration:n})=>{const[s,o]=(0,r.useState)(!1),[i,l]=(0,r.useState)(0),c=(0,r.useRef)(null),u=(0,r.useRef)(null),d=(0,r.useRef)(null);(0,r.useEffect)((()=>{c.current?.load()}),[e]);const p=(0,r.useCallback)((()=>{c.current.pause(),c.current.currentTime=0,clearInterval(u.current),clearTimeout(d.current),l(0),o(!1)}),[]),m=(0,r.useCallback)((()=>{d.current=setTimeout((()=>{s||(c.current.play(),o(!0),u.current=setInterval((()=>{l((e=>e+1))}),1e3))}),500)}),[s]),h=()=>{const e=n-i,t=Math.floor(e/60),r=String(Math.floor(e%60)).padStart(2,"0");return React.createElement("div",{className:a.Z.progress},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"8",fill:"none"},React.createElement("path",{fill:"#fff",d:"M5.25 3.567a.5.5 0 0 1 0 .866L.75 7.031A.5.5 0 0 1 0 6.598V1.402A.5.5 0 0 1 .75.969l4.5 2.598Z"})),React.createElement("span",{className:a.Z.duration},`${t}:${r}`))};return React.createElement("div",{className:a.Z.wrapper,onMouseEnter:m,onMouseLeave:p},React.createElement("video",{ref:c,onEnded:p,muted:!0},React.createElement("source",{src:e,type:t})),React.createElement(h,null))}},88219:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(71806);function a(){const{attachedMedia:e,shouldUploadAttachedMedia:t,updateJetpackSocialOptions:n}=(0,r.R)();return{attachedMedia:e,shouldUploadAttachedMedia:t,updateAttachedMedia:e=>n("attached_media",e),updateShouldUploadAttachedMedia:e=>n("should_upload_attached_media",e)}}},75323:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(13419),a=n(86989),s=n.n(a),o=n(69307);const i={instagram:"instagram",advancedUpgradeEditor:"advanced-upgrade-nudge-editor",advancedUpgradeAdmin:"advanced-upgrade-nudge-admin",autoConversion:"auto-conversion-editor-notice"},l=e=>-1===e?0:new Date(Date.now()+1e3*e).getTime();function c(){const[e,t]=(0,o.useState)((()=>(0,r.Pb)()?.social?.dismissedNotices??window?.jetpackSocialInitialState?.jetpackSettings?.dismissedNotices??{})),n=(0,o.useCallback)(((e,n=-1)=>{const r=l(n);t((t=>({...t,[e]:r}))),s()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_dismissed_notices:{[e]:r}}})}),[]),a=(0,o.useCallback)((t=>{const n=e[t];return!(0===n||n>Date.now())}),[e]);return(0,o.useMemo)((()=>({dismissedNotices:e,shouldShowNotice:a,dismissNotice:n,NOTICES:i})),[e,a,n])}},39118:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(9818),a=n(12238);const s=()=>(0,r.useSelect)((e=>e(a.store).getEditedPostAttribute("featured_media")))},75263:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9818),a=n(12238),s=n(69307),o=n(71806);const i=(e,t)=>({isEnabled:e?.enabled??!t,customText:e?.custom_text??null,imageType:e?.image_type??null,imageId:e?.image_id??null,template:e?.template??null,token:e?.token??null});function l(){const{imageGeneratorSettings:e,jetpackSocialOptions:t,updateJetpackSocialOptions:n}=(0,o.R)(),{isPostPublished:l}=(0,r.useSelect)((e=>({isPostPublished:e(a.store).isCurrentPostPublished()}))),c=(0,s.useCallback)(((t,r)=>{const a={...e,[t]:r};n("image_generator_settings",a)}),[e,n]),u=(0,s.useCallback)((t=>{const r={...e,...t};n("image_generator_settings",r)}),[e,n]);return{...i(t.image_generator_settings,l),setIsEnabled:e=>c("enabled",e),setToken:e=>c("token",e),updateSettings:u}}},98811:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9818),a=n(69307);const s=async e=>{if(!e)return{};let t={mime:e.mime_type,fileSize:e.media_details.filesize,length:e.media_details?.length};"video/videopress"===e.mime_type&&(t=await(async e=>{if(!e?.media_details?.videopress?.original||!e?.media_details?.videopress?.duration)return{};const t=await fetch(e?.media_details?.videopress?.original,{method:"HEAD"}),n=t.headers.get("content-length"),r=t.headers.get("content-type");return n&&r?{mime:r,fileSize:n,length:Math.round(e.media_details.videopress.duration/1e3)}:{}})(e));const n=e?.media_details?.sizes??{};if(!n.full)return{mediaData:{width:e.media_details.width,height:e.media_details.height,sourceUrl:e.source_url},metaData:t};const r=n.medium||n.large,a={width:r.width,height:r.height,sourceUrl:r.source_url};return{mediaData:{width:n.full.width,height:n.full.height,sourceUrl:n.full.source_url},metaData:t,previewData:a}};function o(e=null){const[t,n]=(0,a.useState)([{}]),o=(0,r.useSelect)((t=>t("core").getMedia(e,{context:"view"})),[e]),i=(0,a.useCallback)((async()=>{try{const e=await s(o);n([e??{}])}catch{n([{}])}}),[o]);return(0,a.useEffect)((()=>{i()}),[i]),t}},46791:(e,t,n)=>{"use strict";n.d(t,{Wv:()=>l,ZP:()=>d,rs:()=>s});var r=n(69307),a=n(1795);const s="NO_MEDIA_ERROR",o="FILE_SIZE_ERROR",i="DIMENSION_ERROR";function l(e){return"video"===e.split("/")[0]}const c=e=>{if(!e?.mime||!e?.fileSize)return!1;const{mime:t,fileSize:n}=e;if(l(t))return!1;if(!a.bD.includes(t))return!1;return!((n?n/Math.pow(1e3,2):null)>=55)},u=(e,t,n,r)=>{const c=a.$8[n]??a.ay;if(!e||0===Object.keys(e).length)return c.requiresMedia?s:null;if(!c.requiresMedia&&!r)return null;const{mime:u,fileSize:d}=e;if(!u||!c.allowedMediaTypes.includes(u.toLowerCase()))return"FILE_TYPE_ERROR";if(!t?.width||!t?.height)return i;const p=d?d/Math.pow(1e3,2):null;return l(u)?((e,t,n,r,s)=>{const{minSize:l=0,maxSize:c=a.zc,minLength:u=0,maxLength:d=a.zc,maxWidth:p=a.zc,aspectRatio:m=a.ay.video.aspectRatio}=s;if(!e||e>c||ed)return"VIDEO_LENGTH_TOO_LONG_ERROR";const h=n/r;return hm.max||n>p?i:null})(p,e.length,t.width,t.height,c.video):((e,t,n,r)=>{const{maxSize:s=a.zc,minWidth:l=0,maxWidth:c=a.zc,aspectRatio:u=a.ay.image.aspectRatio}=r,d=t/n;return du.max||t>c||ts?o:null})(p,t.width,t.height,c.image)},d=(e,t,{isSocialImageGeneratorEnabledForPost:n,shouldUploadAttachedMedia:a})=>{const s=(0,r.useRef)({});return(0,r.useMemo)((()=>{const r=n?{}:e.reduce(((e,{connection_id:n,service_name:r})=>{const s=u(t.metaData,t.mediaData,r,a);return s&&(e[n]=s),e}),{});return JSON.stringify(r)!==JSON.stringify(s.current)&&(s.current=r),{validationErrors:s.current,isConvertible:c(t.metaData)}}),[n,e,t.metaData,t.mediaData,a])}},1795:(e,t,n)=>{"use strict";n.d(t,{$8:()=>g,ay:()=>h,bD:()=>f,uo:()=>b,zc:()=>m});const r="video/mp4",a="video/mov",s="video/videopress",o=["image/jpeg","image/jpg","image/png"],i=o.concat(["image/gif","image/bmp"]),l=["video/3g2","video/3gp","video/3gpp","video/asf","video/avi","video/dat","video/divx","video/dv","video/f4v","video/flv","video/gif","video/m2ts","video/m4v","video/mkv","video/mod","video/mov","video/mp4","video/mpe","video/mpeg","video/mpeg4","video/mpg","video/mts","video/nsv","video/ogm","video/ogv","video/qt","video/tod","video/ts","video/vob","video/wmv"],c=o.concat(["image/gif","image/heic","image/heif","image/webp","image/avif"]),u=["video/webm","video/quicktime","video/ogg"],d=o.concat(["image/gif","image/jpe","image/tif","image/tiff","image/webp"]),p=[a,"video/avi","video/mpg","video/mpeg","video/m4v"],m=1e5,h={requiresMedia:!1,allowedMediaTypes:o.concat([r,s,a]),image:{maxSize:4,minWidth:0,maxWidth:m,aspectRatio:{min:0,max:m}},video:{minLength:0,minSize:0,maxSize:m,maxLength:m,maxWidth:m,aspectRatio:{min:0,max:m}}},g={twitter:{allowedMediaTypes:o.concat([r,s]),image:{maxSize:5},video:{maxSize:512,maxLength:140}},facebook:{allowedMediaTypes:i.concat([s,...l]),image:{maxSize:8},video:{maxSize:1e4,maxLength:14400}},tumblr:{allowedMediaTypes:o.concat([r,a,s]),image:{maxSize:20},video:{maxSize:500,maxLength:600}},linkedin:{allowedMediaTypes:o.concat([r,s]),image:{maxSize:20},video:{minSize:.075,maxSize:200,maxLength:600,minLength:3}},"instagram-business":{requiresMedia:!0,allowedMediaTypes:["image/jpg","image/jpeg",r,a,s],image:{maxSize:8,minWidth:320,maxWidth:1440,aspectRatio:{min:.8,max:1.91}},video:{maxLength:90,minLength:3,maxSize:1e3,maxWidth:1920,aspectRatio:{min:.01,max:10}}},mastodon:{allowedMediaTypes:c.concat([...u,r,s]),image:{maxSize:10},video:{maxSize:40}},nextdoor:{allowedMediaTypes:d.concat([...p,r,s]),image:{maxSize:10},video:{maxSize:500}}},f=["image/png","image/jpeg","image/jpg","image/heic","image/heif","image/webp"],b=[...new Set([...o,...i,...c,...l,...u,...f])]},71806:(e,t,n)=>{"use strict";n.d(t,{R:()=>i});var r=n(9818),a=n(12238),s=n(69307),o=n(42032);function i(){const{editPost:e}=(0,r.useDispatch)(a.store),t=(0,r.useSelect)((e=>{const t=e(a.store).getEditedPostAttribute("meta")||{},n=t.jetpack_publicize_feature_enabled??!0,r=t.jetpack_social_options||{};return{isPublicizeEnabled:n,jetpackSocialOptions:r,attachedMedia:r.attached_media||[],imageGeneratorSettings:r.image_generator_settings??{enabled:!1},isPostAlreadyShared:t.jetpack_social_post_already_shared??!1,shareMessage:`${t.jetpack_publicize_message||""}`.substring(0,(0,o.getShareMessageMaxLength)()),shouldUploadAttachedMedia:r.should_upload_attached_media??!1}}),[]),n=(0,s.useCallback)(((t,n)=>{e({meta:{[t]:n}})}),[e]),i=(0,s.useCallback)((()=>{n("jetpack_publicize_feature_enabled",!t.isPublicizeEnabled)}),[t.isPublicizeEnabled,n]),l=(0,s.useCallback)(((e,r)=>{n("jetpack_social_options",{...t.jetpackSocialOptions,[e]:r})}),[t.jetpackSocialOptions,n]);return(0,s.useMemo)((()=>({...t,togglePublicizeFeature:i,updateJetpackSocialOptions:l,updateMeta:n})),[t,i,l,n])}},14085:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(13419),a=n(9818),s=n(12238),o=n(71806);const i="republicize";function l(){const e=(0,r.Pb)()?.social?.sharesData??{},t=(0,r.Pb)()?.wpcomBlogId,n=e.is_share_limit_enabled,l=(0,r.OZ)(i)?.available||n,c=(0,a.useSelect)((e=>e(s.store).isCurrentPostPublished()),[]),u=(0,r.Pb)()?.social?.publicizeConnectionsUrl??"https://wordpress.com/marketing/connections/",{isPublicizeEnabled:d,togglePublicizeFeature:p,isPostAlreadyShared:m}=(0,o.R)(),h=(0,r.X1)(i)&&!l,g=c?l:d,f=c&&h,b=c&&!l,v=!!(0,r.Pb)()?.social?.hasPaidPlan,k=!!(0,r.Pb)()?.social?.isEnhancedPublishingEnabled,y=!!(0,r.Pb)()?.social?.isAutoConversionEnabled;return{isPublicizeEnabledMeta:d,isPublicizeEnabled:g,togglePublicizeFeature:p,isPublicizeDisabledBySitePlan:f,isRePublicizeFeatureAvailable:l,isRePublicizeUpgradableViaUpsell:h,hidePublicizeFeature:b,isShareLimitEnabled:n,isPostAlreadyShared:m,numberOfSharesRemaining:e.shares_remaining,shouldShowAdvancedPlanNudge:e.show_advanced_plan_upgrade_nudge,hasPaidPlan:v,isEnhancedPublishingEnabled:k,isSocialImageGeneratorAvailable:!!(0,r.Pb)()?.social?.isSocialImageGeneratorAvailable,isSocialImageGeneratorEnabled:!!(0,r.Pb)()?.social?.isSocialImageGeneratorEnabled,connectionsAdminUrl:u+(t??(0,r.lQ)()),adminUrl:(0,r.Pb)()?.social?.adminUrl,isAutoConversionEnabled:y,jetpackSharingSettingsUrl:(0,r.Pb)()?.social?.jetpackSharingSettingsUrl}}},6230:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(9818),a=n(69307),s=n(22552),o=n(23177);function i(){const e=(0,s.Z)(),t=(0,a.useRef)(!1),n=(0,r.useDispatch)(o.Eg).refreshAutoConversionSettings;return{refreshAutoConversionSettings:()=>{e||(t.current=!0),e&&t.current&&(n(),t.current=!1)}}}},96672:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(94333),a=n(69307),s=n(22552),o=n(37568);function i(){const e=(0,a.useRef)(!1),t=(0,s.Z)(),{refresh:n}=(0,o.Z)(),i=(0,r.useDebounce)(n,2e3);return()=>{t||(e.current=!0,i.cancel()),t&&e.current&&(i(),e.current=!1)}}},86419:(e,t,n)=>{"use strict";n.d(t,{M1:()=>i,e3:()=>l});var r=n(94333),a=n(9818),s=n(12238),o=n(69307);function i(e,t){const n=(0,a.useSelect)((e=>e(s.store).isPublishingPost()),[]),i=(0,r.usePrevious)(n);(0,o.useEffect)((()=>{i&&!n&&e()}),[n,i,e,t])}function l(e,t){const n=(0,a.useSelect)((e=>e(s.store).isPublishingPost()),[]),i=(0,r.usePrevious)(n);(0,o.useEffect)((()=>{!i&&n&&e()}),[n,i,e,t])}},34431:(e,t,n)=>{"use strict";n.d(t,{U:()=>o});var r=n(9818),a=n(65736),s=n(23177);const __=a.__,_n=a._n;function o({scheduledCountAdjustment:e=0,usedCountAdjustment:t=0}={}){return(0,r.useSelect)((n=>{const r=n(s.h),o=r.getShareLimit(),i=r.getScheduledSharesCount()+e,l=r.getSharesUsedCount()+t,c=l+i,u=r.numberOfSharesRemaining(),d=function(e){const t=Number.isFinite(e)?(0,a.sprintf)( +(0,a.sprintf)(__("Pick the %s template","jetpack"),t.label))))))}},57227:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(30253),a=n(91948),s=n(5353);const o=[{name:"highway",label:"Highway",image:n(27956)},{name:"dois",label:"Dois",image:r},{name:"edge",label:"Edge",image:a},{name:"fullscreen",label:"Fullscreen",image:s}]},76848:(e,t,n)=>{"use strict";n(9818),n(69307),n(99196),n(23177)},53513:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(88275),a=n(55609),s=n(69307),o=n(65736),i=n(88219),l=n(89696);const __=o.__,c=__("You need a featured image or media attached to your post to be able to share as a social post.","jetpack"),u=__("By default, the image and text appear on social media as a link preview. To optimize engagement, share as a social post.","jetpack");function d({disabled:e=!1}){const{shouldUploadAttachedMedia:t,updateShouldUploadAttachedMedia:n}=(0,i.Z)(),o=(0,s.useCallback)((e=>{n(e)}),[n]),d=e?a.Disabled:s.Fragment,p=e?{className:l.Z.disabled}:{};return React.createElement(r.ZP,null,React.createElement(d,p,React.createElement(a.CheckboxControl,{className:l.Z.checkbox,checked:t,onChange:o,label:__("Share as a social post","jetpack"),help:e?c:u})))}},63855:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(82674),a=n.n(r),s=n(13477),o=n(9818),i=n(48751),l=n(23177);const c=(0,o.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{excerpt:t("excerpt"),content:t("content").split("\x3c!--more")[0]}}))((e=>{const{message:t}=(0,i.Z)(),{title:n,excerpt:r,content:c}=e,u=(0,o.useSelect)((e=>{const{displayName:t,profileImage:n}=e(l.Eg).getConnectionProfileDetails(l.uJ);return{displayName:t,avatarUrl:n}}));return React.createElement(s.S,a()({},e,{type:"article",user:u,customText:t||r||c||n}))}))},83704:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(82674),a=n.n(r),s=n(17915),o=n(9818),i=n(22629),l=n(99196),c=n.n(l);const u=function(e){const t=(0,o.useSelect)((e=>{const{getEntityRecord:t}=e("core");return(0,i.decodeEntities)(t("root","site").title)}));return c().createElement(s.X,a()({},e,{siteTitle:t}))}},4124:(e,t,n)=>{"use strict";n.d(t,{m:()=>c});var r=n(4049),a=n(9818),s=n(99196),o=n.n(s),i=n(48751),l=n(23177);function c(e){const{title:t,image:n,media:s}=e,{username:c,profileImage:u}=(0,a.useSelect)((e=>e(l.Eg).getConnectionProfileDetails(l.M$))),{message:d}=(0,i.Z)(),p=d||t;return o().createElement(r.V,{image:n,media:s,name:c,profileImage:u,caption:p})}},27725:(e,t,n)=>{"use strict";n.d(t,{y:()=>u});var r=n(93453),a=n(9818),s=n(65736),o=n(99196),i=n.n(o),l=n(48751),c=n(23177);const __=s.__;function u(e){const{title:t,url:n,image:s,media:o}=e,{displayName:u,profileImage:d}=(0,a.useSelect)((e=>e(c.Eg).getConnectionProfileDetails(c.qk))),{message:p}=(0,l.Z)(),m=`${p||t} ${o.length?n:""}`.trim();return i().createElement(r.S,{jobTitle:__("Job Title (Company Name)","jetpack"),image:s,name:u,profileImage:d,title:t,description:m,url:n,media:o})}},28586:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(82674),a=n.n(r),s=n(60312),o=n(9818),i=n(22629),l=n(71806),c=n(48751),u=n(23177);const d=e=>{const{message:t}=(0,c.Z)(),{content:n,siteName:r}=(0,o.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor"),{getSite:n}=e("core");return{content:t("content").split("\x3c!--more")[0],siteName:(0,i.decodeEntities)(n().title)}})),{shouldUploadAttachedMedia:d}=(0,l.R)(),p=(0,o.useSelect)((e=>{const{displayName:t,profileImage:n,username:r}=e(u.Eg).getConnectionProfileDetails(u.cs);return{displayName:t,avatarUrl:n,address:r}})),m=e.media?.[0],h=m?.type.startsWith("image/")?m.url:null;return React.createElement(s.I,a()({},e,{siteName:r,user:p,description:n,customText:t,customImage:h,isSocialPost:d}))}},8454:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(55609),a=n(65736),s=n(39517),o=n(41809),i=n(9279);const __=a.__,l=function({onClose:e,initialTabName:t}){const n=(0,o.P)(),{image:a,media:l,title:c,description:u,url:d}=(0,i.u)();return React.createElement(r.Modal,{onRequestClose:e,className:"jetpack-social-previews__modal",__experimentalHideHeader:!0},React.createElement(r.Button,{className:"jetpack-social-previews__modal--close-btn",onClick:e,icon:s.Z,label:__("Close","jetpack")}),React.createElement(r.TabPanel,{className:"jetpack-social-previews__modal-previews",tabs:n,initialTabName:t},(e=>React.createElement("div",null,React.createElement(e.preview,{title:c,description:u,url:d,image:a,media:l})))))}},18553:(e,t,n)=>{"use strict";n.d(t,{T:()=>c});var r=n(93122),a=n(9818),s=n(99196),o=n.n(s),i=n(48751),l=n(23177);function c(e){const{title:t,url:n,image:s,media:c}=e,{displayName:u,profileImage:d}=(0,a.useSelect)((e=>e(l.Eg).getConnectionProfileDetails(l.Cd))),{message:p}=(0,i.Z)(),m=`${p||t} ${c.length?n:""}`.trim();return o().createElement(r.m,{image:s,name:u,profileImage:d,title:t,description:m,url:n,media:c})}},74140:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(55609),a=n(65736),s=n(41809);const __=a.__,_x=a._x,o=({openModal:e})=>{const t=(0,s.P)();return React.createElement("div",{className:"jetpack-social-previews__panel"},React.createElement("p",null,__("Preview what this will look like on social networks and Google search.","jetpack")),React.createElement("div",{className:"jetpack-gutenberg-social-icons"},t.map((e=>React.createElement(e.icon,{key:e.name,className:"jetpack-social-previews__icon"})))),React.createElement(r.Button,{variant:"secondary",onClick:e,label:__("Open Social Previews","jetpack")},_x("Preview","Button label that opens the social previews modal","jetpack")))}},94714:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(82674),a=n.n(r),s=n(1044),o=n(9818),i=n(48751),l=n(23177);const c=e=>{const{content:t,author:n}=(0,o.useSelect)((e=>{const{getUser:t}=e("core"),{getEditedPostAttribute:n}=e("core/editor"),r=n("author"),a=r&&t(r);return{content:n("content").split("\x3c!--more")[0],author:a?.name}})),{message:r}=(0,i.Z)(),c=(0,o.useSelect)((e=>{const{displayName:t,profileImage:r}=e(l.Eg).getConnectionProfileDetails(l.Bb);return{displayName:t||n,avatarUrl:r}}),[n]);return React.createElement(s.b,a()({},e,{user:c,description:t,customText:r}))}},24766:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(835),a=n(9818),s=n(99196),o=n.n(s),i=n(71806),l=n(23177);const c=function({title:e,description:t,image:n,url:s,media:c}){const{shareMessage:u}=(0,i.R)(),d=(0,a.useSelect)((r=>{const{displayName:a,profileImage:o,username:i}=r(l.Eg).getConnectionProfileDetails(l.wV);return[{name:a,profileImage:o,screenName:i,text:u+(c.length?` ${s}`:""),cardType:n?"summary_large_image":"summary",title:e,description:t,image:n,media:c,url:s}]}),[e,n,t,c,s,u]);return o().createElement(r.c,{tweets:d,hidePostPreview:!0})}},41809:(e,t,n)=>{"use strict";n.d(t,{P:()=>k});var r=n(82674),a=n.n(r),s=n(3396),o=n(65736),i=n(99196),l=n.n(i),c=n(23177),u=n(42032),d=n(63855),p=n(83704),m=n(4124),h=n(27725),g=n(28586),f=n(18553),b=n(94714),v=n(24766);const __=o.__;function k(){const e=(0,u.getSupportedAdditionalConnections)(),t=e.includes(c.M$),n=e.includes(c.cs),r=e.includes(c.Cd);return(0,i.useMemo)((()=>[{title:__("Google Search","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"google"},e)),name:"google",preview:p.Z},{title:__("X","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"x"},e)),name:"x",preview:v.Z},{title:__("Facebook","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"facebook"},e)),name:"facebook",preview:d.Z},t?{title:__("Instagram","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"instagram"},e)),name:"instagram",preview:m.m}:null,{title:__("LinkedIn","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"linkedin"},e)),name:"linkedin",preview:h.y},r?{title:__("Nextdoor","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"nextdoor"},e)),name:"nextdoor",preview:f.T}:null,{title:__("Tumblr","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"tumblr-alt"},e)),name:"tumblr",preview:b.Z},n?{title:__("Mastodon","jetpack"),icon:e=>l().createElement(s.av,a()({serviceName:"mastodon"},e)),name:"mastodon",preview:g.Z}:null].filter(Boolean)),[t,n,r])}},9279:(e,t,n)=>{"use strict";n.d(t,{u:()=>l});var r=n(9818),a=n(65736),s=n(71806),o=n(90785),i=n(25399);const __=a.__;function l(){const{attachedMedia:e,imageGeneratorSettings:t,shouldUploadAttachedMedia:n}=(0,s.R)();return(0,r.useSelect)((r=>{const{getMedia:a}=r("core"),{getEditedPostAttribute:s,getEditedPostContent:l}=r("core/editor"),c=s("featured_media");let u=c?(0,i.i)(a(c)):"";const d=t.enabled?(0,o.t)(t.token):"";if(d)u=d;else if(e?.[0]?.id){const[t]=e;!!t.id&&a(t.id)?.mime_type?.startsWith("image/")&&t.url&&(u=t.url)}if(!u){const e=(0,i.T)(l());e&&(u=e)}const p=[];if(n)if(d)p.push({type:"image/jpeg",url:d,alt:""});else{const t=e=>{const t=a(e);return t?{type:t.mime_type,url:(0,i.i)(t),alt:t.alt_text}:null};for(const{id:n}of e){const e=t(n);e&&p.push(e)}if(0===p.length&&c){const e=t(c);e&&p.push(e)}}return{title:s("meta")?.jetpack_seo_html_title||s("title"),description:s("meta")?.advanced_seo_description||s("excerpt")||s("content").split("\x3c!--more")[0]||__("Visit the post for more.","jetpack"),url:s("link"),image:u,media:p,initialTabName:null}}),[n,e,t])}},25399:(e,t,n)=>{"use strict";function r(e){return e?e.media_details?.sizes?.large?.source_url||e.source_url:null}function a(e){const t=(new DOMParser).parseFromString(e,"text/html"),n=Array.from(t.querySelectorAll("img")),r=n[0]?.src;return r??null}n.d(t,{T:()=>a,i:()=>r})},13858:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(69307),a=n(87728);const s=({sourceUrl:e,mime:t,duration:n})=>{const[s,o]=(0,r.useState)(!1),[i,l]=(0,r.useState)(0),c=(0,r.useRef)(null),u=(0,r.useRef)(null),d=(0,r.useRef)(null);(0,r.useEffect)((()=>{c.current?.load()}),[e]);const p=(0,r.useCallback)((()=>{c.current.pause(),c.current.currentTime=0,clearInterval(u.current),clearTimeout(d.current),l(0),o(!1)}),[]),m=(0,r.useCallback)((()=>{d.current=setTimeout((()=>{s||(c.current.play(),o(!0),u.current=setInterval((()=>{l((e=>e+1))}),1e3))}),500)}),[s]),h=()=>{const e=n-i,t=Math.floor(e/60),r=String(Math.floor(e%60)).padStart(2,"0");return React.createElement("div",{className:a.Z.progress},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"8",fill:"none"},React.createElement("path",{fill:"#fff",d:"M5.25 3.567a.5.5 0 0 1 0 .866L.75 7.031A.5.5 0 0 1 0 6.598V1.402A.5.5 0 0 1 .75.969l4.5 2.598Z"})),React.createElement("span",{className:a.Z.duration},`${t}:${r}`))};return React.createElement("div",{className:a.Z.wrapper,onMouseEnter:m,onMouseLeave:p},React.createElement("video",{ref:c,onEnded:p,muted:!0},React.createElement("source",{src:e,type:t})),React.createElement(h,null))}},88219:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(71806);function a(){const{attachedMedia:e,shouldUploadAttachedMedia:t,updateJetpackSocialOptions:n}=(0,r.R)();return{attachedMedia:e,shouldUploadAttachedMedia:t,updateAttachedMedia:e=>n("attached_media",e),updateShouldUploadAttachedMedia:e=>n("should_upload_attached_media",e)}}},75323:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(13419),a=n(86989),s=n.n(a),o=n(69307);const i={instagram:"instagram",advancedUpgradeEditor:"advanced-upgrade-nudge-editor",advancedUpgradeAdmin:"advanced-upgrade-nudge-admin",autoConversion:"auto-conversion-editor-notice"},l=e=>-1===e?0:new Date(Date.now()+1e3*e).getTime();function c(){const[e,t]=(0,o.useState)((()=>(0,r.Pb)()?.social?.dismissedNotices??window?.jetpackSocialInitialState?.jetpackSettings?.dismissedNotices??{})),n=(0,o.useCallback)(((e,n=-1)=>{const r=l(n);t((t=>({...t,[e]:r}))),s()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_dismissed_notices:{[e]:r}}})}),[]),a=(0,o.useCallback)((t=>{const n=e[t];return!(0===n||n>Date.now())}),[e]);return(0,o.useMemo)((()=>({dismissedNotices:e,shouldShowNotice:a,dismissNotice:n,NOTICES:i})),[e,a,n])}},39118:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(9818),a=n(12238);const s=()=>(0,r.useSelect)((e=>e(a.store).getEditedPostAttribute("featured_media")))},75263:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9818),a=n(12238),s=n(69307),o=n(71806);const i=(e,t)=>({isEnabled:e?.enabled??!t,customText:e?.custom_text??null,imageType:e?.image_type??null,imageId:e?.image_id??null,template:e?.template??null,token:e?.token??null});function l(){const{imageGeneratorSettings:e,jetpackSocialOptions:t,updateJetpackSocialOptions:n}=(0,o.R)(),{isPostPublished:l}=(0,r.useSelect)((e=>({isPostPublished:e(a.store).isCurrentPostPublished()}))),c=(0,s.useCallback)(((t,r)=>{const a={...e,[t]:r};n("image_generator_settings",a)}),[e,n]),u=(0,s.useCallback)((t=>{const r={...e,...t};n("image_generator_settings",r)}),[e,n]);return{...i(t.image_generator_settings,l),setIsEnabled:e=>c("enabled",e),setToken:e=>c("token",e),updateSettings:u}}},98811:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9818),a=n(69307);const s=async e=>{if(!e)return{};let t={mime:e.mime_type,fileSize:e.media_details.filesize,length:e.media_details?.length};"video/videopress"===e.mime_type&&(t=await(async e=>{if(!e?.media_details?.videopress?.original||!e?.media_details?.videopress?.duration)return{};const t=await fetch(e?.media_details?.videopress?.original,{method:"HEAD"}),n=t.headers.get("content-length"),r=t.headers.get("content-type");return n&&r?{mime:r,fileSize:n,length:Math.round(e.media_details.videopress.duration/1e3)}:{}})(e));const n=e?.media_details?.sizes??{};if(!n.full)return{mediaData:{width:e.media_details.width,height:e.media_details.height,sourceUrl:e.source_url},metaData:t};const r=n.medium||n.large,a={width:r.width,height:r.height,sourceUrl:r.source_url};return{mediaData:{width:n.full.width,height:n.full.height,sourceUrl:n.full.source_url},metaData:t,previewData:a}};function o(e=null){const[t,n]=(0,a.useState)([{}]),o=(0,r.useSelect)((t=>t("core").getMedia(e,{context:"view"})),[e]),i=(0,a.useCallback)((async()=>{try{const e=await s(o);n([e??{}])}catch{n([{}])}}),[o]);return(0,a.useEffect)((()=>{i()}),[i]),t}},46791:(e,t,n)=>{"use strict";n.d(t,{Wv:()=>l,ZP:()=>d,rs:()=>s});var r=n(69307),a=n(1795);const s="NO_MEDIA_ERROR",o="FILE_SIZE_ERROR",i="DIMENSION_ERROR";function l(e){return"video"===e.split("/")[0]}const c=e=>{if(!e?.mime||!e?.fileSize)return!1;const{mime:t,fileSize:n}=e;if(l(t))return!1;if(!a.bD.includes(t))return!1;return!((n?n/Math.pow(1e3,2):null)>=55)},u=(e,t,n,r)=>{const c=a.$8[n]??a.ay;if(!e||0===Object.keys(e).length)return c.requiresMedia?s:null;if(!c.requiresMedia&&!r)return null;const{mime:u,fileSize:d}=e;if(!u||!c.allowedMediaTypes.includes(u.toLowerCase()))return"FILE_TYPE_ERROR";if(!t?.width||!t?.height)return i;const p=d?d/Math.pow(1e3,2):null;return l(u)?((e,t,n,r,s)=>{const{minSize:l=0,maxSize:c=a.zc,minLength:u=0,maxLength:d=a.zc,maxWidth:p=a.zc,aspectRatio:m=a.ay.video.aspectRatio}=s;if(!e||e>c||ed)return"VIDEO_LENGTH_TOO_LONG_ERROR";const h=n/r;return hm.max||n>p?i:null})(p,e.length,t.width,t.height,c.video):((e,t,n,r)=>{const{maxSize:s=a.zc,minWidth:l=0,maxWidth:c=a.zc,aspectRatio:u=a.ay.image.aspectRatio}=r,d=t/n;return du.max||t>c||ts?o:null})(p,t.width,t.height,c.image)},d=(e,t,{isSocialImageGeneratorEnabledForPost:n,shouldUploadAttachedMedia:a})=>{const s=(0,r.useRef)({});return(0,r.useMemo)((()=>{const r=n?{}:e.reduce(((e,{connection_id:n,service_name:r})=>{const s=u(t.metaData,t.mediaData,r,a);return s&&(e[n]=s),e}),{});return JSON.stringify(r)!==JSON.stringify(s.current)&&(s.current=r),{validationErrors:s.current,isConvertible:c(t.metaData)}}),[n,e,t.metaData,t.mediaData,a])}},1795:(e,t,n)=>{"use strict";n.d(t,{$8:()=>g,ay:()=>h,bD:()=>f,uo:()=>b,zc:()=>m});const r="video/mp4",a="video/mov",s="video/videopress",o=["image/jpeg","image/jpg","image/png"],i=o.concat(["image/gif","image/bmp"]),l=["video/3g2","video/3gp","video/3gpp","video/asf","video/avi","video/dat","video/divx","video/dv","video/f4v","video/flv","video/gif","video/m2ts","video/m4v","video/mkv","video/mod","video/mov","video/mp4","video/mpe","video/mpeg","video/mpeg4","video/mpg","video/mts","video/nsv","video/ogm","video/ogv","video/qt","video/tod","video/ts","video/vob","video/wmv"],c=o.concat(["image/gif","image/heic","image/heif","image/webp","image/avif"]),u=["video/webm","video/quicktime","video/ogg"],d=o.concat(["image/gif","image/jpe","image/tif","image/tiff","image/webp"]),p=[a,"video/avi","video/mpg","video/mpeg","video/m4v"],m=1e5,h={requiresMedia:!1,allowedMediaTypes:o.concat([r,s,a]),image:{maxSize:4,minWidth:0,maxWidth:m,aspectRatio:{min:0,max:m}},video:{minLength:0,minSize:0,maxSize:m,maxLength:m,maxWidth:m,aspectRatio:{min:0,max:m}}},g={twitter:{allowedMediaTypes:o.concat([r,s]),image:{maxSize:5},video:{maxSize:512,maxLength:140}},facebook:{allowedMediaTypes:i.concat([s,...l]),image:{maxSize:8},video:{maxSize:1e4,maxLength:14400}},tumblr:{allowedMediaTypes:o.concat([r,a,s]),image:{maxSize:20},video:{maxSize:500,maxLength:600}},linkedin:{allowedMediaTypes:o.concat([r,s]),image:{maxSize:20},video:{minSize:.075,maxSize:200,maxLength:600,minLength:3}},"instagram-business":{requiresMedia:!0,allowedMediaTypes:["image/jpg","image/jpeg",r,a,s],image:{maxSize:8,minWidth:320,maxWidth:1440,aspectRatio:{min:.8,max:1.91}},video:{maxLength:90,minLength:3,maxSize:1e3,maxWidth:1920,aspectRatio:{min:.01,max:10}}},mastodon:{allowedMediaTypes:c.concat([...u,r,s]),image:{maxSize:10},video:{maxSize:40}},nextdoor:{allowedMediaTypes:d.concat([...p,r,s]),image:{maxSize:10},video:{maxSize:500}}},f=["image/png","image/jpeg","image/jpg","image/heic","image/heif","image/webp"],b=[...new Set([...o,...i,...c,...l,...u,...f])]},71806:(e,t,n)=>{"use strict";n.d(t,{R:()=>i});var r=n(9818),a=n(12238),s=n(69307),o=n(42032);function i(){const{editPost:e}=(0,r.useDispatch)(a.store),t=(0,r.useSelect)((e=>{const t=e(a.store).getEditedPostAttribute("meta")||{},n=t.jetpack_publicize_feature_enabled??!0,r=t.jetpack_social_options||{};return{isPublicizeEnabled:n,jetpackSocialOptions:r,attachedMedia:r.attached_media||[],imageGeneratorSettings:r.image_generator_settings??{enabled:!1},isPostAlreadyShared:t.jetpack_social_post_already_shared??!1,shareMessage:`${t.jetpack_publicize_message||""}`.substring(0,(0,o.getShareMessageMaxLength)()),shouldUploadAttachedMedia:r.should_upload_attached_media??!1}}),[]),n=(0,s.useCallback)(((t,n)=>{e({meta:{[t]:n}})}),[e]),i=(0,s.useCallback)((()=>{n("jetpack_publicize_feature_enabled",!t.isPublicizeEnabled)}),[t.isPublicizeEnabled,n]),l=(0,s.useCallback)(((e,r)=>{n("jetpack_social_options",{...t.jetpackSocialOptions,[e]:r})}),[t.jetpackSocialOptions,n]);return(0,s.useMemo)((()=>({...t,togglePublicizeFeature:i,updateJetpackSocialOptions:l,updateMeta:n})),[t,i,l,n])}},14085:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(13419),a=n(9818),s=n(12238),o=n(71806);const i="republicize";function l(){const e=(0,r.Pb)()?.social?.sharesData??{},t=e.is_share_limit_enabled,n=(0,r.OZ)(i)?.available||t,l=(0,a.useSelect)((e=>e(s.store).isCurrentPostPublished()),[]),c=(0,r.Pb)()?.social?.publicizeConnectionsUrl??"https://wordpress.com/marketing/connections/",{isPublicizeEnabled:u,togglePublicizeFeature:d,isPostAlreadyShared:p}=(0,o.R)(),m=(0,r.X1)(i)&&!n,h=l?n:u,g=l&&m,f=l&&!n,b=!!(0,r.Pb)()?.social?.hasPaidPlan,v=!!(0,r.Pb)()?.social?.isEnhancedPublishingEnabled,k=!!(0,r.Pb)()?.social?.isAutoConversionEnabled;return{isPublicizeEnabledMeta:u,isPublicizeEnabled:h,togglePublicizeFeature:d,isPublicizeDisabledBySitePlan:g,isRePublicizeFeatureAvailable:n,isRePublicizeUpgradableViaUpsell:m,hidePublicizeFeature:f,isShareLimitEnabled:t,isPostAlreadyShared:p,numberOfSharesRemaining:e.shares_remaining,shouldShowAdvancedPlanNudge:e.show_advanced_plan_upgrade_nudge,hasPaidPlan:b,isEnhancedPublishingEnabled:v,isSocialImageGeneratorAvailable:!!(0,r.Pb)()?.social?.isSocialImageGeneratorAvailable,isSocialImageGeneratorEnabled:!!(0,r.Pb)()?.social?.isSocialImageGeneratorEnabled,connectionsAdminUrl:c+(0,r.lQ)(),adminUrl:(0,r.Pb)()?.social?.adminUrl,isAutoConversionEnabled:k,jetpackSharingSettingsUrl:(0,r.Pb)()?.social?.jetpackSharingSettingsUrl}}},6230:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(9818),a=n(69307),s=n(22552),o=n(23177);function i(){const e=(0,s.Z)(),t=(0,a.useRef)(!1),n=(0,r.useDispatch)(o.Eg).refreshAutoConversionSettings;return{refreshAutoConversionSettings:()=>{e||(t.current=!0),e&&t.current&&(n(),t.current=!1)}}}},96672:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(94333),a=n(69307),s=n(22552),o=n(37568);function i(){const e=(0,a.useRef)(!1),t=(0,s.Z)(),{refresh:n}=(0,o.Z)(),i=(0,r.useDebounce)(n,2e3);return()=>{t||(e.current=!0,i.cancel()),t&&e.current&&(i(),e.current=!1)}}},86419:(e,t,n)=>{"use strict";n.d(t,{M1:()=>i,e3:()=>l});var r=n(94333),a=n(9818),s=n(12238),o=n(69307);function i(e,t){const n=(0,a.useSelect)((e=>e(s.store).isPublishingPost()),[]),i=(0,r.usePrevious)(n);(0,o.useEffect)((()=>{i&&!n&&e()}),[n,i,e,t])}function l(e,t){const n=(0,a.useSelect)((e=>e(s.store).isPublishingPost()),[]),i=(0,r.usePrevious)(n);(0,o.useEffect)((()=>{!i&&n&&e()}),[n,i,e,t])}},34431:(e,t,n)=>{"use strict";n.d(t,{U:()=>o});var r=n(9818),a=n(65736),s=n(23177);const __=a.__,_n=a._n;function o({scheduledCountAdjustment:e=0,usedCountAdjustment:t=0}={}){return(0,r.useSelect)((n=>{const r=n(s.h),o=r.getShareLimit(),i=r.getScheduledSharesCount()+e,l=r.getSharesUsedCount()+t,c=l+i,u=r.numberOfSharesRemaining(),d=function(e){const t=Number.isFinite(e)?(0,a.sprintf)( // translators: %d: The number of shares to social media remaining -_n("You have %d auto-share remaining.","You have %d auto-shares remaining.",e,"jetpack"),e):"";return{default:"",exceeded:__("You have reached your auto-share limit. Scheduled posts will not be shared until shares become available.","jetpack"),full:__("You have reached your auto-share limit.","jetpack"),approaching:t}}(u);let p="default",m="none",h=d.default;return c>o?(p="error",m="exceeded",h=d.exceeded):c===o?(m="full",p="error",h=d.full):c>=.9*o?(m="approaching",p="error",h=d.approaching):c>=.8*o&&(m="approaching",p="warning",h=d.approaching),{status:m,noticeType:p,message:h,usedCount:l,scheduledCount:i,remainingCount:u}}),[e,t])}},45579:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(13419),a=n(86989),s=n.n(a),o=n(9818),i=n(12238),l=n(69307),c=n(65736),u=n(37568),d=n(48751);const __=c.__;function p(e){const t=e?.code,n=e?.errors?.length;if(!t&&!n)return!1;let r="";return t&&(r=__("Unable to share the Post","jetpack")),n&&(r=__("Unable to share the Post","jetpack")),{message:r,result:e}}function m(e){const{message:t}=(0,d.Z)(),{skippedConnections:n}=(0,u.Z)(),a=(0,o.useSelect)((e=>e(i.store).getCurrentPostId()),[]);e=e||a;const[c,m]=(0,l.useState)({data:[],error:{}}),h=((0,r.Pb)()?.social?.resharePath??"/wpcom/v2/posts/{postId}/publicize").replace("{postId}",e),g=(0,l.useCallback)((function(){const r={isFetching:!1,isError:!1,isSuccess:!1,data:[],error:{},postId:e};if(!c.isFetching)return m({...r,isFetching:!0}),s()({path:h,method:"POST",data:{message:t,skipped_connections:n}}).then(((e={})=>{const t=p(e);if(t)return m((e=>({...e,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:t})));m((t=>({...t,isFetching:!1,isSuccess:!0,isError:!1,data:e?.results,error:{}})))})).catch((e=>{m((t=>({...t,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:p(e)})))})),function(){m(r)}}),[e,t,n,c.isFetching,h]);return{...c,doPublicize:g}}},37568:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(9818),a=n(23177);function s(){const{refreshConnectionTestResults:e,toggleConnectionById:t}=(0,r.useDispatch)(a.h);return{...(0,r.useSelect)((e=>{const t=e(a.h),n=t.getConnections(),r=t.getEnabledConnections(),s=t.getDisabledConnections().map((e=>e.id));return{connections:n,hasConnections:n.length>0,hasEnabledConnections:r.length>0,skippedConnections:s,enabledConnections:r}}),[]),toggleById:t,refresh:e}}},48751:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(42032),a=n(71806);function s(){const{updateMeta:e,shareMessage:t}=(0,a.R)();return{message:t,maxLength:(0,r.getShareMessageMaxLength)(),updateMessage:function(t){e("jetpack_publicize_message",t)}}}},19890:(e,t,n)=>{"use strict";n.d(t,{N:()=>i});var r=n(9818),a=n(12238),s=n(23177),o=n(86419);function i(){const{mergeConnections:e}=(0,r.useDispatch)(s.h),{didPostSaveRequestSucceed:t,isCurrentPostPublished:n,getEditedPostAttribute:i}=(0,r.useSelect)((e=>e(a.store)),[]);(0,o.M1)((()=>{if(t()&&n()){const t=i("jetpack_publicize_connections");t?.length&&e(t)}}),[t,n,i])}},21052:(e,t,n)=>{"use strict";n.d(t,{Au:()=>l,Wh:()=>c,ZP:()=>u,hi:()=>i,wO:()=>o});var r=n(9818),a=n(23177),s=n(4957);const o="SET_AUTO_CONVERSION_SETTINGS";function i(){return c({isUpdating:!0})}function l(){return c({isUpdating:!1})}function c(e){return{type:o,options:e}}const u={updateAutoConversionSettings:function*(e){try{yield i(),yield c(e),yield(0,s.Fl)(e);const t=yield(0,s.wi)();return yield c(t.jetpack_social_autoconvert_images),!0}catch(e){const t=(0,r.select)(a.Eg).getAutoConversionSettings();return yield c(t),!1}finally{yield l()}},setAutoConversionSettings:c,refreshAutoConversionSettings:function*(){try{yield i();const e=yield(0,s.wi)();return yield c(e.jetpack_social_autoconvert_images),!0}catch(e){return!1}finally{yield l()}}}},23013:(e,t,n)=>{"use strict";n.r(t),n.d(t,{mergeConnections:()=>u,refreshConnectionTestResults:()=>d,setConnections:()=>l,syncConnectionsToPostMeta:()=>p,toggleConnection:()=>c,toggleConnectionById:()=>m});var r=n(13419),a=n(86989),s=n.n(a),o=n(12238),i=n(74442);function l(e){return{type:i.b,connections:e}}function c(e){return{type:i.L,connectionId:e}}function u(e){return function({dispatch:t,select:n}){const r=n.getConnections(),a=[],s={done:!1,enabled:Boolean(n.numberOfSharesRemaining()),toggleable:!0};for(const t of e){const e={...s,...r.find((e=>e.connection_id?e.connection_id===t.connection_id:e.id===t.id)),...t,is_healthy:t.test_success};a.push(e)}t(l(a))}}function d(e=!1){return async function({dispatch:t}){try{const n=(0,r.Pb)()?.social?.connectionRefreshPath||"/wpcom/v2/publicize/connection-test-results";t(u(await s()({path:n}))),e&&t(p())}catch(e){}}}function p(){return function({registry:e,select:t}){const n=t.getConnections();return e.dispatch(o.store).editPost({jetpack_publicize_connections:n})}}function m(e,t=!0){return function({dispatch:n}){n(c(e)),t&&n(p())}}},74442:(e,t,n)=>{"use strict";n.d(t,{L:()=>a,b:()=>r});const r="SET_CONNECTIONS",a="TOGGLE_CONNECTION"},54725:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(21052),a=n(23013),s=n(371),o=n(72438),i=n(4462);const l={...s.ZP,...i.ZP,...r.ZP,...o.Z,...a}},371:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>l,dz:()=>o,ff:()=>i});var r=n(9818),a=n(23177),s=n(4957);const o="SET_JETPACK_SETTINGS";function i(e){return{type:o,options:e}}const l={updateJetpackSettings:function*(e){try{yield i({is_updating:!0}),yield i(e),yield(0,s.RF)(e);const t=yield(0,s.es)();return yield i(t),!0}catch(e){const t=(0,r.select)(a.Eg).getJetpackSettings();return yield i(t),!1}finally{yield i({is_updating:!1})}},setJetpackSettings:i}},72438:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(4957),a=n(21052),s=n(4462);const o={refreshJetpackSocialSettings:function*(){try{yield(0,a.hi)(),yield(0,s.ds)();const e=yield(0,r.mu)();return yield(0,a.Wh)(e.jetpack_social_autoconvert_images),yield(0,s.ch)(e.jetpack_social_image_generator_settings),!0}catch(e){return!1}finally{yield(0,a.Au)(),yield(0,s.Gr)()}}}},4462:(e,t,n)=>{"use strict";n.d(t,{Gr:()=>l,ZP:()=>u,ch:()=>c,ds:()=>i,kg:()=>o});var r=n(9818),a=n(23177),s=n(4957);const o="SET_SOCIAL_IMAGE_GENERATOR_SETTINGS";function i(){return c({isUpdating:!0})}function l(){return c({isUpdating:!1})}function c(e){return{type:o,options:e}}const u={updateSocialImageGeneratorSettings:function*(e){try{yield i(),yield c(e),yield(0,s.Ux)(e);const t=yield(0,s.oB)();return yield c(t.jetpack_social_image_generator_settings),!0}catch(e){const t=(0,r.select)(a.Eg).getSocialImageGeneratorSettings();return yield c(t),!1}finally{yield l()}},setSocialImageGeneratorSettings:c,refreshSocialImageGeneratorSettings:function*(){try{yield i();const e=yield(0,s.oB)();return yield c(e.jetpack_social_image_generator_settings),!0}catch(e){return!1}finally{yield l()}}}},4957:(e,t,n)=>{"use strict";n.d(t,{Fl:()=>v,RF:()=>m,Ux:()=>g,ZP:()=>k,es:()=>p,mu:()=>b,oB:()=>h,wi:()=>f});var r=n(86989),a=n.n(r);const s="FETCH_JETPACK_SETTINGS",o="UPDATE_JETPACK_SETTINGS",i="FETCH_SOCIAL_IMAGE_GENERATOR_SETTINGS",l="UPDATE_SOCIAL_IMAGE_GENERATOR_SETTINGS",c="FETCH_AUTO_CONVERSION_SETTINGS",u="UPDATE_AUTO_CONVERSION_SETTINGS",d="FETCH_JETPACK_SOCIAL_SETTINGS",p=()=>({type:s}),m=e=>({type:o,settings:e}),h=()=>({type:i}),g=e=>({type:l,settings:e}),f=()=>({type:c}),b=()=>({type:d}),v=e=>({type:u,settings:e}),k={[s]:function(){return a()({path:"/jetpack/v4/social/settings"})},[o]:function(e){return a()({path:"/jetpack/v4/social/settings",method:"POST",data:e.settings})},[i]:function(){return a()({path:"/wp/v2/settings?_fields=jetpack_social_image_generator_settings"})},[l]:function(e){return a()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_image_generator_settings:e.settings}})},[c]:function(){return a()({path:"/wp/v2/settings?_fields=jetpack_social_autoconvert_images"})},[u]:function(e){return a()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_autoconvert_images:e.settings}})},[d]:function(){return a()({path:"/wp/v2/settings?_fields=jetpack_social_autoconvert_images,jetpack_social_image_generator_settings"})}}},23177:(e,t,n)=>{"use strict";n.d(t,{Bb:()=>f,Cd:()=>g,Eg:()=>c,M$:()=>p,cs:()=>h,h:()=>v,qk:()=>m,uJ:()=>d,wV:()=>b});var r=n(9818),a=n(54725),s=n(4957),o=n(45272),i=n(15781),l=n(22987);const c="jetpack-social-plugin",u={reducer:o.Z,actions:a.Z,selectors:l.Z,resolvers:i.ZP,controls:s.ZP,initialState:window?.jetpackSocialInitialState||window?.Initial_State?.socialInitialState||window?.Jetpack_Editor_Initial_State?.social||{}},d="facebook",p="instagram-business",m="linkedin",h="mastodon",g="nextdoor",f="tumblr",b="twitter",v=(0,r.createReduxStore)(c,u);(0,r.register)(v)},20750:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(21052);const a=(e={},t)=>t.type===r.wO?{...e,...t.options}:e},71837:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74442);const a=(e={},t)=>{switch(t.type){case r.b:return{...e,connections:t.connections};case r.L:return{...e,connections:e.connections.map((e=>(e.connection_id?e.connection_id===t.connectionId:e.id===t.connectionId)?{...e,enabled:!e.enabled}:e))}}return e}},45272:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(9818),a=n(20750),s=n(71837),o=n(80697),i=n(35652),l=n(28696),c=n(54489);const u=(0,r.combineReducers)({sharesData:i.Z,siteData:l.Z,connectionData:s.Z,jetpackSettings:o.Z,socialImageGeneratorSettings:c.Z,autoConversionSettings:a.Z,hasPaidPlan:(e=!1)=>e})},80697:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(371);const a=(e={},t)=>t.type===r.dz?{...e,...t.options}:e},35652:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(e={})=>e},28696:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(e={})=>e},54489:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(4462);const a=(e={},t)=>t.type===r.kg?{...e,...t.options}:e},15781:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>c});var r=n(12238),a=n(21052),s=n(23013),o=n(371),i=n(4462),l=n(4957);const c={getJetpackSettings:function*(){try{const e=yield(0,l.es)();if(e)return(0,o.ff)(e)}catch(e){console.log(e)}},getSocialImageGeneratorSettings:function*(){try{const e=yield(0,l.oB)();if(e)return(0,i.ch)(e.jetpack_social_image_generator_settings)}catch(e){console.log(e)}},getAutoConversionSettings:function*(){try{const e=yield(0,l.wi)();if(e)return(0,a.Wh)(e.jetpack_social_autoconvert_images)}catch(e){console.log(e)}},getConnections:function(){return function({dispatch:e,registry:t}){const n=t.select(r.store).getEditedPostAttribute("jetpack_publicize_connections");e((0,s.setConnections)(n||[]))}}}},68113:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getAutoConversionSettings:e=>e.autoConversionSettings,isAutoConversionAvailable:e=>e.autoConversionSettings.available,isAutoConversionEnabled:e=>e.autoConversionSettings.available&&e.autoConversionSettings.enabled,isAutoConversionSettingsUpdating:e=>e.autoConversionSettings.isUpdating}},43354:(e,t,n)=>{"use strict";function r(e){return e.connectionData?.connections??[]}function a(e){return e.connectionData?.adminUrl??null}function s(e){return r(e).length>0}function o(e){return r(e).filter((e=>!1===e.test_success))}function i(e){return r(e).filter((e=>"must_reauth"===e.test_success)).map((e=>e.service_name))}function l(e){return r(e).filter((e=>e.enabled))}function c(e){return r(e).filter((e=>!e.enabled))}function u(e,t,{forceDefaults:n=!1}={}){let a="",s="",o="";if(!n){const n=r(e).find((({service_name:e})=>t===e));if(n){const{display_name:e,profile_display_name:r,profile_picture:i}=n;a="twitter"===t?r:e,o="twitter"===t?e:n.username,s=i}}return{displayName:a,profileImage:s,username:o}}n.r(t),n.d(t,{getConnectionProfileDetails:()=>u,getConnections:()=>r,getConnectionsAdminUrl:()=>a,getDisabledConnections:()=>c,getEnabledConnections:()=>l,getFailedConnections:()=>o,getMustReauthConnections:()=>i,hasConnections:()=>s})},22987:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(68113),a=n(43354),s=n(82836),o=n(31473),i=n(85675),l=n(45073);const c={...i.Z,...a,...s.Z,...o,...l.Z,...r.Z}},82836:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getJetpackSettings:e=>e.jetpackSettings,isModuleEnabled:e=>e.jetpackSettings.publicize_active,showPricingPage:e=>e.jetpackSettings.show_pricing_page,isUpdatingJetpackSettings:e=>e.jetpackSettings.is_updating,hasPaidPlan:e=>!(e.jetpackSettings?.showNudge??1),isEnhancedPublishingEnabled:e=>e.jetpackSettings?.isEnhancedPublishingEnabled??!1,getDismissedNotices:e=>e.jetpackSettings?.dismissedNotices}},31473:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getScheduledSharesCount:()=>l,getShareLimit:()=>o,getSharedPostsCount:()=>u,getSharesUsedCount:()=>i,getTotalSharesCount:()=>c,isShareLimitEnabled:()=>a,numberOfSharesRemaining:()=>p,shouldShowAdvancedPlanNudge:()=>d,showShareLimits:()=>s});var r=n(82836);function a(e){return e.sharesData?.is_share_limit_enabled??!1}function s(e){return!r.Z.hasPaidPlan(e)&&!e.hasPaidPlan&&a(e)}function o(e){return e.sharesData?.share_limit??30}function i(e){return e.sharesData?.publicized_count??0}function l(e){return e.sharesData?.to_be_publicized_count??0}function c(e){const t=i(e)+l(e);return Math.max(t,0)}function u(e){return e.sharesData?.shared_posts_count??0}function d(e){return e.sharesData?.show_advanced_plan_upgrade_nudge??!1}function p(e,t={}){if(!s(e))return 1/0;const{includeScheduled:n}={includeScheduled:!0,...t},r=i(e),a=o(e),c=n?l(e):0;return Math.max(a-r-c,0)}},85675:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getAdminUrl:e=>e.siteData?.adminUrl??null,getAPIRootUrl:e=>e.siteData?.apiRoot??null,getAPINonce:e=>e.siteData?.apiNonce??null,getRegistrationNonce:e=>e.siteData?.registrationNonce??null,getSiteSuffix:e=>e.siteData?.siteSuffix??null,getBlogID:e=>e.siteData?.blogID??null,getPluginVersion:e=>e.siteData?.pluginVersion??null}},45073:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getSocialImageGeneratorSettings:e=>e.socialImageGeneratorSettings,isSocialImageGeneratorAvailable:e=>e.socialImageGeneratorSettings.available,isSocialImageGeneratorEnabled:e=>e.socialImageGeneratorSettings.enabled,isUpdatingSocialImageGeneratorSettings:e=>e.socialImageGeneratorSettings.isUpdating,getSocialImageGeneratorDefaultTemplate:e=>e.socialImageGeneratorSettings.template}},5463:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r=255;function a(){return r}},12677:(e,t,n)=>{"use strict";n.d(t,{h:()=>a});var r=n(13419);function a(){return(0,r.Pb)()?.social?.supportedAdditionalConnections||[]}},42032:(e,t,n)=>{"use strict";n.d(t,{getShareMessageMaxLength:()=>r.A,getSupportedAdditionalConnections:()=>a.h});var r=n(5463),a=n(12677),s=n(581);n.o(s,"useSyncPostDataToStore")&&n.d(t,{useSyncPostDataToStore:function(){return s.useSyncPostDataToStore}})},581:()=>{},13419:(e,t,n)=>{"use strict";n.d(t,{Dp:()=>u.Z,FK:()=>c.FK,HD:()=>c.HD,M6:()=>s.M6,OZ:()=>o.Z,Pb:()=>r.Z,Pm:()=>m.Z,Qq:()=>c.Qq,Rl:()=>c.Rl,T:()=>l.Z,Ug:()=>s.Ug,Wp:()=>s.Wp,X1:()=>c.X1,_D:()=>c._D,aQ:()=>s.aQ,dM:()=>h.d,el:()=>p.Z,lQ:()=>a.Z,lt:()=>h.l,m3:()=>c.m3,o_:()=>i.Z,og:()=>g.Z,z$:()=>d.Z});var r=n(50148),a=n(35004),s=n(99505),o=n(48052),i=n(76714),l=n(80354),c=n(75404),u=n(68586),d=n(61053),p=n(11380),m=n(6342),h=n(96959),g=n(19499);n(39058)},6342:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(78868),a=n(99196),s=n.n(a);const o=()=>s().createElement(r.Z,{className:"jetpack-editor-panel-logo",height:16,logoColor:"#1E1E1E",showText:!1})},96959:(e,t,n)=>{"use strict";n.d(t,{d:()=>s,l:()=>o});var r=n(69307),a=n(12953);function s(e){const t={};let n="span",a=e.icon;const s=document.createElement("div");s.innerHTML=e.icon;const o=s.querySelector("svg");return o&&(n="svg",a=o.innerHTML,Array.from(o.attributes).forEach((({nodeName:e,nodeValue:n})=>t[e]=n))),(0,r.createElement)(n,{...t,dangerouslySetInnerHTML:{__html:a||""}})}function o(e){return{src:s(e),foreground:(0,a.Z)()}}},12953:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(99505);const a="#069e08";function s(){return(0,r.Ug)()||(0,r.Wp)()?null:a}},19499:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(50148);function a(){const e=(0,r.Z)();return e?.blocks_variation??"production"}},50148:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r="Jetpack_Editor_Initial_State";function a(){return"object"==typeof window?window?.[r]??null:null}},48052:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(50148);function a(e){const t=(0,r.Z)(),n=t?.available_blocks?.[e]?.available??!1,a=t?.available_blocks?.[e]?.unavailable_reason??"unknown";return{available:n,...!n&&{details:t?.available_blocks?.[e]?.details??[],unavailableReason:a}}}},35004:(e,t,n)=>{"use strict";function r(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:null}n.d(t,{Z:()=>r})},61053:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(6975),a=n(31294),s=n(69307);const{tracks:o}=r.Z,{recordEvent:i}=o,l=({pageViewEventName:e=null,pageViewNamespace:t="jetpack",pageViewSuffix:n="page_view",pageViewEventProperties:l={}}={})=>{const[c,u]=(0,s.useState)(!1),{isUserConnected:d,isRegistered:p,userConnectionData:m={}}=(0,a.Z)(),{wpcomUser:{login:h,ID:g}={},blogId:f}=m.currentUser||{},b=(0,s.useCallback)((async(e,t={})=>{d&&g&&h&&i(e,t)}),[d,g,h]);return(0,s.useEffect)((()=>{d&&g&&h&&f&&r.Z.initialize(g,h,{blog_id:f})}),[f,g,h,d]),(0,s.useEffect)((()=>{const r=e?`${t}_${e}_${n}`:null;p&&r&&(c||(b(r,l),u(!0)))}),[c,t,e,n,p,l,b]),{recordEvent:b,tracks:o}}},11380:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9818),a=n(69307),s=n(39058);const o=e=>{const{isModuleActive:t,isChangingStatus:n,isLoadingModules:o}=(0,r.useSelect)((t=>{const n=t(s.p);return{isModuleActive:n.isModuleActive(e),isChangingStatus:n.isModuleUpdating(e),isLoadingModules:n.areModulesLoading(e)}}),[s.p]),{updateJetpackModuleStatus:i}=(0,r.useDispatch)(s.p),l=(0,a.useCallback)((t=>i({name:e,active:t})),[e,i]);return(0,a.useMemo)((()=>({isLoadingModules:o,isChangingStatus:n,isModuleActive:t,changeStatus:l})),[o,n,t,l])}},68586:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(50148);function a(){return(0,r.Z)()?.jetpack?.is_current_user_connected??!1}},44166:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>p,rW:()=>d});var r=n(9818),a=n(99505),s=n(82162),o=n(39058);const i="SET_JETPACK_MODULES",l="SET_MODULE_UPDATING";function c(e){return d({isLoading:e})}function u(e,t){return{type:l,name:e,isUpdating:t}}function d(e){return{type:i,options:e}}const p={updateJetpackModuleStatus:function*(e){try{yield u(e.name,!0),yield(0,s.zL)(e);const t=yield(0,s.Bs)();return yield d({data:t}),!0}catch(e){const t=(0,r.select)(o.p).getJetpackModules();return yield d(t),!1}finally{yield u(e.name,!1)}},setJetpackModules:d,fetchModules:function*(){if((0,a.Wp)())return!0;try{yield c(!0);const e=yield(0,s.Bs)();return yield d({data:e}),!0}catch(e){const t=(0,r.select)(o.p).getJetpackModules();return yield d(t),!1}finally{yield c(!1)}}}},82162:(e,t,n)=>{"use strict";n.d(t,{Bs:()=>i,ZP:()=>c,zL:()=>l});var r=n(86989),a=n.n(r);const s="FETCH_JETPACK_MODULES",o="UPDATE_JETPACK_MODULE_STATUS",i=()=>({type:s}),l=e=>({type:o,settings:e}),c={[s]:function(){return a()({path:"/jetpack/v4/module/all",method:"GET"})},[o]:function({settings:e}){return a()({path:`/jetpack/v4/module/${e.name}/active`,method:"POST",data:{active:e.active}})}}},39058:(e,t,n)=>{"use strict";n.d(t,{p:()=>c});var r=n(9818),a=n(44166),s=n(82162),o=n(42469),i=n(55133),l=n(43524);const c="jetpack-modules",u=(0,r.createReduxStore)(c,{reducer:o.Z,actions:a.ZP,controls:s.ZP,resolvers:i.Z,selectors:l.Z});(0,r.register)(u);const d=window?.Initial_State?.getModules||window?.Jetpack_Editor_Initial_State?.modules||null;null!==d&&(0,r.dispatch)(c).setJetpackModules({data:{...d}})},42469:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r={isLoading:!1,isUpdating:{},data:{}},a=(e=r,t)=>{switch(t.type){case"SET_JETPACK_MODULES":return{...e,...t.options};case"SET_MODULE_UPDATING":return{...e,isUpdating:{...e.isUpdating,[t.name]:t.isUpdating}}}return e}},55133:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(44166),a=n(82162);const s={getJetpackModules:function*(){try{const e=yield(0,a.Bs)();if(e)return(0,r.rW)({data:e})}catch(e){console.error(e)}}}},43524:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(99505);const a={getJetpackModules:e=>e.data,isModuleActive:(e,t)=>(0,r.Wp)()||(e?.data?.[t]?.activated??!1),areModulesLoading:e=>e.isLoading??!1,isModuleUpdating:(e,t)=>e?.isUpdating?.[t]??!1}},75404:(e,t,n)=>{"use strict";n.d(t,{FK:()=>g,HD:()=>f,Qq:()=>u,Rl:()=>m,X1:()=>d,_D:()=>p,m3:()=>b});var r=n(65736),a=n(96483),s=n(92819),o=n(50148),i=n(48052),l=n(35004),c=n(99505);const __=r.__;function u({planSlug:e,plan:t,postId:n,postType:r}){const o=(0,s.startsWith)(e,"jetpack_")?e:(0,s.get)(t,["path_slug"]),i=(void 0===r?()=>{const e=new URLSearchParams(window.location.search);return(0,a.addQueryArgs)(window.location.protocol+`//${(0,l.Z)().replace("::","/")}/wp-admin/site-editor.php`,{postId:e.get("postId"),postType:e.get("postType"),plan_upgraded:1})}:()=>{const e=["page","post"].includes(r)?"":"edit";return(0,c.Wp)()?(0,a.addQueryArgs)("/"+(0,s.compact)([e,r,(0,l.Z)(),n]).join("/"),{plan_upgraded:1}):(0,a.addQueryArgs)(window.location.protocol+`//${(0,l.Z)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:n,plan_upgraded:1})})();return(0,c.Ug)()?(0,a.addQueryArgs)(`https://wordpress.com/plans/${(0,l.Z)()}`,{redirect_to:i,customerType:"business"}):o&&(0,a.addQueryArgs)(`https://wordpress.com/checkout/${(0,l.Z)()}/${o}`,{redirect_to:i})}function d(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{available:n,unavailableReason:r}=(0,i.Z)(t);return!n&&"missing_plan"===r}function p(e,t){return"missing_plan"===e&&t.required_plan}function m(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{details:n,unavailableReason:r}=(0,i.Z)(t);return p(r,n)}const h=[{name:"core/cover",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"video",description:__("Upgrade your plan to use video covers","jetpack")},{name:"core/audio",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"audio",description:__("Upgrade your plan to upload audio","jetpack")}];function g(){return(0,s.get)((0,o.Z)(),"jetpack.enable_upgrade_nudge",!1)}const f=e=>(0,s.map)(h,"name").includes(e),b=e=>(0,s.head)((0,s.filter)(h,(({name:t})=>t===e)))},76714:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(98817),a=n(48052);function s(e,t){const{available:n,unavailableReason:s}=(0,a.Z)(e);return!!n&&(0,r.registerPlugin)(`jetpack-${e}`,t)}},99505:(e,t,n)=>{"use strict";n.d(t,{M6:()=>i,Ug:()=>o,Wp:()=>s,aQ:()=>l});var r=n(50148);function a(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function s(){return"simple"===a()}function o(){return"atomic"===a()}function i(){const e=(0,r.Z)();return e?.jetpack?.is_private_site??!1}function l(){const e=(0,r.Z)();return e?.jetpack?.is_coming_soon??!1}},80354:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(82674),a=n.n(r),s=n(94333);const o=e=>(0,s.createHigherOrderComponent)((t=>n=>React.createElement(t,a()({},n,{className:n.name===e?"has-warning is-interactive":n.className}))),"withHasWarningIsInteractiveClassNames")},83059:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>j});var r=n(51806),a=n(42290),s=n(13419),o=n(4981),i=n(55609),l=n(9818),c=n(69307),u=n(65736),d=n(586),p=n(3639),m=n(92710),h=n(58532),g=n(51128),f=n.n(g),b=(n(99196),n(49259)),v=n(63634),k=n(854),y=n(6747),w=n(81612),E=n(27298);const __=u.__,_=f()("jetpack-ai-assistant:dropdown"),C=[{name:__("Correct spelling and grammar","jetpack"),key:"correct-spelling",aiSuggestion:v.Hd,icon:d.Z},{name:__("Simplify","jetpack"),key:"simplify",aiSuggestion:v.hI,icon:p.Z},{name:__("Summarize","jetpack"),key:"summarize",aiSuggestion:v.Lq,icon:m.Z},{name:__("Expand","jetpack"),key:"make-longer",aiSuggestion:v.TV,icon:h.Z}];function x(e){return e.filter((e=>null!=e)).map((e=>(0,o.getBlockContent)(e))).join("\n\n")}function S({onClose:e,blockType:t}){const[n,o]=(0,c.useState)(!1),{getSelectedBlockClientIds:u,getBlocksByClientId:d}=(0,l.useSelect)("core/block-editor"),{removeBlocks:p,replaceBlock:m}=(0,l.useDispatch)("core/block-editor");(0,c.useEffect)((()=>{const e=u(),t=x(d(e)),n=(0,k.t$)(t);return o(!n.length)}),[d,u]);const{tracks:h}=(0,s.z$)(),g=(n,r={})=>{const a=u(),s=d(a),o=x(s);e(),_("requestSuggestion",n,r),h.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:n,block_type:t});const[i]=s,[l,...c]=a,g={...i?.attributes||{},content:o},f=(0,y.b)(t,g),v={clientId:l,type:n,options:{...r,contentType:"generated",fromExtension:!0}};localStorage.setItem((0,b.$M)(f.clientId),JSON.stringify(v)),m(l,f),p(c)};return(0,r.createElement)(r.Fragment,null,n&&(0,r.createElement)(i.Notice,{status:"warning",isDismissible:!1,className:"jetpack-ai-assistant__info"},__("Add content to activate the tools below","jetpack")),(0,r.createElement)(i.MenuGroup,null,(0,r.createElement)(i.MenuItem,{icon:a.u_,iconPosition:"left",key:"key-ai-assistant",onClick:()=>{const e=u(),n=d(e),r=x(n),[a,...s]=e,[o]=n,i={...o?.attributes||{},content:r};m(a,(0,y.b)(t,i)),p(s),h.recordEvent("jetpack_ai_assistant_prompt_show",{block_type:t})},disabled:n},(0,r.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},__("Ask AI Assistant","jetpack"))),C.map((e=>(0,r.createElement)(i.MenuItem,{icon:e?.icon,iconPosition:"left",key:`key-${e.key}`,onClick:()=>{g(e.aiSuggestion,{})},disabled:n},(0,r.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},e.name)))),(0,r.createElement)(E.IP,{onChange:e=>{g(v.Lg,{tone:e})},disabled:n}),(0,r.createElement)(w.xK,{onChange:e=>{g(v.Nw,{language:e})},disabled:n})))}function j({blockType:e}){const{tracks:t}=(0,s.z$)();return(0,r.createElement)(i.Dropdown,{popoverProps:{variant:"toolbar"},renderToggle:({isOpen:e,onToggle:t})=>(0,r.createElement)(i.ToolbarButton,{className:"jetpack-ai-assistant__button",showTooltip:!0,onClick:t,"aria-haspopup":"true","aria-expanded":e,label:__("AI Assistant","jetpack"),icon:a.u_}),onToggle:n=>{n&&t.recordEvent("jetpack_ai_assistant_extension_toolbar_menu_show",{block_type:e})},renderContent:({onClose:t})=>(0,r.createElement)(S,{onClose:t,blockType:e})})}},3180:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(65736),s=n(26546),o=n(46867);const __=a.__,i=()=>{const e=`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/connection`,{autosaveAndRedirect:t,isRedirecting:n}=(0,o.Z)(e);return(0,r.createElement)(s.p,{buttonText:__("Reconnect Jetpack","jetpack"),checkoutUrl:e,className:"jetpack-ai-connect-banner",description:__("Your account is not connected to Jetpack at the moment.","jetpack"),goToCheckoutPage:e=>{t(e)},isRedirecting:n,visible:!0,align:null,title:null,context:null})}},87445:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(6895),s=n(55609),o=n(65736);const __=o.__;const i=function(){const e=(0,a.Z)("jetpack-ai-feedback");return(0,r.createElement)("div",{className:"jetpack-ai-feedback-control"},(0,r.createElement)(s.BaseControl,{label:__("Feedback","jetpack")},(0,r.createElement)("p",null,__("Your feedback is valuable in our commitment to refine and improve this feature.","jetpack")),(0,r.createElement)(s.ExternalLink,{href:e},__("Share your feedback","jetpack"))))}},81612:(e,t,n)=>{"use strict";n.d(t,{QA:()=>h,ZP:()=>f,xK:()=>b});var r=n(51806),a=n(13419),s=n(55609),o=n(65736),i=n(61074),l=n(46936),c=n(43618);n(99196);const __=o.__,u=["en","es","fr","de","it","pt","ru","zh","ja","ar","hi","ko"],d=window?.Jetpack_Editor_Initial_State?.siteLocale||navigator?.language,p=__("Translate","jetpack"),m=d?.split("-")[0]||"en",h=(d?.split("-"),{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")},id:{label:__("Indonesian","jetpack")},tl:{label:__("Filipino","jetpack")},vi:{label:__("Vietnamese","jetpack")}}),g=({value:e,onChange:t})=>{const n=[...u.filter((e=>e!==m))];return u.includes(m)&&n.unshift(m),(0,r.createElement)(s.MenuGroup,{label:__("Select language","jetpack")},n.map((n=>(0,r.createElement)(s.MenuItem,{key:`key-${n}`,onClick:()=>t(n+" ("+h[n].label+")"),isSelected:e===n},h[n].label))))};function f({value:e=m,label:t=p,onChange:n,disabled:o=!1}){const{tracks:l}=(0,a.z$)();return o?(0,r.createElement)(s.Tooltip,{text:t},(0,r.createElement)(s.Button,{disabled:!0},(0,r.createElement)(i.Z,{icon:c.Z}))):(0,r.createElement)(s.ToolbarDropdownMenu,{icon:c.Z,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&l.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"i18n"})}},(()=>(0,r.createElement)(g,{value:e,onChange:n})))}function b({value:e=m,label:t=p,onChange:n,disabled:a=!1}){return(0,r.createElement)(s.DropdownMenu,{className:"ai-assistant__i18n-dropdown",icon:c.Z,label:t,toggleProps:{children:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"ai-assistant__i18n-dropdown__toggle-label"},t),(0,r.createElement)(i.Z,{icon:l.Z})),disabled:a}},(({onClose:t})=>(0,r.createElement)(g,{onChange:e=>{n(e),t()},value:e})))}},50297:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(51806),a=n(55609),s=n(65736);const __=s.__,o=({image:e,inModal:t=!1,saveImage:n,setImageModal:s})=>(0,r.createElement)(a.Flex,{direction:"column"},t&&(0,r.createElement)(a.FlexItem,{style:{textAlign:"center"}},(0,r.createElement)(a.Button,{variant:"primary",onClick:()=>n(e)},__("Use this image","jetpack"))),(0,r.createElement)(a.FlexBlock,null,(0,r.createElement)("input",{type:"image",className:"wp-block-ai-image-image",src:e,alt:"",onClick:()=>s(e)})),!t&&(0,r.createElement)(a.FlexBlock,null,(0,r.createElement)(a.Flex,{direction:"column",style:{alignItems:"center"}},(0,r.createElement)(a.FlexItem,null,(0,r.createElement)(a.Button,{variant:"primary",onClick:()=>n(e)},__("Use this image","jetpack"))))))},24404:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>g});var r=n(51806),a=n(13419),s=n(55609),o=n(65736),i=n(77840);n(99196);const __=o.__,l="make-longer",c="makeLonger",u="make-shorter",d="makeShorter",p="summarize",m="summarize",h=[{name:__("Summarize","jetpack"),key:p,aiSuggestion:m},{name:__("Make longer","jetpack"),key:l,aiSuggestion:c},{name:__("Make shorter","jetpack"),key:u,aiSuggestion:d}];function g({key:e,label:t=__("Improve","jetpack"),exclude:n=[],onChange:o,disabled:l=!1}){const{tracks:c}=(0,a.z$)();return l?(0,r.createElement)(s.Tooltip,{text:t},(0,r.createElement)(s.Button,{disabled:!0},(0,r.createElement)(s.Icon,{icon:i.Z}))):(0,r.createElement)(s.ToolbarDropdownMenu,{icon:i.Z,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&c.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"improve"})}},(()=>{const a=h.filter((e=>!n.includes(e.key)));return(0,r.createElement)(s.MenuGroup,{label:t},a.map((t=>(0,r.createElement)(s.MenuItem,{key:`key-${t.key}`,onClick:()=>o(t.aiSuggestion,{contentType:"generated"}),isSelected:e===t.key},t.name))))}))}},85642:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>g});var r=n(51806),a=n(13419),s=n(55609),o=n(65736),i=n(77840),l=n(58532),c=n(586),u=n(3639),d=n(92710),p=n(32677);n(99196);const __=o.__,m=[{label:__("Post about…","jetpack"),description:{original:"Write a post about ",translated:__("Write a post about ","jetpack")}},{label:__("Informative article on…","jetpack"),description:{original:"Craft an informative article explaining ",translated:__("Craft an informative article explaining ","jetpack")}},{label:__("Step-by-step tutorial on…","jetpack"),description:{original:"Write a step-by-step tutorial on ",translated:__("Write a step-by-step tutorial on ","jetpack")}},{label:__("Motivational post on…","jetpack"),description:{original:"Create a motivational post on ",translated:__("Create a motivational post on ","jetpack")}}],h=[{label:__("Say it differently…","jetpack"),description:{original:"Rewrite it in a way that ",translated:__("Rewrite it in a way that ","jetpack")}},{label:__("Add…","jetpack"),description:{original:"Add more details about ",translated:__("Add more details about ","jetpack")}},{label:__("Remove…","jetpack"),description:{original:"Remove unnecessary details about ",translated:__("Remove unnecessary details about ","jetpack")}}];function g({hasContentBefore:e,hasContent:t,hasPostTitle:n,contentIsLoaded:o,onPromptSelect:g,onSuggestionSelect:f}){const b=__("Write with AI…","jetpack"),{tracks:v}=(0,a.z$)();return(0,r.createElement)(s.ToolbarDropdownMenu,{className:"jetpack-ai-assistant__templates-control",icon:null,label:b,text:b,onToggle:e=>{e&&v.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"write-with-ai"})}},(({onClose:a})=>o?(0,r.createElement)(s.MenuGroup,{label:__("Write…","jetpack")},h.map(((e,t)=>(0,r.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",key:`key-${t}`,onClick:()=>{a(),g(e.description)}},e.label)))):(0,r.createElement)(r.Fragment,null,e&&(0,r.createElement)(s.MenuGroup,{label:__("Based on preceding content…","jetpack")},(0,r.createElement)(s.MenuItem,{icon:l.Z,iconPosition:"left",onClick:()=>f("continue")},__("Continue writing","jetpack")),(0,r.createElement)(s.MenuItem,{icon:c.Z,iconPosition:"left",onClick:()=>f("correctSpelling")},__("Correct spelling and grammar","jetpack")),(0,r.createElement)(s.MenuItem,{icon:u.Z,iconPosition:"left",onClick:()=>f("simplify")},__("Simplify","jetpack"))),t&&(0,r.createElement)(s.MenuGroup,{label:__("Based on entire content…","jetpack")},t&&(0,r.createElement)(s.MenuItem,{icon:d.Z,iconPosition:"left",onClick:()=>f("summarize")},__("Summarize","jetpack")),t&&(0,r.createElement)(s.MenuItem,{icon:p.Z,iconPosition:"left",onClick:()=>f("generateTitle")},__("Generate a post title","jetpack"))),(0,r.createElement)(s.MenuGroup,{label:__("Write…","jetpack")},n&&(0,r.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",onClick:()=>f("titleSummary")},__("Summary based on title","jetpack")),m.map(((e,t)=>(0,r.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",key:`key-${t}`,onClick:()=>{a(),g(e.description)}},e.label)))))))}},27298:(e,t,n)=>{"use strict";n.d(t,{IP:()=>m,Nj:()=>u,ZP:()=>h,bu:()=>d});var r=n(51806),a=n(42290),s=n(13419),o=n(55609),i=n(65736),l=n(46936);n(99196);const __=i.__,c=["formal","informal","optimistic","humorous","serious","skeptical","empathetic","confident","passionate","provocative"],u="formal",d={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:"🔥"}},p=({value:e,onChange:t})=>(0,r.createElement)(o.MenuGroup,{label:__("Select tone","jetpack")},c.map((n=>(0,r.createElement)(o.MenuItem,{key:`key-${n}`,onClick:()=>t(n),isSelected:e===n},`${d[n].emoji} ${d[n].label}`))));function m({label:e=__("Change tone","jetpack"),value:t=u,onChange:n,disabled:s=!1}){return(0,r.createElement)(o.DropdownMenu,{icon:a.v_,label:e,className:"ai-assistant__tone-dropdown",popoverProps:{variant:"toolbar"},toggleProps:{children:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"ai-assistant__tone-dropdown__toggle-label"},e),(0,r.createElement)(o.Icon,{icon:l.Z})),disabled:s}},(({onClose:e})=>(0,r.createElement)(p,{value:t,onChange:t=>{n(t),e()}})))}function h({value:e=u,onChange:t,disabled:n=!1}){const i=__("Change tone","jetpack"),{tracks:l}=(0,s.z$)();return n?(0,r.createElement)(o.Tooltip,{text:i},(0,r.createElement)(o.Button,{disabled:!0},(0,r.createElement)(o.Icon,{icon:a.v_}))):(0,r.createElement)(o.ToolbarDropdownMenu,{icon:a.v_,label:i,popoverProps:{variant:"toolbar"},disabled:n,onToggle:e=>{e&&l.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"tone"})}},(()=>(0,r.createElement)(p,{value:e,onChange:t})))}},4965:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(51806),a=n(52175),s=n(55609),o=n(65736),i=n(79201),l=n(48381),c=(n(75022),n(63634)),u=n(81612),d=n(24404),p=n(85642),m=n(27298);const __=o.__,h=({contentIsLoaded:e,getSuggestionFromOpenAI:t,retryRequest:n,handleAcceptContent:o,handleImageRequest:h,handleTryAgain:g,showRetry:f,contentBefore:b,hasPostTitle:v,wholeContent:k,setUserPrompt:y,recordEvent:w,isGeneratingTitle:E})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.BlockControls,null,!f&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.ToolbarGroup,null,(0,r.createElement)(p.ZP,{hasContentBefore:!!b?.length,hasContent:!!k?.length,hasPostTitle:v,contentIsLoaded:e,onPromptSelect:e=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"prompt-template",prompt:e.original}),y(e.translated)},onSuggestionSelect:e=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:e}),t(e)}})),(0,r.createElement)(a.BlockControls,{group:"block"},(0,r.createElement)(m.ZP,{value:"neutral",onChange:n=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:c.Lg}),t(c.Lg,{tone:n,contentType:e?"generated":null})},disabled:!e&&!k?.length}),(0,r.createElement)(u.ZP,{value:"en",onChange:n=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:c.Nw}),t(c.Nw,{language:n,contentType:e?"generated":null})},disabled:!e&&!k?.length}),(0,r.createElement)(d.ZP,{onChange:t,exclude:E?["summarize"]:[],disabled:!e}))),(f||g)&&(0,r.createElement)(s.ToolbarGroup,null,!f&&e&&g&&(0,r.createElement)(s.ToolbarButton,{onClick:g},__("Try Again","jetpack")),f&&e&&(0,r.createElement)(s.ToolbarButton,{icon:i.Z,onClick:o},__("Accept","jetpack")),f&&(0,r.createElement)(s.ToolbarButton,{icon:l.Z,onClick:n},__("Retry","jetpack"))),false))},5246:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(51806),a=n(6895),s=n(13419),o=n(69307),i=n(65736),l=n(51128),c=n.n(l),u=n(99196),d=n(26546),p=n(23795),m=n(63206),h=n(18135),g=n(71449);const __=i.__,f=c()("jetpack-ai-assistant:upgrade-prompt"),b=e=>{const{upgradeType:t}=(0,h.Z)();return"vip"===t?(0,r.createElement)(d.p,{buttonText:null,checkoutUrl:null,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. Please reach out to your VIP account team.","jetpack"),{strong:(0,r.createElement)("strong",null)}),goToCheckoutPage:null,isRedirecting:null,visible:!0,align:null,title:null,context:null}):(({placement:e=null})=>{const{checkoutUrl:t,autosaveAndRedirect:n,isRedirecting:l}=(0,m.Z)(),c=(0,g.d)(),{nextTier:b,tierPlansEnabled:v,currentTier:k,requestsCount:y,usagePeriod:w}=(0,h.Z)(),E=(0,p.U_)(k)===p.dt?w?.requestsCount:y,{tracks:_}=(0,s.z$)(),C=(0,u.useCallback)((t=>{f("upgrade",e),_.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:k?.slug,requests_count:E,placement:e}),n(t)}),[n,k,E,_,e]),x=(0,u.useCallback)((()=>{f("contact us",e),_.recordEvent("jetpack_ai_upgrade_contact_us",{placement:e})}),[_,e]);if(!c)return(0,r.createElement)(d.p,{showButton:!1,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! Reach out to the site administrator to upgrade and keep using Jetpack AI.","jetpack"),{strong:(0,r.createElement)("strong",null)}),visible:!0,align:null,title:null,context:null});if(v){if(!b){const e=(0,a.Z)("jetpack-ai-tiers-more-requests-contact");return(0,r.createElement)(d.p,{buttonText:__("Contact Us","jetpack"),description:__("You have reached the request limit for your current plan.","jetpack"),className:"jetpack-ai-upgrade-banner",checkoutUrl:e,visible:!0,align:null,title:null,context:null,goToCheckoutPage:x})}return(0,r.createElement)(d.p,{buttonText:(0,i.sprintf)(/* Translators: number of requests */ +_n("You have %d auto-share remaining.","You have %d auto-shares remaining.",e,"jetpack"),e):"";return{default:"",exceeded:__("You have reached your auto-share limit. Scheduled posts will not be shared until shares become available.","jetpack"),full:__("You have reached your auto-share limit.","jetpack"),approaching:t}}(u);let p="default",m="none",h=d.default;return c>o?(p="error",m="exceeded",h=d.exceeded):c===o?(m="full",p="error",h=d.full):c>=.9*o?(m="approaching",p="error",h=d.approaching):c>=.8*o&&(m="approaching",p="warning",h=d.approaching),{status:m,noticeType:p,message:h,usedCount:l,scheduledCount:i,remainingCount:u}}),[e,t])}},45579:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(13419),a=n(86989),s=n.n(a),o=n(9818),i=n(12238),l=n(69307),c=n(65736),u=n(37568),d=n(48751);const __=c.__;function p(e){const t=e?.code,n=e?.errors?.length;if(!t&&!n)return!1;let r="";return t&&(r=__("Unable to share the Post","jetpack")),n&&(r=__("Unable to share the Post","jetpack")),{message:r,result:e}}function m(e){const{message:t}=(0,d.Z)(),{skippedConnections:n}=(0,u.Z)(),a=(0,o.useSelect)((e=>e(i.store).getCurrentPostId()),[]);e=e||a;const[c,m]=(0,l.useState)({data:[],error:{}}),h=((0,r.Pb)()?.social?.resharePath??"/wpcom/v2/posts/{postId}/publicize").replace("{postId}",e),g=(0,l.useCallback)((function(){const r={isFetching:!1,isError:!1,isSuccess:!1,data:[],error:{},postId:e};if(!c.isFetching)return m({...r,isFetching:!0}),s()({path:h,method:"POST",data:{message:t,skipped_connections:n}}).then(((e={})=>{const t=p(e);if(t)return m((e=>({...e,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:t})));m((t=>({...t,isFetching:!1,isSuccess:!0,isError:!1,data:e?.results,error:{}})))})).catch((e=>{m((t=>({...t,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:p(e)})))})),function(){m(r)}}),[e,t,n,c.isFetching,h]);return{...c,doPublicize:g}}},37568:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(9818),a=n(23177);function s(){const{refreshConnectionTestResults:e,toggleConnectionById:t}=(0,r.useDispatch)(a.h);return{...(0,r.useSelect)((e=>{const t=e(a.h),n=t.getConnections(),r=t.getEnabledConnections(),s=t.getDisabledConnections().map((e=>e.id));return{connections:n,hasConnections:n.length>0,hasEnabledConnections:r.length>0,skippedConnections:s,enabledConnections:r}}),[]),toggleById:t,refresh:e}}},48751:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(42032),a=n(71806);function s(){const{updateMeta:e,shareMessage:t}=(0,a.R)();return{message:t,maxLength:(0,r.getShareMessageMaxLength)(),updateMessage:function(t){e("jetpack_publicize_message",t)}}}},19890:(e,t,n)=>{"use strict";n.d(t,{N:()=>i});var r=n(9818),a=n(12238),s=n(23177),o=n(86419);function i(){const{mergeConnections:e}=(0,r.useDispatch)(s.h),{didPostSaveRequestSucceed:t,isCurrentPostPublished:n,getEditedPostAttribute:i}=(0,r.useSelect)((e=>e(a.store)),[]);(0,o.M1)((()=>{if(t()&&n()){const t=i("jetpack_publicize_connections");t?.length&&e(t)}}),[t,n,i])}},21052:(e,t,n)=>{"use strict";n.d(t,{Au:()=>l,Wh:()=>c,ZP:()=>u,hi:()=>i,wO:()=>o});var r=n(9818),a=n(23177),s=n(4957);const o="SET_AUTO_CONVERSION_SETTINGS";function i(){return c({isUpdating:!0})}function l(){return c({isUpdating:!1})}function c(e){return{type:o,options:e}}const u={updateAutoConversionSettings:function*(e){try{yield i(),yield c(e),yield(0,s.Fl)(e);const t=yield(0,s.wi)();return yield c(t.jetpack_social_autoconvert_images),!0}catch(e){const t=(0,r.select)(a.Eg).getAutoConversionSettings();return yield c(t),!1}finally{yield l()}},setAutoConversionSettings:c,refreshAutoConversionSettings:function*(){try{yield i();const e=yield(0,s.wi)();return yield c(e.jetpack_social_autoconvert_images),!0}catch(e){return!1}finally{yield l()}}}},23013:(e,t,n)=>{"use strict";n.r(t),n.d(t,{mergeConnections:()=>u,refreshConnectionTestResults:()=>d,setConnections:()=>l,syncConnectionsToPostMeta:()=>p,toggleConnection:()=>c,toggleConnectionById:()=>m});var r=n(13419),a=n(86989),s=n.n(a),o=n(12238),i=n(74442);function l(e){return{type:i.b,connections:e}}function c(e){return{type:i.L,connectionId:e}}function u(e){return function({dispatch:t,select:n}){const r=n.getConnections(),a=[],s={done:!1,enabled:Boolean(n.numberOfSharesRemaining()),toggleable:!0};for(const t of e){const e={...s,...r.find((e=>e.connection_id?e.connection_id===t.connection_id:e.id===t.id)),...t,is_healthy:t.test_success};a.push(e)}t(l(a))}}function d(e=!1){return async function({dispatch:t}){try{const n=(0,r.Pb)()?.social?.connectionRefreshPath||"/wpcom/v2/publicize/connection-test-results";t(u(await s()({path:n}))),e&&t(p())}catch(e){}}}function p(){return function({registry:e,select:t}){const n=t.getConnections();return e.dispatch(o.store).editPost({jetpack_publicize_connections:n})}}function m(e,t=!0){return function({dispatch:n}){n(c(e)),t&&n(p())}}},74442:(e,t,n)=>{"use strict";n.d(t,{L:()=>a,b:()=>r});const r="SET_CONNECTIONS",a="TOGGLE_CONNECTION"},54725:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(21052),a=n(23013),s=n(371),o=n(72438),i=n(4462);const l={...s.ZP,...i.ZP,...r.ZP,...o.Z,...a}},371:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>l,dz:()=>o,ff:()=>i});var r=n(9818),a=n(23177),s=n(4957);const o="SET_JETPACK_SETTINGS";function i(e){return{type:o,options:e}}const l={updateJetpackSettings:function*(e){try{yield i({is_updating:!0}),yield i(e),yield(0,s.RF)(e);const t=yield(0,s.es)();return yield i(t),!0}catch(e){const t=(0,r.select)(a.Eg).getJetpackSettings();return yield i(t),!1}finally{yield i({is_updating:!1})}},setJetpackSettings:i}},72438:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(4957),a=n(21052),s=n(4462);const o={refreshJetpackSocialSettings:function*(){try{yield(0,a.hi)(),yield(0,s.ds)();const e=yield(0,r.mu)();return yield(0,a.Wh)(e.jetpack_social_autoconvert_images),yield(0,s.ch)(e.jetpack_social_image_generator_settings),!0}catch(e){return!1}finally{yield(0,a.Au)(),yield(0,s.Gr)()}}}},4462:(e,t,n)=>{"use strict";n.d(t,{Gr:()=>l,ZP:()=>u,ch:()=>c,ds:()=>i,kg:()=>o});var r=n(9818),a=n(23177),s=n(4957);const o="SET_SOCIAL_IMAGE_GENERATOR_SETTINGS";function i(){return c({isUpdating:!0})}function l(){return c({isUpdating:!1})}function c(e){return{type:o,options:e}}const u={updateSocialImageGeneratorSettings:function*(e){try{yield i(),yield c(e),yield(0,s.Ux)(e);const t=yield(0,s.oB)();return yield c(t.jetpack_social_image_generator_settings),!0}catch(e){const t=(0,r.select)(a.Eg).getSocialImageGeneratorSettings();return yield c(t),!1}finally{yield l()}},setSocialImageGeneratorSettings:c,refreshSocialImageGeneratorSettings:function*(){try{yield i();const e=yield(0,s.oB)();return yield c(e.jetpack_social_image_generator_settings),!0}catch(e){return!1}finally{yield l()}}}},4957:(e,t,n)=>{"use strict";n.d(t,{Fl:()=>v,RF:()=>m,Ux:()=>g,ZP:()=>k,es:()=>p,mu:()=>b,oB:()=>h,wi:()=>f});var r=n(86989),a=n.n(r);const s="FETCH_JETPACK_SETTINGS",o="UPDATE_JETPACK_SETTINGS",i="FETCH_SOCIAL_IMAGE_GENERATOR_SETTINGS",l="UPDATE_SOCIAL_IMAGE_GENERATOR_SETTINGS",c="FETCH_AUTO_CONVERSION_SETTINGS",u="UPDATE_AUTO_CONVERSION_SETTINGS",d="FETCH_JETPACK_SOCIAL_SETTINGS",p=()=>({type:s}),m=e=>({type:o,settings:e}),h=()=>({type:i}),g=e=>({type:l,settings:e}),f=()=>({type:c}),b=()=>({type:d}),v=e=>({type:u,settings:e}),k={[s]:function(){return a()({path:"/jetpack/v4/social/settings"})},[o]:function(e){return a()({path:"/jetpack/v4/social/settings",method:"POST",data:e.settings})},[i]:function(){return a()({path:"/wp/v2/settings?_fields=jetpack_social_image_generator_settings"})},[l]:function(e){return a()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_image_generator_settings:e.settings}})},[c]:function(){return a()({path:"/wp/v2/settings?_fields=jetpack_social_autoconvert_images"})},[u]:function(e){return a()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_autoconvert_images:e.settings}})},[d]:function(){return a()({path:"/wp/v2/settings?_fields=jetpack_social_autoconvert_images,jetpack_social_image_generator_settings"})}}},23177:(e,t,n)=>{"use strict";n.d(t,{Bb:()=>f,Cd:()=>g,Eg:()=>c,M$:()=>p,cs:()=>h,h:()=>v,qk:()=>m,uJ:()=>d,wV:()=>b});var r=n(9818),a=n(54725),s=n(4957),o=n(45272),i=n(15781),l=n(22987);const c="jetpack-social-plugin",u={reducer:o.Z,actions:a.Z,selectors:l.Z,resolvers:i.ZP,controls:s.ZP,initialState:window?.jetpackSocialInitialState||window?.Initial_State?.socialInitialState||window?.Jetpack_Editor_Initial_State?.social||{}},d="facebook",p="instagram-business",m="linkedin",h="mastodon",g="nextdoor",f="tumblr",b="twitter",v=(0,r.createReduxStore)(c,u);(0,r.register)(v)},20750:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(21052);const a=(e={},t)=>t.type===r.wO?{...e,...t.options}:e},71837:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(74442);const a=(e={},t)=>{switch(t.type){case r.b:return{...e,connections:t.connections};case r.L:return{...e,connections:e.connections.map((e=>(e.connection_id?e.connection_id===t.connectionId:e.id===t.connectionId)?{...e,enabled:!e.enabled}:e))}}return e}},45272:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(9818),a=n(20750),s=n(71837),o=n(80697),i=n(35652),l=n(28696),c=n(54489);const u=(0,r.combineReducers)({sharesData:i.Z,siteData:l.Z,connectionData:s.Z,jetpackSettings:o.Z,socialImageGeneratorSettings:c.Z,autoConversionSettings:a.Z,hasPaidPlan:(e=!1)=>e})},80697:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(371);const a=(e={},t)=>t.type===r.dz?{...e,...t.options}:e},35652:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(e={})=>e},28696:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(e={})=>e},54489:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(4462);const a=(e={},t)=>t.type===r.kg?{...e,...t.options}:e},15781:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>c});var r=n(12238),a=n(21052),s=n(23013),o=n(371),i=n(4462),l=n(4957);const c={getJetpackSettings:function*(){try{const e=yield(0,l.es)();if(e)return(0,o.ff)(e)}catch(e){console.log(e)}},getSocialImageGeneratorSettings:function*(){try{const e=yield(0,l.oB)();if(e)return(0,i.ch)(e.jetpack_social_image_generator_settings)}catch(e){console.log(e)}},getAutoConversionSettings:function*(){try{const e=yield(0,l.wi)();if(e)return(0,a.Wh)(e.jetpack_social_autoconvert_images)}catch(e){console.log(e)}},getConnections:function(){return function({dispatch:e,registry:t}){const n=t.select(r.store).getEditedPostAttribute("jetpack_publicize_connections");e((0,s.setConnections)(n||[]))}}}},68113:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getAutoConversionSettings:e=>e.autoConversionSettings,isAutoConversionAvailable:e=>e.autoConversionSettings.available,isAutoConversionEnabled:e=>e.autoConversionSettings.available&&e.autoConversionSettings.enabled,isAutoConversionSettingsUpdating:e=>e.autoConversionSettings.isUpdating}},43354:(e,t,n)=>{"use strict";function r(e){return e.connectionData?.connections??[]}function a(e){return e.connectionData?.adminUrl??null}function s(e){return r(e).length>0}function o(e){return r(e).filter((e=>!1===e.test_success))}function i(e){return r(e).filter((e=>"must_reauth"===e.test_success)).map((e=>e.service_name))}function l(e){return r(e).filter((e=>e.enabled))}function c(e){return r(e).filter((e=>!e.enabled))}function u(e,t,{forceDefaults:n=!1}={}){let a="",s="",o="";if(!n){const n=r(e).find((({service_name:e})=>t===e));if(n){const{display_name:e,profile_display_name:r,profile_picture:i}=n;a="twitter"===t?r:e,o="twitter"===t?e:n.username,s=i}}return{displayName:a,profileImage:s,username:o}}n.r(t),n.d(t,{getConnectionProfileDetails:()=>u,getConnections:()=>r,getConnectionsAdminUrl:()=>a,getDisabledConnections:()=>c,getEnabledConnections:()=>l,getFailedConnections:()=>o,getMustReauthConnections:()=>i,hasConnections:()=>s})},22987:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(68113),a=n(43354),s=n(82836),o=n(31473),i=n(85675),l=n(45073);const c={...i.Z,...a,...s.Z,...o,...l.Z,...r.Z}},82836:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getJetpackSettings:e=>e.jetpackSettings,isModuleEnabled:e=>e.jetpackSettings.publicize_active,showPricingPage:e=>e.jetpackSettings.show_pricing_page,isUpdatingJetpackSettings:e=>e.jetpackSettings.is_updating,hasPaidPlan:e=>!(e.jetpackSettings?.showNudge??1),isEnhancedPublishingEnabled:e=>e.jetpackSettings?.isEnhancedPublishingEnabled??!1,getDismissedNotices:e=>e.jetpackSettings?.dismissedNotices}},31473:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getScheduledSharesCount:()=>l,getShareLimit:()=>o,getSharedPostsCount:()=>u,getSharesUsedCount:()=>i,getTotalSharesCount:()=>c,isShareLimitEnabled:()=>a,numberOfSharesRemaining:()=>p,shouldShowAdvancedPlanNudge:()=>d,showShareLimits:()=>s});var r=n(82836);function a(e){return e.sharesData?.is_share_limit_enabled??!1}function s(e){return!r.Z.hasPaidPlan(e)&&!e.hasPaidPlan&&a(e)}function o(e){return e.sharesData?.share_limit??30}function i(e){return e.sharesData?.publicized_count??0}function l(e){return e.sharesData?.to_be_publicized_count??0}function c(e){const t=i(e)+l(e);return Math.max(t,0)}function u(e){return e.sharesData?.shared_posts_count??0}function d(e){return e.sharesData?.show_advanced_plan_upgrade_nudge??!1}function p(e,t={}){if(!s(e))return 1/0;const{includeScheduled:n}={includeScheduled:!0,...t},r=i(e),a=o(e),c=n?l(e):0;return Math.max(a-r-c,0)}},85675:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getAdminUrl:e=>e.siteData?.adminUrl??null,getAPIRootUrl:e=>e.siteData?.apiRoot??null,getAPINonce:e=>e.siteData?.apiNonce??null,getRegistrationNonce:e=>e.siteData?.registrationNonce??null,getSiteSuffix:e=>e.siteData?.siteSuffix??null,getPluginVersion:e=>e.siteData?.pluginVersion??null}},45073:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getSocialImageGeneratorSettings:e=>e.socialImageGeneratorSettings,isSocialImageGeneratorAvailable:e=>e.socialImageGeneratorSettings.available,isSocialImageGeneratorEnabled:e=>e.socialImageGeneratorSettings.enabled,isUpdatingSocialImageGeneratorSettings:e=>e.socialImageGeneratorSettings.isUpdating,getSocialImageGeneratorDefaultTemplate:e=>e.socialImageGeneratorSettings.template}},5463:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r=255;function a(){return r}},12677:(e,t,n)=>{"use strict";n.d(t,{h:()=>a});var r=n(13419);function a(){return(0,r.Pb)()?.social?.supportedAdditionalConnections||[]}},42032:(e,t,n)=>{"use strict";n.d(t,{getShareMessageMaxLength:()=>r.A,getSupportedAdditionalConnections:()=>a.h});var r=n(5463),a=n(12677),s=n(581);n.o(s,"useSyncPostDataToStore")&&n.d(t,{useSyncPostDataToStore:function(){return s.useSyncPostDataToStore}})},581:()=>{},13419:(e,t,n)=>{"use strict";n.d(t,{Dp:()=>u.Z,FK:()=>c.FK,HD:()=>c.HD,M6:()=>s.M6,OZ:()=>o.Z,Pb:()=>r.Z,Pm:()=>m.Z,Qq:()=>c.Qq,Rl:()=>c.Rl,T:()=>l.Z,Ug:()=>s.Ug,Wp:()=>s.Wp,X1:()=>c.X1,_D:()=>c._D,aQ:()=>s.aQ,dM:()=>h.d,el:()=>p.Z,lQ:()=>a.Z,lt:()=>h.l,m3:()=>c.m3,o_:()=>i.Z,og:()=>g.Z,z$:()=>d.Z});var r=n(50148),a=n(35004),s=n(99505),o=n(48052),i=n(76714),l=n(80354),c=n(75404),u=n(68586),d=n(61053),p=n(11380),m=n(6342),h=n(96959),g=n(19499);n(39058)},6342:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(78868),a=n(99196),s=n.n(a);const o=()=>s().createElement(r.Z,{className:"jetpack-editor-panel-logo",height:16,logoColor:"#1E1E1E",showText:!1})},96959:(e,t,n)=>{"use strict";n.d(t,{d:()=>s,l:()=>o});var r=n(69307),a=n(12953);function s(e){const t={};let n="span",a=e.icon;const s=document.createElement("div");s.innerHTML=e.icon;const o=s.querySelector("svg");return o&&(n="svg",a=o.innerHTML,Array.from(o.attributes).forEach((({nodeName:e,nodeValue:n})=>t[e]=n))),(0,r.createElement)(n,{...t,dangerouslySetInnerHTML:{__html:a||""}})}function o(e){return{src:s(e),foreground:(0,a.Z)()}}},12953:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(99505);const a="#069e08";function s(){return(0,r.Ug)()||(0,r.Wp)()?null:a}},19499:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(50148);function a(){const e=(0,r.Z)();return e?.blocks_variation??"production"}},50148:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r="Jetpack_Editor_Initial_State";function a(){return"object"==typeof window?window?.[r]??null:null}},48052:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(50148);function a(e){const t=(0,r.Z)(),n=t?.available_blocks?.[e]?.available??!1,a=t?.available_blocks?.[e]?.unavailable_reason??"unknown";return{available:n,...!n&&{details:t?.available_blocks?.[e]?.details??[],unavailableReason:a}}}},35004:(e,t,n)=>{"use strict";function r(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:null}n.d(t,{Z:()=>r})},61053:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(6975),a=n(31294),s=n(69307);const{tracks:o}=r.Z,{recordEvent:i}=o,l=({pageViewEventName:e=null,pageViewNamespace:t="jetpack",pageViewSuffix:n="page_view",pageViewEventProperties:l={}}={})=>{const[c,u]=(0,s.useState)(!1),{isUserConnected:d,isRegistered:p,userConnectionData:m={}}=(0,a.Z)(),{wpcomUser:{login:h,ID:g}={},blogId:f}=m.currentUser||{},b=(0,s.useCallback)((async(e,t={})=>{d&&g&&h&&i(e,t)}),[d,g,h]);return(0,s.useEffect)((()=>{d&&g&&h&&f&&r.Z.initialize(g,h,{blog_id:f})}),[f,g,h,d]),(0,s.useEffect)((()=>{const r=e?`${t}_${e}_${n}`:null;p&&r&&(c||(b(r,l),u(!0)))}),[c,t,e,n,p,l,b]),{recordEvent:b,tracks:o}}},11380:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9818),a=n(69307),s=n(39058);const o=e=>{const{isModuleActive:t,isChangingStatus:n,isLoadingModules:o}=(0,r.useSelect)((t=>{const n=t(s.p);return{isModuleActive:n.isModuleActive(e),isChangingStatus:n.isModuleUpdating(e),isLoadingModules:n.areModulesLoading(e)}}),[s.p]),{updateJetpackModuleStatus:i}=(0,r.useDispatch)(s.p),l=(0,a.useCallback)((t=>i({name:e,active:t})),[e,i]);return(0,a.useMemo)((()=>({isLoadingModules:o,isChangingStatus:n,isModuleActive:t,changeStatus:l})),[o,n,t,l])}},68586:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(50148);function a(){return(0,r.Z)()?.jetpack?.is_current_user_connected??!1}},44166:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>p,rW:()=>d});var r=n(9818),a=n(99505),s=n(82162),o=n(39058);const i="SET_JETPACK_MODULES",l="SET_MODULE_UPDATING";function c(e){return d({isLoading:e})}function u(e,t){return{type:l,name:e,isUpdating:t}}function d(e){return{type:i,options:e}}const p={updateJetpackModuleStatus:function*(e){try{yield u(e.name,!0),yield(0,s.zL)(e);const t=yield(0,s.Bs)();return yield d({data:t}),!0}catch(e){const t=(0,r.select)(o.p).getJetpackModules();return yield d(t),!1}finally{yield u(e.name,!1)}},setJetpackModules:d,fetchModules:function*(){if((0,a.Wp)())return!0;try{yield c(!0);const e=yield(0,s.Bs)();return yield d({data:e}),!0}catch(e){const t=(0,r.select)(o.p).getJetpackModules();return yield d(t),!1}finally{yield c(!1)}}}},82162:(e,t,n)=>{"use strict";n.d(t,{Bs:()=>i,ZP:()=>c,zL:()=>l});var r=n(86989),a=n.n(r);const s="FETCH_JETPACK_MODULES",o="UPDATE_JETPACK_MODULE_STATUS",i=()=>({type:s}),l=e=>({type:o,settings:e}),c={[s]:function(){return a()({path:"/jetpack/v4/module/all",method:"GET"})},[o]:function({settings:e}){return a()({path:`/jetpack/v4/module/${e.name}/active`,method:"POST",data:{active:e.active}})}}},39058:(e,t,n)=>{"use strict";n.d(t,{p:()=>c});var r=n(9818),a=n(44166),s=n(82162),o=n(42469),i=n(55133),l=n(43524);const c="jetpack-modules",u=(0,r.createReduxStore)(c,{reducer:o.Z,actions:a.ZP,controls:s.ZP,resolvers:i.Z,selectors:l.Z});(0,r.register)(u);const d=window?.Initial_State?.getModules||window?.Jetpack_Editor_Initial_State?.modules||null;null!==d&&(0,r.dispatch)(c).setJetpackModules({data:{...d}})},42469:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r={isLoading:!1,isUpdating:{},data:{}},a=(e=r,t)=>{switch(t.type){case"SET_JETPACK_MODULES":return{...e,...t.options};case"SET_MODULE_UPDATING":return{...e,isUpdating:{...e.isUpdating,[t.name]:t.isUpdating}}}return e}},55133:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(44166),a=n(82162);const s={getJetpackModules:function*(){try{const e=yield(0,a.Bs)();if(e)return(0,r.rW)({data:e})}catch(e){console.error(e)}}}},43524:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(99505);const a={getJetpackModules:e=>e.data,isModuleActive:(e,t)=>(0,r.Wp)()||(e?.data?.[t]?.activated??!1),areModulesLoading:e=>e.isLoading??!1,isModuleUpdating:(e,t)=>e?.isUpdating?.[t]??!1}},75404:(e,t,n)=>{"use strict";n.d(t,{FK:()=>g,HD:()=>f,Qq:()=>u,Rl:()=>m,X1:()=>d,_D:()=>p,m3:()=>b});var r=n(65736),a=n(96483),s=n(92819),o=n(50148),i=n(48052),l=n(35004),c=n(99505);const __=r.__;function u({planSlug:e,plan:t,postId:n,postType:r}){const o=(0,s.startsWith)(e,"jetpack_")?e:(0,s.get)(t,["path_slug"]),i=(void 0===r?()=>{const e=new URLSearchParams(window.location.search);return(0,a.addQueryArgs)(window.location.protocol+`//${(0,l.Z)().replace("::","/")}/wp-admin/site-editor.php`,{postId:e.get("postId"),postType:e.get("postType"),plan_upgraded:1})}:()=>{const e=["page","post"].includes(r)?"":"edit";return(0,c.Wp)()?(0,a.addQueryArgs)("/"+(0,s.compact)([e,r,(0,l.Z)(),n]).join("/"),{plan_upgraded:1}):(0,a.addQueryArgs)(window.location.protocol+`//${(0,l.Z)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:n,plan_upgraded:1})})();return(0,c.Ug)()?(0,a.addQueryArgs)(`https://wordpress.com/plans/${(0,l.Z)()}`,{redirect_to:i,customerType:"business"}):o&&(0,a.addQueryArgs)(`https://wordpress.com/checkout/${(0,l.Z)()}/${o}`,{redirect_to:i})}function d(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{available:n,unavailableReason:r}=(0,i.Z)(t);return!n&&"missing_plan"===r}function p(e,t){return"missing_plan"===e&&t.required_plan}function m(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{details:n,unavailableReason:r}=(0,i.Z)(t);return p(r,n)}const h=[{name:"core/cover",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"video",description:__("Upgrade your plan to use video covers","jetpack")},{name:"core/audio",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"audio",description:__("Upgrade your plan to upload audio","jetpack")}];function g(){return(0,s.get)((0,o.Z)(),"jetpack.enable_upgrade_nudge",!1)}const f=e=>(0,s.map)(h,"name").includes(e),b=e=>(0,s.head)((0,s.filter)(h,(({name:t})=>t===e)))},76714:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(98817),a=n(48052);function s(e,t){const{available:n,unavailableReason:s}=(0,a.Z)(e);return!!n&&(0,r.registerPlugin)(`jetpack-${e}`,t)}},99505:(e,t,n)=>{"use strict";n.d(t,{M6:()=>i,Ug:()=>o,Wp:()=>s,aQ:()=>l});var r=n(50148);function a(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function s(){return"simple"===a()}function o(){return"atomic"===a()}function i(){const e=(0,r.Z)();return e?.jetpack?.is_private_site??!1}function l(){const e=(0,r.Z)();return e?.jetpack?.is_coming_soon??!1}},80354:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(82674),a=n.n(r),s=n(94333);const o=e=>(0,s.createHigherOrderComponent)((t=>n=>React.createElement(t,a()({},n,{className:n.name===e?"has-warning is-interactive":n.className}))),"withHasWarningIsInteractiveClassNames")},83059:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>j});var r=n(51806),a=n(42290),s=n(13419),o=n(4981),i=n(55609),l=n(9818),c=n(69307),u=n(65736),d=n(586),p=n(3639),m=n(92710),h=n(58532),g=n(51128),f=n.n(g),b=(n(99196),n(49259)),v=n(63634),k=n(854),y=n(6747),w=n(81612),E=n(27298);const __=u.__,_=f()("jetpack-ai-assistant:dropdown"),C=[{name:__("Correct spelling and grammar","jetpack"),key:"correct-spelling",aiSuggestion:v.Hd,icon:d.Z},{name:__("Simplify","jetpack"),key:"simplify",aiSuggestion:v.hI,icon:p.Z},{name:__("Summarize","jetpack"),key:"summarize",aiSuggestion:v.Lq,icon:m.Z},{name:__("Expand","jetpack"),key:"make-longer",aiSuggestion:v.TV,icon:h.Z}];function x(e){return e.filter((e=>null!=e)).map((e=>(0,o.getBlockContent)(e))).join("\n\n")}function S({onClose:e,blockType:t}){const[n,o]=(0,c.useState)(!1),{getSelectedBlockClientIds:u,getBlocksByClientId:d}=(0,l.useSelect)("core/block-editor"),{removeBlocks:p,replaceBlock:m}=(0,l.useDispatch)("core/block-editor");(0,c.useEffect)((()=>{const e=u(),t=x(d(e)),n=(0,k.t$)(t);return o(!n.length)}),[d,u]);const{tracks:h}=(0,s.z$)(),g=(n,r={})=>{const a=u(),s=d(a),o=x(s);e(),_("requestSuggestion",n,r),h.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:n,block_type:t});const[i]=s,[l,...c]=a,g={...i?.attributes||{},content:o},f=(0,y.b)(t,g),v={clientId:l,type:n,options:{...r,contentType:"generated",fromExtension:!0}};localStorage.setItem((0,b.$M)(f.clientId),JSON.stringify(v)),m(l,f),p(c)};return(0,r.createElement)(r.Fragment,null,n&&(0,r.createElement)(i.Notice,{status:"warning",isDismissible:!1,className:"jetpack-ai-assistant__info"},__("Add content to activate the tools below","jetpack")),(0,r.createElement)(i.MenuGroup,null,(0,r.createElement)(i.MenuItem,{icon:a.u_,iconPosition:"left",key:"key-ai-assistant",onClick:()=>{const e=u(),n=d(e),r=x(n),[a,...s]=e,[o]=n,i={...o?.attributes||{},content:r};m(a,(0,y.b)(t,i)),p(s),h.recordEvent("jetpack_ai_assistant_prompt_show",{block_type:t})},disabled:n},(0,r.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},__("Ask AI Assistant","jetpack"))),C.map((e=>(0,r.createElement)(i.MenuItem,{icon:e?.icon,iconPosition:"left",key:`key-${e.key}`,onClick:()=>{g(e.aiSuggestion,{})},disabled:n},(0,r.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},e.name)))),(0,r.createElement)(E.IP,{onChange:e=>{g(v.Lg,{tone:e})},disabled:n}),(0,r.createElement)(w.xK,{onChange:e=>{g(v.Nw,{language:e})},disabled:n})))}function j({blockType:e}){const{tracks:t}=(0,s.z$)();return(0,r.createElement)(i.Dropdown,{popoverProps:{variant:"toolbar"},renderToggle:({isOpen:e,onToggle:t})=>(0,r.createElement)(i.ToolbarButton,{className:"jetpack-ai-assistant__button",showTooltip:!0,onClick:t,"aria-haspopup":"true","aria-expanded":e,label:__("AI Assistant","jetpack"),icon:a.u_}),onToggle:n=>{n&&t.recordEvent("jetpack_ai_assistant_extension_toolbar_menu_show",{block_type:e})},renderContent:({onClose:t})=>(0,r.createElement)(S,{onClose:t,blockType:e})})}},3180:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(65736),s=n(26546),o=n(46867);const __=a.__,i=()=>{const e=`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/connection`,{autosaveAndRedirect:t,isRedirecting:n}=(0,o.Z)(e);return(0,r.createElement)(s.p,{buttonText:__("Reconnect Jetpack","jetpack"),checkoutUrl:e,className:"jetpack-ai-connect-banner",description:__("Your account is not connected to Jetpack at the moment.","jetpack"),goToCheckoutPage:e=>{t(e)},isRedirecting:n,visible:!0,align:null,title:null,context:null})}},87445:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(6895),s=n(55609),o=n(65736);const __=o.__;const i=function(){const e=(0,a.Z)("jetpack-ai-feedback");return(0,r.createElement)("div",{className:"jetpack-ai-feedback-control"},(0,r.createElement)(s.BaseControl,{label:__("Feedback","jetpack")},(0,r.createElement)("p",null,__("Your feedback is valuable in our commitment to refine and improve this feature.","jetpack")),(0,r.createElement)(s.ExternalLink,{href:e},__("Share your feedback","jetpack"))))}},81612:(e,t,n)=>{"use strict";n.d(t,{QA:()=>h,ZP:()=>f,xK:()=>b});var r=n(51806),a=n(13419),s=n(55609),o=n(65736),i=n(61074),l=n(46936),c=n(43618);n(99196);const __=o.__,u=["en","es","fr","de","it","pt","ru","zh","ja","ar","hi","ko"],d=window?.Jetpack_Editor_Initial_State?.siteLocale||navigator?.language,p=__("Translate","jetpack"),m=d?.split("-")[0]||"en",h=(d?.split("-"),{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")},id:{label:__("Indonesian","jetpack")},tl:{label:__("Filipino","jetpack")},vi:{label:__("Vietnamese","jetpack")}}),g=({value:e,onChange:t})=>{const n=[...u.filter((e=>e!==m))];return u.includes(m)&&n.unshift(m),(0,r.createElement)(s.MenuGroup,{label:__("Select language","jetpack")},n.map((n=>(0,r.createElement)(s.MenuItem,{key:`key-${n}`,onClick:()=>t(n+" ("+h[n].label+")"),isSelected:e===n},h[n].label))))};function f({value:e=m,label:t=p,onChange:n,disabled:o=!1}){const{tracks:l}=(0,a.z$)();return o?(0,r.createElement)(s.Tooltip,{text:t},(0,r.createElement)(s.Button,{disabled:!0},(0,r.createElement)(i.Z,{icon:c.Z}))):(0,r.createElement)(s.ToolbarDropdownMenu,{icon:c.Z,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&l.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"i18n"})}},(()=>(0,r.createElement)(g,{value:e,onChange:n})))}function b({value:e=m,label:t=p,onChange:n,disabled:a=!1}){return(0,r.createElement)(s.DropdownMenu,{className:"ai-assistant__i18n-dropdown",icon:c.Z,label:t,toggleProps:{children:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"ai-assistant__i18n-dropdown__toggle-label"},t),(0,r.createElement)(i.Z,{icon:l.Z})),disabled:a}},(({onClose:t})=>(0,r.createElement)(g,{onChange:e=>{n(e),t()},value:e})))}},50297:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(51806),a=n(55609),s=n(65736);const __=s.__,o=({image:e,inModal:t=!1,saveImage:n,setImageModal:s})=>(0,r.createElement)(a.Flex,{direction:"column"},t&&(0,r.createElement)(a.FlexItem,{style:{textAlign:"center"}},(0,r.createElement)(a.Button,{variant:"primary",onClick:()=>n(e)},__("Use this image","jetpack"))),(0,r.createElement)(a.FlexBlock,null,(0,r.createElement)("input",{type:"image",className:"wp-block-ai-image-image",src:e,alt:"",onClick:()=>s(e)})),!t&&(0,r.createElement)(a.FlexBlock,null,(0,r.createElement)(a.Flex,{direction:"column",style:{alignItems:"center"}},(0,r.createElement)(a.FlexItem,null,(0,r.createElement)(a.Button,{variant:"primary",onClick:()=>n(e)},__("Use this image","jetpack"))))))},24404:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>g});var r=n(51806),a=n(13419),s=n(55609),o=n(65736),i=n(77840);n(99196);const __=o.__,l="make-longer",c="makeLonger",u="make-shorter",d="makeShorter",p="summarize",m="summarize",h=[{name:__("Summarize","jetpack"),key:p,aiSuggestion:m},{name:__("Make longer","jetpack"),key:l,aiSuggestion:c},{name:__("Make shorter","jetpack"),key:u,aiSuggestion:d}];function g({key:e,label:t=__("Improve","jetpack"),exclude:n=[],onChange:o,disabled:l=!1}){const{tracks:c}=(0,a.z$)();return l?(0,r.createElement)(s.Tooltip,{text:t},(0,r.createElement)(s.Button,{disabled:!0},(0,r.createElement)(s.Icon,{icon:i.Z}))):(0,r.createElement)(s.ToolbarDropdownMenu,{icon:i.Z,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&c.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"improve"})}},(()=>{const a=h.filter((e=>!n.includes(e.key)));return(0,r.createElement)(s.MenuGroup,{label:t},a.map((t=>(0,r.createElement)(s.MenuItem,{key:`key-${t.key}`,onClick:()=>o(t.aiSuggestion,{contentType:"generated"}),isSelected:e===t.key},t.name))))}))}},85642:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>g});var r=n(51806),a=n(13419),s=n(55609),o=n(65736),i=n(77840),l=n(58532),c=n(586),u=n(3639),d=n(92710),p=n(32677);n(99196);const __=o.__,m=[{label:__("Post about…","jetpack"),description:{original:"Write a post about ",translated:__("Write a post about ","jetpack")}},{label:__("Informative article on…","jetpack"),description:{original:"Craft an informative article explaining ",translated:__("Craft an informative article explaining ","jetpack")}},{label:__("Step-by-step tutorial on…","jetpack"),description:{original:"Write a step-by-step tutorial on ",translated:__("Write a step-by-step tutorial on ","jetpack")}},{label:__("Motivational post on…","jetpack"),description:{original:"Create a motivational post on ",translated:__("Create a motivational post on ","jetpack")}}],h=[{label:__("Say it differently…","jetpack"),description:{original:"Rewrite it in a way that ",translated:__("Rewrite it in a way that ","jetpack")}},{label:__("Add…","jetpack"),description:{original:"Add more details about ",translated:__("Add more details about ","jetpack")}},{label:__("Remove…","jetpack"),description:{original:"Remove unnecessary details about ",translated:__("Remove unnecessary details about ","jetpack")}}];function g({hasContentBefore:e,hasContent:t,hasPostTitle:n,contentIsLoaded:o,onPromptSelect:g,onSuggestionSelect:f}){const b=__("Write with AI…","jetpack"),{tracks:v}=(0,a.z$)();return(0,r.createElement)(s.ToolbarDropdownMenu,{className:"jetpack-ai-assistant__templates-control",icon:null,label:b,text:b,onToggle:e=>{e&&v.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"write-with-ai"})}},(({onClose:a})=>o?(0,r.createElement)(s.MenuGroup,{label:__("Write…","jetpack")},h.map(((e,t)=>(0,r.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",key:`key-${t}`,onClick:()=>{a(),g(e.description)}},e.label)))):(0,r.createElement)(r.Fragment,null,e&&(0,r.createElement)(s.MenuGroup,{label:__("Based on preceding content…","jetpack")},(0,r.createElement)(s.MenuItem,{icon:l.Z,iconPosition:"left",onClick:()=>f("continue")},__("Continue writing","jetpack")),(0,r.createElement)(s.MenuItem,{icon:c.Z,iconPosition:"left",onClick:()=>f("correctSpelling")},__("Correct spelling and grammar","jetpack")),(0,r.createElement)(s.MenuItem,{icon:u.Z,iconPosition:"left",onClick:()=>f("simplify")},__("Simplify","jetpack"))),t&&(0,r.createElement)(s.MenuGroup,{label:__("Based on entire content…","jetpack")},t&&(0,r.createElement)(s.MenuItem,{icon:d.Z,iconPosition:"left",onClick:()=>f("summarize")},__("Summarize","jetpack")),t&&(0,r.createElement)(s.MenuItem,{icon:p.Z,iconPosition:"left",onClick:()=>f("generateTitle")},__("Generate a post title","jetpack"))),(0,r.createElement)(s.MenuGroup,{label:__("Write…","jetpack")},n&&(0,r.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",onClick:()=>f("titleSummary")},__("Summary based on title","jetpack")),m.map(((e,t)=>(0,r.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",key:`key-${t}`,onClick:()=>{a(),g(e.description)}},e.label)))))))}},27298:(e,t,n)=>{"use strict";n.d(t,{IP:()=>m,Nj:()=>u,ZP:()=>h,bu:()=>d});var r=n(51806),a=n(42290),s=n(13419),o=n(55609),i=n(65736),l=n(46936);n(99196);const __=i.__,c=["formal","informal","optimistic","humorous","serious","skeptical","empathetic","confident","passionate","provocative"],u="formal",d={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:"🔥"}},p=({value:e,onChange:t})=>(0,r.createElement)(o.MenuGroup,{label:__("Select tone","jetpack")},c.map((n=>(0,r.createElement)(o.MenuItem,{key:`key-${n}`,onClick:()=>t(n),isSelected:e===n},`${d[n].emoji} ${d[n].label}`))));function m({label:e=__("Change tone","jetpack"),value:t=u,onChange:n,disabled:s=!1}){return(0,r.createElement)(o.DropdownMenu,{icon:a.v_,label:e,className:"ai-assistant__tone-dropdown",popoverProps:{variant:"toolbar"},toggleProps:{children:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"ai-assistant__tone-dropdown__toggle-label"},e),(0,r.createElement)(o.Icon,{icon:l.Z})),disabled:s}},(({onClose:e})=>(0,r.createElement)(p,{value:t,onChange:t=>{n(t),e()}})))}function h({value:e=u,onChange:t,disabled:n=!1}){const i=__("Change tone","jetpack"),{tracks:l}=(0,s.z$)();return n?(0,r.createElement)(o.Tooltip,{text:i},(0,r.createElement)(o.Button,{disabled:!0},(0,r.createElement)(o.Icon,{icon:a.v_}))):(0,r.createElement)(o.ToolbarDropdownMenu,{icon:a.v_,label:i,popoverProps:{variant:"toolbar"},disabled:n,onToggle:e=>{e&&l.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"tone"})}},(()=>(0,r.createElement)(p,{value:e,onChange:t})))}},4965:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(51806),a=n(52175),s=n(55609),o=n(65736),i=n(79201),l=n(48381),c=(n(75022),n(63634)),u=n(81612),d=n(24404),p=n(85642),m=n(27298);const __=o.__,h=({contentIsLoaded:e,getSuggestionFromOpenAI:t,retryRequest:n,handleAcceptContent:o,handleImageRequest:h,handleTryAgain:g,showRetry:f,contentBefore:b,hasPostTitle:v,wholeContent:k,setUserPrompt:y,recordEvent:w,isGeneratingTitle:E})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.BlockControls,null,!f&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.ToolbarGroup,null,(0,r.createElement)(p.ZP,{hasContentBefore:!!b?.length,hasContent:!!k?.length,hasPostTitle:v,contentIsLoaded:e,onPromptSelect:e=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"prompt-template",prompt:e.original}),y(e.translated)},onSuggestionSelect:e=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:e}),t(e)}})),(0,r.createElement)(a.BlockControls,{group:"block"},(0,r.createElement)(m.ZP,{value:"neutral",onChange:n=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:c.Lg}),t(c.Lg,{tone:n,contentType:e?"generated":null})},disabled:!e&&!k?.length}),(0,r.createElement)(u.ZP,{value:"en",onChange:n=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:c.Nw}),t(c.Nw,{language:n,contentType:e?"generated":null})},disabled:!e&&!k?.length}),(0,r.createElement)(d.ZP,{onChange:t,exclude:E?["summarize"]:[],disabled:!e}))),(f||g)&&(0,r.createElement)(s.ToolbarGroup,null,!f&&e&&g&&(0,r.createElement)(s.ToolbarButton,{onClick:g},__("Try Again","jetpack")),f&&e&&(0,r.createElement)(s.ToolbarButton,{icon:i.Z,onClick:o},__("Accept","jetpack")),f&&(0,r.createElement)(s.ToolbarButton,{icon:l.Z,onClick:n},__("Retry","jetpack"))),false))},5246:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(51806),a=n(6895),s=n(13419),o=n(69307),i=n(65736),l=n(51128),c=n.n(l),u=n(99196),d=n(26546),p=n(23795),m=n(63206),h=n(18135),g=n(71449);const __=i.__,f=c()("jetpack-ai-assistant:upgrade-prompt"),b=e=>{const{upgradeType:t}=(0,h.Z)();return"vip"===t?(0,r.createElement)(d.p,{buttonText:null,checkoutUrl:null,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. Please reach out to your VIP account team.","jetpack"),{strong:(0,r.createElement)("strong",null)}),goToCheckoutPage:null,isRedirecting:null,visible:!0,align:null,title:null,context:null}):(({placement:e=null})=>{const{checkoutUrl:t,autosaveAndRedirect:n,isRedirecting:l}=(0,m.Z)(),c=(0,g.d)(),{nextTier:b,tierPlansEnabled:v,currentTier:k,requestsCount:y,usagePeriod:w}=(0,h.Z)(),E=(0,p.U_)(k)===p.dt?w?.requestsCount:y,{tracks:_}=(0,s.z$)(),C=(0,u.useCallback)((t=>{f("upgrade",e),_.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:k?.slug,requests_count:E,placement:e}),n(t)}),[n,k,E,_,e]),x=(0,u.useCallback)((()=>{f("contact us",e),_.recordEvent("jetpack_ai_upgrade_contact_us",{placement:e})}),[_,e]);if(!c)return(0,r.createElement)(d.p,{showButton:!1,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! Reach out to the site administrator to upgrade and keep using Jetpack AI.","jetpack"),{strong:(0,r.createElement)("strong",null)}),visible:!0,align:null,title:null,context:null});if(v){if(!b){const e=(0,a.Z)("jetpack-ai-tiers-more-requests-contact");return(0,r.createElement)(d.p,{buttonText:__("Contact Us","jetpack"),description:__("You have reached the request limit for your current plan.","jetpack"),className:"jetpack-ai-upgrade-banner",checkoutUrl:e,visible:!0,align:null,title:null,context:null,goToCheckoutPage:x})}return(0,r.createElement)(d.p,{buttonText:(0,i.sprintf)(/* Translators: number of requests */ __("Upgrade to %d requests","jetpack"),b.limit),checkoutUrl:t,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)((0,i.sprintf)(/* Translators: number of requests */ __("You have reached the requests limit for your current plan. Upgrade now to increase your requests limit to %d.","jetpack"),b.limit),{strong:(0,r.createElement)("strong",null)}),goToCheckoutPage:C,isRedirecting:l,visible:!0,align:"center",title:null,context:null})}return(0,r.createElement)(d.p,{buttonText:"Upgrade",checkoutUrl:t,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! Upgrade now to keep using it.","jetpack"),{strong:(0,r.createElement)("strong",null)}),goToCheckoutPage:n,isRedirecting:l,visible:!0,align:null,title:null,context:null})})(e)}},45624:(e,t,n)=>{"use strict";n.d(t,{Z:()=>I});var r=n(82674),a=n.n(r),s=n(51806),o=n(42290),i=n(13419),l=n(52175),c=n(4981),u=n(55609),d=n(94333),p=n(9818),m=n(69307),h=n(65736),g=n(65235),f=n.n(g),b=n(10185),v=n.n(b),k=n(99196),y=n(84102),w=n(80013),E=n(3180),_=n(87445),C=n(50297),x=n(4965),S=n(5246),j=n(49259),P=n(18135),N=n(60751),L=n(71449),T=n(3687),A=n(63634);const __=h.__,M=new(v())({breaks:!0}),R="post"===window?.Jetpack_Editor_Initial_State?.screenBase,Z=window?.Jetpack_Editor_Initial_State?.["ai-assistant"]?.["is-playground-visible"];function I({attributes:e,setAttributes:t,clientId:n,isSelected:r}){const[h,g]=(0,m.useState)({}),[b,v]=(0,m.useState)(!1),[I,B]=(0,m.useState)([]),[z,D]=(0,m.useState)(null),[F,O]=(0,m.useState)(null),{tracks:U}=(0,i.z$)(),H=(0,p.useSelect)((e=>e("core/editor").getCurrentPostId())),{getBlock:V}=(0,p.useSelect)("core/block-editor"),q=(0,k.useRef)(null),G=(0,k.useRef)(null),{replaceBlocks:$,replaceBlock:W,removeBlock:J}=(0,p.useDispatch)("core/block-editor"),{editPost:K}=(0,p.useDispatch)("core/editor"),{mediaUpload:Y}=(0,p.useSelect)((e=>{const{getSettings:t}=e("core/block-editor");return{mediaUpload:t().mediaUpload}}),[]),{isOverLimit:X,requireUpgrade:Q,increaseRequestsCount:ee}=(0,P.Z)(),te=()=>{setTimeout((()=>{q.current?.focus?.()}),100)},ne=()=>{setTimeout((()=>{G.current?.focus?.()}),100)},re=(0,d.useViewportMatch)("medium","<"),{isLoadingCategories:ae,isLoadingCompletion:se,wasCompletionJustRequested:oe,getSuggestionFromOpenAI:ie,stopSuggestion:le,showRetry:ce,contentBefore:ue,postTitle:de,retryRequest:pe,wholeContent:me,requestingState:he}=(0,N.Z)({onSuggestionDone:(0,m.useCallback)((()=>{te(),ee()}),[ee]),onUnclearPrompt:(0,m.useCallback)((()=>{ne(),ee()}),[ee]),onModeration:te,attributes:e,clientId:n,content:e.content,setError:g,tracks:U,userPrompt:e.userPrompt,requireUpgrade:Q,requestingState:e.requestingState}),ge=(0,L.b)(),fe=(0,j.$M)(n);(0,k.useEffect)((()=>{if(!fe)return;const e=JSON.parse(localStorage.getItem(fe));if(!e)return;const{type:t,options:n}=e;localStorage.removeItem(fe),ie(t,n)}),[fe,ie]),(0,k.useEffect)((()=>{h&&O(!1)}),[h]);const be=(0,k.useRef)(e?.content);(0,k.useEffect)((()=>{if(!e?.useGutenbergSyntax)return;if(!be?.current?.length)return;const t=V(n);if(t?.innerBlocks?.length)return;const r=(0,c.parse)(be.current);r?.length&&$(n,r)}),[be,n,$,V,e?.useGutenbergSyntax]),(0,k.useEffect)((()=>{["init","done"].includes(he)&&t({requestingState:he})}),[he,t]);const ve=async t=>{if(b)return;v(!0),g({});const r=await fetch(t),a=await r.blob(),s=new File([a],"jetpack_ai_image.png",{type:"image/png"});Y({filesList:[s],onFileChange:([t])=>{t.id&&W(n,(0,c.createBlock)("core/image",{url:t.url,caption:e.requestedPrompt,alt:e.requestedPrompt}))},allowedTypes:["image"],onError:e=>{console.error(e),v(!1)}}),U.recordEvent("jetpack_ai_dalle_generation_upload",{post_id:H})},ke=e?.useGutenbergSyntax,ye=se||ae,we=!!e.content,Ee="generateTitle"===e.promptType,_e=__("Accept","jetpack"),Ce=__("Accept title","jetpack"),xe=Ee?Ce:_e,Se=(...e)=>{ie(...e),ne()},je=async()=>{let t=[];if(ke)t=V(n),t=t?.innerBlocks||[];else{const n=M.render(e.content||"").replace(/
  • \s+

    /g,"

  • ").replace(/<\/p>\s+<\/li>/g,"
  • ");t=(0,c.rawHandler)({HTML:n})}await $(n,t);const r=(e=>{let t=null;return e.forEach((e=>{const n=document.querySelector(`.wp-block[data-block="${e.clientId}"]`);if(!n)return;"true"===n.contentEditable&&(t=n);const r=n.querySelectorAll("[contenteditable=true]");t=r.length?r[r.length-1]:t})),t})(t);r&&(e=>{const t=window.getSelection();t.selectAllChildren(e),t.collapseToEnd(),e.focus()})(r)},Pe=()=>{je(),U.recordEvent("jetpack_ai_assistant_block_accept",{feature:"ai-assistant"})},Ne=()=>{R?(K({title:e.content?e.content.trim():""}),J(n),U.recordEvent("jetpack_ai_assistant_block_accept",{feature:"ai-assistant"})):Pe()},Le=()=>{le(),te(),U.recordEvent("jetpack_ai_assistant_block_stop",{feature:"ai-assistant"})},[Te,Ae]=(0,m.useState)(!1),Me=()=>{Ae(!Te)},Re=(0,l.useBlockProps)({ref:G,className:f()({"is-waiting-response":oe})}),Ze=(0,l.useInnerBlocksProps)(Re),Ie=__("Ask Jetpack AI…","jetpack"),Be=__("Write about… Make a table for…","jetpack"),ze=(0,s.createElement)(s.Fragment,null,X&&r&&(0,s.createElement)(S.Z,{placement:"ai-assistant-block"}),!ge&&(0,s.createElement)(E.Z,null));return(0,s.createElement)(u.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{esc:()=>{["requesting","suggesting"].includes(he)&&Le()}}},(0,s.createElement)("div",Re,h?.message&&!F&&"error_quota_exceeded"!==h?.code&&(0,s.createElement)(u.Notice,{status:h.status,isDismissible:!1,className:"jetpack-ai-assistant__error"},h.message),we&&!ke&&(0,s.createElement)("div",{className:"jetpack-ai-assistant__content"},(0,s.createElement)(m.RawHTML,null,M.render(e.content))),we&&ke&&(0,s.createElement)("div",a()({className:"jetpack-ai-assistant__content is-layout-building-mode"},Ze)),(0,s.createElement)(l.InspectorControls,null,(0,s.createElement)(u.PanelBody,{initialOpen:!0},(0,s.createElement)(u.PanelRow,null,(0,s.createElement)(y.Z,{placement:w.I}))),(0,s.createElement)(u.PanelBody,{initialOpen:!0},(0,s.createElement)(u.PanelRow,null,(0,s.createElement)(_.Z,null)))),Z&&(0,s.createElement)(l.InspectorControls,null,(0,s.createElement)(u.PanelBody,{title:__("AI Playground","jetpack"),initialOpen:!0},(0,s.createElement)(u.PanelRow,null,(0,s.createElement)(u.ToggleControl,{label:__("Gutenberg Syntax","jetpack"),onChange:e=>t({useGutenbergSyntax:e}),checked:e.useGutenbergSyntax})),(0,s.createElement)(u.PanelRow,null,(0,s.createElement)(u.ToggleControl,{label:__("GPT-4","jetpack"),onChange:e=>t({useGpt4:e}),checked:e.useGpt4})),(0,s.createElement)(u.PanelRow,null,Te&&(0,s.createElement)(u.Modal,{title:__("Custom System Prompt","jetpack"),onRequestClose:Me},(0,s.createElement)(u.TextareaControl,{rows:20,label:__("Set up the custom system prompt ","jetpack"),onChange:e=>t({customSystemPrompt:e}),className:"jetpack-ai-assistant__custom-prompt",value:e.customSystemPrompt||(0,A.t4)({useGutenbergSyntax:e.useGutenbergSyntax,useGpt4:e.useGpt4})?.content}),(0,s.createElement)("div",{className:"jetpack-ai-assistant__custom-prompt__footer"},(0,s.createElement)(u.Button,{onClick:()=>t({customSystemPrompt:""}),variant:"secondary"},__("Restore the prompt","jetpack")),(0,s.createElement)(u.Button,{onClick:Me,variant:"secondary"},__("Close","jetpack")))),(0,s.createElement)(u.Button,{onClick:Me,variant:"secondary"},__("Set system custom prompt","jetpack"))))),!ye&&ge&&!Q&&(0,s.createElement)(x.Z,{isWaitingState:ye,contentIsLoaded:we,getSuggestionFromOpenAI:ie,retryRequest:pe,handleAcceptContent:Pe,handleAcceptTitle:Ne,handleGetSuggestion:Se,handleImageRequest:()=>{B([]),g({}),(0,T.b)(""===e.userPrompt.trim()?__("What would you like to see?","jetpack"):e.userPrompt,t,v,B,g,H),U.recordEvent("jetpack_ai_dalle_generation",{post_id:H})},handleTryAgain:null,showRetry:ce,contentBefore:ue,hasPostTitle:!!de?.length,wholeContent:me,promptType:e.promptType,setUserPrompt:e=>{if(!q?.current)return;q.current.focus(),t({userPrompt:e})},recordEvent:U.recordEvent,isGeneratingTitle:Ee}),(0,s.createElement)(o.tK,{ref:q,disabled:Q||!ge,value:e.userPrompt,placeholder:e?.content?Ie:Be,onChange:e=>{O(!0),t({userPrompt:e})},onSend:()=>{Se("userPrompt"),U.recordEvent("jetpack_ai_assistant_block_generate",{feature:"ai-assistant"})},onStop:Le,onAccept:()=>{Ee?Ne():Pe()},onDiscard:()=>{const r=e?.content===V(n).attributes?.content;t({content:e?.originalContent,promptType:void 0,messages:e?.originalMessages}),je(),r?U.recordEvent("jetpack_ai_assistant_block_dismiss"):U.recordEvent("jetpack_ai_assistant_block_discard",{feature:"ai-assistant"})},state:he,isTransparent:Q||!ge,showButtonLabels:!re,showAccept:"init"!==he&&we&&!ye,acceptLabel:xe,showGuideLine:we,showRemove:e?.content?.length>0,bannerComponent:ze}),!b&&I.length>0&&(0,s.createElement)(u.Flex,{direction:"column",style:{width:"100%"}},(0,s.createElement)(u.FlexBlock,{style:{textAlign:"center",margin:"12px",fontStyle:"italic",width:"100%"}},e.requestedPrompt),(0,s.createElement)(u.FlexBlock,{style:{fontSize:"20px",lineHeight:"38px"}},__("Please choose your image","jetpack")),(0,s.createElement)(u.Flex,{direction:"row",wrap:!0},I.map((e=>(0,s.createElement)(C.Z,{setImageModal:D,saveImage:ve,image:e,key:e}))))),!b&&z&&(0,s.createElement)(u.Modal,{onRequestClose:()=>D(null)},(0,s.createElement)(C.Z,{saveImage:ve,setImageModal:D,image:z,inModal:!0}))))}},27559:(e,t,n)=>{"use strict";var r=n(31985),a=n(23536),s=n(45624),o=n(6747);n(81765),n(54765),n(94662);(0,r.S)(a,{edit:s.Z,save:()=>null,transforms:o.Z})},54765:(e,t,n)=>{"use strict";n.d(t,{J7:()=>u,NP:()=>l});var r=n(4981),a=n(9818),s=n(92694),o=n(23536),i=n(71449);const l=["core/paragraph","core/heading","core/list"],c=window?.Jetpack_Editor_Initial_State?.available_blocks?.["ai-assistant-support"];function u(){if(!(0,r.getBlockType)(o.name))return!1;if(!c)return!1;if(!(0,i.b)())return!1;const{errorCode:e}=(0,a.select)("wordpress-com/plans")?.getAiAssistantFeature?.()||{};if(e)return!1;const{getHiddenBlockTypes:t}=(0,a.select)("core/edit-post")||{};return!(t?.()||[]).includes(o.name)}(0,s.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support",(function(e,t){return l.includes(t)&&u()?{...e,supports:{...e.supports,"jetpack/ai":{assistant:!0}}}:e}),100)},49259:(e,t,n)=>{"use strict";n.d(t,{$M:()=>i,ZP:()=>l});var r=n(51806),a=n(52175),s=n(94333),o=(n(99196),n(83059));function i(e){return`ai-assistant-block-${e}`}const l=(0,s.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(e,t),(0,r.createElement)(a.BlockControls,{group:"block"},(0,r.createElement)(o.ZP,{blockType:n})))}),"withAIAssistant")},79191:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(51806),a=n(42290),s=n(13419),o=n(4981),i=n(55609),l=n(94333),c=n(9818),u=n(69307),d=n(65736),p=n(53961),m=n(65235),h=n.n(m),g=(n(99196),n(3180)),f=n(5246),b=n(18135),v=n(71449),k=n(63634),y=n(79817),w=n(44110);const __=d.__,E={huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480};function _(e){if(!e?.length)return"";const t=(0,c.select)("core/block-editor").getBlock(e);if(!t)return"";const{innerBlocks:n}=t;return n?.length?n.reduce(((e,t)=>e+(0,o.serialize)(t)+"\n\n"),""):""}function C({clientId:e,className:t=""}){const n=(0,u.useRef)(null),o=(0,u.useRef)(null),{tracks:d}=(0,s.z$)(),m=(0,v.b)(),{inputValue:C,setInputValue:x,isVisible:S,assistantAnchor:j}=(0,u.useContext)(y.D),{dequeueAiAssistantFeatureAyncRequest:P}=(0,c.useDispatch)("wordpress-com/plans"),N=()=>{setTimeout((()=>{o.current?.focus?.()}),100)},{requestSuggestion:L,requestingState:T,stopSuggestion:A,requestingError:M}=(0,a.X_)({onDone:N}),{requireUpgrade:R}=(0,b.Z)(),Z=M?.code===a.$L||R,I="requesting"===T||"suggesting"===T,B="suggesting"===T||"done"===T,z=__("Ask Jetpack AI to create your form","jetpack"),D=__("Creating your form. Please wait a few moments.","jetpack"),{removeNotice:F}=(0,c.useDispatch)(p.store),O=(0,u.useCallback)((()=>{if(!C?.length)return;F(w.uu);const t=(0,k.r1)(k.Re,{request:C,content:_(e)});P(),L(t,{feature:"jetpack-form-ai-extension"}),d.recordEvent("jetpack_ai_assistant_block_generate",{feature:"jetpack-form-ai-extension"}),n?.current?.focus()}),[e,P,C,F,L,d]),U=(0,u.useCallback)((()=>{A(),N(),d.recordEvent("jetpack_ai_assistant_block_stop",{feature:"jetpack-form-ai-extension"})}),[A,d]),H=(0,l.useViewportMatch)("medium","<"),V=H&&j,q=(0,u.useRef)(null),G=(0,u.useRef)(H),[$,W]=(0,u.useState)(H);if((0,u.useEffect)((()=>{const e=n?.current;if(e)return q?.current||(q.current=new ResizeObserver((e=>{if(!S)return;if(V)return;const t=e[0].contentRect.width{q?.current?.disconnect()}}),[V,S]),(0,u.useEffect)((()=>{S&&d.recordEvent("jetpack_ai_assistant_prompt_show",{block_type:"jetpack/contact-form"})}),[S,d]),(0,u.useEffect)((()=>{const e=setTimeout((()=>{S&&o?.current&&o.current.focus()}),300);return function(){clearTimeout(e)}}),[]),!S)return null;const J=(0,r.createElement)("div",{className:"jetpack-ai-assistant__bar-wrapper"},(0,r.createElement)(i.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{esc:()=>{["requesting","suggesting"].includes(T)&&U()}}},(0,r.createElement)("div",{ref:n,className:h()("jetpack-ai-assistant__bar",{[t]:t,"is-fixed":V,"is-mobile-mode":$}),tabIndex:-1},Z&&(0,r.createElement)(f.Z,{placement:"jetpack-form-block"}),!m&&(0,r.createElement)(g.Z,null),(0,r.createElement)(a.tK,{ref:o,disabled:Z||!m,value:C,placeholder:I?D:z,onChange:x,onSend:O,onStop:U,state:T,isTransparent:Z||!m,showButtonLabels:!$,showGuideLine:B}))));return V?(0,u.createPortal)(J,j):J}},81732:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(51806),a=n(42290),s=n(55609),o=n(94333),i=n(69307),l=n(65736),c=n(99196),u=n(79817),d=n(44110);const __=l.__,p="jetpack-ai-assistant-bar__slot";function m({jetpackFormClientId:e}){const{isVisible:t,toggle:n,setAnchor:l,assistantAnchor:m}=(0,i.useContext)(u.D),{requestingState:h}=(0,a.X_)(),g=(0,i.useRef)(null),f=(0,o.useViewportMatch)("medium","<");(0,c.useEffect)((()=>{if(!g.current)return;const e=g.current.closest(".block-editor-block-contextual-toolbar");if(!e)return;let t=e.parentElement?.querySelector(`.${p}`);if(t)return e.after(t),l(t);t=document.createElement("div"),t.setAttribute("role","toolbar"),t.setAttribute("aria-label",__("AI Assistant","jetpack")),t.setAttribute("aria-orientation","horizontal"),t.className=p;const n=e.offsetHeight;t.style.top=`${n}px`,e.after(t),l(t)}),[l]),(0,c.useEffect)((()=>{f||m?.remove()}),[f,m]);const b=(0,i.useCallback)((()=>{if(!e)return n();(0,d.Vl)(e,n)}),[e,n]),v="requesting"===h||"suggesting"===h;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{"mod+/":n}}),(0,r.createElement)(s.ToolbarButton,{ref:g,showTooltip:!0,onClick:b,"aria-haspopup":"true","aria-expanded":t,label:__("Ask AI Assistant","jetpack"),icon:a.u_,disabled:v}))}},59090:(e,t,n)=>{"use strict";n.d(t,{aE:()=>r,nB:()=>a});const r=window?.Jetpack_Editor_Initial_State?.available_blocks?.["ai-assistant-form-support"]?.available,a=["jetpack/field-name","jetpack/field-email","jetpack/field-text","jetpack/field-textarea","jetpack/field-checkbox","jetpack/field-date","jetpack/field-telephone","jetpack/field-url","jetpack/field-checkbox-multiple","jetpack/field-radio","jetpack/field-select","jetpack/field-consent","jetpack/button"]},94662:(e,t,n)=>{"use strict";n.d(t,{G:()=>f});var r=n(51806),a=n(42290),s=n(13419),o=n(52175),i=n(4981),l=n(94333),c=n(9818),u=n(69307),d=n(92694),p=(n(99196),n(79191)),m=n(81732),h=n(59090),g=n(44110);function f(e,{checkChildrenBlocks:t=!1,clientId:n}={clientId:""}){const r=(0,i.getBlockType)("jetpack/ai-assistant"),{isModuleActive:a}=(0,s.el)("contact-form");if(!a)return!1;if(!r)return!1;if("string"!=typeof e)return!1;if(!h.aE)return!1;if(!n?.length)return!1;if(t){if(!h.nB.includes(e))return!1}else if("jetpack/contact-form"!==e)return!1;const{getHiddenBlockTypes:o}=(0,c.select)("core/edit-post")||{};return!(o?.()||[]).includes(e)}const b=(0,l.createHigherOrderComponent)((e=>t=>{const n=f(t?.name,{clientId:t.clientId}),{increaseAiAssistantRequestsCount:s}=(0,c.useDispatch)("wordpress-com/plans"),{eventSource:i}=(0,a.X_)({onDone:(0,u.useCallback)((()=>{s()}),[s]),onError:(0,u.useCallback)((e=>{"error_network"!==e.code&&"error_quota_exceeded"!==e.code&&s()}),[s])}),l=(0,u.useCallback)((()=>{i&&i?.close()}),[i]);if((0,u.useEffect)((()=>()=>{"jetpack/contact-form"===t?.name&&l()}),[l,t?.name]),!n)return(0,r.createElement)(e,t);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(e,t),(0,r.createElement)(p.Z,{clientId:t.clientId}),(0,r.createElement)(o.BlockControls,{group:"block"},(0,r.createElement)(m.Z,null)))}),"jetpackFormEditWithAiComponents");(0,d.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support",(function(e,t){return"jetpack/contact-form"!==t?e:{...e,edit:(0,a.oN)((0,g.ZP)(b(e.edit)))}}),100);const v=(0,l.createHigherOrderComponent)((e=>t=>{const n=(0,c.useSelect)((e=>{const n=e("core/block-editor"),{getBlockParentsByBlockName:r}=n;return r(t.clientId,"jetpack/contact-form")?.[0]}),[t.clientId]);if(!f(t?.name,{checkChildrenBlocks:!0,clientId:n}))return(0,r.createElement)(e,t);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(e,t),(0,r.createElement)(o.BlockControls,{group:"parent"},(0,r.createElement)(m.Z,{jetpackFormClientId:n})))}),"jetpackFormChildrenEditWithAiComponents");(0,d.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support",(function(e,t){return h.nB.includes(t)?{...e,edit:v(e.edit)}:e}))},79817:(e,t,n)=>{"use strict";n.d(t,{D:()=>s,v:()=>o});var r=n(51806),a=n(69307);const s=(0,a.createContext)({}),o=({value:e,children:t})=>(0,r.createElement)(s.Provider,{value:e,children:t})},44110:(e,t,n)=>{"use strict";n.d(t,{Vl:()=>b,ZP:()=>v,uu:()=>f});var r=n(51806),a=n(42290),s=n(4981),o=n(55609),i=n(94333),l=n(9818),c=n(69307),u=n(65736),d=n(53961),p=(n(99196),n(94662)),m=n(5863),h=n(56359),g=n(79817);const __=u.__,f="ai-assistant";function b(e,t){(0,l.dispatch)("core/block-editor").selectBlock(e).then(t)}const v=(0,i.createHigherOrderComponent)((e=>t=>{const{clientId:n,isSelected:i}=t,{replaceInnerBlocks:u}=(0,l.useDispatch)("core/block-editor"),v=(0,l.useSelect)((e=>e("core/editor")),[]),k=(0,l.useSelect)((e=>e("core/block-editor")),[]),y=v.getCurrentPostId(),w=k.getBlock(n),[E,_]=(0,c.useState)(""),C="jetpack/contact-form"===w?.name&&0===w?.innerBlocks?.length,[x,S]=(0,c.useState)(C),[j,P]=(0,c.useState)(!1),[N,L]=(0,c.useState)(null),T=(0,c.useRef)([]),A=(0,c.useCallback)((()=>{S(!0)}),[]),M=(0,c.useCallback)((()=>{S(!1)}),[]),R=(0,c.useCallback)((()=>{S(!x)}),[x]),Z=(0,c.useCallback)((e=>{L(e)}),[]),{createNotice:I}=(0,l.useDispatch)(d.store),B=(0,c.useCallback)((({severity:e,message:t,code:n})=>{n!==a.$L&&I(e,t,{isDismissible:!0,id:f})}),[I]);(0,c.useEffect)((()=>{i||M()}),[i,M]);const z=(0,c.useMemo)((()=>({inputValue:E,setInputValue:_,isVisible:x,show:A,hide:M,toggle:R,isFixed:j,setAssistantFixed:P,assistantAnchor:N,setAnchor:Z})),[E,x,A,M,R,j,N,Z]),D=(0,c.useCallback)(((e,t=!1)=>{const r=e.replace(//g,""),a=(0,h.J)(r),o=(0,s.parse)(a).filter((e=>e.isValid&&!["core/freeform","core/missing","core/html"].includes(e.name)));let i=!1;if(o.length0){const e=o[o.length-1],t=T.current[o.length-1];i=!(0,m.c)(e,t)}if(o.length>0&&(o.length!==T.current.length||i)&&(u(n,o),T.current=o),t){const e=o.filter((e=>"jetpack/button"===e.name));if(T.current=T.current||[],e.length>1){let t=0;T.current=T.current.filter((n=>"jetpack/button"!==n.name||(t++,t===e.length))),u(n,T.current)}else 0===e.length&&u(n,[...T.current,(0,s.createBlock)("jetpack/button",{label:__("Submit","jetpack"),element:"button",text:__("Submit","jetpack"),borderRadius:8,lock:{remove:!0}})]);T.current=[]}}),[n,u]);return(0,a.X_)({askQuestionOptions:{postId:y},onDone:e=>{D(e,!0),_("")},onSuggestion:D,onError:B}),(0,p.G)(t.name,{clientId:t.clientId})?(0,r.createElement)(g.v,{value:z},(0,r.createElement)(o.KeyboardShortcuts,{shortcuts:{"mod+/":()=>b(n,A)}},(0,r.createElement)(e,t))):(0,r.createElement)(e,t)}),"withUiHandlerDataProvider")},63206:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(6895),a=n(13419),s=n(46867),o=n(18135);function i(){const{nextTier:e,tierPlansEnabled:t}=(0,o.Z)(),n=t?(0,r.Z)("jetpack-ai-yearly-tier-upgrade-nudge",{site:(0,a.lQ)(),path:`jetpack_ai_yearly:-q-${e?.limit}`,query:`redirect_to=${window.location.href}`}):(0,r.Z)("jetpack-ai-monthly-plan-ai-assistant-block-banner",{site:(0,a.lQ)()}),i=(0,a.Ug)()||(0,a.Wp)()?n:`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/add-jetpack-ai`,{autosaveAndRedirect:l,isRedirecting:c}=(0,s.Z)(i);return{checkoutUrl:i,autosaveAndRedirect:l,isRedirecting:c}}},18135:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(9818);function a(){const{data:e,loading:t}=(0,r.useSelect)((e=>{const{getAiAssistantFeature:t,getIsRequestingAiAssistantFeature:n}=e("wordpress-com/plans");return{data:t(),loading:n()}}),[]),{fetchAiAssistantFeature:n,increaseAiAssistantRequestsCount:a}=(0,r.useDispatch)("wordpress-com/plans");return{...e,loading:t,error:null,refresh:n,increaseRequestsCount:a}}},42890:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(6975),a=n(69307);const s=window?.Jetpack_Editor_Initial_State?.tracksUserData||null,o=parseInt(window?.Jetpack_Editor_Initial_State?.wpcomBlogId)||0,i=()=>((0,a.useEffect)((()=>{s&&r.Z.initialize(s?.userid,s?.username,o?{blog_id:o}:{})}),[]),r.Z)},60751:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(42290),a=n(4981),s=n(9818),o=n(69307),i=n(65736),l=n(51128),c=n.n(l),u=n(27298),d=n(63634),p=n(854);const __=i.__,m=c()("jetpack-ai-assistant:event"),h=c()("jetpack-ai-assistant:prompt"),g=({attributes:e,clientId:t,content:n,setError:i,tracks:l,userPrompt:c,onSuggestionDone:g,onUnclearPrompt:f,onModeration:b,requireUpgrade:v,requestingState:k})=>{const[y,w]=(0,o.useState)(!1),[E,_]=(0,o.useState)(!1),[C,x]=(0,o.useState)(!1),[S,j]=(0,o.useState)(!1),[P,N]=(0,o.useState)(""),{updateBlockAttributes:L}=(0,s.useDispatch)("core/block-editor"),{dequeueAiAssistantFeatureAyncRequest:T,setAiAssistantFeatureRequireUpgrade:A}=(0,s.useDispatch)("wordpress-com/plans"),[M,R]=(0,o.useState)(k||"init"),Z=(0,o.useRef)(),I=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("title")));let B=!1;const z=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("categories")))||[],D=(0,s.useSelect)((e=>z.map((t=>{const n=e("core").getEntityRecord("taxonomy","category",t);if(n)return n;B=!0})).filter(Boolean)),[z]),F=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("tags")),[])||[],O=(0,s.useSelect)((e=>F.map((t=>{const n=e("core").getEntityRecord("taxonomy","post_tag",t);if(n)return n;B=!0})).filter(Boolean)),[F]);(0,o.useEffect)((()=>(w(B),()=>{Z?.current&&(m("Cleaning things up..."),Z?.current?.close())})),[B,Z]);const U=(0,s.useSelect)((e=>e("core/editor").getCurrentPostId())),H=(D.filter((e=>1!==e.id)).map((({name:e})=>e)).join(", "),O.map((({name:e})=>e)).join(", "),async(o,g={})=>{T();const k=g?.functions?.reduce(((e,{name:t,implementation:n})=>({...e,[t]:n})),{});if(v)return R("error"),_(!1),x(!1),j(!1),void i({code:"error_quota_exceeded",message:__("You have reached the limit of requests for this site.","jetpack"),status:"info"});if(g={retryRequest:!1,tone:u.Nj,...g},E)return;j(!1),i({});let y=P;l.recordEvent("jetpack_ai_chat_completion",{post_id:U});const w=[...e.messages]??[];let C={};if(g.retryRequest)C=y[y.length-1];else{const r=e?.isLayoutBuldingModeEnable?(0,p.WN)(t):(0,p.xN)();y=(0,d.Iq)({generatedContent:n,allPostContent:r,postContentAbove:(0,p.h7)(t),currentPostTitle:I,options:g,userPrompt:c,type:o,isGeneratingTitle:"generateTitle"===e.promptType,useGutenbergSyntax:!!e?.useGutenbergSyntax,customSystemPrompt:e?.customSystemPrompt}),C=y.pop(),y=[...y,...w],y.push(C),N(y),"generateTitle"!==e.promptType&&L(t,{promptType:o})}try{_(!0),x(!0),y.forEach((({role:e,content:t},n)=>h("(%s/%s) %o\n%s",n+1,y.length,`[${e}]`,t))),R("requesting"),Z.current=await(0,r.jt)(y,{postId:U,requireUpgrade:v,feature:e?.useGpt4?"ai-assistant-experimental":"ai-assistant",functions:g?.functions}),R("suggesting")}catch(e){e.message?i({message:e.message,code:e?.code||"unknown",status:"error"}):i({message:__("Whoops, we have encountered an error. AI is like really, really hard and this is an experimental feature. Please try again later.","jetpack"),code:"unknown",status:"error"}),j(!0),_(!1),x(!1)}const S=async t=>{const{detail:n}=t,a={role:"assistant",content:null,function_call:n},s=await(k[n.name]?.(JSON.parse(n.arguments))),o={role:"function",name:n?.name,content:JSON.stringify(s)};y=[...y,a,o],Z?.current?.removeEventListener("function_done",S),Z?.current?.removeEventListener("done",M),Z?.current?.removeEventListener("error_unclear_prompt",B),Z?.current?.removeEventListener("error_network",D),Z?.current?.removeEventListener("error_context_too_large",z),Z?.current?.removeEventListener("error_service_unavailable",F),Z?.current?.removeEventListener("error_quota_exceeded",O),Z?.current?.removeEventListener("error_moderation",H),Z?.current?.removeEventListener("suggestion",q),Z.current=await(0,r.jt)(y,{postId:U,requireUpgrade:v,feature:e?.useGpt4?"ai-assistant-experimental":null,functions:g.functions}),Z?.current?.addEventListener("function_done",S),Z?.current?.addEventListener("done",M),Z?.current?.addEventListener("error_unclear_prompt",B),Z?.current?.addEventListener("error_network",D),Z?.current?.addEventListener("error_context_too_large",z),Z?.current?.addEventListener("error_service_unavailable",F),Z?.current?.addEventListener("error_quota_exceeded",O),Z?.current?.addEventListener("error_moderation",H),Z?.current?.addEventListener("suggestion",q)},M=n=>{const{detail:r}=n;R("done");const o=r.replaceAll(d._W,""),i={role:"assistant",content:o};w.push(C,i),h("Add %o\n%s",`[${C.role}]`,C.content),h("Add %o\n%s",`[${i.role}]`,i.content),w.length>20&&w.splice(0,w.length-20),V();const l=e?.useGutenbergSyntax;if(L(t,{content:o,messages:w}),!l)return;const{replaceInnerBlocks:c}=(0,s.dispatch)("core/block-editor"),u=(0,a.parse)(r).filter((e=>e.isValid));c(t,u)},B=()=>{R("error"),Z?.current?.close(),_(!1),x(!1),i({code:"error_unclear_prompt",message:__("Your request was unclear. Mind trying again?","jetpack"),status:"info"}),f?.()},z=()=>{R("error"),Z?.current?.close(),_(!1),x(!1),j(!1),i({code:"error_context_too_large",message:__("The content is too large to be processed all at once. Please try to shorten it or divide it into smaller parts.","jetpack"),status:"info"})},D=({detail:r})=>{R("error");const{name:a,message:s}=r;"TypeError"===a&&"Failed to fetch"===s&&(w.splice(0,8),L(t,{messages:w}),y=(0,d.Iq)({generatedContent:n,allPostContent:(0,p.xN)(),postContentAbove:(0,p.h7)(t),currentPostTitle:I,options:g,userPrompt:c,type:o,isGeneratingTitle:"generateTitle"===e.promptType,useGutenbergSyntax:!!e?.useGutenbergSyntax,customSystemPrompt:e?.customSystemPrompt}),N([...y,...w,C])),Z?.current?.close(),_(!1),x(!1),j(!0),i({code:"error_network",message:__("It was not possible to process your request. Mind trying again?","jetpack"),status:"info"})},F=()=>{R("error"),Z?.current?.close(),_(!1),x(!1),j(!0),i({code:"error_service_unavailable",message:__("Jetpack AI services are currently unavailable. Sorry for the inconvenience.","jetpack"),status:"info"})},O=()=>{R("error"),Z?.current?.close(),_(!1),x(!1),j(!1),A(!0),i({code:"error_quota_exceeded",message:__("You have reached the limit of requests for this site.","jetpack"),status:"info"})},H=()=>{R("error"),Z?.current?.close(),_(!1),x(!1),j(!1),i({code:"error_moderation",message:__("This request has been flagged by our moderation system. Please try to rephrase it and try again.","jetpack"),status:"info"}),b?.()},q=e=>{x(!1),m("(suggestion)",e?.detail),L(t,{content:e?.detail?.replaceAll(d._W,"")})};return Z?.current?.addEventListener("function_done",S),Z?.current?.addEventListener("done",M),Z?.current?.addEventListener("error_unclear_prompt",B),Z?.current?.addEventListener("error_network",D),Z?.current?.addEventListener("error_context_too_large",z),Z?.current?.addEventListener("error_service_unavailable",F),Z?.current?.addEventListener("error_quota_exceeded",O),Z?.current?.addEventListener("error_moderation",H),Z?.current?.addEventListener("suggestion",q),Z?.current});function V(){Z?.current&&(Z?.current?.close(),_(!1),x(!1),g?.(),R("done"))}return{isLoadingCategories:y,isLoadingCompletion:E,wasCompletionJustRequested:C,setIsLoadingCategories:w,setShowRetry:j,showRetry:S,postTitle:I,contentBefore:(0,p.h7)(t),wholeContent:(0,p.xN)(),requestingState:M,getSuggestionFromOpenAI:H,stopSuggestion:V,retryRequest:()=>H("",{retryRequest:!0})}}},71449:(e,t,n)=>{"use strict";n.d(t,{b:()=>u,d:()=>d});var r=n(13419),a=n(51128),s=n.n(a);const o=window?.JP_CONNECTION_INITIAL_STATE,i=s()("jetpack-ai-assistant:connection");let l=!1;const c=e=>{l||(i(e),l=!0)};function u(){return(0,r.Wp)()?(c("Simple site connected ✅"),!0):(0,r.Ug)()?(c("Atomic site connected ✅"),!0):o?.connectionStatus?.isUserConnected?(c("Jetpack user is connected ✅"),!0):(c("User is not connected ❌"),!1)}function d(){if((0,r.Wp)())return!0;return!1==!(o?.userConnectionData?.currentUser?.permissions??{}).manage_options}},3687:(e,t,n)=>{"use strict";n.d(t,{b:()=>o});var r=n(86989),a=n.n(r),s=n(65736);const __=s.__;function o(e,t,n,r,s,o){n(!0),s(null),t({requestedPrompt:e}),a()({path:"/wpcom/v2/jetpack-ai/images/generations",method:"POST",data:{prompt:e,post_id:o}}).then((e=>{n(!1);const t=e.data.map((e=>"data:image/png;base64,"+e.b64_json));r(t)})).catch((e=>{e.message?s(e.message):s(__("Whoops, we have encountered an error. AI is like really, really hard and this is an experimental feature. Please try again later.","jetpack")),n(!1)}))}},57832:(e,t,n)=>{"use strict";n.d(t,{v_:()=>i,x1:()=>l});var r=n(63634);const a="title",s="content",o=null;function i(e,t){return{role:"jetpack-ai",context:{type:"ai-assistant-initial-prompt",for:u(e),...t?.length?{custom_system_prompt:t}:{}}}}function l({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:a,options:s,type:o,userPrompt:i,isGeneratingTitle:l}){const u=[],d="generated"===s?.contentType;let p=null;switch(o){case r.qA:p=a;break;case r.sz:case r.hI:case r.Hd:p=n;break;case r.jf:p=t;break;case r.TV:case r.DR:p=e;break;case r.Lg:case r.Lq:case r.Nw:p=d?e:t;break;case r.Gh:p=e||t}const m=function(e,t){return!e&&t?.length>0?{role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:t}}:null}(o===r.Gh?!!e?.length:d,p);return m&&u.push(m),u.push({role:"jetpack-ai",context:c({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:a,options:s,type:o,userPrompt:i,isGeneratingTitle:l})}),u}function c({options:e,type:t,userPrompt:n,isGeneratingTitle:i}){const l=function(e,t,n){return e?a:!t||n?s:o}(i,"generated"===e?.contentType,e?.fromExtension||!1);return{type:u(t),...l?{subject:l}:{},...t===r.Lg&&e?.tone?{tone:e.tone}:{},...t===r.Nw&&e?.language?{language:e.language}:{},...t===r.Gh&&n?{request:n}:{}}}function u(e){return{[r.qA]:"ai-assistant-summary-by-title",[r.sz]:"ai-assistant-continue-writing",[r.hI]:"ai-assistant-simplify",[r.Hd]:"ai-assistant-correct-spelling",[r.jf]:"ai-assistant-generate-title",[r.TV]:"ai-assistant-make-longer",[r.DR]:"ai-assistant-make-shorter",[r.Lg]:"ai-assistant-change-tone",[r.Lq]:"ai-assistant-summarize",[r.Nw]:"ai-assistant-change-language",[r.Gh]:"ai-assistant-user-prompt"}[e]}},63634:(e,t,n)=>{"use strict";n.d(t,{DR:()=>p,Gh:()=>f,Hd:()=>c,Iq:()=>T,Lg:()=>m,Lq:()=>h,Nw:()=>g,Re:()=>b,SV:()=>v,TV:()=>d,_W:()=>y,hI:()=>l,jf:()=>u,qA:()=>o,r1:()=>A,sz:()=>i,t4:()=>w});var r=n(51128),a=n.n(r),s=n(57832);const o="titleSummary",i="continue",l="simplify",c="correctSpelling",u="generateTitle",d="makeLonger",p="makeShorter",m="changeTone",h="summarize",g="changeLanguage",f="userPrompt",b="jetpackFormCustomPrompt",v=!0,k=a()("jetpack-ai-assistant:prompt"),y="````";function w({context:e="You are an advanced polyglot ghostwriter. Your task is to generate and modify content based on user requests. This functionality is integrated into the Jetpack product developed by Automattic. Users interact with you through a Gutenberg block, you are inside the WordPress editor",rules:t,useGutenbergSyntax:n=!1,useMarkdown:r=!0,customSystemPrompt:a=null}){let s="";t?.length&&(s=t.map((e=>`- ${e}.`)).join("\n")+"\n");let o=`${e}. Strictly follow these rules:\n\n${s}${r?"- Format your responses in Markdown syntax, ready to be published.":""}\n- Execute the request without any acknowledgement to the user.\n- Avoid sensitive or controversial topics and ensure your responses are grammatically correct and coherent.\n- If you cannot generate a meaningful response to a user's request, reply with “__JETPACK_AI_ERROR__“. This term should only be used in this context, it is used to generate user facing errors.\n`;return n&&(o=`${e}. Strictly follow these rules:\n\t\n${s}- Format your responses in Gutenberg HTML format including HTML comments for WordPress blocks. All responses must be valid Gutenberg HTML.\n- Use only WordPress core blocks\n- Execute the request without any acknowledgement to the user.\n- Avoid sensitive or controversial topics and ensure your responses are grammatically correct and coherent.\n- If you cannot generate a meaningful response to a user's request, reply with “__JETPACK_AI_ERROR__“. This term should only be used in this context, it is used to generate user facing errors.\n`),a&&(o=a),{role:"system",content:o}}function E(e){return`${y}${e.replaceAll(y,"")}${y}`}function _({content:e,role:t="user"}){return[{role:t,content:`Repeat the text delimited with ${y}, without the delimiter, correcting any spelling and grammar mistakes directly in the text without providing feedback about the corrections, keeping the language of the text: ${E(e)}`}]}function C({content:e,role:t="user"}){return[{role:t,content:`Simplify the text delimited with ${y}, using words and phrases that are easier to understand and keeping the language of the text: ${E(e)}`}]}function x({content:e,role:t="user"}){return[{role:t,content:`Summarize the text delimited with ${y}, keeping the language of the text: ${E(e)}`}]}function S({content:e,role:t="user"}){return[{role:t,content:`Expand the text delimited with ${y} to about double its size, keeping the language of the text: ${E(e)}`}]}function j({content:e,language:t,role:n="user"}){return[{role:n,content:`Translate the text delimited with ${y} to ${t}, preserving the same core meaning and tone: ${E(e)}`}]}function P({content:e,tone:t,role:n="user"}){return[{role:n,content:`Rewrite the text delimited with ${y}, with a ${t} tone, keeping the language of the text: ${E(e)}`}]}function N({content:e,request:t}){if(!t)throw new Error("You must provide a custom prompt for the Jetpack Form Custom Prompt");return[{role:"jetpack-ai",context:{type:"form-ai-extension",content:e,request:t}}]}const L=({rules:e=[],request:t=null,relevantContent:n=null,isContentGenerated:r=!1,isGeneratingTitle:a=!1,useGutenbergSyntax:s=!1,customSystemPrompt:o=null})=>{if(!t&&!n)throw new Error("You must provide either a request or content");const i=[w({rules:e,useGutenbergSyntax:s,customSystemPrompt:o})];if(null!=n&&n?.length){const e=n.replaceAll(y,"");r||i.push({role:"user",content:`The specific relevant content for this request, if necessary, delimited with ${y} characters: ${y}${e}${y}`})}const l={role:"user",content:t};return a&&(l.content+=" Only output a title, do not generate body content."),i.push(l),i.forEach((e=>{k(`Role: ${e?.role}.\nMessage: ${e?.content}\n---`)})),i};function T({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:r,options:a,type:b,userPrompt:k,isGeneratingTitle:y,useGutenbergSyntax:w,customSystemPrompt:E}){if(v){return[(0,s.v_)(b,E),...(0,s.x1)({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:r,options:a,type:b,userPrompt:k,isGeneratingTitle:y})]}const _="generated"===a?.contentType,C=function(e,t=!1,n){const r="generated"===n?.contentType;let a="the title";t||(a=r?"your last answer":"the content");const s=`. Do not switch to any language other than the language of ${a} in your response`;switch(e){case o:return{request:`Write a short piece for a blog post based on ${a}, keeping the same language`};case i:return{request:`Continue writing from ${a}${s}.`,rules:r?[]:["Only output the continuation of the content, without repeating it"]};case l:return{request:`Simplify ${a}${s}.`,rules:["Use words and phrases that are easier to understand for non-technical people","Use as much of the original language as possible"]};case c:return{request:`Repeat ${a}, correcting any spelling and grammar mistakes, and do not add new content${s}.`};case u:return{request:"Generate a new title for this blog post and only output the title.",rules:["Only output the raw title, without any prefix or quotes"]};case d:return{request:`Make ${a} longer${s}.`};case p:return{request:`Make ${a} shorter${s}.`};case m:return{request:`Rewrite ${a} with ${/^[aeiou]/i.test(n.tone)?"an":"a"} ${n.tone} tone${s}.`};case h:return{request:`Summarize ${a}${s}.`};case g:return{request:`Translate ${a} to the following language: ${n.language}.`};default:return null}}(b,y,a);if(b!==f){let a;switch(b){case o:a=r;break;case i:case l:case c:a=n;break;case u:a=t;break;case d:case p:a=e;break;case m:case h:case g:a=_?e:t}return L({...C,relevantContent:a,isContentGenerated:_,isGeneratingTitle:y,useGutenbergSyntax:w,customSystemPrompt:E})}return L({request:k,relevantContent:e||t,isContentGenerated:!!e?.length,isGeneratingTitle:y,useGutenbergSyntax:w,customSystemPrompt:E})}function A(e,t){k("Addressing prompt type: %o %o",e,t);const{prevMessages:n=[]}=t,r={role:"system",content:"You are an advanced polyglot ghostwriter. Your task is to help the user create and modify content based on their requests.\nWriting rules:\n- Execute the request without any acknowledgment or explanation to the user.\n- Avoid sensitive or controversial topics and ensure your responses are grammatically correct and coherent.\n- If you cannot generate a meaningful response to a user's request, reply with “__JETPACK_AI_ERROR__“. This term should only be used in this context, it is used to generate user facing errors.\n"},a=[...n];switch(a.push(r),e){case c:return[...a,..._(t)];case l:return[...a,...C(t)];case h:return[...a,...x(t)];case d:return[...a,...S(t)];case g:return[...a,...j(t)];case m:return[...a,...P(t)];case b:return[...n,...N(t)];default:throw new Error(`Unknown prompt type: ${e}`)}}},74359:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r=new(n(92213).Z)({emDelimiter:"_",headingStyle:"atx"});r.addRule("strikethrough",{filter:["del","s","strike"],replacement:function(e){return"~~"+e+"~~"}});const a=r},854:(e,t,n)=>{"use strict";n.d(t,{WN:()=>l,h7:()=>o,t$:()=>c,xN:()=>i});var r=n(4981),a=n(9818),s=n(74359);function o(e){if(!e)return"";const t=(0,a.select)("core/block-editor"),n=t.getBlockIndex(e),o=t.getBlocks().slice(0,n)??[];return o?.length?s.Z.turndown((0,r.serialize)(o)):""}function i(){const e=(0,a.select)("core/block-editor").getBlocks();return e?.length?s.Z.turndown((0,r.serialize)(e)):""}function l(e){const t=(0,a.select)("core/block-editor").getBlock(e);return t?.innerBlocks?.length?t.innerBlocks.filter((e=>null!=e)).map((e=>(0,r.getBlockContent)(e.clientId))).join("\n\n"):""}function c(e){if(!e?.replace(/\s+/,"").length)return"";const t=document.createElement("div");t.innerHTML=e;const{textContent:n,innerText:r}=t;return n&&!n.replace(/\s+/,"").length||r&&!r.replace(/\s+/,"").length?"":t.textContent||t.innerText||""}},5863:(e,t,n)=>{"use strict";n.d(t,{c:()=>s});const r=e=>{delete e.clientId;for(const t of e.innerBlocks??[])r(t);return e},a=e=>r((e=>JSON.parse(JSON.stringify(e)))(e));function s(e,t){const n=a(e),r=a(t);return JSON.stringify(n)===JSON.stringify(r)}},56359:(e,t,n)=>{"use strict";function r(e){const t=document.createElement("div");return t.innerHTML=e,t.innerHTML}n.d(t,{J:()=>r})},81765:(e,t,n)=>{"use strict";var r=n(4981),a=n(92694),s=n(54765),o=n(49259);(0,a.addFilter)("blocks.registerBlockType","jetpack/handle-jetpack-ai-supports",(function(e){const t=(0,r.getBlockSupport)(e,"jetpack/ai");return t&&t?.assistant&&(0,s.J7)()?{...e,edit:(0,o.ZP)(e.edit)}:e}),100)},6747:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u,b:()=>c});var r=n(4981),a=n(23536),s=n(54765),o=n(63634),i=n(74359);const l=[];function c(e,t){const{content:n,...s}=t;let l=n;"core/heading"===e&&t?.level&&(l=l.replace(/<(\/?)h\d([^>]*)>/g,`<$1h${t.level}$2>`));const c=i.Z.turndown(l),u=[];return o.SV?u.push({role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:c}}):(u.push({role:"user",content:"Tell me some content for this block, please."}),u.push({role:"assistant",content:c})),(0,r.createBlock)(a.name,{...s,content:c,originalContent:c,messages:u,originalMessages:u})}for(const e of s.NP)l.push({type:"block",blocks:[e],isMatch:()=>(0,s.J7)(),transform:(t,n)=>{const a=(0,r.getSaveContent)(e,t,n);return c(e,{...t,content:a})}});const u={from:l}},98825:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(65736),s=n(26546),o=n(46867);const __=a.__,i=()=>{const e=`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/connection`,{autosaveAndRedirect:t,isRedirecting:n}=(0,o.Z)(e);if(window?.Jetpack_Editor_Initial_State?.jetpack?.is_current_user_connected)return null;return(0,r.createElement)(s.p,{buttonText:__("Reconnect Jetpack","jetpack"),checkoutUrl:e,className:"jetpack-ai-connect-banner",description:__("Your account is not connected to Jetpack at the moment.","jetpack"),goToCheckoutPage:e=>{t(e)},isRedirecting:n,visible:!0,align:null,title:null,context:null})}},56352:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(65736),s=n(26546),o=n(46867);const __=a.__,i=()=>{let e=window?.Jetpack_Editor_Initial_State?.adminUrl||"";e=e.replace(/wp-admin\/\?frame-nonce=[a-z0-9]+/,"wp-admin/");const t=`${e}admin.php?page=jetpack-search`,{autosaveAndRedirect:n,isRedirecting:a}=(0,o.Z)(t);if(window?.Jetpack_AIChatBlock?.jetpackSettings?.instant_search_enabled)return null;return(0,r.createElement)(s.p,{buttonText:__("Enable Jetpack Search","jetpack"),checkoutUrl:t,className:"jetpack-ai-connect-banner",description:__("You need to enable Jetpack Search so that Jetpack AI can index your site.","jetpack"),goToCheckoutPage:e=>{n(e)},isRedirecting:a,visible:!0,align:null,title:null,context:null})}},23719:(e,t,n)=>{"use strict";n.d(t,{V:()=>l});var r=n(51806),a=n(52175),s=n(55609),o=n(37798),i=n(65736);const __=i.__;function l({setAttributes:e,placeholder:t,showCopy:n,showFeedback:i,showSources:l}){const[c,u]=(0,o.useEntityProp)("root","site","jetpack_search_ai_prompt_override");return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,r.createElement)(s.BaseControl,{label:__("Placeholder Text","jetpack"),className:"jetpack-ai-chat__ask-button-text"},(0,r.createElement)(s.TextControl,{placeholder:__("Ask a question about this site.","jetpack"),onChange:t=>e({placeholder:t}),value:t})))),(0,r.createElement)(a.InspectorAdvancedControls,null,(0,r.createElement)(s.BaseControl,{label:__("Additional instructions","jetpack"),help:__("Give Jetpack AI additional instructions for answer length, format, and tone.","jetpack")},(0,r.createElement)(s.TextareaControl,{value:c,onChange:u})),(0,r.createElement)(s.ToggleControl,{label:__("Show copy answer button.","jetpack"),help:__("Allow users to easily copy the answer.","jetpack"),checked:n,onChange:t=>e({showCopy:t})}),(0,r.createElement)(s.ToggleControl,{label:__("Show rating button.","jetpack"),help:__("Allow users to rate the answer and give feedback.","jetpack"),checked:i,onChange:t=>e({showFeedback:t})}),(0,r.createElement)(s.ToggleControl,{label:__("Show list of sources.","jetpack"),help:__("Show used sources at the bottom of the answer.","jetpack"),checked:l,onChange:t=>e({showSources:t})})))}},74021:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(51806),a=n(42290),s=n(52175),o=n(55609),i=n(9818),l=n(98825),c=n(56352),u=n(23719);function d({attributes:e,setAttributes:t,clientId:n}){const d=(0,s.useBlockProps)(),p=(0,i.useSelect)((e=>e("core/block-editor").isBlockSelected(n)),[n]);return(0,r.createElement)("div",d,(0,r.createElement)(l.Z,null),(0,r.createElement)(c.Z,null),(0,r.createElement)("div",{className:"jetpack-ai-chat-question-wrapper"},(0,r.createElement)(o.TextControl,{className:"jetpack-ai-chat-question-input",placeholder:e.placeholder,disabled:!0}),(0,r.createElement)(s.RichText,{className:"wp-block-button__link jetpack-ai-chat-question-button",onChange:e=>t({askButtonLabel:e}),value:e.askButtonLabel,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/strikethrough"]})),p&&(0,r.createElement)(a.Eo,null),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(u.V,{askButtonLabel:e.askButtonLabel,placeholder:e.placeholder,setAttributes:t,showCopy:e.showCopy,showFeedback:e.showFeedback,showSources:e.showSources})))}},86116:(e,t,n)=>{"use strict";var r=n(31985),a=n(21540),s=n(74021),o=n(148);(0,r.S)(a,{edit:s.Z,save:o.Z})},148:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(51806),a=n(52175);function s({attributes:e}){const t=a.useBlockProps.save({"data-ask-button-label":e.askButtonLabel});return(0,r.createElement)("div",t)}},14303:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(51806),a=n(86989),s=n.n(a),o=n(52175),i=n(55609),l=n(9818),c=n(69307),u=n(65736),d=n(96483),p=n(65235),m=n.n(p),h=n(44266);const __=u.__,_x=u._x;const g=(0,i.withNotices)((function({attributes:e,noticeOperations:t,noticeUI:n,setAttributes:a}){const p=(0,c.useRef)(!1),{answersLink:g,answersLinkText:f,gravatars:b,promptFetched:v,promptId:k,promptLabel:y,promptText:w,showLabel:E,showResponses:_,tagsAdded:C,isBloganuary:x}=e,S=(0,o.useBlockProps)({className:"jetpack-blogging-prompt"});(0,h.n)(k,C,(e=>a({tagsAdded:e})));const j=(0,l.useSelect)((e=>{const{getEntityRecord:t,hasFinishedResolution:n}=e("core"),r=t("root","site")?.language||"en_US";return n("getEntityRecord",["root","site"])?r:null}),[]);(0,c.useEffect)((()=>{if(!j||p.current||v)return;const e=()=>{a({promptFetched:!1,promptId:null,tagsAdded:!1}),p.current=!1,t.removeAllNotices()};let n="/wpcom/v3/blogging-prompts";if(k)n+="/"+encodeURIComponent(k);else{const e=new Date;n+=`?after=--${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}&order=desc`}n=(0,d.addQueryArgs)(n,{_locale:j,force_year:(new Date)?.getFullYear()}),p.current=!0,s()({path:n}).then((e=>{const t=k?e:e[0];a({answersLink:t.answered_link,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((n=>{a({promptFetched:!0});const s="rest_post_invalid_id"===n.code&&k?(o=k,(0,r.createElement)(r.Fragment,null,(0,u.sprintf)(/* translators: %d is the prompt id. */ __("Prompt with id %d not found.","jetpack"),o)," ",(0,r.createElement)(i.Button,{variant:"link",onClick:e},__("Reset prompt","jetpack")))):(t=>(0,r.createElement)(r.Fragment,null,(0,u.sprintf)(/* translators: %s is the error message. */ diff --git a/_inc/build/admin.asset.php b/_inc/build/admin.asset.php index 71f911ac33..54b51ee5f2 100644 --- a/_inc/build/admin.asset.php +++ b/_inc/build/admin.asset.php @@ -1 +1 @@ - array('jquery', 'lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'bbb92b33aafcdf56e720'); + array('jquery', 'lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '90795b06fb4c50d364b6'); diff --git a/_inc/build/admin.js b/_inc/build/admin.js index a1b3e4926a..38cdbe9a8d 100644 --- a/_inc/build/admin.js +++ b/_inc/build/admin.js @@ -13,7 +13,7 @@ __("Welcome to Jetpack %s traveler!","jetpack"),c.partner.name),buttonLabel:(0,i __("Set up & redeem %s","jetpack"),c.product.title),redirectUri:`admin.php?page=jetpack&partnerCoupon=${c.coupon_code}`,connectionStatus:r},d().createElement("p",null,(0,i.sprintf)(/* translators: %s: Name of a Jetpack product. */ __("Redeem your coupon and get started with %s for free the first year!","jetpack"),c.product.title)),d().createElement("ul",null,c.product.features.map(((e,t)=>d().createElement("li",{key:t},e)))),r.hasConnectedOwner&&d().createElement(a.Z,{label:(0,i.sprintf)(/* translators: %s: Name of a Jetpack product. */ __("Redeem %s","jetpack"),c.product.title),onClick:k})))};m.propTypes={apiRoot:l().string.isRequired,apiNonce:l().string.isRequired,assetBaseUrl:l().string.isRequired,connectionStatus:l().object.isRequired,partnerCoupon:l().object.isRequired,registrationNonce:l().string.isRequired,siteRawUrl:l().string.isRequired,tracksUserData:l().bool.isRequired,analytics:l().object};const h=m},1862:(e,t,s)=>{"use strict";s.d(t,{es:()=>a.Z});var a=s(10221);s(84859),s(881)},81050:(e,t,s)=>{"use strict";s.d(t,{AutoConversionToggle:()=>n.Z,RefreshJetpackSocialSettingsWrapper:()=>r.Z,SocialImageGeneratorToggle:()=>a.Z,TemplatePickerButton:()=>i.Z});s(23177),s(4277),s(49021),s(95788),s(8454),s(74140),s(54005),s(8350);var a=s(76848),n=s(92116),i=s(79631),r=(s(8714),s(19649),s(52403),s(91750),s(77106));s(37568),s(48751),s(14085),s(45579),s(75323),s(42032),s(91474),s(19890),s(32637),s(86419),s(34431),s(71806),s(22917)},92116:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var a=s(48229),n=s(9818),i=s(69307),r=s(99196),o=s.n(r),c=s(23177);const l=({toggleClass:e,children:t})=>{const{isEnabled:s,isUpdating:r}=(0,n.useSelect)((e=>{const t=e(c.Eg);return{isEnabled:t.isAutoConversionEnabled(),isUpdating:t.isAutoConversionSettingsUpdating()}}),[]),l=(0,n.useDispatch)(c.Eg).updateAutoConversionSettings,p=(0,i.useCallback)((()=>{l({enabled:!s})}),[s,l]);return o().createElement(a.Z,{className:e,disabled:r,checked:s,onChange:p,label:t})}},85761:(e,t,s)=>{"use strict";s.d(t,{Z:()=>p});var a=s(3396),n=s(69307),i=s(65235),r=s.n(i),o=s(15844),c=s.n(o);const l=e=>{const{checked:t,serviceName:s,label:i,onClick:o,profilePicture:c}=e,[l,p]=(0,n.useState)(!!c),d=(0,n.useCallback)((()=>p(!1)),[]),u=(0,n.useCallback)((e=>{13===e.keyCode&&o()}),[o]);return React.createElement("div",{onClick:o,onKeyDown:u,role:"switch","aria-checked":t,tabIndex:"0",className:r()("components-connection-icon",{"components-connection-icon__picture":l})},l&&React.createElement("img",{src:c,alt:i,onError:d}),React.createElement(a.av,{alt:i,serviceName:"instagram-business"===s?"instagram":"twitter"===s?"x":s,className:"jetpack-publicize-gutenberg-social-icon"}))};l.propTypes={serviceName:c().string,label:c().string,profilePicture:c().string};const p=l},24479:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var a=s(65235),n=s.n(a),i=s(15844),r=s.n(i),o=s(85761);const c=e=>{const{checked:t,disabled:s,onChange:a,serviceName:i,label:r,profilePicture:c}=e,l=n()("components-connection-toggle",{"is-not-checked":!t,"is-disabled":s});return React.createElement("div",{className:l,title:r},React.createElement(o.Z,{checked:t,label:r,onClick:a,serviceName:i,profilePicture:c}))};c.propTypes={className:r().string,checked:r().bool,id:r().string.isRequired,disabled:r().bool,onChange:r().func,serviceName:r().string,label:r().string,profilePicture:r().string};const l=c},49021:(e,t,s)=>{"use strict";var a=s(55609),n=s(94333),i=s(9818),r=s(69307),o=s(65736),c=s(23177);const __=o.__;class l extends r.Component{componentDidMount(){this.props.refreshConnections()}refreshConnectionClick=e=>{const{href:t,title:s}=e.target;e.preventDefault();const a=window.open(t,s,""),n=window.setInterval((()=>{!1!==a.closed&&(window.clearInterval(n),this.props.refreshConnections())}),500)};renderRefreshableConnections(){const{failedConnections:e}=this.props,t=e.filter((e=>e.can_refresh));return t.length?React.createElement(a.Notice,{className:"jetpack-publicize-notice",isDismissible:!1,status:"error"},React.createElement("p",null,__("Before you hit Publish, please refresh the following connection(s) to make sure we can share your post:","jetpack")),t.map((e=>React.createElement(a.Button,{href:e.refresh_url,isSmall:!0,key:e.id,onClick:this.refreshConnectionClick,title:e.refresh_text},e.refresh_text)))):null}renderNonRefreshableConnections(){const{failedConnections:e}=this.props,t=e.filter((e=>!e.can_refresh));return t.length?t.map((e=>React.createElement(a.Notice,{className:"jetpack-publicize-notice",isDismissible:!1,status:"error"},React.createElement("p",null,e.test_message)))):null}render(){return React.createElement(r.Fragment,null,this.renderRefreshableConnections(),this.renderNonRefreshableConnections())}}(0,n.compose)([(0,i.withSelect)((e=>({failedConnections:e(c.Eg).getFailedConnections()}))),(0,i.withDispatch)((e=>({refreshConnections:e(c.Eg).refreshConnectionTestResults})))])(l)},4277:(e,t,s)=>{"use strict";var a=s(13419),n=s(55609),i=s(9818),r=s(69307),o=s(65736),c=s(23177),l=s(24479),p=s(28161),d=s(91853);const __=o.__;class u extends r.Component{maybeDisplayLinkedInNotice=()=>this.connectionNeedsReauth()&&React.createElement(n.Notice,{className:p.Z["publicize-notice"],isDismissible:!1,status:"error"},React.createElement("p",null,__("Your LinkedIn connection needs to be reauthenticated to continue working – head to Sharing to take care of it.","jetpack")),React.createElement(n.ExternalLink,{href:`https://wordpress.com/marketing/connections/${(0,a.lQ)()}`},__("Go to Sharing settings","jetpack")));connectionNeedsReauth=()=>this.props.mustReauthConnections.includes(this.props.name);onConnectionChange=()=>{const{id:e}=this.props;this.isDisabled()||this.props.toggleConnection(e)};connectionIsFailing(){const{failedConnections:e,name:t}=this.props;return e.some((e=>e.service_name===t))}isDisabled(){return this.props.disabled||this.connectionIsFailing()||this.connectionNeedsReauth()}render(){const{enabled:e,id:t,label:s,name:a,profilePicture:n}=this.props,i="connection-"+a+"-"+t,r=a.replace("_","-"),o=React.createElement(l.Z,{id:i,className:d.Z["connection-toggle"],checked:e,onChange:this.onConnectionChange,disabled:this.isDisabled(),serviceName:r,label:s,profilePicture:n});return React.createElement("li",null,this.maybeDisplayLinkedInNotice(),React.createElement("div",{className:d.Z["connection-container"]},o))}}(0,i.withSelect)((e=>({failedConnections:e(c.Eg).getFailedConnections(),mustReauthConnections:e(c.Eg).getMustReauthConnections()})))(u)},1922:(e,t,s)=>{"use strict";s(13419),s(55609),s(69307),s(65736),s(81050),s(75323),s(62578)},87029:(e,t,s)=>{"use strict";s(13419),s(55609),s(69307),s(65736),s(81050),s(75323),s(62578),s(75631)},63503:(e,t,s)=>{"use strict";s(55609),s(69307),s(65736),s(81050),s(37568),s(62578)},75457:(e,t,s)=>{"use strict";s(9818),s(69307),s(81050),s(88219),s(39118),s(75263),s(98811),s(46791),s(37568),s(23177),s(4277),s(69709),s(75631)},82356:(e,t,s)=>{"use strict";s(55609),s(65736),s(14085),s(37568),s(75631)},95788:(e,t,s)=>{"use strict";s(55609),s(9818),s(69307),s(65736),s(81050),s(88219),s(75323),s(39118),s(75263),s(98811),s(46791),s(6230),s(96672),s(37568),s(23177),s(42032),s(1922),s(87029),s(63503),s(75457),s(82356),s(50523),s(89698),s(27730),s(63411),s(22124),s(45334)},50523:(e,t,s)=>{"use strict";s(55609),s(65736),s(81050),s(62578)},89698:(e,t,s)=>{"use strict";s(55609),s(69307),s(65736),s(81050),s(75323),s(62578)},27730:(e,t,s)=>{"use strict";s(13419),s(55609),s(9818),s(65736),s(34431),s(23177),s(32637),s(27941),s(75631),s(6785)},27941:(e,t,s)=>{"use strict";s(13419),s(55609),s(9818),s(65736),s(34431),s(23177),s(62578),s(6785)},63411:(e,t,s)=>{"use strict";s(65736),s(81050),s(88219),s(39118),s(75263),s(48751),s(29753),s(71961)},22124:(e,t,s)=>{"use strict";s(55609),s(69307),s(65736),s(81050),s(37568),s(62578)},6785:(e,t,s)=>{"use strict";s(9818),s(12238),s(69307)},45334:(e,t,s)=>{"use strict";s(55609),s(65736),s(62578)},9888:(e,t,s)=>{"use strict";s(86989),s(55609),s(9818),s(12238),s(65736),s(65235),s(99196),s(75263),s(58487)},3176:(e,t,s)=>{"use strict";s(55609),s(65736),s(34607),s(37548),s(42911)},37548:(e,t,s)=>{"use strict";s(55609),s(65736)},88649:(e,t,s)=>{"use strict";s(52175),s(55609),s(69307),s(65736),s(65235),s(46791),s(1795),s(13858),s(69339)},29753:(e,t,s)=>{"use strict";s(55609),s(69307);var a=s(65736);s(99196),s(88219),s(98811),s(88649),s(53513),s(45811);const __=a.__;__("Choose Media","jetpack")},71961:(e,t,s)=>{"use strict";s(55609),s(65736)},62578:(e,t,s)=>{"use strict";var a=s(55609),n=s(65736),i=s(61074),r=s(6163),o=s(65235),c=s.n(o),l=s(15844),p=s.n(l),d=s(82283);const __=n.__,u=({children:e,type:t="default",actions:s=[],onDismiss:n})=>{const o=c()(d.Z.notice,d.Z[`notice--${t}`]);return React.createElement("div",{className:o},React.createElement("div",{className:d.Z.content}," ",e," "),n&&React.createElement("button",{className:d.Z.dismiss,onClick:n},React.createElement(a.VisuallyHidden,null,__("Dismiss notice","jetpack")),React.createElement(i.Z,{icon:r.Z})),s&&s.length>0&&React.createElement("div",{className:d.Z.actions},s.map((e=>e))))};u.propTypes={children:p().node.isRequired,type:p().oneOf(["default","highlight","warning","error"]),actions:p().arrayOf(p().element),onDismiss:p().func}},8714:(e,t,s)=>{"use strict";s(55609),s(9818),s(12238),s(69307),s(65736),s(14085),s(86419),s(37568),s(49021),s(95788),s(3176),s(91474),s(23761)},91750:(e,t,s)=>{"use strict";s(13419),s(9818),s(72067),s(12238),s(65736),s(37548),s(34607),s(45078)},52403:(e,t,s)=>{"use strict";s(13419),s(86989),s(72067),s(69307),s(14085),s(86419),s(37568),s(19649)},77106:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var a=s(9818),n=s(23177);function i({shouldRefresh:e,children:t}){const s=(0,a.useDispatch)(n.Eg).refreshJetpackSocialSettings;return e&&s(),t}},19649:(e,t,s)=>{"use strict";s(13419),s(65736),s(99196),s(2097)},69709:(e,t,s)=>{"use strict";s(65736),s(14085),s(78619)},2817:(e,t,s)=>{"use strict";var a=s(65736);const __=a.__;__("X","jetpack"),__("WhatsApp","jetpack"),__("Facebook","jetpack")},22917:(e,t,s)=>{"use strict";s(34607)},34607:(e,t,s)=>{"use strict";s(13419),s(69307),s(65736),s(65235),s(2817),s(30664),s(38730)},38730:(e,t,s)=>{"use strict";s(9818),s(69307),s(71806)},32637:(e,t,s)=>{"use strict";s(69307),s(65736),s(65235),s(73640)},91474:(e,t,s)=>{"use strict";s(55609),s(9818),s(12238),s(69307),s(65736),s(53961),s(14085),s(45579),s(37568)},54005:(e,t,s)=>{"use strict";s(55609),s(69307),s(65736),s(75263),s(9888),s(81469)},81469:(e,t,s)=>{"use strict";s(55609),s(69307);var a=s(65736);s(75263),s(98811),s(9888),s(88649),s(39356),s(40088);const __=a.__;__("Choose Image","jetpack")},79631:(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var a=s(32054),n=s(90526),i=s(9818),r=s(69307),o=s(65736),c=s(99196),l=s.n(c),p=s(23177),d=s(8350);const __=o.__,u=()=>{const[e,t]=(0,r.useState)(null),{isEnabled:s,isUpdating:o,defaultTemplate:c}=(0,i.useSelect)((e=>{const t=e(p.Eg);return{isEnabled:t.isSocialImageGeneratorEnabled(),isUpdating:t.isUpdatingSocialImageGeneratorSettings(),defaultTemplate:t.getSocialImageGeneratorDefaultTemplate()}}),[]),u=(0,i.useDispatch)(p.Eg).updateSocialImageGeneratorSettings;(0,r.useEffect)((()=>{if(e){u({template:e})}}),[e,u]);const[m]=(0,a.Z)("sm"),h=(0,r.useCallback)((({open:e})=>l().createElement(n.Z,{fullWidth:m,variant:"secondary",size:"small",disabled:o||!s,onClick:e},__("Change default template","jetpack"))),[s,m,o]);return l().createElement(d.Z,{value:e||c,onSelect:t,render:h})}},8350:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var a=s(88275),n=s(55609),i=s(69307),r=s(65736),o=s(39356),c=s(15214);const __=r.__,l=({onSelect:e,render:t,value:s=null})=>{const[r,l]=(0,i.useState)(!1),[p,d]=(0,i.useState)(s),u=(0,i.useCallback)((()=>l(!0)),[l]),m=(0,i.useCallback)((()=>{l(!1)}),[l]),h=(0,i.useCallback)((()=>{e(p),l(!1)}),[e,l,p]);return React.createElement(a.ZP,{targetDom:document.body},t({open:u}),r&&React.createElement(n.Modal,{onRequestClose:m,title:__("Pick a Template","jetpack")},React.createElement(o.Z,{value:p,onTemplateSelected:d}),React.createElement("div",{className:c.Z.footer},React.createElement(n.Button,{variant:"tertiary",onClick:m},__("Cancel","jetpack")),React.createElement(n.Button,{variant:"primary",onClick:h},__("Save","jetpack")))))}},39356:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var a=s(69307),n=s(65736),i=s(65235),r=s.n(i),o=s(47320),c=s(57227);const __=n.__,l=({value:e=null,onTemplateSelected:t=null})=>{const s=(0,a.useCallback)((e=>{const s=e.target.id;t?.(s)}),[t]);return React.createElement("div",{className:o.Z.templates},c.Z.map((t=>React.createElement("button",{onClick:s,id:t.name,key:t.name,className:r()(o.Z.template,{[o.Z["template--active"]]:t.name===e})},React.createElement("img",{src:t.image,alt:t.label}),React.createElement("span",{className:"screen-reader-text"},/* translators: %s is the name of the template */ /* translators: %s is the name of the template */ -(0,n.sprintf)(__("Pick the %s template","jetpack"),t.label))))))}},57227:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var a=s(30253),n=s(91948),i=s(5353);const r=[{name:"highway",label:"Highway",image:s(27956)},{name:"dois",label:"Dois",image:a},{name:"edge",label:"Edge",image:n},{name:"fullscreen",label:"Fullscreen",image:i}]},76848:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var a=s(48229),n=s(9818),i=s(69307),r=s(99196),o=s.n(r),c=s(23177);const l=({toggleClass:e,children:t})=>{const{isEnabled:s,isUpdating:r}=(0,n.useSelect)((e=>{const t=e(c.Eg);return{isEnabled:t.isSocialImageGeneratorEnabled(),isUpdating:t.isUpdatingSocialImageGeneratorSettings()}}),[]),l=(0,n.useDispatch)(c.Eg).updateSocialImageGeneratorSettings,p=(0,i.useCallback)((()=>{l({enabled:!s})}),[s,l]);return o().createElement(a.Z,{className:e,disabled:r,checked:s,onChange:p,label:t})}},53513:(e,t,s)=>{"use strict";s(55609),s(69307);var a=s(65736);s(88219),s(89696);const __=a.__;__("You need a featured image or media attached to your post to be able to share as a social post.","jetpack"),__("By default, the image and text appear on social media as a link preview. To optimize engagement, share as a social post.","jetpack")},63855:(e,t,s)=>{"use strict";var a=s(82674),n=s.n(a),i=s(13477),r=s(9818),o=s(48751),c=s(23177);(0,r.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{excerpt:t("excerpt"),content:t("content").split("\x3c!--more")[0]}}))((e=>{const{message:t}=(0,o.Z)(),{title:s,excerpt:a,content:l}=e,p=(0,r.useSelect)((e=>{const{displayName:t,profileImage:s}=e(c.Eg).getConnectionProfileDetails(c.uJ);return{displayName:t,avatarUrl:s}}));return React.createElement(i.S,n()({},e,{type:"article",user:p,customText:t||a||l||s}))}))},83704:(e,t,s)=>{"use strict";s(82674),s(9818),s(22629),s(99196)},4124:(e,t,s)=>{"use strict";s(9818),s(99196),s(48751),s(23177)},27725:(e,t,s)=>{"use strict";s(9818),s(65736),s(99196),s(48751),s(23177)},28586:(e,t,s)=>{"use strict";s(82674),s(9818),s(22629),s(71806),s(48751),s(23177)},8454:(e,t,s)=>{"use strict";s(55609),s(65736),s(41809),s(9279)},18553:(e,t,s)=>{"use strict";s(9818),s(99196),s(48751),s(23177)},74140:(e,t,s)=>{"use strict";s(55609),s(65736),s(41809)},94714:(e,t,s)=>{"use strict";s(82674),s(9818),s(48751),s(23177)},24766:(e,t,s)=>{"use strict";s(9818),s(99196),s(71806),s(23177)},41809:(e,t,s)=>{"use strict";s(82674),s(65736),s(99196),s(23177),s(42032),s(63855),s(83704),s(4124),s(27725),s(28586),s(18553),s(94714),s(24766)},9279:(e,t,s)=>{"use strict";s(9818),s(65736),s(71806)},13858:(e,t,s)=>{"use strict";s(69307),s(87728)},88219:(e,t,s)=>{"use strict";s(71806)},75323:(e,t,s)=>{"use strict";s(13419),s(86989),s(69307)},39118:(e,t,s)=>{"use strict";s(9818),s(12238)},75263:(e,t,s)=>{"use strict";s(9818),s(12238),s(69307),s(71806)},98811:(e,t,s)=>{"use strict";s(9818),s(69307)},46791:(e,t,s)=>{"use strict";s(69307),s(1795)},1795:(e,t,s)=>{"use strict";const a="video/mp4",n="video/mov",i="video/videopress",r=["image/jpeg","image/jpg","image/png"],o=r.concat(["image/gif","image/bmp"]),c=["video/3g2","video/3gp","video/3gpp","video/asf","video/avi","video/dat","video/divx","video/dv","video/f4v","video/flv","video/gif","video/m2ts","video/m4v","video/mkv","video/mod","video/mov","video/mp4","video/mpe","video/mpeg","video/mpeg4","video/mpg","video/mts","video/nsv","video/ogm","video/ogv","video/qt","video/tod","video/ts","video/vob","video/wmv"],l=r.concat(["image/gif","image/heic","image/heif","image/webp","image/avif"]),p=["video/webm","video/quicktime","video/ogg"],d=r.concat(["image/gif","image/jpe","image/tif","image/tiff","image/webp"]),u=[n,"video/avi","video/mpg","video/mpeg","video/m4v"];r.concat([a,i,n]),r.concat([a,i]),o.concat([i,...c]),r.concat([a,n,i]),r.concat([a,i]),l.concat([...p,a,i]),d.concat([...u,a,i]),new Set([...r,...o,...l,...c,...p,"image/png","image/jpeg","image/jpg","image/heic","image/heif","image/webp"])},71806:(e,t,s)=>{"use strict";s.d(t,{R:()=>o});var a=s(9818),n=s(12238),i=s(69307),r=s(42032);function o(){const{editPost:e}=(0,a.useDispatch)(n.store),t=(0,a.useSelect)((e=>{const t=e(n.store).getEditedPostAttribute("meta")||{},s=t.jetpack_publicize_feature_enabled??!0,a=t.jetpack_social_options||{};return{isPublicizeEnabled:s,jetpackSocialOptions:a,attachedMedia:a.attached_media||[],imageGeneratorSettings:a.image_generator_settings??{enabled:!1},isPostAlreadyShared:t.jetpack_social_post_already_shared??!1,shareMessage:`${t.jetpack_publicize_message||""}`.substring(0,(0,r.getShareMessageMaxLength)()),shouldUploadAttachedMedia:a.should_upload_attached_media??!1}}),[]),s=(0,i.useCallback)(((t,s)=>{e({meta:{[t]:s}})}),[e]),o=(0,i.useCallback)((()=>{s("jetpack_publicize_feature_enabled",!t.isPublicizeEnabled)}),[t.isPublicizeEnabled,s]),c=(0,i.useCallback)(((e,a)=>{s("jetpack_social_options",{...t.jetpackSocialOptions,[e]:a})}),[t.jetpackSocialOptions,s]);return(0,i.useMemo)((()=>({...t,togglePublicizeFeature:o,updateJetpackSocialOptions:c,updateMeta:s})),[t,o,c,s])}},14085:(e,t,s)=>{"use strict";s(13419),s(9818),s(12238),s(71806)},6230:(e,t,s)=>{"use strict";s(9818),s(69307),s(23177)},96672:(e,t,s)=>{"use strict";s(94333),s(69307),s(37568)},86419:(e,t,s)=>{"use strict";s(94333),s(9818),s(12238),s(69307)},34431:(e,t,s)=>{"use strict";s(9818),s(65736),s(23177)},45579:(e,t,s)=>{"use strict";s(13419),s(86989),s(9818),s(12238),s(69307),s(65736),s(37568),s(48751)},37568:(e,t,s)=>{"use strict";s(9818),s(23177)},48751:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var a=s(42032),n=s(71806);function i(){const{updateMeta:e,shareMessage:t}=(0,n.R)();return{message:t,maxLength:(0,a.getShareMessageMaxLength)(),updateMessage:function(t){e("jetpack_publicize_message",t)}}}},19890:(e,t,s)=>{"use strict";s(9818),s(12238),s(23177),s(86419)},21052:(e,t,s)=>{"use strict";s.d(t,{Au:()=>c,Wh:()=>l,ZP:()=>p,hi:()=>o,wO:()=>r});var a=s(9818),n=s(23177),i=s(4957);const r="SET_AUTO_CONVERSION_SETTINGS";function o(){return l({isUpdating:!0})}function c(){return l({isUpdating:!1})}function l(e){return{type:r,options:e}}const p={updateAutoConversionSettings:function*(e){try{yield o(),yield l(e),yield(0,i.Fl)(e);const t=yield(0,i.wi)();return yield l(t.jetpack_social_autoconvert_images),!0}catch(e){const t=(0,a.select)(n.Eg).getAutoConversionSettings();return yield l(t),!1}finally{yield c()}},setAutoConversionSettings:l,refreshAutoConversionSettings:function*(){try{yield o();const e=yield(0,i.wi)();return yield l(e.jetpack_social_autoconvert_images),!0}catch(e){return!1}finally{yield c()}}}},23013:(e,t,s)=>{"use strict";s.r(t),s.d(t,{mergeConnections:()=>p,refreshConnectionTestResults:()=>d,setConnections:()=>c,syncConnectionsToPostMeta:()=>u,toggleConnection:()=>l,toggleConnectionById:()=>m});var a=s(13419),n=s(86989),i=s.n(n),r=s(12238),o=s(74442);function c(e){return{type:o.b,connections:e}}function l(e){return{type:o.L,connectionId:e}}function p(e){return function({dispatch:t,select:s}){const a=s.getConnections(),n=[],i={done:!1,enabled:Boolean(s.numberOfSharesRemaining()),toggleable:!0};for(const t of e){const e={...i,...a.find((e=>e.connection_id?e.connection_id===t.connection_id:e.id===t.id)),...t,is_healthy:t.test_success};n.push(e)}t(c(n))}}function d(e=!1){return async function({dispatch:t}){try{const s=(0,a.Pb)()?.social?.connectionRefreshPath||"/wpcom/v2/publicize/connection-test-results";t(p(await i()({path:s}))),e&&t(u())}catch(e){}}}function u(){return function({registry:e,select:t}){const s=t.getConnections();return e.dispatch(r.store).editPost({jetpack_publicize_connections:s})}}function m(e,t=!0){return function({dispatch:s}){s(l(e)),t&&s(u())}}},74442:(e,t,s)=>{"use strict";s.d(t,{L:()=>n,b:()=>a});const a="SET_CONNECTIONS",n="TOGGLE_CONNECTION"},54725:(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var a=s(21052),n=s(23013),i=s(371),r=s(72438),o=s(4462);const c={...i.ZP,...o.ZP,...a.ZP,...r.Z,...n}},371:(e,t,s)=>{"use strict";s.d(t,{ZP:()=>c,dz:()=>r,ff:()=>o});var a=s(9818),n=s(23177),i=s(4957);const r="SET_JETPACK_SETTINGS";function o(e){return{type:r,options:e}}const c={updateJetpackSettings:function*(e){try{yield o({is_updating:!0}),yield o(e),yield(0,i.RF)(e);const t=yield(0,i.es)();return yield o(t),!0}catch(e){const t=(0,a.select)(n.Eg).getJetpackSettings();return yield o(t),!1}finally{yield o({is_updating:!1})}},setJetpackSettings:o}},72438:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var a=s(4957),n=s(21052),i=s(4462);const r={refreshJetpackSocialSettings:function*(){try{yield(0,n.hi)(),yield(0,i.ds)();const e=yield(0,a.mu)();return yield(0,n.Wh)(e.jetpack_social_autoconvert_images),yield(0,i.ch)(e.jetpack_social_image_generator_settings),!0}catch(e){return!1}finally{yield(0,n.Au)(),yield(0,i.Gr)()}}}},4462:(e,t,s)=>{"use strict";s.d(t,{Gr:()=>c,ZP:()=>p,ch:()=>l,ds:()=>o,kg:()=>r});var a=s(9818),n=s(23177),i=s(4957);const r="SET_SOCIAL_IMAGE_GENERATOR_SETTINGS";function o(){return l({isUpdating:!0})}function c(){return l({isUpdating:!1})}function l(e){return{type:r,options:e}}const p={updateSocialImageGeneratorSettings:function*(e){try{yield o(),yield l(e),yield(0,i.Ux)(e);const t=yield(0,i.oB)();return yield l(t.jetpack_social_image_generator_settings),!0}catch(e){const t=(0,a.select)(n.Eg).getSocialImageGeneratorSettings();return yield l(t),!1}finally{yield c()}},setSocialImageGeneratorSettings:l,refreshSocialImageGeneratorSettings:function*(){try{yield o();const e=yield(0,i.oB)();return yield l(e.jetpack_social_image_generator_settings),!0}catch(e){return!1}finally{yield c()}}}},4957:(e,t,s)=>{"use strict";s.d(t,{Fl:()=>v,RF:()=>m,Ux:()=>g,ZP:()=>E,es:()=>u,mu:()=>f,oB:()=>h,wi:()=>k});var a=s(86989),n=s.n(a);const i="FETCH_JETPACK_SETTINGS",r="UPDATE_JETPACK_SETTINGS",o="FETCH_SOCIAL_IMAGE_GENERATOR_SETTINGS",c="UPDATE_SOCIAL_IMAGE_GENERATOR_SETTINGS",l="FETCH_AUTO_CONVERSION_SETTINGS",p="UPDATE_AUTO_CONVERSION_SETTINGS",d="FETCH_JETPACK_SOCIAL_SETTINGS",u=()=>({type:i}),m=e=>({type:r,settings:e}),h=()=>({type:o}),g=e=>({type:c,settings:e}),k=()=>({type:l}),f=()=>({type:d}),v=e=>({type:p,settings:e}),E={[i]:function(){return n()({path:"/jetpack/v4/social/settings"})},[r]:function(e){return n()({path:"/jetpack/v4/social/settings",method:"POST",data:e.settings})},[o]:function(){return n()({path:"/wp/v2/settings?_fields=jetpack_social_image_generator_settings"})},[c]:function(e){return n()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_image_generator_settings:e.settings}})},[l]:function(){return n()({path:"/wp/v2/settings?_fields=jetpack_social_autoconvert_images"})},[p]:function(e){return n()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_autoconvert_images:e.settings}})},[d]:function(){return n()({path:"/wp/v2/settings?_fields=jetpack_social_autoconvert_images,jetpack_social_image_generator_settings"})}}},23177:(e,t,s)=>{"use strict";s.d(t,{Eg:()=>l,uJ:()=>d});var a=s(9818),n=s(54725),i=s(4957),r=s(45272),o=s(15781),c=s(22987);const l="jetpack-social-plugin",p={reducer:r.Z,actions:n.Z,selectors:c.Z,resolvers:o.ZP,controls:i.ZP,initialState:window?.jetpackSocialInitialState||window?.Initial_State?.socialInitialState||window?.Jetpack_Editor_Initial_State?.social||{}},d="facebook",u=(0,a.createReduxStore)(l,p);(0,a.register)(u)},20750:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var a=s(21052);const n=(e={},t)=>t.type===a.wO?{...e,...t.options}:e},71837:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var a=s(74442);const n=(e={},t)=>{switch(t.type){case a.b:return{...e,connections:t.connections};case a.L:return{...e,connections:e.connections.map((e=>(e.connection_id?e.connection_id===t.connectionId:e.id===t.connectionId)?{...e,enabled:!e.enabled}:e))}}return e}},45272:(e,t,s)=>{"use strict";s.d(t,{Z:()=>p});var a=s(9818),n=s(20750),i=s(71837),r=s(80697),o=s(35652),c=s(28696),l=s(54489);const p=(0,a.combineReducers)({sharesData:o.Z,siteData:c.Z,connectionData:i.Z,jetpackSettings:r.Z,socialImageGeneratorSettings:l.Z,autoConversionSettings:n.Z,hasPaidPlan:(e=!1)=>e})},80697:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var a=s(371);const n=(e={},t)=>t.type===a.dz?{...e,...t.options}:e},35652:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});const a=(e={})=>e},28696:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});const a=(e={})=>e},54489:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var a=s(4462);const n=(e={},t)=>t.type===a.kg?{...e,...t.options}:e},15781:(e,t,s)=>{"use strict";s.d(t,{ZP:()=>l});var a=s(12238),n=s(21052),i=s(23013),r=s(371),o=s(4462),c=s(4957);const l={getJetpackSettings:function*(){try{const e=yield(0,c.es)();if(e)return(0,r.ff)(e)}catch(e){console.log(e)}},getSocialImageGeneratorSettings:function*(){try{const e=yield(0,c.oB)();if(e)return(0,o.ch)(e.jetpack_social_image_generator_settings)}catch(e){console.log(e)}},getAutoConversionSettings:function*(){try{const e=yield(0,c.wi)();if(e)return(0,n.Wh)(e.jetpack_social_autoconvert_images)}catch(e){console.log(e)}},getConnections:function(){return function({dispatch:e,registry:t}){const s=t.select(a.store).getEditedPostAttribute("jetpack_publicize_connections");e((0,i.setConnections)(s||[]))}}}},68113:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});const a={getAutoConversionSettings:e=>e.autoConversionSettings,isAutoConversionAvailable:e=>e.autoConversionSettings.available,isAutoConversionEnabled:e=>e.autoConversionSettings.available&&e.autoConversionSettings.enabled,isAutoConversionSettingsUpdating:e=>e.autoConversionSettings.isUpdating}},43354:(e,t,s)=>{"use strict";function a(e){return e.connectionData?.connections??[]}function n(e){return e.connectionData?.adminUrl??null}function i(e){return a(e).length>0}function r(e){return a(e).filter((e=>!1===e.test_success))}function o(e){return a(e).filter((e=>"must_reauth"===e.test_success)).map((e=>e.service_name))}function c(e){return a(e).filter((e=>e.enabled))}function l(e){return a(e).filter((e=>!e.enabled))}function p(e,t,{forceDefaults:s=!1}={}){let n="",i="",r="";if(!s){const s=a(e).find((({service_name:e})=>t===e));if(s){const{display_name:e,profile_display_name:a,profile_picture:o}=s;n="twitter"===t?a:e,r="twitter"===t?e:s.username,i=o}}return{displayName:n,profileImage:i,username:r}}s.r(t),s.d(t,{getConnectionProfileDetails:()=>p,getConnections:()=>a,getConnectionsAdminUrl:()=>n,getDisabledConnections:()=>l,getEnabledConnections:()=>c,getFailedConnections:()=>r,getMustReauthConnections:()=>o,hasConnections:()=>i})},22987:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var a=s(68113),n=s(43354),i=s(82836),r=s(31473),o=s(85675),c=s(45073);const l={...o.Z,...n,...i.Z,...r,...c.Z,...a.Z}},82836:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});const a={getJetpackSettings:e=>e.jetpackSettings,isModuleEnabled:e=>e.jetpackSettings.publicize_active,showPricingPage:e=>e.jetpackSettings.show_pricing_page,isUpdatingJetpackSettings:e=>e.jetpackSettings.is_updating,hasPaidPlan:e=>!(e.jetpackSettings?.showNudge??1),isEnhancedPublishingEnabled:e=>e.jetpackSettings?.isEnhancedPublishingEnabled??!1,getDismissedNotices:e=>e.jetpackSettings?.dismissedNotices}},31473:(e,t,s)=>{"use strict";s.r(t),s.d(t,{getScheduledSharesCount:()=>c,getShareLimit:()=>r,getSharedPostsCount:()=>p,getSharesUsedCount:()=>o,getTotalSharesCount:()=>l,isShareLimitEnabled:()=>n,numberOfSharesRemaining:()=>u,shouldShowAdvancedPlanNudge:()=>d,showShareLimits:()=>i});var a=s(82836);function n(e){return e.sharesData?.is_share_limit_enabled??!1}function i(e){return!a.Z.hasPaidPlan(e)&&!e.hasPaidPlan&&n(e)}function r(e){return e.sharesData?.share_limit??30}function o(e){return e.sharesData?.publicized_count??0}function c(e){return e.sharesData?.to_be_publicized_count??0}function l(e){const t=o(e)+c(e);return Math.max(t,0)}function p(e){return e.sharesData?.shared_posts_count??0}function d(e){return e.sharesData?.show_advanced_plan_upgrade_nudge??!1}function u(e,t={}){if(!i(e))return 1/0;const{includeScheduled:s}={includeScheduled:!0,...t},a=o(e),n=r(e),l=s?c(e):0;return Math.max(n-a-l,0)}},85675:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});const a={getAdminUrl:e=>e.siteData?.adminUrl??null,getAPIRootUrl:e=>e.siteData?.apiRoot??null,getAPINonce:e=>e.siteData?.apiNonce??null,getRegistrationNonce:e=>e.siteData?.registrationNonce??null,getSiteSuffix:e=>e.siteData?.siteSuffix??null,getBlogID:e=>e.siteData?.blogID??null,getPluginVersion:e=>e.siteData?.pluginVersion??null}},45073:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});const a={getSocialImageGeneratorSettings:e=>e.socialImageGeneratorSettings,isSocialImageGeneratorAvailable:e=>e.socialImageGeneratorSettings.available,isSocialImageGeneratorEnabled:e=>e.socialImageGeneratorSettings.enabled,isUpdatingSocialImageGeneratorSettings:e=>e.socialImageGeneratorSettings.isUpdating,getSocialImageGeneratorDefaultTemplate:e=>e.socialImageGeneratorSettings.template}},5463:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});const a=255;function n(){return a}},12677:(e,t,s)=>{"use strict";s(13419)},42032:(e,t,s)=>{"use strict";s.d(t,{getShareMessageMaxLength:()=>a.A});var a=s(5463);s(12677)},13419:(e,t,s)=>{"use strict";s.d(t,{Pb:()=>a.Z,lQ:()=>n.Z});var a=s(50148),n=s(35004);s(76714),s(80354),s(75404),s(61053),s(11380),s(6342),s(96959),s(39058)},6342:(e,t,s)=>{"use strict";s(99196)},96959:(e,t,s)=>{"use strict";s(69307)},50148:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});const a="Jetpack_Editor_Initial_State";function n(){return"object"==typeof window?window?.[a]??null:null}},35004:(e,t,s)=>{"use strict";function a(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:null}s.d(t,{Z:()=>a})},61053:(e,t,s)=>{"use strict";var a=s(6975);s(69307);const{tracks:n}=a.Z,{recordEvent:i}=n},11380:(e,t,s)=>{"use strict";s(9818),s(69307),s(39058)},44166:(e,t,s)=>{"use strict";s.d(t,{ZP:()=>u,rW:()=>d});var a=s(9818),n=s(99505),i=s(82162),r=s(39058);const o="SET_JETPACK_MODULES",c="SET_MODULE_UPDATING";function l(e){return d({isLoading:e})}function p(e,t){return{type:c,name:e,isUpdating:t}}function d(e){return{type:o,options:e}}const u={updateJetpackModuleStatus:function*(e){try{yield p(e.name,!0),yield(0,i.zL)(e);const t=yield(0,i.Bs)();return yield d({data:t}),!0}catch(e){const t=(0,a.select)(r.p).getJetpackModules();return yield d(t),!1}finally{yield p(e.name,!1)}},setJetpackModules:d,fetchModules:function*(){if((0,n.Wp)())return!0;try{yield l(!0);const e=yield(0,i.Bs)();return yield d({data:e}),!0}catch(e){const t=(0,a.select)(r.p).getJetpackModules();return yield d(t),!1}finally{yield l(!1)}}}},82162:(e,t,s)=>{"use strict";s.d(t,{Bs:()=>o,ZP:()=>l,zL:()=>c});var a=s(86989),n=s.n(a);const i="FETCH_JETPACK_MODULES",r="UPDATE_JETPACK_MODULE_STATUS",o=()=>({type:i}),c=e=>({type:r,settings:e}),l={[i]:function(){return n()({path:"/jetpack/v4/module/all",method:"GET"})},[r]:function({settings:e}){return n()({path:`/jetpack/v4/module/${e.name}/active`,method:"POST",data:{active:e.active}})}}},39058:(e,t,s)=>{"use strict";s.d(t,{p:()=>l});var a=s(9818),n=s(44166),i=s(82162),r=s(42469),o=s(55133),c=s(43524);const l="jetpack-modules",p=(0,a.createReduxStore)(l,{reducer:r.Z,actions:n.ZP,controls:i.ZP,resolvers:o.Z,selectors:c.Z});(0,a.register)(p);const d=window?.Initial_State?.getModules||window?.Jetpack_Editor_Initial_State?.modules||null;null!==d&&(0,a.dispatch)(l).setJetpackModules({data:{...d}})},42469:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});const a={isLoading:!1,isUpdating:{},data:{}},n=(e=a,t)=>{switch(t.type){case"SET_JETPACK_MODULES":return{...e,...t.options};case"SET_MODULE_UPDATING":return{...e,isUpdating:{...e.isUpdating,[t.name]:t.isUpdating}}}return e}},55133:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var a=s(44166),n=s(82162);const i={getJetpackModules:function*(){try{const e=yield(0,n.Bs)();if(e)return(0,a.rW)({data:e})}catch(e){console.error(e)}}}},43524:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var a=s(99505);const n={getJetpackModules:e=>e.data,isModuleActive:(e,t)=>(0,a.Wp)()||(e?.data?.[t]?.activated??!1),areModulesLoading:e=>e.isLoading??!1,isModuleUpdating:(e,t)=>e?.isUpdating?.[t]??!1}},75404:(e,t,s)=>{"use strict";var a=s(65736);s(96483),s(92819);const __=a.__;__("Upgrade your plan to use video covers","jetpack"),__("Upgrade your plan to upload audio","jetpack")},76714:(e,t,s)=>{"use strict";s(98817)},99505:(e,t,s)=>{"use strict";function a(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function n(){return"simple"===a()}s.d(t,{Wp:()=>n})},80354:(e,t,s)=>{"use strict";s(82674),s(94333)},4341:(e,t,s)=>{"use strict";s.d(t,{Z:()=>f});var a=s(6895),n=s(65736),i=s(65235),r=s.n(i),o=s(85799),c=s(43255),l=s(84069),p=s(25162),d=s.n(p),u=s(99196),m=s.n(u),h=s(59309),g=s(96300);const __=n.__;class k extends u.Component{static propTypes={inOfflineMode:d().bool.isRequired,siteRawUrl:d().string.isRequired};static defaultProps={inOfflineMode:!1,siteRawUrl:""};trackActivityClick=()=>{l.Z.tracks.recordJetpackClick({type:"activity-link",target:"at-a-glance",feature:"activity-log"})};render(){const{inOfflineMode:e}=this.props,t=__("Jetpack keeps a complete record of everything that happens on your site, taking the guesswork out of site management, debugging, and repair.","jetpack");return m().createElement("div",{className:"jp-dash-item__interior"},m().createElement(c.Z,{label:__("Activity","jetpack"),isModule:!1,className:r()({"jp-dash-item__is-inactive":e}),pro:!1},m().createElement("p",{className:"jp-dash-item__description"},e?__("Unavailable in Offline Mode.","jetpack"):t)),m().createElement(o.Z,{key:"view-activity",className:"jp-dash-item__manage-in-wpcom",compact:!0,href:(0,a.Z)("calypso-activity-log",{site:this.props.siteRawUrl}),target:"_blank",rel:"noopener noreferrer",onClick:this.trackActivityClick},__("View site activity","jetpack")))}}const f=(0,h.$j)((e=>({inOfflineMode:(0,g.Ex)(e)})))(k)},91248:(e,t,s)=>{"use strict";s.d(t,{Z:()=>T});var a=s(82674),n=s.n(a),i=s(64743),r=s(52947),o=s(69307),c=s(65736),l=s(97506),p=s(85799),d=s(43255),u=s(11020),m=s(41549),h=s(85733),g=s(84069),k=s(59584),f=s(92819),v=s(1137),E=s(25162),w=s.n(E),_=s(99196),b=s.n(_),y=s(59309),C=s(17296),j=s(96300),S=s(69508),N=s(33002);const __=c.__,_x=c._x;class x extends _.Component{static propTypes={siteRawUrl:w().string.isRequired,siteAdminUrl:w().string.isRequired,trackUpgradeButtonView:w().func,akismetData:w().oneOfType([w().string,w().object,w().number]).isRequired,isOfflineMode:w().bool.isRequired,upgradeUrl:w().string.isRequired,hasConnectedOwner:w().bool.isRequired};static defaultProps={siteRawUrl:"",siteAdminUrl:"",akismetData:"N/A",isOfflineMode:"",trackUpgradeButtonView:f.noop};trackActivateClick(){g.Z.tracks.recordJetpackClick({type:"activate-link",target:"at-a-glance",feature:"anti-spam"})}onActivateClick=()=>(this.trackActivateClick(),this.props.createNotice("is-info",__("Activating Akismet…","jetpack"),{id:"activating-akismet"}),i.ZP.activateAkismet().then((()=>{this.props.removeNotice("activating-akismet"),window.location.href=this.props.siteAdminUrl+"admin.php?page=akismet-key-config"})).catch((()=>{this.props.removeNotice("activating-akismet"),this.props.createNotice("is-error",__("Could not activate Akismet.","jetpack"),{id:"activate-akismet-failure"})})),!1);trackModerateClick(){g.Z.tracks.recordJetpackClick({type:"moderate-link",target:"at-a-glance",feature:"anti-spam"})}onModerateClick=()=>{this.trackModerateClick()};getContent(){const{akismetData:e,siteAdminUrl:t}=this.props,s=__("Akismet Anti-spam","jetpack"),a={text:__("Comments and contact form submissions are checked against our global database of spam.","jetpack"),link:this.props.isAtomicSite?null:"https://akismet.com/features",privacyLink:"https://automattic.com/privacy/"},i=()=>{let s;return"not_active"===e?s=(0,o.createInterpolateElement)(__("Already have an API key? .","jetpack"),{Button:b().createElement(l.Z,{className:"jp-link-button",onClick:this.onActivateClick})}):"invalid_key"===e&&(s=(0,o.createInterpolateElement)(__("Already have an API key? Get started.","jetpack"),{a:b().createElement("a",{href:t+"admin.php?page=akismet-key-config"})})),b().createElement(h.ZP,{callToAction:_x("Upgrade","Call to action to buy a new plan","jetpack"),title:__("Automatically clear spam from comments and forms.","jetpack"),description:s,disableHref:"false",href:this.props.upgradeUrl,eventFeature:"akismet",path:"dashboard",plan:(0,k.o2o)(k.V37),trackBannerDisplay:this.props.trackUpgradeButtonView,noIcon:!0})},c=()=>b().createElement(h.ZP,{callToAction:__("Connect","jetpack"),title:__("Connect your WordPress.com account to upgrade and automatically clear spam from comments and forms","jetpack"),disableHref:"false",onClick:this.props.connectUser,eventFeature:"akismet",path:"dashboard",plan:(0,k.o2o)(k.V37)}),u=()=>this.props.hasConnectedOwner?i():c();if("N/A"===e)return b().createElement(d.Z,{label:s,module:"akismet",support:a,pro:!0},b().createElement("p",{className:"jp-dash-item__description"},__("Loading…","jetpack")));if(["not_installed","not_active","invalid_key"].includes(e)){const e={label:s,module:"akismet",support:a,className:"jp-dash-item__is-inactive",pro:!0};return this.props.hasAntiSpam||this.props.hasAkismet?b().createElement(d.Z,e,__("Your Jetpack plan provides anti-spam protection through Akismet. Click 'set up' to enable it on your site.","jetpack")):this.props.isOfflineMode?b().createElement(d.Z,e,b().createElement("p",{className:"jp-dash-item__description"},__("Unavailable in Offline Mode.","jetpack"))):b().createElement(d.Z,n()({},e,{overrideContent:u()}))}return[b().createElement(d.Z,{key:"comment-moderation",label:s,module:"akismet",support:a,status:"is-working",pro:!0},(()=>0!==this.props.akismetData?b().createElement(b().Fragment,null,b().createElement("h2",{className:"jp-dash-item__count"},(0,r.Z)(this.props.akismetData)),b().createElement("p",{className:"jp-dash-item__description"},_x("Spam comments blocked.",'Example: "412 Spam comments blocked"',"jetpack"))):b().createElement("div",{className:"jp-dash-item__recently-activated"},b().createElement("p",{className:"jp-dash-item__description"},__("Akismet is now monitoring all comments on your site. Data will display here soon!","jetpack"))))()),!this.props.isOfflineMode&&b().createElement(p.Z,{key:"moderate-comments",className:"jp-dash-item__manage-in-wpcom",compact:!0,href:`${this.props.siteAdminUrl}edit-comments.php`,onClick:this.onModerateClick},__("Moderate comments","jetpack"))]}render(){return b().createElement("div",{className:"jp-dash-item__interior"},b().createElement(u.Z,null),this.getContent())}}const T=(0,y.$j)((e=>({akismetData:(0,C.fU)(e),isAtomicSite:(0,S.Ug)(e),isOfflineMode:(0,j.Ex)(e),upgradeUrl:(0,v.z)(e,"akismet"),nonce:(0,S.VY)(e),hasConnectedOwner:(0,j.it)(e),hasAntiSpam:(0,N.CV)(e,"antispam"),hasAkismet:(0,N.CV)(e,"akismet")})),(e=>({createNotice:m.iI,removeNotice:m.qq,connectUser:()=>e((0,j.bL)())})))(x)},83326:(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var a=s(80800),n=s(65736),i=s(97506),r=s(85799),o=s(84069),c=s(99196),l=s.n(c),p=s(59309),d=s(3230);const __=n.__,u=(0,p.$j)((e=>({isDismissed:(0,d.wS)(e)})),(e=>({dismiss:()=>e((0,d.VP)({dismiss_dash_backup_getting_started:!0}))})))((({isDismissed:e,dismiss:t})=>{const s=(0,c.useCallback)((()=>{t(),o.Z.tracks.recordEvent("jetpack_backup_getting_started_video_dismiss",{position:"at_a_glance"})}),[t]),n=(0,c.useCallback)((()=>{o.Z.tracks.recordEvent("jetpack_backup_getting_started_video_click",{position:"at_a_glance"})}),[]);return e?null:l().createElement(r.Z,{className:"dash-backup-getting-started"},l().createElement(i.Z,{borderless:!0,compact:!0,className:"dash-backup-getting-started__dismiss",onClick:s},l().createElement("span",{className:"dashicons dashicons-no"})),l().createElement("a",{href:a.zh,target:"_blank",rel:"noreferrer"},l().createElement("img",{className:"dash-backup-getting-started__thumbnail",src:a.hp+"backup-getting-started-thumbnail.png",srcSet:`${a.hp+"backup-getting-started-thumbnail.png"} 1x, ${a.hp+"backup-getting-started-thumbnail-2x.png"} 2x`,alt:""})),l().createElement("div",{className:"dash-backup-getting-started__content"},l().createElement("h3",{className:"dash-backup-getting-started__header"},__("Getting started with Jetpack Backup","jetpack")),l().createElement("p",{className:"dash-backup-getting-started__text"},__("A short video guide on how to back up your website","jetpack"))),l().createElement(i.Z,{className:"dash-backup-getting-started__cta",href:a.zh,onClick:n,target:"_blank",rel:"noreferrer",compact:!0,primary:!0},__("Watch the video","jetpack")))}))},30647:(e,t,s)=>{"use strict";s.d(t,{v:()=>p});var a=s(43521),n=s(65736),i=s(85799),r=s(84069),o=s(99196),c=s.n(o),l=s(49890);const __=n.__,p=({comments:e,plugins:t,posts:s,onClosePopup:n})=>{const p=(0,o.useRef)(!1);(0,o.useEffect)((()=>{p.current||(r.Z.tracks.recordEvent("jetpack_wpa_aag_backup_bar_chart_view",{comments:e,plugins:t,posts:s}),p.current=!0)}),[]);const d=(0,o.useMemo)((()=>[{count:s,label:__("Posts","jetpack"),backgroundColor:"#00BA37"},{count:t,label:__("Plugins","jetpack"),backgroundColor:"#3895BA"},{count:e,label:__("Comments","jetpack"),backgroundColor:"#E68B28"}]),[e,t,s]);return c().createElement(i.Z,{className:"jp-dash-upgrade-backup"},c().createElement(l.G,{posts:s,comments:e,onClosePopup:n}),c().createElement(a.Z,{items:d}))}},91498:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var a=s(84069),n=s(99196),i=s.n(n),r=s(59309),o=s(17296),c=s(30647);const l=(0,r.$j)((e=>{const t=(0,o.yZ)(e)?.general?.stats;return{comments:t?.comments,plugins:Object.keys((0,o.Fb)(e)).length,posts:t?.posts,isFetchingData:(0,o.vz)(e)||(0,o.F2)(e)}}))((({comments:e,isFetchingData:t,plugins:s,posts:r})=>{const[o,l]=(0,n.useState)(!0),p=(0,n.useCallback)((()=>{const t={comments:e,plugins:s,posts:r,target:"backup_bar_chart_close",type:"dismiss"};a.Z.tracks.recordJetpackClick(t),l(!1)}),[e,s,r]);return!t&&o&&r>20?i().createElement(c.v,{posts:r,comments:e,plugins:s,onClosePopup:p}):null}))},49890:(e,t,s)=>{"use strict";s.d(t,{G:()=>c});var a=s(80800),n=s(65736),i=s(97506),r=s(99196),o=s.n(r);const __=n.__,c=({posts:e,comments:t,onClosePopup:s})=>o().createElement("div",{className:"jp-dash-upgrade-backup__popup"},o().createElement(i.Z,{onClick:s,className:"jp-dash-upgrade-backup__popup-close-icon",compact:!0,borderless:!0},o().createElement("img",{src:a.hp+"/close.svg",alt:__("Close","jetpack")})),o().createElement("img",{className:"jp-dash-upgrade-backup__popup-lock-icon",src:a.hp+"/lock.svg",alt:__("Locked","jetpack")}),o().createElement("p",{className:"jp-dash-upgrade-backup__popup-title"},__("Upgrade to backup","jetpack")),o().createElement("p",null,(0,n.sprintf)(/* translators: 1 number of posts, 2 number of comments */ +(0,n.sprintf)(__("Pick the %s template","jetpack"),t.label))))))}},57227:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var a=s(30253),n=s(91948),i=s(5353);const r=[{name:"highway",label:"Highway",image:s(27956)},{name:"dois",label:"Dois",image:a},{name:"edge",label:"Edge",image:n},{name:"fullscreen",label:"Fullscreen",image:i}]},76848:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var a=s(48229),n=s(9818),i=s(69307),r=s(99196),o=s.n(r),c=s(23177);const l=({toggleClass:e,children:t})=>{const{isEnabled:s,isUpdating:r}=(0,n.useSelect)((e=>{const t=e(c.Eg);return{isEnabled:t.isSocialImageGeneratorEnabled(),isUpdating:t.isUpdatingSocialImageGeneratorSettings()}}),[]),l=(0,n.useDispatch)(c.Eg).updateSocialImageGeneratorSettings,p=(0,i.useCallback)((()=>{l({enabled:!s})}),[s,l]);return o().createElement(a.Z,{className:e,disabled:r,checked:s,onChange:p,label:t})}},53513:(e,t,s)=>{"use strict";s(55609),s(69307);var a=s(65736);s(88219),s(89696);const __=a.__;__("You need a featured image or media attached to your post to be able to share as a social post.","jetpack"),__("By default, the image and text appear on social media as a link preview. To optimize engagement, share as a social post.","jetpack")},63855:(e,t,s)=>{"use strict";var a=s(82674),n=s.n(a),i=s(13477),r=s(9818),o=s(48751),c=s(23177);(0,r.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{excerpt:t("excerpt"),content:t("content").split("\x3c!--more")[0]}}))((e=>{const{message:t}=(0,o.Z)(),{title:s,excerpt:a,content:l}=e,p=(0,r.useSelect)((e=>{const{displayName:t,profileImage:s}=e(c.Eg).getConnectionProfileDetails(c.uJ);return{displayName:t,avatarUrl:s}}));return React.createElement(i.S,n()({},e,{type:"article",user:p,customText:t||a||l||s}))}))},83704:(e,t,s)=>{"use strict";s(82674),s(9818),s(22629),s(99196)},4124:(e,t,s)=>{"use strict";s(9818),s(99196),s(48751),s(23177)},27725:(e,t,s)=>{"use strict";s(9818),s(65736),s(99196),s(48751),s(23177)},28586:(e,t,s)=>{"use strict";s(82674),s(9818),s(22629),s(71806),s(48751),s(23177)},8454:(e,t,s)=>{"use strict";s(55609),s(65736),s(41809),s(9279)},18553:(e,t,s)=>{"use strict";s(9818),s(99196),s(48751),s(23177)},74140:(e,t,s)=>{"use strict";s(55609),s(65736),s(41809)},94714:(e,t,s)=>{"use strict";s(82674),s(9818),s(48751),s(23177)},24766:(e,t,s)=>{"use strict";s(9818),s(99196),s(71806),s(23177)},41809:(e,t,s)=>{"use strict";s(82674),s(65736),s(99196),s(23177),s(42032),s(63855),s(83704),s(4124),s(27725),s(28586),s(18553),s(94714),s(24766)},9279:(e,t,s)=>{"use strict";s(9818),s(65736),s(71806)},13858:(e,t,s)=>{"use strict";s(69307),s(87728)},88219:(e,t,s)=>{"use strict";s(71806)},75323:(e,t,s)=>{"use strict";s(13419),s(86989),s(69307)},39118:(e,t,s)=>{"use strict";s(9818),s(12238)},75263:(e,t,s)=>{"use strict";s(9818),s(12238),s(69307),s(71806)},98811:(e,t,s)=>{"use strict";s(9818),s(69307)},46791:(e,t,s)=>{"use strict";s(69307),s(1795)},1795:(e,t,s)=>{"use strict";const a="video/mp4",n="video/mov",i="video/videopress",r=["image/jpeg","image/jpg","image/png"],o=r.concat(["image/gif","image/bmp"]),c=["video/3g2","video/3gp","video/3gpp","video/asf","video/avi","video/dat","video/divx","video/dv","video/f4v","video/flv","video/gif","video/m2ts","video/m4v","video/mkv","video/mod","video/mov","video/mp4","video/mpe","video/mpeg","video/mpeg4","video/mpg","video/mts","video/nsv","video/ogm","video/ogv","video/qt","video/tod","video/ts","video/vob","video/wmv"],l=r.concat(["image/gif","image/heic","image/heif","image/webp","image/avif"]),p=["video/webm","video/quicktime","video/ogg"],d=r.concat(["image/gif","image/jpe","image/tif","image/tiff","image/webp"]),u=[n,"video/avi","video/mpg","video/mpeg","video/m4v"];r.concat([a,i,n]),r.concat([a,i]),o.concat([i,...c]),r.concat([a,n,i]),r.concat([a,i]),l.concat([...p,a,i]),d.concat([...u,a,i]),new Set([...r,...o,...l,...c,...p,"image/png","image/jpeg","image/jpg","image/heic","image/heif","image/webp"])},71806:(e,t,s)=>{"use strict";s.d(t,{R:()=>o});var a=s(9818),n=s(12238),i=s(69307),r=s(42032);function o(){const{editPost:e}=(0,a.useDispatch)(n.store),t=(0,a.useSelect)((e=>{const t=e(n.store).getEditedPostAttribute("meta")||{},s=t.jetpack_publicize_feature_enabled??!0,a=t.jetpack_social_options||{};return{isPublicizeEnabled:s,jetpackSocialOptions:a,attachedMedia:a.attached_media||[],imageGeneratorSettings:a.image_generator_settings??{enabled:!1},isPostAlreadyShared:t.jetpack_social_post_already_shared??!1,shareMessage:`${t.jetpack_publicize_message||""}`.substring(0,(0,r.getShareMessageMaxLength)()),shouldUploadAttachedMedia:a.should_upload_attached_media??!1}}),[]),s=(0,i.useCallback)(((t,s)=>{e({meta:{[t]:s}})}),[e]),o=(0,i.useCallback)((()=>{s("jetpack_publicize_feature_enabled",!t.isPublicizeEnabled)}),[t.isPublicizeEnabled,s]),c=(0,i.useCallback)(((e,a)=>{s("jetpack_social_options",{...t.jetpackSocialOptions,[e]:a})}),[t.jetpackSocialOptions,s]);return(0,i.useMemo)((()=>({...t,togglePublicizeFeature:o,updateJetpackSocialOptions:c,updateMeta:s})),[t,o,c,s])}},14085:(e,t,s)=>{"use strict";s(13419),s(9818),s(12238),s(71806)},6230:(e,t,s)=>{"use strict";s(9818),s(69307),s(23177)},96672:(e,t,s)=>{"use strict";s(94333),s(69307),s(37568)},86419:(e,t,s)=>{"use strict";s(94333),s(9818),s(12238),s(69307)},34431:(e,t,s)=>{"use strict";s(9818),s(65736),s(23177)},45579:(e,t,s)=>{"use strict";s(13419),s(86989),s(9818),s(12238),s(69307),s(65736),s(37568),s(48751)},37568:(e,t,s)=>{"use strict";s(9818),s(23177)},48751:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var a=s(42032),n=s(71806);function i(){const{updateMeta:e,shareMessage:t}=(0,n.R)();return{message:t,maxLength:(0,a.getShareMessageMaxLength)(),updateMessage:function(t){e("jetpack_publicize_message",t)}}}},19890:(e,t,s)=>{"use strict";s(9818),s(12238),s(23177),s(86419)},21052:(e,t,s)=>{"use strict";s.d(t,{Au:()=>c,Wh:()=>l,ZP:()=>p,hi:()=>o,wO:()=>r});var a=s(9818),n=s(23177),i=s(4957);const r="SET_AUTO_CONVERSION_SETTINGS";function o(){return l({isUpdating:!0})}function c(){return l({isUpdating:!1})}function l(e){return{type:r,options:e}}const p={updateAutoConversionSettings:function*(e){try{yield o(),yield l(e),yield(0,i.Fl)(e);const t=yield(0,i.wi)();return yield l(t.jetpack_social_autoconvert_images),!0}catch(e){const t=(0,a.select)(n.Eg).getAutoConversionSettings();return yield l(t),!1}finally{yield c()}},setAutoConversionSettings:l,refreshAutoConversionSettings:function*(){try{yield o();const e=yield(0,i.wi)();return yield l(e.jetpack_social_autoconvert_images),!0}catch(e){return!1}finally{yield c()}}}},23013:(e,t,s)=>{"use strict";s.r(t),s.d(t,{mergeConnections:()=>p,refreshConnectionTestResults:()=>d,setConnections:()=>c,syncConnectionsToPostMeta:()=>u,toggleConnection:()=>l,toggleConnectionById:()=>m});var a=s(13419),n=s(86989),i=s.n(n),r=s(12238),o=s(74442);function c(e){return{type:o.b,connections:e}}function l(e){return{type:o.L,connectionId:e}}function p(e){return function({dispatch:t,select:s}){const a=s.getConnections(),n=[],i={done:!1,enabled:Boolean(s.numberOfSharesRemaining()),toggleable:!0};for(const t of e){const e={...i,...a.find((e=>e.connection_id?e.connection_id===t.connection_id:e.id===t.id)),...t,is_healthy:t.test_success};n.push(e)}t(c(n))}}function d(e=!1){return async function({dispatch:t}){try{const s=(0,a.Pb)()?.social?.connectionRefreshPath||"/wpcom/v2/publicize/connection-test-results";t(p(await i()({path:s}))),e&&t(u())}catch(e){}}}function u(){return function({registry:e,select:t}){const s=t.getConnections();return e.dispatch(r.store).editPost({jetpack_publicize_connections:s})}}function m(e,t=!0){return function({dispatch:s}){s(l(e)),t&&s(u())}}},74442:(e,t,s)=>{"use strict";s.d(t,{L:()=>n,b:()=>a});const a="SET_CONNECTIONS",n="TOGGLE_CONNECTION"},54725:(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var a=s(21052),n=s(23013),i=s(371),r=s(72438),o=s(4462);const c={...i.ZP,...o.ZP,...a.ZP,...r.Z,...n}},371:(e,t,s)=>{"use strict";s.d(t,{ZP:()=>c,dz:()=>r,ff:()=>o});var a=s(9818),n=s(23177),i=s(4957);const r="SET_JETPACK_SETTINGS";function o(e){return{type:r,options:e}}const c={updateJetpackSettings:function*(e){try{yield o({is_updating:!0}),yield o(e),yield(0,i.RF)(e);const t=yield(0,i.es)();return yield o(t),!0}catch(e){const t=(0,a.select)(n.Eg).getJetpackSettings();return yield o(t),!1}finally{yield o({is_updating:!1})}},setJetpackSettings:o}},72438:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var a=s(4957),n=s(21052),i=s(4462);const r={refreshJetpackSocialSettings:function*(){try{yield(0,n.hi)(),yield(0,i.ds)();const e=yield(0,a.mu)();return yield(0,n.Wh)(e.jetpack_social_autoconvert_images),yield(0,i.ch)(e.jetpack_social_image_generator_settings),!0}catch(e){return!1}finally{yield(0,n.Au)(),yield(0,i.Gr)()}}}},4462:(e,t,s)=>{"use strict";s.d(t,{Gr:()=>c,ZP:()=>p,ch:()=>l,ds:()=>o,kg:()=>r});var a=s(9818),n=s(23177),i=s(4957);const r="SET_SOCIAL_IMAGE_GENERATOR_SETTINGS";function o(){return l({isUpdating:!0})}function c(){return l({isUpdating:!1})}function l(e){return{type:r,options:e}}const p={updateSocialImageGeneratorSettings:function*(e){try{yield o(),yield l(e),yield(0,i.Ux)(e);const t=yield(0,i.oB)();return yield l(t.jetpack_social_image_generator_settings),!0}catch(e){const t=(0,a.select)(n.Eg).getSocialImageGeneratorSettings();return yield l(t),!1}finally{yield c()}},setSocialImageGeneratorSettings:l,refreshSocialImageGeneratorSettings:function*(){try{yield o();const e=yield(0,i.oB)();return yield l(e.jetpack_social_image_generator_settings),!0}catch(e){return!1}finally{yield c()}}}},4957:(e,t,s)=>{"use strict";s.d(t,{Fl:()=>v,RF:()=>m,Ux:()=>g,ZP:()=>E,es:()=>u,mu:()=>f,oB:()=>h,wi:()=>k});var a=s(86989),n=s.n(a);const i="FETCH_JETPACK_SETTINGS",r="UPDATE_JETPACK_SETTINGS",o="FETCH_SOCIAL_IMAGE_GENERATOR_SETTINGS",c="UPDATE_SOCIAL_IMAGE_GENERATOR_SETTINGS",l="FETCH_AUTO_CONVERSION_SETTINGS",p="UPDATE_AUTO_CONVERSION_SETTINGS",d="FETCH_JETPACK_SOCIAL_SETTINGS",u=()=>({type:i}),m=e=>({type:r,settings:e}),h=()=>({type:o}),g=e=>({type:c,settings:e}),k=()=>({type:l}),f=()=>({type:d}),v=e=>({type:p,settings:e}),E={[i]:function(){return n()({path:"/jetpack/v4/social/settings"})},[r]:function(e){return n()({path:"/jetpack/v4/social/settings",method:"POST",data:e.settings})},[o]:function(){return n()({path:"/wp/v2/settings?_fields=jetpack_social_image_generator_settings"})},[c]:function(e){return n()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_image_generator_settings:e.settings}})},[l]:function(){return n()({path:"/wp/v2/settings?_fields=jetpack_social_autoconvert_images"})},[p]:function(e){return n()({path:"/wp/v2/settings",method:"POST",data:{jetpack_social_autoconvert_images:e.settings}})},[d]:function(){return n()({path:"/wp/v2/settings?_fields=jetpack_social_autoconvert_images,jetpack_social_image_generator_settings"})}}},23177:(e,t,s)=>{"use strict";s.d(t,{Eg:()=>l,uJ:()=>d});var a=s(9818),n=s(54725),i=s(4957),r=s(45272),o=s(15781),c=s(22987);const l="jetpack-social-plugin",p={reducer:r.Z,actions:n.Z,selectors:c.Z,resolvers:o.ZP,controls:i.ZP,initialState:window?.jetpackSocialInitialState||window?.Initial_State?.socialInitialState||window?.Jetpack_Editor_Initial_State?.social||{}},d="facebook",u=(0,a.createReduxStore)(l,p);(0,a.register)(u)},20750:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var a=s(21052);const n=(e={},t)=>t.type===a.wO?{...e,...t.options}:e},71837:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var a=s(74442);const n=(e={},t)=>{switch(t.type){case a.b:return{...e,connections:t.connections};case a.L:return{...e,connections:e.connections.map((e=>(e.connection_id?e.connection_id===t.connectionId:e.id===t.connectionId)?{...e,enabled:!e.enabled}:e))}}return e}},45272:(e,t,s)=>{"use strict";s.d(t,{Z:()=>p});var a=s(9818),n=s(20750),i=s(71837),r=s(80697),o=s(35652),c=s(28696),l=s(54489);const p=(0,a.combineReducers)({sharesData:o.Z,siteData:c.Z,connectionData:i.Z,jetpackSettings:r.Z,socialImageGeneratorSettings:l.Z,autoConversionSettings:n.Z,hasPaidPlan:(e=!1)=>e})},80697:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var a=s(371);const n=(e={},t)=>t.type===a.dz?{...e,...t.options}:e},35652:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});const a=(e={})=>e},28696:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});const a=(e={})=>e},54489:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var a=s(4462);const n=(e={},t)=>t.type===a.kg?{...e,...t.options}:e},15781:(e,t,s)=>{"use strict";s.d(t,{ZP:()=>l});var a=s(12238),n=s(21052),i=s(23013),r=s(371),o=s(4462),c=s(4957);const l={getJetpackSettings:function*(){try{const e=yield(0,c.es)();if(e)return(0,r.ff)(e)}catch(e){console.log(e)}},getSocialImageGeneratorSettings:function*(){try{const e=yield(0,c.oB)();if(e)return(0,o.ch)(e.jetpack_social_image_generator_settings)}catch(e){console.log(e)}},getAutoConversionSettings:function*(){try{const e=yield(0,c.wi)();if(e)return(0,n.Wh)(e.jetpack_social_autoconvert_images)}catch(e){console.log(e)}},getConnections:function(){return function({dispatch:e,registry:t}){const s=t.select(a.store).getEditedPostAttribute("jetpack_publicize_connections");e((0,i.setConnections)(s||[]))}}}},68113:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});const a={getAutoConversionSettings:e=>e.autoConversionSettings,isAutoConversionAvailable:e=>e.autoConversionSettings.available,isAutoConversionEnabled:e=>e.autoConversionSettings.available&&e.autoConversionSettings.enabled,isAutoConversionSettingsUpdating:e=>e.autoConversionSettings.isUpdating}},43354:(e,t,s)=>{"use strict";function a(e){return e.connectionData?.connections??[]}function n(e){return e.connectionData?.adminUrl??null}function i(e){return a(e).length>0}function r(e){return a(e).filter((e=>!1===e.test_success))}function o(e){return a(e).filter((e=>"must_reauth"===e.test_success)).map((e=>e.service_name))}function c(e){return a(e).filter((e=>e.enabled))}function l(e){return a(e).filter((e=>!e.enabled))}function p(e,t,{forceDefaults:s=!1}={}){let n="",i="",r="";if(!s){const s=a(e).find((({service_name:e})=>t===e));if(s){const{display_name:e,profile_display_name:a,profile_picture:o}=s;n="twitter"===t?a:e,r="twitter"===t?e:s.username,i=o}}return{displayName:n,profileImage:i,username:r}}s.r(t),s.d(t,{getConnectionProfileDetails:()=>p,getConnections:()=>a,getConnectionsAdminUrl:()=>n,getDisabledConnections:()=>l,getEnabledConnections:()=>c,getFailedConnections:()=>r,getMustReauthConnections:()=>o,hasConnections:()=>i})},22987:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var a=s(68113),n=s(43354),i=s(82836),r=s(31473),o=s(85675),c=s(45073);const l={...o.Z,...n,...i.Z,...r,...c.Z,...a.Z}},82836:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});const a={getJetpackSettings:e=>e.jetpackSettings,isModuleEnabled:e=>e.jetpackSettings.publicize_active,showPricingPage:e=>e.jetpackSettings.show_pricing_page,isUpdatingJetpackSettings:e=>e.jetpackSettings.is_updating,hasPaidPlan:e=>!(e.jetpackSettings?.showNudge??1),isEnhancedPublishingEnabled:e=>e.jetpackSettings?.isEnhancedPublishingEnabled??!1,getDismissedNotices:e=>e.jetpackSettings?.dismissedNotices}},31473:(e,t,s)=>{"use strict";s.r(t),s.d(t,{getScheduledSharesCount:()=>c,getShareLimit:()=>r,getSharedPostsCount:()=>p,getSharesUsedCount:()=>o,getTotalSharesCount:()=>l,isShareLimitEnabled:()=>n,numberOfSharesRemaining:()=>u,shouldShowAdvancedPlanNudge:()=>d,showShareLimits:()=>i});var a=s(82836);function n(e){return e.sharesData?.is_share_limit_enabled??!1}function i(e){return!a.Z.hasPaidPlan(e)&&!e.hasPaidPlan&&n(e)}function r(e){return e.sharesData?.share_limit??30}function o(e){return e.sharesData?.publicized_count??0}function c(e){return e.sharesData?.to_be_publicized_count??0}function l(e){const t=o(e)+c(e);return Math.max(t,0)}function p(e){return e.sharesData?.shared_posts_count??0}function d(e){return e.sharesData?.show_advanced_plan_upgrade_nudge??!1}function u(e,t={}){if(!i(e))return 1/0;const{includeScheduled:s}={includeScheduled:!0,...t},a=o(e),n=r(e),l=s?c(e):0;return Math.max(n-a-l,0)}},85675:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});const a={getAdminUrl:e=>e.siteData?.adminUrl??null,getAPIRootUrl:e=>e.siteData?.apiRoot??null,getAPINonce:e=>e.siteData?.apiNonce??null,getRegistrationNonce:e=>e.siteData?.registrationNonce??null,getSiteSuffix:e=>e.siteData?.siteSuffix??null,getPluginVersion:e=>e.siteData?.pluginVersion??null}},45073:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});const a={getSocialImageGeneratorSettings:e=>e.socialImageGeneratorSettings,isSocialImageGeneratorAvailable:e=>e.socialImageGeneratorSettings.available,isSocialImageGeneratorEnabled:e=>e.socialImageGeneratorSettings.enabled,isUpdatingSocialImageGeneratorSettings:e=>e.socialImageGeneratorSettings.isUpdating,getSocialImageGeneratorDefaultTemplate:e=>e.socialImageGeneratorSettings.template}},5463:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});const a=255;function n(){return a}},12677:(e,t,s)=>{"use strict";s(13419)},42032:(e,t,s)=>{"use strict";s.d(t,{getShareMessageMaxLength:()=>a.A});var a=s(5463);s(12677)},13419:(e,t,s)=>{"use strict";s.d(t,{Pb:()=>a.Z,lQ:()=>n.Z});var a=s(50148),n=s(35004);s(76714),s(80354),s(75404),s(61053),s(11380),s(6342),s(96959),s(39058)},6342:(e,t,s)=>{"use strict";s(99196)},96959:(e,t,s)=>{"use strict";s(69307)},50148:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});const a="Jetpack_Editor_Initial_State";function n(){return"object"==typeof window?window?.[a]??null:null}},35004:(e,t,s)=>{"use strict";function a(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:null}s.d(t,{Z:()=>a})},61053:(e,t,s)=>{"use strict";var a=s(6975);s(69307);const{tracks:n}=a.Z,{recordEvent:i}=n},11380:(e,t,s)=>{"use strict";s(9818),s(69307),s(39058)},44166:(e,t,s)=>{"use strict";s.d(t,{ZP:()=>u,rW:()=>d});var a=s(9818),n=s(99505),i=s(82162),r=s(39058);const o="SET_JETPACK_MODULES",c="SET_MODULE_UPDATING";function l(e){return d({isLoading:e})}function p(e,t){return{type:c,name:e,isUpdating:t}}function d(e){return{type:o,options:e}}const u={updateJetpackModuleStatus:function*(e){try{yield p(e.name,!0),yield(0,i.zL)(e);const t=yield(0,i.Bs)();return yield d({data:t}),!0}catch(e){const t=(0,a.select)(r.p).getJetpackModules();return yield d(t),!1}finally{yield p(e.name,!1)}},setJetpackModules:d,fetchModules:function*(){if((0,n.Wp)())return!0;try{yield l(!0);const e=yield(0,i.Bs)();return yield d({data:e}),!0}catch(e){const t=(0,a.select)(r.p).getJetpackModules();return yield d(t),!1}finally{yield l(!1)}}}},82162:(e,t,s)=>{"use strict";s.d(t,{Bs:()=>o,ZP:()=>l,zL:()=>c});var a=s(86989),n=s.n(a);const i="FETCH_JETPACK_MODULES",r="UPDATE_JETPACK_MODULE_STATUS",o=()=>({type:i}),c=e=>({type:r,settings:e}),l={[i]:function(){return n()({path:"/jetpack/v4/module/all",method:"GET"})},[r]:function({settings:e}){return n()({path:`/jetpack/v4/module/${e.name}/active`,method:"POST",data:{active:e.active}})}}},39058:(e,t,s)=>{"use strict";s.d(t,{p:()=>l});var a=s(9818),n=s(44166),i=s(82162),r=s(42469),o=s(55133),c=s(43524);const l="jetpack-modules",p=(0,a.createReduxStore)(l,{reducer:r.Z,actions:n.ZP,controls:i.ZP,resolvers:o.Z,selectors:c.Z});(0,a.register)(p);const d=window?.Initial_State?.getModules||window?.Jetpack_Editor_Initial_State?.modules||null;null!==d&&(0,a.dispatch)(l).setJetpackModules({data:{...d}})},42469:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});const a={isLoading:!1,isUpdating:{},data:{}},n=(e=a,t)=>{switch(t.type){case"SET_JETPACK_MODULES":return{...e,...t.options};case"SET_MODULE_UPDATING":return{...e,isUpdating:{...e.isUpdating,[t.name]:t.isUpdating}}}return e}},55133:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var a=s(44166),n=s(82162);const i={getJetpackModules:function*(){try{const e=yield(0,n.Bs)();if(e)return(0,a.rW)({data:e})}catch(e){console.error(e)}}}},43524:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var a=s(99505);const n={getJetpackModules:e=>e.data,isModuleActive:(e,t)=>(0,a.Wp)()||(e?.data?.[t]?.activated??!1),areModulesLoading:e=>e.isLoading??!1,isModuleUpdating:(e,t)=>e?.isUpdating?.[t]??!1}},75404:(e,t,s)=>{"use strict";var a=s(65736);s(96483),s(92819);const __=a.__;__("Upgrade your plan to use video covers","jetpack"),__("Upgrade your plan to upload audio","jetpack")},76714:(e,t,s)=>{"use strict";s(98817)},99505:(e,t,s)=>{"use strict";function a(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function n(){return"simple"===a()}s.d(t,{Wp:()=>n})},80354:(e,t,s)=>{"use strict";s(82674),s(94333)},4341:(e,t,s)=>{"use strict";s.d(t,{Z:()=>f});var a=s(6895),n=s(65736),i=s(65235),r=s.n(i),o=s(85799),c=s(43255),l=s(84069),p=s(25162),d=s.n(p),u=s(99196),m=s.n(u),h=s(59309),g=s(96300);const __=n.__;class k extends u.Component{static propTypes={inOfflineMode:d().bool.isRequired,siteRawUrl:d().string.isRequired};static defaultProps={inOfflineMode:!1,siteRawUrl:""};trackActivityClick=()=>{l.Z.tracks.recordJetpackClick({type:"activity-link",target:"at-a-glance",feature:"activity-log"})};render(){const{inOfflineMode:e}=this.props,t=__("Jetpack keeps a complete record of everything that happens on your site, taking the guesswork out of site management, debugging, and repair.","jetpack");return m().createElement("div",{className:"jp-dash-item__interior"},m().createElement(c.Z,{label:__("Activity","jetpack"),isModule:!1,className:r()({"jp-dash-item__is-inactive":e}),pro:!1},m().createElement("p",{className:"jp-dash-item__description"},e?__("Unavailable in Offline Mode.","jetpack"):t)),m().createElement(o.Z,{key:"view-activity",className:"jp-dash-item__manage-in-wpcom",compact:!0,href:(0,a.Z)("calypso-activity-log",{site:this.props.siteRawUrl}),target:"_blank",rel:"noopener noreferrer",onClick:this.trackActivityClick},__("View site activity","jetpack")))}}const f=(0,h.$j)((e=>({inOfflineMode:(0,g.Ex)(e)})))(k)},91248:(e,t,s)=>{"use strict";s.d(t,{Z:()=>T});var a=s(82674),n=s.n(a),i=s(64743),r=s(52947),o=s(69307),c=s(65736),l=s(97506),p=s(85799),d=s(43255),u=s(11020),m=s(41549),h=s(85733),g=s(84069),k=s(59584),f=s(92819),v=s(1137),E=s(25162),w=s.n(E),_=s(99196),b=s.n(_),y=s(59309),C=s(17296),j=s(96300),S=s(69508),N=s(33002);const __=c.__,_x=c._x;class x extends _.Component{static propTypes={siteRawUrl:w().string.isRequired,siteAdminUrl:w().string.isRequired,trackUpgradeButtonView:w().func,akismetData:w().oneOfType([w().string,w().object,w().number]).isRequired,isOfflineMode:w().bool.isRequired,upgradeUrl:w().string.isRequired,hasConnectedOwner:w().bool.isRequired};static defaultProps={siteRawUrl:"",siteAdminUrl:"",akismetData:"N/A",isOfflineMode:"",trackUpgradeButtonView:f.noop};trackActivateClick(){g.Z.tracks.recordJetpackClick({type:"activate-link",target:"at-a-glance",feature:"anti-spam"})}onActivateClick=()=>(this.trackActivateClick(),this.props.createNotice("is-info",__("Activating Akismet…","jetpack"),{id:"activating-akismet"}),i.ZP.activateAkismet().then((()=>{this.props.removeNotice("activating-akismet"),window.location.href=this.props.siteAdminUrl+"admin.php?page=akismet-key-config"})).catch((()=>{this.props.removeNotice("activating-akismet"),this.props.createNotice("is-error",__("Could not activate Akismet.","jetpack"),{id:"activate-akismet-failure"})})),!1);trackModerateClick(){g.Z.tracks.recordJetpackClick({type:"moderate-link",target:"at-a-glance",feature:"anti-spam"})}onModerateClick=()=>{this.trackModerateClick()};getContent(){const{akismetData:e,siteAdminUrl:t}=this.props,s=__("Akismet Anti-spam","jetpack"),a={text:__("Comments and contact form submissions are checked against our global database of spam.","jetpack"),link:this.props.isAtomicSite?null:"https://akismet.com/features",privacyLink:"https://automattic.com/privacy/"},i=()=>{let s;return"not_active"===e?s=(0,o.createInterpolateElement)(__("Already have an API key? .","jetpack"),{Button:b().createElement(l.Z,{className:"jp-link-button",onClick:this.onActivateClick})}):"invalid_key"===e&&(s=(0,o.createInterpolateElement)(__("Already have an API key? Get started.","jetpack"),{a:b().createElement("a",{href:t+"admin.php?page=akismet-key-config"})})),b().createElement(h.ZP,{callToAction:_x("Upgrade","Call to action to buy a new plan","jetpack"),title:__("Automatically clear spam from comments and forms.","jetpack"),description:s,disableHref:"false",href:this.props.upgradeUrl,eventFeature:"akismet",path:"dashboard",plan:(0,k.o2o)(k.V37),trackBannerDisplay:this.props.trackUpgradeButtonView,noIcon:!0})},c=()=>b().createElement(h.ZP,{callToAction:__("Connect","jetpack"),title:__("Connect your WordPress.com account to upgrade and automatically clear spam from comments and forms","jetpack"),disableHref:"false",onClick:this.props.connectUser,eventFeature:"akismet",path:"dashboard",plan:(0,k.o2o)(k.V37)}),u=()=>this.props.hasConnectedOwner?i():c();if("N/A"===e)return b().createElement(d.Z,{label:s,module:"akismet",support:a,pro:!0},b().createElement("p",{className:"jp-dash-item__description"},__("Loading…","jetpack")));if(["not_installed","not_active","invalid_key"].includes(e)){const e={label:s,module:"akismet",support:a,className:"jp-dash-item__is-inactive",pro:!0};return this.props.hasAntiSpam||this.props.hasAkismet?b().createElement(d.Z,e,__("Your Jetpack plan provides anti-spam protection through Akismet. Click 'set up' to enable it on your site.","jetpack")):this.props.isOfflineMode?b().createElement(d.Z,e,b().createElement("p",{className:"jp-dash-item__description"},__("Unavailable in Offline Mode.","jetpack"))):b().createElement(d.Z,n()({},e,{overrideContent:u()}))}return[b().createElement(d.Z,{key:"comment-moderation",label:s,module:"akismet",support:a,status:"is-working",pro:!0},(()=>0!==this.props.akismetData?b().createElement(b().Fragment,null,b().createElement("h2",{className:"jp-dash-item__count"},(0,r.Z)(this.props.akismetData)),b().createElement("p",{className:"jp-dash-item__description"},_x("Spam comments blocked.",'Example: "412 Spam comments blocked"',"jetpack"))):b().createElement("div",{className:"jp-dash-item__recently-activated"},b().createElement("p",{className:"jp-dash-item__description"},__("Akismet is now monitoring all comments on your site. Data will display here soon!","jetpack"))))()),!this.props.isOfflineMode&&b().createElement(p.Z,{key:"moderate-comments",className:"jp-dash-item__manage-in-wpcom",compact:!0,href:`${this.props.siteAdminUrl}edit-comments.php`,onClick:this.onModerateClick},__("Moderate comments","jetpack"))]}render(){return b().createElement("div",{className:"jp-dash-item__interior"},b().createElement(u.Z,null),this.getContent())}}const T=(0,y.$j)((e=>({akismetData:(0,C.fU)(e),isAtomicSite:(0,S.Ug)(e),isOfflineMode:(0,j.Ex)(e),upgradeUrl:(0,v.z)(e,"akismet"),nonce:(0,S.VY)(e),hasConnectedOwner:(0,j.it)(e),hasAntiSpam:(0,N.CV)(e,"antispam"),hasAkismet:(0,N.CV)(e,"akismet")})),(e=>({createNotice:m.iI,removeNotice:m.qq,connectUser:()=>e((0,j.bL)())})))(x)},83326:(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var a=s(80800),n=s(65736),i=s(97506),r=s(85799),o=s(84069),c=s(99196),l=s.n(c),p=s(59309),d=s(3230);const __=n.__,u=(0,p.$j)((e=>({isDismissed:(0,d.wS)(e)})),(e=>({dismiss:()=>e((0,d.VP)({dismiss_dash_backup_getting_started:!0}))})))((({isDismissed:e,dismiss:t})=>{const s=(0,c.useCallback)((()=>{t(),o.Z.tracks.recordEvent("jetpack_backup_getting_started_video_dismiss",{position:"at_a_glance"})}),[t]),n=(0,c.useCallback)((()=>{o.Z.tracks.recordEvent("jetpack_backup_getting_started_video_click",{position:"at_a_glance"})}),[]);return e?null:l().createElement(r.Z,{className:"dash-backup-getting-started"},l().createElement(i.Z,{borderless:!0,compact:!0,className:"dash-backup-getting-started__dismiss",onClick:s},l().createElement("span",{className:"dashicons dashicons-no"})),l().createElement("a",{href:a.zh,target:"_blank",rel:"noreferrer"},l().createElement("img",{className:"dash-backup-getting-started__thumbnail",src:a.hp+"backup-getting-started-thumbnail.png",srcSet:`${a.hp+"backup-getting-started-thumbnail.png"} 1x, ${a.hp+"backup-getting-started-thumbnail-2x.png"} 2x`,alt:""})),l().createElement("div",{className:"dash-backup-getting-started__content"},l().createElement("h3",{className:"dash-backup-getting-started__header"},__("Getting started with Jetpack Backup","jetpack")),l().createElement("p",{className:"dash-backup-getting-started__text"},__("A short video guide on how to back up your website","jetpack"))),l().createElement(i.Z,{className:"dash-backup-getting-started__cta",href:a.zh,onClick:n,target:"_blank",rel:"noreferrer",compact:!0,primary:!0},__("Watch the video","jetpack")))}))},30647:(e,t,s)=>{"use strict";s.d(t,{v:()=>p});var a=s(43521),n=s(65736),i=s(85799),r=s(84069),o=s(99196),c=s.n(o),l=s(49890);const __=n.__,p=({comments:e,plugins:t,posts:s,onClosePopup:n})=>{const p=(0,o.useRef)(!1);(0,o.useEffect)((()=>{p.current||(r.Z.tracks.recordEvent("jetpack_wpa_aag_backup_bar_chart_view",{comments:e,plugins:t,posts:s}),p.current=!0)}),[]);const d=(0,o.useMemo)((()=>[{count:s,label:__("Posts","jetpack"),backgroundColor:"#00BA37"},{count:t,label:__("Plugins","jetpack"),backgroundColor:"#3895BA"},{count:e,label:__("Comments","jetpack"),backgroundColor:"#E68B28"}]),[e,t,s]);return c().createElement(i.Z,{className:"jp-dash-upgrade-backup"},c().createElement(l.G,{posts:s,comments:e,onClosePopup:n}),c().createElement(a.Z,{items:d}))}},91498:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var a=s(84069),n=s(99196),i=s.n(n),r=s(59309),o=s(17296),c=s(30647);const l=(0,r.$j)((e=>{const t=(0,o.yZ)(e)?.general?.stats;return{comments:t?.comments,plugins:Object.keys((0,o.Fb)(e)).length,posts:t?.posts,isFetchingData:(0,o.vz)(e)||(0,o.F2)(e)}}))((({comments:e,isFetchingData:t,plugins:s,posts:r})=>{const[o,l]=(0,n.useState)(!0),p=(0,n.useCallback)((()=>{const t={comments:e,plugins:s,posts:r,target:"backup_bar_chart_close",type:"dismiss"};a.Z.tracks.recordJetpackClick(t),l(!1)}),[e,s,r]);return!t&&o&&r>20?i().createElement(c.v,{posts:r,comments:e,plugins:s,onClosePopup:p}):null}))},49890:(e,t,s)=>{"use strict";s.d(t,{G:()=>c});var a=s(80800),n=s(65736),i=s(97506),r=s(99196),o=s.n(r);const __=n.__,c=({posts:e,comments:t,onClosePopup:s})=>o().createElement("div",{className:"jp-dash-upgrade-backup__popup"},o().createElement(i.Z,{onClick:s,className:"jp-dash-upgrade-backup__popup-close-icon",compact:!0,borderless:!0},o().createElement("img",{src:a.hp+"/close.svg",alt:__("Close","jetpack")})),o().createElement("img",{className:"jp-dash-upgrade-backup__popup-lock-icon",src:a.hp+"/lock.svg",alt:__("Locked","jetpack")}),o().createElement("p",{className:"jp-dash-upgrade-backup__popup-title"},__("Upgrade to backup","jetpack")),o().createElement("p",null,(0,n.sprintf)(/* translators: 1 number of posts, 2 number of comments */ __("Be sure your %1$d posts, %2$d comments, and more information are safely backed up with Jetpack","jetpack"),e,t)))},92792:(e,t,s)=>{"use strict";s.d(t,{Z:()=>O});var a=s(6895),n=s(55609),i=s(69771),r=s(69307),o=s(65736),c=s(61074),l=s(70157),p=s(97506),d=s(85799),u=s(43255),m=s(75402),h=s(83526),g=s(85733),k=s(84069),f=s(59584),v=s(92819),E=s(1137),w=s(25162),_=s.n(w),b=s(99196),y=s.n(b),C=s(59309),j=s(17296),S=s(96300),N=s(69508),x=s(33002),T=s(61372),M=s(83326),A=s(91498);const __=o.__,_x=o._x,P=e=>y().createElement(u.Z,{label:__("VaultPress Backup","jetpack"),module:e.feature||"backups",support:{text:__("VaultPress Backup allows you to easily restore or download a backup from a specific moment.","jetpack"),link:(0,a.Z)("jetpack-support-backup")},className:e.className+" dash-backups",status:e.status,pro:!0,overrideContent:e.overrideContent},y().createElement("p",{className:"jp-dash-item__description"},e.content));class Z extends b.Component{static propTypes={siteRawUrl:_().string.isRequired,getOptionValue:_().func.isRequired,rewindStatus:_().string.isRequired,rewindStatusReason:_().string.isRequired,trackUpgradeButtonView:_().func,vaultPressData:_().any.isRequired,hasBackups:_().bool.isRequired,hasRealTimeBackups:_().bool.isRequired,isOfflineMode:_().bool.isRequired,isVaultPressInstalled:_().bool.isRequired,isWoA:_().bool.isRequired,upgradeUrl:_().string.isRequired,hasConnectedOwner:_().bool.isRequired,backupUndoEvent:_().any.isRequired};static defaultProps={siteRawUrl:"",getOptionValue:v.noop,vaultPressData:"",isOfflineMode:!1,isVaultPressInstalled:!1,isWoA:!1,rewindStatus:"",trackUpgradeButtonView:v.noop,backupUndoEvent:{}};trackBackupsClick=(e="backups-link")=>function(){k.Z.tracks.recordJetpackClick({type:e,target:"at-a-glance",feature:"backups"})};trackRedeemCouponButtonView=()=>{const{partnerCoupon:e}=this.props;k.Z.tracks.recordEvent("jetpack_wpa_aag_redeem_partner_coupon_button_view",{feature:"backups",coupon_preset:e.preset})};getJetpackBackupBanner(){const{partnerCoupon:e,upgradeUrl:t,siteRawUrl:s,trackUpgradeButtonView:n}=this.props;if(this.props.hasConnectedOwner){if(e&&"jetpack_backup_daily"===e.product.slug){const t=(0,a.Z)("jetpack-plugin-partner-coupon-checkout",{path:e.product.slug,site:s,query:`coupon=${e.coupon_code}`});return y().createElement(g.ZP,{callToAction:__("Redeem","jetpack"),title:(0,o.sprintf)(/* translators: %s: Name of a Jetpack product. */ __("Redeem your coupon and get started with %s for free the first year!","jetpack"),e.product.title),disableHref:"false",href:t,eventFeature:"backups",path:"dashboard",eventProps:{type:"redeem_partner_coupon",coupon_preset:e.preset},plan:(0,f.o2o)(f.N_2),trackBannerDisplay:this.trackRedeemCouponButtonView})}return y().createElement(y().Fragment,null,y().createElement(A.Z,null),y().createElement(g.ZP,{callToAction:_x("Upgrade","Call to action to buy a new plan","jetpack"),title:__("Never worry about losing your site – automatic backups keep your content safe.","jetpack"),disableHref:"false",href:t,eventFeature:"backups",path:"dashboard",plan:(0,f.o2o)(f.N_2),trackBannerDisplay:n}))}return y().createElement(g.ZP,{callToAction:__("Connect","jetpack"),title:__("Connect your WordPress.com account to upgrade and get automatic backups that keep your content safe.","jetpack"),disableHref:"false",onClick:this.props.connectUser,eventFeature:"backups",path:"dashboard",plan:(0,f.o2o)(f.N_2)})}getVPContent(){const{hasBackups:e,isFetchingSite:t,isVaultPressInstalled:s,getOptionValue:n,siteRawUrl:i,vaultPressData:o}=this.props;return n("vaultpress")&&"success"===(0,v.get)(o,"code","")?P({className:"jp-dash-item__is-active",status:"is-working",content:y().createElement("span",null,(0,v.get)(o,"message","")," ",(0,r.createInterpolateElement)(__("View backup details.","jetpack"),{a:y().createElement("a",{href:(0,a.Z)("vaultpress-dashboard"),target:"_blank",rel:"noopener noreferrer"})}))}):t?this.renderLoading():P(e?{className:"jp-dash-item__is-inactive",status:s?"pro-inactive":"pro-uninstalled",content:(0,r.createInterpolateElement)(__("To automatically back up your entire site, please install and activate VaultPress.","jetpack"),{a:y().createElement("a",{href:(0,a.Z)("calypso-plugins-setup",{site:i,query:"only=backups"}),target:"_blank",rel:"noopener noreferrer"})})}:{className:"jp-dash-item__is-inactive",status:"no-pro-uninstalled-or-inactive",overrideContent:this.getJetpackBackupBanner()})}renderManageBackupsLinks(){const{isWoA:e,siteRawUrl:t}=this.props;return y().createElement(d.Z,{compact:!0,key:"manage-backups",className:"jp-dash-item__manage-in-wpcom"},y().createElement("div",{className:"jp-dash-item__action-links"},y().createElement(n.ExternalLink,{href:e?(0,a.Z)("calypso-backups",{site:t}):(0,a.Z)("my-jetpack-manage-backup",{site:t}),target:"_blank",rel:"noopener noreferrer",onClick:this.trackBackupsClick("backups-link")},__("View your site's backups","jetpack")),y().createElement(n.ExternalLink,{href:(0,a.Z)("calypso-activity-log",{site:t,query:"group=rewind"}),target:"_blank",rel:"noopener noreferrer",onClick:this.trackBackupsClick("restore-points-link")},__("View your most recent restore points","jetpack"))))}getRewindContent(){const{hasRealTimeBackups:e,rewindStatus:t,siteRawUrl:s,backupUndoEventLoaded:i}=this.props,o=(e,t,s)=>y().createElement(d.Z,{compact:!0,key:"manage-backups",className:"jp-dash-item__manage-in-wpcom",href:e,target:"_blank",rel:"noopener noreferrer",onClick:this.trackBackupsClick(s)},t),c=e=>P({className:"jp-dash-item__is-active",status:"is-working",feature:"rewind",content:e});switch(t){case"provisioning":return y().createElement(y().Fragment,null,c(__("We are configuring your site's backups.","jetpack")));case"awaiting_credentials":return y().createElement(y().Fragment,null,c(__("Enter your SSH, SFTP or FTP credentials to enable one-click site restores and faster backups","jetpack")),o((0,a.Z)("jetpack-backup-dash-credentials",{site:s}),__("Enter credentials","jetpack"),"enter-credentials-link"));case"active":{if(i)return this.renderUndo();let t=__("We are backing up your site daily.","jetpack");return e&&(t=(0,r.createInterpolateElement)(__("Every change you make will be backed up, in real-time, as you edit your site. Learn More","jetpack"),{ExternalLink:y().createElement(n.ExternalLink,{href:(0,a.Z)("jetpack-blog-realtime-mechanics"),target:"_blank",rel:"noopener noreferrer",onClick:this.trackBackupsClick("realtime-learn-more-link")})})),y().createElement(y().Fragment,null,c(t),this.renderManageBackupsLinks())}}return!1}renderLoading(){return P({className:"",status:"",content:__("Loading…","jetpack")})}renderFromRewindStatus(){return this.props.hasBackups&&"unavailable"===this.props.rewindStatus&&"site_new"===this.props.rewindStatusReason?P({className:"jp-dash-item__is-inactive",status:"pro-inactive",content:__("Your site is new and may still be preparing backup configuration.","jetpack")}):"unavailable"===this.props.rewindStatus||""===this.props.rewindStatus?this.getVPContent():y().createElement("div",{className:"jp-dash-item"},this.getRewindContent())}trackUndoFeatureView(){k.Z.tracks.recordEvent("jetpack_wpa_aag_backup_undo_view")}trackUndoButtonClick(){k.Z.tracks.recordEvent("jetpack_wpa_aag_backup_undo_button_click")}renderUndo(){const{backupUndoEvent:e}=this.props,{activityDate:t,activityTitle:s,activityDescription:n,actorName:o,actorRole:d,actorAvatarUrl:u,undoBackupId:m}=e,h=(0,i.dateI18n)("M jS, g:i a",t),g=y().createElement("div",{className:"dops-card jp-dash-item__card dash-backup-undo"},y().createElement("div",{className:"jp-dash-item__description dash-backup-undo__activity-log"},y().createElement("div",{className:"dash-backup-undo__activity-log-date"},h),y().createElement("div",{className:"dash-backup-undo__activity-log-action"},s),y().createElement("div",{className:"dash-backup-undo__activity-log-description"},n),y().createElement("div",{className:"dash-backup-undo__activity-log-user-meta"},y().createElement("div",{className:"dash-backup-undo__activity-log-user-meta-avatar"},y().createElement("img",{alt:o,src:u??"https://www.gravatar.com/avatar/0?s=96&d=mm",width:"30",height:"30"})),y().createElement("div",{className:"dash-backup-undo__activity-log-user-meta-name"},o,d&&" - "+d))),y().createElement("div",{className:"dash-backup-undo__cta"},(0,r.createInterpolateElement)(__("","jetpack"),{button:y().createElement(p.Z,{href:(0,a.Z)("jetpack-backup-undo-cta",{path:m}),primary:!0,target:"_blank",onClick:this.trackUndoButtonClick}),icon:y().createElement(c.Z,{icon:l.Z})})));return this.trackUndoFeatureView(),y().createElement(y().Fragment,null,P({className:"jp-dash-item__is-active",status:"is-working",feature:"rewind",overrideContent:g}),this.renderManageBackupsLinks())}renderGettingStartedVideo(){return"awaiting_credentials"!==this.props.rewindStatus?null:y().createElement(M.Z,null)}render(){return this.props.showBackups?this.props.isOfflineMode?y().createElement("div",{className:"jp-dash-item__interior"},P({className:"jp-dash-item__is-inactive",status:"no-pro-uninstalled-or-inactive",content:__("Unavailable in Offline Mode.","jetpack")})):(this.props.isFetchingSite&&this.renderLoading(),y().createElement("div",null,y().createElement(h.Z,null),"active"===this.props.rewindStatus&&y().createElement(m.Z,null),this.renderFromRewindStatus(),this.renderGettingStartedVideo())):null}}const O=(0,C.$j)((e=>({vaultPressData:(0,j.XK)(e),isOfflineMode:(0,S.Ex)(e),isVaultPressInstalled:(0,T.P8)(e,"vaultpress/vaultpress.php"),showBackups:(0,N.xR)(e),upgradeUrl:(0,E.z)(e,"backup"),hasConnectedOwner:(0,S.it)(e),isFetchingSite:(0,x._5)(e),hasBackups:(0,x.CV)(e,"backups"),hasRealTimeBackups:(0,x.CV)(e,"real-time-backups"),partnerCoupon:(0,N.DV)(e),isWoA:(0,N.Pw)(e),backupUndoEvent:(0,j.b9)(e),backupUndoEventLoaded:(0,j.O1)(e),backupUndoEventIsFetching:(0,j.Ve)(e)})),(e=>({connectUser:()=>e((0,S.bL)())})))(Z)},96438:(e,t,s)=>{"use strict";s.d(t,{Z:()=>x});var a=s(64743),n=s(60128),i=s(14186),r=s(6895),o=s(55609),c=s(69307),l=s(65736),p=s(65235),d=s.n(p),u=s(42698),m=s(87553),h=s(81114),g=s(84069),k=s(25162),f=s.n(k),v=s(99196),E=s(59309),w=s(96300),_=s(69508),b=s(33002),y=s(61372);const __=l.__,_x=l._x,C="admin.php?page=jetpack-boost",j=["jetpack-boost/jetpack-boost.php","jetpack-boost-dev/jetpack-boost.php"],S="jetpack-boost",N=({siteAdminUrl:e,siteConnectionStatus:t,siteUrl:s,apiRoot:r,apiNonce:o,fetchPluginsData:p,fetchingPluginsData:u,isBoostInstalled:k,isBoostActive:f,hasActiveBoostPurchase:E,latestSpeedScores:w={}})=>{const _="offline"===t,[b,y]=(0,v.useState)(!1),[N,x]=(0,v.useState)(!1),[P,Z]=(0,v.useState)(!1),[O,R]=(0,v.useState)("C"),[L,z]=(0,v.useState)(1),[I,U]=(0,v.useState)(0),[D,V]=(0,v.useState)(0),[B,F]=(0,v.useState)(!1),H=k&&f,J=!(H||_||u||B),q=_x("Boost","The Jetpack Boost product name, without the Jetpack prefix","jetpack"),W=()=>{U(w.scores.mobile),V(w.scores.desktop),R((0,n.yn)(w.scores.mobile,w.scores.desktop)),z($(1e3*w.timestamp))},$=e=>{const t=new Date(e),s=new Date-t;return Math.floor(s/864e5)};(0,v.useEffect)((()=>{w&&$(1e3*w.timestamp)<21?W():(async()=>{if(!_&&!H){y(!0);try{const e=await(0,n.tZ)(!0,r,s,o),t=(0,n.yn)(e.current.mobile,e.current.desktop);R(t),U(e.current.mobile),V(e.current.desktop),z(0),y(!1)}catch(e){g.Z.tracks.recordEvent("jetpack_boost_speed_score_error",{feature:S,position:"at-a-glance",error:e}),w&&w.scores?W():F(!0),y(!1)}}})()}),[]);const K=()=>{switch(O){case"A":return{top:__("A one-second delay in loading times can reduce your site traffic by 10%.","jetpack"),bottom:__("Use Boost’s automated acceleration tools to optimize your performance on the go.","jetpack")};case"B":return{top:__("A one-second improvement in loading times can increase your site traffic by 10%.","jetpack"),bottom:__("Jetpack Boost enhance your site’s performance like top websites, no developer needed.","jetpack")};default:return{top:__("You can lose 10% of your visitors for every additional second your site takes to load.","jetpack"),bottom:__("Make your site blazing fast for free with Boost’s simple dashboard and acceleration tools.","jetpack")}}},G=(0,v.useCallback)((()=>{if(!H)return k?Z(!0):x(!0),g.Z.tracks.recordJetpackClick({target:"boost_instant_tests_install",type:k?"activate":"install",feature:S}),a.ZP.installPlugin(S,"active").then((()=>new Promise((e=>setTimeout(e,2500))))).then((()=>p())).finally((()=>{x(!1),Z(!1)}))}),[p,k,H]);return React.createElement("div",{className:"dash-boost-speed-score"},J?React.createElement(React.Fragment,null,b?React.createElement(h.Z,{className:"dash-boost-speed-score__section-header",label:q}):React.createElement("div",{className:"dash-boost-speed-score__summary"},React.createElement("div",null,React.createElement("span",{className:"dash-boost-speed-score__summary-grade"},(0,l.sprintf)( // translators: %s is the letter grade of the site's speed performance. diff --git a/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-app-media.php b/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-app-media.php index b37bd90e71..7956e331a5 100644 --- a/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-app-media.php +++ b/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-app-media.php @@ -3,13 +3,13 @@ * REST API endpoint for the media uploaded by the Jetpack app. * * @package automattic/jetpack - * @since 13.1-a.8 + * @since 13.1 */ /** * Media uploaded by the Jetpack app helper API. * - * @since 13.1-a.8 + * @since 13.1 */ class WPCOM_REST_API_V2_Endpoint_App_Media extends WP_REST_Controller { diff --git a/composer.json b/composer.json index fb2bfe3732..ec043f0007 100644 --- a/composer.json +++ b/composer.json @@ -13,21 +13,21 @@ "ext-openssl": "*", "automattic/jetpack-a8c-mc-stats": "^2.0.0", "automattic/jetpack-abtest": "^2.0.0", - "automattic/jetpack-admin-ui": "^0.3.2-alpha", + "automattic/jetpack-admin-ui": "^0.3.2", "automattic/jetpack-assets": "^2.0.4", "automattic/jetpack-autoloader": "^3.0.2", - "automattic/jetpack-backup": "^3.1.0", - "automattic/jetpack-blaze": "^0.15.1", + "automattic/jetpack-backup": "^3.1.1", + "automattic/jetpack-blaze": "^0.15.2", "automattic/jetpack-blocks": "^2.0.0", "automattic/jetpack-boost-speed-score": "^0.3.3", "automattic/jetpack-compat": "^2.0.0", "automattic/jetpack-composer-plugin": "^2.0.0", "automattic/jetpack-config": "^2.0.0", - "automattic/jetpack-connection": "^2.3.0-alpha", + "automattic/jetpack-connection": "^2.2.0", "automattic/jetpack-constants": "^2.0.0", "automattic/jetpack-device-detection": "^2.0.1", "automattic/jetpack-error": "^2.0.0", - "automattic/jetpack-forms": "^0.30.1", + "automattic/jetpack-forms": "^0.30.2", "automattic/jetpack-google-fonts-provider": "^0.7.1", "automattic/jetpack-identity-crisis": "^0.15.0", "automattic/jetpack-image-cdn": "^0.3.2", @@ -36,20 +36,20 @@ "automattic/jetpack-jitm": "^3.0.2", "automattic/jetpack-licensing": "^2.0.1", "automattic/jetpack-logo": "^2.0.0", - "automattic/jetpack-my-jetpack": "^4.7.0-alpha", + "automattic/jetpack-my-jetpack": "^4.7.0", "automattic/jetpack-plugins-installer": "^0.3.1", "automattic/jetpack-post-list": "^0.5.1", - "automattic/jetpack-publicize": "^0.41.0-alpha", + "automattic/jetpack-publicize": "^0.40.0", "automattic/jetpack-redirect": "^2.0.0", "automattic/jetpack-roles": "^2.0.0", - "automattic/jetpack-search": "^0.42.0", + "automattic/jetpack-search": "^0.42.1", "automattic/jetpack-stats": "^0.9.0", "automattic/jetpack-stats-admin": "^0.15.1", "automattic/jetpack-status": "^2.1.0", "automattic/jetpack-sync": "^2.4.2", - "automattic/jetpack-videopress": "^0.22.3", + "automattic/jetpack-videopress": "^0.22.4", "automattic/jetpack-waf": "^0.12.4", - "automattic/jetpack-wordads": "^0.3.5", + "automattic/jetpack-wordads": "^0.3.6", "scssphp/scssphp": "1.12.0" }, "require-dev": { @@ -80,6 +80,7 @@ "pnpm run watch" ] }, + "repositories": [], "autoload": { "classmap": [ "src" @@ -92,7 +93,7 @@ "platform": { "ext-intl": "0.0.0" }, - "autoloader-suffix": "f11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8", + "autoloader-suffix": "f11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9", "allow-plugins": { "automattic/jetpack-autoloader": true, "automattic/jetpack-composer-plugin": true diff --git a/jetpack.php b/jetpack.php index 6e1679763f..4df5c7c92b 100644 --- a/jetpack.php +++ b/jetpack.php @@ -4,7 +4,7 @@ * Plugin URI: https://jetpack.com * Description: Security, performance, and marketing tools made by WordPress experts. Jetpack keeps your site protected so you can focus on more important things. * Author: Automattic - * Version: 13.1-a.8 + * Version: 13.1-a.9 * Author URI: https://jetpack.com * License: GPL2+ * Text Domain: jetpack @@ -34,7 +34,7 @@ define( 'JETPACK__MINIMUM_WP_VERSION', '6.3' ); define( 'JETPACK__MINIMUM_PHP_VERSION', '7.0' ); -define( 'JETPACK__VERSION', '13.1-a.8' ); +define( 'JETPACK__VERSION', '13.1-a.9' ); /** * Constant used to fetch the connection owner token diff --git a/jetpack_vendor/automattic/jetpack-admin-ui/CHANGELOG.md b/jetpack_vendor/automattic/jetpack-admin-ui/CHANGELOG.md index 5dcb61cf41..81723afa45 100644 --- a/jetpack_vendor/automattic/jetpack-admin-ui/CHANGELOG.md +++ b/jetpack_vendor/automattic/jetpack-admin-ui/CHANGELOG.md @@ -5,12 +5,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.3.2-alpha] - unreleased - -This is an alpha version! The changes listed here are not final. - +## [0.3.2] - 2024-01-29 ### Fixed -- Wait until 'admin_menu' action to call `add_menu()`, to avoid triggering the l10n load too early. +- Wait until 'admin_menu' action to call `add_menu()`, to avoid triggering the l10n load too early. [#35279] ## [0.3.1] - 2023-11-24 @@ -139,7 +136,7 @@ This is an alpha version! The changes listed here are not final. ### Fixed - Fixing menu visibility issues. -[0.3.2-alpha]: https://github.com/Automattic/jetpack-admin-ui/compare/0.3.1...0.3.2-alpha +[0.3.2]: https://github.com/Automattic/jetpack-admin-ui/compare/0.3.1...0.3.2 [0.3.1]: https://github.com/Automattic/jetpack-admin-ui/compare/0.3.0...0.3.1 [0.3.0]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.25...0.3.0 [0.2.25]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.24...0.2.25 diff --git a/jetpack_vendor/automattic/jetpack-admin-ui/src/class-admin-menu.php b/jetpack_vendor/automattic/jetpack-admin-ui/src/class-admin-menu.php index ba5dbdde0b..de794a129a 100644 --- a/jetpack_vendor/automattic/jetpack-admin-ui/src/class-admin-menu.php +++ b/jetpack_vendor/automattic/jetpack-admin-ui/src/class-admin-menu.php @@ -13,7 +13,7 @@ */ class Admin_Menu { - const PACKAGE_VERSION = '0.3.2-alpha'; + const PACKAGE_VERSION = '0.3.2'; /** * Whether this class has been initialized diff --git a/jetpack_vendor/automattic/jetpack-backup/CHANGELOG.md b/jetpack_vendor/automattic/jetpack-backup/CHANGELOG.md index 4d835a1864..30c58bb7a7 100644 --- a/jetpack_vendor/automattic/jetpack-backup/CHANGELOG.md +++ b/jetpack_vendor/automattic/jetpack-backup/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.1.1] - 2024-01-29 +### Changed +- Update dependencies. + ## [3.1.0] - 2024-01-22 ### Changed - Use blog ID instead site slug for checkout and WPCOM links. [#35020] @@ -542,6 +546,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add API endpoints and Jetpack Backup package for managing Help… +[3.1.1]: https://github.com/Automattic/jetpack-backup/compare/v3.1.0...v3.1.1 [3.1.0]: https://github.com/Automattic/jetpack-backup/compare/v3.0.0...v3.1.0 [3.0.0]: https://github.com/Automattic/jetpack-backup/compare/v2.0.5...v3.0.0 [2.0.5]: https://github.com/Automattic/jetpack-backup/compare/v2.0.4...v2.0.5 diff --git a/jetpack_vendor/automattic/jetpack-backup/package.json b/jetpack_vendor/automattic/jetpack-backup/package.json index 56c1140367..2ccef097dd 100644 --- a/jetpack_vendor/automattic/jetpack-backup/package.json +++ b/jetpack_vendor/automattic/jetpack-backup/package.json @@ -29,8 +29,8 @@ "@automattic/format-currency": "1.0.1", "@automattic/jetpack-analytics": "^0.1.29", "@automattic/jetpack-api": "^0.16.8", - "@automattic/jetpack-components": "^0.48.0-alpha", - "@automattic/jetpack-connection": "^0.31.1", + "@automattic/jetpack-components": "^0.48.0", + "@automattic/jetpack-connection": "^0.31.2", "@wordpress/api-fetch": "6.45.0", "@wordpress/data": "9.18.0", "@wordpress/date": "4.48.0", diff --git a/jetpack_vendor/automattic/jetpack-backup/src/class-package-version.php b/jetpack_vendor/automattic/jetpack-backup/src/class-package-version.php index e0d7651ae5..69d945a5df 100644 --- a/jetpack_vendor/automattic/jetpack-backup/src/class-package-version.php +++ b/jetpack_vendor/automattic/jetpack-backup/src/class-package-version.php @@ -16,7 +16,7 @@ */ class Package_Version { - const PACKAGE_VERSION = '3.1.0'; + const PACKAGE_VERSION = '3.1.1'; const PACKAGE_SLUG = 'backup'; diff --git a/jetpack_vendor/automattic/jetpack-blaze/CHANGELOG.md b/jetpack_vendor/automattic/jetpack-blaze/CHANGELOG.md index 626fb1225a..03413099db 100644 --- a/jetpack_vendor/automattic/jetpack-blaze/CHANGELOG.md +++ b/jetpack_vendor/automattic/jetpack-blaze/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.15.2] - 2024-01-29 +### Changed +- Update dependencies. [#35170] + ## [0.15.1] - 2024-01-22 ### Changed - Update dependencies. [#35117] @@ -269,6 +273,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Updated package dependencies. [#27906] +[0.15.2]: https://github.com/automattic/jetpack-blaze/compare/v0.15.1...v0.15.2 [0.15.1]: https://github.com/automattic/jetpack-blaze/compare/v0.15.0...v0.15.1 [0.15.0]: https://github.com/automattic/jetpack-blaze/compare/v0.14.3...v0.15.0 [0.14.3]: https://github.com/automattic/jetpack-blaze/compare/v0.14.2...v0.14.3 diff --git a/jetpack_vendor/automattic/jetpack-blaze/src/class-dashboard.php b/jetpack_vendor/automattic/jetpack-blaze/src/class-dashboard.php index 53b1694e82..eb614f914c 100644 --- a/jetpack_vendor/automattic/jetpack-blaze/src/class-dashboard.php +++ b/jetpack_vendor/automattic/jetpack-blaze/src/class-dashboard.php @@ -21,7 +21,7 @@ class Dashboard { * * @var string */ - const PACKAGE_VERSION = '0.15.1'; + const PACKAGE_VERSION = '0.15.2'; /** * List of dependencies needed to render the dashboard in wp-admin. diff --git a/jetpack_vendor/automattic/jetpack-connection/CHANGELOG.md b/jetpack_vendor/automattic/jetpack-connection/CHANGELOG.md index 0b6105e7e7..c02a1aec19 100644 --- a/jetpack_vendor/automattic/jetpack-connection/CHANGELOG.md +++ b/jetpack_vendor/automattic/jetpack-connection/CHANGELOG.md @@ -5,13 +5,6 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [2.3.0-alpha] - unreleased - -This is an alpha version! The changes listed here are not final. - -### Changed -- Adjust 'get_site_id()' method to return null if there's no blog ID. - ## [2.2.0] - 2024-01-18 ### Added - Adding support for IDC when site URL is an IP address. [#34753] @@ -957,7 +950,6 @@ This is an alpha version! The changes listed here are not final. - Separate the connection library into its own package. -[2.3.0-alpha]: https://github.com/Automattic/jetpack-connection/compare/v2.2.0...v2.3.0-alpha [2.2.0]: https://github.com/Automattic/jetpack-connection/compare/v2.1.1...v2.2.0 [2.1.1]: https://github.com/Automattic/jetpack-connection/compare/v2.1.0...v2.1.1 [2.1.0]: https://github.com/Automattic/jetpack-connection/compare/v2.0.3...v2.1.0 diff --git a/jetpack_vendor/automattic/jetpack-connection/src/class-package-version.php b/jetpack_vendor/automattic/jetpack-connection/src/class-package-version.php index 0e7e3258f8..5096478138 100644 --- a/jetpack_vendor/automattic/jetpack-connection/src/class-package-version.php +++ b/jetpack_vendor/automattic/jetpack-connection/src/class-package-version.php @@ -12,7 +12,7 @@ */ class Package_Version { - const PACKAGE_VERSION = '2.3.0-alpha'; + const PACKAGE_VERSION = '2.2.0'; const PACKAGE_SLUG = 'connection'; diff --git a/jetpack_vendor/automattic/jetpack-forms/CHANGELOG.md b/jetpack_vendor/automattic/jetpack-forms/CHANGELOG.md index f1bfa40d6a..8fb0603230 100644 --- a/jetpack_vendor/automattic/jetpack-forms/CHANGELOG.md +++ b/jetpack_vendor/automattic/jetpack-forms/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.30.2] - 2024-01-29 +### Changed +- Update dependencies. + ## [0.30.1] - 2024-01-22 ### Added - Contact Form: test setup for front end script [#35074] @@ -469,6 +473,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added a new jetpack/forms package [#28409] - Added a public load_contact_form method for initializing the contact form module. [#28416] +[0.30.2]: https://github.com/automattic/jetpack-forms/compare/v0.30.1...v0.30.2 [0.30.1]: https://github.com/automattic/jetpack-forms/compare/v0.30.0...v0.30.1 [0.30.0]: https://github.com/automattic/jetpack-forms/compare/v0.29.2...v0.30.0 [0.29.2]: https://github.com/automattic/jetpack-forms/compare/v0.29.1...v0.29.2 diff --git a/jetpack_vendor/automattic/jetpack-forms/src/class-jetpack-forms.php b/jetpack_vendor/automattic/jetpack-forms/src/class-jetpack-forms.php index f34492043d..a395844af5 100644 --- a/jetpack_vendor/automattic/jetpack-forms/src/class-jetpack-forms.php +++ b/jetpack_vendor/automattic/jetpack-forms/src/class-jetpack-forms.php @@ -15,7 +15,7 @@ */ class Jetpack_Forms { - const PACKAGE_VERSION = '0.30.1'; + const PACKAGE_VERSION = '0.30.2'; /** * Load the contact form module. diff --git a/jetpack_vendor/automattic/jetpack-jitm/build/index.asset.php b/jetpack_vendor/automattic/jetpack-jitm/build/index.asset.php index 83d6304e14..fdef971c24 100644 --- a/jetpack_vendor/automattic/jetpack-jitm/build/index.asset.php +++ b/jetpack_vendor/automattic/jetpack-jitm/build/index.asset.php @@ -1 +1 @@ - array('jquery', 'wp-polyfill'), 'version' => '4e1caca8feef909f1031'); + array('jquery', 'wp-polyfill'), 'version' => 'be1957276194cda30e35'); diff --git a/jetpack_vendor/automattic/jetpack-jitm/build/index.css b/jetpack_vendor/automattic/jetpack-jitm/build/index.css index 107f3d4c37..b51e593c5b 100644 --- a/jetpack_vendor/automattic/jetpack-jitm/build/index.css +++ b/jetpack_vendor/automattic/jetpack-jitm/build/index.css @@ -1 +1 @@ -.jitm-button{-webkit-appearance:none;appearance:none;background:#fff;border:1px solid #000;border-radius:4px;box-sizing:border-box;color:#000;cursor:pointer;display:inline-block;font-size:14px;font-weight:600;margin:0;min-width:90px;outline:0;overflow:hidden;padding:7px 14px 9px;text-align:center;text-decoration:none;text-overflow:ellipsis;vertical-align:top;width:100%}.jitm-button.is-primary{background:#000;color:#fff}.jitm-button.is-primary .gridicons-external-link{fill:#fff}.jitm-button.is-secondary .gridicons-external-link{fill:#000}.jitm-button.is-secondary:hover{background:#f6f7f7;color:#000}.jitm-button.is-secondary:hover .gridicons-external-link{fill:#000}.jitm-button:focus,.jitm-button:hover{background:#414141;border-color:#414141;color:#fff}.jitm-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #2271b1}.jitm-button:disabled,.jitm-button[disabled]{background:#dcdcde;border-color:#dcdcde;color:#a7aaad;cursor:default}.jitm-button.is-compact{font-size:14px;height:32px;line-height:1;white-space:nowrap}.jitm-button.is-compact .gridicon{margin-top:-8px;top:4px}.jitm-button.is-compact .gridicons-plus-small{margin-left:-4px}.jitm-button.is-compact .gridicons-plus-small:last-of-type{margin-left:0}.jitm-button.is-compact .gridicons-plus-small+.gridicon{margin-left:-4px}.jitm-button.is-compact .gridicons-external-link{margin:-3px 0 -3px 2px}.jitm-button.hidden{display:none}.jitm-card{background-color:#fff;background-image:url(images/background-165b2f00927a762c8cf4.png);background-position:100%;background-repeat:no-repeat;border:1px solid #fff;border-radius:2px;box-shadow:0 1px 4px rgba(0,0,0,.16);box-sizing:border-box;clear:both;display:block;margin:3rem 1.25rem 0 auto;padding:1rem 1rem 1rem 1.25rem;position:relative}.jitm-card:after{clear:both;content:".";display:block;height:0;visibility:hidden}.jitm-card.is-compact{margin-bottom:.0625rem}@media(min-width:481px){.jitm-card.is-compact{margin-bottom:1px;padding:1rem 1.5rem}}.jitm-card.is-card-link{padding-right:3rem}.my-jetpack-jitm-card .jitm-card{margin-bottom:0;margin-right:0}#screen-meta-links+.jitm-card{margin:2.5rem 1.5385em 0 auto}.post-php .jitm-card{margin-right:0}.jp-lower .jitm-card{margin:0 0 1.5rem}.jitm-banner.jitm-card{display:flex;position:relative;z-index:2}.jitm-banner.jitm-card:before{border-bottom-left-radius:1px;border-top-left-radius:1px;content:"";height:100%;left:0;position:absolute;top:0;width:4px}@media(max-width:480px){.jitm-banner.jitm-card{display:flex;flex-direction:column}}.jitm-banner.jitm-card.is-card-link{padding:.75rem 3rem .75rem 1rem}.jitm-banner.jitm-card.is-dismissible{padding-right:3rem}.jitm-banner.jitm-card:before{background-color:#4ab866}.jitm-banner.jitm-card .jitm-banner__icon{color:#4ab866}.jitm-banner.jitm-card .jitm-banner__icon-circle{background-color:#4ab866}.jitm-banner.jitm-card.is-upgrade-personal:before{background-color:#f0b849}.jitm-banner.jitm-card.is-upgrade-personal .jitm-banner__icon{color:#f0b849}.jitm-banner.jitm-card.is-upgrade-personal .jitm-banner__icon-circle{background-color:#f0b849}.jitm-banner.jitm-card.is-upgrade-premium:before{background-color:#069e08}.jitm-banner.jitm-card.is-upgrade-premium .jitm-banner__icon{color:#069e08}.jitm-banner.jitm-card.is-upgrade-premium .jitm-banner__icon-circle{background-color:#069e08}.jitm-banner.jitm-card.is-upgrade-business:before,.jitm-banner.jitm-card.woo-jitm:before{background-color:#855da6}.jitm-banner.jitm-card.is-upgrade-business .jitm-banner__icon,.jitm-banner.jitm-card.woo-jitm .jitm-banner__icon{color:#855da6}.jitm-banner.jitm-card.is-upgrade-business .jitm-banner__icon-circle,.jitm-banner.jitm-card.woo-jitm .jitm-banner__icon-circle{background-color:#855da6}.jitm-banner.jitm-card .jitm-card__link-indicator{align-items:center;color:#0087be;display:flex}.jitm-banner.jitm-card:hover{transition:all .1s ease-in-out}.jitm-banner.jitm-card:hover.is-card-link{box-shadow:0 0 0 1px #a2a2a2,0 2px 4px #d5d5d5}.jitm-banner.jitm-card:hover .jitm-card__link-indicator{color:#005082}@media(min-width:481px){.jitm-banner.jitm-card{padding:1rem 1rem 1rem 1.25rem}.jitm-banner.jitm-card.is-dismissible{padding-right:1rem}}.jitm-banner__buttons_container{display:flex;gap:1rem;height:50%;margin:auto 1rem auto 0;overflow:hidden}@media(min-width:481px){.jitm-banner__buttons_container{margin-left:1rem}}.jitm-banner__icons{display:flex}.jitm-banner__icons .jitm-banner__icon,.jitm-banner__icons .jitm-banner__icon-circle{border-radius:50%;flex-shrink:0;height:1.5rem;margin-right:1rem;margin-top:-.125rem;text-align:center;top:.25rem;width:1.5rem}.jitm-banner__icons .jitm-banner__icon{align-self:center;color:#fff;display:block}.jitm-banner__icons .jitm-banner__icon-circle{color:#fff;display:none;padding:.1875rem .25rem .25rem .1875rem}@media(min-width:481px){.jitm-banner__icons{align-items:center}.jitm-banner__icons .jitm-banner__icon{display:none}.jitm-banner__icons .jitm-banner__icon-circle{display:block}}.jitm-banner__icon-plan{display:flex;margin-right:1rem}.jitm-banner__icon-plan .dops-plan-icon{height:2rem;width:2rem}.jitm-banner__icon-plan .jp-emblem{position:relative;top:.125rem}@media(max-width:480px){.jitm-banner__icon-plan .jp-emblem{margin-bottom:1rem}}.jitm-banner__icon-plan .jp-emblem svg{height:2rem;width:2rem;fill:#069e08}.jitm-banner__icon-plan .jp-emblem .jitm-jp-logo{height:inherit;width:2.5rem;fill:inherit}@media(min-width:481px){.jitm-banner__icon-plan{align-items:center}}.jitm-banner__content{align-items:center;display:flex;flex-grow:1;flex-shrink:100000;flex-wrap:wrap}@media(max-width:480px){.jitm-banner__content{margin-right:0}}@media(min-width:481px){.jitm-banner__content{flex-wrap:nowrap}}@media(max-width:960px){.jitm-banner__content{margin-right:5px}}.jitm-banner__info{flex-grow:1;line-height:1.4}@media(min-width:481px){.jitm-banner__info{flex-basis:50%}}@media(min-width:961px){.jitm-banner__info{flex-basis:70%}}.jitm-banner__info .jitm-banner__description,.jitm-banner__info .jitm-banner__description a,.jitm-banner__info .jitm-banner__title{color:#000}.jitm-banner__info .jitm-banner__title{font-size:.9375rem;font-weight:700;line-height:136%}.jitm-banner__info .jitm-banner__description{font-size:.8125rem;line-height:150%;margin-top:.125rem}.jitm-banner__info .banner__list{font-size:12px;list-style:none;margin:10px 0}.jitm-banner__info .banner__list li{margin:6px 0}.jitm-banner__info .banner__list li .gridicon{fill:#a2a2a2;display:inline;margin-right:12px;vertical-align:bottom}.jitm-banner__action{align-self:center;font-size:.75rem;overflow:hidden;text-align:left}.jitm-banner__action .jitm-banner__prices{display:flex;justify-content:flex-start}.jitm-banner__action .jitm-banner__prices .dops-plan-price{margin-bottom:0}.jitm-banner__action .jitm-banner__prices .dops-plan-price.is-discounted,.jitm-banner__action .jitm-banner__prices .dops-plan-price.is-discounted .dops-plan-price__currency-symbol{color:#414141}.has-call-to-action .jitm-banner__action .jitm-banner__prices .dops-plan-price{margin-bottom:.5rem}@media(max-width:480px){.jitm-banner__action{margin-top:1rem}}@media(min-width:481px){.jitm-banner__action{text-align:center;width:auto}.jitm-banner__action .is-dismissible{margin-top:2.5rem}.jitm-banner__action .jitm-banner__prices{justify-content:flex-end;text-align:right}}.jitm-banner__dismiss{display:block;line-height:.5;margin-bottom:auto;margin-top:auto;text-decoration:none}.jitm-banner__dismiss:before{color:#6f6f6f;content:"";font:400 20px/1 dashicons}@media(min-width:661px){.jitm-banner__dismiss{margin-right:-.5rem}}@media(max-width:480px){.jitm-banner__dismiss{align-items:center;display:flex;height:48px;justify-content:center;margin:0;position:absolute;right:0;top:0;width:48px}}.jitm-banner__action+.jitm-banner__dismiss{margin-left:.625rem}#dolly+.jitm-card{margin:3rem 1rem 0 auto} \ No newline at end of file +.jitm-button{-webkit-appearance:none;appearance:none;background:#fff;border:1px solid #000;border-radius:4px;box-sizing:border-box;color:#000;cursor:pointer;display:inline-block;font-size:14px;font-weight:600;margin:0;min-width:90px;outline:0;overflow:hidden;padding:7px 14px 9px;text-align:center;text-decoration:none;text-overflow:ellipsis;vertical-align:top;width:100%}.jitm-button.is-primary{background:#000;color:#fff}.jitm-button.is-primary .gridicons-external-link{fill:#fff}.jitm-button.is-secondary .gridicons-external-link{fill:#000}.jitm-button.is-secondary:hover{background:#f6f7f7;color:#000}.jitm-button.is-secondary:hover .gridicons-external-link{fill:#000}.jitm-button:focus,.jitm-button:hover{background:#414141;border-color:#414141;color:#fff}.jitm-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #2271b1}.jitm-button:disabled,.jitm-button[disabled]{background:#dcdcde;border-color:#dcdcde;color:#a7aaad;cursor:default}.jitm-button.is-compact{font-size:14px;height:32px;line-height:1;white-space:nowrap}.jitm-button.is-compact .gridicon{margin-top:-8px;top:4px}.jitm-button.is-compact .gridicons-plus-small{margin-left:-4px}.jitm-button.is-compact .gridicons-plus-small:last-of-type{margin-left:0}.jitm-button.is-compact .gridicons-plus-small+.gridicon{margin-left:-4px}.jitm-button.is-compact .gridicons-external-link{margin:-3px 0 -3px 2px}.jitm-button.hidden{display:none}.jitm-card{background-color:#fff;background-image:url(images/background-165b2f00927a762c8cf4.png);background-position:100%;background-repeat:no-repeat;border:1px solid #fff;border-radius:2px;box-shadow:0 1px 4px rgba(0,0,0,.16);box-sizing:border-box;clear:both;display:block;margin:3rem 1.25rem 0 auto;padding:1rem 1rem 1rem 1.25rem;position:relative}.jitm-card:after{clear:both;content:".";display:block;height:0;visibility:hidden}.jitm-card.is-compact{margin-bottom:.0625rem}@media(min-width:481px){.jitm-card.is-compact{margin-bottom:1px;padding:1rem 1.5rem}}.jitm-card.is-card-link{padding-right:3rem}.my-jetpack-jitm-card .jitm-card{margin-bottom:0;margin-right:0}#screen-meta-links+.jitm-card{margin:2.5rem 1.5385em 0 auto}.post-php .jitm-card{margin-right:0}.jp-lower .jitm-card{margin:0 0 1.5rem}.jitm-banner.jitm-card{display:flex;position:relative;z-index:2}.jitm-banner.jitm-card:before{border-bottom-left-radius:1px;border-top-left-radius:1px;content:"";height:100%;left:0;position:absolute;top:0;width:4px}@media(max-width:480px){.jitm-banner.jitm-card{display:flex;flex-direction:column}}.jitm-banner.jitm-card.is-card-link{padding:.75rem 3rem .75rem 1rem}.jitm-banner.jitm-card.is-dismissible{padding-right:3rem}.jitm-banner.jitm-card:before{background-color:#4ab866}.jitm-banner.jitm-card .jitm-banner__icon{color:#4ab866}.jitm-banner.jitm-card .jitm-banner__icon-circle{background-color:#4ab866}.jitm-banner.jitm-card.is-upgrade-personal:before{background-color:#f0b849}.jitm-banner.jitm-card.is-upgrade-personal .jitm-banner__icon{color:#f0b849}.jitm-banner.jitm-card.is-upgrade-personal .jitm-banner__icon-circle{background-color:#f0b849}.jitm-banner.jitm-card.is-upgrade-premium:before{background-color:#069e08}.jitm-banner.jitm-card.is-upgrade-premium .jitm-banner__icon{color:#069e08}.jitm-banner.jitm-card.is-upgrade-premium .jitm-banner__icon-circle{background-color:#069e08}.jitm-banner.jitm-card.is-upgrade-business:before,.jitm-banner.jitm-card.woo-jitm:before{background-color:#855da6}.jitm-banner.jitm-card.is-upgrade-business .jitm-banner__icon,.jitm-banner.jitm-card.woo-jitm .jitm-banner__icon{color:#855da6}.jitm-banner.jitm-card.is-upgrade-business .jitm-banner__icon-circle,.jitm-banner.jitm-card.woo-jitm .jitm-banner__icon-circle{background-color:#855da6}.jitm-banner.jitm-card .jitm-card__link-indicator{align-items:center;color:#0087be;display:flex}.jitm-banner.jitm-card:hover{transition:all .1s ease-in-out}.jitm-banner.jitm-card:hover.is-card-link{box-shadow:0 0 0 1px #a2a2a2,0 2px 4px #d5d5d5}.jitm-banner.jitm-card:hover .jitm-card__link-indicator{color:#005082}@media(min-width:481px){.jitm-banner.jitm-card{padding:1rem 1rem 1rem 1.25rem}.jitm-banner.jitm-card.is-dismissible{padding-right:1rem}}.jitm-banner__buttons_container{display:flex;gap:1rem;height:50%;margin:auto 1rem auto 0;overflow:hidden}@media(min-width:481px){.jitm-banner__buttons_container{margin-left:1rem}}.jitm-banner__icons{display:flex}.jitm-banner__icons .jitm-banner__icon,.jitm-banner__icons .jitm-banner__icon-circle{border-radius:50%;flex-shrink:0;height:1.5rem;margin-right:1rem;margin-top:-.125rem;text-align:center;top:.25rem;width:1.5rem}.jitm-banner__icons .jitm-banner__icon{align-self:center;color:#fff;display:block}.jitm-banner__icons .jitm-banner__icon-circle{color:#fff;display:none;padding:.1875rem .25rem .25rem .1875rem}@media(min-width:481px){.jitm-banner__icons{align-items:center}.jitm-banner__icons .jitm-banner__icon{display:none}.jitm-banner__icons .jitm-banner__icon-circle{display:block}}.jitm-banner__icon-plan{display:flex;margin-right:1rem}.jitm-banner__icon-plan .dops-plan-icon{height:2rem;width:2rem}.jitm-banner__icon-plan .jp-emblem{position:relative;top:.125rem}@media(max-width:480px){.jitm-banner__icon-plan .jp-emblem{margin-bottom:1rem}}.jitm-banner__icon-plan .jp-emblem svg{fill:#069e08;height:2rem;width:2rem}.jitm-banner__icon-plan .jp-emblem .jitm-jp-logo{fill:inherit;height:inherit;width:2.5rem}@media(min-width:481px){.jitm-banner__icon-plan{align-items:center}}.jitm-banner__content{align-items:center;display:flex;flex-grow:1;flex-shrink:100000;flex-wrap:wrap}@media(max-width:480px){.jitm-banner__content{margin-right:0}}@media(min-width:481px){.jitm-banner__content{flex-wrap:nowrap}}@media(max-width:960px){.jitm-banner__content{margin-right:5px}}.jitm-banner__info{flex-grow:1;line-height:1.4}@media(min-width:481px){.jitm-banner__info{flex-basis:50%}}@media(min-width:961px){.jitm-banner__info{flex-basis:70%}}.jitm-banner__info .jitm-banner__description,.jitm-banner__info .jitm-banner__description a,.jitm-banner__info .jitm-banner__title{color:#000}.jitm-banner__info .jitm-banner__title{font-size:.9375rem;font-weight:700;line-height:136%}.jitm-banner__info .jitm-banner__description{font-size:.8125rem;line-height:150%;margin-top:.125rem}.jitm-banner__info .banner__list{font-size:12px;list-style:none;margin:10px 0}.jitm-banner__info .banner__list li{margin:6px 0}.jitm-banner__info .banner__list li .gridicon{fill:#a2a2a2;display:inline;margin-right:12px;vertical-align:bottom}.jitm-banner__action{align-self:center;font-size:.75rem;overflow:hidden;text-align:left}.jitm-banner__action .jitm-banner__prices{display:flex;justify-content:flex-start}.jitm-banner__action .jitm-banner__prices .dops-plan-price{margin-bottom:0}.jitm-banner__action .jitm-banner__prices .dops-plan-price.is-discounted,.jitm-banner__action .jitm-banner__prices .dops-plan-price.is-discounted .dops-plan-price__currency-symbol{color:#414141}.has-call-to-action .jitm-banner__action .jitm-banner__prices .dops-plan-price{margin-bottom:.5rem}@media(max-width:480px){.jitm-banner__action{margin-top:1rem}}@media(min-width:481px){.jitm-banner__action{text-align:center;width:auto}.jitm-banner__action .is-dismissible{margin-top:2.5rem}.jitm-banner__action .jitm-banner__prices{justify-content:flex-end;text-align:right}}.jitm-banner__dismiss{display:block;line-height:.5;margin-bottom:auto;margin-top:auto;text-decoration:none}.jitm-banner__dismiss:before{color:#6f6f6f;content:"";font:400 20px/1 dashicons}@media(min-width:661px){.jitm-banner__dismiss{margin-right:-.5rem}}@media(max-width:480px){.jitm-banner__dismiss{align-items:center;display:flex;height:48px;justify-content:center;margin:0;position:absolute;right:0;top:0;width:48px}}.jitm-banner__action+.jitm-banner__dismiss{margin-left:.625rem}#dolly+.jitm-card{margin:3rem 1rem 0 auto} \ No newline at end of file diff --git a/jetpack_vendor/automattic/jetpack-jitm/build/index.rtl.css b/jetpack_vendor/automattic/jetpack-jitm/build/index.rtl.css index c2b2255216..1cde88b878 100644 --- a/jetpack_vendor/automattic/jetpack-jitm/build/index.rtl.css +++ b/jetpack_vendor/automattic/jetpack-jitm/build/index.rtl.css @@ -1 +1 @@ -.jitm-button{-webkit-appearance:none;appearance:none;background:#fff;border:1px solid #000;border-radius:4px;box-sizing:border-box;color:#000;cursor:pointer;display:inline-block;font-size:14px;font-weight:600;margin:0;min-width:90px;outline:0;overflow:hidden;padding:7px 14px 9px;text-align:center;text-decoration:none;text-overflow:ellipsis;vertical-align:top;width:100%}.jitm-button.is-primary{background:#000;color:#fff}.jitm-button.is-primary .gridicons-external-link{fill:#fff}.jitm-button.is-secondary .gridicons-external-link{fill:#000}.jitm-button.is-secondary:hover{background:#f6f7f7;color:#000}.jitm-button.is-secondary:hover .gridicons-external-link{fill:#000}.jitm-button:focus,.jitm-button:hover{background:#414141;border-color:#414141;color:#fff}.jitm-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #2271b1}.jitm-button:disabled,.jitm-button[disabled]{background:#dcdcde;border-color:#dcdcde;color:#a7aaad;cursor:default}.jitm-button.is-compact{font-size:14px;height:32px;line-height:1;white-space:nowrap}.jitm-button.is-compact .gridicon{margin-top:-8px;top:4px}.jitm-button.is-compact .gridicons-plus-small{margin-right:-4px}.jitm-button.is-compact .gridicons-plus-small:last-of-type{margin-right:0}.jitm-button.is-compact .gridicons-plus-small+.gridicon{margin-right:-4px}.jitm-button.is-compact .gridicons-external-link{margin:-3px 2px -3px 0}.jitm-button.hidden{display:none}.jitm-card{background-color:#fff;background-image:url(images/background-165b2f00927a762c8cf4.png);background-position:0;background-repeat:no-repeat;border:1px solid #fff;border-radius:2px;box-shadow:0 1px 4px rgba(0,0,0,.16);box-sizing:border-box;clear:both;display:block;margin:3rem auto 0 1.25rem;padding:1rem 1.25rem 1rem 1rem;position:relative}.jitm-card:after{clear:both;content:".";display:block;height:0;visibility:hidden}.jitm-card.is-compact{margin-bottom:.0625rem}@media(min-width:481px){.jitm-card.is-compact{margin-bottom:1px;padding:1rem 1.5rem}}.jitm-card.is-card-link{padding-left:3rem}.my-jetpack-jitm-card .jitm-card{margin-bottom:0;margin-left:0}#screen-meta-links+.jitm-card{margin:2.5rem auto 0 1.5385em}.post-php .jitm-card{margin-left:0}.jp-lower .jitm-card{margin:0 0 1.5rem}.jitm-banner.jitm-card{display:flex;position:relative;z-index:2}.jitm-banner.jitm-card:before{border-bottom-right-radius:1px;border-top-right-radius:1px;content:"";height:100%;position:absolute;right:0;top:0;width:4px}@media(max-width:480px){.jitm-banner.jitm-card{display:flex;flex-direction:column}}.jitm-banner.jitm-card.is-card-link{padding:.75rem 1rem .75rem 3rem}.jitm-banner.jitm-card.is-dismissible{padding-left:3rem}.jitm-banner.jitm-card:before{background-color:#4ab866}.jitm-banner.jitm-card .jitm-banner__icon{color:#4ab866}.jitm-banner.jitm-card .jitm-banner__icon-circle{background-color:#4ab866}.jitm-banner.jitm-card.is-upgrade-personal:before{background-color:#f0b849}.jitm-banner.jitm-card.is-upgrade-personal .jitm-banner__icon{color:#f0b849}.jitm-banner.jitm-card.is-upgrade-personal .jitm-banner__icon-circle{background-color:#f0b849}.jitm-banner.jitm-card.is-upgrade-premium:before{background-color:#069e08}.jitm-banner.jitm-card.is-upgrade-premium .jitm-banner__icon{color:#069e08}.jitm-banner.jitm-card.is-upgrade-premium .jitm-banner__icon-circle{background-color:#069e08}.jitm-banner.jitm-card.is-upgrade-business:before,.jitm-banner.jitm-card.woo-jitm:before{background-color:#855da6}.jitm-banner.jitm-card.is-upgrade-business .jitm-banner__icon,.jitm-banner.jitm-card.woo-jitm .jitm-banner__icon{color:#855da6}.jitm-banner.jitm-card.is-upgrade-business .jitm-banner__icon-circle,.jitm-banner.jitm-card.woo-jitm .jitm-banner__icon-circle{background-color:#855da6}.jitm-banner.jitm-card .jitm-card__link-indicator{align-items:center;color:#0087be;display:flex}.jitm-banner.jitm-card:hover{transition:all .1s ease-in-out}.jitm-banner.jitm-card:hover.is-card-link{box-shadow:0 0 0 1px #a2a2a2,0 2px 4px #d5d5d5}.jitm-banner.jitm-card:hover .jitm-card__link-indicator{color:#005082}@media(min-width:481px){.jitm-banner.jitm-card{padding:1rem 1.25rem 1rem 1rem}.jitm-banner.jitm-card.is-dismissible{padding-left:1rem}}.jitm-banner__buttons_container{display:flex;gap:1rem;height:50%;margin:auto 0 auto 1rem;overflow:hidden}@media(min-width:481px){.jitm-banner__buttons_container{margin-right:1rem}}.jitm-banner__icons{display:flex}.jitm-banner__icons .jitm-banner__icon,.jitm-banner__icons .jitm-banner__icon-circle{border-radius:50%;flex-shrink:0;height:1.5rem;margin-left:1rem;margin-top:-.125rem;text-align:center;top:.25rem;width:1.5rem}.jitm-banner__icons .jitm-banner__icon{align-self:center;color:#fff;display:block}.jitm-banner__icons .jitm-banner__icon-circle{color:#fff;display:none;padding:.1875rem .1875rem .25rem .25rem}@media(min-width:481px){.jitm-banner__icons{align-items:center}.jitm-banner__icons .jitm-banner__icon{display:none}.jitm-banner__icons .jitm-banner__icon-circle{display:block}}.jitm-banner__icon-plan{display:flex;margin-left:1rem}.jitm-banner__icon-plan .dops-plan-icon{height:2rem;width:2rem}.jitm-banner__icon-plan .jp-emblem{position:relative;top:.125rem}@media(max-width:480px){.jitm-banner__icon-plan .jp-emblem{margin-bottom:1rem}}.jitm-banner__icon-plan .jp-emblem svg{height:2rem;width:2rem;fill:#069e08}.jitm-banner__icon-plan .jp-emblem .jitm-jp-logo{height:inherit;width:2.5rem;fill:inherit}@media(min-width:481px){.jitm-banner__icon-plan{align-items:center}}.jitm-banner__content{align-items:center;display:flex;flex-grow:1;flex-shrink:100000;flex-wrap:wrap}@media(max-width:480px){.jitm-banner__content{margin-left:0}}@media(min-width:481px){.jitm-banner__content{flex-wrap:nowrap}}@media(max-width:960px){.jitm-banner__content{margin-left:5px}}.jitm-banner__info{flex-grow:1;line-height:1.4}@media(min-width:481px){.jitm-banner__info{flex-basis:50%}}@media(min-width:961px){.jitm-banner__info{flex-basis:70%}}.jitm-banner__info .jitm-banner__description,.jitm-banner__info .jitm-banner__description a,.jitm-banner__info .jitm-banner__title{color:#000}.jitm-banner__info .jitm-banner__title{font-size:.9375rem;font-weight:700;line-height:136%}.jitm-banner__info .jitm-banner__description{font-size:.8125rem;line-height:150%;margin-top:.125rem}.jitm-banner__info .banner__list{font-size:12px;list-style:none;margin:10px 0}.jitm-banner__info .banner__list li{margin:6px 0}.jitm-banner__info .banner__list li .gridicon{fill:#a2a2a2;display:inline;margin-left:12px;vertical-align:bottom}.jitm-banner__action{align-self:center;font-size:.75rem;overflow:hidden;text-align:right}.jitm-banner__action .jitm-banner__prices{display:flex;justify-content:flex-start}.jitm-banner__action .jitm-banner__prices .dops-plan-price{margin-bottom:0}.jitm-banner__action .jitm-banner__prices .dops-plan-price.is-discounted,.jitm-banner__action .jitm-banner__prices .dops-plan-price.is-discounted .dops-plan-price__currency-symbol{color:#414141}.has-call-to-action .jitm-banner__action .jitm-banner__prices .dops-plan-price{margin-bottom:.5rem}@media(max-width:480px){.jitm-banner__action{margin-top:1rem}}@media(min-width:481px){.jitm-banner__action{text-align:center;width:auto}.jitm-banner__action .is-dismissible{margin-top:2.5rem}.jitm-banner__action .jitm-banner__prices{justify-content:flex-end;text-align:left}}.jitm-banner__dismiss{display:block;line-height:.5;margin-bottom:auto;margin-top:auto;text-decoration:none}.jitm-banner__dismiss:before{color:#6f6f6f;content:"";font:400 20px/1 dashicons}@media(min-width:661px){.jitm-banner__dismiss{margin-left:-.5rem}}@media(max-width:480px){.jitm-banner__dismiss{align-items:center;display:flex;height:48px;justify-content:center;left:0;margin:0;position:absolute;top:0;width:48px}}.jitm-banner__action+.jitm-banner__dismiss{margin-right:.625rem}#dolly+.jitm-card{margin:3rem auto 0 1rem} \ No newline at end of file +.jitm-button{-webkit-appearance:none;appearance:none;background:#fff;border:1px solid #000;border-radius:4px;box-sizing:border-box;color:#000;cursor:pointer;display:inline-block;font-size:14px;font-weight:600;margin:0;min-width:90px;outline:0;overflow:hidden;padding:7px 14px 9px;text-align:center;text-decoration:none;text-overflow:ellipsis;vertical-align:top;width:100%}.jitm-button.is-primary{background:#000;color:#fff}.jitm-button.is-primary .gridicons-external-link{fill:#fff}.jitm-button.is-secondary .gridicons-external-link{fill:#000}.jitm-button.is-secondary:hover{background:#f6f7f7;color:#000}.jitm-button.is-secondary:hover .gridicons-external-link{fill:#000}.jitm-button:focus,.jitm-button:hover{background:#414141;border-color:#414141;color:#fff}.jitm-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #2271b1}.jitm-button:disabled,.jitm-button[disabled]{background:#dcdcde;border-color:#dcdcde;color:#a7aaad;cursor:default}.jitm-button.is-compact{font-size:14px;height:32px;line-height:1;white-space:nowrap}.jitm-button.is-compact .gridicon{margin-top:-8px;top:4px}.jitm-button.is-compact .gridicons-plus-small{margin-right:-4px}.jitm-button.is-compact .gridicons-plus-small:last-of-type{margin-right:0}.jitm-button.is-compact .gridicons-plus-small+.gridicon{margin-right:-4px}.jitm-button.is-compact .gridicons-external-link{margin:-3px 2px -3px 0}.jitm-button.hidden{display:none}.jitm-card{background-color:#fff;background-image:url(images/background-165b2f00927a762c8cf4.png);background-position:0;background-repeat:no-repeat;border:1px solid #fff;border-radius:2px;box-shadow:0 1px 4px rgba(0,0,0,.16);box-sizing:border-box;clear:both;display:block;margin:3rem auto 0 1.25rem;padding:1rem 1.25rem 1rem 1rem;position:relative}.jitm-card:after{clear:both;content:".";display:block;height:0;visibility:hidden}.jitm-card.is-compact{margin-bottom:.0625rem}@media(min-width:481px){.jitm-card.is-compact{margin-bottom:1px;padding:1rem 1.5rem}}.jitm-card.is-card-link{padding-left:3rem}.my-jetpack-jitm-card .jitm-card{margin-bottom:0;margin-left:0}#screen-meta-links+.jitm-card{margin:2.5rem auto 0 1.5385em}.post-php .jitm-card{margin-left:0}.jp-lower .jitm-card{margin:0 0 1.5rem}.jitm-banner.jitm-card{display:flex;position:relative;z-index:2}.jitm-banner.jitm-card:before{border-bottom-right-radius:1px;border-top-right-radius:1px;content:"";height:100%;position:absolute;right:0;top:0;width:4px}@media(max-width:480px){.jitm-banner.jitm-card{display:flex;flex-direction:column}}.jitm-banner.jitm-card.is-card-link{padding:.75rem 1rem .75rem 3rem}.jitm-banner.jitm-card.is-dismissible{padding-left:3rem}.jitm-banner.jitm-card:before{background-color:#4ab866}.jitm-banner.jitm-card .jitm-banner__icon{color:#4ab866}.jitm-banner.jitm-card .jitm-banner__icon-circle{background-color:#4ab866}.jitm-banner.jitm-card.is-upgrade-personal:before{background-color:#f0b849}.jitm-banner.jitm-card.is-upgrade-personal .jitm-banner__icon{color:#f0b849}.jitm-banner.jitm-card.is-upgrade-personal .jitm-banner__icon-circle{background-color:#f0b849}.jitm-banner.jitm-card.is-upgrade-premium:before{background-color:#069e08}.jitm-banner.jitm-card.is-upgrade-premium .jitm-banner__icon{color:#069e08}.jitm-banner.jitm-card.is-upgrade-premium .jitm-banner__icon-circle{background-color:#069e08}.jitm-banner.jitm-card.is-upgrade-business:before,.jitm-banner.jitm-card.woo-jitm:before{background-color:#855da6}.jitm-banner.jitm-card.is-upgrade-business .jitm-banner__icon,.jitm-banner.jitm-card.woo-jitm .jitm-banner__icon{color:#855da6}.jitm-banner.jitm-card.is-upgrade-business .jitm-banner__icon-circle,.jitm-banner.jitm-card.woo-jitm .jitm-banner__icon-circle{background-color:#855da6}.jitm-banner.jitm-card .jitm-card__link-indicator{align-items:center;color:#0087be;display:flex}.jitm-banner.jitm-card:hover{transition:all .1s ease-in-out}.jitm-banner.jitm-card:hover.is-card-link{box-shadow:0 0 0 1px #a2a2a2,0 2px 4px #d5d5d5}.jitm-banner.jitm-card:hover .jitm-card__link-indicator{color:#005082}@media(min-width:481px){.jitm-banner.jitm-card{padding:1rem 1.25rem 1rem 1rem}.jitm-banner.jitm-card.is-dismissible{padding-left:1rem}}.jitm-banner__buttons_container{display:flex;gap:1rem;height:50%;margin:auto 0 auto 1rem;overflow:hidden}@media(min-width:481px){.jitm-banner__buttons_container{margin-right:1rem}}.jitm-banner__icons{display:flex}.jitm-banner__icons .jitm-banner__icon,.jitm-banner__icons .jitm-banner__icon-circle{border-radius:50%;flex-shrink:0;height:1.5rem;margin-left:1rem;margin-top:-.125rem;text-align:center;top:.25rem;width:1.5rem}.jitm-banner__icons .jitm-banner__icon{align-self:center;color:#fff;display:block}.jitm-banner__icons .jitm-banner__icon-circle{color:#fff;display:none;padding:.1875rem .1875rem .25rem .25rem}@media(min-width:481px){.jitm-banner__icons{align-items:center}.jitm-banner__icons .jitm-banner__icon{display:none}.jitm-banner__icons .jitm-banner__icon-circle{display:block}}.jitm-banner__icon-plan{display:flex;margin-left:1rem}.jitm-banner__icon-plan .dops-plan-icon{height:2rem;width:2rem}.jitm-banner__icon-plan .jp-emblem{position:relative;top:.125rem}@media(max-width:480px){.jitm-banner__icon-plan .jp-emblem{margin-bottom:1rem}}.jitm-banner__icon-plan .jp-emblem svg{fill:#069e08;height:2rem;width:2rem}.jitm-banner__icon-plan .jp-emblem .jitm-jp-logo{fill:inherit;height:inherit;width:2.5rem}@media(min-width:481px){.jitm-banner__icon-plan{align-items:center}}.jitm-banner__content{align-items:center;display:flex;flex-grow:1;flex-shrink:100000;flex-wrap:wrap}@media(max-width:480px){.jitm-banner__content{margin-left:0}}@media(min-width:481px){.jitm-banner__content{flex-wrap:nowrap}}@media(max-width:960px){.jitm-banner__content{margin-left:5px}}.jitm-banner__info{flex-grow:1;line-height:1.4}@media(min-width:481px){.jitm-banner__info{flex-basis:50%}}@media(min-width:961px){.jitm-banner__info{flex-basis:70%}}.jitm-banner__info .jitm-banner__description,.jitm-banner__info .jitm-banner__description a,.jitm-banner__info .jitm-banner__title{color:#000}.jitm-banner__info .jitm-banner__title{font-size:.9375rem;font-weight:700;line-height:136%}.jitm-banner__info .jitm-banner__description{font-size:.8125rem;line-height:150%;margin-top:.125rem}.jitm-banner__info .banner__list{font-size:12px;list-style:none;margin:10px 0}.jitm-banner__info .banner__list li{margin:6px 0}.jitm-banner__info .banner__list li .gridicon{fill:#a2a2a2;display:inline;margin-left:12px;vertical-align:bottom}.jitm-banner__action{align-self:center;font-size:.75rem;overflow:hidden;text-align:right}.jitm-banner__action .jitm-banner__prices{display:flex;justify-content:flex-start}.jitm-banner__action .jitm-banner__prices .dops-plan-price{margin-bottom:0}.jitm-banner__action .jitm-banner__prices .dops-plan-price.is-discounted,.jitm-banner__action .jitm-banner__prices .dops-plan-price.is-discounted .dops-plan-price__currency-symbol{color:#414141}.has-call-to-action .jitm-banner__action .jitm-banner__prices .dops-plan-price{margin-bottom:.5rem}@media(max-width:480px){.jitm-banner__action{margin-top:1rem}}@media(min-width:481px){.jitm-banner__action{text-align:center;width:auto}.jitm-banner__action .is-dismissible{margin-top:2.5rem}.jitm-banner__action .jitm-banner__prices{justify-content:flex-end;text-align:left}}.jitm-banner__dismiss{display:block;line-height:.5;margin-bottom:auto;margin-top:auto;text-decoration:none}.jitm-banner__dismiss:before{color:#6f6f6f;content:"";font:400 20px/1 dashicons}@media(min-width:661px){.jitm-banner__dismiss{margin-left:-.5rem}}@media(max-width:480px){.jitm-banner__dismiss{align-items:center;display:flex;height:48px;justify-content:center;left:0;margin:0;position:absolute;top:0;width:48px}}.jitm-banner__action+.jitm-banner__dismiss{margin-right:.625rem}#dolly+.jitm-card{margin:3rem auto 0 1rem} \ No newline at end of file diff --git a/jetpack_vendor/automattic/jetpack-my-jetpack/CHANGELOG.md b/jetpack_vendor/automattic/jetpack-my-jetpack/CHANGELOG.md index b22f220091..f38abc343c 100644 --- a/jetpack_vendor/automattic/jetpack-my-jetpack/CHANGELOG.md +++ b/jetpack_vendor/automattic/jetpack-my-jetpack/CHANGELOG.md @@ -5,15 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [4.7.0-alpha] - unreleased - -This is an alpha version! The changes listed here are not final. - +## [4.7.0] - 2024-01-29 ### Changed -- Update the UpsellBanner to use the Card component from WP components. +- Update the UpsellBanner to use the Card component from WP components. [#35223] ### Removed -- UpsellBanner component moved to js-packages/components +- UpsellBanner component moved to js-packages/components [#35228] ## [4.6.2] - 2024-01-22 ### Added @@ -1217,7 +1214,7 @@ This is an alpha version! The changes listed here are not final. ### Added - Created package -[4.7.0-alpha]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.6.2...4.7.0-alpha +[4.7.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.6.2...4.7.0 [4.6.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.6.1...4.6.2 [4.6.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.6.0...4.6.1 [4.6.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.5.0...4.6.0 diff --git a/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php b/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php index daa0257721..6ec1bf2a4e 100644 --- a/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php +++ b/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php @@ -34,7 +34,7 @@ class Initializer { * * @var string */ - const PACKAGE_VERSION = '4.7.0-alpha'; + const PACKAGE_VERSION = '4.7.0'; /** * HTML container ID for the IDC screen on My Jetpack page. diff --git a/jetpack_vendor/automattic/jetpack-publicize/CHANGELOG.md b/jetpack_vendor/automattic/jetpack-publicize/CHANGELOG.md index 1b2b5b1eef..bf67590843 100644 --- a/jetpack_vendor/automattic/jetpack-publicize/CHANGELOG.md +++ b/jetpack_vendor/automattic/jetpack-publicize/CHANGELOG.md @@ -5,13 +5,6 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.41.0-alpha] - unreleased - -This is an alpha version! The changes listed here are not final. - -### Changed -- Use Blog ID in links to WPCOM instead of site slug. - ## [0.40.0] - 2024-01-18 ### Changed - Changed dismissed notices endpoint to be a core endpoint [#34544] @@ -465,7 +458,6 @@ This is an alpha version! The changes listed here are not final. - Updated package dependencies. - Update package.json metadata. -[0.41.0-alpha]: https://github.com/Automattic/jetpack-publicize/compare/v0.40.0...v0.41.0-alpha [0.40.0]: https://github.com/Automattic/jetpack-publicize/compare/v0.39.0...v0.40.0 [0.39.0]: https://github.com/Automattic/jetpack-publicize/compare/v0.38.3...v0.39.0 [0.38.3]: https://github.com/Automattic/jetpack-publicize/compare/v0.38.2...v0.38.3 diff --git a/jetpack_vendor/automattic/jetpack-publicize/src/class-publicize-base.php b/jetpack_vendor/automattic/jetpack-publicize/src/class-publicize-base.php index 6e4a5ec096..5ad7774453 100644 --- a/jetpack_vendor/automattic/jetpack-publicize/src/class-publicize-base.php +++ b/jetpack_vendor/automattic/jetpack-publicize/src/class-publicize-base.php @@ -10,7 +10,6 @@ namespace Automattic\Jetpack\Publicize; use Automattic\Jetpack\Connection\Client; -use Automattic\Jetpack\Connection\Manager as Connection_Manager; use Automattic\Jetpack\Current_Plan; use Automattic\Jetpack\Redirect; use Automattic\Jetpack\Status; @@ -1674,10 +1673,7 @@ protected static function build_sprintf( $args ) { public function publicize_connections_url( $source = 'calypso-marketing-connections' ) { $allowed_sources = array( 'jetpack-social-connections-admin-page', 'jetpack-social-connections-classic-editor', 'calypso-marketing-connections' ); $source = in_array( $source, $allowed_sources, true ) ? $source : 'calypso-marketing-connections'; - $blog_id = Connection_Manager::get_site_id( true ); - $site = ( new Status() )->get_site_suffix(); - - return Redirect::get_url( $source, array( 'site' => $blog_id ? $blog_id : $site ) ); + return Redirect::get_url( $source, array( 'site' => ( new Status() )->get_site_suffix() ) ); } /** diff --git a/jetpack_vendor/automattic/jetpack-search/CHANGELOG.md b/jetpack_vendor/automattic/jetpack-search/CHANGELOG.md index 796de9c6a3..5b05fd37ea 100644 --- a/jetpack_vendor/automattic/jetpack-search/CHANGELOG.md +++ b/jetpack_vendor/automattic/jetpack-search/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.42.1] - 2024-01-29 +### Changed +- Update dependencies. [#35170] + ## [0.42.0] - 2024-01-25 ### Added - Add price and rating to default sort options. [#35167] @@ -880,6 +884,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated package dependencies. - Update PHPUnit configs to include just what needs coverage rather than include everything then try to exclude stuff that doesn't. +[0.42.1]: https://github.com/Automattic/jetpack-search/compare/v0.42.0...v0.42.1 [0.42.0]: https://github.com/Automattic/jetpack-search/compare/v0.41.1...v0.42.0 [0.41.1]: https://github.com/Automattic/jetpack-search/compare/v0.41.0...v0.41.1 [0.41.0]: https://github.com/Automattic/jetpack-search/compare/v0.40.4...v0.41.0 diff --git a/jetpack_vendor/automattic/jetpack-search/src/class-package.php b/jetpack_vendor/automattic/jetpack-search/src/class-package.php index 0526597fd4..adeb4530e2 100644 --- a/jetpack_vendor/automattic/jetpack-search/src/class-package.php +++ b/jetpack_vendor/automattic/jetpack-search/src/class-package.php @@ -11,7 +11,7 @@ * Search package general information */ class Package { - const VERSION = '0.42.0'; + const VERSION = '0.42.1'; const SLUG = 'search'; /** diff --git a/jetpack_vendor/automattic/jetpack-videopress/CHANGELOG.md b/jetpack_vendor/automattic/jetpack-videopress/CHANGELOG.md index 0195dc3be1..0269eef75b 100644 --- a/jetpack_vendor/automattic/jetpack-videopress/CHANGELOG.md +++ b/jetpack_vendor/automattic/jetpack-videopress/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.22.4] - 2024-01-29 +### Changed +- Update dependencies. + ## [0.22.3] - 2024-01-22 ### Fixed - Memberships: Removed the use of non-existent class Token_Subscription_Service [#34999] @@ -1242,6 +1246,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Created empty package [#24952] +[0.22.4]: https://github.com/Automattic/jetpack-videopress/compare/v0.22.3...v0.22.4 [0.22.3]: https://github.com/Automattic/jetpack-videopress/compare/v0.22.2...v0.22.3 [0.22.2]: https://github.com/Automattic/jetpack-videopress/compare/v0.22.1...v0.22.2 [0.22.1]: https://github.com/Automattic/jetpack-videopress/compare/v0.22.0...v0.22.1 diff --git a/jetpack_vendor/automattic/jetpack-videopress/src/class-package-version.php b/jetpack_vendor/automattic/jetpack-videopress/src/class-package-version.php index 1ea64a45c2..904be6fd91 100644 --- a/jetpack_vendor/automattic/jetpack-videopress/src/class-package-version.php +++ b/jetpack_vendor/automattic/jetpack-videopress/src/class-package-version.php @@ -11,7 +11,7 @@ * The Package_Version class. */ class Package_Version { - const PACKAGE_VERSION = '0.22.3'; + const PACKAGE_VERSION = '0.22.4'; const PACKAGE_SLUG = 'videopress'; diff --git a/jetpack_vendor/automattic/jetpack-wordads/CHANGELOG.md b/jetpack_vendor/automattic/jetpack-wordads/CHANGELOG.md index 8ad2fe98d2..eef4dd8562 100644 --- a/jetpack_vendor/automattic/jetpack-wordads/CHANGELOG.md +++ b/jetpack_vendor/automattic/jetpack-wordads/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.3.6] - 2024-01-29 +### Changed +- Update dependencies. [#35170] + ## [0.3.5] - 2024-01-22 ### Changed - Update dependencies. [#35117] @@ -295,6 +299,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - PHPCS: Fix `WordPress.Security.ValidatedSanitizedInput` - Updated package dependencies. +[0.3.6]: https://github.com/Automattic/jetpack-wordads/compare/v0.3.5...v0.3.6 [0.3.5]: https://github.com/Automattic/jetpack-wordads/compare/v0.3.4...v0.3.5 [0.3.4]: https://github.com/Automattic/jetpack-wordads/compare/v0.3.3...v0.3.4 [0.3.3]: https://github.com/Automattic/jetpack-wordads/compare/v0.3.2...v0.3.3 diff --git a/jetpack_vendor/automattic/jetpack-wordads/src/class-package.php b/jetpack_vendor/automattic/jetpack-wordads/src/class-package.php index 8032920c25..e7bb467193 100644 --- a/jetpack_vendor/automattic/jetpack-wordads/src/class-package.php +++ b/jetpack_vendor/automattic/jetpack-wordads/src/class-package.php @@ -11,7 +11,7 @@ * WordAds package general information */ class Package { - const VERSION = '0.3.5'; + const VERSION = '0.3.6'; const SLUG = 'wordads'; /** diff --git a/jetpack_vendor/i18n-map.php b/jetpack_vendor/i18n-map.php index 51d1b3cb92..8a6b201fd5 100644 --- a/jetpack_vendor/i18n-map.php +++ b/jetpack_vendor/i18n-map.php @@ -6,7 +6,7 @@ 'packages' => array( 'jetpack-admin-ui' => array( 'path' => 'jetpack_vendor/automattic/jetpack-admin-ui', - 'ver' => '0.3.2-alpha1706547209', + 'ver' => '0.3.2', ), 'jetpack-assets' => array( 'path' => 'jetpack_vendor/automattic/jetpack-assets', @@ -14,11 +14,11 @@ ), 'jetpack-backup-pkg' => array( 'path' => 'jetpack_vendor/automattic/jetpack-backup', - 'ver' => '3.1.0', + 'ver' => '3.1.1', ), 'jetpack-blaze' => array( 'path' => 'jetpack_vendor/automattic/jetpack-blaze', - 'ver' => '0.15.1', + 'ver' => '0.15.2', ), 'jetpack-boost-core' => array( 'path' => 'jetpack_vendor/automattic/jetpack-boost-core', @@ -38,11 +38,11 @@ ), 'jetpack-connection' => array( 'path' => 'jetpack_vendor/automattic/jetpack-connection', - 'ver' => '2.3.0-alpha1706556436', + 'ver' => '2.2.0', ), 'jetpack-forms' => array( 'path' => 'jetpack_vendor/automattic/jetpack-forms', - 'ver' => '0.30.1', + 'ver' => '0.30.2', ), 'jetpack-google-fonts-provider' => array( 'path' => 'jetpack_vendor/automattic/jetpack-google-fonts-provider', @@ -74,7 +74,7 @@ ), 'jetpack-my-jetpack' => array( 'path' => 'jetpack_vendor/automattic/jetpack-my-jetpack', - 'ver' => '4.7.0-alpha1706309878', + 'ver' => '4.7.0', ), 'jetpack-password-checker' => array( 'path' => 'jetpack_vendor/automattic/jetpack-password-checker', @@ -90,11 +90,11 @@ ), 'jetpack-publicize-pkg' => array( 'path' => 'jetpack_vendor/automattic/jetpack-publicize', - 'ver' => '0.41.0-alpha1706556436', + 'ver' => '0.40.0', ), 'jetpack-search-pkg' => array( 'path' => 'jetpack_vendor/automattic/jetpack-search', - 'ver' => '0.42.0', + 'ver' => '0.42.1', ), 'jetpack-stats' => array( 'path' => 'jetpack_vendor/automattic/jetpack-stats', @@ -110,7 +110,7 @@ ), 'jetpack-videopress-pkg' => array( 'path' => 'jetpack_vendor/automattic/jetpack-videopress', - 'ver' => '0.22.3', + 'ver' => '0.22.4', ), 'jetpack-waf' => array( 'path' => 'jetpack_vendor/automattic/jetpack-waf', @@ -118,7 +118,7 @@ ), 'jetpack-wordads' => array( 'path' => 'jetpack_vendor/automattic/jetpack-wordads', - 'ver' => '0.3.5', + 'ver' => '0.3.6', ), ), ); diff --git a/readme.txt b/readme.txt index 2d998aefa4..23db6b9674 100644 --- a/readme.txt +++ b/readme.txt @@ -293,10 +293,12 @@ Jetpack Backup can do a full website migration to a new host, migrate theme file == Changelog == -### 13.1-a.7 - 2024-01-25 +### 13.1-a.9 - 2024-01-29 #### Enhancements -- Jetpack Search: Add 'price' as the default sorting option. -- Subscribe Block: Don't include social followers on counts by default. +- Subject: A new way to upload media via the Jetpack App + +#### Improved compatibility +- RNMobile: Disable Story block -------- diff --git a/vendor/autoload.php b/vendor/autoload.php index 147f7f6ab2..e51f9f6856 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -22,4 +22,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8::getLoader(); +return ComposerAutoloaderInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9::getLoader(); diff --git a/vendor/autoload_packages.php b/vendor/autoload_packages.php index 099b7710bf..a97eb22833 100644 --- a/vendor/autoload_packages.php +++ b/vendor/autoload_packages.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8\al3_0_2; +namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9\al3_0_2; // phpcs:ignore diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 7bd9e856ad..e90a2f3e7c 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8 +class ComposerAutoloaderInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9 { private static $loader; @@ -24,17 +24,17 @@ public static function getLoader() require __DIR__ . '/platform_check.php'; - spl_autoload_register(array('ComposerAutoloaderInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 9d99021f37..e7eddedecd 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8 +class ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9 { public static $files = array ( '3773ef3f09c37da5478d578e32b03a4b' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-assets/actions.php', @@ -459,9 +459,9 @@ class ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 7740e74d19..d6b03d37ba 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -2,23 +2,30 @@ "packages": [ { "name": "automattic/jetpack-a8c-mc-stats", - "version": "2.0.0", + "version": "v2.0.0", "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-a8c-mc-stats.git", + "reference": "6ce7a1e1eba796643d7d32dc49057c7bb8e3233c" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-a8c-mc-stats", - "reference": "7a2c3f76c08660fb5a3c510df0c52868f2443cf9" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-a8c-mc-stats/zipball/6ce7a1e1eba796643d7d32dc49057c7bb8e3233c", + "reference": "6ce7a1e1eba796643d7d32dc49057c7bb8e3233c", + "shasum": "" }, "require": { "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.0", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2023-11-20T20:02:34+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -36,45 +43,45 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Used to record internal usage stats for Automattic. Not visible to site owners.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-a8c-mc-stats/tree/v2.0.0" }, "install-path": "../../jetpack_vendor/automattic/jetpack-a8c-mc-stats" }, { "name": "automattic/jetpack-abtest", - "version": "2.0.0", + "version": "v2.0.0", "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-abtest.git", + "reference": "31d83717f8208afbe820341aad5aa33e5111ada2" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-abtest", - "reference": "775159d8ca3156ee465a02553ebadf1eacfa75aa" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-abtest/zipball/31d83717f8208afbe820341aad5aa33e5111ada2", + "reference": "31d83717f8208afbe820341aad5aa33e5111ada2", + "shasum": "" }, "require": { - "automattic/jetpack-connection": "^2.3.0-alpha", + "automattic/jetpack-connection": "^2.0.0", "automattic/jetpack-error": "^2.0.0", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.0", "automattic/wordbless": "dev-master", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2023-11-20T20:03:22+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -92,37 +99,30 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "test-php": [ - "@composer phpunit" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Provides an interface to the WP.com A/B tests.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-abtest/tree/v2.0.0" }, "install-path": "../../jetpack_vendor/automattic/jetpack-abtest" }, { "name": "automattic/jetpack-admin-ui", - "version": "0.3.2-alpha.1706547209", - "version_normalized": "0.3.2.0-alpha1706547209", + "version": "v0.3.2", + "version_normalized": "0.3.2.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-admin-ui.git", + "reference": "22c381953ce293529202cda959218d6256a3ef7c" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-admin-ui", - "reference": "83a8c8f8cdaca5f6de31f7a1b2f1aee57bea033f" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-admin-ui/zipball/22c381953ce293529202cda959218d6256a3ef7c", + "reference": "22c381953ce293529202cda959218d6256a3ef7c", + "shasum": "" }, "require": { "php": ">=7.0" @@ -136,6 +136,7 @@ "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-29T19:37:58+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -157,44 +158,37 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Generic Jetpack wp-admin UI elements", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-admin-ui/tree/v0.3.2" }, "install-path": "../../jetpack_vendor/automattic/jetpack-admin-ui" }, { "name": "automattic/jetpack-assets", - "version": "2.0.4", + "version": "v2.0.4", "version_normalized": "2.0.4.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-assets.git", + "reference": "ae8944abdb7a8da7137dedb9b4fe2afd81ed2d72" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-assets", - "reference": "7632f966e3068c701c0f63dc01c5c678a22ca416" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-assets/zipball/ae8944abdb7a8da7137dedb9b4fe2afd81ed2d72", + "reference": "ae8944abdb7a8da7137dedb9b4fe2afd81ed2d72", + "shasum": "" }, "require": { "automattic/jetpack-constants": "^2.0.0", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.5", "brain/monkey": "2.6.1", "wikimedia/testing-access-wrapper": "^1.0 || ^2.0 || ^3.0", "yoast/phpunit-polyfills": "1.1.0" @@ -202,6 +196,7 @@ "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-04T15:59:44+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -223,49 +218,40 @@ "src/" ] }, - "scripts": { - "build-development": [ - "pnpm run build" - ], - "build-production": [ - "pnpm run build-production" - ], - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-js": [ - "pnpm run test" - ], - "test-php": [ - "@composer phpunit" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Asset management utilities for Jetpack ecosystem packages", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-assets/tree/v2.0.4" }, "install-path": "../../jetpack_vendor/automattic/jetpack-assets" }, { "name": "automattic/jetpack-autoloader", - "version": "3.0.2", + "version": "v3.0.2", "version_normalized": "3.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-autoloader.git", + "reference": "bbf43988d1538a9f2678809b0868dc42111d0b12" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-autoloader", - "reference": "f2af8cdccc30971e9588151eb4659b860ef01b7b" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/bbf43988d1538a9f2678809b0868dc42111d0b12", + "reference": "bbf43988d1538a9f2678809b0868dc42111d0b12", + "shasum": "" }, "require": { "composer-plugin-api": "^1.1 || ^2.0", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.2", "yoast/phpunit-polyfills": "1.1.0" }, + "time": "2023-11-21T18:59:10+00:00", "type": "composer-plugin", "extra": { "autotagger": true, @@ -283,21 +269,14 @@ }, "installation-source": "dist", "autoload": { - "classmap": [ - "src/AutoloadGenerator.php" - ], "psr-4": { "Automattic\\Jetpack\\Autoloader\\": "src" - } - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" + }, + "classmap": [ + "src/AutoloadGenerator.php" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], @@ -310,28 +289,34 @@ "plugin", "wordpress" ], - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-autoloader/tree/v3.0.2" }, "install-path": "../automattic/jetpack-autoloader" }, { "name": "automattic/jetpack-backup", - "version": "3.1.0", - "version_normalized": "3.1.0.0", + "version": "v3.1.1", + "version_normalized": "3.1.1.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-backup.git", + "reference": "fcd4386ff6a3b3009677304c1a57f2c83cfb7b9c" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-backup", - "reference": "b198780cba94d42fe7372bccc6d1d541e8df9133" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-backup/zipball/fcd4386ff6a3b3009677304c1a57f2c83cfb7b9c", + "reference": "fcd4386ff6a3b3009677304c1a57f2c83cfb7b9c", + "shasum": "" }, "require": { - "automattic/jetpack-admin-ui": "^0.3.2-alpha", + "automattic/jetpack-admin-ui": "^0.3.2", "automattic/jetpack-assets": "^2.0.4", "automattic/jetpack-autoloader": "^3.0.2", "automattic/jetpack-backup-helper-script-manager": "^0.2.0", "automattic/jetpack-composer-plugin": "^2.0.0", "automattic/jetpack-config": "^2.0.0", - "automattic/jetpack-connection": "^2.3.0-alpha", + "automattic/jetpack-connection": "^2.2.0", "automattic/jetpack-identity-crisis": "^0.15.0", "automattic/jetpack-status": "^2.1.0", "automattic/jetpack-sync": "^2.4.2", @@ -345,6 +330,7 @@ "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-29T19:39:03+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -369,62 +355,43 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-js": [ - "pnpm run test" - ], - "test-php": [ - "@composer phpunit" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "build-development": [ - "pnpm run build" - ], - "build-production": [ - "pnpm run build-production-concurrently" - ], - "watch": [ - "Composer\\Config::disableProcessTimeout", - "pnpm run watch" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Tools to assist with backing up Jetpack sites.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-backup/tree/v3.1.1" }, "install-path": "../../jetpack_vendor/automattic/jetpack-backup" }, { "name": "automattic/jetpack-backup-helper-script-manager", - "version": "0.2.0", + "version": "v0.2.0", "version_normalized": "0.2.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-backup-helper-script-manager.git", + "reference": "a38e285b0f707b80e7a3d75cb5bba6adb505494f" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-backup-helper-script-manager", - "reference": "42d01f548f1cc228a8aecbcf44b342ec063a417d" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-backup-helper-script-manager/zipball/a38e285b0f707b80e7a3d75cb5bba6adb505494f", + "reference": "a38e285b0f707b80e7a3d75cb5bba6adb505494f", + "shasum": "" }, "require": { "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.5", "automattic/wordbless": "@dev", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-04T16:45:24+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -442,41 +409,34 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Install / delete helper script for backup and transport server. Not visible to site owners.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-backup-helper-script-manager/tree/v0.2.0" }, "install-path": "../../jetpack_vendor/automattic/jetpack-backup-helper-script-manager" }, { "name": "automattic/jetpack-blaze", - "version": "0.15.1", - "version_normalized": "0.15.1.0", + "version": "v0.15.2", + "version_normalized": "0.15.2.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-blaze.git", + "reference": "df66512223fc77403f8dc676dd1027508b2e1c16" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-blaze", - "reference": "b53207844f6259478f950e835a0c7ab82478e7a1" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-blaze/zipball/df66512223fc77403f8dc676dd1027508b2e1c16", + "reference": "df66512223fc77403f8dc676dd1027508b2e1c16", + "shasum": "" }, "require": { "automattic/jetpack-assets": "^2.0.4", - "automattic/jetpack-connection": "^2.3.0-alpha", + "automattic/jetpack-connection": "^2.2.0", "automattic/jetpack-constants": "^2.0.0", "automattic/jetpack-plans": "^0.4.1", "automattic/jetpack-redirect": "^2.0.0", @@ -492,6 +452,7 @@ "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-29T19:39:02+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -513,54 +474,37 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "build-production": [ - "pnpm run build-production" - ], - "build-development": [ - "pnpm run build" - ], - "watch": [ - "Composer\\Config::disableProcessTimeout", - "pnpm run watch" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Attract high-quality traffic to your site using Blaze.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-blaze/tree/v0.15.2" }, "install-path": "../../jetpack_vendor/automattic/jetpack-blaze" }, { "name": "automattic/jetpack-blocks", - "version": "2.0.0", + "version": "v2.0.0", "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-blocks.git", + "reference": "b6d593ee7eae2afa0e847ac2a230e6913fd86bb2" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-blocks", - "reference": "05b86ac96f42d9b260d9fe8e84ab120109eabfc4" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-blocks/zipball/b6d593ee7eae2afa0e847ac2a230e6913fd86bb2", + "reference": "b6d593ee7eae2afa0e847ac2a230e6913fd86bb2", + "shasum": "" }, "require": { "automattic/jetpack-constants": "^2.0.0", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.0", "automattic/wordbless": "dev-master", "brain/monkey": "2.6.1", "yoast/phpunit-polyfills": "1.1.0" @@ -568,6 +512,7 @@ "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2023-11-20T20:02:53+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -585,37 +530,30 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "test-php": [ - "@composer phpunit" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Register and manage blocks within a plugin. Used to manage block registration, enqueues, and more.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-blocks/tree/v2.0.0" }, "install-path": "../../jetpack_vendor/automattic/jetpack-blocks" }, { "name": "automattic/jetpack-boost-core", - "version": "0.2.4", + "version": "v0.2.4", "version_normalized": "0.2.4.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-boost-core.git", + "reference": "7d771cf8b99a5e88da473ddad019d608feeaf6c4" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-boost-core", - "reference": "51b86189b652f5b956a983e545d8f02fc327dafe" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-boost-core/zipball/7d771cf8b99a5e88da473ddad019d608feeaf6c4", + "reference": "7d771cf8b99a5e88da473ddad019d608feeaf6c4", + "shasum": "" }, "require": { "php": ">=7.0" @@ -628,6 +566,7 @@ "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-25T11:59:45+00:00", "type": "jetpack-library", "extra": { "mirror-repo": "Automattic/jetpack-boost-core", @@ -646,56 +585,44 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "build-production": [ - "echo 'Add your build step to composer.json, please!'" - ], - "build-development": [ - "echo 'Add your build step to composer.json, please!'" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Core functionality for boost and relevant packages to depend on", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-boost-core/tree/v0.2.4" }, "install-path": "../../jetpack_vendor/automattic/jetpack-boost-core" }, { "name": "automattic/jetpack-boost-speed-score", - "version": "0.3.3", + "version": "v0.3.3", "version_normalized": "0.3.3.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-boost-speed-score.git", + "reference": "9d31f290fbe3706114021b51243911929720715d" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-boost-speed-score", - "reference": "029e327edba50fc6644ba7b68998979dd05e799c" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-boost-speed-score/zipball/9d31f290fbe3706114021b51243911929720715d", + "reference": "9d31f290fbe3706114021b51243911929720715d", + "shasum": "" }, "require": { - "automattic/jetpack-boost-core": "^0.2.4", + "automattic/jetpack-boost-core": "^0.2.3", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.5", "brain/monkey": "^2.6", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-22T05:06:41+00:00", "type": "jetpack-library", "extra": { "mirror-repo": "Automattic/jetpack-boost-speed-score", @@ -717,58 +644,41 @@ "src/" ] }, - "autoload-dev": { - "psr-4": { - "Automattic\\Jetpack\\Boost_Speed_Score\\Tests\\": "./tests/php" - } - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "build-production": [ - "echo 'Add your build step to composer.json, please!'" - ], - "build-development": [ - "echo 'Add your build step to composer.json, please!'" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "A package that handles the API to generate the speed score.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-boost-speed-score/tree/v0.3.3" }, "install-path": "../../jetpack_vendor/automattic/jetpack-boost-speed-score" }, { "name": "automattic/jetpack-compat", - "version": "2.0.0", + "version": "v2.0.0", "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-compat.git", + "reference": "89963a77b102ec741896489c3a798fc01949134d" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-compat", - "reference": "8920f188350cdd77ba035867571ad680119542b9" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-compat/zipball/89963a77b102ec741896489c3a798fc01949134d", + "reference": "89963a77b102ec741896489c3a798fc01949134d", + "shasum": "" }, "require": { "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0" + "automattic/jetpack-changelogger": "^4.0.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2023-11-20T20:02:36+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -790,33 +700,41 @@ "legacy" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Compatibility layer with previous versions of Jetpack", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-compat/tree/v2.0.0" }, "install-path": "../../jetpack_vendor/automattic/jetpack-compat" }, { "name": "automattic/jetpack-composer-plugin", - "version": "2.0.0", + "version": "v2.0.0", "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-composer-plugin.git", + "reference": "d4d80af5d62fcf0b786accfc136e89977ba66853" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-composer-plugin", - "reference": "19897c469f379107587e3bff675122c6fd3c49ac" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-composer-plugin/zipball/d4d80af5d62fcf0b786accfc136e89977ba66853", + "reference": "d4d80af5d62fcf0b786accfc136e89977ba66853", + "shasum": "" }, "require": { "composer-plugin-api": "^2.1.0", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.0", "composer/composer": "^2.2 || ^2.4", "yoast/phpunit-polyfills": "1.1.0" }, + "time": "2023-11-20T20:02:27+00:00", "type": "composer-plugin", "extra": { "plugin-modifies-install-path": true, @@ -836,14 +754,7 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], @@ -854,29 +765,36 @@ "jetpack", "plugin" ], - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-composer-plugin/tree/v2.0.0" }, "install-path": "../automattic/jetpack-composer-plugin" }, { "name": "automattic/jetpack-config", - "version": "2.0.0", + "version": "v2.0.0", "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-config.git", + "reference": "1e34ef5f598abc1e5ee9100aa5a1a1f51b62681d" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-config", - "reference": "b277a92ea68d4d0f5aecc06223e852c1a747bdb6" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-config/zipball/1e34ef5f598abc1e5ee9100aa5a1a1f51b62681d", + "reference": "1e34ef5f598abc1e5ee9100aa5a1a1f51b62681d", + "shasum": "" }, "require": { "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0" + "automattic/jetpack-changelogger": "^4.0.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2023-11-20T20:02:25+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -895,35 +813,42 @@ "src/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Jetpack configuration package that initializes other packages and configures Jetpack's functionality. Can be used as a base for all variants of Jetpack package usage.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-config/tree/v2.0.0" }, "install-path": "../../jetpack_vendor/automattic/jetpack-config" }, { "name": "automattic/jetpack-connection", - "version": "2.3.0-alpha.1706556436", - "version_normalized": "2.3.0.0-alpha1706556436", + "version": "v2.2.0", + "version_normalized": "2.2.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-connection.git", + "reference": "6ce84a70a6a31eb7dd9284609188cb6f261367d0" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-connection", - "reference": "a6fd979f71e3cce28447e07cfdb249ea2cedffdc" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-connection/zipball/6ce84a70a6a31eb7dd9284609188cb6f261367d0", + "reference": "6ce84a70a6a31eb7dd9284609188cb6f261367d0", + "shasum": "" }, "require": { "automattic/jetpack-a8c-mc-stats": "^2.0.0", - "automattic/jetpack-admin-ui": "^0.3.2-alpha", + "automattic/jetpack-admin-ui": "^0.3.1", "automattic/jetpack-constants": "^2.0.0", "automattic/jetpack-redirect": "^2.0.0", "automattic/jetpack-roles": "^2.0.0", - "automattic/jetpack-status": "^2.1.0", + "automattic/jetpack-status": "^2.0.2", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.5", "automattic/wordbless": "@dev", "brain/monkey": "2.6.1", "yoast/phpunit-polyfills": "1.1.0" @@ -931,6 +856,7 @@ "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-18T15:06:14+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -943,7 +869,7 @@ "link-template": "https://github.com/Automattic/jetpack-connection/compare/v${old}...v${new}" }, "branch-alias": { - "dev-trunk": "2.3.x-dev" + "dev-trunk": "2.2.x-dev" } }, "installation-source": "dist", @@ -954,55 +880,43 @@ "src/webhooks" ] }, - "scripts": { - "build-production": [ - "pnpm run build-production" - ], - "build-development": [ - "pnpm run build" - ], - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "test-php": [ - "@composer phpunit" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Everything needed to connect to the Jetpack infrastructure", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-connection/tree/v2.2.0" }, "install-path": "../../jetpack_vendor/automattic/jetpack-connection" }, { "name": "automattic/jetpack-constants", - "version": "2.0.0", + "version": "v2.0.0", "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-constants.git", + "reference": "d4244e33d2d18902951af05ca5dbb689a23c9cdc" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-constants", - "reference": "513ebe3bb94ebd24d3d1b196ed8754d88ba0d16f" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-constants/zipball/d4244e33d2d18902951af05ca5dbb689a23c9cdc", + "reference": "d4244e33d2d18902951af05ca5dbb689a23c9cdc", + "shasum": "" }, "require": { "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.0", "brain/monkey": "2.6.1", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2023-11-20T20:02:28+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -1020,42 +934,42 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "A wrapper for defining constants in a more testable way.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-constants/tree/v2.0.0" }, "install-path": "../../jetpack_vendor/automattic/jetpack-constants" }, { "name": "automattic/jetpack-device-detection", - "version": "2.0.1", + "version": "v2.0.1", "version_normalized": "2.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-device-detection.git", + "reference": "e1cdc3012a350e99942f63625452c2c349bc562f" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-device-detection", - "reference": "25906a255b34a9114882c42af28ae6421843ce73" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-device-detection/zipball/e1cdc3012a350e99942f63625452c2c349bc562f", + "reference": "e1cdc3012a350e99942f63625452c2c349bc562f", + "shasum": "" }, "require": { "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.2", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2023-11-21T18:58:28+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -1073,42 +987,42 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "A way to detect device types based on User-Agent header.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-device-detection/tree/v2.0.1" }, "install-path": "../../jetpack_vendor/automattic/jetpack-device-detection" }, { "name": "automattic/jetpack-error", - "version": "2.0.0", + "version": "v2.0.0", "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-error.git", + "reference": "b1071ab3441b66de35bc78db5b38175f72cef6df" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-error", - "reference": "988df12589d88a926c36fa18e84ceac7adab81a2" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-error/zipball/b1071ab3441b66de35bc78db5b38175f72cef6df", + "reference": "b1071ab3441b66de35bc78db5b38175f72cef6df", + "shasum": "" }, "require": { "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.0", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2023-11-20T20:02:30+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -1126,48 +1040,48 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Jetpack Error - a wrapper around WP_Error.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-error/tree/v2.0.0" }, "install-path": "../../jetpack_vendor/automattic/jetpack-error" }, { "name": "automattic/jetpack-forms", - "version": "0.30.1", - "version_normalized": "0.30.1.0", + "version": "v0.30.2", + "version_normalized": "0.30.2.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-forms.git", + "reference": "50e9c529f7018c58eae3b3589e30de51e6c8c0fb" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-forms", - "reference": "4f6ef8fcf17627a0a21cba708f79f7f1a34726b2" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-forms/zipball/50e9c529f7018c58eae3b3589e30de51e6c8c0fb", + "reference": "50e9c529f7018c58eae3b3589e30de51e6c8c0fb", + "shasum": "" }, "require": { "automattic/jetpack-assets": "^2.0.4", "automattic/jetpack-blocks": "^2.0.0", - "automattic/jetpack-connection": "^2.3.0-alpha", + "automattic/jetpack-connection": "^2.2.0", "automattic/jetpack-status": "^2.1.0", "php": ">=7.0" }, "require-dev": { "automattic/jetpack-changelogger": "^4.1.0", - "automattic/jetpack-connection": "^2.3.0-alpha", + "automattic/jetpack-connection": "^2.2.0", "automattic/wordbless": "^0.4.1", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-29T19:39:00+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -1189,62 +1103,43 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "test-js": [ - "pnpm run test:contact-form" - ], - "build-production": [ - "pnpm run build-production" - ], - "build-development": [ - "pnpm run build" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "watch": [ - "Composer\\Config::disableProcessTimeout", - "pnpm run watch" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Jetpack Forms", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-forms/tree/v0.30.2" }, "install-path": "../../jetpack_vendor/automattic/jetpack-forms" }, { "name": "automattic/jetpack-google-fonts-provider", - "version": "0.7.1", + "version": "v0.7.1", "version_normalized": "0.7.1.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-google-fonts-provider.git", + "reference": "f299ac1a598445c776bee074f7648115cc24b053" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-google-fonts-provider", - "reference": "edd9cb2ade85f46cc6baaa928dd9a8902cbd1729" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-google-fonts-provider/zipball/f299ac1a598445c776bee074f7648115cc24b053", + "reference": "f299ac1a598445c776bee074f7648115cc24b053", + "shasum": "" }, "require": { "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.3", "brain/monkey": "2.6.1", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2023-11-24T21:14:06+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -1263,48 +1158,48 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "WordPress Webfonts provider for Google Fonts", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-google-fonts-provider/tree/v0.7.1" }, "install-path": "../../jetpack_vendor/automattic/jetpack-google-fonts-provider" }, { "name": "automattic/jetpack-identity-crisis", - "version": "0.15.0", + "version": "v0.15.0", "version_normalized": "0.15.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-identity-crisis.git", + "reference": "245602b882b104b502e05a88a556a1c3d3f88f9b" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-identity-crisis", - "reference": "5e6a5e380dbf525bbf1d2867ef4cf77bbc8db406" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-identity-crisis/zipball/245602b882b104b502e05a88a556a1c3d3f88f9b", + "reference": "245602b882b104b502e05a88a556a1c3d3f88f9b", + "shasum": "" }, "require": { "automattic/jetpack-assets": "^2.0.4", - "automattic/jetpack-connection": "^2.3.0-alpha", + "automattic/jetpack-connection": "^2.2.0", "automattic/jetpack-constants": "^2.0.0", "automattic/jetpack-logo": "^2.0.0", - "automattic/jetpack-status": "^2.1.0", + "automattic/jetpack-status": "^2.0.2", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.5", "automattic/wordbless": "@dev", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-18T15:06:40+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -1326,61 +1221,45 @@ "src/" ] }, - "scripts": { - "build-development": [ - "pnpm run build" - ], - "build-production": [ - "NODE_ENV='production' pnpm run build" - ], - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "watch": [ - "Composer\\Config::disableProcessTimeout", - "pnpm run watch" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Identity Crisis.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-identity-crisis/tree/v0.15.0" }, "install-path": "../../jetpack_vendor/automattic/jetpack-identity-crisis" }, { "name": "automattic/jetpack-image-cdn", - "version": "0.3.2", + "version": "v0.3.2", "version_normalized": "0.3.2.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-image-cdn.git", + "reference": "9feee96c7f6b190e581cf9688672809398949119" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-image-cdn", - "reference": "c2d7c87c6c0f20f9e658b2dae651e572c55a6a7d" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-image-cdn/zipball/9feee96c7f6b190e581cf9688672809398949119", + "reference": "9feee96c7f6b190e581cf9688672809398949119", + "shasum": "" }, "require": { - "automattic/jetpack-assets": "^2.0.4", - "automattic/jetpack-status": "^2.1.0", + "automattic/jetpack-assets": "^2.0.2", + "automattic/jetpack-status": "^2.0.2", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.4", "automattic/wordbless": "dev-master", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2023-12-03T23:58:21+00:00", "type": "jetpack-library", "extra": { "mirror-repo": "Automattic/jetpack-image-cdn", @@ -1402,56 +1281,44 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "build-production": [ - "pnpm run build-production" - ], - "build-development": [ - "pnpm run build" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Serve images through Jetpack's powerful CDN", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-image-cdn/tree/v0.3.2" }, "install-path": "../../jetpack_vendor/automattic/jetpack-image-cdn" }, { "name": "automattic/jetpack-import", - "version": "0.8.1", + "version": "v0.8.1", "version_normalized": "0.8.1.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-import.git", + "reference": "db7e9c2c127f6519615d30a18b2ca298280b5340" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-import", - "reference": "4a08c7dbdb43245eed7db4dacf3fcdb6536df2e7" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-import/zipball/db7e9c2c127f6519615d30a18b2ca298280b5340", + "reference": "db7e9c2c127f6519615d30a18b2ca298280b5340", + "shasum": "" }, "require": { - "automattic/jetpack-connection": "^2.3.0-alpha", + "automattic/jetpack-connection": "^2.0.3", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.3", "automattic/wordbless": "dev-master", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2023-11-24T21:14:52+00:00", "type": "jetpack-library", "extra": { "mirror-repo": "Automattic/jetpack-import", @@ -1473,55 +1340,43 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "build-production": [ - "echo 'Add your build step to composer.json, please!'" - ], - "build-development": [ - "echo 'Add your build step to composer.json, please!'" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Set of REST API routes used in WPCOM Unified Importer.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-import/tree/v0.8.1" }, "install-path": "../../jetpack_vendor/automattic/jetpack-import" }, { "name": "automattic/jetpack-ip", - "version": "0.2.1", + "version": "v0.2.1", "version_normalized": "0.2.1.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-ip.git", + "reference": "2c4c7c237ae8628b64edbe920f6ceef9be15d7dc" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-ip", - "reference": "11c6a614ed2ad2573fff23a0339d1176c571ba58" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-ip/zipball/2c4c7c237ae8628b64edbe920f6ceef9be15d7dc", + "reference": "2c4c7c237ae8628b64edbe920f6ceef9be15d7dc", + "shasum": "" }, "require": { "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.2", "brain/monkey": "2.6.1", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2023-11-21T18:58:12+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -1543,50 +1398,50 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Utilities for working with IP addresses.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-ip/tree/v0.2.1" }, "install-path": "../../jetpack_vendor/automattic/jetpack-ip" }, { "name": "automattic/jetpack-jitm", - "version": "3.0.2", + "version": "v3.0.2", "version_normalized": "3.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-jitm.git", + "reference": "39c52152462696d80f15f853ed6b8a0a959404d5" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-jitm", - "reference": "1fd5da5fa13ee6d3d3e19442d3832e6bce92203a" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-jitm/zipball/39c52152462696d80f15f853ed6b8a0a959404d5", + "reference": "39c52152462696d80f15f853ed6b8a0a959404d5", + "shasum": "" }, "require": { "automattic/jetpack-a8c-mc-stats": "^2.0.0", "automattic/jetpack-assets": "^2.0.4", - "automattic/jetpack-connection": "^2.3.0-alpha", + "automattic/jetpack-connection": "^2.1.1", "automattic/jetpack-device-detection": "^2.0.1", "automattic/jetpack-logo": "^2.0.0", "automattic/jetpack-redirect": "^2.0.0", - "automattic/jetpack-status": "^2.1.0", + "automattic/jetpack-status": "^2.0.2", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.5", "brain/monkey": "2.6.1", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-04T15:59:58+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -1608,54 +1463,44 @@ "src/" ] }, - "scripts": { - "build-production": [ - "pnpm run build-production" - ], - "build-development": [ - "pnpm run build" - ], - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "watch": [ - "Composer\\Config::disableProcessTimeout", - "pnpm run watch" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Just in time messages for Jetpack", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-jitm/tree/v3.0.2" }, "install-path": "../../jetpack_vendor/automattic/jetpack-jitm" }, { "name": "automattic/jetpack-licensing", - "version": "2.0.1", + "version": "v2.0.1", "version_normalized": "2.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-licensing.git", + "reference": "bc66aa7138285def320e4a6a2d9e07be6efd836b" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-licensing", - "reference": "f8c9bc657885cb816331c26437e4cddfc8ebb18b" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-licensing/zipball/bc66aa7138285def320e4a6a2d9e07be6efd836b", + "reference": "bc66aa7138285def320e4a6a2d9e07be6efd836b", + "shasum": "" }, "require": { - "automattic/jetpack-connection": "^2.3.0-alpha", + "automattic/jetpack-connection": "^2.0.1", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.1", "automattic/wordbless": "@dev", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2023-11-21T12:14:55+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -1674,48 +1519,42 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "test-php": [ - "@composer phpunit" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Everything needed to manage Jetpack licenses client-side.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-licensing/tree/v2.0.1" }, "install-path": "../../jetpack_vendor/automattic/jetpack-licensing" }, { "name": "automattic/jetpack-logo", - "version": "2.0.0", + "version": "v2.0.0", "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-logo.git", + "reference": "21890dd130cae1365d6e59cf01db74e453e72d10" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-logo", - "reference": "e1fd7626a0bf7580f1641e7458353ffecad78b3b" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-logo/zipball/21890dd130cae1365d6e59cf01db74e453e72d10", + "reference": "21890dd130cae1365d6e59cf01db74e453e72d10", + "shasum": "" }, "require": { "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.0", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2023-11-20T20:02:31+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -1733,36 +1572,35 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "A logo for Jetpack", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-logo/tree/v2.0.0" }, "install-path": "../../jetpack_vendor/automattic/jetpack-logo" }, { "name": "automattic/jetpack-my-jetpack", - "version": "4.7.0-alpha.1706309878", - "version_normalized": "4.7.0.0-alpha1706309878", + "version": "v4.7.0", + "version_normalized": "4.7.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-my-jetpack.git", + "reference": "502bcdede909d20d6557965d801b3c7da0daa70f" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-my-jetpack", - "reference": "d0e877af43a5c9a2ae7f17bf5c665995c7d0609f" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-my-jetpack/zipball/502bcdede909d20d6557965d801b3c7da0daa70f", + "reference": "502bcdede909d20d6557965d801b3c7da0daa70f", + "shasum": "" }, "require": { - "automattic/jetpack-admin-ui": "^0.3.2-alpha", + "automattic/jetpack-admin-ui": "^0.3.2", "automattic/jetpack-assets": "^2.0.4", - "automattic/jetpack-connection": "^2.3.0-alpha", + "automattic/jetpack-connection": "^2.2.0", "automattic/jetpack-constants": "^2.0.0", "automattic/jetpack-jitm": "^3.0.2", "automattic/jetpack-licensing": "^2.0.1", @@ -1773,13 +1611,14 @@ }, "require-dev": { "automattic/jetpack-changelogger": "^4.1.0", - "automattic/jetpack-videopress": "^0.22.3", + "automattic/jetpack-videopress": "^0.22.4", "automattic/wordbless": "@dev", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-29T19:39:05+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -1802,66 +1641,43 @@ "src/products" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "test-js": [ - "pnpm run test" - ], - "test-js-watch": [ - "Composer\\Config::disableProcessTimeout", - "pnpm run test --watch" - ], - "build-development": [ - "pnpm run build" - ], - "build-production": [ - "NODE_ENV=production pnpm run build" - ], - "watch": [ - "Composer\\Config::disableProcessTimeout", - "pnpm run watch" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "WP Admin page with information and configuration shared among all Jetpack stand-alone plugins", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-my-jetpack/tree/v4.7.0" }, "install-path": "../../jetpack_vendor/automattic/jetpack-my-jetpack" }, { "name": "automattic/jetpack-password-checker", - "version": "0.3.0", + "version": "v0.3.0", "version_normalized": "0.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-password-checker.git", + "reference": "43120a1ddc032a9141ff02cc3ac7a7eac936d9f9" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-password-checker", - "reference": "b9a87b70763a40417d0249b79db6c32fc5fd8e40" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-password-checker/zipball/43120a1ddc032a9141ff02cc3ac7a7eac936d9f9", + "reference": "43120a1ddc032a9141ff02cc3ac7a7eac936d9f9", + "shasum": "" }, "require": { "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.0", "automattic/wordbless": "@dev", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2023-11-20T20:02:33+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -1880,51 +1696,45 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Password Checker.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-password-checker/tree/v0.3.0" }, "install-path": "../../jetpack_vendor/automattic/jetpack-password-checker" }, { "name": "automattic/jetpack-plans", - "version": "0.4.1", + "version": "v0.4.1", "version_normalized": "0.4.1.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-plans.git", + "reference": "f12a14c3109745bb0c8435be4c8b0baf32b4c59d" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-plans", - "reference": "52f3ced5b9ee8934aa3d04df53a6a1d612a456f7" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-plans/zipball/f12a14c3109745bb0c8435be4c8b0baf32b4c59d", + "reference": "f12a14c3109745bb0c8435be4c8b0baf32b4c59d", + "shasum": "" }, "require": { - "automattic/jetpack-connection": "^2.3.0-alpha", + "automattic/jetpack-connection": "^2.2.0", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", - "automattic/jetpack-status": "^2.1.0", + "automattic/jetpack-changelogger": "^4.0.5", + "automattic/jetpack-status": "^2.0.2", "automattic/wordbless": "@dev", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-18T15:06:16+00:00", "type": "library", "extra": { "autotagger": true, @@ -1942,55 +1752,43 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "build-production": [ - "echo 'Add your build step to composer.json, please!'" - ], - "build-development": [ - "echo 'Add your build step to composer.json, please!'" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Fetch information about Jetpack Plans from wpcom", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-plans/tree/v0.4.1" }, "install-path": "../automattic/jetpack-plans" }, { "name": "automattic/jetpack-plugins-installer", - "version": "0.3.1", + "version": "v0.3.1", "version_normalized": "0.3.1.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-plugins-installer.git", + "reference": "e39246d8c946aecb750ca09f7caf712184f9d068" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-plugins-installer", - "reference": "41fd3b8824767862d185d1b4582e3622043dc98d" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-plugins-installer/zipball/e39246d8c946aecb750ca09f7caf712184f9d068", + "reference": "e39246d8c946aecb750ca09f7caf712184f9d068", + "shasum": "" }, "require": { "automattic/jetpack-a8c-mc-stats": "^2.0.0", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.5", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-02T18:14:25+00:00", "type": "jetpack-library", "extra": { "branch-alias": { @@ -2009,44 +1807,44 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Handle installation of plugins from WP.org", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-plugins-installer/tree/v0.3.1" }, "install-path": "../../jetpack_vendor/automattic/jetpack-plugins-installer" }, { "name": "automattic/jetpack-post-list", - "version": "0.5.1", + "version": "v0.5.1", "version_normalized": "0.5.1.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-post-list.git", + "reference": "1e04b56986840a1254ac8d5889a3b7d212d316b0" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-post-list", - "reference": "f77ab4f4e8ba4ecdf9f1e8a890d0ab46f603f9db" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-post-list/zipball/1e04b56986840a1254ac8d5889a3b7d212d316b0", + "reference": "1e04b56986840a1254ac8d5889a3b7d212d316b0", + "shasum": "" }, "require": { - "automattic/jetpack-assets": "^2.0.4", + "automattic/jetpack-assets": "^2.0.1", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.3", "automattic/wordbless": "@dev", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2023-11-24T21:14:45+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -2068,55 +1866,49 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Enhance the classic view of the Admin section of your WordPress site", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-post-list/tree/v0.5.1" }, "install-path": "../../jetpack_vendor/automattic/jetpack-post-list" }, { "name": "automattic/jetpack-publicize", - "version": "0.41.0-alpha.1706556436", - "version_normalized": "0.41.0.0-alpha1706556436", + "version": "v0.40.0", + "version_normalized": "0.40.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-publicize.git", + "reference": "4bbfc7a845ae72e642b88164389c3a65d2387c1a" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-publicize", - "reference": "6ca5e1d3229db6281178beb69d69fcce11716ebf" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-publicize/zipball/4bbfc7a845ae72e642b88164389c3a65d2387c1a", + "reference": "4bbfc7a845ae72e642b88164389c3a65d2387c1a", + "shasum": "" }, "require": { "automattic/jetpack-assets": "^2.0.4", "automattic/jetpack-autoloader": "^3.0.2", "automattic/jetpack-config": "^2.0.0", - "automattic/jetpack-connection": "^2.3.0-alpha", + "automattic/jetpack-connection": "^2.2.0", "automattic/jetpack-plans": "^0.4.1", "automattic/jetpack-redirect": "^2.0.0", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.5", "automattic/wordbless": "0.4.2", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-18T15:06:33+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -2126,72 +1918,56 @@ "link-template": "https://github.com/Automattic/jetpack-publicize/compare/v${old}...v${new}" }, "branch-alias": { - "dev-trunk": "0.41.x-dev" + "dev-trunk": "0.40.x-dev" } }, "installation-source": "dist", "autoload": { - "classmap": [ - "src/" - ], "files": [ "src/social-image-generator/utilities.php" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "build-development": [ - "pnpm run build" - ], - "watch": [ - "Composer\\Config::disableProcessTimeout", - "pnpm run watch" ], - "build-production": [ - "pnpm run build-production-concurrently" + "classmap": [ + "src/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Publicize makes it easy to share your site’s posts on several social media networks automatically when you publish a new post.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-publicize/tree/v0.40.0" }, "install-path": "../../jetpack_vendor/automattic/jetpack-publicize" }, { "name": "automattic/jetpack-redirect", - "version": "2.0.0", + "version": "v2.0.0", "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-redirect.git", + "reference": "8f1bbfd4b046b8a0ae7b156007c2ef56a0ddbf76" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-redirect", - "reference": "ec841accf810340d7ae41408d05da90ef2c79b67" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-redirect/zipball/8f1bbfd4b046b8a0ae7b156007c2ef56a0ddbf76", + "reference": "8f1bbfd4b046b8a0ae7b156007c2ef56a0ddbf76", + "shasum": "" }, "require": { - "automattic/jetpack-status": "^2.1.0", + "automattic/jetpack-status": "^2.0.0", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.0", "brain/monkey": "2.6.1", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2023-11-20T20:03:01+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -2209,43 +1985,43 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Utilities to build URLs to the jetpack.com/redirect/ service", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-redirect/tree/v2.0.0" }, "install-path": "../../jetpack_vendor/automattic/jetpack-redirect" }, { "name": "automattic/jetpack-roles", - "version": "2.0.0", + "version": "v2.0.0", "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-roles.git", + "reference": "967e52052a17123a23f4112da3d8e7e995467cb2" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-roles", - "reference": "6b4a31246533a68f70a82a55f777477da4379e8d" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-roles/zipball/967e52052a17123a23f4112da3d8e7e995467cb2", + "reference": "967e52052a17123a23f4112da3d8e7e995467cb2", + "shasum": "" }, "require": { "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.0", "brain/monkey": "2.6.1", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2023-11-20T20:02:32+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -2263,38 +2039,37 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Utilities, related with user roles and capabilities.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-roles/tree/v2.0.0" }, "install-path": "../../jetpack_vendor/automattic/jetpack-roles" }, { "name": "automattic/jetpack-search", - "version": "0.42.0", - "version_normalized": "0.42.0.0", + "version": "v0.42.1", + "version_normalized": "0.42.1.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-search.git", + "reference": "b6b1dc2cba83f9f529fd8e9992b49b684b7e7908" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-search", - "reference": "98c12531002b465cf6076b8ef39e99598e2f5689" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-search/zipball/b6b1dc2cba83f9f529fd8e9992b49b684b7e7908", + "reference": "b6b1dc2cba83f9f529fd8e9992b49b684b7e7908", + "shasum": "" }, "require": { "automattic/jetpack-assets": "^2.0.4", "automattic/jetpack-config": "^2.0.0", - "automattic/jetpack-connection": "^2.3.0-alpha", + "automattic/jetpack-connection": "^2.2.0", "automattic/jetpack-constants": "^2.0.0", - "automattic/jetpack-my-jetpack": "^4.7.0-alpha", + "automattic/jetpack-my-jetpack": "^4.7.0", "automattic/jetpack-status": "^2.1.0", "php": ">=7.0" }, @@ -2306,6 +2081,7 @@ "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-29T19:39:07+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -2327,70 +2103,47 @@ "src/" ] }, - "scripts": { - "build": [ - "Composer\\Config::disableProcessTimeout", - "pnpm run build" - ], - "build-development": [ - "pnpm run build-development" - ], - "build-production": [ - "pnpm run build-production" - ], - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-js": [ - "pnpm run test" - ], - "test-php": [ - "@composer phpunit" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "watch": [ - "Composer\\Config::disableProcessTimeout", - "pnpm run watch" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Tools to assist with enabling cloud search for Jetpack sites.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-search/tree/v0.42.1" }, "install-path": "../../jetpack_vendor/automattic/jetpack-search" }, { "name": "automattic/jetpack-stats", - "version": "0.9.0", + "version": "v0.9.0", "version_normalized": "0.9.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-stats.git", + "reference": "e021c0230507c077d9d89d3074d72023084c749f" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-stats", - "reference": "b14ef861f27d7c52ab03814038a08ae5be190d06" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-stats/zipball/e021c0230507c077d9d89d3074d72023084c749f", + "reference": "e021c0230507c077d9d89d3074d72023084c749f", + "shasum": "" }, "require": { - "automattic/jetpack-assets": "^2.0.4", - "automattic/jetpack-connection": "^2.3.0-alpha", + "automattic/jetpack-assets": "^2.0.3", + "automattic/jetpack-connection": "^2.1.0", "automattic/jetpack-constants": "^2.0.0", - "automattic/jetpack-status": "^2.1.0", + "automattic/jetpack-status": "^2.0.2", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.5", "automattic/wordbless": "dev-master", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2023-12-25T16:15:15+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -2409,55 +2162,49 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Collect valuable traffic stats and insights.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-stats/tree/v0.9.0" }, "install-path": "../../jetpack_vendor/automattic/jetpack-stats" }, { "name": "automattic/jetpack-stats-admin", - "version": "0.15.1", + "version": "v0.15.1", "version_normalized": "0.15.1.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-stats-admin.git", + "reference": "7b75cc7cbc6a2168e0d5965aa19ced4782ed2588" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-stats-admin", - "reference": "4242cd96376a1b6753f7151bfa8919c74d204641" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-stats-admin/zipball/7b75cc7cbc6a2168e0d5965aa19ced4782ed2588", + "reference": "7b75cc7cbc6a2168e0d5965aa19ced4782ed2588", + "shasum": "" }, "require": { - "automattic/jetpack-connection": "^2.3.0-alpha", + "automattic/jetpack-connection": "^2.1.0", "automattic/jetpack-constants": "^2.0.0", - "automattic/jetpack-jitm": "^3.0.2", - "automattic/jetpack-plans": "^0.4.1", + "automattic/jetpack-jitm": "^3.0.1", + "automattic/jetpack-plans": "^0.4.0", "automattic/jetpack-stats": "^0.9.0", - "automattic/jetpack-status": "^2.1.0", + "automattic/jetpack-status": "^2.0.2", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.5", "automattic/wordbless": "dev-master", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2023-12-25T16:15:20+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -2476,50 +2223,37 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "build-production": [ - "echo 'Add your build step to composer.json, please!'" - ], - "build-development": [ - "echo 'Add your build step to composer.json, please!'" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Stats Dashboard", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-stats-admin/tree/v0.15.1" }, "install-path": "../../jetpack_vendor/automattic/jetpack-stats-admin" }, { "name": "automattic/jetpack-status", - "version": "2.1.0", + "version": "v2.1.0", "version_normalized": "2.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-status.git", + "reference": "badaae2ef5345629f5333938e32a649bf946d688" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-status", - "reference": "21d886333cb1c2b578144a1ae5ae4d29349a2acc" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-status/zipball/badaae2ef5345629f5333938e32a649bf946d688", + "reference": "badaae2ef5345629f5333938e32a649bf946d688", + "shasum": "" }, "require": { "automattic/jetpack-constants": "^2.0.0", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.5", "automattic/jetpack-ip": "^0.2.1", "brain/monkey": "2.6.1", "yoast/phpunit-polyfills": "1.1.0" @@ -2527,6 +2261,7 @@ "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-18T21:49:55+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -2544,50 +2279,50 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Used to retrieve information about the current status of Jetpack and the site overall.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-status/tree/v2.1.0" }, "install-path": "../../jetpack_vendor/automattic/jetpack-status" }, { "name": "automattic/jetpack-sync", - "version": "2.4.2", + "version": "v2.4.2", "version_normalized": "2.4.2.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-sync.git", + "reference": "4f8bd360416b9d7ee6996bfa46bd9365dc0b63b7" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-sync", - "reference": "621abf960946d9f2b1ae7f51a1812578d1ece48a" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-sync/zipball/4f8bd360416b9d7ee6996bfa46bd9365dc0b63b7", + "reference": "4f8bd360416b9d7ee6996bfa46bd9365dc0b63b7", + "shasum": "" }, "require": { - "automattic/jetpack-connection": "^2.3.0-alpha", + "automattic/jetpack-connection": "^2.2.0", "automattic/jetpack-constants": "^2.0.0", "automattic/jetpack-identity-crisis": "^0.15.0", "automattic/jetpack-ip": "^0.2.1", "automattic/jetpack-password-checker": "^0.3.0", "automattic/jetpack-roles": "^2.0.0", - "automattic/jetpack-status": "^2.1.0", + "automattic/jetpack-status": "^2.0.2", "php": ">=7.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.5", "automattic/wordbless": "@dev", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-18T15:06:41+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -2609,42 +2344,35 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Everything needed to allow syncing to the WP.com infrastructure.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-sync/tree/v2.4.2" }, "install-path": "../../jetpack_vendor/automattic/jetpack-sync" }, { "name": "automattic/jetpack-videopress", - "version": "0.22.3", - "version_normalized": "0.22.3.0", + "version": "v0.22.4", + "version_normalized": "0.22.4.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-videopress.git", + "reference": "87b8758771fe3cdbd0812d7e49da6bd17870ea4e" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-videopress", - "reference": "cc835cc55e43a3c57972d6154c1cca54603fa1a9" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-videopress/zipball/87b8758771fe3cdbd0812d7e49da6bd17870ea4e", + "reference": "87b8758771fe3cdbd0812d7e49da6bd17870ea4e", + "shasum": "" }, "require": { - "automattic/jetpack-admin-ui": "^0.3.2-alpha", + "automattic/jetpack-admin-ui": "^0.3.2", "automattic/jetpack-assets": "^2.0.4", - "automattic/jetpack-connection": "^2.3.0-alpha", + "automattic/jetpack-connection": "^2.2.0", "automattic/jetpack-plans": "^0.4.1", "php": ">=7.0" }, @@ -2657,6 +2385,7 @@ "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-29T19:38:58+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -2678,53 +2407,33 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "test-js": [ - "pnpm run test" - ], - "build-production": [ - "NODE_ENV=production BABEL_ENV=production pnpm run build" - ], - "build-development": [ - "pnpm run build" - ], - "watch": [ - "Composer\\Config::disableProcessTimeout", - "pnpm run watch" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "VideoPress package", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-videopress/tree/v0.22.4" }, "install-path": "../../jetpack_vendor/automattic/jetpack-videopress" }, { "name": "automattic/jetpack-waf", - "version": "0.12.4", + "version": "v0.12.4", "version_normalized": "0.12.4.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-waf.git", + "reference": "e0291050fc44bcb62417cac4bf6520d04ef9b00c" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-waf", - "reference": "40f2b70e81752297088bebecb721ef57796d8898" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-waf/zipball/e0291050fc44bcb62417cac4bf6520d04ef9b00c", + "reference": "e0291050fc44bcb62417cac4bf6520d04ef9b00c", + "shasum": "" }, "require": { - "automattic/jetpack-connection": "^2.3.0-alpha", + "automattic/jetpack-connection": "^2.2.0", "automattic/jetpack-constants": "^2.0.0", "automattic/jetpack-ip": "^0.2.1", "automattic/jetpack-status": "^2.1.0", @@ -2732,13 +2441,14 @@ "wikimedia/aho-corasick": "^1.0" }, "require-dev": { - "automattic/jetpack-changelogger": "^4.1.0", + "automattic/jetpack-changelogger": "^4.0.5", "automattic/wordbless": "@dev", "yoast/phpunit-polyfills": "1.1.0" }, "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-18T21:50:20+00:00", "type": "jetpack-library", "extra": { "autotagger": true, @@ -2760,47 +2470,35 @@ "src/" ] }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --configuration tests/php/integration/phpunit.xml.dist --colors=always", - "./vendor/phpunit/phpunit/phpunit --configuration tests/php/unit/phpunit.xml.dist --colors=always" - ], - "post-install-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "post-update-cmd": [ - "WorDBless\\Composer\\InstallDropin::copy" - ], - "test-coverage-html": [ - "php -dpcov.directory=. ./vendor/bin/phpunit --coverage-html ./coverage --configuration tests/php/integration/phpunit.xml.dist", - "php -dpcov.directory=. ./vendor/bin/phpunit --coverage-html ./coverage --configuration tests/php/unit/phpunit.xml.dist" - ], - "test-php": [ - "@composer phpunit" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Tools to assist with the Jetpack Web Application Firewall", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-waf/tree/v0.12.4" }, "install-path": "../../jetpack_vendor/automattic/jetpack-waf" }, { "name": "automattic/jetpack-wordads", - "version": "0.3.5", - "version_normalized": "0.3.5.0", + "version": "v0.3.6", + "version_normalized": "0.3.6.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/jetpack-wordads.git", + "reference": "aef8c5ec2a95ee30b5dd8c2cefd84d3773757ede" + }, "dist": { - "type": "path", - "url": "/tmp/jetpack-build/Automattic/jetpack-wordads", - "reference": "077c65c9b6aa9d66486789575b1073b8c176baac" + "type": "zip", + "url": "https://api.github.com/repos/Automattic/jetpack-wordads/zipball/aef8c5ec2a95ee30b5dd8c2cefd84d3773757ede", + "reference": "aef8c5ec2a95ee30b5dd8c2cefd84d3773757ede", + "shasum": "" }, "require": { "automattic/jetpack-assets": "^2.0.4", "automattic/jetpack-config": "^2.0.0", - "automattic/jetpack-connection": "^2.3.0-alpha", + "automattic/jetpack-connection": "^2.2.0", "automattic/jetpack-constants": "^2.0.0", "automattic/jetpack-status": "^2.1.0", "php": ">=7.0" @@ -2812,6 +2510,7 @@ "suggest": { "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." }, + "time": "2024-01-29T19:38:53+00:00", "type": "jetpack-library", "extra": { "mirror-repo": "Automattic/jetpack-wordads", @@ -2833,37 +2532,13 @@ "src/" ] }, - "scripts": { - "build": [ - "Composer\\Config::disableProcessTimeout", - "pnpm run build" - ], - "build-development": [ - "pnpm run build-development" - ], - "build-production": [ - "pnpm run build-production" - ], - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-js": [ - "pnpm run test" - ], - "test-php": [ - "@composer phpunit" - ], - "watch": [ - "Composer\\Config::disableProcessTimeout", - "pnpm run watch" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "description": "Earn income by allowing Jetpack to display high quality ads.", - "transport-options": { - "relative": false + "support": { + "source": "https://github.com/Automattic/jetpack-wordads/tree/v0.3.6" }, "install-path": "../../jetpack_vendor/automattic/jetpack-wordads" }, diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index a02d965758..911fab4ea1 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -20,387 +20,387 @@ 'dev_requirement' => false, ), 'automattic/jetpack-a8c-mc-stats' => array( - 'pretty_version' => '2.0.0', + 'pretty_version' => 'v2.0.0', 'version' => '2.0.0.0', - 'reference' => '7a2c3f76c08660fb5a3c510df0c52868f2443cf9', + 'reference' => '6ce7a1e1eba796643d7d32dc49057c7bb8e3233c', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-a8c-mc-stats', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-abtest' => array( - 'pretty_version' => '2.0.0', + 'pretty_version' => 'v2.0.0', 'version' => '2.0.0.0', - 'reference' => '775159d8ca3156ee465a02553ebadf1eacfa75aa', + 'reference' => '31d83717f8208afbe820341aad5aa33e5111ada2', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-abtest', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-admin-ui' => array( - 'pretty_version' => '0.3.2-alpha.1706547209', - 'version' => '0.3.2.0-alpha1706547209', - 'reference' => '83a8c8f8cdaca5f6de31f7a1b2f1aee57bea033f', + 'pretty_version' => 'v0.3.2', + 'version' => '0.3.2.0', + 'reference' => '22c381953ce293529202cda959218d6256a3ef7c', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-admin-ui', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-assets' => array( - 'pretty_version' => '2.0.4', + 'pretty_version' => 'v2.0.4', 'version' => '2.0.4.0', - 'reference' => '7632f966e3068c701c0f63dc01c5c678a22ca416', + 'reference' => 'ae8944abdb7a8da7137dedb9b4fe2afd81ed2d72', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-assets', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-autoloader' => array( - 'pretty_version' => '3.0.2', + 'pretty_version' => 'v3.0.2', 'version' => '3.0.2.0', - 'reference' => 'f2af8cdccc30971e9588151eb4659b860ef01b7b', + 'reference' => 'bbf43988d1538a9f2678809b0868dc42111d0b12', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../automattic/jetpack-autoloader', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-backup' => array( - 'pretty_version' => '3.1.0', - 'version' => '3.1.0.0', - 'reference' => 'b198780cba94d42fe7372bccc6d1d541e8df9133', + 'pretty_version' => 'v3.1.1', + 'version' => '3.1.1.0', + 'reference' => 'fcd4386ff6a3b3009677304c1a57f2c83cfb7b9c', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-backup', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-backup-helper-script-manager' => array( - 'pretty_version' => '0.2.0', + 'pretty_version' => 'v0.2.0', 'version' => '0.2.0.0', - 'reference' => '42d01f548f1cc228a8aecbcf44b342ec063a417d', + 'reference' => 'a38e285b0f707b80e7a3d75cb5bba6adb505494f', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-backup-helper-script-manager', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-blaze' => array( - 'pretty_version' => '0.15.1', - 'version' => '0.15.1.0', - 'reference' => 'b53207844f6259478f950e835a0c7ab82478e7a1', + 'pretty_version' => 'v0.15.2', + 'version' => '0.15.2.0', + 'reference' => 'df66512223fc77403f8dc676dd1027508b2e1c16', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-blaze', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-blocks' => array( - 'pretty_version' => '2.0.0', + 'pretty_version' => 'v2.0.0', 'version' => '2.0.0.0', - 'reference' => '05b86ac96f42d9b260d9fe8e84ab120109eabfc4', + 'reference' => 'b6d593ee7eae2afa0e847ac2a230e6913fd86bb2', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-blocks', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-boost-core' => array( - 'pretty_version' => '0.2.4', + 'pretty_version' => 'v0.2.4', 'version' => '0.2.4.0', - 'reference' => '51b86189b652f5b956a983e545d8f02fc327dafe', + 'reference' => '7d771cf8b99a5e88da473ddad019d608feeaf6c4', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-boost-core', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-boost-speed-score' => array( - 'pretty_version' => '0.3.3', + 'pretty_version' => 'v0.3.3', 'version' => '0.3.3.0', - 'reference' => '029e327edba50fc6644ba7b68998979dd05e799c', + 'reference' => '9d31f290fbe3706114021b51243911929720715d', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-boost-speed-score', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-compat' => array( - 'pretty_version' => '2.0.0', + 'pretty_version' => 'v2.0.0', 'version' => '2.0.0.0', - 'reference' => '8920f188350cdd77ba035867571ad680119542b9', + 'reference' => '89963a77b102ec741896489c3a798fc01949134d', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-compat', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-composer-plugin' => array( - 'pretty_version' => '2.0.0', + 'pretty_version' => 'v2.0.0', 'version' => '2.0.0.0', - 'reference' => '19897c469f379107587e3bff675122c6fd3c49ac', + 'reference' => 'd4d80af5d62fcf0b786accfc136e89977ba66853', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../automattic/jetpack-composer-plugin', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-config' => array( - 'pretty_version' => '2.0.0', + 'pretty_version' => 'v2.0.0', 'version' => '2.0.0.0', - 'reference' => 'b277a92ea68d4d0f5aecc06223e852c1a747bdb6', + 'reference' => '1e34ef5f598abc1e5ee9100aa5a1a1f51b62681d', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-config', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-connection' => array( - 'pretty_version' => '2.3.0-alpha.1706556436', - 'version' => '2.3.0.0-alpha1706556436', - 'reference' => 'a6fd979f71e3cce28447e07cfdb249ea2cedffdc', + 'pretty_version' => 'v2.2.0', + 'version' => '2.2.0.0', + 'reference' => '6ce84a70a6a31eb7dd9284609188cb6f261367d0', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-connection', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-constants' => array( - 'pretty_version' => '2.0.0', + 'pretty_version' => 'v2.0.0', 'version' => '2.0.0.0', - 'reference' => '513ebe3bb94ebd24d3d1b196ed8754d88ba0d16f', + 'reference' => 'd4244e33d2d18902951af05ca5dbb689a23c9cdc', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-constants', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-device-detection' => array( - 'pretty_version' => '2.0.1', + 'pretty_version' => 'v2.0.1', 'version' => '2.0.1.0', - 'reference' => '25906a255b34a9114882c42af28ae6421843ce73', + 'reference' => 'e1cdc3012a350e99942f63625452c2c349bc562f', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-device-detection', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-error' => array( - 'pretty_version' => '2.0.0', + 'pretty_version' => 'v2.0.0', 'version' => '2.0.0.0', - 'reference' => '988df12589d88a926c36fa18e84ceac7adab81a2', + 'reference' => 'b1071ab3441b66de35bc78db5b38175f72cef6df', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-error', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-forms' => array( - 'pretty_version' => '0.30.1', - 'version' => '0.30.1.0', - 'reference' => '4f6ef8fcf17627a0a21cba708f79f7f1a34726b2', + 'pretty_version' => 'v0.30.2', + 'version' => '0.30.2.0', + 'reference' => '50e9c529f7018c58eae3b3589e30de51e6c8c0fb', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-forms', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-google-fonts-provider' => array( - 'pretty_version' => '0.7.1', + 'pretty_version' => 'v0.7.1', 'version' => '0.7.1.0', - 'reference' => 'edd9cb2ade85f46cc6baaa928dd9a8902cbd1729', + 'reference' => 'f299ac1a598445c776bee074f7648115cc24b053', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-google-fonts-provider', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-identity-crisis' => array( - 'pretty_version' => '0.15.0', + 'pretty_version' => 'v0.15.0', 'version' => '0.15.0.0', - 'reference' => '5e6a5e380dbf525bbf1d2867ef4cf77bbc8db406', + 'reference' => '245602b882b104b502e05a88a556a1c3d3f88f9b', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-identity-crisis', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-image-cdn' => array( - 'pretty_version' => '0.3.2', + 'pretty_version' => 'v0.3.2', 'version' => '0.3.2.0', - 'reference' => 'c2d7c87c6c0f20f9e658b2dae651e572c55a6a7d', + 'reference' => '9feee96c7f6b190e581cf9688672809398949119', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-image-cdn', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-import' => array( - 'pretty_version' => '0.8.1', + 'pretty_version' => 'v0.8.1', 'version' => '0.8.1.0', - 'reference' => '4a08c7dbdb43245eed7db4dacf3fcdb6536df2e7', + 'reference' => 'db7e9c2c127f6519615d30a18b2ca298280b5340', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-import', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-ip' => array( - 'pretty_version' => '0.2.1', + 'pretty_version' => 'v0.2.1', 'version' => '0.2.1.0', - 'reference' => '11c6a614ed2ad2573fff23a0339d1176c571ba58', + 'reference' => '2c4c7c237ae8628b64edbe920f6ceef9be15d7dc', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-ip', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-jitm' => array( - 'pretty_version' => '3.0.2', + 'pretty_version' => 'v3.0.2', 'version' => '3.0.2.0', - 'reference' => '1fd5da5fa13ee6d3d3e19442d3832e6bce92203a', + 'reference' => '39c52152462696d80f15f853ed6b8a0a959404d5', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-jitm', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-licensing' => array( - 'pretty_version' => '2.0.1', + 'pretty_version' => 'v2.0.1', 'version' => '2.0.1.0', - 'reference' => 'f8c9bc657885cb816331c26437e4cddfc8ebb18b', + 'reference' => 'bc66aa7138285def320e4a6a2d9e07be6efd836b', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-licensing', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-logo' => array( - 'pretty_version' => '2.0.0', + 'pretty_version' => 'v2.0.0', 'version' => '2.0.0.0', - 'reference' => 'e1fd7626a0bf7580f1641e7458353ffecad78b3b', + 'reference' => '21890dd130cae1365d6e59cf01db74e453e72d10', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-logo', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-my-jetpack' => array( - 'pretty_version' => '4.7.0-alpha.1706309878', - 'version' => '4.7.0.0-alpha1706309878', - 'reference' => 'd0e877af43a5c9a2ae7f17bf5c665995c7d0609f', + 'pretty_version' => 'v4.7.0', + 'version' => '4.7.0.0', + 'reference' => '502bcdede909d20d6557965d801b3c7da0daa70f', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-my-jetpack', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-password-checker' => array( - 'pretty_version' => '0.3.0', + 'pretty_version' => 'v0.3.0', 'version' => '0.3.0.0', - 'reference' => 'b9a87b70763a40417d0249b79db6c32fc5fd8e40', + 'reference' => '43120a1ddc032a9141ff02cc3ac7a7eac936d9f9', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-password-checker', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-plans' => array( - 'pretty_version' => '0.4.1', + 'pretty_version' => 'v0.4.1', 'version' => '0.4.1.0', - 'reference' => '52f3ced5b9ee8934aa3d04df53a6a1d612a456f7', + 'reference' => 'f12a14c3109745bb0c8435be4c8b0baf32b4c59d', 'type' => 'library', 'install_path' => __DIR__ . '/../automattic/jetpack-plans', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-plugins-installer' => array( - 'pretty_version' => '0.3.1', + 'pretty_version' => 'v0.3.1', 'version' => '0.3.1.0', - 'reference' => '41fd3b8824767862d185d1b4582e3622043dc98d', + 'reference' => 'e39246d8c946aecb750ca09f7caf712184f9d068', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-plugins-installer', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-post-list' => array( - 'pretty_version' => '0.5.1', + 'pretty_version' => 'v0.5.1', 'version' => '0.5.1.0', - 'reference' => 'f77ab4f4e8ba4ecdf9f1e8a890d0ab46f603f9db', + 'reference' => '1e04b56986840a1254ac8d5889a3b7d212d316b0', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-post-list', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-publicize' => array( - 'pretty_version' => '0.41.0-alpha.1706556436', - 'version' => '0.41.0.0-alpha1706556436', - 'reference' => '6ca5e1d3229db6281178beb69d69fcce11716ebf', + 'pretty_version' => 'v0.40.0', + 'version' => '0.40.0.0', + 'reference' => '4bbfc7a845ae72e642b88164389c3a65d2387c1a', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-publicize', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-redirect' => array( - 'pretty_version' => '2.0.0', + 'pretty_version' => 'v2.0.0', 'version' => '2.0.0.0', - 'reference' => 'ec841accf810340d7ae41408d05da90ef2c79b67', + 'reference' => '8f1bbfd4b046b8a0ae7b156007c2ef56a0ddbf76', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-redirect', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-roles' => array( - 'pretty_version' => '2.0.0', + 'pretty_version' => 'v2.0.0', 'version' => '2.0.0.0', - 'reference' => '6b4a31246533a68f70a82a55f777477da4379e8d', + 'reference' => '967e52052a17123a23f4112da3d8e7e995467cb2', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-roles', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-search' => array( - 'pretty_version' => '0.42.0', - 'version' => '0.42.0.0', - 'reference' => '98c12531002b465cf6076b8ef39e99598e2f5689', + 'pretty_version' => 'v0.42.1', + 'version' => '0.42.1.0', + 'reference' => 'b6b1dc2cba83f9f529fd8e9992b49b684b7e7908', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-search', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-stats' => array( - 'pretty_version' => '0.9.0', + 'pretty_version' => 'v0.9.0', 'version' => '0.9.0.0', - 'reference' => 'b14ef861f27d7c52ab03814038a08ae5be190d06', + 'reference' => 'e021c0230507c077d9d89d3074d72023084c749f', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-stats', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-stats-admin' => array( - 'pretty_version' => '0.15.1', + 'pretty_version' => 'v0.15.1', 'version' => '0.15.1.0', - 'reference' => '4242cd96376a1b6753f7151bfa8919c74d204641', + 'reference' => '7b75cc7cbc6a2168e0d5965aa19ced4782ed2588', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-stats-admin', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-status' => array( - 'pretty_version' => '2.1.0', + 'pretty_version' => 'v2.1.0', 'version' => '2.1.0.0', - 'reference' => '21d886333cb1c2b578144a1ae5ae4d29349a2acc', + 'reference' => 'badaae2ef5345629f5333938e32a649bf946d688', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-status', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-sync' => array( - 'pretty_version' => '2.4.2', + 'pretty_version' => 'v2.4.2', 'version' => '2.4.2.0', - 'reference' => '621abf960946d9f2b1ae7f51a1812578d1ece48a', + 'reference' => '4f8bd360416b9d7ee6996bfa46bd9365dc0b63b7', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-sync', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-videopress' => array( - 'pretty_version' => '0.22.3', - 'version' => '0.22.3.0', - 'reference' => 'cc835cc55e43a3c57972d6154c1cca54603fa1a9', + 'pretty_version' => 'v0.22.4', + 'version' => '0.22.4.0', + 'reference' => '87b8758771fe3cdbd0812d7e49da6bd17870ea4e', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-videopress', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-waf' => array( - 'pretty_version' => '0.12.4', + 'pretty_version' => 'v0.12.4', 'version' => '0.12.4.0', - 'reference' => '40f2b70e81752297088bebecb721ef57796d8898', + 'reference' => 'e0291050fc44bcb62417cac4bf6520d04ef9b00c', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-waf', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-wordads' => array( - 'pretty_version' => '0.3.5', - 'version' => '0.3.5.0', - 'reference' => '077c65c9b6aa9d66486789575b1073b8c176baac', + 'pretty_version' => 'v0.3.6', + 'version' => '0.3.6.0', + 'reference' => 'aef8c5ec2a95ee30b5dd8c2cefd84d3773757ede', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-wordads', 'aliases' => array(), diff --git a/vendor/composer/jetpack_autoload_classmap.php b/vendor/composer/jetpack_autoload_classmap.php index 820056416e..38f7dd78b5 100644 --- a/vendor/composer/jetpack_autoload_classmap.php +++ b/vendor/composer/jetpack_autoload_classmap.php @@ -35,7 +35,7 @@ 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-abtest/src/class-abtest.php' ), 'Automattic\\Jetpack\\Admin_UI\\Admin_Menu' => array( - 'version' => '0.3.2.0-alpha1706547209', + 'version' => '0.3.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-admin-ui/src/class-admin-menu.php' ), 'Automattic\\Jetpack\\Assets' => array( @@ -83,23 +83,23 @@ 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-backup-helper-script-manager/src/class-helper-script-manager-impl.php' ), 'Automattic\\Jetpack\\Backup\\V0001\\Initial_State' => array( - 'version' => '3.1.0.0', + 'version' => '3.1.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-backup/src/class-initial-state.php' ), 'Automattic\\Jetpack\\Backup\\V0001\\Jetpack_Backup' => array( - 'version' => '3.1.0.0', + 'version' => '3.1.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-backup/src/class-jetpack-backup.php' ), 'Automattic\\Jetpack\\Backup\\V0001\\Jetpack_Backup_Upgrades' => array( - 'version' => '3.1.0.0', + 'version' => '3.1.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-backup/src/class-jetpack-backup-upgrades.php' ), 'Automattic\\Jetpack\\Backup\\V0001\\Package_Version' => array( - 'version' => '3.1.0.0', + 'version' => '3.1.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-backup/src/class-package-version.php' ), 'Automattic\\Jetpack\\Backup\\V0001\\REST_Controller' => array( - 'version' => '3.1.0.0', + 'version' => '3.1.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-backup/src/class-rest-controller.php' ), 'Automattic\\Jetpack\\Backup\\V0001\\Throw_On_Errors' => array( @@ -107,23 +107,23 @@ 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-backup-helper-script-manager/src/class-throw-on-errors.php' ), 'Automattic\\Jetpack\\Blaze' => array( - 'version' => '0.15.1.0', + 'version' => '0.15.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-blaze/src/class-blaze.php' ), 'Automattic\\Jetpack\\Blaze\\Dashboard' => array( - 'version' => '0.15.1.0', + 'version' => '0.15.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-blaze/src/class-dashboard.php' ), 'Automattic\\Jetpack\\Blaze\\Dashboard_Config_Data' => array( - 'version' => '0.15.1.0', + 'version' => '0.15.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-blaze/src/class-dashboard-config-data.php' ), 'Automattic\\Jetpack\\Blaze\\Dashboard_REST_Controller' => array( - 'version' => '0.15.1.0', + 'version' => '0.15.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-blaze/src/class-dashboard-rest-controller.php' ), 'Automattic\\Jetpack\\Blaze\\REST_Controller' => array( - 'version' => '0.15.1.0', + 'version' => '0.15.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-blaze/src/class-rest-controller.php' ), 'Automattic\\Jetpack\\Blocks' => array( @@ -187,95 +187,95 @@ 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-config/src/class-config.php' ), 'Automattic\\Jetpack\\Connection\\Client' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-client.php' ), 'Automattic\\Jetpack\\Connection\\Connection_Notice' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-connection-notice.php' ), 'Automattic\\Jetpack\\Connection\\Error_Handler' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-error-handler.php' ), 'Automattic\\Jetpack\\Connection\\Initial_State' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-initial-state.php' ), 'Automattic\\Jetpack\\Connection\\Manager' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-manager.php' ), 'Automattic\\Jetpack\\Connection\\Manager_Interface' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/interface-manager.php' ), 'Automattic\\Jetpack\\Connection\\Nonce_Handler' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-nonce-handler.php' ), 'Automattic\\Jetpack\\Connection\\Package_Version' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-package-version.php' ), 'Automattic\\Jetpack\\Connection\\Package_Version_Tracker' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-package-version-tracker.php' ), 'Automattic\\Jetpack\\Connection\\Plugin' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-plugin.php' ), 'Automattic\\Jetpack\\Connection\\Plugin_Storage' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-plugin-storage.php' ), 'Automattic\\Jetpack\\Connection\\REST_Connector' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-rest-connector.php' ), 'Automattic\\Jetpack\\Connection\\Rest_Authentication' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-rest-authentication.php' ), 'Automattic\\Jetpack\\Connection\\Secrets' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-secrets.php' ), 'Automattic\\Jetpack\\Connection\\Server_Sandbox' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-server-sandbox.php' ), 'Automattic\\Jetpack\\Connection\\Tokens' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-tokens.php' ), 'Automattic\\Jetpack\\Connection\\Tokens_Locks' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-tokens-locks.php' ), 'Automattic\\Jetpack\\Connection\\Urls' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-urls.php' ), 'Automattic\\Jetpack\\Connection\\Utils' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-utils.php' ), 'Automattic\\Jetpack\\Connection\\Webhooks' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-webhooks.php' ), 'Automattic\\Jetpack\\Connection\\Webhooks\\Authorize_Redirect' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/webhooks/class-authorize-redirect.php' ), 'Automattic\\Jetpack\\Connection\\XMLRPC_Async_Call' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-xmlrpc-async-call.php' ), 'Automattic\\Jetpack\\Connection\\XMLRPC_Connector' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-xmlrpc-connector.php' ), 'Automattic\\Jetpack\\Constants' => array( @@ -307,7 +307,7 @@ 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-errors.php' ), 'Automattic\\Jetpack\\Extensions\\Contact_Form\\Contact_Form_Block' => array( - 'version' => '0.30.1.0', + 'version' => '0.30.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-forms/src/blocks/contact-form/class-contact-form-block.php' ), 'Automattic\\Jetpack\\Files' => array( @@ -331,67 +331,67 @@ 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-google-fonts-provider/src/class-utils.php' ), 'Automattic\\Jetpack\\Forms\\ContactForm\\Admin' => array( - 'version' => '0.30.1.0', + 'version' => '0.30.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-forms/src/contact-form/class-admin.php' ), 'Automattic\\Jetpack\\Forms\\ContactForm\\Contact_Form' => array( - 'version' => '0.30.1.0', + 'version' => '0.30.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-forms/src/contact-form/class-contact-form.php' ), 'Automattic\\Jetpack\\Forms\\ContactForm\\Contact_Form_Endpoint' => array( - 'version' => '0.30.1.0', + 'version' => '0.30.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-forms/src/contact-form/class-contact-form-endpoint.php' ), 'Automattic\\Jetpack\\Forms\\ContactForm\\Contact_Form_Field' => array( - 'version' => '0.30.1.0', + 'version' => '0.30.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-forms/src/contact-form/class-contact-form-field.php' ), 'Automattic\\Jetpack\\Forms\\ContactForm\\Contact_Form_Plugin' => array( - 'version' => '0.30.1.0', + 'version' => '0.30.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-forms/src/contact-form/class-contact-form-plugin.php' ), 'Automattic\\Jetpack\\Forms\\ContactForm\\Contact_Form_Shortcode' => array( - 'version' => '0.30.1.0', + 'version' => '0.30.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-forms/src/contact-form/class-contact-form-shortcode.php' ), 'Automattic\\Jetpack\\Forms\\ContactForm\\Editor_View' => array( - 'version' => '0.30.1.0', + 'version' => '0.30.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-forms/src/contact-form/class-editor-view.php' ), 'Automattic\\Jetpack\\Forms\\ContactForm\\Form_View' => array( - 'version' => '0.30.1.0', + 'version' => '0.30.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-forms/src/contact-form/class-form-view.php' ), 'Automattic\\Jetpack\\Forms\\ContactForm\\Util' => array( - 'version' => '0.30.1.0', + 'version' => '0.30.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-forms/src/contact-form/class-util.php' ), 'Automattic\\Jetpack\\Forms\\Dashboard\\Dashboard' => array( - 'version' => '0.30.1.0', + 'version' => '0.30.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-forms/src/dashboard/class-dashboard.php' ), 'Automattic\\Jetpack\\Forms\\Dashboard\\Dashboard_View_Switch' => array( - 'version' => '0.30.1.0', + 'version' => '0.30.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-forms/src/dashboard/class-dashboard-view-switch.php' ), 'Automattic\\Jetpack\\Forms\\Jetpack_Forms' => array( - 'version' => '0.30.1.0', + 'version' => '0.30.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-forms/src/class-jetpack-forms.php' ), 'Automattic\\Jetpack\\Forms\\Service\\Google_Drive' => array( - 'version' => '0.30.1.0', + 'version' => '0.30.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-forms/src/service/class-google-drive.php' ), 'Automattic\\Jetpack\\Forms\\Service\\Post_To_Url' => array( - 'version' => '0.30.1.0', + 'version' => '0.30.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-forms/src/service/class-post-to-url.php' ), 'Automattic\\Jetpack\\Forms\\WPCOM_REST_API_V2_Endpoint_Forms' => array( - 'version' => '0.30.1.0', + 'version' => '0.30.2.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-forms/src/class-wpcom-rest-api-v2-endpoint-forms.php' ), 'Automattic\\Jetpack\\Heartbeat' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-heartbeat.php' ), 'Automattic\\Jetpack\\IP\\Utils' => array( @@ -547,127 +547,127 @@ 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-modules.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Activitylog' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-activitylog.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Hybrid_Product' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-hybrid-product.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Initializer' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Jetpack_Manage' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-jetpack-manage.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Module_Product' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-module-product.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Product' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-product.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Products' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-products.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Products\\Anti_Spam' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-anti-spam.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Products\\Backup' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-backup.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Products\\Boost' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-boost.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Products\\Creator' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-creator.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Products\\Crm' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-crm.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Products\\Extras' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-extras.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Products\\Jetpack_Ai' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-jetpack-ai.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Products\\Protect' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-protect.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Products\\Scan' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-scan.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Products\\Search' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Products\\Search_Stats' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search-stats.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Products\\Security' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-security.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Products\\Social' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-social.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Products\\Starter' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-starter.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Products\\Stats' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-stats.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Products\\Videopress' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-videopress.php' ), 'Automattic\\Jetpack\\My_Jetpack\\REST_AI' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-ai.php' ), 'Automattic\\Jetpack\\My_Jetpack\\REST_Product_Data' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-product-data.php' ), 'Automattic\\Jetpack\\My_Jetpack\\REST_Products' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-products.php' ), 'Automattic\\Jetpack\\My_Jetpack\\REST_Purchases' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-purchases.php' ), 'Automattic\\Jetpack\\My_Jetpack\\REST_Zendesk_Chat' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-zendesk-chat.php' ), 'Automattic\\Jetpack\\My_Jetpack\\Wpcom_Products' => array( - 'version' => '4.7.0.0-alpha1706309878', + 'version' => '4.7.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-wpcom-products.php' ), 'Automattic\\Jetpack\\Partner' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-partner.php' ), 'Automattic\\Jetpack\\Partner_Coupon' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-partner-coupon.php' ), 'Automattic\\Jetpack\\Password_Checker' => array( @@ -699,75 +699,75 @@ 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-post-list/src/class-post-thumbnail.php' ), 'Automattic\\Jetpack\\Publicize\\Auto_Conversion\\REST_Settings_Controller' => array( - 'version' => '0.41.0.0-alpha1706556436', + 'version' => '0.40.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/auto-conversion-settings/class-rest-settings-controller.php' ), 'Automattic\\Jetpack\\Publicize\\Auto_Conversion\\Settings' => array( - 'version' => '0.41.0.0-alpha1706556436', + 'version' => '0.40.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/auto-conversion-settings/class-settings.php' ), 'Automattic\\Jetpack\\Publicize\\Connections_Post_Field' => array( - 'version' => '0.41.0.0-alpha1706556436', + 'version' => '0.40.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/class-connections-post-field.php' ), 'Automattic\\Jetpack\\Publicize\\Jetpack_Social_Settings\\Dismissed_Notices' => array( - 'version' => '0.41.0.0-alpha1706556436', + 'version' => '0.40.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/jetpack-social-settings/class-dismissed-notices.php' ), 'Automattic\\Jetpack\\Publicize\\Jetpack_Social_Settings\\Settings' => array( - 'version' => '0.41.0.0-alpha1706556436', + 'version' => '0.40.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/jetpack-social-settings/class-settings.php' ), 'Automattic\\Jetpack\\Publicize\\Keyring_Helper' => array( - 'version' => '0.41.0.0-alpha1706556436', + 'version' => '0.40.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/class-keyring-helper.php' ), 'Automattic\\Jetpack\\Publicize\\Publicize' => array( - 'version' => '0.41.0.0-alpha1706556436', + 'version' => '0.40.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/class-publicize.php' ), 'Automattic\\Jetpack\\Publicize\\Publicize_Base' => array( - 'version' => '0.41.0.0-alpha1706556436', + 'version' => '0.40.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/class-publicize-base.php' ), 'Automattic\\Jetpack\\Publicize\\Publicize_Setup' => array( - 'version' => '0.41.0.0-alpha1706556436', + 'version' => '0.40.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/class-publicize-setup.php' ), 'Automattic\\Jetpack\\Publicize\\Publicize_UI' => array( - 'version' => '0.41.0.0-alpha1706556436', + 'version' => '0.40.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/class-publicize-ui.php' ), 'Automattic\\Jetpack\\Publicize\\REST_Controller' => array( - 'version' => '0.41.0.0-alpha1706556436', + 'version' => '0.40.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/class-rest-controller.php' ), 'Automattic\\Jetpack\\Publicize\\Share_Limits' => array( - 'version' => '0.41.0.0-alpha1706556436', + 'version' => '0.40.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/class-share-limits.php' ), 'Automattic\\Jetpack\\Publicize\\Social_Image_Generator\\Post_Settings' => array( - 'version' => '0.41.0.0-alpha1706556436', + 'version' => '0.40.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/social-image-generator/class-post-settings.php' ), 'Automattic\\Jetpack\\Publicize\\Social_Image_Generator\\REST_Settings_Controller' => array( - 'version' => '0.41.0.0-alpha1706556436', + 'version' => '0.40.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/social-image-generator/class-rest-settings-controller.php' ), 'Automattic\\Jetpack\\Publicize\\Social_Image_Generator\\REST_Token_Controller' => array( - 'version' => '0.41.0.0-alpha1706556436', + 'version' => '0.40.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/social-image-generator/class-rest-token-controller.php' ), 'Automattic\\Jetpack\\Publicize\\Social_Image_Generator\\Settings' => array( - 'version' => '0.41.0.0-alpha1706556436', + 'version' => '0.40.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/social-image-generator/class-settings.php' ), 'Automattic\\Jetpack\\Publicize\\Social_Image_Generator\\Setup' => array( - 'version' => '0.41.0.0-alpha1706556436', + 'version' => '0.40.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/social-image-generator/class-setup.php' ), 'Automattic\\Jetpack\\Publicize\\Social_Image_Generator\\Templates' => array( - 'version' => '0.41.0.0-alpha1706556436', + 'version' => '0.40.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/social-image-generator/class-templates.php' ), 'Automattic\\Jetpack\\Redirect' => array( @@ -779,91 +779,91 @@ 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-roles/src/class-roles.php' ), 'Automattic\\Jetpack\\Search\\CLI' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/class-cli.php' ), 'Automattic\\Jetpack\\Search\\Classic_Search' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/classic-search/class-classic-search.php' ), 'Automattic\\Jetpack\\Search\\Customberg' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/customberg/class-customberg.php' ), 'Automattic\\Jetpack\\Search\\Customizer' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/customizer/class-customizer.php' ), 'Automattic\\Jetpack\\Search\\Dashboard' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/dashboard/class-dashboard.php' ), 'Automattic\\Jetpack\\Search\\Excluded_Post_Types_Control' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/class-excluded-post-types-control.php' ), 'Automattic\\Jetpack\\Search\\Helper' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/class-helper.php' ), 'Automattic\\Jetpack\\Search\\Initial_State' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/dashboard/class-initial-state.php' ), 'Automattic\\Jetpack\\Search\\Initializer' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/initializers/class-initializer.php' ), 'Automattic\\Jetpack\\Search\\Instant_Search' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/instant-search/class-instant-search.php' ), 'Automattic\\Jetpack\\Search\\Label_Control' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/class-label-control.php' ), 'Automattic\\Jetpack\\Search\\Module_Control' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/class-module-control.php' ), 'Automattic\\Jetpack\\Search\\Options' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/class-options.php' ), 'Automattic\\Jetpack\\Search\\Package' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/class-package.php' ), 'Automattic\\Jetpack\\Search\\Plan' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/class-plan.php' ), 'Automattic\\Jetpack\\Search\\REST_Controller' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/class-rest-controller.php' ), 'Automattic\\Jetpack\\Search\\Search_Widget' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/widgets/class-search-widget.php' ), 'Automattic\\Jetpack\\Search\\Settings' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/class-settings.php' ), 'Automattic\\Jetpack\\Search\\Stats' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/class-stats.php' ), 'Automattic\\Jetpack\\Search\\Template_Tags' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/class-template-tags.php' ), 'Automattic\\Jetpack\\Search\\WPES\\Query_Builder' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/wpes/class-query-builder.php' ), 'Automattic\\Jetpack\\Search\\WPES\\Query_Parser' => array( - 'version' => '0.42.0.0', + 'version' => '0.42.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-search/src/wpes/class-query-parser.php' ), 'Automattic\\Jetpack\\Stats\\Main' => array( @@ -1159,127 +1159,127 @@ 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-utils.php' ), 'Automattic\\Jetpack\\Terms_Of_Service' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-terms-of-service.php' ), 'Automattic\\Jetpack\\Tracking' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-tracking.php' ), 'Automattic\\Jetpack\\VideoPress\\AJAX' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-ajax.php' ), 'Automattic\\Jetpack\\VideoPress\\Access_Control' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-access-control.php' ), 'Automattic\\Jetpack\\VideoPress\\Admin_UI' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-admin-ui.php' ), 'Automattic\\Jetpack\\VideoPress\\Attachment_Handler' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-attachment-handler.php' ), 'Automattic\\Jetpack\\VideoPress\\Block_Editor_Content' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-block-editor-content.php' ), 'Automattic\\Jetpack\\VideoPress\\Block_Editor_Extensions' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-block-editor-extensions.php' ), 'Automattic\\Jetpack\\VideoPress\\Data' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-data.php' ), 'Automattic\\Jetpack\\VideoPress\\Divi' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-divi.php' ), 'Automattic\\Jetpack\\VideoPress\\Initializer' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-initializer.php' ), 'Automattic\\Jetpack\\VideoPress\\Jwt_Token_Bridge' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-jwt-token-bridge.php' ), 'Automattic\\Jetpack\\VideoPress\\Module_Control' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-module-control.php' ), 'Automattic\\Jetpack\\VideoPress\\Options' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-options.php' ), 'Automattic\\Jetpack\\VideoPress\\Package_Version' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-package-version.php' ), 'Automattic\\Jetpack\\VideoPress\\Plan' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-plan.php' ), 'Automattic\\Jetpack\\VideoPress\\Site' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-site.php' ), 'Automattic\\Jetpack\\VideoPress\\Stats' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-stats.php' ), 'Automattic\\Jetpack\\VideoPress\\Status' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-status.php' ), 'Automattic\\Jetpack\\VideoPress\\Upload_Exception' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-upload-exception.php' ), 'Automattic\\Jetpack\\VideoPress\\Uploader' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-uploader.php' ), 'Automattic\\Jetpack\\VideoPress\\Uploader_Rest_Endpoints' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-uploader-rest-endpoints.php' ), 'Automattic\\Jetpack\\VideoPress\\Utils' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-utils.php' ), 'Automattic\\Jetpack\\VideoPress\\VideoPressToken' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-videopresstoken.php' ), 'Automattic\\Jetpack\\VideoPress\\VideoPress_Rest_Api_V1_Settings' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-videopress-rest-api-v1-settings.php' ), 'Automattic\\Jetpack\\VideoPress\\VideoPress_Rest_Api_V1_Site' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-videopress-rest-api-v1-site.php' ), 'Automattic\\Jetpack\\VideoPress\\VideoPress_Rest_Api_V1_Stats' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-videopress-rest-api-v1-stats.php' ), 'Automattic\\Jetpack\\VideoPress\\WPCOM_REST_API_V2_Attachment_VideoPress_Data' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-wpcom-rest-api-v2-attachment-videopress-data.php' ), 'Automattic\\Jetpack\\VideoPress\\WPCOM_REST_API_V2_Attachment_VideoPress_Field' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-wpcom-rest-api-v2-attachment-field-videopress.php' ), 'Automattic\\Jetpack\\VideoPress\\WPCOM_REST_API_V2_Endpoint_VideoPress' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-wpcom-rest-api-v2-endpoint-videopress.php' ), 'Automattic\\Jetpack\\VideoPress\\XMLRPC' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/class-xmlrpc.php' ), 'Automattic\\Jetpack\\Waf\\Brute_Force_Protection\\Brute_Force_Protection' => array( @@ -1367,27 +1367,27 @@ 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-transforms.php' ), 'Automattic\\Jetpack\\WordAds\\Dashboard' => array( - 'version' => '0.3.5.0', + 'version' => '0.3.6.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/class-dashboard.php' ), 'Automattic\\Jetpack\\WordAds\\Helper' => array( - 'version' => '0.3.5.0', + 'version' => '0.3.6.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-wordads/src/class-helper.php' ), 'Automattic\\Jetpack\\WordAds\\Initial_State' => array( - 'version' => '0.3.5.0', + 'version' => '0.3.6.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/class-initial-state.php' ), 'Automattic\\Jetpack\\WordAds\\Initializer' => array( - 'version' => '0.3.5.0', + 'version' => '0.3.6.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-wordads/src/initializers/class-initializer.php' ), 'Automattic\\Jetpack\\WordAds\\Package' => array( - 'version' => '0.3.5.0', + 'version' => '0.3.6.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-wordads/src/class-package.php' ), 'Automattic\\Jetpack\\WordAds\\REST_Controller' => array( - 'version' => '0.3.5.0', + 'version' => '0.3.6.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-wordads/src/class-rest-controller.php' ), 'Container' => array( @@ -1407,11 +1407,11 @@ 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-compat/legacy/class-jetpack-client.php' ), 'Jetpack_IXR_Client' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php' ), 'Jetpack_IXR_ClientMulticall' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-clientmulticall.php' ), 'Jetpack_Modules_Overrides' => array( @@ -1419,11 +1419,11 @@ 'path' => $baseDir . '/src/class-jetpack-modules-overrides.php' ), 'Jetpack_Options' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-options.php' ), 'Jetpack_Signature' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-signature.php' ), 'Jetpack_Sync_Actions' => array( @@ -1439,15 +1439,15 @@ 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-compat/legacy/class-jetpack-sync-settings.php' ), 'Jetpack_Tracks_Client' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-tracks-client.php' ), 'Jetpack_Tracks_Event' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-tracks-event.php' ), 'Jetpack_XMLRPC_Server' => array( - 'version' => '2.3.0.0-alpha1706556436', + 'version' => '2.2.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-xmlrpc-server.php' ), 'Latest_Autoloader_Guard' => array( @@ -1679,7 +1679,7 @@ 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-shutdown-handler.php' ), 'VIDEOPRESS_PRIVACY' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/utility-functions.php' ), 'Version_Loader' => array( @@ -1691,39 +1691,39 @@ 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-version-selector.php' ), 'VideoPressUploader\\File_Exception' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/tus/class-file-exception.php' ), 'VideoPressUploader\\Transient_Store' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/tus/class-transient-store.php' ), 'VideoPressUploader\\Tus_Abstract_Cache' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/tus/class-tus-abstract-cache.php' ), 'VideoPressUploader\\Tus_Client' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/tus/class-tus-client.php' ), 'VideoPressUploader\\Tus_Date_Utils' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/tus/class-tus-date-utils.php' ), 'VideoPressUploader\\Tus_Exception' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/tus/class-tus-exception.php' ), 'VideoPressUploader\\Tus_File' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/tus/class-tus-file.php' ), 'VideoPress_Divi_Extension' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/videopress-divi/class-videopress-divi-extension.php' ), 'VideoPress_Divi_Module' => array( - 'version' => '0.22.3.0', + 'version' => '0.22.4.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-videopress/src/videopress-divi/class-videopress-divi-module.php' ), ); diff --git a/vendor/composer/jetpack_autoload_filemap.php b/vendor/composer/jetpack_autoload_filemap.php index e9a8b7103f..e94c72c47c 100644 --- a/vendor/composer/jetpack_autoload_filemap.php +++ b/vendor/composer/jetpack_autoload_filemap.php @@ -11,7 +11,7 @@ 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-assets/actions.php' ), 'd4eb94df91a729802d18373ee8cdc79f' => array( - 'version' => '3.1.0.0', + 'version' => '3.1.1.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-backup/actions.php' ), '009de6aaa0d497eacea41fab13fc05f1' => array( @@ -19,7 +19,7 @@ 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-compat/functions.php' ), 'e6f7f640a6586216432b53e5c9d1b472' => array( - 'version' => '0.41.0.0-alpha1706556436', + 'version' => '0.40.0.0', 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-publicize/src/social-image-generator/utilities.php' ), '3d45c7e6a7f0e71849e33afe4b3b3ede' => array( diff --git a/vendor/jetpack-autoloader/class-autoloader-handler.php b/vendor/jetpack-autoloader/class-autoloader-handler.php index 727efb0371..37a71e3db3 100644 --- a/vendor/jetpack-autoloader/class-autoloader-handler.php +++ b/vendor/jetpack-autoloader/class-autoloader-handler.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8\al3_0_2; +namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9\al3_0_2; // phpcs:ignore diff --git a/vendor/jetpack-autoloader/class-autoloader-locator.php b/vendor/jetpack-autoloader/class-autoloader-locator.php index 033b1141a6..3ee98d98e6 100644 --- a/vendor/jetpack-autoloader/class-autoloader-locator.php +++ b/vendor/jetpack-autoloader/class-autoloader-locator.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8\al3_0_2; +namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9\al3_0_2; // phpcs:ignore diff --git a/vendor/jetpack-autoloader/class-autoloader.php b/vendor/jetpack-autoloader/class-autoloader.php index eed5adf739..e49d977eb8 100644 --- a/vendor/jetpack-autoloader/class-autoloader.php +++ b/vendor/jetpack-autoloader/class-autoloader.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8\al3_0_2; +namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9\al3_0_2; // phpcs:ignore diff --git a/vendor/jetpack-autoloader/class-container.php b/vendor/jetpack-autoloader/class-container.php index 74c3393b95..be30163d19 100644 --- a/vendor/jetpack-autoloader/class-container.php +++ b/vendor/jetpack-autoloader/class-container.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8\al3_0_2; +namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9\al3_0_2; // phpcs:ignore diff --git a/vendor/jetpack-autoloader/class-hook-manager.php b/vendor/jetpack-autoloader/class-hook-manager.php index 22d9f856db..9635e9f966 100644 --- a/vendor/jetpack-autoloader/class-hook-manager.php +++ b/vendor/jetpack-autoloader/class-hook-manager.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8\al3_0_2; +namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9\al3_0_2; // phpcs:ignore diff --git a/vendor/jetpack-autoloader/class-latest-autoloader-guard.php b/vendor/jetpack-autoloader/class-latest-autoloader-guard.php index dca7c4603f..a489bbbb9b 100644 --- a/vendor/jetpack-autoloader/class-latest-autoloader-guard.php +++ b/vendor/jetpack-autoloader/class-latest-autoloader-guard.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8\al3_0_2; +namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9\al3_0_2; // phpcs:ignore diff --git a/vendor/jetpack-autoloader/class-manifest-reader.php b/vendor/jetpack-autoloader/class-manifest-reader.php index 310d66437f..81edecc0f7 100644 --- a/vendor/jetpack-autoloader/class-manifest-reader.php +++ b/vendor/jetpack-autoloader/class-manifest-reader.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8\al3_0_2; +namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9\al3_0_2; // phpcs:ignore diff --git a/vendor/jetpack-autoloader/class-path-processor.php b/vendor/jetpack-autoloader/class-path-processor.php index 8155b72375..6c118278f5 100644 --- a/vendor/jetpack-autoloader/class-path-processor.php +++ b/vendor/jetpack-autoloader/class-path-processor.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8\al3_0_2; +namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9\al3_0_2; // phpcs:ignore diff --git a/vendor/jetpack-autoloader/class-php-autoloader.php b/vendor/jetpack-autoloader/class-php-autoloader.php index c56dda2a23..017a65893b 100644 --- a/vendor/jetpack-autoloader/class-php-autoloader.php +++ b/vendor/jetpack-autoloader/class-php-autoloader.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8\al3_0_2; +namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9\al3_0_2; // phpcs:ignore diff --git a/vendor/jetpack-autoloader/class-plugin-locator.php b/vendor/jetpack-autoloader/class-plugin-locator.php index c20b4e8788..8d1c5e3a60 100644 --- a/vendor/jetpack-autoloader/class-plugin-locator.php +++ b/vendor/jetpack-autoloader/class-plugin-locator.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8\al3_0_2; +namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9\al3_0_2; // phpcs:ignore diff --git a/vendor/jetpack-autoloader/class-plugins-handler.php b/vendor/jetpack-autoloader/class-plugins-handler.php index 64a15f8377..07825a3173 100644 --- a/vendor/jetpack-autoloader/class-plugins-handler.php +++ b/vendor/jetpack-autoloader/class-plugins-handler.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8\al3_0_2; +namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9\al3_0_2; // phpcs:ignore diff --git a/vendor/jetpack-autoloader/class-shutdown-handler.php b/vendor/jetpack-autoloader/class-shutdown-handler.php index 3cc62e79ef..ed80ea5dae 100644 --- a/vendor/jetpack-autoloader/class-shutdown-handler.php +++ b/vendor/jetpack-autoloader/class-shutdown-handler.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8\al3_0_2; +namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9\al3_0_2; // phpcs:ignore diff --git a/vendor/jetpack-autoloader/class-version-loader.php b/vendor/jetpack-autoloader/class-version-loader.php index ba29774d53..bc315588a5 100644 --- a/vendor/jetpack-autoloader/class-version-loader.php +++ b/vendor/jetpack-autoloader/class-version-loader.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8\al3_0_2; +namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9\al3_0_2; // phpcs:ignore diff --git a/vendor/jetpack-autoloader/class-version-selector.php b/vendor/jetpack-autoloader/class-version-selector.php index 7b8c840333..c71e4f3e3c 100644 --- a/vendor/jetpack-autoloader/class-version-selector.php +++ b/vendor/jetpack-autoloader/class-version-selector.php @@ -5,7 +5,7 @@ * @package automattic/jetpack-autoloader */ -namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_8\al3_0_2; +namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9\al3_0_2; // phpcs:ignore