관리-도구
편집 파일: HeadlineAnalyzer.07f7ef81.js
import{k as G}from"./index.5a710757.js";import{u as O}from"./ScrollTo.97c9805f.js";import{C as Y,a as F}from"./Score.987e7485.js";import{C as j}from"./Card.2a757b17.js";import{C as V}from"./Tooltip.b6b45c85.js";import{c as P,e as E}from"./Caret.662da1f3.js";import{S as L}from"./Exclamation.bf79561a.js";import{a as D,S as I}from"./index.01e1b194.js";import{_ as T}from"./_plugin-vue_export-helper.249dac1d.js";import{o as i,c as v,a as o,f as x,t as r,k as b,G as m,q as H,F as N,J as Z,x as A,l as k,C as y,u as M,b as B,j as q,v as z}from"./runtime-dom.esm-bundler.6789c400.js";import{S as J}from"./List.fd3f4b7e.js";import{S as R,C as U}from"./Index.8645c378.js";import"./translations.12335a6a.js";import{_ as s,s as S}from"./default-i18n.54b5d8cd.js";import{u as Q}from"./AnalyzerStore.c4c717ca.js";import"./helpers.f95d5840.js";import"./Slide.d0517fb0.js";const K={},X={viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-face-negative"},ee=o("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.99 0C4.47 0 0 4.48 0 10C0 15.52 4.47 20 9.99 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 9.99 0ZM6.5 6C5.67157 6 5 6.67157 5 7.5C5 8.32843 5.67157 9 6.5 9C7.32843 9 8 8.32843 8 7.5C8 6.67157 7.32843 6 6.5 6ZM13.5 6C12.6716 6 12 6.67157 12 7.5C12 8.32843 12.6716 9 13.5 9C14.3284 9 15 8.32843 15 7.5C15 6.67157 14.3284 6 13.5 6ZM4.88 15.5C5.68 13.45 7.67 12 10 12C12.33 12 14.32 13.45 15.12 15.5H13.45C12.75 14.31 11.48 13.5 10 13.5C8.52 13.5 7.24 14.31 6.55 15.5H4.88ZM2 10C2 14.42 5.58 18 10 18C14.42 18 18 14.42 18 10C18 5.58 14.42 2 10 2C5.58 2 2 5.58 2 10Z"},null,-1),se=[ee];function oe(t,e){return i(),v("svg",X,se)}const ne=T(K,[["render",oe]]),te={},re={viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-face-neutral"},ae=o("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.99 0C4.47 0 0 4.48 0 10C0 15.52 4.47 20 9.99 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 9.99 0ZM5 7.5C5 6.67157 5.67157 6 6.5 6C7.32843 6 8 6.67157 8 7.5C8 8.32843 7.32843 9 6.5 9C5.67157 9 5 8.32843 5 7.5ZM13.5 6C12.6716 6 12 6.67157 12 7.5C12 8.32843 12.6716 9 13.5 9C14.3284 9 15 8.32843 15 7.5C15 6.67157 14.3284 6 13.5 6ZM7 13.5V12H13V13.5H7ZM2 10C2 14.42 5.58 18 10 18C14.42 18 18 14.42 18 10C18 5.58 14.42 2 10 2C5.58 2 2 5.58 2 10Z"},null,-1),le=[ae];function ie(t,e){return i(),v("svg",re,le)}const ce=T(te,[["render",ie]]),de={},ue={viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-face-smile"},he=o("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.98 0C8.94 0 0 8.96 0 20C0 31.04 8.94 40 19.98 40C31.04 40 40 31.04 40 20C40 8.96 31.04 0 19.98 0ZM13 12C11.3431 12 10 13.3431 10 15C10 16.6569 11.3431 18 13 18C14.6569 18 16 16.6569 16 15C16 13.3431 14.6569 12 13 12ZM27 12C25.3431 12 24 13.3431 24 15C24 16.6569 25.3431 18 27 18C28.6569 18 30 16.6569 30 15C30 13.3431 28.6569 12 27 12ZM13.0999 24C14.4999 26.38 17.0399 28 19.9999 28C22.9599 28 25.4999 26.38 26.8999 24H30.2399C28.6399 28.1 24.6599 31 19.9999 31C15.3399 31 11.3599 28.1 9.75988 24H13.0999ZM4 20C4 28.84 11.16 36 20 36C28.84 36 36 28.84 36 20C36 11.16 28.84 4 20 4C11.16 4 4 11.16 4 20Z"},null,-1),ge=[he];function _e(t,e){return i(),v("svg",ue,ge)}const me=T(de,[["render",_e]]),ve={class:"aioseo-headline-result"},pe={class:"box box--large"},ye={class:"box-title"},Ce={class:"box-icon"},fe={class:"words"},we={class:"words-title"},be=["innerHTML"],ze={class:"words-goal"},ke={class:"bar"},Se={class:"keywords"},xe={class:"box"},He={class:"box-icon"},Te={class:"score"},We={class:"number"},Ae={class:"box-title"},Me={class:"box-guideline"},$e={class:"box"},Pe={class:"box-icon"},Ee={class:"score"},Le={class:"number"},Ne={class:"box-title"},Ze={class:"box-guideline"},Re={class:"box"},Be={class:"box-icon"},Ge={class:"box-title"},Oe={class:"box-guideline"},Ye={class:"box"},Fe={class:"box-icon"},je={class:"box-title"},Ve=["innerHTML"],De={__name:"Result",props:{result:{type:Object,required:!0}},setup(t){const e="all-in-one-seo-pack",h={wordBalance:s("Word balance",e),characterCount:s("Character Count",e),sentiment:s("Sentiment",e),wordCount:s("Word Count",e),headlineType:s("Headline Type",e),goal:s("Goal: ",e)},g=t,c=x(()=>{const n=g.result,u={common:{title:s("Common Words",e),help:s("Headlines with 20-30% common words are more likely to get clicks.",e),class:n.commonWordsPercentage===0?"red":.2>n.commonWordsPercentage?"orange":"green",words:n.commonWords,percent:Math.round(n.commonWordsPercentage*100),bar:100*n.commonWordsPercentage/.3,goal:s("20-30%",e)},uncommon:{title:s("Uncommon Words",e),help:s("Your headline would be more likely to get clicks if it had more uncommon words.",e),class:n.uncommonWordsPercentage===0?"red":.1>n.uncommonWordsPercentage?"orange":"green",words:n.uncommonWords,percent:Math.round(n.uncommonWordsPercentage*100),bar:100*n.uncommonWordsPercentage/.2,goal:s("10-20%",e)},emotional:{title:s("Emotional Words",e),help:s("Emotionally triggered headlines are likely to drive more clicks.",e),class:n.emotionalWordsPercentage===0?"red":.1>n.emotionalWordsPercentage?"orange":"green",words:n.emotionWords,percent:Math.round(n.emotionalWordsPercentage*100),bar:100*n.emotionalWordsPercentage/.15,goal:s("10-15%",e)},power:{title:s("Power Words",e),help:s("Headlines with power words are more likely to get clicks.",e),class:n.powerWordsPercentage===0?"red":"green",words:n.powerWords,percent:Math.round(n.powerWordsPercentage*100),bar:100*n.powerWordsPercentage/.1,goal:s("at least one",e)}},l=Object.values(u).every(_=>_.class==="green");return{result:l?s("All good",e):s("Needs improvement",e),icon:l?P:L,class:l?"green":"orange",words:u}}),d=x(()=>{let n,u,l,_;const a=g.result.length,W=Math.round(100*a/65);switch(!0){case 19>=a:case 80<=a:n="red",l=E;break;case(20<=a&&34>=a):case(67<=a&&79>=a):n="orange",l=L;break;case(35<=a&&66>=a):n="green",l=P;break}switch(!0){case 34>=a:u=s("Too Short",e),_=s("You have space to add more keywords and power words to boost your rankings and click-through rate.",e);break;case(35<=a&&66>=a):u=s("Good",e),_=s("Headlines that are about 55 characters long will display fully in search results and tend to get more clicks.",e);break;case 67<=a:u=s("Too Long",e),_=s("At this length, it will get cut off in search results. Try reducing it to about 55 characters.",e);break}return{result:u,icon:l,percent:W,guideline:_,class:n}}),p=x(()=>{const n=g.result.wordCount,u=Math.round(100*n/9);switch(!0){case 4>=n:return{result:s("Not Enough Words",e),percent:u,class:"red",icon:E,guideline:s("Your headline doesn’t use enough words. You have more space to add keywords and power words to improve your SEO and get more engagement.",e)};case(5<=n&&9>=n):return{result:s("Good",e),percent:u,class:"green",icon:P,guideline:s("Your headline has the right amount of words. Headlines are more likely to be clicked on in search results if they have about 6 words.",e)};case(10<=n&&11>=n):return{result:s("Reduce Word Count",e),percent:u,class:"orange",icon:L,guideline:s("Headlines are more likely to be clicked on in search results if they have about 6 words.",e)};default:return{result:s("Too Many Words",e),percent:u,class:"red",icon:E,guideline:s("Your headline has too many words. Long headlines will get cut off in search results and won’t get as many clicks.",e)}}}),C=x(()=>{switch(g.result.sentiment){case"neu":return{result:s("Neutral",e),icon:ce,class:"orange",headline:s("Your headline has a neutral sentiment.",e),guideline:s("Headlines that are strongly positive or negative tend to get more engagement than neutral ones.",e)};case"pos":return{result:s("Positive",e),icon:me,class:"green",headline:s("Your headline has a positive sentiment.",e),guideline:s("Positive headlines tend to get better engagement than neutral or negative ones.",e)};default:return{result:s("Negative",e),icon:ne,class:"red",headline:s("Your headline has a negative sentiment.",e),guideline:s("Negative headlines are attention-grabbing and tend to perform better than neutral ones.",e)}}}),f=x(()=>({result:g.result.headlineTypes.join(", "),icon:J,class:"blue",guideline:S(s("Headlines that are lists and how-to get more engagement on average than other types of headlines. %1$s%2$sLearn More%3$s →",e),"<br/><br/>",'<a href="https://optinmonster.com/why-these-21-headlines-went-viral-and-how-you-can-copy-their-success/" target="_blank" className="aioseo-headline-analyzer-link"><span>',"</span></a>")}));return(n,u)=>(i(),v("div",ve,[o("div",pe,[o("div",ye,r(h.wordBalance),1),o("div",Ce,[(i(),b(H(c.value.icon),{class:m(c.value.class)},null,8,["class"]))]),o("strong",{class:m(["box-result",c.value.class])},r(c.value.result),3),o("div",fe,[(i(!0),v(N,null,Z(c.value.words,(l,_)=>(i(),v("div",{key:_},[o("div",we,[A(r(l.title)+" ",1),l.help?(i(),b(M(V),{key:0},{tooltip:k(()=>[o("div",{innerHTML:l.help},null,8,be)]),default:k(()=>[y(M(D))]),_:2},1024)):B("",!0)]),o("div",{class:m(["words-percent",l.class])},r(l.percent)+" % ",3),o("div",ze,r(h.goal)+" "+r(l.goal),1),o("div",ke,[o("div",{class:m(["bar-progress",l.class]),style:q({width:l.bar+"%"})},null,6)]),o("div",Se,[(i(!0),v(N,null,Z(l.words,(a,W)=>(i(),v("div",{key:W,class:"keywords-item"},r(a),1))),128))])]))),128))])]),o("div",xe,[o("div",He,[o("div",Te,[y(M(R),{score:d.value.percent,scoreColor:d.value.class,strokeWidth:2},null,8,["score","scoreColor"]),o("span",We,r(t.result.length),1)])]),o("div",null,[o("div",Ae,r(h.characterCount),1),o("strong",{class:m(["box-result has-icon",d.value.class])},[(i(),b(H(d.value.icon),{class:m(d.value.class)},null,8,["class"])),A(" "+r(d.value.result),1)],2),o("p",Me,r(d.value.guideline),1)])]),o("div",$e,[o("div",Pe,[o("div",Ee,[y(M(R),{score:p.value.percent,scoreColor:p.value.class,strokeWidth:2},null,8,["score","scoreColor"]),o("span",Le,r(t.result.wordCount),1)])]),o("div",null,[o("div",Ne,r(h.wordCount),1),o("strong",{class:m(["box-result has-icon",p.value.class])},[(i(),b(H(p.value.icon),{class:m(p.value.class)},null,8,["class"])),A(" "+r(p.value.result),1)],2),o("p",Ze,r(p.value.guideline),1)])]),o("div",Re,[o("div",Be,[(i(),b(H(C.value.icon),{class:m(C.value.class)},null,8,["class"]))]),o("div",null,[o("div",Ge,r(h.sentiment),1),o("strong",{class:m(["box-result",C.value.class])},r(C.value.result),3),o("p",Oe,[o("strong",null,r(C.value.headline),1),A(" "+r(C.value.guideline),1)])])]),o("div",Ye,[o("div",Fe,[(i(),b(H(f.value.icon),{class:m(f.value.class)},null,8,["class"]))]),o("div",null,[o("div",je,r(h.headlineType),1),o("strong",{class:m(["box-result",f.value.class])},r(f.value.result),3),o("p",{innerHTML:f.value.guideline,class:"box-guideline"},null,8,Ve)])])]))}},w="all-in-one-seo-pack",Ie={components:{CoreSiteScore:U},props:{score:Number,loading:Boolean},data(){return{isAnalyzing:!1,strings:{overallScore:s("Overall Score",w),veryGoodScore:S(s("A very good score is between %1$s%3$d and %4$d%2$s.",w),"<strong>","</strong>",70,100),forBestResults:S(s("For best results, you should strive for %1$s%3$d and above%2$s.",w),"<strong>","</strong>",70),weveGotWorkToDo:S(s("We've got some%1$swork to do!",w),"<br>"),needsImprovement:S(s("Needs%1$sImprovement!",w),"<br>"),veryGood:s("Very Good!",w),excellent:s("Excellent!",w)}}},computed:{description(){switch(!0){case 45>=this.score:return this.strings.weveGotWorkToDo;case 70>=this.score:return this.strings.needsImprovement;case 90>=this.score:return this.strings.veryGood;default:return this.strings.excellent}}}},qe={class:"aioseo-headline-score"},Je={class:"aioseo-headline-score-score"},Ue=["innerHTML"],Qe=["innerHTML"];function Ke(t,e,h,g,c,d){const p=z("core-site-score");return i(),v("div",qe,[o("div",Je,[y(p,{loading:c.isAnalyzing,score:h.score,description:d.description,strokeWidth:1.75},null,8,["loading","score","description"])]),o("div",{class:"aioseo-headline-score-overall",innerHTML:c.strings.overallScore},null,8,Ue),o("div",{class:"aioseo-headline-score-recommendations",innerHTML:`${c.strings.veryGoodScore} ${c.strings.forBestResults}`},null,8,Qe)])}const Xe=T(Ie,[["render",Ke]]),$="all-in-one-seo-pack",es={setup(){const{scrollTo:t}=O();return{analyzerStore:Q(),settingsStore:G(),scrollTo:t}},components:{CoreAnalyze:Y,CoreAnalyzeScore:F,CoreCard:j,CoreHeadlineResult:De,CoreHeadlineScore:Xe,SvgTrash:I},data(){return{headline:null,headlines:{},isAnalyzing:!1,analyzeTime:2,strings:{enterYourHeadline:s("Enter Your Headline",$),placeholder:s("Top 10 Ways to Increase Traffic",$),writeIrresistibleSEOHeadlines:S(s("Our Headline Analyzer tool enables you to write irresistible SEO headlines%1$sthat drive traffic, shares, and rank better in search results.",$),"<br>"),analyze:s("Analyze",$)}}},watch:{"analyzerStore.analyzeError"(t){t&&(this.isAnalyzing=!1)}},methods:{parseResult(t){return JSON.parse(t)},startAnalyzing(t){this.headline=t,this.analyzerStore.analyzing=!0,this.analyzerStore.analyzeError=!1,this.analyzerStore.runHeadlineAnalyzer({headline:this.headline,shouldStoreHeadline:!0}),this.isAnalyzing=!0,setTimeout(this.checkStatus,this.analyzeTime*1e3),this.closeAllCards()},checkStatus(){if(this.isAnalyzing=!1,this.analyzing){this.$nextTick(()=>{this.isAnalyzing=!0,2>this.analyzeTime&&(this.analyzeTime=1),this.analyzeTime=this.analyzeTime/2,setTimeout(this.checkStatus,this.analyzeTime*1e3)});return}this.headline=null,this.headlines=this.analyzerStore.getHeadlineAnalysisResults,this.toggleFirstCard(),this.$nextTick(()=>{const t=Object.keys(this.headlines);this.scrollTo("aioseo-headline-result"+this.hashCode(t[0]))})},startDeleteheadline(t){this.closeAllCards(),delete this.headlines[t],this.analyzerStore.deleteHeadline(t).then(()=>{this.headlines=this.analyzerStore.getHeadlineAnalysisResults})},closeAllCards(){Object.keys(this.headlines).forEach(e=>{this.settingsStore.closeCard("analyzeHeadline"+e)})},toggleFirstCard(){const t=Object.keys(this.headlines);this.settingsStore.toggleCard({slug:"analyzeHeadline"+t[0]})},hashCode(t){if(!t)return;let e=0,h,g;for(h=0;h<t.length;h++)g=t.charCodeAt(h),e=(e<<5)-e+g,e|=0;return e}},mounted(){this.analyzerStore.analyzeError=!1,this.headlines=this.analyzerStore.getHeadlineAnalysisResults,this.toggleFirstCard()}},ss={class:"aioseo-headline-analyzer"},os=["innerHTML"],ns={class:"headline-result-main"},ts={class:"headline-result-body"};function rs(t,e,h,g,c,d){const p=z("core-analyze"),C=z("core-card"),f=z("core-analyze-score"),n=z("svg-trash"),u=z("core-headline-score"),l=z("core-headline-result");return i(),v("div",ss,[y(C,{slug:"analyzeNewHeadline","hide-header":"","no-slide":"",toggles:!1},{default:k(()=>[y(p,{header:c.strings.enterYourHeadline,description:c.strings.writeIrresistibleSEOHeadlines,isAnalyzing:c.isAnalyzing,analyzeTime:c.analyzeTime,onStartAnalyzing:d.startAnalyzing,placeholder:c.strings.placeholder},{errors:k(()=>[g.analyzerStore.analyzer==="headline"&&g.analyzerStore.analyzeError?(i(),v("div",{key:0,class:"analyze-errors aioseo-description aioseo-error",innerHTML:g.analyzerStore.analyzeError},null,8,os)):B("",!0)]),_:1},8,["header","description","isAnalyzing","analyzeTime","onStartAnalyzing","placeholder"])]),_:1}),(i(!0),v(N,null,Z(c.headlines,(_,a)=>(i(),b(C,{key:a,id:"aioseo-headline-result"+d.hashCode(a),slug:"analyzeHeadline"+a,"save-toggle-status":!1,class:"aioseo-headline-result-wrapper"},{header:k(()=>[y(f,{score:d.parseResult(_).score},null,8,["score"]),o("span",null,"“"+r(a)+"”",1),y(n,{onClick:W=>d.startDeleteheadline(a)},null,8,["onClick"])]),default:k(()=>[o("div",ns,[y(u,{score:d.parseResult(_).score,loading:g.analyzerStore.analyzing},null,8,["score","loading"]),o("div",ts,[y(l,{result:d.parseResult(_).result},null,8,["result"])])])]),_:2},1032,["id","slug"]))),128))])}const zs=T(es,[["render",rs]]);export{zs as default};