PageSourceSearch

https://spearedpeanut.com/_next/static/chunks/3194-6742699bf2116e7f.js

js spearedpeanut.com collected 2026-10-02 13:11:47 UTC 17,272 bytes, 25 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3194],{25813:(e,r,t)=>{t.d(r,{R:()=>a});var s=t(68019);t(10707);let a=({size:e="md",fullScreen:r=!1,text:t})=>{let a=(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3",children:[(0,s.jsxs)("svg",{className:`animate-spin text-[#1e3a8a] ${{sm:"w-6 h-6",md:"w-10 h-10",lg:"w-16 h-16"}[e]}`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,s.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,s.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),t&&(0,s.jsx)("p",{className:"text-sm text-[#6b7280]",children:t})]});return r?(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-white bg-opacity-90",children:a}):a}},41129:(e,r,t)=>{t.d(r,{T:()=>n});var s=t(68019);t(10707);var a=t(64508),l=t(89293);let o={danger:{icon:(0,s.jsx)("svg",{className:"w-6 h-6 text-red-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),bgColor:"bg-red-100"},warning:{icon:(0,s.jsx)("svg",{className:"w-6 h-6 text-yellow-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),bgColor:"bg-yellow-100"},info:{icon:(0,s.jsx)("svg",{className:"w-6 h-6 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),bgColor:"bg-blue-100"}},i={danger:"danger",warning:"secondary",info:"primary"},n=({isOpen:e,onClose:r,onConfirm:t,title:n,message:d,confirmText:c="确认",cancelText:x="取消",variant:m="danger",loading:f=!1})=>{let{icon:u,bgColor:h}=o[m],b=i[m],p=()=>{f||r()};return(0,s.jsx)(l.a,{isOpen:e,onClose:p,size:"sm",showCloseButton:!1,children:(0,s.jsxs)("div",{className:"flex flex-col items-center text-center",children:[(0,s.jsx)("div",{className:`w-12 h-12 rounded-full ${h} flex items-center justify-center mb-4`,children:u}),(0,s.jsx)("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:n}),(0,s.jsx)("p",{className:"text-gray-600 mb-6",children:d}),(0,s.jsxs)("div",{className:"flex gap-3 w-full",children:[(0,s.jsx)(a.$,{variant:"ghost",className:"flex-1",onClick:p,disabled:f,children:x}),(0,s.jsx)(a.$,{variant:b,className:"flex-1",onClick:()=>{f||t()},loading:f,disabled:f,children:c})]})]})})}},42845:(e,r,t)=>{t.d(r,{BT:()=>d,Wu:()=>c,ZB:()=>n,Zp:()=>o,aR:()=>i});var s=t(68019),a=t(10707),l=t(70508);let o=a.forwardRef(({className:e="",...r},t)=>(0,s.jsx)("div",{ref:t,className:(0,l.cn)("rounded-lg border bg-white shadow-sm",e),...r}));o.displayName="Card";let i=a.forwardRef(({className:e="",...r},t)=>(0,s.jsx)("div",{ref:t,className:(0,l.cn)("flex flex-col space-y-1.5 p-6",e),...r}));i.displayName="CardHeader";let n=a.forwardRef(({className:e="",...r},t)=>(0,s.jsx)("h3",{ref:t,className:(0,l.cn)("text-2xl font-semibold leading-none tracking-tight",e),...r}));n.displayName="CardTitle";let d=a.forwardRef(({className:e="",...r},t)=>(0,s.jsx)("p",{ref:t,className:(0,l.cn)("text-sm text-gray-500",e),...r}));d.displayName="CardDescription";let c=a.forwardRef(({className:e="",...r},t)=>(0,s.jsx)("div",{ref:t,className:(0,l.cn)("p-6 pt-0",e),...r}));c.displayName="CardContent",a.forwardRef(({className:e="",...r},t)=>(0,s.jsx)("div",{ref:t,className:(0,l.cn)("flex items-center p-6 pt-0",e),...r})).displayName="CardFooter"},51225:(e,r,t)=>{t.d(r,{p:()=>a});var s=t(68019);let a=(0,t(10707).forwardRef)(({label:e,error:r,helperText:t,fullWidth:a=!1,className:l="",...o},i)=>{let n=`
2      w-full px-4 py-2 text-base text-[#374151] bg-white border rounded-md
3      focus:outline-none focus:ring-2 focus:ring-[#1e3a8a] focus:border-transparent
4      disabled:bg-[#f3f4f6] disabled:cursor-not-allowed
5      ${r?"border-[#ef4444] focus:ring-[#ef4444]":"border-[#e5e7eb]"}
6      ${l}
7    `.trim();return(0,s.jsxs)("div",{className:a?"w-full":"",children:[e&&(0,s.jsx)("label",{className:"block text-sm font-medium text-[#374151] mb-1",children:e}),(0,s.jsx)("input",{ref:i,className:n,...o}),r&&(0,s.jsx)("p",{className:"mt-1 text-sm text-[#ef4444]",children:r}),t&&!r&&(0,s.jsx)("p",{className:"mt-1 text-sm text-[#6b7280]",children:t})]})});a.displayName="Input"},51640:(e,r,t)=>{t.d(r,{dj:()=>o,tE:()=>i,y8:()=>n});var s=t(68019),a=t(10707);let l=(0,a.createContext)(void 0),o=()=>{let e=(0,a.useContext)(l);if(!e)throw Error("useToast 必须在 ToastProvider 内使用");return e},i=({children:e})=>{let[r,t]=(0,a.useState)([]),o=(0,a.useRef)(new Map),i=(0,a.useCallback)((e,r="info")=>{let s=Math.random().toString(36).substring(7);t(t=>[...t,{id:s,message:e,type:r}]);let a=setTimeout(()=>{t(e=>e.filter(e=>e.id!==s)),o.current.delete(s)},5e3);o.current.set(s,a)},[]);(0,a.useEffect)(()=>()=>
7{o.current.forEach(e=>clearTimeout(e)),o.current.clear()},[]);let n=(0,a.useCallback)(e=>{t(r=>r.filter(r=>r.id!==e))},[]);return(0,s.jsxs)(l.Provider,{value:{showToast:i},children:[e,(0,s.jsx)("div",{className:"fixed top-4 right-4 z-50 space-y-2",children:r.map(e=>(0,s.jsxs)("div",{className:`flex items-center gap-3 px-4 py-3 rounded-lg shadow-lg min-w-[300px] max-w-md animate-slide-in ${{success:"bg-[#10b981] text-white",error:"bg-[#ef4444] text-white",warning:"bg-[#f59e0b] text-white",info:"bg-[#3b82f6] text-white"}[e.type]}`,children:[(e=>{switch(e){case"success":return(0,s.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})});case"error":return(0,s.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})});case"warning":return(0,s.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})});default:return(0,s.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}})(e.type),(0,s.jsx)("p",{className:"flex-1 text-sm font-medium",children:e.message}),(0,s.jsx)("button",{onClick:()=>n(e.id),className:"text-white hover:opacity-80 transition-opacity","aria-label":"Close toast",children:(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},e.id))})]})},n=({type:e,message:r})=>{let t=(()=>{switch(e){case"success":return(0,s.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})});case"error":return(0,s.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})});case"warning":return(0,s.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})});default:return(0,s.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}})();return(0,s.jsxs)("div",{className:`flex items-center gap-3 px-4 py-3 rounded-lg shadow-lg min-w-[300px] max-w-md ${{success:"bg-[#10b981] text-white",error:"bg-[#ef4444] text-white",warning:"bg-[#f59e0b] text-white",info:"bg-[#3b82f6] text-white"}[e]}`,children:[t,(0,s.jsx)("p",{className:"flex-1 text-sm font-medium",children:r})]})}},52463:(e,r,t)=>{t.d(r,{l:()=>a});var s=t(68019);let a=(0,t(10707).forwardRef)(({label:e,error:r,helperText:t,fullWidth:a=!1,options:l,placeholder:o,className:i="",...n},d)=>{let c=`
8      w-full px-4 py-2 text-base text-[#374151] bg-white border rounded-md
9      focus:outline-none focus:ring-2 focus:ring-[#1e3a8a] focus:border-transparent
10      disabled:bg-[#f3f4f6] disabled:cursor-not-allowed
11      ${r?"border-[#ef4444] focus:ring-[#ef4444]":"border-[#e5e7eb]"}
12      ${i}
13    `.trim();return(0,s.jsxs)("div",{className:a?"w-full":"",children:[e&&(0,s.jsx)("label",{className:"block text-sm font-medium text-[#374151] mb-1",children:e}),(0,s.jsxs)("select",{ref:d,className:c,...n,children:[o&&(0,s.jsx)("option",{value:"",disabled:!0,children:o}),l.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))]}),r&&(0,s.jsx)("p",{className:"mt-1 text-sm text-[#ef4444]",children:r}),t&&!r&&(0,s.jsx)("p",{className:"mt-1 text-sm text-[#6b7280]",children:t})]})});a.displayName="Select"},63194:(e,r,t)=>{t.d(r,{$n:()=>s.$,Zp:()=>a.Zp,Wu:()=>a.Wu,TM:()=>u.T,pd:()=>i.p,Eg:()=>x,aF:()=>h.a,l6:()=>m.l,k_:()=>f.T,tE:()=>b.tE,dj:()=>b.dj});var s=t(64508),a=t(42845),l=t(68019),o=t(10707);(0,o.forwardRef)(({label:e,error:r,className:t="",...s},a)=>(0,l.jsxs)("div",{className:"flex items-start",children:[(0,l.jsx)("div",{className:"flex items-center h-5",children:(0,l.jsx)("input",{ref:a,type:"checkbox",className:`
14              w-4 h-4 text-[#1e3a8a] bg-white border-[#e5e7eb] rounded
15              focus:ring-2 focus:ring-[#1e3a8a] focus:ring-offset-0
16              disabled:opacity-50 disabled:cursor-not-allowed
17              ${r?"border-[#ef4444]":""}
18              ${t}
19            `.trim(),...s})}),e&&(0,l.jsxs)("div",{className:"ml-3",children:[(0,l.jsx)("label",{className:"text-sm text-[#374151]",children:e}),r&&(0,l.jsx)("p",{className:"text-sm text-[#ef4444] mt-1",children:r})]})]})).displayName="Checkbox";var i=t(51225),n=t(70508),d=t(20823),c=t(38906);let x=o.forwardRef(({className:e,variant:r="primary",size:t="md",loading:s=!1,loadingText:a,leftIcon:o,rightIcon:i,children:x,disabled:m,...f},u)=>{let h=s&&a?a:x;return(0,l.jsxs)(d.P.button,{ref:u,whileHover:s||m?void 0:{scale:1.02,translateY:-2},whileTap:s||m?void 0:{scale:.98},className:(0,n.cn)("relative inline-flex items-center justify-center rounded-sm font-medium transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 overflow-hidden font-sans tracking-wide",{primary:"bg-primary text-primary-foreground shadow-lg shadow-primary/20 hover:shadow-xl hover:shadow-
19primary/30 border border-primary/10",accent:"bg-accent text-accent-foreground shadow-lg shadow-accent/20 hover:shadow-xl hover:shadow-accent/40 border border-accent/10 hover:brightness-110",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 border border-border",outline:"border border-primary/20 text-primary hover:bg-primary/5 hover:border-primary/50",ghost:"hover:bg-primary/5 text-foreground/80 hover:text-foreground",glass:"bg-white/10 backdrop-blur-md border border-white/20 text-white shadow-lg",danger:"bg-red-600 text-white hover:bg-red-700 shadow-md"}[r],{sm:"h-9 px-4 text-sm",md:"h-11 px-6 text-base",lg:"h-14 px-8 text-lg",icon:"h-11 w-11 p-0 flex items-center justify-center"}[t],e),type:f.type??"button",disabled:m||s,"aria-busy":s,"aria-disabled":m||s,...f,children:["accent"===r&&!s&&(0,l.jsx)("div",{className:"absolute inset-0 z-0 bg-gradient-to-r from-transparent via-white/20 to-transparent -translate-x-full hover:animate-[shimmer_1.5s_infinite]"}),(0,l.jsxs)("div",{className:"relative z-10 flex items-center",children:[s&&(0,l.jsx)(c.A,{className:"mr-2 h-4 w-4 animate-spin"}),!s&&o&&(0,l.jsx)("span",{className:"mr-2",children:o}),h,!s&&i&&(0,l.jsx)("span",{className:"ml-2",children:i})]})]})});x.displayName="LoadingButton";var m=t(52463),f=t(68405),u=t(41129);t(25813);var h=t(89293),b=t(51640)},64508:(e,r,t)=>{t.d(r,{$:()=>o});var s=t(68019),a=t(10707),l=t(70508);let o=a.forwardRef(({className:e="",variant:r="default",size:t="md",loading:a=!1,children:o,disabled:i,...n},d)=>(0,s.jsxs)("button",{ref:d,className:(0,l.cn)("inline-flex items-center justify-center rounded-md font-medium transition-colors","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2","disabled:opacity-50 disabled:cursor-not-allowed",{default:"bg-gray-100 text-gray-900 hover:bg-gray-200",primary:"bg-blue-600 text-white hover:bg-blue-700",secondary:"bg-gray-200 text-gray-900 hover:bg-gray-300",danger:"bg-red-600 text-white hover:bg-red-700",ghost:"bg-transparent text-gray-700 hover:bg-gray-100"}[r],{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg"}[t],e),disabled:i||a,...n,children:[a&&(0,s.jsxs)("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,s.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,s.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),o]}));o.displayName="Button"},68405:(e,r,t)=>{t.d(r,{T:()=>a});var s=t(68019);let a=(0,t(10707).forwardRef)(({label:e,error:r,helperText:t,fullWidth:a=!1,className:l="",...o},i)=>{let n=`
20      w-full px-4 py-2 text-base text-[#374151] bg-white border rounded-md
21      focus:outline-none focus:ring-2 focus:ring-[#1e3a8a] focus:border-transparent
22      disabled:bg-[#f3f4f6] disabled:cursor-not-allowed resize-y
23      ${r?"border-[#ef4444] focus:ring-[#ef4444]":"border-[#e5e7eb]"}
24      ${l}
25    `.trim();return(0,s.jsxs)("div",{className:a?"w-full":"",children:[e&&(0,s.jsx)("label",{className:"block text-sm font-medium text-[#374151] mb-1",children:e}),(0,s.jsx)("textarea",{ref:i,className:n,...o}),r&&(0,s.jsx)("p",{className:"mt-1 text-sm text-[#ef4444]",children:r}),t&&!r&&(0,s.jsx)("p",{className:"mt-1 text-sm text-[#6b7280]",children:t})]})});a.displayName="Textarea"},70508:(e,r,t)=>{t.d(r,{cn:()=>l});var s=t(69161),a=t(82449);function l(...e){return(0,a.QP)((0,s.$)(e))}},89293:(e,r,t)=>{t.d(r,{a:()=>i});var s=t(68019),a=t(10707);let l=0;function o(){if("u">typeof document&&0===(l=Math.max(0,l-1))){let e=document.body.dataset.prevOverflow;document.body.style.overflow=e??"unset",delete document.body.dataset.prevOverflow}}let i=({isOpen:e,onClose:r,title:t,children:i,size:n="md",showCloseButton:d=!0})=>((0,a.useEffect)(()=>(e?"u">typeof document&&(0===l&&(document.body.dataset.prevOverflow=document.body.style.overflow,document.body.style.overflow="hidden"),l+=1):o(),()=>{o()}),[e]),(0,a.useEffect)(()=>{let t=t=>{"Escape"===t.key&&e&&r()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e,r]),e)?(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black bg-opacity-50 transition-opacity",onClick:r}),(0,s.jsxs)("div",{className:`relative bg-white rounded-lg shadow-xl w-full ${{sm:"max-w-md",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl",full:"max-w-[95vw]"}[n]} max-h-[90vh] overflow-y-auto`,children:[(t||d)&&(0,s.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-[#e5e7eb]",children:[t&&(0,s.jsx)("h2",{className:"text-2xl font-semibold text-[#374151]",children:t}),d&&(0,s.jsx)("button",{onClick:r,className:"text-[#6b7280] hover:text-[#374151] transition-colors","aria-label":"Close modal",children:(0,s.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,s.jsx)("div",{className:"p-6",children:i})]})]}):null}}]);

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.