PageSourceSearch

https://www.crownandcaliber.com/assets/ActionMenu-BlbvXKr9.js

js crownandcaliber.com collected 2026-09-24 08:58:06 UTC 4,868 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="57a43327-0977-50f9-bb5e-23f86be287ce")}catch(e){}}();
3import{s as e,t}from"./jsx-runtime-D4ePz0Hl.js";import{t as n}from"./react-BXH-GOAS.js";import{n as r}from"./components-CDo3yjgw.js";import{t as i}from"./useTranslation-xRzBcOIb.js";import{t as a}from"./classnames-B9Sa-P4w.js";import{n as o,t as s}from"./transition-B4qu-R77.js";import{t as c}from"./menu-D3zdtnSb.js";import{t as l}from"./XMarkIcon-DmEhIDFO.js";import{_ as u,b as d,g as f,p,r as m,s as h}from"./floating-ui.react-SnMdqaDc.js";import{n as g,t as _}from"./BottomSheetDialog-DcPGSOIu.js";import{t as v}from"./glass-yXlLgR17.js";var y=e(n());function b({title:e,titleId:t,...n},r){return y.createElement(`svg`,Object.assign({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:1.5,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`,ref:r,"aria-labelledby":t},n),e?y.createElement(`title`,{id:t},e):null,y.createElement(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M6.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM12.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM18.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z`}))}var x=y.forwardRef(b),S=e(a(),1),C=e(t(),1),w=`inline-flex items-center justify-center size-8 rounded-full hover:bg-black/5 transition-colors`,T=`flex items-center w-full gap-4 h-16 px-5 text-base font-normal leading-6 whitespace-nowrap`,E=`flex w-full items-center gap-2 h-10 px-4 text-left text-sm font-medium leading-[14px] tracking-[-0.14px] whitespace-nowrap`,D=`flex items-center justify-center size-4 shrink-0`,O=e=>e.type===`divider`,k=e=>e.some(e=>!O(e)),A=({items:e,triggerIcon:t,triggerIconClassName:n,triggerLabel:r=`More options`,triggerVariant:a=`default`,trigger:b,triggerClassName:D,menuTitle:A,className:N,placement:P=`bottom-end`,alignmentOffset:F=0})=>{let{t:I}=i(),L=g(),[R,z]=(0,y.useState)(!1),{refs:B,floatingStyles:V}=h({placement:P,middleware:[f({mainAxis:8,alignmentAxis:F}),p(),u({padding:8})],whileElementsMounted:d});if(!k(e))return null;let H=t??x,U=a===`glass`?v:w,W=n??(a===`glass`?`size-4`:`size-6`),G=b?D??``:U,K=b??(0,C.jsx)(H,{className:W});return L?(0,C.jsxs)(`div`,{className:N,children:[(0,C.jsx)(`button`,{type:`button`,className:G,"aria-label":r,onClick:()=>z(!0),children:K}),(0,C.jsxs)(_,{isOpen:R,onClose:()=>z(!1),children:[(0,C.jsxs)(`div`,{className:`relative flex items-center justify-center px-5 pt-5 pb-2`,children:[(0,C.jsx)(o.Title,{className:`text-base font-semibold text-black`,children:A??I(`community.action_menu.actions`,`Actions`)}),(0,C.jsx)(`button`,{type:`button`,className:`absolute right-5 flex items-center justify-center size-8 rounded-full hover:bg-black/5`,onClick:()=>z(!1),"aria-label":`Close`,children:(0,C.jsx)(l,{className:`size-5 text-black/50`})})]}),(0,C.jsx)(`div`,{className:`flex flex-col pb-2`,children:e.map(e=>O(e)?(0,C.jsx)(M,{item:e},e.key):(0,C.jsx)(j,{item:e,base:T,onAfterClick:()=>z(!1)},e.key))})]})]}):(0,C.jsxs)(c,{as:`div`,className:(0,S.default)(`relative`,N),children:[(0,C.jsx)(c.Button,{ref:B.setReference,className:G,"aria-label":r,children:K}),(0,C.jsx)(m,{children:(0,C.jsx)(s,{as:y.Fragment,enter:`transition-opacity ease-out duration-100`,enterFrom:`opacity-0`,enterTo:`opacity-100`,leave:`transition-opacity ease-in duration-75`,leaveFrom:`opacity-100`,leaveTo:`opacity-0`,children:(0,C.jsx)(c.Items,{ref:B.setFloating,style:V,className:`z-50 min-w-0 overflow-hidden rounded-3xl border border-black/5 bg-white py-1 shadow-[0_4px_6px_rgba(0,0,0,0.08)] focus:outline-none`,children:e.map(e=>O(e)?(0,C.jsx)(M,{item:e},e.key):(0,C.jsx)(c.Item,{disabled:e.disabled,children:({active:t,close:n})=>(0,C.jsx)(j,{item:e,base:E,active:t,onAfterClick:n})},e.key))})})})]})};function j({item:e,base:t,active:n=!1,onAfterClick:i}){let{label:a,icon:o,onClick:s,variant:c,disabled:l,to:u}=e,d=(0,S.default)(t,`transition-colors`,c===`danger`?`text-red-600`:`text-black`,l?`opacity-50 cursor-not-allowed`:`hover:bg-black/5`,{"bg-black/5":n&&!l}),f=(0,C.jsxs)(C.Fragment,{children:[o&&(0,C.jsx)(`span`,{className:D,children:(0,C.jsx)(o,{className:`size-4`})}),(0,C.jsx)(`span`,{children:a})]});return u?(0,C.jsx)(r,{to:u,"aria-disabled":l||void 0,className:d,onClick:e=>{if(l){e.preventDefault();return}s?.(),i?.()},children:f}):(0,C.jsx)(`button`,{type:`button`,disabled:l,className:d,onClick:l?void 0:()=>{s?.(),i?.()},children:f})}function M({item:e}){return(0,C.jsx)(`div`,{"aria-hidden":`true`,"data-testid":`menu-divider-${e.key}`,className:`my-1 border-t border-black/10`})}export{x as n,A as t};
4//# sourceMappingURL=ActionMenu-BlbvXKr9.js.map
5//# debugId=57a43327-0977-50f9-bb5e-23f86be287ce

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.