PageSourceSearch

https://clerk.withsaber.com/npm/@clerk/[email protected]/dist/4170_clerk.browser_70f75e_5.128.0.js

js withsaber.com collected 2026-10-09 21:59:47 UTC 17,477 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunk_clerk_clerk_js=globalThis.webpackChunk_clerk_clerk_js||[]).push([["4170"],{24718:function(e,r,i){i.d(r,{b:()=>D});var t=i(73312),a=i(61869),o=i(69144),l=i(38873),n=i(11576),s=i(67322),c=i(19732),d=i(2432),p=i(96231),g=i(64204),m=i(34174),u=i(51217),h=i(95746);function b({plans:e,planPeriod:r,setPlanPeriod:i,onSelect:a,isCompact:o,props:l}){return(0,t.tZ)(u.InternalThemeProvider,{children:(0,t.tZ)(g.Box,{elementDescriptor:g.descriptors.pricingTable,sx:e=>({"--grid-min-size":o?"11.75rem":"20rem","--grid-max-columns":"infinity","--grid-gap":e.space.$4,"--max-column-width":"100% / var(--grid-max-columns, infinity) - var(--grid-gap)","--column-width":"max(var(--max-column-width), min(var(--grid-min-size, 10rem), 100%))",display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(var(--column-width), 1fr))",gridTemplateRows:"auto 1fr",gap:`var(--grid-gap-y, var(--grid-gap, ${e.space.$4})) var(--grid-gap, ${e.space.$4})`,alignItems:"stretch",width:"100%",minWidth:"0"}),"data-variant":o?"compact":"default",children:e?.map(e=>(0,t.tZ)(x,{plan:e,planPeriod:r,setPlanPeriod:i,onSelect:a,props:l,isCompact:o},e.id))})})}function x(e){let{plan:r,planPeriod:i,setPlanPeriod:l,onSelect:s,props:m,isCompact:b=!1}=e,x=(0,a.cL)(),{isSignedIn:T}=(0,a.kP)(),{mode:B="mounted",ctaPosition:$}=(0,n.usePricingTableContext)(),C=(0,n.useSubscriberTypeContext)(),S=(0,a.mP)(),w=m.ctaPosition||$||"bottom",Z=m.collapseFeatures||!1,{id:D,slug:v}=r,P=(0,p.N2)(e=>e({permission:"org:sys_billing:manage"})||"user"===C),{buttonPropsForPlan:M,activeOrUpcomingSubscriptionBasedOnPlanPeriod:F}=(0,n.usePlansContext)(),z=o.useMemo(()=>F(r,i),[r,i,F]),k=r.features.length>0,{shouldShowFooter:I,shouldShowFooterNotice:R}=(e=>{let[r,i]=(e=>{let{subscription:r,plan:i,planPeriod:t,for:a,hasActiveOrganization:o}=e,l=[!0,!0],n=[!0,!1],s=[!1,!1];if(!r)return"organization"!==a||o?n:s;if("upcoming"===r.status)return l;if("active"===r.status){let e=!!r.canceledAt,a=!r.plan.isDefault&&t!==r.planPeriod&&("annual"===t&&!!i.annualMonthlyFee||"month"===t&&!!i.fee),o=i.freeTrialEnabled&&r.isFreeTrial;if(e||a)return n;if(o)return l}return s})(e);return{shouldShowFooter:r,shouldShowFooterNotice:i}})({subscription:z,plan:r,planPeriod:i,for:m.for,hasActiveOrganization:!!S?.organization});return(0,t.BX)(g.Box,{elementDescriptor:g.descriptors.pricingTableCard,elementId:g.descriptors.pricingTableCard.setId(v),sx:e=>({display:"grid",gap:0,gridTemplateRows:"subgrid",gridRow:"span 5",background:u.common.mutedBackground(e),borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,borderRadius:e.radii.$xl,overflow:"hidden",textAlign:"left"}),"data-variant":b?"compact":"default",children:[(0,t.tZ)(y,{plan:r,isCompact:b,planPeriod:i,setPlanPeriod:l,badge:z?(0,t.tZ)(h.u,{subscription:z.isFreeTrial?{status:"free_trial"}:z}):void 0}),(0,t.BX)(g.Box,{elementDescriptor:g.descriptors.pricingTableCardBody,sx:{display:"grid",gridTemplateRows:"subgrid",gridRow:"span 2",gap:0},children:["bottom"===w&&!Z||"top"===w&&k?(0,t.tZ)(g.Box,{elementDescriptor:g.descriptors.pricingTableCardFeatures,sx:e=>({display:"flex",flexDirection:"column",flex:"1",padding:b?e.space.$3:e.space.$4,backgroundColor:k?e.colors.$colorBackground:"transparent",borderTopWidth:k?e.borderWidths.$normal:0,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha150}),"data-variant":b?"compact":"default",children:(0,t.tZ)(f,{plan:r,isCompact:b,showPlanDetails:e=>{let t=(0,d.N)(B,e);x.__internal_openPlanDetails({plan:r,initialPlanPeriod:i,portalRoot:t})}})}):null,I?(0,t.tZ)(g.Box,{elementDescriptor:g.descriptors.pricingTableCardFooter,sx:e=>({marginTop:"auto",padding:b?e.space.$3:e.space.$4,borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha150,order:"top"===w?-1:void 0}),children:R&&z?(0,t.tZ)(g.Text,{elementDescriptor:g.descriptors.pricingTableCardFooterNotice,variant:b?"buttonSmall":"buttonLarge",localizationKey:r.freeTrialEnabled&&z.isFreeTrial&&z.periodEnd?(0,g.localizationKeys)("badge__trialEndsAt",{date:z.periodEnd}):(0,g.localizationKeys)("badge__startsAt",{date:z.periodStart}),colorScheme:"secondary",sx:e=>({paddingBlock:e.space.$1x5,textAlign:"center"})}):(0,t.BX)(c.u.Root,{children:[(0,t.tZ)(c.u.Trigger,{sx:{width:"100%"},children:(0,t.tZ)(g.Button,{elementDescriptor:g.descriptors.pricingTableCardFooterButton,block:!0,textVariant:b?"buttonSmall":"buttonLarge",...M({plan:r,isCompact:b,selectedPlanPeriod:i}
1),onClick:e=>{s(r,e)}})}),T&&!P&&(0,t.tZ)(c.u.Content,{text:(0,g.localizationKeys)("organizationProfile.plansPage.alerts.noPermissionsToManageBilling")})]})}):(0,t.tZ)(g.Box,{sx:e=>({backgroundColor:k?e.colors.$colorBackground:"transparent"})})]})]},D)}let y=o.forwardRef((e,r)=>{let{plan:i,isCompact:a,planPeriod:l,setPlanPeriod:c,badge:d}=e,{name:p,annualMonthlyFee:m}=i,u=!!m,h=o.useMemo(()=>u&&"annual"===l?i.annualMonthlyFee:i.fee,[u,l,i.fee,i.annualMonthlyFee]),b=o.useMemo(()=>(0,n.normalizeFormatted)(h.amountFormatted),[h.amountFormatted]);return(0,t.BX)(g.Box,{ref:r,elementDescriptor:g.descriptors.pricingTableCardHeader,sx:e=>({width:"100%",padding:a?e.space.$3:e.space.$4,display:"grid",gap:e.space.$1,gridRow:"span 3",gridTemplateRows:"subgrid"}),"data-variant":a?"compact":"default",children:[(0,t.BX)(g.Box,{elementDescriptor:g.descriptors.pricingTableCardTitleContainer,children:[(0,t.BX)(g.Box,{sx:e=>({display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:e.space.$0x25}),children:[(0,t.tZ)(g.Heading,{elementDescriptor:g.descriptors.pricingTableCardTitle,as:"h2",textVariant:a?"h3":"h2",children:p}),d&&d]}),!a&&i.description?(0,t.tZ)(g.Text,{elementDescriptor:g.descriptors.pricingTableCardDescription,variant:"subtitle",colorScheme:"secondary",sx:{justifySelf:"flex-start"},children:i.description}):null]}),(0,t.BX)(g.Flex,{elementDescriptor:g.descriptors.pricingTableCardFeeContainer,"data-variant":a?"compact":"default",align:"center",wrap:"wrap",sx:e=>({columnGap:e.space.$1,marginTop:e.space.$1}),children:[(0,t.BX)(g.Text,{elementDescriptor:g.descriptors.pricingTableCardFee,variant:a?"h2":"h1",colorScheme:"body",children:[h.currencySymbol,b]}),i.isDefault?null:(0,t.tZ)(g.Text,{elementDescriptor:g.descriptors.pricingTableCardFeePeriod,variant:"caption",colorScheme:"secondary",sx:e=>({textTransform:"lowercase",":before":{content:'"/"',marginInlineEnd:e.space.$0x25}}),localizationKey:(0,g.localizationKeys)("billing.month")})]}),u&&!i.isDefault&&c?(0,t.tZ)(g.Box,{elementDescriptor:g.descriptors.pricingTableCardPeriodToggle,sx:e=>({marginTop:e.space.$1}),children:(0,t.tZ)(s.r,{isChecked:"annual"===l,onChange:e=>c(e?"annual":"month"),label:(0,g.localizationKeys)("billing.billedAnnually")})}):(0,t.tZ)(g.Text,{elementDescriptor:g.descriptors.pricingTableCardFeePeriodNotice,variant:"caption",colorScheme:"secondary",localizationKey:i.isDefault?(0,g.localizationKeys)("billing.alwaysFree"):(0,g.localizationKeys)("billing.billedMonthlyOnly"),sx:e=>({justifySelf:"flex-start",alignSelf:"center",marginTop:e.space.$1})})]})}),f=o.forwardRef((e,r)=>{let{plan:i,isCompact:a,showPlanDetails:o}=e,l=i.features.length,n=a?l>3:l>8;return(0,t.BX)(g.Box,{ref:r,elementDescriptor:g.descriptors.pricingTableCardFeatures,sx:e=>({display:"grid",flex:1,rowGap:a?e.space.$2:e.space.$3}),children:[(0,t.tZ)(g.Col,{elementDescriptor:g.descriptors.pricingTableCardFeaturesList,"data-variant":a?"compact":"default",as:"ul",role:"list",sx:e=>({flex:"1",rowGap:a?e.space.$2:e.space.$3,margin:0,padding:0}),children:i.features.slice(0,n?a?3:8:l).map(e=>(0,t.BX)(g.Box,{elementDescriptor:g.descriptors.pricingTableCardFeaturesListItem,elementId:g.descriptors.pricingTableCardFeaturesListItem.setId(e.slug),as:"li",sx:e=>({display:"flex",alignItems:"baseline",gap:e.space.$2,margin:0,padding:0}),children:[(0,t.tZ)(g.Icon,{icon:m.Jr,colorScheme:"neutral",size:"sm","aria-hidden":!0,sx:e=>({transform:`translateY(${e.space.$0x25})`})}),(0,t.tZ)(g.Span,{elementDescriptor:g.descriptors.pricingTableCardFeaturesListItemContent,children:(0,t.tZ)(g.Text,{elementDescriptor:g.descriptors.pricingTableCardFeaturesListItemTitle,colorScheme:"body",
vendor: 9,277 bytes, line 1
1sx:e=>({fontWeight:e.fontWeights.$normal}),children:e.name})})]},e.id))}),n&&(0,t.BX)(g.SimpleButton,{onClick:e=>o(e),variant:"link",sx:e=>({marginBlockStart:"auto",paddingBlock:e.space.$1,gap:e.space.$1}),children:[(0,t.tZ)(g.Icon,{icon:m.v3,colorScheme:"neutral",size:"md","aria-hidden":!0}),(0,t.tZ)(g.Span,{localizationKey:(0,g.localizationKeys)("billing.seeAllFeatures")})]})]})});var T=i(29629),B=i(47291),$=i(25407),C=i(65695);function S({plans:e=[],planPeriod:r,setPlanPeriod:i,onSelect:a,highlightedPlan:l}){let s=(0,C.Tb)(),{animations:c}=(0,g.useAppearance)().parsedLayout,d=!s&&!0===c,p=o.useId(),h=`${p}-segmented-control`,{buttonPropsForPlan:b}=(0,n.usePlansContext)(),{t:x}=(0,g.useLocalizations)(),y=e=>({transition:d?`grid-template-rows ${e.transitionDuration.$slower} ${e.transitionTiming.$slowBezier}`:"none"}),f=e=>({background:u.common.mergedColorsBackground($.O9.setAlpha(e.colors.$colorBackground,1),e.colors.$neutralAlpha25)}),S=o.useMemo(()=>`repeat(${e.length+1}, minmax(9.375rem,1fr))`,[e.length]),w=o.useMemo(()=>e.some(e=>!!e.annualMonthlyFee),[e]),Z=o.useMemo(()=>{let r=new Set;return e.forEach(({features:e})=>{e.forEach(({name:e})=>r.add(e))}),Array.from(r)},[e]);return e.length?(0,t.tZ)(u.InternalThemeProvider,{children:(0,t.tZ)(g.Box,{elementDescriptor:g.descriptors.pricingTableMatrix,sx:e=>({position:"relative",minWidth:"100%",display:"grid",isolation:"isolate",backgroundColor:e.colors.$colorBackground,[u.mqu.md]:{overflowX:"auto"}}),children:(0,t.BX)(g.Box,{elementDescriptor:g.descriptors.pricingTableMatrixTable,role:"table",children:[(0,t.tZ)(g.Box,{elementDescriptor:[g.descriptors.pricingTableMatrixRowGroup,g.descriptors.pricingTableMatrixRowGroupHeader],role:"rowgroup",sx:e=>({position:"sticky",top:0,backgroundColor:e.colors.$colorBackground,borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100,zIndex:1}),children:(0,t.BX)(g.Box,{elementDescriptor:[g.descriptors.pricingTableMatrixRow,g.descriptors.pricingTableMatrixRowHeader],role:"row",sx:{display:"grid",gridTemplateColumns:S},children:[(0,t.tZ)(g.Box,{elementDescriptor:g.descriptors.pricingTableMatrixColumnHeader,role:"columnheader",sx:e=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"flex-end",rowGap:e.space.$3,paddingBlockEnd:e.space.$12,paddingInlineStart:e.space.$3}),children:w?(0,t.BX)(t.HY,{children:[(0,t.tZ)(g.Text,{id:h,colorScheme:"secondary",variant:"caption",localizationKey:(0,g.localizationKeys)("billing.pricingTable.billingCycle"),children:"Billing cycle"}),(0,t.BX)(B.s.Root,{"aria-labelledby":h,value:r,onChange:e=>i(e),children:[(0,t.tZ)(B.s.Button,{value:"month",text:(0,g.localizationKeys)("billing.monthly")}),(0,t.tZ)(B.s.Button,{value:"annual",text:(0,g.localizationKeys)("billing.annually")})]})]}):null}),e.map(e=>{let i=e.slug===l,o=e.annualMonthlyFee&&"annual"===r?e.annualMonthlyFee:e.fee;return(0,t.BX)(g.Box,{elementDescriptor:g.descriptors.pricingTableMatrixColumnHeader,role:"columnheader",sx:[e=>({display:"flex",flexDirection:"column",alignItems:"flex-start",flex:1,borderStartStartRadius:e.radii.$xl,borderStartEndRadius:e.radii.$xl}),i&&f],"data-highlighted":i,children:[(0,t.BX)(g.Box,{sx:e=>({width:"100%",padding:e.space.$4}),children:[e.avatarUrl||i?(0,t.BX)(g.Span,{sx:e=>({width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"space-between",marginBlockEnd:e.space.$3}),children:[e.avatarUrl?(0,t.tZ)(T.q,{elementDescriptor:g.descriptors.pricingTableMatrixAvatar,size:e=>40,title:e.name,initials:e.name[0],rounded:!1,imageUrl:e.avatarUrl}):null,i?(0,t.tZ)(g.Badge,{elementDescriptor:g.descriptors.pricingTableMatrixBadge,colorScheme:"secondary",localizationKey:(0,g.localizationKeys)("billing.popular")}):null]}):null,(0,t.tZ)(g.Heading,{elementDescriptor:g.descriptors.pricingTableMatrixPlanName,textVariant:"h3",children:e.name}),(0,t.tZ)(g.Flex,{align:"center",wrap:"wrap",sx:e=>({marginTop:e.space.$2,columnGap:e.space.$1x5}),children:e.hasBaseFee?(0,t.BX)(t.HY,{children:[(0,t.BX)(g.Text,{elementDescriptor:g.descriptors.pricingTableMatrixFee,variant:"h2",colorScheme:"body",children:[o.currencySymbol,o.amountFormatted]}),(0,t.tZ)(g.Text,{elementDescriptor:g.descriptors.pricingTableMatrixFeePeriod,variant:"caption",colorScheme:"secondary",sx:e=>({textTransform:"lowercase",":before":{content:'"/"',marginInlineEnd:e.space.$1}}),localizationKey:(0,g.localizationKeys)("billing.month")}),e.annualMonthlyFee?(0,t.tZ)(g.Box,{elementDescriptor:g.descriptors.pricingTableMatrixFeePeriodNotice,sx:[e=>({width:"100%",display:"grid",gridTemplateRows:"annual"===r?"1fr":"0fr"}),y],inert:"annual"!==r?"true":void 0,children:(0,t.tZ)(g.Box,{elementDescriptor:g.descriptors.pricingTableMatrixFeePeriodNoticeInner,sx:{overflow:"hidden",minHeight:0},children:(0,t.BX)(g.Text,{elementDescriptor:g.descriptors.pricingTableMatrixFeePeriodNoticeLabel,variant:"caption",colorScheme:"secondary",sx:e=>({width:"100%",display:"flex",alignItems:"center",columnGap:e.space.$1}),children:[(0,t.tZ)(g.Icon,{icon:m.I$,colorScheme:"neutral",size:"sm","aria-hidden":!0})," ",(0,t.tZ)(g.Span,{localizationKey:(0,g.localizationKeys)("billing.billedAnnually")})]})})}):null]}):(0,t.tZ)(g.Text,{elementDescriptor:g.descriptors.pricingTableMatrixFee,variant:"h2",localizationKey:(0,g.localizationKeys)("billing.free"),colorScheme:"body"})})]}),e.isDefault?null:(0,t.tZ)(g.Box,{sx:e=>({width:"100%",marginBlockStart:"auto",marginBlockEnd:e.space.$8,paddingBlockStart:e.space.$2,paddingBlockEnd:e.space.$4,paddingInline:e.space.$4}),children:(0,t.tZ)(g.Button,{block:!0,textVariant:"buttonSmall",size:"xs",onClick:r=>{a(e,r)},...b({plan:e,selectedPlanPeriod:r}),colorScheme:i?"primary":"secondary"})})]},e.slug)})]})}),(0,t.BX)(g.Box,{elementDescriptor:[g.descriptors.pricingTableMatrixRowGroup,g.descriptors.pricingTableMatrixRowGroupBody],role:"rowgroup",children:[Z.map(r=>(0,t.BX)(g.Box,{elementDescriptor:[g.descriptors.pricingTableMatrixRow,g.descriptors.pricingTableMatrixRowBody],role:"row",sx:e=>({position:"relative",display:"grid",gridTemplateColumns:S,borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100,":after":{content:'""',position:"absolute",inset:0,pointerEvents:"none",backgroundColor:e.colors.$neutralAlpha25,opacity:0},":hover:after":{opacity:1}}),children:[(0,t.tZ)(g.Box,{elementDescriptor:g.descriptors.pricingTableMatrixCell,role:"cell",sx:e=>({padding:e.space.$3}),children:(0,t.tZ)(g.Text,{colorScheme:"body",children:r})}),e.map(e=>{let i=e.slug===l,a=e.features.some(e=>e.name===r);return(0,t.tZ)(g.Box,{elementDescriptor:g.descriptors.pricingTableMatrixCell,role:"cell",sx:[e=>({display:"grid",placeContent:"center",padding:e.space.$3}),i&&f],"data-highlighted":i,"data-checked":a,children:a&&(0,t.tZ)(g.Icon,{icon:m.Jr,colorScheme:"neutral",size:"sm","aria-label":x((0,g.localizationKeys)("billing.pricingTable.included"))})},e.slug)})]},r)),(0,t.BX)(g.Box,{elementDescriptor:g.descriptors.pricingTableMatrixFooter,sx:{display:"grid",gridTemplateColumns:S},children:[(0,t.tZ)(g.Box,{elementDescriptor:[g.descriptors.pricingTableMatrixCell,g.descriptors.pricingTableMatrixCellFooter]}),e.map(e=>{let r=e.slug===l;return(0,t.tZ)(g.Box,{elementDescriptor:[g.descriptors.pricingTableMatrixCell,g.descriptors.pricingTableMatrixCellFooter],sx:[e=>({height:e.space.$10,borderEndStartRadius:e.radii.$xl,borderEndEndRadius:e.radii.$xl}),r&&f],"data-highlighted":r},e.slug)})]})]})]})})}):null}let w=e=>{let r=(0,a.cL)(),{mode:i="mounted",signInMode:s="redirect"}=(0,n.usePricingTableContext)(),c="modal"===i,{data:d,subscriptionItems:p}=(0,n.useSubscription)(),{data:g}=(0,n.usePlans)(),{handleSelectPlan:m}=(0,n.usePlansContext)(),u=(0,o.useMemo)(()=>r.isSignedIn?d?g:[]:g,[r.isSignedIn,g,d]),h=(0,o.useMemo)(()=>{if(c){let e=p?.find(e=>"upcoming"===e.status);if(e)return e.planPeriod;let r=p?.find(e=>!e.canceledAt&&"active"===e.status&&!e.plan.isDefault);if(r)return r.planPeriod}return"annual"},[c,p]),[x,y]=(0,o.useState)(h);(0,o.useEffect)(()=>{y(h)},[h]);let f=(t,a)=>{if(!r.isSignedIn)return"modal"===s?r.openSignIn():r.redirectToSignIn();m({mode:i,plan:t,planPeriod:x,event:a,appearance:e.checkoutProps?.appearance,newSubscriptionRedirectUrl:e.newSubscriptionRedirectUrl})};return(0,n.usePaymentMethods)(),(0,t.tZ)(l.Z.Root,{flow:"pricingTable",isFlowReady:r.isSignedIn?!!d:g.length>0,sx:{width:"100%"},children:"modal"!==i&&"matrix"===e.layout?(0,t.tZ)(S,{plans:u,planPeriod:x,setPlanPeriod:y,onSelect:f,highlightedPlan:e.highlightPlan}):(0,t.tZ)(b,{plans:u,planPeriod:x,setPlanPeriod:y,onSelect:f,isCompact:c,props:e})})},Z=e=>(0,t.tZ)("div",{children:(0,t.tZ)(w,{...e})}),D=e=>{let{mode:r="mounted"}=(0,n.usePricingTableContext)();return"modal"===r?(0,t.tZ)(Z,{...e}):(0,t.tZ)(w,{...e})}},95746:function(e,r,i){i.d(r,{u:()=>n});var t=i(73312),a=i(64204);let o={active:"badge__activePlan",upcoming:"badge__upcomingPlan",past_due:"badge__pastDuePlan",free_trial:"badge__freeTrial"},l={active:"secondary",upcoming:"primary",past_due:"warning",free_trial:"secondary"},n=({subscription:e,elementDescriptor:r})=>(0,t.tZ)(a.Badge,{elementDescriptor:r,colorScheme:l[e.status],localizationKey:(0,a.localizationKeys)(o[e.status])})}}]);

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.