import{j as e}from"./vendor-react-AXa6hZO5.js";import{b as t,e as s,w as o,u as r,ag as a,$ as i}from"./c6eedc03a-C8LSdtro.js";import{D as n}from"./vendor-luxon-Y8l99kBI.js";import{u as l,M as d}from"./vendor-intl-BdADXLLt.js";import{Em as c}from"./index-D35RxkWr.js";import{M as m}from"./c606eaf84-D3GqXef8.js";const p=[{key:"cowork",href:"https://claude.com/product/cowork",title:e.jsx(d,{defaultMessage:"Cowork",id:"xi2NxiZh10"}),subtitle:e.jsx(d,{defaultMessage:"Hand off tasks to Claude so you can focus on other work.",id:"BamLJxwxTM"})},{key:"claude_code",href:"https://claude.com/product/claude-code",title:e.jsx(d,{defaultMessage:"Claude Code",id:"vKMj39KhGw"}),subtitle:e.jsx(d,{defaultMessage:"Build, debug, and ship by describing what you need.",id:"mUV32KPrRR"})},{key:"office",href:"https://claude.com/claude-in-excel",title:e.jsx(d,{defaultMessage:"Microsoft Office",id:"lnSx2ahO9a"}),subtitle:e.jsx(d,{defaultMessage:"Analyze data and build slides with Claude alongside you.",id:"7NDZA/bFon"})},{key:"chrome",href:"https://claude.com/chrome",title:e.jsx(d,{defaultMessage:"Chrome",id:"sS42/B0p76"}),subtitle:e.jsx(d,{defaultMessage:"Claude navigates, clicks buttons, and fills forms in your browser.",id:"imJkk+xTs0"})}];function u({windowName:t,resetTime:s,resetDay:o}){return s&&o?"5h"===t?e.jsx(d,{defaultMessage:"You hit your 5-hour message limit. It resets at {resetTime}, or you can upgrade for higher limits.",id:"j/5+o6pC9/",values:{resetTime:s}}):"7d"===t||"7d_cowork"===t?e.jsx(d,{defaultMessage:"You hit your weekly message limit. It resets at {resetTime} on {resetDay}, or you can upgrade for higher limits.",id:"kYamB10LLL",values:{resetTime:s,resetDay:o}}):"7d_opus"===t?e.jsx(d,{defaultMessage:"You hit your weekly Opus limit. It resets at {resetTime} on {resetDay}, or you can upgrade for higher limits.",id:"v7iKOdJf1d",values:{resetTime:s,resetDay:o}}):e.jsx(d,{defaultMessage:"You hit your message limit. It resets at {resetTime}, or you can upgrade for higher limits.",id:"mBWwywBmIh",values:{resetTime:s}}):e.jsx(d,{defaultMessage:"You hit your message limit. Upgrade for higher limits.",id:"KMY0kyX5io"})}const g=Object.freeze(Object.defineProperty({__proto__:null,MessageLimitUpsellModal:function({onClose:g}){const f=t(),h=s(),x=l(),{resolvedMode:y}=o(),b="dark"===y?"dark":"light",{messageLimit:k}=r(),w="exceeded_limit"===k?.type||"approaching_limit"===k?.type&&0===k.remaining,{windowName:v,status:j}=w?c(k.windows):{windowName:null,status:null},_=w?j?.resets_at??k.resetsAt:void 0,M=_?n.fromSeconds(_):void 0,N=M?.toLocaleString(n.TIME_SIMPLE),C=M?.toLocaleString({month:"short",day:"numeric"}),T=()=>{h.track({event_key:"apps.message_limit_modal_dismissed",variant:"visual"}),g()};return e.jsx(a.Root,{open:!0,onOpenChange:e=>!e&&T(),children:e.jsxs(a.Popup,{unstyled:!0,"aria-describedby":void 0,className:"fixed inset-0 m-auto h-fit max-h-[calc(100dvh-2rem)] w-[calc(100vw-2rem)] max-w-[460px] overflow-hidden rounded-2xl bg-bg-000 shadow-xl focus:outline-none md:max-w-4xl",children:[e.jsx("div",{className:"absolute top-4 right-4",children:e.jsx(a.Close,{render:e.jsx(i,{variant:"ghost",size:"sm",iconOnly:!0,icon:"X",className:"text-text-400 hover:text-text-200","aria-label":x.formatMessage({defaultMessage:"Close",id:"rbrahOGMC3"}),tooltip:!1})})}),e.jsxs("div",{className:"p-6 flex flex-col gap-6",children:[e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(a.Title,{render:e.jsx("h1",{className:"font-title"}),children:e.jsx(d,{defaultMessage:"Upgrade to keep chatting",id:"g5s0TZIjoN"})}),e.jsx("p",{className:"text-text-300 font-base",children:e.jsx(u,{windowName:v,resetTime:N,resetDay:C})}),e.jsx("p",{className:"text-text-300 font-base",children:e.jsx(d,{defaultMessage:"Plus, get more ways to use Claude:",id:"VfAnd0eFYk"})})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"flex flex-col md:grid md:grid-cols-4 gap-4 px-2 -mx-2 max-h-[40vh] md:max-h-none overflow-y-auto md:overflow-visible",children:p.map(t=>e.jsx(m,{title:t.title,subtitle:t.subtitle,href:t.href,illustrationSrc:`/images/feature-preview/message-limit/${t.key}_${b}.svg`,onClick:()=>(e=>{h.track({event_key:"apps.message_limit_tile_clicked",tile:e})})(t.key)},t.key))}),e.jsx("div",{className:"md:hidden pointer-events-none absolute -inset-x-2 bottom-0 h-10 bg-gradient-to-t from-bg-000 to-transparent"})]}),e.jsxs("div",{className:"flex flex-col-reverse md:flex-row md:justify-end gap-2",children:[e.jsx(i,{variant:"secondary",onClick:T,children:e.jsx(d,{defaultMessage:"Not now",id:"dUCA4Khx0S"})}),e.jsx(i,{variant:"primary",onClick:()=>{h.track({event_key:"apps.message_limit_modal_upgrade_clicked",variant:"visual"}),g(),f.push("/upgrade?from=ratelimit")},children:e.jsx(d,{defaultMessage:"Explore plans",id:"BB6lTqQOLY"})})]})]})]})})}},Symbol.toStringTag,{value:"Module"}));
/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
 * Released under the MIT license
 * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
 *-----------------------------------------------------------------------------*/var f={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["{","}"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\{\\$REGION(\\s\\'.*\\')?\\}"),end:new RegExp("^\\s*\\{\\$ENDREGION\\}")}}};const h=Object.freeze(Object.defineProperty({__proto__:null,conf:f,language:{defaultToken:"",tokenPostfix:".pascal",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["absolute","abstract","all","and_then","array","as","asm","attribute","begin","bindable","case","class","const","contains","default","div","else","end","except","exports","external","far","file","finalization","finally","forward","generic","goto","if","implements","import","in","index","inherited","initialization","interrupt","is","label","library","mod","module","name","near","not","object","of","on","only","operator","or_else","otherwise","override","package","packed","pow","private","program","protected","public","published","interface","implementation","qualified","read","record","resident","requires","resourcestring","restricted","segment","set","shl","shr","specialize","stored","strict","then","threadvar","to","try","type","unit","uses","var","view","virtual","dynamic","overload","reintroduce","with","write","xor","true","false","procedure","function","constructor","destructor","property","break","continue","exit","abort","while","do","for","raise","repeat","until"],typeKeywords:["boolean","double","byte","integer","shortint","char","longint","float","string"],operators:["=",">","<","<=",">=","<>",":",":=","and","or","+","-","*","/","@","&","^","%"],symbols:/[=><:@\^&|+\-*\/\^%]+/,tokenizer:{root:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\$[0-9a-fA-F]{1,16}/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'/,"string","@string"],[/'[^\\']'/,"string"],[/'/,"string.invalid"],[/\#\d+/,"string"]],comment:[[/[^\*\}]+/,"comment"],[/\}/,"comment","@pop"],[/[\{]/,"comment"]],string:[[/[^\\']+/,"string"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\{/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}},Symbol.toStringTag,{value:"Module"}));
/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
 * Released under the MIT license
 * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
 *-----------------------------------------------------------------------------*/const x=Object.freeze(Object.defineProperty({__proto__:null,conf:{comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},language:{defaultToken:"",tokenPostfix:".r",roxygen:["@alias","@aliases","@assignee","@author","@backref","@callGraph","@callGraphDepth","@callGraphPrimitives","@concept","@describeIn","@description","@details","@docType","@encoding","@evalNamespace","@evalRd","@example","@examples","@export","@exportClass","@exportMethod","@exportPattern","@family","@field","@formals","@format","@import","@importClassesFrom","@importFrom","@importMethodsFrom","@include","@inherit","@inheritDotParams","@inheritParams","@inheritSection","@keywords","@md","@method","@name","@noMd","@noRd","@note","@param","@rawNamespace","@rawRd","@rdname","@references","@return","@S3method","@section","@seealso","@setClass","@slot","@source","@template","@templateVar","@title","@TODO","@usage","@useDynLib"],constants:["NULL","FALSE","TRUE","NA","Inf","NaN","NA_integer_","NA_real_","NA_complex_","NA_character_","T","F","LETTERS","letters","month.abb","month.name","pi","R.version.string"],keywords:["break","next","return","if","else","for","in","repeat","while","array","category","character","complex","double","function","integer","list","logical","matrix","numeric","vector","data.frame","factor","library","require","attach","detach","source"],special:["\\n","\\r","\\t","\\b","\\a","\\f","\\v","\\'",'\\"',"\\\\"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@numbers"},{include:"@strings"},[/[{}\[\]()]/,"@brackets"],{include:"@operators"},[/#'$/,"comment.doc"],[/#'/,"comment.doc","@roxygen"],[/(^#.*$)/,"comment"],[/\s+/,"white"],[/[,:;]/,"delimiter"],[/@[a-zA-Z]\w*/,"tag"],[/[a-zA-Z]\w*/,{cases:{"@keywords":"keyword","@constants":"constant","@default":"identifier"}}]],roxygen:[[/@\w+/,{cases:{"@roxygen":"tag","@eos":{token:"comment.doc",next:"@pop"},"@default":"comment.doc"}}],[/\s+/,{cases:{"@eos":{token:"comment.doc",next:"@pop"},"@default":"comment.doc"}}],[/.*/,{token:"comment.doc",next:"@pop"}]],numbers:[[/0[xX][0-9a-fA-F]+/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?/,"number"]],operators:[[/<{1,2}-/,"operator"],[/->{1,2}/,"operator"],[/%[^%\s]+%/,"operator"],[/\*\*/,"operator"],[/%%/,"operator"],[/&&/,"operator"],[/\|\|/,"operator"],[/<</,"operator"],[/>>/,"operator"],[/[-+=&|!<>^~*/:$]/,"operator"]],strings:[[/'/,"string.escape","@stringBody"],[/"/,"string.escape","@dblStringBody"]],stringBody:[[/\\./,{cases:{"@special":"string","@default":"error-token"}}],[/'/,"string.escape","@popall"],[/./,"string"]],dblStringBody:[[/\\./,{cases:{"@special":"string","@default":"error-token"}}],[/"/,"string.escape","@popall"],[/./,"string"]]}}},Symbol.toStringTag,{value:"Module"}));export{g as M,h as p,x as r};
