PageSourceSearch

https://www.fabriquenumeriquedupasse.fr/static/assets/setupWidget-BgmuJi2Q.js

js fabriquenumeriquedupasse.fr collected 2026-10-05 05:10:53 UTC 2,477 bytes, 1 lines download raw bytes

1import{r as s,I as B,j as e,c as v,as as z}from"./automationAxios-iy0n8IC9.js";import{R as F}from"./ReactEntryWrapper-CPjIl7Cm.js";import{F as N}from"./usePrevious-DU34Ubr5.js";import{c as W}from"./react-render-compat-CHvvO_4p.js";import{u as I}from"./usePopper-Dq8Oer0w.js";import{u as L,S as A,a as K}from"./FrontOfficeFeatures-N2DpZM1X.js";import{E as S}from"./MessageCard-jWtJ97Yr.js";import"./QuotaMessage-CjyKPgXV.js";import{K as q}from"./KeyboardShortcut-77D-Ww4s.js";import{S as M}from"./SearchFilter-DWYzfvU-.js";import"./context-BJwopkbC.js";import"./constants-C6ju-cU3.js";import"./FormattedDate-BwrA59I0.js";import"./Picto-D8NEBrX8.js";/* empty css                  */const O="_component_edsgz_208",P="_searchBox_edsgz_214",V="_results_edsgz_230",H="_error_edsgz_236",Q="_dropdownContainer_edsgz_240",n={component:O,searchBox:P,results:V,error:H,dropdownContainer:Q};function D({label:c,className:i,autoFocus:l=!1}){const{i18n:p}=s.useContext(B),{onSearch:r,onResultClick:u,currentSearch:t,firstResults:m,results:a,isLoading:b,error:f,isMultiAssetEnabledAndVisible:g,isSearchLexicalFallback:C,onSearchReset:o}=L(A.Widget),[E,_]=s.useState(null),[h,j]=s.useState(null),{styles:k,attributes:R}=I(h,E,{placement:"bottom",modifiers:[{name:"flip",options:{fallbackPlacements:["bottom"]}}]}),x=s.useRef(null),d=s.useCallback(y=>{t&&!x.current?.contains(y.target)&&(o(),r(""))},[t,r,o]),w=s.useCallback(()=>{t&&(o(),r(""))},[t,r,o]);return s.useEffect(()=>(window.document.addEventListener("click",d),()=>window.document.removeEventListener("click",d)),[d]),e.jsxs("div",{className:v(n.component,i),ref:x,children:[e.jsx(q,{stopCallback:!1,shortcuts:[{shortcut:"esc",handler:w}]}),e.jsx(M,{ref:j,onChange:r,onClear:o,value:t,label:c||p.translate("Search for a dataset, or ask a question"),className:n.searchBox,isLoading:b,autoFocus:l}),m&&t&&e.jsx("div",{ref:_,style:k.popper,...R.popper,className:n.dropdownContainer,children:e.jsx(K,{results:a,className:n.results,query:t,isMultiAssetEnabledAndVisible:g,searchQueryInput:h,showFallbackWarning:!!(t&&C),onResultClick:u})}),f&&e.jsx(S,{initialOpen:!0,variant:"critical",className:n.error,children:e.jsx(S.Header,{children:f})})]})}function ce(c,i,l){const{config:p,domain:r,i18n:u,tracking:t}=i,m={config:p,domain:r,tracking:t},a=W(c);return a.render(e.jsx(F,{name:"widget-searchbar",initialStoreEntities:m,i18nConfig:u,children:e.jsx(N,{children:e.jsx(z,{children:e.jsx(D,{...l})})})})),()=>a.unmount()}export{ce as s};

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.