1import{a as u,p as c,y as R,w as K}from"./chunk-62JRHF6Z-DLq-wDkm.js";import{h as B,e as W,f,t as S,w as m,P as q,b as G}from"./seo-Cwb_Mm1k.js";import{g as V,a as z}from"./checkoutService-DpVTEC8m.js";import{u as Y}from"./useTranslation-BVjJMdfx.js";var Q=Object.defineProperty,J=(t,e,s)=>e in t?Q(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,l=(t,e,s)=>J(t,typeof e!="symbol"?e+"":e,s);const p={Log(...t){console&&console.log&&console.log(...t)},Error(...t){console&&console.error&&console.error(...t)},Warn(...t){console&&console.warn&&console.warn(...t)},Debug(...t){console&&console.debug&&console.debug(...t)}};function H(t,e){const s=t.contentWindow,i=t.src,a={};if(!s||!i)return null;const o=function(n){if(!(n&&n.origin&&n.origin.indexOf("js.stripe.com")>0||n.origin.indexOf("www.paypal.com")>0)&&n.origin===e&&n&&n.data&&typeof n.data=="string"&&n.data.charAt(0)==="{")try{const r=JSON.parse(n.data);typeof r=="object"&&r.type&&a[r.type]&&a[r.type].forEach(h=>{h(r.data)})}catch(r){p.Error(r)}};return window.addEventListener("message",o),{on(n,r){a[n]||(a[n]=[]),a[n].push(r)},one(n,r,h=!1){h&&delete a[n],!a[n]&&this.on(n,r)},destroy(){window.removeEventListener("message",o)},post(n,r){s.postMessage(JSON.stringify({type:n,data:r}),i.replace(/([^:]+:\/\/[^/]+).*/,"$1"))}}}const E=2147483647;function X(){const t=function(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)};
1return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}function Z(){let t=!1;try{const e=navigator.userAgent.toLowerCase();/edge\/|trident\/|msie /.test(e)?t=!0:e.indexOf("safari")!==-1&&(e.indexOf("chrome")>-1||(t=!0))}catch{}return t}function D(t){return typeof t>"u"||typeof t=="function"||typeof t=="object"&&t!==null}function ee(t){return D(t)?null:t===null?"null":t===!0?"1":t===!1?"0":encodeURIComponent(t).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+")}function te(t){const e=[];return Object.keys(t).forEach(s=>{const i=t[s],a=ee(i);a!==null&&e.push(`${s}=${a}`)}),e.join("&")}function se(t){const e={};Object.entries(t).forEach(([i,a])=>{D(a)||(e[i]=a)});const{sandbox:s}=t;return s&&s.ctx&&s.token&&(e.s_ctx_ts=s.ctx,e.sandbox=s.token),e}function ie(t){return t.pageY<=20}function b(){return typeof window>"u"}function I(t,e){if(t==null)throw new Error(e)}class re{constructor(e){l(this,"styleElement"),l(this,"bodyScrollDisableClassName"),l(this,"isFlashingBrowser"),l(this,"overflow",{x:0,y:0}),l(this,"metaColorSchemeValue",null),l(this,"metaColorSchemeElement",null),this.guid=e,this.bodyScrollDisableClassName=`is-fs-checkout-open-${this.guid}`,this.styleElement=document.createElement("style"),this.styleElement.textContent+=this.getBasicStyle(),this.isFlashingBrowser=Z()||!b()&&!!document.querySelector("#___gatsby"),this.metaColorSchemeElement=document.head.querySelector('meta[name="color-scheme"]')}addStyle(e){this.styleElement.textContent+=e}attach(){return document.head.appendChild(this.styleElement),this}remove(){return document.head.contains(this.styleElement)&&document.head.removeChild(this.styleElement),this}disableBodyScroll(){this.backupScrollPosition(),document.body.classList.add(this.bodyScrollDisableClassName)}enableBodyScroll(){document.body.classList.remove(this.bodyScrollDisableClassName),this.restoreScrollPosition()}disableMetaColorScheme(){this.metaColorSchemeElement&&(this.metaColorSchemeValue=this.metaColorSchemeElement.getAttribute("content"),this.metaColorSchemeElement.setAttribute("content","light"))}enableMetaColorScheme(){this.metaColorSchemeElement&&this.metaColorSchemeValue&&(this.metaColorSchemeElement.setAttribute("content",this.metaColorSchemeValue),this.metaColorSchemeValue=null)}getBasicStyle(){return`body.${this.bodyScrollDisableClassName} { overflow: hidden !important; }`}backupScrollPosition(){this.overflow={x:document.documentElement.scrollTop,y:document.documentElement.scrollLeft}}restoreScrollPosition(){document.documentElement.scrollTop=this.overflow.x,document.documentElement.scrollLeft=this.overflow.y}}const A=class _{constructor(e,s,i="Loading Freemius Checkout"){l(this,"loaderElement"),l(this,"isOpen",!1),l(this,"loaderElementId"),this.style=e,this.loaderElementId=`fs-loader-${this.style.guid}`,this.loaderElement=document.createElement("div"),this.loaderElement.id=this.loaderElementId,this.loaderElement.innerHTML=`<img src="${s}" alt="${i}" />`,this.style.addStyle(this.getStyle())}show(){return this.isOpen?this:(this.loaderElement.classList.add("show"),document.body.appendChild(this.loaderElement),this.isOpen=!0,this)}hide(){return this.isOpen?(this.loaderElement.classList.remove("show"),this.isOpen=!1,setTimeout(()=>{this.hideImmediate()},_.TRANSITION_TIME),this):this}hideImmediate(){return this.loaderElement.parentNode&&(this.loaderElement.classList.remove("show"),this.loaderElement.parentNode.removeChild(this.loaderElement),this.isOpen=!1),this}getStyle(){return`#${this.loaderElementId} { display: none; position: fixed; z-index: ${E-1}; width: 100%; height: 100%; top: 0; left: 0; right: 0; bottom: 0; text-align: left; background: rgba(0, 0, 0, 0.6); transition: opacity ${_.TRANSITION_TIME}ms ease-out; will-change: opacity; opacity: 0; } #${this.loaderElementId}.show { opacity: 1; display: block; } #${this.loaderElementId} img { position: absolute; top: 40%; left: 50%; width: auto; height: auto; margin-left: -25px; background: #fff; padding: 10px; border-radius: 50%; box-shadow: 2px 2px 2px rgba(0,0,0,0.1); }`}};l(A,"TRANSITION_TIME",200);let ne=A;const T=class w{constructor(e,s,i,a,o){l(this,"postman",null),l(this,"iFrame"),l(this,"iFrameWrapper"),l(this,"loadedEventListeners",new Set),l(this,"closedEventListeners",new Set),this.baseUrl=e,this.visibleClass=a,this.checkoutOptions=o;const{iFrame:n,iFrameWrapper:r}=this.attachIFrame(e,s,i);this.iFrame=n,this.iFrameWrapper=r,this.addEventListeners()}static getWrapperID(e){return`${e}-wrapper`}close(){this.postman?.post("close",null)}onClosed(e){this.closedEventListeners.add(e)}onLoaded(e){this.loadedEventListeners.add(e)}
1addToExitIntent(e){e.addListener(()=>{this.postman?.post("exit_intent",null),this.checkoutOptions.onExitIntent?.()})}attachIFrame(e,s,i){const a=`${e}/?${te(s)}#${encodeURIComponent(document.location.href)}`,o=document.createElement("iframe");o.id=i,o.src=a,o.setAttribute("allowTransparency","true"),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("style","background: rgba(0,0,0,0.003); border: 0 none transparent;"),o.setAttribute("frameborder","0"),o.setAttribute("data-testid",o.id);const n=this.checkoutOptions.modal_title??w.DEFAULT_TITLE;o.setAttribute("title",n);const r=document.createElement("div");return r.setAttribute("role","dialog"),r.setAttribute("aria-label",n),r.setAttribute("aria-modal","true"),r.setAttribute("data-testid",`${o.id}-wrapper`),r.id=w.getWrapperID(i),r.appendChild(o),document.body.appendChild(r),{iFrame:o,iFrameWrapper:r}}addEventListeners(){const{success:e,purchaseCompleted:s,cancel:i,track:a,afterOpen:o,afterClose:n}=this.checkoutOptions;this.postman=H(this.iFrame,this.baseUrl),this.postman?.one("upgraded",r=>{try{e?.(r)}catch(h){p.Error(h)}this.dispatchOnClosed(),this.removeIFrameAndPostman(),n?.()},!0),this.postman?.one("purchaseCompleted",r=>{try{s?.(r)}catch(h){p.Error(h)}},!0),this.postman?.one("canceled",()=>{try{i?.()}catch(r){p.Error(r)}this.dispatchOnClosed(),this.removeIFrameAndPostman(),n?.()},!0),this.postman?.on("track",r=>{try{a?.(r.event,r)}catch(h){p.Error(h)}}),this.postman?.one("loaded",()=>{this.dispatchOnLoaded(),this.iFrame?.classList.add(this.visibleClass);try{o?.()}catch(r){p.Error(r)}},!0)}removeIFrameAndPostman(){this.postman?.destroy(),this.postman=null,this.iFrame.remove(),this.iFrameWrapper.remove(),this.closedEventListeners.clear(),this.loadedEventListeners.clear()}dispatchOnLoaded(){this.loadedEventListeners.forEach(e=>e())}dispatchOnClosed(){this.closedEventListeners.forEach(e=>e())}};l(T,"DEFAULT_TITLE","Checkout");let L=T;const j=class C{constructor(e,s,i){l(this,"iFrameID"),this.style=e,this.options=s,this.baseUrl=i,this.iFrameID=`fs-checkout-page-${this.style.guid}`}create(e){const s={...this.options,...e};return new L(this.baseUrl,this.getQueryParams(s),this.iFrameID,C.VISIBLE_CLASS,s)}addStyle(){this.style.addStyle(this.getStyle())}getQueryParams(e){return{mode:"dialog",guid:this.style.guid,_fs_checkout:!0,...se(e)}}getStyle(){return`#${this.iFrameID} { z-index: ${E-1}; background: rgba(0,0,0,0.003); border: 0 none transparent; visibility: ${this.style.isFlashingBrowser?"hidden":"visible"}; margin: 0; padding: 0; position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; -webkit-tap-highlight-color: transparent; overflow: hidden; } #${this.iFrameID}.${C.VISIBLE_CLASS} { visibility: visible; } #${L.getWrapperID(this.iFrameID)} { z-index: ${E-1}; position: fixed; top: 0px; left: 0px; width: 100%; height: 100%; overflow: hidden; }`}};l(j,"VISIBLE_CLASS","show");let oe=j;class ae{constructor(e,s,i,a,o){l(this,"checkoutIFrameBuilder"),l(this,"checkoutIFrame",null),l(this,"lastFocusedElement",null),this.style=e,this.exitIntent=s,this.loader=i,this.checkoutIFrameBuilder=new oe(this.style,o,a),this.checkoutIFrameBuilder.addStyle()}isOpen(){return this.checkoutIFrame!==null}open(e){return this.isOpen()?this:(this.backupFocusedElement(),this.style.attach(),this.style.disableBodyScroll(),this.style.disableMetaColorScheme(),this.loader.show(),this.exitIntent.attach(),this.checkoutIFrame=this.checkoutIFrameBuilder.create(e),this.checkoutIFrame.onLoaded(this.onLoaded.bind(this)),this.checkoutIFrame.onClosed(this.onClosed.bind(this)),this.checkoutIFrame.addToExitIntent(this.exitIntent),this)}close(){return this.checkoutIFrame?.close(),this.loader.hideImmediate(),this}onLoaded(){this.loader.hide()}onClosed(){this.checkoutIFrame=null,this.loader.hide(),this.style.enableBodyScroll(),this.style.enableMetaColorScheme(),this.exitIntent.detach(),this.restoreFocusedElement(),this.style.remove()}backupFocusedElement(){this.lastFocusedElement=document.activeElement??null}restoreFocusedElement(){this.lastFocusedElement&&(this.lastFocusedElement.focus?.(),this.lastFocusedElement=null)}}class le{constructor(e){l(this,"exitIntentId"),l(this,"exitIntentDiv",null),l(this,"clearExitIntentListener",null),l(this,"listeners",[]),this.style=e,this.exitIntentId=`fs-exit-intent-${this.style.guid}`,this.style.addStyle(this.getStyle())}isAttached(){return this.exitIntentDiv!==null}addListener(...e){this.listeners.push(...e)}attach(...e){if(e&&this.addListener(...e),this.isAttached())return this;this.exitIntentDiv=document.createElement("div"),this.exitIntentDiv.id=this.exitIntentId,document.body.appendChild(this.exitIntentDiv);const s=document.documentElement;let i=null;const a=300,o=r=>{ie(r)&&(i=window.setTimeout(()=>{try{this.fireListeners()}catch(h){p.Error(h)}},a))},n=()=>
1{i&&(clearTimeout(i),i=null)};return s.addEventListener("mouseleave",o),s.addEventListener("mouseenter",n),this.clearExitIntentListener=()=>{i&&(clearTimeout(i),i=null),s.removeEventListener("mouseleave",o),s.removeEventListener("mouseenter",n)},this}detach(){return this.isAttached()?(this.exitIntentDiv?.remove(),this.exitIntentDiv=null,this.clearExitIntentListener?.(),this):this}fireListeners(){this.listeners.forEach(e=>{e()})}getStyle(){return`#${this.exitIntentId} { z-index: ${E}; border: 0; background: transparent; position: fixed; padding: 0; margin: 0; height: 10px; left: 0; right: 0; width: 100%; top: 0; }`}}const $=class x{constructor(e){l(this,"queryParams",null),this.url=e,this.queryParams=this.parseQueryStringForCart()}hasCart(){return this.queryParams!==null}getPluginID(){return I(this.queryParams,x.NO_CART_FOUND_MESSAGE),this.queryParams.__fs_plugin_id}getPluginPublicKey(){return I(this.queryParams,x.NO_CART_FOUND_MESSAGE),this.queryParams.__fs_plugin_public_key}matchesPluginID(e){const s=Number.parseInt(this.getPluginID(),10),i=Number.parseInt(e.toString(),10);return Number.isFinite(s)&&Number.isFinite(i)&&s===i}getCheckoutOptions(){I(this.queryParams,x.NO_CART_FOUND_MESSAGE);const e={plugin_id:"",public_key:""};return Object.entries(this.queryParams).forEach(([s,i])=>{s==="__fs_plugin_id"?e.plugin_id=i:s==="__fs_plugin_public_key"?e.public_key=i:e[s]=i}),e}parseQueryStringForCart(){const e="__fs_authorization",s=new URLSearchParams(this.url.search);if(!s.has(e))return null;const i={};return s.forEach((a,o)=>{o.startsWith("__fs_")&&(i[o]=a)}),i}};l($,"NO_CART_FOUND_MESSAGE","No cart was found");let ce=$;const N="https://checkout.freemius.com",de="http://checkout.freemius-local.com:8080";class he{constructor(e,s=!0,i=null){l(this,"options",{plugin_id:0,public_key:""}),l(this,"guid"),l(this,"baseUrl"),l(this,"style"),l(this,"loader"),l(this,"checkoutPopup"),l(this,"exitIntent"),l(this,"cart"),this.baseUrl=i??N;const{plugin_id:a,product_id:o,public_key:n,...r}=e;
1if(!a&&!o)throw new Error("Must provide a product_id to options.");this.options={...r,public_key:n,plugin_id:o??a},this.guid=X(),!b()&&(this.baseUrl=i??(window.FS?.__FS__IS_TEST__?de:N),this.style=new re(this.guid),this.loader=new ne(this.style,e.loadingImageUrl??`${this.baseUrl}/assets/img/spinner.svg`,e.loadingImageAlt),this.exitIntent=new le(this.style),this.checkoutPopup=new ae(this.style,this.exitIntent,this.loader,this.baseUrl,this.options),this.cart=new ce(new URL(window.location.href)),s&&this.recoverCart())}async open(e){if(!b()){if(this.checkoutPopup?.isOpen()){p.Warn("Checkout popup already open. Please close it first before opening it again.");return}if(document.body)this.checkoutPopup?.open(e);else return new Promise(s=>{document.addEventListener("DOMContentLoaded",()=>{this.checkoutPopup?.open(e),s()},{once:!0})})}}close(){b()||this.checkoutPopup?.close()}destroy(){b()||this.close()}getGuid(){return this.guid}recoverCart(){if(this.cart?.hasCart()&&this.cart?.matchesPluginID(this.options.plugin_id)){const e=this.cart.getCheckoutOptions();this.open(e)}}}const ue="32424",me="pk_391cda0360e950f673fd41356c946";function pe(){const t=u.useRef(null);u.useEffect(()=>()=>{t.current?.destroy()},[]);function e(){return t.current||(t.current=new he({product_id:ue,public_key:me},!1)),t.current}return e}const ge="53188";async function P(t,e,s,i,a){const o=t(),n=a?.trim().split(/\s+/)??[],r={plan_id:ge,billing_cycle:e,user_email:i,user_firstname:n[0]||void 0,user_lastname:n.slice(1).join(" ")||void 0,success:async h=>{const y=h?.purchase?.license_id;if(!y){f({title:m.t("pricing.toast.paymentFailedTitle"),description:m.t("pricing.toast.paymentFailedDesc"),variant:"destructive"});return}try{const g=await z({channel:"freemius",external_id:y});g.status==="success"?(await s?.(),f({title:m.t("pricing.toast.activatedTitle"),description:m.t("pricing.toast.activatedDesc"),variant:"success"})):f({title:m.t("pricing.toast.activationFailedTitle"),description:m.t("pricing.toast.activationFailedDesc",{message:g.message||"Please contact support."}),variant:"destructive"})}catch{f({title:m.t("pricing.toast.activationErrorTitle"),description:m.t("pricing.toast.activationErrorDesc"),variant:"destructive"})}}};o.open(r)}const O=["pricing.features.commercialRights","pricing.features.noWatermark","pricing.features.fasterSpeed","pricing.features.prioritySupport","pricing.features.imagesPerMonth","pricing.features.advancedModels","pricing.features.upTo4k"],ye=[{code:"pro_monthly",nameKey:"pricing.proMonthly",price:"8",periodKey:"pricing.perMonth",billedNoteKey:null,creditsKey:"pricing.creditsMonthly",showCredits:!1,badgeKey:null,billingCycle:"monthly",featureKeys:O,featured:!1,yearly:!1,delay:1},{code:"pro_yearly",nameKey:"pricing.proYearly",price:"3.6",periodKey:"pricing.perMonth",billedNoteKey:"pricing.billedYearly",creditsKey:"pricing.creditsYearly",showCredits:!1,badgeKey:"pricing.badge",billingCycle:"annual",featureKeys:O,featured:!0,yearly:!0,delay:2}];function fe(){const{t}=Y(),{openSignInModal:e}=B(),{data:s,status:i,revalidateSession:a}=W(),o=pe(),n=u.useRef(o),r=u.useRef(a),[h,y]=u.useState(null),[g,v]=u.useState(!1);u.useEffect(()=>{n.current=o},[o]),u.useEffect(()=>{r.current=a},[a]);const k=s?.subscription?.status==="active",M=u.useCallback(async()=>{if(!g){v(!0);try{const{url:d}=await V();window.open(d,"_blank"),v(!1)}catch{f({title:t("pricing.toast.errorTitle"),description:t("pricing.toast.errorDesc"),variant:"destructive"}),v(!1)}}},[g,t]);u.useEffect(()=>{if(i==="authenticated"&&h){const d=h;y(null),S("mon_manage_subscription",{plan:{bcycle:d}}),P(n.current,d,r.current,s?.user?.email,s?.user?.name)}},[i,h,s?.user?.email,s?.user?.name]);const U=d=>{if(i!=="authenticated"){y(d),e({title:t("pricing.signInTitle"),message:t("pricing.signInMessage")});return}S("mon_get_started",{plan:{bcycle:d}}),P(o,d,a,s?.user?.email,s?.user?.name)};return c.jsx("section",{id:"pricing",className:"pricing mb-16 scroll-mt-28 pt-8",children:c.jsxs("div",{className:"container",children:[c.jsx("nav",{"aria-label":"Breadcrumb",className:"mb-4 flex justify-center",children:c.jsxs("ol",{className:"flex items-center gap-2 text-sm",children:[c.jsx("li",{children:c.jsx(R,{to:"/",className:"text-text-secondary hover:text-primary-yellow transition-colors",children:t("common.editorShort")})}),c.jsx("li",{"aria-hidden":"true",className:"text-text-secondary",children:"âº"}),c.jsx("li",{"aria-current":"page",className:"text-text-primary",children:t("footer.pricing")})]})}),c.jsxs("div",{className:"fade-in text-center mb-6",children:[c.jsx("h2",{className:"text-[1.8rem] mb-2 text-text-primary font-space-grotesk font-bold",children:t("pricing.heading")}),c.jsx("p",{className:"text-text-secondary max-w-[700px] mx-auto text-[0.95rem] font-geist",children:t("pricing.subheading")})]}),c.jsx("div",{className:"pricing-container",children:ye.map(d=>c.jsxs("div",{style:{animationDelay:`${d.delay*.15}s`},onClick:()=>k?M():U(d.billingCycle),className:`pricing-card fade-in flex flex-col${d.featured?" featured":""}`,children:[d.badgeKey&&c.jsx("div",{className:"inline-block absolute right-2 top-2 px-3 py-2 bg-[#ef4444] text-white font-bold text-xs rounded-[10px]",children:t(d.badgeKey)}),c.jsxs("div",{className:"flex-1",children:[d.featured&&c.jsx("span",{className:"featured-label",children:t("pricing.featured")}),c.jsx("h3",{className:"text-2xl font-bold mb-2",children:t(d.nameKey)}),c.jsxs("div",{className:"price",children:[c.jsx("span",{className:"text-3xl font-semibold text-[var(--primary-yellow)]",children:d.price})," ",c.jsx("span",{className:"text-2xl font-semibold text-[var(--primary-yellow)]",children:"USD"}),c.jsxs("span",{className:"text-2xl font-semibold text-[var(--primary-yellow)]",children:[" ",t(d.periodKey)]})]}),d.yearly&&c.jsx("div",{className:"text-sm text-[var(--primary-yellow)] opacity-70 mt-1",children:t(d.billedNoteKey)}),d.showCredits&&c.jsx("div",{className:"price-credits inline-block my-2 px-4 py-2 text-base font-semibold text-[#D4C56A] bg-[rgba(212, 197, 106, 0.1)] border border-[rgba(212, 197, 106, 0.3)] rounded-lg",children:t(d.creditsKey)}),c.jsx("ul",{className:"pricing-features",children:d.featureKeys.map(F=>c.jsx("li",{children:t(F)},F))})]}),c.jsx("div",{children:k?c.jsx("button",{disabled:g,className:`btn ${d.featured?"btn-primary":"btn-secondary"} cursor-pointer`,children:t(g?"pricing.loading":"pricing.manageSubscription")}):c.jsx("button",{className:`btn ${d.featured?"btn-primary":"btn-secondary"} cursor-pointer`,children:t("pricing.getStarted")})})]},d.code))})]})})}const Se=()=>[{title:q},{name:"description",content:G}];function be(){return u.useEffect(()=>{S("mon_check_pricing")},[]),c.jsx(fe,{})}const _e=K(be);export{_e as default,Se as meta};
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.