import{cn as e,N as t,u as n,af as s,h as o,bZ as r,eb as a}from"./c6eedc03a-C8LSdtro.js";import{j as i}from"./vendor-react-AXa6hZO5.js";import{u as l,M as c}from"./vendor-intl-BdADXLLt.js";import{aJ as d}from"./c365fd3fe-Dmpsm876.js";import{B as m}from"./c70a3d12b-BI7Bbafv.js";const u=".claudemcpcontent.com",g=/^([0-9a-f]{32})\.claudemcpcontent\.com$/i;async function p(e){const t=(new TextEncoder).encode(e),n=await globalThis.crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,"0")).join("").slice(0,32)}async function f(e,t){return p(e+t)}class b extends Error{constructor(){super(...arguments),this.name="DomainValidationError"}}class x extends b{constructor(){super(...arguments),this.name="UiDomainLocalConnectorError"}}class h extends b{constructor(){super(...arguments),this.name="UiDomainFormatError"}}class w extends b{constructor(){super(...arguments),this.name="UiDomainMismatchError"}}async function y(e,t){if(!t)throw new x("ui.domain cannot be used with local connectors. Stable sandbox origins require a remote connector with a verified URL.");const n=e.toLowerCase().match(g);if(!n)throw k(t),new h(`Invalid ui.domain format: expected "{hash}.claudemcpcontent.com", got "${e}".`);const s=n[1],o=await async function(e){return p(e)}(t);if(s!==o)throw k(t),new w(`ui.domain mismatch: expected "${o}${u}", but got "${e}".`);return s}function k(t){const n=e(t)??"<unparseable URL>";console.error(`[mcp-ext-apps-host] ui.domain validation failed for connector "${n}". Compute the expected ui.domain by substituting your full connector URL into: node -e "console.log(require('crypto').createHash('sha256').update('<YOUR_CONNECTOR_URL>').digest('hex').slice(0,32)+'.claudemcpcontent.com')"`)}function v(e,t,n){const s=new URL(e.href);if(M(s))return s;const o=n?`staging-${t}`:t,r=s.hostname.split(".");return r.length>=2&&(r[0]=o,s.hostname=r.join(".")),s}function j(e,t,n){const s=new URL(e.href);if(M(s))return s;const o=n?`staging-${t}`:t,r=s.hostname.split(".");return r.length>=2&&(r[0]=o,s.hostname=r.join(".")),s}function M(e){return!e.hostname.endsWith(u)}const C=({resumeDate:e,isOpen:u,onClose:g,onSuccess:p})=>{const{addSuccess:f}=t(),b=l(),{mutate:x,isPending:h}=d({onSuccess:()=>{f(b.formatMessage({defaultMessage:"Subscription renewed",id:"samhQZ9Nkv"})),g(),p?.()}}),{activeOrganization:w}=n(),y=(({hasRaven:e,isEnterprise:t,hasMaxPlan:n,resumeDate:s,organizationName:o})=>e?i.jsx(c,{defaultMessage:"You are about to renew the {planName} for {organizationName}. This will restore full Claude access to all members in your plan.",id:"vf27F8zZt9",values:{planName:t?"Enterprise plan":"Team plan",organizationName:o}}):n?s?i.jsx(c,{defaultMessage:"You will keep access to Claude Max and your next charge will be processed on {resumeDate}.",id:"k/M5MB6alw",values:{resumeDate:s}}):i.jsx(c,{defaultMessage:"You will keep access to Claude Max.",id:"QT3I5DF5bv"}):s?i.jsx(c,{defaultMessage:"You will keep access to Claude Pro and your next charge will be processed on {resumeDate}.",id:"oG/X72WR2w",values:{resumeDate:s}}):i.jsx(c,{defaultMessage:"You will keep access to Claude Pro.",id:"Q+vrGka0/y"}))({hasRaven:s(),isEnterprise:o(),hasMaxPlan:r(),resumeDate:e,organizationName:w?.name});return i.jsx(a,{isOpen:u,onClose:g,title:b.formatMessage({defaultMessage:"Renew subscription",id:"FoHB5ctPGM"}),actions:i.jsxs(i.Fragment,{children:[i.jsx(m,{type:"button",variant:"secondary",disabled:h,onClick:()=>g(),children:i.jsx(c,{defaultMessage:"Go back",id:"orvpWhO3rI"})}),i.jsx(m,{type:"submit",variant:"primary",busy:h,onClick:()=>x(),children:i.jsx(c,{defaultMessage:"Renew subscription",id:"FoHB5ctPGM"})})]}),children:i.jsx("p",{children:y})})},$=Object.freeze(Object.defineProperty({__proto__:null,ResumeModal:C},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 E={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{blockComment:["###","###"],lineComment:"#"},folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}};const S=Object.freeze(Object.defineProperty({__proto__:null,conf:E,language:{defaultToken:"",ignoreCase:!1,tokenPostfix:".mips",regEx:/\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,keywords:[".data",".text","syscall","trap","add","addu","addi","addiu","and","andi","div","divu","mult","multu","nor","or","ori","sll","slv","sra","srav","srl","srlv","sub","subu","xor","xori","lhi","lho","lhi","llo","slt","slti","sltu","sltiu","beq","bgtz","blez","bne","j","jal","jalr","jr","lb","lbu","lh","lhu","lw","li","la","sb","sh","sw","mfhi","mflo","mthi","mtlo","move"],symbols:/[\.,\:]+/,escapes:/\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/\$[a-zA-Z_]\w*/,"variable.predefined"],[/[.a-zA-Z_]\w*/,{cases:{this:"variable.predefined","@keywords":{token:"keyword.$0"},"@default":""}}],[/[ \t\r\n]+/,""],[/#.*$/,"comment"],["///",{token:"regexp",next:"@hereregexp"}],[/^(\s*)(@regEx)/,["","regexp"]],[/(\,)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\:)(\s*)(@regEx)/,["delimiter","","regexp"]],[/@symbols/,"delimiter"],[/\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/0[0-7]+(?!\d)/,"number.octal"],[/\d+/,"number"],[/[,.]/,"delimiter"],[/"""/,"string",'@herestring."""'],[/'''/,"string","@herestring.'''"],[/"/,{cases:{"@eos":"string","@default":{token:"string",next:'@string."'}}}],[/'/,{cases:{"@eos":"string","@default":{token:"string",next:"@string.'"}}}]],string:[[/[^"'\#\\]+/,"string"],[/@escapes/,"string.escape"],[/\./,"string.escape.invalid"],[/\./,"string.escape.invalid"],[/#{/,{cases:{'$S2=="':{token:"string",next:"root.interpolatedstring"},"@default":"string"}}],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}],[/#/,"string"]],herestring:[[/("""|''')/,{cases:{"$1==$S2":{token:"string",next:"@pop"},"@default":"string"}}],[/[^#\\'"]+/,"string"],[/['"]+/,"string"],[/@escapes/,"string.escape"],[/\./,"string.escape.invalid"],[/#{/,{token:"string.quote",next:"root.interpolatedstring"}],[/#/,"string"]],comment:[[/[^#]+/,"comment"],[/#/,"comment"]],hereregexp:[[/[^\\\/#]+/,"regexp"],[/\\./,"regexp"],[/#.*$/,"comment"],["///[igm]*",{token:"regexp",next:"@pop"}],[/\//,"regexp"]]}}},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 _=Object.freeze(Object.defineProperty({__proto__:null,conf:{comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},language:{defaultToken:"",tokenPostfix:".aes",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["contract","library","entrypoint","function","stateful","state","hash","signature","tuple","list","address","string","bool","int","record","datatype","type","option","oracle","oracle_query","Call","Bits","Bytes","Oracle","String","Crypto","Address","Auth","Chain","None","Some","bits","bytes","event","let","map","private","public","true","false","var","if","else","throw"],operators:["=",">","<","!","~","?","::",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,integersuffix:/(ll|LL|u|U|l|L)?(ll|LL|u|U|l|L)?/,floatsuffix:/[fFlL]?/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/\[\[.*\]\]/,"annotation"],[/^\s*#\w+/,"keyword"],[/int\d*/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}}},Symbol.toStringTag,{value:"Module"}));export{C as R,j as a,v as b,f as c,$ as d,S as m,_ as s,y as v};
