1import{d as fe,u as ve,a as Me,o as a,c as J,w as p,b as n,_ as Be,e as s,t as i,f as e,g as l,h as B,F as I,r as F,i as ke,j as C,k as v,l as k,m as j,n as pe,p as He,q as Ee,s as Oe,v as Ue,x as ze,y as we,z as Ne,A as Ve,B as Y,C as je,D as De,E as Se,G as xe,H as Je,T as Ke,I as $e,J as ne,K as Ce,L as Qe,M as Re,N as Ge,O as We,P as Xe,Q as Ye,R as Le,S as qe,U as Ze,V as et,W as ue,X as Ie}from"./DIOtIui4.js";import{_ as tt}from"./CUs8XrJ5.js";import{_ as Ae}from"./CpxHEf-7.js";import{_ as st}from"./BQ8rnexJ.js";import{_ as nt}from"./DHkpunnk.js";import{s as Te}from"./CgAfL8V0.js";import{_ as ot}from"./yCe-AuBG.js";import{_ as at}from"./C5Zg79hw.js";import{_ as it}from"./Cm-ncvbc.js";import{a as Pe}from"./D7OumJ6h.js";import{u as lt}from"./09u8smkP.js";import"./Cpj98o6Y.js";import"./BB-EpzLQ.js";import"./BetH2KAS.js";import"./CZiGfzld.js";import"./CNOdoM9v.js";import"./bnIKODjr.js";import"./DsXVY3Co.js";import"./CLkcWahu.js";import"./BjFLqLBF.js";import"./DLBtnyBK.js";import"./DJY19LpX.js";const rt={class:"jps-modal-content"},ct={key:0},ut=fe({__name:"SearchHistoryModal",setup(ye,{expose:g}){const{ls:L,lss:H}=ve(),S=Me(),x=k();g({openAwait:async()=>await x.value.openAwait()});const A=j(()=>S.history),K=y=>`/csearch/${y.csid}${pe(y)}`,z=k(),N=async()=>{try{if(!await z.value.openAwait({message:C.deleteConfirm,messageVars:[L({ja:"å
¨ã¦ã®å±¥æ´",en:"All histories"})]}))return;S.clearHistory()}catch{}};return(y,h)=>{const O=nt,Q=Ae,$=ke,f=Be,R=He;return a(),J(R,{ref_key:"modal",ref:x},{default:p(()=>[n(f,{class:"jps-modal search-history-modal","dialog-min-width":"400px"},{header:p(()=>[v(i(e(L)({ja:"æ¤ç´¢å±¥æ´",en:"Search history"})),1)]),buttons:p(()=>[s("button",{onClick:h[1]||(h[1]=T=>e(x).reject())},i(e(L)(e(C).close)),1)]),default:p(()=>[s("div",rt,[s("button",{class:"jps-button clear-history",onClick:h[0]||(h[0]=T=>N())},i(e(H)("æ¤ç´¢å±¥æ´ã®ã¯ãªã¢","Clear History")),1),n(O,{ref_key:"confirmModal",ref:z},null,512),s("div",null,[e(A).length===0?(a(),l("p",ct,i(e(H)("æ¤ç´¢å±¥æ´ãããã¾ããã","There are no search histories")),1)):B("",!0),s("ul",null,[(a(!0),l(I,null,F(e(A),(T,E)=>(a(),l("li",{class:"jps-mysearch-query-view",key:E},[n($,{to:K(T)},{default:p(()=>[n(Q,{q:T},null,8,["q"])]),_:2},1032,["to"])]))),128))])])])]),_:1})]),_:1},512)}}}),pt=Object.assign(Ee(ut,[["__scopeId","data-v-8edd3d52"]]),{__name:"SearchHistoryModal"}),dt={class:"top-search-col"},mt={class:"search-keyword-block"},_t=["placeholder"],ht={class:"top-search-buttons"},gt={type:"submit"},ft={class:"image-toggle-note"},vt=["aria-hidden"],kt={key:0,class:"tag-fields"},yt={key:0},bt=["onClick"],wt={key:1,class:"show-all"},jt=fe({__name:"UiTopSearch",setup(ye){const{ls:g,lss:L,langPath:H}=ve(),S=Me(),x=Oe(),d=Ue(),A=k(),K=k(),z=k(),N=k();let y;ze(()=>{we(()=>{K.value.focus()}),y=Ne(z.value,N.value,{placement:"bottom-start",strategy:"fixed",modifiers:[{name:"computeStyles",options:{gpuAcceleration:!0,adaptive:!1}},{name:"offset",options:{offset:[16,2]}},{name:"flip",options:{fallbackPlacements:["bottom"]}}]}),document.addEventListener("keydown",f),document.addEventListener("click",Q)});const h=k(!1),O=k(!1),Q=m=>{!A.value||$(A.value,m.target)||(h.value=!1)},$=(m,_)=>typeof m.contains=="function"?m.contains(_):!1,f=m=>{m.key==="Escape"&&T()},R=()=>{h.value?h.value=!1:(h.value=!0,we(()=>{y.update()}))},T=()=>{h.value=!1};Ve(()=>{document.removeEventListener("keydown",f),document.removeEventListener("click",Q),y&&(y.destroy(),y=null)});const E=k(""),oe=j(()=>S.history.slice(0,5)),G=j(()=>S.history.length>5),ae=k(),de=async()=>{h.value=!1;try{const m=await ae.value.openAwait();if(!m)return;x.push(H(`/csearch/${ne()}?csid=${ne()}&image=${m.id}`))}catch{}},me=()=>{h.value=!1,x.push(H(`/csearch/${Ce()}${pe({csid:Ce(),keyword:Te(E.value)})}`))},ie=()=>{h.value=!1,x.push(H(`/csearch/${ne()}${pe({csid:ne(),keyword:Te(E.value),filter:{contents:O.value?["+internet"]:void 0}})}`))},q=m=>{x.push(H(`/csearch/${m.csid}${pe(m)}`))},Z=k(),_e=async()=>{try{await Z.value.openAwait()}catch{}};return(m,_)=>{const U=xe,ee=tt,W=Ae,le=ke,re=st,he=pt;return a(),l("div",{class:"top-search",ref_key:"root",ref:A},[s("div",dt,[s("form",{onSubmit:_[3]||(_[3]=Y(u=>ie(),["prevent"])),role:"search",class:"top-search-keyword",ref_key:"trigger",ref:z},[s("div",mt,[je(s("input",{ref_key:"keywordInput",ref:K,type:"text",class:"search-keyword",placeholder:e(g)(e(d).keywordPlaceholder),"onUpdate:modelValue":_[0]||(_[0]=u=>Se(E)?E.value=u:null)},null,8,_t),[[De,e(E)]]),s("button",{type:"button",class:"input-menu jps-icon-button",onClick:_[1]||(_[1]=u=>R())},[n(U,{name:"mdi/history"})])]),s("div",ht,[s("button",gt,[s("div",null,[n(U,{name:"mdi/magnify",alt:e(g)(e(C).search)},null,8,["alt"])]),s("span",null,i(e(g)(e(C).search)),1)]),s("button",{type:"button",class:"right-most",onClick:_[2]||(_[2]=Y(u=>me(),["stop"]))},[s("div",null,[n(U,{name:"mdi/image-search",alt:e(g)(e(C).imageSearch)},null,8,["alt"])]),s("span",null,i(e(g)(e(C).imageSearch)),1)])])],544),n(ee,{class:"image-toggle",modelValue:e(O),"onUpdate:modelValue":_[4]||(_[4]=u=>Se(O)?O.value=u:null)},{default:p(()=>[v(i(e(g)(e(C).imageOnly)),1)]),_:1},8,["modelValue"]),s("p",ft,i(e(g)(e(C).imageOnlyDescription)),1)]),je((a(),l("div",{class:"top-search-plus",ref_key:"dropdownMenu",ref:N,tabindex:"-1","aria-hidden":!e(h)},[n(Ke,{name:"fadetab"},{default:p(()=>[e(h)?(a(),l("div",kt,[s("dl",null,[e(oe).length?(a(),l("dt",yt,i(e(L)("æè¿ã®æ¤ç´¢","Recent Searches")),1)):B("",!0),(a(!0),l(I,null,F(e(oe),(u,V)=>(a(),l("dd",{key:V,onClick:te=>q(u)},[n(W,{q:u},null,8,["q"])],8,bt))),128)),e(G)?(a(),l("dd",wt,[s("button",{onClick:_[5]||(_[5]=u=>_e())},i(e(L)("å
¨ã¦ã®å±¥æ´ã表示","Show all histories")),1)])):B("",!0),s("dt",null,i(e(L)("ãã¼ã¯ã¼ãæ¤ç´¢ã試ãã¦ã¿ã","Search by keyword")),1),(a(!0),l(I,null,F(e(d).sampleQuery.filter(u=>!u.image&&!u.text2image),u=>(a(),l("dd",null,[n(le,{to:("searchTo"in m?m.searchTo:e($e))(u)},{default:p(()=>[n(U,{name:"mdi/magnify"}),v(" "+i(e(g)(u.name)),1)]),_:2},1032,["to"])]))),256)),e(d).id===("systemCrossSearchId"in m?m.systemCrossSearchId:e(ne))()?(a(),l(I,{key:2},[s("dt",null,i(e(L)("ç»åAIæ¤ç´¢ã試ãã¦ã¿ã","AI Search by image")),1),(a(!0),l(I,null,F(e(d).sampleQuery.filter(u=>u.image||u.text2image),u=>(a(),l("dd",null,[n(le,{to:("searchTo"in m?m.searchTo:e($e))(u)},{default:p(()=>[n(U,{name:"mdi/image-search"}),v(" "+i(e(g)(u.name)),1)]),_:2},1032,["to"])]))),256)),s("dd",null,[s("a",{onClick:_[6]||(_[6]=u=>de())},[n(U,{name:"mdi/image-search"}),v(" "+i(e(L)("é¡ä¼¼ç»åãé¸ãã§æ¤ç´¢","Select image for similar search")),1)])])],64)):B("",!0)]),n(re,{ref_key:"searchFieldImageFileModal",ref:ae},null,512),n(he,{ref_key:"searchHistoryModal",ref:Z},null,512)])):B("",!0)]),_:1})],8,vt)),[[e(Je),!0]])],512)}}}),St=Object.assign(jt,{__name:"UiTopSearch"}),$t={class:"jps-top"},Ct={class:"jps-top-main-image"},Lt={class:"jps-top-main-image-bg"},It=["src"],Tt={class:"jps-top-main-image-description"},Pt={class:"jps-top-main-image-search"},Mt={class:"has-text-centered jps-service-logo"},xt={class:"has-text-weight-bold"},At={class:"jps-top-main-image-ctrl"},Ft={class:"top-h2"},Bt={class:"jps-top-begginer-body"},Ht={class:"top-begginer-list"},Et={class:"has-text-centered"},Ot={class:"top-begginer-right"},Ut={class:"top-h2"},zt={class:"top-h2"},Nt={class:"jps-top-pickups-list"},Vt={class:"img-bg"},Dt={key:0},Jt={key:1,class:"more-link"},Kt={class:"jps-top-others-inner"},Qt={class:"top-h2"},Rt={class:"jps-top-others-list"},Gt={key:0,class:"img-bg"},Wt={key:1,class:"more-link"},Xt={key:0,class:"toggle-other-button"},Yt=["onClick"],qt={class:"jps-top-bg-group"},Zt={class:"top-h2"},es={key:0,class:"is-size-7"},ts={key:0,class:"jps-top-status-panel is-size-7"},Ss=fe({__name:"index",async setup(ye){let g,L;const{getPageAndCache:H}=Qe(),{page:S,meta:x}=([g,L]=Re(()=>H()),g=await g,L(),g);Ge(x);const{ls:d,lss:A,lsst:K,ldate:z,num:N}=ve(),y=We(),{toListElement:h,toModalInfo:O}=lt(),{contentImageUrl:Q}=Xe(),$=j(()=>y.curation("jps-top")),f=k(-1),R=j(()=>
1{if(!$.value||$.value.parts.length<=0)return[];let t=Ie($.value.parts[0].parts);return f.value=Math.floor(Math.random()*t.length),t}),T=j(()=>R.value.map(t=>h(t))),E=j(()=>R.value.map(t=>{var o,c;return Q((o=t.image)==null?void 0:o.contentId,(c=t.image)==null?void 0:c.imageId)})),oe=j(()=>f.value==-1?null:T.value[f.value]),G=k(!1),ae=()=>{G.value=!0,setTimeout(()=>{f.value>0?f.value--:f.value=T.value.length-1},250)},de=()=>{G.value=!0,setTimeout(()=>{f.value<T.value.length-1?f.value++:f.value=0},250)},me=()=>{G.value=!1},ie=k(),q=async()=>{try{await ie.value.openAwait({info:O(T.value[f.value])},{animation:"slideY"})}catch{}},Z=j(()=>{var t,o,c,b;return((b=(c=(o=(t=$.value)==null?void 0:t.parts)==null?void 0:o[1])==null?void 0:c.parts)==null?void 0:b[0])||{}}),_e=j(()=>{var t,o,c,b;return((b=(c=(o=(t=$.value)==null?void 0:t.parts)==null?void 0:o[1])==null?void 0:c.parts)==null?void 0:b[1])||{}}),m=t=>{var o,c;return((o=t.description)==null?void 0:o.ja)==="about"?"mdi/bank":((c=t.description)==null?void 0:c.ja)==="school"?"mdi/school":"mdi/help-circle-outline"},_=j(()=>{var t,o,c,b,w,ce,X;return((b=(c=(o=(t=$.value)==null?void 0:t.parts)==null?void 0:o[2])==null?void 0:c.parts)==null?void 0:b.length)>0?Ie((X=(ce=(w=$.value)==null?void 0:w.parts)==null?void 0:ce[2])==null?void 0:X.parts):null}),U=j(()=>{var t,o,c;return((c=(o=(t=$.value)==null?void 0:t.parts)==null?void 0:o[3])==null?void 0:c.parts)||[]}),ee=j(()=>{var t,o,c;return((c=(o=(t=$.value)==null?void 0:t.parts)==null?void 0:o[4])==null?void 0:c.parts)||[]}),W=k({}),le=t=>{W.value[t]=!W.value[t]},re=t=>W.value[t],he=t=>{var c;const o=((c=ee.value.filter(b=>b.cpid===t).pop())==null?void 0:c.parts)||[];return W.value[t]?V(o):V(o.slice(0,3))},u=t=>{var c;return(((c=ee.value.filter(b=>b.cpid===t).pop())==null?void 0:c.parts)||[]).length>3},V=t=>t.map(o=>h(o)),te=j(()=>{if(S!=null&&S.pageParams.news){const t=S.pageParams.news.split(",");if(t)return y.get("page",t[0])}return null});return(t,o)=>{const c=qe,b=St,w=xe,ce=ot,X=Ye,D=et,ge=at,se=ke,Fe=it;return a(),l("div",$t,[n(D,{tag:"section","inner-class":"jps-top-main-image-container"},{default:p(()=>[n(X,null,{default:p(()=>[s("div",Ct,[s("div",Lt,[s("img",{src:e(E)[e(f)],class:Le({"fade-enter-active":e(G)}),onLoad:me,onClick:o[0]||(o[0]=Y(r=>q(),["self"]))},null,42,It)]),s("div",Tt,[s("h2",{onClick:o[1]||(o[1]=r=>q())},i(e(d)(e(oe).title)),1)]),s("div",{class:"jps-top-main-image-search-container",onClick:o[2]||(o[2]=Y(r=>q(),["self"]))},[s("div",Pt,[s("header",Mt,[s("h1",null,[n(c,{src:("getFullPath"in t?t.getFullPath:e(Ze))("assets/img/brand/logo-horizontal-4c-w.svg"),alt:e(d)(e(C).serviceName)},null,8,["src","alt"])]),s("p",xt,i(e(A)("æ¥æ¬ã®ãã¸ã¿ã«ã¢ã¼ã«ã¤ããæ¢ãã","Find digital archives in Japan")),1)]),n(b)])]),s("div",At,[n(w,{name:"mdi/arrow-left-drop-circle-outline",onClick:o[3]||(o[3]=Y(r=>ae(),["stop"])),class:"jps-zooming-bg-prev",alt:e(d)(e(C).slideShow.previous)},null,8,["alt"]),n(w,{name:"mdi/arrow-right-drop-circle-outline",onClick:o[4]||(o[4]=Y(r=>de(),["stop"])),class:"jps-zooming-bg-next",alt:e(d)(e(C).slideShow.next)},null,8,["alt"])]),n(ce,{ref_key:"curationModal",ref:ie},null,512)])]),_:1})]),_:1}),n(D,{tag:"section","inner-class":"jps-top-begginer jps-top-section-inner"},{default:p(()=>[s("h2",Ft,[n(w,{name:"koicon/koicon-26"}),v(" "+i(e(d)(e(Z).title)),1)]),s("div",Bt,[s("div",Ht,[(a(!0),l(I,null,F(V(e(Z).parts),r=>(a(),J(se,{key:r.def.cpid,to:("linkParamToLink"in t?t.linkParamToLink:e(ue))(r.internalLink,r.link),class:"list-block"},{default:p(()=>[n(ge,{class:"top-image",image:r.image},null,8,["image"]),s("span",Et,i(e(d)(r.title)),1)]),_:2},1032,["to"]))),128))]),s("div",Ot,[(a(!0),l(I,null,F(V(e(_e).parts),r=>(a(),J(se,{key:r.def.cpid,to:("linkParamToLink"in t?t.linkParamToLink:e(ue))(r.internalLink,r.link),class:"jps-round-button is-size-7-touch jps-expanded"},{default:p(()=>[n(w,{name:m(r)},null,8,["name"]),v(" "+i(e(d)(r.title)),1)]),_:2},1032,["to"]))),128))])])]),_:1}),e(_)?(a(),J(D,{key:0,tag:"section",class:"jps-top-notification","inner-class":"jps-top-notification-inner jps-top-section-inner"},{default:p(()=>
1[s("h2",Ut,[n(w,{name:"koicon/koicon-26"}),v(" "+i(e(A)("ãç¥ãã","Announcements")),1)]),n(Fe,{parts:e(_)},null,8,["parts"])]),_:1})):B("",!0),n(D,{tag:"section","inner-class":"jps-top-pickups jps-top-section-inner"},{default:p(()=>[n(X,null,{default:p(()=>[(a(!0),l(I,null,F(e(U),(r,P)=>(a(),l("div",{class:"jps-top-pickups-inner",key:r.cpid},[s("h2",zt,[n(w,{name:("autoKoicon"in t?t.autoKoicon:e(Pe))(r.title.ja)},null,8,["name"]),v(" "+i(e(d)(r.title)),1)]),s("div",Nt,[(a(!0),l(I,null,F(V(r.parts),M=>(a(),J(se,{key:M.def.cpid,to:("linkParamToLink"in t?t.linkParamToLink:e(ue))(M.internalLink,M.link),class:Le(["jps-top-pickups-link",{"is-large-pickup":P==2}])},{default:p(()=>{var be;return[(be=M.image)!=null&&be.imgType?(a(),l(I,{key:0},[s("div",Vt,[n(ge,{image:M.image},null,8,["image"])]),s("h3",null,i(e(d)(M.title)),1),P==2?(a(),l("p",Dt,i(e(d)(M.description)),1)):B("",!0)],64)):(a(),l("span",Jt,[v(i(e(d)(M.title))+" ",1),n(w,{name:"mdi/chevron-right"})]))]}),_:2},1032,["to","class"]))),128))])]))),128))]),_:1})]),_:1}),n(X,null,{default:p(()=>[(a(!0),l(I,null,F(e(ee),r=>(a(),J(D,{tag:"section",class:"jps-top-others","inner-class":"jps-top-section-inner",key:r.cpid},{default:p(()=>[s("div",Kt,[s("h2",Qt,[n(w,{name:("autoKoicon"in t?t.autoKoicon:e(Pe))(r.title.ja)},null,8,["name"]),v(" "+i(e(d)(r.title)),1)]),s("div",Rt,[(a(!0),l(I,null,F(he(r.cpid),P=>(a(),J(se,{key:P.def.cpid,to:("linkParamToLink"in t?t.linkParamToLink:e(ue))(P.internalLink,P.link),class:"jps-top-others-link"},{default:p(()=>{var M;return[(M=P.image)!=null&&M.imgType?(a(),l("div",Gt,[n(ge,{image:P.image},null,8,["image"]),o[5]||(o[5]=s("div",{class:"img-shade"},null,-1)),s("h3",null,i(e(d)(P.title)),1)])):(a(),l("span",Wt,[v(i(e(d)(P.title))+" ",1),n(w,{name:"mdi/chevron-right"})]))]}),_:2},1032,["to"]))),128))]),u(r.cpid)?(a(),l("div",Xt,[s("button",{class:"jps-link-button",onClick:P=>le(r.cpid)},[v(i(re(r.cpid)?e(d)(e(C).hide):e(d)(e(C).more))+" ",1),n(w,{name:re(r.cpid)?"mdi/chevron-up":"mdi/chevron-down"},null,8,["name"])],8,Yt)])):B("",!0)])]),_:2},1024))),128))]),_:1}),s("div",qt,[n(D,{tag:"section","inner-class":"jps-top-notification-inner jps-top-bg-group-section"},{default:p(()=>[s("h2",Zt,[n(w,{name:"koicon/koicon-26"}),v(" "+i(e(A)("æ°çæ å ±","News")),1)]),e(te)?(a(),l("div",es,[s("p",null,[n(se,{to:e(te).path},{default:p(()=>[v(i(e(z)(e(te).date))+" "+i(e(d)(e(te).title)),1)]),_:1},8,["to"])])])):B("",!0)]),_:1}),n(D,{tag:"section","inner-class":"jps-top-bg-group-section"},{default:p(()=>[e(S)?(a(),l("p",ts,i(e(K)("ã¸ã£ãã³ãµã¼ãã¯æãå½ã®å¹ åºãåéã®ãã¸ã¿ã«ã¢ã¼ã«ã¤ãã¨é£æºãã夿§ãªã³ã³ãã³ããã¾ã¨ãã¦æ¤ç´¢ã»é²è¦§ã»æ´»ç¨ã§ãããã©ãããã©ã¼ã ã§ãããã¸ã¿ã«ã¢ã¼ã«ã¤ãæ¨é²ã«é¢ããæ¤è¨ä¼ã®æ¹éã®ãã¨ããã¾ãã¾ãªæ©é¢ã®ååã«ãããå½ç«å½ä¼å³æ¸é¤¨ãã·ã¹ãã ãéç¨ãã¦ãã¾ããç¾å¨ã{}ã®ãã¼ã¿ãã¼ã¹ã¨é£æºãã{}ä»¶ã®ãã¼ã¿ãåé²ãã¦ãã¾ãã","Japan Search is a national platform for aggregating metadata of digital resources of various fields and operated by the National Diet Library, Japan, in cooperation with a variety of organizations in Japan under policies established by the Study Group for Promoting Digital Archiving.Japan Search is now linked to {} databases, and contains {} searchable contents.",e(N)(Number(e(S).pageParams.dbCount)),e(N)(Number(e(S).pageParams.itemCount)))),1)):B("",!0)]),_:1})])])}}});export{Ss as default}; 2//# sourceMappingURL=C0hvdsiP.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.