1(this["webpackJsonpword-count-tool"]=this["webpackJsonpword-count-tool"]||[]).push([[0],{19:function(e,t,n){},23:function(e,t,n){},30:function(e,t,n){"use strict";n.r(t);var a=n(1),s=n.n(a),i=n(10),r=n.n(i),o=(n(19),n(12)),c=n.n(o),l=n(13),u=n(14),d=n(3),h=n(4),p=n(9),j=n(6),b=n(5),m=(n(21),n(22),n(23),n(2)),y=n.n(m),f=n(7),g=n.n(f),v=n(0),w=function(e){Object(j.a)(n,e);var t=Object(b.a)(n);function n(e){return Object(d.a)(this,n),t.call(this,e)}return Object(h.a)(n,[{key:"render",value:function(){var e=this.props,t=e.keyword,n=e.onChange,a=e.onClick,s=e.isLoading;return r.a.createPortal(Object(v.jsxs)("div",{children:[Object(v.jsx)("p",{className:"h07_text",children:"Type a keyword below and get real questions that people are asking about it."}),Object(v.jsx)("div",{className:"h07_form_block w-form form-block",children:Object(v.jsxs)("form",{name:"keyword-form",className:"keyword-form form",children:[Object(v.jsx)("input",{type:"text",className:"input w-input",name:"keyword","data-name":"Keyword",placeholder:"How to water a fiddle leaf fig",id:"keyword",value:t,onChange:n}),Object(v.jsx)("input",{type:"submit",value:s?"Searching...":"Get Questions","data-wait":"Please wait...",className:"form-button w-button",onClick:a}),Object(v.jsx)("div",{className:"hero-form-glow glow-1 ".concat(s?"active":"")}),Object(v.jsx)("div",{className:"hero-form-glow glow-2 ".concat(s?"active":"")}),Object(v.jsx)("div",{className:"hero-form-glow glow-3 ".concat(s?"active":"")}),Object(v.jsx)("div",{className:"hero-form-glow glow-4 ".concat(s?"active":"")})]})})]}),document.getElementById("keyword-input"))}}]),n}(s.a.Component),x=function(e){Object(j.a)(n,e);var t=Object(b.a)(n);function n(e){return Object(d.a)(this,n),t.call(this,e)}return Object(h.a)(n,[{key:"render",value:function(){var e=this.props.onClick,t=["car insurance","buy a house","first sales hire"];return r.a.createPortal(Object(v.jsxs)("div",{children:["Ex: ",y.a.map(t,(function(n,a){return Object(v.jsxs)("span",{children:[Object(v.jsx)("a",{href:"#",onClick:function(t){e(n)},children:n}),a<t.length-1?", ":""]},a)}))]}),document.getElementById("keyword-examples"))}}]),n}(s.a.Component),O=function(e){Object(j.a)(n,e);var t=Object(b.a)(n);function n(e){return Object(d.a)(this,n),t.call(this,e)}return Object(h.a)(n,[{key:"render",value:function(){var e=this.props,t=e.currentUser,n=e.onLogout,a=e.onExportCSV,i=e.showExportCSV;return r.a.createPortal(Object(v.jsx)(s.a.Fragment,{children:!y.a.isEmpty(t)&&Object(v.jsxs)("div",{style:{position:"absolute",top:"80px",zIndex:"2",backgroundColor:"white",padding:"10px 15px",borderRadius:"0 0 6px 6px",right:"230px",color:"#0a1f44"},children:["Logged in as: ",Object(v.jsx)("b",{children:t.email}),", ",Object(v.jsx)("a",{href:"#",onClick:n,children:"Logout"}),Object(v.jsxs)("div",{style:{fontSize:"14px",marginTop:"10px"},children:["You have access to: ",Object(v.jsx)("br",{}),Object(v.jsx)("i",{className:"fas fa-check"})," unlimited question searches ",Object(v.jsx)("br",{}),Object(v.jsx)("i",{className:"fas fa-check"})," CSV export ",i&&Object(v.jsx)("button",{onClick:a,children:"Export to CSV"}),Object(v.jsx)("br",{})]})]})}),document.getElementById("mininav"))}}]),n}(s.a.Component),q=(n(27),n(8)),k=n.n(q),I=function(e){Object(j.a)(n,e);var t=Object(b.a)(n);function n(e){return Object(d.a)(this,n),t.call(this,e)}return Object(h.a)(n,[{key:"ellipsisLoader",value:function(){}},{key:"render",value:function(){var e=this.props,t=e.type,n=e.className,a=e.style,s=e.height,i=e.width,r=Object(v.jsxs)("div",{className:"logo_spinner_logo ".concat(n||""),children:[Object(v.jsx)("div",{className:"logo_spinner_outline"}),Object(v.jsx)("div",{className:"logo_spinner_bg"})]}),o=Object(v.jsxs)("div",{style:Object.assign({},a),className:"lds-spinner ".concat(n||""),children:[Object(v.jsx)("div",{}),Object(v.jsx)("div",{}),Object(v.jsx)("div",{}),Object(v.jsx)("div",{}),Object(v.jsx)("div",{}),Object(v.jsx)("div",{}),Object(v.jsx)("div",{}),Object(v.jsx)("div",{}),Object(v.jsx)("div",{}),Object(v.jsx)("div",{}),Object(v.jsx)("div",{}),Object(v.jsx)("div",{})]}),c={};s&&(c.height=s+"px"),i&&(c.width=i+"px"),a&&(c=Object.assign(c,a));var l=Object(v.jsx)("div",{className:"line-loader ".concat(n||""),style:c}
1);return"spinner"===t?o:"line"===t?l:"ellipsis"===t?Object(v.jsx)(S,{className:n,style:a}):r}}]),n}(s.a.Component),S=function(e){Object(j.a)(n,e);var t=Object(b.a)(n);function n(e){var a;return Object(d.a)(this,n),(a=t.call(this,e)).state={incrementor:0},a}return Object(h.a)(n,[{key:"componentDidMount",value:function(){var e=this;this.animationInterval=window.setInterval((function(){e.setState({incrementor:e.state.incrementor+1})}),600)}},{key:"componentWillUnmount",value:function(){window.clearInterval(this.animationInterval)}},{key:"render",value:function(){var e=this.state.incrementor,t=this.props,n=t.className,a=t.style;return Object(v.jsx)("span",{style:Object.assign({},a),className:"".concat(n||""),children:".".repeat(e%4)})}}]),n}(s.a.Component),C=I,N=function(e){Object(j.a)(n,e);var t=Object(b.a)(n);function n(e){var a;return Object(d.a)(this,n),(a=t.call(this,e)).state={linesShown:[e.lines[0]]},a.animationIntervalSpeed=e.animationIntervalSpeed||3e3,a}return Object(h.a)(n,[{key:"componentDidMount",value:function(){var e=this;this.animationInterval=window.setInterval((function(){var t=e.state.linesShown;if(t.length<e.props.lines.length){var n=y.a.concat(t,[e.props.lines[t.length]]);e.setState({linesShown:n})}else window.clearInterval(e.animationInterval)}),this.animationIntervalSpeed)}},{key:"componentWillUnmount",value:function(){window.clearInterval(this.animationInterval)}},{key:"render",value:function(){var e=this.state.linesShown;return Object(v.jsx)("div",{className:"text-loader",children:y.a.map(e,(function(t,n){var a=n===e.length-1;return Object(v.jsxs)("div",{className:"fadeInDown mb-3 ".concat(a?"text-primary-9":"text-primary-5"),children:[t,a&&Object(v.jsx)(C,{type:"ellipsis"})]},n)}))})}}]),n}(s.a.Component),W={success:{id:47512,keyword:"car insurance",status:"success",response:{questions:{query:"car insurance",children:[{query:"Who has the cheapest car insurance?",children:[{query:"Who is cheaper than Geico?",children:[{query:"What car insurance is the cheapest for full coverage?",children:[]},{query:"Who has the cheapest car insurance for seniors?",children:[]},{query:"Why is Geico so cheap?",children:[]}]},{query:"What is a fair price for car insurance?",children:[{query:"How much is insurance monthly?",children:[]},{query:"How much is a car payment per month?",children:[]},{query:"How much is car insurance per year?",children:[]},{query:"Should I pay my car insurance in full or monthly?",children:[]},{query:"What is the average cost of car maintenance monthly?",children:[]},{query:"How much is insurance for a new car?",children:[]}]}]},{query:"What are the worst insurance companies?",children:[{query:"Who is the number 1 insurance company?",children:[{query:"Which insurance company is best at paying claims?",children:[]},{query:"Why is progressive so cheap?",children:[]},{query:"Is Progressive better than Geico?",children:[]}]},{query:"Who are the top 3 insurance companies?",children:[{query:"Who is the biggest car insurance company?",children:[]},{query:"Who owns the insurance companies?",children:[]},{query:"Who has the best classic car insurance?",children:[]}]},{query:"Do I need insurance the day I buy a car?",children:[{query:"Can I drive a car home without insurance?",children:[]},{query:"Can I test drive a car without insurance?",children:[]},{query:"When should you purchase car insurance?",children:[]},{query:"Can I drive a new car home on my old insurance?",children:[]},{query:"Do car dealerships verify insurance?",children:[]},{query:"How does insurance work when buying a used car?",children:[]}]}]},{query:"Which car insurance is best in India?",children:[{query:"Who is best for car insurance?",children:[{query:"Is HDFC Ergo good for car insurance?",children:[]}]},{query:"What are the top 5 car insurance companies?",children:[]},{query:"Which is the best insurance policy for car?",children:[{query:"How do I get insurance on my car?",children:[]},{query:"How long do you have to get insurance on a new car?",children:[]},{query:"What is first party insurance coverage?",children:[]},{query:"Can I get 3 months car insurance?",children:[]},{query:"Can you insurance a car over 15 years old?",children:[]},{query:"How can I check my car insurance policy status?",children:[]}]}]},{query:"How do I compare car insurance?",children:[{query:"How can I lower my car insurance rates?",children:[{query:"How do I find the best insurance?",children:[]},{query:"How can I get a car insurance quote without personal information?",children:[]}]},{query:"What are the 10 best insurance companies?",children:[{query:"Is Mercury Insurance better than Geico?",children:[]},{query:"Why is Allstate so bad?",children:[]}]},{query:"What is the best car insurance quote site?",children:[{query:"How accurate are car insurance quotes?",children:[]},{query:"Does credit score affect car insurance?",children:[]},{query:"Why is my car insurance quote so high?",children:[]},{query:"Is Gabi com legit?",children:[]},{query:"Should I get comprehensive insurance?",children:[]},{query:"Is Ratekick legit?",children:[]}]}]}]}},location:{country_code:"US",id:"585069bfee19ad271e9bc673"},public_uid:"0d8a9e41",created_at:"2021-06-22T22:55:26.483Z",updated_at:"2021-06-22T22:56:00.771Z"}},A=function(e){Object(j.a)(n,e);var t=Object(b.a)(n);function n(e){var a;return Object(d.a)(this,n),(a=t.call(this,e)).state=Object(u.a)({keyword:"",submittedKeyword:"",taskId:null,response:null,error:"",isLoading:!1,currentUser:null,showSignupWall:!1,showNoPAABox:!1},"currentUser",null),a.handleCalculate=a.handleCalculate.bind(Object(p.a)(a)),a.pollUntilQuestionsReturned=a.pollUntilQuestionsReturned.bind(Object(p.a)(a)),a.animateQuestions=a.animateQuestions.bind(Object(p.a)(a)),a.signIn=a.signIn.bind(Object(p.a)(a)),a.signUp=a.signUp.bind(Object(p.a)(a)),a.exportToCSV=a.exportToCSV.bind(Object(p.a)(a)),a.useTestData=!1,a.rootUrl="https://app.usetopic.com",a}
1return Object(h.a)(n,[{key:"componentDidMount",value:function(){var e=this;this.useTestData&&W&&y.a.isObject(W)&&this.setState({response:W,isLoading:!1,error:"",keyword:"test",submittedKeyword:"test"}),k.a.on("init",(function(t){e.setState({currentUser:t,showSignupWall:!1})})),k.a.on("login",(function(t){e.setState({currentUser:t,showSignupWall:!1}),k.a.refresh().then((function(e){console.log("JWT",e),-1!==window.location.href.indexOf("people-also-ask.netlify.app")&&(window.location.href="https://www.usetopic.com/people-also-ask#access_token=".concat(e))}))})),k.a.on("logout",(function(){e.setState({showSignupWall:!0,currentUser:null})})),k.a.on("close",(function(){window.location.reload()})),k.a.init({APIUrl:"https://people-also-ask.netlify.app/.netlify/identity"})}},{key:"componentDidUpdate",value:function(){g()(".paa-title").length>0&&0===g()(".paa-title.triggered").length&&this.animateQuestions()}},{key:"componentWillUnmount",value:function(){k.a.off("init"),k.a.off("login"),k.a.off("logout")}},{key:"animateQuestions",value:function(){g()(".paa-title").each((function(e){g()(this).addClass("triggered delay-1"+e)})),g()(".paa-col").each((function(e){var t=e+1;g()(this).find(".paa-box").each((function(e){g()(this).addClass("delay-"+t+"0"),g()(this).find(".paa-subsubtitle").each((function(e){g()(this).addClass("delay-"+t+(e+1))}))}))})),window.setTimeout((function(){g()(".paa-title").addClass("active")}),100),window.setTimeout((function(){g()(".paa-box").addClass("active"),g()(".paa-subsubtitle").addClass("active")}),1e3)}},{key:"handleCalculate",value:function(e){var t=this,n=this.state,a=n.keyword,s=n.isLoading;function i(){return(i=Object(l.a)(c.a.mark((function e(){var t,n,a,s=arguments;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:"",n=s.length>1&&void 0!==s[1]?s[1]:{},e.next=4,fetch(t,{method:"POST",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});case 4:return a=e.sent,e.abrupt("return",a.json());case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}null!==n.currentUser?(y.a.isString(e)?(a=e,t.setState({keyword:a})):e.preventDefault(),s?alert("Please wait while we fetch the questions for your keyword. This may take a minute."):0!==a.trim().length?(this.setState({isLoading:!0,showNoPAABox:!1,submittedKeyword:a}),this.useTestData?(t.setState({taskId:W.success.id,error:"",submittedKeyword:W.success.keyword}),t.pollUntilQuestionsReturned(W.success.id,W.success.keyword)):function(){return i.apply(this,arguments)}("".concat(t.rootUrl,"/api/questions"),{keyword:a,ip:"".concat(y.a.random(1e10))}).then((function(e){if(console.log(e),e.success){var n=e.success;t.setState({taskId:e.success,error:"",submittedKeyword:a}),t.pollUntilQuestionsReturned(n,a)}else e.error?t.setState({error:e.error,isLoading:!1}):t.setState({error:"Something went wrong getting the recommendation. Please contact [email protected]",isLoading:!1})}))):alert("Please enter a valid keyword.")):this.setState({showSignupWall:!0})}},{key:"signIn",value:function(){k.a.open("login")}},{key:"signUp",value:function(){k.a.open("signup")}},{key:"pollUntilQuestionsReturned",value:function(){var e=this,t=this.state,n=t.taskId;t.submittedKeyword;window.questionInterval&&window.clearInterval(window.questionInterval),this.useTestData?e.setState({response:W.success.response,isLoading:!1}):window.questionInterval=window.setInterval((function(){fetch("".concat(e.rootUrl,"/api/questions/").concat(n)).then((function(e){return e.json()})).then((function(t){if(console.log(t),t.success){var n=t.success.status;if("pending"===n);else if("success"===n){var a=t.success.response;if(y.a.isObject(a)&&a.error&&/Daily limit exceeded/.test(a.error))return void e.setState({error:"Daily limit exceeded",showNoPAABox:!1,isLoading:!1});y.a.isObject(a.questions)?e.setState({response:a,showNoPAABox:!1,isLoading:!1}):y.a.isString(a.questions)?e.setState({showNoPAABox:!0,isLoading:!1}):e.setState({error:"Something went wrong getting the questions. Please email [email protected]",showNoPAABox:!1,isLoading:!1}),window.clearInterval(window.questionInterval)}}else e.setState({error:"Something went wrong getting the questions. Please email [email protected]",isLoading:!1}),window.clearInterval(window.questionInterval)}))}),5e3)}},{key:"exportToCSV",value:function(){var e=this.state,t=e.submittedKeyword,n=e.response,a="questions for ".concat(t,".csv");if(n&&n.questions){var s=[];!function e(t,n){if(t.query&&(y.a.isEmpty(t.children)||0===n||s.push([" "]),null!==n&&s.push([t.query])),y.a.isEmpty(t.children))return!0;y.a.each(t.children,(function(t,n){e(t,n)}))}(n.questions,null);var i=s.map((function(e){return e.join(",")})).join("\n"),r="data:text/csv;charset=utf-8,"+encodeURIComponent(i),o=document.createElement("a");o.setAttribute("href",r),o.setAttribute("download",a),document.body.appendChild(o),o.click()}}},{key:"render",value:function(){var e=this,t=this,n=this.state,a=n.keyword,i=n.isLoading,r=n.error,o=n.response,c=n.submittedKeyword,l=n.currentUser,u=n.showSignupWall,d=n.showNoPAABox,h=o&&o.questions,p=!i&&!y.a.isEmpty(o)&&o.questions;return console.log(h),Object(v.jsxs)("div",{className:"App",children:[!u&&Object(v.jsxs)(s.a.Fragment,{children:[Object(v.jsx)(O,{currentUser:l,onLogout:function(){k.a.logout()},onExportCSV:this.exportToCSV,showExportCSV:!(!o||!o.questions)}),Object(v.jsx)(w,{keyword:a,onClick:this.handleCalculate,onChange:function(e){t.setState({keyword:e.target.value})},isLoading:i}),Object(v.jsx)(x,{onClick:function(t){e.handleCalculate(t)}}),r&&Object(v.jsx)("div",{className:"error",style:{color:"red",textAlign:"center"},children:r}),Object(v.jsx)("div",{className:"downtime-alert",children:Object(v.jsxs)("div",{className:"downtime-alert-text",children:["We are disabling this tool for a period extended maintenance. For a free alternative, check out ",Object(v.jsx)("a",{href:"https://searchresponse.io/people-also-ask",target:"_blank",children:"SearchResponse's People Also Ask tool"}),"."]})})]}),u&&Object(v.jsxs)("div",{style:{textAlign:"center",paddingBottom:"200px"},children:[Object(v.jsxs)("div",{children:["Almost there! Create a free account to get access to:",Object(v.jsxs)("div",{style:{marginTop:"10px"},children:[Object(v.jsx)("i",{className:"fas fa-check"})," unlimited question searches"]}),Object(v.jsxs)("div",{children:[Object(v.jsx)("i",{className:"fas fa-check"})," export questions to CSV"]}),Object(v.jsxs)("div",{children:[Object(v.jsx)("i",{className:"fas fa-check"})," additional free tools"]})]}),Object(v.jsxs)("button",{onClick:this.signUp,className:"pushable",style:{marginTop:"30px",marginBottom:"10px"},children:[Object(v.jsx)("span",{className:"pushable-shadow"}),Object(v.jsx)("span",{className:"pushable-edge"}),Object(v.jsx)("span",{className:"pushable-front",children:"Create Free Account"})]}),Object(v.jsx)("br",{}),"or ",Object(v.jsx)("a",{href:"#",onClick:this.signIn,children:"log in"})]}),i&&Object(v.jsx)(N,{animationIntervalSpeed:7e3,lines:["Question extraction may take up to 1 minute","Queuing question extraction job",'Searching Google for "'.concat(c,'"'),"Extracting questions from People Also Ask box","Searching for related questions","Extracting related questions","Identifying semantic clusters","Clustering questions into semantically related groups","Identifying largest cluster
1s","Filtering out irrelevant questions","Optimizing data structure","Formatting data"]}),d&&Object(v.jsxs)("div",{style:{textAlign:"center",paddingTop:"70px",paddingBottom:"180px"},children:[Object(v.jsx)("h4",{style:{color:"white"},children:'We didn\'t find a "People Also Ask" box for this keyword.'}),Object(v.jsx)("p",{style:{color:"#a8bde2"},children:"Try searching for a different keyword. 88.9% of searches include this feature, so keep trying!"})]}),p&&Object(v.jsxs)(s.a.Fragment,{children:[Object(v.jsxs)("h2",{style:{color:"white",textAlign:"center",marginTop:"60px"},children:["Top Questions Asked About ",c]}),Object(v.jsx)("div",{className:"row paa-output-results",children:y.a.map(h.children,(function(e,t){return Object(v.jsxs)("div",{className:"col-sm paa-col",children:[Object(v.jsx)("div",{className:"paa-title",children:e.query}),Object(v.jsx)("div",{children:y.a.map(e.children,(function(e,n){return Object(v.jsxs)("div",{className:"paa-box",children:[Object(v.jsx)("div",{className:"paa-subtitle",children:e.query}),y.a.map(e.children,(function(e,a){return Object(v.jsx)("div",{className:"paa-subsubtitle",children:e.query},"".concat(t).concat(n).concat(a))}))]},"".concat(t).concat(n))}))})]},t)}))})]})]})}}]),n}(s.a.Component),U=function(e){e&&e instanceof Function&&n.e(3).then(n.bind(null,31)).then((function(t){var n=t.getCLS,a=t.getFID,s=t.getFCP,i=t.getLCP,r=t.getTTFB;n(e),a(e),s(e),i(e),r(e)}))};r.a.render(Object(v.jsx)(s.a.StrictMode,{children:Object(v.jsx)(A,{})}),document.getElementById("root")),U()}},[[30,1,2]]]); 2//# sourceMappingURL=main.7d82de8a.chunk.js.map
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.