1import{j as s,c as M,r as g,I as D,b as H,T as J,m as c,aJ as Y,aS as Z,W as q}from"./automationAxios-iy0n8IC9.js";import{a as X}from"./KeyboardShortcut-77D-Ww4s.js";import{M as Q,u as W,e as K,A as ee,C as te,S as se,O as v,b as I}from"./useLocalizedLabel-DLgoYE13.js";import{e as ae,j as C}from"./assets-Cqr3-j2e.js";import{d as ne,u as ie,t as re}from"./History-CZ14RH_O.js";import{R as le}from"./constants-C6ju-cU3.js";import{s as oe}from"./assets-Bq87jp8a.js";import"./context-BJwopkbC.js";import{u as ce}from"./types-CF1q2HsS.js";import{i as ue}from"./index-DRJLwv9Q.js";import{j as k}from"./SearchFilter-DWYzfvU-.js";import{A as me}from"./AssetCategoryChip-l6LEmhFT.js";import{C as de}from"./Card-BPhiR4j4.js";import{T as F}from"./Tag-BHccsf9s.js";/* empty css */import{a as pe}from"./Picto-D8NEBrX8.js";import{F as o}from"./metadata-BerQoG_z.js";import{u as fe}from"./useNumberFormat-DaPrEokL.js";import{a as U}from"./index-B0Z03Vtp.js";import{s as l,F as Te}from"./asset-card.module-CLr6DXnq.js";const Ae="_chips_k58fn_208",he={chips:Ae};function xe({children:e,className:t=""}){return s.jsx("div",{className:M(he.chips,t),children:e})}const _e="_chip_50qnb_208",Ce="_label_50qnb_212",S={chip:_e,label:Ce};function je({theme:e}){const{i18n:t}=g.useContext(D),{"metadata#themes":a}=H(r=>r.entities.domain.properties),{image:n}=a.find(r=>r.labels[t.shortLanguageCode]===e)||{},i=n?.url?s.jsx(pe,{color:n.color,label:e,url:n.url,size:"small"}):void 0;return s.jsx(F,{className:S.chip,icon:i,children:s.jsx("span",{title:e,className:S.label,children:e})})}function Ee({themes:e,className:t="",limit:a}){if(!e||e.length===0)return null;const n=a!==void 0?e.slice(0,a):e,i=a!==void 0?Math.max(e.length-a,0):0;return s.jsxs(xe,{className:t,children:[n.map(r=>s.jsx(je,{theme:r},r)),i>0&&s.jsxs(F,{className:S.chip,children:["+",i]})]})}const ge="_list_zae9h_208",Ne="_sizeMedium_zae9h_223",ye="_sizeSmall_zae9h_244",be="_text_zae9h_258",j={list:ge,sizeMedium:Ne,sizeSmall:ye,text:be};function G(e,t){return Array.isArray(t)&&t.find(n=>Array.isArray(n)&&n[0]===e)?.[1]||e}function E({value:e}){return s.jsx("span",{className:j.text,children:e})}function R({value:e}){return Array.isArray(e)?s.jsx(E,{value:e.join(", ")}):null}function ve({value:e}){const{i18n:t}=g.useContext(D);return s.jsx("span",{className:j.text,children:e?t.translate("True"):t.translate("False")})}function z({value:e}){return s.jsx(Q,{date:e})}function V({value:e}){const t=fe();return s.jsx("span",{className:j.text,children:t.format(e)})}function Ie({value:e}){const t=k(e);return s.jsx(E,{value:t})}function De({value:e,optionValues:t}){const a=G(e,t);return s.jsx(E,{value:a})}function Oe({value:e,optionValues:t}){const a=g.useMemo(()=>Array.isArray(e)?e.map(n=>G(n,t)):null,[e,t]);return a===null?null:s.jsx(R,{value:a})}const Se={[o.TEXT]:E,[o.ENUM]:E,[o.LIST]:R,[o.ENUMLIST]:R,[o.URI_ENUM]:De,[o.URI_ENUMLIST]:Oe,[o.DATE]:z,[o.DATETIME]:z,[o.BOOLEAN]:ve,[o.INTEGER]:V,[o.DECIMAL]:V,[o.HTML]:Ie,[o.LONGSTRING]:E};function Re({value:e,field:t}){const a=Se[t.type];return s.jsx(a,{value:e,optionValues:t.values})}function Me({value:e,field:t}){return!t||e===""||e===null?null:s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:t.label}),s.jsx("dd",{children:s.jsx(Re,{value:e,field:t})})]})}function Fe({size:e,asset:t,metadataList:a,metadataTemplates:n}){if(!a||!a.length)return null;const i=a.map(d=>{const{name:u,templateName:f}=d;return f!=="asset"?{value:t.metas?.[f]?.[u],field:n[f]?.find(p=>p.name===u)}:{value:t[u],field:n.asset?.find(p=>p.name===u)}}),r=e==="medium"?j.sizeMedium:j.sizeSmall;return s.jsx("dl",{className:M(j.list,r),children:i.map((d,u)=>s.jsx(Me,{value:d.value,field:d.field},u))})}const Le="_assetCTAsContainer_1yw22_208",Pe={assetCTAsContainer:Le};function $e({size:e,origin:t,position:a,onAdditionalCTAClick:n}){const{state:{asset:i,isEmptyDataset:r,frontOfficeConfiguration:d}}=ie(),{getDisplayedCTAValues:u}=W(),{track:f}=ce(),p=ue(),A=y=>{y.preventDefault(),p(le.ASSET.INDEX.buildRoute(i.slug,"assets"))},h=d?.product_page?.main_cta;let m;if(h)if(ae(h)){const T=d?.product_page?.custom_ctas?.find(b=>b.id===h);if(T){const{label:b,url:x}=u(T);m=K(T,b,x)}}else m=ee[h]?.[i.asset_type];const N=g.useMemo(()=>!!m&&i.is_content_visible&&!r&&oe(m.ctaId,i),[m,r,i]),O=()=>{re(i,m.ctaId,t,f,a),n?.()};return s.jsxs("div",{className:Pe.assetCTAsContainer,children:[s.jsx(X,{variant:"secondary",size:"200",onClick:A,children:s.jsx(J,{translationKey:"Discover"})}),N&&s.jsx(te,{action:m,component:"button",variant:e==="medium"?"tertiary":"icon",iconVariant:e==="small"?"tertiary":void 0,onClickTracking:O})]})}function ft({asset:e,contentProps:t}){return s.jsx(ne,{asset:e,children:s.jsx($e,{...t})})}const Ue="_tag_1ehv6_63",ze={tag:Ue};var Ve=(e=>(e.USAGE="usage",e.INTERNAL_FEDERATION="internal_federation",e.JOIN="join",e))(Ve||{});const B={usage:[C.USAGE,C.SAME_AS],join:[C.JOIN,C.PROVIDED_JOIN],internal_federation:[C.PRIVATE_FEDERATION,C.ODSURL_FEDERATION]},ke={usage:{label:c("Usage"),tooltipMessage:c(`Relationship indicating that an asset's data is used 2 or consumed by another`)},join:{label:c("Join"),tooltipMessage:c(`Relationship between data assets, based on a common key, 3 to combine or enrich data unilaterally`)},internal_federation:{label:c("Internal Federation"),tooltipMessage:c(`Connection to a data asset of this portal without copying it, 4 allowing real - time access and querying`)}},Tt=e=>B[e],Ge=e=>Object.entries(B).find(([,a])=>a.includes(e))?.[0];function Be({type:e}){const{i18n:t}=g.useContext(D),a=Ge(e);if(!a)return null;const{label:n,tooltipMessage:i}=ke[a];return s.jsx(F,{tooltip:t.translate(i),className:ze.tag,children:t.translate(n)})}function At({asset:e,className:t,actionButton:a,showThemes:n=!0,showCategory:i=!0,showShowcase:r=!0,showDescription:d=!0,metadataTemplates:u,metadataList:f,displayThumbnail:p,size:A,showRelationTypeBadge:h=!1,footer:m}){const{i18n:N}=g.useContext(D),{title:O,description:y,themes:T,category:b,thumbnail:x,is_showcase:P,relation_type:$}=e,_=O||N.translate("Untitled"),w=A==="medium"?l.sizeMedium:l.sizeSmall;return s.jsxs(de,{className:M(l.container,w,t),children:[s.jsxs("div",{className:l.topBlock,
4children:[s.jsxs("div",{className:l.cardHeader,children:[i||r&&P?s.jsx("div",{className:l.cardHeaderChipContainer,children:s.jsxs("div",{className:l.cardHeaderChip,children:[i&&s.jsx(me,{category:b,compact:!0}),r&&P&&s.jsx(se,{}),h&&$&&s.jsx(Be,{type:$})]})}):null,A==="medium"&&s.jsx(U,{className:l.title,title:_,children:_}),a?s.jsx("div",{className:l.actionButton,children:a}):null]}),A==="small"&&s.jsx(U,{className:l.title,title:_,children:_}),d&&y&&s.jsx("div",{className:l.description,children:k(y)}),n&&T&&T.length?s.jsx(Ee,{className:l.themes,themes:T,limit:5}):null]}),x&&p==="middle"&&s.jsx("img",{src:x.url,alt:N.translate(`Thumbnail for asset: ${_}`),className:l.thumbnail}),s.jsx(Fe,{size:A,asset:e,metadataTemplates:u,metadataList:f}),x&&p==="bottom"&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:l.grow}),s.jsx("img",{src:x.url,alt:N.translate(`Thumbnail for asset: ${_}`),className:l.thumbnail})]}),m&&s.jsx("div",{className:l.footer,children:m})]})}const we=20,ht=[10,we,50,100],xt=c("Explore the asset catalog");
4var He=(e=>(e.UpdatedDesc="updatedDesc",e.UpdatedAsc="updatedAsc",e.TitleAsc="titleAsc",e.TitleDesc="titleDesc",e))(He||{});const L={updatedDesc:{label:c("Last modified (descending)"),value:`${v.UpdatedAt} ${I.Desc}`},updatedAsc:{label:c("Last modified (ascending)"),value:`${v.UpdatedAt} ${I.Asc}`},titleAsc:{label:c("Title (A â Z)"),value:`${v.Alphabetically} ${I.Asc}`},titleDesc:{label:c("Title (Z â A)"),value:`${v.Alphabetically} ${I.Desc}`}};function Je(e){return e.type===Te.Refines}function Ye(e){return e.template_name&&e.template_name!=="asset"?`${e.template_name}.${e.name}`:e.name}function _t(e){switch(e.type){case"facets":return e.configuration.filter(Je).map(t=>`facet(name="${Ye(t)}", disjunctive=${!!t.multi_selection}, sort="${t.sort||q.CountDescending}")`);case"refines":return Object.entries(e.values).map(([t,a])=>a.map(n=>`${t}:${n}`)).reduce((t,a)=>[...t,...a],[]);case"dates":{const t=Object.entries(e.values).map(([a,n])=>e.configuration.find(r=>r.name===a)?n:"");return Z(...t)}default:return Y()}}const Ct=(e,t)=>(e-1)*t,jt=(e,t)=>e?Math.ceil(e/t):0;function Et(e){return e?L[e].value:`${v.UpdatedAt} ${I.Desc}`}function gt(e,t,a){return a?e[a]?.find(n=>n.name===t)||null:e.asset?.find(n=>n.name===t)||null}const Nt=e=>Object.entries(L).map(([t,{label:a}])=>({label:e.translate(a),value:t})),yt=e=>Object.entries(L).find(([,t])=>t.value===e)?.[0]||null;export{At as A,xe as C,we as D,Ve as E,Fe as M,ht as P,ke as R,He as S,Ee as T,ft as a,Nt as b,L as c,gt as d,xt as e,Ye as f,Et as g,jt as h,_t as i,Ct as j,yt as k,Tt as m};
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.