1import{j as e,r as c}from"./chunk-LFPYN7LY-BOVuWNtv.js";import{c as _,u as x,a as F,_ as g}from"./poke-data-context-CsGb_sRf.js";import{u as D,l as H}from"./index-DrWBeBLS.js";import{a as M}from"./index-DJiPX0kP.js";import{c as Y}from"./poke-type-Hat6wXva.js";import{T as V}from"./index-Cj0vMi5E.js";import{g as q}from"./pokedex-utils-BUbJUtsj.js";import{g as O,s,P as U}from"./pokemon-stats-Dm8DmgHd.js";import{G as b}from"./game-text-BmXO6VmV.js";import{P as k}from"./poke-type-DRcxXG01.js";import{T as J}from"./index-CDym0lbs.js";import{B as K}from"./index-DdsphBsy.js";import{S as Q}from"./index-bVGJlZYP.js";const T={"legends-z-a":[],"scarlet-and-violet":["Scarlet","Violet"],"sword-and-shield":["Sword","Shield"],"legends-arceus":[],"firered-and-leafgreen":["FireRed","LeafGreen"],"brilliant-diamond-and-shining-pearl":["Brilliant Diamond","Shining Pearl"],"diamond-and-pearl":["Diamond","Pearl"],platinum:["Platinum"],"heartgold-and-soulsilver":["HeartGold","SoulSilver"],"ruby-and-sapphire":["Ruby","Sapphire"],emerald:["Emerald"],"red-and-blue":["Red","Blue"],yellow:["Yellow"],"gold-and-silver":["Gold","Silver"],crystal:["Crystal"]},X="_Line_pchte_1",Z={Line:X};function d({className:a,left:n,right:o,rightExtra:p,...j}){return e.jsxs("div",{className:_(Z.Line,a),...j,children:[e.jsx("span",{children:n}),e.jsxs("span",{children:[o,p&&e.jsx("span",{children:p})]})]})}const ee="_Lines_1n7j8_1",se={Lines:ee};function S({className:a,children:n,...o}){return e.jsx("div",{className:_(se.Lines,a),...o,children:n})}function xe({pokemon:a,interactable:n=!0,showTraining:o=!0,showDescription:p=!0,showStats:j=!0,consistentHeight:$=!1,showButton:L=!1,showNationalId:P=!1,className:w,...A}){const z=x(i=>i.viewport),B=x(i=>i.gamifyHref),G=x(i=>i.linkComponent),r=x(i=>i.m),{getEntity:u,gameData:v,game:t}=F(),{gameAssetUrl:I}=D(),l=c.useMemo(()=>[0,1].map(i=>v.pokemonTypes[a.types[i]]),[a.types,v.pokemonTypes]),R=c.useMemo(()=>({background:l[1]?`linear-gradient(100deg, ${l[0].color}, ${l[0].color} 50%, ${l[1].color} 50%, ${l[1].color})`:`${l[0].color}`}),[l]),[h,C]=c.useState(100),f=c.useCallback(i=>{C(i?g.clamp(Number(i)||100,1,100):1)},[]),W=c.useMemo(()=>O(t),[t]),{nationalId:y,pokedexId:N}=q(a),E=l.filter(i=>i).length===1;return e.jsxs("div",{className:_(s.Card,w),...A,children:[e.jsxs("div",{className:s.Card__section1,children:[e.jsxs("div",{className:s.Card__head,children:[e.jsx("div",{style:R,className:s.Card__bkg}),e.jsxs("div",{className:s.Card__titleWrapper,children:[e.jsx("div",{className:s.Card__title,children:a._display}),e.jsxs("div",{className:s.Card__subTitle,children:[r.number_short()," ",`#${N?`${N}${P?` (#${y})`:""}`:y}`]})]}),e.jsx("div",{className:s.Card__tagsWrapper,children:e.jsx("div",{className:s.Card__tags,children:a.types.map(i=>e.jsx(k,{type:v.pokemonTypes[i],size:E?"lg":"md",linkToTypePage:!0},i))})})]}),e.jsxs("div",{className:s.Card__body,children:[e.jsx("div",{className:s.Card__bodyLeft,children:e.jsx("div",{className:_(s.Card__imageWrapper,$&&s["Card__imageWrapper--fixedHeight"]),children:a._icon&&e.jsx("img",{className:_(s.Card__image,t?.metadata?.isPixelArt&&s["Card__image--pixelated"],t?.id==="legends-z-a"&&s["Card__image--rounded"]),src:`${I}/db/${a._icon}`})})}),e.jsx("div",{className:s.Card__info,children:e.jsxs("div",{className:s.Card__infoTop,children:[e.jsxs("div",{className:s.Card__sectionTitle,children:[e.jsx(H,{size:18,color:"rgb(var(--tc-app-color-gray-5))"}),r.info()]}),e.jsxs(S,{children:[t?.id==="scarlet-and-violet"?e.jsx(d,{left:r.species(),right:a.zukanType}):void 0,e.jsx(d,{left:r.height(),right:e.jsxs(e.Fragment,{children:[g.round(a.species.height,1),"m"]})}),e.jsx(d,{left:r.weight(),right:e.jsxs(e.Fragment,{children:[g.round(a.species.weight,1),"kg"]})})]})]})})]})]}),p?e.jsx("div",{className:s.Card__infoBottom,children:Array.isArray(a.description)?a.description.map((i,m)=>e.jsxs("div",{className:s.Card__description,children:[T[t?.id??""]?.[m]?`${T[t?.id??""][m]}: `:"",e.jsx(b,{text:i})]},m)):e.jsx("div",{className:s.Card__description,children:e.jsx(b,{text:a.description})})}):void 0,t?.metadata.hasAbilities?e.jsxs("div",{className:s.Card__abilities,children:[e.jsxs("span",{className:s.Card__sectionTitle,children:[e.jsx(Y,{className:s.Card__sectionIconRotated,size:16,color:"rgb(var(--tc-app-color-gray-5))"}),r.abilities()]}),e.jsxs("div",{className:s.Card__abilityList,children:[g.uniq(a.abilities)?.map((i,m)=>e.jsx("div",{className:s.Card__ability,children:u(i,"poke-ability")?._display},m)),a.hiddenAbility?e.jsx("div",{className:s.Card__ability,children:u(a.hiddenAbility,"poke-ability")?._display}):void 0]})]}):void 0,o?e.jsxs("div",{className:s.Card__training,children:[e.jsxs("div",{className:s.Card__sectionTitle,children:[e.jsx(V,{size:18,color:"rgb(var(--tc-app-color-gray-5))"}),r.training()]}
1),e.jsxs(S,{children:[a.evYields?e.jsx(d,{left:"EV Yield",right:e.jsx("span",{style:{display:"flex",flexWrap:"wrap",gap:"4px"},children:Object.entries(a.evYields).filter(i=>i[1]).map(i=>e.jsxs("span",{children:[W[i[0]]?.shortName,": ",i[1]]},i[0]))})}):void 0,e.jsx(d,{left:r.catch_rate(),right:a.catchRate}),e.jsx(d,{left:r.base_friendship(),right:a.baseFriendship}),e.jsx(d,{left:r.growth_rate(),right:a.growthRate})]})]}):void 0,j?e.jsxs("div",{className:s.Card__stats,children:[e.jsxs("div",{className:s.Card__sectionTitleWrapper,children:[e.jsxs("div",{className:s.Card__sectionTitle,children:[e.jsx(M,{size:18,color:"rgb(var(--tc-app-color-gray-5))"}),r.base_stats()]}),e.jsxs("span",{className:s.Card__levelSelector,children:[r.at_level()," ",n?e.jsx(J,{className:s.Card__levelInput,size:"sm",type:"number",value:`${h}`,onChange:f}):h]})]}),e.jsxs("div",{className:s.Card__statsWrapper,children:[n?e.jsx(Q,{min:1,max:100,value:h,onChange:f}):void 0,e.jsx(U,{pokemon:a,level:h})]})]}):void 0,L&&!z.hasPointer?c.createElement(G,{className:s.Card__link,to:B(`/pokedex/${a._identity}`)},e.jsx(K,{buttonStyle:"primary",style:{padding:"0 24px"},children:"Go to Page"})):void 0]})}export{S as I,xe as P,d as a};
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.