import{o as e}from"./rolldown-runtime-iuO8RvI4.js";import{Vt as t}from"./shared-0-C4kdVF7Y.js";import{Mi as s}from"./vendor-frame-CwiylG4Y.js";import{Dh as r,Pm as o}from"./shared-1-3-6x7RKF.js";import{rn as n}from"./vendor-all-2-BJdkbLSj.js";import{Sc as a}from"./shared-5-UQAFGbWu.js";import{ql as i}from"./shared-2-CMUBhYOn.js";var m=/^[a-z][a-z0-9+.-]*:$/,c=new Set(["http:","https:","file:","ftp:","ftps:","data:","javascript:","vbscript:","blob:","filesystem:","jar:","content:","res:","app:","mailto:","tel:","sms:","ws:","wss:","intent:","android-app:","about:","view-source:","resource:","chrome:","chrome-extension:","moz-extension:","safari-web-extension:","ms-browser-extension:","edge:","opera:","brave:","vivaldi:","smb:","search-ms:","search:","ms-search:","shell:","itms:","itms-apps:","itmss:","itms-appss:","itms-beta:","itms-services:","macappstore:","market:","ms-appinstaller:","ms-msdt:","ms-settings:","ms-windows-store:","ms-officecmd:","callto:","facetime:","facetime-audio:","claude:","claude-dev:","claude-nest:","claude-nest-dev:","claude-nest-prod:"]);function l(e,t){if(a(e))return{decision:"open",safeHref:new URL(e).href,skipConfirmation:!0};const s=function(e,t){if(!t?.length)return!1;let s;try{s=new URL(e)}catch{return!1}const r=s.protocol.toLowerCase(),o=s.hostname.toLowerCase();return t.some(e=>{const t=e.trim();if(!t)return!1;if(t.includes("://")){let e;try{e=new URL(t)}catch{return!1}if("https:"!==e.protocol.toLowerCase())return!1;const s=e.hostname.toLowerCase();return!!s&&"https:"===r&&o===s}let s=t.toLowerCase();return s.endsWith(":")||(s+=":"),!s.includes(".")&&!!m.test(s)&&!c.has(s)&&r===s})}(e,t),o=function(e){try{const t=new URL(e).protocol;return"mailto:"===t||"tel:"===t||"sms:"===t}catch{return!1}}(e),n=r(e)??(s||o?new URL(e).href:null);return null===n?{decision:"reject"}:{decision:"open",safeHref:n,skipConfirmation:s}}var p=e(s());function f(e){const s=n(),r=t(e=>e.isLoaded);return(0,p.useMemo)(()=>{if("visualize"!==e)return;if(!r)return;const t=e=>o({id:e,intl:s});return{clipLabel:t("sdrzkm"),grabLabel:t("138kpua"),grabSvgLabel:t("9c6gxj"),pngLabel:t("1nmzzh"),clipDone:t("enr2hs"),grabDone:t("f0cwdg")}},[s,e,r])}export{l as n,f as t};