@hua-labs/ui 2.0.2 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -161
- package/dist/{ComponentLayout-btJq4TjA.d.mts → ComponentLayout-DrZpz0yv.d.mts} +1 -1
- package/dist/Section-BWzyshgX.d.mts +67 -0
- package/dist/advanced/dashboard.d.ts.map +1 -1
- package/dist/advanced-dashboard.d.mts +1 -1
- package/dist/advanced-dashboard.js +4 -4
- package/dist/advanced-dashboard.js.map +1 -1
- package/dist/advanced-dashboard.mjs +3 -3
- package/dist/advanced-dashboard.mjs.map +1 -1
- package/dist/advanced-emotion.mjs +1 -1
- package/dist/advanced-motion.d.mts +65 -1
- package/dist/advanced-motion.js +14 -14
- package/dist/advanced-motion.js.map +1 -1
- package/dist/advanced-motion.mjs +1 -1
- package/dist/advanced.d.mts +4 -4
- package/dist/advanced.js +16 -16
- package/dist/advanced.js.map +1 -1
- package/dist/advanced.mjs +3 -3
- package/dist/advanced.mjs.map +1 -1
- package/dist/chunk-3CCF7U3P.mjs +3 -0
- package/dist/{chunk-IFSEJVOR.mjs.map → chunk-3CCF7U3P.mjs.map} +1 -1
- package/dist/chunk-3GAUTZXQ.mjs +3 -0
- package/dist/{chunk-X7ZIWYRC.mjs.map → chunk-3GAUTZXQ.mjs.map} +1 -1
- package/dist/chunk-42RGFEL2.mjs +3 -0
- package/dist/chunk-42RGFEL2.mjs.map +1 -0
- package/dist/chunk-4NJE7D6X.mjs +3 -0
- package/dist/chunk-4NJE7D6X.mjs.map +1 -0
- package/dist/chunk-6HVJFEDA.mjs +3 -0
- package/dist/{chunk-FSL373O6.mjs.map → chunk-6HVJFEDA.mjs.map} +1 -1
- package/dist/chunk-7OYT3QSY.mjs +3 -0
- package/dist/chunk-7OYT3QSY.mjs.map +1 -0
- package/dist/chunk-ANYZ56VB.mjs +3 -0
- package/dist/{chunk-QQCELXFD.mjs.map → chunk-ANYZ56VB.mjs.map} +1 -1
- package/dist/chunk-AOSXB5JJ.mjs +4 -0
- package/dist/{chunk-GLZKT7JN.mjs.map → chunk-AOSXB5JJ.mjs.map} +1 -1
- package/dist/chunk-B544MRF7.mjs +3 -0
- package/dist/{chunk-SDFHJ4GB.mjs.map → chunk-B544MRF7.mjs.map} +1 -1
- package/dist/chunk-CVWWS25A.mjs +3 -0
- package/dist/chunk-CVWWS25A.mjs.map +1 -0
- package/dist/chunk-DYNBM24D.mjs +3 -0
- package/dist/{chunk-OSCMSA2Q.mjs.map → chunk-DYNBM24D.mjs.map} +1 -1
- package/dist/{chunk-NBJUE7NR.mjs → chunk-FX57OSYG.mjs} +2 -2
- package/dist/{chunk-NBJUE7NR.mjs.map → chunk-FX57OSYG.mjs.map} +1 -1
- package/dist/chunk-IJSYSNM5.mjs +3 -0
- package/dist/{chunk-IN7RWQCJ.mjs.map → chunk-IJSYSNM5.mjs.map} +1 -1
- package/dist/chunk-KJZGOL2Z.mjs +3 -0
- package/dist/{chunk-LOYAJIWO.mjs.map → chunk-KJZGOL2Z.mjs.map} +1 -1
- package/dist/chunk-KYRIUUQP.mjs +3 -0
- package/dist/{chunk-PAEKNQWW.mjs.map → chunk-KYRIUUQP.mjs.map} +1 -1
- package/dist/chunk-LSA7DU3N.mjs +73 -0
- package/dist/chunk-LSA7DU3N.mjs.map +1 -0
- package/dist/chunk-MDLCJASB.mjs +3 -0
- package/dist/{chunk-LH77I6HO.mjs.map → chunk-MDLCJASB.mjs.map} +1 -1
- package/dist/chunk-N56BUOCD.mjs +3 -0
- package/dist/{chunk-XV3Y7QVU.mjs.map → chunk-N56BUOCD.mjs.map} +1 -1
- package/dist/chunk-OFYITQXI.mjs +13 -0
- package/dist/chunk-OFYITQXI.mjs.map +1 -0
- package/dist/chunk-OZNST3EZ.mjs +3 -0
- package/dist/{chunk-SGEP3CQE.mjs.map → chunk-OZNST3EZ.mjs.map} +1 -1
- package/dist/chunk-RS6RKW5U.mjs +13 -0
- package/dist/{chunk-6KTHJ3EL.mjs.map → chunk-RS6RKW5U.mjs.map} +1 -1
- package/dist/{chunk-C4OACMTB.mjs → chunk-TXBZZJNR.mjs} +2 -2
- package/dist/{chunk-C4OACMTB.mjs.map → chunk-TXBZZJNR.mjs.map} +1 -1
- package/dist/chunk-TZ4YSHMC.mjs +3 -0
- package/dist/{chunk-UWHCM3S6.mjs.map → chunk-TZ4YSHMC.mjs.map} +1 -1
- package/dist/chunk-U6CTBZ2U.mjs +3 -0
- package/dist/chunk-U6CTBZ2U.mjs.map +1 -0
- package/dist/{chunk-5BMH7223.mjs → chunk-WP7VFE77.mjs} +2 -2
- package/dist/{chunk-5BMH7223.mjs.map → chunk-WP7VFE77.mjs.map} +1 -1
- package/dist/{chunk-FFH4ZFKS.mjs → chunk-XCZMLKPK.mjs} +2 -2
- package/dist/{chunk-FFH4ZFKS.mjs.map → chunk-XCZMLKPK.mjs.map} +1 -1
- package/dist/chunk-XGHT7WMO.mjs +3 -0
- package/dist/chunk-XGHT7WMO.mjs.map +1 -0
- package/dist/chunk-XL4KTJ4L.mjs +3 -0
- package/dist/{chunk-VWSBJUNI.mjs.map → chunk-XL4KTJ4L.mjs.map} +1 -1
- package/dist/chunk-Z74YUUVT.mjs +3 -0
- package/dist/chunk-Z74YUUVT.mjs.map +1 -0
- package/dist/chunk-ZXZIHU7J.mjs +8 -0
- package/dist/{chunk-N7M6RIN4.mjs.map → chunk-ZXZIHU7J.mjs.map} +1 -1
- package/dist/components/DatePicker.d.ts.map +1 -1
- package/dist/components/Modal.d.ts.map +1 -1
- package/dist/components/Popover.d.ts +2 -0
- package/dist/components/Popover.d.ts.map +1 -1
- package/dist/components/Progress.d.ts +1 -0
- package/dist/components/Progress.d.ts.map +1 -1
- package/dist/components/Section.d.ts +44 -0
- package/dist/components/Section.d.ts.map +1 -0
- package/dist/components/advanced/AnimatedGradient.d.ts.map +1 -1
- package/dist/components/advanced/DotNav.d.ts +26 -0
- package/dist/components/advanced/DotNav.d.ts.map +1 -0
- package/dist/components/advanced/HorizontalScroll.d.ts +20 -0
- package/dist/components/advanced/HorizontalScroll.d.ts.map +1 -0
- package/dist/components/advanced/ImageReveal.d.ts +24 -0
- package/dist/components/advanced/ImageReveal.d.ts.map +1 -0
- package/dist/components/advanced/index.d.ts +6 -0
- package/dist/components/advanced/index.d.ts.map +1 -1
- package/dist/data.mjs +2 -2
- package/dist/data.mjs.map +1 -1
- package/dist/feedback.mjs +1 -1
- package/dist/form.js +3 -3
- package/dist/form.js.map +1 -1
- package/dist/form.mjs +4 -4
- package/dist/form.mjs.map +1 -1
- package/dist/{icons-Bj_nr8Ba.d.mts → icons-DmhQEH_E.d.mts} +6 -1
- package/dist/index.d.mts +9 -27
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/interactive.js +1 -1
- package/dist/interactive.js.map +1 -1
- package/dist/interactive.mjs +1 -1
- package/dist/interactive.mjs.map +1 -1
- package/dist/landing/LandingAbout.d.ts +3 -0
- package/dist/landing/LandingAbout.d.ts.map +1 -0
- package/dist/landing/LandingCTA.d.ts +3 -0
- package/dist/landing/LandingCTA.d.ts.map +1 -0
- package/dist/landing/LandingContact.d.ts +3 -0
- package/dist/landing/LandingContact.d.ts.map +1 -0
- package/dist/landing/LandingExperience.d.ts +3 -0
- package/dist/landing/LandingExperience.d.ts.map +1 -0
- package/dist/landing/LandingFeatures.d.ts +3 -0
- package/dist/landing/LandingFeatures.d.ts.map +1 -0
- package/dist/landing/LandingHero.d.ts +3 -0
- package/dist/landing/LandingHero.d.ts.map +1 -0
- package/dist/landing/LandingLogoCloud.d.ts +3 -0
- package/dist/landing/LandingLogoCloud.d.ts.map +1 -0
- package/dist/landing/LandingMetrics.d.ts +3 -0
- package/dist/landing/LandingMetrics.d.ts.map +1 -0
- package/dist/landing/LandingProjects.d.ts +3 -0
- package/dist/landing/LandingProjects.d.ts.map +1 -0
- package/dist/landing/LandingProvider.d.ts +4 -0
- package/dist/landing/LandingProvider.d.ts.map +1 -0
- package/dist/landing/LandingShowcase.d.ts +3 -0
- package/dist/landing/LandingShowcase.d.ts.map +1 -0
- package/dist/landing/LandingSkills.d.ts +3 -0
- package/dist/landing/LandingSkills.d.ts.map +1 -0
- package/dist/landing/LandingStats.d.ts +3 -0
- package/dist/landing/LandingStats.d.ts.map +1 -0
- package/dist/landing/LandingTestimonials.d.ts +3 -0
- package/dist/landing/LandingTestimonials.d.ts.map +1 -0
- package/dist/landing/index.d.ts +47 -0
- package/dist/landing/index.d.ts.map +1 -0
- package/dist/landing/themes/app.d.ts +3 -0
- package/dist/landing/themes/app.d.ts.map +1 -0
- package/dist/landing/themes/corporate.d.ts +3 -0
- package/dist/landing/themes/corporate.d.ts.map +1 -0
- package/dist/landing/themes/dashboard.d.ts +3 -0
- package/dist/landing/themes/dashboard.d.ts.map +1 -0
- package/dist/landing/themes/immersive.d.ts +3 -0
- package/dist/landing/themes/immersive.d.ts.map +1 -0
- package/dist/landing/themes/index.d.ts +15 -0
- package/dist/landing/themes/index.d.ts.map +1 -0
- package/dist/landing/themes/marketing.d.ts +3 -0
- package/dist/landing/themes/marketing.d.ts.map +1 -0
- package/dist/landing/themes/portfolio.d.ts +3 -0
- package/dist/landing/themes/portfolio.d.ts.map +1 -0
- package/dist/landing/themes/product.d.ts +3 -0
- package/dist/landing/themes/product.d.ts.map +1 -0
- package/dist/landing/types.d.ts +346 -0
- package/dist/landing/types.d.ts.map +1 -0
- package/dist/landing.d.mts +417 -0
- package/dist/landing.js +100 -0
- package/dist/landing.js.map +1 -0
- package/dist/landing.mjs +31 -0
- package/dist/landing.mjs.map +1 -0
- package/dist/lib/icons.d.ts +6 -1
- package/dist/lib/icons.d.ts.map +1 -1
- package/dist/navigation.d.mts +1 -1
- package/dist/navigation.js +2 -2
- package/dist/navigation.js.map +1 -1
- package/dist/navigation.mjs +1 -1
- package/dist/navigation.mjs.map +1 -1
- package/dist/overlay.d.mts +2 -0
- package/dist/overlay.js +1 -1
- package/dist/overlay.js.map +1 -1
- package/dist/overlay.mjs +1 -1
- package/dist/overlay.mjs.map +1 -1
- package/dist/sdui.js +4 -4
- package/dist/sdui.js.map +1 -1
- package/dist/sdui.mjs +1 -1
- package/dist/sdui.mjs.map +1 -1
- package/package.json +18 -7
- package/src/styles/landing.css +107 -0
- package/src/styles/utilities.css +58 -0
- package/dist/chunk-6KTHJ3EL.mjs +0 -13
- package/dist/chunk-COR6CDMA.mjs +0 -83
- package/dist/chunk-COR6CDMA.mjs.map +0 -1
- package/dist/chunk-FSL373O6.mjs +0 -3
- package/dist/chunk-GLZKT7JN.mjs +0 -4
- package/dist/chunk-HN5LSP6L.mjs +0 -3
- package/dist/chunk-HN5LSP6L.mjs.map +0 -1
- package/dist/chunk-IFSEJVOR.mjs +0 -3
- package/dist/chunk-IN7RWQCJ.mjs +0 -3
- package/dist/chunk-LH77I6HO.mjs +0 -3
- package/dist/chunk-LOYAJIWO.mjs +0 -3
- package/dist/chunk-LPAG7DCA.mjs +0 -3
- package/dist/chunk-LPAG7DCA.mjs.map +0 -1
- package/dist/chunk-N7M6RIN4.mjs +0 -8
- package/dist/chunk-OSCMSA2Q.mjs +0 -3
- package/dist/chunk-PAEKNQWW.mjs +0 -3
- package/dist/chunk-QQCELXFD.mjs +0 -3
- package/dist/chunk-RPUS7G7Q.mjs +0 -3
- package/dist/chunk-RPUS7G7Q.mjs.map +0 -1
- package/dist/chunk-SDFHJ4GB.mjs +0 -3
- package/dist/chunk-SGEP3CQE.mjs +0 -3
- package/dist/chunk-UUHAXGMO.mjs +0 -3
- package/dist/chunk-UUHAXGMO.mjs.map +0 -1
- package/dist/chunk-UWHCM3S6.mjs +0 -3
- package/dist/chunk-VWSBJUNI.mjs +0 -3
- package/dist/chunk-X7ZIWYRC.mjs +0 -3
- package/dist/chunk-XV3Y7QVU.mjs +0 -3
package/dist/advanced-motion.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var ee=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),classVarianceAuthority=require('class-variance-authority'),ssr=require('@phosphor-icons/react/dist/ssr');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var ee__default=/*#__PURE__*/_interopDefault(ee);function l(...t){return tailwindMerge.twMerge(clsx.clsx(t))}function ct(t){let e=Object.entries(t).filter(([,r])=>r).map(([r])=>r);return l(...e)}var pe=ee__default.default.forwardRef(({children:t,className:e,type:r="fade",duration:o=500,easing:a="smooth",delay:s=0,autoStart:d=true,onStart:v,onComplete:h,showProgress:i=false,progressClassName:y},m)=>{let[x,f]=ee.useState(false),[c,n]=ee.useState(0),[g,u]=ee.useState(false),C=ee.useRef(null),p=ee.useRef(null),b=M=>({linear:T=>T,"ease-in":T=>T*T,"ease-out":T=>1-Math.pow(1-T,2),"ease-in-out":T=>T<.5?2*T*T:1-Math.pow(-2*T+2,2)/2,bounce:T=>T<.36363636363636365?7.5625*T*T:T<.7272727272727273?7.5625*(T-=.5454545454545454)*T+.75:T<.9090909090909091?7.5625*(T-=.8181818181818182)*T+.9375:7.5625*(T-=.9545454545454546)*T+.984375,elastic:T=>Math.pow(2,-10*T)*Math.sin((T-.075)*(2*Math.PI)/.3)+1,smooth:T=>T*T*(3-2*T)})[M],k=ee.useCallback(M=>{p.current||(p.current=M);let R=M-p.current,T=b(a),I=Math.min(R/o,1);I=T(I),n(I),f(I>.1),I<1?C.current=requestAnimationFrame(V=>k(V)):(u(false),n(1),h==null||h());},[o,a,h]),w=ee.useCallback(()=>{u(true),n(0),v==null||v(),p.current=null,C.current=requestAnimationFrame(k);},[k,v]);ee.useEffect(()=>{if(d){let M=setTimeout(()=>{w();},s);return ()=>clearTimeout(M)}},[d,s,w]),ee.useEffect(()=>()=>{C.current&&cancelAnimationFrame(C.current);},[]);let B=(()=>{switch(r){case "fade":return {opacity:x?1:0,transform:"none"};case "slide":return {opacity:x?1:0,transform:`translateX(${(1-c)*100}%)`};case "slide-up":return {opacity:x?1:0,transform:`translateY(${(1-c)*100}%)`};case "slide-down":return {opacity:x?1:0,transform:`translateY(-${(1-c)*100}%)`};case "slide-left":return {opacity:x?1:0,transform:`translateX(-${(1-c)*100}%)`};case "slide-right":return {opacity:x?1:0,transform:`translateX(${(1-c)*100}%)`};case "scale":return {opacity:x?1:0,transform:`scale(${.8+c*.2})`};case "flip":return {opacity:x?1:0,transform:`perspective(1000px) rotateY(${(1-c)*90}deg)`};case "morph":return {opacity:x?1:0,transform:`scale(${.9+c*.1}) rotate(${(1-c)*5}deg)`};case "cube":return {opacity:x?1:0,transform:`perspective(1000px) rotateX(${(1-c)*90}deg) rotateY(${(1-c)*45}deg)`};case "zoom":return {opacity:x?1:0,transform:`scale(${.5+c*.5})`};default:return {opacity:x?1:0,transform:"none"}}})();return jsxRuntime.jsxs("div",{className:"relative",children:[i&&jsxRuntime.jsxs("div",{className:l("fixed top-4 right-4 z-50 bg-background rounded-lg px-3 py-2 shadow-lg border",y),children:[jsxRuntime.jsxs("div",{className:"text-sm font-medium text-foreground",children:["Progress: ",Math.round(c*100),"%"]}),jsxRuntime.jsx("div",{className:"w-24 h-2 bg-muted rounded-full mt-2",children:jsxRuntime.jsx("div",{className:"h-full bg-primary rounded-full transition-all duration-100",style:{width:`${c*100}%`}})})]}),jsxRuntime.jsx("div",{ref:m,className:l("transition-all duration-500 ease-out",e),style:{...B,transitionDuration:`${o}ms`,transitionTimingFunction:a==="smooth"?"cubic-bezier(0.4, 0, 0.2, 1)":a==="bounce"?"cubic-bezier(0.68, -0.55, 0.265, 1.55)":a==="elastic"?"cubic-bezier(0.175, 0.885, 0.32, 1.275)":a},children:t})]})});pe.displayName="AdvancedPageTransition";var _r=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(pe,{ref:e,type:"fade",...t})),jr=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(pe,{ref:e,type:"slide",...t})),Xr=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(pe,{ref:e,type:"scale",...t})),Yr=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(pe,{ref:e,type:"flip",...t})),Kr=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(pe,{ref:e,type:"morph",...t})),Qr=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(pe,{ref:e,type:"cube",...t})),Zr=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(pe,{ref:e,type:"zoom",...t}));_r.displayName="FadePageTransition";jr.displayName="SlidePageTransition";Xr.displayName="ScalePageTransition";Yr.displayName="FlipPageTransition";Kr.displayName="MorphPageTransition";Qr.displayName="CubePageTransition";Zr.displayName="ZoomPageTransition";var to=(t={})=>{let[e,r]=ee.useState({isTransitioning:false,isVisible:false,currentStep:0,progress:0}),o=ee.useRef(null),a=ee.useRef(null),s=ee.useRef({type:"fade",duration:500,easing:"smooth",delay:0,stagger:0,direction:"forward",...t}),d=ee.useCallback(f=>({linear:n=>n,"ease-in":n=>n*n,"ease-out":n=>1-Math.pow(1-n,2),"ease-in-out":n=>n<.5?2*n*n:1-Math.pow(-2*n+2,2)/2,bounce:n=>n<.36363636363636365?7.5625*n*n:n<.7272727272727273?7.5625*(n-=.5454545454545454)*n+.75:n<.9090909090909091?7.5625*(n-=.8181818181818182)*n+.9375:7.5625*(n-=.9545454545454546)*n+.984375,elastic:n=>Math.pow(2,-10*n)*Math.sin((n-.075)*(2*Math.PI)/.3)+1,smooth:n=>n*n*(3-2*n)})[f],[]),v=ee.useCallback(f=>{var C;a.current||(a.current=f);let c=f-a.current,n=s.current,g=d(n.easing),u=Math.min(c/n.duration,1);u=g(u),r(p=>({...p,progress:u,isVisible:n.direction==="forward"?u>.1:u<.9,currentStep:Math.floor(u*10)})),u<1?o.current=requestAnimationFrame(v):(r(p=>({...p,isTransitioning:false,progress:n.direction==="forward"?1:0})),(C=n.onComplete)==null||C.call(n));},[d]),h=ee.useCallback(async f=>new Promise(c=>{var g;f&&(s.current={...s.current,...f});let n=s.current;n.onComplete=()=>c(),r(u=>({...u,isTransitioning:true,progress:n.direction==="forward"?0:1})),a.current=null,(g=n.onStart)==null||g.call(n),n.delay?setTimeout(()=>{o.current=requestAnimationFrame(v);},n.delay):o.current=requestAnimationFrame(v);}),[v]),i=ee.useCallback(async()=>new Promise(f=>{let c=s.current;c.direction="backward",c.onComplete=()=>f(),h();}),[h]),y=ee.useCallback(()=>{o.current&&cancelAnimationFrame(o.current);},[]),m=ee.useCallback(()=>{e.isTransitioning&&(o.current=requestAnimationFrame(v));},[e.isTransitioning,v]),x=ee.useCallback(()=>{o.current&&cancelAnimationFrame(o.current),r({isTransitioning:false,isVisible:false,currentStep:0,progress:0});},[]);return ee.useEffect(()=>()=>{o.current&&cancelAnimationFrame(o.current);},[]),[e,{start:h,reverse:i,pause:y,resume:m,reset:x}]};var no=(t={})=>{let{defaultType:e="fade",defaultDuration:r=500,defaultEasing:o="smooth",enableHistory:a=true,enableProgress:s=true,enableDebug:d=false}=t,[v,h]=ee.useState({isTransitioning:false,currentTransition:null,transitionHistory:[],totalTransitions:0,averageDuration:0}),i=ee.useRef(new Map),y=ee.useRef(0),m=ee.useCallback((p,b)=>{d&&console.log(`[PageTransitionManager] ${p}`,b);},[d]),x=ee.useCallback(p=>{h(b=>{let k=a?[...b.transitionHistory,p]:b.transitionHistory,w=k.length,N=k.reduce((B,M)=>B+M.duration,0)/w;return {...b,totalTransitions:w,averageDuration:N,transitionHistory:k}});},[a]),f=ee.useCallback(async p=>{let b=`transition_${++y.current}`,k={type:e,duration:r,easing:o,...p},w={id:b,type:k.type,duration:k.duration,easing:k.easing,timestamp:Date.now(),status:"pending"};m("Starting transition",{id:b,config:k}),h(B=>({...B,isTransitioning:true,currentTransition:w}));let N=setTimeout(()=>{var M;let B={...w,status:"completed"};h(R=>({...R,isTransitioning:false,currentTransition:null})),x(B),i.current.delete(b),m("Transition completed",{id:b}),(M=k.onComplete)==null||M.call(k);},k.duration);return i.current.set(b,{timer:N,config:k}),setTimeout(()=>{h(B=>({...B,currentTransition:{...B.currentTransition,status:"active"}}));},50),b},[e,r,o,m,x]),c=ee.useCallback(p=>{let b=i.current.get(p);b&&(clearTimeout(b.timer),i.current.delete(p),h(k=>{var w;return {...k,isTransitioning:i.current.size>0,currentTransition:((w=k.currentTransition)==null?void 0:w.id)===p?null:k.currentTransition}}),m("Transition cancelled",{id:p}));},[m]),n=ee.useCallback(()=>{i.current.forEach(({timer:p},b)=>{clearTimeout(p),m("Transition paused",{id:b});});},[m]),g=ee.useCallback(()=>{i.current.forEach(({config:p},b)=>{f(p);});},[f]),u=ee.useCallback(()=>{h(p=>({...p,transitionHistory:[],totalTransitions:0,averageDuration:0})),m("History cleared");},[m]),C=ee.useCallback(()=>{let{transitionHistory:p}=v,b=p.reduce((w,N)=>(w[N.type]=(w[N.type]||0)+1,w),{}),k=p.reduce((w,N)=>(w[N.status]=(w[N.status]||0)+1,w),{});return {total:p.length,average:v.averageDuration,byType:b,byStatus:k}},[v]);return ee.useEffect(()=>{let p=i.current;return ()=>{p.forEach(({timer:b})=>{clearTimeout(b);}),p.clear();}},[]),[v,{startTransition:f,cancelTransition:c,pauseAll:n,resumeAll:g,clearHistory:u,getTransitionStats:C}]};var _t=ee__default.default.forwardRef(({children:t,className:e,speed:r=.5,direction:o="up",offset:a=0,disabled:s=false,scale:d=false,opacity:v=false,rotate:h=false,rotateDirection:i="cw",style:y,...m},x)=>{let f=ee.useRef(null),[c,n]=ee.useState({x:0,y:0,scale:1,opacity:1,rotate:0}),g=lo(),u=ee.useCallback(()=>{if(s||g)return;let p=f.current;if(!p)return;let b=p.getBoundingClientRect(),k=window.innerHeight,N=b.top+b.height/2,M=(k/2-N)/k,R=M*r*100+a,T=0,I=0;switch(o){case "up":I=-R;break;case "down":I=R;break;case "left":T=-R;break;case "right":T=R;break}let V=d?1+Math.abs(M)*.1:1,z=v?Math.max(.3,1-Math.abs(M)*.5):1,$=h?M*10*(i==="cw"?1:-1):0;n({x:T,y:I,scale:V,opacity:z,rotate:$});},[s,g,r,o,a,d,v,h,i]);ee.useEffect(()=>{if(s||g)return;u();let p=()=>{requestAnimationFrame(u);};return window.addEventListener("scroll",p,{passive:true}),window.addEventListener("resize",p,{passive:true}),()=>{window.removeEventListener("scroll",p),window.removeEventListener("resize",p);}},[u,s,g]);let C={...y,transform:s||g?void 0:`translate3d(${c.x}px, ${c.y}px, 0) scale(${c.scale}) rotate(${c.rotate}deg)`,opacity:s||g?1:c.opacity,willChange:s||g?void 0:"transform, opacity"};return jsxRuntime.jsx("div",{ref:co(x,f),className:l("transition-none",e),style:C,...m,children:t})});_t.displayName="Parallax";function lo(){let[t,e]=ee.useState(false);return ee.useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");e(r.matches);let o=a=>{e(a.matches);};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),t}function co(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r&&typeof r=="object"&&(r.current=e);});}}var Xt=ee__default.default.forwardRef(({children:t,className:e,direction:r="left",speed:o=50,pauseOnHover:a=true,pauseOnClick:s=false,gap:d=16,gradient:v=true,gradientColor:h="hsl(var(--background))",gradientWidth:i=100,style:y,...m},x)=>{let f=ee.useRef(null),[c,n]=ee.useState(0),[g,u]=ee.useState(0),[C,p]=ee.useState(false),b=r==="left"||r==="right",k=r==="right"||r==="down";ee.useEffect(()=>{let M=f.current;if(!M)return;let R=M.firstElementChild;if(!R)return;let T=()=>{b?n(R.offsetWidth):u(R.offsetHeight);};T();let I=new ResizeObserver(T);return I.observe(R),()=>I.disconnect()},[b,t]);let N={"--marquee-duration":`${b?c/o:g/o}s`,"--marquee-gap":`${d}px`},B=v?{"--gradient-color":h,"--gradient-width":`${i}px`}:{};return jsxRuntime.jsxs("div",{ref:x,className:l("relative overflow-hidden",v&&"marquee-gradient",e),style:{...y,...B},onMouseEnter:()=>a&&p(true),onMouseLeave:()=>a&&p(false),onClick:()=>s&&p(!C),...m,children:[jsxRuntime.jsxs("div",{ref:f,className:l("flex",b?"flex-row":"flex-col",C?"animate-pause":"",b?k?"animate-marquee-right":"animate-marquee-left":k?"animate-marquee-down":"animate-marquee-up"),style:N,children:[jsxRuntime.jsx("div",{className:l("flex shrink-0",b?"flex-row":"flex-col"),style:{gap:d},children:t}),jsxRuntime.jsx("div",{className:l("flex shrink-0",b?"flex-row":"flex-col"),style:{gap:d,[b?"marginLeft":"marginTop"]:d},"aria-hidden":"true",children:t})]}),jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:`
|
|
1
|
+
'use strict';var ee=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),classVarianceAuthority=require('class-variance-authority'),ssr=require('@phosphor-icons/react/dist/ssr');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var ee__default=/*#__PURE__*/_interopDefault(ee);function l(...t){return tailwindMerge.twMerge(clsx.clsx(t))}function dt(t){let e=Object.entries(t).filter(([,r])=>r).map(([r])=>r);return l(...e)}var pe=ee__default.default.forwardRef(({children:t,className:e,type:r="fade",duration:o=500,easing:a="smooth",delay:i=0,autoStart:m=true,onStart:x,onComplete:h,showProgress:s=false,progressClassName:y},f)=>{let[b,g]=ee.useState(false),[d,n]=ee.useState(0),[u,c]=ee.useState(false),w=ee.useRef(null),p=ee.useRef(null),v=R=>({linear:C=>C,"ease-in":C=>C*C,"ease-out":C=>1-Math.pow(1-C,2),"ease-in-out":C=>C<.5?2*C*C:1-Math.pow(-2*C+2,2)/2,bounce:C=>C<.36363636363636365?7.5625*C*C:C<.7272727272727273?7.5625*(C-=.5454545454545454)*C+.75:C<.9090909090909091?7.5625*(C-=.8181818181818182)*C+.9375:7.5625*(C-=.9545454545454546)*C+.984375,elastic:C=>Math.pow(2,-10*C)*Math.sin((C-.075)*(2*Math.PI)/.3)+1,smooth:C=>C*C*(3-2*C)})[R],k=ee.useCallback(R=>{p.current||(p.current=R);let N=R-p.current,C=v(a),I=Math.min(N/o,1);I=C(I),n(I),g(I>.1),I<1?w.current=requestAnimationFrame(V=>k(V)):(c(false),n(1),h==null||h());},[o,a,h]),T=ee.useCallback(()=>{c(true),n(0),x==null||x(),p.current=null,w.current=requestAnimationFrame(k);},[k,x]);ee.useEffect(()=>{if(m){let R=setTimeout(()=>{T();},i);return ()=>clearTimeout(R)}},[m,i,T]),ee.useEffect(()=>()=>{w.current&&cancelAnimationFrame(w.current);},[]);let B=(()=>{switch(r){case "fade":return {opacity:b?1:0,transform:"none"};case "slide":return {opacity:b?1:0,transform:`translateX(${(1-d)*100}%)`};case "slide-up":return {opacity:b?1:0,transform:`translateY(${(1-d)*100}%)`};case "slide-down":return {opacity:b?1:0,transform:`translateY(-${(1-d)*100}%)`};case "slide-left":return {opacity:b?1:0,transform:`translateX(-${(1-d)*100}%)`};case "slide-right":return {opacity:b?1:0,transform:`translateX(${(1-d)*100}%)`};case "scale":return {opacity:b?1:0,transform:`scale(${.8+d*.2})`};case "flip":return {opacity:b?1:0,transform:`perspective(1000px) rotateY(${(1-d)*90}deg)`};case "morph":return {opacity:b?1:0,transform:`scale(${.9+d*.1}) rotate(${(1-d)*5}deg)`};case "cube":return {opacity:b?1:0,transform:`perspective(1000px) rotateX(${(1-d)*90}deg) rotateY(${(1-d)*45}deg)`};case "zoom":return {opacity:b?1:0,transform:`scale(${.5+d*.5})`};default:return {opacity:b?1:0,transform:"none"}}})();return jsxRuntime.jsxs("div",{className:"relative",children:[s&&jsxRuntime.jsxs("div",{className:l("fixed top-4 right-4 z-50 bg-background rounded-lg px-3 py-2 shadow-lg border",y),children:[jsxRuntime.jsxs("div",{className:"text-sm font-medium text-foreground",children:["Progress: ",Math.round(d*100),"%"]}),jsxRuntime.jsx("div",{className:"w-24 h-2 bg-muted rounded-full mt-2",children:jsxRuntime.jsx("div",{className:"h-full bg-primary rounded-full transition-all duration-100",style:{width:`${d*100}%`}})})]}),jsxRuntime.jsx("div",{ref:f,className:l("transition-all duration-500 ease-out",e),style:{...B,transitionDuration:`${o}ms`,transitionTimingFunction:a==="smooth"?"cubic-bezier(0.4, 0, 0.2, 1)":a==="bounce"?"cubic-bezier(0.68, -0.55, 0.265, 1.55)":a==="elastic"?"cubic-bezier(0.175, 0.885, 0.32, 1.275)":a},children:t})]})});pe.displayName="AdvancedPageTransition";var ao=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(pe,{ref:e,type:"fade",...t})),so=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(pe,{ref:e,type:"slide",...t})),io=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(pe,{ref:e,type:"scale",...t})),lo=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(pe,{ref:e,type:"flip",...t})),co=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(pe,{ref:e,type:"morph",...t})),uo=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(pe,{ref:e,type:"cube",...t})),po=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(pe,{ref:e,type:"zoom",...t}));ao.displayName="FadePageTransition";so.displayName="SlidePageTransition";io.displayName="ScalePageTransition";lo.displayName="FlipPageTransition";co.displayName="MorphPageTransition";uo.displayName="CubePageTransition";po.displayName="ZoomPageTransition";var fo=(t={})=>{let[e,r]=ee.useState({isTransitioning:false,isVisible:false,currentStep:0,progress:0}),o=ee.useRef(null),a=ee.useRef(null),i=ee.useRef({type:"fade",duration:500,easing:"smooth",delay:0,stagger:0,direction:"forward",...t}),m=ee.useCallback(g=>({linear:n=>n,"ease-in":n=>n*n,"ease-out":n=>1-Math.pow(1-n,2),"ease-in-out":n=>n<.5?2*n*n:1-Math.pow(-2*n+2,2)/2,bounce:n=>n<.36363636363636365?7.5625*n*n:n<.7272727272727273?7.5625*(n-=.5454545454545454)*n+.75:n<.9090909090909091?7.5625*(n-=.8181818181818182)*n+.9375:7.5625*(n-=.9545454545454546)*n+.984375,elastic:n=>Math.pow(2,-10*n)*Math.sin((n-.075)*(2*Math.PI)/.3)+1,smooth:n=>n*n*(3-2*n)})[g],[]),x=ee.useCallback(g=>{var w;a.current||(a.current=g);let d=g-a.current,n=i.current,u=m(n.easing),c=Math.min(d/n.duration,1);c=u(c),r(p=>({...p,progress:c,isVisible:n.direction==="forward"?c>.1:c<.9,currentStep:Math.floor(c*10)})),c<1?o.current=requestAnimationFrame(x):(r(p=>({...p,isTransitioning:false,progress:n.direction==="forward"?1:0})),(w=n.onComplete)==null||w.call(n));},[m]),h=ee.useCallback(async g=>new Promise(d=>{var u;g&&(i.current={...i.current,...g});let n=i.current;n.onComplete=()=>d(),r(c=>({...c,isTransitioning:true,progress:n.direction==="forward"?0:1})),a.current=null,(u=n.onStart)==null||u.call(n),n.delay?setTimeout(()=>{o.current=requestAnimationFrame(x);},n.delay):o.current=requestAnimationFrame(x);}),[x]),s=ee.useCallback(async()=>new Promise(g=>{let d=i.current;d.direction="backward",d.onComplete=()=>g(),h();}),[h]),y=ee.useCallback(()=>{o.current&&cancelAnimationFrame(o.current);},[]),f=ee.useCallback(()=>{e.isTransitioning&&(o.current=requestAnimationFrame(x));},[e.isTransitioning,x]),b=ee.useCallback(()=>{o.current&&cancelAnimationFrame(o.current),r({isTransitioning:false,isVisible:false,currentStep:0,progress:0});},[]);return ee.useEffect(()=>()=>{o.current&&cancelAnimationFrame(o.current);},[]),[e,{start:h,reverse:s,pause:y,resume:f,reset:b}]};var vo=(t={})=>{let{defaultType:e="fade",defaultDuration:r=500,defaultEasing:o="smooth",enableHistory:a=true,enableProgress:i=true,enableDebug:m=false}=t,[x,h]=ee.useState({isTransitioning:false,currentTransition:null,transitionHistory:[],totalTransitions:0,averageDuration:0}),s=ee.useRef(new Map),y=ee.useRef(0),f=ee.useCallback((p,v)=>{m&&console.log(`[PageTransitionManager] ${p}`,v);},[m]),b=ee.useCallback(p=>{h(v=>{let k=a?[...v.transitionHistory,p]:v.transitionHistory,T=k.length,M=k.reduce((B,R)=>B+R.duration,0)/T;return {...v,totalTransitions:T,averageDuration:M,transitionHistory:k}});},[a]),g=ee.useCallback(async p=>{let v=`transition_${++y.current}`,k={type:e,duration:r,easing:o,...p},T={id:v,type:k.type,duration:k.duration,easing:k.easing,timestamp:Date.now(),status:"pending"};f("Starting transition",{id:v,config:k}),h(B=>({...B,isTransitioning:true,currentTransition:T}));let M=setTimeout(()=>{var R;let B={...T,status:"completed"};h(N=>({...N,isTransitioning:false,currentTransition:null})),b(B),s.current.delete(v),f("Transition completed",{id:v}),(R=k.onComplete)==null||R.call(k);},k.duration);return s.current.set(v,{timer:M,config:k}),setTimeout(()=>{h(B=>({...B,currentTransition:{...B.currentTransition,status:"active"}}));},50),v},[e,r,o,f,b]),d=ee.useCallback(p=>{let v=s.current.get(p);v&&(clearTimeout(v.timer),s.current.delete(p),h(k=>{var T;return {...k,isTransitioning:s.current.size>0,currentTransition:((T=k.currentTransition)==null?void 0:T.id)===p?null:k.currentTransition}}),f("Transition cancelled",{id:p}));},[f]),n=ee.useCallback(()=>{s.current.forEach(({timer:p},v)=>{clearTimeout(p),f("Transition paused",{id:v});});},[f]),u=ee.useCallback(()=>{s.current.forEach(({config:p},v)=>{g(p);});},[g]),c=ee.useCallback(()=>{h(p=>({...p,transitionHistory:[],totalTransitions:0,averageDuration:0})),f("History cleared");},[f]),w=ee.useCallback(()=>{let{transitionHistory:p}=x,v=p.reduce((T,M)=>(T[M.type]=(T[M.type]||0)+1,T),{}),k=p.reduce((T,M)=>(T[M.status]=(T[M.status]||0)+1,T),{});return {total:p.length,average:x.averageDuration,byType:v,byStatus:k}},[x]);return ee.useEffect(()=>{let p=s.current;return ()=>{p.forEach(({timer:v})=>{clearTimeout(v);}),p.clear();}},[]),[x,{startTransition:g,cancelTransition:d,pauseAll:n,resumeAll:u,clearHistory:c,getTransitionStats:w}]};var Yt=ee__default.default.forwardRef(({children:t,className:e,speed:r=.5,direction:o="up",offset:a=0,disabled:i=false,scale:m=false,opacity:x=false,rotate:h=false,rotateDirection:s="cw",style:y,...f},b)=>{let g=ee.useRef(null),[d,n]=ee.useState({x:0,y:0,scale:1,opacity:1,rotate:0}),u=To(),c=ee.useCallback(()=>{if(i||u)return;let p=g.current;if(!p)return;let v=p.getBoundingClientRect(),k=window.innerHeight,M=v.top+v.height/2,R=(k/2-M)/k,N=R*r*100+a,C=0,I=0;switch(o){case "up":I=-N;break;case "down":I=N;break;case "left":C=-N;break;case "right":C=N;break}let V=m?1+Math.abs(R)*.1:1,z=x?Math.max(.3,1-Math.abs(R)*.5):1,$=h?R*10*(s==="cw"?1:-1):0;n({x:C,y:I,scale:V,opacity:z,rotate:$});},[i,u,r,o,a,m,x,h,s]);ee.useEffect(()=>{if(i||u)return;c();let p=()=>{requestAnimationFrame(c);};return window.addEventListener("scroll",p,{passive:true}),window.addEventListener("resize",p,{passive:true}),()=>{window.removeEventListener("scroll",p),window.removeEventListener("resize",p);}},[c,i,u]);let w={...y,transform:i||u?void 0:`translate3d(${d.x}px, ${d.y}px, 0) scale(${d.scale}) rotate(${d.rotate}deg)`,opacity:i||u?1:d.opacity,willChange:i||u?void 0:"transform, opacity"};return jsxRuntime.jsx("div",{ref:Co(b,g),className:l("transition-none",e),style:w,...f,children:t})});Yt.displayName="Parallax";function To(){let[t,e]=ee.useState(false);return ee.useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");e(r.matches);let o=a=>{e(a.matches);};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),t}function Co(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r&&typeof r=="object"&&(r.current=e);});}}var Qt=ee__default.default.forwardRef(({children:t,className:e,direction:r="left",speed:o=50,pauseOnHover:a=true,pauseOnClick:i=false,gap:m=16,gradient:x=true,gradientColor:h="hsl(var(--background))",gradientWidth:s=100,style:y,...f},b)=>{let g=ee.useRef(null),[d,n]=ee.useState(0),[u,c]=ee.useState(0),[w,p]=ee.useState(false),v=r==="left"||r==="right",k=r==="right"||r==="down";ee.useEffect(()=>{let R=g.current;if(!R)return;let N=R.firstElementChild;if(!N)return;let C=()=>{v?n(N.offsetWidth):c(N.offsetHeight);};C();let I=new ResizeObserver(C);return I.observe(N),()=>I.disconnect()},[v,t]);let M={"--marquee-duration":`${v?d/o:u/o}s`,"--marquee-gap":`${m}px`},B=x?{"--gradient-color":h,"--gradient-width":`${s}px`}:{};return jsxRuntime.jsxs("div",{ref:b,className:l("relative overflow-hidden",x&&"marquee-gradient",e),style:{...y,...B},onMouseEnter:()=>a&&p(true),onMouseLeave:()=>a&&p(false),onClick:()=>i&&p(!w),...f,children:[jsxRuntime.jsxs("div",{ref:g,className:l("flex",v?"flex-row":"flex-col",w?"animate-pause":"",v?k?"animate-marquee-right":"animate-marquee-left":k?"animate-marquee-down":"animate-marquee-up"),style:M,children:[jsxRuntime.jsx("div",{className:l("flex shrink-0",v?"flex-row":"flex-col"),style:{gap:m},children:t}),jsxRuntime.jsx("div",{className:l("flex shrink-0",v?"flex-row":"flex-col"),style:{gap:m,[v?"marginLeft":"marginTop"]:m},"aria-hidden":"true",children:t})]}),jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:`
|
|
2
2
|
@keyframes marquee-left {
|
|
3
3
|
from { transform: translateX(0); }
|
|
4
4
|
to { transform: translateX(calc(-50% - var(--marquee-gap) / 2)); }
|
|
@@ -37,17 +37,17 @@
|
|
|
37
37
|
right: 0;
|
|
38
38
|
background: linear-gradient(to left, var(--gradient-color), transparent);
|
|
39
39
|
}
|
|
40
|
-
`}})]})});
|
|
41
|
-
${
|
|
40
|
+
`}})]})});Qt.displayName="Marquee";var Jt=ee__default.default.forwardRef(({children:t,className:e,glowColor:r="rgba(120, 119, 198, 0.3)",glowSize:o=400,glowOpacity:a=.6,border:i=true,borderColor:m,style:x,...h},s)=>{let y=ee.useRef(null),[f,b]=ee.useState({x:0,y:0}),[g,d]=ee.useState(false),n=ee.useCallback(w=>{if(!y.current)return;let p=y.current.getBoundingClientRect();b({x:w.clientX-p.left,y:w.clientY-p.top});},[]),u={position:"absolute",top:0,left:0,right:0,bottom:0,borderRadius:"inherit",opacity:g?a:0,background:`radial-gradient(${o}px circle at ${f.x}px ${f.y}px, ${r}, transparent 40%)`,transition:"opacity 0.3s ease",pointerEvents:"none"},c=i?{position:"absolute",top:0,left:0,right:0,bottom:0,borderRadius:"inherit",opacity:g?1:0,background:`radial-gradient(${o/2}px circle at ${f.x}px ${f.y}px, ${m||r}, transparent 40%)`,transition:"opacity 0.3s ease",pointerEvents:"none",mask:"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",maskComposite:"exclude",WebkitMaskComposite:"xor",padding:"1px"}:{};return jsxRuntime.jsxs("div",{ref:So(s,y),className:l("relative overflow-hidden rounded-xl bg-card border border-border p-6","transition-all duration-300",g&&"border-transparent",e),style:x,onMouseMove:n,onMouseEnter:()=>d(true),onMouseLeave:()=>d(false),...h,children:[jsxRuntime.jsx("div",{style:u,"aria-hidden":"true"}),i&&jsxRuntime.jsx("div",{style:c,"aria-hidden":"true"}),jsxRuntime.jsx("div",{className:"relative z-10",children:t})]})});Jt.displayName="GlowCard";function So(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r&&typeof r=="object"&&(r.current=e);});}}var tr=ee__default.default.forwardRef(({children:t,className:e,spotlightColor:r="rgba(255, 255, 255, 0.1)",spotlightSize:o=300,gradient:a=true,gradientFrom:i="rgba(255, 255, 255, 0.05)",gradientTo:m="transparent",style:x,...h},s)=>{let y=ee.useRef(null),[f,b]=ee.useState({x:0,y:0}),[g,d]=ee.useState(false),n=ee.useCallback(w=>{if(!y.current)return;let p=y.current.getBoundingClientRect();b({x:w.clientX-p.left,y:w.clientY-p.top});},[]),u={position:"absolute",top:0,left:0,right:0,bottom:0,borderRadius:"inherit",opacity:g?1:0,background:`radial-gradient(${o}px circle at ${f.x}px ${f.y}px, ${r}, transparent 60%)`,transition:"opacity 0.4s ease",pointerEvents:"none"},c=a?{position:"absolute",top:0,left:0,right:0,bottom:0,borderRadius:"inherit",background:`linear-gradient(135deg, ${i} 0%, ${m} 100%)`,pointerEvents:"none"}:{};return jsxRuntime.jsxs("div",{ref:$o(s,y),className:l("relative overflow-hidden rounded-xl","bg-gray-900 border border-gray-800","transition-all duration-300",g&&"border-gray-700 shadow-2xl shadow-black/20",e),style:x,onMouseMove:n,onMouseEnter:()=>d(true),onMouseLeave:()=>d(false),...h,children:[a&&jsxRuntime.jsx("div",{style:c,"aria-hidden":"true"}),jsxRuntime.jsx("div",{style:u,"aria-hidden":"true"}),jsxRuntime.jsx("div",{className:"relative z-10",children:t})]})});tr.displayName="SpotlightCard";function $o(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r&&typeof r=="object"&&(r.current=e);});}}var nr=ee__default.default.forwardRef(({text:t,className:e,revealColor:r="currentColor",hiddenColor:o="rgba(128, 128, 128, 0.3)",threshold:a=.5,byWord:i=false,byChar:m=false,style:x,...h},s)=>{let y=ee.useRef(null),[f,b]=ee.useState(0),g=qo(),d=ee.useCallback(()=>{if(!y.current)return;let u=y.current.getBoundingClientRect(),c=window.innerHeight,w=c*(1-a),p=c*a,v=u.top+u.height/2,k=0;v<=w&&v>=p?k=(w-v)/(w-p):v<p&&(k=1),b(Math.max(0,Math.min(1,k)));},[a]);ee.useEffect(()=>{if(g){b(1);return}d();let u=()=>{requestAnimationFrame(d);};return window.addEventListener("scroll",u,{passive:true}),window.addEventListener("resize",u,{passive:true}),()=>{window.removeEventListener("scroll",u),window.removeEventListener("resize",u);}},[d,g]);let n=()=>{if(m){let u=t.split("");return u.map((c,w)=>{let p=f*u.length,v=w<p;return jsxRuntime.jsx("span",{style:{color:v?r:o,transition:"color 0.1s ease-out"},children:c},w)})}if(i){let u=t.split(" ");return u.map((c,w)=>{let p=f*u.length,v=w<p;return jsxRuntime.jsxs("span",{children:[jsxRuntime.jsx("span",{style:{color:v?r:o,transition:"color 0.15s ease-out"},children:c}),w<u.length-1&&" "]},w)})}return jsxRuntime.jsx("span",{style:{background:`linear-gradient(90deg, ${r} ${f*100}%, ${o} ${f*100}%)`,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",transition:"background 0.1s ease-out"},children:t})};return jsxRuntime.jsx("div",{ref:Uo(s,y),className:l("font-medium",e),style:x,...h,children:n()})});nr.displayName="TextReveal";function qo(){let[t,e]=ee.useState(false);return ee.useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");e(r.matches);let o=a=>{e(a.matches);};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),t}function Uo(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r&&typeof r=="object"&&(r.current=e);});}}var Go=["#ff0080","#7928ca","#0070f3","#00dfd8"],ir=ee__default.default.forwardRef(({children:t,className:e,colors:r=Go,speed:o=3,blur:a=true,blurAmount:i=100,type:m="mesh",animate:x=true,style:h,...s},y)=>{let[f,b]=ee.useState(false),g=_o(),d=x&&!g;ee.useEffect(()=>{b(true);},[]);let n=()=>{switch(m){case "linear":return jsxRuntime.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(
|
|
41
|
+
${d?"var(--gradient-angle, 0deg)":"135deg"},
|
|
42
42
|
${r.join(", ")}
|
|
43
|
-
)`,animation:
|
|
44
|
-
circle at ${
|
|
43
|
+
)`,animation:d?`gradient-rotate ${o}s linear infinite`:void 0}});case "radial":return jsxRuntime.jsx("div",{className:"absolute inset-0",style:{background:`radial-gradient(
|
|
44
|
+
circle at ${d?"var(--gradient-x, 50%) var(--gradient-y, 50%)":"50% 50%"},
|
|
45
45
|
${r.join(", ")}
|
|
46
|
-
)`,animation:
|
|
47
|
-
from ${
|
|
46
|
+
)`,animation:d?`gradient-move ${o}s ease-in-out infinite`:void 0}});case "conic":return jsxRuntime.jsx("div",{className:"absolute inset-0",style:{background:`conic-gradient(
|
|
47
|
+
from ${d?"var(--gradient-angle, 0deg)":"0deg"} at 50% 50%,
|
|
48
48
|
${r.join(", ")},
|
|
49
49
|
${r[0]}
|
|
50
|
-
)`,animation:
|
|
50
|
+
)`,animation:d?`gradient-spin ${o}s linear infinite`:void 0}});default:return f?jsxRuntime.jsx(jsxRuntime.Fragment,{children:r.map((u,c)=>{let w=360/r.length*c,p=o/r.length*c;return jsxRuntime.jsx("div",{className:"absolute rounded-full mix-blend-screen",style:{width:"60%",height:"60%",background:`radial-gradient(circle at center, ${u} 0%, transparent 70%)`,top:`${30+Math.sin(w*Math.PI/180)*20}%`,left:`${30+Math.cos(w*Math.PI/180)*20}%`,animation:d?`gradient-blob ${o}s ease-in-out infinite`:void 0,animationDelay:d?`${-p}s`:void 0}},c)})}):null}};return jsxRuntime.jsxs("div",{ref:y,className:l("relative overflow-hidden",e),style:h,...s,children:[jsxRuntime.jsx("div",{className:"absolute inset-0",style:{filter:a?`blur(${i}px)`:void 0},children:n()}),t&&jsxRuntime.jsx("div",{className:"relative z-10",children:t}),jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:`
|
|
51
51
|
@keyframes gradient-rotate {
|
|
52
52
|
0% { --gradient-angle: 0deg; }
|
|
53
53
|
100% { --gradient-angle: 360deg; }
|
|
@@ -68,15 +68,15 @@
|
|
|
68
68
|
50% { transform: translate(0, 20%) scale(0.9); }
|
|
69
69
|
75% { transform: translate(-20%, -10%) scale(1.05); }
|
|
70
70
|
}
|
|
71
|
-
`}})]})});
|
|
71
|
+
`}})]})});ir.displayName="AnimatedGradient";function _o(){let[t,e]=ee.useState(false);return ee.useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");e(r.matches);let o=a=>{e(a.matches);};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),t}var cr=ee__default.default.forwardRef(({children:t,className:e,maxTilt:r=15,perspective:o=1e3,scale:a=1.02,speed:i=400,glare:m=true,maxGlare:x=.3,reset:h=true,style:s,...y},f)=>{let b=ee.useRef(null),[g,d]=ee.useState({rotateX:0,rotateY:0,scale:1}),[n,u]=ee.useState({x:50,y:50}),[c,w]=ee.useState(false),p=ee.useCallback(R=>{if(!b.current)return;let N=b.current.getBoundingClientRect(),C=N.left+N.width/2,I=N.top+N.height/2,V=R.clientX-C,z=R.clientY-I,$=V/(N.width/2)*r,Z=-(z/(N.height/2))*r;d({rotateX:Z,rotateY:$,scale:a});let J=(R.clientX-N.left)/N.width*100,D=(R.clientY-N.top)/N.height*100;u({x:J,y:D});},[r,a]),v=()=>{w(true);},k=()=>{w(false),h&&d({rotateX:0,rotateY:0,scale:1});},T={...s,perspective:`${o}px`},M={transform:`rotateX(${g.rotateX}deg) rotateY(${g.rotateY}deg) scale(${g.scale})`,transition:c?"none":`transform ${i}ms ease-out`,transformStyle:"preserve-3d"},B={position:"absolute",top:0,left:0,right:0,bottom:0,borderRadius:"inherit",background:`linear-gradient(
|
|
72
72
|
${Math.atan2(n.y-50,n.x-50)*(180/Math.PI)+90}deg,
|
|
73
|
-
rgba(255, 255, 255, ${
|
|
73
|
+
rgba(255, 255, 255, ${c?x:0}) 0%,
|
|
74
74
|
transparent 80%
|
|
75
|
-
)`,transition:u?"opacity 0.1s ease-out":`opacity ${s}ms ease-out`,pointerEvents:"none",opacity:u?1:0};return jsxRuntime.jsx("div",{ref:Fo(m,x),className:l("relative",e),style:w,onMouseMove:p,onMouseEnter:b,onMouseLeave:k,...y,children:jsxRuntime.jsxs("div",{style:N,className:"relative",children:[t,d&&jsxRuntime.jsx("div",{style:B,"aria-hidden":"true"})]})})});sr.displayName="TiltCard";function Fo(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r&&typeof r=="object"&&(r.current=e);});}}var lr=ee__default.default.forwardRef(({src:t,type:e="native",poster:r,autoPlay:o=true,loop:a=true,muted:s=true,controls:d=false,objectFit:v="cover",overlay:h=true,overlayColor:i="rgba(0, 0, 0, 0.4)",gradient:y=false,gradientDirection:m="bottom",playbackRate:x=1,fadeIn:f=true,children:c,className:n,style:g,...u},C)=>{let p=ee.useRef(null),[b,k]=ee.useState(false),[w,N]=ee.useState(false);ee.useEffect(()=>{e==="native"&&p.current&&(p.current.playbackRate=x);},[x,e]);let B=()=>{k(true);},M=()=>{N(true);},R=$=>{let Z=new URLSearchParams({autoplay:o?"1":"0",mute:s?"1":"0",loop:a?"1":"0",controls:d?"1":"0",playlist:$,modestbranding:"1",rel:"0",showinfo:"0",iv_load_policy:"3",disablekb:"1",enablejsapi:"1",playsinline:"1"});return `https://www.youtube.com/embed/${$}?${Z.toString()}`},T=$=>{let Z=new URLSearchParams({autoplay:o?"1":"0",muted:s?"1":"0",loop:a?"1":"0",controls:d?"1":"0",background:"1",quality:"auto",dnt:"1"});return `https://player.vimeo.com/video/${$}?${Z.toString()}`},I=()=>{let $={cover:"object-cover",contain:"object-contain",fill:"object-fill"}[v];switch(e){case "youtube":return jsxRuntime.jsx("iframe",{src:R(t),className:l("absolute inset-0 w-full h-full pointer-events-none","scale-[1.2]"),style:{opacity:b||!f?1:0,transition:f?"opacity 0.8s ease-out":void 0},allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:true,onLoad:()=>k(true),title:"YouTube video background"});case "vimeo":return jsxRuntime.jsx("iframe",{src:T(t),className:"absolute inset-0 w-full h-full pointer-events-none",style:{opacity:b||!f?1:0,transition:f?"opacity 0.8s ease-out":void 0},allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:true,onLoad:()=>k(true),title:"Vimeo video background"});default:return jsxRuntime.jsx("video",{ref:p,src:t,poster:r,autoPlay:o,loop:a,muted:s,controls:d,playsInline:true,className:l("absolute inset-0 w-full h-full",$),style:{opacity:w||!f?1:0,transition:f?"opacity 0.8s ease-out":void 0},onLoadedData:B,onPlaying:M})}},V=()=>{if(!y)return null;let $=[];return (m==="top"||m==="both")&&$.push(jsxRuntime.jsx("div",{className:"absolute top-0 left-0 right-0 h-1/3",style:{background:`linear-gradient(to bottom, ${i}, transparent)`},"aria-hidden":"true"},"top")),(m==="bottom"||m==="both")&&$.push(jsxRuntime.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-1/3",style:{background:`linear-gradient(to top, ${i}, transparent)`},"aria-hidden":"true"},"bottom")),jsxRuntime.jsx(jsxRuntime.Fragment,{children:$})},z=n&&/\b(fixed|absolute|sticky)\b/.test(n);return jsxRuntime.jsxs("div",{ref:C,className:l("overflow-hidden",!z&&"relative",n),style:g,...u,children:[r&&f&&!b&&!w&&jsxRuntime.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${r})`},"aria-hidden":"true"}),I(),h&&!y&&jsxRuntime.jsx("div",{className:"absolute inset-0",style:{backgroundColor:i},"aria-hidden":"true"}),V(),c&&jsxRuntime.jsx("div",{className:"relative z-10 h-full",children:c})]})});lr.displayName="VideoBackground";var cr=ee__default.default.forwardRef(({children:t,autoPlay:e=false,interval:r=5e3,loop:o=true,pauseOnHover:a=true,indicators:s="dots",indicatorPosition:d="bottom",showArrows:v=true,arrowPosition:h="inside",transition:i="slide",transitionDuration:y=500,onSlideChange:m,showPlayPause:x=false,playPausePosition:f="right",className:c,style:n,...g},u)=>{let C=()=>i==="slide"&&o?1:0,[p,b]=ee.useState(C),[k,w]=ee.useState(!e),[N,B]=ee.useState(false),[M,R]=ee.useState(false),[T,I]=ee.useState(false),[V,z]=ee.useState(null),[$,Z]=ee.useState(null),J=ee.useRef(null),D=ee__default.default.Children.count(t),te=jo(),ne=ee.useCallback(L=>i!=="slide"||!o?L:L===0?D-1:L===D+1?0:L-1,[o,D,i]),W=ee.useCallback(L=>{if(M)return;let E=L;if(o?i!=="slide"&&(L<0?E=D-1:L>=D&&(E=0)):E=Math.max(0,Math.min(L,D-1)),E!==p){R(true),b(E);let A=o&&i==="slide"?E===0?D-1:E===D+1?0:E-1:E;m==null||m(A),setTimeout(()=>R(false),y);}},[p,D,o,M,y,i,m]);ee.useEffect(()=>{!o||M||i!=="slide"||(p===0?setTimeout(()=>{I(true),b(D),setTimeout(()=>I(false),50);},y):p===D+1&&setTimeout(()=>{I(true),b(1),setTimeout(()=>I(false),50);},y));},[p,D,o,M,y,i]);let re=ee.useCallback(()=>{W(p+1);},[p,W]),ve=ee.useCallback(()=>{W(p-1);},[p,W]),We=ee.useCallback(()=>{B(L=>!L);},[]);ee.useCallback(()=>{B(false);},[]);ee.useCallback(()=>{B(true);},[]);ee.useEffect(()=>{if(!e||k||N||te)return;let L=setInterval(re,r);return ()=>clearInterval(L)},[e,r,k,N,re,te]);let Ge=L=>{z(L.targetTouches[0].clientX);},_e=L=>{Z(L.targetTouches[0].clientX);},je=()=>{if(!V||!$)return;let L=V-$;Math.abs(L)>=50&&(L>0?re():ve()),z(null),Z(null);};ee.useEffect(()=>{let L=A=>{A.key==="ArrowLeft"?ve():A.key==="ArrowRight"&&re();},E=J.current;return E==null||E.addEventListener("keydown",L),()=>E==null?void 0:E.removeEventListener("keydown",L)},[re,ve]);let it=()=>{let L=te||T?0:y,E=ne(p);switch(i){case "fade":return ee__default.default.Children.map(t,(A,q)=>jsxRuntime.jsx("div",{className:l("absolute inset-0 w-full h-full",q===E?"z-10":"z-0"),style:{opacity:q===E?1:0,transition:`opacity ${L}ms ease-in-out`},children:A},q));case "scale":return ee__default.default.Children.map(t,(A,q)=>jsxRuntime.jsx("div",{className:l("absolute inset-0 w-full h-full",q===E?"z-10":"z-0"),style:{opacity:q===E?1:0,transform:`scale(${q===E?1:.9})`,transition:`opacity ${L}ms ease-in-out, transform ${L}ms ease-in-out`},children:A},q));default:{let A=ee__default.default.Children.toArray(t);return (o?[A[A.length-1],...A,A[0]]:A).map((j,oe)=>jsxRuntime.jsx("div",{className:"absolute inset-0 w-full h-full",style:{transform:`translateX(${(oe-p)*100}%)`,transition:T?"none":`transform ${L}ms ease-in-out`},children:j},oe))}}},Ne=()=>{if(s==="none")return null;let L=d.includes("inside"),E=d.includes("top"),A=ne(p),q=l("flex items-center justify-center gap-2",L?l("absolute left-1/2 -translate-x-1/2 z-20",E?"top-4":"bottom-4"):l("mt-4",E&&"order-first mb-4 mt-0")),j=oe=>{W(o&&i==="slide"?oe+1:oe);};return jsxRuntime.jsx("div",{className:q,role:"tablist",children:Array.from({length:D},(oe,K)=>{let ie=K===A;switch(s){case "bars":return jsxRuntime.jsx("button",{onClick:()=>j(K),className:l("h-1 rounded-full transition-all duration-300",ie?"w-8 bg-white":"w-4 bg-white/50 hover:bg-white/70"),role:"tab","aria-selected":ie,"aria-label":`\uC2AC\uB77C\uC774\uB4DC ${K+1}`},K);case "numbers":return jsxRuntime.jsx("button",{onClick:()=>j(K),className:l("w-8 h-8 rounded-full text-sm font-medium transition-all duration-300",ie?"bg-white text-gray-900":"bg-white/30 text-white hover:bg-white/50"),role:"tab","aria-selected":ie,"aria-label":`\uC2AC\uB77C\uC774\uB4DC ${K+1}`,children:K+1},K);default:return jsxRuntime.jsx("button",{onClick:()=>j(K),className:l("w-2.5 h-2.5 rounded-full transition-all duration-300",ie?"bg-white scale-125":"bg-white/50 hover:bg-white/70"),role:"tab","aria-selected":ie,"aria-label":`\uC2AC\uB77C\uC774\uB4DC ${K+1}`},K)}})})},Xe=()=>{if(!x||!e)return null;let L=!N;return jsxRuntime.jsx("button",{onClick:We,className:l("absolute bottom-4 z-20","w-8 h-8 rounded-full flex items-center justify-center","bg-white/80 hover:bg-white text-gray-800","transition-all duration-200","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white",{left:"left-4",center:"left-1/2 -translate-x-1/2",right:"right-4"}[f]),"aria-label":L?"\uC77C\uC2DC\uC815\uC9C0":"\uC7AC\uC0DD",children:L?jsxRuntime.jsx(Qo,{className:"w-4 h-4"}):jsxRuntime.jsx(Ko,{className:"w-4 h-4"})})},Ye=()=>{if(!v||h==="hidden")return null;let L=o||p>0,E=o||p<D-1,A=l("absolute top-1/2 -translate-y-1/2 z-20","w-10 h-10 rounded-full flex items-center justify-center","bg-white/80 hover:bg-white text-gray-800","transition-all duration-200","disabled:opacity-30 disabled:cursor-not-allowed","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white"),q=h==="outside"?"-left-14":"left-4",j=h==="outside"?"-right-14":"right-4";return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:ve,disabled:!L,className:l(A,q),"aria-label":"\uC774\uC804 \uC2AC\uB77C\uC774\uB4DC",children:jsxRuntime.jsx(Xo,{className:"w-5 h-5"})}),jsxRuntime.jsx("button",{onClick:re,disabled:!E,className:l(A,j),"aria-label":"\uB2E4\uC74C \uC2AC\uB77C\uC774\uB4DC",children:jsxRuntime.jsx(Yo,{className:"w-5 h-5"})})]})};return jsxRuntime.jsxs("div",{ref:u,className:l("flex flex-col w-full h-full",h==="outside"&&"px-16",c),style:n,...g,children:[jsxRuntime.jsxs("div",{ref:J,className:"relative overflow-hidden w-full flex-1",onMouseEnter:()=>a&&w(true),onMouseLeave:()=>a&&w(false),onTouchStart:Ge,onTouchMove:_e,onTouchEnd:je,tabIndex:0,role:"region","aria-roledescription":"carousel","aria-label":"\uC774\uBBF8\uC9C0 \uC2AC\uB77C\uC774\uB354",children:[it(),Ye(),Xe(),d.includes("inside")&&Ne()]}),!d.includes("inside")&&Ne()]})});cr.displayName="Carousel";function jo(){let[t,e]=ee.useState(false);return ee.useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");e(r.matches);let o=a=>{e(a.matches);};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),t}function Xo({className:t}){return jsxRuntime.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}function Yo({className:t}){return jsxRuntime.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}function Ko({className:t}){return jsxRuntime.jsx("svg",{className:t,fill:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8 5v14l11-7z"})})}function Qo({className:t}){return jsxRuntime.jsx("svg",{className:t,fill:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})})}var he=ee__default.default.forwardRef(({className:t,value:e,max:r=100,size:o="md",color:a="blue",...s},d)=>{let v={sm:"h-2",md:"h-3",lg:"h-4"},h={blue:"bg-indigo-500",green:"bg-green-500",yellow:"bg-yellow-500",red:"bg-red-500",purple:"bg-purple-500",orange:"bg-orange-500",indigo:"bg-indigo-500",pink:"bg-pink-500",gray:"bg-gray-500"},i=Math.min(Math.max(e/r*100,0),100);return jsxRuntime.jsx("div",{ref:d,className:l("w-full bg-muted rounded-full",v[o],t),...s,children:jsxRuntime.jsx("div",{className:l("h-full rounded-full transition-all duration-300",h[a]||h.blue),style:{width:`${i}%`}})})});he.displayName="EmotionMeter";var Ze=ee__default.default.forwardRef(({className:t,emotion:e,isSelected:r=false,size:o="md",...a},s)=>jsxRuntime.jsx("button",{ref:s,className:l("rounded-full border-2 transition-all duration-200 hover:scale-105 focus:outline-none focus:ring-1 focus:ring-ring",{sm:"w-8 h-8 text-sm",md:"w-12 h-12 text-lg",lg:"w-16 h-16 text-xl"}[o],r?"border-indigo-500 bg-indigo-50 dark:bg-indigo-900/20":"border-border bg-background",t),...a,children:e}));Ze.displayName="EmotionButton";var on=[{key:"joy",label:"\uAE30\uC068",icon:"smile",color:"yellow"},{key:"sadness",label:"\uC2AC\uD514",icon:"frown",color:"blue"},{key:"anger",label:"\uD654\uB0A8",icon:"angry",color:"red"},{key:"calm",label:"\uD3C9\uC628",icon:"heart",color:"green"},{key:"excitement",label:"\uC124\uB818",icon:"star",color:"pink"},{key:"worry",label:"\uAC71\uC815",icon:"meh",color:"gray"},{key:"gratitude",label:"\uAC10\uC0AC",icon:"heart",color:"purple"},{key:"loneliness",label:"\uC678\uB85C\uC6C0",icon:"user",color:"indigo"}],ur=ee__default.default.forwardRef(({className:t,selectedEmotion:e,onEmotionSelect:r,layout:o="grid",showIntensity:a=false,intensity:s=50,onIntensityChange:d,emotions:v=on,size:h="md",variant:i="button",...y},m)=>{let x=n=>{r==null||r(n);},f=n=>{let g=e===n.key;return i==="button"?jsxRuntime.jsx(Ze,{emotion:n.key,isSelected:g,size:h,onClick:()=>x(n.key),className:l("transition-all duration-200",g&&"ring-1 ring-offset-2 ring-primary"),children:n.label},n.key):i==="card"?jsxRuntime.jsx("div",{className:l("p-4 rounded-lg border-2 cursor-pointer transition-all duration-200 hover:shadow-md",g?"border-primary bg-primary/5":"border-border hover:border-primary/50"),onClick:()=>x(n.key),children:jsxRuntime.jsxs("div",{className:"flex items-center space-x-3",children:[jsxRuntime.jsx("div",{className:l("w-8 h-8 rounded-full flex items-center justify-center",g?"bg-primary text-primary-foreground":"bg-muted"),children:n.icon&&jsxRuntime.jsxs("span",{className:"text-lg",children:[n.icon==="smile"&&"\u{1F60A}",n.icon==="frown"&&"\u{1F622}",n.icon==="angry"&&"\u{1F620}",n.icon==="heart"&&"\u2764\uFE0F",n.icon==="star"&&"\u2B50",n.icon==="meh"&&"\u{1F610}",n.icon==="user"&&"\u{1F464}"]})}),jsxRuntime.jsx("span",{className:"font-medium truncate max-w-[120px]",children:n.label})]})},n.key):i==="chip"?jsxRuntime.jsx("div",{className:l("px-3 py-1 rounded-full cursor-pointer transition-all duration-200 text-sm font-medium",g?"bg-primary text-primary-foreground":"bg-muted hover:bg-muted/80"),onClick:()=>x(n.key),children:jsxRuntime.jsx("span",{className:"truncate max-w-[100px]",children:n.label})},n.key):null},c={grid:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-2 md:gap-3",list:"space-y-2",compact:"flex flex-wrap gap-1"};return jsxRuntime.jsxs("div",{ref:m,className:l("space-y-4",t),...y,children:[jsxRuntime.jsx("div",{className:c[o],children:v.map(f)}),a&&e&&jsxRuntime.jsxs("div",{className:"space-y-3",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uAC10\uC815 \uAC15\uB3C4"}),jsxRuntime.jsxs("span",{className:"text-sm text-muted-foreground",children:[s,"%"]})]}),jsxRuntime.jsx("input",{type:"range",min:"0",max:"100",value:s,onChange:n=>d==null?void 0:d(Number(n.target.value)),className:"w-full h-2 bg-muted rounded-lg appearance-none cursor-pointer slider"}),jsxRuntime.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[jsxRuntime.jsx("span",{children:"\uC57D\uD568"}),jsxRuntime.jsx("span",{children:"\uBCF4\uD1B5"}),jsxRuntime.jsx("span",{children:"\uAC15\uD568"})]})]}),e&&a&&jsxRuntime.jsx("div",{className:"flex justify-center",children:jsxRuntime.jsx(he,{value:s,size:"md",color:"blue"})})]})});ur.displayName="EmotionSelector";var an=classVarianceAuthority.cva("rounded-lg",{variants:{variant:{default:"bg-card text-card-foreground border border-border",outline:"bg-transparent border-2 border-border",elevated:"bg-card text-card-foreground shadow-lg border border-border"},shadow:{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg"},padding:{none:"",sm:"p-3",md:"p-4",lg:"p-6"}},defaultVariants:{variant:"default",padding:"none"}}),yt=ee__default.default.forwardRef(({className:t,variant:e="default",shadow:r,padding:o="none",hoverable:a,...s},d)=>jsxRuntime.jsx("div",{ref:d,className:l(an({variant:e,shadow:r,padding:o}),a&&"transition-shadow hover:shadow-lg cursor-pointer",t),...s}));yt.displayName="Card";var xt=ee__default.default.forwardRef(({className:t,...e},r)=>jsxRuntime.jsx("div",{ref:r,className:l("flex flex-col space-y-1 p-3",t),...e}));xt.displayName="CardHeader";var wt=ee__default.default.forwardRef(({className:t,...e},r)=>jsxRuntime.jsx("h3",{ref:r,className:l("text-base md:text-lg font-semibold leading-tight tracking-tight",t),...e}));wt.displayName="CardTitle";var Tt=ee__default.default.forwardRef(({className:t,...e},r)=>jsxRuntime.jsx("p",{ref:r,className:l("text-sm text-muted-foreground",t),...e}));Tt.displayName="CardDescription";var Ct=ee__default.default.forwardRef(({className:t,...e},r)=>jsxRuntime.jsx("div",{ref:r,className:l("px-3 pb-3",t),...e}));Ct.displayName="CardContent";var sn=ee__default.default.forwardRef(({className:t,...e},r)=>jsxRuntime.jsx("div",{ref:r,className:l("flex items-center px-3 pb-3",t),...e}));sn.displayName="CardFooter";var cn=classVarianceAuthority.cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors duration-200 ease-in-out focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2",{variants:{variant:{default:"bg-[var(--badge-default-bg)] text-[var(--badge-default-text)] hover:opacity-80",secondary:"bg-[var(--badge-secondary-bg)] text-[var(--badge-secondary-text)] hover:opacity-80",destructive:"bg-[var(--badge-destructive-bg)] text-slate-50 hover:opacity-80",error:"bg-[var(--badge-destructive-bg)] text-slate-50 hover:opacity-80",outline:"bg-transparent text-[var(--badge-outline-text)] border border-[var(--badge-outline-border)] hover:bg-[var(--badge-outline-hover-bg)]",glass:"bg-[var(--badge-glass-bg)] backdrop-blur-sm border border-[var(--badge-glass-border)] text-[var(--badge-glass-text)] hover:opacity-80"}},defaultVariants:{variant:"default"}}),Se=ee__default.default.memo(ee__default.default.forwardRef(({className:t,variant:e="default",...r},o)=>jsxRuntime.jsx("div",{ref:o,className:l(cn({variant:e}),t),...r})));Se.displayName="Badge";var gr=ee__default.default.forwardRef(({className:t,primaryEmotion:e,emotionDistribution:r=[],keywords:o=[],intensity:a=50,positivity:s=70,energy:d=60,showMeter:v=true,showDistribution:h=true,showKeywords:i=true,showMetrics:y=true,layout:m="detailed",...x},f)=>{let c=u=>u<30?"\uC57D\uD568":u<70?"\uBCF4\uD1B5":"\uAC15\uD568",n=u=>u<30?"\uBD80\uC815\uC801":u<70?"\uC911\uB9BD\uC801":"\uAE0D\uC815\uC801",g=u=>u<30?"\uB0AE\uC74C":u<70?"\uBCF4\uD1B5":"\uB192\uC74C";return m==="compact"?jsxRuntime.jsxs("div",{ref:f,className:l("space-y-3",t),...x,children:[e&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uC8FC\uC694 \uAC10\uC815:"}),jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",children:[jsxRuntime.jsxs("span",{className:"text-sm text-muted-foreground",children:[e.name," (",e.intensity,"%)"]}),v&&jsxRuntime.jsx(he,{value:e.intensity,size:"sm",color:"blue"})]})]}),y&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uAC10\uC815 \uAC15\uB3C4:"}),jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:c(a)})]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uAE0D\uC815\uC131:"}),jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:n(s)})]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uC5D0\uB108\uC9C0:"}),jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:g(d)})]})]}),i&&o.length>0&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uD0A4\uC6CC\uB4DC:"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:o.map(u=>jsxRuntime.jsx(Se,{variant:"secondary",className:"text-xs",children:u},u))})]})]}):m==="card"?jsxRuntime.jsxs(yt,{ref:f,className:l("",t),...x,children:[jsxRuntime.jsxs(xt,{children:[jsxRuntime.jsxs(wt,{className:"flex items-center",children:[jsxRuntime.jsx("span",{className:"text-2xl mr-2",children:"\u2728"}),"AI \uBD84\uC11D"]}),jsxRuntime.jsx(Tt,{children:"\uAC10\uC815 \uBD84\uC11D \uACB0\uACFC"})]}),jsxRuntime.jsxs(Ct,{className:"space-y-4",children:[e&&jsxRuntime.jsxs("div",{className:"space-y-3",children:[jsxRuntime.jsxs("div",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"\uC8FC\uC694 \uAC10\uC815:"}),jsxRuntime.jsxs("span",{className:"ml-2 text-muted-foreground",children:[e.name," (",e.intensity,"%)"]})]}),v&&jsxRuntime.jsx("div",{className:"flex justify-center",children:jsxRuntime.jsx(he,{value:e.intensity,size:"md",color:"blue"})})]}),y&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"\uAC10\uC815 \uAC15\uB3C4:"}),jsxRuntime.jsx("span",{className:"ml-2 text-muted-foreground",children:c(a)})]}),jsxRuntime.jsxs("div",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"\uAE0D\uC815\uC131:"}),jsxRuntime.jsx("span",{className:"ml-2 text-muted-foreground",children:n(s)})]}),jsxRuntime.jsxs("div",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"\uC5D0\uB108\uC9C0:"}),jsxRuntime.jsx("span",{className:"ml-2 text-muted-foreground",children:g(d)})]})]}),i&&o.length>0&&jsxRuntime.jsxs("div",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"\uD0A4\uC6CC\uB4DC:"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:o.map(u=>jsxRuntime.jsx(Se,{variant:"secondary",className:"text-xs",children:u},u))})]})]})]}):jsxRuntime.jsxs("div",{ref:f,className:l("space-y-6",t),...x,children:[e&&jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold",children:"\uC8FC\uC694 \uAC10\uC815"}),jsxRuntime.jsxs("div",{className:"flex items-center space-x-4",children:[jsxRuntime.jsxs("div",{className:"text-center",children:[jsxRuntime.jsx("div",{className:"text-2xl font-bold text-primary",children:e.name}),jsxRuntime.jsxs("div",{className:"text-sm text-muted-foreground",children:[e.intensity,"% \uAC15\uB3C4"]})]}),v&&jsxRuntime.jsx(he,{value:e.intensity,size:"lg",color:"blue"})]})]}),h&&r.length>0&&jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold",children:"\uAC10\uC815 \uBD84\uD3EC"}),jsxRuntime.jsx("div",{className:"space-y-3",children:r.map((u,C)=>jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:u.emotion}),jsxRuntime.jsxs("span",{className:"text-sm text-muted-foreground",children:[u.percentage,"%"]})]}),jsxRuntime.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:jsxRuntime.jsx("div",{className:`${u.color} h-2 rounded-full transition-all duration-300`,style:{width:`${u.percentage}%`}})})]},C))})]}),y&&jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold",children:"\uBD84\uC11D \uC9C0\uD45C"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"text-sm font-medium",children:"\uAC10\uC815 \uAC15\uB3C4"}),jsxRuntime.jsx("div",{className:"text-2xl font-bold text-primary",children:c(a)}),jsxRuntime.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:jsxRuntime.jsx("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${a}%`}})})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"text-sm font-medium",children:"\uAE0D\uC815\uC131"}),jsxRuntime.jsx("div",{className:"text-2xl font-bold text-green-600",children:n(s)}),jsxRuntime.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:jsxRuntime.jsx("div",{className:"bg-green-500 h-2 rounded-full transition-all duration-300",style:{width:`${s}%`}})})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"text-sm font-medium",children:"\uC5D0\uB108\uC9C0"}),jsxRuntime.jsx("div",{className:"text-2xl font-bold text-orange-600",children:g(d)}),jsxRuntime.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:jsxRuntime.jsx("div",{className:"bg-orange-500 h-2 rounded-full transition-all duration-300",style:{width:`${d}%`}})})]})]})]}),i&&o.length>0&&jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold",children:"\uAC10\uC815 \uD0A4\uC6CC\uB4DC"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2",children:o.map(u=>jsxRuntime.jsx(Se,{variant:"outline",className:"text-sm",children:u},u))})]})]})});gr.displayName="EmotionAnalysis";function kt(t){return t.toLowerCase().replace(/[^a-z0-9가-힣ぁ-んァ-ン一-龯_.~\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").trim()}function pn(t){return !t||t.length===0||t.length>200?false:/^[a-z0-9가-힣ぁ-んァ-ン一-龯_.~-]+$/.test(t)}function Et(t){return t.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9가-힣ぁ-んァ-ン一-龯_.~-]/g,"").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}var fn={pageTitle:"\uC0C8 \uAE00 \uC791\uC131",editTitle:"\uAE00 \uC218\uC815",preview:"\uBBF8\uB9AC\uBCF4\uAE30",editMode:"\uD3B8\uC9D1",basicInfo:"\uAE30\uBCF8 \uC815\uBCF4",slug:"\uC2AC\uB7EC\uADF8",slugPrefix:"/blog/",tags:"\uD0DC\uADF8",tagsPlaceholder:"\uAC1C\uBC1C, \uC77C\uC0C1, \uC5C5\uB370\uC774\uD2B8",coverImage:"\uCEE4\uBC84 \uC774\uBBF8\uC9C0 URL",coverImagePlaceholder:"https://example.com/image.jpg",publishDate:"\uBC1C\uD589 \uC608\uC57D\uC77C\uC2DC",publishDateHint:"\uBE44\uC6CC\uB450\uBA74 \uC989\uC2DC \uBC1C\uD589\uB428",expiresAt:"\uB9CC\uB8CC \uC77C\uC2DC",expiresAtHint:"\uBE44\uC6CC\uB450\uBA74 \uB9CC\uB8CC\uB418\uC9C0 \uC54A\uC74C",titleLabel:"\uC81C\uBAA9",titlePlaceholder:"\uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694",excerpt:"\uC694\uC57D",excerptPlaceholder:"\uCE74\uB4DC\uC5D0 \uD45C\uC2DC\uB420 \uC9E7\uC740 \uC694\uC57D",contentLabel:"\uBCF8\uBB38",contentPlaceholder:"\uB9C8\uD06C\uB2E4\uC6B4\uC73C\uB85C \uC791\uC131\uD558\uC138\uC694...",cancel:"\uCDE8\uC18C",saveDraft:"\uC784\uC2DC\uC800\uC7A5",publish:"\uBC1C\uD589",update:"\uC218\uC815 \uC644\uB8CC",saving:"\uC800\uC7A5 \uC911...",translateHint:"AI \uBC88\uC5ED \uAE30\uB2A5",translateButton:"AI \uBC88\uC5ED",translating:"\uBC88\uC5ED \uC911...",translateSuccess:"\uBC88\uC5ED \uC644\uB8CC!",requiredFields:"\uD544\uC218 \uD544\uB4DC\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694",saveError:"\uC800\uC7A5 \uC911 \uC624\uB958 \uBC1C\uC0DD",translateError:"\uBC88\uC5ED \uC911 \uC624\uB958 \uBC1C\uC0DD",noTitle:"\uC81C\uBAA9 \uC5C6\uC74C",bold:"\uAD75\uAC8C",italic:"\uAE30\uC6B8\uC784",strikethrough:"\uCDE8\uC18C\uC120",heading:"\uC81C\uBAA9",link:"\uB9C1\uD06C",image:"\uC774\uBBF8\uC9C0",code:"\uCF54\uB4DC",codeBlock:"\uCF54\uB4DC\uBE14\uB85D",quote:"\uC778\uC6A9\uBB38",list:"\uBAA9\uB85D",orderedList:"\uC21C\uC11C \uBAA9\uB85D",horizontalRule:"\uC218\uD3C9\uC120"},hn={enableSlug:true,enableTags:true,enableCoverImage:true,enablePublishDate:true,enableExcerpt:true,enableTranslation:true,enablePreview:true,enableMarkdownToolbar:true,enableAutoSave:true,enableExpiresAt:false},bn=[{key:"ko",label:"\uD55C\uAD6D\uC5B4",isPrimary:true,flag:"\u{1F1F0}\u{1F1F7}"},{key:"en",label:"English",flag:"\u{1F1FA}\u{1F1F8}"},{key:"ja",label:"\u65E5\u672C\u8A9E",flag:"\u{1F1EF}\u{1F1F5}"}];function Mt(t){let e={};return t.forEach(r=>{e[r.key]="";}),e}function vn(t,e){var r,o,a,s,d,v,h,i;return {slug:(r=e==null?void 0:e.slug)!=null?r:"",title:(o=e==null?void 0:e.title)!=null?o:Mt(t),excerpt:(a=e==null?void 0:e.excerpt)!=null?a:Mt(t),content:(s=e==null?void 0:e.content)!=null?s:Mt(t),tags:(d=e==null?void 0:e.tags)!=null?d:[],coverImage:(v=e==null?void 0:e.coverImage)!=null?v:"",publishedAt:(h=e==null?void 0:e.publishedAt)!=null?h:null,expiresAt:(i=e==null?void 0:e.expiresAt)!=null?i:null}}var br=ee.createContext(null);function U(){let t=ee.useContext(br);if(!t)throw new Error("useBlogEditor must be used within a BlogEditorProvider");return t}function Nt({children:t,initialData:e,isEditMode:r=false,languages:o=bn,defaultLanguage:a,labels:s,callbacks:d,features:v,variant:h="default",autoSaveKey:i,autoSaveInterval:y=3e3}){var Ne,Xe,Ye,L;let m=(L=(Ye=(Ne=o.find(E=>E.isPrimary))==null?void 0:Ne.key)!=null?Ye:(Xe=o[0])==null?void 0:Xe.key)!=null?L:"ko",x=a!=null?a:m,f=ee.useMemo(()=>({...fn,...s}),[s]),c=ee.useMemo(()=>({...hn,...v}),[v]),[n,g]=ee.useState(()=>vn(o,e)),[u,C]=ee.useState(x),[p,b]=ee.useState(false),[k,w]=ee.useState(false),[N,B]=ee.useState(false),[M,R]=ee.useState(false),[T,I]=ee.useState(null),[V,z]=ee.useState(false),[$,Z]=ee.useState(r||!!(e!=null&&e.slug)),[J,D]=ee.useState("idle"),te=ee.useRef(null),ne=ee.useRef(true),W=i||(r?null:"blog-editor-draft");ee.useEffect(()=>{if(!(!c.enableAutoSave||!W||r))try{let E=localStorage.getItem(W);if(E){let A=JSON.parse(E);g(A);}}catch{}},[]),ee.useEffect(()=>{if(!(!c.enableAutoSave||!W)){if(ne.current){ne.current=false;return}return te.current&&clearTimeout(te.current),D("saving"),te.current=setTimeout(()=>{try{localStorage.setItem(W,JSON.stringify(n)),D("saved"),setTimeout(()=>D("idle"),2e3);}catch{D("idle");}},y),()=>{te.current&&clearTimeout(te.current);}}},[n,c.enableAutoSave,W,y]);let re=ee.useCallback(()=>{if(W)try{localStorage.removeItem(W);}catch{}},[W]),ve=ee.useCallback((E,A)=>{g(q=>({...q,[E]:A}));},[]),We=ee.useCallback((E,A,q)=>{g(j=>({...j,[E]:{...j[E],[A]:q}}));},[]),at=ee.useCallback(E=>kt(E),[]),st=ee.useCallback(async E=>{let A=n.title[m],q=n.content[m];if(!A||!q){I(f.requiredFields);return}if(c.enableSlug&&!n.slug){I(f.requiredFields);return}w(true),I(null);try{await d.onSave(n,E),re();}catch{I(f.saveError);}finally{w(false);}},[n,m,f,c,d,re]),Ge=ee.useCallback(async()=>{if(!d.onTranslate)return;let E=n.title[m],A=n.content[m],q=n.excerpt[m];if(!E||!A){I(f.requiredFields);return}B(true),I(null),z(false);try{let j=await d.onTranslate({sourceLanguage:m,title:E,content:A,excerpt:q||void 0});g(oe=>{let K={...oe.title},ie={...oe.content},Ft={...oe.excerpt};return Object.keys(j).forEach(Re=>{if(Re!==m){let lt=j[Re];if(typeof lt=="object"&<!==null){let Ce=lt;Ce.title&&(K[Re]=Ce.title),Ce.content&&(ie[Re]=Ce.content),Ce.excerpt&&(Ft[Re]=Ce.excerpt);}}}),{...oe,title:K,content:ie,excerpt:Ft}}),z(!0),setTimeout(()=>z(!1),3e3);}catch{I(f.translateError);}finally{B(false);}},[n,m,f,d]),_e=ee.useCallback(async E=>{if(!d.onUploadImage)return null;R(true),I(null);try{return await d.onUploadImage(E)}catch{return I("\uC774\uBBF8\uC9C0 \uC5C5\uB85C\uB4DC \uC2E4\uD328"),null}finally{R(false);}},[d]),je=ee.useCallback(()=>{var E;(E=d.onCancel)==null||E.call(d);},[d]),it=ee.useMemo(()=>({formData:n,activeLanguage:u,showPreview:p,submitting:k,translating:N,uploading:M,error:T,translateSuccess:V,autoSaveStatus:J,languages:o,features:c,labels:f,variant:h,isEditMode:r,setActiveLanguage:C,setShowPreview:b,updateField:ve,updateMultilingualField:We,handleSave:st,handleTranslate:Ge,handleUploadImage:_e,handleCancel:je,setError:I,generateSlug:at,slugManuallyEdited:$,setSlugManuallyEdited:Z}),[n,u,p,k,N,M,T,V,J,o,c,f,h,r,ve,We,st,Ge,_e,je,at,$,Z]);return jsxRuntime.jsx(br.Provider,{value:it,children:t})}var kr={home:ssr.House,arrowLeft:ssr.ArrowLeft,arrowRight:ssr.ArrowRight,arrowUp:ssr.ArrowUp,arrowDown:ssr.ArrowDown,menu:ssr.List,close:ssr.X,search:ssr.MagnifyingGlass,settings:ssr.Gear,externalLink:ssr.ArrowSquareOut,chevronLeft:ssr.CaretLeft,chevronRight:ssr.CaretRight,chevronDown:ssr.CaretDown,chevronUp:ssr.CaretUp,edit:ssr.Pencil,delete:ssr.Trash,add:ssr.Plus,remove:ssr.Minus,download:ssr.Download,upload:ssr.Upload,refresh:ssr.ArrowClockwise,save:ssr.FloppyDisk,copy:ssr.Copy,loader:ssr.SpinnerGap,success:ssr.CheckCircle,error:ssr.XCircle,alertCircle:ssr.WarningCircle,warning:ssr.WarningCircle,info:ssr.Info,check:ssr.Check,circle:ssr.Circle,helpCircle:ssr.Question,user:ssr.User,users:ssr.Users,userPlus:ssr.UserPlus,logIn:ssr.SignIn,logOut:ssr.SignOut,eye:ssr.Eye,eyeOff:ssr.EyeSlash,chart:ssr.ChartBar,barChart:ssr.ChartBar,trendingUp:ssr.TrendUp,activity:ssr.Pulse,database:ssr.Database,zap:ssr.Lightning,fileText:ssr.FileText,file:ssr.File,folder:ssr.Folder,book:ssr.Book,bookOpen:ssr.BookOpen,mail:ssr.Envelope,message:ssr.ChatCircle,phone:ssr.Phone,image:ssr.Image,video:ssr.Video,camera:ssr.Camera,smile:ssr.Smiley,frown:ssr.SmileySad,meh:ssr.SmileyMeh,lock:ssr.Lock,unlock:ssr.LockOpen,shield:ssr.Shield,wallet:ssr.Wallet,key:ssr.Key,clock:ssr.Clock,calendar:ssr.Calendar,calendarPlus:ssr.CalendarPlus,bell:ssr.Bell,heart:ssr.Heart,star:ssr.Star,bookmark:ssr.Bookmark,share:ssr.Share,monitor:ssr.Monitor,sun:ssr.Sun,moon:ssr.Moon,lightbulb:ssr.Lightbulb,brain:ssr.Brain,flag:ssr.Flag,square:ssr.Square,sparkle:ssr.Sparkle,sparkles:ssr.Sparkle,globe:ssr.Globe,smartphone:ssr.DeviceMobile,deviceMobile:ssr.DeviceMobile,floppyDisk:ssr.FloppyDisk,ticket:ssr.Ticket,clipboard:ssr.Clipboard,wifi:ssr.WifiHigh,wifiOff:ssr.WifiSlash,cpu:ssr.Cpu,mask:ssr.MaskHappy,bold:ssr.TextB,italic:ssr.TextItalic,strikethrough:ssr.TextStrikethrough,heading:ssr.TextHOne,link:ssr.Link,code:ssr.Code,fileCode:ssr.FileCode,quote:ssr.Quotes,list:ssr.List,listOrdered:ssr.ListNumbers,minus:ssr.Minus},Er={happy:"smile",sad:"frown",neutral:"meh",excited:"smile",angry:"frown",love:"heart",like:"heart",dislike:"frown"},Pr={loading:"loader",success:"success",error:"error",warning:"warning",info:"info",locked:"lock",unlocked:"unlock",visible:"eye",hidden:"eyeOff"};function Mr(t){return !t||!/[-_]/.test(t)&&/^[a-z]/.test(t)?t:/^[A-Z]+$/.test(t)?t.toLowerCase():/^[A-Z]/.test(t)&&!/[-_]/.test(t)?t.charAt(0).toLowerCase()+t.slice(1):t.split(/[-_]/).map((e,r)=>r===0?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")}var G=null,_=null;var Nr={home:{lucide:"Home",phosphor:"House",iconsax:"Home2"},"layout-dashboard":{lucide:"LayoutDashboard",phosphor:"SquaresFour"},folder:{lucide:"Folder",phosphor:"Folder",iconsax:"Folder"},"alert-circle":{lucide:"AlertCircle",phosphor:"WarningCircle",iconsax:"Danger"},alertCircle:{lucide:"AlertCircle",phosphor:"WarningCircle",iconsax:"Danger"},columns:{lucide:"Columns",phosphor:"Columns"},users:{lucide:"Users",phosphor:"Users",iconsax:"People"},settings:{lucide:"Settings",phosphor:"Gear"},menu:{lucide:"Menu",phosphor:"List",iconsax:"Menu"},close:{lucide:"X",phosphor:"X",iconsax:"CloseCircle"},chevronLeft:{lucide:"ChevronLeft",phosphor:"CaretLeft",iconsax:"ArrowLeft2"},chevronRight:{lucide:"ChevronRight",phosphor:"CaretRight",iconsax:"ArrowRight2"},chevronDown:{lucide:"ChevronDown",phosphor:"CaretDown",iconsax:"ArrowDown2"},chevronUp:{lucide:"ChevronUp",phosphor:"CaretUp",iconsax:"ArrowUp2"},arrowLeft:{lucide:"ArrowLeft",phosphor:"ArrowLeft",iconsax:"ArrowLeft"},arrowRight:{lucide:"ArrowRight",phosphor:"ArrowRight",iconsax:"ArrowRight"},arrowUp:{lucide:"ArrowUp",phosphor:"ArrowUp",iconsax:"ArrowUp"},arrowDown:{lucide:"ArrowDown",phosphor:"ArrowDown",iconsax:"ArrowDown"},add:{lucide:"Plus",phosphor:"Plus",iconsax:"Add"},edit:{lucide:"Edit",phosphor:"Pencil"},pencil:{lucide:"Pencil",phosphor:"Pencil"},delete:{lucide:"Trash2",phosphor:"Trash",iconsax:"Trash"},trash:{lucide:"Trash2",phosphor:"Trash",iconsax:"Trash"},upload:{lucide:"Upload",phosphor:"Upload",iconsax:"Upload"},download:{lucide:"Download",phosphor:"Download",iconsax:"Download"},x:{lucide:"X",phosphor:"X"},check:{lucide:"Check",phosphor:"Check",iconsax:"Check"},search:{lucide:"Search",phosphor:"MagnifyingGlass",iconsax:"SearchNormal"},share:{lucide:"Share",phosphor:"Share"},copy:{lucide:"Copy",phosphor:"Copy"},save:{lucide:"Save",phosphor:"FloppyDisk"},loader:{lucide:"Loader2",phosphor:"Spinner"},loader2:{lucide:"Loader2",phosphor:"Spinner"},"check-circle":{lucide:"CheckCircle",phosphor:"CheckCircle",iconsax:"TickCircle"},checkCircle:{lucide:"CheckCircle",phosphor:"CheckCircle",iconsax:"TickCircle"},success:{lucide:"CheckCircle",phosphor:"CheckCircle",iconsax:"TickCircle"},error:{lucide:"XCircle",phosphor:"XCircle",iconsax:"CloseCircle"},warning:{lucide:"AlertCircle",phosphor:"WarningCircle",iconsax:"Warning2"},info:{lucide:"Info",phosphor:"Info",iconsax:"InfoCircle"},refresh:{lucide:"RefreshCw",phosphor:"ArrowClockwise",iconsax:"Refresh"},refreshCw:{lucide:"RefreshCw",phosphor:"ArrowClockwise",iconsax:"Refresh"},bell:{lucide:"Bell",phosphor:"Bell",iconsax:"Bell"},heart:{lucide:"Heart",phosphor:"Heart",iconsax:"Heart"},star:{lucide:"Star",phosphor:"Star",iconsax:"Star"},bookmark:{lucide:"Bookmark",phosphor:"Bookmark"},user:{lucide:"User",phosphor:"User",iconsax:"User"},userPlus:{lucide:"UserPlus",phosphor:"UserPlus",iconsax:"UserAdd"},logIn:{lucide:"LogIn",phosphor:"SignIn",iconsax:"Login"},logOut:{lucide:"LogOut",phosphor:"SignOut",iconsax:"Logout"},chrome:{lucide:"Chrome",phosphor:"ChromeLogo",iconsax:"Chrome"},github:{lucide:"Github",phosphor:"GithubLogo"},message:{lucide:"MessageCircle",phosphor:"ChatCircle"},messageSquare:{lucide:"MessageSquare",phosphor:"ChatSquare"},"message-square":{lucide:"MessageSquare",phosphor:"ChatSquare"},inbox:{lucide:"Inbox",phosphor:"Inbox"},calendar:{lucide:"Calendar",phosphor:"Calendar"},calendarPlus:{lucide:"CalendarPlus",phosphor:"CalendarPlus"},checkSquare:{lucide:"CheckSquare",phosphor:"CheckSquare",iconsax:"TickSquare"},clock:{lucide:"Clock",phosphor:"Clock"},book:{lucide:"Book",phosphor:"Book",iconsax:"Book"},bookOpen:{lucide:"BookOpen",phosphor:"BookOpen",iconsax:"Book"},monitor:{lucide:"Monitor",phosphor:"Monitor",iconsax:"Monitor"},sun:{lucide:"Sun",phosphor:"Sun",iconsax:"Sun"},moon:{lucide:"Moon",phosphor:"Moon",iconsax:"Moon"},sparkle:{lucide:"Sparkle",phosphor:"Sparkle"},sparkles:{lucide:"Sparkles",phosphor:"Sparkle"},lightbulb:{lucide:"Lightbulb",phosphor:"Lightbulb"},brain:{lucide:"Brain",phosphor:"Brain"},zap:{lucide:"Zap",phosphor:"Lightning"},globe:{lucide:"Globe",phosphor:"Globe",iconsax:"Global"},deviceMobile:{lucide:"Smartphone",phosphor:"DeviceMobile"},smartphone:{lucide:"Smartphone",phosphor:"DeviceMobile"},floppyDisk:{lucide:"Save",phosphor:"FloppyDisk"},chart:{lucide:"BarChart3",phosphor:"ChartBar"},barChart:{lucide:"BarChart",phosphor:"ChartBar"},trendingUp:{lucide:"TrendingUp",phosphor:"TrendUp"},trendingDown:{lucide:"TrendingDown",phosphor:"TrendDown"},activity:{lucide:"Activity",phosphor:"Pulse"},database:{lucide:"Database",phosphor:"Database"},dollarSign:{lucide:"DollarSign",phosphor:"CurrencyDollar"},dollar:{lucide:"DollarSign",phosphor:"CurrencyDollar"},currency:{lucide:"DollarSign",phosphor:"CurrencyDollar"},layers:{lucide:"Layers",phosphor:"Stack"},ban:{lucide:"Ban",phosphor:"Prohibit"},lock:{lucide:"Lock",phosphor:"Lock",iconsax:"Lock"},unlock:{lucide:"Unlock",phosphor:"LockOpen",iconsax:"Unlock"},shield:{lucide:"Shield",phosphor:"Shield",iconsax:"Shield"},key:{lucide:"Key",phosphor:"Key"},play:{lucide:"Play",phosphor:"Play",iconsax:"Play"},pause:{lucide:"Pause",phosphor:"Pause",iconsax:"Pause"},image:{lucide:"Image",phosphor:"Image",iconsax:"Image"},video:{lucide:"Video",phosphor:"Video",iconsax:"Video"},camera:{lucide:"Camera",phosphor:"Camera",iconsax:"Camera"},fileText:{lucide:"FileText",phosphor:"FileText"},file:{lucide:"File",phosphor:"File"},externalLink:{lucide:"ExternalLink",phosphor:"ArrowSquareOut"},link:{lucide:"Link",phosphor:"Link",iconsax:"Link"},moreHorizontal:{lucide:"MoreHorizontal",phosphor:"DotsThreeOutline"},moreVertical:{lucide:"MoreVertical",phosphor:"DotsThreeVertical"},remove:{lucide:"Minus",phosphor:"Minus",iconsax:"Minus"},eye:{lucide:"Eye",phosphor:"Eye",iconsax:"Eye"},eyeOff:{lucide:"EyeOff",phosphor:"EyeSlash",iconsax:"EyeSlash"},smile:{lucide:"Smile",phosphor:"Smiley",iconsax:"EmojiHappy"},frown:{lucide:"Frown",phosphor:"SmileySad",iconsax:"EmojiSad"},meh:{lucide:"Meh",phosphor:"SmileyMeh",iconsax:"EmojiNormal"},mail:{lucide:"Mail",phosphor:"Envelope"},phone:{lucide:"Phone",phosphor:"Phone"},flag:{lucide:"Flag",phosphor:"Flag",iconsax:"Flag"},rocket:{lucide:"Rocket",phosphor:"Rocket",iconsax:"Rocket"},ticket:{lucide:"Ticket",phosphor:"Ticket",iconsax:"Ticket"},clipboard:{lucide:"ClipboardList",phosphor:"Clipboard",iconsax:"Sticker"},wifi:{lucide:"Wifi",phosphor:"WifiHigh",iconsax:"Wifi"},wifiOff:{lucide:"WifiOff",phosphor:"WifiSlash"},cpu:{lucide:"Cpu",phosphor:"Cpu",iconsax:"Computing"},mask:{lucide:"Drama",phosphor:"MaskHappy",iconsax:"EmojiHappy"},bold:{lucide:"Bold",phosphor:"TextB"},italic:{lucide:"Italic",phosphor:"TextItalic"},strikethrough:{lucide:"Strikethrough",phosphor:"TextStrikethrough"},heading:{lucide:"Heading",phosphor:"TextHOne"},code:{lucide:"Code",phosphor:"Code",iconsax:"Code"},fileCode:{lucide:"FileCode",phosphor:"FileCode"},quote:{lucide:"Quote",phosphor:"Quotes",iconsax:"QuoteUp"},list:{lucide:"List",phosphor:"List"},listOrdered:{lucide:"ListOrdered",phosphor:"ListNumbers"},minus:{lucide:"Minus",phosphor:"Minus",iconsax:"Minus"}};async function Rr(){if(typeof window=="undefined")return null;if(!G)try{G=await import('@phosphor-icons/react');}catch{return console.warn("Phosphor Icons not available. Install @phosphor-icons/react to use."),null}return G}async function Lr(){if(typeof window=="undefined")return null;if(!_)try{_=await import('lucide-react');}catch{return console.warn("Lucide Icons not available. Install lucide-react to use lucide provider."),null}return _}function et(t,e="phosphor"){let r=Nr[t];if(!r)return rs(t,e);let o=r[e];switch(e){case "phosphor":return !o||!G?null:(G==null?void 0:G[o])||null;case "lucide":return !o||!_?null:(_==null?void 0:_[o])||null;case "iconsax":{return null;}default:return null}}function rs(t,e){switch(e){case "phosphor":{if(!G)return null;let r=t.charAt(0).toUpperCase()+t.slice(1),o=t.split(/(?=[A-Z])/).map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join("");return (G==null?void 0:G[r])||(G==null?void 0:G[o])||(G==null?void 0:G[t])||null}case "lucide":{if(!_)return null;let r=t.charAt(0).toUpperCase()+t.slice(1),o=t.replace(/([A-Z])/g,a=>a===t[0]?a.toLowerCase():a);return (_==null?void 0:_[r])||(_==null?void 0:_[t])||(_==null?void 0:_[o])||null}case "iconsax":{return null;}default:return null}}function Sr(t,e){let r=Nr[t];if(r){let o=r[e];if(o)return o}return t}var Lt={"arrow-left":"arrowLeft","arrow-right":"arrowRight","arrow-up":"arrowUp","arrow-down":"arrowDown","chevron-left":"chevronLeft","chevron-right":"chevronRight","chevron-up":"chevronUp","chevron-down":"chevronDown","external-link":"externalLink","more-horizontal":"moreHorizontal","more-vertical":"moreVertical","user-plus":"userPlus","log-in":"logIn","log-out":"logOut","check-circle":"checkCircle","check-square":"checkSquare","alert-circle":"alertCircle","eye-off":"eyeOff","file-text":"fileText","book-open":"bookOpen","bar-chart":"barChart","trending-up":"trendingUp","trending-down":"trendingDown","message-square":"messageSquare","calendar-plus":"calendarPlus","refresh-cw":"refreshCw","dollar-sign":"dollarSign","layout-dashboard":"layoutDashboard","device-mobile":"deviceMobile","floppy-disk":"floppyDisk",back:"arrowLeft",prev:"arrowLeft",previous:"arrowLeft",forward:"arrowRight",next:"arrowRight",close:"x",cancel:"x",remove:"delete",trash:"delete",plus:"add",new:"add",pencil:"edit",modify:"edit",store:"save",floppy:"save",magnify:"search",person:"user",account:"user",profile:"user",gear:"settings",config:"settings",preferences:"settings",house:"home",main:"home",done:"check",complete:"check",tick:"check",information:"info",help:"info",alert:"warning",caution:"warning",checkmark:"success",checkCircle:"success",fail:"error",cross:"error",xCircle:"error",spinner:"loader",loading:"loader",wait:"loader",reload:"refresh",update:"refresh",sync:"refresh",show:"eye",view:"eye",hide:"eyeOff",hidden:"eyeOff",secure:"lock",locked:"lock",unsecure:"unlock",unlocked:"unlock",get:"download",fetch:"download",post:"upload",send:"share",export:"share",duplicate:"copy",clone:"copy",email:"mail",envelope:"mail",chat:"message",comment:"message",talk:"message",date:"calendar",schedule:"calendar",time:"clock",watch:"clock",document:"fileText",doc:"fileText",text:"fileText",directory:"folder",dir:"folder",picture:"image",img:"image",movie:"video",film:"video",photo:"camera",capture:"camera",start:"play",run:"play",stop:"pause",halt:"pause",like:"heart",love:"heart",favorite:"star",saveBookmark:"bookmark",notification:"bell",notify:"bell",alarm:"bell",prefs:"settings",lookup:"search",dots:"moreHorizontal",moreMenu:"moreHorizontal",moreOptions:"moreVertical",external:"externalLink",outbound:"externalLink",open:"externalLink",url:"link",hyperlink:"link",graph:"barChart",stats:"barChart",analytics:"barChart",db:"database",storage:"database",pulse:"activity",monitor:"activity",up:"trendingUp",down:"trendingDown",lightning:"zap",bolt:"zap",flash:"zap",security:"shield",protect:"shield",password:"key",secret:"key",signin:"logIn",login:"logIn",enter:"logIn",signout:"logOut",logout:"logOut",exit:"logOut",people:"users",group:"users",team:"users",addUser:"userPlus",invite:"userPlus",read:"book",library:"book",reading:"bookOpen",openBook:"bookOpen",light:"sun",day:"sun",dark:"moon",night:"moon",screen:"monitor",display:"monitor",ai:"brain",intelligence:"brain",think:"brain",idea:"lightbulb",bulb:"lightbulb",inspiration:"lightbulb",magic:"sparkles",stars:"sparkles",glitter:"sparkles"};function Ir(t){if(!t||typeof t!="string")return {normalized:t||"",wasAlias:false};let e=Mr(t),r=Lt[t]||Lt[e];return r?{normalized:r,wasAlias:true,originalAlias:t}:{normalized:e,wasAlias:false}}var Br={set:"lucide",weight:"regular",size:20,color:"currentColor",strokeWidth:1.25,iconsaxVariant:"line"};var as=ee.createContext(Br);function Ar(){return ee.useContext(as)}var Hr=ee__default.default.forwardRef(({name:t,size:e,className:r,emotion:o,status:a,provider:s,weight:d,animated:v=false,pulse:h=false,spin:i=false,bounce:y=false,variant:m="default","aria-label":x,"aria-hidden":f},c)=>{var D,te;let n=Ar(),g=s||n.set,u=e!=null?e:n.size,C=d||n.weight,p=n.color,b=(D=n.strokeWidth)!=null?D:1.25,k=(te=n.iconsaxVariant)!=null?te:"line",[w,N]=ee__default.default.useState(false),[B,M]=ee__default.default.useState(false);ee__default.default.useEffect(()=>{N(true),g==="lucide"?Lr().then(()=>M(true)):g==="phosphor"?Rr().then(()=>M(true)):M(true);},[g]);let R=ee__default.default.useMemo(()=>{let ne=o?Er[o]:a?Pr[a]:t,{normalized:W}=Ir(ne),re=Sr(W,g);return {normalized:W,providerName:re}},[t,o,a,g]),T=R.normalized,I=ee__default.default.useMemo(()=>{return null},[g,R.providerName,w,k]),V=ct({"text-current":m==="default","text-primary":m==="primary","text-muted-foreground":m==="secondary"||m==="muted","text-green-600 dark:text-green-400":m==="success","text-yellow-600 dark:text-yellow-400":m==="warning","text-destructive":m==="error"});if(!w)return jsxRuntime.jsx("span",{style:{width:u,height:u},className:l(V,r),"aria-hidden":f!==void 0?f:true,"aria-label":x});let z=null;if(g==="phosphor"?(z=kr[T]||null,!z&&B&&(z=et(T,g))):g==="iconsax"?(z=I,z||(z=et(T,g))):z=et(T,g),!z)return g==="iconsax"&&true?process.env.NODE_ENV==="development"&&console.warn(`Icon "${T}" \u2014 iconsax resolver not registered. Use HuaProvider with icons.set='iconsax', or add: import '@hua-labs/ui/iconsax'`):console.warn(`Icon "${T}" not found for provider "${g}"`),jsxRuntime.jsx("span",{ref:c,className:l("inline-flex items-center justify-center rounded-full border-2 border-dashed border-border",V,r),style:{width:u,height:u},"aria-label":x||`\uC544\uC774\uCF58\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC74C: ${T}`,title:`Icon not found: ${T}`,children:jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground","aria-hidden":"true",children:"?"})});let $={size:typeof u=="number"?u:void 0,width:u,height:u,color:p};g==="phosphor"?$.weight=C:$.strokeWidth=b;let Z=ct({"animate-pulse":h,"animate-spin":i,"animate-bounce":y,"transition-all duration-200 ease-in-out":v}),J={};return x?(J["aria-label"]=x,J["aria-hidden"]=false):f!==void 0?J["aria-hidden"]=f:J["aria-hidden"]=true,jsxRuntime.jsx("span",{ref:c,className:l("inline-flex items-center justify-center",Z,V,r),style:{width:u,height:u},...J,children:z&&ee__default.default.createElement(z,{...$,className:V,"aria-hidden":true})})});Hr.displayName="Icon";var ss=ee__default.default.memo(Hr,(t,e)=>t.name===e.name&&t.size===e.size&&t.className===e.className&&t.emotion===e.emotion&&t.status===e.status&&t.provider===e.provider&&t.animated===e.animated&&t.pulse===e.pulse&&t.spin===e.spin&&t.bounce===e.bounce&&t.variant===e.variant&&t.weight===e.weight&&t["aria-label"]===e["aria-label"]&&t["aria-hidden"]===e["aria-hidden"]),H=ss;H.displayName="Icon";var $r=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(H,{ref:e,name:"smile",...t}));$r.displayName="EmotionIcon";var Dr=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(H,{ref:e,name:"info",...t}));Dr.displayName="StatusIcon";var zr=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(H,{ref:e,name:"loader",status:"loading",spin:true,"aria-label":"\uB85C\uB529 \uC911",...t}));zr.displayName="LoadingIcon";var Fr=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(H,{ref:e,name:"check",status:"success",variant:"success","aria-label":"\uC131\uACF5",...t}));Fr.displayName="SuccessIcon";var Or=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(H,{ref:e,name:"alertCircle",status:"error",variant:"error","aria-label":"\uC624\uB958",...t}));Or.displayName="ErrorIcon";var Be=ee__default.default.forwardRef(({onBack:t,backLink:e,className:r},o)=>{let{labels:a,isEditMode:s,formData:d}=U();return jsxRuntime.jsx("header",{ref:o,className:l("flex items-center justify-between mb-8",r),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[e||t&&jsxRuntime.jsx("button",{type:"button",onClick:t,className:"p-2 text-muted-foreground hover:text-foreground transition-colors","aria-label":"\uB4A4\uB85C\uAC00\uAE30",children:jsxRuntime.jsx(H,{name:"chevronLeft",size:24})}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h1",{className:"text-2xl font-bold text-foreground",children:s?a.editTitle:a.pageTitle}),s&&d.slug&&jsxRuntime.jsxs("p",{className:"text-sm text-muted-foreground",children:[a.slugPrefix,d.slug]})]})]})})});Be.displayName="BlogEditorHeader";var Ae=ee__default.default.forwardRef(({className:t},e)=>{var b,k;let{formData:r,updateField:o,features:a,labels:s,variant:d,handleUploadImage:v,uploading:h,setSlugManuallyEdited:i}=U(),[y,m]=ee.useState(""),x=ee.useRef(null),f=l("rounded-xl p-6 space-y-4",d==="glass"?"bg-white/10 backdrop-blur-sm border border-white/20 dark:bg-background/20 dark:border-border/50":d==="minimal"?"bg-transparent":"bg-background",t),c="w-full px-3 py-2 border border-border rounded-lg bg-background text-foreground focus:ring-1 focus:ring-ring focus:border-transparent transition-colors",n="block text-sm font-medium text-foreground mb-1",g=ee.useCallback(w=>{let N=w.trim();N&&!r.tags.includes(N)&&o("tags",[...r.tags,N]),m("");},[r.tags,o]),u=ee.useCallback(w=>{o("tags",r.tags.filter(N=>N!==w));},[r.tags,o]),C=ee.useCallback(w=>{let N=w.target.value;if(N.includes(",")){let B=N.split(",");B.forEach((M,R)=>{R<B.length-1?g(M):m(M);});}else m(N);},[g]),p=ee.useCallback(w=>{w.key==="Enter"?(w.preventDefault(),g(y)):w.key==="Backspace"&&!y&&r.tags.length>0&&u(r.tags[r.tags.length-1]);},[y,r.tags,g,u]);return jsxRuntime.jsxs("div",{ref:e,className:f,children:[jsxRuntime.jsx("h2",{className:"font-semibold text-foreground",children:s.basicInfo}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a.enableSlug&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{className:n,children:[s.slug," *"]}),jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("span",{className:"text-muted-foreground mr-1 text-sm",children:s.slugPrefix}),jsxRuntime.jsx("input",{type:"text",value:r.slug,onChange:w=>{o("slug",Et(w.target.value)),i(true);},className:l(c,"flex-1"),placeholder:"my-post-slug"})]})]}),a.enableTags&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:n,children:s.tags}),jsxRuntime.jsxs("div",{className:l("flex flex-wrap items-center gap-2 min-h-[42px] px-3 py-2 border border-border rounded-lg bg-background focus-within:ring-1 focus-within:ring-ring focus-within:border-transparent transition-colors"),children:[r.tags.map(w=>jsxRuntime.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-primary/10 text-primary text-sm rounded-md",children:[w,jsxRuntime.jsx("button",{type:"button",onClick:()=>u(w),className:"hover:text-primary transition-colors","aria-label":`${w} \uD0DC\uADF8 \uC0AD\uC81C`,children:jsxRuntime.jsx(H,{name:"x",size:14})})]},w)),jsxRuntime.jsx("input",{type:"text",value:y,onChange:C,onKeyDown:p,className:"flex-1 min-w-[100px] bg-transparent outline-none text-foreground text-sm",placeholder:r.tags.length===0?s.tagsPlaceholder:"\uD0DC\uADF8 \uCD94\uAC00..."})]}),jsxRuntime.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"\uC27C\uD45C(,) \uB610\uB294 Enter\uB85C \uD0DC\uADF8 \uCD94\uAC00"})]})]}),a.enableCoverImage&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:n,children:s.coverImage}),jsxRuntime.jsxs("div",{className:"space-y-3",children:[r.coverImage&&jsxRuntime.jsxs("div",{className:"relative w-full h-40 rounded-lg overflow-hidden bg-muted",children:[jsxRuntime.jsx("img",{src:r.coverImage,alt:"\uCEE4\uBC84 \uC774\uBBF8\uC9C0 \uBBF8\uB9AC\uBCF4\uAE30",className:"w-full h-full object-cover"}),jsxRuntime.jsx("button",{type:"button",onClick:()=>o("coverImage",""),className:"absolute top-2 right-2 p-1.5 bg-red-500 text-white rounded-full hover:bg-red-600 transition-colors","aria-label":"\uC774\uBBF8\uC9C0 \uC0AD\uC81C",children:jsxRuntime.jsx(H,{name:"x",size:14})})]}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx("input",{type:"text",value:r.coverImage,onChange:w=>o("coverImage",w.target.value),className:l(c,"flex-1"),placeholder:s.coverImagePlaceholder}),jsxRuntime.jsx("input",{ref:x,type:"file",accept:"image/*",className:"hidden",onChange:async w=>{var B;let N=(B=w.target.files)==null?void 0:B[0];if(N){let M=await v(N);M&&o("coverImage",M);}w.target.value="";}}),jsxRuntime.jsx("button",{type:"button",onClick:()=>{var w;return (w=x.current)==null?void 0:w.click()},disabled:h,className:"px-3 py-2 border border-border rounded-lg hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed transition-colors",title:"\uC774\uBBF8\uC9C0 \uC5C5\uB85C\uB4DC",children:h?jsxRuntime.jsx(H,{name:"loader",size:20,spin:true}):jsxRuntime.jsx(H,{name:"upload",size:20})})]})]})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a.enablePublishDate&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:n,children:s.publishDate}),jsxRuntime.jsx("input",{type:"datetime-local",value:(b=r.publishedAt)!=null?b:"",onChange:w=>o("publishedAt",w.target.value||null),className:c}),jsxRuntime.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:s.publishDateHint})]}),a.enableExpiresAt&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:n,children:s.expiresAt}),jsxRuntime.jsx("input",{type:"datetime-local",value:(k=r.expiresAt)!=null?k:"",onChange:w=>o("expiresAt",w.target.value||null),className:c}),jsxRuntime.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:s.expiresAtHint})]})]})]})});Ae.displayName="BlogEditorMetadata";var He=ee__default.default.forwardRef(({className:t},e)=>{let{languages:r,activeLanguage:o,setActiveLanguage:a,showPreview:s,setShowPreview:d,features:v,labels:h}=U();return jsxRuntime.jsxs("div",{ref:e,className:l("flex items-center border-b border-border sticky top-0 z-10 bg-background",t),role:"tablist","aria-label":"\uC5B8\uC5B4 \uC120\uD0DD",children:[jsxRuntime.jsx("div",{className:"flex flex-1",children:r.map(i=>{let y=o===i.key,m=i.isPrimary;return jsxRuntime.jsxs("button",{type:"button",role:"tab","aria-selected":y,"aria-controls":`tabpanel-${i.key}`,id:`tab-${i.key}`,onClick:()=>a(i.key),className:l("flex-1 px-4 py-3 text-sm font-medium transition-colors",y?"bg-primary/10 text-primary border-b-2 border-primary":"text-muted-foreground hover:bg-muted"),children:[i.flag&&jsxRuntime.jsx("span",{className:"mr-1.5",children:i.flag}),i.label,m&&" *"]},i.key)})}),v.enablePreview&&jsxRuntime.jsxs("button",{type:"button",onClick:()=>d(!s),className:"inline-flex items-center gap-1.5 px-3 py-2 mx-2 text-sm border border-border rounded-lg hover:bg-muted transition-colors shrink-0",children:[jsxRuntime.jsx(H,{name:s?"pencil":"eye",size:14}),s?h.editMode:h.preview]})]})});He.displayName="BlogEditorLanguageTabs";var ze=ee__default.default.forwardRef(({className:t,textareaRef:e},r)=>{var p;let{formData:o,activeLanguage:a,updateMultilingualField:s,updateField:d,features:v,labels:h,languages:i,generateSlug:y,isEditMode:m,slugManuallyEdited:x}=U(),f=((p=i.find(b=>b.isPrimary))==null?void 0:p.key)===a,c=i.find(b=>b.key===a),n="w-full px-3 py-2 border border-border rounded-lg bg-background text-foreground focus:ring-1 focus:ring-ring focus:border-transparent transition-colors",g="block text-sm font-medium text-foreground mb-1",u=b=>{s("title",a,b),a==="en"&&!m&&!x&&d("slug",y(b));},C=b=>f?`${b} *`:`${b} (${(c==null?void 0:c.label)||a})`;return jsxRuntime.jsxs("div",{ref:r,className:l("p-6 space-y-4",t),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:g,children:C(h.titleLabel)}),jsxRuntime.jsx("input",{type:"text",value:o.title[a]||"",onChange:b=>u(b.target.value),className:n,placeholder:h.titlePlaceholder})]}),v.enableExcerpt&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:g,children:C(h.excerpt)}),jsxRuntime.jsx("textarea",{value:o.excerpt[a]||"",onChange:b=>s("excerpt",a,b.target.value),rows:2,className:l(n,"resize-none"),placeholder:h.excerptPlaceholder})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{className:g,children:[C(h.contentLabel)," (\uB9C8\uD06C\uB2E4\uC6B4)"]}),jsxRuntime.jsx("textarea",{ref:e,value:o.content[a]||"",onChange:b=>s("content",a,b.target.value),rows:15,className:l(n,"font-mono text-sm resize-y min-h-[300px]"),placeholder:h.contentPlaceholder})]})]})});ze.displayName="BlogEditorContent";function ms(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function At(t){if(!t)return "";let e=t;return e=e.replace(/```(\w*)\n?([\s\S]*?)```/g,(r,o,a)=>`<pre class="bg-gray-100 dark:bg-gray-800 rounded-lg p-4 overflow-x-auto my-4"><code class="text-sm">${ms(a.trim())}</code></pre>`),e=e.replace(/`([^`]+)`/g,'<code class="bg-gray-100 dark:bg-gray-700 px-1.5 py-0.5 rounded text-sm">$1</code>'),e=e.replace(/^######\s+(.+)$/gm,'<h6 class="text-base font-semibold mt-4 mb-2">$1</h6>'),e=e.replace(/^#####\s+(.+)$/gm,'<h5 class="text-lg font-semibold mt-4 mb-2">$1</h5>'),e=e.replace(/^####\s+(.+)$/gm,'<h4 class="text-xl font-semibold mt-5 mb-2">$1</h4>'),e=e.replace(/^###\s+(.+)$/gm,'<h3 class="text-2xl font-semibold mt-5 mb-3">$1</h3>'),e=e.replace(/^##\s+(.+)$/gm,'<h2 class="text-2xl font-bold mt-6 mb-3">$1</h2>'),e=e.replace(/^#\s+(.+)$/gm,'<h1 class="text-3xl font-bold mt-6 mb-4">$1</h1>'),e=e.replace(/^---+$/gm,'<hr class="my-6 border-gray-300 dark:border-gray-600" />'),e=e.replace(/^>\s+(.+)$/gm,'<blockquote class="border-l-4 border-gray-300 dark:border-gray-600 pl-4 my-4 italic text-gray-600 dark:text-gray-400">$1</blockquote>'),e=e.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>"),e=e.replace(/\*(.+?)\*/g,"<em>$1</em>"),e=e.replace(/~~(.+?)~~/g,'<del class="text-gray-500">$1</del>'),e=e.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" class="text-cyan-600 hover:text-cyan-700 dark:text-cyan-400 dark:hover:text-cyan-300 underline" target="_blank" rel="noopener noreferrer">$1</a>'),e=e.replace(/^[-*]\s+(.+)$/gm,'<li class="ml-4">$1</li>'),e=e.replace(/(<li[^>]*>.*<\/li>\n?)+/g,r=>`<ul class="list-disc list-inside my-4 space-y-1">${r}</ul>`),e=e.replace(/\n(?!<)/g,`<br />
|
|
75
|
+
)`,transition:c?"opacity 0.1s ease-out":`opacity ${i}ms ease-out`,pointerEvents:"none",opacity:c?1:0};return jsxRuntime.jsx("div",{ref:Zo(f,b),className:l("relative",e),style:T,onMouseMove:p,onMouseEnter:v,onMouseLeave:k,...y,children:jsxRuntime.jsxs("div",{style:M,className:"relative",children:[t,m&&jsxRuntime.jsx("div",{style:B,"aria-hidden":"true"})]})})});cr.displayName="TiltCard";function Zo(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r&&typeof r=="object"&&(r.current=e);});}}var ur=ee__default.default.forwardRef(({src:t,type:e="native",poster:r,autoPlay:o=true,loop:a=true,muted:i=true,controls:m=false,objectFit:x="cover",overlay:h=true,overlayColor:s="rgba(0, 0, 0, 0.4)",gradient:y=false,gradientDirection:f="bottom",playbackRate:b=1,fadeIn:g=true,children:d,className:n,style:u,...c},w)=>{let p=ee.useRef(null),[v,k]=ee.useState(false),[T,M]=ee.useState(false);ee.useEffect(()=>{e==="native"&&p.current&&(p.current.playbackRate=b);},[b,e]);let B=()=>{k(true);},R=()=>{M(true);},N=$=>{let Z=new URLSearchParams({autoplay:o?"1":"0",mute:i?"1":"0",loop:a?"1":"0",controls:m?"1":"0",playlist:$,modestbranding:"1",rel:"0",showinfo:"0",iv_load_policy:"3",disablekb:"1",enablejsapi:"1",playsinline:"1"});return `https://www.youtube.com/embed/${$}?${Z.toString()}`},C=$=>{let Z=new URLSearchParams({autoplay:o?"1":"0",muted:i?"1":"0",loop:a?"1":"0",controls:m?"1":"0",background:"1",quality:"auto",dnt:"1"});return `https://player.vimeo.com/video/${$}?${Z.toString()}`},I=()=>{let $={cover:"object-cover",contain:"object-contain",fill:"object-fill"}[x];switch(e){case "youtube":return jsxRuntime.jsx("iframe",{src:N(t),className:l("absolute inset-0 w-full h-full pointer-events-none","scale-[1.2]"),style:{opacity:v||!g?1:0,transition:g?"opacity 0.8s ease-out":void 0},allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:true,onLoad:()=>k(true),title:"YouTube video background"});case "vimeo":return jsxRuntime.jsx("iframe",{src:C(t),className:"absolute inset-0 w-full h-full pointer-events-none",style:{opacity:v||!g?1:0,transition:g?"opacity 0.8s ease-out":void 0},allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:true,onLoad:()=>k(true),title:"Vimeo video background"});default:return jsxRuntime.jsx("video",{ref:p,src:t,poster:r,autoPlay:o,loop:a,muted:i,controls:m,playsInline:true,className:l("absolute inset-0 w-full h-full",$),style:{opacity:T||!g?1:0,transition:g?"opacity 0.8s ease-out":void 0},onLoadedData:B,onPlaying:R})}},V=()=>{if(!y)return null;let $=[];return (f==="top"||f==="both")&&$.push(jsxRuntime.jsx("div",{className:"absolute top-0 left-0 right-0 h-1/3",style:{background:`linear-gradient(to bottom, ${s}, transparent)`},"aria-hidden":"true"},"top")),(f==="bottom"||f==="both")&&$.push(jsxRuntime.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-1/3",style:{background:`linear-gradient(to top, ${s}, transparent)`},"aria-hidden":"true"},"bottom")),jsxRuntime.jsx(jsxRuntime.Fragment,{children:$})},z=n&&/\b(fixed|absolute|sticky)\b/.test(n);return jsxRuntime.jsxs("div",{ref:w,className:l("overflow-hidden",!z&&"relative",n),style:u,...c,children:[r&&g&&!v&&!T&&jsxRuntime.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${r})`},"aria-hidden":"true"}),I(),h&&!y&&jsxRuntime.jsx("div",{className:"absolute inset-0",style:{backgroundColor:s},"aria-hidden":"true"}),V(),d&&jsxRuntime.jsx("div",{className:"relative z-10 h-full",children:d})]})});ur.displayName="VideoBackground";var pr=ee__default.default.forwardRef(({children:t,autoPlay:e=false,interval:r=5e3,loop:o=true,pauseOnHover:a=true,indicators:i="dots",indicatorPosition:m="bottom",showArrows:x=true,arrowPosition:h="inside",transition:s="slide",transitionDuration:y=500,onSlideChange:f,showPlayPause:b=false,playPausePosition:g="right",className:d,style:n,...u},c)=>{let w=()=>s==="slide"&&o?1:0,[p,v]=ee.useState(w),[k,T]=ee.useState(!e),[M,B]=ee.useState(false),[R,N]=ee.useState(false),[C,I]=ee.useState(false),[V,z]=ee.useState(null),[$,Z]=ee.useState(null),J=ee.useRef(null),D=ee__default.default.Children.count(t),te=sn(),ne=ee.useCallback(L=>s!=="slide"||!o?L:L===0?D-1:L===D+1?0:L-1,[o,D,s]),W=ee.useCallback(L=>{if(R)return;let E=L;if(o?s!=="slide"&&(L<0?E=D-1:L>=D&&(E=0)):E=Math.max(0,Math.min(L,D-1)),E!==p){N(true),v(E);let H=o&&s==="slide"?E===0?D-1:E===D+1?0:E-1:E;f==null||f(H),setTimeout(()=>N(false),y);}},[p,D,o,R,y,s,f]);ee.useEffect(()=>{!o||R||s!=="slide"||(p===0?setTimeout(()=>{I(true),v(D),setTimeout(()=>I(false),50);},y):p===D+1&&setTimeout(()=>{I(true),v(1),setTimeout(()=>I(false),50);},y));},[p,D,o,R,y,s]);let re=ee.useCallback(()=>{W(p+1);},[p,W]),ve=ee.useCallback(()=>{W(p-1);},[p,W]),We=ee.useCallback(()=>{B(L=>!L);},[]);ee.useCallback(()=>{B(false);},[]);ee.useCallback(()=>{B(true);},[]);ee.useEffect(()=>{if(!e||k||M||te)return;let L=setInterval(re,r);return ()=>clearInterval(L)},[e,r,k,M,re,te]);let Ge=L=>{z(L.targetTouches[0].clientX);},_e=L=>{Z(L.targetTouches[0].clientX);},je=()=>{if(!V||!$)return;let L=V-$;Math.abs(L)>=50&&(L>0?re():ve()),z(null),Z(null);};ee.useEffect(()=>{let L=H=>{H.key==="ArrowLeft"?ve():H.key==="ArrowRight"&&re();},E=J.current;return E==null||E.addEventListener("keydown",L),()=>E==null?void 0:E.removeEventListener("keydown",L)},[re,ve]);let lt=()=>{let L=te||C?0:y,E=ne(p);switch(s){case "fade":return ee__default.default.Children.map(t,(H,q)=>jsxRuntime.jsx("div",{className:l("absolute inset-0 w-full h-full",q===E?"z-10":"z-0"),style:{opacity:q===E?1:0,transition:`opacity ${L}ms ease-in-out`},children:H},q));case "scale":return ee__default.default.Children.map(t,(H,q)=>jsxRuntime.jsx("div",{className:l("absolute inset-0 w-full h-full",q===E?"z-10":"z-0"),style:{opacity:q===E?1:0,transform:`scale(${q===E?1:.9})`,transition:`opacity ${L}ms ease-in-out, transform ${L}ms ease-in-out`},children:H},q));default:{let H=ee__default.default.Children.toArray(t);return (o?[H[H.length-1],...H,H[0]]:H).map((j,oe)=>jsxRuntime.jsx("div",{className:"absolute inset-0 w-full h-full",style:{transform:`translateX(${(oe-p)*100}%)`,transition:C?"none":`transform ${L}ms ease-in-out`},children:j},oe))}}},Me=()=>{if(i==="none")return null;let L=m.includes("inside"),E=m.includes("top"),H=ne(p),q=l("flex items-center justify-center gap-2",L?l("absolute left-1/2 -translate-x-1/2 z-20",E?"top-4":"bottom-4"):l("mt-4",E&&"order-first mb-4 mt-0")),j=oe=>{W(o&&s==="slide"?oe+1:oe);};return jsxRuntime.jsx("div",{className:q,role:"tablist",children:Array.from({length:D},(oe,K)=>{let ie=K===H;switch(i){case "bars":return jsxRuntime.jsx("button",{onClick:()=>j(K),className:l("h-1 rounded-full transition-all duration-300",ie?"w-8 bg-white":"w-4 bg-white/50 hover:bg-white/70"),role:"tab","aria-selected":ie,"aria-label":`\uC2AC\uB77C\uC774\uB4DC ${K+1}`},K);case "numbers":return jsxRuntime.jsx("button",{onClick:()=>j(K),className:l("w-8 h-8 rounded-full text-sm font-medium transition-all duration-300",ie?"bg-white text-gray-900":"bg-white/30 text-white hover:bg-white/50"),role:"tab","aria-selected":ie,"aria-label":`\uC2AC\uB77C\uC774\uB4DC ${K+1}`,children:K+1},K);default:return jsxRuntime.jsx("button",{onClick:()=>j(K),className:l("w-2.5 h-2.5 rounded-full transition-all duration-300",ie?"bg-white scale-125":"bg-white/50 hover:bg-white/70"),role:"tab","aria-selected":ie,"aria-label":`\uC2AC\uB77C\uC774\uB4DC ${K+1}`},K)}})})},Xe=()=>{if(!b||!e)return null;let L=!M;return jsxRuntime.jsx("button",{onClick:We,className:l("absolute bottom-4 z-20","w-8 h-8 rounded-full flex items-center justify-center","bg-white/80 hover:bg-white text-gray-800","transition-all duration-200","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white",{left:"left-4",center:"left-1/2 -translate-x-1/2",right:"right-4"}[g]),"aria-label":L?"\uC77C\uC2DC\uC815\uC9C0":"\uC7AC\uC0DD",children:L?jsxRuntime.jsx(un,{className:"w-4 h-4"}):jsxRuntime.jsx(dn,{className:"w-4 h-4"})})},Ye=()=>{if(!x||h==="hidden")return null;let L=o||p>0,E=o||p<D-1,H=l("absolute top-1/2 -translate-y-1/2 z-20","w-10 h-10 rounded-full flex items-center justify-center","bg-white/80 hover:bg-white text-gray-800","transition-all duration-200","disabled:opacity-30 disabled:cursor-not-allowed","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white"),q=h==="outside"?"-left-14":"left-4",j=h==="outside"?"-right-14":"right-4";return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:ve,disabled:!L,className:l(H,q),"aria-label":"\uC774\uC804 \uC2AC\uB77C\uC774\uB4DC",children:jsxRuntime.jsx(ln,{className:"w-5 h-5"})}),jsxRuntime.jsx("button",{onClick:re,disabled:!E,className:l(H,j),"aria-label":"\uB2E4\uC74C \uC2AC\uB77C\uC774\uB4DC",children:jsxRuntime.jsx(cn,{className:"w-5 h-5"})})]})};return jsxRuntime.jsxs("div",{ref:c,className:l("flex flex-col w-full h-full",h==="outside"&&"px-16",d),style:n,...u,children:[jsxRuntime.jsxs("div",{ref:J,className:"relative overflow-hidden w-full flex-1",onMouseEnter:()=>a&&T(true),onMouseLeave:()=>a&&T(false),onTouchStart:Ge,onTouchMove:_e,onTouchEnd:je,tabIndex:0,role:"region","aria-roledescription":"carousel","aria-label":"\uC774\uBBF8\uC9C0 \uC2AC\uB77C\uC774\uB354",children:[lt(),Ye(),Xe(),m.includes("inside")&&Me()]}),!m.includes("inside")&&Me()]})});pr.displayName="Carousel";function sn(){let[t,e]=ee.useState(false);return ee.useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");e(r.matches);let o=a=>{e(a.matches);};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),t}function ln({className:t}){return jsxRuntime.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}function cn({className:t}){return jsxRuntime.jsx("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}function dn({className:t}){return jsxRuntime.jsx("svg",{className:t,fill:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8 5v14l11-7z"})})}function un({className:t}){return jsxRuntime.jsx("svg",{className:t,fill:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})})}var hr=ee__default.default.forwardRef(({src:t,alt:e,direction:r="left",threshold:o=.3,height:a="400px",overlayColor:i,className:m,style:x,...h},s)=>{let y=ee.useRef(null),[f,b]=ee.useState(0),g=bn(),d=ee.useCallback(()=>{if(!y.current)return;let u=y.current.getBoundingClientRect(),c=window.innerHeight,w=c*(1-o),p=c*o,v=u.top+u.height/2,k=0;v<=w&&v>=p?k=(w-v)/(w-p):v<p&&(k=1),b(Math.max(0,Math.min(1,k)));},[o]);ee.useEffect(()=>{if(g){b(1);return}d();let u=()=>requestAnimationFrame(d);return window.addEventListener("scroll",u,{passive:true}),window.addEventListener("resize",u,{passive:true}),()=>{window.removeEventListener("scroll",u),window.removeEventListener("resize",u);}},[d,g]);let n=hn(r,f);return jsxRuntime.jsxs("div",{ref:vn(s,y),className:l("relative overflow-hidden",m),style:{height:a,...x},...h,children:[jsxRuntime.jsx("img",{src:t,alt:e,className:"absolute inset-0 w-full h-full object-cover",style:{clipPath:n,transition:"clip-path 0.1s ease-out"}}),i&&jsxRuntime.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:i,opacity:1-f,transition:"opacity 0.3s ease-out"},"aria-hidden":"true"})]})});hr.displayName="ImageReveal";function hn(t,e){switch(t){case "left":return `inset(0 ${100-e*100}% 0 0)`;case "right":return `inset(0 0 0 ${100-e*100}%)`;case "up":return `inset(0 0 ${100-e*100}% 0)`;case "down":return `inset(${100-e*100}% 0 0 0)`;default:return `inset(0 ${100-e*100}% 0 0)`}}function bn(){let[t,e]=ee.useState(false);return ee.useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");e(r.matches);let o=a=>e(a.matches);return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),t}function vn(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r&&typeof r=="object"&&(r.current=e);});}}var vr=ee__default.default.forwardRef(({items:t,position:e="right",activeColor:r="bg-primary",inactiveColor:o="bg-muted-foreground/30",className:a,...i},m)=>{let[x,h]=ee.useState(0),s=ee.useCallback(()=>{let b=window.innerHeight,g=0,d=1/0;t.forEach((n,u)=>{let c=document.getElementById(n.id);if(!c)return;let w=c.getBoundingClientRect(),p=Math.abs(w.top-b*.3);p<d&&(d=p,g=u);}),h(g);},[t]);ee.useEffect(()=>(s(),window.addEventListener("scroll",s,{passive:true}),()=>window.removeEventListener("scroll",s)),[s]);let y=ee.useCallback(b=>{let g=document.getElementById(b);g&&g.scrollIntoView({behavior:"smooth",block:"start"});},[]),f=ee.useMemo(()=>e==="left"?"left-4":"right-4",[e]);return jsxRuntime.jsx("nav",{ref:m,className:l("fixed top-1/2 -translate-y-1/2 z-40 flex flex-col gap-3",f,a),"aria-label":"Section navigation",...i,children:t.map((b,g)=>jsxRuntime.jsx("button",{onClick:()=>y(b.id),className:l("group relative w-3 h-3 rounded-full transition-all duration-300",g===x?`${r} scale-125`:`${o} hover:scale-110`),"aria-label":b.label||b.id,"aria-current":g===x?"true":void 0,children:b.label&&jsxRuntime.jsx("span",{className:l("absolute top-1/2 -translate-y-1/2 whitespace-nowrap px-2 py-1 text-xs rounded bg-popover text-popover-foreground shadow-md opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",e==="right"?"right-full mr-2":"left-full ml-2"),children:b.label})},b.id))})});vr.displayName="DotNav";var Tr=ee__default.default.forwardRef(({children:t,heightMultiplier:e=1,snap:r=false,onProgress:o,className:a,style:i,...m},x)=>{let h=ee.useRef(null),s=ee.useRef(null),[y,f]=ee.useState(0),[b,g]=ee.useState(0);ee.useEffect(()=>{if(!s.current)return;let c=()=>{s.current&&f(s.current.scrollWidth-window.innerWidth);};c();let w=new ResizeObserver(c);return w.observe(s.current),()=>w.disconnect()},[t]);let d=ee.useCallback(()=>{if(!h.current||y<=0)return;let c=h.current.getBoundingClientRect(),w=h.current.offsetHeight-window.innerHeight,p=-c.top,v=Math.max(0,Math.min(1,p/w));g(v),o==null||o(v);},[y,o]);ee.useEffect(()=>(window.addEventListener("scroll",d,{passive:true}),()=>window.removeEventListener("scroll",d)),[d]);let u=`${ee__default.default.Children.count(t)*e*100}vh`;return jsxRuntime.jsx("div",{ref:En(x,h),className:l("relative",a),style:{height:u,...i},...m,children:jsxRuntime.jsx("div",{className:"sticky top-0 h-screen overflow-hidden",children:jsxRuntime.jsx("div",{ref:s,className:l("flex h-full will-change-transform",r&&"scroll-snap-x"),style:{transform:`translateX(${-b*y}px)`},children:ee__default.default.Children.map(t,(c,w)=>jsxRuntime.jsx("div",{className:l("flex-shrink-0 w-screen h-full",r&&"snap-start"),children:c},w))})})})});Tr.displayName="HorizontalScroll";function En(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r&&typeof r=="object"&&(r.current=e);});}}var he=ee__default.default.forwardRef(({className:t,value:e,max:r=100,size:o="md",color:a="blue",...i},m)=>{let x={sm:"h-2",md:"h-3",lg:"h-4"},h={blue:"bg-indigo-500",green:"bg-green-500",yellow:"bg-yellow-500",red:"bg-red-500",purple:"bg-purple-500",orange:"bg-orange-500",indigo:"bg-indigo-500",pink:"bg-pink-500",gray:"bg-gray-500"},s=Math.min(Math.max(e/r*100,0),100);return jsxRuntime.jsx("div",{ref:m,className:l("w-full bg-muted rounded-full",x[o],t),...i,children:jsxRuntime.jsx("div",{className:l("h-full rounded-full transition-all duration-300",h[a]||h.blue),style:{width:`${s}%`}})})});he.displayName="EmotionMeter";var Je=ee__default.default.forwardRef(({className:t,emotion:e,isSelected:r=false,size:o="md",...a},i)=>jsxRuntime.jsx("button",{ref:i,className:l("rounded-full border-2 transition-all duration-200 hover:scale-105 focus:outline-none focus:ring-1 focus:ring-ring",{sm:"w-8 h-8 text-sm",md:"w-12 h-12 text-lg",lg:"w-16 h-16 text-xl"}[o],r?"border-indigo-500 bg-indigo-50 dark:bg-indigo-900/20":"border-border bg-background",t),...a,children:e}));Je.displayName="EmotionButton";var Ln=[{key:"joy",label:"\uAE30\uC068",icon:"smile",color:"yellow"},{key:"sadness",label:"\uC2AC\uD514",icon:"frown",color:"blue"},{key:"anger",label:"\uD654\uB0A8",icon:"angry",color:"red"},{key:"calm",label:"\uD3C9\uC628",icon:"heart",color:"green"},{key:"excitement",label:"\uC124\uB818",icon:"star",color:"pink"},{key:"worry",label:"\uAC71\uC815",icon:"meh",color:"gray"},{key:"gratitude",label:"\uAC10\uC0AC",icon:"heart",color:"purple"},{key:"loneliness",label:"\uC678\uB85C\uC6C0",icon:"user",color:"indigo"}],kr=ee__default.default.forwardRef(({className:t,selectedEmotion:e,onEmotionSelect:r,layout:o="grid",showIntensity:a=false,intensity:i=50,onIntensityChange:m,emotions:x=Ln,size:h="md",variant:s="button",...y},f)=>{let b=n=>{r==null||r(n);},g=n=>{let u=e===n.key;return s==="button"?jsxRuntime.jsx(Je,{emotion:n.key,isSelected:u,size:h,onClick:()=>b(n.key),className:l("transition-all duration-200",u&&"ring-1 ring-offset-2 ring-primary"),children:n.label},n.key):s==="card"?jsxRuntime.jsx("div",{className:l("p-4 rounded-lg border-2 cursor-pointer transition-all duration-200 hover:shadow-md",u?"border-primary bg-primary/5":"border-border hover:border-primary/50"),onClick:()=>b(n.key),children:jsxRuntime.jsxs("div",{className:"flex items-center space-x-3",children:[jsxRuntime.jsx("div",{className:l("w-8 h-8 rounded-full flex items-center justify-center",u?"bg-primary text-primary-foreground":"bg-muted"),children:n.icon&&jsxRuntime.jsxs("span",{className:"text-lg",children:[n.icon==="smile"&&"\u{1F60A}",n.icon==="frown"&&"\u{1F622}",n.icon==="angry"&&"\u{1F620}",n.icon==="heart"&&"\u2764\uFE0F",n.icon==="star"&&"\u2B50",n.icon==="meh"&&"\u{1F610}",n.icon==="user"&&"\u{1F464}"]})}),jsxRuntime.jsx("span",{className:"font-medium truncate max-w-[120px]",children:n.label})]})},n.key):s==="chip"?jsxRuntime.jsx("div",{className:l("px-3 py-1 rounded-full cursor-pointer transition-all duration-200 text-sm font-medium",u?"bg-primary text-primary-foreground":"bg-muted hover:bg-muted/80"),onClick:()=>b(n.key),children:jsxRuntime.jsx("span",{className:"truncate max-w-[100px]",children:n.label})},n.key):null},d={grid:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-2 md:gap-3",list:"space-y-2",compact:"flex flex-wrap gap-1"};return jsxRuntime.jsxs("div",{ref:f,className:l("space-y-4",t),...y,children:[jsxRuntime.jsx("div",{className:d[o],children:x.map(g)}),a&&e&&jsxRuntime.jsxs("div",{className:"space-y-3",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uAC10\uC815 \uAC15\uB3C4"}),jsxRuntime.jsxs("span",{className:"text-sm text-muted-foreground",children:[i,"%"]})]}),jsxRuntime.jsx("input",{type:"range",min:"0",max:"100",value:i,onChange:n=>m==null?void 0:m(Number(n.target.value)),className:"w-full h-2 bg-muted rounded-lg appearance-none cursor-pointer slider"}),jsxRuntime.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[jsxRuntime.jsx("span",{children:"\uC57D\uD568"}),jsxRuntime.jsx("span",{children:"\uBCF4\uD1B5"}),jsxRuntime.jsx("span",{children:"\uAC15\uD568"})]})]}),e&&a&&jsxRuntime.jsx("div",{className:"flex justify-center",children:jsxRuntime.jsx(he,{value:i,size:"md",color:"blue"})})]})});kr.displayName="EmotionSelector";var In=classVarianceAuthority.cva("rounded-lg",{variants:{variant:{default:"bg-card text-card-foreground border border-border",outline:"bg-transparent border-2 border-border",elevated:"bg-card text-card-foreground shadow-lg border border-border"},shadow:{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg"},padding:{none:"",sm:"p-3",md:"p-4",lg:"p-6"}},defaultVariants:{variant:"default",padding:"none"}}),Tt=ee__default.default.forwardRef(({className:t,variant:e="default",shadow:r,padding:o="none",hoverable:a,...i},m)=>jsxRuntime.jsx("div",{ref:m,className:l(In({variant:e,shadow:r,padding:o}),a&&"transition-shadow hover:shadow-lg cursor-pointer",t),...i}));Tt.displayName="Card";var Ct=ee__default.default.forwardRef(({className:t,...e},r)=>jsxRuntime.jsx("div",{ref:r,className:l("flex flex-col space-y-1 p-3",t),...e}));Ct.displayName="CardHeader";var kt=ee__default.default.forwardRef(({className:t,...e},r)=>jsxRuntime.jsx("h3",{ref:r,className:l("text-base md:text-lg font-semibold leading-tight tracking-tight",t),...e}));kt.displayName="CardTitle";var Et=ee__default.default.forwardRef(({className:t,...e},r)=>jsxRuntime.jsx("p",{ref:r,className:l("text-sm text-muted-foreground",t),...e}));Et.displayName="CardDescription";var Pt=ee__default.default.forwardRef(({className:t,...e},r)=>jsxRuntime.jsx("div",{ref:r,className:l("px-3 pb-3",t),...e}));Pt.displayName="CardContent";var Bn=ee__default.default.forwardRef(({className:t,...e},r)=>jsxRuntime.jsx("div",{ref:r,className:l("flex items-center px-3 pb-3",t),...e}));Bn.displayName="CardFooter";var An=classVarianceAuthority.cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors duration-200 ease-in-out focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2",{variants:{variant:{default:"bg-[var(--badge-default-bg)] text-[var(--badge-default-text)] hover:opacity-80",secondary:"bg-[var(--badge-secondary-bg)] text-[var(--badge-secondary-text)] hover:opacity-80",destructive:"bg-[var(--badge-destructive-bg)] text-slate-50 hover:opacity-80",error:"bg-[var(--badge-destructive-bg)] text-slate-50 hover:opacity-80",outline:"bg-transparent text-[var(--badge-outline-text)] border border-[var(--badge-outline-border)] hover:bg-[var(--badge-outline-hover-bg)]",glass:"bg-[var(--badge-glass-bg)] backdrop-blur-sm border border-[var(--badge-glass-border)] text-[var(--badge-glass-text)] hover:opacity-80"}},defaultVariants:{variant:"default"}}),Se=ee__default.default.memo(ee__default.default.forwardRef(({className:t,variant:e="default",...r},o)=>jsxRuntime.jsx("div",{ref:o,className:l(An({variant:e}),t),...r})));Se.displayName="Badge";var Rr=ee__default.default.forwardRef(({className:t,primaryEmotion:e,emotionDistribution:r=[],keywords:o=[],intensity:a=50,positivity:i=70,energy:m=60,showMeter:x=true,showDistribution:h=true,showKeywords:s=true,showMetrics:y=true,layout:f="detailed",...b},g)=>{let d=c=>c<30?"\uC57D\uD568":c<70?"\uBCF4\uD1B5":"\uAC15\uD568",n=c=>c<30?"\uBD80\uC815\uC801":c<70?"\uC911\uB9BD\uC801":"\uAE0D\uC815\uC801",u=c=>c<30?"\uB0AE\uC74C":c<70?"\uBCF4\uD1B5":"\uB192\uC74C";return f==="compact"?jsxRuntime.jsxs("div",{ref:g,className:l("space-y-3",t),...b,children:[e&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uC8FC\uC694 \uAC10\uC815:"}),jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",children:[jsxRuntime.jsxs("span",{className:"text-sm text-muted-foreground",children:[e.name," (",e.intensity,"%)"]}),x&&jsxRuntime.jsx(he,{value:e.intensity,size:"sm",color:"blue"})]})]}),y&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uAC10\uC815 \uAC15\uB3C4:"}),jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:d(a)})]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uAE0D\uC815\uC131:"}),jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:n(i)})]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uC5D0\uB108\uC9C0:"}),jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:u(m)})]})]}),s&&o.length>0&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"\uD0A4\uC6CC\uB4DC:"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:o.map(c=>jsxRuntime.jsx(Se,{variant:"secondary",className:"text-xs",children:c},c))})]})]}):f==="card"?jsxRuntime.jsxs(Tt,{ref:g,className:l("",t),...b,children:[jsxRuntime.jsxs(Ct,{children:[jsxRuntime.jsxs(kt,{className:"flex items-center",children:[jsxRuntime.jsx("span",{className:"text-2xl mr-2",children:"\u2728"}),"AI \uBD84\uC11D"]}),jsxRuntime.jsx(Et,{children:"\uAC10\uC815 \uBD84\uC11D \uACB0\uACFC"})]}),jsxRuntime.jsxs(Pt,{className:"space-y-4",children:[e&&jsxRuntime.jsxs("div",{className:"space-y-3",children:[jsxRuntime.jsxs("div",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"\uC8FC\uC694 \uAC10\uC815:"}),jsxRuntime.jsxs("span",{className:"ml-2 text-muted-foreground",children:[e.name," (",e.intensity,"%)"]})]}),x&&jsxRuntime.jsx("div",{className:"flex justify-center",children:jsxRuntime.jsx(he,{value:e.intensity,size:"md",color:"blue"})})]}),y&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"\uAC10\uC815 \uAC15\uB3C4:"}),jsxRuntime.jsx("span",{className:"ml-2 text-muted-foreground",children:d(a)})]}),jsxRuntime.jsxs("div",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"\uAE0D\uC815\uC131:"}),jsxRuntime.jsx("span",{className:"ml-2 text-muted-foreground",children:n(i)})]}),jsxRuntime.jsxs("div",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"\uC5D0\uB108\uC9C0:"}),jsxRuntime.jsx("span",{className:"ml-2 text-muted-foreground",children:u(m)})]})]}),s&&o.length>0&&jsxRuntime.jsxs("div",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"\uD0A4\uC6CC\uB4DC:"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:o.map(c=>jsxRuntime.jsx(Se,{variant:"secondary",className:"text-xs",children:c},c))})]})]})]}):jsxRuntime.jsxs("div",{ref:g,className:l("space-y-6",t),...b,children:[e&&jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold",children:"\uC8FC\uC694 \uAC10\uC815"}),jsxRuntime.jsxs("div",{className:"flex items-center space-x-4",children:[jsxRuntime.jsxs("div",{className:"text-center",children:[jsxRuntime.jsx("div",{className:"text-2xl font-bold text-primary",children:e.name}),jsxRuntime.jsxs("div",{className:"text-sm text-muted-foreground",children:[e.intensity,"% \uAC15\uB3C4"]})]}),x&&jsxRuntime.jsx(he,{value:e.intensity,size:"lg",color:"blue"})]})]}),h&&r.length>0&&jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold",children:"\uAC10\uC815 \uBD84\uD3EC"}),jsxRuntime.jsx("div",{className:"space-y-3",children:r.map((c,w)=>jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:c.emotion}),jsxRuntime.jsxs("span",{className:"text-sm text-muted-foreground",children:[c.percentage,"%"]})]}),jsxRuntime.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:jsxRuntime.jsx("div",{className:`${c.color} h-2 rounded-full transition-all duration-300`,style:{width:`${c.percentage}%`}})})]},w))})]}),y&&jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold",children:"\uBD84\uC11D \uC9C0\uD45C"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"text-sm font-medium",children:"\uAC10\uC815 \uAC15\uB3C4"}),jsxRuntime.jsx("div",{className:"text-2xl font-bold text-primary",children:d(a)}),jsxRuntime.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:jsxRuntime.jsx("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${a}%`}})})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"text-sm font-medium",children:"\uAE0D\uC815\uC131"}),jsxRuntime.jsx("div",{className:"text-2xl font-bold text-green-600",children:n(i)}),jsxRuntime.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:jsxRuntime.jsx("div",{className:"bg-green-500 h-2 rounded-full transition-all duration-300",style:{width:`${i}%`}})})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"text-sm font-medium",children:"\uC5D0\uB108\uC9C0"}),jsxRuntime.jsx("div",{className:"text-2xl font-bold text-orange-600",children:u(m)}),jsxRuntime.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:jsxRuntime.jsx("div",{className:"bg-orange-500 h-2 rounded-full transition-all duration-300",style:{width:`${m}%`}})})]})]})]}),s&&o.length>0&&jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold",children:"\uAC10\uC815 \uD0A4\uC6CC\uB4DC"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2",children:o.map(c=>jsxRuntime.jsx(Se,{variant:"outline",className:"text-sm",children:c},c))})]})]})});Rr.displayName="EmotionAnalysis";function Rt(t){return t.toLowerCase().replace(/[^a-z0-9가-힣ぁ-んァ-ン一-龯_.~\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").trim()}function zn(t){return !t||t.length===0||t.length>200?false:/^[a-z0-9가-힣ぁ-んァ-ン一-龯_.~-]+$/.test(t)}function Mt(t){return t.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9가-힣ぁ-んァ-ン一-龯_.~-]/g,"").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}var qn={pageTitle:"\uC0C8 \uAE00 \uC791\uC131",editTitle:"\uAE00 \uC218\uC815",preview:"\uBBF8\uB9AC\uBCF4\uAE30",editMode:"\uD3B8\uC9D1",basicInfo:"\uAE30\uBCF8 \uC815\uBCF4",slug:"\uC2AC\uB7EC\uADF8",slugPrefix:"/blog/",tags:"\uD0DC\uADF8",tagsPlaceholder:"\uAC1C\uBC1C, \uC77C\uC0C1, \uC5C5\uB370\uC774\uD2B8",coverImage:"\uCEE4\uBC84 \uC774\uBBF8\uC9C0 URL",coverImagePlaceholder:"https://example.com/image.jpg",publishDate:"\uBC1C\uD589 \uC608\uC57D\uC77C\uC2DC",publishDateHint:"\uBE44\uC6CC\uB450\uBA74 \uC989\uC2DC \uBC1C\uD589\uB428",expiresAt:"\uB9CC\uB8CC \uC77C\uC2DC",expiresAtHint:"\uBE44\uC6CC\uB450\uBA74 \uB9CC\uB8CC\uB418\uC9C0 \uC54A\uC74C",titleLabel:"\uC81C\uBAA9",titlePlaceholder:"\uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694",excerpt:"\uC694\uC57D",excerptPlaceholder:"\uCE74\uB4DC\uC5D0 \uD45C\uC2DC\uB420 \uC9E7\uC740 \uC694\uC57D",contentLabel:"\uBCF8\uBB38",contentPlaceholder:"\uB9C8\uD06C\uB2E4\uC6B4\uC73C\uB85C \uC791\uC131\uD558\uC138\uC694...",cancel:"\uCDE8\uC18C",saveDraft:"\uC784\uC2DC\uC800\uC7A5",publish:"\uBC1C\uD589",update:"\uC218\uC815 \uC644\uB8CC",saving:"\uC800\uC7A5 \uC911...",translateHint:"AI \uBC88\uC5ED \uAE30\uB2A5",translateButton:"AI \uBC88\uC5ED",translating:"\uBC88\uC5ED \uC911...",translateSuccess:"\uBC88\uC5ED \uC644\uB8CC!",requiredFields:"\uD544\uC218 \uD544\uB4DC\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694",saveError:"\uC800\uC7A5 \uC911 \uC624\uB958 \uBC1C\uC0DD",translateError:"\uBC88\uC5ED \uC911 \uC624\uB958 \uBC1C\uC0DD",noTitle:"\uC81C\uBAA9 \uC5C6\uC74C",bold:"\uAD75\uAC8C",italic:"\uAE30\uC6B8\uC784",strikethrough:"\uCDE8\uC18C\uC120",heading:"\uC81C\uBAA9",link:"\uB9C1\uD06C",image:"\uC774\uBBF8\uC9C0",code:"\uCF54\uB4DC",codeBlock:"\uCF54\uB4DC\uBE14\uB85D",quote:"\uC778\uC6A9\uBB38",list:"\uBAA9\uB85D",orderedList:"\uC21C\uC11C \uBAA9\uB85D",horizontalRule:"\uC218\uD3C9\uC120"},Un={enableSlug:true,enableTags:true,enableCoverImage:true,enablePublishDate:true,enableExcerpt:true,enableTranslation:true,enablePreview:true,enableMarkdownToolbar:true,enableAutoSave:true,enableExpiresAt:false},Vn=[{key:"ko",label:"\uD55C\uAD6D\uC5B4",isPrimary:true,flag:"\u{1F1F0}\u{1F1F7}"},{key:"en",label:"English",flag:"\u{1F1FA}\u{1F1F8}"},{key:"ja",label:"\u65E5\u672C\u8A9E",flag:"\u{1F1EF}\u{1F1F5}"}];function Lt(t){let e={};return t.forEach(r=>{e[r.key]="";}),e}function Wn(t,e){var r,o,a,i,m,x,h,s;return {slug:(r=e==null?void 0:e.slug)!=null?r:"",title:(o=e==null?void 0:e.title)!=null?o:Lt(t),excerpt:(a=e==null?void 0:e.excerpt)!=null?a:Lt(t),content:(i=e==null?void 0:e.content)!=null?i:Lt(t),tags:(m=e==null?void 0:e.tags)!=null?m:[],coverImage:(x=e==null?void 0:e.coverImage)!=null?x:"",publishedAt:(h=e==null?void 0:e.publishedAt)!=null?h:null,expiresAt:(s=e==null?void 0:e.expiresAt)!=null?s:null}}var Lr=ee.createContext(null);function U(){let t=ee.useContext(Lr);if(!t)throw new Error("useBlogEditor must be used within a BlogEditorProvider");return t}function St({children:t,initialData:e,isEditMode:r=false,languages:o=Vn,defaultLanguage:a,labels:i,callbacks:m,features:x,variant:h="default",autoSaveKey:s,autoSaveInterval:y=3e3}){var Me,Xe,Ye,L;let f=(L=(Ye=(Me=o.find(E=>E.isPrimary))==null?void 0:Me.key)!=null?Ye:(Xe=o[0])==null?void 0:Xe.key)!=null?L:"ko",b=a!=null?a:f,g=ee.useMemo(()=>({...qn,...i}),[i]),d=ee.useMemo(()=>({...Un,...x}),[x]),[n,u]=ee.useState(()=>Wn(o,e)),[c,w]=ee.useState(b),[p,v]=ee.useState(false),[k,T]=ee.useState(false),[M,B]=ee.useState(false),[R,N]=ee.useState(false),[C,I]=ee.useState(null),[V,z]=ee.useState(false),[$,Z]=ee.useState(r||!!(e!=null&&e.slug)),[J,D]=ee.useState("idle"),te=ee.useRef(null),ne=ee.useRef(true),W=s||(r?null:"blog-editor-draft");ee.useEffect(()=>{if(!(!d.enableAutoSave||!W||r))try{let E=localStorage.getItem(W);if(E){let H=JSON.parse(E);u(H);}}catch{}},[]),ee.useEffect(()=>{if(!(!d.enableAutoSave||!W)){if(ne.current){ne.current=false;return}return te.current&&clearTimeout(te.current),D("saving"),te.current=setTimeout(()=>{try{localStorage.setItem(W,JSON.stringify(n)),D("saved"),setTimeout(()=>D("idle"),2e3);}catch{D("idle");}},y),()=>{te.current&&clearTimeout(te.current);}}},[n,d.enableAutoSave,W,y]);let re=ee.useCallback(()=>{if(W)try{localStorage.removeItem(W);}catch{}},[W]),ve=ee.useCallback((E,H)=>{u(q=>({...q,[E]:H}));},[]),We=ee.useCallback((E,H,q)=>{u(j=>({...j,[E]:{...j[E],[H]:q}}));},[]),st=ee.useCallback(E=>Rt(E),[]),it=ee.useCallback(async E=>{let H=n.title[f],q=n.content[f];if(!H||!q){I(g.requiredFields);return}if(d.enableSlug&&!n.slug){I(g.requiredFields);return}T(true),I(null);try{await m.onSave(n,E),re();}catch{I(g.saveError);}finally{T(false);}},[n,f,g,d,m,re]),Ge=ee.useCallback(async()=>{if(!m.onTranslate)return;let E=n.title[f],H=n.content[f],q=n.excerpt[f];if(!E||!H){I(g.requiredFields);return}B(true),I(null),z(false);try{let j=await m.onTranslate({sourceLanguage:f,title:E,content:H,excerpt:q||void 0});u(oe=>{let K={...oe.title},ie={...oe.content},Ut={...oe.excerpt};return Object.keys(j).forEach(Ne=>{if(Ne!==f){let ct=j[Ne];if(typeof ct=="object"&&ct!==null){let Ce=ct;Ce.title&&(K[Ne]=Ce.title),Ce.content&&(ie[Ne]=Ce.content),Ce.excerpt&&(Ut[Ne]=Ce.excerpt);}}}),{...oe,title:K,content:ie,excerpt:Ut}}),z(!0),setTimeout(()=>z(!1),3e3);}catch{I(g.translateError);}finally{B(false);}},[n,f,g,m]),_e=ee.useCallback(async E=>{if(!m.onUploadImage)return null;N(true),I(null);try{return await m.onUploadImage(E)}catch{return I("\uC774\uBBF8\uC9C0 \uC5C5\uB85C\uB4DC \uC2E4\uD328"),null}finally{N(false);}},[m]),je=ee.useCallback(()=>{var E;(E=m.onCancel)==null||E.call(m);},[m]),lt=ee.useMemo(()=>({formData:n,activeLanguage:c,showPreview:p,submitting:k,translating:M,uploading:R,error:C,translateSuccess:V,autoSaveStatus:J,languages:o,features:d,labels:g,variant:h,isEditMode:r,setActiveLanguage:w,setShowPreview:v,updateField:ve,updateMultilingualField:We,handleSave:it,handleTranslate:Ge,handleUploadImage:_e,handleCancel:je,setError:I,generateSlug:st,slugManuallyEdited:$,setSlugManuallyEdited:Z}),[n,c,p,k,M,R,C,V,J,o,d,g,h,r,ve,We,it,Ge,_e,je,st,$,Z]);return jsxRuntime.jsx(Lr.Provider,{value:lt,children:t})}var Dr={home:ssr.House,arrowLeft:ssr.ArrowLeft,arrowRight:ssr.ArrowRight,arrowUp:ssr.ArrowUp,arrowDown:ssr.ArrowDown,menu:ssr.List,close:ssr.X,search:ssr.MagnifyingGlass,settings:ssr.Gear,externalLink:ssr.ArrowSquareOut,chevronLeft:ssr.CaretLeft,chevronRight:ssr.CaretRight,chevronDown:ssr.CaretDown,chevronUp:ssr.CaretUp,edit:ssr.Pencil,delete:ssr.Trash,add:ssr.Plus,remove:ssr.Minus,download:ssr.Download,upload:ssr.Upload,refresh:ssr.ArrowClockwise,save:ssr.FloppyDisk,copy:ssr.Copy,loader:ssr.SpinnerGap,success:ssr.CheckCircle,error:ssr.XCircle,alertCircle:ssr.WarningCircle,warning:ssr.WarningCircle,info:ssr.Info,check:ssr.Check,circle:ssr.Circle,helpCircle:ssr.Question,user:ssr.User,users:ssr.Users,userPlus:ssr.UserPlus,logIn:ssr.SignIn,logOut:ssr.SignOut,eye:ssr.Eye,eyeOff:ssr.EyeSlash,chart:ssr.ChartBar,barChart:ssr.ChartBar,trendingUp:ssr.TrendUp,activity:ssr.Pulse,database:ssr.Database,zap:ssr.Lightning,fileText:ssr.FileText,file:ssr.File,folder:ssr.Folder,book:ssr.Book,bookOpen:ssr.BookOpen,mail:ssr.Envelope,message:ssr.ChatCircle,phone:ssr.Phone,image:ssr.Image,video:ssr.Video,camera:ssr.Camera,smile:ssr.Smiley,frown:ssr.SmileySad,meh:ssr.SmileyMeh,lock:ssr.Lock,unlock:ssr.LockOpen,shield:ssr.Shield,wallet:ssr.Wallet,key:ssr.Key,clock:ssr.Clock,calendar:ssr.Calendar,calendarPlus:ssr.CalendarPlus,bell:ssr.Bell,heart:ssr.Heart,star:ssr.Star,bookmark:ssr.Bookmark,share:ssr.Share,monitor:ssr.Monitor,sun:ssr.Sun,moon:ssr.Moon,lightbulb:ssr.Lightbulb,brain:ssr.Brain,flag:ssr.Flag,square:ssr.Square,sparkle:ssr.Sparkle,sparkles:ssr.Sparkle,globe:ssr.Globe,smartphone:ssr.DeviceMobile,deviceMobile:ssr.DeviceMobile,floppyDisk:ssr.FloppyDisk,ticket:ssr.Ticket,clipboard:ssr.Clipboard,wifi:ssr.WifiHigh,wifiOff:ssr.WifiSlash,cpu:ssr.Cpu,mask:ssr.MaskHappy,rocket:ssr.Rocket,layout:ssr.Layout,megaphone:ssr.Megaphone,layers:ssr.Stack,ban:ssr.Prohibit,bold:ssr.TextB,italic:ssr.TextItalic,strikethrough:ssr.TextStrikethrough,heading:ssr.TextHOne,link:ssr.Link,code:ssr.Code,fileCode:ssr.FileCode,quote:ssr.Quotes,list:ssr.List,listOrdered:ssr.ListNumbers,minus:ssr.Minus},zr={happy:"smile",sad:"frown",neutral:"meh",excited:"smile",angry:"frown",love:"heart",like:"heart",dislike:"frown"},Or={loading:"loader",success:"success",error:"error",warning:"warning",info:"info",locked:"lock",unlocked:"unlock",visible:"eye",hidden:"eyeOff"};function Fr(t){return !t||!/[-_]/.test(t)&&/^[a-z]/.test(t)?t:/^[A-Z]+$/.test(t)?t.toLowerCase():/^[A-Z]/.test(t)&&!/[-_]/.test(t)?t.charAt(0).toLowerCase()+t.slice(1):t.split(/[-_]/).map((e,r)=>r===0?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")}var G=null,_=null;var qr={home:{lucide:"Home",phosphor:"House",iconsax:"Home2"},"layout-dashboard":{lucide:"LayoutDashboard",phosphor:"SquaresFour"},folder:{lucide:"Folder",phosphor:"Folder",iconsax:"Folder"},"alert-circle":{lucide:"AlertCircle",phosphor:"WarningCircle",iconsax:"Danger"},alertCircle:{lucide:"AlertCircle",phosphor:"WarningCircle",iconsax:"Danger"},columns:{lucide:"Columns",phosphor:"Columns"},users:{lucide:"Users",phosphor:"Users",iconsax:"People"},settings:{lucide:"Settings",phosphor:"Gear"},menu:{lucide:"Menu",phosphor:"List",iconsax:"Menu"},close:{lucide:"X",phosphor:"X",iconsax:"CloseCircle"},chevronLeft:{lucide:"ChevronLeft",phosphor:"CaretLeft",iconsax:"ArrowLeft2"},chevronRight:{lucide:"ChevronRight",phosphor:"CaretRight",iconsax:"ArrowRight2"},chevronDown:{lucide:"ChevronDown",phosphor:"CaretDown",iconsax:"ArrowDown2"},chevronUp:{lucide:"ChevronUp",phosphor:"CaretUp",iconsax:"ArrowUp2"},arrowLeft:{lucide:"ArrowLeft",phosphor:"ArrowLeft",iconsax:"ArrowLeft"},arrowRight:{lucide:"ArrowRight",phosphor:"ArrowRight",iconsax:"ArrowRight"},arrowUp:{lucide:"ArrowUp",phosphor:"ArrowUp",iconsax:"ArrowUp"},arrowDown:{lucide:"ArrowDown",phosphor:"ArrowDown",iconsax:"ArrowDown"},add:{lucide:"Plus",phosphor:"Plus",iconsax:"Add"},edit:{lucide:"Edit",phosphor:"Pencil"},pencil:{lucide:"Pencil",phosphor:"Pencil"},delete:{lucide:"Trash2",phosphor:"Trash",iconsax:"Trash"},trash:{lucide:"Trash2",phosphor:"Trash",iconsax:"Trash"},upload:{lucide:"Upload",phosphor:"Upload",iconsax:"Upload"},download:{lucide:"Download",phosphor:"Download",iconsax:"Download"},x:{lucide:"X",phosphor:"X"},check:{lucide:"Check",phosphor:"Check",iconsax:"Check"},search:{lucide:"Search",phosphor:"MagnifyingGlass",iconsax:"SearchNormal"},share:{lucide:"Share",phosphor:"Share"},copy:{lucide:"Copy",phosphor:"Copy"},save:{lucide:"Save",phosphor:"FloppyDisk"},loader:{lucide:"Loader2",phosphor:"Spinner"},loader2:{lucide:"Loader2",phosphor:"Spinner"},"check-circle":{lucide:"CheckCircle",phosphor:"CheckCircle",iconsax:"TickCircle"},checkCircle:{lucide:"CheckCircle",phosphor:"CheckCircle",iconsax:"TickCircle"},success:{lucide:"CheckCircle",phosphor:"CheckCircle",iconsax:"TickCircle"},error:{lucide:"XCircle",phosphor:"XCircle",iconsax:"CloseCircle"},warning:{lucide:"AlertCircle",phosphor:"WarningCircle",iconsax:"Warning2"},info:{lucide:"Info",phosphor:"Info",iconsax:"InfoCircle"},refresh:{lucide:"RefreshCw",phosphor:"ArrowClockwise",iconsax:"Refresh"},refreshCw:{lucide:"RefreshCw",phosphor:"ArrowClockwise",iconsax:"Refresh"},bell:{lucide:"Bell",phosphor:"Bell",iconsax:"Bell"},heart:{lucide:"Heart",phosphor:"Heart",iconsax:"Heart"},star:{lucide:"Star",phosphor:"Star",iconsax:"Star"},bookmark:{lucide:"Bookmark",phosphor:"Bookmark"},user:{lucide:"User",phosphor:"User",iconsax:"User"},userPlus:{lucide:"UserPlus",phosphor:"UserPlus",iconsax:"UserAdd"},logIn:{lucide:"LogIn",phosphor:"SignIn",iconsax:"Login"},logOut:{lucide:"LogOut",phosphor:"SignOut",iconsax:"Logout"},chrome:{lucide:"Chrome",phosphor:"ChromeLogo",iconsax:"Chrome"},github:{lucide:"Github",phosphor:"GithubLogo"},message:{lucide:"MessageCircle",phosphor:"ChatCircle"},messageSquare:{lucide:"MessageSquare",phosphor:"ChatSquare"},"message-square":{lucide:"MessageSquare",phosphor:"ChatSquare"},inbox:{lucide:"Inbox",phosphor:"Inbox"},calendar:{lucide:"Calendar",phosphor:"Calendar"},calendarPlus:{lucide:"CalendarPlus",phosphor:"CalendarPlus"},checkSquare:{lucide:"CheckSquare",phosphor:"CheckSquare",iconsax:"TickSquare"},clock:{lucide:"Clock",phosphor:"Clock"},book:{lucide:"Book",phosphor:"Book",iconsax:"Book"},bookOpen:{lucide:"BookOpen",phosphor:"BookOpen",iconsax:"Book"},monitor:{lucide:"Monitor",phosphor:"Monitor",iconsax:"Monitor"},sun:{lucide:"Sun",phosphor:"Sun",iconsax:"Sun"},moon:{lucide:"Moon",phosphor:"Moon",iconsax:"Moon"},sparkle:{lucide:"Sparkle",phosphor:"Sparkle"},sparkles:{lucide:"Sparkles",phosphor:"Sparkle"},lightbulb:{lucide:"Lightbulb",phosphor:"Lightbulb"},brain:{lucide:"Brain",phosphor:"Brain"},zap:{lucide:"Zap",phosphor:"Lightning"},globe:{lucide:"Globe",phosphor:"Globe",iconsax:"Global"},deviceMobile:{lucide:"Smartphone",phosphor:"DeviceMobile"},smartphone:{lucide:"Smartphone",phosphor:"DeviceMobile"},floppyDisk:{lucide:"Save",phosphor:"FloppyDisk"},chart:{lucide:"BarChart3",phosphor:"ChartBar"},barChart:{lucide:"BarChart",phosphor:"ChartBar"},trendingUp:{lucide:"TrendingUp",phosphor:"TrendUp"},trendingDown:{lucide:"TrendingDown",phosphor:"TrendDown"},activity:{lucide:"Activity",phosphor:"Pulse"},database:{lucide:"Database",phosphor:"Database"},dollarSign:{lucide:"DollarSign",phosphor:"CurrencyDollar"},dollar:{lucide:"DollarSign",phosphor:"CurrencyDollar"},currency:{lucide:"DollarSign",phosphor:"CurrencyDollar"},layers:{lucide:"Layers",phosphor:"Stack"},ban:{lucide:"Ban",phosphor:"Prohibit"},lock:{lucide:"Lock",phosphor:"Lock",iconsax:"Lock"},unlock:{lucide:"Unlock",phosphor:"LockOpen",iconsax:"Unlock"},shield:{lucide:"Shield",phosphor:"Shield",iconsax:"Shield"},key:{lucide:"Key",phosphor:"Key"},play:{lucide:"Play",phosphor:"Play",iconsax:"Play"},pause:{lucide:"Pause",phosphor:"Pause",iconsax:"Pause"},image:{lucide:"Image",phosphor:"Image",iconsax:"Image"},video:{lucide:"Video",phosphor:"Video",iconsax:"Video"},camera:{lucide:"Camera",phosphor:"Camera",iconsax:"Camera"},fileText:{lucide:"FileText",phosphor:"FileText"},file:{lucide:"File",phosphor:"File"},externalLink:{lucide:"ExternalLink",phosphor:"ArrowSquareOut"},link:{lucide:"Link",phosphor:"Link",iconsax:"Link"},moreHorizontal:{lucide:"MoreHorizontal",phosphor:"DotsThreeOutline"},moreVertical:{lucide:"MoreVertical",phosphor:"DotsThreeVertical"},remove:{lucide:"Minus",phosphor:"Minus",iconsax:"Minus"},eye:{lucide:"Eye",phosphor:"Eye",iconsax:"Eye"},eyeOff:{lucide:"EyeOff",phosphor:"EyeSlash",iconsax:"EyeSlash"},smile:{lucide:"Smile",phosphor:"Smiley",iconsax:"EmojiHappy"},frown:{lucide:"Frown",phosphor:"SmileySad",iconsax:"EmojiSad"},meh:{lucide:"Meh",phosphor:"SmileyMeh",iconsax:"EmojiNormal"},mail:{lucide:"Mail",phosphor:"Envelope"},phone:{lucide:"Phone",phosphor:"Phone"},flag:{lucide:"Flag",phosphor:"Flag",iconsax:"Flag"},rocket:{lucide:"Rocket",phosphor:"Rocket",iconsax:"Rocket"},ticket:{lucide:"Ticket",phosphor:"Ticket",iconsax:"Ticket"},clipboard:{lucide:"ClipboardList",phosphor:"Clipboard",iconsax:"Sticker"},wifi:{lucide:"Wifi",phosphor:"WifiHigh",iconsax:"Wifi"},wifiOff:{lucide:"WifiOff",phosphor:"WifiSlash"},cpu:{lucide:"Cpu",phosphor:"Cpu",iconsax:"Computing"},mask:{lucide:"Drama",phosphor:"MaskHappy",iconsax:"EmojiHappy"},bold:{lucide:"Bold",phosphor:"TextB"},italic:{lucide:"Italic",phosphor:"TextItalic"},strikethrough:{lucide:"Strikethrough",phosphor:"TextStrikethrough"},heading:{lucide:"Heading",phosphor:"TextHOne"},code:{lucide:"Code",phosphor:"Code",iconsax:"Code"},fileCode:{lucide:"FileCode",phosphor:"FileCode"},quote:{lucide:"Quote",phosphor:"Quotes",iconsax:"QuoteUp"},list:{lucide:"List",phosphor:"List"},listOrdered:{lucide:"ListOrdered",phosphor:"ListNumbers"},minus:{lucide:"Minus",phosphor:"Minus",iconsax:"Minus"}};async function Ur(){if(typeof window=="undefined")return null;if(!G)try{G=await import('@phosphor-icons/react');}catch{return console.warn("Phosphor Icons not available. Install @phosphor-icons/react to use."),null}return G}async function Vr(){if(typeof window=="undefined")return null;if(!_)try{_=await import('lucide-react');}catch{return console.warn("Lucide Icons not available. Install lucide-react to use lucide provider."),null}return _}function tt(t,e="phosphor"){let r=qr[t];if(!r)return Bs(t,e);let o=r[e];switch(e){case "phosphor":return !o||!G?null:(G==null?void 0:G[o])||null;case "lucide":return !o||!_?null:(_==null?void 0:_[o])||null;case "iconsax":{return null;}default:return null}}function Bs(t,e){switch(e){case "phosphor":{if(!G)return null;let r=t.charAt(0).toUpperCase()+t.slice(1),o=t.split(/(?=[A-Z])/).map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join("");return (G==null?void 0:G[r])||(G==null?void 0:G[o])||(G==null?void 0:G[t])||null}case "lucide":{if(!_)return null;let r=t.charAt(0).toUpperCase()+t.slice(1),o=t.replace(/([A-Z])/g,a=>a===t[0]?a.toLowerCase():a);return (_==null?void 0:_[r])||(_==null?void 0:_[t])||(_==null?void 0:_[o])||null}case "iconsax":{return null;}default:return null}}function Wr(t,e){let r=qr[t];if(r){let o=r[e];if(o)return o}return t}var Bt={"arrow-left":"arrowLeft","arrow-right":"arrowRight","arrow-up":"arrowUp","arrow-down":"arrowDown","chevron-left":"chevronLeft","chevron-right":"chevronRight","chevron-up":"chevronUp","chevron-down":"chevronDown","external-link":"externalLink","more-horizontal":"moreHorizontal","more-vertical":"moreVertical","user-plus":"userPlus","log-in":"logIn","log-out":"logOut","check-circle":"checkCircle","check-square":"checkSquare","alert-circle":"alertCircle","eye-off":"eyeOff","file-text":"fileText","book-open":"bookOpen","bar-chart":"barChart","trending-up":"trendingUp","trending-down":"trendingDown","message-square":"messageSquare","calendar-plus":"calendarPlus","refresh-cw":"refreshCw","dollar-sign":"dollarSign","layout-dashboard":"layoutDashboard","device-mobile":"deviceMobile","floppy-disk":"floppyDisk",back:"arrowLeft",prev:"arrowLeft",previous:"arrowLeft",forward:"arrowRight",next:"arrowRight",close:"x",cancel:"x",remove:"delete",trash:"delete",plus:"add",new:"add",pencil:"edit",modify:"edit",store:"save",floppy:"save",magnify:"search",person:"user",account:"user",profile:"user",gear:"settings",config:"settings",preferences:"settings",house:"home",main:"home",done:"check",complete:"check",tick:"check",information:"info",help:"info",alert:"warning",caution:"warning",checkmark:"success",checkCircle:"success",fail:"error",cross:"error",xCircle:"error",spinner:"loader",loading:"loader",wait:"loader",reload:"refresh",update:"refresh",sync:"refresh",show:"eye",view:"eye",hide:"eyeOff",hidden:"eyeOff",secure:"lock",locked:"lock",unsecure:"unlock",unlocked:"unlock",get:"download",fetch:"download",post:"upload",send:"share",export:"share",duplicate:"copy",clone:"copy",email:"mail",envelope:"mail",chat:"message",comment:"message",talk:"message",date:"calendar",schedule:"calendar",time:"clock",watch:"clock",document:"fileText",doc:"fileText",text:"fileText",directory:"folder",dir:"folder",picture:"image",img:"image",movie:"video",film:"video",photo:"camera",capture:"camera",start:"play",run:"play",stop:"pause",halt:"pause",like:"heart",love:"heart",favorite:"star",saveBookmark:"bookmark",notification:"bell",notify:"bell",alarm:"bell",prefs:"settings",lookup:"search",dots:"moreHorizontal",moreMenu:"moreHorizontal",moreOptions:"moreVertical",external:"externalLink",outbound:"externalLink",open:"externalLink",url:"link",hyperlink:"link",graph:"barChart",stats:"barChart",analytics:"barChart",db:"database",storage:"database",pulse:"activity",monitor:"activity",up:"trendingUp",down:"trendingDown",lightning:"zap",bolt:"zap",flash:"zap",security:"shield",protect:"shield",password:"key",secret:"key",signin:"logIn",login:"logIn",enter:"logIn",signout:"logOut",logout:"logOut",exit:"logOut",people:"users",group:"users",team:"users",addUser:"userPlus",invite:"userPlus",read:"book",library:"book",reading:"bookOpen",openBook:"bookOpen",light:"sun",day:"sun",dark:"moon",night:"moon",screen:"monitor",display:"monitor",ai:"brain",intelligence:"brain",think:"brain",idea:"lightbulb",bulb:"lightbulb",inspiration:"lightbulb",magic:"sparkles",stars:"sparkles",glitter:"sparkles"};function Gr(t){if(!t||typeof t!="string")return {normalized:t||"",wasAlias:false};let e=Fr(t),r=Bt[t]||Bt[e];return r?{normalized:r,wasAlias:true,originalAlias:t}:{normalized:e,wasAlias:false}}var _r={set:"phosphor",weight:"regular",size:20,color:"currentColor",strokeWidth:1.25,iconsaxVariant:"line"};var $s=ee.createContext(_r);function jr(){return ee.useContext($s)}var Xr=ee__default.default.forwardRef(({name:t,size:e,className:r,emotion:o,status:a,provider:i,weight:m,animated:x=false,pulse:h=false,spin:s=false,bounce:y=false,variant:f="default","aria-label":b,"aria-hidden":g},d)=>{var D,te;let n=jr(),u=i||n.set,c=e!=null?e:n.size,w=m||n.weight,p=n.color,v=(D=n.strokeWidth)!=null?D:1.25,k=(te=n.iconsaxVariant)!=null?te:"line",[T,M]=ee__default.default.useState(false),[B,R]=ee__default.default.useState(false);ee__default.default.useEffect(()=>{M(true),u==="lucide"?Vr().then(()=>R(true)):u==="phosphor"?Ur().then(()=>R(true)):R(true);},[u]);let N=ee__default.default.useMemo(()=>{let ne=o?zr[o]:a?Or[a]:t,{normalized:W}=Gr(ne),re=Wr(W,u);return {normalized:W,providerName:re}},[t,o,a,u]),C=N.normalized,I=ee__default.default.useMemo(()=>{return null},[u,N.providerName,T,k]),V=dt({"text-current":f==="default","text-primary":f==="primary","text-muted-foreground":f==="secondary"||f==="muted","text-green-600 dark:text-green-400":f==="success","text-yellow-600 dark:text-yellow-400":f==="warning","text-destructive":f==="error"});if(!T)return jsxRuntime.jsx("span",{style:{width:c,height:c},className:l(V,r),"aria-hidden":g!==void 0?g:true,"aria-label":b});let z=null;if(u==="phosphor"?(z=Dr[C]||null,!z&&B&&(z=tt(C,u))):u==="iconsax"?(z=I,z||(z=tt(C,u))):z=tt(C,u),!z)return u==="iconsax"&&true?process.env.NODE_ENV==="development"&&console.warn(`Icon "${C}" \u2014 iconsax resolver not registered. Use HuaProvider with icons.set='iconsax', or add: import '@hua-labs/ui/iconsax'`):console.warn(`Icon "${C}" not found for provider "${u}"`),jsxRuntime.jsx("span",{ref:d,className:l("inline-flex items-center justify-center rounded-full border-2 border-dashed border-border",V,r),style:{width:c,height:c},"aria-label":b||`\uC544\uC774\uCF58\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC74C: ${C}`,title:`Icon not found: ${C}`,children:jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground","aria-hidden":"true",children:"?"})});let $={size:typeof c=="number"?c:void 0,width:c,height:c,color:p};u==="phosphor"?$.weight=w:$.strokeWidth=v;let Z=dt({"animate-pulse":h,"animate-spin":s,"animate-bounce":y,"transition-all duration-200 ease-in-out":x}),J={};return b?(J["aria-label"]=b,J["aria-hidden"]=false):g!==void 0?J["aria-hidden"]=g:J["aria-hidden"]=true,jsxRuntime.jsx("span",{ref:d,className:l("inline-flex items-center justify-center",Z,V,r),style:{width:c,height:c},...J,children:z&&ee__default.default.createElement(z,{...$,className:V,"aria-hidden":true})})});Xr.displayName="Icon";var Ds=ee__default.default.memo(Xr,(t,e)=>t.name===e.name&&t.size===e.size&&t.className===e.className&&t.emotion===e.emotion&&t.status===e.status&&t.provider===e.provider&&t.animated===e.animated&&t.pulse===e.pulse&&t.spin===e.spin&&t.bounce===e.bounce&&t.variant===e.variant&&t.weight===e.weight&&t["aria-label"]===e["aria-label"]&&t["aria-hidden"]===e["aria-hidden"]),A=Ds;A.displayName="Icon";var Yr=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(A,{ref:e,name:"smile",...t}));Yr.displayName="EmotionIcon";var Kr=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(A,{ref:e,name:"info",...t}));Kr.displayName="StatusIcon";var Qr=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(A,{ref:e,name:"loader",status:"loading",spin:true,"aria-label":"\uB85C\uB529 \uC911",...t}));Qr.displayName="LoadingIcon";var Zr=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(A,{ref:e,name:"check",status:"success",variant:"success","aria-label":"\uC131\uACF5",...t}));Zr.displayName="SuccessIcon";var Jr=ee__default.default.forwardRef((t,e)=>jsxRuntime.jsx(A,{ref:e,name:"alertCircle",status:"error",variant:"error","aria-label":"\uC624\uB958",...t}));Jr.displayName="ErrorIcon";var Be=ee__default.default.forwardRef(({onBack:t,backLink:e,className:r},o)=>{let{labels:a,isEditMode:i,formData:m}=U();return jsxRuntime.jsx("header",{ref:o,className:l("flex items-center justify-between mb-8",r),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[e||t&&jsxRuntime.jsx("button",{type:"button",onClick:t,className:"p-2 text-muted-foreground hover:text-foreground transition-colors","aria-label":"\uB4A4\uB85C\uAC00\uAE30",children:jsxRuntime.jsx(A,{name:"chevronLeft",size:24})}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h1",{className:"text-2xl font-bold text-foreground",children:i?a.editTitle:a.pageTitle}),i&&m.slug&&jsxRuntime.jsxs("p",{className:"text-sm text-muted-foreground",children:[a.slugPrefix,m.slug]})]})]})})});Be.displayName="BlogEditorHeader";var He=ee__default.default.forwardRef(({className:t},e)=>{var v,k;let{formData:r,updateField:o,features:a,labels:i,variant:m,handleUploadImage:x,uploading:h,setSlugManuallyEdited:s}=U(),[y,f]=ee.useState(""),b=ee.useRef(null),g=l("rounded-xl p-6 space-y-4",m==="glass"?"bg-white/10 backdrop-blur-sm border border-white/20 dark:bg-background/20 dark:border-border/50":m==="minimal"?"bg-transparent":"bg-background",t),d="w-full px-3 py-2 border border-border rounded-lg bg-background text-foreground focus:ring-1 focus:ring-ring focus:border-transparent transition-colors",n="block text-sm font-medium text-foreground mb-1",u=ee.useCallback(T=>{let M=T.trim();M&&!r.tags.includes(M)&&o("tags",[...r.tags,M]),f("");},[r.tags,o]),c=ee.useCallback(T=>{o("tags",r.tags.filter(M=>M!==T));},[r.tags,o]),w=ee.useCallback(T=>{let M=T.target.value;if(M.includes(",")){let B=M.split(",");B.forEach((R,N)=>{N<B.length-1?u(R):f(R);});}else f(M);},[u]),p=ee.useCallback(T=>{T.key==="Enter"?(T.preventDefault(),u(y)):T.key==="Backspace"&&!y&&r.tags.length>0&&c(r.tags[r.tags.length-1]);},[y,r.tags,u,c]);return jsxRuntime.jsxs("div",{ref:e,className:g,children:[jsxRuntime.jsx("h2",{className:"font-semibold text-foreground",children:i.basicInfo}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a.enableSlug&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{className:n,children:[i.slug," *"]}),jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("span",{className:"text-muted-foreground mr-1 text-sm",children:i.slugPrefix}),jsxRuntime.jsx("input",{type:"text",value:r.slug,onChange:T=>{o("slug",Mt(T.target.value)),s(true);},className:l(d,"flex-1"),placeholder:"my-post-slug"})]})]}),a.enableTags&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:n,children:i.tags}),jsxRuntime.jsxs("div",{className:l("flex flex-wrap items-center gap-2 min-h-[42px] px-3 py-2 border border-border rounded-lg bg-background focus-within:ring-1 focus-within:ring-ring focus-within:border-transparent transition-colors"),children:[r.tags.map(T=>jsxRuntime.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-primary/10 text-primary text-sm rounded-md",children:[T,jsxRuntime.jsx("button",{type:"button",onClick:()=>c(T),className:"hover:text-primary transition-colors","aria-label":`${T} \uD0DC\uADF8 \uC0AD\uC81C`,children:jsxRuntime.jsx(A,{name:"x",size:14})})]},T)),jsxRuntime.jsx("input",{type:"text",value:y,onChange:w,onKeyDown:p,className:"flex-1 min-w-[100px] bg-transparent outline-none text-foreground text-sm",placeholder:r.tags.length===0?i.tagsPlaceholder:"\uD0DC\uADF8 \uCD94\uAC00..."})]}),jsxRuntime.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"\uC27C\uD45C(,) \uB610\uB294 Enter\uB85C \uD0DC\uADF8 \uCD94\uAC00"})]})]}),a.enableCoverImage&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:n,children:i.coverImage}),jsxRuntime.jsxs("div",{className:"space-y-3",children:[r.coverImage&&jsxRuntime.jsxs("div",{className:"relative w-full h-40 rounded-lg overflow-hidden bg-muted",children:[jsxRuntime.jsx("img",{src:r.coverImage,alt:"\uCEE4\uBC84 \uC774\uBBF8\uC9C0 \uBBF8\uB9AC\uBCF4\uAE30",className:"w-full h-full object-cover"}),jsxRuntime.jsx("button",{type:"button",onClick:()=>o("coverImage",""),className:"absolute top-2 right-2 p-1.5 bg-red-500 text-white rounded-full hover:bg-red-600 transition-colors","aria-label":"\uC774\uBBF8\uC9C0 \uC0AD\uC81C",children:jsxRuntime.jsx(A,{name:"x",size:14})})]}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx("input",{type:"text",value:r.coverImage,onChange:T=>o("coverImage",T.target.value),className:l(d,"flex-1"),placeholder:i.coverImagePlaceholder}),jsxRuntime.jsx("input",{ref:b,type:"file",accept:"image/*",className:"hidden",onChange:async T=>{var B;let M=(B=T.target.files)==null?void 0:B[0];if(M){let R=await x(M);R&&o("coverImage",R);}T.target.value="";}}),jsxRuntime.jsx("button",{type:"button",onClick:()=>{var T;return (T=b.current)==null?void 0:T.click()},disabled:h,className:"px-3 py-2 border border-border rounded-lg hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed transition-colors",title:"\uC774\uBBF8\uC9C0 \uC5C5\uB85C\uB4DC",children:h?jsxRuntime.jsx(A,{name:"loader",size:20,spin:true}):jsxRuntime.jsx(A,{name:"upload",size:20})})]})]})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a.enablePublishDate&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:n,children:i.publishDate}),jsxRuntime.jsx("input",{type:"datetime-local",value:(v=r.publishedAt)!=null?v:"",onChange:T=>o("publishedAt",T.target.value||null),className:d}),jsxRuntime.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:i.publishDateHint})]}),a.enableExpiresAt&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:n,children:i.expiresAt}),jsxRuntime.jsx("input",{type:"datetime-local",value:(k=r.expiresAt)!=null?k:"",onChange:T=>o("expiresAt",T.target.value||null),className:d}),jsxRuntime.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:i.expiresAtHint})]})]})]})});He.displayName="BlogEditorMetadata";var Ae=ee__default.default.forwardRef(({className:t},e)=>{let{languages:r,activeLanguage:o,setActiveLanguage:a,showPreview:i,setShowPreview:m,features:x,labels:h}=U();return jsxRuntime.jsxs("div",{ref:e,className:l("flex items-center border-b border-border sticky top-0 z-10 bg-background",t),role:"tablist","aria-label":"\uC5B8\uC5B4 \uC120\uD0DD",children:[jsxRuntime.jsx("div",{className:"flex flex-1",children:r.map(s=>{let y=o===s.key,f=s.isPrimary;return jsxRuntime.jsxs("button",{type:"button",role:"tab","aria-selected":y,"aria-controls":`tabpanel-${s.key}`,id:`tab-${s.key}`,onClick:()=>a(s.key),className:l("flex-1 px-4 py-3 text-sm font-medium transition-colors",y?"bg-primary/10 text-primary border-b-2 border-primary":"text-muted-foreground hover:bg-muted"),children:[s.flag&&jsxRuntime.jsx("span",{className:"mr-1.5",children:s.flag}),s.label,f&&" *"]},s.key)})}),x.enablePreview&&jsxRuntime.jsxs("button",{type:"button",onClick:()=>m(!i),className:"inline-flex items-center gap-1.5 px-3 py-2 mx-2 text-sm border border-border rounded-lg hover:bg-muted transition-colors shrink-0",children:[jsxRuntime.jsx(A,{name:i?"pencil":"eye",size:14}),i?h.editMode:h.preview]})]})});Ae.displayName="BlogEditorLanguageTabs";var ze=ee__default.default.forwardRef(({className:t,textareaRef:e},r)=>{var p;let{formData:o,activeLanguage:a,updateMultilingualField:i,updateField:m,features:x,labels:h,languages:s,generateSlug:y,isEditMode:f,slugManuallyEdited:b}=U(),g=((p=s.find(v=>v.isPrimary))==null?void 0:p.key)===a,d=s.find(v=>v.key===a),n="w-full px-3 py-2 border border-border rounded-lg bg-background text-foreground focus:ring-1 focus:ring-ring focus:border-transparent transition-colors",u="block text-sm font-medium text-foreground mb-1",c=v=>{i("title",a,v),a==="en"&&!f&&!b&&m("slug",y(v));},w=v=>g?`${v} *`:`${v} (${(d==null?void 0:d.label)||a})`;return jsxRuntime.jsxs("div",{ref:r,className:l("p-6 space-y-4",t),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:u,children:w(h.titleLabel)}),jsxRuntime.jsx("input",{type:"text",value:o.title[a]||"",onChange:v=>c(v.target.value),className:n,placeholder:h.titlePlaceholder})]}),x.enableExcerpt&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{className:u,children:w(h.excerpt)}),jsxRuntime.jsx("textarea",{value:o.excerpt[a]||"",onChange:v=>i("excerpt",a,v.target.value),rows:2,className:l(n,"resize-none"),placeholder:h.excerptPlaceholder})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{className:u,children:[w(h.contentLabel)," (\uB9C8\uD06C\uB2E4\uC6B4)"]}),jsxRuntime.jsx("textarea",{ref:e,value:o.content[a]||"",onChange:v=>i("content",a,v.target.value),rows:15,className:l(n,"font-mono text-sm resize-y min-h-[300px]"),placeholder:h.contentPlaceholder})]})]})});ze.displayName="BlogEditorContent";function Ws(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Dt(t){if(!t)return "";let e=t;return e=e.replace(/```(\w*)\n?([\s\S]*?)```/g,(r,o,a)=>`<pre class="bg-gray-100 dark:bg-gray-800 rounded-lg p-4 overflow-x-auto my-4"><code class="text-sm">${Ws(a.trim())}</code></pre>`),e=e.replace(/`([^`]+)`/g,'<code class="bg-gray-100 dark:bg-gray-700 px-1.5 py-0.5 rounded text-sm">$1</code>'),e=e.replace(/^######\s+(.+)$/gm,'<h6 class="text-base font-semibold mt-4 mb-2">$1</h6>'),e=e.replace(/^#####\s+(.+)$/gm,'<h5 class="text-lg font-semibold mt-4 mb-2">$1</h5>'),e=e.replace(/^####\s+(.+)$/gm,'<h4 class="text-xl font-semibold mt-5 mb-2">$1</h4>'),e=e.replace(/^###\s+(.+)$/gm,'<h3 class="text-2xl font-semibold mt-5 mb-3">$1</h3>'),e=e.replace(/^##\s+(.+)$/gm,'<h2 class="text-2xl font-bold mt-6 mb-3">$1</h2>'),e=e.replace(/^#\s+(.+)$/gm,'<h1 class="text-3xl font-bold mt-6 mb-4">$1</h1>'),e=e.replace(/^---+$/gm,'<hr class="my-6 border-gray-300 dark:border-gray-600" />'),e=e.replace(/^>\s+(.+)$/gm,'<blockquote class="border-l-4 border-gray-300 dark:border-gray-600 pl-4 my-4 italic text-gray-600 dark:text-gray-400">$1</blockquote>'),e=e.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>"),e=e.replace(/\*(.+?)\*/g,"<em>$1</em>"),e=e.replace(/~~(.+?)~~/g,'<del class="text-gray-500">$1</del>'),e=e.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" class="text-cyan-600 hover:text-cyan-700 dark:text-cyan-400 dark:hover:text-cyan-300 underline" target="_blank" rel="noopener noreferrer">$1</a>'),e=e.replace(/^[-*]\s+(.+)$/gm,'<li class="ml-4">$1</li>'),e=e.replace(/(<li[^>]*>.*<\/li>\n?)+/g,r=>`<ul class="list-disc list-inside my-4 space-y-1">${r}</ul>`),e=e.replace(/\n(?!<)/g,`<br />
|
|
76
76
|
`),e=e.replace(/(<br \/>[\n\s]*){3,}/g,`<br /><br />
|
|
77
|
-
`),e}function
|
|
77
|
+
`),e}function eo(t){return t?t.replace(/```[\s\S]*?```/g,"").replace(/`[^`]+`/g,"").replace(/^#{1,6}\s+/gm,"").replace(/\*\*(.+?)\*\*/g,"$1").replace(/\*(.+?)\*/g,"$1").replace(/~~(.+?)~~/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/^[-*]\s+/gm,"").replace(/^>\s+/gm,"").replace(/^---+$/gm,"").replace(/\n{3,}/g,`
|
|
78
78
|
|
|
79
|
-
`).trim():""}function
|
|
79
|
+
`).trim():""}function Gs(t,e=150){let r=eo(t);return r.length<=e?r:r.slice(0,e).trim()+"..."}function zt(t,e,r,o,a){let i=t.slice(e,r),m=t.slice(0,e),x=t.slice(r),h=m+o+i+a+x,s=e+o.length+i.length+a.length;return {text:h,cursorPosition:s}}var Xs=[{icon:"bold",label:"bold",markdown:{before:"**",after:"**"},shortcut:"Ctrl+B"},{icon:"italic",label:"italic",markdown:{before:"*",after:"*"},shortcut:"Ctrl+I"},{icon:"strikethrough",label:"strikethrough",markdown:{before:"~~",after:"~~"}},{icon:"heading",label:"heading",markdown:{before:"## ",after:""}},{icon:"link",label:"link",markdown:{before:"[",after:"](url)"},shortcut:"Ctrl+K"},{icon:"image",label:"image",markdown:{before:""}},{icon:"code",label:"code",markdown:{before:"`",after:"`"}},{icon:"fileCode",label:"codeBlock",markdown:{before:"```\n",after:"\n```"}},{icon:"quote",label:"quote",markdown:{before:"> ",after:""}},{icon:"list",label:"list",markdown:{before:"- ",after:""}},{icon:"listOrdered",label:"orderedList",markdown:{before:"1. ",after:""}},{icon:"minus",label:"horizontalRule",markdown:{before:`
|
|
80
80
|
---
|
|
81
|
-
`,after:""}}],
|
|
81
|
+
`,after:""}}],Oe=ee__default.default.forwardRef(({textareaRef:t,className:e},r)=>{let{labels:o,activeLanguage:a,updateMultilingualField:i,formData:m,features:x}=U(),h=ee.useCallback(s=>{let y=t.current;if(!y)return;let{selectionStart:f,selectionEnd:b}=y,g=m.content[a]||"",{text:d,cursorPosition:n}=zt(g,f,b,s.markdown.before,s.markdown.after);i("content",a,d),requestAnimationFrame(()=>{y.focus(),y.setSelectionRange(n,n);});},[t,m,a,i]);return x.enableMarkdownToolbar?jsxRuntime.jsx("div",{ref:r,className:l("flex flex-wrap gap-1 px-4 py-2 border-b border-border bg-muted",e),role:"toolbar","aria-label":"\uB9C8\uD06C\uB2E4\uC6B4 \uC11C\uC2DD",children:Xs.map(s=>jsxRuntime.jsx("button",{type:"button",onClick:()=>h(s),className:"p-2 text-muted-foreground hover:text-foreground hover:bg-muted rounded transition-colors",title:`${o[s.label]||s.label}${s.shortcut?` (${s.shortcut})`:""}`,"aria-label":o[s.label]||s.label,children:jsxRuntime.jsx(A,{name:s.icon,size:16})},s.icon))}):null});Oe.displayName="BlogEditorToolbar";var Fe=ee__default.default.forwardRef(({renderMarkdown:t,className:e},r)=>{var f,b;let{formData:o,activeLanguage:a,languages:i,labels:m}=U(),x=((f=i.find(g=>g.isPrimary))==null?void 0:f.key)||((b=i[0])==null?void 0:b.key),h=o.title[a]||o.title[x]||m.noTitle,s=o.content[a]||o.content[x]||"",y=ee__default.default.useMemo(()=>t?t(s):jsxRuntime.jsx("div",{dangerouslySetInnerHTML:{__html:Dt(s)}}),[s,t]);return jsxRuntime.jsxs("div",{ref:r,className:l("p-6",e),children:[jsxRuntime.jsx("h3",{className:"text-xl font-bold text-foreground mb-4",children:h}),jsxRuntime.jsx("div",{className:"prose dark:prose-invert max-w-none",children:y})]})});Fe.displayName="BlogEditorPreview";var qe=ee__default.default.forwardRef(({cancelLink:t,className:e},r)=>{let{labels:o,submitting:a,handleSave:i,handleCancel:m,isEditMode:x,autoSaveStatus:h,features:s}=U();return jsxRuntime.jsxs("div",{ref:r,className:l("flex items-center justify-end gap-3",e),children:[s.enableAutoSave&&h!=="idle"&&jsxRuntime.jsxs("span",{className:"text-sm text-muted-foreground flex items-center gap-1",children:[h==="saving"&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(A,{name:"loader",size:14,spin:true}),"\uC800\uC7A5 \uC911..."]}),h==="saved"&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(A,{name:"check",size:14}),"\uC790\uB3D9\uC800\uC7A5\uB428"]})]}),t||jsxRuntime.jsx("button",{type:"button",onClick:m,className:"px-4 py-2 text-foreground hover:text-foreground transition-colors",children:o.cancel}),jsxRuntime.jsx("button",{type:"button",onClick:()=>i(false),disabled:a,className:"px-4 py-2 border border-border rounded-lg hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:o.saveDraft}),jsxRuntime.jsx("button",{type:"button",onClick:()=>i(true),disabled:a,className:"px-6 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center gap-2 transition-colors",children:a?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(A,{name:"loader",size:16,spin:true}),o.saving]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(A,{name:"check",size:16}),x?o.update:o.publish]})})]})});qe.displayName="BlogEditorActions";var Ve=ee__default.default.forwardRef(({hint:t,className:e},r)=>{var d,n;let{labels:o,translating:a,translateSuccess:i,handleTranslate:m,formData:x,languages:h,features:s}=U();if(!s.enableTranslation)return null;let y=((d=h.find(u=>u.isPrimary))==null?void 0:d.key)||((n=h[0])==null?void 0:n.key),f=x.title[y]||"",b=x.content[y]||"",g=f&&b;return jsxRuntime.jsxs("div",{ref:r,className:l("px-6 py-3 bg-muted border-b border-border flex items-center justify-between",e),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx(A,{name:"sparkles",size:16}),jsxRuntime.jsx("span",{children:t||o.translateHint})]}),jsxRuntime.jsx("button",{type:"button",onClick:m,disabled:a||!g,className:l("inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg transition-colors",i?"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400":"bg-primary text-white hover:bg-primary/90 disabled:opacity-50 disabled:cursor-not-allowed"),children:a?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(A,{name:"loader",size:16,spin:true}),o.translating]}):i?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(A,{name:"check",size:16}),o.translateSuccess]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(A,{name:"sparkles",size:16}),o.translateButton]})})]})});Ve.displayName="BlogEditorTranslate";function ei({onBack:t,backLink:e,cancelLink:r,renderMarkdown:o,translateHint:a,maxWidth:i="max-w-4xl",className:m,children:x}){let{showPreview:h,error:s,variant:y,features:f}=U(),b=ee.useRef(null),g=l(y==="glass"?"bg-gradient-to-br from-gray-100 to-gray-200 dark:from-gray-900 dark:to-gray-800":y==="minimal"?"":"bg-muted"),d=l("rounded-xl overflow-hidden",y==="glass"?"bg-white/10 backdrop-blur-sm border border-white/20 dark:bg-slate-800/20 dark:border-slate-700/50":y==="minimal"?"bg-transparent border border-border":"bg-background");return x?jsxRuntime.jsx("div",{className:l(g,m),children:jsxRuntime.jsx("div",{className:l(i,"mx-auto px-4 py-8"),children:x})}):jsxRuntime.jsx("div",{className:l(g,m),children:jsxRuntime.jsxs("div",{className:l(i,"mx-auto px-4 py-8"),children:[jsxRuntime.jsx(Be,{onBack:t,backLink:e}),s&&jsxRuntime.jsx("div",{className:"mb-6 p-4 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded-lg text-red-600 dark:text-red-400",children:s}),jsxRuntime.jsxs("div",{className:"space-y-6",children:[jsxRuntime.jsx(He,{}),jsxRuntime.jsxs("div",{className:d,children:[f.enableTranslation&&jsxRuntime.jsx(Ve,{hint:a}),jsxRuntime.jsx(Ae,{}),h?jsxRuntime.jsx(Fe,{renderMarkdown:o}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[f.enableMarkdownToolbar&&jsxRuntime.jsx(Oe,{textareaRef:b}),jsxRuntime.jsx(ze,{textareaRef:b})]})]}),jsxRuntime.jsx(qe,{cancelLink:r})]})]})})}var ro=ee__default.default.forwardRef(({initialData:t,isEditMode:e,languages:r,defaultLanguage:o,labels:a,callbacks:i,features:m,variant:x,onBack:h,backLink:s,cancelLink:y,renderMarkdown:f,translateHint:b,maxWidth:g,className:d,children:n,autoSaveKey:u,autoSaveInterval:c},w)=>jsxRuntime.jsx(St,{initialData:t,isEditMode:e,languages:r,defaultLanguage:o,labels:a,callbacks:i,features:m,variant:x,autoSaveKey:u,autoSaveInterval:c,children:jsxRuntime.jsx("div",{ref:w,children:jsxRuntime.jsx(ei,{onBack:h,backLink:s,cancelLink:y,renderMarkdown:f,translateHint:b,maxWidth:g,className:d,children:n})})}));ro.displayName="BlogEditor";var de=ro;de.Header=Be;de.Metadata=He;de.LanguageTabs=Ae;de.Content=ze;de.Toolbar=Oe;de.Preview=Fe;de.Actions=qe;de.Translate=Ve;exports.AdvancedPageTransition=pe;exports.AnimatedGradient=ir;exports.BlogEditor=de;exports.BlogEditorActions=qe;exports.BlogEditorContent=ze;exports.BlogEditorHeader=Be;exports.BlogEditorLanguageTabs=Ae;exports.BlogEditorMetadata=He;exports.BlogEditorPreview=Fe;exports.BlogEditorProvider=St;exports.BlogEditorToolbar=Oe;exports.BlogEditorTranslate=Ve;exports.Carousel=pr;exports.CubePageTransition=uo;exports.DotNav=vr;exports.EmotionAnalysis=Rr;exports.EmotionButton=Je;exports.EmotionMeter=he;exports.EmotionSelector=kr;exports.FadePageTransition=ao;exports.FlipPageTransition=lo;exports.GlowCard=Jt;exports.HorizontalScroll=Tr;exports.ImageReveal=hr;exports.Marquee=Qt;exports.MorphPageTransition=co;exports.Parallax=Yt;exports.ScalePageTransition=io;exports.SlidePageTransition=so;exports.SpotlightCard=tr;exports.TextReveal=nr;exports.TiltCard=cr;exports.VideoBackground=ur;exports.ZoomPageTransition=po;exports.generateSlug=Rt;exports.getMarkdownPreview=Gs;exports.insertMarkdown=zt;exports.isValidSlug=zn;exports.normalizeSlug=Mt;exports.parseMarkdown=Dt;exports.stripMarkdown=eo;exports.useBlogEditor=U;exports.usePageTransition=fo;exports.usePageTransitionManager=vo;//# sourceMappingURL=advanced-motion.js.map
|
|
82
82
|
//# sourceMappingURL=advanced-motion.js.map
|