slidecanvas 1.1.4 → 1.1.5
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/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var ha=Object.create;var We=Object.defineProperty,ba=Object.defineProperties,fa=Object.getOwnPropertyDescriptor,xa=Object.getOwnPropertyDescriptors,va=Object.getOwnPropertyNames,$t=Object.getOwnPropertySymbols,wa=Object.getPrototypeOf,Gt=Object.prototype.hasOwnProperty,ya=Object.prototype.propertyIsEnumerable;var Zt=(m,a,c)=>a in m?We(m,a,{enumerable:!0,configurable:!0,writable:!0,value:c}):m[a]=c,z=(m,a)=>{for(var c in a||(a={}))Gt.call(a,c)&&Zt(m,c,a[c]);if($t)for(var c of $t(a))ya.call(a,c)&&Zt(m,c,a[c]);return m},R=(m,a)=>ba(m,xa(a));var Na=(m,a)=>{for(var c in a)We(m,c,{get:a[c],enumerable:!0})},Ot=(m,a,c,h)=>{if(a&&typeof a=="object"||typeof a=="function")for(let v of va(a))!Gt.call(m,v)&&v!==c&&We(m,v,{get:()=>a[v],enumerable:!(h=fa(a,v))||h.enumerable});return m};var He=(m,a,c)=>(c=m!=null?ha(wa(m)):{},Ot(a||!m||!m.__esModule?We(c,"default",{value:m,enumerable:!0}):c,m)),ka=m=>Ot(We({},"__esModule",{value:!0}),m);var ja={};Na(ja,{PptEditor:()=>Ha,PptxBlobExporter:()=>yt,PptxExporter:()=>qe,PptxParser:()=>Xe});module.exports=ka(ja);function ft(m,{insertAt:a}={}){if(!m||typeof document=="undefined")return;let c=document.head||document.getElementsByTagName("head")[0],h=document.createElement("style");h.type="text/css",a==="top"&&c.firstChild?c.insertBefore(h,c.firstChild):c.appendChild(h),h.styleSheet?h.styleSheet.cssText=m:h.appendChild(document.createTextNode(m))}ft(`@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Lato:wght@400;700&family=Open+Sans:wght@400;600;700&family=Poppins:wght@400;500;600;700&family=Roboto:wght@400;500;700&family=Roboto+Slab:wght@400;700&family=Playfair+Display:wght@400;700&family=Merriweather:wght@400;700&family=Nunito+Sans:wght@400;600;700&family=Montserrat:wght@400;600;700&family=Oswald:wght@400;500&family=Raleway:wght@400;600;700&family=Ubuntu:wght@400;500;700&family=Lora:wght@400;700&family=PT+Sans:wght@400;700&family=PT+Serif:wght@400;700&family=Play:wght@400;700&family=Arvo:wght@400;700&family=Kanit:wght@400;500;600&display=swap";/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;@layer theme{:root,:host{--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50: oklch(97.1% .013 17.38);--color-red-100: oklch(93.6% .032 17.717);--color-red-200: oklch(88.5% .062 18.334);--color-red-400: oklch(70.4% .191 22.216);--color-red-500: oklch(63.7% .237 25.331);--color-red-600: oklch(57.7% .245 27.325);--color-orange-50: oklch(98% .016 73.684);--color-orange-500: oklch(70.5% .213 47.604);--color-amber-500: oklch(76.9% .188 70.08);--color-green-500: oklch(72.3% .219 149.579);--color-emerald-50: oklch(97.9% .021 166.113);--color-emerald-100: oklch(95% .052 163.051);--color-emerald-500: oklch(69.6% .17 162.48);--color-emerald-600: oklch(59.6% .145 163.225);--color-emerald-700: oklch(50.8% .118 165.612);--color-teal-500: oklch(70.4% .14 182.503);--color-blue-50: oklch(97% .014 254.604);--color-blue-100: oklch(93.2% .032 255.585);--color-blue-400: oklch(70.7% .165 254.624);--color-blue-500: oklch(62.3% .214 259.815);--color-blue-600: oklch(54.6% .245 262.881);--color-blue-700: oklch(48.8% .243 264.376);--color-indigo-500: oklch(58.5% .233 277.117);--color-purple-50: oklch(97.7% .014 308.299);--color-purple-100: oklch(94.6% .033 307.174);--color-purple-300: oklch(82.7% .119 306.383);--color-purple-500: oklch(62.7% .265 303.9);--color-purple-600: oklch(55.8% .288 302.321);--color-purple-700: oklch(49.6% .265 301.924);--color-pink-500: oklch(65.6% .241 354.308);--color-slate-50: oklch(98.4% .003 247.858);--color-slate-100: oklch(96.8% .007 247.896);--color-slate-200: oklch(92.9% .013 255.508);--color-slate-300: oklch(86.9% .022 252.894);--color-slate-400: oklch(70.4% .04 256.788);--color-slate-500: oklch(55.4% .046 257.417);--color-slate-600: oklch(44.6% .043 257.281);--color-slate-700: oklch(37.2% .044 257.287);--color-slate-800: oklch(27.9% .041 260.031);--color-slate-900: oklch(20.8% .042 265.755);--color-black: #000;--color-white: #fff;--spacing: .25rem;--container-2xl: 42rem;--text-xs: .75rem;--text-xs--line-height: calc(1 / .75);--text-sm: .875rem;--text-sm--line-height: calc(1.25 / .875);--text-base: 1rem;--text-base--line-height: 1.5 ;--text-lg: 1.125rem;--text-lg--line-height: calc(1.75 / 1.125);--text-xl: 1.25rem;--text-xl--line-height: calc(1.75 / 1.25);--text-2xl: 1.5rem;--text-2xl--line-height: calc(2 / 1.5);--text-4xl: 2.25rem;--text-4xl--line-height: calc(2.5 / 2.25);--font-weight-normal: 400;--font-weight-medium: 500;--font-weight-semibold: 600;--font-weight-bold: 700;--font-weight-black: 900;--tracking-tighter: -.05em;--tracking-tight: -.025em;--tracking-wide: .025em;--tracking-wider: .05em;--tracking-widest: .1em;--leading-tight: 1.25;--leading-relaxed: 1.625;--radius-sm: .25rem;--radius-md: .375rem;--radius-lg: .5rem;--radius-xl: .75rem;--radius-2xl: 1rem;--radius-3xl: 1.5rem;--ease-out: cubic-bezier(0, 0, .2, 1);--animate-spin: spin 1s linear infinite;--blur-sm: 8px;--blur-md: 12px;--aspect-video: 16 / 9;--default-transition-duration: .15s;--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);--default-font-family: var(--font-sans);--default-mono-font-family: var(--font-mono)}}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings, normal);font-variation-settings:var(--default-font-variation-settings, normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::placeholder{color:currentcolor;@supports (color: color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.top-0{top:calc(var(--spacing) * 0)}.top-1{top:calc(var(--spacing) * 1)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-5{top:calc(var(--spacing) * 5)}.top-10{top:calc(var(--spacing) * 10)}.top-\\[24px\\]{top:24px}.top-full{top:100%}.right-0{right:calc(var(--spacing) * 0)}.right-1{right:calc(var(--spacing) * 1)}.right-1\\.5{right:calc(var(--spacing) * 1.5)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.right-6{right:calc(var(--spacing) * 6)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-1{bottom:calc(var(--spacing) * 1)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-6{bottom:calc(var(--spacing) * 6)}.bottom-8{bottom:calc(var(--spacing) * 8)}.bottom-10{bottom:calc(var(--spacing) * 10)}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing) * 0)}.left-1{left:calc(var(--spacing) * 1)}.left-1\\.5{left:calc(var(--spacing) * 1.5)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-4{left:calc(var(--spacing) * 4)}.z-10{z-index:10}.z-50{z-index:50}.z-\\[100\\]{z-index:100}.z-\\[1000\\]{z-index:1000}.z-\\[2000\\]{z-index:2000}.z-\\[2001\\]{z-index:2001}.z-\\[5000\\]{z-index:5000}.z-\\[9998\\]{z-index:9998}.z-\\[9999\\]{z-index:9999}.z-\\[10000\\]{z-index:10000}.z-\\[11000\\]{z-index:11000}.z-\\[99999\\]{z-index:99999}.col-span-1{grid-column:span 1 / span 1}.container{width:100%;@media(width>=40rem){max-width:40rem}@media(width>=48rem){max-width:48rem}@media(width>=64rem){max-width:64rem}@media(width>=80rem){max-width:80rem}@media(width>=96rem){max-width:96rem}}.mx-1{margin-inline:calc(var(--spacing) * 1)}.mx-1\\.5{margin-inline:calc(var(--spacing) * 1.5)}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mx-3{margin-inline:calc(var(--spacing) * 3)}.my-1{margin-block:calc(var(--spacing) * 1)}.my-auto{margin-block:auto}.-mt-1{margin-top:calc(var(--spacing) * -1)}.mt-0{margin-top:calc(var(--spacing) * 0)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mr-0{margin-right:calc(var(--spacing) * 0)}.mr-0\\.5{margin-right:calc(var(--spacing) * .5)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-0{margin-bottom:calc(var(--spacing) * 0)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.-ml-0{margin-left:calc(var(--spacing) * -0)}.-ml-0\\.5{margin-left:calc(var(--spacing) * -.5)}.ml-0{margin-left:calc(var(--spacing) * 0)}.ml-0\\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.table{display:table}.aspect-square{aspect-ratio:1 / 1}.aspect-video{aspect-ratio:var(--aspect-video)}.h-0{height:calc(var(--spacing) * 0)}.h-1{height:calc(var(--spacing) * 1)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-7\\.5{height:calc(var(--spacing) * 7.5)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-32{height:calc(var(--spacing) * 32)}.h-48{height:calc(var(--spacing) * 48)}.h-\\[1px\\]{height:1px}.h-\\[2\\.5px\\]{height:2.5px}.h-\\[4px\\]{height:4px}.h-\\[22px\\]{height:22px}.h-\\[28px\\]{height:28px}.h-full{height:100%}.h-screen{height:100vh}.max-h-\\[60vh\\]{max-height:60vh}.max-h-\\[90vh\\]{max-height:90vh}.max-h-\\[200px\\]{max-height:200px}.max-h-\\[250px\\]{max-height:250px}.min-h-\\[56px\\]{min-height:56px}.min-h-\\[300px\\]{min-height:300px}.min-h-screen{min-height:100vh}.w-1{width:calc(var(--spacing) * 1)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-15{width:calc(var(--spacing) * 15)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-36{width:calc(var(--spacing) * 36)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-60{width:calc(var(--spacing) * 60)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-96{width:calc(var(--spacing) * 96)}.w-\\[1px\\]{width:1px}.w-\\[15px\\]{width:15px}.w-\\[32px\\]{width:32px}.w-\\[480px\\]{width:480px}.w-\\[500px\\]{width:500px}.w-\\[600px\\]{width:600px}.w-full{width:100%}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[90vw\\]{max-width:90vw}.max-w-\\[300px\\]{max-width:300px}.max-w-\\[400px\\]{max-width:400px}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\\[64px\\]{min-width:64px}.min-w-\\[68px\\]{min-width:68px}.min-w-\\[80px\\]{min-width:80px}.min-w-\\[180px\\]{min-width:180px}.min-w-\\[280px\\]{min-width:280px}.min-w-fit{min-width:fit-content}.flex-1{flex:1}.shrink-0{flex-shrink:0}.origin-bottom-left{transform-origin:0 100%}.origin-center{transform-origin:center}.origin-top-left{transform-origin:0 0}.-translate-x-1{--tw-translate-x: calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1{--tw-translate-y: calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\\[1px\\]{--tw-translate-y: 1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-75{--tw-scale-x: 75%;--tw-scale-y: 75%;--tw-scale-z: 75%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-105{--tw-scale-x: 105%;--tw-scale-y: 105%;--tw-scale-z: 105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-110{--tw-scale-x: 110%;--tw-scale-y: 110%;--tw-scale-z: 110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.appearance-none{appearance:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.justify-stretch{justify-content:stretch}.gap-0{gap:calc(var(--spacing) * 0)}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.space-y-2{:where(&>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}}.space-y-4{:where(&>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}}.space-y-6{:where(&>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}}.self-start{align-self:flex-start}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[2\\.5rem\\]{border-radius:2.5rem}.rounded-\\[3px\\]{border-radius:3px}.rounded-full{border-radius:calc(infinity * 1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-l-\\[3px\\]{border-top-left-radius:3px;border-bottom-left-radius:3px}.rounded-l-lg{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-l-md{border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.rounded-r-\\[3px\\]{border-top-right-radius:3px;border-bottom-right-radius:3px}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.rounded-r-md{border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md)}.rounded-b-xl{border-bottom-right-radius:var(--radius-xl);border-bottom-left-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-\\[1\\.5px\\]{border-style:var(--tw-border-style);border-width:1.5px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style: dashed;border-style:dashed}.border-none{--tw-border-style: none;border-style:none}.border-solid{--tw-border-style: solid;border-style:solid}.border-black{border-color:var(--color-black)}.border-emerald-100{border-color:var(--color-emerald-100)}.border-emerald-100\\/50{border-color:color-mix(in srgb,oklch(95% .052 163.051) 50%,transparent);@supports (color: color-mix(in lab,red,red)){border-color:color-mix(in oklab,var(--color-emerald-100) 50%,transparent)}}.border-purple-100{border-color:var(--color-purple-100)}.border-red-200{border-color:var(--color-red-200)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-100\\/50{border-color:color-mix(in srgb,oklch(96.8% .007 247.896) 50%,transparent);@supports (color: color-mix(in lab,red,red)){border-color:color-mix(in oklab,var(--color-slate-100) 50%,transparent)}}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-200\\/60{border-color:color-mix(in srgb,oklch(92.9% .013 255.508) 60%,transparent);@supports (color: color-mix(in lab,red,red)){border-color:color-mix(in oklab,var(--color-slate-200) 60%,transparent)}}.border-slate-300{border-color:var(--color-slate-300)}.border-transparent{border-color:transparent}.border-white{border-color:var(--color-white)}.border-white\\/10{border-color:color-mix(in srgb,#fff 10%,transparent);@supports (color: color-mix(in lab,red,red)){border-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.bg-\\[\\#0A0A0A\\]{background-color:#0a0a0a}.bg-black{background-color:var(--color-black)}.bg-black\\/20{background-color:color-mix(in srgb,#000 20%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-black\\/40{background-color:color-mix(in srgb,#000 40%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.bg-black\\/60{background-color:color-mix(in srgb,#000 60%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-100\\/50{background-color:color-mix(in srgb,oklch(93.2% .032 255.585) 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-blue-100) 50%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-50\\/50{background-color:color-mix(in srgb,oklch(97.9% .021 166.113) 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-emerald-50) 50%,transparent)}}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-orange-50{background-color:var(--color-orange-50)}.bg-purple-50{background-color:var(--color-purple-50)}.bg-purple-50\\/50{background-color:color-mix(in srgb,oklch(97.7% .014 308.299) 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-purple-50) 50%,transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\\/50{background-color:color-mix(in srgb,oklch(98.4% .003 247.858) 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-slate-50) 50%,transparent)}}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-100\\/50{background-color:color-mix(in srgb,oklch(96.8% .007 247.896) 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-slate-100) 50%,transparent)}}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-200\\/50{background-color:color-mix(in srgb,oklch(92.9% .013 255.508) 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-slate-200) 50%,transparent)}}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\\/40{background-color:color-mix(in srgb,oklch(20.8% .042 265.755) 40%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-slate-900) 40%,transparent)}}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.bg-white\\/10{background-color:color-mix(in srgb,#fff 10%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.bg-white\\/50{background-color:color-mix(in srgb,#fff 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.bg-white\\/80{background-color:color-mix(in srgb,#fff 80%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.bg-gradient-to-b{--tw-gradient-position: to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-black{--tw-gradient-from: var(--color-black);--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\\/60{--tw-gradient-from: color-mix(in srgb, #000 60%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-gradient-from: color-mix(in oklab, var(--color-black) 60%, transparent)}--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to: transparent;--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.fill-purple-300{fill:var(--color-purple-300)}.fill-slate-700{fill:var(--color-slate-700)}.p-0{padding:calc(var(--spacing) * 0)}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-10{padding:calc(var(--spacing) * 10)}.p-12{padding:calc(var(--spacing) * 12)}.px-0{padding-inline:calc(var(--spacing) * 0)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-10{padding-inline:calc(var(--spacing) * 10)}.py-0{padding-block:calc(var(--spacing) * 0)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.pt-0{padding-top:calc(var(--spacing) * 0)}.pt-0\\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-8{padding-top:calc(var(--spacing) * 8)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-5{padding-right:calc(var(--spacing) * 5)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-12{padding-right:calc(var(--spacing) * 12)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-11{padding-left:calc(var(--spacing) * 11)}.pl-12{padding-left:calc(var(--spacing) * 12)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading, var(--text-2xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading, var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading, var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading, var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading, var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading, var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading, var(--text-xs--line-height))}.text-\\[6px\\]{font-size:6px}.text-\\[7px\\]{font-size:7px}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12\\.5px\\]{font-size:12.5px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[14px\\]{font-size:14px}.text-\\[16px\\]{font-size:16px}.text-\\[17px\\]{font-size:17px}.leading-none{--tw-leading: 1;line-height:1}.leading-relaxed{--tw-leading: var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading: var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight: var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight: var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight: var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight: var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight: var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.2em\\]{--tw-tracking: .2em;letter-spacing:.2em}.tracking-\\[0\\.15em\\]{--tw-tracking: .15em;letter-spacing:.15em}.tracking-tight{--tw-tracking: var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking: var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wide{--tw-tracking: var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking: var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking: var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-500{color:var(--color-amber-500)}.text-black{color:var(--color-black)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-600\\/70{color:color-mix(in srgb,oklch(59.6% .145 163.225) 70%,transparent);@supports (color: color-mix(in lab,red,red)){color:color-mix(in oklab,var(--color-emerald-600) 70%,transparent)}}.text-emerald-700{color:var(--color-emerald-700)}.text-green-500{color:var(--color-green-500)}.text-indigo-500{color:var(--color-indigo-500)}.text-orange-500{color:var(--color-orange-500)}.text-pink-500{color:var(--color-pink-500)}.text-purple-500{color:var(--color-purple-500)}.text-purple-600{color:var(--color-purple-600)}.text-purple-700{color:var(--color-purple-700)}.text-red-400{color:var(--color-red-400)}.text-red-400\\/80{color:color-mix(in srgb,oklch(70.4% .191 22.216) 80%,transparent);@supports (color: color-mix(in lab,red,red)){color:color-mix(in oklab,var(--color-red-400) 80%,transparent)}}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-slate-200{color:var(--color-slate-200)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-teal-500{color:var(--color-teal-500)}.text-white{color:var(--color-white)}.text-white\\/50{color:color-mix(in srgb,#fff 50%,transparent);@supports (color: color-mix(in lab,red,red)){color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.text-white\\/80{color:color-mix(in srgb,#fff 80%,transparent);@supports (color: color-mix(in lab,red,red)){color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0%}.opacity-25{opacity:25%}.opacity-40{opacity:40%}.opacity-50{opacity:50%}.opacity-75{opacity:75%}.opacity-100{opacity:100%}.shadow-2xl{--tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / .25));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_20px_50px_rgba\\(0\\,0\\,0\\,0\\.15\\)\\]{--tw-shadow: 0 20px 50px var(--tw-shadow-color, rgba(0,0,0,.15));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 var(--tw-shadow-color, rgb(0 0 0 / .05));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 8px 10px -6px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-4{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-black{--tw-shadow-color: #000;@supports (color: color-mix(in lab,red,red)){--tw-shadow-color: color-mix(in oklab, var(--color-black) var(--tw-shadow-alpha), transparent)}}.shadow-black\\/80{--tw-shadow-color: color-mix(in srgb, #000 80%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--color-black) 80%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-blue-500{--tw-shadow-color: oklch(62.3% .214 259.815);@supports (color: color-mix(in lab,red,red)){--tw-shadow-color: color-mix(in oklab, var(--color-blue-500) var(--tw-shadow-alpha), transparent)}}.shadow-blue-500\\/20{--tw-shadow-color: color-mix(in srgb, oklch(62.3% .214 259.815) 20%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--color-blue-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500{--tw-shadow-color: oklch(69.6% .17 162.48);@supports (color: color-mix(in lab,red,red)){--tw-shadow-color: color-mix(in oklab, var(--color-emerald-500) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500\\/20{--tw-shadow-color: color-mix(in srgb, oklch(69.6% .17 162.48) 20%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--color-emerald-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-black{--tw-ring-color: var(--color-black)}.ring-black\\/5{--tw-ring-color: color-mix(in srgb, #000 5%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-ring-color: color-mix(in oklab, var(--color-black) 5%, transparent)}}.ring-purple-100{--tw-ring-color: var(--color-purple-100)}.ring-white{--tw-ring-color: var(--color-white)}.backdrop-blur-\\[1px\\]{--tw-backdrop-blur: blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-\\[2px\\]{--tw-backdrop-blur: blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur: blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur: blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.duration-150{--tw-duration: .15s;transition-duration:.15s}.duration-200{--tw-duration: .2s;transition-duration:.2s}.duration-300{--tw-duration: .3s;transition-duration:.3s}.duration-500{--tw-duration: .5s;transition-duration:.5s}.duration-700{--tw-duration: .7s;transition-duration:.7s}.ease-out{--tw-ease: var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style: none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.group-focus-within\\:text-slate-600{&:is(:where(.group):focus-within *){color:var(--color-slate-600)}}.group-hover\\:scale-105{&:is(:where(.group):hover *){@media(hover:hover){--tw-scale-x: 105%;--tw-scale-y: 105%;--tw-scale-z: 105%;scale:var(--tw-scale-x) var(--tw-scale-y)}}}.group-hover\\:scale-110{&:is(:where(.group):hover *){@media(hover:hover){--tw-scale-x: 110%;--tw-scale-y: 110%;--tw-scale-z: 110%;scale:var(--tw-scale-x) var(--tw-scale-y)}}}.group-hover\\:bg-blue-50{&:is(:where(.group):hover *){@media(hover:hover){background-color:var(--color-blue-50)}}}.group-hover\\:bg-blue-100{&:is(:where(.group):hover *){@media(hover:hover){background-color:var(--color-blue-100)}}}.group-hover\\:bg-blue-600{&:is(:where(.group):hover *){@media(hover:hover){background-color:var(--color-blue-600)}}}.group-hover\\:bg-emerald-50{&:is(:where(.group):hover *){@media(hover:hover){background-color:var(--color-emerald-50)}}}.group-hover\\:bg-emerald-600{&:is(:where(.group):hover *){@media(hover:hover){background-color:var(--color-emerald-600)}}}.group-hover\\:bg-purple-600{&:is(:where(.group):hover *){@media(hover:hover){background-color:var(--color-purple-600)}}}.group-hover\\:bg-red-500{&:is(:where(.group):hover *){@media(hover:hover){background-color:var(--color-red-500)}}}.group-hover\\:bg-slate-200{&:is(:where(.group):hover *){@media(hover:hover){background-color:var(--color-slate-200)}}}.group-hover\\:fill-slate-900{&:is(:where(.group):hover *){@media(hover:hover){fill:var(--color-slate-900)}}}.group-hover\\:text-blue-600{&:is(:where(.group):hover *){@media(hover:hover){color:var(--color-blue-600)}}}.group-hover\\:text-slate-700{&:is(:where(.group):hover *){@media(hover:hover){color:var(--color-slate-700)}}}.group-hover\\:text-slate-900{&:is(:where(.group):hover *){@media(hover:hover){color:var(--color-slate-900)}}}.group-hover\\:text-white{&:is(:where(.group):hover *){@media(hover:hover){color:var(--color-white)}}}.group-hover\\:opacity-100{&:is(:where(.group):hover *){@media(hover:hover){opacity:100%}}}.group-hover\\:shadow-sm{&:is(:where(.group):hover *){@media(hover:hover){--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}}.placeholder\\:text-slate-400{&::placeholder{color:var(--color-slate-400)}}.hover\\:border-blue-400{&:hover{@media(hover:hover){border-color:var(--color-blue-400)}}}.hover\\:border-slate-100{&:hover{@media(hover:hover){border-color:var(--color-slate-100)}}}.hover\\:border-slate-200{&:hover{@media(hover:hover){border-color:var(--color-slate-200)}}}.hover\\:border-slate-300{&:hover{@media(hover:hover){border-color:var(--color-slate-300)}}}.hover\\:bg-black{&:hover{@media(hover:hover){background-color:var(--color-black)}}}.hover\\:bg-blue-50{&:hover{@media(hover:hover){background-color:var(--color-blue-50)}}}.hover\\:bg-blue-50\\/50{&:hover{@media(hover:hover){background-color:color-mix(in srgb,oklch(97% .014 254.604) 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-blue-50) 50%,transparent)}}}}.hover\\:bg-blue-700{&:hover{@media(hover:hover){background-color:var(--color-blue-700)}}}.hover\\:bg-emerald-700{&:hover{@media(hover:hover){background-color:var(--color-emerald-700)}}}.hover\\:bg-purple-50{&:hover{@media(hover:hover){background-color:var(--color-purple-50)}}}.hover\\:bg-red-50{&:hover{@media(hover:hover){background-color:var(--color-red-50)}}}.hover\\:bg-red-100{&:hover{@media(hover:hover){background-color:var(--color-red-100)}}}.hover\\:bg-slate-50{&:hover{@media(hover:hover){background-color:var(--color-slate-50)}}}.hover\\:bg-slate-100{&:hover{@media(hover:hover){background-color:var(--color-slate-100)}}}.hover\\:bg-slate-200{&:hover{@media(hover:hover){background-color:var(--color-slate-200)}}}.hover\\:bg-white{&:hover{@media(hover:hover){background-color:var(--color-white)}}}.hover\\:bg-white\\/20{&:hover{@media(hover:hover){background-color:color-mix(in srgb,#fff 20%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}}}.hover\\:text-blue-500{&:hover{@media(hover:hover){color:var(--color-blue-500)}}}.hover\\:text-blue-600{&:hover{@media(hover:hover){color:var(--color-blue-600)}}}.hover\\:text-purple-600{&:hover{@media(hover:hover){color:var(--color-purple-600)}}}.hover\\:text-red-500{&:hover{@media(hover:hover){color:var(--color-red-500)}}}.hover\\:text-slate-500{&:hover{@media(hover:hover){color:var(--color-slate-500)}}}.hover\\:text-slate-600{&:hover{@media(hover:hover){color:var(--color-slate-600)}}}.hover\\:text-slate-700{&:hover{@media(hover:hover){color:var(--color-slate-700)}}}.hover\\:text-white{&:hover{@media(hover:hover){color:var(--color-white)}}}.hover\\:opacity-100{&:hover{@media(hover:hover){opacity:100%}}}.hover\\:shadow-md{&:hover{@media(hover:hover){--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}}.focus\\:border-blue-500{&:focus{border-color:var(--color-blue-500)}}.focus\\:border-slate-400{&:focus{border-color:var(--color-slate-400)}}.focus\\:ring-2{&:focus{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:ring-4{&:focus{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:ring-blue-500\\/10{&:focus{--tw-ring-color: color-mix(in srgb, oklch(62.3% .214 259.815) 10%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-ring-color: color-mix(in oklab, var(--color-blue-500) 10%, transparent)}}}.focus\\:ring-blue-500\\/20{&:focus{--tw-ring-color: color-mix(in srgb, oklch(62.3% .214 259.815) 20%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-ring-color: color-mix(in oklab, var(--color-blue-500) 20%, transparent)}}}.focus\\:ring-slate-400\\/5{&:focus{--tw-ring-color: color-mix(in srgb, oklch(70.4% .04 256.788) 5%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-ring-color: color-mix(in oklab, var(--color-slate-400) 5%, transparent)}}}.focus\\:outline-none{&:focus{--tw-outline-style: none;outline-style:none}}.active\\:scale-95{&:active{--tw-scale-x: 95%;--tw-scale-y: 95%;--tw-scale-z: 95%;scale:var(--tw-scale-x) var(--tw-scale-y)}}.active\\:scale-\\[0\\.98\\]{&:active{scale:.98}}.active\\:cursor-grabbing{&:active{cursor:grabbing}}.disabled\\:cursor-not-allowed{&:disabled{cursor:not-allowed}}.disabled\\:bg-slate-100{&:disabled{background-color:var(--color-slate-100)}}.disabled\\:bg-slate-300{&:disabled{background-color:var(--color-slate-300)}}.disabled\\:text-slate-400{&:disabled{color:var(--color-slate-400)}}.disabled\\:opacity-20{&:disabled{opacity:20%}}.disabled\\:opacity-40{&:disabled{opacity:40%}}.disabled\\:opacity-50{&:disabled{opacity:50%}}.disabled\\:active\\:scale-100{&:disabled{&:active{--tw-scale-x: 100%;--tw-scale-y: 100%;--tw-scale-z: 100%;scale:var(--tw-scale-x) var(--tw-scale-y)}}}.md\\:space-y-8{@media(width>=48rem){:where(&>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}}}.md\\:p-12{@media(width>=48rem){padding:calc(var(--spacing) * 12)}}}@keyframes blob{0%{transform:translate(0) scale(1)}33%{transform:translate(30px,-50px) scale(1.1)}66%{transform:translate(-20px,20px) scale(.9)}to{transform:translate(0) scale(1)}}.animate-blob{animation:blob 7s infinite}.animation-delay-2000{animation-delay:2s}.animation-delay-4000{animation-delay:4s}@property --tw-translate-x{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-translate-y{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-translate-z{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-scale-x{syntax: "*"; inherits: false; initial-value: 1;}@property --tw-scale-y{syntax: "*"; inherits: false; initial-value: 1;}@property --tw-scale-z{syntax: "*"; inherits: false; initial-value: 1;}@property --tw-rotate-x{syntax: "*"; inherits: false;}@property --tw-rotate-y{syntax: "*"; inherits: false;}@property --tw-rotate-z{syntax: "*"; inherits: false;}@property --tw-skew-x{syntax: "*"; inherits: false;}@property --tw-skew-y{syntax: "*"; inherits: false;}@property --tw-space-y-reverse{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-border-style{syntax: "*"; inherits: false; initial-value: solid;}@property --tw-gradient-position{syntax: "*"; inherits: false;}@property --tw-gradient-from{syntax: "<color>"; inherits: false; initial-value: #0000;}@property --tw-gradient-via{syntax: "<color>"; inherits: false; initial-value: #0000;}@property --tw-gradient-to{syntax: "<color>"; inherits: false; initial-value: #0000;}@property --tw-gradient-stops{syntax: "*"; inherits: false;}@property --tw-gradient-via-stops{syntax: "*"; inherits: false;}@property --tw-gradient-from-position{syntax: "<length-percentage>"; inherits: false; initial-value: 0%;}@property --tw-gradient-via-position{syntax: "<length-percentage>"; inherits: false; initial-value: 50%;}@property --tw-gradient-to-position{syntax: "<length-percentage>"; inherits: false; initial-value: 100%;}@property --tw-leading{syntax: "*"; inherits: false;}@property --tw-font-weight{syntax: "*"; inherits: false;}@property --tw-tracking{syntax: "*"; inherits: false;}@property --tw-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: "*"; inherits: false;}@property --tw-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: "*"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: "*"; inherits: false;}@property --tw-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: "*"; inherits: false;}@property --tw-inset-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: "*"; inherits: false;}@property --tw-ring-offset-width{syntax: "<length>"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: "*"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-backdrop-blur{syntax: "*"; inherits: false;}@property --tw-backdrop-brightness{syntax: "*"; inherits: false;}@property --tw-backdrop-contrast{syntax: "*"; inherits: false;}@property --tw-backdrop-grayscale{syntax: "*"; inherits: false;}@property --tw-backdrop-hue-rotate{syntax: "*"; inherits: false;}@property --tw-backdrop-invert{syntax: "*"; inherits: false;}@property --tw-backdrop-opacity{syntax: "*"; inherits: false;}@property --tw-backdrop-saturate{syntax: "*"; inherits: false;}@property --tw-backdrop-sepia{syntax: "*"; inherits: false;}@property --tw-duration{syntax: "*"; inherits: false;}@property --tw-ease{syntax: "*"; inherits: false;}@keyframes spin{to{transform:rotate(360deg)}}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x: 0;--tw-translate-y: 0;--tw-translate-z: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-scale-z: 1;--tw-rotate-x: initial;--tw-rotate-y: initial;--tw-rotate-z: initial;--tw-skew-x: initial;--tw-skew-y: initial;--tw-space-y-reverse: 0;--tw-border-style: solid;--tw-gradient-position: initial;--tw-gradient-from: #0000;--tw-gradient-via: #0000;--tw-gradient-to: #0000;--tw-gradient-stops: initial;--tw-gradient-via-stops: initial;--tw-gradient-from-position: 0%;--tw-gradient-via-position: 50%;--tw-gradient-to-position: 100%;--tw-leading: initial;--tw-font-weight: initial;--tw-tracking: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-backdrop-blur: initial;--tw-backdrop-brightness: initial;--tw-backdrop-contrast: initial;--tw-backdrop-grayscale: initial;--tw-backdrop-hue-rotate: initial;--tw-backdrop-invert: initial;--tw-backdrop-opacity: initial;--tw-backdrop-saturate: initial;--tw-backdrop-sepia: initial;--tw-duration: initial;--tw-ease: initial}}}
|
|
3
|
-
`);var B=require("react");var de=He(require("react")),w=require("lucide-react");var Wt=require("clsx"),qt=require("tailwind-merge");function I(...m){return(0,qt.twMerge)((0,Wt.clsx)(m))}var e=require("react/jsx-runtime"),Ca=["Inter","Lato","Open Sans","Poppins","Roboto","Roboto Slab","Georgia","Playfair Display","Merriweather","Nunito Sans","Montserrat","Oswald","Raleway","Ubuntu","Lora","PT Sans","PT Serif","Play","Arvo","Kanit","Times New Roman","Arial"],La=[12,14,16,18,20,24,28,32,36,48,64,72,96],Sa=[{name:"Basic Shapes",shapes:["rect","circle","triangle","rightTriangle","rhombus","parallelogram","trapezoid","pentagon","hexagon","heptagon","octagon","heart","smiley","sun","moon"]},{name:"Arrows",shapes:["arrowRight","arrowLeft","arrowUp","arrowDown","arrowLeftRight","arrowUpDown"]},{name:"Stars & Symbols",shapes:["star4","star5","star6","star8","cloud","lightning"]},{name:"Equation Shapes",shapes:["plus","minus","multiply","divide","equal"]}],za=({type:m,className:a})=>{switch(m){case"rect":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",fill:"currentColor"})});case"circle":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("circle",{cx:"12",cy:"12",r:"9",fill:"currentColor"})});case"triangle":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 4L20 18H4L12 4Z",fill:"currentColor"})});case"rightTriangle":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M4 4V20H20L4 4Z",fill:"currentColor"})});case"rhombus":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 4L20 12L12 20L4 12L12 4Z",fill:"currentColor"})});case"parallelogram":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M7 4H21L17 20H3L7 4Z",fill:"currentColor"})});case"trapezoid":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M6 4H18L21 20H3L6 4Z",fill:"currentColor"})});case"pentagon":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 3L21 9V19H3V9L12 3Z",fill:"currentColor"})});case"hexagon":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 3L20 7.5V16.5L12 21L4 16.5V7.5L12 3Z",fill:"currentColor"})});case"heptagon":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 3L18.5 6L21 13L16 20H8L3 13L5.5 6L12 3Z",fill:"currentColor"})});case"octagon":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M8.5 3H15.5L21 8.5V15.5L15.5 21H8.5L3 15.5V8.5L8.5 3Z",fill:"currentColor"})});case"heart":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z",fill:"currentColor"})});case"smiley":return(0,e.jsxs)("svg",{viewBox:"0 0 24 24",className:a,children:[(0,e.jsx)("circle",{cx:"12",cy:"12",r:"9",fill:"currentColor",fillOpacity:"0.2",stroke:"currentColor",strokeWidth:"2"}),(0,e.jsx)("circle",{cx:"9",cy:"9",r:"1.5",fill:"currentColor"}),(0,e.jsx)("circle",{cx:"15",cy:"9",r:"1.5",fill:"currentColor"}),(0,e.jsx)("path",{d:"M8 15C8 15 9.5 17 12 17C14.5 17 16 15 16 15",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]});case"sun":return(0,e.jsxs)("svg",{viewBox:"0 0 24 24",className:a,children:[(0,e.jsx)("circle",{cx:"12",cy:"12",r:"5",fill:"currentColor"}),(0,e.jsx)("path",{d:"M12 2V4M12 20V22M4 12H2M22 12H20M19.07 4.93L17.66 6.34M6.34 17.66L4.93 19.07M4.93 4.93L6.34 6.34M17.66 17.66L19.07 19.07",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]});case"moon":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 3a9 9 0 1 0 9 9 7 7 0 0 1-9-9",fill:"currentColor"})});case"arrowRight":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M4 11h11.5l-3.5-3.5 1.5-1.5 6 6-6 6-1.5-1.5 3.5-3.5H4z",fill:"currentColor"})});case"arrowLeft":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M20 11H8.5l3.5-3.5L10.5 6l-6 6 6 6 1.5-1.5-3.5-3.5H20z",fill:"currentColor"})});case"arrowUp":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M13 20V8.5l3.5 3.5 1.5-1.5-6-6-6 6 1.5 1.5 3.5-3.5V20z",fill:"currentColor"})});case"arrowDown":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M11 4v11.5l-3.5-3.5-1.5 1.5 6 6 6-6-1.5-1.5-3.5 3.5V4z",fill:"currentColor"})});case"arrowLeftRight":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M4 12l4-4v3h8V8l4 4-4 4v-3H8v3l-4-4z",fill:"currentColor"})});case"arrowUpDown":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 4l-4 4h3v8H8l4 4 4-4h-3V8h3l-4-4z",fill:"currentColor"})});case"star4":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 2l2 8 8 2-8 2-2 8-2-8-8-2 8-2 2-8z",fill:"currentColor"})});case"star5":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 2l2.5 7.5H22l-6 4.5 2.5 7.5-6.5-4.5-6.5 4.5 2.5-7.5-6-4.5h7.5L12 2z",fill:"currentColor"})});case"star6":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 2l3 5 6-1-4 4.5 2 6.5-7-3-7 3 2-6.5-4-4.5 6 1 3-5z",fill:"currentColor"})});case"star8":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 2l2 4 4-2-2 4 4 2-4 2 2 4-4-2-2 4-2-4-4 2 2-4-4-2 4-2-2-4 4 2 2-4z",fill:"currentColor"})});case"cloud":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M17.5 19c-3 0-5.5-2.5-5.5-5.5 0-.2 0-.4.1-.6-2-.8-3.6-2.5-4.1-4.7C6.5 7.4 5 6 3 6c-1.7 0-3 1.3-3 3s1.3 3 3 3c.4 0 .8-.1 1.2-.2C4.1 13 5 14.5 6.5 15.5c.3 1.8 1.4 3.4 3 4.3.4.2.8.3 1.2.4 1.2.4 2.5.6 3.8.6 4.4 0 8-3.6 8-8s-3.6-8-8-8c-.4 0-.8 0-1.2.1-1.2.2-2.3.7-3.2 1.5C11 4.2 12.4 3.5 14 3.5c4.1 0 7.5 3.4 7.5 7.5s-1.8 7.5-4 8z",fill:"currentColor",transform:"scale(0.8) translate(3,3)"})});case"lightning":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M13 2L3 14h9v8l10-12h-9l3-8z",fill:"currentColor"})});case"plus":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z",fill:"currentColor"})});case"minus":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})});case"multiply":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z",fill:"currentColor"})});case"divide":return(0,e.jsxs)("svg",{viewBox:"0 0 24 24",className:a,children:[(0,e.jsx)("circle",{cx:"12",cy:"7",r:"2",fill:"currentColor"}),(0,e.jsx)("circle",{cx:"12",cy:"17",r:"2",fill:"currentColor"}),(0,e.jsx)("rect",{x:"5",y:"11",width:"14",height:"2",fill:"currentColor"})]});case"equal":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M19 10H5V8h14v2zm0 6H5v-2h14v2z",fill:"currentColor"})});default:return(0,e.jsx)("div",{className:"w-6 h-6 bg-slate-200 rounded-sm"})}},Ia=({onAddShape:m,uiScale:a})=>{let[c,h]=(0,de.useState)(!1);return de.default.useEffect(()=>(window._toggleShapesMenu=()=>h(!c),()=>{window._toggleShapesMenu=void 0}),[c]),c?(0,e.jsx)("div",{className:"absolute top-full left-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-2xl p-4 overflow-y-auto z-[100] animate-in fade-in zoom-in-95 duration-200",style:{width:`${320*a}px`,maxHeight:`${480*a}px`},children:(0,e.jsx)("div",{className:"flex flex-col gap-6",children:Sa.map(v=>(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsx)("span",{className:"text-[10px] font-black uppercase tracking-widest text-slate-400 px-1",style:{fontSize:`${10*a}px`},children:v.name}),(0,e.jsx)("div",{className:"grid grid-cols-5 gap-1",children:v.shapes.map(s=>(0,e.jsx)("button",{onClick:()=>{m(s),h(!1)},className:"aspect-square hover:bg-slate-50 rounded-lg flex items-center justify-center border border-transparent hover:border-slate-100 transition-all group p-1",title:s,children:(0,e.jsx)("div",{className:"w-full h-full bg-slate-100 rounded-sm group-hover:bg-blue-100 group-hover:scale-110 transition-all flex items-center justify-center overflow-hidden p-1.5",children:(0,e.jsx)(za,{type:s,className:"w-full h-full text-slate-400 group-hover:text-blue-600 transition-colors"})})},s))})]},v.name))})}):null},Xt=({onAddText:m,onAddImage:a,onAddShape:c,onAddSlide:h,onExport:v,onFormatText:s,onDeleteElement:j,onApplyLayout:P,onPlay:M,selectedElement:r,appName:T,onAiAction:g,onAiResponseAction:S,aiResponse:V,isAiLoading:L,onNewPresentation:y,onLoadPresentation:b,appBgColor:Z="#B7472A",uiScale:U,source:J,onGenerateImageClick:te,onGenerateInfographicClick:N,onUploadImageClick:k})=>{let K=de.default.useRef(null),[_,X]=(0,de.useState)("Home"),[Q,n]=(0,de.useState)(!1),[f,o]=(0,de.useState)(!1),[x,C]=(0,de.useState)(!1),[$,D]=(0,de.useState)(!1),[se,ne]=(0,de.useState)("file"),[G,xe]=(0,de.useState)(""),[ae,E]=(0,de.useState)(!1),[W,oe]=(0,de.useState)(!1),[Se,me]=(0,de.useState)(!1),[Ne,ve]=(0,de.useState)(!1),fe=H=>{if(!O||!r)return;let ie=r.content||"",he=ie;switch(H){case"sentence":he=ie.charAt(0).toUpperCase()+ie.slice(1).toLowerCase();break;case"lowercase":he=ie.toLowerCase();break;case"uppercase":he=ie.toUpperCase();break;case"capitalize":he=ie.split(" ").map(ke=>ke.charAt(0).toUpperCase()+ke.slice(1).toLowerCase()).join(" ");break;case"toggle":he=ie.split("").map(ke=>ke===ke.toUpperCase()?ke.toLowerCase():ke.toUpperCase()).join("");break}s({content:he}),E(!1)},O=(r==null?void 0:r.type)==="text",tt=(r==null?void 0:r.type)==="shape",at=(r==null?void 0:r.type)==="image",rt="#B7472A";return(0,e.jsxs)("div",{className:"flex flex-col border-b border-slate-200 bg-white z-50 select-none",style:{fontSize:`${12*U}px`},children:[(0,e.jsxs)("div",{className:"bg-white flex items-center justify-stretch border-b border-slate-200/60 transition-all duration-300 relative z-[1000]",style:{height:`${140*U}px`,overflow:"visible"},children:[(0,e.jsxs)("div",{className:I("flex-1 flex flex-col items-center border-r border-slate-100 px-3 gap-1 h-full py-2",U<.84?"min-w-0":"min-w-fit"),children:[(0,e.jsxs)("div",{className:"flex items-center justify-center gap-1 my-auto",children:[(0,e.jsxs)("button",{onClick:h,className:"flex flex-col items-center justify-center gap-1.5 px-3 py-1.5 hover:bg-slate-50 rounded-lg group transition-all min-w-[64px]",children:[(0,e.jsx)("div",{className:"bg-orange-50 p-1.5 rounded-lg group-hover:scale-110 transition-transform",children:(0,e.jsx)(w.Plus,{size:20,style:{color:Z}})}),(0,e.jsx)("span",{className:"text-[10px] font-bold text-slate-700",children:"New Slide"})]}),(0,e.jsx)("div",{className:"w-[1px] h-10 bg-slate-100 mx-1"}),(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsxs)("button",{onClick:()=>n(!Q),className:I("flex flex-col items-center justify-center gap-1.5 px-3 py-1.5 hover:bg-slate-50 rounded-lg transition-all min-w-[64px]",Q&&"bg-slate-100"),children:[(0,e.jsx)("div",{className:"p-1.5 rounded-lg",children:(0,e.jsx)(w.Layout,{size:20,className:"text-slate-500"})}),(0,e.jsx)("span",{className:"text-[10px] font-medium text-slate-500",children:"Layout"})]}),Q&&(0,e.jsxs)("div",{className:"absolute top-full left-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-3xl p-2 w-60 flex flex-col gap-1 z-[100] animate-in fade-in zoom-in-95 duration-200 ring-4 ring-black/5",children:[(0,e.jsxs)("button",{onClick:()=>{P("title"),n(!1)},className:"flex items-center gap-3 px-4 py-3 hover:bg-slate-50 rounded-xl text-[13px] font-bold text-slate-700 transition-all border border-transparent hover:border-slate-100 group",children:[(0,e.jsx)("div",{className:"p-2 bg-blue-50 text-blue-600 rounded-lg group-hover:bg-blue-600 group-hover:text-white transition-colors",children:(0,e.jsx)(w.FileText,{size:18})}),"Title Slide"]}),(0,e.jsxs)("button",{onClick:()=>{P("content"),n(!1)},className:"flex items-center gap-3 px-4 py-3 hover:bg-slate-50 rounded-xl text-[13px] font-bold text-slate-700 transition-all border border-transparent hover:border-slate-100 group",children:[(0,e.jsx)("div",{className:"p-2 bg-emerald-50 text-emerald-600 rounded-lg group-hover:bg-emerald-600 group-hover:text-white transition-colors",children:(0,e.jsx)(w.List,{size:18})}),"Title & Content"]}),(0,e.jsxs)("button",{onClick:()=>{P("split"),n(!1)},className:"flex items-center gap-3 px-4 py-3 hover:bg-slate-50 rounded-xl text-[13px] font-bold text-slate-700 transition-all border border-transparent hover:border-slate-100 group",children:[(0,e.jsx)("div",{className:"p-2 bg-purple-50 text-purple-600 rounded-lg group-hover:bg-purple-600 group-hover:text-white transition-colors",children:(0,e.jsx)(w.Columns,{size:18})}),"Two Columns"]})]})]})]}),U>=.85&&(0,e.jsx)("span",{className:"text-[9px] uppercase tracking-[0.2em] font-black text-slate-300 mt-auto",children:"Slides"})]}),(0,e.jsxs)("div",{className:I("flex flex-col border-r border-slate-200 h-full py-2 relative",U<.85?"px-2":"px-4"),children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 mt-2 mb-3",children:[(0,e.jsxs)("div",{className:"flex items-center bg-white border border-slate-300 rounded-[3px] h-[28px] overflow-hidden",children:[(0,e.jsx)("select",{disabled:!O,value:(r==null?void 0:r.fontFamily)||"Open Sans",onChange:H=>s({fontFamily:H.target.value}),className:I("h-full px-1.5 text-[13px] text-slate-800 font-normal bg-transparent outline-none disabled:opacity-50 appearance-none cursor-pointer",U<.85?"w-20":"w-32"),children:Ca.map(H=>(0,e.jsx)("option",{value:H,children:H},H))}),(0,e.jsx)(w.ChevronDown,{size:13,className:"text-slate-400 mr-1"})]}),(0,e.jsxs)("div",{className:"flex items-center bg-white border border-slate-300 rounded-[3px] h-[28px] overflow-hidden w-15",children:[(0,e.jsx)("select",{disabled:!O,value:(r==null?void 0:r.fontSize)||10,onChange:H=>s({fontSize:parseInt(H.target.value)}),className:"h-full w-full px-1 text-[12.5px] text-slate-800 font-normal bg-transparent outline-none disabled:opacity-50 appearance-none cursor-pointer text-center",children:La.map(H=>(0,e.jsx)("option",{value:H,children:H},H))}),(0,e.jsx)(w.ChevronDown,{size:13,className:"text-slate-400 mr-0.5"})]}),(0,e.jsxs)("button",{disabled:!O,onClick:()=>s({fontSize:Math.min(200,((r==null?void 0:r.fontSize)||24)+2)}),className:"w-9 h-[28px] flex items-center justify-center hover:bg-slate-100 rounded-[3px] transition-colors disabled:opacity-40",title:"Increase Font Size",children:[(0,e.jsx)("span",{className:"text-[16px] font-semibold text-slate-700",children:"A"}),(0,e.jsx)("span",{className:"text-[10px] font-bold text-slate-700 -ml-0.5 -mt-1",children:"\u25B2"})]}),(0,e.jsxs)("button",{disabled:!O,onClick:()=>s({fontSize:Math.max(8,((r==null?void 0:r.fontSize)||24)-2)}),className:"w-9 h-[28px] flex items-center justify-center hover:bg-slate-100 rounded-[3px] transition-colors disabled:opacity-40",title:"Decrease Font Size",children:[(0,e.jsx)("span",{className:"text-[14px] font-semibold text-slate-700",children:"A"}),(0,e.jsx)("span",{className:"text-[10px] font-bold text-slate-700 -ml-0.5 mt-1",children:"\u25BC"})]}),(0,e.jsxs)("button",{disabled:!O,onClick:()=>s({isBold:!1,isItalic:!1,isUnderline:!1,highlightColor:"",color:"#000000",isStrikethrough:!1}),className:"w-9 h-[28px] flex items-center justify-center hover:bg-slate-100 rounded-[3px] transition-colors disabled:opacity-40",title:"Clear All Formatting",children:[(0,e.jsx)("span",{className:"text-[16px] font-semibold text-slate-700",children:"A"}),(0,e.jsx)(w.Eraser,{size:11,className:"text-pink-500 -ml-0.5"})]})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1.5 mb-1",children:[(0,e.jsx)("button",{disabled:!O,onClick:()=>s({isBold:!r.isBold}),className:I("w-8 h-8 flex items-center justify-center rounded-[3px] transition-all disabled:opacity-40",r!=null&&r.isBold?"bg-blue-100":"hover:bg-slate-100"),title:"Bold",children:(0,e.jsx)("span",{className:`text-[17px] font-black ${r!=null&&r.isBold?"text-slate-900":"text-slate-700"}`,children:"B"})}),(0,e.jsx)("button",{disabled:!O,onClick:()=>s({isItalic:!r.isItalic}),className:I("w-8 h-8 flex items-center justify-center rounded-[3px] transition-all disabled:opacity-40",r!=null&&r.isItalic?"bg-blue-100":"hover:bg-slate-100"),title:"Italic",children:(0,e.jsx)("span",{className:`text-[17px] font-semibold italic ${r!=null&&r.isItalic?"text-slate-900":"text-slate-700"}`,style:{fontFamily:"serif"},children:"I"})}),(0,e.jsx)("button",{disabled:!O,onClick:()=>s({isUnderline:!r.isUnderline}),className:I("w-8 h-8 flex items-center justify-center rounded-[3px] transition-all disabled:opacity-40",r!=null&&r.isUnderline?"bg-blue-100":"hover:bg-slate-100"),title:"Underline",children:(0,e.jsx)("span",{className:`text-[17px] font-semibold underline underline-offset-2 ${r!=null&&r.isUnderline?"text-slate-900":"text-slate-700"}`,children:"U"})}),(0,e.jsxs)("button",{disabled:!O,onClick:()=>s({isStrikethrough:!r.isStrikethrough}),className:I("h-8 px-1.5 flex items-center justify-center rounded-[3px] transition-all disabled:opacity-40",r!=null&&r.isStrikethrough?"bg-blue-100":"hover:bg-slate-100"),title:"Strikethrough",children:[(0,e.jsx)("span",{className:`text-[12px] font-medium line-through ${r!=null&&r.isStrikethrough?"text-slate-900":"text-slate-600"}`,children:"abc"}),(0,e.jsx)(w.ChevronDown,{size:12,className:"text-slate-400 ml-0.5"})]}),(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsxs)("button",{disabled:!O,onClick:()=>oe(!W),className:I("h-8 px-1.5 flex flex-col items-center justify-center rounded-[3px] transition-all disabled:opacity-40",W?"bg-slate-100":"hover:bg-slate-100"),title:"Character Spacing",children:[(0,e.jsxs)("div",{className:"flex items-center",children:[(0,e.jsx)("span",{className:"text-[12px] font-bold text-slate-700",children:"A"}),(0,e.jsx)("span",{className:"text-[12px] font-bold text-slate-700 -ml-0.5",children:"V"}),(0,e.jsx)(w.ChevronDown,{size:11,className:"text-slate-400 ml-0.5"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-0",children:[(0,e.jsx)("span",{className:"text-[7px] text-blue-500",children:"\u25C0"}),(0,e.jsx)("div",{className:"w-2.5 h-[1px] bg-blue-500"}),(0,e.jsx)("span",{className:"text-[7px] text-blue-500",children:"\u25B6"})]})]}),W&&(0,e.jsxs)("div",{className:"absolute top-full left-0 mt-1 bg-white border border-slate-200 rounded-lg shadow-xl py-1 w-32 z-[100] animate-in fade-in zoom-in-95 duration-150",children:[(0,e.jsxs)("button",{onClick:()=>{s({charSpacing:-50}),oe(!1)},className:"w-full px-3 py-1.5 text-left text-[11px] text-slate-700 hover:bg-slate-50 flex items-center gap-2",children:["Very Tight",(r==null?void 0:r.charSpacing)===-50&&(0,e.jsx)(w.Check,{size:12,className:"text-blue-600 ml-auto"})]}),(0,e.jsxs)("button",{onClick:()=>{s({charSpacing:-25}),oe(!1)},className:"w-full px-3 py-1.5 text-left text-[11px] text-slate-700 hover:bg-slate-50 flex items-center gap-2",children:["Tight",(r==null?void 0:r.charSpacing)===-25&&(0,e.jsx)(w.Check,{size:12,className:"text-blue-600 ml-auto"})]}),(0,e.jsxs)("button",{onClick:()=>{s({charSpacing:0}),oe(!1)},className:"w-full px-3 py-1.5 text-left text-[11px] text-slate-700 hover:bg-slate-50 flex items-center gap-2",children:["Normal",((r==null?void 0:r.charSpacing)===0||!(r!=null&&r.charSpacing))&&(0,e.jsx)(w.Check,{size:12,className:"text-blue-600 ml-auto"})]}),(0,e.jsxs)("button",{onClick:()=>{s({charSpacing:25}),oe(!1)},className:"w-full px-3 py-1.5 text-left text-[11px] text-slate-700 hover:bg-slate-50 flex items-center gap-2",children:["Loose",(r==null?void 0:r.charSpacing)===25&&(0,e.jsx)(w.Check,{size:12,className:"text-blue-600 ml-auto"})]}),(0,e.jsxs)("button",{onClick:()=>{s({charSpacing:50}),oe(!1)},className:"w-full px-3 py-1.5 text-left text-[11px] text-slate-700 hover:bg-slate-50 flex items-center gap-2",children:["Very Loose",(r==null?void 0:r.charSpacing)===50&&(0,e.jsx)(w.Check,{size:12,className:"text-blue-600 ml-auto"})]}),(0,e.jsx)("div",{className:"h-[1px] bg-slate-100 my-1"}),(0,e.jsx)("button",{className:"w-full px-3 py-1.5 text-left text-[11px] text-slate-700 hover:bg-slate-50 disabled:opacity-50",children:"More Spacing..."})]})]}),(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsxs)("button",{disabled:!O,onClick:()=>E(!ae),className:"h-8 px-1.5 flex items-center justify-center rounded-[3px] hover:bg-slate-100 transition-all disabled:opacity-40",title:"Change Case",children:[(0,e.jsx)("span",{className:"text-[14px] font-medium text-slate-700",children:"Aa"}),(0,e.jsx)(w.ChevronDown,{size:11,className:"text-slate-400 ml-0.5"})]}),ae&&(0,e.jsxs)("div",{className:"absolute top-full left-0 mt-1 bg-white border border-slate-200 rounded-lg shadow-xl py-1 w-44 z-[100] animate-in fade-in zoom-in-95 duration-150",children:[(0,e.jsxs)("button",{onClick:()=>fe("sentence"),className:"w-full px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-50 flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-slate-400",children:"Aa"})," Sentence case."]}),(0,e.jsxs)("button",{onClick:()=>fe("lowercase"),className:"w-full px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-50 flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-slate-400 underline",children:"l"})," lowercase"]}),(0,e.jsxs)("button",{onClick:()=>fe("uppercase"),className:"w-full px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-50 flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-slate-400 underline",children:"U"})," UPPERCASE"]}),(0,e.jsxs)("button",{onClick:()=>fe("capitalize"),className:"w-full px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-50 flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-slate-400 underline",children:"C"})," Capitalize Each Word"]}),(0,e.jsxs)("button",{onClick:()=>fe("toggle"),className:"w-full px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-50 flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-slate-400 underline",children:"t"})," tOGGLE cASE"]})]})]}),(0,e.jsx)("div",{className:"w-[1px] h-5 bg-slate-200 mx-1.5"}),(0,e.jsxs)("div",{className:"relative flex items-center",children:[(0,e.jsxs)("button",{disabled:!O,className:I("w-9 h-7.5 flex flex-col items-center justify-center rounded-[3px] transition-all disabled:opacity-40",r!=null&&r.highlightColor?"bg-slate-100":"hover:bg-slate-100"),title:"Text Highlight Color",children:[(0,e.jsx)(w.Highlighter,{size:21,strokeWidth:2.5,className:r!=null&&r.highlightColor?"text-slate-900":"text-slate-500"}),(0,e.jsx)("div",{className:"absolute top-[24px] left-1.5 right-1.5 h-1.5",style:{backgroundColor:(r==null?void 0:r.highlightColor)||"transparent"}})]}),(0,e.jsx)("input",{type:"color",disabled:!O,className:"absolute inset-0 opacity-0 cursor-pointer w-full h-full disabled:cursor-not-allowed",value:(r==null?void 0:r.highlightColor)||"#ffff00",onChange:H=>s({highlightColor:H.target.value}),title:"Choose Highlight Color"}),(0,e.jsx)(w.ChevronDown,{size:11,className:"text-slate-400 -ml-0.5"})]}),(0,e.jsxs)("div",{className:"relative flex items-center",children:[(0,e.jsxs)("button",{className:"w-9 h-7.5 flex flex-col items-center justify-center rounded-[3px] hover:bg-slate-100 transition-all",title:"Font Color",children:[(0,e.jsx)("span",{className:"text-[16px] font-black text-slate-800 leading-none",children:"A"}),(0,e.jsx)("div",{className:"w-6 h-[4px] rounded-sm mt-0.5",style:{backgroundColor:(r==null?void 0:r.color)||"#ff0000"}}),(0,e.jsx)("input",{type:"color",className:"absolute inset-0 opacity-0 cursor-pointer w-full h-full",value:(r==null?void 0:r.color)||"#ff0000",onChange:H=>s({color:H.target.value})})]}),(0,e.jsx)(w.ChevronDown,{size:11,className:"text-slate-400 -ml-0.5"})]})]}),U>=.85&&(0,e.jsx)("span",{className:"text-[9px] text-center uppercase tracking-[0.2em] font-black text-slate-300 mt-auto",children:"Font"})]}),(0,e.jsxs)("div",{className:I("flex flex-col border-r border-slate-200 h-full py-2 relative",U<.85?"px-2":"px-4"),children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5 mt-2 mb-3",children:[(0,e.jsxs)("div",{className:"relative flex items-center rounded-[3px] hover:bg-slate-100 transition-all",children:[(0,e.jsx)("button",{disabled:!O,onClick:()=>{r!=null&&r.isBulleted?s({isBulleted:!1,isNumbered:!1,listType:"none"}):s({isBulleted:!0,isNumbered:!1,listType:"bullet-disc"})},className:I("w-[32px] h-8 flex items-center justify-center rounded-l-[3px] transition-all disabled:opacity-40",r!=null&&r.isBulleted?"bg-blue-100":"hover:bg-slate-100"),title:"Bullets",children:(0,e.jsx)(w.List,{size:19,className:r!=null&&r.isBulleted?"text-slate-900":"text-slate-600"})}),(0,e.jsx)("button",{disabled:!O,onClick:()=>me(!Se),className:I("w-[15px] h-8 flex items-center justify-center rounded-r-[3px] border-l border-transparent hover:border-slate-200 transition-all disabled:opacity-40",Se?"bg-slate-100":"hover:bg-slate-200"),title:"Bullet Options",children:(0,e.jsx)(w.ChevronDown,{size:13,className:"text-slate-400"})}),Se&&(0,e.jsxs)("div",{className:"absolute top-full left-0 mt-1 bg-white border border-slate-200 rounded-lg shadow-xl p-2 z-[100] animate-in fade-in zoom-in-95 duration-150 w-64 grid grid-cols-4 gap-2",children:[(0,e.jsx)("button",{onClick:()=>{s({isBulleted:!1,listType:"none"}),me(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1",children:(0,e.jsx)("span",{className:"text-[10px] text-slate-500",children:"None"})}),(0,e.jsx)("button",{onClick:()=>{s({isBulleted:!0,isNumbered:!1,listType:"bullet-disc"}),me(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 rounded-full bg-black"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 rounded-full bg-black"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 rounded-full bg-black"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isBulleted:!0,isNumbered:!1,listType:"bullet-circle"}),me(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 rounded-full border border-black bg-transparent"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 rounded-full border border-black bg-transparent"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 rounded-full border border-black bg-transparent"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isBulleted:!0,isNumbered:!1,listType:"bullet-square"}),me(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 bg-black"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 bg-black"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 bg-black"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isBulleted:!0,isNumbered:!1,listType:"bullet-square-outlined"}),me(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 border border-black bg-transparent"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 border border-black bg-transparent"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 border border-black bg-transparent"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isBulleted:!0,isNumbered:!1,listType:"bullet-diamond"}),me(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 bg-black rotate-45 scale-75"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 bg-black rotate-45 scale-75"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 bg-black rotate-45 scale-75"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isBulleted:!0,isNumbered:!1,listType:"bullet-arrow"}),me(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] leading-none",children:"\u27A4"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] leading-none",children:"\u27A4"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] leading-none",children:"\u27A4"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isBulleted:!0,isNumbered:!1,listType:"bullet-check"}),me(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] leading-none",children:"\u2713"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] leading-none",children:"\u2713"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] leading-none",children:"\u2713"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})})]})]}),(0,e.jsxs)("div",{className:"relative flex items-center rounded-[3px] hover:bg-slate-100 transition-all",children:[(0,e.jsx)("button",{disabled:!O,onClick:()=>{r!=null&&r.isNumbered?s({isBulleted:!1,isNumbered:!1,listType:"none"}):s({isBulleted:!1,isNumbered:!0,listType:"number-decimal"})},className:I("w-[32px] h-8 flex items-center justify-center rounded-l-[3px] transition-all disabled:opacity-40",r!=null&&r.isNumbered?"bg-blue-100":"hover:bg-slate-100"),title:"Numbering",children:(0,e.jsx)(w.ListOrdered,{size:19,className:r!=null&&r.isNumbered?"text-slate-900":"text-slate-600"})}),(0,e.jsx)("button",{disabled:!O,onClick:()=>ve(!Ne),className:I("w-[15px] h-8 flex items-center justify-center rounded-r-[3px] border-l border-transparent hover:border-slate-200 transition-all disabled:opacity-40",Ne?"bg-slate-100":"hover:bg-slate-200"),title:"Numbering Options",children:(0,e.jsx)(w.ChevronDown,{size:13,className:"text-slate-400"})}),Ne&&(0,e.jsxs)("div",{className:"absolute top-full left-0 mt-1 bg-white border border-slate-200 rounded-lg shadow-xl p-2 z-[100] animate-in fade-in zoom-in-95 duration-150 w-64 grid grid-cols-4 gap-2",children:[(0,e.jsx)("button",{onClick:()=>{s({isNumbered:!1,listType:"none"}),ve(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1",children:(0,e.jsx)("span",{className:"text-[10px] text-slate-500",children:"None"})}),(0,e.jsx)("button",{onClick:()=>{s({isNumbered:!0,isBulleted:!1,listType:"number-decimal"}),ve(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"1."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"2."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"3."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isNumbered:!0,isBulleted:!1,listType:"number-decimal-paren"}),ve(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"1)"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"2)"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"3)"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isNumbered:!0,isBulleted:!1,listType:"number-roman-upper"}),ve(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"I."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"II."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"III."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isNumbered:!0,isBulleted:!1,listType:"number-alpha-upper"}),ve(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"A."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"B."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"C."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isNumbered:!0,isBulleted:!1,listType:"number-alpha-lower-paren"}),ve(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"a)"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"b)"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"c)"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isNumbered:!0,isBulleted:!1,listType:"number-alpha-lower"}),ve(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"a."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"b."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"c."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isNumbered:!0,isBulleted:!1,listType:"number-roman-lower"}),ve(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"i."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"ii."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"iii."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})})]})]}),(0,e.jsx)("div",{className:"w-[1px] h-6 bg-slate-200 mx-1.5"}),(0,e.jsx)("button",{disabled:!O,className:"w-8 h-8 flex items-center justify-center rounded-[3px] hover:bg-slate-100 transition-all disabled:opacity-40",title:"Decrease List Level",children:(0,e.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 14 14",fill:"none",className:"text-slate-600",children:(0,e.jsx)("path",{d:"M2 3H12M6 7H12M6 11H12M2 7L4 9L2 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,e.jsx)("button",{disabled:!O,className:"w-8 h-8 flex items-center justify-center rounded-[3px] hover:bg-slate-100 transition-all disabled:opacity-40",title:"Increase List Level",children:(0,e.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 14 14",fill:"none",className:"text-slate-600",children:(0,e.jsx)("path",{d:"M2 3H12M6 7H12M6 11H12M4 7L2 9L4 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1.5 mb-1",children:[(0,e.jsx)("button",{disabled:!O,onClick:()=>s({textAlign:"left"}),className:I("w-8 h-8 flex items-center justify-center rounded-[3px] transition-all disabled:opacity-40",(r==null?void 0:r.textAlign)==="left"?"bg-blue-100":"hover:bg-slate-100"),title:"Align Left",children:(0,e.jsx)(w.AlignLeft,{size:19,className:(r==null?void 0:r.textAlign)==="left"?"text-slate-900":"text-slate-600"})}),(0,e.jsx)("button",{disabled:!O,onClick:()=>s({textAlign:"center"}),className:I("w-8 h-8 flex items-center justify-center rounded-[3px] transition-all disabled:opacity-40",(r==null?void 0:r.textAlign)==="center"?"bg-blue-100":"hover:bg-slate-100"),title:"Center",children:(0,e.jsx)(w.AlignCenter,{size:19,className:(r==null?void 0:r.textAlign)==="center"?"text-slate-900":"text-slate-600"})}),(0,e.jsx)("button",{disabled:!O,onClick:()=>s({textAlign:"right"}),className:I("w-8 h-8 flex items-center justify-center rounded-[3px] transition-all disabled:opacity-40",(r==null?void 0:r.textAlign)==="right"?"bg-blue-100":"hover:bg-slate-100"),title:"Align Right",children:(0,e.jsx)(w.AlignRight,{size:19,className:(r==null?void 0:r.textAlign)==="right"?"text-slate-900":"text-slate-600"})}),(0,e.jsx)("button",{disabled:!O,onClick:()=>s({textAlign:"justify"}),className:I("w-8 h-8 flex items-center justify-center rounded-[3px] transition-all disabled:opacity-40",(r==null?void 0:r.textAlign)==="justify"?"bg-blue-100":"hover:bg-slate-100"),title:"Justify",children:(0,e.jsx)(w.AlignJustify,{size:19,className:(r==null?void 0:r.textAlign)==="justify"?"text-slate-900":"text-slate-600"})})]}),U>=.85&&(0,e.jsx)("span",{className:"text-[9px] text-center uppercase tracking-[0.2em] font-black text-slate-300 mt-auto",children:"Paragraph"})]}),(0,e.jsxs)("div",{className:"flex-1 flex flex-col items-center border-r border-slate-100 px-2 gap-1 h-full py-1.5 shrink-0",children:[(0,e.jsxs)("div",{className:"flex items-center justify-center gap-1 my-auto",children:[(0,e.jsxs)("div",{className:"relative group/shapes flex justify-center",children:[(0,e.jsxs)("button",{className:"flex flex-col items-center justify-center gap-1.5 px-3 py-1.5 hover:bg-slate-50 rounded-lg group transition-all min-w-[64px]",onClick:()=>{var H;return(H=window._toggleShapesMenu)==null?void 0:H.call(window)},children:[(0,e.jsx)("div",{className:"bg-blue-50 p-1.5 rounded-lg group-hover:scale-105 transition-transform",children:(0,e.jsx)(w.Square,{size:20,className:"text-blue-600"})}),(0,e.jsx)("span",{className:"text-[10px] font-bold text-slate-700",children:"Shapes"})]}),(0,e.jsx)(Ia,{onAddShape:H=>{c(H)},uiScale:U})]}),(0,e.jsx)("div",{className:"w-[1px] h-10 bg-slate-100 mx-1"}),(0,e.jsxs)("button",{onClick:m,className:"flex flex-col items-center justify-center gap-1.5 px-3 py-1.5 hover:bg-slate-50 rounded-lg text-slate-600 transition-colors min-w-[64px]",title:"Text Box",children:[(0,e.jsx)("div",{className:"p-1.5",children:(0,e.jsx)(w.Type,{size:20})}),(0,e.jsx)("span",{className:"text-[10px] font-medium text-slate-500",children:"Text Box"})]}),(0,e.jsx)("div",{className:"w-[1px] h-10 bg-slate-100 mx-1"}),(0,e.jsxs)("button",{onClick:()=>{var H;return(H=K.current)==null?void 0:H.click()},className:"flex flex-col items-center justify-center gap-1.5 px-3 py-1.5 hover:bg-slate-50 rounded-lg text-slate-600 transition-colors min-w-[64px]",title:"Image",children:[(0,e.jsx)("div",{className:"p-1.5",children:(0,e.jsx)(w.Image,{size:20})}),(0,e.jsx)("span",{className:"text-[10px] font-medium text-slate-500",children:"Image"}),(0,e.jsx)("input",{type:"file",ref:K,className:"hidden",accept:"image/*",onChange:H=>{var ie;return((ie=H.target.files)==null?void 0:ie[0])&&a(H.target.files[0])}})]})]}),U>=.85&&(0,e.jsx)("span",{className:"text-[9px] uppercase tracking-[0.2em] font-black text-slate-300 mt-auto",children:"Drawing"})]}),(0,e.jsxs)("div",{className:"flex-1 flex flex-col items-center border-r border-slate-100 px-2 gap-1 h-full py-1.5 relative",children:[(0,e.jsxs)("div",{className:"flex items-center justify-center gap-0.5 my-auto h-full",children:[(0,e.jsxs)("button",{disabled:!O||L,onClick:()=>g(r.id,"shorten"),className:"flex flex-col items-center justify-center gap-1.5 px-3 py-1.5 hover:bg-slate-50 rounded-lg text-slate-600 disabled:opacity-20 transition-all min-w-[64px]",children:[(0,e.jsx)("div",{className:"p-1.5 rounded-lg group-hover:scale-110 transition-transform",children:(0,e.jsx)(w.Sparkles,{size:20,className:"text-purple-500"})}),(0,e.jsx)("span",{className:"text-[10px] font-bold",children:"Shorten"})]}),(0,e.jsx)("div",{className:"w-[1px] h-10 bg-slate-100 mx-1"}),(0,e.jsxs)("button",{disabled:!O||L,onClick:()=>g(r.id,"reframe"),className:"flex flex-col items-center justify-center gap-1.5 px-3 py-1.5 hover:bg-slate-50 rounded-lg text-slate-600 disabled:opacity-20 transition-all min-w-[64px]",children:[(0,e.jsx)("div",{className:"p-1.5 rounded-lg group-hover:scale-110 transition-transform",children:(0,e.jsx)(w.Sparkles,{size:20,className:"text-blue-500"})}),(0,e.jsx)("span",{className:"text-[10px] font-bold",children:"Reframe"})]}),(0,e.jsx)("div",{className:"w-[1px] h-10 bg-slate-100 mx-1"}),(0,e.jsxs)("button",{disabled:!O||L,onClick:()=>g(r.id,"lengthen"),className:"flex flex-col items-center justify-center gap-1.5 px-3 py-1.5 hover:bg-slate-50 rounded-lg text-slate-600 disabled:opacity-20 transition-all min-w-[68px]",children:[(0,e.jsx)("div",{className:"p-1.5 rounded-lg group-hover:scale-110 transition-transform",children:(0,e.jsx)(w.Sparkles,{size:20,className:"text-emerald-500"})}),(0,e.jsx)("span",{className:"text-[10px] font-bold text-center leading-tight",children:"Lengthen"})]})]}),L&&(0,e.jsx)("div",{className:"absolute inset-x-0 top-2 bottom-8 bg-white/80 flex items-center justify-center rounded-lg z-10 backdrop-blur-[1px]",children:(0,e.jsx)(w.RefreshCw,{size:16,className:"text-blue-600 animate-spin"})}),U>=.85&&(0,e.jsx)("span",{className:"text-[9px] uppercase tracking-[0.2em] font-black text-slate-300 mt-auto",children:"AI Text"})]}),(0,e.jsxs)("div",{className:"flex-1 flex flex-col items-center pl-4 pr-3 gap-1 h-full py-2 relative",children:[(0,e.jsxs)("div",{className:"flex items-center justify-center gap-1 my-auto h-full",children:[(0,e.jsxs)("button",{onClick:M,className:"flex flex-col items-center justify-center gap-1.5 px-3 py-1.5 hover:bg-slate-50 rounded-lg text-slate-700 transition-all min-w-[64px] group",title:"Present",children:[(0,e.jsx)("div",{className:"p-1.5 rounded-lg group-hover:scale-110 transition-transform",children:(0,e.jsx)(w.Play,{size:20,className:"fill-slate-700 group-hover:fill-slate-900"})}),(0,e.jsx)("span",{className:"text-[10px] font-bold",children:"Present"})]}),(0,e.jsx)("div",{className:"w-[1px] h-10 bg-slate-100 mx-1"}),(0,e.jsxs)("button",{onClick:v,className:"flex flex-col items-center justify-center gap-1.5 px-3 py-1.5 hover:bg-slate-50 rounded-lg text-slate-700 transition-all min-w-[64px] group",title:"Export",children:[(0,e.jsx)("div",{className:"p-1.5 rounded-lg group-hover:scale-110 transition-transform",children:(0,e.jsx)(w.Download,{size:20,className:"text-emerald-600"})}),(0,e.jsx)("span",{className:"text-[10px] font-bold",children:"Export"})]}),r&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"w-[1px] h-10 bg-slate-100 mx-1"}),(0,e.jsxs)("button",{onClick:j,className:"flex flex-col items-center justify-center gap-1.5 px-3 py-1.5 hover:bg-red-50 rounded-lg text-red-600 transition-all min-w-[64px] group",title:"Delete",children:[(0,e.jsx)("div",{className:"p-1.5 rounded-lg group-hover:scale-110 transition-transform",children:(0,e.jsx)(w.Trash2,{size:20})}),(0,e.jsx)("span",{className:"text-[10px] font-bold",children:"Delete"})]})]})]}),(0,e.jsxs)("div",{className:"absolute bottom-2 right-3 flex items-center gap-1 px-1.5 py-0.5 bg-emerald-50/50 rounded-md border border-emerald-100/50",children:[(0,e.jsx)(w.Check,{size:9,className:"text-emerald-500"}),(0,e.jsx)("span",{className:"text-[7px] font-black text-emerald-600/70 tracking-tighter uppercase",children:"Saved"})]}),U>=.85&&(0,e.jsx)("span",{className:"text-[9px] uppercase tracking-[0.2em] font-black text-slate-300 mt-auto",children:"Actions"})]})]}),$&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"fixed inset-0 bg-slate-900/40 backdrop-blur-sm z-[2000]",onClick:()=>D(!1)}),(0,e.jsxs)("div",{className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[480px] bg-white rounded-3xl shadow-2xl z-[2001] border border-slate-200 p-8 animate-in fade-in zoom-in-95 duration-200",children:[(0,e.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,e.jsxs)("h3",{className:"text-lg font-black text-slate-800 tracking-tight flex items-center gap-3",children:[(0,e.jsx)("div",{className:"p-2 bg-blue-50 text-blue-600 rounded-xl",children:(0,e.jsx)(w.Download,{size:20})}),"Upload Presentation"]}),(0,e.jsx)("button",{onClick:()=>D(!1),className:"text-slate-400 hover:text-slate-600 transition-colors",children:(0,e.jsx)(w.RefreshCw,{size:20,className:"rotate-45"})})]}),(0,e.jsxs)("div",{className:"flex gap-2 p-1 bg-slate-50 rounded-2xl mb-8",children:[(0,e.jsx)("button",{onClick:()=>ne("file"),className:I("flex-1 py-3 text-xs font-black rounded-xl transition-all",se==="file"?"bg-white text-blue-600 shadow-sm":"text-slate-500 hover:text-slate-700"),children:"FILE UPLOAD"}),(0,e.jsx)("button",{onClick:()=>ne("link"),className:I("flex-1 py-3 text-xs font-black rounded-xl transition-all",se==="link"?"bg-white text-blue-600 shadow-sm":"text-slate-500 hover:text-slate-700"),children:"LINK UPLOAD"})]}),se==="file"?(0,e.jsxs)("label",{className:"flex flex-col items-center justify-center gap-4 py-12 border-2 border-dashed border-slate-200 rounded-3xl hover:border-blue-400 hover:bg-blue-50/50 transition-all cursor-pointer group",children:[(0,e.jsx)("div",{className:"p-4 bg-white rounded-2xl shadow-sm border border-slate-100 group-hover:scale-110 transition-transform",children:(0,e.jsx)(w.Plus,{size:24,className:"text-blue-500"})}),(0,e.jsxs)("div",{className:"text-center",children:[(0,e.jsx)("p",{className:"text-sm font-bold text-slate-700",children:"Choose a PPTX file"}),(0,e.jsx)("p",{className:"text-xs text-slate-400 mt-1",children:"Maximum file size: 50MB"})]}),(0,e.jsx)("input",{type:"file",accept:".pptx",className:"hidden",onChange:H=>{var he;let ie=(he=H.target.files)==null?void 0:he[0];ie&&(b(ie),D(!1))}})]}):(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsx)("div",{className:"relative",children:(0,e.jsx)("input",{type:"text",placeholder:"Paste S3 or public URL",value:G,onChange:H=>xe(H.target.value),className:"w-full bg-slate-50 border border-slate-200 rounded-2xl px-5 py-4 focus:outline-none focus:ring-4 focus:ring-blue-500/10 focus:border-blue-500 text-sm placeholder:text-slate-400 text-black"})}),(0,e.jsx)("button",{onClick:()=>{G.trim()&&(b(G.trim()),D(!1))},disabled:!G.trim(),className:"w-full bg-blue-600 hover:bg-blue-700 disabled:bg-slate-300 text-white font-black py-4 rounded-2xl transition-all shadow-lg shadow-blue-500/20",children:"LOAD PRESENTATION"}),(0,e.jsx)("p",{className:"text-[10px] text-slate-400 text-center uppercase tracking-widest font-black",children:"Supports S3, Dropbox, and public URLS"})]})]})]})]})};var je=require("lucide-react"),be=require("@dnd-kit/core"),Me=require("@dnd-kit/sortable"),Yt=require("@dnd-kit/utilities");var Y=require("react/jsx-runtime"),_t={triangle:"M 12,4 L 20,18 H 4 L 12,4 Z",rightTriangle:"M 4,4 V 20 H 20 L 4,4 Z",rhombus:"M 12,4 L 20,12 L 12,20 L 4,12 L 12,4 Z",parallelogram:"M 7,4 H 21 L 17,20 H 3 L 7,4 Z",trapezoid:"M 6,4 H 18 L 21,20 H 3 L 6,4 Z",pentagon:"M 12,3 L 21,9 V 19 H 3 V 9 L 12,3 Z",hexagon:"M 12,3 L 20,7.5 V 16.5 L 12,21 L 4,16.5 V 7.5 L 12,3 Z",heptagon:"M 12,3 L 18.5,6 L 21,13 L 16,20 H 8 L 3,13 L 5.5,6 L 12,3 Z",octagon:"M 8.5,3 H 15.5 L 21,8.5 V 15.5 L 15.5,21 H 8.5 L 3,15.5 V 8.5 L 8.5,3 Z",heart:"M 12,21.35 L 10.55,20.03 C 5.4,15.36 2,12.28 2,8.5 2,5.42 4.42,3 7.5,3 C 9.24,3 10.91,3.81 12,5.09 C 13.09,3.81 14.76,3 16.5,3 C 19.58,3 22,5.42 22,8.5 C 22,12.28 18.6,15.36 13.45,20.04 L 12,21.35 Z",smiley:"M 12,3 A 9,9 0 1,0 12,21 A 9,9 0 1,0 12,3 M 9,9 A 1.5,1.5 0 1,1 9,10.5 A 1.5,1.5 0 1,1 9,9 M 15,9 A 1.5,1.5 0 1,1 15,10.5 A 1.5,1.5 0 1,1 15,9 M 8,15 C 8,15 9.5,17 12,17 C 14.5,17 16,15 16,15",sun:"M 12,7 A 5,5 0 1,1 12,17 A 5,5 0 1,1 12,7 M 12,2 V 4 M 12,20 V 22 M 4,12 H 2 M 22,12 H 20 M 19.07,4.93 L 17.66,6.34 M 6.34,17.66 L 4.93,19.07 M 4.93,4.93 L 6.34,6.34 M 17.66,17.66 L 19.07,19.07",moon:"M 12,3 A 9,9 0 1,0 12,21 A 7,7 0 0,1 12,3 Z",circle:"M 12,3 A 9,9 0 1,1 12,21 A 9,9 0 1,1 12,3 Z",arrowRight:"M 4,11 H 15.5 L 12,7.5 L 13.5,6 L 19.5,12 L 13.5,18 L 12,16.5 L 15.5,13 H 4 Z",arrowLeft:"M 20,11 H 8.5 L 12,7.5 L 10.5,6 L 4.5,12 L 10.5,18 L 12,16.5 L 8.5,13 H 20 Z",arrowUp:"M 13,20 V 8.5 L 16.5,12 L 18,10.5 L 12,4.5 L 6,10.5 L 7.5,12 L 11,8.5 V 20 Z",arrowDown:"M 11,4 V 15.5 L 7.5,12 L 6,13.5 L 12,19.5 L 18,13.5 L 16.5,12 L 13,15.5 V 4 Z",arrowLeftRight:"M 4,12 L 8,8 V 11 H 16 V 8 L 20,12 L 16,16 V 13 H 8 V 16 L 4,12 Z",arrowUpDown:"M 12,4 L 8,8 H 11 V 16 H 8 L 12,20 L 16,16 H 13 V 8 H 16 L 12,4 Z",star4:"M 12,2 L 14,10 L 22,12 L 14,14 L 12,22 L 10,14 L 2,12 L 10,10 L 12,2 Z",star5:"M 12,2 L 14.5,9.5 H 22 L 16,14 L 18.5,21.5 L 12,17 L 5.5,21.5 L 8,14 L 2,9.5 H 9.5 L 12,2 Z",star6:"M 12,2 L 15,7 L 21,6 L 17,10.5 L 19,17 L 12,14 L 5,17 L 7,10.5 L 3,6 L 9,7 L 12,2 Z",star8:"M 12,2 L 14,6 L 18,4 L 16,8 L 20,10 L 16,12 L 18,16 L 14,14 L 12,18 L 10,14 L 6,16 L 8,12 L 4,10 L 8,8 L 6,4 L 10,6 L 12,2 Z",cloud:"M 17,19 C 14.8,19 13.1,17.7 12.3,15.8 C 11.4,16 10.5,16.2 9.6,16.2 C 7,16.2 4.7,14.6 3.7,12.3 C 1.5,11.8 0,9.9 0,7.6 C 0,5 2.1,2.9 4.7,2.9 C 5.3,2.9 5.8,3 6.3,3.1 C 7.6,1.4 9.6,0.3 11.9,0.3 C 12.5,0.3 13.1,0.4 13.7,0.5 C 15,1.9 15.9,3.7 16,5.7 C 18.2,6.1 20,8.1 20,10.5 C 20,13.2 17.8,15.4 15.1,15.4 C 14.8,15.4 14.5,15.4 14.2,15.3 C 14.2,15.4 14.2,15.4 14.2,15.5 C 14.2,17.4 15.5,19 17,19 Z",lightning:"M 13,2 L 3,14 H 12 V 22 L 22,10 H 13 L 16,2 Z",plus:"M 19,13 H 13 V 19 H 11 V 13 H 5 V 11 H 11 V 5 H 13 V 11 H 19 V 13 Z",minus:"M 19,13 H 5 V 11 H 19 V 13 Z",multiply:"M 19,6.41 L 17.59,5 L 12,10.59 L 6.41,5 L 5,6.41 L 10.59,12 L 5,17.59 L 6.41,19 L 12,13.41 L 17.59,19 L 19,17.59 L 13.41,12 L 19,6.41 Z",divide:"M 12,7 A 2,2 0 1,1 12,11 A 2,2 0 1,1 12,7 M 12,17 A 2,2 0 1,1 12,21 A 2,2 0 1,1 12,17 M 5,11 H 19 V 13 H 5 V 11 Z",equal:"M 19,10 H 5 V 8 H 19 V 10 M 19,16 H 5 V 14 H 19 V 16 Z"},Ma=({slide:m,index:a,isActive:c,onSelect:h,onDelete:v,onDuplicate:s,showDelete:j,uiScale:P,appBgColor:M})=>{let{attributes:r,listeners:T,setNodeRef:g,transform:S,transition:V,isDragging:L}=(0,Me.useSortable)({id:m.id}),y={transform:Yt.CSS.Transform.toString(S),transition:V,zIndex:L?2:1,opacity:L?.5:1};return(0,Y.jsxs)("div",{ref:g,onClick:h,className:I("cursor-pointer border-[1.5px] border-solid p-2 transition-all duration-300 group relative select-none",c?"bg-white":"border-transparent hover:border-slate-200 bg-white/50 hover:bg-white"),style:R(z({},y),{borderColor:c?M:void 0}),children:[(0,Y.jsxs)("div",{className:I("text-[10px] font-bold mb-1 flex items-center justify-between transition-colors",!c&&"text-slate-400"),style:{color:c?M:void 0},children:[(0,Y.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Y.jsx)("div",R(z(z({},r),T),{className:"cursor-grab active:cursor-grabbing p-0.5 hover:bg-slate-100 text-slate-300 hover:text-slate-500",children:(0,Y.jsx)(je.GripVertical,{size:10})})),(0,Y.jsxs)("span",{children:["SLIDE ",a+1]})]}),(0,Y.jsxs)("div",{className:"flex items-center gap-1",children:[c&&(0,Y.jsx)("span",{className:"h-1.5 w-1.5",style:{backgroundColor:M}}),(0,Y.jsxs)("div",{className:"flex items-center opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,Y.jsx)("button",{onClick:b=>{b.stopPropagation(),s()},className:"p-1 hover:bg-blue-50 text-slate-400 hover:text-blue-500 transition-all",title:"Duplicate Slide",children:(0,Y.jsx)(je.Copy,{size:12})}),j&&(0,Y.jsx)("button",{onClick:b=>{b.stopPropagation(),v()},className:"p-1 hover:bg-red-50 text-red-400 hover:text-red-500 transition-all",title:"Delete Slide",children:(0,Y.jsx)(je.Trash2,{size:12})})]})]})]}),(0,Y.jsx)("div",{className:"aspect-video bg-white flex items-center justify-center border border-slate-200 overflow-hidden relative group-hover:shadow-sm transition-shadow",children:(0,Y.jsx)("div",{className:"origin-center pointer-events-none select-none shrink-0",style:{width:"1200px",height:"675px",transform:`scale(${180*P/1200})`,backgroundColor:"#ffffff"},children:m.elements.sort((b,Z)=>(b.zIndex||0)-(Z.zIndex||0)).map(b=>{var U;let Z={position:"absolute",left:b.x,top:b.y,width:b.width,height:b.height,opacity:(U=b.opacity)!=null?U:1};if(b.type==="text")return(0,Y.jsx)("div",{style:R(z({},Z),{fontSize:b.fontSize,fontFamily:b.fontFamily,color:b.color,textAlign:b.textAlign||"left",fontWeight:b.isBold?"bold":"normal",fontStyle:b.isItalic?"italic":"normal",lineHeight:1.2,overflow:"hidden",wordBreak:"break-word",whiteSpace:"pre-wrap"}),children:b.content},b.id);if(b.type==="shape"){let J=_t[b.shapeType]||(b.shapeType==="ellipse"?_t.circle:null);return J?(0,Y.jsx)("svg",{viewBox:"0 0 24 24",style:R(z({},Z),{fill:b.fill}),preserveAspectRatio:"none",children:(0,Y.jsx)("path",{d:J})},b.id):(0,Y.jsx)("div",{style:R(z({},Z),{backgroundColor:b.fill,borderRadius:b.shapeType==="ellipse"?"50%":"0"})},b.id)}else if(b.type==="image")return(0,Y.jsx)("img",{src:b.src,alt:"",style:R(z({},Z),{objectFit:"contain"})},b.id);return null})})})]})},Kt=({slides:m,currentSlideIndex:a,onSelectSlide:c,onDeleteSlide:h,onDuplicateSlide:v,onReorderSlides:s,uiScale:j,appBgColor:P="#B7472A"})=>{let M=(0,be.useSensors)((0,be.useSensor)(be.PointerSensor,{activationConstraint:{distance:5}}),(0,be.useSensor)(be.KeyboardSensor,{coordinateGetter:Me.sortableKeyboardCoordinates})),r=T=>{let{active:g,over:S}=T;if(g.id!==(S==null?void 0:S.id)){let V=m.findIndex(y=>y.id===g.id),L=m.findIndex(y=>y.id===(S==null?void 0:S.id));s(V,L)}};return(0,Y.jsx)("div",{className:"bg-white border-r border-slate-100 overflow-y-auto p-4 flex flex-col gap-4",style:{width:`${256*j}px`},children:(0,Y.jsx)(be.DndContext,{sensors:M,collisionDetection:be.closestCenter,onDragEnd:r,children:(0,Y.jsx)(Me.SortableContext,{items:m.map(T=>T.id),strategy:Me.verticalListSortingStrategy,children:m.map((T,g)=>(0,Y.jsx)(Ma,{slide:T,index:g,isActive:g===a,onSelect:()=>c(g),onDelete:()=>h(g),onDuplicate:()=>v(g),showDelete:m.length>1,uiScale:j,appBgColor:P},T.id))})})})};var pe=require("react"),le=He(require("fabric")),Ae=require("lucide-react");var F=require("react/jsx-runtime"),Aa={triangle:"M 12,4 L 20,18 H 4 L 12,4 Z",rightTriangle:"M 4,4 V 20 H 20 L 4,4 Z",rhombus:"M 12,4 L 20,12 L 12,20 L 4,12 L 12,4 Z",parallelogram:"M 7,4 H 21 L 17,20 H 3 L 7,4 Z",trapezoid:"M 6,4 H 18 L 21,20 H 3 L 6,4 Z",pentagon:"M 12,3 L 21,9 V 19 H 3 V 9 L 12,3 Z",hexagon:"M 12,3 L 20,7.5 V 16.5 L 12,21 L 4,16.5 V 7.5 L 12,3 Z",heptagon:"M 12,3 L 18.5,6 L 21,13 L 16,20 H 8 L 3,13 L 5.5,6 L 12,3 Z",octagon:"M 8.5,3 H 15.5 L 21,8.5 V 15.5 L 15.5,21 H 8.5 L 3,15.5 V 8.5 L 8.5,3 Z",heart:"M 12,21.35 L 10.55,20.03 C 5.4,15.36 2,12.28 2,8.5 2,5.42 4.42,3 7.5,3 C 9.24,3 10.91,3.81 12,5.09 C 13.09,3.81 14.76,3 16.5,3 C 19.58,3 22,5.42 22,8.5 C 22,12.28 18.6,15.36 13.45,20.04 L 12,21.35 Z",smiley:"M 12,3 A 9,9 0 1,0 12,21 A 9,9 0 1,0 12,3 M 9,9 A 1.5,1.5 0 1,1 9,10.5 A 1.5,1.5 0 1,1 9,9 M 15,9 A 1.5,1.5 0 1,1 15,10.5 A 1.5,1.5 0 1,1 15,9 M 8,15 C 8,15 9.5,17 12,17 C 14.5,17 16,15 16,15",sun:"M 12,7 A 5,5 0 1,1 12,17 A 5,5 0 1,1 12,7 M 12,2 V 4 M 12,20 V 22 M 4,12 H 2 M 22,12 H 20 M 19.07,4.93 L 17.66,6.34 M 6.34,17.66 L 4.93,19.07 M 4.93,4.93 L 6.34,6.34 M 17.66,17.66 L 19.07,19.07",moon:"M 12,3 A 9,9 0 1,0 12,21 A 7,7 0 0,1 12,3 Z",circle:"M 12,3 A 9,9 0 1,1 12,21 A 9,9 0 1,1 12,3 Z",arrowRight:"M 4,11 H 15.5 L 12,7.5 L 13.5,6 L 19.5,12 L 13.5,18 L 12,16.5 L 15.5,13 H 4 Z",arrowLeft:"M 20,11 H 8.5 L 12,7.5 L 10.5,6 L 4.5,12 L 10.5,18 L 12,16.5 L 8.5,13 H 20 Z",arrowUp:"M 13,20 V 8.5 L 16.5,12 L 18,10.5 L 12,4.5 L 6,10.5 L 7.5,12 L 11,8.5 V 20 Z",arrowDown:"M 11,4 V 15.5 L 7.5,12 L 6,13.5 L 12,19.5 L 18,13.5 L 16.5,12 L 13,15.5 V 4 Z",arrowLeftRight:"M 4,12 L 8,8 V 11 H 16 V 8 L 20,12 L 16,16 V 13 H 8 V 16 L 4,12 Z",arrowUpDown:"M 12,4 L 8,8 H 11 V 16 H 8 L 12,20 L 16,16 H 13 V 8 H 16 L 12,4 Z",star4:"M 12,2 L 14,10 L 22,12 L 14,14 L 12,22 L 10,14 L 2,12 L 10,10 L 12,2 Z",star5:"M 12,2 L 14.5,9.5 H 22 L 16,14 L 18.5,21.5 L 12,17 L 5.5,21.5 L 8,14 L 2,9.5 H 9.5 L 12,2 Z",star6:"M 12,2 L 15,7 L 21,6 L 17,10.5 L 19,17 L 12,14 L 5,17 L 7,10.5 L 3,6 L 9,7 L 12,2 Z",star8:"M 12,2 L 14,6 L 18,4 L 16,8 L 20,10 L 16,12 L 18,16 L 14,14 L 12,18 L 10,14 L 6,16 L 8,12 L 4,10 L 8,8 L 6,4 L 10,6 L 12,2 Z",cloud:"M 17,19 C 14.8,19 13.1,17.7 12.3,15.8 C 11.4,16 10.5,16.2 9.6,16.2 C 7,16.2 4.7,14.6 3.7,12.3 C 1.5,11.8 0,9.9 0,7.6 C 0,5 2.1,2.9 4.7,2.9 C 5.3,2.9 5.8,3 6.3,3.1 C 7.6,1.4 9.6,0.3 11.9,0.3 C 12.5,0.3 13.1,0.4 13.7,0.5 C 15,1.9 15.9,3.7 16,5.7 C 18.2,6.1 20,8.1 20,10.5 C 20,13.2 17.8,15.4 15.1,15.4 C 14.8,15.4 14.5,15.4 14.2,15.3 C 14.2,15.4 14.2,15.4 14.2,15.5 C 14.2,17.4 15.5,19 17,19 Z",lightning:"M 13,2 L 3,14 H 12 V 22 L 22,10 H 13 L 16,2 Z",plus:"M 19,13 H 13 V 19 H 11 V 13 H 5 V 11 H 11 V 5 H 13 V 11 H 19 V 13 Z",minus:"M 19,13 H 5 V 11 H 19 V 13 Z",multiply:"M 19,6.41 L 17.59,5 L 12,10.59 L 6.41,5 L 5,6.41 L 10.59,12 L 5,17.59 L 6.41,19 L 12,13.41 L 17.59,19 L 19,17.59 L 13.41,12 L 19,6.41 Z",divide:"M 12,7 A 2,2 0 1,1 12,11 A 2,2 0 1,1 12,7 M 12,17 A 2,2 0 1,1 12,21 A 2,2 0 1,1 12,17 M 5,11 H 19 V 13 H 5 V 11 Z",equal:"M 19,10 H 5 V 8 H 19 V 10 M 19,16 H 5 V 14 H 19 V 16 Z"},Ba=(m,a,c,h)=>{if(a)switch(m){case"bullet-disc":return"\u2022";case"bullet-circle":return"\u25CB";case"bullet-square":return"\u25A0";case"bullet-square-outlined":return"\u25A1";case"bullet-diamond":return"\u25C6";case"bullet-arrow":return"\u27A4";case"bullet-check":return"\u2713";case"none":return"";default:return"\u2022"}else if(c){let v=h+1;switch(m){case"number-decimal":return`${v}.`;case"number-decimal-paren":return`${v})`;case"number-roman-upper":return Jt(v)+".";case"number-roman-lower":return Jt(v).toLowerCase()+".";case"number-alpha-upper":return xt(v)+".";case"number-alpha-lower":return xt(v).toLowerCase()+".";case"number-alpha-lower-paren":return xt(v).toLowerCase()+")";case"none":return"";default:return`${v}.`}}return""},Jt=m=>{let a={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1},c="";for(let h in a)for(;m>=a[h];)c+=h,m-=a[h];return c},xt=m=>String.fromCharCode(64+m),Ee=class extends le.Textbox{_renderTextLine(a,c,h,v,s,j){if(super._renderTextLine(a,c,h,v,s,j),(this.isBulleted||this.isNumbered)&&this.listType!=="none"){let P=Ba(this.listType,this.isBulleted,this.isNumbered,j);if(P){c.save();let M=this.fontSize||22,r=-M*1,T=M*.6;c.font=`${this.fontStyle} ${this.fontWeight} ${T}px ${this.fontFamily}`,c.fillStyle=this.fill,c.fillText(P,v+r,s-M*.35),c.restore()}}}},et=({slide:m,onElementUpdate:a,onSelect:c,uiScale:h,onSlashCommand:v,selectedElementId:s,onAiGenerateClick:j,onAiGenerateInfographicClick:P,onUploadImageClick:M,onDeleteElement:r})=>{let T=(0,pe.useRef)(null),g=(0,pe.useRef)(null),S=(0,pe.useRef)(!1),V=(0,pe.useRef)(a),L=(0,pe.useRef)(c),y=(0,pe.useRef)(null),[b,Z]=(0,pe.useState)(1),[U,J]=(0,pe.useState)(!1),te=(0,pe.useRef)({x:0,y:0});(0,pe.useEffect)(()=>{if(!y.current)return;let k=new ResizeObserver(K=>{let _=K[0];if(_){let{width:X,height:Q}=_.contentRect,n=X/1200,f=Q/675,o=Math.min(n,f)*.95;Z(o)}});return k.observe(y.current),()=>k.disconnect()},[]),(0,pe.useEffect)(()=>{V.current=a,L.current=c},[a,c]),(0,pe.useEffect)(()=>{if(T.current&&!g.current){let k=new le.Canvas(T.current,{width:1200,height:675,backgroundColor:"white",selection:!0,preserveObjectStacking:!0});g.current=k,J(!0);let K=o=>{o.left<0&&o.set("left",0),o.top<0&&o.set("top",0);let x=o.getBoundingRect();x.left+x.width>(k.width||1200)&&o.set("left",(k.width||1200)-x.width),x.top+x.height>(k.height||675)&&o.set("top",(k.height||675)-x.height)};k.on("object:moving",o=>K(o.target)),k.on("object:scaling",o=>K(o.target));let _=o=>{var $;if(S.current)return;let x=o.target,C=($=x.get("data"))==null?void 0:$.id;x&&C&&V.current(C,z({x:x.left,y:x.top,width:x.getScaledWidth(),height:x.getScaledHeight()},x.isType("textbox")?{content:x.text,textAlign:x.textAlign,fontSize:x.fontSize,fontFamily:x.fontFamily,color:x.fill}:{fill:x.fill}))};k.on("object:modified",_),k.on("text:changed",_);let X=o=>{if(!(!o||!o.isType("textbox")))return{fontFamily:o.fontFamily,fontSize:o.fontSize,isBold:o.fontWeight==="bold",isItalic:o.fontStyle==="italic",isUnderline:o.underline,textAlign:o.textAlign,color:o.fill,highlightColor:o.textBackgroundColor,isBulleted:!!o.isBulleted,isNumbered:!!o.isNumbered}},Q=(o,x=!1)=>{var C;try{let $=(C=T.current)==null?void 0:C.getBoundingClientRect();if(!$||!o)return;let D=0,se=0,ne=(ae,E)=>typeof ae=="object"&&ae!==null&&typeof ae[E]=="function",G=ne(o,"isType")&&o.isType("textbox");if(G&&o.isEditing){let E=(W=>{try{let oe=W.selectionStart||0;if(ne(W,"getCursorCoords"))return W.getCursorCoords(oe);if(ne(W,"_getCursorCoords"))return W._getCursorCoords(oe)}catch(oe){}return null})(o);if(E){let W=le.util.transformPoint(new le.Point(E.left,E.top),ne(o,"calcTransformMatrix")?o.calcTransformMatrix():[1,0,0,1,0,0]),oe=k.viewportTransform||[1,0,0,1,0,0],Se=le.util.transformPoint(W,oe);D=$.left+Se.x*b,se=$.top+Se.y*b}else{let W=ne(o,"getBoundingRect")?o.getBoundingRect():{left:0,top:0,width:0,height:0};D=$.left+(W.left+W.width/2)*b,se=$.top+W.top*b}}else{let ae=ne(o,"getBoundingRect")?o.getBoundingRect():{left:te.current.x,top:te.current.y,width:0,height:0};D=$.left+(ae.left+ae.width/2)*b,se=$.top+ae.top*b}if(D&&se){let ae=x?"text-selection":G?"textbox":"default",E=D,W=se;ae==="default"?(E=D+5,W=se+5):(E=D-220,W=se-140),v({x:E,y:W},ae,X(o))}}catch($){console.error("Critical error in triggerSlashMenu:",$)}},n=o=>{var C,$;let x=((C=o.selected)==null?void 0:C[0])||o.target;if(x){let D=($=x.get("data"))==null?void 0:$.id;L.current(D),x.isType("textbox")&&!S.current&&Q(x)}};k.on("selection:created",n),k.on("selection:updated",n),k.on("selection:cleared",()=>{L.current(null),v({x:0,y:0},"default")}),k.on("text:selection:changed",o=>{let x=o.target;x&&x.isType("textbox")&&x.selectionStart!==x.selectionEnd&&Q(x,!0)}),k.on("mouse:move",o=>{o.pointer&&(te.current={x:o.pointer.x,y:o.pointer.y})});let f=o=>{let x=g.current;if(!x)return;let C=x.getActiveObject();if(o.key==="/"){o.preventDefault(),Q(C||{isType:()=>!1,getBoundingRect:()=>({left:te.current.x,top:te.current.y,width:0,height:0})});return}if(C&&C.isType("textbox")&&C.isEditing||!C)return;let $=o.shiftKey?10:1,D=!1;switch(o.key){case"ArrowLeft":C.set("left",C.left-$),D=!0;break;case"ArrowRight":C.set("left",C.left+$),D=!0;break;case"ArrowUp":C.set("top",C.top-$),D=!0;break;case"ArrowDown":C.set("top",C.top+$),D=!0;break}D&&(K(C),x.requestRenderAll(),_({target:C}))};window.addEventListener("keydown",f),k._keyboardListener=f}return()=>{if(g.current){let k=g.current._keyboardListener;k&&window.removeEventListener("keydown",k),g.current.dispose(),g.current=null}}},[]),(0,pe.useEffect)(()=>{if(!g.current)return;let k=g.current;(async()=>{S.current=!0;let _=k.getObjects(),X=new Set(m.elements.map(n=>n.id));_.forEach(n=>{var o;let f=(o=n.get("data"))==null?void 0:o.id;f&&!X.has(f)&&k.remove(n)});let Q=[...m.elements].sort((n,f)=>(n.zIndex||0)-(f.zIndex||0));for(let n of Q){let f=_.find(o=>{var x;return((x=o.get("data"))==null?void 0:x.id)===n.id});if(f&&f.type==="textbox"&&!(f instanceof Ee)&&(k.remove(f),f=null),f){if(f===k.getActiveObject()&&f.isType("textbox")&&f.isEditing)continue;let o={left:n.x,top:n.y,opacity:n.opacity!==void 0?n.opacity:1,zIndex:n.zIndex};n.type==="text"&&f.isType("textbox")?(o.text=n.content||" ",o.fontSize=n.fontSize||22,o.fill=n.color||"#000000",o.textBackgroundColor=n.highlightColor||"",o.textAlign=n.textAlign||"left",o.fontWeight=n.isBold?"bold":"normal",o.fontStyle=n.isItalic?"italic":"normal",o.underline=n.isUnderline||!1,o.linethrough=n.isStrikethrough||!1,o.charSpacing=n.charSpacing||0,o.fontFamily=n.fontFamily||"Arial",f.isBulleted=n.isBulleted,f.isNumbered=n.isNumbered,f.listType=n.listType,o.width=Math.max(n.width||50,10)):n.type==="shape"?(o.fill=n.fill||"#cccccc",o.scaleX=(n.width||50)/(f.width||1),o.scaleY=(n.height||50)/(f.height||1)):n.type==="image"&&(o.scaleX=(n.width||100)/(f.width||1),o.scaleY=(n.height||100)/(f.height||1)),f.set(o)}else{let o=null,x={left:n.x,top:n.y,data:{id:n.id},originX:"left",originY:"top",opacity:n.opacity!==void 0?n.opacity:1};if(n.type==="text")o=new Ee(n.content||" ",R(z({},x),{width:Math.max(n.width||200,10),fontSize:n.fontSize||22,fill:n.color||"#000000",backgroundColor:n.highlightColor||"",fontFamily:n.fontFamily||"Inter, Arial, sans-serif",textAlign:n.textAlign||"left",fontWeight:n.isBold?"bold":"normal",fontStyle:n.isItalic?"italic":"normal",underline:n.isUnderline||!1,linethrough:n.isStrikethrough||!1,charSpacing:n.charSpacing||0,splitByGrapheme:!1,objectCaching:!1})),o.isBulleted=n.isBulleted,o.isNumbered=n.isNumbered,o.listType=n.listType;else if(n.type==="shape"){let C=n.fill||"#3b82f6";if(n.shapeType==="ellipse")o=new le.Circle(R(z({},x),{radius:(n.width||100)/2,scaleY:(n.height||100)/(n.width||100),fill:C}));else if(n.shapeType==="rect")o=new le.Rect(R(z({},x),{width:n.width||100,height:n.height||100,fill:C}));else{let $=Aa[n.shapeType];if($){o=new le.Path($,R(z({},x),{fill:C}));let D=o;D.set({scaleX:(n.width||100)/(D.width||1),scaleY:(n.height||100)/(D.height||1)})}else o=new le.Rect(R(z({},x),{width:n.width||100,height:n.height||100,fill:C}))}}else if(n.type==="image")try{let C=await le.FabricImage.fromURL(n.src);C.set(R(z({},x),{scaleX:(n.width||100)/(C.width||1),scaleY:(n.height||100)/(C.height||1)})),o=C}catch(C){console.error(C)}o&&k.add(o)}}k.renderAll(),S.current=!1})()},[m,U]);let N=m.elements.find(k=>k.id===s);return(0,F.jsx)("div",{ref:y,className:"w-full h-full flex items-center justify-center overflow-hidden relative",children:(0,F.jsxs)("div",{className:"border border-slate-200 overflow-hidden bg-white shadow-xl transition-all duration-300 ease-out shrink-0 relative",style:{transform:`scale(${b})`,transformOrigin:"center center"},children:[(0,F.jsx)("canvas",{ref:T}),m.elements.length===0&&(0,F.jsx)("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none select-none animate-in fade-in duration-700",children:(0,F.jsx)("div",{className:"flex flex-col items-center gap-4 text-slate-300",children:(0,F.jsx)("div",{className:"flex flex-col items-center gap-1 text-center",children:(0,F.jsxs)("h1",{className:"text-2xl font-medium text-slate-400",children:["Click ",(0,F.jsx)("span",{className:"px-2 py-0.5 bg-slate-100 rounded-md text-slate-500 font-bold",children:"/"})," for options"]})})})}),N&&N.type==="image"&&(0,F.jsxs)("div",{className:"absolute z-[5000] flex flex-col w-96 bg-white border border-slate-200 shadow-2xl rounded-2xl overflow-hidden animate-in fade-in zoom-in duration-200",style:{left:N.x+N.width/2>600?`${N.x-12}px`:`${N.x+N.width+12}px`,top:`${N.y+N.height/2}px`,transform:N.x+N.width/2>600?"translate(-100%, -50%)":"translate(0, -50%)"},children:[(0,F.jsx)("div",{className:"px-5 py-3.5 text-sm uppercase tracking-wider font-bold text-slate-400 bg-slate-50/50 border-b border-slate-100",children:"Image Actions"}),(0,F.jsxs)("div",{className:"p-2.5 flex flex-col gap-1",children:[(0,F.jsxs)("button",{onClick:k=>{k.stopPropagation(),j()},className:"w-full flex items-center gap-5 px-5 py-4 text-left transition-all duration-150 rounded-xl hover:bg-slate-50 group",children:[(0,F.jsx)("div",{className:"p-3 rounded-xl bg-blue-50 text-blue-600 group-hover:bg-blue-600 group-hover:text-white transition-colors",children:(0,F.jsx)(Ae.Sparkles,{size:28})}),(0,F.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,F.jsx)("span",{className:"text-lg font-bold text-slate-900",children:"AI Generate Image"}),(0,F.jsx)("span",{className:"text-sm text-slate-400 truncate leading-tight",children:"Create an image with AI prompt"})]})]}),(0,F.jsxs)("button",{onClick:k=>{k.stopPropagation(),P()},className:"w-full flex items-center gap-5 px-5 py-4 text-left transition-all duration-150 rounded-xl hover:bg-slate-50 group",children:[(0,F.jsx)("div",{className:"p-3 rounded-xl bg-purple-50 text-purple-600 group-hover:bg-purple-600 group-hover:text-white transition-colors",children:(0,F.jsx)(Ae.PieChart,{size:28})}),(0,F.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,F.jsx)("span",{className:"text-lg font-bold text-slate-900",children:"AI Infographic"}),(0,F.jsx)("span",{className:"text-sm text-slate-400 truncate leading-tight",children:"Generate chart or diagram"})]})]}),(0,F.jsxs)("button",{onClick:k=>{k.stopPropagation(),M()},className:"w-full flex items-center gap-5 px-5 py-4 text-left transition-all duration-150 rounded-xl hover:bg-slate-50 group",children:[(0,F.jsx)("div",{className:"p-3 rounded-xl bg-slate-100 text-slate-500 group-hover:bg-slate-200 group-hover:text-slate-700 transition-colors",children:(0,F.jsx)(Ae.Image,{size:28})}),(0,F.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,F.jsx)("span",{className:"text-lg font-bold text-slate-700",children:"Change Image"}),(0,F.jsx)("span",{className:"text-sm text-slate-400 truncate leading-tight",children:"Replace with local file"})]})]}),(0,F.jsx)("div",{className:"h-[1px] bg-slate-100 my-1 mx-3"}),(0,F.jsxs)("button",{onClick:k=>{k.stopPropagation(),r()},className:"w-full flex items-center gap-5 px-5 py-4 text-left transition-all duration-150 rounded-xl hover:bg-red-50 group",children:[(0,F.jsx)("div",{className:"p-3 rounded-xl bg-red-50 text-red-500 group-hover:bg-red-500 group-hover:text-white transition-colors",children:(0,F.jsx)(Ae.Trash2,{size:28})}),(0,F.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,F.jsx)("span",{className:"text-lg font-bold text-red-600",children:"Delete Element"}),(0,F.jsx)("span",{className:"text-sm text-red-400/80 truncate leading-tight",children:"Remove from slide"})]})]})]})]})]})})};var Qt=He(require("pptxgenjs"));var qe=class{async export(a){var r,T;let c=new Qt.default,h=((r=a.layout)==null?void 0:r.width)||12192e3,v=((T=a.layout)==null?void 0:T.height)||6858e3,s=1200,j=675,P=g=>g/s*(h/914400),M=g=>g/j*(v/914400);a.slides.forEach(g=>{let S=c.addSlide();[...g.elements].sort((L,y)=>L.zIndex-y.zIndex).forEach(L=>{var Z,U;let y=L.opacity!==void 0?(1-L.opacity)*100:0,b={x:P(L.x),y:M(L.y),w:P(L.width),h:M(L.height)};if(L.type==="text")S.addText(L.content,R(z({},b),{fontSize:(L.fontSize||18)/2,color:((Z=L.color)==null?void 0:Z.replace("#",""))||"000000",fontFace:L.fontFamily||"Arial"}));else if(L.type==="image")S.addImage(R(z({},b),{path:L.src,transparency:y}));else if(L.type==="shape"){let J=L.shapeType==="ellipse"?c.ShapeType.ellipse:c.ShapeType.rect;S.addShape(J,R(z({},b),{fill:{color:((U=L.fill)==null?void 0:U.replace("#",""))||"CCCCCC",transparency:y>0?Math.min(y+10,100):0}}))}})}),await c.writeFile({fileName:"presentation.pptx"})}};var Et=He(require("jszip")),Xe=class{constructor(){this.slideWidth=12192e3;this.slideHeight=6858e3;this.CANVAS_WIDTH=1200;this.CANVAS_HEIGHT=675}async parse(a){var T,g;let c=a;if(typeof a=="string"){let S=await fetch(a);if(!S.ok){let V=S.status,L=S.statusText,y="";try{let b=await S.json();y=b.details||b.error||""}catch(b){}throw new Error(`Failed to fetch PPTX from ${a}: ${V} ${L} ${y?`(${y})`:""}`)}c=await S.arrayBuffer()}let h=await Et.default.loadAsync(c),v=await((T=h.file("ppt/presentation.xml"))==null?void 0:T.async("string"));if(!v)throw new Error("Invalid PPTX");let j=new DOMParser().parseFromString(v,"text/xml"),P=this.findFirstByLocalName(j,"sldSz");P&&(this.slideWidth=parseInt(this.getAttr(P,"cx")||"12192000"),this.slideHeight=parseInt(this.getAttr(P,"cy")||"6858000"));let M=Array.from(j.getElementsByTagNameNS("*","sldId")),r=[];for(let S=0;S<M.length;S++){let V=S+1,L=`ppt/slides/slide${V}.xml`,y=await((g=h.file(L))==null?void 0:g.async("string"));if(y){let b=await this.parseSlide(y,V,h);r.push(b)}}return{slides:r,layout:{width:this.slideWidth,height:this.slideHeight}}}getAttr(a,c){return a.getAttribute(c)||a.getAttribute(`a:${c}`)||a.getAttribute(`p:${c}`)||a.getAttribute(`r:${c}`)}findFirstByLocalName(a,c){let h=a.getElementsByTagNameNS("*",c);return h.length>0?h[0]:null}findAllByLocalName(a,c){return Array.from(a.getElementsByTagNameNS("*",c))}scaleX(a){return a/this.slideWidth*this.CANVAS_WIDTH}scaleY(a){return a/this.slideHeight*this.CANVAS_HEIGHT}parseColor(a){let c=this.findFirstByLocalName(a,"srgbClr");if(c){let v=`#${this.getAttr(c,"val")}`,s=this.findFirstByLocalName(c,"alpha"),j=s?parseInt(this.getAttr(s,"val")||"100000")/1e5:1;return{color:v,opacity:j}}let h=this.findFirstByLocalName(a,"schemeClr");if(h){let v=this.findFirstByLocalName(h,"alpha");return{color:"#000000",opacity:v?parseInt(this.getAttr(v,"val")||"100000")/1e5:1}}return{color:"#000000",opacity:1}}async resolveImage(a,c,h){var r,T;let v=await((r=h.file(`ppt/slides/_rels/slide${c}.xml.rels`))==null?void 0:r.async("string"));if(!v)return null;let j=new DOMParser().parseFromString(v,"text/xml"),P=Array.from(j.getElementsByTagName("Relationship")).find(g=>g.getAttribute("Id")===a),M=P==null?void 0:P.getAttribute("Target");if(M){let g=(M.startsWith("../")?`ppt/${M.substring(3)}`:`ppt/slides/${M}`).replace("ppt/slides/../","ppt/");return await((T=h.file(g))==null?void 0:T.async("blob"))||null}return null}async parseSlide(a,c,h){let s=new DOMParser().parseFromString(a,"text/xml"),j=[],P=0,M=this.findFirstByLocalName(s,"bg");if(M){let g=this.findFirstByLocalName(M,"blip"),S=(g==null?void 0:g.getAttributeNS("http://schemas.openxmlformats.org/officeDocument/2006/relationships","embed"))||(g==null?void 0:g.getAttribute("r:embed"));if(S){let V=await this.resolveImage(S,c,h);V&&j.push({id:`bg-${c}`,type:"image",src:URL.createObjectURL(V),x:0,y:0,width:this.CANVAS_WIDTH,height:this.CANVAS_HEIGHT,zIndex:P++,opacity:1})}}let r=this.findFirstByLocalName(s,"spTree");if(!r)return{id:`slide-${c}`,elements:j};let T=Array.from(r.children);for(let g of T){let S=g.localName;if(S==="sp"){let V=this.findFirstByLocalName(g,"txBody"),L=this.findFirstByLocalName(g,"nvSpPr"),y=L?this.findFirstByLocalName(L,"nvPr"):null,b=y?this.findFirstByLocalName(y,"ph"):null,Z=b?this.getAttr(b,"type"):null,U=b&&(!Z||Z==="body"),J=this.findFirstByLocalName(g,"xfrm"),te=J?this.findFirstByLocalName(J,"off"):null,N=J?this.findFirstByLocalName(J,"ext"):null;if(V&&te&&N){let K=this.findAllByLocalName(V,"p"),_="",X=18,Q="#000000",n=1,f=!1,o=!1;for(let x of K){let C=this.findFirstByLocalName(x,"pPr"),$=C?this.findFirstByLocalName(C,"buNone"):null,D="";C&&!$?this.findFirstByLocalName(C,"buAutoNum")?o=!0:(this.findFirstByLocalName(C,"buChar")||parseInt(this.getAttr(C,"indent")||"0")<0||U)&&(f=!0):!C&&U&&(f=!0);let se=this.findAllByLocalName(x,"r");for(let xe of se){let ae=this.findFirstByLocalName(xe,"t");ae&&(D+=ae.textContent);let E=this.findFirstByLocalName(xe,"rPr");if(E){let W=this.getAttr(E,"sz");W&&(X=parseInt(W)/100*2);let oe=this.parseColor(E);Q=oe.color,n=oe.opacity}}let ne=/^\s*([•\u2022\u2023\u25E6\u2043\u2219])\s+/;D.match(ne)&&(f=!0,D=D.replace(ne,"")),_+=D+`
|
|
4
|
-
`}if(_.trim()){j.push({id:`el-${c}-${Date.now()}-${P}`,type:"text",content:_.trim(),x:this.scaleX(parseInt(this.getAttr(te,"x")||"0")),y:this.scaleY(parseInt(this.getAttr(te,"y")||"0")),width:this.scaleX(parseInt(this.getAttr(N,"cx")||"0")),height:this.scaleY(parseInt(this.getAttr(N,"cy")||"0")),fontSize:X,color:Q,fontFamily:"Arial",zIndex:P++,isBulleted:f,isNumbered:o,listType:o?"number-decimal":f?"bullet-disc":"none",opacity:n});continue}}let k=this.findFirstByLocalName(g,"prstGeom");if(k&&te&&N){let K=this.getAttr(k,"prst")||"rect",_=this.findFirstByLocalName(g,"spPr"),X=_?this.parseColor(_):{color:"#cccccc",opacity:1},Q={rect:"rect",roundRect:"rect",ellipse:"ellipse",circle:"ellipse",triangle:"triangle",rtTriangle:"rightTriangle",diamond:"rhombus",parallelogram:"parallelogram",trapezoid:"trapezoid",pentagon:"pentagon",hexagon:"hexagon",heptagon:"heptagon",octagon:"octagon",heart:"heart",smileyFace:"smiley",sun:"sun",moon:"moon",rightArrow:"arrowRight",leftArrow:"arrowLeft",upArrow:"arrowUp",downArrow:"arrowDown",leftRightArrow:"arrowLeftRight",upDownArrow:"arrowUpDown",star4:"star4",star5:"star5",star6:"star6",star8:"star8",cloud:"cloud",lightningBolt:"lightning",plus:"plus",minus:"minus",multiply:"multiply",divide:"divide",equal:"equal"};j.push({id:`el-${c}-${Date.now()}-${P}`,type:"shape",shapeType:Q[K]||"rect",fill:X.color,opacity:X.opacity,x:this.scaleX(parseInt(this.getAttr(te,"x")||"0")),y:this.scaleY(parseInt(this.getAttr(te,"y")||"0")),width:this.scaleX(parseInt(this.getAttr(N,"cx")||"0")),height:this.scaleY(parseInt(this.getAttr(N,"cy")||"0")),zIndex:P++})}}if(S==="pic"){let V=this.findFirstByLocalName(g,"blip"),L=(V==null?void 0:V.getAttributeNS("http://schemas.openxmlformats.org/officeDocument/2006/relationships","embed"))||(V==null?void 0:V.getAttribute("r:embed")),y=this.findFirstByLocalName(g,"xfrm"),b=y?this.findFirstByLocalName(y,"off"):null,Z=y?this.findFirstByLocalName(y,"ext"):null;if(L&&b&&Z){let U=await this.resolveImage(L,c,h);U&&j.push({id:`el-${c}-${Date.now()}-${P}`,type:"image",src:URL.createObjectURL(U),x:this.scaleX(parseInt(this.getAttr(b,"x")||"0")),y:this.scaleY(parseInt(this.getAttr(b,"y")||"0")),width:this.scaleX(parseInt(this.getAttr(Z,"cx")||"0")),height:this.scaleY(parseInt(this.getAttr(Z,"cy")||"0")),zIndex:P++,opacity:1})}}}return{id:`slide-${c}`,elements:j}}};var Re=require("react"),De=require("lucide-react");var ge=require("react/jsx-runtime"),vt=({presentation:m,initialSlideIndex:a,onClose:c})=>{let[h,v]=(0,Re.useState)(a),s=m.slides[h],j=()=>{h>0&&v(h-1)},P=()=>{h<m.slides.length-1&&v(h+1)};(0,Re.useEffect)(()=>{let T=g=>{g.key==="ArrowRight"||g.key===" "||g.key==="PageDown"?P():g.key==="ArrowLeft"||g.key==="Backspace"||g.key==="PageUp"?j():g.key==="Escape"&&c()};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[h]);let[M,r]=(0,Re.useState)(1);return(0,Re.useEffect)(()=>{let T=()=>{let S=window.innerWidth-40,V=window.innerHeight-40,L=1200,y=675,b=S/L,Z=V/y,U=Math.min(b,Z);r(U)};return T(),window.addEventListener("resize",T),()=>window.removeEventListener("resize",T)},[]),(0,ge.jsxs)("div",{className:"fixed inset-0 z-[99999] bg-[#0A0A0A] flex flex-col items-center justify-center overflow-hidden",children:[(0,ge.jsxs)("div",{className:"absolute top-0 left-0 right-0 p-6 flex justify-between items-center opacity-0 hover:opacity-100 transition-opacity bg-gradient-to-b from-black/60 to-transparent z-[100] pointer-events-none",children:[(0,ge.jsxs)("div",{className:"text-white/80 font-bold ml-4 pointer-events-auto",children:["Slide ",h+1," of ",m.slides.length]}),(0,ge.jsx)("button",{onClick:c,className:"p-3 bg-white/10 hover:bg-white/20 text-white rounded-full transition-all pointer-events-auto",children:(0,ge.jsx)(De.X,{size:24})})]}),(0,ge.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:(0,ge.jsx)("div",{className:"relative shadow-2xl shadow-black/80 bg-white",style:{width:"1200px",height:"675px",transform:`scale(${M})`,transformOrigin:"center center"},children:(0,ge.jsx)(et,{slide:s,onElementUpdate:()=>{},onSelect:()=>{},uiScale:.75,onSlashCommand:()=>{},selectedElementId:null,onAiGenerateClick:()=>{},onAiGenerateInfographicClick:()=>{},onUploadImageClick:()=>{},onDeleteElement:()=>{}})})}),(0,ge.jsxs)("div",{className:"absolute bottom-10 left-1/2 -translate-x-1/2 flex items-center gap-6 opacity-0 hover:opacity-100 transition-opacity bg-black/40 backdrop-blur-md px-6 py-3 rounded-full border border-white/10 pointer-events-auto",children:[(0,ge.jsx)("button",{disabled:h===0,onClick:j,className:"p-2 text-white/50 hover:text-white disabled:opacity-20 transition-colors",children:(0,ge.jsx)(De.ChevronLeft,{size:32})}),(0,ge.jsx)("div",{className:"h-6 w-[1px] bg-white/10"}),(0,ge.jsx)("button",{disabled:h===m.slides.length-1,onClick:P,className:"p-2 text-white/50 hover:text-white disabled:opacity-20 transition-colors",children:(0,ge.jsx)(De.ChevronRight,{size:32})})]})]})};var wt=require("@google/generative-ai");var re=He(require("react")),u=require("lucide-react");var t=require("react/jsx-runtime"),Pa=["Inter","Arial","Lato","Open Sans","Poppins","Roboto","Georgia","Times New Roman"],Ta=[8,9,10,11,12,14,16,18,20,24,28,32,36,48,64,72,96],ea=({onClose:m,onAction:a,position:c,canUseAi:h,mode:v="default",context:s,aiResult:j,isAiLoading:P,onAiResponseAction:M})=>{let[r,T]=(0,re.useState)(""),[g,S]=(0,re.useState)(0),V=(0,re.useRef)(null),[L,y]=(0,re.useState)(!1),[b,Z]=(0,re.useState)(!1),[U,J]=(0,re.useState)(!1),[te,N]=(0,re.useState)(!1),[k,K]=(0,re.useState)(!1),_=(0,re.useMemo)(()=>[{id:"generate-image",label:"AI Generate Image",icon:u.Sparkles,category:"AI",description:"Create an image with AI prompt",action:()=>a("generate-image")},{id:"generate-infographic",label:"AI Generate Infographic",icon:u.PieChart,category:"AI",description:"Create an infographic with AI prompt",action:()=>a("generate-infographic")},{id:"text",label:"Text Box",icon:u.Type,category:"Basic",description:"Insert a new text element",action:()=>a("add-text")},{id:"image",label:"Image",icon:u.Image,category:"Basic",description:"Upload and insert an image",action:()=>a("add-image")},{id:"new-slide",label:"New Slide",icon:u.PlusCircle,category:"Canvas",description:"Add a fresh slide to deck",action:()=>a("new-slide")},{id:"rect",label:"Rectangle",icon:u.Square,category:"Shapes",action:()=>a("add-shape","rect")},{id:"circle",label:"Circle",icon:u.Circle,category:"Shapes",action:()=>a("add-shape","circle")},{id:"triangle",label:"Triangle",icon:u.Triangle,category:"Shapes",action:()=>a("add-shape","triangle")},{id:"star5",label:"Star",icon:u.Star,category:"Shapes",action:()=>a("add-shape","star5")},{id:"arrowRight",label:"Arrow",icon:u.ArrowRight,category:"Shapes",action:()=>a("add-shape","arrowRight")}],[a]),X=(0,re.useMemo)(()=>_.filter(f=>f.label.toLowerCase().includes(r.toLowerCase())||f.category.toLowerCase().includes(r.toLowerCase())),[_,r]);if((0,re.useEffect)(()=>{S(0)},[r]),(0,re.useEffect)(()=>{let f=o=>{v==="default"&&(o.key==="ArrowDown"?(o.preventDefault(),S(x=>(x+1)%X.length)):o.key==="ArrowUp"?(o.preventDefault(),S(x=>(x-1+X.length)%X.length)):o.key==="Enter"&&(o.preventDefault(),X[g]&&X[g].action())),o.key==="Escape"&&(o.preventDefault(),m())};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[X,g,m,v]),(0,re.useEffect)(()=>{if(v==="default"&&V.current){let f=V.current.children[g];f&&f.scrollIntoView({block:"nearest"})}},[g,v]),v==="default"&&X.length===0&&r==="")return null;if(v==="textbox"||v==="text-selection"){let f=(s==null?void 0:s.fontFamily)||"Arial",o=(s==null?void 0:s.fontSize)||24,x=(0,re.useRef)(null),[C,$]=(0,re.useState)(null);re.default.useLayoutEffect(()=>{if(x.current){let G=x.current.getBoundingClientRect(),xe=window.innerWidth,ae=window.innerHeight,E=c.x,W=c.y;E+G.width>xe-100&&(E=xe-G.width-100),E=Math.max(10,E),W+G.height>ae-20&&(W=ae-G.height-20),$({x:E,y:W})}},[c.x,c.y]);let D=C||{x:c.x,y:c.y},se=C?1:0,ne=D.y>window.innerHeight/2;return(0,t.jsxs)("div",{ref:x,className:"fixed z-[9999] bg-white rounded-xl shadow-[0_20px_50px_rgba(0,0,0,0.15)] border border-slate-200 p-2.5 flex flex-col gap-2.5 animate-in fade-in zoom-in-95 duration-200",style:{left:`${D.x}px`,top:`${D.y}px`,width:"auto",minWidth:"440px",maxWidth:"90vw",opacity:se},onClick:G=>G.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 h-9",children:[(0,t.jsxs)("div",{className:"flex items-center bg-slate-50 border border-slate-200 rounded-lg h-full flex-1 shadow-sm",children:[(0,t.jsxs)("div",{className:"relative flex-1",children:[(0,t.jsxs)("button",{onClick:()=>{y(!L),Z(!1)},className:"w-full flex items-center justify-between px-3 h-full text-xs font-bold text-slate-800 hover:bg-white transition-colors border-r border-slate-100 rounded-l-lg",children:[(0,t.jsx)("span",{className:"truncate",children:f}),(0,t.jsx)(u.ChevronDown,{size:14,className:"text-slate-400"})]}),L&&(0,t.jsx)("div",{className:"absolute top-full left-0 mt-1 bg-white border border-slate-200 rounded-lg shadow-2xl z-50 py-1 min-w-[180px] max-h-[250px] overflow-y-auto animate-in fade-in slide-in-from-top-2",children:Pa.map(G=>(0,t.jsx)("button",{onClick:()=>{a("format",{fontFamily:G}),y(!1)},className:I("w-full text-left px-4 py-2 text-xs hover:bg-blue-50 transition-colors",f===G?"text-blue-600 font-bold bg-blue-100/50":"text-slate-700"),style:{fontFamily:G},children:G},G))})]}),(0,t.jsxs)("div",{className:"relative w-16",children:[(0,t.jsxs)("button",{onClick:()=>{Z(!b),y(!1)},className:"w-full flex items-center justify-between px-2 h-full text-xs font-black text-slate-900 hover:bg-white transition-colors rounded-r-lg",children:[(0,t.jsx)("span",{children:o}),(0,t.jsx)(u.ChevronDown,{size:14,className:"text-slate-400"})]}),b&&(0,t.jsx)("div",{className:"absolute top-full right-0 mt-1 bg-white border border-slate-200 rounded-lg shadow-2xl z-50 py-1 min-w-[80px] max-h-[250px] overflow-y-auto animate-in fade-in slide-in-from-top-2",children:Ta.map(G=>(0,t.jsx)("button",{onClick:()=>{a("format",{fontSize:G}),Z(!1)},className:I("w-full text-center px-4 py-2 text-xs hover:bg-blue-50 transition-colors",o===G?"text-blue-600 font-bold bg-blue-100/50":"text-slate-700"),children:G},G))})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 px-1 bg-slate-50 border border-slate-200 rounded-lg h-full shadow-sm",children:[(0,t.jsxs)("button",{onClick:()=>a("format",{fontSize:o+2}),className:"p-1 hover:bg-white hover:text-blue-600 rounded-md text-slate-500 transition-all active:scale-95 flex items-center justify-center",title:"Increase font size",children:[(0,t.jsx)("span",{className:"text-[13px] font-black leading-none translate-y-[1px]",children:"A"}),(0,t.jsx)(u.ChevronUp,{size:10,strokeWidth:4,className:"ml-0.5"})]}),(0,t.jsxs)("button",{onClick:()=>a("format",{fontSize:Math.max(1,o-2)}),className:"p-1 hover:bg-white hover:text-blue-600 rounded-md text-slate-500 transition-all active:scale-95 flex items-center justify-center",title:"Decrease font size",children:[(0,t.jsx)("span",{className:"text-[11px] font-black leading-none translate-y-[1px]",children:"A"}),(0,t.jsx)(u.ChevronDown,{size:10,strokeWidth:4,className:"ml-0.5"})]})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5 border-t border-slate-100 pt-2.5 flex-nowrap",children:[(0,t.jsx)("button",{onClick:()=>a("format",{isBold:!(s!=null&&s.isBold)}),className:I("p-1.5 rounded-md transition-all",s!=null&&s.isBold?"text-blue-600 bg-blue-50 shadow-sm":"text-slate-200 hover:bg-slate-50 hover:text-slate-500"),title:"Bold",children:(0,t.jsx)(u.Bold,{size:18,strokeWidth:2})}),(0,t.jsx)("button",{onClick:()=>a("format",{isItalic:!(s!=null&&s.isItalic)}),className:I("p-1.5 rounded-md transition-all",s!=null&&s.isItalic?"text-blue-600 bg-blue-50 shadow-sm":"text-slate-200 hover:bg-slate-50 hover:text-slate-500"),title:"Italic",children:(0,t.jsx)(u.Italic,{size:18,strokeWidth:2})}),(0,t.jsx)("button",{onClick:()=>a("format",{isUnderline:!(s!=null&&s.isUnderline)}),className:I("p-1.5 rounded-md transition-all",s!=null&&s.isUnderline?"text-blue-600 bg-blue-50 shadow-sm":"text-slate-200 hover:bg-slate-50 hover:text-slate-500"),title:"Underline",children:(0,t.jsx)(u.Underline,{size:18,strokeWidth:2})}),(0,t.jsx)("div",{className:"w-[1px] h-4 bg-slate-100 mx-1.5"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("button",{onClick:()=>K(!k),className:I("flex items-center gap-1.5 px-2 py-1 rounded-md transition-all text-sm font-bold whitespace-nowrap",k?"bg-purple-50 text-purple-600 ring-1 ring-purple-100":"text-slate-500 hover:bg-purple-50 hover:text-purple-600"),children:[(0,t.jsx)(u.Sparkles,{size:14,className:k?"fill-purple-300":""}),(0,t.jsx)("span",{children:"Ask AI"}),(0,t.jsx)(u.ChevronDown,{size:12,className:"opacity-50"})]}),k&&(0,t.jsxs)("div",{className:I("absolute left-0 w-80 bg-white border border-slate-200 rounded-xl shadow-2xl z-[1000] animate-in fade-in zoom-in-95 duration-200 overflow-hidden text-left",ne?"bottom-full mb-2 origin-bottom-left":"top-full mt-2 origin-top-left"),children:[(0,t.jsx)("div",{className:"px-3 py-2.5 bg-purple-50/50 border-b border-purple-100 flex items-center justify-between",children:(0,t.jsxs)("span",{className:"text-xs font-bold text-purple-700 uppercase tracking-wider flex items-center gap-2",children:[(0,t.jsx)(u.Sparkles,{size:12}),"Ask AI"]})}),P?(0,t.jsxs)("div",{className:"p-8 flex flex-col items-center justify-center gap-3 text-slate-400",children:[(0,t.jsx)(u.RefreshCw,{size:24,className:"animate-spin text-purple-500"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:"AI is thinking..."})]}):j?(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"p-4 bg-slate-50/50 max-h-[200px] overflow-y-auto text-sm text-slate-700 leading-relaxed border-b border-slate-100",children:j}),(0,t.jsxs)("div",{className:"p-1.5 flex flex-col gap-0.5",children:[(0,t.jsxs)("button",{onClick:()=>{M==null||M("replace"),K(!1)},className:"flex items-center gap-2 px-2 py-2 text-sm text-slate-700 hover:bg-slate-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(u.Check,{size:14,className:"text-slate-400"}),(0,t.jsx)("span",{children:"Replace selection"})]}),(0,t.jsxs)("button",{onClick:()=>{M==null||M("addBelow"),K(!1)},className:"flex items-center gap-2 px-2 py-2 text-sm text-slate-700 hover:bg-slate-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(u.ArrowRightFromLine,{size:14,className:"text-slate-400 rotate-90"}),(0,t.jsx)("span",{children:"Insert below"})]}),(0,t.jsxs)("button",{onClick:()=>{M==null||M("regenerate"),K(!1)},className:"flex items-center gap-2 px-2 py-2 text-sm text-blue-600 hover:bg-blue-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(u.RefreshCw,{size:14}),(0,t.jsx)("span",{children:"Try again"})]}),(0,t.jsx)("div",{className:"h-[1px] bg-slate-100 my-1"}),(0,t.jsxs)("button",{onClick:()=>{M==null||M("discard"),K(!1)},className:"flex items-center gap-2 px-2 py-2 text-sm text-red-600 hover:bg-red-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(u.Trash2,{size:14}),(0,t.jsx)("span",{children:"Discard"})]})]})]}):(0,t.jsxs)("div",{className:"p-1.5 flex flex-col gap-0.5",children:[(0,t.jsx)("div",{className:"px-2 py-1 text-[10px] font-bold text-slate-400 uppercase tracking-widest mt-1",children:"Edit Selection"}),(0,t.jsxs)("button",{onClick:()=>{a("ai-text-edit","rewrite")},className:"flex items-center gap-2 px-2 py-2 text-sm text-slate-700 hover:bg-slate-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(u.RefreshCw,{size:14,className:"text-blue-500"}),(0,t.jsx)("span",{children:"Improve writing"})]}),(0,t.jsxs)("button",{onClick:()=>{a("ai-text-edit","grammar")},className:"flex items-center gap-2 px-2 py-2 text-sm text-slate-700 hover:bg-slate-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(u.SpellCheck,{size:14,className:"text-green-500"}),(0,t.jsx)("span",{children:"Fix grammar"})]}),(0,t.jsxs)("button",{onClick:()=>{a("ai-text-edit","shorten")},className:"flex items-center gap-2 px-2 py-2 text-sm text-slate-700 hover:bg-slate-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(u.ALargeSmall,{size:14,className:"text-orange-500"}),(0,t.jsx)("span",{children:"Make shorter"})]}),(0,t.jsxs)("button",{onClick:()=>{a("ai-text-edit","lengthen")},className:"flex items-center gap-2 px-2 py-2 text-sm text-slate-700 hover:bg-slate-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(u.ArrowRightFromLine,{size:14,className:"text-purple-500"}),(0,t.jsx)("span",{children:"Make longer"})]}),(0,t.jsx)("div",{className:"h-[1px] bg-slate-100 my-1"}),(0,t.jsx)("div",{className:"px-2 py-1 text-[10px] font-bold text-slate-400 uppercase tracking-widest",children:"Generate"}),(0,t.jsxs)("button",{onClick:()=>{a("generate-image"),K(!1)},className:"flex items-center gap-2 px-2 py-2 text-sm text-slate-700 hover:bg-slate-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(u.Image,{size:14,className:"text-pink-500"}),(0,t.jsx)("span",{children:"Generate Image"})]}),(0,t.jsxs)("button",{onClick:()=>{a("generate-infographic"),K(!1)},className:"flex items-center gap-2 px-2 py-2 text-sm text-slate-700 hover:bg-slate-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(u.PieChart,{size:14,className:"text-indigo-500"}),(0,t.jsx)("span",{children:"Generate Infographic"})]}),(0,t.jsx)("div",{className:"h-[1px] bg-slate-100 my-1"}),(0,t.jsx)("div",{className:"px-2 py-1 text-[10px] font-bold text-slate-400 uppercase tracking-widest",children:"More"}),(0,t.jsxs)("button",{onClick:()=>{a("ai-text-edit","continue")},className:"flex items-center gap-2 px-2 py-2 text-sm text-slate-700 hover:bg-slate-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(u.MoveDown,{size:14,className:"text-teal-500"}),(0,t.jsx)("span",{children:"Continue writing"})]})]})]})]}),(0,t.jsx)("div",{className:"w-[1px] h-4 bg-slate-100 mx-1.5"}),(0,t.jsxs)("div",{className:"relative flex items-center rounded-md transition-all",children:[(0,t.jsx)("button",{onClick:()=>a("format",{isBulleted:!(s!=null&&s.isBulleted),isNumbered:!1,listType:s!=null&&s.isBulleted?"none":"bullet-disc"}),className:I("p-1.5 rounded-l-md transition-all",s!=null&&s.isBulleted?"text-blue-600 bg-blue-50":"text-slate-500 hover:bg-slate-50"),title:"Bullets",children:(0,t.jsx)(u.List,{size:18,strokeWidth:2.5})}),(0,t.jsx)("button",{onClick:()=>J(!U),className:I("p-0.5 rounded-r-md border-l border-transparent hover:border-slate-200 transition-all",U?"bg-slate-100":"hover:bg-slate-50"),children:(0,t.jsx)(u.ChevronDown,{size:10,className:"text-slate-400"})}),U&&(0,t.jsxs)("div",{className:"absolute top-full left-0 mt-1 bg-white border border-slate-200 rounded-lg shadow-xl p-2 z-[100] animate-in fade-in zoom-in-95 duration-150 w-64 grid grid-cols-4 gap-2",children:[(0,t.jsx)("button",{onClick:()=>{a("format",{isBulleted:!1,listType:"none"}),J(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1",children:(0,t.jsx)("span",{className:"text-[10px] text-slate-500",children:"None"})}),(0,t.jsx)("button",{onClick:()=>{a("format",{isBulleted:!0,isNumbered:!1,listType:"bullet-disc"}),J(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,t.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("div",{className:"w-1 h-1 rounded-full bg-black"}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("div",{className:"w-1 h-1 rounded-full bg-black"}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,t.jsx)("button",{onClick:()=>{a("format",{isBulleted:!0,isNumbered:!1,listType:"bullet-circle"}),J(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,t.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("div",{className:"w-1 h-1 rounded-full border border-black bg-transparent"}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("div",{className:"w-1 h-1 rounded-full border border-black bg-transparent"}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,t.jsx)("button",{onClick:()=>{a("format",{isBulleted:!0,isNumbered:!1,listType:"bullet-square"}),J(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,t.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("div",{className:"w-1 h-1 bg-black"}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("div",{className:"w-1 h-1 bg-black"}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,t.jsx)("button",{onClick:()=>{a("format",{isBulleted:!0,isNumbered:!1,listType:"bullet-check"}),J(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,t.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-[6px]",children:"\u2713"}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-[6px]",children:"\u2713"}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})})]})]}),(0,t.jsxs)("div",{className:"relative text-black flex items-center rounded-md transition-all",children:[(0,t.jsx)("button",{onClick:()=>a("format",{isNumbered:!(s!=null&&s.isNumbered),isBulleted:!1,listType:s!=null&&s.isNumbered?"none":"number-decimal"}),className:I("p-1.5 rounded-l-md transition-all",s!=null&&s.isNumbered?"text-blue-600 bg-blue-50":"text-slate-500 hover:bg-slate-50"),title:"Numbering",children:(0,t.jsx)(u.ListOrdered,{size:18,strokeWidth:2.5})}),(0,t.jsx)("button",{onClick:()=>N(!te),className:I("p-0.5 rounded-r-md border-l border-transparent hover:border-slate-200 transition-all",te?"bg-slate-100":"hover:bg-slate-50"),children:(0,t.jsx)(u.ChevronDown,{size:10,className:"text-slate-400"})}),te&&(0,t.jsxs)("div",{className:"absolute text-black top-full left-0 mt-1 bg-white border border-slate-200 rounded-lg shadow-xl p-2 z-[100] animate-in fade-in zoom-in-95 duration-150 w-64 grid grid-cols-4 gap-2",children:[(0,t.jsx)("button",{onClick:()=>{a("format",{isNumbered:!1,listType:"none"}),N(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1",children:(0,t.jsx)("span",{className:"text-[10px] text-slate-500",children:"None"})}),(0,t.jsx)("button",{onClick:()=>{a("format",{isNumbered:!0,isBulleted:!1,listType:"number-decimal"}),N(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,t.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-[6px]",children:"1."}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-[6px]",children:"2."}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,t.jsx)("button",{onClick:()=>{a("format",{isNumbered:!0,isBulleted:!1,listType:"number-decimal-paren"}),N(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,t.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-[6px]",children:"1)"}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-[6px]",children:"2)"}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,t.jsx)("button",{onClick:()=>{a("format",{isNumbered:!0,isBulleted:!1,listType:"number-roman-lower"}),N(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,t.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-[6px]",children:"i."}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-[6px]",children:"ii."}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})})]})]}),(0,t.jsx)("div",{className:"w-[1px] h-4 bg-slate-100 mx-1.5"}),(0,t.jsxs)("div",{className:"relative flex items-center",children:[(0,t.jsxs)("button",{className:"w-7 h-[22px] flex flex-col items-center justify-center rounded-[3px] hover:bg-slate-100 transition-all relative",title:"Font Color",children:[(0,t.jsx)("span",{className:"text-[13px] font-black text-slate-800 leading-none",children:"A"}),(0,t.jsx)("div",{className:"w-4 h-[2.5px] rounded-sm mt-0.5",style:{backgroundColor:(s==null?void 0:s.color)||"#000000"}}),(0,t.jsx)("input",{type:"color",className:"absolute inset-0 opacity-0 cursor-pointer w-full h-full",value:(s==null?void 0:s.color)||"#000000",onChange:G=>a("format",{color:G.target.value})})]}),(0,t.jsx)(u.ChevronDown,{size:8,className:"text-slate-400 -ml-0.5"})]}),(0,t.jsxs)("div",{className:"relative flex items-center",children:[(0,t.jsxs)("button",{className:"w-7 h-[22px] flex flex-col items-center justify-center rounded-[3px] hover:bg-slate-100 transition-all relative",title:"Highlight Color",children:[(0,t.jsx)(u.Highlighter,{size:14,strokeWidth:2.5,className:s!=null&&s.highlightColor?"text-slate-900":"text-slate-500"}),(0,t.jsx)("div",{className:"w-4 h-[2.5px] rounded-sm mt-0.5",style:{backgroundColor:(s==null?void 0:s.highlightColor)||"transparent"}}),(0,t.jsx)("input",{type:"color",className:"absolute inset-0 opacity-0 cursor-pointer w-full h-full",value:(s==null?void 0:s.highlightColor)||"#ffff00",onChange:G=>a("format",{highlightColor:G.target.value})})]}),(0,t.jsx)(u.ChevronDown,{size:8,className:"text-slate-400 -ml-0.5"})]}),(0,t.jsx)("button",{onClick:()=>a("format",{isBold:!1,isItalic:!1,isUnderline:!1,highlightColor:"",color:"#000000"}),className:"p-1.5 rounded-md text-slate-400 hover:bg-slate-50 hover:text-slate-600 transition-all",title:"Clear Formatting",children:(0,t.jsx)(u.Eraser,{size:18,strokeWidth:2.5})}),(0,t.jsxs)("div",{className:"gap-0.5 ml-auto",children:[(0,t.jsx)("button",{onClick:()=>a("format",{textAlign:"left"}),className:I("p-1 rounded-[3px] transition-all",(s==null?void 0:s.textAlign)==="left"?"bg-blue-100 text-blue-600":"hover:bg-slate-100 text-slate-500"),children:(0,t.jsx)(u.AlignLeft,{size:12,strokeWidth:2.5})}),(0,t.jsx)("button",{onClick:()=>a("format",{textAlign:"center"}),className:I("p-1 rounded-[3px] transition-all",(s==null?void 0:s.textAlign)==="center"?"bg-blue-100 text-blue-600":"hover:bg-slate-100 text-slate-500"),children:(0,t.jsx)(u.AlignCenter,{size:12,strokeWidth:2.5})}),(0,t.jsx)("button",{onClick:()=>a("format",{textAlign:"right"}),className:I("p-1 rounded-[3px] transition-all",(s==null?void 0:s.textAlign)==="right"?"bg-blue-100 text-blue-600":"hover:bg-slate-100 text-slate-500"),children:(0,t.jsx)(u.AlignRight,{size:12,strokeWidth:2.5})}),(0,t.jsx)("button",{onClick:()=>a("format",{textAlign:"justify"}),className:I("p-1 rounded-[3px] transition-all",(s==null?void 0:s.textAlign)==="justify"?"bg-blue-100 text-blue-600":"hover:bg-slate-100 text-slate-500"),children:(0,t.jsx)(u.AlignJustify,{size:12,strokeWidth:2.5})})]})]})]})}let Q=Math.max(10,Math.min(c.x,window.innerWidth-300)),n=Math.max(10,Math.min(c.y,window.innerHeight-450));return(0,t.jsxs)("div",{className:"fixed z-[9999] w-72 bg-white rounded-xl shadow-2xl border border-slate-200 overflow-hidden flex flex-col animate-in fade-in zoom-in duration-200",style:{left:`${Q}px`,top:`${n}px`,maxHeight:"400px"},onClick:f=>f.stopPropagation(),children:[(0,t.jsxs)("div",{className:"p-3 border-b border-slate-100 flex items-center gap-2 bg-slate-50/50",children:[(0,t.jsx)(u.Search,{size:14,className:"text-slate-400"}),(0,t.jsx)("input",{autoFocus:!0,type:"text",placeholder:"Type a command...",className:"bg-transparent border-none outline-none text-sm w-full font-medium text-slate-700 placeholder:text-slate-400",value:r,onChange:f=>T(f.target.value)})]}),(0,t.jsx)("div",{ref:V,className:"overflow-y-auto py-2 px-1 custom-scrollbar",children:X.length>0?X.map((f,o)=>{let x=o===g,C=o===0||X[o-1].category!==f.category;return(0,t.jsxs)(re.default.Fragment,{children:[C&&(0,t.jsx)("div",{className:"px-3 py-1.5 text-[10px] uppercase tracking-wider font-bold text-slate-400",children:f.category}),(0,t.jsxs)("button",{className:I("w-full flex items-center gap-3 px-3 py-2 text-left transition-all duration-150 rounded-lg group",x?"bg-slate-100":"hover:bg-slate-50"),onClick:()=>f.action(),onMouseEnter:()=>S(o),children:[(0,t.jsx)("div",{className:I("p-1.5 rounded-md transition-colors flex items-center justify-center relative",x?"bg-white shadow-sm text-blue-600":"bg-slate-100 text-slate-500 group-hover:text-slate-700"),children:(0,t.jsx)(f.icon,{size:16})}),(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,t.jsx)("span",{className:I("text-sm font-semibold truncate",x?"text-slate-900":"text-slate-700"),children:f.label}),f.description&&(0,t.jsx)("span",{className:"text-[11px] text-slate-400 truncate leading-tight",children:f.description})]}),x&&(0,t.jsx)("div",{className:"ml-auto text-[10px] font-mono font-bold text-slate-400 flex items-center gap-1 border border-slate-200 rounded px-1 bg-white",children:(0,t.jsx)("span",{children:"\u21B5"})})]})]},f.id)}):(0,t.jsxs)("div",{className:"px-3 py-8 text-center flex flex-col items-center gap-2",children:[(0,t.jsx)("div",{className:"p-3 bg-slate-50 rounded-full",children:(0,t.jsx)(u.Search,{size:20,className:"text-slate-300"})}),(0,t.jsxs)("span",{className:"text-sm text-slate-400 font-medium whitespace-nowrap",children:['No commands found for "',r,'"']})]})}),(0,t.jsxs)("div",{className:"px-3 py-2 border-t border-slate-100 bg-slate-50/50 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1 text-[10px] font-medium text-slate-400",children:[(0,t.jsx)("span",{className:"border border-slate-200 rounded px-1 bg-white",children:"\u2191\u2193"}),(0,t.jsx)("span",{children:"to navigate"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 text-[10px] font-medium text-slate-400",children:[(0,t.jsx)("span",{className:"border border-slate-200 rounded px-1 bg-white",children:"Esc"}),(0,t.jsx)("span",{children:"to close"})]})]})]})};var q=require("lucide-react");var ta=require("react"),Be=require("lucide-react");var Le=require("react/jsx-runtime"),aa=({message:m,type:a="info",isOpen:c,onClose:h,autoHideDuration:v=4e3})=>{if((0,ta.useEffect)(()=>{if(c&&v>0){let P=setTimeout(()=>{h()},v);return()=>clearTimeout(P)}},[c,v,h]),!c)return null;let s={error:(0,Le.jsx)(Be.AlertCircle,{size:20,className:"text-white"}),success:(0,Le.jsx)(Be.CheckCircle,{size:20,className:"text-white"}),info:(0,Le.jsx)(Be.Info,{size:20,className:"text-white"})};return(0,Le.jsxs)("div",{className:I("fixed bottom-6 right-6 z-[10000] flex items-center gap-3 px-4 py-2 rounded-md shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300 min-w-[280px] max-w-[400px]",{error:"bg-red-500",success:"bg-emerald-500",info:"bg-slate-800"}[a]),children:[s[a],(0,Le.jsx)("span",{className:"text-white text-sm font-medium flex-1",children:m}),(0,Le.jsx)("button",{onClick:h,className:"p-1 hover:bg-white/20 rounded-full transition-colors ml-1",children:(0,Le.jsx)(Be.X,{size:14,className:"text-white"})})]})};var l=require("react/jsx-runtime"),Ha=({initialPresentation:m,url:a,appName:c="My Studio",onChange:h,geminiApiKey:v="AIzaSyAcBfseKzoFZJMfuRzhRJjygQ-u2UKFxOw",width:s,height:j,appBgColor:P="#B7472A",showHomeOnEmpty:M=!1,initialSource:r,onSourceChange:T,proxyUrl:g,onGenerateImage:S,onGenerateInfographic:V,onAiRewrite:L,onAiGrammar:y,onAiShorten:b,onAiLengthen:Z,onAiContinue:U,isTwoStepInfographicGeneration:J,onRefineInfographicPrompt:te})=>{var Ut,Ft;let[N,k]=(0,B.useState)(m||{slides:[{id:"slide-1",elements:[]}],layout:{width:12192e3,height:6858e3}}),[K,_]=(0,B.useState)([]),[X,Q]=(0,B.useState)([]),[n,f]=(0,B.useState)(0),[o,x]=(0,B.useState)(null),[C,$]=(0,B.useState)(!1),[D,se]=(0,B.useState)(null),[ne,G]=(0,B.useState)(!1),[xe,ae]=(0,B.useState)(r||(a?"url":null)),[E,W]=(0,B.useState)(M&&!m&&!a&&!r),[oe,Se]=(0,B.useState)(""),[me,Ne]=(0,B.useState)({visible:!1,position:{x:0,y:0},mode:"default"}),[ve,fe]=(0,B.useState)(!1),[O,tt]=(0,B.useState)(""),[at,rt]=(0,B.useState)(!1),[H,ie]=(0,B.useState)(null),[he,ke]=(0,B.useState)(!1),[_e,Pe]=(0,B.useState)(!1),[sa,Ye]=(0,B.useState)(!1),[st,Nt]=(0,B.useState)(""),[kt,Ct]=(0,B.useState)(!1),[Ce,ot]=(0,B.useState)(null),[it,Lt]=(0,B.useState)(!1),[oa,St]=(0,B.useState)(!1),[lt,Ve]=(0,B.useState)(null),[nt,zt]=(0,B.useState)({open:!1,message:"",type:"info"}),ze=(i,d="info")=>{zt({open:!0,message:i,type:d})};(0,B.useEffect)(()=>{H&&(ke(!1),Pe(!0))},[H]),(0,B.useEffect)(()=>{Ce&&(Lt(!1),Pe(!0))},[Ce]),(0,B.useEffect)(()=>{a&&Je(a)},[a]);let[It,Te]=(0,B.useState)(!1),[Ue,ct]=(0,B.useState)(null),Ke=(0,B.useMemo)(()=>{let i=typeof s=="number"?s:parseInt(String(s));return isNaN(i)?1:Math.min(Math.max(i/1600,.7),1)},[s]),we=N.slides[n],Fe=(0,B.useMemo)(()=>we.elements.find(i=>i.id===o)||null,[we,o]),$e=(0,B.useCallback)(i=>{_(d=>[...d.slice(-19),N]),Q([]),k(i),h==null||h(i)},[h,N]),Mt=()=>{if(K.length===0)return;let i=K[K.length-1];Q(d=>[...d,N]),_(d=>d.slice(0,-1)),k(i)},dt=()=>{if(X.length===0)return;let i=X[X.length-1];_(d=>[...d,N]),Q(d=>d.slice(0,-1)),k(i)},Ie=(0,B.useCallback)(i=>{k(d=>{let p=[...d.slides];p[n]=z(z({},p[n]),i);let A=R(z({},d),{slides:p});return _(ee=>[...ee.slice(-19),d]),Q([]),h==null||h(A),A})},[n,h]),Ze=(0,B.useCallback)((i,d)=>{k(p=>{let A=p.slides[n],ee=A.elements.map(ce=>ce.id===i?z(z({},ce),d):ce),ue=[...p.slides];ue[n]=R(z({},A),{elements:ee});let ye=R(z({},p),{slides:ue});return h==null||h(ye),ye})},[n,h]),At=i=>{if(!o)return;if(we.elements.find(p=>p.id===o)){Ze(o,i);let p=N.slides[n],A=p.elements.map(ue=>ue.id===o?z(z({},ue),i):ue),ee=[...N.slides];ee[n]=R(z({},p),{elements:A}),$e(R(z({},N),{slides:ee}))}},Ge=(0,B.useCallback)(()=>{if(!o)return;let d=N.slides[n].elements.filter(p=>p.id!==o);Ie({elements:d}),x(null)},[o,n,N,Ie]),Bt=()=>{let i={id:`text-${Date.now()}`,type:"text",content:"New Text",x:100,y:100,width:400,height:100,fontSize:48,fontFamily:"Arial",color:"#000000",zIndex:we.elements.length};Ie({elements:[...we.elements,i]})},Oe=(0,B.useCallback)(async i=>{let d="";typeof i=="string"?d=i:d=await new Promise(ee=>{let ue=new FileReader;ue.onload=ye=>{var ce;return ee((ce=ye.target)==null?void 0:ce.result)},ue.readAsDataURL(i)});let p=`img-${Date.now()}`,A={id:p,type:"image",src:d,x:100,y:100,width:400,height:250,zIndex:we.elements.length};Ie({elements:[...we.elements,A]}),x(p)},[we.elements,Ie,x]),Pt=i=>{let d={id:`shape-${Date.now()}`,type:"shape",shapeType:i,fill:"#3b82f6",x:200,y:200,width:200,height:200,zIndex:we.elements.length};Ie({elements:[...we.elements,d]})},Tt=()=>{let i={id:`slide-${Date.now()}`,elements:[]};$e(R(z({},N),{slides:[...N.slides,i]})),f(N.slides.length)},ia=i=>{if(N.slides.length<=1)return;let d=N.slides.filter((p,A)=>A!==i);$e(R(z({},N),{slides:d})),i<=n&&f(Math.max(0,n-1))},la=i=>{let d=N.slides[i],p=R(z({},d),{id:`slide-${Date.now()}`,elements:d.elements.map(ee=>R(z({},ee),{id:`${ee.type}-${Date.now()}-${Math.random().toString(36).substr(2,9)}`}))}),A=[...N.slides];A.splice(i+1,0,p),$e(R(z({},N),{slides:A})),f(i+1)},na=(i,d)=>{if(i===d)return;let p=[...N.slides],[A]=p.splice(i,1);p.splice(d,0,A),$e(R(z({},N),{slides:p})),n===i?f(d):n>i&&n<=d?f(n-1):n<i&&n>=d&&f(n+1)},ca=i=>{let d=[],p=Date.now();i==="title"?d=[{id:`text-title-${p}`,type:"text",content:"Presentation Title",x:100,y:200,width:1e3,height:150,fontSize:80,fontFamily:"Inter",color:"#000000",textAlign:"center",isBold:!0,zIndex:0},{id:`text-sub-${p}`,type:"text",content:"Subtitle goes here",x:200,y:380,width:800,height:80,fontSize:36,fontFamily:"Inter",color:"#64748b",textAlign:"center",zIndex:1}]:i==="content"?d=[{id:`text-title-${p}`,type:"text",content:"Slide Title",x:60,y:40,width:800,height:80,fontSize:48,fontFamily:"Inter",color:"#000000",isBold:!0,zIndex:0},{id:`text-body-${p}`,type:"text",content:`\u2022 Add your points here
|
|
2
|
+
"use strict";var ya=Object.create;var Ye=Object.defineProperty,Na=Object.defineProperties,ka=Object.getOwnPropertyDescriptor,Ca=Object.getOwnPropertyDescriptors,La=Object.getOwnPropertyNames,qt=Object.getOwnPropertySymbols,Sa=Object.getPrototypeOf,_t=Object.prototype.hasOwnProperty,za=Object.prototype.propertyIsEnumerable;var Xt=(u,a,c)=>a in u?Ye(u,a,{enumerable:!0,configurable:!0,writable:!0,value:c}):u[a]=c,z=(u,a)=>{for(var c in a||(a={}))_t.call(a,c)&&Xt(u,c,a[c]);if(qt)for(var c of qt(a))za.call(a,c)&&Xt(u,c,a[c]);return u},j=(u,a)=>Na(u,Ca(a));var Ia=(u,a)=>{for(var c in a)Ye(u,c,{get:a[c],enumerable:!0})},Yt=(u,a,c,m)=>{if(a&&typeof a=="object"||typeof a=="function")for(let v of La(a))!_t.call(u,v)&&v!==c&&Ye(u,v,{get:()=>a[v],enumerable:!(m=ka(a,v))||m.enumerable});return u};var Fe=(u,a,c)=>(c=u!=null?ya(Sa(u)):{},Yt(a||!u||!u.__esModule?Ye(c,"default",{value:u,enumerable:!0}):c,u)),Ma=u=>Yt(Ye({},"__esModule",{value:!0}),u);var $a={};Ia($a,{PptEditor:()=>Fa,PptxBlobExporter:()=>Ct,PptxExporter:()=>Ke,PptxParser:()=>Je});module.exports=Ma($a);function wt(u,{insertAt:a}={}){if(!u||typeof document=="undefined")return;let c=document.head||document.getElementsByTagName("head")[0],m=document.createElement("style");m.type="text/css",a==="top"&&c.firstChild?c.insertBefore(m,c.firstChild):c.appendChild(m),m.styleSheet?m.styleSheet.cssText=u:m.appendChild(document.createTextNode(u))}wt(`@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Lato:wght@400;700&family=Open+Sans:wght@400;600;700&family=Poppins:wght@400;500;600;700&family=Roboto:wght@400;500;700&family=Roboto+Slab:wght@400;700&family=Playfair+Display:wght@400;700&family=Merriweather:wght@400;700&family=Nunito+Sans:wght@400;600;700&family=Montserrat:wght@400;600;700&family=Oswald:wght@400;500&family=Raleway:wght@400;600;700&family=Ubuntu:wght@400;500;700&family=Lora:wght@400;700&family=PT+Sans:wght@400;700&family=PT+Serif:wght@400;700&family=Play:wght@400;700&family=Arvo:wght@400;700&family=Kanit:wght@400;500;600&display=swap";/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties;@layer theme,base,components,utilities;@layer theme{:root,:host{--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50: oklch(97.1% .013 17.38);--color-red-100: oklch(93.6% .032 17.717);--color-red-200: oklch(88.5% .062 18.334);--color-red-400: oklch(70.4% .191 22.216);--color-red-500: oklch(63.7% .237 25.331);--color-red-600: oklch(57.7% .245 27.325);--color-orange-50: oklch(98% .016 73.684);--color-orange-500: oklch(70.5% .213 47.604);--color-amber-500: oklch(76.9% .188 70.08);--color-green-500: oklch(72.3% .219 149.579);--color-emerald-50: oklch(97.9% .021 166.113);--color-emerald-100: oklch(95% .052 163.051);--color-emerald-400: oklch(76.5% .177 163.223);--color-emerald-500: oklch(69.6% .17 162.48);--color-emerald-600: oklch(59.6% .145 163.225);--color-emerald-700: oklch(50.8% .118 165.612);--color-teal-500: oklch(70.4% .14 182.503);--color-blue-50: oklch(97% .014 254.604);--color-blue-100: oklch(93.2% .032 255.585);--color-blue-400: oklch(70.7% .165 254.624);--color-blue-500: oklch(62.3% .214 259.815);--color-blue-600: oklch(54.6% .245 262.881);--color-blue-700: oklch(48.8% .243 264.376);--color-indigo-500: oklch(58.5% .233 277.117);--color-purple-50: oklch(97.7% .014 308.299);--color-purple-100: oklch(94.6% .033 307.174);--color-purple-300: oklch(82.7% .119 306.383);--color-purple-400: oklch(71.4% .203 305.504);--color-purple-500: oklch(62.7% .265 303.9);--color-purple-600: oklch(55.8% .288 302.321);--color-purple-700: oklch(49.6% .265 301.924);--color-pink-500: oklch(65.6% .241 354.308);--color-slate-50: oklch(98.4% .003 247.858);--color-slate-100: oklch(96.8% .007 247.896);--color-slate-200: oklch(92.9% .013 255.508);--color-slate-300: oklch(86.9% .022 252.894);--color-slate-400: oklch(70.4% .04 256.788);--color-slate-500: oklch(55.4% .046 257.417);--color-slate-600: oklch(44.6% .043 257.281);--color-slate-700: oklch(37.2% .044 257.287);--color-slate-800: oklch(27.9% .041 260.031);--color-slate-900: oklch(20.8% .042 265.755);--color-black: #000;--color-white: #fff;--spacing: .25rem;--container-2xl: 42rem;--text-xs: .75rem;--text-xs--line-height: calc(1 / .75);--text-sm: .875rem;--text-sm--line-height: calc(1.25 / .875);--text-base: 1rem;--text-base--line-height: 1.5 ;--text-lg: 1.125rem;--text-lg--line-height: calc(1.75 / 1.125);--text-xl: 1.25rem;--text-xl--line-height: calc(1.75 / 1.25);--text-2xl: 1.5rem;--text-2xl--line-height: calc(2 / 1.5);--text-4xl: 2.25rem;--text-4xl--line-height: calc(2.5 / 2.25);--font-weight-normal: 400;--font-weight-medium: 500;--font-weight-semibold: 600;--font-weight-bold: 700;--font-weight-black: 900;--tracking-tighter: -.05em;--tracking-tight: -.025em;--tracking-wide: .025em;--tracking-wider: .05em;--tracking-widest: .1em;--leading-tight: 1.25;--leading-relaxed: 1.625;--radius-sm: .25rem;--radius-md: .375rem;--radius-lg: .5rem;--radius-xl: .75rem;--radius-2xl: 1rem;--radius-3xl: 1.5rem;--ease-out: cubic-bezier(0, 0, .2, 1);--animate-spin: spin 1s linear infinite;--blur-sm: 8px;--blur-md: 12px;--aspect-video: 16 / 9;--default-transition-duration: .15s;--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);--default-font-family: var(--font-sans);--default-mono-font-family: var(--font-mono)}}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings, normal);font-variation-settings:var(--default-font-variation-settings, normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::placeholder{color:currentcolor;@supports (color: color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.top-0{top:calc(var(--spacing) * 0)}.top-1{top:calc(var(--spacing) * 1)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-5{top:calc(var(--spacing) * 5)}.top-10{top:calc(var(--spacing) * 10)}.top-\\[24px\\]{top:24px}.top-full{top:100%}.right-0{right:calc(var(--spacing) * 0)}.right-1{right:calc(var(--spacing) * 1)}.right-1\\.5{right:calc(var(--spacing) * 1.5)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.right-6{right:calc(var(--spacing) * 6)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-1{bottom:calc(var(--spacing) * 1)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-6{bottom:calc(var(--spacing) * 6)}.bottom-8{bottom:calc(var(--spacing) * 8)}.bottom-10{bottom:calc(var(--spacing) * 10)}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing) * 0)}.left-1{left:calc(var(--spacing) * 1)}.left-1\\.5{left:calc(var(--spacing) * 1.5)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-4{left:calc(var(--spacing) * 4)}.z-10{z-index:10}.z-50{z-index:50}.z-\\[100\\]{z-index:100}.z-\\[1000\\]{z-index:1000}.z-\\[2000\\]{z-index:2000}.z-\\[2001\\]{z-index:2001}.z-\\[5000\\]{z-index:5000}.z-\\[9998\\]{z-index:9998}.z-\\[9999\\]{z-index:9999}.z-\\[10000\\]{z-index:10000}.z-\\[11000\\]{z-index:11000}.z-\\[99999\\]{z-index:99999}.col-span-1{grid-column:span 1 / span 1}.container{width:100%;@media(width>=40rem){max-width:40rem}@media(width>=48rem){max-width:48rem}@media(width>=64rem){max-width:64rem}@media(width>=80rem){max-width:80rem}@media(width>=96rem){max-width:96rem}}.mx-1{margin-inline:calc(var(--spacing) * 1)}.mx-1\\.5{margin-inline:calc(var(--spacing) * 1.5)}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mx-3{margin-inline:calc(var(--spacing) * 3)}.my-1{margin-block:calc(var(--spacing) * 1)}.my-auto{margin-block:auto}.-mt-1{margin-top:calc(var(--spacing) * -1)}.mt-0{margin-top:calc(var(--spacing) * 0)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mr-0{margin-right:calc(var(--spacing) * 0)}.mr-0\\.5{margin-right:calc(var(--spacing) * .5)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-0{margin-bottom:calc(var(--spacing) * 0)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.-ml-0{margin-left:calc(var(--spacing) * -0)}.-ml-0\\.5{margin-left:calc(var(--spacing) * -.5)}.ml-0{margin-left:calc(var(--spacing) * 0)}.ml-0\\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.table{display:table}.aspect-square{aspect-ratio:1 / 1}.aspect-video{aspect-ratio:var(--aspect-video)}.h-0{height:calc(var(--spacing) * 0)}.h-1{height:calc(var(--spacing) * 1)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-7\\.5{height:calc(var(--spacing) * 7.5)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-32{height:calc(var(--spacing) * 32)}.h-48{height:calc(var(--spacing) * 48)}.h-\\[1px\\]{height:1px}.h-\\[2\\.5px\\]{height:2.5px}.h-\\[4px\\]{height:4px}.h-\\[22px\\]{height:22px}.h-\\[28px\\]{height:28px}.h-full{height:100%}.h-screen{height:100vh}.max-h-\\[60vh\\]{max-height:60vh}.max-h-\\[90vh\\]{max-height:90vh}.max-h-\\[200px\\]{max-height:200px}.max-h-\\[250px\\]{max-height:250px}.max-h-\\[300px\\]{max-height:300px}.min-h-\\[56px\\]{min-height:56px}.min-h-\\[300px\\]{min-height:300px}.min-h-screen{min-height:100vh}.w-1{width:calc(var(--spacing) * 1)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-15{width:calc(var(--spacing) * 15)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-60{width:calc(var(--spacing) * 60)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-96{width:calc(var(--spacing) * 96)}.w-\\[1px\\]{width:1px}.w-\\[15px\\]{width:15px}.w-\\[32px\\]{width:32px}.w-\\[480px\\]{width:480px}.w-\\[500px\\]{width:500px}.w-\\[600px\\]{width:600px}.w-full{width:100%}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[90vw\\]{max-width:90vw}.max-w-\\[300px\\]{max-width:300px}.max-w-\\[400px\\]{max-width:400px}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\\[64px\\]{min-width:64px}.min-w-\\[72px\\]{min-width:72px}.min-w-\\[80px\\]{min-width:80px}.min-w-\\[180px\\]{min-width:180px}.min-w-\\[280px\\]{min-width:280px}.min-w-fit{min-width:fit-content}.flex-1{flex:1}.shrink-0{flex-shrink:0}.origin-bottom-left{transform-origin:0 100%}.origin-center{transform-origin:center}.origin-top-left{transform-origin:0 0}.-translate-x-1{--tw-translate-x: calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1{--tw-translate-y: calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\\[1px\\]{--tw-translate-y: 1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-75{--tw-scale-x: 75%;--tw-scale-y: 75%;--tw-scale-z: 75%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-105{--tw-scale-x: 105%;--tw-scale-y: 105%;--tw-scale-z: 105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-110{--tw-scale-x: 110%;--tw-scale-y: 110%;--tw-scale-z: 110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.appearance-none{appearance:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.justify-stretch{justify-content:stretch}.gap-0{gap:calc(var(--spacing) * 0)}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.space-y-2{:where(&>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}}.space-y-4{:where(&>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}}.space-y-6{:where(&>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}}.self-start{align-self:flex-start}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[2\\.5rem\\]{border-radius:2.5rem}.rounded-\\[3px\\]{border-radius:3px}.rounded-full{border-radius:calc(infinity * 1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-l-\\[3px\\]{border-top-left-radius:3px;border-bottom-left-radius:3px}.rounded-l-lg{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-l-md{border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.rounded-r-\\[3px\\]{border-top-right-radius:3px;border-bottom-right-radius:3px}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.rounded-r-md{border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md)}.rounded-b-xl{border-bottom-right-radius:var(--radius-xl);border-bottom-left-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-\\[1\\.5px\\]{border-style:var(--tw-border-style);border-width:1.5px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style: dashed;border-style:dashed}.border-none{--tw-border-style: none;border-style:none}.border-solid{--tw-border-style: solid;border-style:solid}.border-black{border-color:var(--color-black)}.border-blue-100{border-color:var(--color-blue-100)}.border-emerald-100{border-color:var(--color-emerald-100)}.border-emerald-100\\/50{border-color:color-mix(in srgb,oklch(95% .052 163.051) 50%,transparent);@supports (color: color-mix(in lab,red,red)){border-color:color-mix(in oklab,var(--color-emerald-100) 50%,transparent)}}.border-purple-100{border-color:var(--color-purple-100)}.border-red-200{border-color:var(--color-red-200)}.border-slate-50{border-color:var(--color-slate-50)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-100\\/50{border-color:color-mix(in srgb,oklch(96.8% .007 247.896) 50%,transparent);@supports (color: color-mix(in lab,red,red)){border-color:color-mix(in oklab,var(--color-slate-100) 50%,transparent)}}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-200\\/60{border-color:color-mix(in srgb,oklch(92.9% .013 255.508) 60%,transparent);@supports (color: color-mix(in lab,red,red)){border-color:color-mix(in oklab,var(--color-slate-200) 60%,transparent)}}.border-slate-300{border-color:var(--color-slate-300)}.border-transparent{border-color:transparent}.border-white{border-color:var(--color-white)}.border-white\\/10{border-color:color-mix(in srgb,#fff 10%,transparent);@supports (color: color-mix(in lab,red,red)){border-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.bg-\\[\\#0A0A0A\\]{background-color:#0a0a0a}.bg-black{background-color:var(--color-black)}.bg-black\\/20{background-color:color-mix(in srgb,#000 20%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-black\\/40{background-color:color-mix(in srgb,#000 40%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.bg-black\\/60{background-color:color-mix(in srgb,#000 60%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-50\\/50{background-color:color-mix(in srgb,oklch(97% .014 254.604) 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-blue-50) 50%,transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-100\\/50{background-color:color-mix(in srgb,oklch(93.2% .032 255.585) 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-blue-100) 50%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-50\\/50{background-color:color-mix(in srgb,oklch(97.9% .021 166.113) 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-emerald-50) 50%,transparent)}}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-orange-50{background-color:var(--color-orange-50)}.bg-purple-50{background-color:var(--color-purple-50)}.bg-purple-50\\/50{background-color:color-mix(in srgb,oklch(97.7% .014 308.299) 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-purple-50) 50%,transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\\/50{background-color:color-mix(in srgb,oklch(98.4% .003 247.858) 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-slate-50) 50%,transparent)}}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-100\\/50{background-color:color-mix(in srgb,oklch(96.8% .007 247.896) 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-slate-100) 50%,transparent)}}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-200\\/50{background-color:color-mix(in srgb,oklch(92.9% .013 255.508) 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-slate-200) 50%,transparent)}}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\\/40{background-color:color-mix(in srgb,oklch(20.8% .042 265.755) 40%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-slate-900) 40%,transparent)}}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.bg-white\\/10{background-color:color-mix(in srgb,#fff 10%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.bg-white\\/50{background-color:color-mix(in srgb,#fff 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.bg-white\\/80{background-color:color-mix(in srgb,#fff 80%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.bg-gradient-to-b{--tw-gradient-position: to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-black{--tw-gradient-from: var(--color-black);--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\\/60{--tw-gradient-from: color-mix(in srgb, #000 60%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-gradient-from: color-mix(in oklab, var(--color-black) 60%, transparent)}--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to: transparent;--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.fill-purple-300{fill:var(--color-purple-300)}.fill-slate-700{fill:var(--color-slate-700)}.p-0{padding:calc(var(--spacing) * 0)}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-10{padding:calc(var(--spacing) * 10)}.p-12{padding:calc(var(--spacing) * 12)}.px-0{padding-inline:calc(var(--spacing) * 0)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-10{padding-inline:calc(var(--spacing) * 10)}.py-0{padding-block:calc(var(--spacing) * 0)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.pt-0{padding-top:calc(var(--spacing) * 0)}.pt-0\\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-8{padding-top:calc(var(--spacing) * 8)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-5{padding-right:calc(var(--spacing) * 5)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-12{padding-right:calc(var(--spacing) * 12)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-11{padding-left:calc(var(--spacing) * 11)}.pl-12{padding-left:calc(var(--spacing) * 12)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading, var(--text-2xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading, var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading, var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading, var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading, var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading, var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading, var(--text-xs--line-height))}.text-\\[6px\\]{font-size:6px}.text-\\[7px\\]{font-size:7px}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12\\.5px\\]{font-size:12.5px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[14px\\]{font-size:14px}.text-\\[16px\\]{font-size:16px}.text-\\[17px\\]{font-size:17px}.leading-none{--tw-leading: 1;line-height:1}.leading-relaxed{--tw-leading: var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading: var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight: var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight: var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight: var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight: var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight: var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.2em\\]{--tw-tracking: .2em;letter-spacing:.2em}.tracking-\\[0\\.15em\\]{--tw-tracking: .15em;letter-spacing:.15em}.tracking-tight{--tw-tracking: var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking: var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wide{--tw-tracking: var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking: var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking: var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-500{color:var(--color-amber-500)}.text-black{color:var(--color-black)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-600\\/70{color:color-mix(in srgb,oklch(59.6% .145 163.225) 70%,transparent);@supports (color: color-mix(in lab,red,red)){color:color-mix(in oklab,var(--color-emerald-600) 70%,transparent)}}.text-emerald-700{color:var(--color-emerald-700)}.text-green-500{color:var(--color-green-500)}.text-indigo-500{color:var(--color-indigo-500)}.text-orange-500{color:var(--color-orange-500)}.text-pink-500{color:var(--color-pink-500)}.text-purple-400{color:var(--color-purple-400)}.text-purple-500{color:var(--color-purple-500)}.text-purple-600{color:var(--color-purple-600)}.text-purple-700{color:var(--color-purple-700)}.text-red-400{color:var(--color-red-400)}.text-red-400\\/80{color:color-mix(in srgb,oklch(70.4% .191 22.216) 80%,transparent);@supports (color: color-mix(in lab,red,red)){color:color-mix(in oklab,var(--color-red-400) 80%,transparent)}}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-slate-200{color:var(--color-slate-200)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-teal-500{color:var(--color-teal-500)}.text-white{color:var(--color-white)}.text-white\\/50{color:color-mix(in srgb,#fff 50%,transparent);@supports (color: color-mix(in lab,red,red)){color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.text-white\\/80{color:color-mix(in srgb,#fff 80%,transparent);@supports (color: color-mix(in lab,red,red)){color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0%}.opacity-25{opacity:25%}.opacity-40{opacity:40%}.opacity-50{opacity:50%}.opacity-75{opacity:75%}.opacity-100{opacity:100%}.shadow-2xl{--tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / .25));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_20px_50px_rgba\\(0\\,0\\,0\\,0\\.15\\)\\]{--tw-shadow: 0 20px 50px var(--tw-shadow-color, rgba(0,0,0,.15));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 var(--tw-shadow-color, rgb(0 0 0 / .05));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 8px 10px -6px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-4{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-black{--tw-shadow-color: #000;@supports (color: color-mix(in lab,red,red)){--tw-shadow-color: color-mix(in oklab, var(--color-black) var(--tw-shadow-alpha), transparent)}}.shadow-black\\/80{--tw-shadow-color: color-mix(in srgb, #000 80%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--color-black) 80%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-blue-500{--tw-shadow-color: oklch(62.3% .214 259.815);@supports (color: color-mix(in lab,red,red)){--tw-shadow-color: color-mix(in oklab, var(--color-blue-500) var(--tw-shadow-alpha), transparent)}}.shadow-blue-500\\/20{--tw-shadow-color: color-mix(in srgb, oklch(62.3% .214 259.815) 20%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--color-blue-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500{--tw-shadow-color: oklch(69.6% .17 162.48);@supports (color: color-mix(in lab,red,red)){--tw-shadow-color: color-mix(in oklab, var(--color-emerald-500) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500\\/20{--tw-shadow-color: color-mix(in srgb, oklch(69.6% .17 162.48) 20%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--color-emerald-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-black{--tw-ring-color: var(--color-black)}.ring-black\\/5{--tw-ring-color: color-mix(in srgb, #000 5%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-ring-color: color-mix(in oklab, var(--color-black) 5%, transparent)}}.ring-purple-100{--tw-ring-color: var(--color-purple-100)}.ring-white{--tw-ring-color: var(--color-white)}.backdrop-blur-\\[1px\\]{--tw-backdrop-blur: blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-\\[2px\\]{--tw-backdrop-blur: blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur: blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur: blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.duration-150{--tw-duration: .15s;transition-duration:.15s}.duration-200{--tw-duration: .2s;transition-duration:.2s}.duration-300{--tw-duration: .3s;transition-duration:.3s}.duration-500{--tw-duration: .5s;transition-duration:.5s}.duration-700{--tw-duration: .7s;transition-duration:.7s}.ease-out{--tw-ease: var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style: none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.group-focus-within\\:text-slate-600{&:is(:where(.group):focus-within *){color:var(--color-slate-600)}}.group-hover\\:scale-105{&:is(:where(.group):hover *){@media(hover:hover){--tw-scale-x: 105%;--tw-scale-y: 105%;--tw-scale-z: 105%;scale:var(--tw-scale-x) var(--tw-scale-y)}}}.group-hover\\:scale-110{&:is(:where(.group):hover *){@media(hover:hover){--tw-scale-x: 110%;--tw-scale-y: 110%;--tw-scale-z: 110%;scale:var(--tw-scale-x) var(--tw-scale-y)}}}.group-hover\\:bg-blue-50{&:is(:where(.group):hover *){@media(hover:hover){background-color:var(--color-blue-50)}}}.group-hover\\:bg-blue-100{&:is(:where(.group):hover *){@media(hover:hover){background-color:var(--color-blue-100)}}}.group-hover\\:bg-blue-600{&:is(:where(.group):hover *){@media(hover:hover){background-color:var(--color-blue-600)}}}.group-hover\\:bg-emerald-50{&:is(:where(.group):hover *){@media(hover:hover){background-color:var(--color-emerald-50)}}}.group-hover\\:bg-emerald-600{&:is(:where(.group):hover *){@media(hover:hover){background-color:var(--color-emerald-600)}}}.group-hover\\:bg-purple-600{&:is(:where(.group):hover *){@media(hover:hover){background-color:var(--color-purple-600)}}}.group-hover\\:bg-red-500{&:is(:where(.group):hover *){@media(hover:hover){background-color:var(--color-red-500)}}}.group-hover\\:bg-slate-200{&:is(:where(.group):hover *){@media(hover:hover){background-color:var(--color-slate-200)}}}.group-hover\\:fill-slate-900{&:is(:where(.group):hover *){@media(hover:hover){fill:var(--color-slate-900)}}}.group-hover\\:text-blue-600{&:is(:where(.group):hover *){@media(hover:hover){color:var(--color-blue-600)}}}.group-hover\\:text-slate-700{&:is(:where(.group):hover *){@media(hover:hover){color:var(--color-slate-700)}}}.group-hover\\:text-slate-900{&:is(:where(.group):hover *){@media(hover:hover){color:var(--color-slate-900)}}}.group-hover\\:text-white{&:is(:where(.group):hover *){@media(hover:hover){color:var(--color-white)}}}.group-hover\\:opacity-100{&:is(:where(.group):hover *){@media(hover:hover){opacity:100%}}}.group-hover\\:shadow-sm{&:is(:where(.group):hover *){@media(hover:hover){--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}}.placeholder\\:text-slate-400{&::placeholder{color:var(--color-slate-400)}}.hover\\:border-blue-400{&:hover{@media(hover:hover){border-color:var(--color-blue-400)}}}.hover\\:border-slate-100{&:hover{@media(hover:hover){border-color:var(--color-slate-100)}}}.hover\\:border-slate-200{&:hover{@media(hover:hover){border-color:var(--color-slate-200)}}}.hover\\:border-slate-300{&:hover{@media(hover:hover){border-color:var(--color-slate-300)}}}.hover\\:bg-black{&:hover{@media(hover:hover){background-color:var(--color-black)}}}.hover\\:bg-blue-50{&:hover{@media(hover:hover){background-color:var(--color-blue-50)}}}.hover\\:bg-blue-50\\/50{&:hover{@media(hover:hover){background-color:color-mix(in srgb,oklch(97% .014 254.604) 50%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-blue-50) 50%,transparent)}}}}.hover\\:bg-blue-700{&:hover{@media(hover:hover){background-color:var(--color-blue-700)}}}.hover\\:bg-emerald-50{&:hover{@media(hover:hover){background-color:var(--color-emerald-50)}}}.hover\\:bg-emerald-700{&:hover{@media(hover:hover){background-color:var(--color-emerald-700)}}}.hover\\:bg-purple-50{&:hover{@media(hover:hover){background-color:var(--color-purple-50)}}}.hover\\:bg-red-50{&:hover{@media(hover:hover){background-color:var(--color-red-50)}}}.hover\\:bg-red-100{&:hover{@media(hover:hover){background-color:var(--color-red-100)}}}.hover\\:bg-slate-50{&:hover{@media(hover:hover){background-color:var(--color-slate-50)}}}.hover\\:bg-slate-100{&:hover{@media(hover:hover){background-color:var(--color-slate-100)}}}.hover\\:bg-slate-200{&:hover{@media(hover:hover){background-color:var(--color-slate-200)}}}.hover\\:bg-white{&:hover{@media(hover:hover){background-color:var(--color-white)}}}.hover\\:bg-white\\/20{&:hover{@media(hover:hover){background-color:color-mix(in srgb,#fff 20%,transparent);@supports (color: color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}}}.hover\\:text-blue-500{&:hover{@media(hover:hover){color:var(--color-blue-500)}}}.hover\\:text-blue-600{&:hover{@media(hover:hover){color:var(--color-blue-600)}}}.hover\\:text-blue-700{&:hover{@media(hover:hover){color:var(--color-blue-700)}}}.hover\\:text-emerald-700{&:hover{@media(hover:hover){color:var(--color-emerald-700)}}}.hover\\:text-purple-600{&:hover{@media(hover:hover){color:var(--color-purple-600)}}}.hover\\:text-purple-700{&:hover{@media(hover:hover){color:var(--color-purple-700)}}}.hover\\:text-red-500{&:hover{@media(hover:hover){color:var(--color-red-500)}}}.hover\\:text-slate-500{&:hover{@media(hover:hover){color:var(--color-slate-500)}}}.hover\\:text-slate-600{&:hover{@media(hover:hover){color:var(--color-slate-600)}}}.hover\\:text-slate-700{&:hover{@media(hover:hover){color:var(--color-slate-700)}}}.hover\\:text-white{&:hover{@media(hover:hover){color:var(--color-white)}}}.hover\\:opacity-100{&:hover{@media(hover:hover){opacity:100%}}}.hover\\:shadow-md{&:hover{@media(hover:hover){--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}}.focus\\:border-blue-500{&:focus{border-color:var(--color-blue-500)}}.focus\\:border-slate-400{&:focus{border-color:var(--color-slate-400)}}.focus\\:ring-2{&:focus{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:ring-4{&:focus{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:ring-blue-500\\/10{&:focus{--tw-ring-color: color-mix(in srgb, oklch(62.3% .214 259.815) 10%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-ring-color: color-mix(in oklab, var(--color-blue-500) 10%, transparent)}}}.focus\\:ring-blue-500\\/20{&:focus{--tw-ring-color: color-mix(in srgb, oklch(62.3% .214 259.815) 20%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-ring-color: color-mix(in oklab, var(--color-blue-500) 20%, transparent)}}}.focus\\:ring-slate-400\\/5{&:focus{--tw-ring-color: color-mix(in srgb, oklch(70.4% .04 256.788) 5%, transparent);@supports (color: color-mix(in lab,red,red)){--tw-ring-color: color-mix(in oklab, var(--color-slate-400) 5%, transparent)}}}.focus\\:outline-none{&:focus{--tw-outline-style: none;outline-style:none}}.active\\:scale-95{&:active{--tw-scale-x: 95%;--tw-scale-y: 95%;--tw-scale-z: 95%;scale:var(--tw-scale-x) var(--tw-scale-y)}}.active\\:scale-\\[0\\.98\\]{&:active{scale:.98}}.active\\:cursor-grabbing{&:active{cursor:grabbing}}.disabled\\:cursor-not-allowed{&:disabled{cursor:not-allowed}}.disabled\\:bg-slate-100{&:disabled{background-color:var(--color-slate-100)}}.disabled\\:bg-slate-300{&:disabled{background-color:var(--color-slate-300)}}.disabled\\:text-slate-400{&:disabled{color:var(--color-slate-400)}}.disabled\\:opacity-20{&:disabled{opacity:20%}}.disabled\\:opacity-40{&:disabled{opacity:40%}}.disabled\\:opacity-50{&:disabled{opacity:50%}}.disabled\\:active\\:scale-100{&:disabled{&:active{--tw-scale-x: 100%;--tw-scale-y: 100%;--tw-scale-z: 100%;scale:var(--tw-scale-x) var(--tw-scale-y)}}}.md\\:space-y-8{@media(width>=48rem){:where(&>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}}}.md\\:p-12{@media(width>=48rem){padding:calc(var(--spacing) * 12)}}}@keyframes blob{0%{transform:translate(0) scale(1)}33%{transform:translate(30px,-50px) scale(1.1)}66%{transform:translate(-20px,20px) scale(.9)}to{transform:translate(0) scale(1)}}.animate-blob{animation:blob 7s infinite}.animation-delay-2000{animation-delay:2s}.animation-delay-4000{animation-delay:4s}@property --tw-translate-x{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-translate-y{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-translate-z{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-scale-x{syntax: "*"; inherits: false; initial-value: 1;}@property --tw-scale-y{syntax: "*"; inherits: false; initial-value: 1;}@property --tw-scale-z{syntax: "*"; inherits: false; initial-value: 1;}@property --tw-rotate-x{syntax: "*"; inherits: false;}@property --tw-rotate-y{syntax: "*"; inherits: false;}@property --tw-rotate-z{syntax: "*"; inherits: false;}@property --tw-skew-x{syntax: "*"; inherits: false;}@property --tw-skew-y{syntax: "*"; inherits: false;}@property --tw-space-y-reverse{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-border-style{syntax: "*"; inherits: false; initial-value: solid;}@property --tw-gradient-position{syntax: "*"; inherits: false;}@property --tw-gradient-from{syntax: "<color>"; inherits: false; initial-value: #0000;}@property --tw-gradient-via{syntax: "<color>"; inherits: false; initial-value: #0000;}@property --tw-gradient-to{syntax: "<color>"; inherits: false; initial-value: #0000;}@property --tw-gradient-stops{syntax: "*"; inherits: false;}@property --tw-gradient-via-stops{syntax: "*"; inherits: false;}@property --tw-gradient-from-position{syntax: "<length-percentage>"; inherits: false; initial-value: 0%;}@property --tw-gradient-via-position{syntax: "<length-percentage>"; inherits: false; initial-value: 50%;}@property --tw-gradient-to-position{syntax: "<length-percentage>"; inherits: false; initial-value: 100%;}@property --tw-leading{syntax: "*"; inherits: false;}@property --tw-font-weight{syntax: "*"; inherits: false;}@property --tw-tracking{syntax: "*"; inherits: false;}@property --tw-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: "*"; inherits: false;}@property --tw-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: "*"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: "*"; inherits: false;}@property --tw-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: "*"; inherits: false;}@property --tw-inset-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: "*"; inherits: false;}@property --tw-ring-offset-width{syntax: "<length>"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: "*"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-backdrop-blur{syntax: "*"; inherits: false;}@property --tw-backdrop-brightness{syntax: "*"; inherits: false;}@property --tw-backdrop-contrast{syntax: "*"; inherits: false;}@property --tw-backdrop-grayscale{syntax: "*"; inherits: false;}@property --tw-backdrop-hue-rotate{syntax: "*"; inherits: false;}@property --tw-backdrop-invert{syntax: "*"; inherits: false;}@property --tw-backdrop-opacity{syntax: "*"; inherits: false;}@property --tw-backdrop-saturate{syntax: "*"; inherits: false;}@property --tw-backdrop-sepia{syntax: "*"; inherits: false;}@property --tw-duration{syntax: "*"; inherits: false;}@property --tw-ease{syntax: "*"; inherits: false;}@keyframes spin{to{transform:rotate(360deg)}}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x: 0;--tw-translate-y: 0;--tw-translate-z: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-scale-z: 1;--tw-rotate-x: initial;--tw-rotate-y: initial;--tw-rotate-z: initial;--tw-skew-x: initial;--tw-skew-y: initial;--tw-space-y-reverse: 0;--tw-border-style: solid;--tw-gradient-position: initial;--tw-gradient-from: #0000;--tw-gradient-via: #0000;--tw-gradient-to: #0000;--tw-gradient-stops: initial;--tw-gradient-via-stops: initial;--tw-gradient-from-position: 0%;--tw-gradient-via-position: 50%;--tw-gradient-to-position: 100%;--tw-leading: initial;--tw-font-weight: initial;--tw-tracking: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-backdrop-blur: initial;--tw-backdrop-brightness: initial;--tw-backdrop-contrast: initial;--tw-backdrop-grayscale: initial;--tw-backdrop-hue-rotate: initial;--tw-backdrop-invert: initial;--tw-backdrop-opacity: initial;--tw-backdrop-saturate: initial;--tw-backdrop-sepia: initial;--tw-duration: initial;--tw-ease: initial}}}
|
|
3
|
+
`);var B=require("react");var pe=Fe(require("react")),w=require("lucide-react");var Kt=require("clsx"),Jt=require("tailwind-merge");function I(...u){return(0,Jt.twMerge)((0,Kt.clsx)(u))}var e=require("react/jsx-runtime"),Aa=["Inter","Lato","Open Sans","Poppins","Roboto","Roboto Slab","Georgia","Playfair Display","Merriweather","Nunito Sans","Montserrat","Oswald","Raleway","Ubuntu","Lora","PT Sans","PT Serif","Play","Arvo","Kanit","Times New Roman","Arial"],Ba=[12,14,16,18,20,24,28,32,36,48,64,72,96],Pa=[{name:"Basic Shapes",shapes:["rect","circle","triangle","rightTriangle","rhombus","parallelogram","trapezoid","pentagon","hexagon","heptagon","octagon","heart","smiley","sun","moon"]},{name:"Arrows",shapes:["arrowRight","arrowLeft","arrowUp","arrowDown","arrowLeftRight","arrowUpDown"]},{name:"Stars & Symbols",shapes:["star4","star5","star6","star8","cloud","lightning"]},{name:"Equation Shapes",shapes:["plus","minus","multiply","divide","equal"]}],Ta=({type:u,className:a})=>{switch(u){case"rect":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",fill:"currentColor"})});case"circle":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("circle",{cx:"12",cy:"12",r:"9",fill:"currentColor"})});case"triangle":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 4L20 18H4L12 4Z",fill:"currentColor"})});case"rightTriangle":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M4 4V20H20L4 4Z",fill:"currentColor"})});case"rhombus":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 4L20 12L12 20L4 12L12 4Z",fill:"currentColor"})});case"parallelogram":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M7 4H21L17 20H3L7 4Z",fill:"currentColor"})});case"trapezoid":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M6 4H18L21 20H3L6 4Z",fill:"currentColor"})});case"pentagon":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 3L21 9V19H3V9L12 3Z",fill:"currentColor"})});case"hexagon":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 3L20 7.5V16.5L12 21L4 16.5V7.5L12 3Z",fill:"currentColor"})});case"heptagon":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 3L18.5 6L21 13L16 20H8L3 13L5.5 6L12 3Z",fill:"currentColor"})});case"octagon":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M8.5 3H15.5L21 8.5V15.5L15.5 21H8.5L3 15.5V8.5L8.5 3Z",fill:"currentColor"})});case"heart":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z",fill:"currentColor"})});case"smiley":return(0,e.jsxs)("svg",{viewBox:"0 0 24 24",className:a,children:[(0,e.jsx)("circle",{cx:"12",cy:"12",r:"9",fill:"currentColor",fillOpacity:"0.2",stroke:"currentColor",strokeWidth:"2"}),(0,e.jsx)("circle",{cx:"9",cy:"9",r:"1.5",fill:"currentColor"}),(0,e.jsx)("circle",{cx:"15",cy:"9",r:"1.5",fill:"currentColor"}),(0,e.jsx)("path",{d:"M8 15C8 15 9.5 17 12 17C14.5 17 16 15 16 15",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]});case"sun":return(0,e.jsxs)("svg",{viewBox:"0 0 24 24",className:a,children:[(0,e.jsx)("circle",{cx:"12",cy:"12",r:"5",fill:"currentColor"}),(0,e.jsx)("path",{d:"M12 2V4M12 20V22M4 12H2M22 12H20M19.07 4.93L17.66 6.34M6.34 17.66L4.93 19.07M4.93 4.93L6.34 6.34M17.66 17.66L19.07 19.07",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]});case"moon":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 3a9 9 0 1 0 9 9 7 7 0 0 1-9-9",fill:"currentColor"})});case"arrowRight":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M4 11h11.5l-3.5-3.5 1.5-1.5 6 6-6 6-1.5-1.5 3.5-3.5H4z",fill:"currentColor"})});case"arrowLeft":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M20 11H8.5l3.5-3.5L10.5 6l-6 6 6 6 1.5-1.5-3.5-3.5H20z",fill:"currentColor"})});case"arrowUp":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M13 20V8.5l3.5 3.5 1.5-1.5-6-6-6 6 1.5 1.5 3.5-3.5V20z",fill:"currentColor"})});case"arrowDown":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M11 4v11.5l-3.5-3.5-1.5 1.5 6 6 6-6-1.5-1.5-3.5 3.5V4z",fill:"currentColor"})});case"arrowLeftRight":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M4 12l4-4v3h8V8l4 4-4 4v-3H8v3l-4-4z",fill:"currentColor"})});case"arrowUpDown":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 4l-4 4h3v8H8l4 4 4-4h-3V8h3l-4-4z",fill:"currentColor"})});case"star4":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 2l2 8 8 2-8 2-2 8-2-8-8-2 8-2 2-8z",fill:"currentColor"})});case"star5":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 2l2.5 7.5H22l-6 4.5 2.5 7.5-6.5-4.5-6.5 4.5 2.5-7.5-6-4.5h7.5L12 2z",fill:"currentColor"})});case"star6":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 2l3 5 6-1-4 4.5 2 6.5-7-3-7 3 2-6.5-4-4.5 6 1 3-5z",fill:"currentColor"})});case"star8":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M12 2l2 4 4-2-2 4 4 2-4 2 2 4-4-2-2 4-2-4-4 2 2-4-4-2 4-2-2-4 4 2 2-4z",fill:"currentColor"})});case"cloud":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M17.5 19c-3 0-5.5-2.5-5.5-5.5 0-.2 0-.4.1-.6-2-.8-3.6-2.5-4.1-4.7C6.5 7.4 5 6 3 6c-1.7 0-3 1.3-3 3s1.3 3 3 3c.4 0 .8-.1 1.2-.2C4.1 13 5 14.5 6.5 15.5c.3 1.8 1.4 3.4 3 4.3.4.2.8.3 1.2.4 1.2.4 2.5.6 3.8.6 4.4 0 8-3.6 8-8s-3.6-8-8-8c-.4 0-.8 0-1.2.1-1.2.2-2.3.7-3.2 1.5C11 4.2 12.4 3.5 14 3.5c4.1 0 7.5 3.4 7.5 7.5s-1.8 7.5-4 8z",fill:"currentColor",transform:"scale(0.8) translate(3,3)"})});case"lightning":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M13 2L3 14h9v8l10-12h-9l3-8z",fill:"currentColor"})});case"plus":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z",fill:"currentColor"})});case"minus":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})});case"multiply":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z",fill:"currentColor"})});case"divide":return(0,e.jsxs)("svg",{viewBox:"0 0 24 24",className:a,children:[(0,e.jsx)("circle",{cx:"12",cy:"7",r:"2",fill:"currentColor"}),(0,e.jsx)("circle",{cx:"12",cy:"17",r:"2",fill:"currentColor"}),(0,e.jsx)("rect",{x:"5",y:"11",width:"14",height:"2",fill:"currentColor"})]});case"equal":return(0,e.jsx)("svg",{viewBox:"0 0 24 24",className:a,children:(0,e.jsx)("path",{d:"M19 10H5V8h14v2zm0 6H5v-2h14v2z",fill:"currentColor"})});default:return(0,e.jsx)("div",{className:"w-6 h-6 bg-slate-200 rounded-sm"})}},Ha=({onAddShape:u,uiScale:a})=>{let[c,m]=(0,pe.useState)(!1);return pe.default.useEffect(()=>(window._toggleShapesMenu=()=>m(!c),()=>{window._toggleShapesMenu=void 0}),[c]),c?(0,e.jsx)("div",{className:"absolute top-full left-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-2xl p-4 overflow-y-auto z-[100] animate-in fade-in zoom-in-95 duration-200",style:{width:`${320*a}px`,maxHeight:`${480*a}px`},children:(0,e.jsx)("div",{className:"flex flex-col gap-6",children:Pa.map(v=>(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsx)("span",{className:"text-[10px] font-black uppercase tracking-widest text-slate-400 px-1",style:{fontSize:`${10*a}px`},children:v.name}),(0,e.jsx)("div",{className:"grid grid-cols-5 gap-1",children:v.shapes.map(s=>(0,e.jsx)("button",{onClick:()=>{u(s),m(!1)},className:"aspect-square hover:bg-slate-50 rounded-lg flex items-center justify-center border border-transparent hover:border-slate-100 transition-all group p-1",title:s,children:(0,e.jsx)("div",{className:"w-full h-full bg-slate-100 rounded-sm group-hover:bg-blue-100 group-hover:scale-110 transition-all flex items-center justify-center overflow-hidden p-1.5",children:(0,e.jsx)(Ta,{type:s,className:"w-full h-full text-slate-400 group-hover:text-blue-600 transition-colors"})})},s))})]},v.name))})}):null},Qt=({onAddText:u,onAddImage:a,onAddShape:c,onAddSlide:m,onExport:v,onFormatText:s,onDeleteElement:R,onApplyLayout:T,onPlay:P,selectedElement:r,onNewPresentation:H,onLoadPresentation:g,appBgColor:S="#B7472A",uiScale:L,source:A,onGenerateImageClick:N,onGenerateInfographicClick:f,onUploadImageClick:G,onRefineAction:$,refineResponse:Q,isAiLoading:E})=>{let y=pe.default.useRef(null),[C,ae]=(0,pe.useState)("Home"),[q,O]=(0,pe.useState)(!1),[ee,n]=(0,pe.useState)(!1),[x,i]=(0,pe.useState)(!1),[h,k]=(0,pe.useState)(!1),[F,D]=(0,pe.useState)("file"),[oe,ie]=(0,pe.useState)(""),[Z,he]=(0,pe.useState)(!1),[te,_]=(0,pe.useState)(!1),[Y,le]=(0,pe.useState)(!1),[Ne,be]=(0,pe.useState)(!1),Te=U=>{if(!W||!r)return;let de=r.content||"",ve=de;switch(U){case"sentence":ve=de.charAt(0).toUpperCase()+de.slice(1).toLowerCase();break;case"lowercase":ve=de.toLowerCase();break;case"uppercase":ve=de.toUpperCase();break;case"capitalize":ve=de.split(" ").map(ke=>ke.charAt(0).toUpperCase()+ke.slice(1).toLowerCase()).join(" ");break;case"toggle":ve=de.split("").map(ke=>ke===ke.toUpperCase()?ke.toLowerCase():ke.toUpperCase()).join("");break}s({content:ve}),he(!1)},W=(r==null?void 0:r.type)==="text",He=(r==null?void 0:r.type)==="shape",Lt=(r==null?void 0:r.type)==="image",je="#B7472A";return(0,e.jsxs)("div",{className:"flex flex-col border-b border-slate-200 bg-white z-50 select-none",style:{fontSize:`${12*L}px`},children:[(0,e.jsxs)("div",{className:"bg-white flex items-center justify-stretch border-b border-slate-200/60 transition-all duration-300 relative z-[1000]",style:{height:`${120*L}px`,overflow:"visible"},children:[(0,e.jsxs)("div",{className:I("flex flex-col items-center border-r border-slate-100 px-3 gap-1 h-full py-2",L<.84?"min-w-0":"min-w-fit"),children:[(0,e.jsxs)("div",{className:"flex items-center justify-center gap-1 my-auto",children:[(0,e.jsxs)("button",{onClick:m,className:"flex flex-col items-center justify-center gap-1.5 px-3 py-1.5 hover:bg-slate-50 rounded-lg group transition-all min-w-[64px]",children:[(0,e.jsx)("div",{className:"bg-orange-50 p-1.5 rounded-lg group-hover:scale-110 transition-transform",children:(0,e.jsx)(w.Plus,{size:20,style:{color:S}})}),(0,e.jsx)("span",{className:"text-[10px] font-bold text-slate-700",children:"New Slide"})]}),(0,e.jsx)("div",{className:"w-[1px] h-10 bg-slate-100 mx-1"}),(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsxs)("button",{onClick:()=>O(!q),className:I("flex flex-col items-center justify-center gap-1.5 px-3 py-1.5 hover:bg-slate-50 rounded-lg transition-all min-w-[64px]",q&&"bg-slate-100"),children:[(0,e.jsx)("div",{className:"p-1.5 rounded-lg",children:(0,e.jsx)(w.Layout,{size:20,className:"text-slate-500"})}),(0,e.jsx)("span",{className:"text-[10px] font-medium text-slate-500",children:"Layout"})]}),q&&(0,e.jsxs)("div",{className:"absolute top-full left-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-3xl p-2 w-60 flex flex-col gap-1 z-[100] animate-in fade-in zoom-in-95 duration-200 ring-4 ring-black/5",children:[(0,e.jsxs)("button",{onClick:()=>{T("title"),O(!1)},className:"flex items-center gap-3 px-4 py-3 hover:bg-slate-50 rounded-xl text-[13px] font-bold text-slate-700 transition-all border border-transparent hover:border-slate-100 group",children:[(0,e.jsx)("div",{className:"p-2 bg-blue-50 text-blue-600 rounded-lg group-hover:bg-blue-600 group-hover:text-white transition-colors",children:(0,e.jsx)(w.FileText,{size:18})}),"Title Slide"]}),(0,e.jsxs)("button",{onClick:()=>{T("content"),O(!1)},className:"flex items-center gap-3 px-4 py-3 hover:bg-slate-50 rounded-xl text-[13px] font-bold text-slate-700 transition-all border border-transparent hover:border-slate-100 group",children:[(0,e.jsx)("div",{className:"p-2 bg-emerald-50 text-emerald-600 rounded-lg group-hover:bg-emerald-600 group-hover:text-white transition-colors",children:(0,e.jsx)(w.List,{size:18})}),"Title & Content"]}),(0,e.jsxs)("button",{onClick:()=>{T("split"),O(!1)},className:"flex items-center gap-3 px-4 py-3 hover:bg-slate-50 rounded-xl text-[13px] font-bold text-slate-700 transition-all border border-transparent hover:border-slate-100 group",children:[(0,e.jsx)("div",{className:"p-2 bg-purple-50 text-purple-600 rounded-lg group-hover:bg-purple-600 group-hover:text-white transition-colors",children:(0,e.jsx)(w.Columns,{size:18})}),"Two Columns"]})]})]})]}),L>=.85&&(0,e.jsx)("span",{className:"text-[9px] uppercase tracking-[0.2em] font-black text-slate-300 mt-auto",children:"Slides"})]}),(0,e.jsxs)("div",{className:I("flex-1 flex items-center flex-col border-r border-slate-200 h-full py-2 relative",L<.85?"px-2":"px-4"),children:[(0,e.jsxs)("div",{className:"flex items-center gap-4 mt-2 mb-3",children:[(0,e.jsxs)("div",{className:"flex items-center bg-white border border-slate-300 rounded-[3px] h-[28px] overflow-hidden",children:[(0,e.jsx)("select",{disabled:!W,value:(r==null?void 0:r.fontFamily)||"Open Sans",onChange:U=>s({fontFamily:U.target.value}),className:I("h-full px-1.5 text-[13px] text-slate-800 font-normal bg-transparent outline-none disabled:opacity-50 appearance-none cursor-pointer",L<.85?"w-20":"w-32"),children:Aa.map(U=>(0,e.jsx)("option",{value:U,children:U},U))}),(0,e.jsx)(w.ChevronDown,{size:13,className:"text-slate-400 mr-1"})]}),(0,e.jsxs)("div",{className:"flex items-center bg-white border border-slate-300 rounded-[3px] h-[28px] overflow-hidden w-15",children:[(0,e.jsx)("select",{disabled:!W,value:(r==null?void 0:r.fontSize)||10,onChange:U=>s({fontSize:parseInt(U.target.value)}),className:"h-full w-full px-1 text-[12.5px] text-slate-800 font-normal bg-transparent outline-none disabled:opacity-50 appearance-none cursor-pointer text-center",children:Ba.map(U=>(0,e.jsx)("option",{value:U,children:U},U))}),(0,e.jsx)(w.ChevronDown,{size:13,className:"text-slate-400 mr-0.5"})]}),(0,e.jsxs)("button",{disabled:!W,onClick:()=>s({fontSize:Math.min(200,((r==null?void 0:r.fontSize)||24)+2)}),className:"w-9 h-[28px] flex items-center justify-center hover:bg-slate-100 rounded-[3px] transition-colors disabled:opacity-40",title:"Increase Font Size",children:[(0,e.jsx)("span",{className:"text-[16px] font-semibold text-slate-700",children:"A"}),(0,e.jsx)("span",{className:"text-[10px] font-bold text-slate-700 -ml-0.5 -mt-1",children:"\u25B2"})]}),(0,e.jsxs)("button",{disabled:!W,onClick:()=>s({fontSize:Math.max(8,((r==null?void 0:r.fontSize)||24)-2)}),className:"w-9 h-[28px] flex items-center justify-center hover:bg-slate-100 rounded-[3px] transition-colors disabled:opacity-40",title:"Decrease Font Size",children:[(0,e.jsx)("span",{className:"text-[14px] font-semibold text-slate-700",children:"A"}),(0,e.jsx)("span",{className:"text-[10px] font-bold text-slate-700 -ml-0.5 mt-1",children:"\u25BC"})]}),(0,e.jsxs)("button",{disabled:!W,onClick:()=>s({isBold:!1,isItalic:!1,isUnderline:!1,highlightColor:"",color:"#000000",isStrikethrough:!1}),className:"w-9 h-[28px] flex items-center justify-center hover:bg-slate-100 rounded-[3px] transition-colors disabled:opacity-40",title:"Clear All Formatting",children:[(0,e.jsx)("span",{className:"text-[16px] font-semibold text-slate-700",children:"A"}),(0,e.jsx)(w.Eraser,{size:11,className:"text-pink-500 -ml-0.5"})]})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1.5 mb-1",children:[(0,e.jsx)("button",{disabled:!W,onClick:()=>s({isBold:!r.isBold}),className:I("w-8 h-8 flex items-center justify-center rounded-[3px] transition-all disabled:opacity-40",r!=null&&r.isBold?"bg-blue-100":"hover:bg-slate-100"),title:"Bold",children:(0,e.jsx)("span",{className:`text-[17px] font-black ${r!=null&&r.isBold?"text-slate-900":"text-slate-700"}`,children:"B"})}),(0,e.jsx)("button",{disabled:!W,onClick:()=>s({isItalic:!r.isItalic}),className:I("w-8 h-8 flex items-center justify-center rounded-[3px] transition-all disabled:opacity-40",r!=null&&r.isItalic?"bg-blue-100":"hover:bg-slate-100"),title:"Italic",children:(0,e.jsx)("span",{className:`text-[17px] font-semibold italic ${r!=null&&r.isItalic?"text-slate-900":"text-slate-700"}`,style:{fontFamily:"serif"},children:"I"})}),(0,e.jsx)("button",{disabled:!W,onClick:()=>s({isUnderline:!r.isUnderline}),className:I("w-8 h-8 flex items-center justify-center rounded-[3px] transition-all disabled:opacity-40",r!=null&&r.isUnderline?"bg-blue-100":"hover:bg-slate-100"),title:"Underline",children:(0,e.jsx)("span",{className:`text-[17px] font-semibold underline underline-offset-2 ${r!=null&&r.isUnderline?"text-slate-900":"text-slate-700"}`,children:"U"})}),(0,e.jsxs)("button",{disabled:!W,onClick:()=>s({isStrikethrough:!r.isStrikethrough}),className:I("h-8 px-1.5 flex items-center justify-center rounded-[3px] transition-all disabled:opacity-40",r!=null&&r.isStrikethrough?"bg-blue-100":"hover:bg-slate-100"),title:"Strikethrough",children:[(0,e.jsx)("span",{className:`text-[12px] font-medium line-through ${r!=null&&r.isStrikethrough?"text-slate-900":"text-slate-600"}`,children:"abc"}),(0,e.jsx)(w.ChevronDown,{size:12,className:"text-slate-400 ml-0.5"})]}),(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsxs)("button",{disabled:!W,onClick:()=>_(!te),className:I("h-8 px-1.5 flex flex-col items-center justify-center rounded-[3px] transition-all disabled:opacity-40",te?"bg-slate-100":"hover:bg-slate-100"),title:"Character Spacing",children:[(0,e.jsxs)("div",{className:"flex items-center",children:[(0,e.jsx)("span",{className:"text-[12px] font-bold text-slate-700",children:"A"}),(0,e.jsx)("span",{className:"text-[12px] font-bold text-slate-700 -ml-0.5",children:"V"}),(0,e.jsx)(w.ChevronDown,{size:11,className:"text-slate-400 ml-0.5"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-0",children:[(0,e.jsx)("span",{className:"text-[7px] text-blue-500",children:"\u25C0"}),(0,e.jsx)("div",{className:"w-2.5 h-[1px] bg-blue-500"}),(0,e.jsx)("span",{className:"text-[7px] text-blue-500",children:"\u25B6"})]})]}),te&&(0,e.jsxs)("div",{className:"absolute top-full left-0 mt-1 bg-white border border-slate-200 rounded-lg shadow-xl py-1 w-32 z-[100] animate-in fade-in zoom-in-95 duration-150",children:[(0,e.jsxs)("button",{onClick:()=>{s({charSpacing:-50}),_(!1)},className:"w-full px-3 py-1.5 text-left text-[11px] text-slate-700 hover:bg-slate-50 flex items-center gap-2",children:["Very Tight",(r==null?void 0:r.charSpacing)===-50&&(0,e.jsx)(w.Check,{size:12,className:"text-blue-600 ml-auto"})]}),(0,e.jsxs)("button",{onClick:()=>{s({charSpacing:-25}),_(!1)},className:"w-full px-3 py-1.5 text-left text-[11px] text-slate-700 hover:bg-slate-50 flex items-center gap-2",children:["Tight",(r==null?void 0:r.charSpacing)===-25&&(0,e.jsx)(w.Check,{size:12,className:"text-blue-600 ml-auto"})]}),(0,e.jsxs)("button",{onClick:()=>{s({charSpacing:0}),_(!1)},className:"w-full px-3 py-1.5 text-left text-[11px] text-slate-700 hover:bg-slate-50 flex items-center gap-2",children:["Normal",((r==null?void 0:r.charSpacing)===0||!(r!=null&&r.charSpacing))&&(0,e.jsx)(w.Check,{size:12,className:"text-blue-600 ml-auto"})]}),(0,e.jsxs)("button",{onClick:()=>{s({charSpacing:25}),_(!1)},className:"w-full px-3 py-1.5 text-left text-[11px] text-slate-700 hover:bg-slate-50 flex items-center gap-2",children:["Loose",(r==null?void 0:r.charSpacing)===25&&(0,e.jsx)(w.Check,{size:12,className:"text-blue-600 ml-auto"})]}),(0,e.jsxs)("button",{onClick:()=>{s({charSpacing:50}),_(!1)},className:"w-full px-3 py-1.5 text-left text-[11px] text-slate-700 hover:bg-slate-50 flex items-center gap-2",children:["Very Loose",(r==null?void 0:r.charSpacing)===50&&(0,e.jsx)(w.Check,{size:12,className:"text-blue-600 ml-auto"})]}),(0,e.jsx)("div",{className:"h-[1px] bg-slate-100 my-1"}),(0,e.jsx)("button",{className:"w-full px-3 py-1.5 text-left text-[11px] text-slate-700 hover:bg-slate-50 disabled:opacity-50",children:"More Spacing..."})]})]}),(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsxs)("button",{disabled:!W,onClick:()=>he(!Z),className:"h-8 px-1.5 flex items-center justify-center rounded-[3px] hover:bg-slate-100 transition-all disabled:opacity-40",title:"Change Case",children:[(0,e.jsx)("span",{className:"text-[14px] font-medium text-slate-700",children:"Aa"}),(0,e.jsx)(w.ChevronDown,{size:11,className:"text-slate-400 ml-0.5"})]}),Z&&(0,e.jsxs)("div",{className:"absolute top-full left-0 mt-1 bg-white border border-slate-200 rounded-lg shadow-xl py-1 w-44 z-[100] animate-in fade-in zoom-in-95 duration-150",children:[(0,e.jsxs)("button",{onClick:()=>Te("sentence"),className:"w-full px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-50 flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-slate-400",children:"Aa"})," Sentence case."]}),(0,e.jsxs)("button",{onClick:()=>Te("lowercase"),className:"w-full px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-50 flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-slate-400 underline",children:"l"})," lowercase"]}),(0,e.jsxs)("button",{onClick:()=>Te("uppercase"),className:"w-full px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-50 flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-slate-400 underline",children:"U"})," UPPERCASE"]}),(0,e.jsxs)("button",{onClick:()=>Te("capitalize"),className:"w-full px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-50 flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-slate-400 underline",children:"C"})," Capitalize Each Word"]}),(0,e.jsxs)("button",{onClick:()=>Te("toggle"),className:"w-full px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-50 flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-slate-400 underline",children:"t"})," tOGGLE cASE"]})]})]}),(0,e.jsx)("div",{className:"w-[1px] h-5 bg-slate-200 mx-1.5"}),(0,e.jsxs)("div",{className:"relative flex items-center",children:[(0,e.jsxs)("button",{disabled:!W,className:I("w-9 h-7.5 flex flex-col items-center justify-center rounded-[3px] transition-all disabled:opacity-40",r!=null&&r.highlightColor?"bg-slate-100":"hover:bg-slate-100"),title:"Text Highlight Color",children:[(0,e.jsx)(w.Highlighter,{size:21,strokeWidth:2.5,className:r!=null&&r.highlightColor?"text-slate-900":"text-slate-500"}),(0,e.jsx)("div",{className:"absolute top-[24px] left-1.5 right-1.5 h-1.5",style:{backgroundColor:(r==null?void 0:r.highlightColor)||"transparent"}})]}),(0,e.jsx)("input",{type:"color",disabled:!W,className:"absolute inset-0 opacity-0 cursor-pointer w-full h-full disabled:cursor-not-allowed",value:(r==null?void 0:r.highlightColor)||"#ffff00",onChange:U=>s({highlightColor:U.target.value}),title:"Choose Highlight Color"}),(0,e.jsx)(w.ChevronDown,{size:11,className:"text-slate-400 -ml-0.5"})]}),(0,e.jsxs)("div",{className:"relative flex items-center",children:[(0,e.jsxs)("button",{className:"w-9 h-7.5 flex flex-col items-center justify-center rounded-[3px] hover:bg-slate-100 transition-all",title:"Font Color",children:[(0,e.jsx)("span",{className:"text-[16px] font-black text-slate-800 leading-none",children:"A"}),(0,e.jsx)("div",{className:"w-6 h-[4px] rounded-sm mt-0.5",style:{backgroundColor:(r==null?void 0:r.color)||"#ff0000"}}),(0,e.jsx)("input",{type:"color",className:"absolute inset-0 opacity-0 cursor-pointer w-full h-full",value:(r==null?void 0:r.color)||"#ff0000",onChange:U=>s({color:U.target.value})})]}),(0,e.jsx)(w.ChevronDown,{size:11,className:"text-slate-400 -ml-0.5"})]})]}),L>=.85&&(0,e.jsx)("span",{className:"text-[9px] text-center uppercase tracking-[0.2em] font-black text-slate-300 mt-auto",children:"Font"})]}),(0,e.jsxs)("div",{className:I("flex flex-col border-r border-slate-200 h-full py-2 relative",L<.85?"px-2":"px-4"),children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5 mt-2 mb-3",children:[(0,e.jsxs)("div",{className:"relative flex items-center rounded-[3px] hover:bg-slate-100 transition-all",children:[(0,e.jsx)("button",{disabled:!W,onClick:()=>{r!=null&&r.isBulleted?s({isBulleted:!1,isNumbered:!1,listType:"none"}):s({isBulleted:!0,isNumbered:!1,listType:"bullet-disc"})},className:I("w-[32px] h-8 flex items-center justify-center rounded-l-[3px] transition-all disabled:opacity-40",r!=null&&r.isBulleted?"bg-blue-100":"hover:bg-slate-100"),title:"Bullets",children:(0,e.jsx)(w.List,{size:19,className:r!=null&&r.isBulleted?"text-slate-900":"text-slate-600"})}),(0,e.jsx)("button",{disabled:!W,onClick:()=>le(!Y),className:I("w-[15px] h-8 flex items-center justify-center rounded-r-[3px] border-l border-transparent hover:border-slate-200 transition-all disabled:opacity-40",Y?"bg-slate-100":"hover:bg-slate-200"),title:"Bullet Options",children:(0,e.jsx)(w.ChevronDown,{size:13,className:"text-slate-400"})}),Y&&(0,e.jsxs)("div",{className:"absolute top-full left-0 mt-1 bg-white border border-slate-200 rounded-lg shadow-xl p-2 z-[100] animate-in fade-in zoom-in-95 duration-150 w-64 grid grid-cols-4 gap-2",children:[(0,e.jsx)("button",{onClick:()=>{s({isBulleted:!1,listType:"none"}),le(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1",children:(0,e.jsx)("span",{className:"text-[10px] text-slate-500",children:"None"})}),(0,e.jsx)("button",{onClick:()=>{s({isBulleted:!0,isNumbered:!1,listType:"bullet-disc"}),le(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 rounded-full bg-black"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 rounded-full bg-black"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 rounded-full bg-black"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isBulleted:!0,isNumbered:!1,listType:"bullet-circle"}),le(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 rounded-full border border-black bg-transparent"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 rounded-full border border-black bg-transparent"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 rounded-full border border-black bg-transparent"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isBulleted:!0,isNumbered:!1,listType:"bullet-square"}),le(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 bg-black"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 bg-black"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 bg-black"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isBulleted:!0,isNumbered:!1,listType:"bullet-square-outlined"}),le(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 border border-black bg-transparent"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 border border-black bg-transparent"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 border border-black bg-transparent"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isBulleted:!0,isNumbered:!1,listType:"bullet-diamond"}),le(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 bg-black rotate-45 scale-75"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 bg-black rotate-45 scale-75"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("div",{className:"w-1 h-1 bg-black rotate-45 scale-75"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isBulleted:!0,isNumbered:!1,listType:"bullet-arrow"}),le(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] leading-none",children:"\u27A4"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] leading-none",children:"\u27A4"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] leading-none",children:"\u27A4"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isBulleted:!0,isNumbered:!1,listType:"bullet-check"}),le(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] leading-none",children:"\u2713"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] leading-none",children:"\u2713"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] leading-none",children:"\u2713"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})})]})]}),(0,e.jsxs)("div",{className:"relative flex items-center rounded-[3px] hover:bg-slate-100 transition-all",children:[(0,e.jsx)("button",{disabled:!W,onClick:()=>{r!=null&&r.isNumbered?s({isBulleted:!1,isNumbered:!1,listType:"none"}):s({isBulleted:!1,isNumbered:!0,listType:"number-decimal"})},className:I("w-[32px] h-8 flex items-center justify-center rounded-l-[3px] transition-all disabled:opacity-40",r!=null&&r.isNumbered?"bg-blue-100":"hover:bg-slate-100"),title:"Numbering",children:(0,e.jsx)(w.ListOrdered,{size:19,className:r!=null&&r.isNumbered?"text-slate-900":"text-slate-600"})}),(0,e.jsx)("button",{disabled:!W,onClick:()=>be(!Ne),className:I("w-[15px] h-8 flex items-center justify-center rounded-r-[3px] border-l border-transparent hover:border-slate-200 transition-all disabled:opacity-40",Ne?"bg-slate-100":"hover:bg-slate-200"),title:"Numbering Options",children:(0,e.jsx)(w.ChevronDown,{size:13,className:"text-slate-400"})}),Ne&&(0,e.jsxs)("div",{className:"absolute top-full left-0 mt-1 bg-white border border-slate-200 rounded-lg shadow-xl p-2 z-[100] animate-in fade-in zoom-in-95 duration-150 w-64 grid grid-cols-4 gap-2",children:[(0,e.jsx)("button",{onClick:()=>{s({isNumbered:!1,listType:"none"}),be(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1",children:(0,e.jsx)("span",{className:"text-[10px] text-slate-500",children:"None"})}),(0,e.jsx)("button",{onClick:()=>{s({isNumbered:!0,isBulleted:!1,listType:"number-decimal"}),be(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"1."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"2."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"3."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isNumbered:!0,isBulleted:!1,listType:"number-decimal-paren"}),be(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"1)"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"2)"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"3)"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isNumbered:!0,isBulleted:!1,listType:"number-roman-upper"}),be(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"I."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"II."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"III."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isNumbered:!0,isBulleted:!1,listType:"number-alpha-upper"}),be(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"A."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"B."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"C."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isNumbered:!0,isBulleted:!1,listType:"number-alpha-lower-paren"}),be(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"a)"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"b)"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"c)"}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isNumbered:!0,isBulleted:!1,listType:"number-alpha-lower"}),be(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"a."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"b."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"c."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,e.jsx)("button",{onClick:()=>{s({isNumbered:!0,isBulleted:!1,listType:"number-roman-lower"}),be(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"i."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"ii."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[6px] font-bold",children:"iii."}),(0,e.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})})]})]}),(0,e.jsx)("div",{className:"w-[1px] h-6 bg-slate-200 mx-1.5"}),(0,e.jsx)("button",{disabled:!W,className:"w-8 h-8 flex items-center justify-center rounded-[3px] hover:bg-slate-100 transition-all disabled:opacity-40",title:"Decrease List Level",children:(0,e.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 14 14",fill:"none",className:"text-slate-600",children:(0,e.jsx)("path",{d:"M2 3H12M6 7H12M6 11H12M2 7L4 9L2 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,e.jsx)("button",{disabled:!W,className:"w-8 h-8 flex items-center justify-center rounded-[3px] hover:bg-slate-100 transition-all disabled:opacity-40",title:"Increase List Level",children:(0,e.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 14 14",fill:"none",className:"text-slate-600",children:(0,e.jsx)("path",{d:"M2 3H12M6 7H12M6 11H12M4 7L2 9L4 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1.5 mb-1",children:[(0,e.jsx)("button",{disabled:!W,onClick:()=>s({textAlign:"left"}),className:I("w-8 h-8 flex items-center justify-center rounded-[3px] transition-all disabled:opacity-40",(r==null?void 0:r.textAlign)==="left"?"bg-blue-100":"hover:bg-slate-100"),title:"Align Left",children:(0,e.jsx)(w.AlignLeft,{size:19,className:(r==null?void 0:r.textAlign)==="left"?"text-slate-900":"text-slate-600"})}),(0,e.jsx)("button",{disabled:!W,onClick:()=>s({textAlign:"center"}),className:I("w-8 h-8 flex items-center justify-center rounded-[3px] transition-all disabled:opacity-40",(r==null?void 0:r.textAlign)==="center"?"bg-blue-100":"hover:bg-slate-100"),title:"Center",children:(0,e.jsx)(w.AlignCenter,{size:19,className:(r==null?void 0:r.textAlign)==="center"?"text-slate-900":"text-slate-600"})}),(0,e.jsx)("button",{disabled:!W,onClick:()=>s({textAlign:"right"}),className:I("w-8 h-8 flex items-center justify-center rounded-[3px] transition-all disabled:opacity-40",(r==null?void 0:r.textAlign)==="right"?"bg-blue-100":"hover:bg-slate-100"),title:"Align Right",children:(0,e.jsx)(w.AlignRight,{size:19,className:(r==null?void 0:r.textAlign)==="right"?"text-slate-900":"text-slate-600"})}),(0,e.jsx)("button",{disabled:!W,onClick:()=>s({textAlign:"justify"}),className:I("w-8 h-8 flex items-center justify-center rounded-[3px] transition-all disabled:opacity-40",(r==null?void 0:r.textAlign)==="justify"?"bg-blue-100":"hover:bg-slate-100"),title:"Justify",children:(0,e.jsx)(w.AlignJustify,{size:19,className:(r==null?void 0:r.textAlign)==="justify"?"text-slate-900":"text-slate-600"})})]}),L>=.85&&(0,e.jsx)("span",{className:"text-[9px] text-center uppercase tracking-[0.2em] font-black text-slate-300 mt-auto",children:"Paragraph"})]}),(0,e.jsxs)("div",{className:"flex flex-col items-center border-r border-slate-100 px-2 gap-1 h-full py-1.5 shrink-0",children:[(0,e.jsxs)("div",{className:"flex items-center justify-center gap-1 my-auto",children:[(0,e.jsxs)("div",{className:"relative group/shapes flex justify-center",children:[(0,e.jsxs)("button",{className:"flex flex-col items-center justify-center gap-1.5 px-3 py-1.5 hover:bg-slate-50 rounded-lg group transition-all min-w-[64px]",onClick:()=>{var U;return(U=window._toggleShapesMenu)==null?void 0:U.call(window)},children:[(0,e.jsx)("div",{className:"bg-blue-50 p-1.5 rounded-lg group-hover:scale-105 transition-transform",children:(0,e.jsx)(w.Square,{size:20,className:"text-blue-600"})}),(0,e.jsx)("span",{className:"text-[10px] font-bold text-slate-700",children:"Shapes"})]}),(0,e.jsx)(Ha,{onAddShape:U=>{c(U)},uiScale:L})]}),(0,e.jsx)("div",{className:"w-[1px] h-10 bg-slate-100 mx-1"}),(0,e.jsxs)("button",{onClick:u,className:"flex flex-col items-center justify-center gap-1.5 px-3 py-1.5 hover:bg-slate-50 rounded-lg text-slate-600 transition-colors min-w-[64px]",title:"Text Box",children:[(0,e.jsx)("div",{className:"p-1.5",children:(0,e.jsx)(w.Type,{size:20})}),(0,e.jsx)("span",{className:"text-[10px] font-medium text-slate-500",children:"Text Box"})]}),(0,e.jsx)("div",{className:"w-[1px] h-10 bg-slate-100 mx-1"}),(0,e.jsxs)("button",{onClick:()=>{var U;return(U=y.current)==null?void 0:U.click()},className:"flex flex-col items-center justify-center gap-1.5 px-3 py-1.5 hover:bg-slate-50 rounded-lg text-slate-600 transition-colors min-w-[64px]",title:"Image",children:[(0,e.jsx)("div",{className:"p-1.5",children:(0,e.jsx)(w.Image,{size:20})}),(0,e.jsx)("span",{className:"text-[10px] font-medium text-slate-500",children:"Image"}),(0,e.jsx)("input",{type:"file",ref:y,className:"hidden",accept:"image/*",onChange:U=>{var de;return((de=U.target.files)==null?void 0:de[0])&&a(U.target.files[0])}})]})]}),L>=.85&&(0,e.jsx)("span",{className:"text-[9px] uppercase tracking-[0.2em] font-black text-slate-300 mt-auto",children:"Drawing"})]}),(0,e.jsxs)("div",{className:"flex flex-col items-center border-r border-slate-100 px-1 gap-1 h-full py-1.5 relative",children:[(0,e.jsxs)("div",{className:"flex items-center justify-center gap-0.5 my-auto h-full relative",children:[(0,e.jsxs)("button",{disabled:!W||E,onClick:()=>n(!ee),className:I("flex flex-col items-center justify-center gap-1.5 px-3 py-1.5 hover:bg-slate-50 rounded-lg text-slate-600 disabled:opacity-20 transition-all min-w-[72px]",ee&&"bg-slate-100 text-slate-900"),children:[(0,e.jsx)("div",{className:"p-1.5 rounded-lg group-hover:scale-110 transition-transform",children:(0,e.jsx)(w.Sparkles,{size:20,className:"text-purple-500"})}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{className:"text-[10px] font-bold",children:"Refine"}),(0,e.jsx)(w.ChevronDown,{size:10,className:"text-slate-400"})]})]}),ee&&(0,e.jsxs)("div",{className:"absolute top-full left-0 mt-2 bg-white border border-slate-200 rounded-xl shadow-xl w-40 z-[100] animate-in fade-in zoom-in-95 duration-150 overflow-hidden",children:[(0,e.jsxs)("button",{onClick:()=>{$==null||$(r.id,"shorten"),n(!1)},className:"w-full px-4 py-2.5 text-left text-xs font-medium text-slate-700 hover:bg-purple-50 hover:text-purple-700 flex items-center gap-2 transition-colors border-b border-slate-50",children:[(0,e.jsx)("span",{className:"text-purple-400",children:"abc"}),"Shorten"]}),(0,e.jsxs)("button",{onClick:()=>{$==null||$(r.id,"reframe"),n(!1)},className:"w-full px-4 py-2.5 text-left text-xs font-medium text-slate-700 hover:bg-blue-50 hover:text-blue-700 flex items-center gap-2 transition-colors border-b border-slate-50",children:[(0,e.jsx)("span",{className:"text-blue-400",children:"\u21BB"}),"Reframe"]}),(0,e.jsxs)("button",{onClick:()=>{$==null||$(r.id,"lengthen"),n(!1)},className:"w-full px-4 py-2.5 text-left text-xs font-medium text-slate-700 hover:bg-emerald-50 hover:text-emerald-700 flex items-center gap-2 transition-colors",children:[(0,e.jsx)("span",{className:"text-emerald-400",children:"..."}),"Lengthen"]})]})]}),E&&(0,e.jsx)("div",{className:"absolute inset-x-0 top-2 bottom-8 bg-white/80 flex items-center justify-center rounded-lg z-10 backdrop-blur-[1px]",children:(0,e.jsx)(w.RefreshCw,{size:16,className:"text-blue-600 animate-spin"})}),L>=.85&&(0,e.jsx)("span",{className:"text-[9px] uppercase tracking-[0.2em] font-black text-slate-300 mt-auto",children:"AI Text"})]}),(0,e.jsxs)("div",{className:"flex flex-col items-center pl-4 pr-3 gap-1 h-full py-2 relative",children:[(0,e.jsxs)("div",{className:"flex items-center justify-center gap-1 my-auto h-full",children:[(0,e.jsxs)("button",{onClick:P,className:"flex flex-col items-center justify-center gap-1.5 px-3 py-1.5 hover:bg-slate-50 rounded-lg text-slate-700 transition-all min-w-[64px] group",title:"Present",children:[(0,e.jsx)("div",{className:"p-1.5 rounded-lg group-hover:scale-110 transition-transform",children:(0,e.jsx)(w.Play,{size:20,className:"fill-slate-700 group-hover:fill-slate-900"})}),(0,e.jsx)("span",{className:"text-[10px] font-bold",children:"Present"})]}),(0,e.jsx)("div",{className:"w-[1px] h-10 bg-slate-100 mx-1"}),(0,e.jsxs)("button",{onClick:v,className:"flex flex-col items-center justify-center gap-1.5 px-3 py-1.5 hover:bg-slate-50 rounded-lg text-slate-700 transition-all min-w-[64px] group",title:"Export",children:[(0,e.jsx)("div",{className:"p-1.5 rounded-lg group-hover:scale-110 transition-transform",children:(0,e.jsx)(w.Download,{size:20,className:"text-emerald-600"})}),(0,e.jsx)("span",{className:"text-[10px] font-bold",children:"Export"})]}),r&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"w-[1px] h-10 bg-slate-100 mx-1"}),(0,e.jsxs)("button",{onClick:R,className:"flex flex-col items-center justify-center gap-1.5 px-3 py-1.5 hover:bg-red-50 rounded-lg text-red-600 transition-all min-w-[64px] group",title:"Delete",children:[(0,e.jsx)("div",{className:"p-1.5 rounded-lg group-hover:scale-110 transition-transform",children:(0,e.jsx)(w.Trash2,{size:20})}),(0,e.jsx)("span",{className:"text-[10px] font-bold",children:"Delete"})]})]})]}),(0,e.jsxs)("div",{className:"absolute bottom-2 right-3 flex items-center gap-1 px-1.5 py-0.5 bg-emerald-50/50 rounded-md border border-emerald-100/50",children:[(0,e.jsx)(w.Check,{size:9,className:"text-emerald-500"}),(0,e.jsx)("span",{className:"text-[7px] font-black text-emerald-600/70 tracking-tighter uppercase",children:"Saved"})]}),L>=.85&&(0,e.jsx)("span",{className:"text-[9px] uppercase tracking-[0.2em] font-black text-slate-300 mt-auto",children:"Actions"})]})]}),h&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"fixed inset-0 bg-slate-900/40 backdrop-blur-sm z-[2000]",onClick:()=>k(!1)}),(0,e.jsxs)("div",{className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[480px] bg-white rounded-3xl shadow-2xl z-[2001] border border-slate-200 p-8 animate-in fade-in zoom-in-95 duration-200",children:[(0,e.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,e.jsxs)("h3",{className:"text-lg font-black text-slate-800 tracking-tight flex items-center gap-3",children:[(0,e.jsx)("div",{className:"p-2 bg-blue-50 text-blue-600 rounded-xl",children:(0,e.jsx)(w.Download,{size:20})}),"Upload Presentation"]}),(0,e.jsx)("button",{onClick:()=>k(!1),className:"text-slate-400 hover:text-slate-600 transition-colors",children:(0,e.jsx)(w.RefreshCw,{size:20,className:"rotate-45"})})]}),(0,e.jsxs)("div",{className:"flex gap-2 p-1 bg-slate-50 rounded-2xl mb-8",children:[(0,e.jsx)("button",{onClick:()=>D("file"),className:I("flex-1 py-3 text-xs font-black rounded-xl transition-all",F==="file"?"bg-white text-blue-600 shadow-sm":"text-slate-500 hover:text-slate-700"),children:"FILE UPLOAD"}),(0,e.jsx)("button",{onClick:()=>D("link"),className:I("flex-1 py-3 text-xs font-black rounded-xl transition-all",F==="link"?"bg-white text-blue-600 shadow-sm":"text-slate-500 hover:text-slate-700"),children:"LINK UPLOAD"})]}),F==="file"?(0,e.jsxs)("label",{className:"flex flex-col items-center justify-center gap-4 py-12 border-2 border-dashed border-slate-200 rounded-3xl hover:border-blue-400 hover:bg-blue-50/50 transition-all cursor-pointer group",children:[(0,e.jsx)("div",{className:"p-4 bg-white rounded-2xl shadow-sm border border-slate-100 group-hover:scale-110 transition-transform",children:(0,e.jsx)(w.Plus,{size:24,className:"text-blue-500"})}),(0,e.jsxs)("div",{className:"text-center",children:[(0,e.jsx)("p",{className:"text-sm font-bold text-slate-700",children:"Choose a PPTX file"}),(0,e.jsx)("p",{className:"text-xs text-slate-400 mt-1",children:"Maximum file size: 50MB"})]}),(0,e.jsx)("input",{type:"file",accept:".pptx",className:"hidden",onChange:U=>{var ve;let de=(ve=U.target.files)==null?void 0:ve[0];de&&(g(de),k(!1))}})]}):(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsx)("div",{className:"relative",children:(0,e.jsx)("input",{type:"text",placeholder:"Paste S3 or public URL",value:oe,onChange:U=>ie(U.target.value),className:"w-full bg-slate-50 border border-slate-200 rounded-2xl px-5 py-4 focus:outline-none focus:ring-4 focus:ring-blue-500/10 focus:border-blue-500 text-sm placeholder:text-slate-400 text-black"})}),(0,e.jsx)("button",{onClick:()=>{oe.trim()&&(g(oe.trim()),k(!1))},disabled:!oe.trim(),className:"w-full bg-blue-600 hover:bg-blue-700 disabled:bg-slate-300 text-white font-black py-4 rounded-2xl transition-all shadow-lg shadow-blue-500/20",children:"LOAD PRESENTATION"}),(0,e.jsx)("p",{className:"text-[10px] text-slate-400 text-center uppercase tracking-widest font-black",children:"Supports S3, Dropbox, and public URLS"})]})]})]})]})};var $e=require("lucide-react"),fe=require("@dnd-kit/core"),Ae=require("@dnd-kit/sortable"),ea=require("@dnd-kit/utilities");var J=require("react/jsx-runtime"),Et={triangle:"M 12,4 L 20,18 H 4 L 12,4 Z",rightTriangle:"M 4,4 V 20 H 20 L 4,4 Z",rhombus:"M 12,4 L 20,12 L 12,20 L 4,12 L 12,4 Z",parallelogram:"M 7,4 H 21 L 17,20 H 3 L 7,4 Z",trapezoid:"M 6,4 H 18 L 21,20 H 3 L 6,4 Z",pentagon:"M 12,3 L 21,9 V 19 H 3 V 9 L 12,3 Z",hexagon:"M 12,3 L 20,7.5 V 16.5 L 12,21 L 4,16.5 V 7.5 L 12,3 Z",heptagon:"M 12,3 L 18.5,6 L 21,13 L 16,20 H 8 L 3,13 L 5.5,6 L 12,3 Z",octagon:"M 8.5,3 H 15.5 L 21,8.5 V 15.5 L 15.5,21 H 8.5 L 3,15.5 V 8.5 L 8.5,3 Z",heart:"M 12,21.35 L 10.55,20.03 C 5.4,15.36 2,12.28 2,8.5 2,5.42 4.42,3 7.5,3 C 9.24,3 10.91,3.81 12,5.09 C 13.09,3.81 14.76,3 16.5,3 C 19.58,3 22,5.42 22,8.5 C 22,12.28 18.6,15.36 13.45,20.04 L 12,21.35 Z",smiley:"M 12,3 A 9,9 0 1,0 12,21 A 9,9 0 1,0 12,3 M 9,9 A 1.5,1.5 0 1,1 9,10.5 A 1.5,1.5 0 1,1 9,9 M 15,9 A 1.5,1.5 0 1,1 15,10.5 A 1.5,1.5 0 1,1 15,9 M 8,15 C 8,15 9.5,17 12,17 C 14.5,17 16,15 16,15",sun:"M 12,7 A 5,5 0 1,1 12,17 A 5,5 0 1,1 12,7 M 12,2 V 4 M 12,20 V 22 M 4,12 H 2 M 22,12 H 20 M 19.07,4.93 L 17.66,6.34 M 6.34,17.66 L 4.93,19.07 M 4.93,4.93 L 6.34,6.34 M 17.66,17.66 L 19.07,19.07",moon:"M 12,3 A 9,9 0 1,0 12,21 A 7,7 0 0,1 12,3 Z",circle:"M 12,3 A 9,9 0 1,1 12,21 A 9,9 0 1,1 12,3 Z",arrowRight:"M 4,11 H 15.5 L 12,7.5 L 13.5,6 L 19.5,12 L 13.5,18 L 12,16.5 L 15.5,13 H 4 Z",arrowLeft:"M 20,11 H 8.5 L 12,7.5 L 10.5,6 L 4.5,12 L 10.5,18 L 12,16.5 L 8.5,13 H 20 Z",arrowUp:"M 13,20 V 8.5 L 16.5,12 L 18,10.5 L 12,4.5 L 6,10.5 L 7.5,12 L 11,8.5 V 20 Z",arrowDown:"M 11,4 V 15.5 L 7.5,12 L 6,13.5 L 12,19.5 L 18,13.5 L 16.5,12 L 13,15.5 V 4 Z",arrowLeftRight:"M 4,12 L 8,8 V 11 H 16 V 8 L 20,12 L 16,16 V 13 H 8 V 16 L 4,12 Z",arrowUpDown:"M 12,4 L 8,8 H 11 V 16 H 8 L 12,20 L 16,16 H 13 V 8 H 16 L 12,4 Z",star4:"M 12,2 L 14,10 L 22,12 L 14,14 L 12,22 L 10,14 L 2,12 L 10,10 L 12,2 Z",star5:"M 12,2 L 14.5,9.5 H 22 L 16,14 L 18.5,21.5 L 12,17 L 5.5,21.5 L 8,14 L 2,9.5 H 9.5 L 12,2 Z",star6:"M 12,2 L 15,7 L 21,6 L 17,10.5 L 19,17 L 12,14 L 5,17 L 7,10.5 L 3,6 L 9,7 L 12,2 Z",star8:"M 12,2 L 14,6 L 18,4 L 16,8 L 20,10 L 16,12 L 18,16 L 14,14 L 12,18 L 10,14 L 6,16 L 8,12 L 4,10 L 8,8 L 6,4 L 10,6 L 12,2 Z",cloud:"M 17,19 C 14.8,19 13.1,17.7 12.3,15.8 C 11.4,16 10.5,16.2 9.6,16.2 C 7,16.2 4.7,14.6 3.7,12.3 C 1.5,11.8 0,9.9 0,7.6 C 0,5 2.1,2.9 4.7,2.9 C 5.3,2.9 5.8,3 6.3,3.1 C 7.6,1.4 9.6,0.3 11.9,0.3 C 12.5,0.3 13.1,0.4 13.7,0.5 C 15,1.9 15.9,3.7 16,5.7 C 18.2,6.1 20,8.1 20,10.5 C 20,13.2 17.8,15.4 15.1,15.4 C 14.8,15.4 14.5,15.4 14.2,15.3 C 14.2,15.4 14.2,15.4 14.2,15.5 C 14.2,17.4 15.5,19 17,19 Z",lightning:"M 13,2 L 3,14 H 12 V 22 L 22,10 H 13 L 16,2 Z",plus:"M 19,13 H 13 V 19 H 11 V 13 H 5 V 11 H 11 V 5 H 13 V 11 H 19 V 13 Z",minus:"M 19,13 H 5 V 11 H 19 V 13 Z",multiply:"M 19,6.41 L 17.59,5 L 12,10.59 L 6.41,5 L 5,6.41 L 10.59,12 L 5,17.59 L 6.41,19 L 12,13.41 L 17.59,19 L 19,17.59 L 13.41,12 L 19,6.41 Z",divide:"M 12,7 A 2,2 0 1,1 12,11 A 2,2 0 1,1 12,7 M 12,17 A 2,2 0 1,1 12,21 A 2,2 0 1,1 12,17 M 5,11 H 19 V 13 H 5 V 11 Z",equal:"M 19,10 H 5 V 8 H 19 V 10 M 19,16 H 5 V 14 H 19 V 16 Z"},ja=({slide:u,index:a,isActive:c,onSelect:m,onDelete:v,onDuplicate:s,showDelete:R,uiScale:T,appBgColor:P})=>{let{attributes:r,listeners:H,setNodeRef:g,transform:S,transition:L,isDragging:A}=(0,Ae.useSortable)({id:u.id}),N={transform:ea.CSS.Transform.toString(S),transition:L,zIndex:A?2:1,opacity:A?.5:1};return(0,J.jsxs)("div",{ref:g,onClick:m,className:I("cursor-pointer border-[1.5px] border-solid p-2 transition-all duration-300 group relative select-none",c?"bg-white":"border hover:border-slate-200 bg-white/50 hover:bg-white"),style:j(z({},N),{border:c?`1px solid ${P}`:"1px solid transparent"}),children:[(0,J.jsxs)("div",{className:I("text-[10px] font-bold mb-1 flex items-center justify-between transition-colors",!c&&"text-slate-400"),style:{color:c?P:void 0},children:[(0,J.jsxs)("div",{className:"flex items-center gap-1",children:[(0,J.jsx)("div",j(z(z({},r),H),{className:"cursor-grab active:cursor-grabbing p-0.5 hover:bg-slate-100 text-slate-300 hover:text-slate-500",children:(0,J.jsx)($e.GripVertical,{size:10})})),(0,J.jsxs)("span",{children:["SLIDE ",a+1]})]}),(0,J.jsxs)("div",{className:"flex items-center gap-1",children:[c&&(0,J.jsx)("span",{className:"h-1.5 w-1.5",style:{backgroundColor:P}}),(0,J.jsxs)("div",{className:"flex items-center opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,J.jsx)("button",{onClick:f=>{f.stopPropagation(),s()},className:"p-1 hover:bg-blue-50 text-slate-400 hover:text-blue-500 transition-all",title:"Duplicate Slide",children:(0,J.jsx)($e.Copy,{size:12})}),R&&(0,J.jsx)("button",{onClick:f=>{f.stopPropagation(),v()},className:"p-1 hover:bg-red-50 text-red-400 hover:text-red-500 transition-all",title:"Delete Slide",children:(0,J.jsx)($e.Trash2,{size:12})})]})]})]}),(0,J.jsx)("div",{className:"aspect-video bg-white flex items-center justify-center border border-slate-200 overflow-hidden relative group-hover:shadow-sm transition-shadow",children:(0,J.jsx)("div",{className:"origin-center pointer-events-none select-none shrink-0",style:{width:"1200px",height:"675px",transform:`scale(${170*T/1200})`,backgroundColor:"#ffffff"},children:u.elements.sort((f,G)=>(f.zIndex||0)-(G.zIndex||0)).map(f=>{var $;let G={position:"absolute",left:f.x,top:f.y,width:f.width,height:f.height,opacity:($=f.opacity)!=null?$:1};if(f.type==="text")return(0,J.jsx)("div",{style:j(z({},G),{fontSize:f.fontSize,fontFamily:f.fontFamily,color:f.color,textAlign:f.textAlign||"left",fontWeight:f.isBold?"bold":"normal",fontStyle:f.isItalic?"italic":"normal",lineHeight:1.2,overflow:"hidden",wordBreak:"break-word",whiteSpace:"pre-wrap"}),children:f.content},f.id);if(f.type==="shape"){let Q=Et[f.shapeType]||(f.shapeType==="ellipse"?Et.circle:null);return Q?(0,J.jsx)("svg",{viewBox:"0 0 24 24",style:j(z({},G),{fill:f.fill}),preserveAspectRatio:"none",children:(0,J.jsx)("path",{d:Q})},f.id):(0,J.jsx)("div",{style:j(z({},G),{backgroundColor:f.fill,borderRadius:f.shapeType==="ellipse"?"50%":"0"})},f.id)}else if(f.type==="image")return(0,J.jsx)("img",{src:f.src,alt:"",style:j(z({},G),{objectFit:"contain"})},f.id);return null})})})]})},ta=({slides:u,currentSlideIndex:a,onSelectSlide:c,onDeleteSlide:m,onDuplicateSlide:v,onReorderSlides:s,uiScale:R,appBgColor:T="#B7472A"})=>{let P=(0,fe.useSensors)((0,fe.useSensor)(fe.PointerSensor,{activationConstraint:{distance:5}}),(0,fe.useSensor)(fe.KeyboardSensor,{coordinateGetter:Ae.sortableKeyboardCoordinates})),r=H=>{let{active:g,over:S}=H;if(g.id!==(S==null?void 0:S.id)){let L=u.findIndex(N=>N.id===g.id),A=u.findIndex(N=>N.id===(S==null?void 0:S.id));s(L,A)}};return(0,J.jsx)("div",{className:"bg-white border-r border-slate-100 overflow-y-auto p-4 flex flex-col gap-4",style:{width:`${256*R}px`},children:(0,J.jsx)(fe.DndContext,{sensors:P,collisionDetection:fe.closestCenter,onDragEnd:r,children:(0,J.jsx)(Ae.SortableContext,{items:u.map(H=>H.id),strategy:Ae.verticalListSortingStrategy,children:u.map((H,g)=>(0,J.jsx)(ja,{slide:H,index:g,isActive:g===a,onSelect:()=>c(g),onDelete:()=>m(g),onDuplicate:()=>v(g),showDelete:u.length>1,uiScale:R,appBgColor:T},H.id))})})})};var ge=require("react"),ne=Fe(require("fabric")),Be=require("lucide-react");var V=require("react/jsx-runtime"),Ra={triangle:"M 12,4 L 20,18 H 4 L 12,4 Z",rightTriangle:"M 4,4 V 20 H 20 L 4,4 Z",rhombus:"M 12,4 L 20,12 L 12,20 L 4,12 L 12,4 Z",parallelogram:"M 7,4 H 21 L 17,20 H 3 L 7,4 Z",trapezoid:"M 6,4 H 18 L 21,20 H 3 L 6,4 Z",pentagon:"M 12,3 L 21,9 V 19 H 3 V 9 L 12,3 Z",hexagon:"M 12,3 L 20,7.5 V 16.5 L 12,21 L 4,16.5 V 7.5 L 12,3 Z",heptagon:"M 12,3 L 18.5,6 L 21,13 L 16,20 H 8 L 3,13 L 5.5,6 L 12,3 Z",octagon:"M 8.5,3 H 15.5 L 21,8.5 V 15.5 L 15.5,21 H 8.5 L 3,15.5 V 8.5 L 8.5,3 Z",heart:"M 12,21.35 L 10.55,20.03 C 5.4,15.36 2,12.28 2,8.5 2,5.42 4.42,3 7.5,3 C 9.24,3 10.91,3.81 12,5.09 C 13.09,3.81 14.76,3 16.5,3 C 19.58,3 22,5.42 22,8.5 C 22,12.28 18.6,15.36 13.45,20.04 L 12,21.35 Z",smiley:"M 12,3 A 9,9 0 1,0 12,21 A 9,9 0 1,0 12,3 M 9,9 A 1.5,1.5 0 1,1 9,10.5 A 1.5,1.5 0 1,1 9,9 M 15,9 A 1.5,1.5 0 1,1 15,10.5 A 1.5,1.5 0 1,1 15,9 M 8,15 C 8,15 9.5,17 12,17 C 14.5,17 16,15 16,15",sun:"M 12,7 A 5,5 0 1,1 12,17 A 5,5 0 1,1 12,7 M 12,2 V 4 M 12,20 V 22 M 4,12 H 2 M 22,12 H 20 M 19.07,4.93 L 17.66,6.34 M 6.34,17.66 L 4.93,19.07 M 4.93,4.93 L 6.34,6.34 M 17.66,17.66 L 19.07,19.07",moon:"M 12,3 A 9,9 0 1,0 12,21 A 7,7 0 0,1 12,3 Z",circle:"M 12,3 A 9,9 0 1,1 12,21 A 9,9 0 1,1 12,3 Z",arrowRight:"M 4,11 H 15.5 L 12,7.5 L 13.5,6 L 19.5,12 L 13.5,18 L 12,16.5 L 15.5,13 H 4 Z",arrowLeft:"M 20,11 H 8.5 L 12,7.5 L 10.5,6 L 4.5,12 L 10.5,18 L 12,16.5 L 8.5,13 H 20 Z",arrowUp:"M 13,20 V 8.5 L 16.5,12 L 18,10.5 L 12,4.5 L 6,10.5 L 7.5,12 L 11,8.5 V 20 Z",arrowDown:"M 11,4 V 15.5 L 7.5,12 L 6,13.5 L 12,19.5 L 18,13.5 L 16.5,12 L 13,15.5 V 4 Z",arrowLeftRight:"M 4,12 L 8,8 V 11 H 16 V 8 L 20,12 L 16,16 V 13 H 8 V 16 L 4,12 Z",arrowUpDown:"M 12,4 L 8,8 H 11 V 16 H 8 L 12,20 L 16,16 H 13 V 8 H 16 L 12,4 Z",star4:"M 12,2 L 14,10 L 22,12 L 14,14 L 12,22 L 10,14 L 2,12 L 10,10 L 12,2 Z",star5:"M 12,2 L 14.5,9.5 H 22 L 16,14 L 18.5,21.5 L 12,17 L 5.5,21.5 L 8,14 L 2,9.5 H 9.5 L 12,2 Z",star6:"M 12,2 L 15,7 L 21,6 L 17,10.5 L 19,17 L 12,14 L 5,17 L 7,10.5 L 3,6 L 9,7 L 12,2 Z",star8:"M 12,2 L 14,6 L 18,4 L 16,8 L 20,10 L 16,12 L 18,16 L 14,14 L 12,18 L 10,14 L 6,16 L 8,12 L 4,10 L 8,8 L 6,4 L 10,6 L 12,2 Z",cloud:"M 17,19 C 14.8,19 13.1,17.7 12.3,15.8 C 11.4,16 10.5,16.2 9.6,16.2 C 7,16.2 4.7,14.6 3.7,12.3 C 1.5,11.8 0,9.9 0,7.6 C 0,5 2.1,2.9 4.7,2.9 C 5.3,2.9 5.8,3 6.3,3.1 C 7.6,1.4 9.6,0.3 11.9,0.3 C 12.5,0.3 13.1,0.4 13.7,0.5 C 15,1.9 15.9,3.7 16,5.7 C 18.2,6.1 20,8.1 20,10.5 C 20,13.2 17.8,15.4 15.1,15.4 C 14.8,15.4 14.5,15.4 14.2,15.3 C 14.2,15.4 14.2,15.4 14.2,15.5 C 14.2,17.4 15.5,19 17,19 Z",lightning:"M 13,2 L 3,14 H 12 V 22 L 22,10 H 13 L 16,2 Z",plus:"M 19,13 H 13 V 19 H 11 V 13 H 5 V 11 H 11 V 5 H 13 V 11 H 19 V 13 Z",minus:"M 19,13 H 5 V 11 H 19 V 13 Z",multiply:"M 19,6.41 L 17.59,5 L 12,10.59 L 6.41,5 L 5,6.41 L 10.59,12 L 5,17.59 L 6.41,19 L 12,13.41 L 17.59,19 L 19,17.59 L 13.41,12 L 19,6.41 Z",divide:"M 12,7 A 2,2 0 1,1 12,11 A 2,2 0 1,1 12,7 M 12,17 A 2,2 0 1,1 12,21 A 2,2 0 1,1 12,17 M 5,11 H 19 V 13 H 5 V 11 Z",equal:"M 19,10 H 5 V 8 H 19 V 10 M 19,16 H 5 V 14 H 19 V 16 Z"},Da=(u,a,c,m)=>{if(a)switch(u){case"bullet-disc":return"\u2022";case"bullet-circle":return"\u25CB";case"bullet-square":return"\u25A0";case"bullet-square-outlined":return"\u25A1";case"bullet-diamond":return"\u25C6";case"bullet-arrow":return"\u27A4";case"bullet-check":return"\u2713";case"none":return"";default:return"\u2022"}else if(c){let v=m+1;switch(u){case"number-decimal":return`${v}.`;case"number-decimal-paren":return`${v})`;case"number-roman-upper":return aa(v)+".";case"number-roman-lower":return aa(v).toLowerCase()+".";case"number-alpha-upper":return yt(v)+".";case"number-alpha-lower":return yt(v).toLowerCase()+".";case"number-alpha-lower-paren":return yt(v).toLowerCase()+")";case"none":return"";default:return`${v}.`}}return""},aa=u=>{let a={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1},c="";for(let m in a)for(;u>=a[m];)c+=m,u-=a[m];return c},yt=u=>String.fromCharCode(64+u),ot=class extends ne.Textbox{_renderTextLine(a,c,m,v,s,R){if(super._renderTextLine(a,c,m,v,s,R),(this.isBulleted||this.isNumbered)&&this.listType!=="none"){let T=Da(this.listType,this.isBulleted,this.isNumbered,R);if(T){c.save();let P=this.fontSize||22,r=-P*1,H=P*.6;c.font=`${this.fontStyle} ${this.fontWeight} ${H}px ${this.fontFamily}`,c.fillStyle=this.fill,c.fillText(T,v+r,s-P*.35),c.restore()}}}},it=({slide:u,onElementUpdate:a,onSelect:c,uiScale:m,onSlashCommand:v,selectedElementId:s,onAiGenerateClick:R,onAiGenerateInfographicClick:T,onUploadImageClick:P,onDeleteElement:r})=>{let H=(0,ge.useRef)(null),g=(0,ge.useRef)(null),S=(0,ge.useRef)(!1),L=(0,ge.useRef)(a),A=(0,ge.useRef)(c),N=(0,ge.useRef)(null),[f,G]=(0,ge.useState)(1),[$,Q]=(0,ge.useState)(!1),E=(0,ge.useRef)({x:0,y:0});(0,ge.useEffect)(()=>{if(!N.current)return;let C=new ResizeObserver(ae=>{let q=ae[0];if(q){let{width:O,height:ee}=q.contentRect,n=O/1200,x=ee/675,i=Math.min(n,x)*.95;G(i)}});return C.observe(N.current),()=>C.disconnect()},[]),(0,ge.useEffect)(()=>{L.current=a,A.current=c},[a,c]),(0,ge.useEffect)(()=>{if(H.current&&!g.current){let C=new ne.Canvas(H.current,{width:1200,height:675,backgroundColor:"white",selection:!0,preserveObjectStacking:!0});g.current=C,Q(!0);let ae=i=>{i.left<0&&i.set("left",0),i.top<0&&i.set("top",0);let h=i.getBoundingRect();h.left+h.width>(C.width||1200)&&i.set("left",(C.width||1200)-h.width),h.top+h.height>(C.height||675)&&i.set("top",(C.height||675)-h.height)};C.on("object:moving",i=>ae(i.target)),C.on("object:scaling",i=>ae(i.target));let q=i=>{var F;if(S.current)return;let h=i.target,k=(F=h.get("data"))==null?void 0:F.id;h&&k&&L.current(k,z({x:h.left,y:h.top,width:h.getScaledWidth(),height:h.getScaledHeight()},h.isType("textbox")?{content:h.text,textAlign:h.textAlign,fontSize:h.fontSize,fontFamily:h.fontFamily,color:h.fill}:{fill:h.fill}))};C.on("object:modified",q),C.on("text:changed",q);let O=i=>{if(!(!i||!i.isType("textbox")))return{fontFamily:i.fontFamily,fontSize:i.fontSize,isBold:i.fontWeight==="bold",isItalic:i.fontStyle==="italic",isUnderline:i.underline,textAlign:i.textAlign,color:i.fill,highlightColor:i.textBackgroundColor,isBulleted:!!i.isBulleted,isNumbered:!!i.isNumbered}},ee=(i,h=!1)=>{var k;try{let F=(k=H.current)==null?void 0:k.getBoundingClientRect();if(!F||!i)return;let D=0,oe=0,ie=(te,_)=>typeof te=="object"&&te!==null&&typeof te[_]=="function",Z=ie(i,"isType")&&i.isType("textbox");if(Z&&i.isEditing){let _=(Y=>{try{let le=Y.selectionStart||0;if(ie(Y,"getCursorCoords"))return Y.getCursorCoords(le);if(ie(Y,"_getCursorCoords"))return Y._getCursorCoords(le)}catch(le){}return null})(i);if(_){let Y=ne.util.transformPoint(new ne.Point(_.left,_.top),ie(i,"calcTransformMatrix")?i.calcTransformMatrix():[1,0,0,1,0,0]),le=C.viewportTransform||[1,0,0,1,0,0],Ne=ne.util.transformPoint(Y,le);D=F.left+Ne.x*f,oe=F.top+Ne.y*f}else{let Y=ie(i,"getBoundingRect")?i.getBoundingRect():{left:0,top:0,width:0,height:0};D=F.left+(Y.left+Y.width/2)*f,oe=F.top+Y.top*f}}else{let te=ie(i,"getBoundingRect")?i.getBoundingRect():{left:E.current.x,top:E.current.y,width:0,height:0};D=F.left+(te.left+te.width/2)*f,oe=F.top+te.top*f}if(D&&oe){let te=h?"text-selection":Z?"textbox":"default",_=D,Y=oe;te==="default"?(_=D+5,Y=oe+5):(_=D-220,Y=oe-140),v({x:_,y:Y},te,O(i))}}catch(F){console.error("Critical error in triggerSlashMenu:",F)}},n=i=>{var k,F;let h=((k=i.selected)==null?void 0:k[0])||i.target;if(h){let D=(F=h.get("data"))==null?void 0:F.id;A.current(D),h.isType("textbox")&&!S.current&&ee(h)}};C.on("selection:created",n),C.on("selection:updated",n),C.on("selection:cleared",()=>{A.current(null),v({x:0,y:0},"default")}),C.on("text:selection:changed",i=>{let h=i.target;h&&h.isType("textbox")&&h.selectionStart!==h.selectionEnd&&ee(h,!0)}),C.on("mouse:move",i=>{i.pointer&&(E.current={x:i.pointer.x,y:i.pointer.y})});let x=i=>{let h=g.current;if(!h)return;let k=h.getActiveObject();if(i.key==="/"){i.preventDefault(),ee(k||{isType:()=>!1,getBoundingRect:()=>({left:E.current.x,top:E.current.y,width:0,height:0})});return}if(k&&k.isType("textbox")&&k.isEditing||!k)return;let F=i.shiftKey?10:1,D=!1;switch(i.key){case"ArrowLeft":k.set("left",k.left-F),D=!0;break;case"ArrowRight":k.set("left",k.left+F),D=!0;break;case"ArrowUp":k.set("top",k.top-F),D=!0;break;case"ArrowDown":k.set("top",k.top+F),D=!0;break}D&&(ae(k),h.requestRenderAll(),q({target:k}))};window.addEventListener("keydown",x),C._keyboardListener=x}return()=>{if(g.current){let C=g.current._keyboardListener;C&&window.removeEventListener("keydown",C),g.current.dispose(),g.current=null}}},[]),(0,ge.useEffect)(()=>{if(!g.current)return;let C=g.current;(async()=>{S.current=!0;let q=C.getObjects(),O=new Set(u.elements.map(n=>n.id));q.forEach(n=>{var i;let x=(i=n.get("data"))==null?void 0:i.id;x&&!O.has(x)&&C.remove(n)});let ee=[...u.elements].sort((n,x)=>(n.zIndex||0)-(x.zIndex||0));for(let n of ee){let x=q.find(i=>{var h;return((h=i.get("data"))==null?void 0:h.id)===n.id});if(x&&x.type==="textbox"&&!(x instanceof ot)&&(C.remove(x),x=null),x){if(x===C.getActiveObject()&&x.isType("textbox")&&x.isEditing)continue;let i={left:n.x,top:n.y,opacity:n.opacity!==void 0?n.opacity:1,zIndex:n.zIndex};n.type==="text"&&x.isType("textbox")?(i.text=n.content||" ",i.fontSize=n.fontSize||22,i.fill=n.color||"#000000",i.textBackgroundColor=n.highlightColor||"",i.textAlign=n.textAlign||"left",i.fontWeight=n.isBold?"bold":"normal",i.fontStyle=n.isItalic?"italic":"normal",i.underline=n.isUnderline||!1,i.linethrough=n.isStrikethrough||!1,i.charSpacing=n.charSpacing||0,i.fontFamily=n.fontFamily||"Arial",x.isBulleted=n.isBulleted,x.isNumbered=n.isNumbered,x.listType=n.listType,i.width=Math.max(n.width||50,10)):n.type==="shape"?(i.fill=n.fill||"#cccccc",i.scaleX=(n.width||50)/(x.width||1),i.scaleY=(n.height||50)/(x.height||1)):n.type==="image"&&(i.scaleX=(n.width||100)/(x.width||1),i.scaleY=(n.height||100)/(x.height||1)),x.set(i)}else{let i=null,h={left:n.x,top:n.y,data:{id:n.id},originX:"left",originY:"top",opacity:n.opacity!==void 0?n.opacity:1};if(n.type==="text")i=new ot(n.content||" ",j(z({},h),{width:Math.max(n.width||200,10),fontSize:n.fontSize||22,fill:n.color||"#000000",backgroundColor:n.highlightColor||"",fontFamily:n.fontFamily||"Inter, Arial, sans-serif",textAlign:n.textAlign||"left",fontWeight:n.isBold?"bold":"normal",fontStyle:n.isItalic?"italic":"normal",underline:n.isUnderline||!1,linethrough:n.isStrikethrough||!1,charSpacing:n.charSpacing||0,splitByGrapheme:!1,objectCaching:!1})),i.isBulleted=n.isBulleted,i.isNumbered=n.isNumbered,i.listType=n.listType;else if(n.type==="shape"){let k=n.fill||"#3b82f6";if(n.shapeType==="ellipse")i=new ne.Circle(j(z({},h),{radius:(n.width||100)/2,scaleY:(n.height||100)/(n.width||100),fill:k}));else if(n.shapeType==="rect")i=new ne.Rect(j(z({},h),{width:n.width||100,height:n.height||100,fill:k}));else{let F=Ra[n.shapeType];if(F){i=new ne.Path(F,j(z({},h),{fill:k}));let D=i;D.set({scaleX:(n.width||100)/(D.width||1),scaleY:(n.height||100)/(D.height||1)})}else i=new ne.Rect(j(z({},h),{width:n.width||100,height:n.height||100,fill:k}))}}else if(n.type==="image")try{let k=await ne.FabricImage.fromURL(n.src);k.set(j(z({},h),{scaleX:(n.width||100)/(k.width||1),scaleY:(n.height||100)/(k.height||1)})),i=k}catch(k){console.error(k)}i&&C.add(i)}}C.renderAll(),S.current=!1})()},[u,$]);let y=u.elements.find(C=>C.id===s);return(0,V.jsx)("div",{ref:N,className:"w-full h-full flex items-center justify-center overflow-hidden relative",children:(0,V.jsxs)("div",{className:"border border-slate-200 overflow-hidden bg-white shadow-xl transition-all duration-300 ease-out shrink-0 relative",style:{transform:`scale(${f})`,transformOrigin:"center center"},children:[(0,V.jsx)("canvas",{ref:H}),u.elements.length===0&&(0,V.jsx)("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none select-none animate-in fade-in duration-700",children:(0,V.jsx)("div",{className:"flex flex-col items-center gap-4 text-slate-300",children:(0,V.jsx)("div",{className:"flex flex-col items-center gap-1 text-center",children:(0,V.jsxs)("h1",{className:"text-2xl font-medium text-slate-400",children:["Click ",(0,V.jsx)("span",{className:"px-2 py-0.5 bg-slate-100 rounded-md text-slate-500 font-bold",children:"/"})," for options"]})})})}),y&&y.type==="image"&&(0,V.jsxs)("div",{className:"absolute z-[5000] flex flex-col w-96 bg-white border border-slate-200 shadow-2xl rounded-2xl overflow-hidden animate-in fade-in zoom-in duration-200",style:{left:y.x+y.width/2>600?`${y.x-12}px`:`${y.x+y.width+12}px`,top:`${y.y+y.height/2}px`,transform:y.x+y.width/2>600?"translate(-100%, -50%)":"translate(0, -50%)"},children:[(0,V.jsx)("div",{className:"px-5 py-3.5 text-sm uppercase tracking-wider font-bold text-slate-400 bg-slate-50/50 border-b border-slate-100",children:"Image Actions"}),(0,V.jsxs)("div",{className:"p-2.5 flex flex-col gap-1",children:[(0,V.jsxs)("button",{onClick:C=>{C.stopPropagation(),R()},className:"w-full flex items-center gap-5 px-5 py-4 text-left transition-all duration-150 rounded-xl hover:bg-slate-50 group",children:[(0,V.jsx)("div",{className:"p-3 rounded-xl bg-blue-50 text-blue-600 group-hover:bg-blue-600 group-hover:text-white transition-colors",children:(0,V.jsx)(Be.Sparkles,{size:28})}),(0,V.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,V.jsx)("span",{className:"text-lg font-bold text-slate-900",children:"AI Generate Image"}),(0,V.jsx)("span",{className:"text-sm text-slate-400 truncate leading-tight",children:"Create an image with AI prompt"})]})]}),(0,V.jsxs)("button",{onClick:C=>{C.stopPropagation(),T()},className:"w-full flex items-center gap-5 px-5 py-4 text-left transition-all duration-150 rounded-xl hover:bg-slate-50 group",children:[(0,V.jsx)("div",{className:"p-3 rounded-xl bg-purple-50 text-purple-600 group-hover:bg-purple-600 group-hover:text-white transition-colors",children:(0,V.jsx)(Be.PieChart,{size:28})}),(0,V.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,V.jsx)("span",{className:"text-lg font-bold text-slate-900",children:"AI Infographic"}),(0,V.jsx)("span",{className:"text-sm text-slate-400 truncate leading-tight",children:"Generate chart or diagram"})]})]}),(0,V.jsxs)("button",{onClick:C=>{C.stopPropagation(),P()},className:"w-full flex items-center gap-5 px-5 py-4 text-left transition-all duration-150 rounded-xl hover:bg-slate-50 group",children:[(0,V.jsx)("div",{className:"p-3 rounded-xl bg-slate-100 text-slate-500 group-hover:bg-slate-200 group-hover:text-slate-700 transition-colors",children:(0,V.jsx)(Be.Image,{size:28})}),(0,V.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,V.jsx)("span",{className:"text-lg font-bold text-slate-700",children:"Change Image"}),(0,V.jsx)("span",{className:"text-sm text-slate-400 truncate leading-tight",children:"Replace with local file"})]})]}),(0,V.jsx)("div",{className:"h-[1px] bg-slate-100 my-1 mx-3"}),(0,V.jsxs)("button",{onClick:C=>{C.stopPropagation(),r()},className:"w-full flex items-center gap-5 px-5 py-4 text-left transition-all duration-150 rounded-xl hover:bg-red-50 group",children:[(0,V.jsx)("div",{className:"p-3 rounded-xl bg-red-50 text-red-500 group-hover:bg-red-500 group-hover:text-white transition-colors",children:(0,V.jsx)(Be.Trash2,{size:28})}),(0,V.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,V.jsx)("span",{className:"text-lg font-bold text-red-600",children:"Delete Element"}),(0,V.jsx)("span",{className:"text-sm text-red-400/80 truncate leading-tight",children:"Remove from slide"})]})]})]})]})]})})};var ra=Fe(require("pptxgenjs"));var Ke=class{async export(a){var r,H;let c=new ra.default,m=((r=a.layout)==null?void 0:r.width)||12192e3,v=((H=a.layout)==null?void 0:H.height)||6858e3,s=1200,R=675,T=g=>g/s*(m/914400),P=g=>g/R*(v/914400);a.slides.forEach(g=>{let S=c.addSlide();[...g.elements].sort((A,N)=>A.zIndex-N.zIndex).forEach(A=>{var G,$;let N=A.opacity!==void 0?(1-A.opacity)*100:0,f={x:T(A.x),y:P(A.y),w:T(A.width),h:P(A.height)};if(A.type==="text")S.addText(A.content,j(z({},f),{fontSize:(A.fontSize||18)/2,color:((G=A.color)==null?void 0:G.replace("#",""))||"000000",fontFace:A.fontFamily||"Arial"}));else if(A.type==="image")S.addImage(j(z({},f),{path:A.src,transparency:N}));else if(A.type==="shape"){let Q=A.shapeType==="ellipse"?c.ShapeType.ellipse:c.ShapeType.rect;S.addShape(Q,j(z({},f),{fill:{color:(($=A.fill)==null?void 0:$.replace("#",""))||"CCCCCC",transparency:N>0?Math.min(N+10,100):0}}))}})}),await c.writeFile({fileName:"presentation.pptx"})}};var sa=Fe(require("jszip")),Je=class{constructor(){this.slideWidth=12192e3;this.slideHeight=6858e3;this.CANVAS_WIDTH=1200;this.CANVAS_HEIGHT=675}async parse(a){var H,g;let c=a;if(typeof a=="string"){let S=await fetch(a);if(!S.ok){let L=S.status,A=S.statusText,N="";try{let f=await S.json();N=f.details||f.error||""}catch(f){}throw new Error(`Failed to fetch PPTX from ${a}: ${L} ${A} ${N?`(${N})`:""}`)}c=await S.arrayBuffer()}let m=await sa.default.loadAsync(c),v=await((H=m.file("ppt/presentation.xml"))==null?void 0:H.async("string"));if(!v)throw new Error("Invalid PPTX");let R=new DOMParser().parseFromString(v,"text/xml"),T=this.findFirstByLocalName(R,"sldSz");T&&(this.slideWidth=parseInt(this.getAttr(T,"cx")||"12192000"),this.slideHeight=parseInt(this.getAttr(T,"cy")||"6858000"));let P=Array.from(R.getElementsByTagNameNS("*","sldId")),r=[];for(let S=0;S<P.length;S++){let L=S+1,A=`ppt/slides/slide${L}.xml`,N=await((g=m.file(A))==null?void 0:g.async("string"));if(N){let f=await this.parseSlide(N,L,m);r.push(f)}}return{slides:r,layout:{width:this.slideWidth,height:this.slideHeight}}}getAttr(a,c){return a.getAttribute(c)||a.getAttribute(`a:${c}`)||a.getAttribute(`p:${c}`)||a.getAttribute(`r:${c}`)}findFirstByLocalName(a,c){let m=a.getElementsByTagNameNS("*",c);return m.length>0?m[0]:null}findAllByLocalName(a,c){return Array.from(a.getElementsByTagNameNS("*",c))}scaleX(a){return a/this.slideWidth*this.CANVAS_WIDTH}scaleY(a){return a/this.slideHeight*this.CANVAS_HEIGHT}parseColor(a){let c=this.findFirstByLocalName(a,"srgbClr");if(c){let v=`#${this.getAttr(c,"val")}`,s=this.findFirstByLocalName(c,"alpha"),R=s?parseInt(this.getAttr(s,"val")||"100000")/1e5:1;return{color:v,opacity:R}}let m=this.findFirstByLocalName(a,"schemeClr");if(m){let v=this.findFirstByLocalName(m,"alpha");return{color:"#000000",opacity:v?parseInt(this.getAttr(v,"val")||"100000")/1e5:1}}return{color:"#000000",opacity:1}}async resolveImage(a,c,m){var r,H;let v=await((r=m.file(`ppt/slides/_rels/slide${c}.xml.rels`))==null?void 0:r.async("string"));if(!v)return null;let R=new DOMParser().parseFromString(v,"text/xml"),T=Array.from(R.getElementsByTagName("Relationship")).find(g=>g.getAttribute("Id")===a),P=T==null?void 0:T.getAttribute("Target");if(P){let g=(P.startsWith("../")?`ppt/${P.substring(3)}`:`ppt/slides/${P}`).replace("ppt/slides/../","ppt/");return await((H=m.file(g))==null?void 0:H.async("blob"))||null}return null}async parseSlide(a,c,m){let s=new DOMParser().parseFromString(a,"text/xml"),R=[],T=0,P=this.findFirstByLocalName(s,"bg");if(P){let g=this.findFirstByLocalName(P,"blip"),S=(g==null?void 0:g.getAttributeNS("http://schemas.openxmlformats.org/officeDocument/2006/relationships","embed"))||(g==null?void 0:g.getAttribute("r:embed"));if(S){let L=await this.resolveImage(S,c,m);L&&R.push({id:`bg-${c}`,type:"image",src:URL.createObjectURL(L),x:0,y:0,width:this.CANVAS_WIDTH,height:this.CANVAS_HEIGHT,zIndex:T++,opacity:1})}}let r=this.findFirstByLocalName(s,"spTree");if(!r)return{id:`slide-${c}`,elements:R};let H=Array.from(r.children);for(let g of H){let S=g.localName;if(S==="sp"){let L=this.findFirstByLocalName(g,"txBody"),A=this.findFirstByLocalName(g,"nvSpPr"),N=A?this.findFirstByLocalName(A,"nvPr"):null,f=N?this.findFirstByLocalName(N,"ph"):null,G=f?this.getAttr(f,"type"):null,$=f&&(!G||G==="body"),Q=this.findFirstByLocalName(g,"xfrm"),E=Q?this.findFirstByLocalName(Q,"off"):null,y=Q?this.findFirstByLocalName(Q,"ext"):null;if(L&&E&&y){let ae=this.findAllByLocalName(L,"p"),q="",O=18,ee="#000000",n=1,x=!1,i=!1;for(let h of ae){let k=this.findFirstByLocalName(h,"pPr"),F=k?this.findFirstByLocalName(k,"buNone"):null,D="";k&&!F?this.findFirstByLocalName(k,"buAutoNum")?i=!0:(this.findFirstByLocalName(k,"buChar")||parseInt(this.getAttr(k,"indent")||"0")<0||$)&&(x=!0):!k&&$&&(x=!0);let oe=this.findAllByLocalName(h,"r");for(let he of oe){let te=this.findFirstByLocalName(he,"t");te&&(D+=te.textContent);let _=this.findFirstByLocalName(he,"rPr");if(_){let Y=this.getAttr(_,"sz");Y&&(O=parseInt(Y)/100*2);let le=this.parseColor(_);ee=le.color,n=le.opacity}}let ie=/^\s*([•\u2022\u2023\u25E6\u2043\u2219])\s+/;D.match(ie)&&(x=!0,D=D.replace(ie,"")),q+=D+`
|
|
4
|
+
`}if(q.trim()){R.push({id:`el-${c}-${Date.now()}-${T}`,type:"text",content:q.trim(),x:this.scaleX(parseInt(this.getAttr(E,"x")||"0")),y:this.scaleY(parseInt(this.getAttr(E,"y")||"0")),width:this.scaleX(parseInt(this.getAttr(y,"cx")||"0")),height:this.scaleY(parseInt(this.getAttr(y,"cy")||"0")),fontSize:O,color:ee,fontFamily:"Arial",zIndex:T++,isBulleted:x,isNumbered:i,listType:i?"number-decimal":x?"bullet-disc":"none",opacity:n});continue}}let C=this.findFirstByLocalName(g,"prstGeom");if(C&&E&&y){let ae=this.getAttr(C,"prst")||"rect",q=this.findFirstByLocalName(g,"spPr"),O=q?this.parseColor(q):{color:"#cccccc",opacity:1},ee={rect:"rect",roundRect:"rect",ellipse:"ellipse",circle:"ellipse",triangle:"triangle",rtTriangle:"rightTriangle",diamond:"rhombus",parallelogram:"parallelogram",trapezoid:"trapezoid",pentagon:"pentagon",hexagon:"hexagon",heptagon:"heptagon",octagon:"octagon",heart:"heart",smileyFace:"smiley",sun:"sun",moon:"moon",rightArrow:"arrowRight",leftArrow:"arrowLeft",upArrow:"arrowUp",downArrow:"arrowDown",leftRightArrow:"arrowLeftRight",upDownArrow:"arrowUpDown",star4:"star4",star5:"star5",star6:"star6",star8:"star8",cloud:"cloud",lightningBolt:"lightning",plus:"plus",minus:"minus",multiply:"multiply",divide:"divide",equal:"equal"};R.push({id:`el-${c}-${Date.now()}-${T}`,type:"shape",shapeType:ee[ae]||"rect",fill:O.color,opacity:O.opacity,x:this.scaleX(parseInt(this.getAttr(E,"x")||"0")),y:this.scaleY(parseInt(this.getAttr(E,"y")||"0")),width:this.scaleX(parseInt(this.getAttr(y,"cx")||"0")),height:this.scaleY(parseInt(this.getAttr(y,"cy")||"0")),zIndex:T++})}}if(S==="pic"){let L=this.findFirstByLocalName(g,"blip"),A=(L==null?void 0:L.getAttributeNS("http://schemas.openxmlformats.org/officeDocument/2006/relationships","embed"))||(L==null?void 0:L.getAttribute("r:embed")),N=this.findFirstByLocalName(g,"xfrm"),f=N?this.findFirstByLocalName(N,"off"):null,G=N?this.findFirstByLocalName(N,"ext"):null;if(A&&f&&G){let $=await this.resolveImage(A,c,m);$&&R.push({id:`el-${c}-${Date.now()}-${T}`,type:"image",src:URL.createObjectURL($),x:this.scaleX(parseInt(this.getAttr(f,"x")||"0")),y:this.scaleY(parseInt(this.getAttr(f,"y")||"0")),width:this.scaleX(parseInt(this.getAttr(G,"cx")||"0")),height:this.scaleY(parseInt(this.getAttr(G,"cy")||"0")),zIndex:T++,opacity:1})}}}return{id:`slide-${c}`,elements:R}}};var Ze=require("react"),Ge=require("lucide-react");var ue=require("react/jsx-runtime"),Nt=({presentation:u,initialSlideIndex:a,onClose:c})=>{let[m,v]=(0,Ze.useState)(a),s=u.slides[m],R=()=>{m>0&&v(m-1)},T=()=>{m<u.slides.length-1&&v(m+1)};(0,Ze.useEffect)(()=>{let H=g=>{g.key==="ArrowRight"||g.key===" "||g.key==="PageDown"?T():g.key==="ArrowLeft"||g.key==="Backspace"||g.key==="PageUp"?R():g.key==="Escape"&&c()};return window.addEventListener("keydown",H),()=>window.removeEventListener("keydown",H)},[m]);let[P,r]=(0,Ze.useState)(1);return(0,Ze.useEffect)(()=>{let H=()=>{let S=window.innerWidth-40,L=window.innerHeight-40,A=1200,N=675,f=S/A,G=L/N,$=Math.min(f,G);r($)};return H(),window.addEventListener("resize",H),()=>window.removeEventListener("resize",H)},[]),(0,ue.jsxs)("div",{className:"fixed inset-0 z-[99999] bg-[#0A0A0A] flex flex-col items-center justify-center overflow-hidden",children:[(0,ue.jsxs)("div",{className:"absolute top-0 left-0 right-0 p-6 flex justify-between items-center opacity-0 hover:opacity-100 transition-opacity bg-gradient-to-b from-black/60 to-transparent z-[100] pointer-events-none",children:[(0,ue.jsxs)("div",{className:"text-white/80 font-bold ml-4 pointer-events-auto",children:["Slide ",m+1," of ",u.slides.length]}),(0,ue.jsx)("button",{onClick:c,className:"p-3 bg-white/10 hover:bg-white/20 text-white rounded-full transition-all pointer-events-auto",children:(0,ue.jsx)(Ge.X,{size:24})})]}),(0,ue.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:(0,ue.jsx)("div",{className:"relative shadow-2xl shadow-black/80 bg-white",style:{width:"1200px",height:"675px",transform:`scale(${P})`,transformOrigin:"center center"},children:(0,ue.jsx)(it,{slide:s,onElementUpdate:()=>{},onSelect:()=>{},uiScale:.75,onSlashCommand:()=>{},selectedElementId:null,onAiGenerateClick:()=>{},onAiGenerateInfographicClick:()=>{},onUploadImageClick:()=>{},onDeleteElement:()=>{}})})}),(0,ue.jsxs)("div",{className:"absolute bottom-10 left-1/2 -translate-x-1/2 flex items-center gap-6 opacity-0 hover:opacity-100 transition-opacity bg-black/40 backdrop-blur-md px-6 py-3 rounded-full border border-white/10 pointer-events-auto",children:[(0,ue.jsx)("button",{disabled:m===0,onClick:R,className:"p-2 text-white/50 hover:text-white disabled:opacity-20 transition-colors",children:(0,ue.jsx)(Ge.ChevronLeft,{size:32})}),(0,ue.jsx)("div",{className:"h-6 w-[1px] bg-white/10"}),(0,ue.jsx)("button",{disabled:m===u.slides.length-1,onClick:T,className:"p-2 text-white/50 hover:text-white disabled:opacity-20 transition-colors",children:(0,ue.jsx)(Ge.ChevronRight,{size:32})})]})]})};var kt=require("@google/generative-ai");var xe=require("lucide-react"),K=require("react/jsx-runtime"),oa=({result:u,isLoading:a,onAction:c,onClose:m,position:v})=>(0,K.jsxs)("div",{className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-[2000] w-80 bg-white border border-slate-200 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 overflow-hidden text-left",children:[(0,K.jsxs)("div",{className:"px-3 py-2.5 bg-blue-50/50 border-b border-blue-100 flex items-center justify-between",children:[(0,K.jsxs)("span",{className:"text-xs font-bold text-blue-700 uppercase tracking-wider flex items-center gap-2",children:[(0,K.jsx)(xe.Sparkles,{size:12}),"Refined Text"]}),(0,K.jsx)("button",{onClick:m,className:"text-slate-400 hover:text-slate-600",children:(0,K.jsx)(xe.X,{size:14})})]}),a?(0,K.jsxs)("div",{className:"p-8 flex flex-col items-center justify-center gap-3 text-slate-400",children:[(0,K.jsx)(xe.RefreshCw,{size:24,className:"animate-spin text-blue-500"}),(0,K.jsx)("span",{className:"text-xs font-medium",children:"Refining text..."})]}):(0,K.jsxs)("div",{className:"flex flex-col",children:[(0,K.jsx)("div",{className:"p-4 bg-slate-50/50 max-h-[300px] overflow-y-auto text-sm text-slate-700 leading-relaxed border-b border-slate-100",children:u}),(0,K.jsxs)("div",{className:"p-1.5 flex flex-col gap-0.5",children:[(0,K.jsxs)("button",{onClick:()=>c("replace"),className:"flex items-center gap-2 px-2 py-2 text-sm text-slate-700 hover:bg-slate-50 rounded-lg transition-colors text-left",children:[(0,K.jsx)(xe.Check,{size:14,className:"text-slate-400"}),(0,K.jsx)("span",{children:"Replace selection"})]}),(0,K.jsxs)("button",{onClick:()=>c("addBelow"),className:"flex items-center gap-2 px-2 py-2 text-sm text-slate-700 hover:bg-slate-50 rounded-lg transition-colors text-left",children:[(0,K.jsx)(xe.ArrowRightFromLine,{size:14,className:"text-slate-400 rotate-90"}),(0,K.jsx)("span",{children:"Insert below"})]}),(0,K.jsxs)("button",{onClick:()=>c("regenerate"),className:"flex items-center gap-2 px-2 py-2 text-sm text-blue-600 hover:bg-blue-50 rounded-lg transition-colors text-left",children:[(0,K.jsx)(xe.RefreshCw,{size:14}),(0,K.jsx)("span",{children:"Try again"})]}),(0,K.jsx)("div",{className:"h-[1px] bg-slate-100 my-1"}),(0,K.jsxs)("button",{onClick:()=>c("discard"),className:"flex items-center gap-2 px-2 py-2 text-sm text-red-600 hover:bg-red-50 rounded-lg transition-colors text-left",children:[(0,K.jsx)(xe.Trash2,{size:14}),(0,K.jsx)("span",{children:"Discard"})]})]})]})]});var se=Fe(require("react")),b=require("lucide-react");var t=require("react/jsx-runtime"),Va=["Inter","Arial","Lato","Open Sans","Poppins","Roboto","Georgia","Times New Roman"],Ua=[8,9,10,11,12,14,16,18,20,24,28,32,36,48,64,72,96],ia=({onClose:u,onAction:a,position:c,canUseAi:m,mode:v="default",context:s,aiResult:R,isAiLoading:T,onAiResponseAction:P})=>{let[r,H]=(0,se.useState)(""),[g,S]=(0,se.useState)(0),L=(0,se.useRef)(null),[A,N]=(0,se.useState)(!1),[f,G]=(0,se.useState)(!1),[$,Q]=(0,se.useState)(!1),[E,y]=(0,se.useState)(!1),[C,ae]=(0,se.useState)(!1),q=(0,se.useMemo)(()=>[{id:"generate-image",label:"AI Generate Image",icon:b.Sparkles,category:"AI",description:"Create an image with AI prompt",action:()=>a("generate-image")},{id:"generate-infographic",label:"AI Generate Infographic",icon:b.PieChart,category:"AI",description:"Create an infographic with AI prompt",action:()=>a("generate-infographic")},{id:"text",label:"Text Box",icon:b.Type,category:"Basic",description:"Insert a new text element",action:()=>a("add-text")},{id:"image",label:"Image",icon:b.Image,category:"Basic",description:"Upload and insert an image",action:()=>a("add-image")},{id:"new-slide",label:"New Slide",icon:b.PlusCircle,category:"Canvas",description:"Add a fresh slide to deck",action:()=>a("new-slide")},{id:"rect",label:"Rectangle",icon:b.Square,category:"Shapes",action:()=>a("add-shape","rect")},{id:"circle",label:"Circle",icon:b.Circle,category:"Shapes",action:()=>a("add-shape","circle")},{id:"triangle",label:"Triangle",icon:b.Triangle,category:"Shapes",action:()=>a("add-shape","triangle")},{id:"star5",label:"Star",icon:b.Star,category:"Shapes",action:()=>a("add-shape","star5")},{id:"arrowRight",label:"Arrow",icon:b.ArrowRight,category:"Shapes",action:()=>a("add-shape","arrowRight")}],[a]),O=(0,se.useMemo)(()=>q.filter(x=>x.label.toLowerCase().includes(r.toLowerCase())||x.category.toLowerCase().includes(r.toLowerCase())),[q,r]);if((0,se.useEffect)(()=>{S(0)},[r]),(0,se.useEffect)(()=>{let x=i=>{v==="default"&&(i.key==="ArrowDown"?(i.preventDefault(),S(h=>(h+1)%O.length)):i.key==="ArrowUp"?(i.preventDefault(),S(h=>(h-1+O.length)%O.length)):i.key==="Enter"&&(i.preventDefault(),O[g]&&O[g].action())),i.key==="Escape"&&(i.preventDefault(),u())};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[O,g,u,v]),(0,se.useEffect)(()=>{if(v==="default"&&L.current){let x=L.current.children[g];x&&x.scrollIntoView({block:"nearest"})}},[g,v]),v==="default"&&O.length===0&&r==="")return null;if(v==="textbox"||v==="text-selection"){let x=(s==null?void 0:s.fontFamily)||"Arial",i=(s==null?void 0:s.fontSize)||24,h=(0,se.useRef)(null),[k,F]=(0,se.useState)(null);se.default.useLayoutEffect(()=>{if(h.current){let Z=h.current.getBoundingClientRect(),he=window.innerWidth,te=window.innerHeight,_=c.x,Y=c.y;_+Z.width>he-100&&(_=he-Z.width-100),_=Math.max(10,_),Y+Z.height>te-20&&(Y=te-Z.height-20),F({x:_,y:Y})}},[c.x,c.y]);let D=k||{x:c.x,y:c.y},oe=k?1:0,ie=D.y>window.innerHeight/2;return(0,t.jsxs)("div",{ref:h,className:"fixed z-[9999] bg-white rounded-xl shadow-[0_20px_50px_rgba(0,0,0,0.15)] border border-slate-200 p-2.5 flex flex-col gap-2.5 animate-in fade-in zoom-in-95 duration-200",style:{left:`${D.x}px`,top:`${D.y}px`,width:"auto",minWidth:"440px",maxWidth:"90vw",opacity:oe},onClick:Z=>Z.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 h-9",children:[(0,t.jsxs)("div",{className:"flex items-center bg-slate-50 border border-slate-200 rounded-lg h-full flex-1 shadow-sm",children:[(0,t.jsxs)("div",{className:"relative flex-1",children:[(0,t.jsxs)("button",{onClick:()=>{N(!A),G(!1)},className:"w-full flex items-center justify-between px-3 h-full text-xs font-bold text-slate-800 hover:bg-white transition-colors border-r border-slate-100 rounded-l-lg",children:[(0,t.jsx)("span",{className:"truncate",children:x}),(0,t.jsx)(b.ChevronDown,{size:14,className:"text-slate-400"})]}),A&&(0,t.jsx)("div",{className:"absolute top-full left-0 mt-1 bg-white border border-slate-200 rounded-lg shadow-2xl z-50 py-1 min-w-[180px] max-h-[250px] overflow-y-auto animate-in fade-in slide-in-from-top-2",children:Va.map(Z=>(0,t.jsx)("button",{onClick:()=>{a("format",{fontFamily:Z}),N(!1)},className:I("w-full text-left px-4 py-2 text-xs hover:bg-blue-50 transition-colors",x===Z?"text-blue-600 font-bold bg-blue-100/50":"text-slate-700"),style:{fontFamily:Z},children:Z},Z))})]}),(0,t.jsxs)("div",{className:"relative w-16",children:[(0,t.jsxs)("button",{onClick:()=>{G(!f),N(!1)},className:"w-full flex items-center justify-between px-2 h-full text-xs font-black text-slate-900 hover:bg-white transition-colors rounded-r-lg",children:[(0,t.jsx)("span",{children:i}),(0,t.jsx)(b.ChevronDown,{size:14,className:"text-slate-400"})]}),f&&(0,t.jsx)("div",{className:"absolute top-full right-0 mt-1 bg-white border border-slate-200 rounded-lg shadow-2xl z-50 py-1 min-w-[80px] max-h-[250px] overflow-y-auto animate-in fade-in slide-in-from-top-2",children:Ua.map(Z=>(0,t.jsx)("button",{onClick:()=>{a("format",{fontSize:Z}),G(!1)},className:I("w-full text-center px-4 py-2 text-xs hover:bg-blue-50 transition-colors",i===Z?"text-blue-600 font-bold bg-blue-100/50":"text-slate-700"),children:Z},Z))})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 px-1 bg-slate-50 border border-slate-200 rounded-lg h-full shadow-sm",children:[(0,t.jsxs)("button",{onClick:()=>a("format",{fontSize:i+2}),className:"p-1 hover:bg-white hover:text-blue-600 rounded-md text-slate-500 transition-all active:scale-95 flex items-center justify-center",title:"Increase font size",children:[(0,t.jsx)("span",{className:"text-[13px] font-black leading-none translate-y-[1px]",children:"A"}),(0,t.jsx)(b.ChevronUp,{size:10,strokeWidth:4,className:"ml-0.5"})]}),(0,t.jsxs)("button",{onClick:()=>a("format",{fontSize:Math.max(1,i-2)}),className:"p-1 hover:bg-white hover:text-blue-600 rounded-md text-slate-500 transition-all active:scale-95 flex items-center justify-center",title:"Decrease font size",children:[(0,t.jsx)("span",{className:"text-[11px] font-black leading-none translate-y-[1px]",children:"A"}),(0,t.jsx)(b.ChevronDown,{size:10,strokeWidth:4,className:"ml-0.5"})]})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5 border-t border-slate-100 pt-2.5 flex-nowrap",children:[(0,t.jsx)("button",{onClick:()=>a("format",{isBold:!(s!=null&&s.isBold)}),className:I("p-1.5 rounded-md transition-all",s!=null&&s.isBold?"text-blue-600 bg-blue-50 shadow-sm":"text-slate-200 hover:bg-slate-50 hover:text-slate-500"),title:"Bold",children:(0,t.jsx)(b.Bold,{size:18,strokeWidth:2})}),(0,t.jsx)("button",{onClick:()=>a("format",{isItalic:!(s!=null&&s.isItalic)}),className:I("p-1.5 rounded-md transition-all",s!=null&&s.isItalic?"text-blue-600 bg-blue-50 shadow-sm":"text-slate-200 hover:bg-slate-50 hover:text-slate-500"),title:"Italic",children:(0,t.jsx)(b.Italic,{size:18,strokeWidth:2})}),(0,t.jsx)("button",{onClick:()=>a("format",{isUnderline:!(s!=null&&s.isUnderline)}),className:I("p-1.5 rounded-md transition-all",s!=null&&s.isUnderline?"text-blue-600 bg-blue-50 shadow-sm":"text-slate-200 hover:bg-slate-50 hover:text-slate-500"),title:"Underline",children:(0,t.jsx)(b.Underline,{size:18,strokeWidth:2})}),(0,t.jsx)("div",{className:"w-[1px] h-4 bg-slate-100 mx-1.5"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("button",{onClick:()=>ae(!C),className:I("flex items-center gap-1.5 px-2 py-1 rounded-md transition-all text-sm font-bold whitespace-nowrap",C?"bg-purple-50 text-purple-600 ring-1 ring-purple-100":"text-slate-500 hover:bg-purple-50 hover:text-purple-600"),children:[(0,t.jsx)(b.Sparkles,{size:14,className:C?"fill-purple-300":""}),(0,t.jsx)("span",{children:"Ask AI"}),(0,t.jsx)(b.ChevronDown,{size:12,className:"opacity-50"})]}),C&&(0,t.jsxs)("div",{className:I("absolute left-0 w-80 bg-white border border-slate-200 rounded-xl shadow-2xl z-[1000] animate-in fade-in zoom-in-95 duration-200 overflow-hidden text-left flex flex-col max-h-[300px]",ie?"bottom-full mb-2 origin-bottom-left":"top-full mt-2 origin-top-left"),children:[(0,t.jsx)("div",{className:"px-3 py-2.5 bg-purple-50/50 border-b border-purple-100 flex items-center justify-between",children:(0,t.jsxs)("span",{className:"text-xs font-bold text-purple-700 uppercase tracking-wider flex items-center gap-2",children:[(0,t.jsx)(b.Sparkles,{size:12}),"Ask AI"]})}),T?(0,t.jsxs)("div",{className:"p-8 flex flex-col items-center justify-center gap-3 text-slate-400",children:[(0,t.jsx)(b.RefreshCw,{size:24,className:"animate-spin text-purple-500"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:"AI is thinking..."})]}):R?(0,t.jsxs)("div",{className:"flex flex-col overflow-y-auto max-h-[200px]",children:[(0,t.jsx)("div",{className:"p-4 bg-slate-50/50 text-sm text-slate-700 leading-relaxed border-b border-slate-100",children:R}),(0,t.jsxs)("div",{className:"p-1.5 flex flex-col gap-0.5",children:[(0,t.jsxs)("button",{onClick:()=>{P==null||P("replace"),ae(!1)},className:"flex items-center gap-2 px-1 py-1 text-sm text-slate-700 hover:bg-slate-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(b.Check,{size:14,className:"text-slate-400"}),(0,t.jsx)("span",{children:"Replace selection"})]}),(0,t.jsxs)("button",{onClick:()=>{P==null||P("addBelow"),ae(!1)},className:"flex items-center gap-2 px-2 py-2 text-sm text-slate-700 hover:bg-slate-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(b.ArrowRightFromLine,{size:14,className:"text-slate-400 rotate-90"}),(0,t.jsx)("span",{children:"Insert below"})]}),(0,t.jsxs)("button",{onClick:()=>{P==null||P("regenerate"),ae(!1)},className:"flex items-center gap-2 px-2 py-2 text-sm text-blue-600 hover:bg-blue-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(b.RefreshCw,{size:14}),(0,t.jsx)("span",{children:"Try again"})]}),(0,t.jsx)("div",{className:"h-[1px] bg-slate-100 my-1"}),(0,t.jsxs)("button",{onClick:()=>{P==null||P("discard"),ae(!1)},className:"flex items-center gap-2 px-2 py-2 text-sm text-red-600 hover:bg-red-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(b.Trash2,{size:14}),(0,t.jsx)("span",{children:"Discard"})]})]})]}):(0,t.jsxs)("div",{className:"p-1.5 flex flex-col gap-0.5 overflow-y-auto max-h-[200px]",children:[(0,t.jsx)("div",{className:"px-2 py-1 text-[10px] font-bold text-slate-400 uppercase tracking-widest mt-1",children:"Edit Selection"}),(0,t.jsxs)("button",{onClick:()=>{a("ai-text-edit","rewrite")},className:"flex items-center gap-2 px-2 py-2 text-sm text-slate-700 hover:bg-slate-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(b.RefreshCw,{size:14,className:"text-blue-500"}),(0,t.jsx)("span",{children:"Improve writing"})]}),(0,t.jsxs)("button",{onClick:()=>{a("ai-text-edit","grammar")},className:"flex items-center gap-2 px-2 py-2 text-sm text-slate-700 hover:bg-slate-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(b.SpellCheck,{size:14,className:"text-green-500"}),(0,t.jsx)("span",{children:"Fix grammar"})]}),(0,t.jsxs)("button",{onClick:()=>{a("ai-text-edit","shorten")},className:"flex items-center gap-2 px-2 py-2 text-sm text-slate-700 hover:bg-slate-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(b.ALargeSmall,{size:14,className:"text-orange-500"}),(0,t.jsx)("span",{children:"Make shorter"})]}),(0,t.jsxs)("button",{onClick:()=>{a("ai-text-edit","lengthen")},className:"flex items-center gap-2 px-2 py-2 text-sm text-slate-700 hover:bg-slate-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(b.ArrowRightFromLine,{size:14,className:"text-purple-500"}),(0,t.jsx)("span",{children:"Make longer"})]}),(0,t.jsx)("div",{className:"h-[1px] bg-slate-100 my-1"}),(0,t.jsx)("div",{className:"px-2 py-1 text-[10px] font-bold text-slate-400 uppercase tracking-widest",children:"Generate"}),(0,t.jsxs)("button",{onClick:()=>{a("generate-image"),ae(!1)},className:"flex items-center gap-2 px-2 py-2 text-sm text-slate-700 hover:bg-slate-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(b.Image,{size:14,className:"text-pink-500"}),(0,t.jsx)("span",{children:"Generate Image"})]}),(0,t.jsxs)("button",{onClick:()=>{a("generate-infographic"),ae(!1)},className:"flex items-center gap-2 px-2 py-2 text-sm text-slate-700 hover:bg-slate-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(b.PieChart,{size:14,className:"text-indigo-500"}),(0,t.jsx)("span",{children:"Generate Infographic"})]}),(0,t.jsx)("div",{className:"h-[1px] bg-slate-100 my-1"}),(0,t.jsx)("div",{className:"px-2 py-1 text-[10px] font-bold text-slate-400 uppercase tracking-widest",children:"More"}),(0,t.jsxs)("button",{onClick:()=>{a("ai-text-edit","continue")},className:"flex items-center gap-2 px-2 py-2 text-sm text-slate-700 hover:bg-slate-50 rounded-lg transition-colors text-left",children:[(0,t.jsx)(b.MoveDown,{size:14,className:"text-teal-500"}),(0,t.jsx)("span",{children:"Continue writing"})]})]})]})]}),(0,t.jsx)("div",{className:"w-[1px] h-4 bg-slate-100 mx-1.5"}),(0,t.jsxs)("div",{className:"relative flex items-center rounded-md transition-all",children:[(0,t.jsx)("button",{onClick:()=>a("format",{isBulleted:!(s!=null&&s.isBulleted),isNumbered:!1,listType:s!=null&&s.isBulleted?"none":"bullet-disc"}),className:I("p-1.5 rounded-l-md transition-all",s!=null&&s.isBulleted?"text-blue-600 bg-blue-50":"text-slate-500 hover:bg-slate-50"),title:"Bullets",children:(0,t.jsx)(b.List,{size:18,strokeWidth:2.5})}),(0,t.jsx)("button",{onClick:()=>Q(!$),className:I("p-0.5 rounded-r-md border-l border-transparent hover:border-slate-200 transition-all",$?"bg-slate-100":"hover:bg-slate-50"),children:(0,t.jsx)(b.ChevronDown,{size:10,className:"text-slate-400"})}),$&&(0,t.jsxs)("div",{className:"absolute top-full left-0 mt-1 bg-white border border-slate-200 rounded-lg shadow-xl p-2 z-[100] animate-in fade-in zoom-in-95 duration-150 w-64 grid grid-cols-4 gap-2",children:[(0,t.jsx)("button",{onClick:()=>{a("format",{isBulleted:!1,listType:"none"}),Q(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1",children:(0,t.jsx)("span",{className:"text-[10px] text-slate-500",children:"None"})}),(0,t.jsx)("button",{onClick:()=>{a("format",{isBulleted:!0,isNumbered:!1,listType:"bullet-disc"}),Q(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,t.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("div",{className:"w-1 h-1 rounded-full bg-black"}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("div",{className:"w-1 h-1 rounded-full bg-black"}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,t.jsx)("button",{onClick:()=>{a("format",{isBulleted:!0,isNumbered:!1,listType:"bullet-circle"}),Q(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,t.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("div",{className:"w-1 h-1 rounded-full border border-black bg-transparent"}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("div",{className:"w-1 h-1 rounded-full border border-black bg-transparent"}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,t.jsx)("button",{onClick:()=>{a("format",{isBulleted:!0,isNumbered:!1,listType:"bullet-square"}),Q(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,t.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("div",{className:"w-1 h-1 bg-black"}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("div",{className:"w-1 h-1 bg-black"}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,t.jsx)("button",{onClick:()=>{a("format",{isBulleted:!0,isNumbered:!1,listType:"bullet-check"}),Q(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,t.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-[6px]",children:"\u2713"}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-[6px]",children:"\u2713"}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})})]})]}),(0,t.jsxs)("div",{className:"relative text-black flex items-center rounded-md transition-all",children:[(0,t.jsx)("button",{onClick:()=>a("format",{isNumbered:!(s!=null&&s.isNumbered),isBulleted:!1,listType:s!=null&&s.isNumbered?"none":"number-decimal"}),className:I("p-1.5 rounded-l-md transition-all",s!=null&&s.isNumbered?"text-blue-600 bg-blue-50":"text-slate-500 hover:bg-slate-50"),title:"Numbering",children:(0,t.jsx)(b.ListOrdered,{size:18,strokeWidth:2.5})}),(0,t.jsx)("button",{onClick:()=>y(!E),className:I("p-0.5 rounded-r-md border-l border-transparent hover:border-slate-200 transition-all",E?"bg-slate-100":"hover:bg-slate-50"),children:(0,t.jsx)(b.ChevronDown,{size:10,className:"text-slate-400"})}),E&&(0,t.jsxs)("div",{className:"absolute text-black top-full left-0 mt-1 bg-white border border-slate-200 rounded-lg shadow-xl p-2 z-[100] animate-in fade-in zoom-in-95 duration-150 w-64 grid grid-cols-4 gap-2",children:[(0,t.jsx)("button",{onClick:()=>{a("format",{isNumbered:!1,listType:"none"}),y(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1",children:(0,t.jsx)("span",{className:"text-[10px] text-slate-500",children:"None"})}),(0,t.jsx)("button",{onClick:()=>{a("format",{isNumbered:!0,isBulleted:!1,listType:"number-decimal"}),y(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,t.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-[6px]",children:"1."}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-[6px]",children:"2."}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,t.jsx)("button",{onClick:()=>{a("format",{isNumbered:!0,isBulleted:!1,listType:"number-decimal-paren"}),y(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,t.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-[6px]",children:"1)"}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-[6px]",children:"2)"}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})}),(0,t.jsx)("button",{onClick:()=>{a("format",{isNumbered:!0,isBulleted:!1,listType:"number-roman-lower"}),y(!1)},className:"col-span-1 aspect-square flex flex-col items-center justify-center hover:bg-slate-50 border border-slate-200 rounded p-1 gap-1",children:(0,t.jsxs)("div",{className:"flex flex-col gap-1 items-start w-full px-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-[6px]",children:"i."}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-[6px]",children:"ii."}),(0,t.jsx)("div",{className:"w-6 h-[1px] bg-slate-300"})]})]})})]})]}),(0,t.jsx)("div",{className:"w-[1px] h-4 bg-slate-100 mx-1.5"}),(0,t.jsxs)("div",{className:"relative flex items-center",children:[(0,t.jsxs)("button",{className:"w-7 h-[22px] flex flex-col items-center justify-center rounded-[3px] hover:bg-slate-100 transition-all relative",title:"Font Color",children:[(0,t.jsx)("span",{className:"text-[13px] font-black text-slate-800 leading-none",children:"A"}),(0,t.jsx)("div",{className:"w-4 h-[2.5px] rounded-sm mt-0.5",style:{backgroundColor:(s==null?void 0:s.color)||"#000000"}}),(0,t.jsx)("input",{type:"color",className:"absolute inset-0 opacity-0 cursor-pointer w-full h-full",value:(s==null?void 0:s.color)||"#000000",onChange:Z=>a("format",{color:Z.target.value})})]}),(0,t.jsx)(b.ChevronDown,{size:8,className:"text-slate-400 -ml-0.5"})]}),(0,t.jsxs)("div",{className:"relative flex items-center",children:[(0,t.jsxs)("button",{className:"w-7 h-[22px] flex flex-col items-center justify-center rounded-[3px] hover:bg-slate-100 transition-all relative",title:"Highlight Color",children:[(0,t.jsx)(b.Highlighter,{size:14,strokeWidth:2.5,className:s!=null&&s.highlightColor?"text-slate-900":"text-slate-500"}),(0,t.jsx)("div",{className:"w-4 h-[2.5px] rounded-sm mt-0.5",style:{backgroundColor:(s==null?void 0:s.highlightColor)||"transparent"}}),(0,t.jsx)("input",{type:"color",className:"absolute inset-0 opacity-0 cursor-pointer w-full h-full",value:(s==null?void 0:s.highlightColor)||"#ffff00",onChange:Z=>a("format",{highlightColor:Z.target.value})})]}),(0,t.jsx)(b.ChevronDown,{size:8,className:"text-slate-400 -ml-0.5"})]}),(0,t.jsx)("button",{onClick:()=>a("format",{isBold:!1,isItalic:!1,isUnderline:!1,highlightColor:"",color:"#000000"}),className:"p-1.5 rounded-md text-slate-400 hover:bg-slate-50 hover:text-slate-600 transition-all",title:"Clear Formatting",children:(0,t.jsx)(b.Eraser,{size:18,strokeWidth:2.5})}),(0,t.jsxs)("div",{className:"gap-0.5 ml-auto",children:[(0,t.jsx)("button",{onClick:()=>a("format",{textAlign:"left"}),className:I("p-1 rounded-[3px] transition-all",(s==null?void 0:s.textAlign)==="left"?"bg-blue-100 text-blue-600":"hover:bg-slate-100 text-slate-500"),children:(0,t.jsx)(b.AlignLeft,{size:12,strokeWidth:2.5})}),(0,t.jsx)("button",{onClick:()=>a("format",{textAlign:"center"}),className:I("p-1 rounded-[3px] transition-all",(s==null?void 0:s.textAlign)==="center"?"bg-blue-100 text-blue-600":"hover:bg-slate-100 text-slate-500"),children:(0,t.jsx)(b.AlignCenter,{size:12,strokeWidth:2.5})}),(0,t.jsx)("button",{onClick:()=>a("format",{textAlign:"right"}),className:I("p-1 rounded-[3px] transition-all",(s==null?void 0:s.textAlign)==="right"?"bg-blue-100 text-blue-600":"hover:bg-slate-100 text-slate-500"),children:(0,t.jsx)(b.AlignRight,{size:12,strokeWidth:2.5})}),(0,t.jsx)("button",{onClick:()=>a("format",{textAlign:"justify"}),className:I("p-1 rounded-[3px] transition-all",(s==null?void 0:s.textAlign)==="justify"?"bg-blue-100 text-blue-600":"hover:bg-slate-100 text-slate-500"),children:(0,t.jsx)(b.AlignJustify,{size:12,strokeWidth:2.5})})]})]})]})}let ee=Math.max(10,Math.min(c.x,window.innerWidth-300)),n=Math.max(10,Math.min(c.y,window.innerHeight-450));return(0,t.jsxs)("div",{className:"fixed z-[9999] w-72 bg-white rounded-xl shadow-2xl border border-slate-200 overflow-hidden flex flex-col animate-in fade-in zoom-in duration-200",style:{left:`${ee}px`,top:`${n}px`,maxHeight:"400px"},onClick:x=>x.stopPropagation(),children:[(0,t.jsxs)("div",{className:"p-3 border-b border-slate-100 flex items-center gap-2 bg-slate-50/50",children:[(0,t.jsx)(b.Search,{size:14,className:"text-slate-400"}),(0,t.jsx)("input",{autoFocus:!0,type:"text",placeholder:"Type a command...",className:"bg-transparent border-none outline-none text-sm w-full font-medium text-slate-700 placeholder:text-slate-400",value:r,onChange:x=>H(x.target.value)})]}),(0,t.jsx)("div",{ref:L,className:"overflow-y-auto py-2 px-1 custom-scrollbar",children:O.length>0?O.map((x,i)=>{let h=i===g,k=i===0||O[i-1].category!==x.category;return(0,t.jsxs)(se.default.Fragment,{children:[k&&(0,t.jsx)("div",{className:"px-3 py-1.5 text-[10px] uppercase tracking-wider font-bold text-slate-400",children:x.category}),(0,t.jsxs)("button",{className:I("w-full flex items-center gap-3 px-3 py-2 text-left transition-all duration-150 rounded-lg group",h?"bg-slate-100":"hover:bg-slate-50"),onClick:()=>x.action(),onMouseEnter:()=>S(i),children:[(0,t.jsx)("div",{className:I("p-1.5 rounded-md transition-colors flex items-center justify-center relative",h?"bg-white shadow-sm text-blue-600":"bg-slate-100 text-slate-500 group-hover:text-slate-700"),children:(0,t.jsx)(x.icon,{size:16})}),(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,t.jsx)("span",{className:I("text-sm font-semibold truncate",h?"text-slate-900":"text-slate-700"),children:x.label}),x.description&&(0,t.jsx)("span",{className:"text-[11px] text-slate-400 truncate leading-tight",children:x.description})]}),h&&(0,t.jsx)("div",{className:"ml-auto text-[10px] font-mono font-bold text-slate-400 flex items-center gap-1 border border-slate-200 rounded px-1 bg-white",children:(0,t.jsx)("span",{children:"\u21B5"})})]})]},x.id)}):(0,t.jsxs)("div",{className:"px-3 py-8 text-center flex flex-col items-center gap-2",children:[(0,t.jsx)("div",{className:"p-3 bg-slate-50 rounded-full",children:(0,t.jsx)(b.Search,{size:20,className:"text-slate-300"})}),(0,t.jsxs)("span",{className:"text-sm text-slate-400 font-medium whitespace-nowrap",children:['No commands found for "',r,'"']})]})}),(0,t.jsxs)("div",{className:"px-3 py-2 border-t border-slate-100 bg-slate-50/50 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1 text-[10px] font-medium text-slate-400",children:[(0,t.jsx)("span",{className:"border border-slate-200 rounded px-1 bg-white",children:"\u2191\u2193"}),(0,t.jsx)("span",{children:"to navigate"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 text-[10px] font-medium text-slate-400",children:[(0,t.jsx)("span",{className:"border border-slate-200 rounded px-1 bg-white",children:"Esc"}),(0,t.jsx)("span",{children:"to close"})]})]})]})};var X=require("lucide-react");var la=require("react"),Pe=require("lucide-react");var Ie=require("react/jsx-runtime"),na=({message:u,type:a="info",isOpen:c,onClose:m,autoHideDuration:v=4e3})=>{if((0,la.useEffect)(()=>{if(c&&v>0){let T=setTimeout(()=>{m()},v);return()=>clearTimeout(T)}},[c,v,m]),!c)return null;let s={error:(0,Ie.jsx)(Pe.AlertCircle,{size:20,className:"text-white"}),success:(0,Ie.jsx)(Pe.CheckCircle,{size:20,className:"text-white"}),info:(0,Ie.jsx)(Pe.Info,{size:20,className:"text-white"})};return(0,Ie.jsxs)("div",{className:I("fixed bottom-6 right-6 z-[10000] flex items-center gap-3 px-4 py-2 rounded-md shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300 min-w-[280px] max-w-[400px]",{error:"bg-red-500",success:"bg-emerald-500",info:"bg-slate-800"}[a]),children:[s[a],(0,Ie.jsx)("span",{className:"text-white text-sm font-medium flex-1",children:u}),(0,Ie.jsx)("button",{onClick:m,className:"p-1 hover:bg-white/20 rounded-full transition-colors ml-1",children:(0,Ie.jsx)(Pe.X,{size:14,className:"text-white"})})]})};var l=require("react/jsx-runtime"),Fa=({initialPresentation:u,url:a,appName:c="My Studio",onChange:m,geminiApiKey:v="AIzaSyAcBfseKzoFZJMfuRzhRJjygQ-u2UKFxOw",width:s,height:R,appBgColor:T="#B7472A",showHomeOnEmpty:P=!1,initialSource:r,onSourceChange:H,proxyUrl:g,onGenerateImage:S,onGenerateInfographic:L,onAiRewrite:A,onAiGrammar:N,onAiShorten:f,onAiLengthen:G,onAiContinue:$,isTwoStepInfographicGeneration:Q,onRefineInfographicPrompt:E})=>{var Ot,Wt;let[y,C]=(0,B.useState)(u||{slides:[{id:"slide-1",elements:[]}],layout:{width:12192e3,height:6858e3}}),[ae,q]=(0,B.useState)([]),[O,ee]=(0,B.useState)([]),[n,x]=(0,B.useState)(0),[i,h]=(0,B.useState)(null),[k,F]=(0,B.useState)(!1),[D,oe]=(0,B.useState)(null),[ie,Z]=(0,B.useState)(null),[he,te]=(0,B.useState)(!1),[_,Y]=(0,B.useState)(r||(a?"url":null)),[le,Ne]=(0,B.useState)(P&&!u&&!a&&!r),[be,Te]=(0,B.useState)(""),[W,He]=(0,B.useState)({visible:!1,position:{x:0,y:0},mode:"default"}),[Lt,je]=(0,B.useState)(!1),[U,de]=(0,B.useState)(""),[ve,ke]=(0,B.useState)(!1),[Ce,Qe]=(0,B.useState)(null),[lt,St]=(0,B.useState)(!1),[Ee,De]=(0,B.useState)(!1),[da,et]=(0,B.useState)(!1),[nt,zt]=(0,B.useState)(""),[It,Mt]=(0,B.useState)(!1),[Le,ct]=(0,B.useState)(null),[dt,At]=(0,B.useState)(!1),[pa,Bt]=(0,B.useState)(!1),[pt,Oe]=(0,B.useState)(null),[gt,Pt]=(0,B.useState)({open:!1,message:"",type:"info"}),Me=(o,d="info")=>{Pt({open:!0,message:o,type:d})};(0,B.useEffect)(()=>{Ce&&(St(!1),De(!0))},[Ce]),(0,B.useEffect)(()=>{Le&&(At(!1),De(!0))},[Le]),(0,B.useEffect)(()=>{a&&rt(a)},[a]);let[ut,Re]=(0,B.useState)(!1),[Se,We]=(0,B.useState)(null);(0,B.useEffect)(()=>{oe(null),Z(null),We(null),Re(!1)},[i]);let tt=(0,B.useMemo)(()=>{let o=typeof s=="number"?s:parseInt(String(s));return isNaN(o)?1:Math.min(Math.max(o/1600,.7),1)},[s]),we=y.slides[n],Ve=(0,B.useMemo)(()=>we.elements.find(o=>o.id===i)||null,[we,i]),qe=(0,B.useCallback)(o=>{q(d=>[...d.slice(-19),y]),ee([]),C(o),m==null||m(o)},[m,y]),Tt=()=>{if(ae.length===0)return;let o=ae[ae.length-1];ee(d=>[...d,y]),q(d=>d.slice(0,-1)),C(o)},mt=()=>{if(O.length===0)return;let o=O[O.length-1];q(d=>[...d,y]),ee(d=>d.slice(0,-1)),C(o)},ze=(0,B.useCallback)(o=>{C(d=>{let p=[...d.slides];p[n]=z(z({},p[n]),o);let M=j(z({},d),{slides:p});return q(re=>[...re.slice(-19),d]),ee([]),m==null||m(M),M})},[n,m]),Ue=(0,B.useCallback)((o,d)=>{C(p=>{let M=p.slides[n],re=M.elements.map(ce=>ce.id===o?z(z({},ce),d):ce),me=[...p.slides];me[n]=j(z({},M),{elements:re});let ye=j(z({},p),{slides:me});return m==null||m(ye),ye})},[n,m]),Ht=o=>{if(!i)return;if(we.elements.find(p=>p.id===i)){Ue(i,o);let p=y.slides[n],M=p.elements.map(me=>me.id===i?z(z({},me),o):me),re=[...y.slides];re[n]=j(z({},p),{elements:M}),qe(j(z({},y),{slides:re}))}},Xe=(0,B.useCallback)(()=>{if(!i)return;let d=y.slides[n].elements.filter(p=>p.id!==i);ze({elements:d}),h(null)},[i,n,y,ze]),jt=()=>{let o={id:`text-${Date.now()}`,type:"text",content:"New Text",x:100,y:100,width:400,height:100,fontSize:48,fontFamily:"Arial",color:"#000000",zIndex:we.elements.length};ze({elements:[...we.elements,o]})},_e=(0,B.useCallback)(async o=>{let d="";typeof o=="string"?d=o:d=await new Promise(re=>{let me=new FileReader;me.onload=ye=>{var ce;return re((ce=ye.target)==null?void 0:ce.result)},me.readAsDataURL(o)});let p=`img-${Date.now()}`,M={id:p,type:"image",src:d,x:100,y:100,width:400,height:250,zIndex:we.elements.length};ze({elements:[...we.elements,M]}),h(p)},[we.elements,ze,h]),Rt=o=>{let d={id:`shape-${Date.now()}`,type:"shape",shapeType:o,fill:"#3b82f6",x:200,y:200,width:200,height:200,zIndex:we.elements.length};ze({elements:[...we.elements,d]})},Dt=()=>{let o={id:`slide-${Date.now()}`,elements:[]};qe(j(z({},y),{slides:[...y.slides,o]})),x(y.slides.length)},ga=o=>{if(y.slides.length<=1)return;let d=y.slides.filter((p,M)=>M!==o);qe(j(z({},y),{slides:d})),o<=n&&x(Math.max(0,n-1))},ua=o=>{let d=y.slides[o],p=j(z({},d),{id:`slide-${Date.now()}`,elements:d.elements.map(re=>j(z({},re),{id:`${re.type}-${Date.now()}-${Math.random().toString(36).substr(2,9)}`}))}),M=[...y.slides];M.splice(o+1,0,p),qe(j(z({},y),{slides:M})),x(o+1)},ma=(o,d)=>{if(o===d)return;let p=[...y.slides],[M]=p.splice(o,1);p.splice(d,0,M),qe(j(z({},y),{slides:p})),n===o?x(d):n>o&&n<=d?x(n-1):n<o&&n>=d&&x(n+1)},ba=o=>{let d=[],p=Date.now();o==="title"?d=[{id:`text-title-${p}`,type:"text",content:"Presentation Title",x:100,y:200,width:1e3,height:150,fontSize:80,fontFamily:"Inter",color:"#000000",textAlign:"center",isBold:!0,zIndex:0},{id:`text-sub-${p}`,type:"text",content:"Subtitle goes here",x:200,y:380,width:800,height:80,fontSize:36,fontFamily:"Inter",color:"#64748b",textAlign:"center",zIndex:1}]:o==="content"?d=[{id:`text-title-${p}`,type:"text",content:"Slide Title",x:60,y:40,width:800,height:80,fontSize:48,fontFamily:"Inter",color:"#000000",isBold:!0,zIndex:0},{id:`text-body-${p}`,type:"text",content:`\u2022 Add your points here
|
|
5
5
|
\u2022 Press Enter for new line
|
|
6
|
-
\u2022 Use the toolbar to format`,x:60,y:150,width:1080,height:480,fontSize:28,fontFamily:"Inter",color:"#334155",zIndex:1,isBulleted:!0}]:
|
|
6
|
+
\u2022 Use the toolbar to format`,x:60,y:150,width:1080,height:480,fontSize:28,fontFamily:"Inter",color:"#334155",zIndex:1,isBulleted:!0}]:o==="split"&&(d=[{id:`text-title-${p}`,type:"text",content:"Comparison Layout",x:60,y:40,width:1080,height:80,fontSize:48,fontFamily:"Inter",color:"#000000",isBold:!0,textAlign:"center",zIndex:0},{id:`text-left-${p}`,type:"text",content:"Left column content goes here.",x:60,y:180,width:520,height:400,fontSize:24,fontFamily:"Inter",color:"#334155",zIndex:1},{id:`text-right-${p}`,type:"text",content:"Right column content goes here.",x:620,y:180,width:520,height:400,fontSize:24,fontFamily:"Inter",color:"#334155",zIndex:2}]),ze({elements:d})},at=async(o,d)=>{let M=y.slides[n].elements.find(re=>re.id===o);if(!(!M||M.type!=="text")){Re(!0),Z(null),We({id:o,action:d});try{if(!v){Me("Gemini API key is missing. Please provide it via the 'geminiApiKey' prop.","error"),Re(!1);return}let me=new kt.GoogleGenerativeAI(v).getGenerativeModel({model:"gemini-flash-latest",systemInstruction:`You are a professional presentation assistant. Your task is to transform slide text according to specific user requests (shorten, reframe, or lengthen).
|
|
7
7
|
|
|
8
8
|
CRITICAL RULES:
|
|
9
9
|
1. Return ONLY the transformed text.
|
|
@@ -11,11 +11,11 @@ CRITICAL RULES:
|
|
|
11
11
|
3. Do NOT use markdown formatting (like bolding or headers) unless specifically needed for bullet points.
|
|
12
12
|
4. If the input text is a title/headline, the output should be a professional title/headline.
|
|
13
13
|
5. If the input text is a bulleted list, the output MUST be a bulleted list using the same bullet style (e.g., '\u2022').
|
|
14
|
-
6. Maintain the professional tone of the original presentation.`}),ye=
|
|
14
|
+
6. Maintain the professional tone of the original presentation.`}),ye=M.fontSize>32?"Title/Headline":"Body Text/List",ce=`Action: ${d.toUpperCase()}
|
|
15
15
|
Text Role: ${ye}
|
|
16
|
-
Original Text: "${
|
|
16
|
+
Original Text: "${M.content}"
|
|
17
17
|
|
|
18
|
-
Transformed Text:`,
|
|
18
|
+
Transformed Text:`,wa=await(await me.generateContent(ce)).response;Z(wa.text().trim())}catch(re){console.error("Gemini AI Error:",re),Me("Error generating response. Please check your API key or connection.","error")}finally{Re(!1)}}},Vt=async o=>{let p=y.slides[n].elements.find(M=>M.id===i);if(!(!p||p.type!=="text")){Re(!0),oe(null),We({id:i,action:o});try{let M="";if(o==="rewrite"&&A?M=await A(p.content):o==="grammar"&&N?M=await N(p.content):o==="shorten"&&f?M=await f(p.content):o==="lengthen"&&G?M=await G(p.content):o==="continue"&&$&&(M=await $(p.content)),!M){if(!v){Me("Gemini API key is missing and no custom AI route provided.","error"),Re(!1);return}let me=new kt.GoogleGenerativeAI(v).getGenerativeModel({model:"gemini-flash-latest"}),ye="You are a professional editor. Return ONLY the edited text. No explanations.",ce=`original text: "${p.content}"`;switch(o){case"rewrite":ce=`Improve the writing of: "${p.content}"`;break;case"grammar":ce=`Fix grammar in: "${p.content}"`;break;case"shorten":ce=`Make this shorter: "${p.content}"`;break;case"lengthen":ce=`Make this longer: "${p.content}"`;break;case"continue":ce=`Continue writing from: "${p.content}"`;break}M=(await me.generateContent(`${ye}
|
|
19
19
|
|
|
20
|
-
${ce}`)).response.text().trim()}se(A)}catch(A){console.error("AI Text Edit Error:",A),ze("AI editing failed. Please check configuration.","error")}finally{Te(!1)}}},Ht=i=>{if(!D||!Ue)return;if(i==="regenerate"){pt(Ue.id,Ue.action);return}let d=N.slides[n],p=d.elements.find(A=>A.id===Ue.id);if(!(!p||p.type!=="text")){if(i==="replace")Ze(Ue.id,{content:D});else if(i==="addBelow"){let A=R(z({},p),{id:`text-ai-${Date.now()}`,content:D,y:p.y+p.height+20,zIndex:d.elements.length});Ie({elements:[...d.elements,A]})}se(null),ct(null),Ne(A=>R(z({},A),{visible:!1}))}},pa=async()=>{await new qe().export(N)},Ra=()=>{$(!0);let i=document.documentElement;i.requestFullscreen&&i.requestFullscreen()},jt=()=>{$(!1),document.fullscreenElement&&document.exitFullscreen()};(0,B.useEffect)(()=>{let i=()=>{document.fullscreenElement||$(!1)};return document.addEventListener("fullscreenchange",i),()=>document.removeEventListener("fullscreenchange",i)},[]),(0,B.useEffect)(()=>{let i=d=>{if(d.key==="Delete"||d.key==="Backspace"){let p=document.activeElement;if((p==null?void 0:p.tagName)==="INPUT"||(p==null?void 0:p.tagName)==="TEXTAREA"||p!=null&&p.isContentEditable)return;Ge()}d.key==="Escape"&&(x(null),Ne(p=>R(z({},p),{visible:!1}))),(d.ctrlKey||d.metaKey)&&(d.key==="z"&&(d.preventDefault(),d.shiftKey?dt():Mt()),d.key==="y"&&(d.preventDefault(),dt()))};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[Ge,Mt,dt]);let gt=(i,d)=>{ae(i),T==null||T(i,d)},Rt=()=>{k({slides:[{id:`slide-${Date.now()}`,elements:[]}],layout:{width:12192e3,height:6858e3}}),f(0),x(null),gt("scratch")},Je=async i=>{G(!0);try{let d=new Xe,p=i;if(typeof i=="string"){let ee=i.trim();p=g?`${g}${g.includes("?")?"&":"?"}url=${encodeURIComponent(ee)}`:ee,gt("url",ee)}else gt("uploaded");let A=await d.parse(p);k(A),_([]),Q([]),f(0),x(null)}catch(d){console.error("Failed to load PPTX",d),ze("Failed to load presentation. Please ensure it is a valid .pptx.","error")}finally{G(!1)}},ga=(i,d)=>{switch(i!=="ai-text-edit"&&Ne(p=>R(z({},p),{visible:!1})),i){case"add-text":Bt();break;case"add-image":bt();break;case"add-shape":Pt(d);break;case"new-slide":Tt();break;case"ai-action":pt(o||"",d);break;case"ai-text-edit":da(d);break;case"generate-image":fe(!0);break;case"generate-infographic":ht();break;case"format":At(d);break;case"delete":Ge();break}},ua=async()=>{if(O.trim()){rt(!0);try{let i="";if(S)i=await S(O);else throw v?new Error("Internal image generation requires onGenerateImage prop or specific endpoint configuration."):new Error("No image generation function or Gemini API key provided.");ie(i),fe(!1),tt("")}catch(i){console.error("Image generation failed:",i),ze("Image generation failed: "+(i instanceof Error?i.message:"Unknown error"),"error")}finally{rt(!1)}}},ut=i=>{if(i==="insert"&&H)Oe(H);else if(i==="replace"&&H&&o){let d=N.slides[n].elements.find(p=>p.id===o);d&&d.type==="image"?Ze(o,{src:H}):Oe(H)}ie(null)},Dt=async i=>{let d=i||st;if(d.trim()){Ct(!0);try{let p="";if(V)p=await V(d);else throw v?new Error("Internal infographic generation requires onGenerateInfographic prop or specific endpoint configuration."):new Error("No infographic generation function or Gemini API key provided.");ot(p),Ye(!1),Nt("")}catch(p){console.error("Infographic generation failed:",p),ze("Infographic generation failed: "+(p instanceof Error?p.message:"Unknown error"),"error")}finally{Ct(!1)}}},mt=i=>{if(i==="insert"&&Ce)Oe(Ce);else if(i==="replace"&&Ce&&o){let d=N.slides[n].elements.find(p=>p.id===o);d&&d.type==="image"?Ze(o,{src:Ce}):Oe(Ce)}ot(null)},ht=async()=>{if(J&&te){let i=(Fe==null?void 0:Fe.type)==="text"?Fe.content:"";if(i){St(!0);try{let d=await te(i);Ve(d)}catch(d){console.error("Prompt refinement failed:",d),ze("Failed to refine infographic prompt.","error")}finally{St(!1)}return}}Ye(!0)},bt=()=>{let i=document.createElement("input");i.type="file",i.accept="image/*",i.onchange=async d=>{var A;let p=(A=d.target.files)==null?void 0:A[0];if(p){let ee=await new Promise(ue=>{let ye=new FileReader;ye.onload=ce=>{var Qe;return ue((Qe=ce.target)==null?void 0:Qe.result)},ye.readAsDataURL(p)});ie(ee)}},i.click()},Vt=(0,B.useCallback)(i=>!g||!i||i.startsWith("data:")||i.includes("localhost")||i.includes("127.0.0.1")?i:`${g}?url=${encodeURIComponent(i)}`,[g]);return!s||!j?(0,l.jsx)("div",{className:"flex items-center justify-center bg-red-50 text-red-600 p-8 rounded-xl border-2 border-red-200 font-bold",children:"Error: width and height props are compulsory for PptEditor."}):(0,l.jsxs)("div",{className:"flex flex-col bg-white relative",style:{width:typeof s=="number"?`${s}px`:s,height:typeof j=="number"?`${j}px`:j,fontSize:`${16*Ke}px`},children:[E&&(0,l.jsx)("div",{className:"absolute inset-0 z-[2000] bg-white flex flex-col items-center justify-center p-6 md:p-12 overflow-y-auto",children:(0,l.jsxs)("div",{className:"max-w-2xl w-full text-center space-y-6 md:space-y-8 animate-in fade-in zoom-in-95 duration-500 my-auto",children:[(0,l.jsx)("div",{className:"flex justify-center"}),(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)("h2",{className:"text-4xl font-black tracking-tight text-slate-800",children:c}),(0,l.jsx)("p",{className:"text-slate-500 font-medium",children:"Create stunning presentations in seconds."})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,l.jsxs)("button",{onClick:()=>{Rt(),W(!1)},className:"flex flex-col items-center justify-center gap-4 p-10 border-2 border-slate-100 rounded-[2.5rem] hover:border-slate-300 hover:bg-slate-50 transition-all group shadow-sm hover:shadow-md active:scale-[0.98]",children:[(0,l.jsx)("div",{className:"p-5 bg-slate-100 rounded-2xl group-hover:bg-blue-50 transition-colors",children:(0,l.jsx)("svg",{className:"w-10 h-10 text-blue-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M12 4v16m8-8H4"})})}),(0,l.jsx)("span",{className:"text-sm font-black uppercase tracking-[0.15em] text-slate-600 group-hover:text-slate-900 transition-colors",children:"Start New Deck"})]}),(0,l.jsxs)("label",{className:"flex flex-col items-center justify-center gap-4 p-10 border-2 border-slate-100 rounded-[2.5rem] hover:border-slate-300 hover:bg-slate-50 transition-all group shadow-sm hover:shadow-md active:scale-[0.98] cursor-pointer",children:[(0,l.jsx)("div",{className:"p-5 bg-slate-100 rounded-2xl group-hover:bg-emerald-50 transition-colors",children:(0,l.jsx)("svg",{className:"w-10 h-10 text-emerald-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M4 16v1a2 2 0 002 2h12a2 2 0 002-2v-1m-4-8l-4-4m0 0L8 8m4-4v12"})})}),(0,l.jsx)("span",{className:"text-sm font-black uppercase tracking-[0.15em] text-slate-600 group-hover:text-slate-900 transition-colors",children:"Upload PPTX"}),(0,l.jsx)("input",{type:"file",accept:".pptx",className:"hidden",onChange:i=>{var p;let d=(p=i.target.files)==null?void 0:p[0];d&&(Je(d),W(!1))}})]})]}),(0,l.jsxs)("div",{className:"space-y-4 pt-8 border-t border-slate-100",children:[(0,l.jsxs)("div",{className:"flex gap-3 items-stretch",children:[(0,l.jsx)("div",{className:"flex-1 relative group",children:(0,l.jsx)("input",{type:"text",placeholder:"Paste presentation URL...",value:oe,onChange:i=>Se(i.target.value),className:"text-black w-full bg-slate-50 border border-slate-200 rounded-2xl pl-12 pr-5 py-4 focus:outline-none focus:border-slate-400 focus:ring-4 focus:ring-slate-400/5 text-base transition-all h-full"})}),(0,l.jsx)("button",{onClick:()=>{oe.trim()&&(Je(oe.trim()),W(!1))},disabled:!oe.trim()||ne,style:{cursor:"pointer"},className:"bg-slate-900 hover:bg-black disabled:bg-slate-100 disabled:text-slate-400 text-white font-black px-10 rounded-2xl transition-all shadow-sm text-sm shrink-0 whitespace-nowrap h-full min-h-[56px] flex items-center justify-center uppercase tracking-widest",children:ne?(0,l.jsxs)("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,l.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,l.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):"Load"})]}),(0,l.jsx)("p",{className:"text-[10px] text-slate-400 font-bold uppercase tracking-[0.2em]",children:"Supports S3, public links, and versioned assets"})]})]})}),C&&(0,l.jsx)(vt,{presentation:N,initialSlideIndex:n,onClose:jt}),(0,l.jsx)(Xt,{onAddText:Bt,onAddImage:Oe,onAddShape:Pt,onAddSlide:Tt,onExport:pa,onFormatText:At,onDeleteElement:Ge,onGenerateImageClick:()=>fe(!0),onGenerateInfographicClick:ht,onUploadImageClick:bt,onApplyLayout:ca,onPlay:()=>$(!0),onAiAction:pt,onAiResponseAction:Ht,onNewPresentation:Rt,onLoadPresentation:Je,aiResponse:D,isAiLoading:It,selectedElement:Fe,appName:c,appBgColor:P,uiScale:Ke,source:xe}),(0,l.jsxs)("div",{className:"flex flex-1 overflow-hidden",children:[(0,l.jsx)(Kt,{slides:N.slides,currentSlideIndex:n,onSelectSlide:f,onDeleteSlide:ia,onDuplicateSlide:la,onReorderSlides:na,uiScale:Ke,appBgColor:P}),(0,l.jsx)("div",{className:"flex-1 flex items-center justify-center p-12 overflow-auto bg-white",children:(0,l.jsx)(et,{slide:we,onElementUpdate:Ze,onSelect:x,uiScale:Ke,onSlashCommand:(i,d,p)=>Ne({visible:i.x!==0,position:i,mode:d||"default",context:p}),selectedElementId:o,onAiGenerateClick:()=>fe(!0),onAiGenerateInfographicClick:ht,onUploadImageClick:bt,onDeleteElement:Ge})})]}),me.visible&&(0,l.jsx)("div",{className:"fixed inset-0 z-[9998]",onClick:()=>Ne(i=>R(z({},i),{visible:!1})),children:(0,l.jsx)(ea,{position:me.position,onClose:()=>Ne(i=>R(z({},i),{visible:!1})),onAction:ga,canUseAi:!!v||!!g,mode:me.mode,context:me.context,aiResult:D,isAiLoading:It,onAiResponseAction:Ht})}),ve&&(0,l.jsx)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/40 backdrop-blur-sm animate-in fade-in duration-200",children:(0,l.jsxs)("div",{className:"bg-white rounded-2xl shadow-2xl w-[500px] p-6 flex flex-col gap-4 animate-in zoom-in-95 duration-200",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("h3",{className:"text-xl font-bold text-slate-800 flex items-center gap-2",children:[(0,l.jsx)(q.Sparkles,{className:"text-blue-600",size:20}),"Generate Image"]}),(0,l.jsx)("button",{onClick:()=>fe(!1),className:"text-slate-400 hover:text-slate-600",children:(0,l.jsx)(q.Plus,{className:"rotate-45",size:24})})]}),(0,l.jsx)("p",{className:"text-sm text-slate-500",children:"Describe the image you want to create for this slide."}),(0,l.jsx)("textarea",{autoFocus:!0,placeholder:"A futuristic city in the style of cyberpunk with neon lights...",className:"text-black w-full h-32 p-4 bg-slate-50 border border-slate-200 rounded-xl outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 text-sm font-medium resize-none",value:O,onChange:i=>tt(i.target.value)}),(0,l.jsxs)("div",{className:"flex justify-end gap-3",children:[(0,l.jsx)("button",{onClick:()=>fe(!1),className:"px-5 py-3 cursor-pointer text-sm font-bold text-slate-600 hover:bg-slate-100 rounded-lg transition-colors",children:"Cancel"}),(0,l.jsx)("button",{onClick:ua,disabled:at||!O.trim(),className:"px-6 py-3 cursor-pointer text-sm font-bold text-white bg-blue-600 hover:bg-blue-700 rounded-lg shadow-lg shadow-blue-500/20 transition-all active:scale-95 disabled:opacity-50 disabled:active:scale-100 flex items-center gap-2",children:at?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(q.RefreshCw,{className:"animate-spin",size:16}),"Generating..."]}):"Generate"})]})]})}),H&&(0,l.jsx)("div",{className:"fixed inset-0 z-[10000] flex items-center justify-center bg-black/60 backdrop-blur-md animate-in fade-in duration-300",children:(0,l.jsxs)("div",{className:"bg-white rounded-2xl shadow-3xl max-w-[90vw] max-h-[90vh] overflow-hidden flex flex-col animate-in zoom-in-95 duration-300 border border-slate-200",children:[(0,l.jsxs)("div",{className:"p-4 border-b border-slate-100 flex items-center justify-between bg-white",children:[(0,l.jsx)("h3",{className:"text-lg font-bold text-slate-800",children:"Preview Image"}),(0,l.jsx)("button",{onClick:()=>ie(null),className:"p-2 hover:bg-slate-100 rounded-full text-slate-400 transition-colors",children:(0,l.jsx)(q.Plus,{className:"rotate-45",size:20})})]}),(0,l.jsxs)("div",{className:"p-8 bg-slate-100 flex items-center justify-center overflow-auto min-h-[300px] relative",children:[_e&&!he&&(0,l.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-slate-100/50 z-10",children:(0,l.jsx)(q.RefreshCw,{className:"animate-spin text-slate-400",size:32})}),(0,l.jsx)("img",{src:Vt(H),alt:"Generated",className:I("max-w-full max-h-[60vh] rounded-lg shadow-2xl ring-4 ring-white transition-opacity duration-300",he||_e?"opacity-0":"opacity-100"),onLoad:()=>Pe(!1),onError:()=>{ke(!0),Pe(!1)}}),he&&(0,l.jsxs)("div",{className:"flex flex-col items-center gap-4 text-slate-400 p-12 text-center animate-in fade-in duration-500",children:[(0,l.jsx)("div",{className:"p-4 bg-slate-200/50 rounded-full",children:(0,l.jsx)(q.Image,{size:48,className:"opacity-40"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-bold text-slate-600",children:"Failed to load preview"}),(0,l.jsx)("p",{className:"text-xs max-w-[300px] mt-1",children:"The URL might be invalid or restricted. Ensure it's a valid image format."})]}),(0,l.jsx)("code",{className:"text-[10px] bg-slate-200/50 px-2 py-1 rounded break-all max-w-[400px]",children:H})]})]}),(0,l.jsxs)("div",{className:"p-6 bg-white border-t border-slate-100 flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex gap-3 justify-center",children:[(0,l.jsxs)("button",{onClick:()=>ut("insert"),className:"flex-1 px-6 py-3 bg-blue-600 hover:bg-blue-700 text-white rounded-xl font-bold shadow-lg shadow-blue-500/20 transition-all flex items-center justify-center gap-2",children:[(0,l.jsx)(q.Check,{size:18}),"Insert image"]}),o&&((Ut=N.slides[n].elements.find(i=>i.id===o))==null?void 0:Ut.type)==="image"&&(0,l.jsxs)("button",{onClick:()=>ut("replace"),className:"flex-1 px-6 py-3 bg-emerald-600 hover:bg-emerald-700 text-black rounded-xl font-bold shadow-lg shadow-emerald-500/20 transition-all flex items-center justify-center gap-2",children:[(0,l.jsx)(q.RefreshCw,{size:18}),"Replace existing"]})]}),(0,l.jsxs)("button",{onClick:()=>ut("discard"),className:"w-full px-6 py-3 bg-red-50 hover:bg-red-100 text-red-600 rounded-xl font-bold transition-all flex items-center justify-center gap-2",children:[(0,l.jsx)(q.Trash2,{size:18}),"Discard"]})]})]})}),sa&&(0,l.jsx)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/40 backdrop-blur-sm animate-in fade-in duration-200",children:(0,l.jsxs)("div",{className:"bg-white rounded-2xl shadow-2xl w-[500px] p-6 flex flex-col gap-4 animate-in zoom-in-95 duration-200",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("h3",{className:"text-xl font-bold text-slate-800 flex items-center gap-2",children:[(0,l.jsx)(q.PieChart,{className:"text-blue-600",size:20}),"Generate Infographic"]}),(0,l.jsx)("button",{onClick:()=>Ye(!1),className:"text-slate-400 hover:text-slate-600",children:(0,l.jsx)(q.Plus,{className:"rotate-45",size:24})})]}),(0,l.jsx)("p",{className:"text-sm text-slate-500",children:"Describe the infographic you want to create for this slide."}),(0,l.jsx)("textarea",{autoFocus:!0,placeholder:"A pie chart showing market share distribution...",className:"text-black w-full h-32 p-4 bg-slate-50 border border-slate-200 rounded-xl outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 text-sm font-medium resize-none",value:st,onChange:i=>Nt(i.target.value)}),(0,l.jsxs)("div",{className:"flex justify-end gap-3",children:[(0,l.jsx)("button",{onClick:()=>Ye(!1),className:"px-5 py-3 cursor-pointer text-sm font-bold text-slate-600 hover:bg-slate-100 rounded-lg transition-colors",children:"Cancel"}),(0,l.jsx)("button",{onClick:()=>Dt(),disabled:kt||!st.trim(),className:"px-6 py-3 cursor-pointer text-sm font-bold text-white bg-blue-600 hover:bg-blue-700 rounded-lg shadow-lg shadow-blue-500/20 transition-all active:scale-95 disabled:opacity-50 disabled:active:scale-100 flex items-center gap-2",children:kt?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(q.RefreshCw,{className:"animate-spin",size:16}),"Generating..."]}):"Generate"})]})]})}),oa&&(0,l.jsx)("div",{className:"fixed inset-0 z-[11000] flex items-center justify-center bg-black/20 backdrop-blur-[2px] animate-in fade-in duration-200",children:(0,l.jsxs)("div",{className:"bg-white rounded-2xl shadow-2xl p-8 flex flex-col items-center gap-4 animate-in zoom-in-95 duration-200",children:[(0,l.jsx)(q.RefreshCw,{className:"animate-spin text-blue-600",size:32}),(0,l.jsx)("p",{className:"text-sm font-bold text-slate-600",children:"Polishing your prompt with AI..."})]})}),lt!==null&&(0,l.jsx)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/40 backdrop-blur-sm animate-in fade-in duration-200",children:(0,l.jsxs)("div",{className:"bg-white rounded-2xl shadow-2xl w-[600px] p-6 flex flex-col gap-4 animate-in zoom-in-95 duration-200",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("h3",{className:"text-xl font-bold text-slate-800 flex items-center gap-2",children:[(0,l.jsx)(q.Sparkles,{className:"text-blue-600",size:20}),"Step 1: AI Refinement"]}),(0,l.jsx)("button",{onClick:()=>Ve(null),className:"text-slate-400 hover:text-slate-600",children:(0,l.jsx)(q.Plus,{className:"rotate-45",size:24})})]}),(0,l.jsx)("p",{className:"text-sm text-slate-500",children:"The AI has refined your selected text into a visual prompt. You can adjust it below."}),(0,l.jsx)("textarea",{autoFocus:!0,className:"text-black w-full h-48 p-4 bg-slate-50 border border-slate-200 rounded-xl outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 text-sm font-medium resize-none shadow-inner",value:lt,onChange:i=>Ve(i.target.value)}),(0,l.jsxs)("div",{className:"flex justify-end gap-3 mt-2",children:[(0,l.jsx)("button",{onClick:()=>Ve(null),className:"px-5 py-3 text-sm font-bold text-slate-600 hover:bg-slate-100 rounded-lg transition-colors",children:"Discard"}),(0,l.jsxs)("button",{onClick:()=>{let i=lt;Ve(null),Dt(i)},className:"px-6 py-3 text-sm font-bold text-white bg-blue-600 hover:bg-blue-700 rounded-xl shadow-lg shadow-blue-500/20 transition-all active:scale-95 flex items-center gap-2 uppercase tracking-wide",children:[(0,l.jsx)(q.PieChart,{size:18}),"Generate Infographic"]})]})]})}),Ce&&(0,l.jsx)("div",{className:"fixed inset-0 z-[10000] flex items-center justify-center bg-black/60 backdrop-blur-md animate-in fade-in duration-300",children:(0,l.jsxs)("div",{className:"bg-white rounded-2xl shadow-3xl max-w-[90vw] max-h-[90vh] overflow-hidden flex flex-col animate-in zoom-in-95 duration-300 border border-slate-200",children:[(0,l.jsxs)("div",{className:"p-4 border-b border-slate-100 flex items-center justify-between bg-white",children:[(0,l.jsx)("h3",{className:"text-lg font-bold text-slate-800",children:"Preview Infographic"}),(0,l.jsx)("button",{onClick:()=>ot(null),className:"p-2 hover:bg-slate-100 rounded-full text-slate-400 transition-colors",children:(0,l.jsx)(q.Plus,{className:"rotate-45",size:20})})]}),(0,l.jsxs)("div",{className:"p-8 bg-slate-100 flex items-center justify-center overflow-auto min-h-[300px] relative",children:[_e&&!it&&(0,l.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-slate-100/50 z-10",children:(0,l.jsx)(q.RefreshCw,{className:"animate-spin text-slate-400",size:32})}),(0,l.jsx)("img",{src:Vt(Ce),alt:"Generated Infographic",className:I("max-w-full max-h-[60vh] rounded-lg shadow-2xl ring-4 ring-white transition-opacity duration-300",it||_e?"opacity-0":"opacity-100"),onLoad:()=>Pe(!1),onError:()=>{Lt(!0),Pe(!1)}}),it&&(0,l.jsxs)("div",{className:"flex flex-col items-center gap-4 text-slate-400 p-12 text-center animate-in fade-in duration-500",children:[(0,l.jsx)("div",{className:"p-4 bg-slate-200/50 rounded-full",children:(0,l.jsx)(q.PieChart,{size:48,className:"opacity-40"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-bold text-slate-600",children:"Failed to load preview"}),(0,l.jsx)("p",{className:"text-xs max-w-[300px] mt-1",children:"The URL might be invalid or restricted. Ensure it's a valid image format."})]}),(0,l.jsx)("code",{className:"text-[10px] bg-slate-200/50 px-2 py-1 rounded break-all max-w-[400px]",children:Ce})]})]}),(0,l.jsxs)("div",{className:"p-6 bg-white border-t border-slate-100 flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex gap-3 justify-center",children:[(0,l.jsxs)("button",{onClick:()=>mt("insert"),className:"flex-1 px-6 py-3 bg-blue-600 hover:bg-blue-700 text-white rounded-xl font-bold shadow-lg shadow-blue-500/20 transition-all flex items-center justify-center gap-2",children:[(0,l.jsx)(q.Check,{size:18}),"Insert infographic"]}),o&&((Ft=N.slides[n].elements.find(i=>i.id===o))==null?void 0:Ft.type)==="image"&&(0,l.jsxs)("button",{onClick:()=>mt("replace"),className:"flex-1 px-6 py-3 bg-emerald-600 hover:bg-emerald-700 text-black rounded-xl font-bold shadow-lg shadow-emerald-500/20 transition-all flex items-center justify-center gap-2",children:[(0,l.jsx)(q.RefreshCw,{size:18}),"Replace existing"]})]}),(0,l.jsxs)("button",{onClick:()=>mt("discard"),className:"w-full px-6 py-3 bg-red-50 hover:bg-red-100 text-red-600 rounded-xl font-bold transition-all flex items-center justify-center gap-2",children:[(0,l.jsx)(q.Trash2,{size:18}),"Discard"]})]})]})}),C&&(0,l.jsx)(vt,{presentation:N,initialSlideIndex:n,onClose:jt}),(0,l.jsx)(aa,{isOpen:nt.open,message:nt.message,type:nt.type,onClose:()=>zt(i=>R(z({},i),{open:!1}))})]})};var ra=He(require("pptxgenjs"));var yt=class{async exportToBlob(a){var T,g;let c=new ra.default,h=((T=a.layout)==null?void 0:T.width)||12192e3,v=((g=a.layout)==null?void 0:g.height)||6858e3,s=1200,j=675,P=S=>S/s*(h/914400),M=S=>S/j*(v/914400);return a.slides.forEach(S=>{let V=c.addSlide();[...S.elements].sort((y,b)=>y.zIndex-b.zIndex).forEach(y=>{var U,J;let b=y.opacity!==void 0?(1-y.opacity)*100:0,Z={x:P(y.x),y:M(y.y),w:P(y.width),h:M(y.height)};if(y.type==="text")V.addText(y.content,R(z({},Z),{fontSize:(y.fontSize||18)/2,color:((U=y.color)==null?void 0:U.replace("#",""))||"000000",fontFace:y.fontFamily||"Arial"}));else if(y.type==="image")V.addImage(R(z({},Z),{path:y.src,transparency:b}));else if(y.type==="shape"){let te=y.shapeType==="ellipse"?c.ShapeType.ellipse:c.ShapeType.rect;V.addShape(te,R(z({},Z),{fill:{color:((J=y.fill)==null?void 0:J.replace("#",""))||"CCCCCC",transparency:b>0?Math.min(b+10,100):0}}))}})}),await c.write({outputType:"blob"})}};0&&(module.exports={PptEditor,PptxBlobExporter,PptxExporter,PptxParser});
|
|
20
|
+
${ce}`)).response.text().trim()}oe(M)}catch(M){console.error("AI Text Edit Error:",M),Me("AI editing failed. Please check configuration.","error")}finally{Re(!1)}}},Ut=o=>{if(!D||!Se)return;if(o==="regenerate"){Vt(Se.action);return}let d=y.slides[n],p=d.elements.find(M=>M.id===Se.id);if(!(!p||p.type!=="text")){if(o==="replace")Ue(Se.id,{content:D});else if(o==="addBelow"){let M=j(z({},p),{id:`text-ai-${Date.now()}`,content:D,y:p.y+p.height+20,zIndex:d.elements.length});ze({elements:[...d.elements,M]})}oe(null),We(null),He(M=>j(z({},M),{visible:!1}))}},ha=o=>{if(!ie||!Se)return;if(o==="discard"){Z(null);return}if(o==="regenerate"){at(Se.id,Se.action);return}let d=y.slides[n],p=d.elements.find(M=>M.id===Se.id);if(!(!p||p.type!=="text")){if(o==="replace")Ue(Se.id,{content:ie});else if(o==="addBelow"){let M=j(z({},p),{id:`text-refine-${Date.now()}`,content:ie,y:p.y+p.height+20,zIndex:d.elements.length});ze({elements:[...d.elements,M]})}Z(null),We(null)}},fa=async()=>{await new Ke().export(y)},Za=()=>{F(!0);let o=document.documentElement;o.requestFullscreen&&o.requestFullscreen()},Ft=()=>{F(!1),document.fullscreenElement&&document.exitFullscreen()};(0,B.useEffect)(()=>{let o=()=>{document.fullscreenElement||F(!1)};return document.addEventListener("fullscreenchange",o),()=>document.removeEventListener("fullscreenchange",o)},[]),(0,B.useEffect)(()=>{let o=d=>{if(d.key==="Delete"||d.key==="Backspace"){let p=document.activeElement;if((p==null?void 0:p.tagName)==="INPUT"||(p==null?void 0:p.tagName)==="TEXTAREA"||p!=null&&p.isContentEditable)return;Xe()}d.key==="Escape"&&(h(null),He(p=>j(z({},p),{visible:!1}))),(d.ctrlKey||d.metaKey)&&(d.key==="z"&&(d.preventDefault(),d.shiftKey?mt():Tt()),d.key==="y"&&(d.preventDefault(),mt()))};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[Xe,Tt,mt]);let bt=(o,d)=>{Y(o),H==null||H(o,d)},$t=()=>{C({slides:[{id:`slide-${Date.now()}`,elements:[]}],layout:{width:12192e3,height:6858e3}}),x(0),h(null),bt("scratch")},rt=async o=>{te(!0);try{let d=new Je,p=o;if(typeof o=="string"){let re=o.trim();p=g?`${g}${g.includes("?")?"&":"?"}url=${encodeURIComponent(re)}`:re,bt("url",re)}else bt("uploaded");let M=await d.parse(p);C(M),q([]),ee([]),x(0),h(null)}catch(d){console.error("Failed to load PPTX",d),Me("Failed to load presentation. Please ensure it is a valid .pptx.","error")}finally{te(!1)}},xa=(o,d)=>{switch(o!=="ai-text-edit"&&He(p=>j(z({},p),{visible:!1})),o){case"add-text":jt();break;case"add-image":vt();break;case"add-shape":Rt(d);break;case"new-slide":Dt();break;case"ai-action":at(i||"",d);break;case"ai-text-edit":Vt(d);break;case"generate-image":je(!0);break;case"generate-infographic":xt();break;case"format":Ht(d);break;case"delete":Xe();break}},va=async()=>{if(U.trim()){ke(!0);try{let o="";if(S)o=await S(U);else throw v?new Error("Internal image generation requires onGenerateImage prop or specific endpoint configuration."):new Error("No image generation function or Gemini API key provided.");Qe(o),je(!1),de("")}catch(o){console.error("Image generation failed:",o),Me("Image generation failed: "+(o instanceof Error?o.message:"Unknown error"),"error")}finally{ke(!1)}}},ht=o=>{if(o==="insert"&&Ce)_e(Ce);else if(o==="replace"&&Ce&&i){let d=y.slides[n].elements.find(p=>p.id===i);d&&d.type==="image"?Ue(i,{src:Ce}):_e(Ce)}Qe(null)},Zt=async o=>{let d=o||nt;if(d.trim()){Mt(!0);try{let p="";if(L)p=await L(d);else throw v?new Error("Internal infographic generation requires onGenerateInfographic prop or specific endpoint configuration."):new Error("No infographic generation function or Gemini API key provided.");ct(p),et(!1),zt("")}catch(p){console.error("Infographic generation failed:",p),Me("Infographic generation failed: "+(p instanceof Error?p.message:"Unknown error"),"error")}finally{Mt(!1)}}},ft=o=>{if(o==="insert"&&Le)_e(Le);else if(o==="replace"&&Le&&i){let d=y.slides[n].elements.find(p=>p.id===i);d&&d.type==="image"?Ue(i,{src:Le}):_e(Le)}ct(null)},xt=async()=>{if(Q&&E){let o=(Ve==null?void 0:Ve.type)==="text"?Ve.content:"";if(o){Bt(!0);try{let d=await E(o);Oe(d)}catch(d){console.error("Prompt refinement failed:",d),Me("Failed to refine infographic prompt.","error")}finally{Bt(!1)}return}}et(!0)},vt=()=>{let o=document.createElement("input");o.type="file",o.accept="image/*",o.onchange=async d=>{var M;let p=(M=d.target.files)==null?void 0:M[0];if(p){let re=await new Promise(me=>{let ye=new FileReader;ye.onload=ce=>{var st;return me((st=ce.target)==null?void 0:st.result)},ye.readAsDataURL(p)});Qe(re)}},o.click()},Gt=(0,B.useCallback)(o=>!g||!o||o.startsWith("data:")||o.includes("localhost")||o.includes("127.0.0.1")?o:`${g}?url=${encodeURIComponent(o)}`,[g]);return!s||!R?(0,l.jsx)("div",{className:"flex items-center justify-center bg-red-50 text-red-600 p-8 rounded-xl border-2 border-red-200 font-bold",children:"Error: width and height props are compulsory for PptEditor."}):(0,l.jsxs)("div",{className:"flex flex-col bg-white relative",style:{width:typeof s=="number"?`${s}px`:s,height:typeof R=="number"?`${R}px`:R,fontSize:`${16*tt}px`},children:[le&&(0,l.jsx)("div",{className:"absolute inset-0 z-[2000] bg-white flex flex-col items-center justify-center p-6 md:p-12 overflow-y-auto",children:(0,l.jsxs)("div",{className:"max-w-2xl w-full text-center space-y-6 md:space-y-8 animate-in fade-in zoom-in-95 duration-500 my-auto",children:[(0,l.jsx)("div",{className:"flex justify-center"}),(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)("h2",{className:"text-4xl font-black tracking-tight text-slate-800",children:c}),(0,l.jsx)("p",{className:"text-slate-500 font-medium",children:"Create stunning presentations in seconds."})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,l.jsxs)("button",{onClick:()=>{$t(),Ne(!1)},className:"flex flex-col items-center justify-center gap-4 p-10 border-2 border-slate-100 rounded-[2.5rem] hover:border-slate-300 hover:bg-slate-50 transition-all group shadow-sm hover:shadow-md active:scale-[0.98]",children:[(0,l.jsx)("div",{className:"p-5 bg-slate-100 rounded-2xl group-hover:bg-blue-50 transition-colors",children:(0,l.jsx)("svg",{className:"w-10 h-10 text-blue-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M12 4v16m8-8H4"})})}),(0,l.jsx)("span",{className:"text-sm font-black uppercase tracking-[0.15em] text-slate-600 group-hover:text-slate-900 transition-colors",children:"Start New Deck"})]}),(0,l.jsxs)("label",{className:"flex flex-col items-center justify-center gap-4 p-10 border-2 border-slate-100 rounded-[2.5rem] hover:border-slate-300 hover:bg-slate-50 transition-all group shadow-sm hover:shadow-md active:scale-[0.98] cursor-pointer",children:[(0,l.jsx)("div",{className:"p-5 bg-slate-100 rounded-2xl group-hover:bg-emerald-50 transition-colors",children:(0,l.jsx)("svg",{className:"w-10 h-10 text-emerald-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M4 16v1a2 2 0 002 2h12a2 2 0 002-2v-1m-4-8l-4-4m0 0L8 8m4-4v12"})})}),(0,l.jsx)("span",{className:"text-sm font-black uppercase tracking-[0.15em] text-slate-600 group-hover:text-slate-900 transition-colors",children:"Upload PPTX"}),(0,l.jsx)("input",{type:"file",accept:".pptx",className:"hidden",onChange:o=>{var p;let d=(p=o.target.files)==null?void 0:p[0];d&&(rt(d),Ne(!1))}})]})]}),(0,l.jsxs)("div",{className:"space-y-4 pt-8 border-t border-slate-100",children:[(0,l.jsxs)("div",{className:"flex gap-3 items-stretch",children:[(0,l.jsx)("div",{className:"flex-1 relative group",children:(0,l.jsx)("input",{type:"text",placeholder:"Paste presentation URL...",value:be,onChange:o=>Te(o.target.value),className:"text-black w-full bg-slate-50 border border-slate-200 rounded-2xl pl-12 pr-5 py-4 focus:outline-none focus:border-slate-400 focus:ring-4 focus:ring-slate-400/5 text-base transition-all h-full"})}),(0,l.jsx)("button",{onClick:()=>{be.trim()&&(rt(be.trim()),Ne(!1))},disabled:!be.trim()||he,style:{cursor:"pointer"},className:"bg-slate-900 hover:bg-black disabled:bg-slate-100 disabled:text-slate-400 text-white font-black px-10 rounded-2xl transition-all shadow-sm text-sm shrink-0 whitespace-nowrap h-full min-h-[56px] flex items-center justify-center uppercase tracking-widest",children:he?(0,l.jsxs)("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,l.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,l.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):"Load"})]}),(0,l.jsx)("p",{className:"text-[10px] text-slate-400 font-bold uppercase tracking-[0.2em]",children:"Supports S3, public links, and versioned assets"})]})]})}),k&&(0,l.jsx)(Nt,{presentation:y,initialSlideIndex:n,onClose:Ft}),(0,l.jsx)(Qt,{onAddText:jt,onAddImage:_e,onAddShape:Rt,onAddSlide:Dt,onExport:fa,onFormatText:Ht,onDeleteElement:Xe,onGenerateImageClick:()=>je(!0),onGenerateInfographicClick:xt,onUploadImageClick:vt,onApplyLayout:ba,onPlay:()=>F(!0),onAiAction:at,onAiResponseAction:Ut,onNewPresentation:$t,onLoadPresentation:rt,aiResponse:D,isAiLoading:ut,selectedElement:Ve,refineResponse:ie,onRefineAction:at,appName:c,appBgColor:T,uiScale:tt,source:_}),(0,l.jsxs)("div",{className:"flex flex-1 overflow-hidden",children:[(0,l.jsx)(ta,{slides:y.slides,currentSlideIndex:n,onSelectSlide:x,onDeleteSlide:ga,onDuplicateSlide:ua,onReorderSlides:ma,uiScale:tt,appBgColor:T}),(0,l.jsx)("div",{className:"flex-1 flex items-center justify-center p-12 overflow-auto bg-white",children:(0,l.jsx)(it,{slide:we,onElementUpdate:Ue,onSelect:h,uiScale:tt,onSlashCommand:(o,d,p)=>He({visible:o.x!==0,position:o,mode:d||"default",context:p}),selectedElementId:i,onAiGenerateClick:()=>je(!0),onAiGenerateInfographicClick:xt,onUploadImageClick:vt,onDeleteElement:Xe})})]}),W.visible&&(0,l.jsx)("div",{className:"fixed inset-0 z-[9998]",onClick:()=>He(o=>j(z({},o),{visible:!1})),children:(0,l.jsx)(ia,{position:W.position,onClose:()=>He(o=>j(z({},o),{visible:!1})),onAction:xa,canUseAi:!!v||!!g,mode:W.mode,context:W.context,aiResult:D,isAiLoading:ut,onAiResponseAction:Ut})}),ie&&Ve&&(0,l.jsx)(oa,{result:ie,isLoading:ut,onAction:ha,onClose:()=>Z(null)}),Lt&&(0,l.jsx)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/40 backdrop-blur-sm animate-in fade-in duration-200",children:(0,l.jsxs)("div",{className:"bg-white rounded-2xl shadow-2xl w-[500px] p-6 flex flex-col gap-4 animate-in zoom-in-95 duration-200",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("h3",{className:"text-xl font-bold text-slate-800 flex items-center gap-2",children:[(0,l.jsx)(X.Sparkles,{className:"text-blue-600",size:20}),"Generate Image"]}),(0,l.jsx)("button",{onClick:()=>je(!1),className:"text-slate-400 hover:text-slate-600",children:(0,l.jsx)(X.Plus,{className:"rotate-45",size:24})})]}),(0,l.jsx)("p",{className:"text-sm text-slate-500",children:"Describe the image you want to create for this slide."}),(0,l.jsx)("textarea",{autoFocus:!0,placeholder:"A futuristic city in the style of cyberpunk with neon lights...",className:"text-black w-full h-32 p-4 bg-slate-50 border border-slate-200 rounded-xl outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 text-sm font-medium resize-none",value:U,onChange:o=>de(o.target.value)}),(0,l.jsxs)("div",{className:"flex justify-end gap-3",children:[(0,l.jsx)("button",{onClick:()=>je(!1),className:"flex-1 px-5 py-3 cursor-pointer text-sm font-bold text-slate-600 hover:bg-slate-100 rounded-lg transition-colors",children:"Cancel"}),(0,l.jsx)("button",{onClick:va,disabled:ve||!U.trim(),className:"flex-1 px-6 py-3 cursor-pointer text-sm font-bold text-white bg-blue-600 hover:bg-blue-700 rounded-lg shadow-lg shadow-blue-500/20 transition-all active:scale-95 disabled:opacity-50 disabled:active:scale-100 flex items-center gap-2",children:ve?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(X.RefreshCw,{className:"animate-spin",size:16}),"Generating..."]}):"Generate"})]})]})}),Ce&&(0,l.jsx)("div",{className:"fixed inset-0 z-[10000] flex items-center justify-center bg-black/60 backdrop-blur-md animate-in fade-in duration-300",children:(0,l.jsxs)("div",{className:"bg-white rounded-2xl shadow-3xl max-w-[90vw] max-h-[90vh] overflow-hidden flex flex-col animate-in zoom-in-95 duration-300 border border-slate-200",children:[(0,l.jsxs)("div",{className:"p-4 border-b border-slate-100 flex items-center justify-between bg-white",children:[(0,l.jsx)("h3",{className:"text-lg font-bold text-slate-800",children:"Preview Image"}),(0,l.jsx)("button",{onClick:()=>Qe(null),className:"p-2 hover:bg-slate-100 rounded-full text-slate-400 transition-colors",children:(0,l.jsx)(X.Plus,{className:"rotate-45",size:20})})]}),(0,l.jsxs)("div",{className:"p-8 bg-slate-100 flex items-center justify-center overflow-auto min-h-[300px] relative",children:[Ee&&!lt&&(0,l.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-slate-100/50 z-10",children:(0,l.jsx)(X.RefreshCw,{className:"animate-spin text-slate-400",size:32})}),(0,l.jsx)("img",{src:Gt(Ce),alt:"Generated",className:I("max-w-full max-h-[60vh] rounded-lg shadow-2xl ring-4 ring-white transition-opacity duration-300",lt||Ee?"opacity-0":"opacity-100"),onLoad:()=>De(!1),onError:()=>{St(!0),De(!1)}}),lt&&(0,l.jsxs)("div",{className:"flex flex-col items-center gap-4 text-slate-400 p-12 text-center animate-in fade-in duration-500",children:[(0,l.jsx)("div",{className:"p-4 bg-slate-200/50 rounded-full",children:(0,l.jsx)(X.Image,{size:48,className:"opacity-40"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-bold text-slate-600",children:"Failed to load preview"}),(0,l.jsx)("p",{className:"text-xs max-w-[300px] mt-1",children:"The URL might be invalid or restricted. Ensure it's a valid image format."})]}),(0,l.jsx)("code",{className:"text-[10px] bg-slate-200/50 px-2 py-1 rounded break-all max-w-[400px]",children:Ce})]})]}),(0,l.jsxs)("div",{className:"p-6 bg-white border-t border-slate-100 flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex gap-3 justify-center",children:[(0,l.jsxs)("button",{onClick:()=>ht("insert"),className:"flex-1 px-6 py-3 bg-blue-600 hover:bg-blue-700 text-white rounded-xl font-bold shadow-lg shadow-blue-500/20 transition-all flex items-center justify-center gap-2",children:[(0,l.jsx)(X.Check,{size:18}),"Insert image"]}),i&&((Ot=y.slides[n].elements.find(o=>o.id===i))==null?void 0:Ot.type)==="image"&&(0,l.jsxs)("button",{onClick:()=>ht("replace"),className:"flex-1 px-6 py-3 bg-emerald-600 hover:bg-emerald-700 text-black rounded-xl font-bold shadow-lg shadow-emerald-500/20 transition-all flex items-center justify-center gap-2",children:[(0,l.jsx)(X.RefreshCw,{size:18}),"Replace existing"]})]}),(0,l.jsxs)("button",{onClick:()=>ht("discard"),className:"w-full px-6 py-3 bg-red-50 hover:bg-red-100 text-red-600 rounded-xl font-bold transition-all flex items-center justify-center gap-2",children:[(0,l.jsx)(X.Trash2,{size:18}),"Discard"]})]})]})}),da&&(0,l.jsx)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/40 backdrop-blur-sm animate-in fade-in duration-200",children:(0,l.jsxs)("div",{className:"bg-white rounded-2xl shadow-2xl w-[500px] p-6 flex flex-col gap-4 animate-in zoom-in-95 duration-200",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("h3",{className:"text-xl font-bold text-slate-800 flex items-center gap-2",children:[(0,l.jsx)(X.PieChart,{className:"text-blue-600",size:20}),"Generate Infographic"]}),(0,l.jsx)("button",{onClick:()=>et(!1),className:"text-slate-400 hover:text-slate-600",children:(0,l.jsx)(X.Plus,{className:"rotate-45",size:24})})]}),(0,l.jsx)("p",{className:"text-sm text-slate-500",children:"Describe the infographic you want to create for this slide."}),(0,l.jsx)("textarea",{autoFocus:!0,placeholder:"A pie chart showing market share distribution...",className:"text-black w-full h-32 p-4 bg-slate-50 border border-slate-200 rounded-xl outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 text-sm font-medium resize-none",value:nt,onChange:o=>zt(o.target.value)}),(0,l.jsxs)("div",{className:"flex justify-end gap-3",children:[(0,l.jsx)("button",{onClick:()=>et(!1),className:"flex-1 px-5 py-3 cursor-pointer text-sm font-bold text-slate-600 hover:bg-slate-100 rounded-lg transition-colors",children:"Cancel"}),(0,l.jsx)("button",{onClick:()=>Zt(),disabled:It||!nt.trim(),className:"flex-1 px-6 py-3 cursor-pointer text-sm font-bold text-white bg-blue-600 hover:bg-blue-700 rounded-lg shadow-lg shadow-blue-500/20 transition-all active:scale-95 disabled:opacity-50 disabled:active:scale-100 flex items-center gap-2",children:It?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(X.RefreshCw,{className:"animate-spin",size:16}),"Generating..."]}):"Generate"})]})]})}),pa&&(0,l.jsx)("div",{className:"fixed inset-0 z-[11000] flex items-center justify-center bg-black/20 backdrop-blur-[2px] animate-in fade-in duration-200",children:(0,l.jsxs)("div",{className:"bg-white rounded-2xl shadow-2xl p-8 flex flex-col items-center gap-4 animate-in zoom-in-95 duration-200",children:[(0,l.jsx)(X.RefreshCw,{className:"animate-spin text-blue-600",size:32}),(0,l.jsx)("p",{className:"text-sm font-bold text-slate-600",children:"Polishing your prompt with AI..."})]})}),pt!==null&&(0,l.jsx)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/40 backdrop-blur-sm animate-in fade-in duration-200",children:(0,l.jsxs)("div",{className:"bg-white rounded-2xl shadow-2xl w-[600px] p-6 flex flex-col gap-4 animate-in zoom-in-95 duration-200",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("h3",{className:"text-xl font-bold text-slate-800 flex items-center gap-2",children:[(0,l.jsx)(X.Sparkles,{className:"text-blue-600",size:20}),"Step 1: AI Refinement"]}),(0,l.jsx)("button",{onClick:()=>Oe(null),className:"text-slate-400 hover:text-slate-600",children:(0,l.jsx)(X.Plus,{className:"rotate-45",size:24})})]}),(0,l.jsx)("p",{className:"text-sm text-slate-500",children:"The AI has refined your selected text into a visual prompt. You can adjust it below."}),(0,l.jsx)("textarea",{autoFocus:!0,className:"text-black w-full h-48 p-4 bg-slate-50 border border-slate-200 rounded-xl outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 text-sm font-medium resize-none shadow-inner",value:pt,onChange:o=>Oe(o.target.value)}),(0,l.jsxs)("div",{className:"flex justify-end gap-3 mt-2",children:[(0,l.jsx)("button",{onClick:()=>Oe(null),className:"px-5 py-3 text-sm font-bold text-slate-600 hover:bg-slate-100 rounded-lg transition-colors",children:"Discard"}),(0,l.jsxs)("button",{onClick:()=>{let o=pt;Oe(null),Zt(o)},className:"px-6 py-3 text-sm font-bold text-white bg-blue-600 hover:bg-blue-700 rounded-xl shadow-lg shadow-blue-500/20 transition-all active:scale-95 flex items-center gap-2 uppercase tracking-wide",children:[(0,l.jsx)(X.PieChart,{size:18}),"Generate Infographic"]})]})]})}),Le&&(0,l.jsx)("div",{className:"fixed inset-0 z-[10000] flex items-center justify-center bg-black/60 backdrop-blur-md animate-in fade-in duration-300",children:(0,l.jsxs)("div",{className:"bg-white rounded-2xl shadow-3xl max-w-[90vw] max-h-[90vh] overflow-hidden flex flex-col animate-in zoom-in-95 duration-300 border border-slate-200",children:[(0,l.jsxs)("div",{className:"p-4 border-b border-slate-100 flex items-center justify-between bg-white",children:[(0,l.jsx)("h3",{className:"text-lg font-bold text-slate-800",children:"Preview Infographic"}),(0,l.jsx)("button",{onClick:()=>ct(null),className:"p-2 hover:bg-slate-100 rounded-full text-slate-400 transition-colors",children:(0,l.jsx)(X.Plus,{className:"rotate-45",size:20})})]}),(0,l.jsxs)("div",{className:"p-8 bg-slate-100 flex items-center justify-center overflow-auto min-h-[300px] relative",children:[Ee&&!dt&&(0,l.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-slate-100/50 z-10",children:(0,l.jsx)(X.RefreshCw,{className:"animate-spin text-slate-400",size:32})}),(0,l.jsx)("img",{src:Gt(Le),alt:"Generated Infographic",className:I("max-w-full max-h-[60vh] rounded-lg shadow-2xl ring-4 ring-white transition-opacity duration-300",dt||Ee?"opacity-0":"opacity-100"),onLoad:()=>De(!1),onError:()=>{At(!0),De(!1)}}),dt&&(0,l.jsxs)("div",{className:"flex flex-col items-center gap-4 text-slate-400 p-12 text-center animate-in fade-in duration-500",children:[(0,l.jsx)("div",{className:"p-4 bg-slate-200/50 rounded-full",children:(0,l.jsx)(X.PieChart,{size:48,className:"opacity-40"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-bold text-slate-600",children:"Failed to load preview"}),(0,l.jsx)("p",{className:"text-xs max-w-[300px] mt-1",children:"The URL might be invalid or restricted. Ensure it's a valid image format."})]}),(0,l.jsx)("code",{className:"text-[10px] bg-slate-200/50 px-2 py-1 rounded break-all max-w-[400px]",children:Le})]})]}),(0,l.jsxs)("div",{className:"p-6 bg-white border-t border-slate-100 flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex gap-3 justify-center",children:[(0,l.jsxs)("button",{onClick:()=>ft("insert"),className:"flex-1 px-6 py-3 bg-blue-600 hover:bg-blue-700 text-white rounded-xl font-bold shadow-lg shadow-blue-500/20 transition-all flex items-center justify-center gap-2",children:[(0,l.jsx)(X.Check,{size:18}),"Insert infographic"]}),i&&((Wt=y.slides[n].elements.find(o=>o.id===i))==null?void 0:Wt.type)==="image"&&(0,l.jsxs)("button",{onClick:()=>ft("replace"),className:"flex-1 px-6 py-3 bg-emerald-600 hover:bg-emerald-700 text-black rounded-xl font-bold shadow-lg shadow-emerald-500/20 transition-all flex items-center justify-center gap-2",children:[(0,l.jsx)(X.RefreshCw,{size:18}),"Replace existing"]})]}),(0,l.jsxs)("button",{onClick:()=>ft("discard"),className:"w-full px-6 py-3 bg-red-50 hover:bg-red-100 text-red-600 rounded-xl font-bold transition-all flex items-center justify-center gap-2",children:[(0,l.jsx)(X.Trash2,{size:18}),"Discard"]})]})]})}),k&&(0,l.jsx)(Nt,{presentation:y,initialSlideIndex:n,onClose:Ft}),(0,l.jsx)(na,{isOpen:gt.open,message:gt.message,type:gt.type,onClose:()=>Pt(o=>j(z({},o),{open:!1}))})]})};var ca=Fe(require("pptxgenjs"));var Ct=class{async exportToBlob(a){var H,g;let c=new ca.default,m=((H=a.layout)==null?void 0:H.width)||12192e3,v=((g=a.layout)==null?void 0:g.height)||6858e3,s=1200,R=675,T=S=>S/s*(m/914400),P=S=>S/R*(v/914400);return a.slides.forEach(S=>{let L=c.addSlide();[...S.elements].sort((N,f)=>N.zIndex-f.zIndex).forEach(N=>{var $,Q;let f=N.opacity!==void 0?(1-N.opacity)*100:0,G={x:T(N.x),y:P(N.y),w:T(N.width),h:P(N.height)};if(N.type==="text")L.addText(N.content,j(z({},G),{fontSize:(N.fontSize||18)/2,color:(($=N.color)==null?void 0:$.replace("#",""))||"000000",fontFace:N.fontFamily||"Arial"}));else if(N.type==="image")L.addImage(j(z({},G),{path:N.src,transparency:f}));else if(N.type==="shape"){let E=N.shapeType==="ellipse"?c.ShapeType.ellipse:c.ShapeType.rect;L.addShape(E,j(z({},G),{fill:{color:((Q=N.fill)==null?void 0:Q.replace("#",""))||"CCCCCC",transparency:f>0?Math.min(f+10,100):0}}))}})}),await c.write({outputType:"blob"})}};0&&(module.exports={PptEditor,PptxBlobExporter,PptxExporter,PptxParser});
|
|
21
21
|
//# sourceMappingURL=index.js.map
|