@tanay-wispr/webflow-package 4.8.3 → 4.8.4

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.
Files changed (2) hide show
  1. package/dist/global.js +1 -1
  2. package/package.json +1 -1
package/dist/global.js CHANGED
@@ -1 +1 @@
1
- "use strict";(()=>{document.addEventListener("DOMContentLoaded",async()=>{let f=async()=>{try{let t=await navigator.userAgentData.getHighEntropyValues(["architecture","platform"]);return t.platform==="macOS"?t.architecture==="arm"?"mac_m1":"mac_intel":t.platform}catch{let{userAgent:t}=navigator;return t.includes("Macintosh")?"mac_intel":t.includes("Windows")?"Windows":t.includes("Linux")?"Linux":/iPhone|iPad|iPod/.test(t)?"iOS":/Android/.test(t)?"Android":"Unknown"}},p=(t,r,c=30)=>{let e="";if(c){let u=new Date;u.setTime(u.getTime()+c*24*60*60*1e3),e="; expires="+u.toUTCString()}let{hostname:n}=window.location,i=n.split("."),m=i.length>1?"."+i[i.length-2]+"."+i[i.length-1]:n;document.cookie=t+"="+encodeURIComponent(r)+e+"; path=/; domain="+m+"; SameSite=Lax"},o=await f();console.log("Platform: "+o),window.userPlatform=o;function g(){return new Promise(t=>{let r=0,c=50;function e(){if(r>=c){console.warn("PostHog not fully ready after max attempts, proceeding with limited functionality"),t(!1);return}if(r++,typeof posthog<"u"&&typeof posthog.getFeatureFlag=="function"&&posthog.get_distinct_id&&typeof posthog.get_distinct_id=="function")try{setTimeout(()=>t(!0),50)}catch(n){console.error("Error getting distinct ID:",n),setTimeout(e,100)}else setTimeout(e,100)}e()})}await g();let d="download-vs-getstarted",a=(posthog.get_property("$override_feature_flags")||{})[d]||posthog.getFeatureFlag(d);window.useGetStarted=a==="get-started";let w=window.useGetStarted?"get-started":"control";p("variant",w,30),posthog.capture("$feature_flag_called",{$feature_flag:d,$feature_flag_response:a}),console.log("Get Started exp:",window.useGetStarted),window.useGetStarted&&["app-download","mac-download","windows-download","download-btn"].forEach(r=>{document.querySelectorAll(`[${r}]`).forEach(e=>{e.removeAttribute(r),e.hasAttribute("href")&&!e.href.includes("/get-started")&&(e.href="/get-started"),e.onclick=()=>{let n=e.getAttribute("cta_location")||"page";return posthog.capture("download_page_redirect",{source:n,device_type:o}),!0}})});let s={mac_m1:"https://dl.wisprflow.ai/mac-apple/latest",mac_intel:"https://dl.wisprflow.ai/mac-intel/latest",Windows:"https://wispr-packages.s3.us-west-2.amazonaws.com/wispr-flow/win32/x64/Wispr+Flow+Setup.exe"},l={mac_m1:"/congratulations-mac",mac_intel:"/congratulations-mac",Windows:"/congratulations-windows"};document.querySelectorAll("[nav-link]").forEach(function(t){t.onclick=()=>(posthog.capture("nav_click",{nav_item:t.getAttribute("nav-link")}),!0)}),document.querySelectorAll("[cta]").forEach(function(t){t.onclick=()=>(posthog.capture("cta_click",{title:t.innerText,cta_location:t.getAttribute("cta_location"),cta_type:t.getAttribute("cta_type"),device_type:o}),!0)}),document.querySelectorAll("[download-btn]").forEach(function(t){t.onclick=()=>{let r=t.getAttribute("cta_location")||"page";return posthog.capture("app_download",{device_type:o,source:r,"$feature/download-vs-getstarted":a}),!0}}),document.querySelectorAll("[web-demo-open]").forEach(function(t){t.onclick=()=>(posthog.capture("web_demo_open",{title:t.innerText,device_type:window.userPlatform,source:t.getAttribute("cta_location")}),!0)}),document.querySelectorAll("[web-demo-close]").forEach(function(t){t.onclick=()=>(posthog.capture("web_demo_close",{device_type:window.userPlatform}),!0)}),document.querySelectorAll("[windows-download]").forEach(function(t){let r=t.getAttribute("cta_location")||"page";window.useGetStarted?(t.href="/get-started",t.onclick=()=>(posthog.capture("download_page_redirect",{source:r,device_type:o}),!0)):(t.href=s.Windows,o==="Windows"&&(t.onclick=()=>(setTimeout(()=>{window.location.href=l.Windows},5e3),!0)))}),document.querySelectorAll("[mac-download]").forEach(function(t){let r=t.getAttribute("cta_location")||"page";window.useGetStarted?(t.href="/get-started",t.onclick=()=>(posthog.capture("download_page_redirect",{source:r,device_type:o}),!0)):o==="mac_m1"||o==="mac_intel"?(t.href=s[o],t.onclick=()=>(setTimeout(()=>{window.location.href=l[o]},5e3),!0)):t.href="/get-started"}),document.querySelectorAll("[app-download]").forEach(function(t){let r=t.querySelectorAll("div"),c=t.id,e=c==="nav-download"?"nav":c==="footer-download"?"footer":t.getAttribute("cta_location")||"pricing";window.useGetStarted?(t.href="/get-started",t.onclick=()=>(posthog.capture("download_page_redirect",{source:e,device_type:o}),!0)):o==="mac_m1"||o==="mac_intel"?((e==="nav"||e==="footer")&&r.forEach(function(n){n.innerText="Download for free"}),t.href=s[o],t.onclick=()=>(posthog.capture("app_download",{device_type:o,source:e,"$feature/download-vs-getstarted":a}),setTimeout(()=>{window.location.href=l[o]},5e3),!0)):o==="Windows"?((e==="nav"||e==="footer")&&r.forEach(function(n){n.innerText="Download for free"}),t.href=s.Windows,t.onclick=()=>(posthog.capture("app_download",{device_type:o,source:e,"$feature/download-vs-getstarted":a}),setTimeout(()=>{window.location.href=l.Windows},5e3),!0)):(t.href="/get-started",t.onclick=()=>(posthog.capture("download_page_redirect",{source:e,device_type:o}),!0))})});})();
1
+ "use strict";(()=>{document.addEventListener("DOMContentLoaded",async()=>{let p=async()=>{try{let t=await navigator.userAgentData.getHighEntropyValues(["architecture","platform"]);return t.platform==="macOS"?t.architecture==="arm"?"mac_m1":"mac_intel":t.platform}catch{let{userAgent:t}=navigator;return t.includes("Macintosh")?"mac_intel":t.includes("Windows")?"Windows":t.includes("Linux")?"Linux":/iPhone|iPad|iPod/.test(t)?"iOS":/Android/.test(t)?"Android":"Unknown"}},g=(t,r,n=30)=>{let e="";if(n){let d=new Date;d.setTime(d.getTime()+n*24*60*60*1e3),e="; expires="+d.toUTCString()}let{hostname:c}=window.location,i=c.split("."),_=i.length>1?"."+i[i.length-2]+"."+i[i.length-1]:c;document.cookie=t+"="+encodeURIComponent(r)+e+"; path=/; domain="+_+"; SameSite=Lax"},w=()=>{let r=document.cookie.split(";").find(n=>n.trim().startsWith("nextplay="));return r&&r.trim().split("=")[1]==="true"},o=await p();console.log("Platform: "+o),window.userPlatform=o;let f=w();console.log("Next Play User:",f);function m(){return new Promise(t=>{let r=0,n=50;function e(){if(r>=n){console.warn("PostHog not fully ready after max attempts, proceeding with limited functionality"),t(!1);return}if(r++,typeof posthog<"u"&&typeof posthog.getFeatureFlag=="function"&&posthog.get_distinct_id&&typeof posthog.get_distinct_id=="function")try{setTimeout(()=>t(!0),50)}catch(c){console.error("Error getting distinct ID:",c),setTimeout(e,100)}else setTimeout(e,100)}e()})}await m();let u="download-vs-getstarted",a=(posthog.get_property("$override_feature_flags")||{})[u]||posthog.getFeatureFlag(u);window.useGetStarted=f?!0:a==="get-started";let h=window.useGetStarted?"get-started":"control";g("variant",h,30),posthog.capture("$feature_flag_called",{$feature_flag:u,$feature_flag_response:a}),console.log("Get Started exp:",window.useGetStarted),window.useGetStarted&&["app-download","mac-download","windows-download","download-btn"].forEach(r=>{document.querySelectorAll(`[${r}]`).forEach(e=>{e.removeAttribute(r),e.hasAttribute("href")&&!e.href.includes("/get-started")&&(e.href="/get-started"),e.onclick=()=>{let c=e.getAttribute("cta_location")||"page";return posthog.capture("download_page_redirect",{source:c,device_type:o}),!0}})});let s={mac_m1:"https://dl.wisprflow.ai/mac-apple/latest",mac_intel:"https://dl.wisprflow.ai/mac-intel/latest",Windows:"https://wispr-packages.s3.us-west-2.amazonaws.com/wispr-flow/win32/x64/Wispr+Flow+Setup.exe"},l={mac_m1:"/congratulations-mac",mac_intel:"/congratulations-mac",Windows:"/congratulations-windows"};document.querySelectorAll("[nav-link]").forEach(function(t){t.onclick=()=>(posthog.capture("nav_click",{nav_item:t.getAttribute("nav-link")}),!0)}),document.querySelectorAll("[cta]").forEach(function(t){t.onclick=()=>(posthog.capture("cta_click",{title:t.innerText,cta_location:t.getAttribute("cta_location"),cta_type:t.getAttribute("cta_type"),device_type:o}),!0)}),document.querySelectorAll("[download-btn]").forEach(function(t){t.onclick=()=>{let r=t.getAttribute("cta_location")||"page";return posthog.capture("app_download",{device_type:o,source:r,"$feature/download-vs-getstarted":a}),!0}}),document.querySelectorAll("[web-demo-open]").forEach(function(t){t.onclick=()=>(posthog.capture("web_demo_open",{title:t.innerText,device_type:window.userPlatform,source:t.getAttribute("cta_location")}),!0)}),document.querySelectorAll("[web-demo-close]").forEach(function(t){t.onclick=()=>(posthog.capture("web_demo_close",{device_type:window.userPlatform}),!0)}),document.querySelectorAll("[windows-download]").forEach(function(t){let r=t.getAttribute("cta_location")||"page";window.useGetStarted?(t.href="/get-started",t.onclick=()=>(posthog.capture("download_page_redirect",{source:r,device_type:o}),!0)):(t.href=s.Windows,o==="Windows"&&(t.onclick=()=>(setTimeout(()=>{window.location.href=l.Windows},5e3),!0)))}),document.querySelectorAll("[mac-download]").forEach(function(t){let r=t.getAttribute("cta_location")||"page";window.useGetStarted?(t.href="/get-started",t.onclick=()=>(posthog.capture("download_page_redirect",{source:r,device_type:o}),!0)):o==="mac_m1"||o==="mac_intel"?(t.href=s[o],t.onclick=()=>(setTimeout(()=>{window.location.href=l[o]},5e3),!0)):t.href="/get-started"}),document.querySelectorAll("[app-download]").forEach(function(t){let r=t.querySelectorAll("div"),n=t.id,e=n==="nav-download"?"nav":n==="footer-download"?"footer":t.getAttribute("cta_location")||"pricing";window.useGetStarted?(t.href="/get-started",t.onclick=()=>(posthog.capture("download_page_redirect",{source:e,device_type:o}),!0)):o==="mac_m1"||o==="mac_intel"?((e==="nav"||e==="footer")&&r.forEach(function(c){c.innerText="Download for free"}),t.href=s[o],t.onclick=()=>(posthog.capture("app_download",{device_type:o,source:e,"$feature/download-vs-getstarted":a}),setTimeout(()=>{window.location.href=l[o]},5e3),!0)):o==="Windows"?((e==="nav"||e==="footer")&&r.forEach(function(c){c.innerText="Download for free"}),t.href=s.Windows,t.onclick=()=>(posthog.capture("app_download",{device_type:o,source:e,"$feature/download-vs-getstarted":a}),setTimeout(()=>{window.location.href=l.Windows},5e3),!0)):(t.href="/get-started",t.onclick=()=>(posthog.capture("download_page_redirect",{source:e,device_type:o}),!0))})});})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanay-wispr/webflow-package",
3
- "version": "4.8.3",
3
+ "version": "4.8.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },