PageSourceSearch

https://www.data.vic.gov.au/_nuxt/B2Q_waSD.js

js data.vic.gov.au collected 2026-09-24 09:01:20 UTC 2,084 bytes, 1 lines download raw bytes

1import{d as _,m as b,o as n,f as r,i as p,g as m,h as S,t as l,F as B,j as C,b as g,Y as w,Z as v,$ as k}from"./2kXm08UW.js";const L={class:"tide-search-banner rpl-u-screen-only"},T={class:"rpl-container"},O={key:0,class:"rpl-type-weight-bold"},U={key:0,class:"rpl-chip rpl-type-p-small rpl-u-margin-l-4"},V=_({__name:"TideLandingPageSearchBanner",props:{placeholder:{},searchUrl:{},openInNewWindow:{},searchType:{},hasSidebar:{type:Boolean},hasTitle:{type:Boolean}},setup(F){const t=b("featureFlags"),c=v({values:[]}),o=k(""),u=async()=>{t?.searchBannerConfig?.suggestionsUrl&&(c.values=await $fetch(t.searchBannerConfig.suggestionsUrl,{method:"POST",body:{q:o.value},size:6}).then(e=>{const a=[];return e.result.datasets.length>0&&a.push({label:"Relevant datasets",type:"category"},...e.result.datasets),e.result.categories.length>0&&a.push({label:"Browse filters",type:"category"},...e.result.categories),a}))},d=e=>{if(!t?.searchBannerConfig?.url)return;let a;if(t?.searchBannerConfig?.directLinkSuggestions)a=e.payload?.href||`dataset/?q=${e.value}`;else switch(e.payload?.type){case"Categories":case"Formats":case"Organisations":a=e.payload.href?.replace(/^\/+/,"");break;default:a=`dataset/?q=${e.value}`;break}window.location.href=encodeURI(t.searchBannerConfig.url.replace("[SEARCH-KEYWORDS]",a))},h=e=>{if(!e)return;const a=e?.label||e;o.value=a,a.length>2&&u()},i=e=>e.label,f=e=>e.type.toLowerCase()!=="category";return(e,a)=>{const y=w;return n(),r("div",L,[p("div",T,[m(y,{id:"search-banner",variant:"reverse","input-label":"Dataset search",inputValue:g(o),placeholder:"Search for open data",suggestions:g(c).values,getOptionLabel:i,getOptionId:i,isOptionSelectable:f,onSubmit:d,"onUpdate:inputValue":h},{suggestion:S(({option:s})=>[s.option.type==="category"?(n(),r("span",O,l(s.option.label),1)):(n(),r(B,{key:1},[p("span",null,l(s.option.label),1),s.option.type.toLowerCase()!=="dataset"?(n(),r("span",U,l(s.option.type),1)):C("",!0)],64))]),_:1},8,["inputValue","suggestions"])])])}}}),q=Object.assign(V,{__name:"TideLandingPageSearchBanner"});export{q as default};

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.