PageSourceSearch

https://www.getinboxzero.com/_next/static/immutable/chunks/3zongkz__ioh2.js

js getinboxzero.com collected 2026-09-24 10:08:54 UTC 24,171 bytes, 5 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="54f66048-415c-381b-f71f-742a24496319")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,728328,e=>{"use strict";var s=e.i(322106);let t={name:"loader",size:24,node:[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]};t.node;let i=(0,s.default)(t);e.s(["LoaderIcon",0,i],728328)},870502,e=>{"use strict";var s=e.i(550889);e.s(["Tag",()=>s.default])},877081,824815,e=>{"use strict";var s=e.i(982630),t=e.i(320973),i=e.i(195955),r=e.i(390260),a=e.i(250140),n=e.i(438867),l=e.i(995835),o=e.i(198057),d=e.i(106973),c=e.i(724855),u=e.i(310621),m=e.i(421207),p=e.i(466691),h=e.i(370317),x=e.i(440087),g=e.i(807064),f=e.i(463756),j=e.i(723636),y=e.i(229609),b=e.i(5056);let N=(0,b.createServerReference)("7fae8a91319ccfb2fb262ad8e3fcb4a2526ffeaafd",b.callServer,void 0,b.findSourceMapURL,"setMemberOrganizationRuleEnabledAction");var v=e.i(755505),A=e.i(715813),C=e.i(604546),T=e.i(935308),S=e.i(685646),w=e.i(259109);e.i(117998);var I=e.i(523149),E=e.i(395910),k=e.i(806461),R=e.i(303670),O=e.i(790467),P=e.i(910714),M=e.i(411402),D=e.i(288881),z=e.i(608930),B=e.i(691425),L=e.i(839717),_=e.i(452675);function U({text:e,maxLength:t,className:i}){let r=e.length>t,a=(0,s.jsx)("div",{className:(0,_.cn)("truncate",i),children:e});return r?(0,s.jsxs)(L.Tooltip,{children:[(0,s.jsx)(L.TooltipTrigger,{asChild:!0,children:a}),(0,s.jsx)(L.TooltipContent,{className:"max-w-[400px] whitespace-pre-wrap break-words",children:e})]}):a}var V=e.i(72998);let H=[w.SystemType.TO_REPLY,w.SystemType.AWAITING_REPLY,w.SystemType.FYI,w.SystemType.ACTIONED,w.SystemType.NEWSLETTER,w.SystemType.MARKETING,w.SystemType.CALENDAR,w.SystemType.RECEIPT,w.SystemType.NOTIFICATION,w.SystemType.OTP,w.SystemType.COLD_EMAIL];function F(e){if(!e)return H.length;let s=H.indexOf(e);return -1===s?H.length:s}var Y=e.i(100929);function $({actions:e,provider:t,labels:i}){let r=(0,R.getVisibleActions)(e);return(0,s.jsx)("div",{className:"flex gap-1 sm:gap-2 flex-wrap min-w-0 justify-start",children:r.map(e=>{let r=(0,R.getActionIcon)(e.type);return(0,s.jsxs)(v.Badge,{color:(0,C.getActionColor)(e.type),className:"w-fit sm:text-nowrap shrink-0",children:[(0,s.jsx)(r,{className:"size-3 mr-1.5 hidden sm:block"}),(0,R.getActionDisplay)(e,t,i)]},e.id)})})}function K(){let{emailAccountId:e}=(0,E.useAccount)();return(0,s.jsx)(h.CardHeader,{children:(0,s.jsxs)(h.CardDescription,{className:"flex flex-col items-center gap-4 py-20",children:["You don't have any rules yet.",(0,s.jsx)("div",{children:(0,s.jsx)(p.Button,{asChild:!0,size:"sm",children:(0,s.jsx)(t.default,{href:(0,Y.getOnboardingStepHref)(e,Y.STEP_KEYS.LABELS),children:"Set up default rules"})})})]})})}e.s(["ActionBadges",0,$,"Rules",0,function({showAddRuleButton:e=!0}){let{data:b,isLoading:C,error:R,mutate:L}=(0,S.useRules)(),{setOpen:_}=(0,D.useSidebar)(),{setInput:Y}=(0,M.useChat)(),{userLabels:W}=(0,z.useLabels)(),G=(0,P.useDialogState)(),{emailAccountId:q,provider:Q}=(0,E.useAccount)(),{executeAsync:X}=(0,I.useAction)(y.toggleRuleAction.bind(null,q)),{executeAsync:Z}=(0,I.useAction)(N.bind(null,q)),J=async(e,s)=>{let t=!!e.organizationRuleId,i=!!e.systemType;L(b?.map(r=>t?r.id===e.id?{...r,organizationRuleMemberEnabled:s,enabled:s}:r:i?r.systemType===e.systemType?{...r,enabled:s}:r:r.id===e.id?{...r,enabled:s}:r),{revalidate:!1});let r=t?await Z({ruleId:e.id,enabled:s}):await X({ruleId:i?void 0:e.id,systemType:e.systemType||void 0,enabled:s});r?.serverError&&(0,T.toastError)({description:`There was an error ${s?"enabling":"disabling"} the rule. ${r.serverError||""}`}),L()},ee=(0,u.useMemo)(()=>{let e=b||[];return[...H.flatMap(s=>{let t=e.find(e=>e.systemType===s);if((0,V.isOptInSystemType)(s)&&t?.enabled!==!0)return[];if(t)return[t];let i=(0,V.getRuleConfig)(s);return[{id:`placeholder-${s}`,name:i.name,instructions:i.instructions,enabled:!1,runOnThreads:!1,automate:!0,actions:(0,V.getDefaultActions)(s,Q).map(e=>({...e,emailAccountId:q,messagingChannel:null,messagingChannelEmailAccountId:null})),group:null,emailAccountId:q,createdAt:new Date,updatedAt:new Date,categoryFilterType:null,conditionalOperator:w.LogicalOperator.OR,groupId:null,
2systemType:s,to:null,from:null,subject:null,body:null,promptText:null,organizationRuleId:null,organizationRuleMemberEnabled:null,organizationRule:null}]}),...e.filter(e=>!e.systemType)].sort((e,s)=>{let t=Number(!!s.enabled)-Number(!!e.enabled);if(0!==t)return t;let i=F(e.systemType)-F(s.systemType);if(0!==i)return i;let r=e.name.localeCompare(s.name,void 0,{sensitivity:"base"});return 0!==r?r:(e.instructions??"").localeCompare(s.instructions??"",void 0,{sensitivity:"base"})})},[b,q,Q]),es=!!ee?.length;return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(h.Card,{children:(0,s.jsx)(m.LoadingContent,{loading:C,error:R,children:es?(0,s.jsxs)(g.Table,{children:[(0,s.jsx)(g.TableHeader,{children:(0,s.jsxs)(g.TableRow,{children:[(0,s.jsx)(g.TableHead,{className:"w-16 px-2 sm:px-4",children:"Enabled"}),(0,s.jsx)(g.TableHead,{className:"px-2 sm:px-4",children:"Name"}),(0,s.jsx)(g.TableHead,{className:"hidden sm:table-cell px-2 sm:px-4",children:"Prompt"}),(0,s.jsx)(g.TableHead,{className:"px-2 sm:px-4",children:"Action"}),(0,s.jsx)(g.TableHead,{className:"w-fit whitespace-nowrap px-1",children:e&&(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)("div",{className:"my-2",children:(0,s.jsxs)(p.Button,{size:"sm",onClick:()=>G.onOpen(),children:[(0,s.jsx)(n.PlusIcon,{className:"mr-2 hidden size-4 md:block"}),"Add Rule"]})})})})]})}),(0,s.jsx)(g.TableBody,{children:ee.map(e=>{let n=e.id.startsWith("placeholder-"),u=!!e.organizationRuleId,m=u&&e.organizationRule?.enabled===!1;return(0,s.jsxs)(g.TableRow,{className:`${!e.enabled?"bg-muted opacity-60":""} ${n||u?"cursor-default":"cursor-pointer"}`,onClick:()=>{n||u||G.onOpen({ruleId:e.id,editMode:!1})},children:[(0,s.jsx)(g.TableCell,{onClick:e=>e.stopPropagation(),className:"text-center p-2 sm:p-4",children:(0,s.jsx)(A.Tooltip,{content:"Disabled by your organization",hide:!m,children:(0,s.jsx)("span",{children:(0,s.jsx)(f.Switch,{size:"sm",checked:e.enabled,disabled:m,onCheckedChange:s=>J(e,s)})})})}),(0,s.jsx)(g.TableCell,{className:"font-medium p-2 sm:p-4",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[e.name,u&&(0,s.jsx)(A.Tooltip,{content:"Managed by Organization",children:(0,s.jsx)(v.Badge,{color:"blue",children:"Org"})})]})}),(0,s.jsx)(g.TableCell,{className:"hidden sm:table-cell p-2 sm:p-4",children:(0,s.jsx)(U,{text:(0,B.conditionsToString)(e),maxLength:50,className:"max-w-xs"})}),(0,s.jsx)(g.TableCell,{className:"p-2 sm:p-4",children:(0,s.jsx)($,{actions:e.actions,provider:Q,labels:W})}),(0,s.jsx)(g.TableCell,{className:"w-fit whitespace-nowrap text-center px-1 py-2",children:!n&&(0,s.jsxs)(x.DropdownMenu,{children:[(0,s.jsx)(x.DropdownMenuTrigger,{asChild:!0,children:(0,s.jsxs)(p.Button,{"aria-haspopup":"true",size:"icon",variant:"ghost",onClick:e=>e.stopPropagation(),children:[(0,s.jsx)(r.MoreHorizontalIcon,{className:"size-4"}),(0,s.jsx)("span",{className:"sr-only",children:"Toggle menu"})]})}),(0,s.jsxs)(x.DropdownMenuContent,{align:"end",onClick:e=>e.stopPropagation(),children:[!u&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(x.DropdownMenuItem,{onClick:()=>{G.onOpen({ruleId:e.id,editMode:!0})},children:[(0,s.jsx)(a.PenIcon,{className:"mr-2 size-4"}),"Edit manually"]}),(0,s.jsxs)(x.DropdownMenuItem,{onClick:()=>{Y(`I'd like to edit the "${e.name}" rule:
3`),_(e=>[...e,"chat-sidebar"])},children:[(0,s.jsx)(d.SparklesIcon,{className:"mr-2 size-4"}),"Edit via AI"]}),(0,s.jsxs)(x.DropdownMenuItem,{onClick:()=>{G.onOpen({duplicateRule:e})},children:[(0,s.jsx)(c.CopyIcon,{className:"mr-2 size-4"}),"Duplicate"]})]}),(0,s.jsx)(x.DropdownMenuItem,{asChild:!0,children:(0,s.jsxs)(t.default,{href:(0,k.prefixPath)(q,`/automation?tab=history&ruleId=${e.id}`),children:[(0,s.jsx)(l.HistoryIcon,{className:"mr-2 size-4"}),"History"]})}),!e.systemType&&!u&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(x.DropdownMenuSeparator,{}),(0,s.jsxs)(x.DropdownMenuItem,{onClick:async()=>{confirm(`Are you sure you want to delete the rule "${e.name}"?`)&&i.toast.promise(async()=>{let s=await (0,j.deleteRuleAction)(q,{id:e.id});if(s?.serverError||s?.validationErrors)throw Error(s?.serverError||"There was an error deleting your rule");L(s=>s?.filter(s=>s.id!==e.id),{revalidate:!1}),L()},{loading:"Deleting rule...",success:"Rule deleted",error:e=>`Error deleting rule. ${e instanceof Error?e.message:"There was an error deleting your rule"}`,finally:()=>{L()}})},children:[(0,s.jsx)(o.Trash2Icon,{className:"mr-2 size-4"}),"Delete"]})]})]})]})})]},e.id)})})]}):(0,s.jsx)(K,{})})}),(0,s.jsx)(O.RuleDialog,{ruleId:G.data?.ruleId,duplicateRule:G.data?.duplicateRule,isOpen:G.isOpen,onClose:G.onClose,onSuccess:()=>{L(),G.onClose()},editMode:G.data?.editMode})]})}],877081);var W=e.i(632612),G=e.i(728328),q=e.i(456332);function Q({entries:e,processingCount:t=0,paused:i=!1,title:r="Processing Activity",loading:a=!1}){return 0!==e.length||a?(0,s.jsxs)("div",{className:"w-full min-w-0 rounded-lg border bg-muted overflow-hidden",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between border-b px-3 py-2",children:[(0,s.jsx)("h3",{className:"text-sm font-medium",children:r}),t>0&&!i&&(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:[t," processing"]})]}),(0,s.jsx)("div",{className:"max-h-72 overflow-y-auto overflow-x-hidden",children:(0,s.jsxs)("div",{className:"space-y-1 p-2",children:[0===e.length&&a&&(0,s.jsxs)("div",{className:"flex items-center gap-2 px-2 py-3 text-xs text-muted-foreground",children:[(0,s.jsx)(G.LoaderIcon,{className:"h-3.5 w-3.5 animate-spin"}),"Fetching emails..."]}),e.map(e=>(0,s.jsx)(X,{entry:e,paused:i},e.id))]})})]}):null}function X({entry:e,paused:t}){let i="completed"===e.status,r="processing"===e.status&&!t;return(0,s.jsxs)("div",{className:"flex items-start gap-2 rounded px-2 py-1.5 text-xs",children:[i?(0,s.jsx)(W.CheckCircle2Icon,{className:"mt-0.5 h-3.5 w-3.5 flex-shrink-0 text-green-600"}):r?(0,s.jsx)(G.LoaderIcon,{className:"mt-0.5 h-3.5 w-3.5 flex-shrink-0 animate-spin text-blue-600"}):(0,s.jsx)("div",{className:"mt-0.5 h-3.5 w-3.5 flex-shrink-0"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:e.from}),(0,s.jsxs)("span",{className:"flex-shrink-0",children:[e.ruleName&&(0,s.jsx)(v.Badge,{color:i?"green":"gray",children:e.ruleName}),!e.ruleName&&i&&(0,s.jsx)(v.Badge,{color:"yellow",children:"No match"})]})]}),(0,s.jsx)("div",{className:"truncate text-muted-foreground mt-0.5",children:e.subject})]})]})}e.s(["ActivityLog",0,Q,"BulkProcessActivityLog",0,function({threads:e,processedThreadIds:t,aiQueue:i,paused:r,loading:a=!1}
3){let[n,l]=(0,u.useState)([]);(0,u.useEffect)(()=>{a&&l([])},[a]);let o=Array.from(t).map(s=>{let t=e.find(e=>e.id===s);return t?.messages?.[t.messages.length-1]?.id}).filter(e=>!!e).slice(-20),d=n.length>0&&n.every(e=>"completed"===e.status),{data:c}=(0,q.default)(o.length>0&&!d?`/api/user/executed-rules/batch?messageIds=${o.join(",")}`:null,{refreshInterval:2e3*(o.length>0&&!d)});(0,u.useEffect)(()=>{e.length&&l(s=>{let i=new Set(s.map(e=>e.messageId)),r=[];for(let s of t){let t=e.find(e=>e.id===s);if(!t)continue;let a=t.messages?.[t.messages.length-1];if(!a||i.has(a.id))continue;let n=c?.rulesMap[a.id]?.[0];r.push({threadId:t.id,messageId:a.id,from:a.headers.from||"Unknown",subject:a.headers.subject||"(No subject)",status:n?"completed":"processing",ruleName:n?.rule?.name,timestamp:Date.now()}),i.add(a.id)}return 0===r.length?s:[...r,...s].slice(0,50)})},[t,c,e]),(0,u.useEffect)(()=>{c&&l(e=>e.map(e=>{if("completed"===e.status)return e;let s=c.rulesMap[e.messageId]?.[0];return s?{...e,status:"completed",ruleName:s.rule?.name}:e}))},[c]);let m=n.map(e=>{let s=i.has(e.threadId),t="completed"===e.status;return{id:e.messageId,from:e.from,subject:e.subject,status:t?"completed":s?"processing":"waiting",ruleName:e.ruleName}}),p=n.filter(e=>i.has(e.threadId)&&"completed"!==e.status).length;return(0,s.jsx)(Q,{entries:m,processingCount:p,paused:r,loading:a})}],824815)},100929,e=>{"use strict";var s=e.i(806461),t=e.i(259109),i=e.i(731534);i.z.object({licenseKey:i.z.string()}),i.z.enum(["onboarding"]);let r={CHAT:"chat",EMAILS_SORTED:"emailsSorted",DRAFT_REPLIES:"draftReplies",BULK_UNSUBSCRIBE:"bulkUnsubscribe",FEATURES:"features",WHO:"who",COMPANY_SIZE:"companySize",HOW_YOU_HEARD:"howYouHeard",LABELS:"labels",DRAFT:"draft",CUSTOM_RULES:"customRules",INVITE_TEAM:"inviteTeam",INBOX_PROCESSED:"inboxProcessed"},a=[r.EMAILS_SORTED,r.CHAT,r.DRAFT_REPLIES,r.BULK_UNSUBSCRIBE,r.WHO,r.COMPANY_SIZE,r.HOW_YOU_HEARD,r.LABELS,r.DRAFT,r.CUSTOM_RULES,r.INVITE_TEAM,r.INBOX_PROCESSED],n=["welcome",...a],l=[r.WHO,r.COMPANY_SIZE,r.HOW_YOU_HEARD];e.s(["STEP_KEYS",0,r,"getOnboardingStepHref",0,function(e,t,i){let r=new URLSearchParams({step:t});return i?.force&&r.set("force","true"),(0,s.prefixPath)(e,`/onboarding?${r.toString()}`)},"getOnboardingStepIndex",0,function(e,s){if(!e)return 0;let t=Number.parseInt(e,10);if(Number.isFinite(t)){var i,r;let e=n[t-1];if(e&&"welcome"!==e){let t=s.indexOf(e);if(-1!==t)return t}return i=t-1,(r=s.length)<=0?0:Math.min(Math.max(i,0),r-1)}let a=s.indexOf(e);return -1===a?0:a},"getVisibleOnboardingStepKeys",0,function({canInviteTeam:e,autoDraftDisabled:s,isSelfHosted:t}){return a.filter(i=>!(s&&(i===r.DRAFT_REPLIES||i===r.DRAFT)||!e&&i===r.INVITE_TEAM||t&&l.includes(i)))},"isDraftRepliesDisabledByRuleState",0,function(e){let s=e?.find(e=>e.systemType===t.SystemType.TO_REPLY);return!!s&&!s.actions.some(e=>e.type===t.ActionType.DRAFT_EMAIL)},"isOptionalOnboardingStep",0,function(e){return e===r.INVITE_TEAM}],100929)},270209,e=>{"use strict";var s=e.i(982630),t=e.i(310621),i=e.i(683951),r=e.i(452675),a=e.i(769262),n=e.i(466691),l=e.i(323621),o=e.i(603190),d=e.i(891671);e.s(["MultiSelectFilter",0,function({title:e,options:t,selectedValues:c,setSelectedValues:u,maxDisplayedValues:m}){return(0,s.jsxs)(a.Popover,{children:[(0,s.jsx)(a.PopoverTrigger,{asChild:!0,children:(0,s.jsxs)(n.Button,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e,c?.size>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.Separator,{orientation:"vertical",className:"mx-2 h-4"}),(0,s.jsx)(l.Badge,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:c.size}),(0,s.jsx)("div",{className:"hidden space-x-1 lg:flex",children:"number"==typeof m&&c.size>m?(0,s.jsxs)(l.Badge,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[c.size," selected"]}):t.filter(e=>c.has(e.value)).map(e=>(0,s.jsx)(l.Badge,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:e.label},e.value))})]})]})}),(0,s.jsx)(a.PopoverContent,{className:"w-[200px] p-0",align:"start",children:(0,s.jsxs)(d.Command,{children:[(0,s.jsx)(d.CommandInput,{placeholder:e}),(0,s.jsxs)(d.CommandList,{children:[(0,s.jsx)(d.CommandEmpty,{children:"No results found."}),(0,s.jsx)(d.CommandGroup,{children:(0,s.jsx)(d.CommandItem,{onSelect:()=>u(new Set(t.map(e=>e.value))),className:"justify-center text-center",children:"Select all"})}),(0,s.jsx)(d.CommandSeparator,{}),c.size>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.CommandGroup,{children:(0,s.jsx)(d.CommandItem,{onSelect:()=>u(new Set),className:"justify-center text-center",children:"Clear filters"})}),(0,s.jsx)(d.CommandSeparator,{})]}),(0,s.jsx)(d.CommandGroup,{children:t.map(e=>{let t=c.has(e.value);return(0,s.jsxs)(d.CommandItem,{onSelect:()=>{let s=new Set(c);t?s.delete(e.value):s.add(e.value),u(s)},children:[(0,s.jsx)("div",{className:(0,r.cn)("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",t?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:(0,s.jsx)(i.CheckIcon,{className:(0,r.cn)("h-4 w-4")})}
3),e.icon&&(0,s.jsx)(e.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),(0,s.jsx)("span",{children:e.label})]},e.value)})})]})]})})]})},"useMultiSelectFilter",0,function(e){let[s,i]=t.useState(new Set(e));return{selectedValues:s,setSelectedValues:i}}])},356530,e=>{"use strict";var s=e.i(982630),t=e.i(320973),i=e.i(682210),r=e.i(466691),a=e.i(443901),n=e.i(715813),l=e.i(455876),o=e.i(429080),d=e.i(370317),c=e.i(246342),u=e.i(97021);function m({showSetApiKey:e,className:a,tier:n,stripeSubscriptionStatus:u,activeOnly:p}){let{PremiumModal:h,openModal:x}=(0,l.usePremiumModal)();return p&&"trialing"===u?(0,s.jsx)("div",{className:a,children:(0,s.jsx)(d.ActionCard,{icon:(0,s.jsx)(i.CrownIcon,{className:"h-5 w-5"}),title:"Active Subscription Required",description:"This feature is not available during the free trial. Start your paid plan to use it.",action:(0,s.jsx)(c.EndTrialButton,{variant:"primaryBlack"})})}):(0,s.jsxs)("div",{className:a,children:["BASIC_MONTHLY"===n||"BASIC_ANNUALLY"===n?(0,s.jsx)(d.ActionCard,{icon:(0,s.jsx)(i.CrownIcon,{className:"h-5 w-5"}),title:`${o.starterTierName} Plan Required`,description:`Switch to the ${o.starterTierName} plan to use this feature.`,action:(0,s.jsx)(r.Button,{variant:"primaryBlack",onClick:x,children:"Switch Plan"})}):e?(0,s.jsx)(d.ActionCard,{icon:(0,s.jsx)(i.CrownIcon,{className:"h-5 w-5"}),title:"API Key Required",description:"You need to set an AI API key to use this feature.",action:(0,s.jsx)(r.Button,{variant:"primaryBlack",asChild:!0,children:(0,s.jsx)(t.default,{href:"/settings",children:"Set API Key"})})}):(0,s.jsx)(d.ActionCard,{icon:(0,s.jsx)(i.CrownIcon,{className:"h-5 w-5"}),title:"Premium Feature",description:`This is a premium feature. Upgrade to the ${o.starterTierName} plan.`,action:(0,s.jsx)(r.Button,{variant:"primaryBlack",onClick:x,children:"Upgrade"})}),(0,s.jsx)(h,{})]})}function p({openModal:e}){return(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsxs)("p",{children:["You","'","ve hit the free tier limit 🥺"]}),(0,s.jsx)("p",{children:"Upgrade to unlock full access."}),(0,s.jsx)(r.Button,{className:"mt-1",onClick:e,size:"xs",children:"Upgrade"})]})}e.s(["PremiumAiAssistantAlert",0,m,"PremiumAlertWithData",0,function({className:e,activeOnly:t}){let{hasAiAccess:i,isLoading:r,isProPlanWithoutApiKey:n,tier:l,premium:o}=(0,a.usePremium)(),d=t&&!(0,u.isActivePremium)(o);return r||i&&!d?null:(0,s.jsx)(m,{showSetApiKey:n,className:e,tier:l,stripeSubscriptionStatus:o?.stripeSubscriptionStatus||null,activeOnly:t})},"PremiumTooltip",0,function(e){return e.showTooltip?(0,s.jsx)(n.Tooltip,{contentComponent:(0,s.jsx)(p,{openModal:e.openModal}),children:(0,s.jsx)("span",{children:e.children})}):e.children},"PremiumTooltipContent",0,p])},744839,e=>{"use strict";var s=e.i(982630),t=e.i(509855),i=e.i(370317);e.s(["SettingCard",0,function({title:e,description:r,right:a,collapseOnMobile:n=!1}){return(0,s.jsx)(i.Card,{children:(0,s.jsx)(i.CardContent,{className:"p-4",children:(0,s.jsxs)("div",{className:n?"flex flex-col gap-4 md:flex-row md:items-center":"flex items-center gap-4",children:[(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("h3",{className:"font-medium",children:e}),(0,s.jsx)(t.MutedText,{children:r})]}),a]})})})}])},589422,e=>{"use strict";var s=e.i(982630),t=e.i(310621),i=e.i(350102),r=e.i(45027),a=e.i(813),n=e.i(370317),l=e.i(282879),o=e.i(466691),d=e.i(509855),c=e.i(305103),u=e.i(573683),m=e.i(427185);let p=t.default.forwardRef(({className:e,icon:m,title:p,description:h,videoSrc:x,thumbnailSrc:g,muxPlaybackId:f,youtubeVideoId:j,analytics:y,onClose:b,...N},v)=>{let[A,C]=(0,t.useState)(!1),T=e=>{C(!0),y.trackOpened({trigger:e})};return(0,s.jsx)(n.CardGreen,{ref:v,className:e,...N,children:(0,s.jsxs)("div",{className:"relative",children:[b&&(0,s.jsx)("button",{type:"button",onClick:b,"aria-label":"Close",className:"absolute top-3 right-3 z-10 p-1.5 rounded-full hover:bg-green-50 dark:hover:bg-green-900/20 transition-colors duration-200",children:(0,s.jsx)(a.X,{className:"w-4 h-4 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"})}),(0,s.jsxs)("div",{className:"flex items-center justify-between gap-6 p-6 pr-12",children:[(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[m&&(0,s.jsx)("div",{className:"mt-0.5 flex-shrink-0 text-green-600 dark:text-green-400",children:m}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold",children:p}),(0,s.jsx)(d.MutedText,{className:"mt-1",children:h}),(0,s.jsx)(o.Button,{className:"mt-3",size:"sm",variant:"primaryBlack",onClick:()=>T("button"),Icon:r.PlayIcon,children:"Watch Video"})]})]}),(0,s.jsx)("div",{className:"hidden md:flex items-center gap-3 flex-shrink-0",children:(0,s.jsxs)(l.Dialog,{open:A,onOpenChange:C,children:[(0,s.jsx)(l.DialogTrigger,{asChild:!0,children:(0,s.jsx)("button",{type:"button","aria-label":"Play video",onClick:()=>T("thumbnail"),className:"group relative cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-green-500 focus-visible:ring-offset-2 rounded-lg overflow-hidden",children:(0,s.jsxs)("div",{className:"relative w-32 h-20 rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-800",children:[(0,s.jsx)(i.default,{src:f?`https://image.mux.com/${f}/thumbnail.jpg`:g||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=",alt:p,fill:!0,className:"object-cover transition-all duration-200 group-hover:scale-105",sizes:"(max-width: 128px) 100vw, 128px"}),(0,s.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-black/20 group-hover:bg-black/30 transition-colors duration-200",children:(0,s.jsx)("div",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-white/90 group-hover:bg-white transition-colors duration-200",children:(0,s.jsx)(r.PlayIcon,{className:"size-3 text-gray-800 fill-current ml-0.5"})})})]})})}),(0,s.jsxs)(l.DialogContent,{className:"max-w-6xl border-0 bg-transparent p-0 overflow-hidden",children:[(0,s.jsxs)(l.DialogTitle,{className:"sr-only",children:["Video: ",p]}),(0,s.jsx)("div",{className:"relative aspect-video w-full overflow-hidden rounded-lg",children:f?(0,s.jsx)(c.MuxVideo,{playbackId:f,className:"size-full rounded-lg",playerClassName:"size-full rounded-lg",playerStyle:{overflow:"hidden"},title:p,autoPlay:!0,onVideoCompleted:y.trackCompleted,onVideoProgress:y.trackProgress,onVideoStarted:y.trackStarted}):j?(0,s.jsx)(u.YouTubeVideo,{videoId:j,title:`Video: ${p}`,onVideoCompleted:y.trackCompleted,onVideoProgress:y.trackProgress,onVideoStarted:y.trackStarted,opts:{playerVars:{autoplay:1}}}):(0,s.jsx)("iframe",{src:`${x}
3${x?.includes("?")?"&":"?"}autoplay=1&rel=0`,className:"size-full rounded-lg",title:`Video: ${p}`,allowFullScreen:!0,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"})})]})]})})]})]})})});p.displayName="ActionCard",e.s(["DismissibleVideoCard",0,function({storageKey:e,videoAnalytics:i,...r}){let[a,n]=(0,t.useState)(!0),[l,o]=(0,t.useState)(!1),d=(0,t.useRef)(!1),c=(0,m.useVideoAnalytics)(i?{...r.muxPlaybackId?{muxPlaybackId:r.muxPlaybackId}:{youtubeVideoId:r.youtubeVideoId},page:i.page,surface:i.surface,title:i.title??r.title}:void 0);return((0,t.useEffect)(()=>{n("true"!==localStorage.getItem(e)),o(!0)},[e]),(0,t.useEffect)(()=>{l&&a&&!d.current&&(d.current=!0,c.trackViewed())},[l,a,c]),l&&a)?(0,s.jsx)(p,{...r,analytics:c,onClose:()=>{n(!1),localStorage.setItem(e,"true"),c.trackDismissed()}}):null},"VideoCard",0,p])}]);
4
5//# debugId=54f66048-415c-381b-f71f-742a24496319

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.