Files

14 lines
289 KiB
JavaScript
Raw Permalink Normal View History

(()=>{var e={220:(e,t,n)=>{"use strict";var r=n(6305),o=n(4994);t.A=void 0;var i=o(n(4634)),a=o(n(6305)),s=r(n(1609)),l=o(n(9893)),c=n(790);function u(){}s.default.createElement;var d={contain:"react-Slidy--contain",cover:"react-Slidy--cover",fullHeight:"react-Slidy--fullHeight",fullWidth:"react-Slidy--fullWidth"};t.A=function(e){var t=e.ArrowLeft,r=e.ArrowRight,o=e.children,p=e.classNameBase,f=void 0===p?"react-Slidy":p,m=e.doAfterDestroy,h=void 0===m?u:m,g=e.doAfterInit,b=void 0===g?u:g,v=e.doAfterSlide,y=void 0===v?u:v,_=e.doBeforeSlide,w=void 0===_?u:_,k=e.imageObjectFit,x=e.infiniteLoop,S=void 0!==x&&x,O=e.itemsToPreload,j=void 0===O?1:O,C=e.initialSlide,I=void 0===C?0:C,E=e.ease,P=void 0===E?"ease":E,A=e.lazyLoadSlider,T=void 0===A||A,L=e.lazyLoadConfig,N=void 0===L?{offset:150}:L,R=e.keyboardNavigation,D=void 0!==R&&R,M=e.numOfSlides,F=void 0===M?1:M,V=e.sanitize,H=void 0===V||V,z=e.slide,B=void 0===z?0:z,U=e.slideSpeed,q=void 0===U?500:U,$=e.showArrows,W=void 0===$||$,G=e.useFullHeight,Y=void 0!==G&&G,K=e.useFullWidth,J=void 0===K||K,Z=(0,s.useState)(!T),Q=Z[0],X=Z[1],ee=(0,s.useRef)(null);(0,s.useEffect)(function(){var e;if(T){var t=function(){var t=N.offset,n=void 0===t?0:t;(e=new window.IntersectionObserver(te,{rootMargin:n+"px 0px 0px"})).observe(ee.current)};"IntersectionObserver"in window?t():Promise.resolve().then(function(){return(0,a.default)(n(5127))}).then(t)}return function(){return e&&e.disconnect()}},[]);var te=function(e,t){var n=e[0];(n.isIntersecting||n.intersectionRatio>0)&&(t.unobserve(n.target),X(!0))},ne=Math.min(F,s.default.Children.count(o)),re=[f,Y&&d.fullHeight,J&&d.fullWidth,k&&d[k]].filter(Boolean).join(" "),oe={ArrowLeft:t,ArrowRight:r,children:o,classNameBase:f,doAfterDestroy:h,doAfterInit:b,doAfterSlide:y,doBeforeSlide:w,ease:P,infiniteLoop:S,initialSlide:I,itemsToPreload:j,keyboardNavigation:D,numOfSlides:F,showArrows:W,slide:B,slideSpeed:q};return(0,c.jsx)("div",{className:re,ref:ee,children:Q&&(0,c.jsx)(l.default,(0,i.default)({},oe,{numOfSlides:H?ne:F,children:o}))})}},790:e=>{"use strict";e.exports=window.ReactJSXRuntime},1609:e=>{"use strict";e.exports=window.React},3072:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case g:case h:case l:return e;default:return t}}case o:return t}}}function k(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=i,t.Lazy=g,t.Memo=h,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return k(e)||w(e)===u},t.isConcurrentMode=k,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===p},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===h},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===a||e===f||e===m|
(0,t.__)("Page %1$d of %2$d","kadence-blocks"),n+1,y.length),text:e.step,onClick:()=>x(n)},n)},n);var r})}),E&&(0,i.jsx)(Ln,{variant:"primary",className:"components-wizard__forward-button",disabled:c,onClick:async function(){if(!E)return;T({type:"SET_SAVING",payload:!0});const{firstTime:e,saving:t,saveError:n,...r}=A;await j({firstTime:!1,...r})&&(T({type:"SET_SAVING",payload:!1}),x(k+1),O(e=>{const t=new Set(e.values());return t.add(k),t}))},children:s}),!E&&(0,i.jsxs)("div",{className:"components-wizard__finish-button-container",children:[h&&"function"==typeof h?(0,i.jsx)(Ln,{variant:"link",className:"components-wizard__secondary-button",onClick:h,children:g||""}):null,v&&(0,i.jsx)(Ln,{variant:"primary",className:"components-wizard__primary-button",disabled:m,onClick:p,children:f}),!v&&(0,i.jsx)("div",{className:"kt-generate-wrap",children:(0,i.jsx)(Ln,{variant:"primary",className:"components-wizard__primary-button",disabled:m,onClick:p,children:f+" "+(0,t.__)("(70 Credits)","kadence-blocks")})})]})]})]})}const Rs=window.wp.data,Ds=[],Ms=()=>{const{wp:e}=window;return e.media.view.MediaFrame.Select.extend({featuredImageToolbar(t){this.createSelectToolbar(t,{text:e.media.view.l10n.setFeaturedImage,state:this.options.state})},editState(){const t=this.state("featured-image").get("selection"),n=new e.media.view.EditImage({model:t.single(),controller:this}).render();this.content.set(n),n.loadEditor()},createStates:function(){this.on("toolbar:create:featured-image",this.featuredImageToolbar,this),this.on("content:render:edit-image",this.editState,this),this.states.add([new e.media.controller.FeaturedImage,new e.media.controller.EditImage({model:this.options.editImage})])}})},Fs=()=>{const{wp:e}=window;return e.media.view.MediaFrame.Post.extend({galleryToolbar(){const n=this.state().get("editing");this.toolbar.set(new e.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:n?(0,t.__)("Update Collection","kadence-blocks"):(0,t.__)("Create Collection","kadence-blocks"),priority:80,requires:{library:!0},click(){const e=this.controller,t=e.state();e.close(),t.trigger("update",t.get("library")),e.setState(e.options.state),e.reset()}}}}))},galleryEditToolbar(){const n=this.state().get("editing");this.toolbar.set(new e.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:n?(0,t.__)("Update Collection","kadence-blocks"):(0,t.__)("Add to Collection","kadence-blocks"),priority:80,requires:{library:!0},click(){const e=this.controller,t=e.state();e.close(),t.trigger("update",t.get("library")),e.setState(e.options.state),e.reset()}}}}))},galleryAddToolbar(){this.toolbar.set(new e.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:(0,t.__)("Add to Collection","kadence-blocks"),priority:80,requires:{selection:!0},click(){const e=this.controller,t=e.state();e.state("gallery-edit").get("library").add(t.get("selection").models),t.trigger("reset"),e.setState("gallery-edit"),this.controller.modal.focusManager.focus()}}}}))},editState(){const t=this.state("gallery").get("selection"),n=new e.media.view.EditImage({model:t.single(),controller:this}).render();this.content.set(n),n.loadEditor()},createStates:function(){this.on("toolbar:create:main-gallery",this.galleryToolbar,this),this.on("toolbar:create:gallery-add",this.galleryAddToolbar,this),this.on("toolbar:create:gallery-edit",this.galleryEditToolbar,this),this.on("content:render:edit-image",this.editState,this),this.states.add([new e.media.controller.Library({id:"gallery",title:(0,t.__)("Create Collection","kadence-blocks"),priority:40,toolbar:"main-gallery",filterable:"uploaded",multiple:"add",editable:!1,library:e.media.query({type:"image",...this.options.library})}),new e.media.controller.EditImage({model:this.options.editImage}),new e.media.controller.GalleryEdit({title:(0,t.__)("Edit Collection","kadence-blocks"),library:this.options.selection,editing:this.options.editing,menu:"gallery",displaySettings:!1,multiple:!0}),new e.media.controller.GalleryAdd({title:(0,t.__)("Add to Collection","kadence-blocks")})])}})},Vs=e=>["sizes","m
// translators: %s: entity type
// translators: %s: entity type
(0,t.__)("Tell us about your %s","kadence-blocks"),Pl[k]),E=g.filter(e=>e.value===(j||"en-US")),P=(0,t.sprintf)(
// translators: %s: language
// translators: %s: language
(0,t.__)("This should be written in %s.","kadence-blocks"),E?.[0]?.label?E[0].label:"your site language"),{getMissionStatement:A}={getMissionStatement:async function(e,t){try{const n=new URL(window.location.href),r=window?.kadence_blocks_params?.proData?.domain?window.kadence_blocks_params.proData.domain:n.hostname;let o=window?.kadence_blocks_params?.proData?.api_key?window.kadence_blocks_params.proData.api_key:"";o||(o=window?.kadenceHomeParams?.apiKey?window.kadenceHomeParams.apiKey:"");let i=window?.kadence_blocks_params?.site_name?window.kadence_blocks_params.site_name:"";i||(i=window?.kadenceHomeParams?.site_name?window.kadenceHomeParams.site_name:"");let a=window?.kadence_blocks_params?.pSlug?window.kadence_blocks_params.pSlug:"";a||(a=window?.kadenceHomeParams?.pSlug?window.kadenceHomeParams.pSlug:"");let s=window?.kadence_blocks_params?.pVersion?window.kadence_blocks_params.pVersion:"";s||(s=window?.kadenceHomeParams?.pVersion?window.kadenceHomeParams.pVersion:"");const l={domain:r,key:o,site_name:i,product_slug:a,product_version:s},c=await fetch("https://content.startertemplatecloud.com/wp-json/prophecy/v1/proxy/intake/improve-mission-statement",{method:"POST",headers:{"Content-Type":"application/json","X-Prophecy-Token":btoa(JSON.stringify(l))},body:JSON.stringify({text:e,lang:t||"en-US",stream:!0})});if(200!==c?.status){if(424===c?.status)return Promise.reject("license");const e=c?.message?c.message:c;return Promise.reject(e)}return c.body}catch(e){const t=e?.message?e.message:e;return Promise.reject(t)}}};return(0,e.useEffect)(()=>{const e=Math.round(w.length/300*100);0==e&&r("initial"),e<50&&e>0&&r("weak"),e>=50&&e<100&&r("medium"),e>=100&&e<200&&r("strong"),e>=200&&e<400&&r("enough"),e>=400&&e<500&&r("less"),e>=500&&r("muchLess"),a(e)},[w]),(0,i.jsxs)(En.Flex,{gap:0,align:"normal",style:Il.container,children:[(0,i.jsx)(En.FlexBlock,{style:{alignSelf:"center"},children:(0,i.jsx)(En.Flex,{justify:"center",style:Il.leftContent,children:(0,i.jsx)(En.FlexBlock,{style:Il.formWrapper,className:"stellarwp-body",children:(0,i.jsxs)(ds,{headline:I,content:j&&"en-US"!==j?P+" "+El:El,children:[(0,i.jsxs)(En.__experimentalView,{style:Il.textareaWrapper,children:[(0,i.jsx)(Cs,{hideLabelFromVision:!0,label:I,placeholder:k===m?(0,t.sprintf)(
// translators: %s: company or individual name
// translators: %s: company or individual name
(0,t.__)("I am %s, a…","kadence-blocks"),C):(0,t.sprintf)(
// translators: %s: company or individual name
// translators: %s: company or individual name
(0,t.__)("%s is a…","kadence-blocks"),C),value:w,onChange:e=>{_({type:"SET_MISSION_STATEMENT",payload:e}),_({type:"SET_IMAGE_SEARCH_QUERY",payload:""})},progressBarProps:{value:o>=100?100:o,color:x?.[n]?.color?x[n].color:"red",message:x?.[n]?.message?x[n].message:""},disabled:d,aiLoading:f,aiSuggestion:d,onUndo:()=>p(""),onAccept:()=>{_({type:"SET_MISSION_STATEMENT",payload:d}),p("")}}),c&&(0,i.jsxs)(En.__experimentalVStack,{style:Il.tooltip,children:[(0,i.jsx)(En.__experimentalText,{style:Il.tooltip.title,children:(0,t.__)("Thought Starters","kadence-blocks")}),O[k].length>0&&(0,i.jsx)("ul",{style:Il.tooltip.content,children:O[k].map(e=>(0,i.jsx)("li",{children:e},e))})]})]}),!d&&!f&&(0,i.jsxs)(i.Fragment,{children:[b&&(0,i.jsx)("div",{className:"stellarwp-ai-error-text",children:(0,i.jsx)("div",{className:"stellarwp-ai-error-content",children:"license"===b?(0,t.__)("Error, license key invalid."):(0,t.__)("Error, AI improve failed, please try again.")})}),(0,i.jsxs)(En.Flex,{justify:"space-between",children:[(0,i.jsx)(En.FlexItem,{children:o>=100&&o<400&&(0,i.jsx)(Ln,{className:"stellarwp-ai-improve-button",icon:Mn,onClick:()=>{return e=w,h(!0),v(""),void A(e,j).then(e=>{const t=e.getReader();t.read().then(function e({done:n,value:r}){if(n)return void h(!1);const o=function(e){const t=(new TextDecoder).decode(e).split("\n"),n={content:""};return t.forEach(e=>{const t=e.indexOf(":");if(-1!==t){const r=e.slice(0,t).trim(),o=e.slice(t+1).trim();if("data"===r&&"content"!==o)try{const e=JSON.parse(o);e.content&&(n.content+=e.content)}catch(e){console.error("Error parsing JSON data:",e)}}}),n}(r);return o?.content&&p(e=>e+o.content),t.read().then(e)}),h(!1)}).catch(e=>{v("license"===e?"license":"error"),console.log(e),h(!1)});var e},children:(0,t.__)("Improve with AI","kadence-blocks")})}),(0,i.jsx)(En.FlexItem,{children:(0,i.jsx)(Ln,{size:"small",className:"stellarwp-show-tips-button",icon:c?Un:Bn,iconPosition:"right",onClick:()=>u(e=>!e),children:c?(0,t.__)("Hide Tips","kadence-blocks"):(0,t.__)("Show Tips","kadence-blocks")})})]})]})]})})})}),(0,i.jsx)(En.FlexBlock,{display:"flex",children:(0,i.jsx)(En.Flex,{justify:"center",children:(0,i.jsx)(En.FlexBlock,{style:Il.rightContent,children:(0,i.jsx)(Ss,{backgroundImage:S[s],text:(0,t.__)("Not sure where to start? Here's some real life examples!","kadence-blocks"),doBeforeSlide:e=>l(e.nextSlide),slides:[(0,i.jsx)(xl,{}),(0,i.jsx)(Cl,{}),(0,i.jsx)(Ol,{}),(0,i.jsx)(wl,{})]})})})})]})}const Tl=window.wp.url;function Ll({tone:e,headline:n,content:r}){return(0,i.jsxs)("div",{className:"slide-card-row--tone",children:[e?(0,i.jsx)(Dn,{text:`${(0,t.__)("Tone","kadence-blocks")}: ${e}`}):null,n?(0,i.jsx)("p",{className:"slide-card-row__headline",children:n}):null,r?(0,i.jsx)("p",{className:"slide-card-row__content",children:r}):null]})}function Nl(){return(0,i.jsx)(ul,{children:(0,i.jsxs)(En.__experimentalVStack,{spacing:"6",children:[(0,i.jsx)(Ll,{tone:(0,t.__)("Professional","kadence-blocks"),headline:(0,t.__)("Elevate Your Well-being with Healing Touch's Expert Care","kadence-blocks"),content:(0,t.__)('"Experience the pinnacle of wellness and rejuvenation as our skilled therapists provide you with expert care and tailored massage therapy at Healing Touch."',"kadence-blocks")}),(0,i.jsx)(Ll,{tone:(0,t.__)("Friendly","kadence-blocks"),headline:(0,t.__)("Welcome to Your Personal Oasis","kadence-blocks"),content:(0,t.__)('"Immerse yourself in the ultimate relaxation experience at Healing Touch, where our friendly team of skilled therapists will whisk you away to a serene sanctuary of bliss and rejuvenation."',"kadence-blocks")}),(0,i.jsx)(Ll,{tone:(0,t.__)("Informative","kadence-blocks"),headline:(0,t.__)("Discover the Secrets of Blissful Wellness","kadence-blocks"),content:(0,t.__)('"Experience the transformative power of professional massage therapy and unlock a world of relaxation, pain relief, and enhanced well-being at Healing Touch."',"kadence-blocks")})]})})}function Rl(){return(0,i.jsx)(ul,{children:(0,i.jsxs)(En.__experimentalVStack,{spacing:"6",children:[(0,i.jsx)(Ll,{tone