"use strict";const p=require("./focusWithoutScrolling-BlyUcXdY.cjs.js"),b=require("react");function v(e){var a;if(typeof window>"u"||window.navigator==null)return!1;let t=(a=window.navigator.userAgentData)===null||a===void 0?void 0:a.brands;return Array.isArray(t)&&t.some(n=>e.test(n.brand))||e.test(window.navigator.userAgent)}function s(e){var a;return typeof window<"u"&&window.navigator!=null?e.test(((a=window.navigator.userAgentData)===null||a===void 0?void 0:a.platform)||window.navigator.platform):!1}function r(e){if(process.env.NODE_ENV==="test")return e;let a=null;return()=>(a==null&&(a=e()),a)}const u=r(function(){return s(/^Mac/i)}),w=r(function(){return s(/^iPhone/i)}),h=r(function(){return s(/^iPad/i)||u()&&navigator.maxTouchPoints>1}),x=r(function(){return w()||h()}),E=r(function(){return u()||x()}),g=r(function(){return v(/AppleWebKit/i)&&!A()}),A=r(function(){return v(/Chrome/i)}),P=r(function(){return v(/Android/i)}),D=r(function(){return v(/Firefox/i)}),K=b.createContext({isNative:!0,open:N,useHref:e=>e});function H(e){let{children:a,navigate:t,useHref:n}=e,d=b.useMemo(()=>({isNative:!1,open:(i,c,$,l)=>{m(i,f=>{_(f,c)?t($,l):o(f,c)})},useHref:n||(i=>i)}),[t,n]);return b.createElement(K.Provider,{value:d},a)}function y(){return b.useContext(K)}function _(e,a){let t=e.getAttribute("target");return(!t||t==="_self")&&e.origin===location.origin&&!e.hasAttribute("download")&&!a.metaKey&&!a.ctrlKey&&!a.altKey&&!a.shiftKey}function o(e,a,t=!0){var n,d;let{metaKey:i,ctrlKey:c,altKey:$,shiftKey:l}=a;D()&&(!((d=window.event)===null||d===void 0||(n=d.type)===null||n===void 0)&&n.startsWith("key"))&&e.target==="_blank"&&(u()?i=!0:c=!0);let f=g()&&u()&&!h()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:c,altKey:$,shiftKey:l}):new MouseEvent("click",{metaKey:i,ctrlKey:c,altKey:$,shiftKey:l,detail:1,bubbles:!0,cancelable:!0});o.isOpening=t,p.$7215afc6de606d6b$export$de79e2c695e052f3(e),e.dispatchEvent(f),o.isOpening=!1}o.isOpening=!1;function m(e,a){if(e instanceof HTMLAnchorElement)a(e);else if(e.hasAttribute("data-href")){let t=document.createElement("a");t.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(t.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(t.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(t.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(t.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(t.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(t),a(t),e.removeChild(t)}}function N(e,a){m(e,t=>o(t,a))}function T(e){let a=y();var t;const n=a.useHref((t=e.href)!==null&&t!==void 0?t:"");return{"data-href":e.href?n:void 0,"data-target":e.target,"data-rel":e.rel,"data-download":e.download,"data-ping":e.ping,"data-referrer-policy":e.referrerPolicy}}function C(e){let a=y();var t;const n=a.useHref((t=e?.href)!==null&&t!==void 0?t:"");return{href:e?.href?n:void 0,target:e?.target,rel:e?.rel,download:e?.download,ping:e?.ping,referrerPolicy:e?.referrerPolicy}}function k(e,a,t,n){!a.isNative&&e.currentTarget instanceof HTMLAnchorElement&&e.currentTarget.href&&!e.isDefaultPrevented()&&_(e.currentTarget,e)&&t&&(e.preventDefault(),a.open(e.currentTarget,e,t,n))}exports.$c87311424ea30a05$export$186c6964ca17d99=w;exports.$c87311424ea30a05$export$6446a186d09e379e=A;exports.$c87311424ea30a05$export$78551043582a6a98=g;exports.$c87311424ea30a05$export$7bef049ce92e4224=h;exports.$c87311424ea30a05$export$9ac100e40613ea10=u;exports.$c87311424ea30a05$export$a11b0059900ceec8=P;exports.$c87311424ea30a05$export$e1865c3bedcd822b=E;exports.$c87311424ea30a05$export$fedb369cb70207f1=x;exports.$ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f=k;exports.$ea8dcbcb9ea1b556$export$323e4fc2fa4753fb=H;exports.$ea8dcbcb9ea1b556$export$7e924b3091a3bd18=C;exports.$ea8dcbcb9ea1b556$export$95185d699e05d4d7=o;exports.$ea8dcbcb9ea1b556$export$9a302a45f65d0572=y;exports.$ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6=T;
//# sourceMappingURL=openLink-CkDzR4gQ.cjs.js.map
