PageSourceSearch

https://compareheights.org/_next/static/chunks/app/%5Blocale%5D/(default)/pricing/page-3b220dced69ae8f6.js

js compareheights.org collected 2026-10-04 00:15:25 UTC 15,819 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6179],{23616:(e,t,r)=>{Promise.resolve().then(r.bind(r,22203))},22203:(e,t,r)=>{"use strict";r.d(t,{default:()=>w});var a=r(95155),i=r(98867),n=r(77594),l=r(12115),s=r(852),o=r(33565),d=r(21567);let c=l.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,a.jsx)(s.bL,{className:(0,d.cn)("grid gap-2",r),...i,ref:t})});c.displayName=s.bL.displayName;let u=l.forwardRef((e,t)=>{let{className:r,...i}=e;return(0,a.jsx)(s.q7,{ref:t,className:(0,d.cn)("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r),...i,children:(0,a.jsx)(s.C1,{className:"flex items-center justify-center",children:(0,a.jsx)(o.A,{className:"h-2.5 w-2.5 fill-current text-current"})})})});u.displayName=s.q7.displayName;var f=r(25121),p=r(73312),m=r(35773),g=r(98986);let b={default:"bg-gradient-to-r from-purple-500/10 to-pink-500/10 border-purple-400/20 text-purple-700 dark:text-purple-300",primary:"bg-gradient-to-r from-blue-500/10 to-cyan-500/10 border-blue-400/20 text-blue-700 dark:text-blue-300",secondary:"bg-gradient-to-r from-gray-500/10 to-slate-500/10 border-gray-400/20 text-gray-700 dark:text-gray-300",accent:"bg-gradient-to-r from-rose-500/10 to-pink-500/10 border-rose-400/20 text-rose-700 dark:text-rose-300",success:"bg-gradient-to-r from-emerald-500/10 to-green-500/10 border-emerald-400/20 text-emerald-700 dark:text-emerald-300",warning:"bg-gradient-to-r from-amber-500/10 to-orange-500/10 border-amber-400/20 text-amber-700 dark:text-amber-300",info:"bg-gradient-to-r from-teal-500/10 to-cyan-500/10 border-teal-400/20 text-teal-700 dark:text-teal-300"};function v(e){let{children:t,className:r,variant:i="default"}=e;return(0,a.jsx)("span",{className:(0,d.cn)("inline-flex items-center px-3 py-1 rounded-full border text-xs font-medium backdrop-blur-sm","shadow-lg hover:shadow-xl transition-all duration-300","cursor-default",b[i],r),children:t})}var x=r(30814),h=r(61021),y=r(8246);function w(e){var t;let{pricing:r}=e;if(r.disabled)return null;let s=(0,y.Ym)(),{user:o,setShowSignModal:d}=(0,h.U)(),[b,w]=(0,l.useState)(()=>{var e,t,a;let i=null===(e=r.groups)||void 0===e?void 0:e.find(e=>e.is_featured);return(null==i?void 0:i.name)||(null===(a=r.groups)||void 0===a?void 0:null===(t=a[0])||void 0===t?void 0:t.name)}),[j,N]=(0,l.useState)(!1),[k,_]=(0,l.useState)(null),C=async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{if(!o){d(!0);return}let r={product_id:e.product_id,currency:t?"cny":e.currency,locale:s||"en"};N(!0),_(e.product_id);let a=await fetch("/api/checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(401===a.status){N(!1),_(null),d(!0);return}let{code:i,message:n,data:l}=await a.json();if(0!==i){x.oR.error(n);return}let{checkout_url:c}=l;if(!c){x.oR.error("checkout failed");return}window.location.href=c}catch(e){console.log("checkout failed: ",e),x.oR.error("checkout failed")}finally{N(!1),_(null)}};return(0,l.useEffect)(()=>{if(r.items){var e;let t=r.items.find(e=>e.is_featured);_((null==t?void 0:t.product_id)||(null===(e=r.items[0])||void 0===e?void 0:e.product_id)),N(!1)}},[r.items]),(0,a.jsx)("section",{id:r.name,className:"py-16",children:(0,a.jsxs)("div",{className:"container",children:[(0,a.jsxs)("div",{className:"mx-auto mb-12 text-center",children:[(0,a.jsx)("div",{className:"mb-6",children:(0,a.jsx)(v,{variant:"warning",children:"Pricing"})}),(0,a.jsx)("h2",{className:"mb-4 text-4xl font-semibold lg:text-5xl",children:r.title}),(0,a.jsx)("p",{className:"text-muted-foreground lg:text-lg",children:r.description})]}),(0,a.jsxs)("div",{className:"w-full flex flex-col items-center gap-1",children:[r.groups&&r.groups.length>0&&(0,a.jsx)("div",{className:"flex h-12 mb-12 items-center rounded-md bg-muted p-1 text-lg",children:(0,a.jsx)(c,{value:b,className:"h-full grid-cols-".concat(r.groups.length),onValueChange:e=>{w(e)},children:r.groups.map((e,t)=>(0,a.jsxs)("div",{className:'h-full rounded-md transition-all has-[button[data-state="checked"]]:bg-white',children:[(0,a.jsx)(u,{value:e.name||"",id:e.name,className:"peer sr-only"}),(0,a.jsxs)(g.J,{htmlFor:e.name,className:"flex h-full cursor-pointer items-center justify-center px-4 font-semibold text-muted-foreground peer-data-[state=checked]:text-primary",children:[e.title,e.label&&(0,a.jsx)(f.E,{variant:"outline",className:"border-primary bg-primary px-1.5 ml-1 text-primary-foreground",children:e.label})]})]},t))})}),(0,a.jsx)("div",{className:"w-full mt-0 flex flex-col md:flex-row justify-around items-center max-w-7xl mx-auto",children:null===(t=r.items)||void 0===t?void 0:t.map((e,t)=>e.group&&e.group!==b?null:(0,a.jsx)("div",{className:"rounded-lg p-6 md:max-w-sm mx-auto w-full ".concat(e.is_featured?"border-primary border-2 bg-card text-card-foreground":"border-muted border"),children:(0,a.jsxs)("div",{className:"flex h-full flex-col justify-between gap-5",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[e.title&&(0,a.jsx)("h3",{className:"text-xl font-semibold",children:e.title}),(0,a.jsx)("div",{className:"flex-1"}),e.label&&(0,a.jsx)(f.E,{variant:"outline",className:"border-primary bg-primary px-1.5 text-primary-foreground",children:e.label})]}),(0,a.jsxs)("div",{className:"flex items-end gap-2 mb-4",children:[e.original_price&&(0,a.jsx)("span",{className:"text-xl text-muted-foreground font-semibold line-through",children:e.original_price}),e.price&&(0,a.jsx)("span",{className:"text-5xl font-semibold",children:e.price}),e.unit&&(0,a.jsx)("span",{className:"block font-semibold",children:e.unit})]}),e.description&&(0,a.jsx)("p",{className:"text-muted-foreground",children:e.description}),e.features_title&&(0,a.jsx)("p",{className:"mb-3 mt-6 font-semibold",children:e.features_title}),e.features&&(0,a.jsx)("ul",{className:"flex flex-col gap-3",children:e.features.map((e,t)=>(0,a.jsxs)("li",{className:"flex gap-2",children:[(0,a.jsx)(i.A,{className:"mt-1 size-4 shrink-0"}),e]},"feature-".concat(t)))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[e.cn_amount&&e.cn_amount>0?(0,a.jsxs)("div",{className:"flex items-center gap-x-2 mt-2",children:[(0,a.jsx)("span",{className:"text-sm",children:"人民币支付 \uD83D\uDC49"}),(0,a.jsx)("div",{className:"inline-block p-2 hover:cursor-pointer hover:bg-base-200 rounded-md",onClick:()=>{j||C(e,!0)},children:(0,a.jsx)("img",{src:"/imgs/cnpay.png",alt:"cnpay",className:"w-20 h-10 rounded-lg"})})]}):null,e.button&&(0,a.jsxs)(p.$,{className:"w-full flex items-center justify-center gap-2 font-semibold",disabled:j,onClick:()=>{j||C(e)},children:[(!j||j&&k!==e.product_id)&&(0,a.jsx)("p",{children:e.button.title}),j&&k===e.product_id&&(0,a.jsx)("p",{children:e.button.title}),j&&k===e.product_id&&(0,a.jsx)(n.A,{className:"mr-2 h-4 w-4 animate-spin"}),e.button.icon&&(0,a.jsx)(m.default,{name:e.button.icon,className:"size-4"})]}),e.tip&&(0,a.jsx)("p",{className:"text-muted-foreground text-sm mt-2",children:e.tip})]})]})},t))})]})]})})}},35773:(e,t,r)=>{"use strict";r.d(t,{default:()=>n});var a=r(95155);let i={Ri:r(28100)};function n(e){let{name:t,className:r,onClick:n}=e,l=function(e){let t=i[e.slice(0,2)];return t&&t[e]||null}(t);return l?(0,a.jsx)(l,{className:"".concat(r," cursor-pointer"),onClick:n,style:{cursor:n?"pointer":"default"}}):null}},25121:(e,t,r)=>{"use strict";r.d(t,{E:()=>o});var a=r(95155);r(12115);var i=r(12317),n=r(31027),l=r(21567);let s=(0,n.F)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function o(e){let{className:t,variant:r,asChild:n=!1,...o}=e,d=n?i.DX:"span";return(0,a.jsx)(d,{"data-slot":"badge",className:(0,l.cn)(s({variant:r}),t),...o})}},73312:(e,t,r)=>{"use strict";r.d(t,{$:()=>o,r:()=>s});var a=r(95155);r(12115);var i=r(12317),n=r(31027),l=r(21567);let s=(0,n.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all cursor-pointer disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive backdrop-blur-md border",{variants:{variant:{default:"bg-primary/60 text-primary-foreground border-primary/40 shadow-lg hover:bg-primary/50 hover:border-primary/60",destructive:"bg-destructive/60 text-white border-destructive/60 shadow-lg hover:bg-destructive/70 hover:border-destructive/50 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",outline:"bg-background/20 border-border/30 shadow-lg hover:bg-accent/20 hover:text-accent-foreground hover:border-border/40 dark:bg-input/10 dar
1k:border-input/30 dark:hover:bg-input/20",secondary:"bg-secondary/30 text-secondary-foreground border-secondary/40 shadow-lg hover:bg-secondary/40 hover:border-secondary/50",ghost:"bg-transparent border-transparent hover:bg-accent/20 hover:text-accent-foreground hover:border-accent/30 dark:hover:bg-accent/20",link:"text-primary underline-offset-4 hover:underline bg-transparent border-transparent"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:t,variant:r,size:n,asChild:o=!1,...d}=e,c=o?i.DX:"button";return(0,a.jsx)(c,{"data-slot":"button",className:(0,l.cn)(s({variant:r,size:n,className:t})),...d})}},98986:(e,t,r)=>{"use strict";r.d(t,{J:()=>l});var a=r(95155);r(12115);var i=r(24352),n=r(21567);function l(e){let{className:t,...r}=e;return(0,a.jsx)(i.b,{"data-slot":"label",className:(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...r})}},61021:(e,t,r)=>{"use strict";r.d(t,{AppContextProvider:()=>m,U:()=>p});var a=r(95155),i=r(12115),n=r(79368),l=r(57887),s=r(71056),o=r(86651),d=r.n(o),c=r(90696),u=r(50080);let f=(0,i.createContext)({}),p=()=>(0,i.useContext)(f),m=e=>{var t;let{children:r}=e;(0,u.y2)()&&(0,u.Ej)()&&function(){let{data:e,status:t}=(0,c.wV)(),r=async function(){d()({client_id:"881893635077-2juu0sdqo2iclgbar00f05bmkl48rn7e.apps.googleusercontent.com",auto_select:!1,cancel_on_tap_outside:!1,context:"signin"},e=>{console.log("onetap login ok",e),n(e.credential)})},n=async function(e){console.log("signIn ok",await (0,c.Jv)("google-one-tap",{credential:e,redirect:!1}))};(0,i.useEffect)(()=>{"unauthenticated"===t&&r()},[t]),a.Fragment}();let{data:o}=(0,u.y2)()?(0,c.wV)():{data:null},[p,m]=(0,i.useState)(!1),[g,b]=(0,i.useState)(null),[v,x]=(0,i.useState)(!1),[h,y]=(0,i.useState)(!1),[w,j]=(0,i.useState)(null),N=(0,i.useRef)(null),k=(0,i.useCallback)(async e=>{try{if(e.invited_by){console.log("user already been invited",e.invited_by);return}let t=(0,n.pr)(l.wD.InviteCode);if(!t)return;let r=(0,s._)(new Date(e.created_at)),a=(0,s._)(new Date),i=Number(a-r);if(i<=0||i>7200){console.log("user created more than 2 hours");return}console.log("update invite",t,e.uuid);let o={invite_code:t,user_uuid:e.uuid},d=await fetch("/api/update-invite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(!d.ok)throw Error("update invite failed with status: "+d.status);let{code:c,message:u,data:f}=await d.json();if(0!==c)throw Error(u);b(f),(0,n.np)(l.wD.InviteCode)}catch(e){console.log("update invite failed: ",e)}},[b]),_=(0,i.useCallback)(async()=>{try{let t=await fetch("/api/get-user-info",{method:"POST"});if(!t.ok)throw Error("fetch user info failed with status: "+t.status);let{code:r,message:a,data:i}=await t.json();if(0!==r)throw Error(a);b(i),k(i);try{let t=await fetch("/api/subscription");if(t.ok){var e;let r=await t.json();r.success&&(null===(e=r.data)||void 0===e?void 0:e.subscription)?x("active"===r.data.subscription.status):x(!1)}else x(!1)}catch(e){console.log("fetch subscription failed:",e),x(!1)}}catch(e){console.log("fetch user info failed")}},[b,k]);return(0,i.useEffect)(()=>{var e,t;let r=null!==(t=null==o?void 0:null===(e=o.user)||void 0===e?void 0:e.uuid)&&void 0!==t?t:null;if(!r){N.current=null,b(null),x(!1);return}N.current!==r&&(N.current=r,_())},[null==o?void 0:null===(t=o.user)||void 0===t?void 0:t.uuid,_,b]),(0,a.jsx)(f.Provider,{value:{showSignModal:p,setShowSignModal:m,user:g,setUser:b,showFeedback:h,setShowFeedback:y,promptFromTemplate:w,setPromptFromTemplate:j,isPaidSubscriber:v},children:r})}},50080:(e,t,r)=>{"use strict";r.d(t,{Ej:()=>n,y2:()=>i});var a=r(2818);function i(){return a.env.NEXT_PUBLIC_AUTH_ENABLED,"false"!==a.env.NEXT_PUBLIC_AUTH_ENABLED}function n(){return!0}},79368:(e,t,r)=>{"use strict";r.d(t,{PW:()=>n,np:()=>l,pr:()=>i});var a=r(6763);let i=e=>{let t=localStorage.getItem(e);if(!t)return null;let r=t.split(":");if(!r||r.length<2)return null;let i=Number(r[0]),n=(0,a.lg)();if(-1!==i&&i<n)return l(e),null;let s=r[0]+":";return t.replace(s,"")},n=(e,t,r)=>{localStorage.setItem(e,r+":"+t)}
1,l=e=>{localStorage.removeItem(e)}},6763:(e,t,r)=>{"use strict";r.d(t,{lg:()=>a});let a=()=>Date.parse(new Date().toUTCString())/1e3},21567:(e,t,r)=>{"use strict";r.d(t,{E5:()=>o,cn:()=>n,lW:()=>s,yB:()=>l});var a=r(43463),i=r(69795);function n(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,i.QP)((0,a.$)(t))}let l=e=>{let t=window.getComputedStyle(e),r=parseFloat(t.paddingTop),a=parseFloat(t.paddingBottom),i=parseFloat(t.paddingLeft),n=parseFloat(t.paddingRight);return{width:e.clientWidth-i-n,height:e.clientHeight-r-a,x:e.clientLeft+i,y:e.clientTop+r}};async function s(e){if(navigator.clipboard&&window.isSecureContext)try{return await navigator.clipboard.writeText(e),!0}catch(e){console.warn("Clipboard API failed, trying fallback method:",e)}try{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-999999px",t.style.top="-999999px",t.setAttribute("readonly",""),document.body.appendChild(t),t.select(),t.setSelectionRange(0,e.length);let r=document.execCommand("copy");return document.body.removeChild(t),r}catch(e){return console.error("Fallback copy method failed:",e),!1}}function o(e){if(!Number.isFinite(e))return String(e);let t=e.toString();if(!/e/i.test(t))return t;let[r,a]=t.split("e"),i=Number(a),[n,l=""]=r.split(".");return i>=0?n+(l=l.padEnd(i,"0")).slice(0,i)+(l.slice(i)?"."+l.slice(i):""):"0."+"0".repeat(Math.abs(i)-1)+n+l}},57887:(e,t,r)=>{"use strict";r.d(t,{wD:()=>a});let a={Theme:"THEME",InviteCode:"INVITE_CODE"}}},e=>{var t=t=>e(e.s=t);e.O(0,[9204,8246,1345,814,1486,696,105,8441,1517,7358],()=>t(23616)),_N_E=e.O()}]);

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.