"use strict";(globalThis.webpackChunkextendify=globalThis.webpackChunkextendify||[]).push([[355],{790:e=>{e.exports=window.ReactJSXRuntime},1455:e=>{e.exports=window.wp.apiFetch},1609:e=>{e.exports=window.React},5573:e=>{e.exports=window.wp.primitives},5795:e=>{e.exports=window.ReactDOM},6087:e=>{e.exports=window.wp.element},6427:e=>{e.exports=window.wp.components},7315:(e,t,n)=>{var o=n(8490),i=n.n(o),s=n(7723),a=n(6427),r=n(6087),l=n(4707),c=n(8971),d=n(790);const w=({children:e,title:t,onClose:n,anchor:o})=>{const[i,w]=(0,r.useState)(!1),[p,h]=(0,r.useState)(0),[x,u]=(0,r.useState)(0),m=()=>{w(!1),n?.()};if((0,r.useLayoutEffect)((()=>{if(!o||!i)return;const e=o.style.outline;o.style.outline="99999px solid rgba(0, 0, 0, 0.4)";const t=o.getBoundingClientRect(),n=t.left+t.width/2,s=t.top+t.height;return h(n),u(s),()=>{o.style.outline=e}}),[o,i]),(0,r.useEffect)((()=>{w(!0)}),[p,x]),i)return(0,d.jsx)(c.lG,{static:!0,className:"extendify-shared",open:i,onClose:m,children:(0,d.jsxs)("div",{className:"relative z-max",children:[(0,d.jsx)("div",{onClick:m,"aria-hidden":!0,role:"presentation",className:"fixed inset-0 z-10 h-screen w-screen bg-transparent"}),(0,d.jsxs)("div",{className:"fixed z-20 flex min-w-80 max-w-xs flex-col bg-transparent shadow-2xl",style:{top:`${x+12}px`,left:`${p}px`,transform:"translate(-50%, 0)"},children:[(0,d.jsx)("div",{className:"absolute left-1/2 top-[-12px] h-0 w-0 -translate-x-1/2 transform border-b-[12px] border-l-[8px] border-r-[8px] border-transparent border-b-white"}),(0,d.jsx)("button",{"data-test":"close-tooltip",className:"absolute right-0 top-0 z-20 m-2 flex h-6 w-6 cursor-pointer items-center justify-center rounded-full border-0 bg-white p-0 leading-none outline-none ring-1 ring-gray-200 focus:shadow-none focus:ring-wp focus:ring-design-main rtl:left-0 rtl:right-auto",onClick:m,"aria-label":(0,s.__)("Close ToolTip","extendify-local"),children:(0,d.jsx)(a.Icon,{icon:l.A,className:"h-4 w-4 fill-current"})}),(0,d.jsx)(c.L3,{className:"sr-only",children:t}),(0,d.jsx)("div",{className:"text-md relative m-0 bg-white p-6 pt-8 text-left font-sans leading-7 text-gray-900 rtl:text-right",children:e})]})]})})},p=()=>(0,d.jsx)(w,{title:(0,s.__)("Tooltip pointing to the edit page button","extendify-local"),anchor:document.querySelector("#wp-admin-bar-edit"),children:(0,s.__)("Welcome to your new site! When you're ready, press here to edit this page.","extendify-local")});var h=n(7828),x=n(9358);const u=window.extSharedData.showAIAgents;i()((()=>{if("extendify-launch"===new URLSearchParams(window.location.search).get("page"))return;(0,x.E)();const e=new URLSearchParams(window.location.search);if(!e.has("extendify-launch-success"))return;const t=new URL(window.location.href);e.delete("extendify-launch-success");const n=`${t.origin}${t.pathname}`;if(window.history.replaceState({},"",n),requestAnimationFrame((()=>{requestAnimationFrame((()=>{window.dispatchEvent(new CustomEvent("extendify-launch-success"))}))})),u)return;const o=new URL(window.extSharedData.homeUrl);if(t.origin!==o.origin||t.pathname!==o.pathname)return;const i=Object.assign(document.createElement("div"),{id:"extendify-edit-page-modal-tooltip"});document.body.appendChild(i),(0,h.X)((0,d.jsx)(p,{}),i)}))},7723:e=>{e.exports=window.wp.i18n},8490:e=>{e.exports=window.wp.domReady}},e=>{e.O(0,[65,223],(()=>e(e.s=7315))),e.O()}]);