iBet uBet web content aggregator. Adding the entire web to your favor.
iBet uBet web content aggregator. Adding the entire web to your favor.



Link to original content: http://ndlsearch.ndl.go.jp/_nuxt/CzCpImsk.js
import{T as f,aI as _,e3 as L,K as p,a0 as N}from"./CW2SsgDF.js";const{getTitleLabel:d,joinMeta:s,isArticle:c,isExpandBook:O}=N(),x=()=>{const h=(e,t)=>e?d(t):s(t==null?void 0:t.meta,"t02450").substring(0,200),P=e=>{var r;return((r=e==null?void 0:e.meta)!=null&&r.t03006?`${s(e==null?void 0:e.meta,"t07731")} p.${s(e.meta,"t03006")}`:s(e==null?void 0:e.meta,"t07731")).substring(0,40)},T=(e,t,r,o)=>{const{$langLabel:l}=f();return e?e.map(n=>({articleTitle:n.articleTitle,articleAuthor:n.articleAuthor,articlePage:n.articlePage,note:"",others:[],deliveryType:"DELIVERY_TYPE_SHIPPING",color:"MONOCHROME",isError:!1,isDeleted:!1})):[{articleTitle:o?l(_.rcopyInput.indexOnly):c(t)?s(t==null?void 0:t.meta,"t02450").substring(0,200):"",articleAuthor:c(t)?s(t==null?void 0:t.meta,"t0245c").substring(0,40):"",articlePage:c(t)?r:"",note:"",others:o?["index"]:[],deliveryType:"DELIVERY_TYPE_SHIPPING",color:"MONOCHROME",isError:!1,isDeleted:!1}]},u=e=>e.filter(t=>{var r,o,l,n;return((r=t.articleTitle)==null?void 0:r.trim())||((o=t.articleAuthor)==null?void 0:o.trim())||((l=t.articlePage)==null?void 0:l.trim())||((n=t.note)==null?void 0:n.trim())||t.others.length}),i=e=>e.forEach(t=>{Object.assign(t,{patronNote:a(t)}),Object.assign(t,{tocIndex:-1}),delete t.note,delete t.others,delete t.color,delete t.isError,delete t.isDeleted,delete t.deliveryType}),g=e=>{var r;const t=a(e);return(r=e.toc)!=null&&r.length?e.toc.map(o=>({tocIndex:o,articleTitle:"",articleAuthor:"",articlePage:"",patronNote:t})):e.note||e.others.length?[{tocIndex:-1,articleTitle:"",articleAuthor:"",articlePage:"",patronNote:t}]:[]},E=(e,t)=>{var l;const r=u(e);i(r);const o=g(t);if((l=t.toc)!=null&&l.length&&!(o!=null&&o.length)){const{sendErrorLog:n}=L();n({case:"カートボタン押下時のリクエスト作成の不具合",message:"#18804 目次を指定したが、カート追加のリクエスト情報が空になっている",inputInfoList:e,tocInfo:t})}return r.concat(o)};function a(e){var t,r,o;return JSON.stringify({note:e.note||"",option_cover:!!((t=e.others)!=null&&t.includes("cover")),option_index:!!((r=e.others)!=null&&r.includes("index")),option_colophon:!!((o=e.others)!=null&&o.includes("colophon")),color_type:e.deliveryType==="DELIVERY_TYPE_SHIPPING"?e.color:"",deliveryType:e.deliveryType})}function m(e){return e?e.length>200?e.substring(0,200)+"...":e:""}function y(e,t){return O(e)?d(e):t}function I(e){return e==="DELIVERY_TYPE_SHIPPING"?p.remoteCopy:p.pdfDownload}return{getTitle:h,getPageOutput:P,getInputInfoList:T,filterRequestInput:u,mappingPatronNote:i,createRequestToc:g,createRequestInput:E,createPatronInfo:a,shortenTitle:m,getRcopyTitle:y,getHelpLink:I}};export{x as u};