@tanay-wispr/webflow-package 6.5.17 → 6.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/androidWaitlist.js +1 -1
- package/dist/calculator-business.js +1 -1
- package/dist/calculator.js +1 -1
- package/dist/downloads.js +1 -1
- package/dist/global.js +2 -2
- package/dist/login.js +1 -1
- package/dist/pricing.js +1 -1
- package/dist/signup.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var
|
|
1
|
+
"use strict";(()=>{var i="https://api.wisprflow.ai",h=class{static async signupUser(e){try{let t=`${i}/signup`,n=document.cookie.split(";").find(m=>m.trim().startsWith("trial_promo=")),a=n&&n.trim().split("=")[1];(a==="3mo"||a==="2mo")&&(t+=`?trial_promo=${a}`);let c=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!c.ok)throw new Error(`Signup failed with status ${c.status}`);return console.log("User signed up successfully"),await c.json()}catch(t){throw console.error("Error during signup:",t),t}}static async addRawUserEmail(e){try{let t=await fetch(`${i}/signup_raw_email`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`Adding raw user failed with status ${t.status}`);return console.log("Added raw user successfully"),await t.json()}catch(t){throw console.error("Error during raw user signup:",t),t}}static async addToWaitlist(e){try{let t=await fetch(`${i}/add_to_waitlist`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`Applying waitlist failed with status ${t.status}`)}catch(t){throw console.error("Error applying referral code:",t),t}}static async applyReferralCode(e){try{let t=await fetch(`${i}/api/v1/referral/apply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`Applying referral code failed with status ${t.status}`)}catch(t){throw console.error("Error applying referral code:",t),t}}static async associateAppSumoLicense(e){try{let t=await fetch(`${i}/app_sumo/associate_license_key`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`Associating AppSumo license failed with status ${t.status}`);console.log("Successfully associated AppSumo license")}catch(t){throw console.error("Error associating AppSumo license:",t),t}}static async checkUserStatus(e){return await(await fetch(`${i}/user_status?email=${encodeURIComponent(e)}`)).json()}static async requestPasswordReset(e,t){let s=await fetch(`${i}/email/request-reset-password-captcha`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,captcha_token:t})});if(!s.ok){let n=await s.json().catch(()=>({}));throw new Error(n.message||`Request failed with status ${s.status}`)}}static async getSubscriptionStatus(e){return await fetch(`${i}/api/v1/payment/subscription`,{method:"GET",headers:{accept:"application/json",Authorization:e}})}static async getPricingByIp(){let e=await fetch(`${i}/api/v1/payment/pricing/by-ip`,{method:"GET",headers:{accept:"application/json"}});if(!e.ok)throw new Error(`Pricing API failed with status ${e.status}`);return await e.json()}static async createCheckoutSession(e,t,s){let n=`${i}/api/v1/payment/create-checkout-session?plan=${e}&custom_redirect=true`;return s&&(n+=`¤cy=${s}`),await(await fetch(n,{method:"POST",headers:{accept:"application/json",Authorization:t}})).json()}static async sendDownloadLink(e,t){return await fetch(`${i}/api/v1/referral/download-link`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({platform:e,recipient_email:t})})}static async getAndroidWaitlistStats(e){return await fetch(`${i}/api/v1/promos/android_waitlist_rank`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`${e}`}})}static async ensureReferralCode(e){return await fetch(`${i}/api/v1/referral/`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`${e}`}})}static async submitPhoneNumber(e,t){return await fetch(`${i}/api/v1/promos/android_waitlist/phone_number`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`${t}`},body:JSON.stringify({phone_number:e})})}static async submitSocialShare(e,t,s){let n=new FormData;return n.append("screenshot",e),await fetch(`${i}/api/v1/promos/android_waitlist/verify_social_share`,{method:"POST",headers:{Authorization:`${t}`},body:n,signal:s})}};var g=h;var k={supaBaseUrl:"https://dodjkfqhwrzqjwkfnthl.supabase.co",supaBaseKey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImRvZGprZnFod3J6cWp3a2ZudGhsIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTk4ODQzMDcsImV4cCI6MjAzNTQ2MDMwN30.h6EeQ_6kqFeznH25icVUX0Szn9__kc8HoSXAsxxBWG8",redirectUri:`${window.location.origin}/downloads`};var y={usd:"$",gbp:"\xA3",eur:"\u20AC",chf:"CHF",sek:"kr",cad:"$",aud:"$",inr:"\u20B9",jpy:"\xA5",cny:"\xA5",krw:"\u20A9",mxn:"$",brl:"R$",pln:"z\u0142",rub:"\u20BD",ils:"\u20AA",try:"\u20BA",aed:"\u062F.\u0625",sgd:"$",zar:"R",nzd:"$",thb:"\u0E3F",twd:"NT$",czk:"K\u010D"};var A=1,f=50,d=12,_=f,E=document.querySelector('[data-calculator="employee-number"]'),r=document.querySelector('[data-calculator="rate"]'),w=document.querySelector('[data-calculator="typing-hours-weekly"]'),b=document.querySelector('[data-calculator="value-month"]'),S=document.querySelector('[data-calculator="flow-cost"]'),R=document.querySelector('[data-calculator="monthly-saving"]');function C(o){let e=o>=1e3?500:50;return Math.round(o/e)*e}function l(o){return o>=1e9?(o/1e9).toFixed(1)+"B":o>=1e6?(o/1e6).toFixed(1)+"M":o.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function u(o){let e=document.createElement("span"),t=getComputedStyle(o);e.style.visibility="hidden",e.style.whiteSpace="pre",e.style.font=t.font,e.textContent=o.value||o.placeholder||"",document.body.appendChild(e),o.style.width=e.offsetWidth+"px",document.body.removeChild(e)}function p(){let o=parseFloat(E?.value??"3")||3,e=parseFloat(r?.value??""),t=isNaN(e)?f:e,s=Math.ceil(o*A),n=Math.ceil(s*52*t/12),a=Math.ceil(o*d),c=Math.ceil(n-a);w&&(w.textContent=l(s)),b&&(b.textContent=l(n)),S&&(S.textContent=l(a)),R&&(R.textContent=l(c))}document.addEventListener("DOMContentLoaded",()=>{r&&(r.setAttribute("type","text"),r.setAttribute("inputmode","numeric"),r.setAttribute("pattern","\\d*"),r.setAttribute("maxlength","10"),r.value=String(f),u(r),r.addEventListener("input",()=>{r.value=r.value.replace(/\D/g,""),r.value!==""&&+r.value>99999&&(r.value=String(99999)),u(r)}),r.addEventListener("blur",()=>{r.value=r.value.replace(/\D/g,""),r.value===""?r.value=String(_):+r.value>99999&&(r.value=String(99999)),u(r),p()})),[E,r].forEach(o=>{o&&o.addEventListener("input",p)}),p(),g.getPricingByIp().then(o=>{let{currency:e,pricing:t}=o,s=y[e.toLowerCase()]||"$",{price:n,currency_factor:a}=t.FLOW_PRO_YEARLY;d=n/12/a;let c=C(50*(d/12));_=c,r&&(r.value=String(c),u(r)),document.querySelectorAll('[data-calculator="currency-symbol"]').forEach(m=>{m.textContent=s}),p(),console.log(`\u2705 Business calculator: ${e.toUpperCase()} (${s}), cost per seat: ${s}${Math.round(d)}/mo`)}).catch(o=>{console.error("\u274C Business calculator pricing API error:",o)})});})();
|
package/dist/calculator.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var
|
|
1
|
+
"use strict";(()=>{var i="https://api.wisprflow.ai",g=class{static async signupUser(e){try{let t=`${i}/signup`,s=document.cookie.split(";").find(l=>l.trim().startsWith("trial_promo=")),a=s&&s.trim().split("=")[1];(a==="3mo"||a==="2mo")&&(t+=`?trial_promo=${a}`);let c=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!c.ok)throw new Error(`Signup failed with status ${c.status}`);return console.log("User signed up successfully"),await c.json()}catch(t){throw console.error("Error during signup:",t),t}}static async addRawUserEmail(e){try{let t=await fetch(`${i}/signup_raw_email`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`Adding raw user failed with status ${t.status}`);return console.log("Added raw user successfully"),await t.json()}catch(t){throw console.error("Error during raw user signup:",t),t}}static async addToWaitlist(e){try{let t=await fetch(`${i}/add_to_waitlist`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`Applying waitlist failed with status ${t.status}`)}catch(t){throw console.error("Error applying referral code:",t),t}}static async applyReferralCode(e){try{let t=await fetch(`${i}/api/v1/referral/apply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`Applying referral code failed with status ${t.status}`)}catch(t){throw console.error("Error applying referral code:",t),t}}static async associateAppSumoLicense(e){try{let t=await fetch(`${i}/app_sumo/associate_license_key`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`Associating AppSumo license failed with status ${t.status}`);console.log("Successfully associated AppSumo license")}catch(t){throw console.error("Error associating AppSumo license:",t),t}}static async checkUserStatus(e){return await(await fetch(`${i}/user_status?email=${encodeURIComponent(e)}`)).json()}static async requestPasswordReset(e,t){let n=await fetch(`${i}/email/request-reset-password-captcha`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,captcha_token:t})});if(!n.ok){let s=await n.json().catch(()=>({}));throw new Error(s.message||`Request failed with status ${n.status}`)}}static async getSubscriptionStatus(e){return await fetch(`${i}/api/v1/payment/subscription`,{method:"GET",headers:{accept:"application/json",Authorization:e}})}static async getPricingByIp(){let e=await fetch(`${i}/api/v1/payment/pricing/by-ip`,{method:"GET",headers:{accept:"application/json"}});if(!e.ok)throw new Error(`Pricing API failed with status ${e.status}`);return await e.json()}static async createCheckoutSession(e,t,n){let s=`${i}/api/v1/payment/create-checkout-session?plan=${e}&custom_redirect=true`;return n&&(s+=`¤cy=${n}`),await(await fetch(s,{method:"POST",headers:{accept:"application/json",Authorization:t}})).json()}static async sendDownloadLink(e,t){return await fetch(`${i}/api/v1/referral/download-link`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({platform:e,recipient_email:t})})}static async getAndroidWaitlistStats(e){return await fetch(`${i}/api/v1/promos/android_waitlist_rank`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`${e}`}})}static async ensureReferralCode(e){return await fetch(`${i}/api/v1/referral/`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`${e}`}})}static async submitPhoneNumber(e,t){return await fetch(`${i}/api/v1/promos/android_waitlist/phone_number`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`${t}`},body:JSON.stringify({phone_number:e})})}static async submitSocialShare(e,t,n){let s=new FormData;return s.append("screenshot",e),await fetch(`${i}/api/v1/promos/android_waitlist/verify_social_share`,{method:"POST",headers:{Authorization:`${t}`},body:s,signal:n})}};var _=g;var M={supaBaseUrl:"https://dodjkfqhwrzqjwkfnthl.supabase.co",supaBaseKey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImRvZGprZnFod3J6cWp3a2ZudGhsIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTk4ODQzMDcsImV4cCI6MjAzNTQ2MDMwN30.h6EeQ_6kqFeznH25icVUX0Szn9__kc8HoSXAsxxBWG8",redirectUri:`${window.location.origin}/downloads`};var S={usd:"$",gbp:"\xA3",eur:"\u20AC",chf:"CHF",sek:"kr",cad:"$",aud:"$",inr:"\u20B9",jpy:"\xA5",cny:"\xA5",krw:"\u20A9",mxn:"$",brl:"R$",pln:"z\u0142",rub:"\u20BD",ils:"\u20AA",try:"\u20BA",aed:"\u062F.\u0625",sgd:"$",zar:"R",nzd:"$",thb:"\u0E3F",twd:"NT$",czk:"K\u010D"};var k=40,$=60,y=50,O=22,x=.5,p=12,w=y,P=document.querySelector('[data-calculator="hours"]'),r=document.querySelector('[data-calculator="rate"]'),b=document.querySelector('[data-calculator="monthly-saving"]'),R=document.querySelector('[data-calculator="typing-hours"]'),E=document.querySelector('[data-calculator="hour-saved"]'),C=document.querySelector('[data-calculator="time-value"]'),A=document.querySelector('[data-calculator="words"]'),v=document.querySelector('[data-calculator="subscription-cost"]'),h=document.querySelector(".calculator_result-money"),f=h?parseFloat(window.getComputedStyle(h).fontSize):null;function N(o){let e=o>=1e3?500:50;return Math.round(o/e)*e}function d(o){return o>=1e9?(o/1e9).toFixed(1)+"B":o>=1e6?(o/1e6).toFixed(1)+"M":o.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function m(o){let e=document.createElement("span"),t=getComputedStyle(o);e.style.visibility="hidden",e.style.whiteSpace="pre",e.style.font=t.font,e.textContent=o.value||o.placeholder||"",document.body.appendChild(e),o.style.width=e.offsetWidth+"px",document.body.removeChild(e)}function u(){let o=parseFloat(P?.value??"0")||0,e=parseFloat(r?.value??""),t=isNaN(e)?y:e,n=Math.round(o*$*k);A&&(A.textContent=d(n));let s=o*O;R&&(R.textContent=String(Math.round(s)));let a=s*x;E&&(E.textContent=String(Math.round(a)));let c=a*t;C&&(C.textContent=d(Math.round(c)));let l=Math.round(c-p);if(b&&(b.textContent=d(l)),h&&f!==null){let T=d(l).replace(/\D/g,"").length;h.style.fontSize=(T>=8?f*.8:f)+"px"}}document.addEventListener("DOMContentLoaded",()=>{r&&(r.setAttribute("type","text"),r.setAttribute("inputmode","numeric"),r.setAttribute("pattern","\\d*"),r.setAttribute("maxlength","10"),r.value=String(y),m(r),r.addEventListener("input",()=>{r.value=r.value.replace(/\D/g,""),r.value!==""&&+r.value>9999&&(r.value=String(9999)),m(r)}),r.addEventListener("blur",()=>{r.value=r.value.replace(/\D/g,""),r.value===""?r.value=String(w):+r.value>9999&&(r.value=String(9999)),m(r),u()})),P?.addEventListener("input",u),r?.addEventListener("input",u),u(),_.getPricingByIp().then(o=>{let{currency:e,pricing:t}=o,n=S[e.toLowerCase()]||"$",{price:s,currency_factor:a}=t.FLOW_PRO_YEARLY;p=s/12/a;let c=N(50*(p/12));w=c,r&&(r.value=String(c),m(r)),document.querySelectorAll('[data-calculator="currency-symbol"]').forEach(l=>{l.textContent=n}),v&&(v.textContent=`${n}${d(Math.round(p))}`),u(),console.log(`\u2705 Calculator: ${e.toUpperCase()} (${n}), subscription cost: ${n}${Math.round(p)}/mo`)}).catch(o=>{console.error("\u274C Calculator pricing API error:",o)})});})();
|