File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/LicenseKey.bcfec210.js.tar
httpdocs/wp-content/plugins/all-in-one-seo-pack/dist/Lite/assets/js/LicenseKey.bcfec210.js 0000644 00000015734 15155302341 0033512 0 ustar 00 var/www/vhosts/uyarreklam.com.tr import{j as A,c as E,u as H,q as O,a as B}from"./index.bb0afb15.js";import{p as N}from"./popup.92105c51.js";import{u as M}from"./Wizard.61b5b25a.js";import{C as U}from"./Caret.7cc96622.js";import{G,a as V}from"./Row.c7b7fb90.js";import{S as D}from"./Checkmark.b35299d3.js";import{W as I,a as R,b as F}from"./Header.144bd910.js";import{W as Y}from"./CloseAndExit.9f79f06a.js";import{_ as j}from"./Steps.e6699495.js";import"./translations.d159963e.js";import{_ as q}from"./_plugin-vue_export-helper.eefbdd86.js";import{u as J}from"./ConnectStore.ba6d3644.js";import{u as X}from"./SetupWizardStore.385fb1d2.js";import{s as c,_ as t}from"./default-i18n.20001971.js";import{c as _,H as s,l as a,v as i,o as d,a as l,x as u,t as h,b as f,G as Z,N as Q,k as S}from"./runtime-dom.esm-bundler.baf35205.js";import"./helpers.80db7619.js";import"./params.af7ed354.js";import"./addons.9733312c.js";import"./upperFirst.ebdcbcf5.js";import"./toString.5aade9aa.js";import"./Logo.a16dfa01.js";import"./Index.b7e6928e.js";const o="all-in-one-seo-pack",$={setup(){const{getSelectedUpsellFeatures:e,strings:r}=M({stage:"license-key"});return{composableStrings:r,connectStore:J(),getSelectedUpsellFeatures:e,licenseStore:A(),optionsStore:E(),rootStore:H(),setupWizardStore:X()}},components:{CoreAlert:U,GridColumn:G,GridRow:V,SvgCheckmark:D,WizardBody:I,WizardCloseAndExit:Y,WizardContainer:R,WizardHeader:F,WizardSteps:j},data(){return{error:null,loading:!1,localLicenseKey:null,strings:O(this.composableStrings,{enterYourLicenseKey:c(t("Enter your %1$s License Key",o),"AIOSEO"),boldText:c("<strong>%1$s %2$s</strong>","AIOSEO","Lite"),purchasedBoldText:c("<strong>%1$s %2$s</strong>","AIOSEO","Pro"),linkText:c(t("upgrade to %1$s",o),"Pro"),placeholder:t("Paste your license key here",o),connect:t("Connect",o)})}},watch:{localLicenseKey(e){this.setupWizardStore.licenseKey=e}},computed:{noLicenseNeeded(){return c(t("You're using %1$s - no license needed. Enjoy!",o)+" 🙂",this.strings.boldText)},link(){return c('<strong><a href="%1$s" target="_blank">%2$s</a></strong>',B.utmUrl("general-settings","license-box"),this.strings.linkText)},tooltipText(){return this.rootStore.isPro?t("To unlock the selected features, please enter your license key below.",o):c(t("To unlock the selected features, please %1$s and enter your license key below.",o),this.link)},alreadyPurchased(){return c(t("Already purchased? Simply enter your license key below to connect with %1$s!",o),this.strings.purchasedBoldText)}},methods:{processConnectOrActivate(){if(this.rootStore.isPro)return this.processActivateLicense();this.processGetConnectUrl()},processActivateLicense(){this.error=null,this.loading=!0,this.rootStore.loading=!0,this.licenseStore.activate(this.localLicenseKey).then(()=>{this.optionsStore.internalOptions.internal.license.expired=!1,this.setupWizardStore.saveWizard("license-key").then(()=>{this.$router.push(this.setupWizardStore.getNextLink)})}).catch(e=>{if(this.loading=!1,this.localLicenseKey=null,this.rootStore.loading=!1,!e||!e.response||!e.response.body||!e.response.body.error||!e.response.body.licenseData){this.error=t("An unknown error occurred, please try again later.",o);return}const r=e.response.body.licenseData;if(r.invalid){this.error=t("The license key provided is invalid. Please use a different key to continue receiving automatic updates.",o);return}if(r.disabled){this.error=t("The license key provided has been suspended. Please use a different key to continue receiving automatic updates. (Error Code AH12BGDT45D9)",o);return}if(r.domainDisabled){this.error=t("The license key provided cannot be used for this domain as it has been disabled. Please use a different key to continue receiving automatic updates, or contact our support team for more information. (Error Code RW94KXEO54I2)",o);return}if(r.expired){this.error=this.licenseKeyExpired;return}if(r.activationsError){this.error=t("This license key has reached the maximum number of activations. Please deactivate it from another site, or upgrade your license to continue receiving automatic updates. (Error Code ZL53IPPJ80RF)",o);return}(r.connectionError||r.requestError)&&(this.error=t("There was an error connecting to the licensing API. Please try again later.",o))})},processGetConnectUrl(){this.loading=!0,this.rootStore.loading=!0,this.connectStore.getConnectUrl({key:this.localLicenseKey,wizard:!0}).then(e=>{if(e.body.url){if(!e.body.popup)return this.loading=!1,this.rootStore.loading=!1,window.open(e.body.url);this.openPopup(e.body.url)}})},openPopup(e){N(e,"_self",600,630,!0,["file","token"],this.completedCallback,this.closedCallback)},completedCallback(e){return e.wizard=!0,this.connectStore.processConnect(e)},closedCallback(e){if(e)return window.location.reload();this.loading=!1,this.rootStore.loading=!1},skipStep(){this.setupWizardStore.saveWizard(),this.$router.push(this.setupWizardStore.getNextLink)}},mounted(){this.localLicenseKey=this.setupWizardStore.licenseKey}},ee={class:"aioseo-wizard-license-key"},te={class:"header"},oe=["innerHTML"],re={class:"license-cta-box"},ne=["innerHTML"],se=["innerHTML"],ie={class:"license-key"},ae=l("input",{type:"text",name:"username",autocomplete:"username",style:{display:"none"}},null,-1),ce={class:"go-back"},le=l("div",{class:"spacer"},null,-1);function de(e,r,ue,p,n,m){const b=i("wizard-header"),L=i("wizard-steps"),v=i("svg-checkmark"),w=i("grid-column"),z=i("grid-row"),x=i("base-input"),g=i("base-button"),C=i("core-alert"),k=i("router-link"),T=i("wizard-body"),P=i("wizard-close-and-exit"),W=i("wizard-container");return d(),_("div",ee,[s(b),s(W,null,{default:a(()=>[s(T,null,{footer:a(()=>[l("div",ce,[s(k,{to:p.setupWizardStore.getPrevLink,class:"no-underline"},{default:a(()=>[u("←")]),_:1},8,["to"]),u(" "),s(k,{to:p.setupWizardStore.getPrevLink},{default:a(()=>[u(h(n.strings.goBack),1)]),_:1},8,["to"])]),le,s(g,{type:"gray",onClick:m.skipStep},{default:a(()=>[u(h(n.strings.skipThisStep),1)]),_:1},8,["onClick"])]),default:a(()=>[s(L),l("div",te,h(n.strings.enterYourLicenseKey),1),p.rootStore.isPro?f("",!0):(d(),_("div",{key:0,class:"description",innerHTML:m.noLicenseNeeded},null,8,oe)),l("div",re,[l("div",{innerHTML:m.tooltipText},null,8,ne),s(z,null,{default:a(()=>[(d(!0),_(Z,null,Q(p.getSelectedUpsellFeatures,(y,K)=>(d(),S(w,{sm:"6",key:K},{default:a(()=>[s(v),u(" "+h(y.name),1)]),_:2},1024))),128))]),_:1})]),p.rootStore.isPro?f("",!0):(d(),_("div",{key:1,innerHTML:m.alreadyPurchased},null,8,se)),l("form",ie,[ae,s(x,{type:"password",placeholder:n.strings.placeholder,"append-icon":n.localLicenseKey?"circle-check":null,autocomplete:"new-password",modelValue:n.localLicenseKey,"onUpdate:modelValue":r[0]||(r[0]=y=>n.localLicenseKey=y)},null,8,["placeholder","append-icon","modelValue"]),s(g,{type:"green",disabled:!n.localLicenseKey,loading:n.loading,onClick:m.processConnectOrActivate},{default:a(()=>[u(h(n.strings.connect),1)]),_:1},8,["disabled","loading","onClick"])]),n.error?(d(),S(C,{key:2,class:"license-key-error",type:"red",innerHTML:n.error},null,8,["innerHTML"])):f("",!0)]),_:1}),s(P)]),_:1})])}const He=q($,[["render",de]]);export{He as default};