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,EAAAwE,EAAA,CAAAE,kBAAA,GAAA7B,GAAA,GAAAzC,EAAAyD,GAAA,UAAAS,SAAA,OAAAL,KAAApB,CAAA,GAAAf,GAAAA,EAAA6C,WAAA,KAAAvE,EAAAyD,GAAA,UAAAS,SAAA,SAAAL,KAAAnC,EAAA6C,WAAA,GAAA7C,GAAAA,EAAA8C,UAAA,KAAAxE,EAAAyD,GAAA,UAAAS,SAAA,SAAAL,KAAAnC,EAAA8C,UAAA,GAAA9C,GAAAA,EAAA+C,UAAA,KAAAzE,EAAAyD,GAAA,UAAAS,SAAA,SAAAL,KAAAnC,EAAA+C,UAAA,GAAA/C,GAAAA,EAAAgD,YAAA,KAAA1E,EAAAyD,GAAA,UAAAS,SAAA,SAAAL,KAAAnC,EAAAgD,YAAA,SAAA1E,EAAAsD,IAAA,SAAAW,UAAA,GAAAC,SAAA,UAAAC,SAAA,4BAAAX,SAAA,IAAAxD,EAAAyD,GAAA,UAAAS,SAAA,MAAAL,KAAA,kCAAA7D,EAAAyD,GAAA,UAAAS,SAAA,OAAAP,QAAA/D,EAAAwE,EAAA,CAAAC,KAAA","sources":["webpack://_N_E/./components/Meta/Meta.js","webpack://_N_E/./adapters/helpers/Url.js","webpack://_N_E/"],"sourcesContent":["import React from 'react'\nimport ImageFactory from '../../adapters/cloudinary/ImageFactory';\nimport { validURL } from '../../adapters/helpers/Url';\nimport { getCanonicalURL } from '../../adapters/helpers/Utils';\nimport { OrganizationConstants, metaConstants} from '../../adapters/helpers/Constants';\nimport PropTypes from 'prop-types'\nimport Head from 'next/head';\nimport { optimizeImage } from '../../adapters/helpers/pagespeedHelper';\nimport { useDomain } from '../Core/DynamicPage/DomainNameContext';\n\nexport default function Meta(props) {\n const { metadata, pagePath } = props;\n const domain = useDomain();\n const subStringsArray = metaConstants.instances;\n const hasSubstring = (str, substrArr) => substrArr.some(sub => str.includes(sub));\n const noIndexNoFollowFlag = hasSubstring(domain?.toLowerCase(), subStringsArray);\n\n const title = metadata?.metaTitle;\n const description = metadata?.metaDescription;\n const keywords = metadata?.metaKeywords;\n const pagetype = metadata?.pageType;\n const noindex = metadata?.noIndex;\n const nofollow = metadata?.noFollow;\n\n const openGraphPageTitle = metadata?.openGraphPageTitle;\n const openGraphDescription = metadata?.openGraphDescription;\n\n const socialAccounts = metadata?.socialsAccounts?.fields;\n\n let metaRobots = [];\n metaRobots.push(noindex || noIndexNoFollowFlag ? 'noindex' : 'index');\n metaRobots.push(nofollow || noIndexNoFollowFlag ? 'nofollow' : 'follow');\n\n let openGraphImageUrl = null;\n let logoUrl= null;\n\n if (metadata && metadata.openGraphImage && metadata.openGraphImage.fields) {\n openGraphImageUrl = optimizeImage(ImageFactory.imageContentfullSrc(metadata?.openGraphImage?.fields?.asset?.fields?.file?.url));\n }\n \n if (metadata && metadata.logo && metadata.logo.fields) {\n logoUrl = optimizeImage(ImageFactory.imageContentfullSrc(metadata?.logo?.fields?.asset?.fields?.file?.url));\n }\n let canonical = generateCanonical(metadata, pagePath);\n if(metadata && metadata.pageType === 'article' ){\n metaRobots.push('max-image-preview:large');\n metaRobots.push('max-snippet:-1');\n metaRobots.push('max-video-preview:-1');\n }\n return (\n <>\n \n \n {title}\n \n \n \n \n \n \n {keywords &&\n }\n\n {openGraphPageTitle &&\n }\n\n {openGraphDescription &&\n }\n\n {openGraphImageUrl &&\n }\n\n {canonical &&\n }\n\n {canonical &&\n }\n \n \n\n
\n\n {canonical &&\n }\n\n \n\n \n\n {logoUrl &&\n }\n\n { socialAccounts && socialAccounts.facebookUrl &&\n }\n\n { socialAccounts && socialAccounts.twitterUrl &&\n }\n\n { socialAccounts && socialAccounts.youtubeUrl &&\n }\n\n { socialAccounts && socialAccounts.instagramUrl &&\n }\n\n
\n\n
\n {process.env.WEBSITE_CANNONICAL_URL &&\n }\n\n \n
\n \n \n );\n}\n\nMeta.propTypes = {\n metadata: PropTypes.object,\n pagePath: PropTypes.string,\n};\n\nfunction generateCanonical(metadata, pagePath) {\n let canonical = metadata?.canonicalUrl;\n\n if (canonical == null) {\n canonical = pagePath;\n }\n\n return validURL(canonical) ? canonical : getCanonicalURL(canonical);\n}\n","export function validURL(str) {\n let pattern = new RegExp('^(https?:\\\\/\\\\/)?'+ // protocol\n '((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|'+ // domain name\n '((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))'+ // OR ip (v4) address\n '(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*'+ // port and path\n '(\\\\?[;&a-z\\\\d%_.~+=-]*)?'+ // query string\n '(\\\\#[-a-z\\\\d_]*)?$','i'); // fragment locator\n return !!pattern.test(str);\n}\n","\"use strict\";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2552],{23140:function(e,n,t){t.r(n),t.d(n,{default:function(){return u}});t(67294);var l=t(42456);var i=t(8996),o=t(24036),a=t(9008),r=t.n(a),s=t(19271),p=t(38896),m=t(85893);function u(e){var n,t,a=e.metadata,u=e.pagePath,c=(0,p.a)(),d=o.qV.instances,h=(t=null==c?void 0:c.toLowerCase(),d.some((function(e){return t.includes(e)}))),f=null==a?void 0:a.metaTitle,x=null==a?void 0:a.metaDescription,g=null==a?void 0:a.metaKeywords,j=null==a?void 0:a.pageType,v=null==a?void 0:a.noIndex,w=null==a?void 0:a.noFollow,k=null==a?void 0:a.openGraphPageTitle,P=null==a?void 0:a.openGraphDescription,b=null==a||null==(n=a.socialsAccounts)?void 0:n.fields,y=[];y.push(v||h?\"noindex\":\"index\"),y.push(w||h?\"nofollow\":\"follow\");var z,U,I,S,T,_,A,C,G,O,D=null,E=null;a&&a.openGraphImage&&a.openGraphImage.fields&&(D=(0,s.H)(l.ZP.imageContentfullSrc(null==a||null==(z=a.openGraphImage)||null==(U=z.fields)||null==(I=U.asset)||null==(S=I.fields)||null==(T=S.file)?void 0:T.url)));a&&a.logo&&a.logo.fields&&(E=(0,s.H)(l.ZP.imageContentfullSrc(null==a||null==(_=a.logo)||null==(A=_.fields)||null==(C=A.asset)||null==(G=C.fields)||null==(O=G.file)?void 0:O.url)));var F=function(e,n){var t=null==e?void 0:e.canonicalUrl;null==t&&(t=n);return function(e){return!!new RegExp(\"^(https?:\\\\/\\\\/)?((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*(\\\\?[;&a-z\\\\d%_.~+=-]*)?(\\\\#[-a-z\\\\d_]*)?$\",\"i\").test(e)}(t)?t:(0,i.DN)(t)}(a,u);return a&&\"article\"===a.pageType&&(y.push(\"max-image-preview:large\"),y.push(\"max-snippet:-1\"),y.push(\"max-video-preview:-1\")),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(r(),{children:[(0,m.jsx)(\"meta\",{name:\"viewport\",content:\"width=device-width, initial-scale=1, minimum-scale=1\"}),(0,m.jsx)(\"title\",{children:f}),(0,m.jsx)(\"link\",{rel:\"manifest\",href:\"/static/manifest.webmanifest\",crossOrigin:\"use-credentials\"}),(0,m.jsx)(\"meta\",{charSet:\"UTF-8\"}),(0,m.jsx)(\"meta\",{name:\"description\",content:x}),(0,m.jsx)(\"meta\",{name:\"robots\",content:y}),(0,m.jsx)(\"meta\",{name:\"theme-color\",content:\"#0057B8\"}),(0,m.jsx)(\"meta\",{name:\"pagetype\",content:j}),g&&(0,m.jsx)(\"meta\",{name:\"keywords\",content:g}),k&&(0,m.jsx)(\"meta\",{property:\"og:title\",content:k}),P&&(0,m.jsx)(\"meta\",{property:\"og:description\",content:P}),D&&(0,m.jsx)(\"meta\",{property:\"og:image\",content:D}),F&&(0,m.jsx)(\"meta\",{property:\"og:url\",content:F}),F&&(0,m.jsx)(\"link\",{rel:\"canonical\",href:F})]}),(0,m.jsxs)(\"div\",{itemScope:!0,itemProp:\"Organization\",itemType:\"http://schema.org/Organization\",children:[F&&(0,m.jsx)(\"link\",{itemProp:\"url\",href:F}),(0,m.jsx)(\"link\",{itemProp:\"name\",content:o.XI.brand}),(0,m.jsx)(\"link\",{itemProp:\"parentOrganization\",content:o.XI.parentOrganization}),E&&(0,m.jsx)(\"link\",{itemProp:\"logo\",href:E}),b&&b.facebookUrl&&(0,m.jsx)(\"link\",{itemProp:\"sameAs\",href:b.facebookUrl}),b&&b.twitterUrl&&(0,m.jsx)(\"link\",{itemProp:\"sameAs\",href:b.twitterUrl}),b&&b.youtubeUrl&&(0,m.jsx)(\"link\",{itemProp:\"sameAs\",href:b.youtubeUrl}),b&&b.instagramUrl&&(0,m.jsx)(\"link\",{itemProp:\"sameAs\",href:b.instagramUrl})]}),(0,m.jsxs)(\"div\",{itemScope:!0,itemProp:\"WebSite\",itemType:\"http://schema.org/WebSite\",children:[(0,m.jsx)(\"link\",{itemProp:\"url\",href:\"https://www.oralb.pt/pt-pt\"}),(0,m.jsx)(\"link\",{itemProp:\"name\",content:o.XI.brand})]})]})}}}]);"],"names":["self","webpackChunk_N_E","push","e","n","t","r","d","default","u","l","i","o","a","s","p","m","metadata","pagePath","c","qV","instances","h","toLowerCase","some","includes","f","metaTitle","x","metaDescription","g","metaKeywords","j","pageType","v","noIndex","w","noFollow","k","openGraphPageTitle","P","openGraphDescription","b","socialsAccounts","fields","y","z","U","I","S","T","_","A","C","G","O","D","E","openGraphImage","H","ZP","imageContentfullSrc","asset","file","url","logo","F","canonicalUrl","test","DN","jsxs","Fragment","children","jsx","name","content","rel","href","crossOrigin","charSet","property","itemScope","itemProp","itemType","XI","brand","parentOrganization","facebookUrl","twitterUrl","youtubeUrl","instagramUrl"],"sourceRoot":""}