1import{d as b,c as i,a as d,h as u,u as l,E as p,_,b as n,o as c,j as v,t as k}from"./Dd52NiWU.js";import{_ as w}from"./4lYTP0BH.js";const x=b({__name:"Button",props:{fields:{}},setup(f){const e=f,h=r=>{if(o.value&&e.fields.link?.cached_url){r.preventDefault();const t=e.fields.link?.cached_url.split("#")[1];if(!t)return;const s=document.getElementById(t);s&&(s.scrollIntoView({behavior:"smooth",block:"start"}),window.history.pushState(null,"",e.fields.link?.cached_url))}},m=i(()=>e.fields.link?.cached_url&&y(e.fields.link?.cached_url)),a=i(()=>e.fields.link?.cached_url&&e.fields.link?.cached_url.startsWith("http")&&!e.fields.link?.cached_url.startsWith("https://www.benchmarkminerals.com")||e.fields.link?.target==="_blank"),o=i(()=>!a.value&&e.fields.link?.cached_url&&!g(e.fields.link.cached_url)&&e.fields.link?.cached_url.includes("#")),y=r=>/\/[^/?#]+\.[^/?#]+(?=([?#]|$))/i.test(r),g=r=>/^[a-z][a-z\d+\-.]*:|^\/\//i.test(r);return(r,t)=>e.fields.label?(c(),d(_,{key:0,href:e.fields.link?.cached_url,class:p(["pointer-events-auto inline-flex cursor-pointer items-center justify-center gap-2 overflow-hidden font-semibold whitespace-nowrap text-sm min-w-[100px] rounded-sm transition-colors duration-300 [&_svg]:pointer-events-none [&_svg]:shrink-0",{"bg-yellow hover:bg-yellow-700 active:bg-yellow-800 text-black":e.fields.theme==="primary","border-2 border-yellow bg-white/75 hover:bg-yellow-50 hover:border-yellow-700 active:bg-grey-100 active:border-yellow-800 border-solid text-black":e.fields.theme==="secondary","border-2 border-yellow bg-[rgba(35,_37,_44,_0.75)] hover:bg-grey-600 hover:border-yellow-700 active:bg-grey-900 active:border-yellow-800 border-solid text-white":e.fields.theme==="secondary-dark","border-2 border-grey-300 hover:bg-grey-700 hover:border-grey-700 active:bg-grey-600 active:border-grey-600 border-solid text-black hover:text-white active:text-white":e.fields.theme==="tertiary","border-2 border-transparent text-grey-900 hover:bg-grey-100 hover:border-grey-100 active:bg-grey-500 active:border-grey-500":e.fields.theme==="quaternary","py-1.5 px-4.5 [&_svg]:size-4":e.fields.size==="small"&&e.fields.theme==="primary","py-1 px-4 [&_svg]:size-4":e.fields.size==="small"&&(e.fields.theme==="secondary"||e.fields.theme==="secondary-dark"||e.fields.theme==="tertiary"||e.fields.theme==="quaternary"),"py-2.5 px-4.5 [&_svg]:size-5":e.fields.size==="regular"&&e.fields.theme==="primary","py-2 px-4 [&_svg]:size-5":e.fields.size==="regular"&&(e.fields.theme==="secondary"||e.fields.theme==="secondary-dark"||e.fields.theme==="tertiary"||e.fields.theme==="quaternary"),"py-3.5 px-4.5 [&_svg]:size-5":e.fields.size==="large"&&e.fields.theme==="primary","py-3 px-4 [&_svg]:size-5":e.fields.size==="large"&&(e.fields.theme==="secondary"||e.fields.theme==="secondary-dark"||e.fields.theme==="tertiary"||e.fields.theme==="quaternary"),"flex-row-reverse":e.fields.iconName&&e.fields.iconPosition==="left"}]),target:l(m)||l(a)?"_blank":void 0,onClick:t[0]||(t[0]=s=>l(o)&&h(s))},{default:u(()=>[v(k(e.fields.label)+" ",1),e.fields.iconName?(c(),d(w,{key:0,name:e.fields.iconName},null,8,["name"])):n("",!0)]),_:1},8,["href","class","target"])):n("",!0)}}),C=Object.assign(x,{__name:"DesignButton"});export{C as default};
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.