1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[26494],{40241:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(52676),o=n(75271),i=n(23742),a=n(80614),l=n(4814);function WordWrapIcon(e){return(0,r.jsx)("svg",{viewBox:"0 0 24 24",width:"24",height:"24",...e,children:(0,r.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}let Button=e=>{let{children:t,className:n,onClick:o,type:i="button",disabled:a,title:s,tabIndex:c}=e;return(0,r.jsx)("button",{type:i,onClick:o,disabled:a,title:s,tabIndex:c,className:(0,l.Z)("nextra-button nx-transition-all active:nx-opacity-50","nx-bg-primary-700/5 nx-border nx-border-black/5 nx-text-gray-600 hover:nx-text-gray-900 nx-rounded-md nx-p-1.5","dark:nx-bg-primary-300/10 dark:nx-border-white/10 dark:nx-text-gray-400 dark:hover:nx-text-gray-50",n),children:t})};function CheckIcon(e){return(0,r.jsx)("svg",{viewBox:"0 0 20 20",width:"1em",height:"1em",fill:"currentColor",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}function CopyIcon(e){return(0,r.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",...e,children:[(0,r.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}let CopyToClipboard=e=>{let{getValue:t,className:n}=e,[i,a]=(0,o.useState)(!1);(0,o.useEffect)(()=>{if(!i)return;let e=setTimeout(()=>{a(!1)},2e3);return()=>{clearTimeout(e)}},[i]);let l=(0,o.useCallback)(async()=>{var e;a(!0),(null===(e=navigator)||void 0===e?void 0:e.clipboard)||console.error("Access to clipboard rejected!");try{await navigator.clipboard.writeText(t())}catch(e){console.error("Failed to copy!")}},[t]),s=i?CheckIcon:CopyIcon;return(0,r.jsx)(Button,{onClick:l,className:n,children:(0,r.jsx)(s,{className:"nextra-copy-icon nx-pointer-events-none nx-h-4 nx-w-4"})})};var components_CopyPageDropdown=()=>{let[e,t]=(0,o.useState)(!1),[n,i]=(0,o.useState)(!1),[l,s]=(0,o.useState)(""),[c,d]=(0,o.useState)("idle"),[x,p]=(0,o.useState)(null),g=(0,a.useRouter)(),getHoverBg=e=>{if(x!==e)return"transparent";let t=document.documentElement.classList.contains("dark");return t?"rgba(255, 255, 255, 0.1)":"rgba(0, 0, 0, 0.05)"},getPagePath=()=>{let e=g.pathname,t=e.replace(/^\//,"").replace(/\/$/,"");return t.endsWith(".en")?"".concat(t,".mdx"):"".concat(t,".en.mdx")},copyToClipboard=async e=>{if(navigator.clipboard&&window.isSecureContext)try{await navigator.clipboard.writeText(e);return}catch(e){console.warn("Clipboard API failed, trying fallback:",e)}return new Promise((t,n)=>{let r=document.createElement("textarea");r.value=e,r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.width="1px",r.style.height="1px",r.style.padding="0",r.style.border="none",r.style.outline="none",r.style.boxShadow="none",r.style.background="transparent",r.style.fontSize="16px",r.style.opacity="0",r.style.pointerEvents="none",document.body.appendChild(r),r.focus();let o=/ipad|iphone/i.test(navigator.userAgent);if(o){let t=document.createRange();t.selectNodeContents(r);let n=window.getSelection();n&&(n.removeAllRanges(),n.addRange(t)),r.setSelectionRange(0,e.length)}else r.select(),r.setSelectionRange(0,e.length);setTimeout(()=>{try{let e=document.execCommand("copy");setTimeout(()=>{document.body.removeChild(r)},100),e?t():n(Error("Copy command was unsuccessful"))}catch(e){document.body.removeChild(r),n(e)}},100)})},fetchPageContent=async()=>{let e=getPagePath();console.log("Fetching page path:",e);let t=await fetch("/api/getPageContent?pagePath=".concat(encodeURIComponent(e)));if(!t.ok){let e=await t.json();throw console.error("API Error:",e),Error(e.error||"Failed to fetch page content")}let n=await t.json();return n.content},handleCopyAsMarkdown=async()=>{try{d("copying");let e=await fetchPageContent();await copyToClipboard(e),d("success"),setTimeout(()=>{d("idle"),t(!1)},1500)}catch(t){console.error("Failed to copy:",t),d("idle");let e=t instanceof Error?t.message:"Failed to copy content";alert(e)}},handleCopyFromModal=async()=>{try{await copyToClipboard(l),alert("Content copied to clipboard!")}catch(e){console.error("Failed to copy:",e),alert("Failed to copy content")}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{style:{position:"relative",display:"inline-block"},children:[(0,r.jsxs)("button",{onClick:()=>t(!e),className:"hover:nx-bg-gray-100 dark:hover:nx-bg-neutral-800 nx-border nx-border-gray-200 dark:nx-border-neutral-700",style:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"6px 12px",backgroundColor:"transparent",borderRadius:"6px",fontSize:"0.875rem",fontWeight:500,cursor:"pointer",color:"inherit",transition:"all 0.2s ease"},children:[(0,r.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,r.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),"Copy page",(0,r.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:e?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"},children:(0,r.jsx)("polyline",{points:"6 9 12 15 18 9"})})]}),e&&(0,r.jsxs)("div",{className:"nx-bg-white dark:nx-bg-neutral-900 nx-border nx-border-gray-200 dark:nx-border-neutral-700",style:{position:"absolute",top:"100%",right:0,marginTop:"4px",borderRadius:"8px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",minWidth:"240px",zIndex:50,overflow:"hidden"},children:[(0,r.jsxs)("button",{onClick:handleCopyAsMarkdown,disabled:"copying"===c,onMouseEnter:()=>p("copy"),onMouseLeave:()=>p(null),style:{width:"100%",display:"flex",alignItems:"center",gap:"8px",padding:"10px 12px",backgroundColor:getHoverBg("copy"),border:"none",borderRadius:"6px",fontSize:"0.875rem",cursor:"copying"===c?"wait":"pointer",textAlign:"left",color:"inherit",transition:"background-color 0.15s ease"},children:[(0,r.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,r.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{style:{fontWeight:500},children:"success"===c?"Copied!":"Copy page"}),(0,r.jsx)("div",{className:"nx-text-gray-500 dark:nx-text-gray-400",style:{fontSize:"0.75rem"},children:"Copy page as Markdown for LLMs"})]})]}),(0,r.jsxs)("button",{onClick:()=>{let e=window.location.origin+g.asPath,n=e.replace(/\.html$/,".md"),r="https://claude.ai/new?q=".concat(encodeURIComponent("Read from ".concat(n," so I can ask questions about it.")));window.open(r,"_blank"),t(!1)},onMouseEnter:()=>p("claude"),onMouseLeave:()=>p(null),style:{width:"100%",display:"flex",alignItems:"center",gap:"8px",padding:"10px 12px",backgroundColor:getHoverBg("claude"),border:"none",borderRadius:"6px",fontSize:"0.875rem",cursor:"pointer",textAlign:"left",color:"inherit",transition:"background-color 0.15s ease"},children:[(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 1200 1200",fill:"#d97757",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M 233.959793 800.214905 L 468.644287 668.536987 L 472.590637 657.100647 L 468.644287 650.738403 L 457.208069 650.738403 L 417.986633 648.322144 L 283.892639 644.69812 L 167.597321 639.865845 L 54.926208 633.825623 L 26.577238 627.785339 L 3.3e-05 592.751709 L 2.73832 575.27533 L 26.577238 559.248352 L 60.724873 562.228149 L 136.187973 567.382629 L 249.422867 575.194763 L 331.570496 580.026978 L 453.261841 592.671082 L 472.590637 592.671082 L 475.328857 584.859009 L 468.724915 580.026978 L 463.570557 575.194763 L 346.389313 495.785217 L 219.543671 411.865906 L 153.100723 363.543762 L 117.181267 339.060425 L 99.060455 316.107361 L 91.248367 266.01355 L 123.865784 230.093994 L 167.677887 233.073853 L 178.872513 236.053772 L 223.248367 270.201477 L 318.040283 343.570496 L 441.825592 434.738342 L 459.946411 449.798706 L 467.194672 444.64447 L 468.080597 441.020203 L 459.946411 427.409485 L 392.617493 305.718323 L 320.778564 181.932983 L 288.80542 130.630859 L 28
10.348999 99.865845 C 277.369171 87.221436 275.194641 76.590698 275.194641 63.624268 L 312.322174 13.20813 L 332.8591 6.604126 L 382.389313 13.20813 L 403.248352 31.328979 L 434.013519 101.71814 L 483.865753 212.537048 L 561.181274 363.221497 L 583.812134 407.919434 L 595.892639 449.315491 L 600.40271 461.959839 L 608.214783 461.959839 L 608.214783 454.711609 L 614.577271 369.825623 L 626.335632 265.61084 L 637.771851 131.516846 L 641.718201 93.745117 L 660.402832 48.483276 L 697.530334 24.000122 L 726.52356 37.852417 L 750.362549 72 L 747.060486 94.067139 L 732.886047 186.201416 L 705.100708 330.52356 L 686.979919 427.167847 L 697.530334 427.167847 L 709.61084 415.087341 L 758.496704 350.174561 L 840.644348 247.490051 L 876.885925 206.738342 L 919.167847 161.71814 L 946.308838 140.29541 L 997.61084 140.29541 L 1035.38269 196.429626 L 1018.469849 254.416199 L 965.637634 321.422852 L 921.825562 378.201538 L 859.006714 462.765259 L 819.785278 530.41626 L 823.409424 535.812073 L 832.75177 534.92627 L 974.657776 504.724915 L 1051.328979 490.872559 L 1142.818848 475.167786 L 1184.214844 494.496582 L 1188.724854 514.147644 L 1172.456421 554.335693 L 1074.604126 578.496765 L 959.838989 601.449829 L 788.939636 641.879272 L 786.845764 643.409485 L 789.261841 646.389343 L 866.255127 653.637634 L 899.194702 655.409424 L 979.812134 655.409424 L 1129.932861 666.604187 L 1169.154419 692.537109 L 1192.671265 724.268677 L 1188.724854 748.429688 L 1128.322144 779.194641 L 1046.818848 759.865845 L 856.590759 714.604126 L 791.355774 698.335754 L 782.335693 698.335754 L 782.335693 703.731567 L 836.69812 756.885986 L 936.322205 846.845581 L 1061.073975 962.81897 L 1067.436279 991.490112 L 1051.409424 1014.120911 L 1034.496704 1011.704712 L 924.885986 929.234924 L 882.604126 892.107544 L 786.845764 811.48999 L 780.483276 811.48999 L 780.483276 819.946289 L 802.550415 852.241699 L 919.087341 1027.409424 L 925.127625 1081.127686 L 916.671204 1098.604126 L 886.469849 1109.154419 L 853.288696 1103.114136 L 785.073914 1007.355835 L 714.684631 899.516785 L 657.906067 802.872498 L 650.979858 806.81897 L 617.476624 1167.704834 L 601.771851 1186.147705 L 565.530212 1200 L 535.328857 1177.046997 L 519.302124 1139.919556 L 535.328857 1066.550537 L 554.657776 970.792053 L 570.362488 894.68457 L 584.536926 800.134277 L 592.993347 768.724976 L 592.429626 766.630859 L 585.503479 767.516968 L 514.22821 865.369263 L 405.825531 1011.865906 L 320.053711 1103.677979 L 299.516815 1111.812256 L 263.919525 1093.369263 L 267.221497 1060.429688 L 287.114136 1031.114136 L 405.825531 880.107361 L 477.422913 786.52356 L 523.651062 732.483276 L 523.328918 724.671265 L 520.590698 724.671265 L 205.288605 929.395935 L 149.154434 936.644409 L 124.993355 914.01355 L 127.973183 876.885986 L 139.409409 864.80542 L 234.201385 799.570435 L 233.879227 799.8927 Z"})}),(0,r.jsxs)("div",{style:{flex:1},children:[(0,r.jsx)("div",{style:{fontWeight:500},children:"Open in Claude"}),(0,r.jsx)("div",{className:"nx-text-gray-500 dark:nx-text-gray-400",style:{fontSize:"0.75rem"},children:"Ask questions about this page"})]}),(0,r.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.5},children:[(0,r.jsx)("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),(0,r.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,r.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})]}),(0,r.jsxs)("button",{onClick:()=>{let e=window.location.origin+g.asPath,n=e.replace(/\.html$/,".md"),r="https://chatgpt.com/?prompt=".concat(encodeURIComponent("Read from ".concat(n," so I can ask questions about it.")));window.open(r,"_blank"),t(!1)},onMouseEnter:()=>p("chatgpt"),onMouseLeave:()=>p(null),style:{width:"100%",display:"flex",alignItems:"center",gap:"8px",padding:"10px 12px",backgroundColor:getHoverBg("chatgpt"),border:"none",borderRadius:"6px",fontSize:"0.875rem",cursor:"pointer",textAlign:"left",color:"inherit",transition:"background-color 0.15s ease"},children:[(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 320 320",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"m297.
106 130.97c7.26-21.79 4.76-45.66-6.85-65.48-17.46-30.4-52.56-46.04-86.84-38.68-15.25-17.18-37.16-26.95-60.13-26.81-35.04-.08-66.13 22.48-76.91 55.82-22.51 4.61-41.94 18.7-53.31 38.67-17.59 30.32-13.58 68.54 9.92 94.54-7.26 21.79-4.76 45.66 6.85 65.48 17.46 30.4 52.56 46.04 86.84 38.68 15.24 17.18 37.16 26.95 60.13 26.8 35.06.09 66.16-22.49 76.94-55.86 22.51-4.61 41.94-18.7 53.31-38.67 17.57-30.32 13.55-68.51-9.94-94.51zm-120.28 168.11c-14.03.02-27.62-4.89-38.39-13.88.49-.26 1.34-.73 1.89-1.07l63.72-36.8c3.26-1.85 5.26-5.32 5.24-9.07v-89.83l26.93 15.55c.29.14.48.42.52.74v74.39c-.04 33.08-26.83 59.9-59.91 59.97zm-128.84-55.03c-7.03-12.14-9.56-26.37-7.15-40.18.47.28 1.3.79 1.89 1.13l63.72 36.8c3.23 1.89 7.23 1.89 10.47 0l77.79-44.92v31.1c.02.32-.13.63-.38.83l-64.41 37.19c-28.69 16.52-65.33 6.7-81.92-21.95zm-16.77-139.09c7-12.16 18.05-21.46 31.21-26.29 0 .55-.03 1.52-.03 2.2v73.61c-.02 3.74 1.98 7.21 5.23 9.06l77.79 44.91-26.93 15.55c-.27.18-.61.21-.91.08l-64.42-37.22c-28.63-16.58-38.45-53.21-21.95-81.89zm221.26 51.49-77.79-44.92 26.93-15.54c.27-.18.61-.21.91-.08l64.42 37.19c28.68 16.57 38.51 53.26 21.94 81.94-7.01 12.14-18.05 21.44-31.2 26.28v-75.81c.03-3.74-1.96-7.2-5.2-9.06zm26.8-40.34c-.47-.29-1.3-.79-1.89-1.13l-63.72-36.8c-3.23-1.89-7.23-1.89-10.47 0l-77.79 44.92v-31.1c-.02-.32.13-.63.38-.83l64.41-37.16c28.69-16.55 65.37-6.7 81.91 22 6.99 12.12 9.52 26.31 7.15 40.1zm-168.51 55.43-26.94-15.55c-.29-.14-.48-.42-.52-.74v-74.39c.02-33.12 26.89-59.96 60.01-59.94 14.01 0 27.57 4.92 38.34 13.88-.49.26-1.33.73-1.89 1.07l-63.72 36.8c-3.26 1.85-5.26 5.31-5.24 9.06l-.04 89.79zm14.63-31.54 34.65-20.01 34.65 20v40.01l-34.65 20-34.65-20z"})}),(0,r.jsxs)("div",{style:{flex:1},children:[(0,r.jsx)("div",{style:{fontWeight:500},children:"Open in ChatGPT"}),(0,r.jsx)("div",{className:"nx-text-gray-500 dark:nx-text-gray-400",style:{fontSize:"0.75rem"},children:"Ask questions about this page"})]}),(0,r.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.5},children:[(0,r.jsx)("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),(0,r.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,r.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})]})]})]}),n&&(0,r.jsx)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:100,padding:"20px"},onClick:()=>i(!1),children:(0,r.jsxs)("div",{style:{backgroundColor:"white",borderRadius:"12px",maxWidth:"800px",width:"100%",maxHeight:"90vh",display:"flex",flexDirection:"column",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"},onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{style:{padding:"20px",borderBottom:"1px solid #e5e7eb",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,r.jsx)("h2",{style:{margin:0,fontSize:"1.25rem",fontWeight:600},children:"Page Markdown"}),(0,r.jsxs)("div",{style:{display:"flex",gap:"8px"},children:[(0,r.jsx)("button",{onClick:handleCopyFromModal,style:{padding:"6px 12px",backgroundColor:"#8b5cf6",color:"white",border:"none",borderRadius:"6px",fontSize:"0.875rem",fontWeight:500,cursor:"pointer",transition:"background-color 0.2s ease"},onMouseOver:e=>{e.currentTarget.style.backgroundColor="#7c3aed"},onMouseOut:e=>{e.currentTarget.style.backgroundColor="#8b5cf6"},children:"Copy"}),(0,r.jsx)("button",{onClick:()=>i(!1),style:{padding:"6px 12px",backgroundColor:"transparent",border:"1px solid #e5e7eb",borderRadius:"6px",fontSize:"0.875rem",fontWeight:500,cursor:"pointer",transition:"background-color 0.2s ease"},onMouseOver:e=>{e.currentTarget.style.backgroundColor="#f3f4f6"},onMouseOut:e=>{e.currentTarget.style.backgroundColor="transparent"},children:"Close"})]})]}),(0,r.jsx)("div",{style:{padding:"20px",overflow:"auto",flex:1},children:(0,r.jsx)("pre",{style:{margin:0,padding:"16px",backgroundColor:"#f9fafb",borderRadius:"6px",fontSize:"0.875rem",lineHeight:"1.5",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:l})})]})}),e&&(0,r.jsx)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:40},onClick:()=>t(!1)})]})};let s={logo:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 206 246",fill:"none",children:[(0,r.jsx)("circle",{cx:"40",cy:"40",r:"40",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"40",cy:"206",r:"40",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"166",cy:"120",r:"40",fill:"currentColor"})]}),(0,r.jsx)("span",{className:"logo-text",style:{marginLeft:".4em",fontWeight:800},children:"Prompt Engineering Guide"})]}),i18n:[{locale:"en",text:"English"},{locale:"zh",text:"䏿"},{locale:"jp",text:"æ¥æ¬èª"},{locale:"pt",text:"Portugu\xeas"},{locale:"it",text:"Italian"},{locale:"tr",text:"T\xfcrk\xe7e"},{locale:"es",text:"Espa\xf1ol"},{locale:"fr",text:"Fran\xe7ais"},{locale:"kr",text:"íêµì´"},{locale:"ca",text:"Catal\xe0"},{locale:"fi",text:"Finnish"},{locale:"ru",text:"Ð ÑÑÑкий"},{locale:"de",text:"Deutsch"},{locale:"ar",text:"Ø§ÙØ¹Ø±Ø¨ÙØ©"}],head:function(){let{title:e}=(0,i.ZR)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("title",{children:[e?e+" | Prompt Engineering Guide":"Prompt Engineering Guide"," "]}),(0,r.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),(0,r.jsx)("meta",{property:"og:title",content:"Prompt Engineering Guide"}),(0,r.jsx)("meta",{property:"og:description",content:"A Comprehensive Overview of Prompt Engineering"}),(0,r.jsx)("meta",{name:"og:title",content:e?e+" | Prompt Engineering Guide":"Prompt Engineering Guide"}),(0,r.jsx)("link",{rel:"icon",href:"/144-favicon.svg",type:"image/svg+xml"}),(0,r.jsx)("link",{rel:"icon",href:"/144-favicon-dark.svg",type:"image/svg+xml",media:"(prefers-color-scheme: dark)"})]})},project:{link:"https://github.com/dair-ai/Prompt-Engineering-Guide"},chat:{link:"https://discord.gg/YbMT8k6GfX"},docsRepositoryBase:"https://github.com/dair-ai/Prompt-Engineering-Guide/tree/main/",footer
1:{text:(0,r.jsx)("div",{children:"Copyright \xa9 2026 DAIR.AI"})},search:{placeholder:"Search..."},gitTimestamp:e=>{let{timestamp:t}=e;return(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"},children:[(0,r.jsxs)("div",{children:["Last updated on ",t.toDateString()]}),(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,r.jsx)("span",{children:"Sponsored by"}),(0,r.jsx)("a",{href:"https://serpapi.com/",target:"_blank",rel:"noopener noreferrer",children:(0,r.jsx)("img",{src:"https://cdn.rawgit.com/standard/standard/master/docs/logos/serpapi.png",alt:"SerpAPI",style:{height:"24px",width:"auto",verticalAlign:"middle"}})})]})]})},components:{pre:e=>{let{children:t,className:n,hasCopyCode:i=!0,filename:a}=e,s=(0,o.useRef)(null),c=(0,o.useCallback)(()=>{let e=document.documentElement.dataset,t="nextraWordWrap"in e;t?delete e.nextraWordWrap:e.nextraWordWrap=""},[]);return(0,r.jsxs)("div",{className:"nextra-code-block nx-relative nx-mt-6 first:nx-mt-0",children:[a&&(0,r.jsx)("div",{className:"nx-absolute nx-top-0 nx-z-[1] nx-w-full nx-truncate nx-rounded-t-xl nx-bg-primary-700/5 nx-py-2 nx-px-4 nx-text-xs nx-text-gray-700 dark:nx-bg-primary-300/10 dark:nx-text-gray-200",children:a}),(0,r.jsx)("pre",{className:(0,l.Z)("nx-bg-primary-700/5 nx-mb-4 nx-overflow-x-auto nx-rounded-xl nx-subpixel-antialiased dark:nx-bg-primary-300/10 nx-text-[.9em]","contrast-more:nx-border contrast-more:nx-border-primary-900/20 contrast-more:nx-contrast-150 contrast-more:dark:nx-border-primary-100/40",a?"nx-pt-12 nx-pb-4":"nx-py-4",n),ref:s,children:o.isValidElement(t)&&"code"===t.type?t.props.children:t}),(0,r.jsxs)("div",{className:(0,l.Z)("nx-opacity-0 nx-transition [div:hover>&]:nx-opacity-100 focus-within:nx-opacity-100","nx-flex nx-gap-1 nx-absolute nx-m-[11px] nx-right-0",a?"nx-top-8":"nx-top-0"),children:[(0,r.jsx)(Button,{onClick:c,className:"md:nx-hidden",title:"Toggle word wrap elvis",children:(0,r.jsx)(WordWrapIcon,{className:"nx-pointer-events-none nx-h-4 nx-w-4"})}),i&&(0,r.jsx)(CopyToClipboard,{getValue:()=>{var e,t;return(null===(t=s.current)||void 0===t?void 0:null===(e=t.querySelector("code"))||void 0===e?void 0:e.textContent)||""}})]})]})}},main:e=>{let{children:t}=e,n=(0,a.useRouter)(),o="en"===n.locale&&"/"!==n.pathname;return(0,r.jsxs)(r.Fragment,{children:[o&&(0,r.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:"16px",position:"relative",zIndex:10,maxWidth:"100%"},children:(0,r.jsx)(components_CopyPageDropdown,{})}),t]})},navbar:{extraContent:(0,r.jsx)("a",{href:"/services",style:{padding:"6px 16px",backgroundColor:"#8b5cf6",color:"white",borderRadius:"6px",fontWeight:600,textDecoration:"none",display:"inline-flex",alignItems:"center",gap:"4px",transition:"all 0.2s ease",border:"none",cursor:"pointer",whiteSpace:"nowrap"},onMouseOver:e=>{e.currentTarget.style.backgroundColor="#7c3aed",e.currentTarget.style.transform="scale(1.05)"},onMouseOut:e=>{e.currentTarget.style.backgroundColor="#8b5cf6",e.currentTarget.style.transform="scale(1)"},children:"⨠Services"})}};var c=s},45184:function(){}}]);
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.