{"version":3,"file":"shared-lib.DUjI9wiL.mjs","names":["React.useRef","React.useState","__esmMin","init_npm_react_18_3_1","_e","p","c","init_jsx_runtime","ce","de","init_framer_D1IzEvwH","addPropertyControls","Link","ControlType","ManualLanguage","marker","suffix","setSuffix","doc","win","language","current","englishPath","spanishPath","lang","path","id","link","init_ManualLanguage"],"sources":["https:/framerusercontent.com/modules/Nwo1ejbS99Un3GTli6Ey/kcriZ578qlPA7TqNAMaB/ManualLanguage.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,Link}from\"framer\";/** @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ManualLanguage({spanishPath=\"/\",englishPath=\"/en\",language=\"es\"}){const marker=React.useRef(null);const[suffix,setSuffix]=React.useState(\"\");React.useEffect(()=>{const doc=marker.current?.ownerDocument,win=doc?.defaultView;if(!doc||!win)return;doc.documentElement.lang=language===\"en\"?\"en\":\"es-MX\";const current=language===\"en\"?englishPath:spanishPath;if((win.location.pathname.replace(/\\/$/,\"\")||\"/\")===current){setSuffix(win.location.search+win.location.hash);for(const[lang,path]of[[\"es-MX\",spanishPath],[\"en\",englishPath],[\"x-default\",spanishPath]]){const id=\"bh-alternate-\"+lang;let link=doc.getElementById(id);if(!link){link=doc.createElement(\"link\");link.id=id;link.rel=\"alternate\";doc.head.appendChild(link);}link.hreflang=lang;link.href=win.location.origin+path;}}},[spanishPath,englishPath,language]);return /*#__PURE__*/_jsxs(\"span\",{ref:marker,\"data-bh-page-path\":language===\"en\"?englishPath:spanishPath,style:{display:\"none\"},\"aria-hidden\":\"true\",children:[/*#__PURE__*/_jsx(Link,{href:spanishPath+suffix,children:/*#__PURE__*/_jsx(\"a\",{href:spanishPath+suffix,\"data-bh-language-target\":\"es\",tabIndex:-1,children:\"Espa\\xf1ol\"})}),/*#__PURE__*/_jsx(Link,{href:englishPath+suffix,children:/*#__PURE__*/_jsx(\"a\",{href:englishPath+suffix,\"data-bh-language-target\":\"en\",tabIndex:-1,children:\"English\"})})]});}addPropertyControls(ManualLanguage,{spanishPath:{type:ControlType.String,title:\"Spanish path\",defaultValue:\"/\"},englishPath:{type:ControlType.String,title:\"English path\",defaultValue:\"/en\"},language:{type:ControlType.Enum,title:\"Language\",options:[\"es\",\"en\"],defaultValue:\"es\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ManualLanguage\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ManualLanguage.map"],"mappings":"A,sMAEG,SAAwBc,EAAe,CAAC,cAAY,IAAI,cAAY,MAAM,WAAS,MAAM,CAAC,IAAMC,EAAOf,EAAa,IAAI,EAAO,CAACgB,EAAOC,GAAWhB,EAAe,EAAE,EAAgqB,OAA9pBO,MAAoB,CAAC,IAAMU,EAAIH,EAAO,SAAS,cAAcI,EAAID,GAAK,YAAY,GAAG,CAACA,GAAK,CAACC,EAAI,OAAO,EAAI,gBAAgB,KAAKC,IAAW,KAAK,KAAK,QAAQ,IAAMC,EAAQD,IAAW,KAAKE,EAAYC,EAAY,IAAIJ,EAAI,SAAS,SAAS,QAAQ,MAAM,EAAE,GAAG,OAAOE,EAAQ,CAACJ,EAAUE,EAAI,SAAS,OAAOA,EAAI,SAAS,IAAI,EAAE,IAAI,GAAK,CAACK,EAAKC,IAAO,CAAC,CAAC,QAAQF,CAAW,EAAE,CAAC,KAAKD,CAAW,EAAE,CAAC,YAAYC,CAAW,CAAC,EAAE,CAAC,IAAMG,EAAG,gBAAgBF,EAASG,EAAKT,EAAI,eAAeQ,CAAE,EAAMC,IAAM,EAAKT,EAAI,cAAc,MAAM,EAAE,EAAK,GAAGQ,EAAG,EAAK,IAAI,YAAYR,EAAI,KAAK,YAAYS,C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