1import{a as e}from"./rolldown-runtime-R9bKdBD2.js";import{i as t,r as n}from"./framework-DoHeAR4W.js";import{t as r}from"./createLucideIcon-DVlCm2H8.js";import{t as i}from"./check-BjeGGWSC.js";import{t as a}from"./file-text-BGUm2h40.js";import{t as o}from"./x-C_pyEa8s.js";var s=r(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),c=r(`printer`,[[`path`,{d:`M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2`,key:`143wyd`}],[`path`,{d:`M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6`,key:`1itne7`}],[`rect`,{x:`6`,y:`14`,width:`12`,height:`8`,rx:`1`,key:`1ue0tg`}]]),l=r(`type`,[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]),u=e(t(),1),d=n();function f(e,t){return`@article{${`lebovits${t||`publication`}${e.split(/\s+/).find(e=>e.length>4)?.replace(/[^a-z]/gi,``)||``}`.toLowerCase()},\n author = {Lebovits, Gerald},\n title = {${e.replace(/[{}]/g,``)}},${t?`\n year = {${t}},`:``}\n}`}function p({title:e,citation:t,year:n}){let[r,p]=(0,u.useState)(``),[m,h]=(0,u.useState)(!1),[g,_]=(0,u.useState)(`published`),v=async(e,t)=>{await navigator.clipboard.writeText(e),p(t),window.setTimeout(()=>p(``),1600)},y=()=>document.documentElement.classList.toggle(`large-text`),b=`Gerald Lebovits, ${e}${n?` (${n})`:``}.`,x={published:t||b,bluebook:t||b,chicago:`Gerald Lebovits. â${e}.â${n?` ${n}.`:``}`,mla:`Lebovits, Gerald. â${e}.â${n?` ${n}.`:``}`,apa:`Lebovits, G.${n?` (${n}).`:``} ${e}.`,bibtex:f(e,n||``)};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(`div`,{className:`record-tools`,"aria-label":`Document tools`,children:[(0,d.jsxs)(`button`,{type:`button`,onClick:()=>h(e=>!e),"aria-expanded":m,children:[(0,d.jsx)(a,{size:15}),` Citation generator`]}),(0,d.jsxs)(`button`,{type:`button`,onClick:()=>v(f(e,n||``),`bibtex`),children:[r===`bibtex`?(0,d.jsx)(i,{size:15}):(0,d.jsx)(s,{size:15}),` BibTeX`]}),(0,d.jsxs)(`button`,{type:`button`,onClick:()=>window.print(),children:[(0,d.jsx)(c,{size:15}),` Print`]}),(0,d.jsxs)(`button`,{type:`button`,onClick:y,children:[(0,d.jsx)(l,{size:15}),` Text size`]})]}),m&&(0,d.jsxs)(`section`,{className:`citation-generator`,"aria-labelledby":`citation-generator-heading`,children:[(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`h2`,{id:`citation-generator-heading`,children:`Citation generator`}),(0,d.jsx)(`button`,{type:`button`,onClick:()=>h(!1),"aria-label":`Close citation generator`,children:(0,d.jsx)(o,{})})]}),(0,d.jsxs)(`label`,{children:[(0,d.jsx)(`span`,{children:`Style`}),(0,d.jsxs)(`select`,{value:g,onChange:e=>_(e.target.value),children:[(0,d.jsx)(`option`,{value:`published`,children:`Published citation`}),(0,d.jsx)(`option`,{value:`bluebook`,children:`Bluebook`}),(0,d.jsx)(`option`,{value:`chicago`,children:`Chicago`}),(0,d.jsx)(`option`,{value:`mla`,children:`MLA`}),(0,d.jsx)(`option`,{value:`apa`,children:`APA`}),(0,d.jsx)(`option`,{value:`bibtex`,children:`BibTeX`})]})]}),(0,d.jsx)(`textarea`,{value:x[g],readOnly:!0,rows:g===`bibtex`?6:3,"aria-label":`Generated citation`}),(0,d.jsxs)(`button`,{className:`citation-copy`,type:`button`,onClick:()=>v(x[g],`generated`),children:[r===`generated`?(0,d.jsx)(i,{}):(0,d.jsx)(s,{}),r===`generated`?`Copied`:`Copy citation`]}),(0,d.jsx)(`p`,{children:`Check the generated citation against the requirements of the court, journal, or institution where it will be used.`})]})]})}export{p as RecordTools};
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.