sass-template-common 0.10.21 → 0.10.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -718,6 +718,7 @@ export declare type Config = {
718
718
  lang: string;
719
719
  landscapeLogo: Logo;
720
720
  twitterSummaryCard: Logo;
721
+ language?: string;
721
722
  icons?: any;
722
723
  manifest?: string;
723
724
  msapplicationTileImage?: string;
@@ -4260,7 +4260,7 @@ const ll = (e) => Array.isArray(e) ? e.length > 0 : e && typeof e == "object" ?
4260
4260
  path: e,
4261
4261
  image: d,
4262
4262
  logo: l,
4263
- url: t.siteUrl,
4263
+ url: t.language ? `${t.siteUrl}/${t.language}` : t.siteUrl,
4264
4264
  name: t.name,
4265
4265
  logow: t.socialBlockLogo?.width,
4266
4266
  logoh: t.socialBlockLogo?.height,
@@ -19,7 +19,7 @@ new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
19
19
  j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
20
20
  'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
21
21
  })(window,document,'script','dataLayer','${e}');
22
- `}}),s.jsx("noscript",{children:s.jsx("iframe",{src:`https://www.googletagmanager.com/ns.html?id=${e}`,height:"0",width:"0",style:{display:"none",visibility:"hidden"}})})]})},Ar=()=>{const{ANALYTICS_marfeel:e}=U();return e&&s.jsx("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:`!function(){"use strict";function e(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],c=document.createElement("script");c.src=e,t?c.type="module":(c.defer=!0,c.type="text/javascript",c.setAttribute("nomodule",""));var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(c,n)}!function(t,c){!function(t,c,n){var a,o,r;n.accountId=c,null!==(a=t.marfeel)&&void 0!==a||(t.marfeel={}),null!==(o=(r=t.marfeel).cmd)&&void 0!==o||(r.cmd=[]),t.marfeel.config=n;var i="https://sdk.mrf.io/statics";e("".concat(i,"/marfeel-sdk.js?id=").concat(c),!0),e("".concat(i,"/marfeel-sdk.es5.js?id=").concat(c),!1)}(t,c,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}(window,${e},{})}();`}})},Xc=({defaultRouteName:e})=>{const{CAPTCHA_KEY:t,CONFIG_comments:a=!1,CONFIG_commentsV2:n=!1}=U();return t&&t!==""&&(e==="video"&&a&&!n||e==="news"&&a&&!n||e==="auth"||e==="anuncia"||e==="contacto")&&s.jsx("script",{src:`https://www.google.com/recaptcha/enterprise.js?render=${t}`,async:!0,defer:!0})},yr={prefetch:[{where:{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},eagerness:"moderate"}],prerender:[{where:{and:[{selector_matches:".nota-prerender"},{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"}]},eagerness:"eager"},{where:{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},eagerness:"moderate"}]},Cr={prefetch:[{urls:["/"],eagerness:"eager"},{where:{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},eagerness:"moderate"}],prerender:[{where:{and:[{selector_matches:".nota-prerender"},{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"}]},eagerness:"eager"},{where:{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},eagerness:"moderate"}]},vr={prefetch:[{urls:["/"],eagerness:"eager"},{where:{and:[{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"moderate"}],prerender:[{where:{and:[{selector_matches:"#content-news-section a"},{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"eager"},{where:{and:[{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"moderate"}]},Sr={prefetch:[{urls:["/"],eagerness:"eager"},{where:{and:[{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"moderate"}],prerender:[{where:{and:[{selector_matches:"#block-notes-list a"},{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"eager"},{where:{and:[{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"moderate"}]},Rc={Home:yr,Common:Cr,Nota:vr,NotaLista:Sr},Nr=({active:e,type:t,customSpeculation:a})=>{const n=a||Rc[t];return e&&s.jsx("script",{type:"speculationrules",dangerouslySetInnerHTML:{__html:JSON.stringify(n)}})},ps=async(e,t,a)=>{if(a)return a.get(`/schemas${t}`,{params:e}).catch(n=>{console.log(`[/schemas${t}] Error: ${n.message}`)})},ed=(e,t)=>{if(typeof e=="string")return ft(e,t);if(e&&typeof e=="object"){const a={...e};return typeof a.url=="string"&&(a.url=ft(a.url,t)),typeof a["@id"]=="string"&&(a["@id"]=ft(a["@id"],t)),a}return e},gs=(e,t)=>{if(Array.isArray(e))return e.map(a=>gs(a,t));if(e&&typeof e=="object"){const a=e,n=a["@type"];if((n==="BreadcrumbList"||n==="ItemList")&&Array.isArray(a.itemListElement)){const o=a.itemListElement,i=n==="BreadcrumbList"&&o.some((l,c)=>l?.position!==c+1);return{...a,itemListElement:o.map((l,c)=>{if(!l||typeof l!="object")return l;const d={...l};return"item"in d&&(d.item=ed(d.item,t)),typeof d.url=="string"&&(d.url=ft(d.url,t)),i&&(d.position=c+1),d})}}const r={};for(const[o,i]of Object.entries(a))r[o]=gs(i,t);return r}return e},td={autor:"autor",seccion:"seccion",tema:"claves","ultimas-noticias":"seccion"},xr=async({config:e,axiosApi:t,pathname:a,ROUTE:n})=>{const{PUBLIC_PUBLICATION_ID:r=""}=U();let o=[];const i=a==="/"||a==="/index.html"?void 0:Or(Br[n]({pathname:a,config:e})),l=td[n]??void 0,c={newstype:e.newsType,publication:Number(r),...i&&l?{query:`${l}:('${i}')`}:{}};try{const u=await ps(c,"/news-list-summary",t);u?.data?.data?o=u.data.data:console.warn("getSchemas responded but did not contain expected data:",u)}catch(u){console.log("Error fetching schemas:",u)}const d=(()=>{try{return new URL(e.siteUrl??"").origin}catch{return e.siteUrl??""}})();return Object.keys(o).length>0&&s.jsx("script",{id:"webSiteItemListSchema",type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(gs(Le(o),d))}})},sd=(e,t)=>{const a={"@context":"https://schema.org","@type":"SoftwareApplication",name:t.name??e.name,url:t.url,operatingSystem:t.operatingSystem,applicationCategory:t.applicationCategory,publisher:{"@id":`${e.siteUrl}/#organization`},offers:{"@type":"Offer",price:t.offers.price,priceCurrency:t.offers.priceCurrency},description:t.description??e.description,downloadUrl:t.downloadUrl??t.url};return t.applicationSubCategory&&(a.applicationSubCategory=t.applicationSubCategory),t.aggregateRating&&(a.aggregateRating={"@type":"AggregateRating",ratingValue:t.aggregateRating.ratingValue,ratingCount:t.aggregateRating.ratingCount,...t.aggregateRating.bestRating&&{bestRating:t.aggregateRating.bestRating}}),t.softwareVersion&&(a.softwareVersion=t.softwareVersion),t.contentRating&&(a.contentRating=t.contentRating),Le(a)},Er=({config:e})=>{if(!e.orgSoftware)return null;const t=Array.isArray(e.orgSoftware)?e.orgSoftware:[e.orgSoftware];return s.jsx(s.Fragment,{children:t.map((a,n)=>s.jsx("script",{id:`SoftwareApplicationSchema-${n}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(sd(e,a))}},n))})};function ws(e){const{PUBLIC_ASSETS_URL:t}=U();if(!t||t==="false")return e;const a=t.replace(/\/+$/,""),n=/https?:\/\/[^/\s]+\/(arte|__export)\//g;return e.replace(n,(r,o)=>`${a}/${o}/`)}const ad=e=>Array.isArray(e)?e.length>0:e&&typeof e=="object"?Object.keys(e).length>0:!!e,Tr=async({realPath:e,config:t,BASE_URL:a,axiosApi:n,schemasCustomEndpoints:r})=>{const o=de();let i=[];try{const c=t.socialBlockLogo?.url?new URL(t.socialBlockLogo.url).pathname:void 0,d=t.landscapeLogo?.url?new URL(t.landscapeLogo.url).pathname:void 0,u={path:e,image:d,logo:c,url:t.siteUrl,name:t.name,logow:t.socialBlockLogo?.width,logoh:t.socialBlockLogo?.height,authorurl:a+o+(t.paths.autor?`/${t.paths.autor}/`:"/autor/"),lang:t.lang},m=e.split("/").find(w=>["liveblogs","liveblog"].includes(w)),h=r&&r.length>0?r:m=="liveblogs"||m=="liveblog"?["/news","/news-breadcrumb","/news-liveblog"]:["/news","/news-breadcrumb"],p=t.paths.tema!==""?"/"+t.paths.tema:t.paths.tema,f=o?o+p:p;i=(await Promise.all(h.map(async w=>{const b=w==="/news-breadcrumb"?{...u,prefixtag:f}:w==="/news"&&t.schemasNewsParams?{...u,...t.schemasNewsParams}:u;return await ps(b,w,n)}))).map(w=>w?.data?.data??[])}catch(c){console.log("Error fetching schemas:",c)}const l=(()=>{try{return new URL(a??"").origin}catch{return a??""}})();return i.map(c=>Le(c)).filter(ad).map((c,d)=>s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:ws(JSON.stringify(gs(c,l)))}},d))},kr=({config:e,socials:t})=>{const a={"@context":"https://schema.org","@type":"NewsMediaOrganization","@id":`${e.siteUrl}/#organization`,name:e.name,description:e.description,email:e.email,url:e.siteUrl,logo:e.squareLogo.url,address:e.address&&Object.keys(e.address).length>0?{"@type":"PostalAddress",...e.address}:void 0,sameAs:Object.keys(t).filter(n=>t[n]?.showInSchema===void 0?t[n]?.show:t[n]?.showInSchema).map(n=>t[n]?.url)};return s.jsx("script",{id:"WebsiteOrgListSchema",type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(Le(a))}})},Ir=({config:e})=>{const t={"@context":"https://schema.org","@type":"WebSite",name:e.name,url:e.siteUrl,potentialAction:{"@type":"SearchAction",target:e.siteUrl+de()+"/"+e.paths.buscar+"?query={search_term_string}","query-input":"required name=search_term_string"}};return s.jsx("script",{id:"WebsiteListSchema",type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(Le(t))}})},Ur=async({realPath:e,config:t,axiosApi:a})=>{try{const n={path:e,image:t.landscapeLogo?.url?new URL(t.landscapeLogo.url).pathname:void 0,logo:t.socialBlockLogo?.url?new URL(t.socialBlockLogo.url).pathname:void 0,url:t.siteUrl,name:t.name,logow:t.socialBlockLogo?.width,logoh:t.socialBlockLogo?.height,authorurl:`${t.siteUrl}${de()}${t.paths.autor?`/${t.paths.autor}/`:"/autor/"}`},o=(await ps(n,"/videos",a))?.data.data;return o?s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:ws(JSON.stringify(Le(o)))}}):void 0}catch(n){return console.error("Error fetching video schemas:",n),null}},nd="U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD",Lr=e=>e?.startsWith("family=")??!1,rd=e=>e.fontS3Url&&e.useS3Font?{url:e.fontS3Url,isS3:!0}:e.googleFontFamily&&!Lr(e.googleFontFamily)?{url:e.googleFontFamily,isS3:!1}:{url:"",isS3:!0},od=(e,t,a,n)=>`@font-face {
22
+ `}}),s.jsx("noscript",{children:s.jsx("iframe",{src:`https://www.googletagmanager.com/ns.html?id=${e}`,height:"0",width:"0",style:{display:"none",visibility:"hidden"}})})]})},Ar=()=>{const{ANALYTICS_marfeel:e}=U();return e&&s.jsx("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:`!function(){"use strict";function e(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],c=document.createElement("script");c.src=e,t?c.type="module":(c.defer=!0,c.type="text/javascript",c.setAttribute("nomodule",""));var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(c,n)}!function(t,c){!function(t,c,n){var a,o,r;n.accountId=c,null!==(a=t.marfeel)&&void 0!==a||(t.marfeel={}),null!==(o=(r=t.marfeel).cmd)&&void 0!==o||(r.cmd=[]),t.marfeel.config=n;var i="https://sdk.mrf.io/statics";e("".concat(i,"/marfeel-sdk.js?id=").concat(c),!0),e("".concat(i,"/marfeel-sdk.es5.js?id=").concat(c),!1)}(t,c,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}(window,${e},{})}();`}})},Xc=({defaultRouteName:e})=>{const{CAPTCHA_KEY:t,CONFIG_comments:a=!1,CONFIG_commentsV2:n=!1}=U();return t&&t!==""&&(e==="video"&&a&&!n||e==="news"&&a&&!n||e==="auth"||e==="anuncia"||e==="contacto")&&s.jsx("script",{src:`https://www.google.com/recaptcha/enterprise.js?render=${t}`,async:!0,defer:!0})},yr={prefetch:[{where:{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},eagerness:"moderate"}],prerender:[{where:{and:[{selector_matches:".nota-prerender"},{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"}]},eagerness:"eager"},{where:{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},eagerness:"moderate"}]},Cr={prefetch:[{urls:["/"],eagerness:"eager"},{where:{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},eagerness:"moderate"}],prerender:[{where:{and:[{selector_matches:".nota-prerender"},{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"}]},eagerness:"eager"},{where:{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},eagerness:"moderate"}]},vr={prefetch:[{urls:["/"],eagerness:"eager"},{where:{and:[{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"moderate"}],prerender:[{where:{and:[{selector_matches:"#content-news-section a"},{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"eager"},{where:{and:[{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"moderate"}]},Sr={prefetch:[{urls:["/"],eagerness:"eager"},{where:{and:[{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"moderate"}],prerender:[{where:{and:[{selector_matches:"#block-notes-list a"},{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"eager"},{where:{and:[{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"moderate"}]},Rc={Home:yr,Common:Cr,Nota:vr,NotaLista:Sr},Nr=({active:e,type:t,customSpeculation:a})=>{const n=a||Rc[t];return e&&s.jsx("script",{type:"speculationrules",dangerouslySetInnerHTML:{__html:JSON.stringify(n)}})},ps=async(e,t,a)=>{if(a)return a.get(`/schemas${t}`,{params:e}).catch(n=>{console.log(`[/schemas${t}] Error: ${n.message}`)})},ed=(e,t)=>{if(typeof e=="string")return ft(e,t);if(e&&typeof e=="object"){const a={...e};return typeof a.url=="string"&&(a.url=ft(a.url,t)),typeof a["@id"]=="string"&&(a["@id"]=ft(a["@id"],t)),a}return e},gs=(e,t)=>{if(Array.isArray(e))return e.map(a=>gs(a,t));if(e&&typeof e=="object"){const a=e,n=a["@type"];if((n==="BreadcrumbList"||n==="ItemList")&&Array.isArray(a.itemListElement)){const o=a.itemListElement,i=n==="BreadcrumbList"&&o.some((l,c)=>l?.position!==c+1);return{...a,itemListElement:o.map((l,c)=>{if(!l||typeof l!="object")return l;const d={...l};return"item"in d&&(d.item=ed(d.item,t)),typeof d.url=="string"&&(d.url=ft(d.url,t)),i&&(d.position=c+1),d})}}const r={};for(const[o,i]of Object.entries(a))r[o]=gs(i,t);return r}return e},td={autor:"autor",seccion:"seccion",tema:"claves","ultimas-noticias":"seccion"},xr=async({config:e,axiosApi:t,pathname:a,ROUTE:n})=>{const{PUBLIC_PUBLICATION_ID:r=""}=U();let o=[];const i=a==="/"||a==="/index.html"?void 0:Or(Br[n]({pathname:a,config:e})),l=td[n]??void 0,c={newstype:e.newsType,publication:Number(r),...i&&l?{query:`${l}:('${i}')`}:{}};try{const u=await ps(c,"/news-list-summary",t);u?.data?.data?o=u.data.data:console.warn("getSchemas responded but did not contain expected data:",u)}catch(u){console.log("Error fetching schemas:",u)}const d=(()=>{try{return new URL(e.siteUrl??"").origin}catch{return e.siteUrl??""}})();return Object.keys(o).length>0&&s.jsx("script",{id:"webSiteItemListSchema",type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(gs(Le(o),d))}})},sd=(e,t)=>{const a={"@context":"https://schema.org","@type":"SoftwareApplication",name:t.name??e.name,url:t.url,operatingSystem:t.operatingSystem,applicationCategory:t.applicationCategory,publisher:{"@id":`${e.siteUrl}/#organization`},offers:{"@type":"Offer",price:t.offers.price,priceCurrency:t.offers.priceCurrency},description:t.description??e.description,downloadUrl:t.downloadUrl??t.url};return t.applicationSubCategory&&(a.applicationSubCategory=t.applicationSubCategory),t.aggregateRating&&(a.aggregateRating={"@type":"AggregateRating",ratingValue:t.aggregateRating.ratingValue,ratingCount:t.aggregateRating.ratingCount,...t.aggregateRating.bestRating&&{bestRating:t.aggregateRating.bestRating}}),t.softwareVersion&&(a.softwareVersion=t.softwareVersion),t.contentRating&&(a.contentRating=t.contentRating),Le(a)},Er=({config:e})=>{if(!e.orgSoftware)return null;const t=Array.isArray(e.orgSoftware)?e.orgSoftware:[e.orgSoftware];return s.jsx(s.Fragment,{children:t.map((a,n)=>s.jsx("script",{id:`SoftwareApplicationSchema-${n}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(sd(e,a))}},n))})};function ws(e){const{PUBLIC_ASSETS_URL:t}=U();if(!t||t==="false")return e;const a=t.replace(/\/+$/,""),n=/https?:\/\/[^/\s]+\/(arte|__export)\//g;return e.replace(n,(r,o)=>`${a}/${o}/`)}const ad=e=>Array.isArray(e)?e.length>0:e&&typeof e=="object"?Object.keys(e).length>0:!!e,Tr=async({realPath:e,config:t,BASE_URL:a,axiosApi:n,schemasCustomEndpoints:r})=>{const o=de();let i=[];try{const c=t.socialBlockLogo?.url?new URL(t.socialBlockLogo.url).pathname:void 0,d=t.landscapeLogo?.url?new URL(t.landscapeLogo.url).pathname:void 0,u={path:e,image:d,logo:c,url:t.language?`${t.siteUrl}/${t.language}`:t.siteUrl,name:t.name,logow:t.socialBlockLogo?.width,logoh:t.socialBlockLogo?.height,authorurl:a+o+(t.paths.autor?`/${t.paths.autor}/`:"/autor/"),lang:t.lang},m=e.split("/").find(w=>["liveblogs","liveblog"].includes(w)),h=r&&r.length>0?r:m=="liveblogs"||m=="liveblog"?["/news","/news-breadcrumb","/news-liveblog"]:["/news","/news-breadcrumb"],p=t.paths.tema!==""?"/"+t.paths.tema:t.paths.tema,f=o?o+p:p;i=(await Promise.all(h.map(async w=>{const b=w==="/news-breadcrumb"?{...u,prefixtag:f}:w==="/news"&&t.schemasNewsParams?{...u,...t.schemasNewsParams}:u;return await ps(b,w,n)}))).map(w=>w?.data?.data??[])}catch(c){console.log("Error fetching schemas:",c)}const l=(()=>{try{return new URL(a??"").origin}catch{return a??""}})();return i.map(c=>Le(c)).filter(ad).map((c,d)=>s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:ws(JSON.stringify(gs(c,l)))}},d))},kr=({config:e,socials:t})=>{const a={"@context":"https://schema.org","@type":"NewsMediaOrganization","@id":`${e.siteUrl}/#organization`,name:e.name,description:e.description,email:e.email,url:e.siteUrl,logo:e.squareLogo.url,address:e.address&&Object.keys(e.address).length>0?{"@type":"PostalAddress",...e.address}:void 0,sameAs:Object.keys(t).filter(n=>t[n]?.showInSchema===void 0?t[n]?.show:t[n]?.showInSchema).map(n=>t[n]?.url)};return s.jsx("script",{id:"WebsiteOrgListSchema",type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(Le(a))}})},Ir=({config:e})=>{const t={"@context":"https://schema.org","@type":"WebSite",name:e.name,url:e.siteUrl,potentialAction:{"@type":"SearchAction",target:e.siteUrl+de()+"/"+e.paths.buscar+"?query={search_term_string}","query-input":"required name=search_term_string"}};return s.jsx("script",{id:"WebsiteListSchema",type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(Le(t))}})},Ur=async({realPath:e,config:t,axiosApi:a})=>{try{const n={path:e,image:t.landscapeLogo?.url?new URL(t.landscapeLogo.url).pathname:void 0,logo:t.socialBlockLogo?.url?new URL(t.socialBlockLogo.url).pathname:void 0,url:t.siteUrl,name:t.name,logow:t.socialBlockLogo?.width,logoh:t.socialBlockLogo?.height,authorurl:`${t.siteUrl}${de()}${t.paths.autor?`/${t.paths.autor}/`:"/autor/"}`},o=(await ps(n,"/videos",a))?.data.data;return o?s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:ws(JSON.stringify(Le(o)))}}):void 0}catch(n){return console.error("Error fetching video schemas:",n),null}},nd="U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD",Lr=e=>e?.startsWith("family=")??!1,rd=e=>e.fontS3Url&&e.useS3Font?{url:e.fontS3Url,isS3:!0}:e.googleFontFamily&&!Lr(e.googleFontFamily)?{url:e.googleFontFamily,isS3:!1}:{url:"",isS3:!0},od=(e,t,a,n)=>`@font-face {
23
23
  font-family: '${e.fontName}';
24
24
  font-style: normal;
25
25
  font-weight: ${e.fontWeight};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sass-template-common",
3
- "version": "0.10.21",
3
+ "version": "0.10.22",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"