PageSourceSearch

https://ndla.no/assets/AboutPageV2-DqDGR04-.js

js ndla.no collected 2026-10-01 10:26:34 UTC 17,405 bytes, 2 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`ndla-frontend@5177c0d`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`35b657d1-4f62-4c41-acb4-2c130b1b473c`,e._sentryDebugIdIdentifier=`sentry-dbid-35b657d1-4f62-4c41-acb4-2c130b1b473c`)}catch{}})();import{B as e,E as t,_t as n,h as r,st as i}from"./constants-RhVSlIKL.js";import{X as a,lt as o,st as s,t as c}from"./useQuery-BXsv_icE.js";import{a as l}from"./Accordion-CtOlHRGX.js";import{_ as u,a as d,d as f,g as ee,n as p,r as m,s as h,y as g}from"./transform-BmTEwbLH.js";import{n as _,t as v}from"./Text-00V1OU2_.js";import{t as te}from"./link-overlay-Ci_1W-Ee.js";import{n as y}from"./Status-CO4Uulxt.js";import{n as b,r as x,t as ne}from"./Hero-DQWEquLc.js";import{It as S,p as C}from"./authHelpers-CIEzjpgZ.js";import{n as w}from"./PageContent-Bxnad4FE.js";import{t as T}from"./PageContainer-20lcL1rG.js";import{t as E}from"./LicenseBox-C1k8z0ho.js";import{n as D,t as O}from"./PageTitle-CX6aRkhD.js";import{n as k}from"./DefaultErrorMessage-D3ih89F-.js";import{t as A}from"./esm-HjJ3ZZO4.js";import{r as j}from"./routeHelpers-C3glI4Eo.js";import{n as M}from"./ArticleByline-CWfrQcO0.js";import{t as N}from"./HomeBreadcrumb-BpjP5ujG.js";import{n as re}from"./NotFoundPage-Bj6XrlKN.js";import{t as ie}from"./ContentPlaceholder-CjHLVgwb.js";import{r as P}from"./getStructuredDataFromArticle-8yNh1f7A.js";import{t as F}from"./LdJson-CcbqwXf5.js";import{t as I}from"./getArticleScripts-DUYuLRYm.js";import{t as L}from"./extractEmbedMeta-CVB57in8.js";import{n as R,t as z}from"./transformArticle-Cu-7Gj7V.js";import{n as B,r as V,t as H}from"./TransportationPageVisualElement-DyhELr5z.js";var U=n(i(),1),W=t(),G=e=>{let t=new Set;return e.filter(e=>{if(e.kind!==`FragmentDefinition`)return!0;let n=e.name?.value;return!n||t.has(n)?!1:(t.add(n),!0)})},K=o(x,{base:{"& a:focus-within":{outlineColor:`currentcolor`}}}),q=o(w,{base:{overflowX:`clip`}}),J=o(p,{base:{overflowX:`visible`}}),ae=(e,t)=>e(`htmlTitles.aboutPage`,{name:t}),Y=({article:e,crumbs:t})=>{let{t:n,i18n:i}=a(),o=`${S.ndlaFrontendDomain}/oembed?url=${S.ndlaFrontendDomain}/article/${e.id}`,[s,c]=(0,U.useMemo)(()=>{let t=R(e,i.language,{path:`${S.ndlaFrontendDomain}/om/${e.slug}`,articleLanguage:e.language});return[{...t,copyright:{...e.copyright,processed:e.copyright.processed??!1},introduction:t.introduction??``},I(e.requiredLibraries,e.transformedContent.content,i.language)]},[e,i.language]);(0,U.useEffect)(()=>{if(window.MathJax&&typeof window.MathJax.typeset==`function`)try{window.MathJax.typeset()}catch{}});let u=f(s.copyright?.license?.license,i.language,void 0);return(0,W.jsxs)(`main`,{children:[(0,W.jsx)(O,{title:ae(n,s.title),useLocationForCustomPath:!0}),(0,W.jsx)(`meta`,{name:`pageid`,content:`${s.id}`}),c?.map(e=>(0,W.jsx)(`script`,{src:e.src,type:e.type,async:e.async,defer:e.defer},e.src)),(0,W.jsx)(`link`,{rel:`alternate`,type:`application/json+oembed`,href:o,title:s.title}),(0,W.jsx)(F,{article:e,breadcrumbItems:t}),(0,W.jsx)(D,{title:s.title,description:s.metaDescription,imageUrl:s.metaImage?.image.imageUrl,trackableContent:s,useLocationForCanonicalPath:!0}),(0,W.jsxs)(ne,{variant:`primary`,children:[(0,W.jsx)(b,{}),(0,W.jsx)(w,{variant:`article`,children:(0,W.jsx)(K,{children:(0,W.jsx)(N,{items:t.map(e=>({...e,to:e.url}))})})}),(0,W.jsx)(q,{variant:`article`,gutters:`tabletUp`,children:(0,W.jsx)(w,{variant:`content`,asChild:!0,children:(0,W.jsxs)(h,{...u,children:[(0,W.jsxs)(d,{children:[(0,W.jsx)(v,{id:r,tabIndex:-1,children:s.transformedContent.title}),!!s.transformedContent.introduction&&(0,W.jsx)(_,{textStyle:`body.xlarge`,children:s.transformedContent.introduction})]}),(0,W.jsx)(J,{children:s.transformedContent.content}),(0,W.jsx)(m,{children:(0,W.jsx)(l,{multiple:!0,children:(0,W.jsx)(M,{accordionTitle:n(`article.useContent`),value:`rulesForUse`,children:(0,W.jsx)(E,{article:s,copyText:s?.transformedContent?.metaData?.copyText,oembed:null})})})})]})})})]})]})};Y.fragments={article:{kind:`Document`,definitions:G([{kind:`FragmentDefinition`,name:{kind:`N
1ame`,value:`AboutPageLeaf_Article`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`Article`}},directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`introduction`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`grepCodes`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`htmlIntroduction`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`created`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`updated`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`slug`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`language`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`published`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`requiredLibraries`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`url`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`mediaType`},arguments:[],directives:[]}]}},{kind:`Field`,name:{kind:`Name`,value:`transformedContent`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`transformArgs`},value:{kind:`Variable`,name:{kind:`Name`,value:`transformArgs`}}
1}],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`content`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`metaData`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`copyText`},arguments:[],directives:[]}]}}]}},{kind:`FragmentSpread`,name:{kind:`Name`,value:`BaseArticle`},directives:[]},{kind:`FragmentSpread`,name:{kind:`Name`,value:`LicenseBox_Article`},directives:[]},{kind:`FragmentSpread`,name:{kind:`Name`,value:`StructuredArticleData`},directives:[]}]}}].concat(E.fragments.article.definitions,z.definitions,P.definitions)),loc:{start:0,end:295,source:{body:`fragment AboutPageLeaf_Article on Article{id introduction grepCodes htmlIntroduction created updated slug language published requiredLibraries{url mediaType}transformedContent(transformArgs:$transformArgs){content metaData{copyText}}...BaseArticle ...LicenseBox_Article ...StructuredArticleData}`,name:`GraphQL request`,locationOffset:{line:1,column:1}}}}};var oe=e=>{let t=new Set;return e.filter(e=>{if(e.kind!==`FragmentDefinition`)return!0;let n=e.name?.value;return!n||t.has(n)?!1:(t.add(n),!0)})},se=o(w,{base:{paddingBlockStart:`xxlarge`,gap:`xxlarge`,background:`surface.brand.1.subtle`}}),ce=o(l,{base:{width:`2/3`,tabletWideDown:{width:`100%`}}}),le=o(T,{base:{overflowX:`hidden`,paddingBlockStart:`0`}}),ue=o(p,{base:{overflowX:`visible`,marginInlineEnd:`auto`,width:`2/3`,tabletWideDown:{width:`100%`}}}),de=o(`nav`,{base:{display:`flex`,flexDirection:`column`,gap:`xsmall`}}),fe=o(`div`,{base:{display:`flex`,flexDirection:`column`,gap:`medium`,justifyContent:`flex-start`,alignItems:`flex-start`,height:`100%`,paddingBlockEnd:`medium`}}),pe=o(B,{base:{paddingBlockEnd:`xxlarge`,paddingBlockStart:`medium`}}),me=(e,t)=>
1e(`htmlTitles.aboutPage`,{name:t}),X=({article:e,menuItems:t,crumbs:n})=>{let{t:i,i18n:o}=a(),c=`${S.ndlaFrontendDomain}/oembed?url=${S.ndlaFrontendDomain}/article/${e.id}`,[l,d]=(0,U.useMemo)(()=>{let t=R(e,o.language,{path:`${S.ndlaFrontendDomain}/om/${e.slug}`,articleLanguage:e.language});return[{...t,introduction:t.introduction??``},I(e.requiredLibraries,e.transformedContent.content,o.language)]},[e,o.language]),p=(0,U.useMemo)(()=>{if(e?.visualElementEmbed?.content)return L(e.visualElementEmbed.content)},[e?.visualElementEmbed?.content]),m=f(e.copyright?.license?.license,o.language,void 0);return(0,W.jsxs)(`main`,{children:[(0,W.jsx)(O,{title:me(i,e.title),useLocationForCustomPath:!0}),(0,W.jsx)(`meta`,{name:`pageid`,content:`${e.id}`}),d?.map(e=>(0,W.jsx)(`script`,{src:e.src,type:e.type,async:e.async,defer:e.defer},e.src)),(0,W.jsx)(`link`,{rel:`alternate`,type:`application/json+oembed`,href:c,title:e.title}),(0,W.jsx)(F,{article:e,breadcrumbItems:n}),(0,W.jsx)(D,{title:l.title,description:l.metaDescription,imageUrl:l.metaImage?.image.imageUrl,trackableContent:l,useLocationForCanonicalPath:!0}),(0,W.jsxs)(se,{children:[(0,W.jsx)(N,{items:n.map(e=>({...e,to:e.url}))}),(0,W.jsxs)(V,{children:[(0,W.jsxs)(fe,{children:[(0,W.jsx)(v,{id:r,textStyle:`heading.medium`,tabIndex:-1,children:e.title}),!!e.htmlIntroduction?.length&&(0,W.jsx)(_,{textStyle:`body.large`,asChild:!0,consumeCss:!0,children:(0,W.jsx)(`div`,{children:A(e.htmlIntroduction)})})]}),(0,W.jsx)(H,{embed:p,imageUrl:e.metaImage?.image.imageUrl,imageAlt:e.metaImage?.alttext.alttext})]})]}),(0,W.jsxs)(le,{children:[(0,W.jsx)(h,{...m,children:(0,W.jsx)(ue,{children:l.transformedContent.content})}),(0,W.jsx)(de,{"aria-label":i(`aboutPage.menuItems`),children:(0,W.jsx)(pe,{context:`node`,children:t.map(e=>(0,W.jsx)(g,{asChild:!0,consumeCss:!0,children:(0,W.jsx)(`li`,{children:(0,W.jsxs)(ee,{children:[(0,W.jsx)(u,{asChild:!0,css:te.raw(),children:(0,W.jsx)(s,{to:j(e.article.slug),children:e.article.title})}),!!e.article.metaDescription.length&&(0,W.jsx)(_,{textStyle:`body.large`,children:e.article.metaDescription})]})})},e.articleId))})}),(0,W.jsx)(ce,{multiple:!0,children:(0,W.jsx)(M,{accordionTitle:i(`article.useContent`),value:`rulesForUse`,children:(0,W.jsx)(E,{article:e,copyText:e.transformedContent.metaData?.copyText,oembed:e.oembed})})})]})]})};X.fragments={article:{kind:`Document`,definitions:oe([{kind:`FragmentDefinition`,name:{kind:`Name`,value:`AboutPageNode_Article`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`Article`}},directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`title`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`introduction`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`htmlIntroduction`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`slug`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`language`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`created`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`updated`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`published`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`oembed`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`requiredLibraries`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`url`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`mediaType`},arguments:[],directives:[]}]}},{kind:`Field`,name:{kind:`Name`,value:`metaImage`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`image`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`imageUrl`},arguments:[],directives:[]}]}},{kind:`Field`,name:{kind:`Name`,value:`alttext`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`N
1ame`,value:`alttext`},arguments:[],directives:[]}]}}]}},{kind:`Field`,name:{kind:`Name`,value:`transformedContent`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`transformArgs`},value:{kind:`Variable`,name:{kind:`Name`,value:`transformArgs`}}}],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`content`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`metaData`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`copyText`},arguments:[],directives:[]}]}}]}},{kind:`Field`,name:{kind:`Name`,value:`visualElementEmbed`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`content`},arguments:[],directives:[]}]}},{kind:`FragmentSpread`,name:{kind:`Name`,value:`LicenseBox_Article`},directives:[]},{kind:`FragmentSpread`,name:{kind:`Name`,value:`StructuredArticleData`},directives:[]},{kind:`FragmentSpread`,name:{kind:`Name`,value:`BaseArticle`},directives:[]}]}}].concat(E.fragments.article.definitions,z.definitions,P.definitions)),loc:{start:0,end:367,source:{body:`fragment AboutPageNode_Article on Article{id title introduction htmlIntroduction slug language created updated published oembed requiredLibraries{url mediaType}metaImage{image{imageUrl}alttext{alttext}}transformedContent(transformArgs:$transformArgs){content metaData{copyText}}visualElementEmbed{content}...LicenseBox_Article ...StructuredArticleData ...BaseArticle}`,name:`GraphQL request`,locationOffset:{line:1,column:1}}}},frontpageMenu:{kind:`Document`,definitions:[{kind:`FragmentDefinition`,name:{kind:`Name`,value:`AboutPageNode_FrontpageMenu`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`FrontpageMenu`}},directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`articleId`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`article`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`title`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`slug`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`metaDescription`},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:103,source:{body:`fragment AboutPageNode_FrontpageMenu on FrontpageMenu{articleId article{id title slug metaDescription}}`,name:`GraphQL request`,locationOffset:{line:1,column:1}}}}};var Z=(e,t,n=[])=>{for(let r of e??[]){let e=n.concat(r);if(r.article.slug?.toLowerCase()===t?.toLowerCase())return e;if(r.menu?.length){let n=Z(r.menu,t,e);if(n.length)return n}}return[]},Q=(e,t)=>[{name:t(`breadcrumb.toFrontpage`),url:`/`}].concat(e.map(e=>({name:e.article.title,url:j(e.article.slug)}))),he={kind:`Document`,definitions:(e=>{let t=new Set;return e.filter(e=>{if(e.kind!==`FragmentDefinition`)return!0;let n=e.name?.value;return!n||t.has(n)?!1:(t.add(n),!0)})})([{kind:`OperationDefinition`,operation:`query`,name:{kind:`Name`,value:`aboutPage`},variableDefinitions:[{kind:`VariableDefinition`,variable:{kind:`Variable`,name:{kind:`Name`,value:`slug`}},type:{kind:`NonNullType`,type:{kind:`NamedType`,name:{kind:`Name`,value:`String`}}},directives:[]},{kind:`VariableDefinition`,variable:{kind:`Variable`,name:{kind:`Name`,value:`transformArgs`}}
1,type:{kind:`NamedType`,name:{kind:`Name`,value:`TransformedArticleContentInput`}},directives:[]}],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`article`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`id`},value:{kind:`Variable`,name:{kind:`Name`,value:`slug`}}}],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`AboutPageLeaf_Article`},directives:[]},{kind:`FragmentSpread`,name:{kind:`Name`,value:`AboutPageNode_Article`},directives:[]}]}},{kind:`Field`,name:{kind:`Name`,value:`frontpage`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`AboutPageNode_FrontpageMenu`},directives:[]},{kind:`Field`,name:{kind:`Name`,value:`menu`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`AboutPageNode_FrontpageMenu`},directives:[]},{kind:`Field`,name:{kind:`Name`,value:`menu`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`AboutPageNode_FrontpageMenu`},directives:[]},{kind:`Field`,name:{kind:`Name`,value:`menu`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`AboutPageNode_FrontpageMenu`},directives:[]}]}}]}}]}}]}}]}}].concat(Y.fragments.article.definitions,X.fragments.article.definitions,X.fragments.frontpageMenu.definitions)),loc:{start:0,end:297,source:{body:`query aboutPage($slug:String!$transformArgs:TransformedArticleContentInput){article(id:$slug){...AboutPageLeaf_Article ...AboutPageNode_Article}frontpage{...AboutPageNode_FrontpageMenu menu{...AboutPageNode_FrontpageMenu menu{...AboutPageNode_FrontpageMenu menu{...AboutPageNode_FrontpageMenu}}}}}`,name:`GraphQL request`,locationOffset:{line:1,column:1}}}},$=()=>{let{t}=a(),{slug:n}=e(),{error:r,loading:i,data:o}=c(he,{skip:!n,variables:{slug:n??``}}),s=(0,U.useContext)(y);if(i)return(0,W.jsx)(ie,{variant:`article`});if(C(r)&&s&&(s.status=410),!o?.article||!o.frontpage)return(0,W.jsx)(re,{});if(r)return(0,W.jsx)(k,{});let l=Z(o.frontpage.menu,n),u=l.at(-1);return u?.menu?.length?(0,W.jsx)(X,{article:o.article,menuItems:u.menu,crumbs:Q(l,t)}):(0,W.jsx)(Y,{article:o.article,crumbs:Q(l,t)})},ge=$;export{$ as AboutPage,ge as Component};
2//# sourceMappingURL=AboutPageV2-DqDGR04-.js.map

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.