diff --git a/_inc/blocks/editor-beta.asset.php b/_inc/blocks/editor-beta.asset.php index e9ef407b73..6f4bd5503e 100644 --- a/_inc/blocks/editor-beta.asset.php +++ b/_inc/blocks/editor-beta.asset.php @@ -1 +1 @@ - array('jetpack-connection', 'jetpack-script-data', 'lodash', 'moment', 'react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-commands', '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-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => 'd0196c50995b58e4c544'); + array('jetpack-connection', 'jetpack-script-data', 'lodash', 'moment', 'react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-serialization-default-parser', 'wp-blocks', 'wp-commands', '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-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-widgets', 'wp-wordcount'), 'version' => '5e98fdf3e305cfefe90e'); diff --git a/_inc/blocks/editor-beta.js b/_inc/blocks/editor-beta.js index d3d743fd3c..382a983881 100644 --- a/_inc/blocks/editor-beta.js +++ b/_inc/blocks/editor-beta.js @@ -1,154 +1,154 @@ /*! For license information please see editor-beta.js.LICENSE.txt */ -(()=>{var e,t,n,a,r={7675:(e,t,n)=>{"use strict";n.d(t,{y:()=>l});var a=n(76416),r=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r{const v=Object.assign({},l);let b;function k(){b.abort(),document.hidden||A()}v.accept||(v.accept=s),h||document.addEventListener("visibilitychange",k);let y=o,E=0;function w(){document.removeEventListener("visibilitychange",k),window.clearTimeout(E),b.abort()}null==n||n.addEventListener("abort",(()=>{w(),t()}));const _=null!=g?g:window.fetch,C=null!=u?u:c;async function A(){var n;b=new AbortController;try{const n=await _(e,Object.assign(Object.assign({},f),{headers:v,signal:b.signal}));await C(n),await(0,a.q5)(n.body,(0,a.iv)((0,a.VL)((e=>{e?v[i]=e:delete v[i]}),(e=>{y=e}),d))),null==p||p(),w(),t()}catch(e){if(!b.signal.aborted)try{const t=null!==(n=null==m?void 0:m(e))&&void 0!==n?n:y;window.clearTimeout(E),E=window.setTimeout(A,t)}catch(e){w(),r(e)}}}A()}))}function c(e){const t=e.headers.get("content-type");if(!(null==t?void 0:t.startsWith(s)))throw new Error(`Expected content-type to be ${s}, Actual: ${t}`)}},76416:(e,t,n)=>{"use strict";async function a(e,t){const n=e.getReader();let a;for(;!(a=await n.read()).done;)t(a.value)}function r(e){let t,n,a,r=!1;return function(s){void 0===t?(t=s,n=0,a=-1):t=function(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(t,s);const o=t.length;let i=0;for(;n0){const n=r.decode(s.subarray(0,i)),o=i+(32===s[i+1]?2:1),l=r.decode(s.subarray(o));switch(n){case"data":a.data=a.data?a.data+"\n"+l:l;break;case"event":a.event=l;break;case"id":e(a.id=l);break;case"retry":const n=parseInt(l,10);isNaN(n)||t(a.retry=n)}}}}function o(){return{data:"",event:"",id:"",retry:void 0}}n.d(t,{VL:()=>s,iv:()=>r,q5:()=>a})},95723:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(84265);let r,s,o,i;const l=/<(\/)?(\w+)\s*(\/)?>/g;function c(e,t,n,a,r){return{element:e,tokenStart:t,tokenLength:n,prevOffset:a,leadingTextStart:r,children:[]}}const u=e=>{const t="object"==typeof e,n=t&&Object.values(e);return t&&n.length&&n.every((e=>(0,a.isValidElement)(e)))};function d(e){const t=function(){const e=l.exec(r);if(null===e)return["no-more-tokens"];const t=e.index,[n,a,s,o]=e,i=n.length;if(o)return["self-closed",s,t,i];if(a)return["closer",s,t,i];return["opener",s,t,i]}(),[n,u,d,h]=t,g=i.length,f=d>s?s:null;if(!e[u])return p(),!1;switch(n){case"no-more-tokens":if(0!==g){const{leadingTextStart:e,tokenStart:t}=i.pop();o.push(r.substr(e,t))}return p(),!1;case"self-closed":return 0===g?(null!==f&&o.push(r.substr(f,d-f)),o.push(e[u]),s=d+h,!0):(m(c(e[u],d,h)),s=d+h,!0);case"opener":return i.push(c(e[u],d,h,d+h,f)),s=d+h,!0;case"closer":if(1===g)return function(e){const{element:t,leadingTextStart:n,prevOffset:s,tokenStart:l,children:c}=i.pop(),u=e?r.substr(s,e-s):r.substr(s);u&&c.push(u);null!==n&&o.push(r.substr(n,l-n));o.push((0,a.cloneElement)(t,null,...c))}(d),s=d+h,!0;const t=i.pop(),n=r.substr(t.prevOffset,d-t.prevOffset);t.children.push(n),t.prevOffset=d+h;const l=c(t.element,t.tokenStart,t.tokenLength,d+h);return l.children=t.children,m(l),s=d+h,!0;default:return p(),!1}}function p(){const e=r.length-s;0!==e&&o.push(r.substr(s,e))}function m(e){const{element:t,tokenStart:n,tokenLength:s,prevOffset:o,children:l}=e,c=i[i.length-1],u=r.substr(c.prevOffset,n-c.prevOffset);u&&c.children.push(u),c.children.push((0,a.cloneElement)(t,null,...l)),c.prevOffset=o||n+s}t.default=(e,t)=>{if(r=e,s=0,o=[],i=[],l.lastIndex=0,!u(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are React Elements");do{}while(d(t));return(0,a.createElement)(a.Fragment,null,...o)}},82170:(e,t,n)=>{"use strict";var a=n(98504);Object.defineProperty(t,"__esModule",{value:!0});var r={createInterpolateElement:!0,Platform:!0,renderToString:!0,RawHTML:!0};Object.defineProperty(t,"Platform",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"RawHTML",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"createInterpolateElement",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"renderToString",{enumerable:!0,get:function(){return u.default}});var s=a(n(95723)),o=n(84265);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var i=n(81649);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var l=n(98219);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var c=a(n(52595)),u=a(n(54852)),d=a(n(94468))},52595:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={OS:"web",select:e=>"web"in e?e.web:e.default,isWeb:!0}},94468:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({children:e,...t}){let n="";return a.Children.toArray(e).forEach((e=>{"string"==typeof e&&""!==e.trim()&&(n+=e)})),(0,a.createElement)("div",{dangerouslySetInnerHTML:{__html:n},...t})};var a=n(84265)},81649:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createPortal",{enumerable:!0,get:function(){return a.createPortal}}),Object.defineProperty(t,"createRoot",{enumerable:!0,get:function(){return r.createRoot}}),Object.defineProperty(t,"findDOMNode",{enumerable:!0,get:function(){return a.findDOMNode}}),Object.defineProperty(t,"flushSync",{enumerable:!0,get:function(){return a.flushSync}}),Object.defineProperty(t,"hydrate",{enumerable:!0,get:function(){return a.hydrate}}),Object.defineProperty(t,"hydrateRoot",{enumerable:!0,get:function(){return r.hydrateRoot}}),Object.defineProperty(t,"render",{enumerable:!0,get:function(){return a.render}}),Object.defineProperty(t,"unmountComponentAtNode",{enumerable:!0,get:function(){return a.unmountComponentAtNode}});var a=n(75795),r=n(18950)},84265:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Children",{enumerable:!0,get:function(){return a.Children}}),Object.defineProperty(t,"Component",{enumerable:!0,get:function(){return a.Component}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return a.Fragment}}),Object.defineProperty(t,"PureComponent",{enumerable:!0,get:function(){return a.PureComponent}}),Object.defineProperty(t,"StrictMode",{enumerable:!0,get:function(){return a.StrictMode}}),Object.defineProperty(t,"Suspense",{enumerable:!0,get:function(){return a.Suspense}}),Object.defineProperty(t,"cloneElement",{enumerable:!0,get:function(){return a.cloneElement}}),t.concatChildren=function(...e){return e.reduce(((e,t,n)=>(a.Children.forEach(t,((t,r)=>{t&&"string"!=typeof t&&(t=(0,a.cloneElement)(t,{key:[n,r].join()})),e.push(t)})),e)),[])},Object.defineProperty(t,"createContext",{enumerable:!0,get:function(){return a.createContext}}),Object.defineProperty(t,"createElement",{enumerable:!0,get:function(){return a.createElement}}),Object.defineProperty(t,"createRef",{enumerable:!0,get:function(){return a.createRef}}),Object.defineProperty(t,"forwardRef",{enumerable:!0,get:function(){return a.forwardRef}}),Object.defineProperty(t,"isValidElement",{enumerable:!0,get:function(){return a.isValidElement}}),Object.defineProperty(t,"lazy",{enumerable:!0,get:function(){return a.lazy}}),Object.defineProperty(t,"memo",{enumerable:!0,get:function(){return a.memo}}),Object.defineProperty(t,"startTransition",{enumerable:!0,get:function(){return a.startTransition}}),t.switchChildrenNodeName=function(e,t){return e&&a.Children.map(e,((e,n)=>{if("string"==typeof e?.valueOf())return(0,a.createElement)(t,{key:n},e);const{children:r,...s}=e.props;return(0,a.createElement)(t,{key:n,...s},r)}))},Object.defineProperty(t,"useCallback",{enumerable:!0,get:function(){return a.useCallback}}),Object.defineProperty(t,"useContext",{enumerable:!0,get:function(){return a.useContext}}),Object.defineProperty(t,"useDebugValue",{enumerable:!0,get:function(){return a.useDebugValue}}),Object.defineProperty(t,"useDeferredValue",{enumerable:!0,get:function(){return a.useDeferredValue}}),Object.defineProperty(t,"useEffect",{enumerable:!0,get:function(){return a.useEffect}}),Object.defineProperty(t,"useId",{enumerable:!0,get:function(){return a.useId}}),Object.defineProperty(t,"useImperativeHandle",{enumerable:!0,get:function(){return a.useImperativeHandle}}),Object.defineProperty(t,"useInsertionEffect",{enumerable:!0,get:function(){return a.useInsertionEffect}}),Object.defineProperty(t,"useLayoutEffect",{enumerable:!0,get:function(){return a.useLayoutEffect}}),Object.defineProperty(t,"useMemo",{enumerable:!0,get:function(){return a.useMemo}}),Object.defineProperty(t,"useReducer",{enumerable:!0,get:function(){return a.useReducer}}),Object.defineProperty(t,"useRef",{enumerable:!0,get:function(){return a.useRef}}),Object.defineProperty(t,"useState",{enumerable:!0,get:function(){return a.useState}}),Object.defineProperty(t,"useSyncExternalStore",{enumerable:!0,get:function(){return a.useSyncExternalStore}}),Object.defineProperty(t,"useTransition",{enumerable:!0,get:function(){return a.useTransition}});var a=n(51609)},54852:(e,t,n)=>{"use strict";var a=n(98504);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.hasPrefix=v,t.renderAttributes=R,t.renderComponent=S,t.renderElement=x,t.renderNativeComponent=j,t.renderStyle=P;var r=n(21214),s=n(61433),o=n(89877),i=n(84265),l=a(n(94468));const{Provider:c,Consumer:u}=(0,i.createContext)(void 0),d=(0,i.forwardRef)((()=>null)),p=new Set(["string","boolean","number"]),m=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),h=new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),g=new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),f=new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);function v(e,t){return t.some((t=>0===e.indexOf(t)))}function b(e){return"key"===e||"children"===e}function k(e,t){return"style"===e?P(t):t}const y=["accentHeight","alignmentBaseline","arabicForm","baselineShift","capHeight","clipPath","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","dominantBaseline","enableBackground","fillOpacity","fillRule","floodColor","floodOpacity","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","horizAdvX","horizOriginX","imageRendering","letterSpacing","lightingColor","markerEnd","markerMid","markerStart","overlinePosition","overlineThickness","paintOrder","panose1","pointerEvents","renderingIntent","shapeRendering","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","textAnchor","textDecoration","textRendering","underlinePosition","underlineThickness","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","vectorEffect","vertAdvY","vertOriginX","vertOriginY","wordSpacing","writingMode","xmlnsXlink","xHeight"].reduce(((e,t)=>(e[t.toLowerCase()]=t,e)),{}),E=["allowReorder","attributeName","attributeType","autoReverse","baseFrequency","baseProfile","calcMode","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","suppressContentEditableWarning","suppressHydrationWarning","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector"].reduce(((e,t)=>(e[t.toLowerCase()]=t,e)),{}),w=["xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xml:space","xmlns:xlink"].reduce(((e,t)=>(e[t.replace(":","").toLowerCase()]=t,e)),{});function _(e){switch(e){case"htmlFor":return"for";case"className":return"class"}const t=e.toLowerCase();return E[t]?E[t]:y[t]?(0,s.paramCase)(y[t]):w[t]?w[t]:t}function C(e){return e.startsWith("--")?e:v(e,["ms","O","Moz","Webkit"])?"-"+(0,s.paramCase)(e):(0,s.paramCase)(e)}function A(e,t){return"number"!=typeof t||0===t||f.has(e)?t:t+"px"}function x(e,t,n={}){if(null==e||!1===e)return"";if(Array.isArray(e))return N(e,t,n);switch(typeof e){case"string":return(0,o.escapeHTML)(e);case"number":return e.toString()}const{type:a,props:r}=e;switch(a){case i.StrictMode:case i.Fragment:return N(r.children,t,n);case l.default:const{children:e,...a}=r;return j(Object.keys(a).length?"div":null,{...a,dangerouslySetInnerHTML:{__html:e}},t,n)}switch(typeof a){case"string":return j(a,r,t,n);case"function":return a.prototype&&"function"==typeof a.prototype.render?S(a,r,t,n):x(a(r,n),t,n)}switch(a&&a.$$typeof){case c.$$typeof:return N(r.children,r.value,n);case u.$$typeof:return x(r.children(t||a._currentValue),t,n);case d.$$typeof:return x(a.render(r),t,n)}return""}function j(e,t,n,a={}){let r="";if("textarea"===e&&t.hasOwnProperty("value")){r=N(t.value,n,a);const{value:e,...s}=t;t=s}else t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html?r=t.dangerouslySetInnerHTML.__html:void 0!==t.children&&(r=N(t.children,n,a));if(!e)return r;const s=R(t);return m.has(e)?"<"+e+s+"/>":"<"+e+s+">"+r+""}function S(e,t,n,a={}){const r=new e(t,a);"function"==typeof r.getChildContext&&Object.assign(a,r.getChildContext());return x(r.render(),n,a)}function N(e,t,n={}){let a="";e=Array.isArray(e)?e:[e];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyElement=void 0;t.isEmptyElement=e=>"number"!=typeof e&&("string"==typeof e?.valueOf()||Array.isArray(e)?!e.length:!e)},51113:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(86087);const r=(0,a.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,a.cloneElement)(e,{width:t,height:t,...n,ref:r})}))},66955:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})})},62510:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})})},62599:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(a.Path,{d:"M12.5939 21C14.1472 21 16.1269 20.5701 17.0711 20.1975L16.6447 18.879C16.0964 19.051 14.3299 19.6242 12.6548 19.6242C7.4467 19.6242 4.67513 16.8726 4.67513 12C4.67513 7.21338 7.50762 4.34713 12.2893 4.34713C17.132 4.34713 19.4162 7.55732 19.4162 10.7675C19.4162 14.035 19.0508 15.4968 17.4975 15.4968C16.5838 15.4968 16.0964 14.7803 16.0964 13.9777V7.5H14.4822V8.30255H14.3909C14.1777 7.67198 12.9898 7.12739 11.467 7.2707C9.18274 7.5 7.4467 9.27707 7.4467 11.8567C7.4467 14.5796 8.81726 16.672 11.467 16.758C13.203 16.8153 14.1168 16.0127 14.4822 15.1815H14.5736C14.7563 16.414 16.401 16.8439 17.467 16.8439C20.6954 16.8439 21 13.5764 21 10.7962C21 6.86943 18.0761 3 12.3807 3C6.50254 3 3 6.3535 3 11.9427C3 17.7325 6.38071 21 12.5939 21ZM11.7107 15.2962C9.73096 15.2962 9.03046 13.6051 9.03046 11.7707C9.03046 10.1083 10.0355 8.67516 11.7716 8.67516C13.599 8.67516 14.5736 9.36306 14.5736 11.7707C14.5736 14.1497 13.7513 15.2962 11.7107 15.2962Z"})})},57003:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(a.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})})},27375:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(a.Path,{d:"M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z"})})},83883:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})})},64969:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(a.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})})},68888:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})})},29115:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})})},98248:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(a.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})})},31249:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})})},10991:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})})},24995:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zm-1.338 4.877c-.314.22-.412.452-.412.623 0 .171.098.403.412.623.312.218.783.377 1.338.377.825 0 1.605.233 2.198.648.59.414 1.052 1.057 1.052 1.852 0 .795-.461 1.438-1.052 1.852-.41.286-.907.486-1.448.582v.316a.75.75 0 01-1.5 0v-.316a3.64 3.64 0 01-1.448-.582c-.59-.414-1.052-1.057-1.052-1.852a.75.75 0 011.5 0c0 .171.098.403.412.623.312.218.783.377 1.338.377s1.026-.159 1.338-.377c.314-.22.412-.452.412-.623 0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377-.825 0-1.605-.233-2.198-.648-.59-.414-1.052-1.057-1.052-1.852 0-.795.461-1.438 1.052-1.852a3.64 3.64 0 011.448-.582V7.5a.75.75 0 011.5 0v.316c.54.096 1.039.296 1.448.582.59.414 1.052 1.057 1.052 1.852a.75.75 0 01-1.5 0c0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377s-1.026.159-1.338.377z"})})},93115:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})})},92687:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n(78938).A},53512:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})})},84066:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})})},19783:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})})},76277:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(a.Path,{d:"m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z"})})},84008:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(a.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"})})},21679:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsxs)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,r.jsx)(a.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,r.jsx)(a.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})]})},82065:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})})},78938:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})})},15788:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M15.5 9.5a1 1 0 100-2 1 1 0 000 2zm0 1.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm-2.25 6v-2a2.75 2.75 0 00-2.75-2.75h-4A2.75 2.75 0 003.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0120.25 15zM9.5 8.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z",fillRule:"evenodd"})})},45459:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})})},41417:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"})})},88669:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z"})})},69457:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})})},40502:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M7 7.2h8.2L13.5 9l1.1 1.1 3.6-3.6-3.5-4-1.1 1 1.9 2.3H7c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.2-.5zm13.8 4V11h-1.5v.3c0 1.1 0 3.5-1 4.5-.3.3-.7.5-1.3.5H8.8l1.7-1.7-1.1-1.1L5.9 17l3.5 4 1.1-1-1.9-2.3H17c.9 0 1.7-.3 2.3-.9 1.5-1.4 1.5-4.2 1.5-5.6z"})})},67709:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(a.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.332 5.748c-1.03-.426-2.06.607-1.632 1.636l1.702 3.93 7.481.575c.123.01.123.19 0 .2l-7.483.575-1.7 3.909c-.429 1.029.602 2.062 1.632 1.636l12.265-5.076c1.03-.426 1.03-1.884 0-2.31L6.332 5.748Z"})})},21955:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z"})})},90254:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M6.08 10.103h2.914L9.657 12h1.417L8.23 4H6.846L4 12h1.417l.663-1.897Zm1.463-4.137.994 2.857h-2l1.006-2.857ZM11 16H4v-1.5h7V16Zm1 0h8v-1.5h-8V16Zm-4 4H4v-1.5h4V20Zm7-1.5V20H9v-1.5h6Z"})})},50347:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M19.8 4h-1.5l1 8h1.5l-1-8ZM17 5.8c-.1-1-1-1.8-2-1.8H6.8c-.9 0-1.7.6-1.9 1.4l-1.8 6C2.7 12.7 3.7 14 5 14h4.4l-.8 3.6c-.3 1.3.7 2.4 1.9 2.4h.2c.6 0 1.2-.3 1.6-.8l5-6.6c.3-.4.5-.9.4-1.5L17 5.7Zm-.9 5.9-5 6.6c0 .1-.2.2-.4.2h-.2c-.3 0-.6-.3-.5-.6l.8-3.6c.1-.4 0-.9-.3-1.3s-.7-.6-1.2-.6H4.9c-.3 0-.6-.3-.5-.6l1.8-6c0-.2.3-.4.5-.4h8.2c.3 0 .5.2.5.4l.7 5.4v.4Z"})})},7598:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"m3 12 1 8h1.5l-1-8H3Zm15.8-2h-4.4l.8-3.6c.3-1.3-.7-2.4-1.9-2.4h-.2c-.6 0-1.2.3-1.6.8l-5 6.6c-.3.4-.4.8-.4 1.2v.2l.7 5.4v.2c.2.9 1 1.5 1.9 1.5h8.2c.9 0 1.7-.6 1.9-1.4l1.8-6c.4-1.3-.6-2.6-1.9-2.6Zm.5 2.1-1.8 6c0 .2-.3.4-.5.4H8.8c-.3 0-.5-.2-.5-.4l-.7-5.4v-.4l5-6.6c0-.1.2-.2.4-.2h.2c.3 0 .6.3.5.6l-.8 3.6c-.1.4 0 .9.3 1.3s.7.6 1.2.6h4.4c.3 0 .6.3.5.6Z"})})},11269:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z"})})},76673:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})})},95789:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})})},83822:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"m11.3 17.2-5-5c-.1-.1-.1-.3 0-.4l2.3-2.3-1.1-1-2.3 2.3c-.7.7-.7 1.8 0 2.5l5 5H7.5v1.5h5.3v-5.2h-1.5v2.6zm7.5-6.4-5-5h2.7V4.2h-5.2v5.2h1.5V6.8l5 5c.1.1.1.3 0 .4l-2.3 2.3 1.1 1.1 2.3-2.3c.6-.7.6-1.9-.1-2.5z"})})},7326:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(a.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})})},90311:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(5573),r=n(10790);const s=(0,r.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,r.jsx)(a.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"})})},51889:(e,t,n)=>{"use strict";n.d(t,{$4:()=>s,fZ:()=>o,xQ:()=>i});var a=n(54715),r=n(82769);function s(e,t){return 0===t?e.toLowerCase():(0,r.l3)(e,t)}function o(e,t){return 0===t?e.toLowerCase():(0,r.$7)(e)}function i(e,t){return void 0===t&&(t={}),(0,r.fL)(e,(0,a.Cl)({transform:s},t))}},91859:(e,t,n)=>{"use strict";n.d(t,{D:()=>i,f:()=>o});var a=n(54715),r=n(2532),s=n(21644);function o(e){return(0,s.R)(e.toLowerCase())}function i(e,t){return void 0===t&&(t={}),(0,r.W)(e,(0,a.Cl)({delimiter:" ",transform:o},t))}},61433:(e,t,n)=>{"use strict";n.r(t),n.d(t,{camelCase:()=>a.xQ,camelCaseTransform:()=>a.$4,camelCaseTransformMerge:()=>a.fZ,capitalCase:()=>r.D,capitalCaseTransform:()=>r.f,constantCase:()=>s.F,dotCase:()=>o.a,headerCase:()=>i.u,noCase:()=>l.W,paramCase:()=>c.c,pascalCase:()=>u.fL,pascalCaseTransform:()=>u.l3,pascalCaseTransformMerge:()=>u.$7,pathCase:()=>d.y,sentenceCase:()=>p.o,sentenceCaseTransform:()=>p.u,snakeCase:()=>m.L});var a=n(51889),r=n(91859),s=n(55633),o=n(19382),i=n(22774),l=n(2532),c=n(74572),u=n(82769),d=n(70320),p=n(82682),m=n(68963)},55633:(e,t,n)=>{"use strict";n.d(t,{F:()=>o});var a=n(54715),r=n(2532),s=n(88415);function o(e,t){return void 0===t&&(t={}),(0,r.W)(e,(0,a.Cl)({delimiter:"_",transform:s.l},t))}},87399:e=>{!function(){"use strict";var t=[],n=3988292384;function a(e){var t,a,r,s,o=-1;for(t=0,r=e.length;t>>=1:s=s>>>1^n;o=o>>>8^s}return~o}function r(e,n){var a,s,o;if(void 0!==r.crc&&n&&e||(r.crc=~0,e)){for(a=r.crc,s=0,o=e.length;s>>8^t[255&(a^e[s])];return r.crc=a,~a}}!function(){var e,a,r;for(a=0;a<256;a+=1){for(e=a,r=0;r<8;r+=1)1&e?e=n^e>>>1:e>>>=1;t[a]=e>>>0}}(),e.exports=function(e,t){var n;e="string"==typeof e?(n=e,Array.prototype.map.call(n,(function(e){return e.charCodeAt(0)}))):e;return((t?a(e):r(e))>>>0).toString(16)},e.exports.direct=a,e.exports.table=r}()},51601:function(e,t,n){var a;e.exports=(a=a||function(e,t){var a;if("undefined"!=typeof window&&window.crypto&&(a=window.crypto),"undefined"!=typeof self&&self.crypto&&(a=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(a=globalThis.crypto),!a&&"undefined"!=typeof window&&window.msCrypto&&(a=window.msCrypto),!a&&"undefined"!=typeof window&&window.crypto&&(a=window.crypto),!a)try{a=n(42305)}catch(e){}var r=function(){if(a){if("function"==typeof a.getRandomValues)try{return a.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof a.randomBytes)try{return a.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},i=o.lib={},l=i.Base={extend:function(e){var t=s(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=i.WordArray=l.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,n=e.words,a=this.sigBytes,r=e.sigBytes;if(this.clamp(),a%4)for(var s=0;s>>2]>>>24-s%4*8&255;t[a+s>>>2]|=o<<24-(a+s)%4*8}else for(var i=0;i>>2]=n[i>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=l.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n>>2]>>>24-r%4*8&255;a.push((s>>>4).toString(16)),a.push((15&s).toString(16))}return a.join("")},parse:function(e){for(var t=e.length,n=[],a=0;a>>3]|=parseInt(e.substr(a,2),16)<<24-a%8*4;return new c.init(n,t/2)}},p=u.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,a=[],r=0;r>>2]>>>24-r%4*8&255;a.push(String.fromCharCode(s))}return a.join("")},parse:function(e){for(var t=e.length,n=[],a=0;a>>2]|=(255&e.charCodeAt(a))<<24-a%4*8;return new c.init(n,t)}},m=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(p.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return p.parse(unescape(encodeURIComponent(e)))}},h=i.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=m.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,a=this._data,r=a.words,s=a.sigBytes,o=this.blockSize,i=s/(4*o),l=(i=t?e.ceil(i):e.max((0|i)-this._minBufferSize,0))*o,u=e.min(4*l,s);if(l){for(var d=0;d>>24)|4278255360&(r<<24|r>>>8)}var s=this._hash.words,o=e[t+0],l=e[t+1],m=e[t+2],h=e[t+3],g=e[t+4],f=e[t+5],v=e[t+6],b=e[t+7],k=e[t+8],y=e[t+9],E=e[t+10],w=e[t+11],_=e[t+12],C=e[t+13],A=e[t+14],x=e[t+15],j=s[0],S=s[1],N=s[2],R=s[3];j=c(j,S,N,R,o,7,i[0]),R=c(R,j,S,N,l,12,i[1]),N=c(N,R,j,S,m,17,i[2]),S=c(S,N,R,j,h,22,i[3]),j=c(j,S,N,R,g,7,i[4]),R=c(R,j,S,N,f,12,i[5]),N=c(N,R,j,S,v,17,i[6]),S=c(S,N,R,j,b,22,i[7]),j=c(j,S,N,R,k,7,i[8]),R=c(R,j,S,N,y,12,i[9]),N=c(N,R,j,S,E,17,i[10]),S=c(S,N,R,j,w,22,i[11]),j=c(j,S,N,R,_,7,i[12]),R=c(R,j,S,N,C,12,i[13]),N=c(N,R,j,S,A,17,i[14]),j=u(j,S=c(S,N,R,j,x,22,i[15]),N,R,l,5,i[16]),R=u(R,j,S,N,v,9,i[17]),N=u(N,R,j,S,w,14,i[18]),S=u(S,N,R,j,o,20,i[19]),j=u(j,S,N,R,f,5,i[20]),R=u(R,j,S,N,E,9,i[21]),N=u(N,R,j,S,x,14,i[22]),S=u(S,N,R,j,g,20,i[23]),j=u(j,S,N,R,y,5,i[24]),R=u(R,j,S,N,A,9,i[25]),N=u(N,R,j,S,h,14,i[26]),S=u(S,N,R,j,k,20,i[27]),j=u(j,S,N,R,C,5,i[28]),R=u(R,j,S,N,m,9,i[29]),N=u(N,R,j,S,b,14,i[30]),j=d(j,S=u(S,N,R,j,_,20,i[31]),N,R,f,4,i[32]),R=d(R,j,S,N,k,11,i[33]),N=d(N,R,j,S,w,16,i[34]),S=d(S,N,R,j,A,23,i[35]),j=d(j,S,N,R,l,4,i[36]),R=d(R,j,S,N,g,11,i[37]),N=d(N,R,j,S,b,16,i[38]),S=d(S,N,R,j,E,23,i[39]),j=d(j,S,N,R,C,4,i[40]),R=d(R,j,S,N,o,11,i[41]),N=d(N,R,j,S,h,16,i[42]),S=d(S,N,R,j,v,23,i[43]),j=d(j,S,N,R,y,4,i[44]),R=d(R,j,S,N,_,11,i[45]),N=d(N,R,j,S,x,16,i[46]),j=p(j,S=d(S,N,R,j,m,23,i[47]),N,R,o,6,i[48]),R=p(R,j,S,N,b,10,i[49]),N=p(N,R,j,S,A,15,i[50]),S=p(S,N,R,j,f,21,i[51]),j=p(j,S,N,R,_,6,i[52]),R=p(R,j,S,N,h,10,i[53]),N=p(N,R,j,S,E,15,i[54]),S=p(S,N,R,j,l,21,i[55]),j=p(j,S,N,R,k,6,i[56]),R=p(R,j,S,N,x,10,i[57]),N=p(N,R,j,S,v,15,i[58]),S=p(S,N,R,j,C,21,i[59]),j=p(j,S,N,R,g,6,i[60]),R=p(R,j,S,N,w,10,i[61]),N=p(N,R,j,S,m,15,i[62]),S=p(S,N,R,j,y,21,i[63]),s[0]=s[0]+j|0,s[1]=s[1]+S|0,s[2]=s[2]+N|0,s[3]=s[3]+R|0},_doFinalize:function(){var t=this._data,n=t.words,a=8*this._nDataBytes,r=8*t.sigBytes;n[r>>>5]|=128<<24-r%32;var s=e.floor(a/4294967296),o=a;n[15+(r+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),n[14+(r+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(n.length+1),this._process();for(var i=this._hash,l=i.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return i},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,a,r,s,o){var i=e+(t&n|~t&a)+r+o;return(i<>>32-s)+t}function u(e,t,n,a,r,s,o){var i=e+(t&a|n&~a)+r+o;return(i<>>32-s)+t}function d(e,t,n,a,r,s,o){var i=e+(t^n^a)+r+o;return(i<>>32-s)+t}function p(e,t,n,a,r,s,o){var i=e+(n^(t|~a))+r+o;return(i<>>32-s)+t}t.MD5=s._createHelper(l),t.HmacMD5=s._createHmacHelper(l)}(Math),a.MD5)},19382:(e,t,n)=>{"use strict";n.d(t,{a:()=>s});var a=n(54715),r=n(2532);function s(e,t){return void 0===t&&(t={}),(0,r.W)(e,(0,a.Cl)({delimiter:"."},t))}},39904:(e,t)=>{"use strict";var n=/^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;t.validate=function(e){if(!e)return!1;if(e.length>254)return!1;if(!n.test(e))return!1;var t=e.split("@");return!(t[0].length>64)&&!t[1].split(".").some((function(e){return e.length>63}))}},2467:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,a=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(n,a){function r(n){e.removeListener(t,s),a(n)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",r),n([].slice.call(arguments))}g(e,t,s,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,n)}(e,r,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function i(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function c(e,t,n,a){var r,s,o,c;if(i(n),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),o=s[t]),void 0===o)o=s[t]=n,++e._eventsCount;else if("function"==typeof o?o=s[t]=a?[n,o]:[o,n]:a?o.unshift(n):o.push(n),(r=l(e))>0&&o.length>r&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var a={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=u.bind(a);return r.listener=n,a.wrapFn=r,r}function p(e,t,n){var a=e._events;if(void 0===a)return[];var r=a[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(o=t[0]),o instanceof Error)throw o;var i=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw i.context=o,i}var l=s[e];if(void 0===l)return!1;if("function"==typeof l)a(l,this,t);else{var c=l.length,u=h(l,c);for(n=0;n=0;s--)if(n[s]===t||n[s].listener===t){o=n[s].listener,r=s;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1=0;a--)this.removeListener(e,t[a]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},22774:(e,t,n)=>{"use strict";n.d(t,{u:()=>s});var a=n(54715),r=n(91859);function s(e,t){return void 0===t&&(t={}),(0,r.D)(e,(0,a.Cl)({delimiter:"-"},t))}},58314:e=>{e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},21214:(e,t)=>{"use strict";function n(e){return"[object Object]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=function(e){var t,a;return!1!==n(e)&&(void 0===(t=e.constructor)||!1!==n(a=t.prototype)&&!1!==a.hasOwnProperty("isPrototypeOf"))}},49475:function(e,t){var n,a;a="undefined"!=typeof self?self:"undefined"!=typeof window||"undefined"!=typeof window?window:this,e.exports=function(a){"use strict";var r,s=(a=a||{}).Base64,o="2.6.4",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=function(e){for(var t={},n=0,a=e.length;n>>6)+c(128|63&t):c(224|t>>>12&15)+c(128|t>>>6&63)+c(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return c(240|t>>>18&7)+c(128|t>>>12&63)+c(128|t>>>6&63)+c(128|63&t)},d=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,p=function(e){return e.replace(d,u)},m=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[i.charAt(n>>>18),i.charAt(n>>>12&63),t>=2?"=":i.charAt(n>>>6&63),t>=1?"=":i.charAt(63&n)].join("")},h=a.btoa&&"function"==typeof a.btoa?function(e){return a.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,m)},g=function(e){return h(p(String(e)))},f=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},v=function(e,t){return t?f(g(e)):g(e)},b=function(e){return v(e,!0)};a.Uint8Array&&(r=function(e,t){for(var n="",a=0,r=e.length;a>>18)+i.charAt(c>>>12&63)+(void 0!==o?i.charAt(c>>>6&63):"=")+(void 0!==l?i.charAt(63&c):"=")}return t?f(n):n});var k,y=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,E=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return c(55296+(t>>>10))+c(56320+(1023&t));case 3:return c((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return c((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},w=function(e){return e.replace(y,E)},_=function(e){var t=e.length,n=t%4,a=(t>0?l[e.charAt(0)]<<18:0)|(t>1?l[e.charAt(1)]<<12:0)|(t>2?l[e.charAt(2)]<<6:0)|(t>3?l[e.charAt(3)]:0),r=[c(a>>>16),c(a>>>8&255),c(255&a)];return r.length-=[0,0,2,1][n],r.join("")},C=a.atob&&"function"==typeof a.atob?function(e){return a.atob(e)}:function(e){return e.replace(/\S{1,4}/g,_)},A=function(e){return C(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},x=function(e){return w(C(e))},j=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},S=function(e){return x(j(e))};a.Uint8Array&&(k=function(e){return Uint8Array.from(A(j(e)),(function(e){return e.charCodeAt(0)}))});var N=function(){var e=a.Base64;return a.Base64=s,e};if(a.Base64={VERSION:o,atob:A,btoa:h,fromBase64:S,toBase64:v,utob:p,encode:v,encodeURI:b,btou:w,decode:S,noConflict:N,fromUint8Array:r,toUint8Array:k},"function"==typeof Object.defineProperty){var R=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};a.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",R((function(){return S(this)}))),Object.defineProperty(String.prototype,"toBase64",R((function(e){return v(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",R((function(){return v(this,!0)})))}}return a.Meteor&&(Base64=a.Base64),e.exports?e.exports.Base64=a.Base64:void 0===(n=function(){return a.Base64}.apply(t,[]))||(e.exports=n),{Base64:a.Base64}}(a)},25700:(e,t,n)=>{"use strict";n.d(t,{g:()=>a});function a(e){return e.toLowerCase()}},20305:e=>{"use strict";function t(e,t,n,a){var r=Number(e[t].meta.id+1).toString(),s="";return"string"==typeof a.docId&&(s="-"+a.docId+"-"),s+r}function n(e,t){var n=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(n+=":"+e[t].meta.subId),"["+n+"]"}function a(e,t,n,a,r){var s=r.rules.footnote_anchor_name(e,t,n,a,r),o=r.rules.footnote_caption(e,t,n,a,r),i=s;return e[t].meta.subId>0&&(i+=":"+e[t].meta.subId),''+o+""}function r(e,t,n){return(n.xhtmlOut?'
\n':'
\n')+'
\n
    \n'}function s(){return"
\n
\n"}function o(e,t,n,a,r){var s=r.rules.footnote_anchor_name(e,t,n,a,r);return e[t].meta.subId>0&&(s+=":"+e[t].meta.subId),'
  • '}function i(){return"
  • \n"}function l(e,t,n,a,r){var s=r.rules.footnote_anchor_name(e,t,n,a,r);return e[t].meta.subId>0&&(s+=":"+e[t].meta.subId),' ↩︎'}e.exports=function(e){var c=e.helpers.parseLinkLabel,u=e.utils.isSpace;e.renderer.rules.footnote_ref=a,e.renderer.rules.footnote_block_open=r,e.renderer.rules.footnote_block_close=s,e.renderer.rules.footnote_open=o,e.renderer.rules.footnote_close=i,e.renderer.rules.footnote_anchor=l,e.renderer.rules.footnote_caption=n,e.renderer.rules.footnote_anchor_name=t,e.block.ruler.before("reference","footnote_def",(function(e,t,n,a){var r,s,o,i,l,c,d,p,m,h,g,f=e.bMarks[t]+e.tShift[t],v=e.eMarks[t];if(f+4>v)return!1;if(91!==e.src.charCodeAt(f))return!1;if(94!==e.src.charCodeAt(f+1))return!1;for(l=f+2;l=v||58!==e.src.charCodeAt(++l))return!1;if(a)return!0;for(l++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),c=e.src.slice(f+2,l-2),e.env.footnotes.refs[":"+c]=-1,(d=new e.Token("footnote_reference_open","",1)).meta={label:c},d.level=e.level++,e.tokens.push(d),r=e.bMarks[t],s=e.tShift[t],o=e.sCount[t],i=e.parentType,g=l,p=m=e.sCount[t]+l-(e.bMarks[t]+e.tShift[t]);l=o)&&(94===e.src.charCodeAt(i)&&(91===e.src.charCodeAt(i+1)&&(n=i+2,!((a=c(e,i+1))<0)&&(t||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),r=e.env.footnotes.list.length,e.md.inline.parse(e.src.slice(n,a),e.md,e.env,s=[]),e.push("footnote_ref","",0).meta={id:r},e.env.footnotes.list[r]={content:e.src.slice(n,a),tokens:s}),e.pos=a+1,e.posMax=o,!0))))})),e.inline.ruler.after("footnote_inline","footnote_ref",(function(e,t){var n,a,r,s,o=e.posMax,i=e.pos;if(i+3>o)return!1;if(!e.env.footnotes||!e.env.footnotes.refs)return!1;if(91!==e.src.charCodeAt(i))return!1;if(94!==e.src.charCodeAt(i+1))return!1;for(a=i+2;a=o)&&(a++,n=e.src.slice(i+2,a-1),void 0!==e.env.footnotes.refs[":"+n]&&(t||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+n]<0?(r=e.env.footnotes.list.length,e.env.footnotes.list[r]={label:n,count:0},e.env.footnotes.refs[":"+n]=r):r=e.env.footnotes.refs[":"+n],s=e.env.footnotes.list[r].count,e.env.footnotes.list[r].count++,e.push("footnote_ref","",0).meta={id:r,subId:s,label:n}),e.pos=a,e.posMax=o,!0)))})),e.core.ruler.after("inline","footnote_tail",(function(e){var t,n,a,r,s,o,i,l,c,u,d=!1,p={};if(e.env.footnotes&&(e.tokens=e.tokens.filter((function(e){return"footnote_reference_open"===e.type?(d=!0,c=[],u=e.meta.label,!1):"footnote_reference_close"===e.type?(d=!1,p[":"+u]=c,!1):(d&&c.push(e),!d)})),e.env.footnotes.list)){for(o=e.env.footnotes.list,i=new e.Token("footnote_block_open","",1),e.tokens.push(i),t=0,n=o.length;t0?o[t].count:1,a=0;a{},34436:()=>{},19994:()=>{},59835:()=>{},18546:()=>{},7628:()=>{},87748:()=>{},53290:()=>{},15583:()=>{},81500:()=>{},88904:()=>{},34006:()=>{},57482:()=>{},7683:()=>{},9944:()=>{},38742:()=>{},9383:()=>{},44288:()=>{},39653:()=>{},26075:()=>{},25634:()=>{},49488:()=>{},34229:()=>{},54447:()=>{},19569:()=>{},65486:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={container:"demNsMJjhi7BLY7xhjU5","icon-wrapper":"QiUjdjJSkqh6nH7YMG5A","is-error":"Q080AHcq29J2fc68Hhk5",icon:"hYWbIwhppukXmGnsiT9H","is-warning":"JjHuxWly0HI9C60gorbq","is-info":"Cm8ZFHi3mngl4cj9Gatx","is-success":"ytGBsU015p3LGwOPwFDx"}},77560:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={button:"zI5tJ_qhWE6Oe6Lk75GY","is-icon-button":"tuBt2DLqimiImoqVzPqo",small:"Na39I683LAaSA99REg14",normal:"ipS7tKy9GntCS4R3vekF",icon:"paGLQwtPEaJmtArCcmyK",regular:"lZAo6_oGfclXOO9CC6Rd","full-width":"xJDOiJxTt0R_wSl8Ipz_",loading:"q_tVWqMjl39RcY6WtQA6","external-icon":"CDuBjJp_8jxzx5j6Nept"}},4459:()=>{},84813:()=>{},47842:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={"star-icon":"cuoSlhSNrqf1dozY22Xb",jetpack:"lAIiifeLMmZAPlQ9n9ZR","checkmark-icon":"JLquNpQVlysAamuh5lJO",socialIcon:"cbOwD8Y4tFjwimmtchQI",bluesky:"aLWBKY0yRghEk7tNCgK3",facebook:"aHOlEBGD5EA8NKRw3xTw",instagram:"cL3m0xBYTYhIKI7lCqDB",twitter:"af4Y_zItXvLAOEoSDPSv",linkedin:"f68aqF3XSD1OBvXR1get",tumblr:"xFI0dt3UiXRlRQdqPWkx",google:"q7JEoyymveP6kF747M43",mastodon:"DKOBOTVmTLbh26gUH_73",nextdoor:"n5XodNsuMfMAAvqHFmbw",whatsapp:"fftumuc_lJ6v0tq4UMVR",threads:"inzgC27qxdt7hSdhTWRI"}},59053:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)"}},47876:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={placeholder:"NisihrgiIKl_knpYJtfg",pulse:"R2i0K45dEF157drbVRPI"}},16024:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={container:"VHYulMcpzbr10HWR0iSE","icon-wrapper":"FGpSkMCiIHQjszcV0dbn","close-button":"KoWZcCwhW13xvkEb0QON","main-content":"smrfczkC53EaFM8OJUXs",title:"IKYRWoPwt9xOVEx1wzNS","action-bar":"qM0qY6mPYp1MPN54A3Kg","is-error":"A5YkDkkXuiYgavrY6Nux",icon:"y_IPyP1wIAOhyNaqvXJq","is-warning":"cT5rwuPMZzWvi5o6shMl","is-info":"yo0O3uvNomPsYUXFCpAS","is-success":"oZdDFf1jBLkzn5ICCC6x"}},85335:()=>{},22073:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={reset:"WQVtrU6q0L1Igcj7wCrQ","headline-medium":"UujoBFTnQNY2cWU2SIsH","headline-small":"TeGO5V_thHw5lDAm1_2M","headline-small-regular":"WolQzb2MsSgiNmLtc7_j","title-medium":"hUB0JT8p1T2Hw28N6qC8","title-medium-semi-bold":"gKZWDv5chz3_O3Syp74H","title-small":"zY2No8Ga4b8shbOQGhnv",body:"tIj0D1t8Cc892ikmgFPZ","body-small":"KdcN0BnOaVeVhyLRKqhS","body-extra-small":"dso3Rh3tl3Xv1GumBktz","body-extra-small-bold":"mQ1UlbN9u4Mg9byO8m7v",label:"PItlW5vRExLnTj4a8eLE","m-0":"TwRpPlktzxhmFVeua7P5","mx-0":"zVfqx7gyb3o9mxfGynn1","my-0":"iSHVzNiB9iVleGljaQxy","mt-0":"xqDIp6cNVr_E6RXaiPyD","mr-0":"S8EwaXk1kyPizt6x4WH2","mb-0":"ODX5Vr1TARoLFkDDFooD","ml-0":"cphJ8dCpfimnky7P2FHg","m-1":"PFgIhNxIyiSuNvQjAIYj","mx-1":"M2jKmUzDxvJjjVEPU3zn","my-1":"io15gAh8tMTNbSEfwJKk","mt-1":"rcTN5uw9xIEeMEGL3Xi_","mr-1":"CQSkybjq2TcRM1Xo9COV","mb-1":"hfqOWgq6_MEGdFE82eOY","ml-1":"I8MxZQYTbuu595yfesWA","m-2":"kQkc6rmdpvLKPkyoJtVQ","mx-2":"j6vFPxWuu4Jan2ldoxpp","my-2":"hqr39dC4H_AbactPAkCG","mt-2":"c3dQnMi16C6J6Ecy4283","mr-2":"YNZmHOuRo6hU7zzKfPdP","mb-2":"Db8lbak1_wunpPk8NwKU","ml-2":"ftsYE5J9hLzquQ0tA5dY","m-3":"Det4MHzLUW7EeDnafPzq","mx-3":"h_8EEAztC29Vve1datb5","my-3":"YXIXJ0h1k47u6hzK8KcM","mt-3":"soADBBkcIKCBXzCTuV9_","mr-3":"zSX59ziEaEWGjnpZa4uV","mb-3":"yrVTnq_WBMbejg89c2ZQ","ml-3":"UKtHPJnI2cXBWtPDm5hM","m-4":"guexok_Tqd5Tf52hRlbT","mx-4":"oS1E2KfTBZkJ3F0tN7T6","my-4":"DN1OhhXi6AoBgEdDSbGd","mt-4":"ot2kkMcYHv53hLZ4LSn0","mr-4":"A1krOZZhlQ6Sp8Cy4bly","mb-4":"pkDbXXXL32237M0hokEh","ml-4":"XXv4kDTGvEnQeuGKOPU3","m-5":"yGqHk1a57gaISwkXwXe6","mx-5":"X8cghM358X3DkXLc9aNK","my-5":"GdfSmGwHlFnN2S6xBn1f","mt-5":"yqeuzwyGQ7zG0avrGqi_","mr-5":"g9emeCkuHvYhveiJbfXO","mb-5":"Lvk3dqcyHbZ07QCRlrUQ","ml-5":"r3yQECDQ9qX0XZzXlVAg","m-6":"aQhlPwht2Cz1X_63Miw0","mx-6":"JyHb0vK3wJgpblL9s5j8","my-6":"cY2gULL1lAv6WPNIRuf3","mt-6":"NBWQ9Lwhh_fnry3lg_p7","mr-6":"yIOniNe5E40C8fWvBm5V","mb-6":"t30usboNSyqfQWIwHvT3","ml-6":"Nm_TyFkYCMhOoghoToKJ","m-7":"C4qJKoBXpgKtpmrqtEKB","mx-7":"S93Srbu6NQ_PBr7DmTiD","my-7":"fJj8k6gGJDks3crUZxOS","mt-7":"cW6D6djs7Ppm7fD7TeoV","mr-7":"DuCnqNfcxcP3Z__Yo5Ro","mb-7":"im8407m2fw5vOg7O2zsw","ml-7":"G0fbeBgvz2sh3uTP9gNl","m-8":"kvW3sBCxRxUqz1jrVMJl","mx-8":"tOjEqjLONQdkiYx_XRnw","my-8":"op5hFSx318zgxsoZZNLN","mt-8":"c9WfNHP6TFKWIfLxv52J","mr-8":"sBA75QqcqRwwYSHJh2wc","mb-8":"GpL6idrXmSOM6jB8Ohsf","ml-8":"HbtWJoQwpgGycz8dGzeT","p-0":"uxX3khU88VQ_Ah49Ejsa","px-0":"KX0FhpBKwKzs9fOUdbNz","py-0":"PfK8vKDyN32dnimlzYjz","pt-0":"emxLHRjQuJsImnPbQIzE","pr-0":"kJ8WzlpTVgdViXt8ukP9","pb-0":"tg_UIUI11VBzrTAn2AzJ","pl-0":"uczvl8kaz84oPQJ2DB2R","p-1":"o7UHPcdVK3lt7q3lqV4o","px-1":"IDqEOxvDoYrFYxELPmtX","py-1":"DdywPW2qSYlu2pt8tpO2","pt-1":"npy3hw4A5QSkDicb2CJJ","pr-1":"LgbptTApNY5NwLQvEFAt","pb-1":"WZQy2SZuZso59bUsXXyl","pl-1":"o331apInxNunbYB3SfPE","p-2":"fMPIyD9Vqki1Lrc_yJnG","px-2":"i2pMcTcdrr10IQoiSm_L","py-2":"eA702gn32kwptiI1obXH","pt-2":"o9bGieUKcYc8o0Ij9oZX","pr-2":"SwZcFez1RDqWsOFjB5iG","pb-2":"eHpLc_idmuEqeqCTvqkN","pl-2":"vU39i2B4P1fUTMB2l6Vo","p-3":"JHWNzBnE29awhdu5BEh1","px-3":"X72lGbb56L3KFzC2xQ9N","py-3":"BzfNhRG8wXdCEB5ocQ6e","pt-3":"srV0KSDC83a2fiimSMMQ","pr-3":"lUWfkmbQjCskhcNwkyCm","pb-3":"Ts0dIlc3aTSL7V4cIHis","pl-3":"CzlqQXXhX6MvorArFZ8B","p-4":"TqMPkQtR_DdZuKb5vBoV","px-4":"a7UrjhI69Vetlcj9ZVzz","py-4":"StEhBzGs2Gi5dDEkjhAv","pt-4":"FGneZfZyvYrt1dG0zcnm","pr-4":"APEH216rpdlJWgD2fHc8","pb-4":"oGwXC3ohCic9XnAj6x69","pl-4":"U6gnT9y42ViPNOcNzBwb","p-5":"IpdRLBwnHqbqFrixgbYC","px-5":"HgNeXvkBa9o3bQ5fvFZm","py-5":"tJtFZM3XfPG9v9TSDfN1","pt-5":"PdifHW45QeXYfK568uD8","pr-5":"mbLkWTTZ0Za_BBbFZ5b2","pb-5":"vVWpZpLlWrkTt0hMk8XU","pl-5":"RxfaJj5a1Nt6IavEo5Zl","p-6":"SppJULDGdnOGcjZNCYBy","px-6":"palY2nLwdoyooPUm9Hhk","py-6":"WYw1JvZC0ppLdvSAPhr_","pt-6":"YEEJ9b90ueQaPfiU8aeN","pr-6":"QE0ssnsKvWJMqlhPbY5u","pb-6":"n8yA3jHlMRyLd5UIfoND","pl-6":"tXHmxYnHzbwtfxEaG51n","p-7":"kBTsPKkO_3g_tLkj77Um","px-7":"RyhrFx6Y1FGDrGAAyaxm","py-7":"CBwRpB0bDN3iEdQPPMJO","pt-7":"vQVSq6SvWKbOMu6r4H6b","pr-7":"oBy5__aEADMsH46mrgFX","pb-7":"KVEXoJqf1s92j0JMdNmN","pl-7":"ZMXGNrNaKW3k_3TLz0Fq","p-8":"tuiR9PhkHXhGyEgzRZRI","px-8":"U7454qyWkQNa2iaSJziu","py-8":"VLYIv2GVocjuN93e8HC8","pt-8":"X1rm9DQ1zLGLfogja5Gn","pr-8":"JS7G6kAuqJo5GIuF8S5t","pb-8":"Y8F9ga1TDCMbM1lj4gUz","pl-8":"AJuyNGrI63BOWql719H8"}},25196:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={global:"_fUXxnSp5pagKBp9gSN7"}},85605:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={wrapper:"O5Go3eBOBqWlXy7fX0su","connection-name":"fgQ4OdnJ1svMwDnOKu2H","profile-link":"ArQoWnNoP4okGpEbxF6b",confirmDialog:"QsEfjoVyfc0gVACXTvUM","mark-shared-wrap":"eCH_xkiqbqL0UkJjU_1p","connection-panel":"J2Rz6Qb6mWPyJDF0yoqw","connection-list":"fXYYdRkn3LXtN9YH3354","connection-list-item":"LaK9P7Nfi4ZBH0NhtbSs","connection-item":"tI3FtttoJPuF9AJzCAMv","connection-item-name":"msoMjBB_4Uq5qpRgobsH","learn-more":"RjMLptH6v03AX5ABWBp3","connection-name-wrapper":"z5Do97zRnujyW3Oj0pPJ"}},49514:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={"connection-container":"KQcQQLxH5fI08DfOlKwL"}},71016:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={"connections-list":"Ua6eKcnk_tQQpFlgXMSn","components-notice":"SHqrIEguRfCILRHPyxE9","more-link":"ejyuBjiLmHz_UTFmBnjA","change-settings-button":"smqXe_da1eoP4Agql_Cs","enhanced-features-nudge":"eQZwqSCI_uVWrJ2jIRUA","enabled-connections-notice":"O_ZghPCUG7291iVsp1wx","no-connections-text":"nrOxj0JeSCWwCB4oaR94","broken-connection-btn":"Jxra4242dPPaUy28mM8H","broken-connection-service":"amoEz9VXiwF3eyLxTbOA","broken-connection":"irsbCLZJNayrJ0g_joAn","settings-button":"lIKYDl6xVVtMbvcUDrrn"}},60548:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={container:"OWstrHF6QZdaosKs0b6j",hidden:"HJMFrbZ0khdkKKkocrIK"}},18973:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={confirmation:"udAWaza1u34TkmZZUPq4","header-text":"JsO4jFxFAKjG6Go62bZF",form:"SeoSfJ6eII9O0PiDkl5g","accounts-list":"M6POQFFbhswwolN6D9VN","account-input":"Sk_WQxS97yTokR_rM3Ci","account-label":"CRjatFVv3dQMjG9_Vmjj","submit-wrap":"re3HrL6GJa59uqDgx771","profile-pic":"jPB4ApiYyEswu6AKKJqk","account-info":"JhIphWt8e2X_ee0l7KEZ"}},73842:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={modal:"Mu_jAq5ZcYDM1kmBbxcs","connect-form":"foAsC5GlXOWEzACnxT_P",small:"_7PKKGx44v2H9dJbUltFw","manual-share":"IGOk1gMf5SKkfOKyF7Xc"}},27681:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={wrapper:"pp_WJTHlGIX9bcHCLxJh",title:"IzRyqrcpwjKRBJKEtECz"}},97671:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={"preview-wrapper":"cZuW54OEuUN9yvuE_rNU","preview-image":"vCs0BOExDMOystFhG2wa",container:"sKpch49QzrpontC0DvF7",subtitle:"vOO47kVjHn7i63fQ0bx0",preview:"ziE_jq4PmQmGBedGskf_",remove:"qqGj0rmSJvZs9dyr0u_I","remove-loading":"TJGgifcTHqUtknPqVQpH"}},35270:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={wrapper:"f92zWdEJJIwBvwH5rRzn",disabled:"rBTOWyeewE4VxAqYgjoI","preview-wrapper":"PykCvaqoL7AIDzVKJAtg",notice:"SSMDWFYkP44va5KqPpTP",subtitle:"Q21myqk1zOYB3IH8YuEq","learn-more":"RoerAwwhu_PqirHlSJPz"}},93794:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={notice:"ptn8jt555LOvMXWaoLxs","notice--default":"IVzciZv5S5E8XgR5EsLp","notice--highlight":"OpbDsm3F65Z4K5Bz43cz","notice--warning":"dlrSwB0tyuf1TYcypDec","notice--error":"hkpqil8E11PObwu7TVU2",content:"AeqtA3GRe7sFjKaC9SqL",dismiss:"IArBTmNL2K4du5WPBUhg",actions:"T7E2eJJN4qjwPpv3mcjV"}},87170:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={panel:"U_WW2qLSQA71SJYyITOq"}},5780:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={description:"D8uyjb_rjCf4HTMT0mj0"}},55387:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={"loading-block":"dCsa7WNQhT_7RhRkZih1","loading-text":"VotVfPmHNdU_xItAWEKQ"}},61420:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={wrapper:"dhja1sVSpDACLZ6k4sBy"}},76445:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={prompt:"CW7R8fRQqVKfyXFYiNWR",buttons:"n34j0qWq2EZzYl1jAiej",button:"aIuCL8MdydCJGcrOqp4x",header:"qegtnlYWDc3UnIGPRlQb"}},42475:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={services:"SbpyhN5jnda8H868J3rX","service-list-item":"ONeewrk3aNC1gYJebq7K","service-item":"RoTxOeGFqAwk3pXUZpvF","service-item-info":"AjlYaYB_xi9ciXXCqHIJ","service-basics":"kdYli5nS3b46T57Ih5TQ",heading:"ci8T5eNe1rggYILce596",badges:"W6mPdl5wGQlXfp1hYSK0",badge:"QbcyaAVqz3U_2xlIOZCw",title:"fXvUC1jZNUXR7RSrIylI",description:"d22_aeSA1etqpnckP_Mr",actions:"ddhaNmGMqOySRjR_TtqJ","learn-more":"nnSF_IK4vYviTlCOzPrg","service-panel":"u17AiTny2Jbh35JFAUYw","active-connection":"MyXskAb4aXwO7zitR97z","broken-connection-alert":"hMntEpO6BV5B11lyAitv","service-connection-list":"Y_4JpLfOnXVZKvEs179H","example-wrapper":"jdahJvXCrCw0hA5NP3D3",small:"LLeYGX7Owy6gmpNW88VV","service-connection":"EdjyE9tVLH6lWMoB9z3M","connection-details":"EQQHwkVXRn0caD6J7LqV","profile-pic":"vvlyiVm67wUWF9NhpMA4",disconnect:"zqX6xk8KCGK1_qbYKqY5","connect-form-wrapper":"U_Z9JvOsEQ6BtkH9P1IQ","connect-form":"fNeO_MZFp7cPkgtCdkAF","connect-button":"zK8sijAMFNs2m6WRAoi4","fields-wrapper":"UVvtbZph1hXruamo6ZXw","fields-item":"rFJU1Nr26kL8C6HZax0G","mark-shared-wrap":"zLobzkXnF6jHxNvkfz5_"}},99811:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={"share-buttons":"JUeclE9CucaXRlTL5K9H",x:"rhyZKz4FQtFOFAMwLgLj",whatsapp:"DDRhGoqXUOM6Jug54nEB",facebook:"h57Cabo4jn8Ke77_DLOX",clipboard:"tvNWJpaNzPro4QaItBae",vertical:"p_VTpBCFklSkcb0iiD0K",container:"DyIAUIn_2bkciyB_XtgH",label:"Lx8xScOApJmJdhJF9JWd"}},14150:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={"trigger-wrapper":"kyLdsnatoC0HbIDJQm9S",wrapper:"Syp1HH254tFVzcFG2Zh2",modal:"YABlqQXOGnawHFcJa7zT","share-item-name-wrapper":"vEA7jwVDDYmYUaVhX9QR","share-item-name":"AsH9JOuWehE027IlR7Y2","share-status-wrapper":"hvN5L4O60W8ftCvW1gRX","share-status-success":"aF8rESnbAc_uQUN0H3py","share-status-failure":"mfUKWd8ZvydeEyWeKhJ2","share-status-label":"pvVeQhJ9oNx0CFoHYEit","share-status-icon-tooltip":"fXQtkkrybB5DooWXxt67","tooltip-text":"LVRjzREGBPlLa__A7tdR","share-status-icon":"bJAz31xuwL_vO4V97YfM","dataview-wrapper":"eYjvcy4kG7GH44dIVLYO","connection-name":"Zr_Eo4TmHx_X7UFoJcuM","retry-wrapper":"csen0rABejxv4X3l1cx5"}},53744:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={templateControl:"tfWupx32Rn5hHqVjTzui",customText:"qu9UsV1EEFeFxhU3Wgt5",mediaPicker:"nZhgKYFn6MQoIDGcKrUG"}},88375:()=>{"use strict"},52002:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={templates:"m9360_cMWKFHTNk9xpNz",template:"j4EvSJfKIJLGEIAETiEY","template--active":"dQb3Zpl0puk4V6ezZslo"}},47944:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={panel:"nOZgE6dP_guav2888GAK",modal:"jxndagXCphEhzYfnjHMZ","modal-content":"na9tpJVboVaxVNabSRsr","close-button":"VxWWpt730pSzZCEVjxA3","settings-header":"z14EiGfFuQwKazBW3LpF","settings-section":"LAWYmJPODB8LgzQMzsyx","settings-content":"vVbLRydJFLCVa49hSz83","preview-section":"uw1atyZ2fcJoKjwf6SZW","preview-content":"meKppCUznQhlkjwZuS6G","disabled-tab":"HS7f47n0w2xUqa4wQkwX","modal-description":"dKXzdVKZ7LYvSmUVrl26"}},95051:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={"publicize-notice":"__nV49on4_ijaV8Brnsw","components-notice":"zZ3Pu7E87XyYIdPR2WTt","components-button":"fLC8AaLf3xcKaoJ4Opax"}},76794:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={wrapper:"sP1aklNMfj7lCDxuhWaq",progress:"a6tcXi51GAewl3qx0AVi",duration:"uFtCCGeycoI94JbCnJh8"}},54746:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a={wrapper:"h2NGkiVs1r1nf85LtJpF","conversion-notice":"k3Apzwo3v9n0IaHbB8tf"}},44997:e=>{var t=1e3,n=60*t,a=60*n,r=24*a,s=7*r,o=365.25*r;function i(e,t,n,a){var r=t>=1.5*n;return Math.round(e/n)+" "+a+(r?"s":"")}e.exports=function(e,l){l=l||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var i=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!i)return;var l=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*o;case"weeks":case"week":case"w":return l*s;case"days":case"day":case"d":return l*r;case"hours":case"hour":case"hrs":case"hr":case"h":return l*a;case"minutes":case"minute":case"mins":case"min":case"m":return l*n;case"seconds":case"second":case"secs":case"sec":case"s":return l*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(e);if("number"===c&&isFinite(e))return l.long?function(e){var s=Math.abs(e);if(s>=r)return i(e,s,r,"day");if(s>=a)return i(e,s,a,"hour");if(s>=n)return i(e,s,n,"minute");if(s>=t)return i(e,s,t,"second");return e+" ms"}(e):function(e){var s=Math.abs(e);if(s>=r)return Math.round(e/r)+"d";if(s>=a)return Math.round(e/a)+"h";if(s>=n)return Math.round(e/n)+"m";if(s>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},2532:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});var a=n(25700),r=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],s=/[^A-Z0-9]+/gi;function o(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,o=void 0===n?r:n,l=t.stripRegexp,c=void 0===l?s:l,u=t.transform,d=void 0===u?a.g:u,p=t.delimiter,m=void 0===p?" ":p,h=i(i(e,o,"$1\0$2"),c,"\0"),g=0,f=h.length;"\0"===h.charAt(g);)g++;for(;"\0"===h.charAt(f-1);)f--;return h.slice(g,f).split("\0").map(d).join(m)}function i(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}},68530:(e,t,n)=>{"use strict";var a=n(10961);e.exports=function(e,t){var n=this;return a(n.data,e,n.data[t]||r,n),n};var r=[]},35479:(e,t,n)=>{"use strict";var a=n(75466);e.exports=function(e){return Boolean(a(this,e))}},49897:(e,t,n)=>{"use strict";var a=n(74424);e.exports=function(e){var t,n,r,s,o=this,i=-1;a(e,o,o.data);for(;++i{"use strict";var a=n(58314),r=n(58496);e.exports=o;var s=o.prototype;function o(e,t){var n,s=-1;if(!(this instanceof o))return new o(e,t);if("string"==typeof e||a(e)?("string"==typeof t||a(t))&&(n=[{dic:t}]):e&&("length"in e?(n=e,e=e[0]&&e[0].aff):(e.dic&&(n=[e]),e=e.aff)),!e)throw new Error("Missing `aff` in dictionary");if(e=r(e),this.data=Object.create(null),this.compoundRuleCodes=e.compoundRuleCodes,this.replacementTable=e.replacementTable,this.conversion=e.conversion,this.compoundRules=e.compoundRules,this.rules=e.rules,this.flags=e.flags,n)for(;++s{"use strict";e.exports=function(e){var t,n,a,r,s=this,o=e.toString("utf8").split("\n"),i=-1;void 0===s.flags.FORBIDDENWORD&&(s.flags.FORBIDDENWORD=!1);r=s.flags.FORBIDDENWORD;for(;++i{"use strict";e.exports=function(e){return delete this.data[e],this}},92347:(e,t,n)=>{"use strict";var a=n(75466),r=n(91534);e.exports=function(e){var t=this,n=a(t,e,!0);return{correct:t.correct(e),forbidden:Boolean(n&&r(t.flags,"FORBIDDENWORD",t.data[n])),warn:Boolean(n&&r(t.flags,"WARN",t.data[n]))}}},98559:(e,t,n)=>{"use strict";var a=n(41455),r=n(92545),s=n(91534),o=n(75466);e.exports=function(e){var t,n,s,o,c,u,d,p,m,h,g,f,v,b,k,y,E,w,_,C,A,x,j,S,N,R=this,P={},L=[],T={},B=[];if(!(e=r(e.trim(),R.conversion.in))||R.correct(e))return[];N=a(e),o=-1;for(;++o-1;)B.push(e.replace(n[0],n[1])),c=e.indexOf(n[0],c+1);o=-1;for(;++oT[t]?-1:1}(e,t)||function(e,t){var n=a(e),r=a(t);return n===r?0:n===N?-1:r===N?1:void 0}(e,t)||function(e,t){return e.localeCompare(t)}(e,t)})),s=[],j=[],o=-1;for(;++o{"use strict";var a=n(77598);e.exports=function(e,t,n,o){var i,l,c,u,d,p,m,h=-1;(!("NEEDAFFIX"in o.flags)||n.indexOf(o.flags.NEEDAFFIX)<0)&&function(e,t,n){var a=e[t];t in e?a===s?e[t]=n.concat():r.apply(a,n):e[t]=n.concat()}(e,t,n);for(;++h{"use strict";var a=n(73509);e.exports=function(e){var t,n,u,d,p,m,h,g,f,v,b,k,y=Object.create(null),E=Object.create(null),w=Object.create(null),_=[],C={in:[],out:[]},A=[],x=e.toString("utf8"),j=[],S=0,N=x.indexOf("\n");w.KEY=[];for(;N>-1;)R(x.slice(S,N)),S=N+1,N=x.indexOf("\n",S);R(x.slice(S)),N=-1;for(;++N{"use strict";e.exports=function e(t,n,a,r){var s,o,i,l,c,u=-1;for(;++u{"use strict";function t(e){return e===e.toLowerCase()?"l":e===e.toUpperCase()?"u":null}e.exports=function(e){var n=t(e.charAt(0)),a=e.slice(1);if(!a)return n;if(a=t(a),n===a)return n;if("u"===n&&"l"===a)return"s";return null}},74424:(e,t,n)=>{"use strict";var a=n(73509),r=n(10961);e.exports=function(e,t,n){var a=e.toString("utf8"),r=a.indexOf("\n")+1,s=a.indexOf("\n",r);for(;s>-1;)9!==a.charCodeAt(r)&&o(a.slice(r,s),t,n),r=s+1,s=a.indexOf("\n",r);o(a.slice(r),t,n)};var s=/\s/g;function o(e,t,n){for(var o,i,l=e.indexOf("/"),c=e.indexOf("#"),u="";l>-1&&92===e.charCodeAt(l-1);)l=(e=e.slice(0,l-1)+e.slice(l)).indexOf("/",l);c>-1?l>-1&&l-1?(o=e.slice(0,l),u=e.slice(l+1)):o=e,(o=o.trim())&&r(n,o,a(t.flags,u.trim()),t)}},81277:(e,t,n)=>{"use strict";var a=n(91534);e.exports=function(e,t){var n=-1;if(e.data[t])return!a(e.flags,"ONLYINCOMPOUND",e.data[t]);if(t.length>=e.flags.COMPOUNDMIN)for(;++n{"use strict";e.exports=function(e,t,n){return n&&t in e&&n.indexOf(e[t])>-1}},75466:(e,t,n)=>{"use strict";var a=n(92545),r=n(81277),s=n(91534);function o(e,t,n){return s(e,"KEEPCASE",t)||n||s(e,"FORBIDDENWORD",t)}e.exports=function(e,t,n){var i,l=t.trim();if(!l)return null;if(l=a(l,e.conversion.in),r(e,l))return!n&&s(e.flags,"FORBIDDENWORD",e.data[l])?null:l;if(l.toUpperCase()===l){if(i=l.charAt(0)+l.slice(1).toLowerCase(),o(e.flags,e.data[i],n))return null;if(r(e,i))return i}if((i=l.toLowerCase())!==l){if(o(e.flags,e.data[i],n))return null;if(r(e,i))return i}return null}},92545:e=>{"use strict";e.exports=function(e,t){var n=-1;for(;++n{"use strict";e.exports=function(e,n){var a,r=0;if(!n)return t;if("long"===e.FLAG){for(a=new Array(Math.ceil(n.length/2));r{"use strict";e.exports=function(){return this.flags.WORDCHARS||null}},74572:(e,t,n)=>{"use strict";n.d(t,{c:()=>s});var a=n(54715),r=n(19382);function s(e,t){return void 0===t&&(t={}),(0,r.a)(e,(0,a.Cl)({delimiter:"-"},t))}},82769:(e,t,n)=>{"use strict";n.d(t,{$7:()=>o,fL:()=>i,l3:()=>s});var a=n(54715),r=n(2532);function s(e,t){var n=e.charAt(0),a=e.substr(1).toLowerCase();return t>0&&n>="0"&&n<="9"?"_"+n+a:""+n.toUpperCase()+a}function o(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function i(e,t){return void 0===t&&(t={}),(0,r.W)(e,(0,a.Cl)({delimiter:"",transform:s},t))}},70320:(e,t,n)=>{"use strict";n.d(t,{y:()=>s});var a=n(54715),r=n(19382);function s(e,t){return void 0===t&&(t={}),(0,r.a)(e,(0,a.Cl)({delimiter:"/"},t))}},14936:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var a=n(87399),r=n.n(a),s=n(10067),o=n.n(s),i=n(11264),l=n.n(i);const c=o()("photon"),u={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},d="__domain__.invalid",p=`https://${d}`,m="https://i0.wp.com";function h(e,t){let n;try{n=new URL(e,p)}catch{return null}const a="https:"===n.protocol,s=new URL(m);if(o=n.host,/^i[0-2]\.wp\.com$/.test(o))s.pathname=n.pathname,s.hostname=a?"i0.wp.com":n.hostname;else{if(n.search)return null;let e=n.href.replace(`${n.protocol}/`,"");"blob:"===n.protocol&&(e=n.pathname.replace("://","//")),n.hostname===d&&(e=n.pathname),s.pathname=e,s.hostname=function(e,t){if(t)return"i0.wp.com";const n=r()(e),a=l()(n),s="i"+Math.floor(3*a());return c('determined server "%s" to use with "%s"',s,e),s+".wp.com"}(e,"https:"===s.protocol),a&&s.searchParams.set("ssl","1")}var o;if(t)for(const[e,n]of Object.entries(t))"host"!==e&&"hostname"!==e?"secure"!==e||n?s.searchParams.set(u[e]??e,n.toString()):s.protocol="http:":s.hostname=n;return c("generated Photon URL: %s",s.href),s.href}},15762:(e,t,n)=>{"use strict";var a=n(53761);function r(){}function s(){}s.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,s,o){if(o!==a){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:r};return n.PropTypes=n,n}},28120:(e,t,n)=>{e.exports=n(15762)()},53761:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},87072:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>b});const a=2147483647,r=36,s=/^xn--/,o=/[^\0-\x7F]/,i=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=Math.floor,u=String.fromCharCode;function d(e){throw new RangeError(l[e])}function p(e,t){const n=e.split("@");let a="";n.length>1&&(a=n[0]+"@",e=n[1]);const r=function(e,t){const n=[];let a=e.length;for(;a--;)n[a]=t(e[a]);return n}((e=e.replace(i,".")).split("."),t).join(".");return a+r}function m(e){const t=[];let n=0;const a=e.length;for(;n=55296&&r<=56319&&n>1,e+=c(e/t);e>455;a+=r)e=c(e/35);return c(a+36*e/(e+38))},f=function(e){const t=[],n=e.length;let s=0,o=128,i=72,l=e.lastIndexOf("-");l<0&&(l=0);for(let n=0;n=128&&d("not-basic"),t.push(e.charCodeAt(n));for(let p=l>0?l+1:0;p=n&&d("invalid-input");const l=(u=e.charCodeAt(p++))>=48&&u<58?u-48+26:u>=65&&u<91?u-65:u>=97&&u<123?u-97:r;l>=r&&d("invalid-input"),l>c((a-s)/t)&&d("overflow"),s+=l*t;const m=o<=i?1:o>=i+26?26:o-i;if(lc(a/h)&&d("overflow"),t*=h}const m=t.length+1;i=g(s-l,m,0==l),c(s/m)>a-o&&d("overflow"),o+=c(s/m),s%=m,t.splice(s++,0,o)}var u;return String.fromCodePoint(...t)},v=function(e){const t=[],n=(e=m(e)).length;let s=128,o=0,i=72;for(const n of e)n<128&&t.push(u(n));const l=t.length;let p=l;for(l&&t.push("-");p=s&&tc((a-o)/m)&&d("overflow"),o+=(n-s)*m,s=n;for(const n of e)if(na&&d("overflow"),n===s){let e=o;for(let n=r;;n+=r){const a=n<=i?1:n>=i+26?26:n-i;if(eString.fromCodePoint(...e)},decode:f,encode:v,toASCII:function(e){return p(e,(function(e){return o.test(e)?"xn--"+v(e):e}))},toUnicode:function(e){return p(e,(function(e){return s.test(e)?f(e.slice(4).toLowerCase()):e}))}}},24588:(e,t)=>{"use strict";var n=Object.prototype.hasOwnProperty;function a(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function r(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var a,s,o=[];for(s in"string"!=typeof t&&(t="?"),e)if(n.call(e,s)){if((a=e[s])||null!=a&&!isNaN(a)||(a=""),s=r(s),a=r(a),null===s||null===a)continue;o.push(s+"="+a)}return o.length?t+o.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,r={};t=n.exec(e);){var s=a(t[1]),o=a(t[2]);null===s||null===o||s in r||(r[s]=o)}return r}},18950:(e,t,n)=>{"use strict";var a=n(75795);t.createRoot=a.createRoot,t.hydrateRoot=a.hydrateRoot},86212:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(51609),r=n(76221),s=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],_n=!0,a=!1,r=void 0;try{for(var s,o=e[Symbol.iterator]();!(_n=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);_n=!0);}catch(e){a=!0,r=e}finally{try{!_n&&o.return&&o.return()}finally{if(a)throw r}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=r.TT&&r.XD;const i=function(){var e=(0,r.Y9)(),t=s(e,1)[0],n=(0,a.useState)(t),i=s(n,2),l=i[0],c=i[1];return(0,a.useEffect)((function(){if(o){var e=function(){var e=(0,r.Y9)(),t=s(e,1)[0];c(t)};return document.addEventListener(r.XD.event,e),function(){document.removeEventListener(r.XD.event,e)}}}),[]),l}},76221:(e,t,n)=>{"use strict";n.d(t,{TT:()=>s,XD:()=>o,Y9:()=>i});var a="undefined"!=typeof document,r=[{hidden:"hidden",event:"visibilitychange",state:"visibilityState"},{hidden:"webkitHidden",event:"webkitvisibilitychange",state:"webkitVisibilityState"},{hidden:"mozHidden",event:"mozvisibilitychange",state:"mozVisibilityState"},{hidden:"msHidden",event:"msvisibilitychange",state:"msVisibilityState"},{hidden:"oHidden",event:"ovisibilitychange",state:"oVisibilityState"}],s=a&&Boolean(document.addEventListener),o=function(){if(!s)return null;var e=!0,t=!1,n=void 0;try{for(var a,o=r[Symbol.iterator]();!(e=(a=o.next()).done);e=!0){var i=a.value;if(i.hidden in document)return i}}catch(e){t=!0,n=e}finally{try{!e&&o.return&&o.return()}finally{if(t)throw n}}return null}(),i=function(){if(!o)return[!0,"visible"];var e=o.hidden,t=o.state;return[!document[e],document[t]]}},32047:e=>{"use strict";function t(e,n){var a;if(Array.isArray(n))for(a=0;a{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},94107:(e,t,n)=>{"use strict";n.d(t,{A:()=>C});var a=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,a){return e[0]===t&&(n=a,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),a=this.__entries__[n];return a&&a[1]},t.prototype.set=function(t,n){var a=e(this.__entries__,t);~a?this.__entries__[a][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,a=e(n,t);~a&&n.splice(a,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,a=this.__entries__;n0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;i.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),u=function(e,t){for(var n=0,a=Object.keys(t);n0},e}(),w="undefined"!=typeof WeakMap?new WeakMap:new a,_=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=c.getInstance(),a=new E(t,n,this);w.set(this,a)};["observe","unobserve","disconnect"].forEach((function(e){_.prototype[e]=function(){var t;return(t=w.get(this))[e].apply(t,arguments)}}));const C=void 0!==s.ResizeObserver?s.ResizeObserver:_},11264:e=>{"use strict";var t=256,n=[],a=window,r=Math.pow(t,6),s=Math.pow(2,52),o=2*s,i=255,l=Math.random;function c(e){var n,a=e.length,r=this,s=0,o=r.i=r.j=0,l=r.S=[];for(a||(e=[a++]);s=o;)e/=2,n/=2,a>>>=1;return(e+a)/n}},e.exports.resetGlobal=function(){Math.random=l},d(Math.random(),n)},82682:(e,t,n)=>{"use strict";n.d(t,{o:()=>i,u:()=>o});var a=n(54715),r=n(2532),s=n(21644);function o(e,t){var n=e.toLowerCase();return 0===t?(0,s.R)(n):n}function i(e,t){return void 0===t&&(t={}),(0,r.W)(e,(0,a.Cl)({delimiter:" ",transform:o},t))}},68963:(e,t,n)=>{"use strict";n.d(t,{L:()=>s});var a=n(54715),r=n(19382);function s(e,t){return void 0===t&&(t={}),(0,r.a)(e,(0,a.Cl)({delimiter:"_"},t))}},48931:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(1455),r=n.n(a);const s="default"in r()?r().default:r()},87286:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(10067),r=n.n(a),s=n(53664);const o=r()("jetpack-ai-client:ask-question");async function i(e,{postId:t=null,fromCache:n=!1,feature:a,functions:r,model:i}={}){return o("Asking question: %o. options: %o",e,{postId:t,fromCache:n,feature:a,functions:r,model:i}),new s.A({question:e,options:{postId:t,feature:a,fromCache:n,functions:r,model:i}})}},31439:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(10067),r=n.n(a),s=n(51391);const o=r()("jetpack-ai-client:ask-question-sync");async function i(e,t={}){o("Asking question with no streaming: %o. options: %o",e,t);let n=null;try{n=(await(0,s.A)()).token}catch(e){return o("Error getting token: %o",e),Promise.reject(e)}const a={...Array.isArray(e)?{messages:e}:{question:e},...t,stream:!1},r={Authorization:`Bearer ${n}`,"Content-Type":"application/json"};try{const e=await fetch("https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query",{method:"POST",headers:r,body:JSON.stringify(a)}).then((e=>e.json()));return e?.data?.status&&e?.data?.status>200?(o("Error generating prompt: %o",e),Promise.reject(e)):e.choices?.[0]?.message?.content}catch(e){return o("Error asking question: %o",e),Promise.reject(e)}}},57745:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(10067),r=n.n(a),s=n(51391);const o=r()("jetpack-ai-client:audio-transcription");async function i(e,t,n){o("Transcribing audio: %o. Feature: %o",e,t);let a="";try{a=(await(0,s.A)()).token}catch(e){return o("Error getting token: %o",e),Promise.reject(e)}const r=new FormData;r.append("audio_file",e);try{const e={Authorization:`Bearer ${a}`},s="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-transcription"+(t?`?feature=${t}`:"");return fetch(s,{method:"POST",body:r,headers:e,signal:n??void 0}).then((e=>(o("Transcription response: %o",e),e.ok?e.json().then((e=>e?.text)):e.json().then((e=>Promise.reject(e))))))}catch(e){return o("Transcription error response: %o",e),Promise.reject(e)}}},70629:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(94715),r=n(13022),s=n(51609),o=n.n(s),i=n(6754);function l({className:e,disabled:t=!1,value:n="",placeholder:s="",isTransparent:l=!1,state:c="init",onChange:u,banner:d=null,error:p=null,actions:m=null,message:h=null,promptUserInputRef:g=null,wrapperRef:f=null}){return o().createElement("div",{className:(0,r.A)("jetpack-components-ai-control__container-wrapper",e),ref:f},p,o().createElement("div",{className:"jetpack-components-ai-control__container"},d,o().createElement("div",{className:(0,r.A)("jetpack-components-ai-control__wrapper",{"is-transparent":l})},o().createElement(i.A,{state:c}),o().createElement("div",{className:"jetpack-components-ai-control__input-wrapper"},o().createElement(a.PlainText,{value:n,onChange:u,placeholder:s,className:"jetpack-components-ai-control__input",disabled:t,ref:g})),m),h))}},71417:(e,t,n)=>{"use strict";n.d(t,{A:()=>E});var a=n(56427),r=n(29491),s=n(86087),o=n(27723),i=n(51113),l=n(31249),c=n(62510),u=n(76673),d=n(40502),p=n(83883),m=n(10067),h=n.n(m),g=n(51609),f=n.n(g),v=n(63098),b=n(70629);const __=o.__,k=h()("jetpack-ai-client:block-ai-control");function y({disabled:e=!1,value:t="",placeholder:n="",showAccept:o=!1,acceptLabel:m=__("Accept","jetpack"),showButtonLabels:h=!0,isTransparent:g=!1,state:y="init",showGuideLine:E=!1,customFooter:w=null,onChange:_,onSend:C,onStop:A,onAccept:x,onDiscard:j,showRemove:S=!1,banner:N=null,error:R=null,lastAction:P},L){const T="requesting"===y||"suggesting"===y,[B,M]=(0,s.useState)(!1),[I,D]=(0,s.useState)(t||null),F=(0,s.useRef)(null);(0,s.useImperativeHandle)(L,(()=>F.current)),(0,s.useEffect)((()=>{B&&F?.current?.focus()}),[B]);const z=(0,s.useCallback)((()=>{D(t),M(!1),C?.(t)}),[t]),O=(0,s.useCallback)((e=>{_?.(e),"init"!==y&&M(I?e!==I:e.length>0)}),[I,y]),H=(0,s.useCallback)((()=>{j?.()}),[]),U=(0,s.useCallback)((()=>{k("cancelEdit, revert to last value",I),_?.(I||""),M(!1)}),[I]);(0,r.useKeyboardShortcut)("mod+enter",(()=>{o&&x?.()}),{target:F}),(0,r.useKeyboardShortcut)("enter",(e=>{e.preventDefault(),z()}),{target:F});const V=f().createElement(f().Fragment,null,(!o||B)&&f().createElement("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper"},T?f().createElement(a.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:A,variant:"secondary",label:__("Stop request","jetpack")},h?__("Stop","jetpack"):f().createElement(i.A,{icon:l.A})):f().createElement(f().Fragment,null,B&&f().createElement(a.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:U,variant:"secondary",label:__("Cancel","jetpack")},h?__("Cancel","jetpack"):f().createElement(i.A,{icon:l.A})),S&&!B&&!t?.length&&j&&f().createElement(a.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:H,variant:"secondary",label:__("Cancel","jetpack")},h?__("Cancel","jetpack"):f().createElement(i.A,{icon:l.A})),t?.length>0&&f().createElement(a.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:z,variant:"primary",disabled:!t?.length||e,label:__("Send request","jetpack")},h?__("Generate","jetpack"):f().createElement(i.A,{icon:c.A})))),o&&!B&&f().createElement("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper"},(t?.length>0||null===I)&&f().createElement(a.ButtonGroup,null,f().createElement(a.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Discard","jetpack"),onClick:H,tooltipPosition:"top"},f().createElement(i.A,{icon:u.A})),f().createElement(a.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Regenerate","jetpack"),onClick:()=>C?.(t),tooltipPosition:"top",disabled:!t?.length||null===t||e},f().createElement(i.A,{icon:d.A}))),f().createElement(a.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:x,variant:"primary",label:m},h?m:f().createElement(i.A,{icon:p.A})))),q=E&&!T&&!B&&(w||f().createElement(v.Yj,{aiFeedbackThumbsOptions:{showAIFeedbackThumbs:!0,ratedItem:"ai-assistant",prompt:P,block:"ai-assistant"}}));return f().createElement(b.A,{disabled:e||T,value:t,placeholder:n,isTransparent:g,state:y,onChange:O,banner:N,error:R,actions:V,message:q,promptUserInputRef:F})}const E=(0,g.forwardRef)(y)},61:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var a=n(56427),r=n(29491),s=n(86087),o=n(27723),i=n(51113),l=n(31249),c=n(62510),u=n(95789),d=n(51609),p=n.n(d),m=n(63098),h=n(70629);const __=o.__;function g({className:e,disabled:t=!1,value:n="",placeholder:o="",showButtonLabels:d=!0,isTransparent:g=!1,state:f="init",showGuideLine:v=!1,error:b,requestsRemaining:k,showUpgradeMessage:y=!1,showFairUsageMessage:E=!1,upgradeUrl:w,wrapperRef:_,onChange:C,onSend:A,onStop:x,onClose:j,onUndo:S,onUpgrade:N,onTryAgain:R,lastAction:P,blockType:L},T){const B="requesting"===f||"suggesting"===f,[M,I]=(0,s.useState)(!1),[D,F]=(0,s.useState)(n||null),z=(0,s.useRef)(null),O=n?.length<=0&&"done"===f;(0,s.useImperativeHandle)(T,(()=>z.current)),(0,s.useEffect)((()=>{M&&z?.current?.focus()}),[M]);const H=(0,s.useCallback)((()=>{F(n),I(!1),A?.(n)}),[A,n]),U=(0,s.useCallback)((e=>{C?.(e),"init"!==f&&I(D?e!==D:e.length>0)}),[C,D,f]),V=(0,s.useCallback)((()=>{x?.()}),[x]),q=(0,s.useCallback)((()=>{j?.()}),[j]),G=(0,s.useCallback)((()=>{S?.()}),[S]),$=(0,s.useCallback)((e=>{N?.(e)}),[N]),W=(0,s.useCallback)((()=>{R?.()}),[R]);(0,r.useKeyboardShortcut)("enter",(e=>{e.preventDefault(),H()}),{target:z});const Z=p().createElement(p().Fragment,null,B?p().createElement(a.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:V,variant:"secondary",label:__("Stop request","jetpack")},d?__("Stop","jetpack"):p().createElement(i.A,{icon:l.A})):p().createElement(p().Fragment,null,n?.length>0&&p().createElement("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper"},p().createElement(a.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:H,variant:"primary",disabled:!n?.length||t,label:__("Send request","jetpack")},d?__("Generate","jetpack"):p().createElement(i.A,{icon:c.A}))),O&&p().createElement("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper"},p().createElement(a.ButtonGroup,null,p().createElement(a.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Undo","jetpack"),onClick:G,tooltipPosition:"top"},p().createElement(i.A,{icon:u.A})),p().createElement(a.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Close","jetpack"),onClick:q,variant:"tertiary"},__("Close","jetpack"))))));let J=null;return b?.message?J=p().createElement(m.Kw,{error:b.message,code:b.code,onTryAgainClick:W,onUpgradeClick:$,upgradeUrl:w}):E?J=p().createElement(m.k9,null):y?J=p().createElement(m.AK,{requestsRemaining:k,onUpgradeClick:$,upgradeUrl:w}):v&&(J=O?p().createElement(m.Yj,{aiFeedbackThumbsOptions:{showAIFeedbackThumbs:!0,ratedItem:"ai-assistant",prompt:P,block:L}}):p().createElement(m.Yj,null)),p().createElement(h.A,{className:e,disabled:t||B,value:n,placeholder:o,isTransparent:g,state:f,onChange:U,actions:Z,message:J,promptUserInputRef:z,wrapperRef:_})}const f=(0,d.forwardRef)(g)},42299:(e,t,n)=>{"use strict";n.d(t,{FC:()=>r.A,N0:()=>a.A});n(70629);var a=n(71417),r=n(61)},11497:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var a=n(85985),r=n(56427),s=n(86087),o=n(27723),i=n(7598),l=n(50347),c=n(13022);const __=o.__;function u({disabled:e=!1,iconSize:t=24,ratedItem:n="",feature:o="",savedRatings:u={},options:d={},onRate:p}){if(!function(e){return!0===(0,a.FB)(e).available}("ai-response-feedback"))return null;const[m,h]=(0,s.useState)({}),{tracks:g}=(0,a.st)();(0,s.useEffect)((()=>{const e={...u,...m};JSON.stringify(e)!==JSON.stringify(m)&&h(e)}),[u]);const f=e=>!!m[n]&&m[n]===e,v=e=>{const t=e?"thumbs-up":"thumbs-down";f(t)||(h({...m,[n]:t}),p?.(t),g.recordEvent("jetpack_ai_feedback",{type:o,rating:t,media_library_id:d.mediaLibraryId||null,prompt:d.prompt||null,revised_prompt:d.revisedPrompt||null,block:d.block||null}))};return React.createElement("div",{className:"ai-assistant-feedback__selection"},React.createElement(r.Tooltip,{text:__("I like this","jetpack")},React.createElement(r.Button,{disabled:e,icon:i.A,onClick:()=>v(!0),iconSize:t,showTooltip:!1,className:(0,c.A)({"ai-assistant-feedback__thumb-selected":f("thumbs-up")})})),React.createElement(r.Tooltip,{text:__("I don't find this useful","jetpack")},React.createElement(r.Button,{disabled:e,icon:l.A,onClick:()=>v(!1),iconSize:t,showTooltip:!1,className:(0,c.A)({"ai-assistant-feedback__thumb-selected":f("thumbs-down")})})))}},46381:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(56427),r=n(86087),s=n(27723),o=n(51113),i=n(19783);const __=s.__;function l({onGuidelinesClick:e,onFeedbackClick:t}){const n=(0,r.useCallback)((()=>{e?.()}),[e]),s=(0,r.useCallback)((()=>{t?.()}),[t]);return React.createElement(React.Fragment,null,React.createElement("div",{className:"ai-image-modal__footer-disclaimer"},React.createElement(o.A,{icon:i.A}),React.createElement("span",null,__("Generated images could be inaccurate, biased or include text.","jetpack")),React.createElement(a.Button,{variant:"link",className:"ai-image-modal__guidelines-button",href:"https://jetpack.com/redirect/?source=ai-guidelines",target:"_blank",onClick:n},React.createElement("span",null,__("Guidelines","jetpack")," ↗"))),React.createElement(a.Button,{variant:"link",className:"ai-image-modal__feedback-button",href:"https://jetpack.com/redirect/?source=jetpack-ai-feedback",target:"_blank",onClick:s},React.createElement("span",null,__("Give feedback","jetpack")," ↗")))}},6754:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(56427),r=n(13022);function s({state:e}){return React.createElement("div",{className:(0,r.A)("jetpack-ai-status-indicator__icon-wrapper",{[`is-${e}`]:!0})},React.createElement(a.Spinner,null))}},68203:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(32569);function r({duration:e,className:t}){return React.createElement("span",{className:t},(0,a.f)(e,{addDecimalPart:!1}))}},32569:(e,t,n)=>{"use strict";function a(e,{addDecimalPart:t=!1,showMinutes:n=!0,showHours:a=!1}={}){const r=Math.floor(e/36e5),s=Math.floor(e/6e4)%60,o=Math.floor(e/1e3)%60,i=Math.floor(e/10)%100,l=[r>0||a?r.toString().padStart(2,"0")+":":"",r>0||s>0||n?s.toString().padStart(2,"0")+":":"",o.toString().padStart(2,"0")];return t&&l.push("."+i.toString().padStart(2,"0")),l.join("")}n.d(t,{f:()=>a})},27802:(e,t,n)=>{"use strict";n.d(t,{$I:()=>i.A,AK:()=>l.AK,FC:()=>a.FC,HL:()=>r.A,N0:()=>a.N0,Yj:()=>l.Yj,wS:()=>s.A,z3:()=>o.A});var a=n(42299),r=n(11497),s=n(6754),o=n(68203),i=n(46381),l=n(63098)},63098:(e,t,n)=>{"use strict";n.d(t,{AK:()=>E,Kw:()=>w,Yj:()=>k,k9:()=>y});var a=n(56427),r=n(86087),s=n(27723),o=n(83883),i=n(51113),l=n(13022),c=n(42154),u=n(78836),d=n(11497);const __=s.__,p="warning",m="error",h="success",g="info",f={[g]:null,[p]:null,[m]:c.A,[h]:o.A};function v({severity:e=g,icon:t=null,aiFeedbackThumbsOptions:n={showAIFeedbackThumbs:!1,ratedItem:"",prompt:"",block:null,onRate:()=>{}},children:a}){return React.createElement("div",{className:(0,l.A)("jetpack-ai-assistant__message",`jetpack-ai-assistant__message-severity-${e}`)},(f[e]||t)&&React.createElement(i.A,{icon:f[e]||t}),React.createElement("div",{className:"jetpack-ai-assistant__message-content"},a),n.showAIFeedbackThumbs&&n.prompt&&React.createElement(d.A,{disabled:!1,ratedItem:n.ratedItem,feature:"ai-assistant",options:{prompt:n.prompt,block:n.block},onRate:n.onRate}))}function b(){return React.createElement(a.ExternalLink,{href:"https://jetpack.com/redirect/?source=ai-guidelines"},__("Learn more","jetpack"))}function k({aiFeedbackThumbsOptions:e={showAIFeedbackThumbs:!1,ratedItem:"",prompt:"",block:null,onRate:()=>{}}}){return React.createElement(v,{aiFeedbackThumbsOptions:e},React.createElement("span",null,__("AI-generated content could be inaccurate or biased.","jetpack")),React.createElement(b,null))}function y(){const e=__("You've reached this month's request limit, per our fair usage policy","jetpack"),t=(0,r.createInterpolateElement)(e,{link:React.createElement(a.ExternalLink,{href:"https://jetpack.com/redirect/?source=ai-assistant-fair-usage-policy"})});return React.createElement(v,{severity:p},t)}function E({requestsRemaining:e,severity:t,onUpgradeClick:n,upgradeUrl:r}){let o=t;return null==o&&(o=e>0?g:p),React.createElement(v,{severity:o},React.createElement("span",null,(0,s.sprintf)( +(()=>{var e,t,n,r,a={7675:(e,t,n)=>{"use strict";n.d(t,{y:()=>l});var r=n(76416),a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a{const v=Object.assign({},l);let b;function k(){b.abort(),document.hidden||A()}v.accept||(v.accept=s),h||document.addEventListener("visibilitychange",k);let y=o,E=0;function w(){document.removeEventListener("visibilitychange",k),window.clearTimeout(E),b.abort()}null==n||n.addEventListener("abort",(()=>{w(),t()}));const _=null!=g?g:window.fetch,C=null!=u?u:c;async function A(){var n;b=new AbortController;try{const n=await _(e,Object.assign(Object.assign({},f),{headers:v,signal:b.signal}));await C(n),await(0,r.q5)(n.body,(0,r.iv)((0,r.VL)((e=>{e?v[i]=e:delete v[i]}),(e=>{y=e}),d))),null==p||p(),w(),t()}catch(e){if(!b.signal.aborted)try{const t=null!==(n=null==m?void 0:m(e))&&void 0!==n?n:y;window.clearTimeout(E),E=window.setTimeout(A,t)}catch(e){w(),a(e)}}}A()}))}function c(e){const t=e.headers.get("content-type");if(!(null==t?void 0:t.startsWith(s)))throw new Error(`Expected content-type to be ${s}, Actual: ${t}`)}},76416:(e,t,n)=>{"use strict";async function r(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function a(e){let t,n,r,a=!1;return function(s){void 0===t?(t=s,n=0,r=-1):t=function(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(t,s);const o=t.length;let i=0;for(;n0){const n=a.decode(s.subarray(0,i)),o=i+(32===s[i+1]?2:1),l=a.decode(s.subarray(o));switch(n){case"data":r.data=r.data?r.data+"\n"+l:l;break;case"event":r.event=l;break;case"id":e(r.id=l);break;case"retry":const n=parseInt(l,10);isNaN(n)||t(r.retry=n)}}}}function o(){return{data:"",event:"",id:"",retry:void 0}}n.d(t,{VL:()=>s,iv:()=>a,q5:()=>r})},95723:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(84265);let a,s,o,i;const l=/<(\/)?(\w+)\s*(\/)?>/g;function c(e,t,n,r,a){return{element:e,tokenStart:t,tokenLength:n,prevOffset:r,leadingTextStart:a,children:[]}}const u=e=>{const t="object"==typeof e,n=t&&Object.values(e);return t&&n.length&&n.every((e=>(0,r.isValidElement)(e)))};function d(e){const t=function(){const e=l.exec(a);if(null===e)return["no-more-tokens"];const t=e.index,[n,r,s,o]=e,i=n.length;if(o)return["self-closed",s,t,i];if(r)return["closer",s,t,i];return["opener",s,t,i]}(),[n,u,d,h]=t,g=i.length,f=d>s?s:null;if(!e[u])return p(),!1;switch(n){case"no-more-tokens":if(0!==g){const{leadingTextStart:e,tokenStart:t}=i.pop();o.push(a.substr(e,t))}return p(),!1;case"self-closed":return 0===g?(null!==f&&o.push(a.substr(f,d-f)),o.push(e[u]),s=d+h,!0):(m(c(e[u],d,h)),s=d+h,!0);case"opener":return i.push(c(e[u],d,h,d+h,f)),s=d+h,!0;case"closer":if(1===g)return function(e){const{element:t,leadingTextStart:n,prevOffset:s,tokenStart:l,children:c}=i.pop(),u=e?a.substr(s,e-s):a.substr(s);u&&c.push(u);null!==n&&o.push(a.substr(n,l-n));o.push((0,r.cloneElement)(t,null,...c))}(d),s=d+h,!0;const t=i.pop(),n=a.substr(t.prevOffset,d-t.prevOffset);t.children.push(n),t.prevOffset=d+h;const l=c(t.element,t.tokenStart,t.tokenLength,d+h);return l.children=t.children,m(l),s=d+h,!0;default:return p(),!1}}function p(){const e=a.length-s;0!==e&&o.push(a.substr(s,e))}function m(e){const{element:t,tokenStart:n,tokenLength:s,prevOffset:o,children:l}=e,c=i[i.length-1],u=a.substr(c.prevOffset,n-c.prevOffset);u&&c.children.push(u),c.children.push((0,r.cloneElement)(t,null,...l)),c.prevOffset=o||n+s}t.default=(e,t)=>{if(a=e,s=0,o=[],i=[],l.lastIndex=0,!u(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are React Elements");do{}while(d(t));return(0,r.createElement)(r.Fragment,null,...o)}},82170:(e,t,n)=>{"use strict";var r=n(98504);Object.defineProperty(t,"__esModule",{value:!0});var a={createInterpolateElement:!0,Platform:!0,renderToString:!0,RawHTML:!0};Object.defineProperty(t,"Platform",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"RawHTML",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"createInterpolateElement",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"renderToString",{enumerable:!0,get:function(){return u.default}});var s=r(n(95723)),o=n(84265);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var i=n(81649);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var l=n(98219);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var c=r(n(52595)),u=r(n(54852)),d=r(n(94468))},52595:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={OS:"web",select:e=>"web"in e?e.web:e.default,isWeb:!0}},94468:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({children:e,...t}){let n="";return r.Children.toArray(e).forEach((e=>{"string"==typeof e&&""!==e.trim()&&(n+=e)})),(0,r.createElement)("div",{dangerouslySetInnerHTML:{__html:n},...t})};var r=n(84265)},81649:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createPortal",{enumerable:!0,get:function(){return r.createPortal}}),Object.defineProperty(t,"createRoot",{enumerable:!0,get:function(){return a.createRoot}}),Object.defineProperty(t,"findDOMNode",{enumerable:!0,get:function(){return r.findDOMNode}}),Object.defineProperty(t,"flushSync",{enumerable:!0,get:function(){return r.flushSync}}),Object.defineProperty(t,"hydrate",{enumerable:!0,get:function(){return r.hydrate}}),Object.defineProperty(t,"hydrateRoot",{enumerable:!0,get:function(){return a.hydrateRoot}}),Object.defineProperty(t,"render",{enumerable:!0,get:function(){return r.render}}),Object.defineProperty(t,"unmountComponentAtNode",{enumerable:!0,get:function(){return r.unmountComponentAtNode}});var r=n(75795),a=n(18950)},84265:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Children",{enumerable:!0,get:function(){return r.Children}}),Object.defineProperty(t,"Component",{enumerable:!0,get:function(){return r.Component}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return r.Fragment}}),Object.defineProperty(t,"PureComponent",{enumerable:!0,get:function(){return r.PureComponent}}),Object.defineProperty(t,"StrictMode",{enumerable:!0,get:function(){return r.StrictMode}}),Object.defineProperty(t,"Suspense",{enumerable:!0,get:function(){return r.Suspense}}),Object.defineProperty(t,"cloneElement",{enumerable:!0,get:function(){return r.cloneElement}}),t.concatChildren=function(...e){return e.reduce(((e,t,n)=>(r.Children.forEach(t,((t,a)=>{t&&"string"!=typeof t&&(t=(0,r.cloneElement)(t,{key:[n,a].join()})),e.push(t)})),e)),[])},Object.defineProperty(t,"createContext",{enumerable:!0,get:function(){return r.createContext}}),Object.defineProperty(t,"createElement",{enumerable:!0,get:function(){return r.createElement}}),Object.defineProperty(t,"createRef",{enumerable:!0,get:function(){return r.createRef}}),Object.defineProperty(t,"forwardRef",{enumerable:!0,get:function(){return r.forwardRef}}),Object.defineProperty(t,"isValidElement",{enumerable:!0,get:function(){return r.isValidElement}}),Object.defineProperty(t,"lazy",{enumerable:!0,get:function(){return r.lazy}}),Object.defineProperty(t,"memo",{enumerable:!0,get:function(){return r.memo}}),Object.defineProperty(t,"startTransition",{enumerable:!0,get:function(){return r.startTransition}}),t.switchChildrenNodeName=function(e,t){return e&&r.Children.map(e,((e,n)=>{if("string"==typeof e?.valueOf())return(0,r.createElement)(t,{key:n},e);const{children:a,...s}=e.props;return(0,r.createElement)(t,{key:n,...s},a)}))},Object.defineProperty(t,"useCallback",{enumerable:!0,get:function(){return r.useCallback}}),Object.defineProperty(t,"useContext",{enumerable:!0,get:function(){return r.useContext}}),Object.defineProperty(t,"useDebugValue",{enumerable:!0,get:function(){return r.useDebugValue}}),Object.defineProperty(t,"useDeferredValue",{enumerable:!0,get:function(){return r.useDeferredValue}}),Object.defineProperty(t,"useEffect",{enumerable:!0,get:function(){return r.useEffect}}),Object.defineProperty(t,"useId",{enumerable:!0,get:function(){return r.useId}}),Object.defineProperty(t,"useImperativeHandle",{enumerable:!0,get:function(){return r.useImperativeHandle}}),Object.defineProperty(t,"useInsertionEffect",{enumerable:!0,get:function(){return r.useInsertionEffect}}),Object.defineProperty(t,"useLayoutEffect",{enumerable:!0,get:function(){return r.useLayoutEffect}}),Object.defineProperty(t,"useMemo",{enumerable:!0,get:function(){return r.useMemo}}),Object.defineProperty(t,"useReducer",{enumerable:!0,get:function(){return r.useReducer}}),Object.defineProperty(t,"useRef",{enumerable:!0,get:function(){return r.useRef}}),Object.defineProperty(t,"useState",{enumerable:!0,get:function(){return r.useState}}),Object.defineProperty(t,"useSyncExternalStore",{enumerable:!0,get:function(){return r.useSyncExternalStore}}),Object.defineProperty(t,"useTransition",{enumerable:!0,get:function(){return r.useTransition}});var r=n(51609)},54852:(e,t,n)=>{"use strict";var r=n(98504);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.hasPrefix=v,t.renderAttributes=R,t.renderComponent=S,t.renderElement=x,t.renderNativeComponent=j,t.renderStyle=P;var a=n(21214),s=n(61433),o=n(89877),i=n(84265),l=r(n(94468));const{Provider:c,Consumer:u}=(0,i.createContext)(void 0),d=(0,i.forwardRef)((()=>null)),p=new Set(["string","boolean","number"]),m=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),h=new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),g=new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),f=new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);function v(e,t){return t.some((t=>0===e.indexOf(t)))}function b(e){return"key"===e||"children"===e}function k(e,t){return"style"===e?P(t):t}const y=["accentHeight","alignmentBaseline","arabicForm","baselineShift","capHeight","clipPath","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","dominantBaseline","enableBackground","fillOpacity","fillRule","floodColor","floodOpacity","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","horizAdvX","horizOriginX","imageRendering","letterSpacing","lightingColor","markerEnd","markerMid","markerStart","overlinePosition","overlineThickness","paintOrder","panose1","pointerEvents","renderingIntent","shapeRendering","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","textAnchor","textDecoration","textRendering","underlinePosition","underlineThickness","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","vectorEffect","vertAdvY","vertOriginX","vertOriginY","wordSpacing","writingMode","xmlnsXlink","xHeight"].reduce(((e,t)=>(e[t.toLowerCase()]=t,e)),{}),E=["allowReorder","attributeName","attributeType","autoReverse","baseFrequency","baseProfile","calcMode","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","suppressContentEditableWarning","suppressHydrationWarning","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector"].reduce(((e,t)=>(e[t.toLowerCase()]=t,e)),{}),w=["xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xml:space","xmlns:xlink"].reduce(((e,t)=>(e[t.replace(":","").toLowerCase()]=t,e)),{});function _(e){switch(e){case"htmlFor":return"for";case"className":return"class"}const t=e.toLowerCase();return E[t]?E[t]:y[t]?(0,s.paramCase)(y[t]):w[t]?w[t]:t}function C(e){return e.startsWith("--")?e:v(e,["ms","O","Moz","Webkit"])?"-"+(0,s.paramCase)(e):(0,s.paramCase)(e)}function A(e,t){return"number"!=typeof t||0===t||f.has(e)?t:t+"px"}function x(e,t,n={}){if(null==e||!1===e)return"";if(Array.isArray(e))return N(e,t,n);switch(typeof e){case"string":return(0,o.escapeHTML)(e);case"number":return e.toString()}const{type:r,props:a}=e;switch(r){case i.StrictMode:case i.Fragment:return N(a.children,t,n);case l.default:const{children:e,...r}=a;return j(Object.keys(r).length?"div":null,{...r,dangerouslySetInnerHTML:{__html:e}},t,n)}switch(typeof r){case"string":return j(r,a,t,n);case"function":return r.prototype&&"function"==typeof r.prototype.render?S(r,a,t,n):x(r(a,n),t,n)}switch(r&&r.$$typeof){case c.$$typeof:return N(a.children,a.value,n);case u.$$typeof:return x(a.children(t||r._currentValue),t,n);case d.$$typeof:return x(r.render(a),t,n)}return""}function j(e,t,n,r={}){let a="";if("textarea"===e&&t.hasOwnProperty("value")){a=N(t.value,n,r);const{value:e,...s}=t;t=s}else t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html?a=t.dangerouslySetInnerHTML.__html:void 0!==t.children&&(a=N(t.children,n,r));if(!e)return a;const s=R(t);return m.has(e)?"<"+e+s+"/>":"<"+e+s+">"+a+""}function S(e,t,n,r={}){const a=new e(t,r);"function"==typeof a.getChildContext&&Object.assign(r,a.getChildContext());return x(a.render(),n,r)}function N(e,t,n={}){let r="";e=Array.isArray(e)?e:[e];for(let a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyElement=void 0;t.isEmptyElement=e=>"number"!=typeof e&&("string"==typeof e?.valueOf()||Array.isArray(e)?!e.length:!e)},51113:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(86087);const a=(0,r.forwardRef)((function({icon:e,size:t=24,...n},a){return(0,r.cloneElement)(e,{width:t,height:t,...n,ref:a})}))},66955:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})})},62510:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})})},62599:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(r.Path,{d:"M12.5939 21C14.1472 21 16.1269 20.5701 17.0711 20.1975L16.6447 18.879C16.0964 19.051 14.3299 19.6242 12.6548 19.6242C7.4467 19.6242 4.67513 16.8726 4.67513 12C4.67513 7.21338 7.50762 4.34713 12.2893 4.34713C17.132 4.34713 19.4162 7.55732 19.4162 10.7675C19.4162 14.035 19.0508 15.4968 17.4975 15.4968C16.5838 15.4968 16.0964 14.7803 16.0964 13.9777V7.5H14.4822V8.30255H14.3909C14.1777 7.67198 12.9898 7.12739 11.467 7.2707C9.18274 7.5 7.4467 9.27707 7.4467 11.8567C7.4467 14.5796 8.81726 16.672 11.467 16.758C13.203 16.8153 14.1168 16.0127 14.4822 15.1815H14.5736C14.7563 16.414 16.401 16.8439 17.467 16.8439C20.6954 16.8439 21 13.5764 21 10.7962C21 6.86943 18.0761 3 12.3807 3C6.50254 3 3 6.3535 3 11.9427C3 17.7325 6.38071 21 12.5939 21ZM11.7107 15.2962C9.73096 15.2962 9.03046 13.6051 9.03046 11.7707C9.03046 10.1083 10.0355 8.67516 11.7716 8.67516C13.599 8.67516 14.5736 9.36306 14.5736 11.7707C14.5736 14.1497 13.7513 15.2962 11.7107 15.2962Z"})})},57003:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(r.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})})},27375:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(r.Path,{d:"M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z"})})},83883:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})})},64969:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(r.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})})},68888:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})})},29115:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})})},98248:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(r.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})})},31249:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})})},10991:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})})},24995:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zm-1.338 4.877c-.314.22-.412.452-.412.623 0 .171.098.403.412.623.312.218.783.377 1.338.377.825 0 1.605.233 2.198.648.59.414 1.052 1.057 1.052 1.852 0 .795-.461 1.438-1.052 1.852-.41.286-.907.486-1.448.582v.316a.75.75 0 01-1.5 0v-.316a3.64 3.64 0 01-1.448-.582c-.59-.414-1.052-1.057-1.052-1.852a.75.75 0 011.5 0c0 .171.098.403.412.623.312.218.783.377 1.338.377s1.026-.159 1.338-.377c.314-.22.412-.452.412-.623 0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377-.825 0-1.605-.233-2.198-.648-.59-.414-1.052-1.057-1.052-1.852 0-.795.461-1.438 1.052-1.852a3.64 3.64 0 011.448-.582V7.5a.75.75 0 011.5 0v.316c.54.096 1.039.296 1.448.582.59.414 1.052 1.057 1.052 1.852a.75.75 0 01-1.5 0c0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377s-1.026.159-1.338.377z"})})},93115:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})})},92687:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(78938).A},53512:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})})},84066:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})})},19783:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})})},76277:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(r.Path,{d:"m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z"})})},84008:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(r.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"})})},21679:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,a.jsx)(r.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,a.jsx)(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})]})},82065:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})})},78938:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})})},15788:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M15.5 9.5a1 1 0 100-2 1 1 0 000 2zm0 1.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm-2.25 6v-2a2.75 2.75 0 00-2.75-2.75h-4A2.75 2.75 0 003.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0120.25 15zM9.5 8.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z",fillRule:"evenodd"})})},45459:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})})},41417:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"})})},88669:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z"})})},69457:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})})},40502:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M7 7.2h8.2L13.5 9l1.1 1.1 3.6-3.6-3.5-4-1.1 1 1.9 2.3H7c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.2-.5zm13.8 4V11h-1.5v.3c0 1.1 0 3.5-1 4.5-.3.3-.7.5-1.3.5H8.8l1.7-1.7-1.1-1.1L5.9 17l3.5 4 1.1-1-1.9-2.3H17c.9 0 1.7-.3 2.3-.9 1.5-1.4 1.5-4.2 1.5-5.6z"})})},67709:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.332 5.748c-1.03-.426-2.06.607-1.632 1.636l1.702 3.93 7.481.575c.123.01.123.19 0 .2l-7.483.575-1.7 3.909c-.429 1.029.602 2.062 1.632 1.636l12.265-5.076c1.03-.426 1.03-1.884 0-2.31L6.332 5.748Z"})})},21955:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z"})})},90254:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M6.08 10.103h2.914L9.657 12h1.417L8.23 4H6.846L4 12h1.417l.663-1.897Zm1.463-4.137.994 2.857h-2l1.006-2.857ZM11 16H4v-1.5h7V16Zm1 0h8v-1.5h-8V16Zm-4 4H4v-1.5h4V20Zm7-1.5V20H9v-1.5h6Z"})})},50347:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M19.8 4h-1.5l1 8h1.5l-1-8ZM17 5.8c-.1-1-1-1.8-2-1.8H6.8c-.9 0-1.7.6-1.9 1.4l-1.8 6C2.7 12.7 3.7 14 5 14h4.4l-.8 3.6c-.3 1.3.7 2.4 1.9 2.4h.2c.6 0 1.2-.3 1.6-.8l5-6.6c.3-.4.5-.9.4-1.5L17 5.7Zm-.9 5.9-5 6.6c0 .1-.2.2-.4.2h-.2c-.3 0-.6-.3-.5-.6l.8-3.6c.1-.4 0-.9-.3-1.3s-.7-.6-1.2-.6H4.9c-.3 0-.6-.3-.5-.6l1.8-6c0-.2.3-.4.5-.4h8.2c.3 0 .5.2.5.4l.7 5.4v.4Z"})})},7598:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"m3 12 1 8h1.5l-1-8H3Zm15.8-2h-4.4l.8-3.6c.3-1.3-.7-2.4-1.9-2.4h-.2c-.6 0-1.2.3-1.6.8l-5 6.6c-.3.4-.4.8-.4 1.2v.2l.7 5.4v.2c.2.9 1 1.5 1.9 1.5h8.2c.9 0 1.7-.6 1.9-1.4l1.8-6c.4-1.3-.6-2.6-1.9-2.6Zm.5 2.1-1.8 6c0 .2-.3.4-.5.4H8.8c-.3 0-.5-.2-.5-.4l-.7-5.4v-.4l5-6.6c0-.1.2-.2.4-.2h.2c.3 0 .6.3.5.6l-.8 3.6c-.1.4 0 .9.3 1.3s.7.6 1.2.6h4.4c.3 0 .6.3.5.6Z"})})},11269:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z"})})},76673:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})})},95789:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})})},83822:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"m11.3 17.2-5-5c-.1-.1-.1-.3 0-.4l2.3-2.3-1.1-1-2.3 2.3c-.7.7-.7 1.8 0 2.5l5 5H7.5v1.5h5.3v-5.2h-1.5v2.6zm7.5-6.4-5-5h2.7V4.2h-5.2v5.2h1.5V6.8l5 5c.1.1.1.3 0 .4l-2.3 2.3 1.1 1.1 2.3-2.3c.6-.7.6-1.9-.1-2.5z"})})},7326:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(r.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})})},90311:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5573),a=n(10790);const s=(0,a.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,a.jsx)(r.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"})})},51889:(e,t,n)=>{"use strict";n.d(t,{$4:()=>s,fZ:()=>o,xQ:()=>i});var r=n(54715),a=n(82769);function s(e,t){return 0===t?e.toLowerCase():(0,a.l3)(e,t)}function o(e,t){return 0===t?e.toLowerCase():(0,a.$7)(e)}function i(e,t){return void 0===t&&(t={}),(0,a.fL)(e,(0,r.Cl)({transform:s},t))}},91859:(e,t,n)=>{"use strict";n.d(t,{D:()=>i,f:()=>o});var r=n(54715),a=n(2532),s=n(21644);function o(e){return(0,s.R)(e.toLowerCase())}function i(e,t){return void 0===t&&(t={}),(0,a.W)(e,(0,r.Cl)({delimiter:" ",transform:o},t))}},61433:(e,t,n)=>{"use strict";n.r(t),n.d(t,{camelCase:()=>r.xQ,camelCaseTransform:()=>r.$4,camelCaseTransformMerge:()=>r.fZ,capitalCase:()=>a.D,capitalCaseTransform:()=>a.f,constantCase:()=>s.F,dotCase:()=>o.a,headerCase:()=>i.u,noCase:()=>l.W,paramCase:()=>c.c,pascalCase:()=>u.fL,pascalCaseTransform:()=>u.l3,pascalCaseTransformMerge:()=>u.$7,pathCase:()=>d.y,sentenceCase:()=>p.o,sentenceCaseTransform:()=>p.u,snakeCase:()=>m.L});var r=n(51889),a=n(91859),s=n(55633),o=n(19382),i=n(22774),l=n(2532),c=n(74572),u=n(82769),d=n(70320),p=n(82682),m=n(68963)},55633:(e,t,n)=>{"use strict";n.d(t,{F:()=>o});var r=n(54715),a=n(2532),s=n(88415);function o(e,t){return void 0===t&&(t={}),(0,a.W)(e,(0,r.Cl)({delimiter:"_",transform:s.l},t))}},87399:e=>{!function(){"use strict";var t=[],n=3988292384;function r(e){var t,r,a,s,o=-1;for(t=0,a=e.length;t>>=1:s=s>>>1^n;o=o>>>8^s}return~o}function a(e,n){var r,s,o;if(void 0!==a.crc&&n&&e||(a.crc=~0,e)){for(r=a.crc,s=0,o=e.length;s>>8^t[255&(r^e[s])];return a.crc=r,~r}}!function(){var e,r,a;for(r=0;r<256;r+=1){for(e=r,a=0;a<8;a+=1)1&e?e=n^e>>>1:e>>>=1;t[r]=e>>>0}}(),e.exports=function(e,t){var n;e="string"==typeof e?(n=e,Array.prototype.map.call(n,(function(e){return e.charCodeAt(0)}))):e;return((t?r(e):a(e))>>>0).toString(16)},e.exports.direct=r,e.exports.table=a}()},51601:function(e,t,n){var r;e.exports=(r=r||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&"undefined"!=typeof window&&window.crypto&&(r=window.crypto),!r)try{r=n(42305)}catch(e){}var a=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},i=o.lib={},l=i.Base={extend:function(e){var t=s(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=i.WordArray=l.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,a=e.sigBytes;if(this.clamp(),r%4)for(var s=0;s>>2]>>>24-s%4*8&255;t[r+s>>>2]|=o<<24-(r+s)%4*8}else for(var i=0;i>>2]=n[i>>>2];return this.sigBytes+=a,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=l.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n>>2]>>>24-a%4*8&255;r.push((s>>>4).toString(16)),r.push((15&s).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new c.init(n,t/2)}},p=u.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],a=0;a>>2]>>>24-a%4*8&255;r.push(String.fromCharCode(s))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new c.init(n,t)}},m=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(p.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return p.parse(unescape(encodeURIComponent(e)))}},h=i.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=m.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,a=r.words,s=r.sigBytes,o=this.blockSize,i=s/(4*o),l=(i=t?e.ceil(i):e.max((0|i)-this._minBufferSize,0))*o,u=e.min(4*l,s);if(l){for(var d=0;d>>24)|4278255360&(a<<24|a>>>8)}var s=this._hash.words,o=e[t+0],l=e[t+1],m=e[t+2],h=e[t+3],g=e[t+4],f=e[t+5],v=e[t+6],b=e[t+7],k=e[t+8],y=e[t+9],E=e[t+10],w=e[t+11],_=e[t+12],C=e[t+13],A=e[t+14],x=e[t+15],j=s[0],S=s[1],N=s[2],R=s[3];j=c(j,S,N,R,o,7,i[0]),R=c(R,j,S,N,l,12,i[1]),N=c(N,R,j,S,m,17,i[2]),S=c(S,N,R,j,h,22,i[3]),j=c(j,S,N,R,g,7,i[4]),R=c(R,j,S,N,f,12,i[5]),N=c(N,R,j,S,v,17,i[6]),S=c(S,N,R,j,b,22,i[7]),j=c(j,S,N,R,k,7,i[8]),R=c(R,j,S,N,y,12,i[9]),N=c(N,R,j,S,E,17,i[10]),S=c(S,N,R,j,w,22,i[11]),j=c(j,S,N,R,_,7,i[12]),R=c(R,j,S,N,C,12,i[13]),N=c(N,R,j,S,A,17,i[14]),j=u(j,S=c(S,N,R,j,x,22,i[15]),N,R,l,5,i[16]),R=u(R,j,S,N,v,9,i[17]),N=u(N,R,j,S,w,14,i[18]),S=u(S,N,R,j,o,20,i[19]),j=u(j,S,N,R,f,5,i[20]),R=u(R,j,S,N,E,9,i[21]),N=u(N,R,j,S,x,14,i[22]),S=u(S,N,R,j,g,20,i[23]),j=u(j,S,N,R,y,5,i[24]),R=u(R,j,S,N,A,9,i[25]),N=u(N,R,j,S,h,14,i[26]),S=u(S,N,R,j,k,20,i[27]),j=u(j,S,N,R,C,5,i[28]),R=u(R,j,S,N,m,9,i[29]),N=u(N,R,j,S,b,14,i[30]),j=d(j,S=u(S,N,R,j,_,20,i[31]),N,R,f,4,i[32]),R=d(R,j,S,N,k,11,i[33]),N=d(N,R,j,S,w,16,i[34]),S=d(S,N,R,j,A,23,i[35]),j=d(j,S,N,R,l,4,i[36]),R=d(R,j,S,N,g,11,i[37]),N=d(N,R,j,S,b,16,i[38]),S=d(S,N,R,j,E,23,i[39]),j=d(j,S,N,R,C,4,i[40]),R=d(R,j,S,N,o,11,i[41]),N=d(N,R,j,S,h,16,i[42]),S=d(S,N,R,j,v,23,i[43]),j=d(j,S,N,R,y,4,i[44]),R=d(R,j,S,N,_,11,i[45]),N=d(N,R,j,S,x,16,i[46]),j=p(j,S=d(S,N,R,j,m,23,i[47]),N,R,o,6,i[48]),R=p(R,j,S,N,b,10,i[49]),N=p(N,R,j,S,A,15,i[50]),S=p(S,N,R,j,f,21,i[51]),j=p(j,S,N,R,_,6,i[52]),R=p(R,j,S,N,h,10,i[53]),N=p(N,R,j,S,E,15,i[54]),S=p(S,N,R,j,l,21,i[55]),j=p(j,S,N,R,k,6,i[56]),R=p(R,j,S,N,x,10,i[57]),N=p(N,R,j,S,v,15,i[58]),S=p(S,N,R,j,C,21,i[59]),j=p(j,S,N,R,g,6,i[60]),R=p(R,j,S,N,w,10,i[61]),N=p(N,R,j,S,m,15,i[62]),S=p(S,N,R,j,y,21,i[63]),s[0]=s[0]+j|0,s[1]=s[1]+S|0,s[2]=s[2]+N|0,s[3]=s[3]+R|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,a=8*t.sigBytes;n[a>>>5]|=128<<24-a%32;var s=e.floor(r/4294967296),o=r;n[15+(a+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),n[14+(a+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(n.length+1),this._process();for(var i=this._hash,l=i.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return i},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,a,s,o){var i=e+(t&n|~t&r)+a+o;return(i<>>32-s)+t}function u(e,t,n,r,a,s,o){var i=e+(t&r|n&~r)+a+o;return(i<>>32-s)+t}function d(e,t,n,r,a,s,o){var i=e+(t^n^r)+a+o;return(i<>>32-s)+t}function p(e,t,n,r,a,s,o){var i=e+(n^(t|~r))+a+o;return(i<>>32-s)+t}t.MD5=s._createHelper(l),t.HmacMD5=s._createHmacHelper(l)}(Math),r.MD5)},19382:(e,t,n)=>{"use strict";n.d(t,{a:()=>s});var r=n(54715),a=n(2532);function s(e,t){return void 0===t&&(t={}),(0,a.W)(e,(0,r.Cl)({delimiter:"."},t))}},39904:(e,t)=>{"use strict";var n=/^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;t.validate=function(e){if(!e)return!1;if(e.length>254)return!1;if(!n.test(e))return!1;var t=e.split("@");return!(t[0].length>64)&&!t[1].split(".").some((function(e){return e.length>63}))}},2467:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(n,r){function a(n){e.removeListener(t,s),r(n)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",a),n([].slice.call(arguments))}g(e,t,s,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,n)}(e,a,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function i(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var a,s,o,c;if(i(n),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),o=s[t]),void 0===o)o=s[t]=n,++e._eventsCount;else if("function"==typeof o?o=s[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(a=l(e))>0&&o.length>a&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=u.bind(r);return a.listener=n,r.wrapFn=a,a}function p(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(o=t[0]),o instanceof Error)throw o;var i=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw i.context=o,i}var l=s[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var c=l.length,u=h(l,c);for(n=0;n=0;s--)if(n[s]===t||n[s].listener===t){o=n[s].listener,a=s;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},22774:(e,t,n)=>{"use strict";n.d(t,{u:()=>s});var r=n(54715),a=n(91859);function s(e,t){return void 0===t&&(t={}),(0,a.D)(e,(0,r.Cl)({delimiter:"-"},t))}},58314:e=>{e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},21214:(e,t)=>{"use strict";function n(e){return"[object Object]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=function(e){var t,r;return!1!==n(e)&&(void 0===(t=e.constructor)||!1!==n(r=t.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))}},25700:(e,t,n)=>{"use strict";n.d(t,{g:()=>r});function r(e){return e.toLowerCase()}},20305:e=>{"use strict";function t(e,t,n,r){var a=Number(e[t].meta.id+1).toString(),s="";return"string"==typeof r.docId&&(s="-"+r.docId+"-"),s+a}function n(e,t){var n=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(n+=":"+e[t].meta.subId),"["+n+"]"}function r(e,t,n,r,a){var s=a.rules.footnote_anchor_name(e,t,n,r,a),o=a.rules.footnote_caption(e,t,n,r,a),i=s;return e[t].meta.subId>0&&(i+=":"+e[t].meta.subId),''+o+""}function a(e,t,n){return(n.xhtmlOut?'
    \n':'
    \n')+'
    \n
      \n'}function s(){return"
    \n
    \n"}function o(e,t,n,r,a){var s=a.rules.footnote_anchor_name(e,t,n,r,a);return e[t].meta.subId>0&&(s+=":"+e[t].meta.subId),'
  • '}function i(){return"
  • \n"}function l(e,t,n,r,a){var s=a.rules.footnote_anchor_name(e,t,n,r,a);return e[t].meta.subId>0&&(s+=":"+e[t].meta.subId),' ↩︎'}e.exports=function(e){var c=e.helpers.parseLinkLabel,u=e.utils.isSpace;e.renderer.rules.footnote_ref=r,e.renderer.rules.footnote_block_open=a,e.renderer.rules.footnote_block_close=s,e.renderer.rules.footnote_open=o,e.renderer.rules.footnote_close=i,e.renderer.rules.footnote_anchor=l,e.renderer.rules.footnote_caption=n,e.renderer.rules.footnote_anchor_name=t,e.block.ruler.before("reference","footnote_def",(function(e,t,n,r){var a,s,o,i,l,c,d,p,m,h,g,f=e.bMarks[t]+e.tShift[t],v=e.eMarks[t];if(f+4>v)return!1;if(91!==e.src.charCodeAt(f))return!1;if(94!==e.src.charCodeAt(f+1))return!1;for(l=f+2;l=v||58!==e.src.charCodeAt(++l))return!1;if(r)return!0;for(l++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),c=e.src.slice(f+2,l-2),e.env.footnotes.refs[":"+c]=-1,(d=new e.Token("footnote_reference_open","",1)).meta={label:c},d.level=e.level++,e.tokens.push(d),a=e.bMarks[t],s=e.tShift[t],o=e.sCount[t],i=e.parentType,g=l,p=m=e.sCount[t]+l-(e.bMarks[t]+e.tShift[t]);l=o)&&(94===e.src.charCodeAt(i)&&(91===e.src.charCodeAt(i+1)&&(n=i+2,!((r=c(e,i+1))<0)&&(t||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),a=e.env.footnotes.list.length,e.md.inline.parse(e.src.slice(n,r),e.md,e.env,s=[]),e.push("footnote_ref","",0).meta={id:a},e.env.footnotes.list[a]={content:e.src.slice(n,r),tokens:s}),e.pos=r+1,e.posMax=o,!0))))})),e.inline.ruler.after("footnote_inline","footnote_ref",(function(e,t){var n,r,a,s,o=e.posMax,i=e.pos;if(i+3>o)return!1;if(!e.env.footnotes||!e.env.footnotes.refs)return!1;if(91!==e.src.charCodeAt(i))return!1;if(94!==e.src.charCodeAt(i+1))return!1;for(r=i+2;r=o)&&(r++,n=e.src.slice(i+2,r-1),void 0!==e.env.footnotes.refs[":"+n]&&(t||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+n]<0?(a=e.env.footnotes.list.length,e.env.footnotes.list[a]={label:n,count:0},e.env.footnotes.refs[":"+n]=a):a=e.env.footnotes.refs[":"+n],s=e.env.footnotes.list[a].count,e.env.footnotes.list[a].count++,e.push("footnote_ref","",0).meta={id:a,subId:s,label:n}),e.pos=r,e.posMax=o,!0)))})),e.core.ruler.after("inline","footnote_tail",(function(e){var t,n,r,a,s,o,i,l,c,u,d=!1,p={};if(e.env.footnotes&&(e.tokens=e.tokens.filter((function(e){return"footnote_reference_open"===e.type?(d=!0,c=[],u=e.meta.label,!1):"footnote_reference_close"===e.type?(d=!1,p[":"+u]=c,!1):(d&&c.push(e),!d)})),e.env.footnotes.list)){for(o=e.env.footnotes.list,i=new e.Token("footnote_block_open","",1),e.tokens.push(i),t=0,n=o.length;t0?o[t].count:1,r=0;r{},34436:()=>{},19994:()=>{},59835:()=>{},18546:()=>{},7628:()=>{},87748:()=>{},53290:()=>{},15583:()=>{},81500:()=>{},88904:()=>{},34006:()=>{},57482:()=>{},7683:()=>{},9944:()=>{},38742:()=>{},9383:()=>{},44288:()=>{},39653:()=>{},26075:()=>{},25634:()=>{},49488:()=>{},34229:()=>{},54447:()=>{},19569:()=>{},65486:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={container:"demNsMJjhi7BLY7xhjU5","icon-wrapper":"QiUjdjJSkqh6nH7YMG5A","is-error":"Q080AHcq29J2fc68Hhk5",icon:"hYWbIwhppukXmGnsiT9H","is-warning":"JjHuxWly0HI9C60gorbq","is-info":"Cm8ZFHi3mngl4cj9Gatx","is-success":"ytGBsU015p3LGwOPwFDx"}},77560:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={button:"zI5tJ_qhWE6Oe6Lk75GY","is-icon-button":"tuBt2DLqimiImoqVzPqo",small:"Na39I683LAaSA99REg14",normal:"ipS7tKy9GntCS4R3vekF",icon:"paGLQwtPEaJmtArCcmyK",regular:"lZAo6_oGfclXOO9CC6Rd","full-width":"xJDOiJxTt0R_wSl8Ipz_",loading:"q_tVWqMjl39RcY6WtQA6","external-icon":"CDuBjJp_8jxzx5j6Nept"}},4459:()=>{},84813:()=>{},47842:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={"star-icon":"cuoSlhSNrqf1dozY22Xb",jetpack:"lAIiifeLMmZAPlQ9n9ZR","checkmark-icon":"JLquNpQVlysAamuh5lJO",socialIcon:"cbOwD8Y4tFjwimmtchQI",bluesky:"aLWBKY0yRghEk7tNCgK3",facebook:"aHOlEBGD5EA8NKRw3xTw",instagram:"cL3m0xBYTYhIKI7lCqDB",twitter:"af4Y_zItXvLAOEoSDPSv",linkedin:"f68aqF3XSD1OBvXR1get",tumblr:"xFI0dt3UiXRlRQdqPWkx",google:"q7JEoyymveP6kF747M43",mastodon:"DKOBOTVmTLbh26gUH_73",nextdoor:"n5XodNsuMfMAAvqHFmbw",whatsapp:"fftumuc_lJ6v0tq4UMVR",threads:"inzgC27qxdt7hSdhTWRI"}},59053:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)"}},47876:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={placeholder:"NisihrgiIKl_knpYJtfg",pulse:"R2i0K45dEF157drbVRPI"}},16024:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={container:"VHYulMcpzbr10HWR0iSE","icon-wrapper":"FGpSkMCiIHQjszcV0dbn","close-button":"KoWZcCwhW13xvkEb0QON","main-content":"smrfczkC53EaFM8OJUXs",title:"IKYRWoPwt9xOVEx1wzNS","action-bar":"qM0qY6mPYp1MPN54A3Kg","is-error":"A5YkDkkXuiYgavrY6Nux",icon:"y_IPyP1wIAOhyNaqvXJq","is-warning":"cT5rwuPMZzWvi5o6shMl","is-info":"yo0O3uvNomPsYUXFCpAS","is-success":"oZdDFf1jBLkzn5ICCC6x"}},85335:()=>{},22073:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={reset:"WQVtrU6q0L1Igcj7wCrQ","headline-medium":"UujoBFTnQNY2cWU2SIsH","headline-small":"TeGO5V_thHw5lDAm1_2M","headline-small-regular":"WolQzb2MsSgiNmLtc7_j","title-medium":"hUB0JT8p1T2Hw28N6qC8","title-medium-semi-bold":"gKZWDv5chz3_O3Syp74H","title-small":"zY2No8Ga4b8shbOQGhnv",body:"tIj0D1t8Cc892ikmgFPZ","body-small":"KdcN0BnOaVeVhyLRKqhS","body-extra-small":"dso3Rh3tl3Xv1GumBktz","body-extra-small-bold":"mQ1UlbN9u4Mg9byO8m7v",label:"PItlW5vRExLnTj4a8eLE","m-0":"TwRpPlktzxhmFVeua7P5","mx-0":"zVfqx7gyb3o9mxfGynn1","my-0":"iSHVzNiB9iVleGljaQxy","mt-0":"xqDIp6cNVr_E6RXaiPyD","mr-0":"S8EwaXk1kyPizt6x4WH2","mb-0":"ODX5Vr1TARoLFkDDFooD","ml-0":"cphJ8dCpfimnky7P2FHg","m-1":"PFgIhNxIyiSuNvQjAIYj","mx-1":"M2jKmUzDxvJjjVEPU3zn","my-1":"io15gAh8tMTNbSEfwJKk","mt-1":"rcTN5uw9xIEeMEGL3Xi_","mr-1":"CQSkybjq2TcRM1Xo9COV","mb-1":"hfqOWgq6_MEGdFE82eOY","ml-1":"I8MxZQYTbuu595yfesWA","m-2":"kQkc6rmdpvLKPkyoJtVQ","mx-2":"j6vFPxWuu4Jan2ldoxpp","my-2":"hqr39dC4H_AbactPAkCG","mt-2":"c3dQnMi16C6J6Ecy4283","mr-2":"YNZmHOuRo6hU7zzKfPdP","mb-2":"Db8lbak1_wunpPk8NwKU","ml-2":"ftsYE5J9hLzquQ0tA5dY","m-3":"Det4MHzLUW7EeDnafPzq","mx-3":"h_8EEAztC29Vve1datb5","my-3":"YXIXJ0h1k47u6hzK8KcM","mt-3":"soADBBkcIKCBXzCTuV9_","mr-3":"zSX59ziEaEWGjnpZa4uV","mb-3":"yrVTnq_WBMbejg89c2ZQ","ml-3":"UKtHPJnI2cXBWtPDm5hM","m-4":"guexok_Tqd5Tf52hRlbT","mx-4":"oS1E2KfTBZkJ3F0tN7T6","my-4":"DN1OhhXi6AoBgEdDSbGd","mt-4":"ot2kkMcYHv53hLZ4LSn0","mr-4":"A1krOZZhlQ6Sp8Cy4bly","mb-4":"pkDbXXXL32237M0hokEh","ml-4":"XXv4kDTGvEnQeuGKOPU3","m-5":"yGqHk1a57gaISwkXwXe6","mx-5":"X8cghM358X3DkXLc9aNK","my-5":"GdfSmGwHlFnN2S6xBn1f","mt-5":"yqeuzwyGQ7zG0avrGqi_","mr-5":"g9emeCkuHvYhveiJbfXO","mb-5":"Lvk3dqcyHbZ07QCRlrUQ","ml-5":"r3yQECDQ9qX0XZzXlVAg","m-6":"aQhlPwht2Cz1X_63Miw0","mx-6":"JyHb0vK3wJgpblL9s5j8","my-6":"cY2gULL1lAv6WPNIRuf3","mt-6":"NBWQ9Lwhh_fnry3lg_p7","mr-6":"yIOniNe5E40C8fWvBm5V","mb-6":"t30usboNSyqfQWIwHvT3","ml-6":"Nm_TyFkYCMhOoghoToKJ","m-7":"C4qJKoBXpgKtpmrqtEKB","mx-7":"S93Srbu6NQ_PBr7DmTiD","my-7":"fJj8k6gGJDks3crUZxOS","mt-7":"cW6D6djs7Ppm7fD7TeoV","mr-7":"DuCnqNfcxcP3Z__Yo5Ro","mb-7":"im8407m2fw5vOg7O2zsw","ml-7":"G0fbeBgvz2sh3uTP9gNl","m-8":"kvW3sBCxRxUqz1jrVMJl","mx-8":"tOjEqjLONQdkiYx_XRnw","my-8":"op5hFSx318zgxsoZZNLN","mt-8":"c9WfNHP6TFKWIfLxv52J","mr-8":"sBA75QqcqRwwYSHJh2wc","mb-8":"GpL6idrXmSOM6jB8Ohsf","ml-8":"HbtWJoQwpgGycz8dGzeT","p-0":"uxX3khU88VQ_Ah49Ejsa","px-0":"KX0FhpBKwKzs9fOUdbNz","py-0":"PfK8vKDyN32dnimlzYjz","pt-0":"emxLHRjQuJsImnPbQIzE","pr-0":"kJ8WzlpTVgdViXt8ukP9","pb-0":"tg_UIUI11VBzrTAn2AzJ","pl-0":"uczvl8kaz84oPQJ2DB2R","p-1":"o7UHPcdVK3lt7q3lqV4o","px-1":"IDqEOxvDoYrFYxELPmtX","py-1":"DdywPW2qSYlu2pt8tpO2","pt-1":"npy3hw4A5QSkDicb2CJJ","pr-1":"LgbptTApNY5NwLQvEFAt","pb-1":"WZQy2SZuZso59bUsXXyl","pl-1":"o331apInxNunbYB3SfPE","p-2":"fMPIyD9Vqki1Lrc_yJnG","px-2":"i2pMcTcdrr10IQoiSm_L","py-2":"eA702gn32kwptiI1obXH","pt-2":"o9bGieUKcYc8o0Ij9oZX","pr-2":"SwZcFez1RDqWsOFjB5iG","pb-2":"eHpLc_idmuEqeqCTvqkN","pl-2":"vU39i2B4P1fUTMB2l6Vo","p-3":"JHWNzBnE29awhdu5BEh1","px-3":"X72lGbb56L3KFzC2xQ9N","py-3":"BzfNhRG8wXdCEB5ocQ6e","pt-3":"srV0KSDC83a2fiimSMMQ","pr-3":"lUWfkmbQjCskhcNwkyCm","pb-3":"Ts0dIlc3aTSL7V4cIHis","pl-3":"CzlqQXXhX6MvorArFZ8B","p-4":"TqMPkQtR_DdZuKb5vBoV","px-4":"a7UrjhI69Vetlcj9ZVzz","py-4":"StEhBzGs2Gi5dDEkjhAv","pt-4":"FGneZfZyvYrt1dG0zcnm","pr-4":"APEH216rpdlJWgD2fHc8","pb-4":"oGwXC3ohCic9XnAj6x69","pl-4":"U6gnT9y42ViPNOcNzBwb","p-5":"IpdRLBwnHqbqFrixgbYC","px-5":"HgNeXvkBa9o3bQ5fvFZm","py-5":"tJtFZM3XfPG9v9TSDfN1","pt-5":"PdifHW45QeXYfK568uD8","pr-5":"mbLkWTTZ0Za_BBbFZ5b2","pb-5":"vVWpZpLlWrkTt0hMk8XU","pl-5":"RxfaJj5a1Nt6IavEo5Zl","p-6":"SppJULDGdnOGcjZNCYBy","px-6":"palY2nLwdoyooPUm9Hhk","py-6":"WYw1JvZC0ppLdvSAPhr_","pt-6":"YEEJ9b90ueQaPfiU8aeN","pr-6":"QE0ssnsKvWJMqlhPbY5u","pb-6":"n8yA3jHlMRyLd5UIfoND","pl-6":"tXHmxYnHzbwtfxEaG51n","p-7":"kBTsPKkO_3g_tLkj77Um","px-7":"RyhrFx6Y1FGDrGAAyaxm","py-7":"CBwRpB0bDN3iEdQPPMJO","pt-7":"vQVSq6SvWKbOMu6r4H6b","pr-7":"oBy5__aEADMsH46mrgFX","pb-7":"KVEXoJqf1s92j0JMdNmN","pl-7":"ZMXGNrNaKW3k_3TLz0Fq","p-8":"tuiR9PhkHXhGyEgzRZRI","px-8":"U7454qyWkQNa2iaSJziu","py-8":"VLYIv2GVocjuN93e8HC8","pt-8":"X1rm9DQ1zLGLfogja5Gn","pr-8":"JS7G6kAuqJo5GIuF8S5t","pb-8":"Y8F9ga1TDCMbM1lj4gUz","pl-8":"AJuyNGrI63BOWql719H8"}},25196:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={global:"_fUXxnSp5pagKBp9gSN7"}},85605:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={wrapper:"O5Go3eBOBqWlXy7fX0su","connection-name":"fgQ4OdnJ1svMwDnOKu2H","profile-link":"ArQoWnNoP4okGpEbxF6b",confirmDialog:"QsEfjoVyfc0gVACXTvUM","mark-shared-wrap":"eCH_xkiqbqL0UkJjU_1p","connection-panel":"J2Rz6Qb6mWPyJDF0yoqw","connection-list":"fXYYdRkn3LXtN9YH3354","connection-list-item":"LaK9P7Nfi4ZBH0NhtbSs","connection-item":"tI3FtttoJPuF9AJzCAMv","connection-item-name":"msoMjBB_4Uq5qpRgobsH","learn-more":"RjMLptH6v03AX5ABWBp3","connection-name-wrapper":"z5Do97zRnujyW3Oj0pPJ"}},49514:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={"connection-container":"KQcQQLxH5fI08DfOlKwL"}},71016:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={"connections-list":"Ua6eKcnk_tQQpFlgXMSn","components-notice":"SHqrIEguRfCILRHPyxE9","more-link":"ejyuBjiLmHz_UTFmBnjA","change-settings-button":"smqXe_da1eoP4Agql_Cs","enhanced-features-nudge":"eQZwqSCI_uVWrJ2jIRUA","enabled-connections-notice":"O_ZghPCUG7291iVsp1wx","no-connections-text":"nrOxj0JeSCWwCB4oaR94","broken-connection-btn":"Jxra4242dPPaUy28mM8H","broken-connection-service":"amoEz9VXiwF3eyLxTbOA","broken-connection":"irsbCLZJNayrJ0g_joAn","settings-button":"lIKYDl6xVVtMbvcUDrrn"}},60548:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={container:"OWstrHF6QZdaosKs0b6j",hidden:"HJMFrbZ0khdkKKkocrIK"}},18973:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={confirmation:"udAWaza1u34TkmZZUPq4","header-text":"JsO4jFxFAKjG6Go62bZF",form:"SeoSfJ6eII9O0PiDkl5g","accounts-list":"M6POQFFbhswwolN6D9VN","account-input":"Sk_WQxS97yTokR_rM3Ci","account-label":"CRjatFVv3dQMjG9_Vmjj","submit-wrap":"re3HrL6GJa59uqDgx771","profile-pic":"jPB4ApiYyEswu6AKKJqk","account-info":"JhIphWt8e2X_ee0l7KEZ"}},73842:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={modal:"Mu_jAq5ZcYDM1kmBbxcs","connect-form":"foAsC5GlXOWEzACnxT_P",small:"_7PKKGx44v2H9dJbUltFw","manual-share":"IGOk1gMf5SKkfOKyF7Xc"}},27681:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={wrapper:"pp_WJTHlGIX9bcHCLxJh",title:"IzRyqrcpwjKRBJKEtECz"}},97671:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={"preview-wrapper":"cZuW54OEuUN9yvuE_rNU","preview-image":"vCs0BOExDMOystFhG2wa",container:"sKpch49QzrpontC0DvF7",subtitle:"vOO47kVjHn7i63fQ0bx0",preview:"ziE_jq4PmQmGBedGskf_",remove:"qqGj0rmSJvZs9dyr0u_I","remove-loading":"TJGgifcTHqUtknPqVQpH"}},35270:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={wrapper:"f92zWdEJJIwBvwH5rRzn",disabled:"rBTOWyeewE4VxAqYgjoI","preview-wrapper":"PykCvaqoL7AIDzVKJAtg",notice:"SSMDWFYkP44va5KqPpTP",subtitle:"Q21myqk1zOYB3IH8YuEq","learn-more":"RoerAwwhu_PqirHlSJPz"}},93794:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={notice:"ptn8jt555LOvMXWaoLxs","notice--default":"IVzciZv5S5E8XgR5EsLp","notice--highlight":"OpbDsm3F65Z4K5Bz43cz","notice--warning":"dlrSwB0tyuf1TYcypDec","notice--error":"hkpqil8E11PObwu7TVU2",content:"AeqtA3GRe7sFjKaC9SqL",dismiss:"IArBTmNL2K4du5WPBUhg",actions:"T7E2eJJN4qjwPpv3mcjV"}},87170:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={panel:"U_WW2qLSQA71SJYyITOq"}},5780:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={description:"D8uyjb_rjCf4HTMT0mj0"}},55387:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={"loading-block":"dCsa7WNQhT_7RhRkZih1","loading-text":"VotVfPmHNdU_xItAWEKQ"}},61420:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={wrapper:"dhja1sVSpDACLZ6k4sBy"}},76445:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={prompt:"CW7R8fRQqVKfyXFYiNWR",buttons:"n34j0qWq2EZzYl1jAiej",button:"aIuCL8MdydCJGcrOqp4x",header:"qegtnlYWDc3UnIGPRlQb"}},42475:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={services:"SbpyhN5jnda8H868J3rX","service-list-item":"ONeewrk3aNC1gYJebq7K","service-item":"RoTxOeGFqAwk3pXUZpvF","service-item-info":"AjlYaYB_xi9ciXXCqHIJ","service-basics":"kdYli5nS3b46T57Ih5TQ",heading:"ci8T5eNe1rggYILce596",badges:"W6mPdl5wGQlXfp1hYSK0",badge:"QbcyaAVqz3U_2xlIOZCw",title:"fXvUC1jZNUXR7RSrIylI",description:"d22_aeSA1etqpnckP_Mr",actions:"ddhaNmGMqOySRjR_TtqJ","learn-more":"nnSF_IK4vYviTlCOzPrg","service-panel":"u17AiTny2Jbh35JFAUYw","active-connection":"MyXskAb4aXwO7zitR97z","broken-connection-alert":"hMntEpO6BV5B11lyAitv","service-connection-list":"Y_4JpLfOnXVZKvEs179H","example-wrapper":"jdahJvXCrCw0hA5NP3D3",small:"LLeYGX7Owy6gmpNW88VV","service-connection":"EdjyE9tVLH6lWMoB9z3M","connection-details":"EQQHwkVXRn0caD6J7LqV","profile-pic":"vvlyiVm67wUWF9NhpMA4",disconnect:"zqX6xk8KCGK1_qbYKqY5","connect-form-wrapper":"U_Z9JvOsEQ6BtkH9P1IQ","connect-form":"fNeO_MZFp7cPkgtCdkAF","connect-button":"zK8sijAMFNs2m6WRAoi4","fields-wrapper":"UVvtbZph1hXruamo6ZXw","fields-item":"rFJU1Nr26kL8C6HZax0G","mark-shared-wrap":"zLobzkXnF6jHxNvkfz5_"}},99811:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={"share-buttons":"JUeclE9CucaXRlTL5K9H",x:"rhyZKz4FQtFOFAMwLgLj",whatsapp:"DDRhGoqXUOM6Jug54nEB",facebook:"h57Cabo4jn8Ke77_DLOX",clipboard:"tvNWJpaNzPro4QaItBae",vertical:"p_VTpBCFklSkcb0iiD0K",container:"DyIAUIn_2bkciyB_XtgH",label:"Lx8xScOApJmJdhJF9JWd"}},14150:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={"trigger-wrapper":"kyLdsnatoC0HbIDJQm9S",wrapper:"Syp1HH254tFVzcFG2Zh2",modal:"YABlqQXOGnawHFcJa7zT","share-item-name-wrapper":"vEA7jwVDDYmYUaVhX9QR","share-item-name":"AsH9JOuWehE027IlR7Y2","share-status-wrapper":"hvN5L4O60W8ftCvW1gRX","share-status-success":"aF8rESnbAc_uQUN0H3py","share-status-failure":"mfUKWd8ZvydeEyWeKhJ2","share-status-label":"pvVeQhJ9oNx0CFoHYEit","share-status-icon-tooltip":"fXQtkkrybB5DooWXxt67","tooltip-text":"LVRjzREGBPlLa__A7tdR","share-status-icon":"bJAz31xuwL_vO4V97YfM","dataview-wrapper":"eYjvcy4kG7GH44dIVLYO","connection-name":"Zr_Eo4TmHx_X7UFoJcuM","retry-wrapper":"csen0rABejxv4X3l1cx5"}},53744:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={templateControl:"tfWupx32Rn5hHqVjTzui",customText:"qu9UsV1EEFeFxhU3Wgt5",mediaPicker:"nZhgKYFn6MQoIDGcKrUG"}},88375:()=>{"use strict"},52002:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={templates:"m9360_cMWKFHTNk9xpNz",template:"j4EvSJfKIJLGEIAETiEY","template--active":"dQb3Zpl0puk4V6ezZslo"}},47944:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={panel:"nOZgE6dP_guav2888GAK",modal:"jxndagXCphEhzYfnjHMZ","modal-content":"na9tpJVboVaxVNabSRsr","close-button":"VxWWpt730pSzZCEVjxA3","settings-header":"z14EiGfFuQwKazBW3LpF","settings-section":"LAWYmJPODB8LgzQMzsyx","settings-content":"vVbLRydJFLCVa49hSz83","preview-section":"uw1atyZ2fcJoKjwf6SZW","preview-content":"meKppCUznQhlkjwZuS6G","disabled-tab":"HS7f47n0w2xUqa4wQkwX","modal-description":"dKXzdVKZ7LYvSmUVrl26"}},95051:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={"publicize-notice":"__nV49on4_ijaV8Brnsw","components-notice":"zZ3Pu7E87XyYIdPR2WTt","components-button":"fLC8AaLf3xcKaoJ4Opax"}},76794:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={wrapper:"sP1aklNMfj7lCDxuhWaq",progress:"a6tcXi51GAewl3qx0AVi",duration:"uFtCCGeycoI94JbCnJh8"}},54746:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={wrapper:"h2NGkiVs1r1nf85LtJpF","conversion-notice":"k3Apzwo3v9n0IaHbB8tf"}},44997:e=>{var t=1e3,n=60*t,r=60*n,a=24*r,s=7*a,o=365.25*a;function i(e,t,n,r){var a=t>=1.5*n;return Math.round(e/n)+" "+r+(a?"s":"")}e.exports=function(e,l){l=l||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var i=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!i)return;var l=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*o;case"weeks":case"week":case"w":return l*s;case"days":case"day":case"d":return l*a;case"hours":case"hour":case"hrs":case"hr":case"h":return l*r;case"minutes":case"minute":case"mins":case"min":case"m":return l*n;case"seconds":case"second":case"secs":case"sec":case"s":return l*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(e);if("number"===c&&isFinite(e))return l.long?function(e){var s=Math.abs(e);if(s>=a)return i(e,s,a,"day");if(s>=r)return i(e,s,r,"hour");if(s>=n)return i(e,s,n,"minute");if(s>=t)return i(e,s,t,"second");return e+" ms"}(e):function(e){var s=Math.abs(e);if(s>=a)return Math.round(e/a)+"d";if(s>=r)return Math.round(e/r)+"h";if(s>=n)return Math.round(e/n)+"m";if(s>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},2532:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});var r=n(25700),a=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],s=/[^A-Z0-9]+/gi;function o(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,o=void 0===n?a:n,l=t.stripRegexp,c=void 0===l?s:l,u=t.transform,d=void 0===u?r.g:u,p=t.delimiter,m=void 0===p?" ":p,h=i(i(e,o,"$1\0$2"),c,"\0"),g=0,f=h.length;"\0"===h.charAt(g);)g++;for(;"\0"===h.charAt(f-1);)f--;return h.slice(g,f).split("\0").map(d).join(m)}function i(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}},68530:(e,t,n)=>{"use strict";var r=n(10961);e.exports=function(e,t){var n=this;return r(n.data,e,n.data[t]||a,n),n};var a=[]},35479:(e,t,n)=>{"use strict";var r=n(75466);e.exports=function(e){return Boolean(r(this,e))}},49897:(e,t,n)=>{"use strict";var r=n(74424);e.exports=function(e){var t,n,a,s,o=this,i=-1;r(e,o,o.data);for(;++i{"use strict";var r=n(58314),a=n(58496);e.exports=o;var s=o.prototype;function o(e,t){var n,s=-1;if(!(this instanceof o))return new o(e,t);if("string"==typeof e||r(e)?("string"==typeof t||r(t))&&(n=[{dic:t}]):e&&("length"in e?(n=e,e=e[0]&&e[0].aff):(e.dic&&(n=[e]),e=e.aff)),!e)throw new Error("Missing `aff` in dictionary");if(e=a(e),this.data=Object.create(null),this.compoundRuleCodes=e.compoundRuleCodes,this.replacementTable=e.replacementTable,this.conversion=e.conversion,this.compoundRules=e.compoundRules,this.rules=e.rules,this.flags=e.flags,n)for(;++s{"use strict";e.exports=function(e){var t,n,r,a,s=this,o=e.toString("utf8").split("\n"),i=-1;void 0===s.flags.FORBIDDENWORD&&(s.flags.FORBIDDENWORD=!1);a=s.flags.FORBIDDENWORD;for(;++i{"use strict";e.exports=function(e){return delete this.data[e],this}},92347:(e,t,n)=>{"use strict";var r=n(75466),a=n(91534);e.exports=function(e){var t=this,n=r(t,e,!0);return{correct:t.correct(e),forbidden:Boolean(n&&a(t.flags,"FORBIDDENWORD",t.data[n])),warn:Boolean(n&&a(t.flags,"WARN",t.data[n]))}}},98559:(e,t,n)=>{"use strict";var r=n(41455),a=n(92545),s=n(91534),o=n(75466);e.exports=function(e){var t,n,s,o,c,u,d,p,m,h,g,f,v,b,k,y,E,w,_,C,A,x,j,S,N,R=this,P={},L=[],T={},B=[];if(!(e=a(e.trim(),R.conversion.in))||R.correct(e))return[];N=r(e),o=-1;for(;++o-1;)B.push(e.replace(n[0],n[1])),c=e.indexOf(n[0],c+1);o=-1;for(;++oT[t]?-1:1}(e,t)||function(e,t){var n=r(e),a=r(t);return n===a?0:n===N?-1:a===N?1:void 0}(e,t)||function(e,t){return e.localeCompare(t)}(e,t)})),s=[],j=[],o=-1;for(;++o{"use strict";var r=n(77598);e.exports=function(e,t,n,o){var i,l,c,u,d,p,m,h=-1;(!("NEEDAFFIX"in o.flags)||n.indexOf(o.flags.NEEDAFFIX)<0)&&function(e,t,n){var r=e[t];t in e?r===s?e[t]=n.concat():a.apply(r,n):e[t]=n.concat()}(e,t,n);for(;++h{"use strict";var r=n(73509);e.exports=function(e){var t,n,u,d,p,m,h,g,f,v,b,k,y=Object.create(null),E=Object.create(null),w=Object.create(null),_=[],C={in:[],out:[]},A=[],x=e.toString("utf8"),j=[],S=0,N=x.indexOf("\n");w.KEY=[];for(;N>-1;)R(x.slice(S,N)),S=N+1,N=x.indexOf("\n",S);R(x.slice(S)),N=-1;for(;++N{"use strict";e.exports=function e(t,n,r,a){var s,o,i,l,c,u=-1;for(;++u{"use strict";function t(e){return e===e.toLowerCase()?"l":e===e.toUpperCase()?"u":null}e.exports=function(e){var n=t(e.charAt(0)),r=e.slice(1);if(!r)return n;if(r=t(r),n===r)return n;if("u"===n&&"l"===r)return"s";return null}},74424:(e,t,n)=>{"use strict";var r=n(73509),a=n(10961);e.exports=function(e,t,n){var r=e.toString("utf8"),a=r.indexOf("\n")+1,s=r.indexOf("\n",a);for(;s>-1;)9!==r.charCodeAt(a)&&o(r.slice(a,s),t,n),a=s+1,s=r.indexOf("\n",a);o(r.slice(a),t,n)};var s=/\s/g;function o(e,t,n){for(var o,i,l=e.indexOf("/"),c=e.indexOf("#"),u="";l>-1&&92===e.charCodeAt(l-1);)l=(e=e.slice(0,l-1)+e.slice(l)).indexOf("/",l);c>-1?l>-1&&l-1?(o=e.slice(0,l),u=e.slice(l+1)):o=e,(o=o.trim())&&a(n,o,r(t.flags,u.trim()),t)}},81277:(e,t,n)=>{"use strict";var r=n(91534);e.exports=function(e,t){var n=-1;if(e.data[t])return!r(e.flags,"ONLYINCOMPOUND",e.data[t]);if(t.length>=e.flags.COMPOUNDMIN)for(;++n{"use strict";e.exports=function(e,t,n){return n&&t in e&&n.indexOf(e[t])>-1}},75466:(e,t,n)=>{"use strict";var r=n(92545),a=n(81277),s=n(91534);function o(e,t,n){return s(e,"KEEPCASE",t)||n||s(e,"FORBIDDENWORD",t)}e.exports=function(e,t,n){var i,l=t.trim();if(!l)return null;if(l=r(l,e.conversion.in),a(e,l))return!n&&s(e.flags,"FORBIDDENWORD",e.data[l])?null:l;if(l.toUpperCase()===l){if(i=l.charAt(0)+l.slice(1).toLowerCase(),o(e.flags,e.data[i],n))return null;if(a(e,i))return i}if((i=l.toLowerCase())!==l){if(o(e.flags,e.data[i],n))return null;if(a(e,i))return i}return null}},92545:e=>{"use strict";e.exports=function(e,t){var n=-1;for(;++n{"use strict";e.exports=function(e,n){var r,a=0;if(!n)return t;if("long"===e.FLAG){for(r=new Array(Math.ceil(n.length/2));a{"use strict";e.exports=function(){return this.flags.WORDCHARS||null}},74572:(e,t,n)=>{"use strict";n.d(t,{c:()=>s});var r=n(54715),a=n(19382);function s(e,t){return void 0===t&&(t={}),(0,a.a)(e,(0,r.Cl)({delimiter:"-"},t))}},82769:(e,t,n)=>{"use strict";n.d(t,{$7:()=>o,fL:()=>i,l3:()=>s});var r=n(54715),a=n(2532);function s(e,t){var n=e.charAt(0),r=e.substr(1).toLowerCase();return t>0&&n>="0"&&n<="9"?"_"+n+r:""+n.toUpperCase()+r}function o(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function i(e,t){return void 0===t&&(t={}),(0,a.W)(e,(0,r.Cl)({delimiter:"",transform:s},t))}},70320:(e,t,n)=>{"use strict";n.d(t,{y:()=>s});var r=n(54715),a=n(19382);function s(e,t){return void 0===t&&(t={}),(0,a.a)(e,(0,r.Cl)({delimiter:"/"},t))}},14936:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(87399),a=n.n(r),s=n(10067),o=n.n(s),i=n(11264),l=n.n(i);const c=o()("photon"),u={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},d="__domain__.invalid",p=`https://${d}`,m="https://i0.wp.com";function h(e,t){let n;try{n=new URL(e,p)}catch{return null}const r="https:"===n.protocol,s=new URL(m);if(o=n.host,/^i[0-2]\.wp\.com$/.test(o))s.pathname=n.pathname,s.hostname=r?"i0.wp.com":n.hostname;else{if(n.search)return null;let e=n.href.replace(`${n.protocol}/`,"");"blob:"===n.protocol&&(e=n.pathname.replace("://","//")),n.hostname===d&&(e=n.pathname),s.pathname=e,s.hostname=function(e,t){if(t)return"i0.wp.com";const n=a()(e),r=l()(n),s="i"+Math.floor(3*r());return c('determined server "%s" to use with "%s"',s,e),s+".wp.com"}(e,"https:"===s.protocol),r&&s.searchParams.set("ssl","1")}var o;if(t)for(const[e,n]of Object.entries(t))"host"!==e&&"hostname"!==e?"secure"!==e||n?s.searchParams.set(u[e]??e,n.toString()):s.protocol="http:":s.hostname=n;return c("generated Photon URL: %s",s.href),s.href}},15762:(e,t,n)=>{"use strict";var r=n(53761);function a(){}function s(){}s.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,s,o){if(o!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:a};return n.PropTypes=n,n}},28120:(e,t,n)=>{e.exports=n(15762)()},53761:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},87072:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>b});const r=2147483647,a=36,s=/^xn--/,o=/[^\0-\x7F]/,i=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=Math.floor,u=String.fromCharCode;function d(e){throw new RangeError(l[e])}function p(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]);const a=function(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}((e=e.replace(i,".")).split("."),t).join(".");return r+a}function m(e){const t=[];let n=0;const r=e.length;for(;n=55296&&a<=56319&&n>1,e+=c(e/t);e>455;r+=a)e=c(e/35);return c(r+36*e/(e+38))},f=function(e){const t=[],n=e.length;let s=0,o=128,i=72,l=e.lastIndexOf("-");l<0&&(l=0);for(let n=0;n=128&&d("not-basic"),t.push(e.charCodeAt(n));for(let p=l>0?l+1:0;p=n&&d("invalid-input");const l=(u=e.charCodeAt(p++))>=48&&u<58?u-48+26:u>=65&&u<91?u-65:u>=97&&u<123?u-97:a;l>=a&&d("invalid-input"),l>c((r-s)/t)&&d("overflow"),s+=l*t;const m=o<=i?1:o>=i+26?26:o-i;if(lc(r/h)&&d("overflow"),t*=h}const m=t.length+1;i=g(s-l,m,0==l),c(s/m)>r-o&&d("overflow"),o+=c(s/m),s%=m,t.splice(s++,0,o)}var u;return String.fromCodePoint(...t)},v=function(e){const t=[],n=(e=m(e)).length;let s=128,o=0,i=72;for(const n of e)n<128&&t.push(u(n));const l=t.length;let p=l;for(l&&t.push("-");p=s&&tc((r-o)/m)&&d("overflow"),o+=(n-s)*m,s=n;for(const n of e)if(nr&&d("overflow"),n===s){let e=o;for(let n=a;;n+=a){const r=n<=i?1:n>=i+26?26:n-i;if(eString.fromCodePoint(...e)},decode:f,encode:v,toASCII:function(e){return p(e,(function(e){return o.test(e)?"xn--"+v(e):e}))},toUnicode:function(e){return p(e,(function(e){return s.test(e)?f(e.slice(4).toLowerCase()):e}))}}},24588:(e,t)=>{"use strict";var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function a(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,s,o=[];for(s in"string"!=typeof t&&(t="?"),e)if(n.call(e,s)){if((r=e[s])||null!=r&&!isNaN(r)||(r=""),s=a(s),r=a(r),null===s||null===r)continue;o.push(s+"="+r)}return o.length?t+o.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,a={};t=n.exec(e);){var s=r(t[1]),o=r(t[2]);null===s||null===o||s in a||(a[s]=o)}return a}},18950:(e,t,n)=>{"use strict";var r=n(75795);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},86212:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(51609),a=n(76221),s=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],_n=!0,r=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(_n=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,a=e}finally{try{!_n&&o.return&&o.return()}finally{if(r)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=a.TT&&a.XD;const i=function(){var e=(0,a.Y9)(),t=s(e,1)[0],n=(0,r.useState)(t),i=s(n,2),l=i[0],c=i[1];return(0,r.useEffect)((function(){if(o){var e=function(){var e=(0,a.Y9)(),t=s(e,1)[0];c(t)};return document.addEventListener(a.XD.event,e),function(){document.removeEventListener(a.XD.event,e)}}}),[]),l}},76221:(e,t,n)=>{"use strict";n.d(t,{TT:()=>s,XD:()=>o,Y9:()=>i});var r="undefined"!=typeof document,a=[{hidden:"hidden",event:"visibilitychange",state:"visibilityState"},{hidden:"webkitHidden",event:"webkitvisibilitychange",state:"webkitVisibilityState"},{hidden:"mozHidden",event:"mozvisibilitychange",state:"mozVisibilityState"},{hidden:"msHidden",event:"msvisibilitychange",state:"msVisibilityState"},{hidden:"oHidden",event:"ovisibilitychange",state:"oVisibilityState"}],s=r&&Boolean(document.addEventListener),o=function(){if(!s)return null;var e=!0,t=!1,n=void 0;try{for(var r,o=a[Symbol.iterator]();!(e=(r=o.next()).done);e=!0){var i=r.value;if(i.hidden in document)return i}}catch(e){t=!0,n=e}finally{try{!e&&o.return&&o.return()}finally{if(t)throw n}}return null}(),i=function(){if(!o)return[!0,"visible"];var e=o.hidden,t=o.state;return[!document[e],document[t]]}},32047:e=>{"use strict";function t(e,n){var r;if(Array.isArray(n))for(r=0;r{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},94107:(e,t,n)=>{"use strict";n.d(t,{A:()=>C});var r=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n0},e.prototype.connect_=function(){a&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){a&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;i.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),u=function(e,t){for(var n=0,r=Object.keys(t);n0},e}(),w="undefined"!=typeof WeakMap?new WeakMap:new r,_=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=c.getInstance(),r=new E(t,n,this);w.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){_.prototype[e]=function(){var t;return(t=w.get(this))[e].apply(t,arguments)}}));const C=void 0!==s.ResizeObserver?s.ResizeObserver:_},11264:e=>{"use strict";var t=256,n=[],r=window,a=Math.pow(t,6),s=Math.pow(2,52),o=2*s,i=255,l=Math.random;function c(e){var n,r=e.length,a=this,s=0,o=a.i=a.j=0,l=a.S=[];for(r||(e=[r++]);s=o;)e/=2,n/=2,r>>>=1;return(e+r)/n}},e.exports.resetGlobal=function(){Math.random=l},d(Math.random(),n)},82682:(e,t,n)=>{"use strict";n.d(t,{o:()=>i,u:()=>o});var r=n(54715),a=n(2532),s=n(21644);function o(e,t){var n=e.toLowerCase();return 0===t?(0,s.R)(n):n}function i(e,t){return void 0===t&&(t={}),(0,a.W)(e,(0,r.Cl)({delimiter:" ",transform:o},t))}},68963:(e,t,n)=>{"use strict";n.d(t,{L:()=>s});var r=n(54715),a=n(19382);function s(e,t){return void 0===t&&(t={}),(0,a.a)(e,(0,r.Cl)({delimiter:"_"},t))}},48931:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(1455),a=n.n(r);const s="default"in a()?a().default:a()},87286:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(10067),a=n.n(r),s=n(53664);const o=a()("jetpack-ai-client:ask-question");async function i(e,{postId:t=null,fromCache:n=!1,feature:r,functions:a,model:i}={}){return o("Asking question: %o. options: %o",e,{postId:t,fromCache:n,feature:r,functions:a,model:i}),new s.A({question:e,options:{postId:t,feature:r,fromCache:n,functions:a,model:i}})}},31439:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(10067),a=n.n(r),s=n(51391);const o=a()("jetpack-ai-client:ask-question-sync");async function i(e,t={}){o("Asking question with no streaming: %o. options: %o",e,t);let n=null;try{n=(await(0,s.A)()).token}catch(e){return o("Error getting token: %o",e),Promise.reject(e)}const r={...Array.isArray(e)?{messages:e}:{question:e},...t,stream:!1},a={Authorization:`Bearer ${n}`,"Content-Type":"application/json"};try{const e=await fetch("https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query",{method:"POST",headers:a,body:JSON.stringify(r)}).then((e=>e.json()));return e?.data?.status&&e?.data?.status>200?(o("Error generating prompt: %o",e),Promise.reject(e)):e.choices?.[0]?.message?.content}catch(e){return o("Error asking question: %o",e),Promise.reject(e)}}},57745:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(10067),a=n.n(r),s=n(51391);const o=a()("jetpack-ai-client:audio-transcription");async function i(e,t,n){o("Transcribing audio: %o. Feature: %o",e,t);let r="";try{r=(await(0,s.A)()).token}catch(e){return o("Error getting token: %o",e),Promise.reject(e)}const a=new FormData;a.append("audio_file",e);try{const e={Authorization:`Bearer ${r}`},s="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-transcription"+(t?`?feature=${t}`:"");return fetch(s,{method:"POST",body:a,headers:e,signal:n??void 0}).then((e=>(o("Transcription response: %o",e),e.ok?e.json().then((e=>e?.text)):e.json().then((e=>Promise.reject(e))))))}catch(e){return o("Transcription error response: %o",e),Promise.reject(e)}}},70629:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(94715),a=n(13022),s=n(51609),o=n.n(s),i=n(6754);function l({className:e,disabled:t=!1,value:n="",placeholder:s="",isTransparent:l=!1,state:c="init",onChange:u,banner:d=null,error:p=null,actions:m=null,message:h=null,promptUserInputRef:g=null,wrapperRef:f=null}){return o().createElement("div",{className:(0,a.A)("jetpack-components-ai-control__container-wrapper",e),ref:f},p,o().createElement("div",{className:"jetpack-components-ai-control__container"},d,o().createElement("div",{className:(0,a.A)("jetpack-components-ai-control__wrapper",{"is-transparent":l})},o().createElement(i.A,{state:c}),o().createElement("div",{className:"jetpack-components-ai-control__input-wrapper"},o().createElement(r.PlainText,{value:n,onChange:u,placeholder:s,className:"jetpack-components-ai-control__input",disabled:t,ref:g})),m),h))}},71417:(e,t,n)=>{"use strict";n.d(t,{A:()=>E});var r=n(56427),a=n(29491),s=n(86087),o=n(27723),i=n(51113),l=n(31249),c=n(62510),u=n(76673),d=n(40502),p=n(83883),m=n(10067),h=n.n(m),g=n(51609),f=n.n(g),v=n(63098),b=n(70629);const __=o.__,k=h()("jetpack-ai-client:block-ai-control");function y({disabled:e=!1,value:t="",placeholder:n="",showAccept:o=!1,acceptLabel:m=__("Accept","jetpack"),showButtonLabels:h=!0,isTransparent:g=!1,state:y="init",showGuideLine:E=!1,customFooter:w=null,onChange:_,onSend:C,onStop:A,onAccept:x,onDiscard:j,showRemove:S=!1,banner:N=null,error:R=null,lastAction:P},L){const T="requesting"===y||"suggesting"===y,[B,M]=(0,s.useState)(!1),[I,D]=(0,s.useState)(t||null),F=(0,s.useRef)(null);(0,s.useImperativeHandle)(L,(()=>F.current)),(0,s.useEffect)((()=>{B&&F?.current?.focus()}),[B]);const z=(0,s.useCallback)((()=>{D(t),M(!1),C?.(t)}),[t]),O=(0,s.useCallback)((e=>{_?.(e),"init"!==y&&M(I?e!==I:e.length>0)}),[I,y]),H=(0,s.useCallback)((()=>{j?.()}),[]),U=(0,s.useCallback)((()=>{k("cancelEdit, revert to last value",I),_?.(I||""),M(!1)}),[I]);(0,a.useKeyboardShortcut)("mod+enter",(()=>{o&&x?.()}),{target:F}),(0,a.useKeyboardShortcut)("enter",(e=>{e.preventDefault(),z()}),{target:F});const V=f().createElement(f().Fragment,null,(!o||B)&&f().createElement("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper"},T?f().createElement(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:A,variant:"secondary",label:__("Stop request","jetpack")},h?__("Stop","jetpack"):f().createElement(i.A,{icon:l.A})):f().createElement(f().Fragment,null,B&&f().createElement(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:U,variant:"secondary",label:__("Cancel","jetpack")},h?__("Cancel","jetpack"):f().createElement(i.A,{icon:l.A})),S&&!B&&!t?.length&&j&&f().createElement(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:H,variant:"secondary",label:__("Cancel","jetpack")},h?__("Cancel","jetpack"):f().createElement(i.A,{icon:l.A})),t?.length>0&&f().createElement(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:z,variant:"primary",disabled:!t?.length||e,label:__("Send request","jetpack")},h?__("Generate","jetpack"):f().createElement(i.A,{icon:c.A})))),o&&!B&&f().createElement("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper"},(t?.length>0||null===I)&&f().createElement(r.ButtonGroup,null,f().createElement(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Discard","jetpack"),onClick:H,tooltipPosition:"top"},f().createElement(i.A,{icon:u.A})),f().createElement(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Regenerate","jetpack"),onClick:()=>C?.(t),tooltipPosition:"top",disabled:!t?.length||null===t||e},f().createElement(i.A,{icon:d.A}))),f().createElement(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:x,variant:"primary",label:m},h?m:f().createElement(i.A,{icon:p.A})))),q=E&&!T&&!B&&(w||f().createElement(v.Yj,{aiFeedbackThumbsOptions:{showAIFeedbackThumbs:!0,ratedItem:"ai-assistant",prompt:P,block:"ai-assistant"}}));return f().createElement(b.A,{disabled:e||T,value:t,placeholder:n,isTransparent:g,state:y,onChange:O,banner:N,error:R,actions:V,message:q,promptUserInputRef:F})}const E=(0,g.forwardRef)(y)},61:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(56427),a=n(29491),s=n(86087),o=n(27723),i=n(51113),l=n(31249),c=n(62510),u=n(95789),d=n(51609),p=n.n(d),m=n(63098),h=n(70629);const __=o.__;function g({className:e,disabled:t=!1,value:n="",placeholder:o="",showButtonLabels:d=!0,isTransparent:g=!1,state:f="init",showGuideLine:v=!1,error:b,requestsRemaining:k,showUpgradeMessage:y=!1,showFairUsageMessage:E=!1,upgradeUrl:w,wrapperRef:_,onChange:C,onSend:A,onStop:x,onClose:j,onUndo:S,onUpgrade:N,onTryAgain:R,lastAction:P,blockType:L},T){const B="requesting"===f||"suggesting"===f,[M,I]=(0,s.useState)(!1),[D,F]=(0,s.useState)(n||null),z=(0,s.useRef)(null),O=n?.length<=0&&"done"===f;(0,s.useImperativeHandle)(T,(()=>z.current)),(0,s.useEffect)((()=>{M&&z?.current?.focus()}),[M]);const H=(0,s.useCallback)((()=>{F(n),I(!1),A?.(n)}),[A,n]),U=(0,s.useCallback)((e=>{C?.(e),"init"!==f&&I(D?e!==D:e.length>0)}),[C,D,f]),V=(0,s.useCallback)((()=>{x?.()}),[x]),q=(0,s.useCallback)((()=>{j?.()}),[j]),G=(0,s.useCallback)((()=>{S?.()}),[S]),$=(0,s.useCallback)((e=>{N?.(e)}),[N]),W=(0,s.useCallback)((()=>{R?.()}),[R]);(0,a.useKeyboardShortcut)("enter",(e=>{e.preventDefault(),H()}),{target:z});const Z=p().createElement(p().Fragment,null,B?p().createElement(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:V,variant:"secondary",label:__("Stop request","jetpack")},d?__("Stop","jetpack"):p().createElement(i.A,{icon:l.A})):p().createElement(p().Fragment,null,n?.length>0&&p().createElement("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper"},p().createElement(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:H,variant:"primary",disabled:!n?.length||t,label:__("Send request","jetpack")},d?__("Generate","jetpack"):p().createElement(i.A,{icon:c.A}))),O&&p().createElement("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper"},p().createElement(r.ButtonGroup,null,p().createElement(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Undo","jetpack"),onClick:G,tooltipPosition:"top"},p().createElement(i.A,{icon:u.A})),p().createElement(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Close","jetpack"),onClick:q,variant:"tertiary"},__("Close","jetpack"))))));let J=null;return b?.message?J=p().createElement(m.Kw,{error:b.message,code:b.code,onTryAgainClick:W,onUpgradeClick:$,upgradeUrl:w}):E?J=p().createElement(m.k9,null):y?J=p().createElement(m.AK,{requestsRemaining:k,onUpgradeClick:$,upgradeUrl:w}):v&&(J=O?p().createElement(m.Yj,{aiFeedbackThumbsOptions:{showAIFeedbackThumbs:!0,ratedItem:"ai-assistant",prompt:P,block:L}}):p().createElement(m.Yj,null)),p().createElement(h.A,{className:e,disabled:t||B,value:n,placeholder:o,isTransparent:g,state:f,onChange:U,actions:Z,message:J,promptUserInputRef:z,wrapperRef:_})}const f=(0,d.forwardRef)(g)},42299:(e,t,n)=>{"use strict";n.d(t,{FC:()=>a.A,N0:()=>r.A});n(70629);var r=n(71417),a=n(61)},11497:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(85985),a=n(56427),s=n(86087),o=n(27723),i=n(7598),l=n(50347),c=n(13022);const __=o.__;function u({disabled:e=!1,iconSize:t=24,ratedItem:n="",feature:o="",savedRatings:u={},options:d={},onRate:p}){if(!function(e){return!0===(0,r.FB)(e).available}("ai-response-feedback"))return null;const[m,h]=(0,s.useState)({}),{tracks:g}=(0,r.st)();(0,s.useEffect)((()=>{const e={...u,...m};JSON.stringify(e)!==JSON.stringify(m)&&h(e)}),[u]);const f=e=>!!m[n]&&m[n]===e,v=e=>{const t=e?"thumbs-up":"thumbs-down";f(t)||(h({...m,[n]:t}),p?.(t),g.recordEvent("jetpack_ai_feedback",{type:o,rating:t,media_library_id:d.mediaLibraryId||null,prompt:d.prompt||null,revised_prompt:d.revisedPrompt||null,block:d.block||null}))};return React.createElement("div",{className:"ai-assistant-feedback__selection"},React.createElement(a.Tooltip,{text:__("I like this","jetpack")},React.createElement(a.Button,{disabled:e,icon:i.A,onClick:()=>v(!0),iconSize:t,showTooltip:!1,className:(0,c.A)({"ai-assistant-feedback__thumb-selected":f("thumbs-up")})})),React.createElement(a.Tooltip,{text:__("I don't find this useful","jetpack")},React.createElement(a.Button,{disabled:e,icon:l.A,onClick:()=>v(!1),iconSize:t,showTooltip:!1,className:(0,c.A)({"ai-assistant-feedback__thumb-selected":f("thumbs-down")})})))}},46381:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(56427),a=n(86087),s=n(27723),o=n(51113),i=n(19783);const __=s.__;function l({onGuidelinesClick:e,onFeedbackClick:t}){const n=(0,a.useCallback)((()=>{e?.()}),[e]),s=(0,a.useCallback)((()=>{t?.()}),[t]);return React.createElement(React.Fragment,null,React.createElement("div",{className:"ai-image-modal__footer-disclaimer"},React.createElement(o.A,{icon:i.A}),React.createElement("span",null,__("Generated images could be inaccurate, biased or include text.","jetpack")),React.createElement(r.Button,{variant:"link",className:"ai-image-modal__guidelines-button",href:"https://jetpack.com/redirect/?source=ai-guidelines",target:"_blank",onClick:n},React.createElement("span",null,__("Guidelines","jetpack")," ↗"))),React.createElement(r.Button,{variant:"link",className:"ai-image-modal__feedback-button",href:"https://jetpack.com/redirect/?source=jetpack-ai-feedback",target:"_blank",onClick:s},React.createElement("span",null,__("Give feedback","jetpack")," ↗")))}},6754:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(56427),a=n(13022);function s({state:e}){return React.createElement("div",{className:(0,a.A)("jetpack-ai-status-indicator__icon-wrapper",{[`is-${e}`]:!0})},React.createElement(r.Spinner,null))}},68203:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(32569);function a({duration:e,className:t}){return React.createElement("span",{className:t},(0,r.f)(e,{addDecimalPart:!1}))}},32569:(e,t,n)=>{"use strict";function r(e,{addDecimalPart:t=!1,showMinutes:n=!0,showHours:r=!1}={}){const a=Math.floor(e/36e5),s=Math.floor(e/6e4)%60,o=Math.floor(e/1e3)%60,i=Math.floor(e/10)%100,l=[a>0||r?a.toString().padStart(2,"0")+":":"",a>0||s>0||n?s.toString().padStart(2,"0")+":":"",o.toString().padStart(2,"0")];return t&&l.push("."+i.toString().padStart(2,"0")),l.join("")}n.d(t,{f:()=>r})},27802:(e,t,n)=>{"use strict";n.d(t,{$I:()=>i.A,AK:()=>l.AK,FC:()=>r.FC,HL:()=>a.A,N0:()=>r.N0,Yj:()=>l.Yj,wS:()=>s.A,z3:()=>o.A});var r=n(42299),a=n(11497),s=n(6754),o=n(68203),i=n(46381),l=n(63098)},63098:(e,t,n)=>{"use strict";n.d(t,{AK:()=>E,Kw:()=>w,Yj:()=>k,k9:()=>y});var r=n(56427),a=n(86087),s=n(27723),o=n(83883),i=n(51113),l=n(13022),c=n(42154),u=n(78836),d=n(11497);const __=s.__,p="warning",m="error",h="success",g="info",f={[g]:null,[p]:null,[m]:c.A,[h]:o.A};function v({severity:e=g,icon:t=null,aiFeedbackThumbsOptions:n={showAIFeedbackThumbs:!1,ratedItem:"",prompt:"",block:null,onRate:()=>{}},children:r}){return React.createElement("div",{className:(0,l.A)("jetpack-ai-assistant__message",`jetpack-ai-assistant__message-severity-${e}`)},(f[e]||t)&&React.createElement(i.A,{icon:f[e]||t}),React.createElement("div",{className:"jetpack-ai-assistant__message-content"},r),n.showAIFeedbackThumbs&&n.prompt&&React.createElement(d.A,{disabled:!1,ratedItem:n.ratedItem,feature:"ai-assistant",options:{prompt:n.prompt,block:n.block},onRate:n.onRate}))}function b(){return React.createElement(r.ExternalLink,{href:"https://jetpack.com/redirect/?source=ai-guidelines"},__("Learn more","jetpack"))}function k({aiFeedbackThumbsOptions:e={showAIFeedbackThumbs:!1,ratedItem:"",prompt:"",block:null,onRate:()=>{}}}){return React.createElement(v,{aiFeedbackThumbsOptions:e},React.createElement("span",null,__("AI-generated content could be inaccurate or biased.","jetpack")),React.createElement(b,null))}function y(){const e=__("You've reached this month's request limit, per our fair usage policy","jetpack"),t=(0,a.createInterpolateElement)(e,{link:React.createElement(r.ExternalLink,{href:"https://jetpack.com/redirect/?source=ai-assistant-fair-usage-policy"})});return React.createElement(v,{severity:p},t)}function E({requestsRemaining:e,severity:t,onUpgradeClick:n,upgradeUrl:a}){let o=t;return null==o&&(o=e>0?g:p),React.createElement(v,{severity:o},React.createElement("span",null,(0,s.sprintf)( // translators: %1$d: number of requests remaining -__("You have %1$d requests remaining.","jetpack"),e)),React.createElement(a.Button,{variant:"link",onClick:n,href:r,target:r?"_blank":null},__("Upgrade now","jetpack")))}function w({error:e,code:t,onTryAgainClick:n,onUpgradeClick:r,upgradeUrl:o}){const i=e||__("Something went wrong","jetpack");return React.createElement(v,{severity:m},React.createElement("span",null,(0,s.sprintf)( +__("You have %1$d requests remaining.","jetpack"),e)),React.createElement(r.Button,{variant:"link",onClick:n,href:a,target:a?"_blank":null},__("Upgrade now","jetpack")))}function w({error:e,code:t,onTryAgainClick:n,onUpgradeClick:a,upgradeUrl:o}){const i=e||__("Something went wrong","jetpack");return React.createElement(v,{severity:m},React.createElement("span",null,(0,s.sprintf)( // translators: %1$d: A dynamic error message -__("Error: %1$s","jetpack"),i)),t===u.Or?React.createElement(a.Button,{variant:"link",onClick:r,href:o,target:o?"_blank":null},__("Upgrade now","jetpack")):React.createElement(a.Button,{variant:"link",onClick:n},__("Try again","jetpack")))}},43984:(e,t,n)=>{"use strict";n.d(t,{A4:()=>l,DD:()=>w,DT:()=>P,Gm:()=>g,HM:()=>_,JR:()=>C,K2:()=>x,Rq:()=>R,UA:()=>h,UD:()=>A,br:()=>d,d5:()=>b,eJ:()=>m,fD:()=>p,fv:()=>k,im:()=>o,mI:()=>j,mT:()=>N,oZ:()=>s,pE:()=>f,sn:()=>i,so:()=>r,u0:()=>y,uQ:()=>E,vE:()=>u,yQ:()=>S,yy:()=>c,z5:()=>v});var a=n(27723);const __=a.__,r={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")}},s={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:"🔥"}},o="titleSummary",i="continue",l="simplify",c="correctSpelling",u="generateTitle",d="makeLonger",p="makeShorter",m="changeTone",h="summarize",g="changeLanguage",f="userPrompt",v="jetpackFormCustomPrompt",b="transformListToTable",k="writePostFromList",y=__("Translate","jetpack"),E=__("Change tone","jetpack"),w=__("Correct spelling and grammar","jetpack"),_=__("Simplify","jetpack"),C=__("Summarize","jetpack"),A=__("Make shorter","jetpack"),x=__("Expand","jetpack"),j=__("Turn list into a table","jetpack"),S=__("Write a post from this list","jetpack"),N=__("Generate a post title","jetpack"),R=__("Summary based on title","jetpack"),P=__("Continue writing","jetpack")},2166:(e,t,n)=>{"use strict";n.d(t,{R:()=>o});var a=n(51609),r=n.n(a);const s=(0,a.createContext)({}),o=({value:e,children:t})=>r().createElement(s.Provider,{value:e,children:t})},13965:(e,t,n)=>{"use strict";n.d(t,{Rb:()=>a.R});var a=n(2166);n(59886),n(53471)},53471:(e,t,n)=>{"use strict";n(51609),n(78836),n(13965)},59886:(e,t,n)=>{"use strict";var a=n(29491),r=n(86087),s=n(51609),o=n.n(s),i=n(46219),l=n(13965);(0,a.createHigherOrderComponent)((e=>t=>{const{suggestion:n,error:a,requestingState:s,request:c,stopSuggestion:u,eventSource:d}=(0,i.Ay)(),p=(0,r.useMemo)((()=>({suggestion:n,requestingError:a,requestingState:s,eventSource:d,requestSuggestion:c,stopSuggestion:u})),[n,a,s,d,c,u]);return o().createElement(l.Rb,{value:p},o().createElement(e,t))}),"withAiDataProvider")},46219:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>c,fC:()=>i});var a=n(86087),r=n(27723),s=n(87286),o=n(78836);const __=r.__;function i(e){switch(e){case o.Or:return{code:o.Or,message:__("You have reached the limit of requests for this site.","jetpack"),severity:"info"};case o.L9:return{code:o.L9,message:__("Your request was unclear. Mind trying again?","jetpack"),severity:"info"};case o.AZ:return{code:o.AZ,message:__("Jetpack AI services are currently unavailable. Sorry for the inconvenience.","jetpack"),severity:"info"};case o.ud:return{code:o.ud,message:__("This request has been flagged by our moderation system. Please try to rephrase it and try again.","jetpack"),severity:"info"};case o.cT:return{code:o.cT,message:__("The content is too large to be processed all at once. Please try to shorten it or divide it into smaller parts.","jetpack"),severity:"info"};case o.mA:default:return{code:o.mA,message:__("It was not possible to process your request. Mind trying again?","jetpack"),severity:"info"}}}function l(e){return e.replace(/^<\|start_header_id\|>assistant<\|end_header_id\|>[\n]+/,"")}function c({prompt:e,autoRequest:t=!1,askQuestionOptions:n={},initialRequestingState:r="init",onSuggestion:c,onDone:u,onStop:d,onError:p,onAllErrors:m}={}){const[h,g]=(0,a.useState)(r),[f,v]=(0,a.useState)(""),[b,k]=(0,a.useState)(),y=(0,a.useRef)(void 0),E=(0,a.useCallback)((e=>{const t=l(e?.detail);t&&(v(t),c?.(t))}),[c]),w=(0,a.useCallback)((e=>{L();const t=l(e?.detail);u?.(t),g("done")}),[u]),_=(0,a.useCallback)((e=>{m?.(e?.detail)}),[m]),C=(0,a.useCallback)((e=>{y?.current?.close(),g("error"),k(i(e)),p?.(i(e))}),[p]),A=(0,a.useCallback)((()=>C(o.Or)),[]),x=(0,a.useCallback)((()=>C(o.L9)),[]),j=(0,a.useCallback)((()=>C(o.AZ)),[]),S=(0,a.useCallback)((()=>C(o.ud)),[]),N=(0,a.useCallback)((()=>C(o.mA)),[]),R=(0,a.useCallback)((async(e,t={...n})=>{if(k(void 0),g("requesting"),y.current=await(0,s.A)(e,t),!y?.current)return;const a=y.current;g("suggesting"),a.addEventListener("suggestion",E),a.addEventListener(o.Or,A),a.addEventListener(o.L9,x),a.addEventListener(o.AZ,j),a.addEventListener(o.ud,S),a.addEventListener(o.mA,N),a.addEventListener(o.zn,_),a.addEventListener("done",w)}),[w,A,x,j,S,N,E]),P=(0,a.useCallback)((()=>{g("init"),v(""),k(void 0)}),[]),L=(0,a.useCallback)((()=>{if(!y?.current)return;const e=y?.current;e.close(),e.removeEventListener("suggestion",E),e.removeEventListener(o.Or,A),e.removeEventListener(o.L9,x),e.removeEventListener(o.AZ,j),e.removeEventListener(o.ud,S),e.removeEventListener(o.mA,N),e.removeEventListener("done",w)}),[y,E,A,x,j,S,N,w]),T=(0,a.useCallback)((()=>{L(),d?.(),g("done")}),[d]);return(0,a.useEffect)((()=>{if(e?.length)return t&&R(e,n),()=>{T()}}),[t,e,R,T]),{suggestion:f,error:b,requestingState:h,request:R,stopSuggestion:T,reset:P,handleErrorQuotaExceededError:A,eventSource:y.current}}},7804:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var a=n(86087),r=n(27723),s=n(10067),o=n.n(s),i=n(57745);const __=r.__,l=o()("jetpack-ai-client:use-audio-transcription"),c=e=>{if("string"==typeof e)return e;if("code"in e)switch(e.code){case"error_quota_exceeded":return __("You exceeded your current quota, please check your plan details.","jetpack");case"jetpack_ai_missing_audio_param":return __("The audio_file is required to perform a transcription.","jetpack");case"jetpack_ai_service_unavailable":return __("The Jetpack AI service is temporarily unavailable.","jetpack");case"file_size_not_supported":return __("The provided audio file is too big.","jetpack");case"file_type_not_supported":return __("The provided audio file type is not supported.","jetpack");case"jetpack_ai_error":return __("There was an error processing the transcription request.","jetpack");default:return e.message}return"message"in e?e.message:__("There was an error processing the transcription request.","jetpack")};function u({feature:e,onReady:t,onError:n}){const[r,s]=(0,a.useState)(""),[o,u]=(0,a.useState)(""),[d,p]=(0,a.useState)(!1),m=(0,a.useRef)(null);return{transcriptionResult:r,isTranscribingAudio:d,transcriptionError:o,transcribeAudio:(0,a.useCallback)((a=>{l("Transcribing audio"),s(""),u(""),p(!0);const r=new AbortController;m.current=r,(0,i.A)(a,e,r.signal).then((e=>{s(e),t?.(e)})).catch((e=>{r.signal.aborted||(u(e.message),n?.(c(e)))})).finally((()=>p(!1)))}),[i.A,s,u,p]),cancelTranscription:(0,a.useCallback)((()=>{m.current?.abort(),s(""),u(""),p(!1)}),[m,s,u,p])}}},66859:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(86087),r=n(27723);const __=r.__,s=25e6,o=1500,i=["audio/mpeg","audio/mp3","audio/ogg","audio/flac","audio/x-flac","audio/m4a","audio/x-m4a","audio/mp4","audio/wav","audio/wave","audio/x-wav","audio/webm"];function l(){const[e,t]=(0,a.useState)(!1);return{isValidatingAudio:e,validateAudio:(0,a.useCallback)(((e,n,a)=>{if(t(!0),e?.size>s)return t(!1),a(__("The audio file is too large. The maximum file size is 25MB.","jetpack"));const r=e instanceof File;if(r&&!i.includes(e.type))return t(!1),a(__("The audio file type is not supported. Please use a supported audio file type.","jetpack"));const l=new AudioContext;e.arrayBuffer().then((s=>{l.decodeAudioData(s,(function(s){const i=Math.ceil(s.duration);return i>o?(t(!1),a(__("The audio file is too long. The maximum recording time is 25 minutes.","jetpack"))):(t(!1),n({duration:i,isFile:r,size:e?.size}))}))}))}),[t])}}},66223:(e,t,n)=>{"use strict";n.d(t,{Hu:()=>r,Wp:()=>a});const a="auto",r="none"},62614:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>u});var a=n(10067),r=n.n(a),s=n(31439),o=n(51391);const i=r()("ai-client:use-image-generator"),l=(e,t)=>{const n=4e3-t;return e.length>n?e.substring(0,n-6)+" [...]":e},c=async(e,t,n)=>{const a=((e,t)=>{if(t){const n=`I need a Stable Diffusion prompt to generate a featured image for a blog post based on this user-provided image description:\n\n${t.length>1e3?t.substring(0,1e3):t}\n\nThe image should be a photo. Make sure you highlight the main suject of the image description, and include brief details about the light and style of the image.\nInclude a request to use high resolution and produce a highly detailed image, with sharp focus.\nReturn just the prompt, without comments.\n\nFor additional context, this is the post content:\n\n`;return n+l(e,n.length)}return"I need a Stable Diffusion prompt to generate a featured image for a blog post with the following content.\nThe image should be a photo. Make sure you highlight the main suject of the content, and include brief details about the light and style of the image.\nInclude a request to use high resolution and produce a highly detailed image, with sharp focus.\nReturn just the prompt, without comments. The content is:\n\n"+l(e,412)})(e,t);return await(0,s.A)(a,{feature:n})},u=()=>{const e=async function(e){let t="";try{t=(await(0,o.A)()).token}catch(e){return i("Error getting token: %o",e),Promise.reject(e)}try{const n="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-image",a={Authorization:`Bearer ${t}`,"Content-Type":"application/json"},r=await fetch(n,{method:"POST",headers:a,body:JSON.stringify(e)}).then((e=>e.json()));return r?.data?.status&&r?.data?.status>200?(i("Error generating image: %o",r),Promise.reject(r)):r}catch(e){return i("Error generating image: %o",e),Promise.reject(e)}};return{generateImage:async function({feature:t,postContent:n,responseFormat:a="url",userPrompt:r}){try{i("Generating image");const s=((e,t)=>{if(t){const n=`I need a cover image for a blog post based on this user prompt:\n\n${t.length>1e3?t.substring(0,1e3):t}\n\nBefore creating the image, identify the main topic of the user prompt and relate it to the post content.\nDo not represent the whole content in one image, keep it simple and just represent one single idea.\nDo not add details, detailed explanations or highlights from the content, just represent the main idea as if it was a photograph.\nDo not use collages or compositions with multiple elements or scenes. Stick to one single scene. Do not compose unrealistic scenes.\nIf the content describes facts, objects or concepts from the real world, represent them on a realistic style and do not make unreal compositions.\nIf the content is more abstract, use a more abstract style to represent the main idea.\nMake sure the light and the style are visually appealing.\nDo not add text to the image.\n\nFor additional context, this is the post content:\n\n`;return n+l(e,n.length)}const n="I need a cover image for a blog post.\nBefore creating the image, identify the main topic of the content and only represent it.\nDo not represent the whole content in one image, keep it simple and just represent one single idea.\nDo not add details, detailed explanations or highlights from the content, just represent the main idea as if it was a photograph.\nDo not use collages or compositions with multiple elements or scenes. Stick to one single scene. Do not compose unrealistic scenes.\nIf the content describes facts, objects or concepts from the real world, represent them on a realistic style and do not make unreal compositions.\nIf the content is more abstract, use a more abstract style to represent the main idea.\nMake sure the light and the style are visually appealing.\nDo not add text to the image.\n\nThis is the post content:\n\n";return n+l(e,838)})(n,r),o={prompt:s,response_format:a,feature:t,size:"1792x1024"};return await e(o)}catch(e){return i("Error generating image: %o",e),Promise.reject(e)}},generateImageWithStableDiffusion:async function({feature:t,postContent:n,userPrompt:a}){try{i("Generating image with Stable Diffusion");const r={prompt:await c(n,a,t),feature:t,model:"stable-diffusion"};return await e(r)}catch(e){return i("Error generating image: %o",e),Promise.reject(e)}},generateImageWithParameters:e}}},96657:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(86087);const r="audio/mp4;codecs=mp4a",s="audio/mp4",o="audio/webm";function i({onDone:e}={}){const t=(0,a.useRef)(null),[n,i]=(0,a.useState)("inactive"),l=(0,a.useRef)(!1),c=(0,a.useRef)(0),[u,d]=(0,a.useState)(0),p=(0,a.useRef)(null),[m,h]=(0,a.useState)(null),g=(0,a.useRef)([]).current,[f,v]=(0,a.useState)(null),b=(0,a.useRef)(null);function k(){return MediaRecorder.isTypeSupported(r)?new Blob(g,{type:s}):new Blob(g,{type:o})}const y=(0,a.useCallback)((e=>{if(C(),!e)return t?.current?.start();e<100&&(e=100),c.current=Date.now(),t?.current?.start(e)}),[]),E=(0,a.useCallback)((()=>{l.current=!0,t?.current?.pause(),d((e=>e+Date.now()-c.current))}),[]),w=(0,a.useCallback)((()=>{l.current=!1,t?.current?.resume(),c.current=Date.now()}),[]),_=(0,a.useCallback)((()=>{t?.current?.stop(),"recording"===n&&d((e=>e+Date.now()-c.current))}),[]),C=(0,a.useCallback)((()=>{g.length=0,h(null),v(null),d(0),l.current=!1,c.current=0}),[]),A=(0,a.useCallback)((()=>{t?.current&&(t.current.removeEventListener("start",S),t.current.removeEventListener("stop",N),t.current.removeEventListener("pause",R),t.current.removeEventListener("resume",P),t.current.removeEventListener("dataavailable",L),t.current=null)}),[]),x=(0,a.useCallback)((()=>{if(i("inactive"),C(),A(),!navigator.mediaDevices?.getUserMedia)return;const e=new AudioContext;b.current=e.createAnalyser();navigator.mediaDevices.getUserMedia({audio:!0}).then((n=>{p.current=n;e.createMediaStreamSource(n).connect(b.current),MediaRecorder.isTypeSupported(r)?t.current=new MediaRecorder(n,{mimeType:r}):t.current=new MediaRecorder(n,{mimeType:o}),t.current.addEventListener("start",S),t.current.addEventListener("stop",N),t.current.addEventListener("pause",R),t.current.addEventListener("resume",P),t.current.addEventListener("dataavailable",L)})).catch((e=>{throw e}))}),[]),j=(0,a.useCallback)((e=>{_(),v("string"==typeof e?e:e.message),i("error")}),[]);function S(){i("recording")}function N(){const t=k();e?.(t),g.length=0}function R(){i("paused")}function P(){i("recording")}function L(e){const{data:t}=e;t?.size&&(g.push(t),h(k()),l.current||d((e=>{const t=Date.now(),n=t-c.current;return c.current=t,e+n})))}return(0,a.useEffect)((()=>(x(),()=>{p.current&&p.current.getTracks().forEach((e=>e.stop())),A()})),[]),{state:n,blob:m,error:f,duration:u,analyser:b.current,onError:j,controls:{start:y,pause:E,resume:w,stop:_,reset:x}}}},93869:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(63162),r=n(47143),s=n(86087),o=n(10067);const i=n.n(o)()("ai-client:save-to-media-library");function l(){const[e,t]=(0,s.useState)(!1),{getSettings:n}=(0,r.useSelect)((e=>e("core/block-editor")),[]);return{isLoading:e,saveToMediaLibrary:(e,r)=>{const s=n();return new Promise(((n,o)=>{t(!0),i("Fetching image from URL"),fetch(e).then((e=>{i("Transforming response to blob"),e.blob().then((e=>{i("Uploading blob to media library");const l=Array();r?l.push(new File([e],r)):l.push(e),s.mediaUpload({allowedTypes:["image"],filesList:l,onFileChange([e]){(0,a.isBlobURL)(e?.url)||(e&&(i("Image uploaded to media library",e),n(e)),t(!1))},onError(e){i("Error uploading image to media library:",e),o(e),t(!1)}})})).catch((e=>{i("Error transforming response to blob:",e?.message),o(e?.message),t(!1)}))})).catch((e=>{i("Error fetching image from URL:",e?.message),o(e?.message),t(!1)}))}))}}}},97784:(e,t,n)=>{"use strict";n.d(t,{A:()=>c,u:()=>l});var a=n(86087),r=n(10067),s=n.n(r),o=n(46219);const i=s()("jetpack-ai-client:use-transcription-post-processing"),l="voice-to-content-simple-draft";function c({feature:e,onReady:t,onError:n,onUpdate:r}){const[s,l]=(0,a.useState)(""),[c,u]=(0,a.useState)(""),[d,p]=(0,a.useState)(!1),m=(0,a.useCallback)((e=>{l(e),r?.(e)}),[l,r]),h=(0,a.useCallback)((e=>{l(e),r?.(e),t?.(e)}),[l,r,t]),g=(0,a.useCallback)((e=>{u(e.message),n?.(e.message)}),[u,n]),{request:f,stopSuggestion:v}=(0,o.Ay)({onSuggestion:m,onDone:h,onError:g});return{postProcessingResult:s,isProcessingTranscription:d,postProcessingError:c,processTranscription:(0,a.useCallback)(((t,n)=>{i("Post-processing transcription"),l(""),u(""),p(!0);f([{role:"jetpack-ai",context:{type:t,content:n}}],{feature:e})}),[l,u,p,f,e]),cancelTranscriptionProcessing:(0,a.useCallback)((()=>{v(),p(!1)}),[v,p])}}},30151:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(56427),r=n(51609),s=n.n(r);const o=s().createElement(a.SVG,{viewBox:"0 0 32 32",width:"32",height:"32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"ai-assistant-icon"},s().createElement(a.Path,{className:"spark-first",d:"M9.33301 5.33325L10.4644 8.20188L13.333 9.33325L10.4644 10.4646L9.33301 13.3333L8.20164 10.4646L5.33301 9.33325L8.20164 8.20188L9.33301 5.33325Z"}),s().createElement(a.Path,{className:"spark-second",d:"M21.3333 5.33333L22.8418 9.15817L26.6667 10.6667L22.8418 12.1752L21.3333 16L19.8248 12.1752L16 10.6667L19.8248 9.15817L21.3333 5.33333Z"}),s().createElement(a.Path,{className:"spark-third",d:"M14.6667 13.3333L16.5523 18.1144L21.3333 20L16.5523 21.8856L14.6667 26.6667L12.781 21.8856L8 20L12.781 18.1144L14.6667 13.3333Z"}))},42154:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(56427);const r=React.createElement(a.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement(a.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M10 3.95833C6.66328 3.95833 3.95833 6.66327 3.95833 9.99999C3.95833 13.3367 6.66328 16.0417 10 16.0417C13.3367 16.0417 16.0417 13.3367 16.0417 9.99999C16.0417 6.66327 13.3367 3.95833 10 3.95833ZM2.70833 9.99999C2.70833 5.97292 5.97292 2.70833 10 2.70833C14.0271 2.70833 17.2917 5.97292 17.2917 9.99999C17.2917 14.0271 14.0271 17.2917 10 17.2917C5.97292 17.2917 2.70833 14.0271 2.70833 9.99999Z"}),React.createElement(a.Path,{d:"M10.8333 5.83333H9.16667V10.8333H10.8333V5.83333Z"}),React.createElement(a.Path,{d:"M10.8333 12.5H9.16667V14.1667H10.8333V12.5Z"}))},91396:(e,t,n)=>{"use strict";n.d(t,{Qr:()=>o.A,Vo:()=>r.A,cj:()=>a.A,ni:()=>s.A});var a=n(30151),r=n(81353),s=(n(95007),n(96626),n(4416),n(25680)),o=n(67205)},81353:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(56427),r=n(51609),s=n.n(r);const o=s().createElement(a.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/SVG"},s().createElement(a.Path,{d:"M12 4.75C11.0479 4.75 10.1052 4.93753 9.22554 5.30187C8.34593 5.66622 7.5467 6.20025 6.87348 6.87348C6.20025 7.5467 5.66622 8.34593 5.30187 9.22554C4.93753 10.1052 4.75 11.0479 4.75 12C4.75 12.9521 4.93753 13.8948 5.30187 14.7745C5.66622 15.6541 6.20025 16.4533 6.87348 17.1265C7.5467 17.7997 8.34593 18.3338 9.22554 18.6981C10.1052 19.0625 11.0479 19.25 12 19.25C13.9228 19.25 15.7669 18.4862 17.1265 17.1265C18.4862 15.7669 19.25 13.9228 19.25 12C19.25 10.0772 18.4862 8.23312 17.1265 6.87348C15.7669 5.51384 13.9228 4.75 12 4.75ZM3.25 12C3.25 9.67936 4.17187 7.45376 5.81282 5.81282C7.45376 4.17187 9.67936 3.25 12 3.25C14.3206 3.25 16.5462 4.17187 18.1872 5.81282C19.8281 7.45376 20.75 9.67936 20.75 12C20.75 14.3206 19.8281 16.5462 18.1872 18.1872C16.5462 19.8281 14.3206 20.75 12 20.75C9.67936 20.75 7.45376 19.8281 5.81282 18.1872C4.17187 16.5462 3.25 14.3206 3.25 12Z",fill:"#008710"}),s().createElement(a.Rect,{x:"10.5",y:"8.25",width:"3",height:"4.875",rx:"1.5",fill:"#008710"}),s().createElement(a.Path,{d:"M15 11.25C15 11.644 14.9224 12.0341 14.7716 12.3981C14.6209 12.762 14.3999 13.0927 14.1213 13.3713C13.8427 13.6499 13.512 13.8709 13.1481 14.0216C12.7841 14.1724 12.394 14.25 12 14.25C11.606 14.25 11.2159 14.1724 10.8519 14.0216C10.488 13.8709 10.1573 13.6499 9.87868 13.3713C9.6001 13.0927 9.37913 12.762 9.22836 12.3981C9.0776 12.0341 9 11.644 9 11.25",stroke:"#008710",strokeWidth:"1.125",strokeLinecap:"round"}),s().createElement(a.Path,{d:"M11.4375 15.75C11.4375 16.0607 11.6893 16.3125 12 16.3125C12.3107 16.3125 12.5625 16.0607 12.5625 15.75L11.4375 15.75ZM11.4375 14.25L11.4375 15.75L12.5625 15.75L12.5625 14.25L11.4375 14.25Z",fill:"#008710"}))},95007:(e,t,n)=>{"use strict";var a=n(56427),r=n(51609),s=n.n(r);a.SVG,a.Path,a.Path},25680:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(56427),r=n(51609),s=n.n(r);const o=s().createElement(a.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/SVG"},s().createElement(a.Path,{d:"M12 4.75C11.0479 4.75 10.1052 4.93753 9.22554 5.30187C8.34593 5.66622 7.5467 6.20025 6.87348 6.87348C6.20025 7.5467 5.66622 8.34593 5.30187 9.22554C4.93753 10.1052 4.75 11.0479 4.75 12C4.75 12.9521 4.93753 13.8948 5.30187 14.7745C5.66622 15.6541 6.20025 16.4533 6.87348 17.1265C7.5467 17.7997 8.34593 18.3338 9.22554 18.6981C10.1052 19.0625 11.0479 19.25 12 19.25C13.9228 19.25 15.7669 18.4862 17.1265 17.1265C18.4862 15.7669 19.25 13.9228 19.25 12C19.25 10.0772 18.4862 8.23312 17.1265 6.87348C15.7669 5.51384 13.9228 4.75 12 4.75ZM3.25 12C3.25 9.67936 4.17187 7.45376 5.81282 5.81282C7.45376 4.17187 9.67936 3.25 12 3.25C14.3206 3.25 16.5462 4.17187 18.1872 5.81282C19.8281 7.45376 20.75 9.67936 20.75 12C20.75 14.3206 19.8281 16.5462 18.1872 18.1872C16.5462 19.8281 14.3206 20.75 12 20.75C9.67936 20.75 7.45376 19.8281 5.81282 18.1872C4.17187 16.5462 3.25 14.3206 3.25 12Z",fill:"#008710"}),s().createElement(a.Rect,{x:"12.75",y:"9",width:"2.25",height:"6",fill:"#008710"}),s().createElement(a.Rect,{x:"9",y:"9",width:"2.25",height:"6",fill:"#008710"}))},96626:(e,t,n)=>{"use strict";var a=n(56427),r=n(51609),s=n.n(r);a.SVG,a.Path,a.Path},4416:(e,t,n)=>{"use strict";var a=n(56427),r=n(51609),s=n.n(r);a.SVG,a.Path,a.Rect},67205:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(56427),r=n(51609),s=n.n(r);const o=s().createElement(a.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s().createElement(a.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5 10C12.5 11.3807 11.3807 12.5 10 12.5C8.61929 12.5 7.5 11.3807 7.5 10C7.5 8.61929 8.61929 7.5 10 7.5C11.3807 7.5 12.5 8.61929 12.5 10ZM14 10C14 12.2091 12.2091 14 10 14C7.79086 14 6 12.2091 6 10C6 7.79086 7.79086 6 10 6C12.2091 6 14 7.79086 14 10ZM16.75 21V19C16.75 17.4812 15.5188 16.25 14 16.25L6 16.25C4.48122 16.25 3.25 17.4812 3.25 19V21H4.75L4.75 19C4.75 18.3096 5.30964 17.75 6 17.75L14 17.75C14.6904 17.75 15.25 18.3096 15.25 19V21H16.75Z",fill:"currentColor"}),s().createElement(a.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.976 16.3599C21.2507 14.5642 22.0001 12.3695 22.0001 9.99969C22.0001 7.63128 21.2515 5.43769 19.9782 3.64258L18.754 4.50967C19.8537 6.05996 20.5001 7.95434 20.5001 9.99969C20.5001 12.0464 19.8528 13.9419 18.7519 15.4928L19.976 16.3599ZM17.3357 14.4897C18.2357 13.222 18.7648 11.6727 18.7648 9.99969C18.7648 8.32808 18.2365 6.77984 17.3379 5.51279L16.1137 6.37988C16.8387 7.4021 17.2648 8.65114 17.2648 9.99969C17.2648 11.3496 16.8378 12.5998 16.1116 13.6226L17.3357 14.4897Z",fill:"currentColor"}))},96865:(e,t,n)=>{"use strict";n.d(t,{$I:()=>p.$I,A4:()=>g.A4,AK:()=>p.AK,AZ:()=>m.AZ,DD:()=>g.DD,DT:()=>g.DT,E0:()=>o.A,FC:()=>p.FC,Gm:()=>g.Gm,HL:()=>p.HL,HM:()=>g.HM,Hu:()=>u.Hu,JR:()=>g.JR,K2:()=>g.K2,KJ:()=>f.K,Kf:()=>c.Ay,L9:()=>m.L9,MB:()=>h.MB,N0:()=>p.N0,OO:()=>h.OO,Or:()=>m.Or,Qr:()=>d.Qr,R0:()=>a.A,Rq:()=>g.Rq,Su:()=>h.Su,Tg:()=>f.T,UA:()=>g.UA,UD:()=>g.UD,Vo:()=>d.Vo,Wp:()=>u.Wp,Yj:()=>p.Yj,_E:()=>h.Hh,be:()=>s.A,br:()=>g.br,cT:()=>m.cT,cj:()=>d.cj,d5:()=>g.d5,eJ:()=>g.eJ,fD:()=>g.fD,im:()=>g.im,mA:()=>m.mA,mI:()=>g.mI,mT:()=>g.mT,ni:()=>d.ni,o2:()=>r.Ay,oZ:()=>g.oZ,pE:()=>g.pE,rh:()=>h.rh,rr:()=>l.A,sn:()=>g.sn,so:()=>g.so,u0:()=>g.u0,uH:()=>m.uH,uQ:()=>g.uQ,ud:()=>m.ud,vE:()=>g.vE,wS:()=>p.wS,xA:()=>i.A,yQ:()=>g.yQ,yy:()=>g.yy,z3:()=>p.z3,z5:()=>g.z5});n(51391),n(53664),n(87286);var a=n(31439),r=(n(57745),n(46219)),s=n(96657),o=n(7804),i=n(97784),l=n(66859),c=n(62614),u=n(66223),d=n(91396),p=n(27802),m=(n(13965),n(78836)),h=n(72586),g=n(43984),f=n(23101)},51391:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var a=n(85985),r=n(10067),s=n.n(r),o=n(48931);const i=s()("jetpack-ai-client:jwt"),l="jetpack-ai-jwt",c=12e4;async function u({apiNonce:e,siteId:t,expirationTime:n}={}){e=e||window.JP_CONNECTION_INITIAL_STATE.apiNonce,t=t||window.JP_CONNECTION_INITIAL_STATE.siteSuffix,n=n||c;const r=localStorage.getItem(l);let s,u=null;if(r)try{u=JSON.parse(r)}catch(e){i("Error parsing token",e)}if(u&&u?.expire>Date.now())return i("Using cached token"),u;const d=(0,a.Sy)();s=d?await(0,o.A)({path:"/wpcom/v2/sites/"+t+"/jetpack-openai-query/jwt",method:"POST"}):await(0,o.A)({path:"/jetpack/v4/jetpack-ai-jwt?_cacheBuster="+Date.now(),credentials:"same-origin",headers:{"X-WP-Nonce":e},method:"POST"});const p={token:s.token,blogId:d?t:s.blog_id,expire:Date.now()+n};return i("Storing new token"),localStorage.setItem(l,JSON.stringify(p)),p}},72586:(e,t,n)=>{"use strict";n.d(t,{Hh:()=>a.Hh,MB:()=>r.M,OO:()=>a.OO,Su:()=>a.Su,rh:()=>a.rh});var a=n(55166),r=n(84861)},84861:(e,t,n)=>{"use strict";n.d(t,{M:()=>r});var a=n(43984);function r(e,t={}){const{language:n,tone:r}=t,s=n?.split(" (")[0];switch(e){case a.Gm:return`${a.u0}: ${a.so[s].label}`;case a.eJ:return`${a.uQ}: ${a.oZ[r].label}`;case a.yy:return a.DD;case a.A4:return a.HM;case a.UA:return a.JR;case a.br:return a.K2;case a.fD:return a.UD;case a.d5:return a.mI;case a.fv:return a.yQ;case a.vE:return a.mT;case a.im:return a.Rq;case a.sn:return a.DT;default:return null}}},68641:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(21147);const r={paragraph:e=>e.replaceAll("\n","
    ")},s={emDelimiter:"_",headingStyle:"atx"},o={strikethrough:{filter:["del","s"],replacement:function(e){return"~~"+e+"~~"}}};class i{constructor({options:e={},rules:t={},keep:n=[],remove:r=[],fixes:i=[]}={}){this.fixes=i,this.turndownService=new a.A({...s,...e}),this.turndownService.keep(n),this.turndownService.remove(r);const l={...o,...t};for(const e in l)this.turndownService.addRule(e,l[e])}render({content:e}){const t=this.turndownService.turndown(e);return this.fixes.reduce(((e,t)=>r[t](e)),t)}}},55166:(e,t,n)=>{"use strict";n.d(t,{Hh:()=>i,OO:()=>a.A,Su:()=>r.S,rh:()=>l});var a=n(68641),r=n(31737);const s=new r.A,o=new a.A,i=({content:e,rules:t,extension:n})=>s.render({content:e,rules:t,extension:n}),l=({content:e})=>o.render({content:e})},31737:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,S:()=>s});var a=n(97158);const r=e=>e.replaceAll("\x3c!-- wp:list-item --\x3e","").replaceAll("\x3c!-- /wp:list-item --\x3e","").replaceAll("\x3c!-- wp:list --\x3e","").replaceAll("\x3c!-- /wp:list --\x3e","").replaceAll("
  • ","\x3c!-- wp:list-item --\x3e
  • ").replaceAll("
  • ","\x3c!-- /wp:list-item --\x3e").replaceAll("
      ",'\x3c!-- wp:list {"ordered":true} --\x3e
        ').replaceAll("
      ","
    \x3c!-- /wp:list --\x3e").replaceAll("
      ","\x3c!-- wp:list --\x3e
        ").replaceAll("
      ","
    \x3c!-- /wp:list --\x3e"),s={list:(e,t=!1)=>{const n=e.replace(/
  • \s+

    /g,"

  • ").replace(/<\/p>\s+<\/li>/g,"
  • ");return t?r(n):n},listItem:(e,t=!1)=>t?r(e.replace(/^<[ou]l>\s*/g,"").replace(/\s*<\/[ou]l>\s*$/g,"")):e,paragraph:(e,t=!1)=>t?e.replaceAll(/\s*<br \/>\s*/g,"
    "):e,table:(e,t=!1,{hasFixedLayout:n=!1})=>t?e.startsWith("\x3c!-- wp:table")?e:`\x3c!-- wp:table { "hasFixedLayout":${n?"true":"false"} } --\x3e${e}\x3c!-- /wp:table --\x3e`:e},o={breaks:!0},i=["list"];class l{constructor(e=o){this.markdownConverter=new a.A(e)}render({content:e,rules:t=i,extension:n=!1}){const a=this.markdownConverter.render(e);return t.reduce(((e,t)=>s[t](e,n)),a)}}},21902:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=()=>React.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon"},React.createElement("path",{d:"M6.99976 3.99994L7.84828 6.15141L9.99976 6.99994L7.84828 7.84847L6.99976 9.99994L6.15123 7.84847L3.99976 6.99994L6.15123 6.15141L6.99976 3.99994Z"}),React.createElement("path",{d:"M16 4L17.1314 6.86863L20 8L17.1314 9.13137L16 12L14.8686 9.13137L12 8L14.8686 6.86863L16 4Z"}),React.createElement("path",{d:"M11 10L12.4142 13.5858L16 15L12.4142 16.4142L11 20L9.58579 16.4142L6 15L9.58579 13.5858L11 10Z"}))},11574:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=()=>React.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon"},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.9291 7.96836L10.7308 17.6492L6.2145 14.2911L7.10952 13.0873L10.4221 15.5504L16.7253 7.07333L17.9291 7.96836Z"}))},47621:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=()=>React.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon"},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.2927 13.7485C18.5014 17.0423 15.5366 19.4901 12 19.4901C8.92508 19.4901 6.28236 17.6396 5.12469 14.9915L8.79556 12.8139L12.2508 14.0309C12.482 14.1123 12.7383 14.0756 12.9374 13.9327L15.8243 11.8601L15.9039 11.8992C16.1998 12.0451 16.6072 12.249 17.0533 12.4807C17.8331 12.8857 18.6946 13.3572 19.2927 13.7485ZM19.499 12.1129C18.9341 11.7788 18.3001 11.4379 17.7447 11.1495C17.287 10.9118 16.8698 10.7031 16.5672 10.5539C16.4158 10.4792 16.2928 10.4193 16.2074 10.378L16.1085 10.3303L16.0824 10.3177L16.0729 10.3132C15.8261 10.1954 15.5347 10.2214 15.3126 10.3809L12.3802 12.4861L8.9634 11.2827C8.75395 11.2089 8.52258 11.2318 8.3316 11.3451L4.65716 13.5248C4.55414 13.0294 4.5 12.5161 4.5 11.9901C4.5 7.84798 7.85786 4.49011 12 4.49011C16.1421 4.49011 19.5 7.84798 19.5 11.9901C19.5 12.0311 19.4997 12.072 19.499 12.1129ZM21 11.9901C21 16.9607 16.9706 20.9901 12 20.9901C7.02944 20.9901 3 16.9607 3 11.9901C3 7.01955 7.02944 2.99011 12 2.99011C16.9706 2.99011 21 7.01955 21 11.9901Z"}))},97034:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=()=>React.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon"},React.createElement("path",{d:"M7 6.49011L11 8.99011L7 11.4901V6.49011Z"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 2.99011C3.89543 2.99011 3 3.88554 3 4.99011V18.9901C3 20.0947 3.89543 20.9901 5 20.9901H19C20.1046 20.9901 21 20.0947 21 18.9901V4.99011C21 3.88554 20.1046 2.99011 19 2.99011H5ZM19 4.49011H5C4.72386 4.49011 4.5 4.71397 4.5 4.99011V15.6973L8.12953 13.0508C8.38061 12.8677 8.71858 12.8584 8.97934 13.0274L11.906 14.9243L15.4772 11.4524C15.7683 11.1694 16.2317 11.1694 16.5228 11.4524L19.5 14.3469V4.99011C19.5 4.71397 19.2761 4.49011 19 4.49011ZM4.5 18.9901V17.5537L8.59643 14.5667L11.5921 16.5084C11.8857 16.6987 12.2719 16.6607 12.5228 16.4167L16 13.0361L19.4772 16.4167L19.5 16.3933V18.9901C19.5 19.2663 19.2761 19.4901 19 19.4901H5C4.72386 19.4901 4.5 19.2663 4.5 18.9901Z"}))},6019:(e,t,n)=>{"use strict";n.d(t,{Q:()=>s});var a=n(56427),r=n(78867);const s=({variant:e="error"})=>{const t=(0,r.A)();return"muted"===e?React.createElement("span",{className:"jetpack-ai-fair-usage-notice-muted-variant"},t):"error"===e?React.createElement(a.Notice,{status:"error",isDismissible:!1,className:"jetpack-ai-fair-usage-notice"},t):null}},95933:(e,t,n)=>{"use strict";n.d(t,{x:()=>s});var a=n(56427),r=n(27723);const __=r.__,s=({onCancel:e,onRetry:t})=>{const n=__("We are sorry. There was an error loading your Jetpack AI plan data. Please, try again.","jetpack"),r=__("We are sorry. There was an error loading your Jetpack AI plan data. Please, reload the page and try again.","jetpack");return React.createElement("div",{className:"jetpack-ai-logo-generator-modal__notice-message-wrapper"},React.createElement("div",{className:"jetpack-ai-logo-generator-modal__notice-message"},React.createElement("span",{className:"jetpack-ai-logo-generator-modal__loading-message"},t?n:r)),React.createElement("div",{className:"jetpack-ai-logo-generator-modal__notice-actions"},React.createElement(a.Button,{variant:"tertiary",onClick:e},__("Cancel","jetpack")),t&&React.createElement(a.Button,{variant:"primary",onClick:t},__("Try again","jetpack"))))}},76194:(e,t,n)=>{"use strict";n.d(t,{N:()=>i});var a=n(27723),r=n(51609),s=n.n(r),o=n(42669);const __=a.__,i=({state:e="loadingFeature"})=>{const t=__("Loading…","jetpack"),n=__("Analyzing your site to create the perfect logo…","jetpack"),a=__("Generating logo…","jetpack");return s().createElement("div",{className:"jetpack-ai-logo-generator-modal__loading-wrapper"},s().createElement(o.$,null),s().createElement("span",{className:"jetpack-ai-logo-generator-modal__loading-message"},"loadingFeature"===e&&t,"analyzing"===e&&n,"generating"===e&&a))}},64537:(e,t,n)=>{"use strict";n.d(t,{T:()=>x});var a=n(85985),r=n(56427),s=n(47143),o=n(27723),i=n(13022),l=n(10067),c=n.n(l),u=n(51609),d=n(46381),p=n(61356),m=n(60674),h=n(88725),g=n(44461),f=n(19362),v=n(74423),b=n(95933),k=n(76194),y=n(32623),E=n(34706),w=n(11114),_=n(35421),C=n(48204);const __=o.__,A=c()("jetpack-ai-calypso:generator-modal"),x=({isOpen:e,onClose:t,onApplyLogo:n,onReload:o=null,siteDetails:l,context:c,placement:x})=>{const{tracks:j}=(0,a.st)(),{recordEvent:S}=j,{setSiteDetails:N,fetchAiAssistantFeature:R,loadLogoHistory:P,setIsLoadingHistory:L}=(0,s.useDispatch)(v.E),{getIsRequestingAiAssistantFeature:T}=(0,s.select)(v.E),[B,M]=(0,u.useState)(null),[I,D]=(0,u.useState)(),F=(0,u.useRef)(!0),z=(0,u.useRef)(!1),[O,H]=(0,u.useState)(!1),[U,V]=(0,u.useState)(!1),{selectedLogo:q,getAiAssistantFeature:G,generateFirstPrompt:$,generateLogo:W,setContext:Z,tierPlansEnabled:J,site:K,requireUpgrade:Y}=(0,h.A)(),{featureFetchError:Q,setFeatureFetchError:X,firstLogoPromptFetchError:ee,clearErrors:te}=(0,g.A)(),ne=l?.ID,[ae,re]=(0,u.useState)(!1),{nextTierCheckoutURL:se}=(0,m.Q)(),oe=G(),ie=(0,u.useCallback)((async()=>{try{M("analyzing"),S(p.vm,{context:c,tool:"first-prompt"});const e=await $();D(e),M("generating"),await W({prompt:e,style:"none"}),M(null)}catch(e){A("Error generating first logo",e),M(null)}}),[c,$,W]),le=(0,u.useCallback)((async()=>{try{if(!ne)throw new Error("Site ID is missing");if(!oe?.featuresControl?.["logo-generator"]?.enabled)throw X("Failed to fetch feature data"),new Error("Failed to fetch feature data");const e=!(0,f.NP)(String(ne)),t=oe?.costs?.["jetpack-ai-logo-generator"]?.logo??p._S,n=1,a=oe?.currentTier?.limit||0,r=oe?.currentTier?.value||0,s=oe?.usagePeriod?.requestsCount||0,o=!(J?1===r:r>0)&&!!oe?.nextTier&&!e&&(J?a-s{Z(c),S(p.iz,{context:c,placement:x}),le()}),[Z,c,x,le]),ue=()=>{F.current=!0,t(),M(null),H(!1),V(!1),te(),re(!1),L(!1),S(p.ub,{context:c,placement:x})},de=(0,u.useCallback)((()=>{o&&(ue(),z.current=!1,o())}),[o,ue]),pe=e=>{re(!0),n?.(e)},me=()=>{S(p.$i,{context:c})};let he;return(0,u.useEffect)((()=>{if(ne&&N(l),!z.current){T()||(z.current=!0,R())}}),[ne,l,N,T]),(0,u.useEffect)((()=>{e&&F.current&&(F.current=!1,ce())}),[e,ce]),he=B?React.createElement(k.N,{state:B}):Q||ee?React.createElement(b.x,{onCancel:ue,onRetry:o?de:null}):O||U?React.createElement(_.R,{onCancel:ue,upgradeURL:se,reason:O?"feature":"requests"}):React.createElement(React.Fragment,null,!ae&&React.createElement(w.X,{initialPrompt:I}),React.createElement(E.s,{logo:q,onApplyLogo:pe,logoAccepted:ae,siteId:String(ne)}),ae?React.createElement("div",{className:"jetpack-ai-logo-generator__accept"},React.createElement(C.H,null),React.createElement("div",{className:"jetpack-ai-logo-generator__accept-actions"},React.createElement(r.Button,{variant:"primary",onClick:ue},__("Close","jetpack")))):React.createElement(React.Fragment,null,React.createElement(y.N,null),React.createElement("div",{className:"jetpack-ai-logo-generator__footer"},React.createElement(d.A,{onFeedbackClick:me})))),React.createElement(React.Fragment,null,e&&React.createElement(r.Modal,{className:"jetpack-ai-logo-generator-modal",onRequestClose:ue,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,title:__("Jetpack AI Logo Generator","jetpack")},React.createElement("div",{className:(0,i.A)("jetpack-ai-logo-generator-modal__body",{"notice-modal":O||U||Q||ee})},he)))}},32623:(e,t,n)=>{"use strict";n.d(t,{N:()=>c});var a=n(85985),r=n(56427),s=n(13022),o=n(26076),i=n(61356),l=n(88725);const c=()=>{const{tracks:e}=(0,a.st)(),{recordEvent:t}=e,{logos:n,selectedLogo:c,setSelectedLogoIndex:u,context:d,isLoadingHistory:p}=(0,l.A)(),m=e=>{const t=new URL(e);return t.searchParams.has("resize")||t.searchParams.append("resize","48,48"),t.toString()};return React.createElement("div",{className:"jetpack-ai-logo-generator__carousel"},!n.length&&p&&React.createElement(r.Button,{disabled:!0,className:(0,s.A)("jetpack-ai-logo-generator__carousel-logo")},React.createElement("img",{height:"48",width:"48",src:o,alt:"loading"})),!n.length&&!p&&React.createElement("div",null," "),n.map(((e,a)=>React.createElement(r.Button,{key:e.url,className:(0,s.A)("jetpack-ai-logo-generator__carousel-logo",{"is-selected":e.url===c.url}),onClick:()=>(e=>{t(i.Nt,{context:d,logos_count:n.length,selected_logo:e+1}),u(e)})(a)},React.createElement("img",{src:m(e.url),alt:e.description})))))}},42669:(e,t,n)=>{"use strict";n.d(t,{$:()=>s});var a=n(13022),r=n(26076);const s=({className:e=null})=>React.createElement("img",{src:r,alt:"Loading",className:(0,a.A)("jetpack-ai-logo-generator-modal__loader",e)})},34706:(e,t,n)=>{"use strict";n.d(t,{s:()=>S});var a=n(85985),r=n(56427),s=n(47143),o=n(27723),i=n(10067),l=n.n(i),c=n(11497),u=n(11574),d=n(47621),p=n(97034),m=n(61356),h=n(88725),g=n(44461),f=n(19362),v=n(74423),b=n(42669);const __=o.__,k=l()("jetpack-ai-calypso:logo-presenter"),y=({siteId:e})=>{const{tracks:t}=(0,a.st)(),{recordEvent:n}=t,{saveLogo:o,selectedLogo:i,isSavingLogoToLibrary:l,logos:c,selectedLogoIndex:d,context:g}=(0,h.A)(),b=!!i?.mediaId,{loadLogoHistory:y}=(0,s.useDispatch)(v.E),E=__("Saving…","jetpack"),w=__("Saved","jetpack");return l||b?React.createElement(r.Button,{className:"jetpack-ai-logo-generator-modal-presenter__action"},React.createElement(r.Icon,{icon:l?React.createElement(p.A,null):React.createElement(u.A,null)}),React.createElement("span",{className:"action-text"},l?E:w)):React.createElement(r.Button,{className:"jetpack-ai-logo-generator-modal-presenter__action",onClick:async()=>{if(!b&&!l){n(m.h4,{context:g,logos_count:c.length,selected_logo:d?d+1:0});try{const t=await o(i);(0,f.H)({siteId:e,url:i.url,newUrl:t.mediaURL,mediaId:t.mediaId}),y(e)}catch(e){k("Error saving logo",e)}}}},React.createElement(r.Icon,{icon:React.createElement(p.A,null)}),React.createElement("span",{className:"action-text"},__("Save in Library","jetpack")))},E=({onApplyLogo:e})=>{const{tracks:t}=(0,a.st)(),{recordEvent:n}=t,{isSavingLogoToLibrary:s,selectedLogo:o,logos:i,selectedLogoIndex:l,context:c}=(0,h.A)();return React.createElement(r.Button,{className:"jetpack-ai-logo-generator-modal-presenter__action",onClick:async()=>{s||(n(m.Zb,{context:c,logos_count:i.length,selected_logo:null!=l?l+1:0}),e?.(o?.mediaId))},disabled:s||!o?.mediaId,variant:"secondary"},React.createElement(r.Icon,{icon:React.createElement(d.A,null)}),React.createElement("span",{className:"action-text"},__("Use on block","jetpack")))},w=()=>React.createElement(React.Fragment,null,React.createElement(b.$,{className:"jetpack-ai-logo-generator-modal-presenter__logo"}),React.createElement("span",{className:"jetpack-ai-logo-generator-modal-presenter__loading-text"},__("Generating new logo…","jetpack"))),_=()=>React.createElement(React.Fragment,null,React.createElement(b.$,{className:"jetpack-ai-logo-generator-modal-presenter__logo"}),React.createElement("span",{className:"jetpack-ai-logo-generator-modal-presenter__loading-text"},__("Fetching previous logos…","jetpack"))),C=()=>React.createElement(React.Fragment,null,React.createElement("div",{style:{width:0,height:"229px"}}),React.createElement("span",{className:"jetpack-ai-logo-generator-modal-presenter__loading-text"},__("Once you generate a logo, it will show up here","jetpack"))),A=({disabled:e,ratedItem:t,onRate:n})=>{const{logos:a,selectedLogo:r}=(0,h.A)(),s=a.filter((e=>e.rating)).reduce(((e,t)=>(e[t.url]=t.rating,e)),{});return React.createElement(c.A,{disabled:e,ratedItem:t,feature:"logo-generator",savedRatings:s,options:{mediaLibraryId:r.mediaId,prompt:r.description},onRate:n})},x=({siteId:e,logo:t,onApplyLogo:n})=>React.createElement(React.Fragment,null,React.createElement("img",{src:t.url,alt:t.description,className:"jetpack-ai-logo-generator-modal-presenter__logo"}),React.createElement("div",{className:"jetpack-ai-logo-generator-modal-presenter__action-wrapper"},React.createElement("span",{className:"jetpack-ai-logo-generator-modal-presenter__description"},t.description),React.createElement("div",{className:"jetpack-ai-logo-generator-modal-presenter__actions"},React.createElement(y,{siteId:e}),React.createElement(E,{onApplyLogo:n}),React.createElement(A,{ratedItem:t.url,disabled:!1,onRate:n=>{(0,f.H)({siteId:e,url:t.url,newUrl:t.url,mediaId:t.mediaId,rating:n})}})))),j=({logo:e})=>React.createElement(React.Fragment,null,React.createElement("img",{src:e.url,alt:e.description,className:"jetpack-ai-logo-generator-modal-presenter__logo"}),React.createElement("div",{className:"jetpack-ai-logo-generator-modal-presenter__success-wrapper"},React.createElement(r.Icon,{icon:React.createElement(u.A,null)}),React.createElement("span",null,__("Your new logo was set to the block!","jetpack")))),S=({logo:e=null,loading:t=!1,onApplyLogo:n,logoAccepted:a=!1,siteId:r})=>{const{isRequestingImage:s}=(0,h.A)(),{saveToLibraryError:o,logoUpdateError:i}=(0,g.A)();let l;return e||s?e?l=t||s?React.createElement(w,null):a?React.createElement(j,{logo:e}):React.createElement(x,{siteId:String(r),logo:e,onApplyLogo:n}):(k("No logo provided, history still loading or logo being generated"),l=React.createElement(_,null)):l=React.createElement(C,null),React.createElement("div",{className:"jetpack-ai-logo-generator-modal-presenter__wrapper"},React.createElement("div",{className:"jetpack-ai-logo-generator-modal-presenter"},React.createElement("div",{className:"jetpack-ai-logo-generator-modal-presenter__content"},l),!a&&React.createElement("div",{className:"jetpack-ai-logo-generator-modal-presenter__rectangle"})),o&&React.createElement("div",{className:"jetpack-ai-logo-generator__prompt-error"},__("Error saving the logo to your library. Please try again.","jetpack")),i&&React.createElement("div",{className:"jetpack-ai-logo-generator__prompt-error"},__("Error applying the logo to your site. Please try again.","jetpack")))}},11114:(e,t,n)=>{"use strict";n.d(t,{K:()=>y,X:()=>E});var a=n(85985),r=n(56427),s=n(27723),o=n(51113),i=n(19783),l=n(10067),c=n.n(l),u=n(51609),d=n(66223),p=n(21902),m=n(61356),h=n(60674),g=n(88725),f=n(44461),v=n(6019),b=n(64024);const __=s.__,k=c()("jetpack-ai-calypso:prompt-box"),y=({prompt:e="",setPrompt:t=()=>{},disabled:n=!1,actionDisabled:a=!1,generateHandler:s=()=>{},placeholder:o="",buttonLabel:i=""})=>{const l=(0,u.useRef)(null);(0,u.useEffect)((()=>{l.current&&l.current.textContent!==e&&(l.current.textContent=e)}),[e]);return React.createElement("div",{className:"jetpack-ai-image-generator__prompt-query"},React.createElement("div",{role:"textbox",tabIndex:0,ref:l,contentEditable:!n,suppressContentEditableWarning:!0,className:"prompt-query__input",onInput:e=>{t(e.target.textContent||"")},onPaste:e=>{e.preventDefault();const n=e.currentTarget.ownerDocument.getSelection();if(!n||!n.rangeCount)return;const a=e.clipboardData.getData("text/plain");n.deleteFromDocument();n.getRangeAt(0).insertNode(document.createTextNode(a)),n.collapseToEnd(),t(l.current?.textContent||"")},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),s()),e.stopPropagation()},onKeyUp:()=>{""===l.current?.textContent&&(l.current.innerHTML="")},"data-placeholder":o}),React.createElement(r.Button,{variant:"primary",className:"jetpack-ai-image-generator__prompt-submit",onClick:s,disabled:a},i||__("Generate","jetpack")))},E=({initialPrompt:e=""})=>{const{tracks:t}=(0,a.st)(),{recordEvent:n}=t,[l,c]=(0,u.useState)(e),[E,w]=(0,u.useState)(0),{enhancePromptFetchError:_,logoFetchError:C}=(0,f.A)(),{nextTierCheckoutURL:A,hasNextTier:x}=(0,h.Q)(),j=l?.length>=m.N3,[S,N]=(0,u.useState)(!1),[R,P]=(0,u.useState)(null),[L,T]=(0,u.useState)([]),{generateLogo:B,enhancePrompt:M,setIsEnhancingPrompt:I,isBusy:D,isEnhancingPrompt:F,site:z,getAiAssistantFeature:O,requireUpgrade:H,context:U,tierPlansEnabled:V,imageStyles:q,guessStyle:G}=(0,g.A)(),$=__("Enhancing…","jetpack"),W=__("Enhance prompt","jetpack"),Z=F?$:W,J=(0,u.useRef)(null),K=(0,u.useCallback)((async()=>{k("Enhancing prompt",l),I(!0),n(m.vm,{context:U,tool:"enhance-prompt"});try{const e=await M({prompt:l});c(e),I(!1)}catch(e){k("Error enhancing prompt",e),I(!1)}}),[U,M,l,I]),Y=O(String(z?.id||"")),Q=Y?.currentTier?.value||0,X=Y?.usagePeriod?.requestsCount||0,ee=1===Q;(0,u.useEffect)((()=>{w(Q-X<=0?0:Q-X)}),[Q,X]),(0,u.useEffect)((()=>{J.current&&J.current.textContent!==l&&(J.current.textContent=l)}),[l]),(0,u.useEffect)((()=>{q&&q.length>0?(T([q.find((({value:e})=>e===d.Hu)),q.find((({value:e})=>e===d.Wp)),...q.filter((({value:e})=>![d.Hu,d.Wp].includes(e)))].filter((e=>e))),N(!0),P(d.Hu)):(T([]),N(!1),P(null))}),[q]);const te=(0,u.useCallback)((async()=>{if(k(U),R===d.Wp){I(!0),n(m.Tk,{context:U,tool:"image"});const e=await G(l)||d.Hu;P(e),n(m.vm,{context:U,tool:"image",style:e}),I(!1),B({prompt:l,style:e})}else n(m.vm,{context:U,tool:"image",style:R}),B({prompt:l,style:R})}),[U,B,l,R]),ne=(0,u.useCallback)((e=>{k("change style",e),P(e),n(m.UO,{context:U,style:e})}),[U,P,n]);return React.createElement("div",{className:"jetpack-ai-logo-generator__prompt"},React.createElement("div",{className:"jetpack-ai-logo-generator__prompt-header"},React.createElement("div",{className:"jetpack-ai-logo-generator__prompt-label"},__("Describe your site:","jetpack")),React.createElement("div",{className:"jetpack-ai-logo-generator__prompt-actions"},React.createElement(r.Button,{variant:"link",disabled:D||H||!j,onClick:K},React.createElement(p.A,null),Z)),S&&React.createElement(r.SelectControl,{__nextHasNoMarginBottom:!0,value:R,options:L,onChange:ne,disabled:D||H})),React.createElement(y,{prompt:l,setPrompt:c,generateHandler:te,disabled:D||H,actionDisabled:D||H||!j,placeholder:__("Describe your site or simply ask for a logo specifying some details about it","jetpack")}),React.createElement("div",{className:"jetpack-ai-logo-generator__prompt-footer"},!ee&&!H&&React.createElement("div",{className:"jetpack-ai-logo-generator__prompt-requests"},React.createElement("div",null,(0,s.sprintf)( +__("Error: %1$s","jetpack"),i)),t===u.Or?React.createElement(r.Button,{variant:"link",onClick:a,href:o,target:o?"_blank":null},__("Upgrade now","jetpack")):React.createElement(r.Button,{variant:"link",onClick:n},__("Try again","jetpack")))}},43984:(e,t,n)=>{"use strict";n.d(t,{A4:()=>l,DD:()=>w,DT:()=>P,Gm:()=>g,HM:()=>_,JR:()=>C,K2:()=>x,Rq:()=>R,UA:()=>h,UD:()=>A,br:()=>d,d5:()=>b,eJ:()=>m,fD:()=>p,fv:()=>k,im:()=>o,mI:()=>j,mT:()=>N,oZ:()=>s,pE:()=>f,sn:()=>i,so:()=>a,u0:()=>y,uQ:()=>E,vE:()=>u,yQ:()=>S,yy:()=>c,z5:()=>v});var r=n(27723);const __=r.__,a={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")}},s={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:"🔥"}},o="titleSummary",i="continue",l="simplify",c="correctSpelling",u="generateTitle",d="makeLonger",p="makeShorter",m="changeTone",h="summarize",g="changeLanguage",f="userPrompt",v="jetpackFormCustomPrompt",b="transformListToTable",k="writePostFromList",y=__("Translate","jetpack"),E=__("Change tone","jetpack"),w=__("Correct spelling and grammar","jetpack"),_=__("Simplify","jetpack"),C=__("Summarize","jetpack"),A=__("Make shorter","jetpack"),x=__("Expand","jetpack"),j=__("Turn list into a table","jetpack"),S=__("Write a post from this list","jetpack"),N=__("Generate a post title","jetpack"),R=__("Summary based on title","jetpack"),P=__("Continue writing","jetpack")},2166:(e,t,n)=>{"use strict";n.d(t,{R:()=>o});var r=n(51609),a=n.n(r);const s=(0,r.createContext)({}),o=({value:e,children:t})=>a().createElement(s.Provider,{value:e,children:t})},13965:(e,t,n)=>{"use strict";n.d(t,{Rb:()=>r.R});var r=n(2166);n(59886),n(53471)},53471:(e,t,n)=>{"use strict";n(51609),n(78836),n(13965)},59886:(e,t,n)=>{"use strict";var r=n(29491),a=n(86087),s=n(51609),o=n.n(s),i=n(46219),l=n(13965);(0,r.createHigherOrderComponent)((e=>t=>{const{suggestion:n,error:r,requestingState:s,request:c,stopSuggestion:u,eventSource:d}=(0,i.Ay)(),p=(0,a.useMemo)((()=>({suggestion:n,requestingError:r,requestingState:s,eventSource:d,requestSuggestion:c,stopSuggestion:u})),[n,r,s,d,c,u]);return o().createElement(l.Rb,{value:p},o().createElement(e,t))}),"withAiDataProvider")},46219:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>c,fC:()=>i});var r=n(86087),a=n(27723),s=n(87286),o=n(78836);const __=a.__;function i(e){switch(e){case o.Or:return{code:o.Or,message:__("You have reached the limit of requests for this site.","jetpack"),severity:"info"};case o.L9:return{code:o.L9,message:__("Your request was unclear. Mind trying again?","jetpack"),severity:"info"};case o.AZ:return{code:o.AZ,message:__("Jetpack AI services are currently unavailable. Sorry for the inconvenience.","jetpack"),severity:"info"};case o.ud:return{code:o.ud,message:__("This request has been flagged by our moderation system. Please try to rephrase it and try again.","jetpack"),severity:"info"};case o.cT:return{code:o.cT,message:__("The content is too large to be processed all at once. Please try to shorten it or divide it into smaller parts.","jetpack"),severity:"info"};case o.mA:default:return{code:o.mA,message:__("It was not possible to process your request. Mind trying again?","jetpack"),severity:"info"}}}function l(e){return e.replace(/^<\|start_header_id\|>assistant<\|end_header_id\|>[\n]+/,"")}function c({prompt:e,autoRequest:t=!1,askQuestionOptions:n={},initialRequestingState:a="init",onSuggestion:c,onDone:u,onStop:d,onError:p,onAllErrors:m}={}){const[h,g]=(0,r.useState)(a),[f,v]=(0,r.useState)(""),[b,k]=(0,r.useState)(),y=(0,r.useRef)(void 0),E=(0,r.useCallback)((e=>{const t=l(e?.detail);t&&(v(t),c?.(t))}),[c]),w=(0,r.useCallback)((e=>{L();const t=l(e?.detail);u?.(t),g("done")}),[u]),_=(0,r.useCallback)((e=>{m?.(e?.detail)}),[m]),C=(0,r.useCallback)((e=>{y?.current?.close(),g("error"),k(i(e)),p?.(i(e))}),[p]),A=(0,r.useCallback)((()=>C(o.Or)),[]),x=(0,r.useCallback)((()=>C(o.L9)),[]),j=(0,r.useCallback)((()=>C(o.AZ)),[]),S=(0,r.useCallback)((()=>C(o.ud)),[]),N=(0,r.useCallback)((()=>C(o.mA)),[]),R=(0,r.useCallback)((async(e,t={...n})=>{if(k(void 0),g("requesting"),y.current=await(0,s.A)(e,t),!y?.current)return;const r=y.current;g("suggesting"),r.addEventListener("suggestion",E),r.addEventListener(o.Or,A),r.addEventListener(o.L9,x),r.addEventListener(o.AZ,j),r.addEventListener(o.ud,S),r.addEventListener(o.mA,N),r.addEventListener(o.zn,_),r.addEventListener("done",w)}),[w,A,x,j,S,N,E]),P=(0,r.useCallback)((()=>{g("init"),v(""),k(void 0)}),[]),L=(0,r.useCallback)((()=>{if(!y?.current)return;const e=y?.current;e.close(),e.removeEventListener("suggestion",E),e.removeEventListener(o.Or,A),e.removeEventListener(o.L9,x),e.removeEventListener(o.AZ,j),e.removeEventListener(o.ud,S),e.removeEventListener(o.mA,N),e.removeEventListener("done",w)}),[y,E,A,x,j,S,N,w]),T=(0,r.useCallback)((()=>{L(),d?.(),g("done")}),[d]);return(0,r.useEffect)((()=>{if(e?.length)return t&&R(e,n),()=>{T()}}),[t,e,R,T]),{suggestion:f,error:b,requestingState:h,request:R,stopSuggestion:T,reset:P,handleErrorQuotaExceededError:A,eventSource:y.current}}},7804:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(86087),a=n(27723),s=n(10067),o=n.n(s),i=n(57745);const __=a.__,l=o()("jetpack-ai-client:use-audio-transcription"),c=e=>{if("string"==typeof e)return e;if("code"in e)switch(e.code){case"error_quota_exceeded":return __("You exceeded your current quota, please check your plan details.","jetpack");case"jetpack_ai_missing_audio_param":return __("The audio_file is required to perform a transcription.","jetpack");case"jetpack_ai_service_unavailable":return __("The Jetpack AI service is temporarily unavailable.","jetpack");case"file_size_not_supported":return __("The provided audio file is too big.","jetpack");case"file_type_not_supported":return __("The provided audio file type is not supported.","jetpack");case"jetpack_ai_error":return __("There was an error processing the transcription request.","jetpack");default:return e.message}return"message"in e?e.message:__("There was an error processing the transcription request.","jetpack")};function u({feature:e,onReady:t,onError:n}){const[a,s]=(0,r.useState)(""),[o,u]=(0,r.useState)(""),[d,p]=(0,r.useState)(!1),m=(0,r.useRef)(null);return{transcriptionResult:a,isTranscribingAudio:d,transcriptionError:o,transcribeAudio:(0,r.useCallback)((r=>{l("Transcribing audio"),s(""),u(""),p(!0);const a=new AbortController;m.current=a,(0,i.A)(r,e,a.signal).then((e=>{s(e),t?.(e)})).catch((e=>{a.signal.aborted||(u(e.message),n?.(c(e)))})).finally((()=>p(!1)))}),[i.A,s,u,p]),cancelTranscription:(0,r.useCallback)((()=>{m.current?.abort(),s(""),u(""),p(!1)}),[m,s,u,p])}}},66859:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(86087),a=n(27723);const __=a.__,s=25e6,o=1500,i=["audio/mpeg","audio/mp3","audio/ogg","audio/flac","audio/x-flac","audio/m4a","audio/x-m4a","audio/mp4","audio/wav","audio/wave","audio/x-wav","audio/webm"];function l(){const[e,t]=(0,r.useState)(!1);return{isValidatingAudio:e,validateAudio:(0,r.useCallback)(((e,n,r)=>{if(t(!0),e?.size>s)return t(!1),r(__("The audio file is too large. The maximum file size is 25MB.","jetpack"));const a=e instanceof File;if(a&&!i.includes(e.type))return t(!1),r(__("The audio file type is not supported. Please use a supported audio file type.","jetpack"));const l=new AudioContext;e.arrayBuffer().then((s=>{l.decodeAudioData(s,(function(s){const i=Math.ceil(s.duration);return i>o?(t(!1),r(__("The audio file is too long. The maximum recording time is 25 minutes.","jetpack"))):(t(!1),n({duration:i,isFile:a,size:e?.size}))}))}))}),[t])}}},66223:(e,t,n)=>{"use strict";n.d(t,{Hu:()=>a,Wp:()=>r});const r="auto",a="none"},62614:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>u});var r=n(10067),a=n.n(r),s=n(31439),o=n(51391);const i=a()("ai-client:use-image-generator"),l=(e,t)=>{const n=4e3-t;return e.length>n?e.substring(0,n-6)+" [...]":e},c=async(e,t,n)=>{const r=((e,t)=>{if(t){const n=`I need a Stable Diffusion prompt to generate a featured image for a blog post based on this user-provided image description:\n\n${t.length>1e3?t.substring(0,1e3):t}\n\nThe image should be a photo. Make sure you highlight the main suject of the image description, and include brief details about the light and style of the image.\nInclude a request to use high resolution and produce a highly detailed image, with sharp focus.\nReturn just the prompt, without comments.\n\nFor additional context, this is the post content:\n\n`;return n+l(e,n.length)}return"I need a Stable Diffusion prompt to generate a featured image for a blog post with the following content.\nThe image should be a photo. Make sure you highlight the main suject of the content, and include brief details about the light and style of the image.\nInclude a request to use high resolution and produce a highly detailed image, with sharp focus.\nReturn just the prompt, without comments. The content is:\n\n"+l(e,412)})(e,t);return await(0,s.A)(r,{feature:n})},u=()=>{const e=async function(e){let t="";try{t=(await(0,o.A)()).token}catch(e){return i("Error getting token: %o",e),Promise.reject(e)}try{const n="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-image",r={Authorization:`Bearer ${t}`,"Content-Type":"application/json"},a=await fetch(n,{method:"POST",headers:r,body:JSON.stringify(e)}).then((e=>e.json()));return a?.data?.status&&a?.data?.status>200?(i("Error generating image: %o",a),Promise.reject(a)):a}catch(e){return i("Error generating image: %o",e),Promise.reject(e)}};return{generateImage:async function({feature:t,postContent:n,responseFormat:r="url",userPrompt:a}){try{i("Generating image");const s=((e,t)=>{if(t){const n=`I need a cover image for a blog post based on this user prompt:\n\n${t.length>1e3?t.substring(0,1e3):t}\n\nBefore creating the image, identify the main topic of the user prompt and relate it to the post content.\nDo not represent the whole content in one image, keep it simple and just represent one single idea.\nDo not add details, detailed explanations or highlights from the content, just represent the main idea as if it was a photograph.\nDo not use collages or compositions with multiple elements or scenes. Stick to one single scene. Do not compose unrealistic scenes.\nIf the content describes facts, objects or concepts from the real world, represent them on a realistic style and do not make unreal compositions.\nIf the content is more abstract, use a more abstract style to represent the main idea.\nMake sure the light and the style are visually appealing.\nDo not add text to the image.\n\nFor additional context, this is the post content:\n\n`;return n+l(e,n.length)}const n="I need a cover image for a blog post.\nBefore creating the image, identify the main topic of the content and only represent it.\nDo not represent the whole content in one image, keep it simple and just represent one single idea.\nDo not add details, detailed explanations or highlights from the content, just represent the main idea as if it was a photograph.\nDo not use collages or compositions with multiple elements or scenes. Stick to one single scene. Do not compose unrealistic scenes.\nIf the content describes facts, objects or concepts from the real world, represent them on a realistic style and do not make unreal compositions.\nIf the content is more abstract, use a more abstract style to represent the main idea.\nMake sure the light and the style are visually appealing.\nDo not add text to the image.\n\nThis is the post content:\n\n";return n+l(e,838)})(n,a),o={prompt:s,response_format:r,feature:t,size:"1792x1024"};return await e(o)}catch(e){return i("Error generating image: %o",e),Promise.reject(e)}},generateImageWithStableDiffusion:async function({feature:t,postContent:n,userPrompt:r}){try{i("Generating image with Stable Diffusion");const a={prompt:await c(n,r,t),feature:t,model:"stable-diffusion"};return await e(a)}catch(e){return i("Error generating image: %o",e),Promise.reject(e)}},generateImageWithParameters:e}}},96657:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(86087);const a="audio/mp4;codecs=mp4a",s="audio/mp4",o="audio/webm";function i({onDone:e}={}){const t=(0,r.useRef)(null),[n,i]=(0,r.useState)("inactive"),l=(0,r.useRef)(!1),c=(0,r.useRef)(0),[u,d]=(0,r.useState)(0),p=(0,r.useRef)(null),[m,h]=(0,r.useState)(null),g=(0,r.useRef)([]).current,[f,v]=(0,r.useState)(null),b=(0,r.useRef)(null);function k(){return MediaRecorder.isTypeSupported(a)?new Blob(g,{type:s}):new Blob(g,{type:o})}const y=(0,r.useCallback)((e=>{if(C(),!e)return t?.current?.start();e<100&&(e=100),c.current=Date.now(),t?.current?.start(e)}),[]),E=(0,r.useCallback)((()=>{l.current=!0,t?.current?.pause(),d((e=>e+Date.now()-c.current))}),[]),w=(0,r.useCallback)((()=>{l.current=!1,t?.current?.resume(),c.current=Date.now()}),[]),_=(0,r.useCallback)((()=>{t?.current?.stop(),"recording"===n&&d((e=>e+Date.now()-c.current))}),[]),C=(0,r.useCallback)((()=>{g.length=0,h(null),v(null),d(0),l.current=!1,c.current=0}),[]),A=(0,r.useCallback)((()=>{t?.current&&(t.current.removeEventListener("start",S),t.current.removeEventListener("stop",N),t.current.removeEventListener("pause",R),t.current.removeEventListener("resume",P),t.current.removeEventListener("dataavailable",L),t.current=null)}),[]),x=(0,r.useCallback)((()=>{if(i("inactive"),C(),A(),!navigator.mediaDevices?.getUserMedia)return;const e=new AudioContext;b.current=e.createAnalyser();navigator.mediaDevices.getUserMedia({audio:!0}).then((n=>{p.current=n;e.createMediaStreamSource(n).connect(b.current),MediaRecorder.isTypeSupported(a)?t.current=new MediaRecorder(n,{mimeType:a}):t.current=new MediaRecorder(n,{mimeType:o}),t.current.addEventListener("start",S),t.current.addEventListener("stop",N),t.current.addEventListener("pause",R),t.current.addEventListener("resume",P),t.current.addEventListener("dataavailable",L)})).catch((e=>{throw e}))}),[]),j=(0,r.useCallback)((e=>{_(),v("string"==typeof e?e:e.message),i("error")}),[]);function S(){i("recording")}function N(){const t=k();e?.(t),g.length=0}function R(){i("paused")}function P(){i("recording")}function L(e){const{data:t}=e;t?.size&&(g.push(t),h(k()),l.current||d((e=>{const t=Date.now(),n=t-c.current;return c.current=t,e+n})))}return(0,r.useEffect)((()=>(x(),()=>{p.current&&p.current.getTracks().forEach((e=>e.stop())),A()})),[]),{state:n,blob:m,error:f,duration:u,analyser:b.current,onError:j,controls:{start:y,pause:E,resume:w,stop:_,reset:x}}}},93869:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(63162),a=n(47143),s=n(86087),o=n(10067);const i=n.n(o)()("ai-client:save-to-media-library");function l(){const[e,t]=(0,s.useState)(!1),{getSettings:n}=(0,a.useSelect)((e=>e("core/block-editor")),[]);return{isLoading:e,saveToMediaLibrary:(e,a)=>{const s=n();return new Promise(((n,o)=>{t(!0),i("Fetching image from URL"),fetch(e).then((e=>{i("Transforming response to blob"),e.blob().then((e=>{i("Uploading blob to media library");const l=Array();a?l.push(new File([e],a)):l.push(e),s.mediaUpload({allowedTypes:["image"],filesList:l,onFileChange([e]){(0,r.isBlobURL)(e?.url)||(e&&(i("Image uploaded to media library",e),n(e)),t(!1))},onError(e){i("Error uploading image to media library:",e),o(e),t(!1)}})})).catch((e=>{i("Error transforming response to blob:",e?.message),o(e?.message),t(!1)}))})).catch((e=>{i("Error fetching image from URL:",e?.message),o(e?.message),t(!1)}))}))}}}},97784:(e,t,n)=>{"use strict";n.d(t,{A:()=>c,u:()=>l});var r=n(86087),a=n(10067),s=n.n(a),o=n(46219);const i=s()("jetpack-ai-client:use-transcription-post-processing"),l="voice-to-content-simple-draft";function c({feature:e,onReady:t,onError:n,onUpdate:a}){const[s,l]=(0,r.useState)(""),[c,u]=(0,r.useState)(""),[d,p]=(0,r.useState)(!1),m=(0,r.useCallback)((e=>{l(e),a?.(e)}),[l,a]),h=(0,r.useCallback)((e=>{l(e),a?.(e),t?.(e)}),[l,a,t]),g=(0,r.useCallback)((e=>{u(e.message),n?.(e.message)}),[u,n]),{request:f,stopSuggestion:v}=(0,o.Ay)({onSuggestion:m,onDone:h,onError:g});return{postProcessingResult:s,isProcessingTranscription:d,postProcessingError:c,processTranscription:(0,r.useCallback)(((t,n)=>{i("Post-processing transcription"),l(""),u(""),p(!0);f([{role:"jetpack-ai",context:{type:t,content:n}}],{feature:e})}),[l,u,p,f,e]),cancelTranscriptionProcessing:(0,r.useCallback)((()=>{v(),p(!1)}),[v,p])}}},30151:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(56427),a=n(51609),s=n.n(a);const o=s().createElement(r.SVG,{viewBox:"0 0 32 32",width:"32",height:"32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"ai-assistant-icon"},s().createElement(r.Path,{className:"spark-first",d:"M9.33301 5.33325L10.4644 8.20188L13.333 9.33325L10.4644 10.4646L9.33301 13.3333L8.20164 10.4646L5.33301 9.33325L8.20164 8.20188L9.33301 5.33325Z"}),s().createElement(r.Path,{className:"spark-second",d:"M21.3333 5.33333L22.8418 9.15817L26.6667 10.6667L22.8418 12.1752L21.3333 16L19.8248 12.1752L16 10.6667L19.8248 9.15817L21.3333 5.33333Z"}),s().createElement(r.Path,{className:"spark-third",d:"M14.6667 13.3333L16.5523 18.1144L21.3333 20L16.5523 21.8856L14.6667 26.6667L12.781 21.8856L8 20L12.781 18.1144L14.6667 13.3333Z"}))},42154:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(56427);const a=React.createElement(r.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M10 3.95833C6.66328 3.95833 3.95833 6.66327 3.95833 9.99999C3.95833 13.3367 6.66328 16.0417 10 16.0417C13.3367 16.0417 16.0417 13.3367 16.0417 9.99999C16.0417 6.66327 13.3367 3.95833 10 3.95833ZM2.70833 9.99999C2.70833 5.97292 5.97292 2.70833 10 2.70833C14.0271 2.70833 17.2917 5.97292 17.2917 9.99999C17.2917 14.0271 14.0271 17.2917 10 17.2917C5.97292 17.2917 2.70833 14.0271 2.70833 9.99999Z"}),React.createElement(r.Path,{d:"M10.8333 5.83333H9.16667V10.8333H10.8333V5.83333Z"}),React.createElement(r.Path,{d:"M10.8333 12.5H9.16667V14.1667H10.8333V12.5Z"}))},91396:(e,t,n)=>{"use strict";n.d(t,{Qr:()=>o.A,Vo:()=>a.A,cj:()=>r.A,ni:()=>s.A});var r=n(30151),a=n(81353),s=(n(95007),n(96626),n(4416),n(25680)),o=n(67205)},81353:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(56427),a=n(51609),s=n.n(a);const o=s().createElement(r.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/SVG"},s().createElement(r.Path,{d:"M12 4.75C11.0479 4.75 10.1052 4.93753 9.22554 5.30187C8.34593 5.66622 7.5467 6.20025 6.87348 6.87348C6.20025 7.5467 5.66622 8.34593 5.30187 9.22554C4.93753 10.1052 4.75 11.0479 4.75 12C4.75 12.9521 4.93753 13.8948 5.30187 14.7745C5.66622 15.6541 6.20025 16.4533 6.87348 17.1265C7.5467 17.7997 8.34593 18.3338 9.22554 18.6981C10.1052 19.0625 11.0479 19.25 12 19.25C13.9228 19.25 15.7669 18.4862 17.1265 17.1265C18.4862 15.7669 19.25 13.9228 19.25 12C19.25 10.0772 18.4862 8.23312 17.1265 6.87348C15.7669 5.51384 13.9228 4.75 12 4.75ZM3.25 12C3.25 9.67936 4.17187 7.45376 5.81282 5.81282C7.45376 4.17187 9.67936 3.25 12 3.25C14.3206 3.25 16.5462 4.17187 18.1872 5.81282C19.8281 7.45376 20.75 9.67936 20.75 12C20.75 14.3206 19.8281 16.5462 18.1872 18.1872C16.5462 19.8281 14.3206 20.75 12 20.75C9.67936 20.75 7.45376 19.8281 5.81282 18.1872C4.17187 16.5462 3.25 14.3206 3.25 12Z",fill:"#008710"}),s().createElement(r.Rect,{x:"10.5",y:"8.25",width:"3",height:"4.875",rx:"1.5",fill:"#008710"}),s().createElement(r.Path,{d:"M15 11.25C15 11.644 14.9224 12.0341 14.7716 12.3981C14.6209 12.762 14.3999 13.0927 14.1213 13.3713C13.8427 13.6499 13.512 13.8709 13.1481 14.0216C12.7841 14.1724 12.394 14.25 12 14.25C11.606 14.25 11.2159 14.1724 10.8519 14.0216C10.488 13.8709 10.1573 13.6499 9.87868 13.3713C9.6001 13.0927 9.37913 12.762 9.22836 12.3981C9.0776 12.0341 9 11.644 9 11.25",stroke:"#008710",strokeWidth:"1.125",strokeLinecap:"round"}),s().createElement(r.Path,{d:"M11.4375 15.75C11.4375 16.0607 11.6893 16.3125 12 16.3125C12.3107 16.3125 12.5625 16.0607 12.5625 15.75L11.4375 15.75ZM11.4375 14.25L11.4375 15.75L12.5625 15.75L12.5625 14.25L11.4375 14.25Z",fill:"#008710"}))},95007:(e,t,n)=>{"use strict";var r=n(56427),a=n(51609),s=n.n(a);r.SVG,r.Path,r.Path},25680:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(56427),a=n(51609),s=n.n(a);const o=s().createElement(r.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/SVG"},s().createElement(r.Path,{d:"M12 4.75C11.0479 4.75 10.1052 4.93753 9.22554 5.30187C8.34593 5.66622 7.5467 6.20025 6.87348 6.87348C6.20025 7.5467 5.66622 8.34593 5.30187 9.22554C4.93753 10.1052 4.75 11.0479 4.75 12C4.75 12.9521 4.93753 13.8948 5.30187 14.7745C5.66622 15.6541 6.20025 16.4533 6.87348 17.1265C7.5467 17.7997 8.34593 18.3338 9.22554 18.6981C10.1052 19.0625 11.0479 19.25 12 19.25C13.9228 19.25 15.7669 18.4862 17.1265 17.1265C18.4862 15.7669 19.25 13.9228 19.25 12C19.25 10.0772 18.4862 8.23312 17.1265 6.87348C15.7669 5.51384 13.9228 4.75 12 4.75ZM3.25 12C3.25 9.67936 4.17187 7.45376 5.81282 5.81282C7.45376 4.17187 9.67936 3.25 12 3.25C14.3206 3.25 16.5462 4.17187 18.1872 5.81282C19.8281 7.45376 20.75 9.67936 20.75 12C20.75 14.3206 19.8281 16.5462 18.1872 18.1872C16.5462 19.8281 14.3206 20.75 12 20.75C9.67936 20.75 7.45376 19.8281 5.81282 18.1872C4.17187 16.5462 3.25 14.3206 3.25 12Z",fill:"#008710"}),s().createElement(r.Rect,{x:"12.75",y:"9",width:"2.25",height:"6",fill:"#008710"}),s().createElement(r.Rect,{x:"9",y:"9",width:"2.25",height:"6",fill:"#008710"}))},96626:(e,t,n)=>{"use strict";var r=n(56427),a=n(51609),s=n.n(a);r.SVG,r.Path,r.Path},4416:(e,t,n)=>{"use strict";var r=n(56427),a=n(51609),s=n.n(a);r.SVG,r.Path,r.Rect},67205:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(56427),a=n(51609),s=n.n(a);const o=s().createElement(r.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s().createElement(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5 10C12.5 11.3807 11.3807 12.5 10 12.5C8.61929 12.5 7.5 11.3807 7.5 10C7.5 8.61929 8.61929 7.5 10 7.5C11.3807 7.5 12.5 8.61929 12.5 10ZM14 10C14 12.2091 12.2091 14 10 14C7.79086 14 6 12.2091 6 10C6 7.79086 7.79086 6 10 6C12.2091 6 14 7.79086 14 10ZM16.75 21V19C16.75 17.4812 15.5188 16.25 14 16.25L6 16.25C4.48122 16.25 3.25 17.4812 3.25 19V21H4.75L4.75 19C4.75 18.3096 5.30964 17.75 6 17.75L14 17.75C14.6904 17.75 15.25 18.3096 15.25 19V21H16.75Z",fill:"currentColor"}),s().createElement(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.976 16.3599C21.2507 14.5642 22.0001 12.3695 22.0001 9.99969C22.0001 7.63128 21.2515 5.43769 19.9782 3.64258L18.754 4.50967C19.8537 6.05996 20.5001 7.95434 20.5001 9.99969C20.5001 12.0464 19.8528 13.9419 18.7519 15.4928L19.976 16.3599ZM17.3357 14.4897C18.2357 13.222 18.7648 11.6727 18.7648 9.99969C18.7648 8.32808 18.2365 6.77984 17.3379 5.51279L16.1137 6.37988C16.8387 7.4021 17.2648 8.65114 17.2648 9.99969C17.2648 11.3496 16.8378 12.5998 16.1116 13.6226L17.3357 14.4897Z",fill:"currentColor"}))},96865:(e,t,n)=>{"use strict";n.d(t,{$I:()=>p.$I,A4:()=>g.A4,AK:()=>p.AK,AZ:()=>m.AZ,DD:()=>g.DD,DT:()=>g.DT,E0:()=>o.A,FC:()=>p.FC,Gm:()=>g.Gm,HL:()=>p.HL,HM:()=>g.HM,Hu:()=>u.Hu,JR:()=>g.JR,K2:()=>g.K2,KJ:()=>f.K,Kf:()=>c.Ay,L9:()=>m.L9,MB:()=>h.MB,N0:()=>p.N0,OO:()=>h.OO,Or:()=>m.Or,Qr:()=>d.Qr,R0:()=>r.A,Rq:()=>g.Rq,Su:()=>h.Su,Tg:()=>f.T,UA:()=>g.UA,UD:()=>g.UD,Vo:()=>d.Vo,Wp:()=>u.Wp,Yj:()=>p.Yj,_E:()=>h.Hh,be:()=>s.A,br:()=>g.br,cT:()=>m.cT,cj:()=>d.cj,d5:()=>g.d5,eJ:()=>g.eJ,fD:()=>g.fD,im:()=>g.im,mA:()=>m.mA,mI:()=>g.mI,mT:()=>g.mT,ni:()=>d.ni,o2:()=>a.Ay,oZ:()=>g.oZ,pE:()=>g.pE,rh:()=>h.rh,rr:()=>l.A,sn:()=>g.sn,so:()=>g.so,u0:()=>g.u0,uH:()=>m.uH,uQ:()=>g.uQ,ud:()=>m.ud,vE:()=>g.vE,wS:()=>p.wS,xA:()=>i.A,yQ:()=>g.yQ,yy:()=>g.yy,z3:()=>p.z3,z5:()=>g.z5});n(51391),n(53664),n(87286);var r=n(31439),a=(n(57745),n(46219)),s=n(96657),o=n(7804),i=n(97784),l=n(66859),c=n(62614),u=n(66223),d=n(91396),p=n(27802),m=(n(13965),n(78836)),h=n(72586),g=n(43984),f=n(23101)},51391:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(85985),a=n(10067),s=n.n(a),o=n(48931);const i=s()("jetpack-ai-client:jwt"),l="jetpack-ai-jwt",c=12e4;async function u({apiNonce:e,siteId:t,expirationTime:n}={}){e=e||window.JP_CONNECTION_INITIAL_STATE.apiNonce,t=t||window.JP_CONNECTION_INITIAL_STATE.siteSuffix,n=n||c;const a=localStorage.getItem(l);let s,u=null;if(a)try{u=JSON.parse(a)}catch(e){i("Error parsing token",e)}if(u&&u?.expire>Date.now())return i("Using cached token"),u;const d=(0,r.Sy)();s=d?await(0,o.A)({path:"/wpcom/v2/sites/"+t+"/jetpack-openai-query/jwt",method:"POST"}):await(0,o.A)({path:"/jetpack/v4/jetpack-ai-jwt?_cacheBuster="+Date.now(),credentials:"same-origin",headers:{"X-WP-Nonce":e},method:"POST"});const p={token:s.token,blogId:d?t:s.blog_id,expire:Date.now()+n};return i("Storing new token"),localStorage.setItem(l,JSON.stringify(p)),p}},72586:(e,t,n)=>{"use strict";n.d(t,{Hh:()=>r.Hh,MB:()=>a.M,OO:()=>r.OO,Su:()=>r.Su,rh:()=>r.rh});var r=n(55166),a=n(84861)},84861:(e,t,n)=>{"use strict";n.d(t,{M:()=>a});var r=n(43984);function a(e,t={}){const{language:n,tone:a}=t,s=n?.split(" (")[0];switch(e){case r.Gm:return`${r.u0}: ${r.so[s].label}`;case r.eJ:return`${r.uQ}: ${r.oZ[a].label}`;case r.yy:return r.DD;case r.A4:return r.HM;case r.UA:return r.JR;case r.br:return r.K2;case r.fD:return r.UD;case r.d5:return r.mI;case r.fv:return r.yQ;case r.vE:return r.mT;case r.im:return r.Rq;case r.sn:return r.DT;default:return null}}},68641:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(21147);const a={paragraph:e=>e.replaceAll("\n","
    ")},s={emDelimiter:"_",headingStyle:"atx"},o={strikethrough:{filter:["del","s"],replacement:function(e){return"~~"+e+"~~"}}};class i{constructor({options:e={},rules:t={},keep:n=[],remove:a=[],fixes:i=[]}={}){this.fixes=i,this.turndownService=new r.A({...s,...e}),this.turndownService.keep(n),this.turndownService.remove(a);const l={...o,...t};for(const e in l)this.turndownService.addRule(e,l[e])}render({content:e}){const t=this.turndownService.turndown(e);return this.fixes.reduce(((e,t)=>a[t](e)),t)}}},55166:(e,t,n)=>{"use strict";n.d(t,{Hh:()=>i,OO:()=>r.A,Su:()=>a.S,rh:()=>l});var r=n(68641),a=n(31737);const s=new a.A,o=new r.A,i=({content:e,rules:t,extension:n})=>s.render({content:e,rules:t,extension:n}),l=({content:e})=>o.render({content:e})},31737:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,S:()=>s});var r=n(97158);const a=e=>e.replaceAll("\x3c!-- wp:list-item --\x3e","").replaceAll("\x3c!-- /wp:list-item --\x3e","").replaceAll("\x3c!-- wp:list --\x3e","").replaceAll("\x3c!-- /wp:list --\x3e","").replaceAll("
  • ","\x3c!-- wp:list-item --\x3e
  • ").replaceAll("
  • ","\x3c!-- /wp:list-item --\x3e").replaceAll("
      ",'\x3c!-- wp:list {"ordered":true} --\x3e
        ').replaceAll("
      ","
    \x3c!-- /wp:list --\x3e").replaceAll("
      ","\x3c!-- wp:list --\x3e
        ").replaceAll("
      ","
    \x3c!-- /wp:list --\x3e"),s={list:(e,t=!1)=>{const n=e.replace(/
  • \s+

    /g,"

  • ").replace(/<\/p>\s+<\/li>/g,"
  • ");return t?a(n):n},listItem:(e,t=!1)=>t?a(e.replace(/^<[ou]l>\s*/g,"").replace(/\s*<\/[ou]l>\s*$/g,"")):e,paragraph:(e,t=!1)=>t?e.replaceAll(/\s*<br \/>\s*/g,"
    "):e,table:(e,t=!1,{hasFixedLayout:n=!1})=>t?e.startsWith("\x3c!-- wp:table")?e:`\x3c!-- wp:table { "hasFixedLayout":${n?"true":"false"} } --\x3e${e}\x3c!-- /wp:table --\x3e`:e},o={breaks:!0},i=["list"];class l{constructor(e=o){this.markdownConverter=new r.A(e)}render({content:e,rules:t=i,extension:n=!1}){const r=this.markdownConverter.render(e);return t.reduce(((e,t)=>s[t](e,n)),r)}}},21902:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=()=>React.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon"},React.createElement("path",{d:"M6.99976 3.99994L7.84828 6.15141L9.99976 6.99994L7.84828 7.84847L6.99976 9.99994L6.15123 7.84847L3.99976 6.99994L6.15123 6.15141L6.99976 3.99994Z"}),React.createElement("path",{d:"M16 4L17.1314 6.86863L20 8L17.1314 9.13137L16 12L14.8686 9.13137L12 8L14.8686 6.86863L16 4Z"}),React.createElement("path",{d:"M11 10L12.4142 13.5858L16 15L12.4142 16.4142L11 20L9.58579 16.4142L6 15L9.58579 13.5858L11 10Z"}))},11574:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=()=>React.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon"},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.9291 7.96836L10.7308 17.6492L6.2145 14.2911L7.10952 13.0873L10.4221 15.5504L16.7253 7.07333L17.9291 7.96836Z"}))},47621:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=()=>React.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon"},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.2927 13.7485C18.5014 17.0423 15.5366 19.4901 12 19.4901C8.92508 19.4901 6.28236 17.6396 5.12469 14.9915L8.79556 12.8139L12.2508 14.0309C12.482 14.1123 12.7383 14.0756 12.9374 13.9327L15.8243 11.8601L15.9039 11.8992C16.1998 12.0451 16.6072 12.249 17.0533 12.4807C17.8331 12.8857 18.6946 13.3572 19.2927 13.7485ZM19.499 12.1129C18.9341 11.7788 18.3001 11.4379 17.7447 11.1495C17.287 10.9118 16.8698 10.7031 16.5672 10.5539C16.4158 10.4792 16.2928 10.4193 16.2074 10.378L16.1085 10.3303L16.0824 10.3177L16.0729 10.3132C15.8261 10.1954 15.5347 10.2214 15.3126 10.3809L12.3802 12.4861L8.9634 11.2827C8.75395 11.2089 8.52258 11.2318 8.3316 11.3451L4.65716 13.5248C4.55414 13.0294 4.5 12.5161 4.5 11.9901C4.5 7.84798 7.85786 4.49011 12 4.49011C16.1421 4.49011 19.5 7.84798 19.5 11.9901C19.5 12.0311 19.4997 12.072 19.499 12.1129ZM21 11.9901C21 16.9607 16.9706 20.9901 12 20.9901C7.02944 20.9901 3 16.9607 3 11.9901C3 7.01955 7.02944 2.99011 12 2.99011C16.9706 2.99011 21 7.01955 21 11.9901Z"}))},97034:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=()=>React.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon"},React.createElement("path",{d:"M7 6.49011L11 8.99011L7 11.4901V6.49011Z"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 2.99011C3.89543 2.99011 3 3.88554 3 4.99011V18.9901C3 20.0947 3.89543 20.9901 5 20.9901H19C20.1046 20.9901 21 20.0947 21 18.9901V4.99011C21 3.88554 20.1046 2.99011 19 2.99011H5ZM19 4.49011H5C4.72386 4.49011 4.5 4.71397 4.5 4.99011V15.6973L8.12953 13.0508C8.38061 12.8677 8.71858 12.8584 8.97934 13.0274L11.906 14.9243L15.4772 11.4524C15.7683 11.1694 16.2317 11.1694 16.5228 11.4524L19.5 14.3469V4.99011C19.5 4.71397 19.2761 4.49011 19 4.49011ZM4.5 18.9901V17.5537L8.59643 14.5667L11.5921 16.5084C11.8857 16.6987 12.2719 16.6607 12.5228 16.4167L16 13.0361L19.4772 16.4167L19.5 16.3933V18.9901C19.5 19.2663 19.2761 19.4901 19 19.4901H5C4.72386 19.4901 4.5 19.2663 4.5 18.9901Z"}))},6019:(e,t,n)=>{"use strict";n.d(t,{Q:()=>s});var r=n(56427),a=n(78867);const s=({variant:e="error"})=>{const t=(0,a.A)();return"muted"===e?React.createElement("span",{className:"jetpack-ai-fair-usage-notice-muted-variant"},t):"error"===e?React.createElement(r.Notice,{status:"error",isDismissible:!1,className:"jetpack-ai-fair-usage-notice"},t):null}},95933:(e,t,n)=>{"use strict";n.d(t,{x:()=>s});var r=n(56427),a=n(27723);const __=a.__,s=({onCancel:e,onRetry:t})=>{const n=__("We are sorry. There was an error loading your Jetpack AI plan data. Please, try again.","jetpack"),a=__("We are sorry. There was an error loading your Jetpack AI plan data. Please, reload the page and try again.","jetpack");return React.createElement("div",{className:"jetpack-ai-logo-generator-modal__notice-message-wrapper"},React.createElement("div",{className:"jetpack-ai-logo-generator-modal__notice-message"},React.createElement("span",{className:"jetpack-ai-logo-generator-modal__loading-message"},t?n:a)),React.createElement("div",{className:"jetpack-ai-logo-generator-modal__notice-actions"},React.createElement(r.Button,{variant:"tertiary",onClick:e},__("Cancel","jetpack")),t&&React.createElement(r.Button,{variant:"primary",onClick:t},__("Try again","jetpack"))))}},76194:(e,t,n)=>{"use strict";n.d(t,{N:()=>i});var r=n(27723),a=n(51609),s=n.n(a),o=n(42669);const __=r.__,i=({state:e="loadingFeature"})=>{const t=__("Loading…","jetpack"),n=__("Analyzing your site to create the perfect logo…","jetpack"),r=__("Generating logo…","jetpack");return s().createElement("div",{className:"jetpack-ai-logo-generator-modal__loading-wrapper"},s().createElement(o.$,null),s().createElement("span",{className:"jetpack-ai-logo-generator-modal__loading-message"},"loadingFeature"===e&&t,"analyzing"===e&&n,"generating"===e&&r))}},64537:(e,t,n)=>{"use strict";n.d(t,{T:()=>x});var r=n(85985),a=n(56427),s=n(47143),o=n(27723),i=n(13022),l=n(10067),c=n.n(l),u=n(51609),d=n(46381),p=n(61356),m=n(60674),h=n(88725),g=n(44461),f=n(19362),v=n(74423),b=n(95933),k=n(76194),y=n(32623),E=n(34706),w=n(11114),_=n(35421),C=n(48204);const __=o.__,A=c()("jetpack-ai-calypso:generator-modal"),x=({isOpen:e,onClose:t,onApplyLogo:n,onReload:o=null,siteDetails:l,context:c,placement:x})=>{const{tracks:j}=(0,r.st)(),{recordEvent:S}=j,{setSiteDetails:N,fetchAiAssistantFeature:R,loadLogoHistory:P,setIsLoadingHistory:L}=(0,s.useDispatch)(v.E),{getIsRequestingAiAssistantFeature:T}=(0,s.select)(v.E),[B,M]=(0,u.useState)(null),[I,D]=(0,u.useState)(),F=(0,u.useRef)(!0),z=(0,u.useRef)(!1),[O,H]=(0,u.useState)(!1),[U,V]=(0,u.useState)(!1),{selectedLogo:q,getAiAssistantFeature:G,generateFirstPrompt:$,generateLogo:W,setContext:Z,tierPlansEnabled:J,site:K,requireUpgrade:Y}=(0,h.A)(),{featureFetchError:Q,setFeatureFetchError:X,firstLogoPromptFetchError:ee,clearErrors:te}=(0,g.A)(),ne=l?.ID,[re,ae]=(0,u.useState)(!1),{nextTierCheckoutURL:se}=(0,m.Q)(),oe=G(),ie=(0,u.useCallback)((async()=>{try{M("analyzing"),S(p.vm,{context:c,tool:"first-prompt"});const e=await $();D(e),M("generating"),await W({prompt:e,style:"none"}),M(null)}catch(e){A("Error generating first logo",e),M(null)}}),[c,$,W]),le=(0,u.useCallback)((async()=>{try{if(!ne)throw new Error("Site ID is missing");if(!oe?.featuresControl?.["logo-generator"]?.enabled)throw X("Failed to fetch feature data"),new Error("Failed to fetch feature data");const e=!(0,f.NP)(String(ne)),t=oe?.costs?.["jetpack-ai-logo-generator"]?.logo??p._S,n=1,r=oe?.currentTier?.limit||0,a=oe?.currentTier?.value||0,s=oe?.usagePeriod?.requestsCount||0,o=!(J?1===a:a>0)&&!!oe?.nextTier&&!e&&(J?r-s{Z(c),S(p.iz,{context:c,placement:x}),le()}),[Z,c,x,le]),ue=()=>{F.current=!0,t(),M(null),H(!1),V(!1),te(),ae(!1),L(!1),S(p.ub,{context:c,placement:x})},de=(0,u.useCallback)((()=>{o&&(ue(),z.current=!1,o())}),[o,ue]),pe=e=>{ae(!0),n?.(e)},me=()=>{S(p.$i,{context:c})};let he;return(0,u.useEffect)((()=>{if(ne&&N(l),!z.current){T()||(z.current=!0,R())}}),[ne,l,N,T]),(0,u.useEffect)((()=>{e&&F.current&&(F.current=!1,ce())}),[e,ce]),he=B?React.createElement(k.N,{state:B}):Q||ee?React.createElement(b.x,{onCancel:ue,onRetry:o?de:null}):O||U?React.createElement(_.R,{onCancel:ue,upgradeURL:se,reason:O?"feature":"requests"}):React.createElement(React.Fragment,null,!re&&React.createElement(w.X,{initialPrompt:I}),React.createElement(E.s,{logo:q,onApplyLogo:pe,logoAccepted:re,siteId:String(ne)}),re?React.createElement("div",{className:"jetpack-ai-logo-generator__accept"},React.createElement(C.H,null),React.createElement("div",{className:"jetpack-ai-logo-generator__accept-actions"},React.createElement(a.Button,{variant:"primary",onClick:ue},__("Close","jetpack")))):React.createElement(React.Fragment,null,React.createElement(y.N,null),React.createElement("div",{className:"jetpack-ai-logo-generator__footer"},React.createElement(d.A,{onFeedbackClick:me})))),React.createElement(React.Fragment,null,e&&React.createElement(a.Modal,{className:"jetpack-ai-logo-generator-modal",onRequestClose:ue,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,title:__("Jetpack AI Logo Generator","jetpack")},React.createElement("div",{className:(0,i.A)("jetpack-ai-logo-generator-modal__body",{"notice-modal":O||U||Q||ee})},he)))}},32623:(e,t,n)=>{"use strict";n.d(t,{N:()=>c});var r=n(85985),a=n(56427),s=n(13022),o=n(26076),i=n(61356),l=n(88725);const c=()=>{const{tracks:e}=(0,r.st)(),{recordEvent:t}=e,{logos:n,selectedLogo:c,setSelectedLogoIndex:u,context:d,isLoadingHistory:p}=(0,l.A)(),m=e=>{const t=new URL(e);return t.searchParams.has("resize")||t.searchParams.append("resize","48,48"),t.toString()};return React.createElement("div",{className:"jetpack-ai-logo-generator__carousel"},!n.length&&p&&React.createElement(a.Button,{disabled:!0,className:(0,s.A)("jetpack-ai-logo-generator__carousel-logo")},React.createElement("img",{height:"48",width:"48",src:o,alt:"loading"})),!n.length&&!p&&React.createElement("div",null," "),n.map(((e,r)=>React.createElement(a.Button,{key:e.url,className:(0,s.A)("jetpack-ai-logo-generator__carousel-logo",{"is-selected":e.url===c.url}),onClick:()=>(e=>{t(i.Nt,{context:d,logos_count:n.length,selected_logo:e+1}),u(e)})(r)},React.createElement("img",{src:m(e.url),alt:e.description})))))}},42669:(e,t,n)=>{"use strict";n.d(t,{$:()=>s});var r=n(13022),a=n(26076);const s=({className:e=null})=>React.createElement("img",{src:a,alt:"Loading",className:(0,r.A)("jetpack-ai-logo-generator-modal__loader",e)})},34706:(e,t,n)=>{"use strict";n.d(t,{s:()=>S});var r=n(85985),a=n(56427),s=n(47143),o=n(27723),i=n(10067),l=n.n(i),c=n(11497),u=n(11574),d=n(47621),p=n(97034),m=n(61356),h=n(88725),g=n(44461),f=n(19362),v=n(74423),b=n(42669);const __=o.__,k=l()("jetpack-ai-calypso:logo-presenter"),y=({siteId:e})=>{const{tracks:t}=(0,r.st)(),{recordEvent:n}=t,{saveLogo:o,selectedLogo:i,isSavingLogoToLibrary:l,logos:c,selectedLogoIndex:d,context:g}=(0,h.A)(),b=!!i?.mediaId,{loadLogoHistory:y}=(0,s.useDispatch)(v.E),E=__("Saving…","jetpack"),w=__("Saved","jetpack");return l||b?React.createElement(a.Button,{className:"jetpack-ai-logo-generator-modal-presenter__action"},React.createElement(a.Icon,{icon:l?React.createElement(p.A,null):React.createElement(u.A,null)}),React.createElement("span",{className:"action-text"},l?E:w)):React.createElement(a.Button,{className:"jetpack-ai-logo-generator-modal-presenter__action",onClick:async()=>{if(!b&&!l){n(m.h4,{context:g,logos_count:c.length,selected_logo:d?d+1:0});try{const t=await o(i);(0,f.H)({siteId:e,url:i.url,newUrl:t.mediaURL,mediaId:t.mediaId}),y(e)}catch(e){k("Error saving logo",e)}}}},React.createElement(a.Icon,{icon:React.createElement(p.A,null)}),React.createElement("span",{className:"action-text"},__("Save in Library","jetpack")))},E=({onApplyLogo:e})=>{const{tracks:t}=(0,r.st)(),{recordEvent:n}=t,{isSavingLogoToLibrary:s,selectedLogo:o,logos:i,selectedLogoIndex:l,context:c}=(0,h.A)();return React.createElement(a.Button,{className:"jetpack-ai-logo-generator-modal-presenter__action",onClick:async()=>{s||(n(m.Zb,{context:c,logos_count:i.length,selected_logo:null!=l?l+1:0}),e?.(o?.mediaId))},disabled:s||!o?.mediaId,variant:"secondary"},React.createElement(a.Icon,{icon:React.createElement(d.A,null)}),React.createElement("span",{className:"action-text"},__("Use on block","jetpack")))},w=()=>React.createElement(React.Fragment,null,React.createElement(b.$,{className:"jetpack-ai-logo-generator-modal-presenter__logo"}),React.createElement("span",{className:"jetpack-ai-logo-generator-modal-presenter__loading-text"},__("Generating new logo…","jetpack"))),_=()=>React.createElement(React.Fragment,null,React.createElement(b.$,{className:"jetpack-ai-logo-generator-modal-presenter__logo"}),React.createElement("span",{className:"jetpack-ai-logo-generator-modal-presenter__loading-text"},__("Fetching previous logos…","jetpack"))),C=()=>React.createElement(React.Fragment,null,React.createElement("div",{style:{width:0,height:"229px"}}),React.createElement("span",{className:"jetpack-ai-logo-generator-modal-presenter__loading-text"},__("Once you generate a logo, it will show up here","jetpack"))),A=({disabled:e,ratedItem:t,onRate:n})=>{const{logos:r,selectedLogo:a}=(0,h.A)(),s=r.filter((e=>e.rating)).reduce(((e,t)=>(e[t.url]=t.rating,e)),{});return React.createElement(c.A,{disabled:e,ratedItem:t,feature:"logo-generator",savedRatings:s,options:{mediaLibraryId:a.mediaId,prompt:a.description},onRate:n})},x=({siteId:e,logo:t,onApplyLogo:n})=>React.createElement(React.Fragment,null,React.createElement("img",{src:t.url,alt:t.description,className:"jetpack-ai-logo-generator-modal-presenter__logo"}),React.createElement("div",{className:"jetpack-ai-logo-generator-modal-presenter__action-wrapper"},React.createElement("span",{className:"jetpack-ai-logo-generator-modal-presenter__description"},t.description),React.createElement("div",{className:"jetpack-ai-logo-generator-modal-presenter__actions"},React.createElement(y,{siteId:e}),React.createElement(E,{onApplyLogo:n}),React.createElement(A,{ratedItem:t.url,disabled:!1,onRate:n=>{(0,f.H)({siteId:e,url:t.url,newUrl:t.url,mediaId:t.mediaId,rating:n})}})))),j=({logo:e})=>React.createElement(React.Fragment,null,React.createElement("img",{src:e.url,alt:e.description,className:"jetpack-ai-logo-generator-modal-presenter__logo"}),React.createElement("div",{className:"jetpack-ai-logo-generator-modal-presenter__success-wrapper"},React.createElement(a.Icon,{icon:React.createElement(u.A,null)}),React.createElement("span",null,__("Your new logo was set to the block!","jetpack")))),S=({logo:e=null,loading:t=!1,onApplyLogo:n,logoAccepted:r=!1,siteId:a})=>{const{isRequestingImage:s}=(0,h.A)(),{saveToLibraryError:o,logoUpdateError:i}=(0,g.A)();let l;return e||s?e?l=t||s?React.createElement(w,null):r?React.createElement(j,{logo:e}):React.createElement(x,{siteId:String(a),logo:e,onApplyLogo:n}):(k("No logo provided, history still loading or logo being generated"),l=React.createElement(_,null)):l=React.createElement(C,null),React.createElement("div",{className:"jetpack-ai-logo-generator-modal-presenter__wrapper"},React.createElement("div",{className:"jetpack-ai-logo-generator-modal-presenter"},React.createElement("div",{className:"jetpack-ai-logo-generator-modal-presenter__content"},l),!r&&React.createElement("div",{className:"jetpack-ai-logo-generator-modal-presenter__rectangle"})),o&&React.createElement("div",{className:"jetpack-ai-logo-generator__prompt-error"},__("Error saving the logo to your library. Please try again.","jetpack")),i&&React.createElement("div",{className:"jetpack-ai-logo-generator__prompt-error"},__("Error applying the logo to your site. Please try again.","jetpack")))}},11114:(e,t,n)=>{"use strict";n.d(t,{K:()=>y,X:()=>E});var r=n(85985),a=n(56427),s=n(27723),o=n(51113),i=n(19783),l=n(10067),c=n.n(l),u=n(51609),d=n(66223),p=n(21902),m=n(61356),h=n(60674),g=n(88725),f=n(44461),v=n(6019),b=n(64024);const __=s.__,k=c()("jetpack-ai-calypso:prompt-box"),y=({prompt:e="",setPrompt:t=()=>{},disabled:n=!1,actionDisabled:r=!1,generateHandler:s=()=>{},placeholder:o="",buttonLabel:i=""})=>{const l=(0,u.useRef)(null);(0,u.useEffect)((()=>{l.current&&l.current.textContent!==e&&(l.current.textContent=e)}),[e]);return React.createElement("div",{className:"jetpack-ai-image-generator__prompt-query"},React.createElement("div",{role:"textbox",tabIndex:0,ref:l,contentEditable:!n,suppressContentEditableWarning:!0,className:"prompt-query__input",onInput:e=>{t(e.target.textContent||"")},onPaste:e=>{e.preventDefault();const n=e.currentTarget.ownerDocument.getSelection();if(!n||!n.rangeCount)return;const r=e.clipboardData.getData("text/plain");n.deleteFromDocument();n.getRangeAt(0).insertNode(document.createTextNode(r)),n.collapseToEnd(),t(l.current?.textContent||"")},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),s()),e.stopPropagation()},onKeyUp:()=>{""===l.current?.textContent&&(l.current.innerHTML="")},"data-placeholder":o}),React.createElement(a.Button,{variant:"primary",className:"jetpack-ai-image-generator__prompt-submit",onClick:s,disabled:r},i||__("Generate","jetpack")))},E=({initialPrompt:e=""})=>{const{tracks:t}=(0,r.st)(),{recordEvent:n}=t,[l,c]=(0,u.useState)(e),[E,w]=(0,u.useState)(0),{enhancePromptFetchError:_,logoFetchError:C}=(0,f.A)(),{nextTierCheckoutURL:A,hasNextTier:x}=(0,h.Q)(),j=l?.length>=m.N3,[S,N]=(0,u.useState)(!1),[R,P]=(0,u.useState)(null),[L,T]=(0,u.useState)([]),{generateLogo:B,enhancePrompt:M,setIsEnhancingPrompt:I,isBusy:D,isEnhancingPrompt:F,site:z,getAiAssistantFeature:O,requireUpgrade:H,context:U,tierPlansEnabled:V,imageStyles:q,guessStyle:G}=(0,g.A)(),$=__("Enhancing…","jetpack"),W=__("Enhance prompt","jetpack"),Z=F?$:W,J=(0,u.useRef)(null),K=(0,u.useCallback)((async()=>{k("Enhancing prompt",l),I(!0),n(m.vm,{context:U,tool:"enhance-prompt"});try{const e=await M({prompt:l});c(e),I(!1)}catch(e){k("Error enhancing prompt",e),I(!1)}}),[U,M,l,I]),Y=O(String(z?.id||"")),Q=Y?.currentTier?.value||0,X=Y?.usagePeriod?.requestsCount||0,ee=1===Q;(0,u.useEffect)((()=>{w(Q-X<=0?0:Q-X)}),[Q,X]),(0,u.useEffect)((()=>{J.current&&J.current.textContent!==l&&(J.current.textContent=l)}),[l]),(0,u.useEffect)((()=>{q&&q.length>0?(T([q.find((({value:e})=>e===d.Hu)),q.find((({value:e})=>e===d.Wp)),...q.filter((({value:e})=>![d.Hu,d.Wp].includes(e)))].filter((e=>e))),N(!0),P(d.Hu)):(T([]),N(!1),P(null))}),[q]);const te=(0,u.useCallback)((async()=>{if(k(U),R===d.Wp){I(!0),n(m.Tk,{context:U,tool:"image"});const e=await G(l)||d.Hu;P(e),n(m.vm,{context:U,tool:"image",style:e}),I(!1),B({prompt:l,style:e})}else n(m.vm,{context:U,tool:"image",style:R}),B({prompt:l,style:R})}),[U,B,l,R]),ne=(0,u.useCallback)((e=>{k("change style",e),P(e),n(m.UO,{context:U,style:e})}),[U,P,n]);return React.createElement("div",{className:"jetpack-ai-logo-generator__prompt"},React.createElement("div",{className:"jetpack-ai-logo-generator__prompt-header"},React.createElement("div",{className:"jetpack-ai-logo-generator__prompt-label"},__("Describe your site:","jetpack")),React.createElement("div",{className:"jetpack-ai-logo-generator__prompt-actions"},React.createElement(a.Button,{variant:"link",disabled:D||H||!j,onClick:K},React.createElement(p.A,null),Z)),S&&React.createElement(a.SelectControl,{__nextHasNoMarginBottom:!0,value:R,options:L,onChange:ne,disabled:D||H})),React.createElement(y,{prompt:l,setPrompt:c,generateHandler:te,disabled:D||H,actionDisabled:D||H||!j,placeholder:__("Describe your site or simply ask for a logo specifying some details about it","jetpack")}),React.createElement("div",{className:"jetpack-ai-logo-generator__prompt-footer"},!ee&&!H&&React.createElement("div",{className:"jetpack-ai-logo-generator__prompt-requests"},React.createElement("div",null,(0,s.sprintf)( // translators: %u is the number of requests -__("%u requests remaining.","jetpack"),E)),x&&React.createElement(React.Fragment,null," ",React.createElement(r.Button,{variant:"link",href:A,target:"_blank",onClick:()=>{n(m.AN,{context:U,placement:m.Cn})}},__("Upgrade","jetpack")))," ",React.createElement(r.Tooltip,{text:__("Logo generation costs 10 requests; prompt enhancement costs 1 request each","jetpack"),placement:"bottom"},React.createElement(o.A,{className:"prompt-footer__icon",icon:i.A}))),H&&V&&React.createElement(b.G,null),H&&!V&&React.createElement(v.Q,null),_&&React.createElement("div",{className:"jetpack-ai-logo-generator__prompt-error"},__("Error enhancing prompt. Please try again.","jetpack")),C&&React.createElement("div",{className:"jetpack-ai-logo-generator__prompt-error"},__("Error generating logo. Please try again.","jetpack"))))}},64024:(e,t,n)=>{"use strict";n.d(t,{G:()=>p});var a=n(85985),r=n(56427),s=n(86087),o=n(27723),i=n(51113),l=n(90311),c=n(61356),u=n(60674),d=n(88725);const __=o.__,p=()=>{const{tracks:e}=(0,a.st)(),{recordEvent:t}=e,n=__("Upgrade","jetpack"),o=(0,s.createInterpolateElement)(__("Not enough requests left to generate a logo. Upgrade now to increase it.","jetpack"),{strong:React.createElement("strong",null)}),{nextTierCheckoutURL:p}=(0,u.Q)(),{context:m}=(0,d.A)();return React.createElement("div",{className:"jetpack-upgrade-plan-banner"},React.createElement("div",{className:"jetpack-upgrade-plan-banner__wrapper"},React.createElement("div",null,React.createElement(i.A,{className:"jetpack-upgrade-plan-banner__icon",icon:l.A}),React.createElement("span",{className:"jetpack-upgrade-plan-banner__banner-description"},o)),React.createElement(r.Button,{href:p,target:"_blank",className:"is-primary",onClick:()=>{t(c.AN,{context:m,placement:c.tF})}},n)))}},35421:(e,t,n)=>{"use strict";n.d(t,{R:()=>c});var a=n(85985),r=n(56427),s=n(27723),o=n(3924),i=n(61356),l=n(88725);const __=s.__,c=({onCancel:e,upgradeURL:t,reason:n})=>{const{tracks:s}=(0,a.st)(),{recordEvent:c}=s,u=__("Upgrade your Jetpack AI for access to logo generation. This upgrade will also increase the amount of monthly requests you can use in for all AI-powered features.","jetpack"),d=__("Not enough requests left to generate a logo. Upgrade your Jetpack AI to increase the amount of requests you can use in all AI-powered features.","jetpack"),p=(0,o.A)("ai-logo-generator-fair-usage-policy",{anchor:"usage-limitations-and-upgrades"}),{context:m}=(0,l.A)();return React.createElement("div",{className:"jetpack-ai-logo-generator-modal__notice-message-wrapper"},React.createElement("div",{className:"jetpack-ai-logo-generator-modal__notice-message"},React.createElement("span",{className:"jetpack-ai-logo-generator-modal__loading-message"},"feature"===n?u:d)," ",React.createElement(r.Button,{variant:"link",href:p,target:"_blank"},__("Learn more about Jetpack AI.","jetpack"))),React.createElement("div",{className:"jetpack-ai-logo-generator-modal__notice-actions"},React.createElement(r.Button,{variant:"tertiary",onClick:e},__("Cancel","jetpack")),React.createElement(r.Button,{variant:"primary",href:t,target:"_blank",onClick:()=>{c(i.AN,{context:m,placement:i.Tz}),e()}},__("Upgrade","jetpack"))))}},48204:(e,t,n)=>{"use strict";n.d(t,{H:()=>l});var a=n(56427),r=n(27723),s=n(53512),o=n(13022),i=n(36791);const __=r.__,l=({className:e=null,onVisitBlankTarget:t})=>React.createElement("div",{className:(0,o.A)("jetpack-ai-logo-generator-modal-visit-site-banner",e)},React.createElement("div",{className:"jetpack-ai-logo-generator-modal-visit-site-banner__jetpack-logo"},React.createElement("img",{src:i,alt:"Jetpack"})),React.createElement("div",{className:"jetpack-ai-logo-generator-modal-visit-site-banner__content"},React.createElement("strong",null,__("Do you want to know all the amazing things you can do with Jetpack AI?","jetpack")),React.createElement("span",null,__("Generate and tweak content, create forms, get feedback and much more.","jetpack")),React.createElement("div",null,React.createElement(a.Button,{variant:"link",href:"https://jetpack.com/redirect/?source=logo_generator_learn_more_about_jetpack_ai",target:"_blank",onClick:t||null},__("Learn more about Jetpack AI","jetpack"),React.createElement(a.Icon,{icon:s.A,size:20})))))},61356:(e,t,n)=>{"use strict";n.d(t,{$i:()=>c,AN:()=>u,Cn:()=>m,N3:()=>f,Nt:()=>l,Tk:()=>p,Tz:()=>h,UO:()=>d,Zb:()=>i,_S:()=>v,h4:()=>o,iz:()=>a,tF:()=>g,ub:()=>r,vm:()=>s});const a="jetpack_ai_logo_generator_modal_open",r="jetpack_ai_logo_generator_modal_close",s="jetpack_ai_logo_generator_generate",o="jetpack_ai_logo_generator_save",i="jetpack_ai_logo_generator_use",l="jetpack_ai_logo_generator_navigate",c="jetpack_ai_logo_generator_feedback",u="jetpack_ai_upgrade_button",d="jetpack_ai_logo_generator_switch_style",p="jetpack_ai_logo_generator_guess_style",m="input_footer",h="free_user_screen",g="upgrade_prompt",f=3,v=10},60674:(e,t,n)=>{"use strict";n.d(t,{Q:()=>o});var a=n(85985),r=n(47143),s=n(74423);const o=()=>{const{nextTier:e,tierPlansEnabled:t}=(0,r.useSelect)((e=>{const t=e(s.E);return{nextTier:t.getAiAssistantFeature().nextTier,tierPlansEnabled:t.getAiAssistantFeature().tierPlansEnabled}}),[]),n=!(0,a.d9)()&&!(0,a.Sy)(),o=n?"jetpack-ai-upgrade-url-for-jetpack-sites":"jetpack-ai-yearly-tier-upgrade-nudge",i=(0,a.GE)(),l=`https://wordpress.com/home/${i}`,c=new URL("https://jetpack.com/redirect/");c.searchParams.set("source",o),c.searchParams.set("site",i),c.searchParams.set("path",t?`jetpack_ai_yearly:-q-${e?.limit}`:"jetpack_ai_yearly"),n||c.searchParams.set("query",`redirect_to=${encodeURIComponent(l)}`);return{nextTierCheckoutURL:c.toString(),hasNextTier:!!e}}},78867:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(47143),r=n(86087),s=n(27723),o=n(3924),i=n(74423);const __=s.__,l=()=>{const{usagePeriod:e}=(0,a.useSelect)((e=>({usagePeriod:e(i.E).getAiAssistantFeature().nextTier})),[]),t=(e=>{const t=__("You've reached this month's request limit, per our fair usage policy.","jetpack");if(!e)return t; +__("%u requests remaining.","jetpack"),E)),x&&React.createElement(React.Fragment,null," ",React.createElement(a.Button,{variant:"link",href:A,target:"_blank",onClick:()=>{n(m.AN,{context:U,placement:m.Cn})}},__("Upgrade","jetpack")))," ",React.createElement(a.Tooltip,{text:__("Logo generation costs 10 requests; prompt enhancement costs 1 request each","jetpack"),placement:"bottom"},React.createElement(o.A,{className:"prompt-footer__icon",icon:i.A}))),H&&V&&React.createElement(b.G,null),H&&!V&&React.createElement(v.Q,null),_&&React.createElement("div",{className:"jetpack-ai-logo-generator__prompt-error"},__("Error enhancing prompt. Please try again.","jetpack")),C&&React.createElement("div",{className:"jetpack-ai-logo-generator__prompt-error"},__("Error generating logo. Please try again.","jetpack"))))}},64024:(e,t,n)=>{"use strict";n.d(t,{G:()=>p});var r=n(85985),a=n(56427),s=n(86087),o=n(27723),i=n(51113),l=n(90311),c=n(61356),u=n(60674),d=n(88725);const __=o.__,p=()=>{const{tracks:e}=(0,r.st)(),{recordEvent:t}=e,n=__("Upgrade","jetpack"),o=(0,s.createInterpolateElement)(__("Not enough requests left to generate a logo. Upgrade now to increase it.","jetpack"),{strong:React.createElement("strong",null)}),{nextTierCheckoutURL:p}=(0,u.Q)(),{context:m}=(0,d.A)();return React.createElement("div",{className:"jetpack-upgrade-plan-banner"},React.createElement("div",{className:"jetpack-upgrade-plan-banner__wrapper"},React.createElement("div",null,React.createElement(i.A,{className:"jetpack-upgrade-plan-banner__icon",icon:l.A}),React.createElement("span",{className:"jetpack-upgrade-plan-banner__banner-description"},o)),React.createElement(a.Button,{href:p,target:"_blank",className:"is-primary",onClick:()=>{t(c.AN,{context:m,placement:c.tF})}},n)))}},35421:(e,t,n)=>{"use strict";n.d(t,{R:()=>c});var r=n(85985),a=n(56427),s=n(27723),o=n(3924),i=n(61356),l=n(88725);const __=s.__,c=({onCancel:e,upgradeURL:t,reason:n})=>{const{tracks:s}=(0,r.st)(),{recordEvent:c}=s,u=__("Upgrade your Jetpack AI for access to logo generation. This upgrade will also increase the amount of monthly requests you can use in for all AI-powered features.","jetpack"),d=__("Not enough requests left to generate a logo. Upgrade your Jetpack AI to increase the amount of requests you can use in all AI-powered features.","jetpack"),p=(0,o.A)("ai-logo-generator-fair-usage-policy",{anchor:"usage-limitations-and-upgrades"}),{context:m}=(0,l.A)();return React.createElement("div",{className:"jetpack-ai-logo-generator-modal__notice-message-wrapper"},React.createElement("div",{className:"jetpack-ai-logo-generator-modal__notice-message"},React.createElement("span",{className:"jetpack-ai-logo-generator-modal__loading-message"},"feature"===n?u:d)," ",React.createElement(a.Button,{variant:"link",href:p,target:"_blank"},__("Learn more about Jetpack AI.","jetpack"))),React.createElement("div",{className:"jetpack-ai-logo-generator-modal__notice-actions"},React.createElement(a.Button,{variant:"tertiary",onClick:e},__("Cancel","jetpack")),React.createElement(a.Button,{variant:"primary",href:t,target:"_blank",onClick:()=>{c(i.AN,{context:m,placement:i.Tz}),e()}},__("Upgrade","jetpack"))))}},48204:(e,t,n)=>{"use strict";n.d(t,{H:()=>l});var r=n(56427),a=n(27723),s=n(53512),o=n(13022),i=n(36791);const __=a.__,l=({className:e=null,onVisitBlankTarget:t})=>React.createElement("div",{className:(0,o.A)("jetpack-ai-logo-generator-modal-visit-site-banner",e)},React.createElement("div",{className:"jetpack-ai-logo-generator-modal-visit-site-banner__jetpack-logo"},React.createElement("img",{src:i,alt:"Jetpack"})),React.createElement("div",{className:"jetpack-ai-logo-generator-modal-visit-site-banner__content"},React.createElement("strong",null,__("Do you want to know all the amazing things you can do with Jetpack AI?","jetpack")),React.createElement("span",null,__("Generate and tweak content, create forms, get feedback and much more.","jetpack")),React.createElement("div",null,React.createElement(r.Button,{variant:"link",href:"https://jetpack.com/redirect/?source=logo_generator_learn_more_about_jetpack_ai",target:"_blank",onClick:t||null},__("Learn more about Jetpack AI","jetpack"),React.createElement(r.Icon,{icon:s.A,size:20})))))},61356:(e,t,n)=>{"use strict";n.d(t,{$i:()=>c,AN:()=>u,Cn:()=>m,N3:()=>f,Nt:()=>l,Tk:()=>p,Tz:()=>h,UO:()=>d,Zb:()=>i,_S:()=>v,h4:()=>o,iz:()=>r,tF:()=>g,ub:()=>a,vm:()=>s});const r="jetpack_ai_logo_generator_modal_open",a="jetpack_ai_logo_generator_modal_close",s="jetpack_ai_logo_generator_generate",o="jetpack_ai_logo_generator_save",i="jetpack_ai_logo_generator_use",l="jetpack_ai_logo_generator_navigate",c="jetpack_ai_logo_generator_feedback",u="jetpack_ai_upgrade_button",d="jetpack_ai_logo_generator_switch_style",p="jetpack_ai_logo_generator_guess_style",m="input_footer",h="free_user_screen",g="upgrade_prompt",f=3,v=10},60674:(e,t,n)=>{"use strict";n.d(t,{Q:()=>o});var r=n(85985),a=n(47143),s=n(74423);const o=()=>{const{nextTier:e,tierPlansEnabled:t}=(0,a.useSelect)((e=>{const t=e(s.E);return{nextTier:t.getAiAssistantFeature().nextTier,tierPlansEnabled:t.getAiAssistantFeature().tierPlansEnabled}}),[]),n=!(0,r.d9)()&&!(0,r.Sy)(),o=n?"jetpack-ai-upgrade-url-for-jetpack-sites":"jetpack-ai-yearly-tier-upgrade-nudge",i=(0,r.GE)(),l=`https://wordpress.com/home/${i}`,c=new URL("https://jetpack.com/redirect/");c.searchParams.set("source",o),c.searchParams.set("site",i),c.searchParams.set("path",t?`jetpack_ai_yearly:-q-${e?.limit}`:"jetpack_ai_yearly"),n||c.searchParams.set("query",`redirect_to=${encodeURIComponent(l)}`);return{nextTierCheckoutURL:c.toString(),hasNextTier:!!e}}},78867:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(47143),a=n(86087),s=n(27723),o=n(3924),i=n(74423);const __=s.__,l=()=>{const{usagePeriod:e}=(0,r.useSelect)((e=>({usagePeriod:e(i.E).getAiAssistantFeature().nextTier})),[]),t=(e=>{const t=__("You've reached this month's request limit, per our fair usage policy.","jetpack");if(!e)return t; // Translators: %s is the date when the requests will reset. -const n=__("Requests will reset on %s.","jetpack");return`${t} ${(0,s.sprintf)(n,e)}`})((e=>{if(!e?.nextStart)return null;const t=new Date(e.nextStart);return t.toLocaleString("default",{month:"long"})+" "+t.getDate()})(e)),n=(0,o.A)("ai-logo-generator-fair-usage-policy",{anchor:"jetpack-ai-usage-limit"});return(0,r.createInterpolateElement)(t,{link:React.createElement("a",{href:n,target:"_blank",rel:"noreferrer"})})}},88725:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var a=n(47143),r=n(10067),s=n.n(r),o=n(51609),i=n(31439),l=n(62614),c=n(93869),u=n(51391),d=n(19362),p=n(28229),m=n(74423),h=n(44461);const g=s()("jetpack-ai-calypso:use-logo-generator"),f=()=>{const{setSelectedLogoIndex:e,setIsSavingLogoToLibrary:t,setIsApplyingLogo:n,setIsRequestingImage:r,setIsEnhancingPrompt:s,increaseAiAssistantRequestsCount:f,addLogoToHistory:v,setContext:b,setIsLoadingHistory:k}=(0,a.useDispatch)(m.E),{logos:y,selectedLogoIndex:E,selectedLogo:w,siteDetails:_,isSavingLogoToLibrary:C,isApplyingLogo:A,isEnhancingPrompt:x,isBusy:j,isRequestingImage:S,getAiAssistantFeature:N,requireUpgrade:R,context:P,tierPlansEnabled:L,isLoadingHistory:T}=(0,a.useSelect)((e=>{const t=e(m.E);return{logos:t.getLogos(),selectedLogoIndex:t.getSelectedLogoIndex(),selectedLogo:t.getSelectedLogo(),siteDetails:t.getSiteDetails(),isSavingLogoToLibrary:t.getIsSavingLogoToLibrary(),isApplyingLogo:t.getIsApplyingLogo(),isRequestingImage:t.getIsRequestingImage(),isEnhancingPrompt:t.getIsEnhancingPrompt(),isBusy:t.getIsBusy(),getAiAssistantFeature:t.getAiAssistantFeature,requireUpgrade:t.getRequireUpgrade(),context:t.getContext(),tierPlansEnabled:t.getTierPlansEnabled(),isLoadingHistory:t.getIsLoadingHistory()}}),[]),{setFirstLogoPromptFetchError:B,setEnhancePromptFetchError:M,setLogoFetchError:I,setSaveToLibraryError:D,setLogoUpdateError:F}=(0,h.A)(),{generateImageWithParameters:z}=(0,l.Ay)(),{saveToMediaLibrary:O}=(0,c.A)(),{ID:H=null,name:U=null,description:V=null}=_||{},q=H?String(H):null,G=N(q),$=G?.costs?.["jetpack-ai-logo-generator"]?.logo,W=G?.featuresControl?.["logo-generator"],Z=W?.styles||[],J=(0,o.useCallback)((async function(){B(null),f();try{const e=await(0,u.A)();if(!e||!e.token)throw new Error("No token provided");g("Generating first prompt for site");const t={question:`Generate a simple and short prompt asking for a logo based on the site's name and description, keeping the same language.\nExample for a site named "The minimalist fashion blog", described as "Daily inspiration for all things fashion": A logo for a minimalist fashion site focused on daily sartorial inspiration with a clean and modern aesthetic that is sleek and sophisticated.\nAnother example, now for a site called "El observatorio de aves", described as "Un sitio dedicado a nuestros compañeros y compañeras entusiastas de la observación de aves.": Un logo para un sitio web dedicado a la observación de aves, capturando la esencia de la naturaleza y la pasión por la avifauna en un diseño elegante y representativo, reflejando una estética natural y apasionada por la vida silvestre.\n\nSite name: ${U}\nSite description: ${V}`,feature:"jetpack-ai-logo-generator",stream:!1},n="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query",a={Authorization:`Bearer ${e.token}`,"Content-Type":"application/json"},r=await fetch(n,{method:"POST",headers:a,body:JSON.stringify(t)}).then((e=>e.json()));return r?.choices?.[0]?.message?.content}catch(e){throw f(-1),B(e),e}}),[B,f,U,V]),K=(0,o.useCallback)((async function(e){if(I(null),!Z||!Z.length)return null;const t=[{role:"jetpack-ai",context:{type:"ai-assistant-guess-logo-style",request:e,name:U,description:V}}];try{const e=await(0,i.A)(t,{feature:"jetpack-ai-logo-generator"});if(!e)return null;const n=Z.find((({value:t})=>t===e));return n?n.value:null}catch(e){g("Error guessing style",e),Promise.reject(e)}}),[Z,U,V]),Y=(0,o.useCallback)((async function({prompt:e,style:t=null}){I(null);try{const n=await(0,u.A)();if(!n||!n.token)throw new Error("No token provided");if("auto"===t)throw new Error("Auto style is not supported");g("Generating image with prompt",e);const a={prompt:`I NEED to test how the tool works with extremely simple prompts. DO NOT add any detail, just use it AS-IS:\nCreate a single text-free iconic vector logo that symbolically represents the user request, using abstract or symbolic imagery.\nThe design should be modern, with either a vivid color scheme full of gradients or a color scheme that's monochromatic. Use any of those styles based on the user request mood.\nEnsure the logo is set against a clean solid background.\nEnsure the logo works in small sizes.\nThe imagery in the logo should subtly hint at the mood of the user request but DO NOT use any text, letters, or the name of the site on the imagery.\nThe image should contain a single icon, without variations, color palettes or different versions.\n\nUser request:${e}`,messages:t?[{role:"jetpack-ai",context:{type:"ai-assistant-generate-logo",request:e,name:U,description:V,style:t}}]:[],feature:"jetpack-ai-logo-generator",response_format:"b64_json",style:t||""};return await z(a)}catch(e){throw I(e),e}}),[U,V]),Q=(0,o.useCallback)((async e=>{D(null);try{if(g("Saving logo for site"),e.mediaId)return{mediaId:e.mediaId,mediaURL:e.url};const n={mediaId:0,mediaURL:""};t(!0);const{id:a,url:r}=await O(e.url,"site-logo.png");return n.mediaId=parseInt(a),n.mediaURL=r,n}catch(e){throw D(e),e}finally{t(!1)}}),[t,D]),X=(0,o.useCallback)((async()=>{F(null);try{if(!q||!w)throw new Error("Missing siteId or logo");g("Applying logo for site",q),n(!0);const{mediaId:e}=w;if(!e)throw new Error("Missing mediaId");await(0,p.Z)({siteId:q,imageId:String(e)})}catch(e){throw F(e),e}finally{n(!1)}}),[w,n,F,q]),ee=(0,o.useCallback)((e=>{v(e),(0,d.hm)({...e,siteId:String(q)})}),[q,v,d.hm]),te=(0,o.useCallback)((async function({prompt:e,style:t}){g("Generating logo for site"),r(!0);try{if(!$)throw new Error("Missing cost information");let n;f($);try{if(n=await Y({prompt:e,style:t}),!n||!n.data.length)throw new Error("No image returned")}catch(e){throw f(-$),e}const a=n.data[0].revised_prompt||null,r={url:"data:image/png;base64,"+n.data[0].b64_json,description:e,revisedPrompt:a};try{const t=await Q(r);ee({url:t.mediaURL,description:e,mediaId:t.mediaId,revisedPrompt:a})}catch(e){throw ee(r),e}}finally{r(!1)}}),[$,f,Q,ee,Y]);return{logos:y,selectedLogoIndex:E,selectedLogo:w,setSelectedLogoIndex:e,site:{id:q,name:U,description:V},generateFirstPrompt:J,saveLogo:Q,applyLogo:X,generateImage:Y,enhancePrompt:async function({prompt:e}){M(null),f();try{const t=await(0,u.A)();if(!t||!t.token)throw new Error("No token provided");g("Enhancing prompt",e);const n={messages:[{role:"system",content:"Enhance the prompt you receive.\nThe prompt is meant for generating a logo. Return the same prompt enhanced, and make each enhancement wrapped in brackets.\nDo not add any mention to text, letters, typography or the name of the site in the prompt.\nFor example: user's prompt: A logo for an ice cream shop. Returned prompt: A logo for an ice cream shop [that is pink] [and vibrant]."},{role:"user",content:e}],feature:"jetpack-ai-logo-generator",stream:!1},a="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query",r={Authorization:`Bearer ${t.token}`,"Content-Type":"application/json"},s=await fetch(a,{method:"POST",headers:r,body:JSON.stringify(n)}).then((e=>e.json()));return s?.choices?.[0]?.message?.content}catch(e){throw f(-1),M(e),e}},storeLogo:ee,generateLogo:te,setIsEnhancingPrompt:s,setIsRequestingImage:r,setIsSavingLogoToLibrary:t,setIsApplyingLogo:n,setContext:b,isEnhancingPrompt:x,isRequestingImage:S,isSavingLogoToLibrary:C,isApplyingLogo:A,isBusy:j,getAiAssistantFeature:N,requireUpgrade:R,context:P,tierPlansEnabled:L,isLoadingHistory:T,setIsLoadingHistory:k,imageStyles:Z,guessStyle:K}}},44461:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(47143),r=n(74423);const s=()=>{const{setFeatureFetchError:e,setFirstLogoPromptFetchError:t,setEnhancePromptFetchError:n,setLogoFetchError:s,setSaveToLibraryError:o,setLogoUpdateError:i}=(0,a.useDispatch)(r.E),{featureFetchError:l,firstLogoPromptFetchError:c,enhancePromptFetchError:u,logoFetchError:d,saveToLibraryError:p,logoUpdateError:m}=(0,a.useSelect)((e=>{const t=e(r.E);return{featureFetchError:t.getFeatureFetchError(),firstLogoPromptFetchError:t.getFirstLogoPromptFetchError(),enhancePromptFetchError:t.getEnhancePromptFetchError(),logoFetchError:t.getLogoFetchError(),saveToLibraryError:t.getSaveToLibraryError(),logoUpdateError:t.getLogoUpdateError()}}),[]);return{setFeatureFetchError:e,setFirstLogoPromptFetchError:t,setEnhancePromptFetchError:n,setLogoFetchError:s,setSaveToLibraryError:o,setLogoUpdateError:i,clearErrors:()=>{e(null),t(null),n(null),s(null),o(null),i(null)},featureFetchError:l,firstLogoPromptFetchError:c,enhancePromptFetchError:u,logoFetchError:d,saveToLibraryError:p,logoUpdateError:m}}},23101:(e,t,n)=>{"use strict";n.d(t,{K:()=>r.K,T:()=>a.T});var a=n(64537),r=n(11114)},19362:(e,t,n)=>{"use strict";n.d(t,{$t:()=>i,H:()=>o,NP:()=>l,Pv:()=>c,hm:()=>s});var a=n(13858);const r=10;function s({siteId:e,url:t,description:n,mediaId:a,revisedPrompt:s}){const o=i(e),l={url:t,description:n,mediaId:a,revisedPrompt:s};return o.push(l),localStorage.setItem(`logo-history-${e}`,JSON.stringify(o.slice(-r))),l}function o({siteId:e,url:t,newUrl:n,mediaId:a,rating:s}){const o=i(e),l=o.findIndex((e=>e.url===t));return l>-1&&(o[l].url=n,o[l].mediaId=a,o[l].rating=s),localStorage.setItem(`logo-history-${e}`,JSON.stringify(o.slice(-r))),o[l]}function i(e){const t=localStorage.getItem(`logo-history-${e}`);let n=t?JSON.parse(t):[];return Array.isArray(n)||(n=[]),n=n.slice(-r),n=n.filter((e=>"object"==typeof e&&"string"==typeof e.url&&"string"==typeof e.description)).map((e=>({url:e.url,description:e.description,mediaId:e.mediaId,rating:e.rating}))),n}function l(e){return 0===i(e).length}async function c(e){const t=i(e).filter((({mediaId:e})=>void 0!==e)).map((({mediaId:t})=>new Promise(((n,r)=>{(0,a.T)({siteId:e,mediaId:t}).then((e=>n({mediaId:t,exists:e}))).catch((e=>r(e)))}))));try{(await Promise.all(t)).filter((({exists:e})=>!e)).forEach((({mediaId:t})=>function({siteId:e,mediaId:t}){const n=i(e),a=n.findIndex((e=>e.mediaId===t));-1!==a&&(n.splice(a,1),localStorage.setItem(`logo-history-${e}`,JSON.stringify(n)))}({siteId:e,mediaId:t})))}catch{}}},13858:(e,t,n)=>{"use strict";n.d(t,{T:()=>r});var a=n(48931);async function r({mediaId:e}){const t=Number(e);if(Number.isNaN(t))return!1;try{return await(0,a.A)({path:`/wp/v2/media/${Number(e)}`,method:"GET"}),!0}catch(e){const t=e?.data?.status;if(404===t)return!1;throw e}}},28229:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(22746);async function r({siteId:e,imageId:t}){const n={site_logo:t,site_icon:t};return(0,a.A)({path:`/sites/${String(e)}/settings`,apiVersion:"v2",apiNamespace:"wp/v2",body:n,query:"source=jetpack-ai",method:"POST"})}},22746:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(48931);const r=5;let s=0;async function o(e){if(s+=1,s>r)throw s-=1,new Error("Too many requests");return(0,a.A)(e).finally((()=>{s-=1}))}},9624:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(19362),r=n(22746),s=n(9938);const o={storeAiAssistantFeature:e=>({type:s.UU,feature:e}),fetchAiAssistantFeature:()=>async({dispatch:e})=>{e({type:s.ql});try{const t=await(0,r.A)({path:"/wpcom/v2/jetpack-ai/ai-assistant-feature",query:"force=wpcom"});if(t.data)throw new Error("Failed to fetch");e(o.storeAiAssistantFeature(function(e){return{hasFeature:!!e["has-feature"],isOverLimit:!!e["is-over-limit"],requestsCount:e["requests-count"],requestsLimit:e["requests-limit"],requireUpgrade:!!e["site-require-upgrade"],errorMessage:e["error-message"],errorCode:e["error-code"],upgradeType:e["upgrade-type"],usagePeriod:{currentStart:e["usage-period"]?.["current-start"],nextStart:e["usage-period"]?.["next-start"],requestsCount:e["usage-period"]?.["requests-count"]||0},currentTier:e["current-tier"],nextTier:e["next-tier"],tierPlansEnabled:!!e["tier-plans-enabled"],costs:e.costs,featuresControl:e["features-control"]}}(t)))}catch(t){e({type:s.Rx,error:t})}},increaseAiAssistantRequestsCount:(e=1)=>({dispatch:t})=>{t({type:s.Lg,count:e})},setAiAssistantFeatureRequireUpgrade:(e=!0)=>({type:s.Kt,requireUpgrade:e}),setTierPlansEnabled:(e=!0)=>({type:s.c1,tierPlansEnabled:e}),setSiteDetails:e=>({type:s.Bz,siteDetails:e}),setSelectedLogoIndex:e=>({type:s.BG,selectedLogoIndex:e}),addLogoToHistory:e=>({type:s.sG,logo:e}),setIsSavingLogoToLibrary:e=>({type:s.E6,isSavingLogoToLibrary:e}),setIsApplyingLogo:e=>({type:s.Ep,isApplyingLogo:e}),updateSelectedLogo:(e,t)=>({type:s.r_,mediaId:e,url:t}),setIsRequestingImage:e=>({type:s.vk,isRequestingImage:e}),setIsEnhancingPrompt:e=>({type:s.O5,isEnhancingPrompt:e}),loadLogoHistory(e){const t=(0,a.$t)(e);return{type:s.ZI,history:t}},setFeatureFetchError:e=>({type:s.Rx,error:e}),setFirstLogoPromptFetchError:e=>({type:s.MQ,error:e}),setEnhancePromptFetchError:e=>({type:s.gG,error:e}),setLogoFetchError:e=>({type:s.q_,error:e}),setSaveToLibraryError:e=>({type:s.x0,error:e}),setLogoUpdateError:e=>({type:s.FN,error:e}),setContext:e=>({type:s.kZ,context:e}),setIsLoadingHistory:e=>({type:s.hY,isLoadingHistory:e})},i=o},9938:(e,t,n)=>{"use strict";n.d(t,{BG:()=>m,Bz:()=>l,E6:()=>g,Ep:()=>f,FN:()=>j,GB:()=>c,Kt:()=>o,Lg:()=>s,MQ:()=>_,O5:()=>k,Rx:()=>w,UU:()=>a,ZI:()=>y,c1:()=>i,gG:()=>C,hY:()=>E,kZ:()=>p,mx:()=>d,nb:()=>u,q_:()=>A,ql:()=>r,r_:()=>v,sG:()=>h,vk:()=>b,x0:()=>x});const a="STORE_AI_ASSISTANT_FEATURE",r="REQUEST_AI_ASSISTANT_FEATURE",s="INCREASE_AI_ASSISTANT_REQUESTS_COUNT",o="SET_AI_ASSISTANT_FEATURE_REQUIRE_UPGRADE",i="SET_TIER_PLANS_ENABLED",l="SET_SITE_DETAILS",c=20,u=3e3,d=3,p="SET_CONTEXT",m="SET_SELECTED_LOGO_INDEX",h="ADD_LOGO_TO_HISTORY",g="SET_IS_SAVING_LOGO_TO_LIBRARY",f="SET_IS_APPLYING_LOGO",v="SAVE_SELECTED_LOGO",b="SET_IS_REQUESTING_IMAGE",k="SET_IS_ENHANCING_PROMPT",y="SET_SITE_HISTORY",E="SET_IS_LOADING_HISTORY",w="SET_FEATURE_FETCH_ERROR",_="SET_FIRST_LOGO_PROMPT_FETCH_ERROR",C="SET_ENHANCE_PROMPT_FETCH_ERROR",A="SET_LOGO_FETCH_ERROR",x="SET_SAVE_TO_LIBRARY_ERROR",j="SET_LOGO_UPDATE_ERROR"},74423:(e,t,n)=>{"use strict";n.d(t,{E:()=>i});var a=n(47143),r=n(9624),s=n(23695),o=n(80037);const i="jetpack-ai/logo-generator",l=(0,a.createReduxStore)(i,{__experimentalUseThunks:!0,actions:r.A,reducer:s.A,selectors:o.A});(0,a.register)(l)},94891:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(9938);const r={siteDetails:{},features:{aiAssistantFeature:{hasFeature:!0,isOverLimit:!1,requestsCount:0,requestsLimit:a.GB,requireUpgrade:!1,errorMessage:"",errorCode:"",upgradeType:"default",currentTier:{slug:"ai-assistant-tier-free",value:0,limit:20},usagePeriod:{currentStart:"",nextStart:"",requestsCount:0},nextTier:null,tierPlansEnabled:!1,_meta:{isRequesting:!1,asyncRequestCountdown:a.mx,asyncRequestTimerId:0,isRequestingImage:!1},featuresControl:{"logo-generator":{enabled:!1,styles:[]}}}},history:[],selectedLogoIndex:0}},23695:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(61356),r=n(9938),s=n(94891);function o(e=s.A,t){switch(t.type){case r.ql:return{...e,_meta:{...e._meta??{},featureFetchError:null},features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!0,asyncRequestCountdown:r.mx,asyncRequestTimerId:0}}}};case r.UU:{const n={"jetpack-ai-logo-generator":{logo:a._S}};return{...e,features:{...e.features,aiAssistantFeature:{costs:n,...t.feature,requireUpgrade:t.feature?.requireUpgrade||0===t.feature?.currentTier?.value,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!1}}}}}case r.Lg:{const n=e?.features?.aiAssistantFeature?.usagePeriod||{requestsCount:0},a=(e?.features?.aiAssistantFeature?.requestsCount||0)+(t.count??1);n.requestsCount+=t.count??1;const s=e?.features?.aiAssistantFeature?.currentTier?.value,o=void 0===s&&!e?.features?.aiAssistantFeature?.hasFeature||0===s,i=void 0===s&&e?.features?.aiAssistantFeature?.hasFeature||1===s;let l=e?.features?.aiAssistantFeature?.currentTier?.limit||r.GB;i?l=r.nb:o&&(l=e?.features?.aiAssistantFeature?.requestsLimit);const c=(i||o?a:e?.features?.aiAssistantFeature?.usagePeriod?.requestsCount||0)>=l,u=o||c&&null!==e?.features?.aiAssistantFeature?.nextTier;return{...e,features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,isOverLimit:c,requestsCount:a,requireUpgrade:u,usagePeriod:{...n}}}}}case r.Kt:return{...e,features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,requireUpgrade:t.requireUpgrade,...t.requireUpgrade?{isOverLimit:!0}:{}}}};case r.c1:return{...e,features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,tierPlansEnabled:t.tierPlansEnabled}}};case r.Bz:return{...e,siteDetails:t.siteDetails};case r.BG:return{...e,selectedLogoIndex:t.selectedLogoIndex};case r.sG:{const n=[...e.history,t.logo];return{...e,history:n,selectedLogoIndex:n.length-1}}case r.E6:return{...e,_meta:{...e._meta??{},isSavingLogoToLibrary:t.isSavingLogoToLibrary}};case r.Ep:return{...e,_meta:{...e._meta??{},isApplyingLogo:t.isApplyingLogo}};case r.r_:{const n=e.history?.[e.selectedLogoIndex];return{...e,history:[...e.history.slice(0,e.selectedLogoIndex),{...n,mediaId:t.mediaId,url:t.url},...e.history.slice(e.selectedLogoIndex+1)]}}case r.vk:return{...e,_meta:{...e._meta??{},isRequestingImage:t.isRequestingImage}};case r.O5:return{...e,_meta:{...e._meta??{},isEnhancingPrompt:t.isEnhancingPrompt}};case r.ZI:return{...e,history:t.history,selectedLogoIndex:t.history?.length?t.history.length-1:0};case r.Rx:return{...e,features:{...e.features,aiAssistantFeature:{...e?.features?.aiAssistantFeature,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!1}}},_meta:{...e._meta??{},featureFetchError:t.error}};case r.MQ:return{...e,_meta:{...e._meta??{},firstLogoPromptFetchError:t.error}};case r.gG:return{...e,_meta:{...e._meta??{},enhancePromptFetchError:t.error}};case r.q_:return{...e,_meta:{...e._meta??{},logoFetchError:t.error}};case r.x0:return{...e,_meta:{...e._meta??{},saveToLibraryError:t.error}};case r.FN:return{...e,_meta:{...e._meta??{},logoUpdateError:t.error}};case r.kZ:return{...e,_meta:{...e._meta??{},context:t.context}};case r.hY:return{...e,_meta:{...e._meta??{},isLoadingHistory:t.isLoadingHistory}}}return e}},80037:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(61356);const r={getAiAssistantFeature(e){const t={...e.features.aiAssistantFeature};return delete t._meta,t},getSiteDetails:e=>e.siteDetails,getIsRequestingAiAssistantFeature:e=>e.features.aiAssistantFeature?._meta?.isRequesting??!1,getLogos:e=>e.history??[],getSelectedLogoIndex:e=>e.selectedLogoIndex??null,getSelectedLogo:e=>e.history?.[e.selectedLogoIndex]??null,getIsSavingLogoToLibrary:e=>e._meta?.isSavingLogoToLibrary??!1,getIsApplyingLogo:e=>e._meta?.isApplyingLogo??!1,getIsEnhancingPrompt:e=>e._meta?.isEnhancingPrompt??!1,getIsRequestingImage:e=>e._meta?.isRequestingImage??!1,getIsBusy:e=>r.getIsApplyingLogo(e)||r.getIsSavingLogoToLibrary(e)||r.getIsRequestingImage(e)||r.getIsEnhancingPrompt(e),getRequireUpgrade(e){const t=e.features.aiAssistantFeature;if(!t?.tierPlansEnabled)return t?.requireUpgrade;const n=t?.costs?.["jetpack-ai-logo-generator"]?.logo??a._S,r=t?.currentTier?.value||0,s=t?.usagePeriod?.requestsCount||0,o=1===r,i=!t?.nextTier;return e.features.aiAssistantFeature?.requireUpgrade||!o&&!i&&r-se._meta?.featureFetchError??null,getFirstLogoPromptFetchError:e=>e._meta?.firstLogoPromptFetchError??null,getEnhancePromptFetchError:e=>e._meta?.enhancePromptFetchError??null,getLogoFetchError:e=>e._meta?.logoFetchError??null,getSaveToLibraryError:e=>e._meta?.saveToLibraryError??null,getLogoUpdateError:e=>e._meta?.logoUpdateError??null,getContext:e=>e._meta?.context??"",getTierPlansEnabled:e=>e.features.aiAssistantFeature?.tierPlansEnabled??!1,getIsLoadingHistory:e=>e._meta?.isLoadingHistory??!1},s=r},53664:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var a=n(7675),r=n(10067),s=n.n(r),o=n(46219),i=n(51391),l=n(78836);const c=s()("jetpack-ai-client:suggestions-event-source");class u extends EventTarget{constructor(e){super(),this.fullMessage="",this.fullFunctionCall={name:"",arguments:""},this.isPromptClear=!1,this.controller=new AbortController,this.initEventSource(e)}async initEventSource({url:e,question:t,token:n,options:r={}}){if(!n)try{c("Token was not provided, requesting one..."),n=(await(0,i.A)()).token}catch(e){return void this.processErrorEvent(e)}const s={};if(Number.isInteger(parseInt(r.postId))&&(s.post_id=+r.postId),!e){const t=new URL("https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query");r?.fromCache&&t.searchParams.append("stream_cache","true"),e=t.toString(),c("URL not provided, using default: %o",e)}Array.isArray(t)?s.messages=t:s.question=t,r?.feature?.length&&(c("Feature: %o",r.feature),s.feature=r.feature),r?.functions?.length&&(c("Functions: %o",r.functions),s.functions=r.functions),r?.model?.length&&(c("Model: %o",r.model),s.model=r.model),this.errorUnclearPromptTriggered=!1,await(0,a.y)(e,{openWhenHidden:!0,method:"POST",headers:{"Content-type":"application/json",Authorization:"Bearer "+n},body:JSON.stringify(s),onclose:()=>{c("Stream closed")},onerror:e=>{throw this.processErrorEvent(e),e},onmessage:e=>{this.processEvent(e)},onopen:async e=>{if(e.ok)return;let t;throw e.status>=400&&e.status<=500&&![413,422,429].includes(e.status)&&(c("Connection error: %o",e),t=l.mA,this.dispatchEvent(new CustomEvent(l.mA,{detail:e}))),503===e.status&&(t=l.AZ,this.dispatchEvent(new CustomEvent(l.AZ))),413===e.status&&(t=l.cT,this.dispatchEvent(new CustomEvent(l.cT))),422===e.status&&(t=l.ud,this.dispatchEvent(new CustomEvent(l.ud))),429===e.status&&(t=l.Or,this.dispatchEvent(new CustomEvent(l.Or))),this.dispatchEvent(new CustomEvent(l.zn,{detail:(0,o.fC)(t)})),new Error},signal:this.controller.signal})}checkForUnclearPrompt(){if(this.isPromptClear)return;const e=this.fullMessage.replace(/__|(\*\*)/g,"");if(e.startsWith("JETPACK_AI_ERROR")){if(this.errorUnclearPromptTriggered)return;this.errorUnclearPromptTriggered=!0,this.dispatchEvent(new CustomEvent(l.L9)),c("Unclear error prompt dispatched"),this.dispatchEvent(new CustomEvent(l.zn,{detail:(0,o.fC)(l.L9)}))}else"JETPACK_AI_ERROR".startsWith(e)?c(this.fullMessage):this.isPromptClear=!0}close(){this.controller.abort()}processEvent(e){if("[DONE]"===e.data){if(this.errorUnclearPromptTriggered)return;if(this.fullMessage.length)return this.dispatchEvent(new CustomEvent("done",{detail:this.fullMessage})),void c("Done: %o",this.fullMessage);if(this.fullFunctionCall.name.length)return this.dispatchEvent(new CustomEvent("function_done",{detail:this.fullFunctionCall})),void c("Done: %o",this.fullFunctionCall)}let t;try{t=JSON.parse(e.data)}catch(t){return void c("Error parsing JSON",e,t)}const{delta:n}=t?.choices?.[0]??{delta:{content:null,function_call:null}},a=n.content,r=n.function_call;a&&(this.fullMessage+=a,this.checkForUnclearPrompt(),this.isPromptClear&&(this.dispatchEvent(new CustomEvent("chunk",{detail:a})),c("suggestion: %o",this.fullMessage),this.dispatchEvent(new CustomEvent("suggestion",{detail:this.fullMessage})))),r&&(null!=r.name&&(this.fullFunctionCall.name+=r.name),null!=r.arguments&&(this.fullFunctionCall.arguments+=r.arguments),this.dispatchEvent(new CustomEvent("functionCallChunk",{detail:this.fullFunctionCall})))}processErrorEvent(e){c("onerror: %o",e),this.dispatchEvent(new CustomEvent(l.mA,{detail:e})),this.dispatchEvent(new CustomEvent(l.zn,{detail:(0,o.fC)(l.mA)}))}}},78836:(e,t,n)=>{"use strict";n.d(t,{AZ:()=>r,L9:()=>c,Or:()=>s,cT:()=>i,mA:()=>l,uH:()=>a.u,ud:()=>o,zn:()=>u});var a=n(97784);const r="error_service_unavailable",s="error_quota_exceeded",o="error_moderation",i="error_context_too_large",l="error_network",c="error_unclear_prompt",u="error_response"},90372:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(10067);const r=n.n(a)()("dops:analytics");let s,o;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const i={initialize:function(e,t,n){i.setUser(e,t),i.setSuperProps(n),i.identifyUser()},setGoogleAnalyticsEnabled:function(e,t=null){this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){o={ID:e,username:t}},setSuperProps:function(e){s=e},assignSuperProps:function(e){s=Object.assign(s||{},e)},mc:{bumpStat:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);r("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),r('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);i.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);r("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),r('Built stat "%s" in group "%s"',t,e);return n}(e,t);i.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){i.tracks.recordPageView(e),i.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,a,r,s,o){i.ga.recordPurchase(e,t,n,a,r,s,o)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(s&&(r("- Super Props: %o",s),t=Object.assign(t,s)),r('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):r('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};i.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){i.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){r("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};i.ga.initialized||(o&&(e={userId:"u-"+o.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),i.ga.initialized=!0)},recordPageView:function(e,t){i.ga.initialize(),r("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,n,a){i.ga.initialize();let s="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(s+=" [Option Label: "+n+"]"),void 0!==a&&(s+=" [Option Value: "+a+"]"),r(s),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,a)},recordPurchase:function(e,t,n,a,r,s,o){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:a,currency:o}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:r,quantity:s}),window.ga("ecommerce:send")}},identifyUser:function(){o&&window._tkq.push(["identifyUser",o.ID,o.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}},l=i},42266:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var a=n(90311),r=n(19783),s=n(83883),o=n(51113),i=n(13022),l=n(51609),c=n.n(l),u=n(65486);const d=e=>{switch(e){case"error":case"warning":default:return a.A;case"info":return r.A;case"success":return s.A}},p=({level:e="warning",children:t,showIcon:n=!0,className:a})=>{const r=(0,i.A)(u.A.container,u.A[`is-${e}`],a);return c().createElement("div",{className:r},n&&c().createElement("div",{className:u.A["icon-wrapper"]},c().createElement(o.A,{icon:d(e),className:u.A.icon})),c().createElement("div",null,t))}},51112:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var a=n(96072),r=n.n(a),s=n(56427),o=n(27723),i=n(51113),l=n(53512),c=n(13022),u=n(51609),d=n.n(u),p=n(77560);const __=o.__,m=(0,u.forwardRef)(((e,t)=>{const{children:n,variant:a="primary",size:o="normal",weight:u="bold",icon:m,iconSize:h,disabled:g,isDestructive:f,isLoading:v,isExternalLink:b,className:k,text:y,fullWidth:E,...w}=e,_=(0,c.A)(p.A.button,k,{[p.A.normal]:"normal"===o,[p.A.small]:"small"===o,[p.A.icon]:Boolean(m),[p.A.loading]:v,[p.A.regular]:"regular"===u,[p.A["full-width"]]:E,[p.A["is-icon-button"]]:Boolean(m)&&!n});w.ref=t;const C="normal"===o?20:16,A=b&&d().createElement(d().Fragment,null,d().createElement(i.A,{size:C,icon:l.A,className:p.A["external-icon"]}),d().createElement(s.VisuallyHidden,{as:"span"},/* translators: accessibility text */ -__("(opens in a new tab)","jetpack"))),x=b?"_blank":void 0,j=n?.[0]&&null!==n[0]&&"components-tooltip"!==n?.[0]?.props?.className;return d().createElement(s.Button,r()({target:x,variant:a,className:(0,c.A)(_,{"has-text":!!m&&j}),icon:b?void 0:m,iconSize:h,disabled:g,"aria-disabled":g,isDestructive:f,text:y},w),v&&d().createElement(s.Spinner,null),d().createElement("span",null,n),A)}));m.displayName="Button";const h=m},69222:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var a=n(96072),r=n.n(a),s=n(29491),o=n(86087),i=n(27723),l=n(51112),c=n(78478);const __=i.__,u=({buttonStyle:e="icon",textToCopy:t,onCopy:n,...a})=>{const[i,u]=(0,o.useState)(!1),d=(0,o.useRef)(),p=(0,s.useCopyToClipboard)(t,(()=>{d.current&&clearTimeout(d.current),u(!0),n?.(),d.current=setTimeout((()=>{u(!1),d.current=void 0}),3e3)}));(0,o.useEffect)((()=>()=>{d.current&&clearTimeout(d.current)}),[]);let m=null,h=null;"text"!==e&&(m=i?React.createElement(c.Nr,null):React.createElement(c.ui,null));const g=__("Copy to clipboard","jetpack");return"icon"!==e&&(h=i?__("Copied!","jetpack"):g),React.createElement(l.A,r()({"aria-label":g,icon:m,children:h,ref:p},a))}},63406:(e,t,n)=>{"use strict";n.d(t,{I:()=>s});var a=n(47143),r=n(692);function s(){const e=(0,a.useDispatch)(r.store),t=(0,a.useSelect)((e=>e(r.store).getNotices()),[]);return{...e,createNotice:(t,n,a)=>e.createNotice(t,n,{type:"snackbar",...a}),createErrorNotice:(t,n)=>e.createErrorNotice(t,{type:"snackbar",...n}),createInfoNotice:(t,n)=>e.createInfoNotice(t,{type:"snackbar",...n}),createSuccessNotice:(t,n)=>e.createSuccessNotice(t,{type:"snackbar",...n}),createWarningNotice:(t,n)=>e.createWarningNotice(t,{type:"snackbar",...n}),getNotices:()=>t}}},11883:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(27723),r=n(13022),s=n(51609);n(4459);const __=a.__;class o extends s.Component{static defaultProps={"aria-hidden":"false",focusable:"true"};needsOffset(e,t){return["gridicons-arrow-left","gridicons-arrow-right","gridicons-calendar","gridicons-cart","gridicons-folder","gridicons-help-outline","gridicons-info","gridicons-info-outline","gridicons-posts","gridicons-star-outline","gridicons-star"].indexOf(e)>=0&&t%18==0}getSVGDescription(e){if("description"in this.props)return this.props.description;switch(e){default:return"";case"gridicons-audio":return __("Has audio.","jetpack");case"gridicons-arrow-left":return __("Arrow left","jetpack");case"gridicons-arrow-right":return __("Arrow right","jetpack");case"gridicons-calendar":return __("Is an event.","jetpack");case"gridicons-cart":return __("Is a product.","jetpack");case"chevron-down":return __("Show filters","jetpack");case"gridicons-comment":return __("Matching comment.","jetpack");case"gridicons-cross":return __("Close.","jetpack");case"gridicons-filter":return __("Toggle search filters.","jetpack");case"gridicons-folder":return __("Category","jetpack");case"gridicons-help-outline":return __("Help","jetpack");case"gridicons-info":case"gridicons-info-outline":return __("Information.","jetpack");case"gridicons-image-multiple":return __("Has multiple images.","jetpack");case"gridicons-image":return __("Has an image.","jetpack");case"gridicons-page":return __("Page","jetpack");case"gridicons-post":return __("Post","jetpack");case"gridicons-jetpack-search":case"gridicons-search":return __("Magnifying Glass","jetpack");case"gridicons-tag":return __("Tag","jetpack");case"gridicons-video":return __("Has a video.","jetpack")}}renderIcon(e){switch(e){default:return null;case"gridicons-audio":return React.createElement("g",null,React.createElement("path",{d:"M8 4v10.184C7.686 14.072 7.353 14 7 14c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V7h7v4.184c-.314-.112-.647-.184-1-.184-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V4H8z"}));case"gridicons-arrow-left":return React.createElement("g",null,React.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}));case"gridicons-arrow-right":return React.createElement("g",null,React.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"}));case"gridicons-block":return React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12c0-4.418 3.582-8 8-8 1.848 0 3.545.633 4.9 1.686L5.686 16.9C4.633 15.545 4 13.848 4 12zm8 8c-1.848 0-3.546-.633-4.9-1.686L18.314 7.1C19.367 8.455 20 10.152 20 12c0 4.418-3.582 8-8 8z"}));case"gridicons-calendar":return React.createElement("g",null,React.createElement("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.105 0-2 .896-2 2v13c0 1.104.895 2 2 2h14c1.104 0 2-.896 2-2V6c0-1.104-.896-2-2-2zm0 15H5V8h14v11z"}));case"gridicons-cart":return React.createElement("g",null,React.createElement("path",{d:"M9 20c0 1.1-.9 2-2 2s-1.99-.9-1.99-2S5.9 18 7 18s2 .9 2 2zm8-2c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm.396-5c.937 0 1.75-.65 1.952-1.566L21 5H7V4c0-1.105-.895-2-2-2H3v2h2v11c0 1.105.895 2 2 2h12c0-1.105-.895-2-2-2H7v-2h10.396z"}));case"gridicons-checkmark":return React.createElement("g",null,React.createElement("path",{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"}));case"gridicons-chevron-left":return React.createElement("g",null,React.createElement("path",{d:"M16.443 7.41L15.0399 6L9.06934 12L15.0399 18L16.443 16.59L11.8855 12L16.443 7.41Z"}));case"gridicons-chevron-right":return React.createElement("g",null,React.createElement("path",{d:"M10.2366 6L8.8335 7.41L13.391 12L8.8335 16.59L10.2366 18L16.2072 12L10.2366 6Z"}));case"gridicons-chevron-down":return React.createElement("g",null,React.createElement("path",{d:"M20 9l-8 8-8-8 1.414-1.414L12 14.172l6.586-6.586"}));case"gridicons-comment":return React.createElement("g",null,React.createElement("path",{d:"M3 6v9c0 1.105.895 2 2 2h9v5l5.325-3.804c1.05-.75 1.675-1.963 1.675-3.254V6c0-1.105-.895-2-2-2H5c-1.105 0-2 .895-2 2z"}));case"gridicons-computer":return React.createElement("g",null,React.createElement("path",{d:"M20 2H4c-1.104 0-2 .896-2 2v12c0 1.104.896 2 2 2h6v2H7v2h10v-2h-3v-2h6c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm0 14H4V4h16v12z"}));case"gridicons-cross":return React.createElement("g",null,React.createElement("path",{d:"M18.36 19.78L12 13.41l-6.36 6.37-1.42-1.42L10.59 12 4.22 5.64l1.42-1.42L12 10.59l6.36-6.36 1.41 1.41L13.41 12l6.36 6.36z"}));case"gridicons-filter":return React.createElement("g",null,React.createElement("path",{d:"M10 19h4v-2h-4v2zm-4-6h12v-2H6v2zM3 5v2h18V5H3z"}));case"gridicons-folder":return React.createElement("g",null,React.createElement("path",{d:"M18 19H6c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2h7c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2z"}));case"gridicons-help-outline":return React.createElement("g",null,React.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-1.962-2v-.528c0-.4.082-.74.246-1.017.163-.276.454-.546.87-.808.333-.21.572-.397.717-.565.146-.168.22-.36.22-.577 0-.172-.078-.308-.234-.41-.156-.1-.358-.15-.608-.15-.62 0-1.34.22-2.168.658l-.854-1.67c1.02-.58 2.084-.872 3.194-.872.913 0 1.63.202 2.15.603.52.4.78.948.78 1.64 0 .495-.116.924-.347 1.287-.23.362-.6.705-1.11 1.03-.43.278-.7.48-.807.61-.108.13-.163.282-.163.458V13h-1.885z"}));case"gridicons-image":return React.createElement("g",null,React.createElement("path",{d:"M13 9.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5-.672 1.5-1.5 1.5-1.5-.672-1.5-1.5zM22 6v12c0 1.105-.895 2-2 2H4c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h16c1.105 0 2 .895 2 2zm-2 0H4v7.444L8 9l5.895 6.55 1.587-1.85c.798-.932 2.24-.932 3.037 0L20 15.426V6z"}));case"gridicons-image-multiple":return React.createElement("g",null,React.createElement("path",{d:"M15 7.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5S17.328 9 16.5 9 15 8.328 15 7.5zM4 20h14c0 1.105-.895 2-2 2H4c-1.1 0-2-.9-2-2V8c0-1.105.895-2 2-2v14zM22 4v12c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zM8 4v6.333L11 7l4.855 5.395.656-.73c.796-.886 2.183-.886 2.977 0l.513.57V4H8z"}));case"gridicons-info":return React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}));case"gridicons-info-outline":return React.createElement("g",null,React.createElement("path",{d:"M13 9h-2V7h2v2zm0 2h-2v6h2v-6zm-1-7c-4.411 0-8 3.589-8 8s3.589 8 8 8 8-3.589 8-8-3.589-8-8-8m0-2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2z"}));case"gridicons-jetpack-search":return React.createElement("g",null,React.createElement("path",{d:"M0 9.257C0 4.15 4.151 0 9.257 0c5.105 0 9.256 4.151 9.256 9.257a9.218 9.218 0 01-2.251 6.045l.034.033h1.053L24 22.01l-1.986 1.989-6.664-6.662v-1.055l-.033-.033a9.218 9.218 0 01-6.06 2.264C4.15 18.513 0 14.362 0 9.257zm4.169 1.537h4.61V1.82l-4.61 8.973zm5.547-3.092v8.974l4.61-8.974h-4.61z"}));case"gridicons-phone":return React.createElement("g",null,React.createElement("path",{d:"M16 2H8c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h8c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-3 19h-2v-1h2v1zm3-2H8V5h8v14z"}));case"gridicons-pages":return React.createElement("g",null,React.createElement("path",{d:"M16 8H8V6h8v2zm0 2H8v2h8v-2zm4-6v12l-6 6H6c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 10V4H6v16h6v-4c0-1.105.895-2 2-2h4z"}));case"gridicons-posts":return React.createElement("g",null,React.createElement("path",{d:"M16 19H3v-2h13v2zm5-10H3v2h18V9zM3 5v2h11V5H3zm14 0v2h4V5h-4zm-6 8v2h10v-2H11zm-8 0v2h5v-2H3z"}));case"gridicons-search":return React.createElement("g",null,React.createElement("path",{d:"M21 19l-5.154-5.154C16.574 12.742 17 11.42 17 10c0-3.866-3.134-7-7-7s-7 3.134-7 7 3.134 7 7 7c1.42 0 2.742-.426 3.846-1.154L19 21l2-2zM5 10c0-2.757 2.243-5 5-5s5 2.243 5 5-2.243 5-5 5-5-2.243-5-5z"}));case"gridicons-star-outline":return React.createElement("g",null,React.createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.042 3.374.14-2.647 2.09-.784.62.27.963.91 3.25-2.813-1.872-.83-.553-.83.552-2.814 1.87.91-3.248.27-.962-.783-.62-2.648-2.092 3.374-.14.996-.04.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.89 18.18 21l-2.002-7.14L22 9.256l-7.418-.305L12 2z"}));case"gridicons-star":return React.createElement("g",null,React.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"}));case"gridicons-tag":return React.createElement("g",null,React.createElement("path",{d:"M20 2.007h-7.087c-.53 0-1.04.21-1.414.586L2.592 11.5c-.78.78-.78 2.046 0 2.827l7.086 7.086c.78.78 2.046.78 2.827 0l8.906-8.906c.376-.374.587-.883.587-1.413V4.007c0-1.105-.895-2-2-2zM17.007 9c-1.105 0-2-.895-2-2s.895-2 2-2 2 .895 2 2-.895 2-2 2z"}));case"gridicons-video":return React.createElement("g",null,React.createElement("path",{d:"M20 4v2h-2V4H6v2H4V4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2v-2h2v2h12v-2h2v2c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zM6 16H4v-3h2v3zm0-5H4V8h2v3zm4 4V9l4.5 3-4.5 3zm10 1h-2v-3h2v3zm0-5h-2V8h2v3z"}));case"gridicons-lock":return React.createElement(React.Fragment,null,React.createElement("g",{id:"lock"},React.createElement("path",{d:"M18,8h-1V7c0-2.757-2.243-5-5-5S7,4.243,7,7v1H6c-1.105,0-2,0.895-2,2v10c0,1.105,0.895,2,2,2h12c1.105,0,2-0.895,2-2V10 C20,8.895,19.105,8,18,8z M9,7c0-1.654,1.346-3,3-3s3,1.346,3,3v1H9V7z M13,15.723V18h-2v-2.277c-0.595-0.346-1-0.984-1-1.723 c0-1.105,0.895-2,2-2s2,0.895,2,2C14,14.738,13.595,15.376,13,15.723z"})),React.createElement("g",{id:"Layer_1"}));case"gridicons-external":return React.createElement("g",null,React.createElement("path",{d:"M19 13v6c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V7c0-1.105.895-2 2-2h6v2H5v12h12v-6h2zM13 3v2h4.586l-7.793 7.793 1.414 1.414L19 6.414V11h2V3h-8z"}))}}render(){const{size:e=24,className:t=""}=this.props,n=this.props.height||e,a=this.props.width||e,s=this.props.style||{height:n,width:a},o="gridicons-"+this.props.icon,i=(0,r.A)("gridicon",o,t,{"needs-offset":this.needsOffset(o,e)}),l=this.getSVGDescription(o);return React.createElement("svg",{className:i,focusable:this.props.focusable,height:n,onClick:this.props.onClick,style:s,viewBox:"0 0 24 24",width:a,xmlns:"http://www.w3.org/2000/svg","aria-hidden":this.props["aria-hidden"]},l?React.createElement("desc",null,l):null,this.renderIcon(o))}}const i=o},40597:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var a=n(56427),r=n(13022),s=n(51609),o=n.n(s),i=n(51112),l=n(11883);n(84813);const c=e=>({"top-end":"top left",top:"top center","top-start":"top right","bottom-end":"bottom left",bottom:"bottom center","bottom-start":"bottom right"}[e]),u=({className:e="",iconClassName:t="",placement:n="bottom-end",animate:u=!0,iconCode:d="info-outline",iconSize:p=18,offset:m=10,title:h,children:g,popoverAnchorStyle:f="icon",forceShow:v=!1,hoverShow:b=!1,wide:k=!1,inline:y=!0,shift:E=!1})=>{const[w,_]=(0,s.useState)(!1),[C,A]=(0,s.useState)(null),x=(0,s.useCallback)((()=>_(!1)),[_]),j=(0,s.useCallback)((e=>{e.preventDefault(),_(!w)}),[w,_]),S={position:c(n),placement:n,animate:u,noArrow:!1,resize:!1,flip:!1,offset:m,focusOnMount:"container",onClose:x,className:"icon-tooltip-container",inline:y,shift:E},N="wrapper"===f,R=(0,r.A)("icon-tooltip-wrapper",e),P={left:N?0:-(62-p/2)+"px"},L=N&&v,T=(0,s.useCallback)((()=>{b&&(C&&(clearTimeout(C),A(null)),_(!0))}),[b,C]),B=(0,s.useCallback)((()=>{if(b){const e=setTimeout((()=>{_(!1),A(null)}),100);A(e)}}),[b]);return o().createElement("div",{className:R,"data-testid":"icon-tooltip_wrapper",onMouseEnter:T,onMouseLeave:B},!N&&o().createElement(i.A,{variant:"link",onMouseDown:j},o().createElement(l.A,{className:t,icon:d,size:p})),o().createElement("div",{className:(0,r.A)("icon-tooltip-helper",{"is-wide":k}),style:P},(L||w)&&o().createElement(a.Popover,S,o().createElement("div",null,h&&o().createElement("div",{className:"icon-tooltip-title"},h),o().createElement("div",{className:"icon-tooltip-content"},g)))))}},78478:(e,t,n)=>{"use strict";n.d(t,{M5:()=>p,Nr:()=>u,ui:()=>d});var a=n(96072),r=n.n(a),s=n(56427),o=n(13022),i=n(84705),l=n(47842);const c=({className:e,size:t=24,viewBox:n="0 0 24 24",opacity:a=1,color:i="#2C3338",children:c})=>{const u={className:(0,o.A)(l.A.iconWrapper,e),width:t,height:t,viewBox:n,opacity:a,fill:void 0};return i&&(u.fill=i),React.createElement(s.SVG,r()({},u,{fillRule:"evenodd",clipRule:"evenodd",xmlns:"http://www.w3.org/2000/svg"}),React.createElement(s.G,{opacity:a},c))},u=({size:e,className:t=l.A["checkmark-icon"],color:n})=>React.createElement(c,{className:t,size:e,color:n},React.createElement(s.Path,{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"})),d=({size:e,className:t=l.A["clipboard-icon"],color:n})=>React.createElement(c,{className:t,size:e,color:n},React.createElement(s.Path,{d:"M5.625 5.5H15.375C15.444 5.5 15.5 5.55596 15.5 5.625V15.375C15.5 15.444 15.444 15.5 15.375 15.5H5.625C5.55596 15.5 5.5 15.444 5.5 15.375V5.625C5.5 5.55596 5.55596 5.5 5.625 5.5ZM4 5.625C4 4.72754 4.72754 4 5.625 4H15.375C16.2725 4 17 4.72754 17 5.625V10V15.375C17 16.2725 16.2725 17 15.375 17C15.375 17 6.52246 17 5.625 17C4.72754 17 4 16.2725 4 15.375V5.625ZM18.5 17.2812V8.28125H20V17.2812C20 18.7995 18.7704 20 17.2511 20H6.25V18.5H17.2511C17.9409 18.5 18.5 17.9721 18.5 17.2812Z"}));const p=({serviceName:e,className:t,iconSize:n})=>React.createElement(i.Ay,{className:(0,o.A)(l.A.socialIcon,l.A[e],t),icon:e,size:n||24})},67142:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var a=n(96072),r=n.n(a),s=n(27723),o=n(13022),i=n(51609),l=n.n(i);const __=s.__,c=({logoColor:e="#069e08",showText:t=!0,className:n,height:a=32,...s})=>{const i=t?"0 0 118 32":"0 0 32 32";return l().createElement("svg",r()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:i,className:(0,o.A)("jetpack-logo",n),"aria-labelledby":"jetpack-logo-title",height:a},s,{role:"img"}),l().createElement("title",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack")),l().createElement("path",{fill:e,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),t&&l().createElement(l().Fragment,null,l().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),l().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),l().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),l().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),l().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),l().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),l().createElement("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})))}},60442:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(29491),r=n(59053);const s=["sm","md","lg"],o=(e,t)=>{const n=Array.isArray(e)?e:[e],o=Array.isArray(t)?t:[t],[i,l,c]=s,u={sm:(0,a.useMediaQuery)(r.A[i]),md:(0,a.useMediaQuery)(r.A[l]),lg:(0,a.useMediaQuery)(r.A[c])};return n.map(((e,t)=>{const n=o[t];return n?((e,t,n)=>{const a=s.indexOf(e),r=a+1,o=t.includes("=");let i=[];return t.startsWith("<")&&(i=s.slice(0,o?r:a)),t.startsWith(">")&&(i=s.slice(o?a:r)),i?.length?i.some((e=>n[e])):n[e]})(e,n,u):u[e]}))}},11876:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(13022),r=n(51609),s=n.n(r),o=n(47876);const i=({children:e=null,width:t=null,height:n=null,className:r=""})=>s().createElement("div",{className:(0,a.A)(o.A.placeholder,r),style:{width:t,height:n}},e)},47656:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var a=n(90311),r=n(19783),s=n(83883),o=n(51113),i=n(10991),l=n(13022),c=n(51609),u=n.n(c),d=n(16024);const p=e=>{switch(e){case"error":case"warning":default:return a.A;case"info":return r.A;case"success":return s.A}},m=({level:e="info",title:t,children:n,actions:a,hideCloseButton:r=!1,onClose:s})=>{const c=(0,l.A)(d.A.container,d.A[`is-${e}`]);return u().createElement("div",{className:c},u().createElement("div",{className:d.A["icon-wrapper"]},u().createElement(o.A,{icon:p(e),className:d.A.icon})),u().createElement("div",{className:d.A["main-content"]},t&&u().createElement("div",{className:d.A.title},t),n,a&&a.length>0&&u().createElement("div",{className:d.A["action-bar"]},a.map(((e,t)=>u().createElement("div",{key:t,className:d.A.action},e))))),!r&&u().createElement("button",{"aria-label":"close",className:d.A["close-button"],onClick:s},u().createElement(o.A,{icon:i.A})))}},37975:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(51437);const r=(e,t={})=>{const n=(0,a.Y)();return new Intl.NumberFormat(n,t).format(e)}},36281:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(86221);const r=({value:e="https://jetpack.com",size:t=248,bgColor:n,fgColor:r,level:s,includeMargin:o,imageSettings:i,renderAs:l="canvas"})=>{const c={value:e,size:t,bgColor:n,fgColor:r,level:s,includeMargin:o,imageSettings:i};return"svg"===l?React.createElement(a.h,c):React.createElement(a.X,c)}},56461:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(28120),r=n.n(a),s=n(51609),o=n.n(s);n(85335);const i=({color:e="#FFFFFF",className:t="",size:n=20})=>{const a=t+" jp-components-spinner",r={width:n,height:n,fontSize:n,borderTopColor:e},s={borderTopColor:e,borderRightColor:e};return o().createElement("div",{className:a},o().createElement("div",{className:"jp-components-spinner__outer",style:r},o().createElement("div",{className:"jp-components-spinner__inner",style:s})))};i.propTypes={color:r().string,className:r().string,size:r().number};const l=i},10110:(e,t,n)=>{"use strict";n.d(t,{Q:()=>a,Z:()=>r});const a={"headline-medium":"h1","headline-small":"h2","headline-small-regular":"h2","title-medium":"h3","title-medium-semi-bold":"h3","title-small":"h4",body:"p","body-small":"p","body-extra-small":"p","body-extra-small-bold":"p",label:"p"},r=["mt","mr","mb","ml","mx","my","m","pt","pr","pb","pl","px","py","p"]},47425:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>d});var a=n(96072),r=n.n(a),s=n(13022),o=n(51609),i=n.n(o),l=n(10110),c=n(22073);const u=(0,o.forwardRef)((({variant:e="body",children:t,component:n,className:a,...u},d)=>{const p=n||l.Q[e]||"span",m=(0,o.useMemo)((()=>l.Z.reduce(((e,t)=>(void 0!==u[t]&&(e+=c.A[`${t}-${u[t]}`]+" ",delete u[t]),e)),"")),[u]);return i().createElement(p,r()({className:(0,s.A)(c.A.reset,c.A[e],a,m)},u,{ref:d}),t)}));u.displayName="Text";const d=u},50723:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>p});var a=n(51609),r=n.n(a),s=n(25196);const o={"--font-headline-medium":"48px","--font-headline-small":"36px","--font-title-medium":"24px","--font-title-small":"20px","--font-body":"16px","--font-body-small":"14px","--font-body-extra-small":"12px","--font-title-large":"var(--font-headline-small)","--font-label":"var(--font-body-extra-small)"},i={"--jp-black":"#000000","--jp-black-80":"#2c3338","--jp-white":"#ffffff","--jp-white-off":"#f9f9f6","--jp-gray":"#dcdcde","--jp-gray-0":"#F6F7F7","--jp-gray-5":"var(--jp-gray)","--jp-gray-10":"#C3C4C7","--jp-gray-20":"#A7AAAD","--jp-gray-40":"#787C82","--jp-gray-50":"#646970","--jp-gray-60":"#50575E","--jp-gray-70":"#3C434A","--jp-gray-80":"#2C3338","--jp-gray-90":"#1d2327","--jp-gray-off":"#e2e2df","--jp-red-0":"#F7EBEC","--jp-red-5":"#FACFD2","--jp-red-40":"#E65054","--jp-red-50":"#D63638","--jp-red-60":"#B32D2E","--jp-red-70":"#8A2424","--jp-red-80":"#691C1C","--jp-red":"#d63639","--jp-yellow-5":"#F5E6B3","--jp-yellow-10":"#F2CF75","--jp-yellow-20":"#F0C930","--jp-yellow-30":"#DEB100","--jp-yellow-40":"#C08C00","--jp-yellow-50":"#9D6E00","--jp-yellow-60":"#7D5600","--jp-blue-20":"#68B3E8","--jp-blue-40":"#1689DB","--jp-pink":"#C9356E","--jp-green-0":"#f0f2eb","--jp-green-5":"#d0e6b8","--jp-green-10":"#9dd977","--jp-green-20":"#64ca43","--jp-green-30":"#2fb41f","--jp-green-40":"#069e08","--jp-green-50":"#008710","--jp-green-60":"#007117","--jp-green-70":"#005b18","--jp-green-80":"#004515","--jp-green-90":"#003010","--jp-green-100":"#001c09","--jp-green":"#069e08","--jp-green-primary":"var( --jp-green-40 )","--jp-green-secondary":"var( --jp-green-30 )"},l={"--jp-border-radius":"4px","--jp-menu-border-height":"1px","--jp-underline-thickness":"2px"},c={"--spacing-base":"8px"},u={},d=(e,t,n)=>{const a={...o,...i,...l,...c};for(const t in a)e.style.setProperty(t,a[t]);n&&e.classList.add(s.A.global),t&&(u[t]={provided:!0,root:e})},p=({children:e=null,targetDom:t,id:n,withGlobalStyles:s=!0})=>{const o=(0,a.useRef)(),i=u?.[n]?.provided;return(0,a.useLayoutEffect)((()=>{if(!i)return t?d(t,n,s):void(o?.current&&d(o.current,n,s))}),[t,o,i,n,s]),t?r().createElement(r().Fragment,null,e):r().createElement("div",{ref:o},e)}},51437:(e,t,n)=>{"use strict";n.d(t,{Y:()=>r});var a=n(38443);const r=()=>{const{l10n:{locale:e}}=(0,a.getSettings)();if(e)return(e=>{const t=e.match(/^([a-z]{2,3})(_[a-z]{2}|_[a-z][a-z0-9]{4,7})?(?:_.*)?$/i);return t?`${t[1]}${t[2]?t[2]:""}`.replace("_","-"):"en-US"})(e);return window?.window?.navigator?.language??"en-US"}},3924:(e,t,n)=>{"use strict";function a(e,t={}){const n={};let a;if("undefined"!=typeof window&&(a=window?.JP_CONNECTION_INITIAL_STATE?.calypsoEnv),0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,n.url=encodeURIComponent(e)}else n.source=encodeURIComponent(e);for(const e in t)n[e]=encodeURIComponent(t[e]);!Object.keys(n).includes("site")&&"undefined"!=typeof jetpack_redirects&&Object.hasOwn(jetpack_redirects,"currentSiteRawUrl")&&(n.site=jetpack_redirects.currentBlogID??jetpack_redirects.currentSiteRawUrl),a&&(n.calypso_env=a);return"https://jetpack.com/redirect/?"+Object.keys(n).map((e=>e+"="+n[e])).join("&")}n.d(t,{A:()=>a})},7162:(e,t,n)=>{"use strict";n.d(t,{GlobalModals:()=>m.m,PostPublishPanels:()=>i.A,PublicizePanel:()=>o.A,SocialImageGeneratorPanel:()=>s.A,SocialPreviewsModal:()=>a.A,SocialPreviewsPanel:()=>r.A,getSocialScriptData:()=>u.getSocialScriptData,usePostCanUseSig:()=>p.e,usePublicizeConfig:()=>c.A,useSocialMediaConnections:()=>l.A,useSyncPostDataToStore:()=>d.F});n(31963),n(10267),n(70925);var a=n(81115),r=n(97192),s=n(29341),o=(n(12226),n(98725),n(29761),n(66561)),i=(n(25300),n(26029)),l=(n(26637),n(7610),n(50001)),c=(n(39553),n(77627)),u=(n(31873),n(70407));n.o(u,"GlobalModals")&&n.d(t,{GlobalModals:function(){return u.GlobalModals}}),n.o(u,"usePostCanUseSig")&&n.d(t,{usePostCanUseSig:function(){return u.usePostCanUseSig}}),n.o(u,"useSyncPostDataToStore")&&n.d(t,{useSyncPostDataToStore:function(){return u.useSyncPostDataToStore}});n(1101);var d=n(75168),p=(n(49036),n(383),n(38656)),m=(n(49192),n(48222),n(51371),n(50646),n(47453))},12141:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var a=n(78478),r=n(86087),s=n(13022),o=n(28120),i=n.n(o);const l=e=>{const{checked:t,serviceName:n,label:o,onClick:i,profilePicture:l}=e,[c,u]=(0,r.useState)(!!l),d=(0,r.useCallback)((()=>u(!1)),[]),p=(0,r.useCallback)((e=>{13===e.keyCode&&i()}),[i]);return React.createElement("div",{onClick:i,onKeyDown:p,role:"switch","aria-checked":t,tabIndex:"0",className:(0,s.A)("components-connection-icon",{"components-connection-icon__picture":c})},c&&React.createElement("img",{src:l,alt:o,onError:d}),React.createElement(a.M5,{alt:o,serviceName:"instagram-business"===n?"instagram":"twitter"===n?"x":n,className:"jetpack-publicize-gutenberg-social-icon"}))};l.propTypes={serviceName:i().string,label:i().string,profilePicture:i().string};const c=l},55488:(e,t,n)=>{"use strict";n(56427),n(27723),n(51609),n(12141),n(27817),n(86158),n(43119),n(52683),n(85605)},27817:(e,t,n)=>{"use strict";n.d(t,{s:()=>l});var a=n(56427),r=n(47143),s=n(27723),o=n(31963),i=n(85605);const __=s.__;function l({connection:e}){const t=(0,r.useSelect)((t=>t(o.M_).getUpdatingConnections().includes(e.connection_id)),[e.connection_id]);return React.createElement("div",{className:i.A["connection-name"]},e.profile_link?React.createElement(a.ExternalLink,{className:i.A["profile-link"],href:e.profile_link},e.display_name||e.external_display||e.external_name):React.createElement("span",{className:i.A["profile-link"]},e.display_name||e.external_name),t?React.createElement(a.Spinner,{color:"black","aria-label":__("Updating account","jetpack")}):null)}},86158:(e,t,n)=>{"use strict";n.d(t,{v:()=>c});var a=n(3924),r=n(56427),s=n(86087),o=n(27723),i=n(43119),l=n(76046);const __=o.__;function c({connection:e,service:t}){return"broken"!==e.status?null:React.createElement("div",null,React.createElement("span",{className:"description"},t?__("There is an issue with this connection.","jetpack"):(0,s.createInterpolateElement)((0,o.sprintf)("%1$s %2$s",__("This platform is no longer supported.","jetpack"),__("You can use our Manual Sharing feature instead.","jetpack")),{link:React.createElement(r.ExternalLink,{href:(0,a.A)("jetpack-social-manual-sharing-help")})}))," ",t?React.createElement(l.C,{connection:e,service:t}):React.createElement(i.V,{connection:e,variant:"link",isDestructive:!1}))}},43119:(e,t,n)=>{"use strict";n.d(t,{V:()=>u});var a=n(51112),r=n(56427),s=n(47143),o=n(86087),i=n(27723),l=n(31963),c=n(85605);const __=i.__,_x=i._x;function u({connection:e,variant:t="secondary",isDestructive:n=!0,buttonClassName:u}){const[d,p]=(0,o.useReducer)((e=>!e),!1),{deleteConnectionById:m}=(0,s.useDispatch)(l.M_),{isDisconnecting:h}=(0,s.useSelect)((t=>{const{getDeletingConnections:n}=t(l.M_);return{isDisconnecting:n().includes(e.connection_id)}}),[e.connection_id]),g=(0,o.useCallback)((async()=>{p(),await m({connectionId:e.connection_id})}),[e.connection_id,m]);return e.can_disconnect?React.createElement(React.Fragment,null,React.createElement(r.__experimentalConfirmDialog,{className:c.A.confirmDialog,isOpen:d,onConfirm:g,onCancel:p,cancelButtonText:__("Cancel","jetpack"),confirmButtonText:__("Yes","jetpack")},(0,o.createInterpolateElement)((0,i.sprintf)( +const n=__("Requests will reset on %s.","jetpack");return`${t} ${(0,s.sprintf)(n,e)}`})((e=>{if(!e?.nextStart)return null;const t=new Date(e.nextStart);return t.toLocaleString("default",{month:"long"})+" "+t.getDate()})(e)),n=(0,o.A)("ai-logo-generator-fair-usage-policy",{anchor:"jetpack-ai-usage-limit"});return(0,a.createInterpolateElement)(t,{link:React.createElement("a",{href:n,target:"_blank",rel:"noreferrer"})})}},88725:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(47143),a=n(10067),s=n.n(a),o=n(51609),i=n(31439),l=n(62614),c=n(93869),u=n(51391),d=n(19362),p=n(28229),m=n(74423),h=n(44461);const g=s()("jetpack-ai-calypso:use-logo-generator"),f=()=>{const{setSelectedLogoIndex:e,setIsSavingLogoToLibrary:t,setIsApplyingLogo:n,setIsRequestingImage:a,setIsEnhancingPrompt:s,increaseAiAssistantRequestsCount:f,addLogoToHistory:v,setContext:b,setIsLoadingHistory:k}=(0,r.useDispatch)(m.E),{logos:y,selectedLogoIndex:E,selectedLogo:w,siteDetails:_,isSavingLogoToLibrary:C,isApplyingLogo:A,isEnhancingPrompt:x,isBusy:j,isRequestingImage:S,getAiAssistantFeature:N,requireUpgrade:R,context:P,tierPlansEnabled:L,isLoadingHistory:T}=(0,r.useSelect)((e=>{const t=e(m.E);return{logos:t.getLogos(),selectedLogoIndex:t.getSelectedLogoIndex(),selectedLogo:t.getSelectedLogo(),siteDetails:t.getSiteDetails(),isSavingLogoToLibrary:t.getIsSavingLogoToLibrary(),isApplyingLogo:t.getIsApplyingLogo(),isRequestingImage:t.getIsRequestingImage(),isEnhancingPrompt:t.getIsEnhancingPrompt(),isBusy:t.getIsBusy(),getAiAssistantFeature:t.getAiAssistantFeature,requireUpgrade:t.getRequireUpgrade(),context:t.getContext(),tierPlansEnabled:t.getTierPlansEnabled(),isLoadingHistory:t.getIsLoadingHistory()}}),[]),{setFirstLogoPromptFetchError:B,setEnhancePromptFetchError:M,setLogoFetchError:I,setSaveToLibraryError:D,setLogoUpdateError:F}=(0,h.A)(),{generateImageWithParameters:z}=(0,l.Ay)(),{saveToMediaLibrary:O}=(0,c.A)(),{ID:H=null,name:U=null,description:V=null}=_||{},q=H?String(H):null,G=N(q),$=G?.costs?.["jetpack-ai-logo-generator"]?.logo,W=G?.featuresControl?.["logo-generator"],Z=W?.styles||[],J=(0,o.useCallback)((async function(){B(null),f();try{const e=await(0,u.A)();if(!e||!e.token)throw new Error("No token provided");g("Generating first prompt for site");const t={question:`Generate a simple and short prompt asking for a logo based on the site's name and description, keeping the same language.\nExample for a site named "The minimalist fashion blog", described as "Daily inspiration for all things fashion": A logo for a minimalist fashion site focused on daily sartorial inspiration with a clean and modern aesthetic that is sleek and sophisticated.\nAnother example, now for a site called "El observatorio de aves", described as "Un sitio dedicado a nuestros compañeros y compañeras entusiastas de la observación de aves.": Un logo para un sitio web dedicado a la observación de aves, capturando la esencia de la naturaleza y la pasión por la avifauna en un diseño elegante y representativo, reflejando una estética natural y apasionada por la vida silvestre.\n\nSite name: ${U}\nSite description: ${V}`,feature:"jetpack-ai-logo-generator",stream:!1},n="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query",r={Authorization:`Bearer ${e.token}`,"Content-Type":"application/json"},a=await fetch(n,{method:"POST",headers:r,body:JSON.stringify(t)}).then((e=>e.json()));return a?.choices?.[0]?.message?.content}catch(e){throw f(-1),B(e),e}}),[B,f,U,V]),K=(0,o.useCallback)((async function(e){if(I(null),!Z||!Z.length)return null;const t=[{role:"jetpack-ai",context:{type:"ai-assistant-guess-logo-style",request:e,name:U,description:V}}];try{const e=await(0,i.A)(t,{feature:"jetpack-ai-logo-generator"});if(!e)return null;const n=Z.find((({value:t})=>t===e));return n?n.value:null}catch(e){g("Error guessing style",e),Promise.reject(e)}}),[Z,U,V]),Y=(0,o.useCallback)((async function({prompt:e,style:t=null}){I(null);try{const n=await(0,u.A)();if(!n||!n.token)throw new Error("No token provided");if("auto"===t)throw new Error("Auto style is not supported");g("Generating image with prompt",e);const r={prompt:`I NEED to test how the tool works with extremely simple prompts. DO NOT add any detail, just use it AS-IS:\nCreate a single text-free iconic vector logo that symbolically represents the user request, using abstract or symbolic imagery.\nThe design should be modern, with either a vivid color scheme full of gradients or a color scheme that's monochromatic. Use any of those styles based on the user request mood.\nEnsure the logo is set against a clean solid background.\nEnsure the logo works in small sizes.\nThe imagery in the logo should subtly hint at the mood of the user request but DO NOT use any text, letters, or the name of the site on the imagery.\nThe image should contain a single icon, without variations, color palettes or different versions.\n\nUser request:${e}`,messages:t?[{role:"jetpack-ai",context:{type:"ai-assistant-generate-logo",request:e,name:U,description:V,style:t}}]:[],feature:"jetpack-ai-logo-generator",response_format:"b64_json",style:t||""};return await z(r)}catch(e){throw I(e),e}}),[U,V]),Q=(0,o.useCallback)((async e=>{D(null);try{if(g("Saving logo for site"),e.mediaId)return{mediaId:e.mediaId,mediaURL:e.url};const n={mediaId:0,mediaURL:""};t(!0);const{id:r,url:a}=await O(e.url,"site-logo.png");return n.mediaId=parseInt(r),n.mediaURL=a,n}catch(e){throw D(e),e}finally{t(!1)}}),[t,D]),X=(0,o.useCallback)((async()=>{F(null);try{if(!q||!w)throw new Error("Missing siteId or logo");g("Applying logo for site",q),n(!0);const{mediaId:e}=w;if(!e)throw new Error("Missing mediaId");await(0,p.Z)({siteId:q,imageId:String(e)})}catch(e){throw F(e),e}finally{n(!1)}}),[w,n,F,q]),ee=(0,o.useCallback)((e=>{v(e),(0,d.hm)({...e,siteId:String(q)})}),[q,v,d.hm]),te=(0,o.useCallback)((async function({prompt:e,style:t}){g("Generating logo for site"),a(!0);try{if(!$)throw new Error("Missing cost information");let n;f($);try{if(n=await Y({prompt:e,style:t}),!n||!n.data.length)throw new Error("No image returned")}catch(e){throw f(-$),e}const r=n.data[0].revised_prompt||null,a={url:"data:image/png;base64,"+n.data[0].b64_json,description:e,revisedPrompt:r};try{const t=await Q(a);ee({url:t.mediaURL,description:e,mediaId:t.mediaId,revisedPrompt:r})}catch(e){throw ee(a),e}}finally{a(!1)}}),[$,f,Q,ee,Y]);return{logos:y,selectedLogoIndex:E,selectedLogo:w,setSelectedLogoIndex:e,site:{id:q,name:U,description:V},generateFirstPrompt:J,saveLogo:Q,applyLogo:X,generateImage:Y,enhancePrompt:async function({prompt:e}){M(null),f();try{const t=await(0,u.A)();if(!t||!t.token)throw new Error("No token provided");g("Enhancing prompt",e);const n={messages:[{role:"system",content:"Enhance the prompt you receive.\nThe prompt is meant for generating a logo. Return the same prompt enhanced, and make each enhancement wrapped in brackets.\nDo not add any mention to text, letters, typography or the name of the site in the prompt.\nFor example: user's prompt: A logo for an ice cream shop. Returned prompt: A logo for an ice cream shop [that is pink] [and vibrant]."},{role:"user",content:e}],feature:"jetpack-ai-logo-generator",stream:!1},r="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query",a={Authorization:`Bearer ${t.token}`,"Content-Type":"application/json"},s=await fetch(r,{method:"POST",headers:a,body:JSON.stringify(n)}).then((e=>e.json()));return s?.choices?.[0]?.message?.content}catch(e){throw f(-1),M(e),e}},storeLogo:ee,generateLogo:te,setIsEnhancingPrompt:s,setIsRequestingImage:a,setIsSavingLogoToLibrary:t,setIsApplyingLogo:n,setContext:b,isEnhancingPrompt:x,isRequestingImage:S,isSavingLogoToLibrary:C,isApplyingLogo:A,isBusy:j,getAiAssistantFeature:N,requireUpgrade:R,context:P,tierPlansEnabled:L,isLoadingHistory:T,setIsLoadingHistory:k,imageStyles:Z,guessStyle:K}}},44461:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(47143),a=n(74423);const s=()=>{const{setFeatureFetchError:e,setFirstLogoPromptFetchError:t,setEnhancePromptFetchError:n,setLogoFetchError:s,setSaveToLibraryError:o,setLogoUpdateError:i}=(0,r.useDispatch)(a.E),{featureFetchError:l,firstLogoPromptFetchError:c,enhancePromptFetchError:u,logoFetchError:d,saveToLibraryError:p,logoUpdateError:m}=(0,r.useSelect)((e=>{const t=e(a.E);return{featureFetchError:t.getFeatureFetchError(),firstLogoPromptFetchError:t.getFirstLogoPromptFetchError(),enhancePromptFetchError:t.getEnhancePromptFetchError(),logoFetchError:t.getLogoFetchError(),saveToLibraryError:t.getSaveToLibraryError(),logoUpdateError:t.getLogoUpdateError()}}),[]);return{setFeatureFetchError:e,setFirstLogoPromptFetchError:t,setEnhancePromptFetchError:n,setLogoFetchError:s,setSaveToLibraryError:o,setLogoUpdateError:i,clearErrors:()=>{e(null),t(null),n(null),s(null),o(null),i(null)},featureFetchError:l,firstLogoPromptFetchError:c,enhancePromptFetchError:u,logoFetchError:d,saveToLibraryError:p,logoUpdateError:m}}},23101:(e,t,n)=>{"use strict";n.d(t,{K:()=>a.K,T:()=>r.T});var r=n(64537),a=n(11114)},19362:(e,t,n)=>{"use strict";n.d(t,{$t:()=>i,H:()=>o,NP:()=>l,Pv:()=>c,hm:()=>s});var r=n(13858);const a=10;function s({siteId:e,url:t,description:n,mediaId:r,revisedPrompt:s}){const o=i(e),l={url:t,description:n,mediaId:r,revisedPrompt:s};return o.push(l),localStorage.setItem(`logo-history-${e}`,JSON.stringify(o.slice(-a))),l}function o({siteId:e,url:t,newUrl:n,mediaId:r,rating:s}){const o=i(e),l=o.findIndex((e=>e.url===t));return l>-1&&(o[l].url=n,o[l].mediaId=r,o[l].rating=s),localStorage.setItem(`logo-history-${e}`,JSON.stringify(o.slice(-a))),o[l]}function i(e){const t=localStorage.getItem(`logo-history-${e}`);let n=t?JSON.parse(t):[];return Array.isArray(n)||(n=[]),n=n.slice(-a),n=n.filter((e=>"object"==typeof e&&"string"==typeof e.url&&"string"==typeof e.description)).map((e=>({url:e.url,description:e.description,mediaId:e.mediaId,rating:e.rating}))),n}function l(e){return 0===i(e).length}async function c(e){const t=i(e).filter((({mediaId:e})=>void 0!==e)).map((({mediaId:t})=>new Promise(((n,a)=>{(0,r.T)({siteId:e,mediaId:t}).then((e=>n({mediaId:t,exists:e}))).catch((e=>a(e)))}))));try{(await Promise.all(t)).filter((({exists:e})=>!e)).forEach((({mediaId:t})=>function({siteId:e,mediaId:t}){const n=i(e),r=n.findIndex((e=>e.mediaId===t));-1!==r&&(n.splice(r,1),localStorage.setItem(`logo-history-${e}`,JSON.stringify(n)))}({siteId:e,mediaId:t})))}catch{}}},13858:(e,t,n)=>{"use strict";n.d(t,{T:()=>a});var r=n(48931);async function a({mediaId:e}){const t=Number(e);if(Number.isNaN(t))return!1;try{return await(0,r.A)({path:`/wp/v2/media/${Number(e)}`,method:"GET"}),!0}catch(e){const t=e?.data?.status;if(404===t)return!1;throw e}}},28229:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(22746);async function a({siteId:e,imageId:t}){const n={site_logo:t,site_icon:t};return(0,r.A)({path:`/sites/${String(e)}/settings`,apiVersion:"v2",apiNamespace:"wp/v2",body:n,query:"source=jetpack-ai",method:"POST"})}},22746:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(48931);const a=5;let s=0;async function o(e){if(s+=1,s>a)throw s-=1,new Error("Too many requests");return(0,r.A)(e).finally((()=>{s-=1}))}},9624:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(19362),a=n(22746),s=n(9938);const o={storeAiAssistantFeature:e=>({type:s.UU,feature:e}),fetchAiAssistantFeature:()=>async({dispatch:e})=>{e({type:s.ql});try{const t=await(0,a.A)({path:"/wpcom/v2/jetpack-ai/ai-assistant-feature",query:"force=wpcom"});if(t.data)throw new Error("Failed to fetch");e(o.storeAiAssistantFeature(function(e){return{hasFeature:!!e["has-feature"],isOverLimit:!!e["is-over-limit"],requestsCount:e["requests-count"],requestsLimit:e["requests-limit"],requireUpgrade:!!e["site-require-upgrade"],errorMessage:e["error-message"],errorCode:e["error-code"],upgradeType:e["upgrade-type"],usagePeriod:{currentStart:e["usage-period"]?.["current-start"],nextStart:e["usage-period"]?.["next-start"],requestsCount:e["usage-period"]?.["requests-count"]||0},currentTier:e["current-tier"],nextTier:e["next-tier"],tierPlansEnabled:!!e["tier-plans-enabled"],costs:e.costs,featuresControl:e["features-control"]}}(t)))}catch(t){e({type:s.Rx,error:t})}},increaseAiAssistantRequestsCount:(e=1)=>({dispatch:t})=>{t({type:s.Lg,count:e})},setAiAssistantFeatureRequireUpgrade:(e=!0)=>({type:s.Kt,requireUpgrade:e}),setTierPlansEnabled:(e=!0)=>({type:s.c1,tierPlansEnabled:e}),setSiteDetails:e=>({type:s.Bz,siteDetails:e}),setSelectedLogoIndex:e=>({type:s.BG,selectedLogoIndex:e}),addLogoToHistory:e=>({type:s.sG,logo:e}),setIsSavingLogoToLibrary:e=>({type:s.E6,isSavingLogoToLibrary:e}),setIsApplyingLogo:e=>({type:s.Ep,isApplyingLogo:e}),updateSelectedLogo:(e,t)=>({type:s.r_,mediaId:e,url:t}),setIsRequestingImage:e=>({type:s.vk,isRequestingImage:e}),setIsEnhancingPrompt:e=>({type:s.O5,isEnhancingPrompt:e}),loadLogoHistory(e){const t=(0,r.$t)(e);return{type:s.ZI,history:t}},setFeatureFetchError:e=>({type:s.Rx,error:e}),setFirstLogoPromptFetchError:e=>({type:s.MQ,error:e}),setEnhancePromptFetchError:e=>({type:s.gG,error:e}),setLogoFetchError:e=>({type:s.q_,error:e}),setSaveToLibraryError:e=>({type:s.x0,error:e}),setLogoUpdateError:e=>({type:s.FN,error:e}),setContext:e=>({type:s.kZ,context:e}),setIsLoadingHistory:e=>({type:s.hY,isLoadingHistory:e})},i=o},9938:(e,t,n)=>{"use strict";n.d(t,{BG:()=>m,Bz:()=>l,E6:()=>g,Ep:()=>f,FN:()=>j,GB:()=>c,Kt:()=>o,Lg:()=>s,MQ:()=>_,O5:()=>k,Rx:()=>w,UU:()=>r,ZI:()=>y,c1:()=>i,gG:()=>C,hY:()=>E,kZ:()=>p,mx:()=>d,nb:()=>u,q_:()=>A,ql:()=>a,r_:()=>v,sG:()=>h,vk:()=>b,x0:()=>x});const r="STORE_AI_ASSISTANT_FEATURE",a="REQUEST_AI_ASSISTANT_FEATURE",s="INCREASE_AI_ASSISTANT_REQUESTS_COUNT",o="SET_AI_ASSISTANT_FEATURE_REQUIRE_UPGRADE",i="SET_TIER_PLANS_ENABLED",l="SET_SITE_DETAILS",c=20,u=3e3,d=3,p="SET_CONTEXT",m="SET_SELECTED_LOGO_INDEX",h="ADD_LOGO_TO_HISTORY",g="SET_IS_SAVING_LOGO_TO_LIBRARY",f="SET_IS_APPLYING_LOGO",v="SAVE_SELECTED_LOGO",b="SET_IS_REQUESTING_IMAGE",k="SET_IS_ENHANCING_PROMPT",y="SET_SITE_HISTORY",E="SET_IS_LOADING_HISTORY",w="SET_FEATURE_FETCH_ERROR",_="SET_FIRST_LOGO_PROMPT_FETCH_ERROR",C="SET_ENHANCE_PROMPT_FETCH_ERROR",A="SET_LOGO_FETCH_ERROR",x="SET_SAVE_TO_LIBRARY_ERROR",j="SET_LOGO_UPDATE_ERROR"},74423:(e,t,n)=>{"use strict";n.d(t,{E:()=>i});var r=n(47143),a=n(9624),s=n(23695),o=n(80037);const i="jetpack-ai/logo-generator",l=(0,r.createReduxStore)(i,{__experimentalUseThunks:!0,actions:a.A,reducer:s.A,selectors:o.A});(0,r.register)(l)},94891:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(9938);const a={siteDetails:{},features:{aiAssistantFeature:{hasFeature:!0,isOverLimit:!1,requestsCount:0,requestsLimit:r.GB,requireUpgrade:!1,errorMessage:"",errorCode:"",upgradeType:"default",currentTier:{slug:"ai-assistant-tier-free",value:0,limit:20},usagePeriod:{currentStart:"",nextStart:"",requestsCount:0},nextTier:null,tierPlansEnabled:!1,_meta:{isRequesting:!1,asyncRequestCountdown:r.mx,asyncRequestTimerId:0,isRequestingImage:!1},featuresControl:{"logo-generator":{enabled:!1,styles:[]}}}},history:[],selectedLogoIndex:0}},23695:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(61356),a=n(9938),s=n(94891);function o(e=s.A,t){switch(t.type){case a.ql:return{...e,_meta:{...e._meta??{},featureFetchError:null},features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!0,asyncRequestCountdown:a.mx,asyncRequestTimerId:0}}}};case a.UU:{const n={"jetpack-ai-logo-generator":{logo:r._S}};return{...e,features:{...e.features,aiAssistantFeature:{costs:n,...t.feature,requireUpgrade:t.feature?.requireUpgrade||0===t.feature?.currentTier?.value,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!1}}}}}case a.Lg:{const n=e?.features?.aiAssistantFeature?.usagePeriod||{requestsCount:0},r=(e?.features?.aiAssistantFeature?.requestsCount||0)+(t.count??1);n.requestsCount+=t.count??1;const s=e?.features?.aiAssistantFeature?.currentTier?.value,o=void 0===s&&!e?.features?.aiAssistantFeature?.hasFeature||0===s,i=void 0===s&&e?.features?.aiAssistantFeature?.hasFeature||1===s;let l=e?.features?.aiAssistantFeature?.currentTier?.limit||a.GB;i?l=a.nb:o&&(l=e?.features?.aiAssistantFeature?.requestsLimit);const c=(i||o?r:e?.features?.aiAssistantFeature?.usagePeriod?.requestsCount||0)>=l,u=o||c&&null!==e?.features?.aiAssistantFeature?.nextTier;return{...e,features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,isOverLimit:c,requestsCount:r,requireUpgrade:u,usagePeriod:{...n}}}}}case a.Kt:return{...e,features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,requireUpgrade:t.requireUpgrade,...t.requireUpgrade?{isOverLimit:!0}:{}}}};case a.c1:return{...e,features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,tierPlansEnabled:t.tierPlansEnabled}}};case a.Bz:return{...e,siteDetails:t.siteDetails};case a.BG:return{...e,selectedLogoIndex:t.selectedLogoIndex};case a.sG:{const n=[...e.history,t.logo];return{...e,history:n,selectedLogoIndex:n.length-1}}case a.E6:return{...e,_meta:{...e._meta??{},isSavingLogoToLibrary:t.isSavingLogoToLibrary}};case a.Ep:return{...e,_meta:{...e._meta??{},isApplyingLogo:t.isApplyingLogo}};case a.r_:{const n=e.history?.[e.selectedLogoIndex];return{...e,history:[...e.history.slice(0,e.selectedLogoIndex),{...n,mediaId:t.mediaId,url:t.url},...e.history.slice(e.selectedLogoIndex+1)]}}case a.vk:return{...e,_meta:{...e._meta??{},isRequestingImage:t.isRequestingImage}};case a.O5:return{...e,_meta:{...e._meta??{},isEnhancingPrompt:t.isEnhancingPrompt}};case a.ZI:return{...e,history:t.history,selectedLogoIndex:t.history?.length?t.history.length-1:0};case a.Rx:return{...e,features:{...e.features,aiAssistantFeature:{...e?.features?.aiAssistantFeature,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!1}}},_meta:{...e._meta??{},featureFetchError:t.error}};case a.MQ:return{...e,_meta:{...e._meta??{},firstLogoPromptFetchError:t.error}};case a.gG:return{...e,_meta:{...e._meta??{},enhancePromptFetchError:t.error}};case a.q_:return{...e,_meta:{...e._meta??{},logoFetchError:t.error}};case a.x0:return{...e,_meta:{...e._meta??{},saveToLibraryError:t.error}};case a.FN:return{...e,_meta:{...e._meta??{},logoUpdateError:t.error}};case a.kZ:return{...e,_meta:{...e._meta??{},context:t.context}};case a.hY:return{...e,_meta:{...e._meta??{},isLoadingHistory:t.isLoadingHistory}}}return e}},80037:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(61356);const a={getAiAssistantFeature(e){const t={...e.features.aiAssistantFeature};return delete t._meta,t},getSiteDetails:e=>e.siteDetails,getIsRequestingAiAssistantFeature:e=>e.features.aiAssistantFeature?._meta?.isRequesting??!1,getLogos:e=>e.history??[],getSelectedLogoIndex:e=>e.selectedLogoIndex??null,getSelectedLogo:e=>e.history?.[e.selectedLogoIndex]??null,getIsSavingLogoToLibrary:e=>e._meta?.isSavingLogoToLibrary??!1,getIsApplyingLogo:e=>e._meta?.isApplyingLogo??!1,getIsEnhancingPrompt:e=>e._meta?.isEnhancingPrompt??!1,getIsRequestingImage:e=>e._meta?.isRequestingImage??!1,getIsBusy:e=>a.getIsApplyingLogo(e)||a.getIsSavingLogoToLibrary(e)||a.getIsRequestingImage(e)||a.getIsEnhancingPrompt(e),getRequireUpgrade(e){const t=e.features.aiAssistantFeature;if(!t?.tierPlansEnabled)return t?.requireUpgrade;const n=t?.costs?.["jetpack-ai-logo-generator"]?.logo??r._S,a=t?.currentTier?.value||0,s=t?.usagePeriod?.requestsCount||0,o=1===a,i=!t?.nextTier;return e.features.aiAssistantFeature?.requireUpgrade||!o&&!i&&a-se._meta?.featureFetchError??null,getFirstLogoPromptFetchError:e=>e._meta?.firstLogoPromptFetchError??null,getEnhancePromptFetchError:e=>e._meta?.enhancePromptFetchError??null,getLogoFetchError:e=>e._meta?.logoFetchError??null,getSaveToLibraryError:e=>e._meta?.saveToLibraryError??null,getLogoUpdateError:e=>e._meta?.logoUpdateError??null,getContext:e=>e._meta?.context??"",getTierPlansEnabled:e=>e.features.aiAssistantFeature?.tierPlansEnabled??!1,getIsLoadingHistory:e=>e._meta?.isLoadingHistory??!1},s=a},53664:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(7675),a=n(10067),s=n.n(a),o=n(46219),i=n(51391),l=n(78836);const c=s()("jetpack-ai-client:suggestions-event-source");class u extends EventTarget{constructor(e){super(),this.fullMessage="",this.fullFunctionCall={name:"",arguments:""},this.isPromptClear=!1,this.controller=new AbortController,this.initEventSource(e)}async initEventSource({url:e,question:t,token:n,options:a={}}){if(!n)try{c("Token was not provided, requesting one..."),n=(await(0,i.A)()).token}catch(e){return void this.processErrorEvent(e)}const s={};if(Number.isInteger(parseInt(a.postId))&&(s.post_id=+a.postId),!e){const t=new URL("https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query");a?.fromCache&&t.searchParams.append("stream_cache","true"),e=t.toString(),c("URL not provided, using default: %o",e)}Array.isArray(t)?s.messages=t:s.question=t,a?.feature?.length&&(c("Feature: %o",a.feature),s.feature=a.feature),a?.functions?.length&&(c("Functions: %o",a.functions),s.functions=a.functions),a?.model?.length&&(c("Model: %o",a.model),s.model=a.model),this.errorUnclearPromptTriggered=!1,await(0,r.y)(e,{openWhenHidden:!0,method:"POST",headers:{"Content-type":"application/json",Authorization:"Bearer "+n},body:JSON.stringify(s),onclose:()=>{c("Stream closed")},onerror:e=>{throw this.processErrorEvent(e),e},onmessage:e=>{this.processEvent(e)},onopen:async e=>{if(e.ok)return;let t;throw e.status>=400&&e.status<=500&&![413,422,429].includes(e.status)&&(c("Connection error: %o",e),t=l.mA,this.dispatchEvent(new CustomEvent(l.mA,{detail:e}))),503===e.status&&(t=l.AZ,this.dispatchEvent(new CustomEvent(l.AZ))),413===e.status&&(t=l.cT,this.dispatchEvent(new CustomEvent(l.cT))),422===e.status&&(t=l.ud,this.dispatchEvent(new CustomEvent(l.ud))),429===e.status&&(t=l.Or,this.dispatchEvent(new CustomEvent(l.Or))),this.dispatchEvent(new CustomEvent(l.zn,{detail:(0,o.fC)(t)})),new Error},signal:this.controller.signal})}checkForUnclearPrompt(){if(this.isPromptClear)return;const e=this.fullMessage.replace(/__|(\*\*)/g,"");if(e.startsWith("JETPACK_AI_ERROR")){if(this.errorUnclearPromptTriggered)return;this.errorUnclearPromptTriggered=!0,this.dispatchEvent(new CustomEvent(l.L9)),c("Unclear error prompt dispatched"),this.dispatchEvent(new CustomEvent(l.zn,{detail:(0,o.fC)(l.L9)}))}else"JETPACK_AI_ERROR".startsWith(e)?c(this.fullMessage):this.isPromptClear=!0}close(){this.controller.abort()}processEvent(e){if("[DONE]"===e.data){if(this.errorUnclearPromptTriggered)return;if(this.fullMessage.length)return this.dispatchEvent(new CustomEvent("done",{detail:this.fullMessage})),void c("Done: %o",this.fullMessage);if(this.fullFunctionCall.name.length)return this.dispatchEvent(new CustomEvent("function_done",{detail:this.fullFunctionCall})),void c("Done: %o",this.fullFunctionCall)}let t;try{t=JSON.parse(e.data)}catch(t){return void c("Error parsing JSON",e,t)}const{delta:n}=t?.choices?.[0]??{delta:{content:null,function_call:null}},r=n.content,a=n.function_call;r&&(this.fullMessage+=r,this.checkForUnclearPrompt(),this.isPromptClear&&(this.dispatchEvent(new CustomEvent("chunk",{detail:r})),c("suggestion: %o",this.fullMessage),this.dispatchEvent(new CustomEvent("suggestion",{detail:this.fullMessage})))),a&&(null!=a.name&&(this.fullFunctionCall.name+=a.name),null!=a.arguments&&(this.fullFunctionCall.arguments+=a.arguments),this.dispatchEvent(new CustomEvent("functionCallChunk",{detail:this.fullFunctionCall})))}processErrorEvent(e){c("onerror: %o",e),this.dispatchEvent(new CustomEvent(l.mA,{detail:e})),this.dispatchEvent(new CustomEvent(l.zn,{detail:(0,o.fC)(l.mA)}))}}},78836:(e,t,n)=>{"use strict";n.d(t,{AZ:()=>a,L9:()=>c,Or:()=>s,cT:()=>i,mA:()=>l,uH:()=>r.u,ud:()=>o,zn:()=>u});var r=n(97784);const a="error_service_unavailable",s="error_quota_exceeded",o="error_moderation",i="error_context_too_large",l="error_network",c="error_unclear_prompt",u="error_response"},90372:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(10067);const a=n.n(r)()("dops:analytics");let s,o;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const i={initialize:function(e,t,n){i.setUser(e,t),i.setSuperProps(n),i.identifyUser()},setGoogleAnalyticsEnabled:function(e,t=null){this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){o={ID:e,username:t}},setSuperProps:function(e){s=e},assignSuperProps:function(e){s=Object.assign(s||{},e)},mc:{bumpStat:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);a("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),a('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);i.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);a("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),a('Built stat "%s" in group "%s"',t,e);return n}(e,t);i.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){i.tracks.recordPageView(e),i.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,r,a,s,o){i.ga.recordPurchase(e,t,n,r,a,s,o)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(s&&(a("- Super Props: %o",s),t=Object.assign(t,s)),a('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):a('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};i.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){i.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){a("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};i.ga.initialized||(o&&(e={userId:"u-"+o.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),i.ga.initialized=!0)},recordPageView:function(e,t){i.ga.initialize(),a("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,n,r){i.ga.initialize();let s="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(s+=" [Option Label: "+n+"]"),void 0!==r&&(s+=" [Option Value: "+r+"]"),a(s),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,r)},recordPurchase:function(e,t,n,r,a,s,o){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:r,currency:o}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:a,quantity:s}),window.ga("ecommerce:send")}},identifyUser:function(){o&&window._tkq.push(["identifyUser",o.ID,o.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}},l=i},42266:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(90311),a=n(19783),s=n(83883),o=n(51113),i=n(13022),l=n(51609),c=n.n(l),u=n(65486);const d=e=>{switch(e){case"error":case"warning":default:return r.A;case"info":return a.A;case"success":return s.A}},p=({level:e="warning",children:t,showIcon:n=!0,className:r})=>{const a=(0,i.A)(u.A.container,u.A[`is-${e}`],r);return c().createElement("div",{className:a},n&&c().createElement("div",{className:u.A["icon-wrapper"]},c().createElement(o.A,{icon:d(e),className:u.A.icon})),c().createElement("div",null,t))}},51112:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(96072),a=n.n(r),s=n(56427),o=n(27723),i=n(51113),l=n(53512),c=n(13022),u=n(51609),d=n.n(u),p=n(77560);const __=o.__,m=(0,u.forwardRef)(((e,t)=>{const{children:n,variant:r="primary",size:o="normal",weight:u="bold",icon:m,iconSize:h,disabled:g,isDestructive:f,isLoading:v,isExternalLink:b,className:k,text:y,fullWidth:E,...w}=e,_=(0,c.A)(p.A.button,k,{[p.A.normal]:"normal"===o,[p.A.small]:"small"===o,[p.A.icon]:Boolean(m),[p.A.loading]:v,[p.A.regular]:"regular"===u,[p.A["full-width"]]:E,[p.A["is-icon-button"]]:Boolean(m)&&!n});w.ref=t;const C="normal"===o?20:16,A=b&&d().createElement(d().Fragment,null,d().createElement(i.A,{size:C,icon:l.A,className:p.A["external-icon"]}),d().createElement(s.VisuallyHidden,{as:"span"},/* translators: accessibility text */ +__("(opens in a new tab)","jetpack"))),x=b?"_blank":void 0,j=n?.[0]&&null!==n[0]&&"components-tooltip"!==n?.[0]?.props?.className;return d().createElement(s.Button,a()({target:x,variant:r,className:(0,c.A)(_,{"has-text":!!m&&j}),icon:b?void 0:m,iconSize:h,disabled:g,"aria-disabled":g,isDestructive:f,text:y},w),v&&d().createElement(s.Spinner,null),d().createElement("span",null,n),A)}));m.displayName="Button";const h=m},69222:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(96072),a=n.n(r),s=n(29491),o=n(86087),i=n(27723),l=n(51112),c=n(78478);const __=i.__,u=({buttonStyle:e="icon",textToCopy:t,onCopy:n,...r})=>{const[i,u]=(0,o.useState)(!1),d=(0,o.useRef)(),p=(0,s.useCopyToClipboard)(t,(()=>{d.current&&clearTimeout(d.current),u(!0),n?.(),d.current=setTimeout((()=>{u(!1),d.current=void 0}),3e3)}));(0,o.useEffect)((()=>()=>{d.current&&clearTimeout(d.current)}),[]);let m=null,h=null;"text"!==e&&(m=i?React.createElement(c.Nr,null):React.createElement(c.ui,null));const g=__("Copy to clipboard","jetpack");return"icon"!==e&&(h=i?__("Copied!","jetpack"):g),React.createElement(l.A,a()({"aria-label":g,icon:m,children:h,ref:p},r))}},63406:(e,t,n)=>{"use strict";n.d(t,{I:()=>s});var r=n(47143),a=n(692);function s(){const e=(0,r.useDispatch)(a.store),t=(0,r.useSelect)((e=>e(a.store).getNotices()),[]);return{...e,createNotice:(t,n,r)=>e.createNotice(t,n,{type:"snackbar",...r}),createErrorNotice:(t,n)=>e.createErrorNotice(t,{type:"snackbar",...n}),createInfoNotice:(t,n)=>e.createInfoNotice(t,{type:"snackbar",...n}),createSuccessNotice:(t,n)=>e.createSuccessNotice(t,{type:"snackbar",...n}),createWarningNotice:(t,n)=>e.createWarningNotice(t,{type:"snackbar",...n}),getNotices:()=>t}}},11883:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(27723),a=n(13022),s=n(51609);n(4459);const __=r.__;class o extends s.Component{static defaultProps={"aria-hidden":"false",focusable:"true"};needsOffset(e,t){return["gridicons-arrow-left","gridicons-arrow-right","gridicons-calendar","gridicons-cart","gridicons-folder","gridicons-help-outline","gridicons-info","gridicons-info-outline","gridicons-posts","gridicons-star-outline","gridicons-star"].indexOf(e)>=0&&t%18==0}getSVGDescription(e){if("description"in this.props)return this.props.description;switch(e){default:return"";case"gridicons-audio":return __("Has audio.","jetpack");case"gridicons-arrow-left":return __("Arrow left","jetpack");case"gridicons-arrow-right":return __("Arrow right","jetpack");case"gridicons-calendar":return __("Is an event.","jetpack");case"gridicons-cart":return __("Is a product.","jetpack");case"chevron-down":return __("Show filters","jetpack");case"gridicons-comment":return __("Matching comment.","jetpack");case"gridicons-cross":return __("Close.","jetpack");case"gridicons-filter":return __("Toggle search filters.","jetpack");case"gridicons-folder":return __("Category","jetpack");case"gridicons-help-outline":return __("Help","jetpack");case"gridicons-info":case"gridicons-info-outline":return __("Information.","jetpack");case"gridicons-image-multiple":return __("Has multiple images.","jetpack");case"gridicons-image":return __("Has an image.","jetpack");case"gridicons-page":return __("Page","jetpack");case"gridicons-post":return __("Post","jetpack");case"gridicons-jetpack-search":case"gridicons-search":return __("Magnifying Glass","jetpack");case"gridicons-tag":return __("Tag","jetpack");case"gridicons-video":return __("Has a video.","jetpack")}}renderIcon(e){switch(e){default:return null;case"gridicons-audio":return React.createElement("g",null,React.createElement("path",{d:"M8 4v10.184C7.686 14.072 7.353 14 7 14c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V7h7v4.184c-.314-.112-.647-.184-1-.184-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V4H8z"}));case"gridicons-arrow-left":return React.createElement("g",null,React.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}));case"gridicons-arrow-right":return React.createElement("g",null,React.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"}));case"gridicons-block":return React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12c0-4.418 3.582-8 8-8 1.848 0 3.545.633 4.9 1.686L5.686 16.9C4.633 15.545 4 13.848 4 12zm8 8c-1.848 0-3.546-.633-4.9-1.686L18.314 7.1C19.367 8.455 20 10.152 20 12c0 4.418-3.582 8-8 8z"}));case"gridicons-calendar":return React.createElement("g",null,React.createElement("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.105 0-2 .896-2 2v13c0 1.104.895 2 2 2h14c1.104 0 2-.896 2-2V6c0-1.104-.896-2-2-2zm0 15H5V8h14v11z"}));case"gridicons-cart":return React.createElement("g",null,React.createElement("path",{d:"M9 20c0 1.1-.9 2-2 2s-1.99-.9-1.99-2S5.9 18 7 18s2 .9 2 2zm8-2c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm.396-5c.937 0 1.75-.65 1.952-1.566L21 5H7V4c0-1.105-.895-2-2-2H3v2h2v11c0 1.105.895 2 2 2h12c0-1.105-.895-2-2-2H7v-2h10.396z"}));case"gridicons-checkmark":return React.createElement("g",null,React.createElement("path",{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"}));case"gridicons-chevron-left":return React.createElement("g",null,React.createElement("path",{d:"M16.443 7.41L15.0399 6L9.06934 12L15.0399 18L16.443 16.59L11.8855 12L16.443 7.41Z"}));case"gridicons-chevron-right":return React.createElement("g",null,React.createElement("path",{d:"M10.2366 6L8.8335 7.41L13.391 12L8.8335 16.59L10.2366 18L16.2072 12L10.2366 6Z"}));case"gridicons-chevron-down":return React.createElement("g",null,React.createElement("path",{d:"M20 9l-8 8-8-8 1.414-1.414L12 14.172l6.586-6.586"}));case"gridicons-comment":return React.createElement("g",null,React.createElement("path",{d:"M3 6v9c0 1.105.895 2 2 2h9v5l5.325-3.804c1.05-.75 1.675-1.963 1.675-3.254V6c0-1.105-.895-2-2-2H5c-1.105 0-2 .895-2 2z"}));case"gridicons-computer":return React.createElement("g",null,React.createElement("path",{d:"M20 2H4c-1.104 0-2 .896-2 2v12c0 1.104.896 2 2 2h6v2H7v2h10v-2h-3v-2h6c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm0 14H4V4h16v12z"}));case"gridicons-cross":return React.createElement("g",null,React.createElement("path",{d:"M18.36 19.78L12 13.41l-6.36 6.37-1.42-1.42L10.59 12 4.22 5.64l1.42-1.42L12 10.59l6.36-6.36 1.41 1.41L13.41 12l6.36 6.36z"}));case"gridicons-filter":return React.createElement("g",null,React.createElement("path",{d:"M10 19h4v-2h-4v2zm-4-6h12v-2H6v2zM3 5v2h18V5H3z"}));case"gridicons-folder":return React.createElement("g",null,React.createElement("path",{d:"M18 19H6c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2h7c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2z"}));case"gridicons-help-outline":return React.createElement("g",null,React.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-1.962-2v-.528c0-.4.082-.74.246-1.017.163-.276.454-.546.87-.808.333-.21.572-.397.717-.565.146-.168.22-.36.22-.577 0-.172-.078-.308-.234-.41-.156-.1-.358-.15-.608-.15-.62 0-1.34.22-2.168.658l-.854-1.67c1.02-.58 2.084-.872 3.194-.872.913 0 1.63.202 2.15.603.52.4.78.948.78 1.64 0 .495-.116.924-.347 1.287-.23.362-.6.705-1.11 1.03-.43.278-.7.48-.807.61-.108.13-.163.282-.163.458V13h-1.885z"}));case"gridicons-image":return React.createElement("g",null,React.createElement("path",{d:"M13 9.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5-.672 1.5-1.5 1.5-1.5-.672-1.5-1.5zM22 6v12c0 1.105-.895 2-2 2H4c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h16c1.105 0 2 .895 2 2zm-2 0H4v7.444L8 9l5.895 6.55 1.587-1.85c.798-.932 2.24-.932 3.037 0L20 15.426V6z"}));case"gridicons-image-multiple":return React.createElement("g",null,React.createElement("path",{d:"M15 7.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5S17.328 9 16.5 9 15 8.328 15 7.5zM4 20h14c0 1.105-.895 2-2 2H4c-1.1 0-2-.9-2-2V8c0-1.105.895-2 2-2v14zM22 4v12c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zM8 4v6.333L11 7l4.855 5.395.656-.73c.796-.886 2.183-.886 2.977 0l.513.57V4H8z"}));case"gridicons-info":return React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}));case"gridicons-info-outline":return React.createElement("g",null,React.createElement("path",{d:"M13 9h-2V7h2v2zm0 2h-2v6h2v-6zm-1-7c-4.411 0-8 3.589-8 8s3.589 8 8 8 8-3.589 8-8-3.589-8-8-8m0-2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2z"}));case"gridicons-jetpack-search":return React.createElement("g",null,React.createElement("path",{d:"M0 9.257C0 4.15 4.151 0 9.257 0c5.105 0 9.256 4.151 9.256 9.257a9.218 9.218 0 01-2.251 6.045l.034.033h1.053L24 22.01l-1.986 1.989-6.664-6.662v-1.055l-.033-.033a9.218 9.218 0 01-6.06 2.264C4.15 18.513 0 14.362 0 9.257zm4.169 1.537h4.61V1.82l-4.61 8.973zm5.547-3.092v8.974l4.61-8.974h-4.61z"}));case"gridicons-phone":return React.createElement("g",null,React.createElement("path",{d:"M16 2H8c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h8c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-3 19h-2v-1h2v1zm3-2H8V5h8v14z"}));case"gridicons-pages":return React.createElement("g",null,React.createElement("path",{d:"M16 8H8V6h8v2zm0 2H8v2h8v-2zm4-6v12l-6 6H6c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 10V4H6v16h6v-4c0-1.105.895-2 2-2h4z"}));case"gridicons-posts":return React.createElement("g",null,React.createElement("path",{d:"M16 19H3v-2h13v2zm5-10H3v2h18V9zM3 5v2h11V5H3zm14 0v2h4V5h-4zm-6 8v2h10v-2H11zm-8 0v2h5v-2H3z"}));case"gridicons-search":return React.createElement("g",null,React.createElement("path",{d:"M21 19l-5.154-5.154C16.574 12.742 17 11.42 17 10c0-3.866-3.134-7-7-7s-7 3.134-7 7 3.134 7 7 7c1.42 0 2.742-.426 3.846-1.154L19 21l2-2zM5 10c0-2.757 2.243-5 5-5s5 2.243 5 5-2.243 5-5 5-5-2.243-5-5z"}));case"gridicons-star-outline":return React.createElement("g",null,React.createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.042 3.374.14-2.647 2.09-.784.62.27.963.91 3.25-2.813-1.872-.83-.553-.83.552-2.814 1.87.91-3.248.27-.962-.783-.62-2.648-2.092 3.374-.14.996-.04.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.89 18.18 21l-2.002-7.14L22 9.256l-7.418-.305L12 2z"}));case"gridicons-star":return React.createElement("g",null,React.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"}));case"gridicons-tag":return React.createElement("g",null,React.createElement("path",{d:"M20 2.007h-7.087c-.53 0-1.04.21-1.414.586L2.592 11.5c-.78.78-.78 2.046 0 2.827l7.086 7.086c.78.78 2.046.78 2.827 0l8.906-8.906c.376-.374.587-.883.587-1.413V4.007c0-1.105-.895-2-2-2zM17.007 9c-1.105 0-2-.895-2-2s.895-2 2-2 2 .895 2 2-.895 2-2 2z"}));case"gridicons-video":return React.createElement("g",null,React.createElement("path",{d:"M20 4v2h-2V4H6v2H4V4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2v-2h2v2h12v-2h2v2c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zM6 16H4v-3h2v3zm0-5H4V8h2v3zm4 4V9l4.5 3-4.5 3zm10 1h-2v-3h2v3zm0-5h-2V8h2v3z"}));case"gridicons-lock":return React.createElement(React.Fragment,null,React.createElement("g",{id:"lock"},React.createElement("path",{d:"M18,8h-1V7c0-2.757-2.243-5-5-5S7,4.243,7,7v1H6c-1.105,0-2,0.895-2,2v10c0,1.105,0.895,2,2,2h12c1.105,0,2-0.895,2-2V10 C20,8.895,19.105,8,18,8z M9,7c0-1.654,1.346-3,3-3s3,1.346,3,3v1H9V7z M13,15.723V18h-2v-2.277c-0.595-0.346-1-0.984-1-1.723 c0-1.105,0.895-2,2-2s2,0.895,2,2C14,14.738,13.595,15.376,13,15.723z"})),React.createElement("g",{id:"Layer_1"}));case"gridicons-external":return React.createElement("g",null,React.createElement("path",{d:"M19 13v6c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V7c0-1.105.895-2 2-2h6v2H5v12h12v-6h2zM13 3v2h4.586l-7.793 7.793 1.414 1.414L19 6.414V11h2V3h-8z"}))}}render(){const{size:e=24,className:t=""}=this.props,n=this.props.height||e,r=this.props.width||e,s=this.props.style||{height:n,width:r},o="gridicons-"+this.props.icon,i=(0,a.A)("gridicon",o,t,{"needs-offset":this.needsOffset(o,e)}),l=this.getSVGDescription(o);return React.createElement("svg",{className:i,focusable:this.props.focusable,height:n,onClick:this.props.onClick,style:s,viewBox:"0 0 24 24",width:r,xmlns:"http://www.w3.org/2000/svg","aria-hidden":this.props["aria-hidden"]},l?React.createElement("desc",null,l):null,this.renderIcon(o))}}const i=o},40597:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(56427),a=n(13022),s=n(51609),o=n.n(s),i=n(51112),l=n(11883);n(84813);const c=e=>({"top-end":"top left",top:"top center","top-start":"top right","bottom-end":"bottom left",bottom:"bottom center","bottom-start":"bottom right"}[e]),u=({className:e="",iconClassName:t="",placement:n="bottom-end",animate:u=!0,iconCode:d="info-outline",iconSize:p=18,offset:m=10,title:h,children:g,popoverAnchorStyle:f="icon",forceShow:v=!1,hoverShow:b=!1,wide:k=!1,inline:y=!0,shift:E=!1})=>{const[w,_]=(0,s.useState)(!1),[C,A]=(0,s.useState)(null),x=(0,s.useCallback)((()=>_(!1)),[_]),j=(0,s.useCallback)((e=>{e.preventDefault(),_(!w)}),[w,_]),S={position:c(n),placement:n,animate:u,noArrow:!1,resize:!1,flip:!1,offset:m,focusOnMount:"container",onClose:x,className:"icon-tooltip-container",inline:y,shift:E},N="wrapper"===f,R=(0,a.A)("icon-tooltip-wrapper",e),P={left:N?0:-(62-p/2)+"px"},L=N&&v,T=(0,s.useCallback)((()=>{b&&(C&&(clearTimeout(C),A(null)),_(!0))}),[b,C]),B=(0,s.useCallback)((()=>{if(b){const e=setTimeout((()=>{_(!1),A(null)}),100);A(e)}}),[b]);return o().createElement("div",{className:R,"data-testid":"icon-tooltip_wrapper",onMouseEnter:T,onMouseLeave:B},!N&&o().createElement(i.A,{variant:"link",onMouseDown:j},o().createElement(l.A,{className:t,icon:d,size:p})),o().createElement("div",{className:(0,a.A)("icon-tooltip-helper",{"is-wide":k}),style:P},(L||w)&&o().createElement(r.Popover,S,o().createElement("div",null,h&&o().createElement("div",{className:"icon-tooltip-title"},h),o().createElement("div",{className:"icon-tooltip-content"},g)))))}},78478:(e,t,n)=>{"use strict";n.d(t,{M5:()=>p,Nr:()=>u,ui:()=>d});var r=n(96072),a=n.n(r),s=n(56427),o=n(13022),i=n(84705),l=n(47842);const c=({className:e,size:t=24,viewBox:n="0 0 24 24",opacity:r=1,color:i="#2C3338",children:c})=>{const u={className:(0,o.A)(l.A.iconWrapper,e),width:t,height:t,viewBox:n,opacity:r,fill:void 0};return i&&(u.fill=i),React.createElement(s.SVG,a()({},u,{fillRule:"evenodd",clipRule:"evenodd",xmlns:"http://www.w3.org/2000/svg"}),React.createElement(s.G,{opacity:r},c))},u=({size:e,className:t=l.A["checkmark-icon"],color:n})=>React.createElement(c,{className:t,size:e,color:n},React.createElement(s.Path,{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"})),d=({size:e,className:t=l.A["clipboard-icon"],color:n})=>React.createElement(c,{className:t,size:e,color:n},React.createElement(s.Path,{d:"M5.625 5.5H15.375C15.444 5.5 15.5 5.55596 15.5 5.625V15.375C15.5 15.444 15.444 15.5 15.375 15.5H5.625C5.55596 15.5 5.5 15.444 5.5 15.375V5.625C5.5 5.55596 5.55596 5.5 5.625 5.5ZM4 5.625C4 4.72754 4.72754 4 5.625 4H15.375C16.2725 4 17 4.72754 17 5.625V10V15.375C17 16.2725 16.2725 17 15.375 17C15.375 17 6.52246 17 5.625 17C4.72754 17 4 16.2725 4 15.375V5.625ZM18.5 17.2812V8.28125H20V17.2812C20 18.7995 18.7704 20 17.2511 20H6.25V18.5H17.2511C17.9409 18.5 18.5 17.9721 18.5 17.2812Z"}));const p=({serviceName:e,className:t,iconSize:n})=>React.createElement(i.Ay,{className:(0,o.A)(l.A.socialIcon,l.A[e],t),icon:e,size:n||24})},67142:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(96072),a=n.n(r),s=n(27723),o=n(13022),i=n(51609),l=n.n(i);const __=s.__,c=({logoColor:e="#069e08",showText:t=!0,className:n,height:r=32,...s})=>{const i=t?"0 0 118 32":"0 0 32 32";return l().createElement("svg",a()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:i,className:(0,o.A)("jetpack-logo",n),"aria-labelledby":"jetpack-logo-title",height:r},s,{role:"img"}),l().createElement("title",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack")),l().createElement("path",{fill:e,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),t&&l().createElement(l().Fragment,null,l().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),l().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),l().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),l().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),l().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),l().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),l().createElement("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})))}},60442:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(29491),a=n(59053);const s=["sm","md","lg"],o=(e,t)=>{const n=Array.isArray(e)?e:[e],o=Array.isArray(t)?t:[t],[i,l,c]=s,u={sm:(0,r.useMediaQuery)(a.A[i]),md:(0,r.useMediaQuery)(a.A[l]),lg:(0,r.useMediaQuery)(a.A[c])};return n.map(((e,t)=>{const n=o[t];return n?((e,t,n)=>{const r=s.indexOf(e),a=r+1,o=t.includes("=");let i=[];return t.startsWith("<")&&(i=s.slice(0,o?a:r)),t.startsWith(">")&&(i=s.slice(o?r:a)),i?.length?i.some((e=>n[e])):n[e]})(e,n,u):u[e]}))}},11876:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(13022),a=n(51609),s=n.n(a),o=n(47876);const i=({children:e=null,width:t=null,height:n=null,className:a=""})=>s().createElement("div",{className:(0,r.A)(o.A.placeholder,a),style:{width:t,height:n}},e)},47656:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var r=n(90311),a=n(19783),s=n(83883),o=n(51113),i=n(10991),l=n(13022),c=n(51609),u=n.n(c),d=n(16024);const p=e=>{switch(e){case"error":case"warning":default:return r.A;case"info":return a.A;case"success":return s.A}},m=({level:e="info",title:t,children:n,actions:r,hideCloseButton:a=!1,onClose:s})=>{const c=(0,l.A)(d.A.container,d.A[`is-${e}`]);return u().createElement("div",{className:c},u().createElement("div",{className:d.A["icon-wrapper"]},u().createElement(o.A,{icon:p(e),className:d.A.icon})),u().createElement("div",{className:d.A["main-content"]},t&&u().createElement("div",{className:d.A.title},t),n,r&&r.length>0&&u().createElement("div",{className:d.A["action-bar"]},r.map(((e,t)=>u().createElement("div",{key:t,className:d.A.action},e))))),!a&&u().createElement("button",{"aria-label":"close",className:d.A["close-button"],onClick:s},u().createElement(o.A,{icon:i.A})))}},37975:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(51437);const a=(e,t={})=>{const n=(0,r.Y)();return new Intl.NumberFormat(n,t).format(e)}},36281:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(86221);const a=({value:e="https://jetpack.com",size:t=248,bgColor:n,fgColor:a,level:s,includeMargin:o,imageSettings:i,renderAs:l="canvas"})=>{const c={value:e,size:t,bgColor:n,fgColor:a,level:s,includeMargin:o,imageSettings:i};return"svg"===l?React.createElement(r.h,c):React.createElement(r.X,c)}},56461:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(28120),a=n.n(r),s=n(51609),o=n.n(s);n(85335);const i=({color:e="#FFFFFF",className:t="",size:n=20})=>{const r=t+" jp-components-spinner",a={width:n,height:n,fontSize:n,borderTopColor:e},s={borderTopColor:e,borderRightColor:e};return o().createElement("div",{className:r},o().createElement("div",{className:"jp-components-spinner__outer",style:a},o().createElement("div",{className:"jp-components-spinner__inner",style:s})))};i.propTypes={color:a().string,className:a().string,size:a().number};const l=i},10110:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r,Z:()=>a});const r={"headline-medium":"h1","headline-small":"h2","headline-small-regular":"h2","title-medium":"h3","title-medium-semi-bold":"h3","title-small":"h4",body:"p","body-small":"p","body-extra-small":"p","body-extra-small-bold":"p",label:"p"},a=["mt","mr","mb","ml","mx","my","m","pt","pr","pb","pl","px","py","p"]},47425:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>d});var r=n(96072),a=n.n(r),s=n(13022),o=n(51609),i=n.n(o),l=n(10110),c=n(22073);const u=(0,o.forwardRef)((({variant:e="body",children:t,component:n,className:r,...u},d)=>{const p=n||l.Q[e]||"span",m=(0,o.useMemo)((()=>l.Z.reduce(((e,t)=>(void 0!==u[t]&&(e+=c.A[`${t}-${u[t]}`]+" ",delete u[t]),e)),"")),[u]);return i().createElement(p,a()({className:(0,s.A)(c.A.reset,c.A[e],r,m)},u,{ref:d}),t)}));u.displayName="Text";const d=u},50723:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>p});var r=n(51609),a=n.n(r),s=n(25196);const o={"--font-headline-medium":"48px","--font-headline-small":"36px","--font-title-medium":"24px","--font-title-small":"20px","--font-body":"16px","--font-body-small":"14px","--font-body-extra-small":"12px","--font-title-large":"var(--font-headline-small)","--font-label":"var(--font-body-extra-small)"},i={"--jp-black":"#000000","--jp-black-80":"#2c3338","--jp-white":"#ffffff","--jp-white-off":"#f9f9f6","--jp-gray":"#dcdcde","--jp-gray-0":"#F6F7F7","--jp-gray-5":"var(--jp-gray)","--jp-gray-10":"#C3C4C7","--jp-gray-20":"#A7AAAD","--jp-gray-40":"#787C82","--jp-gray-50":"#646970","--jp-gray-60":"#50575E","--jp-gray-70":"#3C434A","--jp-gray-80":"#2C3338","--jp-gray-90":"#1d2327","--jp-gray-off":"#e2e2df","--jp-red-0":"#F7EBEC","--jp-red-5":"#FACFD2","--jp-red-40":"#E65054","--jp-red-50":"#D63638","--jp-red-60":"#B32D2E","--jp-red-70":"#8A2424","--jp-red-80":"#691C1C","--jp-red":"#d63639","--jp-yellow-5":"#F5E6B3","--jp-yellow-10":"#F2CF75","--jp-yellow-20":"#F0C930","--jp-yellow-30":"#DEB100","--jp-yellow-40":"#C08C00","--jp-yellow-50":"#9D6E00","--jp-yellow-60":"#7D5600","--jp-blue-20":"#68B3E8","--jp-blue-40":"#1689DB","--jp-pink":"#C9356E","--jp-green-0":"#f0f2eb","--jp-green-5":"#d0e6b8","--jp-green-10":"#9dd977","--jp-green-20":"#64ca43","--jp-green-30":"#2fb41f","--jp-green-40":"#069e08","--jp-green-50":"#008710","--jp-green-60":"#007117","--jp-green-70":"#005b18","--jp-green-80":"#004515","--jp-green-90":"#003010","--jp-green-100":"#001c09","--jp-green":"#069e08","--jp-green-primary":"var( --jp-green-40 )","--jp-green-secondary":"var( --jp-green-30 )"},l={"--jp-border-radius":"4px","--jp-menu-border-height":"1px","--jp-underline-thickness":"2px"},c={"--spacing-base":"8px"},u={},d=(e,t,n)=>{const r={...o,...i,...l,...c};for(const t in r)e.style.setProperty(t,r[t]);n&&e.classList.add(s.A.global),t&&(u[t]={provided:!0,root:e})},p=({children:e=null,targetDom:t,id:n,withGlobalStyles:s=!0})=>{const o=(0,r.useRef)(),i=u?.[n]?.provided;return(0,r.useLayoutEffect)((()=>{if(!i)return t?d(t,n,s):void(o?.current&&d(o.current,n,s))}),[t,o,i,n,s]),t?a().createElement(a().Fragment,null,e):a().createElement("div",{ref:o},e)}},51437:(e,t,n)=>{"use strict";n.d(t,{Y:()=>a});var r=n(38443);const a=()=>{const{l10n:{locale:e}}=(0,r.getSettings)();if(e)return(e=>{const t=e.match(/^([a-z]{2,3})(_[a-z]{2}|_[a-z][a-z0-9]{4,7})?(?:_.*)?$/i);return t?`${t[1]}${t[2]?t[2]:""}`.replace("_","-"):"en-US"})(e);return window?.window?.navigator?.language??"en-US"}},3924:(e,t,n)=>{"use strict";function r(e,t={}){const n={};let r;if("undefined"!=typeof window&&(r=window?.JP_CONNECTION_INITIAL_STATE?.calypsoEnv),0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,n.url=encodeURIComponent(e)}else n.source=encodeURIComponent(e);for(const e in t)n[e]=encodeURIComponent(t[e]);!Object.keys(n).includes("site")&&"undefined"!=typeof jetpack_redirects&&Object.hasOwn(jetpack_redirects,"currentSiteRawUrl")&&(n.site=jetpack_redirects.currentBlogID??jetpack_redirects.currentSiteRawUrl),r&&(n.calypso_env=r);return"https://jetpack.com/redirect/?"+Object.keys(n).map((e=>e+"="+n[e])).join("&")}n.d(t,{A:()=>r})},7162:(e,t,n)=>{"use strict";n.d(t,{GlobalModals:()=>m.m,PostPublishPanels:()=>i.A,PublicizePanel:()=>o.A,SocialImageGeneratorPanel:()=>s.A,SocialPreviewsModal:()=>r.A,SocialPreviewsPanel:()=>a.A,getSocialScriptData:()=>u.getSocialScriptData,usePostCanUseSig:()=>p.e,usePublicizeConfig:()=>c.A,useSocialMediaConnections:()=>l.A,useSyncPostDataToStore:()=>d.F});n(31963),n(10267),n(70925);var r=n(81115),a=n(97192),s=n(29341),o=(n(12226),n(98725),n(29761),n(66561)),i=(n(25300),n(26029)),l=(n(26637),n(7610),n(50001)),c=(n(39553),n(77627)),u=(n(31873),n(70407));n.o(u,"GlobalModals")&&n.d(t,{GlobalModals:function(){return u.GlobalModals}}),n.o(u,"usePostCanUseSig")&&n.d(t,{usePostCanUseSig:function(){return u.usePostCanUseSig}}),n.o(u,"useSyncPostDataToStore")&&n.d(t,{useSyncPostDataToStore:function(){return u.useSyncPostDataToStore}});n(1101);var d=n(75168),p=(n(49036),n(383),n(38656)),m=(n(49192),n(48222),n(51371),n(50646),n(47453))},12141:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(78478),a=n(86087),s=n(13022),o=n(28120),i=n.n(o);const l=e=>{const{checked:t,serviceName:n,label:o,onClick:i,profilePicture:l}=e,[c,u]=(0,a.useState)(!!l),d=(0,a.useCallback)((()=>u(!1)),[]),p=(0,a.useCallback)((e=>{13===e.keyCode&&i()}),[i]);return React.createElement("div",{onClick:i,onKeyDown:p,role:"switch","aria-checked":t,tabIndex:"0",className:(0,s.A)("components-connection-icon",{"components-connection-icon__picture":c})},c&&React.createElement("img",{src:l,alt:o,onError:d}),React.createElement(r.M5,{alt:o,serviceName:"instagram-business"===n?"instagram":"twitter"===n?"x":n,className:"jetpack-publicize-gutenberg-social-icon"}))};l.propTypes={serviceName:i().string,label:i().string,profilePicture:i().string};const c=l},55488:(e,t,n)=>{"use strict";n(56427),n(27723),n(51609),n(12141),n(27817),n(86158),n(43119),n(52683),n(85605)},27817:(e,t,n)=>{"use strict";n.d(t,{s:()=>l});var r=n(56427),a=n(47143),s=n(27723),o=n(31963),i=n(85605);const __=s.__;function l({connection:e}){const t=(0,a.useSelect)((t=>t(o.M_).getUpdatingConnections().includes(e.connection_id)),[e.connection_id]);return React.createElement("div",{className:i.A["connection-name"]},e.profile_link?React.createElement(r.ExternalLink,{className:i.A["profile-link"],href:e.profile_link},e.display_name||e.external_display||e.external_name):React.createElement("span",{className:i.A["profile-link"]},e.display_name||e.external_name),t?React.createElement(r.Spinner,{color:"black","aria-label":__("Updating account","jetpack")}):null)}},86158:(e,t,n)=>{"use strict";n.d(t,{v:()=>c});var r=n(3924),a=n(56427),s=n(86087),o=n(27723),i=n(43119),l=n(76046);const __=o.__;function c({connection:e,service:t}){return"broken"!==e.status?null:React.createElement("div",null,React.createElement("span",{className:"description"},t?__("There is an issue with this connection.","jetpack"):(0,s.createInterpolateElement)((0,o.sprintf)("%1$s %2$s",__("This platform is no longer supported.","jetpack"),__("You can use our Manual Sharing feature instead.","jetpack")),{link:React.createElement(a.ExternalLink,{href:(0,r.A)("jetpack-social-manual-sharing-help")})}))," ",t?React.createElement(l.C,{connection:e,service:t}):React.createElement(i.V,{connection:e,variant:"link",isDestructive:!1}))}},43119:(e,t,n)=>{"use strict";n.d(t,{V:()=>u});var r=n(51112),a=n(56427),s=n(47143),o=n(86087),i=n(27723),l=n(31963),c=n(85605);const __=i.__,_x=i._x;function u({connection:e,variant:t="secondary",isDestructive:n=!0,buttonClassName:u}){const[d,p]=(0,o.useReducer)((e=>!e),!1),{deleteConnectionById:m}=(0,s.useDispatch)(l.M_),{isDisconnecting:h}=(0,s.useSelect)((t=>{const{getDeletingConnections:n}=t(l.M_);return{isDisconnecting:n().includes(e.connection_id)}}),[e.connection_id]),g=(0,o.useCallback)((async()=>{p(),await m({connectionId:e.connection_id})}),[e.connection_id,m]);return e.can_disconnect?React.createElement(React.Fragment,null,React.createElement(a.__experimentalConfirmDialog,{className:c.A.confirmDialog,isOpen:d,onConfirm:g,onCancel:p,cancelButtonText:__("Cancel","jetpack"),confirmButtonText:__("Yes","jetpack")},(0,o.createInterpolateElement)((0,i.sprintf)( // translators: %s: The name of the connection the user is disconnecting. -__("Are you sure you want to disconnect %s?","jetpack"),e.display_name),{strong:React.createElement("strong",null)})),React.createElement(a.A,{size:"small",onClick:p,disabled:h,variant:t,isDestructive:n,className:u},h?__("Disconnecting…","jetpack"):_x("Disconnect","Disconnect a social media account","jetpack"))):null}},26637:(e,t,n)=>{"use strict";n(56427),n(47143),n(86087),n(27723),n(50001),n(31963),n(48222),n(48712),n(55488),n(85605)},52683:(e,t,n)=>{"use strict";n.d(t,{j:()=>l});var a=n(56427),r=n(47143),s=n(86087),o=n(27723),i=n(31963);const __=o.__;function l({connection:e}){const{updateConnectionById:t}=(0,r.useDispatch)(i.M_),{isUpdating:n}=(0,r.useSelect)((t=>{const{getUpdatingConnections:n}=t(i.M_);return{isUpdating:n().includes(e.connection_id)}}),[e.connection_id]),o=(0,s.useCallback)((n=>{t(e.connection_id,{shared:n})}),[e.connection_id,t]);return React.createElement(a.CheckboxControl,{checked:e.shared??!1,onChange:o,disabled:n||"broken"===e.status,label:__("Mark the connection as shared","jetpack"),__nextHasNoMarginBottom:!0})}},76046:(e,t,n)=>{"use strict";n.d(t,{C:()=>c});var a=n(51112),r=n(47143),s=n(86087),o=n(27723),i=n(31963),l=n(70745);const __=o.__,_x=o._x;function c({connection:e,service:t,variant:n="link"}){const{deleteConnectionById:o,setKeyringResult:c,openConnectionsModal:u,setReconnectingAccount:d}=(0,r.useDispatch)(i.M_),{isDisconnecting:p}=(0,r.useSelect)((t=>{const{getDeletingConnections:n}=t(i.M_);return{isDisconnecting:n().includes(e.connection_id)}}),[e.connection_id]),m=(0,s.useCallback)((e=>{c(e),e?.ID&&u()}),[u,c]),h=(0,l.P)({service:t,onConfirm:m}),g=(0,s.useCallback)((async()=>{if(!await o({connectionId:e.connection_id,showSuccessNotice:!1}))return;await d(e);const n=new FormData;"mastodon"===t.ID&&n.set("instance",e.external_display),"bluesky"===t.ID?u():h(n)}),[e,o,u,h,t.ID,d]);return e.can_disconnect?React.createElement(a.A,{size:"small",onClick:g,disabled:p,variant:n},p?__("Disconnecting…","jetpack"):_x("Reconnect","Reconnect a social media account","jetpack")):null}},91910:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(13022),r=n(28120),s=n.n(r),o=n(12141);const i=e=>{const{checked:t,disabled:n,onChange:r,serviceName:s,label:i,profilePicture:l}=e,c=(0,a.A)("components-connection-toggle",{"is-not-checked":!t,"is-disabled":n});return React.createElement("div",{className:c,title:i},React.createElement(o.A,{checked:t,label:i,onClick:r,serviceName:s,profilePicture:l}))};i.propTypes={className:s().string,checked:s().bool,id:s().string.isRequired,disabled:s().bool,onChange:s().func,serviceName:s().string,label:s().string,profilePicture:s().string};const l=i},10267:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var a=n(85985),r=n(56427),s=n(47143),o=n(86087),i=n(27723),l=n(31963),c=n(91910),u=n(95051),d=n(49514);const __=i.__;class p extends o.Component{maybeDisplayLinkedInNotice=()=>this.connectionNeedsReauth()&&React.createElement(r.Notice,{className:u.A["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(r.ExternalLink,{href:`https://wordpress.com/marketing/connections/${(0,a.GE)()}`},__("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:n,name:a,profilePicture:r}=this.props,s="connection-"+a+"-"+t,o=a.replace("_","-"),i=React.createElement(c.A,{id:s,className:d.A["connection-toggle"],checked:e,onChange:this.onConnectionChange,disabled:this.isDisabled(),serviceName:o,label:n,profilePicture:r});return React.createElement("li",null,this.maybeDisplayLinkedInNotice(),React.createElement("div",{className:d.A["connection-container"]},i))}}const m=(0,s.withSelect)((e=>({failedConnections:e(l.Af).getFailedConnections(),mustReauthConnections:e(l.Af).getMustReauthConnections()})))(p)},77125:(e,t,n)=>{"use strict";n.d(t,{l:()=>f});var a=n(51112),r=n(56427),s=n(47143),o=n(86087),i=n(27723),l=n(77627),c=n(50001),u=n(31963),d=n(50384),p=n(51371),m=n(51475),h=n(9515),g=n(71016);const __=i.__,_x=i._x,f=()=>{const{connections:e}=(0,c.A)(),t=e.filter((e=>"broken"===e.status||(0,d.Y)(e,"broken"))),{connectionsPageUrl:n}=(0,l.A)(),{useAdminUiV1:i}=(0,p.n)().feature_flags,{openConnectionsModal:f}=(0,s.useDispatch)(u.M_),v=i?React.createElement(a.A,{variant:"link",onClick:f,className:g.A["broken-connection-btn"]}):React.createElement(r.ExternalLink,{href:n}),b=(0,h.h)();if(!t.length)return null;const k=t.reduce(((e,t)=>(e[t.service_name]||(e[t.service_name]=[]),e[t.service_name].push(t),e)),{});return t.length>0&&React.createElement(m.A,{type:"error"},__("Your following connections need to be reconnected:","jetpack"),React.createElement("ul",null,Object.entries(k).map((([e,t])=>{const n=b(e);return React.createElement("li",{key:e},React.createElement("div",{className:g.A["broken-connection-service"]},React.createElement("span",null,n,_x(":","Colon to display before the list of connections","jetpack")," "),t.map((({display_name:e,external_display:n,id:a},r)=>React.createElement(o.Fragment,{key:a},React.createElement("span",{className:g.A["broken-connection"]},e||n),rconnections management section.",'"them" refers to the broken connections.',"jetpack"),{fixLink:v}))}},64636:(e,t,n)=>{"use strict";n.d(t,{D:()=>u});var a=n(97999),r=n(56427),s=n(27723),o=n(77627),i=n(50001),l=n(25349),c=n(71016);const __=s.__,u=()=>{const{hasConnections:e}=(0,i.A)(),{needsUserConnection:t}=(0,o.A)();return t?React.createElement(r.PanelRow,null,React.createElement("p",null,__("You must connect your WordPress.com account to be able to add social media connections.","jetpack")," ",React.createElement("a",{href:(0,a.getMyJetpackUrl)("#/connection")},__("Connect now","jetpack")))):e?null:React.createElement(r.PanelRow,null,React.createElement("p",null,React.createElement("span",{className:c.A["no-connections-text"]},__("Sharing is disabled because there are no social media accounts connected.","jetpack")),React.createElement(l.C,{label:__("Connect an account","jetpack")})))}},14993:(e,t,n)=>{"use strict";n.d(t,{E:()=>g});var a=n(85985),r=n(51609),s=n(77627),o=n(50001),i=n(10267),l=n(77125),c=n(57193),u=n(75013),d=n(25349),p=n(71016),m=n(50923),h=n(39329);const g=()=>{const{recordEvent:e}=(0,a.st)(),{connections:t,toggleById:n}=(0,o.A)(),{canBeTurnedOn:g,shouldBeDisabled:f}=(0,h.j)(),{needsUserConnection:v,isPublicizeEnabled:b}=(0,s.A)(),k=(0,r.useCallback)(((t,a)=>()=>{n(t),e("jetpack_social_connection_toggled",{location:"editor",enabled:!a.enabled,service_name:a.service_name})}),[e,n]);return React.createElement("div",null,React.createElement("ul",{className:p.A["connections-list"]},t.map((e=>{const{display_name:t,id:n,service_name:a,profile_picture:r,connection_id:s}=e,o=s||n;return React.createElement(i.A,{disabled:f(e),enabled:g(e)&&e.enabled,key:o,id:o,label:t,name:a,toggleConnection:k(o,e),profilePicture:r})}))),b?React.createElement(React.Fragment,null,React.createElement(u.L,null),React.createElement(l.l,null),React.createElement(m.Z,null),React.createElement(c.H,null)):null,v?null:React.createElement(d.C,{variant:"secondary"}))}},57193:(e,t,n)=>{"use strict";n.d(t,{H:()=>c});var a=n(56427),r=n(27723),s=n(77627),o=n(50001),i=n(71016),l=n(39329);const _n=r._n;function c(){const{enabledConnections:e}=(0,o.A)(),{isPublicizeEnabled:t}=(0,s.A)(),{canBeTurnedOn:n,shouldBeDisabled:c}=(0,l.j)(),u=e.filter((e=>n(e)&&!c(e)));return u.length&&t?React.createElement(a.PanelRow,null,React.createElement("p",{className:i.A["enabled-connections-notice"]},(0,r.sprintf)(/* translators: %d: number of connections */ -_n("This post will be shared to %d connection.","This post will be shared to %d connections.",u.length,"jetpack"),u.length))):null}},9573:(e,t,n)=>{"use strict";n.d(t,{X:()=>u});var a=n(3924),r=n(85985),s=n(56427),o=n(27723),i=n(70407),l=n(71016),c=n(647);const _x=o._x,u=()=>{const e=(0,c.X)();return(0,r.Sy)()||(0,r.d9)()||(0,i.hasSocialPaidFeatures)()?null:React.createElement(s.PanelRow,{className:l.A["enhanced-features-nudge"]},React.createElement(s.Button,{key:"upgrade",variant:"link",onClick:e,href:(0,a.A)("jetpack-social-basic-plan-block-editor",{site:(0,r.GE)()||"",query:"redirect_to="+encodeURIComponent(window.location.href)})},_x("Unlock enhanced media sharing features.","Call to action to buy a new plan","jetpack")))}},70925:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var a=n(56427),r=n(86087),s=n(7162),o=n(98420),i=n(54915),l=n(80624),c=n(52367),u=n(50001),d=n(48222),p=n(96390),m=n(64636),h=n(14993),g=n(9573),f=n(41190);function v(){const{hasConnections:e,hasEnabledConnections:t,connections:n}=(0,u.A)(),{isPublicizeEnabled:v,isPublicizeDisabledBySitePlan:b}=(0,s.usePublicizeConfig)(),{attachedMedia:k}=(0,o.A)(),y=(0,i.A)(),E=k[0]?.id||y,{validationErrors:w,isConvertible:_}=(0,c.A)(n,(0,l.A)(E)[0]),C=v&&(t||k.length>0||0!==Object.keys(w).length&&!_),A=b?a.Disabled:r.Fragment,{feature_flags:x}=(0,s.getSocialScriptData)();return React.createElement(A,null,x.useAdminUiV1?React.createElement(d._,null):null,e?React.createElement(React.Fragment,null,React.createElement(a.PanelRow,null,React.createElement(h.E,null)),x.useEditorPreview&&v?React.createElement(p.n,null):null,React.createElement(g.X,null)):null,React.createElement(m.D,null),!b&&React.createElement(r.Fragment,null,C&&React.createElement(f.o,{analyticsData:{location:"editor"}})))}},62697:(e,t,n)=>{"use strict";n.d(t,{q:()=>c});var a=n(3924),r=n(97999),s=n(56427),o=n(27723),i=n(27844),l=n(51475);const __=o.__,c=()=>(0,r.siteHasFeature)(i.q.ENHANCED_PUBLISHING)?React.createElement(l.A,{type:"warning"},__("To share to Instagram, add an image/video, or enable Social Image Generator.","jetpack"),React.createElement("br",null),React.createElement(s.ExternalLink,{href:(0,a.A)("jetpack-social-share-to-instagram")},__("Learn more","jetpack"))):React.createElement(l.A,{type:"warning"},__("You need a featured image to share to Instagram.","jetpack"),React.createElement("br",null),React.createElement(s.ExternalLink,{href:(0,a.A)("jetpack-social-share-to-instagram")},__("Learn more","jetpack")))},31099:(e,t,n)=>{"use strict";n.d(t,{j:()=>p});var a=n(3924),r=n(56427),s=n(47143),o=n(86087),i=n(27723),l=n(80682),c=n(31963),u=n(51475),d=n(9515);const __=i.__,_x=i._x,p=({validationErrors:e})=>{const{getConnectionById:t}=(0,s.useSelect)((e=>e(c.M_)),[]),n=(0,d.h)(),i=(0,o.useMemo)((()=>Object.entries(e).reduce(((e,[a,r])=>{if(!r)return e;e[r]||(e[r]=[]);const s=n(t(a)?.service_name);return s&&!e[r].includes(s)&&e[r].push(s),e}),{})),[t,n,e]);return React.createElement(u.A,{type:"warning"},React.createElement("p",null,__("The selected media cannot be share to some social media platforms.","jetpack")),React.createElement("ul",null,Object.entries(i).map((([e,t])=>t.length?React.createElement("li",{key:e},React.createElement("i",null,(0,l.$m)(e)),_x(":","Colon to display before the list of social media platforms","jetpack")+" ",t.map(((e,t,{length:n})=>React.createElement(o.Fragment,{key:e},React.createElement("b",null,e),t{"use strict";n.d(t,{L:()=>d});var a=n(98420),r=n(54915),s=n(80624),o=n(52367),i=n(80682),l=n(50001),c=n(62697),u=n(31099);const d=()=>{const{connections:e}=(0,l.A)(),{attachedMedia:t}=(0,a.A)(),n=(0,r.A)(),d=t[0]?.id||n,{validationErrors:p,isConvertible:m}=(0,o.A)(e,(0,s.A)(d)[0]);return Object.keys(p).length?Object.values(p).includes(i.k3)?React.createElement(c.q,null):m?null:React.createElement(u.j,{validationErrors:p}):null}},25349:(e,t,n)=>{"use strict";n.d(t,{C:()=>u});var a=n(56427),r=n(47143),s=n(27723),o=n(77627),i=n(31963),l=n(51371),c=n(71016);const __=s.__;function u({label:e,variant:t="primary"}){const{useAdminUiV1:n}=(0,l.n)().feature_flags,{connections:s}=(0,r.useSelect)((e=>({connections:e(i.M_).getConnections()})),[]),{openConnectionsModal:u}=(0,r.useDispatch)(i.M_),{connectionsPageUrl:d}=(0,o.A)(),p=e||__("Manage connections","jetpack"),m=s.length>0;return n?React.createElement(a.Button,{onClick:u,variant:m?"link":t,size:m?"default":"small",className:c.A["settings-button"]},p):React.createElement(a.ExternalLink,{className:c.A["settings-button"],href:d},p)}},41190:(e,t,n)=>{"use strict";n.d(t,{o:()=>l});var a=n(97999),r=n(39553),s=n(27844),o=n(12015),i=n(70694);const l=({analyticsData:e=null})=>{const{message:t,updateMessage:n,maxLength:l}=(0,r.A)();return React.createElement(React.Fragment,null,React.createElement(i.A,{maxLength:l,onChange:n,message:t,analyticsData:e}),(0,a.siteHasFeature)(s.q.ENHANCED_PUBLISHING)&&React.createElement(o.A,{analyticsData:e}))}},50923:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var a=n(56427),r=n(86087),s=n(27723),o=n(7162),i=n(50001),l=n(50384),c=n(51475);const __=s.__,u=()=>{const{connections:e}=(0,i.A)(),{connectionsPageUrl:t}=(0,o.usePublicizeConfig)();return e.filter((e=>(0,l.Y)(e,"unsupported"))).length>0&&React.createElement(c.A,{type:"error"},(0,r.createInterpolateElement)(__("Twitter is not supported anymore. Learn more here.","jetpack"),{moreInfo:React.createElement(a.ExternalLink,{href:t})}))}},647:(e,t,n)=>{"use strict";n.d(t,{X:()=>o});var a=n(47143),r=n(43656),s=n(86087);function o(){const{isEditedPostDirty:e}=(0,a.useSelect)(r.store,[]),{autosave:t}=(0,a.useDispatch)(r.store);return(0,s.useCallback)((async n=>{if(!(n.target instanceof HTMLAnchorElement))return;const a=n.target.getAttribute("target");e()&&!a&&(n.preventDefault(),await t(),window.location.href=n.target.href),a&&(n.preventDefault(),window.open(n.target.href,a,"noreferrer"))}),[t,e])}},39329:(e,t,n)=>{"use strict";n.d(t,{j:()=>p});var a=n(86087),r=n(51609),s=n(7162),o=n(98420),i=n(54915),l=n(80624),c=n(52367),u=n(80682),d=n(50001);const p=()=>{const{connections:e}=(0,d.A)(),{isPublicizeEnabled:t,isPublicizeDisabledBySitePlan:n}=(0,s.usePublicizeConfig)(),{attachedMedia:p}=(0,o.A)(),m=(0,i.A)(),h=p[0]?.id||m,{validationErrors:g,isConvertible:f}=(0,c.A)(e,(0,l.A)(h)[0]),v=(0,a.useCallback)((e=>{const{id:t,is_healthy:n,connection_id:a,status:r}=e,s=a||t,o=!1!==n&&"broken"!==r,i=void 0!==g[s]&&!f,l=g[s]===u.k3;return o&&!i&&!l}),[f,g]),b=(0,a.useCallback)((e=>!t||!v(e)),[v,t]),k=(0,a.useCallback)((e=>!n&&v(e)),[v,n]);return(0,r.useMemo)((()=>({shouldBeDisabled:b,canBeTurnedOn:k})),[b,k])}},56457:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>b});var a=n(50723),r=n(1455),s=n.n(r),o=n(56427),i=n(47143),l=n(43656),c=n(27723),u=n(13022),d=n(51609),p=n.n(d),m=n(49747),h=n(60548),g=n(74820);const __=c.__,_x=c._x,f="featured-image-still-loading",v=(e,t,n,a)=>{if("none"===e||"custom"===e&&!t||"featured"===(e??"featured")&&!n)return null;const r=a("custom"===e?t:n);return r?(e=>e?.media_details?.sizes?.large?.source_url||e?.source_url)(r):f};function b({shouldDebounce:e=!0,onNewToken:t,...n}){const[r,c]=(0,d.useState)(null),[b,k]=(0,d.useState)(!0),{customText:y,imageType:E,imageId:w,template:_,setToken:C}={...(0,m.A)(),...n},{title:A,imageUrl:x}=(0,i.useSelect)((e=>{const t=e(l.store).getEditedPostAttribute("featured_media");return{title:e(l.store).getEditedPostAttribute("title"),imageUrl:v(E,w,t,e("core").getMedia)}})),j=(0,d.useMemo)((()=>y||A||" "),[y,A]),S=(0,d.useRef)(j),N=(0,d.useRef)(r);(0,d.useEffect)((()=>{N.current=r})),(0,d.useEffect)((()=>{const n=setTimeout((async()=>{if(k(!0),x===f)return;const e=await s()({path:"/jetpack/v4/social-image-generator/generate-preview-token",method:"POST",data:{text:j,image_url:x,template:_}});C?.(e),t?.(e);const n=(0,g.S)(e);n!==N.current?c(n):k(!1)}),j!==S.current&&e?1500:0);return()=>{clearTimeout(n),S.current=j}}),[j,_,x,t]);const R=(0,d.useCallback)((()=>{k(!1)}),[]);return p().createElement(a.Ay,null,p().createElement(o.BaseControl,{__nextHasNoMarginBottom:!0},p().createElement(o.BaseControl.VisualLabel,null,_x("Preview","Heading for the generated preview image","jetpack")),p().createElement("div",{className:h.A.container},p().createElement("img",{className:(0,u.A)({[h.A.hidden]:b}),src:r,alt:__("Generated preview","jetpack"),onLoad:R}),b&&p().createElement(o.Spinner,{"data-testid":"spinner"}))))}},74820:(e,t,n)=>{"use strict";n.d(t,{S:()=>r});var a=n(3924);function r(e){return e?(0,a.A)("sigenerate",{query:`t=${e}`}):""}},47453:(e,t,n)=>{"use strict";n.d(t,{m:()=>s});var a=n(51371),r=n(7757);const s=()=>{const{feature_flags:e}=(0,a.n)();return React.createElement(React.Fragment,null,e.useShareStatus?React.createElement(r.Q3,null):null)}},59493:(e,t,n)=>{"use strict";n.d(t,{O:()=>g});var a=n(63406),r=n(3924),s=n(51112),o=n(56427),i=n(47143),l=n(86087),c=n(27723),u=n(51475),d=n(31963),p=n(39630),m=n(18973);const __=c.__,_x=c._x;function h({label:e,profile_picture:t}){return React.createElement("div",{className:m.A["account-info"]},t?React.createElement("img",{className:m.A["profile-pic"],src:t,alt:e}):null,React.createElement("span",null,e))}function g({keyringResult:e,onComplete:t,isAdmin:n}){const c=(0,p.o)(),{existingConnections:g,reconnectingAccount:f}=(0,i.useSelect)((e=>{const t=e(d.M_);return{existingConnections:t.getConnections(),reconnectingAccount:t.getReconnectingAccount()}}),[]),{createErrorNotice:v}=(0,a.I)(),b=c.find((t=>t.ID===e.service)),k=(0,l.useCallback)((e=>g.some((t=>t.service_name===b?.ID&&t.external_id===e))),[g,b.ID]),y=(0,l.useMemo)((()=>{const t=[],n=[];if(!b)return{connected:t,not_connected:n};const a=[];if(b.external_users_only||a.push({label:e.external_display||e.external_name,value:e.external_ID,profile_picture:e.external_profile_picture}),b.multiple_external_user_ID_support&&e.additional_external_users?.length)for(const t of e.additional_external_users)a.push({label:t.external_name,value:t.external_ID,profile_picture:t.external_profile_picture});for(const e of a)k(e.value)?t.push(e):n.push(e);return{connected:t,not_connected:n}}),[k,e,b]),{createConnection:E,setReconnectingAccount:w}=(0,i.useDispatch)(d.M_),_=(0,l.useCallback)((async n=>{n.preventDefault(),n.stopPropagation();const a=n.target,r=new FormData(a),s=r.get("external_user_ID");if(!s)return void v(__("Please select an account to connect.","jetpack"));const o={external_user_ID:b.multiple_external_user_ID_support?s:void 0,keyring_connection_ID:e.ID,shared:"1"===r.get("shared")||void 0},i=y.not_connected.find((e=>e.value===s));f&&w(void 0),E(o,{display_name:i?.label,profile_picture:i?.profile_picture,service_name:b.ID,external_id:s}),t()}),[E,f,w,v,e.ID,t,b.multiple_external_user_ID_support,b.ID,y.not_connected]);return React.createElement("section",{className:m.A.confirmation},y.not_connected.length?React.createElement("div",null,React.createElement("p",{className:m.A["header-text"]},__("Select the account you'd like to connect. All your new blog posts will be automatically shared to this account. You'll be able to change this option in the editor sidebar when you're writing a post.","jetpack")),e?.show_linkedin_warning&&React.createElement(u.A,{type:"warning"},React.createElement("p",null,__("We could not retrieve which company pages you have access to. This is a known issue with the LinkedIn API. If you would like to connect a company page, please retry after 5 minutes.","jetpack")," ",React.createElement(o.ExternalLink,{key:"linkedin-api-documentaion",href:(0,r.A)("jetpack-linkedin-permissions-warning")},__("Learn more","jetpack")))),React.createElement("form",{className:m.A.form,onSubmit:_,id:"connection-confirmation-form"},React.createElement("div",{className:m.A["accounts-list"]},y.not_connected.map(((e,t)=>{const n=f?f.service_name===b?.ID&&f.external_id===e.value:0===t;return React.createElement("label",{key:e.value,htmlFor:`external_user_ID__${e.value}`,className:m.A["account-label"],"aria-required":!0},React.createElement("input",{type:"radio",id:`external_user_ID__${e.value}`,name:"external_user_ID",value:e.value,defaultChecked:n,className:m.A["account-input"],required:!0}),React.createElement(h,{label:e.label,profile_picture:e.profile_picture}))}))),n?React.createElement(o.BaseControl,{__nextHasNoMarginBottom:!0,id:"mark-connection-as-shared",help:`${__("If enabled, the connection will be available to all administrators, editors, and authors.","jetpack")} ${__("You can change this later.","jetpack")}`},React.createElement(o.__experimentalHStack,{justify:"flex-start",spacing:3},React.createElement("span",null,React.createElement("input",{type:"checkbox",id:"mark-connection-as-shared",name:"shared",value:"1"})),React.createElement(o.FlexBlock,{as:"label",htmlFor:"mark-connection-as-shared"},__("Mark the connection as shared","jetpack")))):null,React.createElement("input",{type:"hidden",name:"keyring_connection_ID",value:e.ID}))):React.createElement("p",{className:m.A["header-text"]},y.connected.length?_x("No more accounts/pages found.","Message shown when there are no connections found to connect","jetpack"):__("No accounts/pages found.","jetpack")),y.connected.length?React.createElement("section",null,React.createElement("h3",null,__("Already connected","jetpack")),React.createElement("ul",null,y.connected.map(((e,t)=>React.createElement("li",{key:e.label+t},React.createElement(h,{label:e.label,profile_picture:e.profile_picture})))))):null,React.createElement("div",{className:m.A["submit-wrap"]},React.createElement(s.A,{variant:"secondary",onClick:t},__("Cancel","jetpack")),y.not_connected.length?React.createElement(s.A,{form:"connection-confirmation-form",type:"submit"},__("Confirm","jetpack")):null))}},48222:(e,t,n)=>{"use strict";n.d(t,{_:()=>b});var a=n(60442),r=n(47425),s=n(3924),o=n(50723),i=n(56427),l=n(3582),c=n(47143),u=n(86087),d=n(27723),p=n(13022),m=n(31963),h=n(78362),g=n(59493),f=n(73842);const __=d.__,_x=d._x,v=()=>{const{keyringResult:e}=(0,c.useSelect)((e=>{const{getKeyringResult:t}=e(m.M_);return{keyringResult:t()}}),[]),{setKeyringResult:t,closeConnectionsModal:n,setReconnectingAccount:o}=(0,c.useDispatch)(m.M_),[d]=(0,a.A)("sm"),v=(0,u.useCallback)((()=>{t(null),o(void 0),n()}),[n,t,o]),b=Boolean(e?.ID),k=b?__("Connection confirmation","jetpack"):_x("Manage Jetpack Social connections","","jetpack"),y=(0,c.useSelect)((e=>e(l.store).canUser("update","settings")),[]);return React.createElement(i.Modal,{className:(0,p.A)(f.A.modal,{[f.A.small]:d}),onRequestClose:v,title:k},b?React.createElement(g.O,{keyringResult:e,onComplete:v,isAdmin:y}):React.createElement(React.Fragment,null,React.createElement(h.b,null),React.createElement("div",{className:f.A["manual-share"]},React.createElement("em",null,React.createElement(r.Ay,null,__("Want to share to other networks? Use our Manual Sharing feature from the editor.","jetpack")," ",React.createElement(i.ExternalLink,{href:(0,s.A)("jetpack-social-manual-sharing-help")},__("Learn more","jetpack")))))))};function b(){const e=(0,c.useSelect)((e=>e(m.M_).isConnectionsModalOpen()),[]);return React.createElement(o.Ay,{targetDom:document.body},e?React.createElement(v,null):null)}},30642:(e,t,n)=>{"use strict";n.d(t,{F:()=>d});var a=n(50723),r=n(47425),s=n(40597),o=n(56427),i=n(27723),l=n(68541),c=n(34600),u=n(27681);const __=i.__;function d(e){return React.createElement(a.Ay,null,React.createElement("div",{className:u.A.wrapper},React.createElement(o.Flex,{align:"start",justify:"start"},React.createElement(r.Ay,{variant:"body-extra-small",className:u.A.title},__("Manual sharing","jetpack")),React.createElement(s.A,{inline:!1,shift:!0,iconSize:16,placement:"top-end"},React.createElement(c.P,e))),React.createElement(l.R,{buttonStyle:"icon"})))}},34600:(e,t,n)=>{"use strict";n.d(t,{P:()=>i});var a=n(47425),r=n(3924),s=n(56427),o=n(27723);const __=o.__;function i({...e}){return React.createElement(a.Ay,e,__('Just tap the social network or "Copy to Clipboard" icon, and we\'ll format your content for sharing.',"jetpack")," ",React.createElement(s.ExternalLink,{href:(0,r.A)("jetpack-social-manual-sharing-help")},__("Learn more","jetpack")))}},55858:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var a=n(51112),r=n(50723),s=n(94715),o=n(56427),i=n(86087),l=n(27723),c=n(51113),u=n(31249),d=n(13022),p=n(52367),m=n(2204),h=n(18699),g=n(97671);const __=l.__,f=e=>t=>{t.currentTarget.focus(),e()};function v({buttonLabel:e,subTitle:t,mediaId:n=null,mediaDetails:l={},onChange:v,wrapperClassName:b,allowedMediaTypes:k=null}){const{mediaData:{width:y,height:E,sourceUrl:w}={},metaData:{mime:_,length:C=null}={},previewData:{width:A,height:x,sourceUrl:j}={}}=l,S=!(w&&y&&E&&_),N=(0,i.useCallback)((()=>v(null)),[v]),R=(0,i.useCallback)((e=>{v(e)}),[v]),P=(0,i.useCallback)((e=>{const t=(0,p.c)(_);return t&&!C?null:React.createElement("div",{className:(0,d.A)(g.A["preview-wrapper"],b)},React.createElement("button",{className:g.A.remove,onClick:N},React.createElement(o.VisuallyHidden,null,__("Remove media","jetpack")),React.createElement(c.A,{icon:u.A})),React.createElement("button",{className:g.A.preview,onClick:f(e),"data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal"},t?React.createElement(h.A,{sourceUrl:w,mime:_,duration:C}):React.createElement(o.ResponsiveWrapper,{naturalWidth:A||y,naturalHeight:x||E,isInline:!0},React.createElement("img",{src:j||w,alt:"",className:g.A["preview-image"]}))))}),[E,C,_,N,x,j,A,w,y,b]),L=(0,i.useCallback)((r=>React.createElement("div",{className:g.A.container},n?React.createElement(React.Fragment,null,React.createElement("button",{className:g.A["remove-loading"],onClick:N},React.createElement(o.VisuallyHidden,null,__("Remove media","jetpack")),React.createElement(c.A,{icon:u.A})),React.createElement(o.Spinner,{"data-testid":"spinner"})):React.createElement(React.Fragment,null,React.createElement(a.A,{variant:"secondary",size:"small",className:g.A.preview,onClick:f(r),"data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal"},e),t&&React.createElement("span",null,t)))),[e,n,N,t]),T=(0,i.useCallback)((({open:e})=>n&&!S?P(e):L(e)),[n,S,P,L]);return React.createElement(r.Ay,null,React.createElement(s.MediaUploadCheck,null,React.createElement(s.MediaUpload,{allowedTypes:k??m.UB,title:e,onSelect:R,render:T,value:n})))}},12015:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var a=n(50723),r=n(3924),s=n(85985),o=n(56427),i=n(86087),l=n(27723),c=n(51609),u=n.n(c),d=n(98420),p=n(80624),m=n(55858),h=n(35270);const __=l.__,g=__("Choose Media","jetpack");function f({disabled:e=!1,disabledNoticeMessage:t="",CustomNotice:n=null,analyticsData:l}){const{attachedMedia:f,updateAttachedMedia:v}=(0,d.A)(),{recordEvent:b}=(0,s.st)(),[k]=(0,p.A)(f[0]?.id),y=(0,i.useCallback)((e=>{if(e){b("jetpack_social_media_attached",l);const{id:t,url:n,mime:a}=e;v([{id:t,url:n,type:a}])}else v([])}),[l,b,v]),E=e?o.Disabled:c.Fragment,w=e?{className:h.A.disabled,"data-testid":"disabled"}:{};return u().createElement(a.Ay,null,u().createElement(o.BaseControl,{__nextHasNoMarginBottom:!0,className:h.A.wrapper},u().createElement(o.BaseControl.VisualLabel,null,__("Attached Media","jetpack")),n||(t?u().createElement(o.Notice,{className:h.A.notice,isDismissible:!1,status:"warning"},u().createElement("p",{"data-testid":"notice"},t)):u().createElement("p",{className:h.A.subtitle},__("Choose a visual to accompany your post.","jetpack"))),u().createElement(E,w,u().createElement(m.A,{buttonLabel:g,subTitle:__("Add an image or video","jetpack"),mediaId:f[0]?.id,mediaDetails:k,onChange:y}),u().createElement(o.ExternalLink,{href:(0,r.A)("jetpack-social-media-support-information"),className:h.A["learn-more"]},__("Learn photo and video best practices","jetpack")))))}},70694:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(85985),r=n(56427),s=n(27723),o=n(51609);const __=s.__,_n=s._n;function i({message:e="",onChange:t,disabled:n,maxLength:i,analyticsData:l=null}){const{recordEvent:c}=(0,a.st)(),u=(0,o.useRef)(!0),d=i-e.length,p=(0,o.useCallback)((e=>{t(e),u.current&&(c("jetpack_social_custom_message_changed",l),u.current=!1)}),[l,u,t,c]);return React.createElement(r.TextareaControl,{value:e,label:__("Message","jetpack"),onChange:p,disabled:n,maxLength:i,placeholder:__("Write a custom message for your social audience here. This message will override your social post content.","jetpack"),rows:4,help:(0,s.sprintf)(/* translators: placeholder is a number. */ -_n("%d character remaining","%d characters remaining",d,"jetpack"),d),__nextHasNoMarginBottom:!0})}},51475:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var a=n(56427),r=n(27723),s=n(51113),o=n(31249),i=n(13022),l=n(28120),c=n.n(l),u=n(93794);const __=r.__,d=({children:e,type:t="default",actions:n=[],onDismiss:r})=>{const l=(0,i.A)(u.A.notice,u.A[`notice--${t}`]);return React.createElement("div",{className:l},React.createElement("div",{className:u.A.content}," ",e," "),r&&React.createElement("button",{className:u.A.dismiss,onClick:r},React.createElement(a.VisuallyHidden,null,__("Dismiss notice","jetpack")),React.createElement(s.A,{icon:o.A})),n&&n.length>0&&React.createElement("div",{className:u.A.actions},n.map((e=>e))))};d.propTypes={children:c().node.isRequired,type:c().oneOf(["default","highlight","warning","error"]),actions:c().arrayOf(c().element),onDismiss:c().func};const p=d},66561:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var a=n(56427),r=n(47143),s=n(43656),o=n(86087),i=n(27723),l=n(77627),c=n(88584),u=n(49036),d=n(50001),p=n(51371),m=n(70925),h=n(30642),g=n(51353),f=n(1101),v=n(87170);const __=i.__,b=({prePublish:e,children:t})=>{const{refresh:n,hasConnections:i,hasEnabledConnections:b}=(0,d.A)(),k=(0,r.useSelect)((e=>e(s.store).isCurrentPostPublished()),[]),{feature_flags:y}=(0,p.n)(),E=(0,c.A)(),{isPublicizeEnabled:w,hidePublicizeFeature:_,togglePublicizeFeature:C}=(0,l.A)();(0,u._D)((function(){b&&n()}),[b,n]);const A=e?o.Fragment:a.PanelBody,x=e?{}:{title:__("Share this post","jetpack"),className:v.A.panel};return E(),React.createElement(A,x,t,!_&&React.createElement(o.Fragment,null,!k&&React.createElement(a.ToggleControl,{label:w?__("Share when publishing","jetpack"):__("Sharing is disabled","jetpack",0),onChange:C,checked:w&&i,disabled:!i,__nextHasNoMarginBottom:!0}),React.createElement(m.A,null),React.createElement(f.O,null)),k&&React.createElement(React.Fragment,null,y.useShareStatus?React.createElement(g.E,null):null,React.createElement(h.F,null)))}},65843:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var a=n(85985),r=n(47143),s=n(14309),o=n(43656),i=n(27723),l=n(34600),c=n(68541),u=n(5780);const __=i.__;function d(){const{isCurrentPostPublished:e}=(0,r.useSelect)((e=>e(o.store)),[]);return e()?React.createElement(s.PluginPostPublishPanel,{initialOpen:!0,title:__("Manual sharing","jetpack"),id:"publicize-manual-sharing",icon:React.createElement(a.jt,null)},React.createElement(l.P,{className:u.A.description,variant:"body-small"}),React.createElement(c.R,null)):null}},26029:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(50723),r=n(65843),s=n(39691),o=n(89640);const i=()=>React.createElement(a.Ay,{targetDom:document.body},React.createElement(o.p,null),React.createElement(r.A,null),React.createElement(s.A,null))},39691:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var a=n(3924),r=n(85985),s=n(1455),o=n.n(s),i=n(14309),l=n(86087),c=n(77627),u=n(49036),d=n(50001),p=n(25300);const m=()=>{const[e,t]=(0,l.useState)((0,r.$i)()?.social?.reviewRequestDismissed??!0),[n,s]=(0,l.useState)(!1),{hasEnabledConnections:m}=(0,d.A)(),{isPublicizeEnabled:h,isPostAlreadyShared:g}=(0,c.A)();(0,u.Wv)((()=>{s(!g&&h&&m)}),[g,m,h]);const f=(0,l.useCallback)((()=>{const e=(0,r.$i)()?.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.A,{href:(0,a.A)("jetpack-social-plugin-reviews"),onClose:f}))}},89640:(e,t,n)=>{"use strict";n.d(t,{p:()=>m});var a=n(47143),r=n(14309),s=n(43656),o=n(92214),i=n(383),l=n(57275),c=n(49036),u=n(31963),d=n(51371),p=n(79594);function m(){const{isPublicizeEnabled:e}=(0,i.h)(),{pollForPostShareStatus:t}=(0,a.useDispatch)(u.M_),{feature_flags:n}=(0,d.n)(),{isPostPublished:m}=(0,a.useSelect)((e=>({isPostPublished:e(s.store).isCurrentPostPublished()})),[]),h=(0,l.z)((0,o.P)()),g=(0,l.z)((0,a.useSelect)((e=>e(u.M_).getEnabledConnections()),[])),f=e&&g.length>0&&h,v=n.useShareStatus&&f&&m;return(0,c._D)((()=>{v&&t({isRequestComplete:({postShareStatus:e})=>e.done})}),[v]),v?React.createElement(r.PluginPostPublishPanel,{id:"publicize-share-status"},React.createElement(p.q,null)):null}},79594:(e,t,n)=>{"use strict";n.d(t,{q:()=>u});var a=n(56427),r=n(47143),s=n(27723),o=n(31963),i=n(51475),l=n(7757),c=n(55387);const __=s.__,_n=s._n;function u({reShareTimestamp:e}){const t=(0,r.useSelect)((e=>e(o.M_).getPostShareStatus()),[]),n=e?t.shares.filter((t=>t.timestamp>e)):t.shares;if(t.polling)return React.createElement("div",{className:c.A["loading-block"]},React.createElement(a.Spinner,null),React.createElement("span",{className:c.A["loading-text"]},__("Sharing to your social media…","jetpack")));const u=n.filter((e=>"failure"===e.status)).length;return u>0?React.createElement(i.A,{type:"warning"},React.createElement("p",null,(0,s.sprintf)(/* translators: %d: number of failed shares */ +__("Are you sure you want to disconnect %s?","jetpack"),e.display_name),{strong:React.createElement("strong",null)})),React.createElement(r.A,{size:"small",onClick:p,disabled:h,variant:t,isDestructive:n,className:u},h?__("Disconnecting…","jetpack"):_x("Disconnect","Disconnect a social media account","jetpack"))):null}},26637:(e,t,n)=>{"use strict";n(56427),n(47143),n(86087),n(27723),n(50001),n(31963),n(48222),n(48712),n(55488),n(85605)},52683:(e,t,n)=>{"use strict";n.d(t,{j:()=>l});var r=n(56427),a=n(47143),s=n(86087),o=n(27723),i=n(31963);const __=o.__;function l({connection:e}){const{updateConnectionById:t}=(0,a.useDispatch)(i.M_),{isUpdating:n}=(0,a.useSelect)((t=>{const{getUpdatingConnections:n}=t(i.M_);return{isUpdating:n().includes(e.connection_id)}}),[e.connection_id]),o=(0,s.useCallback)((n=>{t(e.connection_id,{shared:n})}),[e.connection_id,t]);return React.createElement(r.CheckboxControl,{checked:e.shared??!1,onChange:o,disabled:n||"broken"===e.status,label:__("Mark the connection as shared","jetpack"),__nextHasNoMarginBottom:!0})}},76046:(e,t,n)=>{"use strict";n.d(t,{C:()=>c});var r=n(51112),a=n(47143),s=n(86087),o=n(27723),i=n(31963),l=n(70745);const __=o.__,_x=o._x;function c({connection:e,service:t,variant:n="link"}){const{deleteConnectionById:o,setKeyringResult:c,openConnectionsModal:u,setReconnectingAccount:d}=(0,a.useDispatch)(i.M_),{isDisconnecting:p}=(0,a.useSelect)((t=>{const{getDeletingConnections:n}=t(i.M_);return{isDisconnecting:n().includes(e.connection_id)}}),[e.connection_id]),m=(0,s.useCallback)((e=>{c(e),e?.ID&&u()}),[u,c]),h=(0,l.P)({service:t,onConfirm:m}),g=(0,s.useCallback)((async()=>{if(!await o({connectionId:e.connection_id,showSuccessNotice:!1}))return;await d(e);const n=new FormData;"mastodon"===t.ID&&n.set("instance",e.external_display),"bluesky"===t.ID?u():h(n)}),[e,o,u,h,t.ID,d]);return e.can_disconnect?React.createElement(r.A,{size:"small",onClick:g,disabled:p,variant:n},p?__("Disconnecting…","jetpack"):_x("Reconnect","Reconnect a social media account","jetpack")):null}},91910:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(13022),a=n(28120),s=n.n(a),o=n(12141);const i=e=>{const{checked:t,disabled:n,onChange:a,serviceName:s,label:i,profilePicture:l}=e,c=(0,r.A)("components-connection-toggle",{"is-not-checked":!t,"is-disabled":n});return React.createElement("div",{className:c,title:i},React.createElement(o.A,{checked:t,label:i,onClick:a,serviceName:s,profilePicture:l}))};i.propTypes={className:s().string,checked:s().bool,id:s().string.isRequired,disabled:s().bool,onChange:s().func,serviceName:s().string,label:s().string,profilePicture:s().string};const l=i},10267:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var r=n(85985),a=n(56427),s=n(47143),o=n(86087),i=n(27723),l=n(31963),c=n(91910),u=n(95051),d=n(49514);const __=i.__;class p extends o.Component{maybeDisplayLinkedInNotice=()=>this.connectionNeedsReauth()&&React.createElement(a.Notice,{className:u.A["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(a.ExternalLink,{href:`https://wordpress.com/marketing/connections/${(0,r.GE)()}`},__("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:n,name:r,profilePicture:a}=this.props,s="connection-"+r+"-"+t,o=r.replace("_","-"),i=React.createElement(c.A,{id:s,className:d.A["connection-toggle"],checked:e,onChange:this.onConnectionChange,disabled:this.isDisabled(),serviceName:o,label:n,profilePicture:a});return React.createElement("li",null,this.maybeDisplayLinkedInNotice(),React.createElement("div",{className:d.A["connection-container"]},i))}}const m=(0,s.withSelect)((e=>({failedConnections:e(l.Af).getFailedConnections(),mustReauthConnections:e(l.Af).getMustReauthConnections()})))(p)},77125:(e,t,n)=>{"use strict";n.d(t,{l:()=>f});var r=n(51112),a=n(56427),s=n(47143),o=n(86087),i=n(27723),l=n(77627),c=n(50001),u=n(31963),d=n(50384),p=n(51371),m=n(51475),h=n(9515),g=n(71016);const __=i.__,_x=i._x,f=()=>{const{connections:e}=(0,c.A)(),t=e.filter((e=>"broken"===e.status||(0,d.Y)(e,"broken"))),{connectionsPageUrl:n}=(0,l.A)(),{useAdminUiV1:i}=(0,p.n)().feature_flags,{openConnectionsModal:f}=(0,s.useDispatch)(u.M_),v=i?React.createElement(r.A,{variant:"link",onClick:f,className:g.A["broken-connection-btn"]}):React.createElement(a.ExternalLink,{href:n}),b=(0,h.h)();if(!t.length)return null;const k=t.reduce(((e,t)=>(e[t.service_name]||(e[t.service_name]=[]),e[t.service_name].push(t),e)),{});return t.length>0&&React.createElement(m.A,{type:"error"},__("Your following connections need to be reconnected:","jetpack"),React.createElement("ul",null,Object.entries(k).map((([e,t])=>{const n=b(e);return React.createElement("li",{key:e},React.createElement("div",{className:g.A["broken-connection-service"]},React.createElement("span",null,n,_x(":","Colon to display before the list of connections","jetpack")," "),t.map((({display_name:e,external_display:n,id:r},a)=>React.createElement(o.Fragment,{key:r},React.createElement("span",{className:g.A["broken-connection"]},e||n),aconnections management section.",'"them" refers to the broken connections.',"jetpack"),{fixLink:v}))}},64636:(e,t,n)=>{"use strict";n.d(t,{D:()=>u});var r=n(97999),a=n(56427),s=n(27723),o=n(77627),i=n(50001),l=n(25349),c=n(71016);const __=s.__,u=()=>{const{hasConnections:e}=(0,i.A)(),{needsUserConnection:t}=(0,o.A)();return t?React.createElement(a.PanelRow,null,React.createElement("p",null,__("You must connect your WordPress.com account to be able to add social media connections.","jetpack")," ",React.createElement("a",{href:(0,r.getMyJetpackUrl)("#/connection")},__("Connect now","jetpack")))):e?null:React.createElement(a.PanelRow,null,React.createElement("p",null,React.createElement("span",{className:c.A["no-connections-text"]},__("Sharing is disabled because there are no social media accounts connected.","jetpack")),React.createElement(l.C,{label:__("Connect an account","jetpack")})))}},14993:(e,t,n)=>{"use strict";n.d(t,{E:()=>g});var r=n(85985),a=n(51609),s=n(77627),o=n(50001),i=n(10267),l=n(77125),c=n(57193),u=n(75013),d=n(25349),p=n(71016),m=n(50923),h=n(39329);const g=()=>{const{recordEvent:e}=(0,r.st)(),{connections:t,toggleById:n}=(0,o.A)(),{canBeTurnedOn:g,shouldBeDisabled:f}=(0,h.j)(),{needsUserConnection:v,isPublicizeEnabled:b}=(0,s.A)(),k=(0,a.useCallback)(((t,r)=>()=>{n(t),e("jetpack_social_connection_toggled",{location:"editor",enabled:!r.enabled,service_name:r.service_name})}),[e,n]);return React.createElement("div",null,React.createElement("ul",{className:p.A["connections-list"]},t.map((e=>{const{display_name:t,id:n,service_name:r,profile_picture:a,connection_id:s}=e,o=s||n;return React.createElement(i.A,{disabled:f(e),enabled:g(e)&&e.enabled,key:o,id:o,label:t,name:r,toggleConnection:k(o,e),profilePicture:a})}))),b?React.createElement(React.Fragment,null,React.createElement(u.L,null),React.createElement(l.l,null),React.createElement(m.Z,null),React.createElement(c.H,null)):null,v?null:React.createElement(d.C,{variant:"secondary"}))}},57193:(e,t,n)=>{"use strict";n.d(t,{H:()=>c});var r=n(56427),a=n(27723),s=n(77627),o=n(50001),i=n(71016),l=n(39329);const _n=a._n;function c(){const{enabledConnections:e}=(0,o.A)(),{isPublicizeEnabled:t}=(0,s.A)(),{canBeTurnedOn:n,shouldBeDisabled:c}=(0,l.j)(),u=e.filter((e=>n(e)&&!c(e)));return u.length&&t?React.createElement(r.PanelRow,null,React.createElement("p",{className:i.A["enabled-connections-notice"]},(0,a.sprintf)(/* translators: %d: number of connections */ +_n("This post will be shared to %d connection.","This post will be shared to %d connections.",u.length,"jetpack"),u.length))):null}},9573:(e,t,n)=>{"use strict";n.d(t,{X:()=>u});var r=n(3924),a=n(85985),s=n(56427),o=n(27723),i=n(70407),l=n(71016),c=n(647);const _x=o._x,u=()=>{const e=(0,c.X)();return(0,a.Sy)()||(0,a.d9)()||(0,i.hasSocialPaidFeatures)()?null:React.createElement(s.PanelRow,{className:l.A["enhanced-features-nudge"]},React.createElement(s.Button,{key:"upgrade",variant:"link",onClick:e,href:(0,r.A)("jetpack-social-basic-plan-block-editor",{site:(0,a.GE)()||"",query:"redirect_to="+encodeURIComponent(window.location.href)})},_x("Unlock enhanced media sharing features.","Call to action to buy a new plan","jetpack")))}},70925:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(56427),a=n(86087),s=n(7162),o=n(98420),i=n(54915),l=n(80624),c=n(52367),u=n(50001),d=n(48222),p=n(96390),m=n(64636),h=n(14993),g=n(9573),f=n(41190);function v(){const{hasConnections:e,hasEnabledConnections:t,connections:n}=(0,u.A)(),{isPublicizeEnabled:v,isPublicizeDisabledBySitePlan:b}=(0,s.usePublicizeConfig)(),{attachedMedia:k}=(0,o.A)(),y=(0,i.A)(),E=k[0]?.id||y,{validationErrors:w,isConvertible:_}=(0,c.A)(n,(0,l.A)(E)[0]),C=v&&(t||k.length>0||0!==Object.keys(w).length&&!_),A=b?r.Disabled:a.Fragment,{feature_flags:x}=(0,s.getSocialScriptData)();return React.createElement(A,null,x.useAdminUiV1?React.createElement(d._,null):null,e?React.createElement(React.Fragment,null,React.createElement(r.PanelRow,null,React.createElement(h.E,null)),x.useEditorPreview&&v?React.createElement(p.n,null):null,React.createElement(g.X,null)):null,React.createElement(m.D,null),!b&&React.createElement(a.Fragment,null,C&&React.createElement(f.o,{analyticsData:{location:"editor"}})))}},62697:(e,t,n)=>{"use strict";n.d(t,{q:()=>c});var r=n(3924),a=n(97999),s=n(56427),o=n(27723),i=n(27844),l=n(51475);const __=o.__,c=()=>(0,a.siteHasFeature)(i.q.ENHANCED_PUBLISHING)?React.createElement(l.A,{type:"warning"},__("To share to Instagram, add an image/video, or enable Social Image Generator.","jetpack"),React.createElement("br",null),React.createElement(s.ExternalLink,{href:(0,r.A)("jetpack-social-share-to-instagram")},__("Learn more","jetpack"))):React.createElement(l.A,{type:"warning"},__("You need a featured image to share to Instagram.","jetpack"),React.createElement("br",null),React.createElement(s.ExternalLink,{href:(0,r.A)("jetpack-social-share-to-instagram")},__("Learn more","jetpack")))},31099:(e,t,n)=>{"use strict";n.d(t,{j:()=>p});var r=n(3924),a=n(56427),s=n(47143),o=n(86087),i=n(27723),l=n(80682),c=n(31963),u=n(51475),d=n(9515);const __=i.__,_x=i._x,p=({validationErrors:e})=>{const{getConnectionById:t}=(0,s.useSelect)((e=>e(c.M_)),[]),n=(0,d.h)(),i=(0,o.useMemo)((()=>Object.entries(e).reduce(((e,[r,a])=>{if(!a)return e;e[a]||(e[a]=[]);const s=n(t(r)?.service_name);return s&&!e[a].includes(s)&&e[a].push(s),e}),{})),[t,n,e]);return React.createElement(u.A,{type:"warning"},React.createElement("p",null,__("The selected media cannot be share to some social media platforms.","jetpack")),React.createElement("ul",null,Object.entries(i).map((([e,t])=>t.length?React.createElement("li",{key:e},React.createElement("i",null,(0,l.$m)(e)),_x(":","Colon to display before the list of social media platforms","jetpack")+" ",t.map(((e,t,{length:n})=>React.createElement(o.Fragment,{key:e},React.createElement("b",null,e),t{"use strict";n.d(t,{L:()=>d});var r=n(98420),a=n(54915),s=n(80624),o=n(52367),i=n(80682),l=n(50001),c=n(62697),u=n(31099);const d=()=>{const{connections:e}=(0,l.A)(),{attachedMedia:t}=(0,r.A)(),n=(0,a.A)(),d=t[0]?.id||n,{validationErrors:p,isConvertible:m}=(0,o.A)(e,(0,s.A)(d)[0]);return Object.keys(p).length?Object.values(p).includes(i.k3)?React.createElement(c.q,null):m?null:React.createElement(u.j,{validationErrors:p}):null}},25349:(e,t,n)=>{"use strict";n.d(t,{C:()=>u});var r=n(56427),a=n(47143),s=n(27723),o=n(77627),i=n(31963),l=n(51371),c=n(71016);const __=s.__;function u({label:e,variant:t="primary"}){const{useAdminUiV1:n}=(0,l.n)().feature_flags,{connections:s}=(0,a.useSelect)((e=>({connections:e(i.M_).getConnections()})),[]),{openConnectionsModal:u}=(0,a.useDispatch)(i.M_),{connectionsPageUrl:d}=(0,o.A)(),p=e||__("Manage connections","jetpack"),m=s.length>0;return n?React.createElement(r.Button,{onClick:u,variant:m?"link":t,size:m?"default":"small",className:c.A["settings-button"]},p):React.createElement(r.ExternalLink,{className:c.A["settings-button"],href:d},p)}},41190:(e,t,n)=>{"use strict";n.d(t,{o:()=>l});var r=n(97999),a=n(39553),s=n(27844),o=n(12015),i=n(70694);const l=({analyticsData:e=null})=>{const{message:t,updateMessage:n,maxLength:l}=(0,a.A)();return React.createElement(React.Fragment,null,React.createElement(i.A,{maxLength:l,onChange:n,message:t,analyticsData:e}),(0,r.siteHasFeature)(s.q.ENHANCED_PUBLISHING)&&React.createElement(o.A,{analyticsData:e}))}},50923:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(56427),a=n(86087),s=n(27723),o=n(7162),i=n(50001),l=n(50384),c=n(51475);const __=s.__,u=()=>{const{connections:e}=(0,i.A)(),{connectionsPageUrl:t}=(0,o.usePublicizeConfig)();return e.filter((e=>(0,l.Y)(e,"unsupported"))).length>0&&React.createElement(c.A,{type:"error"},(0,a.createInterpolateElement)(__("Twitter is not supported anymore. Learn more here.","jetpack"),{moreInfo:React.createElement(r.ExternalLink,{href:t})}))}},647:(e,t,n)=>{"use strict";n.d(t,{X:()=>o});var r=n(47143),a=n(43656),s=n(86087);function o(){const{isEditedPostDirty:e}=(0,r.useSelect)(a.store,[]),{autosave:t}=(0,r.useDispatch)(a.store);return(0,s.useCallback)((async n=>{if(!(n.target instanceof HTMLAnchorElement))return;const r=n.target.getAttribute("target");e()&&!r&&(n.preventDefault(),await t(),window.location.href=n.target.href),r&&(n.preventDefault(),window.open(n.target.href,r,"noreferrer"))}),[t,e])}},39329:(e,t,n)=>{"use strict";n.d(t,{j:()=>p});var r=n(86087),a=n(51609),s=n(7162),o=n(98420),i=n(54915),l=n(80624),c=n(52367),u=n(80682),d=n(50001);const p=()=>{const{connections:e}=(0,d.A)(),{isPublicizeEnabled:t,isPublicizeDisabledBySitePlan:n}=(0,s.usePublicizeConfig)(),{attachedMedia:p}=(0,o.A)(),m=(0,i.A)(),h=p[0]?.id||m,{validationErrors:g,isConvertible:f}=(0,c.A)(e,(0,l.A)(h)[0]),v=(0,r.useCallback)((e=>{const{id:t,is_healthy:n,connection_id:r,status:a}=e,s=r||t,o=!1!==n&&"broken"!==a,i=void 0!==g[s]&&!f,l=g[s]===u.k3;return o&&!i&&!l}),[f,g]),b=(0,r.useCallback)((e=>!t||!v(e)),[v,t]),k=(0,r.useCallback)((e=>!n&&v(e)),[v,n]);return(0,a.useMemo)((()=>({shouldBeDisabled:b,canBeTurnedOn:k})),[b,k])}},56457:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>b});var r=n(50723),a=n(1455),s=n.n(a),o=n(56427),i=n(47143),l=n(43656),c=n(27723),u=n(13022),d=n(51609),p=n.n(d),m=n(49747),h=n(60548),g=n(74820);const __=c.__,_x=c._x,f="featured-image-still-loading",v=(e,t,n,r)=>{if("none"===e||"custom"===e&&!t||"featured"===(e??"featured")&&!n)return null;const a=r("custom"===e?t:n);return a?(e=>e?.media_details?.sizes?.large?.source_url||e?.source_url)(a):f};function b({shouldDebounce:e=!0,onNewToken:t,...n}){const[a,c]=(0,d.useState)(null),[b,k]=(0,d.useState)(!0),{customText:y,imageType:E,imageId:w,template:_,setToken:C}={...(0,m.A)(),...n},{title:A,imageUrl:x}=(0,i.useSelect)((e=>{const t=e(l.store).getEditedPostAttribute("featured_media");return{title:e(l.store).getEditedPostAttribute("title"),imageUrl:v(E,w,t,e("core").getMedia)}})),j=(0,d.useMemo)((()=>y||A||" "),[y,A]),S=(0,d.useRef)(j),N=(0,d.useRef)(a);(0,d.useEffect)((()=>{N.current=a})),(0,d.useEffect)((()=>{const n=setTimeout((async()=>{if(k(!0),x===f)return;const e=await s()({path:"/jetpack/v4/social-image-generator/generate-preview-token",method:"POST",data:{text:j,image_url:x,template:_}});C?.(e),t?.(e);const n=(0,g.S)(e);n!==N.current?c(n):k(!1)}),j!==S.current&&e?1500:0);return()=>{clearTimeout(n),S.current=j}}),[j,_,x,t]);const R=(0,d.useCallback)((()=>{k(!1)}),[]);return p().createElement(r.Ay,null,p().createElement(o.BaseControl,{__nextHasNoMarginBottom:!0},p().createElement(o.BaseControl.VisualLabel,null,_x("Preview","Heading for the generated preview image","jetpack")),p().createElement("div",{className:h.A.container},p().createElement("img",{className:(0,u.A)({[h.A.hidden]:b}),src:a,alt:__("Generated preview","jetpack"),onLoad:R}),b&&p().createElement(o.Spinner,{"data-testid":"spinner"}))))}},74820:(e,t,n)=>{"use strict";n.d(t,{S:()=>a});var r=n(3924);function a(e){return e?(0,r.A)("sigenerate",{query:`t=${e}`}):""}},47453:(e,t,n)=>{"use strict";n.d(t,{m:()=>s});var r=n(51371),a=n(7757);const s=()=>{const{feature_flags:e}=(0,r.n)();return React.createElement(React.Fragment,null,e.useShareStatus?React.createElement(a.Q3,null):null)}},59493:(e,t,n)=>{"use strict";n.d(t,{O:()=>g});var r=n(63406),a=n(3924),s=n(51112),o=n(56427),i=n(47143),l=n(86087),c=n(27723),u=n(51475),d=n(31963),p=n(39630),m=n(18973);const __=c.__,_x=c._x;function h({label:e,profile_picture:t}){return React.createElement("div",{className:m.A["account-info"]},t?React.createElement("img",{className:m.A["profile-pic"],src:t,alt:e}):null,React.createElement("span",null,e))}function g({keyringResult:e,onComplete:t,isAdmin:n}){const c=(0,p.o)(),{existingConnections:g,reconnectingAccount:f}=(0,i.useSelect)((e=>{const t=e(d.M_);return{existingConnections:t.getConnections(),reconnectingAccount:t.getReconnectingAccount()}}),[]),{createErrorNotice:v}=(0,r.I)(),b=c.find((t=>t.ID===e.service)),k=(0,l.useCallback)((e=>g.some((t=>t.service_name===b?.ID&&t.external_id===e))),[g,b.ID]),y=(0,l.useMemo)((()=>{const t=[],n=[];if(!b)return{connected:t,not_connected:n};const r=[];if(b.external_users_only||r.push({label:e.external_display||e.external_name,value:e.external_ID,profile_picture:e.external_profile_picture}),b.multiple_external_user_ID_support&&e.additional_external_users?.length)for(const t of e.additional_external_users)r.push({label:t.external_name,value:t.external_ID,profile_picture:t.external_profile_picture});for(const e of r)k(e.value)?t.push(e):n.push(e);return{connected:t,not_connected:n}}),[k,e,b]),{createConnection:E,setReconnectingAccount:w}=(0,i.useDispatch)(d.M_),_=(0,l.useCallback)((async n=>{n.preventDefault(),n.stopPropagation();const r=n.target,a=new FormData(r),s=a.get("external_user_ID");if(!s)return void v(__("Please select an account to connect.","jetpack"));const o={external_user_ID:b.multiple_external_user_ID_support?s:void 0,keyring_connection_ID:e.ID,shared:"1"===a.get("shared")||void 0},i=y.not_connected.find((e=>e.value===s));f&&w(void 0),E(o,{display_name:i?.label,profile_picture:i?.profile_picture,service_name:b.ID,external_id:s}),t()}),[E,f,w,v,e.ID,t,b.multiple_external_user_ID_support,b.ID,y.not_connected]);return React.createElement("section",{className:m.A.confirmation},y.not_connected.length?React.createElement("div",null,React.createElement("p",{className:m.A["header-text"]},__("Select the account you'd like to connect. All your new blog posts will be automatically shared to this account. You'll be able to change this option in the editor sidebar when you're writing a post.","jetpack")),e?.show_linkedin_warning&&React.createElement(u.A,{type:"warning"},React.createElement("p",null,__("We could not retrieve which company pages you have access to. This is a known issue with the LinkedIn API. If you would like to connect a company page, please retry after 5 minutes.","jetpack")," ",React.createElement(o.ExternalLink,{key:"linkedin-api-documentaion",href:(0,a.A)("jetpack-linkedin-permissions-warning")},__("Learn more","jetpack")))),React.createElement("form",{className:m.A.form,onSubmit:_,id:"connection-confirmation-form"},React.createElement("div",{className:m.A["accounts-list"]},y.not_connected.map(((e,t)=>{const n=f?f.service_name===b?.ID&&f.external_id===e.value:0===t;return React.createElement("label",{key:e.value,htmlFor:`external_user_ID__${e.value}`,className:m.A["account-label"],"aria-required":!0},React.createElement("input",{type:"radio",id:`external_user_ID__${e.value}`,name:"external_user_ID",value:e.value,defaultChecked:n,className:m.A["account-input"],required:!0}),React.createElement(h,{label:e.label,profile_picture:e.profile_picture}))}))),n?React.createElement(o.BaseControl,{__nextHasNoMarginBottom:!0,id:"mark-connection-as-shared",help:`${__("If enabled, the connection will be available to all administrators, editors, and authors.","jetpack")} ${__("You can change this later.","jetpack")}`},React.createElement(o.__experimentalHStack,{justify:"flex-start",spacing:3},React.createElement("span",null,React.createElement("input",{type:"checkbox",id:"mark-connection-as-shared",name:"shared",value:"1"})),React.createElement(o.FlexBlock,{as:"label",htmlFor:"mark-connection-as-shared"},__("Mark the connection as shared","jetpack")))):null,React.createElement("input",{type:"hidden",name:"keyring_connection_ID",value:e.ID}))):React.createElement("p",{className:m.A["header-text"]},y.connected.length?_x("No more accounts/pages found.","Message shown when there are no connections found to connect","jetpack"):__("No accounts/pages found.","jetpack")),y.connected.length?React.createElement("section",null,React.createElement("h3",null,__("Already connected","jetpack")),React.createElement("ul",null,y.connected.map(((e,t)=>React.createElement("li",{key:e.label+t},React.createElement(h,{label:e.label,profile_picture:e.profile_picture})))))):null,React.createElement("div",{className:m.A["submit-wrap"]},React.createElement(s.A,{variant:"secondary",onClick:t},__("Cancel","jetpack")),y.not_connected.length?React.createElement(s.A,{form:"connection-confirmation-form",type:"submit"},__("Confirm","jetpack")):null))}},48222:(e,t,n)=>{"use strict";n.d(t,{_:()=>b});var r=n(60442),a=n(47425),s=n(3924),o=n(50723),i=n(56427),l=n(3582),c=n(47143),u=n(86087),d=n(27723),p=n(13022),m=n(31963),h=n(78362),g=n(59493),f=n(73842);const __=d.__,_x=d._x,v=()=>{const{keyringResult:e}=(0,c.useSelect)((e=>{const{getKeyringResult:t}=e(m.M_);return{keyringResult:t()}}),[]),{setKeyringResult:t,closeConnectionsModal:n,setReconnectingAccount:o}=(0,c.useDispatch)(m.M_),[d]=(0,r.A)("sm"),v=(0,u.useCallback)((()=>{t(null),o(void 0),n()}),[n,t,o]),b=Boolean(e?.ID),k=b?__("Connection confirmation","jetpack"):_x("Manage Jetpack Social connections","","jetpack"),y=(0,c.useSelect)((e=>e(l.store).canUser("update","settings")),[]);return React.createElement(i.Modal,{className:(0,p.A)(f.A.modal,{[f.A.small]:d}),onRequestClose:v,title:k},b?React.createElement(g.O,{keyringResult:e,onComplete:v,isAdmin:y}):React.createElement(React.Fragment,null,React.createElement(h.b,null),React.createElement("div",{className:f.A["manual-share"]},React.createElement("em",null,React.createElement(a.Ay,null,__("Want to share to other networks? Use our Manual Sharing feature from the editor.","jetpack")," ",React.createElement(i.ExternalLink,{href:(0,s.A)("jetpack-social-manual-sharing-help")},__("Learn more","jetpack")))))))};function b(){const e=(0,c.useSelect)((e=>e(m.M_).isConnectionsModalOpen()),[]);return React.createElement(o.Ay,{targetDom:document.body},e?React.createElement(v,null):null)}},30642:(e,t,n)=>{"use strict";n.d(t,{F:()=>d});var r=n(50723),a=n(47425),s=n(40597),o=n(56427),i=n(27723),l=n(68541),c=n(34600),u=n(27681);const __=i.__;function d(e){return React.createElement(r.Ay,null,React.createElement("div",{className:u.A.wrapper},React.createElement(o.Flex,{align:"start",justify:"start"},React.createElement(a.Ay,{variant:"body-extra-small",className:u.A.title},__("Manual sharing","jetpack")),React.createElement(s.A,{inline:!1,shift:!0,iconSize:16,placement:"top-end"},React.createElement(c.P,e))),React.createElement(l.R,{buttonStyle:"icon"})))}},34600:(e,t,n)=>{"use strict";n.d(t,{P:()=>i});var r=n(47425),a=n(3924),s=n(56427),o=n(27723);const __=o.__;function i({...e}){return React.createElement(r.Ay,e,__('Just tap the social network or "Copy to Clipboard" icon, and we\'ll format your content for sharing.',"jetpack")," ",React.createElement(s.ExternalLink,{href:(0,a.A)("jetpack-social-manual-sharing-help")},__("Learn more","jetpack")))}},55858:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(51112),a=n(50723),s=n(94715),o=n(56427),i=n(86087),l=n(27723),c=n(51113),u=n(31249),d=n(13022),p=n(52367),m=n(2204),h=n(18699),g=n(97671);const __=l.__,f=e=>t=>{t.currentTarget.focus(),e()};function v({buttonLabel:e,subTitle:t,mediaId:n=null,mediaDetails:l={},onChange:v,wrapperClassName:b,allowedMediaTypes:k=null}){const{mediaData:{width:y,height:E,sourceUrl:w}={},metaData:{mime:_,length:C=null}={},previewData:{width:A,height:x,sourceUrl:j}={}}=l,S=!(w&&y&&E&&_),N=(0,i.useCallback)((()=>v(null)),[v]),R=(0,i.useCallback)((e=>{v(e)}),[v]),P=(0,i.useCallback)((e=>{const t=(0,p.c)(_);return t&&!C?null:React.createElement("div",{className:(0,d.A)(g.A["preview-wrapper"],b)},React.createElement("button",{className:g.A.remove,onClick:N},React.createElement(o.VisuallyHidden,null,__("Remove media","jetpack")),React.createElement(c.A,{icon:u.A})),React.createElement("button",{className:g.A.preview,onClick:f(e),"data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal"},t?React.createElement(h.A,{sourceUrl:w,mime:_,duration:C}):React.createElement(o.ResponsiveWrapper,{naturalWidth:A||y,naturalHeight:x||E,isInline:!0},React.createElement("img",{src:j||w,alt:"",className:g.A["preview-image"]}))))}),[E,C,_,N,x,j,A,w,y,b]),L=(0,i.useCallback)((a=>React.createElement("div",{className:g.A.container},n?React.createElement(React.Fragment,null,React.createElement("button",{className:g.A["remove-loading"],onClick:N},React.createElement(o.VisuallyHidden,null,__("Remove media","jetpack")),React.createElement(c.A,{icon:u.A})),React.createElement(o.Spinner,{"data-testid":"spinner"})):React.createElement(React.Fragment,null,React.createElement(r.A,{variant:"secondary",size:"small",className:g.A.preview,onClick:f(a),"data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal"},e),t&&React.createElement("span",null,t)))),[e,n,N,t]),T=(0,i.useCallback)((({open:e})=>n&&!S?P(e):L(e)),[n,S,P,L]);return React.createElement(a.Ay,null,React.createElement(s.MediaUploadCheck,null,React.createElement(s.MediaUpload,{allowedTypes:k??m.UB,title:e,onSelect:R,render:T,value:n})))}},12015:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(50723),a=n(3924),s=n(85985),o=n(56427),i=n(86087),l=n(27723),c=n(51609),u=n.n(c),d=n(98420),p=n(80624),m=n(55858),h=n(35270);const __=l.__,g=__("Choose Media","jetpack");function f({disabled:e=!1,disabledNoticeMessage:t="",CustomNotice:n=null,analyticsData:l}){const{attachedMedia:f,updateAttachedMedia:v}=(0,d.A)(),{recordEvent:b}=(0,s.st)(),[k]=(0,p.A)(f[0]?.id),y=(0,i.useCallback)((e=>{if(e){b("jetpack_social_media_attached",l);const{id:t,url:n,mime:r}=e;v([{id:t,url:n,type:r}])}else v([])}),[l,b,v]),E=e?o.Disabled:c.Fragment,w=e?{className:h.A.disabled,"data-testid":"disabled"}:{};return u().createElement(r.Ay,null,u().createElement(o.BaseControl,{__nextHasNoMarginBottom:!0,className:h.A.wrapper},u().createElement(o.BaseControl.VisualLabel,null,__("Attached Media","jetpack")),n||(t?u().createElement(o.Notice,{className:h.A.notice,isDismissible:!1,status:"warning"},u().createElement("p",{"data-testid":"notice"},t)):u().createElement("p",{className:h.A.subtitle},__("Choose a visual to accompany your post.","jetpack"))),u().createElement(E,w,u().createElement(m.A,{buttonLabel:g,subTitle:__("Add an image or video","jetpack"),mediaId:f[0]?.id,mediaDetails:k,onChange:y}),u().createElement(o.ExternalLink,{href:(0,a.A)("jetpack-social-media-support-information"),className:h.A["learn-more"]},__("Learn photo and video best practices","jetpack")))))}},70694:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(85985),a=n(56427),s=n(27723),o=n(51609);const __=s.__,_n=s._n;function i({message:e="",onChange:t,disabled:n,maxLength:i,analyticsData:l=null}){const{recordEvent:c}=(0,r.st)(),u=(0,o.useRef)(!0),d=i-e.length,p=(0,o.useCallback)((e=>{t(e),u.current&&(c("jetpack_social_custom_message_changed",l),u.current=!1)}),[l,u,t,c]);return React.createElement(a.TextareaControl,{value:e,label:__("Message","jetpack"),onChange:p,disabled:n,maxLength:i,placeholder:__("Write a custom message for your social audience here. This message will override your social post content.","jetpack"),rows:4,help:(0,s.sprintf)(/* translators: placeholder is a number. */ +_n("%d character remaining","%d characters remaining",d,"jetpack"),d),__nextHasNoMarginBottom:!0})}},51475:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(56427),a=n(27723),s=n(51113),o=n(31249),i=n(13022),l=n(28120),c=n.n(l),u=n(93794);const __=a.__,d=({children:e,type:t="default",actions:n=[],onDismiss:a})=>{const l=(0,i.A)(u.A.notice,u.A[`notice--${t}`]);return React.createElement("div",{className:l},React.createElement("div",{className:u.A.content}," ",e," "),a&&React.createElement("button",{className:u.A.dismiss,onClick:a},React.createElement(r.VisuallyHidden,null,__("Dismiss notice","jetpack")),React.createElement(s.A,{icon:o.A})),n&&n.length>0&&React.createElement("div",{className:u.A.actions},n.map((e=>e))))};d.propTypes={children:c().node.isRequired,type:c().oneOf(["default","highlight","warning","error"]),actions:c().arrayOf(c().element),onDismiss:c().func};const p=d},66561:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(56427),a=n(47143),s=n(43656),o=n(86087),i=n(27723),l=n(77627),c=n(88584),u=n(49036),d=n(50001),p=n(51371),m=n(70925),h=n(30642),g=n(51353),f=n(1101),v=n(87170);const __=i.__,b=({prePublish:e,children:t})=>{const{refresh:n,hasConnections:i,hasEnabledConnections:b}=(0,d.A)(),k=(0,a.useSelect)((e=>e(s.store).isCurrentPostPublished()),[]),{feature_flags:y}=(0,p.n)(),E=(0,c.A)(),{isPublicizeEnabled:w,hidePublicizeFeature:_,togglePublicizeFeature:C}=(0,l.A)();(0,u._D)((function(){b&&n()}),[b,n]);const A=e?o.Fragment:r.PanelBody,x=e?{}:{title:__("Share this post","jetpack"),className:v.A.panel};return E(),React.createElement(A,x,t,!_&&React.createElement(o.Fragment,null,!k&&React.createElement(r.ToggleControl,{label:w?__("Share when publishing","jetpack"):__("Sharing is disabled","jetpack",0),onChange:C,checked:w&&i,disabled:!i,__nextHasNoMarginBottom:!0}),React.createElement(m.A,null),React.createElement(f.O,null)),k&&React.createElement(React.Fragment,null,y.useShareStatus?React.createElement(g.E,null):null,React.createElement(h.F,null)))}},65843:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(85985),a=n(47143),s=n(14309),o=n(43656),i=n(27723),l=n(34600),c=n(68541),u=n(5780);const __=i.__;function d(){const{isCurrentPostPublished:e}=(0,a.useSelect)((e=>e(o.store)),[]);return e()?React.createElement(s.PluginPostPublishPanel,{initialOpen:!0,title:__("Manual sharing","jetpack"),id:"publicize-manual-sharing",icon:React.createElement(r.jt,null)},React.createElement(l.P,{className:u.A.description,variant:"body-small"}),React.createElement(c.R,null)):null}},26029:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(50723),a=n(65843),s=n(39691),o=n(89640);const i=()=>React.createElement(r.Ay,{targetDom:document.body},React.createElement(o.p,null),React.createElement(a.A,null),React.createElement(s.A,null))},39691:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var r=n(3924),a=n(85985),s=n(1455),o=n.n(s),i=n(14309),l=n(86087),c=n(77627),u=n(49036),d=n(50001),p=n(25300);const m=()=>{const[e,t]=(0,l.useState)((0,a.$i)()?.social?.reviewRequestDismissed??!0),[n,s]=(0,l.useState)(!1),{hasEnabledConnections:m}=(0,d.A)(),{isPublicizeEnabled:h,isPostAlreadyShared:g}=(0,c.A)();(0,u.Wv)((()=>{s(!g&&h&&m)}),[g,m,h]);const f=(0,l.useCallback)((()=>{const e=(0,a.$i)()?.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.A,{href:(0,r.A)("jetpack-social-plugin-reviews"),onClose:f}))}},89640:(e,t,n)=>{"use strict";n.d(t,{p:()=>m});var r=n(47143),a=n(14309),s=n(43656),o=n(92214),i=n(383),l=n(57275),c=n(49036),u=n(31963),d=n(51371),p=n(79594);function m(){const{isPublicizeEnabled:e}=(0,i.h)(),{pollForPostShareStatus:t}=(0,r.useDispatch)(u.M_),{feature_flags:n}=(0,d.n)(),{isPostPublished:m}=(0,r.useSelect)((e=>({isPostPublished:e(s.store).isCurrentPostPublished()})),[]),h=(0,l.z)((0,o.P)()),g=(0,l.z)((0,r.useSelect)((e=>e(u.M_).getEnabledConnections()),[])),f=e&&g.length>0&&h,v=n.useShareStatus&&f&&m;return(0,c._D)((()=>{v&&t({isRequestComplete:({postShareStatus:e})=>e.done})}),[v]),v?React.createElement(a.PluginPostPublishPanel,{id:"publicize-share-status"},React.createElement(p.q,null)):null}},79594:(e,t,n)=>{"use strict";n.d(t,{q:()=>u});var r=n(56427),a=n(47143),s=n(27723),o=n(31963),i=n(51475),l=n(7757),c=n(55387);const __=s.__,_n=s._n;function u({reShareTimestamp:e}){const t=(0,a.useSelect)((e=>e(o.M_).getPostShareStatus()),[]),n=e?t.shares.filter((t=>t.timestamp>e)):t.shares;if(t.polling)return React.createElement("div",{className:c.A["loading-block"]},React.createElement(r.Spinner,null),React.createElement("span",{className:c.A["loading-text"]},__("Sharing to your social media…","jetpack")));const u=n.filter((e=>"failure"===e.status)).length;return u>0?React.createElement(i.A,{type:"warning"},React.createElement("p",null,(0,s.sprintf)(/* translators: %d: number of failed shares */ _n("Your post was unable to be shared to %d connection.","Your post was unable to be shared to %d connections.",u,"jetpack"),u)),React.createElement(l.JU,{variant:"link",analyticsData:{location:"post-publish-panel"}},__("Review status and try again","jetpack"))):t.done?n.length?React.createElement(React.Fragment,null,React.createElement("b",null,__("Your post was shared.","jetpack"))," ","🎉",React.createElement("p",null,(0,s.sprintf)(/* translators: %d: number of connections to which a post was shared */ -_n("You post was successfuly shared to %d connection.","You post was successfuly shared to %d connections.",n.length,"jetpack"),n.length)),React.createElement(l.JU,{analyticsData:{location:e?"resharing-section":"post-publish-panel"}})):React.createElement("span",null,__("Your post was not shared.","jetpack")):React.createElement("span",null,__("The request to share your post is still in progress.","jetpack")," ",__("Please refresh and check again in a few minutes.","jetpack"))}},51353:(e,t,n)=>{"use strict";n.d(t,{E:()=>c});var a=n(47143),r=n(51609),s=n(31963),o=n(79594),i=n(7757),l=n(61420);const c=()=>{const e=(0,a.useSelect)((e=>e(s.M_).getPostShareStatus()),[]),[t,n]=(0,r.useState)(null);return(0,r.useEffect)((()=>{e.polling&&n(Date.now()/1e3)}),[e.polling]),t?React.createElement("div",{className:l.A.wrapper},React.createElement(o.q,{reShareTimestamp:t})):React.createElement(i.JU,{withWrapper:!0,analyticsData:{location:"editor"}})}},25300:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var a=n(50723),r=n(51112),s=n(85985),o=n(27723),i=n(51609),l=n(76445);const __=o.__,c=({href:e,onClose:t})=>{const{recordEvent:n}=(0,s.st)({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(a.Ay,null,React.createElement("div",{className:l.A.prompt},React.createElement("h2",{className:l.A.header},(0,o.sprintf)(/* translators: %s is the celebration emoji */ -__("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.A.buttons},React.createElement(r.A,{onClick:c,isExternalLink:!0,href:e,className:l.A.button},__("Leave a Review","jetpack")),React.createElement(r.A,{onClick:u,variant:"link",className:l.A.button},__("Dismiss","jetpack")))))}},53774:(e,t,n)=>{"use strict";n.d(t,{$:()=>p});var a=n(51112),r=n(47143),s=n(86087),o=n(27723),i=n(13022),l=n(31963),c=n(75018),u=n(42475),d=n(70745);const __=o.__,_x=o._x;function p({service:e,isSmall:t,onSubmit:n,displayInputs:o,hasConnections:p,buttonLabel:m}){const{setKeyringResult:h}=(0,r.useDispatch)(l.M_),{isConnectionsModalOpen:g}=(0,r.useSelect)((e=>e(l.M_)),[]),f=(0,s.useCallback)((e=>{g()&&h(e)}),[h,g]),v=(0,d.P)({service:e,onConfirm:f}),b=(0,s.useCallback)((e=>{if(e.preventDefault(),e.stopPropagation(),n)return n();const t=new FormData(e.target);v(t)}),[n,v]);return React.createElement("form",{className:(0,i.A)(u.A["connect-form"],{[u.A.small]:t}),onSubmit:b},o?React.createElement("div",{className:u.A["fields-wrapper"]},React.createElement(c.t,{service:e})):null,React.createElement("div",{className:u.A["fields-wrapper"]},React.createElement("div",{className:u.A["fields-item"]},React.createElement(a.A,{variant:p?"secondary":"primary",type:"submit",className:u.A["connect-button"]},m||(p?_x("Connect more","","jetpack"):__("Connect","jetpack"))))))}},75018:(e,t,n)=>{"use strict";n.d(t,{t:()=>u});var a=n(42266),r=n(56427),s=n(47143),o=n(86087),i=n(27723),l=n(31963),c=n(42475);const __=i.__,_x=i._x;function u({service:e}){const t=(0,o.useId)(),n=(0,s.useSelect)((e=>e(l.M_).getReconnectingAccount()),[]);return"mastodon"===e.ID?React.createElement("div",{className:c.A["fields-item"]},React.createElement("label",{htmlFor:`${t}-handle`},_x("Handle","The handle of a social media account.","jetpack")),React.createElement("input",{id:`${t}-handle`,required:!0,type:"text",name:"instance",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("Mastodon handle","jetpack"),"aria-describedby":`${t}-handle-description`,placeholder:"@mastodon@mastodon.social"}),React.createElement("p",{className:"description",id:`${t}-handle-description`},__("You can find the handle in your Mastodon profile.","jetpack"))):"bluesky"===e.ID?React.createElement(React.Fragment,null,React.createElement("div",{className:c.A["fields-item"]},React.createElement("label",{htmlFor:`${t}-handle`},_x("Handle","The handle of a social media account.","jetpack")),React.createElement("input",{id:`${t}-handle`,required:!0,type:"text",name:"handle",defaultValue:"bluesky"===n?.service_name?n?.external_name:void 0,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("Bluesky handle","jetpack"),"aria-describedby":`${t}-handle-description`,placeholder:"username.bsky.social"}),React.createElement("p",{className:"description",id:`${t}-handle-description`},__("You can find the handle in your Bluesky profile.","jetpack"))),React.createElement("div",{className:c.A["fields-item"]},React.createElement("label",{htmlFor:`${t}-password`},__("App password","jetpack")),React.createElement("input",{id:`${t}-password`,required:!0,type:"password",name:"app_password",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("App password","jetpack"),"aria-describedby":`${t}-password-description`,placeholder:"xxxx-xxxx-xxxx-xxxx"}),React.createElement("p",{className:"description",id:`${t}-password-description`},(0,o.createInterpolateElement)(__("App password is needed to safely connect your account. App password is different from your account password. You can generate it in Bluesky.","jetpack"),{link:React.createElement(r.ExternalLink,{href:"https://bsky.app/settings/app-passwords"})})),"bluesky"===n?.service_name&&React.createElement(a.A,{level:"error",showIcon:!1},__("Please provide an app password to fix the connection.","jetpack")))):null}},77088:(e,t,n)=>{"use strict";n.d(t,{e:()=>d});var a=n(40597),r=n(47425),s=n(27723),o=n(27817),i=n(86158),l=n(43119),c=n(52683),u=n(42475);const __=s.__,d=({connection:e,service:t,isAdmin:n})=>{return React.createElement("div",{className:u.A["service-connection"]},React.createElement("div",null,e.profile_picture?React.createElement("img",{className:u.A["profile-pic"],src:e.profile_picture,alt:e.display_name}):React.createElement(t.icon,{iconSize:40})),React.createElement("div",{className:u.A["connection-details"]},React.createElement(o.s,{connection:e}),"broken"===(s=e).status&&s.can_disconnect?React.createElement(i.v,{connection:s,service:t}):n?React.createElement("div",{className:u.A["mark-shared-wrap"]},React.createElement(c.j,{connection:s}),React.createElement(a.A,{placement:"top",inline:!1,shift:!0},__("If enabled, the connection will be available to all administrators, editors, and authors.","jetpack"))):s.can_disconnect?null:React.createElement(React.Fragment,null,React.createElement(r.Ay,{className:u.A.description},__("This connection is added by a site administrator.","jetpack")),"broken"===s.status?React.createElement(i.v,{connection:s,service:t}):null)),React.createElement("div",{className:u.A["connection-actions"]},React.createElement(l.V,{connection:e,isDestructive:!1,variant:"tertiary",buttonClassName:u.A.disconnect})));var s}},46985:(e,t,n)=>{"use strict";n.d(t,{x:()=>d});var a=n(60442),r=n(56427),s=n(3582),o=n(47143),i=n(13022),l=n(31963),c=n(77088),u=n(42475);function d({service:e,serviceConnections:t}){const[n]=(0,a.A)("sm"),{deletingConnections:d,updatingConnections:p}=(0,o.useSelect)((e=>{const{getDeletingConnections:t,getUpdatingConnections:n}=e(l.M_);return{deletingConnections:t(),updatingConnections:n()}}),[]),m=(0,o.useSelect)((e=>e(s.store).canUser("update","settings")),[]);return t.length?React.createElement("ul",{className:u.A["service-connection-list"]},t.map((t=>{const n=p.includes(t.connection_id)||d.includes(t.connection_id);return React.createElement("li",{key:t.connection_id},React.createElement(r.Disabled,{isDisabled:n},React.createElement(c.e,{connection:t,service:e,isAdmin:m})))}))):React.createElement("div",{className:(0,i.A)(u.A["example-wrapper"],{[u.A.small]:n})},e.examples.map(((t,n)=>React.createElement("div",{key:e.ID+n,className:u.A.example},React.createElement(t,null)))))}},59008:(e,t,n)=>{"use strict";n.d(t,{j:()=>g});var a=n(60442),r=n(51112),s=n(56427),o=n(86087),i=n(27723),l=n(51113),c=n(98248),u=n(64969),d=n(53774),p=n(46985),m=n(21159),h=n(42475);const __=i.__,_x=i._x;function g({service:e,serviceConnections:t,isPanelDefaultOpen:n}){const[i]=(0,a.A)("sm"),[g,f]=(0,o.useReducer)((e=>!e),n),v=(0,o.useRef)(null);(0,o.useEffect)((()=>{n&&v.current?.scrollIntoView({block:"center",behavior:"smooth"})}),[]);const b=g&&e.needsCustomInputs,k=t.filter((({status:e})=>"broken"===e)),y=k.some((({can_disconnect:e})=>e)),E=b||y&&g,w=k.length>1?_x("Fix connections","Fix the social media connections","jetpack"):_x("Fix connection","Fix social media connection","jetpack");return React.createElement("div",{className:h.A["service-item"]},React.createElement("div",{className:h.A["service-item-info"]},React.createElement("div",null,React.createElement(e.icon,{iconSize:i?36:48})),React.createElement("div",{className:h.A["service-basics"]},React.createElement("div",{className:h.A.heading},React.createElement("span",{className:h.A.title},e.label),e.badges?.length?React.createElement("div",{className:h.A.badges},e.badges.map((({text:e,style:t},n)=>React.createElement("span",{key:n,className:h.A.badge,style:t},e)))):null),i||t.length?null:React.createElement("span",{className:h.A.description},e.description),React.createElement(m.E,{serviceConnections:t,brokenConnections:k})),React.createElement("div",{className:h.A.actions},E?null:React.createElement(d.$,{service:e,isSmall:i,onSubmit:y||e.needsCustomInputs?f:void 0,hasConnections:t.length>0,buttonLabel:y?w:void 0}),React.createElement(r.A,{size:"small",className:h.A["learn-more"],variant:"tertiary",onClick:f,"aria-label":__("Learn more","jetpack")},React.createElement(l.A,{className:h.A.chevron,icon:g?c.A:u.A})))),React.createElement(s.Panel,{className:h.A["service-panel"],ref:v},React.createElement(s.PanelBody,{opened:g,onToggle:f},React.createElement(p.x,{service:e,serviceConnections:t}),e.needsCustomInputs&&!y?React.createElement("div",{className:h.A["connect-form-wrapper"]},React.createElement(d.$,{service:e,displayInputs:!0,isSmall:!1,buttonLabel:__("Connect","jetpack")})):null)))}},21159:(e,t,n)=>{"use strict";n.d(t,{E:()=>o});var a=n(42266),r=n(27723),s=n(42475);const __=r.__,_n=r._n;function o({serviceConnections:e,brokenConnections:t}){if(!e.length)return null;if(t.length>0){const e=t.some((({can_disconnect:e})=>e));return React.createElement(a.A,{level:e?"error":"warning",showIcon:!1,className:s.A["broken-connection-alert"]},e?__("Please fix the broken connections or disconnect them to create more connections.","jetpack"):_n("Broken connection","Broken connections",t.length,"jetpack"))}return React.createElement("span",{className:s.A["active-connection"]},e.length>1?(0,r.sprintf)( +_n("You post was successfuly shared to %d connection.","You post was successfuly shared to %d connections.",n.length,"jetpack"),n.length)),React.createElement(l.JU,{analyticsData:{location:e?"resharing-section":"post-publish-panel"}})):React.createElement("span",null,__("Your post was not shared.","jetpack")):React.createElement("span",null,__("The request to share your post is still in progress.","jetpack")," ",__("Please refresh and check again in a few minutes.","jetpack"))}},51353:(e,t,n)=>{"use strict";n.d(t,{E:()=>c});var r=n(47143),a=n(51609),s=n(31963),o=n(79594),i=n(7757),l=n(61420);const c=()=>{const e=(0,r.useSelect)((e=>e(s.M_).getPostShareStatus()),[]),[t,n]=(0,a.useState)(null);return(0,a.useEffect)((()=>{e.polling&&n(Date.now()/1e3)}),[e.polling]),t?React.createElement("div",{className:l.A.wrapper},React.createElement(o.q,{reShareTimestamp:t})):React.createElement(i.JU,{withWrapper:!0,analyticsData:{location:"editor"}})}},25300:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(50723),a=n(51112),s=n(85985),o=n(27723),i=n(51609),l=n(76445);const __=o.__,c=({href:e,onClose:t})=>{const{recordEvent:n}=(0,s.st)({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.Ay,null,React.createElement("div",{className:l.A.prompt},React.createElement("h2",{className:l.A.header},(0,o.sprintf)(/* translators: %s is the celebration emoji */ +__("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.A.buttons},React.createElement(a.A,{onClick:c,isExternalLink:!0,href:e,className:l.A.button},__("Leave a Review","jetpack")),React.createElement(a.A,{onClick:u,variant:"link",className:l.A.button},__("Dismiss","jetpack")))))}},53774:(e,t,n)=>{"use strict";n.d(t,{$:()=>p});var r=n(51112),a=n(47143),s=n(86087),o=n(27723),i=n(13022),l=n(31963),c=n(75018),u=n(42475),d=n(70745);const __=o.__,_x=o._x;function p({service:e,isSmall:t,onSubmit:n,displayInputs:o,hasConnections:p,buttonLabel:m}){const{setKeyringResult:h}=(0,a.useDispatch)(l.M_),{isConnectionsModalOpen:g}=(0,a.useSelect)((e=>e(l.M_)),[]),f=(0,s.useCallback)((e=>{g()&&h(e)}),[h,g]),v=(0,d.P)({service:e,onConfirm:f}),b=(0,s.useCallback)((e=>{if(e.preventDefault(),e.stopPropagation(),n)return n();const t=new FormData(e.target);v(t)}),[n,v]);return React.createElement("form",{className:(0,i.A)(u.A["connect-form"],{[u.A.small]:t}),onSubmit:b},o?React.createElement("div",{className:u.A["fields-wrapper"]},React.createElement(c.t,{service:e})):null,React.createElement("div",{className:u.A["fields-wrapper"]},React.createElement("div",{className:u.A["fields-item"]},React.createElement(r.A,{variant:p?"secondary":"primary",type:"submit",className:u.A["connect-button"]},m||(p?_x("Connect more","","jetpack"):__("Connect","jetpack"))))))}},75018:(e,t,n)=>{"use strict";n.d(t,{t:()=>u});var r=n(42266),a=n(56427),s=n(47143),o=n(86087),i=n(27723),l=n(31963),c=n(42475);const __=i.__,_x=i._x;function u({service:e}){const t=(0,o.useId)(),n=(0,s.useSelect)((e=>e(l.M_).getReconnectingAccount()),[]);return"mastodon"===e.ID?React.createElement("div",{className:c.A["fields-item"]},React.createElement("label",{htmlFor:`${t}-handle`},_x("Handle","The handle of a social media account.","jetpack")),React.createElement("input",{id:`${t}-handle`,required:!0,type:"text",name:"instance",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("Mastodon handle","jetpack"),"aria-describedby":`${t}-handle-description`,placeholder:"@mastodon@mastodon.social"}),React.createElement("p",{className:"description",id:`${t}-handle-description`},__("You can find the handle in your Mastodon profile.","jetpack"))):"bluesky"===e.ID?React.createElement(React.Fragment,null,React.createElement("div",{className:c.A["fields-item"]},React.createElement("label",{htmlFor:`${t}-handle`},_x("Handle","The handle of a social media account.","jetpack")),React.createElement("input",{id:`${t}-handle`,required:!0,type:"text",name:"handle",defaultValue:"bluesky"===n?.service_name?n?.external_name:void 0,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("Bluesky handle","jetpack"),"aria-describedby":`${t}-handle-description`,placeholder:"username.bsky.social"}),React.createElement("p",{className:"description",id:`${t}-handle-description`},__("You can find the handle in your Bluesky profile.","jetpack"))),React.createElement("div",{className:c.A["fields-item"]},React.createElement("label",{htmlFor:`${t}-password`},__("App password","jetpack")),React.createElement("input",{id:`${t}-password`,required:!0,type:"password",name:"app_password",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("App password","jetpack"),"aria-describedby":`${t}-password-description`,placeholder:"xxxx-xxxx-xxxx-xxxx"}),React.createElement("p",{className:"description",id:`${t}-password-description`},(0,o.createInterpolateElement)(__("App password is needed to safely connect your account. App password is different from your account password. You can generate it in Bluesky.","jetpack"),{link:React.createElement(a.ExternalLink,{href:"https://bsky.app/settings/app-passwords"})})),"bluesky"===n?.service_name&&React.createElement(r.A,{level:"error",showIcon:!1},__("Please provide an app password to fix the connection.","jetpack")))):null}},77088:(e,t,n)=>{"use strict";n.d(t,{e:()=>d});var r=n(40597),a=n(47425),s=n(27723),o=n(27817),i=n(86158),l=n(43119),c=n(52683),u=n(42475);const __=s.__,d=({connection:e,service:t,isAdmin:n})=>{return React.createElement("div",{className:u.A["service-connection"]},React.createElement("div",null,e.profile_picture?React.createElement("img",{className:u.A["profile-pic"],src:e.profile_picture,alt:e.display_name}):React.createElement(t.icon,{iconSize:40})),React.createElement("div",{className:u.A["connection-details"]},React.createElement(o.s,{connection:e}),"broken"===(s=e).status&&s.can_disconnect?React.createElement(i.v,{connection:s,service:t}):n?React.createElement("div",{className:u.A["mark-shared-wrap"]},React.createElement(c.j,{connection:s}),React.createElement(r.A,{placement:"top",inline:!1,shift:!0},__("If enabled, the connection will be available to all administrators, editors, and authors.","jetpack"))):s.can_disconnect?null:React.createElement(React.Fragment,null,React.createElement(a.Ay,{className:u.A.description},__("This connection is added by a site administrator.","jetpack")),"broken"===s.status?React.createElement(i.v,{connection:s,service:t}):null)),React.createElement("div",{className:u.A["connection-actions"]},React.createElement(l.V,{connection:e,isDestructive:!1,variant:"tertiary",buttonClassName:u.A.disconnect})));var s}},46985:(e,t,n)=>{"use strict";n.d(t,{x:()=>d});var r=n(60442),a=n(56427),s=n(3582),o=n(47143),i=n(13022),l=n(31963),c=n(77088),u=n(42475);function d({service:e,serviceConnections:t}){const[n]=(0,r.A)("sm"),{deletingConnections:d,updatingConnections:p}=(0,o.useSelect)((e=>{const{getDeletingConnections:t,getUpdatingConnections:n}=e(l.M_);return{deletingConnections:t(),updatingConnections:n()}}),[]),m=(0,o.useSelect)((e=>e(s.store).canUser("update","settings")),[]);return t.length?React.createElement("ul",{className:u.A["service-connection-list"]},t.map((t=>{const n=p.includes(t.connection_id)||d.includes(t.connection_id);return React.createElement("li",{key:t.connection_id},React.createElement(a.Disabled,{isDisabled:n},React.createElement(c.e,{connection:t,service:e,isAdmin:m})))}))):React.createElement("div",{className:(0,i.A)(u.A["example-wrapper"],{[u.A.small]:n})},e.examples.map(((t,n)=>React.createElement("div",{key:e.ID+n,className:u.A.example},React.createElement(t,null)))))}},59008:(e,t,n)=>{"use strict";n.d(t,{j:()=>g});var r=n(60442),a=n(51112),s=n(56427),o=n(86087),i=n(27723),l=n(51113),c=n(98248),u=n(64969),d=n(53774),p=n(46985),m=n(21159),h=n(42475);const __=i.__,_x=i._x;function g({service:e,serviceConnections:t,isPanelDefaultOpen:n}){const[i]=(0,r.A)("sm"),[g,f]=(0,o.useReducer)((e=>!e),n),v=(0,o.useRef)(null);(0,o.useEffect)((()=>{n&&v.current?.scrollIntoView({block:"center",behavior:"smooth"})}),[]);const b=g&&e.needsCustomInputs,k=t.filter((({status:e})=>"broken"===e)),y=k.some((({can_disconnect:e})=>e)),E=b||y&&g,w=k.length>1?_x("Fix connections","Fix the social media connections","jetpack"):_x("Fix connection","Fix social media connection","jetpack");return React.createElement("div",{className:h.A["service-item"]},React.createElement("div",{className:h.A["service-item-info"]},React.createElement("div",null,React.createElement(e.icon,{iconSize:i?36:48})),React.createElement("div",{className:h.A["service-basics"]},React.createElement("div",{className:h.A.heading},React.createElement("span",{className:h.A.title},e.label),e.badges?.length?React.createElement("div",{className:h.A.badges},e.badges.map((({text:e,style:t},n)=>React.createElement("span",{key:n,className:h.A.badge,style:t},e)))):null),i||t.length?null:React.createElement("span",{className:h.A.description},e.description),React.createElement(m.E,{serviceConnections:t,brokenConnections:k})),React.createElement("div",{className:h.A.actions},E?null:React.createElement(d.$,{service:e,isSmall:i,onSubmit:y||e.needsCustomInputs?f:void 0,hasConnections:t.length>0,buttonLabel:y?w:void 0}),React.createElement(a.A,{size:"small",className:h.A["learn-more"],variant:"tertiary",onClick:f,"aria-label":__("Learn more","jetpack")},React.createElement(l.A,{className:h.A.chevron,icon:g?c.A:u.A})))),React.createElement(s.Panel,{className:h.A["service-panel"],ref:v},React.createElement(s.PanelBody,{opened:g,onToggle:f},React.createElement(p.x,{service:e,serviceConnections:t}),e.needsCustomInputs&&!y?React.createElement("div",{className:h.A["connect-form-wrapper"]},React.createElement(d.$,{service:e,displayInputs:!0,isSmall:!1,buttonLabel:__("Connect","jetpack")})):null)))}},21159:(e,t,n)=>{"use strict";n.d(t,{E:()=>o});var r=n(42266),a=n(27723),s=n(42475);const __=a.__,_n=a._n;function o({serviceConnections:e,brokenConnections:t}){if(!e.length)return null;if(t.length>0){const e=t.some((({can_disconnect:e})=>e));return React.createElement(r.A,{level:e?"error":"warning",showIcon:!1,className:s.A["broken-connection-alert"]},e?__("Please fix the broken connections or disconnect them to create more connections.","jetpack"):_n("Broken connection","Broken connections",t.length,"jetpack"))}return React.createElement("span",{className:s.A["active-connection"]},e.length>1?(0,a.sprintf)( // translators: %d: Number of connections -__("%d connections","jetpack"),e.length):__("Connected","jetpack"))}},78362:(e,t,n)=>{"use strict";n.d(t,{b:()=>l});var a=n(47143),r=n(31963),s=n(59008),o=n(42475),i=n(39630);function l(){const e=(0,i.o)(),t=(0,a.useSelect)((e=>e(r.M_).getConnections().reduce(((e,t)=>(e[t.service_name]||(e[t.service_name]=[]),e[t.service_name].push(t),e)),{})),[]),n=(0,a.useSelect)((e=>e(r.M_).getReconnectingAccount()),[]);return React.createElement("ul",{className:o.A.services},e.map((e=>React.createElement("li",{key:e.ID,className:o.A["service-list-item"]},React.createElement(s.j,{service:e,serviceConnections:t[e.ID]||[],isPanelDefaultOpen:n?.service_name===e.ID})))))}},70745:(e,t,n)=>{"use strict";n.d(t,{P:()=>u});var a=n(63406),r=n(47143),s=n(86087),o=n(27723),i=n(31963),l=n(70407);const __=o.__,c=e=>/^@?\b([A-Z0-9_]+)@([A-Z0-9.-]+\.[A-Z]{2,})$/gi.test(e);function u({service:e,onConfirm:t}){const{createErrorNotice:n}=(0,a.I)(),o=(0,r.useSelect)((e=>e(i.M_).isMastodonAccountAlreadyConnected),[]),u=(0,r.useSelect)((e=>e(i.M_).isBlueskyAccountAlreadyConnected),[]);return(0,s.useCallback)((a=>{const r=new URL(e.connect_URL);switch(e.ID){case"mastodon":{const e=a.get("instance").toString().trim();if(!c(e))return void n(__("Invalid Mastodon username","jetpack"));if(o?.(e))return void n(__("This Mastodon account is already connected","jetpack"));r.searchParams.set("instance",e);break}case"bluesky":{const e=(a.get("handle")?.toString()||"").trim().replace(/^@/,"");if(!function(e){const t=e.split(".").filter(Boolean);return!(t.length<2)&&t.every((e=>/^[a-z0-9_-]+$/i.test(e)))}(e))return void n(__("Invalid Bluesky handle","jetpack"));if(u?.(e))return void n(__("This Bluesky account is already connected","jetpack"));r.searchParams.set("handle",e),r.searchParams.set("app_password",(a.get("app_password")?.toString()||"").trim());break}}(0,l.requestExternalAccess)(r.toString(),t)}),[n,u,o,t,e.ID,e.connect_URL])}},9515:(e,t,n)=>{"use strict";n.d(t,{h:()=>s});var a=n(51609),r=n(48712);function s(){const e=(0,r.h)();return(0,a.useCallback)((t=>e(t)?.label||t[0].toUpperCase()+t.substring(1)),[e])}},48712:(e,t,n)=>{"use strict";n.d(t,{h:()=>s});var a=n(51609),r=n(39630);function s(){const e=(0,r.o)(),t=(0,a.useMemo)((()=>e.reduce(((e,t)=>(e[t.ID]=t,e)),{})),[e]);return(0,a.useCallback)((e=>t[e]),[t])}},39630:(e,t,n)=>{"use strict";n.d(t,{o:()=>f});var a=n(96072),r=n.n(a),s=n(78478),o=n(56427),i=n(86087),l=n(27723),c=n(30081),u=n(26818),d=n(43443),p=n(11326),m=n(65398),h=n(9791),g=n(51371);const __=l.__;function f(){const e=(0,i.useMemo)((()=>{const{supported_services:e}=(0,g.n)();return e.reduce(((e,t)=>({...e,[t.ID]:t})),{})}),[]),t={text:__("New","jetpack"),style:{background:"#e9eff5",color:"#0675C4"}};return[{...e.facebook,icon:e=>React.createElement(s.M5,r()({serviceName:"facebook"},e)),description:__("Share to your pages","jetpack"),examples:[()=>React.createElement(React.Fragment,null,(0,i.createInterpolateElement)(__("Connect to automatically share posts on your Facebook page.","jetpack"),{strong:React.createElement("strong",null)})),()=>React.createElement("img",{src:c,alt:__("Add Facebook connection","jetpack")})]},{...e["instagram-business"],icon:e=>React.createElement(s.M5,r()({serviceName:"instagram"},e)),description:__("Share to your Instagram Business account.","jetpack"),examples:[()=>React.createElement(React.Fragment,null,__("Drive engagement and save time by automatically sharing images to Instagram when you publish blog posts.","jetpack"),React.createElement("div",{className:"instagram-business__requirements"},React.createElement("h4",null,__("Requirements for connecting Instagram:","jetpack")),React.createElement("ol",null,React.createElement("li",null,__("You must have an Instagram Business account.","jetpack")),React.createElement("li",null,__("Your Instagram Business account must be linked to a Facebook page.","jetpack")))),(0,i.createInterpolateElement)(__("When you click “connect” you'll be asked to log into Facebook. If your Instagram Business account isn't listed, ensure it's linked to a Facebook page.","jetpack"),{strong:React.createElement("strong",null),i:React.createElement("em",null)}),React.createElement("br",null),React.createElement("br",null),React.createElement(o.ExternalLink,{className:"instagram-business__help-link",href:"https://jetpack.com/redirect/?source=jetpack-social-instagram-business-help"},__("Learn how to convert & link your Instagram account.","jetpack"))),()=>React.createElement("img",{src:u,alt:__("Add Instagram photo","jetpack")})]},{...e.threads,icon:e=>React.createElement(s.M5,r()({serviceName:"threads"},e)),description:__("Share posts to your Threads feed.","jetpack"),examples:[()=>React.createElement(React.Fragment,null,__("Increase your presence in social media by sharing your posts automatically to Threads.","jetpack")),()=>React.createElement("img",{src:m,alt:__("Add Threads connection","jetpack")})]},{...e.bluesky,needsCustomInputs:!0,icon:e=>React.createElement(s.M5,r()({serviceName:"bluesky"},e)),badges:[t],description:__("Share with your network.","jetpack"),examples:[()=>React.createElement(React.Fragment,null,__("To share to Bluesky please enter your Bluesky handle and app password below, then click connect.","jetpack"))]},{...e.linkedin,icon:e=>React.createElement(s.M5,r()({serviceName:"linkedin"},e)),description:__("Share with your LinkedIn community.","jetpack"),examples:[()=>React.createElement(React.Fragment,null,(0,i.createInterpolateElement)(__("Connect to automatically share posts with your LinkedIn connections.","jetpack"),{strong:React.createElement("strong",null)})),()=>React.createElement("img",{src:d,alt:__("Add LinkedIn connection","jetpack")})]},{...e.nextdoor,icon:e=>React.createElement(s.M5,r()({serviceName:"nextdoor"},e)),description:__("Share on communities","jetpack"),examples:[()=>React.createElement(React.Fragment,null,(0,i.createInterpolateElement)(__("Connect with friends, neighbors, and local businesses by automatically sharing your posts to Nextdoor.","jetpack"),{strong:React.createElement("strong",null)})),()=>React.createElement("img",{src:p,alt:__("Add Instagram photo","jetpack")})]},{...e.tumblr,icon:e=>React.createElement(s.M5,r()({serviceName:"tumblr-alt"},e)),description:__("Share to your Tumblr blog.","jetpack"),examples:[()=>React.createElement(React.Fragment,null,(0,i.createInterpolateElement)(__("Connect to automatically share posts to your Tumblr blog.","jetpack"),{strong:React.createElement("strong",null)})),()=>React.createElement("img",{src:h,alt:__("Add Tumblr connection","jetpack")})]},{...e.mastodon,needsCustomInputs:!0,icon:e=>React.createElement(s.M5,r()({serviceName:"mastodon"},e)),description:__("Share with your network.","jetpack"),examples:[()=>React.createElement(React.Fragment,null,__("To share to Mastodon please enter your Mastodon username below, then click connect.","jetpack"))]}].filter((e=>Boolean(e.ID)))}},73905:(e,t,n)=>{"use strict";n.d(t,{t:()=>r});var a=n(27723);const __=a.__,r=[{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}}"}]},49192:(e,t,n)=>{"use strict";n(68541)},68541:(e,t,n)=>{"use strict";n.d(t,{R:()=>h});var a=n(78478),r=n(51112),s=n(47425),o=n(69222),i=n(85985),l=n(86087),c=n(27723),u=n(13022),d=n(73905),p=n(99811),m=n(53975);const __=c.__;function h({buttonStyle:e="icon",buttonVariant:t}){const n=(0,m.i)(),{recordEvent:h}=(0,i.st)(),g=(0,l.useCallback)((()=>{h("jetpack_social_share_button_clicked",{network:"clipboard"})}),[h]),f=(0,l.useCallback)((()=>n("{{text}}\n{{url}}",!1)),[n]),v=(0,l.useCallback)((function(e,t){return function(n){n.preventDefault(),h("jetpack_social_share_button_clicked",t),window.open(e,"","menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600")}}),[h]);return React.createElement("div",{className:(0,u.A)(p.A["share-buttons"],{[p.A.vertical]:e.includes("text")})},d.t.map((({label:o,networkName:i,url:l})=>{const u=n(l),d="icon"===e?React.createElement(a.M5,{serviceName:i}):null,m=(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:p.A.container,key:i},React.createElement(r.A,{icon:d,variant:t,"aria-label":m,href:u,target:"_blank",rel:"noopener noreferrer",onClick:v(u,{network:i}),className:"icon"===e?p.A[i]:"has-text"},"icon"===e?null:React.createElement(React.Fragment,null,"icon-text"===e&&React.createElement(a.M5,{className:p.A[i],serviceName:i}),React.createElement(s.Ay,{className:p.A.label,component:"span"},m))))})),React.createElement("div",{className:p.A.container},React.createElement(o.A,{buttonStyle:e,onCopy:g,textToCopy:f,className:"icon"===e?p.A.clipboard:" has-text",variant:t},"icon"===e?null:React.createElement(s.Ay,{className:p.A.label,component:"span"},__("Copy to clipboard","jetpack")))))}},53975:(e,t,n)=>{"use strict";n.d(t,{i:()=>i});var a=n(47143),r=n(43656),s=n(86087),o=n(383);function i(){const{shareMessage:e}=(0,o.h)(),{message:t,link:n}=(0,a.useSelect)((t=>{const{getEditedPostAttribute:n}=t(r.store);return{link:n("link"),message:e||n("meta")?.jetpack_seo_html_title||n("title")}}),[e]);return(0,s.useCallback)(((e,a=!0)=>{let r=t,s=n;return e.includes("{{url}}")||(r=r+"\n\n"+s,s=""),a&&(r=encodeURIComponent(r),s=encodeURIComponent(s)),e.replace("{{text}}",r).replace("{{url}}",s)}),[n,t])}},1101:(e,t,n)=>{"use strict";n.d(t,{O:()=>v});var a=n(85985),r=n(56427),s=n(47143),o=n(43656),i=n(86087),l=n(27723),c=n(692),u=n(92214),d=n(77627),p=n(31873),m=n(31963),h=n(51371);const __=l.__;function g(e=__("Unable to share the Post","jetpack")){const{createErrorNotice:t}=(0,s.dispatch)(c.store);t(e,{id:"publicize-post-share-message"})}function f(){const{isPublicizeEnabled:e}=(0,d.A)(),{isFetching:t,isError:n,isSuccess:l,doPublicize:f}=(0,p.A)(),v=(0,s.useSelect)((e=>e(o.store).isCurrentPostPublished()),[]),{feature_flags:b}=(0,h.n)(),{pollForPostShareStatus:k}=(0,s.useDispatch)(m.M_),{recordEvent:y}=(0,a.st)();(0,i.useEffect)((()=>{if(!t)return n?g():void(l&&function(){const{createSuccessNotice:e}=(0,s.dispatch)(c.store);e(__("Request submitted successfully.","jetpack"),{id:"publicize-post-share-message",type:"snackbar"})}())}),[t,n,l]);const E=(0,u.P)(),w=!e||!E||!v||t,_=(0,i.useCallback)((async()=>{if(!v)return g(__("You must publish your post before you can share it.","jetpack"));(0,s.dispatch)(c.store).removeNotice("publicize-post-share-message"),y("jetpack_social_reshare_clicked",{location:"editor",environment:(0,a.d9)()?"atomic":(0,a.Sy)()?"simple":"jetpack"}),await f(),b.useShareStatus&&k()}),[v,y,f,b.useShareStatus,k]);return React.createElement(r.Button,{variant:"secondary",onClick:_,disabled:w,isBusy:t},__("Share post","jetpack"))}function v(){const{isRePublicizeUpgradableViaUpsell:e}=(0,d.A)(),t=(0,s.useSelect)((e=>e(o.store).isCurrentPostPublished()),[]),{hasConnections:n}=(0,s.useSelect)((e=>e(m.M_)),[]);return t?e?null:n()?React.createElement(r.PanelRow,null,React.createElement(f,null)):null:null}},7757:(e,t,n)=>{"use strict";n.d(t,{JU:()=>r.g,Q3:()=>a.Q});var a=n(59032),r=n(95499)},95499:(e,t,n)=>{"use strict";n.d(t,{g:()=>m});var a=n(96072),r=n.n(a),s=n(85985),o=n(56427),i=n(47143),l=n(27723),c=n(51609),u=n(31963),d=n(51371),p=n(14150);const __=l.__,m=(0,c.forwardRef)((({withWrapper:e=!1,analyticsData:t=null,...n},a)=>{const{recordEvent:l}=(0,s.st)(),{openShareStatusModal:m}=(0,i.useDispatch)(u.M_),h=(0,i.useSelect)((e=>e(u.M_).getPostShareStatus()),[]),g=(0,c.useCallback)((()=>{l("jetpack_social_share_status_modal_opened",t),m()}),[t,m,l]);if(!h||!h.shares||0===h.shares.length)return null;const{feature_flags:f}=(0,d.n)();if(!f.useShareStatus)return null;const v=React.createElement(o.Button,r()({variant:"secondary",onClick:g},n,{ref:a}),n.children||__("View sharing history","jetpack"));return e?React.createElement("div",{className:p.A["trigger-wrapper"]},v):v}))},59032:(e,t,n)=>{"use strict";n.d(t,{Q:()=>d});var a=n(50723),r=n(56427),s=n(47143),o=n(27723),i=n(31963),l=n(30557),c=n(14150);const __=o.__;function u(){const{closeShareStatusModal:e}=(0,s.useDispatch)(i.M_);return React.createElement("div",{className:c.A.wrapper},React.createElement(r.Modal,{onRequestClose:e,title:__("Sharing status","jetpack"),className:c.A.modal},React.createElement(l.W,null)))}function d(){const e=(0,s.useSelect)((e=>e(i.M_).isShareStatusModalOpen()),[]);return React.createElement(a.Ay,{targetDom:document.body},e?React.createElement(u,null):null)}},14329:(e,t,n)=>{"use strict";n.d(t,{f:()=>h});var a=n(40597),r=n(85985),s=n(56427),o=n(47143),i=n(43656),l=n(27723),c=n(51609),u=n(31873),d=n(31963),p=n(59061),m=n(14150);const __=l.__,_x=l._x;function h({shareItem:e}){const{recordEvent:t}=(0,r.st)(),n=(0,o.useSelect)((e=>e(i.store).getCurrentPostId()),[]),l=(0,o.useSelect)((e=>e(d.M_).getConnections()),[]),h=l.some((0,p.eJ)(e)),{doPublicize:g}=(0,u.A)(n),{pollForPostShareStatus:f}=(0,o.useDispatch)(d.M_),[v,b]=(0,c.useState)(!1),k=(0,c.useCallback)((async()=>{t("jetpack_social_share_status_retry",{service:e.service,location:"modal"});const n=(0,p.eJ)(e),a=l.filter((e=>!n(e))).map((({connection_id:e})=>e));a.length!==l.length&&(b(!0),await g(a),await f({isRequestComplete({postShareStatus:t,lastTimestamp:n}){const a=t.shares.some((t=>t.timestamp>n&&(0,p.Ri)(e,t)));return a&&b(!1),a}}))}),[t,e,l,g,f]);return v?React.createElement(s.Spinner,null):React.createElement("div",{className:m.A["retry-wrapper"]},React.createElement(s.Button,{variant:h?"link":"tertiary",onClick:h?k:void 0,disabled:!h},__("Retry","jetpack")),h?null:React.createElement(a.A,{shift:!0,placement:"bottom-end"},e.external_id?_x("This connection has been removed.","Social media connection","jetpack"):_x("This connection has been reconnected or removed.","Social media connection","jetpack")))}},30557:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});var a=n(47143),r=n(31963),s=n(48377);function o(){const e=(0,a.useSelect)((e=>e(r.M_).getPostShareStatus()),[]);return React.createElement("div",null,React.createElement(s.S,{postShareStatus:e}))}},368:(e,t,n)=>{"use strict";n.d(t,{C:()=>l});var a=n(85985),r=n(56427),s=n(27723),o=n(51609),i=n(14329);const __=s.__;function l({shareItem:e}){const{recordEvent:t}=(0,a.st)(),n=(0,o.useCallback)((()=>{t("jetpack_social_share_status_view",{service:e.service,location:"modal"})}),[t,e.service]);return"success"===e.status?React.createElement(r.ExternalLink,{href:e.message,onClick:n},__("View","jetpack")):React.createElement(i.f,{shareItem:e})}},69662:(e,t,n)=>{"use strict";n.d(t,{a:()=>p});var a=n(40597),r=n(47425),s=n(27723),o=n(51113),i=n(83883),l=n(13022),c=n(51609),u=n.n(c),d=n(14150);const __=s.__,_x=s._x;function p({status:e,message:t}){const n="success"===e,s=n?u().createElement(o.A,{className:d.A["share-status-icon"],icon:i.A}):u().createElement(a.A,{shift:!0,inline:!1,title:__("Sharing failed with the following message:","jetpack"),className:d.A["share-status-icon-tooltip"]},u().createElement(r.Ay,{variant:"body-small",className:d.A["tooltip-text"]},t));return u().createElement("div",{className:(0,l.A)(d.A["share-status-wrapper"],{[d.A["share-status-success"]]:n,[d.A["share-status-failure"]]:!n})},u().createElement("div",{className:d.A["share-status-icon"]},s),u().createElement("div",{className:d.A["share-status-label"]},n?_x("Shared","The sharing is successful","jetpack"):__("Failed","jetpack")))}},48377:(e,t,n)=>{"use strict";n.d(t,{S:()=>u});var a=n(38443),r=n(27723),s=n(12141),o=n(368),i=n(69662),l=n(14150);const __=r.__,c=e=>`${e.external_id||e.connection_id}:${e.timestamp}`;function u({postShareStatus:e}){return React.createElement("div",{className:l.A["dataview-wrapper"]},React.createElement("div",{className:"dataviews-wrapper"},React.createElement("table",{className:"dataviews-view-table"},React.createElement("thead",null,React.createElement("tr",{className:"dataviews-view-table__row"},React.createElement("th",null,__("Connection","jetpack")),React.createElement("th",null,__("Time","jetpack")),React.createElement("th",null,__("Status","jetpack")),React.createElement("th",null,__("Actions","jetpack")))),React.createElement("tbody",null,e.shares.map((e=>React.createElement("tr",{key:c(e),className:"dataviews-view-table__row"},React.createElement("td",null,React.createElement("div",{className:"dataviews-view-table__cell-content-wrapper"},React.createElement("div",{className:l.A["connection-name"]},React.createElement(s.A,{serviceName:e.service,label:e.external_name,profilePicture:e.profile_picture}),React.createElement("div",{className:l.A["share-item-name-wrapper"]},React.createElement("div",{className:l.A["share-item-name"]},e.external_name))))),React.createElement("td",null,React.createElement("div",{className:"dataviews-view-table__cell-content-wrapper"},(0,a.humanTimeDiff)(1e3*e.timestamp,(0,a.getDate)(null)))),React.createElement("td",null,React.createElement("div",{className:"dataviews-view-table__cell-content-wrapper"},React.createElement(i.a,{status:e.status,message:e.message}))),React.createElement("td",null,React.createElement("div",{className:"dataviews-view-table__cell-content-wrapper"},React.createElement(o.C,{shareItem:e}))))))))))}},29341:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var a=n(63406),r=n(56427),s=n(86087),o=n(27723),i=n(49747),l=n(38394),c=n(56457),u=n(77932);const __=o.__,_x=o._x,d=({prePublish:e=!1})=>{const t=e?s.Fragment:r.PanelBody,n=e?{}:{title:__("Social Image Generator","jetpack")},{isEnabled:o,setIsEnabled:d}=(0,i.A)(),[p,m]=(0,s.useState)(!1),h=(0,s.useCallback)((()=>m(!0)),[]),g=(0,s.useCallback)((()=>m(!1)),[]),[f,v]=(0,s.useState)(null),{createErrorNotice:b,createSuccessNotice:k}=(0,a.I)(),{save:y,isSaving:E}=(0,l.i)({onError:e=>{b(e.message)},onSuccess:()=>{k(__("Image saved to media library.","jetpack"))}}),w=(0,s.useCallback)((()=>{y(`https://s0.wp.com/_si/?t=${f}`,"generated-image.jpg")}),[f,y]);return React.createElement(t,n,p&&React.createElement(u.A,{onClose:g}),React.createElement(r.ToggleControl,{label:__("Enable Social Image","jetpack"),help:o?"":__("Social Image is disabled for this post.","jetpack"),checked:o,onChange:d,__nextHasNoMarginBottom:!0}),o&&React.createElement(React.Fragment,null,React.createElement("hr",null),React.createElement(c.Ay,{onNewToken:v}),React.createElement("hr",null),React.createElement(r.__experimentalHStack,{spacing:2,wrap:!0},React.createElement(r.Button,{variant:"secondary",onClick:h,label:__("Open the Social Image Generator settings","jetpack")},__("Settings","jetpack")),React.createElement(r.Button,{variant:"secondary",onClick:w,label:__("Save the generated image to your media library.","jetpack"),disabled:!f||E},E?_x("Saving…","Saving the file to media library","jetpack"):__("Save to media library","jetpack")))))}},77932:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var a=n(50723),r=n(56427),s=n(86087),o=n(27723),i=n(49747),l=n(80624),c=n(56457),u=n(55858),d=n(81299),p=n(53744);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.A)(),[v,b]=(0,s.useState)(o),[k,y]=(0,s.useState)(n||"featured"),[E,w]=(0,s.useState)(t),[_,C]=(0,s.useState)(g),[A]=(0,l.A)(v),x=(0,s.useCallback)((()=>{f({template:_,image_type:k,custom_text:E||"",..."custom"===k&&{image_id:v}}),e()}),[f,_,k,v,E,e]),j=(0,s.useCallback)((e=>{b(e?.id)}),[b]);return React.createElement(a.Ay,{targetDom:document.body},React.createElement(r.Modal,{onRequestClose:e},React.createElement(c.Ay,{className:p.A.preview,imageId:v,customText:E,imageType:k,template:_}),React.createElement(r.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,__nextHasNoMarginBottom:!0}),"custom"===k&&React.createElement(u.A,{buttonLabel:h,subTitle:__("Add a custom image","jetpack"),mediaId:v,mediaDetails:A,onChange:j,allowedMediaTypes:m,wrapperClassName:p.A.mediaPicker}),React.createElement(r.TextControl,{className:p.A.customText,value:E||"",onChange:w,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"),__nextHasNoMarginBottom:!0}),React.createElement(r.BaseControl,{__nextHasNoMarginBottom:!0,className:p.A.templateControl},React.createElement(r.BaseControl.VisualLabel,null,__("Templates","jetpack")),React.createElement(d.A,{value:_,onTemplateSelected:C})),React.createElement(r.Button,{onClick:e,variant:"tertiary"},__("Cancel","jetpack")),React.createElement(r.Button,{onClick:x,variant:"primary"},__("Save","jetpack"))))}},29761:(e,t,n)=>{"use strict";n(47143),n(86087),n(27723),n(51609),n(31963),n(12226)},12226:(e,t,n)=>{"use strict";n(56427),n(86087),n(27723),n(81299),n(88375)},81299:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(86087),r=n(27723),s=n(13022),o=n(52002),i=n(10936);const __=r.__,l=({value:e=null,onTemplateSelected:t=null})=>{const n=(0,a.useCallback)((e=>{const n=e.target.id;t?.(n)}),[t]);return React.createElement("div",{className:o.A.templates},i.A.map((t=>React.createElement("button",{onClick:n,id:t.name,key:t.name,className:(0,s.A)(o.A.template,{[o.A["template--active"]]:t.name===e})},React.createElement("img",{src:t.image,alt:t.label}),React.createElement("span",{className:"screen-reader-text"},(0,r.sprintf)(/* translators: %s is the name of the template */ -__("Pick the %s template","jetpack"),t.label))))))}},10936:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(26365),r=n(45329),s=n(9509);const o=[{name:"highway",label:"Highway",image:n(22417)},{name:"dois",label:"Dois",image:a},{name:"edge",label:"Edge",image:r},{name:"fullscreen",label:"Fullscreen",image:s}]},98725:(e,t,n)=>{"use strict";n(47143),n(86087),n(51609),n(31963)},96390:(e,t,n)=>{"use strict";n.d(t,{n:()=>d});var a=n(85985),r=n(56427),s=n(86087),o=n(27723),i=n(10991),l=n(18603),c=n(94360),u=n(47944);const __=o.__;function d(){const[e,t]=(0,s.useReducer)((e=>!e),!1),{recordEvent:n}=(0,a.st)(),o=(0,s.useCallback)((()=>{e||n("jetpack_social_preview_modal_opened"),t()}),[e,n]);return React.createElement(r.PanelRow,{className:u.A.panel},e&&React.createElement(r.Modal,{onRequestClose:t,title:__("Social Previews","jetpack"),className:u.A.modal,__experimentalHideHeader:!0},React.createElement("div",{className:u.A["modal-content"]},React.createElement(c.X,null),React.createElement(l.w,null)),React.createElement(r.Button,{className:u.A["close-button"],onClick:t,icon:i.A,label:__("Close","jetpack")})),React.createElement(r.Button,{variant:"secondary",onClick:o},__("Preview social posts","jetpack")))}},98588:(e,t,n)=>{"use strict";n.d(t,{z:()=>w});var a=n(96072),r=n.n(a),s=n(29103),o=n(73188),i=n(73066),l=n(57984),c=n(48914),u=n(83945),d=n(73915),p=n(89075),m=n(95550),h=n(3582),g=n(47143),f=n(86087),v=n(18537),b=n(27723),k=n(39553),y=n(62697),E=n(31137);const __=b.__;function w({connection:e}){const t=(0,f.useMemo)((()=>({displayName:e.display_name||e.external_display,profileImage:e.profile_picture,externalName:e.external_name})),[e]),{image:n,media:a,title:b,description:w,url:_,excerpt:C}=(0,E.s)(),A=((0,k.A)().message||"").trim(),x=(0,f.useMemo)((()=>({description:w,image:n,media:a,title:b,url:_})),[w,n,a,b,_]),j=(0,g.useSelect)((e=>{const{getUnstableBase:t}=e(h.store);return(0,v.decodeEntities)(t()?.name)}),[]),S=a?.some((({type:e})=>e.startsWith("image/")||e.startsWith("video/")));switch(e.service_name){case"bluesky":{const e=a?.[0],n=e?.type.startsWith("image/")?e.url:null;return React.createElement(s.O,r()({},x,{description:(0,v.decodeEntities)(C),user:{avatarUrl:t.profileImage,address:t.externalName,displayName:t.displayName},customText:(0,v.decodeEntities)(A||`${b}\n\n${C.replaceAll(/[\s\n]/g," ")}`),customImage:n}))}case"facebook":return S?React.createElement(o.h,r()({},x,{type:"article",customText:A||C||b,user:t})):React.createElement(i.l,r()({},x,{type:"article",customText:A||C||b,user:t}));case"instagram-business":{const e=Boolean(n);return S||e?React.createElement(l.l,r()({},x,{image:a?.[0]?.url||n,name:t.displayName,profileImage:t.profileImage,caption:A||b||w})):React.createElement(y.q,null)}case"linkedin":return React.createElement(c.$,r()({},x,{jobTitle:__("Job Title (Company Name)","jetpack"),name:t.displayName,profileImage:t.profileImage,description:A||b||w}));case"mastodon":{const e=a?.[0],n=e?.type.startsWith("image/")?e.url:null;return React.createElement(u._,r()({},x,{description:C,siteName:j,user:{avatarUrl:t.profileImage,address:t.displayName,displayName:t.displayName},customText:A,customImage:n}))}case"nextdoor":{const e=`${A||b||w} ${a.length?_:""}`.trim();return React.createElement(d.K,r()({},x,{description:e,name:t.displayName,profileImage:t.profileImage}))}case"threads":{let e=b;A?e=A:b&&C&&(e=`${b}\n\n${C}`);const n=500-_.length-2;return e=(0,v.decodeEntities)(e).slice(0,n),e+=`\n\n${_}`,React.createElement(p.s,r()({},x,{caption:e,name:t.displayName,profileImage:t.profileImage}))}case"tumblr":return React.createElement(m.B,r()({},x,{user:{displayName:t.displayName,avatarUrl:t.profileImage},customText:A}));default:return null}}},18603:(e,t,n)=>{"use strict";n.d(t,{w:()=>h});var a=n(85985),r=n(56427),s=n(47143),o=n(27723),i=n(51609),l=n(31963),c=n(12141),u=n(39329),d=n(48712),p=n(98588),m=n(47944);const __=o.__,_x=o._x;function h(){const{recordEvent:e}=(0,a.st)(),t=(0,d.h)(),{canBeTurnedOn:n,shouldBeDisabled:o}=(0,u.j)(),h=(0,s.useSelect)((e=>e(l.M_).getConnections().filter((({service_name:e})=>t(e))).map((e=>{const t=e.display_name||e.external_display,a=`${e.service_name}-${e.connection_id}`,r=React.createElement(c.A,{label:t,serviceName:e.service_name,profilePicture:e.profile_picture}),s=o(e)||!n(e)||!e.enabled;return{...e,className:s?m.A["disabled-tab"]:"",name:a,title:t,icon:r}}))),[n,t,o]),{toggleConnectionById:g}=(0,s.useDispatch)(l.M_),f=(0,i.useCallback)(((t,n)=>()=>{g(t),e("jetpack_social_connection_toggled",{location:"preview-modal",enabled:!n.enabled,service_name:n.service_name})}),[e,g]);return React.createElement("div",{className:m.A["preview-section"]},React.createElement(r.TabPanel,{tabs:h},(e=>{const t=n(e)&&e.enabled;return React.createElement("div",{className:m.A["preview-content"]},o(e)?null:React.createElement(r.ToggleControl,{label:t?_x("Connection enabled","","jetpack"):__("Connection disabled","jetpack"),checked:t,onChange:f(e.connection_id,e),__nextHasNoMarginBottom:!0}),React.createElement(p.z,{connection:e}))})))}},94360:(e,t,n)=>{"use strict";n.d(t,{X:()=>o});var a=n(27723),r=n(41190),s=n(47944);const __=a.__;function o(){return React.createElement("div",{className:s.A["settings-section"]},React.createElement("div",{className:s.A["settings-header"]},React.createElement("h2",null,__("Social Preview","jetpack"))),React.createElement("div",{className:s.A["settings-content"]},React.createElement("p",{className:s.A["modal-description"]},__("Edit and preview your social post before sharing.","jetpack")),React.createElement(r.o,{analyticsData:{location:"preview-modal"}})))}},42259:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var a=n(96072),r=n.n(a),s=n(91937),o=n(3582),i=n(47143),l=n(43656),c=n(18537),u=n(39553),d=n(31963);const p=e=>{const{message:t}=(0,u.A)(),{content:n,siteName:a}=(0,i.useSelect)((e=>{const{getEditedPostAttribute:t}=e(l.store),{getUnstableBase:n}=e(o.store);return{content:t("content").split("\x3c!--more")[0],siteName:(0,c.decodeEntities)(n().name)}}),[]),p=(0,i.useSelect)((e=>{const{displayName:t,profileImage:n,username:a}=e(d.M_).getConnectionProfileDetails(d.zW);return{displayName:t,avatarUrl:n,address:a}}),[]),m=e.media?.[0],h=m?.type.startsWith("image/")?m.url:null,g=(0,i.useSelect)((e=>e(d.M_).getConnectionsByService(d.zW)),[]);return React.createElement(s.x,r()({},e,{siteName:a,user:p,description:(0,c.decodeEntities)(n),customText:(0,c.decodeEntities)(t||`${e.title}\n\n${n.replaceAll(/[\s\n]/g," ")}`),customImage:h,hidePostPreview:!g.length}))}},59540:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var a=n(96072),r=n.n(a),s=n(87070),o=n(47143),i=n(39553),l=n(31963);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.A)(),{title:n,excerpt:a,content:c}=e,u=(0,o.useSelect)((e=>{const{displayName:t,profileImage:n}=e(l.Af).getConnectionProfileDetails(l.s);return{displayName:t,avatarUrl:n}}));return React.createElement(s.k,r()({},e,{type:"article",user:u,customText:t||a||c||n}))}))},81048:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var a=n(96072),r=n.n(a),s=n(8797),o=n(47143),i=n(18537),l=n(51609),c=n.n(l);const u=function(e){const t=(0,o.useSelect)((e=>{const{getUnstableBase:t}=e("core"),n=t().name;return(0,i.decodeEntities)(n)}));return c().createElement(s.m,r()({},e,{siteTitle:t}))}},91262:(e,t,n)=>{"use strict";n.d(t,{p:()=>g});var a=n(47656),r=n(3924),s=n(97999),o=n(20578),i=n(56427),l=n(47143),c=n(27723),u=n(51609),d=n.n(u),p=n(39553),m=n(31963),h=n(27844);const __=c.__,_x=c._x;function g(e){const{title:t,image:n,media:c,description:u}=e,{username:g,profileImage:f}=(0,l.useSelect)((e=>e(m.Af).getConnectionProfileDetails(m.bN))),{message:v}=(0,p.A)(),b=c?.some((({type:e})=>e.startsWith("image/")||e.startsWith("video/"))),k=Boolean(n);if(!b&&!k)return d().createElement(a.A,{hideCloseButton:!0,actions:[d().createElement(i.ExternalLink,{key:"learn-more",href:(0,r.A)("jetpack-social-share-to-instagram")},__("Learn more","jetpack"))]},(0,s.siteHasFeature)(h.q.ENHANCED_PUBLISHING)?__("To share to Instagram, add an image/video, or enable Social Image Generator.","jetpack"):_x("You need a featured image to share to Instagram.","The message shown in the Instagram social preview","jetpack"));const y=v||t||u;return d().createElement(o.a,{image:c?.[0]?.url||n,media:c,name:g,profileImage:f,caption:y})}},29650:(e,t,n)=>{"use strict";n.d(t,{p:()=>u});var a=n(7368),r=n(47143),s=n(27723),o=n(51609),i=n.n(o),l=n(39553),c=n(31963);const __=s.__;function u(e){const{title:t,url:n,image:s,media:o,description:u}=e,{displayName:d,profileImage:p}=(0,r.useSelect)((e=>e(c.Af).getConnectionProfileDetails(c.gt))),{message:m}=(0,l.A)(),h=`${m||t||u} ${o.length?n:""}`.trim();return i().createElement(a.G,{jobTitle:__("Job Title (Company Name)","jetpack"),image:s,name:d,profileImage:p,title:t,description:h,url:n,media:o})}},98175:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var a=n(96072),r=n.n(a),s=n(71751),o=n(47143),i=n(18537),l=n(39553),c=n(31963);const u=e=>{const{message:t}=(0,l.A)(),{content:n,siteName:a}=(0,o.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor"),{getUnstableBase:n}=e("core");return{content:t("content").split("\x3c!--more")[0],siteName:(0,i.decodeEntities)(n().name)}})),u=(0,o.useSelect)((e=>{const{displayName:t,profileImage:n,username:a}=e(c.Af).getConnectionProfileDetails(c.V6);return{displayName:t,avatarUrl:n,address:a}})),d=e.media?.[0],p=d?.type.startsWith("image/")?d.url:null;return React.createElement(s.R,r()({},e,{siteName:a,user:u,description:n,customText:t,customImage:p}))}},81115:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var a=n(56427),r=n(18537),s=n(27723),o=n(10991),i=n(19779),l=n(31137);const __=s.__,c=function({onClose:e,initialTabName:t}){const n=(0,i.r)(),{image:s,media:c,title:u,description:d,url:p,excerpt:m}=(0,l.s)();return React.createElement(a.Modal,{onRequestClose:e,className:"jetpack-social-previews__modal",__experimentalHideHeader:!0},React.createElement(a.Button,{className:"jetpack-social-previews__modal--close-btn",onClick:e,icon:o.A,label:__("Close","jetpack")}),React.createElement(a.TabPanel,{className:"jetpack-social-previews__modal-previews",tabs:n,initialTabName:t},(e=>React.createElement("div",null,React.createElement(e.preview,{excerpt:(0,r.decodeEntities)(m),title:(0,r.decodeEntities)(u),description:(0,r.decodeEntities)(d),url:p,image:s,media:c})))))}},49257:(e,t,n)=>{"use strict";n.d(t,{s:()=>c});var a=n(58581),r=n(47143),s=n(51609),o=n.n(s),i=n(39553),l=n(31963);function c(e){const{title:t,url:n,image:s,media:c,description:u}=e,{displayName:d,profileImage:p}=(0,r.useSelect)((e=>e(l.Af).getConnectionProfileDetails(l.zk))),{message:m}=(0,i.A)(),h=`${m||t||u} ${c.length?n:""}`.trim();return o().createElement(a.n,{image:s,name:d,profileImage:p,title:t,description:h,url:n,media:c})}},97192:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(56427),r=n(27723),s=n(19779);const __=r.__,_x=r._x,o=({openModal:e})=>{const t=(0,s.r)();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(a.Button,{variant:"secondary",onClick:e,label:__("Open Social Previews","jetpack")},_x("Preview","Button label that opens the social previews modal","jetpack")))}},68655:(e,t,n)=>{"use strict";n.d(t,{Q:()=>u});var a=n(33389),r=n(47143),s=n(18537),o=n(51609),i=n.n(o),l=n(383),c=n(31963);function u({excerpt:e,title:t,description:n,image:o,url:u,media:d}){const{shareMessage:p}=(0,l.h)(),m=(0,r.useSelect)((a=>{const{displayName:r,profileImage:i}=a(c.M_).getConnectionProfileDetails(c.BB);let l=t;p?l=p:t&&e&&(l=`${t}\n\n${e}`);const m=500-u.length-2;return l=(0,s.decodeEntities)(l).slice(0,m),l+=`\n\n${u}`,[{caption:l,name:r,profileImage:i,title:t,description:n,image:o,media:d,url:u}]}),[e,t,o,n,d,u,p]),h=(0,r.useSelect)((e=>e(c.M_).getConnectionsByService(c.BB)),[]);return i().createElement(a.n,{posts:m,hidePostPreview:!h.length})}},22322:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var a=n(96072),r=n.n(a),s=n(19036),o=n(47143),i=n(39553),l=n(31963);const c=e=>{const{content:t,author:n}=(0,o.useSelect)((e=>{const{getUser:t}=e("core"),{getEditedPostAttribute:n}=e("core/editor"),a=n("author"),r=a&&t(a);return{content:n("content").split("\x3c!--more")[0],author:r?.name}})),{message:a}=(0,i.A)(),c=(0,o.useSelect)((e=>{const{displayName:t,profileImage:a}=e(l.Af).getConnectionProfileDetails(l.me);return{displayName:t||n,avatarUrl:a}}),[n]);return React.createElement(s.s,r()({},e,{user:c,description:t,customText:a}))}},91537:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var a=n(43731),r=n(47143),s=n(51609),o=n.n(s),i=n(383),l=n(31963);const c=function({title:e,description:t,image:n,url:s,media:c}){const{shareMessage:u}=(0,i.h)(),d=(0,r.useSelect)((a=>{const{displayName:r,profileImage:o,username:i}=a(l.Af).getConnectionProfileDetails(l.PX);return[{name:r,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(a.p,{tweets:d,hidePostPreview:!0})}},19779:(e,t,n)=>{"use strict";n.d(t,{r:()=>E});var a=n(96072),r=n.n(a),s=n(78478),o=n(27723),i=n(51609),l=n.n(i),c=n(31963),u=n(70407),d=n(42259),p=n(59540),m=n(81048),h=n(91262),g=n(29650),f=n(98175),v=n(49257),b=n(68655),k=n(22322),y=n(91537);const __=o.__,_x=o._x;function E(){const e=(0,u.getSupportedAdditionalConnections)().includes(c.BB);return(0,i.useMemo)((()=>[{title:__("Google Search","jetpack"),icon:e=>l().createElement(s.M5,r()({serviceName:"google"},e)),name:"google",preview:m.A},{title:__("X","jetpack"),icon:e=>l().createElement(s.M5,r()({serviceName:"x"},e)),name:"x",preview:y.A},{title:__("Facebook","jetpack"),icon:e=>l().createElement(s.M5,r()({serviceName:"facebook"},e)),name:"facebook",preview:p.A},{title:__("Instagram","jetpack"),icon:e=>l().createElement(s.M5,r()({serviceName:"instagram"},e)),name:"instagram",preview:h.p},e?{title:_x("Threads","The name of the social media network - threads.net","jetpack"),icon:e=>l().createElement(s.M5,r()({serviceName:"threads"},e)),name:"threads",preview:b.Q}:null,{title:__("LinkedIn","jetpack"),icon:e=>l().createElement(s.M5,r()({serviceName:"linkedin"},e)),name:"linkedin",preview:g.p},{title:__("Nextdoor","jetpack"),icon:e=>l().createElement(s.M5,r()({serviceName:"nextdoor"},e)),name:"nextdoor",preview:v.s},{title:__("Tumblr","jetpack"),icon:e=>l().createElement(s.M5,r()({serviceName:"tumblr-alt"},e)),name:"tumblr",preview:k.A},{title:__("Mastodon","jetpack"),icon:e=>l().createElement(s.M5,r()({serviceName:"mastodon"},e)),name:"mastodon",preview:f.A},{title:__("Bluesky","jetpack"),icon:e=>l().createElement(s.M5,r()({serviceName:"bluesky"},e)),name:"bluesky",preview:d.A}].filter(Boolean)),[e])}},31137:(e,t,n)=>{"use strict";n.d(t,{s:()=>l});var a=n(47143),r=n(27723),s=n(383),o=n(74820),i=n(25995);const __=r.__;function l(){const{attachedMedia:e,imageGeneratorSettings:t}=(0,s.h)();return(0,a.useSelect)((n=>{const{getMedia:a}=n("core"),{getEditedPostAttribute:r,getEditedPostContent:s}=n("core/editor"),l=r("featured_media");let c=l?(0,i.l)(a(l)):"";const u=t.enabled?(0,o.S)(t.token):"";if(u&&(c=u),!c){const e=(0,i.t)(s());e&&(c=e)}const d=[],p=e=>{const t=a(e);return t?{type:t.mime_type,url:(0,i.l)(t),alt:t.alt_text}:null};for(const{id:t}of e){const e=p(t);e&&d.push(e)}return{title:(r("meta")?.jetpack_seo_html_title||r("title")||"").trim(),description:(r("meta")?.advanced_seo_description||r("excerpt")||r("content").split("\x3c!--more")[0]||__("Visit the post for more.","jetpack")||"").trim(),url:r("link"),excerpt:(r("excerpt")||r("content").split("\x3c!--more")[0]||"").trim(),image:c,media:d,initialTabName:null}}),[e,t])}},25995:(e,t,n)=>{"use strict";function a(e){return e?e.media_details?.sizes?.large?.source_url||e.source_url:null}function r(e){const t=(new DOMParser).parseFromString(e,"text/html"),n=Array.from(t.querySelectorAll("img")),a=n[0]?.src;return a??null}n.d(t,{l:()=>a,t:()=>r})},7610:(e,t,n)=>{"use strict";n(47143),n(86087),n(51609),n(7162)},18699:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(86087),r=n(76794);const s=({sourceUrl:e,mime:t,duration:n})=>{const[s,o]=(0,a.useState)(!1),[i,l]=(0,a.useState)(0),c=(0,a.useRef)(null),u=(0,a.useRef)(null),d=(0,a.useRef)(null);(0,a.useEffect)((()=>{c.current?.load()}),[e]);const p=(0,a.useCallback)((()=>{c.current.pause(),c.current.currentTime=0,clearInterval(u.current),clearTimeout(d.current),l(0),o(!1)}),[]),m=(0,a.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),a=String(Math.floor(e%60)).padStart(2,"0");return React.createElement("div",{className:r.A.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:r.A.duration},`${t}:${a}`))};return React.createElement("div",{className:r.A.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))}},98420:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(383);function r(){const{attachedMedia:e,updateJetpackSocialOptions:t}=(0,a.h)();return{attachedMedia:e,updateAttachedMedia:e=>t("attached_media",e)}}},54915:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(47143),r=n(43656);const s=()=>(0,a.useSelect)((e=>e(r.store).getEditedPostAttribute("featured_media")))},49747:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(47143),r=n(43656),s=n(86087),o=n(383);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.h)(),{isPostPublished:l}=(0,a.useSelect)((e=>({isPostPublished:e(r.store).isCurrentPostPublished()}))),c=(0,s.useCallback)(((t,a)=>{const r={...e,[t]:a};n("image_generator_settings",r)}),[e,n]),u=(0,s.useCallback)((t=>{const a={...e,...t};n("image_generator_settings",a)}),[e,n]);return{...i(t.image_generator_settings,l),setIsEnabled:e=>c("enabled",e),setToken:e=>c("token",e),updateSettings:u}}},92214:(e,t,n)=>{"use strict";n.d(t,{P:()=>d});var a=n(47143),r=n(98420),s=n(54915),o=n(80624),i=n(52367),l=n(80682),c=n(50001),u=n(31963);function d(){const{enabledConnections:e}=(0,c.A)(),{attachedMedia:t}=(0,r.A)(),n=(0,s.A)(),d=t[0]?.id||n,{validationErrors:p,isConvertible:m}=(0,i.A)(e,(0,o.A)(d)[0]),h=(0,a.useSelect)((e=>e(u.M_).getBrokenConnections().map((e=>e.connection_id))),[]);return e.some((function({connection_id:e,service_name:t}){return!h.includes(e)&&(!(e in p)||("instagram-business"!==t||!Object.values(p).includes(l.k3))&&m)}))}},80624:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(47143),r=n(86087);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"),a=t.headers.get("content-type");return n&&a?{mime:a,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 a=n.medium||n.large,r={width:a.width,height:a.height,sourceUrl:a.source_url};return{mediaData:{width:n.full.width,height:n.full.height,sourceUrl:n.full.source_url},metaData:t,previewData:r}};function o(e=null){const[t,n]=(0,r.useState)([{}]),o=(0,a.useSelect)((t=>t("core").getMedia(e,{context:"view"})),[e]),i=(0,r.useCallback)((async()=>{try{const e=await s(o);n([e??{}])}catch{n([{}])}}),[o]);return(0,r.useEffect)((()=>{i()}),[i]),t}},80682:(e,t,n)=>{"use strict";n.d(t,{$m:()=>u,I1:()=>l,eF:()=>i,ec:()=>o,i1:()=>c,k3:()=>r,z9:()=>s});var a=n(27723);const __=a.__,r="NO_MEDIA_ERROR",s="FILE_TYPE_ERROR",o="FILE_SIZE_ERROR",i="VIDEO_LENGTH_TOO_LONG_ERROR",l="VIDEO_LENGTH_TOO_SHORT_ERROR",c="DIMENSION_ERROR";function u(e){return{[o]:__("File too big","jetpack"),[i]:__("Video too long","jetpack"),[l]:__("Video too short","jetpack"),[c]:__("Invalid dimensions","jetpack")}[e]||__("Invalid media","jetpack")}},52367:(e,t,n)=>{"use strict";n.d(t,{A:()=>d,c:()=>l});var a=n(86087),r=n(98420),s=n(49747),o=n(80682),i=n(2204);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(!i.nJ.includes(t))return!1;return!((n?n/Math.pow(1e3,2):0)>=55)},u=(e,t,n,a,r)=>{const s=i.mB[n]??i.EX;if(!e||0===Object.keys(e).length)return s.requiresMedia&&!r?o.k3:null;const{mime:c,fileSize:u}=e;if(!s.requiresMedia&&!a)return null;if(!c||!s.allowedMediaTypes.includes(c.toLowerCase()))return o.z9;if(!t?.width||!t?.height)return o.i1;const d=u?u/Math.pow(1e3,2):null;return l(c)?((e,t,n,a,r)=>{const{minSize:s=0,maxSize:l=i.TR,minLength:c=0,maxLength:u=i.TR,maxWidth:d=i.TR,aspectRatio:p=i.EX.video.aspectRatio}=r;if(!e||e>l||eu)return o.eF;const m=n/a;return mp.max||n>d?o.i1:null})(d,e.length,t.width,t.height,s.video):((e,t,n,a)=>{const{maxSize:r=i.TR,minWidth:s=0,maxWidth:l=i.TR,aspectRatio:c=i.EX.image.aspectRatio}=a,u=t/n;return uc.max||t>l||tr?o.ec:null})(d,t.width,t.height,s.image)},d=(e,t)=>{const{attachedMedia:n}=(0,r.A)(),{isEnabled:o}=(0,s.A)(),i=n.length>0,l=(0,a.useRef)({});return(0,a.useMemo)((()=>{const n=e.reduce(((e,{connection_id:n,service_name:a})=>{const r=u(t.metaData,t.mediaData,a,i,o&&"instagram-business"===a);return r&&(e[n]=r),e}),{});return JSON.stringify(n)!==JSON.stringify(l.current)&&(l.current=n),{validationErrors:l.current,isConvertible:c(t.metaData)}}),[e,t.metaData,t.mediaData,i,o])}},2204:(e,t,n)=>{"use strict";n.d(t,{EX:()=>h,TR:()=>m,UB:()=>v,mB:()=>g,nJ:()=>f});const a="video/mp4",r="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=[r,"video/avi","video/mpg","video/mpeg","video/m4v"],m=1e5,h={requiresMedia:!1,allowedMediaTypes:o.concat([a,s,r]),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([a,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([a,r,s]),image:{maxSize:20},video:{maxSize:500,maxLength:600}},linkedin:{allowedMediaTypes:o.concat([a,s]),image:{maxSize:20},video:{minSize:.075,maxSize:200,maxLength:600,minLength:3}},"instagram-business":{requiresMedia:!0,allowedMediaTypes:["image/jpg","image/jpeg",a,r,s],image:{maxSize:8,minWidth:320,maxWidth:1440,aspectRatio:{min:.8,max:1.91}},video:{maxLength:900,minLength:3,maxSize:1e3,maxWidth:1920,aspectRatio:{min:.01,max:10}}},mastodon:{allowedMediaTypes:c.concat([...u,a,s]),image:{maxSize:10},video:{maxSize:40}},nextdoor:{allowedMediaTypes:d.concat([...p,a,s]),image:{maxSize:10},video:{maxSize:500}}},f=["image/png","image/jpeg","image/jpg","image/heic","image/heif","image/webp"],v=[...new Set([...o,...i,...c,...l,...u,...f])]},38656:(e,t,n)=>{"use strict";n.d(t,{e:()=>i});var a=n(97999),r=n(47143),s=n(43656),o=n(27844);function i(){return!(0,r.useSelect)((e=>"jetpack-social-note"===e(s.store).getCurrentPostType()),[])&&(0,a.siteHasFeature)(o.q.IMAGE_GENERATOR)}},383:(e,t,n)=>{"use strict";n.d(t,{h:()=>i});var a=n(47143),r=n(43656),s=n(86087),o=n(70407);function i(){const{editPost:e}=(0,a.useDispatch)(r.store),t=(0,a.useSelect)((e=>{const t=e(r.store).getEditedPostAttribute("meta")||{},n=t.jetpack_publicize_feature_enabled??!0,a=t.jetpack_social_options||{};return{isPublicizeEnabled:n,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,o.getShareMessageMaxLength)())}}),[]),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,a)=>{n("jetpack_social_options",{...t.jetpackSocialOptions,[e]:a,version:2})}),[t.jetpackSocialOptions,n]);return(0,s.useMemo)((()=>({...t,togglePublicizeFeature:i,updateJetpackSocialOptions:l,updateMeta:n})),[t,i,l,n])}},57275:(e,t,n)=>{"use strict";n.d(t,{z:()=>o});var a=n(47143),r=n(43656),s=n(86087);function o(e){const t=(0,a.useSelect)((e=>e(r.store).isPublishingPost()),[]),[n,o]=(0,s.useState)(e),i=(0,s.useRef)(!1);return(0,s.useEffect)((()=>{t&&(i.current=!0),i.current||o(e)}),[t,e]),n}},77627:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var a=n(39384),r=n(85985),s=n(47143),o=n(43656),i=n(70407),l=n(383);const c="republicize";function u(){const e=!(0,r.d9)()&&!(0,r.Sy)()||(0,r.FB)(c)?.available,t=(0,s.useSelect)((e=>e(o.store).isCurrentPostPublished()),[]),{isUserConnected:n}=(0,a.useConnection)(),{urls:u}=(0,i.getSocialScriptData)(),{isPublicizeEnabled:d,togglePublicizeFeature:p,isPostAlreadyShared:m}=(0,l.h)(),h=(0,r.W4)(c)&&!e,g=t?e:d,f=t&&h,v=t&&!e,b=!n&&!(0,r.Sy)();return{isPublicizeEnabledMeta:d,isPublicizeEnabled:g,togglePublicizeFeature:p,isPublicizeDisabledBySitePlan:f,isRePublicizeFeatureAvailable:e,isRePublicizeUpgradableViaUpsell:h,hidePublicizeFeature:v,isPostAlreadyShared:m,isSocialImageGeneratorEnabled:!!(0,r.$i)()?.social?.isSocialImageGeneratorEnabled,connectionsPageUrl:u.connectionsManagementPage,needsUserConnection:b}}},88584:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(29491),r=n(86087),s=n(86212),o=n(50001);function i(){const e=(0,r.useRef)(!1),t=(0,r.useRef)(!0),n=(0,s.A)(),{refresh:i}=(0,o.A)(),l=(0,a.useDebounce)(i,0),c=(0,a.useDebounce)(i,2e3);return()=>{t.current&&(l(),t.current=!1),n||(e.current=!0,c.cancel()),n&&e.current&&(c(),e.current=!1)}}},38394:(e,t,n)=>{"use strict";n.d(t,{i:()=>o});var a=n(27723),r=n(16480),s=n(51609);const __=a.__;function o({onError:e,onSuccess:t}){const[n,a]=(0,s.useState)(!1),o=(0,s.useCallback)((async(n,s="image")=>{try{a(!0);const o=await fetch(n);if(!o.ok)return void e(new Error(__("Failed to download image.","jetpack"),{cause:o}));const i=await o.blob(),l=new File([i],s,{type:i.type});await(0,r.uploadMedia)({filesList:[l],onFileChange:([e])=>{void 0!==e.id&&(t(e),a(!1))},onError:t=>{e(new Error(__("Failed to save image to library.","jetpack"),{cause:t})),a(!1)},maxUploadFileSize:0})}catch(t){e(new Error(__("Failed to save image to library.","jetpack"),{cause:t}))}finally{a(!1)}}),[e,t]);return(0,s.useMemo)((()=>({isSaving:n,save:o})),[n,o])}},49036:(e,t,n)=>{"use strict";n.d(t,{Wv:()=>l,_D:()=>i});var a=n(29491),r=n(47143),s=n(43656),o=n(86087);function i(e,t){const n=(0,r.useSelect)((e=>e(s.store).isPublishingPost()),[]),i=(0,a.usePrevious)(n);(0,o.useEffect)((()=>{i&&!n&&e()}),[n,i,e,t])}function l(e,t){const n=(0,r.useSelect)((e=>e(s.store).isPublishingPost()),[]),i=(0,a.usePrevious)(n);(0,o.useEffect)((()=>{!i&&n&&e()}),[n,i,e,t])}},31873:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var a=n(1455),r=n.n(a),s=n(47143),o=n(43656),i=n(86087),l=n(27723),c=n(50001),u=n(39553),d=n(51371);const __=l.__;function p(e){const t=e?.code,n=e?.errors?.length;if(!t&&!n)return!1;let a="";return t&&(a=__("Unable to share the Post","jetpack")),n&&(a=__("Unable to share the Post","jetpack")),{message:a,result:e}}function m(e){const{message:t}=(0,u.A)(),{skippedConnections:n}=(0,c.A)(),a=(0,s.useSelect)((e=>e(o.store).getCurrentPostId()),[]);e=e||a;const[l,m]=(0,i.useState)({data:[],error:{}}),h=(0,d.n)().api_paths.resharePost.replace("{postId}",e),g=(0,i.useCallback)((async function(a=null){const s={isFetching:!1,isError:!1,isSuccess:!1,data:[],error:{},postId:e};if(l.isFetching)return;const o=a||n;return m({...s,isFetching:!0}),await r()({path:h,method:"POST",data:{message:t,skipped_connections:o,async:!0}}).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(s)}}),[e,t,n,l.isFetching,h]);return{...l,doPublicize:g}}},50001:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(47143),r=n(31963);function s(){const{refreshConnectionTestResults:e,toggleConnectionById:t}=(0,a.useDispatch)(r.M_);return{...(0,a.useSelect)((e=>{const t=e(r.M_),n=t.getConnections(),a=t.getEnabledConnections(),s=t.getDisabledConnections().map((e=>e.connection_id));return{connections:n,hasConnections:n.length>0,hasEnabledConnections:a.length>0,skippedConnections:s,enabledConnections:a}}),[]),toggleById:t,refresh:e}}},39553:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(70407),r=n(383);function s(){const{updateMeta:e,shareMessage:t}=(0,r.h)();return{message:t,maxLength:(0,a.getShareMessageMaxLength)(),updateMessage:function(t){e("jetpack_publicize_message",t)}}}},75168:(e,t,n)=>{"use strict";n.d(t,{F:()=>i});var a=n(47143),r=n(43656),s=n(31963),o=n(49036);function i(){const{mergeConnections:e}=(0,a.useDispatch)(s.M_),{didPostSaveRequestSucceed:t,isCurrentPostPublished:n,getEditedPostAttribute:i}=(0,a.useSelect)((e=>e(r.store)),[]);(0,o._D)((()=>{if(t()&&n()){const t=i("jetpack_publicize_connections");t?.length&&e(t)}}),[t,n,i])}},38716:(e,t,n)=>{"use strict";n.r(t),n.d(t,{abortRefreshConnectionsRequest:()=>k,abortRequest:()=>b,addConnection:()=>m,closeConnectionsModal:()=>B,createAbortController:()=>f,createConnection:()=>j,deleteConnection:()=>_,deleteConnectionById:()=>A,deletingConnection:()=>C,mergeConnections:()=>g,openConnectionsModal:()=>T,refreshConnectionTestResults:()=>y,removeAbortControllers:()=>v,setConnections:()=>d,setKeyringResult:()=>p,setReconnectingAccount:()=>R,syncConnectionsToPostMeta:()=>E,toggleConnection:()=>h,toggleConnectionById:()=>w,toggleConnectionsModal:()=>L,updateConnection:()=>S,updateConnectionById:()=>P,updatingConnection:()=>N});var a=n(692),r=n(1455),s=n.n(r),o=n(47143),i=n(43656),l=n(27723),c=n(51371),u=n(54118);const __=l.__;function d(e){return{type:u.dA,connections:e}}function p(e){return{type:u.BN,keyringResult:e}}function m(e){return{type:u.Bc,connection:e}}function h(e){return{type:u.af,connectionId:e}}function g(e){return function({dispatch:t,select:n}){const a=n.getConnections(),r=[],s={done:!1,enabled:!0,toggleable:!0};for(const t of e){const e=a.find((e=>e.connection_id?e.connection_id===t.connection_id:e.id===t.id)),n={...s,...e,...t,shared:e?.shared,is_healthy:t.test_success};r.push(n)}t(d(r))}}function f(e,t){return{type:u.WB,requestType:t,abortController:e}}function v(e){return{type:u.Wp,requestType:e}}function b(e){return function({dispatch:t,select:n}){const a=n.getAbortControllers(e);for(const e of a)e.abort();t(v(e))}}function k(){return b(u.rz)}function y(e=!1){return async function({dispatch:t,select:n}){try{const a=(0,c.n)().api_paths.refreshConnections;for(;n.getUpdatingConnections().length>0||n.getDeletingConnections().length>0;)await new Promise((e=>setTimeout(e,100)));const r=new AbortController;t(f(r,u.rz));t(g(await s()({path:a,signal:r.signal}))),e&&t(E())}catch(n){"AbortError"===n.name&&t(y(e))}}}function E(){return function({registry:e,select:t}){const n=t.getConnections();return e.dispatch(i.store).editPost({jetpack_publicize_connections:n})}}function w(e,t=!0){return function({dispatch:n}){n(h(e)),t&&n(E())}}function _(e){return{type:u.nC,connectionId:e}}function C(e,t=!0){return{type:u.WH,connectionId:e,deleting:t}}function A({connectionId:e,showSuccessNotice:t=!0}){return async function({registry:n,dispatch:r}){const{createErrorNotice:l,createSuccessNotice:c}=(0,o.dispatch)(a.store);try{const a=`/jetpack/v4/social/connections/${e}`;return r(k()),r(C(e)),await s()({method:"DELETE",path:a}),r(_(e)),t&&c(__("Account disconnected successfully.","jetpack"),{type:"snackbar",isDismissible:!0}),n.select(i.store).getCurrentPostId()&&r(E()),!0}catch(e){let t=__("Error disconnecting account.","jetpack");"object"==typeof e&&"message"in e&&e.message&&(t=`${t} ${e.message}`),l(t,{type:"snackbar",isDismissible:!0})}finally{r(C(e,!1))}return!1}}let x=1;function j(e,t={}){return async function({registry:n,dispatch:r}){const{createErrorNotice:c,createSuccessNotice:u}=(0,o.dispatch)(a.store),d="new-"+ ++x;try{const a="/jetpack/v4/social/connections/";r(m({connection_id:d,...t})),r(k()),r(N(d));const o=await s()({method:"POST",path:a,data:e});o&&(r(S(d,{...o,can_disconnect:!0,enabled:!0})),u((0,l.sprintf)(/* translators: %s is the name of the social media platform e.g. "Facebook" */ -__("%s account connected successfully.","jetpack"),o.label),{type:"snackbar",isDismissible:!0}),n.select(i.store).getCurrentPostId()&&r(E()))}catch(e){let t=__("Error connecting account.","jetpack");"object"==typeof e&&"message"in e&&e.message&&(t=`${t} ${e.message}`),c(t,{type:"snackbar",isDismissible:!0})}finally{r(N(d,!1)),r(_(d))}}}function S(e,t){return{type:u.dw,connectionId:e,data:t}}function N(e,t=!0){return{type:u._6,connectionId:e,updating:t}}function R(e){return{type:u.Nv,reconnectingAccount:e}}function P(e,t){return async function({dispatch:n,select:r}){const{createErrorNotice:i,createSuccessNotice:l}=(0,o.dispatch)(a.store),c=r.getConnectionById(e);try{const a=`/jetpack/v4/social/connections/${e}`;n(k()),n(S(e,t)),n(N(e));await s()({method:"POST",path:a,data:t})&&l(__("Account updated successfully.","jetpack"),{type:"snackbar",isDismissible:!0})}catch(t){let a=__("Error updating account.","jetpack");"object"==typeof t&&"message"in t&&t.message&&(a=`${a} ${t.message}`),n(S(e,c)),i(a,{type:"snackbar",isDismissible:!0})}finally{n(N(e,!1))}}}function L(e){return{type:u.xW,isOpen:e}}function T(){return L(!0)}function B(){return L(!1)}},54118:(e,t,n)=>{"use strict";n.d(t,{BN:()=>d,Bc:()=>r,M6:()=>k,Nv:()=>u,WB:()=>m,WH:()=>i,Wp:()=>h,_6:()=>c,_y:()=>b,aF:()=>y,af:()=>s,b5:()=>g,dA:()=>a,dw:()=>l,fz:()=>v,nC:()=>o,rz:()=>f,xW:()=>p});const a="SET_CONNECTIONS",r="ADD_CONNECTION",s="TOGGLE_CONNECTION",o="DELETE_CONNECTION",i="DELETING_CONNECTION",l="UPDATE_CONNECTION",c="UPDATING_CONNECTION",u="SET_RECONNECTING_ACCOUNT",d="SET_KEYRING_RESULT",p="TOGGLE_CONNECTIONS_MODAL",m="ADD_ABORT_CONTROLLER",h="REMOVE_ABORT_CONTROLLERS",g="DEFAULT",f="REFRESH_CONNECTIONS",v="FETCH_POST_SHARE_STATUS",b="RECEIVE_POST_SHARE_STATUS",k="TOGGLE_SHARE_STATUS_MODAL",y="POLLING_FOR_POST_SHARE_STATUS"},62491:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(38716),r=n(72451),s=n(64236),o=n(33134);const i={...r,...a,...s,...n(83117),...o}},72451:(e,t,n)=>{"use strict";n.r(t),n.d(t,{closeShareStatusModal:()=>c,defaultIsRequestComplete:()=>u,fetchPostShareStatus:()=>s,openShareStatusModal:()=>l,pollForPostShareStatus:()=>h,pollingForPostShareStatus:()=>m,receivePostShareStaus:()=>o,toggleShareStatusModal:()=>i});var a=n(43656),r=n(54118);function s(e,t=!0){return{type:r.fz,postId:e,loading:t}}function o(e,t){return{type:r._y,shareStatus:e,postId:t}}function i(e){return{type:r.M6,isOpen:e}}function l(){return i(!0)}function c(){return i(!1)}const u=({lastTimestamp:e,postShareStatus:t})=>e?t.shares.some((t=>t.timestamp>e)):t.shares.length>0,d=6e4,p=3e3;function m(e,t=!0){return{type:r.aF,postId:e,polling:t}}function h({pollingInterval:e=p,postId:t,isRequestComplete:n=u,timeout:r=d}={}){return async function({dispatch:s,select:o,registry:i}){const l=Date.now(),c=t||i.select(a.store).getCurrentPostId(),u=o.getPostShareStatus(c).shares[0]?.timestamp||0;let d=!1,p=!1;s(m(c));do{o.getPostShareStatus(c).loading||s.invalidateResolution("getPostShareStatus",[c]),await new Promise((t=>setTimeout(t,e))),d=n({lastTimestamp:u,postShareStatus:o.getPostShareStatus(c)}),p=Date.now()-l>r}while(!d&&!p);s(m(c,!1))}}},64236:(e,t,n)=>{"use strict";n.r(t),n.d(t,{updateSocialImageGeneratorConfig:()=>s});var a=n(3582),r=n(75238);function s(e){return async function({registry:t}){const{saveSite:n}=t.dispatch(a.store);await n({[r.A]:e})}}},33134:(e,t,n)=>{"use strict";n.r(t),n.d(t,{updateSocialPluginSettings:()=>r});var a=n(3582);function r(e){return async function({registry:t}){const{saveEntityRecord:n}=t.dispatch(a.store);await n("jetpack/v4","social/settings",e)}}},83117:(e,t,n)=>{"use strict";n.r(t),n.d(t,{updateUtmSettings:()=>s});var a=n(3582),r=n(75238);function s(e){return async function({registry:t}){const{saveSite:n}=t.dispatch(a.store);await n({[r.b]:e})}}},75238:(e,t,n)=>{"use strict";n.d(t,{A:()=>a,b:()=>r});const a="jetpack_social_image_generator_settings",r="jetpack_social_utm_settings"},31963:(e,t,n)=>{"use strict";n.d(t,{Af:()=>c,BB:()=>k,M_:()=>y,PX:()=>b,V6:()=>h,bN:()=>p,gt:()=>m,me:()=>v,s:()=>d,zW:()=>g,zk:()=>f});var a=n(47143),r=n(70407),s=n(62491),o=n(708),i=n(75772),l=n(62146);const c="jetpack-social-plugin",u={reducer:o.A,actions:s.A,selectors:l.A,resolvers:i.Ay,initialState:(0,r.getSocialScriptData)()?.store_initial_state},d="facebook",p="instagram-business",m="linkedin",h="mastodon",g="bluesky",f="nextdoor",v="tumblr",b="twitter",k="threads",y=(0,a.createReduxStore)(c,u);(0,a.register)(y)},62015:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(54118);const r=(e={connections:[]},t)=>{switch(t.type){case a.xW:return{...e,isConnectionsModalOpen:t.isOpen};case a.Bc:return{...e,connections:[...e.connections,t.connection]};case a.dA:return{...e,connections:t.connections};case a.nC:return{...e,connections:e.connections.filter((({connection_id:e})=>e!==t.connectionId))};case a.WH:{const n=new Set(e.deletingConnections);return t.deleting?n.add(t.connectionId):n.delete(t.connectionId),{...e,deletingConnections:[...n]}}case a.Nv:return{...e,reconnectingAccount:t.reconnectingAccount};case a.dw:return{...e,connections:e.connections.map((e=>e.connection_id===t.connectionId?{...e,...t.data}:e))};case a._6:{const n=new Set(e.updatingConnections);return t.updating?n.add(t.connectionId):n.delete(t.connectionId),{...e,updatingConnections:[...n]}}case a.WB:{const n=t.requestType||a.b5;return{...e,abortControllers:{...e.abortControllers,[n]:[...e.abortControllers?.[n]||[],t.abortController]}}}case a.Wp:{const n=t.requestType||a.b5;return{...e,abortControllers:{...e.abortControllers,[n]:[]}}}case a.BN:return{...e,keyringResult:t.keyringResult};case a.af: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}},708:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(47143),r=n(62015),s=n(53202);const o=(0,a.combineReducers)({connectionData:r.A,shareStatus:s.q})},53202:(e,t,n)=>{"use strict";n.d(t,{q:()=>r});var a=n(54118);function r(e={},t){switch(t.type){case a.fz:return{...e,[t.postId]:{shares:[],...e?.[t.postId],loading:t.loading??!0}};case a.aF:return{...e,[t.postId]:{shares:[],...e?.[t.postId],polling:t.polling??!0}};case a._y:return{...e,[t.postId]:{...e?.[t.postId],...t.shareStatus,loading:!1}};case a.M6:return{...e,isModalOpen:t.isOpen}}return e}},75772:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>p});var a=n(1455),r=n.n(a),s=n(3582),o=n(43656),i=n(27723),l=n(51371),c=n(59061),u=n(38716),d=n(72451);const __=i.__;const p={getConnections:function(){return function({dispatch:e,registry:t}){const n=t.select(o.store);if(!n.getCurrentPostId())return;const a=n.getEditedPostAttribute("jetpack_publicize_connections");e((0,u.setConnections)(a||[]))}},getPostShareStatus:function(e){return async({dispatch:t,registry:n})=>{const a=e||n.select(o.store).getCurrentPostId(),{feature_flags:s}=(0,l.n)();if(s.useShareStatus)try{t((0,d.fetchPostShareStatus)(a));let e=await r()({path:`jetpack/v4/social/share-status/${a}`});e=(0,c.xA)(e),t((0,d.receivePostShareStaus)(e,a))}catch{t((0,d.fetchPostShareStatus)(a,!1))}}},getSocialPluginSettings:function(){return async({registry:e})=>{e.select(s.store).getEntitiesConfig("jetpack/v4").some((({name:e})=>"social/settings"===e))||await e.dispatch(s.store).addEntities([{kind:"jetpack/v4",name:"social/settings",baseURL:"/jetpack/v4/social/settings",label:__("Social Settings","jetpack")}])}}}},28343:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getAbortControllers:()=>b,getBrokenConnections:()=>i,getConnectionById:()=>o,getConnectionProfileDetails:()=>h,getConnections:()=>s,getConnectionsByService:()=>l,getDeletingConnections:()=>g,getDisabledConnections:()=>m,getEnabledConnections:()=>p,getFailedConnections:()=>u,getKeyringResult:()=>E,getMustReauthConnections:()=>d,getReconnectingAccount:()=>v,getUpdatingConnections:()=>f,hasConnections:()=>c,isBlueskyAccountAlreadyConnected:()=>y,isConnectionsModalOpen:()=>w,isMastodonAccountAlreadyConnected:()=>k});var a=n(50384),r=n(54118);function s(e){return e.connectionData?.connections??[]}function o(e,t){return s(e).find((e=>e.connection_id===t))}function i(e){return s(e).filter((e=>"broken"===e.status||(0,a.Y)(e,"broken")))}function l(e,t){return s(e).filter((({service_name:e})=>e===t))}function c(e){return s(e).length>0}function u(e){return s(e).filter((e=>!1===e.test_success))}function d(e){return s(e).filter((e=>"must_reauth"===e.test_success)).map((e=>e.service_name))}function p(e){return s(e).filter((e=>e.enabled))}function m(e){return s(e).filter((e=>!e.enabled))}function h(e,t,{forceDefaults:n=!1}={}){let a="",r="",o="";if(!n){const n=s(e).find((({service_name:e})=>t===e));if(n){const{display_name:e,profile_display_name:s,profile_picture:i,external_display:l,external_name:c}=n;a="twitter"===t?s:e||l,o="twitter"===t?e:n.username,r=i,"bluesky"===t&&(o=c)}}return{displayName:a,profileImage:r,username:o}}function g(e){return e.connectionData?.deletingConnections??[]}function f(e){return e.connectionData?.updatingConnections??[]}function v(e){return e.connectionData?.reconnectingAccount}function b(e,t=r.b5){return e.connectionData?.abortControllers?.[t]??[]}function k(e,t){return l(e,"mastodon").some((e=>e.external_display===t))}function y(e,t){return l(e,"bluesky").some((e=>e.external_name===t))}function E(e){return e.connectionData?.keyringResult}function w(e){return e.connectionData?.isConnectionsModalOpen??!1}},62146:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var a=n(3582),r=n(47143),s=n(28343),o=n(49424),i=n(59379),l=n(68273),c=n(86982);const u={...s,...o,isSavingSiteSettings:(0,r.createRegistrySelector)((e=>()=>e(a.store).isSavingEntityRecord("root","site",void 0))),...i,...c,...l}},49424:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getPostShareStatus:()=>s,isShareStatusModalOpen:()=>o});var a=n(47143),r=n(43656);const s=(0,a.createRegistrySelector)((e=>(t,n)=>{const a=n||e(r.store).getCurrentPostId();return t.shareStatus?.[a]??{shares:[]}}));function o(e){return e.shareStatus?.isModalOpen??!1}},59379:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getSocialImageGeneratorConfig:()=>i});var a=n(3582),r=n(47143),s=n(70407),o=n(75238);const i=(0,r.createRegistrySelector)((e=>()=>{const{getSite:t}=e(a.store),n=t(void 0,{_fields:o.A});return n?.[o.A]??(0,s.getSocialScriptData)().settings.socialImageGenerator}))},68273:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getSocialPluginSettings:()=>o,isSavingSocialPluginSettings:()=>i});var a=n(3582),r=n(47143),s=n(70407);const o=(0,r.createRegistrySelector)((e=>()=>e(a.store).getEntityRecord("jetpack/v4","social/settings",void 0)??(0,s.getSocialScriptData)().settings.socialPlugin)),i=(0,r.createRegistrySelector)((e=>()=>e(a.store).isSavingEntityRecord("jetpack/v4","social/settings",void 0)))},86982:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getUtmSettings:()=>i});var a=n(3582),r=n(47143),s=n(70407),o=n(75238);const i=(0,r.createRegistrySelector)((e=>()=>{const{getSite:t}=e(a.store),n=t(void 0,{_fields:o.b});return n?.[o.b]??(0,s.getSocialScriptData)().settings.utmSettings}))},50384:(e,t,n)=>{"use strict";n.d(t,{Y:()=>a});const a=(e,t)=>!1===e.is_healthy&&t===(e.error_code??"broken")},27844:(e,t,n)=>{"use strict";n.d(t,{q:()=>a});const a={ENHANCED_PUBLISHING:"social-enhanced-publishing",IMAGE_GENERATOR:"social-image-generator"}},12093:(e,t,n)=>{"use strict";n.d(t,{T:()=>r});const a=255;function r(){return a}},3280:(e,t,n)=>{"use strict";n.d(t,{n:()=>r});var a=n(85985);function r(){return(0,a.$i)()?.social?.supportedAdditionalConnections||[]}},70407:(e,t,n)=>{"use strict";n.d(t,{getShareMessageMaxLength:()=>a.T,getSocialScriptData:()=>i.n,getSupportedAdditionalConnections:()=>r.n,hasSocialPaidFeatures:()=>i.p,requestExternalAccess:()=>s.x});var a=n(12093),r=n(3280),s=n(5367),o=n(18672);n.o(o,"GlobalModals")&&n.d(t,{GlobalModals:function(){return o.GlobalModals}}),n.o(o,"getSocialScriptData")&&n.d(t,{getSocialScriptData:function(){return o.getSocialScriptData}}),n.o(o,"hasSocialPaidFeatures")&&n.d(t,{hasSocialPaidFeatures:function(){return o.hasSocialPaidFeatures}}),n.o(o,"usePostCanUseSig")&&n.d(t,{usePostCanUseSig:function(){return o.usePostCanUseSig}}),n.o(o,"useSyncPostDataToStore")&&n.d(t,{useSyncPostDataToStore:function(){return o.useSyncPostDataToStore}});var i=n(51371);n(27844)},5367:(e,t,n)=>{"use strict";n.d(t,{x:()=>r});var a=n(51119);const r=(e,t)=>{const n=new a.A;let r;n.open(e,null,"toolbar=0,location=0,status=0,menubar=0,"+n.getScreenCenterSpecs(780,700)),n.once("close",(()=>{t(r?.ID?r:{})})),n.on("message",(e=>{r=e?.data}))}},51371:(e,t,n)=>{"use strict";n.d(t,{n:()=>r,p:()=>s});var a=n(97999);function r(){return(0,a.getScriptData)()?.social}function s(){return(0,a.siteHasFeature)("social-enhanced-publishing")}},59061:(e,t,n)=>{"use strict";function a(e){return e&&"shares"in e&&e.done&&e.shares.sort(((e,t)=>t.timestamp-e.timestamp)),e}function r(e){return t=>t.service_name===e.service&&(e.external_id?t.external_id===e.external_id:t.connection_id===e.connection_id.toString())}function s(e,t){return e.service===t.service&&(e.connection_id===t.connection_id||!(!e.external_id&&!t.external_id)&&e.external_id===t.external_id)}n.d(t,{Ri:()=>s,eJ:()=>r,xA:()=>a})},50646:(e,t,n)=>{"use strict";n(51371)},18672:()=>{},85985:(e,t,n)=>{"use strict";n.d(t,{$i:()=>a.A,BT:()=>l.A,Cq:()=>h.C,Dk:()=>c.Dk,FB:()=>o.A,GE:()=>r.A,GT:()=>c.GT,Q4:()=>c.Q4,Sy:()=>s.Sy,W4:()=>c.W4,aq:()=>c.aq,d9:()=>s.d9,gB:()=>u.A,jt:()=>m.A,lk:()=>s.lk,pP:()=>s.pP,q7:()=>p.A,sH:()=>c.sH,sh:()=>h.s,st:()=>d.A,tu:()=>c.tu,vp:()=>i.A});var a=n(34972),r=n(54815),s=n(62634),o=n(60703),i=n(82034),l=n(65595),c=n(53265),u=n(49354),d=n(73489),p=n(76923),m=n(15877),h=n(30335);n(88290)},15877:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(67142),r=n(51609),s=n.n(r);const o=()=>s().createElement(a.A,{className:"jetpack-editor-panel-logo",height:16,logoColor:"#1E1E1E",showText:!1})},30335:(e,t,n)=>{"use strict";n.d(t,{C:()=>o,s:()=>s});var a=n(86087),r=n(19334);function s(e){const t={};let n="span",r=e.icon;const s=document.createElement("div");s.innerHTML=e.icon;const o=s.querySelector("svg");return o&&(n="svg",r=o.innerHTML,Array.from(o.attributes).forEach((({nodeName:e,nodeValue:n})=>t[e]=n))),(0,a.createElement)(n,{...t,dangerouslySetInnerHTML:{__html:r||""}})}function o(e){return{src:s(e),foreground:(0,r.A)()}}},19334:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(62634);const r="#069e08";function s(){return(0,a.d9)()||(0,a.Sy)()?null:r}},34972:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const a="Jetpack_Editor_Initial_State";function r(){return"object"==typeof window?window?.[a]??null:null}},60703:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(34972);function r(e){const t=(0,a.A)(),n=t?.available_blocks?.[e]?.available??!1,r=t?.available_blocks?.[e]?.unavailable_reason??"unknown";return{available:n,...!n&&{details:t?.available_blocks?.[e]?.details??[],unavailableReason:r}}}},54815:(e,t,n)=>{"use strict";function a(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:null}n.d(t,{A:()=>a})},73489:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(90372),r=n(39384),s=n(86087);const{tracks:o}=a.A,{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,r.useConnection)(),{wpcomUser:{login:h,ID:g}={},blogId:f}=m.currentUser||{},v=(0,s.useCallback)((async(e,t={})=>{d&&g&&h&&i(e,t)}),[d,g,h]);return(0,s.useEffect)((()=>{d&&g&&h&&f&&a.A.initialize(g,h,{blog_id:f})}),[f,g,h,d]),(0,s.useEffect)((()=>{const a=e?`${t}_${e}_${n}`:null;p&&a&&(c||(v(a,l),u(!0)))}),[c,t,e,n,p,l,v]),{recordEvent:v,tracks:o}}},76923:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(47143),r=n(86087),s=n(88290);const o=e=>{const{isModuleActive:t,isChangingStatus:n,isLoadingModules:o}=(0,a.useSelect)((t=>{const n=t(s.F);return{isModuleActive:n.isModuleActive(e),isChangingStatus:n.isModuleUpdating(e),isLoadingModules:n.areModulesLoading(e)}}),[e]),{updateJetpackModuleStatus:i}=(0,a.useDispatch)(s.F),l=(0,r.useCallback)((t=>i({name:e,active:t})),[e,i]);return(0,r.useMemo)((()=>({isLoadingModules:o,isChangingStatus:n,isModuleActive:t,changeStatus:l})),[o,n,t,l])}},49354:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(34972);function r(){return(0,a.A)()?.jetpack?.is_current_user_connected??!1}},27105:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>d,E9:()=>u});var a=n(47143),r=n(62634),s=n(94478),o=n(88290);const i="SET_JETPACK_MODULES";function l(e){return u({isLoading:e})}function c(e,t){return{type:"SET_MODULE_UPDATING",name:e,isUpdating:t}}function u(e){return{type:i,options:e}}const d={updateJetpackModuleStatus:function*(e){try{yield c(e.name,!0),yield(0,s.sB)(e);const t=yield(0,s.wz)();return yield u({data:t}),!0}catch{const e=(0,a.select)(o.F).getJetpackModules();return yield u(e),!1}finally{yield c(e.name,!1)}},setJetpackModules:u,fetchModules:function*(){if((0,r.Sy)())return!0;try{yield l(!0);const e=yield(0,s.wz)();return yield u({data:e}),!0}catch{const e=(0,a.select)(o.F).getJetpackModules();return yield u(e),!1}finally{yield l(!1)}}}},94478:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>c,sB:()=>l,wz:()=>i});var a=n(1455),r=n.n(a);const s="FETCH_JETPACK_MODULES",o="UPDATE_JETPACK_MODULE_STATUS",i=()=>({type:s}),l=e=>({type:o,settings:e}),c={[s]:function(){return r()({path:"/jetpack/v4/module/all",method:"GET"})},[o]:function({settings:e}){return r()({path:`/jetpack/v4/module/${e.name}/active`,method:"POST",data:{active:e.active}})}}},88290:(e,t,n)=>{"use strict";n.d(t,{F:()=>c});var a=n(47143),r=n(27105),s=n(94478),o=n(38862),i=n(62701),l=n(31640);const c="jetpack-modules",u=(0,a.createReduxStore)(c,{reducer:o.A,actions:r.Ay,controls:s.Ay,resolvers:i.A,selectors:l.A});(0,a.register)(u);const d=window?.Initial_State?.getModules||window?.Jetpack_Editor_Initial_State?.modules||null;null!==d&&(0,a.dispatch)(c).setJetpackModules({data:{...d}})},38862:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const a={isLoading:!1,isUpdating:{},data:{}},r=(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}},62701:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(27105),r=n(94478);const s={getJetpackModules:function*(){try{const e=yield(0,r.wz)();if(e)return(0,a.E9)({data:e})}catch(e){console.error(e)}}}},31640:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(62634);const r={getJetpackModules:e=>e.data,isModuleActive:(e,t)=>(0,a.Sy)()||(e?.data?.[t]?.activated??!1),areModulesLoading:e=>e.isLoading??!1,isModuleUpdating:(e,t)=>e?.isUpdating?.[t]??!1}},53265:(e,t,n)=>{"use strict";n.d(t,{Dk:()=>g,GT:()=>v,Q4:()=>u,W4:()=>d,aq:()=>p,sH:()=>f,tu:()=>m});var a=n(27723),r=n(93832),s=n(66087),o=n(34972),i=n(60703),l=n(54815),c=n(62634);const __=a.__;function u({planSlug:e,plan:t,postId:n,postType:a}){const o=(0,s.startsWith)(e,"jetpack_")?e:(0,s.get)(t,["path_slug"]),i=(void 0===a?()=>{const e=new URLSearchParams(window.location.search);return(0,r.addQueryArgs)(window.location.protocol+`//${(0,l.A)().replace("::","/")}/wp-admin/site-editor.php`,{postId:e.get("postId"),postType:e.get("postType"),plan_upgraded:1})}:()=>{const e=["page","post"].includes(a)?"":"edit";return(0,c.Sy)()?(0,r.addQueryArgs)("/"+(0,s.compact)([e,a,(0,l.A)(),n]).join("/"),{plan_upgraded:1}):(0,r.addQueryArgs)(window.location.protocol+`//${(0,l.A)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:n,plan_upgraded:1})})();return(0,c.d9)()?(0,r.addQueryArgs)(`https://wordpress.com/plans/${(0,l.A)()}`,{redirect_to:i,customerType:"business"}):o&&(0,r.addQueryArgs)(`https://wordpress.com/checkout/${(0,l.A)()}/${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:a}=(0,i.A)(t);return!n&&"missing_plan"===a}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:a}=(0,i.A)(t);return p(a,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.A)(),"jetpack.enable_upgrade_nudge",!1)}const f=e=>(0,s.map)(h,"name").includes(e),v=e=>(0,s.head)((0,s.filter)(h,(({name:t})=>t===e)))},82034:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(92279),r=n(60703);function s(e,t){const{available:n,unavailableReason:s}=(0,r.A)(e);return!!n&&(0,a.registerPlugin)(`jetpack-${e}`,t)}},62634:(e,t,n)=>{"use strict";n.d(t,{Sy:()=>s,d9:()=>o,lk:()=>l,pP:()=>i});var a=n(34972);function r(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function s(){return"simple"===r()}function o(){return"atomic"===r()}function i(){const e=(0,a.A)();return e?.jetpack?.is_private_site??!1}function l(){const e=(0,a.A)();return e?.jetpack?.is_coming_soon??!1}},65595:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(96072),r=n.n(a),s=n(29491);const o=e=>(0,s.createHigherOrderComponent)((t=>n=>React.createElement(t,r()({},n,{className:n.name===e?"has-warning is-interactive":n.className}))),"withHasWarningIsInteractiveClassNames")},84705:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>r});var a=n(58992);n(91135);const r=a.d},91135:(e,t,n)=>{"use strict";n.d(t,{$:()=>a});const a=[{name:"amazon",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M13.582 8.182c-1.648.185-3.802.308-5.344.984-1.781.769-3.03 2.337-3.03 4.644 0 2.953 1.86 4.429 4.253 4.429 2.02 0 3.125-.477 4.685-2.065.516.747.685 1.109 1.629 1.894a.59.59 0 0 0 .672-.066l.006.006c.567-.505 1.599-1.401 2.18-1.888.231-.188.19-.496.009-.754-.52-.718-1.072-1.303-1.072-2.634V8.305c0-1.876.133-3.599-1.249-4.891C15.23 2.369 13.422 2 12.04 2 9.336 2 6.318 3.01 5.686 6.351c-.068.355.191.542.423.594l2.754.298c.258-.013.445-.266.494-.523.236-1.151 1.2-1.706 2.284-1.706.584 0 1.249.215 1.595.738.398.584.346 1.384.346 2.061zm-.533 5.906c-.451.8-1.169 1.291-1.967 1.291-1.09 0-1.728-.83-1.728-2.061 0-2.42 2.171-2.86 4.227-2.86v.615c.001 1.108.027 2.031-.532 3.015m7.634 5.251C18.329 21.076 14.917 22 11.979 22c-4.118 0-7.826-1.522-10.632-4.057-.22-.199-.024-.471.241-.317 3.027 1.762 6.771 2.823 10.639 2.823 2.608 0 5.476-.541 8.115-1.66.397-.169.73.262.341.55m.653 1.704c-.194.163-.379.076-.293-.139.284-.71.92-2.298.619-2.684s-1.99-.183-2.749-.092c-.23.027-.266-.173-.059-.319 1.348-.946 3.555-.673 3.811-.356.26.32-.066 2.533-1.329 3.59"})))},{name:"behance",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M7.799 5.698c.589 0 1.12.051 1.606.156q.722.155 1.241.507.516.351.804.938c.188.387.281.871.281 1.443q0 .93-.421 1.551-.424.62-1.255 1.014 1.133.328 1.689 1.146.559.822.557 1.975 0 .935-.359 1.612a3.14 3.14 0 0 1-.973 1.114q-.613.432-1.399.637A6.1 6.1 0 0 1 7.963 18H2V5.698zm-.35 4.97q.721 0 1.192-.345.465-.344.463-1.119 0-.43-.152-.707a1.1 1.1 0 0 0-.416-.427 1.7 1.7 0 0 0-.596-.216 3.6 3.6 0 0 0-.697-.06H4.709v2.874zm.151 5.237q.401.001.759-.077c.243-.053.457-.137.637-.261.182-.12.332-.283.441-.491q.164-.31.163-.798-.002-.948-.533-1.357c-.356-.27-.83-.404-1.413-.404H4.709v3.388zm8.562-.041q.552.538 1.583.538.74 0 1.277-.374c.354-.248.571-.514.654-.79h2.155c-.347 1.072-.872 1.838-1.589 2.299-.708.463-1.572.693-2.58.693q-1.05 0-1.899-.337a4 4 0 0 1-1.439-.958 4.4 4.4 0 0 1-.904-1.484 5.4 5.4 0 0 1-.32-1.899q0-1 .329-1.863a4.4 4.4 0 0 1 .933-1.492q.607-.63 1.444-.994a4.6 4.6 0 0 1 1.857-.363q1.131-.001 1.98.44a3.94 3.94 0 0 1 1.389 1.181 4.8 4.8 0 0 1 .783 1.69q.24.947.171 1.983h-6.428c-.001.706.237 1.372.604 1.73m2.811-4.68c-.291-.321-.783-.496-1.384-.496q-.585 0-.973.2a2 2 0 0 0-.621.491 1.8 1.8 0 0 0-.328.628 2.7 2.7 0 0 0-.111.587h3.98c-.058-.625-.271-1.085-.563-1.41m-3.916-3.446h4.985V6.524h-4.985z"})))},{name:"blogger-alt",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M19.779 9.904h-.981l-.021.001a1.163 1.163 0 0 1-1.16-1.079l-.001-.013A5.813 5.813 0 0 0 11.803 3H8.871a5.813 5.813 0 0 0-5.813 5.813v6.375a5.813 5.813 0 0 0 5.813 5.813h6.257a5.814 5.814 0 0 0 5.813-5.813l.002-4.121a1.164 1.164 0 0 0-1.164-1.163M8.726 7.713h3.291a1.117 1.117 0 1 1 0 2.234H8.726a1.117 1.117 0 1 1 0-2.234m6.601 8.657H8.72a1.057 1.057 0 1 1 0-2.114h6.607a1.057 1.057 0 1 1 0 2.114"})))},{name:"blogger",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M14.722 14.019a.654.654 0 0 1-.654.654H9.977a.654.654 0 0 1 0-1.308h4.091c.361 0 .654.293.654.654m-4.741-3.321h2.038a.692.692 0 0 0 0-1.384H9.981a.692.692 0 0 0 0 1.384M21 5v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2m-3.456 6.39a.72.72 0 0 0-.72-.72h-.607l-.013.001a.72.72 0 0 1-.718-.668l-.001-.008a3.6 3.6 0 0 0-3.599-3.599H10.07a3.6 3.6 0 0 0-3.599 3.599v3.947a3.6 3.6 0 0 0 3.599 3.599h3.874a3.6 3.6 0 0 0 3.599-3.599z"})))},{name:"bluesky",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M21.2 3.3c-.5-.2-1.4-.5-3.6 1C15.4 6 12.9 9.2 12 11c-.9-1.8-3.4-5-5.7-6.7-2.2-1.6-3-1.3-3.6-1S2 4.6 2 5.1s.3 4.7.5 5.4c.7 2.3 3.1 3.1 5.3 2.8-3.3.5-6.2 1.7-2.4 5.9 4.2 4.3 5.7-.9 6.5-3.6.8 2.7 1.7 7.7 6.4 3.6 3.6-3.6 1-5.4-2.3-5.9 2.2.2 4.6-.5 5.3-2.8.4-.7.7-4.8.7-5.4 0-.5-.1-1.5-.8-1.8"})))},{name:"codepen",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"m22.016 8.84-.007-.037q-.006-.037-.015-.072-.007-.022-.013-.042l-.023-.062-.02-.042a.4.4 0 0 0-.03-.057l-.025-.038-.035-.052-.03-.037q-.021-.026-.043-.045-.015-.018-.035-.035a.4.4 0 0 0-.048-.04l-.037-.03-.015-.012-9.161-6.096a.86.86 0 0 0-.955 0L2.359 8.237l-.015.012-.038.028-.048.04a.638.638 0 0 0-.078.082q-.018.018-.03.037-.018.026-.035.052l-.025.038q-.016.031-.03.059l-.02.041a1 1 0 0 0-.034.106q-.01.034-.016.071-.003.02-.006.037a1 1 0 0 0-.009.114v6.093q0 .056.008.112l.007.038q.006.035.015.072a.2.2 0 0 0 .013.04q.01.032.022.063l.02.04a.4.4 0 0 0 .055.096l.035.052.03.037.042.045.035.035q.023.02.048.04l.038.03.013.01 9.163 6.095a.858.858 0 0 0 .959.004l9.163-6.095.015-.01q.02-.015.037-.03l.048-.04q.02-.017.035-.035.025-.024.043-.045l.03-.037.035-.052.025-.038a.4.4 0 0 0 .03-.058l.02-.04.023-.063c.003-.013.01-.027.013-.04q.009-.037.015-.072l.007-.037q.006-.062.007-.117V8.954a1 1 0 0 0-.008-.114m-9.154-4.376 6.751 4.49-3.016 2.013-3.735-2.492zm-1.724 0v4.009l-3.735 2.494-3.014-2.013zm-7.439 6.098L5.853 12l-2.155 1.438zm7.439 8.974-6.749-4.491 3.015-2.011 3.735 2.492zM12 14.035 8.953 12 12 9.966 15.047 12zm.862 5.501v-4.009l3.735-2.492 3.016 2.011zm7.441-6.098L18.147 12l2.156-1.438z"})))},{name:"deezer",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M20.129 3.662c.222-1.287.548-2.096.909-2.098h.001c.673.002 1.219 2.809 1.219 6.274s-.546 6.274-1.22 6.274c-.276 0-.531-.477-.736-1.276-.324 2.926-.997 4.937-1.776 4.937-.603 0-1.144-1.208-1.507-3.114-.248 3.624-.872 6.195-1.602 6.195-.458 0-.875-1.019-1.184-2.678C13.861 21.6 13.003 24 12.002 24s-1.861-2.399-2.231-5.824c-.307 1.659-.724 2.678-1.184 2.678-.73 0-1.352-2.571-1.602-6.195-.363 1.905-.903 3.114-1.507 3.114-.778 0-1.452-2.011-1.776-4.937-.204.802-.46 1.276-.736 1.276-.674 0-1.22-2.809-1.22-6.274s.546-6.274 1.22-6.274c.362 0 .685.812.91 2.098.357-2.22.94-3.662 1.6-3.662.784 0 1.463 2.04 1.784 5.002.314-2.156.791-3.53 1.325-3.53.749 0 1.385 2.703 1.621 6.474.443-1.933 1.085-3.146 1.795-3.146s1.352 1.214 1.795 3.146c.237-3.771.872-6.474 1.621-6.474.533 0 1.009 1.374 1.325 3.53.321-2.962 1-5.002 1.784-5.002.658 0 1.244 1.443 1.603 3.662M0 7.221c0-1.549.31-2.805.692-2.805s.692 1.256.692 2.805-.31 2.805-.692 2.805S0 8.77 0 7.221m22.616 0c0-1.549.31-2.805.692-2.805S24 5.672 24 7.221s-.31 2.805-.692 2.805-.692-1.256-.692-2.805"})))},{name:"discord",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M20.33 4.523A20 20 0 0 0 15.379 3a14 14 0 0 0-.634 1.289 18.4 18.4 0 0 0-5.495 0A14 14 0 0 0 8.615 3 20 20 0 0 0 3.66 4.527C.527 9.163-.323 13.684.102 18.141a20 20 0 0 0 6.073 3.049 14.7 14.7 0 0 0 1.301-2.097 13 13 0 0 1-2.048-.978q.258-.189.502-.378a14.27 14.27 0 0 0 12.142 0q.247.202.502.378a13 13 0 0 1-2.052.98 14.5 14.5 0 0 0 1.301 2.095 19.9 19.9 0 0 0 6.076-3.047c.498-5.168-.851-9.648-3.568-13.62M8.013 15.4c-1.183 0-2.161-1.074-2.161-2.395S6.796 10.6 8.01 10.6s2.183 1.083 2.163 2.405S9.22 15.4 8.013 15.4m7.974 0c-1.186 0-2.16-1.074-2.16-2.395s.944-2.405 2.16-2.405 2.178 1.083 2.157 2.405-.951 2.395-2.158 2.395"})))},{name:"dribbble",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10m8.434-8.631c-.292-.092-2.644-.794-5.32-.365 1.117 3.07 1.572 5.57 1.659 6.09a8.56 8.56 0 0 0 3.661-5.725m-5.098 6.507c-.127-.749-.623-3.361-1.822-6.477l-.056.019c-4.818 1.679-6.547 5.02-6.701 5.334A8.5 8.5 0 0 0 12 20.555a8.5 8.5 0 0 0 3.336-.679m-9.682-2.152c.193-.331 2.538-4.213 6.943-5.637q.167-.054.337-.102a29 29 0 0 0-.692-1.45c-4.266 1.277-8.405 1.223-8.778 1.216a8.497 8.497 0 0 0 2.19 5.973m-2.015-7.46c.382.005 3.901.02 7.897-1.041a55 55 0 0 0-3.167-4.94 8.57 8.57 0 0 0-4.73 5.981m6.359-6.555a46 46 0 0 1 3.187 5c3.037-1.138 4.323-2.867 4.477-3.085a8.51 8.51 0 0 0-7.664-1.915m8.614 2.903c-.18.243-1.612 2.078-4.77 3.367a27 27 0 0 1 .751 1.678c2.842-.357 5.666.215 5.948.275a8.5 8.5 0 0 0-1.929-5.32"})))},{name:"dropbox",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 6.134 6.069 9.797 2 6.54l5.883-3.843zm-10 6.92 5.883 3.843L12 13.459 6.069 9.797zm10 .405 4.116 3.439L22 13.054l-4.069-3.257zM22 6.54l-5.884-3.843L12 6.134l5.931 3.663zm-9.989 7.66-4.129 3.426-1.767-1.153v1.291l5.896 3.539 5.897-3.539v-1.291l-1.769 1.153z"})))},{name:"eventbrite",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M18.041 3.931 5.959 3A2.96 2.96 0 0 0 3 5.959v12.083A2.96 2.96 0 0 0 5.959 21l12.083-.931C19.699 19.983 21 18.744 21 17.11V6.89c0-1.634-1.259-2.863-2.959-2.959M16.933 8.17c-.082.215-.192.432-.378.551-.188.122-.489.132-.799.132-1.521 0-3.062-.048-4.607-.048q-.23 1.061-.451 2.128c.932-.004 1.873.005 2.81.005.726 0 1.462-.069 1.586.525.04.189-.001.426-.052.615-.105.38-.258.676-.625.783-.185.054-.408.058-.646.058-1.145 0-2.345.017-3.493.02-.169.772-.328 1.553-.489 2.333 1.57-.005 3.067-.041 4.633-.058.627-.007 1.085.194 1.009.85a2.2 2.2 0 0 1-.211.725c-.102.208-.248.376-.488.452-.237.075-.541.064-.862.078-.304.014-.614.008-.924.016-.309.009-.619.022-.919.022-1.253 0-2.429.08-3.683.073-.603-.004-1.014-.249-1.124-.757-.059-.273-.018-.58.036-.841a3543 3543 0 0 1 1.629-7.763c.056-.265.114-.511.225-.714a1.24 1.24 0 0 1 .79-.62c.368-.099.883-.047 1.344-.047.305 0 .612.008.914.016.925.026 1.817.03 2.747.053.304.007.615.016.915.016.621 0 1.17.073 1.245.614.039.288-.051.567-.132.783"})))},{name:"facebook",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10"})))},{name:"fediverse",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 743 743"},React.createElement("g",null,React.createElement("path",{d:"M181.131 275.137a68.9 68.9 0 0 1-29.465 29.328l161.758 162.389 38.998-19.764zm213.363 214.187-38.998 19.764 81.963 82.283a68.9 68.9 0 0 1 29.471-29.332zM581.646 339.391l-91.576 46.41 6.752 43.189 103.616-52.513a68.9 68.9 0 0 1-18.792-37.086m-144.738 73.351L220.383 522.477a68.9 68.9 0 0 1 18.795 37.089L443.66 455.934zM367.275 142.438l-104.48 203.97 30.848 30.967 110.623-215.957a68.9 68.9 0 0 1-36.991-18.98M235.621 399.459l-52.922 103.314a68.9 68.9 0 0 1 36.987 18.979l46.781-91.328zM150.768 304.918a68.9 68.9 0 0 1-34.416 7.195 69 69 0 0 1-6.651-.695l30.903 197.662a68.9 68.9 0 0 1 34.416-7.195 69 69 0 0 1 6.646.695zM239.342 560.545c.707 4.589.949 9.239.72 13.877a68.9 68.9 0 0 1-7.267 27.18l197.629 31.712c-.708-4.59-.95-9.24-.723-13.878a68.9 68.9 0 0 1 7.27-27.178zM601.133 377.199l-91.219 178.082a68.9 68.9 0 0 1 36.994 18.983l91.217-178.08a68.9 68.9 0 0 1-36.992-18.985M476.723 125.33a68.9 68.9 0 0 1-29.471 29.332l141.266 141.811a68.9 68.9 0 0 1 29.468-29.332zM347.787 104.631l-178.576 90.498a68.9 68.9 0 0 1 18.793 37.086l178.574-90.502a68.9 68.9 0 0 1-18.791-37.082M446.926 154.826a68.9 68.9 0 0 1-34.983 7.483 69 69 0 0 1-6.029-.633l15.818 101.291 43.163 6.926zm-16 167.028 37.4 239.482a68.9 68.9 0 0 1 33.914-6.943q3.625.206 7.207.791L474.09 328.777zM188.131 232.975c.734 4.66.988 9.383.758 14.095a68.9 68.9 0 0 1-7.16 26.983l101.369 16.281 19.923-38.908zm173.736 27.9-19.926 38.912 239.514 38.467a69 69 0 0 1-.695-13.719 68.9 68.9 0 0 1 7.349-27.324z"}),React.createElement("path",{fillOpacity:".996",d:"M412.284 156.054c34.538 1.882 64.061-24.592 65.943-59.13s-24.592-64.062-59.131-65.943c-34.538-1.882-64.061 24.592-65.943 59.13s24.593 64.062 59.131 65.943M646.144 390.82c34.538 1.881 64.062-24.593 65.943-59.131s-24.592-64.061-59.13-65.943-64.062 24.593-65.943 59.131 24.592 64.061 59.13 65.943M495.086 685.719c34.538 1.881 64.062-24.592 65.943-59.13s-24.592-64.062-59.13-65.943-64.062 24.592-65.943 59.13 24.592 64.062 59.13 65.943M167.866 633.211c34.538 1.882 64.062-24.592 65.943-59.13s-24.592-64.062-59.13-65.943-64.062 24.592-65.943 59.13 24.592 64.062 59.13 65.943M116.692 305.86c34.538 1.882 64.062-24.592 65.943-59.13s-24.592-64.062-59.131-65.943c-34.538-1.881-64.061 24.592-65.943 59.13s24.593 64.062 59.131 65.943"})))},{name:"feed",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M2 8.667V12c5.515 0 10 4.485 10 10h3.333c0-7.363-5.97-13.333-13.333-13.333M2 2v3.333c9.19 0 16.667 7.477 16.667 16.667H22C22 10.955 13.045 2 2 2m2.5 15a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5"})))},{name:"flickr",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5m11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5"})))},{name:"foursquare",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M17.573 2H6.905C5.434 2 5 3.107 5 3.805v16.948c0 .785.422 1.077.66 1.172.238.097.892.177 1.285-.275 0 0 5.035-5.843 5.122-5.93.132-.132.132-.132.262-.132h3.26c1.368 0 1.588-.977 1.732-1.552.078-.318.692-3.428 1.225-6.122l.675-3.368C19.56 2.893 19.14 2 17.573 2m-1.078 5.22c-.053.252-.372.518-.665.518h-4.157c-.467 0-.802.318-.802.787v.508c0 .467.337.798.805.798h3.528c.331 0 .655.362.583.715s-.407 2.102-.448 2.295c-.04.193-.262.523-.655.523h-2.88c-.523 0-.683.068-1.033.503-.35.437-3.505 4.223-3.505 4.223-.032.035-.063.027-.063-.015V4.852c0-.298.26-.648.648-.648h8.562c.315 0 .61.297.528.683z"})))},{name:"ghost",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M10.203 20.997H3.005v-3.599h7.198zm10.792-3.599h-7.193v3.599h7.193zm.003-7.198H3v3.599h17.998zm-7.195-7.197H3.005v3.599h10.798zm7.197 0h-3.599v3.599H21z"})))},{name:"git",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M23.519 10.947 13.053.482a1.543 1.543 0 0 0-2.183 0L8.696 2.656l2.756 2.756a1.83 1.83 0 0 1 1.886.439 1.84 1.84 0 0 1 .436 1.898l2.656 2.657a1.83 1.83 0 0 1 1.899.436 1.837 1.837 0 0 1 0 2.597 1.84 1.84 0 0 1-2.599 0 1.84 1.84 0 0 1-.4-1.998l-2.478-2.477v6.521a1.837 1.837 0 0 1 .485 2.945 1.837 1.837 0 0 1-2.597 0 1.837 1.837 0 0 1 0-2.598 1.8 1.8 0 0 1 .602-.401V8.85a1.8 1.8 0 0 1-.602-.4 1.84 1.84 0 0 1-.395-2.009L7.628 3.723.452 10.898a1.544 1.544 0 0 0 0 2.184l10.467 10.467a1.544 1.544 0 0 0 2.183 0l10.417-10.418a1.546 1.546 0 0 0 0-2.184"})))},{name:"github",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12c0 4.419 2.865 8.166 6.839 9.489.5.09.682-.218.682-.484 0-.236-.009-.866-.014-1.699-2.782.602-3.369-1.34-3.369-1.34-.455-1.157-1.11-1.465-1.11-1.465-.909-.62.069-.608.069-.608 1.004.071 1.532 1.03 1.532 1.03.891 1.529 2.341 1.089 2.91.833.091-.647.349-1.086.635-1.337-2.22-.251-4.555-1.111-4.555-4.943 0-1.091.39-1.984 1.03-2.682-.103-.254-.447-1.27.097-2.646 0 0 .84-.269 2.75 1.025A9.6 9.6 0 0 1 12 6.836c.85.004 1.705.114 2.504.336 1.909-1.294 2.748-1.025 2.748-1.025.546 1.376.202 2.394.1 2.646.64.699 1.026 1.591 1.026 2.682 0 3.841-2.337 4.687-4.565 4.935.359.307.679.917.679 1.852 0 1.335-.012 2.415-.012 2.741 0 .269.18.579.688.481A10 10 0 0 0 22 12c0-5.523-4.477-10-10-10"})))},{name:"google-alt",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m-.05 16c-3.312 0-6-2.688-6-6s2.688-6 6-6c1.62 0 2.976.594 4.014 1.566L14.26 9.222c-.432-.408-1.188-.888-2.31-.888-1.986 0-3.606 1.65-3.606 3.672s1.62 3.672 3.606 3.672c2.298 0 3.144-1.59 3.3-2.532h-3.306v-2.238h5.616c.084.378.15.732.15 1.23 0 3.426-2.298 5.862-5.76 5.862"})))},{name:"google-plus-alt",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M8 11h6.61c.06.35.11.7.11 1.16 0 4-2.68 6.84-6.72 6.84-3.87 0-7-3.13-7-7s3.13-7 7-7c1.89 0 3.47.69 4.69 1.83l-1.9 1.83c-.52-.5-1.43-1.08-2.79-1.08-2.39 0-4.34 1.98-4.34 4.42S5.61 16.42 8 16.42c2.77 0 3.81-1.99 3.97-3.02H8zm15 0h-2V9h-2v2h-2v2h2v2h2v-2h2"})))},{name:"google-plus",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m-1.919 14.05a4.051 4.051 0 0 1 0-8.1c1.094 0 2.009.401 2.709 1.057l-1.15 1.118a2.23 2.23 0 0 0-1.559-.599c-1.341 0-2.434 1.114-2.434 2.479s1.094 2.479 2.434 2.479c1.551 0 2.122-1.073 2.227-1.709h-2.232v-1.511h3.791c.057.255.101.494.101.83.001 2.312-1.55 3.956-3.887 3.956M19 12.75h-1.25V14h-1.5v-1.25H15v-1.5h1.25V10h1.5v1.25H19z"})))},{name:"google",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12.02 10.18v3.73h5.51c-.26 1.57-1.67 4.22-5.5 4.22-3.31 0-6.01-2.75-6.01-6.12s2.7-6.12 6.01-6.12c1.87 0 3.13.8 3.85 1.48l2.84-2.76C16.99 2.99 14.73 2 12.03 2c-5.52 0-10 4.48-10 10s4.48 10 10 10c5.77 0 9.6-4.06 9.6-9.77 0-.83-.11-1.42-.25-2.05z"})))},{name:"instagram",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 4.622c2.403 0 2.688.009 3.637.052.877.04 1.354.187 1.671.31.42.163.72.358 1.035.673s.51.615.673 1.035c.123.317.27.794.31 1.671.043.949.052 1.234.052 3.637s-.009 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.671-.163.42-.358.72-.673 1.035s-.615.51-1.035.673c-.317.123-.794.27-1.671.31-.949.043-1.233.052-3.637.052s-2.688-.009-3.637-.052c-.877-.04-1.354-.187-1.671-.31a2.8 2.8 0 0 1-1.035-.673 2.8 2.8 0 0 1-.673-1.035c-.123-.317-.27-.794-.31-1.671-.043-.949-.052-1.234-.052-3.637s.009-2.688.052-3.637c.04-.877.187-1.354.31-1.671.163-.42.358-.72.673-1.035s.615-.51 1.035-.673c.317-.123.794-.27 1.671-.31.949-.043 1.234-.052 3.637-.052M12 3c-2.444 0-2.751.01-3.711.054-.958.044-1.612.196-2.184.418a4.4 4.4 0 0 0-1.594 1.039c-.5.5-.808 1.002-1.038 1.594-.223.572-.375 1.226-.419 2.184C3.01 9.249 3 9.556 3 12s.01 2.751.054 3.711c.044.958.196 1.612.418 2.185.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.267.054 3.711.054s2.751-.01 3.711-.054c.958-.044 1.612-.196 2.185-.418a4.4 4.4 0 0 0 1.594-1.038c.5-.5.808-1.002 1.038-1.594.222-.572.375-1.227.418-2.185.044-.96.054-1.267.054-3.711s-.01-2.751-.054-3.711c-.044-.958-.196-1.612-.418-2.185A4.4 4.4 0 0 0 19.49 4.51c-.5-.5-1.002-.808-1.594-1.038-.572-.222-1.227-.375-2.185-.418C14.751 3.01 14.444 3 12 3m0 4.378a4.622 4.622 0 1 0 0 9.244 4.622 4.622 0 0 0 0-9.244M12 15a3 3 0 1 1 0-6 3 3 0 0 1 0 6m4.804-8.884a1.08 1.08 0 1 0 .001 2.161 1.08 1.08 0 0 0-.001-2.161"})))},{name:"json-feed",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"m8.522 17.424.027.027c1.076-1.076 1.854-.993 3.154.306l2.053 2.053c2.136 2.136 4.131 2.028 6.515-.356l.729-.728-1.548-1.548-.373.373c-1.349 1.349-2.293 1.366-3.585.075l-2.409-2.409c-1.242-1.242-2.475-1.366-3.659-.381l-.232-.232c1.01-1.225.911-2.368-.29-3.568l-2.16-2.162c-1.317-1.317-1.308-2.236.058-3.602l.372-.372-1.54-1.54-.728.729c-2.393 2.393-2.525 4.346-.439 6.433l1.78 1.78c1.3 1.3 1.383 2.095.315 3.163l.008.008a1.384 1.384 0 0 0 1.952 1.951"}),React.createElement("circle",{cx:"13.089",cy:"10.905",r:"1.383"}),React.createElement("circle",{cx:"16.349",cy:"7.644",r:"1.383"}),React.createElement("circle",{cx:"19.61",cy:"4.383",r:"1.383"})))},{name:"line",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M14.255 9.572v3.333c0 .084-.066.15-.15.15h-.534a.16.16 0 0 1-.122-.061l-1.528-2.063v1.978c0 .084-.066.15-.15.15h-.534a.15.15 0 0 1-.15-.15V9.576c0-.084.066-.15.15-.15h.529a.14.14 0 0 1 .122.066l1.528 2.063V9.577c0-.084.066-.15.15-.15h.534a.15.15 0 0 1 .155.145m-3.844-.15h-.534a.15.15 0 0 0-.15.15v3.333c0 .084.066.15.15.15h.534c.084 0 .15-.066.15-.15V9.572c0-.08-.066-.15-.15-.15m-1.289 2.794H7.664V9.572a.15.15 0 0 0-.15-.15H6.98a.15.15 0 0 0-.15.15v3.333q0 .062.042.103a.16.16 0 0 0 .103.042h2.142c.084 0 .15-.066.15-.15v-.534a.15.15 0 0 0-.145-.15m7.945-2.794h-2.142c-.08 0-.15.066-.15.15v3.333c0 .08.066.15.15.15h2.142c.084 0 .15-.066.15-.15v-.534a.15.15 0 0 0-.15-.15h-1.458v-.563h1.458c.084 0 .15-.066.15-.15v-.539a.15.15 0 0 0-.15-.15h-1.458v-.563h1.458c.084 0 .15-.066.15-.15v-.534c-.005-.08-.07-.15-.15-.15M22.5 5.33v13.373c-.005 2.1-1.725 3.802-3.83 3.797H5.297c-2.1-.005-3.802-1.73-3.797-3.83V5.297c.005-2.1 1.73-3.802 3.83-3.797h13.373c2.1.005 3.802 1.725 3.797 3.83m-2.888 5.747c0-3.422-3.431-6.206-7.645-6.206s-7.645 2.784-7.645 6.206c0 3.066 2.719 5.634 6.394 6.122.895.192.792.52.591 1.725-.033.192-.155.755.661.413s4.402-2.592 6.009-4.439c1.106-1.219 1.636-2.452 1.636-3.82"})))},{name:"link",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M17 13H7v-2h10zm1-6h-1c-1.631 0-3.065.792-3.977 2H18c1.103 0 2 .897 2 2v2c0 1.103-.897 2-2 2h-4.977c.913 1.208 2.347 2 3.977 2h1a4 4 0 0 0 4-4v-2a4 4 0 0 0-4-4M2 11v2a4 4 0 0 0 4 4h1c1.63 0 3.065-.792 3.977-2H6c-1.103 0-2-.897-2-2v-2c0-1.103.897-2 2-2h4.977C10.065 7.792 8.631 7 7 7H6a4 4 0 0 0-4 4"})))},{name:"linkedin",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M19.7 3H4.3A1.3 1.3 0 0 0 3 4.3v15.4A1.3 1.3 0 0 0 4.3 21h15.4a1.3 1.3 0 0 0 1.3-1.3V4.3A1.3 1.3 0 0 0 19.7 3M8.339 18.338H5.667v-8.59h2.672zM7.004 8.574a1.548 1.548 0 1 1-.002-3.096 1.548 1.548 0 0 1 .002 3.096m11.335 9.764H15.67v-4.177c0-.996-.017-2.278-1.387-2.278-1.389 0-1.601 1.086-1.601 2.206v4.249h-2.667v-8.59h2.559v1.174h.037c.356-.675 1.227-1.387 2.526-1.387 2.703 0 3.203 1.779 3.203 4.092v4.711z"})))},{name:"mail",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 4.236-8 4.882-8-4.882V6h16z"})))},{name:"mastodon",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M11.973 2.352c-2.468.02-4.842.286-6.225.921 0 0-2.742 1.229-2.742 5.415 0 .958-.018 2.105.012 3.32.1 4.094.75 8.128 4.535 9.129 1.745.462 3.244.56 4.45.494 2.19-.122 3.417-.781 3.417-.781l-.072-1.588s-1.565.491-3.32.431c-1.74-.06-3.576-.188-3.858-2.324a4 4 0 0 1-.04-.598s1.709.416 3.874.516c1.324.06 2.563-.076 3.824-.226 2.418-.29 4.524-1.78 4.79-3.141.416-2.144.38-5.232.38-5.232 0-4.186-2.74-5.415-2.74-5.415-1.383-.635-3.76-.9-6.227-.921zM9.18 5.622c1.028 0 1.804.395 2.318 1.185l.502.84.5-.84c.514-.79 1.292-1.186 2.32-1.186.888 0 1.605.313 2.15.922q.795.915.794 2.469v5.068h-2.008V9.16c0-1.037-.438-1.562-1.31-1.562-.966 0-1.448.622-1.448 1.857v2.693h-1.996V9.455c0-1.235-.484-1.857-1.45-1.857-.872 0-1.308.525-1.308 1.562v4.92H6.236V9.012q-.001-1.554.793-2.469c.547-.609 1.263-.922 2.15-.922"})))},{name:"medium-alt",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{fillRule:"nonzero",d:"M7.423 6c3.27 0 5.922 2.686 5.922 6s-2.651 6-5.922 6S1.5 15.313 1.5 12s2.652-6 5.923-6m9.458.351c1.635 0 2.961 2.53 2.961 5.65 0 3.118-1.325 5.648-2.96 5.648S13.92 15.119 13.92 12s1.325-5.649 2.96-5.649m4.577.589c.576 0 1.042 2.265 1.042 5.06s-.466 5.06-1.042 5.06c-.575 0-1.04-2.265-1.04-5.06s.465-5.06 1.04-5.06"})))},{name:"medium",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M3 3v18h18V3zm15 4.26-1 .93a.28.28 0 0 0-.11.27v6.8a.27.27 0 0 0 .11.27l.94.93v.2h-4.75v-.2l1-1c.09-.1.09-.12.09-.27V9.74l-2.71 6.9h-.37L8 9.74v4.62a.67.67 0 0 0 .17.54l1.27 1.54v.2H5.86v-.2l1.27-1.54a.64.64 0 0 0 .17-.54V9a.5.5 0 0 0-.16-.4L6 7.26v-.2h3.52L12.23 13l2.38-5.94H18z"})))},{name:"messenger",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12.026.375C5.462.375.375 5.172.375 11.652c0 3.389 1.393 6.318 3.66 8.341.391.352.311.556.377 2.73a.934.934 0 0 0 1.307.823c2.48-1.092 2.512-1.178 2.933-1.064 7.185 1.977 14.973-2.621 14.973-10.83 0-6.48-5.035-11.277-11.599-11.277m6.996 8.678L15.6 14.47a1.75 1.75 0 0 1-2.527.465l-2.723-2.038a.7.7 0 0 0-.844 0l-3.674 2.786c-.49.372-1.133-.216-.802-.735l3.422-5.417a1.75 1.75 0 0 1 2.527-.465l2.722 2.037a.7.7 0 0 0 .844 0L18.22 8.32c.489-.374 1.132.213.801.732"})))},{name:"microblog",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M19.641 17.086c1.294-1.522 2.067-3.438 2.067-5.521 0-4.957-4.371-8.972-9.763-8.972s-9.763 4.015-9.763 8.972 4.371 8.972 9.763 8.972a10.5 10.5 0 0 0 3.486-.59.315.315 0 0 1 .356.112c.816 1.101 2.09 1.876 3.506 2.191a.194.194 0 0 0 .192-.309 3.82 3.82 0 0 1 .162-4.858zm-3.065-6.575-2.514 1.909.912 3.022a.286.286 0 0 1-.437.317l-2.592-1.802-2.592 1.802a.285.285 0 0 1-.436-.317l.912-3.022-2.515-1.909a.285.285 0 0 1 .167-.513l3.155-.066 1.038-2.981a.285.285 0 0 1 .539 0l1.038 2.981 3.155.066a.285.285 0 0 1 .17.513"})))},{name:"nextdoor",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",strokeMiterlimit:"10",viewBox:"0 0 130 130"},React.createElement("g",null,React.createElement("path",{d:"M64.25 3.531c-31.144.337-57.596 24.22-60.469 55.907-3.064 33.799 21.857 63.685 55.657 66.75s63.685-21.857 66.75-55.657-21.857-63.686-55.657-66.75a62 62 0 0 0-6.281-.25m3.938 34.907C82.468 38.438 93.5 48.58 93.5 61.5v27c0 .685-.565 1.25-1.25 1.25H80.906a1.267 1.267 0 0 1-1.25-1.25V63.375c0-5.58-4.309-11.937-11.469-11.937-7.47 0-11.468 6.357-11.468 11.937V88.5c0 .685-.565 1.25-1.25 1.25H44.125c-.68 0-1.219-.57-1.219-1.25V64.156c0-.74-.529-1.364-1.25-1.531-13.13-2.93-15.115-10.285-15.375-21.125-.005-.332.142-.67.375-.906.233-.237.543-.375.875-.375l11.688.062c.66.01 1.187.529 1.218 1.188.13 4.44.438 9.406 4.438 9.406.83 0 1.443-1.179 1.813-1.719 4.41-6.48 12.28-10.718 21.5-10.718"})))},{name:"patreon",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M20 7.408c-.003-2.299-1.746-4.182-3.79-4.862-2.54-.844-5.888-.722-8.312.453-2.939 1.425-3.862 4.545-3.896 7.656-.028 2.559.22 9.297 3.92 9.345 2.75.036 3.159-3.603 4.43-5.356.906-1.247 2.071-1.599 3.506-1.963 2.465-.627 4.146-2.626 4.142-5.273"})))},{name:"pinterest-alt",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12.289 2C6.617 2 3.606 5.648 3.606 9.622c0 1.846 1.025 4.146 2.666 4.878.25.111.381.063.439-.169.044-.175.267-1.029.365-1.428a.37.37 0 0 0-.091-.362c-.54-.63-.975-1.791-.975-2.873 0-2.777 2.194-5.464 5.933-5.464 3.23 0 5.49 2.108 5.49 5.122 0 3.407-1.794 5.768-4.13 5.768-1.291 0-2.257-1.021-1.948-2.277.372-1.495 1.089-3.112 1.089-4.191 0-.967-.542-1.775-1.663-1.775-1.319 0-2.379 1.309-2.379 3.059 0 1.115.394 1.869.394 1.869s-1.302 5.279-1.54 6.261c-.405 1.666.053 4.368.094 4.604.021.126.167.169.25.063.129-.165 1.699-2.419 2.142-4.051.158-.59.817-2.995.817-2.995.43.784 1.681 1.446 3.013 1.446 3.963 0 6.822-3.494 6.822-7.833C20.394 5.112 16.849 2 12.289 2"})))},{name:"pinterest",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12c0 4.236 2.636 7.855 6.356 9.312-.087-.791-.166-2.005.035-2.869.182-.78 1.173-4.971 1.173-4.971s-.299-.599-.299-1.484c0-1.39.806-2.429 1.809-2.429.853 0 1.265.641 1.265 1.409 0 .858-.546 2.141-.828 3.329-.236.996.499 1.807 1.481 1.807 1.777 0 3.144-1.874 3.144-4.579 0-2.394-1.72-4.068-4.177-4.068-2.845 0-4.515 2.134-4.515 4.34 0 .859.331 1.781.744 2.282a.3.3 0 0 1 .069.287c-.077.316-.246.995-.279 1.134-.044.183-.145.222-.334.134-1.249-.581-2.03-2.407-2.03-3.874 0-3.154 2.292-6.051 6.607-6.051 3.469 0 6.165 2.472 6.165 5.775 0 3.446-2.173 6.22-5.189 6.22-1.013 0-1.966-.526-2.292-1.148l-.623 2.377c-.226.869-.835 1.957-1.243 2.622.936.289 1.93.445 2.961.445 5.523 0 10-4.477 10-10S17.523 2 12 2"})))},{name:"pocket",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M21.927 4.194A1.82 1.82 0 0 0 20.222 3H3.839a1.823 1.823 0 0 0-1.813 1.814v6.035l.069 1.2c.29 2.73 1.707 5.115 3.899 6.778l.119.089.025.018a9.9 9.9 0 0 0 3.91 1.727 10.06 10.06 0 0 0 4.049-.014.3.3 0 0 0 .064-.023 9.9 9.9 0 0 0 3.753-1.691l.025-.018q.06-.043.119-.089c2.192-1.664 3.609-4.049 3.898-6.778l.069-1.2V4.814a1.8 1.8 0 0 0-.098-.62m-4.235 6.287-4.704 4.512a1.37 1.37 0 0 1-1.898 0l-4.705-4.512a1.371 1.371 0 1 1 1.898-1.979l3.756 3.601 3.755-3.601a1.372 1.372 0 0 1 1.898 1.979"})))},{name:"polldaddy",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 2C6.487 2 2 6.487 2 12c0 5.514 4.487 10 10 10 5.514 0 10-4.486 10-10 0-5.513-4.486-10-10-10m.991 1.68c2.361.084 4.657 1.251 6.197 3.136.283.334.541.693.774 1.067a7.78 7.78 0 0 0-6.094-2.94 7.76 7.76 0 0 0-5.896 2.703q-.008.006-.016.014l-.152.159-.031.032a6.12 6.12 0 0 0-1.633 4.165 6.15 6.15 0 0 0 6.143 6.143c.57 0 1.123-.081 1.649-.227-1.849.839-4.131.747-5.926-.324-1.841-1.089-3.171-3.111-3.433-5.313A7.39 7.39 0 0 1 6.69 6.137C8.294 4.5 10.634 3.563 12.991 3.68m3.373 8.519c-.049-2.024-1.587-3.889-3.544-4.174-1.927-.343-3.917.857-4.451 2.661a3.67 3.67 0 0 0 .2 2.653c.39.8 1.067 1.451 1.894 1.759 1.664.654 3.63-.27 4.173-1.863.593-1.58-.396-3.423-1.94-3.776-1.52-.407-3.161.757-3.204 2.243a2.36 2.36 0 0 0 .753 1.879c.501.476 1.23.667 1.871.529a2.07 2.07 0 0 0 1.469-1.134 1.91 1.91 0 0 0-.087-1.767c-.297-.513-.859-.863-1.429-.881a1.7 1.7 0 0 0-1.437.679 1.53 1.53 0 0 0-.18 1.489q.006.016.016.03c.193.634.774 1.1 1.467 1.117a1.6 1.6 0 0 1-.97-.183c-.466-.244-.809-.747-.893-1.29a1.8 1.8 0 0 1 .499-1.539 2.02 2.02 0 0 1 1.58-.606c.593.04 1.159.35 1.517.859.364.496.51 1.156.383 1.773-.116.62-.529 1.174-1.093 1.514a2.52 2.52 0 0 1-1.914.286c-.65-.161-1.226-.606-1.584-1.206a2.83 2.83 0 0 1-.341-2.031c.143-.7.573-1.321 1.176-1.753 1.193-.883 3.056-.751 4.106.411 1.106 1.1 1.327 3.027.406 4.371-.877 1.376-2.74 2.086-4.374 1.594-1.639-.449-2.913-2.079-3.031-3.853-.07-.884.13-1.797.583-2.577.445-.777 1.155-1.432 1.972-1.862 1.64-.88 3.816-.743 5.349.424 1.251.924 2.083 2.42 2.236 4.009l.001.03c0 2.9-2.359 5.26-5.26 5.26a5.2 5.2 0 0 1-1.947-.376 5 5 0 0 0 2.613-.079 4.96 4.96 0 0 0 2.514-1.751c.618-.828.95-1.861.901-2.869M12 21.113c-5.024 0-9.111-4.087-9.111-9.113 0-4.789 3.713-8.723 8.411-9.081a7 7 0 0 0-.397.06c-2.644.453-5.017 2.106-6.32 4.409-1.309 2.301-1.391 5.19-.3 7.527 1.056 2.34 3.253 4.156 5.776 4.553 2.497.44 5.133-.483 6.787-2.301 1.719-1.797 2.269-4.529 1.486-6.796-.583-1.81-1.976-3.331-3.7-4.046 3.417.594 6.174 3.221 6.174 6.781 0 1.004-.241 2.02-.657 2.966-1.498 2.984-4.586 5.041-8.149 5.041"})))},{name:"print",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M9 16h6v2H9zm13 1h-3v3a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-3H2V9a2 2 0 0 1 2-2h1V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v2h1a2 2 0 0 1 2 2zM7 7h10V5H7zm10 7H7v6h10zm3-3.5a1.5 1.5 0 1 0-3.001.001A1.5 1.5 0 0 0 20 10.5"})))},{name:"quora",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M47.736 16.521c-.41-.81-.898-1.631-1.846-1.631a1 1 0 0 0-.527.107l-.322-.644a2.93 2.93 0 0 1 1.836-.595c1.26 0 1.914.605 2.431 1.397a6.8 6.8 0 0 0 .449-2.675c0-2.773-.869-4.199-2.929-4.199-1.992 0-2.851 1.465-2.851 4.199s.859 4.17 2.851 4.17a4 4 0 0 0 .869-.107zm.498.966a6 6 0 0 1-1.367.185 5.27 5.27 0 0 1-5.263-5.204c0-3.114 2.558-5.233 5.263-5.233s5.282 2.109 5.282 5.233a5.08 5.08 0 0 1-1.992 4.072c.381.566.781.956 1.319.956.595 0 .839-.459.878-.82h.781c.049.488-.195 2.48-2.373 2.48-1.319 0-2.012-.761-2.529-1.66zm5.624-2.646v-3.563c0-.371-.146-.586-.615-.586h-.498v-.956h3.251v5.048c0 .849.459 1.231 1.161 1.231a1.56 1.56 0 0 0 1.465-.839V11.28c0-.371-.146-.586-.615-.586h-.527v-.957h3.28v5.302c0 .527.195.732.8.732h.107v.976l-2.929.468V16.21h-.057a3.12 3.12 0 0 1-2.509 1.152c-1.28 0-2.304-.644-2.304-2.558zm12.059 1.611c1.152 0 1.592-1.005 1.611-3.027.02-1.982-.459-2.929-1.611-2.929-1.005 0-1.641.956-1.641 2.929 0 2.021.625 3.027 1.641 3.027m0 .956a3.906 3.906 0 0 1-3.974-3.974c0-2.334 1.836-3.886 3.974-3.886 2.226 0 4.004 1.582 4.004 3.886a3.867 3.867 0 0 1-4.004 3.974m4.072-.146v-.956h.312c.781 0 .859-.224.859-.908v-4.121c0-.371-.215-.586-.732-.586h-.42v-.955h2.968l.146 1.553h.108c.371-1.113 1.221-1.699 2.051-1.699.693 0 1.221.39 1.221 1.181 0 .547-.264 1.093-1.005 1.093-.664 0-.8-.449-1.358-.449-.488 0-.869.468-.869 1.152v2.783c0 .673.166.908.937.908h.439v.956h-4.658zm9.901-1.093c.956 0 1.338-.898 1.338-1.797v-1.211c-.732.722-2.304.742-2.304 2.021 0 .625.371.986.966.986m1.387 0c-.39.752-1.191 1.26-2.314 1.26-1.309 0-2.148-.732-2.148-1.914 0-2.451 3.417-1.797 4.423-3.427v-.185c0-1.25-.488-1.445-1.035-1.445-1.524 0-.83 1.631-2.226 1.631-.673 0-.937-.371-.937-.859 0-.927 1.093-1.67 3.173-1.67 1.963 0 3.163.537 3.163 2.49v3.114q-.02.742.595.742a1 1 0 0 0 .449-.127l.254.615c-.205.312-.752.869-1.836.869-.908 0-1.465-.42-1.543-1.113h-.01zm-68.554 2.558c-.83-1.641-1.807-3.3-3.711-3.3a2.9 2.9 0 0 0-1.093.215l-.644-1.299a5.66 5.66 0 0 1 3.662-1.211c2.548 0 3.857 1.231 4.892 2.792q.917-2.012.908-5.38c0-5.585-1.748-8.417-5.829-8.417-4.033 0-5.76 2.87-5.76 8.417s1.738 8.397 5.76 8.397a5.9 5.9 0 0 0 1.748-.224zm.996 1.953a9.8 9.8 0 0 1-2.744.371C5.614 21.041.371 16.764.371 10.545.371 4.277 5.614 0 10.965 0c5.448 0 10.642 4.248 10.642 10.545a10.25 10.25 0 0 1-4.013 8.201c.732 1.152 1.563 1.914 2.665 1.914 1.201 0 1.689-.927 1.768-1.66h1.572c.088.966-.4 4.999-4.775 4.999-2.646 0-4.052-1.543-5.106-3.339z"})))},{name:"reddit",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M22 11.816a2.28 2.28 0 0 0-2.277-2.277c-.593 0-1.122.24-1.526.614-1.481-.965-3.455-1.594-5.647-1.69l1.171-3.702 3.18.748a1.88 1.88 0 0 0 1.876 1.862 1.88 1.88 0 0 0 1.877-1.878 1.88 1.88 0 0 0-1.877-1.877c-.769 0-1.431.466-1.72 1.13l-3.508-.826a.386.386 0 0 0-.46.261l-1.35 4.268c-2.316.038-4.411.67-5.97 1.671a2.24 2.24 0 0 0-1.492-.581A2.28 2.28 0 0 0 2 11.816c0 .814.433 1.523 1.078 1.925a4 4 0 0 0-.061.672c0 3.292 4.011 5.97 8.941 5.97s8.941-2.678 8.941-5.97q-.002-.32-.053-.632A2.26 2.26 0 0 0 22 11.816m-3.224-7.422a1.1 1.1 0 1 1-.001 2.199 1.1 1.1 0 0 1 .001-2.199M2.777 11.816c0-.827.672-1.5 1.499-1.5.313 0 .598.103.838.269-.851.676-1.477 1.479-1.812 2.36a1.48 1.48 0 0 1-.525-1.129m9.182 7.79c-4.501 0-8.164-2.329-8.164-5.193S7.457 9.22 11.959 9.22s8.164 2.329 8.164 5.193-3.663 5.193-8.164 5.193m8.677-6.605c-.326-.89-.948-1.701-1.797-2.384.248-.186.55-.301.883-.301.827 0 1.5.673 1.5 1.5.001.483-.23.911-.586 1.185m-11.64 1.703c-.76 0-1.397-.616-1.397-1.376s.637-1.397 1.397-1.397 1.376.637 1.376 1.397-.616 1.376-1.376 1.376m7.405-1.376c0 .76-.616 1.376-1.376 1.376s-1.399-.616-1.399-1.376.639-1.397 1.399-1.397 1.376.637 1.376 1.397m-1.172 3.38a.39.39 0 0 1 0 .55c-.674.674-1.727 1.002-3.219 1.002l-.011-.002-.011.002c-1.492 0-2.544-.328-3.218-1.002a.389.389 0 1 1 .55-.55c.521.521 1.394.775 2.669.775l.011.002.011-.002c1.275 0 2.148-.253 2.669-.775a.387.387 0 0 1 .549 0"})))},{name:"share",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M18 16c-.788 0-1.499.31-2.034.807L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.048 4.118A3 3 0 0 0 15 19a3 3 0 1 0 3-3"})))},{name:"skype",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"m10.113 2.699.1-.02q.05.025.098.051zM2.72 10.223l-.017.103q.025.048.051.095zm18.555 3.548q.009-.053.018-.106-.025-.047-.052-.095zm-7.712 7.428q.049.027.096.053l.105-.017zM22 16.386a5.55 5.55 0 0 1-1.637 3.953 5.55 5.55 0 0 1-3.953 1.637 5.6 5.6 0 0 1-2.75-.725l.105-.017-.202-.035q.049.027.096.053a9.5 9.5 0 0 1-1.654.147 9.4 9.4 0 0 1-3.676-.743 9.4 9.4 0 0 1-3.002-2.023 9.4 9.4 0 0 1-2.023-3.002 9.4 9.4 0 0 1-.743-3.676c0-.546.049-1.093.142-1.628q.025.048.051.095l-.034-.199-.017.103A5.6 5.6 0 0 1 2 7.615c0-1.493.582-2.898 1.637-3.953A5.56 5.56 0 0 1 7.59 2.024c.915 0 1.818.228 2.622.655l-.1.02.199.031q-.049-.026-.098-.051l.004-.001a9.5 9.5 0 0 1 1.788-.169 9.41 9.41 0 0 1 6.678 2.766 9.4 9.4 0 0 1 2.024 3.002 9.4 9.4 0 0 1 .743 3.676c0 .575-.054 1.15-.157 1.712q-.025-.047-.052-.095l.034.201q.009-.053.018-.106c.461.829.707 1.767.707 2.721m-5.183-2.248c0-1.331-.613-2.743-3.033-3.282l-2.209-.49c-.84-.192-1.807-.444-1.807-1.237s.679-1.348 1.903-1.348c2.468 0 2.243 1.696 3.468 1.696.645 0 1.209-.379 1.209-1.031 0-1.521-2.435-2.663-4.5-2.663-2.242 0-4.63.952-4.63 3.488 0 1.221.436 2.521 2.839 3.123l2.984.745c.903.223 1.129.731 1.129 1.189 0 .762-.758 1.507-2.129 1.507-2.679 0-2.307-2.062-3.743-2.062-.645 0-1.113.444-1.113 1.078 0 1.236 1.501 2.886 4.856 2.886 3.195 0 4.776-1.538 4.776-3.599"})))},{name:"sms",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M17.696 4C20.069 4 22 5.973 22 8.398v4.357c0 2.04-1.368 3.783-3.261 4.266v4.427l-5.234-4.295h-7.2C3.93 17.153 2 15.18 2 12.755V8.398C2 5.973 3.931 4 6.304 4zM7.028 8.515c-.98 0-1.66.562-1.66 1.349-.009.497.322.91.985 1.178l.39.142c.242.097.305.171.305.297 0 .162-.131.251-.442.251s-.76-.135-1.004-.284l-.112.046-.215.868c.359.258.832.364 1.33.364 1.104 0 1.764-.523 1.764-1.333-.008-.574-.305-.956-.954-1.216l-.393-.146c-.266-.108-.341-.181-.341-.287 0-.152.131-.243.387-.243.274 0 .587.093.808.214l.109-.047.214-.837c-.315-.224-.741-.316-1.171-.316m10.302 0c-.98 0-1.66.562-1.66 1.349-.008.497.322.91.985 1.178l.39.142c.243.097.305.171.305.297 0 .162-.13.251-.442.251-.311 0-.76-.135-1.004-.284l-.112.046-.215.868c.359.258.832.364 1.33.364 1.104 0 1.764-.523 1.764-1.333-.008-.574-.305-.956-.954-1.216l-.393-.146c-.266-.108-.341-.181-.341-.287 0-.152.131-.243.387-.243.274 0 .587.093.808.214l.109-.047.214-.837c-.316-.224-.741-.316-1.171-.316m-3.733 0c-.297 0-.55.066-.78.202l-.144.098a2 2 0 0 0-.264.247l-.078.095-.027-.077c-.15-.34-.55-.565-1.033-.565l-.169.007a1.36 1.36 0 0 0-.896.42l-.08.09-.038-.363-.075-.067H8.994l-.075.079.024.634c.005.2.008.397.008.604v2.652l.075.075h1.178l.075-.075v-2.269q-.002-.168.042-.274c.083-.23.262-.392.496-.392.314 0 .483.267.483.753v2.182l.075.075h1.179l.075-.075v-2.277c0-.097.016-.213.043-.285.077-.224.26-.373.486-.373.33 0 .5.272.5.817v2.118l.074.075h1.179l.075-.075v-2.293c0-1.131-.537-1.763-1.39-1.763Z"})))},{name:"snapchat",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M11.989 1.728c3.221.001 5.904 2.683 5.908 5.912q.002 1.133.067 2.094a.737.737 0 0 0 .902.669l1.009-.237a.6.6 0 0 1 .129-.015c.256 0 .492.175.55.434a.74.74 0 0 1-.479.861l-1.532.618a.823.823 0 0 0-.485.98c1.229 4.543 4.661 4.071 4.661 4.662 0 .743-2.587.848-2.821 1.082s-.01 1.368-.532 1.588a1.1 1.1 0 0 1-.409.056c-.393 0-.95-.077-1.536-.077-.509 0-1.04.058-1.507.273-1.239.572-2.433 1.641-3.914 1.641S9.325 21.2 8.086 20.628c-.467-.216-.998-.273-1.507-.273-.586 0-1.143.077-1.536.077-.17 0-.31-.014-.409-.056-.522-.22-.299-1.354-.532-1.588s-2.821-.337-2.821-1.08c0-.592 3.432-.119 4.661-4.662a.824.824 0 0 0-.486-.98l-1.532-.618a.74.74 0 0 1-.479-.861.56.56 0 0 1 .679-.419l1.009.237q.086.02.169.02a.737.737 0 0 0 .733-.689q.065-.961.067-2.094c.004-3.229 2.666-5.91 5.887-5.912m0-1.281c-.961 0-1.898.194-2.784.574A7.2 7.2 0 0 0 6.93 2.572a7.2 7.2 0 0 0-1.539 2.282A7.1 7.1 0 0 0 4.82 7.64a33 33 0 0 1-.029 1.369l-.375-.088a2 2 0 0 0-.421-.049 1.86 1.86 0 0 0-1.135.389 1.84 1.84 0 0 0-.666 1.049 2.024 2.024 0 0 0 1.271 2.335l1.124.454c-.744 2.285-2.117 2.723-3.041 3.018a5 5 0 0 0-.659.246C.087 16.76 0 17.436 0 17.708c0 .521.247.996.694 1.339.223.17.499.311.844.43.47.162 1.016.265 1.459.347.021.164.053.341.106.518.22.738.684 1.069 1.034 1.217.332.14.676.156.905.156.224 0 .462-.018.713-.036.269-.02.548-.041.823-.041.426 0 .743.051.97.155.311.144.64.337.989.542.972.571 2.073 1.217 3.462 1.217s2.49-.647 3.462-1.217c.349-.205.679-.399.989-.542.226-.105.544-.155.97-.155.275 0 .554.021.823.041.251.019.488.036.713.036.229 0 .573-.016.905-.156.35-.147.814-.478 1.034-1.217.053-.178.084-.354.106-.518.443-.082.989-.185 1.459-.347.345-.119.621-.259.844-.43.448-.342.694-.818.694-1.339 0-.272-.087-.948-.891-1.347a5 5 0 0 0-.659-.246c-.924-.295-2.297-.733-3.041-3.018l1.124-.454a2.025 2.025 0 0 0 1.271-2.335 1.83 1.83 0 0 0-.666-1.049 1.86 1.86 0 0 0-1.556-.34l-.375.088a33 33 0 0 1-.029-1.369 7.1 7.1 0 0 0-.575-2.789c-.365-.853-.886-1.62-1.547-2.282s-1.428-1.182-2.28-1.547a7.1 7.1 0 0 0-2.786-.574"})))},{name:"soundcloud",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M23.587 13.923a3.303 3.303 0 0 1-3.344 3.117h-8.037a.674.674 0 0 1-.667-.67V7.717a.74.74 0 0 1 .444-.705s.739-.512 2.296-.512a5.27 5.27 0 0 1 2.702.742 5.35 5.35 0 0 1 2.516 3.485 3.1 3.1 0 0 1 .852-.116 3.217 3.217 0 0 1 3.237 3.312m-13.05-5.659c.242 2.935.419 5.612 0 8.538a.261.261 0 0 1-.519 0c-.39-2.901-.221-5.628 0-8.538a.26.26 0 0 1 .398-.25.26.26 0 0 1 .12.25zm-1.627 8.541a.273.273 0 0 1-.541 0 32.7 32.7 0 0 1 0-7.533.274.274 0 0 1 .544 0 29.4 29.4 0 0 1-.003 7.533m-1.63-7.788c.264 2.69.384 5.099-.003 7.782a.262.262 0 0 1-.522 0c-.374-2.649-.249-5.127 0-7.782a.264.264 0 0 1 .525 0m-1.631 7.792a.268.268 0 0 1-.532 0 27.6 27.6 0 0 1 0-7.034.27.27 0 1 1 .541 0 25.8 25.8 0 0 1-.01 7.034zm-1.63-5.276c.412 1.824.227 3.435-.015 5.294a.255.255 0 0 1-.504 0c-.22-1.834-.402-3.482-.015-5.295a.268.268 0 0 1 .535 0m-1.626-.277c.378 1.869.254 3.451-.01 5.325-.031.277-.506.28-.531 0-.239-1.846-.352-3.476-.01-5.325a.277.277 0 0 1 .551 0m-1.643.907c.396 1.239.261 2.246-.016 3.517a.258.258 0 0 1-.514 0c-.239-1.246-.336-2.274-.021-3.517a.276.276 0 0 1 .55 0z"})))},{name:"spotify",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424a.62.62 0 0 1-.857.207c-2.348-1.435-5.304-1.76-8.785-.964a.622.622 0 1 1-.277-1.215c3.809-.871 7.077-.496 9.713 1.115a.623.623 0 0 1 .206.857M17.81 13.7a.78.78 0 0 1-1.072.257c-2.687-1.652-6.785-2.131-9.965-1.166A.779.779 0 1 1 6.32 11.3c3.632-1.102 8.147-.568 11.234 1.328a.78.78 0 0 1 .256 1.072m.105-2.835c-3.223-1.914-8.54-2.09-11.618-1.156a.935.935 0 1 1-.542-1.79c3.532-1.072 9.404-.865 13.115 1.338a.936.936 0 1 1-.955 1.608"})))},{name:"squarespace",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M20.87 9.271a3.86 3.86 0 0 0-5.458 0l-6.141 6.141a.964.964 0 1 0 1.365 1.364l6.14-6.14a1.929 1.929 0 1 1 2.729 2.729l-6.022 6.022a1.93 1.93 0 0 0 2.729 0l4.658-4.658a3.86 3.86 0 0 0 0-5.458m-2.047 2.047a.965.965 0 0 0-1.365 0l-6.14 6.14a1.93 1.93 0 0 1-2.729 0 .964.964 0 1 0-1.364 1.364 3.86 3.86 0 0 0 5.458 0l6.14-6.14a.966.966 0 0 0 0-1.364m-2.047-6.141a3.86 3.86 0 0 0-5.458 0l-6.14 6.14a.964.964 0 1 0 1.364 1.364l6.141-6.14a1.93 1.93 0 0 1 2.729 0 .965.965 0 1 0 1.364-1.364m-2.047 2.047a.964.964 0 0 0-1.364 0l-6.14 6.141a1.929 1.929 0 1 1-2.729-2.729l6.022-6.022a1.93 1.93 0 0 0-2.729 0L3.13 9.271a3.86 3.86 0 0 0 5.458 5.458l6.14-6.141a.963.963 0 0 0 .001-1.364"})))},{name:"stackexchange",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M4 11.606h16v3.272H4zM4 7.377h16v3.272H4zM17.514 3H6.55C5.147 3 4 4.169 4 5.614v.848h16v-.85C20 4.167 18.895 3 17.514 3M4 15.813v.85c0 1.445 1.147 2.614 2.55 2.614h6.799v3.463l3.357-3.463h.744c1.402 0 2.55-1.169 2.55-2.614v-.85z"})))},{name:"stackoverflow",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M18.18 20.103V14.78h1.767v7.09H4v-7.09h1.767v5.323z"}),React.createElement("path",{d:"m7.717 14.275 8.673 1.813.367-1.744-8.673-1.813zm1.147-4.13 8.031 3.74.734-1.606-8.031-3.763zm2.226-3.946 6.815 5.667 1.124-1.354-6.815-5.667zM15.495 2l-1.423 1.055 5.277 7.113 1.423-1.055zM7.533 18.314h8.857v-1.767H7.533z"})))},{name:"stumbleupon",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 4.294a4.47 4.47 0 0 0-4.471 4.471v6.353a1.059 1.059 0 1 1-2.118 0v-2.824H2v2.941a4.471 4.471 0 0 0 8.942 0v-6.47a1.059 1.059 0 1 1 2.118 0v1.294l1.412.647 2-.647V8.765A4.473 4.473 0 0 0 12 4.294m1.059 8.059v2.882a4.471 4.471 0 0 0 8.941 0v-2.824h-3.412v2.824a1.059 1.059 0 1 1-2.118 0v-2.882l-2 .647z"})))},{name:"substack",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M19.904 9.182H4.095V7.054h15.81v2.127M4.095 11.109V21L12 16.583 19.905 21v-9.891zM19.905 3H4.095v2.127h15.81z"})))},{name:"telegram",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m3.08 14.757s-.25.625-.936.325l-2.541-1.949-1.63 1.486s-.127.096-.266.036c0 0-.12-.011-.27-.486s-.911-2.972-.911-2.972L6 12.349s-.387-.137-.425-.438c-.037-.3.437-.462.437-.462l10.03-3.934s.824-.362.824.238z"})))},{name:"threads",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 192 192"},React.createElement("g",null,React.createElement("path",{d:"M141.537 88.988a67 67 0 0 0-2.518-1.143c-1.482-27.307-16.403-42.94-41.457-43.1h-.34c-14.986 0-27.449 6.396-35.12 18.036l13.779 9.452c5.73-8.695 14.724-10.548 21.348-10.548h.229c8.249.053 14.474 2.452 18.503 7.129 2.932 3.405 4.893 8.111 5.864 14.05-7.314-1.243-15.224-1.626-23.68-1.14-23.82 1.371-39.134 15.264-38.105 34.568.522 9.792 5.4 18.216 13.735 23.719 7.047 4.652 16.124 6.927 25.557 6.412 12.458-.683 22.231-5.436 29.049-14.127 5.178-6.6 8.453-15.153 9.899-25.93 5.937 3.583 10.337 8.298 12.767 13.966 4.132 9.635 4.373 25.468-8.546 38.376-11.319 11.308-24.925 16.2-45.488 16.351-22.809-.169-40.06-7.484-51.275-21.742C35.236 139.966 29.808 120.682 29.605 96c.203-24.682 5.63-43.966 16.133-57.317C56.954 24.425 74.204 17.11 97.013 16.94c22.975.17 40.526 7.52 52.171 21.847 5.71 7.026 10.015 15.86 12.853 26.162l16.147-4.308c-3.44-12.68-8.853-23.606-16.219-32.668C147.036 9.607 125.202.195 97.07 0h-.113C68.882.194 47.292 9.642 32.788 28.08 19.882 44.485 13.224 67.315 13.001 95.932L13 96v.067c.224 28.617 6.882 51.447 19.788 67.854C47.292 182.358 68.882 191.806 96.957 192h.113c24.96-.173 42.554-6.708 57.048-21.189 18.963-18.945 18.392-42.692 12.142-57.27-4.484-10.454-13.033-18.945-24.723-24.553M98.44 129.507c-10.44.588-21.286-4.098-21.82-14.135-.397-7.442 5.296-15.746 22.461-16.735q2.948-.17 5.79-.169c6.235 0 12.068.606 17.371 1.765-1.978 24.702-13.58 28.713-23.802 29.274"})))},{name:"tiktok-alt",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M5 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm7.531 3h2.053s-.114 2.635 2.85 2.82v2.04s-1.582.099-2.85-.87l.021 4.207a3.804 3.804 0 1 1-3.802-3.802h.533v2.082a1.73 1.73 0 0 0-1.922.648 1.727 1.727 0 0 0 1.947 2.646 1.73 1.73 0 0 0 1.19-1.642z"})))},{name:"tiktok",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12.22 2h3.42s-.19 4.394 4.75 4.702v3.396s-2.636.166-4.75-1.448l.037 7.012a6.338 6.338 0 1 1-6.34-6.339h.89v3.472a2.882 2.882 0 1 0 2.024 2.752z"})))},{name:"tripadvisor",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M21.01 9.859c.236-1.002.985-2.003.985-2.003l-3.341-.002C16.779 6.643 14.502 6 11.979 6 9.363 6 7 6.659 5.135 7.877L2 7.88s.74.988.98 1.983a4.98 4.98 0 0 0-.977 2.961 5.01 5.01 0 0 0 5.009 5.003 5 5 0 0 0 3.904-1.875l1.065 1.592 1.076-1.606a4.96 4.96 0 0 0 1.838 1.448 4.98 4.98 0 0 0 3.831.151 5.01 5.01 0 0 0 2.963-6.431 5 5 0 0 0-.679-1.247m-13.998 6.96a4 4 0 0 1-3.998-3.995 4 4 0 0 1 3.998-3.997 4 4 0 0 1 3.996 3.997 4 4 0 0 1-3.996 3.995m4.987-4.36A5.007 5.007 0 0 0 7.11 7.821c1.434-.613 3.081-.947 4.867-.947 1.798 0 3.421.324 4.853.966a4.984 4.984 0 0 0-4.831 4.619m6.288 4.134a3.97 3.97 0 0 1-3.058-.122 3.96 3.96 0 0 1-2.075-2.245v-.001a3.97 3.97 0 0 1 .118-3.056 3.97 3.97 0 0 1 2.246-2.077 4.005 4.005 0 0 1 5.135 2.366 4.006 4.006 0 0 1-2.366 5.135"}),React.createElement("path",{d:"M6.949 10.307a2.477 2.477 0 0 0-2.475 2.472 2.48 2.48 0 0 0 2.475 2.474 2.474 2.474 0 0 0 0-4.946m0 4.094a1.626 1.626 0 0 1-1.624-1.623 1.621 1.621 0 1 1 1.624 1.623M16.981 10.307a2.477 2.477 0 0 0-2.474 2.472 2.48 2.48 0 0 0 2.474 2.474 2.476 2.476 0 0 0 2.472-2.474 2.475 2.475 0 0 0-2.472-2.472m0 4.094a1.625 1.625 0 0 1-1.622-1.623 1.622 1.622 0 1 1 1.622 1.623"}),React.createElement("path",{d:"M7.778 12.778a.832.832 0 1 1-1.664.002.832.832 0 0 1 1.664-.002M16.981 11.947a.832.832 0 1 0 .002 1.666.832.832 0 0 0-.002-1.666"})))},{name:"tumblr-alt",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M16.749 17.396c-.357.17-1.041.319-1.551.332-1.539.041-1.837-1.081-1.85-1.896V9.847h3.861v-2.91h-3.847V2.039h-2.817c-.046 0-.127.041-.138.144-.165 1.499-.867 4.13-3.783 5.181v2.484h1.945v6.282c0 2.151 1.587 5.206 5.775 5.135 1.413-.024 2.982-.616 3.329-1.126z"})))},{name:"tumblr",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m-5.569 14.265c-2.446.042-3.372-1.742-3.372-2.998v-3.668H8.923v-1.45c1.703-.614 2.113-2.15 2.209-3.025.007-.06.054-.084.081-.084h1.645V8.9h2.246v1.7H12.85v3.495c.008.476.182 1.131 1.081 1.107.298-.008.697-.094.906-.194l.54 1.601c-.205.296-1.121.641-1.946.656"})))},{name:"twitch",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M16.499 8.089h-1.636v4.91h1.636zm-4.499 0h-1.637v4.91H12zM4.228 3.178 3 6.451v13.092h4.499V22h2.456l2.454-2.456h3.681L21 14.636V3.178zm15.136 10.638L16.5 16.681H12l-2.453 2.453V16.68H5.863V4.814h13.501z"})))},{name:"twitter-alt",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M22.23 5.924a8.2 8.2 0 0 1-2.357.646 4.12 4.12 0 0 0 1.804-2.27 8.2 8.2 0 0 1-2.606.996 4.103 4.103 0 0 0-6.991 3.742 11.65 11.65 0 0 1-8.457-4.287 4.1 4.1 0 0 0-.556 2.063 4.1 4.1 0 0 0 1.825 3.415 4.1 4.1 0 0 1-1.859-.513v.052a4.104 4.104 0 0 0 3.292 4.023 4.1 4.1 0 0 1-1.853.07 4.11 4.11 0 0 0 3.833 2.85 8.24 8.24 0 0 1-5.096 1.756 8 8 0 0 1-.979-.057 11.6 11.6 0 0 0 6.29 1.843c7.547 0 11.675-6.252 11.675-11.675q0-.267-.012-.531a8.3 8.3 0 0 0 2.047-2.123"})))},{name:"twitter",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m-2.534 6.71q.007.148.007.298c0 3.045-2.318 6.556-6.556 6.556a6.5 6.5 0 0 1-3.532-1.035q.27.032.55.032a4.63 4.63 0 0 0 2.862-.986 2.31 2.31 0 0 1-2.152-1.6 2.3 2.3 0 0 0 1.04-.04 2.306 2.306 0 0 1-1.848-2.259v-.029c.311.173.666.276 1.044.288a2.303 2.303 0 0 1-.713-3.076 6.54 6.54 0 0 0 4.749 2.407 2.305 2.305 0 0 1 3.926-2.101 4.6 4.6 0 0 0 1.463-.559 2.3 2.3 0 0 1-1.013 1.275c.466-.056.91-.18 1.323-.363-.31.461-.7.867-1.15 1.192"})))},{name:"untappd",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"m11 13.299-5.824 8.133c-.298.416-.8.635-1.308.572-.578-.072-1.374-.289-2.195-.879S.392 19.849.139 19.323a1.4 1.4 0 0 1 .122-1.425l5.824-8.133a3.1 3.1 0 0 1 1.062-.927l1.146-.604c.23-.121.436-.283.608-.478.556-.631 2.049-2.284 4.696-4.957l.046-.212a.13.13 0 0 1 .096-.1l.146-.037a.135.135 0 0 0 .101-.141l-.015-.18a.13.13 0 0 1 .125-.142c.176-.005.518.046 1.001.393s.64.656.692.824a.13.13 0 0 1-.095.164l-.175.044a.13.13 0 0 0-.101.141l.012.15a.13.13 0 0 1-.063.123l-.186.112c-1.679 3.369-2.764 5.316-3.183 6.046a2.2 2.2 0 0 0-.257.73l-.205 1.281A3.1 3.1 0 0 1 11 13.3zm12.739 4.598-5.824-8.133a3.1 3.1 0 0 0-1.062-.927l-1.146-.605a2.1 2.1 0 0 1-.608-.478 51 51 0 0 0-.587-.654.09.09 0 0 0-.142.018 97 97 0 0 1-1.745 3.223 1.4 1.4 0 0 0-.171.485 3.5 3.5 0 0 0 0 1.103l.01.064c.075.471.259.918.536 1.305l5.824 8.133c.296.413.79.635 1.294.574a4.76 4.76 0 0 0 2.209-.881 4.76 4.76 0 0 0 1.533-1.802 1.4 1.4 0 0 0-.122-1.425zM8.306 3.366l.175.044a.134.134 0 0 1 .101.141l-.012.15a.13.13 0 0 0 .063.123l.186.112q.465.933.869 1.721c.026.051.091.06.129.019q.655-.703 1.585-1.668a.137.137 0 0 0 .003-.19c-.315-.322-.645-.659-1.002-1.02l-.046-.212a.13.13 0 0 0-.096-.099l-.146-.037a.135.135 0 0 1-.101-.141l.015-.18a.13.13 0 0 0-.123-.142c-.175-.005-.518.045-1.002.393-.483.347-.64.656-.692.824a.13.13 0 0 0 .095.164z"})))},{name:"vimeo",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M22.396 7.164q-.139 3.039-4.245 8.32Q13.907 21 10.97 21q-1.82 0-3.079-3.359l-1.68-6.159q-.934-3.36-2.005-3.36-.234.001-1.634.98l-.978-1.261q1.541-1.353 3.037-2.708 2.056-1.774 3.084-1.869 2.429-.234 2.99 3.321.607 3.836.841 4.769.7 3.181 1.542 3.181.653 0 1.963-2.065 1.307-2.063 1.401-3.142.187-1.781-1.401-1.782-.747.001-1.541.341 1.534-5.024 5.862-4.884 3.21.095 3.024 4.161"})))},{name:"vk",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{fillRule:"evenodd",d:"M1.687 1.687C0 3.374 0 6.09 0 11.52v.96c0 5.431 0 8.146 1.687 9.833S6.09 24 11.52 24h.96c5.431 0 8.146 0 9.833-1.687S24 17.91 24 12.48v-.96c0-5.431 0-8.146-1.687-9.833S17.91 0 12.48 0h-.96C6.09 0 3.374 0 1.687 1.687M4.05 7.3c.13 6.24 3.25 9.99 8.72 9.99h.31v-3.57c2.01.2 3.53 1.67 4.14 3.57h2.84c-.78-2.84-2.83-4.41-4.11-5.01 1.28-.74 3.08-2.54 3.51-4.98h-2.58c-.56 1.98-2.22 3.78-3.8 3.95V7.3H10.5v6.92c-1.6-.4-3.62-2.34-3.71-6.92z"})))},{name:"whatsapp",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"m2.048 22 1.406-5.136a9.9 9.9 0 0 1-1.323-4.955C2.133 6.446 6.579 2 12.042 2a9.85 9.85 0 0 1 7.011 2.906 9.85 9.85 0 0 1 2.9 7.011c-.002 5.464-4.448 9.91-9.91 9.91h-.004a9.9 9.9 0 0 1-4.736-1.206zm5.497-3.172.301.179a8.2 8.2 0 0 0 4.193 1.148h.003c4.54 0 8.235-3.695 8.237-8.237a8.2 8.2 0 0 0-2.41-5.828 8.18 8.18 0 0 0-5.824-2.416c-4.544 0-8.239 3.695-8.241 8.237a8.2 8.2 0 0 0 1.259 4.384l.196.312-.832 3.04zm9.49-4.554c-.062-.103-.227-.165-.475-.289s-1.465-.723-1.692-.806-.392-.124-.557.124-.64.806-.784.971-.289.186-.536.062-1.046-.385-1.991-1.229c-.736-.657-1.233-1.468-1.378-1.715s-.015-.382.109-.505c.111-.111.248-.289.371-.434.124-.145.165-.248.248-.413s.041-.31-.021-.434-.557-1.343-.763-1.839c-.202-.483-.407-.417-.559-.425-.144-.007-.31-.009-.475-.009a.9.9 0 0 0-.66.31c-.226.248-.866.847-.866 2.066s.887 2.396 1.011 2.562 1.746 2.666 4.23 3.739c.591.255 1.052.408 1.412.522.593.189 1.133.162 1.56.098.476-.071 1.465-.599 1.671-1.177.206-.58.206-1.075.145-1.179"})))},{name:"woocommerce",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M19 2H5C3.3 2 2 3.3 2 5v11c0 1.7 1.3 3 3 3h4l6 3-1-3h5c1.7 0 3-1.3 3-3V5c0-1.7-1.3-3-3-3m-1.6 4.5c-.4.8-.8 2.1-1 3.9-.3 1.8-.4 3.1-.3 4.1 0 .3 0 .5-.1.7s-.3.4-.6.4-.6-.1-.9-.4c-1-1-1.8-2.6-2.4-4.6-.7 1.4-1.2 2.4-1.6 3.1-.6 1.2-1.2 1.8-1.6 1.9-.3 0-.5-.2-.8-.7-.5-1.4-1.1-4.2-1.7-8.2 0-.3 0-.5.2-.7.1-.2.4-.3.7-.4.5 0 .9.2.9.8.3 2.3.7 4.2 1.1 5.7l2.4-4.5c.2-.4.4-.6.8-.6q.75 0 .9.9c.3 1.4.6 2.6 1 3.7.3-2.7.8-4.7 1.4-5.9.2-.3.4-.5.7-.5.2 0 .5.1.7.2q.3.3.3.6c0 .3 0 .4-.1.5"})))},{name:"wordpress",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12.158 12.786 9.46 20.625a9 9 0 0 0 5.526-.144 1 1 0 0 1-.065-.124zM3.009 12a8.99 8.99 0 0 0 5.067 8.092L3.788 8.341A8.95 8.95 0 0 0 3.009 12m15.06-.454c0-1.112-.399-1.881-.741-2.48-.456-.741-.883-1.368-.883-2.109 0-.826.627-1.596 1.51-1.596q.06.002.116.007A8.96 8.96 0 0 0 12 3.009a8.98 8.98 0 0 0-7.512 4.052c.211.007.41.011.579.011.94 0 2.396-.114 2.396-.114.484-.028.541.684.057.741 0 0-.487.057-1.029.085l3.274 9.739 1.968-5.901-1.401-3.838c-.484-.028-.943-.085-.943-.085-.485-.029-.428-.769.057-.741 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.485-.028.542.684.057.741 0 0-.488.057-1.029.085l3.249 9.665.897-2.996q.684-1.753.684-2.907m1.82-3.86q.06.428.06.924c0 .912-.171 1.938-.684 3.22l-2.746 7.94a8.98 8.98 0 0 0 4.47-7.771 8.9 8.9 0 0 0-1.1-4.313M12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})))},{name:"x",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387z"})))},{name:"xanga",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M9 9h6v6H9zM3 9h6V3H3zm12 0h6V3h-6zm0 12h6v-6h-6zM3 21h6v-6H3z"})))},{name:"youtube",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M21.8 8.001s-.195-1.378-.795-1.985c-.76-.797-1.613-.801-2.004-.847-2.799-.202-6.997-.202-6.997-.202h-.009s-4.198 0-6.997.202c-.39.047-1.242.051-2.003.847-.6.607-.795 1.985-.795 1.985S2 9.62 2 11.238v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.761.797 1.76.771 2.205.855 1.6.153 6.8.201 6.8.201s4.203-.006 7.001-.209c.391-.047 1.243-.051 2.004-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517c0-1.618-.2-3.237-.2-3.237M9.935 14.594l-.001-5.62 5.404 2.82z"})))}]},58992:(e,t,n)=>{"use strict";n.d(t,{d:()=>u});var a=n(96072),r=n.n(a),s=n(28120),o=n.n(s),i=n(51609),l=n.n(i),c=n(91135);class u extends i.PureComponent{static defaultProps={size:24};static propTypes={icon:o().string.isRequired,size:o().number,onClick:o().func,className:o().string};render(){const{size:e,onClick:t,icon:n,className:a,...s}=this.props,o=["social-logo","social-logo-"+n,a].filter(Boolean).join(" "),i=c.$.find((e=>e.name===n));if(!i)return l().createElement("svg",r()({height:e,width:e},s));return l().cloneElement(i.svg,{className:o,height:e,width:e,onClick:t,...s})}}},52068:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>y});var a=n(82170),r=n(96865),s=n(56427),o=n(47143),i=n(27723),l=n(90254),c=n(69457),u=n(88669),d=n(41417),p=n(57003),m=(n(51609),n(95396)),h=n(2162),g=n(62402);const __=i.__,f="simplify",v="make-longer",b="make-shorter",k={default:[{name:r.DD,key:"correct-spelling",aiSuggestion:r.yy,icon:l.A}],"core/paragraph":[{name:r.HM,key:f,aiSuggestion:r.A4,icon:c.A},{name:r.JR,key:"summarize",aiSuggestion:r.UA,icon:u.A},{name:r.K2,key:v,aiSuggestion:r.br,icon:d.A},{name:r.UD,key:b,aiSuggestion:r.fD,icon:d.A}],"core/list-item":[{name:r.HM,key:f,aiSuggestion:r.A4,icon:c.A},{name:r.K2,key:v,aiSuggestion:r.br,icon:d.A},{name:r.UD,key:b,aiSuggestion:r.fD,icon:d.A}],"core/list":m.L.includes("core/list")?[{name:r.HM,key:f,aiSuggestion:r.A4,icon:c.A},{name:r.K2,key:v,aiSuggestion:r.br,icon:d.A},{name:r.UD,key:b,aiSuggestion:r.fD,icon:d.A},{name:r.mI,key:"turn-list-into-table",aiSuggestion:r.d5,icon:p.A,options:{alwaysTransformToAIAssistant:!0,rootParentOnly:!0}}]:[{name:r.yQ,key:"write-post-from-list",aiSuggestion:r.pE,icon:c.A,options:{userPrompt:"Write a post based on the list items. Include a title as first order heading and try to use secondary headings for each entry"}}]};function y({blockType:e,clientId:t,disabled:n=!1,onAskAiAssistant:i,onRequestSuggestion:l}){const c=k[e]??[],{getBlockParents:u}=(0,o.select)("core/block-editor"),d=u(t);return(0,a.createElement)(a.Fragment,null,n&&(0,a.createElement)(s.Notice,{status:"warning",isDismissible:!1,className:"jetpack-ai-assistant__info"},__("Add content to activate the tools below","jetpack")),(0,a.createElement)(s.MenuGroup,null,(0,a.createElement)(s.MenuItem,{icon:r.cj,iconPosition:"left",key:"key-ai-assistant",onClick:i,disabled:n},(0,a.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},__("Ask AI Assistant","jetpack"))),[...k.default,...c].filter((e=>!(e.options?.rootParentOnly&&d.length>0))).map((e=>(0,a.createElement)(s.MenuItem,{icon:e?.icon,iconPosition:"left",key:`key-${e.key}`,onClick:()=>{l(e.aiSuggestion,{...e.options??{}})},disabled:n},(0,a.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},e.name)))),(0,a.createElement)(g.hN,{onChange:e=>{l(r.eJ,{tone:e})},disabled:n}),(0,a.createElement)(h.HU,{onChange:e=>{l(r.Gm,{language:e})},disabled:n})))}},32249:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(82170),r=n(3924),s=n(56427),o=n(27723);const __=o.__;const i=function(){const e=(0,r.A)("jetpack-ai-feedback");return(0,a.createElement)("div",{className:"jetpack-ai-feedback-control"},(0,a.createElement)(s.BaseControl,null,(0,a.createElement)(s.BaseControl.VisualLabel,null,__("Feedback","jetpack")),(0,a.createElement)("p",null,__("Your feedback is valuable in our commitment to refine and improve this feature.","jetpack")),(0,a.createElement)(s.ExternalLink,{href:e},__("Share your feedback","jetpack"))))}},2162:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>g,HU:()=>f});var a=n(82170),r=n(96865),s=n(85985),o=n(56427),i=n(27723),l=n(51113),c=n(84066),u=n(29115);n(51609);const __=i.__,d=["en","es","fr","de","it","pt","ru","zh","ja","ar","hi","ko"],p=window?.Jetpack_Editor_Initial_State?.siteLocale||navigator?.language,m=p?.split("-")[0]||"en",h=(p?.split("-"),({value:e,onChange:t})=>{const n=[...d.filter((e=>e!==m))];return d.includes(m)&&n.unshift(m),(0,a.createElement)(o.MenuGroup,{label:__("Select language","jetpack")},n.map((n=>(0,a.createElement)(o.MenuItem,{key:`key-${n}`,onClick:()=>t(n+" ("+r.so[n].label+")"),isSelected:e===n},r.so[n].label))))});function g({value:e=m,label:t=r.u0,onChange:n,disabled:i=!1}){const{tracks:u}=(0,s.st)();return i?(0,a.createElement)(o.Tooltip,{text:t},(0,a.createElement)(o.Button,{disabled:!0},(0,a.createElement)(l.A,{icon:c.A}))):(0,a.createElement)(o.ToolbarDropdownMenu,{icon:c.A,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&u.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"i18n"})}},(()=>(0,a.createElement)(h,{value:e,onChange:n})))}function f({value:e=m,label:t=r.u0,onChange:n,disabled:s=!1}){return(0,a.createElement)(o.DropdownMenu,{className:"ai-assistant__i18n-dropdown",icon:c.A,label:t,toggleProps:{children:(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"ai-assistant__i18n-dropdown__toggle-label"},t),(0,a.createElement)(l.A,{icon:u.A})),disabled:s}},(({onClose:t})=>(0,a.createElement)(h,{onChange:(...e)=>{n(...e),t()},value:e})))}},99050:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>u});var a=n(82170),r=n(96865),s=n(85985),o=n(56427),i=n(27723),l=n(78938);const __=i.__,c=[{name:__("Summarize","jetpack"),key:"summarize",aiSuggestion:r.UA},{name:__("Make longer","jetpack"),key:"make-longer",aiSuggestion:r.br},{name:__("Make shorter","jetpack"),key:"make-shorter",aiSuggestion:r.fD}];function u({key:e,label:t=__("Improve","jetpack"),exclude:n=[],onChange:r,disabled:i=!1}){const{tracks:u}=(0,s.st)();return i?(0,a.createElement)(o.Tooltip,{text:t},(0,a.createElement)(o.Button,{disabled:!0},(0,a.createElement)(o.Icon,{icon:l.A}))):(0,a.createElement)(o.ToolbarDropdownMenu,{icon:l.A,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&u.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"improve"})}},(()=>{const s=c.filter((e=>!n.includes(e.key)));return(0,a.createElement)(o.MenuGroup,{label:t},s.map((t=>(0,a.createElement)(o.MenuItem,{key:`key-${t.key}`,onClick:()=>r(t.aiSuggestion,{contentType:"generated"}),isSelected:e===t.key},t.name))))}))}},33468:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>f});var a=n(82170),r=n(96865),s=n(85985),o=n(56427),i=n(27723),l=n(78938),c=n(41417),u=n(90254),d=n(69457),p=n(88669),m=n(11269);const __=i.__,h=[{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")+" "}}],g=[{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 f({hasContentBefore:e,hasContent:t,hasPostTitle:n,contentIsLoaded:i,onPromptSelect:f,onSuggestionSelect:v}){const b=__("Write with AI…","jetpack"),{tracks:k}=(0,s.st)();return(0,a.createElement)(o.ToolbarDropdownMenu,{className:"jetpack-ai-assistant__templates-control",icon:null,label:b,text:b,onToggle:e=>{e&&k.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"write-with-ai"})}},(({onClose:s})=>i?(0,a.createElement)(o.MenuGroup,{label:__("Write…","jetpack")},g.map(((e,t)=>(0,a.createElement)(o.MenuItem,{icon:l.A,iconPosition:"left",key:`key-${t}`,onClick:()=>{s(),f(e.description)}},e.label)))):(0,a.createElement)(a.Fragment,null,e&&(0,a.createElement)(o.MenuGroup,{label:__("Based on preceding content…","jetpack")},(0,a.createElement)(o.MenuItem,{icon:c.A,iconPosition:"left",onClick:()=>v(r.sn)},r.DT),(0,a.createElement)(o.MenuItem,{icon:u.A,iconPosition:"left",onClick:()=>v(r.yy)},r.DD),(0,a.createElement)(o.MenuItem,{icon:d.A,iconPosition:"left",onClick:()=>v(r.A4)},r.HM)),t&&(0,a.createElement)(o.MenuGroup,{label:__("Based on entire content…","jetpack")},t&&(0,a.createElement)(o.MenuItem,{icon:p.A,iconPosition:"left",onClick:()=>v(r.UA)},r.JR),t&&(0,a.createElement)(o.MenuItem,{icon:m.A,iconPosition:"left",onClick:()=>v(r.vE)},r.mT)),(0,a.createElement)(o.MenuGroup,{label:__("Write…","jetpack")},n&&(0,a.createElement)(o.MenuItem,{icon:l.A,iconPosition:"left",onClick:()=>v(r.im)},r.Rq),h.map(((e,t)=>(0,a.createElement)(o.MenuItem,{icon:l.A,iconPosition:"left",key:`key-${t}`,onClick:()=>{s(),f(e.description)}},e.label)))))))}},23e3:(e,t,n)=>{"use strict";n.d(t,{A:()=>b,Q:()=>v});var a=n(82170),r=n(3924),s=n(85985),o=n(56427),i=n(86087),l=n(27723),c=n(10067),u=n.n(c),d=n(56333),p=n(92169),m=n(61297),h=n(7503),g=n(93094);const __=l.__,f=u()("jetpack-ai-assistant:upgrade-prompt"),v=({variant:e="error"})=>{const t=(()=>{const{usagePeriod:e}=(0,m.A)(),t=(e=>{const t=__("You've reached this month's request limit, per our fair usage policy.","jetpack");if(!e)return t; +__("%d connections","jetpack"),e.length):__("Connected","jetpack"))}},78362:(e,t,n)=>{"use strict";n.d(t,{b:()=>l});var r=n(47143),a=n(31963),s=n(59008),o=n(42475),i=n(39630);function l(){const e=(0,i.o)(),t=(0,r.useSelect)((e=>e(a.M_).getConnections().reduce(((e,t)=>(e[t.service_name]||(e[t.service_name]=[]),e[t.service_name].push(t),e)),{})),[]),n=(0,r.useSelect)((e=>e(a.M_).getReconnectingAccount()),[]);return React.createElement("ul",{className:o.A.services},e.map((e=>React.createElement("li",{key:e.ID,className:o.A["service-list-item"]},React.createElement(s.j,{service:e,serviceConnections:t[e.ID]||[],isPanelDefaultOpen:n?.service_name===e.ID})))))}},70745:(e,t,n)=>{"use strict";n.d(t,{P:()=>u});var r=n(63406),a=n(47143),s=n(86087),o=n(27723),i=n(31963),l=n(70407);const __=o.__,c=e=>/^@?\b([A-Z0-9_]+)@([A-Z0-9.-]+\.[A-Z]{2,})$/gi.test(e);function u({service:e,onConfirm:t}){const{createErrorNotice:n}=(0,r.I)(),o=(0,a.useSelect)((e=>e(i.M_).isMastodonAccountAlreadyConnected),[]),u=(0,a.useSelect)((e=>e(i.M_).isBlueskyAccountAlreadyConnected),[]);return(0,s.useCallback)((r=>{const a=new URL(e.connect_URL);switch(e.ID){case"mastodon":{const e=r.get("instance").toString().trim();if(!c(e))return void n(__("Invalid Mastodon username","jetpack"));if(o?.(e))return void n(__("This Mastodon account is already connected","jetpack"));a.searchParams.set("instance",e);break}case"bluesky":{const e=(r.get("handle")?.toString()||"").trim().replace(/^@/,"");if(!function(e){const t=e.split(".").filter(Boolean);return!(t.length<2)&&t.every((e=>/^[a-z0-9_-]+$/i.test(e)))}(e))return void n(__("Invalid Bluesky handle","jetpack"));if(u?.(e))return void n(__("This Bluesky account is already connected","jetpack"));a.searchParams.set("handle",e),a.searchParams.set("app_password",(r.get("app_password")?.toString()||"").trim());break}}(0,l.requestExternalAccess)(a.toString(),t)}),[n,u,o,t,e.ID,e.connect_URL])}},9515:(e,t,n)=>{"use strict";n.d(t,{h:()=>s});var r=n(51609),a=n(48712);function s(){const e=(0,a.h)();return(0,r.useCallback)((t=>e(t)?.label||t[0].toUpperCase()+t.substring(1)),[e])}},48712:(e,t,n)=>{"use strict";n.d(t,{h:()=>s});var r=n(51609),a=n(39630);function s(){const e=(0,a.o)(),t=(0,r.useMemo)((()=>e.reduce(((e,t)=>(e[t.ID]=t,e)),{})),[e]);return(0,r.useCallback)((e=>t[e]),[t])}},39630:(e,t,n)=>{"use strict";n.d(t,{o:()=>f});var r=n(96072),a=n.n(r),s=n(78478),o=n(56427),i=n(86087),l=n(27723),c=n(30081),u=n(26818),d=n(43443),p=n(11326),m=n(65398),h=n(9791),g=n(51371);const __=l.__;function f(){const e=(0,i.useMemo)((()=>{const{supported_services:e}=(0,g.n)();return e.reduce(((e,t)=>({...e,[t.ID]:t})),{})}),[]),t={text:__("New","jetpack"),style:{background:"#e9eff5",color:"#0675C4"}};return[{...e.facebook,icon:e=>React.createElement(s.M5,a()({serviceName:"facebook"},e)),description:__("Share to your pages","jetpack"),examples:[()=>React.createElement(React.Fragment,null,(0,i.createInterpolateElement)(__("Connect to automatically share posts on your Facebook page.","jetpack"),{strong:React.createElement("strong",null)})),()=>React.createElement("img",{src:c,alt:__("Add Facebook connection","jetpack")})]},{...e["instagram-business"],icon:e=>React.createElement(s.M5,a()({serviceName:"instagram"},e)),description:__("Share to your Instagram Business account.","jetpack"),examples:[()=>React.createElement(React.Fragment,null,__("Drive engagement and save time by automatically sharing images to Instagram when you publish blog posts.","jetpack"),React.createElement("div",{className:"instagram-business__requirements"},React.createElement("h4",null,__("Requirements for connecting Instagram:","jetpack")),React.createElement("ol",null,React.createElement("li",null,__("You must have an Instagram Business account.","jetpack")),React.createElement("li",null,__("Your Instagram Business account must be linked to a Facebook page.","jetpack")))),(0,i.createInterpolateElement)(__("When you click “connect” you'll be asked to log into Facebook. If your Instagram Business account isn't listed, ensure it's linked to a Facebook page.","jetpack"),{strong:React.createElement("strong",null),i:React.createElement("em",null)}),React.createElement("br",null),React.createElement("br",null),React.createElement(o.ExternalLink,{className:"instagram-business__help-link",href:"https://jetpack.com/redirect/?source=jetpack-social-instagram-business-help"},__("Learn how to convert & link your Instagram account.","jetpack"))),()=>React.createElement("img",{src:u,alt:__("Add Instagram photo","jetpack")})]},{...e.threads,icon:e=>React.createElement(s.M5,a()({serviceName:"threads"},e)),description:__("Share posts to your Threads feed.","jetpack"),examples:[()=>React.createElement(React.Fragment,null,__("Increase your presence in social media by sharing your posts automatically to Threads.","jetpack")),()=>React.createElement("img",{src:m,alt:__("Add Threads connection","jetpack")})]},{...e.bluesky,needsCustomInputs:!0,icon:e=>React.createElement(s.M5,a()({serviceName:"bluesky"},e)),badges:[t],description:__("Share with your network.","jetpack"),examples:[()=>React.createElement(React.Fragment,null,__("To share to Bluesky please enter your Bluesky handle and app password below, then click connect.","jetpack"))]},{...e.linkedin,icon:e=>React.createElement(s.M5,a()({serviceName:"linkedin"},e)),description:__("Share with your LinkedIn community.","jetpack"),examples:[()=>React.createElement(React.Fragment,null,(0,i.createInterpolateElement)(__("Connect to automatically share posts with your LinkedIn connections.","jetpack"),{strong:React.createElement("strong",null)})),()=>React.createElement("img",{src:d,alt:__("Add LinkedIn connection","jetpack")})]},{...e.nextdoor,icon:e=>React.createElement(s.M5,a()({serviceName:"nextdoor"},e)),description:__("Share on communities","jetpack"),examples:[()=>React.createElement(React.Fragment,null,(0,i.createInterpolateElement)(__("Connect with friends, neighbors, and local businesses by automatically sharing your posts to Nextdoor.","jetpack"),{strong:React.createElement("strong",null)})),()=>React.createElement("img",{src:p,alt:__("Add Instagram photo","jetpack")})]},{...e.tumblr,icon:e=>React.createElement(s.M5,a()({serviceName:"tumblr-alt"},e)),description:__("Share to your Tumblr blog.","jetpack"),examples:[()=>React.createElement(React.Fragment,null,(0,i.createInterpolateElement)(__("Connect to automatically share posts to your Tumblr blog.","jetpack"),{strong:React.createElement("strong",null)})),()=>React.createElement("img",{src:h,alt:__("Add Tumblr connection","jetpack")})]},{...e.mastodon,needsCustomInputs:!0,icon:e=>React.createElement(s.M5,a()({serviceName:"mastodon"},e)),description:__("Share with your network.","jetpack"),examples:[()=>React.createElement(React.Fragment,null,__("To share to Mastodon please enter your Mastodon username below, then click connect.","jetpack"))]}].filter((e=>Boolean(e.ID)))}},73905:(e,t,n)=>{"use strict";n.d(t,{t:()=>a});var r=n(27723);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}}"}]},49192:(e,t,n)=>{"use strict";n(68541)},68541:(e,t,n)=>{"use strict";n.d(t,{R:()=>h});var r=n(78478),a=n(51112),s=n(47425),o=n(69222),i=n(85985),l=n(86087),c=n(27723),u=n(13022),d=n(73905),p=n(99811),m=n(53975);const __=c.__;function h({buttonStyle:e="icon",buttonVariant:t}){const n=(0,m.i)(),{recordEvent:h}=(0,i.st)(),g=(0,l.useCallback)((()=>{h("jetpack_social_share_button_clicked",{network:"clipboard"})}),[h]),f=(0,l.useCallback)((()=>n("{{text}}\n{{url}}",!1)),[n]),v=(0,l.useCallback)((function(e,t){return function(n){n.preventDefault(),h("jetpack_social_share_button_clicked",t),window.open(e,"","menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600")}}),[h]);return React.createElement("div",{className:(0,u.A)(p.A["share-buttons"],{[p.A.vertical]:e.includes("text")})},d.t.map((({label:o,networkName:i,url:l})=>{const u=n(l),d="icon"===e?React.createElement(r.M5,{serviceName:i}):null,m=(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:p.A.container,key:i},React.createElement(a.A,{icon:d,variant:t,"aria-label":m,href:u,target:"_blank",rel:"noopener noreferrer",onClick:v(u,{network:i}),className:"icon"===e?p.A[i]:"has-text"},"icon"===e?null:React.createElement(React.Fragment,null,"icon-text"===e&&React.createElement(r.M5,{className:p.A[i],serviceName:i}),React.createElement(s.Ay,{className:p.A.label,component:"span"},m))))})),React.createElement("div",{className:p.A.container},React.createElement(o.A,{buttonStyle:e,onCopy:g,textToCopy:f,className:"icon"===e?p.A.clipboard:" has-text",variant:t},"icon"===e?null:React.createElement(s.Ay,{className:p.A.label,component:"span"},__("Copy to clipboard","jetpack")))))}},53975:(e,t,n)=>{"use strict";n.d(t,{i:()=>i});var r=n(47143),a=n(43656),s=n(86087),o=n(383);function i(){const{shareMessage:e}=(0,o.h)(),{message:t,link:n}=(0,r.useSelect)((t=>{const{getEditedPostAttribute:n}=t(a.store);return{link:n("link"),message:e||n("meta")?.jetpack_seo_html_title||n("title")}}),[e]);return(0,s.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])}},1101:(e,t,n)=>{"use strict";n.d(t,{O:()=>v});var r=n(85985),a=n(56427),s=n(47143),o=n(43656),i=n(86087),l=n(27723),c=n(692),u=n(92214),d=n(77627),p=n(31873),m=n(31963),h=n(51371);const __=l.__;function g(e=__("Unable to share the Post","jetpack")){const{createErrorNotice:t}=(0,s.dispatch)(c.store);t(e,{id:"publicize-post-share-message"})}function f(){const{isPublicizeEnabled:e}=(0,d.A)(),{isFetching:t,isError:n,isSuccess:l,doPublicize:f}=(0,p.A)(),v=(0,s.useSelect)((e=>e(o.store).isCurrentPostPublished()),[]),{feature_flags:b}=(0,h.n)(),{pollForPostShareStatus:k}=(0,s.useDispatch)(m.M_),{recordEvent:y}=(0,r.st)();(0,i.useEffect)((()=>{if(!t)return n?g():void(l&&function(){const{createSuccessNotice:e}=(0,s.dispatch)(c.store);e(__("Request submitted successfully.","jetpack"),{id:"publicize-post-share-message",type:"snackbar"})}())}),[t,n,l]);const E=(0,u.P)(),w=!e||!E||!v||t,_=(0,i.useCallback)((async()=>{if(!v)return g(__("You must publish your post before you can share it.","jetpack"));(0,s.dispatch)(c.store).removeNotice("publicize-post-share-message"),y("jetpack_social_reshare_clicked",{location:"editor",environment:(0,r.d9)()?"atomic":(0,r.Sy)()?"simple":"jetpack"}),await f(),b.useShareStatus&&k()}),[v,y,f,b.useShareStatus,k]);return React.createElement(a.Button,{variant:"secondary",onClick:_,disabled:w,isBusy:t},__("Share post","jetpack"))}function v(){const{isRePublicizeUpgradableViaUpsell:e}=(0,d.A)(),t=(0,s.useSelect)((e=>e(o.store).isCurrentPostPublished()),[]),{hasConnections:n}=(0,s.useSelect)((e=>e(m.M_)),[]);return t?e?null:n()?React.createElement(a.PanelRow,null,React.createElement(f,null)):null:null}},7757:(e,t,n)=>{"use strict";n.d(t,{JU:()=>a.g,Q3:()=>r.Q});var r=n(59032),a=n(95499)},95499:(e,t,n)=>{"use strict";n.d(t,{g:()=>m});var r=n(96072),a=n.n(r),s=n(85985),o=n(56427),i=n(47143),l=n(27723),c=n(51609),u=n(31963),d=n(51371),p=n(14150);const __=l.__,m=(0,c.forwardRef)((({withWrapper:e=!1,analyticsData:t=null,...n},r)=>{const{recordEvent:l}=(0,s.st)(),{openShareStatusModal:m}=(0,i.useDispatch)(u.M_),h=(0,i.useSelect)((e=>e(u.M_).getPostShareStatus()),[]),g=(0,c.useCallback)((()=>{l("jetpack_social_share_status_modal_opened",t),m()}),[t,m,l]);if(!h||!h.shares||0===h.shares.length)return null;const{feature_flags:f}=(0,d.n)();if(!f.useShareStatus)return null;const v=React.createElement(o.Button,a()({variant:"secondary",onClick:g},n,{ref:r}),n.children||__("View sharing history","jetpack"));return e?React.createElement("div",{className:p.A["trigger-wrapper"]},v):v}))},59032:(e,t,n)=>{"use strict";n.d(t,{Q:()=>d});var r=n(50723),a=n(56427),s=n(47143),o=n(27723),i=n(31963),l=n(30557),c=n(14150);const __=o.__;function u(){const{closeShareStatusModal:e}=(0,s.useDispatch)(i.M_);return React.createElement("div",{className:c.A.wrapper},React.createElement(a.Modal,{onRequestClose:e,title:__("Sharing status","jetpack"),className:c.A.modal},React.createElement(l.W,null)))}function d(){const e=(0,s.useSelect)((e=>e(i.M_).isShareStatusModalOpen()),[]);return React.createElement(r.Ay,{targetDom:document.body},e?React.createElement(u,null):null)}},14329:(e,t,n)=>{"use strict";n.d(t,{f:()=>h});var r=n(40597),a=n(85985),s=n(56427),o=n(47143),i=n(43656),l=n(27723),c=n(51609),u=n(31873),d=n(31963),p=n(59061),m=n(14150);const __=l.__,_x=l._x;function h({shareItem:e}){const{recordEvent:t}=(0,a.st)(),n=(0,o.useSelect)((e=>e(i.store).getCurrentPostId()),[]),l=(0,o.useSelect)((e=>e(d.M_).getConnections()),[]),h=l.some((0,p.eJ)(e)),{doPublicize:g}=(0,u.A)(n),{pollForPostShareStatus:f}=(0,o.useDispatch)(d.M_),[v,b]=(0,c.useState)(!1),k=(0,c.useCallback)((async()=>{t("jetpack_social_share_status_retry",{service:e.service,location:"modal"});const n=(0,p.eJ)(e),r=l.filter((e=>!n(e))).map((({connection_id:e})=>e));r.length!==l.length&&(b(!0),await g(r),await f({isRequestComplete({postShareStatus:t,lastTimestamp:n}){const r=t.shares.some((t=>t.timestamp>n&&(0,p.Ri)(e,t)));return r&&b(!1),r}}))}),[t,e,l,g,f]);return v?React.createElement(s.Spinner,null):React.createElement("div",{className:m.A["retry-wrapper"]},React.createElement(s.Button,{variant:h?"link":"tertiary",onClick:h?k:void 0,disabled:!h},__("Retry","jetpack")),h?null:React.createElement(r.A,{shift:!0,placement:"bottom-end"},e.external_id?_x("This connection has been removed.","Social media connection","jetpack"):_x("This connection has been reconnected or removed.","Social media connection","jetpack")))}},30557:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});var r=n(47143),a=n(31963),s=n(48377);function o(){const e=(0,r.useSelect)((e=>e(a.M_).getPostShareStatus()),[]);return React.createElement("div",null,React.createElement(s.S,{postShareStatus:e}))}},368:(e,t,n)=>{"use strict";n.d(t,{C:()=>l});var r=n(85985),a=n(56427),s=n(27723),o=n(51609),i=n(14329);const __=s.__;function l({shareItem:e}){const{recordEvent:t}=(0,r.st)(),n=(0,o.useCallback)((()=>{t("jetpack_social_share_status_view",{service:e.service,location:"modal"})}),[t,e.service]);return"success"===e.status?React.createElement(a.ExternalLink,{href:e.message,onClick:n},__("View","jetpack")):React.createElement(i.f,{shareItem:e})}},69662:(e,t,n)=>{"use strict";n.d(t,{a:()=>p});var r=n(40597),a=n(47425),s=n(27723),o=n(51113),i=n(83883),l=n(13022),c=n(51609),u=n.n(c),d=n(14150);const __=s.__,_x=s._x;function p({status:e,message:t}){const n="success"===e,s=n?u().createElement(o.A,{className:d.A["share-status-icon"],icon:i.A}):u().createElement(r.A,{shift:!0,inline:!1,title:__("Sharing failed with the following message:","jetpack"),className:d.A["share-status-icon-tooltip"]},u().createElement(a.Ay,{variant:"body-small",className:d.A["tooltip-text"]},t));return u().createElement("div",{className:(0,l.A)(d.A["share-status-wrapper"],{[d.A["share-status-success"]]:n,[d.A["share-status-failure"]]:!n})},u().createElement("div",{className:d.A["share-status-icon"]},s),u().createElement("div",{className:d.A["share-status-label"]},n?_x("Shared","The sharing is successful","jetpack"):__("Failed","jetpack")))}},48377:(e,t,n)=>{"use strict";n.d(t,{S:()=>u});var r=n(38443),a=n(27723),s=n(12141),o=n(368),i=n(69662),l=n(14150);const __=a.__,c=e=>`${e.external_id||e.connection_id}:${e.timestamp}`;function u({postShareStatus:e}){return React.createElement("div",{className:l.A["dataview-wrapper"]},React.createElement("div",{className:"dataviews-wrapper"},React.createElement("table",{className:"dataviews-view-table"},React.createElement("thead",null,React.createElement("tr",{className:"dataviews-view-table__row"},React.createElement("th",null,__("Connection","jetpack")),React.createElement("th",null,__("Time","jetpack")),React.createElement("th",null,__("Status","jetpack")),React.createElement("th",null,__("Actions","jetpack")))),React.createElement("tbody",null,e.shares.map((e=>React.createElement("tr",{key:c(e),className:"dataviews-view-table__row"},React.createElement("td",null,React.createElement("div",{className:"dataviews-view-table__cell-content-wrapper"},React.createElement("div",{className:l.A["connection-name"]},React.createElement(s.A,{serviceName:e.service,label:e.external_name,profilePicture:e.profile_picture}),React.createElement("div",{className:l.A["share-item-name-wrapper"]},React.createElement("div",{className:l.A["share-item-name"]},e.external_name))))),React.createElement("td",null,React.createElement("div",{className:"dataviews-view-table__cell-content-wrapper"},(0,r.humanTimeDiff)(1e3*e.timestamp,(0,r.getDate)(null)))),React.createElement("td",null,React.createElement("div",{className:"dataviews-view-table__cell-content-wrapper"},React.createElement(i.a,{status:e.status,message:e.message}))),React.createElement("td",null,React.createElement("div",{className:"dataviews-view-table__cell-content-wrapper"},React.createElement(o.C,{shareItem:e}))))))))))}},29341:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(63406),a=n(56427),s=n(86087),o=n(27723),i=n(49747),l=n(38394),c=n(56457),u=n(77932);const __=o.__,_x=o._x,d=({prePublish:e=!1})=>{const t=e?s.Fragment:a.PanelBody,n=e?{}:{title:__("Social Image Generator","jetpack")},{isEnabled:o,setIsEnabled:d}=(0,i.A)(),[p,m]=(0,s.useState)(!1),h=(0,s.useCallback)((()=>m(!0)),[]),g=(0,s.useCallback)((()=>m(!1)),[]),[f,v]=(0,s.useState)(null),{createErrorNotice:b,createSuccessNotice:k}=(0,r.I)(),{save:y,isSaving:E}=(0,l.i)({onError:e=>{b(e.message)},onSuccess:()=>{k(__("Image saved to media library.","jetpack"))}}),w=(0,s.useCallback)((()=>{y(`https://s0.wp.com/_si/?t=${f}`,"generated-image.jpg")}),[f,y]);return React.createElement(t,n,p&&React.createElement(u.A,{onClose:g}),React.createElement(a.ToggleControl,{label:__("Enable Social Image","jetpack"),help:o?"":__("Social Image is disabled for this post.","jetpack"),checked:o,onChange:d,__nextHasNoMarginBottom:!0}),o&&React.createElement(React.Fragment,null,React.createElement("hr",null),React.createElement(c.Ay,{onNewToken:v}),React.createElement("hr",null),React.createElement(a.__experimentalHStack,{spacing:2,wrap:!0},React.createElement(a.Button,{variant:"secondary",onClick:h,label:__("Open the Social Image Generator settings","jetpack")},__("Settings","jetpack")),React.createElement(a.Button,{variant:"secondary",onClick:w,label:__("Save the generated image to your media library.","jetpack"),disabled:!f||E},E?_x("Saving…","Saving the file to media library","jetpack"):__("Save to media library","jetpack")))))}},77932:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(50723),a=n(56427),s=n(86087),o=n(27723),i=n(49747),l=n(80624),c=n(56457),u=n(55858),d=n(81299),p=n(53744);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.A)(),[v,b]=(0,s.useState)(o),[k,y]=(0,s.useState)(n||"featured"),[E,w]=(0,s.useState)(t),[_,C]=(0,s.useState)(g),[A]=(0,l.A)(v),x=(0,s.useCallback)((()=>{f({template:_,image_type:k,custom_text:E||"",..."custom"===k&&{image_id:v}}),e()}),[f,_,k,v,E,e]),j=(0,s.useCallback)((e=>{b(e?.id)}),[b]);return React.createElement(r.Ay,{targetDom:document.body},React.createElement(a.Modal,{onRequestClose:e},React.createElement(c.Ay,{className:p.A.preview,imageId:v,customText:E,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,__nextHasNoMarginBottom:!0}),"custom"===k&&React.createElement(u.A,{buttonLabel:h,subTitle:__("Add a custom image","jetpack"),mediaId:v,mediaDetails:A,onChange:j,allowedMediaTypes:m,wrapperClassName:p.A.mediaPicker}),React.createElement(a.TextControl,{className:p.A.customText,value:E||"",onChange:w,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"),__nextHasNoMarginBottom:!0}),React.createElement(a.BaseControl,{__nextHasNoMarginBottom:!0,className:p.A.templateControl},React.createElement(a.BaseControl.VisualLabel,null,__("Templates","jetpack")),React.createElement(d.A,{value:_,onTemplateSelected:C})),React.createElement(a.Button,{onClick:e,variant:"tertiary"},__("Cancel","jetpack")),React.createElement(a.Button,{onClick:x,variant:"primary"},__("Save","jetpack"))))}},29761:(e,t,n)=>{"use strict";n(47143),n(86087),n(27723),n(51609),n(31963),n(12226)},12226:(e,t,n)=>{"use strict";n(56427),n(86087),n(27723),n(81299),n(88375)},81299:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(86087),a=n(27723),s=n(13022),o=n(52002),i=n(10936);const __=a.__,l=({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:o.A.templates},i.A.map((t=>React.createElement("button",{onClick:n,id:t.name,key:t.name,className:(0,s.A)(o.A.template,{[o.A["template--active"]]:t.name===e})},React.createElement("img",{src:t.image,alt:t.label}),React.createElement("span",{className:"screen-reader-text"},(0,a.sprintf)(/* translators: %s is the name of the template */ +__("Pick the %s template","jetpack"),t.label))))))}},10936:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(26365),a=n(45329),s=n(9509);const o=[{name:"highway",label:"Highway",image:n(22417)},{name:"dois",label:"Dois",image:r},{name:"edge",label:"Edge",image:a},{name:"fullscreen",label:"Fullscreen",image:s}]},98725:(e,t,n)=>{"use strict";n(47143),n(86087),n(51609),n(31963)},96390:(e,t,n)=>{"use strict";n.d(t,{n:()=>d});var r=n(85985),a=n(56427),s=n(86087),o=n(27723),i=n(10991),l=n(18603),c=n(94360),u=n(47944);const __=o.__;function d(){const[e,t]=(0,s.useReducer)((e=>!e),!1),{recordEvent:n}=(0,r.st)(),o=(0,s.useCallback)((()=>{e||n("jetpack_social_preview_modal_opened"),t()}),[e,n]);return React.createElement(a.PanelRow,{className:u.A.panel},e&&React.createElement(a.Modal,{onRequestClose:t,title:__("Social Previews","jetpack"),className:u.A.modal,__experimentalHideHeader:!0},React.createElement("div",{className:u.A["modal-content"]},React.createElement(c.X,null),React.createElement(l.w,null)),React.createElement(a.Button,{className:u.A["close-button"],onClick:t,icon:i.A,label:__("Close","jetpack")})),React.createElement(a.Button,{variant:"secondary",onClick:o},__("Preview social posts","jetpack")))}},98588:(e,t,n)=>{"use strict";n.d(t,{z:()=>w});var r=n(96072),a=n.n(r),s=n(29103),o=n(73188),i=n(73066),l=n(57984),c=n(48914),u=n(83945),d=n(73915),p=n(89075),m=n(95550),h=n(3582),g=n(47143),f=n(86087),v=n(18537),b=n(27723),k=n(39553),y=n(62697),E=n(31137);const __=b.__;function w({connection:e}){const t=(0,f.useMemo)((()=>({displayName:e.display_name||e.external_display,profileImage:e.profile_picture,externalName:e.external_name})),[e]),{image:n,media:r,title:b,description:w,url:_,excerpt:C}=(0,E.s)(),A=((0,k.A)().message||"").trim(),x=(0,f.useMemo)((()=>({description:w,image:n,media:r,title:b,url:_})),[w,n,r,b,_]),j=(0,g.useSelect)((e=>{const{getUnstableBase:t}=e(h.store);return(0,v.decodeEntities)(t()?.name)}),[]),S=r?.some((({type:e})=>e.startsWith("image/")||e.startsWith("video/")));switch(e.service_name){case"bluesky":{const e=r?.[0],n=e?.type.startsWith("image/")?e.url:null;return React.createElement(s.O,a()({},x,{description:(0,v.decodeEntities)(C),user:{avatarUrl:t.profileImage,address:t.externalName,displayName:t.displayName},customText:(0,v.decodeEntities)(A||`${b}\n\n${C.replaceAll(/[\s\n]/g," ")}`),customImage:n}))}case"facebook":return S?React.createElement(o.h,a()({},x,{type:"article",customText:A||C||b,user:t})):React.createElement(i.l,a()({},x,{type:"article",customText:A||C||b,user:t}));case"instagram-business":{const e=Boolean(n);return S||e?React.createElement(l.l,a()({},x,{image:r?.[0]?.url||n,name:t.displayName,profileImage:t.profileImage,caption:A||b||w})):React.createElement(y.q,null)}case"linkedin":return React.createElement(c.$,a()({},x,{jobTitle:__("Job Title (Company Name)","jetpack"),name:t.displayName,profileImage:t.profileImage,description:A||b||w}));case"mastodon":{const e=r?.[0],n=e?.type.startsWith("image/")?e.url:null;return React.createElement(u._,a()({},x,{description:C,siteName:j,user:{avatarUrl:t.profileImage,address:t.displayName,displayName:t.displayName},customText:A,customImage:n}))}case"nextdoor":{const e=`${A||b||w} ${r.length?_:""}`.trim();return React.createElement(d.K,a()({},x,{description:e,name:t.displayName,profileImage:t.profileImage}))}case"threads":{let e=b;A?e=A:b&&C&&(e=`${b}\n\n${C}`);const n=500-_.length-2;return e=(0,v.decodeEntities)(e).slice(0,n),e+=`\n\n${_}`,React.createElement(p.s,a()({},x,{caption:e,name:t.displayName,profileImage:t.profileImage}))}case"tumblr":return React.createElement(m.B,a()({},x,{user:{displayName:t.displayName,avatarUrl:t.profileImage},customText:A}));default:return null}}},18603:(e,t,n)=>{"use strict";n.d(t,{w:()=>h});var r=n(85985),a=n(56427),s=n(47143),o=n(27723),i=n(51609),l=n(31963),c=n(12141),u=n(39329),d=n(48712),p=n(98588),m=n(47944);const __=o.__,_x=o._x;function h(){const{recordEvent:e}=(0,r.st)(),t=(0,d.h)(),{canBeTurnedOn:n,shouldBeDisabled:o}=(0,u.j)(),h=(0,s.useSelect)((e=>e(l.M_).getConnections().filter((({service_name:e})=>t(e))).map((e=>{const t=e.display_name||e.external_display,r=`${e.service_name}-${e.connection_id}`,a=React.createElement(c.A,{label:t,serviceName:e.service_name,profilePicture:e.profile_picture}),s=o(e)||!n(e)||!e.enabled;return{...e,className:s?m.A["disabled-tab"]:"",name:r,title:t,icon:a}}))),[n,t,o]),{toggleConnectionById:g}=(0,s.useDispatch)(l.M_),f=(0,i.useCallback)(((t,n)=>()=>{g(t),e("jetpack_social_connection_toggled",{location:"preview-modal",enabled:!n.enabled,service_name:n.service_name})}),[e,g]);return React.createElement("div",{className:m.A["preview-section"]},React.createElement(a.TabPanel,{tabs:h},(e=>{const t=n(e)&&e.enabled;return React.createElement("div",{className:m.A["preview-content"]},o(e)?null:React.createElement(a.ToggleControl,{label:t?_x("Connection enabled","","jetpack"):__("Connection disabled","jetpack"),checked:t,onChange:f(e.connection_id,e),__nextHasNoMarginBottom:!0}),React.createElement(p.z,{connection:e}))})))}},94360:(e,t,n)=>{"use strict";n.d(t,{X:()=>o});var r=n(27723),a=n(41190),s=n(47944);const __=r.__;function o(){return React.createElement("div",{className:s.A["settings-section"]},React.createElement("div",{className:s.A["settings-header"]},React.createElement("h2",null,__("Social Preview","jetpack"))),React.createElement("div",{className:s.A["settings-content"]},React.createElement("p",{className:s.A["modal-description"]},__("Edit and preview your social post before sharing.","jetpack")),React.createElement(a.o,{analyticsData:{location:"preview-modal"}})))}},42259:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(96072),a=n.n(r),s=n(91937),o=n(3582),i=n(47143),l=n(43656),c=n(18537),u=n(39553),d=n(31963);const p=e=>{const{message:t}=(0,u.A)(),{content:n,siteName:r}=(0,i.useSelect)((e=>{const{getEditedPostAttribute:t}=e(l.store),{getUnstableBase:n}=e(o.store);return{content:t("content").split("\x3c!--more")[0],siteName:(0,c.decodeEntities)(n().name)}}),[]),p=(0,i.useSelect)((e=>{const{displayName:t,profileImage:n,username:r}=e(d.M_).getConnectionProfileDetails(d.zW);return{displayName:t,avatarUrl:n,address:r}}),[]),m=e.media?.[0],h=m?.type.startsWith("image/")?m.url:null,g=(0,i.useSelect)((e=>e(d.M_).getConnectionsByService(d.zW)),[]);return React.createElement(s.x,a()({},e,{siteName:r,user:p,description:(0,c.decodeEntities)(n),customText:(0,c.decodeEntities)(t||`${e.title}\n\n${n.replaceAll(/[\s\n]/g," ")}`),customImage:h,hidePostPreview:!g.length}))}},59540:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(96072),a=n.n(r),s=n(87070),o=n(47143),i=n(39553),l=n(31963);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.A)(),{title:n,excerpt:r,content:c}=e,u=(0,o.useSelect)((e=>{const{displayName:t,profileImage:n}=e(l.Af).getConnectionProfileDetails(l.s);return{displayName:t,avatarUrl:n}}));return React.createElement(s.k,a()({},e,{type:"article",user:u,customText:t||r||c||n}))}))},81048:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(96072),a=n.n(r),s=n(8797),o=n(47143),i=n(18537),l=n(51609),c=n.n(l);const u=function(e){const t=(0,o.useSelect)((e=>{const{getUnstableBase:t}=e("core"),n=t().name;return(0,i.decodeEntities)(n)}));return c().createElement(s.m,a()({},e,{siteTitle:t}))}},91262:(e,t,n)=>{"use strict";n.d(t,{p:()=>g});var r=n(47656),a=n(3924),s=n(97999),o=n(20578),i=n(56427),l=n(47143),c=n(27723),u=n(51609),d=n.n(u),p=n(39553),m=n(31963),h=n(27844);const __=c.__,_x=c._x;function g(e){const{title:t,image:n,media:c,description:u}=e,{username:g,profileImage:f}=(0,l.useSelect)((e=>e(m.Af).getConnectionProfileDetails(m.bN))),{message:v}=(0,p.A)(),b=c?.some((({type:e})=>e.startsWith("image/")||e.startsWith("video/"))),k=Boolean(n);if(!b&&!k)return d().createElement(r.A,{hideCloseButton:!0,actions:[d().createElement(i.ExternalLink,{key:"learn-more",href:(0,a.A)("jetpack-social-share-to-instagram")},__("Learn more","jetpack"))]},(0,s.siteHasFeature)(h.q.ENHANCED_PUBLISHING)?__("To share to Instagram, add an image/video, or enable Social Image Generator.","jetpack"):_x("You need a featured image to share to Instagram.","The message shown in the Instagram social preview","jetpack"));const y=v||t||u;return d().createElement(o.a,{image:c?.[0]?.url||n,media:c,name:g,profileImage:f,caption:y})}},29650:(e,t,n)=>{"use strict";n.d(t,{p:()=>u});var r=n(7368),a=n(47143),s=n(27723),o=n(51609),i=n.n(o),l=n(39553),c=n(31963);const __=s.__;function u(e){const{title:t,url:n,image:s,media:o,description:u}=e,{displayName:d,profileImage:p}=(0,a.useSelect)((e=>e(c.Af).getConnectionProfileDetails(c.gt))),{message:m}=(0,l.A)(),h=`${m||t||u} ${o.length?n:""}`.trim();return i().createElement(r.G,{jobTitle:__("Job Title (Company Name)","jetpack"),image:s,name:d,profileImage:p,title:t,description:h,url:n,media:o})}},98175:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(96072),a=n.n(r),s=n(71751),o=n(47143),i=n(18537),l=n(39553),c=n(31963);const u=e=>{const{message:t}=(0,l.A)(),{content:n,siteName:r}=(0,o.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor"),{getUnstableBase:n}=e("core");return{content:t("content").split("\x3c!--more")[0],siteName:(0,i.decodeEntities)(n().name)}})),u=(0,o.useSelect)((e=>{const{displayName:t,profileImage:n,username:r}=e(c.Af).getConnectionProfileDetails(c.V6);return{displayName:t,avatarUrl:n,address:r}})),d=e.media?.[0],p=d?.type.startsWith("image/")?d.url:null;return React.createElement(s.R,a()({},e,{siteName:r,user:u,description:n,customText:t,customImage:p}))}},81115:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(56427),a=n(18537),s=n(27723),o=n(10991),i=n(19779),l=n(31137);const __=s.__,c=function({onClose:e,initialTabName:t}){const n=(0,i.r)(),{image:s,media:c,title:u,description:d,url:p,excerpt:m}=(0,l.s)();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:o.A,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,{excerpt:(0,a.decodeEntities)(m),title:(0,a.decodeEntities)(u),description:(0,a.decodeEntities)(d),url:p,image:s,media:c})))))}},49257:(e,t,n)=>{"use strict";n.d(t,{s:()=>c});var r=n(58581),a=n(47143),s=n(51609),o=n.n(s),i=n(39553),l=n(31963);function c(e){const{title:t,url:n,image:s,media:c,description:u}=e,{displayName:d,profileImage:p}=(0,a.useSelect)((e=>e(l.Af).getConnectionProfileDetails(l.zk))),{message:m}=(0,i.A)(),h=`${m||t||u} ${c.length?n:""}`.trim();return o().createElement(r.n,{image:s,name:d,profileImage:p,title:t,description:h,url:n,media:c})}},97192:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(56427),a=n(27723),s=n(19779);const __=a.__,_x=a._x,o=({openModal:e})=>{const t=(0,s.r)();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")))}},68655:(e,t,n)=>{"use strict";n.d(t,{Q:()=>u});var r=n(33389),a=n(47143),s=n(18537),o=n(51609),i=n.n(o),l=n(383),c=n(31963);function u({excerpt:e,title:t,description:n,image:o,url:u,media:d}){const{shareMessage:p}=(0,l.h)(),m=(0,a.useSelect)((r=>{const{displayName:a,profileImage:i}=r(c.M_).getConnectionProfileDetails(c.BB);let l=t;p?l=p:t&&e&&(l=`${t}\n\n${e}`);const m=500-u.length-2;return l=(0,s.decodeEntities)(l).slice(0,m),l+=`\n\n${u}`,[{caption:l,name:a,profileImage:i,title:t,description:n,image:o,media:d,url:u}]}),[e,t,o,n,d,u,p]),h=(0,a.useSelect)((e=>e(c.M_).getConnectionsByService(c.BB)),[]);return i().createElement(r.n,{posts:m,hidePostPreview:!h.length})}},22322:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(96072),a=n.n(r),s=n(19036),o=n(47143),i=n(39553),l=n(31963);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.A)(),c=(0,o.useSelect)((e=>{const{displayName:t,profileImage:r}=e(l.Af).getConnectionProfileDetails(l.me);return{displayName:t||n,avatarUrl:r}}),[n]);return React.createElement(s.s,a()({},e,{user:c,description:t,customText:r}))}},91537:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(43731),a=n(47143),s=n(51609),o=n.n(s),i=n(383),l=n(31963);const c=function({title:e,description:t,image:n,url:s,media:c}){const{shareMessage:u}=(0,i.h)(),d=(0,a.useSelect)((r=>{const{displayName:a,profileImage:o,username:i}=r(l.Af).getConnectionProfileDetails(l.PX);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.p,{tweets:d,hidePostPreview:!0})}},19779:(e,t,n)=>{"use strict";n.d(t,{r:()=>E});var r=n(96072),a=n.n(r),s=n(78478),o=n(27723),i=n(51609),l=n.n(i),c=n(31963),u=n(70407),d=n(42259),p=n(59540),m=n(81048),h=n(91262),g=n(29650),f=n(98175),v=n(49257),b=n(68655),k=n(22322),y=n(91537);const __=o.__,_x=o._x;function E(){const e=(0,u.getSupportedAdditionalConnections)().includes(c.BB);return(0,i.useMemo)((()=>[{title:__("Google Search","jetpack"),icon:e=>l().createElement(s.M5,a()({serviceName:"google"},e)),name:"google",preview:m.A},{title:__("X","jetpack"),icon:e=>l().createElement(s.M5,a()({serviceName:"x"},e)),name:"x",preview:y.A},{title:__("Facebook","jetpack"),icon:e=>l().createElement(s.M5,a()({serviceName:"facebook"},e)),name:"facebook",preview:p.A},{title:__("Instagram","jetpack"),icon:e=>l().createElement(s.M5,a()({serviceName:"instagram"},e)),name:"instagram",preview:h.p},e?{title:_x("Threads","The name of the social media network - threads.net","jetpack"),icon:e=>l().createElement(s.M5,a()({serviceName:"threads"},e)),name:"threads",preview:b.Q}:null,{title:__("LinkedIn","jetpack"),icon:e=>l().createElement(s.M5,a()({serviceName:"linkedin"},e)),name:"linkedin",preview:g.p},{title:__("Nextdoor","jetpack"),icon:e=>l().createElement(s.M5,a()({serviceName:"nextdoor"},e)),name:"nextdoor",preview:v.s},{title:__("Tumblr","jetpack"),icon:e=>l().createElement(s.M5,a()({serviceName:"tumblr-alt"},e)),name:"tumblr",preview:k.A},{title:__("Mastodon","jetpack"),icon:e=>l().createElement(s.M5,a()({serviceName:"mastodon"},e)),name:"mastodon",preview:f.A},{title:__("Bluesky","jetpack"),icon:e=>l().createElement(s.M5,a()({serviceName:"bluesky"},e)),name:"bluesky",preview:d.A}].filter(Boolean)),[e])}},31137:(e,t,n)=>{"use strict";n.d(t,{s:()=>l});var r=n(47143),a=n(27723),s=n(383),o=n(74820),i=n(25995);const __=a.__;function l(){const{attachedMedia:e,imageGeneratorSettings:t}=(0,s.h)();return(0,r.useSelect)((n=>{const{getMedia:r}=n("core"),{getEditedPostAttribute:a,getEditedPostContent:s}=n("core/editor"),l=a("featured_media");let c=l?(0,i.l)(r(l)):"";const u=t.enabled?(0,o.S)(t.token):"";if(u&&(c=u),!c){const e=(0,i.t)(s());e&&(c=e)}const d=[],p=e=>{const t=r(e);return t?{type:t.mime_type,url:(0,i.l)(t),alt:t.alt_text}:null};for(const{id:t}of e){const e=p(t);e&&d.push(e)}return{title:(a("meta")?.jetpack_seo_html_title||a("title")||"").trim(),description:(a("meta")?.advanced_seo_description||a("excerpt")||a("content").split("\x3c!--more")[0]||__("Visit the post for more.","jetpack")||"").trim(),url:a("link"),excerpt:(a("excerpt")||a("content").split("\x3c!--more")[0]||"").trim(),image:c,media:d,initialTabName:null}}),[e,t])}},25995:(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,{l:()=>r,t:()=>a})},7610:(e,t,n)=>{"use strict";n(47143),n(86087),n(51609),n(7162)},18699:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(86087),a=n(76794);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.A.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.A.duration},`${t}:${r}`))};return React.createElement("div",{className:a.A.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))}},98420:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(383);function a(){const{attachedMedia:e,updateJetpackSocialOptions:t}=(0,r.h)();return{attachedMedia:e,updateAttachedMedia:e=>t("attached_media",e)}}},54915:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(47143),a=n(43656);const s=()=>(0,r.useSelect)((e=>e(a.store).getEditedPostAttribute("featured_media")))},49747:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(47143),a=n(43656),s=n(86087),o=n(383);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.h)(),{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}}},92214:(e,t,n)=>{"use strict";n.d(t,{P:()=>d});var r=n(47143),a=n(98420),s=n(54915),o=n(80624),i=n(52367),l=n(80682),c=n(50001),u=n(31963);function d(){const{enabledConnections:e}=(0,c.A)(),{attachedMedia:t}=(0,a.A)(),n=(0,s.A)(),d=t[0]?.id||n,{validationErrors:p,isConvertible:m}=(0,i.A)(e,(0,o.A)(d)[0]),h=(0,r.useSelect)((e=>e(u.M_).getBrokenConnections().map((e=>e.connection_id))),[]);return e.some((function({connection_id:e,service_name:t}){return!h.includes(e)&&(!(e in p)||("instagram-business"!==t||!Object.values(p).includes(l.k3))&&m)}))}},80624:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(47143),a=n(86087);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}},80682:(e,t,n)=>{"use strict";n.d(t,{$m:()=>u,I1:()=>l,eF:()=>i,ec:()=>o,i1:()=>c,k3:()=>a,z9:()=>s});var r=n(27723);const __=r.__,a="NO_MEDIA_ERROR",s="FILE_TYPE_ERROR",o="FILE_SIZE_ERROR",i="VIDEO_LENGTH_TOO_LONG_ERROR",l="VIDEO_LENGTH_TOO_SHORT_ERROR",c="DIMENSION_ERROR";function u(e){return{[o]:__("File too big","jetpack"),[i]:__("Video too long","jetpack"),[l]:__("Video too short","jetpack"),[c]:__("Invalid dimensions","jetpack")}[e]||__("Invalid media","jetpack")}},52367:(e,t,n)=>{"use strict";n.d(t,{A:()=>d,c:()=>l});var r=n(86087),a=n(98420),s=n(49747),o=n(80682),i=n(2204);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(!i.nJ.includes(t))return!1;return!((n?n/Math.pow(1e3,2):0)>=55)},u=(e,t,n,r,a)=>{const s=i.mB[n]??i.EX;if(!e||0===Object.keys(e).length)return s.requiresMedia&&!a?o.k3:null;const{mime:c,fileSize:u}=e;if(!s.requiresMedia&&!r)return null;if(!c||!s.allowedMediaTypes.includes(c.toLowerCase()))return o.z9;if(!t?.width||!t?.height)return o.i1;const d=u?u/Math.pow(1e3,2):null;return l(c)?((e,t,n,r,a)=>{const{minSize:s=0,maxSize:l=i.TR,minLength:c=0,maxLength:u=i.TR,maxWidth:d=i.TR,aspectRatio:p=i.EX.video.aspectRatio}=a;if(!e||e>l||eu)return o.eF;const m=n/r;return mp.max||n>d?o.i1:null})(d,e.length,t.width,t.height,s.video):((e,t,n,r)=>{const{maxSize:a=i.TR,minWidth:s=0,maxWidth:l=i.TR,aspectRatio:c=i.EX.image.aspectRatio}=r,u=t/n;return uc.max||t>l||ta?o.ec:null})(d,t.width,t.height,s.image)},d=(e,t)=>{const{attachedMedia:n}=(0,a.A)(),{isEnabled:o}=(0,s.A)(),i=n.length>0,l=(0,r.useRef)({});return(0,r.useMemo)((()=>{const n=e.reduce(((e,{connection_id:n,service_name:r})=>{const a=u(t.metaData,t.mediaData,r,i,o&&"instagram-business"===r);return a&&(e[n]=a),e}),{});return JSON.stringify(n)!==JSON.stringify(l.current)&&(l.current=n),{validationErrors:l.current,isConvertible:c(t.metaData)}}),[e,t.metaData,t.mediaData,i,o])}},2204:(e,t,n)=>{"use strict";n.d(t,{EX:()=>h,TR:()=>m,UB:()=>v,mB:()=>g,nJ:()=>f});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:900,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"],v=[...new Set([...o,...i,...c,...l,...u,...f])]},38656:(e,t,n)=>{"use strict";n.d(t,{e:()=>i});var r=n(97999),a=n(47143),s=n(43656),o=n(27844);function i(){return!(0,a.useSelect)((e=>"jetpack-social-note"===e(s.store).getCurrentPostType()),[])&&(0,r.siteHasFeature)(o.q.IMAGE_GENERATOR)}},383:(e,t,n)=>{"use strict";n.d(t,{h:()=>i});var r=n(47143),a=n(43656),s=n(86087),o=n(70407);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)())}}),[]),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,version:2})}),[t.jetpackSocialOptions,n]);return(0,s.useMemo)((()=>({...t,togglePublicizeFeature:i,updateJetpackSocialOptions:l,updateMeta:n})),[t,i,l,n])}},57275:(e,t,n)=>{"use strict";n.d(t,{z:()=>o});var r=n(47143),a=n(43656),s=n(86087);function o(e){const t=(0,r.useSelect)((e=>e(a.store).isPublishingPost()),[]),[n,o]=(0,s.useState)(e),i=(0,s.useRef)(!1);return(0,s.useEffect)((()=>{t&&(i.current=!0),i.current||o(e)}),[t,e]),n}},77627:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(39384),a=n(85985),s=n(47143),o=n(43656),i=n(70407),l=n(383);const c="republicize";function u(){const e=!(0,a.d9)()&&!(0,a.Sy)()||(0,a.FB)(c)?.available,t=(0,s.useSelect)((e=>e(o.store).isCurrentPostPublished()),[]),{isUserConnected:n}=(0,r.useConnection)(),{urls:u}=(0,i.getSocialScriptData)(),{isPublicizeEnabled:d,togglePublicizeFeature:p,isPostAlreadyShared:m}=(0,l.h)(),h=(0,a.W4)(c)&&!e,g=t?e:d,f=t&&h,v=t&&!e,b=!n&&!(0,a.Sy)();return{isPublicizeEnabledMeta:d,isPublicizeEnabled:g,togglePublicizeFeature:p,isPublicizeDisabledBySitePlan:f,isRePublicizeFeatureAvailable:e,isRePublicizeUpgradableViaUpsell:h,hidePublicizeFeature:v,isPostAlreadyShared:m,isSocialImageGeneratorEnabled:!!(0,a.$i)()?.social?.isSocialImageGeneratorEnabled,connectionsPageUrl:u.connectionsManagementPage,needsUserConnection:b}}},88584:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(29491),a=n(86087),s=n(86212),o=n(50001);function i(){const e=(0,a.useRef)(!1),t=(0,a.useRef)(!0),n=(0,s.A)(),{refresh:i}=(0,o.A)(),l=(0,r.useDebounce)(i,0),c=(0,r.useDebounce)(i,2e3);return()=>{t.current&&(l(),t.current=!1),n||(e.current=!0,c.cancel()),n&&e.current&&(c(),e.current=!1)}}},38394:(e,t,n)=>{"use strict";n.d(t,{i:()=>o});var r=n(27723),a=n(16480),s=n(51609);const __=r.__;function o({onError:e,onSuccess:t}){const[n,r]=(0,s.useState)(!1),o=(0,s.useCallback)((async(n,s="image")=>{try{r(!0);const o=await fetch(n);if(!o.ok)return void e(new Error(__("Failed to download image.","jetpack"),{cause:o}));const i=await o.blob(),l=new File([i],s,{type:i.type});await(0,a.uploadMedia)({filesList:[l],onFileChange:([e])=>{void 0!==e.id&&(t(e),r(!1))},onError:t=>{e(new Error(__("Failed to save image to library.","jetpack"),{cause:t})),r(!1)},maxUploadFileSize:0})}catch(t){e(new Error(__("Failed to save image to library.","jetpack"),{cause:t}))}finally{r(!1)}}),[e,t]);return(0,s.useMemo)((()=>({isSaving:n,save:o})),[n,o])}},49036:(e,t,n)=>{"use strict";n.d(t,{Wv:()=>l,_D:()=>i});var r=n(29491),a=n(47143),s=n(43656),o=n(86087);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])}},31873:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var r=n(1455),a=n.n(r),s=n(47143),o=n(43656),i=n(86087),l=n(27723),c=n(50001),u=n(39553),d=n(51371);const __=l.__;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,u.A)(),{skippedConnections:n}=(0,c.A)(),r=(0,s.useSelect)((e=>e(o.store).getCurrentPostId()),[]);e=e||r;const[l,m]=(0,i.useState)({data:[],error:{}}),h=(0,d.n)().api_paths.resharePost.replace("{postId}",e),g=(0,i.useCallback)((async function(r=null){const s={isFetching:!1,isError:!1,isSuccess:!1,data:[],error:{},postId:e};if(l.isFetching)return;const o=r||n;return m({...s,isFetching:!0}),await a()({path:h,method:"POST",data:{message:t,skipped_connections:o,async:!0}}).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(s)}}),[e,t,n,l.isFetching,h]);return{...l,doPublicize:g}}},50001:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(47143),a=n(31963);function s(){const{refreshConnectionTestResults:e,toggleConnectionById:t}=(0,r.useDispatch)(a.M_);return{...(0,r.useSelect)((e=>{const t=e(a.M_),n=t.getConnections(),r=t.getEnabledConnections(),s=t.getDisabledConnections().map((e=>e.connection_id));return{connections:n,hasConnections:n.length>0,hasEnabledConnections:r.length>0,skippedConnections:s,enabledConnections:r}}),[]),toggleById:t,refresh:e}}},39553:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(70407),a=n(383);function s(){const{updateMeta:e,shareMessage:t}=(0,a.h)();return{message:t,maxLength:(0,r.getShareMessageMaxLength)(),updateMessage:function(t){e("jetpack_publicize_message",t)}}}},75168:(e,t,n)=>{"use strict";n.d(t,{F:()=>i});var r=n(47143),a=n(43656),s=n(31963),o=n(49036);function i(){const{mergeConnections:e}=(0,r.useDispatch)(s.M_),{didPostSaveRequestSucceed:t,isCurrentPostPublished:n,getEditedPostAttribute:i}=(0,r.useSelect)((e=>e(a.store)),[]);(0,o._D)((()=>{if(t()&&n()){const t=i("jetpack_publicize_connections");t?.length&&e(t)}}),[t,n,i])}},38716:(e,t,n)=>{"use strict";n.r(t),n.d(t,{abortRefreshConnectionsRequest:()=>k,abortRequest:()=>b,addConnection:()=>m,closeConnectionsModal:()=>B,createAbortController:()=>f,createConnection:()=>j,deleteConnection:()=>_,deleteConnectionById:()=>A,deletingConnection:()=>C,mergeConnections:()=>g,openConnectionsModal:()=>T,refreshConnectionTestResults:()=>y,removeAbortControllers:()=>v,setConnections:()=>d,setKeyringResult:()=>p,setReconnectingAccount:()=>R,syncConnectionsToPostMeta:()=>E,toggleConnection:()=>h,toggleConnectionById:()=>w,toggleConnectionsModal:()=>L,updateConnection:()=>S,updateConnectionById:()=>P,updatingConnection:()=>N});var r=n(692),a=n(1455),s=n.n(a),o=n(47143),i=n(43656),l=n(27723),c=n(51371),u=n(54118);const __=l.__;function d(e){return{type:u.dA,connections:e}}function p(e){return{type:u.BN,keyringResult:e}}function m(e){return{type:u.Bc,connection:e}}function h(e){return{type:u.af,connectionId:e}}function g(e){return function({dispatch:t,select:n}){const r=n.getConnections(),a=[],s={done:!1,enabled:!0,toggleable:!0};for(const t of e){const e=r.find((e=>e.connection_id?e.connection_id===t.connection_id:e.id===t.id)),n={...s,...e,...t,shared:e?.shared,is_healthy:t.test_success};a.push(n)}t(d(a))}}function f(e,t){return{type:u.WB,requestType:t,abortController:e}}function v(e){return{type:u.Wp,requestType:e}}function b(e){return function({dispatch:t,select:n}){const r=n.getAbortControllers(e);for(const e of r)e.abort();t(v(e))}}function k(){return b(u.rz)}function y(e=!1){return async function({dispatch:t,select:n}){try{const r=(0,c.n)().api_paths.refreshConnections;for(;n.getUpdatingConnections().length>0||n.getDeletingConnections().length>0;)await new Promise((e=>setTimeout(e,100)));const a=new AbortController;t(f(a,u.rz));t(g(await s()({path:r,signal:a.signal}))),e&&t(E())}catch(n){"AbortError"===n.name&&t(y(e))}}}function E(){return function({registry:e,select:t}){const n=t.getConnections();return e.dispatch(i.store).editPost({jetpack_publicize_connections:n})}}function w(e,t=!0){return function({dispatch:n}){n(h(e)),t&&n(E())}}function _(e){return{type:u.nC,connectionId:e}}function C(e,t=!0){return{type:u.WH,connectionId:e,deleting:t}}function A({connectionId:e,showSuccessNotice:t=!0}){return async function({registry:n,dispatch:a}){const{createErrorNotice:l,createSuccessNotice:c}=(0,o.dispatch)(r.store);try{const r=`/jetpack/v4/social/connections/${e}`;return a(k()),a(C(e)),await s()({method:"DELETE",path:r}),a(_(e)),t&&c(__("Account disconnected successfully.","jetpack"),{type:"snackbar",isDismissible:!0}),n.select(i.store).getCurrentPostId()&&a(E()),!0}catch(e){let t=__("Error disconnecting account.","jetpack");"object"==typeof e&&"message"in e&&e.message&&(t=`${t} ${e.message}`),l(t,{type:"snackbar",isDismissible:!0})}finally{a(C(e,!1))}return!1}}let x=1;function j(e,t={}){return async function({registry:n,dispatch:a}){const{createErrorNotice:c,createSuccessNotice:u}=(0,o.dispatch)(r.store),d="new-"+ ++x;try{const r="/jetpack/v4/social/connections/";a(m({connection_id:d,...t})),a(k()),a(N(d));const o=await s()({method:"POST",path:r,data:e});o&&(a(S(d,{...o,can_disconnect:!0,enabled:!0})),u((0,l.sprintf)(/* translators: %s is the name of the social media platform e.g. "Facebook" */ +__("%s account connected successfully.","jetpack"),o.label),{type:"snackbar",isDismissible:!0}),n.select(i.store).getCurrentPostId()&&a(E()))}catch(e){let t=__("Error connecting account.","jetpack");"object"==typeof e&&"message"in e&&e.message&&(t=`${t} ${e.message}`),c(t,{type:"snackbar",isDismissible:!0})}finally{a(N(d,!1)),a(_(d))}}}function S(e,t){return{type:u.dw,connectionId:e,data:t}}function N(e,t=!0){return{type:u._6,connectionId:e,updating:t}}function R(e){return{type:u.Nv,reconnectingAccount:e}}function P(e,t){return async function({dispatch:n,select:a}){const{createErrorNotice:i,createSuccessNotice:l}=(0,o.dispatch)(r.store),c=a.getConnectionById(e);try{const r=`/jetpack/v4/social/connections/${e}`;n(k()),n(S(e,t)),n(N(e));await s()({method:"POST",path:r,data:t})&&l(__("Account updated successfully.","jetpack"),{type:"snackbar",isDismissible:!0})}catch(t){let r=__("Error updating account.","jetpack");"object"==typeof t&&"message"in t&&t.message&&(r=`${r} ${t.message}`),n(S(e,c)),i(r,{type:"snackbar",isDismissible:!0})}finally{n(N(e,!1))}}}function L(e){return{type:u.xW,isOpen:e}}function T(){return L(!0)}function B(){return L(!1)}},54118:(e,t,n)=>{"use strict";n.d(t,{BN:()=>d,Bc:()=>a,M6:()=>k,Nv:()=>u,WB:()=>m,WH:()=>i,Wp:()=>h,_6:()=>c,_y:()=>b,aF:()=>y,af:()=>s,b5:()=>g,dA:()=>r,dw:()=>l,fz:()=>v,nC:()=>o,rz:()=>f,xW:()=>p});const r="SET_CONNECTIONS",a="ADD_CONNECTION",s="TOGGLE_CONNECTION",o="DELETE_CONNECTION",i="DELETING_CONNECTION",l="UPDATE_CONNECTION",c="UPDATING_CONNECTION",u="SET_RECONNECTING_ACCOUNT",d="SET_KEYRING_RESULT",p="TOGGLE_CONNECTIONS_MODAL",m="ADD_ABORT_CONTROLLER",h="REMOVE_ABORT_CONTROLLERS",g="DEFAULT",f="REFRESH_CONNECTIONS",v="FETCH_POST_SHARE_STATUS",b="RECEIVE_POST_SHARE_STATUS",k="TOGGLE_SHARE_STATUS_MODAL",y="POLLING_FOR_POST_SHARE_STATUS"},62491:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(38716),a=n(72451),s=n(64236),o=n(33134);const i={...a,...r,...s,...n(83117),...o}},72451:(e,t,n)=>{"use strict";n.r(t),n.d(t,{closeShareStatusModal:()=>c,defaultIsRequestComplete:()=>u,fetchPostShareStatus:()=>s,openShareStatusModal:()=>l,pollForPostShareStatus:()=>h,pollingForPostShareStatus:()=>m,receivePostShareStaus:()=>o,toggleShareStatusModal:()=>i});var r=n(43656),a=n(54118);function s(e,t=!0){return{type:a.fz,postId:e,loading:t}}function o(e,t){return{type:a._y,shareStatus:e,postId:t}}function i(e){return{type:a.M6,isOpen:e}}function l(){return i(!0)}function c(){return i(!1)}const u=({lastTimestamp:e,postShareStatus:t})=>e?t.shares.some((t=>t.timestamp>e)):t.shares.length>0,d=6e4,p=3e3;function m(e,t=!0){return{type:a.aF,postId:e,polling:t}}function h({pollingInterval:e=p,postId:t,isRequestComplete:n=u,timeout:a=d}={}){return async function({dispatch:s,select:o,registry:i}){const l=Date.now(),c=t||i.select(r.store).getCurrentPostId(),u=o.getPostShareStatus(c).shares[0]?.timestamp||0;let d=!1,p=!1;s(m(c));do{o.getPostShareStatus(c).loading||s.invalidateResolution("getPostShareStatus",[c]),await new Promise((t=>setTimeout(t,e))),d=n({lastTimestamp:u,postShareStatus:o.getPostShareStatus(c)}),p=Date.now()-l>a}while(!d&&!p);s(m(c,!1))}}},64236:(e,t,n)=>{"use strict";n.r(t),n.d(t,{updateSocialImageGeneratorConfig:()=>s});var r=n(3582),a=n(75238);function s(e){return async function({registry:t}){const{saveSite:n}=t.dispatch(r.store);await n({[a.A]:e})}}},33134:(e,t,n)=>{"use strict";n.r(t),n.d(t,{updateSocialPluginSettings:()=>a});var r=n(3582);function a(e){return async function({registry:t}){const{saveEntityRecord:n}=t.dispatch(r.store);await n("jetpack/v4","social/settings",e)}}},83117:(e,t,n)=>{"use strict";n.r(t),n.d(t,{updateUtmSettings:()=>s});var r=n(3582),a=n(75238);function s(e){return async function({registry:t}){const{saveSite:n}=t.dispatch(r.store);await n({[a.b]:e})}}},75238:(e,t,n)=>{"use strict";n.d(t,{A:()=>r,b:()=>a});const r="jetpack_social_image_generator_settings",a="jetpack_social_utm_settings"},31963:(e,t,n)=>{"use strict";n.d(t,{Af:()=>c,BB:()=>k,M_:()=>y,PX:()=>b,V6:()=>h,bN:()=>p,gt:()=>m,me:()=>v,s:()=>d,zW:()=>g,zk:()=>f});var r=n(47143),a=n(70407),s=n(62491),o=n(708),i=n(75772),l=n(62146);const c="jetpack-social-plugin",u={reducer:o.A,actions:s.A,selectors:l.A,resolvers:i.Ay,initialState:(0,a.getSocialScriptData)()?.store_initial_state},d="facebook",p="instagram-business",m="linkedin",h="mastodon",g="bluesky",f="nextdoor",v="tumblr",b="twitter",k="threads",y=(0,r.createReduxStore)(c,u);(0,r.register)(y)},62015:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(54118);const a=(e={connections:[]},t)=>{switch(t.type){case r.xW:return{...e,isConnectionsModalOpen:t.isOpen};case r.Bc:return{...e,connections:[...e.connections,t.connection]};case r.dA:return{...e,connections:t.connections};case r.nC:return{...e,connections:e.connections.filter((({connection_id:e})=>e!==t.connectionId))};case r.WH:{const n=new Set(e.deletingConnections);return t.deleting?n.add(t.connectionId):n.delete(t.connectionId),{...e,deletingConnections:[...n]}}case r.Nv:return{...e,reconnectingAccount:t.reconnectingAccount};case r.dw:return{...e,connections:e.connections.map((e=>e.connection_id===t.connectionId?{...e,...t.data}:e))};case r._6:{const n=new Set(e.updatingConnections);return t.updating?n.add(t.connectionId):n.delete(t.connectionId),{...e,updatingConnections:[...n]}}case r.WB:{const n=t.requestType||r.b5;return{...e,abortControllers:{...e.abortControllers,[n]:[...e.abortControllers?.[n]||[],t.abortController]}}}case r.Wp:{const n=t.requestType||r.b5;return{...e,abortControllers:{...e.abortControllers,[n]:[]}}}case r.BN:return{...e,keyringResult:t.keyringResult};case r.af: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}},708:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(47143),a=n(62015),s=n(53202);const o=(0,r.combineReducers)({connectionData:a.A,shareStatus:s.q})},53202:(e,t,n)=>{"use strict";n.d(t,{q:()=>a});var r=n(54118);function a(e={},t){switch(t.type){case r.fz:return{...e,[t.postId]:{shares:[],...e?.[t.postId],loading:t.loading??!0}};case r.aF:return{...e,[t.postId]:{shares:[],...e?.[t.postId],polling:t.polling??!0}};case r._y:return{...e,[t.postId]:{...e?.[t.postId],...t.shareStatus,loading:!1}};case r.M6:return{...e,isModalOpen:t.isOpen}}return e}},75772:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>p});var r=n(1455),a=n.n(r),s=n(3582),o=n(43656),i=n(27723),l=n(51371),c=n(59061),u=n(38716),d=n(72451);const __=i.__;const p={getConnections:function(){return function({dispatch:e,registry:t}){const n=t.select(o.store);if(!n.getCurrentPostId())return;const r=n.getEditedPostAttribute("jetpack_publicize_connections");e((0,u.setConnections)(r||[]))}},getPostShareStatus:function(e){return async({dispatch:t,registry:n})=>{const r=e||n.select(o.store).getCurrentPostId(),{feature_flags:s}=(0,l.n)();if(s.useShareStatus)try{t((0,d.fetchPostShareStatus)(r));let e=await a()({path:`jetpack/v4/social/share-status/${r}`});e=(0,c.xA)(e),t((0,d.receivePostShareStaus)(e,r))}catch{t((0,d.fetchPostShareStatus)(r,!1))}}},getSocialPluginSettings:function(){return async({registry:e})=>{e.select(s.store).getEntitiesConfig("jetpack/v4").some((({name:e})=>"social/settings"===e))||await e.dispatch(s.store).addEntities([{kind:"jetpack/v4",name:"social/settings",baseURL:"/jetpack/v4/social/settings",label:__("Social Settings","jetpack")}])}}}},28343:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getAbortControllers:()=>b,getBrokenConnections:()=>i,getConnectionById:()=>o,getConnectionProfileDetails:()=>h,getConnections:()=>s,getConnectionsByService:()=>l,getDeletingConnections:()=>g,getDisabledConnections:()=>m,getEnabledConnections:()=>p,getFailedConnections:()=>u,getKeyringResult:()=>E,getMustReauthConnections:()=>d,getReconnectingAccount:()=>v,getUpdatingConnections:()=>f,hasConnections:()=>c,isBlueskyAccountAlreadyConnected:()=>y,isConnectionsModalOpen:()=>w,isMastodonAccountAlreadyConnected:()=>k});var r=n(50384),a=n(54118);function s(e){return e.connectionData?.connections??[]}function o(e,t){return s(e).find((e=>e.connection_id===t))}function i(e){return s(e).filter((e=>"broken"===e.status||(0,r.Y)(e,"broken")))}function l(e,t){return s(e).filter((({service_name:e})=>e===t))}function c(e){return s(e).length>0}function u(e){return s(e).filter((e=>!1===e.test_success))}function d(e){return s(e).filter((e=>"must_reauth"===e.test_success)).map((e=>e.service_name))}function p(e){return s(e).filter((e=>e.enabled))}function m(e){return s(e).filter((e=>!e.enabled))}function h(e,t,{forceDefaults:n=!1}={}){let r="",a="",o="";if(!n){const n=s(e).find((({service_name:e})=>t===e));if(n){const{display_name:e,profile_display_name:s,profile_picture:i,external_display:l,external_name:c}=n;r="twitter"===t?s:e||l,o="twitter"===t?e:n.username,a=i,"bluesky"===t&&(o=c)}}return{displayName:r,profileImage:a,username:o}}function g(e){return e.connectionData?.deletingConnections??[]}function f(e){return e.connectionData?.updatingConnections??[]}function v(e){return e.connectionData?.reconnectingAccount}function b(e,t=a.b5){return e.connectionData?.abortControllers?.[t]??[]}function k(e,t){return l(e,"mastodon").some((e=>e.external_display===t))}function y(e,t){return l(e,"bluesky").some((e=>e.external_name===t))}function E(e){return e.connectionData?.keyringResult}function w(e){return e.connectionData?.isConnectionsModalOpen??!1}},62146:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(3582),a=n(47143),s=n(28343),o=n(49424),i=n(59379),l=n(68273),c=n(86982);const u={...s,...o,isSavingSiteSettings:(0,a.createRegistrySelector)((e=>()=>e(r.store).isSavingEntityRecord("root","site",void 0))),...i,...c,...l}},49424:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getPostShareStatus:()=>s,isShareStatusModalOpen:()=>o});var r=n(47143),a=n(43656);const s=(0,r.createRegistrySelector)((e=>(t,n)=>{const r=n||e(a.store).getCurrentPostId();return t.shareStatus?.[r]??{shares:[]}}));function o(e){return e.shareStatus?.isModalOpen??!1}},59379:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getSocialImageGeneratorConfig:()=>i});var r=n(3582),a=n(47143),s=n(70407),o=n(75238);const i=(0,a.createRegistrySelector)((e=>()=>{const{getSite:t}=e(r.store),n=t(void 0,{_fields:o.A});return n?.[o.A]??(0,s.getSocialScriptData)().settings.socialImageGenerator}))},68273:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getSocialPluginSettings:()=>o,isSavingSocialPluginSettings:()=>i});var r=n(3582),a=n(47143),s=n(70407);const o=(0,a.createRegistrySelector)((e=>()=>e(r.store).getEntityRecord("jetpack/v4","social/settings",void 0)??(0,s.getSocialScriptData)().settings.socialPlugin)),i=(0,a.createRegistrySelector)((e=>()=>e(r.store).isSavingEntityRecord("jetpack/v4","social/settings",void 0)))},86982:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getUtmSettings:()=>i});var r=n(3582),a=n(47143),s=n(70407),o=n(75238);const i=(0,a.createRegistrySelector)((e=>()=>{const{getSite:t}=e(r.store),n=t(void 0,{_fields:o.b});return n?.[o.b]??(0,s.getSocialScriptData)().settings.utmSettings}))},50384:(e,t,n)=>{"use strict";n.d(t,{Y:()=>r});const r=(e,t)=>!1===e.is_healthy&&t===(e.error_code??"broken")},27844:(e,t,n)=>{"use strict";n.d(t,{q:()=>r});const r={ENHANCED_PUBLISHING:"social-enhanced-publishing",IMAGE_GENERATOR:"social-image-generator"}},12093:(e,t,n)=>{"use strict";n.d(t,{T:()=>a});const r=255;function a(){return r}},3280:(e,t,n)=>{"use strict";n.d(t,{n:()=>a});var r=n(85985);function a(){return(0,r.$i)()?.social?.supportedAdditionalConnections||[]}},70407:(e,t,n)=>{"use strict";n.d(t,{getShareMessageMaxLength:()=>r.T,getSocialScriptData:()=>i.n,getSupportedAdditionalConnections:()=>a.n,hasSocialPaidFeatures:()=>i.p,requestExternalAccess:()=>s.x});var r=n(12093),a=n(3280),s=n(5367),o=n(18672);n.o(o,"GlobalModals")&&n.d(t,{GlobalModals:function(){return o.GlobalModals}}),n.o(o,"getSocialScriptData")&&n.d(t,{getSocialScriptData:function(){return o.getSocialScriptData}}),n.o(o,"hasSocialPaidFeatures")&&n.d(t,{hasSocialPaidFeatures:function(){return o.hasSocialPaidFeatures}}),n.o(o,"usePostCanUseSig")&&n.d(t,{usePostCanUseSig:function(){return o.usePostCanUseSig}}),n.o(o,"useSyncPostDataToStore")&&n.d(t,{useSyncPostDataToStore:function(){return o.useSyncPostDataToStore}});var i=n(51371);n(27844)},5367:(e,t,n)=>{"use strict";n.d(t,{x:()=>a});var r=n(51119);const a=(e,t)=>{const n=new r.A;let a;n.open(e,null,"toolbar=0,location=0,status=0,menubar=0,"+n.getScreenCenterSpecs(780,700)),n.once("close",(()=>{t(a?.ID?a:{})})),n.on("message",(e=>{a=e?.data}))}},51371:(e,t,n)=>{"use strict";n.d(t,{n:()=>a,p:()=>s});var r=n(97999);function a(){return(0,r.getScriptData)()?.social}function s(){return(0,r.siteHasFeature)("social-enhanced-publishing")}},59061:(e,t,n)=>{"use strict";function r(e){return e&&"shares"in e&&e.done&&e.shares.sort(((e,t)=>t.timestamp-e.timestamp)),e}function a(e){return t=>t.service_name===e.service&&(e.external_id?t.external_id===e.external_id:t.connection_id===e.connection_id.toString())}function s(e,t){return e.service===t.service&&(e.connection_id===t.connection_id||!(!e.external_id&&!t.external_id)&&e.external_id===t.external_id)}n.d(t,{Ri:()=>s,eJ:()=>a,xA:()=>r})},50646:(e,t,n)=>{"use strict";n(51371)},18672:()=>{},85985:(e,t,n)=>{"use strict";n.d(t,{$i:()=>r.A,BT:()=>l.A,Cq:()=>h.C,Dk:()=>c.Dk,FB:()=>o.A,GE:()=>a.A,GT:()=>c.GT,Q4:()=>c.Q4,Sy:()=>s.Sy,W4:()=>c.W4,aq:()=>c.aq,d9:()=>s.d9,gB:()=>u.A,jt:()=>m.A,lk:()=>s.lk,pP:()=>s.pP,q7:()=>p.A,sH:()=>c.sH,sh:()=>h.s,st:()=>d.A,tu:()=>c.tu,vp:()=>i.A});var r=n(34972),a=n(54815),s=n(62634),o=n(60703),i=n(82034),l=n(65595),c=n(53265),u=n(49354),d=n(73489),p=n(76923),m=n(15877),h=n(30335);n(88290)},15877:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(67142),a=n(51609),s=n.n(a);const o=()=>s().createElement(r.A,{className:"jetpack-editor-panel-logo",height:16,logoColor:"#1E1E1E",showText:!1})},30335:(e,t,n)=>{"use strict";n.d(t,{C:()=>o,s:()=>s});var r=n(86087),a=n(19334);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.A)()}}},19334:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(62634);const a="#069e08";function s(){return(0,r.d9)()||(0,r.Sy)()?null:a}},34972:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r="Jetpack_Editor_Initial_State";function a(){return"object"==typeof window?window?.[r]??null:null}},60703:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(34972);function a(e){const t=(0,r.A)(),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}}}},54815:(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,{A:()=>r})},73489:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(90372),a=n(39384),s=n(86087);const{tracks:o}=r.A,{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.useConnection)(),{wpcomUser:{login:h,ID:g}={},blogId:f}=m.currentUser||{},v=(0,s.useCallback)((async(e,t={})=>{d&&g&&h&&i(e,t)}),[d,g,h]);return(0,s.useEffect)((()=>{d&&g&&h&&f&&r.A.initialize(g,h,{blog_id:f})}),[f,g,h,d]),(0,s.useEffect)((()=>{const r=e?`${t}_${e}_${n}`:null;p&&r&&(c||(v(r,l),u(!0)))}),[c,t,e,n,p,l,v]),{recordEvent:v,tracks:o}}},76923:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(47143),a=n(86087),s=n(88290);const o=e=>{const{isModuleActive:t,isChangingStatus:n,isLoadingModules:o}=(0,r.useSelect)((t=>{const n=t(s.F);return{isModuleActive:n.isModuleActive(e),isChangingStatus:n.isModuleUpdating(e),isLoadingModules:n.areModulesLoading(e)}}),[e]),{updateJetpackModuleStatus:i}=(0,r.useDispatch)(s.F),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])}},49354:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(34972);function a(){return(0,r.A)()?.jetpack?.is_current_user_connected??!1}},27105:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>d,E9:()=>u});var r=n(47143),a=n(62634),s=n(94478),o=n(88290);const i="SET_JETPACK_MODULES";function l(e){return u({isLoading:e})}function c(e,t){return{type:"SET_MODULE_UPDATING",name:e,isUpdating:t}}function u(e){return{type:i,options:e}}const d={updateJetpackModuleStatus:function*(e){try{yield c(e.name,!0),yield(0,s.sB)(e);const t=yield(0,s.wz)();return yield u({data:t}),!0}catch{const e=(0,r.select)(o.F).getJetpackModules();return yield u(e),!1}finally{yield c(e.name,!1)}},setJetpackModules:u,fetchModules:function*(){if((0,a.Sy)())return!0;try{yield l(!0);const e=yield(0,s.wz)();return yield u({data:e}),!0}catch{const e=(0,r.select)(o.F).getJetpackModules();return yield u(e),!1}finally{yield l(!1)}}}},94478:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>c,sB:()=>l,wz:()=>i});var r=n(1455),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}})}}},88290:(e,t,n)=>{"use strict";n.d(t,{F:()=>c});var r=n(47143),a=n(27105),s=n(94478),o=n(38862),i=n(62701),l=n(31640);const c="jetpack-modules",u=(0,r.createReduxStore)(c,{reducer:o.A,actions:a.Ay,controls:s.Ay,resolvers:i.A,selectors:l.A});(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}})},38862:(e,t,n)=>{"use strict";n.d(t,{A:()=>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}},62701:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(27105),a=n(94478);const s={getJetpackModules:function*(){try{const e=yield(0,a.wz)();if(e)return(0,r.E9)({data:e})}catch(e){console.error(e)}}}},31640:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(62634);const a={getJetpackModules:e=>e.data,isModuleActive:(e,t)=>(0,r.Sy)()||(e?.data?.[t]?.activated??!1),areModulesLoading:e=>e.isLoading??!1,isModuleUpdating:(e,t)=>e?.isUpdating?.[t]??!1}},53265:(e,t,n)=>{"use strict";n.d(t,{Dk:()=>g,GT:()=>v,Q4:()=>u,W4:()=>d,aq:()=>p,sH:()=>f,tu:()=>m});var r=n(27723),a=n(93832),s=n(66087),o=n(34972),i=n(60703),l=n(54815),c=n(62634);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.A)().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.Sy)()?(0,a.addQueryArgs)("/"+(0,s.compact)([e,r,(0,l.A)(),n]).join("/"),{plan_upgraded:1}):(0,a.addQueryArgs)(window.location.protocol+`//${(0,l.A)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:n,plan_upgraded:1})})();return(0,c.d9)()?(0,a.addQueryArgs)(`https://wordpress.com/plans/${(0,l.A)()}`,{redirect_to:i,customerType:"business"}):o&&(0,a.addQueryArgs)(`https://wordpress.com/checkout/${(0,l.A)()}/${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.A)(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.A)(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.A)(),"jetpack.enable_upgrade_nudge",!1)}const f=e=>(0,s.map)(h,"name").includes(e),v=e=>(0,s.head)((0,s.filter)(h,(({name:t})=>t===e)))},82034:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(92279),a=n(60703);function s(e,t){const{available:n,unavailableReason:s}=(0,a.A)(e);return!!n&&(0,r.registerPlugin)(`jetpack-${e}`,t)}},62634:(e,t,n)=>{"use strict";n.d(t,{Sy:()=>s,d9:()=>o,lk:()=>l,pP:()=>i});var r=n(34972);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.A)();return e?.jetpack?.is_private_site??!1}function l(){const e=(0,r.A)();return e?.jetpack?.is_coming_soon??!1}},65595:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(96072),a=n.n(r),s=n(29491);const o=e=>(0,s.createHigherOrderComponent)((t=>n=>React.createElement(t,a()({},n,{className:n.name===e?"has-warning is-interactive":n.className}))),"withHasWarningIsInteractiveClassNames")},84705:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>a});var r=n(58992);n(91135);const a=r.d},91135:(e,t,n)=>{"use strict";n.d(t,{$:()=>r});const r=[{name:"amazon",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M13.582 8.182c-1.648.185-3.802.308-5.344.984-1.781.769-3.03 2.337-3.03 4.644 0 2.953 1.86 4.429 4.253 4.429 2.02 0 3.125-.477 4.685-2.065.516.747.685 1.109 1.629 1.894a.59.59 0 0 0 .672-.066l.006.006c.567-.505 1.599-1.401 2.18-1.888.231-.188.19-.496.009-.754-.52-.718-1.072-1.303-1.072-2.634V8.305c0-1.876.133-3.599-1.249-4.891C15.23 2.369 13.422 2 12.04 2 9.336 2 6.318 3.01 5.686 6.351c-.068.355.191.542.423.594l2.754.298c.258-.013.445-.266.494-.523.236-1.151 1.2-1.706 2.284-1.706.584 0 1.249.215 1.595.738.398.584.346 1.384.346 2.061zm-.533 5.906c-.451.8-1.169 1.291-1.967 1.291-1.09 0-1.728-.83-1.728-2.061 0-2.42 2.171-2.86 4.227-2.86v.615c.001 1.108.027 2.031-.532 3.015m7.634 5.251C18.329 21.076 14.917 22 11.979 22c-4.118 0-7.826-1.522-10.632-4.057-.22-.199-.024-.471.241-.317 3.027 1.762 6.771 2.823 10.639 2.823 2.608 0 5.476-.541 8.115-1.66.397-.169.73.262.341.55m.653 1.704c-.194.163-.379.076-.293-.139.284-.71.92-2.298.619-2.684s-1.99-.183-2.749-.092c-.23.027-.266-.173-.059-.319 1.348-.946 3.555-.673 3.811-.356.26.32-.066 2.533-1.329 3.59"})))},{name:"behance",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M7.799 5.698c.589 0 1.12.051 1.606.156q.722.155 1.241.507.516.351.804.938c.188.387.281.871.281 1.443q0 .93-.421 1.551-.424.62-1.255 1.014 1.133.328 1.689 1.146.559.822.557 1.975 0 .935-.359 1.612a3.14 3.14 0 0 1-.973 1.114q-.613.432-1.399.637A6.1 6.1 0 0 1 7.963 18H2V5.698zm-.35 4.97q.721 0 1.192-.345.465-.344.463-1.119 0-.43-.152-.707a1.1 1.1 0 0 0-.416-.427 1.7 1.7 0 0 0-.596-.216 3.6 3.6 0 0 0-.697-.06H4.709v2.874zm.151 5.237q.401.001.759-.077c.243-.053.457-.137.637-.261.182-.12.332-.283.441-.491q.164-.31.163-.798-.002-.948-.533-1.357c-.356-.27-.83-.404-1.413-.404H4.709v3.388zm8.562-.041q.552.538 1.583.538.74 0 1.277-.374c.354-.248.571-.514.654-.79h2.155c-.347 1.072-.872 1.838-1.589 2.299-.708.463-1.572.693-2.58.693q-1.05 0-1.899-.337a4 4 0 0 1-1.439-.958 4.4 4.4 0 0 1-.904-1.484 5.4 5.4 0 0 1-.32-1.899q0-1 .329-1.863a4.4 4.4 0 0 1 .933-1.492q.607-.63 1.444-.994a4.6 4.6 0 0 1 1.857-.363q1.131-.001 1.98.44a3.94 3.94 0 0 1 1.389 1.181 4.8 4.8 0 0 1 .783 1.69q.24.947.171 1.983h-6.428c-.001.706.237 1.372.604 1.73m2.811-4.68c-.291-.321-.783-.496-1.384-.496q-.585 0-.973.2a2 2 0 0 0-.621.491 1.8 1.8 0 0 0-.328.628 2.7 2.7 0 0 0-.111.587h3.98c-.058-.625-.271-1.085-.563-1.41m-3.916-3.446h4.985V6.524h-4.985z"})))},{name:"blogger-alt",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M19.779 9.904h-.981l-.021.001a1.163 1.163 0 0 1-1.16-1.079l-.001-.013A5.813 5.813 0 0 0 11.803 3H8.871a5.813 5.813 0 0 0-5.813 5.813v6.375a5.813 5.813 0 0 0 5.813 5.813h6.257a5.814 5.814 0 0 0 5.813-5.813l.002-4.121a1.164 1.164 0 0 0-1.164-1.163M8.726 7.713h3.291a1.117 1.117 0 1 1 0 2.234H8.726a1.117 1.117 0 1 1 0-2.234m6.601 8.657H8.72a1.057 1.057 0 1 1 0-2.114h6.607a1.057 1.057 0 1 1 0 2.114"})))},{name:"blogger",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M14.722 14.019a.654.654 0 0 1-.654.654H9.977a.654.654 0 0 1 0-1.308h4.091c.361 0 .654.293.654.654m-4.741-3.321h2.038a.692.692 0 0 0 0-1.384H9.981a.692.692 0 0 0 0 1.384M21 5v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2m-3.456 6.39a.72.72 0 0 0-.72-.72h-.607l-.013.001a.72.72 0 0 1-.718-.668l-.001-.008a3.6 3.6 0 0 0-3.599-3.599H10.07a3.6 3.6 0 0 0-3.599 3.599v3.947a3.6 3.6 0 0 0 3.599 3.599h3.874a3.6 3.6 0 0 0 3.599-3.599z"})))},{name:"bluesky",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M21.2 3.3c-.5-.2-1.4-.5-3.6 1C15.4 6 12.9 9.2 12 11c-.9-1.8-3.4-5-5.7-6.7-2.2-1.6-3-1.3-3.6-1S2 4.6 2 5.1s.3 4.7.5 5.4c.7 2.3 3.1 3.1 5.3 2.8-3.3.5-6.2 1.7-2.4 5.9 4.2 4.3 5.7-.9 6.5-3.6.8 2.7 1.7 7.7 6.4 3.6 3.6-3.6 1-5.4-2.3-5.9 2.2.2 4.6-.5 5.3-2.8.4-.7.7-4.8.7-5.4 0-.5-.1-1.5-.8-1.8"})))},{name:"codepen",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"m22.016 8.84-.007-.037q-.006-.037-.015-.072-.007-.022-.013-.042l-.023-.062-.02-.042a.4.4 0 0 0-.03-.057l-.025-.038-.035-.052-.03-.037q-.021-.026-.043-.045-.015-.018-.035-.035a.4.4 0 0 0-.048-.04l-.037-.03-.015-.012-9.161-6.096a.86.86 0 0 0-.955 0L2.359 8.237l-.015.012-.038.028-.048.04a.638.638 0 0 0-.078.082q-.018.018-.03.037-.018.026-.035.052l-.025.038q-.016.031-.03.059l-.02.041a1 1 0 0 0-.034.106q-.01.034-.016.071-.003.02-.006.037a1 1 0 0 0-.009.114v6.093q0 .056.008.112l.007.038q.006.035.015.072a.2.2 0 0 0 .013.04q.01.032.022.063l.02.04a.4.4 0 0 0 .055.096l.035.052.03.037.042.045.035.035q.023.02.048.04l.038.03.013.01 9.163 6.095a.858.858 0 0 0 .959.004l9.163-6.095.015-.01q.02-.015.037-.03l.048-.04q.02-.017.035-.035.025-.024.043-.045l.03-.037.035-.052.025-.038a.4.4 0 0 0 .03-.058l.02-.04.023-.063c.003-.013.01-.027.013-.04q.009-.037.015-.072l.007-.037q.006-.062.007-.117V8.954a1 1 0 0 0-.008-.114m-9.154-4.376 6.751 4.49-3.016 2.013-3.735-2.492zm-1.724 0v4.009l-3.735 2.494-3.014-2.013zm-7.439 6.098L5.853 12l-2.155 1.438zm7.439 8.974-6.749-4.491 3.015-2.011 3.735 2.492zM12 14.035 8.953 12 12 9.966 15.047 12zm.862 5.501v-4.009l3.735-2.492 3.016 2.011zm7.441-6.098L18.147 12l2.156-1.438z"})))},{name:"deezer",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M20.129 3.662c.222-1.287.548-2.096.909-2.098h.001c.673.002 1.219 2.809 1.219 6.274s-.546 6.274-1.22 6.274c-.276 0-.531-.477-.736-1.276-.324 2.926-.997 4.937-1.776 4.937-.603 0-1.144-1.208-1.507-3.114-.248 3.624-.872 6.195-1.602 6.195-.458 0-.875-1.019-1.184-2.678C13.861 21.6 13.003 24 12.002 24s-1.861-2.399-2.231-5.824c-.307 1.659-.724 2.678-1.184 2.678-.73 0-1.352-2.571-1.602-6.195-.363 1.905-.903 3.114-1.507 3.114-.778 0-1.452-2.011-1.776-4.937-.204.802-.46 1.276-.736 1.276-.674 0-1.22-2.809-1.22-6.274s.546-6.274 1.22-6.274c.362 0 .685.812.91 2.098.357-2.22.94-3.662 1.6-3.662.784 0 1.463 2.04 1.784 5.002.314-2.156.791-3.53 1.325-3.53.749 0 1.385 2.703 1.621 6.474.443-1.933 1.085-3.146 1.795-3.146s1.352 1.214 1.795 3.146c.237-3.771.872-6.474 1.621-6.474.533 0 1.009 1.374 1.325 3.53.321-2.962 1-5.002 1.784-5.002.658 0 1.244 1.443 1.603 3.662M0 7.221c0-1.549.31-2.805.692-2.805s.692 1.256.692 2.805-.31 2.805-.692 2.805S0 8.77 0 7.221m22.616 0c0-1.549.31-2.805.692-2.805S24 5.672 24 7.221s-.31 2.805-.692 2.805-.692-1.256-.692-2.805"})))},{name:"discord",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M20.33 4.523A20 20 0 0 0 15.379 3a14 14 0 0 0-.634 1.289 18.4 18.4 0 0 0-5.495 0A14 14 0 0 0 8.615 3 20 20 0 0 0 3.66 4.527C.527 9.163-.323 13.684.102 18.141a20 20 0 0 0 6.073 3.049 14.7 14.7 0 0 0 1.301-2.097 13 13 0 0 1-2.048-.978q.258-.189.502-.378a14.27 14.27 0 0 0 12.142 0q.247.202.502.378a13 13 0 0 1-2.052.98 14.5 14.5 0 0 0 1.301 2.095 19.9 19.9 0 0 0 6.076-3.047c.498-5.168-.851-9.648-3.568-13.62M8.013 15.4c-1.183 0-2.161-1.074-2.161-2.395S6.796 10.6 8.01 10.6s2.183 1.083 2.163 2.405S9.22 15.4 8.013 15.4m7.974 0c-1.186 0-2.16-1.074-2.16-2.395s.944-2.405 2.16-2.405 2.178 1.083 2.157 2.405-.951 2.395-2.158 2.395"})))},{name:"dribbble",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10m8.434-8.631c-.292-.092-2.644-.794-5.32-.365 1.117 3.07 1.572 5.57 1.659 6.09a8.56 8.56 0 0 0 3.661-5.725m-5.098 6.507c-.127-.749-.623-3.361-1.822-6.477l-.056.019c-4.818 1.679-6.547 5.02-6.701 5.334A8.5 8.5 0 0 0 12 20.555a8.5 8.5 0 0 0 3.336-.679m-9.682-2.152c.193-.331 2.538-4.213 6.943-5.637q.167-.054.337-.102a29 29 0 0 0-.692-1.45c-4.266 1.277-8.405 1.223-8.778 1.216a8.497 8.497 0 0 0 2.19 5.973m-2.015-7.46c.382.005 3.901.02 7.897-1.041a55 55 0 0 0-3.167-4.94 8.57 8.57 0 0 0-4.73 5.981m6.359-6.555a46 46 0 0 1 3.187 5c3.037-1.138 4.323-2.867 4.477-3.085a8.51 8.51 0 0 0-7.664-1.915m8.614 2.903c-.18.243-1.612 2.078-4.77 3.367a27 27 0 0 1 .751 1.678c2.842-.357 5.666.215 5.948.275a8.5 8.5 0 0 0-1.929-5.32"})))},{name:"dropbox",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 6.134 6.069 9.797 2 6.54l5.883-3.843zm-10 6.92 5.883 3.843L12 13.459 6.069 9.797zm10 .405 4.116 3.439L22 13.054l-4.069-3.257zM22 6.54l-5.884-3.843L12 6.134l5.931 3.663zm-9.989 7.66-4.129 3.426-1.767-1.153v1.291l5.896 3.539 5.897-3.539v-1.291l-1.769 1.153z"})))},{name:"eventbrite",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M18.041 3.931 5.959 3A2.96 2.96 0 0 0 3 5.959v12.083A2.96 2.96 0 0 0 5.959 21l12.083-.931C19.699 19.983 21 18.744 21 17.11V6.89c0-1.634-1.259-2.863-2.959-2.959M16.933 8.17c-.082.215-.192.432-.378.551-.188.122-.489.132-.799.132-1.521 0-3.062-.048-4.607-.048q-.23 1.061-.451 2.128c.932-.004 1.873.005 2.81.005.726 0 1.462-.069 1.586.525.04.189-.001.426-.052.615-.105.38-.258.676-.625.783-.185.054-.408.058-.646.058-1.145 0-2.345.017-3.493.02-.169.772-.328 1.553-.489 2.333 1.57-.005 3.067-.041 4.633-.058.627-.007 1.085.194 1.009.85a2.2 2.2 0 0 1-.211.725c-.102.208-.248.376-.488.452-.237.075-.541.064-.862.078-.304.014-.614.008-.924.016-.309.009-.619.022-.919.022-1.253 0-2.429.08-3.683.073-.603-.004-1.014-.249-1.124-.757-.059-.273-.018-.58.036-.841a3543 3543 0 0 1 1.629-7.763c.056-.265.114-.511.225-.714a1.24 1.24 0 0 1 .79-.62c.368-.099.883-.047 1.344-.047.305 0 .612.008.914.016.925.026 1.817.03 2.747.053.304.007.615.016.915.016.621 0 1.17.073 1.245.614.039.288-.051.567-.132.783"})))},{name:"facebook",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10"})))},{name:"fediverse",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 743 743"},React.createElement("g",null,React.createElement("path",{d:"M181.131 275.137a68.9 68.9 0 0 1-29.465 29.328l161.758 162.389 38.998-19.764zm213.363 214.187-38.998 19.764 81.963 82.283a68.9 68.9 0 0 1 29.471-29.332zM581.646 339.391l-91.576 46.41 6.752 43.189 103.616-52.513a68.9 68.9 0 0 1-18.792-37.086m-144.738 73.351L220.383 522.477a68.9 68.9 0 0 1 18.795 37.089L443.66 455.934zM367.275 142.438l-104.48 203.97 30.848 30.967 110.623-215.957a68.9 68.9 0 0 1-36.991-18.98M235.621 399.459l-52.922 103.314a68.9 68.9 0 0 1 36.987 18.979l46.781-91.328zM150.768 304.918a68.9 68.9 0 0 1-34.416 7.195 69 69 0 0 1-6.651-.695l30.903 197.662a68.9 68.9 0 0 1 34.416-7.195 69 69 0 0 1 6.646.695zM239.342 560.545c.707 4.589.949 9.239.72 13.877a68.9 68.9 0 0 1-7.267 27.18l197.629 31.712c-.708-4.59-.95-9.24-.723-13.878a68.9 68.9 0 0 1 7.27-27.178zM601.133 377.199l-91.219 178.082a68.9 68.9 0 0 1 36.994 18.983l91.217-178.08a68.9 68.9 0 0 1-36.992-18.985M476.723 125.33a68.9 68.9 0 0 1-29.471 29.332l141.266 141.811a68.9 68.9 0 0 1 29.468-29.332zM347.787 104.631l-178.576 90.498a68.9 68.9 0 0 1 18.793 37.086l178.574-90.502a68.9 68.9 0 0 1-18.791-37.082M446.926 154.826a68.9 68.9 0 0 1-34.983 7.483 69 69 0 0 1-6.029-.633l15.818 101.291 43.163 6.926zm-16 167.028 37.4 239.482a68.9 68.9 0 0 1 33.914-6.943q3.625.206 7.207.791L474.09 328.777zM188.131 232.975c.734 4.66.988 9.383.758 14.095a68.9 68.9 0 0 1-7.16 26.983l101.369 16.281 19.923-38.908zm173.736 27.9-19.926 38.912 239.514 38.467a69 69 0 0 1-.695-13.719 68.9 68.9 0 0 1 7.349-27.324z"}),React.createElement("path",{fillOpacity:".996",d:"M412.284 156.054c34.538 1.882 64.061-24.592 65.943-59.13s-24.592-64.062-59.131-65.943c-34.538-1.882-64.061 24.592-65.943 59.13s24.593 64.062 59.131 65.943M646.144 390.82c34.538 1.881 64.062-24.593 65.943-59.131s-24.592-64.061-59.13-65.943-64.062 24.593-65.943 59.131 24.592 64.061 59.13 65.943M495.086 685.719c34.538 1.881 64.062-24.592 65.943-59.13s-24.592-64.062-59.13-65.943-64.062 24.592-65.943 59.13 24.592 64.062 59.13 65.943M167.866 633.211c34.538 1.882 64.062-24.592 65.943-59.13s-24.592-64.062-59.13-65.943-64.062 24.592-65.943 59.13 24.592 64.062 59.13 65.943M116.692 305.86c34.538 1.882 64.062-24.592 65.943-59.13s-24.592-64.062-59.131-65.943c-34.538-1.881-64.061 24.592-65.943 59.13s24.593 64.062 59.131 65.943"})))},{name:"feed",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M2 8.667V12c5.515 0 10 4.485 10 10h3.333c0-7.363-5.97-13.333-13.333-13.333M2 2v3.333c9.19 0 16.667 7.477 16.667 16.667H22C22 10.955 13.045 2 2 2m2.5 15a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5"})))},{name:"flickr",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5m11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5"})))},{name:"foursquare",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M17.573 2H6.905C5.434 2 5 3.107 5 3.805v16.948c0 .785.422 1.077.66 1.172.238.097.892.177 1.285-.275 0 0 5.035-5.843 5.122-5.93.132-.132.132-.132.262-.132h3.26c1.368 0 1.588-.977 1.732-1.552.078-.318.692-3.428 1.225-6.122l.675-3.368C19.56 2.893 19.14 2 17.573 2m-1.078 5.22c-.053.252-.372.518-.665.518h-4.157c-.467 0-.802.318-.802.787v.508c0 .467.337.798.805.798h3.528c.331 0 .655.362.583.715s-.407 2.102-.448 2.295c-.04.193-.262.523-.655.523h-2.88c-.523 0-.683.068-1.033.503-.35.437-3.505 4.223-3.505 4.223-.032.035-.063.027-.063-.015V4.852c0-.298.26-.648.648-.648h8.562c.315 0 .61.297.528.683z"})))},{name:"ghost",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M10.203 20.997H3.005v-3.599h7.198zm10.792-3.599h-7.193v3.599h7.193zm.003-7.198H3v3.599h17.998zm-7.195-7.197H3.005v3.599h10.798zm7.197 0h-3.599v3.599H21z"})))},{name:"git",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M23.519 10.947 13.053.482a1.543 1.543 0 0 0-2.183 0L8.696 2.656l2.756 2.756a1.83 1.83 0 0 1 1.886.439 1.84 1.84 0 0 1 .436 1.898l2.656 2.657a1.83 1.83 0 0 1 1.899.436 1.837 1.837 0 0 1 0 2.597 1.84 1.84 0 0 1-2.599 0 1.84 1.84 0 0 1-.4-1.998l-2.478-2.477v6.521a1.837 1.837 0 0 1 .485 2.945 1.837 1.837 0 0 1-2.597 0 1.837 1.837 0 0 1 0-2.598 1.8 1.8 0 0 1 .602-.401V8.85a1.8 1.8 0 0 1-.602-.4 1.84 1.84 0 0 1-.395-2.009L7.628 3.723.452 10.898a1.544 1.544 0 0 0 0 2.184l10.467 10.467a1.544 1.544 0 0 0 2.183 0l10.417-10.418a1.546 1.546 0 0 0 0-2.184"})))},{name:"github",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12c0 4.419 2.865 8.166 6.839 9.489.5.09.682-.218.682-.484 0-.236-.009-.866-.014-1.699-2.782.602-3.369-1.34-3.369-1.34-.455-1.157-1.11-1.465-1.11-1.465-.909-.62.069-.608.069-.608 1.004.071 1.532 1.03 1.532 1.03.891 1.529 2.341 1.089 2.91.833.091-.647.349-1.086.635-1.337-2.22-.251-4.555-1.111-4.555-4.943 0-1.091.39-1.984 1.03-2.682-.103-.254-.447-1.27.097-2.646 0 0 .84-.269 2.75 1.025A9.6 9.6 0 0 1 12 6.836c.85.004 1.705.114 2.504.336 1.909-1.294 2.748-1.025 2.748-1.025.546 1.376.202 2.394.1 2.646.64.699 1.026 1.591 1.026 2.682 0 3.841-2.337 4.687-4.565 4.935.359.307.679.917.679 1.852 0 1.335-.012 2.415-.012 2.741 0 .269.18.579.688.481A10 10 0 0 0 22 12c0-5.523-4.477-10-10-10"})))},{name:"google-alt",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m-.05 16c-3.312 0-6-2.688-6-6s2.688-6 6-6c1.62 0 2.976.594 4.014 1.566L14.26 9.222c-.432-.408-1.188-.888-2.31-.888-1.986 0-3.606 1.65-3.606 3.672s1.62 3.672 3.606 3.672c2.298 0 3.144-1.59 3.3-2.532h-3.306v-2.238h5.616c.084.378.15.732.15 1.23 0 3.426-2.298 5.862-5.76 5.862"})))},{name:"google-plus-alt",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M8 11h6.61c.06.35.11.7.11 1.16 0 4-2.68 6.84-6.72 6.84-3.87 0-7-3.13-7-7s3.13-7 7-7c1.89 0 3.47.69 4.69 1.83l-1.9 1.83c-.52-.5-1.43-1.08-2.79-1.08-2.39 0-4.34 1.98-4.34 4.42S5.61 16.42 8 16.42c2.77 0 3.81-1.99 3.97-3.02H8zm15 0h-2V9h-2v2h-2v2h2v2h2v-2h2"})))},{name:"google-plus",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m-1.919 14.05a4.051 4.051 0 0 1 0-8.1c1.094 0 2.009.401 2.709 1.057l-1.15 1.118a2.23 2.23 0 0 0-1.559-.599c-1.341 0-2.434 1.114-2.434 2.479s1.094 2.479 2.434 2.479c1.551 0 2.122-1.073 2.227-1.709h-2.232v-1.511h3.791c.057.255.101.494.101.83.001 2.312-1.55 3.956-3.887 3.956M19 12.75h-1.25V14h-1.5v-1.25H15v-1.5h1.25V10h1.5v1.25H19z"})))},{name:"google",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12.02 10.18v3.73h5.51c-.26 1.57-1.67 4.22-5.5 4.22-3.31 0-6.01-2.75-6.01-6.12s2.7-6.12 6.01-6.12c1.87 0 3.13.8 3.85 1.48l2.84-2.76C16.99 2.99 14.73 2 12.03 2c-5.52 0-10 4.48-10 10s4.48 10 10 10c5.77 0 9.6-4.06 9.6-9.77 0-.83-.11-1.42-.25-2.05z"})))},{name:"instagram",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 4.622c2.403 0 2.688.009 3.637.052.877.04 1.354.187 1.671.31.42.163.72.358 1.035.673s.51.615.673 1.035c.123.317.27.794.31 1.671.043.949.052 1.234.052 3.637s-.009 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.671-.163.42-.358.72-.673 1.035s-.615.51-1.035.673c-.317.123-.794.27-1.671.31-.949.043-1.233.052-3.637.052s-2.688-.009-3.637-.052c-.877-.04-1.354-.187-1.671-.31a2.8 2.8 0 0 1-1.035-.673 2.8 2.8 0 0 1-.673-1.035c-.123-.317-.27-.794-.31-1.671-.043-.949-.052-1.234-.052-3.637s.009-2.688.052-3.637c.04-.877.187-1.354.31-1.671.163-.42.358-.72.673-1.035s.615-.51 1.035-.673c.317-.123.794-.27 1.671-.31.949-.043 1.234-.052 3.637-.052M12 3c-2.444 0-2.751.01-3.711.054-.958.044-1.612.196-2.184.418a4.4 4.4 0 0 0-1.594 1.039c-.5.5-.808 1.002-1.038 1.594-.223.572-.375 1.226-.419 2.184C3.01 9.249 3 9.556 3 12s.01 2.751.054 3.711c.044.958.196 1.612.418 2.185.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.267.054 3.711.054s2.751-.01 3.711-.054c.958-.044 1.612-.196 2.185-.418a4.4 4.4 0 0 0 1.594-1.038c.5-.5.808-1.002 1.038-1.594.222-.572.375-1.227.418-2.185.044-.96.054-1.267.054-3.711s-.01-2.751-.054-3.711c-.044-.958-.196-1.612-.418-2.185A4.4 4.4 0 0 0 19.49 4.51c-.5-.5-1.002-.808-1.594-1.038-.572-.222-1.227-.375-2.185-.418C14.751 3.01 14.444 3 12 3m0 4.378a4.622 4.622 0 1 0 0 9.244 4.622 4.622 0 0 0 0-9.244M12 15a3 3 0 1 1 0-6 3 3 0 0 1 0 6m4.804-8.884a1.08 1.08 0 1 0 .001 2.161 1.08 1.08 0 0 0-.001-2.161"})))},{name:"json-feed",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"m8.522 17.424.027.027c1.076-1.076 1.854-.993 3.154.306l2.053 2.053c2.136 2.136 4.131 2.028 6.515-.356l.729-.728-1.548-1.548-.373.373c-1.349 1.349-2.293 1.366-3.585.075l-2.409-2.409c-1.242-1.242-2.475-1.366-3.659-.381l-.232-.232c1.01-1.225.911-2.368-.29-3.568l-2.16-2.162c-1.317-1.317-1.308-2.236.058-3.602l.372-.372-1.54-1.54-.728.729c-2.393 2.393-2.525 4.346-.439 6.433l1.78 1.78c1.3 1.3 1.383 2.095.315 3.163l.008.008a1.384 1.384 0 0 0 1.952 1.951"}),React.createElement("circle",{cx:"13.089",cy:"10.905",r:"1.383"}),React.createElement("circle",{cx:"16.349",cy:"7.644",r:"1.383"}),React.createElement("circle",{cx:"19.61",cy:"4.383",r:"1.383"})))},{name:"line",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M14.255 9.572v3.333c0 .084-.066.15-.15.15h-.534a.16.16 0 0 1-.122-.061l-1.528-2.063v1.978c0 .084-.066.15-.15.15h-.534a.15.15 0 0 1-.15-.15V9.576c0-.084.066-.15.15-.15h.529a.14.14 0 0 1 .122.066l1.528 2.063V9.577c0-.084.066-.15.15-.15h.534a.15.15 0 0 1 .155.145m-3.844-.15h-.534a.15.15 0 0 0-.15.15v3.333c0 .084.066.15.15.15h.534c.084 0 .15-.066.15-.15V9.572c0-.08-.066-.15-.15-.15m-1.289 2.794H7.664V9.572a.15.15 0 0 0-.15-.15H6.98a.15.15 0 0 0-.15.15v3.333q0 .062.042.103a.16.16 0 0 0 .103.042h2.142c.084 0 .15-.066.15-.15v-.534a.15.15 0 0 0-.145-.15m7.945-2.794h-2.142c-.08 0-.15.066-.15.15v3.333c0 .08.066.15.15.15h2.142c.084 0 .15-.066.15-.15v-.534a.15.15 0 0 0-.15-.15h-1.458v-.563h1.458c.084 0 .15-.066.15-.15v-.539a.15.15 0 0 0-.15-.15h-1.458v-.563h1.458c.084 0 .15-.066.15-.15v-.534c-.005-.08-.07-.15-.15-.15M22.5 5.33v13.373c-.005 2.1-1.725 3.802-3.83 3.797H5.297c-2.1-.005-3.802-1.73-3.797-3.83V5.297c.005-2.1 1.73-3.802 3.83-3.797h13.373c2.1.005 3.802 1.725 3.797 3.83m-2.888 5.747c0-3.422-3.431-6.206-7.645-6.206s-7.645 2.784-7.645 6.206c0 3.066 2.719 5.634 6.394 6.122.895.192.792.52.591 1.725-.033.192-.155.755.661.413s4.402-2.592 6.009-4.439c1.106-1.219 1.636-2.452 1.636-3.82"})))},{name:"link",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M17 13H7v-2h10zm1-6h-1c-1.631 0-3.065.792-3.977 2H18c1.103 0 2 .897 2 2v2c0 1.103-.897 2-2 2h-4.977c.913 1.208 2.347 2 3.977 2h1a4 4 0 0 0 4-4v-2a4 4 0 0 0-4-4M2 11v2a4 4 0 0 0 4 4h1c1.63 0 3.065-.792 3.977-2H6c-1.103 0-2-.897-2-2v-2c0-1.103.897-2 2-2h4.977C10.065 7.792 8.631 7 7 7H6a4 4 0 0 0-4 4"})))},{name:"linkedin",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M19.7 3H4.3A1.3 1.3 0 0 0 3 4.3v15.4A1.3 1.3 0 0 0 4.3 21h15.4a1.3 1.3 0 0 0 1.3-1.3V4.3A1.3 1.3 0 0 0 19.7 3M8.339 18.338H5.667v-8.59h2.672zM7.004 8.574a1.548 1.548 0 1 1-.002-3.096 1.548 1.548 0 0 1 .002 3.096m11.335 9.764H15.67v-4.177c0-.996-.017-2.278-1.387-2.278-1.389 0-1.601 1.086-1.601 2.206v4.249h-2.667v-8.59h2.559v1.174h.037c.356-.675 1.227-1.387 2.526-1.387 2.703 0 3.203 1.779 3.203 4.092v4.711z"})))},{name:"mail",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 4.236-8 4.882-8-4.882V6h16z"})))},{name:"mastodon",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M11.973 2.352c-2.468.02-4.842.286-6.225.921 0 0-2.742 1.229-2.742 5.415 0 .958-.018 2.105.012 3.32.1 4.094.75 8.128 4.535 9.129 1.745.462 3.244.56 4.45.494 2.19-.122 3.417-.781 3.417-.781l-.072-1.588s-1.565.491-3.32.431c-1.74-.06-3.576-.188-3.858-2.324a4 4 0 0 1-.04-.598s1.709.416 3.874.516c1.324.06 2.563-.076 3.824-.226 2.418-.29 4.524-1.78 4.79-3.141.416-2.144.38-5.232.38-5.232 0-4.186-2.74-5.415-2.74-5.415-1.383-.635-3.76-.9-6.227-.921zM9.18 5.622c1.028 0 1.804.395 2.318 1.185l.502.84.5-.84c.514-.79 1.292-1.186 2.32-1.186.888 0 1.605.313 2.15.922q.795.915.794 2.469v5.068h-2.008V9.16c0-1.037-.438-1.562-1.31-1.562-.966 0-1.448.622-1.448 1.857v2.693h-1.996V9.455c0-1.235-.484-1.857-1.45-1.857-.872 0-1.308.525-1.308 1.562v4.92H6.236V9.012q-.001-1.554.793-2.469c.547-.609 1.263-.922 2.15-.922"})))},{name:"medium-alt",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{fillRule:"nonzero",d:"M7.423 6c3.27 0 5.922 2.686 5.922 6s-2.651 6-5.922 6S1.5 15.313 1.5 12s2.652-6 5.923-6m9.458.351c1.635 0 2.961 2.53 2.961 5.65 0 3.118-1.325 5.648-2.96 5.648S13.92 15.119 13.92 12s1.325-5.649 2.96-5.649m4.577.589c.576 0 1.042 2.265 1.042 5.06s-.466 5.06-1.042 5.06c-.575 0-1.04-2.265-1.04-5.06s.465-5.06 1.04-5.06"})))},{name:"medium",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M3 3v18h18V3zm15 4.26-1 .93a.28.28 0 0 0-.11.27v6.8a.27.27 0 0 0 .11.27l.94.93v.2h-4.75v-.2l1-1c.09-.1.09-.12.09-.27V9.74l-2.71 6.9h-.37L8 9.74v4.62a.67.67 0 0 0 .17.54l1.27 1.54v.2H5.86v-.2l1.27-1.54a.64.64 0 0 0 .17-.54V9a.5.5 0 0 0-.16-.4L6 7.26v-.2h3.52L12.23 13l2.38-5.94H18z"})))},{name:"messenger",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12.026.375C5.462.375.375 5.172.375 11.652c0 3.389 1.393 6.318 3.66 8.341.391.352.311.556.377 2.73a.934.934 0 0 0 1.307.823c2.48-1.092 2.512-1.178 2.933-1.064 7.185 1.977 14.973-2.621 14.973-10.83 0-6.48-5.035-11.277-11.599-11.277m6.996 8.678L15.6 14.47a1.75 1.75 0 0 1-2.527.465l-2.723-2.038a.7.7 0 0 0-.844 0l-3.674 2.786c-.49.372-1.133-.216-.802-.735l3.422-5.417a1.75 1.75 0 0 1 2.527-.465l2.722 2.037a.7.7 0 0 0 .844 0L18.22 8.32c.489-.374 1.132.213.801.732"})))},{name:"microblog",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M19.641 17.086c1.294-1.522 2.067-3.438 2.067-5.521 0-4.957-4.371-8.972-9.763-8.972s-9.763 4.015-9.763 8.972 4.371 8.972 9.763 8.972a10.5 10.5 0 0 0 3.486-.59.315.315 0 0 1 .356.112c.816 1.101 2.09 1.876 3.506 2.191a.194.194 0 0 0 .192-.309 3.82 3.82 0 0 1 .162-4.858zm-3.065-6.575-2.514 1.909.912 3.022a.286.286 0 0 1-.437.317l-2.592-1.802-2.592 1.802a.285.285 0 0 1-.436-.317l.912-3.022-2.515-1.909a.285.285 0 0 1 .167-.513l3.155-.066 1.038-2.981a.285.285 0 0 1 .539 0l1.038 2.981 3.155.066a.285.285 0 0 1 .17.513"})))},{name:"nextdoor",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",strokeMiterlimit:"10",viewBox:"0 0 130 130"},React.createElement("g",null,React.createElement("path",{d:"M64.25 3.531c-31.144.337-57.596 24.22-60.469 55.907-3.064 33.799 21.857 63.685 55.657 66.75s63.685-21.857 66.75-55.657-21.857-63.686-55.657-66.75a62 62 0 0 0-6.281-.25m3.938 34.907C82.468 38.438 93.5 48.58 93.5 61.5v27c0 .685-.565 1.25-1.25 1.25H80.906a1.267 1.267 0 0 1-1.25-1.25V63.375c0-5.58-4.309-11.937-11.469-11.937-7.47 0-11.468 6.357-11.468 11.937V88.5c0 .685-.565 1.25-1.25 1.25H44.125c-.68 0-1.219-.57-1.219-1.25V64.156c0-.74-.529-1.364-1.25-1.531-13.13-2.93-15.115-10.285-15.375-21.125-.005-.332.142-.67.375-.906.233-.237.543-.375.875-.375l11.688.062c.66.01 1.187.529 1.218 1.188.13 4.44.438 9.406 4.438 9.406.83 0 1.443-1.179 1.813-1.719 4.41-6.48 12.28-10.718 21.5-10.718"})))},{name:"patreon",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M20 7.408c-.003-2.299-1.746-4.182-3.79-4.862-2.54-.844-5.888-.722-8.312.453-2.939 1.425-3.862 4.545-3.896 7.656-.028 2.559.22 9.297 3.92 9.345 2.75.036 3.159-3.603 4.43-5.356.906-1.247 2.071-1.599 3.506-1.963 2.465-.627 4.146-2.626 4.142-5.273"})))},{name:"pinterest-alt",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12.289 2C6.617 2 3.606 5.648 3.606 9.622c0 1.846 1.025 4.146 2.666 4.878.25.111.381.063.439-.169.044-.175.267-1.029.365-1.428a.37.37 0 0 0-.091-.362c-.54-.63-.975-1.791-.975-2.873 0-2.777 2.194-5.464 5.933-5.464 3.23 0 5.49 2.108 5.49 5.122 0 3.407-1.794 5.768-4.13 5.768-1.291 0-2.257-1.021-1.948-2.277.372-1.495 1.089-3.112 1.089-4.191 0-.967-.542-1.775-1.663-1.775-1.319 0-2.379 1.309-2.379 3.059 0 1.115.394 1.869.394 1.869s-1.302 5.279-1.54 6.261c-.405 1.666.053 4.368.094 4.604.021.126.167.169.25.063.129-.165 1.699-2.419 2.142-4.051.158-.59.817-2.995.817-2.995.43.784 1.681 1.446 3.013 1.446 3.963 0 6.822-3.494 6.822-7.833C20.394 5.112 16.849 2 12.289 2"})))},{name:"pinterest",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12c0 4.236 2.636 7.855 6.356 9.312-.087-.791-.166-2.005.035-2.869.182-.78 1.173-4.971 1.173-4.971s-.299-.599-.299-1.484c0-1.39.806-2.429 1.809-2.429.853 0 1.265.641 1.265 1.409 0 .858-.546 2.141-.828 3.329-.236.996.499 1.807 1.481 1.807 1.777 0 3.144-1.874 3.144-4.579 0-2.394-1.72-4.068-4.177-4.068-2.845 0-4.515 2.134-4.515 4.34 0 .859.331 1.781.744 2.282a.3.3 0 0 1 .069.287c-.077.316-.246.995-.279 1.134-.044.183-.145.222-.334.134-1.249-.581-2.03-2.407-2.03-3.874 0-3.154 2.292-6.051 6.607-6.051 3.469 0 6.165 2.472 6.165 5.775 0 3.446-2.173 6.22-5.189 6.22-1.013 0-1.966-.526-2.292-1.148l-.623 2.377c-.226.869-.835 1.957-1.243 2.622.936.289 1.93.445 2.961.445 5.523 0 10-4.477 10-10S17.523 2 12 2"})))},{name:"pocket",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M21.927 4.194A1.82 1.82 0 0 0 20.222 3H3.839a1.823 1.823 0 0 0-1.813 1.814v6.035l.069 1.2c.29 2.73 1.707 5.115 3.899 6.778l.119.089.025.018a9.9 9.9 0 0 0 3.91 1.727 10.06 10.06 0 0 0 4.049-.014.3.3 0 0 0 .064-.023 9.9 9.9 0 0 0 3.753-1.691l.025-.018q.06-.043.119-.089c2.192-1.664 3.609-4.049 3.898-6.778l.069-1.2V4.814a1.8 1.8 0 0 0-.098-.62m-4.235 6.287-4.704 4.512a1.37 1.37 0 0 1-1.898 0l-4.705-4.512a1.371 1.371 0 1 1 1.898-1.979l3.756 3.601 3.755-3.601a1.372 1.372 0 0 1 1.898 1.979"})))},{name:"polldaddy",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 2C6.487 2 2 6.487 2 12c0 5.514 4.487 10 10 10 5.514 0 10-4.486 10-10 0-5.513-4.486-10-10-10m.991 1.68c2.361.084 4.657 1.251 6.197 3.136.283.334.541.693.774 1.067a7.78 7.78 0 0 0-6.094-2.94 7.76 7.76 0 0 0-5.896 2.703q-.008.006-.016.014l-.152.159-.031.032a6.12 6.12 0 0 0-1.633 4.165 6.15 6.15 0 0 0 6.143 6.143c.57 0 1.123-.081 1.649-.227-1.849.839-4.131.747-5.926-.324-1.841-1.089-3.171-3.111-3.433-5.313A7.39 7.39 0 0 1 6.69 6.137C8.294 4.5 10.634 3.563 12.991 3.68m3.373 8.519c-.049-2.024-1.587-3.889-3.544-4.174-1.927-.343-3.917.857-4.451 2.661a3.67 3.67 0 0 0 .2 2.653c.39.8 1.067 1.451 1.894 1.759 1.664.654 3.63-.27 4.173-1.863.593-1.58-.396-3.423-1.94-3.776-1.52-.407-3.161.757-3.204 2.243a2.36 2.36 0 0 0 .753 1.879c.501.476 1.23.667 1.871.529a2.07 2.07 0 0 0 1.469-1.134 1.91 1.91 0 0 0-.087-1.767c-.297-.513-.859-.863-1.429-.881a1.7 1.7 0 0 0-1.437.679 1.53 1.53 0 0 0-.18 1.489q.006.016.016.03c.193.634.774 1.1 1.467 1.117a1.6 1.6 0 0 1-.97-.183c-.466-.244-.809-.747-.893-1.29a1.8 1.8 0 0 1 .499-1.539 2.02 2.02 0 0 1 1.58-.606c.593.04 1.159.35 1.517.859.364.496.51 1.156.383 1.773-.116.62-.529 1.174-1.093 1.514a2.52 2.52 0 0 1-1.914.286c-.65-.161-1.226-.606-1.584-1.206a2.83 2.83 0 0 1-.341-2.031c.143-.7.573-1.321 1.176-1.753 1.193-.883 3.056-.751 4.106.411 1.106 1.1 1.327 3.027.406 4.371-.877 1.376-2.74 2.086-4.374 1.594-1.639-.449-2.913-2.079-3.031-3.853-.07-.884.13-1.797.583-2.577.445-.777 1.155-1.432 1.972-1.862 1.64-.88 3.816-.743 5.349.424 1.251.924 2.083 2.42 2.236 4.009l.001.03c0 2.9-2.359 5.26-5.26 5.26a5.2 5.2 0 0 1-1.947-.376 5 5 0 0 0 2.613-.079 4.96 4.96 0 0 0 2.514-1.751c.618-.828.95-1.861.901-2.869M12 21.113c-5.024 0-9.111-4.087-9.111-9.113 0-4.789 3.713-8.723 8.411-9.081a7 7 0 0 0-.397.06c-2.644.453-5.017 2.106-6.32 4.409-1.309 2.301-1.391 5.19-.3 7.527 1.056 2.34 3.253 4.156 5.776 4.553 2.497.44 5.133-.483 6.787-2.301 1.719-1.797 2.269-4.529 1.486-6.796-.583-1.81-1.976-3.331-3.7-4.046 3.417.594 6.174 3.221 6.174 6.781 0 1.004-.241 2.02-.657 2.966-1.498 2.984-4.586 5.041-8.149 5.041"})))},{name:"print",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M9 16h6v2H9zm13 1h-3v3a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-3H2V9a2 2 0 0 1 2-2h1V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v2h1a2 2 0 0 1 2 2zM7 7h10V5H7zm10 7H7v6h10zm3-3.5a1.5 1.5 0 1 0-3.001.001A1.5 1.5 0 0 0 20 10.5"})))},{name:"quora",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M47.736 16.521c-.41-.81-.898-1.631-1.846-1.631a1 1 0 0 0-.527.107l-.322-.644a2.93 2.93 0 0 1 1.836-.595c1.26 0 1.914.605 2.431 1.397a6.8 6.8 0 0 0 .449-2.675c0-2.773-.869-4.199-2.929-4.199-1.992 0-2.851 1.465-2.851 4.199s.859 4.17 2.851 4.17a4 4 0 0 0 .869-.107zm.498.966a6 6 0 0 1-1.367.185 5.27 5.27 0 0 1-5.263-5.204c0-3.114 2.558-5.233 5.263-5.233s5.282 2.109 5.282 5.233a5.08 5.08 0 0 1-1.992 4.072c.381.566.781.956 1.319.956.595 0 .839-.459.878-.82h.781c.049.488-.195 2.48-2.373 2.48-1.319 0-2.012-.761-2.529-1.66zm5.624-2.646v-3.563c0-.371-.146-.586-.615-.586h-.498v-.956h3.251v5.048c0 .849.459 1.231 1.161 1.231a1.56 1.56 0 0 0 1.465-.839V11.28c0-.371-.146-.586-.615-.586h-.527v-.957h3.28v5.302c0 .527.195.732.8.732h.107v.976l-2.929.468V16.21h-.057a3.12 3.12 0 0 1-2.509 1.152c-1.28 0-2.304-.644-2.304-2.558zm12.059 1.611c1.152 0 1.592-1.005 1.611-3.027.02-1.982-.459-2.929-1.611-2.929-1.005 0-1.641.956-1.641 2.929 0 2.021.625 3.027 1.641 3.027m0 .956a3.906 3.906 0 0 1-3.974-3.974c0-2.334 1.836-3.886 3.974-3.886 2.226 0 4.004 1.582 4.004 3.886a3.867 3.867 0 0 1-4.004 3.974m4.072-.146v-.956h.312c.781 0 .859-.224.859-.908v-4.121c0-.371-.215-.586-.732-.586h-.42v-.955h2.968l.146 1.553h.108c.371-1.113 1.221-1.699 2.051-1.699.693 0 1.221.39 1.221 1.181 0 .547-.264 1.093-1.005 1.093-.664 0-.8-.449-1.358-.449-.488 0-.869.468-.869 1.152v2.783c0 .673.166.908.937.908h.439v.956h-4.658zm9.901-1.093c.956 0 1.338-.898 1.338-1.797v-1.211c-.732.722-2.304.742-2.304 2.021 0 .625.371.986.966.986m1.387 0c-.39.752-1.191 1.26-2.314 1.26-1.309 0-2.148-.732-2.148-1.914 0-2.451 3.417-1.797 4.423-3.427v-.185c0-1.25-.488-1.445-1.035-1.445-1.524 0-.83 1.631-2.226 1.631-.673 0-.937-.371-.937-.859 0-.927 1.093-1.67 3.173-1.67 1.963 0 3.163.537 3.163 2.49v3.114q-.02.742.595.742a1 1 0 0 0 .449-.127l.254.615c-.205.312-.752.869-1.836.869-.908 0-1.465-.42-1.543-1.113h-.01zm-68.554 2.558c-.83-1.641-1.807-3.3-3.711-3.3a2.9 2.9 0 0 0-1.093.215l-.644-1.299a5.66 5.66 0 0 1 3.662-1.211c2.548 0 3.857 1.231 4.892 2.792q.917-2.012.908-5.38c0-5.585-1.748-8.417-5.829-8.417-4.033 0-5.76 2.87-5.76 8.417s1.738 8.397 5.76 8.397a5.9 5.9 0 0 0 1.748-.224zm.996 1.953a9.8 9.8 0 0 1-2.744.371C5.614 21.041.371 16.764.371 10.545.371 4.277 5.614 0 10.965 0c5.448 0 10.642 4.248 10.642 10.545a10.25 10.25 0 0 1-4.013 8.201c.732 1.152 1.563 1.914 2.665 1.914 1.201 0 1.689-.927 1.768-1.66h1.572c.088.966-.4 4.999-4.775 4.999-2.646 0-4.052-1.543-5.106-3.339z"})))},{name:"reddit",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M22 11.816a2.28 2.28 0 0 0-2.277-2.277c-.593 0-1.122.24-1.526.614-1.481-.965-3.455-1.594-5.647-1.69l1.171-3.702 3.18.748a1.88 1.88 0 0 0 1.876 1.862 1.88 1.88 0 0 0 1.877-1.878 1.88 1.88 0 0 0-1.877-1.877c-.769 0-1.431.466-1.72 1.13l-3.508-.826a.386.386 0 0 0-.46.261l-1.35 4.268c-2.316.038-4.411.67-5.97 1.671a2.24 2.24 0 0 0-1.492-.581A2.28 2.28 0 0 0 2 11.816c0 .814.433 1.523 1.078 1.925a4 4 0 0 0-.061.672c0 3.292 4.011 5.97 8.941 5.97s8.941-2.678 8.941-5.97q-.002-.32-.053-.632A2.26 2.26 0 0 0 22 11.816m-3.224-7.422a1.1 1.1 0 1 1-.001 2.199 1.1 1.1 0 0 1 .001-2.199M2.777 11.816c0-.827.672-1.5 1.499-1.5.313 0 .598.103.838.269-.851.676-1.477 1.479-1.812 2.36a1.48 1.48 0 0 1-.525-1.129m9.182 7.79c-4.501 0-8.164-2.329-8.164-5.193S7.457 9.22 11.959 9.22s8.164 2.329 8.164 5.193-3.663 5.193-8.164 5.193m8.677-6.605c-.326-.89-.948-1.701-1.797-2.384.248-.186.55-.301.883-.301.827 0 1.5.673 1.5 1.5.001.483-.23.911-.586 1.185m-11.64 1.703c-.76 0-1.397-.616-1.397-1.376s.637-1.397 1.397-1.397 1.376.637 1.376 1.397-.616 1.376-1.376 1.376m7.405-1.376c0 .76-.616 1.376-1.376 1.376s-1.399-.616-1.399-1.376.639-1.397 1.399-1.397 1.376.637 1.376 1.397m-1.172 3.38a.39.39 0 0 1 0 .55c-.674.674-1.727 1.002-3.219 1.002l-.011-.002-.011.002c-1.492 0-2.544-.328-3.218-1.002a.389.389 0 1 1 .55-.55c.521.521 1.394.775 2.669.775l.011.002.011-.002c1.275 0 2.148-.253 2.669-.775a.387.387 0 0 1 .549 0"})))},{name:"share",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M18 16c-.788 0-1.499.31-2.034.807L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.048 4.118A3 3 0 0 0 15 19a3 3 0 1 0 3-3"})))},{name:"skype",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"m10.113 2.699.1-.02q.05.025.098.051zM2.72 10.223l-.017.103q.025.048.051.095zm18.555 3.548q.009-.053.018-.106-.025-.047-.052-.095zm-7.712 7.428q.049.027.096.053l.105-.017zM22 16.386a5.55 5.55 0 0 1-1.637 3.953 5.55 5.55 0 0 1-3.953 1.637 5.6 5.6 0 0 1-2.75-.725l.105-.017-.202-.035q.049.027.096.053a9.5 9.5 0 0 1-1.654.147 9.4 9.4 0 0 1-3.676-.743 9.4 9.4 0 0 1-3.002-2.023 9.4 9.4 0 0 1-2.023-3.002 9.4 9.4 0 0 1-.743-3.676c0-.546.049-1.093.142-1.628q.025.048.051.095l-.034-.199-.017.103A5.6 5.6 0 0 1 2 7.615c0-1.493.582-2.898 1.637-3.953A5.56 5.56 0 0 1 7.59 2.024c.915 0 1.818.228 2.622.655l-.1.02.199.031q-.049-.026-.098-.051l.004-.001a9.5 9.5 0 0 1 1.788-.169 9.41 9.41 0 0 1 6.678 2.766 9.4 9.4 0 0 1 2.024 3.002 9.4 9.4 0 0 1 .743 3.676c0 .575-.054 1.15-.157 1.712q-.025-.047-.052-.095l.034.201q.009-.053.018-.106c.461.829.707 1.767.707 2.721m-5.183-2.248c0-1.331-.613-2.743-3.033-3.282l-2.209-.49c-.84-.192-1.807-.444-1.807-1.237s.679-1.348 1.903-1.348c2.468 0 2.243 1.696 3.468 1.696.645 0 1.209-.379 1.209-1.031 0-1.521-2.435-2.663-4.5-2.663-2.242 0-4.63.952-4.63 3.488 0 1.221.436 2.521 2.839 3.123l2.984.745c.903.223 1.129.731 1.129 1.189 0 .762-.758 1.507-2.129 1.507-2.679 0-2.307-2.062-3.743-2.062-.645 0-1.113.444-1.113 1.078 0 1.236 1.501 2.886 4.856 2.886 3.195 0 4.776-1.538 4.776-3.599"})))},{name:"sms",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M17.696 4C20.069 4 22 5.973 22 8.398v4.357c0 2.04-1.368 3.783-3.261 4.266v4.427l-5.234-4.295h-7.2C3.93 17.153 2 15.18 2 12.755V8.398C2 5.973 3.931 4 6.304 4zM7.028 8.515c-.98 0-1.66.562-1.66 1.349-.009.497.322.91.985 1.178l.39.142c.242.097.305.171.305.297 0 .162-.131.251-.442.251s-.76-.135-1.004-.284l-.112.046-.215.868c.359.258.832.364 1.33.364 1.104 0 1.764-.523 1.764-1.333-.008-.574-.305-.956-.954-1.216l-.393-.146c-.266-.108-.341-.181-.341-.287 0-.152.131-.243.387-.243.274 0 .587.093.808.214l.109-.047.214-.837c-.315-.224-.741-.316-1.171-.316m10.302 0c-.98 0-1.66.562-1.66 1.349-.008.497.322.91.985 1.178l.39.142c.243.097.305.171.305.297 0 .162-.13.251-.442.251-.311 0-.76-.135-1.004-.284l-.112.046-.215.868c.359.258.832.364 1.33.364 1.104 0 1.764-.523 1.764-1.333-.008-.574-.305-.956-.954-1.216l-.393-.146c-.266-.108-.341-.181-.341-.287 0-.152.131-.243.387-.243.274 0 .587.093.808.214l.109-.047.214-.837c-.316-.224-.741-.316-1.171-.316m-3.733 0c-.297 0-.55.066-.78.202l-.144.098a2 2 0 0 0-.264.247l-.078.095-.027-.077c-.15-.34-.55-.565-1.033-.565l-.169.007a1.36 1.36 0 0 0-.896.42l-.08.09-.038-.363-.075-.067H8.994l-.075.079.024.634c.005.2.008.397.008.604v2.652l.075.075h1.178l.075-.075v-2.269q-.002-.168.042-.274c.083-.23.262-.392.496-.392.314 0 .483.267.483.753v2.182l.075.075h1.179l.075-.075v-2.277c0-.097.016-.213.043-.285.077-.224.26-.373.486-.373.33 0 .5.272.5.817v2.118l.074.075h1.179l.075-.075v-2.293c0-1.131-.537-1.763-1.39-1.763Z"})))},{name:"snapchat",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M11.989 1.728c3.221.001 5.904 2.683 5.908 5.912q.002 1.133.067 2.094a.737.737 0 0 0 .902.669l1.009-.237a.6.6 0 0 1 .129-.015c.256 0 .492.175.55.434a.74.74 0 0 1-.479.861l-1.532.618a.823.823 0 0 0-.485.98c1.229 4.543 4.661 4.071 4.661 4.662 0 .743-2.587.848-2.821 1.082s-.01 1.368-.532 1.588a1.1 1.1 0 0 1-.409.056c-.393 0-.95-.077-1.536-.077-.509 0-1.04.058-1.507.273-1.239.572-2.433 1.641-3.914 1.641S9.325 21.2 8.086 20.628c-.467-.216-.998-.273-1.507-.273-.586 0-1.143.077-1.536.077-.17 0-.31-.014-.409-.056-.522-.22-.299-1.354-.532-1.588s-2.821-.337-2.821-1.08c0-.592 3.432-.119 4.661-4.662a.824.824 0 0 0-.486-.98l-1.532-.618a.74.74 0 0 1-.479-.861.56.56 0 0 1 .679-.419l1.009.237q.086.02.169.02a.737.737 0 0 0 .733-.689q.065-.961.067-2.094c.004-3.229 2.666-5.91 5.887-5.912m0-1.281c-.961 0-1.898.194-2.784.574A7.2 7.2 0 0 0 6.93 2.572a7.2 7.2 0 0 0-1.539 2.282A7.1 7.1 0 0 0 4.82 7.64a33 33 0 0 1-.029 1.369l-.375-.088a2 2 0 0 0-.421-.049 1.86 1.86 0 0 0-1.135.389 1.84 1.84 0 0 0-.666 1.049 2.024 2.024 0 0 0 1.271 2.335l1.124.454c-.744 2.285-2.117 2.723-3.041 3.018a5 5 0 0 0-.659.246C.087 16.76 0 17.436 0 17.708c0 .521.247.996.694 1.339.223.17.499.311.844.43.47.162 1.016.265 1.459.347.021.164.053.341.106.518.22.738.684 1.069 1.034 1.217.332.14.676.156.905.156.224 0 .462-.018.713-.036.269-.02.548-.041.823-.041.426 0 .743.051.97.155.311.144.64.337.989.542.972.571 2.073 1.217 3.462 1.217s2.49-.647 3.462-1.217c.349-.205.679-.399.989-.542.226-.105.544-.155.97-.155.275 0 .554.021.823.041.251.019.488.036.713.036.229 0 .573-.016.905-.156.35-.147.814-.478 1.034-1.217.053-.178.084-.354.106-.518.443-.082.989-.185 1.459-.347.345-.119.621-.259.844-.43.448-.342.694-.818.694-1.339 0-.272-.087-.948-.891-1.347a5 5 0 0 0-.659-.246c-.924-.295-2.297-.733-3.041-3.018l1.124-.454a2.025 2.025 0 0 0 1.271-2.335 1.83 1.83 0 0 0-.666-1.049 1.86 1.86 0 0 0-1.556-.34l-.375.088a33 33 0 0 1-.029-1.369 7.1 7.1 0 0 0-.575-2.789c-.365-.853-.886-1.62-1.547-2.282s-1.428-1.182-2.28-1.547a7.1 7.1 0 0 0-2.786-.574"})))},{name:"soundcloud",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M23.587 13.923a3.303 3.303 0 0 1-3.344 3.117h-8.037a.674.674 0 0 1-.667-.67V7.717a.74.74 0 0 1 .444-.705s.739-.512 2.296-.512a5.27 5.27 0 0 1 2.702.742 5.35 5.35 0 0 1 2.516 3.485 3.1 3.1 0 0 1 .852-.116 3.217 3.217 0 0 1 3.237 3.312m-13.05-5.659c.242 2.935.419 5.612 0 8.538a.261.261 0 0 1-.519 0c-.39-2.901-.221-5.628 0-8.538a.26.26 0 0 1 .398-.25.26.26 0 0 1 .12.25zm-1.627 8.541a.273.273 0 0 1-.541 0 32.7 32.7 0 0 1 0-7.533.274.274 0 0 1 .544 0 29.4 29.4 0 0 1-.003 7.533m-1.63-7.788c.264 2.69.384 5.099-.003 7.782a.262.262 0 0 1-.522 0c-.374-2.649-.249-5.127 0-7.782a.264.264 0 0 1 .525 0m-1.631 7.792a.268.268 0 0 1-.532 0 27.6 27.6 0 0 1 0-7.034.27.27 0 1 1 .541 0 25.8 25.8 0 0 1-.01 7.034zm-1.63-5.276c.412 1.824.227 3.435-.015 5.294a.255.255 0 0 1-.504 0c-.22-1.834-.402-3.482-.015-5.295a.268.268 0 0 1 .535 0m-1.626-.277c.378 1.869.254 3.451-.01 5.325-.031.277-.506.28-.531 0-.239-1.846-.352-3.476-.01-5.325a.277.277 0 0 1 .551 0m-1.643.907c.396 1.239.261 2.246-.016 3.517a.258.258 0 0 1-.514 0c-.239-1.246-.336-2.274-.021-3.517a.276.276 0 0 1 .55 0z"})))},{name:"spotify",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424a.62.62 0 0 1-.857.207c-2.348-1.435-5.304-1.76-8.785-.964a.622.622 0 1 1-.277-1.215c3.809-.871 7.077-.496 9.713 1.115a.623.623 0 0 1 .206.857M17.81 13.7a.78.78 0 0 1-1.072.257c-2.687-1.652-6.785-2.131-9.965-1.166A.779.779 0 1 1 6.32 11.3c3.632-1.102 8.147-.568 11.234 1.328a.78.78 0 0 1 .256 1.072m.105-2.835c-3.223-1.914-8.54-2.09-11.618-1.156a.935.935 0 1 1-.542-1.79c3.532-1.072 9.404-.865 13.115 1.338a.936.936 0 1 1-.955 1.608"})))},{name:"squarespace",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M20.87 9.271a3.86 3.86 0 0 0-5.458 0l-6.141 6.141a.964.964 0 1 0 1.365 1.364l6.14-6.14a1.929 1.929 0 1 1 2.729 2.729l-6.022 6.022a1.93 1.93 0 0 0 2.729 0l4.658-4.658a3.86 3.86 0 0 0 0-5.458m-2.047 2.047a.965.965 0 0 0-1.365 0l-6.14 6.14a1.93 1.93 0 0 1-2.729 0 .964.964 0 1 0-1.364 1.364 3.86 3.86 0 0 0 5.458 0l6.14-6.14a.966.966 0 0 0 0-1.364m-2.047-6.141a3.86 3.86 0 0 0-5.458 0l-6.14 6.14a.964.964 0 1 0 1.364 1.364l6.141-6.14a1.93 1.93 0 0 1 2.729 0 .965.965 0 1 0 1.364-1.364m-2.047 2.047a.964.964 0 0 0-1.364 0l-6.14 6.141a1.929 1.929 0 1 1-2.729-2.729l6.022-6.022a1.93 1.93 0 0 0-2.729 0L3.13 9.271a3.86 3.86 0 0 0 5.458 5.458l6.14-6.141a.963.963 0 0 0 .001-1.364"})))},{name:"stackexchange",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M4 11.606h16v3.272H4zM4 7.377h16v3.272H4zM17.514 3H6.55C5.147 3 4 4.169 4 5.614v.848h16v-.85C20 4.167 18.895 3 17.514 3M4 15.813v.85c0 1.445 1.147 2.614 2.55 2.614h6.799v3.463l3.357-3.463h.744c1.402 0 2.55-1.169 2.55-2.614v-.85z"})))},{name:"stackoverflow",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M18.18 20.103V14.78h1.767v7.09H4v-7.09h1.767v5.323z"}),React.createElement("path",{d:"m7.717 14.275 8.673 1.813.367-1.744-8.673-1.813zm1.147-4.13 8.031 3.74.734-1.606-8.031-3.763zm2.226-3.946 6.815 5.667 1.124-1.354-6.815-5.667zM15.495 2l-1.423 1.055 5.277 7.113 1.423-1.055zM7.533 18.314h8.857v-1.767H7.533z"})))},{name:"stumbleupon",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 4.294a4.47 4.47 0 0 0-4.471 4.471v6.353a1.059 1.059 0 1 1-2.118 0v-2.824H2v2.941a4.471 4.471 0 0 0 8.942 0v-6.47a1.059 1.059 0 1 1 2.118 0v1.294l1.412.647 2-.647V8.765A4.473 4.473 0 0 0 12 4.294m1.059 8.059v2.882a4.471 4.471 0 0 0 8.941 0v-2.824h-3.412v2.824a1.059 1.059 0 1 1-2.118 0v-2.882l-2 .647z"})))},{name:"substack",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M19.904 9.182H4.095V7.054h15.81v2.127M4.095 11.109V21L12 16.583 19.905 21v-9.891zM19.905 3H4.095v2.127h15.81z"})))},{name:"telegram",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m3.08 14.757s-.25.625-.936.325l-2.541-1.949-1.63 1.486s-.127.096-.266.036c0 0-.12-.011-.27-.486s-.911-2.972-.911-2.972L6 12.349s-.387-.137-.425-.438c-.037-.3.437-.462.437-.462l10.03-3.934s.824-.362.824.238z"})))},{name:"threads",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 192 192"},React.createElement("g",null,React.createElement("path",{d:"M141.537 88.988a67 67 0 0 0-2.518-1.143c-1.482-27.307-16.403-42.94-41.457-43.1h-.34c-14.986 0-27.449 6.396-35.12 18.036l13.779 9.452c5.73-8.695 14.724-10.548 21.348-10.548h.229c8.249.053 14.474 2.452 18.503 7.129 2.932 3.405 4.893 8.111 5.864 14.05-7.314-1.243-15.224-1.626-23.68-1.14-23.82 1.371-39.134 15.264-38.105 34.568.522 9.792 5.4 18.216 13.735 23.719 7.047 4.652 16.124 6.927 25.557 6.412 12.458-.683 22.231-5.436 29.049-14.127 5.178-6.6 8.453-15.153 9.899-25.93 5.937 3.583 10.337 8.298 12.767 13.966 4.132 9.635 4.373 25.468-8.546 38.376-11.319 11.308-24.925 16.2-45.488 16.351-22.809-.169-40.06-7.484-51.275-21.742C35.236 139.966 29.808 120.682 29.605 96c.203-24.682 5.63-43.966 16.133-57.317C56.954 24.425 74.204 17.11 97.013 16.94c22.975.17 40.526 7.52 52.171 21.847 5.71 7.026 10.015 15.86 12.853 26.162l16.147-4.308c-3.44-12.68-8.853-23.606-16.219-32.668C147.036 9.607 125.202.195 97.07 0h-.113C68.882.194 47.292 9.642 32.788 28.08 19.882 44.485 13.224 67.315 13.001 95.932L13 96v.067c.224 28.617 6.882 51.447 19.788 67.854C47.292 182.358 68.882 191.806 96.957 192h.113c24.96-.173 42.554-6.708 57.048-21.189 18.963-18.945 18.392-42.692 12.142-57.27-4.484-10.454-13.033-18.945-24.723-24.553M98.44 129.507c-10.44.588-21.286-4.098-21.82-14.135-.397-7.442 5.296-15.746 22.461-16.735q2.948-.17 5.79-.169c6.235 0 12.068.606 17.371 1.765-1.978 24.702-13.58 28.713-23.802 29.274"})))},{name:"tiktok-alt",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M5 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm7.531 3h2.053s-.114 2.635 2.85 2.82v2.04s-1.582.099-2.85-.87l.021 4.207a3.804 3.804 0 1 1-3.802-3.802h.533v2.082a1.73 1.73 0 0 0-1.922.648 1.727 1.727 0 0 0 1.947 2.646 1.73 1.73 0 0 0 1.19-1.642z"})))},{name:"tiktok",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12.22 2h3.42s-.19 4.394 4.75 4.702v3.396s-2.636.166-4.75-1.448l.037 7.012a6.338 6.338 0 1 1-6.34-6.339h.89v3.472a2.882 2.882 0 1 0 2.024 2.752z"})))},{name:"tripadvisor",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M21.01 9.859c.236-1.002.985-2.003.985-2.003l-3.341-.002C16.779 6.643 14.502 6 11.979 6 9.363 6 7 6.659 5.135 7.877L2 7.88s.74.988.98 1.983a4.98 4.98 0 0 0-.977 2.961 5.01 5.01 0 0 0 5.009 5.003 5 5 0 0 0 3.904-1.875l1.065 1.592 1.076-1.606a4.96 4.96 0 0 0 1.838 1.448 4.98 4.98 0 0 0 3.831.151 5.01 5.01 0 0 0 2.963-6.431 5 5 0 0 0-.679-1.247m-13.998 6.96a4 4 0 0 1-3.998-3.995 4 4 0 0 1 3.998-3.997 4 4 0 0 1 3.996 3.997 4 4 0 0 1-3.996 3.995m4.987-4.36A5.007 5.007 0 0 0 7.11 7.821c1.434-.613 3.081-.947 4.867-.947 1.798 0 3.421.324 4.853.966a4.984 4.984 0 0 0-4.831 4.619m6.288 4.134a3.97 3.97 0 0 1-3.058-.122 3.96 3.96 0 0 1-2.075-2.245v-.001a3.97 3.97 0 0 1 .118-3.056 3.97 3.97 0 0 1 2.246-2.077 4.005 4.005 0 0 1 5.135 2.366 4.006 4.006 0 0 1-2.366 5.135"}),React.createElement("path",{d:"M6.949 10.307a2.477 2.477 0 0 0-2.475 2.472 2.48 2.48 0 0 0 2.475 2.474 2.474 2.474 0 0 0 0-4.946m0 4.094a1.626 1.626 0 0 1-1.624-1.623 1.621 1.621 0 1 1 1.624 1.623M16.981 10.307a2.477 2.477 0 0 0-2.474 2.472 2.48 2.48 0 0 0 2.474 2.474 2.476 2.476 0 0 0 2.472-2.474 2.475 2.475 0 0 0-2.472-2.472m0 4.094a1.625 1.625 0 0 1-1.622-1.623 1.622 1.622 0 1 1 1.622 1.623"}),React.createElement("path",{d:"M7.778 12.778a.832.832 0 1 1-1.664.002.832.832 0 0 1 1.664-.002M16.981 11.947a.832.832 0 1 0 .002 1.666.832.832 0 0 0-.002-1.666"})))},{name:"tumblr-alt",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M16.749 17.396c-.357.17-1.041.319-1.551.332-1.539.041-1.837-1.081-1.85-1.896V9.847h3.861v-2.91h-3.847V2.039h-2.817c-.046 0-.127.041-.138.144-.165 1.499-.867 4.13-3.783 5.181v2.484h1.945v6.282c0 2.151 1.587 5.206 5.775 5.135 1.413-.024 2.982-.616 3.329-1.126z"})))},{name:"tumblr",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m-5.569 14.265c-2.446.042-3.372-1.742-3.372-2.998v-3.668H8.923v-1.45c1.703-.614 2.113-2.15 2.209-3.025.007-.06.054-.084.081-.084h1.645V8.9h2.246v1.7H12.85v3.495c.008.476.182 1.131 1.081 1.107.298-.008.697-.094.906-.194l.54 1.601c-.205.296-1.121.641-1.946.656"})))},{name:"twitch",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M16.499 8.089h-1.636v4.91h1.636zm-4.499 0h-1.637v4.91H12zM4.228 3.178 3 6.451v13.092h4.499V22h2.456l2.454-2.456h3.681L21 14.636V3.178zm15.136 10.638L16.5 16.681H12l-2.453 2.453V16.68H5.863V4.814h13.501z"})))},{name:"twitter-alt",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M22.23 5.924a8.2 8.2 0 0 1-2.357.646 4.12 4.12 0 0 0 1.804-2.27 8.2 8.2 0 0 1-2.606.996 4.103 4.103 0 0 0-6.991 3.742 11.65 11.65 0 0 1-8.457-4.287 4.1 4.1 0 0 0-.556 2.063 4.1 4.1 0 0 0 1.825 3.415 4.1 4.1 0 0 1-1.859-.513v.052a4.104 4.104 0 0 0 3.292 4.023 4.1 4.1 0 0 1-1.853.07 4.11 4.11 0 0 0 3.833 2.85 8.24 8.24 0 0 1-5.096 1.756 8 8 0 0 1-.979-.057 11.6 11.6 0 0 0 6.29 1.843c7.547 0 11.675-6.252 11.675-11.675q0-.267-.012-.531a8.3 8.3 0 0 0 2.047-2.123"})))},{name:"twitter",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m-2.534 6.71q.007.148.007.298c0 3.045-2.318 6.556-6.556 6.556a6.5 6.5 0 0 1-3.532-1.035q.27.032.55.032a4.63 4.63 0 0 0 2.862-.986 2.31 2.31 0 0 1-2.152-1.6 2.3 2.3 0 0 0 1.04-.04 2.306 2.306 0 0 1-1.848-2.259v-.029c.311.173.666.276 1.044.288a2.303 2.303 0 0 1-.713-3.076 6.54 6.54 0 0 0 4.749 2.407 2.305 2.305 0 0 1 3.926-2.101 4.6 4.6 0 0 0 1.463-.559 2.3 2.3 0 0 1-1.013 1.275c.466-.056.91-.18 1.323-.363-.31.461-.7.867-1.15 1.192"})))},{name:"untappd",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"m11 13.299-5.824 8.133c-.298.416-.8.635-1.308.572-.578-.072-1.374-.289-2.195-.879S.392 19.849.139 19.323a1.4 1.4 0 0 1 .122-1.425l5.824-8.133a3.1 3.1 0 0 1 1.062-.927l1.146-.604c.23-.121.436-.283.608-.478.556-.631 2.049-2.284 4.696-4.957l.046-.212a.13.13 0 0 1 .096-.1l.146-.037a.135.135 0 0 0 .101-.141l-.015-.18a.13.13 0 0 1 .125-.142c.176-.005.518.046 1.001.393s.64.656.692.824a.13.13 0 0 1-.095.164l-.175.044a.13.13 0 0 0-.101.141l.012.15a.13.13 0 0 1-.063.123l-.186.112c-1.679 3.369-2.764 5.316-3.183 6.046a2.2 2.2 0 0 0-.257.73l-.205 1.281A3.1 3.1 0 0 1 11 13.3zm12.739 4.598-5.824-8.133a3.1 3.1 0 0 0-1.062-.927l-1.146-.605a2.1 2.1 0 0 1-.608-.478 51 51 0 0 0-.587-.654.09.09 0 0 0-.142.018 97 97 0 0 1-1.745 3.223 1.4 1.4 0 0 0-.171.485 3.5 3.5 0 0 0 0 1.103l.01.064c.075.471.259.918.536 1.305l5.824 8.133c.296.413.79.635 1.294.574a4.76 4.76 0 0 0 2.209-.881 4.76 4.76 0 0 0 1.533-1.802 1.4 1.4 0 0 0-.122-1.425zM8.306 3.366l.175.044a.134.134 0 0 1 .101.141l-.012.15a.13.13 0 0 0 .063.123l.186.112q.465.933.869 1.721c.026.051.091.06.129.019q.655-.703 1.585-1.668a.137.137 0 0 0 .003-.19c-.315-.322-.645-.659-1.002-1.02l-.046-.212a.13.13 0 0 0-.096-.099l-.146-.037a.135.135 0 0 1-.101-.141l.015-.18a.13.13 0 0 0-.123-.142c-.175-.005-.518.045-1.002.393-.483.347-.64.656-.692.824a.13.13 0 0 0 .095.164z"})))},{name:"vimeo",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M22.396 7.164q-.139 3.039-4.245 8.32Q13.907 21 10.97 21q-1.82 0-3.079-3.359l-1.68-6.159q-.934-3.36-2.005-3.36-.234.001-1.634.98l-.978-1.261q1.541-1.353 3.037-2.708 2.056-1.774 3.084-1.869 2.429-.234 2.99 3.321.607 3.836.841 4.769.7 3.181 1.542 3.181.653 0 1.963-2.065 1.307-2.063 1.401-3.142.187-1.781-1.401-1.782-.747.001-1.541.341 1.534-5.024 5.862-4.884 3.21.095 3.024 4.161"})))},{name:"vk",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{fillRule:"evenodd",d:"M1.687 1.687C0 3.374 0 6.09 0 11.52v.96c0 5.431 0 8.146 1.687 9.833S6.09 24 11.52 24h.96c5.431 0 8.146 0 9.833-1.687S24 17.91 24 12.48v-.96c0-5.431 0-8.146-1.687-9.833S17.91 0 12.48 0h-.96C6.09 0 3.374 0 1.687 1.687M4.05 7.3c.13 6.24 3.25 9.99 8.72 9.99h.31v-3.57c2.01.2 3.53 1.67 4.14 3.57h2.84c-.78-2.84-2.83-4.41-4.11-5.01 1.28-.74 3.08-2.54 3.51-4.98h-2.58c-.56 1.98-2.22 3.78-3.8 3.95V7.3H10.5v6.92c-1.6-.4-3.62-2.34-3.71-6.92z"})))},{name:"whatsapp",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"m2.048 22 1.406-5.136a9.9 9.9 0 0 1-1.323-4.955C2.133 6.446 6.579 2 12.042 2a9.85 9.85 0 0 1 7.011 2.906 9.85 9.85 0 0 1 2.9 7.011c-.002 5.464-4.448 9.91-9.91 9.91h-.004a9.9 9.9 0 0 1-4.736-1.206zm5.497-3.172.301.179a8.2 8.2 0 0 0 4.193 1.148h.003c4.54 0 8.235-3.695 8.237-8.237a8.2 8.2 0 0 0-2.41-5.828 8.18 8.18 0 0 0-5.824-2.416c-4.544 0-8.239 3.695-8.241 8.237a8.2 8.2 0 0 0 1.259 4.384l.196.312-.832 3.04zm9.49-4.554c-.062-.103-.227-.165-.475-.289s-1.465-.723-1.692-.806-.392-.124-.557.124-.64.806-.784.971-.289.186-.536.062-1.046-.385-1.991-1.229c-.736-.657-1.233-1.468-1.378-1.715s-.015-.382.109-.505c.111-.111.248-.289.371-.434.124-.145.165-.248.248-.413s.041-.31-.021-.434-.557-1.343-.763-1.839c-.202-.483-.407-.417-.559-.425-.144-.007-.31-.009-.475-.009a.9.9 0 0 0-.66.31c-.226.248-.866.847-.866 2.066s.887 2.396 1.011 2.562 1.746 2.666 4.23 3.739c.591.255 1.052.408 1.412.522.593.189 1.133.162 1.56.098.476-.071 1.465-.599 1.671-1.177.206-.58.206-1.075.145-1.179"})))},{name:"woocommerce",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M19 2H5C3.3 2 2 3.3 2 5v11c0 1.7 1.3 3 3 3h4l6 3-1-3h5c1.7 0 3-1.3 3-3V5c0-1.7-1.3-3-3-3m-1.6 4.5c-.4.8-.8 2.1-1 3.9-.3 1.8-.4 3.1-.3 4.1 0 .3 0 .5-.1.7s-.3.4-.6.4-.6-.1-.9-.4c-1-1-1.8-2.6-2.4-4.6-.7 1.4-1.2 2.4-1.6 3.1-.6 1.2-1.2 1.8-1.6 1.9-.3 0-.5-.2-.8-.7-.5-1.4-1.1-4.2-1.7-8.2 0-.3 0-.5.2-.7.1-.2.4-.3.7-.4.5 0 .9.2.9.8.3 2.3.7 4.2 1.1 5.7l2.4-4.5c.2-.4.4-.6.8-.6q.75 0 .9.9c.3 1.4.6 2.6 1 3.7.3-2.7.8-4.7 1.4-5.9.2-.3.4-.5.7-.5.2 0 .5.1.7.2q.3.3.3.6c0 .3 0 .4-.1.5"})))},{name:"wordpress",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M12.158 12.786 9.46 20.625a9 9 0 0 0 5.526-.144 1 1 0 0 1-.065-.124zM3.009 12a8.99 8.99 0 0 0 5.067 8.092L3.788 8.341A8.95 8.95 0 0 0 3.009 12m15.06-.454c0-1.112-.399-1.881-.741-2.48-.456-.741-.883-1.368-.883-2.109 0-.826.627-1.596 1.51-1.596q.06.002.116.007A8.96 8.96 0 0 0 12 3.009a8.98 8.98 0 0 0-7.512 4.052c.211.007.41.011.579.011.94 0 2.396-.114 2.396-.114.484-.028.541.684.057.741 0 0-.487.057-1.029.085l3.274 9.739 1.968-5.901-1.401-3.838c-.484-.028-.943-.085-.943-.085-.485-.029-.428-.769.057-.741 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.485-.028.542.684.057.741 0 0-.488.057-1.029.085l3.249 9.665.897-2.996q.684-1.753.684-2.907m1.82-3.86q.06.428.06.924c0 .912-.171 1.938-.684 3.22l-2.746 7.94a8.98 8.98 0 0 0 4.47-7.771 8.9 8.9 0 0 0-1.1-4.313M12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})))},{name:"x",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387z"})))},{name:"xanga",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M9 9h6v6H9zM3 9h6V3H3zm12 0h6V3h-6zm0 12h6v-6h-6zM3 21h6v-6H3z"})))},{name:"youtube",svg:React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",null,React.createElement("path",{d:"M21.8 8.001s-.195-1.378-.795-1.985c-.76-.797-1.613-.801-2.004-.847-2.799-.202-6.997-.202-6.997-.202h-.009s-4.198 0-6.997.202c-.39.047-1.242.051-2.003.847-.6.607-.795 1.985-.795 1.985S2 9.62 2 11.238v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.761.797 1.76.771 2.205.855 1.6.153 6.8.201 6.8.201s4.203-.006 7.001-.209c.391-.047 1.243-.051 2.004-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517c0-1.618-.2-3.237-.2-3.237M9.935 14.594l-.001-5.62 5.404 2.82z"})))}]},58992:(e,t,n)=>{"use strict";n.d(t,{d:()=>u});var r=n(96072),a=n.n(r),s=n(28120),o=n.n(s),i=n(51609),l=n.n(i),c=n(91135);class u extends i.PureComponent{static defaultProps={size:24};static propTypes={icon:o().string.isRequired,size:o().number,onClick:o().func,className:o().string};render(){const{size:e,onClick:t,icon:n,className:r,...s}=this.props,o=["social-logo","social-logo-"+n,r].filter(Boolean).join(" "),i=c.$.find((e=>e.name===n));if(!i)return l().createElement("svg",a()({height:e,width:e},s));return l().cloneElement(i.svg,{className:o,height:e,width:e,onClick:t,...s})}}},52068:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>y});var r=n(82170),a=n(96865),s=n(56427),o=n(47143),i=n(27723),l=n(90254),c=n(69457),u=n(88669),d=n(41417),p=n(57003),m=(n(51609),n(95396)),h=n(2162),g=n(62402);const __=i.__,f="simplify",v="make-longer",b="make-shorter",k={default:[{name:a.DD,key:"correct-spelling",aiSuggestion:a.yy,icon:l.A}],"core/paragraph":[{name:a.HM,key:f,aiSuggestion:a.A4,icon:c.A},{name:a.JR,key:"summarize",aiSuggestion:a.UA,icon:u.A},{name:a.K2,key:v,aiSuggestion:a.br,icon:d.A},{name:a.UD,key:b,aiSuggestion:a.fD,icon:d.A}],"core/list-item":[{name:a.HM,key:f,aiSuggestion:a.A4,icon:c.A},{name:a.K2,key:v,aiSuggestion:a.br,icon:d.A},{name:a.UD,key:b,aiSuggestion:a.fD,icon:d.A}],"core/list":m.L.includes("core/list")?[{name:a.HM,key:f,aiSuggestion:a.A4,icon:c.A},{name:a.K2,key:v,aiSuggestion:a.br,icon:d.A},{name:a.UD,key:b,aiSuggestion:a.fD,icon:d.A},{name:a.mI,key:"turn-list-into-table",aiSuggestion:a.d5,icon:p.A,options:{alwaysTransformToAIAssistant:!0,rootParentOnly:!0}}]:[{name:a.yQ,key:"write-post-from-list",aiSuggestion:a.pE,icon:c.A,options:{userPrompt:"Write a post based on the list items. Include a title as first order heading and try to use secondary headings for each entry"}}]};function y({blockType:e,clientId:t,disabled:n=!1,onAskAiAssistant:i,onRequestSuggestion:l}){const c=k[e]??[],{getBlockParents:u}=(0,o.select)("core/block-editor"),d=u(t);return(0,r.createElement)(r.Fragment,null,n&&(0,r.createElement)(s.Notice,{status:"warning",isDismissible:!1,className:"jetpack-ai-assistant__info"},__("Add content to activate the tools below","jetpack")),(0,r.createElement)(s.MenuGroup,null,(0,r.createElement)(s.MenuItem,{icon:a.cj,iconPosition:"left",key:"key-ai-assistant",onClick:i,disabled:n},(0,r.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},__("Ask AI Assistant","jetpack"))),[...k.default,...c].filter((e=>!(e.options?.rootParentOnly&&d.length>0))).map((e=>(0,r.createElement)(s.MenuItem,{icon:e?.icon,iconPosition:"left",key:`key-${e.key}`,onClick:()=>{l(e.aiSuggestion,{...e.options??{}})},disabled:n},(0,r.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},e.name)))),(0,r.createElement)(g.hN,{onChange:e=>{l(a.eJ,{tone:e})},disabled:n}),(0,r.createElement)(h.HU,{onChange:e=>{l(a.Gm,{language:e})},disabled:n})))}},32249:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(82170),a=n(3924),s=n(56427),o=n(27723);const __=o.__;const i=function(){const e=(0,a.A)("jetpack-ai-feedback");return(0,r.createElement)("div",{className:"jetpack-ai-feedback-control"},(0,r.createElement)(s.BaseControl,null,(0,r.createElement)(s.BaseControl.VisualLabel,null,__("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"))))}},2162:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>g,HU:()=>f});var r=n(82170),a=n(96865),s=n(85985),o=n(56427),i=n(27723),l=n(51113),c=n(84066),u=n(29115);n(51609);const __=i.__,d=["en","es","fr","de","it","pt","ru","zh","ja","ar","hi","ko"],p=window?.Jetpack_Editor_Initial_State?.siteLocale||navigator?.language,m=p?.split("-")[0]||"en",h=(p?.split("-"),({value:e,onChange:t})=>{const n=[...d.filter((e=>e!==m))];return d.includes(m)&&n.unshift(m),(0,r.createElement)(o.MenuGroup,{label:__("Select language","jetpack")},n.map((n=>(0,r.createElement)(o.MenuItem,{key:`key-${n}`,onClick:()=>t(n+" ("+a.so[n].label+")"),isSelected:e===n},a.so[n].label))))});function g({value:e=m,label:t=a.u0,onChange:n,disabled:i=!1}){const{tracks:u}=(0,s.st)();return i?(0,r.createElement)(o.Tooltip,{text:t},(0,r.createElement)(o.Button,{disabled:!0},(0,r.createElement)(l.A,{icon:c.A}))):(0,r.createElement)(o.ToolbarDropdownMenu,{icon:c.A,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&u.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"i18n"})}},(()=>(0,r.createElement)(h,{value:e,onChange:n})))}function f({value:e=m,label:t=a.u0,onChange:n,disabled:s=!1}){return(0,r.createElement)(o.DropdownMenu,{className:"ai-assistant__i18n-dropdown",icon:c.A,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)(l.A,{icon:u.A})),disabled:s}},(({onClose:t})=>(0,r.createElement)(h,{onChange:(...e)=>{n(...e),t()},value:e})))}},99050:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>u});var r=n(82170),a=n(96865),s=n(85985),o=n(56427),i=n(27723),l=n(78938);const __=i.__,c=[{name:__("Summarize","jetpack"),key:"summarize",aiSuggestion:a.UA},{name:__("Make longer","jetpack"),key:"make-longer",aiSuggestion:a.br},{name:__("Make shorter","jetpack"),key:"make-shorter",aiSuggestion:a.fD}];function u({key:e,label:t=__("Improve","jetpack"),exclude:n=[],onChange:a,disabled:i=!1}){const{tracks:u}=(0,s.st)();return i?(0,r.createElement)(o.Tooltip,{text:t},(0,r.createElement)(o.Button,{disabled:!0},(0,r.createElement)(o.Icon,{icon:l.A}))):(0,r.createElement)(o.ToolbarDropdownMenu,{icon:l.A,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&u.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"improve"})}},(()=>{const s=c.filter((e=>!n.includes(e.key)));return(0,r.createElement)(o.MenuGroup,{label:t},s.map((t=>(0,r.createElement)(o.MenuItem,{key:`key-${t.key}`,onClick:()=>a(t.aiSuggestion,{contentType:"generated"}),isSelected:e===t.key},t.name))))}))}},33468:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>f});var r=n(82170),a=n(96865),s=n(85985),o=n(56427),i=n(27723),l=n(78938),c=n(41417),u=n(90254),d=n(69457),p=n(88669),m=n(11269);const __=i.__,h=[{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")+" "}}],g=[{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 f({hasContentBefore:e,hasContent:t,hasPostTitle:n,contentIsLoaded:i,onPromptSelect:f,onSuggestionSelect:v}){const b=__("Write with AI…","jetpack"),{tracks:k}=(0,s.st)();return(0,r.createElement)(o.ToolbarDropdownMenu,{className:"jetpack-ai-assistant__templates-control",icon:null,label:b,text:b,onToggle:e=>{e&&k.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"write-with-ai"})}},(({onClose:s})=>i?(0,r.createElement)(o.MenuGroup,{label:__("Write…","jetpack")},g.map(((e,t)=>(0,r.createElement)(o.MenuItem,{icon:l.A,iconPosition:"left",key:`key-${t}`,onClick:()=>{s(),f(e.description)}},e.label)))):(0,r.createElement)(r.Fragment,null,e&&(0,r.createElement)(o.MenuGroup,{label:__("Based on preceding content…","jetpack")},(0,r.createElement)(o.MenuItem,{icon:c.A,iconPosition:"left",onClick:()=>v(a.sn)},a.DT),(0,r.createElement)(o.MenuItem,{icon:u.A,iconPosition:"left",onClick:()=>v(a.yy)},a.DD),(0,r.createElement)(o.MenuItem,{icon:d.A,iconPosition:"left",onClick:()=>v(a.A4)},a.HM)),t&&(0,r.createElement)(o.MenuGroup,{label:__("Based on entire content…","jetpack")},t&&(0,r.createElement)(o.MenuItem,{icon:p.A,iconPosition:"left",onClick:()=>v(a.UA)},a.JR),t&&(0,r.createElement)(o.MenuItem,{icon:m.A,iconPosition:"left",onClick:()=>v(a.vE)},a.mT)),(0,r.createElement)(o.MenuGroup,{label:__("Write…","jetpack")},n&&(0,r.createElement)(o.MenuItem,{icon:l.A,iconPosition:"left",onClick:()=>v(a.im)},a.Rq),h.map(((e,t)=>(0,r.createElement)(o.MenuItem,{icon:l.A,iconPosition:"left",key:`key-${t}`,onClick:()=>{s(),f(e.description)}},e.label)))))))}},23e3:(e,t,n)=>{"use strict";n.d(t,{A:()=>b,Q:()=>v});var r=n(82170),a=n(3924),s=n(85985),o=n(56427),i=n(86087),l=n(27723),c=n(10067),u=n.n(c),d=n(56333),p=n(92169),m=n(61297),h=n(7503),g=n(93094);const __=l.__,f=u()("jetpack-ai-assistant:upgrade-prompt"),v=({variant:e="error"})=>{const t=(()=>{const{usagePeriod:e}=(0,m.A)(),t=(e=>{const t=__("You've reached this month's request limit, per our fair usage policy.","jetpack");if(!e)return t; // Translators: %s is the date when the requests will reset. -const n=__("Requests will reset on %s.","jetpack");return`${t} ${(0,l.sprintf)(n,e)}`})((e=>{if(!e?.nextStart)return null;const t=new Date(e.nextStart);return t.toLocaleString("default",{month:"long"})+" "+t.getDate()})(e));return(0,i.createInterpolateElement)(t,{link:(0,a.createElement)("a",{href:"https://jetpack.com/redirect/?source=ai-assistant-fair-usage-policy",target:"_blank",rel:"noreferrer"})})})();return"muted"===e?(0,a.createElement)("span",{className:"jetpack-ai-fair-usage-notice-muted-variant"},t):"error"===e?(0,a.createElement)(o.Notice,{status:"error",isDismissible:!1,className:"jetpack-ai-fair-usage-notice"},t):null},b=e=>{const{upgradeType:t,currentTier:n}=(0,m.A)();return 1===n?.value?(0,a.createElement)(v,null):"vip"===t?(({description:e=null,useLightNudge:t=!1})=>{const n=t?g.U:d.c,r=(0,i.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. Please reach out to your VIP account team.","jetpack"),{strong:(0,a.createElement)("strong",null)});return(0,a.createElement)(n,{buttonText:null,checkoutUrl:null,className:"jetpack-ai-upgrade-banner",description:e||r,goToCheckoutPage:null,isRedirecting:null,visible:!0,align:null,title:null,context:null})})({description:e.description,useLightNudge:e?.useLightNudge}):(({placement:e=null,description:t=null,useLightNudge:n=!1})=>{const o=n?g.U:d.c,{checkoutUrl:c}=(0,p.A)(),u=(0,h.C)(),{nextTier:v,tierPlansEnabled:b,currentTier:k,requestsCount:y}=(0,m.A)(),{tracks:E}=(0,s.st)(),w=(0,i.useCallback)((()=>{f("upgrade",e),E.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:k?.slug,requests_count:y,placement:e})}),[k,y,E,e]),_=(0,i.useCallback)((()=>{f("contact us",e),E.recordEvent("jetpack_ai_upgrade_contact_us",{placement:e})}),[E,e]);if(!u){const e=(0,i.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,a.createElement)("strong",null)});return(0,a.createElement)(o,{showButton:!1,className:"jetpack-ai-upgrade-banner",description:t||e,visible:!0,align:null,title:null,context:null})}if(b){if(!v){const e=(0,r.A)("jetpack-ai-tiers-more-requests-contact"),n=__("You have reached the request limit for your current plan.","jetpack");return(0,a.createElement)(o,{buttonText:__("Contact Us","jetpack"),description:t||n,className:"jetpack-ai-upgrade-banner",checkoutUrl:e,visible:!0,align:null,title:null,context:null,goToCheckoutPage:_,target:"_blank"})}const e=(0,i.createInterpolateElement)((0,l.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"),v.limit),{strong:(0,a.createElement)("strong",null)});return(0,a.createElement)(o,{buttonText:(0,l.sprintf)(/* Translators: number of requests */ -__("Upgrade to %d requests","jetpack"),v.limit),checkoutUrl:c,className:"jetpack-ai-upgrade-banner",description:t||e,goToCheckoutPage:w,visible:!0,align:"center",title:null,context:null,target:"_blank"})}return(0,a.createElement)(o,{buttonText:"Upgrade",checkoutUrl:c,className:"jetpack-ai-upgrade-banner",description:(0,i.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! Upgrade now to keep using it.","jetpack"),{strong:(0,a.createElement)("strong",null)}),goToCheckoutPage:w,visible:!0,align:null,title:null,context:null,target:"_blank"})})(e)}},93094:(e,t,n)=>{"use strict";n.d(t,{U:()=>o});var a=n(82170),r=n(56427),s=n(27723);const __=s.__,o=({title:e,description:t,buttonText:n=null,checkoutUrl:s=null,goToCheckoutPage:o=null,isRedirecting:i=!1,showButton:l=!0,target:c="_top"})=>{const u=__("Redirecting…","jetpack");return(0,a.createElement)("div",{className:"jetpack-upgrade-plan-banner-light"},(0,a.createElement)(r.Notice,{status:"error",isDismissible:!1},(0,a.createElement)("p",null,e&&(0,a.createElement)("strong",null,e),t," ",l&&(0,a.createElement)(r.Button,{href:i?null:s,onClick:o,variant:"link",target:c},i?u:n))))}},62402:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>m,US:()=>u,hN:()=>p});var a=n(82170),r=n(96865),s=n(85985),o=n(56427),i=n(27723),l=n(29115);n(51609);const __=i.__,c=["formal","informal","optimistic","humorous","serious","skeptical","empathetic","confident","passionate","provocative"],u="formal",d=({value:e,onChange:t})=>(0,a.createElement)(o.MenuGroup,{label:__("Select tone","jetpack")},c.map((n=>(0,a.createElement)(o.MenuItem,{key:`key-${n}`,onClick:()=>t(n),isSelected:e===n},`${r.oZ[n].emoji} ${r.oZ[n].label}`))));function p({label:e=r.uQ,value:t=u,onChange:n,disabled:s=!1}){return(0,a.createElement)(o.DropdownMenu,{icon:r.Qr,label:e,className:"ai-assistant__tone-dropdown",popoverProps:{variant:"toolbar"},toggleProps:{children:(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"ai-assistant__tone-dropdown__toggle-label"},e),(0,a.createElement)(o.Icon,{icon:l.A})),disabled:s}},(({onClose:e})=>(0,a.createElement)(d,{value:t,onChange:t=>{n(t),e()}})))}function m({value:e=u,onChange:t,disabled:n=!1}){const{tracks:i}=(0,s.st)();return n?(0,a.createElement)(o.Tooltip,{text:r.uQ},(0,a.createElement)(o.Button,{disabled:!0},(0,a.createElement)(o.Icon,{icon:r.Qr}))):(0,a.createElement)(o.ToolbarDropdownMenu,{icon:r.Qr,label:r.uQ,popoverProps:{variant:"toolbar"},disabled:n,onToggle:e=>{e&&i.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"tone"})}},(()=>(0,a.createElement)(d,{value:e,onChange:t})))}},51698:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var a=n(82170),r=n(96865),s=n(94715),o=n(56427),i=n(27723),l=n(83883),c=n(83822),u=n(2162),d=n(99050),p=n(33468),m=n(62402);const __=i.__,h=({contentIsLoaded:e,getSuggestionFromOpenAI:t,retryRequest:n,handleAcceptContent:i,handleTryAgain:h,showRetry:g,contentBefore:f,hasPostTitle:v,wholeContent:b,setUserPrompt:k,recordEvent:y,isGeneratingTitle:E})=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(s.BlockControls,null,!g&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(o.ToolbarGroup,null,(0,a.createElement)(p.Ay,{hasContentBefore:!!f?.length,hasContent:!!b?.length,hasPostTitle:v,contentIsLoaded:e,onPromptSelect:e=>{y("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"prompt-template",prompt:e.original}),k(e.translated)},onSuggestionSelect:e=>{y("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:e}),t(e)}})),(0,a.createElement)(s.BlockControls,{group:"block"},(0,a.createElement)(m.Ay,{value:"neutral",onChange:n=>{y("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:r.eJ}),t(r.eJ,{tone:n,contentType:e?"generated":null})},disabled:!e&&!b?.length}),(0,a.createElement)(u.Ay,{value:"en",onChange:n=>{y("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:r.Gm}),t(r.Gm,{language:n,contentType:e?"generated":null})},disabled:!e&&!b?.length}),(0,a.createElement)(d.Ay,{onChange:t,exclude:E?["summarize"]:[],disabled:!e}))),(g||h)&&(0,a.createElement)(o.ToolbarGroup,null,!g&&e&&h&&(0,a.createElement)(o.ToolbarButton,{onClick:h},__("Try Again","jetpack")),g&&e&&(0,a.createElement)(o.ToolbarButton,{icon:l.A,onClick:i},__("Accept","jetpack")),g&&(0,a.createElement)(o.ToolbarButton,{icon:c.A,onClick:n},__("Retry","jetpack")))))},3586:(e,t,n)=>{"use strict";n.d(t,{A:()=>S});var a=n(82170),r=n(96865),s=n(85985),o=n(94715),i=n(74997),l=n(56427),c=n(29491),u=n(47143),d=n(86087),p=n(27723),m=n(13022),h=n(27970),g=n(56199),f=n(2274),v=n(58164),b=n(32249),k=n(23e3),y=n(51698),E=n(4393),w=n(92169),_=n(61297),C=n(44732),A=n(76695),x=n(7503);const __=p.__,j="post"===window?.Jetpack_Editor_Initial_State?.screenBase;function S({attributes:e,setAttributes:t,clientId:n,isSelected:p}){const[S,N]=(0,d.useState)(null),{tracks:R}=(0,s.st)(),{getBlock:P}=(0,u.useSelect)("core/block-editor"),L=(0,d.useRef)(null),T=(0,d.useRef)(null),{replaceBlocks:B,removeBlock:M}=(0,u.useDispatch)("core/block-editor"),{editPost:I}=(0,u.useDispatch)("core/editor"),[D,F]=(0,d.useState)((0,r.MB)(e.preTransformAction)),{isOverLimit:z,requireUpgrade:O,increaseRequestsCount:H,requestsCount:U,requestsLimit:V,currentTier:q,loading:G,tierPlansEnabled:$}=(0,_.A)(),W=Math.max(V-U,0),{autosaveAndRedirect:Z}=(0,w.A)(),J=(0,v.Bd)(q),K=()=>{setTimeout((()=>{L.current?.focus?.()}),100)},Y=()=>{setTimeout((()=>{T.current?.focus?.()}),100)},Q=(0,c.useViewportMatch)("medium","<"),X=(0,d.useRef)(null),{getSuggestionFromOpenAI:ee,stopSuggestion:te,showRetry:ne,contentBefore:ae,postTitle:re,retryRequest:se,wholeContent:oe,requestingState:ie,error:le}=(0,E.A)({onSuggestionDone:(0,d.useCallback)((()=>{K(),H()}),[H]),onUnclearPrompt:(0,d.useCallback)((()=>{Y(),H()}),[H]),onModeration:K,attributes:e,clientId:n,content:e.content,tracks:R,userPrompt:e.userPrompt,requireUpgrade:O,initialRequestingState:e.requestingState,contentRef:X,blockRef:T}),ce="requesting"===ie,ue=["requesting","suggesting"].includes(ie),de=(0,x.x)(),{productPageUrl:pe}=(0,C.A)(),me=(0,A.y)(n);(0,d.useEffect)((()=>{if(!me)return;const e=JSON.parse(localStorage.getItem(me));if(!e)return;const{type:t,options:n}=e;localStorage.removeItem(me),ee(t,n)}),[me,ee]),(0,d.useEffect)((()=>{le&&N(!1)}),[le]),(0,d.useEffect)((()=>{["init","done"].includes(ie)&&t({requestingState:ie})}),[ie,t]);const he=!!e.content,ge=e.promptType===r.vE,fe=__("Accept","jetpack"),ve=__("Accept title","jetpack"),be=ge?ve:fe,ke=async()=>{let t=[],a=(0,r._E)({content:e.content||""});if(a?.split("\n").length>1&&a?.split("\n")?.[0]?.match(/^

    .*<\/h1>$/)&&!re){const e=a.split("\n"),t=e.shift();a=e.join("\n"),I({title:t.replace(/<[^>]*>/g,"")})}t=(0,i.rawHandler)({HTML:a}),await B(n,t);const s=(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 a=n.querySelectorAll("[contenteditable=true]");t=a.length?a[a.length-1]:t})),t})(t);s&&(e=>{const t=e.ownerDocument.getSelection();t.selectAllChildren(e),t.collapseToEnd(),e.focus()})(s)},ye=()=>{ke(),R.recordEvent("jetpack_ai_assistant_block_accept",{feature:"ai-assistant"})},Ee=()=>{j?(I({title:e.content?e.content.trim():""}),M(n),R.recordEvent("jetpack_ai_assistant_block_accept",{feature:"ai-assistant"})):ye()},we=()=>{te(),K(),R.recordEvent("jetpack_ai_assistant_block_stop",{feature:"ai-assistant"})},_e=(0,o.useBlockProps)({ref:T,className:(0,m.A)({"is-waiting-response":ce})}),Ce=__("Ask Jetpack AI…","jetpack"),Ae=__("Write about… Make a table for…","jetpack"),xe=(0,a.createElement)(a.Fragment,null,z&&p&&(0,a.createElement)(k.A,{placement:"ai-assistant-block"}),!de&&(0,a.createElement)(f.A,{block:"AI Assistant"})),je=(0,a.createElement)(a.Fragment,null,le?.message&&!S&&"error_quota_exceeded"!==le?.code&&(0,a.createElement)(l.Notice,{status:le.status,isDismissible:!1,className:"jetpack-ai-assistant__error"},le.message)),Se=z&&J===v.Ti?(0,a.createElement)(k.Q,{variant:"muted"}):null,Ne=(0,d.useCallback)((e=>{e.preventDefault(),R.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:q?.slug,requests_count:U,placement:"jetpack_ai_assistant_block"}),Z(e)}),[R,q,U,Z]);return(0,a.createElement)(l.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{esc:()=>{["requesting","suggesting"].includes(ie)&&we()}}},(0,a.createElement)("div",_e,he&&(0,a.createElement)("div",{ref:X,className:"jetpack-ai-assistant__content"},(0,a.createElement)(d.RawHTML,null,(0,r._E)({content:e.content||""}))),(0,a.createElement)(o.InspectorControls,null,Se&&(0,a.createElement)("div",{className:"block-editor-block-card",style:{paddingTop:0}},(0,a.createElement)("span",{className:"block-editor-block-icon"}),Se),(0,a.createElement)("div",{className:"block-editor-block-card",style:{paddingTop:0}},(0,a.createElement)("span",{className:"block-editor-block-icon"}),(0,a.createElement)(l.ExternalLink,{href:pe},__("Discover all features","jetpack"))),(J===v._X||$&&J!==v.Ti)&&(0,a.createElement)(l.PanelBody,{initialOpen:!0},(0,a.createElement)(l.PanelRow,null,(0,a.createElement)(h.A,{placement:g.k}))),(0,a.createElement)(l.PanelBody,{initialOpen:!0},(0,a.createElement)(l.PanelRow,null,(0,a.createElement)(b.A,null)))),!ue&&de&&!O&&(0,a.createElement)(y.A,{isWaitingState:ue,contentIsLoaded:he,getSuggestionFromOpenAI:(e,t)=>{const n=(0,r.MB)(e,t);F(n),ee(e,t)},retryRequest:se,handleAcceptContent:ye,handleAcceptTitle:Ee,handleTryAgain:null,showRetry:ne,contentBefore:ae,hasPostTitle:!!re?.length,wholeContent:oe,promptType:e.promptType,setUserPrompt:e=>{if(!L?.current)return;L.current.focus(),t({userPrompt:e})},recordEvent:R.recordEvent,isGeneratingTitle:ge}),(0,a.createElement)(r.N0,{ref:L,disabled:O||!de,value:e.userPrompt,placeholder:e?.content?Ce:Ae,onChange:e=>{N(!0),t({userPrompt:e})},onSend:()=>{F(e.userPrompt),((...e)=>{ee(...e),Y()})("userPrompt"),R.recordEvent("jetpack_ai_assistant_block_generate",{feature:"ai-assistant"})},onStop:we,onAccept:()=>{ge?Ee():ye()},onDiscard:()=>{const a=e?.content===P(n).attributes?.content;t({content:e?.originalContent,promptType:void 0,messages:e?.originalMessages}),ke(),a?R.recordEvent("jetpack_ai_assistant_block_dismiss"):R.recordEvent("jetpack_ai_assistant_block_discard",{feature:"ai-assistant"})},state:ie,isTransparent:O||!de,showButtonLabels:!Q,showAccept:"init"!==ie&&he&&!ue,acceptLabel:be,showGuideLine:he,showRemove:e?.content?.length>0,banner:xe,error:je,customFooter:W%5!=0&&1!==U||G||J!==v._X?null:(0,a.createElement)(r.AK,{requestsRemaining:W,onUpgradeClick:Ne}),lastAction:D})))}},61351:(e,t,n)=>{"use strict";var a=n(94375),r=n(54681),s=n(3586),o=n(13802);n(99800);(0,a.M)(r,{edit:s.A,save:()=>null,transforms:o.Ay})},10603:(e,t,n)=>{"use strict";n.d(t,{mt:()=>o});var a=n(96865),r=n(74997),s=n(47143);class o{renderRules=[];firstUpdate=!0;behavior="dropdown";isChildBlock=!1;feature="ai-assistant";adjustPosition=!0;startOpen=!1;hideOnBlockFocus=!0;constructor(e,t=[]){this.clientId=e,this.renderRules=t}getBlock(){const{getBlock:e}=(0,s.select)("core/block-editor");return e(this.clientId)}getContent(){const e=this.getBlock();return t=(0,r.getBlockContent)(e),(0,a.rh)({content:t});var t}renderContent(e){return function(e,t=[]){return(0,a._E)({content:e,rules:t,extension:!0})}(e,this.renderRules)}onSuggestion(e){if(!e)return;const t=this.renderContent(e);this.replaceBlockContent(t)}onDone(e){this.firstUpdate=!0}replaceBlockContent(e){const[t]=(0,r.rawHandler)({HTML:e});if(!t)return;const{updateBlockAttributes:n,replaceInnerBlocks:a,__unstableMarkNextChangeAsNotPersistent:o}=(0,s.dispatch)("core/block-editor");this.firstUpdate?this.firstUpdate=!1:o(),n(this.clientId,t.attributes),o(),a(this.clientId,t.innerBlocks)}getExtensionInputPlaceholder(){return null}}},67607:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var a=n(82170),r=n(96865),s=n(85985),o=n(86087),i=n(27723),l=n(13022),c=(n(51609),n(92169)),u=n(61297);const __=i.__,d=(0,l.A)("jetpack-ai-assistant-extension-ai-input","wp-block");function p({customPlaceholder:e,className:t,requestingState:n,requestingError:i,inputRef:p,wrapperRef:m,action:h,blockType:g,feature:f,request:v,stopSuggestion:b,close:k,undo:y,tryAgain:E,lastAction:w}){const _=e||__("Ask Jetpack AI to edit…","jetpack"),[C,A]=(0,o.useState)(""),[x,j]=(0,o.useState)(_),{checkoutUrl:S}=(0,c.A)(),{tracks:N}=(0,s.st)(),[R,P]=(0,o.useState)(0),[L,T]=(0,o.useState)(!1),{requireUpgrade:B,requestsCount:M,requestsLimit:I,loading:D,nextTier:F,currentTier:z}=(0,u.A)(),O=(0,o.useMemo)((()=>B||["requesting","suggesting"].includes(n)),[B,n]),H=(0,o.useMemo)((()=>B&&1===z?.value),[B,z]),U=(0,o.useCallback)((()=>{N.recordEvent("jetpack_ai_assistant_extension_generate",{block_type:g,feature:f}),v?.(C)}),[g,f,v,N,C]),V=(0,o.useCallback)((()=>{N.recordEvent("jetpack_ai_assistant_extension_stop",{block_type:g}),j(_),b?.()}),[g,_,b,N]);const q=(0,o.useCallback)((()=>{N.recordEvent("jetpack_ai_assistant_undo",{block_type:g}),y?.()}),[g,N,y]),G=(0,o.useCallback)((()=>{N.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:z?.slug,requests_count:M,placement:"jetpack_ai_assistant_extension"})}),[z?.slug,M,N]),$=(0,o.useCallback)((()=>{N.recordEvent("jetpack_ai_assistant_try_again",{block_type:g}),E?.()}),[g,N,E]);return(0,o.useEffect)((()=>{["init","done"].includes(n)&&A("")}),[n]),(0,o.useEffect)((()=>{j(h||_),h&&A("")}),[h,_]),(0,o.useEffect)((()=>{T(!D&&!!F&&0===C.length)}),[D,F,C]),(0,o.useEffect)((()=>{const e=Math.max(I-M,0);P(e)}),[I,M]),(0,a.createElement)(r.FC,{className:(0,l.A)(d,t),placeholder:x,disabled:O,value:C,state:n,showGuideLine:!0,error:i,requestsRemaining:R,showUpgradeMessage:L,showFairUsageMessage:H,upgradeUrl:S,onChange:A,onSend:U,onStop:V,onClose:function(){k?.()},onUndo:q,onUpgrade:G,onTryAgain:$,wrapperRef:m,ref:p,lastAction:w,blockType:g})}},31124:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var a=n(82170),r=n(96865),s=n(85985),o=n(56427),i=n(86087),l=n(27723),c=n(52068),u=n(76695),d=n(2612);const __=l.__;function p({blockType:e,onClose:t,onAskAiAssistant:n,onRequestSuggestion:r}){const{canTransformToAIAssistant:s,transformToAIAssistant:o,getSelectedBlockClientIds:l}=(0,u.A)(),d=(0,i.useCallback)((a=>{const i=l(),[c]=i,u=a?.options?.alwaysTransformToAIAssistant||!1;!(i.length<2)&&s({clientId:c,blockName:e})||u?o({request:a}):(a?r?.(a.promptType,a.options):n?.(),t?.())}),[e,s,l,n,t,r,o]),[p]=l();return(0,a.createElement)(c.Ay,{blockType:e,clientId:p,onRequestSuggestion:(e,t)=>{d({promptType:e,options:t})},onAskAiAssistant:async()=>{d()},disabled:!1})}function m({behavior:e,blockType:t,label:n=__("AI Assistant","jetpack"),onAskAiAssistant:l,onRequestSuggestion:c}){const{tracks:u}=(0,s.st)(),m=(0,i.useContext)(d.B),h=(0,i.useCallback)((e=>{e&&u.recordEvent("jetpack_ai_assistant_extension_toolbar_menu_show",{block_type:t})}),[t,u]),g=(0,i.useCallback)((()=>{u.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_prompt_show",{block_type:t}),l?.()}),[t,l,u]),f=(0,i.useCallback)(((e,n)=>{u.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:e,block_type:t}),c?.(e,n)}),[t,c,u]);return(0,a.createElement)(o.Dropdown,{popoverProps:{variant:"toolbar"},renderToggle:({isOpen:t,onToggle:s})=>(0,a.createElement)(o.ToolbarButton,{className:"jetpack-ai-assistant__button",showTooltip:!0,onClick:()=>{if("function"!=typeof e)switch(e){case"action":g();break;case"dropdown":s()}else e({onToggle:s,onAskAiAssistant:l,context:m})},"aria-haspopup":"true","aria-expanded":t,label:n,icon:r.cj}),onToggle:h,renderContent:({onClose:e})=>(0,a.createElement)(p,{onClose:e,blockType:t,onAskAiAssistant:g,onRequestSuggestion:f})})}},95396:(e,t,n)=>{"use strict";n.d(t,{L:()=>r,l:()=>a});const 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"],r=["core/heading","core/paragraph","core/list-item","core/list","jetpack/contact-form",...a]},2612:(e,t,n)=>{"use strict";n.d(t,{B:()=>g,Q:()=>f});var a=n(86087),r=n(10067),s=n.n(r),o=n(10603),i=n(95396),l=n(42160),c=n(47007),u=n(75430),d=n(24310),p=n(63904);const m=s()("jetpack-ai-assistant:extensions:get-block-handler"),h={"core/heading":l.T,"core/paragraph":p.d,"core/list-item":d.g,"core/list":u.b,"jetpack/contact-form":c.p,...i.l.reduce(((e,t)=>({...e,[t]:c.g})),{})},g=(0,a.createContext)({});function f(e,t){let n=h[e];n||(m(`No handler found for block type: ${e}. Using default handler.`),n=o.mt);const a=new n(t);return{onSuggestion:a.onSuggestion.bind(a),onDone:a.onDone.bind(a),getContent:a.getContent.bind(a),getExtensionInputPlaceholder:a.getExtensionInputPlaceholder.bind(a),behavior:a.behavior,isChildBlock:a.isChildBlock,feature:a.feature,adjustPosition:a.adjustPosition,startOpen:a.startOpen,hideOnBlockFocus:a.hideOnBlockFocus}}},42160:(e,t,n)=>{"use strict";n.d(t,{T:()=>r});var a=n(10603);class r extends a.mt{constructor(e){super(e,[])}onSuggestion(e){const t=this.getBlock();if(e.startsWith("#")||(e=`${"#".repeat(t?.attributes?.level||1)} ${e}`),e.match(/^#*\s*$/))return;const n=this.renderContent(e);this.replaceBlockContent(n)}}},14602:(e,t,n)=>{"use strict";n.d(t,{g:()=>s});var a=n(47143),r=n(10603);class s extends r.mt{jetpackFormBlockName="jetpack/contact-form";constructor(e){super(e,[]),this.behavior=this.handleBehavior,this.isChildBlock=!0,this.hideOnBlockFocus=!1}handleBehavior=({context:e})=>{const t=(0,a.dispatch)("core/block-editor"),{getBlockParentsByBlockName:n}=(0,a.select)("core/block-editor"),r=n(this.clientId,this.jetpackFormBlockName)?.[0];t.selectBlock(r),e?.[this.jetpackFormBlockName]?.handleAskAiAssistant?.()}}},47007:(e,t,n)=>{"use strict";n.d(t,{g:()=>c.g,p:()=>u});var a=n(74997),r=n(47143),s=n(27723),o=n(62514),i=n(96568),l=n(10603),c=n(14602);const __=s.__;class u extends l.mt{currentListOfValidBlocks=[];constructor(e){super(e,[]),this.behavior="action",this.feature="jetpack-form-ai-extension",this.startOpen=!0,this.hideOnBlockFocus=!1}setContent(e,t=!1){const{replaceInnerBlocks:n}=(0,r.dispatch)("core/block-editor"),s=e.replace(//g,""),l=(0,i.d)(s),c=(0,a.parse)(l).filter((e=>e.isValid&&!["core/freeform","core/missing","core/html"].includes(e.name)));let u=!1;if(c.length0){const e=c[c.length-1],t=this.currentListOfValidBlocks[c.length-1];u=!(0,o.w)(e,t)}if(c.length>0&&(c.length!==this.currentListOfValidBlocks.length||u)&&(n(this.clientId,c),this.currentListOfValidBlocks=c),t){const e=c.filter((e=>"jetpack/button"===e.name));if(this.currentListOfValidBlocks=this.currentListOfValidBlocks||[],e.length>1){let t=0;this.currentListOfValidBlocks=this.currentListOfValidBlocks.filter((n=>"jetpack/button"!==n.name||(t++,t===e.length))),n(this.clientId,this.currentListOfValidBlocks)}else 0===e.length&&n(this.clientId,[...this.currentListOfValidBlocks,(0,a.createBlock)("jetpack/button",{label:__("Submit","jetpack"),element:"button",text:__("Submit","jetpack"),borderRadius:8,lock:{remove:!0}})]);this.currentListOfValidBlocks=[]}}getExtensionInputPlaceholder(){if(!this.getContent()){const e=[__("Example: a contact form with name, email, and message fields","jetpack"),__("Example: a pizza ordering form with name, address, phone number and toppings","jetpack"),__("Example: a survey form with multiple choice questions","jetpack")];return e[Math.floor(Math.random()*e.length)]}const e=[__("Example: remove email field","jetpack"),__("Example: make email optional","jetpack"),__("Example: add message field and make it required","jetpack")];return e[Math.floor(Math.random()*e.length)]}getContent(){const e=this.getBlock();if(!e)return"";const{innerBlocks:t}=e;return t?.length?t.reduce(((e,t)=>e+(0,a.serialize)(t)+"\n\n"),""):""}onSuggestion(e){this.setContent(e)}onDone(e){this.setContent(e,!0)}}},10821:(e,t,n)=>{"use strict";n.d(t,{Bi:()=>i});var a=n(74997),r=n(47143),s=n(7503);const o=(0,n(48499).C)("ai-assistant-support");function i(){if(!(0,a.getBlockType)("jetpack/ai-assistant"))return!1;if(!o)return!1;if(!(0,s.x)())return!1;const{getHiddenBlockTypes:e}=(0,r.select)("core/edit-post")||{};return!(e?.()||[]).includes("jetpack/ai-assistant")}},91184:(e,t,n)=>{"use strict";n.d(t,{Y:()=>s});var a=n(95396),r=n(10821);function s(e){return!!(0,r.Bi)()&&!!a.L.includes(e)}},24310:(e,t,n)=>{"use strict";n.d(t,{g:()=>r});var a=n(10603);class r extends a.mt{constructor(e){super(e,["listItem"]),this.isChildBlock=!0}}},75430:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var a=n(10603);class r extends a.mt{constructor(e){super(e,["list"])}}},63904:(e,t,n)=>{"use strict";n.d(t,{d:()=>i});var a=n(96865),r=n(74997),s=n(10603);const o=new a.OO({fixes:["paragraph"]});class i extends s.mt{constructor(e){super(e,["paragraph"])}getContent(){const e=this.getBlock();return t=(0,r.getBlockContent)(e),o.render({content:t});var t}}},99800:(e,t,n)=>{"use strict";var a=n(82170),r=n(96865),s=n(94715),o=n(29491),i=n(47143),l=n(86087),c=n(52619),u=n(13022),d=n(10067),p=n.n(d),m=(n(51609),n(61297)),h=n(32735),g=n(35317),f=n(4e4),v=n(67607),b=n(31124),k=n(2612),y=n(91184);const E=p()("jetpack-ai-assistant:extensions:with-ai-extension"),w={"core/heading":"heading","core/paragraph":"paragraph","core/list-item":"list-item","core/list":"list","jetpack/contact-form":"form-ai"},_={group:"block"},C=(0,o.createHigherOrderComponent)((e=>{function t(t){const{clientId:n,isSelected:o,name:c,isSelectionEnabled:d}=t,p=(0,l.useRef)(null),g=(0,l.useRef)(0),y=(0,l.useRef)(null),C=(0,l.useRef)(""),A=(0,l.useRef)(null),x=(0,l.useRef)(document),j=(0,l.useRef)([]),[S,N]=(0,l.useState)(""),[R,P]=(0,l.useState)(null),L=(0,l.useRef)(null),T=(0,l.useRef)(null),{undo:B}=(0,i.useDispatch)("core/editor"),{postId:M}=(0,i.useSelect)((e=>{const{getCurrentPostId:t}=e("core/editor");return{postId:t()}}),[]),{id:I,className:D}=(0,s.useBlockProps)({className:(0,u.A)({[c?.replace?.("/","-")]:!0})}),{increaseRequestsCount:F,dequeueAsyncRequest:z,requireUpgrade:O}=(0,m.A)(),{snapToBottom:H,enableAutoScroll:U,disableAutoScroll:V}=(0,h.A)({current:x?.current?.getElementById(I)},void 0,!0),q=(0,l.useCallback)((()=>{A.current?.focus()}),[]),{onSuggestion:G,onDone:$,getContent:W,getExtensionInputPlaceholder:Z,behavior:J,isChildBlock:K,feature:Y,adjustPosition:Q,startOpen:X,hideOnBlockFocus:ee}=(0,l.useMemo)((()=>(0,k.Q)(c,n)),[c,n]),te=Z(),[ne,ae]=(0,l.useState)(X),re=(0,l.useCallback)((()=>{ae((e=>!e))}),[]),se=(0,l.useCallback)((({promptType:e,options:t})=>{const n=W(),a=w[c];return[...j.current,{role:"jetpack-ai",context:{type:(0,f.p$)(e,a),content:n,request:t?.userPrompt,tone:t?.tone,language:t?.language,is_follow_up:j.current.length>0}}]}),[c,W]),oe=(0,l.useCallback)((e=>{const t=e||x.current.getElementById(I);t&&p.current&&t.style.setProperty("padding-bottom",`calc(${g.current+16}px + ${C.current||"0px"} )`,"important")}),[I]),ie=(0,l.useCallback)((e=>{G(e),Q&&oe(),H()}),[G,Q,H,oe]),le=(0,l.useCallback)((e=>{if(V(),$(e),F(),N(""),L.current?.message){const e={role:"assistant",content:W()};if(j.current.push(L.current.message,e),j.current.length>20){j.current.splice(0,j.current.length-20);const e=j.current.findIndex((e=>"jetpack-ai"===e.role));-1!==e&&(j.current=j.current.slice(e),j.current[0].context={...j.current[0].context,is_follow_up:!1})}}L.current=null,setTimeout((()=>{Q&&oe(),q()}),100)}),[V,$,F,W,Q,q,oe]),ce=(0,l.useCallback)((e=>{V(),N(""),E("Request error",e),e.code!==r.mA&&e.code!==r.Or&&F()}),[V,F]),{request:ue,stopSuggestion:de,requestingState:pe,error:me,reset:he}=(0,r.o2)({onSuggestion:ie,onDone:le,onError:ce,askQuestionOptions:{postId:M,feature:Y}});(0,l.useEffect)((()=>{T.current=pe}),[pe]);const ge=(0,l.useCallback)(((e,t)=>{if(ae(!0),O)return;const n=(0,r.MB)(e,t);n&&(N(n),P(n));const a=se({promptType:e,options:t});E("Request suggestion",e,t);const s=a[a.length-1];L.current={promptType:e,options:t,humanText:n,message:s},z(),U(),ue(a)}),[z,U,se,ue,O]),fe=(0,l.useCallback)((e=>{const t={userPrompt:e};P(e),U(),ge("userPrompt",t)}),[U,ge]),ve=(0,l.useCallback)((()=>{V(),de(),q()}),[V,de,q]),be=(0,l.useCallback)((()=>{L.current&&ge(L.current.promptType,L.current.options)}),[L,ge]),ke=(0,l.useCallback)((()=>{ae(!1),he(),N(""),L.current=null,j.current=[]}),[he]),ye=(0,l.useCallback)((async()=>{await B(),ke()}),[B,ke]);(0,l.useEffect)((()=>{o||ke()}),[o,ke]),(0,l.useEffect)((()=>{A.current&&d&&(x.current=A.current.ownerDocument,q())}),[ne,q,d]),(0,l.useEffect)((()=>{let e=x.current.getElementById(I);if(e&&Q)return ne&&!y.current&&p.current?(C.current=e.style.paddingBottom,y.current=new ResizeObserver((([t])=>{if(e=x.current.getElementById(I),g.current=t.contentRect.height,e&&p.current&&g.current>0){oe(e);const{marginBottom:t}=getComputedStyle(e),n=parseFloat(t);p.current.style.setProperty("margin-top",`-${g.current+n}px`,"important"),p.current.style.setProperty("margin-bottom",`${n+16}px`,"important")}})),y.current.observe(p.current)):y.current&&(e.style.paddingBottom=C.current,y.current.disconnect(),y.current=null,g.current=0),()=>{y.current&&y.current.disconnect()}}),[oe,Q,n,y,I,ne]),(0,l.useEffect)((()=>{if(ee&&ne){const e=x.current.getElementById(I),t=()=>{["requesting","suggesting"].includes(T.current)||(ae(!1),e?.removeEventListener("focusin",t))};return e?.addEventListener("focusin",t),()=>{e?.removeEventListener("focusin",t)}}}),[ee,ne,I]);const Ee=(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),ne&&(0,a.createElement)(v.A,{customPlaceholder:te||null,className:D,requestingState:pe,requestingError:me,wrapperRef:p,inputRef:A,action:S,blockType:c,feature:Y,request:fe,stopSuggestion:ve,close:ke,undo:ye,tryAgain:be,lastAction:R}),(0,a.createElement)(s.BlockControls,_,(0,a.createElement)(b.A,{blockType:c,onAskAiAssistant:re,onRequestSuggestion:ge,behavior:J})));if(K)return Ee;const we={value:{[c]:{handleAskAiAssistant:re,handleRequestSuggestion:ge}}};return(0,a.createElement)(k.B.Provider,we,Ee)}return n=>(0,g.A)(n.name)?(0,a.createElement)(t,n):(0,a.createElement)(e,n)}),"blockEditWithAiComponents");(0,c.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support/with-ai-extension",(function(e,t){return(0,y.Y)(t)?{...e,edit:C(e.edit),supports:{...e.supports,"jetpack/ai":{assistant:!0}}}:e}),100)},4393:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var a=n(96865),r=n(47143),s=n(86087),o=n(10067),i=n.n(o),l=n(62402),c=n(64425),u=n(16597),d=n(32735);const p=i()("jetpack-ai-assistant:error"),m=({attributes:e,clientId:t,content:n,tracks:o,userPrompt:i,onSuggestionDone:m,onUnclearPrompt:h,onModeration:g,requireUpgrade:f,initialRequestingState:v,contentRef:b,blockRef:k})=>{const[y,E]=(0,s.useState)(!1),[w,_]=(0,s.useState)(""),{updateBlockAttributes:C}=(0,r.useDispatch)("core/block-editor"),{dequeueAiAssistantFeatureAsyncRequest:A,setAiAssistantFeatureRequireUpgrade:x}=(0,r.useDispatch)("wordpress-com/plans"),{snapToBottom:j,enableAutoScroll:S,disableAutoScroll:N}=(0,d.A)(k,b),R=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("title"))),P=(0,r.useSelect)((e=>e("core/editor").getCurrentPostId())),L=(0,s.useRef)([]),T=(0,s.useRef)(void 0),{request:B,stopSuggestion:M,handleErrorQuotaExceededError:I,requestingState:D,error:F}=(0,a.o2)({onSuggestion:e=>{C(t,{content:e?.replaceAll(c.uV,"")}),j()},onDone:e=>{const n=e.replaceAll(c.uV,""),a={role:"assistant",content:n};L.current.push(T.current,a),L.current.length>20&&L.current.splice(0,L.current.length-20),C(t,{content:n,messages:L.current}),j(),N(),m?.()},onStop:()=>{j(),N(),m?.()},onError:e=>{switch(e?.code){case a.cT:E(!1);break;case a.ud:E(!1),g?.();break;case a.mA:case a.AZ:E(!0);break;case a.Or:E(!1),x(!0);break;case a.L9:h?.()}},onAllErrors:e=>{p(e)},initialRequestingState:v,askQuestionOptions:{postId:P,feature:"ai-assistant",functions:{}}}),z=["requesting","suggesting"].includes(D),O=async(r,s={})=>{if(A(),f)return I(),void E(!1);if(s={retryRequest:!1,tone:l.US,...s},z)return;E(!1);let d=w;if(o.recordEvent("jetpack_ai_chat_completion",{post_id:P}),L.current=[...e.messages],T.current={},s.retryRequest)T.current=d[d.length-1];else{const o=e?.isLayoutBuldingModeEnable?(0,u.rJ)(t):(0,u.aB)();d=(0,c.jf)({generatedContent:n,allPostContent:o,postContentAbove:(0,u.b$)(t),currentPostTitle:R,options:s,userPrompt:s?.userPrompt||i,type:r,isGeneratingTitle:e.promptType===a.vE}),T.current=d.pop(),d=[...d,...L.current],d.push(T.current),_(d),e.promptType!==a.vE&&C(t,{promptType:r})}try{S(),await B(d)}catch(e){p(e),E(!0),N()}};return{setShowRetry:E,showRetry:y,postTitle:R,contentBefore:(0,u.b$)(t),wholeContent:(0,u.aB)(),requestingState:D,error:F,getSuggestionFromOpenAI:O,stopSuggestion:M,retryRequest:()=>O("",{retryRequest:!0})}}},92169:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(3924),r=n(85985),s=n(10617),o=n(61297);const i=()=>{const e=new URLSearchParams(window.location.search),t=(0,r.GE)();return(0,r.Sy)()&&e.has("post")?`https://wordpress.com/post/${t}/${e.get("post")}`:`https://wordpress.com/home/${t}`};function l(){const{nextTier:e,tierPlansEnabled:t}=(0,o.A)(),n=i(),l=(0,a.A)("jetpack-ai-yearly-tier-upgrade-nudge",{site:(0,r.GE)(),path:t?`jetpack_ai_yearly:-q-${e?.limit}`:"jetpack_ai_yearly",query:`redirect_to=${encodeURIComponent(n)}`}),c=(0,a.A)("jetpack-ai-upgrade-url-for-jetpack-sites",{site:(0,r.GE)(),path:"jetpack_ai_yearly"}),u=(0,r.d9)()||(0,r.Sy)()?l:c,{autosaveAndRedirect:d,isRedirecting:p}=(0,s.A)(u);return{checkoutUrl:u,autosaveAndRedirect:d,isRedirecting:p}}},61297:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(47143),r=n(58164);function s(){const{data:e,loading:t,requestsLimit:n,requestsCount:s}=(0,a.useSelect)((e=>{const{getAiAssistantFeature:t,getIsRequestingAiAssistantFeature:n}=e("wordpress-com/plans"),a=t(),{currentTier:s,usagePeriod:o,requestsCount:i,requestsLimit:l}=a,c=(0,r.Bd)(s),u=s?.limit||l,d=c===r._X?i:o?.requestsCount,p=c===r._X?l:u;return{data:a,loading:n(),requestsCount:d,requestsLimit:p}}),[]),{fetchAiAssistantFeature:o,increaseAiAssistantRequestsCount:i,dequeueAiAssistantFeatureAsyncRequest:l}=(0,a.useDispatch)("wordpress-com/plans");return{...e,requestsCount:s,requestsLimit:n,loading:t,error:null,refresh:o,increaseRequestsCount:i,dequeueAsyncRequest:l}}},44732:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(3924),r=n(85985),s=n(10617);function o(){const e=(0,r.$i)()?.jetpack?.is_my_jetpack_available,t=e?`${(0,r.$i)()?.adminUrl||""}admin.php?page=my-jetpack#/jetpack-ai`:(0,a.A)("org-ai"),{autosaveAndRedirect:n,isRedirecting:o}=(0,s.A)(t);return{productPageUrl:t,autosaveAndRedirect:n,isRedirecting:o,isMyJetpackAvailable:e}}},75956:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(90372),r=n(86087);const s=window?.Jetpack_Editor_Initial_State?.tracksUserData||null,o=parseInt(window?.Jetpack_Editor_Initial_State?.wpcomBlogId)||0,i=()=>((0,r.useEffect)((()=>{s&&a.A.initialize(s?.userid,s?.username,o?{blog_id:o}:{})}),[]),a.A)},32735:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(86087),r=n(10067);const s=n.n(r)()("jetpack-ai-assistant:use-auto-scroll"),o=(e,t,n=!1)=>{const r=(0,a.useRef)(null),o=(0,a.useRef)(null),i=(0,a.useRef)(!1),l=(0,a.useRef)(!1),c=(0,a.useRef)(!1),u=(0,a.useRef)(!1),d=(0,a.useRef)({scrollPadding:"",scrollMargin:""}),p=(0,a.useCallback)((()=>{s("enabling ignore scroll"),l.current=!0}),[]),m=(0,a.useCallback)((()=>{i.current&&c.current&&!l.current&&p()}),[p]),h=(0,a.useCallback)((()=>{i.current=!0,l.current=!1,c.current=!1,u.current=!1,r.current?.addEventListener("scroll",m),s("enabling auto scroll")}),[m]),g=(0,a.useCallback)((()=>{i.current=!1,l.current=!1,c.current=!1,u.current=!1,r.current?.removeEventListener("scroll",m),o.current?.style&&(o.current.style.scrollPadding=d.current.scrollPadding,o.current.style.scrollMargin=d.current.scrollMargin),r.current=null,s("disabling auto scroll")}),[m]),f=(0,a.useCallback)((()=>{if(!i.current||l.current)return;const a=n?e?.current:t?.current?.firstElementChild?.lastElementChild;a&&!u.current&&(c.current=!0,u.current=!0,r?.current?.removeEventListener?.("scroll",m),a?.scrollIntoView({block:"end",inline:"end"}),setTimeout((()=>{u.current=!1,r?.current?.addEventListener?.("scroll",m)}),200))}),[e,t,n,m]),v=(0,a.useCallback)((e=>{if(null==e)return null;if("BODY"===e?.nodeName)return e;if(e?.ownerDocument!==document)return e.ownerDocument;const{overflow:t}=window.getComputedStyle(e);return t.split(" ").every((e=>"auto"===e||"scroll"===e))?e:e?.parentElement?v(e?.parentElement):e}),[]);return(0,a.useEffect)((()=>{const t=v(e?.current?.parentElement);!r.current&&t&&(r.current=t,o.current=t instanceof HTMLElement?t:t.documentElement,d.current={scrollPadding:o.current.style.scrollPadding,scrollMargin:o.current.style.scrollMargin},i.current&&(o.current.style.scrollPadding="80px",o.current.style.scrollMargin="10px"))}),[e,v]),{snapToBottom:f,enableAutoScroll:h,disableAutoScroll:g}}},35317:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(85985);const r={"jetpack/contact-form":"contact-form"};function s(e){const t=r[e],{isModuleActive:n}=(0,a.q7)(t);return!t||n}},76695:(e,t,n)=>{"use strict";n.d(t,{A:()=>c,y:()=>l});var a=n(85985),r=n(47143),s=n(51609),o=n(16597),i=n(13802);function l(e){return`ai-assistant-block-${e}`}const c=()=>{const{replaceBlock:e,removeBlocks:t}=(0,r.useDispatch)("core/block-editor"),n=(0,r.useSelect)((e=>e("core/block-editor")),[]),{getSelectedBlockClientIds:c,getBlocksByClientId:u,getBlock:d,getBlockParents:p}=n,{tracks:m}=(0,a.st)();return{canTransformToAIAssistant:(0,s.useCallback)((({clientId:e,blockName:t})=>{if(!d(e))return!1;if(!i.y7.includes(t))return!1;const n=p(e);if(0===n.length)return!0;const a=d(n[n.length-1]);return!["core/list","core/list-item"].includes(a.name)}),[d,p]),transformToAIAssistant:(0,s.useCallback)((({request:n}={})=>{const a=c(),r=u(a),s=(0,o.Sb)(r),[d]=r,[p,...h]=a,g={...d?.attributes||{},content:s,preTransformAction:n?.promptType},f=(0,i.rr)(d.name,g);if(n?.promptType){m.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:n.promptType,block_type:d.name});const e={clientId:p,type:n.promptType,options:{...n.options,contentType:"generated",fromExtension:!0}};localStorage.setItem(l(f.clientId),JSON.stringify(e))}else m.recordEvent("jetpack_ai_assistant_prompt_show",{block_type:d.name});e(p,f),t(h)}),[u,c,t,e,m]),getSelectedBlockClientIds:c}}},7503:(e,t,n)=>{"use strict";n.d(t,{C:()=>d,x:()=>u});var a=n(85985),r=n(10067),s=n.n(r);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,a.Sy)()?(c("Simple site connected ✅"),!0):(0,a.d9)()?(c("Atomic site connected ✅"),!0):o?.connectionStatus?.isUserConnected?(c("Jetpack user is connected ✅"),!0):(c("User is not connected ❌"),!1)}function d(){if((0,a.Sy)())return!0;return!1==!(o?.userConnectionData?.currentUser?.permissions??{}).manage_options}},4e4:(e,t,n)=>{"use strict";n.d(t,{J1:()=>i,K6:()=>l,p$:()=>u});var a=n(96865);const r="title",s="content",o=null;function i(e){return{role:"jetpack-ai",context:{type:"ai-assistant-initial-prompt",for:u(e)}}}function l({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:r,options:s,type:o,userPrompt:i,isGeneratingTitle:l}){const u=[],d="generated"===s?.contentType;let p=null;switch(o){case a.im:p=r;break;case a.sn:case a.A4:case a.yy:p=n;break;case a.vE:p=t;break;case a.br:case a.fD:p=e;break;case a.eJ:case a.UA:case a.Gm:p=d?e:t;break;case a.d5:p=n;break;case a.pE:p=e||t}const m=function(e,t){return!e&&t&&t.length>0?{role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:t}}:null}(o===a.pE?!!e?.length:d,p);return m&&u.push(m),u.push({role:"jetpack-ai",context:c({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:r,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?r:!t||n?s:o}(i,"generated"===e?.contentType,e?.fromExtension||!1);return{type:u(t),...l?{subject:l}:{},...t===a.eJ&&e?.tone?{tone:e.tone}:{},...t===a.Gm&&e?.language?{language:e.language}:{},...t===a.pE&&n?{request:n}:{}}}function u(e,t){const n={[a.im]:"ai-assistant-summary-by-title",[a.sn]:"ai-assistant-continue-writing",[a.A4]:"ai-assistant-simplify",[a.yy]:"ai-assistant-correct-spelling",[a.vE]:"ai-assistant-generate-title",[a.br]:"ai-assistant-make-longer",[a.fD]:"ai-assistant-make-shorter",[a.eJ]:"ai-assistant-change-tone",[a.UA]:"ai-assistant-summarize",[a.Gm]:"ai-assistant-change-language",[a.pE]:"ai-assistant-user-prompt",[a.d5]:"ai-assistant-transform-list-to-table"};return"form-ai"===t?"form-ai-extension":t?`${n[e]}-${t}-extension`:n[e]}},64425:(e,t,n)=>{"use strict";n.d(t,{jf:()=>o,uV:()=>s});var a=n(96865),r=n(4e4);a.im,a.sn,a.A4,a.yy,a.vE,a.br,a.fD,a.eJ,a.UA,a.Gm,a.pE,a.z5,a.d5;const s="````";function o({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:a,options:s,type:o,userPrompt:i,isGeneratingTitle:l}){return[(0,r.J1)(o),...(0,r.K6)({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:a,options:s,type:o,userPrompt:i,isGeneratingTitle:l})]}},16597:(e,t,n)=>{"use strict";n.d(t,{Sb:()=>l,aB:()=>i,b$:()=>o,rJ:()=>c});var a=n(96865),r=n(74997),s=n(47143);function o(e){if(!e)return"";const t=(0,s.select)("core/block-editor"),n=t.getBlockIndex(e),o=t.getBlocks().slice(0,n)??[];return o?.length?(0,a.rh)({content:(0,r.serialize)(o)}):""}function i(){const e=(0,s.select)("core/block-editor").getBlocks();return e?.length?(0,a.rh)({content:(0,r.serialize)(e)}):""}function l(e){return e.filter((e=>null!=e)).map((e=>(0,r.getBlockContent)(e))).join("\n\n")}function c(e){const t=(0,s.select)("core/block-editor").getBlock(e);return t?.innerBlocks?.length?l(t.innerBlocks):""}},62514:(e,t,n)=>{"use strict";n.d(t,{w:()=>s});const a=e=>{delete e.clientId;for(const t of e.innerBlocks??[])a(t);return e},r=e=>a((e=>JSON.parse(JSON.stringify(e)))(e));function s(e,t){const n=r(e),a=r(t);return JSON.stringify(n)===JSON.stringify(a)}},96568:(e,t,n)=>{"use strict";function a(e){const t=document.createElement("div");return t.innerHTML=e,t.innerHTML}n.d(t,{d:()=>a})},48499:(e,t,n)=>{"use strict";n.d(t,{C:()=>r});var a=n(85985);function r(e){return!0===(0,a.FB)(e).available}},13802:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>c,rr:()=>l,y7:()=>o});var a=n(96865),r=n(74997),s=n(54681);const o=["core/heading","core/paragraph","core/list"],i=[];function l(e,t){const{content:n,...o}=t;let i=n;"core/heading"===e&&t?.level&&(i=i.replace(/<(\/?)h\d([^>]*)>/g,`<$1h${t.level}$2>`));const l=(0,a.rh)({content:i}),c=[];return c.push({role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:l}}),(0,r.createBlock)(s.name,{...o,content:l,originalContent:l,messages:c,originalMessages:c})}for(const e of o)i.push({type:"block",blocks:[e],isMatch:()=>o.includes(e),transform:(t,n)=>{const a=(0,r.getSaveContent)(e,t,n);return l(e,{...t,content:a})}});const c={from:i}},36920:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(82170),r=n(27723),s=n(56333),o=n(10617);const __=r.__,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:r}=(0,o.A)(t);if(window?.Jetpack_AIChatBlock?.jetpackSettings?.instant_search_enabled)return null;return(0,a.createElement)(s.c,{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:r,visible:!0,align:null,title:null,context:null})}},50443:(e,t,n)=>{"use strict";n.d(t,{G:()=>s,W:()=>r});var a=n(27723);const __=a.__,r=__("Ask","jetpack"),s=__("Ask a question about this site","jetpack")},51686:(e,t,n)=>{"use strict";n.d(t,{z:()=>c});var a=n(82170),r=n(94715),s=n(56427),o=n(3582),i=n(27723),l=n(50443);const __=i.__;function c({setAttributes:e,placeholder:t,showCopy:n,showFeedback:i,showSources:c}){const[u,d]=(0,o.useEntityProp)("root","site","jetpack_search_ai_prompt_override");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(r.InspectorControls,null,(0,a.createElement)(s.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,a.createElement)(s.TextControl,{label:__("Placeholder Text","jetpack"),className:"jetpack-ai-chat__ask-button-text",placeholder:l.G,onChange:t=>e({placeholder:t}),value:t,__nextHasNoMarginBottom:!0}))),(0,a.createElement)(r.InspectorAdvancedControls,null,(0,a.createElement)(s.TextareaControl,{label:__("Additional instructions","jetpack"),help:__("Give Jetpack AI additional instructions for answer length, format, and tone.","jetpack"),value:u,onChange:d,__nextHasNoMarginBottom:!0}),(0,a.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}),__nextHasNoMarginBottom:!0}),(0,a.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}),__nextHasNoMarginBottom:!0}),(0,a.createElement)(s.ToggleControl,{label:__("Show list of sources.","jetpack"),help:__("Show used sources at the bottom of the answer.","jetpack"),checked:c,onChange:t=>e({showSources:t}),__nextHasNoMarginBottom:!0})))}},32908:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var a=n(82170),r=n(96865),s=n(94715),o=n(56427),i=n(47143),l=n(2274),c=n(26247),u=n(36920),d=n(50443),p=n(51686);function m({attributes:e,setAttributes:t,clientId:n}){const{askButtonLabel:m=d.W,placeholder:h=d.G,showCopy:g,showFeedback:f,showSources:v}=e,b=(0,s.useBlockProps)(),k=(0,i.useSelect)((e=>e("core/block-editor").isBlockSelected(n)),[n]),y=(0,c.A)();return(0,a.createElement)("div",b,!y&&(0,a.createElement)(l.A,{block:"Jetpack AI Search"}),(0,a.createElement)(u.A,null),(0,a.createElement)("div",{className:"jetpack-ai-chat-question-wrapper"},(0,a.createElement)(o.TextControl,{className:"jetpack-ai-chat-question-input",placeholder:h,disabled:!0,__nextHasNoMarginBottom:!0}),(0,a.createElement)(s.RichText,{className:"wp-block-button__link jetpack-ai-chat-question-button",onChange:e=>t({askButtonLabel:e}),value:m,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/strikethrough"]})),k&&(0,a.createElement)(r.Yj,null),(0,a.createElement)(s.InspectorControls,null,(0,a.createElement)(p.z,{askButtonLabel:m,placeholder:h,setAttributes:t,showCopy:g,showFeedback:f,showSources:v})))}},8393:(e,t,n)=>{"use strict";var a=n(94375),r=n(1629),s=n(32908),o=n(41825);(0,a.M)(r,{edit:s.A,save:o.A})},41825:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(82170),r=n(94715),s=n(50443);function o({attributes:e}){const t=r.useBlockProps.save({"data-ask-button-label":e.askButtonLabel||s.W});return(0,a.createElement)("div",t)}},97571:(e,t,n)=>{"use strict";n.d(t,{z:()=>o});var a=n(82170),r=n(56427),s=n(27723);const __=s.__;function o({attributes:e,setAttributes:t}){const{statsData:n,statsOption:s}=e,o=[{value:"views",label:__("Views","jetpack")},{value:"visitors",label:__("Visitors","jetpack")}],i=[{value:"site",label:__("My whole site","jetpack")},{value:"post",label:__("This individual post","jetpack")}];return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(r.PanelBody,{title:__("Settings","jetpack")},(0,a.createElement)(r.RadioControl,{label:__("Views or visitors","jetpack"),selected:n,onChange:e=>t({statsData:e}),options:o,help:__("Views represent site visits, whereas visitors represent unique individuals.","jetpack")}),(0,a.createElement)(r.RadioControl,{label:__("Show stats data for","jetpack"),selected:s,onChange:e=>t({statsOption:e}),options:i,disabled:"visitors"===n,help:"visitors"===n?__("Visitor counts aren't available for individual posts.","jetpack"):null}),(0,a.createElement)("span",{className:"jetpack-blog-stats__delay-notice"},__("Stats are delayed for up to 5 minutes.","jetpack"))))}},20201:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var a=n(82170),r=n(37975),s=n(85985),o=n(1455),i=n.n(o),l=n(94715),c=n(47143),u=n(86087),d=n(27723),p=n(97571),m=n(51744);const __=d.__,_n=d._n;const h=function({attributes:e,className:t,setAttributes:n}){const{isLoadingModules:o,isChangingStatus:d,isModuleActive:h,changeStatus:g}=(0,s.q7)("stats"),{label:f,statsData:v,statsOption:b}=e,[k,y]=(0,u.useState)(null),[E,w]=(0,u.useState)(),[_,C]=(0,u.useState)(),A=(0,l.useBlockProps)(),x="post"===b?_:"views"===v?k:E,j=(0,c.useSelect)((e=>e("core/editor").getCurrentPostId()),[]);if((0,u.useEffect)((()=>{h&&i()({path:Number.isInteger(j)?`/wpcom/v2/blog-stats?post_id=${j}`:"/wpcom/v2/blog-stats"}).then((e=>{y(e["blog-views"]),w(e["blog-visitors"]),C(Number.isInteger(j)?e["post-views"]:"12345")}))}),[j,h]),(0,u.useEffect)((()=>{"visitors"===v&&n({statsOption:"site"})}),[v,n]),!h&&!o)return(0,a.createElement)(m.k,{className:t,changeStatus:g,isLoading:d});const S=/* Translators: Number of visitors */ +const n=__("Requests will reset on %s.","jetpack");return`${t} ${(0,l.sprintf)(n,e)}`})((e=>{if(!e?.nextStart)return null;const t=new Date(e.nextStart);return t.toLocaleString("default",{month:"long"})+" "+t.getDate()})(e));return(0,i.createInterpolateElement)(t,{link:(0,r.createElement)("a",{href:"https://jetpack.com/redirect/?source=ai-assistant-fair-usage-policy",target:"_blank",rel:"noreferrer"})})})();return"muted"===e?(0,r.createElement)("span",{className:"jetpack-ai-fair-usage-notice-muted-variant"},t):"error"===e?(0,r.createElement)(o.Notice,{status:"error",isDismissible:!1,className:"jetpack-ai-fair-usage-notice"},t):null},b=e=>{const{upgradeType:t,currentTier:n}=(0,m.A)();return 1===n?.value?(0,r.createElement)(v,null):"vip"===t?(({description:e=null,useLightNudge:t=!1})=>{const n=t?g.U:d.c,a=(0,i.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. Please reach out to your VIP account team.","jetpack"),{strong:(0,r.createElement)("strong",null)});return(0,r.createElement)(n,{buttonText:null,checkoutUrl:null,className:"jetpack-ai-upgrade-banner",description:e||a,goToCheckoutPage:null,isRedirecting:null,visible:!0,align:null,title:null,context:null})})({description:e.description,useLightNudge:e?.useLightNudge}):(({placement:e=null,description:t=null,useLightNudge:n=!1})=>{const o=n?g.U:d.c,{checkoutUrl:c}=(0,p.A)(),u=(0,h.C)(),{nextTier:v,tierPlansEnabled:b,currentTier:k,requestsCount:y}=(0,m.A)(),{tracks:E}=(0,s.st)(),w=(0,i.useCallback)((()=>{f("upgrade",e),E.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:k?.slug,requests_count:y,placement:e})}),[k,y,E,e]),_=(0,i.useCallback)((()=>{f("contact us",e),E.recordEvent("jetpack_ai_upgrade_contact_us",{placement:e})}),[E,e]);if(!u){const e=(0,i.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)});return(0,r.createElement)(o,{showButton:!1,className:"jetpack-ai-upgrade-banner",description:t||e,visible:!0,align:null,title:null,context:null})}if(b){if(!v){const e=(0,a.A)("jetpack-ai-tiers-more-requests-contact"),n=__("You have reached the request limit for your current plan.","jetpack");return(0,r.createElement)(o,{buttonText:__("Contact Us","jetpack"),description:t||n,className:"jetpack-ai-upgrade-banner",checkoutUrl:e,visible:!0,align:null,title:null,context:null,goToCheckoutPage:_,target:"_blank"})}const e=(0,i.createInterpolateElement)((0,l.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"),v.limit),{strong:(0,r.createElement)("strong",null)});return(0,r.createElement)(o,{buttonText:(0,l.sprintf)(/* Translators: number of requests */ +__("Upgrade to %d requests","jetpack"),v.limit),checkoutUrl:c,className:"jetpack-ai-upgrade-banner",description:t||e,goToCheckoutPage:w,visible:!0,align:"center",title:null,context:null,target:"_blank"})}return(0,r.createElement)(o,{buttonText:"Upgrade",checkoutUrl:c,className:"jetpack-ai-upgrade-banner",description:(0,i.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:w,visible:!0,align:null,title:null,context:null,target:"_blank"})})(e)}},93094:(e,t,n)=>{"use strict";n.d(t,{U:()=>o});var r=n(82170),a=n(56427),s=n(27723);const __=s.__,o=({title:e,description:t,buttonText:n=null,checkoutUrl:s=null,goToCheckoutPage:o=null,isRedirecting:i=!1,showButton:l=!0,target:c="_top"})=>{const u=__("Redirecting…","jetpack");return(0,r.createElement)("div",{className:"jetpack-upgrade-plan-banner-light"},(0,r.createElement)(a.Notice,{status:"error",isDismissible:!1},(0,r.createElement)("p",null,e&&(0,r.createElement)("strong",null,e),t," ",l&&(0,r.createElement)(a.Button,{href:i?null:s,onClick:o,variant:"link",target:c},i?u:n))))}},62402:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>m,US:()=>u,hN:()=>p});var r=n(82170),a=n(96865),s=n(85985),o=n(56427),i=n(27723),l=n(29115);n(51609);const __=i.__,c=["formal","informal","optimistic","humorous","serious","skeptical","empathetic","confident","passionate","provocative"],u="formal",d=({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},`${a.oZ[n].emoji} ${a.oZ[n].label}`))));function p({label:e=a.uQ,value:t=u,onChange:n,disabled:s=!1}){return(0,r.createElement)(o.DropdownMenu,{icon:a.Qr,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.A})),disabled:s}},(({onClose:e})=>(0,r.createElement)(d,{value:t,onChange:t=>{n(t),e()}})))}function m({value:e=u,onChange:t,disabled:n=!1}){const{tracks:i}=(0,s.st)();return n?(0,r.createElement)(o.Tooltip,{text:a.uQ},(0,r.createElement)(o.Button,{disabled:!0},(0,r.createElement)(o.Icon,{icon:a.Qr}))):(0,r.createElement)(o.ToolbarDropdownMenu,{icon:a.Qr,label:a.uQ,popoverProps:{variant:"toolbar"},disabled:n,onToggle:e=>{e&&i.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"tone"})}},(()=>(0,r.createElement)(d,{value:e,onChange:t})))}},51698:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(82170),a=n(96865),s=n(94715),o=n(56427),i=n(27723),l=n(83883),c=n(83822),u=n(2162),d=n(99050),p=n(33468),m=n(62402);const __=i.__,h=({contentIsLoaded:e,getSuggestionFromOpenAI:t,retryRequest:n,handleAcceptContent:i,handleTryAgain:h,showRetry:g,contentBefore:f,hasPostTitle:v,wholeContent:b,setUserPrompt:k,recordEvent:y,isGeneratingTitle:E})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.BlockControls,null,!g&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(p.Ay,{hasContentBefore:!!f?.length,hasContent:!!b?.length,hasPostTitle:v,contentIsLoaded:e,onPromptSelect:e=>{y("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"prompt-template",prompt:e.original}),k(e.translated)},onSuggestionSelect:e=>{y("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:e}),t(e)}})),(0,r.createElement)(s.BlockControls,{group:"block"},(0,r.createElement)(m.Ay,{value:"neutral",onChange:n=>{y("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:a.eJ}),t(a.eJ,{tone:n,contentType:e?"generated":null})},disabled:!e&&!b?.length}),(0,r.createElement)(u.Ay,{value:"en",onChange:n=>{y("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:a.Gm}),t(a.Gm,{language:n,contentType:e?"generated":null})},disabled:!e&&!b?.length}),(0,r.createElement)(d.Ay,{onChange:t,exclude:E?["summarize"]:[],disabled:!e}))),(g||h)&&(0,r.createElement)(o.ToolbarGroup,null,!g&&e&&h&&(0,r.createElement)(o.ToolbarButton,{onClick:h},__("Try Again","jetpack")),g&&e&&(0,r.createElement)(o.ToolbarButton,{icon:l.A,onClick:i},__("Accept","jetpack")),g&&(0,r.createElement)(o.ToolbarButton,{icon:c.A,onClick:n},__("Retry","jetpack")))))},3586:(e,t,n)=>{"use strict";n.d(t,{A:()=>S});var r=n(82170),a=n(96865),s=n(85985),o=n(94715),i=n(74997),l=n(56427),c=n(29491),u=n(47143),d=n(86087),p=n(27723),m=n(13022),h=n(27970),g=n(56199),f=n(2274),v=n(58164),b=n(32249),k=n(23e3),y=n(51698),E=n(4393),w=n(92169),_=n(61297),C=n(44732),A=n(76695),x=n(7503);const __=p.__,j="post"===window?.Jetpack_Editor_Initial_State?.screenBase;function S({attributes:e,setAttributes:t,clientId:n,isSelected:p}){const[S,N]=(0,d.useState)(null),{tracks:R}=(0,s.st)(),{getBlock:P}=(0,u.useSelect)("core/block-editor"),L=(0,d.useRef)(null),T=(0,d.useRef)(null),{replaceBlocks:B,removeBlock:M}=(0,u.useDispatch)("core/block-editor"),{editPost:I}=(0,u.useDispatch)("core/editor"),[D,F]=(0,d.useState)((0,a.MB)(e.preTransformAction)),{isOverLimit:z,requireUpgrade:O,increaseRequestsCount:H,requestsCount:U,requestsLimit:V,currentTier:q,loading:G,tierPlansEnabled:$}=(0,_.A)(),W=Math.max(V-U,0),{autosaveAndRedirect:Z}=(0,w.A)(),J=(0,v.Bd)(q),K=()=>{setTimeout((()=>{L.current?.focus?.()}),100)},Y=()=>{setTimeout((()=>{T.current?.focus?.()}),100)},Q=(0,c.useViewportMatch)("medium","<"),X=(0,d.useRef)(null),{getSuggestionFromOpenAI:ee,stopSuggestion:te,showRetry:ne,contentBefore:re,postTitle:ae,retryRequest:se,wholeContent:oe,requestingState:ie,error:le}=(0,E.A)({onSuggestionDone:(0,d.useCallback)((()=>{K(),H()}),[H]),onUnclearPrompt:(0,d.useCallback)((()=>{Y(),H()}),[H]),onModeration:K,attributes:e,clientId:n,content:e.content,tracks:R,userPrompt:e.userPrompt,requireUpgrade:O,initialRequestingState:e.requestingState,contentRef:X,blockRef:T}),ce="requesting"===ie,ue=["requesting","suggesting"].includes(ie),de=(0,x.x)(),{productPageUrl:pe}=(0,C.A)(),me=(0,A.y)(n);(0,d.useEffect)((()=>{if(!me)return;const e=JSON.parse(localStorage.getItem(me));if(!e)return;const{type:t,options:n}=e;localStorage.removeItem(me),ee(t,n)}),[me,ee]),(0,d.useEffect)((()=>{le&&N(!1)}),[le]),(0,d.useEffect)((()=>{["init","done"].includes(ie)&&t({requestingState:ie})}),[ie,t]);const he=!!e.content,ge=e.promptType===a.vE,fe=__("Accept","jetpack"),ve=__("Accept title","jetpack"),be=ge?ve:fe,ke=async()=>{let t=[],r=(0,a._E)({content:e.content||""});if(r?.split("\n").length>1&&r?.split("\n")?.[0]?.match(/^

    .*<\/h1>$/)&&!ae){const e=r.split("\n"),t=e.shift();r=e.join("\n"),I({title:t.replace(/<[^>]*>/g,"")})}t=(0,i.rawHandler)({HTML:r}),await B(n,t);const s=(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);s&&(e=>{const t=e.ownerDocument.getSelection();t.selectAllChildren(e),t.collapseToEnd(),e.focus()})(s)},ye=()=>{ke(),R.recordEvent("jetpack_ai_assistant_block_accept",{feature:"ai-assistant"})},Ee=()=>{j?(I({title:e.content?e.content.trim():""}),M(n),R.recordEvent("jetpack_ai_assistant_block_accept",{feature:"ai-assistant"})):ye()},we=()=>{te(),K(),R.recordEvent("jetpack_ai_assistant_block_stop",{feature:"ai-assistant"})},_e=(0,o.useBlockProps)({ref:T,className:(0,m.A)({"is-waiting-response":ce})}),Ce=__("Ask Jetpack AI…","jetpack"),Ae=__("Write about… Make a table for…","jetpack"),xe=(0,r.createElement)(r.Fragment,null,z&&p&&(0,r.createElement)(k.A,{placement:"ai-assistant-block"}),!de&&(0,r.createElement)(f.A,{block:"AI Assistant"})),je=(0,r.createElement)(r.Fragment,null,le?.message&&!S&&"error_quota_exceeded"!==le?.code&&(0,r.createElement)(l.Notice,{status:le.status,isDismissible:!1,className:"jetpack-ai-assistant__error"},le.message)),Se=z&&J===v.Ti?(0,r.createElement)(k.Q,{variant:"muted"}):null,Ne=(0,d.useCallback)((e=>{e.preventDefault(),R.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:q?.slug,requests_count:U,placement:"jetpack_ai_assistant_block"}),Z(e)}),[R,q,U,Z]);return(0,r.createElement)(l.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{esc:()=>{["requesting","suggesting"].includes(ie)&&we()}}},(0,r.createElement)("div",_e,he&&(0,r.createElement)("div",{ref:X,className:"jetpack-ai-assistant__content"},(0,r.createElement)(d.RawHTML,null,(0,a._E)({content:e.content||""}))),(0,r.createElement)(o.InspectorControls,null,Se&&(0,r.createElement)("div",{className:"block-editor-block-card",style:{paddingTop:0}},(0,r.createElement)("span",{className:"block-editor-block-icon"}),Se),(0,r.createElement)("div",{className:"block-editor-block-card",style:{paddingTop:0}},(0,r.createElement)("span",{className:"block-editor-block-icon"}),(0,r.createElement)(l.ExternalLink,{href:pe},__("Discover all features","jetpack"))),(J===v._X||$&&J!==v.Ti)&&(0,r.createElement)(l.PanelBody,{initialOpen:!0},(0,r.createElement)(l.PanelRow,null,(0,r.createElement)(h.A,{placement:g.k}))),(0,r.createElement)(l.PanelBody,{initialOpen:!0},(0,r.createElement)(l.PanelRow,null,(0,r.createElement)(b.A,null)))),!ue&&de&&!O&&(0,r.createElement)(y.A,{isWaitingState:ue,contentIsLoaded:he,getSuggestionFromOpenAI:(e,t)=>{const n=(0,a.MB)(e,t);F(n),ee(e,t)},retryRequest:se,handleAcceptContent:ye,handleAcceptTitle:Ee,handleTryAgain:null,showRetry:ne,contentBefore:re,hasPostTitle:!!ae?.length,wholeContent:oe,promptType:e.promptType,setUserPrompt:e=>{if(!L?.current)return;L.current.focus(),t({userPrompt:e})},recordEvent:R.recordEvent,isGeneratingTitle:ge}),(0,r.createElement)(a.N0,{ref:L,disabled:O||!de,value:e.userPrompt,placeholder:e?.content?Ce:Ae,onChange:e=>{N(!0),t({userPrompt:e})},onSend:()=>{F(e.userPrompt),((...e)=>{ee(...e),Y()})("userPrompt"),R.recordEvent("jetpack_ai_assistant_block_generate",{feature:"ai-assistant"})},onStop:we,onAccept:()=>{ge?Ee():ye()},onDiscard:()=>{const r=e?.content===P(n).attributes?.content;t({content:e?.originalContent,promptType:void 0,messages:e?.originalMessages}),ke(),r?R.recordEvent("jetpack_ai_assistant_block_dismiss"):R.recordEvent("jetpack_ai_assistant_block_discard",{feature:"ai-assistant"})},state:ie,isTransparent:O||!de,showButtonLabels:!Q,showAccept:"init"!==ie&&he&&!ue,acceptLabel:be,showGuideLine:he,showRemove:e?.content?.length>0,banner:xe,error:je,customFooter:W%5!=0&&1!==U||G||J!==v._X?null:(0,r.createElement)(a.AK,{requestsRemaining:W,onUpgradeClick:Ne}),lastAction:D})))}},61351:(e,t,n)=>{"use strict";var r=n(94375),a=n(54681),s=n(3586),o=n(13802);n(99800);(0,r.M)(a,{edit:s.A,save:()=>null,transforms:o.Ay})},10603:(e,t,n)=>{"use strict";n.d(t,{mt:()=>o});var r=n(96865),a=n(74997),s=n(47143);class o{renderRules=[];firstUpdate=!0;behavior="dropdown";isChildBlock=!1;feature="ai-assistant";adjustPosition=!0;startOpen=!1;hideOnBlockFocus=!0;constructor(e,t=[]){this.clientId=e,this.renderRules=t}getBlock(){const{getBlock:e}=(0,s.select)("core/block-editor");return e(this.clientId)}getContent(){const e=this.getBlock();return t=(0,a.getBlockContent)(e),(0,r.rh)({content:t});var t}renderContent(e){return function(e,t=[]){return(0,r._E)({content:e,rules:t,extension:!0})}(e,this.renderRules)}onSuggestion(e){if(!e)return;const t=this.renderContent(e);this.replaceBlockContent(t)}onDone(e){this.firstUpdate=!0}replaceBlockContent(e){const[t]=(0,a.rawHandler)({HTML:e});if(!t)return;const{updateBlockAttributes:n,replaceInnerBlocks:r,__unstableMarkNextChangeAsNotPersistent:o}=(0,s.dispatch)("core/block-editor");this.firstUpdate?this.firstUpdate=!1:o(),n(this.clientId,t.attributes),o(),r(this.clientId,t.innerBlocks)}getExtensionInputPlaceholder(){return null}}},67607:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(82170),a=n(96865),s=n(85985),o=n(86087),i=n(27723),l=n(13022),c=(n(51609),n(92169)),u=n(61297);const __=i.__,d=(0,l.A)("jetpack-ai-assistant-extension-ai-input","wp-block");function p({customPlaceholder:e,className:t,requestingState:n,requestingError:i,inputRef:p,wrapperRef:m,action:h,blockType:g,feature:f,request:v,stopSuggestion:b,close:k,undo:y,tryAgain:E,lastAction:w}){const _=e||__("Ask Jetpack AI to edit…","jetpack"),[C,A]=(0,o.useState)(""),[x,j]=(0,o.useState)(_),{checkoutUrl:S}=(0,c.A)(),{tracks:N}=(0,s.st)(),[R,P]=(0,o.useState)(0),[L,T]=(0,o.useState)(!1),{requireUpgrade:B,requestsCount:M,requestsLimit:I,loading:D,nextTier:F,currentTier:z}=(0,u.A)(),O=(0,o.useMemo)((()=>B||["requesting","suggesting"].includes(n)),[B,n]),H=(0,o.useMemo)((()=>B&&1===z?.value),[B,z]),U=(0,o.useCallback)((()=>{N.recordEvent("jetpack_ai_assistant_extension_generate",{block_type:g,feature:f}),v?.(C)}),[g,f,v,N,C]),V=(0,o.useCallback)((()=>{N.recordEvent("jetpack_ai_assistant_extension_stop",{block_type:g}),j(_),b?.()}),[g,_,b,N]);const q=(0,o.useCallback)((()=>{N.recordEvent("jetpack_ai_assistant_undo",{block_type:g}),y?.()}),[g,N,y]),G=(0,o.useCallback)((()=>{N.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:z?.slug,requests_count:M,placement:"jetpack_ai_assistant_extension"})}),[z?.slug,M,N]),$=(0,o.useCallback)((()=>{N.recordEvent("jetpack_ai_assistant_try_again",{block_type:g}),E?.()}),[g,N,E]);return(0,o.useEffect)((()=>{["init","done"].includes(n)&&A("")}),[n]),(0,o.useEffect)((()=>{j(h||_),h&&A("")}),[h,_]),(0,o.useEffect)((()=>{T(!D&&!!F&&0===C.length)}),[D,F,C]),(0,o.useEffect)((()=>{const e=Math.max(I-M,0);P(e)}),[I,M]),(0,r.createElement)(a.FC,{className:(0,l.A)(d,t),placeholder:x,disabled:O,value:C,state:n,showGuideLine:!0,error:i,requestsRemaining:R,showUpgradeMessage:L,showFairUsageMessage:H,upgradeUrl:S,onChange:A,onSend:U,onStop:V,onClose:function(){k?.()},onUndo:q,onUpgrade:G,onTryAgain:$,wrapperRef:m,ref:p,lastAction:w,blockType:g})}},31124:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var r=n(82170),a=n(96865),s=n(85985),o=n(56427),i=n(86087),l=n(27723),c=n(52068),u=n(76695),d=n(2612);const __=l.__;function p({blockType:e,onClose:t,onAskAiAssistant:n,onRequestSuggestion:a}){const{canTransformToAIAssistant:s,transformToAIAssistant:o,getSelectedBlockClientIds:l}=(0,u.A)(),d=(0,i.useCallback)((r=>{const i=l(),[c]=i,u=r?.options?.alwaysTransformToAIAssistant||!1;!(i.length<2)&&s({clientId:c,blockName:e})||u?o({request:r}):(r?a?.(r.promptType,r.options):n?.(),t?.())}),[e,s,l,n,t,a,o]),[p]=l();return(0,r.createElement)(c.Ay,{blockType:e,clientId:p,onRequestSuggestion:(e,t)=>{d({promptType:e,options:t})},onAskAiAssistant:async()=>{d()},disabled:!1})}function m({behavior:e,blockType:t,label:n=__("AI Assistant","jetpack"),onAskAiAssistant:l,onRequestSuggestion:c}){const{tracks:u}=(0,s.st)(),m=(0,i.useContext)(d.B),h=(0,i.useCallback)((e=>{e&&u.recordEvent("jetpack_ai_assistant_extension_toolbar_menu_show",{block_type:t})}),[t,u]),g=(0,i.useCallback)((()=>{u.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_prompt_show",{block_type:t}),l?.()}),[t,l,u]),f=(0,i.useCallback)(((e,n)=>{u.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:e,block_type:t}),c?.(e,n)}),[t,c,u]);return(0,r.createElement)(o.Dropdown,{popoverProps:{variant:"toolbar"},renderToggle:({isOpen:t,onToggle:s})=>(0,r.createElement)(o.ToolbarButton,{className:"jetpack-ai-assistant__button",showTooltip:!0,onClick:()=>{if("function"!=typeof e)switch(e){case"action":g();break;case"dropdown":s()}else e({onToggle:s,onAskAiAssistant:l,context:m})},"aria-haspopup":"true","aria-expanded":t,label:n,icon:a.cj}),onToggle:h,renderContent:({onClose:e})=>(0,r.createElement)(p,{onClose:e,blockType:t,onAskAiAssistant:g,onRequestSuggestion:f})})}},95396:(e,t,n)=>{"use strict";n.d(t,{L:()=>a,l:()=>r});const r=["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"],a=["core/heading","core/paragraph","core/list-item","core/list","jetpack/contact-form",...r]},2612:(e,t,n)=>{"use strict";n.d(t,{B:()=>g,Q:()=>f});var r=n(86087),a=n(10067),s=n.n(a),o=n(10603),i=n(95396),l=n(42160),c=n(47007),u=n(75430),d=n(24310),p=n(63904);const m=s()("jetpack-ai-assistant:extensions:get-block-handler"),h={"core/heading":l.T,"core/paragraph":p.d,"core/list-item":d.g,"core/list":u.b,"jetpack/contact-form":c.p,...i.l.reduce(((e,t)=>({...e,[t]:c.g})),{})},g=(0,r.createContext)({});function f(e,t){let n=h[e];n||(m(`No handler found for block type: ${e}. Using default handler.`),n=o.mt);const r=new n(t);return{onSuggestion:r.onSuggestion.bind(r),onDone:r.onDone.bind(r),getContent:r.getContent.bind(r),getExtensionInputPlaceholder:r.getExtensionInputPlaceholder.bind(r),behavior:r.behavior,isChildBlock:r.isChildBlock,feature:r.feature,adjustPosition:r.adjustPosition,startOpen:r.startOpen,hideOnBlockFocus:r.hideOnBlockFocus}}},42160:(e,t,n)=>{"use strict";n.d(t,{T:()=>a});var r=n(10603);class a extends r.mt{constructor(e){super(e,[])}onSuggestion(e){const t=this.getBlock();if(e.startsWith("#")||(e=`${"#".repeat(t?.attributes?.level||1)} ${e}`),e.match(/^#*\s*$/))return;const n=this.renderContent(e);this.replaceBlockContent(n)}}},14602:(e,t,n)=>{"use strict";n.d(t,{g:()=>s});var r=n(47143),a=n(10603);class s extends a.mt{jetpackFormBlockName="jetpack/contact-form";constructor(e){super(e,[]),this.behavior=this.handleBehavior,this.isChildBlock=!0,this.hideOnBlockFocus=!1}handleBehavior=({context:e})=>{const t=(0,r.dispatch)("core/block-editor"),{getBlockParentsByBlockName:n}=(0,r.select)("core/block-editor"),a=n(this.clientId,this.jetpackFormBlockName)?.[0];t.selectBlock(a),e?.[this.jetpackFormBlockName]?.handleAskAiAssistant?.()}}},47007:(e,t,n)=>{"use strict";n.d(t,{g:()=>c.g,p:()=>u});var r=n(74997),a=n(47143),s=n(27723),o=n(62514),i=n(96568),l=n(10603),c=n(14602);const __=s.__;class u extends l.mt{currentListOfValidBlocks=[];constructor(e){super(e,[]),this.behavior="action",this.feature="jetpack-form-ai-extension",this.startOpen=!0,this.hideOnBlockFocus=!1}setContent(e,t=!1){const{replaceInnerBlocks:n}=(0,a.dispatch)("core/block-editor"),s=e.replace(//g,""),l=(0,i.d)(s),c=(0,r.parse)(l).filter((e=>e.isValid&&!["core/freeform","core/missing","core/html"].includes(e.name)));let u=!1;if(c.length0){const e=c[c.length-1],t=this.currentListOfValidBlocks[c.length-1];u=!(0,o.w)(e,t)}if(c.length>0&&(c.length!==this.currentListOfValidBlocks.length||u)&&(n(this.clientId,c),this.currentListOfValidBlocks=c),t){const e=c.filter((e=>"jetpack/button"===e.name));if(this.currentListOfValidBlocks=this.currentListOfValidBlocks||[],e.length>1){let t=0;this.currentListOfValidBlocks=this.currentListOfValidBlocks.filter((n=>"jetpack/button"!==n.name||(t++,t===e.length))),n(this.clientId,this.currentListOfValidBlocks)}else 0===e.length&&n(this.clientId,[...this.currentListOfValidBlocks,(0,r.createBlock)("jetpack/button",{label:__("Submit","jetpack"),element:"button",text:__("Submit","jetpack"),borderRadius:8,lock:{remove:!0}})]);this.currentListOfValidBlocks=[]}}getExtensionInputPlaceholder(){if(!this.getContent()){const e=[__("Example: a contact form with name, email, and message fields","jetpack"),__("Example: a pizza ordering form with name, address, phone number and toppings","jetpack"),__("Example: a survey form with multiple choice questions","jetpack")];return e[Math.floor(Math.random()*e.length)]}const e=[__("Example: remove email field","jetpack"),__("Example: make email optional","jetpack"),__("Example: add message field and make it required","jetpack")];return e[Math.floor(Math.random()*e.length)]}getContent(){const e=this.getBlock();if(!e)return"";const{innerBlocks:t}=e;return t?.length?t.reduce(((e,t)=>e+(0,r.serialize)(t)+"\n\n"),""):""}onSuggestion(e){this.setContent(e)}onDone(e){this.setContent(e,!0)}}},10821:(e,t,n)=>{"use strict";n.d(t,{Bi:()=>i});var r=n(74997),a=n(47143),s=n(7503);const o=(0,n(48499).C)("ai-assistant-support");function i(){if(!(0,r.getBlockType)("jetpack/ai-assistant"))return!1;if(!o)return!1;if(!(0,s.x)())return!1;const{getHiddenBlockTypes:e}=(0,a.select)("core/edit-post")||{};return!(e?.()||[]).includes("jetpack/ai-assistant")}},91184:(e,t,n)=>{"use strict";n.d(t,{Y:()=>s});var r=n(95396),a=n(10821);function s(e){return!!(0,a.Bi)()&&!!r.L.includes(e)}},24310:(e,t,n)=>{"use strict";n.d(t,{g:()=>a});var r=n(10603);class a extends r.mt{constructor(e){super(e,["listItem"]),this.isChildBlock=!0}}},75430:(e,t,n)=>{"use strict";n.d(t,{b:()=>a});var r=n(10603);class a extends r.mt{constructor(e){super(e,["list"])}}},63904:(e,t,n)=>{"use strict";n.d(t,{d:()=>i});var r=n(96865),a=n(74997),s=n(10603);const o=new r.OO({fixes:["paragraph"]});class i extends s.mt{constructor(e){super(e,["paragraph"])}getContent(){const e=this.getBlock();return t=(0,a.getBlockContent)(e),o.render({content:t});var t}}},99800:(e,t,n)=>{"use strict";var r=n(82170),a=n(96865),s=n(94715),o=n(29491),i=n(47143),l=n(86087),c=n(52619),u=n(13022),d=n(10067),p=n.n(d),m=(n(51609),n(61297)),h=n(32735),g=n(35317),f=n(4e4),v=n(67607),b=n(31124),k=n(2612),y=n(91184);const E=p()("jetpack-ai-assistant:extensions:with-ai-extension"),w={"core/heading":"heading","core/paragraph":"paragraph","core/list-item":"list-item","core/list":"list","jetpack/contact-form":"form-ai"},_={group:"block"},C=(0,o.createHigherOrderComponent)((e=>{function t(t){const{clientId:n,isSelected:o,name:c,isSelectionEnabled:d}=t,p=(0,l.useRef)(null),g=(0,l.useRef)(0),y=(0,l.useRef)(null),C=(0,l.useRef)(""),A=(0,l.useRef)(null),x=(0,l.useRef)(document),j=(0,l.useRef)([]),[S,N]=(0,l.useState)(""),[R,P]=(0,l.useState)(null),L=(0,l.useRef)(null),T=(0,l.useRef)(null),{undo:B}=(0,i.useDispatch)("core/editor"),{postId:M}=(0,i.useSelect)((e=>{const{getCurrentPostId:t}=e("core/editor");return{postId:t()}}),[]),{id:I,className:D}=(0,s.useBlockProps)({className:(0,u.A)({[c?.replace?.("/","-")]:!0})}),{increaseRequestsCount:F,dequeueAsyncRequest:z,requireUpgrade:O}=(0,m.A)(),{snapToBottom:H,enableAutoScroll:U,disableAutoScroll:V}=(0,h.A)({current:x?.current?.getElementById(I)},void 0,!0),q=(0,l.useCallback)((()=>{A.current?.focus()}),[]),{onSuggestion:G,onDone:$,getContent:W,getExtensionInputPlaceholder:Z,behavior:J,isChildBlock:K,feature:Y,adjustPosition:Q,startOpen:X,hideOnBlockFocus:ee}=(0,l.useMemo)((()=>(0,k.Q)(c,n)),[c,n]),te=Z(),[ne,re]=(0,l.useState)(X),ae=(0,l.useCallback)((()=>{re((e=>!e))}),[]),se=(0,l.useCallback)((({promptType:e,options:t})=>{const n=W(),r=w[c];return[...j.current,{role:"jetpack-ai",context:{type:(0,f.p$)(e,r),content:n,request:t?.userPrompt,tone:t?.tone,language:t?.language,is_follow_up:j.current.length>0}}]}),[c,W]),oe=(0,l.useCallback)((e=>{const t=e||x.current.getElementById(I);t&&p.current&&t.style.setProperty("padding-bottom",`calc(${g.current+16}px + ${C.current||"0px"} )`,"important")}),[I]),ie=(0,l.useCallback)((e=>{G(e),Q&&oe(),H()}),[G,Q,H,oe]),le=(0,l.useCallback)((e=>{if(V(),$(e),F(),N(""),L.current?.message){const e={role:"assistant",content:W()};if(j.current.push(L.current.message,e),j.current.length>20){j.current.splice(0,j.current.length-20);const e=j.current.findIndex((e=>"jetpack-ai"===e.role));-1!==e&&(j.current=j.current.slice(e),j.current[0].context={...j.current[0].context,is_follow_up:!1})}}L.current=null,setTimeout((()=>{Q&&oe(),q()}),100)}),[V,$,F,W,Q,q,oe]),ce=(0,l.useCallback)((e=>{V(),N(""),E("Request error",e),e.code!==a.mA&&e.code!==a.Or&&F()}),[V,F]),{request:ue,stopSuggestion:de,requestingState:pe,error:me,reset:he}=(0,a.o2)({onSuggestion:ie,onDone:le,onError:ce,askQuestionOptions:{postId:M,feature:Y}});(0,l.useEffect)((()=>{T.current=pe}),[pe]);const ge=(0,l.useCallback)(((e,t)=>{if(re(!0),O)return;const n=(0,a.MB)(e,t);n&&(N(n),P(n));const r=se({promptType:e,options:t});E("Request suggestion",e,t);const s=r[r.length-1];L.current={promptType:e,options:t,humanText:n,message:s},z(),U(),ue(r)}),[z,U,se,ue,O]),fe=(0,l.useCallback)((e=>{const t={userPrompt:e};P(e),U(),ge("userPrompt",t)}),[U,ge]),ve=(0,l.useCallback)((()=>{V(),de(),q()}),[V,de,q]),be=(0,l.useCallback)((()=>{L.current&&ge(L.current.promptType,L.current.options)}),[L,ge]),ke=(0,l.useCallback)((()=>{re(!1),he(),N(""),L.current=null,j.current=[]}),[he]),ye=(0,l.useCallback)((async()=>{await B(),ke()}),[B,ke]);(0,l.useEffect)((()=>{o||ke()}),[o,ke]),(0,l.useEffect)((()=>{A.current&&d&&(x.current=A.current.ownerDocument,q())}),[ne,q,d]),(0,l.useEffect)((()=>{let e=x.current.getElementById(I);if(e&&Q)return ne&&!y.current&&p.current?(C.current=e.style.paddingBottom,y.current=new ResizeObserver((([t])=>{if(e=x.current.getElementById(I),g.current=t.contentRect.height,e&&p.current&&g.current>0){oe(e);const{marginBottom:t}=getComputedStyle(e),n=parseFloat(t);p.current.style.setProperty("margin-top",`-${g.current+n}px`,"important"),p.current.style.setProperty("margin-bottom",`${n+16}px`,"important")}})),y.current.observe(p.current)):y.current&&(e.style.paddingBottom=C.current,y.current.disconnect(),y.current=null,g.current=0),()=>{y.current&&y.current.disconnect()}}),[oe,Q,n,y,I,ne]),(0,l.useEffect)((()=>{if(ee&&ne){const e=x.current.getElementById(I),t=()=>{["requesting","suggesting"].includes(T.current)||(re(!1),e?.removeEventListener("focusin",t))};return e?.addEventListener("focusin",t),()=>{e?.removeEventListener("focusin",t)}}}),[ee,ne,I]);const Ee=(0,r.createElement)(r.Fragment,null,(0,r.createElement)(e,t),ne&&(0,r.createElement)(v.A,{customPlaceholder:te||null,className:D,requestingState:pe,requestingError:me,wrapperRef:p,inputRef:A,action:S,blockType:c,feature:Y,request:fe,stopSuggestion:ve,close:ke,undo:ye,tryAgain:be,lastAction:R}),(0,r.createElement)(s.BlockControls,_,(0,r.createElement)(b.A,{blockType:c,onAskAiAssistant:ae,onRequestSuggestion:ge,behavior:J})));if(K)return Ee;const we={value:{[c]:{handleAskAiAssistant:ae,handleRequestSuggestion:ge}}};return(0,r.createElement)(k.B.Provider,we,Ee)}return n=>(0,g.A)(n.name)?(0,r.createElement)(t,n):(0,r.createElement)(e,n)}),"blockEditWithAiComponents");(0,c.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support/with-ai-extension",(function(e,t){return(0,y.Y)(t)?{...e,edit:C(e.edit),supports:{...e.supports,"jetpack/ai":{assistant:!0}}}:e}),100)},4393:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var r=n(96865),a=n(47143),s=n(86087),o=n(10067),i=n.n(o),l=n(62402),c=n(64425),u=n(16597),d=n(32735);const p=i()("jetpack-ai-assistant:error"),m=({attributes:e,clientId:t,content:n,tracks:o,userPrompt:i,onSuggestionDone:m,onUnclearPrompt:h,onModeration:g,requireUpgrade:f,initialRequestingState:v,contentRef:b,blockRef:k})=>{const[y,E]=(0,s.useState)(!1),[w,_]=(0,s.useState)(""),{updateBlockAttributes:C}=(0,a.useDispatch)("core/block-editor"),{dequeueAiAssistantFeatureAsyncRequest:A,setAiAssistantFeatureRequireUpgrade:x}=(0,a.useDispatch)("wordpress-com/plans"),{snapToBottom:j,enableAutoScroll:S,disableAutoScroll:N}=(0,d.A)(k,b),R=(0,a.useSelect)((e=>e("core/editor").getEditedPostAttribute("title"))),P=(0,a.useSelect)((e=>e("core/editor").getCurrentPostId())),L=(0,s.useRef)([]),T=(0,s.useRef)(void 0),{request:B,stopSuggestion:M,handleErrorQuotaExceededError:I,requestingState:D,error:F}=(0,r.o2)({onSuggestion:e=>{C(t,{content:e?.replaceAll(c.uV,"")}),j()},onDone:e=>{const n=e.replaceAll(c.uV,""),r={role:"assistant",content:n};L.current.push(T.current,r),L.current.length>20&&L.current.splice(0,L.current.length-20),C(t,{content:n,messages:L.current}),j(),N(),m?.()},onStop:()=>{j(),N(),m?.()},onError:e=>{switch(e?.code){case r.cT:E(!1);break;case r.ud:E(!1),g?.();break;case r.mA:case r.AZ:E(!0);break;case r.Or:E(!1),x(!0);break;case r.L9:h?.()}},onAllErrors:e=>{p(e)},initialRequestingState:v,askQuestionOptions:{postId:P,feature:"ai-assistant",functions:{}}}),z=["requesting","suggesting"].includes(D),O=async(a,s={})=>{if(A(),f)return I(),void E(!1);if(s={retryRequest:!1,tone:l.US,...s},z)return;E(!1);let d=w;if(o.recordEvent("jetpack_ai_chat_completion",{post_id:P}),L.current=[...e.messages],T.current={},s.retryRequest)T.current=d[d.length-1];else{const o=e?.isLayoutBuldingModeEnable?(0,u.rJ)(t):(0,u.aB)();d=(0,c.jf)({generatedContent:n,allPostContent:o,postContentAbove:(0,u.b$)(t),currentPostTitle:R,options:s,userPrompt:s?.userPrompt||i,type:a,isGeneratingTitle:e.promptType===r.vE}),T.current=d.pop(),d=[...d,...L.current],d.push(T.current),_(d),e.promptType!==r.vE&&C(t,{promptType:a})}try{S(),await B(d)}catch(e){p(e),E(!0),N()}};return{setShowRetry:E,showRetry:y,postTitle:R,contentBefore:(0,u.b$)(t),wholeContent:(0,u.aB)(),requestingState:D,error:F,getSuggestionFromOpenAI:O,stopSuggestion:M,retryRequest:()=>O("",{retryRequest:!0})}}},92169:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(3924),a=n(85985),s=n(10617),o=n(61297);const i=()=>{const e=new URLSearchParams(window.location.search),t=(0,a.GE)();return(0,a.Sy)()&&e.has("post")?`https://wordpress.com/post/${t}/${e.get("post")}`:`https://wordpress.com/home/${t}`};function l(){const{nextTier:e,tierPlansEnabled:t}=(0,o.A)(),n=i(),l=(0,r.A)("jetpack-ai-yearly-tier-upgrade-nudge",{site:(0,a.GE)(),path:t?`jetpack_ai_yearly:-q-${e?.limit}`:"jetpack_ai_yearly",query:`redirect_to=${encodeURIComponent(n)}`}),c=(0,r.A)("jetpack-ai-upgrade-url-for-jetpack-sites",{site:(0,a.GE)(),path:"jetpack_ai_yearly"}),u=(0,a.d9)()||(0,a.Sy)()?l:c,{autosaveAndRedirect:d,isRedirecting:p}=(0,s.A)(u);return{checkoutUrl:u,autosaveAndRedirect:d,isRedirecting:p}}},61297:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(47143),a=n(58164);function s(){const{data:e,loading:t,requestsLimit:n,requestsCount:s}=(0,r.useSelect)((e=>{const{getAiAssistantFeature:t,getIsRequestingAiAssistantFeature:n}=e("wordpress-com/plans"),r=t(),{currentTier:s,usagePeriod:o,requestsCount:i,requestsLimit:l}=r,c=(0,a.Bd)(s),u=s?.limit||l,d=c===a._X?i:o?.requestsCount,p=c===a._X?l:u;return{data:r,loading:n(),requestsCount:d,requestsLimit:p}}),[]),{fetchAiAssistantFeature:o,increaseAiAssistantRequestsCount:i,dequeueAiAssistantFeatureAsyncRequest:l}=(0,r.useDispatch)("wordpress-com/plans");return{...e,requestsCount:s,requestsLimit:n,loading:t,error:null,refresh:o,increaseRequestsCount:i,dequeueAsyncRequest:l}}},44732:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(3924),a=n(85985),s=n(10617);function o(){const e=(0,a.$i)()?.jetpack?.is_my_jetpack_available,t=e?`${(0,a.$i)()?.adminUrl||""}admin.php?page=my-jetpack#/jetpack-ai`:(0,r.A)("org-ai"),{autosaveAndRedirect:n,isRedirecting:o}=(0,s.A)(t);return{productPageUrl:t,autosaveAndRedirect:n,isRedirecting:o,isMyJetpackAvailable:e}}},75956:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(90372),a=n(86087);const s=window?.Jetpack_Editor_Initial_State?.tracksUserData||null,o=parseInt(window?.Jetpack_Editor_Initial_State?.wpcomBlogId)||0,i=()=>((0,a.useEffect)((()=>{s&&r.A.initialize(s?.userid,s?.username,o?{blog_id:o}:{})}),[]),r.A)},32735:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(86087),a=n(10067);const s=n.n(a)()("jetpack-ai-assistant:use-auto-scroll"),o=(e,t,n=!1)=>{const a=(0,r.useRef)(null),o=(0,r.useRef)(null),i=(0,r.useRef)(!1),l=(0,r.useRef)(!1),c=(0,r.useRef)(!1),u=(0,r.useRef)(!1),d=(0,r.useRef)({scrollPadding:"",scrollMargin:""}),p=(0,r.useCallback)((()=>{s("enabling ignore scroll"),l.current=!0}),[]),m=(0,r.useCallback)((()=>{i.current&&c.current&&!l.current&&p()}),[p]),h=(0,r.useCallback)((()=>{i.current=!0,l.current=!1,c.current=!1,u.current=!1,a.current?.addEventListener("scroll",m),s("enabling auto scroll")}),[m]),g=(0,r.useCallback)((()=>{i.current=!1,l.current=!1,c.current=!1,u.current=!1,a.current?.removeEventListener("scroll",m),o.current?.style&&(o.current.style.scrollPadding=d.current.scrollPadding,o.current.style.scrollMargin=d.current.scrollMargin),a.current=null,s("disabling auto scroll")}),[m]),f=(0,r.useCallback)((()=>{if(!i.current||l.current)return;const r=n?e?.current:t?.current?.firstElementChild?.lastElementChild;r&&!u.current&&(c.current=!0,u.current=!0,a?.current?.removeEventListener?.("scroll",m),r?.scrollIntoView({block:"end",inline:"end"}),setTimeout((()=>{u.current=!1,a?.current?.addEventListener?.("scroll",m)}),200))}),[e,t,n,m]),v=(0,r.useCallback)((e=>{if(null==e)return null;if("BODY"===e?.nodeName)return e;if(e?.ownerDocument!==document)return e.ownerDocument;const{overflow:t}=window.getComputedStyle(e);return t.split(" ").every((e=>"auto"===e||"scroll"===e))?e:e?.parentElement?v(e?.parentElement):e}),[]);return(0,r.useEffect)((()=>{const t=v(e?.current?.parentElement);!a.current&&t&&(a.current=t,o.current=t instanceof HTMLElement?t:t.documentElement,d.current={scrollPadding:o.current.style.scrollPadding,scrollMargin:o.current.style.scrollMargin},i.current&&(o.current.style.scrollPadding="80px",o.current.style.scrollMargin="10px"))}),[e,v]),{snapToBottom:f,enableAutoScroll:h,disableAutoScroll:g}}},35317:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(85985);const a={"jetpack/contact-form":"contact-form"};function s(e){const t=a[e],{isModuleActive:n}=(0,r.q7)(t);return!t||n}},76695:(e,t,n)=>{"use strict";n.d(t,{A:()=>c,y:()=>l});var r=n(85985),a=n(47143),s=n(51609),o=n(16597),i=n(13802);function l(e){return`ai-assistant-block-${e}`}const c=()=>{const{replaceBlock:e,removeBlocks:t}=(0,a.useDispatch)("core/block-editor"),n=(0,a.useSelect)((e=>e("core/block-editor")),[]),{getSelectedBlockClientIds:c,getBlocksByClientId:u,getBlock:d,getBlockParents:p}=n,{tracks:m}=(0,r.st)();return{canTransformToAIAssistant:(0,s.useCallback)((({clientId:e,blockName:t})=>{if(!d(e))return!1;if(!i.y7.includes(t))return!1;const n=p(e);if(0===n.length)return!0;const r=d(n[n.length-1]);return!["core/list","core/list-item"].includes(r.name)}),[d,p]),transformToAIAssistant:(0,s.useCallback)((({request:n}={})=>{const r=c(),a=u(r),s=(0,o.Sb)(a),[d]=a,[p,...h]=r,g={...d?.attributes||{},content:s,preTransformAction:n?.promptType},f=(0,i.rr)(d.name,g);if(n?.promptType){m.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:n.promptType,block_type:d.name});const e={clientId:p,type:n.promptType,options:{...n.options,contentType:"generated",fromExtension:!0}};localStorage.setItem(l(f.clientId),JSON.stringify(e))}else m.recordEvent("jetpack_ai_assistant_prompt_show",{block_type:d.name});e(p,f),t(h)}),[u,c,t,e,m]),getSelectedBlockClientIds:c}}},7503:(e,t,n)=>{"use strict";n.d(t,{C:()=>d,x:()=>u});var r=n(85985),a=n(10067),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.Sy)()?(c("Simple site connected ✅"),!0):(0,r.d9)()?(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.Sy)())return!0;return!1==!(o?.userConnectionData?.currentUser?.permissions??{}).manage_options}},4e4:(e,t,n)=>{"use strict";n.d(t,{J1:()=>i,K6:()=>l,p$:()=>u});var r=n(96865);const a="title",s="content",o=null;function i(e){return{role:"jetpack-ai",context:{type:"ai-assistant-initial-prompt",for:u(e)}}}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.im:p=a;break;case r.sn:case r.A4:case r.yy:p=n;break;case r.vE:p=t;break;case r.br:case r.fD:p=e;break;case r.eJ:case r.UA:case r.Gm:p=d?e:t;break;case r.d5:p=n;break;case r.pE:p=e||t}const m=function(e,t){return!e&&t&&t.length>0?{role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:t}}:null}(o===r.pE?!!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.eJ&&e?.tone?{tone:e.tone}:{},...t===r.Gm&&e?.language?{language:e.language}:{},...t===r.pE&&n?{request:n}:{}}}function u(e,t){const n={[r.im]:"ai-assistant-summary-by-title",[r.sn]:"ai-assistant-continue-writing",[r.A4]:"ai-assistant-simplify",[r.yy]:"ai-assistant-correct-spelling",[r.vE]:"ai-assistant-generate-title",[r.br]:"ai-assistant-make-longer",[r.fD]:"ai-assistant-make-shorter",[r.eJ]:"ai-assistant-change-tone",[r.UA]:"ai-assistant-summarize",[r.Gm]:"ai-assistant-change-language",[r.pE]:"ai-assistant-user-prompt",[r.d5]:"ai-assistant-transform-list-to-table"};return"form-ai"===t?"form-ai-extension":t?`${n[e]}-${t}-extension`:n[e]}},64425:(e,t,n)=>{"use strict";n.d(t,{jf:()=>o,uV:()=>s});var r=n(96865),a=n(4e4);r.im,r.sn,r.A4,r.yy,r.vE,r.br,r.fD,r.eJ,r.UA,r.Gm,r.pE,r.z5,r.d5;const s="````";function o({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:r,options:s,type:o,userPrompt:i,isGeneratingTitle:l}){return[(0,a.J1)(o),...(0,a.K6)({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:r,options:s,type:o,userPrompt:i,isGeneratingTitle:l})]}},16597:(e,t,n)=>{"use strict";n.d(t,{Sb:()=>l,aB:()=>i,b$:()=>o,rJ:()=>c});var r=n(96865),a=n(74997),s=n(47143);function o(e){if(!e)return"";const t=(0,s.select)("core/block-editor"),n=t.getBlockIndex(e),o=t.getBlocks().slice(0,n)??[];return o?.length?(0,r.rh)({content:(0,a.serialize)(o)}):""}function i(){const e=(0,s.select)("core/block-editor").getBlocks();return e?.length?(0,r.rh)({content:(0,a.serialize)(e)}):""}function l(e){return e.filter((e=>null!=e)).map((e=>(0,a.getBlockContent)(e))).join("\n\n")}function c(e){const t=(0,s.select)("core/block-editor").getBlock(e);return t?.innerBlocks?.length?l(t.innerBlocks):""}},62514:(e,t,n)=>{"use strict";n.d(t,{w:()=>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)}},96568:(e,t,n)=>{"use strict";function r(e){const t=document.createElement("div");return t.innerHTML=e,t.innerHTML}n.d(t,{d:()=>r})},48499:(e,t,n)=>{"use strict";n.d(t,{C:()=>a});var r=n(85985);function a(e){return!0===(0,r.FB)(e).available}},13802:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>c,rr:()=>l,y7:()=>o});var r=n(96865),a=n(74997),s=n(54681);const o=["core/heading","core/paragraph","core/list"],i=[];function l(e,t){const{content:n,...o}=t;let i=n;"core/heading"===e&&t?.level&&(i=i.replace(/<(\/?)h\d([^>]*)>/g,`<$1h${t.level}$2>`));const l=(0,r.rh)({content:i}),c=[];return c.push({role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:l}}),(0,a.createBlock)(s.name,{...o,content:l,originalContent:l,messages:c,originalMessages:c})}for(const e of o)i.push({type:"block",blocks:[e],isMatch:()=>o.includes(e),transform:(t,n)=>{const r=(0,a.getSaveContent)(e,t,n);return l(e,{...t,content:r})}});const c={from:i}},36920:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(82170),a=n(27723),s=n(56333),o=n(10617);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.A)(t);if(window?.Jetpack_AIChatBlock?.jetpackSettings?.instant_search_enabled)return null;return(0,r.createElement)(s.c,{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})}},50443:(e,t,n)=>{"use strict";n.d(t,{G:()=>s,W:()=>a});var r=n(27723);const __=r.__,a=__("Ask","jetpack"),s=__("Ask a question about this site","jetpack")},51686:(e,t,n)=>{"use strict";n.d(t,{z:()=>c});var r=n(82170),a=n(94715),s=n(56427),o=n(3582),i=n(27723),l=n(50443);const __=i.__;function c({setAttributes:e,placeholder:t,showCopy:n,showFeedback:i,showSources:c}){const[u,d]=(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.TextControl,{label:__("Placeholder Text","jetpack"),className:"jetpack-ai-chat__ask-button-text",placeholder:l.G,onChange:t=>e({placeholder:t}),value:t,__nextHasNoMarginBottom:!0}))),(0,r.createElement)(a.InspectorAdvancedControls,null,(0,r.createElement)(s.TextareaControl,{label:__("Additional instructions","jetpack"),help:__("Give Jetpack AI additional instructions for answer length, format, and tone.","jetpack"),value:u,onChange:d,__nextHasNoMarginBottom:!0}),(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}),__nextHasNoMarginBottom:!0}),(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}),__nextHasNoMarginBottom:!0}),(0,r.createElement)(s.ToggleControl,{label:__("Show list of sources.","jetpack"),help:__("Show used sources at the bottom of the answer.","jetpack"),checked:c,onChange:t=>e({showSources:t}),__nextHasNoMarginBottom:!0})))}},32908:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var r=n(82170),a=n(96865),s=n(94715),o=n(56427),i=n(47143),l=n(2274),c=n(26247),u=n(36920),d=n(50443),p=n(51686);function m({attributes:e,setAttributes:t,clientId:n}){const{askButtonLabel:m=d.W,placeholder:h=d.G,showCopy:g,showFeedback:f,showSources:v}=e,b=(0,s.useBlockProps)(),k=(0,i.useSelect)((e=>e("core/block-editor").isBlockSelected(n)),[n]),y=(0,c.A)();return(0,r.createElement)("div",b,!y&&(0,r.createElement)(l.A,{block:"Jetpack AI Search"}),(0,r.createElement)(u.A,null),(0,r.createElement)("div",{className:"jetpack-ai-chat-question-wrapper"},(0,r.createElement)(o.TextControl,{className:"jetpack-ai-chat-question-input",placeholder:h,disabled:!0,__nextHasNoMarginBottom:!0}),(0,r.createElement)(s.RichText,{className:"wp-block-button__link jetpack-ai-chat-question-button",onChange:e=>t({askButtonLabel:e}),value:m,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/strikethrough"]})),k&&(0,r.createElement)(a.Yj,null),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(p.z,{askButtonLabel:m,placeholder:h,setAttributes:t,showCopy:g,showFeedback:f,showSources:v})))}},8393:(e,t,n)=>{"use strict";var r=n(94375),a=n(1629),s=n(32908),o=n(41825);(0,r.M)(a,{edit:s.A,save:o.A})},41825:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(82170),a=n(94715),s=n(50443);function o({attributes:e}){const t=a.useBlockProps.save({"data-ask-button-label":e.askButtonLabel||s.W});return(0,r.createElement)("div",t)}},97571:(e,t,n)=>{"use strict";n.d(t,{z:()=>o});var r=n(82170),a=n(56427),s=n(27723);const __=s.__;function o({attributes:e,setAttributes:t}){const{statsData:n,statsOption:s}=e,o=[{value:"views",label:__("Views","jetpack")},{value:"visitors",label:__("Visitors","jetpack")}],i=[{value:"site",label:__("My whole site","jetpack")},{value:"post",label:__("This individual post","jetpack")}];return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(a.RadioControl,{label:__("Views or visitors","jetpack"),selected:n,onChange:e=>t({statsData:e}),options:o,help:__("Views represent site visits, whereas visitors represent unique individuals.","jetpack")}),(0,r.createElement)(a.RadioControl,{label:__("Show stats data for","jetpack"),selected:s,onChange:e=>t({statsOption:e}),options:i,disabled:"visitors"===n,help:"visitors"===n?__("Visitor counts aren't available for individual posts.","jetpack"):null}),(0,r.createElement)("span",{className:"jetpack-blog-stats__delay-notice"},__("Stats are delayed for up to 5 minutes.","jetpack"))))}},20201:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(82170),a=n(37975),s=n(85985),o=n(1455),i=n.n(o),l=n(94715),c=n(47143),u=n(86087),d=n(27723),p=n(97571),m=n(51744);const __=d.__,_n=d._n;const h=function({attributes:e,className:t,setAttributes:n}){const{isLoadingModules:o,isChangingStatus:d,isModuleActive:h,changeStatus:g}=(0,s.q7)("stats"),{label:f,statsData:v,statsOption:b}=e,[k,y]=(0,u.useState)(null),[E,w]=(0,u.useState)(),[_,C]=(0,u.useState)(),A=(0,l.useBlockProps)(),x="post"===b?_:"views"===v?k:E,j=(0,c.useSelect)((e=>e("core/editor").getCurrentPostId()),[]);if((0,u.useEffect)((()=>{h&&i()({path:Number.isInteger(j)?`/wpcom/v2/blog-stats?post_id=${j}`:"/wpcom/v2/blog-stats"}).then((e=>{y(e["blog-views"]),w(e["blog-visitors"]),C(Number.isInteger(j)?e["post-views"]:"12345")}))}),[j,h]),(0,u.useEffect)((()=>{"visitors"===v&&n({statsOption:"site"})}),[v,n]),!h&&!o)return(0,r.createElement)(m.k,{className:t,changeStatus:g,isLoading:d});const S=/* Translators: Number of visitors */ _n("visitor","visitors",parseInt(x),"jetpack",0),N=/* Translators: Number of views */ -_n("hit","hits",parseInt(x),"jetpack",0);return(0,a.createElement)("div",A,(0,a.createElement)(l.InspectorControls,null,(0,a.createElement)(p.z,{attributes:e,setAttributes:n})),(0,a.createElement)("div",{className:t},o||null===k?(0,a.createElement)("p",{className:"jetpack-blog-stats__loading"},__("Loading stats…","jetpack")):(0,a.createElement)("p",null,(0,a.createElement)("span",null,(0,r.A)(x)," "),(0,a.createElement)(l.RichText,{tagName:"span",placeholder:"visitors"===v?S:N,value:f,allowedFormats:["core/bold","core/italic","core/link"],onChange:e=>n({label:e})}))))}},95184:(e,t,n)=>{"use strict";var a=n(74997),r=n(94375),s=n(35116),o=n(20201);(0,r.M)(s,{edit:o.A,save:()=>null,transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"blog-stats"===e,transform:({instance:e})=>{const t=e.raw.title?(0,a.createBlock)("core/heading",{content:e.raw.title,level:3}):null,n=(0,a.createBlock)("jetpack/blog-stats",{label:e.raw.hits});return t?[t,n]:n}}]}})},51744:(e,t,n)=>{"use strict";n.d(t,{k:()=>l});var a=n(82170),r=n(85985),s=n(56427),o=n(27723),i=n(35116);const __=o.__,l=({className:e,isLoading:t,changeStatus:n})=>{const o=(0,r.d9)()?"https://wordpress.com/support/stats/":"https://jetpack.com/support/jetpack-stats/";return(0,a.createElement)("div",{className:e},(0,a.createElement)(s.Placeholder,{icon:(0,r.sh)(i),instructions:__("You'll need to activate the Stats module to use this block. Please note that hits are only counted while this module is active.","jetpack"),label:i.title},(0,a.createElement)(s.Button,{disabled:t,isBusy:t,onClick:()=>n(!0),variant:"secondary"},t?__("Activating Stats","jetpack"):__("Activate Stats","jetpack",0)),(0,a.createElement)("div",null,(0,a.createElement)(s.ExternalLink,{href:o},__("Learn more about the Stats module.","jetpack")))))}},12169:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var a=n(82170),r=n(1455),s=n.n(r),o=n(94715),i=n(56427),l=n(47143),c=n(86087),u=n(27723),d=n(93832),p=n(13022),m=n(54919),h=n(9075);const __=u.__,_x=u._x;const g=(0,i.withNotices)((function({attributes:e,noticeOperations:t,noticeUI:n,setAttributes:r}){const g=(0,c.useRef)(!1),{answersLink:f,answersLinkText:v,gravatars:b,promptFetched:k,promptId:y,promptLabel:E,promptText:w,showLabel:_,showResponses:C,tagsAdded:A,isBloganuary:x}=e,j=(0,o.useBlockProps)({className:"jetpack-blogging-prompt"});(0,h.J)(y,A,(e=>r({tagsAdded:e})));const S=(0,l.useSelect)((e=>{const{getEntityRecord:t,hasFinishedResolution:n}=e("core"),a=t("root","site")?.language||"en_US";return n("getEntityRecord",["root","site"])?a:null}),[]);(0,c.useEffect)((()=>{if(!S||g.current||k)return;const e=()=>{r({promptFetched:!1,promptId:null,tagsAdded:!1}),g.current=!1,t.removeAllNotices()};let n="/wpcom/v3/blogging-prompts";if(y)n+="/"+encodeURIComponent(y);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:S,force_year:(new Date)?.getFullYear()}),g.current=!0,s()({path:n}).then((e=>{const t=y?e:e[0],n=(0,m.i)(S);r({answersLink:t.answered_link+`?locale=${n}`,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=>{r({promptFetched:!0});const s="rest_post_invalid_id"===n.code&&y?(o=y,(0,a.createElement)(a.Fragment,null,(0,u.sprintf)(/* translators: %d is the prompt id. */ -__("Prompt with id %d not found.","jetpack"),o)," ",(0,a.createElement)(i.Button,{variant:"link",onClick:e},__("Reset prompt","jetpack")))):(t=>(0,a.createElement)(a.Fragment,null,(0,u.sprintf)(/* translators: %s is the error message. */ -__("Error while fetching prompt: %s","jetpack"),t)," ",(0,a.createElement)(i.Button,{variant:"link",onClick:e},__("Retry","jetpack"))))(n.message);var o;t.removeAllNotices(),t.createErrorNotice(s)}))}),[g,t,k,y,r,S]);const N=e=>{r({showLabel:e})},R=e=>{r({showResponses:e})},P=(0,p.A)(["jetpack-blogging-prompt__label"],{"is-bloganuary-icon":x});return(0,a.createElement)("div",j,n,(0,a.createElement)(a.Fragment,null,(0,a.createElement)(o.InspectorControls,null,(0,a.createElement)(i.PanelBody,{title:_x("Settings","title of block settings sidebar section","jetpack")},(0,a.createElement)(i.ToggleControl,{label:__("Show prompt label","jetpack"),checked:_,onChange:N,__nextHasNoMarginBottom:!0}),(0,a.createElement)(i.ToggleControl,{label:__("Show other responses","jetpack"),checked:C,onChange:R,__nextHasNoMarginBottom:!0})))),k?(0,a.createElement)(a.Fragment,null,_&&(0,a.createElement)("div",{className:P},E),(0,a.createElement)("div",{className:"jetpack-blogging-prompt__text"},w),C&&y&&(0,a.createElement)("div",{className:"jetpack-blogging-prompt__answers"},b&&b.slice(0,3).map((({url:e})=>e&&(0,a.createElement)("img",{className:"jetpack-blogging-prompt__answers-gravatar",src:e,key:e}))),(0,a.createElement)("a",{className:"jetpack-blogging-prompt__answers-link",href:f,target:"_blank",rel:"external noreferrer noopener"},v))):(0,a.createElement)("div",{className:"jetpack-blogging-prompt__spinner"},(0,a.createElement)(i.Spinner,null)))}))},87888:(e,t,n)=>{"use strict";var a=n(74997),r=n(47143),s=n(27723),o=n(94375),i=n(27734),l=n(32442),c=n(12169),u=n(63757),d=n(94530),p=n(86239),m=n(57028);const __=s.__;(0,o.M)(l,{edit:c.A,save:m.A,example:{attributes:{answersLink:"https://wordpress.com/tag/dailyprompt",answersLinkText:__("View all responses","jetpack"),gravatars:[{url:u},{url:d},{url:p}],promptLabel:__("Daily writing prompt","jetpack"),promptText:__("What's your favorite place to visit?","jetpack"),promptFetched:!0,promptId:1234,showResponses:!0,showLabel:!0,tagsAdded:!0,isBloganuary:!1}}}),function(){const e=new URL(document.location.href);if(!e.pathname.endsWith("/wp-admin/post-new.php"))return;const t=e.searchParams.get("answer_prompt")??"0",n=parseInt(t);n&&async function(e){await(0,i.O)();const{insertBlocks:t}=(0,r.dispatch)("core/block-editor");t([(0,a.createBlock)(`jetpack/${name}`,{promptFetched:!1,promptId:e,tagsAdded:!0}),(0,a.createBlock)("core/paragraph")],0,void 0,!1)}(n)}()},57028:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(82170),r=n(94715),s=n(13022);const o=function({attributes:e}){const{answersLink:t,answersLinkText:n,gravatars:o,promptId:i,promptLabel:l,promptText:c,showLabel:u,showResponses:d,isBloganuary:p}=e,m=r.useBlockProps.save({className:"jetpack-blogging-prompt"}),h=(0,s.A)(["jetpack-blogging-prompt__label"],{"is-bloganuary-icon":p});return(0,a.createElement)("div",m,u&&(0,a.createElement)("div",{className:h},l),(0,a.createElement)("div",{className:"jetpack-blogging-prompt__text"},c),d&&i&&(0,a.createElement)("div",{className:"jetpack-blogging-prompt__answers"},o.map((({url:e})=>e&&(0,a.createElement)("img",{className:"jetpack-blogging-prompt__answers-gravatar","aria-hidden":"true",src:e,key:e}))),(0,a.createElement)("a",{className:"jetpack-blogging-prompt__answers-link",href:t,target:"_blank",rel:"external noreferrer noopener"},n)))}},9075:(e,t,n)=>{"use strict";n.d(t,{J:()=>c});var a=n(1455),r=n.n(a),s=n(47143),o=n(86087),i=n(89877);function l(e){const t=(0,i.escapeHTML)(e);return r()({path:"/wp/v2/tags",method:"POST",data:{name:t}}).catch((t=>"term_exists"!==t.code?Promise.reject(t):Promise.resolve({id:t.data.term_id,name:e})))}function c(e,t,n){const{editPost:a}=(0,s.useDispatch)("core/editor"),r=(0,o.useRef)("not-started"),{postType:i,postsSupportTags:c,tags:u,tagIds:d,tagsHaveResolved:p}=(0,s.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor"),{getEntityRecords:n,getPostType:a,hasFinishedResolution:r}=e("core"),s=t("tags"),o={_fields:"id,name",context:"view",include:s?.join(","),per_page:-1};return{postType:t("type"),postsSupportTags:a("post")?.taxonomies.includes("post_tag"),tagIds:s||[],tags:s&&s.length?n("taxonomy","post_tag",o):[],tagsHaveResolved:!s||!s.length||r("getEntityRecords",["taxonomy","post_tag",o])}}),[]);(0,o.useEffect)((()=>{"post"===i&&c&&!t&&p&&e&&Array.isArray(u)&&("not-started"===r.current&&(u.some((e=>e.name&&"dailyprompt"===e.name))&&u.some((t=>t.name&&t.name===`dailyprompt-${e}`))?r.current="fulfilled":(r.current="pending",Promise.all([l("dailyprompt"),l(`dailyprompt-${e}`)]).then((e=>{const t=e.map((e=>e.id));a({tags:[...d,...t]}),r.current="fulfilled"})).catch((e=>{console.error(e),r.current="rejected"})))),"fulfilled"===r.current&&n(!0))}),[a,c,i,e,r,n,u,d,t,p])}},53808:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(82170),r=n(94715),s=n(56427),o=n(27723);const __=o.__;const i=function({className:e,attributes:t,setAttributes:n}){const{icon:o,name:i,description:l}=t,c=(0,r.useBlockProps)({className:e});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("hr",{className:"wp-block-separator jetpack-blogroll-item-divider"}),(0,a.createElement)("div",c,(0,a.createElement)(r.MediaUpload,{multiple:!1,onSelect:e=>{n({icon:e.url})},render:({open:e})=>(0,a.createElement)(s.Button,{variant:"link",onClick:e,style:{padding:0}},(0,a.createElement)("figure",null,(0,a.createElement)("img",{className:"blogroll-item-image",onError:e=>{e.target.parentNode.classList.add("empty-site-icon")},src:o,alt:i})))}),(0,a.createElement)("div",{className:"jetpack-blogroll-item-content"},(0,a.createElement)("a",null,(0,a.createElement)(r.RichText,{className:"jetpack-blogroll-item-title",value:i,tagName:"p",allowedFormats:["core/italic"],onChange:e=>{n({name:e})},placeholder:__("Enter site title","jetpack")})),(0,a.createElement)(r.RichText,{className:"jetpack-blogroll-item-description",value:l,onChange:e=>{n({description:e})},placeholder:__("Enter site description","jetpack")}))))}},3686:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(82170),r=n(56427);const s=(0,a.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},(0,a.createElement)(r.Path,{d:"M12 12.75H21V11.25H12V12.75Z"}),(0,a.createElement)(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M3 12C3 10.3431 4.34315 9 6 9C7.65685 9 9 10.3431 9 12C9 13.6569 7.65685 15 6 15C4.34315 15 3 13.6569 3 12ZM3.77743 10.8857C4.08602 10.2714 4.64181 9.80266 5.31427 9.61008C5.15499 9.79493 5.01798 10.0132 4.90612 10.2532C4.81521 10.4483 4.73949 10.6605 4.68112 10.8857H3.77743ZM3.58718 11.4C3.53956 11.5922 3.51429 11.7931 3.51429 12C3.51429 12.2069 3.53956 12.4078 3.58718 12.6H4.58166C4.55616 12.4057 4.54286 12.205 4.54286 12C4.54286 11.7949 4.55616 11.5942 4.58166 11.4H3.58718ZM5.10094 11.4C5.0724 11.5917 5.05714 11.7926 5.05714 12C5.05714 12.2074 5.0724 12.4083 5.10094 12.6H6.89907C6.92761 12.4083 6.94286 12.2074 6.94286 12C6.94286 11.7926 6.92761 11.5917 6.89906 11.4H5.10094ZM7.41834 11.4C7.44384 11.5942 7.45714 11.7949 7.45714 12C7.45714 12.2051 7.44384 12.4058 7.41835 12.6H8.41282C8.46044 12.4078 8.48571 12.2069 8.48571 12C8.48571 11.7931 8.46044 11.5922 8.41282 11.4H7.41834ZM8.22257 10.8857H7.31888C7.26051 10.6605 7.18479 10.4483 7.09388 10.2532C6.98202 10.0132 6.845 9.79493 6.68571 9.61007C7.35817 9.80265 7.91398 10.2714 8.22257 10.8857ZM6.78494 10.8857H5.21506C5.25946 10.7382 5.31227 10.5992 5.37226 10.4705C5.5421 10.1061 5.76275 9.83732 5.99999 9.67974C6.23724 9.83732 6.45789 10.1061 6.62775 10.4705C6.68773 10.5992 6.74054 10.7382 6.78494 10.8857ZM3.77743 13.1143H4.68112C4.74269 13.3519 4.82356 13.5749 4.92121 13.7787C5.0301 14.0059 5.16199 14.2132 5.31431 14.3899C4.64184 14.1974 4.08603 13.7286 3.77743 13.1143ZM6.78495 13.1143H5.21506C5.26258 13.2722 5.31973 13.4203 5.38498 13.5564C5.5534 13.9078 5.76894 14.1668 6.00003 14.3203C6.23726 14.1627 6.45791 13.8939 6.62775 13.5295C6.68773 13.4008 6.74054 13.2618 6.78495 13.1143ZM7.09388 13.7468C7.18479 13.5517 7.26052 13.3395 7.31889 13.1143H8.22257C7.91398 13.7286 7.35819 14.1973 6.68574 14.3899C6.84501 14.2051 6.98203 13.9868 7.09388 13.7468Z",strokeWidth:"0.1"}))},77782:(e,t,n)=>{"use strict";n.d(t,{UU:()=>u,W0:()=>d});var a=n(82170),r=n(94715),s=n(27723),o=n(88659),i=n(84954),l=n(53808),c=n(3686);const __=s.__,u="blogroll-item",d={title:__("Blogroll Item","jetpack"),description:__("Blogroll Item","jetpack"),icon:{src:c.A,foreground:(0,o.V)()},category:"grow",parent:["jetpack/blogroll"],keywords:[],supports:{align:!1,alignWide:!0,anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0,inserter:!1},edit:l.A,attributes:{id:{type:"string"},name:{type:"string"},icon:{type:"string",default:i},is_non_wpcom_site:{type:"boolean",default:!1},url:{type:"string"},description:{type:"string"}},save:()=>(0,a.createElement)(r.InnerBlocks.Content,null),example:{attributes:{}}}},40536:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(82170),r=n(3582),s=n(27723);const __=s.__;function o({results:e,onSelect:t,searchInput:n,isLoading:o}){const[i]=(0,r.useEntityProp)("root","site","Blogroll Recommendations");if(o)return(0,a.createElement)("div",{className:"jetpack-blogroll__appender-results"},(0,a.createElement)("div",{role:"status"},__("Loading…","jetpack")));const l=!n?.trim();return(0,a.createElement)("div",{className:"jetpack-blogroll__appender-results"},l&&(0,a.createElement)("div",{"aria-autocomplete":"list",className:"jetpack-blogroll__appender-result-list-header-text"},__("Suggestions","jetpack")),0===e.length&&!l&&(0,a.createElement)("div",{role:"status",className:"jetpack-blogroll__appender-no-results-message"},(0,a.createElement)("span",{className:"jetpack-blogroll__appender-no-results-message-main-text"},__("No results","jetpack")),(0,a.createElement)("span",{className:"jetpack-blogroll__appender-no-results-message-secondary-text"},(0,s.sprintf)(/* translators: %s is search query. */ -__("No sites found for %s.","jetpack"),n))),e.length>0&&(0,a.createElement)("ul",{"aria-live":"polite"},e.map((e=>{const n=i.some((t=>t?.id===e?.blog_id));return(0,a.createElement)("li",{key:e.blog_id,className:"jetpack-blogroll__appender-result-container"},(0,a.createElement)("button",{className:"jetpack-blogroll__appender-result-title",disabled:n,onClick:()=>t(e)},(0,a.createElement)("div",{className:"jetpack-blogroll__appender-result-image"},e.site_icon&&(0,a.createElement)("img",{src:e.site_icon,alt:e.name,onError:e=>{e.target.parentNode.classList.add("empty-site-icon")}})),(0,a.createElement)("div",{className:"jetpack-blogroll__appender-result-text"},(0,a.createElement)("span",{className:"jetpack-blogroll__appender-result-title"},e.name),(0,a.createElement)("span",{className:"jetpack-blogroll__appender-result-description"},e.description))))}))))}},17454:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(82170),r=n(56427),s=n(27723);const __=s.__;function o({value:e,onChange:t}){return(0,a.createElement)("div",{className:"jetpack-blogroll__appender-search"},(0,a.createElement)(r.TextControl,{__nextHasNoMarginBottom:!0,label:__("Search for sites to add","jetpack"),hideLabelFromVision:!0,placeholder:__("Search…","jetpack"),value:e,onChange:e=>t(e)}))}},37127:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var a=n(82170),r=n(56427),s=n(47143),o=n(86087),i=n(27723),l=n(45459),c=n(92507),u=n(85101),d=n(40536),p=n(17454);const __=i.__;function m({isLoading:e,subscriptions:t,clientId:n}){const[i,m]=(0,o.useState)(!1),[h,g]=(0,o.useState)(),[f,v]=(0,o.useState)(""),{insertBlock:b}=(0,s.dispatch)("core/block-editor"),{siteDetails:k,isLoading:y}=(0,c.A)({siteURL:f,subscriptions:t,enabled:f});return e?(0,a.createElement)(r.Spinner,{className:"jetpack-blogroll__appender-spinner"}):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(r.Button,{className:"block-editor-button-blogroll-block-appender",ref:g,icon:l.A,label:__("Add Blogroll Item","jetpack"),onClick:()=>{m((e=>!e))}}),i&&(0,a.createElement)(r.Popover,{anchor:h,className:"jetpack-blogroll__appender"},(0,a.createElement)(p.A,{value:f,onChange:v}),(0,a.createElement)(d.A,{results:k,onSelect:e=>{b((0,u.FN)(e),void 0,n),m(!1)},searchInput:f,isLoading:y})))}},63166:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var a=n(82170),r=n(94715),s=n(74997),o=n(56427),i=n(47143),l=n(86087),c=n(27723),u=n(13022),d=n(2274),p=n(26247),m=n(37127),h=n(32130),g=n(46542),f=n(25688),v=n(85101);const __=c.__;const b=function({className:e,attributes:t,setAttributes:n,clientId:c}){const{show_avatar:b,show_description:k,open_links_new_window:y,ignore_user_blogs:E,load_placeholders:w}=t,_=(0,p.A)(),{isLoading:C,recommendations:A,errorMessage:x}=(0,h.A)(w),{isLoading:j,subscriptions:S,errorMessage:N}=(0,f.A)({ignore_user_blogs:E});(0,g.b)({clientId:c});const{replaceInnerBlocks:R}=(0,i.dispatch)("core/block-editor");(0,l.useEffect)((()=>{if(w&&A.length){n({load_placeholders:!1});const e=[(0,s.createBlock)("core/heading",{content:__("Blogroll","jetpack"),level:3}),...A.map(v.dy)];R(c,e)}}),[A,w,n,c,R]);const P=(0,r.useBlockProps)({className:(0,u.A)(e,{"hide-avatar":!b,"hide-description":!k})});if(!_)return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.A,{block:"Blogroll",explanation:__("Connect your WordPress.com account to use the Blogroll block.","jetpack")}));const L=x||N;return(0,a.createElement)("div",P,(0,a.createElement)(r.InnerBlocks,{template:[["core/heading",{content:__("Blogroll","jetpack"),level:3}]],allowedBlocks:["jetpack/blogroll-item"],renderAppender:()=>!C&&(0,a.createElement)(m.A,{isLoading:j,subscriptions:S,clientId:c})}),L&&(0,a.createElement)(o.Notice,{status:"error",isDismissible:!1},(0,a.createElement)("p",null,L)),w&&C&&(0,a.createElement)(o.FlexBlock,{style:{padding:"30px",textAlign:"center"}},(0,a.createElement)(o.Spinner,null)),(0,a.createElement)(r.InspectorControls,null,(0,a.createElement)(o.PanelBody,{title:__("Settings","jetpack")},(0,a.createElement)(o.ToggleControl,{label:__("Show avatar","jetpack"),checked:!!b,onChange:()=>n({show_avatar:!b}),__nextHasNoMarginBottom:!0}),(0,a.createElement)(o.ToggleControl,{label:__("Show description","jetpack"),checked:!!k,onChange:()=>n({show_description:!k}),__nextHasNoMarginBottom:!0}),(0,a.createElement)(o.ToggleControl,{label:__("Open links in a new window","jetpack"),checked:!!y,onChange:()=>n({open_links_new_window:!y}),__nextHasNoMarginBottom:!0}),(0,a.createElement)(o.ToggleControl,{label:__("Hide my own sites","jetpack"),checked:!!E,onChange:()=>n({ignore_user_blogs:!E}),__nextHasNoMarginBottom:!0}))))}},22475:(e,t,n)=>{"use strict";var a=n(94375),r=n(52829),s=n(77782),o=n(63166),i=n(36219);(0,a.M)(r,{edit:o.A,save:i.A},[{name:s.UU,settings:s.W0}])},36219:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(82170),r=n(94715),s=n(13022);const o=function({attributes:{show_avatar:e,show_description:t},className:n}){const o=r.useBlockProps.save({className:(0,s.A)(n,{"hide-avatar":!e,"hide-description":!t})});return(0,a.createElement)("div",o,(0,a.createElement)(r.InnerBlocks.Content,null))}},13818:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var a=n(86087),r=n(85101);function s(e,t=!0){const[n,s]=(0,a.useState)(null),[o,i]=(0,a.useState)(null),[l,c]=(0,a.useState)(!1),u=function(e,t=100){const[n,r]=(0,a.useState)(e);return(0,a.useEffect)((()=>{const n=setTimeout((()=>{r(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),n}((0,r.l$)(e),500);return(0,a.useEffect)((()=>{if(c(Boolean(t&&u)),t&&u){const e=new AbortController;return fetch(`https://public-api.wordpress.com/rest/v1.1/sites/${encodeURIComponent(u)}?force=wpcom`,{cache:"force-cache",signal:e.signal}).then((e=>{if(200===e.status)return e.json();e.status})).then((e=>{s(e),c(!1)})).catch((e=>{"AbortError"!==e.name&&i(e)})),()=>e.abort()}}),[u,t]),{response:n,error:o,isLoading:l}}},92507:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(13818),r=n(85101);function s({siteURL:e,subscriptions:t,enabled:n=!1}){const s=(0,r.l$)(e),{response:o,isLoading:i}=(0,a.Z)(s,Boolean(n)),l=[...o?[{blog_id:o?.ID.toString(),description:o?.description,URL:o?.URL,site_icon:(0,r.ZE)(o?.logo?.url),name:o?.name}]:[],...t].filter((t=>`${t.name}${t.URL}`.match(new RegExp(e,"i"))));return 0===l.length&&s&&l.unshift({blog_id:s,description:"",URL:s,site_icon:(0,r.ZE)(null),name:s,is_non_wpcom_site:!0}),{isLoading:i,siteDetails:l}}},32130:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(1455),r=n.n(a),s=n(86087),o=n(27723);const __=o.__;function i(e=!1){const[t,n]=(0,s.useState)(!1),[a,o]=(0,s.useState)(null),[i,l]=(0,s.useState)([]),c=(0,s.useRef)(void 0);return(0,s.useEffect)((()=>{e?(n(!0),o(null),c.current&&c.current.abort(),c.current="undefined"==typeof AbortController?void 0:new AbortController,r()({path:"/wpcom/v2/following/recommendations",global:!0,method:"GET",signal:c.current?.signal}).then((e=>{e.length||o(__("No subscriptions found. You need to follow some sites in order to see results.","jetpack")),l(e)})).catch((e=>{"AbortError"!==e.name&&(e.message?o(e.message):o(__("Whoops, we have encountered an error. Please try again later.","jetpack")))})).finally((()=>{c.current=null,n(!1)}))):n(!1)}),[e]),{isLoading:t,errorMessage:a,recommendations:i}}},46542:(e,t,n)=>{"use strict";n.d(t,{b:()=>i});var a=n(3582),r=n(47143),s=n(86087),o=n(85101);const i=({clientId:e})=>{const[t,n]=(0,s.useState)(!1),{insertBlocks:i}=(0,r.useDispatch)("core/block-editor"),[l,c]=(0,a.useEntityProp)("root","site","Blogroll Recommendations"),u=(0,r.useSelect)((t=>t("core/block-editor").getBlock(e).innerBlocks.filter((({name:e})=>"jetpack/blogroll-item"===e)).map((({attributes:e})=>e))),[e]);(0,s.useEffect)((()=>{if(!t&&l){const t=l.filter((e=>!u.some((t=>t.id===e.id))));if(t.length){const n=t.map(o.dy);i(n,void 0,e)}n(!0)}}),[e,l,u,t,i]),(0,s.useEffect)((()=>{void 0!==l&&c(u)}),[u])}},25688:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var a=n(1455),r=n.n(a),s=n(86087),o=n(27723),i=n(93832),l=n(85101);const __=o.__;function c({ignore_user_blogs:e}){const[t,n]=(0,s.useState)(!1),[a,o]=(0,s.useState)(null),[c,u]=(0,s.useState)([]),d=(0,s.useRef)(void 0);return(0,s.useEffect)((()=>{n(!0),o(null),d.current&&d.current.abort(),d.current="undefined"==typeof AbortController?void 0:new AbortController,r()({path:(0,i.addQueryArgs)("/wpcom/v2/following/mine",{ignore_user_blogs:e}),global:!0,method:"GET",signal:d.current?.signal}).then((e=>{e.length||o(__("No subscriptions found. You need to follow some sites in order to see results.","jetpack")),e=e.map((e=>(e.site_icon=(0,l.ZE)(e.site_icon),e))),u(e)})).catch((e=>{"AbortError"!==e.name&&(e.message?o(e.message):o(__("Whoops, we have encountered an error. Please try again later.","jetpack")))})).finally((()=>{d.current=null,n(!1)}))}),[e]),{isLoading:t,errorMessage:a,subscriptions:c}}},85101:(e,t,n)=>{"use strict";n.d(t,{FN:()=>o,ZE:()=>l,dy:()=>s,l$:()=>i});var a=n(74997),r=n(84954);function s(e){let t;try{t=new URL(e?.url)?.host.replace(/^www\./,"")}catch{t=e?.URL}return(0,a.createBlock)("jetpack/blogroll-item",{...e,...!e.name&&{name:t}})}function o(e){const{blog_id:t,site_icon:n,URL:a,name:r,description:o,is_non_wpcom_site:i}=e;return s({id:t,icon:n,url:a,name:r,description:o,is_non_wpcom_site:i})}function i(e){if(!e)return null;const t=new RegExp("^([a-zA-Z]+:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])?)\\.)+[a-z]{2,})","i");try{return new URL(e)?.host}catch{return e.match(t)?.[2]??null}}function l(e){return e||r}},60487:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var a=n(82170),r=n(56427),s=n(86087),o=n(27723),i=n(13022),l=n(66087);const __=o.__,c="09:00",u="17:00";class d extends s.Component{renderInterval=(e,t)=>{const{day:n}=this.props,{opening:o,closing:l}=e;return(0,a.createElement)(s.Fragment,{key:t},(0,a.createElement)("div",{className:"business-hours__row"},(0,a.createElement)("div",{className:(0,i.A)(n.name,"business-hours__day")},0===t&&this.renderDayToggle()),(0,a.createElement)("div",{className:(0,i.A)(n.name,"business-hours__hours")},(0,a.createElement)(r.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,type:"time",label:__("Opening","jetpack"),value:o,className:"business-hours__open",placeholder:c,onChange:e=>{this.setHour(e,"opening",t)}}),(0,a.createElement)(r.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,type:"time",label:__("Closing","jetpack"),value:l,className:"business-hours__close",placeholder:u,onChange:e=>{this.setHour(e,"closing",t)}})),(0,a.createElement)("div",{className:"business-hours__remove"},n.hours.length>1&&(0,a.createElement)(r.Button,{isSmall:!0,variant:"link",icon:"trash",label:__("Remove Hours","jetpack"),onClick:()=>{this.removeInterval(t)}}))),t===n.hours.length-1&&(0,a.createElement)("div",{className:"business-hours__row business-hours-row__add"},(0,a.createElement)("div",{className:(0,i.A)(n.name,"business-hours__day")}," "),(0,a.createElement)("div",{className:(0,i.A)(n.name,"business-hours__hours")},(0,a.createElement)(r.Button,{variant:"link",label:__("Add Hours","jetpack"),onClick:this.addInterval},__("Add Hours","jetpack"))),(0,a.createElement)("div",{className:"business-hours__remove"}," ")))};setHour=(e,t,n)=>{const{day:a,attributes:r,setAttributes:s}=this.props,{days:o}=r;s({days:o.map((r=>r.name===a.name?{...r,hours:r.hours.map(((a,r)=>r===n?{...a,[t]:e}:a))}:r))})};toggleClosed=e=>{const{day:t,attributes:n,setAttributes:a}=this.props,{days:r}=n;a({days:r.map((n=>{if(n.name===t.name){const t=e?[{opening:c,closing:u}]:[];return{...n,hours:t}}return n}))})};addInterval=()=>{const{day:e,attributes:t,setAttributes:n}=this.props,{days:a}=t;e.hours.push({opening:"",closing:""}),n({days:a.map((t=>t.name===e.name?{...t,hours:e.hours}:t))})};removeInterval=e=>{const{day:t,attributes:n,setAttributes:a}=this.props,{days:r}=n;a({days:r.map((n=>t.name===n.name?{...n,hours:n.hours.filter(((t,n)=>e!==n))}:n))})};isClosed(){const{day:e}=this.props;return(0,l.isEmpty)(e.hours)}renderDayToggle(){const{day:e,localization:t}=this.props;return(0,a.createElement)(s.Fragment,null,(0,a.createElement)("span",{className:"business-hours__day-name"},t.days[e.name]),(0,a.createElement)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:this.isClosed()?__("Closed","jetpack"):__("Open","jetpack"),checked:!this.isClosed(),onChange:this.toggleClosed}))}renderClosed(){const{day:e}=this.props;return(0,a.createElement)("div",{className:"business-hours__row business-hours-row__closed"},(0,a.createElement)("div",{className:(0,i.A)(e.name,"business-hours__day")},this.renderDayToggle()),(0,a.createElement)("div",{className:(0,i.A)(e.name,"closed","business-hours__hours")}," "),(0,a.createElement)("div",{className:"business-hours__remove"}," "))}render(){const{day:e}=this.props;return this.isClosed()?this.renderClosed():e.hours.map(this.renderInterval)}}const p=d},39943:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var a=n(82170),r=n(86087),s=n(27723),o=n(66087);const _x=s._x,i="undefined"!=typeof window&&window.navigator?.language||"en",l=Intl?.DateTimeFormat?new Intl.DateTimeFormat(i,{hour:"numeric",minute:"numeric",hour12:!0}):null;class c extends r.Component{formatTime(e){const[t,n]=e.split(":");if(!t||!n)return!1;const a=new Date;return a.setHours(t),a.setMinutes(n),l?l.format(a):e}renderInterval=(e,t)=>{const{day:n}=this.props,r=n.hours;return(0,a.createElement)("span",{key:t},(0,s.sprintf)("%1$s - %2$s",this.formatTime(e.opening),this.formatTime(e.closing)),r.length>1+t&&(0,a.createElement)("span",null,", "))};render(){const{day:e,localization:t}=this.props,n=e.hours.filter((e=>this.formatTime(e.opening)&&this.formatTime(e.closing)));return(0,a.createElement)("div",{className:"jetpack-business-hours__item"},(0,a.createElement)("dt",{className:e.name},t.days[e.name]),(0,a.createElement)("dd",null,(0,o.isEmpty)(n)?_x("Closed","business is closed on a full day","jetpack"):n.map(this.renderInterval),(0,a.createElement)("br",null)))}}const u=c},39155:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});var a=n(96072),r=n.n(a),s=n(82170),o=n(85985),i=n(1455),l=n.n(i),c=n(94715),u=n(56427),d=n(38443),p=n(86087),m=n(27723),h=n(9050),g=n(60487),f=n(39943);const __=m.__,v=(0,o.sh)(h),b={days:{Sun:__("Sunday","jetpack"),Mon:__("Monday","jetpack"),Tue:__("Tuesday","jetpack"),Wed:__("Wednesday","jetpack"),Thu:__("Thursday","jetpack"),Fri:__("Friday","jetpack"),Sat:__("Saturday","jetpack")},startOfWeek:0},k=e=>{const{attributes:t,isSelected:n}=e,a=(0,c.useBlockProps)(),[o,i]=(0,p.useState)(b),[m,h]=(0,p.useState)(!1),{days:k}=t,{startOfWeek:y}=o,E=k.concat(k.slice(0,y)).slice(y);let w;if((0,p.useEffect)((()=>{l()({path:"/wpcom/v2/business-hours/localized-week"}).then((e=>{i(e),h(!0)}),(()=>{i(b),h(!0)}))}),[]),m)if(n)w=(0,s.createElement)("div",{className:"is-edit"},E.map(((t,n)=>(0,s.createElement)(g.A,r()({key:n,day:t,localization:o},e)))));else{const e=(0,d.getSettings)(),{formats:{time:t}}=e;w=(0,s.createElement)("dl",{className:"jetpack-business-hours"},E.map(((e,n)=>(0,s.createElement)(f.A,{key:n,day:e,localization:o,timeFormat:t}))))}else w=(0,s.createElement)(u.Placeholder,{icon:v,label:__("Loading business hours","jetpack")});return(0,s.createElement)("div",a,w)}},71410:(e,t,n)=>{"use strict";var a=n(82170),r=n(94375),s=n(9050),o=n(39155);(0,r.M)(s,{edit:e=>(0,a.createElement)(o.A,e),save:()=>null})},7325:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(56427),r=n(66087);const s=(0,a.withFallbackStyles)(((e,t)=>{const{backgroundColor:n,textColor:a}=t,s=(0,r.get)(n,"color"),o=!(0,r.get)(a,"color")&&e?e.querySelector('[contenteditable="true"]'):null;return{fallbackBackgroundColor:s||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:a||!o?void 0:getComputedStyle(o).color}}))},28310:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(20710);const r={element:{type:"string",enum:["a","button","input"]},saveInPostContent:{type:"boolean",default:!1},uniqueId:{type:"string"},passthroughAttributes:{type:"object"},text:{type:"string"},placeholder:{type:"string"},url:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string",validator:a.A},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:a.A},gradient:{type:"string"},customGradient:{type:"string"},borderRadius:{type:"number"},width:{type:"string"}}},12365:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(82170),r=n(56427),s=n(86087),o=n(27723),i=n(8746);const __=o.__;function l({borderRadius:e="",setAttributes:t}){const n=(0,s.useCallback)((e=>t({borderRadius:e})),[t]);return(0,a.createElement)(r.PanelBody,{title:__("Border Settings","jetpack")},(0,a.createElement)(r.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,allowReset:!0,initialPosition:i.hc,label:__("Border radius","jetpack"),max:i.Bs,min:i.rG,onChange:n,value:e}))}},10179:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(82170),r=n(94715),s=n(27723);const __=s.__;function o({isGradientAvailable:e,backgroundColor:t,fallbackBackgroundColor:n,fallbackTextColor:s,gradientValue:o,setBackgroundColor:i,setGradient:l,setTextColor:c,textColor:u}){const d=(0,a.createElement)(r.ContrastChecker,{backgroundColor:t.color,fallbackBackgroundColor:n,fallbackTextColor:s,isLargeText:!1,textColor:u.color});return e?(0,a.createElement)(r.__experimentalPanelColorGradientSettings,{settings:[{colorValue:u.color,label:__("Text Color","jetpack"),onColorChange:c},{colorValue:t.color,gradientValue:o,label:__("Background","jetpack"),onColorChange:i,onGradientChange:l}],title:__("Background & Text Color","jetpack")},d):(0,a.createElement)(r.PanelColorSettings,{colorSettings:[{value:u.color,onChange:c,label:__("Text Color","jetpack")},{value:t.color,onChange:i,label:__("Background","jetpack")}],title:__("Background & Text Color","jetpack")},d)}},8746:(e,t,n)=>{"use strict";n.d(t,{Bs:()=>o,Uc:()=>r,hc:()=>s,rG:()=>i});var a=n(94715);const r=!!a.__experimentalUseGradient,s=5,o=50,i=0},2761:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(82170),r=n(47143),s=n(38062),o=n(12365),i=n(10179);function l({attributes:e,backgroundColor:t,clientId:n,context:l,fallbackBackgroundColor:c,fallbackTextColor:u,setAttributes:d,setBackgroundColor:p,setTextColor:m,textColor:h,gradientValue:g,setGradient:f,isGradientAvailable:v}){const{align:b,borderRadius:k}=e,y="jetpack/parentBlockWidth"in l,E=y?l["jetpack/parentBlockWidth"]:e.width,w=(0,r.useSelect)((e=>{const{getBlock:t,getBlockRootClientId:a}=e("core/block-editor");return t(a(n))})),{updateBlockAttributes:_}=(0,r.useDispatch)("core/block-editor");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(i.A,{backgroundColor:t,fallbackBackgroundColor:c,fallbackTextColor:u,gradientValue:g,setBackgroundColor:p,setGradient:f,setTextColor:m,textColor:h,isGradientAvailable:v}),(0,a.createElement)(o.A,{borderRadius:k,setAttributes:d}),(0,a.createElement)(s.D,{align:b,width:E,onChange:e=>{y?_(w.clientId,{width:e}):d({width:e})}}))}},55903:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var a=n(96072),r=n.n(a),s=n(82170),o=n(94715),i=n(29491),l=n(27723),c=n(13022),u=n(89303),d=n(7325),p=n(8746),m=n(2761),h=n(81177);const __=l.__;const g=(0,i.compose)((0,o.withColors)({backgroundColor:"background-color"},{textColor:"color"}),d.A)((function(e){const{attributes:t,backgroundColor:n,className:a,clientId:i,context:l,setAttributes:d,textColor:g}=e,{borderRadius:f,element:v,placeholder:b,text:k,width:y,fontSize:E}=t,w="jetpack/parentBlockWidth"in l;(0,h.A)({attributes:t,clientId:i,setAttributes:d}),(0,u.A)({attributes:t,disableEffects:w,setAttributes:d});const{gradientClass:_,gradientValue:C,setGradient:A}=p.Uc?(0,o.__experimentalUseGradient)({gradientAttribute:"gradient",customGradientAttribute:"customGradient"}):{},x=(0,o.useBlockProps)({className:(0,c.A)("wp-block-button",a)}),j=(0,c.A)("wp-block-button__link",{"has-background":n.color||C,[n.class]:!C&&n.class,"has-text-color":g.color,[g.class]:g.class,[_]:_,"no-border-radius":0===f,"has-custom-width":!!y,[`has-${E}-font-size`]:!!E,"has-custom-font-size":!!E}),S={...!n.color&&C?{background:C}:{backgroundColor:n.color},fontSize:t.style?.typography?.fontSize,color:g.color,borderRadius:f?f+"px":void 0,width:y};return(0,s.createElement)("div",x,(0,s.createElement)(o.RichText,{allowedFormats:"input"===v?[]:void 0,className:j,disableLineBreaks:"input"===v,onChange:e=>d({text:e}),placeholder:b||__("Add text…","jetpack"),style:S,value:k,withoutInteractiveFormatting:!0}),(0,s.createElement)(o.InspectorControls,null,(0,s.createElement)(m.A,r()({gradientValue:C,setGradient:A,isGradientAvailable:p.Uc},e))))}))},45878:(e,t,n)=>{"use strict";var a=n(94375),r=n(5383);(0,a.A)(r.U,r.W)},36270:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(82170),r=n(56427);const s=(0,a.createElement)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(r.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"}))},5383:(e,t,n)=>{"use strict";n.d(t,{U:()=>c,W:()=>u});var a=n(27723),r=n(97969),s=n(28310),o=n(55903),i=n(36270),l=n(85154);const __=a.__,c="button",u={apiVersion:3,title:__("Button","jetpack"),icon:i.A,category:(0,r.A)("design","layout"),keywords:[],supports:{html:!1,inserter:!1,align:["left","center","right"],typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}}},styles:[{name:"fill",label:__("Fill","jetpack"),isDefault:!0},{name:"outline",label:__("Outline","jetpack")}],attributes:s.A,edit:o.A,save:l.A,usesContext:["jetpack/parentBlockWidth"]}},85154:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var a=n(96072),r=n.n(a),s=n(82170),o=n(94715),i=n(13022),l=n(8746);function c({attributes:e,blockName:t,uniqueId:n}){const{backgroundColor:a,borderRadius:c,className:u,customBackgroundColor:d,customGradient:p,customTextColor:m,gradient:h,saveInPostContent:g,text:f,textColor:v,url:b,width:k,fontSize:y}=e;if(!g)return null;const E=o.useBlockProps.save(),w=(0,o.getColorClassName)("background-color",a),_=l.Uc?(0,o.__experimentalGetGradientClass)(h):void 0,C=(0,o.getColorClassName)("color",v),A=(0,i.A)("wp-block-button","jetpack-submit-button",u,E?.className,{[`wp-block-jetpack-${t}`]:t}),x=(0,i.A)("wp-block-button__link",{"has-text-color":v||m,[C]:C,"has-background":a||h||d||p,[w]:w,[_]:_,"no-border-radius":0===c,"has-custom-width":!!k,[`has-${y}-font-size`]:!!y,"has-custom-font-size":!!y}),j={background:p||void 0,backgroundColor:w||p||h?void 0:d,fontSize:e.style?.typography?.fontSize,color:C?void 0:m,borderRadius:c?c+"px":void 0,width:k};return(0,s.createElement)("div",r()({},E,{className:A}),(0,s.createElement)(o.RichText.Content,{className:x,"data-id-attr":n||"placeholder",href:b,id:n,rel:"noopener noreferrer",role:"button",style:j,tagName:"a",target:"_blank",value:f}))}},81177:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(47143),r=n(86087),s=n(66087);function o({attributes:e,clientId:t,setAttributes:n}){const{passthroughAttributes:o}=e,{attributesToSync:i}=(0,a.useSelect)((n=>{const{getBlockAttributes:a,getBlockRootClientId:r}=n("core/block-editor"),i=a(r(t))||{},l=(0,s.mapValues)(o,(e=>i[e]));return{attributesToSync:(0,s.pickBy)(l,((t,n)=>t!==e[n]))}}));(0,r.useEffect)((()=>{(0,s.isEmpty)(i)||n(i)}),[i,n])}},95816:(e,t,n)=>{"use strict";n.d(t,{a:()=>a});const a="https://calendly.com/wpcom/jetpack-block-example"},99723:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>d});var a=n(82170),r=n(85985),s=n(94715),o=n(56427),i=n(27723),l=n(5873);const __=i.__,_x=i._x,c=({onEditClick:e})=>(0,a.createElement)(o.ToolbarGroup,null,(0,a.createElement)(o.ToolbarButton,{onClick:()=>e(!0)},__("Edit","jetpack"))),u=e=>{const{attributes:{hideEventTypeDetails:t,url:n},defaultClassName:s,embedCode:i,parseEmbedCode:l,setAttributes:c,setEmbedCode:u}=e;let d=null;return n&&(d=(0,r.d9)()||(0,r.Sy)()?"https://wordpress.com/support/wordpress-editor/blocks/calendly-block/#customize-the-calendly-block":"https://jetpack.com/support/jetpack-blocks/calendly-block/#customizing-a-calendly-block"),(0,a.createElement)(a.Fragment,null,(0,a.createElement)(o.PanelBody,{PanelBody:!0,title:__("Calendar settings","jetpack"),initialOpen:!1},(0,a.createElement)("form",{onSubmit:l,className:`${s}-embed-form-sidebar`},(0,a.createElement)("input",{type:"text",id:"embedCode",onChange:e=>u(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:i||"",className:"components-placeholder__input"}),(0,a.createElement)("div",null,(0,a.createElement)(o.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,a.createElement)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Hide event type details","jetpack"),checked:t,onChange:()=>c({hideEventTypeDetails:!t})})),d&&(0,a.createElement)(o.Notice,{className:`${s}-color-notice`,isDismissible:!1},(0,a.createElement)(o.ExternalLink,{href:d},__("Explore more customization options.","jetpack"))))},d=e=>{const{attributes:t,clientId:n,isEditingUrl:r,setAttributes:o,setIsEditingUrl:i}=e,{style:d,url:p}=t,m=[{value:"inline",label:__("Inline","jetpack")},{value:"link",label:__("Link","jetpack")}];return(0,a.createElement)(a.Fragment,null,p&&!r&&(0,a.createElement)(s.BlockControls,null,(0,a.createElement)(c,{onEditClick:i})),p&&(0,a.createElement)(l.A,{clientId:n,styleOptions:m,onSelectStyle:o,activeStyle:d,attributes:t,viewportWidth:500}),(0,a.createElement)(s.InspectorControls,null,(0,a.createElement)(u,e)))}},19493:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(82170),r=n(74997),s=n(27723),o=n(20710);const __=s.__,i={attributes:{backgroundColor:{type:"string",default:"ffffff",validator:o.A},submitButtonText:{type:"string",default:__("Schedule time with me","jetpack")},submitButtonTextColor:{type:"string"},submitButtonBackgroundColor:{type:"string"},submitButtonClasses:{type:"string"},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:o.A},textColor:{type:"string",default:"4D5055",validator:o.A},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string",validator:o.A},customTextButtonColor:{type:"string",validator:o.A}},migrate:e=>{const{submitButtonText:t,submitButtonTextColor:n,submitButtonBackgroundColor:a,submitButtonClasses:s,backgroundButtonColor:o,textButtonColor:i,customBackgroundButtonColor:l,customTextButtonColor:c,...u}=e,d={text:(p=e).submitButtonText||__("Schedule time with me","jetpack"),textColor:p.submitButtonTextColor||p.textButtonColor,customTextColor:p.customTextButtonColor,backgroundColor:p.submitButtonBackgroundColor||p.backgroundButtonColor,customBackgroundColor:p.customBackgroundButtonColor,url:p.url};var p;return[u,[(0,r.createBlock)("jetpack/button",{element:"a",uniqueId:"calendly-widget-id",...d})]]},save:({attributes:{url:e}})=>(0,a.createElement)("a",{href:e},e)}},52385:(e,t,n)=>{"use strict";n.d(t,{A:()=>C});var a=n(96072),r=n.n(a),s=n(82170),o=n(85985),i=n(94715),l=n(74997),c=n(56427),u=n(47143),d=n(86087),p=n(27723),m=n(13022),h=n(66087),g=n(78218),f=n(56145),v=n(13248),b=n(95816),k=n(99723),y=n(38028);const __=p.__,_x=p._x,E="jetpack/button",w={element:"a",text:__("Schedule time with me","jetpack"),uniqueId:"calendly-widget-id",url:b.a},_=(0,o.sh)(v);const C=(0,c.withNotices)((function(e){const{attributes:t,clientId:n,name:a,noticeOperations:o,noticeUI:p,setAttributes:C}=e,A=(0,l.getBlockDefaultClassName)(a),x=(0,g.y)(v.attributes,t);(0,h.isEqual)(x,t)||C(x);const{backgroundColor:j,hideEventTypeDetails:S,primaryColor:N,textColor:R,style:P,url:L}=x,[T,B]=(0,d.useState)(L),[M,I]=(0,d.useState)(!1),[D,F]=(0,d.useState)(!1),[z,O]=(0,d.useState)({}),H=(0,i.useBlockProps)(),U=()=>{o.removeAllNotices(),o.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or code.","jetpack"))};(0,d.useEffect)((()=>{L&&b.a!==L&&"link"!==P&&(0,f.A)(L,F).catch((()=>{C({url:void 0}),U()}))}),[]);const V=e=>{if(!e)return void U();e.preventDefault();const t=(0,y.a9)(T);if(t){if(t.buttonAttributes&&"link"===t.style){const e=(0,u.select)("core/editor").getBlocksByClientId(n);e.length&&e[0].innerBlocks.forEach((e=>{(0,u.dispatch)("core/editor").updateBlockAttributes(e.clientId,t.buttonAttributes)})),O(t.buttonAttributes)}(0,f.A)(t.url,F).then((()=>{const e=(0,g.y)(v.attributes,t);C(e),I(!1),o.removeAllNotices()})).catch((()=>{C({url:void 0}),U()}))}else U()},q=(0,s.createElement)("div",{className:"wp-block-embed is-loading"},(0,s.createElement)(c.Spinner,null),(0,s.createElement)("p",null,__("Embedding…","jetpack"))),G=(0,s.createElement)(c.Placeholder,{label:__("Calendly","jetpack"),instructions:__("Enter your Calendly web address or embed code below.","jetpack"),icon:_,notices:p},(0,s.createElement)("form",{onSubmit:V},(0,s.createElement)("input",{type:"text",id:"embedCode",onChange:e=>B(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:T||"",className:"components-placeholder__input"}),(0,s.createElement)("div",null,(0,s.createElement)(c.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,s.createElement)("div",{className:`${A}-learn-more`},(0,s.createElement)(c.ExternalLink,{href:"https://help.calendly.com/hc/en-us/articles/223147027-Embed-options-overview"},__("Need help finding your embed code?","jetpack")))),$=(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:`${A}-overlay`}),(0,s.createElement)("iframe",{src:(()=>{const e=new URLSearchParams({embed_domain:"wordpress.com",embed_type:"Inline",hide_event_type_details:S?1:0,background_color:j,primary_color:N,text_color:R});return`${L}?${e}`})(),width:"100%",height:"100%",frameBorder:"0","data-origwidth":"100%","data-origheight":"100%",title:"Calendly"})),W=(0,s.createElement)(i.InnerBlocks,{template:[[E,{...w,...z,passthroughAttributes:{url:"url"}}]],templateLock:"all"});return D?q:(0,s.createElement)("div",r()({},H,{className:(0,m.A)(H.className,{[`calendly-style-${P}`]:L&&!M})}),(0,s.createElement)(k.Ay,r()({},e,{defaultClassName:A,embedCode:T,isEditingUrl:M,parseEmbedCode:V,setEmbedCode:B,setIsEditingUrl:I})),L&&!M?"inline"===P?$:W:G)}))},60312:(e,t,n)=>{"use strict";var a=n(74997),r=n(94375),s=n(13248),o=n(19493),i=n(52385),l=n(2668),c=n(38028);(0,r.M)(s,{edit:i.A,save:l.A,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&c.QL.test(e.textContent),transform:e=>{const t=(0,c.a9)(e.textContent);return(0,a.createBlock)("jetpack/calendly",t)}}]},deprecated:[o.A]})},2668:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(82170),r=n(94715);function s(){const e=r.useBlockProps.save();return(0,a.createElement)("div",e,(0,a.createElement)(r.InnerBlocks.Content,null))}},38028:(e,t,n)=>{"use strict";n.d(t,{QL:()=>a,a9:()=>r});const a=/(^|\/\/)(calendly\.com[^"']*)/i,r=e=>{if(!e)return;const t=(e=>{const t=e.match(a);if(t)return"https://"+t[2]})(e);if(!t)return;const n=(e=>{const t={},n=new URL(e);if(t.url=n.origin+n.pathname,!n.search)return t;const a=new URLSearchParams(n.search),r=a.get("background_color"),s=a.get("primary_color"),o=a.get("text_color"),i=/^[A-Za-z0-9]{6}$/;return a.get("hide_event_type_details")&&(t.hideEventTypeDetails=a.get("hide_event_type_details")),r&&r.match(i)&&(t.backgroundColor=r),s&&s.match(i)&&(t.primaryColor=s),o&&o.match(i)&&(t.textColor=o),t})(t),r=(e=>e.indexOf("data-url")>0?"inline":e.indexOf("initPopupWidget")>0||e.indexOf("initBadgeWidget")>0?"link":void 0)(e);if(r&&(n.style=r),"link"===r){n.buttonAttributes={};const t=(e=>{let t=e.match(/false;">([^<]+)<\//);return t?t[1]:(t=e.match(/text: '([^']*?)'/),t?t[1]:void 0)})(e);t&&(n.buttonAttributes.text=t);const a=(e=>{const t=e.match(/textColor: '([^']*?)'/);if(t)return t[1]})(e);a&&(n.buttonAttributes.textColor=void 0,n.buttonAttributes.customTextColor=a);const r=(e=>{const t=e.match(/color: '([^']*?)'/);if(t)return t[1]})(e);r&&(n.buttonAttributes.backgroundColor=void 0,n.buttonAttributes.customBackgroundColor=r)}return n}},98091:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var a=n(82170),r=n(94715),s=n(56427),o=n(86087),i=n(27723),l=n(13022),c=n(81942);const __=i.__;class u extends o.Component{constructor(...e){super(...e),this.preventEnterKey=this.preventEnterKey.bind(this)}preventEnterKey(e){"Enter"===e.key&&e.preventDefault()}render(){const{attributes:{address:e,addressLine2:t,addressLine3:n,city:i,region:u,postal:d,country:p,linkToGoogleMaps:m},isSelected:h,setAttributes:g}=this.props,f=[e,t,n,i,u,d,p].some((e=>""!==e)),v=(0,l.A)({"jetpack-address-block":!0,"is-selected":h}),b=(0,a.createElement)(s.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Link address to Google Maps","jetpack"),checked:m,onChange:e=>g({linkToGoogleMaps:e})});return(0,a.createElement)("div",{className:v},!h&&f&&(0,c.A)(this.props),(h||!f)&&(0,a.createElement)(o.Fragment,null,(0,a.createElement)(r.PlainText,{value:e,placeholder:__("Street Address","jetpack"),"aria-label":__("Street Address","jetpack"),onChange:e=>g({address:e}),onKeyDown:this.preventEnterKey}),(0,a.createElement)(r.PlainText,{value:t,placeholder:__("Address Line 2","jetpack"),"aria-label":__("Address Line 2","jetpack"),onChange:e=>g({addressLine2:e}),onKeyDown:this.preventEnterKey}),(0,a.createElement)(r.PlainText,{value:n,placeholder:__("Address Line 3","jetpack"),"aria-label":__("Address Line 3","jetpack"),onChange:e=>g({addressLine3:e}),onKeyDown:this.preventEnterKey}),(0,a.createElement)(r.PlainText,{value:i,placeholder:__("City","jetpack"),"aria-label":__("City","jetpack"),onChange:e=>g({city:e}),onKeyDown:this.preventEnterKey}),(0,a.createElement)(r.PlainText,{value:u,placeholder:__("State/Province/Region","jetpack"),"aria-label":__("State/Province/Region","jetpack"),onChange:e=>g({region:e}),onKeyDown:this.preventEnterKey}),(0,a.createElement)(r.PlainText,{value:d,placeholder:__("Postal/Zip Code","jetpack"),"aria-label":__("Postal/Zip Code","jetpack"),onChange:e=>g({postal:e}),onKeyDown:this.preventEnterKey}),(0,a.createElement)(r.PlainText,{value:p,placeholder:__("Country","jetpack"),"aria-label":__("Country","jetpack"),onChange:e=>g({country:e}),onKeyDown:this.preventEnterKey}),b))}}const d=u},39563:(e,t,n)=>{"use strict";n.d(t,{U:()=>u,W:()=>d});var a=n(82170),r=n(56427),s=n(86087),o=n(27723),i=n(62289),l=n(98091),c=n(81942);const __=o.__,_x=o._x,u="address",d={title:__("Address","jetpack"),description:__("Lets you add a physical address with Schema markup.","jetpack"),keywords:[_x("location","block search term","jetpack"),_x("direction","block search term","jetpack"),_x("place","block search term","jetpack")],icon:(0,i.A)((0,a.createElement)(s.Fragment,null,(0,a.createElement)(r.Path,{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zM7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 2.88-2.88 7.19-5 9.88C9.92 16.21 7 11.85 7 9z"}),(0,a.createElement)(r.Circle,{cx:"12",cy:"9",r:"2.5"}))),category:"grow",attributes:{address:{type:"string",default:""},addressLine2:{type:"string",default:""},addressLine3:{type:"string",default:""},city:{type:"string",default:""},region:{type:"string",default:""},postal:{type:"string",default:""},country:{type:"string",default:""},linkToGoogleMaps:{type:"boolean",default:!1}},parent:["jetpack/contact-info"],edit:l.A,save:c.A}},81942:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(82170),r=n(86087),s=n(27723);const __=s.__,o=({attributes:{address:e,addressLine2:t,addressLine3:n,city:s,region:o,postal:i,country:l}})=>(0,a.createElement)(r.Fragment,null,e&&(0,a.createElement)("div",{className:"jetpack-address__address jetpack-address__address1"},e),t&&(0,a.createElement)("div",{className:"jetpack-address__address jetpack-address__address2"},t),n&&(0,a.createElement)("div",{className:"jetpack-address__address jetpack-address__address3"},n),s&&!(o||i)&&(0,a.createElement)("div",{className:"jetpack-address__city"},s),s&&(o||i)&&(0,a.createElement)("div",null,(0,a.createElement)("span",{className:"jetpack-address__city"},s),", ",(0,a.createElement)("span",{className:"jetpack-address__region"},o)," ",(0,a.createElement)("span",{className:"jetpack-address__postal"},i)),!s&&(o||i)&&(0,a.createElement)("div",null,(0,a.createElement)("span",{className:"jetpack-address__region"},o)," ",(0,a.createElement)("span",{className:"jetpack-address__postal"},i)),l&&(0,a.createElement)("div",{className:"jetpack-address__country"},l)),i=({attributes:{address:e,addressLine2:t,addressLine3:n,city:a,region:r,postal:s,country:o}})=>{let i=r?`+${r},`:"";i=s?`${i}+${s}`:i;return`https://www.google.com/maps/search/${e?`${e},`:""}${t?`${t},`:""}${n?`${n},`:""}${a?`+${a},`:""}${i}${o?`+${o}`:""}`.replace(" ","+")},l=e=>(({address:e,addressLine2:t,addressLine3:n,city:a,region:r,postal:s,country:o})=>[e,t,n,a,r,s,o].some((e=>""!==e)))(e.attributes)&&(0,a.createElement)("div",{className:e.className},e.attributes.linkToGoogleMaps&&(0,a.createElement)("a",{href:i(e),target:"_blank",rel:"noopener noreferrer",title:__("Open address in Google Maps","jetpack")},(0,a.createElement)(o,e)),!e.attributes.linkToGoogleMaps&&(0,a.createElement)(o,e))},44246:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var a=n(96072),r=n.n(a),s=n(82170),o=n(94715),i=n(13022);const l=["jetpack/markdown","jetpack/address","jetpack/email","jetpack/phone","jetpack/map","jetpack/business-hours","core/paragraph","core/image","core/heading","core/gallery","core/list","core/quote","core/shortcode","core/audio","core/code","core/cover","core/html","core/separator","core/spacer","core/subhead","core/video"],c=[["jetpack/email"],["jetpack/phone"],["jetpack/address"]],u=e=>{const{isSelected:t}=e,n=(0,o.useBlockProps)();return(0,s.createElement)("div",r()({},n,{className:(0,i.A)(n.className,{"jetpack-contact-info-block":!0,"is-selected":t})}),(0,s.createElement)(o.InnerBlocks,{allowedBlocks:l,templateLock:!1,template:c}))}},25907:(e,t,n)=>{"use strict";var a=n(74997),r=n(94375),s=n(39563),o=n(75173),i=n(44246),l=n(90951),c=n(70063),u=n(36611);(0,r.M)(o,{edit:i.A,save:u.A,transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"widget_contact_info"===e,transform:({instance:e})=>{let t=[(0,a.createBlock)("core/heading",{content:e.raw.title}),(0,a.createBlock)("jetpack/email",{email:e.raw.email}),(0,a.createBlock)("jetpack/phone",{phone:e.raw.phone}),(0,a.createBlock)("jetpack/address",{address:e.raw.address})];return e.raw.hours&&(t=[...t,(0,a.createBlock)("core/paragraph",{content:e.raw.hours})]),e.raw.showmap&&e.raw.address&&(t=[...t,(0,a.createBlock)("jetpack/map",{address:e.raw.address})]),(0,a.createBlock)("jetpack/contact-info",{},t)}}]}},[{name:s.U,settings:s.W},{name:l.U,settings:l.W},{name:c.U,settings:c.W}])},43167:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(27723),r=n(64882),s=n(27266);const __=a.__,o=e=>{const{setAttributes:t}=e;return(0,r.A)("email",e,__("Email","jetpack"),s.A,(e=>t({email:e})))}},90951:(e,t,n)=>{"use strict";n.d(t,{U:()=>c,W:()=>u});var a=n(82170),r=n(56427),s=n(27723),o=n(62289),i=n(43167),l=n(27266);const __=s.__,_x=s._x,c="email",u={title:__("Email Address","jetpack"),description:__("Lets you add an email address with an automatically generated click-to-email link.","jetpack"),keywords:["e-mail","email",_x("message","block search term","jetpack")],icon:(0,o.A)((0,a.createElement)(r.Path,{d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"})),category:"grow",attributes:{email:{type:"string",default:""}},edit:i.A,save:l.A,parent:["jetpack/contact-info"]}},27266:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(82170),r=n(86087),s=n(39904);const o=({attributes:{email:e},className:t})=>e&&(0,a.createElement)("div",{className:t},e.split(/(\s+)/).map(((e,t)=>{const n=e.replace(/([.,/#!$%^&*;:{}=\-_`~()\][])+$/g,"");return e.indexOf("@")&&s.validate(n)?e===n?(0,a.createElement)("a",{href:`mailto:${e}`,key:t},e):(0,a.createElement)(r.Fragment,{key:t},(0,a.createElement)("a",{href:`mailto:${e}`,key:t},n),(0,a.createElement)(r.Fragment,null,e.slice(-(e.length-n.length)))):(0,a.createElement)(r.Fragment,{key:t},e)})))},42711:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(27723),r=n(64882),s=n(84330);const __=a.__,o=e=>{const{setAttributes:t}=e;return(0,r.A)("phone",e,__("Phone number","jetpack"),s.A,(e=>t({phone:e})))}},70063:(e,t,n)=>{"use strict";n.d(t,{U:()=>c,W:()=>u});var a=n(82170),r=n(56427),s=n(27723),o=n(62289),i=n(42711),l=n(84330);const __=s.__,_x=s._x,c="phone",u={title:__("Phone Number","jetpack"),description:__("Lets you add a phone number with an automatically generated click-to-call link.","jetpack"),keywords:[_x("mobile","block search term","jetpack"),_x("telephone","block search term","jetpack"),_x("cell","block search term","jetpack")],icon:(0,o.A)((0,a.createElement)(r.Path,{d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79h1.51m9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75l1.2-1.19M7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1z"})),category:"grow",attributes:{phone:{type:"string",default:""}},parent:["jetpack/contact-info"],edit:i.A,save:l.A}},84330:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(82170);const r=({attributes:{phone:e},className:t})=>e&&(0,a.createElement)("div",{className:t},function(e){const t=e.match(/\d+\.\d+|\d+\b|\d+(?=\w)/g);if(!t)return e;const n=e.indexOf(t[0]);let r=n?e.substring(n-1):e,s=n?e.substring(0,n):"",o=r.replace(/\D/g,"");return/[0-9/+/(]/.test(r[0])?(s=s.slice(0,-1),"+"===r[0]&&(o="+"+o)):r=r.substring(1),[s.trim()?(0,a.createElement)("span",{key:"phonePrefix",className:"phone-prefix"},s):null,(0,a.createElement)("a",{key:"phoneNumber",href:`tel:${o}`},r)]}(e))},36611:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(82170),r=n(94715);const s=()=>{const e=r.useBlockProps.save();return(0,a.createElement)("div",e,(0,a.createElement)(r.InnerBlocks.Content,null))}},68071:(e,t,n)=>{"use strict";n.d(t,{a:()=>r});var a=n(27723);const __=a.__,r=(0,a.sprintf)( +_n("hit","hits",parseInt(x),"jetpack",0);return(0,r.createElement)("div",A,(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(p.z,{attributes:e,setAttributes:n})),(0,r.createElement)("div",{className:t},o||null===k?(0,r.createElement)("p",{className:"jetpack-blog-stats__loading"},__("Loading stats…","jetpack")):(0,r.createElement)("p",null,(0,r.createElement)("span",null,(0,a.A)(x)," "),(0,r.createElement)(l.RichText,{tagName:"span",placeholder:"visitors"===v?S:N,value:f,allowedFormats:["core/bold","core/italic","core/link"],onChange:e=>n({label:e})}))))}},95184:(e,t,n)=>{"use strict";var r=n(74997),a=n(94375),s=n(35116),o=n(20201);(0,a.M)(s,{edit:o.A,save:()=>null,transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"blog-stats"===e,transform:({instance:e})=>{const t=e.raw.title?(0,r.createBlock)("core/heading",{content:e.raw.title,level:3}):null,n=(0,r.createBlock)("jetpack/blog-stats",{label:e.raw.hits});return t?[t,n]:n}}]}})},51744:(e,t,n)=>{"use strict";n.d(t,{k:()=>l});var r=n(82170),a=n(85985),s=n(56427),o=n(27723),i=n(35116);const __=o.__,l=({className:e,isLoading:t,changeStatus:n})=>{const o=(0,a.d9)()?"https://wordpress.com/support/stats/":"https://jetpack.com/support/jetpack-stats/";return(0,r.createElement)("div",{className:e},(0,r.createElement)(s.Placeholder,{icon:(0,a.sh)(i),instructions:__("You'll need to activate the Stats module to use this block. Please note that hits are only counted while this module is active.","jetpack"),label:i.title},(0,r.createElement)(s.Button,{disabled:t,isBusy:t,onClick:()=>n(!0),variant:"secondary"},t?__("Activating Stats","jetpack"):__("Activate Stats","jetpack",0)),(0,r.createElement)("div",null,(0,r.createElement)(s.ExternalLink,{href:o},__("Learn more about the Stats module.","jetpack")))))}},12169:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(82170),a=n(1455),s=n.n(a),o=n(94715),i=n(56427),l=n(47143),c=n(86087),u=n(27723),d=n(93832),p=n(13022),m=n(54919),h=n(9075);const __=u.__,_x=u._x;const g=(0,i.withNotices)((function({attributes:e,noticeOperations:t,noticeUI:n,setAttributes:a}){const g=(0,c.useRef)(!1),{answersLink:f,answersLinkText:v,gravatars:b,promptFetched:k,promptId:y,promptLabel:E,promptText:w,showLabel:_,showResponses:C,tagsAdded:A,isBloganuary:x}=e,j=(0,o.useBlockProps)({className:"jetpack-blogging-prompt"});(0,h.J)(y,A,(e=>a({tagsAdded:e})));const S=(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(!S||g.current||k)return;const e=()=>{a({promptFetched:!1,promptId:null,tagsAdded:!1}),g.current=!1,t.removeAllNotices()};let n="/wpcom/v3/blogging-prompts";if(y)n+="/"+encodeURIComponent(y);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:S,force_year:(new Date)?.getFullYear()}),g.current=!0,s()({path:n}).then((e=>{const t=y?e:e[0],n=(0,m.i)(S);a({answersLink:t.answered_link+`?locale=${n}`,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&&y?(o=y,(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. */ +__("Error while fetching prompt: %s","jetpack"),t)," ",(0,r.createElement)(i.Button,{variant:"link",onClick:e},__("Retry","jetpack"))))(n.message);var o;t.removeAllNotices(),t.createErrorNotice(s)}))}),[g,t,k,y,a,S]);const N=e=>{a({showLabel:e})},R=e=>{a({showResponses:e})},P=(0,p.A)(["jetpack-blogging-prompt__label"],{"is-bloganuary-icon":x});return(0,r.createElement)("div",j,n,(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(i.PanelBody,{title:_x("Settings","title of block settings sidebar section","jetpack")},(0,r.createElement)(i.ToggleControl,{label:__("Show prompt label","jetpack"),checked:_,onChange:N,__nextHasNoMarginBottom:!0}),(0,r.createElement)(i.ToggleControl,{label:__("Show other responses","jetpack"),checked:C,onChange:R,__nextHasNoMarginBottom:!0})))),k?(0,r.createElement)(r.Fragment,null,_&&(0,r.createElement)("div",{className:P},E),(0,r.createElement)("div",{className:"jetpack-blogging-prompt__text"},w),C&&y&&(0,r.createElement)("div",{className:"jetpack-blogging-prompt__answers"},b&&b.slice(0,3).map((({url:e})=>e&&(0,r.createElement)("img",{className:"jetpack-blogging-prompt__answers-gravatar",src:e,key:e}))),(0,r.createElement)("a",{className:"jetpack-blogging-prompt__answers-link",href:f,target:"_blank",rel:"external noreferrer noopener"},v))):(0,r.createElement)("div",{className:"jetpack-blogging-prompt__spinner"},(0,r.createElement)(i.Spinner,null)))}))},87888:(e,t,n)=>{"use strict";var r=n(74997),a=n(47143),s=n(27723),o=n(94375),i=n(27734),l=n(32442),c=n(12169),u=n(63757),d=n(94530),p=n(86239),m=n(57028);const __=s.__;(0,o.M)(l,{edit:c.A,save:m.A,example:{attributes:{answersLink:"https://wordpress.com/tag/dailyprompt",answersLinkText:__("View all responses","jetpack"),gravatars:[{url:u},{url:d},{url:p}],promptLabel:__("Daily writing prompt","jetpack"),promptText:__("What's your favorite place to visit?","jetpack"),promptFetched:!0,promptId:1234,showResponses:!0,showLabel:!0,tagsAdded:!0,isBloganuary:!1}}}),function(){const e=new URL(document.location.href);if(!e.pathname.endsWith("/wp-admin/post-new.php"))return;const t=e.searchParams.get("answer_prompt")??"0",n=parseInt(t);n&&async function(e){await(0,i.O)();const{insertBlocks:t}=(0,a.dispatch)("core/block-editor");t([(0,r.createBlock)(`jetpack/${name}`,{promptFetched:!1,promptId:e,tagsAdded:!0}),(0,r.createBlock)("core/paragraph")],0,void 0,!1)}(n)}()},57028:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(82170),a=n(94715),s=n(13022);const o=function({attributes:e}){const{answersLink:t,answersLinkText:n,gravatars:o,promptId:i,promptLabel:l,promptText:c,showLabel:u,showResponses:d,isBloganuary:p}=e,m=a.useBlockProps.save({className:"jetpack-blogging-prompt"}),h=(0,s.A)(["jetpack-blogging-prompt__label"],{"is-bloganuary-icon":p});return(0,r.createElement)("div",m,u&&(0,r.createElement)("div",{className:h},l),(0,r.createElement)("div",{className:"jetpack-blogging-prompt__text"},c),d&&i&&(0,r.createElement)("div",{className:"jetpack-blogging-prompt__answers"},o.map((({url:e})=>e&&(0,r.createElement)("img",{className:"jetpack-blogging-prompt__answers-gravatar","aria-hidden":"true",src:e,key:e}))),(0,r.createElement)("a",{className:"jetpack-blogging-prompt__answers-link",href:t,target:"_blank",rel:"external noreferrer noopener"},n)))}},9075:(e,t,n)=>{"use strict";n.d(t,{J:()=>c});var r=n(1455),a=n.n(r),s=n(47143),o=n(86087),i=n(89877);function l(e){const t=(0,i.escapeHTML)(e);return a()({path:"/wp/v2/tags",method:"POST",data:{name:t}}).catch((t=>"term_exists"!==t.code?Promise.reject(t):Promise.resolve({id:t.data.term_id,name:e})))}function c(e,t,n){const{editPost:r}=(0,s.useDispatch)("core/editor"),a=(0,o.useRef)("not-started"),{postType:i,postsSupportTags:c,tags:u,tagIds:d,tagsHaveResolved:p}=(0,s.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor"),{getEntityRecords:n,getPostType:r,hasFinishedResolution:a}=e("core"),s=t("tags"),o={_fields:"id,name",context:"view",include:s?.join(","),per_page:-1};return{postType:t("type"),postsSupportTags:r("post")?.taxonomies.includes("post_tag"),tagIds:s||[],tags:s&&s.length?n("taxonomy","post_tag",o):[],tagsHaveResolved:!s||!s.length||a("getEntityRecords",["taxonomy","post_tag",o])}}),[]);(0,o.useEffect)((()=>{"post"===i&&c&&!t&&p&&e&&Array.isArray(u)&&("not-started"===a.current&&(u.some((e=>e.name&&"dailyprompt"===e.name))&&u.some((t=>t.name&&t.name===`dailyprompt-${e}`))?a.current="fulfilled":(a.current="pending",Promise.all([l("dailyprompt"),l(`dailyprompt-${e}`)]).then((e=>{const t=e.map((e=>e.id));r({tags:[...d,...t]}),a.current="fulfilled"})).catch((e=>{console.error(e),a.current="rejected"})))),"fulfilled"===a.current&&n(!0))}),[r,c,i,e,a,n,u,d,t,p])}},53808:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(82170),a=n(94715),s=n(56427),o=n(27723);const __=o.__;const i=function({className:e,attributes:t,setAttributes:n}){const{icon:o,name:i,description:l}=t,c=(0,a.useBlockProps)({className:e});return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("hr",{className:"wp-block-separator jetpack-blogroll-item-divider"}),(0,r.createElement)("div",c,(0,r.createElement)(a.MediaUpload,{multiple:!1,onSelect:e=>{n({icon:e.url})},render:({open:e})=>(0,r.createElement)(s.Button,{variant:"link",onClick:e,style:{padding:0}},(0,r.createElement)("figure",null,(0,r.createElement)("img",{className:"blogroll-item-image",onError:e=>{e.target.parentNode.classList.add("empty-site-icon")},src:o,alt:i})))}),(0,r.createElement)("div",{className:"jetpack-blogroll-item-content"},(0,r.createElement)("a",null,(0,r.createElement)(a.RichText,{className:"jetpack-blogroll-item-title",value:i,tagName:"p",allowedFormats:["core/italic"],onChange:e=>{n({name:e})},placeholder:__("Enter site title","jetpack")})),(0,r.createElement)(a.RichText,{className:"jetpack-blogroll-item-description",value:l,onChange:e=>{n({description:e})},placeholder:__("Enter site description","jetpack")}))))}},3686:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(82170),a=n(56427);const s=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},(0,r.createElement)(a.Path,{d:"M12 12.75H21V11.25H12V12.75Z"}),(0,r.createElement)(a.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M3 12C3 10.3431 4.34315 9 6 9C7.65685 9 9 10.3431 9 12C9 13.6569 7.65685 15 6 15C4.34315 15 3 13.6569 3 12ZM3.77743 10.8857C4.08602 10.2714 4.64181 9.80266 5.31427 9.61008C5.15499 9.79493 5.01798 10.0132 4.90612 10.2532C4.81521 10.4483 4.73949 10.6605 4.68112 10.8857H3.77743ZM3.58718 11.4C3.53956 11.5922 3.51429 11.7931 3.51429 12C3.51429 12.2069 3.53956 12.4078 3.58718 12.6H4.58166C4.55616 12.4057 4.54286 12.205 4.54286 12C4.54286 11.7949 4.55616 11.5942 4.58166 11.4H3.58718ZM5.10094 11.4C5.0724 11.5917 5.05714 11.7926 5.05714 12C5.05714 12.2074 5.0724 12.4083 5.10094 12.6H6.89907C6.92761 12.4083 6.94286 12.2074 6.94286 12C6.94286 11.7926 6.92761 11.5917 6.89906 11.4H5.10094ZM7.41834 11.4C7.44384 11.5942 7.45714 11.7949 7.45714 12C7.45714 12.2051 7.44384 12.4058 7.41835 12.6H8.41282C8.46044 12.4078 8.48571 12.2069 8.48571 12C8.48571 11.7931 8.46044 11.5922 8.41282 11.4H7.41834ZM8.22257 10.8857H7.31888C7.26051 10.6605 7.18479 10.4483 7.09388 10.2532C6.98202 10.0132 6.845 9.79493 6.68571 9.61007C7.35817 9.80265 7.91398 10.2714 8.22257 10.8857ZM6.78494 10.8857H5.21506C5.25946 10.7382 5.31227 10.5992 5.37226 10.4705C5.5421 10.1061 5.76275 9.83732 5.99999 9.67974C6.23724 9.83732 6.45789 10.1061 6.62775 10.4705C6.68773 10.5992 6.74054 10.7382 6.78494 10.8857ZM3.77743 13.1143H4.68112C4.74269 13.3519 4.82356 13.5749 4.92121 13.7787C5.0301 14.0059 5.16199 14.2132 5.31431 14.3899C4.64184 14.1974 4.08603 13.7286 3.77743 13.1143ZM6.78495 13.1143H5.21506C5.26258 13.2722 5.31973 13.4203 5.38498 13.5564C5.5534 13.9078 5.76894 14.1668 6.00003 14.3203C6.23726 14.1627 6.45791 13.8939 6.62775 13.5295C6.68773 13.4008 6.74054 13.2618 6.78495 13.1143ZM7.09388 13.7468C7.18479 13.5517 7.26052 13.3395 7.31889 13.1143H8.22257C7.91398 13.7286 7.35819 14.1973 6.68574 14.3899C6.84501 14.2051 6.98203 13.9868 7.09388 13.7468Z",strokeWidth:"0.1"}))},77782:(e,t,n)=>{"use strict";n.d(t,{UU:()=>u,W0:()=>d});var r=n(82170),a=n(94715),s=n(27723),o=n(88659),i=n(84954),l=n(53808),c=n(3686);const __=s.__,u="blogroll-item",d={title:__("Blogroll Item","jetpack"),description:__("Blogroll Item","jetpack"),icon:{src:c.A,foreground:(0,o.V)()},category:"grow",parent:["jetpack/blogroll"],keywords:[],supports:{align:!1,alignWide:!0,anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0,inserter:!1},edit:l.A,attributes:{id:{type:"string"},name:{type:"string"},icon:{type:"string",default:i},is_non_wpcom_site:{type:"boolean",default:!1},url:{type:"string"},description:{type:"string"}},save:()=>(0,r.createElement)(a.InnerBlocks.Content,null),example:{attributes:{}}}},40536:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(82170),a=n(3582),s=n(27723);const __=s.__;function o({results:e,onSelect:t,searchInput:n,isLoading:o}){const[i]=(0,a.useEntityProp)("root","site","Blogroll Recommendations");if(o)return(0,r.createElement)("div",{className:"jetpack-blogroll__appender-results"},(0,r.createElement)("div",{role:"status"},__("Loading…","jetpack")));const l=!n?.trim();return(0,r.createElement)("div",{className:"jetpack-blogroll__appender-results"},l&&(0,r.createElement)("div",{"aria-autocomplete":"list",className:"jetpack-blogroll__appender-result-list-header-text"},__("Suggestions","jetpack")),0===e.length&&!l&&(0,r.createElement)("div",{role:"status",className:"jetpack-blogroll__appender-no-results-message"},(0,r.createElement)("span",{className:"jetpack-blogroll__appender-no-results-message-main-text"},__("No results","jetpack")),(0,r.createElement)("span",{className:"jetpack-blogroll__appender-no-results-message-secondary-text"},(0,s.sprintf)(/* translators: %s is search query. */ +__("No sites found for %s.","jetpack"),n))),e.length>0&&(0,r.createElement)("ul",{"aria-live":"polite"},e.map((e=>{const n=i.some((t=>t?.id===e?.blog_id));return(0,r.createElement)("li",{key:e.blog_id,className:"jetpack-blogroll__appender-result-container"},(0,r.createElement)("button",{className:"jetpack-blogroll__appender-result-title",disabled:n,onClick:()=>t(e)},(0,r.createElement)("div",{className:"jetpack-blogroll__appender-result-image"},e.site_icon&&(0,r.createElement)("img",{src:e.site_icon,alt:e.name,onError:e=>{e.target.parentNode.classList.add("empty-site-icon")}})),(0,r.createElement)("div",{className:"jetpack-blogroll__appender-result-text"},(0,r.createElement)("span",{className:"jetpack-blogroll__appender-result-title"},e.name),(0,r.createElement)("span",{className:"jetpack-blogroll__appender-result-description"},e.description))))}))))}},17454:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(82170),a=n(56427),s=n(27723);const __=s.__;function o({value:e,onChange:t}){return(0,r.createElement)("div",{className:"jetpack-blogroll__appender-search"},(0,r.createElement)(a.TextControl,{__nextHasNoMarginBottom:!0,label:__("Search for sites to add","jetpack"),hideLabelFromVision:!0,placeholder:__("Search…","jetpack"),value:e,onChange:e=>t(e)}))}},37127:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var r=n(82170),a=n(56427),s=n(47143),o=n(86087),i=n(27723),l=n(45459),c=n(92507),u=n(85101),d=n(40536),p=n(17454);const __=i.__;function m({isLoading:e,subscriptions:t,clientId:n}){const[i,m]=(0,o.useState)(!1),[h,g]=(0,o.useState)(),[f,v]=(0,o.useState)(""),{insertBlock:b}=(0,s.dispatch)("core/block-editor"),{siteDetails:k,isLoading:y}=(0,c.A)({siteURL:f,subscriptions:t,enabled:f});return e?(0,r.createElement)(a.Spinner,{className:"jetpack-blogroll__appender-spinner"}):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.Button,{className:"block-editor-button-blogroll-block-appender",ref:g,icon:l.A,label:__("Add Blogroll Item","jetpack"),onClick:()=>{m((e=>!e))}}),i&&(0,r.createElement)(a.Popover,{anchor:h,className:"jetpack-blogroll__appender"},(0,r.createElement)(p.A,{value:f,onChange:v}),(0,r.createElement)(d.A,{results:k,onSelect:e=>{b((0,u.FN)(e),void 0,n),m(!1)},searchInput:f,isLoading:y})))}},63166:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(82170),a=n(94715),s=n(74997),o=n(56427),i=n(47143),l=n(86087),c=n(27723),u=n(13022),d=n(2274),p=n(26247),m=n(37127),h=n(32130),g=n(46542),f=n(25688),v=n(85101);const __=c.__;const b=function({className:e,attributes:t,setAttributes:n,clientId:c}){const{show_avatar:b,show_description:k,open_links_new_window:y,ignore_user_blogs:E,load_placeholders:w}=t,_=(0,p.A)(),{isLoading:C,recommendations:A,errorMessage:x}=(0,h.A)(w),{isLoading:j,subscriptions:S,errorMessage:N}=(0,f.A)({ignore_user_blogs:E});(0,g.b)({clientId:c});const{replaceInnerBlocks:R}=(0,i.dispatch)("core/block-editor");(0,l.useEffect)((()=>{if(w&&A.length){n({load_placeholders:!1});const e=[(0,s.createBlock)("core/heading",{content:__("Blogroll","jetpack"),level:3}),...A.map(v.dy)];R(c,e)}}),[A,w,n,c,R]);const P=(0,a.useBlockProps)({className:(0,u.A)(e,{"hide-avatar":!b,"hide-description":!k})});if(!_)return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(d.A,{block:"Blogroll",explanation:__("Connect your WordPress.com account to use the Blogroll block.","jetpack")}));const L=x||N;return(0,r.createElement)("div",P,(0,r.createElement)(a.InnerBlocks,{template:[["core/heading",{content:__("Blogroll","jetpack"),level:3}]],allowedBlocks:["jetpack/blogroll-item"],renderAppender:()=>!C&&(0,r.createElement)(m.A,{isLoading:j,subscriptions:S,clientId:c})}),L&&(0,r.createElement)(o.Notice,{status:"error",isDismissible:!1},(0,r.createElement)("p",null,L)),w&&C&&(0,r.createElement)(o.FlexBlock,{style:{padding:"30px",textAlign:"center"}},(0,r.createElement)(o.Spinner,null)),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(o.ToggleControl,{label:__("Show avatar","jetpack"),checked:!!b,onChange:()=>n({show_avatar:!b}),__nextHasNoMarginBottom:!0}),(0,r.createElement)(o.ToggleControl,{label:__("Show description","jetpack"),checked:!!k,onChange:()=>n({show_description:!k}),__nextHasNoMarginBottom:!0}),(0,r.createElement)(o.ToggleControl,{label:__("Open links in a new window","jetpack"),checked:!!y,onChange:()=>n({open_links_new_window:!y}),__nextHasNoMarginBottom:!0}),(0,r.createElement)(o.ToggleControl,{label:__("Hide my own sites","jetpack"),checked:!!E,onChange:()=>n({ignore_user_blogs:!E}),__nextHasNoMarginBottom:!0}))))}},22475:(e,t,n)=>{"use strict";var r=n(94375),a=n(52829),s=n(77782),o=n(63166),i=n(36219);(0,r.M)(a,{edit:o.A,save:i.A},[{name:s.UU,settings:s.W0}])},36219:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(82170),a=n(94715),s=n(13022);const o=function({attributes:{show_avatar:e,show_description:t},className:n}){const o=a.useBlockProps.save({className:(0,s.A)(n,{"hide-avatar":!e,"hide-description":!t})});return(0,r.createElement)("div",o,(0,r.createElement)(a.InnerBlocks.Content,null))}},13818:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(86087),a=n(85101);function s(e,t=!0){const[n,s]=(0,r.useState)(null),[o,i]=(0,r.useState)(null),[l,c]=(0,r.useState)(!1),u=function(e,t=100){const[n,a]=(0,r.useState)(e);return(0,r.useEffect)((()=>{const n=setTimeout((()=>{a(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),n}((0,a.l$)(e),500);return(0,r.useEffect)((()=>{if(c(Boolean(t&&u)),t&&u){const e=new AbortController;return fetch(`https://public-api.wordpress.com/rest/v1.1/sites/${encodeURIComponent(u)}?force=wpcom`,{cache:"force-cache",signal:e.signal}).then((e=>{if(200===e.status)return e.json();e.status})).then((e=>{s(e),c(!1)})).catch((e=>{"AbortError"!==e.name&&i(e)})),()=>e.abort()}}),[u,t]),{response:n,error:o,isLoading:l}}},92507:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(13818),a=n(85101);function s({siteURL:e,subscriptions:t,enabled:n=!1}){const s=(0,a.l$)(e),{response:o,isLoading:i}=(0,r.Z)(s,Boolean(n)),l=[...o?[{blog_id:o?.ID.toString(),description:o?.description,URL:o?.URL,site_icon:(0,a.ZE)(o?.logo?.url),name:o?.name}]:[],...t].filter((t=>`${t.name}${t.URL}`.match(new RegExp(e,"i"))));return 0===l.length&&s&&l.unshift({blog_id:s,description:"",URL:s,site_icon:(0,a.ZE)(null),name:s,is_non_wpcom_site:!0}),{isLoading:i,siteDetails:l}}},32130:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(1455),a=n.n(r),s=n(86087),o=n(27723);const __=o.__;function i(e=!1){const[t,n]=(0,s.useState)(!1),[r,o]=(0,s.useState)(null),[i,l]=(0,s.useState)([]),c=(0,s.useRef)(void 0);return(0,s.useEffect)((()=>{e?(n(!0),o(null),c.current&&c.current.abort(),c.current="undefined"==typeof AbortController?void 0:new AbortController,a()({path:"/wpcom/v2/following/recommendations",global:!0,method:"GET",signal:c.current?.signal}).then((e=>{e.length||o(__("No subscriptions found. You need to follow some sites in order to see results.","jetpack")),l(e)})).catch((e=>{"AbortError"!==e.name&&(e.message?o(e.message):o(__("Whoops, we have encountered an error. Please try again later.","jetpack")))})).finally((()=>{c.current=null,n(!1)}))):n(!1)}),[e]),{isLoading:t,errorMessage:r,recommendations:i}}},46542:(e,t,n)=>{"use strict";n.d(t,{b:()=>i});var r=n(3582),a=n(47143),s=n(86087),o=n(85101);const i=({clientId:e})=>{const[t,n]=(0,s.useState)(!1),{insertBlocks:i}=(0,a.useDispatch)("core/block-editor"),[l,c]=(0,r.useEntityProp)("root","site","Blogroll Recommendations"),u=(0,a.useSelect)((t=>t("core/block-editor").getBlock(e).innerBlocks.filter((({name:e})=>"jetpack/blogroll-item"===e)).map((({attributes:e})=>e))),[e]);(0,s.useEffect)((()=>{if(!t&&l){const t=l.filter((e=>!u.some((t=>t.id===e.id))));if(t.length){const n=t.map(o.dy);i(n,void 0,e)}n(!0)}}),[e,l,u,t,i]),(0,s.useEffect)((()=>{void 0!==l&&c(u)}),[u])}},25688:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(1455),a=n.n(r),s=n(86087),o=n(27723),i=n(93832),l=n(85101);const __=o.__;function c({ignore_user_blogs:e}){const[t,n]=(0,s.useState)(!1),[r,o]=(0,s.useState)(null),[c,u]=(0,s.useState)([]),d=(0,s.useRef)(void 0);return(0,s.useEffect)((()=>{n(!0),o(null),d.current&&d.current.abort(),d.current="undefined"==typeof AbortController?void 0:new AbortController,a()({path:(0,i.addQueryArgs)("/wpcom/v2/following/mine",{ignore_user_blogs:e}),global:!0,method:"GET",signal:d.current?.signal}).then((e=>{e.length||o(__("No subscriptions found. You need to follow some sites in order to see results.","jetpack")),e=e.map((e=>(e.site_icon=(0,l.ZE)(e.site_icon),e))),u(e)})).catch((e=>{"AbortError"!==e.name&&(e.message?o(e.message):o(__("Whoops, we have encountered an error. Please try again later.","jetpack")))})).finally((()=>{d.current=null,n(!1)}))}),[e]),{isLoading:t,errorMessage:r,subscriptions:c}}},85101:(e,t,n)=>{"use strict";n.d(t,{FN:()=>o,ZE:()=>l,dy:()=>s,l$:()=>i});var r=n(74997),a=n(84954);function s(e){let t;try{t=new URL(e?.url)?.host.replace(/^www\./,"")}catch{t=e?.URL}return(0,r.createBlock)("jetpack/blogroll-item",{...e,...!e.name&&{name:t}})}function o(e){const{blog_id:t,site_icon:n,URL:r,name:a,description:o,is_non_wpcom_site:i}=e;return s({id:t,icon:n,url:r,name:a,description:o,is_non_wpcom_site:i})}function i(e){if(!e)return null;const t=new RegExp("^([a-zA-Z]+:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])?)\\.)+[a-z]{2,})","i");try{return new URL(e)?.host}catch{return e.match(t)?.[2]??null}}function l(e){return e||a}},60487:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(82170),a=n(56427),s=n(86087),o=n(27723),i=n(13022),l=n(66087);const __=o.__,c="09:00",u="17:00";class d extends s.Component{renderInterval=(e,t)=>{const{day:n}=this.props,{opening:o,closing:l}=e;return(0,r.createElement)(s.Fragment,{key:t},(0,r.createElement)("div",{className:"business-hours__row"},(0,r.createElement)("div",{className:(0,i.A)(n.name,"business-hours__day")},0===t&&this.renderDayToggle()),(0,r.createElement)("div",{className:(0,i.A)(n.name,"business-hours__hours")},(0,r.createElement)(a.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,type:"time",label:__("Opening","jetpack"),value:o,className:"business-hours__open",placeholder:c,onChange:e=>{this.setHour(e,"opening",t)}}),(0,r.createElement)(a.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,type:"time",label:__("Closing","jetpack"),value:l,className:"business-hours__close",placeholder:u,onChange:e=>{this.setHour(e,"closing",t)}})),(0,r.createElement)("div",{className:"business-hours__remove"},n.hours.length>1&&(0,r.createElement)(a.Button,{isSmall:!0,variant:"link",icon:"trash",label:__("Remove Hours","jetpack"),onClick:()=>{this.removeInterval(t)}}))),t===n.hours.length-1&&(0,r.createElement)("div",{className:"business-hours__row business-hours-row__add"},(0,r.createElement)("div",{className:(0,i.A)(n.name,"business-hours__day")}," "),(0,r.createElement)("div",{className:(0,i.A)(n.name,"business-hours__hours")},(0,r.createElement)(a.Button,{variant:"link",label:__("Add Hours","jetpack"),onClick:this.addInterval},__("Add Hours","jetpack"))),(0,r.createElement)("div",{className:"business-hours__remove"}," ")))};setHour=(e,t,n)=>{const{day:r,attributes:a,setAttributes:s}=this.props,{days:o}=a;s({days:o.map((a=>a.name===r.name?{...a,hours:a.hours.map(((r,a)=>a===n?{...r,[t]:e}:r))}:a))})};toggleClosed=e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:a}=n;r({days:a.map((n=>{if(n.name===t.name){const t=e?[{opening:c,closing:u}]:[];return{...n,hours:t}}return n}))})};addInterval=()=>{const{day:e,attributes:t,setAttributes:n}=this.props,{days:r}=t;e.hours.push({opening:"",closing:""}),n({days:r.map((t=>t.name===e.name?{...t,hours:e.hours}:t))})};removeInterval=e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:a}=n;r({days:a.map((n=>t.name===n.name?{...n,hours:n.hours.filter(((t,n)=>e!==n))}:n))})};isClosed(){const{day:e}=this.props;return(0,l.isEmpty)(e.hours)}renderDayToggle(){const{day:e,localization:t}=this.props;return(0,r.createElement)(s.Fragment,null,(0,r.createElement)("span",{className:"business-hours__day-name"},t.days[e.name]),(0,r.createElement)(a.ToggleControl,{__nextHasNoMarginBottom:!0,label:this.isClosed()?__("Closed","jetpack"):__("Open","jetpack"),checked:!this.isClosed(),onChange:this.toggleClosed}))}renderClosed(){const{day:e}=this.props;return(0,r.createElement)("div",{className:"business-hours__row business-hours-row__closed"},(0,r.createElement)("div",{className:(0,i.A)(e.name,"business-hours__day")},this.renderDayToggle()),(0,r.createElement)("div",{className:(0,i.A)(e.name,"closed","business-hours__hours")}," "),(0,r.createElement)("div",{className:"business-hours__remove"}," "))}render(){const{day:e}=this.props;return this.isClosed()?this.renderClosed():e.hours.map(this.renderInterval)}}const p=d},39943:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(82170),a=n(86087),s=n(27723),o=n(66087);const _x=s._x,i="undefined"!=typeof window&&window.navigator?.language||"en",l=Intl?.DateTimeFormat?new Intl.DateTimeFormat(i,{hour:"numeric",minute:"numeric",hour12:!0}):null;class c extends a.Component{formatTime(e){const[t,n]=e.split(":");if(!t||!n)return!1;const r=new Date;return r.setHours(t),r.setMinutes(n),l?l.format(r):e}renderInterval=(e,t)=>{const{day:n}=this.props,a=n.hours;return(0,r.createElement)("span",{key:t},(0,s.sprintf)("%1$s - %2$s",this.formatTime(e.opening),this.formatTime(e.closing)),a.length>1+t&&(0,r.createElement)("span",null,", "))};render(){const{day:e,localization:t}=this.props,n=e.hours.filter((e=>this.formatTime(e.opening)&&this.formatTime(e.closing)));return(0,r.createElement)("div",{className:"jetpack-business-hours__item"},(0,r.createElement)("dt",{className:e.name},t.days[e.name]),(0,r.createElement)("dd",null,(0,o.isEmpty)(n)?_x("Closed","business is closed on a full day","jetpack"):n.map(this.renderInterval),(0,r.createElement)("br",null)))}}const u=c},39155:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});var r=n(96072),a=n.n(r),s=n(82170),o=n(85985),i=n(1455),l=n.n(i),c=n(94715),u=n(56427),d=n(38443),p=n(86087),m=n(27723),h=n(9050),g=n(60487),f=n(39943);const __=m.__,v=(0,o.sh)(h),b={days:{Sun:__("Sunday","jetpack"),Mon:__("Monday","jetpack"),Tue:__("Tuesday","jetpack"),Wed:__("Wednesday","jetpack"),Thu:__("Thursday","jetpack"),Fri:__("Friday","jetpack"),Sat:__("Saturday","jetpack")},startOfWeek:0},k=e=>{const{attributes:t,isSelected:n}=e,r=(0,c.useBlockProps)(),[o,i]=(0,p.useState)(b),[m,h]=(0,p.useState)(!1),{days:k}=t,{startOfWeek:y}=o,E=k.concat(k.slice(0,y)).slice(y);let w;if((0,p.useEffect)((()=>{l()({path:"/wpcom/v2/business-hours/localized-week"}).then((e=>{i(e),h(!0)}),(()=>{i(b),h(!0)}))}),[]),m)if(n)w=(0,s.createElement)("div",{className:"is-edit"},E.map(((t,n)=>(0,s.createElement)(g.A,a()({key:n,day:t,localization:o},e)))));else{const e=(0,d.getSettings)(),{formats:{time:t}}=e;w=(0,s.createElement)("dl",{className:"jetpack-business-hours"},E.map(((e,n)=>(0,s.createElement)(f.A,{key:n,day:e,localization:o,timeFormat:t}))))}else w=(0,s.createElement)(u.Placeholder,{icon:v,label:__("Loading business hours","jetpack")});return(0,s.createElement)("div",r,w)}},71410:(e,t,n)=>{"use strict";var r=n(82170),a=n(94375),s=n(9050),o=n(39155);(0,a.M)(s,{edit:e=>(0,r.createElement)(o.A,e),save:()=>null})},7325:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(56427),a=n(66087);const s=(0,r.withFallbackStyles)(((e,t)=>{const{backgroundColor:n,textColor:r}=t,s=(0,a.get)(n,"color"),o=!(0,a.get)(r,"color")&&e?e.querySelector('[contenteditable="true"]'):null;return{fallbackBackgroundColor:s||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:r||!o?void 0:getComputedStyle(o).color}}))},28310:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(20710);const a={element:{type:"string",enum:["a","button","input"]},saveInPostContent:{type:"boolean",default:!1},uniqueId:{type:"string"},passthroughAttributes:{type:"object"},text:{type:"string"},placeholder:{type:"string"},url:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string",validator:r.A},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:r.A},gradient:{type:"string"},customGradient:{type:"string"},borderRadius:{type:"number"},width:{type:"string"}}},12365:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(82170),a=n(56427),s=n(86087),o=n(27723),i=n(8746);const __=o.__;function l({borderRadius:e="",setAttributes:t}){const n=(0,s.useCallback)((e=>t({borderRadius:e})),[t]);return(0,r.createElement)(a.PanelBody,{title:__("Border Settings","jetpack")},(0,r.createElement)(a.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,allowReset:!0,initialPosition:i.hc,label:__("Border radius","jetpack"),max:i.Bs,min:i.rG,onChange:n,value:e}))}},10179:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(82170),a=n(94715),s=n(27723);const __=s.__;function o({isGradientAvailable:e,backgroundColor:t,fallbackBackgroundColor:n,fallbackTextColor:s,gradientValue:o,setBackgroundColor:i,setGradient:l,setTextColor:c,textColor:u}){const d=(0,r.createElement)(a.ContrastChecker,{backgroundColor:t.color,fallbackBackgroundColor:n,fallbackTextColor:s,isLargeText:!1,textColor:u.color});return e?(0,r.createElement)(a.__experimentalPanelColorGradientSettings,{settings:[{colorValue:u.color,label:__("Text Color","jetpack"),onColorChange:c},{colorValue:t.color,gradientValue:o,label:__("Background","jetpack"),onColorChange:i,onGradientChange:l}],title:__("Background & Text Color","jetpack")},d):(0,r.createElement)(a.PanelColorSettings,{colorSettings:[{value:u.color,onChange:c,label:__("Text Color","jetpack")},{value:t.color,onChange:i,label:__("Background","jetpack")}],title:__("Background & Text Color","jetpack")},d)}},8746:(e,t,n)=>{"use strict";n.d(t,{Bs:()=>o,Uc:()=>a,hc:()=>s,rG:()=>i});var r=n(94715);const a=!!r.__experimentalUseGradient,s=5,o=50,i=0},2761:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(82170),a=n(47143),s=n(38062),o=n(12365),i=n(10179);function l({attributes:e,backgroundColor:t,clientId:n,context:l,fallbackBackgroundColor:c,fallbackTextColor:u,setAttributes:d,setBackgroundColor:p,setTextColor:m,textColor:h,gradientValue:g,setGradient:f,isGradientAvailable:v}){const{align:b,borderRadius:k}=e,y="jetpack/parentBlockWidth"in l,E=y?l["jetpack/parentBlockWidth"]:e.width,w=(0,a.useSelect)((e=>{const{getBlock:t,getBlockRootClientId:r}=e("core/block-editor");return t(r(n))})),{updateBlockAttributes:_}=(0,a.useDispatch)("core/block-editor");return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.A,{backgroundColor:t,fallbackBackgroundColor:c,fallbackTextColor:u,gradientValue:g,setBackgroundColor:p,setGradient:f,setTextColor:m,textColor:h,isGradientAvailable:v}),(0,r.createElement)(o.A,{borderRadius:k,setAttributes:d}),(0,r.createElement)(s.D,{align:b,width:E,onChange:e=>{y?_(w.clientId,{width:e}):d({width:e})}}))}},55903:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(96072),a=n.n(r),s=n(82170),o=n(94715),i=n(29491),l=n(27723),c=n(13022),u=n(89303),d=n(7325),p=n(8746),m=n(2761),h=n(81177);const __=l.__;const g=(0,i.compose)((0,o.withColors)({backgroundColor:"background-color"},{textColor:"color"}),d.A)((function(e){const{attributes:t,backgroundColor:n,className:r,clientId:i,context:l,setAttributes:d,textColor:g}=e,{borderRadius:f,element:v,placeholder:b,text:k,width:y,fontSize:E}=t,w="jetpack/parentBlockWidth"in l;(0,h.A)({attributes:t,clientId:i,setAttributes:d}),(0,u.A)({attributes:t,disableEffects:w,setAttributes:d});const{gradientClass:_,gradientValue:C,setGradient:A}=p.Uc?(0,o.__experimentalUseGradient)({gradientAttribute:"gradient",customGradientAttribute:"customGradient"}):{},x=(0,o.useBlockProps)({className:(0,c.A)("wp-block-button",r)}),j=(0,c.A)("wp-block-button__link",{"has-background":n.color||C,[n.class]:!C&&n.class,"has-text-color":g.color,[g.class]:g.class,[_]:_,"no-border-radius":0===f,"has-custom-width":!!y,[`has-${E}-font-size`]:!!E,"has-custom-font-size":!!E}),S={...!n.color&&C?{background:C}:{backgroundColor:n.color},fontSize:t.style?.typography?.fontSize,color:g.color,borderRadius:f?f+"px":void 0,width:y};return(0,s.createElement)("div",x,(0,s.createElement)(o.RichText,{allowedFormats:"input"===v?[]:void 0,className:j,disableLineBreaks:"input"===v,onChange:e=>d({text:e}),placeholder:b||__("Add text…","jetpack"),style:S,value:k,withoutInteractiveFormatting:!0}),(0,s.createElement)(o.InspectorControls,null,(0,s.createElement)(m.A,a()({gradientValue:C,setGradient:A,isGradientAvailable:p.Uc},e))))}))},45878:(e,t,n)=>{"use strict";var r=n(94375),a=n(5383);(0,r.A)(a.U,a.W)},36270:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(82170),a=n(56427);const s=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"}))},5383:(e,t,n)=>{"use strict";n.d(t,{U:()=>c,W:()=>u});var r=n(27723),a=n(97969),s=n(28310),o=n(55903),i=n(36270),l=n(85154);const __=r.__,c="button",u={apiVersion:3,title:__("Button","jetpack"),icon:i.A,category:(0,a.A)("design","layout"),keywords:[],supports:{html:!1,inserter:!1,align:["left","center","right"],typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}}},styles:[{name:"fill",label:__("Fill","jetpack"),isDefault:!0},{name:"outline",label:__("Outline","jetpack")}],attributes:s.A,edit:o.A,save:l.A,usesContext:["jetpack/parentBlockWidth"]}},85154:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(96072),a=n.n(r),s=n(82170),o=n(94715),i=n(13022),l=n(8746);function c({attributes:e,blockName:t,uniqueId:n}){const{backgroundColor:r,borderRadius:c,className:u,customBackgroundColor:d,customGradient:p,customTextColor:m,gradient:h,saveInPostContent:g,text:f,textColor:v,url:b,width:k,fontSize:y}=e;if(!g)return null;const E=o.useBlockProps.save(),w=(0,o.getColorClassName)("background-color",r),_=l.Uc?(0,o.__experimentalGetGradientClass)(h):void 0,C=(0,o.getColorClassName)("color",v),A=(0,i.A)("wp-block-button","jetpack-submit-button",u,E?.className,{[`wp-block-jetpack-${t}`]:t}),x=(0,i.A)("wp-block-button__link",{"has-text-color":v||m,[C]:C,"has-background":r||h||d||p,[w]:w,[_]:_,"no-border-radius":0===c,"has-custom-width":!!k,[`has-${y}-font-size`]:!!y,"has-custom-font-size":!!y}),j={background:p||void 0,backgroundColor:w||p||h?void 0:d,fontSize:e.style?.typography?.fontSize,color:C?void 0:m,borderRadius:c?c+"px":void 0,width:k};return(0,s.createElement)("div",a()({},E,{className:A}),(0,s.createElement)(o.RichText.Content,{className:x,"data-id-attr":n||"placeholder",href:b,id:n,rel:"noopener noreferrer",role:"button",style:j,tagName:"a",target:"_blank",value:f}))}},81177:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(47143),a=n(86087),s=n(66087);function o({attributes:e,clientId:t,setAttributes:n}){const{passthroughAttributes:o}=e,{attributesToSync:i}=(0,r.useSelect)((n=>{const{getBlockAttributes:r,getBlockRootClientId:a}=n("core/block-editor"),i=r(a(t))||{},l=(0,s.mapValues)(o,(e=>i[e]));return{attributesToSync:(0,s.pickBy)(l,((t,n)=>t!==e[n]))}}));(0,a.useEffect)((()=>{(0,s.isEmpty)(i)||n(i)}),[i,n])}},95816:(e,t,n)=>{"use strict";n.d(t,{a:()=>r});const r="https://calendly.com/wpcom/jetpack-block-example"},99723:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>d});var r=n(82170),a=n(85985),s=n(94715),o=n(56427),i=n(27723),l=n(5873);const __=i.__,_x=i._x,c=({onEditClick:e})=>(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{onClick:()=>e(!0)},__("Edit","jetpack"))),u=e=>{const{attributes:{hideEventTypeDetails:t,url:n},defaultClassName:s,embedCode:i,parseEmbedCode:l,setAttributes:c,setEmbedCode:u}=e;let d=null;return n&&(d=(0,a.d9)()||(0,a.Sy)()?"https://wordpress.com/support/wordpress-editor/blocks/calendly-block/#customize-the-calendly-block":"https://jetpack.com/support/jetpack-blocks/calendly-block/#customizing-a-calendly-block"),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{PanelBody:!0,title:__("Calendar settings","jetpack"),initialOpen:!1},(0,r.createElement)("form",{onSubmit:l,className:`${s}-embed-form-sidebar`},(0,r.createElement)("input",{type:"text",id:"embedCode",onChange:e=>u(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:i||"",className:"components-placeholder__input"}),(0,r.createElement)("div",null,(0,r.createElement)(o.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,r.createElement)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Hide event type details","jetpack"),checked:t,onChange:()=>c({hideEventTypeDetails:!t})})),d&&(0,r.createElement)(o.Notice,{className:`${s}-color-notice`,isDismissible:!1},(0,r.createElement)(o.ExternalLink,{href:d},__("Explore more customization options.","jetpack"))))},d=e=>{const{attributes:t,clientId:n,isEditingUrl:a,setAttributes:o,setIsEditingUrl:i}=e,{style:d,url:p}=t,m=[{value:"inline",label:__("Inline","jetpack")},{value:"link",label:__("Link","jetpack")}];return(0,r.createElement)(r.Fragment,null,p&&!a&&(0,r.createElement)(s.BlockControls,null,(0,r.createElement)(c,{onEditClick:i})),p&&(0,r.createElement)(l.A,{clientId:n,styleOptions:m,onSelectStyle:o,activeStyle:d,attributes:t,viewportWidth:500}),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(u,e)))}},19493:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(82170),a=n(74997),s=n(27723),o=n(20710);const __=s.__,i={attributes:{backgroundColor:{type:"string",default:"ffffff",validator:o.A},submitButtonText:{type:"string",default:__("Schedule time with me","jetpack")},submitButtonTextColor:{type:"string"},submitButtonBackgroundColor:{type:"string"},submitButtonClasses:{type:"string"},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:o.A},textColor:{type:"string",default:"4D5055",validator:o.A},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string",validator:o.A},customTextButtonColor:{type:"string",validator:o.A}},migrate:e=>{const{submitButtonText:t,submitButtonTextColor:n,submitButtonBackgroundColor:r,submitButtonClasses:s,backgroundButtonColor:o,textButtonColor:i,customBackgroundButtonColor:l,customTextButtonColor:c,...u}=e,d={text:(p=e).submitButtonText||__("Schedule time with me","jetpack"),textColor:p.submitButtonTextColor||p.textButtonColor,customTextColor:p.customTextButtonColor,backgroundColor:p.submitButtonBackgroundColor||p.backgroundButtonColor,customBackgroundColor:p.customBackgroundButtonColor,url:p.url};var p;return[u,[(0,a.createBlock)("jetpack/button",{element:"a",uniqueId:"calendly-widget-id",...d})]]},save:({attributes:{url:e}})=>(0,r.createElement)("a",{href:e},e)}},52385:(e,t,n)=>{"use strict";n.d(t,{A:()=>C});var r=n(96072),a=n.n(r),s=n(82170),o=n(85985),i=n(94715),l=n(74997),c=n(56427),u=n(47143),d=n(86087),p=n(27723),m=n(13022),h=n(66087),g=n(78218),f=n(56145),v=n(13248),b=n(95816),k=n(99723),y=n(38028);const __=p.__,_x=p._x,E="jetpack/button",w={element:"a",text:__("Schedule time with me","jetpack"),uniqueId:"calendly-widget-id",url:b.a},_=(0,o.sh)(v);const C=(0,c.withNotices)((function(e){const{attributes:t,clientId:n,name:r,noticeOperations:o,noticeUI:p,setAttributes:C}=e,A=(0,l.getBlockDefaultClassName)(r),x=(0,g.y)(v.attributes,t);(0,h.isEqual)(x,t)||C(x);const{backgroundColor:j,hideEventTypeDetails:S,primaryColor:N,textColor:R,style:P,url:L}=x,[T,B]=(0,d.useState)(L),[M,I]=(0,d.useState)(!1),[D,F]=(0,d.useState)(!1),[z,O]=(0,d.useState)({}),H=(0,i.useBlockProps)(),U=()=>{o.removeAllNotices(),o.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or code.","jetpack"))};(0,d.useEffect)((()=>{L&&b.a!==L&&"link"!==P&&(0,f.A)(L,F).catch((()=>{C({url:void 0}),U()}))}),[]);const V=e=>{if(!e)return void U();e.preventDefault();const t=(0,y.a9)(T);if(t){if(t.buttonAttributes&&"link"===t.style){const e=(0,u.select)("core/editor").getBlocksByClientId(n);e.length&&e[0].innerBlocks.forEach((e=>{(0,u.dispatch)("core/editor").updateBlockAttributes(e.clientId,t.buttonAttributes)})),O(t.buttonAttributes)}(0,f.A)(t.url,F).then((()=>{const e=(0,g.y)(v.attributes,t);C(e),I(!1),o.removeAllNotices()})).catch((()=>{C({url:void 0}),U()}))}else U()},q=(0,s.createElement)("div",{className:"wp-block-embed is-loading"},(0,s.createElement)(c.Spinner,null),(0,s.createElement)("p",null,__("Embedding…","jetpack"))),G=(0,s.createElement)(c.Placeholder,{label:__("Calendly","jetpack"),instructions:__("Enter your Calendly web address or embed code below.","jetpack"),icon:_,notices:p},(0,s.createElement)("form",{onSubmit:V},(0,s.createElement)("input",{type:"text",id:"embedCode",onChange:e=>B(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:T||"",className:"components-placeholder__input"}),(0,s.createElement)("div",null,(0,s.createElement)(c.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,s.createElement)("div",{className:`${A}-learn-more`},(0,s.createElement)(c.ExternalLink,{href:"https://help.calendly.com/hc/en-us/articles/223147027-Embed-options-overview"},__("Need help finding your embed code?","jetpack")))),$=(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:`${A}-overlay`}),(0,s.createElement)("iframe",{src:(()=>{const e=new URLSearchParams({embed_domain:"wordpress.com",embed_type:"Inline",hide_event_type_details:S?1:0,background_color:j,primary_color:N,text_color:R});return`${L}?${e}`})(),width:"100%",height:"100%",frameBorder:"0","data-origwidth":"100%","data-origheight":"100%",title:"Calendly"})),W=(0,s.createElement)(i.InnerBlocks,{template:[[E,{...w,...z,passthroughAttributes:{url:"url"}}]],templateLock:"all"});return D?q:(0,s.createElement)("div",a()({},H,{className:(0,m.A)(H.className,{[`calendly-style-${P}`]:L&&!M})}),(0,s.createElement)(k.Ay,a()({},e,{defaultClassName:A,embedCode:T,isEditingUrl:M,parseEmbedCode:V,setEmbedCode:B,setIsEditingUrl:I})),L&&!M?"inline"===P?$:W:G)}))},60312:(e,t,n)=>{"use strict";var r=n(74997),a=n(94375),s=n(13248),o=n(19493),i=n(52385),l=n(2668),c=n(38028);(0,a.M)(s,{edit:i.A,save:l.A,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&c.QL.test(e.textContent),transform:e=>{const t=(0,c.a9)(e.textContent);return(0,r.createBlock)("jetpack/calendly",t)}}]},deprecated:[o.A]})},2668:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(82170),a=n(94715);function s(){const e=a.useBlockProps.save();return(0,r.createElement)("div",e,(0,r.createElement)(a.InnerBlocks.Content,null))}},38028:(e,t,n)=>{"use strict";n.d(t,{QL:()=>r,a9:()=>a});const r=/(^|\/\/)(calendly\.com[^"']*)/i,a=e=>{if(!e)return;const t=(e=>{const t=e.match(r);if(t)return"https://"+t[2]})(e);if(!t)return;const n=(e=>{const t={},n=new URL(e);if(t.url=n.origin+n.pathname,!n.search)return t;const r=new URLSearchParams(n.search),a=r.get("background_color"),s=r.get("primary_color"),o=r.get("text_color"),i=/^[A-Za-z0-9]{6}$/;return r.get("hide_event_type_details")&&(t.hideEventTypeDetails=r.get("hide_event_type_details")),a&&a.match(i)&&(t.backgroundColor=a),s&&s.match(i)&&(t.primaryColor=s),o&&o.match(i)&&(t.textColor=o),t})(t),a=(e=>e.indexOf("data-url")>0?"inline":e.indexOf("initPopupWidget")>0||e.indexOf("initBadgeWidget")>0?"link":void 0)(e);if(a&&(n.style=a),"link"===a){n.buttonAttributes={};const t=(e=>{let t=e.match(/false;">([^<]+)<\//);return t?t[1]:(t=e.match(/text: '([^']*?)'/),t?t[1]:void 0)})(e);t&&(n.buttonAttributes.text=t);const r=(e=>{const t=e.match(/textColor: '([^']*?)'/);if(t)return t[1]})(e);r&&(n.buttonAttributes.textColor=void 0,n.buttonAttributes.customTextColor=r);const a=(e=>{const t=e.match(/color: '([^']*?)'/);if(t)return t[1]})(e);a&&(n.buttonAttributes.backgroundColor=void 0,n.buttonAttributes.customBackgroundColor=a)}return n}},98091:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(82170),a=n(94715),s=n(56427),o=n(86087),i=n(27723),l=n(13022),c=n(81942);const __=i.__;class u extends o.Component{constructor(...e){super(...e),this.preventEnterKey=this.preventEnterKey.bind(this)}preventEnterKey(e){"Enter"===e.key&&e.preventDefault()}render(){const{attributes:{address:e,addressLine2:t,addressLine3:n,city:i,region:u,postal:d,country:p,linkToGoogleMaps:m},isSelected:h,setAttributes:g}=this.props,f=[e,t,n,i,u,d,p].some((e=>""!==e)),v=(0,l.A)({"jetpack-address-block":!0,"is-selected":h}),b=(0,r.createElement)(s.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Link address to Google Maps","jetpack"),checked:m,onChange:e=>g({linkToGoogleMaps:e})});return(0,r.createElement)("div",{className:v},!h&&f&&(0,c.A)(this.props),(h||!f)&&(0,r.createElement)(o.Fragment,null,(0,r.createElement)(a.PlainText,{value:e,placeholder:__("Street Address","jetpack"),"aria-label":__("Street Address","jetpack"),onChange:e=>g({address:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(a.PlainText,{value:t,placeholder:__("Address Line 2","jetpack"),"aria-label":__("Address Line 2","jetpack"),onChange:e=>g({addressLine2:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(a.PlainText,{value:n,placeholder:__("Address Line 3","jetpack"),"aria-label":__("Address Line 3","jetpack"),onChange:e=>g({addressLine3:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(a.PlainText,{value:i,placeholder:__("City","jetpack"),"aria-label":__("City","jetpack"),onChange:e=>g({city:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(a.PlainText,{value:u,placeholder:__("State/Province/Region","jetpack"),"aria-label":__("State/Province/Region","jetpack"),onChange:e=>g({region:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(a.PlainText,{value:d,placeholder:__("Postal/Zip Code","jetpack"),"aria-label":__("Postal/Zip Code","jetpack"),onChange:e=>g({postal:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(a.PlainText,{value:p,placeholder:__("Country","jetpack"),"aria-label":__("Country","jetpack"),onChange:e=>g({country:e}),onKeyDown:this.preventEnterKey}),b))}}const d=u},39563:(e,t,n)=>{"use strict";n.d(t,{U:()=>u,W:()=>d});var r=n(82170),a=n(56427),s=n(86087),o=n(27723),i=n(62289),l=n(98091),c=n(81942);const __=o.__,_x=o._x,u="address",d={title:__("Address","jetpack"),description:__("Lets you add a physical address with Schema markup.","jetpack"),keywords:[_x("location","block search term","jetpack"),_x("direction","block search term","jetpack"),_x("place","block search term","jetpack")],icon:(0,i.A)((0,r.createElement)(s.Fragment,null,(0,r.createElement)(a.Path,{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zM7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 2.88-2.88 7.19-5 9.88C9.92 16.21 7 11.85 7 9z"}),(0,r.createElement)(a.Circle,{cx:"12",cy:"9",r:"2.5"}))),category:"grow",attributes:{address:{type:"string",default:""},addressLine2:{type:"string",default:""},addressLine3:{type:"string",default:""},city:{type:"string",default:""},region:{type:"string",default:""},postal:{type:"string",default:""},country:{type:"string",default:""},linkToGoogleMaps:{type:"boolean",default:!1}},parent:["jetpack/contact-info"],edit:l.A,save:c.A}},81942:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(82170),a=n(86087),s=n(27723);const __=s.__,o=({attributes:{address:e,addressLine2:t,addressLine3:n,city:s,region:o,postal:i,country:l}})=>(0,r.createElement)(a.Fragment,null,e&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address1"},e),t&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address2"},t),n&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address3"},n),s&&!(o||i)&&(0,r.createElement)("div",{className:"jetpack-address__city"},s),s&&(o||i)&&(0,r.createElement)("div",null,(0,r.createElement)("span",{className:"jetpack-address__city"},s),", ",(0,r.createElement)("span",{className:"jetpack-address__region"},o)," ",(0,r.createElement)("span",{className:"jetpack-address__postal"},i)),!s&&(o||i)&&(0,r.createElement)("div",null,(0,r.createElement)("span",{className:"jetpack-address__region"},o)," ",(0,r.createElement)("span",{className:"jetpack-address__postal"},i)),l&&(0,r.createElement)("div",{className:"jetpack-address__country"},l)),i=({attributes:{address:e,addressLine2:t,addressLine3:n,city:r,region:a,postal:s,country:o}})=>{let i=a?`+${a},`:"";i=s?`${i}+${s}`:i;return`https://www.google.com/maps/search/${e?`${e},`:""}${t?`${t},`:""}${n?`${n},`:""}${r?`+${r},`:""}${i}${o?`+${o}`:""}`.replace(" ","+")},l=e=>(({address:e,addressLine2:t,addressLine3:n,city:r,region:a,postal:s,country:o})=>[e,t,n,r,a,s,o].some((e=>""!==e)))(e.attributes)&&(0,r.createElement)("div",{className:e.className},e.attributes.linkToGoogleMaps&&(0,r.createElement)("a",{href:i(e),target:"_blank",rel:"noopener noreferrer",title:__("Open address in Google Maps","jetpack")},(0,r.createElement)(o,e)),!e.attributes.linkToGoogleMaps&&(0,r.createElement)(o,e))},44246:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(96072),a=n.n(r),s=n(82170),o=n(94715),i=n(13022);const l=["jetpack/markdown","jetpack/address","jetpack/email","jetpack/phone","jetpack/map","jetpack/business-hours","core/paragraph","core/image","core/heading","core/gallery","core/list","core/quote","core/shortcode","core/audio","core/code","core/cover","core/html","core/separator","core/spacer","core/subhead","core/video"],c=[["jetpack/email"],["jetpack/phone"],["jetpack/address"]],u=e=>{const{isSelected:t}=e,n=(0,o.useBlockProps)();return(0,s.createElement)("div",a()({},n,{className:(0,i.A)(n.className,{"jetpack-contact-info-block":!0,"is-selected":t})}),(0,s.createElement)(o.InnerBlocks,{allowedBlocks:l,templateLock:!1,template:c}))}},25907:(e,t,n)=>{"use strict";var r=n(74997),a=n(94375),s=n(39563),o=n(75173),i=n(44246),l=n(90951),c=n(70063),u=n(36611);(0,a.M)(o,{edit:i.A,save:u.A,transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"widget_contact_info"===e,transform:({instance:e})=>{let t=[(0,r.createBlock)("core/heading",{content:e.raw.title}),(0,r.createBlock)("jetpack/email",{email:e.raw.email}),(0,r.createBlock)("jetpack/phone",{phone:e.raw.phone}),(0,r.createBlock)("jetpack/address",{address:e.raw.address})];return e.raw.hours&&(t=[...t,(0,r.createBlock)("core/paragraph",{content:e.raw.hours})]),e.raw.showmap&&e.raw.address&&(t=[...t,(0,r.createBlock)("jetpack/map",{address:e.raw.address})]),(0,r.createBlock)("jetpack/contact-info",{},t)}}]}},[{name:s.U,settings:s.W},{name:l.U,settings:l.W},{name:c.U,settings:c.W}])},43167:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(27723),a=n(64882),s=n(27266);const __=r.__,o=e=>{const{setAttributes:t}=e;return(0,a.A)("email",e,__("Email","jetpack"),s.A,(e=>t({email:e})))}},90951:(e,t,n)=>{"use strict";n.d(t,{U:()=>c,W:()=>u});var r=n(82170),a=n(56427),s=n(27723),o=n(62289),i=n(43167),l=n(27266);const __=s.__,_x=s._x,c="email",u={title:__("Email Address","jetpack"),description:__("Lets you add an email address with an automatically generated click-to-email link.","jetpack"),keywords:["e-mail","email",_x("message","block search term","jetpack")],icon:(0,o.A)((0,r.createElement)(a.Path,{d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"})),category:"grow",attributes:{email:{type:"string",default:""}},edit:i.A,save:l.A,parent:["jetpack/contact-info"]}},27266:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(82170),a=n(86087),s=n(39904);const o=({attributes:{email:e},className:t})=>e&&(0,r.createElement)("div",{className:t},e.split(/(\s+)/).map(((e,t)=>{const n=e.replace(/([.,/#!$%^&*;:{}=\-_`~()\][])+$/g,"");return e.indexOf("@")&&s.validate(n)?e===n?(0,r.createElement)("a",{href:`mailto:${e}`,key:t},e):(0,r.createElement)(a.Fragment,{key:t},(0,r.createElement)("a",{href:`mailto:${e}`,key:t},n),(0,r.createElement)(a.Fragment,null,e.slice(-(e.length-n.length)))):(0,r.createElement)(a.Fragment,{key:t},e)})))},42711:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(27723),a=n(64882),s=n(84330);const __=r.__,o=e=>{const{setAttributes:t}=e;return(0,a.A)("phone",e,__("Phone number","jetpack"),s.A,(e=>t({phone:e})))}},70063:(e,t,n)=>{"use strict";n.d(t,{U:()=>c,W:()=>u});var r=n(82170),a=n(56427),s=n(27723),o=n(62289),i=n(42711),l=n(84330);const __=s.__,_x=s._x,c="phone",u={title:__("Phone Number","jetpack"),description:__("Lets you add a phone number with an automatically generated click-to-call link.","jetpack"),keywords:[_x("mobile","block search term","jetpack"),_x("telephone","block search term","jetpack"),_x("cell","block search term","jetpack")],icon:(0,o.A)((0,r.createElement)(a.Path,{d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79h1.51m9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75l1.2-1.19M7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1z"})),category:"grow",attributes:{phone:{type:"string",default:""}},parent:["jetpack/contact-info"],edit:i.A,save:l.A}},84330:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(82170);const a=({attributes:{phone:e},className:t})=>e&&(0,r.createElement)("div",{className:t},function(e){const t=e.match(/\d+\.\d+|\d+\b|\d+(?=\w)/g);if(!t)return e;const n=e.indexOf(t[0]);let a=n?e.substring(n-1):e,s=n?e.substring(0,n):"",o=a.replace(/\D/g,"");return/[0-9/+/(]/.test(a[0])?(s=s.slice(0,-1),"+"===a[0]&&(o="+"+o)):a=a.substring(1),[s.trim()?(0,r.createElement)("span",{key:"phonePrefix",className:"phone-prefix"},s):null,(0,r.createElement)("a",{key:"phoneNumber",href:`tel:${o}`},a)]}(e))},36611:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(82170),a=n(94715);const s=()=>{const e=a.useBlockProps.save();return(0,r.createElement)("div",e,(0,r.createElement)(a.InnerBlocks.Content,null))}},68071:(e,t,n)=>{"use strict";n.d(t,{a:()=>a});var r=n(27723);const __=r.__,a=(0,r.sprintf)( // translators: %s is a link to the cookie policy. -__("Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: %s.","jetpack"),`${__("Cookie Policy","jetpack")}`)},15216:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var a=n(96072),r=n.n(a),s=n(82170),o=n(94715),i=n(56427),l=n(27723),c=n(68071),u=n(34839);const __=l.__;const d=function({clientId:e,attributes:t,setAttributes:n}){const{consentExpiryDays:a,align:d,text:p=c.a}=t;(0,u.w)(e);const m=(0,o.useBlockProps)({className:`wp-block-jetpack-cookie-consent align${d}`});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(o.InspectorControls,null,(0,s.createElement)(i.PanelBody,{title:__("Block Settings","jetpack")},(0,s.createElement)(i.SelectControl,{label:__("Alignment","jetpack"),value:d,options:[{label:(0,l.isRTL)()?__("Right","jetpack"):__("Left","jetpack"),value:"left"},{label:__("Full","jetpack"),value:"full"},{label:__("Wide","jetpack"),value:"wide"},{label:(0,l.isRTL)()?__("Left","jetpack"):__("Right","jetpack"),value:"right"}],onChange:e=>function(e){const t=["wide","full"].includes(e)?{width:void 0,height:void 0}:{};n({...t,align:e})}(e),__nextHasNoMarginBottom:!0}),(0,s.createElement)(i.TextControl,{label:__("Consent Expiry Time (in days)","jetpack"),value:a,type:"number",min:"1",max:"365",onChange:e=>n({consentExpiryDays:parseInt(e)}),__nextHasNoMarginBottom:!0}),(0,s.createElement)("p",null,__("Note: The block position in the editor is not indicative of the position on the front end. The block will always be positioned at the bottom of the page.","jetpack")))),(0,s.createElement)("div",r()({},m,{style:m.style}),(0,s.createElement)(o.RichText,{tagName:"p",value:p,onChange:e=>n({text:e})}),(0,s.createElement)(o.InnerBlocks,{allowedBlocks:["core/button"],template:[["core/button",{text:__("Accept","jetpack")}]],templateLock:"all"})))}},78165:(e,t,n)=>{"use strict";var a=n(94375),r=n(74095),s=n(15216),o=n(75757);(0,a.M)(r,{edit:s.A,save:o.A})},75757:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(96072),r=n.n(a),s=n(82170),o=n(94715),i=n(68071);function l({attributes:e}){const t=o.useBlockProps.save(),{text:n=i.a,consentExpiryDays:a}=e;return(0,s.createElement)("div",r()({},t,{style:t.style,role:"dialog","aria-modal":"true"}),(0,s.createElement)(o.RichText.Content,{tagName:"p",value:n}),(0,s.createElement)(o.InnerBlocks.Content,null),(0,s.createElement)("span",null,a))}},34839:(e,t,n)=>{"use strict";n.d(t,{w:()=>l});var a=n(74997),r=n(29491),s=n(3582),o=n(47143),i=n(86087);function l(e){const t=(0,o.useSelect)((e=>{const{isSavingPost:t,isSavingNonPostEntityChanges:n}=e("core/editor");return t()||n()}),[]),n=!(!(0,r.usePrevious)(t)||t),[,l]=(0,s.useEntityProp)("root","site","cookie_consent_template"),{saveEditedEntityRecord:c}=(0,o.useDispatch)(s.store),[u,d]=(0,i.useState)(!1),p=(0,o.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");return t})),m=(0,i.useCallback)((e=>{d(!0),l(e),c("root","site",void 0,{cookie_consent_template:e}).finally((()=>{d(!1)}))}),[d,l,c]);(0,i.useEffect)((()=>()=>{p(e)||m(null)}),[]),(0,i.useEffect)((()=>{n&&!u&&m((0,a.serialize)([p(e)]))}),[n,u,m,p,e])}},75800:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var a=n(82170),r=n(4567),s=n(3975),o=n(94715),i=n(86087),l=n(13022),c=n(72730);const u=({className:e=null,currency:t=null,defaultValue:n=null,disabled:u=!1,label:d="",onChange:p=null,value:m=""})=>{const[h,g]=(0,i.useState)((0,r.Ay)(m,t,{symbol:""})),[f,v]=(0,i.useState)(!1),[b,k]=(0,i.useState)(!1),y=(0,i.useRef)(null),E=(0,i.useCallback)(((e,n)=>{g((a=>{if(e!==a){const a=(0,c.C_)(e,t);a&&a>=(0,c.dv)(t)?(k(!1),n&&p?.(a)):k(!0)}return e}))}),[t,p]),w=()=>{y.current&&(y.current.focus(),v(!0))};return(0,i.useEffect)((()=>{if(!y.current)return;const e=y.current,a=()=>{v(!1),h||E((0,r.Ay)(n,t,{symbol:""}))};return e.addEventListener("blur",a),()=>{e.removeEventListener("blur",a)}}),[t,n,h,y,E]),(0,i.useEffect)((()=>{f||b||g((0,r.Ay)(m,t,{symbol:""}))}),[t,f,b,m]),(0,i.useEffect)((()=>{E((0,r.Ay)(m,t,{symbol:""}))}),[t,m]),(0,a.createElement)("div",{className:(0,l.A)("donations__amount",e,{"has-focus":f,"has-error":b}),role:"button",tabIndex:0,onClick:w,onKeyDown:w},s.y[t].symbol,u?(0,a.createElement)("div",{className:"donations__amount-value"},(0,r.Ay)(m||n,t,{symbol:""})):(0,a.createElement)(o.RichText,{allowedFormats:[],"aria-label":d,onChange:e=>E(e,!0),placeholder:(0,r.Ay)(n,t,{symbol:""}),ref:y,value:h,withoutInteractiveFormatting:!0}))}},57018:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var a=n(82170),r=n(3975),s=n(85985),o=n(94715),i=n(56427),l=n(27723),c=n(48558),u=n(72730);const __=l.__,d=e=>{const{attributes:t,setAttributes:n}=e,{currency:l,oneTimeDonation:d,monthlyDonation:p,annualDonation:m,showCustomAmount:h}=t,g=(e,a)=>{const r={"1 month":"monthlyDonation","1 year":"annualDonation"}[e],s=t[r];n({[r]:{...s,show:a}})};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(o.BlockControls,null,(0,a.createElement)(i.ToolbarGroup,null,(0,a.createElement)(i.ToolbarItem,null,(()=>(0,a.createElement)(i.Dropdown,{contentClassName:"jetpack-donations__currency-popover",renderToggle:({onToggle:e,isOpen:t})=>(0,a.createElement)(i.ToolbarButton,{className:"jetpack-donations__currency-toggle",icon:(0,a.createElement)(a.Fragment,null,l+" - "+r.y[l].symbol,(0,a.createElement)(i.Dashicon,{icon:"arrow-down"})),label:__("Change currency","jetpack"),onClick:e,onKeyDown:n=>{t||n.keyCode!==c.DOWN||(n.preventDefault(),n.stopPropagation(),e())}}),renderContent:({onClose:e})=>(0,a.createElement)(i.MenuGroup,null,Object.keys(u.VK).map((t=>(0,a.createElement)(i.MenuItem,{isSelected:t===l,icon:t===l?"yes":"",onClick:()=>{(e=>{const t=(0,u.Xj)(e);n({currency:e,oneTimeDonation:{...d,amounts:t},monthlyDonation:{...p,amounts:t},annualDonation:{...m,amounts:t}})})(t),e()},key:`jetpack-donations-currency-${t}`},t+" - "+r.y[t].symbol))))}))))),(0,a.createElement)(o.InspectorControls,null,(0,a.createElement)(i.PanelBody,{title:__("Settings","jetpack")},(0,a.createElement)(i.ToggleControl,{checked:p.show,onChange:e=>g("1 month",e),label:__("Show monthly donations","jetpack"),__nextHasNoMarginBottom:!0}),(0,a.createElement)(i.ToggleControl,{checked:m.show,onChange:e=>g("1 year",e),label:__("Show annual donations","jetpack"),__nextHasNoMarginBottom:!0}),(0,a.createElement)(i.ToggleControl,{checked:h,onChange:e=>n({showCustomAmount:e}),label:__("Show custom amount option","jetpack"),__nextHasNoMarginBottom:!0}),(0,a.createElement)(i.ExternalLink,{href:`https://wordpress.com/earn/payments/${(0,s.GE)()}`},__("View donation earnings","jetpack")))))}},27718:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var a=n(82170),r=n(4567),s=n(3975),o=n(94715),i=n(27723),l=n(72730);const __=i.__,c={attributes:{currency:{type:"string",default:"USD"},oneTimeDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a one-time donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate","jetpack")}},monthlyDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a monthly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate monthly","jetpack")}},annualDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a yearly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate yearly","jetpack")}},showCustomAmount:{type:"boolean",default:!0},chooseAmountText:{type:"string",default:__("Choose an amount","jetpack")},customAmountText:{type:"string",default:__("Or enter a custom amount","jetpack")}},supports:{html:!1},save:({attributes:e})=>{const{currency:t,oneTimeDonation:n,monthlyDonation:i,annualDonation:c,showCustomAmount:u,chooseAmountText:d,customAmountText:p}=e;if(!n||!n.show||-1===n.planId)return null;const m={"one-time":{title:__("One-Time","jetpack")},...i.show&&{"1 month":{title:__("Monthly","jetpack")}},...c.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"donations__container"},Object.keys(m).length>1&&(0,a.createElement)("div",{className:"donations__nav"},Object.entries(m).map((([e,{title:t}])=>(0,a.createElement)("div",{role:"button",tabIndex:0,className:"donations__nav-item",key:`jetpack-donations-nav-item-${e} `,"data-interval":e},t)))),(0,a.createElement)("div",{className:"donations__content"},(0,a.createElement)("div",{className:"donations__tab"},(0,a.createElement)(o.RichText.Content,{tagName:"h4",className:"donations__one-time-item",value:n.heading}),i.show&&(0,a.createElement)(o.RichText.Content,{tagName:"h4",className:"donations__monthly-item",value:i.heading}),c.show&&(0,a.createElement)(o.RichText.Content,{tagName:"h4",className:"donations__annual-item",value:c.heading}),(0,a.createElement)(o.RichText.Content,{tagName:"p",value:d}),(0,a.createElement)("div",{className:"donations__amounts donations__one-time-item"},n.amounts.map((e=>(0,a.createElement)("div",{key:e,className:"donations__amount","data-amount":e},(0,r.Ay)(e,t))))),i.show&&(0,a.createElement)("div",{className:"donations__amounts donations__monthly-item"},i.amounts.map((e=>(0,a.createElement)("div",{key:e,className:"donations__amount","data-amount":e},(0,r.Ay)(e,t))))),c.show&&(0,a.createElement)("div",{className:"donations__amounts donations__annual-item"},c.amounts.map((e=>(0,a.createElement)("div",{key:e,className:"donations__amount","data-amount":e},(0,r.Ay)(e,t))))),u&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(o.RichText.Content,{tagName:"p",value:p}),(0,a.createElement)("div",{className:"donations__amount donations__custom-amount"},s.y[t].symbol,(0,a.createElement)("div",{className:"donations__amount-value","data-currency":t,"data-empty-text":(0,r.Ay)(100*(0,l.dv)(t),t,{symbol:""})}))),(0,a.createElement)("div",{className:"donations__separator"},"——"),(0,a.createElement)(o.RichText.Content,{tagName:"p",className:"donations__one-time-item",value:n.extraText}),i.show&&(0,a.createElement)(o.RichText.Content,{tagName:"p",className:"donations__monthly-item",value:i.extraText}),c.show&&(0,a.createElement)(o.RichText.Content,{tagName:"p",className:"donations__annual-item",value:c.extraText}),(0,a.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__one-time-item"},(0,a.createElement)(o.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__one-time-item",value:n.buttonText})),i.show&&(0,a.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__monthly-item"},(0,a.createElement)(o.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__monthly-item",value:i.buttonText})),c.show&&(0,a.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__annual-item"},(0,a.createElement)(o.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__annual-item",value:c.buttonText}))))))}}},31152:(e,t,n)=>{"use strict";n.d(t,{A:()=>w});var a=n(96072),r=n.n(a),s=n(82170),o=n(56461),i=n(94715),l=n(47143),c=n(86087),u=n(27723),d=n(2274),p=n(53796),m=n(72730),h=n(27574),g=n(26247),f=n(16521),v=n(3696),b=n(70975),k=n(93033),y=n(79085),E=n(36580);const __=u.__,w=e=>{const{attributes:t,setAttributes:n}=e,{currency:a}=t,u=(0,i.useBlockProps)(),[w,_]=(0,c.useState)(""),[C,A]=(0,c.useState)([]),x=(0,g.A)(),{lockPostSaving:j,unlockPostSaving:S}=(0,l.useDispatch)("core/editor"),N=(0,l.useSelect)((e=>e("core/editor").getCurrentPost()),[]),R=(0,l.useSelect)((e=>e("core/editor").isPostSavingLocked()),[]),P=(0,l.useSelect)((e=>e(f.M).getConnectUrl()||""),[]),{setConnectUrl:L,setConnectedAccountDefaultCurrency:T}=(0,l.useDispatch)(v.EF),B=(0,l.useSelect)((e=>e(v.EF).getConnectedAccountDefaultCurrency()));(0,c.useEffect)((()=>{if(!a&&B&&!R){const e=B.toUpperCase(),t=!!m.VK[e];n(t?{currency:e}:{currency:"USD"})}}),[a,B,R,n]);const M=e=>{_(e)};let I;return(0,c.useEffect)((()=>{j("donations");const e=e=>e.reduce(((e,{id:t,currency:n,type:r,interval:s})=>(n===a&&"donation"===r&&(e[s]=t),e)),{});(0,k.A)("donation").then((t=>{if(!t&&"object"!=typeof t||t.errors)return S("donations"),void _(__("Could not load data from WordPress.com.","jetpack"));L((0,h.A)(N.id,t.connect_url)),T(t?.connected_account_default_currency?.toUpperCase());const n=e(t.products);return(e=>{const t=Object.keys(e);return t.includes("one-time")&&t.includes("1 month")&&t.includes("1 year")})(n)?(A(n),void S("donations")):t.connect_url?(A({"one-time":-1,"1 month":-1,"1 year":-1}),void S("donations")):(a&&(0,b.A)(a).then((t=>{A(e(t)),S("donations")}),M),void S("donations"))}),M)}),[j,a,N.id,L,T,S]),I=x?w?(0,s.createElement)(y.A,{error:w}):P?(0,s.createElement)(p.V,{blockName:"donations"}):a?(0,s.createElement)(E.A,r()({},e,{products:C})):(0,s.createElement)(o.A,{color:"black"}):(0,s.createElement)(d.A,{block:"Donations Form",explanation:__("Connect your WordPress.com account to enable donations.","jetpack")}),(0,s.createElement)("div",u,I)}},46197:(e,t,n)=>{"use strict";var a=n(94375),r=n(87325),s=n(27718),o=n(31152),i=n(47693);(0,a.M)(r,{edit:o.A,save:i.A,deprecated:[s.A]})},70975:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(1455),r=n.n(a);const s=async e=>{try{return await r()({path:"/wpcom/v2/memberships/products",method:"POST",data:{type:"donation",currency:e,is_editable:!1}})}catch(e){return Promise.reject(e.message)}}},93033:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(1455),r=n.n(a),s=n(93832);const o=async(e=null)=>{const t=new URLSearchParams(window.location.search),n=(0,s.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===t.get("origin")?"gutenberg-wpcom":"gutenberg",...e&&{type:e},is_editable:!1});try{return await r()({path:n,method:"GET"})}catch(e){return Promise.reject(e.message)}}},79085:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(82170),r=n(56427),s=n(27723);const __=s.__,o=({error:e})=>(0,a.createElement)(r.Placeholder,{icon:"lock",label:__("Donations","jetpack"),instructions:e})},47693:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(82170),r=n(94715);const s=(0,n(75703).O)(),o=({attributes:e})=>{const{fallbackLinkUrl:t,oneTimeDonation:n,monthlyDonation:o,annualDonation:i}=e;if(!n||!n.show||!n.planId||-1===n.planId)return null;const l=r.useBlockProps.save();return(0,a.createElement)("div",l,(0,a.createElement)(r.RichText.Content,{tagName:"h4",value:s.oneTimeDonation?.heading}),(0,a.createElement)(r.RichText.Content,{tagName:"p",value:n.extraText??s.extraText}),(0,a.createElement)(r.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:s.oneTimeDonation?.buttonText}),o.show&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("hr",{className:"donations__separator"}),(0,a.createElement)(r.RichText.Content,{tagName:"h4",value:s.monthlyDonation?.heading}),(0,a.createElement)(r.RichText.Content,{tagName:"p",value:o.extraText??s.extraText}),(0,a.createElement)(r.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:s.monthlyDonation?.buttonText})),i.show&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("hr",{className:"donations__separator"}),(0,a.createElement)(r.RichText.Content,{tagName:"h4",value:s.annualDonation?.heading}),(0,a.createElement)(r.RichText.Content,{tagName:"p",value:i.extraText??s.extraText}),(0,a.createElement)(r.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:s.annualDonation?.buttonText})))}},62225:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var a=n(82170),r=n(94715),s=n(47143),o=n(27723),i=n(72730),l=n(75800),c=n(75703);const __=o.__,u=(0,c.O)(),d=({activeTab:e,attributes:t,setAttributes:n})=>{const{currency:c,oneTimeDonation:d,monthlyDonation:p,annualDonation:m,showCustomAmount:h,chooseAmountText:g=u.chooseAmountText,customAmountText:f=u.customAmountText}=t,v={"one-time":"oneTimeDonation","1 month":"monthlyDonation","1 year":"annualDonation"}[e],b=e=>t[v][e],k=(e,a)=>{const r=t[v];n({[v]:{...r,[e]:a}})},y=(0,i.Xj)(c),E=b("amounts"),w=(0,s.useSelect)((e=>e("core/rich-text").getFormatTypes()),[]).map((e=>e.name)).filter((e=>"core/link"!==e));return(0,a.createElement)("div",{className:"donations__tab"},(0,a.createElement)(r.RichText,{tagName:"h4",placeholder:__("Write a message…","jetpack"),value:b("heading")||u[v]?.heading,onChange:e=>k("heading",e)}),(0,a.createElement)(r.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:g,onChange:e=>n({chooseAmountText:e})}),(0,a.createElement)("div",{className:"donations__amounts"},E.map(((e,t)=>(0,a.createElement)(l.A,{currency:c,defaultValue:y[t],label:(0,o.sprintf)( +__("Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: %s.","jetpack"),`${__("Cookie Policy","jetpack")}`)},15216:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(96072),a=n.n(r),s=n(82170),o=n(94715),i=n(56427),l=n(27723),c=n(68071),u=n(34839);const __=l.__;const d=function({clientId:e,attributes:t,setAttributes:n}){const{consentExpiryDays:r,align:d,text:p=c.a}=t;(0,u.w)(e);const m=(0,o.useBlockProps)({className:`wp-block-jetpack-cookie-consent align${d}`});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(o.InspectorControls,null,(0,s.createElement)(i.PanelBody,{title:__("Block Settings","jetpack")},(0,s.createElement)(i.SelectControl,{label:__("Alignment","jetpack"),value:d,options:[{label:(0,l.isRTL)()?__("Right","jetpack"):__("Left","jetpack"),value:"left"},{label:__("Full","jetpack"),value:"full"},{label:__("Wide","jetpack"),value:"wide"},{label:(0,l.isRTL)()?__("Left","jetpack"):__("Right","jetpack"),value:"right"}],onChange:e=>function(e){const t=["wide","full"].includes(e)?{width:void 0,height:void 0}:{};n({...t,align:e})}(e),__nextHasNoMarginBottom:!0}),(0,s.createElement)(i.TextControl,{label:__("Consent Expiry Time (in days)","jetpack"),value:r,type:"number",min:"1",max:"365",onChange:e=>n({consentExpiryDays:parseInt(e)}),__nextHasNoMarginBottom:!0}),(0,s.createElement)("p",null,__("Note: The block position in the editor is not indicative of the position on the front end. The block will always be positioned at the bottom of the page.","jetpack")))),(0,s.createElement)("div",a()({},m,{style:m.style}),(0,s.createElement)(o.RichText,{tagName:"p",value:p,onChange:e=>n({text:e})}),(0,s.createElement)(o.InnerBlocks,{allowedBlocks:["core/button"],template:[["core/button",{text:__("Accept","jetpack")}]],templateLock:"all"})))}},78165:(e,t,n)=>{"use strict";var r=n(94375),a=n(74095),s=n(15216),o=n(75757);(0,r.M)(a,{edit:s.A,save:o.A})},75757:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(96072),a=n.n(r),s=n(82170),o=n(94715),i=n(68071);function l({attributes:e}){const t=o.useBlockProps.save(),{text:n=i.a,consentExpiryDays:r}=e;return(0,s.createElement)("div",a()({},t,{style:t.style,role:"dialog","aria-modal":"true"}),(0,s.createElement)(o.RichText.Content,{tagName:"p",value:n}),(0,s.createElement)(o.InnerBlocks.Content,null),(0,s.createElement)("span",null,r))}},34839:(e,t,n)=>{"use strict";n.d(t,{w:()=>l});var r=n(74997),a=n(29491),s=n(3582),o=n(47143),i=n(86087);function l(e){const t=(0,o.useSelect)((e=>{const{isSavingPost:t,isSavingNonPostEntityChanges:n}=e("core/editor");return t()||n()}),[]),n=!(!(0,a.usePrevious)(t)||t),[,l]=(0,s.useEntityProp)("root","site","cookie_consent_template"),{saveEditedEntityRecord:c}=(0,o.useDispatch)(s.store),[u,d]=(0,i.useState)(!1),p=(0,o.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");return t})),m=(0,i.useCallback)((e=>{d(!0),l(e),c("root","site",void 0,{cookie_consent_template:e}).finally((()=>{d(!1)}))}),[d,l,c]);(0,i.useEffect)((()=>()=>{p(e)||m(null)}),[]),(0,i.useEffect)((()=>{n&&!u&&m((0,r.serialize)([p(e)]))}),[n,u,m,p,e])}},75800:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(82170),a=n(4567),s=n(3975),o=n(94715),i=n(86087),l=n(13022),c=n(72730);const u=({className:e=null,currency:t=null,defaultValue:n=null,disabled:u=!1,label:d="",onChange:p=null,value:m=""})=>{const[h,g]=(0,i.useState)((0,a.Ay)(m,t,{symbol:""})),[f,v]=(0,i.useState)(!1),[b,k]=(0,i.useState)(!1),y=(0,i.useRef)(null),E=(0,i.useCallback)(((e,n)=>{g((r=>{if(e!==r){const r=(0,c.C_)(e,t);r&&r>=(0,c.dv)(t)?(k(!1),n&&p?.(r)):k(!0)}return e}))}),[t,p]),w=()=>{y.current&&(y.current.focus(),v(!0))};return(0,i.useEffect)((()=>{if(!y.current)return;const e=y.current,r=()=>{v(!1),h||E((0,a.Ay)(n,t,{symbol:""}))};return e.addEventListener("blur",r),()=>{e.removeEventListener("blur",r)}}),[t,n,h,y,E]),(0,i.useEffect)((()=>{f||b||g((0,a.Ay)(m,t,{symbol:""}))}),[t,f,b,m]),(0,i.useEffect)((()=>{E((0,a.Ay)(m,t,{symbol:""}))}),[t,m]),(0,r.createElement)("div",{className:(0,l.A)("donations__amount",e,{"has-focus":f,"has-error":b}),role:"button",tabIndex:0,onClick:w,onKeyDown:w},s.y[t].symbol,u?(0,r.createElement)("div",{className:"donations__amount-value"},(0,a.Ay)(m||n,t,{symbol:""})):(0,r.createElement)(o.RichText,{allowedFormats:[],"aria-label":d,onChange:e=>E(e,!0),placeholder:(0,a.Ay)(n,t,{symbol:""}),ref:y,value:h,withoutInteractiveFormatting:!0}))}},57018:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(82170),a=n(3975),s=n(85985),o=n(94715),i=n(56427),l=n(27723),c=n(48558),u=n(72730);const __=l.__,d=e=>{const{attributes:t,setAttributes:n}=e,{currency:l,oneTimeDonation:d,monthlyDonation:p,annualDonation:m,showCustomAmount:h}=t,g=(e,r)=>{const a={"1 month":"monthlyDonation","1 year":"annualDonation"}[e],s=t[a];n({[a]:{...s,show:r}})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(i.ToolbarGroup,null,(0,r.createElement)(i.ToolbarItem,null,(()=>(0,r.createElement)(i.Dropdown,{contentClassName:"jetpack-donations__currency-popover",renderToggle:({onToggle:e,isOpen:t})=>(0,r.createElement)(i.ToolbarButton,{className:"jetpack-donations__currency-toggle",icon:(0,r.createElement)(r.Fragment,null,l+" - "+a.y[l].symbol,(0,r.createElement)(i.Dashicon,{icon:"arrow-down"})),label:__("Change currency","jetpack"),onClick:e,onKeyDown:n=>{t||n.keyCode!==c.DOWN||(n.preventDefault(),n.stopPropagation(),e())}}),renderContent:({onClose:e})=>(0,r.createElement)(i.MenuGroup,null,Object.keys(u.VK).map((t=>(0,r.createElement)(i.MenuItem,{isSelected:t===l,icon:t===l?"yes":"",onClick:()=>{(e=>{const t=(0,u.Xj)(e);n({currency:e,oneTimeDonation:{...d,amounts:t},monthlyDonation:{...p,amounts:t},annualDonation:{...m,amounts:t}})})(t),e()},key:`jetpack-donations-currency-${t}`},t+" - "+a.y[t].symbol))))}))))),(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(i.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(i.ToggleControl,{checked:p.show,onChange:e=>g("1 month",e),label:__("Show monthly donations","jetpack"),__nextHasNoMarginBottom:!0}),(0,r.createElement)(i.ToggleControl,{checked:m.show,onChange:e=>g("1 year",e),label:__("Show annual donations","jetpack"),__nextHasNoMarginBottom:!0}),(0,r.createElement)(i.ToggleControl,{checked:h,onChange:e=>n({showCustomAmount:e}),label:__("Show custom amount option","jetpack"),__nextHasNoMarginBottom:!0}),(0,r.createElement)(i.ExternalLink,{href:`https://wordpress.com/earn/payments/${(0,s.GE)()}`},__("View donation earnings","jetpack")))))}},27718:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(82170),a=n(4567),s=n(3975),o=n(94715),i=n(27723),l=n(72730);const __=i.__,c={attributes:{currency:{type:"string",default:"USD"},oneTimeDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a one-time donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate","jetpack")}},monthlyDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a monthly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate monthly","jetpack")}},annualDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a yearly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate yearly","jetpack")}},showCustomAmount:{type:"boolean",default:!0},chooseAmountText:{type:"string",default:__("Choose an amount","jetpack")},customAmountText:{type:"string",default:__("Or enter a custom amount","jetpack")}},supports:{html:!1},save:({attributes:e})=>{const{currency:t,oneTimeDonation:n,monthlyDonation:i,annualDonation:c,showCustomAmount:u,chooseAmountText:d,customAmountText:p}=e;if(!n||!n.show||-1===n.planId)return null;const m={"one-time":{title:__("One-Time","jetpack")},...i.show&&{"1 month":{title:__("Monthly","jetpack")}},...c.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,r.createElement)("div",null,(0,r.createElement)("div",{className:"donations__container"},Object.keys(m).length>1&&(0,r.createElement)("div",{className:"donations__nav"},Object.entries(m).map((([e,{title:t}])=>(0,r.createElement)("div",{role:"button",tabIndex:0,className:"donations__nav-item",key:`jetpack-donations-nav-item-${e} `,"data-interval":e},t)))),(0,r.createElement)("div",{className:"donations__content"},(0,r.createElement)("div",{className:"donations__tab"},(0,r.createElement)(o.RichText.Content,{tagName:"h4",className:"donations__one-time-item",value:n.heading}),i.show&&(0,r.createElement)(o.RichText.Content,{tagName:"h4",className:"donations__monthly-item",value:i.heading}),c.show&&(0,r.createElement)(o.RichText.Content,{tagName:"h4",className:"donations__annual-item",value:c.heading}),(0,r.createElement)(o.RichText.Content,{tagName:"p",value:d}),(0,r.createElement)("div",{className:"donations__amounts donations__one-time-item"},n.amounts.map((e=>(0,r.createElement)("div",{key:e,className:"donations__amount","data-amount":e},(0,a.Ay)(e,t))))),i.show&&(0,r.createElement)("div",{className:"donations__amounts donations__monthly-item"},i.amounts.map((e=>(0,r.createElement)("div",{key:e,className:"donations__amount","data-amount":e},(0,a.Ay)(e,t))))),c.show&&(0,r.createElement)("div",{className:"donations__amounts donations__annual-item"},c.amounts.map((e=>(0,r.createElement)("div",{key:e,className:"donations__amount","data-amount":e},(0,a.Ay)(e,t))))),u&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.RichText.Content,{tagName:"p",value:p}),(0,r.createElement)("div",{className:"donations__amount donations__custom-amount"},s.y[t].symbol,(0,r.createElement)("div",{className:"donations__amount-value","data-currency":t,"data-empty-text":(0,a.Ay)(100*(0,l.dv)(t),t,{symbol:""})}))),(0,r.createElement)("div",{className:"donations__separator"},"——"),(0,r.createElement)(o.RichText.Content,{tagName:"p",className:"donations__one-time-item",value:n.extraText}),i.show&&(0,r.createElement)(o.RichText.Content,{tagName:"p",className:"donations__monthly-item",value:i.extraText}),c.show&&(0,r.createElement)(o.RichText.Content,{tagName:"p",className:"donations__annual-item",value:c.extraText}),(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__one-time-item"},(0,r.createElement)(o.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__one-time-item",value:n.buttonText})),i.show&&(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__monthly-item"},(0,r.createElement)(o.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__monthly-item",value:i.buttonText})),c.show&&(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__annual-item"},(0,r.createElement)(o.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__annual-item",value:c.buttonText}))))))}}},31152:(e,t,n)=>{"use strict";n.d(t,{A:()=>w});var r=n(96072),a=n.n(r),s=n(82170),o=n(56461),i=n(94715),l=n(47143),c=n(86087),u=n(27723),d=n(2274),p=n(53796),m=n(72730),h=n(27574),g=n(26247),f=n(16521),v=n(3696),b=n(70975),k=n(93033),y=n(79085),E=n(36580);const __=u.__,w=e=>{const{attributes:t,setAttributes:n}=e,{currency:r}=t,u=(0,i.useBlockProps)(),[w,_]=(0,c.useState)(""),[C,A]=(0,c.useState)([]),x=(0,g.A)(),{lockPostSaving:j,unlockPostSaving:S}=(0,l.useDispatch)("core/editor"),N=(0,l.useSelect)((e=>e("core/editor").getCurrentPost()),[]),R=(0,l.useSelect)((e=>e("core/editor").isPostSavingLocked()),[]),P=(0,l.useSelect)((e=>e(f.M).getConnectUrl()||""),[]),{setConnectUrl:L,setConnectedAccountDefaultCurrency:T}=(0,l.useDispatch)(v.EF),B=(0,l.useSelect)((e=>e(v.EF).getConnectedAccountDefaultCurrency()));(0,c.useEffect)((()=>{if(!r&&B&&!R){const e=B.toUpperCase(),t=!!m.VK[e];n(t?{currency:e}:{currency:"USD"})}}),[r,B,R,n]);const M=e=>{_(e)};let I;return(0,c.useEffect)((()=>{j("donations");const e=e=>e.reduce(((e,{id:t,currency:n,type:a,interval:s})=>(n===r&&"donation"===a&&(e[s]=t),e)),{});(0,k.A)("donation").then((t=>{if(!t&&"object"!=typeof t||t.errors)return S("donations"),void _(__("Could not load data from WordPress.com.","jetpack"));L((0,h.A)(N.id,t.connect_url)),T(t?.connected_account_default_currency?.toUpperCase());const n=e(t.products);return(e=>{const t=Object.keys(e);return t.includes("one-time")&&t.includes("1 month")&&t.includes("1 year")})(n)?(A(n),void S("donations")):t.connect_url?(A({"one-time":-1,"1 month":-1,"1 year":-1}),void S("donations")):(r&&(0,b.A)(r).then((t=>{A(e(t)),S("donations")}),M),void S("donations"))}),M)}),[j,r,N.id,L,T,S]),I=x?w?(0,s.createElement)(y.A,{error:w}):P?(0,s.createElement)(p.V,{blockName:"donations"}):r?(0,s.createElement)(E.A,a()({},e,{products:C})):(0,s.createElement)(o.A,{color:"black"}):(0,s.createElement)(d.A,{block:"Donations Form",explanation:__("Connect your WordPress.com account to enable donations.","jetpack")}),(0,s.createElement)("div",u,I)}},46197:(e,t,n)=>{"use strict";var r=n(94375),a=n(87325),s=n(27718),o=n(31152),i=n(47693);(0,r.M)(a,{edit:o.A,save:i.A,deprecated:[s.A]})},70975:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(1455),a=n.n(r);const s=async e=>{try{return await a()({path:"/wpcom/v2/memberships/products",method:"POST",data:{type:"donation",currency:e,is_editable:!1}})}catch(e){return Promise.reject(e.message)}}},93033:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1455),a=n.n(r),s=n(93832);const o=async(e=null)=>{const t=new URLSearchParams(window.location.search),n=(0,s.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===t.get("origin")?"gutenberg-wpcom":"gutenberg",...e&&{type:e},is_editable:!1});try{return await a()({path:n,method:"GET"})}catch(e){return Promise.reject(e.message)}}},79085:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(82170),a=n(56427),s=n(27723);const __=s.__,o=({error:e})=>(0,r.createElement)(a.Placeholder,{icon:"lock",label:__("Donations","jetpack"),instructions:e})},47693:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(82170),a=n(94715);const s=(0,n(75703).O)(),o=({attributes:e})=>{const{fallbackLinkUrl:t,oneTimeDonation:n,monthlyDonation:o,annualDonation:i}=e;if(!n||!n.show||!n.planId||-1===n.planId)return null;const l=a.useBlockProps.save();return(0,r.createElement)("div",l,(0,r.createElement)(a.RichText.Content,{tagName:"h4",value:s.oneTimeDonation?.heading}),(0,r.createElement)(a.RichText.Content,{tagName:"p",value:n.extraText??s.extraText}),(0,r.createElement)(a.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:s.oneTimeDonation?.buttonText}),o.show&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(a.RichText.Content,{tagName:"h4",value:s.monthlyDonation?.heading}),(0,r.createElement)(a.RichText.Content,{tagName:"p",value:o.extraText??s.extraText}),(0,r.createElement)(a.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:s.monthlyDonation?.buttonText})),i.show&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(a.RichText.Content,{tagName:"h4",value:s.annualDonation?.heading}),(0,r.createElement)(a.RichText.Content,{tagName:"p",value:i.extraText??s.extraText}),(0,r.createElement)(a.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:s.annualDonation?.buttonText})))}},62225:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(82170),a=n(94715),s=n(47143),o=n(27723),i=n(72730),l=n(75800),c=n(75703);const __=o.__,u=(0,c.O)(),d=({activeTab:e,attributes:t,setAttributes:n})=>{const{currency:c,oneTimeDonation:d,monthlyDonation:p,annualDonation:m,showCustomAmount:h,chooseAmountText:g=u.chooseAmountText,customAmountText:f=u.customAmountText}=t,v={"one-time":"oneTimeDonation","1 month":"monthlyDonation","1 year":"annualDonation"}[e],b=e=>t[v][e],k=(e,r)=>{const a=t[v];n({[v]:{...a,[e]:r}})},y=(0,i.Xj)(c),E=b("amounts"),w=(0,s.useSelect)((e=>e("core/rich-text").getFormatTypes()),[]).map((e=>e.name)).filter((e=>"core/link"!==e));return(0,r.createElement)("div",{className:"donations__tab"},(0,r.createElement)(a.RichText,{tagName:"h4",placeholder:__("Write a message…","jetpack"),value:b("heading")||u[v]?.heading,onChange:e=>k("heading",e)}),(0,r.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:g,onChange:e=>n({chooseAmountText:e})}),(0,r.createElement)("div",{className:"donations__amounts"},E.map(((e,t)=>(0,r.createElement)(l.A,{currency:c,defaultValue:y[t],label:(0,o.sprintf)( // translators: %d: Tier level e.g: "1", "2", "3" -__("Tier %d","jetpack"),t+1),key:`jetpack-donations-amount-${t}`,onChange:e=>((e,t)=>{const n=[...E];n[t]=e,k("amounts",n)})(e,t),value:e})))),h&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(r.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:f,onChange:e=>n({customAmountText:e})}),(0,a.createElement)(l.A,{currency:c,label:__("Custom amount","jetpack"),defaultValue:100*(0,i.dv)(c),className:"donations__custom-amount",disabled:!0})),(0,a.createElement)("hr",{className:"donations__separator"}),(0,a.createElement)(r.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:b("extraText")??u.extraText,onChange:e=>k("extraText",e)}),(0,a.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper"},(0,a.createElement)(r.RichText,{className:"wp-block-button__link donations__donate-button",placeholder:__("Write a message…","jetpack"),value:b("buttonText")||u[v]?.buttonText,onChange:e=>{return t=e,void n({oneTimeDonation:{...d,buttonText:t},monthlyDonation:{...p,buttonText:t},annualDonation:{...m,buttonText:t}});var t},allowedFormats:w})))}},36580:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var a=n(82170),r=n(86087),s=n(27723),o=n(13022),i=n(57018),l=n(62225);const __=s.__,c=e=>{const{attributes:t,products:n,setAttributes:s}=e,{oneTimeDonation:c,monthlyDonation:u,annualDonation:d}=t,[p,m]=(0,r.useState)("one-time"),h=(0,r.useCallback)((e=>p===e),[p]),g={"one-time":{title:__("One-Time","jetpack")},...u.show&&{"1 month":{title:__("Monthly","jetpack")}},...d.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,r.useEffect)((()=>{c.planId===n["one-time"]&&u.planId===n["1 month"]&&d.planId===n["1 year"]||s({...n["one-time"]&&{oneTimeDonation:{...c,planId:n["one-time"]}},...n["1 month"]&&{monthlyDonation:{...u,planId:n["1 month"]}},...n["1 year"]&&{annualDonation:{...d,planId:n["1 year"]}}})}),[c,u,d,s,n]),(0,r.useEffect)((()=>{!u.show&&h("1 month")&&m("one-time"),!d.show&&h("1 year")&&m("one-time")}),[u,d,m,h]),(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"donations__container"},Object.keys(g).length>1&&(0,a.createElement)("div",{className:"donations__nav"},Object.entries(g).map((([e,{title:t}])=>(0,a.createElement)("div",{role:"button",tabIndex:0,className:(0,o.A)("donations__nav-item",{"is-active":h(e)}),onClick:()=>m(e),onKeyDown:()=>m(e),key:`jetpack-donations-nav-item-${e} `},t)))),(0,a.createElement)("div",{className:"donations__content"},(0,a.createElement)(l.A,{activeTab:p,attributes:t,setAttributes:s}))),(0,a.createElement)(i.A,e))}},75703:(e,t,n)=>{"use strict";function a(){if("undefined"==typeof window)return{};const e=window.Jetpack_DonationsBlock?.defaultTexts;return"object"!=typeof e?{}:e}n.d(t,{O:()=>a})},36850:(e,t,n)=>{"use strict";n.d(t,{GY:()=>r,_t:()=>a,gQ:()=>s});const a=/^\s*https?:\/\/(?:www\.)?(?:eventbrite\.[a-z.]+)\/e\/[^/]*?(\d+)\/?(?:\?[^/]*)?\s*$/i,r=/^\s*https?:\/\/(?:.+\.)?(?:eventbrite\.[a-z.]+)\/?(?:\?[^/]*)?\s*$/i,s="https://www.eventbrite.com/e/test-event-tickets-123456789"},38449:(e,t,n)=>{"use strict";n.d(t,{o:()=>c,s:()=>u});var a=n(82170),r=n(56427),s=n(27723),o=n(5873),i=n(72660);const __=s.__,_x=s._x,l=[{value:"inline",label:__("In-page Embed","jetpack"),preview:(0,a.createElement)("div",{className:"block-editor-block-preview__container"},(0,a.createElement)("img",{src:i,alt:__("In page Eventbrite checkout example","jetpack")}))},{value:"modal",label:__("Button & Modal","jetpack")}],c=({setEditingUrl:e})=>(0,a.createElement)(r.ToolbarGroup,null,(0,a.createElement)(r.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>e(!0)})),u=({attributes:e,clientId:t,setAttributes:n})=>(0,a.createElement)(o.A,{title:_x("Embed Type","option for how the embed displays on a page, e.g. inline or as a modal","jetpack"),clientId:t,styleOptions:l,onSelectStyle:n,activeStyle:e.style,attributes:e,viewportWidth:130})},77629:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=[n(87879).A]},87879:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var a=n(82170),r=n(94715),s=n(74997),o=n(27723),i=n(13022),l=n(66087);const _x=o._x,c=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius"];const u={attributes:{url:{type:"string",validator:e=>!e||e.startsWith("http")},eventId:{type:"number"},useModal:{type:"boolean"},style:{type:"string"},text:{type:"string",default:_x("Register","verb: e.g. register for an event.","jetpack")},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},borderRadius:{type:"number"}},migrate:e=>{const{className:t,style:n}=e;let a=n;a||(a=e.useModal?"modal":"inline");const r={...(0,l.omit)(e,["useModal",...c]),className:t&&t.replace("is-style-outline",""),style:a},o=(0,l.pick)(e,c);return[r,[(0,s.createBlock)("jetpack/button",{element:"a",text:o.text||_x("Register","verb: e.g. register for an event.","jetpack"),...o,uniqueId:"eventbrite-widget-id",className:t&&-1!==t.indexOf("is-style-outline")?"is-style-outline":""})]]},save:function({attributes:e}){const{eventId:t,useModal:n,url:s,style:o}=e;if(t)return n||"modal"===o?function(e){const{backgroundColor:t,borderRadius:n,customBackgroundColor:s,customTextColor:o,eventId:l,text:c,textColor:u,url:d}=e,p=(0,r.getColorClassName)("color",u),m=(0,r.getColorClassName)("background-color",t),h=(0,i.A)("wp-block-button__link",{"has-text-color":u||o,[p]:p,"has-background":t||s,[m]:m,"no-border-radius":0===n}),g={backgroundColor:m?void 0:s,color:p?void 0:o,borderRadius:n?n+"px":void 0};return(0,a.createElement)("div",{className:"wp-block-button"},(0,a.createElement)(r.RichText.Content,{className:h,href:d,id:`eventbrite-widget-${l}`,rel:"noopener noreferrer",role:"button",style:g,tagName:"a",target:"_blank",value:c}))}(e):s&&(0,a.createElement)("a",{className:"eventbrite__direct-link",href:s},s)},isEligible:(e,t)=>("modal"===e.style||e.useModal)&&((0,l.isEmpty)(t)||(0,l.some)((0,l.pick)(e,c),Boolean))}},56311:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var a=n(96072),r=n.n(a),s=n(82170),o=n(94715),i=n(56427),l=n(86087),c=n(27723),u=n(78218),d=n(56145),p=n(82306),m=n(36850),h=n(38449),g=n(50013),f=n(68332),v=n(72055),b=n(12074);const __=c.__,_x=c._x,k={name:"jetpack/button",attributes:{element:"a",text:_x("Register","verb: e.g. register for an event.","jetpack"),uniqueId:"eventbrite-widget-id"}},y=(0,i.withNotices)((e=>{const{attributes:t,noticeOperations:n,onReplace:a,setAttributes:c}=e,{url:y,style:E}=t,w=(0,o.useBlockProps)(),[_,C]=(0,l.useState)(!1),[A,x]=(0,l.useState)(t.url||""),[j,S]=(0,l.useState)(!1),N=!j&&y&&!m._t.test(y),R=(0,l.useCallback)((()=>{n.removeAllNotices(),n.createErrorNotice((0,s.createElement)(s.Fragment,null,__("Sorry, this content could not be embedded.","jetpack")," ",(0,s.createElement)(i.Button,{variant:"link",onClick:()=>(0,b.pG)(A,a)},_x("Convert block to link","button label","jetpack"))))}),[n,a,A]),P=(0,l.useCallback)((e=>{if(!e||m.gQ===e||"modal"===E)return;const t=(0,b.HE)(e);if(t){const a={eventId:t,url:e};(0,d.A)(a.url,S).then((e=>{const t=(0,u.y)(p.attributes,{...a,url:e});c(t),x(e),n.removeAllNotices()})).catch((()=>{c({eventId:void 0,url:void 0}),R()}))}else R()}),[E,n,R,c,x,S]);let L;return(0,l.useEffect)((()=>{P(y)}),[y,P]),L=j?(0,s.createElement)(f.A,null):_||!y||N?(0,s.createElement)(g.A,r()({},e,{editedUrl:A,onChange:e=>x(e.target.value),onSubmit:e=>{e&&e.preventDefault(),P((0,b.pJ)(A)),C(!1)}})):(0,s.createElement)(s.Fragment,null,(0,s.createElement)(h.s,e),(0,s.createElement)(o.BlockControls,null,(0,s.createElement)(h.o,{setEditingUrl:C})),"modal"===E?(0,s.createElement)(o.InnerBlocks,{template:[[k.name,k.attributes]],templateLock:"all"}):(0,s.createElement)(v.A,e)),(0,s.createElement)("div",w,L)}))},34590:(e,t,n)=>{"use strict";var a=n(74997),r=n(94375),s=n(82306),o=n(36850),i=n(77629),l=n(56311),c=n(52074);(0,r.M)(s,{edit:l.A,save:c.A,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&(o._t.test(e.textContent)||o.GY.test(e.textContent)),transform:e=>(0,a.createBlock)("jetpack/eventbrite",{url:e.textContent.trim()})}]},deprecated:i.A})},50013:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var a=n(82170),r=n(85985),s=n(56427),o=n(27723),i=n(82306);n(12074);const __=o.__,_x=o._x,l=(0,r.sh)(i),c=({className:e,noticeUI:t,editedUrl:n,onChange:o,onSubmit:i})=>{const c=(0,r.Sy)()||(0,r.d9)()?"http://support.wordpress.com/wordpress-editor/blocks/eventbrite-block/":"https://jetpack.com/support/jetpack-blocks/eventbrite-block/";return(0,a.createElement)("div",{className:e},(0,a.createElement)(s.Placeholder,{label:__("Eventbrite Checkout","jetpack"),instructions:__("Paste a link to an Eventbrite event to embed ticket checkout.","jetpack"),icon:l,notices:t},(0,a.createElement)("form",{onSubmit:i},(0,a.createElement)("input",{type:"url",value:n,className:"components-placeholder__input","aria-label":__("Eventbrite URL","jetpack"),placeholder:__("Enter an event URL to embed here…","jetpack"),onChange:o}),(0,a.createElement)(s.Button,{variant:"secondary",type:"submit"},_x("Embed","submit button label","jetpack"))),(0,a.createElement)("div",{className:"components-placeholder__learn-more"},(0,a.createElement)(s.ExternalLink,{href:c},__("Learn more about Eventbrite embeds","jetpack")))))}},68332:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(82170),r=n(56427),s=n(27723);const __=s.__,o=()=>(0,a.createElement)("div",{className:"wp-block-embed is-loading"},(0,a.createElement)(r.Spinner,null),(0,a.createElement)("p",null,__("Embedding…","jetpack")))},72055:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(82170),r=n(56427);const s=({className:e,attributes:t})=>{const{eventId:n}=t;if(!n)return;const s=`eventbrite-widget-${n}`,o=`\n\t\t\t