1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2746],{93625:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var o=(0,r(30853).Z)("copy","IconCopy",[["path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]])},43640:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/wordpress-integration",function(){return r(95927)}])},44872:function(e,t,r){"use strict";var o=r(85893),i=r(65599),s=r(90090),n=r(58278),l=r(54410),a=r(95429),d=r(84957),u=r(98029),c=r(24998),p=r(98496);t.Z=()=>{let{isMobile:e}=(0,p.Fs)(),t=(0,u.D)({mutationFn:()=>(0,s.fm)(!0),onSuccess:e=>{var t,r;(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.testpost_failed)===!1||(null==e?void 0:null===(r=e.data)||void 0===r?void 0:r.testpost_failed)===void 0?c.N9.show({color:"teal",withBorder:!0,title:"Test post sent successfully",message:"Please check the drafts in your admin dashboard."}):c.N9.show({color:"red",withBorder:!0,title:"Test post failed",message:"Please check your settings and try again."})}});return(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)(n.x,{maw:e?"100%":500,children:[(0,o.jsx)(l.x,{fz:"sm",children:'Send a test post to your WordPress website to test your configuration and integration. Test posts will always be in draft mode, even if your settings specify "published".'}),(0,o.jsx)(i.Z,{isError:t.isError,error:t.error}),(0,o.jsx)(a.k,{direction:"row",gap:"md",mt:"md",children:(0,o.jsx)(d.z,{onClick:()=>t.mutate(),loading:t.isPending,children:"Send test post"})})]})})}},15206:function(e,t,r){"use strict";var o=r(85893),i=r(95429),s=r(24843),n=r(54410),l=r(18005),a=r.n(l),d=r(21209),u=r(41664),c=r.n(u),p=r(98496);t.Z=e=>{let{title:t,link:r}=e,{isMobile:l}=(0,p.Fs)();return(0,o.jsxs)(i.k,{direction:"row",className:a().navbar,align:"center",px:"lg",style:{top:l?"calc(60px + var(--banner-height, 0px))":"var(--banner-height, 0px)"},children:[(0,o.jsx)(s.A,{variant:"light",size:"lg",radius:"lg","aria-label":"Settings",component:c(),href:r,children:(0,o.jsx)(d.Z,{style:{width:"70%",height:"70%"},stroke:1.5})}),(0,o.jsx)(n.x,{className:a().navbarTitle,pl:"lg",py:"lg",children:t})]})}},29250:function(e,t,r){"use strict";r.d(t,{c:function(){return TitleCard}});var o=r(85893),i=r(38878),s=r(356),n=r(54410),l=r(58278),a=r(10576);let TitleCard=e=>{let{props:t,children:r}=e;return(0,o.jsxs)(i.Z,{withBorder:!0,radius:"md",padding:"xl",shadow:"xs",mb:"lg",children:[(0,o.jsxs)(s.Z,{justify:"space-between",align:"center",children:[(0,o.jsx)(n.x,{fw:"bold",children:t.title}),t.rightContent&&(0,o.jsx)(l.x,{children:t.rightContent})]}),(0,o.jsx)(a.i,{my:"md"}),r]})}},95927:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return wordpress_integration}});var o=r(85893),i=r(15206),s=r(29250),n=r(58278),l=r(95429),a=r(54680),d=r(44872),u=r(90090),c=r(8207),p=r(54410),g=r(84957),h=r(52869),v=r(38414),m=r(37113),f=r(24998),y=r(93625),x=(0,r(30853).Z)("video","IconVideo",[["path",{d:"M15 10l4.553 -2.276a1 1 0 0 1 1.447 .894v6.764a1 1 0 0 1 -1.447 .894l-4.553 -2.276v-4z",key:"svg-0"}],["path",{d:"M3 6m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z",key:"svg-1"}]]),w=r(33934),b=r(98496),PluginInstallation_PluginInstallation=()=>{var e,t,r,i;let s=(0,v.V)({timeout:500}),{isMobile:a}=(0,b.Fs)(),[d,{toggle:j}]=(0,m.q)(!1),P=(0,w.a)({queryKey:["wordPressPlatformInfo"],queryFn:()=>(0,u.fm)(!1),refetchOnWindowFocus:!1,enabled:!0});return(0,o.jsxs)(c.K,{gap:"sm",children:[(0,o.jsx)(p.x,{fz:"sm",children:"Please install the latest Emplibot plugin."}),(0,o.jsxs)(l.k,{direction:a?"column":"row",gap:a?"md":"sm",children:[(0,o.jsx)(g.z,{component:"a",variant:"default",href:"https://wordpress.org/plugins/emplibot/",target:"_blank",w:"fit-content",children:"Install via WordPress"}),(0,o.jsx)(g.z,{component:"a",variant:"default",href:"https://emplibot.com/plugin/latest",target:"_blank",w:"fit-content",children:"Download plugin ZIP file"})]}),(0,o.jsx)(p.x,{fz:"sm",mt:"sm",children:"Upload the ZIP-file into your WordPress admin dashboard, then naviagate to the Emplibot plugin and enter this plugin key:"}),(0,o.jsxs)(l.k,{direction:a?"column":"row",gap:"sm",children:[(0,o.jsx)(h.I,{placeholder:"Loading integration key...",value:(null==P?void 0:null===(t=P.data)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.integration_key)||"",readOnly:!0,w:a?"100%":300}),(0,o.jsx)(g.z,{variant:"default",leftSection:!s.copied&&(0,o.jsx)(y.Z,{size:14}),onClick:()=>{var e,t;let r=null==P?void 0:null===(t=P.data)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.integration_key;r&&(s.copy(r),f.N9.show({color:"teal",withBorder:!0,title:"Copied key to clipboard!",message:"You can now paste it into your Emplibot plugin."}))},disabled:!(null==P?void 0:null===(i=P.data)||void 0===i?void 0:null===(r=i.data)||void 0===r?void 0:r.integration_key),children:s.copied?"Copied":"Copy"})]}),(0,o.jsx)(l.k,{justify:"flex-start",mt:"xl",children:(0,o.jsx)(g.z,{variant:"light",color:"blue",leftSection:(0,o.jsx)(x,{size:18}),onClick:j,children:d?"Hide Video Tutorial":"Watch Video Tutorial"})}),d&&(0,o.jsx)(n.x,{mt:"md",children:(0,o.jsx)("div",{style:{position:"relative",padding:"56.25% 0 0 0"},children:(0,o.jsx)("iframe",{src:"https://iframe.mediadelivery.net/embed/333856/15669a78-1d68-45a6-9145-8b9a8fe76182?autoplay=false&loop=false&muted=false&preload=true&responsive=true",loading:"lazy",style:{border:0,position:"absolute",top:0,height:"100%",width:"100%"},allow:"accelerometer;gyroscope;autoplay;encrypted-media;picture-in-picture;",allowFullScreen:!0})})})]})},j=r(65599),P=r(86414),_=r(3249),I=r(80310),k=r(95360),C=r(30202),S=r(98029),T=r(67294),PluginSettings_PluginSettings=()=>{var e,t;let{isMobile:r}=(0,b.Fs)(),[i,{toggle:s}]=(0,m.q)(!1),a=(0,C.NL)(),d=(0,T.useRef)(!1),[c,p]=(0,T.useState)(!1),h=(0,k.c)({initialValues:{wordpressAuthorEmail:"",wordpressCategoryId:"",wordpressCategoryTaxonomy:"category",wordpressPublicationStatus:"draft",wordpressPluginUrl:""},validate:{}}),v=(0,w.a)({queryKey:["wordpressPlatformData"],queryFn:()=>(0,u.dE)(),refetchOnWindowFocus:!0,refetchOnMount:!0,staleTime:0,gcTime:0,enabled:!0,retry:(e,t)=>{var r;return(null==t?void 0:null===(r=t.response)||void 0===r?void 0:r.status)!==404&&e<3}});(0,T.useEffect)(()=>{a.invalidateQueries({queryKey:["wordpressPlatformData"]}),v.refetch()},[a]);let y=(0,S.D)({mutationFn:()=>(0,u.sz)(h.values.wordpressAuthorEmail,h.values.wordpressPluginUrl,parseInt(h.values.wordpressCategoryId),h.values.wordpressCategoryTaxonomy,h.values.wordpressPublicationStatus),onSuccess:e=>{e.data.success&&(a.invalidateQueries({queryKey:["wordpressPlatformData"]}),a.invalidateQueries({queryKey:["wordpressPlatformInfo"]}),f.N9.show({color:"teal",withBorder:!0,title:"Settings saved!",message:"Your WordPress
1integration settings have been updated successfully."}),p(!1))}});return(0,T.useEffect)(()=>{var e,t,r,o,i;let s=v.error&&(null===(t=v.error)||void 0===t?void 0:null===(e=t.response)||void 0===e?void 0:e.status)===404;if(s||!(null===(o=v.data)||void 0===o?void 0:null===(r=o.data)||void 0===r?void 0:r.platform_data)){d.current||(h.setValues({wordpressAuthorEmail:"",wordpressCategoryId:"",wordpressCategoryTaxonomy:"category",wordpressPublicationStatus:"draft",wordpressPluginUrl:""}),d.current=!0);return}let n=v.data.data.platform_data;h.setValues({wordpressAuthorEmail:(null==n?void 0:n.author)||"",wordpressCategoryId:(null==n?void 0:null===(i=n.category_id)||void 0===i?void 0:i.toString())||"",wordpressCategoryTaxonomy:(null==n?void 0:n.category_taxonomy)||"category",wordpressPublicationStatus:(null==n?void 0:n.publication_status)||"draft",wordpressPluginUrl:(null==n?void 0:n.url)||""}),d.current=!0},[null===(t=v.data)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.platform_data,v.dataUpdatedAt,v.error]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.x,{w:r?"100%":400,children:(0,o.jsxs)("form",{onSubmit:e=>{e.preventDefault();let t=h.values.wordpressPluginUrl;if(t&&!t.endsWith("/wp-json/emplibot/v1")&&!c){p(!0);return}y.mutate()},autoComplete:"off",children:[(0,o.jsx)(P.o,{label:"WordPress author email",description:"WordPress User which should be the author of your blogposts.",type:"email",placeholder:"e.g. '[email protected]'",...h.getInputProps("wordpressAuthorEmail"),required:!0}),(0,o.jsx)(_.Y,{label:"WordPress category id",description:'WordPress category id. You can find the ID by navigating to the edit site of the WordPress category (e.g. Posts > Categories). In the URL, the ID will be displayed as "tag_ID=".',placeholder:"e.g. 42",...h.getInputProps("wordpressCategoryId"),mt:"sm",required:!0}),(0,o.jsx)(P.o,{label:"WordPress category taxonomy",description:'WordPress category taxomony. Usually "category". You only need to change this if your WordPress site is heavily customized.',placeholder:"e.g. 'category'",...h.getInputProps("wordpressCategoryTaxonomy"),mt:"sm",required:!0}),(0,o.jsx)(I.p,{label:"WordPress publication status",description:"Should Emplibot publish the blog posts or send it as draft? You will remain responsible for the content of the blog posts and should review them regularly.",data:["publish","draft"],...h.getInputProps("wordpressPublicationStatus"),mt:"sm",required:!0}),(0,o.jsx)(P.o,{type:"url",label:"WordPress plugin URL",description:'Usually ends with "/wp-json/emplibot/v1". You only need to change this if your WordPress site is heavily customized.',placeholder:"e.g. 'https://yoursite.com/wp-json/emplibot/v1'",...h.getInputProps("wordpressPluginUrl"),mt:"sm",required:!0,error:c?"Your URL doesn't end in /wp-json/emplibot/v1, please make sure this is intentional":null}),(0,o.jsx)(j.Z,{isError:y.isError,error:y.error}),(0,o.jsx)(g.z,{type:"submit",mt:"md",loading:y.isPending,children:"Save"})]})}),(0,o.jsxs)(n.x,{mt:"xl",children:[(0,o.jsx)(l.k,{justify:"flex-start",children:(0,o.jsx)(g.z,{variant:"light",color:"blue",leftSection:(0,o.jsx)(x,{size:18}),onClick:s,children:i?"Hide Video Tutorial":"Watch Video Tutorial"})}),i&&(0,o.jsx)(n.x,{mt:"md",children:(0,o.jsx)("div",{style:{position:"relative",padding:"56.25% 0 0 0"},children:(0,o.jsx)("iframe",{src:"https://iframe.mediadelivery.net/embed/333856/0e854d75-6426-4833-aba1-9d5bc51e0977?autoplay=false&loop=false&muted=false&preload=true&responsive=true",loading:"lazy",style:{border:0,position:"absolute",top:0,height:"100%",width:"100%"},allow:"accelerometer;gyroscope;autoplay;encrypted-media;picture-in-picture;",allowFullScreen:!0})})})]})]})},W=r(88198),z=r(56485),SettingsWordPressIntegration_SettingsWordPressIntegration=()=>{var e,t,r,c,p,g,h,v;let{isMobile:m}=(0,b.Fs)(),f=(0,w.a)({queryKey:["wordpressPlatformInfo"],queryFn:()=>(0,u.fm)(!1),refetchOnWindowFocus:!1,enabled:!0});return(0,o.jsxs)(n.x,{mt:m?60:0,children:[(0,o.jsx)(i.Z,{title:"WordPress Integration",link:"/settings/integrations"}),(0,o.jsx)(l.k,{justify:"center",children:(0,o.jsxs)(n.x,{p:"lg",maw:1400,w:"100%",children:[(0,o.jsx)(a.b,{icon:(null==f?void 0:null===(t=f.data)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.platform_configured)?(0,o.jsx)(W.Z,{size:16}):(0,o.jsx)(z.Z,{size:16}),title:(null==f?void 0:null===(c=f.data)||void 0===c?void 0:null===(r=c.data)||void 0===r?void 0:r.platform_configured)?"Integration complete":"Integration incomplete",color:(null==f?void 0:null===(g=f.data)||void 0===g?void 0:null===(p=g.data)||void 0===p?void 0:p.platform_configured)?"green":"orange",mb:"lg",children:(null==f?void 0:null===(v=f.data)||void 0===v?void 0:null===(h=v.data)||void 0===h?void 0:h.platform_configured)?"Your WordPress
1integration is successfully configured and ready to use.":"Please complete the steps below to finish setting up your WordPress integration."}),(0,o.jsx)(s.c,{props:{title:"Plugin installation"},children:(0,o.jsx)(PluginInstallation_PluginInstallation,{})}),(0,o.jsx)(s.c,{props:{title:"Plugin settings"},children:(0,o.jsx)(PluginSettings_PluginSettings,{})}),(0,o.jsx)(s.c,{props:{title:"Test WordPress integration"},children:(0,o.jsx)(d.Z,{})})]})})]})},wordpress_integration=()=>(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(SettingsWordPressIntegration_SettingsWordPressIntegration,{})})},18005:function(e){e.exports={navbar:"Breadcrumb_navbar__69kL_",navbarTitle:"Breadcrumb_navbarTitle__LrgyC"}},86414:function(e,t,r){"use strict";r.d(t,{o:function(){return a}});var o=r(85893);r(67294);var i=r(90987),s=r(9535),n=r(12440);let l={},a=(0,s.d5)((e,t)=>{let r=(0,i.w)("TextInput",l,e);return(0,o.jsx)(n.M,{component:"input",ref:t,...r,__staticSelector:"TextInput"})});a.classes=n.M.classes,a.displayName="@mantine/core/TextInput"},16269:function(e,t,r){"use strict";r.d(t,{Z:function(){return noop}});let noop=()=>{}},38414:function(e,t,r){"use strict";r.d(t,{V:function(){return useClipboard}});var o=r(67294);function useClipboard({timeout:e=2e3}={}){let[t,r]=(0,o.useState)(null),[i,s]=(0,o.useState)(!1),[n,l]=(0,o.useState)(null),handleCopyResult=t=>{window.clearTimeout(n),l(window.setTimeout(()=>s(!1),e)),s(t)};return{copy:e=>{"clipboard"in navigator?navigator.clipboard.writeText(e).then(()=>handleCopyResult(!0)).catch(e=>r(e)):r(Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{s(!1),r(null),window.clearTimeout(n)},error:t,copied:i}}},37113:function(e,t,r){"use strict";r.d(t,{q:function(){return useDisclosure}});var o=r(67294);function useDisclosure(e=!1,t){let{onOpen:r,onClose:i}=t||{},[s,n]=(0,o.useState)(e),l=(0,o.useCallback)(()=>{n(e=>e||(r?.(),!0))},[r]),a=(0,o.useCallback)(()=>{n(e=>e?(i?.(),!1):e)},[i]),d=(0,o.useCallback)(()=>{s?a():l()},[a,l,s]);return[s,{open:l,close:a,toggle:d}]}},28590:function(e,t,r){"use strict";r.d(t,{C:function(){return useUncontrolled}});var o=r(67294);function useUncontrolled({value:e,defaultValue:t,finalValue:r,onChange:i=()=>{}}){let[s,n]=(0,o.useState)(void 0!==t?t:r);return void 0!==e?[e,i,!0]:[s,(e,...t)=>{n(e),i?.(e,...t)},!1]}}},function(e){e.O(0,[5017,3162,3249,1014,9774,2888,179],function(){return e(e.s=43640)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.