@app-studio/components 0.10.25 → 0.10.27

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.
Files changed (117) hide show
  1. package/README.md +2 -0
  2. package/dist/index.d.ts +195 -65
  3. package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.js +1 -1
  4. package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.js.map +1 -1
  5. package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.native.js +1 -1
  6. package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.native.js.map +1 -1
  7. package/dist/native/components/Avatar/Avatar/Avatar.props.d.ts +2 -1
  8. package/dist/native/components/ChatInput/ChatInput/ChatInput.props.d.ts +57 -0
  9. package/dist/native/components/ChatInput/ChatInput/ChatInput.state.d.ts +2 -0
  10. package/dist/native/components/ChatInput/ChatInput/ChatInput.state.js +18 -0
  11. package/dist/native/components/ChatInput/ChatInput/ChatInput.state.js.map +1 -1
  12. package/dist/native/components/ChatInput/ChatInput/ChatInput.type.d.ts +1 -0
  13. package/dist/native/components/ChatInput/ChatInput/ChatInput.view.js +5 -2
  14. package/dist/native/components/ChatInput/ChatInput/ChatInput.view.js.map +1 -1
  15. package/dist/native/components/ChatInput/ChatInput.d.ts +2 -2
  16. package/dist/native/components/ChatInput/ChatInput.js +16 -1
  17. package/dist/native/components/ChatInput/ChatInput.js.map +1 -1
  18. package/dist/native/components/ChatInput/EditableInput.d.ts +5 -0
  19. package/dist/native/components/ChatInput/EditableInput.js +74 -5
  20. package/dist/native/components/ChatInput/EditableInput.js.map +1 -1
  21. package/dist/native/components/ChatInput/EditableInput.native.d.ts +5 -0
  22. package/dist/native/components/ChatInput/EditableInput.native.js +4 -2
  23. package/dist/native/components/ChatInput/EditableInput.native.js.map +1 -1
  24. package/dist/native/components/Command/Command/CommandOverlay.js +1 -1
  25. package/dist/native/components/Command/Command/CommandOverlay.js.map +1 -1
  26. package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.native.js +1 -1
  27. package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.native.js.map +1 -1
  28. package/dist/native/components/Drawer/Drawer/Drawer.view.js +1 -1
  29. package/dist/native/components/Drawer/Drawer/Drawer.view.js.map +1 -1
  30. package/dist/native/components/Drawer/Drawer/Drawer.view.native.js +1 -1
  31. package/dist/native/components/Drawer/Drawer/Drawer.view.native.js.map +1 -1
  32. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.js +1 -1
  33. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.js.map +1 -1
  34. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.native.js +1 -1
  35. package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.native.js.map +1 -1
  36. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.props.d.ts +2 -2
  37. package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.props.d.ts +4 -4
  38. package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.view.js +14 -3
  39. package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.view.js.map +1 -1
  40. package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.view.native.js +1 -3
  41. package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.view.native.js.map +1 -1
  42. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.props.d.ts +11 -6
  43. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.js +3 -1
  44. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.js.map +1 -1
  45. package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.props.d.ts +5 -3
  46. package/dist/native/components/Form/Password/example/ErrorInput.js +6 -4
  47. package/dist/native/components/Form/Password/example/ErrorInput.js.map +1 -1
  48. package/dist/native/components/Form/Password/example/HelperText.js +6 -4
  49. package/dist/native/components/Form/Password/example/HelperText.js.map +1 -1
  50. package/dist/native/components/Form/Radio/Radio/Radio.props.d.ts +2 -2
  51. package/dist/native/components/Form/Radio/Radio/Radio.view.js +4 -2
  52. package/dist/native/components/Form/Radio/Radio/Radio.view.js.map +1 -1
  53. package/dist/native/components/Form/Radio/Radio/Radio.view.native.js +4 -2
  54. package/dist/native/components/Form/Radio/Radio/Radio.view.native.js.map +1 -1
  55. package/dist/native/components/Form/Select/Select/Select.props.d.ts +35 -15
  56. package/dist/native/components/Form/Select/Select/Select.state.d.ts +2 -2
  57. package/dist/native/components/Form/Select/Select/Select.state.js +48 -13
  58. package/dist/native/components/Form/Select/Select/Select.state.js.map +1 -1
  59. package/dist/native/components/Form/Select/Select/Select.view.js +59 -8
  60. package/dist/native/components/Form/Select/Select/Select.view.js.map +1 -1
  61. package/dist/native/components/Form/Select/Select/Select.view.native.js +6 -2
  62. package/dist/native/components/Form/Select/Select/Select.view.native.js.map +1 -1
  63. package/dist/native/components/Form/Select/Select.js +5 -1
  64. package/dist/native/components/Form/Select/Select.js.map +1 -1
  65. package/dist/native/components/Form/Selector/Selector/Selector.props.d.ts +17 -12
  66. package/dist/native/components/Form/Switch/Switch/Switch.props.d.ts +3 -3
  67. package/dist/native/components/Form/TextArea/TextArea/TextArea.props.d.ts +23 -7
  68. package/dist/native/components/Form/TextArea/TextArea/TextArea.view.js +9 -10
  69. package/dist/native/components/Form/TextArea/TextArea/TextArea.view.js.map +1 -1
  70. package/dist/native/components/Form/TextField/TextField/TextField.props.d.ts +26 -7
  71. package/dist/native/components/Form/TextField/TextField/TextField.view.js +8 -8
  72. package/dist/native/components/Form/TextField/TextField/TextField.view.js.map +1 -1
  73. package/dist/native/components/Formik/Formik.ChatInput.js +4 -1
  74. package/dist/native/components/Formik/Formik.ChatInput.js.map +1 -1
  75. package/dist/native/components/Formik/Formik.Form.js +15 -1
  76. package/dist/native/components/Formik/Formik.Form.js.map +1 -1
  77. package/dist/native/components/Formik/Formik.Select.js +6 -2
  78. package/dist/native/components/Formik/Formik.Select.js.map +1 -1
  79. package/dist/native/components/Link/Link/Link.props.d.ts +1 -1
  80. package/dist/native/components/Message/Message/Message.props.d.ts +4 -4
  81. package/dist/native/components/Message/Message/Message.type.d.ts +1 -1
  82. package/dist/native/components/Modal/Modal/Modal.style.js +1 -1
  83. package/dist/native/components/Modal/Modal/Modal.style.js.map +1 -1
  84. package/dist/native/components/Modal/Modal/Modal.view.js +2 -2
  85. package/dist/native/components/Modal/Modal/Modal.view.js.map +1 -1
  86. package/dist/native/components/Modal/Modal/Modal.view.native.js +1 -1
  87. package/dist/native/components/Modal/Modal/Modal.view.native.js.map +1 -1
  88. package/dist/native/components/OTPInput/OTPInput/OTPInput.props.d.ts +1 -1
  89. package/dist/native/components/OTPInput/OTPInput/OTPInput.state.d.ts +1 -1
  90. package/dist/native/components/OTPInput/OTPInput/OTPInput.state.js +9 -3
  91. package/dist/native/components/OTPInput/OTPInput/OTPInput.state.js.map +1 -1
  92. package/dist/native/components/Sidebar/Sidebar/Sidebar.view.js +1 -1
  93. package/dist/native/components/Sidebar/Sidebar/Sidebar.view.js.map +1 -1
  94. package/dist/native/components/Table/Table/Table.context.d.ts +2 -2
  95. package/dist/native/components/Table/Table/Table.context.js.map +1 -1
  96. package/dist/native/components/Table/Table/Table.props.d.ts +1 -1
  97. package/dist/native/components/Tabs/Tabs/Tabs.props.d.ts +6 -2
  98. package/dist/native/components/Toast/Toast/Toast.view.js +1 -1
  99. package/dist/native/components/Toast/Toast/Toast.view.js.map +1 -1
  100. package/dist/web.cjs.js +9 -9
  101. package/dist/web.cjs.js.map +1 -1
  102. package/dist/web.esm.js +5771 -5623
  103. package/dist/web.esm.js.map +1 -1
  104. package/dist/web.umd.js +10 -10
  105. package/dist/web.umd.js.map +1 -1
  106. package/docs/README.md +1 -1
  107. package/docs/components/Center.mdx +3 -1
  108. package/docs/components/ChatInput.mdx +224 -0
  109. package/docs/components/Form.mdx +34 -7
  110. package/docs/components/Formik.mdx +7 -0
  111. package/docs/components/Select.mdx +36 -0
  112. package/docs/components/TextArea.mdx +7 -4
  113. package/docs/components/TextField.mdx +8 -5
  114. package/docs/components/Vertical.mdx +4 -2
  115. package/docs/getting-started/component-usage.md +40 -16
  116. package/docs/getting-started/react-native.md +66 -0
  117. package/package.json +3 -2
package/dist/web.cjs.js CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";var Ts=Object.create;var Zr=Object.defineProperty;var Is=Object.getOwnPropertyDescriptor;var Fs=Object.getOwnPropertyNames;var Rs=Object.getPrototypeOf,zs=Object.prototype.hasOwnProperty;var Ms=(e,o,t)=>o in e?Zr(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t;var Ws=(e,o,t,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of Fs(o))!zs.call(e,a)&&a!==t&&Zr(e,a,{get:()=>o[a],enumerable:!(n=Is(o,a))||n.enumerable});return e};var Hs=(e,o,t)=>(t=e!=null?Ts(Rs(e)):{},Ws(o||!e||!e.__esModule?Zr(t,"default",{value:e,enumerable:!0}):t,e));var _e=(e,o,t)=>Ms(e,typeof o!="symbol"?o+"":o,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),p=require("react"),l=require("app-studio"),Ps=require("react-dom"),Ho=require("zustand"),yt=require("react-router-dom"),He=require("formik"),Pt=(e="id")=>`${e}-${Math.random().toString(36).substring(2,9)}`,Vs=({type:e="single",value:o,defaultValue:t,onValueChange:n,collapsible:a=!1})=>{const i=o!==void 0,s=o??t,c=()=>e==="multiple"?Array.isArray(s)?s:s?[s]:[]:Array.isArray(s)?s[0]:s,[d,u]=p.useState(c()),m=p.useMemo(()=>Pt("accordion"),[]),g=i?o:d,h=p.useMemo(()=>g===void 0?[]:Array.isArray(g)?g:[g],[g]);p.useEffect(()=>{i&&(e==="multiple"&&!Array.isArray(o)?(console.warn('Accordion with type="multiple" received non-array value:',o),u(o?[String(o)]:[])):e==="single"&&Array.isArray(o)?(console.warn('Accordion with type="single" received array value:',o),u(o.length>0?o[0]:void 0)):u(o))},[o,i,e]);const f=p.useCallback(b=>{let k;if(e==="single")g===b&&a?k=void 0:g!==b?k=b:k=g;else{const C=Array.isArray(g)?g:[];C.includes(b)?k=C.filter(j=>j!==b):k=[...C,b],Array.isArray(k)&&k.length===0&&(k=[])}i||u(k),n&&n(k)},[e,g,a,i,n]),y=p.useCallback(b=>h.includes(b),[h]);return{expandedItems:h,toggleItem:f,isItemExpanded:y,type:e,collapsible:a,baseId:m}},As={square:{borderRadius:0},rounded:{borderRadius:8}},Es={default:{borderWidth:0,style:{backgroundColor:"transparent"},transition:"background-color 0.15s ease"},outline:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",transition:"border-color 0.15s ease, background-color 0.15s ease",_hover:{borderColor:"color-gray-300"}},filled:{backgroundColor:"color-gray-50",transition:"background-color 0.15s ease",_hover:{backgroundColor:"color-gray-100"}}},Ds={id:"default",label:"Default",sourcePath:"",sourceTitle:"Default adaptive design system (light + dark)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},$s={primary:"#2563eb",secondary:"#7c3aed",success:"#16a34a",warning:"#d97706",error:"#dc2626",onPrimary:"#ffffff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200"},Ls={rawCssVars:{primary:"#2563eb",secondary:"#7c3aed",success:"#16a34a",warning:"#d97706",error:"#dc2626"},colors:[{name:"primary",value:"#2563eb",role:"primary"},{name:"secondary",value:"#7c3aed",role:"secondary"},{name:"success",value:"#16a34a",role:"success"},{name:"warning",value:"#d97706",role:"warning"},{name:"error",value:"#dc2626",role:"error"}],typography:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",monoFamily:"ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace",fontSizes:["12px","13px","14px","16px","18px","22px","28px","36px","48px","64px"],fontWeights:["400","500","600","700","800"],lineHeights:["1.0","1.1","1.2","1.4","1.5","1.6"]},spacing:["2px","4px","8px","12px","16px","24px","32px","48px","64px"],radii:["2px","4px","6px","8px","12px","16px","9999px"],shadows:["0 1px 2px rgba(0,0,0,0.04)","0 4px 12px rgba(0,0,0,0.08)","0 12px 32px rgba(0,0,0,0.12)"]},_s={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:8,fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:null,color:null,borderColor:null,borderRadius:6,fontFamily:"'Inter', system-ui, -apple-system, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:600,fontStyle:"normal"},text:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 2px rgba(0,0,0,0.04)"},header:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"9999px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},Bs={cornerStyle:"soft",typeWeight:"regular",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"neutral-clear"},Os={metadata:Ds,theme:$s,tokens:Ls,components:_s,personality:Bs},Ns={id:"airbnb",label:"Airbnb",sourcePath:"design.md/html/airbnb.html",sourceTitle:"Design System Inspiration of Airbnb",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"]},qs={primary:"#ff385c",secondary:"#222222",success:"#428bff",warning:"#460479",error:"#c13515",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},Us={rawCssVars:{primary:"#ff385c","primary-active":"#e00b41","primary-disabled":"#ffd1da",error:"#c13515",luxe:"#460479",plus:"#92174d",ink:"#222222",body:"#3f3f3f",muted:"#6a6a6a","muted-soft":"#929292",hairline:"#dddddd","hairline-soft":"#ebebeb","border-strong":"#c1c1c1",canvas:"#ffffff","surface-soft":"#f7f7f7","surface-strong":"#f2f2f2","on-primary":"#ffffff","legal-link":"#428bff",shadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0",display:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",text:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, sans-serif"},colors:[{name:"primary",value:"#ff385c",role:"primary"},{name:"primary-active",value:"#e00b41",role:"primary active"},{name:"primary-disabled",value:"#ffd1da",role:"primary disabled"},{name:"error",value:"#c13515",role:"error"},{name:"luxe",value:"#460479",role:"luxe"},{name:"plus",value:"#92174d",role:"plus"},{name:"ink",value:"#222222",role:"ink"},{name:"body",value:"#3f3f3f",role:"body"},{name:"muted",value:"#6a6a6a",role:"muted"},{name:"muted-soft",value:"#929292",role:"muted soft"},{name:"hairline",value:"#dddddd",role:"hairline"},{name:"hairline-soft",value:"#ebebeb",role:"hairline soft"},{name:"border-strong",value:"#c1c1c1",role:"border strong"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface-soft",value:"#f7f7f7",role:"surface soft"},{name:"surface-strong",value:"#f2f2f2",role:"surface strong"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"legal-link",value:"#428bff",role:"legal link"},{name:"shadow",value:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0",role:"shadow"}],typography:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","14px","48px","18px","20px","11px","28px","13px","12px","8px","64px","21px","10px","24px","36px","15px"],fontWeights:["400","600","700","500"],lineHeights:["1.5","1.1","1.43","1.25","2","1","1.2","1.35","1.4"]},spacing:["2px","4px","5px","6px","7px","8px","10px","11px","12px","13px","14px","16px","20px","23px","24px","28px","32px","40px","48px","56px"],radii:["9999px","8px","14px","4px","6px","3px"],shadows:["rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0","var(--shadow)"]},Gs={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:null,color:null,borderColor:null,borderRadius:6,fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},header:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"14px"},trigger:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:16},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:16},title:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"14px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"14px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},Ys={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:16,pillRadius:9999,badgeRadius:6,voice:"warm-welcoming"},Ks={metadata:Ns,theme:qs,tokens:Us,components:Gs,personality:Ys},Xs={id:"apple",label:"Apple",sourcePath:"design.md/html/apple.html",sourceTitle:"Design System Inspiration of Apple",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},Js={primary:"#0071E3",secondary:"#1d1d1f",success:"#0071e3",warning:"#272729",error:"#2997ff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},Qs={rawCssVars:{primary:"#0066cc","primary-focus":"#0071e3","primary-on-dark":"#2997ff",ink:"#1d1d1f",body:"#1d1d1f","body-on-dark":"#ffffff","body-muted":"#cccccc","ink-muted-80":"#333333","ink-muted-48":"#7a7a7a","divider-soft":"#f0f0f0",hairline:"#e0e0e0",canvas:"#ffffff","canvas-parchment":"#f5f5f7","surface-pearl":"#fafafc","surface-tile-1":"#272729","surface-tile-2":"#2a2a2c","surface-tile-3":"#252527","surface-black":"#000000","surface-chip-translucent":"rgba(210, 210, 215, 0.64)","on-primary":"#ffffff","on-dark":"#ffffff",display:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",text:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},colors:[{name:"primary",value:"#0071E3",role:"primary"},{name:"primary-focus",value:"#0071e3",role:"primary focus"},{name:"primary-on-dark",value:"#2997ff",role:"primary on dark"},{name:"ink",value:"#1d1d1f",role:"ink"},{name:"body",value:"#1d1d1f",role:"body"},{name:"body-on-dark",value:"#ffffff",role:"body on dark"},{name:"body-muted",value:"#cccccc",role:"body muted"},{name:"ink-muted-80",value:"#333333",role:"ink muted 80"},{name:"ink-muted-48",value:"#7a7a7a",role:"ink muted 48"},{name:"divider-soft",value:"#f0f0f0",role:"divider soft"},{name:"hairline",value:"#e0e0e0",role:"hairline"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"canvas-parchment",value:"#f5f5f7",role:"canvas parchment"},{name:"surface-pearl",value:"#fafafc",role:"surface pearl"},{name:"surface-tile-1",value:"#272729",role:"surface tile 1"},{name:"surface-tile-2",value:"#2a2a2c",role:"surface tile 2"},{name:"surface-tile-3",value:"#252527",role:"surface tile 3"},{name:"surface-black",value:"#000000",role:"surface black"},{name:"surface-chip-translucent",value:"rgba(210, 210, 215, 0.64)",role:"surface chip translucent"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"on-dark",value:"#ffffff",role:"on dark"}],typography:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["17px","14px","56px","21px","12px","40px","24px","13px","18px","28px","11px","34px","44px","32px","19px"],fontWeights:["400","600","300","700"],lineHeights:["1.47","1.07","1.19","1.1","1.43","1.5","1","1.14","2.0","2.41","1.2","1.35"]},spacing:["5px","6px","7px","8px","10px","11px","12px","14px","15px","16px","18px","20px","21px","22px","24px","28px","32px","44px","48px","50px"],radii:["9999px","18px","28px","24px","8px","11px","50%","12px","4px","6px","3px"],shadows:["0 5px 30px rgba(0, 0, 0, 0.22)"]},Zs={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,borderColor:"theme-primary",letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:8,fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",letterSpacing:"-0.022em",textTransform:"none",fontWeight:300,fontStyle:"normal"},text:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:18,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 5px 30px rgba(0, 0, 0, 0.22)"},header:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.022em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"18px"},trigger:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:18},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.022em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.022em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:18},title:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"18px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"18px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},ec={cornerStyle:"soft",typeWeight:"light",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.022em",accentTreatment:"flat",signatureMotif:"◯",density:"spacious",surfaceTone:"paper",cardRadius:18,pillRadius:9999,badgeRadius:8,voice:"minimal-precise"},oc={metadata:Xs,theme:Js,tokens:Qs,components:Zs,personality:ec},rc={id:"coinbase",label:"Coinbase",sourcePath:"design.md/html/coinbase.html",sourceTitle:"Design System Inspiration of Coinbase",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap"]},tc={primary:"#0052ff",secondary:"#0a0b0d",success:"#16a34a",warning:"#003ecc",error:"#dc2626",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},nc={rawCssVars:{primary:"#0052ff","primary-active":"#003ecc","primary-disabled":"#a8b8cc",ink:"#0a0b0d",body:"#5b616e",muted:"#7c828a","muted-soft":"#a8acb3",hairline:"#dee1e6","hairline-soft":"#eef0f3",canvas:"#ffffff","surface-soft":"#f7f7f7","surface-strong":"#eef0f3","surface-dark":"#0a0b0d","surface-dark-elevated":"#16181c","on-primary":"#ffffff","on-dark":"#ffffff","on-dark-soft":"#a8acb3","semantic-up":"#05b169","semantic-down":"#cf202f","accent-yellow":"#f4b000",display:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",text:"'Inter', 'Coinbase Sans', sans-serif",mono:"'JetBrains Mono', 'Coinbase Mono', monospace"},colors:[{name:"primary",value:"#0052ff",role:"primary"},{name:"primary-active",value:"#003ecc",role:"primary active"},{name:"primary-disabled",value:"#a8b8cc",role:"primary disabled"},{name:"ink",value:"#0a0b0d",role:"ink"},{name:"body",value:"#5b616e",role:"body"},{name:"muted",value:"#7c828a",role:"muted"},{name:"muted-soft",value:"#a8acb3",role:"muted soft"},{name:"hairline",value:"#dee1e6",role:"hairline"},{name:"hairline-soft",value:"#eef0f3",role:"hairline soft"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface-soft",value:"#f7f7f7",role:"surface soft"},{name:"surface-strong",value:"#eef0f3",role:"surface strong"},{name:"surface-dark",value:"#0a0b0d",role:"surface dark"},{name:"surface-dark-elevated",value:"#16181c",role:"surface dark elevated"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-soft",value:"#a8acb3",role:"on dark soft"},{name:"semantic-up",value:"#05b169",role:"semantic up"},{name:"semantic-down",value:"#cf202f",role:"semantic down"},{name:"accent-yellow",value:"#f4b000",role:"accent yellow"}],typography:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",monoFamily:"'JetBrains Mono', 'Coinbase Mono', monospace",fontSizes:["16px","14px","72px","18px","13px","36px","12px","44px","11px","52px","28px","40px","32px","48px","26px"],fontWeights:["500","600","400","700"],lineHeights:["1.5","1.2","1.05","1.15","1.0","1.09","1","1.35","1.4"]},spacing:["4px","5px","6px","8px","10px","11px","12px","13px","14px","15px","16px","19px","20px","24px","28px","32px","40px","44px","48px","56px"],radii:["100px","24px","20px","16px","9999px","14px","12px","8px","6px","3px"],shadows:["0 16px 40px rgba(0,0,0,0.5)","0 16px 40px rgba(0,0,0,0.4)","0 4px 12px rgba(0,0,0,0.04)"]},ac={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 16px 40px rgba(0,0,0,0.5)"},header:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"16px"},trigger:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', 'Coinbase Mono', monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"16px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},lc={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"◆",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"trustworthy-financial"},ic={metadata:rc,theme:tc,tokens:nc,components:ac,personality:lc},sc={id:"figma",label:"Figma",sourcePath:"design.md/html/figma.html",sourceTitle:"Design System Inspiration of Figma",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300..700&family=JetBrains+Mono:wght@400;500&display=swap"]},cc={primary:"#F24E1E",secondary:"#A259FF",success:"#0ACF83",warning:"#FFC700",error:"#FF7262",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},dc={rawCssVars:{primary:"#000000","on-primary":"#ffffff",ink:"#000000",canvas:"#ffffff","inverse-canvas":"#000000","inverse-ink":"#ffffff",hairline:"#e6e6e6","hairline-soft":"#f1f1f1","surface-soft":"#f7f7f5","block-lime":"#dceeb1","block-lilac":"#c5b0f4","block-cream":"#f4ecd6","block-pink":"#efd4d4","block-mint":"#c8e6cd","block-coral":"#f3c9b6","block-navy":"#1f1d3d","accent-magenta":"#ff3d8b","semantic-success":"#1ea64a",sans:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",mono:"'JetBrains Mono', 'SF Mono', Menlo, monospace"},colors:[{name:"primary",value:"#F24E1E",role:"primary"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#000000",role:"ink"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"inverse-canvas",value:"#000000",role:"inverse canvas"},{name:"inverse-ink",value:"#ffffff",role:"inverse ink"},{name:"hairline",value:"#e6e6e6",role:"hairline"},{name:"hairline-soft",value:"#f1f1f1",role:"hairline soft"},{name:"surface-soft",value:"#f7f7f5",role:"surface soft"},{name:"block-lime",value:"#dceeb1",role:"block lime"},{name:"block-lilac",value:"#c5b0f4",role:"block lilac"},{name:"block-cream",value:"#f4ecd6",role:"block cream"},{name:"block-pink",value:"#efd4d4",role:"block pink"},{name:"block-mint",value:"#c8e6cd",role:"block mint"},{name:"block-coral",value:"#f3c9b6",role:"block coral"},{name:"block-navy",value:"#1f1d3d",role:"block navy"},{name:"accent-magenta",value:"#ff3d8b",role:"accent magenta"},{name:"semantic-success",value:"#1ea64a",role:"semantic success"}],typography:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",monoFamily:"'JetBrains Mono', 'SF Mono', Menlo, monospace",fontSizes:["18px","16px","80px","20px","12px","40px","14px","11px","26px","24px","32px","13px","10px","56px","36px"],fontWeights:["320","330","480","600","500","700"],lineHeights:["1.45","1.0","1.4","1.1","1.6","1.35","1","1.2"]},spacing:["5px","6px","8px","10px","12px","14px","16px","20px","22px","24px","28px","32px","36px","40px","44px","48px","56px","64px","96px","100px"],radii:["50px","8px","9999px","24px","6px","2px","3px"],shadows:["0 0 0 2px rgba(0,0,0,0.08)","none","0 4px 16px rgba(0,0,0,0.06)","0 12px 32px rgba(0,0,0,0.18)"]},uc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:8,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 2px rgba(0,0,0,0.08)"},header:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:"12px"},trigger:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:8},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', 'SF Mono', Menlo, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:8},title:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},pc={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"✦",density:"comfortable",surfaceTone:"paper",cardRadius:8,pillRadius:9999,badgeRadius:4,voice:"playful-creative"},mc={metadata:sc,theme:cc,tokens:dc,components:uc,personality:pc},gc={id:"linear",label:"Linear",sourcePath:"design.md/html/linear.html",sourceTitle:"Design System Inspiration of Linear",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400&display=swap"]},hc={primary:"#5e6ad2",secondary:"#828fff",success:"#27a644",warning:"#5e69d1",error:"#828fff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},fc={rawCssVars:{primary:"#5e6ad2","primary-hover":"#828fff","primary-focus":"#5e69d1","on-primary":"#ffffff",ink:"#f7f8f8","ink-muted":"#d0d6e0","ink-subtle":"#8a8f98","ink-tertiary":"#62666d",canvas:"#010102","surface-1":"#0f1011","surface-2":"#141516","surface-3":"#18191a","surface-4":"#191a1b",hairline:"#23252a","hairline-strong":"#34343a","hairline-tertiary":"#3e3e44","semantic-success":"#27a644",sans:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",mono:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace"},colors:[{name:"primary",value:"#5e6ad2",role:"primary"},{name:"primary-hover",value:"#828fff",role:"primary hover"},{name:"primary-focus",value:"#5e69d1",role:"primary focus"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#f7f8f8",role:"ink"},{name:"ink-muted",value:"#d0d6e0",role:"ink muted"},{name:"ink-subtle",value:"#8a8f98",role:"ink subtle"},{name:"ink-tertiary",value:"#62666d",role:"ink tertiary"},{name:"canvas",value:"#08090A",role:"canvas"},{name:"surface-1",value:"#0f1011",role:"surface 1"},{name:"surface-2",value:"#141516",role:"surface 2"},{name:"surface-3",value:"#18191a",role:"surface 3"},{name:"surface-4",value:"#191a1b",role:"surface 4"},{name:"hairline",value:"#23252a",role:"hairline"},{name:"hairline-strong",value:"#34343a",role:"hairline strong"},{name:"hairline-tertiary",value:"#3e3e44",role:"hairline tertiary"},{name:"semantic-success",value:"#27a644",role:"semantic success"}],typography:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",monoFamily:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace",fontSizes:["16px","14px","80px","18px","13px","56px","15px","12px","11px","28px","40px","22px","10px","36px"],fontWeights:["400","500","600","700"],lineHeights:["1.50","1.05","1.20","1.10","1.5","1.6","1.25","1","1.2","1.35","1.4"]},spacing:["2px","5px","6px","8px","10px","12px","14px","16px","20px","24px","28px","32px","36px","40px","48px","56px","64px","80px","96px","120px"],radii:["8px","12px","9999px","16px","4px","2px","6px","3px"],shadows:["rgba(255,255,255,0.05) 0 0.5px 0 0.5px","0 0 0 2px rgba(94,105,209,0.25)"]},yc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-on-primary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"theme-on-primary",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",letterSpacing:"-0.025em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(255,255,255,0.05) 0 0.5px 0 0.5px"},header:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.025em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.025em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.025em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.025em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.025em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},xc={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.025em",accentTreatment:"gradient",signatureMotif:"↗",density:"tight",surfaceTone:"glass",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"speed-clarity"},bc={metadata:gc,theme:hc,tokens:fc,components:yc,personality:xc},kc={id:"nike",label:"Nike",sourcePath:"design.md/html/nike.html",sourceTitle:"Design System Inspiration of Nike",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},Cc={primary:"color-black",secondary:"#FA5400",success:"#76E0B5",warning:"#1151ff",error:"#d30005",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},Sc={rawCssVars:{ink:"#111111","on-primary":"#ffffff",canvas:"#ffffff","soft-cloud":"#f5f5f5",charcoal:"#39393b",ash:"#4b4b4d",mute:"#707072",stone:"#9e9ea0",hairline:"#cacacb","hairline-soft":"#e5e5e5",sale:"#d30005","sale-deep":"#780700",success:"#007d48","success-bright":"#1eaa52",info:"#1151ff","info-deep":"#0034e3","accent-pink":"#ed1aa0","accent-pink-soft":"#ffb0dd","accent-purple-soft":"#beaffd","accent-purple-pale":"#d6d1ff","accent-teal":"#0a7281","accent-pink-deep":"#4c012d","font-display":"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif","font-ui":"'Inter', 'Helvetica Now Text Medium', Helvetica, Arial, sans-serif","font-body":"'Inter', 'Helvetica Now Text', Helvetica, Arial, sans-serif"},colors:[{name:"ink",value:"#111111",role:"ink"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"soft-cloud",value:"#f5f5f5",role:"soft cloud"},{name:"charcoal",value:"#39393b",role:"charcoal"},{name:"ash",value:"#4b4b4d",role:"ash"},{name:"mute",value:"#707072",role:"mute"},{name:"stone",value:"#9e9ea0",role:"stone"},{name:"hairline",value:"#cacacb",role:"hairline"},{name:"hairline-soft",value:"#e5e5e5",role:"hairline soft"},{name:"sale",value:"#d30005",role:"sale"},{name:"sale-deep",value:"#780700",role:"sale deep"},{name:"success",value:"#76E0B5",role:"success"},{name:"success-bright",value:"#1eaa52",role:"success bright"},{name:"info",value:"#1151ff",role:"info"},{name:"info-deep",value:"#0034e3",role:"info deep"},{name:"accent-pink",value:"#ed1aa0",role:"accent pink"},{name:"accent-pink-soft",value:"#ffb0dd",role:"accent pink soft"},{name:"accent-purple-soft",value:"#beaffd",role:"accent purple soft"},{name:"accent-purple-pale",value:"#d6d1ff",role:"accent purple pale"},{name:"accent-teal",value:"#0a7281",role:"accent teal"},{name:"accent-pink-deep",value:"#4c012d",role:"accent pink deep"}],typography:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","15px","14px","96px","18px","12px","56px","13px","11px","24px","40px","64px","48px","32px"],fontWeights:["700","500","600"],lineHeights:["1.5","0.92","1","1.4","1.6","0.9","1.2","1.75","1.7","1.35"]},spacing:["2px","4px","5px","6px","8px","10px","12px","14px","16px","18px","20px","24px","28px","30px","32px","36px","40px","44px","48px","56px"],radii:["9999px","24px","14px","6px","3px"],shadows:["0 0 0 12px var(--soft-cloud)","0 20px 30px -10px rgba(0,0,0,0.18)","0 0 0 2px var(--canvas), 0 0 0 4px var(--ink)","inset 0 -1px 0 var(--hairline-soft)"]},jc={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,borderColor:"theme-primary",letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"italic",backgroundColor:null},content:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"italic"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:800,fontStyle:"italic"},text:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 12px var(--soft-cloud)"},header:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontStyle:"italic",letterSpacing:"0.02em"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontStyle:"italic",letterSpacing:"0.02em"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{},text:{letterSpacing:"0.02em",fontStyle:"italic"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"theme-primary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"theme-secondary",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:4},thead:{backgroundColor:"theme-secondary",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"0.02em",fontStyle:"italic"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"0.02em"}}},avatar:{views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",borderRadius:4},title:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},description:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:0,views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:0},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary"}}}},wc={cornerStyle:"sharp",typeWeight:"black",typeCase:"uppercase",typeStyle:"italic",letterSpacing:"0.02em",accentTreatment:"flat",signatureMotif:"▶",density:"tight",surfaceTone:"mono",cardRadius:4,pillRadius:0,badgeRadius:0,voice:"athletic-bold"},vc={metadata:kc,theme:Cc,tokens:Sc,components:jc,personality:wc},Tc={id:"notion",label:"Notion",sourcePath:"design.md/html/notion.html",sourceTitle:"Design System Inspiration of Notion",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"]},Ic={primary:"#5645d4",secondary:"#ff64c8",success:"#1aae39",warning:"#dd5b00",error:"#ff64c8",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},Fc={rawCssVars:{primary:"#5645d4","primary-pressed":"#4534b3","primary-deep":"#3a2a99","on-primary":"#ffffff","brand-navy":"#0a1530","brand-navy-deep":"#070f24","link-blue":"#0075de","brand-pink":"#ff64c8","brand-orange":"#dd5b00","brand-purple":"#7b3ff2","brand-purple-800":"#391c57","brand-orange-deep":"#793400","brand-green":"#1aae39","brand-yellow":"#f5d75e","brand-teal":"#2a9d99","tint-peach":"#ffe8d4","tint-rose":"#fde0ec","tint-mint":"#d9f3e1","tint-lavender":"#e6e0f5","tint-sky":"#dcecfa","tint-yellow":"#fef7d6","tint-yellow-bold":"#f9e79f","tint-cream":"#f8f5e8",canvas:"#ffffff",surface:"#f6f5f4","surface-soft":"#fafaf9",hairline:"#e5e3df","hairline-soft":"#ede9e4","hairline-strong":"#c8c4be","hairline-dark":"rgba(255,255,255,0.16)","ink-deep":"#000000",ink:"#1a1a1a",charcoal:"#37352f",slate:"#5d5b54",steel:"#787671",stone:"#a4a097",muted:"#bbb8b1","on-dark":"#ffffff","on-dark-muted":"#a4a097"},colors:[{name:"primary",value:"#5645d4",role:"primary"},{name:"primary-pressed",value:"#4534b3",role:"primary pressed"},{name:"primary-deep",value:"#3a2a99",role:"primary deep"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"brand-navy",value:"#0a1530",role:"brand navy"},{name:"brand-navy-deep",value:"#070f24",role:"brand navy deep"},{name:"link-blue",value:"#0075de",role:"link blue"},{name:"brand-pink",value:"#ff64c8",role:"brand pink"},{name:"brand-orange",value:"#dd5b00",role:"brand orange"},{name:"brand-purple",value:"#7b3ff2",role:"brand purple"},{name:"brand-purple-800",value:"#391c57",role:"brand purple 800"},{name:"brand-orange-deep",value:"#793400",role:"brand orange deep"},{name:"brand-green",value:"#1aae39",role:"brand green"},{name:"brand-yellow",value:"#f5d75e",role:"brand yellow"},{name:"brand-teal",value:"#2a9d99",role:"brand teal"},{name:"tint-peach",value:"#ffe8d4",role:"tint peach"},{name:"tint-rose",value:"#fde0ec",role:"tint rose"},{name:"tint-mint",value:"#d9f3e1",role:"tint mint"},{name:"tint-lavender",value:"#e6e0f5",role:"tint lavender"},{name:"tint-sky",value:"#dcecfa",role:"tint sky"},{name:"tint-yellow",value:"#fef7d6",role:"tint yellow"},{name:"tint-yellow-bold",value:"#f9e79f",role:"tint yellow bold"},{name:"tint-cream",value:"#f8f5e8",role:"tint cream"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface",value:"#f6f5f4",role:"surface"},{name:"surface-soft",value:"#fafaf9",role:"surface soft"},{name:"hairline",value:"#e5e3df",role:"hairline"},{name:"hairline-soft",value:"#ede9e4",role:"hairline soft"},{name:"hairline-strong",value:"#c8c4be",role:"hairline strong"},{name:"hairline-dark",value:"rgba(255,255,255,0.16)",role:"hairline dark"},{name:"ink-deep",value:"#000000",role:"ink deep"},{name:"ink",value:"#1a1a1a",role:"ink"},{name:"charcoal",value:"#37352f",role:"charcoal"},{name:"slate",value:"#5d5b54",role:"slate"},{name:"steel",value:"#787671",role:"steel"},{name:"stone",value:"#a4a097",role:"stone"},{name:"muted",value:"#bbb8b1",role:"muted"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-muted",value:"#a4a097",role:"on dark muted"}],typography:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["14px","15px","12px","80px","18px","48px","16px","13px","22px","11px","56px","36px","10px","20px","28px"],fontWeights:["500","600","400","700"],lineHeights:["1.55","1","1.05","1.15","1.4","1.3","1.5","1.1","1.2","1.35"]},spacing:["2px","4px","5px","6px","8px","10px","11px","12px","14px","15px","16px","18px","20px","24px","31px","32px","40px","44px","48px","56px"],radii:["6px","8px","16px","50%","12px","9999px","4px","3px"],shadows:["rgba(15, 15, 15, 0.20) 0px 24px 48px -8px","rgba(15,15,15,0.04) 0px 1px 2px 0px","rgba(15,15,15,0.08) 0px 4px 12px 0px","rgba(15,15,15,0.20) 0px 24px 48px -8px","rgba(15,15,15,0.16) 0px 16px 48px -8px"]},Rc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,borderColor:"theme-primary",letterSpacing:"0em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",letterSpacing:"0em",textTransform:"none",fontWeight:400,fontStyle:"normal"},text:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(15, 15, 15, 0.20) 0px 24px 48px -8px"},header:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontStyle:"normal",letterSpacing:"0em"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontStyle:"normal",letterSpacing:"0em"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:10},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"0em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"0em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:10},title:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},zc={cornerStyle:"soft",typeWeight:"regular",typeCase:"normal",typeStyle:"normal",letterSpacing:"0em",accentTreatment:"flat",signatureMotif:"◇",density:"comfortable",surfaceTone:"paper",cardRadius:10,pillRadius:9999,badgeRadius:4,voice:"thoughtful-quiet"},Mc={metadata:Tc,theme:Ic,tokens:Fc,components:Rc,personality:zc},Wc={id:"revolut",label:"Revolut",sourcePath:"design.md/html/revolut.html",sourceTitle:"Design System Inspiration of Revolut",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},Hc={primary:"#1361F0",secondary:"#101D31",success:"#16a34a",warning:"#d97706",error:"#e61e49",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},Pc={rawCssVars:{primary:"#494fdf","primary-bright":"#4f55f1","primary-deep":"#3a40c4","on-primary":"#ffffff",ink:"#191c1f",body:"#1f2226",charcoal:"#3a3d40",mute:"#505a63",ash:"#5c5e60",stone:"#8d969e",faint:"#c9c9cd","on-dark":"#ffffff","on-dark-mute":"rgba(255,255,255,0.72)","canvas-light":"#ffffff","canvas-dark":"#000000","surface-soft":"#f4f4f4","surface-card":"#ffffff","surface-deep":"#0a0a0a","surface-elevated":"#16181a","hairline-light":"#e2e2e7","hairline-dark":"rgba(255,255,255,0.12)","hairline-strong":"#191c1f","divider-soft":"rgba(255,255,255,0.06)",teal:"#00a87e","light-blue":"#007bc2","blue-link":"#376cd5","light-green":"#428619","green-text":"#006400",yellow:"#b09000",warning:"#ec7e00",pink:"#e61e49",danger:"#e23b4a","deep-red":"#8b0000",brown:"#936d62","font-display":"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif","font-ui":"'Inter', system-ui, sans-serif"},colors:[{name:"primary",value:"#1361F0",role:"primary"},{name:"primary-bright",value:"#4f55f1",role:"primary bright"},{name:"primary-deep",value:"#3a40c4",role:"primary deep"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#191c1f",role:"ink"},{name:"body",value:"#1f2226",role:"body"},{name:"charcoal",value:"#3a3d40",role:"charcoal"},{name:"mute",value:"#505a63",role:"mute"},{name:"ash",value:"#5c5e60",role:"ash"},{name:"stone",value:"#8d969e",role:"stone"},{name:"faint",value:"#c9c9cd",role:"faint"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-mute",value:"rgba(255,255,255,0.72)",role:"on dark mute"},{name:"canvas-light",value:"#ffffff",role:"canvas light"},{name:"canvas-dark",value:"#000000",role:"canvas dark"},{name:"surface-soft",value:"#f4f4f4",role:"surface soft"},{name:"surface-card",value:"#ffffff",role:"surface card"},{name:"surface-deep",value:"#0a0a0a",role:"surface deep"},{name:"surface-elevated",value:"#16181a",role:"surface elevated"},{name:"hairline-light",value:"#e2e2e7",role:"hairline light"},{name:"hairline-dark",value:"rgba(255,255,255,0.12)",role:"hairline dark"},{name:"hairline-strong",value:"#191c1f",role:"hairline strong"},{name:"divider-soft",value:"rgba(255,255,255,0.06)",role:"divider soft"},{name:"teal",value:"#00a87e",role:"teal"},{name:"light-blue",value:"#007bc2",role:"light blue"},{name:"blue-link",value:"#376cd5",role:"blue link"},{name:"light-green",value:"#428619",role:"light green"},{name:"green-text",value:"#006400",role:"green text"},{name:"yellow",value:"#b09000",role:"yellow"},{name:"warning",value:"#d97706",role:"warning"},{name:"pink",value:"#e61e49",role:"pink"},{name:"danger",value:"#e23b4a",role:"danger"},{name:"deep-red",value:"#8b0000",role:"deep red"},{name:"brown",value:"#936d62",role:"brown"}],typography:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","14px","18px","12px","96px","56px","24px","13px","32px","11px","64px","44px"],fontWeights:["600","500","700"],lineHeights:["1.5","1.0","1.56","1.4","1.33","1.19","1.6","1.2","1.35"]},spacing:["4px","6px","8px","10px","12px","13px","14px","16px","20px","24px","27px","28px","32px","36px","40px","48px","56px","64px","80px","88px"],radii:["9999px","20px","28px","36px","24px","12px","3px"],shadows:[]},Vc={button:{variant:"filled",size:"md",shape:"pill",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:9999,fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",letterSpacing:"-0.02em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:20,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)"},header:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:9999},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:9999}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:20},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.02em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:20},title:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"24px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},Ac={cornerStyle:"pill",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.02em",accentTreatment:"gradient",signatureMotif:"★",density:"comfortable",surfaceTone:"glass",cardRadius:20,pillRadius:9999,badgeRadius:9999,voice:"bold-fintech"},Ec={metadata:Wc,theme:Hc,tokens:Pc,components:Vc,personality:Ac},Dc={id:"shopify",label:"Shopify",sourcePath:"design.md/html/shopify.html",sourceTitle:"Design System Inspired by Shopify",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},$c={primary:"#008060",secondary:"#202223",success:"#008060",warning:"#FFC453",error:"#D72C0D",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#FFFFFF"},Lc={rawCssVars:{white:"#FFFFFF",black:"#000000","neon-green":"#36F4A4",aloe:"#C1FBD4",pistachio:"#D4F9E0","deep-teal":"#02090A","dark-forest":"#061A1C",forest:"#102620","card-border":"#1E2C31","shade-30":"#D4D4D8",muted:"#A1A1AA","shade-50":"#71717A","shade-60":"#52525B","shade-70":"#3F3F46","light-border":"#E4E4E7","link-muted":"#9797A2","shadow-card":"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},colors:[{name:"white",value:"#FFFFFF",role:"white"},{name:"black",value:"#000000",role:"black"},{name:"neon-green",value:"#36F4A4",role:"neon green"},{name:"aloe",value:"#C1FBD4",role:"aloe"},{name:"pistachio",value:"#D4F9E0",role:"pistachio"},{name:"deep-teal",value:"#02090A",role:"deep teal"},{name:"dark-forest",value:"#061A1C",role:"dark forest"},{name:"forest",value:"#102620",role:"forest"},{name:"card-border",value:"#1E2C31",role:"card border"},{name:"shade-30",value:"#D4D4D8",role:"shade 30"},{name:"muted",value:"#A1A1AA",role:"muted"},{name:"shade-50",value:"#71717A",role:"shade 50"},{name:"shade-60",value:"#52525B",role:"shade 60"},{name:"shade-70",value:"#3F3F46",role:"shade 70"},{name:"light-border",value:"#E4E4E7",role:"light border"},{name:"link-muted",value:"#9797A2",role:"link muted"},{name:"shadow-card",value:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset",role:"shadow card"}],typography:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["20px","16px","14px","80px","48px","18px","12px","13px","11px","55px","32px","28px","24px","36px"],fontWeights:["400","600","500","330","360","550","700"],lineHeights:["1.5","0.96","1.14","1.56","1.16","1.28","1.4","1.49","1.2","1.35"]},spacing:["4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","40px","48px","64px","72px","80px","100px"],radii:["9999px","8px","4px","12px","2px","3px"],shadows:["rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset","0 0 0 2px var(--neon-green)","var(--shadow-card)","rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"]},_c={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"color-aloe",color:"color-white",borderColor:"color-aloe",borderRadius:6,fontFamily:"'Inter', Helvetica, Arial, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},header:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-muted"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-muted"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-muted",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-white",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-muted"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-white",color:"color-black"},th:{color:"color-muted",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-muted",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-muted"},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-muted"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black"}}}},Bc={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"commerce-friendly"},Oc={metadata:Dc,theme:$c,tokens:Lc,components:_c,personality:Bc},Nc={id:"spacex",label:"SpaceX",sourcePath:"design.md/html/spaceX.html",sourceTitle:"Design System Preview: SpaceX (Light)",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Share+Tech&display=swap"]},qc={primary:"color-black",secondary:"#a3a3a3",success:"#4ade80",warning:"#fbbf24",error:"#ef4444",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},Uc={rawCssVars:{black:"#000000",spectral:"#f0f0fa","ghost-bg":"rgba(240,240,250,0.1)","ghost-border":"rgba(240,240,250,0.35)",overlay:"rgba(0,0,0,0.5)",font:"'Share Tech', Arial, Verdana, sans-serif"},colors:[{name:"black",value:"#000000",role:"black"},{name:"spectral",value:"#f0f0fa",role:"spectral"},{name:"ghost-bg",value:"rgba(240,240,250,0.1)",role:"ghost bg"},{name:"ghost-border",value:"rgba(240,240,250,0.35)",role:"ghost border"},{name:"overlay",value:"rgba(0,0,0,0.5)",role:"overlay"}],typography:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","13px","12px","48px","10px","32px","11px","9px","14px"],fontWeights:["700","400","600"],lineHeights:["1.50","1.00","1.70","1.2","1.35","1.4"]},spacing:["8px","10px","12px","14px","16px","18px","20px","24px","28px","32px","48px","60px","64px","72px","80px","120px"],radii:["32px","4px","2px","3px"],shadows:[]},Gc={button:{variant:"ghost",size:"md",shape:"square",color:"theme-primary",textColor:"theme-primary",views:{container:{borderRadius:0,fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,borderColor:"color-gray-200",backgroundColor:"color-gray-50",letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"},content:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",color:"color-white",borderColor:"color-gray-50",borderRadius:0,fontFamily:"'Share Tech', Arial, Verdana, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:800,fontStyle:"normal"},text:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)"},header:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontStyle:"normal",letterSpacing:"0.06em"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontStyle:"normal",letterSpacing:"0.06em"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0.06em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"color-gray-200"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"color-gray-200"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-200"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-200",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"32px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},content:{color:"color-gray-200"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:2},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-200",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"0.06em",fontStyle:"normal"},caption:{color:"color-gray-200",fontStyle:"italic",letterSpacing:"0.06em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:2},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:0,views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:0},item:{color:"color-gray-200"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},eyebrow:{color:"color-gray-200"},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},description:{color:"color-gray-200"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},Yc={cornerStyle:"sharp",typeWeight:"black",typeCase:"uppercase",typeStyle:"normal",letterSpacing:"0.06em",accentTreatment:"glow",signatureMotif:"⚡",density:"tight",surfaceTone:"mono",cardRadius:2,pillRadius:0,badgeRadius:0,voice:"technical-mission"},Kc={metadata:Nc,theme:qc,tokens:Uc,components:Gc,personality:Yc},Xc={id:"spotify",label:"Spotify",sourcePath:"design.md/html/spotify.html",sourceTitle:"Design System Inspired by Shopify",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},Jc={primary:"#1DB954",secondary:"#C1FBD4",success:"#1DB954",warning:"#D4F9E0",error:"#D4D4D8",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#000000"},Qc={rawCssVars:{white:"#FFFFFF",black:"#000000","spotify-green":"#1DB954",aloe:"#C1FBD4",pistachio:"#D4F9E0","deep-teal":"#02090A","dark-forest":"#061A1C",forest:"#102620","card-border":"#1E2C31","shade-30":"#D4D4D8",muted:"#A1A1AA","shade-50":"#71717A","shade-60":"#52525B","shade-70":"#3F3F46","light-border":"#E4E4E7","link-muted":"#9797A2","shadow-card":"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},colors:[{name:"white",value:"#FFFFFF",role:"white"},{name:"black",value:"#000000",role:"black"},{name:"spotify-green",value:"#1DB954",role:"neon green"},{name:"aloe",value:"#C1FBD4",role:"aloe"},{name:"pistachio",value:"#D4F9E0",role:"pistachio"},{name:"deep-teal",value:"#02090A",role:"deep teal"},{name:"dark-forest",value:"#061A1C",role:"dark forest"},{name:"forest",value:"#102620",role:"forest"},{name:"card-border",value:"#1E2C31",role:"card border"},{name:"shade-30",value:"#D4D4D8",role:"shade 30"},{name:"muted",value:"#A1A1AA",role:"muted"},{name:"shade-50",value:"#71717A",role:"shade 50"},{name:"shade-60",value:"#52525B",role:"shade 60"},{name:"shade-70",value:"#3F3F46",role:"shade 70"},{name:"light-border",value:"#E4E4E7",role:"light border"},{name:"link-muted",value:"#9797A2",role:"link muted"},{name:"shadow-card",value:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset",role:"shadow card"}],typography:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["20px","16px","14px","80px","48px","18px","12px","13px","11px","55px","32px","28px","24px","36px"],fontWeights:["400","600","500","330","360","550","700"],lineHeights:["1.5","0.96","1.14","1.56","1.16","1.28","1.4","1.49","1.2","1.35"]},spacing:["4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","40px","48px","64px","72px","80px","100px"],radii:["9999px","8px","4px","12px","2px","3px"],shadows:["rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset","0 0 0 2px var(--neon-green)","var(--shadow-card)","rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"]},Zc={button:{variant:"filled",size:"md",shape:"pill",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,borderColor:"theme-primary",letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",letterSpacing:"-0.02em",textTransform:"none",fontWeight:800,fontStyle:"normal"},text:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},header:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:9999},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:9999}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:8},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.02em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:8},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},ed={cornerStyle:"pill",typeWeight:"black",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.02em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"matte",cardRadius:8,pillRadius:9999,badgeRadius:9999,voice:"rhythmic-vibrant"},od={metadata:Xc,theme:Jc,tokens:Qc,components:Zc,personality:ed},rd={id:"stripe",label:"Stripe",sourcePath:"design.md/html/stripe.html",sourceTitle:"Design System Preview: Stripe (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Code+Pro:wght@400;500;700&display=swap"]},td={primary:"#635BFF",secondary:"#f96bee",success:"#15be53",warning:"#9b6829",error:"#ea2261",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},nd={rawCssVars:{purple:"#533afd","purple-hover":"#4434d4","purple-deep":"#2e2b8c","purple-light":"#b9b9f9","purple-mid":"#665efd",navy:"#061b31","dark-navy":"#0d253d","brand-dark":"#1c1e54",white:"#ffffff",ruby:"#ea2261",magenta:"#f96bee","magenta-light":"#ffd7ef",success:"#15be53","success-text":"#108c3d",lemon:"#9b6829",slate:"#64748d","dark-slate":"#273951",border:"#e5edf5","border-purple":"#b9b9f9","border-soft":"#d6d9fc","shadow-blue":"rgba(50,50,93,0.25)","shadow-dark-blue":"rgba(3,3,39,0.25)","shadow-black":"rgba(0,0,0,0.1)","shadow-ambient":"rgba(23,23,23,0.08)","shadow-soft":"rgba(23,23,23,0.06)","shadow-card":"rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px","shadow-ambient-card":"rgba(23,23,23,0.08) 0px 15px 35px 0px","shadow-subtle":"rgba(23,23,23,0.06) 0px 3px 6px 0px","font-primary":"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif","font-mono":"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace"},colors:[{name:"purple",value:"#533afd",role:"purple"},{name:"purple-hover",value:"#4434d4",role:"purple hover"},{name:"purple-deep",value:"#2e2b8c",role:"purple deep"},{name:"purple-light",value:"#b9b9f9",role:"purple light"},{name:"purple-mid",value:"#665efd",role:"purple mid"},{name:"navy",value:"#061b31",role:"navy"},{name:"dark-navy",value:"#0d253d",role:"dark navy"},{name:"brand-dark",value:"#1c1e54",role:"brand dark"},{name:"white",value:"#ffffff",role:"white"},{name:"ruby",value:"#ea2261",role:"ruby"},{name:"magenta",value:"#f96bee",role:"magenta"},{name:"magenta-light",value:"#ffd7ef",role:"magenta light"},{name:"success",value:"#15be53",role:"success"},{name:"success-text",value:"#108c3d",role:"success text"},{name:"lemon",value:"#9b6829",role:"lemon"},{name:"slate",value:"#64748d",role:"slate"},{name:"dark-slate",value:"#273951",role:"dark slate"},{name:"border",value:"#e5edf5",role:"border"},{name:"border-purple",value:"#b9b9f9",role:"border purple"},{name:"border-soft",value:"#d6d9fc",role:"border soft"},{name:"shadow-blue",value:"rgba(50,50,93,0.25)",role:"shadow blue"},{name:"shadow-dark-blue",value:"rgba(3,3,39,0.25)",role:"shadow dark blue"},{name:"shadow-black",value:"rgba(0,0,0,0.1)",role:"shadow black"},{name:"shadow-ambient",value:"rgba(23,23,23,0.08)",role:"shadow ambient"},{name:"shadow-soft",value:"rgba(23,23,23,0.06)",role:"shadow soft"},{name:"shadow-card",value:"rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px",role:"shadow card"},{name:"shadow-ambient-card",value:"rgba(23,23,23,0.08) 0px 15px 35px 0px",role:"shadow ambient card"},{name:"shadow-subtle",value:"rgba(23,23,23,0.06) 0px 3px 6px 0px",role:"shadow subtle"}],typography:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",monoFamily:"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace",fontSizes:["16px","14px","48px","18px","12px","32px","13px","11px","10px","22px"],fontWeights:["100 900","300","400","500","700","600"],lineHeights:["1.40","1.15","1.10","1.50","1.2","1.35","1.4"]},spacing:["1px","6px","8px","10px","12px","14px","16px","20px","24px","28px","32px","48px","64px","72px","80px","96px"],radii:["0 0 6px 6px","4px","6px","2px","3px"],shadows:["rgba(50,50,93,0.25)","rgba(3,3,39,0.25)","rgba(0,0,0,0.1)","rgba(23,23,23,0.08)","rgba(23,23,23,0.06)","rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px","rgba(23,23,23,0.08) 0px 15px 35px 0px","rgba(23,23,23,0.06) 0px 3px 6px 0px","var(--shadow-subtle)","var(--shadow-card)","0 0 0 1px theme-primary","0 0 0 1px var(--ruby)"]},ad={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",letterSpacing:"-0.022em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(23,23,23,0.06) 0px 3px 6px 0px"},header:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.022em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"4px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-white",color:"color-black",borderRadius:"6px"},trigger:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-white",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.022em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.022em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"6px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"6px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black"}}}},ld={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.022em",accentTreatment:"gradient",signatureMotif:"↗",density:"comfortable",surfaceTone:"glass",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"refined-fintech"},id={metadata:rd,theme:td,tokens:nd,components:ad,personality:ld},sd={id:"tesla",label:"Tesla",sourcePath:"design.md/html/tesla.html",sourceTitle:"Design System Inspired by Tesla",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap"]},cd={primary:"#3E6AE1",secondary:"#171A20",success:"#3E6AE1",warning:"#5C5E62",error:"#171A20",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#FFFFFF"},dd={rawCssVars:{"electric-blue":"#3E6AE1","pure-white":"#FFFFFF","carbon-dark":"#171A20",graphite:"#393C41",pewter:"#5C5E62","silver-fog":"#8E8E8E","cloud-gray":"#EEEEEE","pale-silver":"#D0D1D2","light-ash":"#F4F4F4","frosted-glass":"rgba(255,255,255,0.75)",overlay:"rgba(128,128,128,0.65)","subtle-shadow":"rgba(0,0,0,0.05)","font-display":"'Inter', -apple-system, Arial, sans-serif","font-text":"'Inter', -apple-system, Arial, sans-serif"},colors:[{name:"electric-blue",value:"#3E6AE1",role:"electric blue"},{name:"pure-white",value:"#FFFFFF",role:"pure white"},{name:"carbon-dark",value:"#171A20",role:"carbon dark"},{name:"graphite",value:"#393C41",role:"graphite"},{name:"pewter",value:"#5C5E62",role:"pewter"},{name:"silver-fog",value:"#8E8E8E",role:"silver fog"},{name:"cloud-gray",value:"#EEEEEE",role:"cloud gray"},{name:"pale-silver",value:"#D0D1D2",role:"pale silver"},{name:"light-ash",value:"#F4F4F4",role:"light ash"},{name:"frosted-glass",value:"rgba(255,255,255,0.75)",role:"frosted glass"},{name:"overlay",value:"rgba(128,128,128,0.65)",role:"overlay"},{name:"subtle-shadow",value:"rgba(0,0,0,0.05)",role:"subtle shadow"}],typography:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["14px","40px","28px","13px","12px","11px","17px","16px"],fontWeights:["400","500","700","600"],lineHeights:["1.43","48px","20px","1.2","1.3","36px","1.35","1.4"]},spacing:["4px","6px","8px","10px","12px","14px","16px","20px","24px","32px","40px","48px","56px","60px","64px","80px","100px"],radii:["4px","4px 4px 0 0","0 0 4px 4px","12px","3px"],shadows:["rgba(0,0,0,0.05)","0 1px 0 var(--pewter)"]},ud={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,borderColor:"theme-primary",letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'Inter', -apple-system, Arial, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:300,fontStyle:"normal"},text:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:0,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.05)"},header:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontStyle:"normal",letterSpacing:"0.02em"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontStyle:"normal",letterSpacing:"0.02em"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"theme-warning"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"theme-warning"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"theme-warning"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"theme-warning",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', -apple-system, Arial, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"4px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:0},trigger:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},content:{color:"theme-warning"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:0},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"theme-warning",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"0.02em",fontStyle:"normal"},caption:{color:"theme-warning",fontStyle:"italic",letterSpacing:"0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:0},title:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"4px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:0},item:{color:"theme-warning"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},eyebrow:{color:"theme-warning"},title:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},description:{color:"theme-warning"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},pd={cornerStyle:"sharp",typeWeight:"light",typeCase:"uppercase",typeStyle:"normal",letterSpacing:"0.02em",accentTreatment:"flat",signatureMotif:"▲",density:"spacious",surfaceTone:"mono",cardRadius:0,pillRadius:0,badgeRadius:0,voice:"futurist-clean"},md={metadata:sd,theme:cd,tokens:dd,components:ud,personality:pd},gd={id:"uber",label:"Uber",sourcePath:"design.md/html/uber.html",sourceTitle:"Design System Preview: Uber (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,700&display=swap"]},hd={primary:"color-black",secondary:"#efefef",success:"#06C167",warning:"#e2e2e2",error:"#000000",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},fd={rawCssVars:{"color-black":"#000000","color-white":"#ffffff","color-hover-gray":"#e2e2e2","color-hover-light":"#f3f3f3","color-chip-gray":"#efefef","color-body-gray":"#4b4b4b","color-muted-gray":"#afafaf","shadow-card":"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px","shadow-medium":"rgba(0, 0, 0, 0.16) 0px 4px 16px 0px","shadow-float":"rgba(0, 0, 0, 0.16) 0px 2px 8px 0px","shadow-press":"rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset","font-display":"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif","font-body":"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif","bg-page":"#ffffff","bg-card":"#ffffff","bg-nav":"rgba(255,255,255,0.92)","text-primary":"#000000","text-secondary":"#4b4b4b","text-tertiary":"#afafaf","border-color":"#efefef","section-label-color":"#000000"},colors:[{name:"color-black",value:"#000000",role:"color black"},{name:"color-white",value:"#ffffff",role:"color white"},{name:"color-hover-gray",value:"#e2e2e2",role:"color hover gray"},{name:"color-hover-light",value:"#f3f3f3",role:"color hover light"},{name:"color-chip-gray",value:"#efefef",role:"color chip gray"},{name:"color-body-gray",value:"#4b4b4b",role:"color body gray"},{name:"color-muted-gray",value:"#afafaf",role:"color muted gray"},{name:"shadow-card",value:"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px",role:"shadow card"},{name:"shadow-medium",value:"rgba(0, 0, 0, 0.16) 0px 4px 16px 0px",role:"shadow medium"},{name:"shadow-float",value:"rgba(0, 0, 0, 0.16) 0px 2px 8px 0px",role:"shadow float"},{name:"shadow-press",value:"rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset",role:"shadow press"},{name:"bg-page",value:"#ffffff",role:"bg page"},{name:"bg-card",value:"#ffffff",role:"bg card"},{name:"bg-nav",value:"rgba(255,255,255,0.92)",role:"bg nav"},{name:"text-primary",value:"#000000",role:"text primary"},{name:"text-secondary",value:"#4b4b4b",role:"text secondary"},{name:"text-tertiary",value:"#afafaf",role:"text tertiary"},{name:"border-color",value:"#efefef",role:"border color"},{name:"section-label-color",value:"#000000",role:"section label color"}],typography:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","18px","14px","64px","20px","12px","36px","13px","24px","28px"],fontWeights:["700","500","400","600"],lineHeights:["1.50","1.10","1.22","1.33","2.0","1.2","1.35","1.4"]},spacing:["8px","10px","12px","14px","16px","20px","24px","28px","32px","36px","40px","50px","60px","64px","80px","100px","120px","140px"],radii:["8px","999px","12px","16px","4px","3px"],shadows:["rgba(0, 0, 0, 0.12) 0px 4px 16px 0px","rgba(0, 0, 0, 0.16) 0px 4px 16px 0px","rgba(0, 0, 0, 0.16) 0px 2px 8px 0px","rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset","var(--shadow-card)","var(--shadow-float)","var(--shadow-medium)","0 0 0 1px color-black","rgba(0,0,0,0.12) 0px 4px 16px 0px","rgba(0,0,0,0.16) 0px 4px 16px 0px","rgba(0,0,0,0.16) 0px 2px 8px 0px","rgba(0,0,0,0.08) 0px 0px 0px 999px inset"]},yd={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px"},header:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"theme-warning"},content:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},footer:{borderColor:"theme-warning"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"theme-warning",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"theme-warning",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-warning"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"theme-warning"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"theme-warning"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"theme-primary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"theme-warning",backgroundColor:"color-white",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"theme-warning",borderRadius:4},thead:{backgroundColor:"color-white",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"theme-warning",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"theme-warning"},td:{color:"theme-primary",borderColor:"theme-warning",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",borderRadius:4},title:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"theme-warning",radius:"8px",views:{container:{backgroundColor:"theme-warning",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"theme-warning",views:{container:{borderColor:"theme-warning"},label:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:0},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"theme-warning"},surface:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary"}}}},xd={cornerStyle:"sharp",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"▶",density:"tight",surfaceTone:"mono",cardRadius:4,pillRadius:0,badgeRadius:0,voice:"motion-utility"},bd={metadata:gd,theme:hd,tokens:fd,components:yd,personality:xd},kd={id:"vercel",label:"Vercel",sourcePath:"design.md/html/vercel.html",sourceTitle:"Design System Preview: Vercel (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap"]},Cd={primary:"color-black",secondary:"#0072f5",success:"#0a72ef",warning:"#de1d8d",error:"#ff5b4f",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},Sd={rawCssVars:{black:"#171717",white:"#ffffff","gray-50":"#fafafa","gray-100":"#ebebeb","gray-400":"#808080","gray-500":"#666666","gray-600":"#4d4d4d","link-blue":"#0072f5","focus-blue":"hsl(212,100%,48%)","ship-red":"#ff5b4f","preview-pink":"#de1d8d","develop-blue":"#0a72ef","console-blue":"#0070f3","console-purple":"#7928ca","console-pink":"#eb367f","badge-bg":"#ebf5ff","badge-text":"#0068d6","shadow-ring":"rgba(0,0,0,0.08) 0px 0px 0px 1px","shadow-ring-light":"rgb(235,235,235) 0px 0px 0px 1px","shadow-subtle":"rgba(0,0,0,0.04) 0px 2px 2px 0px","shadow-card":"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px","shadow-card-full":"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px","font-sans":"'Geist', system-ui, -apple-system, Arial, sans-serif","font-mono":"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace"},colors:[{name:"black",value:"#171717",role:"black"},{name:"white",value:"#ffffff",role:"white"},{name:"gray-50",value:"#fafafa",role:"gray 50"},{name:"gray-100",value:"#ebebeb",role:"gray 100"},{name:"gray-400",value:"#808080",role:"gray 400"},{name:"gray-500",value:"#666666",role:"gray 500"},{name:"gray-600",value:"#4d4d4d",role:"gray 600"},{name:"link-blue",value:"#0072f5",role:"link blue"},{name:"focus-blue",value:"hsl(212,100%,48%)",role:"focus blue"},{name:"ship-red",value:"#ff5b4f",role:"ship red"},{name:"preview-pink",value:"#de1d8d",role:"preview pink"},{name:"develop-blue",value:"#0a72ef",role:"develop blue"},{name:"console-blue",value:"#0070f3",role:"console blue"},{name:"console-purple",value:"#7928ca",role:"console purple"},{name:"console-pink",value:"#eb367f",role:"console pink"},{name:"badge-bg",value:"#ebf5ff",role:"badge bg"},{name:"badge-text",value:"#0068d6",role:"badge text"},{name:"shadow-ring",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px",role:"shadow ring"},{name:"shadow-ring-light",value:"rgb(235,235,235) 0px 0px 0px 1px",role:"shadow ring light"},{name:"shadow-subtle",value:"rgba(0,0,0,0.04) 0px 2px 2px 0px",role:"shadow subtle"},{name:"shadow-card",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px",role:"shadow card"},{name:"shadow-card-full",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px",role:"shadow card full"}],typography:{fontFamily:"var(--font-sans)",monoFamily:"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace",fontSizes:["16px","14px","48px","20px","12px","32px","13px","11px","10px","36px"],fontWeights:["400","600","500","700"],lineHeights:["1.50","1.00","1.80","1.25","1.2","1.35","1.4"]},spacing:["2px","4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","48px","64px","72px","80px","96px"],radii:["6px","8px","9999px","3px"],shadows:["rgba(0,0,0,0.08) 0px 0px 0px 1px","rgb(235,235,235) 0px 0px 0px 1px","rgba(0,0,0,0.04) 0px 2px 2px 0px","rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px","rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px","var(--shadow-ring)","var(--shadow-ring-light)","var(--shadow-card)","var(--shadow-card-full)","0 0 0 2px var(--focus-blue)","0 0 0 2px var(--ship-red)"]},jd={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:4,fontFamily:"var(--font-sans)",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"var(--font-sans)",letterSpacing:"-0.04em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"var(--font-sans)",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},header:{color:"theme-primary",fontFamily:"var(--font-sans)",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"var(--font-sans)"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)",fontStyle:"normal",letterSpacing:"-0.04em"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)",fontStyle:"normal",letterSpacing:"-0.04em"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.04em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"var(--font-sans)"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"6px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:"6px"},trigger:{color:"theme-primary",fontFamily:"var(--font-sans)"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:4},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"-0.04em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.04em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"var(--font-sans)"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:4},title:{color:"theme-primary",fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"var(--font-sans)"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"var(--font-sans)"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"6px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"var(--font-sans)"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"6px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"var(--font-sans)"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"var(--font-sans)"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"var(--font-sans)"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},wd={cornerStyle:"sharp",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.04em",accentTreatment:"flat",signatureMotif:"▲",density:"comfortable",surfaceTone:"mono",cardRadius:4,pillRadius:4,badgeRadius:4,voice:"deploy-geometric"},vd={metadata:kd,theme:Cd,tokens:Sd,components:jd,personality:wd},Vt={airbnb:Ks,apple:oc,coinbase:ic,figma:mc,linear:bc,nike:vc,notion:Mc,revolut:Ec,shopify:Oc,spacex:Kc,spotify:od,stripe:id,tesla:md,uber:bd,vercel:vd},Td=Object.values(Vt),za=Os,Jo=e=>!!e&&typeof e=="object"&&!Array.isArray(e)&&Object.prototype.toString.call(e)==="[object Object]",At=e=>e,De=(...e)=>{const o={};return e.forEach(t=>{Jo(t)&&Object.entries(t).forEach(([n,a])=>{if(a!=null){if(Jo(a)&&Jo(o[n])){o[n]=De(o[n],a);return}o[n]=a}})}),o},Ma=e=>{if(Array.isArray(e)||!Jo(e))return e;const o={};for(const[t,n]of Object.entries(e))n!==null&&(o[t]=Jo(n)?Ma(n):n);return o},Et=(e,o)=>{if(!o)return{};const t=o.components[e]||{};return At(Ma(t))},Wa=(e,o,t)=>{const{config:n,...a}=o,i=Et(e,t),s=De(i,n||{});return At(De(s,a))},Ha=p.createContext({isEnabled:!1}),Dt=({children:e,config:o,configId:t,mode:n})=>{const a=o||(t?Vt[t]:null)||za,{themeMode:i}=l.useTheme(),s=n??i??a.metadata.defaultAppearance,c=p.useMemo(()=>({config:a,configId:a.metadata.id,isEnabled:!0}),[a]);return r.jsx(Ha.Provider,{value:c,children:r.jsx(l.ThemeProvider,{theme:a.theme,mode:s,transparentWrapper:!0,children:r.jsx("div",{"data-design-system":a.metadata.id,"data-appearance":s,style:{display:"contents"},children:e})})})},Vr=()=>p.useContext(Ha),Po=e=>{const{config:o}=Vr();return Et(e,o)},ge=(e,o)=>{const{config:t}=Vr();return Wa(e,o,t)},Pa=p.createContext({expandedItems:[],toggleItem:()=>{},isItemExpanded:()=>!1,type:"single",collapsible:!1,baseId:""}),Id=({children:e,value:o})=>r.jsx(Pa.Provider,{value:o,children:e}),Va=()=>{const e=p.useContext(Pa);if(!e)throw new Error("useAccordionContext must be used within an AccordionProvider");return e},Fd=({value:e,children:o,isDisabled:t=!1,views:n,...a})=>{var h;const{isItemExpanded:i,baseId:s}=Va(),c=Po("accordion"),d=De({item:(h=c.views)==null?void 0:h.container},n),u=i(e),m=`${s}-trigger-${e}`,g=`${s}-content-${e}`;return r.jsx(l.View,{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",overflow:"hidden",opacity:t?.5:1,pointerEvents:t?"none":"auto","data-state":u?"open":"closed","data-disabled":t?"":void 0,...d==null?void 0:d.item,...a,children:p.Children.map(o,f=>p.isValidElement(f)?p.cloneElement(f,{...f.props,value:e,isExpanded:u,isDisabled:t,triggerId:m,contentId:g}):f)})},Rd=({children:e,value:o,isExpanded:t,isDisabled:n,triggerId:a,contentId:i,views:s,asChild:c=!1,...d})=>{var y;const{toggleItem:u}=Va(),m=Po("accordion"),g=De({container:(y=m.views)==null?void 0:y.trigger},s),f={id:a,"aria-expanded":t,"aria-controls":i,"aria-disabled":n,"data-state":t?"open":"closed","data-disabled":n?"":void 0,onClick:()=>{o&&!n&&u(o)},padding:16,cursor:n?"not-allowed":"pointer",alignItems:"center",justifyContent:"space-between",width:"100%",style:{backgroundColor:"transparent"},...g==null?void 0:g.container,...d};if(c&&p.isValidElement(e)){const b=p.Children.only(e);return p.cloneElement(b,{...f,...b.props})}return r.jsxs(l.Horizontal,{...f,children:[e,r.jsx(l.View,{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",transform:t?"rotate(180deg)":"rotate(0deg)",...g==null?void 0:g.icon,children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M16.59 8.59L12 13.17L7.41 8.59L6 10L12 16L18 10L16.59 8.59Z",fill:"currentColor"})})})]})},zd=({children:e,isExpanded:o,isDisabled:t,triggerId:n,contentId:a,views:i,...s})=>{var j;const c=Po("accordion"),d=De({container:(j=c.views)==null?void 0:j.content},i),u=260,m=p.useRef(null),g=p.useRef(null),[h,f]=p.useState(!!o),[y,b]=p.useState(o?"none":"0px"),[k,C]=p.useState(o?1:0);return p.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]),p.useEffect(()=>{var S;if(g.current&&(clearTimeout(g.current),g.current=null),o){f(!0),requestAnimationFrame(()=>{var v;const x=((v=m.current)==null?void 0:v.scrollHeight)??0;b(`${x}px`),C(1)});return}const w=((S=m.current)==null?void 0:S.scrollHeight)??0;b(`${w}px`),C(1),requestAnimationFrame(()=>{b("0px"),C(0)}),g.current=setTimeout(()=>{f(!1)},u)},[o,e]),p.useEffect(()=>{var S;if(!o||!h)return;const w=((S=m.current)==null?void 0:S.scrollHeight)??0;b(`${w}px`)},[e,o,h]),h?r.jsx(l.View,{id:a,role:"region","aria-labelledby":n,overflow:"hidden",maxHeight:y,opacity:k,transition:`max-height ${u}ms cubic-bezier(0.22, 1, 0.36, 1), opacity ${u}ms ease`,"data-state":o?"open":"closed","data-disabled":t?"":void 0,style:{backgroundColor:"transparent"},...d==null?void 0:d.container,...s,children:r.jsx(l.View,{ref:m,padding:16,children:e})}):null},Md=({children:e,shape:o="rounded",variant:t="default",views:n,baseId:a,type:i,collapsible:s,themeMode:c,...d})=>r.jsx(l.Vertical,{width:"100%","data-orientation":"vertical",...As[o],...Es[t],...n==null?void 0:n.container,...d,children:e}),Wd=e=>{const o=ge("accordion",e),{children:t,type:n="single",value:a,defaultValue:i,onValueChange:s,collapsible:c=!1,shape:d="rounded",variant:u="default",views:m,...g}=o,h=Array.isArray(i)?i:i?[i]:void 0,f=Vs({type:n,value:a,defaultValue:i??h,onValueChange:s,collapsible:c});return r.jsx(Id,{value:{expandedItems:f.expandedItems,toggleItem:f.toggleItem,isItemExpanded:f.isItemExpanded,type:f.type,collapsible:f.collapsible,baseId:f.baseId},children:r.jsx(Md,{shape:d,variant:u,views:m,baseId:f.baseId,type:f.type,collapsible:f.collapsible,...g,children:t})})},Me=Wd;Me.Item=Fd;Me.Trigger=Rd;Me.Content=zd;const Hd=({isOpen:e,defaultOpen:o=!1,value:t,defaultValue:n,isMulti:a=!1,onOpenChange:i,onClose:s})=>{const c=typeof e=="boolean",d=t!==void 0,u=n??(a?[]:""),[m,g]=p.useState(o),[h,f]=p.useState(u),y=c?!!e:m,b=d?t:h,k=p.useCallback(w=>{c||g(w),i==null||i(w),w||s==null||s()},[c,s,i]),C=p.useCallback(()=>{k(!1)},[k]),j=p.useCallback(w=>{d||f(w)},[d]);return{isSheetOpen:y,selectedValue:b,setSelectedValue:j,closeSheet:C}},$t=({children:e,containerId:o="portal-root"})=>{const[t,n]=p.useState(null);return p.useEffect(()=>{let a=document.getElementById(o),i=!1;return a||(i=!0,a=document.createElement("div"),a.setAttribute("id",o),document.body.appendChild(a)),n(a),()=>{i&&a&&a.parentNode&&a.childNodes.length===0&&a.parentNode.removeChild(a)}},[o]),t?Ps.createPortal(e,t):null},et=new Map,Pd=(e,o,t)=>(et.has(e)||et.set(e,p.lazy(()=>import("lucide-react/dynamicIconImports").then(n=>{const a=n.default[e];return a?a():{default:()=>r.jsx(r.Fragment,{children:o||t})}}))),et.get(e)),Fn=p.memo(({widthHeight:e,color:o="currentColor",transform:t,orientation:n="up",children:a,...i})=>r.jsx(l.View,{widthHeight:e,color:o,display:"flex",alignItems:"center",justifyContent:"center",transform:t||(n==="left"?"rotate(-90deg)":n==="right"?"rotate(90deg)":n==="up"?"rotate(0deg)":n==="down"?"rotate(180deg)":"none"),...i,children:a})),vr=p.memo(({name:e="circle",widthHeight:o=24,color:t="currentColor",filled:n=!1,strokeWidth:a=1,size:i,children:s,fallback:c,...d})=>{const{getColor:u}=l.useTheme(),m=i||o,g=p.useMemo(()=>{const y=u(t);return{fill:n?y:"none",stroke:y,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round"}},[n,t,a,u]);if(!e)return r.jsx(Fn,{widthHeight:o,color:t,...d,children:s});const h=e.toLowerCase().replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),f=Pd(h,c,s);return r.jsx(Fn,{widthHeight:m,color:t,...d,children:r.jsx(p.Suspense,{fallback:c||null,children:r.jsx(f,{size:m,...g})})})}),q=(e,o={})=>{const t=n=>r.jsx(vr,{name:e,...o,...n});return t.displayName=`${e}Icon`,t},Vd=q("user",{filled:!1}),Ad=q("circle-help",{filled:!1}),Ed=q("folder",{filled:!1}),ce=q("chevron-up",{filled:!1}),Dd=q("grip-vertical",{filled:!1}),ao=q("file",{filled:!1}),$d=q("video",{filled:!1}),Ld=q("image",{filled:!1}),Ro=q("volume",{filled:!1}),_d=q("twitter",{filled:!1}),Bd=q("x",{filled:!1}),Od=q("twitch",{filled:!1}),Te=q("x",{filled:!1,strokeWidth:2}),Nd=q("instagram",{filled:!1}),qd=q("youtube",{filled:!1}),Ud=q("facebook",{filled:!1}),Gd=q("linkedin",{filled:!1}),Yd=q("at-sign",{filled:!1}),Aa=q("minus",{filled:!1}),Ye=q("info",{filled:!1}),Ea=q("play",{filled:!1}),Kd=q("pause",{filled:!1}),Xd=q("heart",{filled:!1}),Jd=q("star",{filled:!1}),Qd=q("save",{filled:!1}),Lt=q("triangle-alert",{filled:!1}),Zd=q("battery",{filled:!1}),eu=q("bookmark",{filled:!1}),ou=q("cloud",{filled:!1}),ru=q("copy",{filled:!1}),Ar=q("trash",{filled:!1}),tu=Ar,nu=q("edit",{filled:!1}),_t=q("mic",{filled:!1}),Er=q("square",{filled:!1}),Bt=q("send",{filled:!1}),Ot=q("loader",{filled:!1}),er=q("paperclip",{filled:!1}),Tr=q("search",{filled:!1}),au=q("home",{filled:!1}),Da=q("settings",{filled:!1}),lu=q("download",{filled:!1}),$a=q("share",{filled:!1}),or=q("check",{filled:!1}),iu=q("plus",{filled:!1}),Nt=q("eye-off",{filled:!1}),qt=q("eye",{filled:!1}),su=q("lock",{filled:!1}),cu=q("user",{filled:!1}),La=q("external-link",{filled:!1}),Ut=q("check-circle",{filled:!1}),Dr=q("alert-circle",{filled:!1}),du=q("bell",{filled:!1}),uu=q("file-text",{filled:!1}),pu=q("bar-chart",{filled:!1}),mu=q("moon",{filled:!1}),_a=q("panel-left",{filled:!1}),Gt=q("upload",{filled:!1}),gu=or,hu=e=>r.jsx(ce,{orientation:"left",...e}),fu=q("zoom-out",{filled:!1}),yu=q("type",{filled:!1}),xu=q("shapes",{filled:!1}),bu=q("rotate-cw",{filled:!1}),ku=q("gift",{filled:!1}),Cu=q("shield",{filled:!1}),Su=q("log-out",{filled:!1}),ju=q("power",{filled:!1}),wu=q("link",{filled:!1}),vu=q("layout",{filled:!1}),Tu=q("zap",{filled:!1}),Iu=q("credit-card",{filled:!1}),Fu=q("more-horizontal",{filled:!1}),Ru=Ar,zu=q("filter",{filled:!1}),Mu=q("calendar",{filled:!1}),Wu=q("clock",{filled:!1}),Hu=q("map-pin",{filled:!1}),Pu=q("menu",{filled:!1}),Vu=q("refresh-cw",{filled:!1}),Au=q("printer",{filled:!1}),Eu=q("wand",{filled:!1}),Du=q("thumbs-down",{filled:!1}),$u=q("thumbs-up",{filled:!1}),Lu=q("camera",{filled:!1}),_u=q("bluetooth",{filled:!1}),Bu=q("unlock",{filled:!1}),Ou=q("wifi",{filled:!1}),Nu=q("arrow-right",{filled:!1}),qu=q("arrow-up",{filled:!1}),Uu=q("loader",{filled:!1}),Gu=q("sliders-horizontal",{filled:!1}),Yu=q("crop",{filled:!1}),Ku=q("zoom-in",{filled:!1}),Xu=q("grip-horizontal",{filled:!1}),Ba=q("mouse-pointer-2",{filled:!1}),Ju={sm:{minHeight:44,paddingVertical:10,paddingHorizontal:16},md:{minHeight:52,paddingVertical:12,paddingHorizontal:18},lg:{minHeight:60,paddingVertical:14,paddingHorizontal:20}},fo={sm:{label:14,description:12},md:{label:16,description:13},lg:{label:18,description:14}},Rn=(e,o)=>e.id??e.value??`action-sheet-item-${o}`,Oa=e=>e.value??e.id,zn=e=>e.disabled||e.isDisabled||e.divider,Qu=(e,o)=>{if(typeof e.selected=="boolean")return e.selected;const t=Oa(e);return t?Array.isArray(o)?o.includes(t):o===t:!1},Zu=({isSheetOpen:e,closeSheet:o,selectedValue:t,setSelectedValue:n,isClosePrevented:a=!1,dismissOnBackdropPress:i=!0,title:s,description:c,header:d,children:u,items:m=[],isMulti:g=!1,closeOnSelect:h,onSelect:f,onChange:y,showCancel:b=!1,cancelLabel:k="Cancel",onCancel:C,showHandle:j=!0,size:w="md",maxHeight:S="88vh",views:x,animationType:v,...T})=>{if(!e)return null;const R=()=>{a||o()},M=()=>{i&&R()},E=()=>{C==null||C(),R()},I=V=>{var F;if(zn(V))return;const P=Oa(V);let z=t;if(P){if(g){const H=Array.isArray(t)?t:t?[t]:[];z=H.includes(P)?H.filter(D=>D!==P):[...H,P]}else z=P;n(z),f==null||f(P,V),y==null||y(z,V)}(F=V.onPress)==null||F.call(V,V),(V.closeOnSelect??h??!g)&&R()};return r.jsx($t,{children:r.jsx(l.View,{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:9999,backgroundColor:"color-blackAlpha-500",display:"flex",justifyContent:"flex-end",onClick:M,...x==null?void 0:x.overlay,children:r.jsxs(l.Vertical,{width:"100%",maxWidth:520,maxHeight:S,marginHorizontal:"auto",backgroundColor:"color-white",borderTopLeftRadius:24,borderTopRightRadius:24,paddingTop:8,paddingBottom:12,overflow:"hidden",boxShadow:"0 -18px 48px rgba(15, 23, 42, 0.18)",onClick:V=>V.stopPropagation(),...x==null?void 0:x.container,...x==null?void 0:x.sheet,...T,children:[j&&r.jsx(l.View,{width:36,height:4,borderRadius:999,backgroundColor:"color-gray-300",alignSelf:"center",marginTop:4,marginBottom:8,...x==null?void 0:x.handle}),(s||c)&&r.jsxs(l.Vertical,{paddingHorizontal:20,paddingTop:6,paddingBottom:12,gap:4,...x==null?void 0:x.header,children:[s&&r.jsx(l.Text,{fontSize:18,lineHeight:24,fontWeight:"600",color:"color-gray-900",...x==null?void 0:x.title,children:s}),c&&r.jsx(l.Text,{fontSize:13,lineHeight:18,color:"color-gray-500",...x==null?void 0:x.description,children:c})]}),d,r.jsxs(l.Vertical,{overflowY:"auto",paddingBottom:4,...x==null?void 0:x.content,children:[m.map((V,P)=>{if(V.divider)return r.jsx(l.View,{height:1,backgroundColor:"color-gray-200",marginVertical:6,...x==null?void 0:x.divider},Rn(V,P));const z=Qu(V,t),W=zn(V),F=W?"color-gray-400":V.destructive?"color-red-600":z?"theme-primary":"color-gray-900";return r.jsxs(l.Horizontal,{alignItems:"center",gap:12,opacity:W?.5:1,cursor:W?"not-allowed":"pointer",onClick:()=>I(V),...Ju[w],...x==null?void 0:x.item,children:[V.icon&&r.jsx(l.View,{flexShrink:0,...x==null?void 0:x.itemIcon,children:V.icon}),r.jsxs(l.Vertical,{flex:1,gap:2,children:[typeof V.label=="string"?r.jsx(l.Text,{fontSize:fo[w].label,lineHeight:fo[w].label+6,fontWeight:z?"600":"400",color:F,...x==null?void 0:x.itemLabel,children:V.label}):V.label,V.description&&r.jsx(l.Text,{fontSize:fo[w].description,lineHeight:fo[w].description+5,color:"color-gray-500",...x==null?void 0:x.itemDescription,children:V.description})]}),z&&r.jsx(or,{widthHeight:18,color:"theme-primary",...x==null?void 0:x.itemIndicator})]},Rn(V,P))}),u]}),b&&r.jsx(l.View,{marginTop:8,paddingHorizontal:12,paddingTop:8,borderTopWidth:1,borderTopColor:"color-gray-200",children:r.jsx(l.Horizontal,{minHeight:52,alignItems:"center",justifyContent:"center",borderRadius:14,backgroundColor:"color-gray-100",cursor:"pointer",onClick:E,...x==null?void 0:x.cancelButton,children:r.jsx(l.Text,{fontSize:fo[w].label,lineHeight:fo[w].label+6,fontWeight:"600",color:"color-gray-900",...x==null?void 0:x.cancelLabel,children:k})})})]})})})},ep=e=>{const o=Hd(e);return r.jsx(Zu,{...e,...o})},op=ep,rp=e=>{const o=e==="dark";return{default:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",boxShadow:o?"0 1px 3px rgba(0, 0, 0, 0.3)":"0 1px 2px rgba(0, 0, 0, 0.05)"},content:{color:"color-gray-700"},icon:{color:"color-gray-500"}},info:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:o?"0 1px 3px rgba(29, 78, 216, 0.25)":"0 1px 2px rgba(59, 130, 246, 0.05)"},content:{color:"color-blue-700"},icon:{color:"color-blue-500"}},success:{container:{backgroundColor:"color-green-50",borderColor:"color-green-200",boxShadow:o?"0 1px 3px rgba(34, 197, 94, 0.2)":"0 1px 2px rgba(34, 197, 94, 0.05)"},content:{color:"color-green-700"},icon:{color:"color-green-500"}},error:{container:{backgroundColor:"color-red-50",borderColor:"color-red-200",boxShadow:o?"0 1px 3px rgba(239, 68, 68, 0.2)":"0 1px 2px rgba(239, 68, 68, 0.05)"},content:{color:"color-red-700"},icon:{color:"color-red-500"}},warning:{container:{backgroundColor:"color-orange-50",borderColor:"color-orange-200",boxShadow:o?"0 1px 3px rgba(249, 115, 22, 0.2)":"0 1px 2px rgba(249, 115, 22, 0.05)"},content:{color:"color-orange-700"},icon:{color:"color-orange-500"}}}},tp=p.memo(({icon:e,title:o="",views:t,description:n="",variant:a="default",themeMode:i,children:s,...c})=>{const{themeMode:d}=l.useTheme(),u=i||d,m=p.useMemo(()=>rp(u),[u]),g=()=>{var y;if(e)return e;const f={size:20,color:((y=t==null?void 0:t.icon)==null?void 0:y.color)??m[a].icon.color};switch(a){case"info":return r.jsx(Ye,{...f});case"success":return r.jsx(Ut,{...f});case"error":return r.jsx(Dr,{...f});case"warning":default:return r.jsx(Lt,{...f})}};return r.jsxs(l.Horizontal,{gap:12,padding:"12px 16px",flexWrap:"nowrap",alignItems:"flex-start",borderRadius:"8px",borderWidth:"1px",borderStyle:"solid",borderColor:m[a].container.borderColor,backgroundColor:m[a].container.backgroundColor,boxShadow:m[a].container.boxShadow,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...t==null?void 0:t.container,...c,children:[r.jsx(l.View,{alignSelf:"flex-start",marginTop:"2px",...t==null?void 0:t.icon,children:g()}),r.jsxs(l.Vertical,{gap:4,children:[o?r.jsx(l.Text,{fontSize:"14px",fontWeight:"600",lineHeight:"20px",color:m[a].content.color,...t==null?void 0:t.title,children:o}):null,r.jsx(l.Text,{fontSize:"12px",fontWeight:"400",lineHeight:"16px",color:m[a].content.color,...t==null?void 0:t.description,children:n||s})]})]})}),np=e=>{const o=ge("alert",e);return r.jsx(tp,{...o})},Yt=np,ap=({ratio:e=16/9,children:o,views:t,...n})=>r.jsx(l.View,{width:"100%",position:"relative",overflow:"hidden",paddingTop:`${1/e*100}%`,borderRadius:8,...n,...t==null?void 0:t.center,children:r.jsx(l.View,{position:"absolute",top:0,right:0,bottom:0,left:0,...t==null?void 0:t.view,children:o})}),lp=({ratio:e,children:o,...t})=>r.jsx(ap,{ratio:e,...t,children:o}),Na=lp;function ip(e,o,t){return Math.min(Math.max(e,o),t)}const sp=({bars:e,isPaused:o,...t})=>{const a=[6,16,23,24,18,9,14,22,24,20,11,12,20,24,21,13,9,19,24,23,16,7,17,23,23,18,8,15,22,24,20,10];return r.jsx(l.Horizontal,{alignItems:"center",minWidth:120,gap:2,height:24,width:"100%",maxWidth:"100%",...t,children:e.map((i,s)=>r.jsx(l.View,{width:3,borderRadius:2,backgroundColor:o?"color-gray-300":i>=0?"theme-primary":"color-gray-300",style:{height:`${i>=0?ip(i*300,6,24):a[s%a.length]}px`}},s))})},Kt=({analyserNode:e,isPaused:o,...t})=>{const n=p.useRef(null),a=60,i=32,[s,c]=p.useState([]);return p.useEffect(()=>{if(!e){c(Array(a).fill(-1));return}const d=e.frequencyBinCount,u=new Uint8Array(d),m=()=>{e.getByteTimeDomainData(u);let g=0;for(let f=0;f<d;f++){const y=(u[f]-128)/128;g+=y*y}const h=Math.sqrt(g/d);p.startTransition(()=>{c(f=>{const b=[...f,h].slice(-a);return b.length<a?[...Array(a-b.length).fill(-1),...b]:b})})};return n.current=setInterval(m,i),()=>{n.current&&clearInterval(n.current)}},[e]),r.jsx(sp,{bars:s,isPaused:o,...t})},$r=Ho.create(e=>({visible:!1,title:"",subtitle:"",variant:"info",isClosable:!1,views:{},action:()=>{},actionText:"",showIcon:!1,timeout:3e3,show:(o,t="",n="",a,i,s,c,d,u)=>e({visible:!0,variant:o,title:t,subtitle:n,isClosable:a,views:i,action:s,actionText:c,showIcon:d,timeout:u}),hide:()=>e({visible:!1})})),qa=(e,o,t,n)=>{$r.getState().show(e,o,t,n==null?void 0:n.isClosable,n==null?void 0:n.views,n==null?void 0:n.action,n==null?void 0:n.actionText,n==null?void 0:n.showIcon,n==null?void 0:n.timeout)},Ua=()=>{$r.getState().hide()},cp={info:{container:{backgroundColor:"color-white",border:"rgba(191, 219, 254, 0.95)"},icon:{color:"theme-primary",name:"InformationIcon"},content:{color:"color-gray-900"},close:{color:"color-gray-500",name:"CloseIcon"}},success:{container:{backgroundColor:"#F0FDF4",border:"#BBF7D0"},icon:{color:"#16A34A",name:"SuccessIcon"},content:{color:"#14532D"},close:{color:"#15803D",name:"CloseIcon"}},error:{container:{backgroundColor:"#FEF2F2",border:"#FECACA"},icon:{color:"#DC2626",name:"ErrorIcon"},content:{color:"#7F1D1D"},close:{color:"#B91C1C",name:"CloseIcon"}},warning:{container:{backgroundColor:"#FFF7ED",border:"#FED7AA"},icon:{color:"#EA580C",name:"WarningIcon"},content:{color:"#9A3412"},close:{color:"#C2410C",name:"CloseIcon"}}},Ga=({variant:e,hide:o,title:t,subtitle:n,theme:a,action:i,actionText:s,showIcon:c=!1,isClosable:d=!1,timeout:u=3e3,views:m})=>{var C,j;p.useEffect(()=>{if(u&&!d){const w=setTimeout(()=>{o()},u);return()=>{clearTimeout(w)}}},[]);const g=a??cp,h=!!(i&&s),f={borderWidth:1,borderStyle:"solid",borderRadius:12,borderColor:`${g[e].container.border}`,boxShadow:"0 8px 24px rgba(15, 23, 42, 0.06)"},y={info:"#3b82f6",success:"#4ade80",warning:"#f97316",error:"#ef4444"}[e],b={info:r.jsx(Ye,{widthHeight:24,color:y,...m==null?void 0:m.icon}),success:r.jsx(Ut,{widthHeight:24,color:y,...m==null?void 0:m.icon}),warning:r.jsx(Lt,{widthHeight:24,color:y,...m==null?void 0:m.icon}),error:r.jsx(Dr,{widthHeight:24,color:y,...m==null?void 0:m.icon})}[e],k=c&&b;return r.jsxs(l.Horizontal,{role:"messageContent",gap:12,width:"100%",maxWidth:520,flexWrap:"nowrap",position:"relative",alignItems:"flex-start",padding:"12px 14px",color:`${g[e].content.color}`,backgroundColor:`${g[e].container.backgroundColor}`,onClick:d?()=>{}:()=>{o()},...f,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...m==null?void 0:m.container,children:[k&&b,r.jsxs(l.Vertical,{gap:4,width:"100%",children:[r.jsx(l.Text,{size:"md",weight:"semiBold",...m==null?void 0:m.title,children:t}),n&&r.jsx(l.Text,{size:"sm",lineHeight:"20px",color:g[e].content.color,...m==null?void 0:m.subtitle,children:n})]}),h&&r.jsx(l.View,{as:"button",type:"button",onClick:i,backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:g[e].container.border,borderRadius:"9999px",padding:"6px 12px",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",...m==null?void 0:m.actionText,children:r.jsx(l.Text,{whiteSpace:"nowrap",size:"sm",weight:"semiBold",color:g[e].content.color,children:s})}),d&&r.jsx(l.View,{position:"absolute",zIndex:1e4,right:8,top:8,onClick:()=>{o()},cursor:"pointer",padding:"4px",borderRadius:"9999px",transition:"background-color 0.2s ease",...(C=m==null?void 0:m.closingIcon)==null?void 0:C.container,children:r.jsx(Te,{widthHeight:16,color:g[e].close.color,...(j=m==null?void 0:m.closingIcon)==null?void 0:j.icon})})]})},dp=({container:e,theme:o,position:t="topRight"})=>{const{visible:n,title:a,variant:i,subtitle:s,isClosable:c,views:d,action:u,actionText:m,showIcon:g,timeout:h}=$r(),f={topLeft:{top:6,left:8},topRight:{top:6,right:8},bottomLeft:{bottom:8,left:6},bottomRight:{bottom:8,right:6}}[t],y=()=>r.jsx(Ga,{variant:i,subtitle:s,show:n,title:a,theme:o,isClosable:c,views:d,action:u,actionText:m,showIcon:g,timeout:h,hide:()=>Ua()}),b=e?p.cloneElement(e,{},y()):r.jsx(l.View,{position:"absolute",zIndex:1e4,...f,children:y()});return n?b:null},up=(e,o)=>{const t=document.createElement("video");t.preload="metadata",t.onloadedmetadata=()=>{t.currentTime=1},t.oncanplay=()=>{const n=document.createElement("canvas");n.width=t.videoWidth,n.height=t.videoHeight;const a=n.getContext("2d");if(a){a.drawImage(t,0,0,n.width,n.height);const i=n.toDataURL("image/jpeg");o(i)}URL.revokeObjectURL(t.src)},t.src=URL.createObjectURL(e)},pp=({maxSize:e=100*1024*1024,onFileSelect:o,onMultipleFileSelect:t,validateFile:n,thumbnail:a,multiple:i=!1,onError:s=c=>{qa("error","Error",c)}})=>{const c=p.useRef(null),d=p.useRef(null),[u,m]=p.useState(null),[g,h]=p.useState([]),[f,y]=p.useState(null),[b,k]=p.useState(null),[C,j]=p.useState(a||null),w=p.useCallback(x=>{const v=x.target.files;if(y(null),!v||v.length===0){s("No file selected"),y("No file selected");return}if(i){const T=Array.from(v),R=[];for(const M of T){if(M.size>e){s(`File ${M.name} exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File ${M.name} exceeds ${Math.round(e/(1024*1024))}MB.`);continue}if(n){const E=n(M);if(E){s(`${M.name}: ${E}`),y(`${M.name}: ${E}`);continue}}R.push(M)}R.length>0&&(h(R),t&&t(R))}else{const T=v[0];if(T.size>e){s(`File exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File exceeds ${Math.round(e/(1024*1024))}MB.`);return}if(n){const R=n(T);if(R){s(R),y(R);return}}k(URL.createObjectURL(T)),T.type.startsWith("video/")&&up(T,j),o&&(m(T),o(T))}},[e,o,t,n,i]),S=()=>{const x=c.current;x&&typeof x.click=="function"&&x.click()};return p.useEffect(()=>()=>{typeof URL<"u"&&typeof URL.revokeObjectURL=="function"&&(b&&URL.revokeObjectURL(b),C&&URL.revokeObjectURL(C))},[b,C]),{previewUrl:b,thumbnailUrl:C,errorMessage:f,fileInputRef:c,videoRef:d,selectedFile:u,selectedFiles:g,handleFileChange:w,handleClick:S}},mp=({accept:e,isLoading:o=!1,progress:t=0,icon:n,text:a,previewUrl:i,thumbnailUrl:s,errorMessage:c,fileInputRef:d,videoRef:u,selectedFile:m,selectedFiles:g,handleFileChange:h,handleClick:f,multiple:y=!1,containerProps:b,errorMessageProps:k,progressProps:C,videoProps:j,imageProps:w,iconProps:S,textProps:x,fileType:v,previewUrl:T,renderError:R=({errorMessage:W,errorMessageProps:F,themeMode:H})=>r.jsx(l.Text,{color:"red",fontSize:12,marginTop:8,...F,...z==null?void 0:z.text,children:W}),renderText:M=({text:W,textProps:F})=>r.jsx(l.Text,{marginTop:8,...F,...z==null?void 0:z.text,children:W}),renderFile:E=({selectedFile:W,textProps:F})=>W?r.jsxs(l.Center,{marginTop:8,gap:10,flexDirection:"column",...z==null?void 0:z.container,children:[r.jsx(l.Text,{maxLines:2,...F,...z==null?void 0:z.text,children:W.name}),r.jsxs(l.Text,{...F,...z==null?void 0:z.text,children:["(",Math.round(W.size/1024)," KB)"]})]}):null,renderVideo:I=({selectedFile:W,videoRef:F,videoProps:H})=>r.jsx(l.View,{width:"100%",height:"100%",position:"relative",...z==null?void 0:z.view,children:r.jsx(l.View,{as:"video",width:"100%",height:"100%",src:W?URL.createObjectURL(W):void 0,style:{objectFit:"cover"},ref:F,...H,...z==null?void 0:z.view})}),renderImage:V=({previewUrl:W,imageProps:F})=>(console.log("Rendering image with URL:",W),r.jsx(l.View,{width:"100%",height:"100%",position:"relative",...z==null?void 0:z.view,children:r.jsx(l.Image,{src:W,alt:"Preview",width:"100%",height:"100%",objectFit:"cover",style:{maxHeight:"100%",maxWidth:"100%"},...F,...z==null?void 0:z.image})})),renderProgress:P=({progress:W,progressProps:F})=>r.jsxs(l.Horizontal,{gap:8,alignItems:"center",...F,...z==null?void 0:z.horizontal,children:[r.jsx(l.View,{height:4,backgroundColor:"color-black-100",width:"100%",borderRadius:2,...z==null?void 0:z.view,children:r.jsx(l.View,{height:4,width:`${W}%`,borderRadius:2,backgroundColor:"color-dark-50",...z==null?void 0:z.view})}),r.jsxs(l.Text,{fontSize:12,...z==null?void 0:z.text,children:[W,"%"]})]}),views:z={}})=>{const W=T||i;return r.jsxs(l.Center,{onClick:f,cursor:"pointer",border:"1px solid color-black-100",borderRadius:8,padding:16,flexDirection:"column",overflow:"hidden",position:"relative",height:m&&t===100?"200px":"auto",...b,...z==null?void 0:z.container,children:[t===100&&v==="image"&&W&&V({previewUrl:W,imageProps:w}),t===100&&v==="video"&&s&&I({selectedFile:m,thumbnailUrl:s,videoRef:u,videoProps:j,imageProps:w}),t===100&&v==="file"&&m&&E({selectedFile:m,textProps:x}),t<100&&(n||r.jsx(Gt,{widthHeight:32,...S})),!o&&!m&&a&&M({text:a,textProps:x}),o&&P({progress:t,progressProps:C}),!o&&c&&R({errorMessage:c,errorMessageProps:k}),r.jsx(l.Input,{type:"file",ref:d,onChange:h,accept:e,multiple:y,style:{display:"none"},...z==null?void 0:z.view})]})},Lr=({accept:e="*/*",icon:o,text:t,maxSize:n,onFileSelect:a,onMultipleFileSelect:i,validateFile:s,isLoading:c=!1,progress:d=0,fileType:u,multiple:m=!1,...g})=>{const{previewUrl:h,thumbnailUrl:f,errorMessage:y,videoRef:b,fileInputRef:k,selectedFile:C,selectedFiles:j,handleFileChange:w,handleClick:S}=pp({maxSize:n,onFileSelect:a,onMultipleFileSelect:i,validateFile:s,multiple:m}),v=(()=>{if(u)return u;if(C)return C.type.startsWith("image/")?"image":C.type.startsWith("video/")?"video":"file"})();return r.jsx(mp,{handleClick:S,accept:e,isLoading:c,progress:d,icon:o,text:t,maxSize:n,onFileSelect:a,validateFile:s,errorMessage:y,handleFileChange:w,selectedFile:C,selectedFiles:j,videoRef:b,fileInputRef:k,previewUrl:h,thumbnailUrl:f,fileType:v,multiple:m,...g})};function gp(e){const o=Math.floor(e/60),t=e%60;return`${o}:${t.toString().padStart(2,"0")}`}function hp({onAudio:e,recording:o,paused:t,audioBlob:n,analyserNode:a,duration:i,error:s,startRecording:c,stopRecording:d,pauseRecording:u,resumeRecording:m,resetRecording:g,handleFileChange:h,...f}){const[y,b]=p.useState(null);p.useEffect(()=>{if(n){const j=URL.createObjectURL(n);return b({url:j,label:`recording-${Date.now()}.webm`}),()=>{URL.revokeObjectURL(j)}}return()=>{}},[n]);const k=()=>{y!=null&&y.url&&URL.revokeObjectURL(y.url),b(null),g()},C=j=>{e(j),y!=null&&y.url&&URL.revokeObjectURL(y.url),b({url:URL.createObjectURL(j),label:j.name})};return r.jsxs(l.Vertical,{gap:"10px",width:"100%",...f,children:[r.jsxs(l.Horizontal,{gap:12,alignItems:"center",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[r.jsx(Lr,{accept:"audio/*",icon:r.jsx(er,{widthHeight:16}),maxSize:100*1024*1024,onFileSelect:C,fileType:"file",multiple:!1,renderError:({errorMessage:j})=>null,views:{container:{width:"36px",height:"36px",cursor:"pointer",border:"1px solid color-gray-200",borderRadius:"10px",backgroundColor:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:"color-gray-50",borderColor:"color-gray-300"}}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"10px",width:"36px",height:"36px"},validateFile:j=>j.size>100*1024*1024?"File size exceeds 100MB limit":j.type.startsWith("audio/")?null:"Only audio files are allowed"}),r.jsx(l.View,{as:"button",type:"button",onClick:o?d:c,width:"36px",height:"36px",minWidth:"36px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"theme-primary",color:"color-white",borderRadius:"999px",border:"0",cursor:"pointer",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.92},children:o?r.jsx(Er,{widthHeight:14,color:"color-white",filled:!1}):r.jsx(_t,{widthHeight:18,color:"color-white",filled:!1})}),r.jsx(l.View,{flex:1,minWidth:120,children:r.jsx(Kt,{analyserNode:o?a:null,isPaused:!o||t})}),r.jsx(l.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",whiteSpace:"nowrap",children:gp(i)})]}),y&&!o&&r.jsxs(l.Vertical,{gap:"8px",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[r.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:8,children:[r.jsx(l.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:y.label}),r.jsx(l.View,{as:"button",type:"button",onClick:k,width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",border:"0",backgroundColor:"transparent",color:"color-gray-500",cursor:"pointer",children:r.jsx(Te,{widthHeight:14,color:"currentColor"})})]}),r.jsx(l.View,{as:"audio",controls:!0,src:y.url,width:"100%"})]}),s&&r.jsx(l.Text,{fontSize:"11px",lineHeight:"16px",color:"color-red-500",children:s})]})}function Ya(){const[e,o]=p.useState(!1),[t,n]=p.useState(!1),[a,i]=p.useState(0),[s,c]=p.useState(null),[d,u]=p.useState(null),[m,g]=p.useState(null),h=p.useRef(null),f=p.useRef(null),y=p.useRef(null),b=p.useRef(null),k=p.useRef([]),C=p.useRef(null),j=typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":"audio/webm",w=p.useCallback(()=>{h.current&&(h.current.state!=="inactive"&&h.current.stop(),h.current=null),b.current&&(b.current.getTracks().forEach(M=>M.stop()),b.current=null),f.current&&(f.current.close(),f.current=null),y.current&&(y.current.disconnect(),y.current=null),u(null),C.current&&(clearInterval(C.current),C.current=null)},[]),S=p.useCallback(async()=>{w(),c(null),i(0),k.current=[];try{const M=await navigator.mediaDevices.getUserMedia({audio:!0});b.current=M;const E=MediaRecorder.isTypeSupported(j)?j:void 0,I=new MediaRecorder(M,E?{mimeType:E}:void 0);h.current=I;const V=new(window.AudioContext||window.webkitAudioContext);f.current=V;const P=V.createMediaStreamSource(M),z=V.createAnalyser();z.fftSize=256,z.smoothingTimeConstant=.8,P.connect(z),y.current=z,u(z),I.ondataavailable=W=>{W.data.size>0&&k.current.push(W.data)},I.onstop=()=>{const W=new Blob(k.current,{type:I.mimeType||j});g(W),w()},I.start(),o(!0),n(!1),C.current=setInterval(()=>{i(W=>W+1)},1e3)}catch{c("Microphone access denied or unavailable."),w()}},[w]),x=p.useCallback(()=>{h.current&&h.current.state!=="inactive"&&h.current.stop(),o(!1),n(!1),C.current&&(clearInterval(C.current),C.current=null)},[]),v=p.useCallback(()=>{h.current&&h.current.state==="recording"&&(h.current.pause(),n(!0),C.current&&(clearInterval(C.current),C.current=null))},[]),T=p.useCallback(()=>{h.current&&h.current.state==="paused"&&(h.current.resume(),n(!1),C.current||(C.current=setInterval(()=>{i(M=>M+1)},1e3)))},[]),R=p.useCallback(()=>{w(),o(!1),n(!1),g(null),i(0),c(null),k.current=[]},[w]);return p.useEffect(()=>()=>w(),[w]),{recording:e,paused:t,audioBlob:m,analyserNode:d,duration:a,error:s,startRecording:S,stopRecording:x,pauseRecording:v,resumeRecording:T,resetRecording:R}}function fp(e){const{onAudio:o}=e,{recording:t,paused:n,audioBlob:a,analyserNode:i,duration:s,error:c,startRecording:d,stopRecording:u,pauseRecording:m,resumeRecording:g,resetRecording:h}=Ya();return p.useEffect(()=>{if(a&&o){const y=new File([a],"recording.webm",{type:a.type||"audio/webm;codecs=opus"});o(y)}},[a,o]),{recording:t,paused:n,audioBlob:a,analyserNode:i,duration:s,error:c,startRecording:d,stopRecording:u,pauseRecording:m,resumeRecording:g,resetRecording:h,handleFileChange:y=>{var k;const b=(k=y.target.files)==null?void 0:k[0];b&&o&&o(b)}}}function yp(e){const o=fp(e);return r.jsx(hp,{...e,...o})}const xp=()=>{const[e,o]=p.useState(!1);return{imageError:e,setImageError:o}},bp={xs:24,sm:32,md:44,lg:56,xl:72},ot={container:{borderRadius:"50%",overflow:"hidden",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"theme-primary",transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},fallback:{fontWeight:"600",color:"color-white",letterSpacing:"-0.02em"},image:{objectFit:"cover",transition:"opacity 0.2s ease"}},kp=({src:e,size:o="md",fallback:t="IM",views:n,imageError:a,setImageError:i,onClick:s=()=>{},children:c})=>{const d=bp[o],u={...ot.image,...(n==null?void 0:n.image)||{}};return r.jsxs(l.Center,{role:"avatar",width:d,height:d,...ot.container,borderColor:a?"color-gray-400":"transparent",onClick:s,...n==null?void 0:n.container,children:[!a&&e?r.jsx(l.Image,{alt:"IM",src:e,style:u,width:d,height:d,onError:()=>i(!0)}):r.jsx(l.Text,{size:o,...ot.fallback,...n==null?void 0:n.fallback,children:t}),c]})},Cp=e=>{const o=ge("avatar",e),{src:t,size:n,views:a,fallback:i,onClick:s,children:c}=o,{imageError:d,setImageError:u}=xp();return r.jsx(kp,{src:t,size:n,views:a,fallback:i,imageError:d,setImageError:u,onClick:s,children:c})},Ka=Cp,Sp={xs:{minWidth:"16px",height:"16px",padding:"0 4px",fontSize:"9px",fontWeight:"600",lineHeight:"12px",letterSpacing:"-0.01em"},sm:{minWidth:"20px",height:"20px",padding:"0 6px",fontSize:"10px",fontWeight:"600",lineHeight:"14px",letterSpacing:"-0.01em"},md:{minWidth:"24px",height:"24px",padding:"0 8px",fontSize:"12px",fontWeight:"600",lineHeight:"16px",letterSpacing:"-0.01em"},lg:{minWidth:"28px",height:"28px",padding:"0 10px",fontSize:"14px",fontWeight:"600",lineHeight:"20px",letterSpacing:"-0.01em"},xl:{minWidth:"32px",height:"32px",padding:"0 12px",fontSize:"16px",fontWeight:"600",lineHeight:"24px",letterSpacing:"-0.01em"}},jp={xs:{gap:"6px",padding:"3px 8px 3px 3px"},sm:{gap:"8px",padding:"4px 10px 4px 4px"},md:{gap:"12px",padding:"6px 16px 6px 6px"},lg:{gap:"12px",padding:"7px 18px 7px 7px"},xl:{gap:"14px",padding:"8px 20px 8px 8px"}},wp={xs:{padding:"2px 6px",fontSize:"9px",lineHeight:"12px"},sm:{padding:"3px 8px",fontSize:"10px",lineHeight:"14px"},md:{padding:"6px 12px",fontSize:"11px",lineHeight:"14px"},lg:{padding:"7px 14px",fontSize:"12px",lineHeight:"16px"},xl:{padding:"8px 16px",fontSize:"13px",lineHeight:"18px"}},Mn={xs:{fontSize:"11px",lineHeight:"14px"},sm:{fontSize:"12px",lineHeight:"16px"},md:{fontSize:"13px",lineHeight:"18px"},lg:{fontSize:"14px",lineHeight:"20px"},xl:{fontSize:"15px",lineHeight:"22px"}},vp={square:0,rounded:"8px",pill:"9999px"},Tp={"top-right":{top:"4px",right:"4px",position:"absolute"},"top-left":{top:"4px",left:"4px",position:"absolute"},"bottom-right":{bottom:"4px",right:"4px",position:"absolute"},"bottom-left":{bottom:"4px",left:"4px",position:"absolute"}},Ip=e=>({display:"inline-flex",height:"auto",minWidth:"auto",backgroundColor:"color-white-600",color:"color-gray-900",borderWidth:"1px",borderStyle:"solid",borderColor:"color-white",backdropFilter:"blur(12px)",boxShadow:"0 1px 2px rgba(15, 23, 42, 0.08)",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",_hover:{backgroundColor:"color-white-800",boxShadow:"0 2px 8px rgba(15, 23, 42, 0.1)"}}),Fp=e=>({filled:{backgroundColor:"theme-primary",color:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.9},_active:{opacity:.95}},outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary",color:"theme-primary",style:{backgroundColor:"transparent"},transition:"border-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.9},_active:{opacity:.95}},link:{borderWidth:0,borderStyle:"none",borderColor:"theme-primary",color:"theme-primary",textDecoration:"underline",style:{backgroundColor:"transparent",textUnderlineOffset:"2px",textDecorationThickness:"1px"},transition:"opacity 0.2s ease",_hover:{opacity:.8}},ghost:{color:"color-gray-500",borderWidth:0,borderStyle:"solid",borderColor:"color-gray-500",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:"color-gray-100"}}}),Xa=e=>({default:{indicator:{backgroundColor:"color-gray-400"},label:{color:"inherit"}},info:{indicator:{backgroundColor:"color-blue-500"},label:{color:"inherit"}},success:{indicator:{backgroundColor:"color-green-500"},label:{color:"inherit"}},warning:{indicator:{backgroundColor:"color-orange-500"},label:{color:"inherit"}},error:{indicator:{backgroundColor:"color-red-500"},label:{color:"inherit"}}}),Rp=p.memo(({content:e,children:o,icon:t,pastil:n,pastilContent:a,action:i,position:s,shape:c="pill",variant:d="filled",size:u="md",views:m,themeMode:g,...h})=>{const{themeMode:f}=l.useTheme(),y=g||f,b=p.useMemo(()=>Fp()[d],[y,d]),k=p.useMemo(()=>Ip(),[y]),C=p.useMemo(()=>Xa(),[y]),j=a!=null,w=i!=null,S=j||w,x=o??e,v=x!=null,T=p.useMemo(()=>{const M={width:"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"6px",borderRadius:vp[c],...Sp[u],...b,...S?jp[u]:{},...S?k:{},...s?Tp[s]:{},...m==null?void 0:m.container};return d!=="filled"&&!S&&(b.color!==void 0&&(M.color=b.color),b.borderColor!==void 0&&(M.borderColor=b.borderColor),b.backgroundColor!==void 0&&(M.backgroundColor=b.backgroundColor),b&&b.style&&(M.style={...M.style||{},...b.style})),M},[c,u,d,b,S,k,s,m==null?void 0:m.container]);let R="currentColor";return typeof n=="string"?n in C?R=C[n].indicator.backgroundColor:R=n:n===!0&&(R="color-green-500",d==="filled"&&(R="color-white")),r.jsxs(l.Center,{role:"badge",...T,...h,children:[t&&r.jsx(l.View,{role:"badge-icon",...m==null?void 0:m.icon,children:t}),j&&r.jsx(l.Text,{role:"badge-pastil-content",backgroundColor:"color-gray-900",borderRadius:"9999px",color:"color-white",fontWeight:"700",letterSpacing:0,textTransform:"uppercase",whiteSpace:"nowrap",...wp[u],...m==null?void 0:m.pastilContent,children:a}),n&&r.jsx(l.View,{role:"badge-pastil",width:"6px",height:"6px",borderRadius:"50%",backgroundColor:R,...m==null?void 0:m.pastil}),v&&r.jsx(l.Text,{role:"badgeText",color:S?"color-gray-900":T.color,fontWeight:S?"700":"600",textAlign:"center",letterSpacing:S?0:"0.02em",whiteSpace:S?"nowrap":void 0,...S?Mn[u]:{},...m==null?void 0:m.text,children:x}),w&&r.jsx(l.Text,{role:"badge-action",color:"color-gray-400",fontWeight:"500",letterSpacing:0,whiteSpace:"nowrap",...Mn[u],...m==null?void 0:m.action,children:i})]})}),Ce=e=>{const o=ge("badge",e);return r.jsx(Rp,{...o})},zp={xs:12,sm:14,md:16,lg:18,xl:20},Mp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Xt=p.forwardRef(({children:e,href:o,iconSize:t="sm",underline:n="default",isExternal:a=!1,views:i={},to:s,isHovered:c,setIsHovered:d,_hover:u,...m},g)=>r.jsxs(l.Element,{as:"a",ref:g,href:o,display:"inline-flex",gap:3,alignItems:"center",flexWrap:"nowrap",color:"inherit",textDecoration:n==="underline"?"underline":"none",_hover:n==="hover"?{textDecoration:"underline",...u}:u,...a?{target:"_blank",rel:"noopener noreferrer"}:{},...i.text,...m,children:[e,a&&r.jsx(La,{widthHeight:zp[t]})]}));Xt.displayName="LinkAnchor";const Ja=p.forwardRef(({to:e="/",onClick:o,...t},n)=>{const a=yt.useHref(e),i=yt.useNavigate(),s=c=>{o==null||o(c),!(c.defaultPrevented||c.button!==0||t.target&&t.target!=="_self"||c.metaKey||c.altKey||c.ctrlKey||c.shiftKey)&&(c.preventDefault(),i(e))};return r.jsx(Xt,{...t,to:e,href:a,onClick:s,ref:n})});Ja.displayName="RouterLinkAnchor";const Qa=p.forwardRef((e,o)=>{const t=yt.useInRouterContext(),{href:n,to:a="/",isExternal:i}=e;return t&&!i&&n==null&&!Mp.test(a)?r.jsx(Ja,{...e,ref:o}):r.jsx(Xt,{...e,href:n??a,ref:o})});Qa.displayName="LinkView";const Za=p.forwardRef((e,o)=>r.jsx(Qa,{ref:o,...e}));Za.displayName="Link";const Jt=Za,Qt={xs:14,sm:18,md:22,lg:26,xl:30},Zt={fast:50,normal:100,slow:300},Wp=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Hp=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:i,themeMode:s}=l.useTheme(),c=i(t,{themeMode:n||s}),d=typeof e=="number"?e:Qt[e],[u,m]=p.useState(0);return p.useEffect(()=>{const g=setInterval(()=>{m(h=>h+45)},Zt[o]);return()=>clearInterval(g)},[o]),r.jsxs(l.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",width:`${d}px`,height:`${d}px`,viewBox:"0 0 24 24",fill:"none",stroke:c,strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:`rotate(${u}deg)`},...a,children:[r.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),r.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("g",{id:"SVGRepo_iconCarrier",children:r.jsx("path",{d:"M21 12a9 9 0 11-6.219-8.56"})})]})},Pp=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:i,themeMode:s}=l.useTheme(),c=i(t,{themeMode:n||s}),d=typeof e=="number"?e:Qt[e],[u,m]=p.useState(0);return p.useEffect(()=>{const g=setInterval(()=>{m(h=>h+45)},Zt[o]);return()=>clearInterval(g)},[o]),r.jsxs(l.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${d}px`,height:`${d}px`,style:{transform:`rotate(${u}deg)`},...a,children:[r.jsx("circle",{cx:"10",cy:"25",r:"4",fill:c}),r.jsx("circle",{cx:"25",cy:"25",r:"4",fill:c}),r.jsx("circle",{cx:"40",cy:"25",r:"4",fill:c})]})},Vp=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:i,themeMode:s}=l.useTheme(),c=i(t,{themeMode:n||s}),d=typeof e=="number"?e:Qt[e],[u,m]=p.useState(0);return p.useEffect(()=>{const g=setInterval(()=>{m(h=>h+45)},Zt[o]);return()=>clearInterval(g)},[o]),r.jsx(l.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${d}px`,height:`${d}px`,style:{transform:`rotate(${u}deg)`},...a,children:r.jsx("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:c,strokeWidth:"5",strokeDasharray:"1,10"})})},Ap=({size:e,children:o,textColor:t,loaderColor:n,type:a="default",speed:i="normal",textPosition:s="right",views:c,...d})=>{const{getColor:u}=l.useTheme(),m=f=>Wp(f)?f:u(f||"theme-loading");n=m(n||d.color||"theme-loading"),t=m(t||d.color||"theme-loading");const g={size:e,speed:i,color:n},h={default:r.jsx(Hp,{...g}),dotted:r.jsx(Pp,{...g}),quarter:r.jsx(Vp,{...g})};return r.jsxs(l.Center,{gap:10,flexDirection:s==="top"||s==="bottom"?"column":"row",...d,...c==null?void 0:c.container,children:[(s==="left"||s==="top")&&o&&r.jsx(l.View,{color:t,...c==null?void 0:c.text,children:o}),h[a],(s==="right"||s==="bottom")&&o&&r.jsx(l.View,{color:t,...c==null?void 0:c.text,children:o})]})},Ep=e=>{const o=ge("loader",e);return r.jsx(Ap,{...o})},Je=Ep,el={xs:{minHeight:24,paddingHorizontal:12,paddingVertical:5,fontSize:10,fontWeight:500,lineHeight:12,letterSpacing:"-0.01em"},sm:{minHeight:32,paddingHorizontal:16,paddingVertical:7,fontSize:12,fontWeight:500,lineHeight:16,letterSpacing:"-0.01em"},md:{minHeight:40,paddingHorizontal:20,paddingVertical:9,fontSize:14,fontWeight:500,lineHeight:20,letterSpacing:"-0.01em"},lg:{minHeight:48,paddingHorizontal:24,paddingVertical:11,fontSize:16,fontWeight:500,lineHeight:24,letterSpacing:"-0.01em"},xl:{minHeight:56,paddingHorizontal:28,paddingVertical:13,fontSize:20,fontWeight:500,lineHeight:28,letterSpacing:"-0.01em"}},Qo={square:0,rounded:8,pill:999},Dp={xs:{width:16,height:16,padding:6},sm:{width:20,height:20,padding:6},md:{width:24,height:24,padding:8},lg:{width:24,height:24,padding:12},xl:{width:28,height:28,padding:14}},Ae=e=>/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,$p=(e,o,t=!1,n)=>{const a=t?o:e,i=t?e:o,s=t?o:e,d=(e==="theme-primary"||n&&e===n.primary)&&(n!=null&&n.onPrimary)?n.onPrimary:i,u=`0 0 0 2px ${Ae("color-white")}, 0 0 0 4px ${Ae(s)}`;return{filled:{backgroundColor:a,color:d,borderWidth:1,borderStyle:"solid",borderColor:a,_hover:{opacity:.92},_active:{opacity:.96},_focusVisible:{outline:"none",boxShadow:u},transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},empty:{color:s,borderWidth:1,borderStyle:"solid",borderColor:s,backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:u},transition:"background-color 0.2s ease, opacity 0.2s ease"},outline:{color:s,borderWidth:1,borderStyle:"solid",borderColor:s,backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:u},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{color:s,borderWidth:0,borderStyle:"solid",borderColor:s,backgroundColor:"transparent",_hover:{opacity:.86},_active:{opacity:.94},_focusVisible:{outline:"none",boxShadow:u},transition:"background-color 0.2s ease, color 0.2s ease"},link:{color:s,borderWidth:0,borderStyle:"none",borderColor:s,minHeight:"auto",paddingHorizontal:"4px",paddingVertical:"10px",textDecoration:"underline",backgroundColor:"transparent",style:{textUnderlineOffset:"2px",textDecorationThickness:"1px",textDecorationColor:Ae(s)},_hover:{opacity:.8},_active:{opacity:.9},_focusVisible:{outline:"none",boxShadow:u},transition:"opacity 0.2s ease"},subtle:{backgroundColor:`${s}-${t?200:100}`,color:s,borderWidth:1,borderStyle:"solid",borderColor:`${s}-${t?400:250}`,_hover:{backgroundColor:`${s}-${t?300:180}`},_active:{backgroundColor:`${s}-${t?380:240}`},_focusVisible:{outline:"none",boxShadow:u},transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}}},Lp=p.memo(({children:e,icon:o,isLoading:t,iconPosition:n="left",loaderPosition:a="left",size:i="md",resolvedTextColor:s,isIconRounded:c,views:d})=>{const u=["left","right"].includes(n)?l.Horizontal:l.Vertical,m=el[i];return r.jsxs(u,{gap:8,alignItems:"center",justifyContent:"center",fontSize:m.fontSize,fontWeight:m.fontWeight,lineHeight:m.lineHeight,letterSpacing:m.letterSpacing,whiteSpace:"nowrap",color:s,...d==null?void 0:d.content,children:[t&&a==="left"&&r.jsx(Je,{size:i==="xs"||i==="sm"?"sm":"md",color:s,...d==null?void 0:d.loader}),o&&["left","top"].includes(n)&&!t&&r.jsx(l.View,{color:s,...d==null?void 0:d.icon,children:o}),e,o&&["right","bottom"].includes(n)&&!t&&r.jsx(l.View,{color:s,...d==null?void 0:d.icon,children:o}),t&&a==="right"&&r.jsx(Je,{size:i==="xs"||i==="sm"?"sm":"md",color:s,...d==null?void 0:d.loader})]})}),_p=e=>{const o=Qo[e];return typeof o=="number"?o:typeof o=="string"&&parseInt(o,10)||0},Bp=({asComponent:e,isDisabled:o,isLoading:t,isWrapped:n=!1,borderRadius:a,width:i,height:s,baseStyles:c,sizeStyles:d,iconPad:u,mainTone:m,resolvedTextColor:g,children:h,borderWidth:f=0,...y})=>r.jsx(l.Element,{as:e,disabled:!!(o||t),display:n?"flex":"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:a,width:i,height:s,...c,...d,...u,backgroundColor:(c==null?void 0:c.backgroundColor)||(n?m:void 0),color:g,borderWidth:n?0:void 0,cursor:o?"default":"pointer",...y,children:h}),Op=({shape:e,isDisabled:o,onClick:t,shadow:n,borderWidth:a,isAuto:i,isFilled:s,views:c,children:d,...u})=>r.jsx(l.Element,{as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:Qo[e],cursor:o?"default":"pointer",onClick:t,boxShadow:n,padding:a,width:s?"100%":i?"fit-content":void 0,...c==null?void 0:c.container,...u,children:d}),Np=({variant:e,animation:o,to:t,isDisabled:n,isLoading:a,isAuto:i,isFilled:s,isExternal:c,shape:d="rounded",shadow:u,onClick:m,views:g,baseStyles:h,sizeStyles:f,iconPad:y,containerRef:b,resolvedTextColor:k,content:C,size:j,mainTone:w,borderMovingDuration:S=2,borderMovingGradientColors:x=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:v="#705CFF",animatedStrokeTextColor:T="color-gray-900",...R})=>{var V;const M=_p(d),E=t?r.jsx(Jt,{to:t,isExternal:c,color:"currentColor",textDecoration:"inherit",_hover:{color:"currentColor"},...g==null?void 0:g.link,children:C}):C,I={isDisabled:n,isLoading:a,baseStyles:h,sizeStyles:f,iconPad:y,resolvedTextColor:k,mainTone:w,children:E};if(o==="borderMoving"&&x){const z={from:{backgroundPosition:"0% 50%"},to:{backgroundPosition:"200% 50%"},duration:`${S}s`,timingFunction:"linear",iterationCount:"infinite"};return r.jsx(Op,{shape:d,isDisabled:n,onClick:m,shadow:u,borderWidth:3,isAuto:i,isFilled:s,views:g,background:`linear-gradient(90deg, ${Ae(x[0])}, ${Ae(x[1])}, ${Ae(x[2])}, ${Ae(x[0])})`,backgroundSize:"200% 100%",animate:z,...R,children:r.jsx(Bp,{asComponent:t?"div":"button",isWrapped:!0,borderRadius:Math.max(0,M-3),width:"100%",height:"100%",...I})})}if(o==="animatedStroke"){const P=Ae(v),z=Ae(T),W=1e3,F={from:{strokeWidth:"8px",strokeDasharray:`0 ${W}`,strokeDashoffset:-Math.round(W*.63)},to:{strokeWidth:"3px",strokeDasharray:`${W}`,strokeDashoffset:0},duration:"0.9s",timingFunction:"ease-in",fillMode:"forwards"},H=["group",(V=g==null?void 0:g.container)==null?void 0:V.className,R==null?void 0:R.className].filter(Boolean).join(" ");return r.jsxs(l.Element,{ref:b,as:t?"div":"button",type:t?void 0:"button",disabled:!!(!t&&(n||a)),onClick:m,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:s?"100%":i?"fit-content":void 0,borderRadius:Qo[d],boxShadow:u,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",color:z,backgroundColor:"transparent",borderWidth:0,...g==null?void 0:g.container,...R,className:H,children:[r.jsx(l.View,{as:"svg",position:"absolute",top:0,right:0,bottom:0,left:0,width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg",pointerEvents:"none",zIndex:1,"aria-hidden":"true",children:r.jsx(l.View,{as:"rect",x:"0",y:"0",height:"100%",width:"100%",rx:M,ry:M,fill:"transparent",stroke:P,strokeWidth:"8px",strokeDasharray:`0 ${W}`,strokeDashoffset:-Math.round(W*.63),pathLength:W,on:{groupHover:{animate:F}}})}),r.jsx(l.View,{position:"relative",zIndex:0,children:E})]})}if(o==="borderReveal"){const z=Ae((x==null?void 0:x[0])||w||"#000000"),F=S*.75/4,H=`linear-gradient(90deg, ${z} 50%, transparent 50%)`,D=`linear-gradient(180deg, ${z} 50%, transparent 50%)`,L=`linear-gradient(270deg, ${z} 50%, transparent 50%)`,B=`linear-gradient(0deg, ${z} 50%, transparent 50%)`,$="100% 0, 100% 100%, 0 100%, 0 0",O="0 0, 100% 0, 100% 100%, 0 100%",N=`0s, ${F}s, ${F*2}s, ${F*2}s`,_=`${F*2}s, ${F*2}s, ${F}s, 0s`,Y=4;return r.jsx(l.Element,{ref:b,as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:Qo[d],cursor:n?"default":"pointer",onClick:m,boxShadow:u,padding:3,background:`
2
- ${H} no-repeat,
1
+ "use strict";var Ws=Object.create;var rt=Object.defineProperty;var Hs=Object.getOwnPropertyDescriptor;var Ps=Object.getOwnPropertyNames;var Vs=Object.getPrototypeOf,As=Object.prototype.hasOwnProperty;var Es=(e,o,t)=>o in e?rt(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t;var Ds=(e,o,t,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of Ps(o))!As.call(e,a)&&a!==t&&rt(e,a,{get:()=>o[a],enumerable:!(n=Hs(o,a))||n.enumerable});return e};var $s=(e,o,t)=>(t=e!=null?Ws(Vs(e)):{},Ds(o||!e||!e.__esModule?rt(t,"default",{value:e,enumerable:!0}):t,e));var Ue=(e,o,t)=>Es(e,typeof o!="symbol"?o+"":o,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),p=require("react"),l=require("app-studio"),Ls=require("react-dom"),$o=require("zustand"),kt=require("react-router-dom"),Le=require("formik"),Et=(e="id")=>`${e}-${Math.random().toString(36).substring(2,9)}`,_s=({type:e="single",value:o,defaultValue:t,onValueChange:n,collapsible:a=!1})=>{const i=o!==void 0,s=o??t,c=()=>e==="multiple"?Array.isArray(s)?s:s?[s]:[]:Array.isArray(s)?s[0]:s,[d,u]=p.useState(c()),m=p.useMemo(()=>Et("accordion"),[]),g=i?o:d,h=p.useMemo(()=>g===void 0?[]:Array.isArray(g)?g:[g],[g]);p.useEffect(()=>{i&&(e==="multiple"&&!Array.isArray(o)?(console.warn('Accordion with type="multiple" received non-array value:',o),u(o?[String(o)]:[])):e==="single"&&Array.isArray(o)?(console.warn('Accordion with type="single" received array value:',o),u(o.length>0?o[0]:void 0)):u(o))},[o,i,e]);const f=p.useCallback(k=>{let b;if(e==="single")g===k&&a?b=void 0:g!==k?b=k:b=g;else{const C=Array.isArray(g)?g:[];C.includes(k)?b=C.filter(S=>S!==k):b=[...C,k],Array.isArray(b)&&b.length===0&&(b=[])}i||u(b),n&&n(b)},[e,g,a,i,n]),y=p.useCallback(k=>h.includes(k),[h]);return{expandedItems:h,toggleItem:f,isItemExpanded:y,type:e,collapsible:a,baseId:m}},Bs={square:{borderRadius:0},rounded:{borderRadius:8}},Os={default:{borderWidth:0,style:{backgroundColor:"transparent"},transition:"background-color 0.15s ease"},outline:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",transition:"border-color 0.15s ease, background-color 0.15s ease",_hover:{borderColor:"color-gray-300"}},filled:{backgroundColor:"color-gray-50",transition:"background-color 0.15s ease",_hover:{backgroundColor:"color-gray-100"}}},Ns={id:"default",label:"Default",sourcePath:"",sourceTitle:"Default adaptive design system (light + dark)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},qs={primary:"#2563eb",secondary:"#7c3aed",success:"#16a34a",warning:"#d97706",error:"#dc2626",onPrimary:"#ffffff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200"},Us={rawCssVars:{primary:"#2563eb",secondary:"#7c3aed",success:"#16a34a",warning:"#d97706",error:"#dc2626"},colors:[{name:"primary",value:"#2563eb",role:"primary"},{name:"secondary",value:"#7c3aed",role:"secondary"},{name:"success",value:"#16a34a",role:"success"},{name:"warning",value:"#d97706",role:"warning"},{name:"error",value:"#dc2626",role:"error"}],typography:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",monoFamily:"ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace",fontSizes:["12px","13px","14px","16px","18px","22px","28px","36px","48px","64px"],fontWeights:["400","500","600","700","800"],lineHeights:["1.0","1.1","1.2","1.4","1.5","1.6"]},spacing:["2px","4px","8px","12px","16px","24px","32px","48px","64px"],radii:["2px","4px","6px","8px","12px","16px","9999px"],shadows:["0 1px 2px rgba(0,0,0,0.04)","0 4px 12px rgba(0,0,0,0.08)","0 12px 32px rgba(0,0,0,0.12)"]},Gs={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:8,fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:null,color:null,borderColor:null,borderRadius:6,fontFamily:"'Inter', system-ui, -apple-system, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:600,fontStyle:"normal"},text:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 2px rgba(0,0,0,0.04)"},header:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"9999px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},Ys={cornerStyle:"soft",typeWeight:"regular",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"neutral-clear"},Ks={metadata:Ns,theme:qs,tokens:Us,components:Gs,personality:Ys},Xs={id:"airbnb",label:"Airbnb",sourcePath:"design.md/html/airbnb.html",sourceTitle:"Design System Inspiration of Airbnb",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"]},Js={primary:"#ff385c",secondary:"#222222",success:"#428bff",warning:"#460479",error:"#c13515",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},Qs={rawCssVars:{primary:"#ff385c","primary-active":"#e00b41","primary-disabled":"#ffd1da",error:"#c13515",luxe:"#460479",plus:"#92174d",ink:"#222222",body:"#3f3f3f",muted:"#6a6a6a","muted-soft":"#929292",hairline:"#dddddd","hairline-soft":"#ebebeb","border-strong":"#c1c1c1",canvas:"#ffffff","surface-soft":"#f7f7f7","surface-strong":"#f2f2f2","on-primary":"#ffffff","legal-link":"#428bff",shadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0",display:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",text:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, sans-serif"},colors:[{name:"primary",value:"#ff385c",role:"primary"},{name:"primary-active",value:"#e00b41",role:"primary active"},{name:"primary-disabled",value:"#ffd1da",role:"primary disabled"},{name:"error",value:"#c13515",role:"error"},{name:"luxe",value:"#460479",role:"luxe"},{name:"plus",value:"#92174d",role:"plus"},{name:"ink",value:"#222222",role:"ink"},{name:"body",value:"#3f3f3f",role:"body"},{name:"muted",value:"#6a6a6a",role:"muted"},{name:"muted-soft",value:"#929292",role:"muted soft"},{name:"hairline",value:"#dddddd",role:"hairline"},{name:"hairline-soft",value:"#ebebeb",role:"hairline soft"},{name:"border-strong",value:"#c1c1c1",role:"border strong"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface-soft",value:"#f7f7f7",role:"surface soft"},{name:"surface-strong",value:"#f2f2f2",role:"surface strong"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"legal-link",value:"#428bff",role:"legal link"},{name:"shadow",value:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0",role:"shadow"}],typography:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","14px","48px","18px","20px","11px","28px","13px","12px","8px","64px","21px","10px","24px","36px","15px"],fontWeights:["400","600","700","500"],lineHeights:["1.5","1.1","1.43","1.25","2","1","1.2","1.35","1.4"]},spacing:["2px","4px","5px","6px","7px","8px","10px","11px","12px","13px","14px","16px","20px","23px","24px","28px","32px","40px","48px","56px"],radii:["9999px","8px","14px","4px","6px","3px"],shadows:["rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0","var(--shadow)"]},Zs={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:null,color:null,borderColor:null,borderRadius:6,fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},header:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"14px"},trigger:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:16},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:16},title:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"14px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"14px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},ec={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:16,pillRadius:9999,badgeRadius:6,voice:"warm-welcoming"},oc={metadata:Xs,theme:Js,tokens:Qs,components:Zs,personality:ec},rc={id:"apple",label:"Apple",sourcePath:"design.md/html/apple.html",sourceTitle:"Design System Inspiration of Apple",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},tc={primary:"#0071E3",secondary:"#1d1d1f",success:"#0071e3",warning:"#272729",error:"#2997ff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},nc={rawCssVars:{primary:"#0066cc","primary-focus":"#0071e3","primary-on-dark":"#2997ff",ink:"#1d1d1f",body:"#1d1d1f","body-on-dark":"#ffffff","body-muted":"#cccccc","ink-muted-80":"#333333","ink-muted-48":"#7a7a7a","divider-soft":"#f0f0f0",hairline:"#e0e0e0",canvas:"#ffffff","canvas-parchment":"#f5f5f7","surface-pearl":"#fafafc","surface-tile-1":"#272729","surface-tile-2":"#2a2a2c","surface-tile-3":"#252527","surface-black":"#000000","surface-chip-translucent":"rgba(210, 210, 215, 0.64)","on-primary":"#ffffff","on-dark":"#ffffff",display:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",text:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},colors:[{name:"primary",value:"#0071E3",role:"primary"},{name:"primary-focus",value:"#0071e3",role:"primary focus"},{name:"primary-on-dark",value:"#2997ff",role:"primary on dark"},{name:"ink",value:"#1d1d1f",role:"ink"},{name:"body",value:"#1d1d1f",role:"body"},{name:"body-on-dark",value:"#ffffff",role:"body on dark"},{name:"body-muted",value:"#cccccc",role:"body muted"},{name:"ink-muted-80",value:"#333333",role:"ink muted 80"},{name:"ink-muted-48",value:"#7a7a7a",role:"ink muted 48"},{name:"divider-soft",value:"#f0f0f0",role:"divider soft"},{name:"hairline",value:"#e0e0e0",role:"hairline"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"canvas-parchment",value:"#f5f5f7",role:"canvas parchment"},{name:"surface-pearl",value:"#fafafc",role:"surface pearl"},{name:"surface-tile-1",value:"#272729",role:"surface tile 1"},{name:"surface-tile-2",value:"#2a2a2c",role:"surface tile 2"},{name:"surface-tile-3",value:"#252527",role:"surface tile 3"},{name:"surface-black",value:"#000000",role:"surface black"},{name:"surface-chip-translucent",value:"rgba(210, 210, 215, 0.64)",role:"surface chip translucent"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"on-dark",value:"#ffffff",role:"on dark"}],typography:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["17px","14px","56px","21px","12px","40px","24px","13px","18px","28px","11px","34px","44px","32px","19px"],fontWeights:["400","600","300","700"],lineHeights:["1.47","1.07","1.19","1.1","1.43","1.5","1","1.14","2.0","2.41","1.2","1.35"]},spacing:["5px","6px","7px","8px","10px","11px","12px","14px","15px","16px","18px","20px","21px","22px","24px","28px","32px","44px","48px","50px"],radii:["9999px","18px","28px","24px","8px","11px","50%","12px","4px","6px","3px"],shadows:["0 5px 30px rgba(0, 0, 0, 0.22)"]},ac={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,borderColor:"theme-primary",letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:8,fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",letterSpacing:"-0.022em",textTransform:"none",fontWeight:300,fontStyle:"normal"},text:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:18,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 5px 30px rgba(0, 0, 0, 0.22)"},header:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.022em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"18px"},trigger:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:18},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.022em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.022em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:18},title:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"18px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"18px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},lc={cornerStyle:"soft",typeWeight:"light",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.022em",accentTreatment:"flat",signatureMotif:"◯",density:"spacious",surfaceTone:"paper",cardRadius:18,pillRadius:9999,badgeRadius:8,voice:"minimal-precise"},ic={metadata:rc,theme:tc,tokens:nc,components:ac,personality:lc},sc={id:"coinbase",label:"Coinbase",sourcePath:"design.md/html/coinbase.html",sourceTitle:"Design System Inspiration of Coinbase",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap"]},cc={primary:"#0052ff",secondary:"#0a0b0d",success:"#16a34a",warning:"#003ecc",error:"#dc2626",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},dc={rawCssVars:{primary:"#0052ff","primary-active":"#003ecc","primary-disabled":"#a8b8cc",ink:"#0a0b0d",body:"#5b616e",muted:"#7c828a","muted-soft":"#a8acb3",hairline:"#dee1e6","hairline-soft":"#eef0f3",canvas:"#ffffff","surface-soft":"#f7f7f7","surface-strong":"#eef0f3","surface-dark":"#0a0b0d","surface-dark-elevated":"#16181c","on-primary":"#ffffff","on-dark":"#ffffff","on-dark-soft":"#a8acb3","semantic-up":"#05b169","semantic-down":"#cf202f","accent-yellow":"#f4b000",display:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",text:"'Inter', 'Coinbase Sans', sans-serif",mono:"'JetBrains Mono', 'Coinbase Mono', monospace"},colors:[{name:"primary",value:"#0052ff",role:"primary"},{name:"primary-active",value:"#003ecc",role:"primary active"},{name:"primary-disabled",value:"#a8b8cc",role:"primary disabled"},{name:"ink",value:"#0a0b0d",role:"ink"},{name:"body",value:"#5b616e",role:"body"},{name:"muted",value:"#7c828a",role:"muted"},{name:"muted-soft",value:"#a8acb3",role:"muted soft"},{name:"hairline",value:"#dee1e6",role:"hairline"},{name:"hairline-soft",value:"#eef0f3",role:"hairline soft"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface-soft",value:"#f7f7f7",role:"surface soft"},{name:"surface-strong",value:"#eef0f3",role:"surface strong"},{name:"surface-dark",value:"#0a0b0d",role:"surface dark"},{name:"surface-dark-elevated",value:"#16181c",role:"surface dark elevated"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-soft",value:"#a8acb3",role:"on dark soft"},{name:"semantic-up",value:"#05b169",role:"semantic up"},{name:"semantic-down",value:"#cf202f",role:"semantic down"},{name:"accent-yellow",value:"#f4b000",role:"accent yellow"}],typography:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",monoFamily:"'JetBrains Mono', 'Coinbase Mono', monospace",fontSizes:["16px","14px","72px","18px","13px","36px","12px","44px","11px","52px","28px","40px","32px","48px","26px"],fontWeights:["500","600","400","700"],lineHeights:["1.5","1.2","1.05","1.15","1.0","1.09","1","1.35","1.4"]},spacing:["4px","5px","6px","8px","10px","11px","12px","13px","14px","15px","16px","19px","20px","24px","28px","32px","40px","44px","48px","56px"],radii:["100px","24px","20px","16px","9999px","14px","12px","8px","6px","3px"],shadows:["0 16px 40px rgba(0,0,0,0.5)","0 16px 40px rgba(0,0,0,0.4)","0 4px 12px rgba(0,0,0,0.04)"]},uc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 16px 40px rgba(0,0,0,0.5)"},header:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"16px"},trigger:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', 'Coinbase Mono', monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"16px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},pc={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"◆",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"trustworthy-financial"},mc={metadata:sc,theme:cc,tokens:dc,components:uc,personality:pc},gc={id:"figma",label:"Figma",sourcePath:"design.md/html/figma.html",sourceTitle:"Design System Inspiration of Figma",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300..700&family=JetBrains+Mono:wght@400;500&display=swap"]},hc={primary:"#F24E1E",secondary:"#A259FF",success:"#0ACF83",warning:"#FFC700",error:"#FF7262",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},fc={rawCssVars:{primary:"#000000","on-primary":"#ffffff",ink:"#000000",canvas:"#ffffff","inverse-canvas":"#000000","inverse-ink":"#ffffff",hairline:"#e6e6e6","hairline-soft":"#f1f1f1","surface-soft":"#f7f7f5","block-lime":"#dceeb1","block-lilac":"#c5b0f4","block-cream":"#f4ecd6","block-pink":"#efd4d4","block-mint":"#c8e6cd","block-coral":"#f3c9b6","block-navy":"#1f1d3d","accent-magenta":"#ff3d8b","semantic-success":"#1ea64a",sans:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",mono:"'JetBrains Mono', 'SF Mono', Menlo, monospace"},colors:[{name:"primary",value:"#F24E1E",role:"primary"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#000000",role:"ink"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"inverse-canvas",value:"#000000",role:"inverse canvas"},{name:"inverse-ink",value:"#ffffff",role:"inverse ink"},{name:"hairline",value:"#e6e6e6",role:"hairline"},{name:"hairline-soft",value:"#f1f1f1",role:"hairline soft"},{name:"surface-soft",value:"#f7f7f5",role:"surface soft"},{name:"block-lime",value:"#dceeb1",role:"block lime"},{name:"block-lilac",value:"#c5b0f4",role:"block lilac"},{name:"block-cream",value:"#f4ecd6",role:"block cream"},{name:"block-pink",value:"#efd4d4",role:"block pink"},{name:"block-mint",value:"#c8e6cd",role:"block mint"},{name:"block-coral",value:"#f3c9b6",role:"block coral"},{name:"block-navy",value:"#1f1d3d",role:"block navy"},{name:"accent-magenta",value:"#ff3d8b",role:"accent magenta"},{name:"semantic-success",value:"#1ea64a",role:"semantic success"}],typography:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",monoFamily:"'JetBrains Mono', 'SF Mono', Menlo, monospace",fontSizes:["18px","16px","80px","20px","12px","40px","14px","11px","26px","24px","32px","13px","10px","56px","36px"],fontWeights:["320","330","480","600","500","700"],lineHeights:["1.45","1.0","1.4","1.1","1.6","1.35","1","1.2"]},spacing:["5px","6px","8px","10px","12px","14px","16px","20px","22px","24px","28px","32px","36px","40px","44px","48px","56px","64px","96px","100px"],radii:["50px","8px","9999px","24px","6px","2px","3px"],shadows:["0 0 0 2px rgba(0,0,0,0.08)","none","0 4px 16px rgba(0,0,0,0.06)","0 12px 32px rgba(0,0,0,0.18)"]},yc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:8,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 2px rgba(0,0,0,0.08)"},header:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:"12px"},trigger:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:8},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', 'SF Mono', Menlo, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:8},title:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},xc={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"✦",density:"comfortable",surfaceTone:"paper",cardRadius:8,pillRadius:9999,badgeRadius:4,voice:"playful-creative"},bc={metadata:gc,theme:hc,tokens:fc,components:yc,personality:xc},kc={id:"linear",label:"Linear",sourcePath:"design.md/html/linear.html",sourceTitle:"Design System Inspiration of Linear",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400&display=swap"]},Cc={primary:"#5e6ad2",secondary:"#828fff",success:"#27a644",warning:"#5e69d1",error:"#828fff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},Sc={rawCssVars:{primary:"#5e6ad2","primary-hover":"#828fff","primary-focus":"#5e69d1","on-primary":"#ffffff",ink:"#f7f8f8","ink-muted":"#d0d6e0","ink-subtle":"#8a8f98","ink-tertiary":"#62666d",canvas:"#010102","surface-1":"#0f1011","surface-2":"#141516","surface-3":"#18191a","surface-4":"#191a1b",hairline:"#23252a","hairline-strong":"#34343a","hairline-tertiary":"#3e3e44","semantic-success":"#27a644",sans:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",mono:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace"},colors:[{name:"primary",value:"#5e6ad2",role:"primary"},{name:"primary-hover",value:"#828fff",role:"primary hover"},{name:"primary-focus",value:"#5e69d1",role:"primary focus"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#f7f8f8",role:"ink"},{name:"ink-muted",value:"#d0d6e0",role:"ink muted"},{name:"ink-subtle",value:"#8a8f98",role:"ink subtle"},{name:"ink-tertiary",value:"#62666d",role:"ink tertiary"},{name:"canvas",value:"#08090A",role:"canvas"},{name:"surface-1",value:"#0f1011",role:"surface 1"},{name:"surface-2",value:"#141516",role:"surface 2"},{name:"surface-3",value:"#18191a",role:"surface 3"},{name:"surface-4",value:"#191a1b",role:"surface 4"},{name:"hairline",value:"#23252a",role:"hairline"},{name:"hairline-strong",value:"#34343a",role:"hairline strong"},{name:"hairline-tertiary",value:"#3e3e44",role:"hairline tertiary"},{name:"semantic-success",value:"#27a644",role:"semantic success"}],typography:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",monoFamily:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace",fontSizes:["16px","14px","80px","18px","13px","56px","15px","12px","11px","28px","40px","22px","10px","36px"],fontWeights:["400","500","600","700"],lineHeights:["1.50","1.05","1.20","1.10","1.5","1.6","1.25","1","1.2","1.35","1.4"]},spacing:["2px","5px","6px","8px","10px","12px","14px","16px","20px","24px","28px","32px","36px","40px","48px","56px","64px","80px","96px","120px"],radii:["8px","12px","9999px","16px","4px","2px","6px","3px"],shadows:["rgba(255,255,255,0.05) 0 0.5px 0 0.5px","0 0 0 2px rgba(94,105,209,0.25)"]},jc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-on-primary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"theme-on-primary",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",letterSpacing:"-0.025em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(255,255,255,0.05) 0 0.5px 0 0.5px"},header:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.025em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.025em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.025em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.025em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.025em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},wc={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.025em",accentTreatment:"gradient",signatureMotif:"↗",density:"tight",surfaceTone:"glass",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"speed-clarity"},vc={metadata:kc,theme:Cc,tokens:Sc,components:jc,personality:wc},Tc={id:"nike",label:"Nike",sourcePath:"design.md/html/nike.html",sourceTitle:"Design System Inspiration of Nike",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},Ic={primary:"color-black",secondary:"#FA5400",success:"#76E0B5",warning:"#1151ff",error:"#d30005",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},Rc={rawCssVars:{ink:"#111111","on-primary":"#ffffff",canvas:"#ffffff","soft-cloud":"#f5f5f5",charcoal:"#39393b",ash:"#4b4b4d",mute:"#707072",stone:"#9e9ea0",hairline:"#cacacb","hairline-soft":"#e5e5e5",sale:"#d30005","sale-deep":"#780700",success:"#007d48","success-bright":"#1eaa52",info:"#1151ff","info-deep":"#0034e3","accent-pink":"#ed1aa0","accent-pink-soft":"#ffb0dd","accent-purple-soft":"#beaffd","accent-purple-pale":"#d6d1ff","accent-teal":"#0a7281","accent-pink-deep":"#4c012d","font-display":"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif","font-ui":"'Inter', 'Helvetica Now Text Medium', Helvetica, Arial, sans-serif","font-body":"'Inter', 'Helvetica Now Text', Helvetica, Arial, sans-serif"},colors:[{name:"ink",value:"#111111",role:"ink"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"soft-cloud",value:"#f5f5f5",role:"soft cloud"},{name:"charcoal",value:"#39393b",role:"charcoal"},{name:"ash",value:"#4b4b4d",role:"ash"},{name:"mute",value:"#707072",role:"mute"},{name:"stone",value:"#9e9ea0",role:"stone"},{name:"hairline",value:"#cacacb",role:"hairline"},{name:"hairline-soft",value:"#e5e5e5",role:"hairline soft"},{name:"sale",value:"#d30005",role:"sale"},{name:"sale-deep",value:"#780700",role:"sale deep"},{name:"success",value:"#76E0B5",role:"success"},{name:"success-bright",value:"#1eaa52",role:"success bright"},{name:"info",value:"#1151ff",role:"info"},{name:"info-deep",value:"#0034e3",role:"info deep"},{name:"accent-pink",value:"#ed1aa0",role:"accent pink"},{name:"accent-pink-soft",value:"#ffb0dd",role:"accent pink soft"},{name:"accent-purple-soft",value:"#beaffd",role:"accent purple soft"},{name:"accent-purple-pale",value:"#d6d1ff",role:"accent purple pale"},{name:"accent-teal",value:"#0a7281",role:"accent teal"},{name:"accent-pink-deep",value:"#4c012d",role:"accent pink deep"}],typography:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","15px","14px","96px","18px","12px","56px","13px","11px","24px","40px","64px","48px","32px"],fontWeights:["700","500","600"],lineHeights:["1.5","0.92","1","1.4","1.6","0.9","1.2","1.75","1.7","1.35"]},spacing:["2px","4px","5px","6px","8px","10px","12px","14px","16px","18px","20px","24px","28px","30px","32px","36px","40px","44px","48px","56px"],radii:["9999px","24px","14px","6px","3px"],shadows:["0 0 0 12px var(--soft-cloud)","0 20px 30px -10px rgba(0,0,0,0.18)","0 0 0 2px var(--canvas), 0 0 0 4px var(--ink)","inset 0 -1px 0 var(--hairline-soft)"]},Fc={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,borderColor:"theme-primary",letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"italic",backgroundColor:null},content:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"italic"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:800,fontStyle:"italic"},text:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 12px var(--soft-cloud)"},header:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontStyle:"italic",letterSpacing:"0.02em"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontStyle:"italic",letterSpacing:"0.02em"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{},text:{letterSpacing:"0.02em",fontStyle:"italic"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"theme-primary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"theme-secondary",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:4},thead:{backgroundColor:"theme-secondary",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"0.02em",fontStyle:"italic"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"0.02em"}}},avatar:{views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",borderRadius:4},title:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},description:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:0,views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:0},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary"}}}},zc={cornerStyle:"sharp",typeWeight:"black",typeCase:"uppercase",typeStyle:"italic",letterSpacing:"0.02em",accentTreatment:"flat",signatureMotif:"▶",density:"tight",surfaceTone:"mono",cardRadius:4,pillRadius:0,badgeRadius:0,voice:"athletic-bold"},Mc={metadata:Tc,theme:Ic,tokens:Rc,components:Fc,personality:zc},Wc={id:"notion",label:"Notion",sourcePath:"design.md/html/notion.html",sourceTitle:"Design System Inspiration of Notion",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"]},Hc={primary:"#5645d4",secondary:"#ff64c8",success:"#1aae39",warning:"#dd5b00",error:"#ff64c8",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},Pc={rawCssVars:{primary:"#5645d4","primary-pressed":"#4534b3","primary-deep":"#3a2a99","on-primary":"#ffffff","brand-navy":"#0a1530","brand-navy-deep":"#070f24","link-blue":"#0075de","brand-pink":"#ff64c8","brand-orange":"#dd5b00","brand-purple":"#7b3ff2","brand-purple-800":"#391c57","brand-orange-deep":"#793400","brand-green":"#1aae39","brand-yellow":"#f5d75e","brand-teal":"#2a9d99","tint-peach":"#ffe8d4","tint-rose":"#fde0ec","tint-mint":"#d9f3e1","tint-lavender":"#e6e0f5","tint-sky":"#dcecfa","tint-yellow":"#fef7d6","tint-yellow-bold":"#f9e79f","tint-cream":"#f8f5e8",canvas:"#ffffff",surface:"#f6f5f4","surface-soft":"#fafaf9",hairline:"#e5e3df","hairline-soft":"#ede9e4","hairline-strong":"#c8c4be","hairline-dark":"rgba(255,255,255,0.16)","ink-deep":"#000000",ink:"#1a1a1a",charcoal:"#37352f",slate:"#5d5b54",steel:"#787671",stone:"#a4a097",muted:"#bbb8b1","on-dark":"#ffffff","on-dark-muted":"#a4a097"},colors:[{name:"primary",value:"#5645d4",role:"primary"},{name:"primary-pressed",value:"#4534b3",role:"primary pressed"},{name:"primary-deep",value:"#3a2a99",role:"primary deep"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"brand-navy",value:"#0a1530",role:"brand navy"},{name:"brand-navy-deep",value:"#070f24",role:"brand navy deep"},{name:"link-blue",value:"#0075de",role:"link blue"},{name:"brand-pink",value:"#ff64c8",role:"brand pink"},{name:"brand-orange",value:"#dd5b00",role:"brand orange"},{name:"brand-purple",value:"#7b3ff2",role:"brand purple"},{name:"brand-purple-800",value:"#391c57",role:"brand purple 800"},{name:"brand-orange-deep",value:"#793400",role:"brand orange deep"},{name:"brand-green",value:"#1aae39",role:"brand green"},{name:"brand-yellow",value:"#f5d75e",role:"brand yellow"},{name:"brand-teal",value:"#2a9d99",role:"brand teal"},{name:"tint-peach",value:"#ffe8d4",role:"tint peach"},{name:"tint-rose",value:"#fde0ec",role:"tint rose"},{name:"tint-mint",value:"#d9f3e1",role:"tint mint"},{name:"tint-lavender",value:"#e6e0f5",role:"tint lavender"},{name:"tint-sky",value:"#dcecfa",role:"tint sky"},{name:"tint-yellow",value:"#fef7d6",role:"tint yellow"},{name:"tint-yellow-bold",value:"#f9e79f",role:"tint yellow bold"},{name:"tint-cream",value:"#f8f5e8",role:"tint cream"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface",value:"#f6f5f4",role:"surface"},{name:"surface-soft",value:"#fafaf9",role:"surface soft"},{name:"hairline",value:"#e5e3df",role:"hairline"},{name:"hairline-soft",value:"#ede9e4",role:"hairline soft"},{name:"hairline-strong",value:"#c8c4be",role:"hairline strong"},{name:"hairline-dark",value:"rgba(255,255,255,0.16)",role:"hairline dark"},{name:"ink-deep",value:"#000000",role:"ink deep"},{name:"ink",value:"#1a1a1a",role:"ink"},{name:"charcoal",value:"#37352f",role:"charcoal"},{name:"slate",value:"#5d5b54",role:"slate"},{name:"steel",value:"#787671",role:"steel"},{name:"stone",value:"#a4a097",role:"stone"},{name:"muted",value:"#bbb8b1",role:"muted"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-muted",value:"#a4a097",role:"on dark muted"}],typography:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["14px","15px","12px","80px","18px","48px","16px","13px","22px","11px","56px","36px","10px","20px","28px"],fontWeights:["500","600","400","700"],lineHeights:["1.55","1","1.05","1.15","1.4","1.3","1.5","1.1","1.2","1.35"]},spacing:["2px","4px","5px","6px","8px","10px","11px","12px","14px","15px","16px","18px","20px","24px","31px","32px","40px","44px","48px","56px"],radii:["6px","8px","16px","50%","12px","9999px","4px","3px"],shadows:["rgba(15, 15, 15, 0.20) 0px 24px 48px -8px","rgba(15,15,15,0.04) 0px 1px 2px 0px","rgba(15,15,15,0.08) 0px 4px 12px 0px","rgba(15,15,15,0.20) 0px 24px 48px -8px","rgba(15,15,15,0.16) 0px 16px 48px -8px"]},Vc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,borderColor:"theme-primary",letterSpacing:"0em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",letterSpacing:"0em",textTransform:"none",fontWeight:400,fontStyle:"normal"},text:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(15, 15, 15, 0.20) 0px 24px 48px -8px"},header:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontStyle:"normal",letterSpacing:"0em"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontStyle:"normal",letterSpacing:"0em"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:10},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"0em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"0em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:10},title:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},Ac={cornerStyle:"soft",typeWeight:"regular",typeCase:"normal",typeStyle:"normal",letterSpacing:"0em",accentTreatment:"flat",signatureMotif:"◇",density:"comfortable",surfaceTone:"paper",cardRadius:10,pillRadius:9999,badgeRadius:4,voice:"thoughtful-quiet"},Ec={metadata:Wc,theme:Hc,tokens:Pc,components:Vc,personality:Ac},Dc={id:"revolut",label:"Revolut",sourcePath:"design.md/html/revolut.html",sourceTitle:"Design System Inspiration of Revolut",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},$c={primary:"#1361F0",secondary:"#101D31",success:"#16a34a",warning:"#d97706",error:"#e61e49",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},Lc={rawCssVars:{primary:"#494fdf","primary-bright":"#4f55f1","primary-deep":"#3a40c4","on-primary":"#ffffff",ink:"#191c1f",body:"#1f2226",charcoal:"#3a3d40",mute:"#505a63",ash:"#5c5e60",stone:"#8d969e",faint:"#c9c9cd","on-dark":"#ffffff","on-dark-mute":"rgba(255,255,255,0.72)","canvas-light":"#ffffff","canvas-dark":"#000000","surface-soft":"#f4f4f4","surface-card":"#ffffff","surface-deep":"#0a0a0a","surface-elevated":"#16181a","hairline-light":"#e2e2e7","hairline-dark":"rgba(255,255,255,0.12)","hairline-strong":"#191c1f","divider-soft":"rgba(255,255,255,0.06)",teal:"#00a87e","light-blue":"#007bc2","blue-link":"#376cd5","light-green":"#428619","green-text":"#006400",yellow:"#b09000",warning:"#ec7e00",pink:"#e61e49",danger:"#e23b4a","deep-red":"#8b0000",brown:"#936d62","font-display":"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif","font-ui":"'Inter', system-ui, sans-serif"},colors:[{name:"primary",value:"#1361F0",role:"primary"},{name:"primary-bright",value:"#4f55f1",role:"primary bright"},{name:"primary-deep",value:"#3a40c4",role:"primary deep"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#191c1f",role:"ink"},{name:"body",value:"#1f2226",role:"body"},{name:"charcoal",value:"#3a3d40",role:"charcoal"},{name:"mute",value:"#505a63",role:"mute"},{name:"ash",value:"#5c5e60",role:"ash"},{name:"stone",value:"#8d969e",role:"stone"},{name:"faint",value:"#c9c9cd",role:"faint"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-mute",value:"rgba(255,255,255,0.72)",role:"on dark mute"},{name:"canvas-light",value:"#ffffff",role:"canvas light"},{name:"canvas-dark",value:"#000000",role:"canvas dark"},{name:"surface-soft",value:"#f4f4f4",role:"surface soft"},{name:"surface-card",value:"#ffffff",role:"surface card"},{name:"surface-deep",value:"#0a0a0a",role:"surface deep"},{name:"surface-elevated",value:"#16181a",role:"surface elevated"},{name:"hairline-light",value:"#e2e2e7",role:"hairline light"},{name:"hairline-dark",value:"rgba(255,255,255,0.12)",role:"hairline dark"},{name:"hairline-strong",value:"#191c1f",role:"hairline strong"},{name:"divider-soft",value:"rgba(255,255,255,0.06)",role:"divider soft"},{name:"teal",value:"#00a87e",role:"teal"},{name:"light-blue",value:"#007bc2",role:"light blue"},{name:"blue-link",value:"#376cd5",role:"blue link"},{name:"light-green",value:"#428619",role:"light green"},{name:"green-text",value:"#006400",role:"green text"},{name:"yellow",value:"#b09000",role:"yellow"},{name:"warning",value:"#d97706",role:"warning"},{name:"pink",value:"#e61e49",role:"pink"},{name:"danger",value:"#e23b4a",role:"danger"},{name:"deep-red",value:"#8b0000",role:"deep red"},{name:"brown",value:"#936d62",role:"brown"}],typography:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","14px","18px","12px","96px","56px","24px","13px","32px","11px","64px","44px"],fontWeights:["600","500","700"],lineHeights:["1.5","1.0","1.56","1.4","1.33","1.19","1.6","1.2","1.35"]},spacing:["4px","6px","8px","10px","12px","13px","14px","16px","20px","24px","27px","28px","32px","36px","40px","48px","56px","64px","80px","88px"],radii:["9999px","20px","28px","36px","24px","12px","3px"],shadows:[]},_c={button:{variant:"filled",size:"md",shape:"pill",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:9999,fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",letterSpacing:"-0.02em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:20,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)"},header:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:9999},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:9999}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:20},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.02em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:20},title:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"24px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},Bc={cornerStyle:"pill",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.02em",accentTreatment:"gradient",signatureMotif:"★",density:"comfortable",surfaceTone:"glass",cardRadius:20,pillRadius:9999,badgeRadius:9999,voice:"bold-fintech"},Oc={metadata:Dc,theme:$c,tokens:Lc,components:_c,personality:Bc},Nc={id:"shopify",label:"Shopify",sourcePath:"design.md/html/shopify.html",sourceTitle:"Design System Inspired by Shopify",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},qc={primary:"#008060",secondary:"#202223",success:"#008060",warning:"#FFC453",error:"#D72C0D",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#FFFFFF"},Uc={rawCssVars:{white:"#FFFFFF",black:"#000000","neon-green":"#36F4A4",aloe:"#C1FBD4",pistachio:"#D4F9E0","deep-teal":"#02090A","dark-forest":"#061A1C",forest:"#102620","card-border":"#1E2C31","shade-30":"#D4D4D8",muted:"#A1A1AA","shade-50":"#71717A","shade-60":"#52525B","shade-70":"#3F3F46","light-border":"#E4E4E7","link-muted":"#9797A2","shadow-card":"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},colors:[{name:"white",value:"#FFFFFF",role:"white"},{name:"black",value:"#000000",role:"black"},{name:"neon-green",value:"#36F4A4",role:"neon green"},{name:"aloe",value:"#C1FBD4",role:"aloe"},{name:"pistachio",value:"#D4F9E0",role:"pistachio"},{name:"deep-teal",value:"#02090A",role:"deep teal"},{name:"dark-forest",value:"#061A1C",role:"dark forest"},{name:"forest",value:"#102620",role:"forest"},{name:"card-border",value:"#1E2C31",role:"card border"},{name:"shade-30",value:"#D4D4D8",role:"shade 30"},{name:"muted",value:"#A1A1AA",role:"muted"},{name:"shade-50",value:"#71717A",role:"shade 50"},{name:"shade-60",value:"#52525B",role:"shade 60"},{name:"shade-70",value:"#3F3F46",role:"shade 70"},{name:"light-border",value:"#E4E4E7",role:"light border"},{name:"link-muted",value:"#9797A2",role:"link muted"},{name:"shadow-card",value:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset",role:"shadow card"}],typography:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["20px","16px","14px","80px","48px","18px","12px","13px","11px","55px","32px","28px","24px","36px"],fontWeights:["400","600","500","330","360","550","700"],lineHeights:["1.5","0.96","1.14","1.56","1.16","1.28","1.4","1.49","1.2","1.35"]},spacing:["4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","40px","48px","64px","72px","80px","100px"],radii:["9999px","8px","4px","12px","2px","3px"],shadows:["rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset","0 0 0 2px var(--neon-green)","var(--shadow-card)","rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"]},Gc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"color-aloe",color:"color-white",borderColor:"color-aloe",borderRadius:6,fontFamily:"'Inter', Helvetica, Arial, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},header:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-muted"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-muted"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-muted",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-white",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-muted"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-white",color:"color-black"},th:{color:"color-muted",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-muted",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-muted"},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-muted"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black"}}}},Yc={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"commerce-friendly"},Kc={metadata:Nc,theme:qc,tokens:Uc,components:Gc,personality:Yc},Xc={id:"spacex",label:"SpaceX",sourcePath:"design.md/html/spaceX.html",sourceTitle:"Design System Preview: SpaceX (Light)",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Share+Tech&display=swap"]},Jc={primary:"color-black",secondary:"#a3a3a3",success:"#4ade80",warning:"#fbbf24",error:"#ef4444",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},Qc={rawCssVars:{black:"#000000",spectral:"#f0f0fa","ghost-bg":"rgba(240,240,250,0.1)","ghost-border":"rgba(240,240,250,0.35)",overlay:"rgba(0,0,0,0.5)",font:"'Share Tech', Arial, Verdana, sans-serif"},colors:[{name:"black",value:"#000000",role:"black"},{name:"spectral",value:"#f0f0fa",role:"spectral"},{name:"ghost-bg",value:"rgba(240,240,250,0.1)",role:"ghost bg"},{name:"ghost-border",value:"rgba(240,240,250,0.35)",role:"ghost border"},{name:"overlay",value:"rgba(0,0,0,0.5)",role:"overlay"}],typography:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","13px","12px","48px","10px","32px","11px","9px","14px"],fontWeights:["700","400","600"],lineHeights:["1.50","1.00","1.70","1.2","1.35","1.4"]},spacing:["8px","10px","12px","14px","16px","18px","20px","24px","28px","32px","48px","60px","64px","72px","80px","120px"],radii:["32px","4px","2px","3px"],shadows:[]},Zc={button:{variant:"ghost",size:"md",shape:"square",color:"theme-primary",textColor:"theme-primary",views:{container:{borderRadius:0,fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,borderColor:"color-gray-200",backgroundColor:"color-gray-50",letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"},content:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",color:"color-white",borderColor:"color-gray-50",borderRadius:0,fontFamily:"'Share Tech', Arial, Verdana, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:800,fontStyle:"normal"},text:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)"},header:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontStyle:"normal",letterSpacing:"0.06em"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontStyle:"normal",letterSpacing:"0.06em"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0.06em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"color-gray-200"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"color-gray-200"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-200"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-200",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"32px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},content:{color:"color-gray-200"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:2},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-200",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"0.06em",fontStyle:"normal"},caption:{color:"color-gray-200",fontStyle:"italic",letterSpacing:"0.06em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:2},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:0,views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:0},item:{color:"color-gray-200"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},eyebrow:{color:"color-gray-200"},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},description:{color:"color-gray-200"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},ed={cornerStyle:"sharp",typeWeight:"black",typeCase:"uppercase",typeStyle:"normal",letterSpacing:"0.06em",accentTreatment:"glow",signatureMotif:"⚡",density:"tight",surfaceTone:"mono",cardRadius:2,pillRadius:0,badgeRadius:0,voice:"technical-mission"},od={metadata:Xc,theme:Jc,tokens:Qc,components:Zc,personality:ed},rd={id:"spotify",label:"Spotify",sourcePath:"design.md/html/spotify.html",sourceTitle:"Design System Inspired by Shopify",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},td={primary:"#1DB954",secondary:"#C1FBD4",success:"#1DB954",warning:"#D4F9E0",error:"#D4D4D8",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#000000"},nd={rawCssVars:{white:"#FFFFFF",black:"#000000","spotify-green":"#1DB954",aloe:"#C1FBD4",pistachio:"#D4F9E0","deep-teal":"#02090A","dark-forest":"#061A1C",forest:"#102620","card-border":"#1E2C31","shade-30":"#D4D4D8",muted:"#A1A1AA","shade-50":"#71717A","shade-60":"#52525B","shade-70":"#3F3F46","light-border":"#E4E4E7","link-muted":"#9797A2","shadow-card":"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},colors:[{name:"white",value:"#FFFFFF",role:"white"},{name:"black",value:"#000000",role:"black"},{name:"spotify-green",value:"#1DB954",role:"neon green"},{name:"aloe",value:"#C1FBD4",role:"aloe"},{name:"pistachio",value:"#D4F9E0",role:"pistachio"},{name:"deep-teal",value:"#02090A",role:"deep teal"},{name:"dark-forest",value:"#061A1C",role:"dark forest"},{name:"forest",value:"#102620",role:"forest"},{name:"card-border",value:"#1E2C31",role:"card border"},{name:"shade-30",value:"#D4D4D8",role:"shade 30"},{name:"muted",value:"#A1A1AA",role:"muted"},{name:"shade-50",value:"#71717A",role:"shade 50"},{name:"shade-60",value:"#52525B",role:"shade 60"},{name:"shade-70",value:"#3F3F46",role:"shade 70"},{name:"light-border",value:"#E4E4E7",role:"light border"},{name:"link-muted",value:"#9797A2",role:"link muted"},{name:"shadow-card",value:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset",role:"shadow card"}],typography:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["20px","16px","14px","80px","48px","18px","12px","13px","11px","55px","32px","28px","24px","36px"],fontWeights:["400","600","500","330","360","550","700"],lineHeights:["1.5","0.96","1.14","1.56","1.16","1.28","1.4","1.49","1.2","1.35"]},spacing:["4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","40px","48px","64px","72px","80px","100px"],radii:["9999px","8px","4px","12px","2px","3px"],shadows:["rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset","0 0 0 2px var(--neon-green)","var(--shadow-card)","rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"]},ad={button:{variant:"filled",size:"md",shape:"pill",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,borderColor:"theme-primary",letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",letterSpacing:"-0.02em",textTransform:"none",fontWeight:800,fontStyle:"normal"},text:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},header:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:9999},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:9999}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:8},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.02em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:8},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},ld={cornerStyle:"pill",typeWeight:"black",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.02em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"matte",cardRadius:8,pillRadius:9999,badgeRadius:9999,voice:"rhythmic-vibrant"},id={metadata:rd,theme:td,tokens:nd,components:ad,personality:ld},sd={id:"stripe",label:"Stripe",sourcePath:"design.md/html/stripe.html",sourceTitle:"Design System Preview: Stripe (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Code+Pro:wght@400;500;700&display=swap"]},cd={primary:"#635BFF",secondary:"#f96bee",success:"#15be53",warning:"#9b6829",error:"#ea2261",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},dd={rawCssVars:{purple:"#533afd","purple-hover":"#4434d4","purple-deep":"#2e2b8c","purple-light":"#b9b9f9","purple-mid":"#665efd",navy:"#061b31","dark-navy":"#0d253d","brand-dark":"#1c1e54",white:"#ffffff",ruby:"#ea2261",magenta:"#f96bee","magenta-light":"#ffd7ef",success:"#15be53","success-text":"#108c3d",lemon:"#9b6829",slate:"#64748d","dark-slate":"#273951",border:"#e5edf5","border-purple":"#b9b9f9","border-soft":"#d6d9fc","shadow-blue":"rgba(50,50,93,0.25)","shadow-dark-blue":"rgba(3,3,39,0.25)","shadow-black":"rgba(0,0,0,0.1)","shadow-ambient":"rgba(23,23,23,0.08)","shadow-soft":"rgba(23,23,23,0.06)","shadow-card":"rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px","shadow-ambient-card":"rgba(23,23,23,0.08) 0px 15px 35px 0px","shadow-subtle":"rgba(23,23,23,0.06) 0px 3px 6px 0px","font-primary":"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif","font-mono":"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace"},colors:[{name:"purple",value:"#533afd",role:"purple"},{name:"purple-hover",value:"#4434d4",role:"purple hover"},{name:"purple-deep",value:"#2e2b8c",role:"purple deep"},{name:"purple-light",value:"#b9b9f9",role:"purple light"},{name:"purple-mid",value:"#665efd",role:"purple mid"},{name:"navy",value:"#061b31",role:"navy"},{name:"dark-navy",value:"#0d253d",role:"dark navy"},{name:"brand-dark",value:"#1c1e54",role:"brand dark"},{name:"white",value:"#ffffff",role:"white"},{name:"ruby",value:"#ea2261",role:"ruby"},{name:"magenta",value:"#f96bee",role:"magenta"},{name:"magenta-light",value:"#ffd7ef",role:"magenta light"},{name:"success",value:"#15be53",role:"success"},{name:"success-text",value:"#108c3d",role:"success text"},{name:"lemon",value:"#9b6829",role:"lemon"},{name:"slate",value:"#64748d",role:"slate"},{name:"dark-slate",value:"#273951",role:"dark slate"},{name:"border",value:"#e5edf5",role:"border"},{name:"border-purple",value:"#b9b9f9",role:"border purple"},{name:"border-soft",value:"#d6d9fc",role:"border soft"},{name:"shadow-blue",value:"rgba(50,50,93,0.25)",role:"shadow blue"},{name:"shadow-dark-blue",value:"rgba(3,3,39,0.25)",role:"shadow dark blue"},{name:"shadow-black",value:"rgba(0,0,0,0.1)",role:"shadow black"},{name:"shadow-ambient",value:"rgba(23,23,23,0.08)",role:"shadow ambient"},{name:"shadow-soft",value:"rgba(23,23,23,0.06)",role:"shadow soft"},{name:"shadow-card",value:"rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px",role:"shadow card"},{name:"shadow-ambient-card",value:"rgba(23,23,23,0.08) 0px 15px 35px 0px",role:"shadow ambient card"},{name:"shadow-subtle",value:"rgba(23,23,23,0.06) 0px 3px 6px 0px",role:"shadow subtle"}],typography:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",monoFamily:"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace",fontSizes:["16px","14px","48px","18px","12px","32px","13px","11px","10px","22px"],fontWeights:["100 900","300","400","500","700","600"],lineHeights:["1.40","1.15","1.10","1.50","1.2","1.35","1.4"]},spacing:["1px","6px","8px","10px","12px","14px","16px","20px","24px","28px","32px","48px","64px","72px","80px","96px"],radii:["0 0 6px 6px","4px","6px","2px","3px"],shadows:["rgba(50,50,93,0.25)","rgba(3,3,39,0.25)","rgba(0,0,0,0.1)","rgba(23,23,23,0.08)","rgba(23,23,23,0.06)","rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px","rgba(23,23,23,0.08) 0px 15px 35px 0px","rgba(23,23,23,0.06) 0px 3px 6px 0px","var(--shadow-subtle)","var(--shadow-card)","0 0 0 1px theme-primary","0 0 0 1px var(--ruby)"]},ud={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",letterSpacing:"-0.022em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(23,23,23,0.06) 0px 3px 6px 0px"},header:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.022em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"4px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-white",color:"color-black",borderRadius:"6px"},trigger:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-white",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.022em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.022em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"6px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"6px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black"}}}},pd={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.022em",accentTreatment:"gradient",signatureMotif:"↗",density:"comfortable",surfaceTone:"glass",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"refined-fintech"},md={metadata:sd,theme:cd,tokens:dd,components:ud,personality:pd},gd={id:"tesla",label:"Tesla",sourcePath:"design.md/html/tesla.html",sourceTitle:"Design System Inspired by Tesla",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap"]},hd={primary:"#3E6AE1",secondary:"#171A20",success:"#3E6AE1",warning:"#5C5E62",error:"#171A20",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#FFFFFF"},fd={rawCssVars:{"electric-blue":"#3E6AE1","pure-white":"#FFFFFF","carbon-dark":"#171A20",graphite:"#393C41",pewter:"#5C5E62","silver-fog":"#8E8E8E","cloud-gray":"#EEEEEE","pale-silver":"#D0D1D2","light-ash":"#F4F4F4","frosted-glass":"rgba(255,255,255,0.75)",overlay:"rgba(128,128,128,0.65)","subtle-shadow":"rgba(0,0,0,0.05)","font-display":"'Inter', -apple-system, Arial, sans-serif","font-text":"'Inter', -apple-system, Arial, sans-serif"},colors:[{name:"electric-blue",value:"#3E6AE1",role:"electric blue"},{name:"pure-white",value:"#FFFFFF",role:"pure white"},{name:"carbon-dark",value:"#171A20",role:"carbon dark"},{name:"graphite",value:"#393C41",role:"graphite"},{name:"pewter",value:"#5C5E62",role:"pewter"},{name:"silver-fog",value:"#8E8E8E",role:"silver fog"},{name:"cloud-gray",value:"#EEEEEE",role:"cloud gray"},{name:"pale-silver",value:"#D0D1D2",role:"pale silver"},{name:"light-ash",value:"#F4F4F4",role:"light ash"},{name:"frosted-glass",value:"rgba(255,255,255,0.75)",role:"frosted glass"},{name:"overlay",value:"rgba(128,128,128,0.65)",role:"overlay"},{name:"subtle-shadow",value:"rgba(0,0,0,0.05)",role:"subtle shadow"}],typography:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["14px","40px","28px","13px","12px","11px","17px","16px"],fontWeights:["400","500","700","600"],lineHeights:["1.43","48px","20px","1.2","1.3","36px","1.35","1.4"]},spacing:["4px","6px","8px","10px","12px","14px","16px","20px","24px","32px","40px","48px","56px","60px","64px","80px","100px"],radii:["4px","4px 4px 0 0","0 0 4px 4px","12px","3px"],shadows:["rgba(0,0,0,0.05)","0 1px 0 var(--pewter)"]},yd={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,borderColor:"theme-primary",letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'Inter', -apple-system, Arial, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:300,fontStyle:"normal"},text:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:0,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.05)"},header:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontStyle:"normal",letterSpacing:"0.02em"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontStyle:"normal",letterSpacing:"0.02em"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"theme-warning"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"theme-warning"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"theme-warning"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"theme-warning",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', -apple-system, Arial, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"4px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:0},trigger:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},content:{color:"theme-warning"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:0},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"theme-warning",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"0.02em",fontStyle:"normal"},caption:{color:"theme-warning",fontStyle:"italic",letterSpacing:"0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:0},title:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"4px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:0},item:{color:"theme-warning"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},eyebrow:{color:"theme-warning"},title:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},description:{color:"theme-warning"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},xd={cornerStyle:"sharp",typeWeight:"light",typeCase:"uppercase",typeStyle:"normal",letterSpacing:"0.02em",accentTreatment:"flat",signatureMotif:"▲",density:"spacious",surfaceTone:"mono",cardRadius:0,pillRadius:0,badgeRadius:0,voice:"futurist-clean"},bd={metadata:gd,theme:hd,tokens:fd,components:yd,personality:xd},kd={id:"uber",label:"Uber",sourcePath:"design.md/html/uber.html",sourceTitle:"Design System Preview: Uber (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,700&display=swap"]},Cd={primary:"color-black",secondary:"#efefef",success:"#06C167",warning:"#e2e2e2",error:"#000000",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},Sd={rawCssVars:{"color-black":"#000000","color-white":"#ffffff","color-hover-gray":"#e2e2e2","color-hover-light":"#f3f3f3","color-chip-gray":"#efefef","color-body-gray":"#4b4b4b","color-muted-gray":"#afafaf","shadow-card":"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px","shadow-medium":"rgba(0, 0, 0, 0.16) 0px 4px 16px 0px","shadow-float":"rgba(0, 0, 0, 0.16) 0px 2px 8px 0px","shadow-press":"rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset","font-display":"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif","font-body":"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif","bg-page":"#ffffff","bg-card":"#ffffff","bg-nav":"rgba(255,255,255,0.92)","text-primary":"#000000","text-secondary":"#4b4b4b","text-tertiary":"#afafaf","border-color":"#efefef","section-label-color":"#000000"},colors:[{name:"color-black",value:"#000000",role:"color black"},{name:"color-white",value:"#ffffff",role:"color white"},{name:"color-hover-gray",value:"#e2e2e2",role:"color hover gray"},{name:"color-hover-light",value:"#f3f3f3",role:"color hover light"},{name:"color-chip-gray",value:"#efefef",role:"color chip gray"},{name:"color-body-gray",value:"#4b4b4b",role:"color body gray"},{name:"color-muted-gray",value:"#afafaf",role:"color muted gray"},{name:"shadow-card",value:"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px",role:"shadow card"},{name:"shadow-medium",value:"rgba(0, 0, 0, 0.16) 0px 4px 16px 0px",role:"shadow medium"},{name:"shadow-float",value:"rgba(0, 0, 0, 0.16) 0px 2px 8px 0px",role:"shadow float"},{name:"shadow-press",value:"rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset",role:"shadow press"},{name:"bg-page",value:"#ffffff",role:"bg page"},{name:"bg-card",value:"#ffffff",role:"bg card"},{name:"bg-nav",value:"rgba(255,255,255,0.92)",role:"bg nav"},{name:"text-primary",value:"#000000",role:"text primary"},{name:"text-secondary",value:"#4b4b4b",role:"text secondary"},{name:"text-tertiary",value:"#afafaf",role:"text tertiary"},{name:"border-color",value:"#efefef",role:"border color"},{name:"section-label-color",value:"#000000",role:"section label color"}],typography:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","18px","14px","64px","20px","12px","36px","13px","24px","28px"],fontWeights:["700","500","400","600"],lineHeights:["1.50","1.10","1.22","1.33","2.0","1.2","1.35","1.4"]},spacing:["8px","10px","12px","14px","16px","20px","24px","28px","32px","36px","40px","50px","60px","64px","80px","100px","120px","140px"],radii:["8px","999px","12px","16px","4px","3px"],shadows:["rgba(0, 0, 0, 0.12) 0px 4px 16px 0px","rgba(0, 0, 0, 0.16) 0px 4px 16px 0px","rgba(0, 0, 0, 0.16) 0px 2px 8px 0px","rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset","var(--shadow-card)","var(--shadow-float)","var(--shadow-medium)","0 0 0 1px color-black","rgba(0,0,0,0.12) 0px 4px 16px 0px","rgba(0,0,0,0.16) 0px 4px 16px 0px","rgba(0,0,0,0.16) 0px 2px 8px 0px","rgba(0,0,0,0.08) 0px 0px 0px 999px inset"]},jd={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px"},header:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"theme-warning"},content:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},footer:{borderColor:"theme-warning"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"theme-warning",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"theme-warning",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-warning"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"theme-warning"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"theme-warning"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"theme-primary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"theme-warning",backgroundColor:"color-white",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"theme-warning",borderRadius:4},thead:{backgroundColor:"color-white",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"theme-warning",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"theme-warning"},td:{color:"theme-primary",borderColor:"theme-warning",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",borderRadius:4},title:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"theme-warning",radius:"8px",views:{container:{backgroundColor:"theme-warning",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"theme-warning",views:{container:{borderColor:"theme-warning"},label:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:0},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"theme-warning"},surface:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary"}}}},wd={cornerStyle:"sharp",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"▶",density:"tight",surfaceTone:"mono",cardRadius:4,pillRadius:0,badgeRadius:0,voice:"motion-utility"},vd={metadata:kd,theme:Cd,tokens:Sd,components:jd,personality:wd},Td={id:"vercel",label:"Vercel",sourcePath:"design.md/html/vercel.html",sourceTitle:"Design System Preview: Vercel (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap"]},Id={primary:"color-black",secondary:"#0072f5",success:"#0a72ef",warning:"#de1d8d",error:"#ff5b4f",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},Rd={rawCssVars:{black:"#171717",white:"#ffffff","gray-50":"#fafafa","gray-100":"#ebebeb","gray-400":"#808080","gray-500":"#666666","gray-600":"#4d4d4d","link-blue":"#0072f5","focus-blue":"hsl(212,100%,48%)","ship-red":"#ff5b4f","preview-pink":"#de1d8d","develop-blue":"#0a72ef","console-blue":"#0070f3","console-purple":"#7928ca","console-pink":"#eb367f","badge-bg":"#ebf5ff","badge-text":"#0068d6","shadow-ring":"rgba(0,0,0,0.08) 0px 0px 0px 1px","shadow-ring-light":"rgb(235,235,235) 0px 0px 0px 1px","shadow-subtle":"rgba(0,0,0,0.04) 0px 2px 2px 0px","shadow-card":"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px","shadow-card-full":"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px","font-sans":"'Geist', system-ui, -apple-system, Arial, sans-serif","font-mono":"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace"},colors:[{name:"black",value:"#171717",role:"black"},{name:"white",value:"#ffffff",role:"white"},{name:"gray-50",value:"#fafafa",role:"gray 50"},{name:"gray-100",value:"#ebebeb",role:"gray 100"},{name:"gray-400",value:"#808080",role:"gray 400"},{name:"gray-500",value:"#666666",role:"gray 500"},{name:"gray-600",value:"#4d4d4d",role:"gray 600"},{name:"link-blue",value:"#0072f5",role:"link blue"},{name:"focus-blue",value:"hsl(212,100%,48%)",role:"focus blue"},{name:"ship-red",value:"#ff5b4f",role:"ship red"},{name:"preview-pink",value:"#de1d8d",role:"preview pink"},{name:"develop-blue",value:"#0a72ef",role:"develop blue"},{name:"console-blue",value:"#0070f3",role:"console blue"},{name:"console-purple",value:"#7928ca",role:"console purple"},{name:"console-pink",value:"#eb367f",role:"console pink"},{name:"badge-bg",value:"#ebf5ff",role:"badge bg"},{name:"badge-text",value:"#0068d6",role:"badge text"},{name:"shadow-ring",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px",role:"shadow ring"},{name:"shadow-ring-light",value:"rgb(235,235,235) 0px 0px 0px 1px",role:"shadow ring light"},{name:"shadow-subtle",value:"rgba(0,0,0,0.04) 0px 2px 2px 0px",role:"shadow subtle"},{name:"shadow-card",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px",role:"shadow card"},{name:"shadow-card-full",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px",role:"shadow card full"}],typography:{fontFamily:"var(--font-sans)",monoFamily:"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace",fontSizes:["16px","14px","48px","20px","12px","32px","13px","11px","10px","36px"],fontWeights:["400","600","500","700"],lineHeights:["1.50","1.00","1.80","1.25","1.2","1.35","1.4"]},spacing:["2px","4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","48px","64px","72px","80px","96px"],radii:["6px","8px","9999px","3px"],shadows:["rgba(0,0,0,0.08) 0px 0px 0px 1px","rgb(235,235,235) 0px 0px 0px 1px","rgba(0,0,0,0.04) 0px 2px 2px 0px","rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px","rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px","var(--shadow-ring)","var(--shadow-ring-light)","var(--shadow-card)","var(--shadow-card-full)","0 0 0 2px var(--focus-blue)","0 0 0 2px var(--ship-red)"]},Fd={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:4,fontFamily:"var(--font-sans)",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal",backgroundColor:null},content:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"var(--font-sans)",letterSpacing:"-0.04em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"var(--font-sans)",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},header:{color:"theme-primary",fontFamily:"var(--font-sans)",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"var(--font-sans)"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)",fontStyle:"normal",letterSpacing:"-0.04em"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)",fontStyle:"normal",letterSpacing:"-0.04em"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.04em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"var(--font-sans)"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"6px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:"6px"},trigger:{color:"theme-primary",fontFamily:"var(--font-sans)"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:4},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"-0.04em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.04em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"var(--font-sans)"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:4},title:{color:"theme-primary",fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"var(--font-sans)"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"var(--font-sans)"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"6px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"var(--font-sans)"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"6px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"var(--font-sans)"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"var(--font-sans)"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"var(--font-sans)"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},zd={cornerStyle:"sharp",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.04em",accentTreatment:"flat",signatureMotif:"▲",density:"comfortable",surfaceTone:"mono",cardRadius:4,pillRadius:4,badgeRadius:4,voice:"deploy-geometric"},Md={metadata:Td,theme:Id,tokens:Rd,components:Fd,personality:zd},Dt={airbnb:oc,apple:ic,coinbase:mc,figma:bc,linear:vc,nike:Mc,notion:Ec,revolut:Oc,shopify:Kc,spacex:od,spotify:id,stripe:md,tesla:bd,uber:vd,vercel:Md},Wd=Object.values(Dt),Va=Ks,rr=e=>!!e&&typeof e=="object"&&!Array.isArray(e)&&Object.prototype.toString.call(e)==="[object Object]",$t=e=>e,Ne=(...e)=>{const o={};return e.forEach(t=>{rr(t)&&Object.entries(t).forEach(([n,a])=>{if(a!=null){if(rr(a)&&rr(o[n])){o[n]=Ne(o[n],a);return}o[n]=a}})}),o},Aa=e=>{if(Array.isArray(e)||!rr(e))return e;const o={};for(const[t,n]of Object.entries(e))n!==null&&(o[t]=rr(n)?Aa(n):n);return o},Lt=(e,o)=>{if(!o)return{};const t=o.components[e]||{};return $t(Aa(t))},Ea=(e,o,t)=>{const{config:n,...a}=o,i=Lt(e,t),s=Ne(i,n||{});return $t(Ne(s,a))},Da=p.createContext({isEnabled:!1}),_t=({children:e,config:o,configId:t,mode:n})=>{const a=o||(t?Dt[t]:null)||Va,{themeMode:i}=l.useTheme(),s=n??i??a.metadata.defaultAppearance,c=p.useMemo(()=>({config:a,configId:a.metadata.id,isEnabled:!0}),[a]);return r.jsx(Da.Provider,{value:c,children:r.jsx(l.ThemeProvider,{theme:a.theme,mode:s,transparentWrapper:!0,children:r.jsx("div",{"data-design-system":a.metadata.id,"data-appearance":s,style:{display:"contents"},children:e})})})},Lr=()=>p.useContext(Da),Lo=e=>{const{config:o}=Lr();return Lt(e,o)},he=(e,o)=>{const{config:t}=Lr();return Ea(e,o,t)},$a=p.createContext({expandedItems:[],toggleItem:()=>{},isItemExpanded:()=>!1,type:"single",collapsible:!1,baseId:""}),Hd=({children:e,value:o})=>r.jsx($a.Provider,{value:o,children:e}),La=()=>{const e=p.useContext($a);if(!e)throw new Error("useAccordionContext must be used within an AccordionProvider");return e},Pd=({value:e,children:o,isDisabled:t=!1,views:n,...a})=>{var h;const{isItemExpanded:i,baseId:s}=La(),c=Lo("accordion"),d=Ne({item:(h=c.views)==null?void 0:h.container},n),u=i(e),m=`${s}-trigger-${e}`,g=`${s}-content-${e}`;return r.jsx(l.View,{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",overflow:"hidden",opacity:t?.5:1,pointerEvents:t?"none":"auto","data-state":u?"open":"closed","data-disabled":t?"":void 0,...d==null?void 0:d.item,...a,children:p.Children.map(o,f=>p.isValidElement(f)?p.cloneElement(f,{...f.props,value:e,isExpanded:u,isDisabled:t,triggerId:m,contentId:g}):f)})},Vd=({children:e,value:o,isExpanded:t,isDisabled:n,triggerId:a,contentId:i,views:s,asChild:c=!1,...d})=>{var y;const{toggleItem:u}=La(),m=Lo("accordion"),g=Ne({container:(y=m.views)==null?void 0:y.trigger},s),f={id:a,"aria-expanded":t,"aria-controls":i,"aria-disabled":n,"data-state":t?"open":"closed","data-disabled":n?"":void 0,onClick:()=>{o&&!n&&u(o)},padding:16,cursor:n?"not-allowed":"pointer",alignItems:"center",justifyContent:"space-between",width:"100%",style:{backgroundColor:"transparent"},...g==null?void 0:g.container,...d};if(c&&p.isValidElement(e)){const k=p.Children.only(e);return p.cloneElement(k,{...f,...k.props})}return r.jsxs(l.Horizontal,{...f,children:[e,r.jsx(l.View,{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",transform:t?"rotate(180deg)":"rotate(0deg)",...g==null?void 0:g.icon,children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M16.59 8.59L12 13.17L7.41 8.59L6 10L12 16L18 10L16.59 8.59Z",fill:"currentColor"})})})]})},Ad=({children:e,isExpanded:o,isDisabled:t,triggerId:n,contentId:a,views:i,...s})=>{var S;const c=Lo("accordion"),d=Ne({container:(S=c.views)==null?void 0:S.content},i),u=260,m=p.useRef(null),g=p.useRef(null),[h,f]=p.useState(!!o),[y,k]=p.useState(o?"none":"0px"),[b,C]=p.useState(o?1:0);return p.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]),p.useEffect(()=>{var j;if(g.current&&(clearTimeout(g.current),g.current=null),o){f(!0),requestAnimationFrame(()=>{var v;const x=((v=m.current)==null?void 0:v.scrollHeight)??0;k(`${x}px`),C(1)});return}const w=((j=m.current)==null?void 0:j.scrollHeight)??0;k(`${w}px`),C(1),requestAnimationFrame(()=>{k("0px"),C(0)}),g.current=setTimeout(()=>{f(!1)},u)},[o,e]),p.useEffect(()=>{var j;if(!o||!h)return;const w=((j=m.current)==null?void 0:j.scrollHeight)??0;k(`${w}px`)},[e,o,h]),h?r.jsx(l.View,{id:a,role:"region","aria-labelledby":n,overflow:"hidden",maxHeight:y,opacity:b,transition:`max-height ${u}ms cubic-bezier(0.22, 1, 0.36, 1), opacity ${u}ms ease`,"data-state":o?"open":"closed","data-disabled":t?"":void 0,style:{backgroundColor:"transparent"},...d==null?void 0:d.container,...s,children:r.jsx(l.View,{ref:m,padding:16,children:e})}):null},Ed=({children:e,shape:o="rounded",variant:t="default",views:n,baseId:a,type:i,collapsible:s,themeMode:c,...d})=>r.jsx(l.Vertical,{width:"100%","data-orientation":"vertical",...Bs[o],...Os[t],...n==null?void 0:n.container,...d,children:e}),Dd=e=>{const o=he("accordion",e),{children:t,type:n="single",value:a,defaultValue:i,onValueChange:s,collapsible:c=!1,shape:d="rounded",variant:u="default",views:m,...g}=o,h=Array.isArray(i)?i:i?[i]:void 0,f=_s({type:n,value:a,defaultValue:i??h,onValueChange:s,collapsible:c});return r.jsx(Hd,{value:{expandedItems:f.expandedItems,toggleItem:f.toggleItem,isItemExpanded:f.isItemExpanded,type:f.type,collapsible:f.collapsible,baseId:f.baseId},children:r.jsx(Ed,{shape:d,variant:u,views:m,baseId:f.baseId,type:f.type,collapsible:f.collapsible,...g,children:t})})},De=Dd;De.Item=Pd;De.Trigger=Vd;De.Content=Ad;const $d=({isOpen:e,defaultOpen:o=!1,value:t,defaultValue:n,isMulti:a=!1,onOpenChange:i,onClose:s})=>{const c=typeof e=="boolean",d=t!==void 0,u=n??(a?[]:""),[m,g]=p.useState(o),[h,f]=p.useState(u),y=c?!!e:m,k=d?t:h,b=p.useCallback(w=>{c||g(w),i==null||i(w),w||s==null||s()},[c,s,i]),C=p.useCallback(()=>{b(!1)},[b]),S=p.useCallback(w=>{d||f(w)},[d]);return{isSheetOpen:y,selectedValue:k,setSelectedValue:S,closeSheet:C}},Bt=({children:e,containerId:o="portal-root"})=>{const[t,n]=p.useState(null);return p.useEffect(()=>{let a=document.getElementById(o),i=!1;return a||(i=!0,a=document.createElement("div"),a.setAttribute("id",o),document.body.appendChild(a)),n(a),()=>{i&&a&&a.parentNode&&a.childNodes.length===0&&a.parentNode.removeChild(a)}},[o]),t?Ls.createPortal(e,t):null},tt=new Map,Ld=(e,o,t)=>(tt.has(e)||tt.set(e,p.lazy(()=>import("lucide-react/dynamicIconImports").then(n=>{const a=n.default[e];return a?a():{default:()=>r.jsx(r.Fragment,{children:o||t})}}))),tt.get(e)),Mn=p.memo(({widthHeight:e,color:o="currentColor",transform:t,orientation:n="up",children:a,...i})=>r.jsx(l.View,{widthHeight:e,color:o,display:"flex",alignItems:"center",justifyContent:"center",transform:t||(n==="left"?"rotate(-90deg)":n==="right"?"rotate(90deg)":n==="up"?"rotate(0deg)":n==="down"?"rotate(180deg)":"none"),...i,children:a})),zr=p.memo(({name:e="circle",widthHeight:o=24,color:t="currentColor",filled:n=!1,strokeWidth:a=1,size:i,children:s,fallback:c,...d})=>{const{getColor:u}=l.useTheme(),m=i||o,g=p.useMemo(()=>{const y=u(t);return{fill:n?y:"none",stroke:y,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round"}},[n,t,a,u]);if(!e)return r.jsx(Mn,{widthHeight:o,color:t,...d,children:s});const h=e.toLowerCase().replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),f=Ld(h,c,s);return r.jsx(Mn,{widthHeight:m,color:t,...d,children:r.jsx(p.Suspense,{fallback:c||null,children:r.jsx(f,{size:m,...g})})})}),q=(e,o={})=>{const t=n=>r.jsx(zr,{name:e,...o,...n});return t.displayName=`${e}Icon`,t},_d=q("user",{filled:!1}),Bd=q("circle-help",{filled:!1}),Od=q("folder",{filled:!1}),de=q("chevron-up",{filled:!1}),Nd=q("grip-vertical",{filled:!1}),po=q("file",{filled:!1}),qd=q("video",{filled:!1}),Ud=q("image",{filled:!1}),Vo=q("volume",{filled:!1}),Gd=q("twitter",{filled:!1}),Yd=q("x",{filled:!1}),Kd=q("twitch",{filled:!1}),ze=q("x",{filled:!1,strokeWidth:2}),Xd=q("instagram",{filled:!1}),Jd=q("youtube",{filled:!1}),Qd=q("facebook",{filled:!1}),Zd=q("linkedin",{filled:!1}),eu=q("at-sign",{filled:!1}),_a=q("minus",{filled:!1}),Ze=q("info",{filled:!1}),Ba=q("play",{filled:!1}),ou=q("pause",{filled:!1}),ru=q("heart",{filled:!1}),tu=q("star",{filled:!1}),nu=q("save",{filled:!1}),Ot=q("triangle-alert",{filled:!1}),au=q("battery",{filled:!1}),lu=q("bookmark",{filled:!1}),iu=q("cloud",{filled:!1}),su=q("copy",{filled:!1}),_r=q("trash",{filled:!1}),cu=_r,du=q("edit",{filled:!1}),Nt=q("mic",{filled:!1}),Br=q("square",{filled:!1}),qt=q("send",{filled:!1}),Ut=q("loader",{filled:!1}),ar=q("paperclip",{filled:!1}),Mr=q("search",{filled:!1}),uu=q("home",{filled:!1}),Oa=q("settings",{filled:!1}),pu=q("download",{filled:!1}),Na=q("share",{filled:!1}),lr=q("check",{filled:!1}),mu=q("plus",{filled:!1}),Gt=q("eye-off",{filled:!1}),Yt=q("eye",{filled:!1}),gu=q("lock",{filled:!1}),hu=q("user",{filled:!1}),qa=q("external-link",{filled:!1}),Kt=q("check-circle",{filled:!1}),Or=q("alert-circle",{filled:!1}),fu=q("bell",{filled:!1}),yu=q("file-text",{filled:!1}),xu=q("bar-chart",{filled:!1}),bu=q("moon",{filled:!1}),Ua=q("panel-left",{filled:!1}),Xt=q("upload",{filled:!1}),ku=lr,Cu=e=>r.jsx(de,{orientation:"left",...e}),Su=q("zoom-out",{filled:!1}),ju=q("type",{filled:!1}),wu=q("shapes",{filled:!1}),vu=q("rotate-cw",{filled:!1}),Tu=q("gift",{filled:!1}),Iu=q("shield",{filled:!1}),Ru=q("log-out",{filled:!1}),Fu=q("power",{filled:!1}),zu=q("link",{filled:!1}),Mu=q("layout",{filled:!1}),Wu=q("zap",{filled:!1}),Hu=q("credit-card",{filled:!1}),Pu=q("more-horizontal",{filled:!1}),Vu=_r,Au=q("filter",{filled:!1}),Eu=q("calendar",{filled:!1}),Du=q("clock",{filled:!1}),$u=q("map-pin",{filled:!1}),Lu=q("menu",{filled:!1}),_u=q("refresh-cw",{filled:!1}),Bu=q("printer",{filled:!1}),Ou=q("wand",{filled:!1}),Nu=q("thumbs-down",{filled:!1}),qu=q("thumbs-up",{filled:!1}),Uu=q("camera",{filled:!1}),Gu=q("bluetooth",{filled:!1}),Yu=q("unlock",{filled:!1}),Ku=q("wifi",{filled:!1}),Xu=q("arrow-right",{filled:!1}),Ju=q("arrow-up",{filled:!1}),Qu=q("loader",{filled:!1}),Zu=q("sliders-horizontal",{filled:!1}),ep=q("crop",{filled:!1}),op=q("zoom-in",{filled:!1}),rp=q("grip-horizontal",{filled:!1}),Ga=q("mouse-pointer-2",{filled:!1}),tp={sm:{minHeight:44,paddingVertical:10,paddingHorizontal:16},md:{minHeight:52,paddingVertical:12,paddingHorizontal:18},lg:{minHeight:60,paddingVertical:14,paddingHorizontal:20}},So={sm:{label:14,description:12},md:{label:16,description:13},lg:{label:18,description:14}},Wn=(e,o)=>e.id??e.value??`action-sheet-item-${o}`,Ya=e=>e.value??e.id,Hn=e=>e.disabled||e.isDisabled||e.divider,np=(e,o)=>{if(typeof e.selected=="boolean")return e.selected;const t=Ya(e);return t?Array.isArray(o)?o.includes(t):o===t:!1},ap=({isSheetOpen:e,closeSheet:o,selectedValue:t,setSelectedValue:n,isClosePrevented:a=!1,dismissOnBackdropPress:i=!0,title:s,description:c,header:d,children:u,items:m=[],isMulti:g=!1,closeOnSelect:h,onSelect:f,onChange:y,showCancel:k=!1,cancelLabel:b="Cancel",onCancel:C,showHandle:S=!0,size:w="md",maxHeight:j="88vh",views:x,animationType:v,...T})=>{if(!e)return null;const F=()=>{a||o()},M=()=>{i&&F()},E=()=>{C==null||C(),F()},I=V=>{var R;if(Hn(V))return;const H=Ya(V);let z=t;if(H){if(g){const W=Array.isArray(t)?t:t?[t]:[];z=W.includes(H)?W.filter(D=>D!==H):[...W,H]}else z=H;n(z),f==null||f(H,V),y==null||y(z,V)}(R=V.onPress)==null||R.call(V,V),(V.closeOnSelect??h??!g)&&F()};return r.jsx(Bt,{children:r.jsx(l.View,{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:9999,backgroundColor:"color-dark-50-360",display:"flex",justifyContent:"flex-end",onClick:M,...x==null?void 0:x.overlay,children:r.jsxs(l.Vertical,{width:"100%",maxWidth:520,maxHeight:j,marginHorizontal:"auto",backgroundColor:"color-white",borderTopLeftRadius:24,borderTopRightRadius:24,paddingTop:8,paddingBottom:12,overflow:"hidden",boxShadow:"0 -18px 48px rgba(15, 23, 42, 0.18)",onClick:V=>V.stopPropagation(),...x==null?void 0:x.container,...x==null?void 0:x.sheet,...T,children:[S&&r.jsx(l.View,{width:36,height:4,borderRadius:999,backgroundColor:"color-gray-300",alignSelf:"center",marginTop:4,marginBottom:8,...x==null?void 0:x.handle}),(s||c)&&r.jsxs(l.Vertical,{paddingHorizontal:20,paddingTop:6,paddingBottom:12,gap:4,...x==null?void 0:x.header,children:[s&&r.jsx(l.Text,{fontSize:18,lineHeight:24,fontWeight:"600",color:"color-gray-900",...x==null?void 0:x.title,children:s}),c&&r.jsx(l.Text,{fontSize:13,lineHeight:18,color:"color-gray-500",...x==null?void 0:x.description,children:c})]}),d,r.jsxs(l.Vertical,{overflowY:"auto",paddingBottom:4,...x==null?void 0:x.content,children:[m.map((V,H)=>{if(V.divider)return r.jsx(l.View,{height:1,backgroundColor:"color-gray-200",marginVertical:6,...x==null?void 0:x.divider},Wn(V,H));const z=np(V,t),P=Hn(V),R=P?"color-gray-400":V.destructive?"color-red-600":z?"theme-primary":"color-gray-900";return r.jsxs(l.Horizontal,{alignItems:"center",gap:12,opacity:P?.5:1,cursor:P?"not-allowed":"pointer",onClick:()=>I(V),...tp[w],...x==null?void 0:x.item,children:[V.icon&&r.jsx(l.View,{flexShrink:0,...x==null?void 0:x.itemIcon,children:V.icon}),r.jsxs(l.Vertical,{flex:1,gap:2,children:[typeof V.label=="string"?r.jsx(l.Text,{fontSize:So[w].label,lineHeight:So[w].label+6,fontWeight:z?"600":"400",color:R,...x==null?void 0:x.itemLabel,children:V.label}):V.label,V.description&&r.jsx(l.Text,{fontSize:So[w].description,lineHeight:So[w].description+5,color:"color-gray-500",...x==null?void 0:x.itemDescription,children:V.description})]}),z&&r.jsx(lr,{widthHeight:18,color:"theme-primary",...x==null?void 0:x.itemIndicator})]},Wn(V,H))}),u]}),k&&r.jsx(l.View,{marginTop:8,paddingHorizontal:12,paddingTop:8,borderTopWidth:1,borderTopColor:"color-gray-200",children:r.jsx(l.Horizontal,{minHeight:52,alignItems:"center",justifyContent:"center",borderRadius:14,backgroundColor:"color-gray-100",cursor:"pointer",onClick:E,...x==null?void 0:x.cancelButton,children:r.jsx(l.Text,{fontSize:So[w].label,lineHeight:So[w].label+6,fontWeight:"600",color:"color-gray-900",...x==null?void 0:x.cancelLabel,children:b})})})]})})})},lp=e=>{const o=$d(e);return r.jsx(ap,{...e,...o})},ip=lp,sp=e=>{const o=e==="dark";return{default:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",boxShadow:o?"0 1px 3px rgba(0, 0, 0, 0.3)":"0 1px 2px rgba(0, 0, 0, 0.05)"},content:{color:"color-gray-700"},icon:{color:"color-gray-500"}},info:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:o?"0 1px 3px rgba(29, 78, 216, 0.25)":"0 1px 2px rgba(59, 130, 246, 0.05)"},content:{color:"color-blue-700"},icon:{color:"color-blue-500"}},success:{container:{backgroundColor:"color-green-50",borderColor:"color-green-200",boxShadow:o?"0 1px 3px rgba(34, 197, 94, 0.2)":"0 1px 2px rgba(34, 197, 94, 0.05)"},content:{color:"color-green-700"},icon:{color:"color-green-500"}},error:{container:{backgroundColor:"color-red-50",borderColor:"color-red-200",boxShadow:o?"0 1px 3px rgba(239, 68, 68, 0.2)":"0 1px 2px rgba(239, 68, 68, 0.05)"},content:{color:"color-red-700"},icon:{color:"color-red-500"}},warning:{container:{backgroundColor:"color-orange-50",borderColor:"color-orange-200",boxShadow:o?"0 1px 3px rgba(249, 115, 22, 0.2)":"0 1px 2px rgba(249, 115, 22, 0.05)"},content:{color:"color-orange-700"},icon:{color:"color-orange-500"}}}},cp=p.memo(({icon:e,title:o="",views:t,description:n="",variant:a="default",themeMode:i,children:s,...c})=>{const{themeMode:d}=l.useTheme(),u=i||d,m=p.useMemo(()=>sp(u),[u]),g=()=>{var y;if(e)return e;const f={size:20,color:((y=t==null?void 0:t.icon)==null?void 0:y.color)??m[a].icon.color};switch(a){case"info":return r.jsx(Ze,{...f});case"success":return r.jsx(Kt,{...f});case"error":return r.jsx(Or,{...f});case"warning":default:return r.jsx(Ot,{...f})}};return r.jsxs(l.Horizontal,{gap:12,padding:"12px 16px",flexWrap:"nowrap",alignItems:"flex-start",borderRadius:"8px",borderWidth:"1px",borderStyle:"solid",borderColor:m[a].container.borderColor,backgroundColor:m[a].container.backgroundColor,boxShadow:m[a].container.boxShadow,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...t==null?void 0:t.container,...c,children:[r.jsx(l.View,{alignSelf:"flex-start",marginTop:"2px",...t==null?void 0:t.icon,children:g()}),r.jsxs(l.Vertical,{gap:4,children:[o?r.jsx(l.Text,{fontSize:"14px",fontWeight:"600",lineHeight:"20px",color:m[a].content.color,...t==null?void 0:t.title,children:o}):null,r.jsx(l.Text,{fontSize:"12px",fontWeight:"400",lineHeight:"16px",color:m[a].content.color,...t==null?void 0:t.description,children:n||s})]})]})}),dp=e=>{const o=he("alert",e);return r.jsx(cp,{...o})},Jt=dp,up=({ratio:e=16/9,children:o,views:t,...n})=>r.jsx(l.View,{width:"100%",position:"relative",overflow:"hidden",paddingTop:`${1/e*100}%`,borderRadius:8,...n,...t==null?void 0:t.center,children:r.jsx(l.View,{position:"absolute",top:0,right:0,bottom:0,left:0,...t==null?void 0:t.view,children:o})}),pp=({ratio:e,children:o,...t})=>r.jsx(up,{ratio:e,...t,children:o}),Ka=pp;function mp(e,o,t){return Math.min(Math.max(e,o),t)}const gp=({bars:e,isPaused:o,...t})=>{const a=[6,16,23,24,18,9,14,22,24,20,11,12,20,24,21,13,9,19,24,23,16,7,17,23,23,18,8,15,22,24,20,10];return r.jsx(l.Horizontal,{alignItems:"center",minWidth:120,gap:2,height:24,width:"100%",maxWidth:"100%",...t,children:e.map((i,s)=>r.jsx(l.View,{width:3,borderRadius:2,backgroundColor:o?"color-gray-300":i>=0?"theme-primary":"color-gray-300",style:{height:`${i>=0?mp(i*300,6,24):a[s%a.length]}px`}},s))})},Qt=({analyserNode:e,isPaused:o,...t})=>{const n=p.useRef(null),a=60,i=32,[s,c]=p.useState([]);return p.useEffect(()=>{if(!e){c(Array(a).fill(-1));return}const d=e.frequencyBinCount,u=new Uint8Array(d),m=()=>{e.getByteTimeDomainData(u);let g=0;for(let f=0;f<d;f++){const y=(u[f]-128)/128;g+=y*y}const h=Math.sqrt(g/d);p.startTransition(()=>{c(f=>{const k=[...f,h].slice(-a);return k.length<a?[...Array(a-k.length).fill(-1),...k]:k})})};return n.current=setInterval(m,i),()=>{n.current&&clearInterval(n.current)}},[e]),r.jsx(gp,{bars:s,isPaused:o,...t})},Nr=$o.create(e=>({visible:!1,title:"",subtitle:"",variant:"info",isClosable:!1,views:{},action:()=>{},actionText:"",showIcon:!1,timeout:3e3,show:(o,t="",n="",a,i,s,c,d,u)=>e({visible:!0,variant:o,title:t,subtitle:n,isClosable:a,views:i,action:s,actionText:c,showIcon:d,timeout:u}),hide:()=>e({visible:!1})})),Xa=(e,o,t,n)=>{Nr.getState().show(e,o,t,n==null?void 0:n.isClosable,n==null?void 0:n.views,n==null?void 0:n.action,n==null?void 0:n.actionText,n==null?void 0:n.showIcon,n==null?void 0:n.timeout)},Ja=()=>{Nr.getState().hide()},hp={info:{container:{backgroundColor:"color-white",border:"rgba(191, 219, 254, 0.95)"},icon:{color:"theme-primary",name:"InformationIcon"},content:{color:"color-gray-900"},close:{color:"color-gray-500",name:"CloseIcon"}},success:{container:{backgroundColor:"#F0FDF4",border:"#BBF7D0"},icon:{color:"#16A34A",name:"SuccessIcon"},content:{color:"#14532D"},close:{color:"#15803D",name:"CloseIcon"}},error:{container:{backgroundColor:"#FEF2F2",border:"#FECACA"},icon:{color:"#DC2626",name:"ErrorIcon"},content:{color:"#7F1D1D"},close:{color:"#B91C1C",name:"CloseIcon"}},warning:{container:{backgroundColor:"#FFF7ED",border:"#FED7AA"},icon:{color:"#EA580C",name:"WarningIcon"},content:{color:"#9A3412"},close:{color:"#C2410C",name:"CloseIcon"}}},Qa=({variant:e,hide:o,title:t,subtitle:n,theme:a,action:i,actionText:s,showIcon:c=!1,isClosable:d=!1,timeout:u=3e3,views:m})=>{var C,S;p.useEffect(()=>{if(u&&!d){const w=setTimeout(()=>{o()},u);return()=>{clearTimeout(w)}}},[]);const g=a??hp,h=!!(i&&s),f={borderWidth:1,borderStyle:"solid",borderRadius:12,borderColor:`${g[e].container.border}`,boxShadow:"0 8px 24px rgba(15, 23, 42, 0.06)"},y={info:"#3b82f6",success:"#4ade80",warning:"#f97316",error:"#ef4444"}[e],k={info:r.jsx(Ze,{widthHeight:24,color:y,...m==null?void 0:m.icon}),success:r.jsx(Kt,{widthHeight:24,color:y,...m==null?void 0:m.icon}),warning:r.jsx(Ot,{widthHeight:24,color:y,...m==null?void 0:m.icon}),error:r.jsx(Or,{widthHeight:24,color:y,...m==null?void 0:m.icon})}[e],b=c&&k;return r.jsxs(l.Horizontal,{role:"messageContent",gap:12,width:"100%",maxWidth:520,flexWrap:"nowrap",position:"relative",alignItems:"flex-start",padding:"12px 14px",color:`${g[e].content.color}`,backgroundColor:`${g[e].container.backgroundColor}`,onClick:d?()=>{}:()=>{o()},...f,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...m==null?void 0:m.container,children:[b&&k,r.jsxs(l.Vertical,{gap:4,width:"100%",children:[r.jsx(l.Text,{size:"md",weight:"semiBold",...m==null?void 0:m.title,children:t}),n&&r.jsx(l.Text,{size:"sm",lineHeight:"20px",color:g[e].content.color,...m==null?void 0:m.subtitle,children:n})]}),h&&r.jsx(l.View,{as:"button",type:"button",onClick:i,backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:g[e].container.border,borderRadius:"9999px",padding:"6px 12px",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",...m==null?void 0:m.actionText,children:r.jsx(l.Text,{whiteSpace:"nowrap",size:"sm",weight:"semiBold",color:g[e].content.color,children:s})}),d&&r.jsx(l.View,{position:"absolute",zIndex:1e4,right:8,top:8,onClick:()=>{o()},cursor:"pointer",padding:"4px",borderRadius:"9999px",transition:"background-color 0.2s ease",...(C=m==null?void 0:m.closingIcon)==null?void 0:C.container,children:r.jsx(ze,{widthHeight:16,color:g[e].close.color,...(S=m==null?void 0:m.closingIcon)==null?void 0:S.icon})})]})},fp=({container:e,theme:o,position:t="topRight"})=>{const{visible:n,title:a,variant:i,subtitle:s,isClosable:c,views:d,action:u,actionText:m,showIcon:g,timeout:h}=Nr(),f={topLeft:{top:6,left:8},topRight:{top:6,right:8},bottomLeft:{bottom:8,left:6},bottomRight:{bottom:8,right:6}}[t],y=()=>r.jsx(Qa,{variant:i,subtitle:s,show:n,title:a,theme:o,isClosable:c,views:d,action:u,actionText:m,showIcon:g,timeout:h,hide:()=>Ja()}),k=e?p.cloneElement(e,{},y()):r.jsx(l.View,{position:"absolute",zIndex:1e4,...f,children:y()});return n?k:null},yp=(e,o)=>{const t=document.createElement("video");t.preload="metadata",t.onloadedmetadata=()=>{t.currentTime=1},t.oncanplay=()=>{const n=document.createElement("canvas");n.width=t.videoWidth,n.height=t.videoHeight;const a=n.getContext("2d");if(a){a.drawImage(t,0,0,n.width,n.height);const i=n.toDataURL("image/jpeg");o(i)}URL.revokeObjectURL(t.src)},t.src=URL.createObjectURL(e)},xp=({maxSize:e=100*1024*1024,onFileSelect:o,onMultipleFileSelect:t,validateFile:n,thumbnail:a,multiple:i=!1,onError:s=c=>{Xa("error","Error",c)}})=>{const c=p.useRef(null),d=p.useRef(null),[u,m]=p.useState(null),[g,h]=p.useState([]),[f,y]=p.useState(null),[k,b]=p.useState(null),[C,S]=p.useState(a||null),w=p.useCallback(x=>{const v=x.target.files;if(y(null),!v||v.length===0){s("No file selected"),y("No file selected");return}if(i){const T=Array.from(v),F=[];for(const M of T){if(M.size>e){s(`File ${M.name} exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File ${M.name} exceeds ${Math.round(e/(1024*1024))}MB.`);continue}if(n){const E=n(M);if(E){s(`${M.name}: ${E}`),y(`${M.name}: ${E}`);continue}}F.push(M)}F.length>0&&(h(F),t&&t(F))}else{const T=v[0];if(T.size>e){s(`File exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File exceeds ${Math.round(e/(1024*1024))}MB.`);return}if(n){const F=n(T);if(F){s(F),y(F);return}}b(URL.createObjectURL(T)),T.type.startsWith("video/")&&yp(T,S),o&&(m(T),o(T))}},[e,o,t,n,i]),j=()=>{const x=c.current;x&&typeof x.click=="function"&&x.click()};return p.useEffect(()=>()=>{typeof URL<"u"&&typeof URL.revokeObjectURL=="function"&&(k&&URL.revokeObjectURL(k),C&&URL.revokeObjectURL(C))},[k,C]),{previewUrl:k,thumbnailUrl:C,errorMessage:f,fileInputRef:c,videoRef:d,selectedFile:u,selectedFiles:g,handleFileChange:w,handleClick:j}},bp=({accept:e,isLoading:o=!1,progress:t=0,icon:n,text:a,previewUrl:i,thumbnailUrl:s,errorMessage:c,fileInputRef:d,videoRef:u,selectedFile:m,selectedFiles:g,handleFileChange:h,handleClick:f,multiple:y=!1,containerProps:k,errorMessageProps:b,progressProps:C,videoProps:S,imageProps:w,iconProps:j,textProps:x,fileType:v,previewUrl:T,renderError:F=({errorMessage:P,errorMessageProps:R,themeMode:W})=>r.jsx(l.Text,{color:"red",fontSize:12,marginTop:8,...R,...z==null?void 0:z.text,children:P}),renderText:M=({text:P,textProps:R})=>r.jsx(l.Text,{marginTop:8,...R,...z==null?void 0:z.text,children:P}),renderFile:E=({selectedFile:P,textProps:R})=>P?r.jsxs(l.Center,{marginTop:8,gap:10,flexDirection:"column",...z==null?void 0:z.container,children:[r.jsx(l.Text,{maxLines:2,...R,...z==null?void 0:z.text,children:P.name}),r.jsxs(l.Text,{...R,...z==null?void 0:z.text,children:["(",Math.round(P.size/1024)," KB)"]})]}):null,renderVideo:I=({selectedFile:P,videoRef:R,videoProps:W})=>r.jsx(l.View,{width:"100%",height:"100%",position:"relative",...z==null?void 0:z.view,children:r.jsx(l.View,{as:"video",width:"100%",height:"100%",src:P?URL.createObjectURL(P):void 0,style:{objectFit:"cover"},ref:R,...W,...z==null?void 0:z.view})}),renderImage:V=({previewUrl:P,imageProps:R})=>(console.log("Rendering image with URL:",P),r.jsx(l.View,{width:"100%",height:"100%",position:"relative",...z==null?void 0:z.view,children:r.jsx(l.Image,{src:P,alt:"Preview",width:"100%",height:"100%",objectFit:"cover",style:{maxHeight:"100%",maxWidth:"100%"},...R,...z==null?void 0:z.image})})),renderProgress:H=({progress:P,progressProps:R})=>r.jsxs(l.Horizontal,{gap:8,alignItems:"center",...R,...z==null?void 0:z.horizontal,children:[r.jsx(l.View,{height:4,backgroundColor:"color-black-100",width:"100%",borderRadius:2,...z==null?void 0:z.view,children:r.jsx(l.View,{height:4,width:`${P}%`,borderRadius:2,backgroundColor:"color-dark-50",...z==null?void 0:z.view})}),r.jsxs(l.Text,{fontSize:12,...z==null?void 0:z.text,children:[P,"%"]})]}),views:z={}})=>{const P=T||i;return r.jsxs(l.Center,{onClick:f,cursor:"pointer",border:"1px solid color-black-100",borderRadius:8,padding:16,flexDirection:"column",overflow:"hidden",position:"relative",height:m&&t===100?"200px":"auto",...k,...z==null?void 0:z.container,children:[t===100&&v==="image"&&P&&V({previewUrl:P,imageProps:w}),t===100&&v==="video"&&s&&I({selectedFile:m,thumbnailUrl:s,videoRef:u,videoProps:S,imageProps:w}),t===100&&v==="file"&&m&&E({selectedFile:m,textProps:x}),t<100&&(n||r.jsx(Xt,{widthHeight:32,...j})),!o&&!m&&a&&M({text:a,textProps:x}),o&&H({progress:t,progressProps:C}),!o&&c&&F({errorMessage:c,errorMessageProps:b}),r.jsx(l.Input,{type:"file",ref:d,onChange:h,accept:e,multiple:y,style:{display:"none"},...z==null?void 0:z.view})]})},qr=({accept:e="*/*",icon:o,text:t,maxSize:n,onFileSelect:a,onMultipleFileSelect:i,validateFile:s,isLoading:c=!1,progress:d=0,fileType:u,multiple:m=!1,...g})=>{const{previewUrl:h,thumbnailUrl:f,errorMessage:y,videoRef:k,fileInputRef:b,selectedFile:C,selectedFiles:S,handleFileChange:w,handleClick:j}=xp({maxSize:n,onFileSelect:a,onMultipleFileSelect:i,validateFile:s,multiple:m}),v=(()=>{if(u)return u;if(C)return C.type.startsWith("image/")?"image":C.type.startsWith("video/")?"video":"file"})();return r.jsx(bp,{handleClick:j,accept:e,isLoading:c,progress:d,icon:o,text:t,maxSize:n,onFileSelect:a,validateFile:s,errorMessage:y,handleFileChange:w,selectedFile:C,selectedFiles:S,videoRef:k,fileInputRef:b,previewUrl:h,thumbnailUrl:f,fileType:v,multiple:m,...g})};function kp(e){const o=Math.floor(e/60),t=e%60;return`${o}:${t.toString().padStart(2,"0")}`}function Cp({onAudio:e,recording:o,paused:t,audioBlob:n,analyserNode:a,duration:i,error:s,startRecording:c,stopRecording:d,pauseRecording:u,resumeRecording:m,resetRecording:g,handleFileChange:h,...f}){const[y,k]=p.useState(null);p.useEffect(()=>{if(n){const S=URL.createObjectURL(n);return k({url:S,label:`recording-${Date.now()}.webm`}),()=>{URL.revokeObjectURL(S)}}return()=>{}},[n]);const b=()=>{y!=null&&y.url&&URL.revokeObjectURL(y.url),k(null),g()},C=S=>{e(S),y!=null&&y.url&&URL.revokeObjectURL(y.url),k({url:URL.createObjectURL(S),label:S.name})};return r.jsxs(l.Vertical,{gap:"10px",width:"100%",...f,children:[r.jsxs(l.Horizontal,{gap:12,alignItems:"center",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[r.jsx(qr,{accept:"audio/*",icon:r.jsx(ar,{widthHeight:16}),maxSize:100*1024*1024,onFileSelect:C,fileType:"file",multiple:!1,renderError:({errorMessage:S})=>null,views:{container:{width:"36px",height:"36px",cursor:"pointer",border:"1px solid color-gray-200",borderRadius:"10px",backgroundColor:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:"color-gray-50",borderColor:"color-gray-300"}}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"10px",width:"36px",height:"36px"},validateFile:S=>S.size>100*1024*1024?"File size exceeds 100MB limit":S.type.startsWith("audio/")?null:"Only audio files are allowed"}),r.jsx(l.View,{as:"button",type:"button",onClick:o?d:c,width:"36px",height:"36px",minWidth:"36px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"theme-primary",color:"color-white",borderRadius:"999px",border:"0",cursor:"pointer",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.92},children:o?r.jsx(Br,{widthHeight:14,color:"color-white",filled:!1}):r.jsx(Nt,{widthHeight:18,color:"color-white",filled:!1})}),r.jsx(l.View,{flex:1,minWidth:120,children:r.jsx(Qt,{analyserNode:o?a:null,isPaused:!o||t})}),r.jsx(l.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",whiteSpace:"nowrap",children:kp(i)})]}),y&&!o&&r.jsxs(l.Vertical,{gap:"8px",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[r.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:8,children:[r.jsx(l.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:y.label}),r.jsx(l.View,{as:"button",type:"button",onClick:b,width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",border:"0",backgroundColor:"transparent",color:"color-gray-500",cursor:"pointer",children:r.jsx(ze,{widthHeight:14,color:"currentColor"})})]}),r.jsx(l.View,{as:"audio",controls:!0,src:y.url,width:"100%"})]}),s&&r.jsx(l.Text,{fontSize:"11px",lineHeight:"16px",color:"color-red-500",children:s})]})}function Za(){const[e,o]=p.useState(!1),[t,n]=p.useState(!1),[a,i]=p.useState(0),[s,c]=p.useState(null),[d,u]=p.useState(null),[m,g]=p.useState(null),h=p.useRef(null),f=p.useRef(null),y=p.useRef(null),k=p.useRef(null),b=p.useRef([]),C=p.useRef(null),S=typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":"audio/webm",w=p.useCallback(()=>{h.current&&(h.current.state!=="inactive"&&h.current.stop(),h.current=null),k.current&&(k.current.getTracks().forEach(M=>M.stop()),k.current=null),f.current&&(f.current.close(),f.current=null),y.current&&(y.current.disconnect(),y.current=null),u(null),C.current&&(clearInterval(C.current),C.current=null)},[]),j=p.useCallback(async()=>{w(),c(null),i(0),b.current=[];try{const M=await navigator.mediaDevices.getUserMedia({audio:!0});k.current=M;const E=MediaRecorder.isTypeSupported(S)?S:void 0,I=new MediaRecorder(M,E?{mimeType:E}:void 0);h.current=I;const V=new(window.AudioContext||window.webkitAudioContext);f.current=V;const H=V.createMediaStreamSource(M),z=V.createAnalyser();z.fftSize=256,z.smoothingTimeConstant=.8,H.connect(z),y.current=z,u(z),I.ondataavailable=P=>{P.data.size>0&&b.current.push(P.data)},I.onstop=()=>{const P=new Blob(b.current,{type:I.mimeType||S});g(P),w()},I.start(),o(!0),n(!1),C.current=setInterval(()=>{i(P=>P+1)},1e3)}catch{c("Microphone access denied or unavailable."),w()}},[w]),x=p.useCallback(()=>{h.current&&h.current.state!=="inactive"&&h.current.stop(),o(!1),n(!1),C.current&&(clearInterval(C.current),C.current=null)},[]),v=p.useCallback(()=>{h.current&&h.current.state==="recording"&&(h.current.pause(),n(!0),C.current&&(clearInterval(C.current),C.current=null))},[]),T=p.useCallback(()=>{h.current&&h.current.state==="paused"&&(h.current.resume(),n(!1),C.current||(C.current=setInterval(()=>{i(M=>M+1)},1e3)))},[]),F=p.useCallback(()=>{w(),o(!1),n(!1),g(null),i(0),c(null),b.current=[]},[w]);return p.useEffect(()=>()=>w(),[w]),{recording:e,paused:t,audioBlob:m,analyserNode:d,duration:a,error:s,startRecording:j,stopRecording:x,pauseRecording:v,resumeRecording:T,resetRecording:F}}function Sp(e){const{onAudio:o}=e,{recording:t,paused:n,audioBlob:a,analyserNode:i,duration:s,error:c,startRecording:d,stopRecording:u,pauseRecording:m,resumeRecording:g,resetRecording:h}=Za();return p.useEffect(()=>{if(a&&o){const y=new File([a],"recording.webm",{type:a.type||"audio/webm;codecs=opus"});o(y)}},[a,o]),{recording:t,paused:n,audioBlob:a,analyserNode:i,duration:s,error:c,startRecording:d,stopRecording:u,pauseRecording:m,resumeRecording:g,resetRecording:h,handleFileChange:y=>{var b;const k=(b=y.target.files)==null?void 0:b[0];k&&o&&o(k)}}}function jp(e){const o=Sp(e);return r.jsx(Cp,{...e,...o})}const wp=()=>{const[e,o]=p.useState(!1);return{imageError:e,setImageError:o}},vp={xs:24,sm:32,md:44,lg:56,xl:72},nt={container:{borderRadius:"50%",overflow:"hidden",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"theme-primary",transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},fallback:{fontWeight:"600",color:"color-white",letterSpacing:"-0.02em"},image:{objectFit:"cover",transition:"opacity 0.2s ease"}},Tp=({src:e,size:o="md",fallback:t="IM",views:n,imageError:a,setImageError:i,onClick:s=()=>{},children:c})=>{const d=vp[o],u={...nt.image,...(n==null?void 0:n.image)||{}};return r.jsxs(l.Center,{role:"avatar",width:d,height:d,...nt.container,borderColor:a?"color-gray-400":"transparent",onClick:s,...n==null?void 0:n.container,children:[!a&&e?r.jsx(l.Image,{alt:"IM",src:e,style:u,width:d,height:d,onError:()=>i(!0)}):r.jsx(l.Text,{size:o,...nt.fallback,...n==null?void 0:n.fallback,children:t}),c]})},Ip=e=>{const o=he("avatar",e),{src:t,size:n,views:a,fallback:i,onClick:s,children:c}=o,{imageError:d,setImageError:u}=wp();return r.jsx(Tp,{src:t,size:n,views:a,fallback:i,imageError:d,setImageError:u,onClick:s,children:c})},el=Ip,Rp={xs:{minWidth:"16px",height:"16px",padding:"0 4px",fontSize:"9px",fontWeight:"600",lineHeight:"12px",letterSpacing:"-0.01em"},sm:{minWidth:"20px",height:"20px",padding:"0 6px",fontSize:"10px",fontWeight:"600",lineHeight:"14px",letterSpacing:"-0.01em"},md:{minWidth:"24px",height:"24px",padding:"0 8px",fontSize:"12px",fontWeight:"600",lineHeight:"16px",letterSpacing:"-0.01em"},lg:{minWidth:"28px",height:"28px",padding:"0 10px",fontSize:"14px",fontWeight:"600",lineHeight:"20px",letterSpacing:"-0.01em"},xl:{minWidth:"32px",height:"32px",padding:"0 12px",fontSize:"16px",fontWeight:"600",lineHeight:"24px",letterSpacing:"-0.01em"}},Fp={xs:{gap:"6px",padding:"3px 8px 3px 3px"},sm:{gap:"8px",padding:"4px 10px 4px 4px"},md:{gap:"12px",padding:"6px 16px 6px 6px"},lg:{gap:"12px",padding:"7px 18px 7px 7px"},xl:{gap:"14px",padding:"8px 20px 8px 8px"}},zp={xs:{padding:"2px 6px",fontSize:"9px",lineHeight:"12px"},sm:{padding:"3px 8px",fontSize:"10px",lineHeight:"14px"},md:{padding:"6px 12px",fontSize:"11px",lineHeight:"14px"},lg:{padding:"7px 14px",fontSize:"12px",lineHeight:"16px"},xl:{padding:"8px 16px",fontSize:"13px",lineHeight:"18px"}},Pn={xs:{fontSize:"11px",lineHeight:"14px"},sm:{fontSize:"12px",lineHeight:"16px"},md:{fontSize:"13px",lineHeight:"18px"},lg:{fontSize:"14px",lineHeight:"20px"},xl:{fontSize:"15px",lineHeight:"22px"}},Mp={square:0,rounded:"8px",pill:"9999px"},Wp={"top-right":{top:"4px",right:"4px",position:"absolute"},"top-left":{top:"4px",left:"4px",position:"absolute"},"bottom-right":{bottom:"4px",right:"4px",position:"absolute"},"bottom-left":{bottom:"4px",left:"4px",position:"absolute"}},Hp=e=>({display:"inline-flex",height:"auto",minWidth:"auto",backgroundColor:"color-white-600",color:"color-gray-900",borderWidth:"1px",borderStyle:"solid",borderColor:"color-white",backdropFilter:"blur(12px)",boxShadow:"0 1px 2px rgba(15, 23, 42, 0.08)",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",_hover:{backgroundColor:"color-white-800",boxShadow:"0 2px 8px rgba(15, 23, 42, 0.1)"}}),Pp=e=>({filled:{backgroundColor:"theme-primary",color:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.9},_active:{opacity:.95}},outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary",color:"theme-primary",style:{backgroundColor:"transparent"},transition:"border-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.9},_active:{opacity:.95}},link:{borderWidth:0,borderStyle:"none",borderColor:"theme-primary",color:"theme-primary",textDecoration:"underline",style:{backgroundColor:"transparent",textUnderlineOffset:"2px",textDecorationThickness:"1px"},transition:"opacity 0.2s ease",_hover:{opacity:.8}},ghost:{color:"color-gray-500",borderWidth:0,borderStyle:"solid",borderColor:"color-gray-500",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:"color-gray-100"}}}),ol=e=>({default:{indicator:{backgroundColor:"color-gray-400"},label:{color:"inherit"}},info:{indicator:{backgroundColor:"color-blue-500"},label:{color:"inherit"}},success:{indicator:{backgroundColor:"color-green-500"},label:{color:"inherit"}},warning:{indicator:{backgroundColor:"color-orange-500"},label:{color:"inherit"}},error:{indicator:{backgroundColor:"color-red-500"},label:{color:"inherit"}}}),Vp=p.memo(({content:e,children:o,icon:t,pastil:n,pastilContent:a,action:i,position:s,shape:c="pill",variant:d="filled",size:u="md",views:m,themeMode:g,...h})=>{const{themeMode:f}=l.useTheme(),y=g||f,k=p.useMemo(()=>Pp()[d],[y,d]),b=p.useMemo(()=>Hp(),[y]),C=p.useMemo(()=>ol(),[y]),S=a!=null,w=i!=null,j=S||w,x=o??e,v=x!=null,T=p.useMemo(()=>{const M={width:"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"6px",borderRadius:Mp[c],...Rp[u],...k,...j?Fp[u]:{},...j?b:{},...s?Wp[s]:{},...m==null?void 0:m.container};return d!=="filled"&&!j&&(k.color!==void 0&&(M.color=k.color),k.borderColor!==void 0&&(M.borderColor=k.borderColor),k.backgroundColor!==void 0&&(M.backgroundColor=k.backgroundColor),k&&k.style&&(M.style={...M.style||{},...k.style})),M},[c,u,d,k,j,b,s,m==null?void 0:m.container]);let F="currentColor";return typeof n=="string"?n in C?F=C[n].indicator.backgroundColor:F=n:n===!0&&(F="color-green-500",d==="filled"&&(F="color-white")),r.jsxs(l.Center,{role:"badge",...T,...h,children:[t&&r.jsx(l.View,{role:"badge-icon",...m==null?void 0:m.icon,children:t}),S&&r.jsx(l.Text,{role:"badge-pastil-content",backgroundColor:"color-gray-900",borderRadius:"9999px",color:"color-white",fontWeight:"700",letterSpacing:0,textTransform:"uppercase",whiteSpace:"nowrap",...zp[u],...m==null?void 0:m.pastilContent,children:a}),n&&r.jsx(l.View,{role:"badge-pastil",width:"6px",height:"6px",borderRadius:"50%",backgroundColor:F,...m==null?void 0:m.pastil}),v&&r.jsx(l.Text,{role:"badgeText",color:j?"color-gray-900":T.color,fontWeight:j?"700":"600",textAlign:"center",letterSpacing:j?0:"0.02em",whiteSpace:j?"nowrap":void 0,...j?Pn[u]:{},...m==null?void 0:m.text,children:x}),w&&r.jsx(l.Text,{role:"badge-action",color:"color-gray-400",fontWeight:"500",letterSpacing:0,whiteSpace:"nowrap",...Pn[u],...m==null?void 0:m.action,children:i})]})}),we=e=>{const o=he("badge",e);return r.jsx(Vp,{...o})},Ap={xs:12,sm:14,md:16,lg:18,xl:20},Ep=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Zt=p.forwardRef(({children:e,href:o,iconSize:t="sm",underline:n="default",isExternal:a=!1,views:i={},to:s,isHovered:c,setIsHovered:d,_hover:u,...m},g)=>r.jsxs(l.Element,{as:"a",ref:g,href:o,display:"inline-flex",gap:3,alignItems:"center",flexWrap:"nowrap",color:"inherit",textDecoration:n==="underline"?"underline":"none",_hover:n==="hover"?{textDecoration:"underline",...u}:u,...a?{target:"_blank",rel:"noopener noreferrer"}:{},...i.text,...m,children:[e,a&&r.jsx(qa,{widthHeight:Ap[t]})]}));Zt.displayName="LinkAnchor";const rl=p.forwardRef(({to:e="/",onClick:o,...t},n)=>{const a=kt.useHref(e),i=kt.useNavigate(),s=c=>{o==null||o(c),!(c.defaultPrevented||c.button!==0||t.target&&t.target!=="_self"||c.metaKey||c.altKey||c.ctrlKey||c.shiftKey)&&(c.preventDefault(),i(e))};return r.jsx(Zt,{...t,to:e,href:a,onClick:s,ref:n})});rl.displayName="RouterLinkAnchor";const tl=p.forwardRef((e,o)=>{const t=kt.useInRouterContext(),{href:n,to:a="/",isExternal:i}=e;return t&&!i&&n==null&&!Ep.test(a)?r.jsx(rl,{...e,ref:o}):r.jsx(Zt,{...e,href:n??a,ref:o})});tl.displayName="LinkView";const nl=p.forwardRef((e,o)=>r.jsx(tl,{ref:o,...e}));nl.displayName="Link";const en=nl,on={xs:14,sm:18,md:22,lg:26,xl:30},rn={fast:50,normal:100,slow:300},Dp=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),$p=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:i,themeMode:s}=l.useTheme(),c=i(t,{themeMode:n||s}),d=typeof e=="number"?e:on[e],[u,m]=p.useState(0);return p.useEffect(()=>{const g=setInterval(()=>{m(h=>h+45)},rn[o]);return()=>clearInterval(g)},[o]),r.jsxs(l.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",width:`${d}px`,height:`${d}px`,viewBox:"0 0 24 24",fill:"none",stroke:c,strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:`rotate(${u}deg)`},...a,children:[r.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),r.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("g",{id:"SVGRepo_iconCarrier",children:r.jsx("path",{d:"M21 12a9 9 0 11-6.219-8.56"})})]})},Lp=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:i,themeMode:s}=l.useTheme(),c=i(t,{themeMode:n||s}),d=typeof e=="number"?e:on[e],[u,m]=p.useState(0);return p.useEffect(()=>{const g=setInterval(()=>{m(h=>h+45)},rn[o]);return()=>clearInterval(g)},[o]),r.jsxs(l.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${d}px`,height:`${d}px`,style:{transform:`rotate(${u}deg)`},...a,children:[r.jsx("circle",{cx:"10",cy:"25",r:"4",fill:c}),r.jsx("circle",{cx:"25",cy:"25",r:"4",fill:c}),r.jsx("circle",{cx:"40",cy:"25",r:"4",fill:c})]})},_p=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:i,themeMode:s}=l.useTheme(),c=i(t,{themeMode:n||s}),d=typeof e=="number"?e:on[e],[u,m]=p.useState(0);return p.useEffect(()=>{const g=setInterval(()=>{m(h=>h+45)},rn[o]);return()=>clearInterval(g)},[o]),r.jsx(l.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${d}px`,height:`${d}px`,style:{transform:`rotate(${u}deg)`},...a,children:r.jsx("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:c,strokeWidth:"5",strokeDasharray:"1,10"})})},Bp=({size:e,children:o,textColor:t,loaderColor:n,type:a="default",speed:i="normal",textPosition:s="right",views:c,...d})=>{const{getColor:u}=l.useTheme(),m=f=>Dp(f)?f:u(f||"theme-loading");n=m(n||d.color||"theme-loading"),t=m(t||d.color||"theme-loading");const g={size:e,speed:i,color:n},h={default:r.jsx($p,{...g}),dotted:r.jsx(Lp,{...g}),quarter:r.jsx(_p,{...g})};return r.jsxs(l.Center,{gap:10,flexDirection:s==="top"||s==="bottom"?"column":"row",...d,...c==null?void 0:c.container,children:[(s==="left"||s==="top")&&o&&r.jsx(l.View,{color:t,...c==null?void 0:c.text,children:o}),h[a],(s==="right"||s==="bottom")&&o&&r.jsx(l.View,{color:t,...c==null?void 0:c.text,children:o})]})},Op=e=>{const o=he("loader",e);return r.jsx(Bp,{...o})},ro=Op,al={xs:{minHeight:24,paddingHorizontal:12,paddingVertical:5,fontSize:10,fontWeight:500,lineHeight:12,letterSpacing:"-0.01em"},sm:{minHeight:32,paddingHorizontal:16,paddingVertical:7,fontSize:12,fontWeight:500,lineHeight:16,letterSpacing:"-0.01em"},md:{minHeight:40,paddingHorizontal:20,paddingVertical:9,fontSize:14,fontWeight:500,lineHeight:20,letterSpacing:"-0.01em"},lg:{minHeight:48,paddingHorizontal:24,paddingVertical:11,fontSize:16,fontWeight:500,lineHeight:24,letterSpacing:"-0.01em"},xl:{minHeight:56,paddingHorizontal:28,paddingVertical:13,fontSize:20,fontWeight:500,lineHeight:28,letterSpacing:"-0.01em"}},tr={square:0,rounded:8,pill:999},Np={xs:{width:16,height:16,padding:6},sm:{width:20,height:20,padding:6},md:{width:24,height:24,padding:8},lg:{width:24,height:24,padding:12},xl:{width:28,height:28,padding:14}},Be=e=>/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,qp=(e,o,t=!1,n)=>{const a=t?o:e,i=t?e:o,s=t?o:e,d=(e==="theme-primary"||n&&e===n.primary)&&(n!=null&&n.onPrimary)?n.onPrimary:i,u=`0 0 0 2px ${Be("color-white")}, 0 0 0 4px ${Be(s)}`;return{filled:{backgroundColor:a,color:d,borderWidth:1,borderStyle:"solid",borderColor:a,_hover:{opacity:.92},_active:{opacity:.96},_focusVisible:{outline:"none",boxShadow:u},transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},empty:{color:s,borderWidth:1,borderStyle:"solid",borderColor:s,backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:u},transition:"background-color 0.2s ease, opacity 0.2s ease"},outline:{color:s,borderWidth:1,borderStyle:"solid",borderColor:s,backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:u},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{color:s,borderWidth:0,borderStyle:"solid",borderColor:s,backgroundColor:"transparent",_hover:{opacity:.86},_active:{opacity:.94},_focusVisible:{outline:"none",boxShadow:u},transition:"background-color 0.2s ease, color 0.2s ease"},link:{color:s,borderWidth:0,borderStyle:"none",borderColor:s,minHeight:"auto",paddingHorizontal:"4px",paddingVertical:"10px",textDecoration:"underline",backgroundColor:"transparent",style:{textUnderlineOffset:"2px",textDecorationThickness:"1px",textDecorationColor:Be(s)},_hover:{opacity:.8},_active:{opacity:.9},_focusVisible:{outline:"none",boxShadow:u},transition:"opacity 0.2s ease"},subtle:{backgroundColor:`${s}-${t?200:100}`,color:s,borderWidth:1,borderStyle:"solid",borderColor:`${s}-${t?400:250}`,_hover:{backgroundColor:`${s}-${t?300:180}`},_active:{backgroundColor:`${s}-${t?380:240}`},_focusVisible:{outline:"none",boxShadow:u},transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}}},Up=p.memo(({children:e,icon:o,isLoading:t,iconPosition:n="left",loaderPosition:a="left",size:i="md",resolvedTextColor:s,isIconRounded:c,views:d})=>{const u=["left","right"].includes(n)?l.Horizontal:l.Vertical,m=al[i];return r.jsxs(u,{gap:8,alignItems:"center",justifyContent:"center",fontSize:m.fontSize,fontWeight:m.fontWeight,lineHeight:m.lineHeight,letterSpacing:m.letterSpacing,whiteSpace:"nowrap",color:s,...d==null?void 0:d.content,children:[t&&a==="left"&&r.jsx(ro,{size:i==="xs"||i==="sm"?"sm":"md",color:s,...d==null?void 0:d.loader}),o&&["left","top"].includes(n)&&!t&&r.jsx(l.View,{color:s,...d==null?void 0:d.icon,children:o}),e,o&&["right","bottom"].includes(n)&&!t&&r.jsx(l.View,{color:s,...d==null?void 0:d.icon,children:o}),t&&a==="right"&&r.jsx(ro,{size:i==="xs"||i==="sm"?"sm":"md",color:s,...d==null?void 0:d.loader})]})}),Gp=e=>{const o=tr[e];return typeof o=="number"?o:typeof o=="string"&&parseInt(o,10)||0},Yp=({asComponent:e,isDisabled:o,isLoading:t,isWrapped:n=!1,borderRadius:a,width:i,height:s,baseStyles:c,sizeStyles:d,iconPad:u,mainTone:m,resolvedTextColor:g,children:h,borderWidth:f=0,...y})=>r.jsx(l.Element,{as:e,disabled:!!(o||t),display:n?"flex":"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:a,width:i,height:s,...c,...d,...u,backgroundColor:(c==null?void 0:c.backgroundColor)||(n?m:void 0),color:g,borderWidth:n?0:void 0,cursor:o?"default":"pointer",...y,children:h}),Kp=({shape:e,isDisabled:o,onClick:t,shadow:n,borderWidth:a,isAuto:i,isFilled:s,views:c,children:d,...u})=>r.jsx(l.Element,{as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:tr[e],cursor:o?"default":"pointer",onClick:t,boxShadow:n,padding:a,width:s?"100%":i?"fit-content":void 0,...c==null?void 0:c.container,...u,children:d}),Xp=({variant:e,animation:o,to:t,isDisabled:n,isLoading:a,isAuto:i,isFilled:s,isExternal:c,shape:d="rounded",shadow:u,onClick:m,views:g,baseStyles:h,sizeStyles:f,iconPad:y,containerRef:k,resolvedTextColor:b,content:C,size:S,mainTone:w,borderMovingDuration:j=2,borderMovingGradientColors:x=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:v="#705CFF",animatedStrokeTextColor:T="color-gray-900",...F})=>{var V;const M=Gp(d),E=t?r.jsx(en,{to:t,isExternal:c,color:"currentColor",textDecoration:"inherit",_hover:{color:"currentColor"},...g==null?void 0:g.link,children:C}):C,I={isDisabled:n,isLoading:a,baseStyles:h,sizeStyles:f,iconPad:y,resolvedTextColor:b,mainTone:w,children:E};if(o==="borderMoving"&&x){const z={from:{backgroundPosition:"0% 50%"},to:{backgroundPosition:"200% 50%"},duration:`${j}s`,timingFunction:"linear",iterationCount:"infinite"};return r.jsx(Kp,{shape:d,isDisabled:n,onClick:m,shadow:u,borderWidth:3,isAuto:i,isFilled:s,views:g,background:`linear-gradient(90deg, ${Be(x[0])}, ${Be(x[1])}, ${Be(x[2])}, ${Be(x[0])})`,backgroundSize:"200% 100%",animate:z,...F,children:r.jsx(Yp,{asComponent:t?"div":"button",isWrapped:!0,borderRadius:Math.max(0,M-3),width:"100%",height:"100%",...I})})}if(o==="animatedStroke"){const H=Be(v),z=Be(T),P=1e3,R={from:{strokeWidth:"8px",strokeDasharray:`0 ${P}`,strokeDashoffset:-Math.round(P*.63)},to:{strokeWidth:"3px",strokeDasharray:`${P}`,strokeDashoffset:0},duration:"0.9s",timingFunction:"ease-in",fillMode:"forwards"},W=["group",(V=g==null?void 0:g.container)==null?void 0:V.className,F==null?void 0:F.className].filter(Boolean).join(" ");return r.jsxs(l.Element,{ref:k,as:t?"div":"button",type:t?void 0:"button",disabled:!!(!t&&(n||a)),onClick:m,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:s?"100%":i?"fit-content":void 0,borderRadius:tr[d],boxShadow:u,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",color:z,backgroundColor:"transparent",borderWidth:0,...g==null?void 0:g.container,...F,className:W,children:[r.jsx(l.View,{as:"svg",position:"absolute",top:0,right:0,bottom:0,left:0,width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg",pointerEvents:"none",zIndex:1,"aria-hidden":"true",children:r.jsx(l.View,{as:"rect",x:"0",y:"0",height:"100%",width:"100%",rx:M,ry:M,fill:"transparent",stroke:H,strokeWidth:"8px",strokeDasharray:`0 ${P}`,strokeDashoffset:-Math.round(P*.63),pathLength:P,on:{groupHover:{animate:R}}})}),r.jsx(l.View,{position:"relative",zIndex:0,children:E})]})}if(o==="borderReveal"){const z=Be((x==null?void 0:x[0])||w||"#000000"),R=j*.75/4,W=`linear-gradient(90deg, ${z} 50%, transparent 50%)`,D=`linear-gradient(180deg, ${z} 50%, transparent 50%)`,L=`linear-gradient(270deg, ${z} 50%, transparent 50%)`,O=`linear-gradient(0deg, ${z} 50%, transparent 50%)`,$="100% 0, 100% 100%, 0 100%, 0 0",_="0 0, 100% 0, 100% 100%, 0 100%",B=`0s, ${R}s, ${R*2}s, ${R*2}s`,G=`${R*2}s, ${R*2}s, ${R}s, 0s`,N=4;return r.jsx(l.Element,{ref:k,as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:tr[d],cursor:n?"default":"pointer",onClick:m,boxShadow:u,padding:3,background:`
2
+ ${W} no-repeat,
3
3
  ${D} no-repeat,
4
4
  ${L} no-repeat,
5
- ${B} no-repeat
6
- `,backgroundSize:`200% ${Y}px, ${Y}px 200%, 200% ${Y}px, ${Y}px 200%`,backgroundPosition:$,transitionProperty:"background-position",transitionDuration:`${F}s`,transitionTimingFunction:"linear",transitionDelay:_,_hover:{backgroundPosition:O,transitionDelay:N},width:s?"100%":i?"fit-content":void 0,...g==null?void 0:g.container,...R,children:r.jsx(l.View,{as:t?"div":"button",disabled:!!(n||a),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:Math.max(0,M-3),width:"100%",height:"100%",...h,...f,...y,backgroundColor:(h==null?void 0:h.backgroundColor)||w,color:k,borderWidth:0,cursor:n?"default":"pointer",children:E})})}return r.jsx(l.Element,{ref:b,as:e==="link"&&t?"div":"button",type:e==="link"&&t?void 0:"button",disabled:!!(n||a),...f,...y,display:"inline-flex",alignItems:"center",justifyContent:"center",width:s?"100%":i?"fit-content":void 0,borderRadius:Qo[d],boxShadow:u,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",onClick:m,...h,...g==null?void 0:g.container,...R,children:E})},qp=p.memo(p.forwardRef(({variant:e="filled",size:o="md",shape:t="rounded",iconPosition:n="left",loaderPosition:a="left",backgroundColor:i,color:s,textColor:c,explicitTextColor:d,reversed:u=!1,isAuto:m=!0,isFilled:g,isDisabled:h,isLoading:f,isIconRounded:y,isHovered:b,icon:k,children:C,to:j,isExternal:w,shadow:S,onClick:x,views:v={},animation:T,loaderProps:R,config:M,ariaLabel:E,borderMovingDuration:I=2,borderMovingGradientColors:V=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:P="#705CFF",animatedStrokeTextColor:z="color-gray-900",...W},F)=>{const D=h?"theme-disabled":f?"theme-loading":i??s??"theme-primary",L=d??c??"color-white",{config:B}=Vr(),$=B==null?void 0:B.theme,O=p.useMemo(()=>{const X=$p(D,L,u,$);return M!=null&&M.variants&&Object.keys(M.variants).forEach(K=>{X[K]&&(X[K]=De(X[K],M.variants[K]))}),X},[D,L,u,$,M==null?void 0:M.variants]),N=O[e]??O.filled,_=d?{...N,color:d}:N,Y=(_==null?void 0:_.color)??L,A=r.jsx(Lp,{icon:k,isLoading:f,iconPosition:n,loaderPosition:a,size:o,resolvedTextColor:Y,isIconRounded:y,views:v,children:C}),G=el[o],Q=y?Dp[o]:{};return r.jsx(Np,{variant:e,animation:T,to:j,isDisabled:h,isLoading:f,isAuto:m,isFilled:g,isExternal:w,shape:t,shadow:S,onClick:x,views:v,baseStyles:_,sizeStyles:G,iconPad:Q,resolvedTextColor:Y,content:A,size:o,mainTone:D,borderMovingDuration:I,borderMovingGradientColors:V,animatedStrokeAccentColor:P,animatedStrokeTextColor:z,containerRef:F,...W})})),Up=e=>{const[o,t]=l.useHover(),n=ge("button",e),a=e.textColor??(e.backgroundColor!=null&&e.color!=null?e.color:void 0);return r.jsx(qp,{isHovered:t,...n,explicitTextColor:a})},se=Up,Gp={sm:{padding:"12px"},md:{padding:"16px"},lg:{padding:"24px"}},Yp={square:0,rounded:"8px",pill:"24px"},Kp=e=>{const o=e==="dark";return{default:{backgroundColor:"color-white",border:"none",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},outlined:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",transition:"border-color 0.2s ease, box-shadow 0.2s ease",_hover:{borderColor:"color-gray-300",boxShadow:o?"0px 1px 3px rgba(0, 0, 0, 0.3)":"0px 1px 3px rgba(0, 0, 0, 0.05)"}},elevated:{backgroundColor:"color-white",boxShadow:o?"0px 1px 3px rgba(0, 0, 0, 0.35), 0px 1px 2px rgba(0, 0, 0, 0.3)":"0px 1px 3px rgba(0, 0, 0, 0.08), 0px 1px 2px rgba(0, 0, 0, 0.06)",border:"none",transition:"box-shadow 0.2s ease",_hover:{boxShadow:o?"0px 4px 6px rgba(0, 0, 0, 0.4), 0px 2px 4px rgba(0, 0, 0, 0.35)":"0px 4px 6px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.06)"}}}},_r=e=>(e.themeMode,{container:{backgroundColor:"color-white",color:"color-gray-900",borderRadius:"8px",overflow:"hidden",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},header:{padding:"16px",borderBottom:"1px solid",borderColor:"color-gray-100",color:"theme-primary",fontWeight:600,fontSize:14},content:{padding:"16px",color:"color-gray-600",fontSize:12,lineHeight:"18px"},footer:{padding:"16px",borderTop:"1px solid",borderColor:"color-gray-100",justifyContent:"flex-end",gap:8}}),ol=p.createContext({}),en=()=>p.useContext(ol),xt=({children:e,views:o,style:t,themeMode:n,...a})=>{var u;const i=l.useTheme(),{styles:s}=en(),c=_r(i).header,d={...c,...s==null?void 0:s.header,...a,style:{...c==null?void 0:c.style,...(u=s==null?void 0:s.header)==null?void 0:u.style,...t}};return r.jsx(l.Vertical,{gap:8,...d,children:e})},bt=({children:e,views:o,style:t,themeMode:n,...a})=>{var u;const i=l.useTheme(),{styles:s}=en(),c=_r(i).content,d={...c,...s==null?void 0:s.content,...a,style:{...c==null?void 0:c.style,...(u=s==null?void 0:s.content)==null?void 0:u.style,...t}};return r.jsx(l.Vertical,{gap:12,...d,children:e})},kt=({children:e,views:o,style:t,themeMode:n,...a})=>{var u;const i=l.useTheme(),{styles:s}=en(),c=_r(i).footer,d={...c,...s==null?void 0:s.footer,...a,style:{...c==null?void 0:c.style,...(u=s==null?void 0:s.footer)==null?void 0:u.style,...t}};return r.jsx(l.Vertical,{gap:8,...d,children:e})},Xp=({variant:e="default",size:o="md",shape:t="rounded",children:n,header:a,footer:i,isFullWidth:s=!1,views:c,style:d,themeMode:u,config:m,...g})=>{var x,v;const h=l.useTheme(),f=_r(h),y=((x=Gp[o])==null?void 0:x.padding)||"16px",b=p.useMemo(()=>({styles:{container:{...f.container,borderRadius:Yp[t],...c==null?void 0:c.container},header:{...f.header,padding:y,...c==null?void 0:c.header},content:{...f.content,padding:y,...c==null?void 0:c.content},footer:{...f.footer,padding:y,...c==null?void 0:c.footer}}}),[f,c,y,t]),k=p.Children.toArray(n).some(T=>p.isValidElement(T)&&(T.type===xt||T.type===bt||T.type===kt)),{themeMode:C}=h,w=Kp(u||C)[e],S={width:s?"100%":"auto",overflow:"hidden",...w,...b.styles.container,...g,style:{...(v=b.styles.container)==null?void 0:v.style,...d}};return r.jsx(ol.Provider,{value:b,children:r.jsx(l.View,{...S,children:k?n:r.jsxs(l.Vertical,{width:"100%",children:[a&&r.jsx(xt,{children:a}),r.jsx(bt,{children:n}),i&&r.jsx(kt,{children:i})]})})})},Jp=e=>{const o=ge("card",e);return r.jsx(Xp,{...o})},ye=Jp;ye.Header=xt;ye.Content=bt;ye.Footer=kt;const Qp=({defaultActiveIndex:e=0,activeIndex:o,onChange:t,autoPlay:n=!1,autoPlayInterval:a=3e3,pauseOnHover:i=!0,infinite:s=!0,totalSlides:c,stepIndices:d})=>{const u=p.useRef(c||0),[m,g]=p.useState(c||0),h=p.useRef(new Set),f=p.useRef(0),y=p.useMemo(()=>Pt("carousel-content"),[]),[b,k]=p.useState(o!==void 0?o:e),[C,j]=p.useState(!1),[w,S]=p.useState(!1),[x,v]=p.useState(0),[T,R]=p.useState(0),M=p.useRef(null);p.useEffect(()=>{o!==void 0&&k(o)},[o]);const E=p.useCallback(O=>{let N=O;s?O<0?N=m-1:O>=m&&(N=0):N=Math.max(0,Math.min(O,m-1)),d&&d.length>0&&(d.includes(N)||(N=d.reduce((Y,A)=>Math.abs(A-N)<Math.abs(Y-N)?A:Y))),o===void 0&&k(N),t&&t(N)},[o,s,t,m]),I=p.useCallback(()=>{E(b+1)},[b,E]),V=p.useCallback(()=>{E(b-1)},[b,E]);p.useEffect(()=>(n&&!C&&!w&&(M.current=setInterval(()=>{I()},a)),()=>{M.current&&clearInterval(M.current)}),[n,a,C,w,I,i]);const P=p.useCallback(()=>{i&&j(!0)},[i]),z=p.useCallback(()=>{j(!1)},[]),W=p.useCallback(O=>{S(!0),"touches"in O?(v(O.touches[0].clientX),R(O.touches[0].clientY)):(v(O.clientX),R(O.clientY))},[]),F=p.useCallback(O=>{if(!w)return;let N,_;"touches"in O?(N=O.touches[0].clientX,_=O.touches[0].clientY):(N=O.clientX,_=O.clientY);const Y=N-x,A=_-T;Math.abs(Y)>Math.abs(A)&&Math.abs(Y)>50&&(Y>0?V():I(),S(!1))},[w,x,T,I,V]),H=p.useCallback(()=>{S(!1)},[]),D=p.useCallback(()=>{const O=f.current++;h.current.add(O);const N=h.current.size;return u.current=N,g(N),O},[]),L=p.useCallback(O=>{h.current.delete(O);const N=h.current.size;if(u.current=N,g(N),N>0&&b>=N){const _=Math.max(0,N-1);o===void 0&&k(_),t&&t(_)}},[b,o,t]),B=s||b>0,$=s||b<m-1;return{activeIndex:b,totalSlides:m,goToSlide:E,nextSlide:I,prevSlide:V,canGoNext:$,canGoPrevious:B,handleMouseEnter:P,handleMouseLeave:z,handleDragStart:W,handleDragMove:F,handleDragEnd:H,registerSlide:D,unregisterSlide:L,contentId:y,infinite:s}},Zp={dot:{width:"10px",height:"10px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},line:{width:"20px",height:"4px",borderRadius:"2px",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},number:{minWidth:"24px",height:"24px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",transition:"background-color 0.3s ease"}},em={dot:{backgroundColor:"theme-primary"},line:{backgroundColor:"theme-primary"},number:{backgroundColor:"theme-primary",color:"color-white"}},Ir={width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"color-white",color:"color-gray-800",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"0 2px 5px rgba(0, 0, 0, 0.1)",zIndex:1,transition:"background-color 0.3s ease",_hover:{backgroundColor:"color-gray-100"}},rr=()=>({container:{position:"relative",overflow:"hidden"},content:{overflow:"hidden",width:"100%",height:"100%"},innerContainer:{display:"flex",transitionProperty:"transform",transitionDuration:"300ms",transitionTimingFunction:"ease-in-out",height:"100%"},item:{flex:"0 0 100%",minWidth:0,position:"relative",height:"100%"},prevButton:{position:"absolute",top:"50%",left:"16px",transform:"translateY(-50%)",zIndex:10,...Ir},nextButton:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)",zIndex:10,...Ir}}),rl=p.createContext(null),Br=()=>{const e=p.useContext(rl);if(!e)throw new Error("Carousel compound components must be used within <Carousel>");return e},tl=({children:e,isActive:o,index:t,views:n,...a})=>r.jsx(l.View,{flexShrink:0,width:"100%",height:"100%",display:o?"block":"none",...n,...a,children:e}),nl=({views:e,children:o,...t})=>{const{goToPrevious:n,canGoPrevious:a,styles:i}=Br(),c={...rr().prevButton,...i==null?void 0:i.prevButton,...e==null?void 0:e.prevButton};return r.jsx(se,{"aria-label":"Previous slide",onClick:()=>n(),isDisabled:!a,...c,...t,children:o??r.jsx(ce,{orientation:"left",widthHeight:16})})},al=({views:e,children:o,...t})=>{const{goToNext:n,canGoNext:a,styles:i}=Br(),c={...rr().nextButton,...i==null?void 0:i.nextButton,...e==null?void 0:e.nextButton};return r.jsx(se,{"aria-label":"Next slide",onClick:()=>n(),isDisabled:!a,...c,...t,children:o??r.jsx(ce,{orientation:"right",widthHeight:16})})},ll=({children:e,views:o,...t})=>{const{registerSlide:n,unregisterSlide:a,styles:i}=Br(),s=p.useRef(null);p.useEffect(()=>{const u=n();return s.current=u,()=>{s.current!==null&&a(s.current)}},[n,a]);const d={...rr().item,...i==null?void 0:i.item,...o==null?void 0:o.item};return r.jsx(l.View,{role:"group","aria-roledescription":"slide",...d,...t,children:e})},il=({children:e,views:o,style:t,...n})=>{const{currentIndex:a,styles:i,contentId:s}=Br(),c=rr(),d={...c.content,...i==null?void 0:i.content,...o==null?void 0:o.content},u={...c.innerContainer,...i==null?void 0:i.innerContainer,...o==null?void 0:o.innerContainer},m=`-${a*100}%`;return r.jsx(l.View,{...d,...n,style:{...d==null?void 0:d.style,...t},id:s,"aria-live":"polite",children:r.jsx(l.View,{...u,style:{...u==null?void 0:u.style,transform:`translateX(${m})`},children:e})})},om=({children:e,defaultActiveIndex:o=0,activeIndex:t,onChange:n,showNavigation:a=!0,navigationPosition:i="inside",prevButton:s,nextButton:c,showIndicators:d=!0,indicatorPosition:u="bottom",indicatorVariant:m="dot",autoPlay:g=!1,autoPlayInterval:h=3e3,pauseOnHover:f=!0,infinite:y=!0,direction:b="horizontal",transitionDuration:k=300,views:C,stepIndices:j,themeMode:w,...S})=>{const x=p.useMemo(()=>p.Children.toArray(e),[e]),v=Qp({defaultActiveIndex:o,activeIndex:t,onChange:n,autoPlay:g,autoPlayInterval:h,pauseOnHover:f,infinite:y,totalSlides:x.length}),{activeIndex:T,totalSlides:R,goToSlide:M,nextSlide:E,prevSlide:I,handleMouseEnter:V,handleMouseLeave:P,handleDragStart:z,handleDragMove:W,handleDragEnd:F}=v,H=()=>{if(!a)return null;const B=s||r.jsx(l.View,{as:"button","aria-label":"Previous slide",...Ir,...C==null?void 0:C.prevButton,children:"❮"}),$=c||r.jsx(l.View,{as:"button","aria-label":"Next slide",...Ir,...C==null?void 0:C.nextButton,children:"❯"});return r.jsxs(r.Fragment,{children:[r.jsx(l.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",left:i==="inside"?"10px":"-40px",onClick:I,cursor:!y&&T===0?"not-allowed":"pointer",opacity:!y&&T===0?.5:1,children:B}),r.jsx(l.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",right:i==="inside"?"10px":"-40px",onClick:E,cursor:!y&&T===x.length-1?"not-allowed":"pointer",opacity:!y&&T===x.length-1?.5:1,children:$})]})},D=()=>d?r.jsx(l.Horizontal,{position:"absolute",left:"0",right:"0",justifyContent:"center",...u==="top"?{top:"10px"}:{bottom:"10px"},...C==null?void 0:C.indicators,children:x.map((B,$)=>r.jsx(l.View,{onClick:()=>M($),cursor:"pointer",...Zp[m],...$===T?{...em[m]}:{},...C==null?void 0:C.indicator,...$===T?C==null?void 0:C.activeIndicator:{},children:m==="number"&&$+1},$))}):null;return p.useMemo(()=>p.Children.toArray(e).some(B=>p.isValidElement(B)&&(B.type===il||B.type===ll||B.type===nl||B.type===al)),[e])?r.jsx(rl.Provider,{value:{currentIndex:T,totalSlides:R,goToSlide:M,goToNext:E,goToPrevious:I,canGoNext:v.canGoNext,canGoPrevious:v.canGoPrevious,registerSlide:v.registerSlide,unregisterSlide:v.unregisterSlide,styles:{...rr(),...C},contentId:v.contentId,infinite:y},children:r.jsx(l.View,{role:"region","aria-roledescription":"carousel","aria-label":"Carousel",position:"relative",width:"100%",height:"100%",overflow:"hidden",...C==null?void 0:C.container,...S,children:e})}):r.jsxs(l.View,{position:"relative",width:"100%",height:"100%",overflow:"hidden",onMouseEnter:V,onMouseLeave:P,onTouchStart:z,onTouchMove:W,onTouchEnd:F,onMouseDown:z,onMouseMove:W,onMouseUp:F,...C==null?void 0:C.container,...S,children:[r.jsx(l.View,{width:"100%",height:"100%",position:"relative",...C==null?void 0:C.slideWrapper,children:x.map((B,$)=>r.jsx(tl,{isActive:$===T,index:$,views:C==null?void 0:C.slide,children:B},$))}),H(),D()]})},rm=e=>r.jsx(om,{...e}),We=rm;We.Slide=tl;We.Content=il;We.Item=ll;We.Previous=nl;We.Next=al;const ze={blue:"color-blue-500",green:"color-green-500",purple:"color-purple-500",orange:"color-orange-500",red:"color-red-500",teal:"color-teal-500",pink:"color-pink-500",indigo:"color-indigo-500",yellow:"color-yellow-500",cyan:"color-cyan-500"},sl=[ze.blue,ze.green,ze.purple,ze.orange,ze.red,ze.teal,ze.pink,ze.indigo,ze.yellow,ze.cyan],wo=sl,tm={width:"100%",height:"100%",position:"relative",display:"flex",flexDirection:"column"},nm={fontSize:"18px",fontWeight:"700",marginBottom:"24px",textAlign:"center",color:"color-gray-900"},am={display:"flex",flexWrap:"wrap",justifyContent:"flex-start",marginTop:"16px",gap:"12px"},lm={display:"flex",alignItems:"center",padding:"4px 8px",borderRadius:"6px",cursor:"pointer",transition:"background-color 0.2s ease",_hover:{backgroundColor:"color-gray-50"}},im={width:"10px",height:"10px",borderRadius:"50%",marginRight:"8px"},sm={fontSize:"13px",fontWeight:"500",color:"color-gray-600"},dr={position:"absolute",backgroundColor:"color-white",padding:"12px 16px",borderRadius:"8px",boxShadow:"0px 12px 24px rgba(15, 23, 42, 0.18)",border:"1px solid color-gray-200",fontSize:"14px",display:"flex",flexDirection:"column",pointerEvents:"none",zIndex:100},cl={stroke:"color-gray-100",strokeWidth:"1px",strokeDasharray:"4 4"},Fr={stroke:"color-gray-200",strokeWidth:"1px"},Rr={fontSize:"12px",fill:"color-gray-500",fontWeight:"500"},cm={rx:"4px",ry:"4px",cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{filter:"brightness(1.1)"}},dm={strokeWidth:"3px",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",transition:"stroke-width 0.2s ease"},um={r:"5px",strokeWidth:"2.5px",stroke:"color-white",cursor:"pointer",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{r:"7px"}},ur={strokeWidth:"2px",stroke:"color-white",cursor:"pointer",transition:"all 0.3s ease",_hover:{transform:"scale(1.02)"}},on={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-white-800",borderRadius:"4px",zIndex:10,padding:"24px",textAlign:"center"},pm={...on},mm={...on,backgroundColor:"rgba(254, 242, 242, 0.8)",color:"color-red-600"},gm={...on,backgroundColor:"rgba(249, 250, 251, 0.8)",color:"color-gray-500"},hm=({data:e,dataPoints:o,animated:t=!0,animationDuration:n=500,showTooltips:a=!0})=>{const[i,s]=p.useState(t?0:1),[c,d]=p.useState({visible:!1,x:0,y:0,content:null}),u=p.useRef(null),m=p.useRef(null);p.useEffect(()=>{if(!t){s(1);return}const j=Date.now(),w=()=>{const S=Date.now()-j,x=Math.min(S/n,1);s(x),x<1&&(u.current=requestAnimationFrame(w))};return u.current=requestAnimationFrame(w),()=>{u.current&&cancelAnimationFrame(u.current)}},[t,n]);const[g,h]=p.useState(new Set),f=p.useCallback(j=>{h(w=>{const S=new Set(w);return S.has(j)?S.delete(j):S.add(j),S})},[]),y=p.useCallback(()=>e?{...e,series:e.series.map((j,w)=>({...j,color:j.color||wo[w%wo.length],hidden:g.has(j.name)}))}:o?o.map((j,w)=>({...j,color:j.color||wo[w%wo.length],hidden:g.has(j.label)})):null,[e,o,g]),b=p.useCallback((j,w,S)=>{a&&d({visible:!0,x:j,y:w,content:S})},[a]),k=p.useCallback(()=>{d(j=>({...j,visible:!1}))},[]),C=p.useCallback(()=>{if(!m.current)return{width:0,height:0};const{width:j,height:w}=m.current.getBoundingClientRect();return{width:j,height:w}},[]);return{animationProgress:i,tooltip:c,containerRef:m,processedData:y,showTooltip:b,hideTooltip:k,getChartDimensions:C,toggleSeries:f}},fm=({data:e,width:o,height:t,animationProgress:n,showGrid:a=!0,onBarClick:i,showTooltip:s,hideTooltip:c,views:d})=>{const{getColor:u}=l.useTheme(),m={top:20,right:20,bottom:40,left:50},g=o-m.left-m.right,h=t-m.top-m.bottom,f=p.useMemo(()=>{let x=0;return e.series.forEach(v=>{v.data.forEach(T=>{x=Math.max(x,T)})}),x},[e]),y=e.labels.length,b=e.series.length,k=g/y,C=k*.8/b,j=k*.2/(b+1),w=f||10,S=p.useMemo(()=>{const v=[];for(let T=0;T<=5;T++){const R=w/5*T;v.push(R)}return v},[f]);return r.jsxs("svg",{width:o,height:t,children:[r.jsx("defs",{children:e.series.map((x,v)=>{const T=x.color?u(x.color):"black";return r.jsxs("linearGradient",{id:`bar-gradient-${v}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:T,stopOpacity:1}),r.jsx("stop",{offset:"100%",stopColor:T,stopOpacity:.7})]},`bar-gradient-${v}`)})}),r.jsx("line",{x1:m.left,y1:t-m.bottom,x2:o-m.right,y2:t-m.bottom,...Fr,...d==null?void 0:d.axis}),r.jsx("line",{x1:m.left,y1:m.top,x2:m.left,y2:t-m.bottom,...Fr,...d==null?void 0:d.axis}),e.labels.map((x,v)=>{const T=m.left+(v+.5)*k,R=t-m.bottom+20;return r.jsx("text",{x:T,y:R,textAnchor:"middle",...Rr,...d==null?void 0:d.axisLabel,children:x},`x-label-${v}`)}),S.map((x,v)=>{const T=t-m.bottom-x/w*h;return r.jsxs(p.Fragment,{children:[r.jsx("text",{x:m.left-10,y:T,textAnchor:"end",dominantBaseline:"middle",...Rr,...d==null?void 0:d.axisLabel,children:x.toFixed(0)}),a&&r.jsx("line",{x1:m.left,y1:T,x2:o-m.right,y2:T,...cl,...d==null?void 0:d.grid})]},`y-tick-${v}`)}),e.series.map((x,v)=>x.hidden?null:r.jsx(p.Fragment,{children:x.data.map((T,R)=>{const M=T/w*h*n,E=m.left+R*k+j*(v+1)+C*v,I=t-m.bottom-M,V=e.labels[R],P=e.series.reduce((D,L)=>{const B=L.data[R];return D+(typeof B=="number"?B:0)},0),z=P>0?(T/P*100).toFixed(1):null,W=x.color?u(x.color):"black",F=D=>{const L=r.jsxs(l.View,{display:"flex",flexDirection:"column",minWidth:"180px",children:[r.jsxs(l.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(l.Text,{fontWeight:"semibold",children:x.name}),r.jsx(l.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:W})]}),r.jsx(l.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:V}),r.jsxs(l.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(l.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Value"}),r.jsx(l.Text,{fontWeight:"medium",children:T.toLocaleString()})]}),z!==null&&r.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Share"}),r.jsx(l.Text,{fontWeight:"medium",children:`${z}%`})]}),r.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(l.Text,{fontWeight:"medium",children:P.toLocaleString()})]})]})]}),B=D.currentTarget.getBoundingClientRect(),$=B.left+B.width/2,O=B.top;s($,O,L)},H=()=>{i&&i(x.name,R)};return r.jsx("rect",{x:E,y:I,width:C,height:M,fill:`url(#bar-gradient-${v})`,onMouseEnter:F,onMouseMove:F,onMouseLeave:c,onClick:H,...cm,...d==null?void 0:d.bar},`bar-${v}-${R}`)})},`series-${v}`))]})},ym=({data:e,width:o,height:t,animationProgress:n,showGrid:a=!0,onPointClick:i,showTooltip:s,hideTooltip:c,views:d})=>{const{getColor:u}=l.useTheme(),m={top:20,right:20,bottom:40,left:40},g=o-m.left-m.right,h=t-m.top-m.bottom,f=p.useMemo(()=>{let j=0;return e.series.forEach(w=>{w.data.forEach(S=>{j=Math.max(j,S)})}),j},[e]),y=f||10,b=p.useMemo(()=>{const w=[];for(let S=0;S<=5;S++){const x=y/5*S;w.push(x)}return w},[f]),k=j=>{if(j.length<2)return"";const w=j.map((x,v)=>({x:m.left+v/(e.labels.length-1)*g,y:t-m.bottom-x/y*h*n}));let S=`M ${w[0].x},${w[0].y}`;for(let x=0;x<w.length-1;x++){const v=w[x===0?x:x-1],T=w[x],R=w[x+1],M=w[x+2===w.length?x+1:x+2],E=T.x+(R.x-v.x)/6,I=T.y+(R.y-v.y)/6,V=R.x-(M.x-T.x)/6,P=R.y-(M.y-T.y)/6;S+=` C ${E},${I} ${V},${P} ${R.x},${R.y}`}return S},C=j=>{if(j.length<2)return"";const w=k(j),S=m.left,x=m.left+g,v=t-m.bottom;return`${w} L ${x},${v} L ${S},${v} Z`};return r.jsxs("svg",{width:o,height:t,children:[r.jsx("defs",{children:e.series.map((j,w)=>{const S=j.color?u(j.color):"black";return r.jsxs("linearGradient",{id:`gradient-${w}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:S,stopOpacity:.3}),r.jsx("stop",{offset:"100%",stopColor:S,stopOpacity:0})]},`gradient-${w}`)})}),r.jsx("line",{x1:m.left,y1:t-m.bottom,x2:o-m.right,y2:t-m.bottom,...Fr,...d==null?void 0:d.axis}),r.jsx("line",{x1:m.left,y1:m.top,x2:m.left,y2:t-m.bottom,...Fr,...d==null?void 0:d.axis}),e.labels.map((j,w)=>{const S=m.left+w/(e.labels.length-1)*g,x=t-m.bottom+20;return r.jsx("text",{x:S,y:x,textAnchor:"middle",...Rr,...d==null?void 0:d.axisLabel,children:j},`x-label-${w}`)}),b.map((j,w)=>{const S=t-m.bottom-j/y*h;return r.jsxs(p.Fragment,{children:[r.jsx("text",{x:m.left-10,y:S,textAnchor:"end",dominantBaseline:"middle",...Rr,...d==null?void 0:d.axisLabel,children:j.toFixed(0)}),a&&r.jsx("line",{x1:m.left,y1:S,x2:o-m.right,y2:S,...cl,...d==null?void 0:d.grid})]},`y-tick-${w}`)}),e.series.map((j,w)=>{if(j.hidden)return null;const S=j.color?u(j.color):"black";return r.jsxs(p.Fragment,{children:[r.jsx("path",{d:C(j.data),fill:`url(#gradient-${w})`,...d==null?void 0:d.area}),r.jsx("path",{d:k(j.data),stroke:S,...dm,...d==null?void 0:d.line}),j.data.map((x,v)=>{const T=m.left+v/(e.labels.length-1)*g,R=t-m.bottom-x/y*h*n,M=e.labels[v],E=e.series.reduce((H,D)=>{const L=D.data[v];return H+(typeof L=="number"?L:0)},0),I=E>0?(x/E*100).toFixed(1):null,V=v>0&&typeof j.data[v-1]=="number"?j.data[v-1]:null,P=typeof V=="number"?x-V:null,z=typeof P=="number"?`${P>=0?"+":""}${P.toLocaleString()}`:null,W=H=>{const D=r.jsxs(l.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(l.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(l.Text,{fontWeight:"semibold",children:j.name}),r.jsx(l.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:S})]}),r.jsx(l.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:M}),r.jsxs(l.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(l.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Value"}),r.jsx(l.Text,{fontWeight:"medium",children:x.toLocaleString()})]}),z!==null&&r.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Change"}),r.jsx(l.Text,{fontWeight:"medium",children:z})]}),I!==null&&r.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Share"}),r.jsx(l.Text,{fontWeight:"medium",children:`${I}%`})]}),r.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(l.Text,{fontWeight:"medium",children:E.toLocaleString()})]})]})]}),L=H.currentTarget.getBoundingClientRect(),B=L.left+L.width/2,$=L.top+L.height/2;s(B,$,D)},F=()=>{i&&i(j.name,v)};return r.jsx("circle",{cx:T,cy:R,fill:S,onMouseEnter:W,onMouseMove:W,onMouseLeave:c,onClick:F,...um,...d==null?void 0:d.point},`point-${w}-${v}`)})]},`series-${w}`)})]})},xm=({dataPoints:e,width:o,height:t,animationProgress:n,isDonut:a=!1,onSliceClick:i,showTooltip:s,hideTooltip:c,views:d})=>{const{getColor:u}=l.useTheme(),{ref:m,relation:g}=l.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),h=p.useRef(null);p.useEffect(()=>{h.current&&m&&(m.current=h.current)},[h,m]);const y=Math.min(o,t)/2*.8,b=o/2,k=t/2,C=a?y*.6:0,j=p.useMemo(()=>e.filter(x=>!x.hidden),[e]),w=p.useMemo(()=>j.reduce((x,v)=>x+v.value,0),[j]),S=p.useMemo(()=>{if(w===0)return[{path:a?[`M ${b} ${k-y}`,`A ${y} ${y} 0 1 1 ${b} ${k+y}`,`A ${y} ${y} 0 1 1 ${b} ${k-y}`,`M ${b} ${k-C}`,`A ${C} ${C} 0 1 0 ${b} ${k+C}`,`A ${C} ${C} 0 1 0 ${b} ${k-C}`,"Z"].join(" "):[`M ${b} ${k}`,`M ${b} ${k-y}`,`A ${y} ${y} 0 1 1 ${b} ${k+y}`,`A ${y} ${y} 0 1 1 ${b} ${k-y}`,"Z"].join(" "),color:"#E2E8F0",label:"Total",value:0,percentage:"0%",labelX:b,labelY:k,startAngle:0,endAngle:Math.PI*2,index:-1}];const x=[];let v=-Math.PI/2;for(let T=0;T<j.length;T++){const M=j[T].value/w,E=M*2*Math.PI*n,V=Math.max(0,E-.02),P=v+V,z=b+Math.cos(v)*y,W=k+Math.sin(v)*y,F=b+Math.cos(P)*y,H=k+Math.sin(P)*y,D=b+Math.cos(v)*C,L=k+Math.sin(v)*C,B=b+Math.cos(P)*C,$=k+Math.sin(P)*C,O=V>Math.PI?1:0;let N;a?N=[`M ${z} ${W}`,`A ${y} ${y} 0 ${O} 1 ${F} ${H}`,`L ${B} ${$}`,`A ${C} ${C} 0 ${O} 0 ${D} ${L}`,"Z"].join(" "):N=[`M ${b} ${k}`,`L ${z} ${W}`,`A ${y} ${y} 0 ${O} 1 ${F} ${H}`,"Z"].join(" ");const _=v+V/2,Y=a?(y+C)/2:y*.7,A=b+Math.cos(_)*Y,G=k+Math.sin(_)*Y,Q=`${(M*100).toFixed(1)}%`,X=j[T].color||wo[T%wo.length],K=u(X);x.push({path:N,color:K,label:j[T].label,value:j[T].value,percentage:Q,labelX:A,labelY:G,startAngle:v,endAngle:P,index:T,originalIndex:e.findIndex(oe=>oe.label===j[T].label)}),v=P}return x},[j,w,y,b,k,C,n,a,e]);return r.jsxs("svg",{ref:h,width:o,height:t,style:{overflow:"visible"},children:[a&&r.jsxs("g",{pointerEvents:"none",children:[r.jsx("circle",{cx:b,cy:k,r:C,fill:"white"}),r.jsx("text",{x:b,y:k-8,textAnchor:"middle",dominantBaseline:"middle",fontSize:"14px",fontWeight:"500",fill:"color-gray-500",children:"Total"}),r.jsx("text",{x:b,y:k+12,textAnchor:"middle",dominantBaseline:"middle",fontSize:"20px",fontWeight:"800",fill:"color-gray-900",children:w.toLocaleString()})]}),S.map((x,v)=>{const T=E=>{const I=w>0?x.value/w*100:0,V=w>0?Math.max(0,100-I):null,P=r.jsxs(l.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(l.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(l.Text,{fontWeight:"semibold",children:x.label}),r.jsx(l.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:x.color})]}),r.jsxs(l.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:["Slice ",x.index+1," of ",j.length]}),r.jsxs(l.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(l.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Value"}),r.jsx(l.Text,{fontWeight:"medium",children:x.value.toLocaleString()})]}),r.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Share"}),r.jsx(l.Text,{fontWeight:"medium",children:x.percentage})]}),r.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Total"}),r.jsx(l.Text,{fontWeight:"medium",children:w.toLocaleString()})]}),V!==null&&r.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Remaining"}),r.jsx(l.Text,{fontWeight:"medium",children:`${V.toFixed(1)}%`})]})]})]});let z=E.clientX,W=E.clientY;if(h.current){const F=h.current.getBoundingClientRect();z=F.left+x.labelX,W=F.top+x.labelY}s(z,W,P)},R=()=>{x.index!==-1&&i&&i(e[x.index],x.index)},M=x.index===-1;return r.jsxs("g",{children:[r.jsx("path",{d:x.path,fill:x.color,onMouseEnter:M?void 0:T,onMouseMove:M?void 0:T,onMouseLeave:M?void 0:c,onClick:R,...ur,style:{...ur==null?void 0:ur.style,cursor:M?"default":"pointer"},...d==null?void 0:d.pie}),!M&&x.endAngle-x.startAngle>.25&&r.jsx("text",{x:x.labelX,y:x.labelY,textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:"11px",fontWeight:"800",pointerEvents:"none",paintOrder:"stroke",stroke:"rgba(0,0,0,0.2)",strokeWidth:"2px",children:x.percentage})]},`slice-${v}`)})]})},bm=({visible:e,x:o,y:t,content:n,maxDistance:a=100,views:i})=>{const s=p.useRef(null),[c,d]=p.useState({left:0,top:0});return p.useEffect(()=>{if(!e||!s.current||typeof window>"u"||typeof s.current.getBoundingClientRect!="function")return;const m=s.current.getBoundingClientRect(),g=m.width||200,h=m.height||100,f=20,y=16;let b=o-g/2,k=t-h-f;k<y&&(k=t+f),b+g>window.innerWidth-y?b=window.innerWidth-g-y:b<y&&(b=y),k=Math.max(y,Math.min(k,window.innerHeight-h-y)),d({left:b,top:k})},[e,o,t]),e?r.jsx(l.View,{ref:s,position:"fixed",left:`${c.left}px`,top:`${c.top}px`,...dr,...i==null?void 0:i.tooltip,style:{...dr==null?void 0:dr.style,pointerEvents:"none",transition:"all 0.1s ease-out"},children:n}):null},km=({type:e,data:o,dataPoints:t,title:n,showLegend:a=!0,legendPosition:i="bottom",showGrid:s=!0,showTooltips:c=!0,animated:d=!0,animationDuration:u=500,responsive:m=!0,aspectRatio:g=16/9,width:h=200,height:f=200,views:y,onDataPointClick:b,onSeriesClick:k,isLoading:C=!1,error:j,noData:w,loadingIndicator:S,errorIndicator:x,noDataIndicator:v,"aria-label":T,themeMode:R,...M})=>{const{animationProgress:E,tooltip:I,containerRef:V,processedData:P,showTooltip:z,hideTooltip:W,getChartDimensions:F,toggleSeries:H}=hm({data:o,dataPoints:t,animated:d,animationDuration:u,showTooltips:c}),D=P(),{width:L,height:B}=F(),$=h||L,O=f||(m?L/g:B),N=()=>{if(!a||!D)return null;let K=[];return e==="pie"||e==="donut"?Array.isArray(D)&&(K=D):D&&D.series&&(K=D.series),!K||K.length===0?null:r.jsx(l.Horizontal,{flexWrap:"wrap",justifyContent:"flex-start",marginTop:i==="bottom"?"16px":0,marginBottom:i==="top"?"16px":0,...am,...y==null?void 0:y.legend,children:K.map((oe,te)=>{const re=oe.hidden,U=oe.name||oe.label;return r.jsxs(l.View,{...lm,onClick:()=>H(U),opacity:re?.4:1,...y==null?void 0:y.legendItem,children:[r.jsx(l.View,{backgroundColor:oe.color,...im,opacity:re?.3:1}),r.jsx(l.Text,{...sm,textDecoration:re?"line-through":"none",children:U})]},`legend-${te}`)})})},_=()=>{if(!D)return null;switch(e){case"bar":return r.jsx(fm,{data:D,width:$,height:O,animationProgress:E,showGrid:s,onBarClick:k,showTooltip:z,hideTooltip:W,views:y});case"line":case"area":return r.jsx(ym,{data:D,width:$,height:O,animationProgress:E,showGrid:s,onPointClick:k,showTooltip:z,hideTooltip:W,views:y});case"pie":case"donut":return r.jsx(xm,{dataPoints:D,width:$,height:O,animationProgress:E,isDonut:e==="donut",onSliceClick:b,showTooltip:z,hideTooltip:W,views:y});default:return null}},Y=()=>C?r.jsx(l.View,{...pm,...y==null?void 0:y.loadingOverlay,children:S||r.jsx(l.Center,{children:r.jsx(Je,{size:"lg"})})}):null,A=()=>j?r.jsx(l.View,{...mm,...y==null?void 0:y.errorOverlay,children:x||r.jsx(l.Text,{fontWeight:"medium",children:typeof j=="string"?j:"An error occurred"})}):null,G=()=>w?r.jsx(l.View,{...gm,...y==null?void 0:y.noDataOverlay,children:v||r.jsx(l.Text,{children:typeof w=="string"?w:"No data available"})}):null,Q=T??(typeof n=="string"?n:"Chart"),X=!j&&!C&&!w;return r.jsxs(l.View,{ref:V,role:"region","aria-label":Q,"aria-busy":C,...tm,...y==null?void 0:y.container,...M,children:[n&&r.jsx(l.Text,{...nm,children:n}),X&&i==="top"&&N(),r.jsxs(l.View,{flex:1,width:"100%",position:"relative",...y==null?void 0:y.chart,children:[X&&_(),Y(),A(),G(),r.jsx(bm,{visible:c&&I.visible,x:I.x,y:I.y,content:I.content,maxDistance:100,views:y})]}),X&&i==="bottom"&&N()]})},Cm=e=>r.jsx(km,{...e}),Sm=Cm,jm=(e=365)=>{const[o,t]=p.useState(!1),[n,a]=p.useState(null),i="app-studio-cookie-consent";p.useEffect(()=>{if(typeof localStorage>"u")return;const u=localStorage.getItem(i);a(u!==null?u==="true":!1)},[]);const s=u=>{if(typeof localStorage<"u"){localStorage.setItem(i,String(u));const m=new Date;m.setDate(m.getDate()+e),localStorage.setItem(`${i}-expires`,m.toISOString())}a(u)};return{isHovered:o,setIsHovered:t,hasConsent:n,acceptCookies:()=>{s(!0)},resetConsent:()=>{typeof localStorage<"u"&&(localStorage.removeItem(i),localStorage.removeItem(`${i}-expires`)),a(!1)}}},wm=e=>({default:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-gray-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-gray-600",borderColor:"color-gray-300",hoverBackgroundColor:"color-gray-100"}},info:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-blue-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-blue-800",borderColor:"color-blue-300",hoverBackgroundColor:"color-blue-100"}},primary:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-blue-700"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-blue-700",borderColor:"color-blue-300",hoverBackgroundColor:"color-blue-100"}}}),vm=({title:e="Nous utilisons des cookies",description:o="Ce site utilise des cookies pour améliorer votre expérience. En continuant à naviguer sur ce site, vous acceptez notre utilisation des cookies conformément à notre politique de confidentialité.",acceptButtonText:t="Accepter",customizeButtonText:n="Personnaliser",position:a="bottom",variant:i="default",onAccept:s,onCustomize:c,views:d,showCustomizeButton:u=!0,cookieExpiration:m=365,themeMode:g,...h})=>{const{themeMode:f}=l.useTheme(),{hasConsent:y,acceptCookies:b}=jm(m),C=wm()[i];if(y)return null;const j=()=>{b(),s&&s()},w=()=>{c&&c()};return r.jsx(l.View,{style:{position:"fixed",left:16,right:16,zIndex:1e3,...a==="bottom"?{bottom:16}:{top:16}},padding:16,borderWidth:"1px",borderStyle:"solid",borderRadius:8,maxWidth:"800px",marginLeft:"auto",marginRight:"auto",transition:"opacity 0.3s ease, transform 0.3s ease",...C.container,...d==null?void 0:d.container,...h,children:r.jsxs(l.Vertical,{gap:12,maxWidth:1200,marginLeft:"auto",marginRight:"auto",children:[e&&r.jsx(l.Text,{fontWeight:"bold",fontSize:18,color:"color-black",...d==null?void 0:d.title,children:e}),o&&r.jsx(l.Text,{fontSize:14,color:"color-black",...d==null?void 0:d.description,children:o}),r.jsxs(l.Horizontal,{gap:12,justifyContent:"flex-end",marginTop:8,...d==null?void 0:d.buttonGroup,children:[u&&r.jsx(se,{variant:"outline",onClick:w,size:"sm",...d==null?void 0:d.customizeButton,children:n}),r.jsx(se,{variant:"filled",onClick:j,size:"sm",...d==null?void 0:d.acceptButton,children:t})]})]})})},Tm=e=>r.jsx(vm,{...e}),Im=Tm,Fm=e=>{const{size:o,variant:t,onOpenChange:n}=e||{},[a,i]=p.useState(!1),[s,c]=p.useState({x:0,y:0}),[d,u]=p.useState(null),m=p.useRef(null),g=p.useRef(null),h=p.useMemo(()=>Pt("contextmenu-content"),[]),f=p.useCallback(b=>{c({x:b.clientX,y:b.clientY}),i(!0),n==null||n(!0)},[n]),y=p.useCallback(()=>{i(!1),u(null),n==null||n(!1)},[n]);return p.useEffect(()=>{const b=j=>{g.current&&!g.current.contains(j.target)&&y()},k=()=>{a&&y()},C=j=>{j.key==="Escape"&&a&&y()};if(!(typeof(document==null?void 0:document.addEventListener)!="function"||typeof(window==null?void 0:window.addEventListener)!="function"))return document.addEventListener("mousedown",b),window.addEventListener("resize",k),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",b),window.removeEventListener("resize",k),document.removeEventListener("keydown",C)}},[a,y]),{isOpen:a,setIsOpen:i,position:s,setPosition:c,activeSubmenuId:d,setActiveSubmenuId:u,size:o,variant:t,triggerRef:m,contentRef:g,contentId:h,openMenu:f,closeMenu:y}},Wn={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},Rm={default:{backgroundColor:"color-white",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Hn={hover:{backgroundColor:"color-gray-100"}},dl=p.createContext({isOpen:!1,setIsOpen:()=>{},position:{x:0,y:0},setPosition:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null},contentRef:{current:null},contentId:"contextmenu-content",closeMenu:()=>{},openMenu:()=>{}}),zm=({children:e,value:o})=>r.jsx(dl.Provider,{value:o,children:e}),zr=()=>{const e=p.useContext(dl);if(!e)throw new Error("useContextMenuContext must be used within a ContextMenuProvider");return e},ul=({children:e,disableNativeContextMenu:o=!0,asChild:t=!1,isDisabled:n=!1,views:a,...i})=>{const{triggerRef:s,contentId:c,openMenu:d}=zr(),m={ref:s,onContextMenu:g=>{if(!n)if(o&&g.preventDefault(),d)d(g);else{const{setIsOpen:h,setPosition:f}=zr();f({x:g.clientX,y:g.clientY}),h(!0)}},"aria-controls":c,"aria-haspopup":"menu","data-disabled":n?"":void 0,...t&&p.isValidElement(e)&&e.props.isDisabled===void 0&&{isDisabled:n},...a==null?void 0:a.container,...i};if(t&&p.isValidElement(e)){const g=p.Children.only(e);return p.cloneElement(g,{...m,...g.props})}return r.jsx(l.View,{...m,children:e})},rn=({items:e,children:o,position:t,side:n="right",align:a="start",views:i,style:s,...c})=>{const{isOpen:d,position:u,contentRef:m,contentId:g,variant:h}=zr(),f=p.useRef(null),y=m||f,{ref:b,relation:k}=l.useElementPosition({}),[C,j]=p.useState({x:0,y:0});if(p.useEffect(()=>{if(d&&y.current){const S=t||u,x=y.current.offsetWidth,v=y.current.offsetHeight,T=window.innerWidth,R=window.innerHeight;let M=S.x,E=S.y;k&&(k.space.horizontal==="left"?M=S.x-x:M=S.x,k.space.vertical==="top"?E=S.y-v:E=S.y),M+x>T&&(M=T-x-8),M<8&&(M=8),E+v>R&&(E=R-v-8),E<8&&(E=8),j({x:M,y:E})}},[d,u,t,n,a,y,k]),!d)return null;const w={position:"fixed",top:`${C.y}px`,left:`${C.x}px`,zIndex:1e3,transformOrigin:"top left"};return r.jsxs(l.View,{id:g||"context-menu",ref:y,role:"menu",tabIndex:-1,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:{...w,...s},...Rm[h],...i==null?void 0:i.menu,...i==null?void 0:i.content,...c,children:[e&&e.map((S,x)=>S.divider?r.jsx(ml,{views:i},`divider-${x}`):r.jsx(pl,{item:S,views:i},S.id)),o]})},pl=({item:e,children:o,onSelect:t,isDisabled:n=!1,views:a,variant:i,shape:s,isLoading:c,loaderProps:d,loaderPosition:u,icon:m,iconPosition:g,isFilled:h,isAuto:f,isIconRounded:y,isHovered:b,shadow:k,ariaLabel:C,animation:j,textColor:w,reversed:S,borderMovingDuration:x,borderMovingGradientColors:v,animatedStrokeAccentColor:T,animatedStrokeTextColor:R,to:M,isExternal:E,config:I,...V})=>{const{activeSubmenuId:P,setActiveSubmenuId:z,size:W,closeMenu:F}=zr();if(e){const[D,L]=p.useState(!1),B=e.items&&e.items.length>0,$=P===e.id,[O,N]=p.useState({x:0,y:0}),_=e.disabled||n,Y=()=>{L(!0),B&&z(e.id)},A=()=>{L(!1)},G=()=>{_||!B&&e.onClick&&(e.onClick(),F&&F())},{ref:Q,relation:X}=l.useElementPosition({});return p.useEffect(()=>{if($&&Q.current){const K=Q.current.getBoundingClientRect(),oe=window.innerWidth,te=200;let re=!1;if(X)re=X.space.horizontal==="left";else{const U=oe-K.right,Z=K.left;re=U<te&&Z>U}N({x:re?K.left-te:K.right,y:K.top})}},[$,e.items,X]),r.jsxs(l.View,{ref:Q,role:"menuitem",display:"flex",alignItems:"center",cursor:_?"not-allowed":"pointer",opacity:_?.5:1,position:"relative","aria-disabled":_,"data-disabled":_?"":void 0,...Wn[W],_hover:_?{}:Hn.hover,backgroundColor:D&&!_?"color-gray-100":"transparent",onMouseEnter:Y,onMouseLeave:A,onClick:G,...a==null?void 0:a.item,...V,children:[e.icon&&r.jsx(l.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),r.jsx(l.View,{flexGrow:1,children:e.label}),B&&r.jsx(l.View,{marginLeft:8,...a==null?void 0:a.submenuIndicator,children:r.jsx(ce,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),$&&B&&r.jsx(rn,{items:e.items||[],position:O,side:"right",align:"start",views:a})]})}const H=D=>{n||(t==null||t(D),F&&F())};return r.jsx(l.View,{role:"menuitem",onClick:H,cursor:n?"not-allowed":"pointer",opacity:n?.5:1,"aria-disabled":n,"data-disabled":n?"":void 0,...Wn[W],_hover:n?{}:Hn.hover,...a==null?void 0:a.item,...V,children:o})},ml=({views:e,...o})=>r.jsx(l.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.divider,...o}),Mm=({views:e,...o})=>r.jsx(l.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.separator,...o}),Wm=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:a=!0,views:i,themeMode:s,onOpenChange:c,...d})=>!o||o.length===0?r.jsx(r.Fragment,{children:e}):r.jsxs(r.Fragment,{children:[r.jsx(ul,{disableNativeContextMenu:a,views:i,...d,children:e}),r.jsx(rn,{items:o,views:i})]}),Hm=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:a=!0,onOpenChange:i,views:s,...c})=>{const d=Fm({size:t,variant:n,onOpenChange:i}),{isOpen:u,setIsOpen:m,position:g,setPosition:h,activeSubmenuId:f,setActiveSubmenuId:y,triggerRef:b,contentRef:k,contentId:C,openMenu:j,closeMenu:w}=d;return r.jsx(zm,{value:{isOpen:u,setIsOpen:m,position:g,setPosition:h,activeSubmenuId:f,setActiveSubmenuId:y,size:t,variant:n,triggerRef:b,contentRef:k,contentId:C,openMenu:j,closeMenu:w,styles:s},children:r.jsx(Wm,{items:o,size:t,variant:n,disableNativeContextMenu:a,views:s,...c,children:e})})},Vo=Hm;Vo.Trigger=ul;Vo.Content=rn;Vo.Item=pl;Vo.Divider=ml;Vo.Separator=Mm;const Pm=({src:e,color:o,views:t,themeMode:n,...a})=>{const{getColor:i,themeMode:s}=l.useTheme(),c=o?{fill:i(o,{themeMode:s}),stroke:i(o,{themeMode:s})}:{};return r.jsx(l.View,{display:"flex",alignItems:"center",justifyContent:"center",...a,...t==null?void 0:t.container,children:r.jsx(l.Image,{...c,content:'url("'+e+'")',width:"100%",height:"100%",...t==null?void 0:t.image})})},Vm=({path:e,...o})=>r.jsx(l.Image,{src:e,...o}),gl=({placeholder:e,isMulti:o,options:t,id:n=`select-${Math.random().toString(36).substr(2,9)}`})=>{const a=e?o?[]:"":Array.isArray(t)&&t.length>0?t[0].value:o?[]:"",[i,s]=p.useState(!1),[c,d]=p.useState(!1),[u,m]=p.useState(a),[g,h]=p.useState(0),[f,y]=p.useState(!0);return{id:n,value:u,setValue:m,hide:f,setHide:y,isHovered:i,setIsHovered:s,isFocused:c,setIsFocused:d,highlightedIndex:g,setHighlightedIndex:h}},Ct=({children:e,views:o={helperText:{}},...t})=>r.jsx(l.Text,{fontSize:"11px",fontWeight:"400",letterSpacing:"-0.01em",lineHeight:"16px",marginVertical:0,marginHorizontal:0,color:"color-gray-500",transition:"color 0.2s ease, opacity 0.2s ease",...o.helperText,...t,children:e}),qe=p.forwardRef(({children:e,helperText:o,error:t=!1,views:n,...a},i)=>r.jsxs(l.Vertical,{ref:i,gap:4,position:"relative",width:"100%",boxSizing:"border-box",marginVertical:0,...a,...n==null?void 0:n.container,children:[e,!t&&o&&r.jsx(Ct,{marginTop:0,...n==null?void 0:n.helperText,children:o}),t&&r.jsx(l.Text,{fontSize:"11px",lineHeight:"16px",marginTop:0,marginHorizontal:0,fontWeight:"500",color:"color-red-500",transition:"color 0.2s ease, opacity 0.2s ease",...n==null?void 0:n.error,children:t})]}));qe.displayName="FieldContainer";const Am={default:{borderRadius:"8px"},square:{borderRadius:0},rounded:{borderRadius:"8px"},pill:{borderRadius:"9999px"}},Em={xs:"10px",sm:"11px",md:"11px",lg:"12px",xl:"12px"},Dm={outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"transparent",color:"inherit",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",_hover:{borderColor:"color-gray-300"},_focus:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"},_focusVisible:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"}},default:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"8px",backgroundColor:"transparent",color:"inherit",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",_hover:{borderColor:"color-gray-300"},_focus:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"},_focusVisible:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"}},none:{border:"none",style:{backgroundColor:"transparent"},color:"inherit",transition:"background-color 0.2s ease"}},$m={xs:{minHeight:24,paddingVertical:4,paddingHorizontal:10},sm:{minHeight:32,paddingVertical:7,paddingHorizontal:10},md:{minHeight:40,paddingVertical:9,paddingHorizontal:12},lg:{minHeight:48,paddingVertical:11,paddingHorizontal:14},xl:{minHeight:56,paddingVertical:13,paddingHorizontal:16}},Lm=e=>{const{minHeight:o,paddingVertical:t,paddingHorizontal:n}=$m[e];return{minHeight:`${o}px`,paddingTop:`${t}px`,paddingBottom:`${t}px`,paddingLeft:`${n}px`,paddingRight:`${n}px`}},Ze=({label:e,shadow:o,children:t,value:n,size:a="md",shape:i="default",variant:s="default",error:c=!1,showLabel:d=!1,isFocused:u=!1,isHovered:m=!1,isDisabled:g=!1,isReadOnly:h=!1,views:f={pickerBox:{}},...y})=>{const{themeMode:b}=l.useTheme(),k=b==="dark",j=c?"color-red-500":(m||u)&&!g?"theme-primary":"color-gray-200";return r.jsx(l.Horizontal,{gap:8,width:"100%",boxSizing:"border-box",display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-start",borderStyle:"solid",borderColor:j,backgroundColor:k?"color-gray-900":"color-white",fontSize:l.Typography.fontSizes[a],cursor:g?"not-allowed":h?"auto":"text",opacity:g?.7:1,transition:"border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...Lm(a),...typeof o=="object"&&o!==null?o:{},...Am[i],...Dm[s],...f==null?void 0:f.container,...y,children:t})},tn=({children:e,...o})=>r.jsx(l.Horizontal,{gap:10,right:10,zIndex:500,flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-end",...o,children:e}),_m={h1:{fontSize:96,letterSpacing:-1.5},h2:{fontSize:60,letterSpacing:-.5},h3:{fontSize:48,letterSpacing:0},h4:{fontSize:34,letterSpacing:.25},h5:{fontSize:24,letterSpacing:0},h6:{fontSize:20,letterSpacing:.15}},Bm=({children:e,heading:o,isItalic:t=!1,isUnderlined:n=!1,isStriked:a=!1,weight:i="normal",size:s="sm",dropDown:c,error:d,isDisabled:u,helperText:m,views:g,...h})=>{const f=o?_m[o]:{};return r.jsx(l.Element,{as:"label",width:"100%",fontSize:s,fontStyle:t?"italic":"normal",fontWeight:l.Typography.fontWeights[i],textDecoration:a?"line-through":n?"underline":"none",...f,...h,children:e})},Om=e=>r.jsx(Bm,{...e}),tr=Om,io=({children:e,size:o="md",error:t=!1,color:n="theme-primary",views:a={label:{}},helperText:i,...s})=>r.jsx(tr,{position:"static",fontSize:Em[o],letterSpacing:"-0.01em",whiteSpace:"nowrap",fontWeight:500,opacity:t?1:.72,color:t?"color-red-500":"inherit",transition:"color 0.2s ease",...a.label,...s,children:e}),Ao=({children:e,...o})=>r.jsx(l.Vertical,{display:"flex",flexDirection:"column",gap:4,flex:1,width:"100%",maxWidth:"100%",boxSizing:"border-box",...o,children:e}),hl={xs:12,sm:14,md:16,lg:18,xl:20},Nm={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)"},qm={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"}},Um={padding:"10px 12px",cursor:"pointer",borderRadius:8,margin:"2px 4px",transition:"all 0.15s ease-in-out"},pr={default:{},highlighted:{backgroundColor:"color-gray-100"},selected:{backgroundColor:"color-gray-100"},selectedHighlighted:{backgroundColor:"color-gray-200"}},Pn={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},Gm={padding:"4px 8px",borderRadius:8,backgroundColor:"color-gray-100",fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},Ym={scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.15) transparent"},Km=e=>{if(!e)return{};const{container:o,content:t,...n}=e;return n},Xm=({isHovered:e,setIsHovered:o=()=>{},option:t,size:n="md",callback:a=()=>{},style:i,isSelected:s=!1,...c})=>{const d=(g,h)=>{g.stopPropagation(),g.preventDefault(),typeof a=="function"&&a(h)},u=()=>o(!e),m=()=>s&&e?pr.selectedHighlighted:s?pr.selected:e?pr.highlighted:pr.default;return r.jsxs(l.Element,{as:"li",display:"flex",alignItems:"center",justifyContent:"space-between",listStyleType:"none",...Um,...m(),onMouseEnter:u,onMouseLeave:u,onClick:g=>d(g,t.value),...c,children:[r.jsx(l.Text,{fontSize:l.Typography.fontSizes[n],fontWeight:s?"500":"400",lineHeight:"14px",color:s?"color-gray-900":"color-gray-700",...i,children:t.label}),s&&r.jsx(l.Element,{as:"span",color:"theme-primary",fontSize:"14px",marginLeft:8,display:"flex",alignItems:"center",children:"✓"})]})},Jm=({size:e="md",views:o={field:{},text:{}},value:t,isDisabled:n,placeholder:a,removeOption:i=()=>{},options:s})=>{const c=(o==null?void 0:o.field)||{},d=(o==null?void 0:o.text)||{},u=Array.isArray(t)&&t.length>0,m={margin:0,width:"95%",height:"100%",border:"none",paddingVertical:0,paddingHorizontal:0,fontSize:l.Typography.fontSizes[e],fontWeight:"400",letterSpacing:"-0.01em",color:n?"color-gray-400":"color-gray-900",cursor:n?"not-allowed":"pointer",transition:"all 0.2s ease-in-out",...u?{}:{maxLines:1,minWidth:0},...c,...d,style:{backgroundColor:"transparent",...c.style,...d.style}},g=s.length>0&&s.find(h=>h.value===t);return r.jsx(l.Text,{...m,children:(t===""||Array.isArray(t)&&t.length===0)&&a?a:r.jsx(r.Fragment,{children:typeof t=="string"?(g&&g.label)??t:Array.isArray(t)&&t.length>0?r.jsx(l.Horizontal,{gap:6,children:t.map(h=>r.jsx(e0,{option:h,removeOption:i},h))}):r.jsx("span",{children:t})})})},Qm=({id:e,name:o,value:t,onChange:n,isMulti:a=!1,isDisabled:i=!1,isReadOnly:s=!1,options:c=[],...d})=>{const u=m=>{n&&n(m)};return r.jsx(l.Element,{id:e,name:o,as:"select",opacity:0,width:1,height:1,overflow:"hidden",position:"absolute",pointerEvents:"none",tabIndex:-1,"aria-hidden":"true",value:t,disabled:i,readOnly:s,onChange:u,multiple:a,...d,children:c.length>0&&c.map(m=>r.jsx("option",{value:m.value,children:m.label},m.value))})},Zm=({size:e,views:o={},options:t,callback:n=()=>{},highlightedIndex:a,setHighlightedIndex:i=()=>{},selectedValue:s})=>{const c=u=>n(u),d=u=>Array.isArray(s)?s.includes(u):s===u;return r.jsx(l.Element,{as:"ul",role:"listbox",display:"flex",flexDirection:"column",margin:0,padding:"4px",...Nm,style:Ym,...o==null?void 0:o.dropDown,children:t&&t.length>0&&t.map((u,m)=>r.jsx(Xm,{size:e,style:o.text,option:u,callback:c,isSelected:d(u.value),isHovered:m===a,setIsHovered:()=>{},onMouseEnter:()=>i(m)},u.value))})},e0=({option:e,size:o="md",removeOption:t=()=>{},...n})=>{const a=()=>t(e);return r.jsxs(l.Horizontal,{gap:6,alignItems:"center",onClick:i=>i.stopPropagation(),...Gm,_hover:{backgroundColor:"color-gray-200"},...n,children:[r.jsx(l.Text,{fontSize:l.Typography.fontSizes[o],fontWeight:"500",color:"color-gray-700",children:e}),r.jsx(Te,{role:"close-button",color:"color-gray-500",widthHeight:hl[o],onClick:a,cursor:"pointer",transition:"all 0.2s ease-in-out",_hover:{color:"color-gray-700"}})]})},fl=({id:e,name:o,label:t,value:n,placeholder:a,helperText:i,hide:s=!1,error:c=!1,isMulti:d=!1,isFocused:u=!1,isHovered:m=!1,isDisabled:g=!1,isReadOnly:h=!1,options:f=[],shadow:y={},size:b="md",shape:k="default",variant:C="default",views:j={text:{},icon:{},dropDown:{},selectBox:{},label:{},helperText:{}},onChange:w=()=>{},setHide:S=()=>{},setValue:x=()=>{},setIsHovered:v=()=>{},setIsFocused:T=()=>{},setHighlightedIndex:R,highlightedIndex:M,isScrollable:E,...I})=>{const{ref:V,relation:P,updateRelation:z}=l.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),W=p.useRef(null),F=()=>{var G;if(!V.current)return{};const _=V.current.getBoundingClientRect(),Y={position:"fixed",left:_.left,width:_.width,zIndex:1e4};return((G=P==null?void 0:P.space)==null?void 0:G.vertical)==="top"?{...Y,bottom:window.innerHeight-_.top+8}:{...Y,top:_.bottom+8}};p.useEffect(()=>{const _=()=>S(!0);return document.addEventListener("closeAllSelects",_),()=>document.removeEventListener("closeAllSelects",_)},[S]),p.useEffect(()=>{const _=Y=>{!Y.target.closest(`#${e}`)&&!s&&S(!0)};return document.addEventListener("click",_),()=>{document.removeEventListener("click",_)}},[e,s,S]);const H=()=>v(!m),D=()=>T(!0),L=_=>{document.dispatchEvent(new Event("closeAllSelects")),_&&_.stopPropagation&&_.stopPropagation();const Y=!s;S(Y),T(!Y)},B=p.useCallback(_=>{if(S(!0),document.dispatchEvent(new Event("closeAllSelects")),d&&Array.isArray(n)){if(!n.includes(_)){const Y=[...n,_];x(Y),w&&w(_)}}else x(_),w&&w(_);T(!0)},[d,n,S,x,w,T]),$=_=>{if(Array.isArray(n)&&n.includes(_)){const Y=n.filter(A=>A!==_);x(Y.length===0?[]:Y)}},O=!!t,N=Km(j);return r.jsx(qe,{ref:V,position:"relative",width:"100%",display:"inline-block",id:e,role:"SelectBox",helperText:i,error:c,views:N,onClick:_=>{_.stopPropagation(),g||h||L(_)},children:r.jsxs(Ze,{label:t,size:b,error:c,shape:k,views:j,shadow:y,variant:C,value:n,color:"theme-primary",isHovered:m,isDisabled:g,isReadOnly:h,isFocused:u,showLabel:O,onMouseEnter:H,onMouseLeave:H,position:"relative",...j==null?void 0:j.content,children:[r.jsxs(Ao,{children:[O&&r.jsx(io,{htmlFor:e,color:"theme-primary",error:c,...j==null?void 0:j.label,children:t}),r.jsx(Qm,{id:e,name:o,options:f,onChange:w,value:n,isDisabled:g,isReadOnly:h,isMulti:d,onFocus:D,...I}),r.jsx(Jm,{options:f,size:b,views:j,value:n,isDisabled:g,placeholder:a,removeOption:$})]}),r.jsx(tn,{children:!h&&!g&&r.jsx(l.Element,{display:"flex",alignItems:"center",justifyContent:"center",style:s?Pn.closed:Pn.open,children:r.jsx(ce,{color:"inherit",widthHeight:hl[b],style:j.icon,orientation:"down"})})}),!s&&f.length>0&&r.jsx($t,{children:r.jsx(l.Element,{ref:W,onClick:_=>_.stopPropagation(),style:{...F(),...qm.enter},children:r.jsx(Zm,{size:b,views:j,options:f,callback:B,highlightedIndex:M,setHighlightedIndex:R,selectedValue:n})})})]})})},o0=e=>{const o=ge("select",e),t={...o,options:o.options||[]},n=gl(t);return r.jsx(fl,{...n,...t,onClick:a=>{a.stopPropagation(),o.onClick&&o.onClick(a)}})},Zo=o0,yl=({isDisabled:e,isChecked:o})=>{const[t,n]=p.useState(!1),[a,i]=p.useState(o||!1),[s,c]=p.useState(o||!1);return p.useEffect(()=>{o!==void 0&&(i(o),c(o))},[o]),{isHovered:t,setIsHovered:n,on:a,setOn:i,value:s,setValue:c}},Vn={xs:{height:"10px",width:"10px"},sm:{height:"14px",width:"14px"},md:{height:"18px",width:"18px"},lg:{height:"22px",width:"22px"},xl:{height:"26px",width:"26px"}},r0={xs:{height:"20px",width:"40px"},sm:{height:"24px",width:"48px"},md:{height:"28px",width:"56px"},lg:{height:"32px",width:"64px"},xl:{height:"36px",width:"72px"}},t0={xs:{height:"22px",width:"52px"},sm:{height:"26px",width:"62px"},md:{height:"30px",width:"72px"},lg:{height:"34px",width:"84px"},xl:{height:"38px",width:"96px"}},n0={xs:"9px",sm:"10px",md:"11px",lg:"12px",xl:"13px"},mr={xs:{paddingVertical:5,paddingHorizontal:3},sm:{paddingVertical:5,paddingHorizontal:3},md:{paddingVertical:5,paddingHorizontal:5},lg:{paddingVertical:5,paddingHorizontal:5},xl:{paddingVertical:5,paddingHorizontal:5}},oo={default:{active:"theme-primary",inactive:"color-gray-300",knob:"color-white",disabled:"color-gray-200"},states:{hover:{active:"theme-primary",inactive:"color-gray-400",activeOpacity:.9}}},An={slider:{transition:"all 0.2s ease-in-out"},knob:{transition:"all 0.2s ease-in-out"}},a0=e=>r.jsx(l.Input,{type:"checkbox",...e}),xl=({id:e,name:o,label:t,inActiveChild:n,isChecked:a,activeChild:i,labelPosition:s="right",shadow:c={},size:d="sm",value:u=!1,isHovered:m=!1,isDisabled:g=!1,isReadOnly:h=!1,on:f,setOn:y=()=>{},onChange:b,setValue:k=()=>{},setIsHovered:C=()=>{},helperText:j,views:w={slider:{},circle:{},label:{}},...S})=>{const x=typeof a=="boolean"?a:u,T=!!(i||n)?t0[d]:r0[d],R=`${mr[d].paddingHorizontal}px`,M=`${mr[d].paddingHorizontal+2}px`,E=`calc(${Vn[d].width} + ${mr[d].paddingHorizontal}px + 4px)`,I=n0[d],V=F=>{if(!h&&!g){const H=F.target.checked;k(H),y(H),b&&b(H)}},P=()=>C(!0),z=()=>C(!1),W={container:{gap:12,display:"flex",height:"fit-content",width:"fit-content",alignItems:"center",cursor:g?"not-allowed":h?"default":"pointer",opacity:g?.6:1,transition:"all 0.2s ease-in-out",...w.label}};return r.jsxs(tr,{htmlFor:e,onMouseEnter:P,onMouseLeave:z,...W.container,...S,children:[r.jsx(a0,{id:e,name:o,opacity:0,width:0,height:0,checked:x,onChange:V,disabled:g,readOnly:h,...S}),s==="left"&&t&&r.jsx(l.Text,{fontWeight:"500",color:g?"color-gray-400":"inherit",transition:"color 0.2s ease, opacity 0.2s ease",children:t}),r.jsxs(l.View,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",marginBottom:4,borderRadius:"9999px",backgroundColor:g?oo.default.disabled:x?m?oo.states.hover.active:oo.default.active:m?oo.states.hover.inactive:oo.default.inactive,opacity:!g&&x&&m?oo.states.hover.activeOpacity:1,cursor:"pointer",...An.slider,...c,...mr[d],...T,...w.slider,children:[i&&x&&r.jsx(l.View,{marginLeft:M,marginRight:E,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:I,color:"color-white",fontWeight:600,children:i}),r.jsx(l.View,{position:"absolute",top:"50%",left:x?void 0:R,right:x?R:void 0,borderRadius:"50%",backgroundColor:oo.default.knob,boxShadow:m?"0 4px 10px rgba(15, 23, 42, 0.18)":"0 1px 3px rgba(15, 23, 42, 0.18)",transform:`translateY(-50%) ${m?"scale(1.05)":"scale(1)"}`,...An.knob,zIndex:1,...Vn[d],...w.circle}),n&&!x&&r.jsx(l.View,{marginLeft:E,marginRight:M,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:I,color:"color-white",fontWeight:600,children:n})]}),s==="right"&&t&&r.jsx(l.Text,{fontWeight:"500",color:g?"color-gray-400":"inherit",transition:"all 0.2s ease-in-out",children:t})]})},l0=e=>{const o=ge("switch",e),t=yl(o);return r.jsx(xl,{...t,...o})},nn=l0,bl=({placeholder:e,isMulti:o,options:t,id:n=`selector-${Math.random().toString(36).substr(2,9)}`})=>{const a=e?o?[]:"":Array.isArray(t)&&t.length>0?t[0].value:o?[]:"",[i,s]=p.useState(!1),[c,d]=p.useState(!1),[u,m]=p.useState(a),[g,h]=p.useState(0),[f,y]=p.useState(!0);return{id:n,value:u,setValue:m,hide:f,setHide:y,isHovered:i,setIsHovered:s,isFocused:c,setIsFocused:d,highlightedIndex:g,setHighlightedIndex:h}},kl=({id:e,name:o,label:t,value:n,views:a={},options:i=[],onChange:s=()=>{},setValue:c=()=>{}})=>{const d=p.useCallback(u=>{c(u.value),s&&s(u.value)},[c,s]);return r.jsxs(qe,{id:e,width:"100%",views:a,children:[t&&r.jsxs(l.Horizontal,{fontSize:"10px",letterSpacing:"wider",color:"color-black-500",fontWeight:"bold",marginBottom:12,alignItems:"center",gap:6,style:{textTransform:"uppercase"},children:[r.jsx(Ye,{widthHeight:14})," ",r.jsx(l.Text,{children:t})]}),r.jsx(l.Horizontal,{gap:0,children:i.map((u,m,g)=>{const h=n===u.value,f=u.color??"theme-primary",y=h?f:"color-gray-200",b=h?f:"color-gray-500",k=m===0,C=m===g.length-1,j=C||h;return r.jsx(l.View,{as:"button",type:"button",onClick:()=>d(u),flex:1,minWidth:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"center",paddingVertical:6,paddingHorizontal:12,fontSize:"12px",fontWeight:h?"bold":"normal",cursor:"pointer",backgroundColor:"transparent",color:b,borderStyle:"solid",borderColor:y,borderTopWidth:1,borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:j?1:0,borderRadius:k?"6px 0 0 6px":C?"0 6px 6px 0":"0",zIndex:h?1:0,transition:"color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease",...a.item,children:u.label},u.value)})}),r.jsx("input",{type:"hidden",id:e,name:o,value:Array.isArray(n)?n.join(","):n,onChange:()=>{}})]})},i0=e=>{const o={...e,options:e.options||[]},t=bl(o);return r.jsx(kl,{...t,...o,onClick:n=>{n.stopPropagation(),e.onClick&&e.onClick(n)}})},s0=i0,Cl=({label:e,placeholder:o,value:t})=>{const[n,a]=p.useState(e??o),[i,s]=p.useState(!1),[c,d]=p.useState(t||""),[u,m]=p.useState(!1);return p.useMemo(()=>{a(u&&!c?o??"":e??o)},[c,u,e,o]),{hint:n,setHint:a,isHovered:i,setIsHovered:s,value:c,setValue:d,isFocused:u,setIsFocused:m}},c0=e=>{if(!e)return{};const{container:o,content:t,...n}=e;return n},d0=(e,o)=>{if(o!=="pill")return e;if(typeof e=="number")return Math.min(e,28);if(typeof e=="string"){const t=Number.parseFloat(e);if(Number.isFinite(t)&&e.trim().endsWith("px"))return`${Math.min(t,28)}px`}return"28px"},Sl=({id:e,name:o,hint:t,error:n,value:a,label:i,shadow:s,helperText:c,placeholder:d,size:u="sm",shape:m="default",variant:g="default",isHovered:h=!1,isFocused:f=!1,isEditable:y=!1,isReadOnly:b=!1,isDisabled:k=!1,isAutoFocus:C=!1,isMultiline:j=!1,maxRows:w=3,maxCols:S=30,onBlur:x=()=>{},onChange:v,onFocus:T,setHint:R=()=>{},setValue:M=()=>{},setIsFocused:E=()=>{},setIsHovered:I=()=>{},onChangeText:V,onSubmit:P,isWorkerRunning:z,inputRef:W,views:F={label:{},helperText:{}},...H})=>{const D=!!i,L={xs:{minHeight:"72px",shellPaddingY:6,shellPaddingX:10,fontSize:12,lineHeight:"16px"},sm:{minHeight:"88px",shellPaddingY:8,shellPaddingX:10,fontSize:12,lineHeight:"16px"},md:{minHeight:"104px",shellPaddingY:10,shellPaddingX:12,fontSize:14,lineHeight:"20px"},lg:{minHeight:"120px",shellPaddingY:12,shellPaddingX:14,fontSize:16,lineHeight:"24px"},xl:{minHeight:"136px",shellPaddingY:14,shellPaddingX:16,fontSize:18,lineHeight:"28px"}},B=(F==null?void 0:F.field)||{},$=(F==null?void 0:F.container)||{},O=d0($.borderRadius,m),N={...F,container:{...$,...O!==void 0?{borderRadius:O}:{},overflow:"hidden"}},_=c0(F),Y={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:L[u].minHeight,maxHeight:"calc(100vh - 100px)",border:"none",on:{focus:{outline:"none"}},fontSize:L[u].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:k?"color-gray-400":"color-gray-900",cursor:k?"not-allowed":"text",opacity:k?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",...B,style:{backgroundColor:"transparent",...B.style}},A=()=>{E(!0),T&&T()},G=X=>{x(X),E(!1)},Q=X=>{typeof X=="string"?(M(X),v&&v(X)):(M(X.target.value),v&&v(X.target.value))};return r.jsx(qe,{helperText:c,error:n,views:_,children:r.jsx(Ze,{label:i,size:u,error:n,shape:m,views:N,shadow:s,variant:g,value:a,color:"theme-primary",isHovered:h,isDisabled:k,isReadOnly:b,isFocused:f,showLabel:D,alignItems:"flex-start",minHeight:L[u].minHeight,paddingTop:L[u].shellPaddingY,paddingBottom:L[u].shellPaddingY,paddingLeft:L[u].shellPaddingX,paddingRight:L[u].shellPaddingX,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),...N==null?void 0:N.content,children:r.jsxs(Ao,{...F==null?void 0:F.warper,children:[D&&r.jsx(io,{htmlFor:e,color:"theme-primary",error:n,...F==null?void 0:F.label,children:i}),r.jsx(l.Element,{ref:W,as:"textarea",id:e,name:o,rows:w,cols:S,value:a,readOnly:b,disabled:k,autoFocus:C,placeholder:d||t,onBlur:G,onFocus:A,onChange:X=>Q(X),...Y,...H,style:{resize:k||b?"none":"vertical",...Y.style,...H.style||{}},...F==null?void 0:F.textarea})]})})})},u0=e=>{const o=ge("textarea",e),t=Cl(o);return r.jsx(Sl,{...t,...o})},an=u0,ln=({label:e,placeholder:o,value:t})=>{const[n,a]=p.useState(e??o),[i,s]=p.useState(!1),[c,d]=p.useState(!1),[u,m]=p.useState(t);return p.useMemo(()=>{a(i&&!u?o??"":e??o)},[u,i,e,o]),{hint:n,setHint:a,isFocused:i,setIsFocused:s,isHovered:c,setIsHovered:d,setValue:m,value:u}},nr=({id:e,name:o,label:t,hint:n,value:a,onChange:i,left:s,right:c,helperText:d,placeholder:u,onChangeText:m,shadow:g={},views:h={container:{},field:{},label:{},helperText:{},text:{}},size:f="md",shape:y="default",variant:b="default",error:k=!1,isFocused:C=!1,isHovered:j=!1,isDisabled:w=!1,isReadOnly:S=!1,isClearable:x=!0,isAutoFocus:v=!1,setHint:T=()=>{},setIsFocused:R=()=>{},setIsHovered:M=()=>{},setValue:E=()=>{},onClick:I=()=>{},onFocus:V,onBlur:P=()=>{},themeMode:z,inputRef:W,...F})=>{const{getColor:H,themeMode:D}=l.useTheme(),L=H(w?"color-gray-400":"color-gray-500",{themeMode:z||D}),B=!!t,$={xs:{minHeight:24,shellPaddingY:6,shellPaddingX:10,fontSize:12,lineHeight:"16px"},sm:{minHeight:32,shellPaddingY:8,shellPaddingX:10,fontSize:12,lineHeight:"16px"},md:{minHeight:40,shellPaddingY:10,shellPaddingX:12,fontSize:14,lineHeight:"20px"},lg:{minHeight:48,shellPaddingY:12,shellPaddingX:14,fontSize:16,lineHeight:"24px"},xl:{minHeight:56,shellPaddingY:14,shellPaddingX:16,fontSize:18,lineHeight:"28px"}},O=(h==null?void 0:h.field)||{},N="0 0 0 1000px var(--theme-canvas) inset",_={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:"auto",border:"none",backgroundColor:"transparent",fontSize:$[f].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:w?"color-gray-400":"color-gray-900",cursor:w?"not-allowed":"text",opacity:w?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",_focus:{outline:"none",_placeholder:{opacity:.7}},_placeholder:{color:"color-gray-400",opacity:1,transition:"opacity 0.2s ease-out"},_selection:{backgroundColor:"color-mix(in srgb, var(--theme-primary) 20%, transparent)"},_webkitAutofill:{boxShadow:N,WebkitBoxShadow:N,WebkitTextFillColor:"var(--theme-text)",transition:"background-color 5000s ease-in-out 0s"},_webkitContactsAutoFillButton:{visibility:"hidden",pointerEvents:"none",position:"absolute",right:0},...O},Y=()=>{R(!0),V&&V()},A=()=>M(!0),G=()=>M(!1),Q=U=>{P&&P(U),R(!1)},X=U=>{typeof U=="string"?(E(U),m&&m(U),i&&i(U)):(E(U.target.value),m&&m(U.target.value),i&&i(U.target.value))},K=()=>{E(""),i&&(P({target:{name:o}}),m&&m(""),i&&i("")),typeof document>"u"&&m&&m("")},{container:oe,content:te,...re}=h||{};return r.jsx(qe,{helperText:d,error:k,views:re,children:r.jsxs(Ze,{label:t,size:f,error:k,shape:y,views:h,shadow:g,variant:b,value:a,color:"theme-primary",isHovered:j,isDisabled:w,isReadOnly:S,isFocused:C,showLabel:B,onMouseEnter:A,onMouseLeave:G,children:[s,r.jsxs(Ao,{children:[B&&r.jsx(io,{htmlFor:e,color:"theme-primary",error:k,...h==null?void 0:h.label,children:t}),r.jsx(l.Input,{ref:W,type:"text",id:e,name:o,readOnly:S,disabled:w,autoFocus:v,placeholder:u||n,onFocus:Y,onBlur:Q,autoComplete:"off",..._,...F,onChange:X,value:a})]}),x&&a&&!S&&!w&&r.jsx(tn,{children:r.jsx(Te,{size:20,color:L,onClick:K,cursor:"pointer",borderRadius:"50%",transition:"background-color 0.2s ease, transform 0.2s ease",_hover:{backgroundColor:"color-gray-100",transform:"scale(1.05)"},_active:{transform:"scale(0.95)"}})}),c]})})},p0=e=>{const o=ge("input",e),t=ln(o);return r.jsx(nr,{...t,...o})},ve=p0,jl=({defaultIsSelected:e=!1})=>{const[o,t]=p.useState(!1),[n,a]=p.useState(e);return{isHovered:o,setIsHovered:t,isSelected:n,setIsSelected:a}},m0={xs:{height:"12px",width:"12px"},sm:{height:"16px",width:"16px"},md:{height:"20px",width:"20px"},lg:{height:"24px",width:"24px"},xl:{height:"28px",width:"28px"}},En={xs:10,sm:14,md:16,lg:20,xl:24},g0={selected:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},unselected:{backgroundColor:"transparent",borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",color:"inherit",transition:"all 0.2s ease-in-out"},indeterminate:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}},rt={hover:{selected:{opacity:.9},unselected:{borderColor:"color-gray-400",backgroundColor:"color-gray-50"},indeterminate:{opacity:.9}},disabled:{selected:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},unselected:{borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},indeterminate:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"}},error:{selected:{backgroundColor:"color-red-500",borderColor:"color-red-500"},unselected:{borderColor:"color-red-500"},indeterminate:{backgroundColor:"color-red-500",borderColor:"color-red-500"}}},wl=({id:e,icon:o,name:t,label:n,isChecked:a,onChange:i,onValueChange:s,shadow:c={},labelPosition:d="right",size:u="md",error:m=!1,isSelected:g=!1,isHovered:h=!1,isDisabled:f=!1,isReadOnly:y=!1,isIndeterminate:b=!1,defaultIsSelected:k=!1,setIsSelected:C=()=>{},setIsHovered:j=()=>{},setIsChecked:w,views:S={checkbox:{},label:{}},infoText:x,helperText:v,...T})=>{const R=()=>j(!h),M=()=>{!y&&!f&&(C&&C(!g),i&&i(!a),s&&s(!a))},E=b?"indeterminate":a||g?"selected":"unselected",I=m?rt.error[E]:f?rt.disabled[E]:h?rt.hover[E]:{},V={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",color:m?"color-red-600":f?"color-gray-400":"inherit",cursor:f?"not-allowed":y?"default":"pointer",opacity:f?.6:1,transition:"all 0.2s ease-in-out",...S.label},checkbox:{...g0[E],...I,borderRadius:6,...m0[u],transition:"all 0.2s ease-in-out",...c,...S.checkbox}};return r.jsxs(tr,{htmlFor:e,as:"div",onClick:M,onMouseEnter:R,onMouseLeave:R,size:l.Typography.fontSizes[u],...V.container,...T,children:[r.jsxs(l.Vertical,{gap:8,children:[" ",r.jsxs(l.Horizontal,{gap:12,alignItems:"center",children:[" ",d==="left"&&n&&r.jsx(l.Text,{size:u,fontWeight:"500",...S==null?void 0:S.label,children:n}),r.jsx(l.Center,{...V.checkbox,children:b?r.jsx(Aa,{widthHeight:En[u],color:"color-white",transition:"opacity 0.2s ease"}):(a||g)&&(o??r.jsx(or,{widthHeight:En[u],color:"color-white",transition:"opacity 0.2s ease"}))}),d==="right"&&n&&r.jsx(l.Text,{size:u,fontWeight:"500",...S==null?void 0:S.label,children:n})]}),x&&r.jsx(l.Text,{marginLeft:d==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...S==null?void 0:S.infoText,children:x})]}),m&&r.jsx(l.Text,{size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"all 0.2s ease-in-out",children:m})]})},h0=e=>{const o=ge("checkbox",e),t=jl(o);return r.jsx(wl,{...t,...o})},sn=h0,vl=e=>{const{value:o,defaultValue:t="",onChange:n,onChangeComplete:a,onOpen:i,onClose:s,closeOnSelect:c=!0,maxRecentColors:d=8,showRecentColors:u=!0,isAutoFocus:m=!1}=e,[g,h]=p.useState(!1),[f,y]=p.useState(o??t),[b,k]=p.useState(""),[C,j]=p.useState([]),[w,S]=p.useState(!1),[x,v]=p.useState(!1),T=p.useRef(null),R=p.useRef(null);p.useEffect(()=>{o!==void 0&&y(o)},[o]),p.useEffect(()=>{if(u&&typeof localStorage<"u")try{const F=localStorage.getItem("colorInput-recentColors");F&&j(JSON.parse(F))}catch(F){console.warn("Failed to load recent colors from localStorage:",F)}},[u]),p.useEffect(()=>{const F=T.current;m&&F&&typeof F.focus=="function"&&F.focus()},[m]),p.useEffect(()=>{if(typeof(document==null?void 0:document.addEventListener)!="function")return;const F=H=>{g&&T.current&&R.current&&!T.current.contains(H.target)&&!R.current.contains(H.target)&&z()};return document.addEventListener("mousedown",F),()=>document.removeEventListener("mousedown",F)},[g]);const M=p.useCallback(F=>{u&&j(H=>{const D=H.filter(B=>B!==F),L=[F,...D].slice(0,d);try{typeof localStorage<"u"&&localStorage.setItem("colorInput-recentColors",JSON.stringify(L))}catch(B){console.warn("Failed to save recent colors to localStorage:",B)}return L})},[u,d]),E=p.useCallback(()=>{const F=!g;h(F),F?i==null||i():s==null||s()},[g,i,s]),I=p.useCallback(F=>{y(F),M(F),n==null||n(F),a==null||a(F),c&&(h(!1),s==null||s())},[n,a,c,s,M]),V=p.useCallback(F=>{k(F)},[]),P=p.useCallback(()=>{b&&(I(b),k(""))},[b,I]),z=p.useCallback(()=>{h(!1),s==null||s()},[s]),W=p.useCallback(F=>{y(F),n==null||n(F)},[n]);return{isOpen:g,selectedColor:f,recentColors:C,customColor:b,isFocused:w,isHovered:x,handleToggle:E,handleColorSelect:I,handleCustomColorChange:V,handleCustomColorSubmit:P,handleClose:z,setIsFocused:S,setIsHovered:v,setValue:W,triggerRef:T,dropdownRef:R}},Lo={container:{position:"relative",display:"inline-block",width:"fit-content"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300",padding:"8px 12px",borderRadius:8},dropdown:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"280px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",gap:"8px"},recentColors:{display:"flex",gap:"4px",flexWrap:"wrap"}},f0={xs:{height:"28px",fontSize:"10px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"16px",padding:"12px 16px"},xl:{height:"56px",fontSize:"20px",padding:"16px 20px"}},y0={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},x0={default:{backgroundColor:"color-white",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},outline:{backgroundColor:"transparent",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},none:{backgroundColor:"transparent",borderColor:"transparent",borderWidth:"0px"}},b0=[{name:"Red 500",value:"color-red-500"},{name:"Orange 500",value:"color-orange-500"},{name:"Yellow 500",value:"color-yellow-500"},{name:"Green 500",value:"color-green-500"},{name:"Blue 500",value:"color-blue-500"},{name:"Indigo 500",value:"color-indigo-500"},{name:"Purple 500",value:"color-purple-500"},{name:"Pink 500",value:"color-pink-500"},{name:"Red 300",value:"color-red-300"},{name:"Orange 300",value:"color-orange-300"},{name:"Yellow 300",value:"color-yellow-300"},{name:"Green 300",value:"color-green-300"},{name:"Blue 300",value:"color-blue-300"},{name:"Indigo 300",value:"color-indigo-300"},{name:"Purple 300",value:"color-purple-300"},{name:"Pink 300",value:"color-pink-300"},{name:"Red 700",value:"color-red-700"},{name:"Orange 700",value:"color-orange-700"},{name:"Yellow 700",value:"color-yellow-700"},{name:"Green 700",value:"color-green-700"},{name:"Blue 700",value:"color-blue-700"},{name:"Indigo 700",value:"color-indigo-700"},{name:"Purple 700",value:"color-purple-700"},{name:"Pink 700",value:"color-pink-700"},{name:"Gray 100",value:"color-gray-100"},{name:"Gray 300",value:"color-gray-300"},{name:"Gray 500",value:"color-gray-500"},{name:"Gray 700",value:"color-gray-700"},{name:"Gray 900",value:"color-gray-900"},{name:"White",value:"color-white"},{name:"Black",value:"color-black"},{name:"Transparent",value:"transparent"}],Tl=({id:e,name:o,label:t,placeholder:n="Select a color",helperText:a,views:i={},size:s="md",shape:c="default",variant:d="default",shadow:u,error:m=!1,isDisabled:g=!1,isReadOnly:h=!1,isFocused:f=!1,isHovered:y=!1,predefinedColors:b=b0,showCustomInput:k=!0,showRecentColors:C=!0,isOpen:j=!1,selectedColor:w="",recentColors:S=[],customColor:x="",handleToggle:v=()=>{},handleColorSelect:T=()=>{},handleCustomColorChange:R=()=>{},handleCustomColorSubmit:M=()=>{},handleClose:E,setIsFocused:I=()=>{},setIsHovered:V=()=>{},setValue:P,triggerRef:z,dropdownRef:W,onChange:F,onChangeComplete:H,onOpen:D,onClose:L,colorFormat:B,maxRecentColors:$,closeOnSelect:O,value:N,defaultValue:_,...Y})=>{const{getColor:A}=l.useTheme(),G={...Lo.container,...i==null?void 0:i.container},Q={...Lo.trigger,...f0[s],...y0[c],...x0[d],...m&&{borderColor:"color-red-500"},...g&&{opacity:.6,cursor:"not-allowed"},...f&&{borderColor:"theme-primary",boxShadow:"0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px rgba(29, 78, 216, 0.16)"},...y&&!g&&{borderColor:"color-gray-400"},...i==null?void 0:i.trigger,...u&&u},X={...Lo.dropdown,...i==null?void 0:i.dropdown},K={...Lo.colorGrid,...i==null?void 0:i.colorGrid},oe={...Lo.recentColors,...i==null?void 0:i.recentColors},te=w||"color-gray-200";return r.jsxs(l.View,{...G,...Y,children:[t&&r.jsx(tr,{htmlFor:e,size:s,isDisabled:g,error:m,views:i==null?void 0:i.label,children:t}),r.jsxs(l.View,{ref:z,onClick:g||h?void 0:v,onMouseEnter:()=>V(!0),onMouseLeave:()=>V(!1),onFocus:()=>I(!0),onBlur:()=>I(!1),tabIndex:g?-1:0,role:"button","aria-expanded":j,"aria-haspopup":"listbox","aria-label":t||n,width:"fit-content",gap:8,...Q,children:[r.jsx(l.View,{width:"20px",height:"20px",borderRadius:"4px",backgroundColor:te,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"}),!h&&!g&&r.jsx(ce,{widthHeight:16,color:"color-gray-500",orientation:j?"up":"down"})]}),j&&r.jsxs(l.View,{ref:W,...X,children:[r.jsx(l.View,{...K,children:b.map((re,U)=>r.jsx(l.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:re.value,borderWidth:"2px",borderStyle:"solid",borderColor:w===re.value?"theme-primary":"transparent",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>T(re.value),title:re.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"},...i==null?void 0:i.colorSwatch},U))}),C&&S.length>0&&r.jsxs(l.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(l.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Recent Colors"}),r.jsx(l.Horizontal,{gap:4,flexWrap:"wrap",...oe,children:S.map((re,U)=>r.jsx(l.View,{width:"20px",height:"20px",borderRadius:"8px",backgroundColor:re,borderWidth:"1px",borderStyle:"solid",borderColor:w===re?"theme-primary":"color-gray-300",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>T(re),title:re,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"}},U))})]}),k&&r.jsxs(l.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(l.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Custom Color"}),r.jsxs(l.Horizontal,{gap:8,children:[r.jsx(ve,{value:x,onChange:re=>R(re.target.value),placeholder:"#000000 or rgb(0,0,0)",size:"sm",style:{flex:1},views:i==null?void 0:i.customInput}),r.jsx(l.View,{padding:"8px 12px",backgroundColor:"theme-primary",borderRadius:"8px",cursor:"pointer",onClick:M,transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"color-blue-700"},children:r.jsx(l.Text,{color:"color-white",fontSize:"12px",fontWeight:"500",children:"Add"})})]})]})]}),a&&r.jsx(l.Text,{fontSize:"12px",color:m?"color-red-500":"color-gray-600",marginTop:"4px",...i==null?void 0:i.helperText,children:a}),m&&typeof m=="string"&&r.jsx(l.Text,{fontSize:"12px",color:"color-red-500",marginTop:"4px",...i==null?void 0:i.error,children:m})]})},k0=e=>{const o=vl(e);return r.jsx(Tl,{...o,...e})},C0=k0,St=[{name:"Afghanistan",dial_code:"+93",emoji:"🇦🇫",code:"AF"},{name:"Aland Islands",dial_code:"+358",emoji:"🇦🇽",code:"AX"},{name:"Albania",dial_code:"+355",emoji:"🇦🇱",code:"AL"},{name:"Algeria",dial_code:"+213",emoji:"🇩🇿",code:"DZ"},{name:"AmericanSamoa",dial_code:"+1684",emoji:"🇦🇸",code:"AS"},{name:"Andorra",dial_code:"+376",emoji:"🇦🇩",code:"AD"},{name:"Angola",dial_code:"+244",emoji:"🇦🇴",code:"AO"},{name:"Anguilla",dial_code:"+1264",emoji:"🇦🇮",code:"AI"},{name:"Antarctica",dial_code:"+672",emoji:"🇦🇶",code:"AQ"},{name:"Antigua and Barbuda",dial_code:"+1268",emoji:"🇦🇬",code:"AG"},{name:"Argentina",dial_code:"+54",emoji:"🇦🇷",code:"AR"},{name:"Armenia",dial_code:"+374",emoji:"🇦🇲",code:"AM"},{name:"Aruba",dial_code:"+297",emoji:"🇦🇼",code:"AW"},{name:"Australia",dial_code:"+61",emoji:"🇦🇺",code:"AU"},{name:"Austria",dial_code:"+43",emoji:"🇦🇹",code:"AT"},{name:"Azerbaijan",dial_code:"+994",emoji:"🇦🇿",code:"AZ"},{name:"Bahamas",dial_code:"+1242",emoji:"🇧🇸",code:"BS"},{name:"Bahrain",dial_code:"+973",emoji:"🇧🇭",code:"BH"},{name:"Bangladesh",dial_code:"+880",emoji:"🇧🇩",code:"BD"},{name:"Barbados",dial_code:"+1246",emoji:"🇧🇧",code:"BB"},{name:"Belarus",dial_code:"+375",emoji:"🇧🇾",code:"BY"},{name:"Belgium",dial_code:"+32",emoji:"🇧🇪",code:"BE"},{name:"Belize",dial_code:"+501",emoji:"🇧🇿",code:"BZ"},{name:"Benin",dial_code:"+229",emoji:"🇧🇯",code:"BJ"},{name:"Bermuda",dial_code:"+1441",emoji:"🇧🇲",code:"BM"},{name:"Bhutan",dial_code:"+975",emoji:"🇧🇹",code:"BT"},{name:"Bolivia, Plurinational State of",dial_code:"+591",emoji:"🇧🇴",code:"BO"},{name:"Bosnia and Herzegovina",dial_code:"+387",emoji:"🇧🇦",code:"BA"},{name:"Botswana",dial_code:"+267",emoji:"🇧🇼",code:"BW"},{name:"Brazil",dial_code:"+55",emoji:"🇧🇷",code:"BR"},{name:"British Indian Ocean Territory",dial_code:"+246",emoji:"🇮🇴",code:"IO"},{name:"Brunei Darussalam",dial_code:"+673",emoji:"🇧🇳",code:"BN"},{name:"Bulgaria",dial_code:"+359",emoji:"🇧🇬",code:"BG"},{name:"Burkina Faso",dial_code:"+226",emoji:"🇧🇫",code:"BF"},{name:"Burundi",dial_code:"+257",emoji:"🇧🇮",code:"BI"},{name:"Cambodia",dial_code:"+855",emoji:"🇰🇭",code:"KH"},{name:"Cameroon",dial_code:"+237",emoji:"🇨🇲",code:"CM"},{name:"Canada",dial_code:"+1",emoji:"🇨🇦",code:"CA"},{name:"Cape Verde",dial_code:"+238",emoji:"🇨🇻",code:"CV"},{name:"Cayman Islands",dial_code:"+345",emoji:"🇰🇾",code:"KY"},{name:"Central African Republic",dial_code:"+236",emoji:"🇨🇫",code:"CF"},{name:"Chad",dial_code:"+235",emoji:"🇹🇩",code:"TD"},{name:"Chile",dial_code:"+56",emoji:"🇨🇱",code:"CL"},{name:"China",dial_code:"+86",emoji:"🇨🇳",code:"CN"},{name:"Christmas Island",dial_code:"+61",emoji:"🇨🇽",code:"CX"},{name:"Cocos (Keeling) Islands",dial_code:"+61",emoji:"🇨🇨",code:"CC"},{name:"Colombia",dial_code:"+57",emoji:"🇨🇴",code:"CO"},{name:"Comoros",dial_code:"+269",emoji:"🇰🇲",code:"KM"},{name:"Congo",dial_code:"+242",emoji:"🇨🇬",code:"CG"},{name:"Congo, The Democratic Republic of the Congo",dial_code:"+243",emoji:"🇨🇩",code:"CD"},{name:"Cook Islands",dial_code:"+682",emoji:"🇨🇰",code:"CK"},{name:"Costa Rica",dial_code:"+506",emoji:"🇨🇷",code:"CR"},{name:"Cote d'Ivoire",dial_code:"+225",emoji:"🇨🇮",code:"CI"},{name:"Croatia",dial_code:"+385",emoji:"🇭🇷",code:"HR"},{name:"Cuba",dial_code:"+53",emoji:"🇨🇺",code:"CU"},{name:"Cyprus",dial_code:"+357",emoji:"🇨🇾",code:"CY"},{name:"Czech Republic",dial_code:"+420",emoji:"🇨🇿",code:"CZ"},{name:"Denmark",dial_code:"+45",emoji:"🇩🇰",code:"DK"},{name:"Djibouti",dial_code:"+253",emoji:"🇩🇯",code:"DJ"},{name:"Dominica",dial_code:"+1767",emoji:"🇩🇲",code:"DM"},{name:"Dominican Republic",dial_code:"+1849",emoji:"🇩🇴",code:"DO"},{name:"Ecuador",dial_code:"+593",emoji:"🇪🇨",code:"EC"},{name:"Egypt",dial_code:"+20",emoji:"🇪🇬",code:"EG"},{name:"El Salvador",dial_code:"+503",emoji:"🇸🇻",code:"SV"},{name:"Equatorial Guinea",dial_code:"+240",emoji:"🇬🇶",code:"GQ"},{name:"Eritrea",dial_code:"+291",emoji:"🇪🇷",code:"ER"},{name:"Estonia",dial_code:"+372",emoji:"🇪🇪",code:"EE"},{name:"Ethiopia",dial_code:"+251",emoji:"🇪🇹",code:"ET"},{name:"Falkland Islands (Malvinas)",dial_code:"+500",emoji:"🇫🇰",code:"FK"},{name:"Faroe Islands",dial_code:"+298",emoji:"🇫🇴",code:"FO"},{name:"Fiji",dial_code:"+679",emoji:"🇫🇯",code:"FJ"},{name:"Finland",dial_code:"+358",emoji:"🇫🇮",code:"FI"},{name:"France",dial_code:"+33",emoji:"🇫🇷",code:"FR"},{name:"French Guiana",dial_code:"+594",emoji:"🇬🇫",code:"GF"},{name:"French Polynesia",dial_code:"+689",emoji:"🇵🇫",code:"PF"},{name:"Gabon",dial_code:"+241",emoji:"🇬🇦",code:"GA"},{name:"Gambia",dial_code:"+220",emoji:"🇬🇲",code:"GM"},{name:"Georgia",dial_code:"+995",emoji:"🇬🇪",code:"GE"},{name:"Germany",dial_code:"+49",emoji:"🇩🇪",code:"DE"},{name:"Ghana",dial_code:"+233",emoji:"🇬🇭",code:"GH"},{name:"Gibraltar",dial_code:"+350",emoji:"🇬🇮",code:"GI"},{name:"Greece",dial_code:"+30",emoji:"🇬🇷",code:"GR"},{name:"Greenland",dial_code:"+299",emoji:"🇬🇱",code:"GL"},{name:"Grenada",dial_code:"+1473",emoji:"🇬🇩",code:"GD"},{name:"Guadeloupe",dial_code:"+590",emoji:"🇬🇵",code:"GP"},{name:"Guam",dial_code:"+1671",emoji:"🇬🇺",code:"GU"},{name:"Guatemala",dial_code:"+502",emoji:"🇬🇹",code:"GT"},{name:"Guernsey",dial_code:"+44",emoji:"🇬🇬",code:"GG"},{name:"Guinea",dial_code:"+224",emoji:"🇬🇳",code:"GN"},{name:"Guinea-Bissau",dial_code:"+245",emoji:"🇬🇼",code:"GW"},{name:"Guyana",dial_code:"+595",emoji:"🇬🇾",code:"GY"},{name:"Haiti",dial_code:"+509",emoji:"🇭🇹",code:"HT"},{name:"Holy See (Vatican City State)",dial_code:"+379",emoji:"🇻🇦",code:"VA"},{name:"Honduras",dial_code:"+504",emoji:"🇭🇳",code:"HN"},{name:"Hong Kong",dial_code:"+852",emoji:"🇭🇰",code:"HK"},{name:"Hungary",dial_code:"+36",emoji:"🇭🇺",code:"HU"},{name:"Iceland",dial_code:"+354",emoji:"🇮🇸",code:"IS"},{name:"India",dial_code:"+91",emoji:"🇮🇳",code:"IN"},{name:"Indonesia",dial_code:"+62",emoji:"🇮🇩",code:"ID"},{name:"Iran, Islamic Republic of Persian Gulf",dial_code:"+98",emoji:"🇮🇷",code:"IR"},{name:"Iraq",dial_code:"+964",emoji:"🇮🇷",code:"IQ"},{name:"Ireland",dial_code:"+353",emoji:"🇮🇪",code:"IE"},{name:"Isle of Man",dial_code:"+44",emoji:"🇮🇲",code:"IM"},{name:"Israel",dial_code:"+972",emoji:"🇮🇱",code:"IL"},{name:"Italy",dial_code:"+39",emoji:"🇮🇹",code:"IT"},{name:"Jamaica",dial_code:"+1876",emoji:"🇯🇲",code:"JM"},{name:"Japan",dial_code:"+81",emoji:"🇯🇵",code:"JP"},{name:"Jersey",dial_code:"+44",emoji:"🇯🇪",code:"JE"},{name:"Jordan",dial_code:"+962",emoji:"🇯🇴",code:"JO"},{name:"Kazakhstan",dial_code:"+77",emoji:"🇰🇿",code:"KZ"},{name:"Kenya",dial_code:"+254",emoji:"🇰🇪",code:"KE"},{name:"Kiribati",dial_code:"+686",emoji:"🇰🇮",code:"KI"},{name:"Korea, Democratic People's Republic of Korea",dial_code:"+850",emoji:"🇰🇵",code:"KP"},{name:"Korea, Republic of South Korea",dial_code:"+82",emoji:"🇰🇷",code:"KR"},{name:"Kuwait",dial_code:"+965",emoji:"🇰🇼",code:"KW"},{name:"Kyrgyzstan",dial_code:"+996",emoji:"🇰🇬",code:"KG"},{name:"Laos",dial_code:"+856",emoji:"🇱🇦",code:"LA"},{name:"Latvia",dial_code:"+371",emoji:"🇱🇻",code:"LV"},{name:"Lebanon",dial_code:"+961",emoji:"🇱🇧",code:"LB"},{name:"Lesotho",dial_code:"+266",emoji:"🇱🇸",code:"LS"},{name:"Liberia",dial_code:"+231",emoji:"🇱🇷",code:"LR"},{name:"Libyan Arab Jamahiriya",dial_code:"+218",emoji:"🇱🇾",code:"LY"},{name:"Liechtenstein",dial_code:"+423",emoji:"🇱🇮",code:"LI"},{name:"Lithuania",dial_code:"+370",emoji:"🇱🇹",code:"LT"},{name:"Luxembourg",dial_code:"+352",emoji:"🇱🇺",code:"LU"},{name:"Macao",dial_code:"+853",emoji:"🇲🇴",code:"MO"},{name:"Macedonia",dial_code:"+389",emoji:"🇲🇰",code:"MK"},{name:"Madagascar",dial_code:"+261",emoji:"🇲🇬",code:"MG"},{name:"Malawi",dial_code:"+265",emoji:"🇲🇼",code:"MW"},{name:"Malaysia",dial_code:"+60",emoji:"🇲🇾",code:"MY"},{name:"Maldives",dial_code:"+960",emoji:"🇲🇻",code:"MV"},{name:"Mali",dial_code:"+223",emoji:"🇲🇱",code:"ML"},{name:"Malta",dial_code:"+356",emoji:"🇲🇹",code:"MT"},{name:"Marshall Islands",dial_code:"+692",emoji:"🇲🇭",code:"MH"},{name:"Martinique",dial_code:"+596",emoji:"🇲🇶",code:"MQ"},{name:"Mauritania",dial_code:"+222",emoji:"🇲🇷",code:"MR"},{name:"Mauritius",dial_code:"+230",emoji:"🇲🇺",code:"MU"},{name:"Mayotte",dial_code:"+262",emoji:"🇾🇹",code:"YT"},{name:"Mexico",dial_code:"+52",emoji:"🇲🇽",code:"MX"},{name:"Micronesia, Federated States of Micronesia",dial_code:"+691",emoji:"🇫🇲",code:"FM"},{name:"Moldova",dial_code:"+373",emoji:"🇲🇩",code:"MD"},{name:"Monaco",dial_code:"+377",emoji:"🇲🇨",code:"MC"},{name:"Mongolia",dial_code:"+976",emoji:"🇲🇳",code:"MN"},{name:"Montenegro",dial_code:"+382",emoji:"🇲🇪",code:"ME"},{name:"Montserrat",dial_code:"+1664",emoji:"🇲🇸",code:"MS"},{name:"Morocco",dial_code:"+212",emoji:"🇲🇦",code:"MA"},{name:"Mozambique",dial_code:"+258",emoji:"🇲🇿",code:"MZ"},{name:"Myanmar",dial_code:"+95",emoji:"🇲🇲",code:"MM"},{name:"Namibia",emoji:"🇳🇦",dial_code:"+264",code:"NA"},{name:"Nauru",dial_code:"+674",emoji:"🇳🇷",code:"NR"},{name:"Nepal",dial_code:"+977",emoji:"🇳🇵",code:"NP"},{name:"Netherlands",dial_code:"+31",emoji:"🇳🇱",code:"NL"},{name:"Netherlands Antilles",dial_code:"+599",emoji:"🇧🇶",code:"AN"},{name:"New Caledonia",dial_code:"+687",emoji:"🇳🇨",code:"NC"},{name:"New Zealand",dial_code:"+64",emoji:"🇳🇿",code:"NZ"},{name:"Nicaragua",dial_code:"+505",emoji:"🇳🇮",code:"NI"},{name:"Niger",dial_code:"+227",emoji:"🇳🇪",code:"NE"},{name:"Nigeria",dial_code:"+234",emoji:"🇳🇬",code:"NG"},{name:"Niue",dial_code:"+683",emoji:"🇳🇺",code:"NU"},{name:"Norfolk Island",dial_code:"+672",emoji:"🇳🇫",code:"NF"},{name:"Northern Mariana Islands",dial_code:"+1670",emoji:"🇲🇵",code:"MP"},{name:"Norway",dial_code:"+47",emoji:"🇳🇴",code:"NO"},{name:"Oman",dial_code:"+968",emoji:"🇴🇲",code:"OM"},{name:"Pakistan",dial_code:"+92",emoji:"🇵🇰",code:"PK"},{name:"Palau",dial_code:"+680",emoji:"🇵🇼",code:"PW"},{name:"Palestinian Territory, Occupied",dial_code:"+970",emoji:"🇵🇸",code:"PS"},{name:"Panama",dial_code:"+507",emoji:"🇵🇦",code:"PA"},{name:"Papua New Guinea",dial_code:"+675",emoji:"🇵🇬",code:"PG"},{name:"Paraguay",dial_code:"+595",emoji:"🇵🇾",code:"PY"},{name:"Peru",dial_code:"+51",emoji:"🇵🇪",code:"PE"},{name:"Philippines",dial_code:"+63",emoji:"🇵🇭",code:"PH"},{name:"Pitcairn",dial_code:"+872",emoji:"🇵🇳",code:"PN"},{name:"Poland",dial_code:"+48",emoji:"🇵🇱",code:"PL"},{name:"Portugal",dial_code:"+351",emoji:"🇵🇹",code:"PT"},{name:"Puerto Rico",dial_code:"+1939",emoji:"🇵🇷",code:"PR"},{name:"Qatar",dial_code:"+974",emoji:"🇶🇦",code:"QA"},{name:"Romania",dial_code:"+40",emoji:"🇷🇴",code:"RO"},{name:"Russia",dial_code:"+7",emoji:"🇷🇺",code:"RU"},{name:"Rwanda",dial_code:"+250",emoji:"🇷🇼",code:"RW"},{name:"Reunion",dial_code:"+262",emoji:"🇷🇪",code:"RE"},{name:"Saint Barthelemy",dial_code:"+590",emoji:"🇧🇱",code:"BL"},{name:"Saint Helena, Ascension and Tristan Da Cunha",dial_code:"+290",emoji:"🇸🇭",code:"SH"},{name:"Saint Kitts and Nevis",dial_code:"+1869",emoji:"🇰🇳",code:"KN"},{name:"Saint Lucia",dial_code:"+1758",emoji:"🇱🇨",code:"LC"},{name:"Saint Martin",dial_code:"+590",emoji:"🇲🇫",code:"MF"},{name:"Saint Pierre and Miquelon",dial_code:"+508",emoji:"🇵🇲",code:"PM"},{name:"Saint Vincent and the Grenadines",dial_code:"+1784",emoji:"🇻🇨",code:"VC"},{name:"Samoa",dial_code:"+685",emoji:"🇼🇸",code:"WS"},{name:"San Marino",dial_code:"+378",emoji:"🇸🇲",code:"SM"},{name:"Sao Tome and Principe",dial_code:"+239",emoji:"🇸🇹",code:"ST"},{name:"Saudi Arabia",dial_code:"+966",emoji:"🇸🇦",code:"SA"},{name:"Senegal",dial_code:"+221",emoji:"🇸🇳",code:"SN"},{name:"Serbia",dial_code:"+381",emoji:"🇷🇸",code:"RS"},{name:"Seychelles",dial_code:"+248",emoji:"🇸🇨",code:"SC"},{name:"Sierra Leone",dial_code:"+232",emoji:"🇸🇱",code:"SL"},{name:"Singapore",dial_code:"+65",emoji:"🇸🇬",code:"SG"},{name:"Slovakia",dial_code:"+421",emoji:"🇸🇰",code:"SK"},{name:"Slovenia",dial_code:"+386",emoji:"🇸🇮",code:"SI"},{name:"Solomon Islands",dial_code:"+677",emoji:"🇸🇧",code:"SB"},{name:"Somalia",dial_code:"+252",emoji:"🇸🇴",code:"SO"},{name:"South Africa",dial_code:"+27",emoji:"🇿🇦",code:"ZA"},{name:"South Sudan",dial_code:"+211",emoji:"🇸🇸",code:"SS"},{name:"South Georgia and the South Sandwich Islands",dial_code:"+500",emoji:"🇬🇸",code:"GS"},{name:"Spain",dial_code:"+34",emoji:"🇪🇸",code:"ES"},{name:"Sri Lanka",dial_code:"+94",emoji:"🇱🇰",code:"LK"},{name:"Sudan",dial_code:"+249",emoji:"🇸🇩",code:"SD"},{name:"Suriname",dial_code:"+597",emoji:"🇸🇷",code:"SR"},{name:"Svalbard and Jan Mayen",dial_code:"+47",emoji:"🇸🇯",code:"SJ"},{name:"Swaziland",dial_code:"+268",emoji:"🇸🇿",code:"SZ"},{name:"Sweden",dial_code:"+46",emoji:"🇸🇪",code:"SE"},{name:"Switzerland",dial_code:"+41",emoji:"🇨🇭",code:"CH"},{name:"Syrian Arab Republic",dial_code:"+963",emoji:"🇸🇾",code:"SY"},{name:"Taiwan",dial_code:"+886",emoji:"🇹🇼",code:"TW"},{name:"Tajikistan",dial_code:"+992",emoji:"🇹🇯",code:"TJ"},{name:"Tanzania, United Republic of Tanzania",dial_code:"+255",emoji:"🇹🇿",code:"TZ"},{name:"Thailand",dial_code:"+66",emoji:"🇹🇭",code:"TH"},{name:"Timor-Leste",dial_code:"+670",emoji:"🇹🇱",code:"TL"},{name:"Togo",dial_code:"+228",emoji:"🇹🇬",code:"TG"},{name:"Tokelau",dial_code:"+690",emoji:"🇹🇰",code:"TK"},{name:"Tonga",dial_code:"+676",emoji:"🇹🇴",code:"TO"},{name:"Trinidad and Tobago",dial_code:"+1868",emoji:"🇹🇹",code:"TT"},{name:"Tunisia",dial_code:"+216",emoji:"🇹🇳",code:"TN"},{name:"Turkey",dial_code:"+90",emoji:"🇹🇷",code:"TR"},{name:"Turkmenistan",dial_code:"+993",emoji:"🇹🇲",code:"TM"},{name:"Turks and Caicos Islands",dial_code:"+1649",emoji:"🇹🇨",code:"TC"},{name:"Tuvalu",dial_code:"+688",emoji:"🇹🇻",code:"TV"},{name:"Uganda",dial_code:"+256",emoji:"🇺🇬",code:"UG"},{name:"Ukraine",dial_code:"+380",emoji:"🇺🇦",code:"UA"},{name:"United Arab Emirates",dial_code:"+971",emoji:"🇦🇪",code:"AE"},{name:"United Kingdom",dial_code:"+44",emoji:"🇬🇧",code:"GB"},{name:"United States",dial_code:"+1",emoji:"🇺🇸",code:"US"},{name:"Uruguay",dial_code:"+598",emoji:"🇺🇾",code:"UY"},{name:"Uzbekistan",dial_code:"+998",emoji:"🇺🇿",code:"UZ"},{name:"Vanuatu",dial_code:"+678",emoji:"🇻🇺",code:"VU"},{name:"Venezuela, Bolivarian Republic of Venezuela",dial_code:"+58",emoji:"🇻🇪",code:"VE"},{name:"Vietnam",dial_code:"+84",emoji:"🇻🇳",code:"VN"},{name:"Virgin Islands, British",dial_code:"+1284",emoji:"🇻🇬",code:"VG"},{name:"Virgin Islands, U.S.",dial_code:"+1340",emoji:"🇻🇮",code:"VI"},{name:"Wallis and Futuna",dial_code:"+681",emoji:"🇼🇫",code:"WF"},{name:"Yemen",dial_code:"+967",emoji:"🇾🇪",code:"YE"},{name:"Zambia",dial_code:"+260",emoji:"🇿🇲",code:"ZM"},{name:"Zimbabwe",dial_code:"+263",emoji:"🇿🇼",code:"ZW"}],Il=({placeholder:e})=>{const[o,t]=p.useState(St),[n,a]=p.useState(e??St[0].name),[i,s]=p.useState(!0),[c,d]=p.useState(!1),[u,m]=p.useState(!1);return{hide:i,setHide:s,newOptions:o,setNewOptions:t,isHovered:u,setIsHovered:m,isFocused:c,setIsFocused:d,value:n,setValue:a}},Dn={xs:8,sm:10,md:12,lg:14,xl:16},S0=({size:e,...o})=>r.jsx(l.Element,{as:"ul",...o}),j0=e=>r.jsx(l.Input,{type:"country",...e}),w0=({size:e,...o})=>r.jsx(l.Element,{as:"li",...o}),v0=({option:e,size:o="md",callback:t=()=>{},views:n={text:{}}})=>{const a=i=>{i&&i.stopPropagation&&i.stopPropagation(),t(e)};return r.jsx(w0,{margin:0,role:"DropDownItem",listStyleType:"none",fontWeight:"normal",paddingVertical:6,paddingHorizontal:12,onClick:a,fontSize:l.Typography.fontSizes[o],_hover:{backgroundColor:"color-gray-100",transition:"all 0.15s ease-in-out"},...n.text,children:e})},T0=({size:e,views:o={dropDown:{}},options:t=[],callback:n=()=>{}})=>{const a=i=>n(i);return r.jsx(S0,{role:"dropDown",margin:0,padding:0,top:"100%",width:"100%",display:"flex",zIndex:1e3,overflow:"auto",maxHeight:"300px",borderRadius:12,position:"absolute",flexDirection:"column",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",...o.dropDown,children:t.map(i=>r.jsx(v0,{size:e,option:i.name,callback:a,...o.text},i.code))})},Fl=({id:e,name:o,label:t,value:n,placeholder:a,helperText:i,hide:s=!1,error:c=!1,isHovered:d=!1,isFocused:u=!1,isAutoFocus:m=!1,isDisabled:g=!1,isReadOnly:h=!1,shadow:f={},newOptions:y=[],size:b="md",variant:k="default",shape:C="default",onChange:j,onBlur:w=()=>{},setHide:S=()=>{},setNewOptions:x=()=>{},setIsHovered:v=()=>{},setIsFocused:T=()=>{},setValue:R=()=>{},selected:M,setSelected:E,views:I={text:{},icon:{},label:{},dropDown:{},helperText:{}},themeMode:V,...P})=>{const{getColor:z,themeMode:W}=l.useTheme(),F=z("color-gray-500",{themeMode:V||W}),H=()=>T(!0),D=_=>{S(!s),R(_),j&&j(_)},L=()=>{!g&&!h&&S(!s)},B=_=>{const Y=_.target.value,A=St.filter(G=>G.name.toLowerCase().startsWith(Y.toLowerCase()));s&&S(!1),x(A),j&&j(Y)},$=_=>{w(_),T(!1)},O=!!(t&&(u||n)),N={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none"}},transition:"all 0.2s ease-in-out",fontSize:l.Typography.fontSizes[b],backgroundColor:"transparent",color:g?"color-gray-400":"color-gray-900",cursor:g?"not-allowed":h?"auto":"pointer",...I.field};return r.jsxs(qe,{helperText:i,error:c,views:I,onClick:L,children:[r.jsxs(Ze,{label:t,size:b,error:c,shape:C,views:I,shadow:f,variant:k,value:n,color:"theme-primary",isDisabled:g,isReadOnly:h,isFocused:u,showLabel:O,_hover:!g&&!c?{borderColor:"theme-primary"}:void 0,children:[r.jsxs(Ao,{children:[O&&r.jsx(io,{htmlFor:e,color:"theme-primary",error:c,views:I,children:t}),r.jsx(j0,{id:e,name:o,placeholder:a,readOnly:h,disabled:g,autoFocus:m,onBlur:$,onFocus:H,...N,...P,value:n,onChange:B})]}),r.jsx(tn,{children:s?r.jsx(ce,{orientation:"down",widthHeight:Dn[b],color:F,style:I.icon}):r.jsx(ce,{orientation:"up",widthHeight:Dn[b],color:F,style:I.icon})})]}),!s&&r.jsx(T0,{size:b,views:I,options:y,callback:D})]})},I0=e=>{const o=Il(e);return r.jsx(Fl,{...o,...e})},F0=I0;function Mr(e){"@babel/helpers - typeof";return Mr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Mr(e)}function je(e,o){if(o.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+o.length+" present")}function R0(e){return je(1,arguments),e instanceof Date||Mr(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function $e(e){je(1,arguments);var o=Object.prototype.toString.call(e);return e instanceof Date||Mr(e)==="object"&&o==="[object Date]"?new Date(e.getTime()):typeof e=="number"||o==="[object Number]"?new Date(e):((typeof e=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function z0(e){if(je(1,arguments),!R0(e)&&typeof e!="number")return!1;var o=$e(e);return!isNaN(Number(o))}function lo(e){if(e===null||e===!0||e===!1)return NaN;var o=Number(e);return isNaN(o)?o:o<0?Math.ceil(o):Math.floor(o)}function M0(e,o){je(2,arguments);var t=$e(e).getTime(),n=lo(o);return new Date(t+n)}function W0(e,o){je(2,arguments);var t=lo(o);return M0(e,-t)}var H0=864e5;function P0(e){je(1,arguments);var o=$e(e),t=o.getTime();o.setUTCMonth(0,1),o.setUTCHours(0,0,0,0);var n=o.getTime(),a=t-n;return Math.floor(a/H0)+1}function Wr(e){je(1,arguments);var o=1,t=$e(e),n=t.getUTCDay(),a=(n<o?7:0)+n-o;return t.setUTCDate(t.getUTCDate()-a),t.setUTCHours(0,0,0,0),t}function Rl(e){je(1,arguments);var o=$e(e),t=o.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(t+1,0,4),n.setUTCHours(0,0,0,0);var a=Wr(n),i=new Date(0);i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0);var s=Wr(i);return o.getTime()>=a.getTime()?t+1:o.getTime()>=s.getTime()?t:t-1}function V0(e){je(1,arguments);var o=Rl(e),t=new Date(0);t.setUTCFullYear(o,0,4),t.setUTCHours(0,0,0,0);var n=Wr(t);return n}var A0=6048e5;function E0(e){je(1,arguments);var o=$e(e),t=Wr(o).getTime()-V0(o).getTime();return Math.round(t/A0)+1}var D0={};function Or(){return D0}function Hr(e,o){var t,n,a,i,s,c,d,u;je(1,arguments);var m=Or(),g=lo((t=(n=(a=(i=o==null?void 0:o.weekStartsOn)!==null&&i!==void 0?i:o==null||(s=o.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&a!==void 0?a:m.weekStartsOn)!==null&&n!==void 0?n:(d=m.locale)===null||d===void 0||(u=d.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&t!==void 0?t:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=$e(e),f=h.getUTCDay(),y=(f<g?7:0)+f-g;return h.setUTCDate(h.getUTCDate()-y),h.setUTCHours(0,0,0,0),h}function zl(e,o){var t,n,a,i,s,c,d,u;je(1,arguments);var m=$e(e),g=m.getUTCFullYear(),h=Or(),f=lo((t=(n=(a=(i=o==null?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:o==null||(s=o.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&a!==void 0?a:h.firstWeekContainsDate)!==null&&n!==void 0?n:(d=h.locale)===null||d===void 0||(u=d.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(g+1,0,f),y.setUTCHours(0,0,0,0);var b=Hr(y,o),k=new Date(0);k.setUTCFullYear(g,0,f),k.setUTCHours(0,0,0,0);var C=Hr(k,o);return m.getTime()>=b.getTime()?g+1:m.getTime()>=C.getTime()?g:g-1}function $0(e,o){var t,n,a,i,s,c,d,u;je(1,arguments);var m=Or(),g=lo((t=(n=(a=(i=o==null?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:o==null||(s=o.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&a!==void 0?a:m.firstWeekContainsDate)!==null&&n!==void 0?n:(d=m.locale)===null||d===void 0||(u=d.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&t!==void 0?t:1),h=zl(e,o),f=new Date(0);f.setUTCFullYear(h,0,g),f.setUTCHours(0,0,0,0);var y=Hr(f,o);return y}var L0=6048e5;function _0(e,o){je(1,arguments);var t=$e(e),n=Hr(t,o).getTime()-$0(t,o).getTime();return Math.round(n/L0)+1}function ne(e,o){for(var t=e<0?"-":"",n=Math.abs(e).toString();n.length<o;)n="0"+n;return t+n}var Ue={y:function(o,t){var n=o.getUTCFullYear(),a=n>0?n:1-n;return ne(t==="yy"?a%100:a,t.length)},M:function(o,t){var n=o.getUTCMonth();return t==="M"?String(n+1):ne(n+1,2)},d:function(o,t){return ne(o.getUTCDate(),t.length)},a:function(o,t){var n=o.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(o,t){return ne(o.getUTCHours()%12||12,t.length)},H:function(o,t){return ne(o.getUTCHours(),t.length)},m:function(o,t){return ne(o.getUTCMinutes(),t.length)},s:function(o,t){return ne(o.getUTCSeconds(),t.length)},S:function(o,t){var n=t.length,a=o.getUTCMilliseconds(),i=Math.floor(a*Math.pow(10,n-3));return ne(i,t.length)}},yo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},B0={G:function(o,t,n){var a=o.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(o,t,n){if(t==="yo"){var a=o.getUTCFullYear(),i=a>0?a:1-a;return n.ordinalNumber(i,{unit:"year"})}return Ue.y(o,t)},Y:function(o,t,n,a){var i=zl(o,a),s=i>0?i:1-i;if(t==="YY"){var c=s%100;return ne(c,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):ne(s,t.length)},R:function(o,t){var n=Rl(o);return ne(n,t.length)},u:function(o,t){var n=o.getUTCFullYear();return ne(n,t.length)},Q:function(o,t,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return ne(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(o,t,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return ne(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(o,t,n){var a=o.getUTCMonth();switch(t){case"M":case"MM":return Ue.M(o,t);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(o,t,n){var a=o.getUTCMonth();switch(t){case"L":return String(a+1);case"LL":return ne(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(o,t,n,a){var i=_0(o,a);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):ne(i,t.length)},I:function(o,t,n){var a=E0(o);return t==="Io"?n.ordinalNumber(a,{unit:"week"}):ne(a,t.length)},d:function(o,t,n){return t==="do"?n.ordinalNumber(o.getUTCDate(),{unit:"date"}):Ue.d(o,t)},D:function(o,t,n){var a=P0(o);return t==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):ne(a,t.length)},E:function(o,t,n){var a=o.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(o,t,n,a){var i=o.getUTCDay(),s=(i-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return ne(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(o,t,n,a){var i=o.getUTCDay(),s=(i-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return ne(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(o,t,n){var a=o.getUTCDay(),i=a===0?7:a;switch(t){case"i":return String(i);case"ii":return ne(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(o,t,n){var a=o.getUTCHours(),i=a/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(o,t,n){var a=o.getUTCHours(),i;switch(a===12?i=yo.noon:a===0?i=yo.midnight:i=a/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(o,t,n){var a=o.getUTCHours(),i;switch(a>=17?i=yo.evening:a>=12?i=yo.afternoon:a>=4?i=yo.morning:i=yo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(o,t,n){if(t==="ho"){var a=o.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return Ue.h(o,t)},H:function(o,t,n){return t==="Ho"?n.ordinalNumber(o.getUTCHours(),{unit:"hour"}):Ue.H(o,t)},K:function(o,t,n){var a=o.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(a,{unit:"hour"}):ne(a,t.length)},k:function(o,t,n){var a=o.getUTCHours();return a===0&&(a=24),t==="ko"?n.ordinalNumber(a,{unit:"hour"}):ne(a,t.length)},m:function(o,t,n){return t==="mo"?n.ordinalNumber(o.getUTCMinutes(),{unit:"minute"}):Ue.m(o,t)},s:function(o,t,n){return t==="so"?n.ordinalNumber(o.getUTCSeconds(),{unit:"second"}):Ue.s(o,t)},S:function(o,t){return Ue.S(o,t)},X:function(o,t,n,a){var i=a._originalDate||o,s=i.getTimezoneOffset();if(s===0)return"Z";switch(t){case"X":return Ln(s);case"XXXX":case"XX":return to(s);case"XXXXX":case"XXX":default:return to(s,":")}},x:function(o,t,n,a){var i=a._originalDate||o,s=i.getTimezoneOffset();switch(t){case"x":return Ln(s);case"xxxx":case"xx":return to(s);case"xxxxx":case"xxx":default:return to(s,":")}},O:function(o,t,n,a){var i=a._originalDate||o,s=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+$n(s,":");case"OOOO":default:return"GMT"+to(s,":")}},z:function(o,t,n,a){var i=a._originalDate||o,s=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+$n(s,":");case"zzzz":default:return"GMT"+to(s,":")}},t:function(o,t,n,a){var i=a._originalDate||o,s=Math.floor(i.getTime()/1e3);return ne(s,t.length)},T:function(o,t,n,a){var i=a._originalDate||o,s=i.getTime();return ne(s,t.length)}};function $n(e,o){var t=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),i=n%60;if(i===0)return t+String(a);var s=o;return t+String(a)+s+ne(i,2)}function Ln(e,o){if(e%60===0){var t=e>0?"-":"+";return t+ne(Math.abs(e)/60,2)}return to(e,o)}function to(e,o){var t=o||"",n=e>0?"-":"+",a=Math.abs(e),i=ne(Math.floor(a/60),2),s=ne(a%60,2);return n+i+t+s}var _n=function(o,t){switch(o){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ml=function(o,t){switch(o){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},O0=function(o,t){var n=o.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return _n(o,t);var s;switch(a){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",_n(a,t)).replace("{{time}}",Ml(i,t))},N0={p:Ml,P:O0};function q0(e){var o=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return o.setUTCFullYear(e.getFullYear()),e.getTime()-o.getTime()}var U0=["D","DD"],G0=["YY","YYYY"];function Y0(e){return U0.indexOf(e)!==-1}function K0(e){return G0.indexOf(e)!==-1}function Bn(e,o,t){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(o,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(o,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(o,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(o,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var X0={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},J0=function(o,t,n){var a,i=X0[o];return typeof i=="string"?a=i:t===1?a=i.one:a=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function tt(e){return function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=o.width?String(o.width):e.defaultWidth,n=e.formats[t]||e.formats[e.defaultWidth];return n}}var Q0={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Z0={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},eg={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},og={date:tt({formats:Q0,defaultWidth:"full"}),time:tt({formats:Z0,defaultWidth:"full"}),dateTime:tt({formats:eg,defaultWidth:"full"})},rg={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},tg=function(o,t,n,a){return rg[o]};function _o(e){return function(o,t){var n=t!=null&&t.context?String(t.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,s=t!=null&&t.width?String(t.width):i;a=e.formattingValues[s]||e.formattingValues[i]}else{var c=e.defaultWidth,d=t!=null&&t.width?String(t.width):e.defaultWidth;a=e.values[d]||e.values[c]}var u=e.argumentCallback?e.argumentCallback(o):o;return a[u]}}var ng={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ag={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},lg={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ig={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},sg={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},cg={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},dg=function(o,t){var n=Number(o),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},ug={ordinalNumber:dg,era:_o({values:ng,defaultWidth:"wide"}),quarter:_o({values:ag,defaultWidth:"wide",argumentCallback:function(o){return o-1}}),month:_o({values:lg,defaultWidth:"wide"}),day:_o({values:ig,defaultWidth:"wide"}),dayPeriod:_o({values:sg,defaultWidth:"wide",formattingValues:cg,defaultFormattingWidth:"wide"})};function Bo(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=o.match(a);if(!i)return null;var s=i[0],c=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(c)?mg(c,function(g){return g.test(s)}):pg(c,function(g){return g.test(s)}),u;u=e.valueCallback?e.valueCallback(d):d,u=t.valueCallback?t.valueCallback(u):u;var m=o.slice(s.length);return{value:u,rest:m}}}function pg(e,o){for(var t in e)if(e.hasOwnProperty(t)&&o(e[t]))return t}function mg(e,o){for(var t=0;t<e.length;t++)if(o(e[t]))return t}function gg(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=o.match(e.matchPattern);if(!n)return null;var a=n[0],i=o.match(e.parsePattern);if(!i)return null;var s=e.valueCallback?e.valueCallback(i[0]):i[0];s=t.valueCallback?t.valueCallback(s):s;var c=o.slice(a.length);return{value:s,rest:c}}}var hg=/^(\d+)(th|st|nd|rd)?/i,fg=/\d+/i,yg={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},xg={any:[/^b/i,/^(a|c)/i]},bg={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},kg={any:[/1/i,/2/i,/3/i,/4/i]},Cg={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Sg={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},jg={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},wg={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},vg={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Tg={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Ig={ordinalNumber:gg({matchPattern:hg,parsePattern:fg,valueCallback:function(o){return parseInt(o,10)}}),era:Bo({matchPatterns:yg,defaultMatchWidth:"wide",parsePatterns:xg,defaultParseWidth:"any"}),quarter:Bo({matchPatterns:bg,defaultMatchWidth:"wide",parsePatterns:kg,defaultParseWidth:"any",valueCallback:function(o){return o+1}}),month:Bo({matchPatterns:Cg,defaultMatchWidth:"wide",parsePatterns:Sg,defaultParseWidth:"any"}),day:Bo({matchPatterns:jg,defaultMatchWidth:"wide",parsePatterns:wg,defaultParseWidth:"any"}),dayPeriod:Bo({matchPatterns:vg,defaultMatchWidth:"any",parsePatterns:Tg,defaultParseWidth:"any"})},Fg={code:"en-US",formatDistance:J0,formatLong:og,formatRelative:tg,localize:ug,match:Ig,options:{weekStartsOn:0,firstWeekContainsDate:1}},Rg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Mg=/^'([^]*?)'?$/,Wg=/''/g,Hg=/[a-zA-Z]/;function Pg(e,o,t){var n,a,i,s,c,d,u,m,g,h,f,y,b,k;je(2,arguments);var C=String(o),j=Or(),w=(n=(a=void 0)!==null&&a!==void 0?a:j.locale)!==null&&n!==void 0?n:Fg,S=lo((i=(s=(c=(d=void 0)!==null&&d!==void 0?d:void 0)!==null&&c!==void 0?c:j.firstWeekContainsDate)!==null&&s!==void 0?s:(u=j.locale)===null||u===void 0||(m=u.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var x=lo((g=(h=(f=(y=void 0)!==null&&y!==void 0?y:void 0)!==null&&f!==void 0?f:j.weekStartsOn)!==null&&h!==void 0?h:(b=j.locale)===null||b===void 0||(k=b.options)===null||k===void 0?void 0:k.weekStartsOn)!==null&&g!==void 0?g:0);if(!(x>=0&&x<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!w.localize)throw new RangeError("locale must contain localize property");if(!w.formatLong)throw new RangeError("locale must contain formatLong property");var v=$e(e);if(!z0(v))throw new RangeError("Invalid time value");var T=q0(v),R=W0(v,T),M={firstWeekContainsDate:S,weekStartsOn:x,locale:w,_originalDate:v},E=C.match(zg).map(function(I){var V=I[0];if(V==="p"||V==="P"){var P=N0[V];return P(I,w.formatLong)}return I}).join("").match(Rg).map(function(I){if(I==="''")return"'";var V=I[0];if(V==="'")return Vg(I);var P=B0[V];if(P)return K0(I)&&Bn(I,o,String(e)),Y0(I)&&Bn(I,o,String(e)),P(R,I,w.localize,M);if(V.match(Hg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+V+"`");return I}).join("");return E}function Vg(e){var o=e.match(Mg);return o?o[1].replace(Wg,"'"):e}const Wl=()=>{const[e,o]=p.useState(!1),[t,n]=p.useState(!1),[a,i]=p.useState(Pg(new Date,"yyyy-MM-dd"));return{date:a,setDate:i,isHovered:e,setIsHovered:o,isFocused:t,setIsFocused:n}},Ag=e=>r.jsx(l.Input,{type:"date",...e}),Hl=({id:e,icon:o,name:t,label:n,date:a,children:i,helperText:s,shadow:c={},size:d="md",variant:u="default",shape:m="default",views:g={container:{},label:{},helperText:{},text:{},field:{}},error:h=!1,isHovered:f=!1,isFocused:y=!1,isDisabled:b=!1,isReadOnly:k=!1,setDate:C=()=>{},setIsFocused:j=()=>{},setIsHovered:w=()=>{},onChange:S,onChangeText:x,...v})=>{const{themeMode:T}=l.useTheme(),R=!!(y&&n),M=()=>w(!f),E=()=>j(!0),I=P=>{typeof P=="string"?(C(P),x&&x(P)):(C(P.target.value),S&&S(P.target.value))},V={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none",backgroundColor:"transparent"}},transition:"all 0.2s ease-in-out",fontSize:l.Typography.fontSizes[d],backgroundColor:"transparent",color:b?"color-gray-400":"color-gray-900",cursor:b?"not-allowed":k?"auto":"pointer",...g.field};return r.jsx(qe,{helperText:s,error:h,views:g,children:r.jsx(Ze,{label:n,size:d,error:h,shape:m,views:g,shadow:c,color:"theme-primary",variant:u,value:a,isHovered:f,isDisabled:b,isReadOnly:k,isFocused:y,showLabel:R,onMouseEnter:M,onMouseLeave:M,children:r.jsxs(Ao,{children:[R&&r.jsx(io,{htmlFor:e,color:"theme-primary",error:h,views:g,children:n}),r.jsx(Ag,{id:e,name:t,onFocus:E,disabled:b,readOnly:k,...V,...v,...x&&{onChangeText:I},onChange:I})]})})})},Eg=e=>{const o=Wl();return r.jsx(Hl,{...o,...e})},Dg=Eg,Pl=e=>{const o=ln(e),[t,n]=p.useState(!1);return{isVisible:t,setIsVisible:n,...e,...o}},On={xs:14,sm:16,md:16,lg:18,xl:20},$g=({visibleIcon:e,hiddenIcon:o,...t})=>{const{isVisible:n,setIsVisible:a,...i}=Pl(t),s=On[t.size??"md"]??On.md,c=s-2;return r.jsx(nr,{...i,type:n?"text":"password",isClearable:!1,right:r.jsx(l.View,{display:"flex",alignItems:"center",justifyContent:"center",width:`${s}px`,height:`${s}px`,minWidth:`${s}px`,color:"color-gray-500",cursor:t.isDisabled?"not-allowed":"pointer",transition:"color 0.2s ease",onClick:()=>{t.isDisabled||a(!n)},children:n?e??r.jsx(qt,{widthHeight:c}):o??r.jsx(Nt,{widthHeight:c})})})},Lg=$g,Vl=(e,o,t)=>{const[n,a]=p.useState(e),[i,s]=p.useState(o?{value:o,label:o}:e[0]),[c,d]=p.useState([]),[u,m]=p.useState(0),[g,h]=p.useState(t??""),[f,y]=p.useState(!1);return{filteredItems:n,setFilteredItems:a,selectedItem:i,setSelectedItem:s,selectedItems:c,setSelectedItems:d,highlightedIndex:u,setHighlightedIndex:m,searchQuery:g,setSearchQuery:h,isDropdownVisible:f,setIsDropdownVisible:y}},_g={xs:12,sm:14,md:16,lg:20,xl:24},Bg={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)"},Nn={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"},initial:{opacity:0,transform:"translateY(-8px) scale(0.96)"}},Og={padding:"8px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-100",backgroundColor:"color-gray-50",borderTopLeftRadius:10,borderTopRightRadius:10},Ng={padding:"8px 10px",cursor:"pointer",borderRadius:8,margin:"1px 4px",transition:"all 0.15s ease-in-out"},qg={padding:"24px 16px",display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"},qn={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},Ug={display:"inline-flex",alignItems:"center",gap:"4px",padding:"2px 8px",backgroundColor:"color-gray-100",borderRadius:8,fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},Al=({placeholder:e,items:o,showTick:t=!0,onSelect:n,searchEnabled:a=!0,left:i,right:s,label:c,filteredItems:d,setSelectedItem:u,selectedItem:m,selectedItems:g,setSelectedItems:h,highlightedIndex:f,setHighlightedIndex:y,searchQuery:b,setSearchQuery:k,setFilteredItems:C,views:j,isDropdownVisible:w,setIsDropdownVisible:S,isMulti:x=!1,searchPlaceholder:v,size:T="md",...R})=>{const{ref:M,relation:E}=l.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),I=p.useRef(null),[V,P]=p.useState(!1),[z,W]=p.useState(!1),F=()=>{var Y;const $=z?Nn.enter:Nn.initial;if(!M.current)return{};const O=M.current.getBoundingClientRect(),N={position:"fixed",left:O.left,width:O.width,zIndex:1e4,...$};return((Y=E==null?void 0:E.space)==null?void 0:Y.vertical)==="top"?{...N,bottom:window.innerHeight-O.top+6}:{...N,top:O.bottom+6}};p.useEffect(()=>{if(w){const $=setTimeout(()=>W(!0),10);return()=>clearTimeout($)}W(!1)},[w]),p.useEffect(()=>{const $=O=>{!O.composedPath().some(Y=>(Y==null?void 0:Y.id)==="combobox-dropdown")&&M.current&&!M.current.contains(O.target)&&S(!1)};return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[]);const H=$=>{if(k($),$==="")C(o);else{const O=o.filter(N=>N.label.toLowerCase().includes($.toLowerCase()));C(O)}y(0)},D=$=>{if(x){const O=g.some(_=>_.value===$.value);let N;O?N=g.filter(_=>_.value!==$.value):N=[...g,$],h(N),n==null||n(N)}else u($),n==null||n($),S(!1)},L=($,O)=>{$.stopPropagation();const N=g.filter(_=>_.value!==O.value);h(N),n==null||n(N)},B=$=>x?g.some(O=>O.value===$.value):$.value===m.value;return r.jsxs(l.Horizontal,{role:"combobox",flexWrap:"nowrap",gap:15,alignItems:"center",width:"100%",...R,children:[c&&r.jsx(l.Text,{views:j==null?void 0:j.label,htmlFor:R.id,children:c}),r.jsxs(l.View,{position:"relative",width:"100%",children:[r.jsx("div",{ref:M,onClick:()=>S(!w),style:{width:"100%"},children:r.jsxs(Ze,{size:T,isHovered:V,isFocused:w,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),cursor:"pointer",views:{container:j==null?void 0:j.container},children:[r.jsxs(l.Horizontal,{gap:10,alignItems:"center",flex:1,minWidth:0,flexWrap:x?"wrap":"nowrap",...j==null?void 0:j.labelContainer,children:[i,x?g.length>0?r.jsx(l.Horizontal,{gap:6,flexWrap:"wrap",alignItems:"center",children:g.map($=>r.jsxs(l.Horizontal,{...Ug,_hover:{backgroundColor:"color-gray-200"},children:[$.icon&&r.jsx(l.View,{flexShrink:0,children:$.icon}),r.jsx(l.Text,{size:"sm",color:"color-gray-700",weight:"medium",children:$.label}),r.jsx(Te,{widthHeight:12,color:"color-gray-500",cursor:"pointer",onClick:O=>L(O,$)})]},$.value))}):r.jsx(l.Text,{weight:"medium",flexGrow:1,color:"color-gray-500",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...j==null?void 0:j.label,children:e}):r.jsxs(r.Fragment,{children:[m.icon&&m.label!==e&&r.jsx(l.View,{children:m.icon}),r.jsx(l.Text,{weight:"medium",flexGrow:1,color:m.label===e?"color-gray-500":"color-gray-800",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...j==null?void 0:j.label,children:m.label})]})]}),r.jsxs(l.Horizontal,{gap:8,alignItems:"center",flexShrink:0,children:[s,r.jsx(l.View,{style:w?qn.open:qn.closed,children:r.jsx(ce,{widthHeight:_g[T],orientation:"down",color:w?"color-gray-700":"color-gray-400"})})]})]})}),w&&r.jsx($t,{children:r.jsxs(l.View,{ref:I,id:"combobox-dropdown",role:"listbox","aria-labelledby":R.id,...Bg,style:F(),...j==null?void 0:j.dropdown,children:[a&&r.jsx(l.View,{...Og,children:r.jsx(nr,{id:`${R.id}-search`,name:`${R.name}-search`,width:"100%",type:"search",autoFocus:!0,value:b,onChange:$=>H($),hint:e||"Search...",isClearable:!1,left:r.jsx(Tr,{widthHeight:14,color:"color-gray-400"}),views:{container:{width:"100%",padding:"0",backgroundColor:"transparent",borderColor:"color-gray-200",...j==null?void 0:j.text},field:{fontSize:"13px"}}})}),d.length>0&&r.jsx(l.View,{margin:0,padding:"4px",children:d.map(($,O)=>{const N=B($),_=O===f;return r.jsxs(l.Horizontal,{role:"option","aria-selected":N,justifyContent:"space-between",alignItems:"center",...Ng,backgroundColor:N&&_?"color-blue-100":N?"color-blue-50":_?"color-gray-100":"transparent",onMouseEnter:()=>y(O),onClick:()=>D($),...j==null?void 0:j.item,children:[r.jsxs(l.Horizontal,{gap:8,alignItems:"center",children:[$.icon&&r.jsx(l.View,{flexShrink:0,children:$.icon}),r.jsx(l.Text,{size:"sm",color:N?"theme-primary":"color-gray-800",weight:N?"medium":"normal",children:$.label})]}),N&&t&&r.jsx(or,{widthHeight:16,color:"theme-primary"})]},$.value)})}),d.length===0&&r.jsxs(l.Vertical,{...qg,children:[r.jsx(Tr,{widthHeight:24,color:"color-gray-300"}),r.jsx(l.Text,{color:"color-gray-500",size:"sm",align:"center",children:"No results found"}),r.jsx(l.Text,{color:"color-gray-400",size:"xs",align:"center",children:"Try a different search term"})]})]})})]})]})},Gg=({id:e,name:o,items:t,placeholder:n,searchPlaceholder:a,...i})=>{const s=Vl(t,n,a);return r.jsx(Al,{id:e,name:o,items:t,...s,...i})},Yg=Gg,El=e=>{const{tags:o,defaultTags:t=[],onTagsChange:n,onTagAdd:a,onTagRemove:i,maxTags:s,minTagLength:c=1,maxTagLength:d=50,allowDuplicates:u=!1,separators:m=["enter","comma"],isDisabled:g=!1,isReadOnly:h=!1}=e,[f,y]=p.useState(""),[b,k]=p.useState(()=>(o||t||[]).map((z,W)=>({id:`tag-${W}-${Date.now()}`,value:z}))),[C,j]=p.useState(!1),[w,S]=p.useState(!1),x=o&&Array.isArray(o)?o.map((P,z)=>({id:`tag-${z}-${Date.now()}`,value:P})):b;p.useEffect(()=>{o&&Array.isArray(o)&&k(o.map((P,z)=>({id:`tag-${z}-${Date.now()}`,value:P})))},[o]);const v=p.useCallback(P=>{const z=P.trim();return!(z.length<c||z.length>d||!u&&x.map(F=>F.value.toLowerCase()).includes(z.toLowerCase())||s&&x.length>=s)},[x,c,d,u,s]),T=p.useCallback(P=>{if(g||h)return;const z=P.trim();if(!z||!v(z))return;const W={id:`tag-${Date.now()}-${Math.random()}`,value:z},F=[...x,W],H=F.map(D=>D.value);o||k(F),n==null||n(H),a==null||a(z),y("")},[x,v,n,a,g,h,o]),R=p.useCallback(P=>{if(g||h)return;const z=x[P];if(!z)return;const W=x.filter((H,D)=>D!==P),F=W.map(H=>H.value);o||k(W),n==null||n(F),i==null||i(z.value,P)},[x,n,i,g,h,o]),M=p.useCallback(P=>{if(g||h)return;const z=P.target.value;if(m.includes("comma")&&z.includes(",")){const W=z.split(","),F=W[0],H=W.slice(1).join(",");F.trim()&&T(F),y(H);return}y(z)},[T,m,g,h]),E=p.useCallback(P=>{if(g||h)return;const{key:z}=P;if(m.includes("enter")&&z==="Enter"){P.preventDefault(),f.trim()&&T(f);return}if(m.includes("tab")&&z==="Tab"&&f.trim()){P.preventDefault(),T(f);return}if(m.includes("space")&&z===" "&&f.trim()){P.preventDefault(),T(f);return}if(z==="Backspace"&&!f&&x.length>0){P.preventDefault(),R(x.length-1);return}},[T,R,f,x,m,g,h]),I=p.useCallback(()=>{var P;j(!0),(P=e.onFocus)==null||P.call(e)},[e.onFocus]),V=p.useCallback(()=>{var P;j(!1),f.trim()&&T(f),(P=e.onBlur)==null||P.call(e)},[T,f,e.onBlur]);return{inputValue:f,setInputValue:y,tags:x,setTags:k,isFocused:C,setIsFocused:j,isHovered:w,setIsHovered:S,addTag:T,removeTag:R,handleInputChange:M,handleKeyDown:E,handleFocus:I,handleBlur:V,validateTag:v}},Kg=({tag:e,onRemove:o,isRemovable:t,size:n,views:a,isDisabled:i,isReadOnly:s})=>{const[c,d]=p.useState(!1),u={xs:{padding:"2px 8px",fontSize:"10px",iconSize:10},sm:{padding:"4px 10px",fontSize:"12px",iconSize:12},md:{padding:"6px 14px",fontSize:"14px",iconSize:14},lg:{padding:"8px 16px",fontSize:"16px",iconSize:16},xl:{padding:"10px 18px",fontSize:"18px",iconSize:18}}[n]||{padding:"6px 14px",fontSize:"14px",iconSize:14};return r.jsxs(l.Horizontal,{alignItems:"center",gap:6,padding:u.padding,backgroundColor:"theme-primary-100",borderRadius:"9999px",borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary-250",transition:"all 0.15s ease-in-out",opacity:i?.6:1,maxWidth:"100%",minWidth:0,_hover:!i&&!s?{backgroundColor:"theme-primary-180",borderColor:"theme-primary-400"}:{},...a==null?void 0:a.tag,children:[r.jsx(l.Text,{fontSize:u.fontSize,color:i?"color-gray-400":"theme-primary",maxLines:1,minWidth:0,...a==null?void 0:a.tagText,children:e}),t&&!i&&!s&&r.jsx(l.View,{cursor:"pointer",padding:"2px",borderRadius:"50%",transition:"all 0.15s ease-in-out",backgroundColor:c?"color-red-100":"transparent",opacity:c?1:.7,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onClick:m=>{m.stopPropagation(),o()},_hover:{backgroundColor:"color-red-100"},...a==null?void 0:a.tagRemove,children:r.jsx(Te,{widthHeight:u.iconSize,color:c?"color-red-500":"color-gray-400"})})]})},Dl=({id:e,name:o,label:t,placeholder:n="Type and press Enter to add tags...",helperText:a,error:i=!1,inputValue:s="",tags:c=[],left:d,right:u,shadow:m={},views:g={},size:h="md",shape:f="default",variant:y="default",isDisabled:b=!1,isReadOnly:k=!1,isAutoFocus:C=!1,isRemovable:j=!0,isFocused:w=!1,isHovered:S=!1,maxTags:x,handleInputChange:v,handleKeyDown:T,handleFocus:R,handleBlur:M,removeTag:E,setIsHovered:I,onClick:V,setInputValue:P,setTags:z,setIsFocused:W,addTag:F,filteredItems:H,activeItemIndex:D,isMenuOpen:L,handleMenuItemSelect:B,defaultTags:$,onTagsChange:O,onTagAdd:N,onTagRemove:_,minTagLength:Y,maxTagLength:A,allowDuplicates:G,separators:Q,menuItems:X,onMenuItemSelect:K,onFocus:oe,onBlur:te,validateTag:re,...U})=>{const{getColor:Z,themeMode:le}=l.useTheme(),J=!!(t&&(w||c.length>0||s)),ee=x&&c.length>=x,ie={border:"none",outline:"none",backgroundColor:"transparent",fontSize:l.Typography.fontSizes[h],color:b?"color-gray-400":"color-gray-800",flex:1,minWidth:"120px",transition:"all 0.2s ease-in-out",...g==null?void 0:g.input};return r.jsx(qe,{error:!!i,helperText:typeof i=="string"?i:a,views:g,...U,children:r.jsxs(Ze,{label:t,shadow:m,value:c.length>0||s?"has-content":"",size:h,shape:f,variant:y,error:!!i,showLabel:J,isFocused:w,isHovered:S,isDisabled:b,isReadOnly:k,views:{...g,container:{...g==null?void 0:g.container,...g==null?void 0:g.inputContainer}},onClick:V,onMouseEnter:()=>I==null?void 0:I(!0),onMouseLeave:()=>I==null?void 0:I(!1),children:[d,r.jsxs(Ao,{children:[t&&r.jsx(io,{size:h,error:!!i,views:g,children:t}),r.jsxs(l.Horizontal,{alignItems:"center",gap:8,flexWrap:"wrap",width:"100%",minHeight:l.Typography.fontSizes[h],padding:"0",...g==null?void 0:g.tagsContainer,children:[c.map((ae,ue)=>r.jsx(Kg,{tag:ae.value,onRemove:()=>E==null?void 0:E(ue),isRemovable:j,size:h,views:g,isDisabled:b,isReadOnly:k},ae.id)),!ee&&r.jsx(l.Input,{id:e,name:o,type:"text",value:s,placeholder:c.length===0?n:"",disabled:b,readOnly:k,autoFocus:C,onChange:v,onKeyDown:T,onFocus:R,onBlur:M,autoComplete:"off",...ie}),ee&&r.jsxs(l.Text,{fontSize:l.Typography.fontSizes[h],color:"color-gray-500",fontStyle:"italic",...g==null?void 0:g.placeholder,children:["Maximum ",x," tags reached"]})]})]}),u]})})},Xg=e=>{const o=El(e),{tags:t,...n}=e;return r.jsx(Dl,{...o,...n})},Jg=Xg;function Qg(e){const o=setTimeout(e,0),t=setTimeout(e,10),n=setTimeout(e,50);return[o,t,n]}const Oo=(e,o)=>{console.log(`[OTPInput.state] ${e}`,o)},Zg=e=>e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?e:Object.prototype.toString.call(e),$l=({value:e,defaultValue:o="",length:t=6,onChange:n,onChangeText:a,onComplete:i,onKeyDown:s,onKeyPress:c,onBlur:d,onFocus:u,isReadOnly:m,isDisabled:g,pattern:h,stepValues:f,pasteTransformer:y})=>{var _,Y;const b=e!==void 0,k=b?e:o,[C,j]=p.useState(String(k??"").slice(0,t)||""),[w,S]=p.useState(!1),[x,v]=p.useState(!1),[T,R]=p.useState(null),[M,E]=p.useState(null),I=p.useRef(null),V=p.useRef(null),P=p.useRef({value:C,onChange:n||(()=>{}),isIOS:typeof window<"u"&&((Y=(_=window==null?void 0:window.CSS)==null?void 0:_.supports)==null?void 0:Y.call(_,"-webkit-touch-callout","none"))}),z=p.useRef({prev:[null,null,"none"]}),W=h?typeof h=="string"?new RegExp(h):h:null;p.useEffect(()=>{if(b&&e!==C){const A=String(e??"").slice(0,t)||"";Oo("sync controlled value",{controlledValue:Zg(e),previousValue:C,nextControlledValue:A,length:t}),j(A)}},[b,e,t,C]);const F=p.useCallback(A=>{let G=A;if(f&&f.length>0&&A){const Q=parseInt(A,10);if(!isNaN(Q)){let X=f[0],K=Math.abs(Q-X);for(let oe=1;oe<f.length;oe++){const te=Math.abs(Q-f[oe]);te<K&&(K=te,X=f[oe])}G=X.toString()}}Oo("setValue",{incomingValue:A,valueToSet:G,length:t,isControlled:b,hasOnChange:!!n,hasOnChangeText:!!a,hasOnComplete:!!i,stepValues:f}),j(G),n&&n(G),a&&a(G),i&&G.length===t&&i(G)},[n,a,i,t,f,b]),H=p.useCallback(A=>{A&&I.current!==A&&Object.defineProperty(I,"current",{value:A,writable:!0})},[]),D=p.useCallback(A=>{var X,K,oe,te;const G=typeof A=="string"?A:((X=A==null?void 0:A.currentTarget)==null?void 0:X.value)??((K=A==null?void 0:A.target)==null?void 0:K.value)??((oe=A==null?void 0:A.nativeEvent)==null?void 0:oe.text)??"",Q=String(G).slice(0,t);if(Oo("handleChange normalized",{raw:G,newValue:Q,length:t,hasPattern:!!W}),Q.length>0&&W&&!W.test(Q)){Oo("handleChange rejected by pattern",{newValue:Q,pattern:String(W)}),(te=A==null?void 0:A.preventDefault)==null||te.call(A);return}F(Q),I.current&&(I.current.value=Q)},[t,W,F,I]),L=p.useCallback(()=>{const A=I.current;if(A&&typeof A.setSelectionRange=="function"){const G=typeof A.value=="string"?A.value.length:0,Q=Math.min(G,t-1),X=G;A.setSelectionRange(Q,X),R(Q),E(X)}Oo("focus",{length:t,refHasDomSelection:!!(A&&typeof A.setSelectionRange=="function")}),S(!0)},[t]),B=p.useCallback(()=>{S(!1)},[]),$=p.useCallback(A=>{s&&s(A)},[]),O=p.useCallback(A=>{c&&c(A)},[]),N=p.useCallback(A=>{const G=I.current;if(!A.clipboardData||!G)return;const Q=A.clipboardData.getData("text/plain"),X=y?y(Q):Q;A.preventDefault();const K=G.selectionStart||0,oe=G.selectionEnd||0,U=(K!==oe?C.slice(0,K)+X+C.slice(oe):C.slice(0,K)+X+C.slice(K)).slice(0,t);if(U.length>0&&W&&!W.test(U))return;G.value=U,F(U),j(U);const Z=Math.min(U.length,t-1),le=U.length;G.setSelectionRange(Z,le),R(Z),E(le)},[t,y,W,F,C,j]);return p.useEffect(()=>{const A=I.current,G=V.current;if(!A||!G||typeof document>"u")return;P.current.value!==A.value&&P.current.onChange&&P.current.onChange(A.value),z.current.prev=[A.selectionStart,A.selectionEnd,A.selectionDirection];function Q(){if(document.activeElement!==A){R(null),E(null);return}const re=(A==null?void 0:A.selectionStart)??null,U=(A==null?void 0:A.selectionEnd)??null,Z=(A==null?void 0:A.selectionDirection)??null,le=(A==null?void 0:A.maxLength)??0,J=(A==null?void 0:A.value)??"",ee=z.current.prev;let ie=-1,ae=-1,ue="none";if(J.length!==0&&re!==null&&U!==null){const Do=re===U,Tn=re===J.length&&J.length<le;if(Do&&!Tn){const Le=re;if(Le===0)ie=0,ae=1,ue="forward";else if(Le===le)ie=Le-1,ae=Le,ue="backward";else if(le>1&&J.length>1){let go=0;if(ee[0]!==null&&ee[1]!==null){ue=Le<ee[1]?"backward":"forward";const Jr=ee[0]===ee[1]&&ee[0]<le;ue==="backward"&&!Jr&&(go=-1)}ie=go+Le,ae=go+Le+1}}ie!==-1&&ae!==-1&&ie!==ae&&I.current&&I.current.setSelectionRange(ie,ae,ue)}const Re=ie!==-1?ie:re,Ve=ae!==-1?ae:U,Xr=ue!=="none"?ue:Z;R(Re),E(Ve),z.current.prev=[Re,Ve,Xr]}document.addEventListener("selectionchange",Q,{capture:!0}),Q(),document.activeElement===A&&S(!0);const X=G,K=()=>{var re;X&&typeof((re=X.style)==null?void 0:re.setProperty)=="function"&&X.style.setProperty("--root-height",`${A.clientHeight}px`)};K();const oe=typeof window<"u"?window.ResizeObserver:void 0,te=typeof oe=="function"?new oe(K):null;return te==null||te.observe(A),()=>{document.removeEventListener("selectionchange",Q,{capture:!0}),te==null||te.disconnect()}},[]),p.useEffect(()=>{typeof Event>"u"||Qg(()=>{var K,oe,te;const A=I.current;A&&typeof A.dispatchEvent=="function"&&A.dispatchEvent(new Event("input"));const G=(K=I.current)==null?void 0:K.selectionStart,Q=(oe=I.current)==null?void 0:oe.selectionEnd,X=(te=I.current)==null?void 0:te.selectionDirection;G!==null&&Q!==null&&G!==void 0&&Q!==void 0&&(R(G),E(Q),z.current.prev=[G,Q,X||"none"])})},[C,w]),{value:C,setValue:F,isFocused:w,setIsFocused:S,isHovered:x,setIsHovered:v,inputRef:I,containerRef:V,mirrorSelectionStart:T,mirrorSelectionEnd:M,setMirrorSelectionStart:R,setMirrorSelectionEnd:E,setInputRef:H,handleChange:D,handleFocus:L,handleBlur:B,handleKeyDown:$,handleKeyPress:O,handlePaste:N}},eh=p.createContext({slots:[],isFocused:!1,isHovering:!1}),oh=`
5
+ ${O} no-repeat
6
+ `,backgroundSize:`200% ${N}px, ${N}px 200%, 200% ${N}px, ${N}px 200%`,backgroundPosition:$,transitionProperty:"background-position",transitionDuration:`${R}s`,transitionTimingFunction:"linear",transitionDelay:G,_hover:{backgroundPosition:_,transitionDelay:B},width:s?"100%":i?"fit-content":void 0,...g==null?void 0:g.container,...F,children:r.jsx(l.View,{as:t?"div":"button",disabled:!!(n||a),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:Math.max(0,M-3),width:"100%",height:"100%",...h,...f,...y,backgroundColor:(h==null?void 0:h.backgroundColor)||w,color:b,borderWidth:0,cursor:n?"default":"pointer",children:E})})}return r.jsx(l.Element,{ref:k,as:e==="link"&&t?"div":"button",type:e==="link"&&t?void 0:"button",disabled:!!(n||a),...f,...y,display:"inline-flex",alignItems:"center",justifyContent:"center",width:s?"100%":i?"fit-content":void 0,borderRadius:tr[d],boxShadow:u,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",onClick:m,...h,...g==null?void 0:g.container,...F,children:E})},Jp=p.memo(p.forwardRef(({variant:e="filled",size:o="md",shape:t="rounded",iconPosition:n="left",loaderPosition:a="left",backgroundColor:i,color:s,textColor:c,explicitTextColor:d,reversed:u=!1,isAuto:m=!0,isFilled:g,isDisabled:h,isLoading:f,isIconRounded:y,isHovered:k,icon:b,children:C,to:S,isExternal:w,shadow:j,onClick:x,views:v={},animation:T,loaderProps:F,config:M,ariaLabel:E,borderMovingDuration:I=2,borderMovingGradientColors:V=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:H="#705CFF",animatedStrokeTextColor:z="color-gray-900",...P},R)=>{const D=h?"theme-disabled":f?"theme-loading":i??s??"theme-primary",L=d??c??"color-white",{config:O}=Lr(),$=O==null?void 0:O.theme,_=p.useMemo(()=>{const K=qp(D,L,u,$);return M!=null&&M.variants&&Object.keys(M.variants).forEach(X=>{K[X]&&(K[X]=Ne(K[X],M.variants[X]))}),K},[D,L,u,$,M==null?void 0:M.variants]),B=_[e]??_.filled,G=d?{...B,color:d}:B,N=(G==null?void 0:G.color)??L,A=r.jsx(Up,{icon:b,isLoading:f,iconPosition:n,loaderPosition:a,size:o,resolvedTextColor:N,isIconRounded:y,views:v,children:C}),Y=al[o],J=y?Np[o]:{};return r.jsx(Xp,{variant:e,animation:T,to:S,isDisabled:h,isLoading:f,isAuto:m,isFilled:g,isExternal:w,shape:t,shadow:j,onClick:x,views:v,baseStyles:G,sizeStyles:Y,iconPad:J,resolvedTextColor:N,content:A,size:o,mainTone:D,borderMovingDuration:I,borderMovingGradientColors:V,animatedStrokeAccentColor:H,animatedStrokeTextColor:z,containerRef:R,...P})})),Qp=e=>{const[o,t]=l.useHover(),n=he("button",e),a=e.textColor??(e.backgroundColor!=null&&e.color!=null?e.color:void 0);return r.jsx(Jp,{isHovered:t,...n,explicitTextColor:a})},ce=Qp,Zp={sm:{padding:"12px"},md:{padding:"16px"},lg:{padding:"24px"}},em={square:0,rounded:"8px",pill:"24px"},om=e=>{const o=e==="dark";return{default:{backgroundColor:"color-white",border:"none",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},outlined:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",transition:"border-color 0.2s ease, box-shadow 0.2s ease",_hover:{borderColor:"color-gray-300",boxShadow:o?"0px 1px 3px rgba(0, 0, 0, 0.3)":"0px 1px 3px rgba(0, 0, 0, 0.05)"}},elevated:{backgroundColor:"color-white",boxShadow:o?"0px 1px 3px rgba(0, 0, 0, 0.35), 0px 1px 2px rgba(0, 0, 0, 0.3)":"0px 1px 3px rgba(0, 0, 0, 0.08), 0px 1px 2px rgba(0, 0, 0, 0.06)",border:"none",transition:"box-shadow 0.2s ease",_hover:{boxShadow:o?"0px 4px 6px rgba(0, 0, 0, 0.4), 0px 2px 4px rgba(0, 0, 0, 0.35)":"0px 4px 6px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.06)"}}}},Ur=e=>(e.themeMode,{container:{backgroundColor:"color-white",color:"color-gray-900",borderRadius:"8px",overflow:"hidden",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},header:{padding:"16px",borderBottom:"1px solid",borderColor:"color-gray-100",color:"theme-primary",fontWeight:600,fontSize:14},content:{padding:"16px",color:"color-gray-600",fontSize:12,lineHeight:"18px"},footer:{padding:"16px",borderTop:"1px solid",borderColor:"color-gray-100",justifyContent:"flex-end",gap:8}}),ll=p.createContext({}),tn=()=>p.useContext(ll),Ct=({children:e,views:o,style:t,themeMode:n,...a})=>{var u;const i=l.useTheme(),{styles:s}=tn(),c=Ur(i).header,d={...c,...s==null?void 0:s.header,...a,style:{...c==null?void 0:c.style,...(u=s==null?void 0:s.header)==null?void 0:u.style,...t}};return r.jsx(l.Vertical,{gap:8,...d,children:e})},St=({children:e,views:o,style:t,themeMode:n,...a})=>{var u;const i=l.useTheme(),{styles:s}=tn(),c=Ur(i).content,d={...c,...s==null?void 0:s.content,...a,style:{...c==null?void 0:c.style,...(u=s==null?void 0:s.content)==null?void 0:u.style,...t}};return r.jsx(l.Vertical,{gap:12,...d,children:e})},jt=({children:e,views:o,style:t,themeMode:n,...a})=>{var u;const i=l.useTheme(),{styles:s}=tn(),c=Ur(i).footer,d={...c,...s==null?void 0:s.footer,...a,style:{...c==null?void 0:c.style,...(u=s==null?void 0:s.footer)==null?void 0:u.style,...t}};return r.jsx(l.Vertical,{gap:8,...d,children:e})},rm=({variant:e="default",size:o="md",shape:t="rounded",children:n,header:a,footer:i,isFullWidth:s=!1,views:c,style:d,themeMode:u,config:m,...g})=>{var x,v;const h=l.useTheme(),f=Ur(h),y=((x=Zp[o])==null?void 0:x.padding)||"16px",k=p.useMemo(()=>({styles:{container:{...f.container,borderRadius:em[t],...c==null?void 0:c.container},header:{...f.header,padding:y,...c==null?void 0:c.header},content:{...f.content,padding:y,...c==null?void 0:c.content},footer:{...f.footer,padding:y,...c==null?void 0:c.footer}}}),[f,c,y,t]),b=p.Children.toArray(n).some(T=>p.isValidElement(T)&&(T.type===Ct||T.type===St||T.type===jt)),{themeMode:C}=h,w=om(u||C)[e],j={width:s?"100%":"auto",overflow:"hidden",...w,...k.styles.container,...g,style:{...(v=k.styles.container)==null?void 0:v.style,...d}};return r.jsx(ll.Provider,{value:k,children:r.jsx(l.View,{...j,children:b?n:r.jsxs(l.Vertical,{width:"100%",children:[a&&r.jsx(Ct,{children:a}),r.jsx(St,{children:n}),i&&r.jsx(jt,{children:i})]})})})},tm=e=>{const o=he("card",e);return r.jsx(rm,{...o})},ke=tm;ke.Header=Ct;ke.Content=St;ke.Footer=jt;const nm=({defaultActiveIndex:e=0,activeIndex:o,onChange:t,autoPlay:n=!1,autoPlayInterval:a=3e3,pauseOnHover:i=!0,infinite:s=!0,totalSlides:c,stepIndices:d})=>{const u=p.useRef(c||0),[m,g]=p.useState(c||0),h=p.useRef(new Set),f=p.useRef(0),y=p.useMemo(()=>Et("carousel-content"),[]),[k,b]=p.useState(o!==void 0?o:e),[C,S]=p.useState(!1),[w,j]=p.useState(!1),[x,v]=p.useState(0),[T,F]=p.useState(0),M=p.useRef(null);p.useEffect(()=>{o!==void 0&&b(o)},[o]);const E=p.useCallback(_=>{let B=_;s?_<0?B=m-1:_>=m&&(B=0):B=Math.max(0,Math.min(_,m-1)),d&&d.length>0&&(d.includes(B)||(B=d.reduce((N,A)=>Math.abs(A-B)<Math.abs(N-B)?A:N))),o===void 0&&b(B),t&&t(B)},[o,s,t,m]),I=p.useCallback(()=>{E(k+1)},[k,E]),V=p.useCallback(()=>{E(k-1)},[k,E]);p.useEffect(()=>(n&&!C&&!w&&(M.current=setInterval(()=>{I()},a)),()=>{M.current&&clearInterval(M.current)}),[n,a,C,w,I,i]);const H=p.useCallback(()=>{i&&S(!0)},[i]),z=p.useCallback(()=>{S(!1)},[]),P=p.useCallback(_=>{j(!0),"touches"in _?(v(_.touches[0].clientX),F(_.touches[0].clientY)):(v(_.clientX),F(_.clientY))},[]),R=p.useCallback(_=>{if(!w)return;let B,G;"touches"in _?(B=_.touches[0].clientX,G=_.touches[0].clientY):(B=_.clientX,G=_.clientY);const N=B-x,A=G-T;Math.abs(N)>Math.abs(A)&&Math.abs(N)>50&&(N>0?V():I(),j(!1))},[w,x,T,I,V]),W=p.useCallback(()=>{j(!1)},[]),D=p.useCallback(()=>{const _=f.current++;h.current.add(_);const B=h.current.size;return u.current=B,g(B),_},[]),L=p.useCallback(_=>{h.current.delete(_);const B=h.current.size;if(u.current=B,g(B),B>0&&k>=B){const G=Math.max(0,B-1);o===void 0&&b(G),t&&t(G)}},[k,o,t]),O=s||k>0,$=s||k<m-1;return{activeIndex:k,totalSlides:m,goToSlide:E,nextSlide:I,prevSlide:V,canGoNext:$,canGoPrevious:O,handleMouseEnter:H,handleMouseLeave:z,handleDragStart:P,handleDragMove:R,handleDragEnd:W,registerSlide:D,unregisterSlide:L,contentId:y,infinite:s}},am={dot:{width:"10px",height:"10px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},line:{width:"20px",height:"4px",borderRadius:"2px",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},number:{minWidth:"24px",height:"24px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",transition:"background-color 0.3s ease"}},lm={dot:{backgroundColor:"theme-primary"},line:{backgroundColor:"theme-primary"},number:{backgroundColor:"theme-primary",color:"color-white"}},Wr={width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"color-white",color:"color-gray-800",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"0 2px 5px rgba(0, 0, 0, 0.1)",zIndex:1,transition:"background-color 0.3s ease",_hover:{backgroundColor:"color-gray-100"}},ir=()=>({container:{position:"relative",overflow:"hidden"},content:{overflow:"hidden",width:"100%",height:"100%"},innerContainer:{display:"flex",transitionProperty:"transform",transitionDuration:"300ms",transitionTimingFunction:"ease-in-out",height:"100%"},item:{flex:"0 0 100%",minWidth:0,position:"relative",height:"100%"},prevButton:{position:"absolute",top:"50%",left:"16px",transform:"translateY(-50%)",zIndex:10,...Wr},nextButton:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)",zIndex:10,...Wr}}),il=p.createContext(null),Gr=()=>{const e=p.useContext(il);if(!e)throw new Error("Carousel compound components must be used within <Carousel>");return e},sl=({children:e,isActive:o,index:t,views:n,...a})=>r.jsx(l.View,{flexShrink:0,width:"100%",height:"100%",display:o?"block":"none",...n,...a,children:e}),cl=({views:e,children:o,...t})=>{const{goToPrevious:n,canGoPrevious:a,styles:i}=Gr(),c={...ir().prevButton,...i==null?void 0:i.prevButton,...e==null?void 0:e.prevButton};return r.jsx(ce,{"aria-label":"Previous slide",onClick:()=>n(),isDisabled:!a,...c,...t,children:o??r.jsx(de,{orientation:"left",widthHeight:16})})},dl=({views:e,children:o,...t})=>{const{goToNext:n,canGoNext:a,styles:i}=Gr(),c={...ir().nextButton,...i==null?void 0:i.nextButton,...e==null?void 0:e.nextButton};return r.jsx(ce,{"aria-label":"Next slide",onClick:()=>n(),isDisabled:!a,...c,...t,children:o??r.jsx(de,{orientation:"right",widthHeight:16})})},ul=({children:e,views:o,...t})=>{const{registerSlide:n,unregisterSlide:a,styles:i}=Gr(),s=p.useRef(null);p.useEffect(()=>{const u=n();return s.current=u,()=>{s.current!==null&&a(s.current)}},[n,a]);const d={...ir().item,...i==null?void 0:i.item,...o==null?void 0:o.item};return r.jsx(l.View,{role:"group","aria-roledescription":"slide",...d,...t,children:e})},pl=({children:e,views:o,style:t,...n})=>{const{currentIndex:a,styles:i,contentId:s}=Gr(),c=ir(),d={...c.content,...i==null?void 0:i.content,...o==null?void 0:o.content},u={...c.innerContainer,...i==null?void 0:i.innerContainer,...o==null?void 0:o.innerContainer},m=`-${a*100}%`;return r.jsx(l.View,{...d,...n,style:{...d==null?void 0:d.style,...t},id:s,"aria-live":"polite",children:r.jsx(l.View,{...u,style:{...u==null?void 0:u.style,transform:`translateX(${m})`},children:e})})},im=({children:e,defaultActiveIndex:o=0,activeIndex:t,onChange:n,showNavigation:a=!0,navigationPosition:i="inside",prevButton:s,nextButton:c,showIndicators:d=!0,indicatorPosition:u="bottom",indicatorVariant:m="dot",autoPlay:g=!1,autoPlayInterval:h=3e3,pauseOnHover:f=!0,infinite:y=!0,direction:k="horizontal",transitionDuration:b=300,views:C,stepIndices:S,themeMode:w,...j})=>{const x=p.useMemo(()=>p.Children.toArray(e),[e]),v=nm({defaultActiveIndex:o,activeIndex:t,onChange:n,autoPlay:g,autoPlayInterval:h,pauseOnHover:f,infinite:y,totalSlides:x.length}),{activeIndex:T,totalSlides:F,goToSlide:M,nextSlide:E,prevSlide:I,handleMouseEnter:V,handleMouseLeave:H,handleDragStart:z,handleDragMove:P,handleDragEnd:R}=v,W=()=>{if(!a)return null;const O=s||r.jsx(l.View,{as:"button","aria-label":"Previous slide",...Wr,...C==null?void 0:C.prevButton,children:"❮"}),$=c||r.jsx(l.View,{as:"button","aria-label":"Next slide",...Wr,...C==null?void 0:C.nextButton,children:"❯"});return r.jsxs(r.Fragment,{children:[r.jsx(l.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",left:i==="inside"?"10px":"-40px",onClick:I,cursor:!y&&T===0?"not-allowed":"pointer",opacity:!y&&T===0?.5:1,children:O}),r.jsx(l.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",right:i==="inside"?"10px":"-40px",onClick:E,cursor:!y&&T===x.length-1?"not-allowed":"pointer",opacity:!y&&T===x.length-1?.5:1,children:$})]})},D=()=>d?r.jsx(l.Horizontal,{position:"absolute",left:"0",right:"0",justifyContent:"center",...u==="top"?{top:"10px"}:{bottom:"10px"},...C==null?void 0:C.indicators,children:x.map((O,$)=>r.jsx(l.View,{onClick:()=>M($),cursor:"pointer",...am[m],...$===T?{...lm[m]}:{},...C==null?void 0:C.indicator,...$===T?C==null?void 0:C.activeIndicator:{},children:m==="number"&&$+1},$))}):null;return p.useMemo(()=>p.Children.toArray(e).some(O=>p.isValidElement(O)&&(O.type===pl||O.type===ul||O.type===cl||O.type===dl)),[e])?r.jsx(il.Provider,{value:{currentIndex:T,totalSlides:F,goToSlide:M,goToNext:E,goToPrevious:I,canGoNext:v.canGoNext,canGoPrevious:v.canGoPrevious,registerSlide:v.registerSlide,unregisterSlide:v.unregisterSlide,styles:{...ir(),...C},contentId:v.contentId,infinite:y},children:r.jsx(l.View,{role:"region","aria-roledescription":"carousel","aria-label":"Carousel",position:"relative",width:"100%",height:"100%",overflow:"hidden",...C==null?void 0:C.container,...j,children:e})}):r.jsxs(l.View,{position:"relative",width:"100%",height:"100%",overflow:"hidden",onMouseEnter:V,onMouseLeave:H,onTouchStart:z,onTouchMove:P,onTouchEnd:R,onMouseDown:z,onMouseMove:P,onMouseUp:R,...C==null?void 0:C.container,...j,children:[r.jsx(l.View,{width:"100%",height:"100%",position:"relative",...C==null?void 0:C.slideWrapper,children:x.map((O,$)=>r.jsx(sl,{isActive:$===T,index:$,views:C==null?void 0:C.slide,children:O},$))}),W(),D()]})},sm=e=>r.jsx(im,{...e}),$e=sm;$e.Slide=sl;$e.Content=pl;$e.Item=ul;$e.Previous=cl;$e.Next=dl;const Ee={blue:"color-blue-500",green:"color-green-500",purple:"color-purple-500",orange:"color-orange-500",red:"color-red-500",teal:"color-teal-500",pink:"color-pink-500",indigo:"color-indigo-500",yellow:"color-yellow-500",cyan:"color-cyan-500"},ml=[Ee.blue,Ee.green,Ee.purple,Ee.orange,Ee.red,Ee.teal,Ee.pink,Ee.indigo,Ee.yellow,Ee.cyan],zo=ml,cm={width:"100%",height:"100%",position:"relative",display:"flex",flexDirection:"column"},dm={fontSize:"18px",fontWeight:"700",marginBottom:"24px",textAlign:"center",color:"color-gray-900"},um={display:"flex",flexWrap:"wrap",justifyContent:"flex-start",marginTop:"16px",gap:"12px"},pm={display:"flex",alignItems:"center",padding:"4px 8px",borderRadius:"6px",cursor:"pointer",transition:"background-color 0.2s ease",_hover:{backgroundColor:"color-gray-50"}},mm={width:"10px",height:"10px",borderRadius:"50%",marginRight:"8px"},gm={fontSize:"13px",fontWeight:"500",color:"color-gray-600"},hr={position:"absolute",backgroundColor:"color-white",padding:"12px 16px",borderRadius:"8px",boxShadow:"0px 12px 24px rgba(15, 23, 42, 0.18)",border:"1px solid color-gray-200",fontSize:"14px",display:"flex",flexDirection:"column",pointerEvents:"none",zIndex:100},gl={stroke:"color-gray-100",strokeWidth:"1px",strokeDasharray:"4 4"},Hr={stroke:"color-gray-200",strokeWidth:"1px"},Pr={fontSize:"12px",fill:"color-gray-500",fontWeight:"500"},hm={rx:"4px",ry:"4px",cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{filter:"brightness(1.1)"}},fm={strokeWidth:"3px",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",transition:"stroke-width 0.2s ease"},ym={r:"5px",strokeWidth:"2.5px",stroke:"color-white",cursor:"pointer",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{r:"7px"}},fr={strokeWidth:"2px",stroke:"color-white",cursor:"pointer",transition:"all 0.3s ease",_hover:{transform:"scale(1.02)"}},nn={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-white-800",borderRadius:"4px",zIndex:10,padding:"24px",textAlign:"center"},xm={...nn},bm={...nn,backgroundColor:"rgba(254, 242, 242, 0.8)",color:"color-red-600"},km={...nn,backgroundColor:"rgba(249, 250, 251, 0.8)",color:"color-gray-500"},Cm=({data:e,dataPoints:o,animated:t=!0,animationDuration:n=500,showTooltips:a=!0})=>{const[i,s]=p.useState(t?0:1),[c,d]=p.useState({visible:!1,x:0,y:0,content:null}),u=p.useRef(null),m=p.useRef(null);p.useEffect(()=>{if(!t){s(1);return}const S=Date.now(),w=()=>{const j=Date.now()-S,x=Math.min(j/n,1);s(x),x<1&&(u.current=requestAnimationFrame(w))};return u.current=requestAnimationFrame(w),()=>{u.current&&cancelAnimationFrame(u.current)}},[t,n]);const[g,h]=p.useState(new Set),f=p.useCallback(S=>{h(w=>{const j=new Set(w);return j.has(S)?j.delete(S):j.add(S),j})},[]),y=p.useCallback(()=>e?{...e,series:e.series.map((S,w)=>({...S,color:S.color||zo[w%zo.length],hidden:g.has(S.name)}))}:o?o.map((S,w)=>({...S,color:S.color||zo[w%zo.length],hidden:g.has(S.label)})):null,[e,o,g]),k=p.useCallback((S,w,j)=>{a&&d({visible:!0,x:S,y:w,content:j})},[a]),b=p.useCallback(()=>{d(S=>({...S,visible:!1}))},[]),C=p.useCallback(()=>{if(!m.current)return{width:0,height:0};const{width:S,height:w}=m.current.getBoundingClientRect();return{width:S,height:w}},[]);return{animationProgress:i,tooltip:c,containerRef:m,processedData:y,showTooltip:k,hideTooltip:b,getChartDimensions:C,toggleSeries:f}},Sm=({data:e,width:o,height:t,animationProgress:n,showGrid:a=!0,onBarClick:i,showTooltip:s,hideTooltip:c,views:d})=>{const{getColor:u}=l.useTheme(),m={top:20,right:20,bottom:40,left:50},g=o-m.left-m.right,h=t-m.top-m.bottom,f=p.useMemo(()=>{let x=0;return e.series.forEach(v=>{v.data.forEach(T=>{x=Math.max(x,T)})}),x},[e]),y=e.labels.length,k=e.series.length,b=g/y,C=b*.8/k,S=b*.2/(k+1),w=f||10,j=p.useMemo(()=>{const v=[];for(let T=0;T<=5;T++){const F=w/5*T;v.push(F)}return v},[f]);return r.jsxs("svg",{width:o,height:t,children:[r.jsx("defs",{children:e.series.map((x,v)=>{const T=x.color?u(x.color):"black";return r.jsxs("linearGradient",{id:`bar-gradient-${v}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:T,stopOpacity:1}),r.jsx("stop",{offset:"100%",stopColor:T,stopOpacity:.7})]},`bar-gradient-${v}`)})}),r.jsx("line",{x1:m.left,y1:t-m.bottom,x2:o-m.right,y2:t-m.bottom,...Hr,...d==null?void 0:d.axis}),r.jsx("line",{x1:m.left,y1:m.top,x2:m.left,y2:t-m.bottom,...Hr,...d==null?void 0:d.axis}),e.labels.map((x,v)=>{const T=m.left+(v+.5)*b,F=t-m.bottom+20;return r.jsx("text",{x:T,y:F,textAnchor:"middle",...Pr,...d==null?void 0:d.axisLabel,children:x},`x-label-${v}`)}),j.map((x,v)=>{const T=t-m.bottom-x/w*h;return r.jsxs(p.Fragment,{children:[r.jsx("text",{x:m.left-10,y:T,textAnchor:"end",dominantBaseline:"middle",...Pr,...d==null?void 0:d.axisLabel,children:x.toFixed(0)}),a&&r.jsx("line",{x1:m.left,y1:T,x2:o-m.right,y2:T,...gl,...d==null?void 0:d.grid})]},`y-tick-${v}`)}),e.series.map((x,v)=>x.hidden?null:r.jsx(p.Fragment,{children:x.data.map((T,F)=>{const M=T/w*h*n,E=m.left+F*b+S*(v+1)+C*v,I=t-m.bottom-M,V=e.labels[F],H=e.series.reduce((D,L)=>{const O=L.data[F];return D+(typeof O=="number"?O:0)},0),z=H>0?(T/H*100).toFixed(1):null,P=x.color?u(x.color):"black",R=D=>{const L=r.jsxs(l.View,{display:"flex",flexDirection:"column",minWidth:"180px",children:[r.jsxs(l.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(l.Text,{fontWeight:"semibold",children:x.name}),r.jsx(l.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:P})]}),r.jsx(l.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:V}),r.jsxs(l.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(l.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Value"}),r.jsx(l.Text,{fontWeight:"medium",children:T.toLocaleString()})]}),z!==null&&r.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Share"}),r.jsx(l.Text,{fontWeight:"medium",children:`${z}%`})]}),r.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(l.Text,{fontWeight:"medium",children:H.toLocaleString()})]})]})]}),O=D.currentTarget.getBoundingClientRect(),$=O.left+O.width/2,_=O.top;s($,_,L)},W=()=>{i&&i(x.name,F)};return r.jsx("rect",{x:E,y:I,width:C,height:M,fill:`url(#bar-gradient-${v})`,onMouseEnter:R,onMouseMove:R,onMouseLeave:c,onClick:W,...hm,...d==null?void 0:d.bar},`bar-${v}-${F}`)})},`series-${v}`))]})},jm=({data:e,width:o,height:t,animationProgress:n,showGrid:a=!0,onPointClick:i,showTooltip:s,hideTooltip:c,views:d})=>{const{getColor:u}=l.useTheme(),m={top:20,right:20,bottom:40,left:40},g=o-m.left-m.right,h=t-m.top-m.bottom,f=p.useMemo(()=>{let S=0;return e.series.forEach(w=>{w.data.forEach(j=>{S=Math.max(S,j)})}),S},[e]),y=f||10,k=p.useMemo(()=>{const w=[];for(let j=0;j<=5;j++){const x=y/5*j;w.push(x)}return w},[f]),b=S=>{if(S.length<2)return"";const w=S.map((x,v)=>({x:m.left+v/(e.labels.length-1)*g,y:t-m.bottom-x/y*h*n}));let j=`M ${w[0].x},${w[0].y}`;for(let x=0;x<w.length-1;x++){const v=w[x===0?x:x-1],T=w[x],F=w[x+1],M=w[x+2===w.length?x+1:x+2],E=T.x+(F.x-v.x)/6,I=T.y+(F.y-v.y)/6,V=F.x-(M.x-T.x)/6,H=F.y-(M.y-T.y)/6;j+=` C ${E},${I} ${V},${H} ${F.x},${F.y}`}return j},C=S=>{if(S.length<2)return"";const w=b(S),j=m.left,x=m.left+g,v=t-m.bottom;return`${w} L ${x},${v} L ${j},${v} Z`};return r.jsxs("svg",{width:o,height:t,children:[r.jsx("defs",{children:e.series.map((S,w)=>{const j=S.color?u(S.color):"black";return r.jsxs("linearGradient",{id:`gradient-${w}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:j,stopOpacity:.3}),r.jsx("stop",{offset:"100%",stopColor:j,stopOpacity:0})]},`gradient-${w}`)})}),r.jsx("line",{x1:m.left,y1:t-m.bottom,x2:o-m.right,y2:t-m.bottom,...Hr,...d==null?void 0:d.axis}),r.jsx("line",{x1:m.left,y1:m.top,x2:m.left,y2:t-m.bottom,...Hr,...d==null?void 0:d.axis}),e.labels.map((S,w)=>{const j=m.left+w/(e.labels.length-1)*g,x=t-m.bottom+20;return r.jsx("text",{x:j,y:x,textAnchor:"middle",...Pr,...d==null?void 0:d.axisLabel,children:S},`x-label-${w}`)}),k.map((S,w)=>{const j=t-m.bottom-S/y*h;return r.jsxs(p.Fragment,{children:[r.jsx("text",{x:m.left-10,y:j,textAnchor:"end",dominantBaseline:"middle",...Pr,...d==null?void 0:d.axisLabel,children:S.toFixed(0)}),a&&r.jsx("line",{x1:m.left,y1:j,x2:o-m.right,y2:j,...gl,...d==null?void 0:d.grid})]},`y-tick-${w}`)}),e.series.map((S,w)=>{if(S.hidden)return null;const j=S.color?u(S.color):"black";return r.jsxs(p.Fragment,{children:[r.jsx("path",{d:C(S.data),fill:`url(#gradient-${w})`,...d==null?void 0:d.area}),r.jsx("path",{d:b(S.data),stroke:j,...fm,...d==null?void 0:d.line}),S.data.map((x,v)=>{const T=m.left+v/(e.labels.length-1)*g,F=t-m.bottom-x/y*h*n,M=e.labels[v],E=e.series.reduce((W,D)=>{const L=D.data[v];return W+(typeof L=="number"?L:0)},0),I=E>0?(x/E*100).toFixed(1):null,V=v>0&&typeof S.data[v-1]=="number"?S.data[v-1]:null,H=typeof V=="number"?x-V:null,z=typeof H=="number"?`${H>=0?"+":""}${H.toLocaleString()}`:null,P=W=>{const D=r.jsxs(l.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(l.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(l.Text,{fontWeight:"semibold",children:S.name}),r.jsx(l.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:j})]}),r.jsx(l.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:M}),r.jsxs(l.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(l.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Value"}),r.jsx(l.Text,{fontWeight:"medium",children:x.toLocaleString()})]}),z!==null&&r.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Change"}),r.jsx(l.Text,{fontWeight:"medium",children:z})]}),I!==null&&r.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Share"}),r.jsx(l.Text,{fontWeight:"medium",children:`${I}%`})]}),r.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(l.Text,{fontWeight:"medium",children:E.toLocaleString()})]})]})]}),L=W.currentTarget.getBoundingClientRect(),O=L.left+L.width/2,$=L.top+L.height/2;s(O,$,D)},R=()=>{i&&i(S.name,v)};return r.jsx("circle",{cx:T,cy:F,fill:j,onMouseEnter:P,onMouseMove:P,onMouseLeave:c,onClick:R,...ym,...d==null?void 0:d.point},`point-${w}-${v}`)})]},`series-${w}`)})]})},wm=({dataPoints:e,width:o,height:t,animationProgress:n,isDonut:a=!1,onSliceClick:i,showTooltip:s,hideTooltip:c,views:d})=>{const{getColor:u}=l.useTheme(),{ref:m,relation:g}=l.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),h=p.useRef(null);p.useEffect(()=>{h.current&&m&&(m.current=h.current)},[h,m]);const y=Math.min(o,t)/2*.8,k=o/2,b=t/2,C=a?y*.6:0,S=p.useMemo(()=>e.filter(x=>!x.hidden),[e]),w=p.useMemo(()=>S.reduce((x,v)=>x+v.value,0),[S]),j=p.useMemo(()=>{if(w===0)return[{path:a?[`M ${k} ${b-y}`,`A ${y} ${y} 0 1 1 ${k} ${b+y}`,`A ${y} ${y} 0 1 1 ${k} ${b-y}`,`M ${k} ${b-C}`,`A ${C} ${C} 0 1 0 ${k} ${b+C}`,`A ${C} ${C} 0 1 0 ${k} ${b-C}`,"Z"].join(" "):[`M ${k} ${b}`,`M ${k} ${b-y}`,`A ${y} ${y} 0 1 1 ${k} ${b+y}`,`A ${y} ${y} 0 1 1 ${k} ${b-y}`,"Z"].join(" "),color:"#E2E8F0",label:"Total",value:0,percentage:"0%",labelX:k,labelY:b,startAngle:0,endAngle:Math.PI*2,index:-1}];const x=[];let v=-Math.PI/2;for(let T=0;T<S.length;T++){const M=S[T].value/w,E=M*2*Math.PI*n,V=Math.max(0,E-.02),H=v+V,z=k+Math.cos(v)*y,P=b+Math.sin(v)*y,R=k+Math.cos(H)*y,W=b+Math.sin(H)*y,D=k+Math.cos(v)*C,L=b+Math.sin(v)*C,O=k+Math.cos(H)*C,$=b+Math.sin(H)*C,_=V>Math.PI?1:0;let B;a?B=[`M ${z} ${P}`,`A ${y} ${y} 0 ${_} 1 ${R} ${W}`,`L ${O} ${$}`,`A ${C} ${C} 0 ${_} 0 ${D} ${L}`,"Z"].join(" "):B=[`M ${k} ${b}`,`L ${z} ${P}`,`A ${y} ${y} 0 ${_} 1 ${R} ${W}`,"Z"].join(" ");const G=v+V/2,N=a?(y+C)/2:y*.7,A=k+Math.cos(G)*N,Y=b+Math.sin(G)*N,J=`${(M*100).toFixed(1)}%`,K=S[T].color||zo[T%zo.length],X=u(K);x.push({path:B,color:X,label:S[T].label,value:S[T].value,percentage:J,labelX:A,labelY:Y,startAngle:v,endAngle:H,index:T,originalIndex:e.findIndex(ee=>ee.label===S[T].label)}),v=H}return x},[S,w,y,k,b,C,n,a,e]);return r.jsxs("svg",{ref:h,width:o,height:t,style:{overflow:"visible"},children:[a&&r.jsxs("g",{pointerEvents:"none",children:[r.jsx("circle",{cx:k,cy:b,r:C,fill:"white"}),r.jsx("text",{x:k,y:b-8,textAnchor:"middle",dominantBaseline:"middle",fontSize:"14px",fontWeight:"500",fill:"color-gray-500",children:"Total"}),r.jsx("text",{x:k,y:b+12,textAnchor:"middle",dominantBaseline:"middle",fontSize:"20px",fontWeight:"800",fill:"color-gray-900",children:w.toLocaleString()})]}),j.map((x,v)=>{const T=E=>{const I=w>0?x.value/w*100:0,V=w>0?Math.max(0,100-I):null,H=r.jsxs(l.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(l.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(l.Text,{fontWeight:"semibold",children:x.label}),r.jsx(l.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:x.color})]}),r.jsxs(l.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:["Slice ",x.index+1," of ",S.length]}),r.jsxs(l.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(l.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Value"}),r.jsx(l.Text,{fontWeight:"medium",children:x.value.toLocaleString()})]}),r.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Share"}),r.jsx(l.Text,{fontWeight:"medium",children:x.percentage})]}),r.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Total"}),r.jsx(l.Text,{fontWeight:"medium",children:w.toLocaleString()})]}),V!==null&&r.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(l.Text,{color:"color-gray-500",children:"Remaining"}),r.jsx(l.Text,{fontWeight:"medium",children:`${V.toFixed(1)}%`})]})]})]});let z=E.clientX,P=E.clientY;if(h.current){const R=h.current.getBoundingClientRect();z=R.left+x.labelX,P=R.top+x.labelY}s(z,P,H)},F=()=>{x.index!==-1&&i&&i(e[x.index],x.index)},M=x.index===-1;return r.jsxs("g",{children:[r.jsx("path",{d:x.path,fill:x.color,onMouseEnter:M?void 0:T,onMouseMove:M?void 0:T,onMouseLeave:M?void 0:c,onClick:F,...fr,style:{...fr==null?void 0:fr.style,cursor:M?"default":"pointer"},...d==null?void 0:d.pie}),!M&&x.endAngle-x.startAngle>.25&&r.jsx("text",{x:x.labelX,y:x.labelY,textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:"11px",fontWeight:"800",pointerEvents:"none",paintOrder:"stroke",stroke:"rgba(0,0,0,0.2)",strokeWidth:"2px",children:x.percentage})]},`slice-${v}`)})]})},vm=({visible:e,x:o,y:t,content:n,maxDistance:a=100,views:i})=>{const s=p.useRef(null),[c,d]=p.useState({left:0,top:0});return p.useEffect(()=>{if(!e||!s.current||typeof window>"u"||typeof s.current.getBoundingClientRect!="function")return;const m=s.current.getBoundingClientRect(),g=m.width||200,h=m.height||100,f=20,y=16;let k=o-g/2,b=t-h-f;b<y&&(b=t+f),k+g>window.innerWidth-y?k=window.innerWidth-g-y:k<y&&(k=y),b=Math.max(y,Math.min(b,window.innerHeight-h-y)),d({left:k,top:b})},[e,o,t]),e?r.jsx(l.View,{ref:s,position:"fixed",left:`${c.left}px`,top:`${c.top}px`,...hr,...i==null?void 0:i.tooltip,style:{...hr==null?void 0:hr.style,pointerEvents:"none",transition:"all 0.1s ease-out"},children:n}):null},Tm=({type:e,data:o,dataPoints:t,title:n,showLegend:a=!0,legendPosition:i="bottom",showGrid:s=!0,showTooltips:c=!0,animated:d=!0,animationDuration:u=500,responsive:m=!0,aspectRatio:g=16/9,width:h=200,height:f=200,views:y,onDataPointClick:k,onSeriesClick:b,isLoading:C=!1,error:S,noData:w,loadingIndicator:j,errorIndicator:x,noDataIndicator:v,"aria-label":T,themeMode:F,...M})=>{const{animationProgress:E,tooltip:I,containerRef:V,processedData:H,showTooltip:z,hideTooltip:P,getChartDimensions:R,toggleSeries:W}=Cm({data:o,dataPoints:t,animated:d,animationDuration:u,showTooltips:c}),D=H(),{width:L,height:O}=R(),$=h||L,_=f||(m?L/g:O),B=()=>{if(!a||!D)return null;let X=[];return e==="pie"||e==="donut"?Array.isArray(D)&&(X=D):D&&D.series&&(X=D.series),!X||X.length===0?null:r.jsx(l.Horizontal,{flexWrap:"wrap",justifyContent:"flex-start",marginTop:i==="bottom"?"16px":0,marginBottom:i==="top"?"16px":0,...um,...y==null?void 0:y.legend,children:X.map((ee,te)=>{const ae=ee.hidden,oe=ee.name||ee.label;return r.jsxs(l.View,{...pm,onClick:()=>W(oe),opacity:ae?.4:1,...y==null?void 0:y.legendItem,children:[r.jsx(l.View,{backgroundColor:ee.color,...mm,opacity:ae?.3:1}),r.jsx(l.Text,{...gm,textDecoration:ae?"line-through":"none",children:oe})]},`legend-${te}`)})})},G=()=>{if(!D)return null;switch(e){case"bar":return r.jsx(Sm,{data:D,width:$,height:_,animationProgress:E,showGrid:s,onBarClick:b,showTooltip:z,hideTooltip:P,views:y});case"line":case"area":return r.jsx(jm,{data:D,width:$,height:_,animationProgress:E,showGrid:s,onPointClick:b,showTooltip:z,hideTooltip:P,views:y});case"pie":case"donut":return r.jsx(wm,{dataPoints:D,width:$,height:_,animationProgress:E,isDonut:e==="donut",onSliceClick:k,showTooltip:z,hideTooltip:P,views:y});default:return null}},N=()=>C?r.jsx(l.View,{...xm,...y==null?void 0:y.loadingOverlay,children:j||r.jsx(l.Center,{children:r.jsx(ro,{size:"lg"})})}):null,A=()=>S?r.jsx(l.View,{...bm,...y==null?void 0:y.errorOverlay,children:x||r.jsx(l.Text,{fontWeight:"medium",children:typeof S=="string"?S:"An error occurred"})}):null,Y=()=>w?r.jsx(l.View,{...km,...y==null?void 0:y.noDataOverlay,children:v||r.jsx(l.Text,{children:typeof w=="string"?w:"No data available"})}):null,J=T??(typeof n=="string"?n:"Chart"),K=!S&&!C&&!w;return r.jsxs(l.View,{ref:V,role:"region","aria-label":J,"aria-busy":C,...cm,...y==null?void 0:y.container,...M,children:[n&&r.jsx(l.Text,{...dm,children:n}),K&&i==="top"&&B(),r.jsxs(l.View,{flex:1,width:"100%",position:"relative",...y==null?void 0:y.chart,children:[K&&G(),N(),A(),Y(),r.jsx(vm,{visible:c&&I.visible,x:I.x,y:I.y,content:I.content,maxDistance:100,views:y})]}),K&&i==="bottom"&&B()]})},Im=e=>r.jsx(Tm,{...e}),Rm=Im,Fm=(e=365)=>{const[o,t]=p.useState(!1),[n,a]=p.useState(null),i="app-studio-cookie-consent";p.useEffect(()=>{if(typeof localStorage>"u")return;const u=localStorage.getItem(i);a(u!==null?u==="true":!1)},[]);const s=u=>{if(typeof localStorage<"u"){localStorage.setItem(i,String(u));const m=new Date;m.setDate(m.getDate()+e),localStorage.setItem(`${i}-expires`,m.toISOString())}a(u)};return{isHovered:o,setIsHovered:t,hasConsent:n,acceptCookies:()=>{s(!0)},resetConsent:()=>{typeof localStorage<"u"&&(localStorage.removeItem(i),localStorage.removeItem(`${i}-expires`)),a(!1)}}},zm=e=>({default:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-gray-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-gray-600",borderColor:"color-gray-300",hoverBackgroundColor:"color-gray-100"}},info:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-blue-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-blue-800",borderColor:"color-blue-300",hoverBackgroundColor:"color-blue-100"}},primary:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-blue-700"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-blue-700",borderColor:"color-blue-300",hoverBackgroundColor:"color-blue-100"}}}),Mm=({title:e="Nous utilisons des cookies",description:o="Ce site utilise des cookies pour améliorer votre expérience. En continuant à naviguer sur ce site, vous acceptez notre utilisation des cookies conformément à notre politique de confidentialité.",acceptButtonText:t="Accepter",customizeButtonText:n="Personnaliser",position:a="bottom",variant:i="default",onAccept:s,onCustomize:c,views:d,showCustomizeButton:u=!0,cookieExpiration:m=365,themeMode:g,...h})=>{const{themeMode:f}=l.useTheme(),{hasConsent:y,acceptCookies:k}=Fm(m),C=zm()[i];if(y)return null;const S=()=>{k(),s&&s()},w=()=>{c&&c()};return r.jsx(l.View,{style:{position:"fixed",left:16,right:16,zIndex:1e3,...a==="bottom"?{bottom:16}:{top:16}},padding:16,borderWidth:"1px",borderStyle:"solid",borderRadius:8,maxWidth:"800px",marginLeft:"auto",marginRight:"auto",transition:"opacity 0.3s ease, transform 0.3s ease",...C.container,...d==null?void 0:d.container,...h,children:r.jsxs(l.Vertical,{gap:12,maxWidth:1200,marginLeft:"auto",marginRight:"auto",children:[e&&r.jsx(l.Text,{fontWeight:"bold",fontSize:18,color:"color-black",...d==null?void 0:d.title,children:e}),o&&r.jsx(l.Text,{fontSize:14,color:"color-black",...d==null?void 0:d.description,children:o}),r.jsxs(l.Horizontal,{gap:12,justifyContent:"flex-end",marginTop:8,...d==null?void 0:d.buttonGroup,children:[u&&r.jsx(ce,{variant:"outline",onClick:w,size:"sm",...d==null?void 0:d.customizeButton,children:n}),r.jsx(ce,{variant:"filled",onClick:S,size:"sm",...d==null?void 0:d.acceptButton,children:t})]})]})})},Wm=e=>r.jsx(Mm,{...e}),Hm=Wm,Pm=e=>{const{size:o,variant:t,onOpenChange:n}=e||{},[a,i]=p.useState(!1),[s,c]=p.useState({x:0,y:0}),[d,u]=p.useState(null),m=p.useRef(null),g=p.useRef(null),h=p.useMemo(()=>Et("contextmenu-content"),[]),f=p.useCallback(k=>{c({x:k.clientX,y:k.clientY}),i(!0),n==null||n(!0)},[n]),y=p.useCallback(()=>{i(!1),u(null),n==null||n(!1)},[n]);return p.useEffect(()=>{const k=S=>{g.current&&!g.current.contains(S.target)&&y()},b=()=>{a&&y()},C=S=>{S.key==="Escape"&&a&&y()};if(!(typeof(document==null?void 0:document.addEventListener)!="function"||typeof(window==null?void 0:window.addEventListener)!="function"))return document.addEventListener("mousedown",k),window.addEventListener("resize",b),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",k),window.removeEventListener("resize",b),document.removeEventListener("keydown",C)}},[a,y]),{isOpen:a,setIsOpen:i,position:s,setPosition:c,activeSubmenuId:d,setActiveSubmenuId:u,size:o,variant:t,triggerRef:m,contentRef:g,contentId:h,openMenu:f,closeMenu:y}},Vn={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},Vm={default:{backgroundColor:"color-white",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},An={hover:{backgroundColor:"color-gray-100"}},hl=p.createContext({isOpen:!1,setIsOpen:()=>{},position:{x:0,y:0},setPosition:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null},contentRef:{current:null},contentId:"contextmenu-content",closeMenu:()=>{},openMenu:()=>{}}),Am=({children:e,value:o})=>r.jsx(hl.Provider,{value:o,children:e}),Vr=()=>{const e=p.useContext(hl);if(!e)throw new Error("useContextMenuContext must be used within a ContextMenuProvider");return e},fl=({children:e,disableNativeContextMenu:o=!0,asChild:t=!1,isDisabled:n=!1,views:a,...i})=>{const{triggerRef:s,contentId:c,openMenu:d}=Vr(),m={ref:s,onContextMenu:g=>{if(!n)if(o&&g.preventDefault(),d)d(g);else{const{setIsOpen:h,setPosition:f}=Vr();f({x:g.clientX,y:g.clientY}),h(!0)}},"aria-controls":c,"aria-haspopup":"menu","data-disabled":n?"":void 0,...t&&p.isValidElement(e)&&e.props.isDisabled===void 0&&{isDisabled:n},...a==null?void 0:a.container,...i};if(t&&p.isValidElement(e)){const g=p.Children.only(e);return p.cloneElement(g,{...m,...g.props})}return r.jsx(l.View,{...m,children:e})},an=({items:e,children:o,position:t,side:n="right",align:a="start",views:i,style:s,...c})=>{const{isOpen:d,position:u,contentRef:m,contentId:g,variant:h}=Vr(),f=p.useRef(null),y=m||f,{ref:k,relation:b}=l.useElementPosition({}),[C,S]=p.useState({x:0,y:0});if(p.useEffect(()=>{if(d&&y.current){const j=t||u,x=y.current.offsetWidth,v=y.current.offsetHeight,T=window.innerWidth,F=window.innerHeight;let M=j.x,E=j.y;b&&(b.space.horizontal==="left"?M=j.x-x:M=j.x,b.space.vertical==="top"?E=j.y-v:E=j.y),M+x>T&&(M=T-x-8),M<8&&(M=8),E+v>F&&(E=F-v-8),E<8&&(E=8),S({x:M,y:E})}},[d,u,t,n,a,y,b]),!d)return null;const w={position:"fixed",top:`${C.y}px`,left:`${C.x}px`,zIndex:1e3,transformOrigin:"top left"};return r.jsxs(l.View,{id:g||"context-menu",ref:y,role:"menu",tabIndex:-1,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:{...w,...s},...Vm[h],...i==null?void 0:i.menu,...i==null?void 0:i.content,...c,children:[e&&e.map((j,x)=>j.divider?r.jsx(xl,{views:i},`divider-${x}`):r.jsx(yl,{item:j,views:i},j.id)),o]})},yl=({item:e,children:o,onSelect:t,isDisabled:n=!1,views:a,variant:i,shape:s,isLoading:c,loaderProps:d,loaderPosition:u,icon:m,iconPosition:g,isFilled:h,isAuto:f,isIconRounded:y,isHovered:k,shadow:b,ariaLabel:C,animation:S,textColor:w,reversed:j,borderMovingDuration:x,borderMovingGradientColors:v,animatedStrokeAccentColor:T,animatedStrokeTextColor:F,to:M,isExternal:E,config:I,...V})=>{const{activeSubmenuId:H,setActiveSubmenuId:z,size:P,closeMenu:R}=Vr();if(e){const[D,L]=p.useState(!1),O=e.items&&e.items.length>0,$=H===e.id,[_,B]=p.useState({x:0,y:0}),G=e.disabled||n,N=()=>{L(!0),O&&z(e.id)},A=()=>{L(!1)},Y=()=>{G||!O&&e.onClick&&(e.onClick(),R&&R())},{ref:J,relation:K}=l.useElementPosition({});return p.useEffect(()=>{if($&&J.current){const X=J.current.getBoundingClientRect(),ee=window.innerWidth,te=200;let ae=!1;if(K)ae=K.space.horizontal==="left";else{const oe=ee-X.right,ie=X.left;ae=oe<te&&ie>oe}B({x:ae?X.left-te:X.right,y:X.top})}},[$,e.items,K]),r.jsxs(l.View,{ref:J,role:"menuitem",display:"flex",alignItems:"center",cursor:G?"not-allowed":"pointer",opacity:G?.5:1,position:"relative","aria-disabled":G,"data-disabled":G?"":void 0,...Vn[P],_hover:G?{}:An.hover,backgroundColor:D&&!G?"color-gray-100":"transparent",onMouseEnter:N,onMouseLeave:A,onClick:Y,...a==null?void 0:a.item,...V,children:[e.icon&&r.jsx(l.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),r.jsx(l.View,{flexGrow:1,children:e.label}),O&&r.jsx(l.View,{marginLeft:8,...a==null?void 0:a.submenuIndicator,children:r.jsx(de,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),$&&O&&r.jsx(an,{items:e.items||[],position:_,side:"right",align:"start",views:a})]})}const W=D=>{n||(t==null||t(D),R&&R())};return r.jsx(l.View,{role:"menuitem",onClick:W,cursor:n?"not-allowed":"pointer",opacity:n?.5:1,"aria-disabled":n,"data-disabled":n?"":void 0,...Vn[P],_hover:n?{}:An.hover,...a==null?void 0:a.item,...V,children:o})},xl=({views:e,...o})=>r.jsx(l.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.divider,...o}),Em=({views:e,...o})=>r.jsx(l.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.separator,...o}),Dm=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:a=!0,views:i,themeMode:s,onOpenChange:c,...d})=>!o||o.length===0?r.jsx(r.Fragment,{children:e}):r.jsxs(r.Fragment,{children:[r.jsx(fl,{disableNativeContextMenu:a,views:i,...d,children:e}),r.jsx(an,{items:o,views:i})]}),$m=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:a=!0,onOpenChange:i,views:s,...c})=>{const d=Pm({size:t,variant:n,onOpenChange:i}),{isOpen:u,setIsOpen:m,position:g,setPosition:h,activeSubmenuId:f,setActiveSubmenuId:y,triggerRef:k,contentRef:b,contentId:C,openMenu:S,closeMenu:w}=d;return r.jsx(Am,{value:{isOpen:u,setIsOpen:m,position:g,setPosition:h,activeSubmenuId:f,setActiveSubmenuId:y,size:t,variant:n,triggerRef:k,contentRef:b,contentId:C,openMenu:S,closeMenu:w,styles:s},children:r.jsx(Dm,{items:o,size:t,variant:n,disableNativeContextMenu:a,views:s,...c,children:e})})},_o=$m;_o.Trigger=fl;_o.Content=an;_o.Item=yl;_o.Divider=xl;_o.Separator=Em;const Lm=({src:e,color:o,views:t,themeMode:n,...a})=>{const{getColor:i,themeMode:s}=l.useTheme(),c=o?{fill:i(o,{themeMode:s}),stroke:i(o,{themeMode:s})}:{};return r.jsx(l.View,{display:"flex",alignItems:"center",justifyContent:"center",...a,...t==null?void 0:t.container,children:r.jsx(l.Image,{...c,content:'url("'+e+'")',width:"100%",height:"100%",...t==null?void 0:t.image})})},_m=({path:e,...o})=>r.jsx(l.Image,{src:e,...o}),En=(e,o)=>o?Array.isArray(e)?e:e===""?[]:[e]:Array.isArray(e)?e[0]??"":e,bl=({placeholder:e,isMulti:o,options:t,value:n,defaultValue:a,id:i=`select-${Math.random().toString(36).substr(2,9)}`})=>{const s=n!==void 0,[c,d]=p.useState(!1),[u,m]=p.useState(!1),[g,h]=p.useState(()=>a!==void 0?En(a,o):o?[]:e?"":Array.isArray(t)&&t.length>0?t[0].value:""),f=s?En(n,o):g,y=p.useCallback(w=>{s||h(w)},[s]),[k,b]=p.useState(0),[C,S]=p.useState(!0);return{id:i,value:f,setValue:y,hide:C,setHide:S,isHovered:c,setIsHovered:d,isFocused:u,setIsFocused:m,highlightedIndex:k,setHighlightedIndex:b}},wt=({children:e,views:o={helperText:{}},...t})=>r.jsx(l.Text,{fontSize:"11px",fontWeight:"400",letterSpacing:"-0.01em",lineHeight:"16px",marginVertical:0,marginHorizontal:0,color:"color-gray-500",transition:"color 0.2s ease, opacity 0.2s ease",...o.helperText,...t,children:e}),Xe=p.forwardRef(({children:e,helperText:o,error:t=!1,views:n,...a},i)=>r.jsxs(l.Vertical,{ref:i,gap:4,position:"relative",width:"100%",boxSizing:"border-box",marginVertical:0,...a,...n==null?void 0:n.container,children:[e,!t&&o&&r.jsx(wt,{marginTop:0,...n==null?void 0:n.helperText,children:o}),t&&r.jsx(l.Text,{fontSize:"11px",lineHeight:"16px",marginTop:0,marginHorizontal:0,fontWeight:"500",color:"color-red-500",transition:"color 0.2s ease, opacity 0.2s ease",...n==null?void 0:n.error,children:t})]}));Xe.displayName="FieldContainer";const Bm={default:{borderRadius:"8px"},square:{borderRadius:0},rounded:{borderRadius:"8px"},pill:{borderRadius:"9999px"}},Om={xs:"10px",sm:"11px",md:"11px",lg:"12px",xl:"12px"},Nm={outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"transparent",color:"inherit",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",_hover:{borderColor:"color-gray-300"},_focus:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"},_focusVisible:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"}},default:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"8px",backgroundColor:"transparent",color:"inherit",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",_hover:{borderColor:"color-gray-300"},_focus:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"},_focusVisible:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"}},none:{border:"none",style:{backgroundColor:"transparent"},color:"inherit",transition:"background-color 0.2s ease"}},qm={xs:{minHeight:24,paddingVertical:4,paddingHorizontal:10},sm:{minHeight:32,paddingVertical:7,paddingHorizontal:10},md:{minHeight:40,paddingVertical:9,paddingHorizontal:12},lg:{minHeight:48,paddingVertical:11,paddingHorizontal:14},xl:{minHeight:56,paddingVertical:13,paddingHorizontal:16}},Um=e=>{const{minHeight:o,paddingVertical:t,paddingHorizontal:n}=qm[e];return{minHeight:`${o}px`,paddingTop:`${t}px`,paddingBottom:`${t}px`,paddingLeft:`${n}px`,paddingRight:`${n}px`}},no=({label:e,shadow:o,children:t,value:n,size:a="md",shape:i="default",variant:s="default",error:c=!1,showLabel:d=!1,isFocused:u=!1,isHovered:m=!1,isDisabled:g=!1,isReadOnly:h=!1,views:f={pickerBox:{}},...y})=>{const{themeMode:k}=l.useTheme(),b=k==="dark",S=c?"color-red-500":(m||u)&&!g?"theme-primary":"color-gray-200";return r.jsx(l.Horizontal,{gap:8,width:"100%",boxSizing:"border-box",display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-start",borderStyle:"solid",borderColor:S,backgroundColor:b?"color-gray-900":"color-white",fontSize:l.Typography.fontSizes[a],cursor:g?"not-allowed":h?"auto":"text",opacity:g?.7:1,transition:"border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...Um(a),...typeof o=="object"&&o!==null?o:{},...Bm[i],...Nm[s],...f==null?void 0:f.container,...y,children:t})},ln=({children:e,...o})=>r.jsx(l.Horizontal,{gap:10,right:10,zIndex:500,flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-end",...o,children:e}),Gm={h1:{fontSize:96,letterSpacing:-1.5},h2:{fontSize:60,letterSpacing:-.5},h3:{fontSize:48,letterSpacing:0},h4:{fontSize:34,letterSpacing:.25},h5:{fontSize:24,letterSpacing:0},h6:{fontSize:20,letterSpacing:.15}},Ym=({children:e,heading:o,isItalic:t=!1,isUnderlined:n=!1,isStriked:a=!1,weight:i="normal",size:s="sm",dropDown:c,error:d,isDisabled:u,helperText:m,views:g,...h})=>{const f=o?Gm[o]:{};return r.jsx(l.Element,{as:"label",width:"100%",fontSize:s,fontStyle:t?"italic":"normal",fontWeight:l.Typography.fontWeights[i],textDecoration:a?"line-through":n?"underline":"none",...f,...h,children:e})},Km=e=>r.jsx(Ym,{...e}),sr=Km,go=({children:e,size:o="md",error:t=!1,color:n="theme-primary",views:a={label:{}},helperText:i,...s})=>r.jsx(sr,{position:"static",fontSize:Om[o],letterSpacing:"-0.01em",whiteSpace:"nowrap",fontWeight:500,opacity:t?1:.72,color:t?"color-red-500":"inherit",transition:"color 0.2s ease",...a.label,...s,children:e}),Bo=({children:e,...o})=>r.jsx(l.Vertical,{display:"flex",flexDirection:"column",gap:4,flex:1,width:"100%",maxWidth:"100%",boxSizing:"border-box",...o,children:e}),kl={xs:12,sm:14,md:16,lg:18,xl:20},Xm={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)"},Jm={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"}},Qm={padding:"10px 12px",cursor:"pointer",borderRadius:8,margin:"2px 4px",transition:"all 0.15s ease-in-out"},yr={default:{},highlighted:{backgroundColor:"color-gray-100"},selected:{backgroundColor:"color-gray-100"},selectedHighlighted:{backgroundColor:"color-gray-200"}},Dn={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},Zm={padding:"4px 8px",borderRadius:8,backgroundColor:"color-gray-100",fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},e0={scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.15) transparent"},o0=e=>{if(!e)return{};const{container:o,content:t,...n}=e;return n},r0=({isHovered:e,setIsHovered:o=()=>{},option:t,size:n="md",callback:a=()=>{},style:i,isSelected:s=!1,...c})=>{const d=(g,h)=>{g.stopPropagation(),g.preventDefault(),typeof a=="function"&&a(h)},u=()=>o(!e),m=()=>s&&e?yr.selectedHighlighted:s?yr.selected:e?yr.highlighted:yr.default;return r.jsxs(l.Element,{as:"li",role:"option","aria-selected":s,display:"flex",alignItems:"center",justifyContent:"space-between",listStyleType:"none",...Qm,...m(),onMouseEnter:u,onMouseLeave:u,onClick:g=>d(g,t.value),...c,children:[r.jsx(l.Text,{fontSize:l.Typography.fontSizes[n],fontWeight:s?"500":"400",lineHeight:"14px",color:s?"color-gray-900":"color-gray-700",...i,children:t.label}),s&&r.jsx(l.Element,{as:"span",color:"theme-primary",fontSize:"14px",marginLeft:8,display:"flex",alignItems:"center",children:"✓"})]})},t0=({size:e="md",views:o={field:{},text:{}},value:t,isDisabled:n,placeholder:a,removeOption:i=()=>{},options:s})=>{const c=(o==null?void 0:o.field)||{},d=(o==null?void 0:o.text)||{},u=Array.isArray(t)&&t.length>0,m={margin:0,width:"95%",height:"100%",border:"none",paddingVertical:0,paddingHorizontal:0,fontSize:l.Typography.fontSizes[e],fontWeight:"400",letterSpacing:"-0.01em",color:n?"color-gray-400":"color-gray-900",cursor:n?"not-allowed":"pointer",transition:"all 0.2s ease-in-out",...u?{}:{maxLines:1,minWidth:0},...c,...d,style:{backgroundColor:"transparent",...c.style,...d.style}},g=s.length>0&&s.find(h=>h.value===t);return r.jsx(l.Text,{...m,children:(t===""||Array.isArray(t)&&t.length===0)&&a?a:r.jsx(r.Fragment,{children:typeof t=="string"?(g&&g.label)??t:Array.isArray(t)&&t.length>0?r.jsx(l.Horizontal,{gap:6,children:t.map(h=>r.jsx(l0,{option:h,removeOption:i},h))}):r.jsx("span",{children:t})})})},n0=({id:e,name:o,value:t,onChange:n,isMulti:a=!1,isDisabled:i=!1,isReadOnly:s=!1,options:c=[],defaultValue:d,...u})=>{const m=g=>{n&&n(a?Array.from(g.target.selectedOptions,h=>h.value):g.target.value)};return r.jsx(l.Element,{id:e,name:o,as:"select",opacity:0,width:1,height:1,overflow:"hidden",position:"absolute",pointerEvents:"none",tabIndex:-1,"aria-hidden":"true",value:t,disabled:i,readOnly:s,onChange:m,multiple:a,...u,children:c.length>0&&c.map(g=>r.jsx("option",{value:g.value,children:g.label},g.value))})},a0=({size:e,views:o={},options:t,callback:n=()=>{},highlightedIndex:a,setHighlightedIndex:i=()=>{},selectedValue:s})=>{const c=u=>n(u),d=u=>Array.isArray(s)?s.includes(u):s===u;return r.jsx(l.Element,{as:"ul",role:"listbox",display:"flex",flexDirection:"column",margin:0,padding:"4px",...Xm,style:e0,...o==null?void 0:o.dropDown,children:t&&t.length>0&&t.map((u,m)=>r.jsx(r0,{size:e,style:o.text,option:u,callback:c,isSelected:d(u.value),isHovered:m===a,setIsHovered:()=>{},onMouseEnter:()=>i(m)},u.value))})},l0=({option:e,size:o="md",removeOption:t=()=>{},...n})=>{const a=()=>t(e);return r.jsxs(l.Horizontal,{gap:6,alignItems:"center",onClick:i=>i.stopPropagation(),...Zm,_hover:{backgroundColor:"color-gray-200"},...n,children:[r.jsx(l.Text,{fontSize:l.Typography.fontSizes[o],fontWeight:"500",color:"color-gray-700",children:e}),r.jsx(ze,{role:"close-button",color:"color-gray-500",widthHeight:kl[o],onClick:a,cursor:"pointer",transition:"all 0.2s ease-in-out",_hover:{color:"color-gray-700"}})]})},Cl=({id:e,name:o,label:t,value:n,placeholder:a,helperText:i,hide:s=!1,error:c=!1,isMulti:d=!1,isFocused:u=!1,isHovered:m=!1,isDisabled:g=!1,isReadOnly:h=!1,options:f=[],shadow:y={},size:k="md",shape:b="default",variant:C="default",views:S={text:{},icon:{},dropDown:{},selectBox:{},label:{},helperText:{}},onChange:w=()=>{},setHide:j=()=>{},setValue:x=()=>{},setIsHovered:v=()=>{},setIsFocused:T=()=>{},setHighlightedIndex:F,highlightedIndex:M,isScrollable:E,"aria-label":I,...V})=>{const{ref:H,relation:z,updateRelation:P}=l.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),R=p.useRef(null),W=()=>{var J;if(!H.current)return{};const N=H.current.getBoundingClientRect(),A={position:"fixed",left:N.left,width:N.width,zIndex:1e4};return((J=z==null?void 0:z.space)==null?void 0:J.vertical)==="top"?{...A,bottom:window.innerHeight-N.top+8}:{...A,top:N.bottom+8}};p.useEffect(()=>{const N=()=>j(!0);return document.addEventListener("closeAllSelects",N),()=>document.removeEventListener("closeAllSelects",N)},[j]),p.useEffect(()=>{const N=A=>{!A.target.closest(`#${e}`)&&!s&&j(!0)};return document.addEventListener("click",N),()=>{document.removeEventListener("click",N)}},[e,s,j]);const D=()=>v(!m),L=()=>T(!0),O=N=>{document.dispatchEvent(new Event("closeAllSelects")),N&&N.stopPropagation&&N.stopPropagation();const A=!s;j(A),T(!A)},$=p.useCallback(N=>{if(j(!0),document.dispatchEvent(new Event("closeAllSelects")),d&&Array.isArray(n)){if(!n.includes(N)){const A=[...n,N];x(A),w&&w(A)}}else x(N),w&&w(N);T(!0)},[d,n,j,x,w,T]),_=N=>{if(Array.isArray(n)&&n.includes(N)){const A=n.filter(Y=>Y!==N);x(A),w&&w(A)}},B=!!t,G=o0(S);return r.jsx(Xe,{ref:H,position:"relative",width:"100%",display:"inline-block",id:e,role:"combobox","aria-haspopup":"listbox","aria-expanded":!s,"aria-label":I??(typeof t=="string"?t:void 0),"aria-disabled":g||void 0,tabIndex:g||h?-1:0,helperText:i,error:c,views:G,onKeyDown:N=>{if(!(g||h)){if(N.key==="Enter"||N.key===" "||N.key==="ArrowDown"){N.preventDefault(),s&&(document.dispatchEvent(new Event("closeAllSelects")),j(!1),T(!0));return}N.key==="Escape"&&!s&&(N.preventDefault(),j(!0))}},onClick:N=>{N.stopPropagation(),g||h||O(N)},children:r.jsxs(no,{label:t,size:k,error:c,shape:b,views:S,shadow:y,variant:C,value:n,color:"theme-primary",isHovered:m,isDisabled:g,isReadOnly:h,isFocused:u,showLabel:B,onMouseEnter:D,onMouseLeave:D,position:"relative",...S==null?void 0:S.content,children:[r.jsxs(Bo,{children:[B&&r.jsx(go,{htmlFor:e,color:"theme-primary",error:c,...S==null?void 0:S.label,children:t}),r.jsx(n0,{id:e,name:o,options:f,onChange:w,value:n,isDisabled:g,isReadOnly:h,isMulti:d,onFocus:L,...V}),r.jsx(t0,{options:f,size:k,views:S,value:n,isDisabled:g,placeholder:a,removeOption:_})]}),r.jsx(ln,{children:!h&&!g&&r.jsx(l.Element,{display:"flex",alignItems:"center",justifyContent:"center",style:s?Dn.closed:Dn.open,children:r.jsx(de,{color:"inherit",widthHeight:kl[k],style:S.icon,orientation:"down"})})}),!s&&f.length>0&&r.jsx(Bt,{children:r.jsx(l.Element,{ref:R,onClick:N=>N.stopPropagation(),style:{...W(),...Jm.enter},children:r.jsx(a0,{size:k,views:S,options:f,callback:$,highlightedIndex:M,setHighlightedIndex:F,selectedValue:n})})})]})})},i0=e=>{const o=he("select",e),t={...o,options:o.options||[]},n=bl(t);return r.jsx(Cl,{...n,...t,value:n.value,onClick:a=>{a.stopPropagation(),o.onClick&&o.onClick(a)}})},nr=i0,Sl=({isDisabled:e,isChecked:o})=>{const[t,n]=p.useState(!1),[a,i]=p.useState(o||!1),[s,c]=p.useState(o||!1);return p.useEffect(()=>{o!==void 0&&(i(o),c(o))},[o]),{isHovered:t,setIsHovered:n,on:a,setOn:i,value:s,setValue:c}},$n={xs:{height:"10px",width:"10px"},sm:{height:"14px",width:"14px"},md:{height:"18px",width:"18px"},lg:{height:"22px",width:"22px"},xl:{height:"26px",width:"26px"}},s0={xs:{height:"20px",width:"40px"},sm:{height:"24px",width:"48px"},md:{height:"28px",width:"56px"},lg:{height:"32px",width:"64px"},xl:{height:"36px",width:"72px"}},c0={xs:{height:"22px",width:"52px"},sm:{height:"26px",width:"62px"},md:{height:"30px",width:"72px"},lg:{height:"34px",width:"84px"},xl:{height:"38px",width:"96px"}},d0={xs:"9px",sm:"10px",md:"11px",lg:"12px",xl:"13px"},xr={xs:{paddingVertical:5,paddingHorizontal:3},sm:{paddingVertical:5,paddingHorizontal:3},md:{paddingVertical:5,paddingHorizontal:5},lg:{paddingVertical:5,paddingHorizontal:5},xl:{paddingVertical:5,paddingHorizontal:5}},io={default:{active:"theme-primary",inactive:"color-gray-300",knob:"color-white",disabled:"color-gray-200"},states:{hover:{active:"theme-primary",inactive:"color-gray-400",activeOpacity:.9}}},Ln={slider:{transition:"all 0.2s ease-in-out"},knob:{transition:"all 0.2s ease-in-out"}},u0=e=>r.jsx(l.Input,{type:"checkbox",...e}),jl=({id:e,name:o,label:t,inActiveChild:n,isChecked:a,activeChild:i,labelPosition:s="right",shadow:c={},size:d="sm",value:u=!1,isHovered:m=!1,isDisabled:g=!1,isReadOnly:h=!1,on:f,setOn:y=()=>{},onChange:k,setValue:b=()=>{},setIsHovered:C=()=>{},helperText:S,views:w={slider:{},circle:{},label:{}},...j})=>{const x=typeof a=="boolean"?a:u,T=!!(i||n)?c0[d]:s0[d],F=`${xr[d].paddingHorizontal}px`,M=`${xr[d].paddingHorizontal+2}px`,E=`calc(${$n[d].width} + ${xr[d].paddingHorizontal}px + 4px)`,I=d0[d],V=R=>{if(!h&&!g){const W=R.target.checked;b(W),y(W),k&&k(W)}},H=()=>C(!0),z=()=>C(!1),P={container:{gap:12,display:"flex",height:"fit-content",width:"fit-content",alignItems:"center",cursor:g?"not-allowed":h?"default":"pointer",opacity:g?.6:1,transition:"all 0.2s ease-in-out",...w.label}};return r.jsxs(sr,{htmlFor:e,onMouseEnter:H,onMouseLeave:z,...P.container,...j,children:[r.jsx(u0,{id:e,name:o,opacity:0,width:0,height:0,checked:x,onChange:V,disabled:g,readOnly:h,...j}),s==="left"&&t&&r.jsx(l.Text,{fontWeight:"500",color:g?"color-gray-400":"inherit",transition:"color 0.2s ease, opacity 0.2s ease",children:t}),r.jsxs(l.View,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",marginBottom:4,borderRadius:"9999px",backgroundColor:g?io.default.disabled:x?m?io.states.hover.active:io.default.active:m?io.states.hover.inactive:io.default.inactive,opacity:!g&&x&&m?io.states.hover.activeOpacity:1,cursor:"pointer",...Ln.slider,...c,...xr[d],...T,...w.slider,children:[i&&x&&r.jsx(l.View,{marginLeft:M,marginRight:E,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:I,color:"color-white",fontWeight:600,children:i}),r.jsx(l.View,{position:"absolute",top:"50%",left:x?void 0:F,right:x?F:void 0,borderRadius:"50%",backgroundColor:io.default.knob,boxShadow:m?"0 4px 10px rgba(15, 23, 42, 0.18)":"0 1px 3px rgba(15, 23, 42, 0.18)",transform:`translateY(-50%) ${m?"scale(1.05)":"scale(1)"}`,...Ln.knob,zIndex:1,...$n[d],...w.circle}),n&&!x&&r.jsx(l.View,{marginLeft:E,marginRight:M,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:I,color:"color-white",fontWeight:600,children:n})]}),s==="right"&&t&&r.jsx(l.Text,{fontWeight:"500",color:g?"color-gray-400":"inherit",transition:"all 0.2s ease-in-out",children:t})]})},p0=e=>{const o=he("switch",e),t=Sl(o);return r.jsx(jl,{...t,...o})},sn=p0,wl=({placeholder:e,isMulti:o,options:t,id:n=`selector-${Math.random().toString(36).substr(2,9)}`})=>{const a=e?o?[]:"":Array.isArray(t)&&t.length>0?t[0].value:o?[]:"",[i,s]=p.useState(!1),[c,d]=p.useState(!1),[u,m]=p.useState(a),[g,h]=p.useState(0),[f,y]=p.useState(!0);return{id:n,value:u,setValue:m,hide:f,setHide:y,isHovered:i,setIsHovered:s,isFocused:c,setIsFocused:d,highlightedIndex:g,setHighlightedIndex:h}},vl=({id:e,name:o,label:t,value:n,views:a={},options:i=[],onChange:s=()=>{},setValue:c=()=>{}})=>{const d=p.useCallback(u=>{c(u.value),s&&s(u.value)},[c,s]);return r.jsxs(Xe,{id:e,width:"100%",views:a,children:[t&&r.jsxs(l.Horizontal,{fontSize:"10px",letterSpacing:"wider",color:"color-black-500",fontWeight:"bold",marginBottom:12,alignItems:"center",gap:6,style:{textTransform:"uppercase"},children:[r.jsx(Ze,{widthHeight:14})," ",r.jsx(l.Text,{children:t})]}),r.jsx(l.Horizontal,{gap:0,children:i.map((u,m,g)=>{const h=n===u.value,f=u.color??"theme-primary",y=h?f:"color-gray-200",k=h?f:"color-gray-500",b=m===0,C=m===g.length-1,S=C||h;return r.jsx(l.View,{as:"button",type:"button",onClick:()=>d(u),flex:1,minWidth:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"center",paddingVertical:6,paddingHorizontal:12,fontSize:"12px",fontWeight:h?"bold":"normal",cursor:"pointer",backgroundColor:"transparent",color:k,borderStyle:"solid",borderColor:y,borderTopWidth:1,borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:S?1:0,borderRadius:b?"6px 0 0 6px":C?"0 6px 6px 0":"0",zIndex:h?1:0,transition:"color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease",...a.item,children:u.label},u.value)})}),r.jsx("input",{type:"hidden",id:e,name:o,value:Array.isArray(n)?n.join(","):n,onChange:()=>{}})]})},m0=e=>{const o={...e,options:e.options||[]},t=wl(o);return r.jsx(vl,{...t,...o,onClick:n=>{n.stopPropagation(),e.onClick&&e.onClick(n)}})},g0=m0,Tl=({label:e,placeholder:o,value:t})=>{const[n,a]=p.useState(e??o),[i,s]=p.useState(!1),[c,d]=p.useState(t||""),[u,m]=p.useState(!1);return p.useMemo(()=>{a(u&&!c?o??"":e??o)},[c,u,e,o]),{hint:n,setHint:a,isHovered:i,setIsHovered:s,value:c,setValue:d,isFocused:u,setIsFocused:m}},h0=e=>{if(!e)return{};const{container:o,content:t,...n}=e;return n},f0=(e,o)=>{if(o!=="pill")return e;if(typeof e=="number")return Math.min(e,28);if(typeof e=="string"){const t=Number.parseFloat(e);if(Number.isFinite(t)&&e.trim().endsWith("px"))return`${Math.min(t,28)}px`}return"28px"},Il=({id:e,name:o,hint:t,error:n,value:a,label:i,shadow:s,helperText:c,placeholder:d,size:u="sm",shape:m="default",variant:g="default",isHovered:h=!1,isFocused:f=!1,isEditable:y=!1,isReadOnly:k=!1,isDisabled:b=!1,isAutoFocus:C=!1,isMultiline:S=!1,maxRows:w=3,maxCols:j=30,onBlur:x=()=>{},onChange:v,onFocus:T,setHint:F=()=>{},setValue:M=()=>{},setIsFocused:E=()=>{},setIsHovered:I=()=>{},onChangeText:V,onSubmit:H,isWorkerRunning:z,inputRef:P,views:R={label:{},helperText:{}},...W})=>{const D=!!i,L={xs:{minHeight:"72px",shellPaddingY:6,shellPaddingX:10,fontSize:12,lineHeight:"16px"},sm:{minHeight:"88px",shellPaddingY:8,shellPaddingX:10,fontSize:12,lineHeight:"16px"},md:{minHeight:"104px",shellPaddingY:10,shellPaddingX:12,fontSize:14,lineHeight:"20px"},lg:{minHeight:"120px",shellPaddingY:12,shellPaddingX:14,fontSize:16,lineHeight:"24px"},xl:{minHeight:"136px",shellPaddingY:14,shellPaddingX:16,fontSize:18,lineHeight:"28px"}},O=(R==null?void 0:R.field)||{},$=(R==null?void 0:R.container)||{},_=f0($.borderRadius,m),B={...R,container:{...$,..._!==void 0?{borderRadius:_}:{},overflow:"hidden"}},G=h0(R),N={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:L[u].minHeight,maxHeight:"calc(100vh - 100px)",border:"none",on:{focus:{outline:"none"}},fontSize:L[u].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:b?"color-gray-400":"color-gray-900",cursor:b?"not-allowed":"text",opacity:b?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",...O,style:{backgroundColor:"transparent",...O.style}},A=()=>{E(!0),T&&T()},Y=K=>{x(K),E(!1)},J=K=>{const X=typeof K=="string"?K:K.target.value;M(X),V&&V(X),v&&v(X)};return r.jsx(Xe,{helperText:c,error:n,views:G,children:r.jsx(no,{label:i,size:u,error:n,shape:m,views:B,shadow:s,variant:g,value:a,color:"theme-primary",isHovered:h,isDisabled:b,isReadOnly:k,isFocused:f,showLabel:D,alignItems:"flex-start",minHeight:L[u].minHeight,paddingTop:L[u].shellPaddingY,paddingBottom:L[u].shellPaddingY,paddingLeft:L[u].shellPaddingX,paddingRight:L[u].shellPaddingX,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),...B==null?void 0:B.content,children:r.jsxs(Bo,{...R==null?void 0:R.warper,children:[D&&r.jsx(go,{htmlFor:e,color:"theme-primary",error:n,...R==null?void 0:R.label,children:i}),r.jsx(l.Element,{ref:P,as:"textarea",id:e,name:o,rows:w,cols:j,value:a,readOnly:k,disabled:b,autoFocus:C,placeholder:d||t,onBlur:Y,onFocus:A,onChange:K=>J(K),...N,...W,style:{resize:b||k?"none":"vertical",...N.style,...W.style||{}},...R==null?void 0:R.textarea})]})})})},y0=e=>{const o=he("textarea",e),t=Tl(o);return r.jsx(Il,{...t,...o})},cn=y0,dn=({label:e,placeholder:o,value:t})=>{const[n,a]=p.useState(e??o),[i,s]=p.useState(!1),[c,d]=p.useState(!1),[u,m]=p.useState(t);return p.useMemo(()=>{a(i&&!u?o??"":e??o)},[u,i,e,o]),{hint:n,setHint:a,isFocused:i,setIsFocused:s,isHovered:c,setIsHovered:d,setValue:m,value:u}},cr=({id:e,name:o,label:t,hint:n,value:a,onChange:i,left:s,right:c,helperText:d,placeholder:u,onChangeText:m,shadow:g={},views:h={container:{},field:{},label:{},helperText:{},text:{}},size:f="md",shape:y="default",variant:k="default",error:b=!1,isFocused:C=!1,isHovered:S=!1,isDisabled:w=!1,isReadOnly:j=!1,isClearable:x=!0,isAutoFocus:v=!1,setHint:T=()=>{},setIsFocused:F=()=>{},setIsHovered:M=()=>{},setValue:E=()=>{},onClick:I=()=>{},onFocus:V,onBlur:H=()=>{},themeMode:z,inputRef:P,...R})=>{const{getColor:W,themeMode:D}=l.useTheme(),L=W(w?"color-gray-400":"color-gray-500",{themeMode:z||D}),O=!!t,$={xs:{minHeight:24,shellPaddingY:6,shellPaddingX:10,fontSize:12,lineHeight:"16px"},sm:{minHeight:32,shellPaddingY:8,shellPaddingX:10,fontSize:12,lineHeight:"16px"},md:{minHeight:40,shellPaddingY:10,shellPaddingX:12,fontSize:14,lineHeight:"20px"},lg:{minHeight:48,shellPaddingY:12,shellPaddingX:14,fontSize:16,lineHeight:"24px"},xl:{minHeight:56,shellPaddingY:14,shellPaddingX:16,fontSize:18,lineHeight:"28px"}},_=(h==null?void 0:h.field)||{},B="0 0 0 1000px var(--theme-canvas) inset",G={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:"auto",border:"none",backgroundColor:"transparent",fontSize:$[f].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:w?"color-gray-400":"color-gray-900",cursor:w?"not-allowed":"text",opacity:w?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",_focus:{outline:"none",_placeholder:{opacity:.7}},_placeholder:{color:"color-gray-400",opacity:1,transition:"opacity 0.2s ease-out"},_selection:{backgroundColor:"color-mix(in srgb, var(--theme-primary) 20%, transparent)"},_webkitAutofill:{boxShadow:B,WebkitBoxShadow:B,WebkitTextFillColor:"var(--theme-text)",transition:"background-color 5000s ease-in-out 0s"},_webkitContactsAutoFillButton:{visibility:"hidden",pointerEvents:"none",position:"absolute",right:0},..._},N=()=>{F(!0),V&&V()},A=()=>M(!0),Y=()=>M(!1),J=oe=>{H&&H(oe),F(!1)},K=oe=>{typeof oe=="string"?(E(oe),m&&m(oe),i&&i(oe)):(E(oe.target.value),m&&m(oe.target.value),i&&i(oe.target.value))},X=()=>{E(""),m&&m(""),i&&i(""),H({target:{name:o}})},{container:ee,content:te,...ae}=h||{};return r.jsx(Xe,{helperText:d,error:b,views:ae,children:r.jsxs(no,{label:t,size:f,error:b,shape:y,views:h,shadow:g,variant:k,value:a,color:"theme-primary",isHovered:S,isDisabled:w,isReadOnly:j,isFocused:C,showLabel:O,onMouseEnter:A,onMouseLeave:Y,children:[s,r.jsxs(Bo,{children:[O&&r.jsx(go,{htmlFor:e,color:"theme-primary",error:b,...h==null?void 0:h.label,children:t}),r.jsx(l.Input,{ref:P,type:"text",id:e,name:o,readOnly:j,disabled:w,autoFocus:v,placeholder:u||n,onFocus:N,onBlur:J,autoComplete:"off",...G,...R,onChange:K,value:a})]}),x&&a&&!j&&!w&&r.jsx(ln,{children:r.jsx(ze,{size:20,color:L,onClick:X,cursor:"pointer",borderRadius:"50%",transition:"background-color 0.2s ease, transform 0.2s ease",_hover:{backgroundColor:"color-gray-100",transform:"scale(1.05)"},_active:{transform:"scale(0.95)"}})}),c]})})},x0=e=>{const o=he("input",e),t=dn(o);return r.jsx(cr,{...t,...o})},Fe=x0,Rl=({defaultIsSelected:e=!1})=>{const[o,t]=p.useState(!1),[n,a]=p.useState(e);return{isHovered:o,setIsHovered:t,isSelected:n,setIsSelected:a}},b0={xs:{height:"12px",width:"12px"},sm:{height:"16px",width:"16px"},md:{height:"20px",width:"20px"},lg:{height:"24px",width:"24px"},xl:{height:"28px",width:"28px"}},_n={xs:10,sm:14,md:16,lg:20,xl:24},k0={selected:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},unselected:{backgroundColor:"transparent",borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",color:"inherit",transition:"all 0.2s ease-in-out"},indeterminate:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}},at={hover:{selected:{opacity:.9},unselected:{borderColor:"color-gray-400",backgroundColor:"color-gray-50"},indeterminate:{opacity:.9}},disabled:{selected:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},unselected:{borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},indeterminate:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"}},error:{selected:{backgroundColor:"color-red-500",borderColor:"color-red-500"},unselected:{borderColor:"color-red-500"},indeterminate:{backgroundColor:"color-red-500",borderColor:"color-red-500"}}},Fl=({id:e,icon:o,name:t,label:n,isChecked:a,onChange:i,onValueChange:s,shadow:c={},labelPosition:d="right",size:u="md",error:m=!1,isSelected:g=!1,isHovered:h=!1,isDisabled:f=!1,isReadOnly:y=!1,isIndeterminate:k=!1,defaultIsSelected:b=!1,setIsSelected:C=()=>{},setIsHovered:S=()=>{},setIsChecked:w,views:j={checkbox:{},label:{}},infoText:x,helperText:v,...T})=>{const F=()=>S(!h),M=()=>{!y&&!f&&(C&&C(!g),i&&i(!a),s&&s(!a))},E=k?"indeterminate":a||g?"selected":"unselected",I=m?at.error[E]:f?at.disabled[E]:h?at.hover[E]:{},V={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",color:m?"color-red-600":f?"color-gray-400":"inherit",cursor:f?"not-allowed":y?"default":"pointer",opacity:f?.6:1,transition:"all 0.2s ease-in-out",...j.label},checkbox:{...k0[E],...I,borderRadius:6,...b0[u],transition:"all 0.2s ease-in-out",...c,...j.checkbox}};return r.jsxs(sr,{htmlFor:e,as:"div",onClick:M,onMouseEnter:F,onMouseLeave:F,size:l.Typography.fontSizes[u],...V.container,...T,children:[r.jsxs(l.Vertical,{gap:8,children:[" ",r.jsxs(l.Horizontal,{gap:12,alignItems:"center",children:[" ",d==="left"&&n&&r.jsx(l.Text,{size:u,fontWeight:"500",...j==null?void 0:j.label,children:n}),r.jsx(l.Center,{...V.checkbox,children:k?r.jsx(_a,{widthHeight:_n[u],color:"color-white",transition:"opacity 0.2s ease"}):(a||g)&&(o??r.jsx(lr,{widthHeight:_n[u],color:"color-white",transition:"opacity 0.2s ease"}))}),d==="right"&&n&&r.jsx(l.Text,{size:u,fontWeight:"500",...j==null?void 0:j.label,children:n})]}),x&&r.jsx(l.Text,{marginLeft:d==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...j==null?void 0:j.infoText,children:x})]}),m&&r.jsx(l.Text,{size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"all 0.2s ease-in-out",children:m})]})},C0=e=>{const o=he("checkbox",e),t=Rl(o);return r.jsx(Fl,{...t,...o})},un=C0,zl=e=>{const{value:o,defaultValue:t="",onChange:n,onChangeComplete:a,onOpen:i,onClose:s,closeOnSelect:c=!0,maxRecentColors:d=8,showRecentColors:u=!0,isAutoFocus:m=!1}=e,[g,h]=p.useState(!1),[f,y]=p.useState(o??t),[k,b]=p.useState(""),[C,S]=p.useState([]),[w,j]=p.useState(!1),[x,v]=p.useState(!1),T=p.useRef(null),F=p.useRef(null);p.useEffect(()=>{o!==void 0&&y(o)},[o]),p.useEffect(()=>{if(u&&typeof localStorage<"u")try{const R=localStorage.getItem("colorInput-recentColors");R&&S(JSON.parse(R))}catch(R){console.warn("Failed to load recent colors from localStorage:",R)}},[u]),p.useEffect(()=>{const R=T.current;m&&R&&typeof R.focus=="function"&&R.focus()},[m]),p.useEffect(()=>{if(typeof(document==null?void 0:document.addEventListener)!="function")return;const R=W=>{g&&T.current&&F.current&&!T.current.contains(W.target)&&!F.current.contains(W.target)&&z()};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[g]);const M=p.useCallback(R=>{u&&S(W=>{const D=W.filter(O=>O!==R),L=[R,...D].slice(0,d);try{typeof localStorage<"u"&&localStorage.setItem("colorInput-recentColors",JSON.stringify(L))}catch(O){console.warn("Failed to save recent colors to localStorage:",O)}return L})},[u,d]),E=p.useCallback(()=>{const R=!g;h(R),R?i==null||i():s==null||s()},[g,i,s]),I=p.useCallback(R=>{y(R),M(R),n==null||n(R),a==null||a(R),c&&(h(!1),s==null||s())},[n,a,c,s,M]),V=p.useCallback(R=>{b(R)},[]),H=p.useCallback(()=>{k&&(I(k),b(""))},[k,I]),z=p.useCallback(()=>{h(!1),s==null||s()},[s]),P=p.useCallback(R=>{y(R),n==null||n(R)},[n]);return{isOpen:g,selectedColor:f,recentColors:C,customColor:k,isFocused:w,isHovered:x,handleToggle:E,handleColorSelect:I,handleCustomColorChange:V,handleCustomColorSubmit:H,handleClose:z,setIsFocused:j,setIsHovered:v,setValue:P,triggerRef:T,dropdownRef:F}},qo={container:{position:"relative",display:"inline-block",width:"fit-content"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300",padding:"8px 12px",borderRadius:8},dropdown:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"280px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",gap:"8px"},recentColors:{display:"flex",gap:"4px",flexWrap:"wrap"}},S0={xs:{height:"28px",fontSize:"10px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"16px",padding:"12px 16px"},xl:{height:"56px",fontSize:"20px",padding:"16px 20px"}},j0={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},w0={default:{backgroundColor:"color-white",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},outline:{backgroundColor:"transparent",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},none:{backgroundColor:"transparent",borderColor:"transparent",borderWidth:"0px"}},v0=[{name:"Red 500",value:"color-red-500"},{name:"Orange 500",value:"color-orange-500"},{name:"Yellow 500",value:"color-yellow-500"},{name:"Green 500",value:"color-green-500"},{name:"Blue 500",value:"color-blue-500"},{name:"Indigo 500",value:"color-indigo-500"},{name:"Purple 500",value:"color-purple-500"},{name:"Pink 500",value:"color-pink-500"},{name:"Red 300",value:"color-red-300"},{name:"Orange 300",value:"color-orange-300"},{name:"Yellow 300",value:"color-yellow-300"},{name:"Green 300",value:"color-green-300"},{name:"Blue 300",value:"color-blue-300"},{name:"Indigo 300",value:"color-indigo-300"},{name:"Purple 300",value:"color-purple-300"},{name:"Pink 300",value:"color-pink-300"},{name:"Red 700",value:"color-red-700"},{name:"Orange 700",value:"color-orange-700"},{name:"Yellow 700",value:"color-yellow-700"},{name:"Green 700",value:"color-green-700"},{name:"Blue 700",value:"color-blue-700"},{name:"Indigo 700",value:"color-indigo-700"},{name:"Purple 700",value:"color-purple-700"},{name:"Pink 700",value:"color-pink-700"},{name:"Gray 100",value:"color-gray-100"},{name:"Gray 300",value:"color-gray-300"},{name:"Gray 500",value:"color-gray-500"},{name:"Gray 700",value:"color-gray-700"},{name:"Gray 900",value:"color-gray-900"},{name:"White",value:"color-white"},{name:"Black",value:"color-black"},{name:"Transparent",value:"transparent"}],Ml=({id:e,name:o,label:t,placeholder:n="Select a color",helperText:a,views:i={},size:s="md",shape:c="default",variant:d="default",shadow:u,error:m=!1,isDisabled:g=!1,isReadOnly:h=!1,isFocused:f=!1,isHovered:y=!1,predefinedColors:k=v0,showCustomInput:b=!0,showRecentColors:C=!0,isOpen:S=!1,selectedColor:w="",recentColors:j=[],customColor:x="",handleToggle:v=()=>{},handleColorSelect:T=()=>{},handleCustomColorChange:F=()=>{},handleCustomColorSubmit:M=()=>{},handleClose:E,setIsFocused:I=()=>{},setIsHovered:V=()=>{},setValue:H,triggerRef:z,dropdownRef:P,onChange:R,onChangeComplete:W,onBlur:D,onFocus:L,onOpen:O,onClose:$,colorFormat:_,maxRecentColors:B,closeOnSelect:G,value:N,defaultValue:A,...Y})=>{const{getColor:J}=l.useTheme(),K={...qo.container,...i==null?void 0:i.container},X={...qo.trigger,...S0[s],...j0[c],...w0[d],...m&&{borderColor:"color-red-500"},...g&&{opacity:.6,cursor:"not-allowed"},...f&&{borderColor:"theme-primary",boxShadow:"0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px rgba(29, 78, 216, 0.16)"},...y&&!g&&{borderColor:"color-gray-400"},...i==null?void 0:i.trigger,...u&&u},ee={...qo.dropdown,...i==null?void 0:i.dropdown},te={...qo.colorGrid,...i==null?void 0:i.colorGrid},ae={...qo.recentColors,...i==null?void 0:i.recentColors},oe=w||"color-gray-200";return r.jsxs(l.View,{...K,...Y,children:[t&&r.jsx(sr,{htmlFor:e,size:s,isDisabled:g,error:m,views:i==null?void 0:i.label,children:t}),r.jsxs(l.View,{ref:z,onClick:g||h?void 0:v,onMouseEnter:()=>V(!0),onMouseLeave:()=>V(!1),onFocus:()=>{I(!0),L&&L()},onBlur:ie=>{I(!1),D&&D(ie)},tabIndex:g?-1:0,role:"button","aria-expanded":S,"aria-haspopup":"listbox","aria-label":t||n,width:"fit-content",gap:8,...X,children:[r.jsx(l.View,{width:"20px",height:"20px",borderRadius:"4px",backgroundColor:oe,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"}),!h&&!g&&r.jsx(de,{widthHeight:16,color:"color-gray-500",orientation:S?"up":"down"})]}),S&&r.jsxs(l.View,{ref:P,...ee,children:[r.jsx(l.View,{...te,children:k.map((ie,fe)=>r.jsx(l.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:ie.value,borderWidth:"2px",borderStyle:"solid",borderColor:w===ie.value?"theme-primary":"transparent",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>T(ie.value),title:ie.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"},...i==null?void 0:i.colorSwatch},fe))}),C&&j.length>0&&r.jsxs(l.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(l.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Recent Colors"}),r.jsx(l.Horizontal,{gap:4,flexWrap:"wrap",...ae,children:j.map((ie,fe)=>r.jsx(l.View,{width:"20px",height:"20px",borderRadius:"8px",backgroundColor:ie,borderWidth:"1px",borderStyle:"solid",borderColor:w===ie?"theme-primary":"color-gray-300",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>T(ie),title:ie,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"}},fe))})]}),b&&r.jsxs(l.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(l.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Custom Color"}),r.jsxs(l.Horizontal,{gap:8,children:[r.jsx(Fe,{value:x,onChange:F,placeholder:"#000000 or rgb(0,0,0)",size:"sm",style:{flex:1},views:i==null?void 0:i.customInput}),r.jsx(l.View,{padding:"8px 12px",backgroundColor:"theme-primary",borderRadius:"8px",cursor:"pointer",onClick:M,transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"color-blue-700"},children:r.jsx(l.Text,{color:"color-white",fontSize:"12px",fontWeight:"500",children:"Add"})})]})]})]}),a&&r.jsx(l.Text,{fontSize:"12px",color:m?"color-red-500":"color-gray-600",marginTop:"4px",...i==null?void 0:i.helperText,children:a}),m&&typeof m=="string"&&r.jsx(l.Text,{fontSize:"12px",color:"color-red-500",marginTop:"4px",...i==null?void 0:i.error,children:m})]})},T0=e=>{const o=zl(e);return r.jsx(Ml,{...o,...e})},I0=T0,vt=[{name:"Afghanistan",dial_code:"+93",emoji:"🇦🇫",code:"AF"},{name:"Aland Islands",dial_code:"+358",emoji:"🇦🇽",code:"AX"},{name:"Albania",dial_code:"+355",emoji:"🇦🇱",code:"AL"},{name:"Algeria",dial_code:"+213",emoji:"🇩🇿",code:"DZ"},{name:"AmericanSamoa",dial_code:"+1684",emoji:"🇦🇸",code:"AS"},{name:"Andorra",dial_code:"+376",emoji:"🇦🇩",code:"AD"},{name:"Angola",dial_code:"+244",emoji:"🇦🇴",code:"AO"},{name:"Anguilla",dial_code:"+1264",emoji:"🇦🇮",code:"AI"},{name:"Antarctica",dial_code:"+672",emoji:"🇦🇶",code:"AQ"},{name:"Antigua and Barbuda",dial_code:"+1268",emoji:"🇦🇬",code:"AG"},{name:"Argentina",dial_code:"+54",emoji:"🇦🇷",code:"AR"},{name:"Armenia",dial_code:"+374",emoji:"🇦🇲",code:"AM"},{name:"Aruba",dial_code:"+297",emoji:"🇦🇼",code:"AW"},{name:"Australia",dial_code:"+61",emoji:"🇦🇺",code:"AU"},{name:"Austria",dial_code:"+43",emoji:"🇦🇹",code:"AT"},{name:"Azerbaijan",dial_code:"+994",emoji:"🇦🇿",code:"AZ"},{name:"Bahamas",dial_code:"+1242",emoji:"🇧🇸",code:"BS"},{name:"Bahrain",dial_code:"+973",emoji:"🇧🇭",code:"BH"},{name:"Bangladesh",dial_code:"+880",emoji:"🇧🇩",code:"BD"},{name:"Barbados",dial_code:"+1246",emoji:"🇧🇧",code:"BB"},{name:"Belarus",dial_code:"+375",emoji:"🇧🇾",code:"BY"},{name:"Belgium",dial_code:"+32",emoji:"🇧🇪",code:"BE"},{name:"Belize",dial_code:"+501",emoji:"🇧🇿",code:"BZ"},{name:"Benin",dial_code:"+229",emoji:"🇧🇯",code:"BJ"},{name:"Bermuda",dial_code:"+1441",emoji:"🇧🇲",code:"BM"},{name:"Bhutan",dial_code:"+975",emoji:"🇧🇹",code:"BT"},{name:"Bolivia, Plurinational State of",dial_code:"+591",emoji:"🇧🇴",code:"BO"},{name:"Bosnia and Herzegovina",dial_code:"+387",emoji:"🇧🇦",code:"BA"},{name:"Botswana",dial_code:"+267",emoji:"🇧🇼",code:"BW"},{name:"Brazil",dial_code:"+55",emoji:"🇧🇷",code:"BR"},{name:"British Indian Ocean Territory",dial_code:"+246",emoji:"🇮🇴",code:"IO"},{name:"Brunei Darussalam",dial_code:"+673",emoji:"🇧🇳",code:"BN"},{name:"Bulgaria",dial_code:"+359",emoji:"🇧🇬",code:"BG"},{name:"Burkina Faso",dial_code:"+226",emoji:"🇧🇫",code:"BF"},{name:"Burundi",dial_code:"+257",emoji:"🇧🇮",code:"BI"},{name:"Cambodia",dial_code:"+855",emoji:"🇰🇭",code:"KH"},{name:"Cameroon",dial_code:"+237",emoji:"🇨🇲",code:"CM"},{name:"Canada",dial_code:"+1",emoji:"🇨🇦",code:"CA"},{name:"Cape Verde",dial_code:"+238",emoji:"🇨🇻",code:"CV"},{name:"Cayman Islands",dial_code:"+345",emoji:"🇰🇾",code:"KY"},{name:"Central African Republic",dial_code:"+236",emoji:"🇨🇫",code:"CF"},{name:"Chad",dial_code:"+235",emoji:"🇹🇩",code:"TD"},{name:"Chile",dial_code:"+56",emoji:"🇨🇱",code:"CL"},{name:"China",dial_code:"+86",emoji:"🇨🇳",code:"CN"},{name:"Christmas Island",dial_code:"+61",emoji:"🇨🇽",code:"CX"},{name:"Cocos (Keeling) Islands",dial_code:"+61",emoji:"🇨🇨",code:"CC"},{name:"Colombia",dial_code:"+57",emoji:"🇨🇴",code:"CO"},{name:"Comoros",dial_code:"+269",emoji:"🇰🇲",code:"KM"},{name:"Congo",dial_code:"+242",emoji:"🇨🇬",code:"CG"},{name:"Congo, The Democratic Republic of the Congo",dial_code:"+243",emoji:"🇨🇩",code:"CD"},{name:"Cook Islands",dial_code:"+682",emoji:"🇨🇰",code:"CK"},{name:"Costa Rica",dial_code:"+506",emoji:"🇨🇷",code:"CR"},{name:"Cote d'Ivoire",dial_code:"+225",emoji:"🇨🇮",code:"CI"},{name:"Croatia",dial_code:"+385",emoji:"🇭🇷",code:"HR"},{name:"Cuba",dial_code:"+53",emoji:"🇨🇺",code:"CU"},{name:"Cyprus",dial_code:"+357",emoji:"🇨🇾",code:"CY"},{name:"Czech Republic",dial_code:"+420",emoji:"🇨🇿",code:"CZ"},{name:"Denmark",dial_code:"+45",emoji:"🇩🇰",code:"DK"},{name:"Djibouti",dial_code:"+253",emoji:"🇩🇯",code:"DJ"},{name:"Dominica",dial_code:"+1767",emoji:"🇩🇲",code:"DM"},{name:"Dominican Republic",dial_code:"+1849",emoji:"🇩🇴",code:"DO"},{name:"Ecuador",dial_code:"+593",emoji:"🇪🇨",code:"EC"},{name:"Egypt",dial_code:"+20",emoji:"🇪🇬",code:"EG"},{name:"El Salvador",dial_code:"+503",emoji:"🇸🇻",code:"SV"},{name:"Equatorial Guinea",dial_code:"+240",emoji:"🇬🇶",code:"GQ"},{name:"Eritrea",dial_code:"+291",emoji:"🇪🇷",code:"ER"},{name:"Estonia",dial_code:"+372",emoji:"🇪🇪",code:"EE"},{name:"Ethiopia",dial_code:"+251",emoji:"🇪🇹",code:"ET"},{name:"Falkland Islands (Malvinas)",dial_code:"+500",emoji:"🇫🇰",code:"FK"},{name:"Faroe Islands",dial_code:"+298",emoji:"🇫🇴",code:"FO"},{name:"Fiji",dial_code:"+679",emoji:"🇫🇯",code:"FJ"},{name:"Finland",dial_code:"+358",emoji:"🇫🇮",code:"FI"},{name:"France",dial_code:"+33",emoji:"🇫🇷",code:"FR"},{name:"French Guiana",dial_code:"+594",emoji:"🇬🇫",code:"GF"},{name:"French Polynesia",dial_code:"+689",emoji:"🇵🇫",code:"PF"},{name:"Gabon",dial_code:"+241",emoji:"🇬🇦",code:"GA"},{name:"Gambia",dial_code:"+220",emoji:"🇬🇲",code:"GM"},{name:"Georgia",dial_code:"+995",emoji:"🇬🇪",code:"GE"},{name:"Germany",dial_code:"+49",emoji:"🇩🇪",code:"DE"},{name:"Ghana",dial_code:"+233",emoji:"🇬🇭",code:"GH"},{name:"Gibraltar",dial_code:"+350",emoji:"🇬🇮",code:"GI"},{name:"Greece",dial_code:"+30",emoji:"🇬🇷",code:"GR"},{name:"Greenland",dial_code:"+299",emoji:"🇬🇱",code:"GL"},{name:"Grenada",dial_code:"+1473",emoji:"🇬🇩",code:"GD"},{name:"Guadeloupe",dial_code:"+590",emoji:"🇬🇵",code:"GP"},{name:"Guam",dial_code:"+1671",emoji:"🇬🇺",code:"GU"},{name:"Guatemala",dial_code:"+502",emoji:"🇬🇹",code:"GT"},{name:"Guernsey",dial_code:"+44",emoji:"🇬🇬",code:"GG"},{name:"Guinea",dial_code:"+224",emoji:"🇬🇳",code:"GN"},{name:"Guinea-Bissau",dial_code:"+245",emoji:"🇬🇼",code:"GW"},{name:"Guyana",dial_code:"+595",emoji:"🇬🇾",code:"GY"},{name:"Haiti",dial_code:"+509",emoji:"🇭🇹",code:"HT"},{name:"Holy See (Vatican City State)",dial_code:"+379",emoji:"🇻🇦",code:"VA"},{name:"Honduras",dial_code:"+504",emoji:"🇭🇳",code:"HN"},{name:"Hong Kong",dial_code:"+852",emoji:"🇭🇰",code:"HK"},{name:"Hungary",dial_code:"+36",emoji:"🇭🇺",code:"HU"},{name:"Iceland",dial_code:"+354",emoji:"🇮🇸",code:"IS"},{name:"India",dial_code:"+91",emoji:"🇮🇳",code:"IN"},{name:"Indonesia",dial_code:"+62",emoji:"🇮🇩",code:"ID"},{name:"Iran, Islamic Republic of Persian Gulf",dial_code:"+98",emoji:"🇮🇷",code:"IR"},{name:"Iraq",dial_code:"+964",emoji:"🇮🇷",code:"IQ"},{name:"Ireland",dial_code:"+353",emoji:"🇮🇪",code:"IE"},{name:"Isle of Man",dial_code:"+44",emoji:"🇮🇲",code:"IM"},{name:"Israel",dial_code:"+972",emoji:"🇮🇱",code:"IL"},{name:"Italy",dial_code:"+39",emoji:"🇮🇹",code:"IT"},{name:"Jamaica",dial_code:"+1876",emoji:"🇯🇲",code:"JM"},{name:"Japan",dial_code:"+81",emoji:"🇯🇵",code:"JP"},{name:"Jersey",dial_code:"+44",emoji:"🇯🇪",code:"JE"},{name:"Jordan",dial_code:"+962",emoji:"🇯🇴",code:"JO"},{name:"Kazakhstan",dial_code:"+77",emoji:"🇰🇿",code:"KZ"},{name:"Kenya",dial_code:"+254",emoji:"🇰🇪",code:"KE"},{name:"Kiribati",dial_code:"+686",emoji:"🇰🇮",code:"KI"},{name:"Korea, Democratic People's Republic of Korea",dial_code:"+850",emoji:"🇰🇵",code:"KP"},{name:"Korea, Republic of South Korea",dial_code:"+82",emoji:"🇰🇷",code:"KR"},{name:"Kuwait",dial_code:"+965",emoji:"🇰🇼",code:"KW"},{name:"Kyrgyzstan",dial_code:"+996",emoji:"🇰🇬",code:"KG"},{name:"Laos",dial_code:"+856",emoji:"🇱🇦",code:"LA"},{name:"Latvia",dial_code:"+371",emoji:"🇱🇻",code:"LV"},{name:"Lebanon",dial_code:"+961",emoji:"🇱🇧",code:"LB"},{name:"Lesotho",dial_code:"+266",emoji:"🇱🇸",code:"LS"},{name:"Liberia",dial_code:"+231",emoji:"🇱🇷",code:"LR"},{name:"Libyan Arab Jamahiriya",dial_code:"+218",emoji:"🇱🇾",code:"LY"},{name:"Liechtenstein",dial_code:"+423",emoji:"🇱🇮",code:"LI"},{name:"Lithuania",dial_code:"+370",emoji:"🇱🇹",code:"LT"},{name:"Luxembourg",dial_code:"+352",emoji:"🇱🇺",code:"LU"},{name:"Macao",dial_code:"+853",emoji:"🇲🇴",code:"MO"},{name:"Macedonia",dial_code:"+389",emoji:"🇲🇰",code:"MK"},{name:"Madagascar",dial_code:"+261",emoji:"🇲🇬",code:"MG"},{name:"Malawi",dial_code:"+265",emoji:"🇲🇼",code:"MW"},{name:"Malaysia",dial_code:"+60",emoji:"🇲🇾",code:"MY"},{name:"Maldives",dial_code:"+960",emoji:"🇲🇻",code:"MV"},{name:"Mali",dial_code:"+223",emoji:"🇲🇱",code:"ML"},{name:"Malta",dial_code:"+356",emoji:"🇲🇹",code:"MT"},{name:"Marshall Islands",dial_code:"+692",emoji:"🇲🇭",code:"MH"},{name:"Martinique",dial_code:"+596",emoji:"🇲🇶",code:"MQ"},{name:"Mauritania",dial_code:"+222",emoji:"🇲🇷",code:"MR"},{name:"Mauritius",dial_code:"+230",emoji:"🇲🇺",code:"MU"},{name:"Mayotte",dial_code:"+262",emoji:"🇾🇹",code:"YT"},{name:"Mexico",dial_code:"+52",emoji:"🇲🇽",code:"MX"},{name:"Micronesia, Federated States of Micronesia",dial_code:"+691",emoji:"🇫🇲",code:"FM"},{name:"Moldova",dial_code:"+373",emoji:"🇲🇩",code:"MD"},{name:"Monaco",dial_code:"+377",emoji:"🇲🇨",code:"MC"},{name:"Mongolia",dial_code:"+976",emoji:"🇲🇳",code:"MN"},{name:"Montenegro",dial_code:"+382",emoji:"🇲🇪",code:"ME"},{name:"Montserrat",dial_code:"+1664",emoji:"🇲🇸",code:"MS"},{name:"Morocco",dial_code:"+212",emoji:"🇲🇦",code:"MA"},{name:"Mozambique",dial_code:"+258",emoji:"🇲🇿",code:"MZ"},{name:"Myanmar",dial_code:"+95",emoji:"🇲🇲",code:"MM"},{name:"Namibia",emoji:"🇳🇦",dial_code:"+264",code:"NA"},{name:"Nauru",dial_code:"+674",emoji:"🇳🇷",code:"NR"},{name:"Nepal",dial_code:"+977",emoji:"🇳🇵",code:"NP"},{name:"Netherlands",dial_code:"+31",emoji:"🇳🇱",code:"NL"},{name:"Netherlands Antilles",dial_code:"+599",emoji:"🇧🇶",code:"AN"},{name:"New Caledonia",dial_code:"+687",emoji:"🇳🇨",code:"NC"},{name:"New Zealand",dial_code:"+64",emoji:"🇳🇿",code:"NZ"},{name:"Nicaragua",dial_code:"+505",emoji:"🇳🇮",code:"NI"},{name:"Niger",dial_code:"+227",emoji:"🇳🇪",code:"NE"},{name:"Nigeria",dial_code:"+234",emoji:"🇳🇬",code:"NG"},{name:"Niue",dial_code:"+683",emoji:"🇳🇺",code:"NU"},{name:"Norfolk Island",dial_code:"+672",emoji:"🇳🇫",code:"NF"},{name:"Northern Mariana Islands",dial_code:"+1670",emoji:"🇲🇵",code:"MP"},{name:"Norway",dial_code:"+47",emoji:"🇳🇴",code:"NO"},{name:"Oman",dial_code:"+968",emoji:"🇴🇲",code:"OM"},{name:"Pakistan",dial_code:"+92",emoji:"🇵🇰",code:"PK"},{name:"Palau",dial_code:"+680",emoji:"🇵🇼",code:"PW"},{name:"Palestinian Territory, Occupied",dial_code:"+970",emoji:"🇵🇸",code:"PS"},{name:"Panama",dial_code:"+507",emoji:"🇵🇦",code:"PA"},{name:"Papua New Guinea",dial_code:"+675",emoji:"🇵🇬",code:"PG"},{name:"Paraguay",dial_code:"+595",emoji:"🇵🇾",code:"PY"},{name:"Peru",dial_code:"+51",emoji:"🇵🇪",code:"PE"},{name:"Philippines",dial_code:"+63",emoji:"🇵🇭",code:"PH"},{name:"Pitcairn",dial_code:"+872",emoji:"🇵🇳",code:"PN"},{name:"Poland",dial_code:"+48",emoji:"🇵🇱",code:"PL"},{name:"Portugal",dial_code:"+351",emoji:"🇵🇹",code:"PT"},{name:"Puerto Rico",dial_code:"+1939",emoji:"🇵🇷",code:"PR"},{name:"Qatar",dial_code:"+974",emoji:"🇶🇦",code:"QA"},{name:"Romania",dial_code:"+40",emoji:"🇷🇴",code:"RO"},{name:"Russia",dial_code:"+7",emoji:"🇷🇺",code:"RU"},{name:"Rwanda",dial_code:"+250",emoji:"🇷🇼",code:"RW"},{name:"Reunion",dial_code:"+262",emoji:"🇷🇪",code:"RE"},{name:"Saint Barthelemy",dial_code:"+590",emoji:"🇧🇱",code:"BL"},{name:"Saint Helena, Ascension and Tristan Da Cunha",dial_code:"+290",emoji:"🇸🇭",code:"SH"},{name:"Saint Kitts and Nevis",dial_code:"+1869",emoji:"🇰🇳",code:"KN"},{name:"Saint Lucia",dial_code:"+1758",emoji:"🇱🇨",code:"LC"},{name:"Saint Martin",dial_code:"+590",emoji:"🇲🇫",code:"MF"},{name:"Saint Pierre and Miquelon",dial_code:"+508",emoji:"🇵🇲",code:"PM"},{name:"Saint Vincent and the Grenadines",dial_code:"+1784",emoji:"🇻🇨",code:"VC"},{name:"Samoa",dial_code:"+685",emoji:"🇼🇸",code:"WS"},{name:"San Marino",dial_code:"+378",emoji:"🇸🇲",code:"SM"},{name:"Sao Tome and Principe",dial_code:"+239",emoji:"🇸🇹",code:"ST"},{name:"Saudi Arabia",dial_code:"+966",emoji:"🇸🇦",code:"SA"},{name:"Senegal",dial_code:"+221",emoji:"🇸🇳",code:"SN"},{name:"Serbia",dial_code:"+381",emoji:"🇷🇸",code:"RS"},{name:"Seychelles",dial_code:"+248",emoji:"🇸🇨",code:"SC"},{name:"Sierra Leone",dial_code:"+232",emoji:"🇸🇱",code:"SL"},{name:"Singapore",dial_code:"+65",emoji:"🇸🇬",code:"SG"},{name:"Slovakia",dial_code:"+421",emoji:"🇸🇰",code:"SK"},{name:"Slovenia",dial_code:"+386",emoji:"🇸🇮",code:"SI"},{name:"Solomon Islands",dial_code:"+677",emoji:"🇸🇧",code:"SB"},{name:"Somalia",dial_code:"+252",emoji:"🇸🇴",code:"SO"},{name:"South Africa",dial_code:"+27",emoji:"🇿🇦",code:"ZA"},{name:"South Sudan",dial_code:"+211",emoji:"🇸🇸",code:"SS"},{name:"South Georgia and the South Sandwich Islands",dial_code:"+500",emoji:"🇬🇸",code:"GS"},{name:"Spain",dial_code:"+34",emoji:"🇪🇸",code:"ES"},{name:"Sri Lanka",dial_code:"+94",emoji:"🇱🇰",code:"LK"},{name:"Sudan",dial_code:"+249",emoji:"🇸🇩",code:"SD"},{name:"Suriname",dial_code:"+597",emoji:"🇸🇷",code:"SR"},{name:"Svalbard and Jan Mayen",dial_code:"+47",emoji:"🇸🇯",code:"SJ"},{name:"Swaziland",dial_code:"+268",emoji:"🇸🇿",code:"SZ"},{name:"Sweden",dial_code:"+46",emoji:"🇸🇪",code:"SE"},{name:"Switzerland",dial_code:"+41",emoji:"🇨🇭",code:"CH"},{name:"Syrian Arab Republic",dial_code:"+963",emoji:"🇸🇾",code:"SY"},{name:"Taiwan",dial_code:"+886",emoji:"🇹🇼",code:"TW"},{name:"Tajikistan",dial_code:"+992",emoji:"🇹🇯",code:"TJ"},{name:"Tanzania, United Republic of Tanzania",dial_code:"+255",emoji:"🇹🇿",code:"TZ"},{name:"Thailand",dial_code:"+66",emoji:"🇹🇭",code:"TH"},{name:"Timor-Leste",dial_code:"+670",emoji:"🇹🇱",code:"TL"},{name:"Togo",dial_code:"+228",emoji:"🇹🇬",code:"TG"},{name:"Tokelau",dial_code:"+690",emoji:"🇹🇰",code:"TK"},{name:"Tonga",dial_code:"+676",emoji:"🇹🇴",code:"TO"},{name:"Trinidad and Tobago",dial_code:"+1868",emoji:"🇹🇹",code:"TT"},{name:"Tunisia",dial_code:"+216",emoji:"🇹🇳",code:"TN"},{name:"Turkey",dial_code:"+90",emoji:"🇹🇷",code:"TR"},{name:"Turkmenistan",dial_code:"+993",emoji:"🇹🇲",code:"TM"},{name:"Turks and Caicos Islands",dial_code:"+1649",emoji:"🇹🇨",code:"TC"},{name:"Tuvalu",dial_code:"+688",emoji:"🇹🇻",code:"TV"},{name:"Uganda",dial_code:"+256",emoji:"🇺🇬",code:"UG"},{name:"Ukraine",dial_code:"+380",emoji:"🇺🇦",code:"UA"},{name:"United Arab Emirates",dial_code:"+971",emoji:"🇦🇪",code:"AE"},{name:"United Kingdom",dial_code:"+44",emoji:"🇬🇧",code:"GB"},{name:"United States",dial_code:"+1",emoji:"🇺🇸",code:"US"},{name:"Uruguay",dial_code:"+598",emoji:"🇺🇾",code:"UY"},{name:"Uzbekistan",dial_code:"+998",emoji:"🇺🇿",code:"UZ"},{name:"Vanuatu",dial_code:"+678",emoji:"🇻🇺",code:"VU"},{name:"Venezuela, Bolivarian Republic of Venezuela",dial_code:"+58",emoji:"🇻🇪",code:"VE"},{name:"Vietnam",dial_code:"+84",emoji:"🇻🇳",code:"VN"},{name:"Virgin Islands, British",dial_code:"+1284",emoji:"🇻🇬",code:"VG"},{name:"Virgin Islands, U.S.",dial_code:"+1340",emoji:"🇻🇮",code:"VI"},{name:"Wallis and Futuna",dial_code:"+681",emoji:"🇼🇫",code:"WF"},{name:"Yemen",dial_code:"+967",emoji:"🇾🇪",code:"YE"},{name:"Zambia",dial_code:"+260",emoji:"🇿🇲",code:"ZM"},{name:"Zimbabwe",dial_code:"+263",emoji:"🇿🇼",code:"ZW"}],Wl=({placeholder:e})=>{const[o,t]=p.useState(vt),[n,a]=p.useState(e??vt[0].name),[i,s]=p.useState(!0),[c,d]=p.useState(!1),[u,m]=p.useState(!1);return{hide:i,setHide:s,newOptions:o,setNewOptions:t,isHovered:u,setIsHovered:m,isFocused:c,setIsFocused:d,value:n,setValue:a}},Bn={xs:8,sm:10,md:12,lg:14,xl:16},R0=({size:e,...o})=>r.jsx(l.Element,{as:"ul",...o}),F0=e=>r.jsx(l.Input,{type:"country",...e}),z0=({size:e,...o})=>r.jsx(l.Element,{as:"li",...o}),M0=({option:e,size:o="md",callback:t=()=>{},views:n={text:{}}})=>{const a=i=>{i&&i.stopPropagation&&i.stopPropagation(),t(e??"")};return r.jsx(z0,{margin:0,role:"DropDownItem",listStyleType:"none",fontWeight:"normal",paddingVertical:6,paddingHorizontal:12,onClick:a,fontSize:l.Typography.fontSizes[o],_hover:{backgroundColor:"color-gray-100",transition:"all 0.15s ease-in-out"},...n.text,children:e})},W0=({size:e,views:o={dropDown:{}},options:t=[],callback:n=()=>{}})=>{const a=i=>n(i);return r.jsx(R0,{role:"dropDown",margin:0,padding:0,top:"100%",width:"100%",display:"flex",zIndex:1e3,overflow:"auto",maxHeight:"300px",borderRadius:12,position:"absolute",flexDirection:"column",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",...o.dropDown,children:t.map(i=>r.jsx(M0,{size:e,option:i.name,callback:a,...o.text},i.code))})},Hl=({id:e,name:o,label:t,value:n,placeholder:a,helperText:i,hide:s=!1,error:c=!1,isHovered:d=!1,isFocused:u=!1,isAutoFocus:m=!1,isDisabled:g=!1,isReadOnly:h=!1,shadow:f={},newOptions:y=[],size:k="md",variant:b="default",shape:C="default",onChange:S,onBlur:w=()=>{},setHide:j=()=>{},setNewOptions:x=()=>{},setIsHovered:v=()=>{},setIsFocused:T=()=>{},setValue:F=()=>{},selected:M,setSelected:E,views:I={text:{},icon:{},label:{},dropDown:{},helperText:{}},themeMode:V,...H})=>{const{getColor:z,themeMode:P}=l.useTheme(),R=z("color-gray-500",{themeMode:V||P}),W=()=>T(!0),D=G=>{j(!s),F(G),S&&S(G)},L=()=>{!g&&!h&&j(!s)},O=G=>{const N=G.target.value,A=vt.filter(Y=>Y.name.toLowerCase().startsWith(N.toLowerCase()));s&&j(!1),x(A),S&&S(N)},$=G=>{w(G),T(!1)},_=!!(t&&(u||n)),B={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none"}},transition:"all 0.2s ease-in-out",fontSize:l.Typography.fontSizes[k],backgroundColor:"transparent",color:g?"color-gray-400":"color-gray-900",cursor:g?"not-allowed":h?"auto":"pointer",...I.field};return r.jsxs(Xe,{helperText:i,error:c,views:I,onClick:L,children:[r.jsxs(no,{label:t,size:k,error:c,shape:C,views:I,shadow:f,variant:b,value:n,color:"theme-primary",isDisabled:g,isReadOnly:h,isFocused:u,showLabel:_,_hover:!g&&!c?{borderColor:"theme-primary"}:void 0,children:[r.jsxs(Bo,{children:[_&&r.jsx(go,{htmlFor:e,color:"theme-primary",error:c,views:I,children:t}),r.jsx(F0,{id:e,name:o,placeholder:a,readOnly:h,disabled:g,autoFocus:m,onBlur:$,onFocus:W,...B,...H,value:n,onChange:O})]}),r.jsx(ln,{children:s?r.jsx(de,{orientation:"down",widthHeight:Bn[k],color:R,style:I.icon}):r.jsx(de,{orientation:"up",widthHeight:Bn[k],color:R,style:I.icon})})]}),!s&&r.jsx(W0,{size:k,views:I,options:y,callback:D})]})},H0=e=>{const o=Wl(e);return r.jsx(Hl,{...o,...e})},P0=H0;function Ar(e){"@babel/helpers - typeof";return Ar=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Ar(e)}function Te(e,o){if(o.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+o.length+" present")}function V0(e){return Te(1,arguments),e instanceof Date||Ar(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function qe(e){Te(1,arguments);var o=Object.prototype.toString.call(e);return e instanceof Date||Ar(e)==="object"&&o==="[object Date]"?new Date(e.getTime()):typeof e=="number"||o==="[object Number]"?new Date(e):((typeof e=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function A0(e){if(Te(1,arguments),!V0(e)&&typeof e!="number")return!1;var o=qe(e);return!isNaN(Number(o))}function mo(e){if(e===null||e===!0||e===!1)return NaN;var o=Number(e);return isNaN(o)?o:o<0?Math.ceil(o):Math.floor(o)}function E0(e,o){Te(2,arguments);var t=qe(e).getTime(),n=mo(o);return new Date(t+n)}function D0(e,o){Te(2,arguments);var t=mo(o);return E0(e,-t)}var $0=864e5;function L0(e){Te(1,arguments);var o=qe(e),t=o.getTime();o.setUTCMonth(0,1),o.setUTCHours(0,0,0,0);var n=o.getTime(),a=t-n;return Math.floor(a/$0)+1}function Er(e){Te(1,arguments);var o=1,t=qe(e),n=t.getUTCDay(),a=(n<o?7:0)+n-o;return t.setUTCDate(t.getUTCDate()-a),t.setUTCHours(0,0,0,0),t}function Pl(e){Te(1,arguments);var o=qe(e),t=o.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(t+1,0,4),n.setUTCHours(0,0,0,0);var a=Er(n),i=new Date(0);i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0);var s=Er(i);return o.getTime()>=a.getTime()?t+1:o.getTime()>=s.getTime()?t:t-1}function _0(e){Te(1,arguments);var o=Pl(e),t=new Date(0);t.setUTCFullYear(o,0,4),t.setUTCHours(0,0,0,0);var n=Er(t);return n}var B0=6048e5;function O0(e){Te(1,arguments);var o=qe(e),t=Er(o).getTime()-_0(o).getTime();return Math.round(t/B0)+1}var N0={};function Yr(){return N0}function Dr(e,o){var t,n,a,i,s,c,d,u;Te(1,arguments);var m=Yr(),g=mo((t=(n=(a=(i=o==null?void 0:o.weekStartsOn)!==null&&i!==void 0?i:o==null||(s=o.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&a!==void 0?a:m.weekStartsOn)!==null&&n!==void 0?n:(d=m.locale)===null||d===void 0||(u=d.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&t!==void 0?t:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=qe(e),f=h.getUTCDay(),y=(f<g?7:0)+f-g;return h.setUTCDate(h.getUTCDate()-y),h.setUTCHours(0,0,0,0),h}function Vl(e,o){var t,n,a,i,s,c,d,u;Te(1,arguments);var m=qe(e),g=m.getUTCFullYear(),h=Yr(),f=mo((t=(n=(a=(i=o==null?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:o==null||(s=o.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&a!==void 0?a:h.firstWeekContainsDate)!==null&&n!==void 0?n:(d=h.locale)===null||d===void 0||(u=d.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(g+1,0,f),y.setUTCHours(0,0,0,0);var k=Dr(y,o),b=new Date(0);b.setUTCFullYear(g,0,f),b.setUTCHours(0,0,0,0);var C=Dr(b,o);return m.getTime()>=k.getTime()?g+1:m.getTime()>=C.getTime()?g:g-1}function q0(e,o){var t,n,a,i,s,c,d,u;Te(1,arguments);var m=Yr(),g=mo((t=(n=(a=(i=o==null?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:o==null||(s=o.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&a!==void 0?a:m.firstWeekContainsDate)!==null&&n!==void 0?n:(d=m.locale)===null||d===void 0||(u=d.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&t!==void 0?t:1),h=Vl(e,o),f=new Date(0);f.setUTCFullYear(h,0,g),f.setUTCHours(0,0,0,0);var y=Dr(f,o);return y}var U0=6048e5;function G0(e,o){Te(1,arguments);var t=qe(e),n=Dr(t,o).getTime()-q0(t,o).getTime();return Math.round(n/U0)+1}function le(e,o){for(var t=e<0?"-":"",n=Math.abs(e).toString();n.length<o;)n="0"+n;return t+n}var Je={y:function(o,t){var n=o.getUTCFullYear(),a=n>0?n:1-n;return le(t==="yy"?a%100:a,t.length)},M:function(o,t){var n=o.getUTCMonth();return t==="M"?String(n+1):le(n+1,2)},d:function(o,t){return le(o.getUTCDate(),t.length)},a:function(o,t){var n=o.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(o,t){return le(o.getUTCHours()%12||12,t.length)},H:function(o,t){return le(o.getUTCHours(),t.length)},m:function(o,t){return le(o.getUTCMinutes(),t.length)},s:function(o,t){return le(o.getUTCSeconds(),t.length)},S:function(o,t){var n=t.length,a=o.getUTCMilliseconds(),i=Math.floor(a*Math.pow(10,n-3));return le(i,t.length)}},jo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Y0={G:function(o,t,n){var a=o.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(o,t,n){if(t==="yo"){var a=o.getUTCFullYear(),i=a>0?a:1-a;return n.ordinalNumber(i,{unit:"year"})}return Je.y(o,t)},Y:function(o,t,n,a){var i=Vl(o,a),s=i>0?i:1-i;if(t==="YY"){var c=s%100;return le(c,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):le(s,t.length)},R:function(o,t){var n=Pl(o);return le(n,t.length)},u:function(o,t){var n=o.getUTCFullYear();return le(n,t.length)},Q:function(o,t,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return le(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(o,t,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return le(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(o,t,n){var a=o.getUTCMonth();switch(t){case"M":case"MM":return Je.M(o,t);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(o,t,n){var a=o.getUTCMonth();switch(t){case"L":return String(a+1);case"LL":return le(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(o,t,n,a){var i=G0(o,a);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):le(i,t.length)},I:function(o,t,n){var a=O0(o);return t==="Io"?n.ordinalNumber(a,{unit:"week"}):le(a,t.length)},d:function(o,t,n){return t==="do"?n.ordinalNumber(o.getUTCDate(),{unit:"date"}):Je.d(o,t)},D:function(o,t,n){var a=L0(o);return t==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):le(a,t.length)},E:function(o,t,n){var a=o.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(o,t,n,a){var i=o.getUTCDay(),s=(i-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return le(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(o,t,n,a){var i=o.getUTCDay(),s=(i-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return le(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(o,t,n){var a=o.getUTCDay(),i=a===0?7:a;switch(t){case"i":return String(i);case"ii":return le(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(o,t,n){var a=o.getUTCHours(),i=a/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(o,t,n){var a=o.getUTCHours(),i;switch(a===12?i=jo.noon:a===0?i=jo.midnight:i=a/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(o,t,n){var a=o.getUTCHours(),i;switch(a>=17?i=jo.evening:a>=12?i=jo.afternoon:a>=4?i=jo.morning:i=jo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(o,t,n){if(t==="ho"){var a=o.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return Je.h(o,t)},H:function(o,t,n){return t==="Ho"?n.ordinalNumber(o.getUTCHours(),{unit:"hour"}):Je.H(o,t)},K:function(o,t,n){var a=o.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(a,{unit:"hour"}):le(a,t.length)},k:function(o,t,n){var a=o.getUTCHours();return a===0&&(a=24),t==="ko"?n.ordinalNumber(a,{unit:"hour"}):le(a,t.length)},m:function(o,t,n){return t==="mo"?n.ordinalNumber(o.getUTCMinutes(),{unit:"minute"}):Je.m(o,t)},s:function(o,t,n){return t==="so"?n.ordinalNumber(o.getUTCSeconds(),{unit:"second"}):Je.s(o,t)},S:function(o,t){return Je.S(o,t)},X:function(o,t,n,a){var i=a._originalDate||o,s=i.getTimezoneOffset();if(s===0)return"Z";switch(t){case"X":return Nn(s);case"XXXX":case"XX":return co(s);case"XXXXX":case"XXX":default:return co(s,":")}},x:function(o,t,n,a){var i=a._originalDate||o,s=i.getTimezoneOffset();switch(t){case"x":return Nn(s);case"xxxx":case"xx":return co(s);case"xxxxx":case"xxx":default:return co(s,":")}},O:function(o,t,n,a){var i=a._originalDate||o,s=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+On(s,":");case"OOOO":default:return"GMT"+co(s,":")}},z:function(o,t,n,a){var i=a._originalDate||o,s=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+On(s,":");case"zzzz":default:return"GMT"+co(s,":")}},t:function(o,t,n,a){var i=a._originalDate||o,s=Math.floor(i.getTime()/1e3);return le(s,t.length)},T:function(o,t,n,a){var i=a._originalDate||o,s=i.getTime();return le(s,t.length)}};function On(e,o){var t=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),i=n%60;if(i===0)return t+String(a);var s=o;return t+String(a)+s+le(i,2)}function Nn(e,o){if(e%60===0){var t=e>0?"-":"+";return t+le(Math.abs(e)/60,2)}return co(e,o)}function co(e,o){var t=o||"",n=e>0?"-":"+",a=Math.abs(e),i=le(Math.floor(a/60),2),s=le(a%60,2);return n+i+t+s}var qn=function(o,t){switch(o){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Al=function(o,t){switch(o){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},K0=function(o,t){var n=o.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return qn(o,t);var s;switch(a){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",qn(a,t)).replace("{{time}}",Al(i,t))},X0={p:Al,P:K0};function J0(e){var o=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return o.setUTCFullYear(e.getFullYear()),e.getTime()-o.getTime()}var Q0=["D","DD"],Z0=["YY","YYYY"];function eg(e){return Q0.indexOf(e)!==-1}function og(e){return Z0.indexOf(e)!==-1}function Un(e,o,t){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(o,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(o,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(o,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(o,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var rg={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},tg=function(o,t,n){var a,i=rg[o];return typeof i=="string"?a=i:t===1?a=i.one:a=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function lt(e){return function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=o.width?String(o.width):e.defaultWidth,n=e.formats[t]||e.formats[e.defaultWidth];return n}}var ng={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ag={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},lg={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ig={date:lt({formats:ng,defaultWidth:"full"}),time:lt({formats:ag,defaultWidth:"full"}),dateTime:lt({formats:lg,defaultWidth:"full"})},sg={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},cg=function(o,t,n,a){return sg[o]};function Uo(e){return function(o,t){var n=t!=null&&t.context?String(t.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,s=t!=null&&t.width?String(t.width):i;a=e.formattingValues[s]||e.formattingValues[i]}else{var c=e.defaultWidth,d=t!=null&&t.width?String(t.width):e.defaultWidth;a=e.values[d]||e.values[c]}var u=e.argumentCallback?e.argumentCallback(o):o;return a[u]}}var dg={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ug={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},pg={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},mg={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},gg={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},hg={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},fg=function(o,t){var n=Number(o),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},yg={ordinalNumber:fg,era:Uo({values:dg,defaultWidth:"wide"}),quarter:Uo({values:ug,defaultWidth:"wide",argumentCallback:function(o){return o-1}}),month:Uo({values:pg,defaultWidth:"wide"}),day:Uo({values:mg,defaultWidth:"wide"}),dayPeriod:Uo({values:gg,defaultWidth:"wide",formattingValues:hg,defaultFormattingWidth:"wide"})};function Go(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=o.match(a);if(!i)return null;var s=i[0],c=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(c)?bg(c,function(g){return g.test(s)}):xg(c,function(g){return g.test(s)}),u;u=e.valueCallback?e.valueCallback(d):d,u=t.valueCallback?t.valueCallback(u):u;var m=o.slice(s.length);return{value:u,rest:m}}}function xg(e,o){for(var t in e)if(e.hasOwnProperty(t)&&o(e[t]))return t}function bg(e,o){for(var t=0;t<e.length;t++)if(o(e[t]))return t}function kg(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=o.match(e.matchPattern);if(!n)return null;var a=n[0],i=o.match(e.parsePattern);if(!i)return null;var s=e.valueCallback?e.valueCallback(i[0]):i[0];s=t.valueCallback?t.valueCallback(s):s;var c=o.slice(a.length);return{value:s,rest:c}}}var Cg=/^(\d+)(th|st|nd|rd)?/i,Sg=/\d+/i,jg={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},wg={any:[/^b/i,/^(a|c)/i]},vg={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Tg={any:[/1/i,/2/i,/3/i,/4/i]},Ig={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Rg={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Fg={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},zg={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Mg={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Wg={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Hg={ordinalNumber:kg({matchPattern:Cg,parsePattern:Sg,valueCallback:function(o){return parseInt(o,10)}}),era:Go({matchPatterns:jg,defaultMatchWidth:"wide",parsePatterns:wg,defaultParseWidth:"any"}),quarter:Go({matchPatterns:vg,defaultMatchWidth:"wide",parsePatterns:Tg,defaultParseWidth:"any",valueCallback:function(o){return o+1}}),month:Go({matchPatterns:Ig,defaultMatchWidth:"wide",parsePatterns:Rg,defaultParseWidth:"any"}),day:Go({matchPatterns:Fg,defaultMatchWidth:"wide",parsePatterns:zg,defaultParseWidth:"any"}),dayPeriod:Go({matchPatterns:Mg,defaultMatchWidth:"any",parsePatterns:Wg,defaultParseWidth:"any"})},Pg={code:"en-US",formatDistance:tg,formatLong:ig,formatRelative:cg,localize:yg,match:Hg,options:{weekStartsOn:0,firstWeekContainsDate:1}},Vg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ag=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Eg=/^'([^]*?)'?$/,Dg=/''/g,$g=/[a-zA-Z]/;function Lg(e,o,t){var n,a,i,s,c,d,u,m,g,h,f,y,k,b;Te(2,arguments);var C=String(o),S=Yr(),w=(n=(a=void 0)!==null&&a!==void 0?a:S.locale)!==null&&n!==void 0?n:Pg,j=mo((i=(s=(c=(d=void 0)!==null&&d!==void 0?d:void 0)!==null&&c!==void 0?c:S.firstWeekContainsDate)!==null&&s!==void 0?s:(u=S.locale)===null||u===void 0||(m=u.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(j>=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var x=mo((g=(h=(f=(y=void 0)!==null&&y!==void 0?y:void 0)!==null&&f!==void 0?f:S.weekStartsOn)!==null&&h!==void 0?h:(k=S.locale)===null||k===void 0||(b=k.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&g!==void 0?g:0);if(!(x>=0&&x<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!w.localize)throw new RangeError("locale must contain localize property");if(!w.formatLong)throw new RangeError("locale must contain formatLong property");var v=qe(e);if(!A0(v))throw new RangeError("Invalid time value");var T=J0(v),F=D0(v,T),M={firstWeekContainsDate:j,weekStartsOn:x,locale:w,_originalDate:v},E=C.match(Ag).map(function(I){var V=I[0];if(V==="p"||V==="P"){var H=X0[V];return H(I,w.formatLong)}return I}).join("").match(Vg).map(function(I){if(I==="''")return"'";var V=I[0];if(V==="'")return _g(I);var H=Y0[V];if(H)return og(I)&&Un(I,o,String(e)),eg(I)&&Un(I,o,String(e)),H(F,I,w.localize,M);if(V.match($g))throw new RangeError("Format string contains an unescaped latin alphabet character `"+V+"`");return I}).join("");return E}function _g(e){var o=e.match(Eg);return o?o[1].replace(Dg,"'"):e}const El=()=>{const[e,o]=p.useState(!1),[t,n]=p.useState(!1),[a,i]=p.useState(Lg(new Date,"yyyy-MM-dd"));return{date:a,setDate:i,isHovered:e,setIsHovered:o,isFocused:t,setIsFocused:n}},Bg=e=>r.jsx(l.Input,{type:"date",...e}),Dl=({id:e,icon:o,name:t,label:n,date:a,children:i,helperText:s,shadow:c={},size:d="md",variant:u="default",shape:m="default",views:g={container:{},label:{},helperText:{},text:{},field:{}},error:h=!1,isHovered:f=!1,isFocused:y=!1,isDisabled:k=!1,isReadOnly:b=!1,setDate:C=()=>{},setIsFocused:S=()=>{},setIsHovered:w=()=>{},onChange:j,onChangeText:x,...v})=>{const{themeMode:T}=l.useTheme(),F=!!(y&&n),M=()=>w(!f),E=()=>S(!0),I=H=>{typeof H=="string"?(C(H),x&&x(H)):(C(H.target.value),j&&j(H.target.value))},V={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none",backgroundColor:"transparent"}},transition:"all 0.2s ease-in-out",fontSize:l.Typography.fontSizes[d],backgroundColor:"transparent",color:k?"color-gray-400":"color-gray-900",cursor:k?"not-allowed":b?"auto":"pointer",...g.field};return r.jsx(Xe,{helperText:s,error:h,views:g,children:r.jsx(no,{label:n,size:d,error:h,shape:m,views:g,shadow:c,color:"theme-primary",variant:u,value:a,isHovered:f,isDisabled:k,isReadOnly:b,isFocused:y,showLabel:F,onMouseEnter:M,onMouseLeave:M,children:r.jsxs(Bo,{children:[F&&r.jsx(go,{htmlFor:e,color:"theme-primary",error:h,views:g,children:n}),r.jsx(Bg,{id:e,name:t,onFocus:E,disabled:k,readOnly:b,...V,...v,...x&&{onChangeText:I},onChange:I})]})})})},Og=e=>{const o=El();return r.jsx(Dl,{...o,...e})},Ng=Og,$l=e=>{const o=dn(e),[t,n]=p.useState(!1);return{isVisible:t,setIsVisible:n,...e,...o}},Gn={xs:14,sm:16,md:16,lg:18,xl:20},qg=({visibleIcon:e,hiddenIcon:o,...t})=>{const{isVisible:n,setIsVisible:a,...i}=$l(t),s=Gn[t.size??"md"]??Gn.md,c=s-2;return r.jsx(cr,{...i,type:n?"text":"password",isClearable:!1,right:r.jsx(l.View,{display:"flex",alignItems:"center",justifyContent:"center",width:`${s}px`,height:`${s}px`,minWidth:`${s}px`,color:"color-gray-500",cursor:t.isDisabled?"not-allowed":"pointer",transition:"color 0.2s ease",onClick:()=>{t.isDisabled||a(!n)},children:n?e??r.jsx(Yt,{widthHeight:c}):o??r.jsx(Gt,{widthHeight:c})})})},Ug=qg,Ll=(e,o,t)=>{const[n,a]=p.useState(e),[i,s]=p.useState(o?{value:o,label:o}:e[0]),[c,d]=p.useState([]),[u,m]=p.useState(0),[g,h]=p.useState(t??""),[f,y]=p.useState(!1);return{filteredItems:n,setFilteredItems:a,selectedItem:i,setSelectedItem:s,selectedItems:c,setSelectedItems:d,highlightedIndex:u,setHighlightedIndex:m,searchQuery:g,setSearchQuery:h,isDropdownVisible:f,setIsDropdownVisible:y}},Gg={xs:12,sm:14,md:16,lg:20,xl:24},Yg={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)"},Yn={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"},initial:{opacity:0,transform:"translateY(-8px) scale(0.96)"}},Kg={padding:"8px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-100",backgroundColor:"color-gray-50",borderTopLeftRadius:10,borderTopRightRadius:10},Xg={padding:"8px 10px",cursor:"pointer",borderRadius:8,margin:"1px 4px",transition:"all 0.15s ease-in-out"},Jg={padding:"24px 16px",display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"},Kn={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},Qg={display:"inline-flex",alignItems:"center",gap:"4px",padding:"2px 8px",backgroundColor:"color-gray-100",borderRadius:8,fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},_l=({placeholder:e,items:o,showTick:t=!0,onSelect:n,searchEnabled:a=!0,left:i,right:s,label:c,filteredItems:d,setSelectedItem:u,selectedItem:m,selectedItems:g,setSelectedItems:h,highlightedIndex:f,setHighlightedIndex:y,searchQuery:k,setSearchQuery:b,setFilteredItems:C,views:S,isDropdownVisible:w,setIsDropdownVisible:j,isMulti:x=!1,searchPlaceholder:v,size:T="md",...F})=>{const{ref:M,relation:E}=l.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),I=p.useRef(null),[V,H]=p.useState(!1),[z,P]=p.useState(!1),R=()=>{var N;const $=z?Yn.enter:Yn.initial;if(!M.current)return{};const _=M.current.getBoundingClientRect(),B={position:"fixed",left:_.left,width:_.width,zIndex:1e4,...$};return((N=E==null?void 0:E.space)==null?void 0:N.vertical)==="top"?{...B,bottom:window.innerHeight-_.top+6}:{...B,top:_.bottom+6}};p.useEffect(()=>{if(w){const $=setTimeout(()=>P(!0),10);return()=>clearTimeout($)}P(!1)},[w]),p.useEffect(()=>{const $=_=>{!_.composedPath().some(N=>(N==null?void 0:N.id)==="combobox-dropdown")&&M.current&&!M.current.contains(_.target)&&j(!1)};return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[]);const W=$=>{if(b($),$==="")C(o);else{const _=o.filter(B=>B.label.toLowerCase().includes($.toLowerCase()));C(_)}y(0)},D=$=>{if(x){const _=g.some(G=>G.value===$.value);let B;_?B=g.filter(G=>G.value!==$.value):B=[...g,$],h(B),n==null||n(B)}else u($),n==null||n($),j(!1)},L=($,_)=>{$.stopPropagation();const B=g.filter(G=>G.value!==_.value);h(B),n==null||n(B)},O=$=>x?g.some(_=>_.value===$.value):$.value===m.value;return r.jsxs(l.Horizontal,{role:"combobox",flexWrap:"nowrap",gap:15,alignItems:"center",width:"100%",...F,children:[c&&r.jsx(l.Text,{views:S==null?void 0:S.label,htmlFor:F.id,children:c}),r.jsxs(l.View,{position:"relative",width:"100%",children:[r.jsx("div",{ref:M,onClick:()=>j(!w),style:{width:"100%"},children:r.jsxs(no,{size:T,isHovered:V,isFocused:w,onMouseEnter:()=>H(!0),onMouseLeave:()=>H(!1),cursor:"pointer",views:{container:S==null?void 0:S.container},children:[r.jsxs(l.Horizontal,{gap:10,alignItems:"center",flex:1,minWidth:0,flexWrap:x?"wrap":"nowrap",...S==null?void 0:S.labelContainer,children:[i,x?g.length>0?r.jsx(l.Horizontal,{gap:6,flexWrap:"wrap",alignItems:"center",children:g.map($=>r.jsxs(l.Horizontal,{...Qg,_hover:{backgroundColor:"color-gray-200"},children:[$.icon&&r.jsx(l.View,{flexShrink:0,children:$.icon}),r.jsx(l.Text,{size:"sm",color:"color-gray-700",weight:"medium",children:$.label}),r.jsx(ze,{widthHeight:12,color:"color-gray-500",cursor:"pointer",onClick:_=>L(_,$)})]},$.value))}):r.jsx(l.Text,{weight:"medium",flexGrow:1,color:"color-gray-500",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...S==null?void 0:S.label,children:e}):r.jsxs(r.Fragment,{children:[m.icon&&m.label!==e&&r.jsx(l.View,{children:m.icon}),r.jsx(l.Text,{weight:"medium",flexGrow:1,color:m.label===e?"color-gray-500":"color-gray-800",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...S==null?void 0:S.label,children:m.label})]})]}),r.jsxs(l.Horizontal,{gap:8,alignItems:"center",flexShrink:0,children:[s,r.jsx(l.View,{style:w?Kn.open:Kn.closed,children:r.jsx(de,{widthHeight:Gg[T],orientation:"down",color:w?"color-gray-700":"color-gray-400"})})]})]})}),w&&r.jsx(Bt,{children:r.jsxs(l.View,{ref:I,id:"combobox-dropdown",role:"listbox","aria-labelledby":F.id,...Yg,style:R(),...S==null?void 0:S.dropdown,children:[a&&r.jsx(l.View,{...Kg,children:r.jsx(cr,{id:`${F.id}-search`,name:`${F.name}-search`,width:"100%",type:"search",autoFocus:!0,value:k,onChange:$=>W($),hint:e||"Search...",isClearable:!1,left:r.jsx(Mr,{widthHeight:14,color:"color-gray-400"}),views:{container:{width:"100%",padding:"0",backgroundColor:"transparent",borderColor:"color-gray-200",...S==null?void 0:S.text},field:{fontSize:"13px"}}})}),d.length>0&&r.jsx(l.View,{margin:0,padding:"4px",children:d.map(($,_)=>{const B=O($),G=_===f;return r.jsxs(l.Horizontal,{role:"option","aria-selected":B,justifyContent:"space-between",alignItems:"center",...Xg,backgroundColor:B&&G?"color-blue-100":B?"color-blue-50":G?"color-gray-100":"transparent",onMouseEnter:()=>y(_),onClick:()=>D($),...S==null?void 0:S.item,children:[r.jsxs(l.Horizontal,{gap:8,alignItems:"center",children:[$.icon&&r.jsx(l.View,{flexShrink:0,children:$.icon}),r.jsx(l.Text,{size:"sm",color:B?"theme-primary":"color-gray-800",weight:B?"medium":"normal",children:$.label})]}),B&&t&&r.jsx(lr,{widthHeight:16,color:"theme-primary"})]},$.value)})}),d.length===0&&r.jsxs(l.Vertical,{...Jg,children:[r.jsx(Mr,{widthHeight:24,color:"color-gray-300"}),r.jsx(l.Text,{color:"color-gray-500",size:"sm",align:"center",children:"No results found"}),r.jsx(l.Text,{color:"color-gray-400",size:"xs",align:"center",children:"Try a different search term"})]})]})})]})]})},Zg=({id:e,name:o,items:t,placeholder:n,searchPlaceholder:a,...i})=>{const s=Ll(t,n,a);return r.jsx(_l,{id:e,name:o,items:t,...s,...i})},eh=Zg,Bl=e=>{const{tags:o,defaultTags:t=[],onTagsChange:n,onTagAdd:a,onTagRemove:i,maxTags:s,minTagLength:c=1,maxTagLength:d=50,allowDuplicates:u=!1,separators:m=["enter","comma"],isDisabled:g=!1,isReadOnly:h=!1}=e,[f,y]=p.useState(""),[k,b]=p.useState(()=>(o||t||[]).map((z,P)=>({id:`tag-${P}-${Date.now()}`,value:z}))),[C,S]=p.useState(!1),[w,j]=p.useState(!1),x=o&&Array.isArray(o)?o.map((H,z)=>({id:`tag-${z}-${Date.now()}`,value:H})):k;p.useEffect(()=>{o&&Array.isArray(o)&&b(o.map((H,z)=>({id:`tag-${z}-${Date.now()}`,value:H})))},[o]);const v=p.useCallback(H=>{const z=H.trim();return!(z.length<c||z.length>d||!u&&x.map(R=>R.value.toLowerCase()).includes(z.toLowerCase())||s&&x.length>=s)},[x,c,d,u,s]),T=p.useCallback(H=>{if(g||h)return;const z=H.trim();if(!z||!v(z))return;const P={id:`tag-${Date.now()}-${Math.random()}`,value:z},R=[...x,P],W=R.map(D=>D.value);o||b(R),n==null||n(W),a==null||a(z),y("")},[x,v,n,a,g,h,o]),F=p.useCallback(H=>{if(g||h)return;const z=x[H];if(!z)return;const P=x.filter((W,D)=>D!==H),R=P.map(W=>W.value);o||b(P),n==null||n(R),i==null||i(z.value,H)},[x,n,i,g,h,o]),M=p.useCallback(H=>{if(g||h)return;const z=H.target.value;if(m.includes("comma")&&z.includes(",")){const P=z.split(","),R=P[0],W=P.slice(1).join(",");R.trim()&&T(R),y(W);return}y(z)},[T,m,g,h]),E=p.useCallback(H=>{if(g||h)return;const{key:z}=H;if(m.includes("enter")&&z==="Enter"){H.preventDefault(),f.trim()&&T(f);return}if(m.includes("tab")&&z==="Tab"&&f.trim()){H.preventDefault(),T(f);return}if(m.includes("space")&&z===" "&&f.trim()){H.preventDefault(),T(f);return}if(z==="Backspace"&&!f&&x.length>0){H.preventDefault(),F(x.length-1);return}},[T,F,f,x,m,g,h]),I=p.useCallback(()=>{var H;S(!0),(H=e.onFocus)==null||H.call(e)},[e.onFocus]),V=p.useCallback(()=>{var H;S(!1),f.trim()&&T(f),(H=e.onBlur)==null||H.call(e)},[T,f,e.onBlur]);return{inputValue:f,setInputValue:y,tags:x,setTags:b,isFocused:C,setIsFocused:S,isHovered:w,setIsHovered:j,addTag:T,removeTag:F,handleInputChange:M,handleKeyDown:E,handleFocus:I,handleBlur:V,validateTag:v}},oh=({tag:e,onRemove:o,isRemovable:t,size:n,views:a,isDisabled:i,isReadOnly:s})=>{const[c,d]=p.useState(!1),u={xs:{padding:"2px 8px",fontSize:"10px",iconSize:10},sm:{padding:"4px 10px",fontSize:"12px",iconSize:12},md:{padding:"6px 14px",fontSize:"14px",iconSize:14},lg:{padding:"8px 16px",fontSize:"16px",iconSize:16},xl:{padding:"10px 18px",fontSize:"18px",iconSize:18}}[n]||{padding:"6px 14px",fontSize:"14px",iconSize:14};return r.jsxs(l.Horizontal,{alignItems:"center",gap:6,padding:u.padding,backgroundColor:"theme-primary-100",borderRadius:"9999px",borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary-250",transition:"all 0.15s ease-in-out",opacity:i?.6:1,maxWidth:"100%",minWidth:0,_hover:!i&&!s?{backgroundColor:"theme-primary-180",borderColor:"theme-primary-400"}:{},...a==null?void 0:a.tag,children:[r.jsx(l.Text,{fontSize:u.fontSize,color:i?"color-gray-400":"theme-primary",maxLines:1,minWidth:0,...a==null?void 0:a.tagText,children:e}),t&&!i&&!s&&r.jsx(l.View,{cursor:"pointer",padding:"2px",borderRadius:"50%",transition:"all 0.15s ease-in-out",backgroundColor:c?"color-red-100":"transparent",opacity:c?1:.7,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onClick:m=>{m.stopPropagation(),o()},_hover:{backgroundColor:"color-red-100"},...a==null?void 0:a.tagRemove,children:r.jsx(ze,{widthHeight:u.iconSize,color:c?"color-red-500":"color-gray-400"})})]})},Ol=({id:e,name:o,label:t,placeholder:n="Type and press Enter to add tags...",helperText:a,error:i=!1,inputValue:s="",tags:c=[],left:d,right:u,shadow:m={},views:g={},size:h="md",shape:f="default",variant:y="default",isDisabled:k=!1,isReadOnly:b=!1,isAutoFocus:C=!1,isRemovable:S=!0,isFocused:w=!1,isHovered:j=!1,maxTags:x,handleInputChange:v,handleKeyDown:T,handleFocus:F,handleBlur:M,removeTag:E,setIsHovered:I,onClick:V,setInputValue:H,setTags:z,setIsFocused:P,addTag:R,filteredItems:W,activeItemIndex:D,isMenuOpen:L,handleMenuItemSelect:O,defaultTags:$,onTagsChange:_,onTagAdd:B,onTagRemove:G,minTagLength:N,maxTagLength:A,allowDuplicates:Y,separators:J,menuItems:K,onMenuItemSelect:X,onFocus:ee,onBlur:te,validateTag:ae,...oe})=>{const{getColor:ie,themeMode:fe}=l.useTheme(),ne=!!(t&&(w||c.length>0||s)),se=x&&c.length>=x,Z={border:"none",outline:"none",backgroundColor:"transparent",fontSize:l.Typography.fontSizes[h],color:k?"color-gray-400":"color-gray-800",flex:1,minWidth:"120px",transition:"all 0.2s ease-in-out",...g==null?void 0:g.input};return r.jsx(Xe,{error:!!i,helperText:typeof i=="string"?i:a,views:g,...oe,children:r.jsxs(no,{label:t,shadow:m,value:c.length>0||s?"has-content":"",size:h,shape:f,variant:y,error:!!i,showLabel:ne,isFocused:w,isHovered:j,isDisabled:k,isReadOnly:b,views:{...g,container:{...g==null?void 0:g.container,...g==null?void 0:g.inputContainer}},onClick:V,onMouseEnter:()=>I==null?void 0:I(!0),onMouseLeave:()=>I==null?void 0:I(!1),children:[d,r.jsxs(Bo,{children:[t&&r.jsx(go,{size:h,error:!!i,views:g,children:t}),r.jsxs(l.Horizontal,{alignItems:"center",gap:8,flexWrap:"wrap",width:"100%",minHeight:l.Typography.fontSizes[h],padding:"0",...g==null?void 0:g.tagsContainer,children:[c.map((re,ue)=>r.jsx(oh,{tag:re.value,onRemove:()=>E==null?void 0:E(ue),isRemovable:S,size:h,views:g,isDisabled:k,isReadOnly:b},re.id)),!se&&r.jsx(l.Input,{id:e,name:o,type:"text",value:s,placeholder:c.length===0?n:"",disabled:k,readOnly:b,autoFocus:C,onChange:v,onKeyDown:T,onFocus:F,onBlur:M,autoComplete:"off",...Z}),se&&r.jsxs(l.Text,{fontSize:l.Typography.fontSizes[h],color:"color-gray-500",fontStyle:"italic",...g==null?void 0:g.placeholder,children:["Maximum ",x," tags reached"]})]})]}),u]})})},rh=e=>{const o=Bl(e),{tags:t,...n}=e;return r.jsx(Ol,{...o,...n})},th=rh;function nh(e){const o=setTimeout(e,0),t=setTimeout(e,10),n=setTimeout(e,50);return[o,t,n]}const Yo=(e,o)=>{console.log(`[OTPInput.state] ${e}`,o)},ah=e=>e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?e:Object.prototype.toString.call(e),Nl=({value:e,defaultValue:o="",length:t=6,onChange:n,onChangeText:a,onComplete:i,onKeyDown:s,onKeyPress:c,onBlur:d,onFocus:u,isReadOnly:m,isDisabled:g,pattern:h,stepValues:f,pasteTransformer:y})=>{var G,N;const k=e!==void 0,b=k?e:o,[C,S]=p.useState(String(b??"").slice(0,t)||""),[w,j]=p.useState(!1),[x,v]=p.useState(!1),[T,F]=p.useState(null),[M,E]=p.useState(null),I=p.useRef(null),V=p.useRef(null),H=p.useRef({value:C,onChange:n||(()=>{}),isIOS:typeof window<"u"&&((N=(G=window==null?void 0:window.CSS)==null?void 0:G.supports)==null?void 0:N.call(G,"-webkit-touch-callout","none"))}),z=p.useRef({prev:[null,null,"none"]}),P=h?typeof h=="string"?new RegExp(h):h:null;p.useEffect(()=>{if(k&&e!==C){const A=String(e??"").slice(0,t)||"";Yo("sync controlled value",{controlledValue:ah(e),previousValue:C,nextControlledValue:A,length:t}),S(A)}},[k,e,t,C]);const R=p.useCallback(A=>{let Y=A;if(f&&f.length>0&&A){const J=parseInt(A,10);if(!isNaN(J)){let K=f[0],X=Math.abs(J-K);for(let ee=1;ee<f.length;ee++){const te=Math.abs(J-f[ee]);te<X&&(X=te,K=f[ee])}Y=K.toString()}}Yo("setValue",{incomingValue:A,valueToSet:Y,length:t,isControlled:k,hasOnChange:!!n,hasOnChangeText:!!a,hasOnComplete:!!i,stepValues:f}),S(Y),n&&n(Y),a&&a(Y),i&&Y.length===t&&i(Y)},[n,a,i,t,f,k]),W=p.useCallback(A=>{A&&I.current!==A&&Object.defineProperty(I,"current",{value:A,writable:!0})},[]),D=p.useCallback(A=>{var K,X,ee,te;const Y=typeof A=="string"?A:((K=A==null?void 0:A.currentTarget)==null?void 0:K.value)??((X=A==null?void 0:A.target)==null?void 0:X.value)??((ee=A==null?void 0:A.nativeEvent)==null?void 0:ee.text)??"",J=String(Y).slice(0,t);if(Yo("handleChange normalized",{raw:Y,newValue:J,length:t,hasPattern:!!P}),J.length>0&&P&&!P.test(J)){Yo("handleChange rejected by pattern",{newValue:J,pattern:String(P)}),(te=A==null?void 0:A.preventDefault)==null||te.call(A);return}R(J),I.current&&(I.current.value=J)},[t,P,R,I]),L=p.useCallback(()=>{const A=I.current;if(A&&typeof A.setSelectionRange=="function"){const Y=typeof A.value=="string"?A.value.length:0,J=Math.min(Y,t-1),K=Y;A.setSelectionRange(J,K),F(J),E(K)}Yo("focus",{length:t,refHasDomSelection:!!(A&&typeof A.setSelectionRange=="function")}),j(!0),u&&u()},[t,u]),O=p.useCallback(A=>{j(!1),d&&d(A)},[d]),$=p.useCallback(A=>{s&&s(A)},[]),_=p.useCallback(A=>{c&&c(A)},[]),B=p.useCallback(A=>{const Y=I.current;if(!A.clipboardData||!Y)return;const J=A.clipboardData.getData("text/plain"),K=y?y(J):J;A.preventDefault();const X=Y.selectionStart||0,ee=Y.selectionEnd||0,oe=(X!==ee?C.slice(0,X)+K+C.slice(ee):C.slice(0,X)+K+C.slice(X)).slice(0,t);if(oe.length>0&&P&&!P.test(oe))return;Y.value=oe,R(oe),S(oe);const ie=Math.min(oe.length,t-1),fe=oe.length;Y.setSelectionRange(ie,fe),F(ie),E(fe)},[t,y,P,R,C,S]);return p.useEffect(()=>{const A=I.current,Y=V.current;if(!A||!Y||typeof document>"u")return;H.current.value!==A.value&&H.current.onChange&&H.current.onChange(A.value),z.current.prev=[A.selectionStart,A.selectionEnd,A.selectionDirection];function J(){if(document.activeElement!==A){F(null),E(null);return}const ae=(A==null?void 0:A.selectionStart)??null,oe=(A==null?void 0:A.selectionEnd)??null,ie=(A==null?void 0:A.selectionDirection)??null,fe=(A==null?void 0:A.maxLength)??0,ne=(A==null?void 0:A.value)??"",se=z.current.prev;let Z=-1,re=-1,ue="none";if(ne.length!==0&&ae!==null&&oe!==null){const Me=ae===oe,We=ae===ne.length&&ne.length<fe;if(Me&&!We){const Ie=ae;if(Ie===0)Z=0,re=1,ue="forward";else if(Ie===fe)Z=Ie-1,re=Ie,ue="backward";else if(fe>1&&ne.length>1){let Ae=0;if(se[0]!==null&&se[1]!==null){ue=Ie<se[1]?"backward":"forward";const He=se[0]===se[1]&&se[0]<fe;ue==="backward"&&!He&&(Ae=-1)}Z=Ae+Ie,re=Ae+Ie+1}}Z!==-1&&re!==-1&&Z!==re&&I.current&&I.current.setSelectionRange(Z,re,ue)}const U=Z!==-1?Z:ae,Q=re!==-1?re:oe,be=ue!=="none"?ue:ie;F(U),E(Q),z.current.prev=[U,Q,be]}document.addEventListener("selectionchange",J,{capture:!0}),J(),document.activeElement===A&&j(!0);const K=Y,X=()=>{var ae;K&&typeof((ae=K.style)==null?void 0:ae.setProperty)=="function"&&K.style.setProperty("--root-height",`${A.clientHeight}px`)};X();const ee=typeof window<"u"?window.ResizeObserver:void 0,te=typeof ee=="function"?new ee(X):null;return te==null||te.observe(A),()=>{document.removeEventListener("selectionchange",J,{capture:!0}),te==null||te.disconnect()}},[]),p.useEffect(()=>{typeof Event>"u"||nh(()=>{var X,ee,te;const A=I.current;A&&typeof A.dispatchEvent=="function"&&A.dispatchEvent(new Event("input"));const Y=(X=I.current)==null?void 0:X.selectionStart,J=(ee=I.current)==null?void 0:ee.selectionEnd,K=(te=I.current)==null?void 0:te.selectionDirection;Y!==null&&J!==null&&Y!==void 0&&J!==void 0&&(F(Y),E(J),z.current.prev=[Y,J,K||"none"])})},[C,w]),{value:C,setValue:R,isFocused:w,setIsFocused:j,isHovered:x,setIsHovered:v,inputRef:I,containerRef:V,mirrorSelectionStart:T,mirrorSelectionEnd:M,setMirrorSelectionStart:F,setMirrorSelectionEnd:E,setInputRef:W,handleChange:D,handleFocus:L,handleBlur:O,handleKeyDown:$,handleKeyPress:_,handlePaste:B}},lh=p.createContext({slots:[],isFocused:!1,isHovering:!1}),ih=`
7
7
  @keyframes blink {
8
8
  0%, 100% { opacity: 1; }
9
9
  50% { opacity: 0; }
@@ -20,17 +20,17 @@
20
20
  border-radius: 4px !important;
21
21
  width: 100% !important;
22
22
  }
23
- `;function xo(e,o){try{e.insertRule(o)}catch{console.error("input-otp could not insert CSS rule:",o)}}const Ll=({id:e,name:o,label:t,value:n="",length:a=6,onChange:i,onChangeText:s,onComplete:c,helperText:d,placeholder:u="",shadow:m,views:g={},size:h="md",shape:f="rounded",variant:y="outline",gap:b=8,type:k="text",error:C=!1,isFocused:j=!1,isHovered:w=!1,isDisabled:S=!1,isReadOnly:x=!1,isAutoFocus:v=!1,setValue:T,setIsFocused:R,setIsHovered:M,inputRef:E,containerRef:I,mirrorSelectionStart:V,mirrorSelectionEnd:P,setMirrorSelectionStart:z,setMirrorSelectionEnd:W,handlePaste:F,handleChange:H,handleFocus:D,handleBlur:L,handleKeyDown:B,handleKeyPress:$,secureTextEntry:O,isFirstColumn:N,stepValues:_,setInputRef:Y,onBlur:A=()=>{},onClick:G=()=>{},onFocus:Q=()=>{},onKeyPress:X,pattern:K,pasteTransformer:oe,...te})=>{l.useTheme();const re=!!t,U=p.useMemo(()=>({slots:Array.from({length:a}).map((J,ee)=>{const ie=j&&V!==null&&P!==null&&(V===P&&ee===V||ee>=V&&ee<P),ae=n[ee]!==void 0?n[ee]:null,ue=n[0]!==void 0?null:(u==null?void 0:u[ee])??null;return{char:ae,placeholderChar:ue,isActive:ie,hasFakeCaret:ie&&ae===null}}),isFocused:j,isHovering:!S&&w}),[j,w,S,a,P,V,u,n]);p.useEffect(()=>{v&&E.current&&E.current.focus()},[v,E]),p.useEffect(()=>{if(!document.getElementById("input-otp-style")){const J=document.createElement("style");if(J.id="input-otp-style",document.head.appendChild(J),J.sheet){const ee="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";xo(J.sheet,"@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }"),xo(J.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),xo(J.sheet,`[data-input-otp]:autofill { ${ee} }`),xo(J.sheet,`[data-input-otp]:-webkit-autofill { ${ee} }`),xo(J.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),xo(J.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}},[]);const Z=()=>r.jsx(l.Horizontal,{gap:b,width:"100%",justifyContent:"center",minHeight:h==="xs"?"32px":h==="sm"?"36px":h==="md"?"40px":h==="lg"?"48px":"56px",...g.container,children:U.slots.map((J,ee)=>r.jsxs(Ze,{size:h,error:C,shape:f,views:g,variant:y,value:J.char||"",color:"theme-primary",isHovered:w,isDisabled:S,isReadOnly:x,isFocused:J.isActive,showLabel:!1,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),justifyContent:"center",alignItems:"center",width:"100%",position:"relative",height:h==="xs"?"32px":h==="sm"?"36px":h==="md"?"40px":h==="lg"?"48px":"56px",...g.container,children:[J.char?r.jsx(l.View,{textAlign:"center",fontSize:h==="xs"?"14px":h==="sm"?"16px":h==="md"?"18px":h==="lg"?"20px":"24px",fontWeight:"medium",...g.text,children:k==="password"?"•":J.char}):J.placeholderChar?r.jsx(l.View,{textAlign:"center",fontSize:h==="xs"?"14px":h==="sm"?"16px":h==="md"?"18px":h==="lg"?"20px":"24px",color:"color-gray-400",opacity:.5,...g.text,children:J.placeholderChar}):null,J.hasFakeCaret&&r.jsx(l.View,{position:"absolute",width:"2px",height:"60%",backgroundColor:"theme-primary",animation:"blink 1s step-start infinite",style:{animationName:"blink",animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"step-start"}})]},`${e||o}-${ee}`))}),le={position:"absolute",inset:0,width:"100%",height:"100%",display:"flex",textAlign:"center",opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"};return r.jsxs(r.Fragment,{children:[r.jsx("noscript",{children:r.jsx("style",{children:oh})}),r.jsxs(qe,{helperText:d,error:C,views:g,...te,children:[re&&r.jsx(io,{htmlFor:e,color:"theme-primary",error:C,...g.label,children:t}),r.jsxs(l.View,{ref:I,"data-input-otp-container":!0,position:"relative",cursor:S?"default":"text",userSelect:"none",pointerEvents:"none",children:[r.jsx(eh.Provider,{value:U,children:Z()}),r.jsx(l.View,{position:"absolute",inset:0,pointerEvents:"none",children:r.jsx(l.Input,{ref:J=>Y(J),"data-input-otp":!0,"data-input-otp-placeholder-shown":n.length===0||void 0,"data-input-otp-mss":V,"data-input-otp-mse":P,id:e||o,name:o,type:k==="password"?"password":"text",inputMode:k!=="password"?"numeric":void 0,pattern:"[0-9]*",maxLength:a,readOnly:x,disabled:S,placeholder:u,value:n,onChange:H,onKeyDown:B,onPaste:F,onFocus:D,onBlur:L,onClick:G,onMouseOver:()=>M(!0),onMouseLeave:()=>M(!1),autoComplete:"one-time-code","aria-label":`OTP input with ${a} digits`,style:le,...g.input})})]})]})]})},rh=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},th=(e,o)=>{console.log(`[OTPInput] ${e}`,o)},Un=e=>e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?e:Object.prototype.toString.call(e),nh=e=>{const{value:o}=e,{value:t,setValue:n,isFocused:a,setIsFocused:i,isHovered:s,setIsHovered:c,inputRef:d,containerRef:u,mirrorSelectionStart:m,mirrorSelectionEnd:g,setMirrorSelectionStart:h,setMirrorSelectionEnd:f,setInputRef:y,handleChange:b,handleFocus:k,handleBlur:C,handleKeyDown:j,handlePaste:w,handleKeyPress:S}=$l(e),v=rh(o!==void 0?o:t);return th("render",{name:e.name,controlledValue:Un(o),internalValue:Un(t),displayValue:v,length:e.length||6,hasOnChange:!!e.onChange,hasOnChangeText:!!e.onChangeText}),r.jsx(Ll,{...e,value:v,setValue:n,isFocused:a,setIsFocused:i,isHovered:s,setIsHovered:c,inputRef:d,containerRef:u,mirrorSelectionStart:m,mirrorSelectionEnd:g,setMirrorSelectionStart:h,setMirrorSelectionEnd:f,setInputRef:y,handleChange:b,handleFocus:k,handleBlur:C,handleKeyDown:j,handleKeyPress:S,handlePaste:w,stepValues:e.stepValues})},_l=nh,Bl=p.createContext({active:!1,focusNextInput:()=>{},setInputRef:()=>{},handleSubmitEditing:()=>{},getReturnKeyType:()=>"next"}),ah=()=>p.useContext(Bl),lh=({children:e,autoFocus:o=!1,initFocus:t,onChange:n=()=>{},...a})=>{const i=He.useFormikContext();p.useEffect(()=>{n(i.values)},[i.values]);const s=p.useRef({}),c=p.useRef([]),d=(g,h)=>{s.current[g]=h,h&&!c.current.includes(g)&&c.current.push(g)},u=g=>{var h,f;if(o){const b=c.current.indexOf(g)+1;b<c.current.length?(h=s.current[c.current[b]])==null||h.focus():(f=i.submitForm)==null||f.call(i)}},m={active:o,focusNextInput:u,setInputRef:d,handleSubmitEditing:u,getReturnKeyType:g=>c.current.indexOf(g)===c.current.length-1?"done":"next"};return p.useEffect(()=>{var g,h;o&&(t&&s.current[t]?(g=s.current[t])==null||g.focus():c.current[0]&&((h=s.current[c.current[0]])==null||h.focus()))},[o,t]),r.jsx(Bl.Provider,{value:m,children:r.jsx(l.Form,{...a,children:e})})},ih=e=>{switch(e){case"email":return{autoCorrect:"off",inputMode:"email",autoCapitalize:"none"};case"password":return{autoCorrect:"off",secureTextEntry:!0,autoCapitalize:"none"};case"digits":return{inputMode:"tel"};case"numeric":return{inputMode:"numeric"};case"name":return{autoCorrect:"off"};default:return{}}},fe=({name:e,type:o,...t},n={})=>{const a=ah(),{touched:i,errors:s,submitCount:c,values:d,setFieldTouched:u,setFieldValue:m}=He.useFormikContext(),g=x=>{var v;m(e,x),(v=t.onChangeText)==null||v.call(t,x)},h=x=>{var v;m(e,x),(v=t.onChange)==null||v.call(t,x)},f=()=>{u(e,!0)},y=x=>{x.key==="Enter"&&(x.preventDefault(),a.focusNextInput(e))},b=["text","password","email","digits"].includes(o),k=He.getIn(i,e)||c>0?He.getIn(s,e):void 0,C=He.getIn(d,e),j=typeof document<"u"&&typeof document.createElement=="function",w=!!n.focusable&&a.active,S=w?j?{onKeyPress:y}:{returnKeyType:a.getReturnKeyType(e),onSubmitEditing:()=>a.handleSubmitEditing(e),blurOnSubmit:!1}:{};return{...ih(o),...t,value:C,error:k,onBlur:f,...b?{onChangeText:g}:{onChange:h},...S,...w?{inputRef:x=>a.setInputRef(e,x)}:{}}},sh=e=>{let{value:o,...t}=fe(e);t.isChecked=o;const n=jl(e);return r.jsx(wl,{...n,...t})},ch=sh,Ol=({defaultIsSelected:e=!1,isChecked:o})=>{const[t,n]=p.useState(!1),[a,i]=p.useState(o!==void 0?o:e);return p.useEffect(()=>{o!==void 0&&i(o)},[o]),{isHovered:t,setIsHovered:n,isSelected:a,setIsSelected:i}},dh={xs:{height:"16px",width:"16px"},sm:{height:"20px",width:"20px"},md:{height:"24px",width:"24px"},lg:{height:"28px",width:"28px"},xl:{height:"32px",width:"32px"}},uh={xs:{height:"8px",width:"8px"},sm:{height:"10px",width:"10px"},md:{height:"12px",width:"12px"},lg:{height:"14px",width:"14px"},xl:{height:"16px",width:"16px"}},ph={selected:{borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid"},unselected:{borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"}}},mh={selected:{backgroundColor:"theme-primary"},unselected:{style:{backgroundColor:"transparent"}}},nt={hover:{selected:{borderColor:"color-blue-600"},unselected:{borderColor:"color-gray-400"}},disabled:{selected:{borderColor:"color-gray-300",opacity:.6},unselected:{borderColor:"color-gray-300",opacity:.6}},error:{selected:{borderColor:"color-red-500"},unselected:{borderColor:"color-red-500"}}},at={hover:{selected:{backgroundColor:"color-blue-600"},unselected:{style:{backgroundColor:"transparent"}}},disabled:{selected:{backgroundColor:"color-gray-300",opacity:.6},unselected:{opacity:.6,style:{backgroundColor:"transparent"}}},error:{selected:{backgroundColor:"color-red-500"},unselected:{style:{backgroundColor:"transparent"}}}},Nl=({id:e,icon:o,name:t,label:n,value:a,isChecked:i,onChange:s,onValueChange:c,shadow:d={},labelPosition:u="right",size:m="md",error:g=!1,isSelected:h=!1,isHovered:f=!1,isDisabled:y=!1,isReadOnly:b=!1,defaultIsSelected:k=!1,setIsSelected:C=()=>{},setIsHovered:j=()=>{},views:w={radio:{},label:{}},infoText:S,helperText:x,...v})=>{const T=()=>j(!f),R=()=>{!b&&!y&&(C&&C(!0),s&&s(a),c&&c(a))},M=i||h?"selected":"unselected",E=g?nt.error[M]:y?nt.disabled[M]:f?nt.hover[M]:{},I=g?at.error[M]:y?at.disabled[M]:f?at.hover[M]:{},V={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",selected:{borderColor:"theme-primary"},color:g?"color-red-600":y?"color-gray-400":"inherit",cursor:y?"not-allowed":b?"default":"pointer",opacity:y?.6:1,transition:"all 0.2s ease-in-out",...w.label},radio:{...ph[M],...E,borderRadius:"50%",selected:{backgroundColor:"theme-primary"},backgroundColor:"color-white",...dh[m],transition:"all 0.2s ease-in-out",...d,...w.radio},dot:{...mh[M],...I,borderRadius:"50%",...uh[m],transition:"all 0.2s ease-in-out"}};return r.jsxs(tr,{htmlFor:e,as:"div",onClick:R,onMouseEnter:T,onMouseLeave:T,size:l.Typography.fontSizes[m],...V.container,...v,children:[r.jsxs(l.Vertical,{gap:8,children:[" ",r.jsxs(l.Horizontal,{gap:12,alignItems:"center",children:[" ",u==="left"&&n&&r.jsx(l.Text,{size:m,fontWeight:"500",...w==null?void 0:w.label,children:n}),r.jsx(l.Center,{...V.radio,children:(i||h)&&r.jsx(l.View,{...V.dot})}),u==="right"&&n&&r.jsx(l.Text,{size:m,fontWeight:"500",...w==null?void 0:w.label,children:n})]}),S&&r.jsx(l.Text,{marginLeft:u==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...w==null?void 0:w.infoText,children:S})]}),g&&r.jsx(l.Text,{size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"color 0.2s ease, opacity 0.2s ease",children:g})]})},gh=e=>{let{value:o,...t}=fe(e);t.isChecked=o===e.value;const n=Ol(e);return r.jsx(Nl,{...n,...t})},hh=gh,ql=e=>{const{value:o,onChange:t,onSubmit:n,autoFocus:a=!0,loading:i=!1,disabled:s=!1,isAgentRunning:c=!1,onStopAgent:d,sandboxId:u,onUploadProgress:m,onUploadSuccess:g,onUploadError:h,onFileUpload:f}=e,y=o!==void 0&&t!==void 0,[b,k]=p.useState(""),C=y?o:b,[j,w]=p.useState([]),[S,x]=p.useState([]),[v,T]=p.useState(!1),[R,M]=p.useState(0),[E,I]=p.useState([]),[V,P]=p.useState(!1),z=p.useRef(null),[W,F]=p.useState(!1),[H,D]=p.useState("gpt-4"),[L]=p.useState([{id:"gpt-3.5-turbo",name:"GPT-3.5"},{id:"gpt-4",name:"GPT-4"},{id:"gpt-4-thinking",name:"GPT-4 (Thinking)",isThinking:!0},{id:"claude-3-5-sonnet",name:"Claude 3.5 Sonnet"}]),B=p.useRef(null),$=p.useRef(null),[O,N]=p.useState(e.showGuideTip||!1);p.useEffect(()=>{a&&B.current&&B.current.focus()},[a]),p.useEffect(()=>()=>{j.forEach(J=>{})},[j]);const _=J=>{y&&t?t(J):k(J)},Y=J=>{if(J.preventDefault(),!C.trim()&&j.length===0||i||s&&!c)return;if(c&&d){d();return}let ee=C;if(j.length>0){const ue=j.map(Re=>`[Uploaded File: ${URL.createObjectURL(Re)}}]`).join(`
24
- `);ee=ee?`${ee}
23
+ `;function wo(e,o){try{e.insertRule(o)}catch{console.error("input-otp could not insert CSS rule:",o)}}const ql=({id:e,name:o,label:t,value:n="",length:a=6,onChange:i,onChangeText:s,onComplete:c,helperText:d,placeholder:u="",shadow:m,views:g={},size:h="md",shape:f="rounded",variant:y="outline",gap:k=8,type:b="text",error:C=!1,isFocused:S=!1,isHovered:w=!1,isDisabled:j=!1,isReadOnly:x=!1,isAutoFocus:v=!1,setValue:T,setIsFocused:F,setIsHovered:M,inputRef:E,containerRef:I,mirrorSelectionStart:V,mirrorSelectionEnd:H,setMirrorSelectionStart:z,setMirrorSelectionEnd:P,handlePaste:R,handleChange:W,handleFocus:D,handleBlur:L,handleKeyDown:O,handleKeyPress:$,secureTextEntry:_,isFirstColumn:B,stepValues:G,setInputRef:N,onBlur:A=()=>{},onClick:Y=()=>{},onFocus:J=()=>{},onKeyPress:K,pattern:X,pasteTransformer:ee,...te})=>{l.useTheme();const ae=!!t,oe=p.useMemo(()=>({slots:Array.from({length:a}).map((ne,se)=>{const Z=S&&V!==null&&H!==null&&(V===H&&se===V||se>=V&&se<H),re=n[se]!==void 0?n[se]:null,ue=n[0]!==void 0?null:(u==null?void 0:u[se])??null;return{char:re,placeholderChar:ue,isActive:Z,hasFakeCaret:Z&&re===null}}),isFocused:S,isHovering:!j&&w}),[S,w,j,a,H,V,u,n]);p.useEffect(()=>{v&&E.current&&E.current.focus()},[v,E]),p.useEffect(()=>{if(!document.getElementById("input-otp-style")){const ne=document.createElement("style");if(ne.id="input-otp-style",document.head.appendChild(ne),ne.sheet){const se="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";wo(ne.sheet,"@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }"),wo(ne.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),wo(ne.sheet,`[data-input-otp]:autofill { ${se} }`),wo(ne.sheet,`[data-input-otp]:-webkit-autofill { ${se} }`),wo(ne.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),wo(ne.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}},[]);const ie=()=>r.jsx(l.Horizontal,{gap:k,width:"100%",justifyContent:"center",minHeight:h==="xs"?"32px":h==="sm"?"36px":h==="md"?"40px":h==="lg"?"48px":"56px",...g.container,children:oe.slots.map((ne,se)=>r.jsxs(no,{size:h,error:C,shape:f,views:g,variant:y,value:ne.char||"",color:"theme-primary",isHovered:w,isDisabled:j,isReadOnly:x,isFocused:ne.isActive,showLabel:!1,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),justifyContent:"center",alignItems:"center",width:"100%",position:"relative",height:h==="xs"?"32px":h==="sm"?"36px":h==="md"?"40px":h==="lg"?"48px":"56px",...g.container,children:[ne.char?r.jsx(l.View,{textAlign:"center",fontSize:h==="xs"?"14px":h==="sm"?"16px":h==="md"?"18px":h==="lg"?"20px":"24px",fontWeight:"medium",...g.text,children:b==="password"?"•":ne.char}):ne.placeholderChar?r.jsx(l.View,{textAlign:"center",fontSize:h==="xs"?"14px":h==="sm"?"16px":h==="md"?"18px":h==="lg"?"20px":"24px",color:"color-gray-400",opacity:.5,...g.text,children:ne.placeholderChar}):null,ne.hasFakeCaret&&r.jsx(l.View,{position:"absolute",width:"2px",height:"60%",backgroundColor:"theme-primary",animation:"blink 1s step-start infinite",style:{animationName:"blink",animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"step-start"}})]},`${e||o}-${se}`))}),fe={position:"absolute",inset:0,width:"100%",height:"100%",display:"flex",textAlign:"center",opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"};return r.jsxs(r.Fragment,{children:[r.jsx("noscript",{children:r.jsx("style",{children:ih})}),r.jsxs(Xe,{helperText:d,error:C,views:g,...te,children:[ae&&r.jsx(go,{htmlFor:e,color:"theme-primary",error:C,...g.label,children:t}),r.jsxs(l.View,{ref:I,"data-input-otp-container":!0,position:"relative",cursor:j?"default":"text",userSelect:"none",pointerEvents:"none",children:[r.jsx(lh.Provider,{value:oe,children:ie()}),r.jsx(l.View,{position:"absolute",inset:0,pointerEvents:"none",children:r.jsx(l.Input,{ref:ne=>N(ne),"data-input-otp":!0,"data-input-otp-placeholder-shown":n.length===0||void 0,"data-input-otp-mss":V,"data-input-otp-mse":H,id:e||o,name:o,type:b==="password"?"password":"text",inputMode:b!=="password"?"numeric":void 0,pattern:"[0-9]*",maxLength:a,readOnly:x,disabled:j,placeholder:u,value:n,onChange:W,onKeyDown:O,onPaste:R,onFocus:D,onBlur:L,onClick:Y,onMouseOver:()=>M(!0),onMouseLeave:()=>M(!1),autoComplete:"one-time-code","aria-label":`OTP input with ${a} digits`,style:fe,...g.input})})]})]})]})},sh=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},ch=(e,o)=>{console.log(`[OTPInput] ${e}`,o)},Xn=e=>e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?e:Object.prototype.toString.call(e),dh=e=>{const{value:o}=e,{value:t,setValue:n,isFocused:a,setIsFocused:i,isHovered:s,setIsHovered:c,inputRef:d,containerRef:u,mirrorSelectionStart:m,mirrorSelectionEnd:g,setMirrorSelectionStart:h,setMirrorSelectionEnd:f,setInputRef:y,handleChange:k,handleFocus:b,handleBlur:C,handleKeyDown:S,handlePaste:w,handleKeyPress:j}=Nl(e),v=sh(o!==void 0?o:t);return ch("render",{name:e.name,controlledValue:Xn(o),internalValue:Xn(t),displayValue:v,length:e.length||6,hasOnChange:!!e.onChange,hasOnChangeText:!!e.onChangeText}),r.jsx(ql,{...e,value:v,setValue:n,isFocused:a,setIsFocused:i,isHovered:s,setIsHovered:c,inputRef:d,containerRef:u,mirrorSelectionStart:m,mirrorSelectionEnd:g,setMirrorSelectionStart:h,setMirrorSelectionEnd:f,setInputRef:y,handleChange:k,handleFocus:b,handleBlur:C,handleKeyDown:S,handleKeyPress:j,handlePaste:w,stepValues:e.stepValues})},Ul=dh,Gl=p.createContext({active:!1,focusNextInput:()=>{},setInputRef:()=>{},handleSubmitEditing:()=>{},getReturnKeyType:()=>"next"}),uh=()=>p.useContext(Gl),ph=({children:e,autoFocus:o=!1,initFocus:t,onChange:n=()=>{},...a})=>{const i=Le.useFormikContext();p.useEffect(()=>{n(i.values)},[i.values]);const s=p.useRef({}),c=p.useRef([]),d=(f,y)=>{s.current[f]=y,y&&!c.current.includes(f)&&c.current.push(f)},u=f=>{var y,k;if(o){const C=c.current.indexOf(f)+1;C<c.current.length?(y=s.current[c.current[C]])==null||y.focus():(k=i.submitForm)==null||k.call(i)}},m={active:o,focusNextInput:u,setInputRef:d,handleSubmitEditing:u,getReturnKeyType:f=>c.current.indexOf(f)===c.current.length-1?"done":"next"};p.useEffect(()=>{var f,y;o&&(t&&s.current[t]?(f=s.current[t])==null||f.focus():c.current[0]&&((y=s.current[c.current[0]])==null||y.focus()))},[o,t]);const h=typeof document<"u"&&typeof document.createElement=="function"?{onSubmit:i.handleSubmit,onReset:i.handleReset}:{};return r.jsx(Gl.Provider,{value:m,children:r.jsx(l.Form,{...a,...h,children:e})})},mh=e=>{switch(e){case"email":return{autoCorrect:"off",inputMode:"email",autoCapitalize:"none"};case"password":return{autoCorrect:"off",secureTextEntry:!0,autoCapitalize:"none"};case"digits":return{inputMode:"tel"};case"numeric":return{inputMode:"numeric"};case"name":return{autoCorrect:"off"};default:return{}}},xe=({name:e,type:o,...t},n={})=>{const a=uh(),{touched:i,errors:s,submitCount:c,values:d,setFieldTouched:u,setFieldValue:m}=Le.useFormikContext(),g=x=>{var v;m(e,x),(v=t.onChangeText)==null||v.call(t,x)},h=x=>{var v;m(e,x),(v=t.onChange)==null||v.call(t,x)},f=()=>{u(e,!0)},y=x=>{x.key==="Enter"&&(x.preventDefault(),a.focusNextInput(e))},k=["text","password","email","digits"].includes(o),b=Le.getIn(i,e)||c>0?Le.getIn(s,e):void 0,C=Le.getIn(d,e),S=typeof document<"u"&&typeof document.createElement=="function",w=!!n.focusable&&a.active,j=w?S?{onKeyPress:y}:{returnKeyType:a.getReturnKeyType(e),onSubmitEditing:()=>a.handleSubmitEditing(e),blurOnSubmit:!1}:{};return{...mh(o),...t,value:C,error:b,onBlur:f,...k?{onChangeText:g}:{onChange:h},...j,...w?{inputRef:x=>a.setInputRef(e,x)}:{}}},gh=e=>{let{value:o,...t}=xe(e);t.isChecked=o;const n=Rl(e);return r.jsx(Fl,{...n,...t})},hh=gh,Yl=({defaultIsSelected:e=!1,isChecked:o})=>{const[t,n]=p.useState(!1),[a,i]=p.useState(o!==void 0?o:e);return p.useEffect(()=>{o!==void 0&&i(o)},[o]),{isHovered:t,setIsHovered:n,isSelected:a,setIsSelected:i}},fh={xs:{height:"16px",width:"16px"},sm:{height:"20px",width:"20px"},md:{height:"24px",width:"24px"},lg:{height:"28px",width:"28px"},xl:{height:"32px",width:"32px"}},yh={xs:{height:"8px",width:"8px"},sm:{height:"10px",width:"10px"},md:{height:"12px",width:"12px"},lg:{height:"14px",width:"14px"},xl:{height:"16px",width:"16px"}},xh={selected:{borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid"},unselected:{borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"}}},bh={selected:{backgroundColor:"theme-primary"},unselected:{style:{backgroundColor:"transparent"}}},it={hover:{selected:{borderColor:"color-blue-600"},unselected:{borderColor:"color-gray-400"}},disabled:{selected:{borderColor:"color-gray-300",opacity:.6},unselected:{borderColor:"color-gray-300",opacity:.6}},error:{selected:{borderColor:"color-red-500"},unselected:{borderColor:"color-red-500"}}},st={hover:{selected:{backgroundColor:"color-blue-600"},unselected:{style:{backgroundColor:"transparent"}}},disabled:{selected:{backgroundColor:"color-gray-300",opacity:.6},unselected:{opacity:.6,style:{backgroundColor:"transparent"}}},error:{selected:{backgroundColor:"color-red-500"},unselected:{style:{backgroundColor:"transparent"}}}},Kl=({id:e,icon:o,name:t,label:n,value:a,isChecked:i,onChange:s,onValueChange:c,shadow:d={},labelPosition:u="right",size:m="md",error:g=!1,isSelected:h=!1,isHovered:f=!1,isDisabled:y=!1,isReadOnly:k=!1,defaultIsSelected:b=!1,setIsSelected:C=()=>{},setIsHovered:S=()=>{},views:w={radio:{},label:{}},infoText:j,helperText:x,...v})=>{const T=()=>S(!f),F=()=>{!k&&!y&&(C&&C(!0),s&&s(a??""),c&&c(a??""))},M=i||h?"selected":"unselected",E=g?it.error[M]:y?it.disabled[M]:f?it.hover[M]:{},I=g?st.error[M]:y?st.disabled[M]:f?st.hover[M]:{},V={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",selected:{borderColor:"theme-primary"},color:g?"color-red-600":y?"color-gray-400":"inherit",cursor:y?"not-allowed":k?"default":"pointer",opacity:y?.6:1,transition:"all 0.2s ease-in-out",...w.label},radio:{...xh[M],...E,borderRadius:"50%",selected:{backgroundColor:"theme-primary"},backgroundColor:"color-white",...fh[m],transition:"all 0.2s ease-in-out",...d,...w.radio},dot:{...bh[M],...I,borderRadius:"50%",...yh[m],transition:"all 0.2s ease-in-out"}};return r.jsxs(sr,{htmlFor:e,as:"div",onClick:F,onMouseEnter:T,onMouseLeave:T,size:l.Typography.fontSizes[m],...V.container,...v,children:[r.jsxs(l.Vertical,{gap:8,children:[" ",r.jsxs(l.Horizontal,{gap:12,alignItems:"center",children:[" ",u==="left"&&n&&r.jsx(l.Text,{size:m,fontWeight:"500",...w==null?void 0:w.label,children:n}),r.jsx(l.Center,{...V.radio,children:(i||h)&&r.jsx(l.View,{...V.dot})}),u==="right"&&n&&r.jsx(l.Text,{size:m,fontWeight:"500",...w==null?void 0:w.label,children:n})]}),j&&r.jsx(l.Text,{marginLeft:u==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...w==null?void 0:w.infoText,children:j})]}),g&&r.jsx(l.Text,{size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"color 0.2s ease, opacity 0.2s ease",children:g})]})},kh=e=>{let{value:o,...t}=xe(e);t.isChecked=o===e.value;const n=Yl(e);return r.jsx(Kl,{...n,...t})},Ch=kh,Xl=e=>{const{value:o,onChange:t,onSubmit:n,autoFocus:a=!0,loading:i=!1,disabled:s=!1,isAgentRunning:c=!1,onStopAgent:d,sandboxId:u,onUploadProgress:m,onUploadSuccess:g,onUploadError:h,onFileUpload:f}=e,y=o!==void 0&&t!==void 0,[k,b]=p.useState(""),C=y?o:k,[S,w]=p.useState([]),[j,x]=p.useState([]),[v,T]=p.useState(!1),[F,M]=p.useState(0),[E,I]=p.useState([]),[V,H]=p.useState(!1),z=p.useRef(null),[P,R]=p.useState(!1),[W,D]=p.useState("gpt-4"),[L]=p.useState([{id:"gpt-3.5-turbo",name:"GPT-3.5"},{id:"gpt-4",name:"GPT-4"},{id:"gpt-4-thinking",name:"GPT-4 (Thinking)",isThinking:!0},{id:"claude-3-5-sonnet",name:"Claude 3.5 Sonnet"}]),O=p.useRef(null),$=p.useRef(null),_=p.useRef(null),[B,G]=p.useState(e.showGuideTip||!1);p.useEffect(()=>{a&&O.current&&O.current.focus()},[a]),p.useEffect(()=>()=>{S.forEach(Z=>{})},[S]);const N=Z=>{y&&t?t(Z):b(Z)},A=Z=>{const re=_.current;if(re&&typeof Event<"u"){re.value=Z,re.dispatchEvent(new Event("input",{bubbles:!0}));return}N(Z)},Y=Z=>{if(Z.preventDefault(),!C.trim()&&S.length===0||i||s&&!c)return;if(c&&d){d();return}let re=C;if(S.length>0){const Q=S.map(be=>`[Uploaded File: ${URL.createObjectURL(be)}}]`).join(`
24
+ `);re=re?`${re}
25
25
 
26
- ${ue}`:ue}let ie=H,ae=!1;H.endsWith("-thinking")&&(ie=H.replace(/-thinking$/,""),ae=!0),n==null||n(ee,{model_name:ie,enable_thinking:ae}),y||k(""),w([]),x([])},A=J=>{w(ee=>ee.filter((ie,ae)=>ae!==J)),!u&&S.length>J&&x(ee=>ee.filter((ie,ae)=>ae!==J))},G=J=>{J.preventDefault(),J.stopPropagation(),F(!0)},Q=J=>{J.preventDefault(),J.stopPropagation(),F(!1)},X=p.useCallback(J=>{!J||J.length===0||(x(ee=>[...ee,...J]),w(ee=>[...ee,...J]),I(ee=>[...ee,...J]),T(!0))},[x,w]),K=p.useCallback(()=>{if(E.length>0&&!V&&f){P(!0);const J=E[0];z.current=J,M(0);try{f(J)}catch(ee){I(ie=>ie.slice(1)),P(!1),z.current=null,M(0),T(ie=>E.length-1>0||!1),h==null||h(ee)}}else E.length===0&&v&&(T(!1),M(0))},[E,V,f,v,h]);p.useEffect(()=>{K()},[E,V,K]);const oe="active",te=J=>!0,re=()=>{N(!1),e.onGuideClose&&e.onGuideClose()},U=J=>{y&&t?t(J.text):k(J.text),e.onPromptExampleSelect&&e.onPromptExampleSelect(J),B.current&&B.current.focus()},Z=p.useCallback(()=>S,[S]),le=p.useCallback(()=>x([]),[]);return{onSubmit:n,getPendingFiles:Z,clearPendingFiles:le,value:C,handleChange:_,handleSubmit:Y,editableRef:B,fileInputRef:$,isUploading:v,uploadProgress:R,isDraggingOver:W,uploadedFiles:j,pendingFiles:S,removeUploadedFile:A,setPendingFiles:x,setUploadedFiles:w,setIsUploading:T,startUpload:X,selectedModel:H,handleModelChange:D,modelOptions:L,subscriptionStatus:oe,canAccessModel:te,handleDragOver:G,handleDragLeave:Q,isGuideTipShown:O,hideGuideTip:re,handlePromptExampleSelect:U}},fh={attachmentRemove:{position:"absolute",top:"2px",right:"2px",width:"20px",height:"20px",borderRadius:"50%",backgroundColor:"color-black-900",color:"white",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",zIndex:1}},Gn={container:{width:"100%",maxWidth:"100%",borderRadius:"12px",backgroundColor:"color-white",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},content:{width:"100%",padding:"12px",borderRadius:"12px",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}},yh={default:{borderRadius:"8px"},square:{borderRadius:"0px"},rounded:{borderRadius:"8px"}},xh={xs:{fontSize:"10px",padding:"4px 8px"},sm:{fontSize:"12px",padding:"6px 10px"},md:{fontSize:"14px",padding:"8px 12px"},lg:{fontSize:"16px",padding:"10px 14px"},xl:{fontSize:"20px",padding:"12px 16px"}},bh={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"},none:{backgroundColor:"transparent",border:"none"}},Yn=e=>`${e}-${Math.random().toString(36).substring(2,9)}`,kh=({openDelay:e=200,closeDelay:o=300}={})=>{const[t,n]=p.useState(!1),a=p.useRef(null),i=p.useRef(null),s=p.useRef(null),c=p.useRef(null),d=p.useMemo(()=>Yn("hovercard-content"),[]),u=p.useMemo(()=>Yn("hovercard-trigger"),[]),m=p.useCallback(()=>{a.current&&(clearTimeout(a.current),a.current=null),i.current&&(clearTimeout(i.current),i.current=null)},[]),g=p.useCallback(()=>{m(),t||(a.current=setTimeout(()=>{n(!0)},e))},[t,e,m]),h=p.useCallback(()=>{m(),t&&(i.current=setTimeout(()=>{n(!1)},o))},[t,o,m]),f=p.useCallback(()=>{i.current&&(clearTimeout(i.current),i.current=null)},[]);return p.useEffect(()=>()=>m(),[m]),{isOpen:t,openCard:g,closeCard:h,cancelCloseTimer:f,triggerRef:s,contentRef:c,contentId:d,triggerId:u}},Ul=p.createContext({isOpen:!1,openCard:()=>{},closeCard:()=>{},cancelCloseTimer:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),Ch=({children:e,value:o})=>r.jsx(Ul.Provider,{value:o,children:e}),Gl=()=>{const e=p.useContext(Ul);if(!e)throw new Error("useHoverCardContext must be used within a HoverCardProvider");return e},Sh=({children:e,views:o,asChild:t=!1,...n})=>{const{openCard:a,closeCard:i,triggerRef:s,contentId:c,triggerId:d}=Gl(),f={ref:s,onMouseEnter:()=>a(),onMouseLeave:()=>i(),onFocus:()=>a(),onBlur:()=>i(),id:d,"aria-describedby":c,...o==null?void 0:o.container,...n};if(t&&p.isValidElement(e)){const y=p.Children.only(e);return p.cloneElement(y,{...f,...y.props})}return r.jsx(l.View,{position:"relative",display:"inline-block",...f,children:e})},jh=({children:e,views:o,side:t="bottom",align:n="center",sideOffset:a=8,style:i,backgroundColor:s="color-white",borderRadius:c="4px",boxShadow:d="0px 2px 8px rgba(0, 0, 0, 0.15)",padding:u="12px",minWidth:m="50px",maxWidth:g="300px",...h})=>{const{isOpen:f,cancelCloseTimer:y,closeCard:b,contentRef:k,triggerRef:C,contentId:j,triggerId:w}=Gl(),{ref:S,relation:x}=l.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0});p.useEffect(()=>{C!=null&&C.current&&(S==null?void 0:S.current)!==C.current&&S&&(S.current=C.current)},[C,S,f]);const v=()=>y(),T=()=>b();if(!f)return null;const R=()=>{if(!x||!(C!=null&&C.current))return{position:"absolute",top:0,left:0,zIndex:1e3};const I=C.current.getBoundingClientRect();let V=t;t==="bottom"&&x.space.vertical==="top"?V="top":t==="top"&&x.space.vertical==="bottom"?V="bottom":t==="right"&&x.space.horizontal==="left"?V="left":t==="left"&&x.space.horizontal==="right"&&(V="right");let P=0,z=0;switch(V){case"bottom":P=I.left+I.width/2,z=I.bottom+a;break;case"top":P=I.left+I.width/2,z=I.top-a;break;case"right":P=I.right+a,z=I.top+I.height/2;break;case"left":P=I.left-a,z=I.top+I.height/2;break}return{position:"fixed",left:P,top:z,zIndex:1e3,transform:M(V)}},M=I=>{switch(I){case"bottom":return"translate(-50%, 0)";case"top":return"translate(-50%, -100%)";case"right":return"translate(0, -50%)";case"left":return"translate(-100%, -50%)";default:return"translate(-50%, 0)"}},E=R();return r.jsx(l.View,{ref:k,id:j,role:"tooltip","aria-labelledby":w,onMouseEnter:v,onMouseLeave:T,backgroundColor:s,borderRadius:c,boxShadow:d,padding:u,minWidth:m,maxWidth:g,style:{...E,...i},...o==null?void 0:o.container,...h,children:e})},wh=({children:e,views:o,openDelay:t,closeDelay:n,...a})=>{const i=kh({openDelay:t,closeDelay:n});return r.jsx(Ch,{value:i,children:r.jsx(l.View,{position:"relative",display:"inline-block",...o==null?void 0:o.container,...a,children:e})})},Se=wh;Se.Trigger=Sh;Se.Content=jh;const vh=({files:e,sandboxId:o,onRemove:t,layout:n="inline",maxHeight:a="120px",showPreviews:i=!1,views:s={}})=>{if(e.length===0)return null;const c=p.useCallback(u=>u<1024?`${u} B`:u<1024*1024?`${(u/1024).toFixed(1)} KB`:`${(u/(1024*1024)).toFixed(1)} MB`,[]),d=p.useCallback(u=>u.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:u.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:u.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return r.jsx(l.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...s==null?void 0:s.container,children:e.map((u,m)=>{const g=(u==null?void 0:u.path)||(u==null?void 0:u.url)||(i?URL.createObjectURL(u):""),h=u.type.startsWith("image/"),f=u.type.startsWith("video/"),y=u.type.startsWith("audio/"),b=d(u);return i?r.jsx(l.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...s==null?void 0:s.item,children:i&&r.jsxs(Se,{children:[r.jsxs(Se.Trigger,{children:[h&&r.jsx(l.Image,{src:g,alt:u.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),f&&r.jsx(l.View,{as:"video",src:g,alt:u.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&r.jsx(l.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(Ro,{widthHeight:24,color:"color-black"})}),!h&&!f&&!y&&r.jsx(l.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(ao,{widthHeight:24,color:"color-black"})}),t&&r.jsx(l.Button,{...fh.attachmentRemove,onClick:k=>{k.stopPropagation(),t(m)},"aria-label":`Remove ${u.name}`,children:"×"})]}),r.jsxs(Se.Content,{children:[h&&r.jsx(l.Image,{src:g,alt:u.name,maxWidth:"100%"}),f&&r.jsx(l.View,{as:"video",src:g,controls:!0,maxWidth:"100%"}),y&&r.jsx(l.View,{as:"audio",src:g,controls:!0,width:"100%"}),r.jsxs(l.Text,{marginTop:"4px",maxLines:1,width:"100%",...s==null?void 0:s.name,children:[u.name," (",c(u.size),")"]})]})]})},m):r.jsxs(l.Horizontal,{alignItems:"center",gap:"8px",padding:"6px 10px 6px 8px",borderRadius:"9999px",border:"1px solid #E2E8F0",backgroundColor:"color-white",maxWidth:"100%",animate:{from:{opacity:0,scale:.96},to:{opacity:1,scale:1}},animationDuration:.2,...s==null?void 0:s.item,children:[r.jsx(l.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:b.backgroundColor,color:b.color,children:y?r.jsx(Ro,{widthHeight:12,color:"currentColor"}):r.jsx(ao,{widthHeight:12,color:"currentColor"})}),r.jsxs(l.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...s==null?void 0:s.name,children:[u.name," · ",c(u.size)]}),t&&r.jsx(l.View,{as:"button",type:"button",onClick:()=>t(m),"aria-label":`Remove ${u.name}`,display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",border:"none",backgroundColor:"transparent",color:"color-gray-400",padding:0,cursor:"pointer",transition:"color 0.2s ease, opacity 0.2s ease",_hover:{color:"color-gray-600"},children:"×"})]},m)})})},Yl=p.forwardRef(({value:e,onChange:o,placeholder:t="Type your message...",disabled:n=!1,autoFocus:a=!0,suggestions:i=[],onSuggestionSelect:s,showSuggestions:c=!1,mentionData:d=[],mentionTrigger:u="@",onMentionSelect:m,maxHeight:g="200px",minHeight:h="40px",views:f={}},y)=>{var te,re;const b=p.useRef(e),[k,C]=p.useState(-1),[j,w]=p.useState(!e),S=p.useRef(null),[x,v]=p.useState(!1),[T,R]=p.useState(!1),[M,E]=p.useState(""),[I,V]=p.useState(-1),[P,z]=p.useState(-1),[W,F]=p.useState([]),{ref:H,relation:D}=l.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[L,B]=p.useState({x:0,y:0}),[$,O]=p.useState({x:0,y:0});p.useEffect(()=>{const U=y;U.current&&e!==b.current&&(U.current.textContent=e,b.current=e,w(!e))},[e,y]),p.useEffect(()=>{a&&y&&typeof y=="object"&&y.current&&y.current.focus()},[a,y]);const N=()=>{const U=window.getSelection();if(!U||U.rangeCount===0)return-1;const Z=U.getRangeAt(0),le=Z.cloneRange();return le.selectNodeContents(y&&typeof y=="object"&&y.current?y.current:document.body),le.setEnd(Z.endContainer,Z.endOffset),le.toString().length},_=p.useCallback((U,Z)=>{const le=U.substring(0,Z),J=le.lastIndexOf(u);if(J!==-1){const ee=le.substring(J+1);if(!ee.includes(" ")){const ae=ee.toLowerCase(),ue=d.filter(Ve=>Ve.name.toLowerCase().includes(ae));E(ae),V(J),F(ue),R(ue.length>0),z(0);const Re=Y();B(Re);return}}R(!1),E(""),V(-1),z(-1)},[d,u]);p.useEffect(()=>{S.current&&H&&(H.current=S.current)},[S,H]);const Y=p.useCallback((U=200)=>{if(!S.current)return{x:0,y:0};const Z=S.current.getBoundingClientRect();if(D){const ie=D.space.vertical==="top";return{x:Z.left,y:ie?Z.top-U-8:Z.bottom+8}}const le=window.innerHeight,J={top:Z.top,bottom:le-Z.bottom},ee=J.bottom<U+8&&J.top>J.bottom;return{x:Z.left,y:ee?Z.top-U-8:Z.bottom+8}},[D]),A=p.useCallback(()=>{v(!0);const U=Y();O(U)},[Y]),G=p.useCallback(()=>{setTimeout(()=>{v(!1),C(-1)},150)},[]),Q=U=>{const Z=U.currentTarget.textContent||"";if(Z!==b.current){o(Z),b.current=Z,w(!Z);const le=N();_(Z,le)}},X=p.useCallback(U=>{if(y&&typeof y=="object"&&y.current){const Z=y.current.textContent||"",le=Z.substring(0,I),J=Z.substring(I+u.length+M.length),ee=le+u+U.name+" "+J;o(ee),b.current=ee,y.current.textContent=ee;const ie=le.length+u.length+U.name.length+1;setTimeout(()=>{var ae;if(y.current){const ue=document.createRange(),Re=window.getSelection(),Ve=y.current.firstChild;Ve&&Re&&(ue.setStart(Ve,Math.min(ie,((ae=Ve.textContent)==null?void 0:ae.length)||0)),ue.collapse(!0),Re.removeAllRanges(),Re.addRange(ue))}},0)}R(!1),E(""),V(-1),z(-1),m&&m(U)},[I,u,M,o,m,y]),K=p.useCallback(U=>{s&&s(U),C(-1)},[s]),oe=U=>{if(T&&W.length>0){if(U.key==="ArrowDown"){U.preventDefault(),z(Z=>Z<W.length-1?Z+1:0);return}if(U.key==="ArrowUp"){U.preventDefault(),z(Z=>Z>0?Z-1:W.length-1);return}if((U.key==="Tab"||U.key==="Enter")&&P>=0){U.preventDefault(),X(W[P]);return}if(U.key==="Escape"){R(!1),z(-1);return}}if(c&&i.length>0){if(U.key==="ArrowDown"){U.preventDefault(),C(Z=>Z<i.length-1?Z+1:0);return}if(U.key==="ArrowUp"){U.preventDefault(),C(Z=>Z>0?Z-1:i.length-1);return}if(U.key==="Tab"&&k>=0){U.preventDefault(),K(i[k]);return}if(U.key==="Escape"){C(-1);return}}};return r.jsxs(l.View,{ref:S,width:"100%",position:"relative",...f==null?void 0:f.container,children:[r.jsxs(l.View,{width:"100%",minHeight:h,maxHeight:g,overflowY:"auto",position:"relative",children:[j&&r.jsx(l.Text,{position:"absolute",top:"8px",left:"8px",color:"color-gray-400",pointerEvents:"none",fontSize:"14px",zIndex:1,...f==null?void 0:f.placeholder,children:t}),r.jsx(l.View,{as:"div",ref:y,contentEditable:!n,suppressContentEditableWarning:!0,onInput:Q,onKeyDown:oe,onFocus:A,onBlur:G,role:"textbox","aria-multiline":"true","aria-placeholder":t,width:"100%",minHeight:"24px",padding:"8px",outline:"none",whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"14px",color:"color-gray-900",backgroundColor:"transparent",...f==null?void 0:f.input})]}),T&&W.length>0&&r.jsx(l.View,{position:"fixed",left:L.x,top:L.y,width:((te=S.current)==null?void 0:te.offsetWidth)||300,backgroundColor:"color-white",border:"2px solid",borderColor:"color-blue-300",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",zIndex:9999,maxHeight:"200px",overflowY:"auto",...f==null?void 0:f.mentionContainer,children:r.jsxs(l.Vertical,{gap:0,children:[W.map((U,Z)=>r.jsx(l.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:Z===P?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>X(U),onMouseEnter:()=>z(Z),_hover:{backgroundColor:"color-blue-50"},...f==null?void 0:f.mentionItem,children:r.jsxs(l.Vertical,{gap:4,children:[r.jsxs(l.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:[u,U.name]}),U.description&&r.jsx(l.Text,{fontSize:"12px",color:"color-gray-600",children:U.description})]})},U.id)),process.env.NODE_ENV==="development"&&r.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Mentions (Trigger: ",u,")",D&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),"Space: ",D.space.vertical,"-",D.space.horizontal]})]})]})}),c&&i.length>0&&!T&&x&&!e&&r.jsx(l.View,{position:"fixed",left:$.x,top:$.y,width:((re=S.current)==null?void 0:re.offsetWidth)||300,backgroundColor:"color-white",border:"2px solid",borderColor:"color-green-300",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",zIndex:9998,maxHeight:"200px",overflowY:"auto",...f==null?void 0:f.suggestionsContainer,children:r.jsxs(l.Vertical,{gap:0,children:[i.map((U,Z)=>r.jsx(l.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:Z===k?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>K(U),onMouseEnter:()=>C(Z),_hover:{backgroundColor:"color-blue-50"},...f==null?void 0:f.suggestionItem,children:r.jsxs(l.Vertical,{gap:4,children:[r.jsx(l.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:U.text}),U.description&&r.jsx(l.Text,{fontSize:"12px",color:"color-gray-600",children:U.description})]})},U.id)),process.env.NODE_ENV==="development"&&r.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Suggestions (Focus-triggered)",D&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),"Space: ",D.space.vertical,"-",D.space.horizontal]})]})]})})]})});Yl.displayName="EditableInput";const Th=({examples:e,onSelect:o,views:t={}})=>{const{getColor:n}=l.useTheme();return!e||e.length===0?null:r.jsx(l.Horizontal,{gap:8,overflowX:"auto",padding:"8px 0",width:"100%",...t==null?void 0:t.container,children:e.map(a=>r.jsx(l.View,{as:"button",type:"button",padding:"8px 12px",borderRadius:"9999px",backgroundColor:"color-white",border:"1px solid #E2E8F0",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",onClick:()=>o(a),_hover:{backgroundColor:"#F8FAFC",borderColor:"#CBD5E1"},...t==null?void 0:t.item,children:r.jsx(l.Text,{fontSize:"14px",color:"color-gray-700",...t==null?void 0:t.text,children:a.text})},a.id))})},Ih=({onRecordingComplete:e,onRecordingStart:o,views:t={}})=>{const{recording:n,paused:a,audioBlob:i,analyserNode:s,startRecording:c,stopRecording:d}=Ya();p.useEffect(()=>{if(i){const m=new File([i],`recording-${Date.now()}.webm`,{type:i.type||"audio/webm;codecs=opus"});e(m)}},[i]);const u=p.useCallback(()=>{c(),o==null||o()},[]);return r.jsxs(l.Horizontal,{alignItems:"center",gap:4,children:[r.jsx(l.View,{minWidth:90,children:n&&s&&r.jsx(Kt,{analyserNode:s,isPaused:a})}),r.jsx(l.View,{as:"button",type:"button",onClick:n?d:u,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n?"theme-error":"color-gray-100",color:n?"color-white":"color-gray-600",borderRadius:"50%",border:"none",cursor:"pointer",_hover:{backgroundColor:n?"color-red-600":"color-gray-200"},...t.button,children:n?r.jsx(Er,{widthHeight:16,color:"currentColor",filled:!1}):r.jsx(_t,{widthHeight:16,color:"currentColor",filled:!1})})]})},Kl=p.memo(({onSubmit:e,placeholder:o="Type your message… use @ to mention",loading:t=!1,disabled:n=!1,isAgentRunning:a=!1,enableAudioRecording:i=!1,leftButtons:s,rightButtons:c,onStopAgent:d,loadingText:u="Agent is working...",autoFocus:m=!0,sandboxId:g,hideAttachments:h=!1,attachmentText:f="",promptExamples:y=[],suggestions:b=[],errorMessage:k,size:C="md",shape:j="rounded",variant:w="default",views:S={},mentionData:x=[],mentionTrigger:v="@",onMentionSelect:T,onAudioRecordingStart:R,onAudioRecordingStop:M,showGuideTip:E,guideVideoUrl:I,onGuideClose:V,onFileBrowse:P,onUploadProgress:z,onUploadSuccess:W,onUploadError:F,onFileUpload:H,onPromptExampleSelect:D,value:L,handleChange:B,handleSubmit:$,editableRef:O,fileInputRef:N,isUploading:_,uploadProgress:Y,isDraggingOver:A,uploadedFiles:G,pendingFiles:Q,getPendingFiles:X,clearPendingFiles:K,removeUploadedFile:oe,setPendingFiles:te,setUploadedFiles:re,setIsUploading:U,startUpload:Z,selectedModel:le,handleModelChange:J,modelOptions:ee,subscriptionStatus:ie,canAccessModel:ae,isGuideTipShown:ue,hideGuideTip:Re,handlePromptExampleSelect:Ve,handleDragOver:Xr,handleDragLeave:Do,onChange:Tn,...Le})=>{l.useTheme();const go=p.useMemo(()=>({...Gn.container,...yh[j],...S==null?void 0:S.container}),[j,S==null?void 0:S.container]),Jr=p.useMemo(()=>({...Gn.content,...xh[C],...bh[w],...S==null?void 0:S.content}),[C,w,S==null?void 0:S.content]),$o=((L==null?void 0:L.trim().length)??0)>0||G.length>0,js=p.useCallback(be=>{Z([be]),M==null||M(be)},[Z,M]),Qr=p.useCallback(be=>{const ho=be.filter(In=>In.size>52428800?(console.error(`File size exceeds 50MB limit: ${In.name}`),!1):!0);ho.length>0&&Z(ho)},[Z]),ws=p.useCallback(be=>{if(be.preventDefault(),be.stopPropagation(),Do(be),be.dataTransfer.files.length>0){const ho=Array.from(be.dataTransfer.files);Qr(ho)}},[Do,Qr]),vs=p.useMemo(()=>[...x||[],...G.map((be,ho)=>({id:`file-${ho}`,name:be.name}))],[x,G]);return r.jsxs(l.View,{display:"flex",flexDirection:"column",boxSizing:"border-box",...go,...Le,onDragOver:Xr,onDragLeave:Do,onDrop:ws,children:[y.length>0&&r.jsx(Th,{examples:y,onSelect:Ve,views:{container:S==null?void 0:S.promptExamples,item:S==null?void 0:S.promptExampleItem}}),a&&r.jsxs(l.Horizontal,{justifyContent:"center",alignItems:"center",gap:8,padding:"8px 0",animate:{from:{opacity:0,y:-10},to:{opacity:1,y:0},duration:"0.3s"},...S==null?void 0:S.loadingIndicator,children:[r.jsx(Ot,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),r.jsx(l.Text,{color:"color-gray-500",children:u})]}),r.jsx(l.View,{position:"relative",width:"100%",overflow:"visible",children:r.jsxs(l.View,{as:"form",onSubmit:$,overflow:"visible",display:"flex",flexDirection:"column",position:"relative",...Jr,...go,paddingHorizontal:16,paddingVertical:10,backgroundColor:A?"color-blue-50":void 0,children:[r.jsx(vh,{files:G,sandboxId:g,onRemove:oe,showPreviews:!0,views:{container:S==null?void 0:S.attachments,item:S==null?void 0:S.attachmentItem,name:S==null?void 0:S.attachmentName,size:S==null?void 0:S.attachmentSize,removeButton:S==null?void 0:S.attachmentRemove}}),r.jsx(Yl,{ref:O,value:L||"",onChange:B,placeholder:o,disabled:n&&!a,autoFocus:m,suggestions:b||[],showSuggestions:b&&b.length>0&&!L,onSuggestionSelect:be=>{B(be.text)},mentionData:vs,mentionTrigger:v,onMentionSelect:T,views:{container:{},input:S==null?void 0:S.editableInput}}),r.jsxs(l.Horizontal,{justifyContent:"space-between",alignItems:"center",marginTop:"8px",children:[r.jsxs(l.Horizontal,{gap:8,alignItems:"center",children:[!h&&r.jsx(Lr,{accept:"*/*",icon:r.jsx(er,{widthHeight:16}),maxSize:50*1024*1024,multiple:!0,onMultipleFileSelect:Qr,isLoading:_,progress:Y||0,text:f,fileType:"file",renderError:({errorMessage:be})=>null,views:{container:{height:"36px",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},...S==null?void 0:S.fileButton}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",gap:4,borderRadius:j==="rounded"?"50%":4,padding:10},textProps:{fontSize:"14px",color:"color-gray-600"},validateFile:be=>be.size>50*1024*1024?"File size exceeds 50MB limit":null}),s]}),r.jsxs(l.Horizontal,{gap:8,alignItems:"center",children:[i&&r.jsx(Ih,{onRecordingStart:R,onRecordingComplete:js,views:{button:S==null?void 0:S.recordButton}}),r.jsx(l.View,{as:"button",type:"button",onClick:$,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:a?"theme-error":$o?"theme-primary":"color-gray-300",color:"color-white",borderRadius:j==="rounded"?"50%":4,border:"none",cursor:$o?"pointer":"not-allowed",disabled:!$o||t||n&&!a,transition:"background-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease",_hover:{opacity:$o||a?.9:1},_active:{opacity:$o||a?.95:1},_focusVisible:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},...S==null?void 0:S.submitButton,children:a?r.jsx(Er,{widthHeight:16,color:"currentColor",filled:!1}):t?r.jsx(Je,{type:"quarter",size:16,color:"color-white"}):r.jsx(Bt,{widthHeight:16,color:"currentColor",filled:!1})}),c]})]})]})}),k&&r.jsx(l.Text,{color:"theme-error",marginTop:"4px",...S==null?void 0:S.bottomTip,children:k})]})}),Fh=e=>{const{name:o,onSubmit:t,...n}=e,[a,i]=p.useState([]),s=fe({name:o,type:"text"}),c=h=>{s.onChangeText&&s.onChangeText(h)},d=(h,f)=>{t?t(h,f):c(h)},u=()=>a,m=()=>i([]),g=ql({...n,value:s.value||"",onChange:c,onSubmit:d});return r.jsx(Kl,{...n,...g,value:s.value||"",onChange:c,onSubmit:d,error:s.error,getPendingFiles:u,clearPendingFiles:m})},Rh=Fh,zh=e=>{const o=fe(e),t=vl(o);return r.jsx(Tl,{...t,...o})},Mh=zh,Wh=e=>{const o=fe(e),t=Wl();return r.jsx(Hl,{...t,...o})},Hh=Wh,Ph=e=>{const o=fe(e),t=Il(e);return r.jsx(Fl,{...t,...o})},Vh=Ph,Ah=e=>{let o=fe(e);o.selected=o.value;const t=gl(e);return r.jsx(fl,{...t,...o})},Eh=Ah,Dh=e=>{const o=fe(e),t=yl(e);return r.jsx(xl,{...t,...o})},$h=Dh,Lh=e=>{const{name:o,...t}=e,{values:n,errors:a,touched:i,submitCount:s,setFieldValue:c,setFieldTouched:d}=He.useFormikContext(),u=He.getIn(n,o)||[],m=He.getIn(i,o)||s>0?He.getIn(a,o):void 0,g=p.useCallback(k=>{var j;const C=Array.isArray(k)?k.filter(w=>typeof w=="string"):[];c(o,C),(j=e.onTagsChange)==null||j.call(e,C)},[o,c,e.onTagsChange]),h=p.useCallback(()=>{var k;d(o,!0),(k=e.onBlur)==null||k.call(e)},[o,d,e.onBlur]),f=El({...t,tags:u,onTagsChange:g,onBlur:h}),{tags:y,...b}=f;return r.jsx(Dl,{...b,...t,tags:y,error:m})},_h=Lh,Bh=e=>{const o=fe(e),t=Cl(e);return r.jsx(Sl,{...t,...o})},Oh=Bh,Nh=e=>{const o=fe(e,{focusable:!0}),{value:t,...n}=ln(e);return r.jsx(nr,{...n,...o})},qh=Nh,Uh=({visibleIcon:e=r.jsx(qt,{widthHeight:14}),hiddenIcon:o=r.jsx(Nt,{widthHeight:14}),...t})=>{const n=fe(t,{focusable:!0}),{isVisible:a,setIsVisible:i,...s}=Pl(n);return r.jsx(nr,{...s,type:a?"text":"password",isClearable:!1,right:r.jsx(l.View,{onClick:()=>{t.isDisabled||i(!a)},children:a?e:o})})},Gh=Uh,Yh=({items:e,placeholder:o,searchPlaceholder:t,isMulti:n=!1,...a})=>{const i=fe(a),s=Vl(e,o,t);p.useEffect(()=>{if(n&&Array.isArray(i.value))s.setSelectedItems(i.value);else if(!n&&i.value){const d=typeof i.value=="object"?i.value:e.find(u=>u.value===i.value);d&&s.setSelectedItem(d)}},[i.value,n,e]);const c=d=>{i.onChange(d)};return r.jsx(Al,{...s,...i,items:e,placeholder:o,isMulti:n,onSelect:c})},Kh=Yh,To=(e,o,t)=>Math.min(Math.max(e,o),t),Xh=(e,o,t,n,a,i,s)=>{const c=n-t;let d;if(i==="horizontal"){const u=o.width,m=e-o.left;d=To(m/u,0,1)}else{const u=o.height,m=o.bottom-e;d=To(m/u,0,1)}if(s&&s.length>0){const u=t+d*c;let m=s[0],g=Math.abs(u-m);for(let h=1;h<s.length;h++){const f=Math.abs(u-s[h]);f<g&&(g=f,m=s[h])}return m}else{const u=t+d*c,m=Math.round(u/a)*a;return To(m,t,n)}},Xl=({min:e=0,max:o=100,step:t=1,value:n,defaultValue:a,onChange:i,onDrag:s,orientation:c="horizontal",isDisabled:d=!1,stepValues:u})=>{const m=To(n??a??e,e,o),[g,h]=p.useState(m),[f,y]=p.useState(!1),[b,k]=p.useState(!1),C=p.useRef(null),j=p.useRef(null),w=n!==void 0,S=n!==void 0?n:g;p.useEffect(()=>{n!==void 0&&h(To(n,e,o))},[n,e,o]);const x=p.useCallback(V=>{const P=To(V,e,o);w||h(P),i&&P!==S&&i(P),f&&s&&s(P)},[w,e,o,i,S,f,s]),v=p.useCallback(V=>{if(d||!C.current)return;const P=C.current;if(typeof P.getBoundingClientRect!="function")return;const z=P.getBoundingClientRect();let W;"touches"in V?W=c==="horizontal"?V.touches[0].clientX:V.touches[0].clientY:W=c==="horizontal"?V.clientX:V.clientY;const F=Xh(W,z,e,o,t,c,u);x(F)},[e,o,t,c,x,d,u]),T=p.useCallback(V=>{if(d)return;V.preventDefault(),y(!0),v(V);const P=W=>{v(W)},z=()=>{y(!1),document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",z),document.removeEventListener("touchmove",P),document.removeEventListener("touchend",z)};typeof(document==null?void 0:document.addEventListener)=="function"&&(document.addEventListener("mousemove",P),document.addEventListener("mouseup",z),document.addEventListener("touchmove",P),document.addEventListener("touchend",z))},[v,d]),R=p.useCallback(V=>{const P=j.current;P&&typeof P.contains=="function"&&P.contains(V.target)||T(V)},[T]),M=p.useCallback(V=>{if(d)return;let P=S;switch(V.key){case"ArrowLeft":case"ArrowDown":P=S-t;break;case"ArrowRight":case"ArrowUp":P=S+t;break;case"Home":P=e;break;case"End":P=o;break;default:return}V.preventDefault(),x(P)},[S,e,o,t,x,d]),E=o-e,I=E===0?0:(S-e)/E*100;return{currentValue:S,isDragging:f,isHovered:b,setIsHovered:k,trackRef:C,thumbRef:j,handleThumbMouseDown:T,handleTrackMouseDown:R,handleKeyDown:M,thumbPositionPercent:I}},Kn={xs:{height:4,width:"100%"},sm:{height:6,width:"100%"},md:{height:8,width:"100%"},lg:{height:10,width:"100%"},xl:{height:12,width:"100%"}},Xn={xs:{width:12,height:12},sm:{width:16,height:16},md:{width:20,height:20},lg:{width:24,height:24},xl:{width:28,height:28}},Jn={square:0,rounded:4,pill:24},Jh=e=>({default:{backgroundColor:"color-gray-200",transition:"background-color 0.15s ease"},outline:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"},transition:"border-color 0.15s ease"}}),Qn=Jh(),Qh={xs:{trackCrossAxisSize:4,thumbSize:12},sm:{trackCrossAxisSize:6,thumbSize:16},md:{trackCrossAxisSize:8,thumbSize:20},lg:{trackCrossAxisSize:10,thumbSize:24},xl:{trackCrossAxisSize:12,thumbSize:28}},Zh={horizontal:{width:"100%",minWidth:"120px",height:"auto",flexDirection:"row",paddingVertical:8},vertical:{height:"100%",minHeight:"120px",width:"auto",flexDirection:"column-reverse",paddingHorizontal:8}},ef=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),No=(e,o)=>ef(o)?{style:{[e]:o}}:{[e]:o},Jl=p.memo(({min:e=0,max:o=100,step:t=1,currentValue:n,stepValues:a,shape:i="rounded",size:s="md",variant:c="default",orientation:d="horizontal",isDisabled:u=!1,showValue:m=!1,showTooltip:g=!1,backgroundColor:h="theme-primary",label:f,helperText:y,themeMode:b,shadow:k={},isDragging:C,isHovered:j,setIsHovered:w,trackRef:S,thumbRef:x,handleThumbMouseDown:v,handleTrackMouseDown:T,handleKeyDown:R,thumbPositionPercent:M,ariaLabel:E="Slider",views:I={container:{},track:{},progress:{},filledTrack:{},thumb:{},label:{},valueLabel:{},stepMarks:{},tooltip:{}},onChange:V,onDrag:P,value:z,defaultValue:W,...F})=>{var A,G;const H=h,D="theme-disabled",L=Qn[c].backgroundColor,B=u?D:H,$=d==="vertical",{trackCrossAxisSize:O,thumbSize:N}=Qh[s]||{trackCrossAxisSize:Kn[s].height,thumbSize:Xn[s].width||16},_=r.jsxs(l.Vertical,{width:"100%",gap:8,...I.container,...F,children:[f&&r.jsxs(l.Horizontal,{justifyContent:"space-between",alignItems:"center",children:[r.jsx(l.Text,{fontSize:14,fontWeight:500,...I.label,children:f}),m&&r.jsx(l.Text,{fontSize:14,color:"color-gray-500",...I.valueLabel,children:n})]}),r.jsxs(l.View,{ref:S,position:"relative",cursor:u?"not-allowed":"pointer",opacity:u?.6:1,onMouseDown:T,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),...Kn[s],borderRadius:Jn[i],backgroundColor:L,...Qn[c],...k,...I.track,children:[a&&a.length>0&&r.jsx(r.Fragment,{children:a.map(Q=>{const X=(Q-e)/(o-e)*100;return r.jsx(l.View,{position:"absolute",top:"50%",left:`${X}%`,transform:"translate(-50%, -50%)",width:4,height:4,borderRadius:"50%",zIndex:1,...No("backgroundColor",B),...I.stepMarks},Q)})}),r.jsx(l.View,{position:"absolute",top:0,left:0,height:"100%",width:`${M}%`,borderRadius:Jn[i],transition:"width 0.1s ease-in-out",...No("backgroundColor",B),...I.progress,...I.filledTrack}),r.jsx(l.View,{ref:x,role:"slider",tabIndex:u?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":d,"aria-disabled":u,"aria-label":E,position:"absolute",top:"50%",left:`${M}%`,borderRadius:"50%",backgroundColor:"color-white",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)",borderWidth:2,borderStyle:"solid",transition:C?"none":"transform 0.1s ease-in-out",...No("borderColor",B),transform:j?"translate(-50%, -50%) scale(1.1)":"translate(-50%, -50%)",zIndex:2,onMouseDown:v,onTouchStart:v,onKeyDown:R,...Xn[s],...I.thumb,children:g&&(j||C)&&r.jsx(l.View,{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:8,padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:4,fontSize:12,whiteSpace:"nowrap",zIndex:3,...I.tooltip,children:r.jsx(l.Text,{...(A=I.tooltip)==null?void 0:A.text,children:n==null?void 0:n.toFixed(t<1?1:0)})})})]}),y&&r.jsx(Ct,{children:y})]}),Y=r.jsxs(l.Center,{...Zh[d],position:"relative",onMouseEnter:()=>!u&&w(!0),onMouseLeave:()=>!u&&w(!1),...F,...I==null?void 0:I.container,children:[f&&r.jsxs(l.Horizontal,{justifyContent:"space-between",alignItems:"center",marginBottom:8,width:"100%",children:[r.jsx(l.Text,{fontSize:14,fontWeight:500,...I.label,children:f}),m&&r.jsx(l.Text,{fontSize:14,color:"color-gray-500",...I.valueLabel,children:n})]}),r.jsxs(l.View,{ref:S,position:"relative",borderRadius:O/2,backgroundColor:u?D:L,cursor:u?"not-allowed":"pointer",width:$?`${O}px`:"100%",height:$?"100%":`${O}px`,onMouseDown:T,onTouchStart:T,...I==null?void 0:I.track,children:[a&&a.length>0&&r.jsx(r.Fragment,{children:a.map(Q=>{const X=(Q-e)/(o-e)*100;return r.jsx(l.View,{position:"absolute",width:4,height:4,borderRadius:"50%",backgroundColor:B,zIndex:1,...$?{bottom:`${X}%`,left:"50%",transform:"translate(-50%, 50%)"}:{left:`${X}%`,top:"50%",transform:"translate(-50%, -50%)"},...I.stepMarks},Q)})}),r.jsx(l.View,{position:"absolute",borderRadius:O/2,...$?{bottom:0,left:0,width:"100%",height:`${M}%`}:{top:0,left:0,height:"100%",width:`${M}%`},...No("backgroundColor",B),...I==null?void 0:I.filledTrack,...I==null?void 0:I.progress}),r.jsx(l.View,{ref:x,role:"slider",tabIndex:u?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":d,"aria-disabled":u,"aria-label":E,position:"absolute",width:`${N}px`,height:`${N}px`,borderRadius:"50%",borderWidth:2,borderStyle:"solid",borderColor:"color-white",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.2)",cursor:u?"not-allowed":"grab",transform:$?"translateX(-50%)":"translateY(-50%)",zIndex:2,transition:C?"none":"left 0.1s, bottom 0.1s",...No("backgroundColor",B),...$?{left:"50%",bottom:`${M}%`}:{top:"50%",left:`${M}%`},onMouseDown:v,onTouchStart:v,onKeyDown:R,...I==null?void 0:I.thumb,children:g&&(j||C)&&r.jsx(l.View,{position:"absolute",padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:"4px",whiteSpace:"nowrap",zIndex:3,...$?{left:"100%",marginLeft:"8px",bottom:"0",transform:"translateY(50%)"}:{bottom:"100%",left:"50%",marginBottom:"8px",transform:"translateX(-50%)"},...I==null?void 0:I.tooltip,children:r.jsx(l.Text,{...(G=I==null?void 0:I.tooltip)==null?void 0:G.text,children:n==null?void 0:n.toFixed(t<1?1:0)})})})]}),y&&r.jsx(Ct,{marginTop:8,children:y})]});return $||g?Y:_}),of=e=>{const o=fe(e),t=Xl({...e,value:o.value!==void 0?Number(o.value):void 0,onChange:n=>{var a;o.onChange(n),(a=e.onChange)==null||a.call(e,n)}});return r.jsx(Jl,{...e,...t,...o})},rf=of,Zn=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},lt=(e,o)=>{console.log(`[FormikOTPInput] ${e}`,o)},tf=e=>e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?e:Object.prototype.toString.call(e),nf=e=>{const o=fe(e),t=Zn(o.value).slice(0,e.length||6);lt("render",{name:e.name,type:e.type,formValue:tf(o.value),displayValue:t,length:e.length||6,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText});const{isFocused:n,setIsFocused:a,isHovered:i,setIsHovered:s,inputRef:c,containerRef:d,mirrorSelectionStart:u,mirrorSelectionEnd:m,setMirrorSelectionStart:g,setMirrorSelectionEnd:h,setInputRef:f,handleFocus:y,handleBlur:b,handleKeyDown:k,handlePaste:C}=$l(e),j=p.useCallback(S=>{const x=Zn(S).slice(0,e.length||6);lt("setValue",{name:e.name,incomingValue:S,nextValue:x,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText}),o.onChange&&o.onChange(x),o.onChangeText&&o.onChangeText(x),e.onComplete&&x.length===(e.length||6)&&e.onComplete(x),c.current&&(c.current.value=x)},[o,e,c]),w=p.useCallback(S=>{var T,R,M;const x=typeof S=="string"?S:((T=S==null?void 0:S.currentTarget)==null?void 0:T.value)??((R=S==null?void 0:S.target)==null?void 0:R.value)??((M=S==null?void 0:S.nativeEvent)==null?void 0:M.text)??"",v=String(x).slice(0,e.length||6);lt("handleChange normalized",{name:e.name,raw:x,newValue:v}),j(v),c.current&&(c.current.value=v)},[e.length,j,c]);return r.jsx(Ll,{...e,...o,value:t,setValue:j,isFocused:n,setIsFocused:a,isHovered:i,setIsHovered:s,inputRef:c,containerRef:d,mirrorSelectionStart:u,mirrorSelectionEnd:m,setMirrorSelectionStart:g,setMirrorSelectionEnd:h,setInputRef:f,handleChange:w,handleFocus:y,handleBlur:b,handleKeyDown:k,handlePaste:C,stepValues:e.stepValues})},af=nf,lf=e=>Array.isArray(e)?e:e==null?[]:[e],Ql=({name:e,uploadFile:o,onUploadSuccess:t,onUploadError:n,transformResponse:a,onMultipleFileSelect:i,onFileSelect:s,multiple:c=!0,...d})=>{const{setFieldValue:u,setFieldTouched:m,values:g}=He.useFormikContext(),[h,f]=p.useState(!1),[y,b]=p.useState(0),k=p.useCallback(async w=>{if(!w||w.length===0)return;m(e,!0,!0),f(!0);const S=[];for(const x of w){b(0);try{const v=await o(x,R=>{b(R??0)}),T=a?a(v,x):v;S.push(T),t==null||t(x,T)}catch(v){n==null||n(x,v)}}if(S.length>0){const x=lf(He.getIn(g,e));u(e,[...x,...S],!0),b(100)}else b(0);f(!1)},[e,n,t,m,u,a,o,g]),C=p.useCallback(async w=>{i==null||i(w),await k(w)},[k,i]),j=p.useCallback(async w=>{s==null||s(w),await k([w])},[k,s]);return r.jsx(Lr,{...d,multiple:c,onMultipleFileSelect:c?C:void 0,onFileSelect:c?void 0:j,isLoading:h,progress:y})};Ql.displayName="FormikUploader";const sf=e=>{let o=fe(e);o.selected=o.value;const t=bl(e);return r.jsx(kl,{...t,...o})},cf=sf,Zl=e=>{const[o,t]=p.useState(!1),[n,a]=p.useState(e);return{isHovered:o,setIsHovered:t,isToggle:n,setIsToggled:a}},df={square:0,rounded:8,pill:999},uf=(e,o)=>({outline:{backgroundColor:"color-white",color:e,borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",_hover:{backgroundColor:"color-gray-50",borderColor:"color-gray-300"},_active:{backgroundColor:"color-gray-100"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{backgroundColor:"transparent",color:e,borderWidth:0,borderStyle:"none",borderColor:"transparent",_hover:{backgroundColor:"color-gray-50"},_active:{backgroundColor:"color-gray-100"},transition:"background-color 0.2s ease, color 0.2s ease"},link:{backgroundColor:"transparent",color:e,borderWidth:1,borderStyle:"solid",borderColor:"transparent",textDecoration:"underline",textUnderlineOffset:"1px",textDecorationThickness:"1px",_hover:{opacity:.8},_active:{opacity:.9},transition:"opacity 0.2s ease"}}),ei=p.memo(({children:e,shape:o="rounded",variant:t="ghost",isHovered:n,setIsHovered:a,isDisabled:i,isToggle:s,setIsToggled:c,onToggle:d,views:u,backgroundColor:m,color:g,themeMode:h,...f})=>{const{getColor:y,themeMode:b}=l.useTheme(),k=h??b,j=y(i?"theme-disabled":m??g??"theme-primary",{themeMode:k}),S=p.useMemo(()=>uf(j),[j,k])[t],x=!!s,v=p.useCallback(()=>a(!0),[a]),T=p.useCallback(()=>{i||c(R=>{const M=!R;return d&&d(M),M})},[i,c,d]);return r.jsx(l.Center,{role:"Toggle",padding:o==="pill"?"8px 12px":"8px",width:"fit-content",cursor:i?"not-allowed":"pointer",borderRadius:df[o],onClick:T,onMouseEnter:v,onMouseLeave:()=>a(!1),...S,...x&&{...t==="link"?{backgroundColor:"transparent"}:{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200"},color:j},...f,...u==null?void 0:u.container,children:e})}),pf=({children:e,shape:o,variant:t,isDisabled:n,isToggled:a=!1,onToggle:i,...s})=>{const c=fe(s),{isHovered:d,setIsHovered:u,isToggle:m,setIsToggled:g}=Zl(c.value??a);p.useEffect(()=>{g(c.value??a)},[c.value,a]);const h=f=>{g(f),c.onChange(f),i==null||i(f)};return r.jsx(ei,{shape:o,variant:t,isDisabled:n,isHovered:d,setIsHovered:u,isToggle:m,setIsToggled:g,onToggle:h,...s,children:e})},mf=pf,oi=()=>{const[e,o]=p.useState([]);return{activeToggles:e,setActiveToggles:o}},gf=({children:e,shape:o,variant:t,isDisabled:n,isToggled:a=!1,onToggle:i,...s})=>{const{isHovered:c,setIsHovered:d,isToggle:u,setIsToggled:m}=Zl(a);return p.useEffect(()=>{m(a)},[a]),r.jsx(ei,{shape:o,variant:t,isDisabled:n,isHovered:c,setIsHovered:d,isToggle:u,setIsToggled:m,onToggle:i,...s,children:e})},cn=gf,ri=({items:e,onToggleChange:o,activeToggles:t,setActiveToggles:n,shape:a="rounded",variant:i="ghost",views:s})=>{const c=p.useCallback((d,u)=>{n(m=>{let g;return u?g=m.includes(d)?m:[...m,d]:g=m.filter(h=>h!==d),o==null||o(g),g})},[o,n]);return r.jsx(l.Horizontal,{role:"ToggleGroup",display:"flex",gap:8,flexWrap:"wrap",...s==null?void 0:s.container,children:e.map(d=>r.jsx(cn,{role:`toggle-${d.id}`,shape:a,variant:i,isToggled:t.includes(d.id)||d.isActive,onToggle:u=>c(d.id,u),isDisabled:d.isDisabled,views:s==null?void 0:s.toggle,children:d.value},d.id))})},hf=({items:e,shape:o,variant:t,onToggleChange:n,...a})=>{const i=fe(a),{activeToggles:s,setActiveToggles:c}=oi();p.useEffect(()=>{Array.isArray(i.value)&&c(i.value)},[i.value]);const d=u=>{c(u),i.onChange(u),n==null||n(u)};return r.jsx(ri,{items:e,shape:o,variant:t,activeToggles:s,setActiveToggles:c,onToggleChange:d,...a})},ff=hf,ea=["zoom-out","zoom-in","zap","zap-off","youtube","x","wrench","worm","workflow","wine","wine-off","wind","wind-arrow-down","wifi","wifi-zero","wifi-sync","wifi-pen","wifi-off","wifi-low","wifi-high","wifi-cog","whole-word","wheat","wheat-off","weight","weight-tilde","webhook","webhook-off","webcam","waypoints","waves","waves-ladder","waves-arrow-up","waves-arrow-down","watch","washing-machine","warehouse","wand","wand-sparkles","wallpaper","wallet","wallet-minimal","wallet-cards","vote","volume","volume-x","volume-off","volume-2","volume-1","volleyball","voicemail","view","videotape","video","video-off","vibrate","vibrate-off","venus","venus-and-mars","venetian-mask","vegan","vector-square","vault","variable","van","utility-pole","utensils","utensils-crossed","users","users-round","user","user-x","user-star","user-search","user-round","user-round-x","user-round-search","user-round-plus","user-round-pen","user-round-minus","user-round-cog","user-round-check","user-plus","user-pen","user-minus","user-lock","user-cog","user-check","usb","upload","unplug","unlink","unlink-2","university","ungroup","unfold-vertical","unfold-horizontal","undo","undo-dot","undo-2","underline","umbrella","umbrella-off","type","type-outline","twitter","twitch","tv","tv-minimal","tv-minimal-play","turtle","turntable","turkish-lira","truck","truck-electric","trophy","triangle","triangle-right","triangle-dashed","triangle-alert","trending-up","trending-up-down","trending-down","trello","trees","tree-pine","tree-palm","tree-deciduous","trash","trash-2","transgender","tram-front","train-track","train-front","train-front-tunnel","traffic-cone","tractor","toy-brick","tower-control","touchpad","touchpad-off","torus","tornado","toolbox","tool-case","toilet","toggle-right","toggle-left","timer","timer-reset","timer-off","tickets","tickets-plane","ticket","ticket-x","ticket-slash","ticket-plus","ticket-percent","ticket-minus","ticket-check","thumbs-up","thumbs-down","thermometer","thermometer-sun","thermometer-snowflake","theater","text-wrap","text-select","text-search","text-quote","text-initial","text-cursor","text-cursor-input","text-align-start","text-align-justify","text-align-end","text-align-center","test-tubes","test-tube","test-tube-diagonal","terminal","tent","tent-tree","telescope","target","tangent","tally-5","tally-4","tally-3","tally-2","tally-1","tags","tag","tablets","tablet","tablet-smartphone","table","table-rows-split","table-properties","table-of-contents","table-columns-split","table-cells-split","table-cells-merge","table-2","syringe","swords","sword","switch-camera","swiss-franc","swatch-book","superscript","sunset","sunrise","sun","sun-snow","sun-moon","sun-medium","sun-dim","subscript","strikethrough","stretch-vertical","stretch-horizontal","store","stone","sticky-note","sticker","stethoscope","step-forward","step-back","star","star-off","star-half","stamp","squirrel","squircle","squircle-dashed","squares-unite","squares-subtract","squares-intersect","squares-exclude","square","square-x","square-user","square-user-round","square-terminal","square-stop","square-star","square-stack","square-square","square-split-vertical","square-split-horizontal","square-slash","square-sigma","square-scissors","square-round-corner","square-radical","square-power","square-plus","square-play","square-pilcrow","square-pi","square-percent","square-pen","square-pause","square-parking","square-parking-off","square-mouse-pointer","square-minus","square-menu","square-m","square-library","square-kanban","square-function","square-equal","square-dot","square-divide","square-dashed","square-dashed-top-solid","square-dashed-mouse-pointer","square-dashed-kanban","square-dashed-bottom","square-dashed-bottom-code","square-code","square-chevron-up","square-chevron-right","square-chevron-left","square-chevron-down","square-check","square-check-big","square-chart-gantt","square-bottom-dashed-scissors","square-asterisk","square-arrow-up","square-arrow-up-right","square-arrow-up-left","square-arrow-right","square-arrow-out-up-right","square-arrow-out-up-left","square-arrow-out-down-right","square-arrow-out-down-left","square-arrow-left","square-arrow-down","square-arrow-down-right","square-arrow-down-left","square-activity","sprout","spray-can","spotlight","spool","split","spline","spline-pointer","spell-check","spell-check-2","speech","speaker","sparkles","sparkle","spade","space","soup","solar-panel","sofa","soap-dispenser-droplet","snowflake","snail","smile","smile-plus","smartphone","smartphone-nfc","smartphone-charging","sliders-vertical","sliders-horizontal","slice","slash","slack","skull","skip-forward","skip-back","siren","signpost","signpost-big","signature","signal","signal-zero","signal-medium","signal-low","signal-high","sigma","shuffle","shrub","shrink","shrimp","shredder","shower-head","shovel","shopping-cart","shopping-basket","shopping-bag","shirt","ship","ship-wheel","shield","shield-x","shield-user","shield-question-mark","shield-plus","shield-off","shield-minus","shield-half","shield-ellipsis","shield-check","shield-ban","shield-alert","shell","sheet","share","share-2","shapes","settings","settings-2","server","server-off","server-crash","server-cog","separator-vertical","separator-horizontal","send","send-to-back","send-horizontal","section","search","search-x","search-slash","search-code","search-check","search-alert","scroll","scroll-text","screen-share","screen-share-off","scooter","scissors","scissors-line-dashed","school","scan","scan-text","scan-search","scan-qr-code","scan-line","scan-heart","scan-face","scan-eye","scan-barcode","scaling","scale","scale-3d","save","save-off","save-all","saudi-riyal","satellite","satellite-dish","sandwich","salad","sailboat","russian-ruble","ruler","ruler-dimension-line","rss","rows-4","rows-3","rows-2","router","route","route-off","rotate-cw","rotate-cw-square","rotate-ccw","rotate-ccw-square","rotate-ccw-key","rotate-3d","rose","roller-coaster","rocking-chair","rocket","ribbon","rewind","reply","reply-all","replace","replace-all","repeat","repeat-2","repeat-1","remove-formatting","regex","refrigerator","refresh-cw","refresh-cw-off","refresh-ccw","refresh-ccw-dot","redo","redo-dot","redo-2","recycle","rectangle-vertical","rectangle-horizontal","rectangle-goggles","rectangle-ellipsis","rectangle-circle","receipt","receipt-turkish-lira","receipt-text","receipt-swiss-franc","receipt-russian-ruble","receipt-pound-sterling","receipt-japanese-yen","receipt-indian-rupee","receipt-euro","receipt-cent","ratio","rat","rainbow","rail-symbol","radius","radio","radio-tower","radio-receiver","radical","radiation","radar","rabbit","quote","qr-code","pyramid","puzzle","proportions","projector","printer","printer-check","presentation","power","power-off","pound-sterling","popsicle","popcorn","pointer","pointer-off","podcast","pocket","pocket-knife","plus","plug","plug-zap","plug-2","play","plane","plane-takeoff","plane-landing","pizza","pipette","pin","pin-off","pill","pill-bottle","pilcrow","pilcrow-right","pilcrow-left","piggy-bank","picture-in-picture","picture-in-picture-2","pickaxe","piano","pi","phone","phone-outgoing","phone-off","phone-missed","phone-incoming","phone-forwarded","phone-call","philippine-peso","person-standing","percent","pentagon","pencil","pencil-ruler","pencil-off","pencil-line","pen","pen-tool","pen-off","pen-line","pc-case","paw-print","pause","party-popper","parking-meter","parentheses","paperclip","panels-top-left","panels-right-bottom","panels-left-bottom","panel-top","panel-top-open","panel-top-dashed","panel-top-close","panel-top-bottom-dashed","panel-right","panel-right-open","panel-right-dashed","panel-right-close","panel-left","panel-left-right-dashed","panel-left-open","panel-left-dashed","panel-left-close","panel-bottom","panel-bottom-open","panel-bottom-dashed","panel-bottom-close","panda","palette","paintbrush","paintbrush-vertical","paint-roller","paint-bucket","package","package-x","package-search","package-plus","package-open","package-minus","package-check","package-2","origami","orbit","option","omega","octagon","octagon-x","octagon-pause","octagon-minus","octagon-alert","nut","nut-off","notepad-text","notepad-text-dashed","notebook","notebook-text","notebook-tabs","notebook-pen","non-binary","nfc","newspaper","network","navigation","navigation-off","navigation-2","navigation-2-off","music","music-4","music-3","music-2","move","move-vertical","move-up","move-up-right","move-up-left","move-right","move-left","move-horizontal","move-down","move-down-right","move-down-left","move-diagonal","move-diagonal-2","move-3d","mouse","mouse-pointer","mouse-pointer-click","mouse-pointer-ban","mouse-pointer-2","mouse-pointer-2-off","mouse-off","mountain","mountain-snow","motorbike","moon","moon-star","monitor","monitor-x","monitor-up","monitor-stop","monitor-speaker","monitor-smartphone","monitor-play","monitor-pause","monitor-off","monitor-down","monitor-dot","monitor-cog","monitor-cloud","monitor-check","minus","minimize","minimize-2","milk","milk-off","milestone","microwave","microscope","microchip","mic","mic-vocal","mic-off","messages-square","message-square","message-square-x","message-square-warning","message-square-text","message-square-share","message-square-reply","message-square-quote","message-square-plus","message-square-off","message-square-more","message-square-lock","message-square-heart","message-square-dot","message-square-diff","message-square-dashed","message-square-code","message-circle","message-circle-x","message-circle-warning","message-circle-reply","message-circle-question-mark","message-circle-plus","message-circle-off","message-circle-more","message-circle-heart","message-circle-dashed","message-circle-code","merge","menu","memory-stick","meh","megaphone","megaphone-off","medal","maximize","maximize-2","martini","mars","mars-stroke","map","map-plus","map-pinned","map-pin","map-pin-x","map-pin-x-inside","map-pin-plus","map-pin-plus-inside","map-pin-pen","map-pin-off","map-pin-minus","map-pin-minus-inside","map-pin-house","map-pin-check","map-pin-check-inside","map-minus","mails","mailbox","mail","mail-x","mail-warning","mail-search","mail-question-mark","mail-plus","mail-open","mail-minus","mail-check","magnet","luggage","lollipop","logs","log-out","log-in","lock","lock-open","lock-keyhole","lock-keyhole-open","locate","locate-off","locate-fixed","loader","loader-pinwheel","loader-circle","list","list-x","list-video","list-tree","list-todo","list-start","list-restart","list-plus","list-ordered","list-music","list-minus","list-indent-increase","list-indent-decrease","list-filter","list-filter-plus","list-end","list-collapse","list-chevrons-up-down","list-chevrons-down-up","list-checks","list-check","linkedin","link","link-2","link-2-off","line-squiggle","lightbulb","lightbulb-off","ligature","life-buoy","library","library-big","lectern","leafy-green","leaf","layout-template","layout-panel-top","layout-panel-left","layout-list","layout-grid","layout-dashboard","layers","layers-plus","layers-2","laugh","lasso","lasso-select","laptop","laptop-minimal","laptop-minimal-check","languages","landmark","land-plot","lamp","lamp-wall-up","lamp-wall-down","lamp-floor","lamp-desk","lamp-ceiling","keyboard","keyboard-off","keyboard-music","key","key-square","key-round","kayak","kanban","joystick","japanese-yen","iteration-cw","iteration-ccw","italic","instagram","inspection-panel","info","infinity","indian-rupee","inbox","import","images","image","image-upscale","image-up","image-plus","image-play","image-off","image-minus","image-down","id-card","id-card-lanyard","ice-cream-cone","ice-cream-bowl","house","house-wifi","house-plus","house-plug","house-heart","hourglass","hotel","hospital","hop","hop-off","history","highlighter","hexagon","helicopter","heater","heart","heart-pulse","heart-plus","heart-off","heart-minus","heart-handshake","heart-crack","headset","headphones","headphone-off","heading","heading-6","heading-5","heading-4","heading-3","heading-2","heading-1","hdmi-port","hd","haze","hat-glasses","hash","hard-hat","hard-drive","hard-drive-upload","hard-drive-download","handshake","handbag","hand","hand-platter","hand-metal","hand-helping","hand-heart","hand-grab","hand-fist","hand-coins","hammer","hamburger","ham","guitar","group","grip","grip-vertical","grip-horizontal","grid-3x3","grid-3x2","grid-2x2","grid-2x2-x","grid-2x2-plus","grid-2x2-check","grape","graduation-cap","gpu","goal","globe","globe-lock","glasses","glass-water","gitlab","github","git-pull-request","git-pull-request-draft","git-pull-request-create","git-pull-request-create-arrow","git-pull-request-closed","git-pull-request-arrow","git-merge","git-graph","git-fork","git-compare","git-compare-arrows","git-commit-vertical","git-commit-horizontal","git-branch","git-branch-plus","git-branch-minus","gift","ghost","georgian-lari","gem","gavel","gauge","gamepad","gamepad-directional","gamepad-2","gallery-vertical","gallery-vertical-end","gallery-thumbnails","gallery-horizontal","gallery-horizontal-end","funnel","funnel-x","funnel-plus","fullscreen","fuel","frown","framer","frame","forward","form","forklift","footprints","folders","folder","folder-x","folder-up","folder-tree","folder-sync","folder-symlink","folder-search","folder-search-2","folder-root","folder-plus","folder-pen","folder-output","folder-open","folder-open-dot","folder-minus","folder-lock","folder-key","folder-kanban","folder-input","folder-heart","folder-git","folder-git-2","folder-down","folder-dot","folder-cog","folder-code","folder-closed","folder-clock","folder-check","folder-archive","fold-vertical","fold-horizontal","focus","flower","flower-2","flip-vertical","flip-vertical-2","flip-horizontal","flip-horizontal-2","flask-round","flask-conical","flask-conical-off","flashlight","flashlight-off","flame","flame-kindling","flag","flag-triangle-right","flag-triangle-left","flag-off","fishing-hook","fish","fish-symbol","fish-off","fire-extinguisher","fingerprint-pattern","film","files","file","file-x","file-x-corner","file-volume","file-video-camera","file-user","file-up","file-type","file-type-corner","file-text","file-terminal","file-symlink","file-stack","file-spreadsheet","file-sliders","file-signal","file-search","file-search-corner","file-scan","file-question-mark","file-plus","file-plus-corner","file-play","file-pen","file-pen-line","file-output","file-music","file-minus","file-minus-corner","file-lock","file-key","file-input","file-image","file-heart","file-headphone","file-exclamation-point","file-down","file-digit","file-diff","file-cog","file-code","file-code-corner","file-clock","file-check","file-check-corner","file-chart-pie","file-chart-line","file-chart-column","file-chart-column-increasing","file-braces","file-braces-corner","file-box","file-badge","file-axis-3d","file-archive","figma","ferris-wheel","fence","feather","fast-forward","fan","factory","facebook","eye","eye-off","eye-closed","external-link","expand","ev-charger","euro","ethernet-port","eraser","equal","equal-not","equal-approximately","ellipsis","ellipsis-vertical","egg","egg-off","egg-fried","eclipse","earth","earth-lock","ear","ear-off","dumbbell","drumstick","drum","droplets","droplet","droplet-off","drone","drill","dribbble","drama","drafting-compass","download","dot","door-open","door-closed","door-closed-locked","donut","dollar-sign","dog","dock","dna","dna-off","divide","disc","disc-album","disc-3","disc-2","diff","dices","dice-6","dice-5","dice-4","dice-3","dice-2","dice-1","diamond","diamond-plus","diamond-percent","diamond-minus","diameter","dessert","delete","decimals-arrow-right","decimals-arrow-left","database","database-zap","database-backup","dam","cylinder","currency","cup-soda","cuboid","crown","crosshair","cross","crop","croissant","credit-card","creative-commons","cpu","corner-up-right","corner-up-left","corner-right-up","corner-right-down","corner-left-up","corner-left-down","corner-down-right","corner-down-left","copyright","copyleft","copy","copy-x","copy-slash","copy-plus","copy-minus","copy-check","cooking-pot","cookie","contrast","container","contact","contact-round","construction","cone","concierge-bell","computer","component","compass","command","combine","columns-4","columns-3","columns-3-cog","columns-2","coins","cog","coffee","codesandbox","codepen","code","code-xml","club","clover","cloudy","cloud","cloud-upload","cloud-sync","cloud-sun","cloud-sun-rain","cloud-snow","cloud-rain","cloud-rain-wind","cloud-off","cloud-moon","cloud-moon-rain","cloud-lightning","cloud-hail","cloud-fog","cloud-drizzle","cloud-download","cloud-cog","cloud-check","cloud-backup","cloud-alert","closed-caption","clock","clock-plus","clock-fading","clock-check","clock-arrow-up","clock-arrow-down","clock-alert","clock-9","clock-8","clock-7","clock-6","clock-5","clock-4","clock-3","clock-2","clock-12","clock-11","clock-10","clock-1","clipboard","clipboard-x","clipboard-type","clipboard-plus","clipboard-pen","clipboard-pen-line","clipboard-paste","clipboard-minus","clipboard-list","clipboard-copy","clipboard-clock","clipboard-check","clapperboard","citrus","circuit-board","circle","circle-x","circle-user","circle-user-round","circle-stop","circle-star","circle-small","circle-slash","circle-slash-2","circle-question-mark","circle-power","circle-pound-sterling","circle-plus","circle-play","circle-pile","circle-percent","circle-pause","circle-parking","circle-parking-off","circle-off","circle-minus","circle-gauge","circle-fading-plus","circle-fading-arrow-up","circle-equal","circle-ellipsis","circle-dot","circle-dot-dashed","circle-dollar-sign","circle-divide","circle-dashed","circle-chevron-up","circle-chevron-right","circle-chevron-left","circle-chevron-down","circle-check","circle-check-big","circle-arrow-up","circle-arrow-right","circle-arrow-out-up-right","circle-arrow-out-up-left","circle-arrow-out-down-right","circle-arrow-out-down-left","circle-arrow-left","circle-arrow-down","circle-alert","cigarette","cigarette-off","church","chromium","chevrons-up","chevrons-up-down","chevrons-right","chevrons-right-left","chevrons-left","chevrons-left-right","chevrons-left-right-ellipsis","chevrons-down","chevrons-down-up","chevron-up","chevron-right","chevron-left","chevron-last","chevron-first","chevron-down","chess-rook","chess-queen","chess-pawn","chess-knight","chess-king","chess-bishop","cherry","chef-hat","check","check-line","check-check","chart-spline","chart-scatter","chart-pie","chart-no-axes-gantt","chart-no-axes-combined","chart-no-axes-column","chart-no-axes-column-increasing","chart-no-axes-column-decreasing","chart-network","chart-line","chart-gantt","chart-column","chart-column-stacked","chart-column-increasing","chart-column-decreasing","chart-column-big","chart-candlestick","chart-bar","chart-bar-stacked","chart-bar-increasing","chart-bar-decreasing","chart-bar-big","chart-area","cctv","cat","castle","cast","cassette-tape","case-upper","case-sensitive","case-lower","carrot","card-sim","caravan","car","car-taxi-front","car-front","captions","captions-off","cannabis","cannabis-off","candy","candy-off","candy-cane","camera","camera-off","calendars","calendar","calendar-x","calendar-x-2","calendar-sync","calendar-search","calendar-range","calendar-plus","calendar-plus-2","calendar-off","calendar-minus","calendar-minus-2","calendar-heart","calendar-fold","calendar-days","calendar-cog","calendar-clock","calendar-check","calendar-check-2","calendar-arrow-up","calendar-arrow-down","calendar-1","calculator","cake","cake-slice","cable","cable-car","bus","bus-front","building","building-2","bug","bug-play","bug-off","bubbles","brush","brush-cleaning","bring-to-front","briefcase","briefcase-medical","briefcase-conveyor-belt","briefcase-business","brick-wall","brick-wall-shield","brick-wall-fire","brain","brain-cog","brain-circuit","brackets","braces","boxes","box","bow-arrow","bottle-wine","bot","bot-off","bot-message-square","boom-box","bookmark","bookmark-x","bookmark-plus","bookmark-minus","bookmark-check","book","book-x","book-user","book-up","book-up-2","book-type","book-text","book-search","book-plus","book-open","book-open-text","book-open-check","book-minus","book-marked","book-lock","book-key","book-image","book-heart","book-headphones","book-down","book-dashed","book-copy","book-check","book-audio","book-alert","book-a","bone","bomb","bolt","bold","bluetooth","bluetooth-searching","bluetooth-off","bluetooth-connected","blocks","blinds","blend","bitcoin","birdhouse","bird","biohazard","binoculars","binary","bike","biceps-flexed","between-vertical-start","between-vertical-end","between-horizontal-start","between-horizontal-end","bell","bell-ring","bell-plus","bell-off","bell-minus","bell-electric","bell-dot","beer","beer-off","beef","bed","bed-single","bed-double","bean","bean-off","beaker","battery","battery-warning","battery-plus","battery-medium","battery-low","battery-full","battery-charging","bath","baseline","barrel","barcode","banknote","banknote-x","banknote-arrow-up","banknote-arrow-down","bandage","banana","ban","balloon","baggage-claim","badge","badge-x","badge-turkish-lira","badge-swiss-franc","badge-russian-ruble","badge-question-mark","badge-pound-sterling","badge-plus","badge-percent","badge-minus","badge-japanese-yen","badge-info","badge-indian-rupee","badge-euro","badge-dollar-sign","badge-check","badge-cent","badge-alert","backpack","baby","axis-3d","axe","award","audio-waveform","audio-lines","atom","at-sign","asterisk","arrows-up-from-line","arrow-up","arrow-up-z-a","arrow-up-wide-narrow","arrow-up-to-line","arrow-up-right","arrow-up-narrow-wide","arrow-up-left","arrow-up-from-line","arrow-up-from-dot","arrow-up-down","arrow-up-a-z","arrow-up-1-0","arrow-up-0-1","arrow-right","arrow-right-to-line","arrow-right-left","arrow-right-from-line","arrow-left","arrow-left-to-line","arrow-left-right","arrow-left-from-line","arrow-down","arrow-down-z-a","arrow-down-wide-narrow","arrow-down-up","arrow-down-to-line","arrow-down-to-dot","arrow-down-right","arrow-down-narrow-wide","arrow-down-left","arrow-down-from-line","arrow-down-a-z","arrow-down-1-0","arrow-down-0-1","arrow-big-up","arrow-big-up-dash","arrow-big-right","arrow-big-right-dash","arrow-big-left","arrow-big-left-dash","arrow-big-down","arrow-big-down-dash","armchair","archive","archive-x","archive-restore","apple","app-window","app-window-mac","aperture","anvil","antenna","annoyed","angry","anchor","amphora","ampersands","ampersand","ambulance","align-vertical-space-between","align-vertical-space-around","align-vertical-justify-start","align-vertical-justify-end","align-vertical-justify-center","align-vertical-distribute-start","align-vertical-distribute-end","align-vertical-distribute-center","align-start-vertical","align-start-horizontal","align-horizontal-space-between","align-horizontal-space-around","align-horizontal-justify-start","align-horizontal-justify-end","align-horizontal-justify-center","align-horizontal-distribute-start","align-horizontal-distribute-end","align-horizontal-distribute-center","align-end-vertical","align-end-horizontal","align-center-vertical","align-center-horizontal","album","alarm-smoke","alarm-clock","alarm-clock-plus","alarm-clock-off","alarm-clock-minus","alarm-clock-check","airplay","air-vent","activity","accessibility","a-large-small","a-arrow-up","a-arrow-down"],ti=e=>{const{value:o,defaultValue:t,onChange:n,isOpen:a,onOpen:i,onClose:s,closeOnSelect:c=!0}=e,[d,u]=p.useState(a??!1),[m,g]=p.useState(o??t),[h,f]=p.useState(""),y=p.useRef(null),b=p.useRef(null);p.useEffect(()=>{o!==void 0&&g(o)},[o]),p.useEffect(()=>{a!==void 0&&u(a)},[a]);const k=p.useMemo(()=>h?ea.filter(x=>x.toLowerCase().includes(h.toLowerCase())).slice(0,100):ea.slice(0,100),[h]);p.useEffect(()=>{const x=v=>{d&&y.current&&b.current&&!y.current.contains(v.target)&&!b.current.contains(v.target)&&C()};if(typeof(document==null?void 0:document.addEventListener)=="function")return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[d]);const C=p.useCallback(()=>{a===void 0&&u(!1),s&&s()},[s,a]),j=p.useCallback(()=>{const x=!d;a===void 0&&u(x),x?(i&&i(),f("")):s&&s()},[d,i,s,a]),w=p.useCallback(x=>{o===void 0&&g(x),n&&n(x),c&&C()},[n,c,C,o]),S=p.useCallback(x=>{f(x)},[]);return{isOpen:d,selectedIcon:m,searchQuery:h,filteredIcons:k,handleToggle:j,handleIconSelect:w,handleSearchChange:S,handleClose:C,triggerRef:y,dropdownRef:b}},bo={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out"},dropdown:{position:"absolute",mixBlendMode:"normal",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"280px",maxHeight:"320px",overflow:"hidden",display:"flex",flexDirection:"column"},searchInput:{marginBottom:"12px",flexShrink:0},iconGrid:{display:"grid",gridTemplateColumns:"repeat(6, 1fr)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"8px",overflowY:"auto",padding:"4px",color:"color-black",flexGrow:1},iconItem:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRadius:8,transition:"all 0.2s ease-in-out"}},yf={xs:{height:"28px",fontSize:"12px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"14px",padding:"10px 14px"},xl:{height:"56px",fontSize:"16px",padding:"12px 16px"}},xf={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},bf={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},ni=({label:e,placeholder:o="Select an icon",helperText:t,views:n={},size:a="md",shape:i="default",variant:s="default",error:c=!1,isDisabled:d=!1,isReadOnly:u=!1,showSearch:m=!0,isOpen:g,selectedIcon:h,searchQuery:f,filteredIcons:y,handleToggle:b,handleIconSelect:k,handleSearchChange:C,triggerRef:j,dropdownRef:w,handleClose:S,onChange:x,value:v,defaultValue:T,onOpen:R,onClose:M,closeOnSelect:E,...I})=>{const{getColor:V}=l.useTheme(),P={...bo.container,...n==null?void 0:n.container},z={...bo.trigger,...yf[a],...xf[i],...bf[s],...c&&{borderColor:"color-red-500"},...d&&{opacity:.6,cursor:"not-allowed"},...!d&&!u&&{_hover:{borderColor:"color-gray-300"}},...n==null?void 0:n.trigger},W={...bo.dropdown,...n==null?void 0:n.dropdown},F={...bo.iconGrid,...n==null?void 0:n.iconGrid};return r.jsxs(l.View,{...P,...I,children:[e&&r.jsx(l.Text,{fontSize:a==="xs"?"12px":a==="sm"?"14px":"16px",fontWeight:"500",color:"color-gray-700",marginBottom:"4px",...n==null?void 0:n.label,children:e}),r.jsxs(l.View,{ref:j,onClick:d||u?void 0:b,...z,children:[r.jsx(l.Horizontal,{alignItems:"center",gap:8,width:"100%",children:h?r.jsxs(l.Horizontal,{alignItems:"center",gap:8,width:"100%",children:[r.jsx(vr,{name:h,widthHeight:16}),r.jsx(l.Text,{color:"color-gray-800",fontSize:"inherit",style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h})]}):r.jsx(l.Text,{color:"color-gray-500",fontSize:"inherit",children:o})}),!u&&!d&&r.jsx(ce,{widthHeight:16,color:"color-gray-500",orientation:g?"up":"down"})]}),g&&r.jsxs(l.View,{ref:w,...W,children:[m&&r.jsx(l.View,{...bo.searchInput,...n==null?void 0:n.searchInput,children:r.jsx(ve,{placeholder:"Search icons...",value:f,onChange:H=>C(H),size:"sm",autoFocus:!0})}),r.jsx(l.View,{...F,children:y.length>0?y.map(H=>r.jsx(l.View,{...bo.iconItem,onClick:()=>k(H),title:H,_hover:{backgroundColor:"color-gray-50",transform:"scale(1.05)"},backgroundColor:h===H?"#EFF6FF":"transparent",borderWidth:h===H?"1px":"0px",borderStyle:"solid",borderColor:h===H?"#BFDBFE":"transparent",...n==null?void 0:n.iconItem,children:r.jsx(vr,{name:H,widthHeight:20})},H)):r.jsx(l.View,{gridColumn:"1 / -1",padding:"20px",textAlign:"center",color:"color-gray-500",children:r.jsx(l.Text,{fontSize:"14px",children:"No icons found"})})})]}),t&&r.jsx(l.Text,{color:c?"color-red-500":"color-gray-600",marginTop:"4px",...n==null?void 0:n.helperText,children:t})]})},kf=e=>{const o=fe(e),t={...e,value:o.value??e.value??e.defaultValue},n=ti(t),a=i=>{n.handleIconSelect(i),o.onChange(i)};return r.jsx(ni,{...n,...t,handleIconSelect:a})},Cf=kf,Ge={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out"},dropdown:{position:"absolute",mixBlendMode:"normal",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"320px",maxHeight:"400px",overflow:"hidden"},searchInput:{marginBottom:"12px"},categoryTabs:{display:"flex",flexDirection:"row",flexWrap:"wrap",borderBottom:"1px solid color-gray-100",marginBottom:"12px",overflowX:"auto"},categoryTab:{padding:"8px 12px",cursor:"pointer",borderBottom:"2px solid transparent",transition:"all 0.2s ease-in-out",fontSize:"14px",fontWeight:"500",color:"color-gray-600",whiteSpace:"nowrap",borderRadius:"8px 8px 0 0"},emojiGrid:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"4px",maxHeight:"240px",overflowY:"auto",padding:"4px",color:"color-black"},emoji:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRadius:6,fontSize:"20px",transition:"all 0.2s ease-in-out"}},Sf={xs:{height:"28px",fontSize:"12px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"14px",padding:"10px 14px"},xl:{height:"56px",fontSize:"16px",padding:"12px 16px"}},jf={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},wf={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},vf={recent:"🕒",smileys:"😀",people:"👤",animals:"🐶",food:"🍎",activities:"⚽",travel:"🚗",objects:"💡",symbols:"❤️",flags:"🏁"},Tf=[{emoji:"😀",name:"grinning face",category:"smileys",keywords:["happy","smile","grin"]},{emoji:"😃",name:"grinning face with big eyes",category:"smileys",keywords:["happy","smile","joy"]},{emoji:"😄",name:"grinning face with smiling eyes",category:"smileys",keywords:["happy","smile","joy"]},{emoji:"😁",name:"beaming face with smiling eyes",category:"smileys",keywords:["happy","smile","grin"]},{emoji:"😆",name:"grinning squinting face",category:"smileys",keywords:["happy","laugh","smile"]},{emoji:"😅",name:"grinning face with sweat",category:"smileys",keywords:["happy","sweat","relief"]},{emoji:"🤣",name:"rolling on the floor laughing",category:"smileys",keywords:["laugh","funny","rofl"]},{emoji:"😂",name:"face with tears of joy",category:"smileys",keywords:["laugh","cry","joy"]},{emoji:"🙂",name:"slightly smiling face",category:"smileys",keywords:["smile","happy"]},{emoji:"🙃",name:"upside-down face",category:"smileys",keywords:["silly","upside down"]},{emoji:"😉",name:"winking face",category:"smileys",keywords:["wink","flirt"]},{emoji:"😊",name:"smiling face with smiling eyes",category:"smileys",keywords:["happy","smile","blush"]},{emoji:"😇",name:"smiling face with halo",category:"smileys",keywords:["angel","innocent"]},{emoji:"🥰",name:"smiling face with hearts",category:"smileys",keywords:["love","hearts","adore"]},{emoji:"😍",name:"smiling face with heart-eyes",category:"smileys",keywords:["love","heart","eyes"]},{emoji:"🤩",name:"star-struck",category:"smileys",keywords:["star","struck","amazed"]},{emoji:"😘",name:"face blowing a kiss",category:"smileys",keywords:["kiss","love","flirt"]},{emoji:"😗",name:"kissing face",category:"smileys",keywords:["kiss","love"]},{emoji:"☺️",name:"smiling face",category:"smileys",keywords:["smile","happy","content"]},{emoji:"😚",name:"kissing face with closed eyes",category:"smileys",keywords:["kiss","love","closed eyes"]},{emoji:"😙",name:"kissing face with smiling eyes",category:"smileys",keywords:["kiss","love","smile"]},{emoji:"🥲",name:"smiling face with tear",category:"smileys",keywords:["happy","cry","tear","bittersweet"]},{emoji:"😋",name:"face savoring food",category:"smileys",keywords:["yum","delicious","food"]},{emoji:"😛",name:"face with tongue",category:"smileys",keywords:["tongue","silly","playful"]},{emoji:"😜",name:"winking face with tongue",category:"smileys",keywords:["wink","tongue","silly"]},{emoji:"🤪",name:"zany face",category:"smileys",keywords:["crazy","silly","wild"]},{emoji:"😝",name:"squinting face with tongue",category:"smileys",keywords:["tongue","silly","playful"]},{emoji:"🤑",name:"money-mouth face",category:"smileys",keywords:["money","rich","greedy"]},{emoji:"🤗",name:"hugging face",category:"smileys",keywords:["hug","love","care"]},{emoji:"🤭",name:"face with hand over mouth",category:"smileys",keywords:["oops","secret","quiet"]},{emoji:"🫢",name:"face with open eyes and hand over mouth",category:"smileys",keywords:["surprise","shock","oops"]},{emoji:"🫣",name:"face with peeking eye",category:"smileys",keywords:["peek","shy","embarrassed"]},{emoji:"🤫",name:"shushing face",category:"smileys",keywords:["quiet","secret","shh"]},{emoji:"🤔",name:"thinking face",category:"smileys",keywords:["think","consider","hmm"]},{emoji:"🫡",name:"saluting face",category:"smileys",keywords:["salute","respect","military"]},{emoji:"🤐",name:"zipper-mouth face",category:"smileys",keywords:["quiet","secret","zip"]},{emoji:"🤨",name:"face with raised eyebrow",category:"smileys",keywords:["suspicious","doubt","skeptical"]},{emoji:"😐",name:"neutral face",category:"smileys",keywords:["neutral","meh","blank"]},{emoji:"😑",name:"expressionless face",category:"smileys",keywords:["blank","deadpan","meh"]},{emoji:"😶",name:"face without mouth",category:"smileys",keywords:["quiet","speechless","silent"]},{emoji:"🫥",name:"dotted line face",category:"smileys",keywords:["invisible","depressed","disappear"]},{emoji:"😏",name:"smirking face",category:"smileys",keywords:["smirk","smug","confident"]},{emoji:"😒",name:"unamused face",category:"smileys",keywords:["unamused","bored","annoyed"]},{emoji:"🙄",name:"face with rolling eyes",category:"smileys",keywords:["eye roll","annoyed","whatever"]},{emoji:"😬",name:"grimacing face",category:"smileys",keywords:["grimace","awkward","oops"]},{emoji:"😮‍💨",name:"face exhaling",category:"smileys",keywords:["sigh","relief","tired"]},{emoji:"🤥",name:"lying face",category:"smileys",keywords:["lie","pinocchio","dishonest"]},{emoji:"😌",name:"relieved face",category:"smileys",keywords:["relief","calm","peaceful"]},{emoji:"😔",name:"pensive face",category:"smileys",keywords:["sad","thoughtful","pensive"]},{emoji:"😪",name:"sleepy face",category:"smileys",keywords:["sleepy","tired","drowsy"]},{emoji:"🤤",name:"drooling face",category:"smileys",keywords:["drool","desire","sleep"]},{emoji:"😴",name:"sleeping face",category:"smileys",keywords:["sleep","tired","zzz"]},{emoji:"😷",name:"face with medical mask",category:"smileys",keywords:["mask","sick","doctor"]},{emoji:"🤒",name:"face with thermometer",category:"smileys",keywords:["sick","fever","ill"]},{emoji:"🤕",name:"face with head-bandage",category:"smileys",keywords:["hurt","injured","bandage"]},{emoji:"🤢",name:"nauseated face",category:"smileys",keywords:["sick","nausea","disgusted"]},{emoji:"🤮",name:"face vomiting",category:"smileys",keywords:["vomit","sick","disgusted"]},{emoji:"🤧",name:"sneezing face",category:"smileys",keywords:["sneeze","sick","gesundheit"]},{emoji:"🥵",name:"hot face",category:"smileys",keywords:["hot","heat","sweat"]},{emoji:"🥶",name:"cold face",category:"smileys",keywords:["cold","freeze","blue"]},{emoji:"🥴",name:"woozy face",category:"smileys",keywords:["dizzy","drunk","confused"]},{emoji:"😵",name:"dizzy face",category:"smileys",keywords:["dizzy","confused","knocked out"]},{emoji:"😵‍💫",name:"face with spiral eyes",category:"smileys",keywords:["dizzy","hypnotized","confused"]},{emoji:"🤯",name:"exploding head",category:"smileys",keywords:["mind blown","shocked","amazed"]},{emoji:"🤠",name:"cowboy hat face",category:"smileys",keywords:["cowboy","hat","western"]},{emoji:"🥳",name:"partying face",category:"smileys",keywords:["party","celebration","birthday"]},{emoji:"🥸",name:"disguised face",category:"smileys",keywords:["disguise","glasses","incognito"]},{emoji:"😎",name:"smiling face with sunglasses",category:"smileys",keywords:["cool","sunglasses","awesome"]},{emoji:"🤓",name:"nerd face",category:"smileys",keywords:["nerd","geek","smart"]},{emoji:"🧐",name:"face with monocle",category:"smileys",keywords:["monocle","fancy","inspection"]},{emoji:"👋",name:"waving hand",category:"people",keywords:["wave","hello","goodbye"]},{emoji:"🤚",name:"raised back of hand",category:"people",keywords:["hand","stop"]},{emoji:"🖐️",name:"hand with fingers splayed",category:"people",keywords:["hand","five"]},{emoji:"✋",name:"raised hand",category:"people",keywords:["hand","stop","high five"]},{emoji:"🖖",name:"vulcan salute",category:"people",keywords:["spock","vulcan"]},{emoji:"👌",name:"OK hand",category:"people",keywords:["ok","perfect"]},{emoji:"🤌",name:"pinched fingers",category:"people",keywords:["italian","chef kiss"]},{emoji:"🤏",name:"pinching hand",category:"people",keywords:["small","tiny"]},{emoji:"✌️",name:"victory hand",category:"people",keywords:["peace","victory"]},{emoji:"🤞",name:"crossed fingers",category:"people",keywords:["luck","hope"]},{emoji:"🤟",name:"love-you gesture",category:"people",keywords:["love","you"]},{emoji:"🤘",name:"sign of the horns",category:"people",keywords:["rock","metal"]},{emoji:"🤙",name:"call me hand",category:"people",keywords:["call","phone"]},{emoji:"👈",name:"backhand index pointing left",category:"people",keywords:["point","left"]},{emoji:"👉",name:"backhand index pointing right",category:"people",keywords:["point","right"]},{emoji:"👆",name:"backhand index pointing up",category:"people",keywords:["point","up"]},{emoji:"🖕",name:"middle finger",category:"people",keywords:["middle finger","rude"]},{emoji:"👇",name:"backhand index pointing down",category:"people",keywords:["point","down"]},{emoji:"☝️",name:"index pointing up",category:"people",keywords:["point","up","one"]},{emoji:"👍",name:"thumbs up",category:"people",keywords:["thumbs up","good","yes"]},{emoji:"👎",name:"thumbs down",category:"people",keywords:["thumbs down","bad","no"]},{emoji:"✊",name:"raised fist",category:"people",keywords:["fist","power","solidarity"]},{emoji:"👊",name:"oncoming fist",category:"people",keywords:["fist","punch","bump"]},{emoji:"🤛",name:"left-facing fist",category:"people",keywords:["fist","bump","left"]},{emoji:"🤜",name:"right-facing fist",category:"people",keywords:["fist","bump","right"]},{emoji:"👏",name:"clapping hands",category:"people",keywords:["clap","applause","bravo"]},{emoji:"🙌",name:"raising hands",category:"people",keywords:["celebration","hooray","praise"]},{emoji:"👐",name:"open hands",category:"people",keywords:["open","hug","jazz hands"]},{emoji:"🤲",name:"palms up together",category:"people",keywords:["prayer","please","hope"]},{emoji:"🤝",name:"handshake",category:"people",keywords:["handshake","deal","agreement"]},{emoji:"🙏",name:"folded hands",category:"people",keywords:["prayer","thanks","please"]},{emoji:"✍️",name:"writing hand",category:"people",keywords:["write","author","signature"]},{emoji:"💅",name:"nail polish",category:"people",keywords:["nails","beauty","manicure"]},{emoji:"🤳",name:"selfie",category:"people",keywords:["selfie","camera","phone"]},{emoji:"💪",name:"flexed biceps",category:"people",keywords:["muscle","strong","flex"]},{emoji:"🦾",name:"mechanical arm",category:"people",keywords:["robot","prosthetic","cyborg"]},{emoji:"🦿",name:"mechanical leg",category:"people",keywords:["robot","prosthetic","cyborg"]},{emoji:"🦵",name:"leg",category:"people",keywords:["leg","limb","kick"]},{emoji:"🦶",name:"foot",category:"people",keywords:["foot","kick","stomp"]},{emoji:"👂",name:"ear",category:"people",keywords:["ear","hear","listen"]},{emoji:"🦻",name:"ear with hearing aid",category:"people",keywords:["hearing aid","deaf","accessibility"]},{emoji:"👃",name:"nose",category:"people",keywords:["nose","smell","sniff"]},{emoji:"🧠",name:"brain",category:"people",keywords:["brain","smart","think"]},{emoji:"🫀",name:"anatomical heart",category:"people",keywords:["heart","organ","love"]},{emoji:"🫁",name:"lungs",category:"people",keywords:["lungs","breathe","organ"]},{emoji:"🦷",name:"tooth",category:"people",keywords:["tooth","dental","smile"]},{emoji:"🦴",name:"bone",category:"people",keywords:["bone","skeleton","dog"]},{emoji:"👀",name:"eyes",category:"people",keywords:["eyes","look","see"]},{emoji:"👁️",name:"eye",category:"people",keywords:["eye","see","watch"]},{emoji:"👅",name:"tongue",category:"people",keywords:["tongue","taste","lick"]},{emoji:"👄",name:"mouth",category:"people",keywords:["mouth","lips","kiss"]},{emoji:"🫦",name:"biting lip",category:"people",keywords:["lip","bite","nervous"]},{emoji:"👶",name:"baby",category:"people",keywords:["baby","infant","child"]},{emoji:"🧒",name:"child",category:"people",keywords:["child","kid","young"]},{emoji:"👦",name:"boy",category:"people",keywords:["boy","child","male"]},{emoji:"👧",name:"girl",category:"people",keywords:["girl","child","female"]},{emoji:"🧑",name:"person",category:"people",keywords:["person","adult","human"]},{emoji:"👱",name:"person: blond hair",category:"people",keywords:["blond","hair","person"]},{emoji:"👨",name:"man",category:"people",keywords:["man","male","adult"]},{emoji:"🧔",name:"person: beard",category:"people",keywords:["beard","man","facial hair"]},{emoji:"👩",name:"woman",category:"people",keywords:["woman","female","adult"]},{emoji:"🧓",name:"older person",category:"people",keywords:["old","elderly","senior"]},{emoji:"👴",name:"old man",category:"people",keywords:["old","man","elderly"]},{emoji:"👵",name:"old woman",category:"people",keywords:["old","woman","elderly"]},{emoji:"🐶",name:"dog face",category:"animals",keywords:["dog","pet","animal"]},{emoji:"🐱",name:"cat face",category:"animals",keywords:["cat","pet","animal"]},{emoji:"🐭",name:"mouse face",category:"animals",keywords:["mouse","animal"]},{emoji:"🐹",name:"hamster",category:"animals",keywords:["hamster","pet"]},{emoji:"🐰",name:"rabbit face",category:"animals",keywords:["rabbit","bunny"]},{emoji:"🦊",name:"fox",category:"animals",keywords:["fox","animal"]},{emoji:"🐻",name:"bear",category:"animals",keywords:["bear","animal"]},{emoji:"🐼",name:"panda",category:"animals",keywords:["panda","bear"]},{emoji:"🐨",name:"koala",category:"animals",keywords:["koala","australia","marsupial"]},{emoji:"🐯",name:"tiger face",category:"animals",keywords:["tiger","cat","wild"]},{emoji:"🦁",name:"lion",category:"animals",keywords:["lion","king","cat"]},{emoji:"🐮",name:"cow face",category:"animals",keywords:["cow","moo","farm"]},{emoji:"🐷",name:"pig face",category:"animals",keywords:["pig","oink","farm"]},{emoji:"🐽",name:"pig nose",category:"animals",keywords:["pig","nose","snout"]},{emoji:"🐸",name:"frog",category:"animals",keywords:["frog","amphibian","green"]},{emoji:"🐵",name:"monkey face",category:"animals",keywords:["monkey","primate","banana"]},{emoji:"🙈",name:"see-no-evil monkey",category:"animals",keywords:["monkey","see no evil","eyes"]},{emoji:"🙉",name:"hear-no-evil monkey",category:"animals",keywords:["monkey","hear no evil","ears"]},{emoji:"🙊",name:"speak-no-evil monkey",category:"animals",keywords:["monkey","speak no evil","mouth"]},{emoji:"🐒",name:"monkey",category:"animals",keywords:["monkey","primate","zoo"]},{emoji:"🦍",name:"gorilla",category:"animals",keywords:["gorilla","ape","strong"]},{emoji:"🦧",name:"orangutan",category:"animals",keywords:["orangutan","ape","orange"]},{emoji:"🐺",name:"wolf",category:"animals",keywords:["wolf","howl","wild"]},{emoji:"🐗",name:"boar",category:"animals",keywords:["boar","pig","wild"]},{emoji:"🐴",name:"horse face",category:"animals",keywords:["horse","neigh","ride"]},{emoji:"🐎",name:"horse",category:"animals",keywords:["horse","racing","gallop"]},{emoji:"🦄",name:"unicorn",category:"animals",keywords:["unicorn","magical","horn"]},{emoji:"🦓",name:"zebra",category:"animals",keywords:["zebra","stripes","africa"]},{emoji:"🦌",name:"deer",category:"animals",keywords:["deer","antlers","forest"]},{emoji:"🦏",name:"rhinoceros",category:"animals",keywords:["rhino","horn","africa"]},{emoji:"🦛",name:"hippopotamus",category:"animals",keywords:["hippo","water","africa"]},{emoji:"🐘",name:"elephant",category:"animals",keywords:["elephant","trunk","memory"]},{emoji:"🦒",name:"giraffe",category:"animals",keywords:["giraffe","tall","neck"]},{emoji:"🦘",name:"kangaroo",category:"animals",keywords:["kangaroo","hop","australia"]},{emoji:"🦥",name:"sloth",category:"animals",keywords:["sloth","slow","lazy"]},{emoji:"🦦",name:"otter",category:"animals",keywords:["otter","water","cute"]},{emoji:"🦨",name:"skunk",category:"animals",keywords:["skunk","smell","stripe"]},{emoji:"🦡",name:"badger",category:"animals",keywords:["badger","honey","dig"]},{emoji:"🐾",name:"paw prints",category:"animals",keywords:["paw","prints","tracks"]},{emoji:"🐔",name:"chicken",category:"animals",keywords:["chicken","rooster","farm"]},{emoji:"🐓",name:"rooster",category:"animals",keywords:["rooster","cock","morning"]},{emoji:"🐣",name:"hatching chick",category:"animals",keywords:["chick","hatching","egg"]},{emoji:"🐤",name:"baby chick",category:"animals",keywords:["chick","baby","yellow"]},{emoji:"🐥",name:"front-facing baby chick",category:"animals",keywords:["chick","baby","cute"]},{emoji:"🦆",name:"duck",category:"animals",keywords:["duck","quack","water"]},{emoji:"🦅",name:"eagle",category:"animals",keywords:["eagle","bird","freedom"]},{emoji:"🦉",name:"owl",category:"animals",keywords:["owl","wise","night"]},{emoji:"🦇",name:"bat",category:"animals",keywords:["bat","vampire","night"]},{emoji:"",name:"bug",category:"animals",keywords:["bug","insect","crawl"]},{emoji:"🦋",name:"butterfly",category:"animals",keywords:["butterfly","beautiful","fly"]},{emoji:"🐌",name:"snail",category:"animals",keywords:["snail","slow","shell"]},{emoji:"🐞",name:"lady beetle",category:"animals",keywords:["ladybug","beetle","red"]},{emoji:"🐜",name:"ant",category:"animals",keywords:["ant","work","colony"]},{emoji:"🦟",name:"mosquito",category:"animals",keywords:["mosquito","bite","buzz"]},{emoji:"🕷️",name:"spider",category:"animals",keywords:["spider","web","eight legs"]},{emoji:"🦂",name:"scorpion",category:"animals",keywords:["scorpion","sting","desert"]},{emoji:"🐢",name:"turtle",category:"animals",keywords:["turtle","slow","shell"]},{emoji:"🐍",name:"snake",category:"animals",keywords:["snake","slither","reptile"]},{emoji:"🦎",name:"lizard",category:"animals",keywords:["lizard","gecko","reptile"]},{emoji:"🐙",name:"octopus",category:"animals",keywords:["octopus","tentacles","sea"]},{emoji:"🦑",name:"squid",category:"animals",keywords:["squid","tentacles","ocean"]},{emoji:"🦐",name:"shrimp",category:"animals",keywords:["shrimp","seafood","small"]},{emoji:"🦞",name:"lobster",category:"animals",keywords:["lobster","claws","red"]},{emoji:"🦀",name:"crab",category:"animals",keywords:["crab","claws","beach"]},{emoji:"🐡",name:"blowfish",category:"animals",keywords:["blowfish","puffer","spiky"]},{emoji:"🐠",name:"tropical fish",category:"animals",keywords:["fish","tropical","colorful"]},{emoji:"🐟",name:"fish",category:"animals",keywords:["fish","swim","water"]},{emoji:"🐬",name:"dolphin",category:"animals",keywords:["dolphin","smart","ocean"]},{emoji:"🐳",name:"spouting whale",category:"animals",keywords:["whale","spout","big"]},{emoji:"🐋",name:"whale",category:"animals",keywords:["whale","ocean","huge"]},{emoji:"🦈",name:"shark",category:"animals",keywords:["shark","teeth","dangerous"]},{emoji:"🐊",name:"crocodile",category:"animals",keywords:["crocodile","teeth","swamp"]},{emoji:"🌸",name:"cherry blossom",category:"animals",keywords:["flower","spring","pink"]},{emoji:"💐",name:"bouquet",category:"animals",keywords:["flowers","bouquet","gift"]},{emoji:"🌺",name:"hibiscus",category:"animals",keywords:["flower","tropical","red"]},{emoji:"🌻",name:"sunflower",category:"animals",keywords:["sunflower","yellow","big"]},{emoji:"🌹",name:"rose",category:"animals",keywords:["rose","love","red"]},{emoji:"🥀",name:"wilted flower",category:"animals",keywords:["flower","wilted","sad"]},{emoji:"🌷",name:"tulip",category:"animals",keywords:["tulip","spring","netherlands"]},{emoji:"🌼",name:"daisy",category:"animals",keywords:["daisy","white","simple"]},{emoji:"🌱",name:"seedling",category:"animals",keywords:["plant","grow","green"]},{emoji:"🌿",name:"herb",category:"animals",keywords:["herb","green","leaf"]},{emoji:"🍀",name:"four leaf clover",category:"animals",keywords:["clover","luck","green"]},{emoji:"🌳",name:"deciduous tree",category:"animals",keywords:["tree","nature","green"]},{emoji:"🌲",name:"evergreen tree",category:"animals",keywords:["tree","pine","christmas"]},{emoji:"🌴",name:"palm tree",category:"animals",keywords:["palm","tropical","beach"]},{emoji:"🌵",name:"cactus",category:"animals",keywords:["cactus","desert","spiky"]},{emoji:"🍎",name:"red apple",category:"food",keywords:["apple","fruit"]},{emoji:"🍊",name:"tangerine",category:"food",keywords:["orange","fruit"]},{emoji:"🍋",name:"lemon",category:"food",keywords:["lemon","fruit"]},{emoji:"🍌",name:"banana",category:"food",keywords:["banana","fruit"]},{emoji:"🍉",name:"watermelon",category:"food",keywords:["watermelon","fruit"]},{emoji:"🍇",name:"grapes",category:"food",keywords:["grapes","fruit"]},{emoji:"🍓",name:"strawberry",category:"food",keywords:["strawberry","fruit"]},{emoji:"🫐",name:"blueberries",category:"food",keywords:["blueberry","fruit"]},{emoji:"🥝",name:"kiwi fruit",category:"food",keywords:["kiwi","fruit","green"]},{emoji:"🍅",name:"tomato",category:"food",keywords:["tomato","red","vegetable"]},{emoji:"🫒",name:"olive",category:"food",keywords:["olive","green","oil"]},{emoji:"🥥",name:"coconut",category:"food",keywords:["coconut","tropical","milk"]},{emoji:"🥑",name:"avocado",category:"food",keywords:["avocado","green","healthy"]},{emoji:"🍆",name:"eggplant",category:"food",keywords:["eggplant","purple","vegetable"]},{emoji:"🥔",name:"potato",category:"food",keywords:["potato","vegetable","starch"]},{emoji:"🥕",name:"carrot",category:"food",keywords:["carrot","orange","vegetable"]},{emoji:"🌽",name:"ear of corn",category:"food",keywords:["corn","yellow","vegetable"]},{emoji:"🌶️",name:"hot pepper",category:"food",keywords:["pepper","hot","spicy"]},{emoji:"🫑",name:"bell pepper",category:"food",keywords:["pepper","bell","vegetable"]},{emoji:"🥒",name:"cucumber",category:"food",keywords:["cucumber","green","vegetable"]},{emoji:"🥬",name:"leafy greens",category:"food",keywords:["lettuce","greens","salad"]},{emoji:"🥦",name:"broccoli",category:"food",keywords:["broccoli","green","vegetable"]},{emoji:"🧄",name:"garlic",category:"food",keywords:["garlic","flavor","cooking"]},{emoji:"🧅",name:"onion",category:"food",keywords:["onion","cry","cooking"]},{emoji:"🍄",name:"mushroom",category:"food",keywords:["mushroom","fungi","cooking"]},{emoji:"🥜",name:"peanuts",category:"food",keywords:["peanuts","nuts","snack"]},{emoji:"🌰",name:"chestnut",category:"food",keywords:["chestnut","nut","autumn"]},{emoji:"🍞",name:"bread",category:"food",keywords:["bread","loaf","carbs"]},{emoji:"🥐",name:"croissant",category:"food",keywords:["croissant","french","pastry"]},{emoji:"🥖",name:"baguette bread",category:"food",keywords:["baguette","french","bread"]},{emoji:"🫓",name:"flatbread",category:"food",keywords:["flatbread","bread","thin"]},{emoji:"🥨",name:"pretzel",category:"food",keywords:["pretzel","twisted","snack"]},{emoji:"🥯",name:"bagel",category:"food",keywords:["bagel","round","breakfast"]},{emoji:"🥞",name:"pancakes",category:"food",keywords:["pancakes","breakfast","syrup"]},{emoji:"🧇",name:"waffle",category:"food",keywords:["waffle","breakfast","squares"]},{emoji:"🧀",name:"cheese wedge",category:"food",keywords:["cheese","dairy","yellow"]},{emoji:"🍖",name:"meat on bone",category:"food",keywords:["meat","bone","protein"]},{emoji:"🍗",name:"poultry leg",category:"food",keywords:["chicken","leg","meat"]},{emoji:"🥩",name:"cut of meat",category:"food",keywords:["steak","meat","red"]},{emoji:"🥓",name:"bacon",category:"food",keywords:["bacon","pork","breakfast"]},{emoji:"🍔",name:"hamburger",category:"food",keywords:["burger","hamburger","fast food"]},{emoji:"🍟",name:"french fries",category:"food",keywords:["fries","potato","fast food"]},{emoji:"🍕",name:"pizza",category:"food",keywords:["pizza","slice","italian"]},{emoji:"🌭",name:"hot dog",category:"food",keywords:["hot dog","sausage","fast food"]},{emoji:"🥪",name:"sandwich",category:"food",keywords:["sandwich","bread","lunch"]},{emoji:"🌮",name:"taco",category:"food",keywords:["taco","mexican","shell"]},{emoji:"🌯",name:"burrito",category:"food",keywords:["burrito","wrap","mexican"]},{emoji:"🫔",name:"tamale",category:"food",keywords:["tamale","mexican","corn"]},{emoji:"🥙",name:"stuffed flatbread",category:"food",keywords:["pita","flatbread","stuffed"]},{emoji:"🧆",name:"falafel",category:"food",keywords:["falafel","middle eastern","chickpea"]},{emoji:"🥚",name:"egg",category:"food",keywords:["egg","protein","breakfast"]},{emoji:"🍳",name:"cooking",category:"food",keywords:["cooking","frying pan","egg"]},{emoji:"🥘",name:"shallow pan of food",category:"food",keywords:["paella","pan","cooking"]},{emoji:"🍲",name:"pot of food",category:"food",keywords:["stew","pot","cooking"]},{emoji:"🫕",name:"fondue",category:"food",keywords:["fondue","cheese","pot"]},{emoji:"🥣",name:"bowl with spoon",category:"food",keywords:["bowl","cereal","soup"]},{emoji:"🥗",name:"green salad",category:"food",keywords:["salad","healthy","greens"]},{emoji:"🍿",name:"popcorn",category:"food",keywords:["popcorn","movie","snack"]},{emoji:"🧈",name:"butter",category:"food",keywords:["butter","dairy","spread"]},{emoji:"🧂",name:"salt",category:"food",keywords:["salt","seasoning","white"]},{emoji:"🥫",name:"canned food",category:"food",keywords:["can","canned","preserved"]},{emoji:"🍱",name:"bento box",category:"food",keywords:["bento","japanese","lunch box"]},{emoji:"🍘",name:"rice cracker",category:"food",keywords:["rice","cracker","japanese"]},{emoji:"🍙",name:"rice ball",category:"food",keywords:["rice ball","onigiri","japanese"]},{emoji:"🍚",name:"cooked rice",category:"food",keywords:["rice","cooked","bowl"]},{emoji:"🍛",name:"curry rice",category:"food",keywords:["curry","rice","spicy"]},{emoji:"🍜",name:"steaming bowl",category:"food",keywords:["ramen","noodles","soup"]},{emoji:"🍝",name:"spaghetti",category:"food",keywords:["spaghetti","pasta","italian"]},{emoji:"🍠",name:"roasted sweet potato",category:"food",keywords:["sweet potato","roasted","orange"]},{emoji:"🍢",name:"oden",category:"food",keywords:["oden","japanese","skewer"]},{emoji:"🍣",name:"sushi",category:"food",keywords:["sushi","japanese","fish"]},{emoji:"🍤",name:"fried shrimp",category:"food",keywords:["shrimp","fried","tempura"]},{emoji:"🍥",name:"fish cake with swirl",category:"food",keywords:["fish cake","japanese","swirl"]},{emoji:"🥮",name:"moon cake",category:"food",keywords:["moon cake","chinese","festival"]},{emoji:"🍡",name:"dango",category:"food",keywords:["dango","japanese","sweet"]},{emoji:"🥟",name:"dumpling",category:"food",keywords:["dumpling","chinese","steamed"]},{emoji:"🥠",name:"fortune cookie",category:"food",keywords:["fortune cookie","chinese","luck"]},{emoji:"🥡",name:"takeout box",category:"food",keywords:["takeout","chinese","box"]},{emoji:"🦀",name:"crab",category:"food",keywords:["crab","seafood","claws"]},{emoji:"🦞",name:"lobster",category:"food",keywords:["lobster","seafood","red"]},{emoji:"🦐",name:"shrimp",category:"food",keywords:["shrimp","seafood","small"]},{emoji:"🦑",name:"squid",category:"food",keywords:["squid","seafood","tentacles"]},{emoji:"🦪",name:"oyster",category:"food",keywords:["oyster","seafood","shell"]},{emoji:"🍦",name:"soft ice cream",category:"food",keywords:["ice cream","soft serve","cone"]},{emoji:"🍧",name:"shaved ice",category:"food",keywords:["shaved ice","snow cone","cold"]},{emoji:"🍨",name:"ice cream",category:"food",keywords:["ice cream","dessert","cold"]},{emoji:"🍩",name:"doughnut",category:"food",keywords:["donut","doughnut","sweet"]},{emoji:"🍪",name:"cookie",category:"food",keywords:["cookie","sweet","baked"]},{emoji:"🎂",name:"birthday cake",category:"food",keywords:["cake","birthday","celebration"]},{emoji:"🍰",name:"shortcake",category:"food",keywords:["cake","slice","dessert"]},{emoji:"🧁",name:"cupcake",category:"food",keywords:["cupcake","muffin","sweet"]},{emoji:"🥧",name:"pie",category:"food",keywords:["pie","dessert","slice"]},{emoji:"🍫",name:"chocolate bar",category:"food",keywords:["chocolate","bar","sweet"]},{emoji:"🍬",name:"candy",category:"food",keywords:["candy","sweet","wrapper"]},{emoji:"🍭",name:"lollipop",category:"food",keywords:["lollipop","candy","stick"]},{emoji:"🍮",name:"custard",category:"food",keywords:["custard","pudding","dessert"]},{emoji:"🍯",name:"honey pot",category:"food",keywords:["honey","sweet","bee"]},{emoji:"🍼",name:"baby bottle",category:"food",keywords:["bottle","baby","milk"]},{emoji:"🥛",name:"glass of milk",category:"food",keywords:["milk","glass","dairy"]},{emoji:"☕",name:"hot beverage",category:"food",keywords:["coffee","tea","hot"]},{emoji:"🫖",name:"teapot",category:"food",keywords:["teapot","tea","hot"]},{emoji:"🍵",name:"teacup without handle",category:"food",keywords:["tea","green tea","cup"]},{emoji:"🍶",name:"sake",category:"food",keywords:["sake","japanese","alcohol"]},{emoji:"🍾",name:"bottle with popping cork",category:"food",keywords:["champagne","celebration","cork"]},{emoji:"🍷",name:"wine glass",category:"food",keywords:["wine","glass","alcohol"]},{emoji:"🍸",name:"cocktail glass",category:"food",keywords:["cocktail","martini","alcohol"]},{emoji:"🍹",name:"tropical drink",category:"food",keywords:["tropical","cocktail","umbrella"]},{emoji:"🍺",name:"beer mug",category:"food",keywords:["beer","mug","alcohol"]},{emoji:"🍻",name:"clinking beer mugs",category:"food",keywords:["beer","cheers","celebration"]},{emoji:"🥂",name:"clinking glasses",category:"food",keywords:["champagne","cheers","celebration"]},{emoji:"🥃",name:"tumbler glass",category:"food",keywords:["whiskey","tumbler","alcohol"]},{emoji:"🫗",name:"pouring liquid",category:"food",keywords:["pour","liquid","drink"]},{emoji:"🥤",name:"cup with straw",category:"food",keywords:["soda","straw","drink"]},{emoji:"🧋",name:"bubble tea",category:"food",keywords:["bubble tea","boba","drink"]},{emoji:"🧃",name:"beverage box",category:"food",keywords:["juice box","drink","straw"]},{emoji:"🧉",name:"mate",category:"food",keywords:["mate","tea","south american"]},{emoji:"🧊",name:"ice",category:"food",keywords:["ice","cold","cube"]},{emoji:"⚽",name:"soccer ball",category:"activities",keywords:["soccer","football","sport"]},{emoji:"🏀",name:"basketball",category:"activities",keywords:["basketball","sport"]},{emoji:"🏈",name:"american football",category:"activities",keywords:["football","sport"]},{emoji:"⚾",name:"baseball",category:"activities",keywords:["baseball","sport"]},{emoji:"🥎",name:"softball",category:"activities",keywords:["softball","sport"]},{emoji:"🎾",name:"tennis",category:"activities",keywords:["tennis","sport"]},{emoji:"🚗",name:"automobile",category:"travel",keywords:["car","vehicle"]},{emoji:"🚕",name:"taxi",category:"travel",keywords:["taxi","car"]},{emoji:"🚙",name:"sport utility vehicle",category:"travel",keywords:["suv","car"]},{emoji:"🚌",name:"bus",category:"travel",keywords:["bus","vehicle"]},{emoji:"🚎",name:"trolleybus",category:"travel",keywords:["trolley","bus"]},{emoji:"🏎️",name:"racing car",category:"travel",keywords:["race","car","fast"]},{emoji:"💡",name:"light bulb",category:"objects",keywords:["idea","light","bulb"]},{emoji:"🔋",name:"battery",category:"objects",keywords:["battery","power"]},{emoji:"🖥️",name:"desktop computer",category:"objects",keywords:["computer","desktop"]},{emoji:"💻",name:"laptop",category:"objects",keywords:["laptop","computer"]},{emoji:"📱",name:"mobile phone",category:"objects",keywords:["phone","mobile"]},{emoji:"☎️",name:"telephone",category:"objects",keywords:["phone","telephone"]},{emoji:"❤️",name:"red heart",category:"symbols",keywords:["love","heart"]},{emoji:"🧡",name:"orange heart",category:"symbols",keywords:["love","heart"]},{emoji:"💛",name:"yellow heart",category:"symbols",keywords:["love","heart"]},{emoji:"💚",name:"green heart",category:"symbols",keywords:["love","heart"]},{emoji:"💙",name:"blue heart",category:"symbols",keywords:["love","heart"]},{emoji:"💜",name:"purple heart",category:"symbols",keywords:["love","heart"]},{emoji:"🖤",name:"black heart",category:"symbols",keywords:["love","heart"]},{emoji:"🤍",name:"white heart",category:"symbols",keywords:["love","heart"]},{emoji:"🏁",name:"chequered flag",category:"flags",keywords:["flag","race","finish"]},{emoji:"🚩",name:"triangular flag",category:"flags",keywords:["flag","warning"]},{emoji:"🏳️",name:"white flag",category:"flags",keywords:["flag","surrender"]},{emoji:"🏴",name:"black flag",category:"flags",keywords:["flag","pirate"]},{emoji:"🏳️‍🌈",name:"rainbow flag",category:"flags",keywords:["flag","rainbow","pride"]}],ai=e=>{const{value:o,defaultValue:t="",onChange:n,onEmojiSelect:a,isOpen:i,onOpen:s,onClose:c,closeOnSelect:d=!0,maxRecentEmojis:u=16,showRecentEmojis:m=!0,enabledCategories:g=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],customEmojis:h=[]}=e,[f,y]=p.useState(i??!1),[b,k]=p.useState(o??t),[C,j]=p.useState(""),[w,S]=p.useState("smileys"),[x,v]=p.useState([]),T=p.useRef(null),R=p.useRef(null),M=p.useMemo(()=>[...Tf,...h],[h]),E=p.useMemo(()=>{let H=M;if(w!=="recent"?H=H.filter(D=>D.category===w):H=x,C){const D=C.toLowerCase();H=H.filter(L=>L.name.toLowerCase().includes(D)||L.keywords.some(B=>B.toLowerCase().includes(D)))}return H},[M,w,x,C]);p.useEffect(()=>{o!==void 0&&k(o)},[o]),p.useEffect(()=>{i!==void 0&&y(i)},[i]),p.useEffect(()=>{if(m&&typeof localStorage<"u"){const H=localStorage.getItem("emojiPicker-recentEmojis");if(H)try{v(JSON.parse(H))}catch{}}},[m]),p.useEffect(()=>{if(typeof(document==null?void 0:document.addEventListener)!="function")return;const H=D=>{f&&T.current&&R.current&&!T.current.contains(D.target)&&!R.current.contains(D.target)&&F()};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[f]);const I=p.useCallback(H=>{m&&v(D=>{const L=D.filter($=>$.emoji!==H.emoji),B=[H,...L].slice(0,u);return typeof localStorage<"u"&&localStorage.setItem("emojiPicker-recentEmojis",JSON.stringify(B)),B})},[m,u]),V=p.useCallback(()=>{const H=!f;y(H),H?(s==null||s(),j(""),m&&x.length>0?S("recent"):S("smileys")):c==null||c()},[f,s,c,m,x.length]),P=p.useCallback(H=>{k(H.emoji),I(H),n==null||n(H.emoji),a==null||a(H),d&&(y(!1),c==null||c())},[n,a,d,c,I]),z=p.useCallback(H=>{j(H),H&&w==="recent"&&S("smileys")},[w]),W=p.useCallback(H=>{S(H),j("")},[]),F=p.useCallback(()=>{y(!1),c==null||c()},[c]);return{isOpen:f,selectedEmoji:b,recentEmojis:x,searchQuery:C,activeCategory:w,filteredEmojis:E,handleToggle:V,handleEmojiSelect:P,handleSearchChange:z,handleCategoryChange:W,handleClose:F,triggerRef:T,dropdownRef:R}},li=({id:e,name:o,label:t,placeholder:n="Select an emoji",helperText:a,views:i={},size:s="md",shape:c="default",variant:d="default",error:u=!1,isDisabled:m=!1,isReadOnly:g=!1,showSearch:h=!0,showCategories:f=!0,showRecentEmojis:y=!0,enabledCategories:b=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],isOpen:k,selectedEmoji:C,recentEmojis:j,searchQuery:w,activeCategory:S,filteredEmojis:x,handleToggle:v,handleEmojiSelect:T,handleSearchChange:R,handleCategoryChange:M,handleClose:E,triggerRef:I,dropdownRef:V,onChange:P,onOpen:z,onClose:W,onEmojiSelect:F,customEmojis:H,closeOnSelect:D,maxRecentEmojis:L,value:B,defaultValue:$,...O})=>{const{getColor:N}=l.useTheme(),_={...Ge.container,...i==null?void 0:i.container},Y={...Ge.trigger,...Sf[s],...jf[c],...wf[d],...u&&{borderColor:"color-red-500"},...m&&{opacity:.6,cursor:"not-allowed"},...!m&&!g&&{_hover:{borderColor:"color-gray-300"}},...i==null?void 0:i.trigger},A={...Ge.dropdown,...i==null?void 0:i.dropdown},G={...Ge.categoryTabs,...i==null?void 0:i.categoryTabs},Q={...Ge.emojiGrid,...i==null?void 0:i.emojiGrid},X=b.filter(K=>K==="recent"?y&&j.length>0:!0);return r.jsxs(l.View,{..._,...O,children:[t&&r.jsx(l.Text,{fontSize:s==="xs"?"12px":s==="sm"?"14px":"16px",fontWeight:"500",color:"color-gray-700",marginBottom:"4px",...i==null?void 0:i.label,children:t}),r.jsxs(l.View,{ref:I,onClick:m||g?void 0:v,...Y,children:[r.jsx(l.Horizontal,{alignItems:"center",gap:8,children:r.jsx(l.Text,{color:C?"color-gray-800":"color-gray-500",fontSize:"inherit",children:C||n})}),!g&&!m&&r.jsx(ce,{widthHeight:16,color:"color-gray-500",orientation:k?"up":"down"})]}),k&&r.jsxs(l.View,{ref:V,...A,children:[h&&r.jsx(l.View,{...Ge.searchInput,...i==null?void 0:i.searchInput,children:r.jsx(ve,{placeholder:"Search emojis...",value:w,onChange:K=>R(K.target.value),size:"sm"})}),f&&r.jsx(l.View,{...G,children:X.map(K=>r.jsx(l.View,{...Ge.categoryTab,...S===K&&{borderBottomColor:"theme-primary",color:"theme-primary",backgroundColor:"color-blue-50"},onClick:()=>M(K),title:K.charAt(0).toUpperCase()+K.slice(1),...i==null?void 0:i.categoryTab,children:vf[K]},K))}),r.jsx(l.View,{...Q,children:x.length>0?x.map((K,oe)=>r.jsx(l.View,{...Ge.emoji,onClick:()=>T(K),title:K.name,_hover:{backgroundColor:"color-gray-50",transform:"scale(1.05)"},color:"color-gray-800",...i==null?void 0:i.emoji,children:K.emoji},`${K.emoji}-${oe}`)):r.jsx(l.View,{gridColumn:"1 / -1",padding:"20px",textAlign:"center",color:"color-gray-500",children:r.jsx(l.Text,{fontSize:"14px",children:w?"No emojis found":"No emojis in this category"})})})]}),a&&r.jsx(l.Text,{color:u?"color-red-500":"color-gray-600",marginTop:"4px",...i==null?void 0:i.helperText,children:a})]})},If=e=>{const o=fe(e),t={...e,value:o.value??e.value??e.defaultValue},n=ai(t),a=i=>{var s;n.handleEmojiSelect(i),o.onChange(i.emoji),(s=e.onEmojiSelect)==null||s.call(e,i)};return r.jsx(li,{...n,...t,handleEmojiSelect:a})},Ff=If,Rf=({files:e,onRemove:o,maxHeight:t="120px",views:n={}})=>{if(e.length===0)return null;const a=p.useCallback(i=>i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`,[]);return r.jsx(l.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:t,overflowY:"auto",...n==null?void 0:n.container,children:e.map((i,s)=>{const c=i.url||"",d=i.type.startsWith("image/"),u=i.type.startsWith("video/"),m=i.type.startsWith("audio/");return r.jsx(l.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",position:"relative",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...n==null?void 0:n.item,children:r.jsxs(Se,{children:[r.jsx(Se.Trigger,{children:r.jsxs(l.View,{position:"relative",children:[d&&c&&r.jsx(l.Image,{src:c,alt:i.name,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),u&&c&&r.jsx(l.View,{as:"video",src:c,alt:i.name,controls:!1,muted:!0,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),m&&r.jsx(l.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:r.jsx(Ro,{widthHeight:24,color:"color-black"})}),!d&&!u&&!m&&r.jsx(l.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:r.jsx(ao,{widthHeight:24,color:"color-black"})}),o&&r.jsx(l.Button,{position:"absolute",top:"-4px",right:"-4px",width:"20px",height:"20px",minWidth:"20px",minHeight:"20px",borderRadius:"50%",backgroundColor:"color-red-500",color:"white",fontSize:14,fontWeight:"bold",padding:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"2px solid white",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"#DC2626"},onClick:g=>{g.stopPropagation(),o(s)},"aria-label":`Remove ${i.name}`,children:"×"})]})}),r.jsxs(Se.Content,{children:[d&&c&&r.jsx(l.Image,{src:c,alt:i.name,maxWidth:"300px"}),u&&c&&r.jsx(l.View,{as:"video",src:c,controls:!0,maxWidth:"300px"}),m&&c&&r.jsx(l.View,{as:"audio",src:c,controls:!0,width:"100%"}),r.jsxs(l.Text,{marginTop:"4px",maxLines:1,width:"100%",fontSize:12,...n==null?void 0:n.name,children:[i.name," (",a(i.size),")"]})]})]})},s)})})},zf=e=>{const o=ge("slider",e),t=Xl(o);return r.jsx(Jl,{...o,...t})},ii=zf,Mf=({url:e,type:o,name:t,onOpen:n})=>{const a=o.toLowerCase(),i=a.startsWith("image"),s=a.startsWith("video"),c=a.startsWith("audio"),d=()=>{n&&n()};return r.jsxs(l.View,{width:"60px",height:"60px",flexShrink:0,borderRadius:"4px",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-gray-200",cursor:"pointer",onClick:d,children:[i&&r.jsx(l.Image,{src:e,alt:t,width:"100%",height:"100%",objectFit:"cover"}),s&&r.jsx(l.View,{as:"video",src:e,controls:!0,width:"100%",height:"100%",style:{objectFit:"cover"},onClick:u=>u.stopPropagation()}),c&&r.jsx(l.View,{as:"audio",controls:!0,src:e,width:"100%",onClick:u=>u.stopPropagation()}),!i&&!s&&!c&&r.jsx(ao,{widthHeight:24,color:"color-gray-600"})]})},Ke=Ho.create(e=>({modals:[],onHide:o=>o,onShow:(o,t)=>({name:o,props:t}),show:(o,t={},n={})=>{e(a=>({...a,modals:[...a.modals,{name:o,props:{...t,isVisible:!0},overlayProps:n}]}))},hide:o=>{e(t=>o?{...t,modals:t.modals.filter(n=>n.name!==o)}:{modals:[]})},setOnHide:o=>{e(t=>({...t,onHide:o}))},setOnShow:o=>{e(t=>({...t,onShow:o}))}})),Wf=(e,o={},t={})=>{Ke.getState().show(e,o,t),Ke.getState().onShow(e,o)},dn=e=>{Ke.getState().onHide(e),Ke.getState().hide(typeof e=="string"?e:void 0)},Hf={square:{borderRadius:0},rounded:{borderRadius:8}},Pf={center:{justifyContent:"center",alignItems:"center"},top:{justifyContent:"center",alignItems:"flex-start"},right:{justifyContent:"flex-end",alignItems:"center"},bottom:{justifyContent:"center",alignItems:"flex-end"},left:{justifyContent:"flex-start",alignItems:"center"}},Vf={xs:12,sm:16,md:20,lg:24,xl:28},it={body:{fontSize:"16px",fontWeight:"400",color:"color-gray-700"}},si=p.memo(({children:e,blur:o,isOpen:t=!1,isClosePrevented:n=!1,onClose:a=()=>{},position:i="center",views:s,...c})=>{const d=p.useCallback(()=>{n||a()},[n,a]);return r.jsx(l.Center,{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:1e3,onClick:d,visibility:t?"visible":"hidden",opacity:t?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease",...s==null?void 0:s.container,children:r.jsx(l.View,{position:"absolute",top:0,left:0,zIndex:1e3,width:"100vw",height:"100vh",display:"flex",backgroundColor:"color-blackAlpha-500",backdropFilter:o?`blur(${o}px)`:void 0,transition:"background-color 0.2s ease, backdrop-filter 0.2s ease",onClick:d,...Pf[i],...c,...s==null?void 0:s.view,children:e})})}),Af={boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.15)"},Ef={elevation:5,shadowColor:"rgba(0, 0, 0, 0.15)",shadowOffset:{width:0,height:4},shadowOpacity:1,shadowRadius:16},Df=p.memo(({children:e,shadow:o,isFullScreen:t=!1,shape:n="rounded",views:a,isOpen:i=!0,position:s,...c})=>{const d=typeof document!==void 0?Af:Ef,u=p.useCallback(m=>{m&&m.stopPropagation&&m.stopPropagation()},[]);return r.jsx(l.Vertical,{cursor:"default",backgroundColor:"color-white",width:t?"100%":600,height:t?"100%":"fit-content",onClick:u,transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",opacity:i?1:0,transform:i?"translateY(0)":"translateY(8px)",...o||d,...Hf[n],media:{mobile:{width:"90%",maxWidth:"100%",margin:"16px"}},...c,...a==null?void 0:a.container,children:e})}),$f=p.memo(({children:e,buttonColor:o="theme-primary",iconSize:t="md",buttonPosition:n="right",views:a,onClose:i,...s})=>{const c=i||dn,d=r.jsx(l.View,{onClick:c,children:r.jsx(Te,{widthHeight:Vf[t],color:o})});return r.jsxs(l.Horizontal,{justifyContent:n==="none"?"center":"space-between",alignItems:"center",paddingVertical:16,paddingHorizontal:24,borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",media:{mobile:{paddingVertical:12,paddingHorizontal:16}},...s,...a==null?void 0:a.header,children:[n==="left"&&d,e,n==="right"&&d]})}),Lf=p.memo(({children:e,views:o,...t})=>r.jsx(l.View,{paddingVertical:16,paddingHorizontal:24,fontSize:it.body.fontSize,fontWeight:it.body.fontWeight,color:it.body.color,media:{mobile:{paddingVertical:12,paddingHorizontal:16,fontSize:"14px"}},...t,...o==null?void 0:o.view,children:e})),_f=p.memo(({children:e,views:o,...t})=>r.jsx(l.Horizontal,{marginTop:"auto",alignItems:"center",justifyContent:"flex-end",paddingVertical:16,paddingHorizontal:24,borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",gap:12,media:{mobile:{paddingVertical:12,paddingHorizontal:16,gap:8}},...t,...o==null?void 0:o.container,children:e})),un=({modals:e,onShow:o,onHide:t})=>{const n=Ke(a=>a.modals);return p.useEffect(()=>{o&&Ke.getState().setOnShow(o)},[o]),p.useEffect(()=>{t&&Ke.getState().setOnHide(t)},[t]),n.length===0?null:r.jsx(p.Fragment,{children:n.map((a,i)=>{const s=e[a.name];return s?r.jsx(si,{isOpen:a.props.isVisible,onClose:()=>dn(a.name),blur:5,...a.overlayProps,style:{zIndex:1e3+i},children:r.jsx(s,{...a.props})},i):(console.error(`${a.name} modal doesn't exist`),null)})})},so=({children:e})=>r.jsx(r.Fragment,{children:e});so.Overlay=si;so.Container=Df;so.Header=$f;so.Body=Lf;so.Footer=_f;so.Layout=un;const oa={xs:"320px",sm:"380px",md:"480px",lg:"640px",xl:"768px",full:"100%"},Bf={left:{top:0,left:0,bottom:0,height:"100vh",borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{top:0,right:0,bottom:0,height:"100vh",borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"},top:{top:0,left:0,right:0,width:"100vw",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},bottom:{bottom:0,left:0,right:0,width:"100vw",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200"}},pn=({isOpen:e,onClose:o,isClosePrevented:t,blur:n,children:a,...i})=>{const s=()=>{t||o()};return p.useEffect(()=>{const c=d=>{d.key==="Escape"&&e&&!t&&o()};return e&&document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c)}},[e,t,o]),r.jsx(l.View,{"data-testid":"drawer-overlay",role:"dialog","aria-modal":"true",position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e3,visibility:e?"visible":"hidden",onClick:s,opacity:e?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease",backgroundColor:e?"color-blackAlpha-500":"transparent",backdropFilter:n?`blur(${n}px)`:void 0,pointerEvents:e?"auto":"none",...i,children:a})},mn=({placement:e="right",size:o="md",isOpen:t=!1,children:n,...a})=>{const i=m=>{m.stopPropagation()},c=e==="top"||e==="bottom"?{height:o==="full"?"100vh":oa[o]||o,maxHeight:"100vh"}:{width:o==="full"?"100vw":oa[o]||o,maxWidth:"100vw"},d=e==="left"?"0 12px 12px 0":e==="right"?"12px 0 0 12px":e==="top"?"0 0 12px 12px":"12px 12px 0 0",u=t?"translate3d(0, 0, 0)":e==="left"?"translate3d(-100%, 0, 0)":e==="right"?"translate3d(100%, 0, 0)":e==="top"?"translate3d(0, -100%, 0)":"translate3d(0, 100%, 0)";return r.jsx(l.Vertical,{position:"absolute",backgroundColor:"color-white",borderRadius:d,...Bf[e],...c,onClick:i,transform:u,willChange:"transform",transition:"transform 0.24s ease, box-shadow 0.2s ease",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",...a,children:n})},Of=({children:e,onClose:o,buttonPosition:t="right",...n})=>{const a=o&&r.jsx(l.View,{onClick:o,cursor:"pointer",padding:8,children:r.jsx(Te,{widthHeight:20,color:"color-gray-500"})});return r.jsxs(l.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderBottomWidth:"1px",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:t==="none"?"center":"space-between",...n,children:[t==="left"&&a,e,t==="right"&&a]})},Nf=({children:e,...o})=>r.jsx(l.Vertical,{padding:24,flex:1,overflowY:"auto",...o,children:e}),qf=({children:e,...o})=>r.jsx(l.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderTopWidth:"1px",borderTopColor:"color-gray-200",alignItems:"center",justifyContent:"flex-end",gap:12,...o,children:e}),Xe=Ho.create(e=>({drawers:[],onHide:o=>o,onShow:(o,t)=>({name:o,props:t}),show:(o,t={},n={})=>{e(a=>({...a,drawers:[...a.drawers,{name:o,props:{...t,isOpen:!1},overlayProps:n}]}))},hide:o=>{e(t=>o?{...t,drawers:t.drawers.filter(n=>n.name!==o)}:{drawers:[]})},setOnHide:o=>{e(t=>({...t,onHide:o}))},setOnShow:o=>{e(t=>({...t,onShow:o}))}})),Uf=(e,o={},t={})=>{const n=Xe.getState();n.hide(e),n.show(e,o,t),n.onShow(e,o),queueMicrotask(()=>{Xe.setState(a=>({drawers:a.drawers.map(i=>i.name===e?{...i,props:{...i.props,isOpen:!0}}:i)}))})},ci=e=>{Xe.getState().onHide(e),Xe.getState().hide(typeof e=="string"?e:void 0)},Gf=({drawers:e,onShow:o,onHide:t})=>{const n=Xe(a=>a.drawers);return p.useEffect(()=>{o&&Xe.getState().setOnShow(o)},[o]),p.useEffect(()=>{t&&Xe.getState().setOnHide(t)},[t]),n.length===0?null:r.jsx(p.Fragment,{children:n.map((a,i)=>{var f;const s=e[a.name];if(!s)return console.error(`${a.name} drawer doesn't exist`),null;const{placement:c,size:d,isClosePrevented:u,blur:m,containerProps:g,...h}=a.props||{};return r.jsx(pn,{isOpen:a.props.isOpen,onClose:()=>ci(a.name),isClosePrevented:u,blur:m,...a.overlayProps,style:{zIndex:1e3+i,...((f=a.overlayProps)==null?void 0:f.style)||{}},children:r.jsx(mn,{placement:c,size:d,isOpen:a.props.isOpen,...g||{},children:r.jsx(p.Suspense,{fallback:null,children:r.jsx(s,{...h})})})},i)})})},Yf=({isOpen:e,onClose:o,placement:t="right",size:n="md",isClosePrevented:a,children:i,...s})=>r.jsx(pn,{isOpen:e,onClose:o,isClosePrevented:a,...s,children:r.jsx(mn,{placement:t,size:n,isOpen:e,children:i})}),co=Yf;co.Overlay=pn;co.Container=mn;co.Header=Of;co.Body=Nf;co.Footer=qf;co.Layout=Gf;const di=({behavior:e,keyboardVerticalOffset:o,dismissOnTap:t,enabled:n,children:a,...i})=>r.jsx(l.View,{flex:1,width:"100%",...i,children:a}),Kf=({header:e,footer:o,children:t,isLoading:n=!1,safe:a=!0,scrollable:i=!0,dismissKeyboardOnTap:s=!0,keyboardVerticalOffset:c=0,views:d={},backgroundColor:u="color-white",...m})=>{const g=a?l.SafeArea:l.View,h=l.isBrowser()?{}:{keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:!1,contentContainerStyle:{flexGrow:1}},f=n?r.jsx(l.Center,{flex:1,width:"100%",...d.content,children:r.jsx(Je,{})}):i?r.jsx(l.Scroll,{flex:1,width:"100%",...h,...d.content,children:t}):r.jsx(l.View,{flex:1,width:"100%",...d.content,children:t});return r.jsxs(g,{flex:1,height:"100%",width:"100%",flexDirection:"column",backgroundColor:u,...m,...d.container,children:[e!=null&&r.jsx(l.View,{width:"100%",flexShrink:0,...d.header,children:e}),r.jsxs(di,{flexDirection:"column",dismissOnTap:s,keyboardVerticalOffset:c,children:[f,o!=null&&r.jsx(l.View,{width:"100%",flexShrink:0,...d.footer,children:o})]})]})},Nr=Ho.create(e=>({started:!1,loaded:!1,setStarted:(o=!0)=>e({started:o}),setLoaded:(o=!0)=>e({loaded:o}),reset:()=>e({started:!1,loaded:!1})})),Xf=(e=!0)=>Nr.getState().setLoaded(e),Jf=(e=!0)=>Nr.getState().setStarted(e),Qf=({logo:e,logoSrc:o,loader:t,showLoader:n=!0,duration:a=600,isLoaded:i,onHidden:s,backgroundColor:c="color-white",children:d,...u})=>{const m=Nr(w=>w.loaded),g=i!==void 0?i:m,[h,f]=p.useState(!0),[y,b]=p.useState(!1);if(p.useEffect(()=>{if(!g||y)return;b(!0);const w=setTimeout(()=>{f(!1),s==null||s()},a);return()=>clearTimeout(w)},[g,y,a,s]),!h)return null;const k=l.isBrowser()?"fixed":"absolute",C=y?l.Animation.fadeOut({duration:`${a}ms`}):void 0,j=e??(o?r.jsx(l.Image,{src:o,width:120,height:120,alt:"logo"}):null);return r.jsxs(l.Center,{position:k,top:0,left:0,right:0,bottom:0,zIndex:9999,backgroundColor:c,animate:C,...u,children:[r.jsxs(l.Vertical,{alignItems:"center",gap:24,children:[j,n&&(t??r.jsx(Je,{}))]}),d]})},Ee=Ho.create((e,o)=>({stack:[{path:"/",params:{}}],index:0,push:(t,n={})=>e(a=>{const i=a.stack.slice(0,a.index+1);return i.push({path:t,params:n}),{stack:i,index:i.length-1}}),replace:(t,n={})=>e(a=>{const i=a.stack.slice();return i[a.index]={path:t,params:n},{stack:i}}),back:()=>{const{index:t}=o();return t<=0?!1:(e({index:t-1}),!0)},go:t=>e(n=>({index:Math.min(Math.max(n.index+t,0),n.stack.length-1)})),reset:(t,n={})=>e({stack:[{path:t,params:n}],index:0})})),Zf=(e,o)=>Ee.getState().push(e,o),ey=()=>Ee.getState().back(),gn=()=>{const e=Ee(d=>d.stack),o=Ee(d=>d.index),t=Ee(d=>d.push),n=Ee(d=>d.replace),a=Ee(d=>d.back),i=Ee(d=>d.go),s=Ee(d=>d.reset),c=e[o]||{path:"/",params:{}};return{path:c.path,params:c.params,stack:e,index:o,canGoBack:o>0,push:t,replace:n,back:a,go:i,reset:s,navigate:t}},ui=(e,o)=>{const t=e.split("/").filter(Boolean),n=o.split("/").filter(Boolean);if(t.length!==n.length)return null;const a={};for(let i=0;i<t.length;i+=1){const s=t[i];if(s.startsWith(":"))a[s.slice(1)]=decodeURIComponent(n[i]);else if(s!==n[i])return null}return a},oy=e=>Array.isArray(e)?e:Object.entries(e).map(([o,t])=>({path:o,component:t})),ry=({routes:e,notFound:o})=>{const{path:t,params:n}=gn();for(const a of oy(e)){const i=ui(a.path,t);if(i){const s=a.component;return r.jsx(s,{...n,...i})}}return o?r.jsx(o,{}):null},ty=({routes:e,notFound:o,initialPath:t,syncBrowserHistory:n=!1})=>{const{path:a,push:i,back:s,reset:c}=gn(),d=p.useRef(!1);return l.useMount(()=>{t&&c(t)}),p.useEffect(()=>{if(!(!n||typeof window>"u")){if(d.current){d.current=!1;return}try{window.history.pushState({path:a},"",a)}catch{}}},[a,n]),p.useEffect(()=>{if(!n||typeof window>"u")return;const u=()=>{d.current=!0,s()||(d.current=!1)};return window.addEventListener("popstate",u),()=>window.removeEventListener("popstate",u)},[n,s,i]),r.jsx(ry,{routes:e,notFound:o})},ny=(e=null,o=[])=>{const[t,n]=p.useState(e),[a,i]=p.useState(o),s=p.useRef({});return{activeItemId:t,setActiveItemId:n,expandedItemIds:a,toggleExpandedItem:u=>{i(m=>m.includes(u)?m.filter(h=>h!==u):[...m,u])},isItemExpanded:u=>a.includes(u),triggerRefs:s}},jt={sm:{padding:"8px 12px",fontSize:"12px",fontWeight:"500",media:{mobile:{padding:"6px 10px",fontSize:"11px"}}},md:{padding:"10px 14px",fontSize:"14px",fontWeight:"500",media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},lg:{padding:"12px 16px",fontSize:"14px",fontWeight:"600",media:{mobile:{padding:"10px 14px",fontSize:"12px"}}}},wt={default:{color:"color-gray-800",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"}},pi={horizontal:{flexDirection:"row",gap:"8px",media:{mobile:{flexDirection:"column",gap:"4px"}}},vertical:{flexDirection:"column",gap:"4px"}},vo={active:{backgroundColor:"color-blue-50",color:"color-blue-700",fontWeight:"600",borderLeft:"3px solid",borderColor:"color-blue-600"},hover:{backgroundColor:"color-gray-100",transition:"background-color 0.2s ease"}},mi=p.createContext({activeItemId:null,setActiveItemId:()=>{},expandedItemIds:[],toggleExpandedItem:()=>{},isItemExpanded:()=>!1,orientation:"vertical",size:"md",variant:"default",triggerRefs:{current:{}}}),ay=({children:e,value:o})=>r.jsx(mi.Provider,{value:o,children:e}),ar=()=>{const e=p.useContext(mi);if(!e)throw new Error("useNavigationMenuContext must be used within a NavigationMenuProvider");return e},hn=({children:e,views:o})=>{const{orientation:t}=ar(),n=t==="horizontal"?l.Horizontal:l.Vertical;return r.jsx(n,{width:"100%",...pi[t],transition:"background-color 0.2s ease, border-color 0.2s ease",borderRadius:"8px",...o==null?void 0:o.container,children:e})},gi=p.createContext({itemValue:null,isDisabled:!1}),ly=()=>{const e=p.useContext(gi);if(!e)throw new Error("useNavigationMenuItemContext must be used within a NavigationMenuItem");return e},fn=({item:e,value:o,isDisabled:t=!1,children:n,views:a})=>{var C;const{activeItemId:i,setActiveItemId:s,orientation:c,size:d,variant:u,onItemActivate:m}=ar(),g=(e==null?void 0:e.id)||o,h=i===g,f=(e==null?void 0:e.items)&&e.items.length>0,y=(e==null?void 0:e.disabled)||t,b=()=>{y||g&&(s(g),m&&m(g))},k=c==="horizontal"?l.Horizontal:l.Vertical;return n?r.jsx(gi.Provider,{value:{itemValue:g||null,isDisabled:y},children:r.jsx(l.View,{width:"100%",cursor:y?"not-allowed":"pointer",opacity:y?.6:1,borderRadius:"8px",transition:"background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease",...jt[d],...wt[u],...h?vo.active:{},_hover:y?{}:vo.hover,...a==null?void 0:a.item,children:n})}):f&&e?r.jsxs(k,{width:"100%",flexDirection:"column",position:"relative",...a==null?void 0:a.item,children:[r.jsxs(hi,{itemId:e.id,disabled:e.disabled,views:a,children:[e.icon&&r.jsx(l.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}),r.jsx(fi,{itemId:e.id,children:r.jsx(hn,{children:(C=e.items)==null?void 0:C.map(j=>r.jsx(fn,{item:j},j.id))})})]}):e?r.jsxs(l.View,{as:e.href?"a":"div",href:e.href,onClick:b,cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.6:1,width:"100%",display:"flex",alignItems:"center",borderRadius:"8px",transition:"background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease",gap:"8px",...jt[d],...wt[u],...h?vo.active:{},_hover:e.disabled?{}:vo.hover,...a==null?void 0:a.item,children:[e.icon&&r.jsx(l.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}):null},hi=({children:e,itemId:o,disabled:t,views:n})=>{const{activeItemId:a,toggleExpandedItem:i,isItemExpanded:s,size:c,variant:d,triggerRefs:u}=ar(),m=p.useRef(null),g=a===o,h=s(o);p.useEffect(()=>(m.current&&o&&(u.current[o]=m.current),()=>{o&&delete u.current[o]}),[o,u]);const f=y=>{y.preventDefault(),!t&&i(o)};return r.jsxs(l.View,{ref:m,onClick:f,cursor:t?"not-allowed":"pointer",opacity:t?.5:1,width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:8,transition:"background-color 0.2s ease",...jt[c],...wt[d],...g?vo.active:{},_hover:t?{}:vo.hover,...n==null?void 0:n.trigger,children:[r.jsx(l.View,{display:"flex",alignItems:"center",children:e}),r.jsx(l.View,{transition:"transform 0.2s ease",transform:h?"rotate(180deg)":"rotate(0deg)",...n==null?void 0:n.indicator,children:r.jsx(ce,{orientation:"down",widthHeight:16,color:"currentColor",filled:!0})})]})},fi=({children:e,itemId:o,views:t})=>{const{isItemExpanded:n,orientation:a,triggerRefs:i}=ar(),s=p.useRef(null),[c,d]=p.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),u=n(o);if(p.useEffect(()=>{if(u&&s.current&&o&&i.current[o]&&a==="horizontal"){const g=s.current.getBoundingClientRect(),h=i.current[o].getBoundingClientRect(),f=Math.max(g.width||200,200),y=Math.max(g.height||150,150),b=window.innerWidth,k=window.innerHeight,C={top:h.top,right:b-h.right,bottom:k-h.bottom,left:h.left},j=a==="horizontal"?[{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:h.left,y:h.top-y-8},{placement:"right",space:C.right,fits:C.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:C.left,fits:C.left>=f+8,x:h.left-f-8,y:h.top}]:[{placement:"right",space:C.right,fits:C.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:C.left,fits:C.left>=f+8,x:h.left-f-8,y:h.top},{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:h.left,y:h.top-y-8}],w=j.find(T=>T.fits);if(w){d({x:w.x,y:w.y,placement:w.placement});return}const S=j.reduce((T,R)=>R.space>T.space?R:T);let x=S.x,v=S.y;x+f>b&&(x=b-f-8),x<8&&(x=8),v+y>k&&(v=k-y-8),v<8&&(v=8),d({x,y:v,placement:S.placement})}},[u,a,o,i]),!u)return null;if(a==="vertical")return r.jsx(l.View,{paddingLeft:16,width:"100%",position:"relative",backgroundColor:"transparent",...t==null?void 0:t.container,children:e});const m={position:"fixed",left:c.x,top:c.y,zIndex:1e3};return r.jsx(l.View,{ref:s,role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:m,...t==null?void 0:t.container,children:e})},iy=({href:e,children:o,views:t,underline:n,isExternal:a,iconSize:i,...s})=>{const{itemValue:c,isDisabled:d}=ly(),{activeItemId:u,setActiveItemId:m,onItemActivate:g}=ar(),h=u===c,f=y=>{if(d){y.preventDefault();return}c&&(m(c),g&&g(c)),s.onClick&&s.onClick(y)};return r.jsx(l.View,{as:"a",href:d?void 0:e,onClick:f,cursor:d?"not-allowed":"pointer",opacity:d?.5:1,width:"100%",display:"flex",alignItems:"center","aria-current":h?"page":void 0,"aria-disabled":d,"data-active":h?"":void 0,"data-disabled":d?"":void 0,...h?{fontWeight:"bold"}:{},...t==null?void 0:t.container,...s,children:o})},sy=({items:e,orientation:o,views:t,themeMode:n})=>{const a=o==="horizontal"?l.Horizontal:l.Vertical;return!e||e.length===0?null:r.jsx(a,{width:"100%",...pi[o],...t==null?void 0:t.container,children:r.jsx(hn,{views:t,children:e.map(i=>r.jsx(fn,{item:i,views:t},i.id))})})},cy=e=>{const o=ge("navigation",e),{items:t,children:n,orientation:a="vertical",size:i="md",variant:s="default",defaultActiveItemId:c=null,defaultExpandedItemIds:d=[],onItemActivate:u,views:m,...g}=o,{activeItemId:h,setActiveItemId:f,expandedItemIds:y,toggleExpandedItem:b,isItemExpanded:k,triggerRefs:C}=ny(c,d);return r.jsx(ay,{value:{activeItemId:h,setActiveItemId:f,expandedItemIds:y,toggleExpandedItem:b,isItemExpanded:k,orientation:a,size:i,variant:s,onItemActivate:u,triggerRefs:C},children:t?r.jsx(sy,{items:t,orientation:a,size:i,variant:s,views:m,...g}):n})},uo=cy;uo.List=hn;uo.Item=fn;uo.Trigger=hi;uo.Content=fi;uo.Link=iy;const yi={},xi=p.createContext({views:yi,onRowClick:()=>{}}),dy=({children:e,views:o=yi,onRowClick:t})=>r.jsx(xi.Provider,{value:{views:o,onRowClick:t},children:e}),eo=()=>p.useContext(xi),he={table:{width:"100%",color:"inherit",borderRadius:"8px",overflow:"hidden",boxShadow:"0px 1px 3px rgba(0, 0, 0, 0.06), 0px 1px 2px rgba(0, 0, 0, 0.04)",border:"1px solid",borderColor:"color-gray-200",transition:"box-shadow 0.2s ease",media:{mobile:{overflowX:"auto",display:"block",borderRadius:"4px"}}},thead:{backgroundColor:"color-gray-50",borderBottom:"1px solid",borderColor:"color-gray-200"},th:{padding:"12px 16px",fontWeight:"600",fontSize:"14px",color:"inherit",opacity:.72,textAlign:"left",flex:1,media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},td:{padding:"12px 16px",fontSize:"14px",borderBottom:"1px solid",borderColor:"color-gray-100",color:"inherit",flex:1,media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},tr:{flexDirection:"row",alignItems:"stretch",width:"100%",transition:"background-color 0.15s ease",_hover:{backgroundColor:"color-gray-50"},_focus:{outline:"none",backgroundColor:"color-gray-100"}},tfoot:{backgroundColor:"color-gray-50",fontWeight:"600",borderTop:"2px solid",borderColor:"color-gray-200"},caption:{margin:"8px 0",color:"inherit",opacity:.62,fontSize:"14px",fontStyle:"italic",media:{mobile:{fontSize:"12px"}}}};({...he.th},{...he.td});({...he.tr});({...he.td},{...he.th});({...he.table},{...he.th}),{...he.td},{...he.tr},{...he.tfoot},{...he.caption};const uy=({children:e})=>r.jsx(l.View,{width:"100%",style:{overflowX:"auto"},children:e}),bi=e=>{const{views:o}=eo();return r.jsx(l.Element,{as:"table",...he.table,...o==null?void 0:o.table,...e,style:{borderCollapse:"collapse",...e.style||{}}})},ki=e=>{const{views:o}=eo();return r.jsx(l.Element,{as:"thead",textAlign:"left",...he.thead,...o==null?void 0:o.thead,...e})},Ci=e=>{const{views:o}=eo();return r.jsx(l.Element,{as:"th",whiteSpace:"nowrap",...he.th,...o==null?void 0:o.th,...e})},br=e=>{const{views:o,onRowClick:t}=eo();return r.jsx(l.Element,{as:"tr",...he.tr,...o==null?void 0:o.tr,onClick:t,...e})},vt=({isFirstColumn:e,...o})=>{const{views:t}=eo();return r.jsx(l.Element,{as:"td",whiteSpace:"nowrap",fontWeight:e?"500":"400",...he.td,...t==null?void 0:t.td,...o})},Si=e=>{const{views:o}=eo();return r.jsx(l.Element,{as:"tbody",...he.tbody,...o==null?void 0:o.tbody,...e})},ji=e=>{const{views:o}=eo();return r.jsx(l.Element,{as:"tfoot",...he.tfoot,...o==null?void 0:o.tfoot,...e})},wi=e=>{const{views:o}=eo();return r.jsx(l.Element,{as:"caption",...he.caption,...o==null?void 0:o.caption,...e})},py=({data:e,columns:o,footer:t,caption:n,themeMode:a})=>{const i=Math.max(o.length*140,320);return r.jsx(uy,{children:r.jsxs(bi,{role:"Table",minWidth:i,children:[n&&r.jsx(wi,{children:n}),r.jsx(ki,{children:r.jsx(br,{children:o.map(s=>r.jsx(Ci,{children:s.title},s.field))})}),r.jsx(Si,{children:e.map((s,c)=>r.jsx(br,{children:o.map((d,u)=>r.jsx(vt,{isFirstColumn:u===0,children:s[d.field]},d.field))},c))}),t&&r.jsx(ji,{children:r.jsx(br,{children:t.map((s,c)=>r.jsx(vt,{...s.props,children:s.value},c))})})]})})},Fe=({children:e,views:o,onClick:t})=>{const n=ge("table",{views:o,onClick:t});return r.jsx(dy,{views:n.views,onRowClick:n.onClick,children:e})};Fe.Head=ki;Fe.HeadCell=Ci;Fe.Body=Si;Fe.Row=br;Fe.Cell=vt;Fe.Footer=ji;Fe.Caption=wi;Fe.Container=bi;Fe.Template=py;const my=(e,o,t)=>{const n=u=>u.value!==void 0?u.value:u.title,a=()=>{if(!(!e||e.length===0)){if(o!==void 0){const u=e.find(m=>n(m)===o);if(u)return u}return e[0]}},[i,s]=p.useState(a()),c=t!==void 0?e.find(u=>n(u)===t):i,d=u=>{t===void 0&&s(u)};return p.useEffect(()=>{if(t!==void 0)return;const u=a(),m=i&&e.some(g=>n(g)===n(i));u&&(!m||o!==void 0&&i&&n(i)!==o)?s(u):!u&&i&&s(void 0)},[e,o]),{activeTab:c,setActiveTab:d}},gy=(e,o,t)=>{const[n,a]=p.useState(e||null);return{activeValue:o!==void 0?o:n,setActiveValue:c=>{o===void 0&&a(c),t&&t(c)}}},hy=p.memo(({tab:e,isActive:o,onClick:t,iconPosition:n="left",tabStyles:a,textStyles:i})=>{const s=()=>{switch(n){case"top":return"column";case"bottom":return"column-reverse";case"right":return"row-reverse";case"left":default:return"row"}},c=()=>["top","bottom"].includes(n)?"4px":"8px",d=e.icon&&p.isValidElement(e.icon)?p.cloneElement(e.icon,{strokeWidth:o?2.5:2}):e.icon;return r.jsxs(l.Element,{as:"div",role:"tab","aria-selected":o,tabIndex:o?0:-1,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...a,flexDirection:s(),gap:c(),onClick:t,"data-state":o?"active":"inactive",children:[d&&r.jsx(l.Element,{children:d},o?"active-icon":"inactive-icon"),r.jsxs(l.Element,{display:"grid",alignItems:"center",justifyContent:"center",children:[r.jsx(l.Text,{...i,fontWeight:"600",visibility:"hidden",gridColumn:"1",gridRow:"1","aria-hidden":"true",children:e.title}),r.jsx(l.Text,{...i,fontWeight:o?"600":"500",gridColumn:"1",gridRow:"1",children:e.title})]})]})}),yn=(e,o)=>{const t=o==="dark";return e==="segmented"?{header:{width:"fit-content",alignSelf:"flex-start",gap:6,padding:6,borderRadius:16,backgroundColor:"color-gray-100"},tab:{minHeight:44,padding:"0 22px",borderRadius:12,color:"color-gray-600",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-100",style:{backgroundColor:"transparent"}},activeTab:{backgroundColor:"color-white",color:"color-gray-900",boxShadow:t?"0 1px 3px rgba(0, 0, 0, 0.35)":"0 1px 2px rgba(0, 0, 0, 0.06)"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em"},activeText:{},content:{width:"100%"}}:e==="pill"?{header:{width:"100%",flexWrap:"wrap",gap:12},tab:{minHeight:44,padding:"0 22px",borderRadius:"999px",backgroundColor:"color-white",color:"color-gray-600",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200"},activeTab:{backgroundColor:"theme-primary",color:"color-white",borderColor:"theme-primary"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em",color:"inherit"},activeText:{color:"inherit"},content:{width:"100%"}}:{header:{width:"100%",gap:20,borderBottom:"none"},tab:{minHeight:44,padding:"0 4px",borderRadius:0,color:"color-gray-500",borderBottom:"3px solid",borderColor:"color-white",style:{backgroundColor:"transparent"}},activeTab:{color:"theme-primary",borderColor:"theme-primary"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em",color:"inherit"},activeText:{color:"inherit"},content:{width:"100%",paddingTop:12}}},fy=({tabs:e=[],activeTab:o,handleTabClick:t,views:n={},renderTab:a,renderContent:i,variant:s="underline",iconPosition:c="left"})=>{const{themeMode:d}=l.useTheme(),u=yn(s,d);return o?r.jsxs(l.Vertical,{width:"100%",height:"100%",...n.container,children:[r.jsx(l.Horizontal,{alignItems:"center",...u.header,...n.headerTabs,children:e.map(m=>{const g=(m.value!==void 0?m.value:m.title)===(o.value!==void 0?o.value:o.title),h=()=>t(m);return a?a(m,g,h):r.jsx(hy,{tab:m,isActive:g,onClick:h,iconPosition:c,tabStyles:{...u.tab,...n.tab,...g?u.activeTab:{},...g?n.activeTab:{}},textStyles:{...u.text,...n.title,...g?u.activeText:{},...g?n.activeText:{}}},m.title)})}),r.jsx(l.View,{height:"100%",...u.content,...n.content,children:i?i(o):o.content})]}):null},vi=p.createContext(null),xn=()=>{const e=p.useContext(vi);if(!e)throw new Error("useTabsContext must be used within a Tabs component");return e},yy=p.memo(({children:e,views:o})=>{var c;const{themeMode:t}=l.useTheme(),{variant:n="underline"}=xn(),a=yn(n,t),i=Po("tabs"),s=De({container:(c=i.views)==null?void 0:c.headerTabs},o);return r.jsx(l.Horizontal,{alignItems:"center",...a.header,...s==null?void 0:s.container,children:e})}),xy=p.memo(({value:e,children:o,disabled:t=!1,views:n})=>{var f,y;const{themeMode:a}=l.useTheme(),{activeValue:i,setActiveValue:s,variant:c="underline"}=xn(),d=i===e,u=yn(c,a),m=Po("tabs"),g=De({trigger:(f=m.views)==null?void 0:f.tab,activeState:(y=m.views)==null?void 0:y.activeTab},n),h=p.useCallback(()=>{t||s(e)},[t,e,s]);return r.jsx(l.View,{cursor:t?"not-allowed":"pointer",opacity:t?.6:1,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease-in-out",...u.tab,...d?u.activeTab:{},_hover:t?{}:c==="underline"?{color:"theme-primary"}:{opacity:.9},onClick:h,...g==null?void 0:g.trigger,...d?g==null?void 0:g.activeState:{},children:r.jsx(l.View,{...u.text,...d?u.activeText:{},children:o})})}),by=p.memo(({value:e,children:o,views:t})=>{const{activeValue:n}=xn();return n!==e?null:r.jsx(l.View,{width:"100%",padding:"24px",...t==null?void 0:t.content,children:o})}),ky=e=>{const o=ge("tabs",e),{tabs:t,views:n,defaultValue:a,onTabChange:i,renderTab:s,renderContent:c,variant:d="underline",iconPosition:u="left",value:m,onValueChange:g,children:h}=o,f=gy(a,m,g),y=my(t||[],a,m);if(h)return r.jsx(vi.Provider,{value:{...f,variant:d},children:h});if(t){const b=k=>{const C=j=>j.value!==void 0?j.value:j.title;(!y.activeTab||C(y.activeTab)!==C(k))&&(y.setActiveTab(k),i&&i(k))};return r.jsx(fy,{tabs:t,views:n,activeTab:y.activeTab,handleTabClick:b,renderTab:s,renderContent:c,variant:d,iconPosition:u})}return null},Cy=p.memo(ky),zo=Cy;zo.List=yy;zo.Trigger=xy;zo.Content=by;const Sy=e=>{const{children:o,_isInView:t=!1,alternateHighlightText:n=[],alternateAnimation:a=!1,alternateDuration:i=3e3,highlightText:s,highlightTypewriter:c=!1,highlightSlide:d=!1,highlightSlideDuration:u=500,highlightSlideStagger:m=50,highlightSlideSequential:g=!0}=e,[h,f]=p.useState(o),[y,b]=p.useState(s);return p.useEffect(()=>{if(!a||n.length===0||!t||typeof o!="string"||typeof s!="string")return f(o),b(s),()=>{};const k=o,C=s;let j=0;const w=x=>{const v=n[x],T=C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),R=new RegExp(T,"gi"),M=k.replace(R,v);f(M),b(v)};w(j);const S=setInterval(()=>{j=(j+1)%n.length,w(j)},i);return()=>clearInterval(S)},[a,n,i,s,o,t]),{finalDisplayedText:h,activeHighlightTarget:y,highlightTypewriter:c,highlightSlide:d,highlightSlideDuration:u,highlightSlideStagger:m,highlightSlideSequential:g}},jy={xs:24,sm:32,md:48,lg:96,xl:110},wy={xl:{media:{mobile:{fontSize:48},tablet:{fontSize:96},desktop:{fontSize:110}}},lg:{media:{mobile:{fontSize:48},tablet:{fontSize:48},desktop:{fontSize:70}}},md:{media:{mobile:{fontSize:32},tablet:{fontSize:40},desktop:{fontSize:56}}},sm:{media:{mobile:{fontSize:20},tablet:{fontSize:24},desktop:{fontSize:32}}},xs:{media:{mobile:{fontSize:14},tablet:{fontSize:18},desktop:{fontSize:20}}}},vy={underline:e=>({textDecoration:"underline",textDecorationColor:e,textDecorationThickness:"4px",textUnderlineOffset:"4px"}),background:e=>({backgroundColor:e,color:"color-white",padding:"0 8px",borderRadius:"4px"}),gradient:(e,o)=>({background:`linear-gradient(135deg, ${e}, ${o||e})`,backgroundClip:"text",WebkitBackgroundClip:"text !important",WebkitTextFillColor:"transparent",color:"transparent",display:"inline-block",textShadow:"none"}),outline:e=>({WebkitTextStroke:`1px ${e}`,WebkitTextFillColor:"transparent !important",color:"transparent",textShadow:"none"}),glow:e=>({color:e,textShadow:`0 0 10px ${e}80, 0 0 20px ${e}40, 0 0 30px ${e}20`}),solid:e=>({color:e}),default:()=>({})},Ty=({text:e,typingSpeed:o=50,pauseTime:t=500,onComplete:n,showCursor:a=!0,cursorColor:i="currentColor",textStyle:s,textComponent:c,as:d,...u})=>{const m=c||l.Text,g=Array.isArray(e)?e:[e],[h,f]=p.useState(g.map(()=>"")),[y,b]=p.useState(!1),[k,C]=p.useState(0),[j,w]=p.useState(0);p.useEffect(()=>{f(g.map(()=>"")),b(!1),C(0),w(0)},[e]),p.useEffect(()=>{if(y){n&&n();return}const x=g[k];if(j>=x.length){if(k>=g.length-1){b(!0);return}const T=setTimeout(()=>{C(R=>R+1),w(0)},t);return()=>clearTimeout(T)}const v=setTimeout(()=>{f(T=>{const R=[...T];return R[k]=x.substring(0,j+1),R}),w(T=>T+1)},o);return()=>clearTimeout(v)},[g,k,j,y,n,t,o]);const S=x=>{if(!x||typeof x!="string")return x;const v=x.split("|");return v.length===1?x:v.map((T,R)=>r.jsxs(p.Fragment,{children:[T,R<v.length-1&&r.jsx("br",{})]},R))};return r.jsx(r.Fragment,{children:h.map((x,v)=>r.jsxs(p.Fragment,{children:[S(x),a&&v===k&&!y&&r.jsx(m,{as:"span",display:"inline-block",width:"0.1em",height:"1em",backgroundColor:i,animation:"blink 1s step-end infinite",verticalAlign:"text-bottom",marginLeft:"1px",...s})]},v))})},Iy=({text:e,duration:o=500,direction:t="up",stagger:n=50,sequential:a=!1,textStyle:i,as:s,wordProps:c,textComponent:d,...u})=>{const[m,g]=p.useState(e),[h,f]=p.useState("entering"),[y,b]=p.useState(0),k=d||l.Text,C=p.useRef(null),j=p.useRef(null);p.useEffect(()=>{e===m&&h==="visible"||e!==m&&(h==="entering"||h==="visible"?(C.current=e,f("exiting")):h==="exiting"&&(C.current=e))},[e,m,h]);const{lines:w,totalWordCount:S}=p.useMemo(()=>{const F=m.split("|").map(D=>D.trim().split(/\s+/).filter(L=>L.length>0)),H=F.reduce((D,L)=>D+L.length,0);return{lines:F,totalWordCount:H}},[m]),x=p.useMemo(()=>a?S*(o+n):(S-1)*n+o,[S,o,n,a]),v=p.useMemo(()=>a?S*(o+n):(S-1)*n+o,[S,o,n,a]);p.useEffect(()=>(j.current&&clearTimeout(j.current),h==="entering"?j.current=setTimeout(()=>{f("visible")},x+50):h==="exiting"&&(j.current=setTimeout(()=>{C.current!==null&&(g(C.current),C.current=null),b(W=>W+1),f("entering")},v+50)),()=>{j.current&&clearTimeout(j.current)}),[h,x,v]);const{style:T,...R}=c||{},M=t==="up",E=W=>a?W*(o+n):W*n,I=p.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"bottom",whiteSpace:"nowrap",...i}),[i]),V=p.useMemo(()=>({display:"inline-flex",flexDirection:"column",alignItems:"center"}),[]),P=p.useMemo(()=>({display:"block",whiteSpace:"nowrap"}),[]);let z=0;return r.jsx(l.Element,{as:"span",style:I,...u,children:r.jsx("span",{style:V,children:w.map((W,F)=>r.jsx("span",{style:P,children:W.map((H,D)=>{const L=z++,B=E(L),$=D===W.length-1;let O;const N=`${o}ms`,_=`${B}ms`;h==="entering"?O=M?l.Animation.slideInUp({duration:N,delay:_,timingFunction:"ease-out",fillMode:"both"}):l.Animation.slideInDown({duration:N,delay:_,timingFunction:"ease-out",fillMode:"both"}):h==="exiting"&&(O=M?{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(-100%)",opacity:0},duration:N,delay:_,timingFunction:"ease-in",fillMode:"both"}:{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(100%)",opacity:0},duration:N,delay:_,timingFunction:"ease-in",fillMode:"both"});const Y={...T,display:"inline-block",marginRight:$?0:"0.25em",transform:h==="visible"?"translateY(0)":void 0,opacity:h==="visible"?1:void 0};return r.jsx(k,{as:"span",animate:O,...R,...Y,children:H},`${y}-${F}-${D}`)})},`line-${F}`))})})};function ra(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const st=e=>{if(!e||typeof e!="string")return e;const o=e.split("|");return o.length===1?e:o.map((t,n)=>r.jsxs(p.Fragment,{children:[t,n<o.length-1&&r.jsx("br",{})]},n))},Fy=({children:e,highlightText:o,highlightStyle:t="solid",highlightColor:n="theme-primary",highlightSecondaryColor:a,size:i="lg",views:s,highlightAnimate:c,animate:d,animationLoop:u=1,highlightAnimationLoop:m=1,highlightTypewriter:g=!1,highlightTypewriterDuration:h=3e3,highlightSlide:f=!1,highlightSlideDuration:y=500,highlightSlideStagger:b=50,highlightSlideSequential:k=!0,themeMode:C,responsive:j,alternateHighlightText:w,alternateAnimation:S,alternateDuration:x,_isInView:v,...T})=>{const{ref:R,inView:M}=l.useInView(),{finalDisplayedText:E,activeHighlightTarget:I,highlightTypewriter:V,highlightSlide:P,highlightSlideDuration:z,highlightSlideStagger:W,highlightSlideSequential:F}=Sy({children:e,highlightText:o,_isInView:M,highlightTypewriter:g,highlightSlide:f,highlightSlideDuration:y,highlightSlideStagger:b,highlightSlideSequential:k,alternateHighlightText:w,alternateAnimation:S,alternateDuration:x,...T}),H=jy[i],D={fontFamily:"Mulish, Inter, Geist, system-ui, sans-serif",fontWeight:i==="xl"?700:600,letterSpacing:i==="xl"?"-1.5px":"-0.01em"},L=vy[t](n,a),B=(A,G)=>A&&(Array.isArray(A)?A.map(Q=>({...Q,iterationCount:G.toString()})):{...A,iterationCount:G.toString()}),$=B(d,u),O=B(c,m),N=typeof E=="string"?E:typeof e=="string"?e:"",_={ref:R,animate:M?$:void 0,as:"h1",fontSize:H,...j?wy[i]:{},...D},Y=A=>!M&&(V||P)?r.jsx("span",{style:{opacity:0},children:A}):V?r.jsx(Ty,{text:A,typingSpeed:Math.max(30,h/(A.length*10)),cursorColor:"currentColor",...L}):P?r.jsx(Iy,{text:A,duration:z,stagger:W,sequential:F,direction:"up",wordProps:L}):st(A);if(typeof N=="string"&&I){const A=Array.isArray(I)?new RegExp(`(${I.map(K=>ra(String(K))).join("|")})`,"gi"):new RegExp(`(${ra(String(I))})`,"gi"),G=[];let Q=0,X;for(;X=A.exec(N);)X.index>Q&&G.push(N.substring(Q,X.index)),G.push({highlight:!0,text:X[0]}),Q=X.index+X[0].length;return Q<N.length&&G.push(N.substring(Q)),r.jsx(l.Element,{..._,...s==null?void 0:s.container,...T,children:G.map((K,oe)=>typeof K=="string"?r.jsx(l.Text,{as:"span",display:"inline",...s==null?void 0:s.text,children:st(K)},`text-${oe}`):r.jsx(l.Text,{as:"span",display:"inline",animate:M?O:void 0,...P?{}:L,...s==null?void 0:s.highlight,children:Y(K.text)},`highlight-${oe}`))})}return t&&!I?r.jsx(l.Element,{..._,...T,...s==null?void 0:s.container,children:r.jsx(l.Text,{as:"span",display:"inline",animate:M?O:void 0,...P?{}:L,...s==null?void 0:s.highlight,children:Y(N)})}):r.jsx(l.Text,{..._,...T,...s==null?void 0:s.container,...s==null?void 0:s.text,children:st(N)})},Ry=e=>r.jsx(Fy,{...e}),Ti=Ry,zy=({items:e,shape:o,variant:t,onToggleChange:n})=>{const{activeToggles:a,setActiveToggles:i}=oi();return r.jsx(ri,{items:e,shape:o,variant:t,activeToggles:a,setActiveToggles:i,onToggleChange:n})},Ii=zy,My=({items:e,onChange:o})=>{const[t,n]=p.useState(e),[a,i]=p.useState(null),[s,c]=p.useState(null),d=p.useRef({x:0,y:0}),u=p.useRef([]),m=p.useCallback((f,y)=>{f.preventDefault(),document.body.style.cursor="grabbing";const b="touches"in f?f.touches[0].clientX:f.clientX,k="touches"in f?f.touches[0].clientY:f.clientY;d.current={x:b,y:k},c(y),i(t[y])},[t]),g=p.useCallback(f=>{if(s===null)return;const y="touches"in f?f.touches[0].clientX:f.clientX,b="touches"in f?f.touches[0].clientY:f.clientY,k=u.current[s];if(!k)return;const C=y-d.current.x,j=b-d.current.y;k.style.transform=`translate(${C}px, ${j}px)`,k.style.zIndex="1000";const w=u.current.findIndex((S,x)=>{if(!S||x===s)return!1;const v=S.getBoundingClientRect();return b>=v.top&&b<=v.bottom});if(w!==-1&&w!==s){const S=[...t],[x]=S.splice(s,1);S.splice(w,0,x),n(S),c(w),o==null||o(S),d.current={x:y,y:b}}},[s,t,o]),h=p.useCallback(()=>{document.body.style.cursor="",u.current.forEach(f=>{f&&(f.style.transform="",f.style.zIndex="")}),c(null),i(null)},[s]);return p.useEffect(()=>{if(typeof(window==null?void 0:window.addEventListener)=="function")return s!==null&&(window.addEventListener("mousemove",g),window.addEventListener("touchmove",g),window.addEventListener("mouseup",h),window.addEventListener("touchend",h)),()=>{window.removeEventListener("mousemove",g),window.removeEventListener("touchmove",g),window.removeEventListener("mouseup",h),window.removeEventListener("touchend",h)}},[s,g,h]),{items:t,draggedItem:a,draggedIndex:s,itemRefs:u,handleDragStart:m}},Wy=({items:e,renderItem:o,containerProps:t,itemProps:n,draggedIndex:a,itemRefs:i,handleDragStart:s,views:c,themeMode:d})=>r.jsx(l.View,{overflow:"hidden",position:"relative",...t,...c==null?void 0:c.container,children:e.map((u,m)=>r.jsx(l.View,{ref:g=>{i.current[m]=g},onMouseDown:g=>s(g,m),onTouchStart:g=>s(g,m),position:"relative",cursor:"grab",transition:"transform 0.2s",...n,...c==null?void 0:c.item,children:o?o(u,m):u},m))}),Fi=e=>{const{items:o,draggedIndex:t,itemRefs:n,handleDragStart:a}=My(e);return r.jsx(Wy,{...e,items:o,draggedIndex:t,itemRefs:n,handleDragStart:a})},Hy=Fi,Py=({onFileSelect:e,onMultipleFileSelect:o,validateFile:t,accept:n,multiple:a,disabled:i,previewUrl:s})=>{const[c,d]=p.useState(!1),[u,m]=p.useState(null),g=p.useRef(null),h=s!==void 0?s:u;p.useEffect(()=>()=>{u&&URL.revokeObjectURL(u)},[u]);const f=p.useCallback(S=>{S.preventDefault(),S.stopPropagation(),!i&&d(!0)},[i]),y=p.useCallback(S=>{S.preventDefault(),S.stopPropagation(),!i&&d(!1)},[i]),b=p.useCallback(S=>{S.preventDefault(),S.stopPropagation(),!i&&d(!0)},[i]),k=p.useCallback(S=>{if(!S||S.length===0)return;const x=Array.from(S);if(!a&&x.length>0){const v=x[0];if(v.type.startsWith("image/")){const T=URL.createObjectURL(v);m(R=>(R&&URL.revokeObjectURL(R),T))}else m(null)}a?o&&o(x):x.length>0&&e&&e(x[0])},[a,o,e]),C=p.useCallback(S=>{S.preventDefault(),S.stopPropagation(),d(!1),!i&&S.dataTransfer.files&&S.dataTransfer.files.length>0&&(k(S.dataTransfer.files),S.dataTransfer.clearData())},[i,k]),j=p.useCallback(()=>{var S;i||(S=g.current)==null||S.click()},[i]),w=p.useCallback(S=>{k(S.target.files),S.target.value&&(S.target.value="")},[k]);return{isDragActive:c,handleDragEnter:f,handleDragLeave:y,handleDragOver:b,handleDrop:C,handleClick:j,handleFileChange:w,inputRef:g,preview:h}},Vy={position:"absolute",top:"-4px",right:"-4px",width:"16px",height:"16px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.5)",color:"white",border:"none",padding:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",fontSize:"12px",zIndex:10,_hover:{backgroundColor:"rgba(0, 0, 0, 0.7)"}},Ri=({files:e,sandboxId:o,onRemove:t,layout:n="inline",maxHeight:a="120px",showPreviews:i=!1,views:s={}})=>{if(e.length===0)return null;const c=p.useCallback(u=>u<1024?`${u} B`:u<1024*1024?`${(u/1024).toFixed(1)} KB`:`${(u/(1024*1024)).toFixed(1)} MB`,[]),d=p.useCallback(u=>u.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:u.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:u.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return r.jsx(l.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...s==null?void 0:s.container,children:e.map((u,m)=>{const g=typeof URL<"u"&&typeof URL.createObjectURL=="function"&&typeof Blob<"u"&&u instanceof Blob,h=(u==null?void 0:u.path)||(u==null?void 0:u.url)||(i&&g?URL.createObjectURL(u):""),f=u.type.startsWith("image/"),y=u.type.startsWith("video/"),b=u.type.startsWith("audio/"),k=d(u);return i?r.jsx(l.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...s==null?void 0:s.item,children:i&&r.jsxs(Se,{children:[r.jsxs(Se.Trigger,{children:[f&&r.jsx(l.Image,{src:h,alt:u.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&r.jsx(l.View,{as:"video",src:h,alt:u.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),b&&r.jsx(l.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(Ro,{widthHeight:24,color:"color-black"})}),!f&&!y&&!b&&r.jsx(l.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(ao,{widthHeight:24,color:"color-black"})}),t&&r.jsx(l.Button,{...Vy,onClick:C=>{C.stopPropagation(),t(m)},"aria-label":`Remove ${u.name}`,children:"×"})]}),r.jsxs(Se.Content,{children:[f&&r.jsx(l.Image,{src:h,alt:u.name,maxWidth:"100%"}),y&&r.jsx(l.View,{as:"video",src:h,controls:!0,maxWidth:"100%"}),b&&r.jsx(l.View,{as:"audio",src:h,controls:!0,width:"100%"}),r.jsxs(l.Text,{marginTop:"4px",maxLines:1,width:"100%",...s==null?void 0:s.name,children:[u.name," (",c(u.size),")"]})]})]})},m):r.jsxs(l.Horizontal,{alignItems:"center",gap:"8px",padding:"6px 10px 6px 8px",borderRadius:"9999px",border:"1px solid #E2E8F0",backgroundColor:"color-white",maxWidth:"100%",animate:{from:{opacity:0,scale:.96},to:{opacity:1,scale:1}},animationDuration:.2,...s==null?void 0:s.item,children:[r.jsx(l.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:k.backgroundColor,color:k.color,children:b?r.jsx(Ro,{widthHeight:12,color:"currentColor"}):r.jsx(ao,{widthHeight:12,color:"currentColor"})}),r.jsxs(l.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...s==null?void 0:s.name,children:[u.name," · ",c(u.size)]}),t&&r.jsx(l.View,{as:"button",type:"button",onClick:()=>t(m),"aria-label":`Remove ${u.name}`,display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",border:"none",backgroundColor:"transparent",color:"color-gray-400",padding:0,cursor:"pointer",transition:"color 0.2s ease, opacity 0.2s ease",_hover:{color:"color-gray-600"},children:"×"})]},m)})})},Ay=({children:e,text:o="Drop files here or click to upload",textProps:t,containerProps:n,disabled:a,accept:i,multiple:s,isDragActive:c,handleDragEnter:d,handleDragLeave:u,handleDragOver:m,handleDrop:g,handleClick:h,handleFileChange:f,inputRef:y,preview:b,imageProps:k,selectedFiles:C,onRemove:j})=>r.jsxs(l.Center,{width:"100%",minHeight:"200px",height:C&&C.length>0?"auto":"200px",borderWidth:2,borderStyle:"dashed",borderColor:c?"theme-primary":"color-gray-300",borderRadius:12,backgroundColor:c?"#EFF6FF":"color-gray-50",flexDirection:"column",cursor:a?"not-allowed":"pointer",opacity:a?.6:1,onClick:h,onDragEnter:d,onDragLeave:u,onDragOver:m,onDrop:g,transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease",overflow:"hidden",position:"relative",padding:16,...n,children:[r.jsx("input",{type:"file",ref:y,onChange:f,accept:i,multiple:s,style:{display:"none"},disabled:a}),b&&!s?r.jsxs(l.View,{width:"100%",height:"200px",position:"relative",children:[r.jsx(l.Image,{src:b,alt:"Preview",width:"100%",height:"100%",objectFit:"contain",...k}),r.jsx(l.Center,{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0,0,0,0.3)",opacity:0,_hover:{opacity:1},transition:"opacity 0.2s",children:r.jsx(l.Text,{color:"white",fontWeight:600,children:"Click to replace"})})]}):r.jsxs(l.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[e||r.jsxs(l.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[r.jsx(Gt,{widthHeight:40,color:c?"theme-primary":"color-gray-500"}),r.jsx(l.Text,{marginTop:16,color:c?"theme-primary":"color-gray-600",fontWeight:500,textAlign:"center",...t,children:o})]}),s&&C&&C.length>0&&r.jsx(l.View,{marginTop:16,width:"100%",children:r.jsx(Ri,{files:C,onRemove:j||(()=>{}),showPreviews:!0,layout:"inline",maxHeight:"160px"})})]})]}),Ey=e=>{const o=Py(e);return r.jsx(Ay,{...e,...o})},Dy=(e=!1)=>{const[o,t]=p.useState(e),[n,a]=p.useState(null);return p.useEffect(()=>{const i=d=>{!d.composedPath().some(g=>(g==null?void 0:g.id)==="dropdown-menu"||(g==null?void 0:g.id)==="dropdown-trigger")&&o&&(t(!1),a(null))},s=()=>{o&&(t(!1),a(null))},c=d=>{d.key==="Escape"&&o&&(t(!1),a(null))};if(!(typeof(document==null?void 0:document.addEventListener)!="function"||typeof(window==null?void 0:window.addEventListener)!="function"))return document.addEventListener("mousedown",i),window.addEventListener("resize",s),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",i),window.removeEventListener("resize",s),document.removeEventListener("keydown",c)}},[o]),{isOpen:o,setIsOpen:t,activeSubmenuId:n,setActiveSubmenuId:a}},$y={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},Ly={default:{backgroundColor:"color-white",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},_y={hover:{backgroundColor:"color-gray-100"}},zi=p.createContext({isOpen:!1,setIsOpen:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null}}),By=({children:e,value:o})=>r.jsx(zi.Provider,{value:o,children:e}),bn=()=>{const e=p.useContext(zi);if(!e)throw new Error("useDropdownMenuContext must be used within a DropdownMenuProvider");return e},Mi=({children:e,views:o,...t})=>{const{isOpen:n,setIsOpen:a,triggerRef:i}=bn(),s=c=>{c.stopPropagation(),a(!n)};return r.jsx(l.View,{ref:i,id:"dropdown-trigger",onClick:s,cursor:"pointer",position:"relative",display:"inline-block",...o==null?void 0:o.container,...t,children:e})},kn=({items:e,side:o="bottom",align:t="start",views:n,...a})=>{const{isOpen:i,variant:s,triggerRef:c}=bn(),d=p.useRef(null),{ref:u,relation:m}=l.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[g,h]=p.useState({x:0,y:0,placement:o});if(p.useEffect(()=>{c.current&&u&&(u.current=c.current)},[c,u,i]),p.useEffect(()=>{if(i&&d.current&&c.current){const b=c.current.getBoundingClientRect();let k=o;m&&(o==="bottom"&&m.space.vertical==="top"?k="top":o==="top"&&m.space.vertical==="bottom"?k="bottom":o==="right"&&m.space.horizontal==="left"?k="left":o==="left"&&m.space.horizontal==="right"&&(k="right"));let C=0,j=0;switch(k){case"bottom":C=t==="start"?b.left:t==="end"?b.right-180:b.left+b.width/2-90,j=b.bottom+8;break;case"top":C=t==="start"?b.left:t==="end"?b.right-180:b.left+b.width/2-90,j=b.top-8;break;case"right":C=b.right+8,j=t==="start"?b.top:t==="end"?b.bottom-100:b.top+b.height/2-50;break;case"left":C=b.left-8,j=t==="start"?b.top:t==="end"?b.bottom-100:b.top+b.height/2-50;break}h({x:C,y:j,placement:k})}},[i,o,t,c,m]),!i)return null;const y=(()=>{const b={position:"fixed",left:g.x,top:g.y,zIndex:1e3};switch(g.placement){case"top":return{...b,transform:"translateY(-100%)"};case"left":return{...b,transform:"translateX(-100%)"};case"bottom":case"right":default:return b}})();return r.jsx(l.View,{ref:d,id:"dropdown-menu",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:y,...Ly[s],...n==null?void 0:n.menu,...a,children:e.map((b,k)=>b.divider?r.jsx(Hi,{views:n},`divider-${k}`):r.jsx(Wi,{item:b,views:n},b.id))})},Wi=({item:e,views:o,...t})=>{const{activeSubmenuId:n,setActiveSubmenuId:a,size:i}=bn(),[s,c]=p.useState(!1),d=e.items&&e.items.length>0,u=n===e.id,m=p.useRef(null),g=()=>{c(!0),d&&a(e.id)},h=()=>{c(!1)},f=y=>{y.stopPropagation(),!e.disabled&&!d&&e.onClick&&e.onClick()};return r.jsxs(l.View,{ref:m,display:"flex",alignItems:"center",cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.5:1,position:"relative",...$y[i],_hover:e.disabled?{}:_y.hover,backgroundColor:s&&!e.disabled?"color-gray-100":"transparent",onMouseEnter:g,onMouseLeave:h,onClick:f,...o==null?void 0:o.item,...t,children:[e.icon&&r.jsx(l.View,{marginRight:8,...o==null?void 0:o.icon,children:e.icon}),r.jsx(l.View,{flexGrow:1,children:e.label}),d&&r.jsx(l.View,{marginLeft:8,...o==null?void 0:o.submenuIndicator,children:r.jsx(ce,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),u&&d&&r.jsx(kn,{items:e.items||[],side:"right",align:"start",views:o})]})},Hi=({views:e,...o})=>r.jsx(l.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.divider,...o}),Oy=({trigger:e,items:o,side:t="bottom",align:n="start",views:a,themeMode:i,...s})=>r.jsxs(l.View,{position:"relative",display:"inline-block",...a==null?void 0:a.container,...s,children:[r.jsx(Mi,{views:a,children:e}),r.jsx(kn,{items:o,side:t,align:n,views:a})]}),Ny=({trigger:e,items:o,size:t="md",variant:n="default",side:a="bottom",align:i="start",defaultOpen:s=!1,views:c,...d})=>{const{isOpen:u,setIsOpen:m,activeSubmenuId:g,setActiveSubmenuId:h}=Dy(s),f=p.useRef(null);return r.jsx(By,{value:{isOpen:u,setIsOpen:m,activeSubmenuId:g,setActiveSubmenuId:h,size:t,variant:n,triggerRef:f},children:r.jsx(Oy,{trigger:e,items:o,side:a,align:i,views:c,...d})})},lr=Ny;lr.Trigger=Mi;lr.Content=kn;lr.Item=Wi;lr.Divider=Hi;const qy=e=>{const{value:o,defaultValue:t="",onChange:n,onChangeComplete:a,isOpen:i,onOpen:s,onClose:c,closeOnSelect:d=!0,maxRecentColors:u=8,showRecentColors:m=!0}=e,[g,h]=p.useState(i??!1),[f,y]=p.useState(o??t),[b,k]=p.useState(""),[C,j]=p.useState([]),w=p.useRef(null),S=p.useRef(null);p.useEffect(()=>{o!==void 0&&y(o)},[o]),p.useEffect(()=>{i!==void 0&&h(i)},[i]),p.useEffect(()=>{if(m&&typeof localStorage<"u"){const I=localStorage.getItem("colorPicker-recentColors");if(I)try{j(JSON.parse(I))}catch{}}},[m]),p.useEffect(()=>{if(typeof document>"u"||typeof document.addEventListener!="function")return;const I=V=>{g&&w.current&&S.current&&!w.current.contains(V.target)&&!S.current.contains(V.target)&&E()};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[g]);const x=p.useCallback(I=>{m&&j(V=>{const P=V.filter(W=>W!==I),z=[I,...P].slice(0,u);return typeof localStorage<"u"&&localStorage.setItem("colorPicker-recentColors",JSON.stringify(z)),z})},[m,u]),v=p.useCallback(()=>{const I=!g;h(I),I?s==null||s():c==null||c()},[g,s,c]),T=p.useCallback(I=>{y(I),x(I),n==null||n(I),a==null||a(I),d&&(h(!1),c==null||c())},[n,a,d,c,x]),R=p.useCallback(I=>{k(I)},[]),M=p.useCallback(()=>{b&&(T(b),k(""))},[b,T]),E=p.useCallback(()=>{h(!1),c==null||c()},[c]);return{isOpen:g,selectedColor:f,recentColors:C,customColor:b,handleToggle:v,handleColorSelect:T,handleCustomColorChange:R,handleCustomColorSubmit:M,handleClose:E,triggerRef:w,dropdownRef:S}},ko={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},dropdown:{position:"absolute",top:"calc(100% + 8px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.14)",padding:"16px",minWidth:"320px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(6, 36px)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"12px",marginBottom:"16px"},customInput:{marginBottom:"12px"},recentColors:{borderTop:"1px solid color-gray-100",paddingTop:"12px"}},Uy={xs:{height:"32px",fontSize:"12px",padding:"4px 8px"},sm:{height:"40px",fontSize:"12px",padding:"8px 10px"},md:{height:"44px",fontSize:"14px",padding:"10px 12px"},lg:{height:"48px",fontSize:"16px",padding:"12px 14px"},xl:{height:"56px",fontSize:"18px",padding:"14px 16px"}},Gy={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Yy={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"}},Ky=[{name:"Blue",value:"#1D4ED8",category:"primary"},{name:"Purple",value:"#A855F7",category:"primary"},{name:"Green",value:"#22C55E",category:"primary"},{name:"Orange",value:"#F97316",category:"primary"},{name:"Red",value:"#EF4444",category:"primary"},{name:"Ink",value:"#111827",category:"neutral"}],Xy=typeof navigator<"u"&&navigator.product!=="ReactNative"&&typeof document<"u"&&typeof document.createElement=="function",Jy=({id:e,name:o,label:t,placeholder:n="Select a color",helperText:a,views:i={},size:s="md",shape:c="default",variant:d="default",error:u=!1,isDisabled:m=!1,isReadOnly:g=!1,predefinedColors:h=Ky,showCustomInput:f=!0,showRecentColors:y=!0,isOpen:b,selectedColor:k,recentColors:C,customColor:j,handleToggle:w,handleColorSelect:S,handleCustomColorChange:x,handleCustomColorSubmit:v,handleClose:T,triggerRef:R,dropdownRef:M,onChange:E,onChangeComplete:I,onOpen:V,onClose:P,colorFormat:z,maxRecentColors:W,closeOnSelect:F,defaultValue:H,value:D,...L})=>{const B={...ko.container,...i==null?void 0:i.container},$={...ko.trigger,...Uy[s],...Gy[c],...Yy[d],...u&&{borderColor:"color-red-500"},...m&&{opacity:.6,cursor:"not-allowed"},...!m&&!g&&{_hover:{borderColor:"color-gray-400"}},...i==null?void 0:i.trigger},O={...ko.dropdown,...i==null?void 0:i.dropdown},N={...ko.colorGrid,...i==null?void 0:i.colorGrid},_={...ko.recentColors,...i==null?void 0:i.recentColors},Y=k||"color-gray-200";return r.jsxs(l.View,{...B,...L,children:[t&&r.jsx(l.Text,{fontSize:"12px",lineHeight:"16px",fontWeight:"500",color:"color-gray-600",marginBottom:"6px",...i==null?void 0:i.label,children:t}),r.jsxs(l.View,{ref:R,onClick:m||g?void 0:w,...$,children:[r.jsxs(l.Horizontal,{alignItems:"center",gap:8,children:[r.jsx(l.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:Y,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"}),r.jsx(l.Text,{color:k?"color-gray-900":"color-gray-500",fontSize:"inherit",children:k||n})]}),!g&&!m&&r.jsx(ce,{widthHeight:16,color:"color-gray-500",orientation:b?"up":"down"})]}),b&&r.jsxs(l.View,{ref:M,...O,children:[r.jsx(l.View,{...N,children:h.map((A,G)=>r.jsx(l.View,{width:"36px",height:"36px",borderRadius:"8px",backgroundColor:A.value,borderWidth:"1px",borderStyle:"solid",borderColor:k===A.value?"theme-primary":"transparent",cursor:"pointer",onClick:()=>S(A.value),title:A.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"},...i==null?void 0:i.colorSwatch},G))}),f&&r.jsxs(l.View,{...ko.customInput,...i==null?void 0:i.customInput,children:[r.jsxs(l.Horizontal,{gap:8,alignItems:"center",marginBottom:"10px",children:[Xy&&r.jsx("input",{type:"color",value:j||"#1D4ED8",onChange:A=>{const G=A.target.value;x(G),S(G)},style:{width:"36px",height:"36px",border:"1px solid #E5E7EB",borderRadius:"8px",cursor:"pointer",backgroundColor:"transparent"},title:"Pick a color"}),r.jsx(l.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:"HEX"})]}),r.jsx(ve,{placeholder:"#1D4ED8",value:j,onChange:A=>{var G;return x(typeof A=="string"?A:((G=A==null?void 0:A.target)==null?void 0:G.value)??"")},onKeyPress:A=>{A.key==="Enter"&&v()},size:"sm",right:j&&r.jsx(l.View,{width:"18px",height:"18px",borderRadius:"6px",backgroundColor:j,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",onClick:v})})]}),y&&C.length>0&&r.jsxs(l.View,{..._,children:[r.jsx(l.Text,{fontSize:"11px",lineHeight:"16px",fontWeight:"500",color:"color-gray-500",marginBottom:"8px",children:"Recent Colors"}),r.jsx(l.Horizontal,{gap:8,flexWrap:"wrap",children:C.map((A,G)=>r.jsx(l.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:A,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>S(A),title:A,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"}},G))})]})]}),a&&r.jsx(l.Text,{fontSize:"11px",lineHeight:"16px",color:u?"color-red-500":"color-gray-500",marginTop:"4px",...i==null?void 0:i.helperText,children:a})]})},Qy=e=>{const o=qy(e);return r.jsx(Jy,{...o,...e})},Pi=Qy,Zy=e=>{const o=ai(e);return r.jsx(li,{...o,...e})},ex=Zy,ox=e=>{const o=ti(e);return r.jsx(ni,{...o,...e})},rx=ox,ta={"to-right":"to right","to-left":"to left","to-bottom":"to bottom","to-top":"to top","to-top-right":"to top right","to-top-left":"to top left","to-bottom-right":"to bottom right","to-bottom-left":"to bottom left"},gr={center:"center",top:"top",right:"right",bottom:"bottom",left:"left","top-right":"top right","top-left":"top left","bottom-right":"bottom right","bottom-left":"bottom left"},tx={linear:[{color:"color-blue-500",position:"0%"},{color:"color-purple-500",position:"100%"}],radial:[{color:"color-blue-500",position:"0%"},{color:"color-purple-500",position:"100%"}],conic:[{color:"color-red-500",position:"0deg"},{color:"color-yellow-500",position:"90deg"},{color:"color-green-500",position:"180deg"},{color:"color-blue-500",position:"270deg"},{color:"color-red-500",position:"360deg"}]},nx=(e,o,t,n,a)=>{const i=o.map(s=>`${s.color} ${s.position||""}`).join(", ");switch(e){case"linear":return`linear-gradient(${t&&ta[t]?ta[t]:t||"to right"}, ${i})`;case"radial":const c=a&&gr[a]?gr[a]:a||"center";return`radial-gradient(${n||"circle"} at ${c}, ${i})`;case"conic":return`conic-gradient(from 0deg at ${a&&gr[a]?gr[a]:a||"center"}, ${i})`;default:return`linear-gradient(to right, ${i})`}},ax={linear:{backgroundSize:"200% 200%",transition:"background-position 3s ease-in-out",animate:{from:{backgroundPosition:"0% 50%"},"50%":{backgroundPosition:"100% 50%"},to:{backgroundPosition:"0% 50%"}}},radial:{backgroundSize:"100% 100%",transition:"background-position 3s ease-in-out, background-size 3s ease-in-out",animate:{from:{backgroundPosition:"center",backgroundSize:"100% 100%"},"50%":{backgroundSize:"120% 120%"},to:{backgroundPosition:"center",backgroundSize:"100% 100%"}}},conic:{transition:"transform 3s linear",animate:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}}},na={container:{position:"relative",overflow:"hidden",borderRadius:"8px",transition:"border-radius 0.2s ease, opacity 0.2s ease"},content:{position:"relative",zIndex:1,width:"100%",height:"100%",padding:"16px"}},lx=({type:e="linear",direction:o="to-right",shape:t="circle",position:n="center",from:a,to:i,colors:s,animate:c=!1,animationDuration:d=3,children:u,views:m,themeMode:g,...h})=>{const f=p.useMemo(()=>s&&s.length>0?s:a&&i?[{color:a,position:"0%"},{color:i,position:"100%"}]:tx[e],[s,a,i,e]),y=p.useMemo(()=>{const k=f.map(C=>({...C,color:C.color}));return nx(e,k,o,t,n)},[e,f,o,t,n]),b=p.useMemo(()=>{if(!c)return{};const k=ax[e];return{...k,transition:k.transition.replace("3s",`${d}s`),animationDuration:`${d}s`,animationIterationCount:"infinite",animationTimingFunction:e==="conic"?"linear":"ease-in-out"}},[c,d,e]);return r.jsx(l.View,{background:y,...na.container,...b,...m==null?void 0:m.container,...h,children:u&&r.jsx(l.View,{...na.content,...m==null?void 0:m.content,children:u})})},Vi=e=>r.jsx(lx,{...e}),ix=(e=null,o=null)=>{const[t,n]=p.useState(e),[a,i]=p.useState(o),s=d=>a===d,c=d=>{i(u=>u===d?null:d)};return p.useEffect(()=>{const d=m=>{!m.composedPath().some(f=>(f==null?void 0:f.id)==="menubar-content"||(f==null?void 0:f.id)==="menubar-trigger")&&a!==null&&i(null)},u=m=>{m.key==="Escape"&&a!==null&&i(null)};if(typeof(document==null?void 0:document.addEventListener)=="function")return document.addEventListener("mousedown",d),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",u)}},[a]),{activeMenuId:t,setActiveMenuId:n,openMenuId:a,setOpenMenuId:i,isMenuOpen:s,toggleMenu:c}},Ai={sm:{padding:"6px 10px",fontSize:"14px"},md:{padding:"8px 12px",fontSize:"16px"},lg:{padding:"10px 16px",fontSize:"18px"}},sx={default:{backgroundColor:"transparent",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},cx={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},kr={active:{backgroundColor:"color-gray-200",fontWeight:"bold"},hover:{backgroundColor:"color-gray-100"},disabled:{opacity:.5,cursor:"not-allowed"}},Ei=p.createContext({activeMenuId:null,setActiveMenuId:()=>{},openMenuId:null,setOpenMenuId:()=>{},isMenuOpen:()=>!1,toggleMenu:()=>{},orientation:"horizontal",size:"md",variant:"default",triggerRefs:{current:{}}}),qr=()=>p.useContext(Ei),dx=({value:e,children:o})=>r.jsx(Ei.Provider,{value:e,children:o}),Di=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",views:a,...i})=>{const s=o==="horizontal"?l.Horizontal:l.Vertical;return r.jsx(s,{role:"menubar","aria-orientation":o,...cx[o],...sx[n],...a==null?void 0:a.container,...i,children:e})},$i=({children:e,id:o,disabled:t=!1,views:n})=>{const{orientation:a}=qr(),i=a==="horizontal"?l.Horizontal:l.Vertical;return r.jsx(i,{role:"none",position:"relative",opacity:t?.5:1,pointerEvents:t?"none":"auto",...n==null?void 0:n.menu,children:p.Children.map(e,s=>p.isValidElement(s)?p.cloneElement(s,{...s.props,menuId:o}):s)})},Li=({children:e,menuId:o,disabled:t=!1,views:n})=>{const{activeMenuId:a,setActiveMenuId:i,toggleMenu:s,isMenuOpen:c,size:d,triggerRefs:u}=qr(),m=p.useRef(null),g=a===o,h=c(o);p.useEffect(()=>(m.current&&o&&(u.current[o]=m.current),()=>{o&&delete u.current[o]}),[o,u]);const f=()=>{t||(i(o),s(o))};return r.jsx(l.View,{ref:m,id:"menubar-trigger",role:"menuitem","aria-haspopup":"true","aria-expanded":h,userSelect:"none",display:"flex",alignItems:"center",justifyContent:"space-between",...Ai[d],...g?kr.active:{},...t?kr.disabled:{},_hover:t?{}:kr.hover,onClick:f,...n==null?void 0:n.trigger,children:e})},_i=({children:e,menuId:o,views:t})=>{const{isMenuOpen:n,orientation:a,triggerRefs:i}=qr(),s=p.useRef(null),[c,d]=p.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),u=n(o);if(p.useEffect(()=>{if(u&&s.current&&o&&i.current[o]){const g=s.current.getBoundingClientRect(),h=i.current[o].getBoundingClientRect(),f=Math.max(g.width||200,200),y=Math.max(g.height||150,150),b=window.innerWidth,k=window.innerHeight,C={top:h.top,right:b-h.right,bottom:k-h.bottom,left:h.left},j=a==="horizontal"?[{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:h.left,y:h.top-y-8},{placement:"right",space:C.right,fits:C.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:C.left,fits:C.left>=f+8,x:h.left-f-8,y:h.top}]:[{placement:"right",space:C.right,fits:C.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:C.left,fits:C.left>=f+8,x:h.left-f-8,y:h.top},{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:h.left,y:h.top-y-8}],w=j.find(T=>T.fits);if(w){d({x:w.x,y:w.y,placement:w.placement});return}const S=j.reduce((T,R)=>R.space>T.space?R:T);let x=S.x,v=S.y;x+f>b&&(x=b-f-8),x<8&&(x=8),v+y>k&&(v=k-y-8),v<8&&(v=8),d({x,y:v,placement:S.placement})}},[u,a,o,i]),!u)return null;const m={position:"fixed",left:c.x,top:c.y,zIndex:1e3};return r.jsx(l.View,{ref:s,id:"menubar-content",role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:m,...t==null?void 0:t.content,children:e})},Bi=({children:e,icon:o,disabled:t=!1,onClick:n,views:a})=>{const{size:i}=qr(),s=()=>{t||!n||n()};return r.jsxs(l.View,{role:"menuitem",cursor:t?"not-allowed":"pointer",userSelect:"none",display:"flex",alignItems:"center",opacity:t?.5:1,...Ai[i],_hover:t?{}:kr.hover,onClick:s,...a==null?void 0:a.item,children:[o&&r.jsx(l.View,{marginRight:8,...a==null?void 0:a.icon,children:o}),e]})},Oi=({views:e})=>r.jsx(l.View,{role:"separator",height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.separator}),ux=({items:e,orientation:o,size:t,variant:n,views:a,themeMode:i})=>r.jsx(Di,{orientation:o,size:t,variant:n,views:a,children:e.map(s=>r.jsxs($i,{id:s.id,disabled:s.disabled,views:a,children:[r.jsxs(Li,{menuId:s.id,views:a,children:[s.icon&&r.jsx(l.View,{marginRight:8,...a==null?void 0:a.icon,children:s.icon}),s.label]}),s.items&&s.items.length>0&&r.jsx(_i,{menuId:s.id,views:a,children:s.items.map((c,d)=>c.separator?r.jsx(Oi,{views:a},`separator-${d}`):r.jsx(Bi,{id:c.id,icon:c.icon,disabled:c.disabled,onClick:c.onClick,views:a,children:c.label},c.id))})]},s.id))}),px=({items:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultActiveMenuId:a=null,defaultOpenMenuId:i=null,views:s,...c})=>{const{activeMenuId:d,setActiveMenuId:u,openMenuId:m,setOpenMenuId:g,isMenuOpen:h,toggleMenu:f}=ix(a,i),y=p.useRef({});return r.jsx(dx,{value:{activeMenuId:d,setActiveMenuId:u,openMenuId:m,setOpenMenuId:g,isMenuOpen:h,toggleMenu:f,orientation:o,size:t,variant:n,triggerRefs:y},children:r.jsx(ux,{items:e,orientation:o,size:t,variant:n,views:s,...c})})},po=px;po.Root=Di;po.Menu=$i;po.Trigger=Li;po.Content=_i;po.Item=Bi;po.Separator=Oi;const mx=(e,o,t)=>{const[n,a]=p.useState([]);return p.useEffect(()=>{a((()=>{const s=[];if(o<=t)for(let c=1;c<=o;c++)s.push(c);else{s.push(1);let c=Math.max(2,e-Math.floor((t-2)/2)),d=Math.min(o-1,c+t-3);d>=o-1&&(d=o-1,c=Math.max(2,d-(t-3))),c>2&&s.push("...");for(let u=c;u<=d;u++)s.push(u);d<o-1&&s.push("..."),s.push(o)}return s})())},[e,o,t]),{visiblePageNumbers:n}},Co={sm:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px",media:{mobile:{fontSize:"11px",padding:"3px 6px",minWidth:"24px",height:"24px"}}},md:{fontSize:"14px",padding:"6px 10px",minWidth:"32px",height:"32px",media:{mobile:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px"}}},lg:{fontSize:"14px",padding:"8px 12px",minWidth:"36px",height:"36px",media:{mobile:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px"}}}},qo={default:{backgroundColor:"transparent",color:"color-gray-800",borderWidth:"0px",borderStyle:"none",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-100"}},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",borderWidth:"0px",borderStyle:"none",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-200"}},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-100"}}},Uo={rounded:{borderRadius:8},square:{borderRadius:"0px"},circular:{borderRadius:"50%"}},gx={backgroundColor:"theme-primary",color:"color-white",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"theme-primary",opacity:.9}},hr={opacity:.5,cursor:"not-allowed",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"transparent"}},hx=({currentPage:e,totalPages:o,onPageChange:t,pageSize:n=10,pageSizeOptions:a=[{label:"10 / page",value:10},{label:"20 / page",value:20},{label:"50 / page",value:50},{label:"100 / page",value:100}],onPageSizeChange:i,showPageSizeSelector:s=!1,showPageInfo:c=!0,maxPageButtons:d=5,showFirstLastButtons:u=!1,size:m="md",variant:g="default",shape:h="rounded",visiblePageNumbers:f=[],views:y,...b})=>{const k=w=>{w<1||w>o||w===e||t(w)},C=w=>{i&&i(Number(w.target.value))},j=(w,S)=>{if(w==="...")return r.jsx(l.View,{display:"flex",alignItems:"center",justifyContent:"center",...Co[m],...y==null?void 0:y.ellipsis,children:"..."},`ellipsis-${S}`);const x=w===e;return r.jsx(l.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:x?"default":"pointer",...Co[m],...qo[g],...Uo[h],...x?gx:{},onClick:()=>k(w),"aria-label":`Page ${w}`,"aria-current":x?"page":void 0,...x?y==null?void 0:y.activePageButton:y==null?void 0:y.pageButton,children:w},`page-${w}`)};return r.jsxs(l.Horizontal,{alignItems:"center",gap:8,...y==null?void 0:y.container,...b,children:[u&&r.jsxs(l.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...Co[m],...qo[g],...Uo[h],...e===1?hr:{},onClick:()=>k(1),"aria-label":"First page",disabled:e===1,...y==null?void 0:y.navigationButton,children:[r.jsx(ce,{orientation:"left",widthHeight:16}),r.jsx(ce,{orientation:"left",widthHeight:16,marginLeft:"-8px"})]}),r.jsx(l.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...Co[m],...qo[g],...Uo[h],...e===1?hr:{},onClick:()=>k(e-1),"aria-label":"Previous page",disabled:e===1,...y==null?void 0:y.navigationButton,children:r.jsx(ce,{orientation:"left",widthHeight:16})}),f.map((w,S)=>j(w,S)),r.jsx(l.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...Co[m],...qo[g],...Uo[h],...e===o?hr:{},onClick:()=>k(e+1),"aria-label":"Next page",disabled:e===o,...y==null?void 0:y.navigationButton,children:r.jsx(ce,{orientation:"right",widthHeight:16})}),u&&r.jsxs(l.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...Co[m],...qo[g],...Uo[h],...e===o?hr:{},onClick:()=>k(o),"aria-label":"Last page",disabled:e===o,...y==null?void 0:y.navigationButton,children:[r.jsx(ce,{orientation:"right",widthHeight:16}),r.jsx(ce,{orientation:"right",widthHeight:16,marginLeft:"-8px"})]}),c&&r.jsxs(l.Text,{marginLeft:16,color:"color-gray-600",...y==null?void 0:y.pageInfo,children:["Page ",e," of ",o]}),s&&i&&r.jsx(l.View,{as:"select",marginLeft:16,padding:"4px 8px",borderRadius:"4px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"color-white",cursor:"pointer",value:n,onChange:C,...y==null?void 0:y.pageSizeSelector,children:a.map(w=>r.jsx("option",{value:w.value,children:w.label},w.value))})]})},fx=({currentPage:e,totalPages:o,onPageChange:t,pageSize:n=10,pageSizeOptions:a,onPageSizeChange:i,showPageSizeSelector:s=!1,showPageInfo:c=!0,maxPageButtons:d=5,showFirstLastButtons:u=!1,size:m="md",variant:g="default",shape:h="rounded",views:f,...y})=>{const{visiblePageNumbers:b}=mx(e,o,d);return r.jsx(hx,{currentPage:e,totalPages:o,onPageChange:t,pageSize:n,pageSizeOptions:a,onPageSizeChange:i,showPageSizeSelector:s,showPageInfo:c,maxPageButtons:d,showFirstLastButtons:u,size:m,variant:g,shape:h,visiblePageNumbers:b,views:f,...y})},Ni=fx,yx=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),xx=p.memo(({shape:e="linear",value:o=0,max:t=100,color:n="theme-primary",backgroundColor:a="color-gray-200",height:i,size:s,radius:c=4,strokeWidth:d=10,showLabel:u=!1,labelColor:m="color-black-primary",animated:g=!0,animationDuration:h="0.5s",views:f,themeMode:y,...b})=>{var E;const{getColor:k,themeMode:C}=l.useTheme(),j=y||C,S=Math.min(t,Math.max(0,o))/t*100,x=I=>yx(I)?I:k(I,{themeMode:j}),v=p.useMemo(()=>x(a),[k,a,j]),T=p.useMemo(()=>x(n),[k,n,j]);if(e==="circle"){const I=s||(typeof i=="number"?i:100),V=(I-d)/2,P=2*Math.PI*V,z=P-S/100*P;return r.jsxs(l.View,{width:I,height:I,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...f==null?void 0:f.container,...b,children:[r.jsxs("svg",{width:I,height:I,viewBox:`0 0 ${I} ${I}`,style:{transform:"rotate(-90deg)"},children:[r.jsx("circle",{cx:I/2,cy:I/2,r:V,stroke:v,strokeWidth:d,fill:"transparent",...f==null?void 0:f.track}),r.jsx("circle",{cx:I/2,cy:I/2,r:V,stroke:T,strokeWidth:d,strokeDasharray:P,strokeDashoffset:z,strokeLinecap:"round",fill:"transparent",style:{transition:g?`stroke-dashoffset ${h} ease-in-out`:"none"},...f==null?void 0:f.indicator})]}),u&&r.jsx(l.View,{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",children:r.jsxs(l.Text,{color:m,fontSize:`${I*.2}px`,fontWeight:"bold",...f==null?void 0:f.text,children:[Math.round(S),"%"]})})]})}const R=i||8,M={backgroundColor:v,...((E=f==null?void 0:f.container)==null?void 0:E.style)||{},...b.style||{}};return r.jsxs(l.View,{role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":t,width:"100%",height:R,borderRadius:c,overflow:"hidden",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...f==null?void 0:f.container,...b,style:M,children:[r.jsx("div",{style:{height:"100%",backgroundColor:T,borderRadius:typeof c=="number"?`${c}px`:c,position:"absolute",left:0,top:0,bottom:0,width:`${S}%`,transition:g?`width ${h} ease-in-out`:"none",...f==null?void 0:f.bar}}),u&&r.jsxs(l.Text,{color:m,fontSize:typeof R=="number"&&R>16?`${R*.6}px`:"10px",fontWeight:"bold",position:"relative",zIndex:1,...f==null?void 0:f.text,children:[Math.round(S),"%"]})]})}),bx=e=>{const o=ge("progress",e);return r.jsx(xx,{...o})},qi=bx,kx=e=>({solid:"solid",dashed:"dashed",dotted:"dotted"}),Cx=kx(),Sx={thin:"1px",medium:"2px",thick:"4px"},Go={container:{transition:"opacity 0.15s ease"},label:{fontSize:"14px",fontWeight:"500",color:"color-gray-600",paddingHorizontal:"8px",backgroundColor:"color-white",transition:"color 0.15s ease"}},jx=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),wx=({orientation:e="horizontal",variant:o="solid",thickness:t="thin",color:n,spacing:a="0px",label:i,decorative:s=!1,views:c,themeMode:d,...u})=>{const{themeMode:m}=l.useTheme(),g=n||"color-gray-200",h=Cx[o],f=Sx[t],y=s?{"aria-hidden":!0}:{role:"separator","aria-orientation":e},b=jx(g)?{style:{borderColor:g}}:{borderColor:g};return i&&e==="horizontal"?r.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"center",width:"100%",padding:a,...y,...u,children:[r.jsx(l.View,{height:"0px",flexGrow:1,borderTop:`${f} ${h}`,...b,...Go.container,...c==null?void 0:c.container}),r.jsx(l.Text,{...Go.label,...c==null?void 0:c.label,children:i}),r.jsx(l.View,{height:"0px",flexGrow:1,borderTop:`${f} ${h}`,...b,...Go.container,...c==null?void 0:c.container})]}):e==="horizontal"?r.jsx(l.View,{height:"0px",width:"100%",borderTop:`${f} ${h}`,padding:a,...b,...Go.container,...y,...c==null?void 0:c.container,...u}):r.jsx(l.View,{width:"0px",height:"100%",borderLeft:`${f} ${h}`,padding:a,...b,...Go.container,...y,...c==null?void 0:c.container,...u})},Ui=e=>{const o=ge("separator",e);return r.jsx(wx,{...o})},Pr=Ui,vx=Ui,Tx={xs:12,sm:14,md:16,lg:18,xl:20},Ix=({isSupported:e,isSharing:o,onShare:t,label:n,children:a,icon:i,size:s,isDisabled:c,isLoading:d,iconPosition:u,disableWhenUnsupported:m=!0,...g})=>{const h=s??"md",f=i??r.jsx($a,{widthHeight:Tx[h],strokeWidth:1.5,filled:!1}),y=!!c||!e&&m,b=!!d||o;return r.jsx(se,{...g,size:h,icon:f,iconPosition:u??"left",isDisabled:y,isLoading:b,onClick:t,children:a??n??"Share"})},aa=()=>typeof navigator>"u"?void 0:navigator,Fx=(e,o)=>{if(!e||typeof e.share!="function")return!1;if(typeof e.canShare=="function")try{return e.canShare(o)}catch{return!1}return!0},Rx=e=>{if(typeof e=="object"&&e!==null&&"name"in e)return String(e.name)},zx=e=>{const{shareData:o,onClick:t,onUnsupported:n,onShareStart:a,onShareSuccess:i,onShareCancel:s,onShareError:c}=e,[d,u]=p.useState(!1),m=p.useMemo(()=>Fx(aa(),o),[o]),g=p.useCallback((...h)=>{t==null||t(...h);const f=aa();if(!f||typeof f.share!="function"){n==null||n();return}if(!d){if(typeof f.canShare=="function")try{if(!f.canShare(o)){n==null||n();return}}catch(y){c==null||c(y);return}u(!0),a==null||a();try{f.share(o).then(()=>{i==null||i()}).catch(y=>{if(Rx(y)==="AbortError"){s==null||s();return}c==null||c(y)}).finally(()=>{u(!1)})}catch(y){u(!1),c==null||c(y)}}},[d,t,s,c,a,i,n,o]);return{isSupported:m,isSharing:d,handleShare:g}},Mx=e=>{const{isSupported:o,isSharing:t,handleShare:n}=zx(e),{shareData:a,onShareStart:i,onShareSuccess:s,onShareCancel:c,onShareError:d,onUnsupported:u,onClick:m,...g}=e;return r.jsx(Ix,{...g,isSupported:o,isSharing:t,onShare:n})},Gi=Mx,Wx=({label:e,status:o="default",views:t,themeMode:n,...a})=>{const{themeMode:i}=l.useTheme(),s=Xa();return r.jsxs(l.Horizontal,{alignItems:"center",gap:8,role:"status-indicator",...t==null?void 0:t.container,...a,children:[r.jsx(l.View,{role:"status-dot",width:"8px",height:"8px",borderRadius:"50%",...s[o].indicator,...t==null?void 0:t.indicator}),e&&r.jsx(l.Text,{role:"status-label",fontSize:"14px",lineHeight:"20px",...s[o].label,...t==null?void 0:t.label,children:e})]})},Cr=e=>{const o=ge("status",e);return r.jsx(Wx,{...o})},Hx=(e=!0,o,t,n)=>{const{on:a}=l.useResponsive(),i=a("mobile"),[s,c]=p.useState(o!==void 0?o:e);return p.useEffect(()=>{o!==void 0&&c(o)},[o]),{isExpanded:s,toggleExpanded:()=>{const g=!s;c(g),t&&t(g)},expand:()=>{s||(c(!0),t&&t(!0))},collapse:()=>{s&&(c(!1),t&&t(!1))},isMobile:i}},Px={sm:{expandedWidth:"240px",collapsedWidth:"64px"},md:{expandedWidth:"280px",collapsedWidth:"72px"},lg:{expandedWidth:"320px",collapsedWidth:"80px"},xl:{expandedWidth:"360px",collapsedWidth:"88px"}},Vx=e=>({default:{backgroundColor:"color-white",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},subtle:{backgroundColor:"color-gray-50",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease"},elevated:{backgroundColor:"color-white",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",color:"color-gray-800",transition:"all 0.2s ease-in-out"}}),Ax=Vx(),Ex={left:{left:0,borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{right:0,borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"}},Dx={none:{},low:{boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)"},medium:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.12)"},high:{boxShadow:"0 10px 30px rgba(0, 0, 0, 0.15)"}},$x={fast:"all 0.2s ease-in-out",normal:"all 0.3s ease-in-out",slow:"all 0.5s ease-in-out",bounce:"all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55)"},Yi=p.createContext({isExpanded:!0,toggleExpanded:()=>{},expand:()=>{},collapse:()=>{},position:"left",size:"md",variant:"default"}),Ur=()=>p.useContext(Yi),Lx=({value:e,children:o})=>r.jsx(Yi.Provider,{value:e,children:o}),_x=({children:e,showToggleButton:o=!0,views:t,...n})=>{const{isExpanded:a,toggleExpanded:i,position:s}=Ur();return r.jsx(l.Horizontal,{width:"100%",padding:"16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:"space-between",...t==null?void 0:t.header,...n,children:a?r.jsxs(l.Horizontal,{width:"100%",alignItems:"center",justifyContent:"space-between",children:[e,o&&r.jsx(l.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},onClick:i,"aria-label":a?"Collapse sidebar":"Expand sidebar",...t==null?void 0:t.toggleButton,children:r.jsx(ce,{orientation:s==="left"?"left":"right",widthHeight:16,...t==null?void 0:t.toggleButtonIcon})})]}):r.jsx(l.View,{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",children:o&&r.jsx(l.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},onClick:i,"aria-label":a?"Collapse sidebar":"Expand sidebar",...t==null?void 0:t.toggleButton,children:r.jsx(ce,{orientation:s==="left"?"right":"left",widthHeight:16,...t==null?void 0:t.toggleButtonIcon})})})})},Bx=({children:e,views:o,...t})=>{const{isExpanded:n}=Ur();return r.jsx(l.View,{flex:"1",width:"100%",overflowY:"auto",overflowX:"hidden",padding:n?"16px":"8px",...o==null?void 0:o.content,...t,children:e})},Ox=({children:e,views:o,...t})=>{const{isExpanded:n}=Ur();return r.jsx(l.View,{width:"100%",padding:n?"16px":"8px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",...o==null?void 0:o.footer,...t,children:e})},Nx=({children:e,position:o="left",size:t="md",variant:n="default",fixed:a=!1,hasBackdrop:i=!0,expandedWidth:s,collapsedWidth:c,breakpoint:d,breakpointBehavior:u="overlay",elevation:m="none",transitionPreset:g="normal",ariaLabel:h="Sidebar navigation",showToggleButton:f,toggleExpanded:y,expand:b,isExpanded:k,isMobile:C,collapse:j,views:w,themeMode:S,...x})=>{const v=Px[t],T=k?s||v.expandedWidth:c||v.collapsedWidth,R=!C||C&&u!=="hide",M=a||C&&u==="overlay"?"fixed":"relative",E=i&&C&&k&&u==="overlay";return r.jsxs(r.Fragment,{children:[E&&r.jsx(l.View,{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"color-blackAlpha-500",zIndex:998,onClick:j,...w==null?void 0:w.backdrop}),R&&r.jsx(l.Vertical,{position:M,top:0,height:"100vh",width:T,zIndex:999,transition:$x[g],transform:C&&u==="overlay"&&!k?`translateX(${o==="left"?"-100%":"100%"})`:"translateX(0)",role:"navigation","aria-label":h,...Ax[n],...Ex[o],...Dx[m],...w==null?void 0:w.container,...x,children:p.Children.map(e,I=>I)})]})},qx=({children:e,position:o="left",size:t="md",variant:n="default",defaultExpanded:a=!0,expanded:i,onExpandedChange:s,fixed:c=!1,hasBackdrop:d=!0,showToggleButton:u=!0,expandedWidth:m,collapsedWidth:g,breakpoint:h=768,breakpointBehavior:f="overlay",views:y,...b})=>{const{isExpanded:k,toggleExpanded:C,expand:j,collapse:w,isMobile:S}=Hx(a,i,s);return r.jsx(Lx,{value:{isExpanded:k,toggleExpanded:C,expand:j,collapse:w,position:o,size:t,variant:n,views:y},children:r.jsx(Nx,{position:o,size:t,variant:n,fixed:c,hasBackdrop:d,showToggleButton:u,expandedWidth:m,collapsedWidth:g,breakpoint:h,breakpointBehavior:f,isExpanded:k,isMobile:S,toggleExpanded:C,expand:j,collapse:w,views:y,...b,children:e})})},ir=qx;ir.Header=_x;ir.Content=Bx;ir.Footer=Ox;ir.useContext=Ur;const Ux=()=>({getItem:e=>{try{return typeof localStorage>"u"?null:localStorage.getItem(`resizable-${e}`)}catch(o){return console.warn("Failed to access localStorage:",o),null}},setItem:(e,o)=>{try{if(typeof localStorage>"u")return;localStorage.setItem(`resizable-${e}`,o)}catch(t){console.warn("Failed to write to localStorage:",t)}}}),Gx=(e,o,t,n=50,a=1/0,i=!1,s,c,d=10)=>{const[u,m]=p.useState(!1),[g,h]=p.useState([]),f=p.useRef(null),y=p.useRef(null),b=p.useRef(0),k=p.useRef([]),C=p.useRef(c||(typeof window<"u"?Ux():null)),j=p.useCallback(()=>f.current?e==="horizontal"?f.current.offsetWidth:f.current.offsetHeight:0,[e]),w=p.useCallback(()=>{if(!s||!C.current)return null;const W=C.current.getItem(s);if(!W)return null;try{const F=JSON.parse(W);return Array.isArray(F.sizes)?F.sizes:null}catch(F){return console.warn("Failed to parse saved panel sizes:",F),null}},[s]),S=p.useCallback(()=>{if(!s||!C.current||g.length===0)return;const W=g.map(F=>({id:F.id,size:F.size,collapsed:F.collapsed||!1}));C.current.setItem(s,JSON.stringify({sizes:W}))},[s,g]),x=p.useCallback((W,F,H,D,L)=>{h(B=>B.some($=>$.id===W)?B:[...B,{id:W,size:F,minSize:H??n,maxSize:D??a,collapsible:L??i,collapsed:!1}])},[n,a,i]),v=p.useCallback(W=>{h(F=>F.filter(H=>H.id!==W))},[]),T=p.useCallback(W=>{const F=g.find(H=>H.id===W);return F?F.size:0},[g]),R=p.useCallback((W,F)=>{h(H=>H.map(D=>D.id===W?{...D,size:F}:D))},[]),M=p.useCallback(W=>{const F=g.find(H=>H.id===W);return F?!!F.collapsed:!1},[g]),E=p.useCallback(W=>{h(F=>{const H=F.findIndex($=>$.id===W);if(H===-1)return F;const D=F[H];if(!D.collapsible)return F;const L={...D,collapsed:!D.collapsed},B=[...F];return B[H]=L,B})},[]),I=p.useCallback((W,F)=>{y.current=W,b.current=F,k.current=g.map(H=>H.size),m(!0)},[g]),V=p.useCallback(W=>{if(!u||!y.current)return;const F=y.current,H=W-b.current;let D=-1;const L=F.match(/\d+$/);if(L&&(D=parseInt(L[0],10)-1),D===-1&&g.length>=2&&(D=0),D<0||D>=g.length-1)return;const B=g[D],$=g[D+1];if(B.collapsed||$.collapsed)return;let O=k.current[D]+H,N=k.current[D+1]-H;O=Math.max(B.minSize??n,Math.min(B.maxSize??a,O)),N=Math.max($.minSize??n,Math.min($.maxSize??a,N)),h(_=>_.map((Y,A)=>A===D?{...Y,size:O}:A===D+1?{...Y,size:N}:Y))},[u,g,e,n,a]),P=p.useCallback(()=>{u&&t&&t(g.map(W=>W.size)),y.current=null,m(!1),s&&S()},[u,g,t,s,S]),z=p.useCallback(W=>{if(!u||!y.current)return;const F=y.current;let H=-1;const D=F.match(/\d+$/);if(D&&(H=parseInt(D[0],10)-1),H===-1&&g.length>=2&&(H=0),H<0||H>=g.length-1)return;let L=0;e==="horizontal"?(W.key==="ArrowLeft"&&(L=-d),W.key==="ArrowRight"&&(L=d),W.key==="Home"&&(L=-100),W.key==="End"&&(L=100)):(W.key==="ArrowUp"&&(L=-d),W.key==="ArrowDown"&&(L=d),W.key==="Home"&&(L=-100),W.key==="End"&&(L=100)),L!==0&&(W.preventDefault(),V(b.current+L)),W.key==="Escape"&&(h(B=>B.map(($,O)=>({...$,size:k.current[O]}))),P())},[u,g,e,V,P,d]);return p.useEffect(()=>{if(typeof(document==null?void 0:document.addEventListener)!="function")return;const W=D=>{if(!u)return;const L=e==="horizontal"?D.clientX:D.clientY;V(L)},F=D=>{if(!u||D.touches.length===0)return;const L=D.touches[0],B=e==="horizontal"?L.clientX:L.clientY;V(B)},H=()=>{u&&P()};return u&&(document.addEventListener("mousemove",W),document.addEventListener("touchmove",F),document.addEventListener("mouseup",H),document.addEventListener("touchend",H),document.addEventListener("keydown",z),document.body.style.cursor=e==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none"),()=>{document.removeEventListener("mousemove",W),document.removeEventListener("touchmove",F),document.removeEventListener("mouseup",H),document.removeEventListener("touchend",H),document.removeEventListener("keydown",z),document.body.style.cursor="",document.body.style.userSelect=""}},[u,e,V,P,z]),p.useEffect(()=>{if(g.length!==0){if(s){const W=w();if(W){h(F=>F.map(H=>{const D=W.find(L=>L.id===H.id);return D?{...H,size:D.size,collapsed:D.collapsed||!1}:H}));return}}if(!o){const F=j()/g.length;h(H=>H.map(D=>({...D,size:F})))}}},[g.length,o,j,s,w]),p.useEffect(()=>{if(!o||o.length===0||g.length===0)return;const W=j(),F=o.map(H=>typeof H=="string"&&H.endsWith("%")?parseFloat(H)/100*W:typeof H=="number"?H:parseFloat(H));h(H=>H.map((D,L)=>({...D,size:L<F.length?F[L]:D.size})))},[o,g.length,j]),p.useEffect(()=>{g.length>0&&s&&!u&&S()},[g,s,u,S]),{isResizing:u,setIsResizing:m,containerRef:f,panels:g,registerPanel:x,unregisterPanel:v,getPanelSize:T,setPanelSize:R,isPanelCollapsed:M,togglePanelCollapse:E,startResize:I,onResize:V,endResize:P}},Yx={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},Kx=(e,o)=>({sm:{width:o==="horizontal"?"4px":"100%",height:o==="vertical"?"4px":"100%"},md:{width:o==="horizontal"?"6px":"100%",height:o==="vertical"?"6px":"100%"},lg:{width:o==="horizontal"?"8px":"100%",height:o==="vertical"?"8px":"100%"}})[e],Xx=e=>({default:{backgroundColor:"transparent",_hover:{backgroundColor:"color-gray-200"},_active:{backgroundColor:"color-gray-300"}},subtle:{backgroundColor:"transparent",_hover:{backgroundColor:"color-gray-100"},_active:{backgroundColor:"color-gray-200"}},prominent:{backgroundColor:"color-gray-100",_hover:{backgroundColor:"color-gray-200"},_active:{backgroundColor:"color-gray-300"}}}),Jx=Xx(),fr={horizontal:{width:"2px",height:"20px",backgroundColor:"color-gray-400",margin:"0 1px"},vertical:{width:"20px",height:"2px",backgroundColor:"color-gray-400",margin:"1px 0"}},Ki=p.createContext({orientation:"horizontal",size:"md",variant:"default",isResizing:!1,setIsResizing:()=>{},registerPanel:()=>{},unregisterPanel:()=>{},getPanelSize:()=>0,setPanelSize:()=>{},isPanelCollapsed:()=>!1,togglePanelCollapse:()=>{},startResize:()=>{},onResize:()=>{},endResize:()=>{}}),Xi=()=>p.useContext(Ki),Qx=({value:e,children:o})=>r.jsx(Ki.Provider,{value:e,children:o}),Zx=({children:e,id:o,defaultSize:t,minSize:n,maxSize:a,collapsible:i,defaultCollapsed:s,onCollapseChange:c,views:d,...u})=>{const{orientation:m,registerPanel:g,unregisterPanel:h,getPanelSize:f,isPanelCollapsed:y,togglePanelCollapse:b}=Xi(),k=typeof t=="string"&&t.endsWith("%")?0:typeof t=="number"?t:0;p.useEffect(()=>(g(o,k,n,a,i),()=>h(o)),[o,k,n,a,i,g,h]);const C=f(o),j=y(o);return p.useEffect(()=>{c&&j!==void 0&&c(j)},[j,c]),p.useEffect(()=>{i&&s&&!j&&b(o)},[o,i,s,j,b]),j?r.jsx(l.View,{flex:"0 0 auto",width:m==="horizontal"?"10px":"100%",height:m==="vertical"?"10px":"100%",backgroundColor:"color-gray-200",cursor:"pointer",onClick:()=>b(o),"aria-label":`Expand panel ${o}`,role:"button",tabIndex:0,...d==null?void 0:d.collapsedPanel,...u}):r.jsx(l.View,{flex:C>0?"0 0 auto":"1",width:m==="horizontal"?`${C}px`:"100%",height:m==="vertical"?`${C}px`:"100%",overflow:"auto",...d==null?void 0:d.panel,...u,children:e})},eb=({id:e,position:o="both",disabled:t=!1,withVisualIndicator:n=!0,withCollapseButton:a=!1,collapseTarget:i,views:s,...c})=>{const{orientation:d,size:u,variant:m,startResize:g,isPanelCollapsed:h,togglePanelCollapse:f}=Xi(),b=(()=>{if(i)return i;const x=e.match(/\d+$/);if(!x)return"";const v=parseInt(x[0],10);return isNaN(v)?"":`panel${v}`})(),k=h(b),C=x=>{if(t)return;x.preventDefault();const v=d==="horizontal"?x.clientX:x.clientY;g(e,v)},j=x=>{if(t||x.touches.length===0)return;x.preventDefault();const v=x.touches[0],T=d==="horizontal"?v.clientX:v.clientY;g(e,T)},w=x=>{t||(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),g(e,0))},S=x=>{x.stopPropagation(),b&&f(b)};return r.jsxs(l.View,{role:"separator","aria-orientation":d,"aria-valuemin":0,"aria-valuemax":100,tabIndex:t?-1:0,cursor:d==="horizontal"?"col-resize":"row-resize",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",...Kx(u,d),...Jx[m],onMouseDown:C,onTouchStart:j,onKeyDown:w,opacity:t?.5:1,pointerEvents:t?"none":"auto",...s==null?void 0:s.handle,...c,children:[n&&r.jsx(l.View,{display:"flex",alignItems:"center",justifyContent:"center",width:d==="horizontal"?"100%":"auto",height:d==="vertical"?"100%":"auto",pointerEvents:"none",...s==null?void 0:s.handleIcon,children:d==="horizontal"?r.jsxs(l.Horizontal,{gap:1,children:[r.jsx(l.View,{...fr.horizontal}),r.jsx(l.View,{...fr.horizontal})]}):r.jsxs(l.Vertical,{gap:1,children:[r.jsx(l.View,{...fr.vertical}),r.jsx(l.View,{...fr.vertical})]})}),a&&b&&r.jsx(l.View,{position:"absolute",top:d==="horizontal"?"-20px":"50%",left:d==="horizontal"?"50%":"-20px",transform:d==="horizontal"?"translateX(-50%)":"translateY(-50%)",width:"16px",height:"16px",borderRadius:"full",backgroundColor:"color-gray-100",border:"1px solid",borderColor:"color-gray-300",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:1,onClick:S,"aria-label":k?`Expand panel ${b}`:`Collapse panel ${b}`,role:"button",tabIndex:0,pointerEvents:"auto",_hover:{backgroundColor:"color-gray-200"},...s==null?void 0:s.collapseIcon,children:r.jsx(l.View,{width:"8px",height:"8px",display:"flex",alignItems:"center",justifyContent:"center",children:k?r.jsxs(l.Horizontal,{children:[r.jsx(l.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"}),r.jsx(l.View,{width:"2px",height:"6px",backgroundColor:"color-gray-600",position:"absolute"})]}):r.jsx(l.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"})})})]})},ob=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultSizes:a,minSize:i,maxSize:s,collapsible:c=!1,containerRef:d,autoSaveId:u,keyboardResizeBy:m,onLayout:g,views:h,...f})=>{const y=o==="horizontal"?l.Horizontal:l.Vertical;return r.jsx(y,{ref:d,width:"100%",height:"100%",position:"relative",overflow:"hidden",...Yx[o],...h==null?void 0:h.container,...f,children:e})},rb=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultSizes:a,onSizesChange:i,minSize:s=50,maxSize:c,collapsible:d=!1,autoSaveId:u,storage:m,keyboardResizeBy:g=10,views:h,...f})=>{const{isResizing:y,setIsResizing:b,containerRef:k,registerPanel:C,unregisterPanel:j,getPanelSize:w,setPanelSize:S,isPanelCollapsed:x,togglePanelCollapse:v,startResize:T,onResize:R,endResize:M}=Gx(o,a,i,s,c,d,u,m,g);return r.jsx(Qx,{value:{orientation:o,size:t,variant:n,isResizing:y,setIsResizing:b,registerPanel:C,unregisterPanel:j,getPanelSize:w,setPanelSize:S,isPanelCollapsed:x,togglePanelCollapse:v,startResize:T,onResize:R,endResize:M},children:r.jsx(ob,{orientation:o,size:t,variant:n,defaultSizes:a,minSize:s,maxSize:c,collapsible:d,autoSaveId:u,keyboardResizeBy:g,containerRef:k,views:h,...f,children:e})})},Cn=rb;Cn.Panel=Zx;Cn.Handle=eb;const yr={info:{container:{backgroundColor:"color-blue-50",border:"color-blue-300"},content:{color:"color-blue-700"},icon:{color:"color-blue-500"}},success:{container:{backgroundColor:"color-green-50",border:"color-green-300"},content:{color:"color-green-700"},icon:{color:"color-green-500"}},warning:{container:{backgroundColor:"color-orange-50",border:"color-orange-300"},content:{color:"color-orange-700"},icon:{color:"color-orange-500"}},error:{container:{backgroundColor:"color-red-50",border:"color-red-300"},content:{color:"color-red-700"},icon:{color:"color-red-500"}}},tb={top:{top:"16px",left:"50%",transform:"translateX(-50%)"},"top-right":{top:"16px",right:"16px"},"top-left":{top:"16px",left:"16px"},bottom:{bottom:"16px",left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:"16px",right:"16px"},"bottom-left":{bottom:"16px",left:"16px"}},nb=()=>Math.random().toString(36).substring(2,9);let So=new Map;const sr=Ho.create(e=>({toasts:[],add:(o,t,n,a={})=>{const i=a.id||nb(),s={id:i,variant:o,title:t,description:n,createdAt:Date.now(),isVisible:!0,...a};if(e(c=>({toasts:[...c.toasts,s]})),a.duration!==0){const c=a.duration||5e3,d=setTimeout(()=>{sr.getState().remove(i)},c);So.set(i,d)}return i},remove:o=>{e(t=>({toasts:t.toasts.map(n=>n.id===o?{...n,isVisible:!1}:n)})),So.has(o)&&(clearTimeout(So.get(o)),So.delete(o)),setTimeout(()=>{e(t=>({toasts:t.toasts.filter(n=>n.id!==o)}))},300)},removeAll:()=>{So.forEach(clearTimeout),So.clear(),e(o=>({toasts:o.toasts.map(t=>({...t,isVisible:!1}))})),setTimeout(()=>{e({toasts:[]})},300)}})),mo=(e,o,t,n)=>sr.getState().add(e,o,t,n),Ji=(e,o,t)=>mo("info",e,o,t),Qi=(e,o,t)=>mo("success",e,o,t),Zi=(e,o,t)=>mo("warning",e,o,t),es=(e,o,t)=>mo("error",e,o,t),os=e=>{sr.getState().remove(e)},rs=()=>{sr.getState().removeAll()},ts=({variant:e,title:o,description:t,onClose:n,isClosable:a=!0,action:i,actionText:s,showIcon:c=!0,theme:d,views:u,render:m,icon:g,id:h,isVisible:f=!0,themeMode:y})=>{const b=d??yr,k=()=>{var S,x;if(g!==void 0)return g;const w=e?(x=(S=yr[e])==null?void 0:S.icon)==null?void 0:x.color:yr.info.icon.color;switch(e){case"info":return r.jsx(Ye,{widthHeight:20,color:w});case"success":return r.jsx(Ea,{widthHeight:20,color:w});case"warning":return r.jsx(Ye,{widthHeight:20,color:w,orientation:"down"});case"error":return r.jsx(Ar,{widthHeight:20,color:w});default:return r.jsx(Ye,{widthHeight:20,color:yr.info.icon.color})}};if(m)return r.jsx(r.Fragment,{children:m({id:h||"",onClose:n})});const C=e==="error"?"alert":"status",j=e==="error"||e==="warning"?"assertive":"polite";return r.jsxs(l.Horizontal,{role:C,"aria-live":j,"aria-atomic":"true","data-state":f?"open":"closed",gap:12,width:"100%",maxWidth:"380px",borderWidth:"1px",borderStyle:"solid",borderRadius:"12px",padding:"12px 14px",alignItems:"flex-start",position:"relative",backgroundColor:b[e].container.backgroundColor,borderColor:b[e].container.border,boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",opacity:f?1:0,transform:f?"translateY(0)":"translateY(4px)",transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",...u==null?void 0:u.container,children:[c&&r.jsx(l.View,{marginTop:"2px",...u==null?void 0:u.icon,children:k()}),r.jsxs(l.Vertical,{gap:4,flex:"1",children:[r.jsx(l.Text,{fontSize:"14px",lineHeight:"20px",fontWeight:"600",color:b[e].content.color,backgroundColor:b[e].container.backgroundColor,...u==null?void 0:u.title,children:o}),t&&r.jsx(l.Text,{fontSize:"12px",lineHeight:"18px",color:b[e].content.color,fontWeight:"400",backgroundColor:b[e].container.backgroundColor,...u==null?void 0:u.description,children:t}),i&&s&&r.jsx(l.Text,{fontSize:"14px",fontWeight:"600",marginTop:"6px",cursor:"pointer",color:b[e].content.color,backgroundColor:b[e].container.backgroundColor,onClick:w=>{w.stopPropagation(),i()},_hover:{textDecoration:"underline"},transition:"opacity 0.2s ease, color 0.2s ease",...u==null?void 0:u.actionButton,children:s})]}),a&&r.jsx(l.View,{as:"button","aria-label":"Close toast",backgroundColor:"transparent",border:"none",cursor:"pointer",padding:"4px",marginLeft:"8px",marginTop:"-2px",marginRight:"-4px",borderRadius:"9999px",onClick:w=>{w.stopPropagation(),n()},_hover:{backgroundColor:"color-blackAlpha-100"},transition:"background-color 0.2s ease, opacity 0.2s ease",...u==null?void 0:u.closeButton,children:r.jsx(Te,{widthHeight:16,color:b[e].content.color})})]})},ab=({position:e="top-right",gap:o=8,limit:t=5,containerStyle:n})=>{const{toasts:a,remove:i}=sr(),c=p.useMemo(()=>{const d={top:[],"top-right":[],"top-left":[],bottom:[],"bottom-right":[],"bottom-left":[]};return a.forEach(u=>{const m=u.position||e;d[m].push(u)}),Object.keys(d).forEach(u=>{d[u]=d[u].slice(-t)}),d},[a,e,t])[e];return r.jsx(l.View,{position:"fixed",zIndex:9999,display:"flex",flexDirection:e.includes("bottom")?"column-reverse":"column",gap:`${o}px`,width:"fit-content",maxWidth:"100%",pointerEvents:"none",...tb[e],style:n,children:c.map(d=>r.jsx(l.View,{pointerEvents:"auto",animation:e.includes("right")?"slideInRight 0.3s ease-out, fadeIn 0.3s ease-out":e.includes("left")?"slideInLeft 0.3s ease-out, fadeIn 0.3s ease-out":e.includes("top")?"slideInDown 0.3s ease-out, fadeIn 0.3s ease-out":"slideInUp 0.3s ease-out, fadeIn 0.3s ease-out",children:r.jsx(ts,{id:d.id,variant:d.variant,title:d.title,description:d.description,onClose:()=>i(d.id),isClosable:d.isClosable,action:d.action,actionText:d.actionText,showIcon:d.showIcon,views:d.views,render:d.render,icon:d.icon,isVisible:d.isVisible})},d.id))})},lb=()=>({toast:(e,o,t,n)=>mo(e,o,t,n),info:(e,o,t)=>Ji(e,o,t),success:(e,o,t)=>Qi(e,o,t),warning:(e,o,t)=>Zi(e,o,t),error:(e,o,t)=>es(e,o,t),remove:e=>os(e),removeAll:()=>rs()}),ib=e=>r.jsx(ts,{...e}),sb=Object.assign(ib,{Container:e=>r.jsx(ab,{...e}),show:mo,info:Ji,success:Qi,warning:Zi,error:es,remove:os,removeAll:rs}),cb=lb,la=(e,o)=>{var s,c;if(!e)return!0;const t=e.toLowerCase(),n=o.name.toLowerCase().includes(t),a=((s=o.description)==null?void 0:s.toLowerCase().includes(t))||!1,i=((c=o.keywords)==null?void 0:c.some(d=>d.toLowerCase().includes(t)))||!1;return n||a||i},db=({open:e,onOpenChange:o,groups:t=[],commands:n=[],filter:a})=>{const[i,s]=p.useState(""),[c,d]=p.useState(0),u=p.useRef(null),m=p.useMemo(()=>a||la,[a]),g=p.useMemo(()=>[...t.flatMap(k=>k.commands),...n],[t,n]),h=p.useMemo(()=>i.trim()?g.filter(b=>m(i,b)):g,[g,i,m]),f=p.useMemo(()=>{if(!i)return t;const b=a||la;return t.map(k=>({...k,commands:k.commands.filter(C=>b(i,C))})).filter(k=>k.commands.length)},[t,i,a]);p.useEffect(()=>{d(0)},[h.length]);const y=p.useCallback(b=>{if(e)switch(b.key){case"ArrowDown":b.preventDefault(),d(k=>k<h.length-1?k+1:k);break;case"ArrowUp":b.preventDefault(),d(k=>k>0?k-1:k);break;case"Enter":b.preventDefault(),h[c]&&(h[c].onSelect(),o(!1),s(""));break;case"Escape":b.preventDefault(),o(!1),s("");break}},[e,h,c,o]);return p.useEffect(()=>{if(typeof(document==null?void 0:document.addEventListener)=="function")return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[y]),p.useEffect(()=>{const b=u.current;if(b&&typeof b.querySelector=="function"&&e){const k=b.querySelector(`[data-index="${c}"]`);k&&typeof k.scrollIntoView=="function"&&k.scrollIntoView({block:"nearest"})}},[c,e]),p.useEffect(()=>{e?d(0):s("")},[e]),{search:i,setSearch:s,selectedIndex:c,setSelectedIndex:d,filteredCommands:h,filteredGroups:f,listRef:u}},ub=({onClose:e,children:o,...t})=>r.jsx(l.View,{position:"fixed",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-blackAlpha-400",zIndex:9999,onClick:n=>{n.target===n.currentTarget&&(e==null||e())},...t,children:o}),ns=p.forwardRef(({value:e,onValueChange:o,...t},n)=>r.jsx(l.Input,{value:e,onChange:a=>{var i,s;return o(typeof a=="string"?a:((i=a==null?void 0:a.target)==null?void 0:i.value)??((s=a==null?void 0:a.nativeEvent)==null?void 0:s.text)??"")},ref:n,...t}));ns.displayName="CommandTextInput";const pb={sm:{width:"400px",maxHeight:"300px"},md:{width:"500px",maxHeight:"400px"},lg:{width:"600px",maxHeight:"500px"}},mb=e=>({default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"},outline:{backgroundColor:"color-white",borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"}}),gb=mb(),hb={display:"flex",alignItems:"center",padding:"12px 16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},fb={overflow:"auto",padding:"8px 0"},yb={marginBottom:"8px"},xb={padding:"8px 16px",fontSize:"12px",fontWeight:"bold",color:"color-gray-500",textTransform:"uppercase"},bb={display:"flex",alignItems:"center",padding:"8px 16px",cursor:"pointer",userSelect:"none",borderRadius:"4px",margin:"0 8px",_hover:{backgroundColor:"color-gray-100"}},kb={backgroundColor:"color-blue-50",_hover:{backgroundColor:"color-blue-100"}},Cb={opacity:.5,cursor:"not-allowed",_hover:{backgroundColor:"transparent"}},Sb={display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",color:"color-gray-500"},jb={display:"flex",flexDirection:"column",flex:1},wb={fontSize:"14px",fontWeight:"medium"},vb={fontSize:"12px",color:"color-gray-500",marginTop:"2px"},Tb={display:"flex",alignItems:"center",marginLeft:"12px",fontSize:"12px",color:"color-gray-500"},Ib={display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",color:"color-gray-500",textAlign:"center"},Fb={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 16px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",fontSize:"12px",color:"color-gray-500"},Rb=p.createContext({search:"",setSearch:()=>{},selectedIndex:0,setSelectedIndex:()=>{},filteredCommands:[],onSelect:()=>{}}),zb=({value:e,children:o})=>r.jsx(Rb.Provider,{value:e,children:o}),as=({value:e,onValueChange:o,placeholder:t="Type a command or search...",views:n,...a})=>{const i=p.useRef(null);return p.useEffect(()=>{i.current&&i.current.focus()},[]),r.jsxs(l.View,{...hb,...n==null?void 0:n.container,...a,children:[r.jsx(Tr,{widthHeight:16,color:"color-gray-400",marginRight:"8px"}),r.jsx(ns,{width:"100%",border:"none",outline:"none",backgroundColor:"transparent",fontSize:"14px",...n==null?void 0:n.input,value:e,onValueChange:o,placeholder:t,ref:i})]})},Mb=({children:e,views:o,...t})=>r.jsx(l.View,{...fb,...o==null?void 0:o.container,...t,children:e}),ls=({heading:e,children:o,views:t,...n})=>r.jsxs(l.View,{...yb,...t==null?void 0:t.container,...n,children:[r.jsx(l.Text,{...xb,...t==null?void 0:t.heading,children:e}),o]}),Tt=({item:e,selected:o=!1,onSelect:t,views:n,...a})=>{const i=()=>{!e.disabled&&t&&t()};return r.jsxs(l.Horizontal,{...bb,...o?kb:{},...e.disabled?Cb:{},onPress:i,onClick:i,...n==null?void 0:n.container,...a,children:[e.icon&&r.jsx(l.View,{...Sb,...n==null?void 0:n.icon,children:e.icon}),r.jsxs(l.Vertical,{...jb,...n==null?void 0:n.content,children:[r.jsx(l.Text,{...wb,...n==null?void 0:n.name,children:e.name}),e.description&&r.jsx(l.Text,{...vb,...n==null?void 0:n.description,children:e.description})]}),e.shortcut&&r.jsx(l.Text,{...Tb,...n==null?void 0:n.shortcut,children:e.shortcut})]})},is=({children:e="No results found.",views:o,...t})=>r.jsx(l.View,{...Ib,...o==null?void 0:o.container,...t,children:e}),Wb=({open:e,onOpenChange:o,groups:t=[],commands:n=[],placeholder:a,size:i="md",variant:s="default",emptyState:c,footer:d,search:u,setSearch:m,selectedIndex:g,setSelectedIndex:h,filteredCommands:f,filteredGroups:y,listRef:b,views:k,filter:C,...j})=>{if(!e)return null;const w=p.useCallback(T=>{T.disabled||(T.onSelect(),o(!1),m(""))},[o,m]);p.useCallback(T=>T.target===T.currentTarget&&o(!1),[o]);const S=p.useMemo(()=>({search:u,setSearch:m,selectedIndex:g,setSelectedIndex:h,filteredCommands:f,onSelect:w}),[u,g,f,w,m,h]),x=t.length>0,v=f.length===0;return r.jsx(ub,{onClose:()=>o(!1),...j,children:r.jsx(zb,{value:S,children:r.jsxs(l.View,{borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column",...pb[i],...gb[s],...k==null?void 0:k.container,onClick:T=>T.stopPropagation(),children:[r.jsx(as,{value:u,onValueChange:m,placeholder:a,views:k==null?void 0:k.searchInput}),r.jsx(l.View,{ref:b,flex:1,overflow:"auto",...k==null?void 0:k.list,children:v?c||r.jsx(is,{views:k==null?void 0:k.empty}):x?y.map(T=>r.jsx(ls,{heading:T.name,views:k==null?void 0:k.groupHeading,children:T.commands.map(R=>{const M=f.findIndex(E=>E.id===R.id);return r.jsx(Tt,{item:R,selected:M===g,onSelect:()=>w(R),"data-index":M,views:{container:k==null?void 0:k.item,icon:k==null?void 0:k.icon,content:k==null?void 0:k.content,name:k==null?void 0:k.name,description:k==null?void 0:k.description,shortcut:k==null?void 0:k.shortcut}},R.id)})},T.id)):f.map((T,R)=>r.jsx(Tt,{item:T,selected:R===g,onSelect:()=>w(T),"data-index":R,views:{container:k==null?void 0:k.item,icon:k==null?void 0:k.icon,content:k==null?void 0:k.content,name:k==null?void 0:k.name,description:k==null?void 0:k.description,shortcut:k==null?void 0:k.shortcut}},T.id))}),d&&r.jsx(l.View,{...Fb,...k==null?void 0:k.footer,children:d})]})})})},Hb=({open:e,onOpenChange:o,groups:t=[],commands:n=[],placeholder:a,size:i="md",variant:s="default",filter:c,emptyState:d,footer:u,views:m,...g})=>{const{search:h,setSearch:f,selectedIndex:y,setSelectedIndex:b,filteredCommands:k,filteredGroups:C,listRef:j}=db({open:e,onOpenChange:o,groups:t,commands:n,filter:c});return r.jsx(Wb,{open:e,onOpenChange:o,groups:t,commands:n,placeholder:a,size:i,variant:s,emptyState:d,footer:u,search:h,setSearch:f,selectedIndex:y,setSelectedIndex:b,filteredCommands:k,filteredGroups:C,listRef:j,views:m,...g})},Eo=Hb;Eo.Input=as;Eo.List=Mb;Eo.Group=ls;Eo.Item=Tt;Eo.Empty=is;const ia=()=>Math.random().toString(36).substring(2,11),Pb=({defaultOpen:e=!1,openDelay:o=200,closeDelay:t=200,isDisabled:n=!1}={})=>{const[a,i]=p.useState(e),s=p.useRef(null),c=p.useRef(null),d=p.useRef(null),u=p.useRef(null),m=p.useRef(`tooltip-trigger-${ia()}`).current,g=p.useRef(`tooltip-content-${ia()}`).current,h=p.useCallback(()=>{n||(u.current&&(clearTimeout(u.current),u.current=null),!a&&!d.current&&(d.current=setTimeout(()=>{i(!0),d.current=null},o)))},[a,o,n]),f=p.useCallback(()=>{d.current&&(clearTimeout(d.current),d.current=null),a&&!u.current&&(u.current=setTimeout(()=>{i(!1),u.current=null},t))},[a,t]),y=p.useCallback(()=>{u.current&&(clearTimeout(u.current),u.current=null)},[]);return p.useEffect(()=>()=>{d.current&&clearTimeout(d.current),u.current&&clearTimeout(u.current)},[]),p.useEffect(()=>{if(typeof(document==null?void 0:document.addEventListener)!="function")return;const b=k=>{k.key==="Escape"&&a&&i(!1)};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[a]),{isOpen:a,openTooltip:h,closeTooltip:f,cancelCloseTimer:y,triggerRef:s,contentRef:c,triggerId:m,contentId:g}},Vb={sm:{padding:"4px 8px",fontSize:"12px",maxWidth:"200px"},md:{padding:"6px 10px",fontSize:"14px",maxWidth:"250px"},lg:{padding:"8px 12px",fontSize:"16px",maxWidth:"300px"}},Ab=e=>({default:{backgroundColor:"color-gray-900",color:"color-white",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.06)",transition:"opacity 0.15s ease"},light:{backgroundColor:"color-white",color:"color-gray-800",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.04)",transition:"opacity 0.15s ease"},dark:{backgroundColor:"color-gray-950",color:"color-white",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.2), 0px 2px 4px rgba(0, 0, 0, 0.12)",transition:"opacity 0.15s ease"}}),Eb=Ab(),Db=e=>{const o={position:"absolute",width:"8px",height:"8px",backgroundColor:"inherit",borderStyle:"inherit",borderWidth:"inherit",borderColor:"inherit",transform:"rotate(45deg)"};switch(e){case"top":return{...o,bottom:"-4px",left:"50%",marginLeft:"-4px",borderTop:"none",borderLeft:"none"};case"right":return{...o,left:"-4px",top:"50%",marginTop:"-4px",borderRight:"none",borderTop:"none"};case"bottom":return{...o,top:"-4px",left:"50%",marginLeft:"-4px",borderBottom:"none",borderRight:"none"};case"left":return{...o,right:"-4px",top:"50%",marginTop:"-4px",borderLeft:"none",borderBottom:"none"};default:return o}},ss=p.createContext({isOpen:!1,openTooltip:()=>{},closeTooltip:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),Sn=()=>p.useContext(ss),$b=({value:e,children:o})=>r.jsx(ss.Provider,{value:e,children:o}),cs=p.memo(({children:e,views:o,asChild:t=!1,...n})=>{const{openTooltip:a,closeTooltip:i,triggerRef:s,contentId:c,triggerId:d}=Sn(),u=p.useCallback(()=>a(),[a]),m=p.useCallback(()=>i(),[i]),g=p.useCallback(()=>a(),[a]),h=p.useCallback(()=>i(),[i]),f={ref:s,onMouseEnter:u,onMouseLeave:m,onFocus:g,onBlur:h,id:d,"aria-describedby":c,...o==null?void 0:o.container,...n};return t&&p.isValidElement(e)?p.cloneElement(e,f):r.jsx(l.View,{display:"inline-block",...f,children:e})}),Lb=p.memo(({children:e,views:o,...t})=>{const{isOpen:n,contentRef:a,contentId:i,triggerId:s}=Sn();return n?r.jsx(l.View,{ref:a,id:i,role:"tooltip","aria-labelledby":s,...o==null?void 0:o.container,...t,children:e}):null}),_b=({content:e,children:o,position:t="top",align:n="center",size:a="md",variant:i="default",showArrow:s=!0,views:c,themeMode:d,...u})=>{const{isOpen:m,triggerRef:g,contentRef:h,contentId:f,triggerId:y}=Sn(),{ref:b,relation:k}=l.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[C,j]=p.useState({x:0,y:0,placement:t});p.useEffect(()=>{g!=null&&g.current&&b&&(b.current=g.current)},[g,b,m]),p.useEffect(()=>{if(m&&(h!=null&&h.current)&&(g!=null&&g.current)){const x=g.current.getBoundingClientRect();let v=t;k&&(t==="top"&&k.space.vertical==="bottom"?v="bottom":t==="bottom"&&k.space.vertical==="top"?v="top":t==="right"&&k.space.horizontal==="left"?v="left":t==="left"&&k.space.horizontal==="right"&&(v="right"));let T=0,R=0;switch(v){case"top":T=n==="start"?x.left:n==="end"?x.right-120:x.left+x.width/2-60,R=x.top-8;break;case"bottom":T=n==="start"?x.left:n==="end"?x.right-120:x.left+x.width/2-60,R=x.bottom+8;break;case"right":T=x.right+8,R=n==="start"?x.top:n==="end"?x.bottom-32:x.top+x.height/2-16;break;case"left":T=x.left-8,R=n==="start"?x.top:n==="end"?x.bottom-32:x.top+x.height/2-16;break}j({x:T,y:R,placement:v})}},[m,t,n,g,h,k]);const w=p.useMemo(()=>s?Db(C.placement):{},[s,C.placement]),S=p.useMemo(()=>{const x={position:"fixed",left:C.x,top:C.y,zIndex:1e3};switch(C.placement){case"top":return{...x,transform:"translateY(-100%)"};case"left":return{...x,transform:"translateX(-100%)"};case"bottom":case"right":default:return x}},[C.x,C.y,C.placement]);return r.jsxs(l.View,{position:"relative",display:"inline-block",...c==null?void 0:c.container,...u,children:[r.jsx(cs,{children:o}),m&&r.jsxs(l.View,{ref:h,id:f,role:"tooltip","aria-labelledby":y,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",style:S,...Vb[a],...Eb[i],...c==null?void 0:c.content,children:[typeof e=="string"?r.jsx(l.Text,{...c==null?void 0:c.text,children:e}):e,s&&r.jsx(l.View,{...w,...c==null?void 0:c.arrow})]})]})},Bb=({content:e,children:o,position:t="top",align:n="center",size:a="md",variant:i="default",openDelay:s=200,closeDelay:c=200,showArrow:d=!0,defaultOpen:u=!1,isDisabled:m=!1,views:g,...h})=>{const f=Pb({defaultOpen:u,openDelay:s,closeDelay:c,isDisabled:m});return r.jsx($b,{value:f,children:r.jsx(_b,{content:e,position:t,align:n,size:a,variant:i,showArrow:d,views:g,...h,children:o})})},Gr=Bb;Gr.Trigger=cs;Gr.Content=Lb;const ds=p.forwardRef((e,o)=>{const t=ql(e);return r.jsx(Kl,{...e,...t})});ds.displayName="ChatInput";const Ob={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}},sa={container:{position:"relative",display:"flex",flexDirection:"column",height:"100vh",alignItems:"center",justifyContent:"center"},gradient:{position:"absolute",inset:"-10px",opacity:.5,pointerEvents:"none",filter:"blur(10px)",backgroundSize:"300% 200%",backgroundPosition:"50% 50%, 50% 50%"}},ct={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},image:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundAttachment:"scroll"},content:{position:"relative",width:"100%",height:"100%",zIndex:2}},dt={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},video:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover"},content:{position:"relative",zIndex:2}},Nb=p.createContext({}),qb=({children:e,showRadialGradient:o=!0,views:t,themeMode:n,...a})=>{const i={white:"rgba(255,255,255,1)",transparent:"rgba(255,255,255,0)"},s=["rgb(59, 130, 246)","rgb(196, 181, 253)","rgb(147, 197, 253)","rgb(221, 214, 254)","rgb(96, 165, 250)"],c={...sa.gradient,backgroundImage:`
26
+ ${Q}`:Q}let ue=W,U=!1;W.endsWith("-thinking")&&(ue=W.replace(/-thinking$/,""),U=!0),n==null||n(re,{model_name:ue,enable_thinking:U}),y||b(""),w([]),x([])},J=Z=>{w(re=>re.filter((ue,U)=>U!==Z)),!u&&j.length>Z&&x(re=>re.filter((ue,U)=>U!==Z))},K=Z=>{Z.preventDefault(),Z.stopPropagation(),R(!0)},X=Z=>{Z.preventDefault(),Z.stopPropagation(),R(!1)},ee=p.useCallback(Z=>{!Z||Z.length===0||(x(re=>[...re,...Z]),w(re=>[...re,...Z]),I(re=>[...re,...Z]),T(!0))},[x,w]),te=p.useCallback(()=>{if(E.length>0&&!V&&f){H(!0);const Z=E[0];z.current=Z,M(0);try{f(Z)}catch(re){I(ue=>ue.slice(1)),H(!1),z.current=null,M(0),T(ue=>E.length-1>0||!1),h==null||h(re)}}else E.length===0&&v&&(T(!1),M(0))},[E,V,f,v,h]);p.useEffect(()=>{te()},[E,V,te]);const ae="active",oe=Z=>!0,ie=()=>{G(!1),e.onGuideClose&&e.onGuideClose()},fe=Z=>{y&&t?t(Z.text):b(Z.text),e.onPromptExampleSelect&&e.onPromptExampleSelect(Z),O.current&&O.current.focus()},ne=p.useCallback(()=>j,[j]),se=p.useCallback(()=>x([]),[]);return{onSubmit:n,getPendingFiles:ne,clearPendingFiles:se,value:C,handleChange:N,setValue:A,handleSubmit:Y,editableRef:O,fileInputRef:$,hiddenInputRef:_,isUploading:v,uploadProgress:F,isDraggingOver:P,uploadedFiles:S,pendingFiles:j,removeUploadedFile:J,setPendingFiles:x,setUploadedFiles:w,setIsUploading:T,startUpload:ee,selectedModel:W,handleModelChange:D,modelOptions:L,subscriptionStatus:ae,canAccessModel:oe,handleDragOver:K,handleDragLeave:X,isGuideTipShown:B,hideGuideTip:ie,handlePromptExampleSelect:fe}},Sh={attachmentRemove:{position:"absolute",top:"2px",right:"2px",width:"20px",height:"20px",borderRadius:"50%",backgroundColor:"color-black-900",color:"white",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",zIndex:1}},Jn={container:{width:"100%",maxWidth:"100%",borderRadius:"12px",backgroundColor:"color-white",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},content:{width:"100%",padding:"12px",borderRadius:"12px",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}},jh={default:{borderRadius:"8px"},square:{borderRadius:"0px"},rounded:{borderRadius:"8px"}},wh={xs:{fontSize:"10px",padding:"4px 8px"},sm:{fontSize:"12px",padding:"6px 10px"},md:{fontSize:"14px",padding:"8px 12px"},lg:{fontSize:"16px",padding:"10px 14px"},xl:{fontSize:"20px",padding:"12px 16px"}},vh={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"},none:{backgroundColor:"transparent",border:"none"}},Qn=e=>`${e}-${Math.random().toString(36).substring(2,9)}`,Th=({openDelay:e=200,closeDelay:o=300}={})=>{const[t,n]=p.useState(!1),a=p.useRef(null),i=p.useRef(null),s=p.useRef(null),c=p.useRef(null),d=p.useMemo(()=>Qn("hovercard-content"),[]),u=p.useMemo(()=>Qn("hovercard-trigger"),[]),m=p.useCallback(()=>{a.current&&(clearTimeout(a.current),a.current=null),i.current&&(clearTimeout(i.current),i.current=null)},[]),g=p.useCallback(()=>{m(),t||(a.current=setTimeout(()=>{n(!0)},e))},[t,e,m]),h=p.useCallback(()=>{m(),t&&(i.current=setTimeout(()=>{n(!1)},o))},[t,o,m]),f=p.useCallback(()=>{i.current&&(clearTimeout(i.current),i.current=null)},[]);return p.useEffect(()=>()=>m(),[m]),{isOpen:t,openCard:g,closeCard:h,cancelCloseTimer:f,triggerRef:s,contentRef:c,contentId:d,triggerId:u}},Jl=p.createContext({isOpen:!1,openCard:()=>{},closeCard:()=>{},cancelCloseTimer:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),Ih=({children:e,value:o})=>r.jsx(Jl.Provider,{value:o,children:e}),Ql=()=>{const e=p.useContext(Jl);if(!e)throw new Error("useHoverCardContext must be used within a HoverCardProvider");return e},Rh=({children:e,views:o,asChild:t=!1,...n})=>{const{openCard:a,closeCard:i,triggerRef:s,contentId:c,triggerId:d}=Ql(),f={ref:s,onMouseEnter:()=>a(),onMouseLeave:()=>i(),onFocus:()=>a(),onBlur:()=>i(),id:d,"aria-describedby":c,...o==null?void 0:o.container,...n};if(t&&p.isValidElement(e)){const y=p.Children.only(e);return p.cloneElement(y,{...f,...y.props})}return r.jsx(l.View,{position:"relative",display:"inline-block",...f,children:e})},Fh=({children:e,views:o,side:t="bottom",align:n="center",sideOffset:a=8,style:i,backgroundColor:s="color-white",borderRadius:c="4px",boxShadow:d="0px 2px 8px rgba(0, 0, 0, 0.15)",padding:u="12px",minWidth:m="50px",maxWidth:g="300px",...h})=>{const{isOpen:f,cancelCloseTimer:y,closeCard:k,contentRef:b,triggerRef:C,contentId:S,triggerId:w}=Ql(),{ref:j,relation:x}=l.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0});p.useEffect(()=>{C!=null&&C.current&&(j==null?void 0:j.current)!==C.current&&j&&(j.current=C.current)},[C,j,f]);const v=()=>y(),T=()=>k();if(!f)return null;const F=()=>{if(!x||!(C!=null&&C.current))return{position:"absolute",top:0,left:0,zIndex:1e3};const I=C.current.getBoundingClientRect();let V=t;t==="bottom"&&x.space.vertical==="top"?V="top":t==="top"&&x.space.vertical==="bottom"?V="bottom":t==="right"&&x.space.horizontal==="left"?V="left":t==="left"&&x.space.horizontal==="right"&&(V="right");let H=0,z=0;switch(V){case"bottom":H=I.left+I.width/2,z=I.bottom+a;break;case"top":H=I.left+I.width/2,z=I.top-a;break;case"right":H=I.right+a,z=I.top+I.height/2;break;case"left":H=I.left-a,z=I.top+I.height/2;break}return{position:"fixed",left:H,top:z,zIndex:1e3,transform:M(V)}},M=I=>{switch(I){case"bottom":return"translate(-50%, 0)";case"top":return"translate(-50%, -100%)";case"right":return"translate(0, -50%)";case"left":return"translate(-100%, -50%)";default:return"translate(-50%, 0)"}},E=F();return r.jsx(l.View,{ref:b,id:S,role:"tooltip","aria-labelledby":w,onMouseEnter:v,onMouseLeave:T,backgroundColor:s,borderRadius:c,boxShadow:d,padding:u,minWidth:m,maxWidth:g,style:{...E,...i},...o==null?void 0:o.container,...h,children:e})},zh=({children:e,views:o,openDelay:t,closeDelay:n,...a})=>{const i=Th({openDelay:t,closeDelay:n});return r.jsx(Ih,{value:i,children:r.jsx(l.View,{position:"relative",display:"inline-block",...o==null?void 0:o.container,...a,children:e})})},ve=zh;ve.Trigger=Rh;ve.Content=Fh;const Mh=({files:e,sandboxId:o,onRemove:t,layout:n="inline",maxHeight:a="120px",showPreviews:i=!1,views:s={}})=>{if(e.length===0)return null;const c=p.useCallback(u=>u<1024?`${u} B`:u<1024*1024?`${(u/1024).toFixed(1)} KB`:`${(u/(1024*1024)).toFixed(1)} MB`,[]),d=p.useCallback(u=>u.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:u.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:u.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return r.jsx(l.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...s==null?void 0:s.container,children:e.map((u,m)=>{const g=(u==null?void 0:u.path)||(u==null?void 0:u.url)||(i?URL.createObjectURL(u):""),h=u.type.startsWith("image/"),f=u.type.startsWith("video/"),y=u.type.startsWith("audio/"),k=d(u);return i?r.jsx(l.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...s==null?void 0:s.item,children:i&&r.jsxs(ve,{children:[r.jsxs(ve.Trigger,{children:[h&&r.jsx(l.Image,{src:g,alt:u.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),f&&r.jsx(l.View,{as:"video",src:g,alt:u.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&r.jsx(l.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(Vo,{widthHeight:24,color:"color-black"})}),!h&&!f&&!y&&r.jsx(l.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(po,{widthHeight:24,color:"color-black"})}),t&&r.jsx(l.Button,{...Sh.attachmentRemove,onClick:b=>{b.stopPropagation(),t(m)},"aria-label":`Remove ${u.name}`,children:"×"})]}),r.jsxs(ve.Content,{children:[h&&r.jsx(l.Image,{src:g,alt:u.name,maxWidth:"100%"}),f&&r.jsx(l.View,{as:"video",src:g,controls:!0,maxWidth:"100%"}),y&&r.jsx(l.View,{as:"audio",src:g,controls:!0,width:"100%"}),r.jsxs(l.Text,{marginTop:"4px",maxLines:1,width:"100%",...s==null?void 0:s.name,children:[u.name," (",c(u.size),")"]})]})]})},m):r.jsxs(l.Horizontal,{alignItems:"center",gap:"8px",padding:"6px 10px 6px 8px",borderRadius:"9999px",border:"1px solid #E2E8F0",backgroundColor:"color-white",maxWidth:"100%",animate:{from:{opacity:0,scale:.96},to:{opacity:1,scale:1}},animationDuration:.2,...s==null?void 0:s.item,children:[r.jsx(l.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:k.backgroundColor,color:k.color,children:y?r.jsx(Vo,{widthHeight:12,color:"currentColor"}):r.jsx(po,{widthHeight:12,color:"currentColor"})}),r.jsxs(l.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...s==null?void 0:s.name,children:[u.name," · ",c(u.size)]}),t&&r.jsx(l.View,{as:"button",type:"button",onClick:()=>t(m),"aria-label":`Remove ${u.name}`,display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",border:"none",backgroundColor:"transparent",color:"color-gray-400",padding:0,cursor:"pointer",transition:"color 0.2s ease, opacity 0.2s ease",_hover:{color:"color-gray-600"},children:"×"})]},m)})})},Zn=typeof window<"u"?p.useLayoutEffect:p.useEffect,Zl=p.forwardRef(({value:e,onChange:o,placeholder:t="Type your message...",disabled:n=!1,autoFocus:a=!0,suggestions:i=[],onSuggestionSelect:s,showSuggestions:c=!1,mentionData:d=[],mentionTrigger:u="@",onMentionSelect:m,maxHeight:g="200px",minHeight:h="40px",name:f,id:y,hiddenInput:k=!0,hiddenInputRef:b,views:C={}},S)=>{var re,ue;const w=p.useRef(e),[j,x]=p.useState(-1),[v,T]=p.useState(!e),F=p.useRef(null),[M,E]=p.useState(!1),[I,V]=p.useState(!1),[H,z]=p.useState(""),[P,R]=p.useState(-1),[W,D]=p.useState(-1),[L,O]=p.useState([]),{ref:$,relation:_}=l.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[B,G]=p.useState({x:0,y:0}),[N,A]=p.useState({x:0,y:0}),Y=p.useRef(null),J=p.useCallback(U=>{Y.current=U,typeof b=="function"?b(U):b&&(b.current=U)},[b]),K=p.useCallback(U=>{Y.current&&Y.current.value!==U&&(Y.current.value=U)},[]);Zn(()=>{const U=S;U!=null&&U.current&&e!==w.current&&(U.current.textContent=e,w.current=e,T(!e)),K(e)},[e,S,K]);const X=p.useCallback(U=>{if(U===w.current)return;const Q=S;Q!=null&&Q.current&&Q.current.textContent!==U&&(Q.current.textContent=U),w.current=U,T(!U),K(U),o(U)},[o,S,K]);Zn(()=>{const U=Y.current;if(!U)return;const Q=()=>X(U.value);return U.addEventListener("input",Q),U.addEventListener("change",Q),()=>{U.removeEventListener("input",Q),U.removeEventListener("change",Q)}},[X,k]),p.useEffect(()=>{a&&S&&typeof S=="object"&&S.current&&S.current.focus()},[a,S]);const ee=()=>{const U=window.getSelection();if(!U||U.rangeCount===0)return-1;const Q=U.getRangeAt(0),be=Q.cloneRange();return be.selectNodeContents(S&&typeof S=="object"&&S.current?S.current:document.body),be.setEnd(Q.endContainer,Q.endOffset),be.toString().length},te=p.useCallback((U,Q)=>{const be=U.substring(0,Q),Me=be.lastIndexOf(u);if(Me!==-1){const We=be.substring(Me+1);if(!We.includes(" ")){const Ae=We.toLowerCase(),He=d.filter(lo=>lo.name.toLowerCase().includes(Ae));z(Ae),R(Me),O(He),V(He.length>0),D(0);const ko=ae();G(ko);return}}V(!1),z(""),R(-1),D(-1)},[d,u]);p.useEffect(()=>{F.current&&$&&($.current=F.current)},[F,$]);const ae=p.useCallback((U=200)=>{if(!F.current)return{x:0,y:0};const Q=F.current.getBoundingClientRect();if(_){const Ie=_.space.vertical==="top";return{x:Q.left,y:Ie?Q.top-U-8:Q.bottom+8}}const be=window.innerHeight,Me={top:Q.top,bottom:be-Q.bottom},We=Me.bottom<U+8&&Me.top>Me.bottom;return{x:Q.left,y:We?Q.top-U-8:Q.bottom+8}},[_]),oe=p.useCallback(()=>{E(!0);const U=ae();A(U)},[ae]),ie=p.useCallback(()=>{setTimeout(()=>{E(!1),x(-1)},150)},[]),fe=U=>{const Q=U.currentTarget.textContent||"";if(Q!==w.current){o(Q),w.current=Q,K(Q),T(!Q);const be=ee();te(Q,be)}},ne=p.useCallback(U=>{if(S&&typeof S=="object"&&S.current){const Q=S.current.textContent||"",be=Q.substring(0,P),Me=Q.substring(P+u.length+H.length),We=be+u+U.name+" "+Me;o(We),w.current=We,K(We),S.current.textContent=We;const Ie=be.length+u.length+U.name.length+1;setTimeout(()=>{var Ae;if(S.current){const He=document.createRange(),ko=window.getSelection(),lo=S.current.firstChild;lo&&ko&&(He.setStart(lo,Math.min(Ie,((Ae=lo.textContent)==null?void 0:Ae.length)||0)),He.collapse(!0),ko.removeAllRanges(),ko.addRange(He))}},0)}V(!1),z(""),R(-1),D(-1),m&&m(U)},[P,u,H,o,m,S,K]),se=p.useCallback(U=>{s&&s(U),x(-1)},[s]),Z=U=>{if(I&&L.length>0){if(U.key==="ArrowDown"){U.preventDefault(),D(Q=>Q<L.length-1?Q+1:0);return}if(U.key==="ArrowUp"){U.preventDefault(),D(Q=>Q>0?Q-1:L.length-1);return}if((U.key==="Tab"||U.key==="Enter")&&W>=0){U.preventDefault(),ne(L[W]);return}if(U.key==="Escape"){V(!1),D(-1);return}}if(c&&i.length>0){if(U.key==="ArrowDown"){U.preventDefault(),x(Q=>Q<i.length-1?Q+1:0);return}if(U.key==="ArrowUp"){U.preventDefault(),x(Q=>Q>0?Q-1:i.length-1);return}if(U.key==="Tab"&&j>=0){U.preventDefault(),se(i[j]);return}if(U.key==="Escape"){x(-1);return}}};return r.jsxs(l.View,{ref:F,width:"100%",position:"relative",...C==null?void 0:C.container,children:[r.jsxs(l.View,{width:"100%",minHeight:h,maxHeight:g,overflowY:"auto",position:"relative",children:[v&&r.jsx(l.Text,{position:"absolute",top:"8px",left:"8px",color:"color-gray-400",pointerEvents:"none",fontSize:"14px",zIndex:1,...C==null?void 0:C.placeholder,children:t}),r.jsx(l.View,{as:"div",ref:S,contentEditable:!n,suppressContentEditableWarning:!0,onInput:fe,onKeyDown:Z,onFocus:oe,onBlur:ie,role:"textbox","aria-multiline":"true","aria-placeholder":t,width:"100%",minHeight:"24px",padding:"8px",outline:"none",whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"14px",color:"color-gray-900",backgroundColor:"transparent",...C==null?void 0:C.input})]}),k&&r.jsx(l.View,{as:"textarea",ref:J,id:y,name:f,defaultValue:e,disabled:n,tabIndex:-1,"aria-hidden":"true","data-editable-input-mirror":"true",opacity:0,width:1,height:1,padding:0,border:"none",resize:"none",overflow:"hidden",position:"absolute",bottom:0,left:0,pointerEvents:"none",...C==null?void 0:C.hiddenInput}),I&&L.length>0&&r.jsx(l.View,{position:"fixed",left:B.x,top:B.y,width:((re=F.current)==null?void 0:re.offsetWidth)||300,backgroundColor:"color-white",border:"2px solid",borderColor:"color-blue-300",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",zIndex:9999,maxHeight:"200px",overflowY:"auto",...C==null?void 0:C.mentionContainer,children:r.jsxs(l.Vertical,{gap:0,children:[L.map((U,Q)=>r.jsx(l.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:Q===W?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>ne(U),onMouseEnter:()=>D(Q),_hover:{backgroundColor:"color-blue-50"},...C==null?void 0:C.mentionItem,children:r.jsxs(l.Vertical,{gap:4,children:[r.jsxs(l.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:[u,U.name]}),U.description&&r.jsx(l.Text,{fontSize:"12px",color:"color-gray-600",children:U.description})]})},U.id)),process.env.NODE_ENV==="development"&&r.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Mentions (Trigger: ",u,")",_&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),"Space: ",_.space.vertical,"-",_.space.horizontal]})]})]})}),c&&i.length>0&&!I&&M&&!e&&r.jsx(l.View,{position:"fixed",left:N.x,top:N.y,width:((ue=F.current)==null?void 0:ue.offsetWidth)||300,backgroundColor:"color-white",border:"2px solid",borderColor:"color-green-300",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",zIndex:9998,maxHeight:"200px",overflowY:"auto",...C==null?void 0:C.suggestionsContainer,children:r.jsxs(l.Vertical,{gap:0,children:[i.map((U,Q)=>r.jsx(l.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:Q===j?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>se(U),onMouseEnter:()=>x(Q),_hover:{backgroundColor:"color-blue-50"},...C==null?void 0:C.suggestionItem,children:r.jsxs(l.Vertical,{gap:4,children:[r.jsx(l.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:U.text}),U.description&&r.jsx(l.Text,{fontSize:"12px",color:"color-gray-600",children:U.description})]})},U.id)),process.env.NODE_ENV==="development"&&r.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Suggestions (Focus-triggered)",_&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),"Space: ",_.space.vertical,"-",_.space.horizontal]})]})]})})]})});Zl.displayName="EditableInput";const Wh=({examples:e,onSelect:o,views:t={}})=>{const{getColor:n}=l.useTheme();return!e||e.length===0?null:r.jsx(l.Horizontal,{gap:8,overflowX:"auto",padding:"8px 0",width:"100%",...t==null?void 0:t.container,children:e.map(a=>r.jsx(l.View,{as:"button",type:"button",padding:"8px 12px",borderRadius:"9999px",backgroundColor:"color-white",border:"1px solid #E2E8F0",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",onClick:()=>o(a),_hover:{backgroundColor:"#F8FAFC",borderColor:"#CBD5E1"},...t==null?void 0:t.item,children:r.jsx(l.Text,{fontSize:"14px",color:"color-gray-700",...t==null?void 0:t.text,children:a.text})},a.id))})},Hh=({onRecordingComplete:e,onRecordingStart:o,views:t={}})=>{const{recording:n,paused:a,audioBlob:i,analyserNode:s,startRecording:c,stopRecording:d}=Za();p.useEffect(()=>{if(i){const m=new File([i],`recording-${Date.now()}.webm`,{type:i.type||"audio/webm;codecs=opus"});e(m)}},[i]);const u=p.useCallback(()=>{c(),o==null||o()},[]);return r.jsxs(l.Horizontal,{alignItems:"center",gap:4,children:[r.jsx(l.View,{minWidth:90,children:n&&s&&r.jsx(Qt,{analyserNode:s,isPaused:a})}),r.jsx(l.View,{as:"button",type:"button",onClick:n?d:u,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n?"theme-error":"color-gray-100",color:n?"color-white":"color-gray-600",borderRadius:"50%",border:"none",cursor:"pointer",_hover:{backgroundColor:n?"color-red-600":"color-gray-200"},...t.button,children:n?r.jsx(Br,{widthHeight:16,color:"currentColor",filled:!1}):r.jsx(Nt,{widthHeight:16,color:"currentColor",filled:!1})})]})},ei=p.memo(({onSubmit:e,placeholder:o="Type your message… use @ to mention",loading:t=!1,disabled:n=!1,isAgentRunning:a=!1,enableAudioRecording:i=!1,leftButtons:s,rightButtons:c,onStopAgent:d,loadingText:u="Agent is working...",autoFocus:m=!0,sandboxId:g,hideAttachments:h=!1,attachmentText:f="",promptExamples:y=[],suggestions:k=[],errorMessage:b,size:C="md",shape:S="rounded",variant:w="default",views:j={},mentionData:x=[],mentionTrigger:v="@",onMentionSelect:T,onAudioRecordingStart:F,onAudioRecordingStop:M,showGuideTip:E,guideVideoUrl:I,onGuideClose:V,onFileBrowse:H,onUploadProgress:z,onUploadSuccess:P,onUploadError:R,onFileUpload:W,onPromptExampleSelect:D,name:L,hiddenInput:O=!0,value:$,handleChange:_,setValue:B,handleSubmit:G,editableRef:N,fileInputRef:A,hiddenInputRef:Y,isUploading:J,uploadProgress:K,isDraggingOver:X,uploadedFiles:ee,pendingFiles:te,getPendingFiles:ae,clearPendingFiles:oe,removeUploadedFile:ie,setPendingFiles:fe,setUploadedFiles:ne,setIsUploading:se,startUpload:Z,selectedModel:re,handleModelChange:ue,modelOptions:U,subscriptionStatus:Q,canAccessModel:be,isGuideTipShown:Me,hideGuideTip:We,handlePromptExampleSelect:Ie,handleDragOver:Ae,handleDragLeave:He,onChange:ko,...lo})=>{l.useTheme();const Fn=p.useMemo(()=>({...Jn.container,...jh[S],...j==null?void 0:j.container}),[S,j==null?void 0:j.container]),Rs=p.useMemo(()=>({...Jn.content,...wh[C],...vh[w],...j==null?void 0:j.content}),[C,w,j==null?void 0:j.content]),No=(($==null?void 0:$.trim().length)??0)>0||ee.length>0,Fs=p.useCallback(Se=>{Z([Se]),M==null||M(Se)},[Z,M]),ot=p.useCallback(Se=>{const Co=Se.filter(zn=>zn.size>52428800?(console.error(`File size exceeds 50MB limit: ${zn.name}`),!1):!0);Co.length>0&&Z(Co)},[Z]),zs=p.useCallback(Se=>{if(Se.preventDefault(),Se.stopPropagation(),He(Se),Se.dataTransfer.files.length>0){const Co=Array.from(Se.dataTransfer.files);ot(Co)}},[He,ot]),Ms=p.useMemo(()=>[...x||[],...ee.map((Se,Co)=>({id:`file-${Co}`,name:Se.name}))],[x,ee]);return r.jsxs(l.View,{display:"flex",flexDirection:"column",boxSizing:"border-box",...Fn,...lo,onDragOver:Ae,onDragLeave:He,onDrop:zs,children:[y.length>0&&r.jsx(Wh,{examples:y,onSelect:Ie,views:{container:j==null?void 0:j.promptExamples,item:j==null?void 0:j.promptExampleItem}}),a&&r.jsxs(l.Horizontal,{justifyContent:"center",alignItems:"center",gap:8,padding:"8px 0",animate:{from:{opacity:0,y:-10},to:{opacity:1,y:0},duration:"0.3s"},...j==null?void 0:j.loadingIndicator,children:[r.jsx(Ut,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),r.jsx(l.Text,{color:"color-gray-500",children:u})]}),r.jsx(l.View,{position:"relative",width:"100%",overflow:"visible",children:r.jsxs(l.View,{as:"form",onSubmit:G,overflow:"visible",display:"flex",flexDirection:"column",position:"relative",...Rs,...Fn,paddingHorizontal:16,paddingVertical:10,backgroundColor:X?"color-blue-50":void 0,children:[r.jsx(Mh,{files:ee,sandboxId:g,onRemove:ie,showPreviews:!0,views:{container:j==null?void 0:j.attachments,item:j==null?void 0:j.attachmentItem,name:j==null?void 0:j.attachmentName,size:j==null?void 0:j.attachmentSize,removeButton:j==null?void 0:j.attachmentRemove}}),r.jsx(Zl,{ref:N,value:$||"",onChange:_,placeholder:o,disabled:n&&!a,autoFocus:m,suggestions:k||[],showSuggestions:k&&k.length>0&&!$,onSuggestionSelect:Se=>{_(Se.text)},mentionData:Ms,mentionTrigger:v,onMentionSelect:T,name:L,hiddenInput:O,hiddenInputRef:Y,views:{container:{},input:j==null?void 0:j.editableInput,hiddenInput:j==null?void 0:j.hiddenInput}}),r.jsxs(l.Horizontal,{justifyContent:"space-between",alignItems:"center",marginTop:"8px",children:[r.jsxs(l.Horizontal,{gap:8,alignItems:"center",children:[!h&&r.jsx(qr,{accept:"*/*",icon:r.jsx(ar,{widthHeight:16}),maxSize:50*1024*1024,multiple:!0,onMultipleFileSelect:ot,isLoading:J,progress:K||0,text:f,fileType:"file",renderError:({errorMessage:Se})=>null,views:{container:{height:"36px",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},...j==null?void 0:j.fileButton}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",gap:4,borderRadius:S==="rounded"?"50%":4,padding:10},textProps:{fontSize:"14px",color:"color-gray-600"},validateFile:Se=>Se.size>50*1024*1024?"File size exceeds 50MB limit":null}),s]}),r.jsxs(l.Horizontal,{gap:8,alignItems:"center",children:[i&&r.jsx(Hh,{onRecordingStart:F,onRecordingComplete:Fs,views:{button:j==null?void 0:j.recordButton}}),r.jsx(l.View,{as:"button",type:"button",onClick:G,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:a?"theme-error":No?"theme-primary":"color-gray-300",color:"color-white",borderRadius:S==="rounded"?"50%":4,border:"none",cursor:No?"pointer":"not-allowed",disabled:!No||t||n&&!a,transition:"background-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease",_hover:{opacity:No||a?.9:1},_active:{opacity:No||a?.95:1},_focusVisible:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},...j==null?void 0:j.submitButton,children:a?r.jsx(Br,{widthHeight:16,color:"currentColor",filled:!1}):t?r.jsx(ro,{type:"quarter",size:16,color:"color-white"}):r.jsx(qt,{widthHeight:16,color:"currentColor",filled:!1})}),c]})]})]})}),b&&r.jsx(l.Text,{color:"theme-error",marginTop:"4px",...j==null?void 0:j.bottomTip,children:b})]})}),Ph=e=>{const{name:o,onSubmit:t,...n}=e,[a,i]=p.useState([]),s=xe({name:o,type:"text"}),c=h=>{s.onChangeText&&s.onChangeText(h)},d=(h,f)=>{t?t(h,f):c(h)},u=()=>a,m=()=>i([]),g=Xl({...n,value:s.value||"",onChange:c,onSubmit:d});return r.jsx(ei,{...n,...g,name:o,value:s.value||"",onChange:c,onSubmit:d,error:s.error,getPendingFiles:u,clearPendingFiles:m})},Vh=Ph,Ah=e=>{const o=xe(e),t=zl(o);return r.jsx(Ml,{...t,...o})},Eh=Ah,Dh=e=>{const o=xe(e),t=El();return r.jsx(Dl,{...t,...o})},$h=Dh,Lh=e=>{const o=xe(e),t=Wl(e);return r.jsx(Hl,{...t,...o})},_h=Lh,Bh=e=>{let o=xe(e);o.selected=o.value;const t=bl({...e,value:o.value});return r.jsx(Cl,{...o,...t})},Oh=Bh,Nh=e=>{const o=xe(e),t=Sl(e);return r.jsx(jl,{...t,...o})},qh=Nh,Uh=e=>{const{name:o,...t}=e,{values:n,errors:a,touched:i,submitCount:s,setFieldValue:c,setFieldTouched:d}=Le.useFormikContext(),u=Le.getIn(n,o)||[],m=Le.getIn(i,o)||s>0?Le.getIn(a,o):void 0,g=p.useCallback(b=>{var S;const C=Array.isArray(b)?b.filter(w=>typeof w=="string"):[];c(o,C),(S=e.onTagsChange)==null||S.call(e,C)},[o,c,e.onTagsChange]),h=p.useCallback(()=>{var b;d(o,!0),(b=e.onBlur)==null||b.call(e)},[o,d,e.onBlur]),f=Bl({...t,tags:u,onTagsChange:g,onBlur:h}),{tags:y,...k}=f;return r.jsx(Ol,{...k,...t,tags:y,error:m})},Gh=Uh,Yh=e=>{const o=xe(e),t=Tl(e);return r.jsx(Il,{...t,...o})},Kh=Yh,Xh=e=>{const o=xe(e,{focusable:!0}),{value:t,...n}=dn(e);return r.jsx(cr,{...n,...o})},Jh=Xh,Qh=({visibleIcon:e=r.jsx(Yt,{widthHeight:14}),hiddenIcon:o=r.jsx(Gt,{widthHeight:14}),...t})=>{const n=xe(t,{focusable:!0}),{isVisible:a,setIsVisible:i,...s}=$l(n);return r.jsx(cr,{...s,type:a?"text":"password",isClearable:!1,right:r.jsx(l.View,{onClick:()=>{t.isDisabled||i(!a)},children:a?e:o})})},Zh=Qh,ef=({items:e,placeholder:o,searchPlaceholder:t,isMulti:n=!1,...a})=>{const i=xe(a),s=Ll(e,o,t);p.useEffect(()=>{if(n&&Array.isArray(i.value))s.setSelectedItems(i.value);else if(!n&&i.value){const d=typeof i.value=="object"?i.value:e.find(u=>u.value===i.value);d&&s.setSelectedItem(d)}},[i.value,n,e]);const c=d=>{i.onChange(d)};return r.jsx(_l,{...s,...i,items:e,placeholder:o,isMulti:n,onSelect:c})},of=ef,Wo=(e,o,t)=>Math.min(Math.max(e,o),t),rf=(e,o,t,n,a,i,s)=>{const c=n-t;let d;if(i==="horizontal"){const u=o.width,m=e-o.left;d=Wo(m/u,0,1)}else{const u=o.height,m=o.bottom-e;d=Wo(m/u,0,1)}if(s&&s.length>0){const u=t+d*c;let m=s[0],g=Math.abs(u-m);for(let h=1;h<s.length;h++){const f=Math.abs(u-s[h]);f<g&&(g=f,m=s[h])}return m}else{const u=t+d*c,m=Math.round(u/a)*a;return Wo(m,t,n)}},oi=({min:e=0,max:o=100,step:t=1,value:n,defaultValue:a,onChange:i,onDrag:s,orientation:c="horizontal",isDisabled:d=!1,stepValues:u})=>{const m=Wo(n??a??e,e,o),[g,h]=p.useState(m),[f,y]=p.useState(!1),[k,b]=p.useState(!1),C=p.useRef(null),S=p.useRef(null),w=n!==void 0,j=n!==void 0?n:g;p.useEffect(()=>{n!==void 0&&h(Wo(n,e,o))},[n,e,o]);const x=p.useCallback(V=>{const H=Wo(V,e,o);w||h(H),i&&H!==j&&i(H),f&&s&&s(H)},[w,e,o,i,j,f,s]),v=p.useCallback(V=>{if(d||!C.current)return;const H=C.current;if(typeof H.getBoundingClientRect!="function")return;const z=H.getBoundingClientRect();let P;"touches"in V?P=c==="horizontal"?V.touches[0].clientX:V.touches[0].clientY:P=c==="horizontal"?V.clientX:V.clientY;const R=rf(P,z,e,o,t,c,u);x(R)},[e,o,t,c,x,d,u]),T=p.useCallback(V=>{if(d)return;V.preventDefault(),y(!0),v(V);const H=P=>{v(P)},z=()=>{y(!1),document.removeEventListener("mousemove",H),document.removeEventListener("mouseup",z),document.removeEventListener("touchmove",H),document.removeEventListener("touchend",z)};typeof(document==null?void 0:document.addEventListener)=="function"&&(document.addEventListener("mousemove",H),document.addEventListener("mouseup",z),document.addEventListener("touchmove",H),document.addEventListener("touchend",z))},[v,d]),F=p.useCallback(V=>{const H=S.current;H&&typeof H.contains=="function"&&H.contains(V.target)||T(V)},[T]),M=p.useCallback(V=>{if(d)return;let H=j;switch(V.key){case"ArrowLeft":case"ArrowDown":H=j-t;break;case"ArrowRight":case"ArrowUp":H=j+t;break;case"Home":H=e;break;case"End":H=o;break;default:return}V.preventDefault(),x(H)},[j,e,o,t,x,d]),E=o-e,I=E===0?0:(j-e)/E*100;return{currentValue:j,isDragging:f,isHovered:k,setIsHovered:b,trackRef:C,thumbRef:S,handleThumbMouseDown:T,handleTrackMouseDown:F,handleKeyDown:M,thumbPositionPercent:I}},ea={xs:{height:4,width:"100%"},sm:{height:6,width:"100%"},md:{height:8,width:"100%"},lg:{height:10,width:"100%"},xl:{height:12,width:"100%"}},oa={xs:{width:12,height:12},sm:{width:16,height:16},md:{width:20,height:20},lg:{width:24,height:24},xl:{width:28,height:28}},ra={square:0,rounded:4,pill:24},tf=e=>({default:{backgroundColor:"color-gray-200",transition:"background-color 0.15s ease"},outline:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"},transition:"border-color 0.15s ease"}}),ta=tf(),nf={xs:{trackCrossAxisSize:4,thumbSize:12},sm:{trackCrossAxisSize:6,thumbSize:16},md:{trackCrossAxisSize:8,thumbSize:20},lg:{trackCrossAxisSize:10,thumbSize:24},xl:{trackCrossAxisSize:12,thumbSize:28}},af={horizontal:{width:"100%",minWidth:"120px",height:"auto",flexDirection:"row",paddingVertical:8},vertical:{height:"100%",minHeight:"120px",width:"auto",flexDirection:"column-reverse",paddingHorizontal:8}},lf=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Ko=(e,o)=>lf(o)?{style:{[e]:o}}:{[e]:o},ri=p.memo(({min:e=0,max:o=100,step:t=1,currentValue:n,stepValues:a,shape:i="rounded",size:s="md",variant:c="default",orientation:d="horizontal",isDisabled:u=!1,showValue:m=!1,showTooltip:g=!1,backgroundColor:h="theme-primary",label:f,helperText:y,themeMode:k,shadow:b={},isDragging:C,isHovered:S,setIsHovered:w,trackRef:j,thumbRef:x,handleThumbMouseDown:v,handleTrackMouseDown:T,handleKeyDown:F,thumbPositionPercent:M,ariaLabel:E="Slider",views:I={container:{},track:{},progress:{},filledTrack:{},thumb:{},label:{},valueLabel:{},stepMarks:{},tooltip:{}},onChange:V,onDrag:H,value:z,defaultValue:P,...R})=>{var A,Y;const W=h,D="theme-disabled",L=ta[c].backgroundColor,O=u?D:W,$=d==="vertical",{trackCrossAxisSize:_,thumbSize:B}=nf[s]||{trackCrossAxisSize:ea[s].height,thumbSize:oa[s].width||16},G=r.jsxs(l.Vertical,{width:"100%",gap:8,...I.container,...R,children:[f&&r.jsxs(l.Horizontal,{justifyContent:"space-between",alignItems:"center",children:[r.jsx(l.Text,{fontSize:14,fontWeight:500,...I.label,children:f}),m&&r.jsx(l.Text,{fontSize:14,color:"color-gray-500",...I.valueLabel,children:n})]}),r.jsxs(l.View,{ref:j,position:"relative",cursor:u?"not-allowed":"pointer",opacity:u?.6:1,onMouseDown:T,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),...ea[s],borderRadius:ra[i],backgroundColor:L,...ta[c],...b,...I.track,children:[a&&a.length>0&&r.jsx(r.Fragment,{children:a.map(J=>{const K=(J-e)/(o-e)*100;return r.jsx(l.View,{position:"absolute",top:"50%",left:`${K}%`,transform:"translate(-50%, -50%)",width:4,height:4,borderRadius:"50%",zIndex:1,...Ko("backgroundColor",O),...I.stepMarks},J)})}),r.jsx(l.View,{position:"absolute",top:0,left:0,height:"100%",width:`${M}%`,borderRadius:ra[i],transition:"width 0.1s ease-in-out",...Ko("backgroundColor",O),...I.progress,...I.filledTrack}),r.jsx(l.View,{ref:x,role:"slider",tabIndex:u?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":d,"aria-disabled":u,"aria-label":E,position:"absolute",top:"50%",left:`${M}%`,borderRadius:"50%",backgroundColor:"color-white",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)",borderWidth:2,borderStyle:"solid",transition:C?"none":"transform 0.1s ease-in-out",...Ko("borderColor",O),transform:S?"translate(-50%, -50%) scale(1.1)":"translate(-50%, -50%)",zIndex:2,onMouseDown:v,onTouchStart:v,onKeyDown:F,...oa[s],...I.thumb,children:g&&(S||C)&&r.jsx(l.View,{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:8,padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:4,fontSize:12,whiteSpace:"nowrap",zIndex:3,...I.tooltip,children:r.jsx(l.Text,{...(A=I.tooltip)==null?void 0:A.text,children:n==null?void 0:n.toFixed(t<1?1:0)})})})]}),y&&r.jsx(wt,{children:y})]}),N=r.jsxs(l.Center,{...af[d],position:"relative",onMouseEnter:()=>!u&&w(!0),onMouseLeave:()=>!u&&w(!1),...R,...I==null?void 0:I.container,children:[f&&r.jsxs(l.Horizontal,{justifyContent:"space-between",alignItems:"center",marginBottom:8,width:"100%",children:[r.jsx(l.Text,{fontSize:14,fontWeight:500,...I.label,children:f}),m&&r.jsx(l.Text,{fontSize:14,color:"color-gray-500",...I.valueLabel,children:n})]}),r.jsxs(l.View,{ref:j,position:"relative",borderRadius:_/2,backgroundColor:u?D:L,cursor:u?"not-allowed":"pointer",width:$?`${_}px`:"100%",height:$?"100%":`${_}px`,onMouseDown:T,onTouchStart:T,...I==null?void 0:I.track,children:[a&&a.length>0&&r.jsx(r.Fragment,{children:a.map(J=>{const K=(J-e)/(o-e)*100;return r.jsx(l.View,{position:"absolute",width:4,height:4,borderRadius:"50%",backgroundColor:O,zIndex:1,...$?{bottom:`${K}%`,left:"50%",transform:"translate(-50%, 50%)"}:{left:`${K}%`,top:"50%",transform:"translate(-50%, -50%)"},...I.stepMarks},J)})}),r.jsx(l.View,{position:"absolute",borderRadius:_/2,...$?{bottom:0,left:0,width:"100%",height:`${M}%`}:{top:0,left:0,height:"100%",width:`${M}%`},...Ko("backgroundColor",O),...I==null?void 0:I.filledTrack,...I==null?void 0:I.progress}),r.jsx(l.View,{ref:x,role:"slider",tabIndex:u?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":d,"aria-disabled":u,"aria-label":E,position:"absolute",width:`${B}px`,height:`${B}px`,borderRadius:"50%",borderWidth:2,borderStyle:"solid",borderColor:"color-white",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.2)",cursor:u?"not-allowed":"grab",transform:$?"translateX(-50%)":"translateY(-50%)",zIndex:2,transition:C?"none":"left 0.1s, bottom 0.1s",...Ko("backgroundColor",O),...$?{left:"50%",bottom:`${M}%`}:{top:"50%",left:`${M}%`},onMouseDown:v,onTouchStart:v,onKeyDown:F,...I==null?void 0:I.thumb,children:g&&(S||C)&&r.jsx(l.View,{position:"absolute",padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:"4px",whiteSpace:"nowrap",zIndex:3,...$?{left:"100%",marginLeft:"8px",bottom:"0",transform:"translateY(50%)"}:{bottom:"100%",left:"50%",marginBottom:"8px",transform:"translateX(-50%)"},...I==null?void 0:I.tooltip,children:r.jsx(l.Text,{...(Y=I==null?void 0:I.tooltip)==null?void 0:Y.text,children:n==null?void 0:n.toFixed(t<1?1:0)})})})]}),y&&r.jsx(wt,{marginTop:8,children:y})]});return $||g?N:G}),sf=e=>{const o=xe(e),t=oi({...e,value:o.value!==void 0?Number(o.value):void 0,onChange:n=>{var a;o.onChange(n),(a=e.onChange)==null||a.call(e,n)}});return r.jsx(ri,{...e,...t,...o})},cf=sf,na=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},ct=(e,o)=>{console.log(`[FormikOTPInput] ${e}`,o)},df=e=>e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?e:Object.prototype.toString.call(e),uf=e=>{const o=xe(e),t=na(o.value).slice(0,e.length||6);ct("render",{name:e.name,type:e.type,formValue:df(o.value),displayValue:t,length:e.length||6,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText});const{isFocused:n,setIsFocused:a,isHovered:i,setIsHovered:s,inputRef:c,containerRef:d,mirrorSelectionStart:u,mirrorSelectionEnd:m,setMirrorSelectionStart:g,setMirrorSelectionEnd:h,setInputRef:f,handleFocus:y,handleBlur:k,handleKeyDown:b,handlePaste:C}=Nl(e),S=p.useCallback(j=>{const x=na(j).slice(0,e.length||6);ct("setValue",{name:e.name,incomingValue:j,nextValue:x,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText}),o.onChange&&o.onChange(x),o.onChangeText&&o.onChangeText(x),e.onComplete&&x.length===(e.length||6)&&e.onComplete(x),c.current&&(c.current.value=x)},[o,e,c]),w=p.useCallback(j=>{var T,F,M;const x=typeof j=="string"?j:((T=j==null?void 0:j.currentTarget)==null?void 0:T.value)??((F=j==null?void 0:j.target)==null?void 0:F.value)??((M=j==null?void 0:j.nativeEvent)==null?void 0:M.text)??"",v=String(x).slice(0,e.length||6);ct("handleChange normalized",{name:e.name,raw:x,newValue:v}),S(v),c.current&&(c.current.value=v)},[e.length,S,c]);return r.jsx(ql,{...e,...o,value:t,setValue:S,isFocused:n,setIsFocused:a,isHovered:i,setIsHovered:s,inputRef:c,containerRef:d,mirrorSelectionStart:u,mirrorSelectionEnd:m,setMirrorSelectionStart:g,setMirrorSelectionEnd:h,setInputRef:f,handleChange:w,handleFocus:y,handleBlur:k,handleKeyDown:b,handlePaste:C,stepValues:e.stepValues})},pf=uf,mf=e=>Array.isArray(e)?e:e==null?[]:[e],ti=({name:e,uploadFile:o,onUploadSuccess:t,onUploadError:n,transformResponse:a,onMultipleFileSelect:i,onFileSelect:s,multiple:c=!0,...d})=>{const{setFieldValue:u,setFieldTouched:m,values:g}=Le.useFormikContext(),[h,f]=p.useState(!1),[y,k]=p.useState(0),b=p.useCallback(async w=>{if(!w||w.length===0)return;m(e,!0,!0),f(!0);const j=[];for(const x of w){k(0);try{const v=await o(x,F=>{k(F??0)}),T=a?a(v,x):v;j.push(T),t==null||t(x,T)}catch(v){n==null||n(x,v)}}if(j.length>0){const x=mf(Le.getIn(g,e));u(e,[...x,...j],!0),k(100)}else k(0);f(!1)},[e,n,t,m,u,a,o,g]),C=p.useCallback(async w=>{i==null||i(w),await b(w)},[b,i]),S=p.useCallback(async w=>{s==null||s(w),await b([w])},[b,s]);return r.jsx(qr,{...d,multiple:c,onMultipleFileSelect:c?C:void 0,onFileSelect:c?void 0:S,isLoading:h,progress:y})};ti.displayName="FormikUploader";const gf=e=>{let o=xe(e);o.selected=o.value;const t=wl(e);return r.jsx(vl,{...t,...o})},hf=gf,ni=e=>{const[o,t]=p.useState(!1),[n,a]=p.useState(e);return{isHovered:o,setIsHovered:t,isToggle:n,setIsToggled:a}},ff={square:0,rounded:8,pill:999},yf=(e,o)=>({outline:{backgroundColor:"color-white",color:e,borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",_hover:{backgroundColor:"color-gray-50",borderColor:"color-gray-300"},_active:{backgroundColor:"color-gray-100"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{backgroundColor:"transparent",color:e,borderWidth:0,borderStyle:"none",borderColor:"transparent",_hover:{backgroundColor:"color-gray-50"},_active:{backgroundColor:"color-gray-100"},transition:"background-color 0.2s ease, color 0.2s ease"},link:{backgroundColor:"transparent",color:e,borderWidth:1,borderStyle:"solid",borderColor:"transparent",textDecoration:"underline",textUnderlineOffset:"1px",textDecorationThickness:"1px",_hover:{opacity:.8},_active:{opacity:.9},transition:"opacity 0.2s ease"}}),ai=p.memo(({children:e,shape:o="rounded",variant:t="ghost",isHovered:n,setIsHovered:a,isDisabled:i,isToggle:s,setIsToggled:c,onToggle:d,views:u,backgroundColor:m,color:g,themeMode:h,...f})=>{const{getColor:y,themeMode:k}=l.useTheme(),b=h??k,S=y(i?"theme-disabled":m??g??"theme-primary",{themeMode:b}),j=p.useMemo(()=>yf(S),[S,b])[t],x=!!s,v=p.useCallback(()=>a(!0),[a]),T=p.useCallback(()=>{i||c(F=>{const M=!F;return d&&d(M),M})},[i,c,d]);return r.jsx(l.Center,{role:"Toggle",padding:o==="pill"?"8px 12px":"8px",width:"fit-content",cursor:i?"not-allowed":"pointer",borderRadius:ff[o],onClick:T,onMouseEnter:v,onMouseLeave:()=>a(!1),...j,...x&&{...t==="link"?{backgroundColor:"transparent"}:{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200"},color:S},...f,...u==null?void 0:u.container,children:e})}),xf=({children:e,shape:o,variant:t,isDisabled:n,isToggled:a=!1,onToggle:i,...s})=>{const c=xe(s),{isHovered:d,setIsHovered:u,isToggle:m,setIsToggled:g}=ni(c.value??a);p.useEffect(()=>{g(c.value??a)},[c.value,a]);const h=f=>{g(f),c.onChange(f),i==null||i(f)};return r.jsx(ai,{shape:o,variant:t,isDisabled:n,isHovered:d,setIsHovered:u,isToggle:m,setIsToggled:g,onToggle:h,...s,children:e})},bf=xf,li=()=>{const[e,o]=p.useState([]);return{activeToggles:e,setActiveToggles:o}},kf=({children:e,shape:o,variant:t,isDisabled:n,isToggled:a=!1,onToggle:i,...s})=>{const{isHovered:c,setIsHovered:d,isToggle:u,setIsToggled:m}=ni(a);return p.useEffect(()=>{m(a)},[a]),r.jsx(ai,{shape:o,variant:t,isDisabled:n,isHovered:c,setIsHovered:d,isToggle:u,setIsToggled:m,onToggle:i,...s,children:e})},pn=kf,ii=({items:e,onToggleChange:o,activeToggles:t,setActiveToggles:n,shape:a="rounded",variant:i="ghost",views:s})=>{const c=p.useCallback((d,u)=>{n(m=>{let g;return u?g=m.includes(d)?m:[...m,d]:g=m.filter(h=>h!==d),o==null||o(g),g})},[o,n]);return r.jsx(l.Horizontal,{role:"ToggleGroup",display:"flex",gap:8,flexWrap:"wrap",...s==null?void 0:s.container,children:e.map(d=>r.jsx(pn,{role:`toggle-${d.id}`,shape:a,variant:i,isToggled:t.includes(d.id)||d.isActive,onToggle:u=>c(d.id,u),isDisabled:d.isDisabled,views:s==null?void 0:s.toggle,children:d.value},d.id))})},Cf=({items:e,shape:o,variant:t,onToggleChange:n,...a})=>{const i=xe(a),{activeToggles:s,setActiveToggles:c}=li();p.useEffect(()=>{Array.isArray(i.value)&&c(i.value)},[i.value]);const d=u=>{c(u),i.onChange(u),n==null||n(u)};return r.jsx(ii,{items:e,shape:o,variant:t,activeToggles:s,setActiveToggles:c,onToggleChange:d,...a})},Sf=Cf,aa=["zoom-out","zoom-in","zap","zap-off","youtube","x","wrench","worm","workflow","wine","wine-off","wind","wind-arrow-down","wifi","wifi-zero","wifi-sync","wifi-pen","wifi-off","wifi-low","wifi-high","wifi-cog","whole-word","wheat","wheat-off","weight","weight-tilde","webhook","webhook-off","webcam","waypoints","waves","waves-ladder","waves-arrow-up","waves-arrow-down","watch","washing-machine","warehouse","wand","wand-sparkles","wallpaper","wallet","wallet-minimal","wallet-cards","vote","volume","volume-x","volume-off","volume-2","volume-1","volleyball","voicemail","view","videotape","video","video-off","vibrate","vibrate-off","venus","venus-and-mars","venetian-mask","vegan","vector-square","vault","variable","van","utility-pole","utensils","utensils-crossed","users","users-round","user","user-x","user-star","user-search","user-round","user-round-x","user-round-search","user-round-plus","user-round-pen","user-round-minus","user-round-cog","user-round-check","user-plus","user-pen","user-minus","user-lock","user-cog","user-check","usb","upload","unplug","unlink","unlink-2","university","ungroup","unfold-vertical","unfold-horizontal","undo","undo-dot","undo-2","underline","umbrella","umbrella-off","type","type-outline","twitter","twitch","tv","tv-minimal","tv-minimal-play","turtle","turntable","turkish-lira","truck","truck-electric","trophy","triangle","triangle-right","triangle-dashed","triangle-alert","trending-up","trending-up-down","trending-down","trello","trees","tree-pine","tree-palm","tree-deciduous","trash","trash-2","transgender","tram-front","train-track","train-front","train-front-tunnel","traffic-cone","tractor","toy-brick","tower-control","touchpad","touchpad-off","torus","tornado","toolbox","tool-case","toilet","toggle-right","toggle-left","timer","timer-reset","timer-off","tickets","tickets-plane","ticket","ticket-x","ticket-slash","ticket-plus","ticket-percent","ticket-minus","ticket-check","thumbs-up","thumbs-down","thermometer","thermometer-sun","thermometer-snowflake","theater","text-wrap","text-select","text-search","text-quote","text-initial","text-cursor","text-cursor-input","text-align-start","text-align-justify","text-align-end","text-align-center","test-tubes","test-tube","test-tube-diagonal","terminal","tent","tent-tree","telescope","target","tangent","tally-5","tally-4","tally-3","tally-2","tally-1","tags","tag","tablets","tablet","tablet-smartphone","table","table-rows-split","table-properties","table-of-contents","table-columns-split","table-cells-split","table-cells-merge","table-2","syringe","swords","sword","switch-camera","swiss-franc","swatch-book","superscript","sunset","sunrise","sun","sun-snow","sun-moon","sun-medium","sun-dim","subscript","strikethrough","stretch-vertical","stretch-horizontal","store","stone","sticky-note","sticker","stethoscope","step-forward","step-back","star","star-off","star-half","stamp","squirrel","squircle","squircle-dashed","squares-unite","squares-subtract","squares-intersect","squares-exclude","square","square-x","square-user","square-user-round","square-terminal","square-stop","square-star","square-stack","square-square","square-split-vertical","square-split-horizontal","square-slash","square-sigma","square-scissors","square-round-corner","square-radical","square-power","square-plus","square-play","square-pilcrow","square-pi","square-percent","square-pen","square-pause","square-parking","square-parking-off","square-mouse-pointer","square-minus","square-menu","square-m","square-library","square-kanban","square-function","square-equal","square-dot","square-divide","square-dashed","square-dashed-top-solid","square-dashed-mouse-pointer","square-dashed-kanban","square-dashed-bottom","square-dashed-bottom-code","square-code","square-chevron-up","square-chevron-right","square-chevron-left","square-chevron-down","square-check","square-check-big","square-chart-gantt","square-bottom-dashed-scissors","square-asterisk","square-arrow-up","square-arrow-up-right","square-arrow-up-left","square-arrow-right","square-arrow-out-up-right","square-arrow-out-up-left","square-arrow-out-down-right","square-arrow-out-down-left","square-arrow-left","square-arrow-down","square-arrow-down-right","square-arrow-down-left","square-activity","sprout","spray-can","spotlight","spool","split","spline","spline-pointer","spell-check","spell-check-2","speech","speaker","sparkles","sparkle","spade","space","soup","solar-panel","sofa","soap-dispenser-droplet","snowflake","snail","smile","smile-plus","smartphone","smartphone-nfc","smartphone-charging","sliders-vertical","sliders-horizontal","slice","slash","slack","skull","skip-forward","skip-back","siren","signpost","signpost-big","signature","signal","signal-zero","signal-medium","signal-low","signal-high","sigma","shuffle","shrub","shrink","shrimp","shredder","shower-head","shovel","shopping-cart","shopping-basket","shopping-bag","shirt","ship","ship-wheel","shield","shield-x","shield-user","shield-question-mark","shield-plus","shield-off","shield-minus","shield-half","shield-ellipsis","shield-check","shield-ban","shield-alert","shell","sheet","share","share-2","shapes","settings","settings-2","server","server-off","server-crash","server-cog","separator-vertical","separator-horizontal","send","send-to-back","send-horizontal","section","search","search-x","search-slash","search-code","search-check","search-alert","scroll","scroll-text","screen-share","screen-share-off","scooter","scissors","scissors-line-dashed","school","scan","scan-text","scan-search","scan-qr-code","scan-line","scan-heart","scan-face","scan-eye","scan-barcode","scaling","scale","scale-3d","save","save-off","save-all","saudi-riyal","satellite","satellite-dish","sandwich","salad","sailboat","russian-ruble","ruler","ruler-dimension-line","rss","rows-4","rows-3","rows-2","router","route","route-off","rotate-cw","rotate-cw-square","rotate-ccw","rotate-ccw-square","rotate-ccw-key","rotate-3d","rose","roller-coaster","rocking-chair","rocket","ribbon","rewind","reply","reply-all","replace","replace-all","repeat","repeat-2","repeat-1","remove-formatting","regex","refrigerator","refresh-cw","refresh-cw-off","refresh-ccw","refresh-ccw-dot","redo","redo-dot","redo-2","recycle","rectangle-vertical","rectangle-horizontal","rectangle-goggles","rectangle-ellipsis","rectangle-circle","receipt","receipt-turkish-lira","receipt-text","receipt-swiss-franc","receipt-russian-ruble","receipt-pound-sterling","receipt-japanese-yen","receipt-indian-rupee","receipt-euro","receipt-cent","ratio","rat","rainbow","rail-symbol","radius","radio","radio-tower","radio-receiver","radical","radiation","radar","rabbit","quote","qr-code","pyramid","puzzle","proportions","projector","printer","printer-check","presentation","power","power-off","pound-sterling","popsicle","popcorn","pointer","pointer-off","podcast","pocket","pocket-knife","plus","plug","plug-zap","plug-2","play","plane","plane-takeoff","plane-landing","pizza","pipette","pin","pin-off","pill","pill-bottle","pilcrow","pilcrow-right","pilcrow-left","piggy-bank","picture-in-picture","picture-in-picture-2","pickaxe","piano","pi","phone","phone-outgoing","phone-off","phone-missed","phone-incoming","phone-forwarded","phone-call","philippine-peso","person-standing","percent","pentagon","pencil","pencil-ruler","pencil-off","pencil-line","pen","pen-tool","pen-off","pen-line","pc-case","paw-print","pause","party-popper","parking-meter","parentheses","paperclip","panels-top-left","panels-right-bottom","panels-left-bottom","panel-top","panel-top-open","panel-top-dashed","panel-top-close","panel-top-bottom-dashed","panel-right","panel-right-open","panel-right-dashed","panel-right-close","panel-left","panel-left-right-dashed","panel-left-open","panel-left-dashed","panel-left-close","panel-bottom","panel-bottom-open","panel-bottom-dashed","panel-bottom-close","panda","palette","paintbrush","paintbrush-vertical","paint-roller","paint-bucket","package","package-x","package-search","package-plus","package-open","package-minus","package-check","package-2","origami","orbit","option","omega","octagon","octagon-x","octagon-pause","octagon-minus","octagon-alert","nut","nut-off","notepad-text","notepad-text-dashed","notebook","notebook-text","notebook-tabs","notebook-pen","non-binary","nfc","newspaper","network","navigation","navigation-off","navigation-2","navigation-2-off","music","music-4","music-3","music-2","move","move-vertical","move-up","move-up-right","move-up-left","move-right","move-left","move-horizontal","move-down","move-down-right","move-down-left","move-diagonal","move-diagonal-2","move-3d","mouse","mouse-pointer","mouse-pointer-click","mouse-pointer-ban","mouse-pointer-2","mouse-pointer-2-off","mouse-off","mountain","mountain-snow","motorbike","moon","moon-star","monitor","monitor-x","monitor-up","monitor-stop","monitor-speaker","monitor-smartphone","monitor-play","monitor-pause","monitor-off","monitor-down","monitor-dot","monitor-cog","monitor-cloud","monitor-check","minus","minimize","minimize-2","milk","milk-off","milestone","microwave","microscope","microchip","mic","mic-vocal","mic-off","messages-square","message-square","message-square-x","message-square-warning","message-square-text","message-square-share","message-square-reply","message-square-quote","message-square-plus","message-square-off","message-square-more","message-square-lock","message-square-heart","message-square-dot","message-square-diff","message-square-dashed","message-square-code","message-circle","message-circle-x","message-circle-warning","message-circle-reply","message-circle-question-mark","message-circle-plus","message-circle-off","message-circle-more","message-circle-heart","message-circle-dashed","message-circle-code","merge","menu","memory-stick","meh","megaphone","megaphone-off","medal","maximize","maximize-2","martini","mars","mars-stroke","map","map-plus","map-pinned","map-pin","map-pin-x","map-pin-x-inside","map-pin-plus","map-pin-plus-inside","map-pin-pen","map-pin-off","map-pin-minus","map-pin-minus-inside","map-pin-house","map-pin-check","map-pin-check-inside","map-minus","mails","mailbox","mail","mail-x","mail-warning","mail-search","mail-question-mark","mail-plus","mail-open","mail-minus","mail-check","magnet","luggage","lollipop","logs","log-out","log-in","lock","lock-open","lock-keyhole","lock-keyhole-open","locate","locate-off","locate-fixed","loader","loader-pinwheel","loader-circle","list","list-x","list-video","list-tree","list-todo","list-start","list-restart","list-plus","list-ordered","list-music","list-minus","list-indent-increase","list-indent-decrease","list-filter","list-filter-plus","list-end","list-collapse","list-chevrons-up-down","list-chevrons-down-up","list-checks","list-check","linkedin","link","link-2","link-2-off","line-squiggle","lightbulb","lightbulb-off","ligature","life-buoy","library","library-big","lectern","leafy-green","leaf","layout-template","layout-panel-top","layout-panel-left","layout-list","layout-grid","layout-dashboard","layers","layers-plus","layers-2","laugh","lasso","lasso-select","laptop","laptop-minimal","laptop-minimal-check","languages","landmark","land-plot","lamp","lamp-wall-up","lamp-wall-down","lamp-floor","lamp-desk","lamp-ceiling","keyboard","keyboard-off","keyboard-music","key","key-square","key-round","kayak","kanban","joystick","japanese-yen","iteration-cw","iteration-ccw","italic","instagram","inspection-panel","info","infinity","indian-rupee","inbox","import","images","image","image-upscale","image-up","image-plus","image-play","image-off","image-minus","image-down","id-card","id-card-lanyard","ice-cream-cone","ice-cream-bowl","house","house-wifi","house-plus","house-plug","house-heart","hourglass","hotel","hospital","hop","hop-off","history","highlighter","hexagon","helicopter","heater","heart","heart-pulse","heart-plus","heart-off","heart-minus","heart-handshake","heart-crack","headset","headphones","headphone-off","heading","heading-6","heading-5","heading-4","heading-3","heading-2","heading-1","hdmi-port","hd","haze","hat-glasses","hash","hard-hat","hard-drive","hard-drive-upload","hard-drive-download","handshake","handbag","hand","hand-platter","hand-metal","hand-helping","hand-heart","hand-grab","hand-fist","hand-coins","hammer","hamburger","ham","guitar","group","grip","grip-vertical","grip-horizontal","grid-3x3","grid-3x2","grid-2x2","grid-2x2-x","grid-2x2-plus","grid-2x2-check","grape","graduation-cap","gpu","goal","globe","globe-lock","glasses","glass-water","gitlab","github","git-pull-request","git-pull-request-draft","git-pull-request-create","git-pull-request-create-arrow","git-pull-request-closed","git-pull-request-arrow","git-merge","git-graph","git-fork","git-compare","git-compare-arrows","git-commit-vertical","git-commit-horizontal","git-branch","git-branch-plus","git-branch-minus","gift","ghost","georgian-lari","gem","gavel","gauge","gamepad","gamepad-directional","gamepad-2","gallery-vertical","gallery-vertical-end","gallery-thumbnails","gallery-horizontal","gallery-horizontal-end","funnel","funnel-x","funnel-plus","fullscreen","fuel","frown","framer","frame","forward","form","forklift","footprints","folders","folder","folder-x","folder-up","folder-tree","folder-sync","folder-symlink","folder-search","folder-search-2","folder-root","folder-plus","folder-pen","folder-output","folder-open","folder-open-dot","folder-minus","folder-lock","folder-key","folder-kanban","folder-input","folder-heart","folder-git","folder-git-2","folder-down","folder-dot","folder-cog","folder-code","folder-closed","folder-clock","folder-check","folder-archive","fold-vertical","fold-horizontal","focus","flower","flower-2","flip-vertical","flip-vertical-2","flip-horizontal","flip-horizontal-2","flask-round","flask-conical","flask-conical-off","flashlight","flashlight-off","flame","flame-kindling","flag","flag-triangle-right","flag-triangle-left","flag-off","fishing-hook","fish","fish-symbol","fish-off","fire-extinguisher","fingerprint-pattern","film","files","file","file-x","file-x-corner","file-volume","file-video-camera","file-user","file-up","file-type","file-type-corner","file-text","file-terminal","file-symlink","file-stack","file-spreadsheet","file-sliders","file-signal","file-search","file-search-corner","file-scan","file-question-mark","file-plus","file-plus-corner","file-play","file-pen","file-pen-line","file-output","file-music","file-minus","file-minus-corner","file-lock","file-key","file-input","file-image","file-heart","file-headphone","file-exclamation-point","file-down","file-digit","file-diff","file-cog","file-code","file-code-corner","file-clock","file-check","file-check-corner","file-chart-pie","file-chart-line","file-chart-column","file-chart-column-increasing","file-braces","file-braces-corner","file-box","file-badge","file-axis-3d","file-archive","figma","ferris-wheel","fence","feather","fast-forward","fan","factory","facebook","eye","eye-off","eye-closed","external-link","expand","ev-charger","euro","ethernet-port","eraser","equal","equal-not","equal-approximately","ellipsis","ellipsis-vertical","egg","egg-off","egg-fried","eclipse","earth","earth-lock","ear","ear-off","dumbbell","drumstick","drum","droplets","droplet","droplet-off","drone","drill","dribbble","drama","drafting-compass","download","dot","door-open","door-closed","door-closed-locked","donut","dollar-sign","dog","dock","dna","dna-off","divide","disc","disc-album","disc-3","disc-2","diff","dices","dice-6","dice-5","dice-4","dice-3","dice-2","dice-1","diamond","diamond-plus","diamond-percent","diamond-minus","diameter","dessert","delete","decimals-arrow-right","decimals-arrow-left","database","database-zap","database-backup","dam","cylinder","currency","cup-soda","cuboid","crown","crosshair","cross","crop","croissant","credit-card","creative-commons","cpu","corner-up-right","corner-up-left","corner-right-up","corner-right-down","corner-left-up","corner-left-down","corner-down-right","corner-down-left","copyright","copyleft","copy","copy-x","copy-slash","copy-plus","copy-minus","copy-check","cooking-pot","cookie","contrast","container","contact","contact-round","construction","cone","concierge-bell","computer","component","compass","command","combine","columns-4","columns-3","columns-3-cog","columns-2","coins","cog","coffee","codesandbox","codepen","code","code-xml","club","clover","cloudy","cloud","cloud-upload","cloud-sync","cloud-sun","cloud-sun-rain","cloud-snow","cloud-rain","cloud-rain-wind","cloud-off","cloud-moon","cloud-moon-rain","cloud-lightning","cloud-hail","cloud-fog","cloud-drizzle","cloud-download","cloud-cog","cloud-check","cloud-backup","cloud-alert","closed-caption","clock","clock-plus","clock-fading","clock-check","clock-arrow-up","clock-arrow-down","clock-alert","clock-9","clock-8","clock-7","clock-6","clock-5","clock-4","clock-3","clock-2","clock-12","clock-11","clock-10","clock-1","clipboard","clipboard-x","clipboard-type","clipboard-plus","clipboard-pen","clipboard-pen-line","clipboard-paste","clipboard-minus","clipboard-list","clipboard-copy","clipboard-clock","clipboard-check","clapperboard","citrus","circuit-board","circle","circle-x","circle-user","circle-user-round","circle-stop","circle-star","circle-small","circle-slash","circle-slash-2","circle-question-mark","circle-power","circle-pound-sterling","circle-plus","circle-play","circle-pile","circle-percent","circle-pause","circle-parking","circle-parking-off","circle-off","circle-minus","circle-gauge","circle-fading-plus","circle-fading-arrow-up","circle-equal","circle-ellipsis","circle-dot","circle-dot-dashed","circle-dollar-sign","circle-divide","circle-dashed","circle-chevron-up","circle-chevron-right","circle-chevron-left","circle-chevron-down","circle-check","circle-check-big","circle-arrow-up","circle-arrow-right","circle-arrow-out-up-right","circle-arrow-out-up-left","circle-arrow-out-down-right","circle-arrow-out-down-left","circle-arrow-left","circle-arrow-down","circle-alert","cigarette","cigarette-off","church","chromium","chevrons-up","chevrons-up-down","chevrons-right","chevrons-right-left","chevrons-left","chevrons-left-right","chevrons-left-right-ellipsis","chevrons-down","chevrons-down-up","chevron-up","chevron-right","chevron-left","chevron-last","chevron-first","chevron-down","chess-rook","chess-queen","chess-pawn","chess-knight","chess-king","chess-bishop","cherry","chef-hat","check","check-line","check-check","chart-spline","chart-scatter","chart-pie","chart-no-axes-gantt","chart-no-axes-combined","chart-no-axes-column","chart-no-axes-column-increasing","chart-no-axes-column-decreasing","chart-network","chart-line","chart-gantt","chart-column","chart-column-stacked","chart-column-increasing","chart-column-decreasing","chart-column-big","chart-candlestick","chart-bar","chart-bar-stacked","chart-bar-increasing","chart-bar-decreasing","chart-bar-big","chart-area","cctv","cat","castle","cast","cassette-tape","case-upper","case-sensitive","case-lower","carrot","card-sim","caravan","car","car-taxi-front","car-front","captions","captions-off","cannabis","cannabis-off","candy","candy-off","candy-cane","camera","camera-off","calendars","calendar","calendar-x","calendar-x-2","calendar-sync","calendar-search","calendar-range","calendar-plus","calendar-plus-2","calendar-off","calendar-minus","calendar-minus-2","calendar-heart","calendar-fold","calendar-days","calendar-cog","calendar-clock","calendar-check","calendar-check-2","calendar-arrow-up","calendar-arrow-down","calendar-1","calculator","cake","cake-slice","cable","cable-car","bus","bus-front","building","building-2","bug","bug-play","bug-off","bubbles","brush","brush-cleaning","bring-to-front","briefcase","briefcase-medical","briefcase-conveyor-belt","briefcase-business","brick-wall","brick-wall-shield","brick-wall-fire","brain","brain-cog","brain-circuit","brackets","braces","boxes","box","bow-arrow","bottle-wine","bot","bot-off","bot-message-square","boom-box","bookmark","bookmark-x","bookmark-plus","bookmark-minus","bookmark-check","book","book-x","book-user","book-up","book-up-2","book-type","book-text","book-search","book-plus","book-open","book-open-text","book-open-check","book-minus","book-marked","book-lock","book-key","book-image","book-heart","book-headphones","book-down","book-dashed","book-copy","book-check","book-audio","book-alert","book-a","bone","bomb","bolt","bold","bluetooth","bluetooth-searching","bluetooth-off","bluetooth-connected","blocks","blinds","blend","bitcoin","birdhouse","bird","biohazard","binoculars","binary","bike","biceps-flexed","between-vertical-start","between-vertical-end","between-horizontal-start","between-horizontal-end","bell","bell-ring","bell-plus","bell-off","bell-minus","bell-electric","bell-dot","beer","beer-off","beef","bed","bed-single","bed-double","bean","bean-off","beaker","battery","battery-warning","battery-plus","battery-medium","battery-low","battery-full","battery-charging","bath","baseline","barrel","barcode","banknote","banknote-x","banknote-arrow-up","banknote-arrow-down","bandage","banana","ban","balloon","baggage-claim","badge","badge-x","badge-turkish-lira","badge-swiss-franc","badge-russian-ruble","badge-question-mark","badge-pound-sterling","badge-plus","badge-percent","badge-minus","badge-japanese-yen","badge-info","badge-indian-rupee","badge-euro","badge-dollar-sign","badge-check","badge-cent","badge-alert","backpack","baby","axis-3d","axe","award","audio-waveform","audio-lines","atom","at-sign","asterisk","arrows-up-from-line","arrow-up","arrow-up-z-a","arrow-up-wide-narrow","arrow-up-to-line","arrow-up-right","arrow-up-narrow-wide","arrow-up-left","arrow-up-from-line","arrow-up-from-dot","arrow-up-down","arrow-up-a-z","arrow-up-1-0","arrow-up-0-1","arrow-right","arrow-right-to-line","arrow-right-left","arrow-right-from-line","arrow-left","arrow-left-to-line","arrow-left-right","arrow-left-from-line","arrow-down","arrow-down-z-a","arrow-down-wide-narrow","arrow-down-up","arrow-down-to-line","arrow-down-to-dot","arrow-down-right","arrow-down-narrow-wide","arrow-down-left","arrow-down-from-line","arrow-down-a-z","arrow-down-1-0","arrow-down-0-1","arrow-big-up","arrow-big-up-dash","arrow-big-right","arrow-big-right-dash","arrow-big-left","arrow-big-left-dash","arrow-big-down","arrow-big-down-dash","armchair","archive","archive-x","archive-restore","apple","app-window","app-window-mac","aperture","anvil","antenna","annoyed","angry","anchor","amphora","ampersands","ampersand","ambulance","align-vertical-space-between","align-vertical-space-around","align-vertical-justify-start","align-vertical-justify-end","align-vertical-justify-center","align-vertical-distribute-start","align-vertical-distribute-end","align-vertical-distribute-center","align-start-vertical","align-start-horizontal","align-horizontal-space-between","align-horizontal-space-around","align-horizontal-justify-start","align-horizontal-justify-end","align-horizontal-justify-center","align-horizontal-distribute-start","align-horizontal-distribute-end","align-horizontal-distribute-center","align-end-vertical","align-end-horizontal","align-center-vertical","align-center-horizontal","album","alarm-smoke","alarm-clock","alarm-clock-plus","alarm-clock-off","alarm-clock-minus","alarm-clock-check","airplay","air-vent","activity","accessibility","a-large-small","a-arrow-up","a-arrow-down"],si=e=>{const{value:o,defaultValue:t,onChange:n,isOpen:a,onOpen:i,onClose:s,closeOnSelect:c=!0}=e,[d,u]=p.useState(a??!1),[m,g]=p.useState(o??t),[h,f]=p.useState(""),y=p.useRef(null),k=p.useRef(null);p.useEffect(()=>{o!==void 0&&g(o)},[o]),p.useEffect(()=>{a!==void 0&&u(a)},[a]);const b=p.useMemo(()=>h?aa.filter(x=>x.toLowerCase().includes(h.toLowerCase())).slice(0,100):aa.slice(0,100),[h]);p.useEffect(()=>{const x=v=>{d&&y.current&&k.current&&!y.current.contains(v.target)&&!k.current.contains(v.target)&&C()};if(typeof(document==null?void 0:document.addEventListener)=="function")return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[d]);const C=p.useCallback(()=>{a===void 0&&u(!1),s&&s()},[s,a]),S=p.useCallback(()=>{const x=!d;a===void 0&&u(x),x?(i&&i(),f("")):s&&s()},[d,i,s,a]),w=p.useCallback(x=>{o===void 0&&g(x),n&&n(x),c&&C()},[n,c,C,o]),j=p.useCallback(x=>{f(x)},[]);return{isOpen:d,selectedIcon:m,searchQuery:h,filteredIcons:b,handleToggle:S,handleIconSelect:w,handleSearchChange:j,handleClose:C,triggerRef:y,dropdownRef:k}},vo={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out"},dropdown:{position:"absolute",mixBlendMode:"normal",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"280px",maxHeight:"320px",overflow:"hidden",display:"flex",flexDirection:"column"},searchInput:{marginBottom:"12px",flexShrink:0},iconGrid:{display:"grid",gridTemplateColumns:"repeat(6, 1fr)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"8px",overflowY:"auto",padding:"4px",color:"color-black",flexGrow:1},iconItem:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRadius:8,transition:"all 0.2s ease-in-out"}},jf={xs:{height:"28px",fontSize:"12px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"14px",padding:"10px 14px"},xl:{height:"56px",fontSize:"16px",padding:"12px 16px"}},wf={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},vf={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},ci=({label:e,placeholder:o="Select an icon",helperText:t,views:n={},size:a="md",shape:i="default",variant:s="default",error:c=!1,isDisabled:d=!1,isReadOnly:u=!1,showSearch:m=!0,isOpen:g,selectedIcon:h,searchQuery:f,filteredIcons:y,handleToggle:k,handleIconSelect:b,handleSearchChange:C,triggerRef:S,dropdownRef:w,handleClose:j,onChange:x,value:v,defaultValue:T,onOpen:F,onClose:M,closeOnSelect:E,...I})=>{const{getColor:V}=l.useTheme(),H={...vo.container,...n==null?void 0:n.container},z={...vo.trigger,...jf[a],...wf[i],...vf[s],...c&&{borderColor:"color-red-500"},...d&&{opacity:.6,cursor:"not-allowed"},...!d&&!u&&{_hover:{borderColor:"color-gray-300"}},...n==null?void 0:n.trigger},P={...vo.dropdown,...n==null?void 0:n.dropdown},R={...vo.iconGrid,...n==null?void 0:n.iconGrid};return r.jsxs(l.View,{...H,...I,children:[e&&r.jsx(l.Text,{fontSize:a==="xs"?"12px":a==="sm"?"14px":"16px",fontWeight:"500",color:"color-gray-700",marginBottom:"4px",...n==null?void 0:n.label,children:e}),r.jsxs(l.View,{ref:S,onClick:d||u?void 0:k,...z,children:[r.jsx(l.Horizontal,{alignItems:"center",gap:8,width:"100%",children:h?r.jsxs(l.Horizontal,{alignItems:"center",gap:8,width:"100%",children:[r.jsx(zr,{name:h,widthHeight:16}),r.jsx(l.Text,{color:"color-gray-800",fontSize:"inherit",style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h})]}):r.jsx(l.Text,{color:"color-gray-500",fontSize:"inherit",children:o})}),!u&&!d&&r.jsx(de,{widthHeight:16,color:"color-gray-500",orientation:g?"up":"down"})]}),g&&r.jsxs(l.View,{ref:w,...P,children:[m&&r.jsx(l.View,{...vo.searchInput,...n==null?void 0:n.searchInput,children:r.jsx(Fe,{placeholder:"Search icons...",value:f,onChange:W=>C(W),size:"sm",autoFocus:!0})}),r.jsx(l.View,{...R,children:y.length>0?y.map(W=>r.jsx(l.View,{...vo.iconItem,onClick:()=>b(W),title:W,_hover:{backgroundColor:"color-gray-50",transform:"scale(1.05)"},backgroundColor:h===W?"#EFF6FF":"transparent",borderWidth:h===W?"1px":"0px",borderStyle:"solid",borderColor:h===W?"#BFDBFE":"transparent",...n==null?void 0:n.iconItem,children:r.jsx(zr,{name:W,widthHeight:20})},W)):r.jsx(l.View,{gridColumn:"1 / -1",padding:"20px",textAlign:"center",color:"color-gray-500",children:r.jsx(l.Text,{fontSize:"14px",children:"No icons found"})})})]}),t&&r.jsx(l.Text,{color:c?"color-red-500":"color-gray-600",marginTop:"4px",...n==null?void 0:n.helperText,children:t})]})},Tf=e=>{const o=xe(e),t={...e,value:o.value??e.value??e.defaultValue},n=si(t),a=i=>{n.handleIconSelect(i),o.onChange(i)};return r.jsx(ci,{...n,...t,handleIconSelect:a})},If=Tf,Qe={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out"},dropdown:{position:"absolute",mixBlendMode:"normal",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"320px",maxHeight:"400px",overflow:"hidden"},searchInput:{marginBottom:"12px"},categoryTabs:{display:"flex",flexDirection:"row",flexWrap:"wrap",borderBottom:"1px solid color-gray-100",marginBottom:"12px",overflowX:"auto"},categoryTab:{padding:"8px 12px",cursor:"pointer",borderBottom:"2px solid transparent",transition:"all 0.2s ease-in-out",fontSize:"14px",fontWeight:"500",color:"color-gray-600",whiteSpace:"nowrap",borderRadius:"8px 8px 0 0"},emojiGrid:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"4px",maxHeight:"240px",overflowY:"auto",padding:"4px",color:"color-black"},emoji:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRadius:6,fontSize:"20px",transition:"all 0.2s ease-in-out"}},Rf={xs:{height:"28px",fontSize:"12px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"14px",padding:"10px 14px"},xl:{height:"56px",fontSize:"16px",padding:"12px 16px"}},Ff={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},zf={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Mf={recent:"🕒",smileys:"😀",people:"👤",animals:"🐶",food:"🍎",activities:"⚽",travel:"🚗",objects:"💡",symbols:"❤️",flags:"🏁"},Wf=[{emoji:"😀",name:"grinning face",category:"smileys",keywords:["happy","smile","grin"]},{emoji:"😃",name:"grinning face with big eyes",category:"smileys",keywords:["happy","smile","joy"]},{emoji:"😄",name:"grinning face with smiling eyes",category:"smileys",keywords:["happy","smile","joy"]},{emoji:"😁",name:"beaming face with smiling eyes",category:"smileys",keywords:["happy","smile","grin"]},{emoji:"😆",name:"grinning squinting face",category:"smileys",keywords:["happy","laugh","smile"]},{emoji:"😅",name:"grinning face with sweat",category:"smileys",keywords:["happy","sweat","relief"]},{emoji:"🤣",name:"rolling on the floor laughing",category:"smileys",keywords:["laugh","funny","rofl"]},{emoji:"😂",name:"face with tears of joy",category:"smileys",keywords:["laugh","cry","joy"]},{emoji:"🙂",name:"slightly smiling face",category:"smileys",keywords:["smile","happy"]},{emoji:"🙃",name:"upside-down face",category:"smileys",keywords:["silly","upside down"]},{emoji:"😉",name:"winking face",category:"smileys",keywords:["wink","flirt"]},{emoji:"😊",name:"smiling face with smiling eyes",category:"smileys",keywords:["happy","smile","blush"]},{emoji:"😇",name:"smiling face with halo",category:"smileys",keywords:["angel","innocent"]},{emoji:"🥰",name:"smiling face with hearts",category:"smileys",keywords:["love","hearts","adore"]},{emoji:"😍",name:"smiling face with heart-eyes",category:"smileys",keywords:["love","heart","eyes"]},{emoji:"🤩",name:"star-struck",category:"smileys",keywords:["star","struck","amazed"]},{emoji:"😘",name:"face blowing a kiss",category:"smileys",keywords:["kiss","love","flirt"]},{emoji:"😗",name:"kissing face",category:"smileys",keywords:["kiss","love"]},{emoji:"☺️",name:"smiling face",category:"smileys",keywords:["smile","happy","content"]},{emoji:"😚",name:"kissing face with closed eyes",category:"smileys",keywords:["kiss","love","closed eyes"]},{emoji:"😙",name:"kissing face with smiling eyes",category:"smileys",keywords:["kiss","love","smile"]},{emoji:"🥲",name:"smiling face with tear",category:"smileys",keywords:["happy","cry","tear","bittersweet"]},{emoji:"😋",name:"face savoring food",category:"smileys",keywords:["yum","delicious","food"]},{emoji:"😛",name:"face with tongue",category:"smileys",keywords:["tongue","silly","playful"]},{emoji:"😜",name:"winking face with tongue",category:"smileys",keywords:["wink","tongue","silly"]},{emoji:"🤪",name:"zany face",category:"smileys",keywords:["crazy","silly","wild"]},{emoji:"😝",name:"squinting face with tongue",category:"smileys",keywords:["tongue","silly","playful"]},{emoji:"🤑",name:"money-mouth face",category:"smileys",keywords:["money","rich","greedy"]},{emoji:"🤗",name:"hugging face",category:"smileys",keywords:["hug","love","care"]},{emoji:"🤭",name:"face with hand over mouth",category:"smileys",keywords:["oops","secret","quiet"]},{emoji:"🫢",name:"face with open eyes and hand over mouth",category:"smileys",keywords:["surprise","shock","oops"]},{emoji:"🫣",name:"face with peeking eye",category:"smileys",keywords:["peek","shy","embarrassed"]},{emoji:"🤫",name:"shushing face",category:"smileys",keywords:["quiet","secret","shh"]},{emoji:"🤔",name:"thinking face",category:"smileys",keywords:["think","consider","hmm"]},{emoji:"🫡",name:"saluting face",category:"smileys",keywords:["salute","respect","military"]},{emoji:"🤐",name:"zipper-mouth face",category:"smileys",keywords:["quiet","secret","zip"]},{emoji:"🤨",name:"face with raised eyebrow",category:"smileys",keywords:["suspicious","doubt","skeptical"]},{emoji:"😐",name:"neutral face",category:"smileys",keywords:["neutral","meh","blank"]},{emoji:"😑",name:"expressionless face",category:"smileys",keywords:["blank","deadpan","meh"]},{emoji:"😶",name:"face without mouth",category:"smileys",keywords:["quiet","speechless","silent"]},{emoji:"🫥",name:"dotted line face",category:"smileys",keywords:["invisible","depressed","disappear"]},{emoji:"😏",name:"smirking face",category:"smileys",keywords:["smirk","smug","confident"]},{emoji:"😒",name:"unamused face",category:"smileys",keywords:["unamused","bored","annoyed"]},{emoji:"🙄",name:"face with rolling eyes",category:"smileys",keywords:["eye roll","annoyed","whatever"]},{emoji:"😬",name:"grimacing face",category:"smileys",keywords:["grimace","awkward","oops"]},{emoji:"😮‍💨",name:"face exhaling",category:"smileys",keywords:["sigh","relief","tired"]},{emoji:"🤥",name:"lying face",category:"smileys",keywords:["lie","pinocchio","dishonest"]},{emoji:"😌",name:"relieved face",category:"smileys",keywords:["relief","calm","peaceful"]},{emoji:"😔",name:"pensive face",category:"smileys",keywords:["sad","thoughtful","pensive"]},{emoji:"😪",name:"sleepy face",category:"smileys",keywords:["sleepy","tired","drowsy"]},{emoji:"🤤",name:"drooling face",category:"smileys",keywords:["drool","desire","sleep"]},{emoji:"😴",name:"sleeping face",category:"smileys",keywords:["sleep","tired","zzz"]},{emoji:"😷",name:"face with medical mask",category:"smileys",keywords:["mask","sick","doctor"]},{emoji:"🤒",name:"face with thermometer",category:"smileys",keywords:["sick","fever","ill"]},{emoji:"🤕",name:"face with head-bandage",category:"smileys",keywords:["hurt","injured","bandage"]},{emoji:"🤢",name:"nauseated face",category:"smileys",keywords:["sick","nausea","disgusted"]},{emoji:"🤮",name:"face vomiting",category:"smileys",keywords:["vomit","sick","disgusted"]},{emoji:"🤧",name:"sneezing face",category:"smileys",keywords:["sneeze","sick","gesundheit"]},{emoji:"🥵",name:"hot face",category:"smileys",keywords:["hot","heat","sweat"]},{emoji:"🥶",name:"cold face",category:"smileys",keywords:["cold","freeze","blue"]},{emoji:"🥴",name:"woozy face",category:"smileys",keywords:["dizzy","drunk","confused"]},{emoji:"😵",name:"dizzy face",category:"smileys",keywords:["dizzy","confused","knocked out"]},{emoji:"😵‍💫",name:"face with spiral eyes",category:"smileys",keywords:["dizzy","hypnotized","confused"]},{emoji:"🤯",name:"exploding head",category:"smileys",keywords:["mind blown","shocked","amazed"]},{emoji:"🤠",name:"cowboy hat face",category:"smileys",keywords:["cowboy","hat","western"]},{emoji:"🥳",name:"partying face",category:"smileys",keywords:["party","celebration","birthday"]},{emoji:"🥸",name:"disguised face",category:"smileys",keywords:["disguise","glasses","incognito"]},{emoji:"😎",name:"smiling face with sunglasses",category:"smileys",keywords:["cool","sunglasses","awesome"]},{emoji:"🤓",name:"nerd face",category:"smileys",keywords:["nerd","geek","smart"]},{emoji:"🧐",name:"face with monocle",category:"smileys",keywords:["monocle","fancy","inspection"]},{emoji:"👋",name:"waving hand",category:"people",keywords:["wave","hello","goodbye"]},{emoji:"🤚",name:"raised back of hand",category:"people",keywords:["hand","stop"]},{emoji:"🖐️",name:"hand with fingers splayed",category:"people",keywords:["hand","five"]},{emoji:"✋",name:"raised hand",category:"people",keywords:["hand","stop","high five"]},{emoji:"🖖",name:"vulcan salute",category:"people",keywords:["spock","vulcan"]},{emoji:"👌",name:"OK hand",category:"people",keywords:["ok","perfect"]},{emoji:"🤌",name:"pinched fingers",category:"people",keywords:["italian","chef kiss"]},{emoji:"🤏",name:"pinching hand",category:"people",keywords:["small","tiny"]},{emoji:"✌️",name:"victory hand",category:"people",keywords:["peace","victory"]},{emoji:"🤞",name:"crossed fingers",category:"people",keywords:["luck","hope"]},{emoji:"🤟",name:"love-you gesture",category:"people",keywords:["love","you"]},{emoji:"🤘",name:"sign of the horns",category:"people",keywords:["rock","metal"]},{emoji:"🤙",name:"call me hand",category:"people",keywords:["call","phone"]},{emoji:"👈",name:"backhand index pointing left",category:"people",keywords:["point","left"]},{emoji:"👉",name:"backhand index pointing right",category:"people",keywords:["point","right"]},{emoji:"👆",name:"backhand index pointing up",category:"people",keywords:["point","up"]},{emoji:"🖕",name:"middle finger",category:"people",keywords:["middle finger","rude"]},{emoji:"👇",name:"backhand index pointing down",category:"people",keywords:["point","down"]},{emoji:"☝️",name:"index pointing up",category:"people",keywords:["point","up","one"]},{emoji:"👍",name:"thumbs up",category:"people",keywords:["thumbs up","good","yes"]},{emoji:"👎",name:"thumbs down",category:"people",keywords:["thumbs down","bad","no"]},{emoji:"✊",name:"raised fist",category:"people",keywords:["fist","power","solidarity"]},{emoji:"👊",name:"oncoming fist",category:"people",keywords:["fist","punch","bump"]},{emoji:"🤛",name:"left-facing fist",category:"people",keywords:["fist","bump","left"]},{emoji:"🤜",name:"right-facing fist",category:"people",keywords:["fist","bump","right"]},{emoji:"👏",name:"clapping hands",category:"people",keywords:["clap","applause","bravo"]},{emoji:"🙌",name:"raising hands",category:"people",keywords:["celebration","hooray","praise"]},{emoji:"👐",name:"open hands",category:"people",keywords:["open","hug","jazz hands"]},{emoji:"🤲",name:"palms up together",category:"people",keywords:["prayer","please","hope"]},{emoji:"🤝",name:"handshake",category:"people",keywords:["handshake","deal","agreement"]},{emoji:"🙏",name:"folded hands",category:"people",keywords:["prayer","thanks","please"]},{emoji:"✍️",name:"writing hand",category:"people",keywords:["write","author","signature"]},{emoji:"💅",name:"nail polish",category:"people",keywords:["nails","beauty","manicure"]},{emoji:"🤳",name:"selfie",category:"people",keywords:["selfie","camera","phone"]},{emoji:"💪",name:"flexed biceps",category:"people",keywords:["muscle","strong","flex"]},{emoji:"🦾",name:"mechanical arm",category:"people",keywords:["robot","prosthetic","cyborg"]},{emoji:"🦿",name:"mechanical leg",category:"people",keywords:["robot","prosthetic","cyborg"]},{emoji:"🦵",name:"leg",category:"people",keywords:["leg","limb","kick"]},{emoji:"🦶",name:"foot",category:"people",keywords:["foot","kick","stomp"]},{emoji:"👂",name:"ear",category:"people",keywords:["ear","hear","listen"]},{emoji:"🦻",name:"ear with hearing aid",category:"people",keywords:["hearing aid","deaf","accessibility"]},{emoji:"👃",name:"nose",category:"people",keywords:["nose","smell","sniff"]},{emoji:"🧠",name:"brain",category:"people",keywords:["brain","smart","think"]},{emoji:"🫀",name:"anatomical heart",category:"people",keywords:["heart","organ","love"]},{emoji:"🫁",name:"lungs",category:"people",keywords:["lungs","breathe","organ"]},{emoji:"🦷",name:"tooth",category:"people",keywords:["tooth","dental","smile"]},{emoji:"🦴",name:"bone",category:"people",keywords:["bone","skeleton","dog"]},{emoji:"👀",name:"eyes",category:"people",keywords:["eyes","look","see"]},{emoji:"👁️",name:"eye",category:"people",keywords:["eye","see","watch"]},{emoji:"👅",name:"tongue",category:"people",keywords:["tongue","taste","lick"]},{emoji:"👄",name:"mouth",category:"people",keywords:["mouth","lips","kiss"]},{emoji:"🫦",name:"biting lip",category:"people",keywords:["lip","bite","nervous"]},{emoji:"👶",name:"baby",category:"people",keywords:["baby","infant","child"]},{emoji:"🧒",name:"child",category:"people",keywords:["child","kid","young"]},{emoji:"👦",name:"boy",category:"people",keywords:["boy","child","male"]},{emoji:"👧",name:"girl",category:"people",keywords:["girl","child","female"]},{emoji:"🧑",name:"person",category:"people",keywords:["person","adult","human"]},{emoji:"👱",name:"person: blond hair",category:"people",keywords:["blond","hair","person"]},{emoji:"👨",name:"man",category:"people",keywords:["man","male","adult"]},{emoji:"🧔",name:"person: beard",category:"people",keywords:["beard","man","facial hair"]},{emoji:"👩",name:"woman",category:"people",keywords:["woman","female","adult"]},{emoji:"🧓",name:"older person",category:"people",keywords:["old","elderly","senior"]},{emoji:"👴",name:"old man",category:"people",keywords:["old","man","elderly"]},{emoji:"👵",name:"old woman",category:"people",keywords:["old","woman","elderly"]},{emoji:"🐶",name:"dog face",category:"animals",keywords:["dog","pet","animal"]},{emoji:"🐱",name:"cat face",category:"animals",keywords:["cat","pet","animal"]},{emoji:"🐭",name:"mouse face",category:"animals",keywords:["mouse","animal"]},{emoji:"🐹",name:"hamster",category:"animals",keywords:["hamster","pet"]},{emoji:"🐰",name:"rabbit face",category:"animals",keywords:["rabbit","bunny"]},{emoji:"🦊",name:"fox",category:"animals",keywords:["fox","animal"]},{emoji:"🐻",name:"bear",category:"animals",keywords:["bear","animal"]},{emoji:"🐼",name:"panda",category:"animals",keywords:["panda","bear"]},{emoji:"🐨",name:"koala",category:"animals",keywords:["koala","australia","marsupial"]},{emoji:"🐯",name:"tiger face",category:"animals",keywords:["tiger","cat","wild"]},{emoji:"🦁",name:"lion",category:"animals",keywords:["lion","king","cat"]},{emoji:"🐮",name:"cow face",category:"animals",keywords:["cow","moo","farm"]},{emoji:"🐷",name:"pig face",category:"animals",keywords:["pig","oink","farm"]},{emoji:"🐽",name:"pig nose",category:"animals",keywords:["pig","nose","snout"]},{emoji:"🐸",name:"frog",category:"animals",keywords:["frog","amphibian","green"]},{emoji:"🐵",name:"monkey face",category:"animals",keywords:["monkey","primate","banana"]},{emoji:"🙈",name:"see-no-evil monkey",category:"animals",keywords:["monkey","see no evil","eyes"]},{emoji:"🙉",name:"hear-no-evil monkey",category:"animals",keywords:["monkey","hear no evil","ears"]},{emoji:"🙊",name:"speak-no-evil monkey",category:"animals",keywords:["monkey","speak no evil","mouth"]},{emoji:"🐒",name:"monkey",category:"animals",keywords:["monkey","primate","zoo"]},{emoji:"🦍",name:"gorilla",category:"animals",keywords:["gorilla","ape","strong"]},{emoji:"🦧",name:"orangutan",category:"animals",keywords:["orangutan","ape","orange"]},{emoji:"🐺",name:"wolf",category:"animals",keywords:["wolf","howl","wild"]},{emoji:"🐗",name:"boar",category:"animals",keywords:["boar","pig","wild"]},{emoji:"🐴",name:"horse face",category:"animals",keywords:["horse","neigh","ride"]},{emoji:"🐎",name:"horse",category:"animals",keywords:["horse","racing","gallop"]},{emoji:"🦄",name:"unicorn",category:"animals",keywords:["unicorn","magical","horn"]},{emoji:"🦓",name:"zebra",category:"animals",keywords:["zebra","stripes","africa"]},{emoji:"🦌",name:"deer",category:"animals",keywords:["deer","antlers","forest"]},{emoji:"🦏",name:"rhinoceros",category:"animals",keywords:["rhino","horn","africa"]},{emoji:"🦛",name:"hippopotamus",category:"animals",keywords:["hippo","water","africa"]},{emoji:"🐘",name:"elephant",category:"animals",keywords:["elephant","trunk","memory"]},{emoji:"🦒",name:"giraffe",category:"animals",keywords:["giraffe","tall","neck"]},{emoji:"🦘",name:"kangaroo",category:"animals",keywords:["kangaroo","hop","australia"]},{emoji:"🦥",name:"sloth",category:"animals",keywords:["sloth","slow","lazy"]},{emoji:"🦦",name:"otter",category:"animals",keywords:["otter","water","cute"]},{emoji:"🦨",name:"skunk",category:"animals",keywords:["skunk","smell","stripe"]},{emoji:"🦡",name:"badger",category:"animals",keywords:["badger","honey","dig"]},{emoji:"🐾",name:"paw prints",category:"animals",keywords:["paw","prints","tracks"]},{emoji:"🐔",name:"chicken",category:"animals",keywords:["chicken","rooster","farm"]},{emoji:"🐓",name:"rooster",category:"animals",keywords:["rooster","cock","morning"]},{emoji:"🐣",name:"hatching chick",category:"animals",keywords:["chick","hatching","egg"]},{emoji:"🐤",name:"baby chick",category:"animals",keywords:["chick","baby","yellow"]},{emoji:"🐥",name:"front-facing baby chick",category:"animals",keywords:["chick","baby","cute"]},{emoji:"🦆",name:"duck",category:"animals",keywords:["duck","quack","water"]},{emoji:"🦅",name:"eagle",category:"animals",keywords:["eagle","bird","freedom"]},{emoji:"🦉",name:"owl",category:"animals",keywords:["owl","wise","night"]},{emoji:"🦇",name:"bat",category:"animals",keywords:["bat","vampire","night"]},{emoji:"",name:"bug",category:"animals",keywords:["bug","insect","crawl"]},{emoji:"🦋",name:"butterfly",category:"animals",keywords:["butterfly","beautiful","fly"]},{emoji:"🐌",name:"snail",category:"animals",keywords:["snail","slow","shell"]},{emoji:"🐞",name:"lady beetle",category:"animals",keywords:["ladybug","beetle","red"]},{emoji:"🐜",name:"ant",category:"animals",keywords:["ant","work","colony"]},{emoji:"🦟",name:"mosquito",category:"animals",keywords:["mosquito","bite","buzz"]},{emoji:"🕷️",name:"spider",category:"animals",keywords:["spider","web","eight legs"]},{emoji:"🦂",name:"scorpion",category:"animals",keywords:["scorpion","sting","desert"]},{emoji:"🐢",name:"turtle",category:"animals",keywords:["turtle","slow","shell"]},{emoji:"🐍",name:"snake",category:"animals",keywords:["snake","slither","reptile"]},{emoji:"🦎",name:"lizard",category:"animals",keywords:["lizard","gecko","reptile"]},{emoji:"🐙",name:"octopus",category:"animals",keywords:["octopus","tentacles","sea"]},{emoji:"🦑",name:"squid",category:"animals",keywords:["squid","tentacles","ocean"]},{emoji:"🦐",name:"shrimp",category:"animals",keywords:["shrimp","seafood","small"]},{emoji:"🦞",name:"lobster",category:"animals",keywords:["lobster","claws","red"]},{emoji:"🦀",name:"crab",category:"animals",keywords:["crab","claws","beach"]},{emoji:"🐡",name:"blowfish",category:"animals",keywords:["blowfish","puffer","spiky"]},{emoji:"🐠",name:"tropical fish",category:"animals",keywords:["fish","tropical","colorful"]},{emoji:"🐟",name:"fish",category:"animals",keywords:["fish","swim","water"]},{emoji:"🐬",name:"dolphin",category:"animals",keywords:["dolphin","smart","ocean"]},{emoji:"🐳",name:"spouting whale",category:"animals",keywords:["whale","spout","big"]},{emoji:"🐋",name:"whale",category:"animals",keywords:["whale","ocean","huge"]},{emoji:"🦈",name:"shark",category:"animals",keywords:["shark","teeth","dangerous"]},{emoji:"🐊",name:"crocodile",category:"animals",keywords:["crocodile","teeth","swamp"]},{emoji:"🌸",name:"cherry blossom",category:"animals",keywords:["flower","spring","pink"]},{emoji:"💐",name:"bouquet",category:"animals",keywords:["flowers","bouquet","gift"]},{emoji:"🌺",name:"hibiscus",category:"animals",keywords:["flower","tropical","red"]},{emoji:"🌻",name:"sunflower",category:"animals",keywords:["sunflower","yellow","big"]},{emoji:"🌹",name:"rose",category:"animals",keywords:["rose","love","red"]},{emoji:"🥀",name:"wilted flower",category:"animals",keywords:["flower","wilted","sad"]},{emoji:"🌷",name:"tulip",category:"animals",keywords:["tulip","spring","netherlands"]},{emoji:"🌼",name:"daisy",category:"animals",keywords:["daisy","white","simple"]},{emoji:"🌱",name:"seedling",category:"animals",keywords:["plant","grow","green"]},{emoji:"🌿",name:"herb",category:"animals",keywords:["herb","green","leaf"]},{emoji:"🍀",name:"four leaf clover",category:"animals",keywords:["clover","luck","green"]},{emoji:"🌳",name:"deciduous tree",category:"animals",keywords:["tree","nature","green"]},{emoji:"🌲",name:"evergreen tree",category:"animals",keywords:["tree","pine","christmas"]},{emoji:"🌴",name:"palm tree",category:"animals",keywords:["palm","tropical","beach"]},{emoji:"🌵",name:"cactus",category:"animals",keywords:["cactus","desert","spiky"]},{emoji:"🍎",name:"red apple",category:"food",keywords:["apple","fruit"]},{emoji:"🍊",name:"tangerine",category:"food",keywords:["orange","fruit"]},{emoji:"🍋",name:"lemon",category:"food",keywords:["lemon","fruit"]},{emoji:"🍌",name:"banana",category:"food",keywords:["banana","fruit"]},{emoji:"🍉",name:"watermelon",category:"food",keywords:["watermelon","fruit"]},{emoji:"🍇",name:"grapes",category:"food",keywords:["grapes","fruit"]},{emoji:"🍓",name:"strawberry",category:"food",keywords:["strawberry","fruit"]},{emoji:"🫐",name:"blueberries",category:"food",keywords:["blueberry","fruit"]},{emoji:"🥝",name:"kiwi fruit",category:"food",keywords:["kiwi","fruit","green"]},{emoji:"🍅",name:"tomato",category:"food",keywords:["tomato","red","vegetable"]},{emoji:"🫒",name:"olive",category:"food",keywords:["olive","green","oil"]},{emoji:"🥥",name:"coconut",category:"food",keywords:["coconut","tropical","milk"]},{emoji:"🥑",name:"avocado",category:"food",keywords:["avocado","green","healthy"]},{emoji:"🍆",name:"eggplant",category:"food",keywords:["eggplant","purple","vegetable"]},{emoji:"🥔",name:"potato",category:"food",keywords:["potato","vegetable","starch"]},{emoji:"🥕",name:"carrot",category:"food",keywords:["carrot","orange","vegetable"]},{emoji:"🌽",name:"ear of corn",category:"food",keywords:["corn","yellow","vegetable"]},{emoji:"🌶️",name:"hot pepper",category:"food",keywords:["pepper","hot","spicy"]},{emoji:"🫑",name:"bell pepper",category:"food",keywords:["pepper","bell","vegetable"]},{emoji:"🥒",name:"cucumber",category:"food",keywords:["cucumber","green","vegetable"]},{emoji:"🥬",name:"leafy greens",category:"food",keywords:["lettuce","greens","salad"]},{emoji:"🥦",name:"broccoli",category:"food",keywords:["broccoli","green","vegetable"]},{emoji:"🧄",name:"garlic",category:"food",keywords:["garlic","flavor","cooking"]},{emoji:"🧅",name:"onion",category:"food",keywords:["onion","cry","cooking"]},{emoji:"🍄",name:"mushroom",category:"food",keywords:["mushroom","fungi","cooking"]},{emoji:"🥜",name:"peanuts",category:"food",keywords:["peanuts","nuts","snack"]},{emoji:"🌰",name:"chestnut",category:"food",keywords:["chestnut","nut","autumn"]},{emoji:"🍞",name:"bread",category:"food",keywords:["bread","loaf","carbs"]},{emoji:"🥐",name:"croissant",category:"food",keywords:["croissant","french","pastry"]},{emoji:"🥖",name:"baguette bread",category:"food",keywords:["baguette","french","bread"]},{emoji:"🫓",name:"flatbread",category:"food",keywords:["flatbread","bread","thin"]},{emoji:"🥨",name:"pretzel",category:"food",keywords:["pretzel","twisted","snack"]},{emoji:"🥯",name:"bagel",category:"food",keywords:["bagel","round","breakfast"]},{emoji:"🥞",name:"pancakes",category:"food",keywords:["pancakes","breakfast","syrup"]},{emoji:"🧇",name:"waffle",category:"food",keywords:["waffle","breakfast","squares"]},{emoji:"🧀",name:"cheese wedge",category:"food",keywords:["cheese","dairy","yellow"]},{emoji:"🍖",name:"meat on bone",category:"food",keywords:["meat","bone","protein"]},{emoji:"🍗",name:"poultry leg",category:"food",keywords:["chicken","leg","meat"]},{emoji:"🥩",name:"cut of meat",category:"food",keywords:["steak","meat","red"]},{emoji:"🥓",name:"bacon",category:"food",keywords:["bacon","pork","breakfast"]},{emoji:"🍔",name:"hamburger",category:"food",keywords:["burger","hamburger","fast food"]},{emoji:"🍟",name:"french fries",category:"food",keywords:["fries","potato","fast food"]},{emoji:"🍕",name:"pizza",category:"food",keywords:["pizza","slice","italian"]},{emoji:"🌭",name:"hot dog",category:"food",keywords:["hot dog","sausage","fast food"]},{emoji:"🥪",name:"sandwich",category:"food",keywords:["sandwich","bread","lunch"]},{emoji:"🌮",name:"taco",category:"food",keywords:["taco","mexican","shell"]},{emoji:"🌯",name:"burrito",category:"food",keywords:["burrito","wrap","mexican"]},{emoji:"🫔",name:"tamale",category:"food",keywords:["tamale","mexican","corn"]},{emoji:"🥙",name:"stuffed flatbread",category:"food",keywords:["pita","flatbread","stuffed"]},{emoji:"🧆",name:"falafel",category:"food",keywords:["falafel","middle eastern","chickpea"]},{emoji:"🥚",name:"egg",category:"food",keywords:["egg","protein","breakfast"]},{emoji:"🍳",name:"cooking",category:"food",keywords:["cooking","frying pan","egg"]},{emoji:"🥘",name:"shallow pan of food",category:"food",keywords:["paella","pan","cooking"]},{emoji:"🍲",name:"pot of food",category:"food",keywords:["stew","pot","cooking"]},{emoji:"🫕",name:"fondue",category:"food",keywords:["fondue","cheese","pot"]},{emoji:"🥣",name:"bowl with spoon",category:"food",keywords:["bowl","cereal","soup"]},{emoji:"🥗",name:"green salad",category:"food",keywords:["salad","healthy","greens"]},{emoji:"🍿",name:"popcorn",category:"food",keywords:["popcorn","movie","snack"]},{emoji:"🧈",name:"butter",category:"food",keywords:["butter","dairy","spread"]},{emoji:"🧂",name:"salt",category:"food",keywords:["salt","seasoning","white"]},{emoji:"🥫",name:"canned food",category:"food",keywords:["can","canned","preserved"]},{emoji:"🍱",name:"bento box",category:"food",keywords:["bento","japanese","lunch box"]},{emoji:"🍘",name:"rice cracker",category:"food",keywords:["rice","cracker","japanese"]},{emoji:"🍙",name:"rice ball",category:"food",keywords:["rice ball","onigiri","japanese"]},{emoji:"🍚",name:"cooked rice",category:"food",keywords:["rice","cooked","bowl"]},{emoji:"🍛",name:"curry rice",category:"food",keywords:["curry","rice","spicy"]},{emoji:"🍜",name:"steaming bowl",category:"food",keywords:["ramen","noodles","soup"]},{emoji:"🍝",name:"spaghetti",category:"food",keywords:["spaghetti","pasta","italian"]},{emoji:"🍠",name:"roasted sweet potato",category:"food",keywords:["sweet potato","roasted","orange"]},{emoji:"🍢",name:"oden",category:"food",keywords:["oden","japanese","skewer"]},{emoji:"🍣",name:"sushi",category:"food",keywords:["sushi","japanese","fish"]},{emoji:"🍤",name:"fried shrimp",category:"food",keywords:["shrimp","fried","tempura"]},{emoji:"🍥",name:"fish cake with swirl",category:"food",keywords:["fish cake","japanese","swirl"]},{emoji:"🥮",name:"moon cake",category:"food",keywords:["moon cake","chinese","festival"]},{emoji:"🍡",name:"dango",category:"food",keywords:["dango","japanese","sweet"]},{emoji:"🥟",name:"dumpling",category:"food",keywords:["dumpling","chinese","steamed"]},{emoji:"🥠",name:"fortune cookie",category:"food",keywords:["fortune cookie","chinese","luck"]},{emoji:"🥡",name:"takeout box",category:"food",keywords:["takeout","chinese","box"]},{emoji:"🦀",name:"crab",category:"food",keywords:["crab","seafood","claws"]},{emoji:"🦞",name:"lobster",category:"food",keywords:["lobster","seafood","red"]},{emoji:"🦐",name:"shrimp",category:"food",keywords:["shrimp","seafood","small"]},{emoji:"🦑",name:"squid",category:"food",keywords:["squid","seafood","tentacles"]},{emoji:"🦪",name:"oyster",category:"food",keywords:["oyster","seafood","shell"]},{emoji:"🍦",name:"soft ice cream",category:"food",keywords:["ice cream","soft serve","cone"]},{emoji:"🍧",name:"shaved ice",category:"food",keywords:["shaved ice","snow cone","cold"]},{emoji:"🍨",name:"ice cream",category:"food",keywords:["ice cream","dessert","cold"]},{emoji:"🍩",name:"doughnut",category:"food",keywords:["donut","doughnut","sweet"]},{emoji:"🍪",name:"cookie",category:"food",keywords:["cookie","sweet","baked"]},{emoji:"🎂",name:"birthday cake",category:"food",keywords:["cake","birthday","celebration"]},{emoji:"🍰",name:"shortcake",category:"food",keywords:["cake","slice","dessert"]},{emoji:"🧁",name:"cupcake",category:"food",keywords:["cupcake","muffin","sweet"]},{emoji:"🥧",name:"pie",category:"food",keywords:["pie","dessert","slice"]},{emoji:"🍫",name:"chocolate bar",category:"food",keywords:["chocolate","bar","sweet"]},{emoji:"🍬",name:"candy",category:"food",keywords:["candy","sweet","wrapper"]},{emoji:"🍭",name:"lollipop",category:"food",keywords:["lollipop","candy","stick"]},{emoji:"🍮",name:"custard",category:"food",keywords:["custard","pudding","dessert"]},{emoji:"🍯",name:"honey pot",category:"food",keywords:["honey","sweet","bee"]},{emoji:"🍼",name:"baby bottle",category:"food",keywords:["bottle","baby","milk"]},{emoji:"🥛",name:"glass of milk",category:"food",keywords:["milk","glass","dairy"]},{emoji:"☕",name:"hot beverage",category:"food",keywords:["coffee","tea","hot"]},{emoji:"🫖",name:"teapot",category:"food",keywords:["teapot","tea","hot"]},{emoji:"🍵",name:"teacup without handle",category:"food",keywords:["tea","green tea","cup"]},{emoji:"🍶",name:"sake",category:"food",keywords:["sake","japanese","alcohol"]},{emoji:"🍾",name:"bottle with popping cork",category:"food",keywords:["champagne","celebration","cork"]},{emoji:"🍷",name:"wine glass",category:"food",keywords:["wine","glass","alcohol"]},{emoji:"🍸",name:"cocktail glass",category:"food",keywords:["cocktail","martini","alcohol"]},{emoji:"🍹",name:"tropical drink",category:"food",keywords:["tropical","cocktail","umbrella"]},{emoji:"🍺",name:"beer mug",category:"food",keywords:["beer","mug","alcohol"]},{emoji:"🍻",name:"clinking beer mugs",category:"food",keywords:["beer","cheers","celebration"]},{emoji:"🥂",name:"clinking glasses",category:"food",keywords:["champagne","cheers","celebration"]},{emoji:"🥃",name:"tumbler glass",category:"food",keywords:["whiskey","tumbler","alcohol"]},{emoji:"🫗",name:"pouring liquid",category:"food",keywords:["pour","liquid","drink"]},{emoji:"🥤",name:"cup with straw",category:"food",keywords:["soda","straw","drink"]},{emoji:"🧋",name:"bubble tea",category:"food",keywords:["bubble tea","boba","drink"]},{emoji:"🧃",name:"beverage box",category:"food",keywords:["juice box","drink","straw"]},{emoji:"🧉",name:"mate",category:"food",keywords:["mate","tea","south american"]},{emoji:"🧊",name:"ice",category:"food",keywords:["ice","cold","cube"]},{emoji:"⚽",name:"soccer ball",category:"activities",keywords:["soccer","football","sport"]},{emoji:"🏀",name:"basketball",category:"activities",keywords:["basketball","sport"]},{emoji:"🏈",name:"american football",category:"activities",keywords:["football","sport"]},{emoji:"⚾",name:"baseball",category:"activities",keywords:["baseball","sport"]},{emoji:"🥎",name:"softball",category:"activities",keywords:["softball","sport"]},{emoji:"🎾",name:"tennis",category:"activities",keywords:["tennis","sport"]},{emoji:"🚗",name:"automobile",category:"travel",keywords:["car","vehicle"]},{emoji:"🚕",name:"taxi",category:"travel",keywords:["taxi","car"]},{emoji:"🚙",name:"sport utility vehicle",category:"travel",keywords:["suv","car"]},{emoji:"🚌",name:"bus",category:"travel",keywords:["bus","vehicle"]},{emoji:"🚎",name:"trolleybus",category:"travel",keywords:["trolley","bus"]},{emoji:"🏎️",name:"racing car",category:"travel",keywords:["race","car","fast"]},{emoji:"💡",name:"light bulb",category:"objects",keywords:["idea","light","bulb"]},{emoji:"🔋",name:"battery",category:"objects",keywords:["battery","power"]},{emoji:"🖥️",name:"desktop computer",category:"objects",keywords:["computer","desktop"]},{emoji:"💻",name:"laptop",category:"objects",keywords:["laptop","computer"]},{emoji:"📱",name:"mobile phone",category:"objects",keywords:["phone","mobile"]},{emoji:"☎️",name:"telephone",category:"objects",keywords:["phone","telephone"]},{emoji:"❤️",name:"red heart",category:"symbols",keywords:["love","heart"]},{emoji:"🧡",name:"orange heart",category:"symbols",keywords:["love","heart"]},{emoji:"💛",name:"yellow heart",category:"symbols",keywords:["love","heart"]},{emoji:"💚",name:"green heart",category:"symbols",keywords:["love","heart"]},{emoji:"💙",name:"blue heart",category:"symbols",keywords:["love","heart"]},{emoji:"💜",name:"purple heart",category:"symbols",keywords:["love","heart"]},{emoji:"🖤",name:"black heart",category:"symbols",keywords:["love","heart"]},{emoji:"🤍",name:"white heart",category:"symbols",keywords:["love","heart"]},{emoji:"🏁",name:"chequered flag",category:"flags",keywords:["flag","race","finish"]},{emoji:"🚩",name:"triangular flag",category:"flags",keywords:["flag","warning"]},{emoji:"🏳️",name:"white flag",category:"flags",keywords:["flag","surrender"]},{emoji:"🏴",name:"black flag",category:"flags",keywords:["flag","pirate"]},{emoji:"🏳️‍🌈",name:"rainbow flag",category:"flags",keywords:["flag","rainbow","pride"]}],di=e=>{const{value:o,defaultValue:t="",onChange:n,onEmojiSelect:a,isOpen:i,onOpen:s,onClose:c,closeOnSelect:d=!0,maxRecentEmojis:u=16,showRecentEmojis:m=!0,enabledCategories:g=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],customEmojis:h=[]}=e,[f,y]=p.useState(i??!1),[k,b]=p.useState(o??t),[C,S]=p.useState(""),[w,j]=p.useState("smileys"),[x,v]=p.useState([]),T=p.useRef(null),F=p.useRef(null),M=p.useMemo(()=>[...Wf,...h],[h]),E=p.useMemo(()=>{let W=M;if(w!=="recent"?W=W.filter(D=>D.category===w):W=x,C){const D=C.toLowerCase();W=W.filter(L=>L.name.toLowerCase().includes(D)||L.keywords.some(O=>O.toLowerCase().includes(D)))}return W},[M,w,x,C]);p.useEffect(()=>{o!==void 0&&b(o)},[o]),p.useEffect(()=>{i!==void 0&&y(i)},[i]),p.useEffect(()=>{if(m&&typeof localStorage<"u"){const W=localStorage.getItem("emojiPicker-recentEmojis");if(W)try{v(JSON.parse(W))}catch{}}},[m]),p.useEffect(()=>{if(typeof(document==null?void 0:document.addEventListener)!="function")return;const W=D=>{f&&T.current&&F.current&&!T.current.contains(D.target)&&!F.current.contains(D.target)&&R()};return document.addEventListener("mousedown",W),()=>document.removeEventListener("mousedown",W)},[f]);const I=p.useCallback(W=>{m&&v(D=>{const L=D.filter($=>$.emoji!==W.emoji),O=[W,...L].slice(0,u);return typeof localStorage<"u"&&localStorage.setItem("emojiPicker-recentEmojis",JSON.stringify(O)),O})},[m,u]),V=p.useCallback(()=>{const W=!f;y(W),W?(s==null||s(),S(""),m&&x.length>0?j("recent"):j("smileys")):c==null||c()},[f,s,c,m,x.length]),H=p.useCallback(W=>{b(W.emoji),I(W),n==null||n(W.emoji),a==null||a(W),d&&(y(!1),c==null||c())},[n,a,d,c,I]),z=p.useCallback(W=>{S(W),W&&w==="recent"&&j("smileys")},[w]),P=p.useCallback(W=>{j(W),S("")},[]),R=p.useCallback(()=>{y(!1),c==null||c()},[c]);return{isOpen:f,selectedEmoji:k,recentEmojis:x,searchQuery:C,activeCategory:w,filteredEmojis:E,handleToggle:V,handleEmojiSelect:H,handleSearchChange:z,handleCategoryChange:P,handleClose:R,triggerRef:T,dropdownRef:F}},ui=({id:e,name:o,label:t,placeholder:n="Select an emoji",helperText:a,views:i={},size:s="md",shape:c="default",variant:d="default",error:u=!1,isDisabled:m=!1,isReadOnly:g=!1,showSearch:h=!0,showCategories:f=!0,showRecentEmojis:y=!0,enabledCategories:k=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],isOpen:b,selectedEmoji:C,recentEmojis:S,searchQuery:w,activeCategory:j,filteredEmojis:x,handleToggle:v,handleEmojiSelect:T,handleSearchChange:F,handleCategoryChange:M,handleClose:E,triggerRef:I,dropdownRef:V,onChange:H,onOpen:z,onClose:P,onEmojiSelect:R,customEmojis:W,closeOnSelect:D,maxRecentEmojis:L,value:O,defaultValue:$,..._})=>{const{getColor:B}=l.useTheme(),G={...Qe.container,...i==null?void 0:i.container},N={...Qe.trigger,...Rf[s],...Ff[c],...zf[d],...u&&{borderColor:"color-red-500"},...m&&{opacity:.6,cursor:"not-allowed"},...!m&&!g&&{_hover:{borderColor:"color-gray-300"}},...i==null?void 0:i.trigger},A={...Qe.dropdown,...i==null?void 0:i.dropdown},Y={...Qe.categoryTabs,...i==null?void 0:i.categoryTabs},J={...Qe.emojiGrid,...i==null?void 0:i.emojiGrid},K=k.filter(X=>X==="recent"?y&&S.length>0:!0);return r.jsxs(l.View,{...G,..._,children:[t&&r.jsx(l.Text,{fontSize:s==="xs"?"12px":s==="sm"?"14px":"16px",fontWeight:"500",color:"color-gray-700",marginBottom:"4px",...i==null?void 0:i.label,children:t}),r.jsxs(l.View,{ref:I,onClick:m||g?void 0:v,...N,children:[r.jsx(l.Horizontal,{alignItems:"center",gap:8,children:r.jsx(l.Text,{color:C?"color-gray-800":"color-gray-500",fontSize:"inherit",children:C||n})}),!g&&!m&&r.jsx(de,{widthHeight:16,color:"color-gray-500",orientation:b?"up":"down"})]}),b&&r.jsxs(l.View,{ref:V,...A,children:[h&&r.jsx(l.View,{...Qe.searchInput,...i==null?void 0:i.searchInput,children:r.jsx(Fe,{placeholder:"Search emojis...",value:w,onChange:F,size:"sm"})}),f&&r.jsx(l.View,{...Y,children:K.map(X=>r.jsx(l.View,{...Qe.categoryTab,...j===X&&{borderBottomColor:"theme-primary",color:"theme-primary",backgroundColor:"color-blue-50"},onClick:()=>M(X),title:X.charAt(0).toUpperCase()+X.slice(1),...i==null?void 0:i.categoryTab,children:Mf[X]},X))}),r.jsx(l.View,{...J,children:x.length>0?x.map((X,ee)=>r.jsx(l.View,{...Qe.emoji,onClick:()=>T(X),title:X.name,_hover:{backgroundColor:"color-gray-50",transform:"scale(1.05)"},color:"color-gray-800",...i==null?void 0:i.emoji,children:X.emoji},`${X.emoji}-${ee}`)):r.jsx(l.View,{gridColumn:"1 / -1",padding:"20px",textAlign:"center",color:"color-gray-500",children:r.jsx(l.Text,{fontSize:"14px",children:w?"No emojis found":"No emojis in this category"})})})]}),a&&r.jsx(l.Text,{color:u?"color-red-500":"color-gray-600",marginTop:"4px",...i==null?void 0:i.helperText,children:a})]})},Hf=e=>{const o=xe(e),t={...e,value:o.value??e.value??e.defaultValue},n=di(t),a=i=>{var s;n.handleEmojiSelect(i),o.onChange(i.emoji),(s=e.onEmojiSelect)==null||s.call(e,i)};return r.jsx(ui,{...n,...t,handleEmojiSelect:a})},Pf=Hf,Vf=({files:e,onRemove:o,maxHeight:t="120px",views:n={}})=>{if(e.length===0)return null;const a=p.useCallback(i=>i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`,[]);return r.jsx(l.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:t,overflowY:"auto",...n==null?void 0:n.container,children:e.map((i,s)=>{const c=i.url||"",d=i.type.startsWith("image/"),u=i.type.startsWith("video/"),m=i.type.startsWith("audio/");return r.jsx(l.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",position:"relative",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...n==null?void 0:n.item,children:r.jsxs(ve,{children:[r.jsx(ve.Trigger,{children:r.jsxs(l.View,{position:"relative",children:[d&&c&&r.jsx(l.Image,{src:c,alt:i.name,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),u&&c&&r.jsx(l.View,{as:"video",src:c,alt:i.name,controls:!1,muted:!0,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),m&&r.jsx(l.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:r.jsx(Vo,{widthHeight:24,color:"color-black"})}),!d&&!u&&!m&&r.jsx(l.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:r.jsx(po,{widthHeight:24,color:"color-black"})}),o&&r.jsx(l.Button,{position:"absolute",top:"-4px",right:"-4px",width:"20px",height:"20px",minWidth:"20px",minHeight:"20px",borderRadius:"50%",backgroundColor:"color-red-500",color:"white",fontSize:14,fontWeight:"bold",padding:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"2px solid white",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"#DC2626"},onClick:g=>{g.stopPropagation(),o(s)},"aria-label":`Remove ${i.name}`,children:"×"})]})}),r.jsxs(ve.Content,{children:[d&&c&&r.jsx(l.Image,{src:c,alt:i.name,maxWidth:"300px"}),u&&c&&r.jsx(l.View,{as:"video",src:c,controls:!0,maxWidth:"300px"}),m&&c&&r.jsx(l.View,{as:"audio",src:c,controls:!0,width:"100%"}),r.jsxs(l.Text,{marginTop:"4px",maxLines:1,width:"100%",fontSize:12,...n==null?void 0:n.name,children:[i.name," (",a(i.size),")"]})]})]})},s)})})},Af=e=>{const o=he("slider",e),t=oi(o);return r.jsx(ri,{...o,...t})},pi=Af,Ef=({url:e,type:o,name:t,onOpen:n})=>{const a=o.toLowerCase(),i=a.startsWith("image"),s=a.startsWith("video"),c=a.startsWith("audio"),d=()=>{n&&n()};return r.jsxs(l.View,{width:"60px",height:"60px",flexShrink:0,borderRadius:"4px",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-gray-200",cursor:"pointer",onClick:d,children:[i&&r.jsx(l.Image,{src:e,alt:t,width:"100%",height:"100%",objectFit:"cover"}),s&&r.jsx(l.View,{as:"video",src:e,controls:!0,width:"100%",height:"100%",style:{objectFit:"cover"},onClick:u=>u.stopPropagation()}),c&&r.jsx(l.View,{as:"audio",controls:!0,src:e,width:"100%",onClick:u=>u.stopPropagation()}),!i&&!s&&!c&&r.jsx(po,{widthHeight:24,color:"color-gray-600"})]})},eo=$o.create(e=>({modals:[],onHide:o=>o,onShow:(o,t)=>({name:o,props:t}),show:(o,t={},n={})=>{e(a=>({...a,modals:[...a.modals,{name:o,props:{...t,isVisible:!0},overlayProps:n}]}))},hide:o=>{e(t=>o?{...t,modals:t.modals.filter(n=>n.name!==o)}:{modals:[]})},setOnHide:o=>{e(t=>({...t,onHide:o}))},setOnShow:o=>{e(t=>({...t,onShow:o}))}})),Df=(e,o={},t={})=>{eo.getState().show(e,o,t),eo.getState().onShow(e,o)},mn=e=>{eo.getState().onHide(e),eo.getState().hide(typeof e=="string"?e:void 0)},$f={square:{borderRadius:0},rounded:{borderRadius:8}},Lf={center:{justifyContent:"center",alignItems:"center"},top:{justifyContent:"center",alignItems:"flex-start"},right:{justifyContent:"flex-end",alignItems:"center"},bottom:{justifyContent:"center",alignItems:"flex-end"},left:{justifyContent:"flex-start",alignItems:"center"}},_f={xs:12,sm:16,md:20,lg:24,xl:28},dt={body:{fontSize:"16px",fontWeight:"400",color:"color-gray-700"}},mi=p.memo(({children:e,blur:o,isOpen:t=!1,isClosePrevented:n=!1,onClose:a=()=>{},position:i="center",views:s,...c})=>{const d=p.useCallback(()=>{n||a()},[n,a]);return r.jsx(l.Center,{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:1e3,onClick:d,visibility:t?"visible":"hidden",opacity:t?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease",...s==null?void 0:s.container,children:r.jsx(l.View,{position:"absolute",top:0,left:0,zIndex:1e3,width:"100vw",height:"100vh",display:"flex",backgroundColor:"color-dark-50-360",backdropFilter:o?`blur(${o}px)`:void 0,transition:"background-color 0.2s ease, backdrop-filter 0.2s ease",onClick:d,...Lf[i],...c,...s==null?void 0:s.view,children:e})})}),Bf={boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.15)"},Of={elevation:5,shadowColor:"rgba(0, 0, 0, 0.15)",shadowOffset:{width:0,height:4},shadowOpacity:1,shadowRadius:16},Nf=p.memo(({children:e,shadow:o,isFullScreen:t=!1,shape:n="rounded",views:a,isOpen:i=!0,position:s,...c})=>{const d=typeof document!==void 0?Bf:Of,u=p.useCallback(m=>{m&&m.stopPropagation&&m.stopPropagation()},[]);return r.jsx(l.Vertical,{cursor:"default",backgroundColor:"color-white",width:t?"100%":600,height:t?"100%":"fit-content",onClick:u,transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",opacity:i?1:0,transform:i?"translateY(0)":"translateY(8px)",...o||d,...$f[n],media:{mobile:{width:"90%",maxWidth:"100%",margin:"16px"}},...c,...a==null?void 0:a.container,children:e})}),qf=p.memo(({children:e,buttonColor:o="theme-primary",iconSize:t="md",buttonPosition:n="right",views:a,onClose:i,...s})=>{const c=i||mn,d=r.jsx(l.View,{onClick:()=>c(),children:r.jsx(ze,{widthHeight:_f[t],color:o})});return r.jsxs(l.Horizontal,{justifyContent:n==="none"?"center":"space-between",alignItems:"center",paddingVertical:16,paddingHorizontal:24,borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",media:{mobile:{paddingVertical:12,paddingHorizontal:16}},...s,...a==null?void 0:a.header,children:[n==="left"&&d,e,n==="right"&&d]})}),Uf=p.memo(({children:e,views:o,...t})=>r.jsx(l.View,{paddingVertical:16,paddingHorizontal:24,fontSize:dt.body.fontSize,fontWeight:dt.body.fontWeight,color:dt.body.color,media:{mobile:{paddingVertical:12,paddingHorizontal:16,fontSize:"14px"}},...t,...o==null?void 0:o.view,children:e})),Gf=p.memo(({children:e,views:o,...t})=>r.jsx(l.Horizontal,{marginTop:"auto",alignItems:"center",justifyContent:"flex-end",paddingVertical:16,paddingHorizontal:24,borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",gap:12,media:{mobile:{paddingVertical:12,paddingHorizontal:16,gap:8}},...t,...o==null?void 0:o.container,children:e})),gn=({modals:e,onShow:o,onHide:t})=>{const n=eo(a=>a.modals);return p.useEffect(()=>{o&&eo.getState().setOnShow(o)},[o]),p.useEffect(()=>{t&&eo.getState().setOnHide(t)},[t]),n.length===0?null:r.jsx(p.Fragment,{children:n.map((a,i)=>{const s=e[a.name];return s?r.jsx(mi,{isOpen:a.props.isVisible,onClose:()=>mn(a.name),blur:5,...a.overlayProps,style:{zIndex:1e3+i},children:r.jsx(s,{...a.props})},i):(console.error(`${a.name} modal doesn't exist`),null)})})},ho=({children:e})=>r.jsx(r.Fragment,{children:e});ho.Overlay=mi;ho.Container=Nf;ho.Header=qf;ho.Body=Uf;ho.Footer=Gf;ho.Layout=gn;const la={xs:"320px",sm:"380px",md:"480px",lg:"640px",xl:"768px",full:"100%"},Yf={left:{top:0,left:0,bottom:0,height:"100vh",borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{top:0,right:0,bottom:0,height:"100vh",borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"},top:{top:0,left:0,right:0,width:"100vw",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},bottom:{bottom:0,left:0,right:0,width:"100vw",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200"}},hn=({isOpen:e,onClose:o,isClosePrevented:t,blur:n,children:a,...i})=>{const s=()=>{t||o()};return p.useEffect(()=>{const c=d=>{d.key==="Escape"&&e&&!t&&o()};return e&&document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c)}},[e,t,o]),r.jsx(l.View,{"data-testid":"drawer-overlay",role:"dialog","aria-modal":"true",position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e3,visibility:e?"visible":"hidden",onClick:s,opacity:e?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease",backgroundColor:e?"color-dark-50-360":"transparent",backdropFilter:n?`blur(${n}px)`:void 0,pointerEvents:e?"auto":"none",...i,children:a})},fn=({placement:e="right",size:o="md",isOpen:t=!1,children:n,...a})=>{const i=m=>{m.stopPropagation()},c=e==="top"||e==="bottom"?{height:o==="full"?"100vh":la[o]||o,maxHeight:"100vh"}:{width:o==="full"?"100vw":la[o]||o,maxWidth:"100vw"},d=e==="left"?"0 12px 12px 0":e==="right"?"12px 0 0 12px":e==="top"?"0 0 12px 12px":"12px 12px 0 0",u=t?"translate3d(0, 0, 0)":e==="left"?"translate3d(-100%, 0, 0)":e==="right"?"translate3d(100%, 0, 0)":e==="top"?"translate3d(0, -100%, 0)":"translate3d(0, 100%, 0)";return r.jsx(l.Vertical,{position:"absolute",backgroundColor:"color-white",borderRadius:d,...Yf[e],...c,onClick:i,transform:u,willChange:"transform",transition:"transform 0.24s ease, box-shadow 0.2s ease",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",...a,children:n})},Kf=({children:e,onClose:o,buttonPosition:t="right",...n})=>{const a=o&&r.jsx(l.View,{onClick:o,cursor:"pointer",padding:8,children:r.jsx(ze,{widthHeight:20,color:"color-gray-500"})});return r.jsxs(l.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderBottomWidth:"1px",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:t==="none"?"center":"space-between",...n,children:[t==="left"&&a,e,t==="right"&&a]})},Xf=({children:e,...o})=>r.jsx(l.Vertical,{padding:24,flex:1,overflowY:"auto",...o,children:e}),Jf=({children:e,...o})=>r.jsx(l.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderTopWidth:"1px",borderTopColor:"color-gray-200",alignItems:"center",justifyContent:"flex-end",gap:12,...o,children:e}),oo=$o.create(e=>({drawers:[],onHide:o=>o,onShow:(o,t)=>({name:o,props:t}),show:(o,t={},n={})=>{e(a=>({...a,drawers:[...a.drawers,{name:o,props:{...t,isOpen:!1},overlayProps:n}]}))},hide:o=>{e(t=>o?{...t,drawers:t.drawers.filter(n=>n.name!==o)}:{drawers:[]})},setOnHide:o=>{e(t=>({...t,onHide:o}))},setOnShow:o=>{e(t=>({...t,onShow:o}))}})),Qf=(e,o={},t={})=>{const n=oo.getState();n.hide(e),n.show(e,o,t),n.onShow(e,o),queueMicrotask(()=>{oo.setState(a=>({drawers:a.drawers.map(i=>i.name===e?{...i,props:{...i.props,isOpen:!0}}:i)}))})},gi=e=>{oo.getState().onHide(e),oo.getState().hide(typeof e=="string"?e:void 0)},Zf=({drawers:e,onShow:o,onHide:t})=>{const n=oo(a=>a.drawers);return p.useEffect(()=>{o&&oo.getState().setOnShow(o)},[o]),p.useEffect(()=>{t&&oo.getState().setOnHide(t)},[t]),n.length===0?null:r.jsx(p.Fragment,{children:n.map((a,i)=>{var f;const s=e[a.name];if(!s)return console.error(`${a.name} drawer doesn't exist`),null;const{placement:c,size:d,isClosePrevented:u,blur:m,containerProps:g,...h}=a.props||{};return r.jsx(hn,{isOpen:a.props.isOpen,onClose:()=>gi(a.name),isClosePrevented:u,blur:m,...a.overlayProps,style:{zIndex:1e3+i,...((f=a.overlayProps)==null?void 0:f.style)||{}},children:r.jsx(fn,{placement:c,size:d,isOpen:a.props.isOpen,...g||{},children:r.jsx(p.Suspense,{fallback:null,children:r.jsx(s,{...h})})})},i)})})},ey=({isOpen:e,onClose:o,placement:t="right",size:n="md",isClosePrevented:a,children:i,...s})=>r.jsx(hn,{isOpen:e,onClose:o,isClosePrevented:a,...s,children:r.jsx(fn,{placement:t,size:n,isOpen:e,children:i})}),fo=ey;fo.Overlay=hn;fo.Container=fn;fo.Header=Kf;fo.Body=Xf;fo.Footer=Jf;fo.Layout=Zf;const hi=({behavior:e,keyboardVerticalOffset:o,dismissOnTap:t,enabled:n,children:a,...i})=>r.jsx(l.View,{flex:1,width:"100%",...i,children:a}),oy=({header:e,footer:o,children:t,isLoading:n=!1,safe:a=!0,scrollable:i=!0,dismissKeyboardOnTap:s=!0,keyboardVerticalOffset:c=0,views:d={},backgroundColor:u="color-white",...m})=>{const g=a?l.SafeArea:l.View,h=l.isBrowser()?{}:{keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:!1,contentContainerStyle:{flexGrow:1}},f=n?r.jsx(l.Center,{flex:1,width:"100%",...d.content,children:r.jsx(ro,{})}):i?r.jsx(l.Scroll,{flex:1,width:"100%",...h,...d.content,children:t}):r.jsx(l.View,{flex:1,width:"100%",...d.content,children:t});return r.jsxs(g,{flex:1,height:"100%",width:"100%",flexDirection:"column",backgroundColor:u,...m,...d.container,children:[e!=null&&r.jsx(l.View,{width:"100%",flexShrink:0,...d.header,children:e}),r.jsxs(hi,{flexDirection:"column",dismissOnTap:s,keyboardVerticalOffset:c,children:[f,o!=null&&r.jsx(l.View,{width:"100%",flexShrink:0,...d.footer,children:o})]})]})},Kr=$o.create(e=>({started:!1,loaded:!1,setStarted:(o=!0)=>e({started:o}),setLoaded:(o=!0)=>e({loaded:o}),reset:()=>e({started:!1,loaded:!1})})),ry=(e=!0)=>Kr.getState().setLoaded(e),ty=(e=!0)=>Kr.getState().setStarted(e),ny=({logo:e,logoSrc:o,loader:t,showLoader:n=!0,duration:a=600,isLoaded:i,onHidden:s,backgroundColor:c="color-white",children:d,...u})=>{const m=Kr(w=>w.loaded),g=i!==void 0?i:m,[h,f]=p.useState(!0),[y,k]=p.useState(!1);if(p.useEffect(()=>{if(!g||y)return;k(!0);const w=setTimeout(()=>{f(!1),s==null||s()},a);return()=>clearTimeout(w)},[g,y,a,s]),!h)return null;const b=l.isBrowser()?"fixed":"absolute",C=y?l.Animation.fadeOut({duration:`${a}ms`}):void 0,S=e??(o?r.jsx(l.Image,{src:o,width:120,height:120,alt:"logo"}):null);return r.jsxs(l.Center,{position:b,top:0,left:0,right:0,bottom:0,zIndex:9999,backgroundColor:c,animate:C,...u,children:[r.jsxs(l.Vertical,{alignItems:"center",gap:24,children:[S,n&&(t??r.jsx(ro,{}))]}),d]})},Oe=$o.create((e,o)=>({stack:[{path:"/",params:{}}],index:0,push:(t,n={})=>e(a=>{const i=a.stack.slice(0,a.index+1);return i.push({path:t,params:n}),{stack:i,index:i.length-1}}),replace:(t,n={})=>e(a=>{const i=a.stack.slice();return i[a.index]={path:t,params:n},{stack:i}}),back:()=>{const{index:t}=o();return t<=0?!1:(e({index:t-1}),!0)},go:t=>e(n=>({index:Math.min(Math.max(n.index+t,0),n.stack.length-1)})),reset:(t,n={})=>e({stack:[{path:t,params:n}],index:0})})),ay=(e,o)=>Oe.getState().push(e,o),ly=()=>Oe.getState().back(),yn=()=>{const e=Oe(d=>d.stack),o=Oe(d=>d.index),t=Oe(d=>d.push),n=Oe(d=>d.replace),a=Oe(d=>d.back),i=Oe(d=>d.go),s=Oe(d=>d.reset),c=e[o]||{path:"/",params:{}};return{path:c.path,params:c.params,stack:e,index:o,canGoBack:o>0,push:t,replace:n,back:a,go:i,reset:s,navigate:t}},fi=(e,o)=>{const t=e.split("/").filter(Boolean),n=o.split("/").filter(Boolean);if(t.length!==n.length)return null;const a={};for(let i=0;i<t.length;i+=1){const s=t[i];if(s.startsWith(":"))a[s.slice(1)]=decodeURIComponent(n[i]);else if(s!==n[i])return null}return a},iy=e=>Array.isArray(e)?e:Object.entries(e).map(([o,t])=>({path:o,component:t})),sy=({routes:e,notFound:o})=>{const{path:t,params:n}=yn();for(const a of iy(e)){const i=fi(a.path,t);if(i){const s=a.component;return r.jsx(s,{...n,...i})}}return o?r.jsx(o,{}):null},cy=({routes:e,notFound:o,initialPath:t,syncBrowserHistory:n=!1})=>{const{path:a,push:i,back:s,reset:c}=yn(),d=p.useRef(!1);return l.useMount(()=>{t&&c(t)}),p.useEffect(()=>{if(!(!n||typeof window>"u")){if(d.current){d.current=!1;return}try{window.history.pushState({path:a},"",a)}catch{}}},[a,n]),p.useEffect(()=>{if(!n||typeof window>"u")return;const u=()=>{d.current=!0,s()||(d.current=!1)};return window.addEventListener("popstate",u),()=>window.removeEventListener("popstate",u)},[n,s,i]),r.jsx(sy,{routes:e,notFound:o})},dy=(e=null,o=[])=>{const[t,n]=p.useState(e),[a,i]=p.useState(o),s=p.useRef({});return{activeItemId:t,setActiveItemId:n,expandedItemIds:a,toggleExpandedItem:u=>{i(m=>m.includes(u)?m.filter(h=>h!==u):[...m,u])},isItemExpanded:u=>a.includes(u),triggerRefs:s}},Tt={sm:{padding:"8px 12px",fontSize:"12px",fontWeight:"500",media:{mobile:{padding:"6px 10px",fontSize:"11px"}}},md:{padding:"10px 14px",fontSize:"14px",fontWeight:"500",media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},lg:{padding:"12px 16px",fontSize:"14px",fontWeight:"600",media:{mobile:{padding:"10px 14px",fontSize:"12px"}}}},It={default:{color:"color-gray-800",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"}},yi={horizontal:{flexDirection:"row",gap:"8px",media:{mobile:{flexDirection:"column",gap:"4px"}}},vertical:{flexDirection:"column",gap:"4px"}},Mo={active:{backgroundColor:"color-blue-50",color:"color-blue-700",fontWeight:"600",borderLeft:"3px solid",borderColor:"color-blue-600"},hover:{backgroundColor:"color-gray-100",transition:"background-color 0.2s ease"}},xi=p.createContext({activeItemId:null,setActiveItemId:()=>{},expandedItemIds:[],toggleExpandedItem:()=>{},isItemExpanded:()=>!1,orientation:"vertical",size:"md",variant:"default",triggerRefs:{current:{}}}),uy=({children:e,value:o})=>r.jsx(xi.Provider,{value:o,children:e}),dr=()=>{const e=p.useContext(xi);if(!e)throw new Error("useNavigationMenuContext must be used within a NavigationMenuProvider");return e},xn=({children:e,views:o})=>{const{orientation:t}=dr(),n=t==="horizontal"?l.Horizontal:l.Vertical;return r.jsx(n,{width:"100%",...yi[t],transition:"background-color 0.2s ease, border-color 0.2s ease",borderRadius:"8px",...o==null?void 0:o.container,children:e})},bi=p.createContext({itemValue:null,isDisabled:!1}),py=()=>{const e=p.useContext(bi);if(!e)throw new Error("useNavigationMenuItemContext must be used within a NavigationMenuItem");return e},bn=({item:e,value:o,isDisabled:t=!1,children:n,views:a})=>{var C;const{activeItemId:i,setActiveItemId:s,orientation:c,size:d,variant:u,onItemActivate:m}=dr(),g=(e==null?void 0:e.id)||o,h=i===g,f=(e==null?void 0:e.items)&&e.items.length>0,y=(e==null?void 0:e.disabled)||t,k=()=>{y||g&&(s(g),m&&m(g))},b=c==="horizontal"?l.Horizontal:l.Vertical;return n?r.jsx(bi.Provider,{value:{itemValue:g||null,isDisabled:y},children:r.jsx(l.View,{width:"100%",cursor:y?"not-allowed":"pointer",opacity:y?.6:1,borderRadius:"8px",transition:"background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease",...Tt[d],...It[u],...h?Mo.active:{},_hover:y?{}:Mo.hover,...a==null?void 0:a.item,children:n})}):f&&e?r.jsxs(b,{width:"100%",flexDirection:"column",position:"relative",...a==null?void 0:a.item,children:[r.jsxs(ki,{itemId:e.id,disabled:e.disabled,views:a,children:[e.icon&&r.jsx(l.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}),r.jsx(Ci,{itemId:e.id,children:r.jsx(xn,{children:(C=e.items)==null?void 0:C.map(S=>r.jsx(bn,{item:S},S.id))})})]}):e?r.jsxs(l.View,{as:e.href?"a":"div",href:e.href,onClick:k,cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.6:1,width:"100%",display:"flex",alignItems:"center",borderRadius:"8px",transition:"background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease",gap:"8px",...Tt[d],...It[u],...h?Mo.active:{},_hover:e.disabled?{}:Mo.hover,...a==null?void 0:a.item,children:[e.icon&&r.jsx(l.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}):null},ki=({children:e,itemId:o,disabled:t,views:n})=>{const{activeItemId:a,toggleExpandedItem:i,isItemExpanded:s,size:c,variant:d,triggerRefs:u}=dr(),m=p.useRef(null),g=a===o,h=s(o);p.useEffect(()=>(m.current&&o&&(u.current[o]=m.current),()=>{o&&delete u.current[o]}),[o,u]);const f=y=>{y.preventDefault(),!t&&i(o)};return r.jsxs(l.View,{ref:m,onClick:f,cursor:t?"not-allowed":"pointer",opacity:t?.5:1,width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:8,transition:"background-color 0.2s ease",...Tt[c],...It[d],...g?Mo.active:{},_hover:t?{}:Mo.hover,...n==null?void 0:n.trigger,children:[r.jsx(l.View,{display:"flex",alignItems:"center",children:e}),r.jsx(l.View,{transition:"transform 0.2s ease",transform:h?"rotate(180deg)":"rotate(0deg)",...n==null?void 0:n.indicator,children:r.jsx(de,{orientation:"down",widthHeight:16,color:"currentColor",filled:!0})})]})},Ci=({children:e,itemId:o,views:t})=>{const{isItemExpanded:n,orientation:a,triggerRefs:i}=dr(),s=p.useRef(null),[c,d]=p.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),u=n(o);if(p.useEffect(()=>{if(u&&s.current&&o&&i.current[o]&&a==="horizontal"){const g=s.current.getBoundingClientRect(),h=i.current[o].getBoundingClientRect(),f=Math.max(g.width||200,200),y=Math.max(g.height||150,150),k=window.innerWidth,b=window.innerHeight,C={top:h.top,right:k-h.right,bottom:b-h.bottom,left:h.left},S=a==="horizontal"?[{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:h.left,y:h.top-y-8},{placement:"right",space:C.right,fits:C.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:C.left,fits:C.left>=f+8,x:h.left-f-8,y:h.top}]:[{placement:"right",space:C.right,fits:C.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:C.left,fits:C.left>=f+8,x:h.left-f-8,y:h.top},{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:h.left,y:h.top-y-8}],w=S.find(T=>T.fits);if(w){d({x:w.x,y:w.y,placement:w.placement});return}const j=S.reduce((T,F)=>F.space>T.space?F:T);let x=j.x,v=j.y;x+f>k&&(x=k-f-8),x<8&&(x=8),v+y>b&&(v=b-y-8),v<8&&(v=8),d({x,y:v,placement:j.placement})}},[u,a,o,i]),!u)return null;if(a==="vertical")return r.jsx(l.View,{paddingLeft:16,width:"100%",position:"relative",backgroundColor:"transparent",...t==null?void 0:t.container,children:e});const m={position:"fixed",left:c.x,top:c.y,zIndex:1e3};return r.jsx(l.View,{ref:s,role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:m,...t==null?void 0:t.container,children:e})},my=({href:e,children:o,views:t,underline:n,isExternal:a,iconSize:i,...s})=>{const{itemValue:c,isDisabled:d}=py(),{activeItemId:u,setActiveItemId:m,onItemActivate:g}=dr(),h=u===c,f=y=>{if(d){y.preventDefault();return}c&&(m(c),g&&g(c)),s.onClick&&s.onClick(y)};return r.jsx(l.View,{as:"a",href:d?void 0:e,onClick:f,cursor:d?"not-allowed":"pointer",opacity:d?.5:1,width:"100%",display:"flex",alignItems:"center","aria-current":h?"page":void 0,"aria-disabled":d,"data-active":h?"":void 0,"data-disabled":d?"":void 0,...h?{fontWeight:"bold"}:{},...t==null?void 0:t.container,...s,children:o})},gy=({items:e,orientation:o,views:t,themeMode:n})=>{const a=o==="horizontal"?l.Horizontal:l.Vertical;return!e||e.length===0?null:r.jsx(a,{width:"100%",...yi[o],...t==null?void 0:t.container,children:r.jsx(xn,{views:t,children:e.map(i=>r.jsx(bn,{item:i,views:t},i.id))})})},hy=e=>{const o=he("navigation",e),{items:t,children:n,orientation:a="vertical",size:i="md",variant:s="default",defaultActiveItemId:c=null,defaultExpandedItemIds:d=[],onItemActivate:u,views:m,...g}=o,{activeItemId:h,setActiveItemId:f,expandedItemIds:y,toggleExpandedItem:k,isItemExpanded:b,triggerRefs:C}=dy(c,d);return r.jsx(uy,{value:{activeItemId:h,setActiveItemId:f,expandedItemIds:y,toggleExpandedItem:k,isItemExpanded:b,orientation:a,size:i,variant:s,onItemActivate:u,triggerRefs:C},children:t?r.jsx(gy,{items:t,orientation:a,size:i,variant:s,views:m,...g}):n})},yo=hy;yo.List=xn;yo.Item=bn;yo.Trigger=ki;yo.Content=Ci;yo.Link=my;const Si={},ji=p.createContext({views:Si,onRowClick:()=>{}}),fy=({children:e,views:o=Si,onRowClick:t})=>r.jsx(ji.Provider,{value:{views:o,onRowClick:t},children:e}),ao=()=>p.useContext(ji),ye={table:{width:"100%",color:"inherit",borderRadius:"8px",overflow:"hidden",boxShadow:"0px 1px 3px rgba(0, 0, 0, 0.06), 0px 1px 2px rgba(0, 0, 0, 0.04)",border:"1px solid",borderColor:"color-gray-200",transition:"box-shadow 0.2s ease",media:{mobile:{overflowX:"auto",display:"block",borderRadius:"4px"}}},thead:{backgroundColor:"color-gray-50",borderBottom:"1px solid",borderColor:"color-gray-200"},th:{padding:"12px 16px",fontWeight:"600",fontSize:"14px",color:"inherit",opacity:.72,textAlign:"left",flex:1,media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},td:{padding:"12px 16px",fontSize:"14px",borderBottom:"1px solid",borderColor:"color-gray-100",color:"inherit",flex:1,media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},tr:{flexDirection:"row",alignItems:"stretch",width:"100%",transition:"background-color 0.15s ease",_hover:{backgroundColor:"color-gray-50"},_focus:{outline:"none",backgroundColor:"color-gray-100"}},tfoot:{backgroundColor:"color-gray-50",fontWeight:"600",borderTop:"2px solid",borderColor:"color-gray-200"},caption:{margin:"8px 0",color:"inherit",opacity:.62,fontSize:"14px",fontStyle:"italic",media:{mobile:{fontSize:"12px"}}}};({...ye.th},{...ye.td});({...ye.tr});({...ye.td},{...ye.th});({...ye.table},{...ye.th}),{...ye.td},{...ye.tr},{...ye.tfoot},{...ye.caption};const yy=({children:e})=>r.jsx(l.View,{width:"100%",style:{overflowX:"auto"},children:e}),wi=e=>{const{views:o}=ao();return r.jsx(l.Element,{as:"table",...ye.table,...o==null?void 0:o.table,...e,style:{borderCollapse:"collapse",...e.style||{}}})},vi=e=>{const{views:o}=ao();return r.jsx(l.Element,{as:"thead",textAlign:"left",...ye.thead,...o==null?void 0:o.thead,...e})},Ti=e=>{const{views:o}=ao();return r.jsx(l.Element,{as:"th",whiteSpace:"nowrap",...ye.th,...o==null?void 0:o.th,...e})},wr=e=>{const{views:o,onRowClick:t}=ao();return r.jsx(l.Element,{as:"tr",...ye.tr,...o==null?void 0:o.tr,onClick:t,...e})},Rt=({isFirstColumn:e,...o})=>{const{views:t}=ao();return r.jsx(l.Element,{as:"td",whiteSpace:"nowrap",fontWeight:e?"500":"400",...ye.td,...t==null?void 0:t.td,...o})},Ii=e=>{const{views:o}=ao();return r.jsx(l.Element,{as:"tbody",...ye.tbody,...o==null?void 0:o.tbody,...e})},Ri=e=>{const{views:o}=ao();return r.jsx(l.Element,{as:"tfoot",...ye.tfoot,...o==null?void 0:o.tfoot,...e})},Fi=e=>{const{views:o}=ao();return r.jsx(l.Element,{as:"caption",...ye.caption,...o==null?void 0:o.caption,...e})},xy=({data:e,columns:o,footer:t,caption:n,themeMode:a})=>{const i=Math.max(o.length*140,320);return r.jsx(yy,{children:r.jsxs(wi,{role:"Table",minWidth:i,children:[n&&r.jsx(Fi,{children:n}),r.jsx(vi,{children:r.jsx(wr,{children:o.map(s=>r.jsx(Ti,{children:s.title},s.field))})}),r.jsx(Ii,{children:e.map((s,c)=>r.jsx(wr,{children:o.map((d,u)=>r.jsx(Rt,{isFirstColumn:u===0,children:s[d.field]},d.field))},c))}),t&&r.jsx(Ri,{children:r.jsx(wr,{children:t.map((s,c)=>r.jsx(Rt,{...s.props,children:s.value},c))})})]})})},Ve=({children:e,views:o,onClick:t})=>{const n=he("table",{views:o,onClick:t});return r.jsx(fy,{views:n.views,onRowClick:n.onClick,children:e})};Ve.Head=vi;Ve.HeadCell=Ti;Ve.Body=Ii;Ve.Row=wr;Ve.Cell=Rt;Ve.Footer=Ri;Ve.Caption=Fi;Ve.Container=wi;Ve.Template=xy;const by=(e,o,t)=>{const n=u=>u.value!==void 0?u.value:u.title,a=()=>{if(!(!e||e.length===0)){if(o!==void 0){const u=e.find(m=>n(m)===o);if(u)return u}return e[0]}},[i,s]=p.useState(a()),c=t!==void 0?e.find(u=>n(u)===t):i,d=u=>{t===void 0&&s(u)};return p.useEffect(()=>{if(t!==void 0)return;const u=a(),m=i&&e.some(g=>n(g)===n(i));u&&(!m||o!==void 0&&i&&n(i)!==o)?s(u):!u&&i&&s(void 0)},[e,o]),{activeTab:c,setActiveTab:d}},ky=(e,o,t)=>{const[n,a]=p.useState(e||null);return{activeValue:o!==void 0?o:n,setActiveValue:c=>{o===void 0&&a(c),t&&t(c)}}},Cy=p.memo(({tab:e,isActive:o,onClick:t,iconPosition:n="left",tabStyles:a,textStyles:i})=>{const s=()=>{switch(n){case"top":return"column";case"bottom":return"column-reverse";case"right":return"row-reverse";case"left":default:return"row"}},c=()=>["top","bottom"].includes(n)?"4px":"8px",d=e.icon&&p.isValidElement(e.icon)?p.cloneElement(e.icon,{strokeWidth:o?2.5:2}):e.icon;return r.jsxs(l.Element,{as:"div",role:"tab","aria-selected":o,tabIndex:o?0:-1,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...a,flexDirection:s(),gap:c(),onClick:t,"data-state":o?"active":"inactive",children:[d&&r.jsx(l.Element,{children:d},o?"active-icon":"inactive-icon"),r.jsxs(l.Element,{display:"grid",alignItems:"center",justifyContent:"center",children:[r.jsx(l.Text,{...i,fontWeight:"600",visibility:"hidden",gridColumn:"1",gridRow:"1","aria-hidden":"true",children:e.title}),r.jsx(l.Text,{...i,fontWeight:o?"600":"500",gridColumn:"1",gridRow:"1",children:e.title})]})]})}),kn=(e,o)=>{const t=o==="dark";return e==="segmented"?{header:{width:"fit-content",alignSelf:"flex-start",gap:6,padding:6,borderRadius:16,backgroundColor:"color-gray-100"},tab:{minHeight:44,padding:"0 22px",borderRadius:12,color:"color-gray-600",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-100",style:{backgroundColor:"transparent"}},activeTab:{backgroundColor:"color-white",color:"color-gray-900",boxShadow:t?"0 1px 3px rgba(0, 0, 0, 0.35)":"0 1px 2px rgba(0, 0, 0, 0.06)"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em"},activeText:{},content:{width:"100%"}}:e==="pill"?{header:{width:"100%",flexWrap:"wrap",gap:12},tab:{minHeight:44,padding:"0 22px",borderRadius:"999px",backgroundColor:"color-white",color:"color-gray-600",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200"},activeTab:{backgroundColor:"theme-primary",color:"color-white",borderColor:"theme-primary"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em",color:"inherit"},activeText:{color:"inherit"},content:{width:"100%"}}:{header:{width:"100%",gap:20,borderBottom:"none"},tab:{minHeight:44,padding:"0 4px",borderRadius:0,color:"color-gray-500",borderBottom:"3px solid",borderColor:"color-white",style:{backgroundColor:"transparent"}},activeTab:{color:"theme-primary",borderColor:"theme-primary"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em",color:"inherit"},activeText:{color:"inherit"},content:{width:"100%",paddingTop:12}}},Sy=({tabs:e=[],activeTab:o,handleTabClick:t,views:n={},renderTab:a,renderContent:i,variant:s="underline",iconPosition:c="left"})=>{const{themeMode:d}=l.useTheme(),u=kn(s,d);return o?r.jsxs(l.Vertical,{width:"100%",height:"100%",...n.container,children:[r.jsx(l.Horizontal,{alignItems:"center",...u.header,...n.headerTabs,children:e.map(m=>{const g=(m.value!==void 0?m.value:m.title)===(o.value!==void 0?o.value:o.title),h=()=>t(m);return a?a(m,g,h):r.jsx(Cy,{tab:m,isActive:g,onClick:h,iconPosition:c,tabStyles:{...u.tab,...n.tab,...g?u.activeTab:{},...g?n.activeTab:{}},textStyles:{...u.text,...n.title,...g?u.activeText:{},...g?n.activeText:{}}},m.title)})}),r.jsx(l.View,{height:"100%",...u.content,...n.content,children:i?i(o):o.content})]}):null},zi=p.createContext(null),Cn=()=>{const e=p.useContext(zi);if(!e)throw new Error("useTabsContext must be used within a Tabs component");return e},jy=p.memo(({children:e,views:o})=>{var c;const{themeMode:t}=l.useTheme(),{variant:n="underline"}=Cn(),a=kn(n,t),i=Lo("tabs"),s=Ne({container:(c=i.views)==null?void 0:c.headerTabs},o);return r.jsx(l.Horizontal,{alignItems:"center",...a.header,...s==null?void 0:s.container,children:e})}),wy=p.memo(({value:e,children:o,disabled:t=!1,views:n})=>{var f,y;const{themeMode:a}=l.useTheme(),{activeValue:i,setActiveValue:s,variant:c="underline"}=Cn(),d=i===e,u=kn(c,a),m=Lo("tabs"),g=Ne({trigger:(f=m.views)==null?void 0:f.tab,activeState:(y=m.views)==null?void 0:y.activeTab},n),h=p.useCallback(()=>{t||s(e)},[t,e,s]);return r.jsx(l.View,{cursor:t?"not-allowed":"pointer",opacity:t?.6:1,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease-in-out",...u.tab,...d?u.activeTab:{},_hover:t?{}:c==="underline"?{color:"theme-primary"}:{opacity:.9},onClick:h,...g==null?void 0:g.trigger,...d?g==null?void 0:g.activeState:{},children:r.jsx(l.View,{...u.text,...d?u.activeText:{},children:o})})}),vy=p.memo(({value:e,children:o,views:t})=>{const{activeValue:n}=Cn();return n!==e?null:r.jsx(l.View,{width:"100%",padding:"24px",...t==null?void 0:t.content,children:o})}),Ty=e=>{const o=he("tabs",e),{tabs:t,views:n,defaultValue:a,onTabChange:i,renderTab:s,renderContent:c,variant:d="underline",iconPosition:u="left",value:m,onValueChange:g,children:h}=o,f=ky(a,m,g),y=by(t||[],a,m);if(h)return r.jsx(zi.Provider,{value:{...f,variant:d},children:h});if(t){const k=b=>{const C=S=>S.value!==void 0?S.value:S.title;(!y.activeTab||C(y.activeTab)!==C(b))&&(y.setActiveTab(b),i&&i(b))};return r.jsx(Sy,{tabs:t,views:n,activeTab:y.activeTab,handleTabClick:k,renderTab:s,renderContent:c,variant:d,iconPosition:u})}return null},Iy=p.memo(Ty),Ao=Iy;Ao.List=jy;Ao.Trigger=wy;Ao.Content=vy;const Ry=e=>{const{children:o,_isInView:t=!1,alternateHighlightText:n=[],alternateAnimation:a=!1,alternateDuration:i=3e3,highlightText:s,highlightTypewriter:c=!1,highlightSlide:d=!1,highlightSlideDuration:u=500,highlightSlideStagger:m=50,highlightSlideSequential:g=!0}=e,[h,f]=p.useState(o),[y,k]=p.useState(s);return p.useEffect(()=>{if(!a||n.length===0||!t||typeof o!="string"||typeof s!="string")return f(o),k(s),()=>{};const b=o,C=s;let S=0;const w=x=>{const v=n[x],T=C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),F=new RegExp(T,"gi"),M=b.replace(F,v);f(M),k(v)};w(S);const j=setInterval(()=>{S=(S+1)%n.length,w(S)},i);return()=>clearInterval(j)},[a,n,i,s,o,t]),{finalDisplayedText:h,activeHighlightTarget:y,highlightTypewriter:c,highlightSlide:d,highlightSlideDuration:u,highlightSlideStagger:m,highlightSlideSequential:g}},Fy={xs:24,sm:32,md:48,lg:96,xl:110},zy={xl:{media:{mobile:{fontSize:48},tablet:{fontSize:96},desktop:{fontSize:110}}},lg:{media:{mobile:{fontSize:48},tablet:{fontSize:48},desktop:{fontSize:70}}},md:{media:{mobile:{fontSize:32},tablet:{fontSize:40},desktop:{fontSize:56}}},sm:{media:{mobile:{fontSize:20},tablet:{fontSize:24},desktop:{fontSize:32}}},xs:{media:{mobile:{fontSize:14},tablet:{fontSize:18},desktop:{fontSize:20}}}},My={underline:e=>({textDecoration:"underline",textDecorationColor:e,textDecorationThickness:"4px",textUnderlineOffset:"4px"}),background:e=>({backgroundColor:e,color:"color-white",padding:"0 8px",borderRadius:"4px"}),gradient:(e,o)=>({background:`linear-gradient(135deg, ${e}, ${o||e})`,backgroundClip:"text",WebkitBackgroundClip:"text !important",WebkitTextFillColor:"transparent",color:"transparent",display:"inline-block",textShadow:"none"}),outline:e=>({WebkitTextStroke:`1px ${e}`,WebkitTextFillColor:"transparent !important",color:"transparent",textShadow:"none"}),glow:e=>({color:e,textShadow:`0 0 10px ${e}80, 0 0 20px ${e}40, 0 0 30px ${e}20`}),solid:e=>({color:e}),default:()=>({})},Wy=({text:e,typingSpeed:o=50,pauseTime:t=500,onComplete:n,showCursor:a=!0,cursorColor:i="currentColor",textStyle:s,textComponent:c,as:d,...u})=>{const m=c||l.Text,g=Array.isArray(e)?e:[e],[h,f]=p.useState(g.map(()=>"")),[y,k]=p.useState(!1),[b,C]=p.useState(0),[S,w]=p.useState(0);p.useEffect(()=>{f(g.map(()=>"")),k(!1),C(0),w(0)},[e]),p.useEffect(()=>{if(y){n&&n();return}const x=g[b];if(S>=x.length){if(b>=g.length-1){k(!0);return}const T=setTimeout(()=>{C(F=>F+1),w(0)},t);return()=>clearTimeout(T)}const v=setTimeout(()=>{f(T=>{const F=[...T];return F[b]=x.substring(0,S+1),F}),w(T=>T+1)},o);return()=>clearTimeout(v)},[g,b,S,y,n,t,o]);const j=x=>{if(!x||typeof x!="string")return x;const v=x.split("|");return v.length===1?x:v.map((T,F)=>r.jsxs(p.Fragment,{children:[T,F<v.length-1&&r.jsx("br",{})]},F))};return r.jsx(r.Fragment,{children:h.map((x,v)=>r.jsxs(p.Fragment,{children:[j(x),a&&v===b&&!y&&r.jsx(m,{as:"span",display:"inline-block",width:"0.1em",height:"1em",backgroundColor:i,animation:"blink 1s step-end infinite",verticalAlign:"text-bottom",marginLeft:"1px",...s})]},v))})},Hy=({text:e,duration:o=500,direction:t="up",stagger:n=50,sequential:a=!1,textStyle:i,as:s,wordProps:c,textComponent:d,...u})=>{const[m,g]=p.useState(e),[h,f]=p.useState("entering"),[y,k]=p.useState(0),b=d||l.Text,C=p.useRef(null),S=p.useRef(null);p.useEffect(()=>{e===m&&h==="visible"||e!==m&&(h==="entering"||h==="visible"?(C.current=e,f("exiting")):h==="exiting"&&(C.current=e))},[e,m,h]);const{lines:w,totalWordCount:j}=p.useMemo(()=>{const R=m.split("|").map(D=>D.trim().split(/\s+/).filter(L=>L.length>0)),W=R.reduce((D,L)=>D+L.length,0);return{lines:R,totalWordCount:W}},[m]),x=p.useMemo(()=>a?j*(o+n):(j-1)*n+o,[j,o,n,a]),v=p.useMemo(()=>a?j*(o+n):(j-1)*n+o,[j,o,n,a]);p.useEffect(()=>(S.current&&clearTimeout(S.current),h==="entering"?S.current=setTimeout(()=>{f("visible")},x+50):h==="exiting"&&(S.current=setTimeout(()=>{C.current!==null&&(g(C.current),C.current=null),k(P=>P+1),f("entering")},v+50)),()=>{S.current&&clearTimeout(S.current)}),[h,x,v]);const{style:T,...F}=c||{},M=t==="up",E=P=>a?P*(o+n):P*n,I=p.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"bottom",whiteSpace:"nowrap",...i}),[i]),V=p.useMemo(()=>({display:"inline-flex",flexDirection:"column",alignItems:"center"}),[]),H=p.useMemo(()=>({display:"block",whiteSpace:"nowrap"}),[]);let z=0;return r.jsx(l.Element,{as:"span",style:I,...u,children:r.jsx("span",{style:V,children:w.map((P,R)=>r.jsx("span",{style:H,children:P.map((W,D)=>{const L=z++,O=E(L),$=D===P.length-1;let _;const B=`${o}ms`,G=`${O}ms`;h==="entering"?_=M?l.Animation.slideInUp({duration:B,delay:G,timingFunction:"ease-out",fillMode:"both"}):l.Animation.slideInDown({duration:B,delay:G,timingFunction:"ease-out",fillMode:"both"}):h==="exiting"&&(_=M?{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(-100%)",opacity:0},duration:B,delay:G,timingFunction:"ease-in",fillMode:"both"}:{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(100%)",opacity:0},duration:B,delay:G,timingFunction:"ease-in",fillMode:"both"});const N={...T,display:"inline-block",marginRight:$?0:"0.25em",transform:h==="visible"?"translateY(0)":void 0,opacity:h==="visible"?1:void 0};return r.jsx(b,{as:"span",animate:_,...F,...N,children:W},`${y}-${R}-${D}`)})},`line-${R}`))})})};function ia(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const ut=e=>{if(!e||typeof e!="string")return e;const o=e.split("|");return o.length===1?e:o.map((t,n)=>r.jsxs(p.Fragment,{children:[t,n<o.length-1&&r.jsx("br",{})]},n))},Py=({children:e,highlightText:o,highlightStyle:t="solid",highlightColor:n="theme-primary",highlightSecondaryColor:a,size:i="lg",views:s,highlightAnimate:c,animate:d,animationLoop:u=1,highlightAnimationLoop:m=1,highlightTypewriter:g=!1,highlightTypewriterDuration:h=3e3,highlightSlide:f=!1,highlightSlideDuration:y=500,highlightSlideStagger:k=50,highlightSlideSequential:b=!0,themeMode:C,responsive:S,alternateHighlightText:w,alternateAnimation:j,alternateDuration:x,_isInView:v,...T})=>{const{ref:F,inView:M}=l.useInView(),{finalDisplayedText:E,activeHighlightTarget:I,highlightTypewriter:V,highlightSlide:H,highlightSlideDuration:z,highlightSlideStagger:P,highlightSlideSequential:R}=Ry({children:e,highlightText:o,_isInView:M,highlightTypewriter:g,highlightSlide:f,highlightSlideDuration:y,highlightSlideStagger:k,highlightSlideSequential:b,alternateHighlightText:w,alternateAnimation:j,alternateDuration:x,...T}),W=Fy[i],D={fontFamily:"Mulish, Inter, Geist, system-ui, sans-serif",fontWeight:i==="xl"?700:600,letterSpacing:i==="xl"?"-1.5px":"-0.01em"},L=My[t](n,a),O=(A,Y)=>A&&(Array.isArray(A)?A.map(J=>({...J,iterationCount:Y.toString()})):{...A,iterationCount:Y.toString()}),$=O(d,u),_=O(c,m),B=typeof E=="string"?E:typeof e=="string"?e:"",G={ref:F,animate:M?$:void 0,as:"h1",fontSize:W,...S?zy[i]:{},...D},N=A=>!M&&(V||H)?r.jsx("span",{style:{opacity:0},children:A}):V?r.jsx(Wy,{text:A,typingSpeed:Math.max(30,h/(A.length*10)),cursorColor:"currentColor",...L}):H?r.jsx(Hy,{text:A,duration:z,stagger:P,sequential:R,direction:"up",wordProps:L}):ut(A);if(typeof B=="string"&&I){const A=Array.isArray(I)?new RegExp(`(${I.map(X=>ia(String(X))).join("|")})`,"gi"):new RegExp(`(${ia(String(I))})`,"gi"),Y=[];let J=0,K;for(;K=A.exec(B);)K.index>J&&Y.push(B.substring(J,K.index)),Y.push({highlight:!0,text:K[0]}),J=K.index+K[0].length;return J<B.length&&Y.push(B.substring(J)),r.jsx(l.Element,{...G,...s==null?void 0:s.container,...T,children:Y.map((X,ee)=>typeof X=="string"?r.jsx(l.Text,{as:"span",display:"inline",...s==null?void 0:s.text,children:ut(X)},`text-${ee}`):r.jsx(l.Text,{as:"span",display:"inline",animate:M?_:void 0,...H?{}:L,...s==null?void 0:s.highlight,children:N(X.text)},`highlight-${ee}`))})}return t&&!I?r.jsx(l.Element,{...G,...T,...s==null?void 0:s.container,children:r.jsx(l.Text,{as:"span",display:"inline",animate:M?_:void 0,...H?{}:L,...s==null?void 0:s.highlight,children:N(B)})}):r.jsx(l.Text,{...G,...T,...s==null?void 0:s.container,...s==null?void 0:s.text,children:ut(B)})},Vy=e=>r.jsx(Py,{...e}),Mi=Vy,Ay=({items:e,shape:o,variant:t,onToggleChange:n})=>{const{activeToggles:a,setActiveToggles:i}=li();return r.jsx(ii,{items:e,shape:o,variant:t,activeToggles:a,setActiveToggles:i,onToggleChange:n})},Wi=Ay,Ey=({items:e,onChange:o})=>{const[t,n]=p.useState(e),[a,i]=p.useState(null),[s,c]=p.useState(null),d=p.useRef({x:0,y:0}),u=p.useRef([]),m=p.useCallback((f,y)=>{f.preventDefault(),document.body.style.cursor="grabbing";const k="touches"in f?f.touches[0].clientX:f.clientX,b="touches"in f?f.touches[0].clientY:f.clientY;d.current={x:k,y:b},c(y),i(t[y])},[t]),g=p.useCallback(f=>{if(s===null)return;const y="touches"in f?f.touches[0].clientX:f.clientX,k="touches"in f?f.touches[0].clientY:f.clientY,b=u.current[s];if(!b)return;const C=y-d.current.x,S=k-d.current.y;b.style.transform=`translate(${C}px, ${S}px)`,b.style.zIndex="1000";const w=u.current.findIndex((j,x)=>{if(!j||x===s)return!1;const v=j.getBoundingClientRect();return k>=v.top&&k<=v.bottom});if(w!==-1&&w!==s){const j=[...t],[x]=j.splice(s,1);j.splice(w,0,x),n(j),c(w),o==null||o(j),d.current={x:y,y:k}}},[s,t,o]),h=p.useCallback(()=>{document.body.style.cursor="",u.current.forEach(f=>{f&&(f.style.transform="",f.style.zIndex="")}),c(null),i(null)},[s]);return p.useEffect(()=>{if(typeof(window==null?void 0:window.addEventListener)=="function")return s!==null&&(window.addEventListener("mousemove",g),window.addEventListener("touchmove",g),window.addEventListener("mouseup",h),window.addEventListener("touchend",h)),()=>{window.removeEventListener("mousemove",g),window.removeEventListener("touchmove",g),window.removeEventListener("mouseup",h),window.removeEventListener("touchend",h)}},[s,g,h]),{items:t,draggedItem:a,draggedIndex:s,itemRefs:u,handleDragStart:m}},Dy=({items:e,renderItem:o,containerProps:t,itemProps:n,draggedIndex:a,itemRefs:i,handleDragStart:s,views:c,themeMode:d})=>r.jsx(l.View,{overflow:"hidden",position:"relative",...t,...c==null?void 0:c.container,children:e.map((u,m)=>r.jsx(l.View,{ref:g=>{i.current[m]=g},onMouseDown:g=>s(g,m),onTouchStart:g=>s(g,m),position:"relative",cursor:"grab",transition:"transform 0.2s",...n,...c==null?void 0:c.item,children:o?o(u,m):u},m))}),Hi=e=>{const{items:o,draggedIndex:t,itemRefs:n,handleDragStart:a}=Ey(e);return r.jsx(Dy,{...e,items:o,draggedIndex:t,itemRefs:n,handleDragStart:a})},$y=Hi,Ly=({onFileSelect:e,onMultipleFileSelect:o,validateFile:t,accept:n,multiple:a,disabled:i,previewUrl:s})=>{const[c,d]=p.useState(!1),[u,m]=p.useState(null),g=p.useRef(null),h=s!==void 0?s:u;p.useEffect(()=>()=>{u&&URL.revokeObjectURL(u)},[u]);const f=p.useCallback(j=>{j.preventDefault(),j.stopPropagation(),!i&&d(!0)},[i]),y=p.useCallback(j=>{j.preventDefault(),j.stopPropagation(),!i&&d(!1)},[i]),k=p.useCallback(j=>{j.preventDefault(),j.stopPropagation(),!i&&d(!0)},[i]),b=p.useCallback(j=>{if(!j||j.length===0)return;const x=Array.from(j);if(!a&&x.length>0){const v=x[0];if(v.type.startsWith("image/")){const T=URL.createObjectURL(v);m(F=>(F&&URL.revokeObjectURL(F),T))}else m(null)}a?o&&o(x):x.length>0&&e&&e(x[0])},[a,o,e]),C=p.useCallback(j=>{j.preventDefault(),j.stopPropagation(),d(!1),!i&&j.dataTransfer.files&&j.dataTransfer.files.length>0&&(b(j.dataTransfer.files),j.dataTransfer.clearData())},[i,b]),S=p.useCallback(()=>{var j;i||(j=g.current)==null||j.click()},[i]),w=p.useCallback(j=>{b(j.target.files),j.target.value&&(j.target.value="")},[b]);return{isDragActive:c,handleDragEnter:f,handleDragLeave:y,handleDragOver:k,handleDrop:C,handleClick:S,handleFileChange:w,inputRef:g,preview:h}},_y={position:"absolute",top:"-4px",right:"-4px",width:"16px",height:"16px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.5)",color:"white",border:"none",padding:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",fontSize:"12px",zIndex:10,_hover:{backgroundColor:"rgba(0, 0, 0, 0.7)"}},Pi=({files:e,sandboxId:o,onRemove:t,layout:n="inline",maxHeight:a="120px",showPreviews:i=!1,views:s={}})=>{if(e.length===0)return null;const c=p.useCallback(u=>u<1024?`${u} B`:u<1024*1024?`${(u/1024).toFixed(1)} KB`:`${(u/(1024*1024)).toFixed(1)} MB`,[]),d=p.useCallback(u=>u.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:u.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:u.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return r.jsx(l.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...s==null?void 0:s.container,children:e.map((u,m)=>{const g=typeof URL<"u"&&typeof URL.createObjectURL=="function"&&typeof Blob<"u"&&u instanceof Blob,h=(u==null?void 0:u.path)||(u==null?void 0:u.url)||(i&&g?URL.createObjectURL(u):""),f=u.type.startsWith("image/"),y=u.type.startsWith("video/"),k=u.type.startsWith("audio/"),b=d(u);return i?r.jsx(l.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...s==null?void 0:s.item,children:i&&r.jsxs(ve,{children:[r.jsxs(ve.Trigger,{children:[f&&r.jsx(l.Image,{src:h,alt:u.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&r.jsx(l.View,{as:"video",src:h,alt:u.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),k&&r.jsx(l.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(Vo,{widthHeight:24,color:"color-black"})}),!f&&!y&&!k&&r.jsx(l.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(po,{widthHeight:24,color:"color-black"})}),t&&r.jsx(l.Button,{..._y,onClick:C=>{C.stopPropagation(),t(m)},"aria-label":`Remove ${u.name}`,children:"×"})]}),r.jsxs(ve.Content,{children:[f&&r.jsx(l.Image,{src:h,alt:u.name,maxWidth:"100%"}),y&&r.jsx(l.View,{as:"video",src:h,controls:!0,maxWidth:"100%"}),k&&r.jsx(l.View,{as:"audio",src:h,controls:!0,width:"100%"}),r.jsxs(l.Text,{marginTop:"4px",maxLines:1,width:"100%",...s==null?void 0:s.name,children:[u.name," (",c(u.size),")"]})]})]})},m):r.jsxs(l.Horizontal,{alignItems:"center",gap:"8px",padding:"6px 10px 6px 8px",borderRadius:"9999px",border:"1px solid #E2E8F0",backgroundColor:"color-white",maxWidth:"100%",animate:{from:{opacity:0,scale:.96},to:{opacity:1,scale:1}},animationDuration:.2,...s==null?void 0:s.item,children:[r.jsx(l.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:b.backgroundColor,color:b.color,children:k?r.jsx(Vo,{widthHeight:12,color:"currentColor"}):r.jsx(po,{widthHeight:12,color:"currentColor"})}),r.jsxs(l.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...s==null?void 0:s.name,children:[u.name," · ",c(u.size)]}),t&&r.jsx(l.View,{as:"button",type:"button",onClick:()=>t(m),"aria-label":`Remove ${u.name}`,display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",border:"none",backgroundColor:"transparent",color:"color-gray-400",padding:0,cursor:"pointer",transition:"color 0.2s ease, opacity 0.2s ease",_hover:{color:"color-gray-600"},children:"×"})]},m)})})},By=({children:e,text:o="Drop files here or click to upload",textProps:t,containerProps:n,disabled:a,accept:i,multiple:s,isDragActive:c,handleDragEnter:d,handleDragLeave:u,handleDragOver:m,handleDrop:g,handleClick:h,handleFileChange:f,inputRef:y,preview:k,imageProps:b,selectedFiles:C,onRemove:S})=>r.jsxs(l.Center,{width:"100%",minHeight:"200px",height:C&&C.length>0?"auto":"200px",borderWidth:2,borderStyle:"dashed",borderColor:c?"theme-primary":"color-gray-300",borderRadius:12,backgroundColor:c?"#EFF6FF":"color-gray-50",flexDirection:"column",cursor:a?"not-allowed":"pointer",opacity:a?.6:1,onClick:h,onDragEnter:d,onDragLeave:u,onDragOver:m,onDrop:g,transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease",overflow:"hidden",position:"relative",padding:16,...n,children:[r.jsx("input",{type:"file",ref:y,onChange:f,accept:i,multiple:s,style:{display:"none"},disabled:a}),k&&!s?r.jsxs(l.View,{width:"100%",height:"200px",position:"relative",children:[r.jsx(l.Image,{src:k,alt:"Preview",width:"100%",height:"100%",objectFit:"contain",...b}),r.jsx(l.Center,{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0,0,0,0.3)",opacity:0,_hover:{opacity:1},transition:"opacity 0.2s",children:r.jsx(l.Text,{color:"white",fontWeight:600,children:"Click to replace"})})]}):r.jsxs(l.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[e||r.jsxs(l.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[r.jsx(Xt,{widthHeight:40,color:c?"theme-primary":"color-gray-500"}),r.jsx(l.Text,{marginTop:16,color:c?"theme-primary":"color-gray-600",fontWeight:500,textAlign:"center",...t,children:o})]}),s&&C&&C.length>0&&r.jsx(l.View,{marginTop:16,width:"100%",children:r.jsx(Pi,{files:C,onRemove:S||(()=>{}),showPreviews:!0,layout:"inline",maxHeight:"160px"})})]})]}),Oy=e=>{const o=Ly(e);return r.jsx(By,{...e,...o})},Ny=(e=!1)=>{const[o,t]=p.useState(e),[n,a]=p.useState(null);return p.useEffect(()=>{const i=d=>{!d.composedPath().some(g=>(g==null?void 0:g.id)==="dropdown-menu"||(g==null?void 0:g.id)==="dropdown-trigger")&&o&&(t(!1),a(null))},s=()=>{o&&(t(!1),a(null))},c=d=>{d.key==="Escape"&&o&&(t(!1),a(null))};if(!(typeof(document==null?void 0:document.addEventListener)!="function"||typeof(window==null?void 0:window.addEventListener)!="function"))return document.addEventListener("mousedown",i),window.addEventListener("resize",s),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",i),window.removeEventListener("resize",s),document.removeEventListener("keydown",c)}},[o]),{isOpen:o,setIsOpen:t,activeSubmenuId:n,setActiveSubmenuId:a}},qy={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},Uy={default:{backgroundColor:"color-white",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Gy={hover:{backgroundColor:"color-gray-100"}},Vi=p.createContext({isOpen:!1,setIsOpen:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null}}),Yy=({children:e,value:o})=>r.jsx(Vi.Provider,{value:o,children:e}),Sn=()=>{const e=p.useContext(Vi);if(!e)throw new Error("useDropdownMenuContext must be used within a DropdownMenuProvider");return e},Ai=({children:e,views:o,...t})=>{const{isOpen:n,setIsOpen:a,triggerRef:i}=Sn(),s=c=>{c.stopPropagation(),a(!n)};return r.jsx(l.View,{ref:i,id:"dropdown-trigger",onClick:s,cursor:"pointer",position:"relative",display:"inline-block",...o==null?void 0:o.container,...t,children:e})},jn=({items:e,side:o="bottom",align:t="start",views:n,...a})=>{const{isOpen:i,variant:s,triggerRef:c}=Sn(),d=p.useRef(null),{ref:u,relation:m}=l.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[g,h]=p.useState({x:0,y:0,placement:o});if(p.useEffect(()=>{c.current&&u&&(u.current=c.current)},[c,u,i]),p.useEffect(()=>{if(i&&d.current&&c.current){const k=c.current.getBoundingClientRect();let b=o;m&&(o==="bottom"&&m.space.vertical==="top"?b="top":o==="top"&&m.space.vertical==="bottom"?b="bottom":o==="right"&&m.space.horizontal==="left"?b="left":o==="left"&&m.space.horizontal==="right"&&(b="right"));let C=0,S=0;switch(b){case"bottom":C=t==="start"?k.left:t==="end"?k.right-180:k.left+k.width/2-90,S=k.bottom+8;break;case"top":C=t==="start"?k.left:t==="end"?k.right-180:k.left+k.width/2-90,S=k.top-8;break;case"right":C=k.right+8,S=t==="start"?k.top:t==="end"?k.bottom-100:k.top+k.height/2-50;break;case"left":C=k.left-8,S=t==="start"?k.top:t==="end"?k.bottom-100:k.top+k.height/2-50;break}h({x:C,y:S,placement:b})}},[i,o,t,c,m]),!i)return null;const y=(()=>{const k={position:"fixed",left:g.x,top:g.y,zIndex:1e3};switch(g.placement){case"top":return{...k,transform:"translateY(-100%)"};case"left":return{...k,transform:"translateX(-100%)"};case"bottom":case"right":default:return k}})();return r.jsx(l.View,{ref:d,id:"dropdown-menu",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:y,...Uy[s],...n==null?void 0:n.menu,...a,children:e.map((k,b)=>k.divider?r.jsx(Di,{views:n},`divider-${b}`):r.jsx(Ei,{item:k,views:n},k.id))})},Ei=({item:e,views:o,...t})=>{const{activeSubmenuId:n,setActiveSubmenuId:a,size:i}=Sn(),[s,c]=p.useState(!1),d=e.items&&e.items.length>0,u=n===e.id,m=p.useRef(null),g=()=>{c(!0),d&&a(e.id)},h=()=>{c(!1)},f=y=>{y.stopPropagation(),!e.disabled&&!d&&e.onClick&&e.onClick()};return r.jsxs(l.View,{ref:m,display:"flex",alignItems:"center",cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.5:1,position:"relative",...qy[i],_hover:e.disabled?{}:Gy.hover,backgroundColor:s&&!e.disabled?"color-gray-100":"transparent",onMouseEnter:g,onMouseLeave:h,onClick:f,...o==null?void 0:o.item,...t,children:[e.icon&&r.jsx(l.View,{marginRight:8,...o==null?void 0:o.icon,children:e.icon}),r.jsx(l.View,{flexGrow:1,children:e.label}),d&&r.jsx(l.View,{marginLeft:8,...o==null?void 0:o.submenuIndicator,children:r.jsx(de,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),u&&d&&r.jsx(jn,{items:e.items||[],side:"right",align:"start",views:o})]})},Di=({views:e,...o})=>r.jsx(l.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.divider,...o}),Ky=({trigger:e,items:o,side:t="bottom",align:n="start",views:a,themeMode:i,...s})=>r.jsxs(l.View,{position:"relative",display:"inline-block",...a==null?void 0:a.container,...s,children:[r.jsx(Ai,{views:a,children:e}),r.jsx(jn,{items:o,side:t,align:n,views:a})]}),Xy=({trigger:e,items:o,size:t="md",variant:n="default",side:a="bottom",align:i="start",defaultOpen:s=!1,views:c,...d})=>{const{isOpen:u,setIsOpen:m,activeSubmenuId:g,setActiveSubmenuId:h}=Ny(s),f=p.useRef(null);return r.jsx(Yy,{value:{isOpen:u,setIsOpen:m,activeSubmenuId:g,setActiveSubmenuId:h,size:t,variant:n,triggerRef:f},children:r.jsx(Ky,{trigger:e,items:o,side:a,align:i,views:c,...d})})},ur=Xy;ur.Trigger=Ai;ur.Content=jn;ur.Item=Ei;ur.Divider=Di;const Jy=e=>{const{value:o,defaultValue:t="",onChange:n,onChangeComplete:a,isOpen:i,onOpen:s,onClose:c,closeOnSelect:d=!0,maxRecentColors:u=8,showRecentColors:m=!0}=e,[g,h]=p.useState(i??!1),[f,y]=p.useState(o??t),[k,b]=p.useState(""),[C,S]=p.useState([]),w=p.useRef(null),j=p.useRef(null);p.useEffect(()=>{o!==void 0&&y(o)},[o]),p.useEffect(()=>{i!==void 0&&h(i)},[i]),p.useEffect(()=>{if(m&&typeof localStorage<"u"){const I=localStorage.getItem("colorPicker-recentColors");if(I)try{S(JSON.parse(I))}catch{}}},[m]),p.useEffect(()=>{if(typeof document>"u"||typeof document.addEventListener!="function")return;const I=V=>{g&&w.current&&j.current&&!w.current.contains(V.target)&&!j.current.contains(V.target)&&E()};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[g]);const x=p.useCallback(I=>{m&&S(V=>{const H=V.filter(P=>P!==I),z=[I,...H].slice(0,u);return typeof localStorage<"u"&&localStorage.setItem("colorPicker-recentColors",JSON.stringify(z)),z})},[m,u]),v=p.useCallback(()=>{const I=!g;h(I),I?s==null||s():c==null||c()},[g,s,c]),T=p.useCallback(I=>{y(I),x(I),n==null||n(I),a==null||a(I),d&&(h(!1),c==null||c())},[n,a,d,c,x]),F=p.useCallback(I=>{b(I)},[]),M=p.useCallback(()=>{k&&(T(k),b(""))},[k,T]),E=p.useCallback(()=>{h(!1),c==null||c()},[c]);return{isOpen:g,selectedColor:f,recentColors:C,customColor:k,handleToggle:v,handleColorSelect:T,handleCustomColorChange:F,handleCustomColorSubmit:M,handleClose:E,triggerRef:w,dropdownRef:j}},To={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},dropdown:{position:"absolute",top:"calc(100% + 8px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.14)",padding:"16px",minWidth:"320px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(6, 36px)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"12px",marginBottom:"16px"},customInput:{marginBottom:"12px"},recentColors:{borderTop:"1px solid color-gray-100",paddingTop:"12px"}},Qy={xs:{height:"32px",fontSize:"12px",padding:"4px 8px"},sm:{height:"40px",fontSize:"12px",padding:"8px 10px"},md:{height:"44px",fontSize:"14px",padding:"10px 12px"},lg:{height:"48px",fontSize:"16px",padding:"12px 14px"},xl:{height:"56px",fontSize:"18px",padding:"14px 16px"}},Zy={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},ex={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"}},ox=[{name:"Blue",value:"#1D4ED8",category:"primary"},{name:"Purple",value:"#A855F7",category:"primary"},{name:"Green",value:"#22C55E",category:"primary"},{name:"Orange",value:"#F97316",category:"primary"},{name:"Red",value:"#EF4444",category:"primary"},{name:"Ink",value:"#111827",category:"neutral"}],rx=typeof navigator<"u"&&navigator.product!=="ReactNative"&&typeof document<"u"&&typeof document.createElement=="function",tx=({id:e,name:o,label:t,placeholder:n="Select a color",helperText:a,views:i={},size:s="md",shape:c="default",variant:d="default",error:u=!1,isDisabled:m=!1,isReadOnly:g=!1,predefinedColors:h=ox,showCustomInput:f=!0,showRecentColors:y=!0,isOpen:k,selectedColor:b,recentColors:C,customColor:S,handleToggle:w,handleColorSelect:j,handleCustomColorChange:x,handleCustomColorSubmit:v,handleClose:T,triggerRef:F,dropdownRef:M,onChange:E,onChangeComplete:I,onOpen:V,onClose:H,colorFormat:z,maxRecentColors:P,closeOnSelect:R,defaultValue:W,value:D,...L})=>{const O={...To.container,...i==null?void 0:i.container},$={...To.trigger,...Qy[s],...Zy[c],...ex[d],...u&&{borderColor:"color-red-500"},...m&&{opacity:.6,cursor:"not-allowed"},...!m&&!g&&{_hover:{borderColor:"color-gray-400"}},...i==null?void 0:i.trigger},_={...To.dropdown,...i==null?void 0:i.dropdown},B={...To.colorGrid,...i==null?void 0:i.colorGrid},G={...To.recentColors,...i==null?void 0:i.recentColors},N=b||"color-gray-200";return r.jsxs(l.View,{...O,...L,children:[t&&r.jsx(l.Text,{fontSize:"12px",lineHeight:"16px",fontWeight:"500",color:"color-gray-600",marginBottom:"6px",...i==null?void 0:i.label,children:t}),r.jsxs(l.View,{ref:F,onClick:m||g?void 0:w,...$,children:[r.jsxs(l.Horizontal,{alignItems:"center",gap:8,children:[r.jsx(l.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:N,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"}),r.jsx(l.Text,{color:b?"color-gray-900":"color-gray-500",fontSize:"inherit",children:b||n})]}),!g&&!m&&r.jsx(de,{widthHeight:16,color:"color-gray-500",orientation:k?"up":"down"})]}),k&&r.jsxs(l.View,{ref:M,..._,children:[r.jsx(l.View,{...B,children:h.map((A,Y)=>r.jsx(l.View,{width:"36px",height:"36px",borderRadius:"8px",backgroundColor:A.value,borderWidth:"1px",borderStyle:"solid",borderColor:b===A.value?"theme-primary":"transparent",cursor:"pointer",onClick:()=>j(A.value),title:A.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"},...i==null?void 0:i.colorSwatch},Y))}),f&&r.jsxs(l.View,{...To.customInput,...i==null?void 0:i.customInput,children:[r.jsxs(l.Horizontal,{gap:8,alignItems:"center",marginBottom:"10px",children:[rx&&r.jsx("input",{type:"color",value:S||"#1D4ED8",onChange:A=>{const Y=A.target.value;x(Y),j(Y)},style:{width:"36px",height:"36px",border:"1px solid #E5E7EB",borderRadius:"8px",cursor:"pointer",backgroundColor:"transparent"},title:"Pick a color"}),r.jsx(l.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:"HEX"})]}),r.jsx(Fe,{placeholder:"#1D4ED8",value:S,onChange:A=>{var Y;return x(typeof A=="string"?A:((Y=A==null?void 0:A.target)==null?void 0:Y.value)??"")},onKeyPress:A=>{A.key==="Enter"&&v()},size:"sm",right:S&&r.jsx(l.View,{width:"18px",height:"18px",borderRadius:"6px",backgroundColor:S,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",onClick:v})})]}),y&&C.length>0&&r.jsxs(l.View,{...G,children:[r.jsx(l.Text,{fontSize:"11px",lineHeight:"16px",fontWeight:"500",color:"color-gray-500",marginBottom:"8px",children:"Recent Colors"}),r.jsx(l.Horizontal,{gap:8,flexWrap:"wrap",children:C.map((A,Y)=>r.jsx(l.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:A,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>j(A),title:A,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"}},Y))})]})]}),a&&r.jsx(l.Text,{fontSize:"11px",lineHeight:"16px",color:u?"color-red-500":"color-gray-500",marginTop:"4px",...i==null?void 0:i.helperText,children:a})]})},nx=e=>{const o=Jy(e);return r.jsx(tx,{...o,...e})},$i=nx,ax=e=>{const o=di(e);return r.jsx(ui,{...o,...e})},lx=ax,ix=e=>{const o=si(e);return r.jsx(ci,{...o,...e})},sx=ix,sa={"to-right":"to right","to-left":"to left","to-bottom":"to bottom","to-top":"to top","to-top-right":"to top right","to-top-left":"to top left","to-bottom-right":"to bottom right","to-bottom-left":"to bottom left"},br={center:"center",top:"top",right:"right",bottom:"bottom",left:"left","top-right":"top right","top-left":"top left","bottom-right":"bottom right","bottom-left":"bottom left"},cx={linear:[{color:"color-blue-500",position:"0%"},{color:"color-purple-500",position:"100%"}],radial:[{color:"color-blue-500",position:"0%"},{color:"color-purple-500",position:"100%"}],conic:[{color:"color-red-500",position:"0deg"},{color:"color-yellow-500",position:"90deg"},{color:"color-green-500",position:"180deg"},{color:"color-blue-500",position:"270deg"},{color:"color-red-500",position:"360deg"}]},dx=(e,o,t,n,a)=>{const i=o.map(s=>`${s.color} ${s.position||""}`).join(", ");switch(e){case"linear":return`linear-gradient(${t&&sa[t]?sa[t]:t||"to right"}, ${i})`;case"radial":const c=a&&br[a]?br[a]:a||"center";return`radial-gradient(${n||"circle"} at ${c}, ${i})`;case"conic":return`conic-gradient(from 0deg at ${a&&br[a]?br[a]:a||"center"}, ${i})`;default:return`linear-gradient(to right, ${i})`}},ux={linear:{backgroundSize:"200% 200%",transition:"background-position 3s ease-in-out",animate:{from:{backgroundPosition:"0% 50%"},"50%":{backgroundPosition:"100% 50%"},to:{backgroundPosition:"0% 50%"}}},radial:{backgroundSize:"100% 100%",transition:"background-position 3s ease-in-out, background-size 3s ease-in-out",animate:{from:{backgroundPosition:"center",backgroundSize:"100% 100%"},"50%":{backgroundSize:"120% 120%"},to:{backgroundPosition:"center",backgroundSize:"100% 100%"}}},conic:{transition:"transform 3s linear",animate:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}}},ca={container:{position:"relative",overflow:"hidden",borderRadius:"8px",transition:"border-radius 0.2s ease, opacity 0.2s ease"},content:{position:"relative",zIndex:1,width:"100%",height:"100%",padding:"16px"}},px=({type:e="linear",direction:o="to-right",shape:t="circle",position:n="center",from:a,to:i,colors:s,animate:c=!1,animationDuration:d=3,children:u,views:m,themeMode:g,...h})=>{const f=p.useMemo(()=>s&&s.length>0?s:a&&i?[{color:a,position:"0%"},{color:i,position:"100%"}]:cx[e],[s,a,i,e]),y=p.useMemo(()=>{const b=f.map(C=>({...C,color:C.color}));return dx(e,b,o,t,n)},[e,f,o,t,n]),k=p.useMemo(()=>{if(!c)return{};const b=ux[e];return{...b,transition:b.transition.replace("3s",`${d}s`),animationDuration:`${d}s`,animationIterationCount:"infinite",animationTimingFunction:e==="conic"?"linear":"ease-in-out"}},[c,d,e]);return r.jsx(l.View,{background:y,...ca.container,...k,...m==null?void 0:m.container,...h,children:u&&r.jsx(l.View,{...ca.content,...m==null?void 0:m.content,children:u})})},Li=e=>r.jsx(px,{...e}),mx=(e=null,o=null)=>{const[t,n]=p.useState(e),[a,i]=p.useState(o),s=d=>a===d,c=d=>{i(u=>u===d?null:d)};return p.useEffect(()=>{const d=m=>{!m.composedPath().some(f=>(f==null?void 0:f.id)==="menubar-content"||(f==null?void 0:f.id)==="menubar-trigger")&&a!==null&&i(null)},u=m=>{m.key==="Escape"&&a!==null&&i(null)};if(typeof(document==null?void 0:document.addEventListener)=="function")return document.addEventListener("mousedown",d),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",u)}},[a]),{activeMenuId:t,setActiveMenuId:n,openMenuId:a,setOpenMenuId:i,isMenuOpen:s,toggleMenu:c}},_i={sm:{padding:"6px 10px",fontSize:"14px"},md:{padding:"8px 12px",fontSize:"16px"},lg:{padding:"10px 16px",fontSize:"18px"}},gx={default:{backgroundColor:"transparent",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},hx={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},vr={active:{backgroundColor:"color-gray-200",fontWeight:"bold"},hover:{backgroundColor:"color-gray-100"},disabled:{opacity:.5,cursor:"not-allowed"}},Bi=p.createContext({activeMenuId:null,setActiveMenuId:()=>{},openMenuId:null,setOpenMenuId:()=>{},isMenuOpen:()=>!1,toggleMenu:()=>{},orientation:"horizontal",size:"md",variant:"default",triggerRefs:{current:{}}}),Xr=()=>p.useContext(Bi),fx=({value:e,children:o})=>r.jsx(Bi.Provider,{value:e,children:o}),Oi=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",views:a,...i})=>{const s=o==="horizontal"?l.Horizontal:l.Vertical;return r.jsx(s,{role:"menubar","aria-orientation":o,...hx[o],...gx[n],...a==null?void 0:a.container,...i,children:e})},Ni=({children:e,id:o,disabled:t=!1,views:n})=>{const{orientation:a}=Xr(),i=a==="horizontal"?l.Horizontal:l.Vertical;return r.jsx(i,{role:"none",position:"relative",opacity:t?.5:1,pointerEvents:t?"none":"auto",...n==null?void 0:n.menu,children:p.Children.map(e,s=>p.isValidElement(s)?p.cloneElement(s,{...s.props,menuId:o}):s)})},qi=({children:e,menuId:o,disabled:t=!1,views:n})=>{const{activeMenuId:a,setActiveMenuId:i,toggleMenu:s,isMenuOpen:c,size:d,triggerRefs:u}=Xr(),m=p.useRef(null),g=a===o,h=c(o);p.useEffect(()=>(m.current&&o&&(u.current[o]=m.current),()=>{o&&delete u.current[o]}),[o,u]);const f=()=>{t||(i(o),s(o))};return r.jsx(l.View,{ref:m,id:"menubar-trigger",role:"menuitem","aria-haspopup":"true","aria-expanded":h,userSelect:"none",display:"flex",alignItems:"center",justifyContent:"space-between",..._i[d],...g?vr.active:{},...t?vr.disabled:{},_hover:t?{}:vr.hover,onClick:f,...n==null?void 0:n.trigger,children:e})},Ui=({children:e,menuId:o,views:t})=>{const{isMenuOpen:n,orientation:a,triggerRefs:i}=Xr(),s=p.useRef(null),[c,d]=p.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),u=n(o);if(p.useEffect(()=>{if(u&&s.current&&o&&i.current[o]){const g=s.current.getBoundingClientRect(),h=i.current[o].getBoundingClientRect(),f=Math.max(g.width||200,200),y=Math.max(g.height||150,150),k=window.innerWidth,b=window.innerHeight,C={top:h.top,right:k-h.right,bottom:b-h.bottom,left:h.left},S=a==="horizontal"?[{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:h.left,y:h.top-y-8},{placement:"right",space:C.right,fits:C.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:C.left,fits:C.left>=f+8,x:h.left-f-8,y:h.top}]:[{placement:"right",space:C.right,fits:C.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:C.left,fits:C.left>=f+8,x:h.left-f-8,y:h.top},{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:h.left,y:h.top-y-8}],w=S.find(T=>T.fits);if(w){d({x:w.x,y:w.y,placement:w.placement});return}const j=S.reduce((T,F)=>F.space>T.space?F:T);let x=j.x,v=j.y;x+f>k&&(x=k-f-8),x<8&&(x=8),v+y>b&&(v=b-y-8),v<8&&(v=8),d({x,y:v,placement:j.placement})}},[u,a,o,i]),!u)return null;const m={position:"fixed",left:c.x,top:c.y,zIndex:1e3};return r.jsx(l.View,{ref:s,id:"menubar-content",role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:m,...t==null?void 0:t.content,children:e})},Gi=({children:e,icon:o,disabled:t=!1,onClick:n,views:a})=>{const{size:i}=Xr(),s=()=>{t||!n||n()};return r.jsxs(l.View,{role:"menuitem",cursor:t?"not-allowed":"pointer",userSelect:"none",display:"flex",alignItems:"center",opacity:t?.5:1,..._i[i],_hover:t?{}:vr.hover,onClick:s,...a==null?void 0:a.item,children:[o&&r.jsx(l.View,{marginRight:8,...a==null?void 0:a.icon,children:o}),e]})},Yi=({views:e})=>r.jsx(l.View,{role:"separator",height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.separator}),yx=({items:e,orientation:o,size:t,variant:n,views:a,themeMode:i})=>r.jsx(Oi,{orientation:o,size:t,variant:n,views:a,children:e.map(s=>r.jsxs(Ni,{id:s.id,disabled:s.disabled,views:a,children:[r.jsxs(qi,{menuId:s.id,views:a,children:[s.icon&&r.jsx(l.View,{marginRight:8,...a==null?void 0:a.icon,children:s.icon}),s.label]}),s.items&&s.items.length>0&&r.jsx(Ui,{menuId:s.id,views:a,children:s.items.map((c,d)=>c.separator?r.jsx(Yi,{views:a},`separator-${d}`):r.jsx(Gi,{id:c.id,icon:c.icon,disabled:c.disabled,onClick:c.onClick,views:a,children:c.label},c.id))})]},s.id))}),xx=({items:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultActiveMenuId:a=null,defaultOpenMenuId:i=null,views:s,...c})=>{const{activeMenuId:d,setActiveMenuId:u,openMenuId:m,setOpenMenuId:g,isMenuOpen:h,toggleMenu:f}=mx(a,i),y=p.useRef({});return r.jsx(fx,{value:{activeMenuId:d,setActiveMenuId:u,openMenuId:m,setOpenMenuId:g,isMenuOpen:h,toggleMenu:f,orientation:o,size:t,variant:n,triggerRefs:y},children:r.jsx(yx,{items:e,orientation:o,size:t,variant:n,views:s,...c})})},xo=xx;xo.Root=Oi;xo.Menu=Ni;xo.Trigger=qi;xo.Content=Ui;xo.Item=Gi;xo.Separator=Yi;const bx=(e,o,t)=>{const[n,a]=p.useState([]);return p.useEffect(()=>{a((()=>{const s=[];if(o<=t)for(let c=1;c<=o;c++)s.push(c);else{s.push(1);let c=Math.max(2,e-Math.floor((t-2)/2)),d=Math.min(o-1,c+t-3);d>=o-1&&(d=o-1,c=Math.max(2,d-(t-3))),c>2&&s.push("...");for(let u=c;u<=d;u++)s.push(u);d<o-1&&s.push("..."),s.push(o)}return s})())},[e,o,t]),{visiblePageNumbers:n}},Io={sm:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px",media:{mobile:{fontSize:"11px",padding:"3px 6px",minWidth:"24px",height:"24px"}}},md:{fontSize:"14px",padding:"6px 10px",minWidth:"32px",height:"32px",media:{mobile:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px"}}},lg:{fontSize:"14px",padding:"8px 12px",minWidth:"36px",height:"36px",media:{mobile:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px"}}}},Xo={default:{backgroundColor:"transparent",color:"color-gray-800",borderWidth:"0px",borderStyle:"none",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-100"}},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",borderWidth:"0px",borderStyle:"none",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-200"}},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-100"}}},Jo={rounded:{borderRadius:8},square:{borderRadius:"0px"},circular:{borderRadius:"50%"}},kx={backgroundColor:"theme-primary",color:"color-white",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"theme-primary",opacity:.9}},kr={opacity:.5,cursor:"not-allowed",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"transparent"}},Cx=({currentPage:e,totalPages:o,onPageChange:t,pageSize:n=10,pageSizeOptions:a=[{label:"10 / page",value:10},{label:"20 / page",value:20},{label:"50 / page",value:50},{label:"100 / page",value:100}],onPageSizeChange:i,showPageSizeSelector:s=!1,showPageInfo:c=!0,maxPageButtons:d=5,showFirstLastButtons:u=!1,size:m="md",variant:g="default",shape:h="rounded",visiblePageNumbers:f=[],views:y,...k})=>{const b=w=>{w<1||w>o||w===e||t(w)},C=w=>{i&&i(Number(w.target.value))},S=(w,j)=>{if(w==="...")return r.jsx(l.View,{display:"flex",alignItems:"center",justifyContent:"center",...Io[m],...y==null?void 0:y.ellipsis,children:"..."},`ellipsis-${j}`);const x=w===e;return r.jsx(l.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:x?"default":"pointer",...Io[m],...Xo[g],...Jo[h],...x?kx:{},onClick:()=>b(w),"aria-label":`Page ${w}`,"aria-current":x?"page":void 0,...x?y==null?void 0:y.activePageButton:y==null?void 0:y.pageButton,children:w},`page-${w}`)};return r.jsxs(l.Horizontal,{alignItems:"center",gap:8,...y==null?void 0:y.container,...k,children:[u&&r.jsxs(l.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...Io[m],...Xo[g],...Jo[h],...e===1?kr:{},onClick:()=>b(1),"aria-label":"First page",disabled:e===1,...y==null?void 0:y.navigationButton,children:[r.jsx(de,{orientation:"left",widthHeight:16}),r.jsx(de,{orientation:"left",widthHeight:16,marginLeft:"-8px"})]}),r.jsx(l.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...Io[m],...Xo[g],...Jo[h],...e===1?kr:{},onClick:()=>b(e-1),"aria-label":"Previous page",disabled:e===1,...y==null?void 0:y.navigationButton,children:r.jsx(de,{orientation:"left",widthHeight:16})}),f.map((w,j)=>S(w,j)),r.jsx(l.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...Io[m],...Xo[g],...Jo[h],...e===o?kr:{},onClick:()=>b(e+1),"aria-label":"Next page",disabled:e===o,...y==null?void 0:y.navigationButton,children:r.jsx(de,{orientation:"right",widthHeight:16})}),u&&r.jsxs(l.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...Io[m],...Xo[g],...Jo[h],...e===o?kr:{},onClick:()=>b(o),"aria-label":"Last page",disabled:e===o,...y==null?void 0:y.navigationButton,children:[r.jsx(de,{orientation:"right",widthHeight:16}),r.jsx(de,{orientation:"right",widthHeight:16,marginLeft:"-8px"})]}),c&&r.jsxs(l.Text,{marginLeft:16,color:"color-gray-600",...y==null?void 0:y.pageInfo,children:["Page ",e," of ",o]}),s&&i&&r.jsx(l.View,{as:"select",marginLeft:16,padding:"4px 8px",borderRadius:"4px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"color-white",cursor:"pointer",value:n,onChange:C,...y==null?void 0:y.pageSizeSelector,children:a.map(w=>r.jsx("option",{value:w.value,children:w.label},w.value))})]})},Sx=({currentPage:e,totalPages:o,onPageChange:t,pageSize:n=10,pageSizeOptions:a,onPageSizeChange:i,showPageSizeSelector:s=!1,showPageInfo:c=!0,maxPageButtons:d=5,showFirstLastButtons:u=!1,size:m="md",variant:g="default",shape:h="rounded",views:f,...y})=>{const{visiblePageNumbers:k}=bx(e,o,d);return r.jsx(Cx,{currentPage:e,totalPages:o,onPageChange:t,pageSize:n,pageSizeOptions:a,onPageSizeChange:i,showPageSizeSelector:s,showPageInfo:c,maxPageButtons:d,showFirstLastButtons:u,size:m,variant:g,shape:h,visiblePageNumbers:k,views:f,...y})},Ki=Sx,jx=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),wx=p.memo(({shape:e="linear",value:o=0,max:t=100,color:n="theme-primary",backgroundColor:a="color-gray-200",height:i,size:s,radius:c=4,strokeWidth:d=10,showLabel:u=!1,labelColor:m="color-black-primary",animated:g=!0,animationDuration:h="0.5s",views:f,themeMode:y,...k})=>{var E;const{getColor:b,themeMode:C}=l.useTheme(),S=y||C,j=Math.min(t,Math.max(0,o))/t*100,x=I=>jx(I)?I:b(I,{themeMode:S}),v=p.useMemo(()=>x(a),[b,a,S]),T=p.useMemo(()=>x(n),[b,n,S]);if(e==="circle"){const I=s||(typeof i=="number"?i:100),V=(I-d)/2,H=2*Math.PI*V,z=H-j/100*H;return r.jsxs(l.View,{width:I,height:I,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...f==null?void 0:f.container,...k,children:[r.jsxs("svg",{width:I,height:I,viewBox:`0 0 ${I} ${I}`,style:{transform:"rotate(-90deg)"},children:[r.jsx("circle",{cx:I/2,cy:I/2,r:V,stroke:v,strokeWidth:d,fill:"transparent",...f==null?void 0:f.track}),r.jsx("circle",{cx:I/2,cy:I/2,r:V,stroke:T,strokeWidth:d,strokeDasharray:H,strokeDashoffset:z,strokeLinecap:"round",fill:"transparent",style:{transition:g?`stroke-dashoffset ${h} ease-in-out`:"none"},...f==null?void 0:f.indicator})]}),u&&r.jsx(l.View,{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",children:r.jsxs(l.Text,{color:m,fontSize:`${I*.2}px`,fontWeight:"bold",...f==null?void 0:f.text,children:[Math.round(j),"%"]})})]})}const F=i||8,M={backgroundColor:v,...((E=f==null?void 0:f.container)==null?void 0:E.style)||{},...k.style||{}};return r.jsxs(l.View,{role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":t,width:"100%",height:F,borderRadius:c,overflow:"hidden",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...f==null?void 0:f.container,...k,style:M,children:[r.jsx("div",{style:{height:"100%",backgroundColor:T,borderRadius:typeof c=="number"?`${c}px`:c,position:"absolute",left:0,top:0,bottom:0,width:`${j}%`,transition:g?`width ${h} ease-in-out`:"none",...f==null?void 0:f.bar}}),u&&r.jsxs(l.Text,{color:m,fontSize:typeof F=="number"&&F>16?`${F*.6}px`:"10px",fontWeight:"bold",position:"relative",zIndex:1,...f==null?void 0:f.text,children:[Math.round(j),"%"]})]})}),vx=e=>{const o=he("progress",e);return r.jsx(wx,{...o})},Xi=vx,Tx=e=>({solid:"solid",dashed:"dashed",dotted:"dotted"}),Ix=Tx(),Rx={thin:"1px",medium:"2px",thick:"4px"},Qo={container:{transition:"opacity 0.15s ease"},label:{fontSize:"14px",fontWeight:"500",color:"color-gray-600",paddingHorizontal:"8px",backgroundColor:"color-white",transition:"color 0.15s ease"}},Fx=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),zx=({orientation:e="horizontal",variant:o="solid",thickness:t="thin",color:n,spacing:a="0px",label:i,decorative:s=!1,views:c,themeMode:d,...u})=>{const{themeMode:m}=l.useTheme(),g=n||"color-gray-200",h=Ix[o],f=Rx[t],y=s?{"aria-hidden":!0}:{role:"separator","aria-orientation":e},k=Fx(g)?{style:{borderColor:g}}:{borderColor:g};return i&&e==="horizontal"?r.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"center",width:"100%",padding:a,...y,...u,children:[r.jsx(l.View,{height:"0px",flexGrow:1,borderTop:`${f} ${h}`,...k,...Qo.container,...c==null?void 0:c.container}),r.jsx(l.Text,{...Qo.label,...c==null?void 0:c.label,children:i}),r.jsx(l.View,{height:"0px",flexGrow:1,borderTop:`${f} ${h}`,...k,...Qo.container,...c==null?void 0:c.container})]}):e==="horizontal"?r.jsx(l.View,{height:"0px",width:"100%",borderTop:`${f} ${h}`,padding:a,...k,...Qo.container,...y,...c==null?void 0:c.container,...u}):r.jsx(l.View,{width:"0px",height:"100%",borderLeft:`${f} ${h}`,padding:a,...k,...Qo.container,...y,...c==null?void 0:c.container,...u})},Ji=e=>{const o=he("separator",e);return r.jsx(zx,{...o})},$r=Ji,Mx=Ji,Wx={xs:12,sm:14,md:16,lg:18,xl:20},Hx=({isSupported:e,isSharing:o,onShare:t,label:n,children:a,icon:i,size:s,isDisabled:c,isLoading:d,iconPosition:u,disableWhenUnsupported:m=!0,...g})=>{const h=s??"md",f=i??r.jsx(Na,{widthHeight:Wx[h],strokeWidth:1.5,filled:!1}),y=!!c||!e&&m,k=!!d||o;return r.jsx(ce,{...g,size:h,icon:f,iconPosition:u??"left",isDisabled:y,isLoading:k,onClick:t,children:a??n??"Share"})},da=()=>typeof navigator>"u"?void 0:navigator,Px=(e,o)=>{if(!e||typeof e.share!="function")return!1;if(typeof e.canShare=="function")try{return e.canShare(o)}catch{return!1}return!0},Vx=e=>{if(typeof e=="object"&&e!==null&&"name"in e)return String(e.name)},Ax=e=>{const{shareData:o,onClick:t,onUnsupported:n,onShareStart:a,onShareSuccess:i,onShareCancel:s,onShareError:c}=e,[d,u]=p.useState(!1),m=p.useMemo(()=>Px(da(),o),[o]),g=p.useCallback((...h)=>{t==null||t(...h);const f=da();if(!f||typeof f.share!="function"){n==null||n();return}if(!d){if(typeof f.canShare=="function")try{if(!f.canShare(o)){n==null||n();return}}catch(y){c==null||c(y);return}u(!0),a==null||a();try{f.share(o).then(()=>{i==null||i()}).catch(y=>{if(Vx(y)==="AbortError"){s==null||s();return}c==null||c(y)}).finally(()=>{u(!1)})}catch(y){u(!1),c==null||c(y)}}},[d,t,s,c,a,i,n,o]);return{isSupported:m,isSharing:d,handleShare:g}},Ex=e=>{const{isSupported:o,isSharing:t,handleShare:n}=Ax(e),{shareData:a,onShareStart:i,onShareSuccess:s,onShareCancel:c,onShareError:d,onUnsupported:u,onClick:m,...g}=e;return r.jsx(Hx,{...g,isSupported:o,isSharing:t,onShare:n})},Qi=Ex,Dx=({label:e,status:o="default",views:t,themeMode:n,...a})=>{const{themeMode:i}=l.useTheme(),s=ol();return r.jsxs(l.Horizontal,{alignItems:"center",gap:8,role:"status-indicator",...t==null?void 0:t.container,...a,children:[r.jsx(l.View,{role:"status-dot",width:"8px",height:"8px",borderRadius:"50%",...s[o].indicator,...t==null?void 0:t.indicator}),e&&r.jsx(l.Text,{role:"status-label",fontSize:"14px",lineHeight:"20px",...s[o].label,...t==null?void 0:t.label,children:e})]})},Tr=e=>{const o=he("status",e);return r.jsx(Dx,{...o})},$x=(e=!0,o,t,n)=>{const{on:a}=l.useResponsive(),i=a("mobile"),[s,c]=p.useState(o!==void 0?o:e);return p.useEffect(()=>{o!==void 0&&c(o)},[o]),{isExpanded:s,toggleExpanded:()=>{const g=!s;c(g),t&&t(g)},expand:()=>{s||(c(!0),t&&t(!0))},collapse:()=>{s&&(c(!1),t&&t(!1))},isMobile:i}},Lx={sm:{expandedWidth:"240px",collapsedWidth:"64px"},md:{expandedWidth:"280px",collapsedWidth:"72px"},lg:{expandedWidth:"320px",collapsedWidth:"80px"},xl:{expandedWidth:"360px",collapsedWidth:"88px"}},_x=e=>({default:{backgroundColor:"color-white",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},subtle:{backgroundColor:"color-gray-50",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease"},elevated:{backgroundColor:"color-white",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",color:"color-gray-800",transition:"all 0.2s ease-in-out"}}),Bx=_x(),Ox={left:{left:0,borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{right:0,borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"}},Nx={none:{},low:{boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)"},medium:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.12)"},high:{boxShadow:"0 10px 30px rgba(0, 0, 0, 0.15)"}},qx={fast:"all 0.2s ease-in-out",normal:"all 0.3s ease-in-out",slow:"all 0.5s ease-in-out",bounce:"all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55)"},Zi=p.createContext({isExpanded:!0,toggleExpanded:()=>{},expand:()=>{},collapse:()=>{},position:"left",size:"md",variant:"default"}),Jr=()=>p.useContext(Zi),Ux=({value:e,children:o})=>r.jsx(Zi.Provider,{value:e,children:o}),Gx=({children:e,showToggleButton:o=!0,views:t,...n})=>{const{isExpanded:a,toggleExpanded:i,position:s}=Jr();return r.jsx(l.Horizontal,{width:"100%",padding:"16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:"space-between",...t==null?void 0:t.header,...n,children:a?r.jsxs(l.Horizontal,{width:"100%",alignItems:"center",justifyContent:"space-between",children:[e,o&&r.jsx(l.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},onClick:i,"aria-label":a?"Collapse sidebar":"Expand sidebar",...t==null?void 0:t.toggleButton,children:r.jsx(de,{orientation:s==="left"?"left":"right",widthHeight:16,...t==null?void 0:t.toggleButtonIcon})})]}):r.jsx(l.View,{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",children:o&&r.jsx(l.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},onClick:i,"aria-label":a?"Collapse sidebar":"Expand sidebar",...t==null?void 0:t.toggleButton,children:r.jsx(de,{orientation:s==="left"?"right":"left",widthHeight:16,...t==null?void 0:t.toggleButtonIcon})})})})},Yx=({children:e,views:o,...t})=>{const{isExpanded:n}=Jr();return r.jsx(l.View,{flex:"1",width:"100%",overflowY:"auto",overflowX:"hidden",padding:n?"16px":"8px",...o==null?void 0:o.content,...t,children:e})},Kx=({children:e,views:o,...t})=>{const{isExpanded:n}=Jr();return r.jsx(l.View,{width:"100%",padding:n?"16px":"8px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",...o==null?void 0:o.footer,...t,children:e})},Xx=({children:e,position:o="left",size:t="md",variant:n="default",fixed:a=!1,hasBackdrop:i=!0,expandedWidth:s,collapsedWidth:c,breakpoint:d,breakpointBehavior:u="overlay",elevation:m="none",transitionPreset:g="normal",ariaLabel:h="Sidebar navigation",showToggleButton:f,toggleExpanded:y,expand:k,isExpanded:b,isMobile:C,collapse:S,views:w,themeMode:j,...x})=>{const v=Lx[t],T=b?s||v.expandedWidth:c||v.collapsedWidth,F=!C||C&&u!=="hide",M=a||C&&u==="overlay"?"fixed":"relative",E=i&&C&&b&&u==="overlay";return r.jsxs(r.Fragment,{children:[E&&r.jsx(l.View,{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"color-dark-50-360",zIndex:998,onClick:S,...w==null?void 0:w.backdrop}),F&&r.jsx(l.Vertical,{position:M,top:0,height:"100vh",width:T,zIndex:999,transition:qx[g],transform:C&&u==="overlay"&&!b?`translateX(${o==="left"?"-100%":"100%"})`:"translateX(0)",role:"navigation","aria-label":h,...Bx[n],...Ox[o],...Nx[m],...w==null?void 0:w.container,...x,children:p.Children.map(e,I=>I)})]})},Jx=({children:e,position:o="left",size:t="md",variant:n="default",defaultExpanded:a=!0,expanded:i,onExpandedChange:s,fixed:c=!1,hasBackdrop:d=!0,showToggleButton:u=!0,expandedWidth:m,collapsedWidth:g,breakpoint:h=768,breakpointBehavior:f="overlay",views:y,...k})=>{const{isExpanded:b,toggleExpanded:C,expand:S,collapse:w,isMobile:j}=$x(a,i,s);return r.jsx(Ux,{value:{isExpanded:b,toggleExpanded:C,expand:S,collapse:w,position:o,size:t,variant:n,views:y},children:r.jsx(Xx,{position:o,size:t,variant:n,fixed:c,hasBackdrop:d,showToggleButton:u,expandedWidth:m,collapsedWidth:g,breakpoint:h,breakpointBehavior:f,isExpanded:b,isMobile:j,toggleExpanded:C,expand:S,collapse:w,views:y,...k,children:e})})},pr=Jx;pr.Header=Gx;pr.Content=Yx;pr.Footer=Kx;pr.useContext=Jr;const Qx=()=>({getItem:e=>{try{return typeof localStorage>"u"?null:localStorage.getItem(`resizable-${e}`)}catch(o){return console.warn("Failed to access localStorage:",o),null}},setItem:(e,o)=>{try{if(typeof localStorage>"u")return;localStorage.setItem(`resizable-${e}`,o)}catch(t){console.warn("Failed to write to localStorage:",t)}}}),Zx=(e,o,t,n=50,a=1/0,i=!1,s,c,d=10)=>{const[u,m]=p.useState(!1),[g,h]=p.useState([]),f=p.useRef(null),y=p.useRef(null),k=p.useRef(0),b=p.useRef([]),C=p.useRef(c||(typeof window<"u"?Qx():null)),S=p.useCallback(()=>f.current?e==="horizontal"?f.current.offsetWidth:f.current.offsetHeight:0,[e]),w=p.useCallback(()=>{if(!s||!C.current)return null;const P=C.current.getItem(s);if(!P)return null;try{const R=JSON.parse(P);return Array.isArray(R.sizes)?R.sizes:null}catch(R){return console.warn("Failed to parse saved panel sizes:",R),null}},[s]),j=p.useCallback(()=>{if(!s||!C.current||g.length===0)return;const P=g.map(R=>({id:R.id,size:R.size,collapsed:R.collapsed||!1}));C.current.setItem(s,JSON.stringify({sizes:P}))},[s,g]),x=p.useCallback((P,R,W,D,L)=>{h(O=>O.some($=>$.id===P)?O:[...O,{id:P,size:R,minSize:W??n,maxSize:D??a,collapsible:L??i,collapsed:!1}])},[n,a,i]),v=p.useCallback(P=>{h(R=>R.filter(W=>W.id!==P))},[]),T=p.useCallback(P=>{const R=g.find(W=>W.id===P);return R?R.size:0},[g]),F=p.useCallback((P,R)=>{h(W=>W.map(D=>D.id===P?{...D,size:R}:D))},[]),M=p.useCallback(P=>{const R=g.find(W=>W.id===P);return R?!!R.collapsed:!1},[g]),E=p.useCallback(P=>{h(R=>{const W=R.findIndex($=>$.id===P);if(W===-1)return R;const D=R[W];if(!D.collapsible)return R;const L={...D,collapsed:!D.collapsed},O=[...R];return O[W]=L,O})},[]),I=p.useCallback((P,R)=>{y.current=P,k.current=R,b.current=g.map(W=>W.size),m(!0)},[g]),V=p.useCallback(P=>{if(!u||!y.current)return;const R=y.current,W=P-k.current;let D=-1;const L=R.match(/\d+$/);if(L&&(D=parseInt(L[0],10)-1),D===-1&&g.length>=2&&(D=0),D<0||D>=g.length-1)return;const O=g[D],$=g[D+1];if(O.collapsed||$.collapsed)return;let _=b.current[D]+W,B=b.current[D+1]-W;_=Math.max(O.minSize??n,Math.min(O.maxSize??a,_)),B=Math.max($.minSize??n,Math.min($.maxSize??a,B)),h(G=>G.map((N,A)=>A===D?{...N,size:_}:A===D+1?{...N,size:B}:N))},[u,g,e,n,a]),H=p.useCallback(()=>{u&&t&&t(g.map(P=>P.size)),y.current=null,m(!1),s&&j()},[u,g,t,s,j]),z=p.useCallback(P=>{if(!u||!y.current)return;const R=y.current;let W=-1;const D=R.match(/\d+$/);if(D&&(W=parseInt(D[0],10)-1),W===-1&&g.length>=2&&(W=0),W<0||W>=g.length-1)return;let L=0;e==="horizontal"?(P.key==="ArrowLeft"&&(L=-d),P.key==="ArrowRight"&&(L=d),P.key==="Home"&&(L=-100),P.key==="End"&&(L=100)):(P.key==="ArrowUp"&&(L=-d),P.key==="ArrowDown"&&(L=d),P.key==="Home"&&(L=-100),P.key==="End"&&(L=100)),L!==0&&(P.preventDefault(),V(k.current+L)),P.key==="Escape"&&(h(O=>O.map(($,_)=>({...$,size:b.current[_]}))),H())},[u,g,e,V,H,d]);return p.useEffect(()=>{if(typeof(document==null?void 0:document.addEventListener)!="function")return;const P=D=>{if(!u)return;const L=e==="horizontal"?D.clientX:D.clientY;V(L)},R=D=>{if(!u||D.touches.length===0)return;const L=D.touches[0],O=e==="horizontal"?L.clientX:L.clientY;V(O)},W=()=>{u&&H()};return u&&(document.addEventListener("mousemove",P),document.addEventListener("touchmove",R),document.addEventListener("mouseup",W),document.addEventListener("touchend",W),document.addEventListener("keydown",z),document.body.style.cursor=e==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none"),()=>{document.removeEventListener("mousemove",P),document.removeEventListener("touchmove",R),document.removeEventListener("mouseup",W),document.removeEventListener("touchend",W),document.removeEventListener("keydown",z),document.body.style.cursor="",document.body.style.userSelect=""}},[u,e,V,H,z]),p.useEffect(()=>{if(g.length!==0){if(s){const P=w();if(P){h(R=>R.map(W=>{const D=P.find(L=>L.id===W.id);return D?{...W,size:D.size,collapsed:D.collapsed||!1}:W}));return}}if(!o){const R=S()/g.length;h(W=>W.map(D=>({...D,size:R})))}}},[g.length,o,S,s,w]),p.useEffect(()=>{if(!o||o.length===0||g.length===0)return;const P=S(),R=o.map(W=>typeof W=="string"&&W.endsWith("%")?parseFloat(W)/100*P:typeof W=="number"?W:parseFloat(W));h(W=>W.map((D,L)=>({...D,size:L<R.length?R[L]:D.size})))},[o,g.length,S]),p.useEffect(()=>{g.length>0&&s&&!u&&j()},[g,s,u,j]),{isResizing:u,setIsResizing:m,containerRef:f,panels:g,registerPanel:x,unregisterPanel:v,getPanelSize:T,setPanelSize:F,isPanelCollapsed:M,togglePanelCollapse:E,startResize:I,onResize:V,endResize:H}},eb={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},ob=(e,o)=>({sm:{width:o==="horizontal"?"4px":"100%",height:o==="vertical"?"4px":"100%"},md:{width:o==="horizontal"?"6px":"100%",height:o==="vertical"?"6px":"100%"},lg:{width:o==="horizontal"?"8px":"100%",height:o==="vertical"?"8px":"100%"}})[e],rb=e=>({default:{backgroundColor:"transparent",_hover:{backgroundColor:"color-gray-200"},_active:{backgroundColor:"color-gray-300"}},subtle:{backgroundColor:"transparent",_hover:{backgroundColor:"color-gray-100"},_active:{backgroundColor:"color-gray-200"}},prominent:{backgroundColor:"color-gray-100",_hover:{backgroundColor:"color-gray-200"},_active:{backgroundColor:"color-gray-300"}}}),tb=rb(),Cr={horizontal:{width:"2px",height:"20px",backgroundColor:"color-gray-400",margin:"0 1px"},vertical:{width:"20px",height:"2px",backgroundColor:"color-gray-400",margin:"1px 0"}},es=p.createContext({orientation:"horizontal",size:"md",variant:"default",isResizing:!1,setIsResizing:()=>{},registerPanel:()=>{},unregisterPanel:()=>{},getPanelSize:()=>0,setPanelSize:()=>{},isPanelCollapsed:()=>!1,togglePanelCollapse:()=>{},startResize:()=>{},onResize:()=>{},endResize:()=>{}}),os=()=>p.useContext(es),nb=({value:e,children:o})=>r.jsx(es.Provider,{value:e,children:o}),ab=({children:e,id:o,defaultSize:t,minSize:n,maxSize:a,collapsible:i,defaultCollapsed:s,onCollapseChange:c,views:d,...u})=>{const{orientation:m,registerPanel:g,unregisterPanel:h,getPanelSize:f,isPanelCollapsed:y,togglePanelCollapse:k}=os(),b=typeof t=="string"&&t.endsWith("%")?0:typeof t=="number"?t:0;p.useEffect(()=>(g(o,b,n,a,i),()=>h(o)),[o,b,n,a,i,g,h]);const C=f(o),S=y(o);return p.useEffect(()=>{c&&S!==void 0&&c(S)},[S,c]),p.useEffect(()=>{i&&s&&!S&&k(o)},[o,i,s,S,k]),S?r.jsx(l.View,{flex:"0 0 auto",width:m==="horizontal"?"10px":"100%",height:m==="vertical"?"10px":"100%",backgroundColor:"color-gray-200",cursor:"pointer",onClick:()=>k(o),"aria-label":`Expand panel ${o}`,role:"button",tabIndex:0,...d==null?void 0:d.collapsedPanel,...u}):r.jsx(l.View,{flex:C>0?"0 0 auto":"1",width:m==="horizontal"?`${C}px`:"100%",height:m==="vertical"?`${C}px`:"100%",overflow:"auto",...d==null?void 0:d.panel,...u,children:e})},lb=({id:e,position:o="both",disabled:t=!1,withVisualIndicator:n=!0,withCollapseButton:a=!1,collapseTarget:i,views:s,...c})=>{const{orientation:d,size:u,variant:m,startResize:g,isPanelCollapsed:h,togglePanelCollapse:f}=os(),k=(()=>{if(i)return i;const x=e.match(/\d+$/);if(!x)return"";const v=parseInt(x[0],10);return isNaN(v)?"":`panel${v}`})(),b=h(k),C=x=>{if(t)return;x.preventDefault();const v=d==="horizontal"?x.clientX:x.clientY;g(e,v)},S=x=>{if(t||x.touches.length===0)return;x.preventDefault();const v=x.touches[0],T=d==="horizontal"?v.clientX:v.clientY;g(e,T)},w=x=>{t||(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),g(e,0))},j=x=>{x.stopPropagation(),k&&f(k)};return r.jsxs(l.View,{role:"separator","aria-orientation":d,"aria-valuemin":0,"aria-valuemax":100,tabIndex:t?-1:0,cursor:d==="horizontal"?"col-resize":"row-resize",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",...ob(u,d),...tb[m],onMouseDown:C,onTouchStart:S,onKeyDown:w,opacity:t?.5:1,pointerEvents:t?"none":"auto",...s==null?void 0:s.handle,...c,children:[n&&r.jsx(l.View,{display:"flex",alignItems:"center",justifyContent:"center",width:d==="horizontal"?"100%":"auto",height:d==="vertical"?"100%":"auto",pointerEvents:"none",...s==null?void 0:s.handleIcon,children:d==="horizontal"?r.jsxs(l.Horizontal,{gap:1,children:[r.jsx(l.View,{...Cr.horizontal}),r.jsx(l.View,{...Cr.horizontal})]}):r.jsxs(l.Vertical,{gap:1,children:[r.jsx(l.View,{...Cr.vertical}),r.jsx(l.View,{...Cr.vertical})]})}),a&&k&&r.jsx(l.View,{position:"absolute",top:d==="horizontal"?"-20px":"50%",left:d==="horizontal"?"50%":"-20px",transform:d==="horizontal"?"translateX(-50%)":"translateY(-50%)",width:"16px",height:"16px",borderRadius:"full",backgroundColor:"color-gray-100",border:"1px solid",borderColor:"color-gray-300",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:1,onClick:j,"aria-label":b?`Expand panel ${k}`:`Collapse panel ${k}`,role:"button",tabIndex:0,pointerEvents:"auto",_hover:{backgroundColor:"color-gray-200"},...s==null?void 0:s.collapseIcon,children:r.jsx(l.View,{width:"8px",height:"8px",display:"flex",alignItems:"center",justifyContent:"center",children:b?r.jsxs(l.Horizontal,{children:[r.jsx(l.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"}),r.jsx(l.View,{width:"2px",height:"6px",backgroundColor:"color-gray-600",position:"absolute"})]}):r.jsx(l.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"})})})]})},ib=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultSizes:a,minSize:i,maxSize:s,collapsible:c=!1,containerRef:d,autoSaveId:u,keyboardResizeBy:m,onLayout:g,views:h,...f})=>{const y=o==="horizontal"?l.Horizontal:l.Vertical;return r.jsx(y,{ref:d,width:"100%",height:"100%",position:"relative",overflow:"hidden",...eb[o],...h==null?void 0:h.container,...f,children:e})},sb=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultSizes:a,onSizesChange:i,minSize:s=50,maxSize:c,collapsible:d=!1,autoSaveId:u,storage:m,keyboardResizeBy:g=10,views:h,...f})=>{const{isResizing:y,setIsResizing:k,containerRef:b,registerPanel:C,unregisterPanel:S,getPanelSize:w,setPanelSize:j,isPanelCollapsed:x,togglePanelCollapse:v,startResize:T,onResize:F,endResize:M}=Zx(o,a,i,s,c,d,u,m,g);return r.jsx(nb,{value:{orientation:o,size:t,variant:n,isResizing:y,setIsResizing:k,registerPanel:C,unregisterPanel:S,getPanelSize:w,setPanelSize:j,isPanelCollapsed:x,togglePanelCollapse:v,startResize:T,onResize:F,endResize:M},children:r.jsx(ib,{orientation:o,size:t,variant:n,defaultSizes:a,minSize:s,maxSize:c,collapsible:d,autoSaveId:u,keyboardResizeBy:g,containerRef:b,views:h,...f,children:e})})},wn=sb;wn.Panel=ab;wn.Handle=lb;const Sr={info:{container:{backgroundColor:"color-blue-50",border:"color-blue-300"},content:{color:"color-blue-700"},icon:{color:"color-blue-500"}},success:{container:{backgroundColor:"color-green-50",border:"color-green-300"},content:{color:"color-green-700"},icon:{color:"color-green-500"}},warning:{container:{backgroundColor:"color-orange-50",border:"color-orange-300"},content:{color:"color-orange-700"},icon:{color:"color-orange-500"}},error:{container:{backgroundColor:"color-red-50",border:"color-red-300"},content:{color:"color-red-700"},icon:{color:"color-red-500"}}},cb={top:{top:"16px",left:"50%",transform:"translateX(-50%)"},"top-right":{top:"16px",right:"16px"},"top-left":{top:"16px",left:"16px"},bottom:{bottom:"16px",left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:"16px",right:"16px"},"bottom-left":{bottom:"16px",left:"16px"}},db=()=>Math.random().toString(36).substring(2,9);let Ro=new Map;const mr=$o.create(e=>({toasts:[],add:(o,t,n,a={})=>{const i=a.id||db(),s={id:i,variant:o,title:t,description:n,createdAt:Date.now(),isVisible:!0,...a};if(e(c=>({toasts:[...c.toasts,s]})),a.duration!==0){const c=a.duration||5e3,d=setTimeout(()=>{mr.getState().remove(i)},c);Ro.set(i,d)}return i},remove:o=>{e(t=>({toasts:t.toasts.map(n=>n.id===o?{...n,isVisible:!1}:n)})),Ro.has(o)&&(clearTimeout(Ro.get(o)),Ro.delete(o)),setTimeout(()=>{e(t=>({toasts:t.toasts.filter(n=>n.id!==o)}))},300)},removeAll:()=>{Ro.forEach(clearTimeout),Ro.clear(),e(o=>({toasts:o.toasts.map(t=>({...t,isVisible:!1}))})),setTimeout(()=>{e({toasts:[]})},300)}})),bo=(e,o,t,n)=>mr.getState().add(e,o,t,n),rs=(e,o,t)=>bo("info",e,o,t),ts=(e,o,t)=>bo("success",e,o,t),ns=(e,o,t)=>bo("warning",e,o,t),as=(e,o,t)=>bo("error",e,o,t),ls=e=>{mr.getState().remove(e)},is=()=>{mr.getState().removeAll()},ss=({variant:e,title:o,description:t,onClose:n,isClosable:a=!0,action:i,actionText:s,showIcon:c=!0,theme:d,views:u,render:m,icon:g,id:h,isVisible:f=!0,themeMode:y})=>{const k=d??Sr,b=()=>{var j,x;if(g!==void 0)return g;const w=e?(x=(j=Sr[e])==null?void 0:j.icon)==null?void 0:x.color:Sr.info.icon.color;switch(e){case"info":return r.jsx(Ze,{widthHeight:20,color:w});case"success":return r.jsx(Ba,{widthHeight:20,color:w});case"warning":return r.jsx(Ze,{widthHeight:20,color:w,orientation:"down"});case"error":return r.jsx(_r,{widthHeight:20,color:w});default:return r.jsx(Ze,{widthHeight:20,color:Sr.info.icon.color})}};if(m)return r.jsx(r.Fragment,{children:m({id:h||"",onClose:n})});const C=e==="error"?"alert":"status",S=e==="error"||e==="warning"?"assertive":"polite";return r.jsxs(l.Horizontal,{role:C,"aria-live":S,"aria-atomic":"true","data-state":f?"open":"closed",gap:12,width:"100%",maxWidth:"380px",borderWidth:"1px",borderStyle:"solid",borderRadius:"12px",padding:"12px 14px",alignItems:"flex-start",position:"relative",backgroundColor:k[e].container.backgroundColor,borderColor:k[e].container.border,boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",opacity:f?1:0,transform:f?"translateY(0)":"translateY(4px)",transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",...u==null?void 0:u.container,children:[c&&r.jsx(l.View,{marginTop:"2px",...u==null?void 0:u.icon,children:b()}),r.jsxs(l.Vertical,{gap:4,flex:"1",children:[r.jsx(l.Text,{fontSize:"14px",lineHeight:"20px",fontWeight:"600",color:k[e].content.color,backgroundColor:k[e].container.backgroundColor,...u==null?void 0:u.title,children:o}),t&&r.jsx(l.Text,{fontSize:"12px",lineHeight:"18px",color:k[e].content.color,fontWeight:"400",backgroundColor:k[e].container.backgroundColor,...u==null?void 0:u.description,children:t}),i&&s&&r.jsx(l.Text,{fontSize:"14px",fontWeight:"600",marginTop:"6px",cursor:"pointer",color:k[e].content.color,backgroundColor:k[e].container.backgroundColor,onClick:w=>{w.stopPropagation(),i()},_hover:{textDecoration:"underline"},transition:"opacity 0.2s ease, color 0.2s ease",...u==null?void 0:u.actionButton,children:s})]}),a&&r.jsx(l.View,{as:"button","aria-label":"Close toast",backgroundColor:"transparent",border:"none",cursor:"pointer",padding:"4px",marginLeft:"8px",marginTop:"-2px",marginRight:"-4px",borderRadius:"9999px",onClick:w=>{w.stopPropagation(),n()},_hover:{backgroundColor:"color-black-900-60"},transition:"background-color 0.2s ease, opacity 0.2s ease",...u==null?void 0:u.closeButton,children:r.jsx(ze,{widthHeight:16,color:k[e].content.color})})]})},ub=({position:e="top-right",gap:o=8,limit:t=5,containerStyle:n})=>{const{toasts:a,remove:i}=mr(),c=p.useMemo(()=>{const d={top:[],"top-right":[],"top-left":[],bottom:[],"bottom-right":[],"bottom-left":[]};return a.forEach(u=>{const m=u.position||e;d[m].push(u)}),Object.keys(d).forEach(u=>{d[u]=d[u].slice(-t)}),d},[a,e,t])[e];return r.jsx(l.View,{position:"fixed",zIndex:9999,display:"flex",flexDirection:e.includes("bottom")?"column-reverse":"column",gap:`${o}px`,width:"fit-content",maxWidth:"100%",pointerEvents:"none",...cb[e],style:n,children:c.map(d=>r.jsx(l.View,{pointerEvents:"auto",animation:e.includes("right")?"slideInRight 0.3s ease-out, fadeIn 0.3s ease-out":e.includes("left")?"slideInLeft 0.3s ease-out, fadeIn 0.3s ease-out":e.includes("top")?"slideInDown 0.3s ease-out, fadeIn 0.3s ease-out":"slideInUp 0.3s ease-out, fadeIn 0.3s ease-out",children:r.jsx(ss,{id:d.id,variant:d.variant,title:d.title,description:d.description,onClose:()=>i(d.id),isClosable:d.isClosable,action:d.action,actionText:d.actionText,showIcon:d.showIcon,views:d.views,render:d.render,icon:d.icon,isVisible:d.isVisible})},d.id))})},pb=()=>({toast:(e,o,t,n)=>bo(e,o,t,n),info:(e,o,t)=>rs(e,o,t),success:(e,o,t)=>ts(e,o,t),warning:(e,o,t)=>ns(e,o,t),error:(e,o,t)=>as(e,o,t),remove:e=>ls(e),removeAll:()=>is()}),mb=e=>r.jsx(ss,{...e}),gb=Object.assign(mb,{Container:e=>r.jsx(ub,{...e}),show:bo,info:rs,success:ts,warning:ns,error:as,remove:ls,removeAll:is}),hb=pb,ua=(e,o)=>{var s,c;if(!e)return!0;const t=e.toLowerCase(),n=o.name.toLowerCase().includes(t),a=((s=o.description)==null?void 0:s.toLowerCase().includes(t))||!1,i=((c=o.keywords)==null?void 0:c.some(d=>d.toLowerCase().includes(t)))||!1;return n||a||i},fb=({open:e,onOpenChange:o,groups:t=[],commands:n=[],filter:a})=>{const[i,s]=p.useState(""),[c,d]=p.useState(0),u=p.useRef(null),m=p.useMemo(()=>a||ua,[a]),g=p.useMemo(()=>[...t.flatMap(b=>b.commands),...n],[t,n]),h=p.useMemo(()=>i.trim()?g.filter(k=>m(i,k)):g,[g,i,m]),f=p.useMemo(()=>{if(!i)return t;const k=a||ua;return t.map(b=>({...b,commands:b.commands.filter(C=>k(i,C))})).filter(b=>b.commands.length)},[t,i,a]);p.useEffect(()=>{d(0)},[h.length]);const y=p.useCallback(k=>{if(e)switch(k.key){case"ArrowDown":k.preventDefault(),d(b=>b<h.length-1?b+1:b);break;case"ArrowUp":k.preventDefault(),d(b=>b>0?b-1:b);break;case"Enter":k.preventDefault(),h[c]&&(h[c].onSelect(),o(!1),s(""));break;case"Escape":k.preventDefault(),o(!1),s("");break}},[e,h,c,o]);return p.useEffect(()=>{if(typeof(document==null?void 0:document.addEventListener)=="function")return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[y]),p.useEffect(()=>{const k=u.current;if(k&&typeof k.querySelector=="function"&&e){const b=k.querySelector(`[data-index="${c}"]`);b&&typeof b.scrollIntoView=="function"&&b.scrollIntoView({block:"nearest"})}},[c,e]),p.useEffect(()=>{e?d(0):s("")},[e]),{search:i,setSearch:s,selectedIndex:c,setSelectedIndex:d,filteredCommands:h,filteredGroups:f,listRef:u}},yb=({onClose:e,children:o,...t})=>r.jsx(l.View,{position:"fixed",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-dark-50-240",zIndex:9999,onClick:n=>{n.target===n.currentTarget&&(e==null||e())},...t,children:o}),cs=p.forwardRef(({value:e,onValueChange:o,...t},n)=>r.jsx(l.Input,{value:e,onChange:a=>{var i,s;return o(typeof a=="string"?a:((i=a==null?void 0:a.target)==null?void 0:i.value)??((s=a==null?void 0:a.nativeEvent)==null?void 0:s.text)??"")},ref:n,...t}));cs.displayName="CommandTextInput";const xb={sm:{width:"400px",maxHeight:"300px"},md:{width:"500px",maxHeight:"400px"},lg:{width:"600px",maxHeight:"500px"}},bb=e=>({default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"},outline:{backgroundColor:"color-white",borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"}}),kb=bb(),Cb={display:"flex",alignItems:"center",padding:"12px 16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},Sb={overflow:"auto",padding:"8px 0"},jb={marginBottom:"8px"},wb={padding:"8px 16px",fontSize:"12px",fontWeight:"bold",color:"color-gray-500",textTransform:"uppercase"},vb={display:"flex",alignItems:"center",padding:"8px 16px",cursor:"pointer",userSelect:"none",borderRadius:"4px",margin:"0 8px",_hover:{backgroundColor:"color-gray-100"}},Tb={backgroundColor:"color-blue-50",_hover:{backgroundColor:"color-blue-100"}},Ib={opacity:.5,cursor:"not-allowed",_hover:{backgroundColor:"transparent"}},Rb={display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",color:"color-gray-500"},Fb={display:"flex",flexDirection:"column",flex:1},zb={fontSize:"14px",fontWeight:"medium"},Mb={fontSize:"12px",color:"color-gray-500",marginTop:"2px"},Wb={display:"flex",alignItems:"center",marginLeft:"12px",fontSize:"12px",color:"color-gray-500"},Hb={display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",color:"color-gray-500",textAlign:"center"},Pb={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 16px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",fontSize:"12px",color:"color-gray-500"},Vb=p.createContext({search:"",setSearch:()=>{},selectedIndex:0,setSelectedIndex:()=>{},filteredCommands:[],onSelect:()=>{}}),Ab=({value:e,children:o})=>r.jsx(Vb.Provider,{value:e,children:o}),ds=({value:e,onValueChange:o,placeholder:t="Type a command or search...",views:n,...a})=>{const i=p.useRef(null);return p.useEffect(()=>{i.current&&i.current.focus()},[]),r.jsxs(l.View,{...Cb,...n==null?void 0:n.container,...a,children:[r.jsx(Mr,{widthHeight:16,color:"color-gray-400",marginRight:"8px"}),r.jsx(cs,{width:"100%",border:"none",outline:"none",backgroundColor:"transparent",fontSize:"14px",...n==null?void 0:n.input,value:e,onValueChange:o,placeholder:t,ref:i})]})},Eb=({children:e,views:o,...t})=>r.jsx(l.View,{...Sb,...o==null?void 0:o.container,...t,children:e}),us=({heading:e,children:o,views:t,...n})=>r.jsxs(l.View,{...jb,...t==null?void 0:t.container,...n,children:[r.jsx(l.Text,{...wb,...t==null?void 0:t.heading,children:e}),o]}),Ft=({item:e,selected:o=!1,onSelect:t,views:n,...a})=>{const i=()=>{!e.disabled&&t&&t()};return r.jsxs(l.Horizontal,{...vb,...o?Tb:{},...e.disabled?Ib:{},onPress:i,onClick:i,...n==null?void 0:n.container,...a,children:[e.icon&&r.jsx(l.View,{...Rb,...n==null?void 0:n.icon,children:e.icon}),r.jsxs(l.Vertical,{...Fb,...n==null?void 0:n.content,children:[r.jsx(l.Text,{...zb,...n==null?void 0:n.name,children:e.name}),e.description&&r.jsx(l.Text,{...Mb,...n==null?void 0:n.description,children:e.description})]}),e.shortcut&&r.jsx(l.Text,{...Wb,...n==null?void 0:n.shortcut,children:e.shortcut})]})},ps=({children:e="No results found.",views:o,...t})=>r.jsx(l.View,{...Hb,...o==null?void 0:o.container,...t,children:e}),Db=({open:e,onOpenChange:o,groups:t=[],commands:n=[],placeholder:a,size:i="md",variant:s="default",emptyState:c,footer:d,search:u,setSearch:m,selectedIndex:g,setSelectedIndex:h,filteredCommands:f,filteredGroups:y,listRef:k,views:b,filter:C,...S})=>{if(!e)return null;const w=p.useCallback(T=>{T.disabled||(T.onSelect(),o(!1),m(""))},[o,m]);p.useCallback(T=>T.target===T.currentTarget&&o(!1),[o]);const j=p.useMemo(()=>({search:u,setSearch:m,selectedIndex:g,setSelectedIndex:h,filteredCommands:f,onSelect:w}),[u,g,f,w,m,h]),x=t.length>0,v=f.length===0;return r.jsx(yb,{onClose:()=>o(!1),...S,children:r.jsx(Ab,{value:j,children:r.jsxs(l.View,{borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column",...xb[i],...kb[s],...b==null?void 0:b.container,onClick:T=>T.stopPropagation(),children:[r.jsx(ds,{value:u,onValueChange:m,placeholder:a,views:b==null?void 0:b.searchInput}),r.jsx(l.View,{ref:k,flex:1,overflow:"auto",...b==null?void 0:b.list,children:v?c||r.jsx(ps,{views:b==null?void 0:b.empty}):x?y.map(T=>r.jsx(us,{heading:T.name,views:b==null?void 0:b.groupHeading,children:T.commands.map(F=>{const M=f.findIndex(E=>E.id===F.id);return r.jsx(Ft,{item:F,selected:M===g,onSelect:()=>w(F),"data-index":M,views:{container:b==null?void 0:b.item,icon:b==null?void 0:b.icon,content:b==null?void 0:b.content,name:b==null?void 0:b.name,description:b==null?void 0:b.description,shortcut:b==null?void 0:b.shortcut}},F.id)})},T.id)):f.map((T,F)=>r.jsx(Ft,{item:T,selected:F===g,onSelect:()=>w(T),"data-index":F,views:{container:b==null?void 0:b.item,icon:b==null?void 0:b.icon,content:b==null?void 0:b.content,name:b==null?void 0:b.name,description:b==null?void 0:b.description,shortcut:b==null?void 0:b.shortcut}},T.id))}),d&&r.jsx(l.View,{...Pb,...b==null?void 0:b.footer,children:d})]})})})},$b=({open:e,onOpenChange:o,groups:t=[],commands:n=[],placeholder:a,size:i="md",variant:s="default",filter:c,emptyState:d,footer:u,views:m,...g})=>{const{search:h,setSearch:f,selectedIndex:y,setSelectedIndex:k,filteredCommands:b,filteredGroups:C,listRef:S}=fb({open:e,onOpenChange:o,groups:t,commands:n,filter:c});return r.jsx(Db,{open:e,onOpenChange:o,groups:t,commands:n,placeholder:a,size:i,variant:s,emptyState:d,footer:u,search:h,setSearch:f,selectedIndex:y,setSelectedIndex:k,filteredCommands:b,filteredGroups:C,listRef:S,views:m,...g})},Oo=$b;Oo.Input=ds;Oo.List=Eb;Oo.Group=us;Oo.Item=Ft;Oo.Empty=ps;const pa=()=>Math.random().toString(36).substring(2,11),Lb=({defaultOpen:e=!1,openDelay:o=200,closeDelay:t=200,isDisabled:n=!1}={})=>{const[a,i]=p.useState(e),s=p.useRef(null),c=p.useRef(null),d=p.useRef(null),u=p.useRef(null),m=p.useRef(`tooltip-trigger-${pa()}`).current,g=p.useRef(`tooltip-content-${pa()}`).current,h=p.useCallback(()=>{n||(u.current&&(clearTimeout(u.current),u.current=null),!a&&!d.current&&(d.current=setTimeout(()=>{i(!0),d.current=null},o)))},[a,o,n]),f=p.useCallback(()=>{d.current&&(clearTimeout(d.current),d.current=null),a&&!u.current&&(u.current=setTimeout(()=>{i(!1),u.current=null},t))},[a,t]),y=p.useCallback(()=>{u.current&&(clearTimeout(u.current),u.current=null)},[]);return p.useEffect(()=>()=>{d.current&&clearTimeout(d.current),u.current&&clearTimeout(u.current)},[]),p.useEffect(()=>{if(typeof(document==null?void 0:document.addEventListener)!="function")return;const k=b=>{b.key==="Escape"&&a&&i(!1)};return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k)}},[a]),{isOpen:a,openTooltip:h,closeTooltip:f,cancelCloseTimer:y,triggerRef:s,contentRef:c,triggerId:m,contentId:g}},_b={sm:{padding:"4px 8px",fontSize:"12px",maxWidth:"200px"},md:{padding:"6px 10px",fontSize:"14px",maxWidth:"250px"},lg:{padding:"8px 12px",fontSize:"16px",maxWidth:"300px"}},Bb=e=>({default:{backgroundColor:"color-gray-900",color:"color-white",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.06)",transition:"opacity 0.15s ease"},light:{backgroundColor:"color-white",color:"color-gray-800",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.04)",transition:"opacity 0.15s ease"},dark:{backgroundColor:"color-gray-950",color:"color-white",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.2), 0px 2px 4px rgba(0, 0, 0, 0.12)",transition:"opacity 0.15s ease"}}),Ob=Bb(),Nb=e=>{const o={position:"absolute",width:"8px",height:"8px",backgroundColor:"inherit",borderStyle:"inherit",borderWidth:"inherit",borderColor:"inherit",transform:"rotate(45deg)"};switch(e){case"top":return{...o,bottom:"-4px",left:"50%",marginLeft:"-4px",borderTop:"none",borderLeft:"none"};case"right":return{...o,left:"-4px",top:"50%",marginTop:"-4px",borderRight:"none",borderTop:"none"};case"bottom":return{...o,top:"-4px",left:"50%",marginLeft:"-4px",borderBottom:"none",borderRight:"none"};case"left":return{...o,right:"-4px",top:"50%",marginTop:"-4px",borderLeft:"none",borderBottom:"none"};default:return o}},ms=p.createContext({isOpen:!1,openTooltip:()=>{},closeTooltip:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),vn=()=>p.useContext(ms),qb=({value:e,children:o})=>r.jsx(ms.Provider,{value:e,children:o}),gs=p.memo(({children:e,views:o,asChild:t=!1,...n})=>{const{openTooltip:a,closeTooltip:i,triggerRef:s,contentId:c,triggerId:d}=vn(),u=p.useCallback(()=>a(),[a]),m=p.useCallback(()=>i(),[i]),g=p.useCallback(()=>a(),[a]),h=p.useCallback(()=>i(),[i]),f={ref:s,onMouseEnter:u,onMouseLeave:m,onFocus:g,onBlur:h,id:d,"aria-describedby":c,...o==null?void 0:o.container,...n};return t&&p.isValidElement(e)?p.cloneElement(e,f):r.jsx(l.View,{display:"inline-block",...f,children:e})}),Ub=p.memo(({children:e,views:o,...t})=>{const{isOpen:n,contentRef:a,contentId:i,triggerId:s}=vn();return n?r.jsx(l.View,{ref:a,id:i,role:"tooltip","aria-labelledby":s,...o==null?void 0:o.container,...t,children:e}):null}),Gb=({content:e,children:o,position:t="top",align:n="center",size:a="md",variant:i="default",showArrow:s=!0,views:c,themeMode:d,...u})=>{const{isOpen:m,triggerRef:g,contentRef:h,contentId:f,triggerId:y}=vn(),{ref:k,relation:b}=l.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[C,S]=p.useState({x:0,y:0,placement:t});p.useEffect(()=>{g!=null&&g.current&&k&&(k.current=g.current)},[g,k,m]),p.useEffect(()=>{if(m&&(h!=null&&h.current)&&(g!=null&&g.current)){const x=g.current.getBoundingClientRect();let v=t;b&&(t==="top"&&b.space.vertical==="bottom"?v="bottom":t==="bottom"&&b.space.vertical==="top"?v="top":t==="right"&&b.space.horizontal==="left"?v="left":t==="left"&&b.space.horizontal==="right"&&(v="right"));let T=0,F=0;switch(v){case"top":T=n==="start"?x.left:n==="end"?x.right-120:x.left+x.width/2-60,F=x.top-8;break;case"bottom":T=n==="start"?x.left:n==="end"?x.right-120:x.left+x.width/2-60,F=x.bottom+8;break;case"right":T=x.right+8,F=n==="start"?x.top:n==="end"?x.bottom-32:x.top+x.height/2-16;break;case"left":T=x.left-8,F=n==="start"?x.top:n==="end"?x.bottom-32:x.top+x.height/2-16;break}S({x:T,y:F,placement:v})}},[m,t,n,g,h,b]);const w=p.useMemo(()=>s?Nb(C.placement):{},[s,C.placement]),j=p.useMemo(()=>{const x={position:"fixed",left:C.x,top:C.y,zIndex:1e3};switch(C.placement){case"top":return{...x,transform:"translateY(-100%)"};case"left":return{...x,transform:"translateX(-100%)"};case"bottom":case"right":default:return x}},[C.x,C.y,C.placement]);return r.jsxs(l.View,{position:"relative",display:"inline-block",...c==null?void 0:c.container,...u,children:[r.jsx(gs,{children:o}),m&&r.jsxs(l.View,{ref:h,id:f,role:"tooltip","aria-labelledby":y,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",style:j,..._b[a],...Ob[i],...c==null?void 0:c.content,children:[typeof e=="string"?r.jsx(l.Text,{...c==null?void 0:c.text,children:e}):e,s&&r.jsx(l.View,{...w,...c==null?void 0:c.arrow})]})]})},Yb=({content:e,children:o,position:t="top",align:n="center",size:a="md",variant:i="default",openDelay:s=200,closeDelay:c=200,showArrow:d=!0,defaultOpen:u=!1,isDisabled:m=!1,views:g,...h})=>{const f=Lb({defaultOpen:u,openDelay:s,closeDelay:c,isDisabled:m});return r.jsx(qb,{value:f,children:r.jsx(Gb,{content:e,position:t,align:n,size:a,variant:i,showArrow:d,views:g,...h,children:o})})},Qr=Yb;Qr.Trigger=gs;Qr.Content=Ub;const hs=p.forwardRef((e,o)=>{const t=Xl(e);return p.useImperativeHandle(o,()=>({getValue:()=>{var n,a;return((n=t.hiddenInputRef.current)==null?void 0:n.value)??((a=t.editableRef.current)==null?void 0:a.textContent)??t.value??""},setValue:t.setValue,clear:()=>t.setValue(""),focus:()=>{var n;return(n=t.editableRef.current)==null?void 0:n.focus()},blur:()=>{var n;return(n=t.editableRef.current)==null?void 0:n.blur()},getElement:()=>t.editableRef.current,getInputElement:()=>t.hiddenInputRef.current})),r.jsx(ei,{...e,...t})});hs.displayName="ChatInput";const Kb={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}},ma={container:{position:"relative",display:"flex",flexDirection:"column",height:"100vh",alignItems:"center",justifyContent:"center"},gradient:{position:"absolute",inset:"-10px",opacity:.5,pointerEvents:"none",filter:"blur(10px)",backgroundSize:"300% 200%",backgroundPosition:"50% 50%, 50% 50%"}},pt={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},image:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundAttachment:"scroll"},content:{position:"relative",width:"100%",height:"100%",zIndex:2}},mt={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},video:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover"},content:{position:"relative",zIndex:2}},Xb=p.createContext({}),Jb=({children:e,showRadialGradient:o=!0,views:t,themeMode:n,...a})=>{const i={white:"rgba(255,255,255,1)",transparent:"rgba(255,255,255,0)"},s=["rgb(59, 130, 246)","rgb(196, 181, 253)","rgb(147, 197, 253)","rgb(221, 214, 254)","rgb(96, 165, 250)"],c={...ma.gradient,backgroundImage:`
27
27
  repeating-linear-gradient(100deg, ${s.join(", ")}),
28
28
  repeating-linear-gradient(100deg, ${i.white} 0%, ${i.white} 7%, ${i.transparent} 10%, ${i.transparent} 12%, ${i.white} 16%)
29
- `,animation:"aurora 4s ease infinite",...o?{maskImage:"radial-gradient(ellipse at 100% 0%, black 10%, transparent 70%)"}:{}};return r.jsxs(l.View,{...sa.container,...t==null?void 0:t.container,...a,children:[r.jsx(l.View,{style:c}),e,r.jsx("style",{children:`
29
+ `,animation:"aurora 4s ease infinite",...o?{maskImage:"radial-gradient(ellipse at 100% 0%, black 10%, transparent 70%)"}:{}};return r.jsxs(l.View,{...ma.container,...t==null?void 0:t.container,...a,children:[r.jsx(l.View,{style:c}),e,r.jsx("style",{children:`
30
30
  @keyframes aurora {
31
31
  0% { background-position: 0% 50%; }
32
32
  50% { background-position: 100% 50%; }
33
33
  100% { background-position: 0% 50%; }
34
34
  }
35
- `})]})},Ub=({number:e=20,children:o,...t})=>{const n=Array.from({length:e},(a,i)=>i);return r.jsxs(l.View,{width:"100%",height:"100%",backgroundColor:"black",position:"relative",overflow:"hidden",...t,children:[n.map(a=>{const i=a*37%200-100+"px",s=.2+a*13%6*.1+"s",c=(1+a*7%9)/2+"s",d=300+a*17%100+"px";return r.jsx(l.View,{position:"absolute",top:"0px",left:i,width:"2px",height:"2px",borderRadius:"9999px",backgroundColor:"white",boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)",transform:"rotate(215deg)",zIndex:0,animate:{from:{transform:"translateX(-100%) translateY(-100%)"},to:{transform:`translateX(${d}) translateY(${d})`},iterationCount:"infinite",timingFunction:"linear",fillMode:"forwards",duration:c,delay:s},children:r.jsx(l.View,{position:"absolute",top:"-1px",left:"-1px",width:"1px",height:"1px",borderRadius:"9999px",backgroundColor:"white",boxShadow:"0 10px 0 1px rgba(255, 255, 255, 0.1)"})},a)}),o&&r.jsx(l.View,{position:"relative",zIndex:1,width:"100%",height:"100%",children:o})]})},ca=["rgb(186, 230, 253)","rgb(249, 168, 212)","rgb(134, 239, 172)","rgb(253, 224, 71)","rgb(252, 165, 165)","rgb(216, 180, 254)","rgb(147, 197, 253)","rgb(165, 180, 252)","rgb(196, 181, 253)"],Gb=()=>ca[Math.floor(Math.random()*ca.length)],Yb=({rows:e=15,cols:o=10,squareSize:t=40,...n})=>{const a=Array(e).fill(1),i=Array(o).fill(1);return r.jsx(l.View,{padding:16,width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-50",zIndex:0,transform:"skewX(-48deg) skewY(14deg) scale(0.675) rotate(0deg) translateZ(0)",...n,children:a.map((s,c)=>r.jsx(l.Horizontal,{gap:0,children:i.map((d,u)=>r.jsx(l.View,{height:t/3,width:t,borderStyle:"solid",borderColor:"color-gray-200",borderWidth:.5,backgroundColor:"transparent",cursor:"pointer",on:{hover:{backgroundColor:Gb(),transition:"background-color 0.2s ease"}}},`col-${u}`))},`row-${c}`))})},Kb=["rgb(59, 130, 246)","rgb(147, 51, 234)","rgb(236, 72, 153)","rgb(34, 197, 94)","rgb(251, 146, 60)","rgb(168, 85, 247)"],Xb=({count:e=50,colors:o=Kb,speed:t="medium",shapes:n=["circle"],...a})=>{const i=Array.from({length:e},(u,m)=>m),s=()=>{switch(t){case"slow":return .5;case"fast":return 2;default:return 1}},c=()=>n[Math.floor(Math.random()*n.length)],d=()=>o[Math.floor(Math.random()*o.length)];return r.jsx(l.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:i.map(u=>{const m=Math.random()*8+4,g=Math.random()*400,h=Math.random()*300,f=Math.random()*400,y=Math.random()*300,b=(Math.random()*10+5)/s(),k=Math.random()*5,C=c(),j=d(),w={circle:{borderRadius:"50%"},square:{borderRadius:"2px"},triangle:{borderRadius:"0",clipPath:"polygon(50% 0%, 0% 100%, 100% 100%)"}};return r.jsx(l.View,{position:"absolute",width:m,height:m,backgroundColor:j,opacity:.7,style:{left:g,top:h,...w[C]},animate:{from:{transform:"translate(0px, 0px) scale(0.5)",opacity:0},to:{transform:`translate(${f-g}px, ${y-h}px) scale(1)`,opacity:.7},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${b}s`,delay:`${k}s`}},u)})})},Jb=({gridSize:e=30,lineColor:o="rgba(59, 130, 246, 0.3)",pulseColor:t="rgba(59, 130, 246, 0.8)",animationSpeed:n="medium",...a})=>{const i=()=>{switch(n){case"slow":return 4;case"fast":return 1;default:return 2}},s=Math.floor(400/e),c=Math.floor(300/e),d=s*c,u=Array.from({length:d},(m,g)=>g);return r.jsxs(l.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:[Array.from({length:s+1},(m,g)=>r.jsx(l.View,{position:"absolute",left:g*e,top:0,width:1,height:"100%",backgroundColor:o},`v-line-${g}`)),Array.from({length:c+1},(m,g)=>r.jsx(l.View,{position:"absolute",left:0,top:g*e,width:"100%",height:1,backgroundColor:o},`h-line-${g}`)),u.map(m=>{const g=m%s,h=Math.floor(m/s),f=(g+h)*.1;return r.jsx(l.View,{position:"absolute",left:g*e+1,top:h*e+1,width:e-2,height:e-2,backgroundColor:"transparent",animate:{from:{backgroundColor:"transparent"},to:{backgroundColor:t},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${i()}s`,delay:`${f}s`}},m)})]})},Qb=["rgba(59, 130, 246, 0.6)","rgba(147, 51, 234, 0.6)","rgba(236, 72, 153, 0.6)","rgba(34, 197, 94, 0.6)"],Zb=({rippleCount:e=5,colors:o=Qb,maxSize:t=200,frequency:n=3,...a})=>{const i=Array.from({length:e},(s,c)=>({id:c,x:Math.random()*400,y:Math.random()*300,color:o[c%o.length],delay:c*(n/e),duration:3+Math.random()*2}));return r.jsxs(l.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-100",...a,children:[i.map(s=>r.jsx(l.View,{position:"absolute",width:20,height:20,borderRadius:"50%",style:{left:s.x-10,top:s.y-10,border:`2px solid ${s.color}`,backgroundColor:"transparent"},animate:{from:{transform:"scale(0)",opacity:1},to:{transform:`scale(${t/20})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${s.duration}s`,delay:`${s.delay}s`}},s.id)),i.map(s=>r.jsx(l.View,{position:"absolute",width:10,height:10,borderRadius:"50%",style:{left:s.x-5,top:s.y-5,backgroundColor:s.color},animate:{from:{transform:"scale(1)",opacity:.8},to:{transform:`scale(${t/40})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${s.duration*1.2}s`,delay:`${s.delay+.5}s`}},`secondary-${s.id}`))]})},e1=({children:e,src:o,backgroundSize:t="cover",backgroundPosition:n="center",backgroundRepeat:a="no-repeat",backgroundAttachment:i="scroll",imageOpacity:s=1,overlay:c=null,blendMode:d="normal",views:u,themeMode:m,...g})=>{const h={...ct.image,backgroundImage:`url(${o})`,backgroundSize:t,backgroundPosition:n,backgroundRepeat:a,backgroundAttachment:i,opacity:s};return r.jsxs(l.View,{...ct.container,...u==null?void 0:u.container,...g,children:[r.jsx(l.View,{style:h,...u==null?void 0:u.image}),c,e&&r.jsx(l.View,{...ct.content,...u==null?void 0:u.content,children:e})]})},o1=({children:e,src:o,autoPlay:t=!0,loop:n=!0,muted:a=!0,playsInline:i=!0,overlay:s=null,blendMode:c="normal",views:d,themeMode:u,...m})=>r.jsxs(l.View,{...dt.container,...d==null?void 0:d.container,...m,children:[r.jsx(l.View,{as:"video",src:o,autoPlay:t,loop:n,muted:a,playsInline:i,style:dt.video,...d==null?void 0:d.video}),s,e&&r.jsx(l.View,{...dt.content,...d==null?void 0:d.content,children:e})]}),r1=({children:e,...o})=>r.jsx(Vi,{...o,children:e}),t1=/^(color|theme|light|dark)-/,n1=e=>{const o=e.split("-"),t=parseInt(o[o.length-1],10),n=e.startsWith("theme-")?3:4;return o.length>=n&&!isNaN(t)&&t>=0&&t<=1e3?o.slice(0,-1).join("-"):e},a1=({contentPosition:e,backgroundColor:o="color-black-900",...t})=>{const n=t1.test(o),a=n?n1(o):o,s=(()=>{let c=`${a}-100`,d=`${a}-900`,u=`${a}-600`,m=`${a}-400`;switch(n||(c=`color-mix(in srgb, ${a} 10%, transparent)`,d=`color-mix(in srgb, ${a} 90%, transparent)`,u=`color-mix(in srgb, ${a} 70%, transparent)`,m=`color-mix(in srgb, ${a} 50%, transparent)`),e){case"left":return`radial-gradient(circle at 70% 50%, ${c} 0%, ${c} 100%), linear-gradient(to right, ${d} 0%, ${u} 65%, ${c} 100%)`;case"right":return`radial-gradient(circle at 30% 50%, ${c} 0%, ${c} 100%), linear-gradient(to left, ${d} 0%, ${u} 65%, ${c} 100%)`;case"top":return`radial-gradient(circle at 50% 40%, ${c} 0%, ${c} 100%), linear-gradient(to bottom, ${d} 0%, ${u} 60%, ${c} 100%)`;case"bottom":return`radial-gradient(circle at 50% 60%, ${c} 0%, ${c} 100%), linear-gradient(to top, ${d} 0%, ${u} 60%, ${c} 100%)`;case"center":return`radial-gradient(circle at 50% 70%, ${d} 0%, ${c} 100%)`;default:return m}})();return r.jsx(l.View,{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:s,pointerEvents:"none",zIndex:1,...t})},l1=({children:e,views:o,...t})=>r.jsx(Nb.Provider,{value:{},children:r.jsx(l.View,{...Ob.container,...o==null?void 0:o.container,...t,children:e})}),us=p.forwardRef(({children:e,designProps:o,shape:t="rounded",decorationRotation:n=5,decorationScale:a=1,decorationOpacity:i=.8,views:s,...c},d)=>{const m=(k=>{switch(k){case"square":return"0px";case"pill":return"9999px";case"rounded":default:return"16px"}})(t),g=Math.abs(n)*(Math.PI/180),h=Math.sin(g)*100,f=(a-1)*100/2,y=Math.ceil(h+f),b=c.backgroundColor??"theme-primary";return r.jsx(l.View,{...c,ref:d,backgroundColor:"transparent",position:"relative",overflow:"visible",...s==null?void 0:s.container,children:r.jsxs(l.View,{padding:c.padding??`${96+y}px ${y}px`,position:"relative",overflow:"visible",children:[r.jsx(l.View,{position:"absolute",top:y,left:y,right:y,bottom:y,backgroundColor:b,borderRadius:m,opacity:i/1.5,transform:`scale(${a})`,pointerEvents:"none",zIndex:1,...s==null?void 0:s.back}),r.jsx(l.View,{position:"absolute",top:y,left:y,right:y,bottom:y,transform:`rotate(${n}deg) scale(${a})`,opacity:i/1.2,backgroundColor:b,borderRadius:m,pointerEvents:"none",zIndex:2,...s==null?void 0:s.front}),r.jsx(l.View,{margin:"0 auto",position:"relative",zIndex:3,...s==null?void 0:s.content,children:e})]})})});us.displayName="Background.Layout";const de=l1;de.Aurora=qb;de.Meteors=Ub;de.Wall=Yb;de.Particles=Xb;de.Grid=Jb;de.Ripples=Zb;de.Image=e1;de.Video=o1;de.Gradient=r1;de.Overlay=a1;de.Layout=us;const ps=p.forwardRef((e,o)=>r.jsx(de,{...e,ref:o}));ps.displayName="Background";const ms=Object.assign(ps,{Layout:de.Layout,Aurora:de.Aurora,Meteors:de.Meteors,Wall:de.Wall,Particles:de.Particles,Grid:de.Grid,Ripples:de.Ripples,Image:de.Image,Video:de.Video,Gradient:de.Gradient,Overlay:de.Overlay});ms.displayName="Background";function i1(e){const{inputValue:o,onInputChange:t,onSubmit:n,messages:a=[]}=e,[i,s]=p.useState(""),c=p.useRef(null),d=p.useRef(null),u=o!==void 0,m=o!==void 0?o:i,g=p.useCallback(f=>{u?t==null||t(f):s(f)},[u,t]),h=p.useCallback(f=>{f&&f.preventDefault();const y=m.trim();y&&n&&(n(y),u||s(""),c.current&&(c.current.style.height="auto"))},[m,n,u]);return p.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight)},[a.length]),{internalInputValue:m,handleInputChange:g,handleSubmit:h,inputRef:c,messagesRef:d}}const s1={sm:{fontSize:"12px",padding:"8px"},md:{fontSize:"14px",padding:"10px"},lg:{fontSize:"14px",padding:"12px"}},c1={default:{backgroundColor:"color-white",border:"1px solid color-gray-200",borderRadius:"12px",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.08)"},glassy:{backgroundColor:"color-white-900",backdropFilter:"blur(10px)",border:"1px solid rgba(226, 232, 240, 0.9)",borderRadius:"12px",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.08)"},minimal:{backgroundColor:"color-white",border:"1px solid color-gray-200",borderRadius:"12px"}},d1={sm:{fontSize:"12px",padding:"8px 10px",borderRadius:"12px"},md:{fontSize:"14px",padding:"10px 12px",borderRadius:"12px"},lg:{fontSize:"14px",padding:"12px 14px",borderRadius:"14px"}},u1={backgroundColor:"theme-primary",color:"color-white",alignSelf:"flex-end",borderBottomRightRadius:"4px"},p1={backgroundColor:"color-white",color:"color-gray-900",alignSelf:"flex-start",borderBottomLeftRadius:"4px",border:"1px solid color-gray-200"},m1={position:"relative",backgroundColor:"color-white",borderTop:"1px solid color-gray-200",padding:"12px",display:"flex",alignItems:"flex-end",gap:"8px",transition:"background-color 0.2s ease, border-color 0.2s ease"},Be={container:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"hidden"},messagesContainer:{flex:1,overflowY:"auto",display:"flex",flexDirection:"column",gap:"12px",padding:"16px",backgroundColor:"color-gray-50"},inputContainer:m1,bubble:{maxWidth:"80%",position:"relative",wordWrap:"break-word",animation:"chatBubbleAppear 0.25s ease-out"},timestamp:{position:"absolute",top:"-24px",fontSize:"12px",color:"color-gray-500",backgroundColor:"color-white-900",padding:"2px 8px",borderRadius:"9999px",opacity:0,transition:"opacity 0.15s ease-out",border:"1px solid color-gray-200"},input:{flex:1,border:"none",outline:"none",backgroundColor:"transparent",resize:"none",fontFamily:"inherit",fontSize:"14px",minHeight:"24px",maxHeight:"120px"},sendButton:{width:"36px",height:"36px",borderRadius:"10px",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s ease, opacity 0.2s ease",flexShrink:0},attachmentButton:{width:"36px",height:"36px",borderRadius:"10px",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",transition:"background-color 0.2s ease",flexShrink:0}},g1=({messages:e=[],inputPlaceholder:o="Type a message...",disableInput:t=!1,variant:n="default",size:a="md",showTimestamps:i=!0,enableAttachments:s=!1,enableContextPicker:c=!1,selectedContextElements:d=[],onContextPickerClick:u,onRemoveContextElement:m,isLoading:g=!1,loadingText:h="Loading...",styles:f={},maxHeight:y="600px",internalInputValue:b,handleInputChange:k,handleSubmit:C,inputRef:j,messagesRef:w,inputValue:S,onInputChange:x,...v})=>{var F;const T={...Be.container,...c1[n],...f.container},R={...Be.messagesContainer,maxHeight:y,...f.messagesContainer},M={...Be.inputContainer,...f.inputContainer},E={...Be.input,...s1[a],...f.input},I=p.useCallback(H=>{k(H.target.value),H.target.style.height="auto",H.target.style.height=`${H.target.scrollHeight}px`},[k]),V=p.useCallback(H=>{H.key==="Enter"&&!H.shiftKey&&(H.preventDefault(),C())},[C]),P=b.trim().length>0,{onSubmit:z,...W}=v;return r.jsxs(l.View,{...T,...W,children:[r.jsxs(l.View,{ref:w,...R,children:[e.length===0?r.jsx(l.View,{display:"flex",alignItems:"center",justifyContent:"center",flex:1,color:"color-gray-500",children:r.jsx(l.Text,{fontSize:"14px",children:"No messages yet. Start a conversation."})}):e.map(H=>r.jsx(h1,{message:H,size:a,showTimestamp:i,styles:{bubble:f.bubble,userBubble:f.userBubble,assistantBubble:f.assistantBubble,timestamp:f.timestamp,reasoningContainer:f.reasoningContainer,reasoningContent:f.reasoningContent,errorMessage:f.errorMessage,systemMessage:f.systemMessage,toolMessage:f.toolMessage}},H.id)),g&&r.jsxs(l.Horizontal,{justifyContent:"flex-start",alignItems:"center",gap:8,marginTop:"8px",...f.loadingIndicator,children:[r.jsx(Ot,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),r.jsx(l.Text,{color:"color-gray-500",fontSize:"14px",children:h})]})]}),r.jsxs(l.View,{children:[d.length>0&&r.jsx(l.Horizontal,{gap:8,marginBottom:"8px",flexWrap:"wrap",padding:"0 12px 8px",...f.contextChipsContainer,children:d.map(H=>r.jsxs(l.Horizontal,{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",borderRadius:"9999px",padding:"6px 10px",alignItems:"center",gap:6,children:[r.jsx(l.Text,{fontSize:"12px",color:"color-blue-700",fontWeight:"500",children:H.name}),r.jsx(l.View,{as:"button",type:"button",onClick:()=>m==null?void 0:m(H.id),cursor:"pointer",border:"none",backgroundColor:"transparent",display:"flex",alignItems:"center",children:r.jsx(Te,{widthHeight:12,color:"color-blue-700"})})]},H.id))}),r.jsxs(l.View,{as:"form",onSubmit:C,...M,children:[s&&r.jsx(l.View,{as:"button",type:"button",...Be.attachmentButton,...f.attachmentButton,_hover:{backgroundColor:"color-gray-100"},children:r.jsx(er,{widthHeight:16,color:"color-gray-600"})}),r.jsx(l.View,{as:"textarea",ref:j,value:b,onChange:I,onKeyDown:V,placeholder:o,disabled:t||g,...E,style:{...E,opacity:t||g?.5:1}}),r.jsxs(l.Vertical,{gap:4,alignItems:"center",children:[c&&r.jsx(l.View,{as:"button",type:"button",onClick:u,...Be.attachmentButton,...f.contextPickerButton,_hover:{backgroundColor:"color-gray-100",...(F=f.contextPickerButton)==null?void 0:F._hover},title:"Select element from page",children:r.jsx(Ba,{widthHeight:16,color:"color-gray-600"})}),r.jsx(l.View,{as:"button",type:"submit",disabled:!P||t||g,...Be.sendButton,backgroundColor:P?"theme-primary":"color-gray-300",_hover:{backgroundColor:P?"theme-primary":"color-gray-300"},...f.sendButton,style:{cursor:P?"pointer":"not-allowed",opacity:!P||t||g?.6:1},children:r.jsx(Bt,{widthHeight:16,color:"color-white",filled:!1})})]})]})]})]})},h1=({message:e,size:o,showTimestamp:t,styles:n})=>{const[a,i]=p.useState(!1),[s,c]=p.useState(!1),d=e.role==="user",u=e.messageType==="system",m=e.messageType==="error",g=e.messageType==="tool";if(u)return r.jsx(l.View,{display:"flex",justifyContent:"center",padding:"8px",width:"100%",...n.systemMessage,children:r.jsxs(l.Horizontal,{gap:6,alignItems:"center",opacity:.7,children:[r.jsx(Ye,{widthHeight:12,color:"color-gray-600"}),r.jsx(l.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.content})]})});if(g)return r.jsx(l.View,{display:"flex",justifyContent:"flex-start",padding:"8px 16px",width:"100%",...n.toolMessage,children:r.jsxs(l.Horizontal,{gap:8,alignItems:"center",backgroundColor:"color-gray-50",padding:"8px 10px",borderRadius:"8px",width:"100%",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[r.jsx(Da,{widthHeight:14,color:"color-gray-600"}),r.jsxs(l.Vertical,{gap:2,children:[r.jsx(l.Text,{fontSize:"11px",fontWeight:"600",color:"color-gray-700",children:"Tool Usage"}),r.jsx(l.Text,{fontSize:"12px",color:"color-gray-600",fontFamily:"monospace",children:e.content})]})]})});const h={...Be.bubble,...d1[o],...d?u1:p1,...m?{backgroundColor:"color-red-50",borderWidth:1,borderStyle:"solid",borderColor:"color-red-200",color:"color-red-700"}:{},...n.bubble,...d?n.userBubble:n.assistantBubble,...m?n.errorMessage:{}},f={...Be.timestamp,[d?"right":"left"]:"8px",opacity:a?1:0,...n.timestamp};return r.jsx(l.View,{position:"relative",onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),display:"flex",justifyContent:d?"flex-end":"flex-start",children:r.jsxs(l.View,{...h,children:[t&&r.jsx(l.View,{...f,children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),m&&r.jsxs(l.Horizontal,{gap:6,marginBottom:"4px",alignItems:"center",children:[r.jsx(Dr,{widthHeight:14,color:"color-red-700"}),r.jsx(l.Text,{fontWeight:"600",fontSize:"12px",children:"Error"})]}),e.reasoning&&r.jsxs(l.View,{marginBottom:"8px",borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:"color-gray-200",paddingBottom:"8px",...n.reasoningContainer,children:[r.jsxs(l.Horizontal,{as:"button",onClick:()=>c(!s),cursor:"pointer",gap:4,alignItems:"center",backgroundColor:"transparent",border:"none",padding:0,children:[r.jsx(l.Text,{fontSize:"11px",color:"color-gray-500",fontWeight:"600",children:"Thinking Process"}),r.jsx(ce,{orientation:s?"down":"right",widthHeight:10,color:"color-gray-500"})]}),s&&r.jsx(l.View,{padding:"8px",backgroundColor:"color-gray-50",borderRadius:"8px",marginTop:"4px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",...n.reasoningContent,children:r.jsx(l.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.reasoning})})]}),r.jsx(l.View,{whiteSpace:"pre-wrap",wordBreak:"break-word",children:e.content}),e.attachments&&e.attachments.length>0&&r.jsx(l.Vertical,{gap:4,marginTop:"8px",children:e.attachments.map(y=>r.jsxs(l.Horizontal,{gap:6,padding:"6px 8px",backgroundColor:"color-gray-50",borderRadius:"8px",fontSize:"12px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[r.jsx(er,{widthHeight:14}),r.jsx(l.Text,{children:y.name})]},y.id))}),e.contextElements&&e.contextElements.length>0&&r.jsxs(l.Vertical,{gap:4,marginTop:"8px",children:[r.jsx(l.Text,{fontSize:"11px",color:"color-black-500",fontWeight:"600",children:"Context:"}),e.contextElements.map(y=>r.jsx(l.Horizontal,{gap:6,padding:"6px 10px",backgroundColor:"color-blue-50",borderRadius:"9999px",fontSize:"11px",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",children:r.jsx(l.Text,{color:"color-blue-700",fontWeight:"500",children:y.name})},y.id))]})]})})},jn=e=>{const o=i1(e);return r.jsx(g1,{...e,...o})};jn.displayName="ChatWidget";const gs=jn;function f1({onSelect:e,onCancel:o,active:t}){const[n,a]=p.useState(null);p.useRef(null);const i=p.useCallback(d=>{var f;if(!t)return;const u=document.elementFromPoint(d.clientX,d.clientY);if(!u||u===document.body||u.closest('[data-chatwidget-ignore="true"]')||u.closest("#chatwidget-overlay")){a(null);return}const m=u.getBoundingClientRect();let g=u.tagName.toLowerCase();if(u.id)g+=`#${u.id}`;else if(u.className&&typeof u.className=="string"){const y=u.className.split(" ")[0];y&&(g+=`.${y}`)}const h=(f=u.innerText)==null?void 0:f.slice(0,20);h&&(g+=` ("${h}...")`),a({id:u.id||`el-${Date.now()}`,name:g,tagName:u.tagName.toLowerCase(),rect:m})},[t]),s=p.useCallback(d=>{!t||d.target.closest('[data-chatwidget-ignore="true"]')||(d.preventDefault(),d.stopPropagation(),n&&e(n))},[t,n,e]),c=p.useCallback(d=>{t&&d.key==="Escape"&&o()},[t,o]);return p.useEffect(()=>{if(!(typeof document>"u"))return t?(document.addEventListener("mousemove",i),document.addEventListener("click",s,!0),document.addEventListener("keydown",c),document.body.style.cursor="crosshair"):(a(null),document.removeEventListener("mousemove",i),document.removeEventListener("click",s,!0),document.removeEventListener("keydown",c),document.body.style.cursor=""),()=>{document.removeEventListener("mousemove",i),document.removeEventListener("click",s,!0),document.removeEventListener("keydown",c),document.body.style.cursor=""}},[t,i,s,c]),{highlightedElement:n}}function y1({element:e}){return e?r.jsx("div",{id:"chatwidget-overlay",style:{position:"fixed",top:e.rect.top,left:e.rect.left,width:e.rect.width,height:e.rect.height,border:"2px solid #1D4ED8",backgroundColor:"rgba(29, 78, 216, 0.08)",pointerEvents:"none",zIndex:99999,transition:"top 0.1s ease-out, left 0.1s ease-out, width 0.1s ease-out, height 0.1s ease-out",borderRadius:"8px"},children:r.jsx("div",{style:{position:"absolute",top:"-24px",left:"0",backgroundColor:"#1D4ED8",color:"white",padding:"2px 8px",borderRadius:"9999px",fontSize:"12px",fontWeight:"bold",whiteSpace:"nowrap"},children:e.name})}):null}const x1=({initialMessages:e=[],onSendMessage:o,bubbleSize:t="md"})=>{const[n,a]=p.useState(!1),[i,s]=p.useState(!1),[c,d]=p.useState(e),[u,m]=p.useState([]),{highlightedElement:g}=f1({active:i,onSelect:k=>{m(C=>[...C,k]),s(!1),a(!0)},onCancel:()=>{s(!1),a(!0)}}),h=()=>a(!n),f=()=>{s(!0),a(!1)},y=k=>{m(C=>C.filter(j=>j.id!==k))},b=k=>{const C={id:Date.now().toString(),role:"user",content:k,timestamp:new Date,contextElements:[...u]};d(j=>[...j,C]),o==null||o(k,u),m([]),setTimeout(()=>{var x;const j=Math.random()>.7,w=Math.random()>.4,S={id:(Date.now()+1).toString(),role:"assistant",timestamp:new Date,content:j?"I will highlight the selected element.":`I received your message regarding: ${((x=C.contextElements)==null?void 0:x.map(v=>v.name).join(", "))||"general context"}. How can I assist you further?`,messageType:j?"tool":"text",reasoning:w?"Analyzing the user input and context... The user seems to be asking about specific elements. I should tailor my response to the selected context.":void 0};d(v=>[...v,S]),j&&setTimeout(()=>{d(v=>[...v,{id:(Date.now()+2).toString(),role:"assistant",messageType:"system",content:'Tool "highlightElement" executed successfully.',timestamp:new Date}])},800)},1e3)};return r.jsxs(l.View,{position:"fixed",bottom:24,right:24,zIndex:9999,children:[r.jsx(y1,{element:g}),i&&r.jsx(l.View,{position:"fixed",top:24,left:"50%",transform:"translateX(-50%)",backgroundColor:"rgba(0,0,0,0.8)",color:"white",padding:"8px 16px",borderRadius:"24px",zIndex:1e4,boxShadow:"0 4px 6px rgba(0,0,0,0.1)",children:r.jsx(l.Text,{fontWeight:"600",fontSize:"14px",children:"Click an element to select it. Press ESC to cancel."})}),n&&r.jsxs(l.View,{position:"absolute",bottom:60,right:0,width:"400px",height:"600px",marginBottom:"16px",backgroundColor:"rgba(255, 255, 255, 0.8)",backdropFilter:"blur(20px)",borderRadius:"24px",border:"1px solid rgba(255, 255, 255, 0.4)",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)",overflow:"hidden",animation:"slideUp 0.3s ease-out",style:{animation:"fadeIn 0.2s ease-out",transformOrigin:"bottom right"},children:[r.jsxs(l.View,{padding:"16px",borderBottom:"1px solid rgba(0,0,0,0.05)",display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(l.Text,{fontWeight:"bold",color:"color-gray-800",children:"ChatWidget Assistant"}),r.jsx(l.View,{as:"button",onClick:()=>a(!1),cursor:"pointer",padding:"4px",borderRadius:"50%",border:"none",backgroundColor:"transparent",_hover:{backgroundColor:"rgba(0,0,0,0.05)"},children:r.jsx(Te,{widthHeight:16,color:"color-gray-500"})})]}),r.jsx(gs,{messages:c,onSubmit:b,size:t,variant:"minimal",enableContextPicker:!0,selectedContextElements:u,onContextPickerClick:f,onRemoveContextElement:y,styles:{container:{height:"calc(100% - 60px)",backgroundColor:"transparent"},inputContainer:{backgroundColor:"white",margin:"0 16px 16px 16px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)"}}})]}),!i&&r.jsx(l.View,{as:"button",onClick:h,width:"56px",height:"56px",borderRadius:"50%",backgroundColor:"theme-primary",border:"none",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",_hover:{transform:"scale(1.05)"},_active:{transform:"scale(0.95)"},"data-chatwidget-ignore":"true",children:n?r.jsx(Te,{widthHeight:24,color:"white"}):r.jsx(_a,{widthHeight:24,color:"white"})})]})},b1=e=>{const o=ge("radio",e),t=Ol(o);return r.jsx(Nl,{...t,...o})},hs=b1;function wn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var k1=typeof Element<"u",C1=typeof Map=="function",S1=typeof Set=="function",j1=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Sr(e,o){if(e===o)return!0;if(e&&o&&typeof e=="object"&&typeof o=="object"){if(e.constructor!==o.constructor)return!1;var t,n,a;if(Array.isArray(e)){if(t=e.length,t!=o.length)return!1;for(n=t;n--!==0;)if(!Sr(e[n],o[n]))return!1;return!0}var i;if(C1&&e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!o.has(n.value[0]))return!1;for(i=e.entries();!(n=i.next()).done;)if(!Sr(n.value[1],o.get(n.value[0])))return!1;return!0}if(S1&&e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!o.has(n.value[0]))return!1;return!0}if(j1&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(o)){if(t=e.length,t!=o.length)return!1;for(n=t;n--!==0;)if(e[n]!==o[n])return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof o.valueOf=="function")return e.valueOf()===o.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof o.toString=="function")return e.toString()===o.toString();if(a=Object.keys(e),t=a.length,t!==Object.keys(o).length)return!1;for(n=t;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,a[n]))return!1;if(k1&&e instanceof Element)return!1;for(n=t;n--!==0;)if(!((a[n]==="_owner"||a[n]==="__v"||a[n]==="__o")&&e.$$typeof)&&!Sr(e[a[n]],o[a[n]]))return!1;return!0}return e!==e&&o!==o}var w1=function(o,t){try{return Sr(o,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const v1=wn(w1);var T1=function(e,o,t,n,a,i,s,c){if(process.env.NODE_ENV!=="production"&&o===void 0)throw new Error("invariant requires an error message argument");if(!e){var d;if(o===void 0)d=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[t,n,a,i,s,c],m=0;d=new Error(o.replace(/%s/g,function(){return u[m++]})),d.name="Invariant Violation"}throw d.framesToPop=1,d}},I1=T1;const da=wn(I1);var F1=function(o,t,n,a){var i=n?n.call(a,o,t):void 0;if(i!==void 0)return!!i;if(o===t)return!0;if(typeof o!="object"||!o||typeof t!="object"||!t)return!1;var s=Object.keys(o),c=Object.keys(t);if(s.length!==c.length)return!1;for(var d=Object.prototype.hasOwnProperty.bind(t),u=0;u<s.length;u++){var m=s[u];if(!d(m))return!1;var g=o[m],h=t[m];if(i=n?n.call(a,g,h,m):void 0,i===!1||i===void 0&&g!==h)return!1}return!0};const R1=wn(F1);var fs=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(fs||{}),ut={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},ua=Object.values(fs),Yr={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},ys=Object.entries(Yr).reduce((e,[o,t])=>(e[t]=o,e),{}),Pe="data-rh",Io={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Fo=(e,o)=>{for(let t=e.length-1;t>=0;t-=1){const n=e[t];if(Object.prototype.hasOwnProperty.call(n,o))return n[o]}return null},z1=e=>{let o=Fo(e,"title");const t=Fo(e,Io.TITLE_TEMPLATE);if(Array.isArray(o)&&(o=o.join("")),t&&o)return t.replace(/%s/g,()=>o);const n=Fo(e,Io.DEFAULT_TITLE);return o||n||void 0},M1=e=>Fo(e,Io.ON_CHANGE_CLIENT_STATE)||(()=>{}),pt=(e,o)=>o.filter(t=>typeof t[e]<"u").map(t=>t[e]).reduce((t,n)=>({...t,...n}),{}),W1=(e,o)=>o.filter(t=>typeof t.base<"u").map(t=>t.base).reverse().reduce((t,n)=>{if(!t.length){const a=Object.keys(n);for(let i=0;i<a.length;i+=1){const c=a[i].toLowerCase();if(e.indexOf(c)!==-1&&n[c])return t.concat(n)}}return t},[]),H1=e=>console&&typeof console.warn=="function"&&console.warn(e),Yo=(e,o,t)=>{const n={};return t.filter(a=>Array.isArray(a[e])?!0:(typeof a[e]<"u"&&H1(`Helmet: ${e} should be of type "Array". Instead found type "${typeof a[e]}"`),!1)).map(a=>a[e]).reverse().reduce((a,i)=>{const s={};i.filter(d=>{let u;const m=Object.keys(d);for(let h=0;h<m.length;h+=1){const f=m[h],y=f.toLowerCase();o.indexOf(y)!==-1&&!(u==="rel"&&d[u].toLowerCase()==="canonical")&&!(y==="rel"&&d[y].toLowerCase()==="stylesheet")&&(u=y),o.indexOf(f)!==-1&&(f==="innerHTML"||f==="cssText"||f==="itemprop")&&(u=f)}if(!u||!d[u])return!1;const g=d[u].toLowerCase();return n[u]||(n[u]={}),s[u]||(s[u]={}),n[u][g]?!1:(s[u][g]=!0,!0)}).reverse().forEach(d=>a.push(d));const c=Object.keys(s);for(let d=0;d<c.length;d+=1){const u=c[d],m={...n[u],...s[u]};n[u]=m}return a},[]).reverse()},P1=(e,o)=>{if(Array.isArray(e)&&e.length){for(let t=0;t<e.length;t+=1)if(e[t][o])return!0}return!1},V1=e=>({baseTag:W1(["href"],e),bodyAttributes:pt("bodyAttributes",e),defer:Fo(e,Io.DEFER),encode:Fo(e,Io.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:pt("htmlAttributes",e),linkTags:Yo("link",["rel","href"],e),metaTags:Yo("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:Yo("noscript",["innerHTML"],e),onChangeClientState:M1(e),scriptTags:Yo("script",["src","innerHTML"],e),styleTags:Yo("style",["cssText"],e),title:z1(e),titleAttributes:pt("titleAttributes",e),prioritizeSeoTags:P1(e,Io.PRIORITIZE_SEO_TAGS)}),xs=e=>Array.isArray(e)?e.join(""):e,A1=(e,o)=>{const t=Object.keys(e);for(let n=0;n<t.length;n+=1)if(o[t[n]]&&o[t[n]].includes(e[t[n]]))return!0;return!1},mt=(e,o)=>Array.isArray(e)?e.reduce((t,n)=>(A1(n,o)?t.priority.push(n):t.default.push(n),t),{priority:[],default:[]}):{default:e,priority:[]},pa=(e,o)=>({...e,[o]:void 0}),E1=["noscript","script","style"],It=(e,o=!0)=>o===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),bs=e=>Object.keys(e).reduce((o,t)=>{const n=typeof e[t]<"u"?`${t}="${e[t]}"`:`${t}`;return o?`${o} ${n}`:n},""),D1=(e,o,t,n)=>{const a=bs(t),i=xs(o);return a?`<${e} ${Pe}="true" ${a}>${It(i,n)}</${e}>`:`<${e} ${Pe}="true">${It(i,n)}</${e}>`},$1=(e,o,t=!0)=>o.reduce((n,a)=>{const i=a,s=Object.keys(i).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,m)=>{const g=typeof i[m]>"u"?m:`${m}="${It(i[m],t)}"`;return u?`${u} ${g}`:g},""),c=i.innerHTML||i.cssText||"",d=E1.indexOf(e)===-1;return`${n}<${e} ${Pe}="true" ${s}${d?"/>":`>${c}</${e}>`}`},""),ks=(e,o={})=>Object.keys(e).reduce((t,n)=>{const a=Yr[n];return t[a||n]=e[n],t},o),L1=(e,o,t)=>{const n={key:o,[Pe]:!0},a=ks(t,n);return[p.createElement("title",a,o)]},jr=(e,o)=>o.map((t,n)=>{const a={key:n,[Pe]:!0};return Object.keys(t).forEach(i=>{const c=Yr[i]||i;if(c==="innerHTML"||c==="cssText"){const d=t.innerHTML||t.cssText;a.dangerouslySetInnerHTML={__html:d}}else a[c]=t[i]}),p.createElement(e,a)}),Ie=(e,o,t=!0)=>{switch(e){case"title":return{toComponent:()=>L1(e,o.title,o.titleAttributes),toString:()=>D1(e,o.title,o.titleAttributes,t)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>ks(o),toString:()=>bs(o)};default:return{toComponent:()=>jr(e,o),toString:()=>$1(e,o,t)}}},_1=({metaTags:e,linkTags:o,scriptTags:t,encode:n})=>{const a=mt(e,ut.meta),i=mt(o,ut.link),s=mt(t,ut.script);return{priorityMethods:{toComponent:()=>[...jr("meta",a.priority),...jr("link",i.priority),...jr("script",s.priority)],toString:()=>`${Ie("meta",a.priority,n)} ${Ie("link",i.priority,n)} ${Ie("script",s.priority,n)}`},metaTags:a.default,linkTags:i.default,scriptTags:s.default}},B1=e=>{const{baseTag:o,bodyAttributes:t,encode:n=!0,htmlAttributes:a,noscriptTags:i,styleTags:s,title:c="",titleAttributes:d,prioritizeSeoTags:u}=e;let{linkTags:m,metaTags:g,scriptTags:h}=e,f={toComponent:()=>[],toString:()=>""};return u&&({priorityMethods:f,linkTags:m,metaTags:g,scriptTags:h}=_1(e)),{priority:f,base:Ie("base",o,n),bodyAttributes:Ie("bodyAttributes",t,n),htmlAttributes:Ie("htmlAttributes",a,n),link:Ie("link",m,n),meta:Ie("meta",g,n),noscript:Ie("noscript",i,n),script:Ie("script",h,n),style:Ie("style",s,n),title:Ie("title",{title:c,titleAttributes:d},n)}},Ft=B1,xr=[],vn=!!(typeof window<"u"&&window.document&&window.document.createElement),Rt=class{constructor(e,o){_e(this,"instances",[]);_e(this,"canUseDOM",vn);_e(this,"context");_e(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?xr:this.instances,add:e=>{(this.canUseDOM?xr:this.instances).push(e)},remove:e=>{const o=(this.canUseDOM?xr:this.instances).indexOf(e);(this.canUseDOM?xr:this.instances).splice(o,1)}}});this.context=e,this.canUseDOM=o||!1,o||(e.helmet=Ft({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},O1=parseInt(p.version.split(".")[0],10),zt=O1>=19,N1={},Cs=p.createContext(N1),no,q1=(no=class extends p.Component{constructor(t){super(t);_e(this,"helmetData");zt?this.helmetData=null:this.helmetData=new Rt(this.props.context||{},no.canUseDOM)}render(){return zt?p.createElement(p.Fragment,null,this.props.children):p.createElement(Cs.Provider,{value:this.helmetData.value},this.props.children)}},_e(no,"canUseDOM",vn),no),jo=(e,o)=>{const t=document.head||document.querySelector("head"),n=t.querySelectorAll(`${e}[${Pe}]`),a=[].slice.call(n),i=[];let s;return o&&o.length&&o.forEach(c=>{const d=document.createElement(e);for(const u in c)if(Object.prototype.hasOwnProperty.call(c,u))if(u==="innerHTML")d.innerHTML=c.innerHTML;else if(u==="cssText"){const m=c.cssText;d.appendChild(document.createTextNode(m))}else{const m=u,g=typeof c[m]>"u"?"":c[m];d.setAttribute(u,g)}d.setAttribute(Pe,"true"),a.some((u,m)=>(s=m,d.isEqualNode(u)))?a.splice(s,1):i.push(d)}),a.forEach(c=>{var d;return(d=c.parentNode)==null?void 0:d.removeChild(c)}),i.forEach(c=>t.appendChild(c)),{oldTags:a,newTags:i}},Mt=(e,o)=>{const t=document.getElementsByTagName(e)[0];if(!t)return;const n=t.getAttribute(Pe),a=n?n.split(","):[],i=[...a],s=Object.keys(o);for(const c of s){const d=o[c]||"";t.getAttribute(c)!==d&&t.setAttribute(c,d),a.indexOf(c)===-1&&a.push(c);const u=i.indexOf(c);u!==-1&&i.splice(u,1)}for(let c=i.length-1;c>=0;c-=1)t.removeAttribute(i[c]);a.length===i.length?t.removeAttribute(Pe):t.getAttribute(Pe)!==s.join(",")&&t.setAttribute(Pe,s.join(","))},U1=(e,o)=>{typeof e<"u"&&document.title!==e&&(document.title=xs(e)),Mt("title",o)},ma=(e,o)=>{const{baseTag:t,bodyAttributes:n,htmlAttributes:a,linkTags:i,metaTags:s,noscriptTags:c,onChangeClientState:d,scriptTags:u,styleTags:m,title:g,titleAttributes:h}=e;Mt("body",n),Mt("html",a),U1(g,h);const f={baseTag:jo("base",t),linkTags:jo("link",i),metaTags:jo("meta",s),noscriptTags:jo("noscript",c),scriptTags:jo("script",u),styleTags:jo("style",m)},y={},b={};Object.keys(f).forEach(k=>{const{newTags:C,oldTags:j}=f[k];C.length&&(y[k]=C),j.length&&(b[k]=f[k].oldTags)}),o&&o(),d(e,y,b)},Ko=null,G1=e=>{Ko&&cancelAnimationFrame(Ko),e.defer?Ko=requestAnimationFrame(()=>{ma(e,()=>{Ko=null})}):(ma(e),Ko=null)},Y1=G1,ga=class extends p.Component{constructor(){super(...arguments);_e(this,"rendered",!1)}shouldComponentUpdate(o){return!R1(o,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:o}=this.props.context;o.remove(this),this.emitChange()}emitChange(){const{helmetInstances:o,setHelmet:t}=this.props.context;let n=null;const a=V1(o.get().map(i=>{const{context:s,...c}=i.props;return c}));q1.canUseDOM?Y1(a):Ft&&(n=Ft(a)),t(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:o}=this.props.context;o.add(this),this.emitChange()}render(){return this.init(),null}},wr=[],ha=e=>{const o={};for(const t of Object.keys(e))o[ys[t]||t]=e[t];return o},ro=e=>{const o={};for(const t of Object.keys(e)){const n=Yr[t];o[n||t]=e[t]}return o},fa=(e,o)=>{if(!vn)return;const t=document.getElementsByTagName(e)[0];if(!t)return;const n="data-rh-managed",a=t.getAttribute(n),i=a?a.split(","):[],s=Object.keys(o);for(const c of i)s.includes(c)||t.removeAttribute(c);for(const c of s){const d=o[c];d==null||d===!1?t.removeAttribute(c):d===!0?t.setAttribute(c,""):t.setAttribute(c,String(d))}s.length>0?t.setAttribute(n,s.join(",")):t.removeAttribute(n)},gt=()=>{const e={},o={};for(const t of wr){const{htmlAttributes:n,bodyAttributes:a}=t.props;n&&Object.assign(e,ha(n)),a&&Object.assign(o,ha(a))}fa("html",e),fa("body",o)},K1=class extends p.Component{componentDidMount(){wr.push(this),gt()}componentDidUpdate(){gt()}componentWillUnmount(){const e=wr.indexOf(this);e!==-1&&wr.splice(e,1),gt()}resolveTitle(){const{title:e,titleTemplate:o,defaultTitle:t}=this.props;return e&&o?o.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||t||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const o=this.props.titleAttributes||{};return p.createElement("title",ro(o),e)}renderBase(){const{base:e}=this.props;return e?p.createElement("base",ro(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>p.createElement("meta",{key:t,...ro(o)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>p.createElement("link",{key:t,...ro(o)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{innerHTML:n,...a}=o,i=ro(a);return n&&(i.dangerouslySetInnerHTML={__html:n}),p.createElement("script",{key:t,...i})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{cssText:n,...a}=o,i=ro(a);return n&&(i.dangerouslySetInnerHTML={__html:n}),p.createElement("style",{key:t,...i})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{innerHTML:n,...a}=o,i=ro(a);return n&&(i.dangerouslySetInnerHTML={__html:n}),p.createElement("noscript",{key:t,...i})})}render(){return p.createElement(p.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},ft,X1=(ft=class extends p.Component{shouldComponentUpdate(e){return!v1(pa(this.props,"helmetData"),pa(e,"helmetData"))}mapNestedChildrenToProps(e,o){if(!o)return null;switch(e.type){case"script":case"noscript":return{innerHTML:o};case"style":return{cssText:o};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,o,t,n){return{...o,[e.type]:[...o[e.type]||[],{...t,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,o,t,n){switch(e.type){case"title":return{...o,[e.type]:n,titleAttributes:{...t}};case"body":return{...o,bodyAttributes:{...t}};case"html":return{...o,htmlAttributes:{...t}};default:return{...o,[e.type]:{...t}}}}mapArrayTypeChildrenToProps(e,o){let t={...o};return Object.keys(e).forEach(n=>{t={...t,[n]:e[n]}}),t}warnOnInvalidChildren(e,o){return da(ua.some(t=>e.type===t),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${ua.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),da(!o||typeof o=="string"||Array.isArray(o)&&!o.some(t=>typeof t!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,o){let t={};return p.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:a,...i}=n.props,s=Object.keys(i).reduce((d,u)=>(d[ys[u]||u]=i[u],d),{});let{type:c}=n;switch(typeof c=="symbol"?c=c.toString():this.warnOnInvalidChildren(n,a),c){case"Symbol(react.fragment)":o=this.mapChildrenToProps(a,o);break;case"link":case"meta":case"noscript":case"script":case"style":t=this.flattenArrayTypeChildren(n,t,s,a);break;default:o=this.mapObjectTypeChildren(n,o,s,a);break}}),this.mapArrayTypeChildrenToProps(t,o)}render(){const{children:e,...o}=this.props;let t={...o},{helmetData:n}=o;if(e&&(t=this.mapChildrenToProps(e,t)),n&&!(n instanceof Rt)){const a=n;n=new Rt(a.context,!0),delete t.helmetData}return zt?p.createElement(K1,{...t}):n?p.createElement(ga,{...t,context:n.value}):p.createElement(Cs.Consumer,null,a=>p.createElement(ga,{...t,context:a}))}},_e(ft,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),ft);const J1={airbnb:{highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},apple:{highlightStyle:"solid",fontWeight:600,letterSpacing:"-0.03em"},coinbase:{highlightStyle:"solid",fontWeight:600,letterSpacing:"-0.02em"},figma:{highlightStyle:"underline",fontWeight:600,letterSpacing:"-0.01em",highlightFontWeight:700},linear:{highlightStyle:"gradient",fontWeight:600,letterSpacing:"-0.03em"},nike:{highlightStyle:"underline",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",highlightFontStyle:"italic",highlightFontWeight:900},notion:{highlightStyle:"underline",fontWeight:600,letterSpacing:"-0.01em",highlightFontStyle:"italic"},revolut:{highlightStyle:"gradient",fontWeight:700,letterSpacing:"-0.03em"},shopify:{highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},spacex:{highlightStyle:"glow",fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",highlightLetterSpacing:"0.06em"},spotify:{highlightStyle:"background",fontWeight:800,letterSpacing:"-0.03em"},stripe:{highlightStyle:"gradient",fontWeight:700,letterSpacing:"-0.03em"},tesla:{highlightStyle:"solid",fontWeight:500,letterSpacing:"-0.01em",textTransform:"uppercase"},uber:{highlightStyle:"underline",fontWeight:700,letterSpacing:"-0.02em"},vercel:{highlightStyle:"outline",fontWeight:700,letterSpacing:"-0.04em"}},Q1={highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},Z1=e=>J1[e.metadata.id]??Q1,Ss=(e,o)=>{const t=e.theme;return{canvas:ke(t.canvas),surface:ke(t.surface),text:ke(t.text),muted:ke(t.muted),border:ke(t.border),primary:ke(t.primary),secondary:ke(t.secondary),success:ke(t.success),warning:ke(t.warning),error:ke(t.error),onPrimary:ke(t.onPrimary),appearance:o}},ek=e=>Ss(e,"light"),ok=e=>Ss(e,"dark"),pe=({palette:e,label:o,config:t,children:n})=>r.jsxs(l.Vertical,{gap:10,flex:"1 1 320px",minWidth:0,children:[r.jsxs(l.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(l.View,{width:10,height:10,borderRadius:9999,backgroundColor:e.appearance==="dark"?"#111111":"#ffffff",borderWidth:1,borderStyle:"solid",borderColor:"rgba(0,0,0,0.15)"}),r.jsx(l.Text,{fontSize:11,fontWeight:"700",letterSpacing:"0.08em",textTransform:"uppercase",children:o})]}),r.jsx(Dt,{config:t,mode:e.appearance,children:r.jsx(l.View,{padding:20,borderRadius:16,borderWidth:1,borderStyle:"solid",backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",children:n})})]}),ke=e=>!e||typeof e!="string"?e:/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,Oe=(e,o)=>`color-mix(in srgb, ${ke(e)} ${o}%, transparent)`,rk=e=>e&&e.startsWith("var(--")?e.slice(6,-1):e,tk={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"neutral"},nk=e=>e.personality||tk,Ne=(e,o="normal")=>{let n={light:300,regular:400,bold:700,black:800}[e.typeWeight];return o==="light"&&(n=Math.max(300,n-200)),o==="heavy"&&(n=Math.min(900,n+100)),n},cr=e=>{switch(e.density){case"tight":return{padding:16,gap:10,large:20};case"spacious":return{padding:28,gap:18,large:36};case"comfortable":default:return{padding:22,gap:14,large:28}}},ak=e=>e.typeCase==="uppercase"?"uppercase":"none",Kr=(e,o)=>{switch(e.surfaceTone){case"glass":return{backgroundColor:o.appearance==="dark"?"rgba(255,255,255,0.04)":"rgba(255,255,255,0.65)",backdropFilter:"blur(14px)"};case"mono":return{backgroundColor:o.appearance==="dark"?"#0a0a0a":ke(o.surface)};case"matte":return{backgroundColor:o.appearance==="dark"?"#181818":"#f4f4f4"};case"paper":default:return{backgroundColor:ke(o.surface)}}},Mo=(e,o)=>{const t=ke(o.primary),n=ke(o.secondary||o.primary);switch(e.accentTreatment){case"gradient":return`linear-gradient(135deg, ${t} 0%, ${n} 100%)`;case"glow":return t;case"stripe":return`repeating-linear-gradient(45deg, ${t} 0 8px, ${n} 8px 16px)`;case"halftone":return`radial-gradient(circle at 30% 30%, ${t} 0%, ${n} 70%)`;case"flat":default:return t}},Wo=(e,o)=>{if(e.accentTreatment==="glow")return`0 0 24px ${Oe(o.primary,40)}, 0 0 4px ${ke(o.primary)}`},Qe=e=>({letterSpacing:e.letterSpacing,textTransform:ak(e),fontStyle:e.typeStyle,fontWeight:Ne(e,"heavy")}),xe=e=>({letterSpacing:e.typeCase==="uppercase"?"0.12em":"0.06em",textTransform:"uppercase",fontStyle:e.typeStyle,fontWeight:Ne(e,"normal")}),lk=(e,o)=>{var n,a,i;const t=(n=e.components)==null?void 0:n[o];return(i=(a=t==null?void 0:t.views)==null?void 0:a.container)==null?void 0:i.borderRadius},ik=e=>{const o=e.tokens.rawCssVars||{},t=e.theme.border,n=e.theme.surface,a=e.theme.primary,i=o["shadow-ring"]||"rgba(0,0,0,0.08) 0px 0px 0px 1px",s=o["shadow-ring-light"]||`${t} 0px 0px 0px 1px`,c=o["shadow-card"]||`rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, ${n} 0px 0px 0px 1px`,d=o["shadow-card-full"]||`rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, ${n} 0px 0px 0px 1px`;return[{name:"Level 0",label:"Flat",description:"No shadow",shadow:"none"},{name:"Level 1",label:"Ring",description:"Shadow-as-border",shadow:i},{name:"Level 1b",label:"Light Ring",description:"Lighter ring",shadow:s},{name:"Level 2",label:"Card",description:"Ring + subtle lift",shadow:c},{name:"Level 3",label:"Full Card",description:"Ring + lift + ambient + glow",shadow:d},{name:"Focus",label:"Accessibility ring",description:"Focus state — 2px ring",shadow:`0 0 0 2px ${a}`}]},Xo=(e,o)=>{const n={accordion:["accordion","card","alert"],tabs:["tabs","button"],panel:["card","alert"]}[o]??[o];for(const a of n){const i=lk(e,a);if(i!==void 0)return i}return"12px"},ht=({glyph:e,badge:o})=>r.jsxs(l.View,{position:"relative",display:"inline-flex",children:[r.jsx(l.View,{width:32,height:32,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center",style:{backgroundColor:"rgba(0,0,0,0.06)",fontSize:18,lineHeight:"20px"},children:e}),o?r.jsx(l.View,{position:"absolute",top:-10,right:-18,paddingHorizontal:6,paddingVertical:2,borderRadius:9999,style:{backgroundColor:"#ffffff",color:"#222222",fontSize:9,fontWeight:700,letterSpacing:"0.04em",boxShadow:"0 1px 3px rgba(0,0,0,0.18)"},children:o}):null]}),sk=[{title:"Homes",value:"homes",icon:r.jsx(ht,{glyph:"🏠"}),content:r.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"Tokens, inputs, and feedback components share the active config."})},{title:"Experiences",value:"experiences",icon:r.jsx(ht,{glyph:"🎈",badge:"NEW"}),content:r.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Services",value:"services",icon:r.jsx(ht,{glyph:"🛎️",badge:"NEW"}),content:r.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"Each tab carries an icon. Active tab uses the theme primary underline."})}],ck=[{title:"Token",field:"token"},{title:"Value",field:"value"},{title:"Role",field:"role"}],dk=[{id:"overview",label:"Overview",href:"#"},{id:"components",label:"Components",href:"#"},{id:"tokens",label:"Tokens",href:"#"}],uk=({color:e,name:o,role:t,border:n})=>r.jsxs(l.View,{borderWidth:1,borderStyle:"solid",borderRadius:8,overflow:"hidden",minWidth:0,borderColor:n,children:[r.jsx(l.View,{height:76,backgroundColor:e}),r.jsxs(l.Vertical,{gap:4,padding:12,children:[r.jsx(l.Text,{fontSize:13,lineHeight:"18px",fontWeight:"700",children:o}),r.jsx(l.Text,{fontSize:12,lineHeight:"16px",opacity:.7,children:e}),r.jsx(l.Text,{fontSize:12,lineHeight:"16px",opacity:.72,children:t})]})]}),me=({title:e,children:o,config:t})=>r.jsxs(l.Vertical,{gap:18,padding:24,borderWidth:1,borderStyle:"solid",borderRadius:12,backgroundColor:t.theme.canvas,borderColor:t.theme.border,children:[r.jsx(l.Text,{fontSize:18,lineHeight:"24px",fontWeight:"700",color:t.theme.text,children:e}),o]}),pk=({config:e})=>{const o=Z1(e),t=o.highlightStyle==="background"?e.theme.onPrimary:e.theme.primary;return r.jsx(l.View,{width:"100%",borderRadius:20,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,backgroundColor:e.theme.surface,children:r.jsxs(l.Horizontal,{width:"100%",flexWrap:"wrap",alignItems:"stretch",gap:0,children:[r.jsxs(l.Vertical,{flex:"1 1 360px",minWidth:0,padding:36,gap:20,justifyContent:"center",children:[r.jsx(Ce,{variant:"outline",content:`${e.metadata.label} hero`}),r.jsx(Ti,{size:"xl",responsive:!0,highlightText:"design system",highlightStyle:o.highlightStyle,highlightColor:e.theme.primary,highlightSecondaryColor:o.highlightStyle==="gradient"?e.theme.secondary:e.theme.onPrimary,views:{container:{color:e.theme.text},text:{color:e.theme.text,fontFamily:e.tokens.typography.fontFamily,fontWeight:o.fontWeight,style:{letterSpacing:o.letterSpacing,fontStyle:o.fontStyle??"normal",textTransform:o.textTransform??"none"}},highlight:{color:t,fontWeight:o.highlightFontWeight??o.fontWeight,style:{fontStyle:o.highlightFontStyle??o.fontStyle??"normal",letterSpacing:o.highlightLetterSpacing??o.letterSpacing,textTransform:o.textTransform??"none"}}},children:"Build a beautiful design system in minutes"},`${e.metadata.id}-${o.highlightStyle}`),r.jsxs(l.Text,{color:e.theme.muted,fontFamily:e.tokens.typography.fontFamily,style:{fontSize:16,lineHeight:"24px",maxWidth:520},children:["Each brand defines its own highlight treatment —"," ",r.jsx(l.Text,{as:"span",color:e.theme.primary,fontWeight:"700",children:o.highlightStyle})," ","with weight"," ",r.jsx(l.Text,{as:"span",fontWeight:"700",children:o.fontWeight}),o.highlightFontStyle==="italic"||o.fontStyle==="italic"?", italic":"",o.textTransform==="uppercase"?", uppercase":"","."]}),r.jsxs(l.Horizontal,{gap:12,flexWrap:"wrap",children:[r.jsx(se,{color:"theme-primary",size:"md",children:"Get started"}),r.jsx(se,{variant:"outline",color:"theme-primary",size:"md",children:"View docs"})]})]}),r.jsxs(l.View,{flex:"1 1 320px",minWidth:0,minHeight:260,position:"relative",overflow:"hidden",style:{backgroundImage:`linear-gradient(135deg, ${e.theme.primary}, ${e.theme.secondary||e.theme.primary})`},children:[r.jsx(l.View,{position:"absolute",top:"50%",left:"50%",width:180,height:180,borderRadius:9999,style:{transform:"translate(-50%, -50%)",backgroundColor:"rgba(255,255,255,0.18)",filter:"blur(40px)"}}),r.jsxs(l.Vertical,{width:"100%",height:"100%",minHeight:260,padding:32,justifyContent:"flex-end",alignItems:"flex-start",gap:12,children:[r.jsx(l.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:13,letterSpacing:"0.08em",textTransform:"uppercase"},children:e.metadata.label}),r.jsx(l.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:28,lineHeight:"32px",letterSpacing:"-0.02em"},children:e.theme.primary})]})]})]})})},mk=({config:e})=>{var t,n;const o=e.tokens.colors.slice(0,5).map(a=>({token:a.name,value:a.value,role:a.role}));return r.jsxs(l.Vertical,{gap:24,children:[r.jsx(me,{title:"Color",config:e,children:r.jsx(l.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:12,children:e.tokens.colors.slice(0,12).map(a=>r.jsx(uk,{color:a.value,name:a.name,role:a.role,text:e.theme.text,border:e.theme.border},a.name))})}),r.jsx(me,{title:"Typography",config:e,children:r.jsxs(l.Vertical,{gap:24,children:[r.jsxs(l.Vertical,{gap:4,children:[r.jsx(l.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:48,lineHeight:"1.0",fontWeight:"700",letterSpacing:"0.96px",textTransform:"uppercase",children:"Making Life Multiplanetary"}),r.jsx(l.Text,{fontSize:10,color:e.theme.muted,children:"Display — 48px / Bold / 1.00 / Uppercase"})]}),r.jsxs(l.Vertical,{gap:4,children:[r.jsx(l.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:16,lineHeight:"1.7",fontWeight:"400",children:"SpaceX designs, manufactures and launches advanced rockets and spacecraft. The company was founded to revolutionize space technology."}),r.jsx(l.Text,{fontSize:10,color:e.theme.muted,children:"Body — 16px / 400 / 1.70"})]}),r.jsxs(l.Vertical,{gap:4,children:[r.jsx(l.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:13,lineHeight:"0.94",fontWeight:"700",letterSpacing:"1.17px",textTransform:"uppercase",children:"Falcon 9 · Starship · Dragon"}),r.jsx(l.Text,{fontSize:10,color:e.theme.muted,children:"Nav Bold — 13px / 700 / 0.94 / Uppercase"})]}),r.jsxs(l.Vertical,{gap:4,children:[r.jsx(l.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:12,lineHeight:"1.0",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Mission Overview"}),r.jsx(l.Text,{fontSize:10,color:e.theme.muted,children:"Caption — 12px / 400 / 1.00 / Uppercase"})]}),r.jsxs(l.Vertical,{gap:4,children:[r.jsx(l.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:10,lineHeight:"0.94",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Launch Date: 2026-04-15"}),r.jsx(l.Text,{fontSize:10,color:e.theme.muted,children:"Micro — 10px / 400 / 0.94 / Uppercase"})]}),r.jsx(l.Horizontal,{gap:10,flexWrap:"wrap",marginTop:12,children:e.tokens.typography.fontSizes.map(a=>r.jsx(Ce,{variant:"outline",content:a},a))})]})}),r.jsx(me,{title:"Spacing, Radius, Shadow",config:e,children:r.jsxs(l.Vertical,{gap:18,children:[r.jsx(l.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"flex-end",children:e.tokens.spacing.slice(0,10).map(a=>r.jsxs(l.Vertical,{gap:8,alignItems:"center",children:[r.jsx(l.View,{width:a,minWidth:4,height:24,borderRadius:2,backgroundColor:e.theme.primary}),r.jsx(l.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),r.jsx(l.Horizontal,{gap:12,flexWrap:"wrap",children:e.tokens.radii.slice(0,6).map(a=>r.jsxs(l.Vertical,{gap:8,alignItems:"center",children:[r.jsx(l.View,{width:64,height:64,borderRadius:a,borderWidth:1,borderStyle:"solid",backgroundColor:e.theme.surface,borderColor:e.theme.border}),r.jsx(l.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),r.jsx(l.View,{width:"100%",maxWidth:"100%",overflowX:"auto",style:{WebkitOverflowScrolling:"touch",color:e.theme.text},children:r.jsx(Fe,{views:(n=(t=e.components)==null?void 0:t.table)==null?void 0:n.views,children:r.jsx(Fe.Template,{caption:"First extracted color tokens",columns:ck,data:o})})})]})})]})},ya=({palette:e})=>r.jsxs(ye,{width:"min(100%, 420px)",views:{container:{backgroundColor:e.surface,color:e.text,borderWidth:1,borderStyle:"solid",borderColor:e.border},header:{color:e.text,borderColor:e.border},content:{color:e.text},footer:{borderColor:e.border}},children:[r.jsx(ye.Header,{children:r.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsxs(l.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(l.Text,{fontSize:24,fontWeight:"800",color:e.text,children:"$182"}),r.jsx(l.Text,{fontSize:14,color:e.muted,children:"night"})]}),r.jsx(Ce,{variant:"filled",content:"Best value"})]})}),r.jsx(ye.Content,{children:r.jsxs(l.Vertical,{gap:12,children:[r.jsxs(l.Horizontal,{gap:0,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,overflow:"hidden",children:[r.jsxs(l.Vertical,{flex:1,padding:10,gap:2,borderRightWidth:1,borderRightStyle:"solid",borderColor:e.border,children:[r.jsx(l.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECK-IN"}),r.jsx(l.Text,{fontSize:14,color:e.text,children:"Mar 12, 2026"})]}),r.jsxs(l.Vertical,{flex:1,padding:10,gap:2,children:[r.jsx(l.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECKOUT"}),r.jsx(l.Text,{fontSize:14,color:e.text,children:"Mar 18, 2026"})]})]}),r.jsxs(l.Vertical,{padding:10,gap:2,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,children:[r.jsx(l.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"GUESTS"}),r.jsx(l.Text,{fontSize:14,color:e.text,children:"2 adults"})]}),r.jsx(se,{isFilled:!0,size:"lg",children:"Reserve"}),r.jsx(Pr,{}),r.jsxs(l.Vertical,{gap:6,children:[r.jsxs(l.Horizontal,{justifyContent:"space-between",children:[r.jsx(l.Text,{fontSize:14,color:e.text,children:"$182 × 6 nights"}),r.jsx(l.Text,{fontSize:14,color:e.text,children:"$1,092"})]}),r.jsxs(l.Horizontal,{justifyContent:"space-between",children:[r.jsx(l.Text,{fontSize:14,color:e.text,children:"Cleaning fee"}),r.jsx(l.Text,{fontSize:14,color:e.text,children:"$48"})]}),r.jsxs(l.Horizontal,{justifyContent:"space-between",children:[r.jsx(l.Text,{fontSize:14,color:e.text,children:"Service fee"}),r.jsx(l.Text,{fontSize:14,color:e.text,children:"$165"})]})]}),r.jsx(Pr,{}),r.jsxs(l.Horizontal,{justifyContent:"space-between",children:[r.jsx(l.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"Total before taxes"}),r.jsx(l.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"$1,305"})]})]})})]}),xa=[{name:"Starter",tagline:"For solo makers shipping their first project.",price:"$0",period:"/ month",features:["1 workspace","Up to 3 projects","Community support"],ctaLabel:"Get started"},{name:"Pro",tagline:"For growing teams that need more room to build.",price:"$24",period:"/ month",features:["Unlimited projects","Advanced analytics","Priority email support","Custom domains"],ctaLabel:"Start free trial",featured:!0},{name:"Enterprise",tagline:"For organizations with security and scale needs.",price:"Custom",period:"",features:["SSO & SCIM","Audit logs","Dedicated success manager","99.99% uptime SLA"],ctaLabel:"Contact sales"}],ba=({palette:e,tier:o,personality:t})=>{const n=cr(t),a=Kr(t,e),i=Mo(t,e),s=Wo(t,e);return r.jsx(l.View,{width:"min(100%, 280px)",borderRadius:t.cardRadius,overflow:"hidden",borderWidth:o.featured?0:1,borderStyle:"solid",style:{...o.featured?{background:i,boxShadow:s}:a,borderColor:e.border,color:o.featured?e.onPrimary:e.text},children:r.jsxs(l.Vertical,{gap:n.gap,padding:n.padding,children:[r.jsxs(l.Vertical,{gap:6,children:[r.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[r.jsx(l.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:xe(t),children:o.name}),o.featured?r.jsx(l.View,{paddingHorizontal:10,paddingVertical:4,borderRadius:t.badgeRadius,backgroundColor:Oe(e.onPrimary,22),children:r.jsxs(l.Horizontal,{gap:4,alignItems:"center",children:[r.jsx(l.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1},children:t.signatureMotif}),r.jsx(l.Text,{fontSize:10,color:e.onPrimary,style:xe(t),children:t.voice.includes("mission")?"PRIORITY":"POPULAR"})]})}):null]}),r.jsx(l.Text,{fontSize:13,lineHeight:"18px",color:o.featured?Oe(e.onPrimary,85):e.muted,style:{fontStyle:t.typeStyle},children:o.tagline})]}),r.jsxs(l.Horizontal,{alignItems:"baseline",gap:4,children:[r.jsx(l.Text,{fontSize:n.large+8,color:o.featured?e.onPrimary:e.text,style:Qe(t),children:o.price}),o.period?r.jsx(l.Text,{fontSize:14,color:o.featured?Oe(e.onPrimary,85):e.muted,style:{fontStyle:t.typeStyle},children:o.period}):null]}),r.jsx(l.Vertical,{gap:8,children:o.features.map(c=>r.jsxs(l.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(l.View,{width:18,height:18,borderRadius:t.cornerStyle==="sharp"?2:9999,backgroundColor:o.featured?Oe(e.onPrimary,22):e.primary,alignItems:"center",justifyContent:"center",style:{display:"flex",flexShrink:0},children:r.jsx(l.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:Ne(t,"heavy")},children:t.cornerStyle==="sharp"?"+":"✓"})}),r.jsx(l.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:{textTransform:t.typeCase==="uppercase"?"uppercase":"none",letterSpacing:t.typeCase==="uppercase"?"0.04em":"normal",fontStyle:t.typeStyle},children:c})]},c))}),r.jsx(l.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:t.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:o.featured?e.onPrimary:e.text},children:r.jsx(l.Text,{fontSize:14,color:o.featured?e.primary:e.canvas,style:{...xe(t),letterSpacing:t.typeCase==="uppercase"?"0.08em":"0.02em"},children:o.ctaLabel})})]})})},ka=({palette:e,personality:o})=>{const t=cr(o),n=Kr(o,e),a=o.voice.includes("athletic")||o.voice.includes("motion")?"Aero Runner GT":o.voice.includes("mission")||o.voice.includes("futurist")?"Module-04 Insulated Jacket":"Linen Throw Pillow",i=o.voice.includes("athletic")||o.voice.includes("motion")?"Court Black · Mens":o.voice.includes("mission")||o.voice.includes("futurist")?"Carbon · Standard fit":"Stonewashed · Sand";return r.jsx(l.View,{width:"min(100%, 320px)",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:r.jsxs(l.Vertical,{gap:t.gap,padding:t.padding,children:[r.jsx(l.View,{height:120,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${Oe(e.primary,20)} 0%, ${Oe(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),r.jsxs(l.Vertical,{gap:4,children:[r.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[r.jsx(l.Text,{fontSize:15,color:e.text,style:Qe(o),children:a}),r.jsx(l.View,{paddingHorizontal:10,paddingVertical:3,borderRadius:o.badgeRadius,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"},children:r.jsx(l.Text,{fontSize:10,color:e.text,style:xe(o),children:"IN STOCK"})})]}),r.jsx(l.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:i})]}),r.jsxs(l.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[r.jsxs(l.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(l.Text,{fontSize:24,color:e.text,style:Qe(o),children:"$42"}),r.jsx(l.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$56"})]}),r.jsx(l.Text,{fontSize:12,color:e.success||e.muted,style:xe(o),children:"FREE SHIPPING"})]}),r.jsx(l.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:Mo(o,e),boxShadow:Wo(o,e)},children:r.jsx(l.Text,{fontSize:14,color:e.onPrimary,style:{...xe(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})})},Ca=({palette:e,personality:o})=>{const t=cr(o),n=Kr(o,e),a=o.signatureMotif,i=o.voice.includes("athletic")?"★":o.voice.includes("mission")||o.voice.includes("futurist")?"◉":"♥",s=o.voice.includes("athletic")?"Velocity AirFlow 7":o.voice.includes("mission")||o.voice.includes("futurist")?"Sentinel Pro Headset":o.voice.includes("refined")?"Pulse Studio Monitor":"Aurora Wireless Headphones",c=o.voice.includes("athletic")?"Lightweight knit · 280g":o.voice.includes("mission")||o.voice.includes("futurist")?"Mil-spec audio · 60h endurance":"Active noise cancelling · 40h battery",d=o.voice.includes("mission")?"MISSION PICK":o.voice.includes("athletic")?"TEAM PICK":o.voice.includes("futurist")?"SIGNATURE":"BEST SELLER";return r.jsxs(l.View,{position:"relative",width:"min(100%, 320px)",children:[r.jsx(l.View,{position:"absolute",top:-10,left:16,paddingHorizontal:12,paddingVertical:6,borderRadius:o.badgeRadius,zIndex:2,style:{background:Mo(o,e),boxShadow:Wo(o,e)||(e.appearance==="dark"?"0 6px 14px rgba(0,0,0,0.5)":"0 6px 14px rgba(0,0,0,0.12)")},children:r.jsxs(l.Horizontal,{gap:6,alignItems:"center",children:[r.jsx(l.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:Ne(o,"heavy")},children:a}),r.jsx(l.Text,{fontSize:10,color:e.onPrimary,style:xe(o),children:d})]})}),r.jsx(l.View,{position:"absolute",top:12,right:12,width:36,height:36,borderRadius:o.cornerStyle==="sharp"?4:9999,borderWidth:1,borderStyle:"solid",zIndex:2,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:e.appearance==="dark"?"rgba(0,0,0,0.45)":"rgba(255,255,255,0.92)",borderColor:e.border,backdropFilter:"blur(6px)"},children:r.jsx(l.Text,{fontSize:16,color:i==="♥"&&e.error||e.primary,style:{lineHeight:1},children:i})}),r.jsx(l.View,{width:"100%",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:r.jsxs(l.Vertical,{gap:t.gap,padding:t.padding,children:[r.jsx(l.View,{height:140,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${Oe(e.primary,20)} 0%, ${Oe(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),r.jsxs(l.Vertical,{gap:6,children:[r.jsxs(l.Horizontal,{gap:6,alignItems:"center",children:[r.jsx(l.Text,{fontSize:13,color:e.warning||e.primary,style:{lineHeight:1},children:"★★★★★"}),r.jsx(l.Text,{fontSize:12,color:e.muted,children:"4.9 · 1,284 reviews"})]}),r.jsx(l.Text,{fontSize:18,color:e.text,style:Qe(o),children:s}),r.jsx(l.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:c})]}),r.jsxs(l.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[r.jsxs(l.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(l.Text,{fontSize:26,color:e.text,style:Qe(o),children:"$189"}),r.jsx(l.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$249"})]}),r.jsx(l.View,{paddingHorizontal:8,paddingVertical:3,borderRadius:o.badgeRadius,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"},children:r.jsx(l.Text,{fontSize:10,color:e.text,style:xe(o),children:"–24%"})})]}),r.jsxs(l.Horizontal,{gap:8,children:[r.jsx(l.View,{flex:1,paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:Mo(o,e),boxShadow:Wo(o,e)},children:r.jsx(l.Text,{fontSize:13,color:e.onPrimary,style:{...xe(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Buy now"})}),r.jsx(l.View,{paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",borderColor:e.border},children:r.jsx(l.Text,{fontSize:13,color:e.text,style:{...xe(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})]})})]})},gk=[{slug:"PRIMARY-TINT",source:"primary",intensity:"tint",heading:"Bring everyone together with systems that scale",body:"Signature primary ground for systems, FAQ, and the contact form.",cta:"Get started"},{slug:"SECONDARY-TINT",source:"secondary",intensity:"tint",heading:"A faster, more efficient way of working",body:"Secondary ground for hero moments and supporting narrative.",cta:"Explore"},{slug:"WARNING-TINT",source:"warning",intensity:"tint",heading:"Designed for the way ideas actually move",body:"Warm tint for product storytelling and brand moments.",cta:"See the story"},{slug:"SUCCESS-TINT",source:"success",intensity:"tint",heading:"Ship with confidence, every single release",body:"Cool tint for changelogs, releases, and reliability notes.",cta:"Read changelog"},{slug:"ERROR-TINT",source:"error",intensity:"tint",heading:"Built for teams who care about the details",body:"Saturated tint for community stories and testimonials.",cta:"Meet the makers"},{slug:"INK-INVERTED",source:"ink",intensity:"inverted",heading:"Go deeper. Go further. Go all-in.",body:"Inverted ground for premium tiers and developer surfaces.",cta:"Open the docs"}],Wt=(e,o)=>{const t=e.replace("#","").padEnd(6,"0").slice(0,6),n=parseInt(t.slice(0,2),16),a=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16);return[n,a,i].some(Number.isNaN)?e:`rgba(${n}, ${a}, ${i}, ${o})`},Ht=e=>typeof e=="string"&&/^#([0-9a-f]{3}){1,2}$/i.test(e),we=(e,o,t)=>Ht(e)?Wt(e,o):e.startsWith("rgba")||e.startsWith("rgb")?e.replace(/rgba?\(([^)]+)\)/,(n,a)=>`rgba(${a.split(",").slice(0,3).map(s=>s.trim()).join(", ")}, ${o})`):t==="dark"?`rgba(255,255,255,${o})`:`rgba(0,0,0,${o})`,hk=({block:e,palette:o,personality:t})=>{const n=cr(t);let a,i;if(e.source==="ink")a=o.text,i=o.canvas;else{const m=o[e.source]||o.primary;e.intensity==="solid"?(a=m,i=o.onPrimary):(a=we(m,.32,o.appearance),i=(o.appearance==="dark",o.text))}if(t.accentTreatment==="gradient"&&e.intensity==="tint"){const m=o[e.source],g=o.secondary;Ht(m)&&Ht(g)&&(a=`linear-gradient(135deg, ${Wt(m,.32)} 0%, ${Wt(g,.32)} 100%)`)}if(t.accentTreatment==="stripe"&&e.intensity==="tint"){const m=we(o[e.source],.32,o.appearance),g=we(o.secondary,.18,o.appearance);a=`repeating-linear-gradient(135deg, ${m} 0 18px, ${g} 18px 36px)`}const s=we(i,.72,o.appearance),c=we(i,.55,o.appearance),d=i,u=i===o.canvas?o.text:o.canvas;return r.jsx(l.View,{width:"min(100%, 460px)",borderRadius:t.cardRadius*2,padding:n.large,style:{background:a},children:r.jsxs(l.Vertical,{gap:n.gap+6,children:[r.jsxs(l.Text,{fontSize:11,color:c,style:{...xe(t),letterSpacing:"0.12em",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:[t.signatureMotif," ",e.slug]}),r.jsxs(l.Vertical,{gap:14,children:[r.jsx(l.Text,{fontSize:32,lineHeight:"36px",color:i,style:Qe(t),children:e.heading}),r.jsx(l.Text,{fontSize:16,lineHeight:"22px",color:s,style:{fontStyle:t.typeStyle},children:e.body})]}),r.jsx(l.View,{alignSelf:"flex-start",paddingHorizontal:28,paddingVertical:14,borderRadius:t.pillRadius,style:{backgroundColor:d,cursor:"pointer"},children:r.jsx(l.Text,{fontSize:15,color:u,style:{...xe(t),letterSpacing:t.typeCase==="uppercase"?"0.08em":"0.01em",textTransform:t.typeCase==="uppercase"?"uppercase":"none"},children:e.cta})})]})})},Sa=[{id:"design-tokens",badge:"NEW",badgeTone:"success",favorite:"♥",category:"Design systems",title:"Design tokens that survive a redesign",excerpt:"Why semantic naming beats raw values — and how to migrate a token set without breaking every consumer.",author:"Léa Martin",meta:"6 min read · Mar 10",imageTone:"warm"},{id:"shipping-faster",badge:"FEATURED",badgeTone:"primary",favorite:"★",category:"Engineering",title:"Shipping faster without skipping review",excerpt:"Three async patterns we use to keep PR cycle time under 24h while still catching the regressions that matter.",author:"Jordan Reyes",meta:"9 min read · Mar 04",imageTone:"cool"},{id:"a11y-audit",badge:"TRENDING",badgeTone:"warning",favorite:"⛉",category:"Accessibility",title:"The accessibility audit nobody asked for",excerpt:"A walkthrough of the 12 issues we found on our own marketing site — and the four-week fix plan that followed.",author:"Ines Okafor",meta:"12 min read · Feb 27",imageTone:"mono"}],ja=({palette:e,article:o,personality:t})=>{const n=cr(t),a=Kr(t,e),i=e[o.badgeTone]||e.primary,s=e.secondary||e.primary,c=t.accentTreatment==="gradient"?`linear-gradient(135deg, ${we(i,.55,e.appearance)} 0%, ${we(s,.55,e.appearance)} 100%)`:t.accentTreatment==="stripe"?`repeating-linear-gradient(45deg, ${we(i,.45,e.appearance)} 0 16px, ${we(s,.25,e.appearance)} 16px 32px)`:t.accentTreatment==="halftone"?`radial-gradient(circle at 30% 30%, ${we(i,.55,e.appearance)} 0%, ${we(s,.35,e.appearance)} 70%)`:t.accentTreatment==="glow"?`radial-gradient(circle at 50% 60%, ${we(i,.45,e.appearance)} 0%, ${e.appearance==="dark"?"#050505":"#0a0a0a"} 100%)`:we(i,.32,e.appearance),d=t.voice.includes("mission")||t.voice.includes("futurist")?"◉":o.favorite,u=d==="♥"?e.error||e.primary:d==="★"&&e.warning||e.primary;return r.jsx(l.View,{width:"min(100%, 320px)",borderRadius:t.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...a,borderColor:e.border,color:e.text},children:r.jsxs(l.Vertical,{gap:n.gap,padding:n.padding,children:[r.jsxs(l.View,{position:"relative",height:160,borderRadius:t.cardRadius,overflow:"hidden",style:{background:c},children:[r.jsx(l.View,{position:"absolute",top:12,left:12,paddingHorizontal:10,paddingVertical:4,borderRadius:t.badgeRadius,style:{background:Mo(t,{...e,primary:i}),boxShadow:Wo(t,e)},children:r.jsxs(l.Horizontal,{gap:4,alignItems:"center",children:[r.jsx(l.Text,{fontSize:10,color:e.onPrimary,style:{lineHeight:1,fontWeight:Ne(t,"heavy")},children:t.signatureMotif}),r.jsx(l.Text,{fontSize:10,color:e.onPrimary,style:xe(t),children:o.badge})]})}),r.jsx(l.View,{position:"absolute",top:10,right:10,width:36,height:36,borderRadius:t.cornerStyle==="sharp"?4:9999,borderWidth:1,borderStyle:"solid",alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:e.appearance==="dark"?"rgba(0,0,0,0.45)":"rgba(255,255,255,0.92)",borderColor:e.border,backdropFilter:"blur(6px)"},children:r.jsx(l.Text,{fontSize:16,color:u,style:{lineHeight:1},children:d})})]}),r.jsxs(l.Vertical,{gap:8,children:[r.jsx(l.Text,{fontSize:11,color:e.muted,style:xe(t),children:o.category}),r.jsx(l.Text,{fontSize:18,lineHeight:"24px",color:e.text,style:Qe(t),children:o.title}),r.jsx(l.Text,{fontSize:13,lineHeight:"18px",color:e.muted,style:{fontStyle:t.typeStyle},children:o.excerpt})]}),r.jsxs(l.Horizontal,{gap:10,alignItems:"center",children:[r.jsx(l.View,{width:28,height:28,borderRadius:t.cornerStyle==="sharp"?4:9999,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.08)"}}),r.jsxs(l.Vertical,{gap:0,children:[r.jsx(l.Text,{fontSize:12,color:e.text,style:{fontWeight:Ne(t,"normal"),fontStyle:t.typeStyle},children:o.author}),r.jsx(l.Text,{fontSize:11,color:e.muted,children:o.meta})]})]})]})})},wa=({palette:e,personality:o,config:t})=>{var g,h,f,y;const n=o.signatureMotif,a=e.primary,i=Mo(o,e),s=Wo(o,e),c=((h=(g=t.tokens)==null?void 0:g.typography)==null?void 0:h.fontFamily)||((y=(f=t.tokens)==null?void 0:f.rawCssVars)==null?void 0:y.display)||"inherit",d=o.voice.includes("mission")?"MAKING LIFE MULTIPLANETARY":o.voice.includes("athletic")?"JUST DO IT":o.voice.includes("refined")?"A new standard in payments":o.voice.includes("speed")?"Built for the makers":o.voice.includes("rhythmic")?"Music for everyone":o.voice.includes("thoughtful")?"The connected workspace":o.voice.includes("warm")?"Belong anywhere":o.voice.includes("minimal")?"Think different":o.voice.includes("commerce")?"The platform commerce is built on":o.voice.includes("bold-fintech")?"Money for the next generation":o.voice.includes("trustworthy")?"The future of money":o.voice.includes("playful")?"Nothing great is made alone":o.voice.includes("motion")?"Get there":o.voice.includes("deploy")?"Develop. Preview. Ship.":o.voice.includes("futurist")?"Accelerating the world to sustainable energy":`${t.metadata.label}`,u=o.typeCase==="uppercase"?"EXPLORE":"Get started",m=o.typeCase==="uppercase"?"LEARN MORE":"Learn more";return r.jsxs(l.View,{width:"100%",borderRadius:o.cardRadius*2,padding:o.density==="spacious"?56:o.density==="tight"?28:40,style:{backgroundColor:e.canvas,color:e.text,fontFamily:c,position:"relative",overflow:"hidden"},children:[o.accentTreatment==="glow"&&r.jsx(l.View,{position:"absolute",top:-120,right:-80,width:360,height:360,borderRadius:9999,style:{background:`radial-gradient(circle, ${a}40 0%, transparent 70%)`,pointerEvents:"none"}}),o.accentTreatment==="halftone"&&r.jsx(l.View,{position:"absolute",top:0,right:0,width:300,height:300,style:{background:`radial-gradient(circle at 70% 30%, ${a}30 0%, transparent 60%)`,pointerEvents:"none"}}),r.jsxs(l.Vertical,{gap:24,style:{position:"relative"},children:[r.jsxs(l.Horizontal,{gap:10,alignItems:"center",children:[r.jsx(l.View,{width:32,height:32,borderRadius:o.cornerStyle==="pill"?9999:o.cornerStyle==="sharp"?0:8,alignItems:"center",justifyContent:"center",style:{display:"flex",background:i,boxShadow:s},children:r.jsx(l.Text,{fontSize:16,color:e.onPrimary,style:{lineHeight:1,fontWeight:Ne(o,"heavy")},children:n})}),r.jsx(l.Text,{fontSize:13,color:e.muted,style:{...xe(o),letterSpacing:o.typeCase==="uppercase"?"0.18em":"0.06em"},children:t.metadata.label})]}),r.jsx(l.Text,{fontSize:o.density==="spacious"?56:o.density==="tight"?40:48,lineHeight:o.density==="spacious"?"60px":o.density==="tight"?"44px":"52px",color:e.text,style:{...Qe(o),letterSpacing:o.typeCase==="uppercase"?"0.06em":o.letterSpacing,maxWidth:580,fontFamily:c},children:d}),r.jsxs(l.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(l.View,{paddingHorizontal:o.density==="spacious"?32:24,paddingVertical:o.density==="spacious"?16:14,borderRadius:o.pillRadius,style:{display:"flex",cursor:"pointer",background:i,boxShadow:s},children:r.jsx(l.Text,{fontSize:15,color:e.onPrimary,style:{...xe(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:Ne(o,"heavy"),fontFamily:c},children:u})}),r.jsx(l.View,{paddingHorizontal:24,paddingVertical:14,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",style:{display:"flex",cursor:"pointer",borderColor:e.text},children:r.jsx(l.Text,{fontSize:15,color:e.text,style:{...xe(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:Ne(o,"heavy"),fontFamily:c},children:m})})]}),r.jsx(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"center",marginTop:8,children:[{label:"Primary",value:e.primary},{label:"Surface",value:e.surface},{label:"Text",value:e.text},{label:"Success",value:e.success}].map(b=>r.jsxs(l.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(l.View,{width:20,height:20,borderRadius:o.cornerStyle==="sharp"?0:o.cornerStyle==="pill"?9999:4,borderWidth:1,borderStyle:"solid",style:{backgroundColor:b.value,borderColor:e.border}}),r.jsxs(l.Vertical,{gap:0,children:[r.jsx(l.Text,{fontSize:11,color:e.muted,style:xe(o),children:b.label}),r.jsx(l.Text,{fontSize:11,color:e.text,style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:rk(b.value)})]})]},b.label))})]})]})},va=({palette:e,config:o})=>r.jsxs(l.Vertical,{gap:20,padding:36,alignItems:"center",borderRadius:16,style:{backgroundColor:e.surface},children:[r.jsx(Ce,{variant:"outline",content:"New release"}),r.jsxs(l.Vertical,{gap:8,alignItems:"center",children:[r.jsxs(l.Text,{fontSize:36,lineHeight:"40px",fontWeight:"800",textAlign:"center",color:e.text,children:[o.metadata.label," Pro"]}),r.jsx(l.Text,{fontSize:18,lineHeight:"24px",color:e.muted,textAlign:"center",children:"Pro. Beyond."})]}),r.jsxs(l.Horizontal,{gap:12,flexWrap:"wrap",justifyContent:"center",children:[r.jsx(se,{shape:"pill",size:"md",children:"Learn more"}),r.jsx(se,{shape:"pill",size:"md",variant:"outline",children:"Buy"})]}),r.jsx(l.View,{width:220,height:140,borderRadius:20,backgroundColor:e.appearance==="dark"?e.canvas:e.text,opacity:.85})]}),Ta=({palette:e,config:o})=>r.jsxs(ye,{width:"min(100%, 320px)",views:{container:{backgroundColor:e.surface,color:e.text,borderWidth:1,borderStyle:"solid",borderColor:e.border},header:{color:e.text,borderColor:e.border},content:{color:e.text},footer:{borderColor:e.border}},children:[r.jsx(ye.Header,{children:r.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsx(l.Text,{color:e.text,fontWeight:"700",children:o.metadata.id==="spacex"?"Falcon 9":"Product Card"}),r.jsx(Ce,{variant:"filled",content:"New"})]})}),r.jsx(ye.Content,{children:r.jsx(l.Text,{fontSize:14,lineHeight:"20px",color:e.text,children:o.metadata.id==="spacex"?"The world's first orbital-class reusable rocket. Designed for reliable and safe transport of people and payloads.":"Card surfaces, borders, typography, and shadows come from the active JSON config."})}),r.jsx(ye.Footer,{children:r.jsx(se,{size:"sm",children:o.metadata.id==="spacex"?"Explore":"Review"})})]}),Ia=({palette:e})=>r.jsxs(l.Vertical,{gap:14,children:[r.jsxs(l.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(se,{color:"theme-primary",children:"Primary"}),r.jsx(se,{color:"theme-secondary",children:"Secondary"}),r.jsx(se,{color:"color-black",children:"Black"}),r.jsx(se,{color:"color-white",textColor:"color-black",children:"White"})]}),r.jsxs(l.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(se,{variant:"outline",color:"theme-primary",children:"Primary"}),r.jsx(se,{variant:"outline",color:"theme-secondary",children:"Secondary"}),r.jsx(se,{variant:"outline",color:"color-black",children:"Black"}),r.jsx(se,{variant:"outline",color:"color-white",children:"White"})]}),r.jsxs(l.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(se,{variant:"ghost",views:{container:{color:e.text}},children:"Ghost"}),r.jsx(se,{variant:"link",views:{container:{color:e.primary}},children:"Link"}),r.jsx(se,{isDisabled:!0,children:"Disabled"}),r.jsx(se,{isLoading:!0,children:"Loading"})]})]}),Fa=({palette:e,config:o})=>r.jsx(l.View,{style:{color:e.text},children:r.jsxs(l.Vertical,{gap:14,children:[r.jsxs(l.Horizontal,{gap:10,flexWrap:"wrap",alignItems:"center",children:[r.jsx(Ce,{content:"Badge"}),r.jsx(Ce,{variant:"outline",content:"Outline"}),r.jsx(Ce,{content:"Primary",views:{container:{backgroundColor:e.primary,color:e.onPrimary,borderColor:e.primary}}}),r.jsx(Ce,{content:"Success",views:{container:{backgroundColor:e.success,color:e.onPrimary,borderColor:e.success}}}),r.jsx(Ce,{content:"Warning",views:{container:{backgroundColor:e.warning,color:e.onPrimary,borderColor:e.warning}}}),r.jsx(Ce,{content:"Error",views:{container:{backgroundColor:e.error,color:e.onPrimary,borderColor:e.error}}})]}),r.jsxs(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(Cr,{status:"success",label:"Operational"}),r.jsx(Cr,{status:"warning",label:"Degraded"}),r.jsx(Cr,{status:"error",label:"Outage"}),r.jsx(Je,{size:"sm",loaderColor:o.theme.primary})]}),r.jsx(Yt,{title:"Heads up",description:"Brand styling cascades through every alert.",variant:"info",views:{container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},title:{color:e.text},description:{color:e.muted}}}),r.jsx(qi,{value:64,height:10,showLabel:!0,color:e.primary,backgroundColor:e.border,views:{container:{backgroundColor:e.border},bar:{backgroundColor:e.primary}}})]})}),Ra=({palette:e,config:o,mode:t})=>{const n={container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},field:{color:e.text}};return r.jsx(l.View,{style:{color:e.text},children:r.jsxs(l.Vertical,{gap:16,children:[r.jsxs(l.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[r.jsx(ve,{size:"md",label:"Name",placeholder:"Ada Lovelace",views:n}),r.jsx(Zo,{id:`forms-${o.metadata.id}-${t}`,size:"md",label:"Plan",placeholder:"Select plan",options:[{label:"Starter",value:"starter"},{label:"Team",value:"team"},{label:"Enterprise",value:"enterprise"}],views:{container:n.container,field:{fontSize:14,lineHeight:"20px",color:e.text},text:{fontSize:14,lineHeight:"20px",color:e.text}}}),r.jsx(an,{label:"Notes",placeholder:"Add implementation notes",views:n})]}),r.jsxs(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(sn,{label:"Email updates",defaultIsSelected:!0}),r.jsx(hs,{label:"Standard",value:"standard",defaultIsSelected:!0}),r.jsx(nn,{label:"Enabled",isChecked:!0})]})]})})},fk=({config:e})=>{const[o,t]=p.useState(1),n=ek(e),a=ok(e),i=nk(e);return r.jsxs(l.Vertical,{gap:24,children:[r.jsx(me,{title:"Brand Snapshot (Light & Dark)",config:e,children:r.jsxs(l.Vertical,{gap:20,children:[r.jsx(pe,{config:e,palette:n,label:"On light surface",children:r.jsx(wa,{palette:n,personality:i,config:e})}),r.jsx(pe,{config:e,palette:a,label:"On dark surface",children:r.jsx(wa,{palette:a,personality:i,config:e})})]})}),r.jsx(me,{title:"Buttons — Light & Dark",config:e,children:r.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(pe,{config:e,palette:n,label:"On light surface",children:r.jsx(Ia,{palette:n})}),r.jsx(pe,{config:e,palette:a,label:"On dark surface",children:r.jsx(Ia,{palette:a})})]})}),r.jsx(me,{title:"Status & Feedback — Light & Dark",config:e,children:r.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(pe,{config:e,palette:n,label:"On light surface",children:r.jsx(Fa,{palette:n,config:e})}),r.jsx(pe,{config:e,palette:a,label:"On dark surface",children:r.jsx(Fa,{palette:a,config:e})})]})}),r.jsx(me,{title:"Forms — Light & Dark",config:e,children:r.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(pe,{config:e,palette:n,label:"On light surface",children:r.jsx(Ra,{palette:n,config:e,mode:"light"})}),r.jsx(pe,{config:e,palette:a,label:"On dark surface",children:r.jsx(Ra,{palette:a,config:e,mode:"dark"})})]})}),r.jsx(me,{title:"Forms (legacy preview)",config:e,children:r.jsxs(l.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",alignItems:"start",gap:16,children:[r.jsx(ve,{size:"md",label:"Name",placeholder:"Ada Lovelace"}),r.jsx(Zo,{id:`design-system-select-${e.metadata.id}`,size:"md",label:"Plan",placeholder:"Select plan",options:[{label:"Starter",value:"starter"},{label:"Team",value:"team"},{label:"Enterprise",value:"enterprise"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}}),r.jsx(an,{label:"Notes",placeholder:"Add implementation notes"}),r.jsxs(l.Vertical,{gap:12,children:[r.jsx(sn,{label:"Email updates",defaultIsSelected:!0}),r.jsx(hs,{label:"Standard",value:"standard",defaultIsSelected:!0}),r.jsx(nn,{label:"Enabled",isChecked:!0}),r.jsx(ii,{defaultValue:58,showValue:!0}),r.jsx(_l,{length:6,label:"Verification Code"})]})]})}),r.jsx(me,{title:"Form States",config:e,children:r.jsxs(l.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[r.jsx(ve,{size:"md",label:"Default",placeholder:"Type here",helperText:"Resting state"}),r.jsx(ve,{size:"md",label:"Filled",defaultValue:"Ada Lovelace",helperText:"Has value"}),r.jsx(ve,{size:"md",label:"With helper",placeholder:"user@example.com",helperText:"We'll never share your email"}),r.jsx(ve,{size:"md",label:"Error",defaultValue:"invalid@",error:"Please enter a valid email"}),r.jsx(ve,{size:"md",label:"Disabled",isDisabled:!0,defaultValue:"Cannot edit",helperText:"Field locked"}),r.jsx(ve,{size:"md",label:"Read only",defaultValue:"Read-only value",isReadOnly:!0,helperText:"View only"}),r.jsx(Zo,{id:`design-system-select-error-${e.metadata.id}`,size:"md",label:"Select error",placeholder:"Pick one",error:!0,helperText:"Selection required",options:[{label:"Option A",value:"a"},{label:"Option B",value:"b"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}}),r.jsx(Zo,{id:`design-system-select-disabled-${e.metadata.id}`,size:"md",label:"Select disabled",placeholder:"Disabled",isDisabled:!0,options:[{label:"Option A",value:"a"},{label:"Option B",value:"b"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}})]})}),r.jsx(me,{title:"Elevation & Depth",config:e,children:r.jsx(l.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:20,children:ik(e).map(s=>r.jsxs(l.Vertical,{gap:12,children:[r.jsx(l.View,{height:120,borderRadius:12,backgroundColor:e.theme.canvas,style:{boxShadow:s.shadow}}),r.jsxs(l.Vertical,{gap:4,children:[r.jsxs(l.Horizontal,{gap:8,alignItems:"baseline",flexWrap:"wrap",children:[r.jsx(l.Text,{fontSize:12,fontWeight:"700",children:s.name}),r.jsx(l.Text,{fontSize:11,fontWeight:"600",color:e.theme.primary,children:s.label})]}),r.jsx(l.Text,{fontSize:11,color:e.theme.muted,children:s.description}),r.jsx(l.Text,{fontSize:10,color:e.theme.muted,style:{wordBreak:"break-word",opacity:.8},children:s.shadow})]})]},s.name))})}),r.jsx(me,{title:"Color Blocks",config:e,children:r.jsx(l.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:12,children:[["primary","Primary",e.theme.onPrimary],["secondary","Secondary",e.theme.onPrimary],["success","Success","#ffffff"],["warning","Warning","#ffffff"],["error","Error","#ffffff"],["canvas","Canvas",e.theme.text],["surface","Surface",e.theme.text],["text","Text",e.theme.canvas],["muted","Muted",e.theme.canvas],["border","Border",e.theme.text],["onPrimary","On primary",e.theme.text]].map(([s,c,d])=>{const u=e.theme[s];return r.jsxs(l.Vertical,{gap:0,borderRadius:12,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,children:[r.jsx(l.View,{height:88,backgroundColor:u}),r.jsxs(l.Vertical,{gap:4,padding:12,backgroundColor:e.theme.surface,children:[r.jsx(l.Text,{fontSize:13,fontWeight:"700",children:c}),r.jsxs(l.Text,{fontSize:11,color:e.theme.muted,children:["theme.",s]}),r.jsx(l.Text,{fontSize:11,color:e.theme.muted,children:u})]})]},s)})})}),r.jsx(me,{title:"Pricing — Booking (Light & Dark)",config:e,children:r.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(pe,{config:e,palette:n,label:"On light surface",children:r.jsx(ya,{palette:n})}),r.jsx(pe,{config:e,palette:a,label:"On dark surface",children:r.jsx(ya,{palette:a})})]})}),r.jsx(me,{title:"Pricing — SaaS Tiers (Light & Dark)",config:e,children:r.jsxs(l.Vertical,{gap:20,children:[r.jsx(pe,{config:e,palette:n,label:"On light surface",children:r.jsx(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:xa.map(s=>r.jsx(ba,{palette:n,tier:s,personality:i},s.name))})}),r.jsx(pe,{config:e,palette:a,label:"On dark surface",children:r.jsx(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:xa.map(s=>r.jsx(ba,{palette:a,tier:s,personality:i},s.name))})})]})}),r.jsx(me,{title:"Pricing — Product (Light & Dark)",config:e,children:r.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(pe,{config:e,palette:n,label:"On light surface",children:r.jsx(ka,{palette:n,personality:i})}),r.jsx(pe,{config:e,palette:a,label:"On dark surface",children:r.jsx(ka,{palette:a,personality:i})})]})}),r.jsx(me,{title:"Pricing — Featured w/ Badge & Favorite (Light & Dark)",config:e,children:r.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(pe,{config:e,palette:n,label:"On light surface",children:r.jsx(Ca,{palette:n,personality:i})}),r.jsx(pe,{config:e,palette:a,label:"On dark surface",children:r.jsx(Ca,{palette:a,personality:i})})]})}),r.jsx(me,{title:"Content — Color Block Cards",config:e,children:r.jsx(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:gk.map(s=>r.jsx(hk,{block:s,palette:n,personality:i},s.slug))})}),r.jsx(me,{title:"Content — Article Cards w/ Badge & Favorite (Light & Dark)",config:e,children:r.jsxs(l.Vertical,{gap:20,children:[r.jsx(pe,{config:e,palette:n,label:"On light surface",children:r.jsx(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Sa.map(s=>r.jsx(ja,{palette:n,article:s,personality:i},s.id))})}),r.jsx(pe,{config:e,palette:a,label:"On dark surface",children:r.jsx(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Sa.map(s=>r.jsx(ja,{palette:a,article:s,personality:i},s.id))})})]})}),r.jsx(me,{title:"CTA Card — Light & Dark",config:e,children:r.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(pe,{config:e,palette:n,label:"On light surface",children:r.jsx(va,{palette:n,config:e})}),r.jsx(pe,{config:e,palette:a,label:"On dark surface",children:r.jsx(va,{palette:a,config:e})})]})}),r.jsx(me,{title:"Product Card — Light & Dark",config:e,children:r.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(pe,{config:e,palette:n,label:"On light surface",children:r.jsx(Ta,{palette:n,config:e})}),r.jsx(pe,{config:e,palette:a,label:"On dark surface",children:r.jsx(Ta,{palette:a,config:e})})]})}),r.jsx(me,{title:"Content & Layout",config:e,children:r.jsxs(l.Vertical,{gap:24,children:[r.jsxs(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:[r.jsxs(ye,{width:"min(100%, 320px)",children:[r.jsx(ye.Header,{children:r.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsx(l.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Falcon 9":"Product Card"}),r.jsx(Ce,{variant:"filled",content:"New"})]})}),r.jsx(ye.Content,{children:r.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:e.metadata.id==="spacex"?"The world's first orbital-class reusable rocket. Designed for reliable and safe transport of people and payloads.":"Card surfaces, borders, typography, and shadows come from the active JSON config."})}),r.jsx(ye.Footer,{children:r.jsx(se,{size:"sm",children:e.metadata.id==="spacex"?"Explore":"Review"})})]}),r.jsxs(ye,{width:"min(100%, 320px)",children:[r.jsx(ye.Header,{children:r.jsxs(l.Horizontal,{gap:12,alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",children:[r.jsxs(l.Horizontal,{gap:12,alignItems:"center",children:[r.jsx(Ka,{fallback:e.metadata.label.slice(0,2)}),r.jsxs(l.Vertical,{gap:2,children:[r.jsx(l.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Starship":e.metadata.label}),r.jsx(l.Text,{fontSize:12,color:e.theme.muted,children:e.metadata.id==="spacex"?"Multiplanetary mission":"Config-driven preview"})]})]}),r.jsx(Ce,{variant:"outline",content:"Active"})]})}),r.jsx(ye.Content,{children:e.metadata.id==="spacex"?r.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"The most powerful launch vehicle ever developed. Designed to carry crew and cargo to Mars and beyond."}):r.jsx(Yt,{variant:"info",title:"Config active",description:"This alert is rendered by the shared component."})})]})]}),r.jsx(pk,{config:e}),r.jsx(Na,{ratio:16/9,borderRadius:12,overflow:"hidden",children:r.jsx(l.View,{width:"100%",height:"100%",backgroundColor:e.theme.primary,children:r.jsxs(l.Vertical,{height:"100%",alignItems:"center",justifyContent:"center",gap:8,children:[r.jsx(l.Text,{fontWeight:"700",color:e.theme.onPrimary,children:"16:9 Aspect Ratio"}),r.jsx(Ce,{content:"Config primary color"})]})})}),r.jsxs(We,{children:[r.jsx(We.Content,{children:[1,2,3].map(s=>r.jsx(We.Item,{children:r.jsx(l.View,{height:200,borderRadius:12,alignItems:"center",justifyContent:"center",backgroundColor:e.theme.surface,borderColor:e.theme.border,borderWidth:1,borderStyle:"solid",children:r.jsxs(l.Text,{fontSize:24,fontWeight:"700",children:["Slide ",s]})})},s))}),r.jsxs(l.Horizontal,{gap:12,marginTop:12,justifyContent:"center",children:[r.jsx(We.Previous,{}),r.jsx(We.Next,{})]})]})]})}),r.jsx(me,{title:"Navigation & Interactive",config:e,children:r.jsxs(l.Vertical,{gap:18,children:[r.jsxs(l.Vertical,{gap:20,children:[r.jsxs(l.Vertical,{gap:8,children:[r.jsx(l.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"With icons"}),r.jsx(zo,{tabs:sk,defaultValue:"homes",views:{tab:{borderRadius:Xo(e,"tabs")},activeTab:{borderRadius:Xo(e,"tabs")}}})]}),r.jsxs(l.Vertical,{gap:8,children:[r.jsx(l.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"Without icons"}),r.jsx(zo,{defaultValue:"overview",views:{tab:{borderRadius:Xo(e,"tabs")},activeTab:{borderRadius:Xo(e,"tabs")}},tabs:[{title:"Overview",value:"overview",content:r.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"Tokens and components share the active config."})},{title:"Usage",value:"usage",content:r.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Audit",value:"audit",content:r.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"Plain text tabs without icons."})}]})]})]}),r.jsx(uo,{items:dk,orientation:"horizontal",defaultActiveItemId:"components"}),(()=>{const s=Xo(e,"accordion"),c={borderWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftWidth:0,borderRightWidth:0,marginBottom:0,borderRadius:0},d={...c,borderTopWidth:1,borderTopStyle:"solid",borderTopColor:e.theme.border};return r.jsxs(Me,{defaultValue:"tokens",collapsible:!0,shape:"rounded",views:{container:{borderRadius:s,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border}},children:[r.jsxs(Me.Item,{value:"tokens",...c,views:{item:c,trigger:{borderRadius:0}},children:[r.jsx(Me.Trigger,{children:"Token extraction"}),r.jsx(Me.Content,{children:r.jsxs(l.Text,{color:e.theme.muted,children:[Object.keys(e.tokens.rawCssVars).length," raw CSS variables were extracted from ",e.metadata.sourcePath,"."]})})]}),r.jsxs(Me.Item,{value:"overrides",...d,views:{item:d,trigger:{borderRadius:0}},children:[r.jsx(Me.Trigger,{children:"Override behavior"}),r.jsx(Me.Content,{children:r.jsx(l.Text,{color:e.theme.muted,children:"Props passed directly to components override the design-system defaults."})})]})]})})(),r.jsx(Pr,{label:"advanced tools"}),r.jsxs(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(cn,{color:e.theme.primary,children:"Toggle Button"}),r.jsx(Ii,{color:e.theme.primary,items:[{id:"left",value:"Left"},{id:"center",value:"Center"},{id:"right",value:"Right"}]}),r.jsx(Gr,{content:"Tooltip message",children:r.jsx(se,{variant:"outline",children:"Hover for Tooltip"})}),r.jsxs(Se,{children:[r.jsx(Se.Trigger,{children:r.jsx(se,{variant:"ghost",children:"Hover Card"})}),r.jsx(Se.Content,{children:r.jsxs(l.Vertical,{gap:4,padding:12,children:[r.jsx(l.Text,{fontWeight:"700",children:"Detailed Info"}),r.jsx(l.Text,{fontSize:12,opacity:.8,children:"Hover cards provide more context."})]})})]}),r.jsx(Pi,{value:e.theme.primary}),r.jsx(Gi,{shareData:{url:"https://example.com",title:"Example"}}),r.jsx(Jt,{to:"#",children:"Inline Link component"})]}),r.jsx(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:r.jsx(Ni,{currentPage:o,totalPages:10,onPageChange:t})})]})})]})},yk=({config:e})=>{var o;return r.jsxs(Dt,{config:e,children:[r.jsx(X1,{children:(o=e.metadata.googleFontLinks)==null?void 0:o.map(t=>r.jsx("link",{rel:"stylesheet",href:t},t))}),r.jsx(l.View,{minHeight:"100vh",padding:28,fontFamily:e.tokens.typography.fontFamily,backgroundColor:e.theme.canvas,color:e.theme.text,style:{textTransform:e.metadata.id==="spacex"?"uppercase":"none"},children:r.jsxs(l.Vertical,{gap:28,children:[r.jsxs(l.Vertical,{gap:12,maxWidth:900,children:[r.jsxs(l.Text,{as:"h1",fontSize:44,lineHeight:"48px",fontWeight:"800",fontFamily:e.tokens.typography.fontFamily,children:[e.metadata.label," Design System"]}),r.jsxs(l.Text,{fontSize:16,lineHeight:"24px",color:e.theme.muted,fontFamily:e.tokens.typography.fontFamily,children:["Live App Studio components rendered with the"," ",e.metadata.label," config defaults."]})]}),r.jsxs(l.Vertical,{gap:28,children:[r.jsx(mk,{config:e}),r.jsx(fk,{config:e})]})]})})]})};exports.Accordion=Me;exports.ActionSheet=op;exports.Alert=Yt;exports.ArrowIcon=qu;exports.AspectRatio=Na;exports.AttachmentGroup=Ri;exports.AttachmentIcon=er;exports.AttachmentPreview=Rf;exports.AudioIcon=Ro;exports.AudioInput=yp;exports.AudioWaveform=Kt;exports.Avatar=Ka;exports.BackIcon=hu;exports.Background=ms;exports.Badge=Ce;exports.BatteryIcon=Zd;exports.BluetoothIcon=_u;exports.BoldArrowIcon=Nu;exports.BookmarkIcon=eu;exports.Button=se;exports.CHART_COLORS=ze;exports.CalendarIcon=Mu;exports.CameraIcon=Lu;exports.Card=ye;exports.Carousel=We;exports.Chart=Sm;exports.ChartIcon=pu;exports.ChatInput=ds;exports.ChatWidget=gs;exports.ChatWidgetComponent=jn;exports.ChatWidgetWidget=x1;exports.CheckIcon=gu;exports.Checkbox=sn;exports.ChevronIcon=ce;exports.ClockIcon=Wu;exports.CloseEyeIcon=Nt;exports.CloseIcon=Te;exports.CloudIcon=ou;exports.ColorInput=C0;exports.ColorPicker=Pi;exports.ComboBox=Yg;exports.Command=Eo;exports.ContextMenu=Vo;exports.CookieConsent=Im;exports.CopyIcon=ru;exports.CountryPicker=F0;exports.CreditCardIcon=Iu;exports.CropIcon=Yu;exports.DEFAULT_CHART_COLORS=sl;exports.DatePicker=Dg;exports.DeleteIcon=tu;exports.DesignSystem=yk;exports.DesignSystemProvider=Dt;exports.Divider=vx;exports.DocumentIcon=uu;exports.DownloadIcon=lu;exports.DragAndDrop=Hy;exports.DragAndDropComponent=Fi;exports.DragHandleIcon=Dd;exports.DragHandleLinesIcon=Xu;exports.Drawer=co;exports.DropZone=Ey;exports.DropdownMenu=lr;exports.DustBinIcon=Ar;exports.EditIcon=nu;exports.EmojiPicker=ex;exports.ErrorIcon=Dr;exports.ExternalLinkIcon=La;exports.FacebookIcon=Ud;exports.FileIcon=ao;exports.FileImage=Vm;exports.FileSVG=Pm;exports.FilterIcon=zu;exports.FolderIcon=Ed;exports.FormikChatInput=Rh;exports.FormikCheckbox=ch;exports.FormikColorInput=Mh;exports.FormikComboBox=Kh;exports.FormikCountryPicker=Vh;exports.FormikDatePicker=Hh;exports.FormikEmojiPicker=Ff;exports.FormikForm=lh;exports.FormikIconPicker=Cf;exports.FormikOTPInput=af;exports.FormikPassword=Gh;exports.FormikRadio=hh;exports.FormikSelect=Eh;exports.FormikSelector=cf;exports.FormikSlider=rf;exports.FormikSwitch=$h;exports.FormikTagInput=_h;exports.FormikTextArea=Oh;exports.FormikTextField=qh;exports.FormikToggle=mf;exports.FormikToggleGroup=ff;exports.FormikUploader=Ql;exports.GiftIcon=ku;exports.Gradient=Vi;exports.HeartIcon=Xd;exports.HelpIcon=Ad;exports.HomeIcon=au;exports.HoverCard=Se;exports.Icon=vr;exports.IconPicker=rx;exports.ImageIcon=Ld;exports.InfoIcon=Ye;exports.InstagramIcon=Nd;exports.KeyboardAvoidingView=di;exports.LayoutIcon=vu;exports.LikeIcon=$u;exports.Link=Jt;exports.LinkIcon=wu;exports.LinkedinIcon=Gd;exports.Loader=Je;exports.LoadingSpinnerIcon=Ot;exports.LockIcon=su;exports.LogoutIcon=Su;exports.MagicWandIcon=Eu;exports.MapPinIcon=Hu;exports.MediaPreview=Mf;exports.MenuIcon=Pu;exports.Menubar=po;exports.MessageLayout=dp;exports.MessageView=Ga;exports.MicrophoneIcon=_t;exports.MinusIcon=Aa;exports.Modal=so;exports.ModalLayout=un;exports.ModalRouter=un;exports.MoonIcon=mu;exports.MoreIcon=Fu;exports.MousePointerIcon=Ba;exports.NavigationMenu=uo;exports.NotificationIcon=du;exports.OTPInput=_l;exports.OpenEyeIcon=qt;exports.PageLayout=Kf;exports.Pagination=Ni;exports.PanelIcon=_a;exports.Password=Lg;exports.PauseIcon=Kd;exports.PlayIcon=Ea;exports.PlusIcon=iu;exports.PowerOffIcon=ju;exports.PrintIcon=Au;exports.ProfileIcon=cu;exports.ProgressBar=qi;exports.RefreshIcon=Vu;exports.Resizable=Cn;exports.RotateIcon=bu;exports.Router=ty;exports.SaveIcon=Qd;exports.SearchIcon=Tr;exports.Select=Zo;exports.Selector=s0;exports.SendIcon=Bt;exports.Separator=Pr;exports.SettingsIcon=Da;exports.ShapeIcon=xu;exports.ShareButton=Gi;exports.ShareIcon=$a;exports.ShieldIcon=Cu;exports.Sidebar=ir;exports.Slider=ii;exports.SliderIcon=Gu;exports.SpinnerIcon=Uu;exports.SplashScreen=Qf;exports.StarIcon=Jd;exports.StatusIndicator=Cr;exports.StopIcon=Er;exports.SuccessIcon=Ut;exports.Switch=nn;exports.Table=Fe;exports.Tabs=zo;exports.TagInput=Jg;exports.TextArea=an;exports.TextField=ve;exports.TextIcon=yu;exports.ThreadsIcon=Yd;exports.TickIcon=or;exports.Title=Ti;exports.Toast=sb;exports.Toggle=cn;exports.ToggleGroup=Ii;exports.Tooltip=Gr;exports.TrashIcon=Ru;exports.TwitchIcon=Od;exports.TwitterIcon=_d;exports.UnLikeIcon=Du;exports.UnlockIcon=Bu;exports.UploadIcon=Gt;exports.Uploader=Lr;exports.UserIcon=Vd;exports.VideoIcon=$d;exports.WarningIcon=Lt;exports.WifiIcon=Ou;exports.XIcon=Bd;exports.YoutubeIcon=qd;exports.ZapIcon=Tu;exports.ZoomInIcon=Ku;exports.ZoomOutIcon=fu;exports.deepMerge=De;exports.defaultDesignSystemConfig=za;exports.designSystemConfigList=Td;exports.designSystemConfigs=Vt;exports.getDesignSystemComponentProps=Et;exports.goBack=ey;exports.hideDrawer=ci;exports.hideMessage=Ua;exports.hideModal=dn;exports.matchPath=ui;exports.mergeDesignSystemComponentProps=Wa;exports.navigate=Zf;exports.normalizeDesignSystemComponentProps=At;exports.setSplashLoaded=Xf;exports.setSplashStarted=Jf;exports.showDrawer=Uf;exports.showMessage=qa;exports.showModal=Wf;exports.showToast=mo;exports.useDesignSystem=Vr;exports.useDesignSystemComponentProps=Po;exports.useDrawerStore=Xe;exports.useHistory=gn;exports.useMergedDesignSystemComponentProps=ge;exports.useMessageStore=$r;exports.useModalStore=Ke;exports.useRouterStore=Ee;exports.useSplashStore=Nr;exports.useToast=cb;
35
+ `})]})},Qb=({number:e=20,children:o,...t})=>{const n=Array.from({length:e},(a,i)=>i);return r.jsxs(l.View,{width:"100%",height:"100%",backgroundColor:"black",position:"relative",overflow:"hidden",...t,children:[n.map(a=>{const i=a*37%200-100+"px",s=.2+a*13%6*.1+"s",c=(1+a*7%9)/2+"s",d=300+a*17%100+"px";return r.jsx(l.View,{position:"absolute",top:"0px",left:i,width:"2px",height:"2px",borderRadius:"9999px",backgroundColor:"white",boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)",transform:"rotate(215deg)",zIndex:0,animate:{from:{transform:"translateX(-100%) translateY(-100%)"},to:{transform:`translateX(${d}) translateY(${d})`},iterationCount:"infinite",timingFunction:"linear",fillMode:"forwards",duration:c,delay:s},children:r.jsx(l.View,{position:"absolute",top:"-1px",left:"-1px",width:"1px",height:"1px",borderRadius:"9999px",backgroundColor:"white",boxShadow:"0 10px 0 1px rgba(255, 255, 255, 0.1)"})},a)}),o&&r.jsx(l.View,{position:"relative",zIndex:1,width:"100%",height:"100%",children:o})]})},ga=["rgb(186, 230, 253)","rgb(249, 168, 212)","rgb(134, 239, 172)","rgb(253, 224, 71)","rgb(252, 165, 165)","rgb(216, 180, 254)","rgb(147, 197, 253)","rgb(165, 180, 252)","rgb(196, 181, 253)"],Zb=()=>ga[Math.floor(Math.random()*ga.length)],e1=({rows:e=15,cols:o=10,squareSize:t=40,...n})=>{const a=Array(e).fill(1),i=Array(o).fill(1);return r.jsx(l.View,{padding:16,width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-50",zIndex:0,transform:"skewX(-48deg) skewY(14deg) scale(0.675) rotate(0deg) translateZ(0)",...n,children:a.map((s,c)=>r.jsx(l.Horizontal,{gap:0,children:i.map((d,u)=>r.jsx(l.View,{height:t/3,width:t,borderStyle:"solid",borderColor:"color-gray-200",borderWidth:.5,backgroundColor:"transparent",cursor:"pointer",on:{hover:{backgroundColor:Zb(),transition:"background-color 0.2s ease"}}},`col-${u}`))},`row-${c}`))})},o1=["rgb(59, 130, 246)","rgb(147, 51, 234)","rgb(236, 72, 153)","rgb(34, 197, 94)","rgb(251, 146, 60)","rgb(168, 85, 247)"],r1=({count:e=50,colors:o=o1,speed:t="medium",shapes:n=["circle"],...a})=>{const i=Array.from({length:e},(u,m)=>m),s=()=>{switch(t){case"slow":return .5;case"fast":return 2;default:return 1}},c=()=>n[Math.floor(Math.random()*n.length)],d=()=>o[Math.floor(Math.random()*o.length)];return r.jsx(l.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:i.map(u=>{const m=Math.random()*8+4,g=Math.random()*400,h=Math.random()*300,f=Math.random()*400,y=Math.random()*300,k=(Math.random()*10+5)/s(),b=Math.random()*5,C=c(),S=d(),w={circle:{borderRadius:"50%"},square:{borderRadius:"2px"},triangle:{borderRadius:"0",clipPath:"polygon(50% 0%, 0% 100%, 100% 100%)"}};return r.jsx(l.View,{position:"absolute",width:m,height:m,backgroundColor:S,opacity:.7,style:{left:g,top:h,...w[C]},animate:{from:{transform:"translate(0px, 0px) scale(0.5)",opacity:0},to:{transform:`translate(${f-g}px, ${y-h}px) scale(1)`,opacity:.7},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${k}s`,delay:`${b}s`}},u)})})},t1=({gridSize:e=30,lineColor:o="rgba(59, 130, 246, 0.3)",pulseColor:t="rgba(59, 130, 246, 0.8)",animationSpeed:n="medium",...a})=>{const i=()=>{switch(n){case"slow":return 4;case"fast":return 1;default:return 2}},s=Math.floor(400/e),c=Math.floor(300/e),d=s*c,u=Array.from({length:d},(m,g)=>g);return r.jsxs(l.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:[Array.from({length:s+1},(m,g)=>r.jsx(l.View,{position:"absolute",left:g*e,top:0,width:1,height:"100%",backgroundColor:o},`v-line-${g}`)),Array.from({length:c+1},(m,g)=>r.jsx(l.View,{position:"absolute",left:0,top:g*e,width:"100%",height:1,backgroundColor:o},`h-line-${g}`)),u.map(m=>{const g=m%s,h=Math.floor(m/s),f=(g+h)*.1;return r.jsx(l.View,{position:"absolute",left:g*e+1,top:h*e+1,width:e-2,height:e-2,backgroundColor:"transparent",animate:{from:{backgroundColor:"transparent"},to:{backgroundColor:t},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${i()}s`,delay:`${f}s`}},m)})]})},n1=["rgba(59, 130, 246, 0.6)","rgba(147, 51, 234, 0.6)","rgba(236, 72, 153, 0.6)","rgba(34, 197, 94, 0.6)"],a1=({rippleCount:e=5,colors:o=n1,maxSize:t=200,frequency:n=3,...a})=>{const i=Array.from({length:e},(s,c)=>({id:c,x:Math.random()*400,y:Math.random()*300,color:o[c%o.length],delay:c*(n/e),duration:3+Math.random()*2}));return r.jsxs(l.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-100",...a,children:[i.map(s=>r.jsx(l.View,{position:"absolute",width:20,height:20,borderRadius:"50%",style:{left:s.x-10,top:s.y-10,border:`2px solid ${s.color}`,backgroundColor:"transparent"},animate:{from:{transform:"scale(0)",opacity:1},to:{transform:`scale(${t/20})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${s.duration}s`,delay:`${s.delay}s`}},s.id)),i.map(s=>r.jsx(l.View,{position:"absolute",width:10,height:10,borderRadius:"50%",style:{left:s.x-5,top:s.y-5,backgroundColor:s.color},animate:{from:{transform:"scale(1)",opacity:.8},to:{transform:`scale(${t/40})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${s.duration*1.2}s`,delay:`${s.delay+.5}s`}},`secondary-${s.id}`))]})},l1=({children:e,src:o,backgroundSize:t="cover",backgroundPosition:n="center",backgroundRepeat:a="no-repeat",backgroundAttachment:i="scroll",imageOpacity:s=1,overlay:c=null,blendMode:d="normal",views:u,themeMode:m,...g})=>{const h={...pt.image,backgroundImage:`url(${o})`,backgroundSize:t,backgroundPosition:n,backgroundRepeat:a,backgroundAttachment:i,opacity:s};return r.jsxs(l.View,{...pt.container,...u==null?void 0:u.container,...g,children:[r.jsx(l.View,{style:h,...u==null?void 0:u.image}),c,e&&r.jsx(l.View,{...pt.content,...u==null?void 0:u.content,children:e})]})},i1=({children:e,src:o,autoPlay:t=!0,loop:n=!0,muted:a=!0,playsInline:i=!0,overlay:s=null,blendMode:c="normal",views:d,themeMode:u,...m})=>r.jsxs(l.View,{...mt.container,...d==null?void 0:d.container,...m,children:[r.jsx(l.View,{as:"video",src:o,autoPlay:t,loop:n,muted:a,playsInline:i,style:mt.video,...d==null?void 0:d.video}),s,e&&r.jsx(l.View,{...mt.content,...d==null?void 0:d.content,children:e})]}),s1=({children:e,...o})=>r.jsx(Li,{...o,children:e}),c1=/^(color|theme|light|dark)-/,d1=e=>{const o=e.split("-"),t=parseInt(o[o.length-1],10),n=e.startsWith("theme-")?3:4;return o.length>=n&&!isNaN(t)&&t>=0&&t<=1e3?o.slice(0,-1).join("-"):e},u1=({contentPosition:e,backgroundColor:o="color-black-900",...t})=>{const n=c1.test(o),a=n?d1(o):o,s=(()=>{let c=`${a}-100`,d=`${a}-900`,u=`${a}-600`,m=`${a}-400`;switch(n||(c=`color-mix(in srgb, ${a} 10%, transparent)`,d=`color-mix(in srgb, ${a} 90%, transparent)`,u=`color-mix(in srgb, ${a} 70%, transparent)`,m=`color-mix(in srgb, ${a} 50%, transparent)`),e){case"left":return`radial-gradient(circle at 70% 50%, ${c} 0%, ${c} 100%), linear-gradient(to right, ${d} 0%, ${u} 65%, ${c} 100%)`;case"right":return`radial-gradient(circle at 30% 50%, ${c} 0%, ${c} 100%), linear-gradient(to left, ${d} 0%, ${u} 65%, ${c} 100%)`;case"top":return`radial-gradient(circle at 50% 40%, ${c} 0%, ${c} 100%), linear-gradient(to bottom, ${d} 0%, ${u} 60%, ${c} 100%)`;case"bottom":return`radial-gradient(circle at 50% 60%, ${c} 0%, ${c} 100%), linear-gradient(to top, ${d} 0%, ${u} 60%, ${c} 100%)`;case"center":return`radial-gradient(circle at 50% 70%, ${d} 0%, ${c} 100%)`;default:return m}})();return r.jsx(l.View,{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:s,pointerEvents:"none",zIndex:1,...t})},p1=({children:e,views:o,...t})=>r.jsx(Xb.Provider,{value:{},children:r.jsx(l.View,{...Kb.container,...o==null?void 0:o.container,...t,children:e})}),fs=p.forwardRef(({children:e,designProps:o,shape:t="rounded",decorationRotation:n=5,decorationScale:a=1,decorationOpacity:i=.8,views:s,...c},d)=>{const m=(b=>{switch(b){case"square":return"0px";case"pill":return"9999px";case"rounded":default:return"16px"}})(t),g=Math.abs(n)*(Math.PI/180),h=Math.sin(g)*100,f=(a-1)*100/2,y=Math.ceil(h+f),k=c.backgroundColor??"theme-primary";return r.jsx(l.View,{...c,ref:d,backgroundColor:"transparent",position:"relative",overflow:"visible",...s==null?void 0:s.container,children:r.jsxs(l.View,{padding:c.padding??`${96+y}px ${y}px`,position:"relative",overflow:"visible",children:[r.jsx(l.View,{position:"absolute",top:y,left:y,right:y,bottom:y,backgroundColor:k,borderRadius:m,opacity:i/1.5,transform:`scale(${a})`,pointerEvents:"none",zIndex:1,...s==null?void 0:s.back}),r.jsx(l.View,{position:"absolute",top:y,left:y,right:y,bottom:y,transform:`rotate(${n}deg) scale(${a})`,opacity:i/1.2,backgroundColor:k,borderRadius:m,pointerEvents:"none",zIndex:2,...s==null?void 0:s.front}),r.jsx(l.View,{margin:"0 auto",position:"relative",zIndex:3,...s==null?void 0:s.content,children:e})]})})});fs.displayName="Background.Layout";const pe=p1;pe.Aurora=Jb;pe.Meteors=Qb;pe.Wall=e1;pe.Particles=r1;pe.Grid=t1;pe.Ripples=a1;pe.Image=l1;pe.Video=i1;pe.Gradient=s1;pe.Overlay=u1;pe.Layout=fs;const ys=p.forwardRef((e,o)=>r.jsx(pe,{...e,ref:o}));ys.displayName="Background";const xs=Object.assign(ys,{Layout:pe.Layout,Aurora:pe.Aurora,Meteors:pe.Meteors,Wall:pe.Wall,Particles:pe.Particles,Grid:pe.Grid,Ripples:pe.Ripples,Image:pe.Image,Video:pe.Video,Gradient:pe.Gradient,Overlay:pe.Overlay});xs.displayName="Background";function m1(e){const{inputValue:o,onInputChange:t,onSubmit:n,messages:a=[]}=e,[i,s]=p.useState(""),c=p.useRef(null),d=p.useRef(null),u=o!==void 0,m=o!==void 0?o:i,g=p.useCallback(f=>{u?t==null||t(f):s(f)},[u,t]),h=p.useCallback(f=>{f&&f.preventDefault();const y=m.trim();y&&n&&(n(y),u||s(""),c.current&&(c.current.style.height="auto"))},[m,n,u]);return p.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight)},[a.length]),{internalInputValue:m,handleInputChange:g,handleSubmit:h,inputRef:c,messagesRef:d}}const g1={sm:{fontSize:"12px",padding:"8px"},md:{fontSize:"14px",padding:"10px"},lg:{fontSize:"14px",padding:"12px"}},h1={default:{backgroundColor:"color-white",border:"1px solid color-gray-200",borderRadius:"12px",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.08)"},glassy:{backgroundColor:"color-white-900",backdropFilter:"blur(10px)",border:"1px solid rgba(226, 232, 240, 0.9)",borderRadius:"12px",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.08)"},minimal:{backgroundColor:"color-white",border:"1px solid color-gray-200",borderRadius:"12px"}},f1={sm:{fontSize:"12px",padding:"8px 10px",borderRadius:"12px"},md:{fontSize:"14px",padding:"10px 12px",borderRadius:"12px"},lg:{fontSize:"14px",padding:"12px 14px",borderRadius:"14px"}},y1={backgroundColor:"theme-primary",color:"color-white",alignSelf:"flex-end",borderBottomRightRadius:"4px"},x1={backgroundColor:"color-white",color:"color-gray-900",alignSelf:"flex-start",borderBottomLeftRadius:"4px",border:"1px solid color-gray-200"},b1={position:"relative",backgroundColor:"color-white",borderTop:"1px solid color-gray-200",padding:"12px",display:"flex",alignItems:"flex-end",gap:"8px",transition:"background-color 0.2s ease, border-color 0.2s ease"},Ge={container:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"hidden"},messagesContainer:{flex:1,overflowY:"auto",display:"flex",flexDirection:"column",gap:"12px",padding:"16px",backgroundColor:"color-gray-50"},inputContainer:b1,bubble:{maxWidth:"80%",position:"relative",wordWrap:"break-word",animation:"chatBubbleAppear 0.25s ease-out"},timestamp:{position:"absolute",top:"-24px",fontSize:"12px",color:"color-gray-500",backgroundColor:"color-white-900",padding:"2px 8px",borderRadius:"9999px",opacity:0,transition:"opacity 0.15s ease-out",border:"1px solid color-gray-200"},input:{flex:1,border:"none",outline:"none",backgroundColor:"transparent",resize:"none",fontFamily:"inherit",fontSize:"14px",minHeight:"24px",maxHeight:"120px"},sendButton:{width:"36px",height:"36px",borderRadius:"10px",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s ease, opacity 0.2s ease",flexShrink:0},attachmentButton:{width:"36px",height:"36px",borderRadius:"10px",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",transition:"background-color 0.2s ease",flexShrink:0}},k1=({messages:e=[],inputPlaceholder:o="Type a message...",disableInput:t=!1,variant:n="default",size:a="md",showTimestamps:i=!0,enableAttachments:s=!1,enableContextPicker:c=!1,selectedContextElements:d=[],onContextPickerClick:u,onRemoveContextElement:m,isLoading:g=!1,loadingText:h="Loading...",styles:f={},maxHeight:y="600px",internalInputValue:k,handleInputChange:b,handleSubmit:C,inputRef:S,messagesRef:w,inputValue:j,onInputChange:x,...v})=>{var R;const T={...Ge.container,...h1[n],...f.container},F={...Ge.messagesContainer,maxHeight:y,...f.messagesContainer},M={...Ge.inputContainer,...f.inputContainer},E={...Ge.input,...g1[a],...f.input},I=p.useCallback(W=>{b(W.target.value),W.target.style.height="auto",W.target.style.height=`${W.target.scrollHeight}px`},[b]),V=p.useCallback(W=>{W.key==="Enter"&&!W.shiftKey&&(W.preventDefault(),C())},[C]),H=k.trim().length>0,{onSubmit:z,...P}=v;return r.jsxs(l.View,{...T,...P,children:[r.jsxs(l.View,{ref:w,...F,children:[e.length===0?r.jsx(l.View,{display:"flex",alignItems:"center",justifyContent:"center",flex:1,color:"color-gray-500",children:r.jsx(l.Text,{fontSize:"14px",children:"No messages yet. Start a conversation."})}):e.map(W=>r.jsx(C1,{message:W,size:a,showTimestamp:i,styles:{bubble:f.bubble,userBubble:f.userBubble,assistantBubble:f.assistantBubble,timestamp:f.timestamp,reasoningContainer:f.reasoningContainer,reasoningContent:f.reasoningContent,errorMessage:f.errorMessage,systemMessage:f.systemMessage,toolMessage:f.toolMessage}},W.id)),g&&r.jsxs(l.Horizontal,{justifyContent:"flex-start",alignItems:"center",gap:8,marginTop:"8px",...f.loadingIndicator,children:[r.jsx(Ut,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),r.jsx(l.Text,{color:"color-gray-500",fontSize:"14px",children:h})]})]}),r.jsxs(l.View,{children:[d.length>0&&r.jsx(l.Horizontal,{gap:8,marginBottom:"8px",flexWrap:"wrap",padding:"0 12px 8px",...f.contextChipsContainer,children:d.map(W=>r.jsxs(l.Horizontal,{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",borderRadius:"9999px",padding:"6px 10px",alignItems:"center",gap:6,children:[r.jsx(l.Text,{fontSize:"12px",color:"color-blue-700",fontWeight:"500",children:W.name}),r.jsx(l.View,{as:"button",type:"button",onClick:()=>m==null?void 0:m(W.id),cursor:"pointer",border:"none",backgroundColor:"transparent",display:"flex",alignItems:"center",children:r.jsx(ze,{widthHeight:12,color:"color-blue-700"})})]},W.id))}),r.jsxs(l.View,{as:"form",onSubmit:C,...M,children:[s&&r.jsx(l.View,{as:"button",type:"button",...Ge.attachmentButton,...f.attachmentButton,_hover:{backgroundColor:"color-gray-100"},children:r.jsx(ar,{widthHeight:16,color:"color-gray-600"})}),r.jsx(l.View,{as:"textarea",ref:S,value:k,onChange:I,onKeyDown:V,placeholder:o,disabled:t||g,...E,style:{...E,opacity:t||g?.5:1}}),r.jsxs(l.Vertical,{gap:4,alignItems:"center",children:[c&&r.jsx(l.View,{as:"button",type:"button",onClick:u,...Ge.attachmentButton,...f.contextPickerButton,_hover:{backgroundColor:"color-gray-100",...(R=f.contextPickerButton)==null?void 0:R._hover},title:"Select element from page",children:r.jsx(Ga,{widthHeight:16,color:"color-gray-600"})}),r.jsx(l.View,{as:"button",type:"submit",disabled:!H||t||g,...Ge.sendButton,backgroundColor:H?"theme-primary":"color-gray-300",_hover:{backgroundColor:H?"theme-primary":"color-gray-300"},...f.sendButton,style:{cursor:H?"pointer":"not-allowed",opacity:!H||t||g?.6:1},children:r.jsx(qt,{widthHeight:16,color:"color-white",filled:!1})})]})]})]})]})},C1=({message:e,size:o,showTimestamp:t,styles:n})=>{const[a,i]=p.useState(!1),[s,c]=p.useState(!1),d=e.role==="user",u=e.messageType==="system",m=e.messageType==="error",g=e.messageType==="tool";if(u)return r.jsx(l.View,{display:"flex",justifyContent:"center",padding:"8px",width:"100%",...n.systemMessage,children:r.jsxs(l.Horizontal,{gap:6,alignItems:"center",opacity:.7,children:[r.jsx(Ze,{widthHeight:12,color:"color-gray-600"}),r.jsx(l.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.content})]})});if(g)return r.jsx(l.View,{display:"flex",justifyContent:"flex-start",padding:"8px 16px",width:"100%",...n.toolMessage,children:r.jsxs(l.Horizontal,{gap:8,alignItems:"center",backgroundColor:"color-gray-50",padding:"8px 10px",borderRadius:"8px",width:"100%",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[r.jsx(Oa,{widthHeight:14,color:"color-gray-600"}),r.jsxs(l.Vertical,{gap:2,children:[r.jsx(l.Text,{fontSize:"11px",fontWeight:"600",color:"color-gray-700",children:"Tool Usage"}),r.jsx(l.Text,{fontSize:"12px",color:"color-gray-600",fontFamily:"monospace",children:e.content})]})]})});const h={...Ge.bubble,...f1[o],...d?y1:x1,...m?{backgroundColor:"color-red-50",borderWidth:1,borderStyle:"solid",borderColor:"color-red-200",color:"color-red-700"}:{},...n.bubble,...d?n.userBubble:n.assistantBubble,...m?n.errorMessage:{}},f={...Ge.timestamp,[d?"right":"left"]:"8px",opacity:a?1:0,...n.timestamp};return r.jsx(l.View,{position:"relative",onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),display:"flex",justifyContent:d?"flex-end":"flex-start",children:r.jsxs(l.View,{...h,children:[t&&r.jsx(l.View,{...f,children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),m&&r.jsxs(l.Horizontal,{gap:6,marginBottom:"4px",alignItems:"center",children:[r.jsx(Or,{widthHeight:14,color:"color-red-700"}),r.jsx(l.Text,{fontWeight:"600",fontSize:"12px",children:"Error"})]}),e.reasoning&&r.jsxs(l.View,{marginBottom:"8px",borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:"color-gray-200",paddingBottom:"8px",...n.reasoningContainer,children:[r.jsxs(l.Horizontal,{as:"button",onClick:()=>c(!s),cursor:"pointer",gap:4,alignItems:"center",backgroundColor:"transparent",border:"none",padding:0,children:[r.jsx(l.Text,{fontSize:"11px",color:"color-gray-500",fontWeight:"600",children:"Thinking Process"}),r.jsx(de,{orientation:s?"down":"right",widthHeight:10,color:"color-gray-500"})]}),s&&r.jsx(l.View,{padding:"8px",backgroundColor:"color-gray-50",borderRadius:"8px",marginTop:"4px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",...n.reasoningContent,children:r.jsx(l.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.reasoning})})]}),r.jsx(l.View,{whiteSpace:"pre-wrap",wordBreak:"break-word",children:e.content}),e.attachments&&e.attachments.length>0&&r.jsx(l.Vertical,{gap:4,marginTop:"8px",children:e.attachments.map(y=>r.jsxs(l.Horizontal,{gap:6,padding:"6px 8px",backgroundColor:"color-gray-50",borderRadius:"8px",fontSize:"12px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[r.jsx(ar,{widthHeight:14}),r.jsx(l.Text,{children:y.name})]},y.id))}),e.contextElements&&e.contextElements.length>0&&r.jsxs(l.Vertical,{gap:4,marginTop:"8px",children:[r.jsx(l.Text,{fontSize:"11px",color:"color-black-500",fontWeight:"600",children:"Context:"}),e.contextElements.map(y=>r.jsx(l.Horizontal,{gap:6,padding:"6px 10px",backgroundColor:"color-blue-50",borderRadius:"9999px",fontSize:"11px",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",children:r.jsx(l.Text,{color:"color-blue-700",fontWeight:"500",children:y.name})},y.id))]})]})})},Tn=e=>{const o=m1(e);return r.jsx(k1,{...e,...o})};Tn.displayName="ChatWidget";const bs=Tn;function S1({onSelect:e,onCancel:o,active:t}){const[n,a]=p.useState(null);p.useRef(null);const i=p.useCallback(d=>{var f;if(!t)return;const u=document.elementFromPoint(d.clientX,d.clientY);if(!u||u===document.body||u.closest('[data-chatwidget-ignore="true"]')||u.closest("#chatwidget-overlay")){a(null);return}const m=u.getBoundingClientRect();let g=u.tagName.toLowerCase();if(u.id)g+=`#${u.id}`;else if(u.className&&typeof u.className=="string"){const y=u.className.split(" ")[0];y&&(g+=`.${y}`)}const h=(f=u.innerText)==null?void 0:f.slice(0,20);h&&(g+=` ("${h}...")`),a({id:u.id||`el-${Date.now()}`,name:g,tagName:u.tagName.toLowerCase(),rect:m})},[t]),s=p.useCallback(d=>{!t||d.target.closest('[data-chatwidget-ignore="true"]')||(d.preventDefault(),d.stopPropagation(),n&&e(n))},[t,n,e]),c=p.useCallback(d=>{t&&d.key==="Escape"&&o()},[t,o]);return p.useEffect(()=>{if(!(typeof document>"u"))return t?(document.addEventListener("mousemove",i),document.addEventListener("click",s,!0),document.addEventListener("keydown",c),document.body.style.cursor="crosshair"):(a(null),document.removeEventListener("mousemove",i),document.removeEventListener("click",s,!0),document.removeEventListener("keydown",c),document.body.style.cursor=""),()=>{document.removeEventListener("mousemove",i),document.removeEventListener("click",s,!0),document.removeEventListener("keydown",c),document.body.style.cursor=""}},[t,i,s,c]),{highlightedElement:n}}function j1({element:e}){return e?r.jsx("div",{id:"chatwidget-overlay",style:{position:"fixed",top:e.rect.top,left:e.rect.left,width:e.rect.width,height:e.rect.height,border:"2px solid #1D4ED8",backgroundColor:"rgba(29, 78, 216, 0.08)",pointerEvents:"none",zIndex:99999,transition:"top 0.1s ease-out, left 0.1s ease-out, width 0.1s ease-out, height 0.1s ease-out",borderRadius:"8px"},children:r.jsx("div",{style:{position:"absolute",top:"-24px",left:"0",backgroundColor:"#1D4ED8",color:"white",padding:"2px 8px",borderRadius:"9999px",fontSize:"12px",fontWeight:"bold",whiteSpace:"nowrap"},children:e.name})}):null}const w1=({initialMessages:e=[],onSendMessage:o,bubbleSize:t="md"})=>{const[n,a]=p.useState(!1),[i,s]=p.useState(!1),[c,d]=p.useState(e),[u,m]=p.useState([]),{highlightedElement:g}=S1({active:i,onSelect:b=>{m(C=>[...C,b]),s(!1),a(!0)},onCancel:()=>{s(!1),a(!0)}}),h=()=>a(!n),f=()=>{s(!0),a(!1)},y=b=>{m(C=>C.filter(S=>S.id!==b))},k=b=>{const C={id:Date.now().toString(),role:"user",content:b,timestamp:new Date,contextElements:[...u]};d(S=>[...S,C]),o==null||o(b,u),m([]),setTimeout(()=>{var x;const S=Math.random()>.7,w=Math.random()>.4,j={id:(Date.now()+1).toString(),role:"assistant",timestamp:new Date,content:S?"I will highlight the selected element.":`I received your message regarding: ${((x=C.contextElements)==null?void 0:x.map(v=>v.name).join(", "))||"general context"}. How can I assist you further?`,messageType:S?"tool":"text",reasoning:w?"Analyzing the user input and context... The user seems to be asking about specific elements. I should tailor my response to the selected context.":void 0};d(v=>[...v,j]),S&&setTimeout(()=>{d(v=>[...v,{id:(Date.now()+2).toString(),role:"assistant",messageType:"system",content:'Tool "highlightElement" executed successfully.',timestamp:new Date}])},800)},1e3)};return r.jsxs(l.View,{position:"fixed",bottom:24,right:24,zIndex:9999,children:[r.jsx(j1,{element:g}),i&&r.jsx(l.View,{position:"fixed",top:24,left:"50%",transform:"translateX(-50%)",backgroundColor:"rgba(0,0,0,0.8)",color:"white",padding:"8px 16px",borderRadius:"24px",zIndex:1e4,boxShadow:"0 4px 6px rgba(0,0,0,0.1)",children:r.jsx(l.Text,{fontWeight:"600",fontSize:"14px",children:"Click an element to select it. Press ESC to cancel."})}),n&&r.jsxs(l.View,{position:"absolute",bottom:60,right:0,width:"400px",height:"600px",marginBottom:"16px",backgroundColor:"rgba(255, 255, 255, 0.8)",backdropFilter:"blur(20px)",borderRadius:"24px",border:"1px solid rgba(255, 255, 255, 0.4)",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)",overflow:"hidden",animation:"slideUp 0.3s ease-out",style:{animation:"fadeIn 0.2s ease-out",transformOrigin:"bottom right"},children:[r.jsxs(l.View,{padding:"16px",borderBottom:"1px solid rgba(0,0,0,0.05)",display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(l.Text,{fontWeight:"bold",color:"color-gray-800",children:"ChatWidget Assistant"}),r.jsx(l.View,{as:"button",onClick:()=>a(!1),cursor:"pointer",padding:"4px",borderRadius:"50%",border:"none",backgroundColor:"transparent",_hover:{backgroundColor:"rgba(0,0,0,0.05)"},children:r.jsx(ze,{widthHeight:16,color:"color-gray-500"})})]}),r.jsx(bs,{messages:c,onSubmit:k,size:t,variant:"minimal",enableContextPicker:!0,selectedContextElements:u,onContextPickerClick:f,onRemoveContextElement:y,styles:{container:{height:"calc(100% - 60px)",backgroundColor:"transparent"},inputContainer:{backgroundColor:"white",margin:"0 16px 16px 16px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)"}}})]}),!i&&r.jsx(l.View,{as:"button",onClick:h,width:"56px",height:"56px",borderRadius:"50%",backgroundColor:"theme-primary",border:"none",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",_hover:{transform:"scale(1.05)"},_active:{transform:"scale(0.95)"},"data-chatwidget-ignore":"true",children:n?r.jsx(ze,{widthHeight:24,color:"white"}):r.jsx(Ua,{widthHeight:24,color:"white"})})]})},v1=e=>{const o=he("radio",e),t=Yl(o);return r.jsx(Kl,{...t,...o})},ks=v1;function In(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var T1=typeof Element<"u",I1=typeof Map=="function",R1=typeof Set=="function",F1=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Ir(e,o){if(e===o)return!0;if(e&&o&&typeof e=="object"&&typeof o=="object"){if(e.constructor!==o.constructor)return!1;var t,n,a;if(Array.isArray(e)){if(t=e.length,t!=o.length)return!1;for(n=t;n--!==0;)if(!Ir(e[n],o[n]))return!1;return!0}var i;if(I1&&e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!o.has(n.value[0]))return!1;for(i=e.entries();!(n=i.next()).done;)if(!Ir(n.value[1],o.get(n.value[0])))return!1;return!0}if(R1&&e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!o.has(n.value[0]))return!1;return!0}if(F1&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(o)){if(t=e.length,t!=o.length)return!1;for(n=t;n--!==0;)if(e[n]!==o[n])return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof o.valueOf=="function")return e.valueOf()===o.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof o.toString=="function")return e.toString()===o.toString();if(a=Object.keys(e),t=a.length,t!==Object.keys(o).length)return!1;for(n=t;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,a[n]))return!1;if(T1&&e instanceof Element)return!1;for(n=t;n--!==0;)if(!((a[n]==="_owner"||a[n]==="__v"||a[n]==="__o")&&e.$$typeof)&&!Ir(e[a[n]],o[a[n]]))return!1;return!0}return e!==e&&o!==o}var z1=function(o,t){try{return Ir(o,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const M1=In(z1);var W1=function(e,o,t,n,a,i,s,c){if(process.env.NODE_ENV!=="production"&&o===void 0)throw new Error("invariant requires an error message argument");if(!e){var d;if(o===void 0)d=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[t,n,a,i,s,c],m=0;d=new Error(o.replace(/%s/g,function(){return u[m++]})),d.name="Invariant Violation"}throw d.framesToPop=1,d}},H1=W1;const ha=In(H1);var P1=function(o,t,n,a){var i=n?n.call(a,o,t):void 0;if(i!==void 0)return!!i;if(o===t)return!0;if(typeof o!="object"||!o||typeof t!="object"||!t)return!1;var s=Object.keys(o),c=Object.keys(t);if(s.length!==c.length)return!1;for(var d=Object.prototype.hasOwnProperty.bind(t),u=0;u<s.length;u++){var m=s[u];if(!d(m))return!1;var g=o[m],h=t[m];if(i=n?n.call(a,g,h,m):void 0,i===!1||i===void 0&&g!==h)return!1}return!0};const V1=In(P1);var Cs=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(Cs||{}),gt={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},fa=Object.values(Cs),Zr={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},Ss=Object.entries(Zr).reduce((e,[o,t])=>(e[t]=o,e),{}),_e="data-rh",Ho={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Po=(e,o)=>{for(let t=e.length-1;t>=0;t-=1){const n=e[t];if(Object.prototype.hasOwnProperty.call(n,o))return n[o]}return null},A1=e=>{let o=Po(e,"title");const t=Po(e,Ho.TITLE_TEMPLATE);if(Array.isArray(o)&&(o=o.join("")),t&&o)return t.replace(/%s/g,()=>o);const n=Po(e,Ho.DEFAULT_TITLE);return o||n||void 0},E1=e=>Po(e,Ho.ON_CHANGE_CLIENT_STATE)||(()=>{}),ht=(e,o)=>o.filter(t=>typeof t[e]<"u").map(t=>t[e]).reduce((t,n)=>({...t,...n}),{}),D1=(e,o)=>o.filter(t=>typeof t.base<"u").map(t=>t.base).reverse().reduce((t,n)=>{if(!t.length){const a=Object.keys(n);for(let i=0;i<a.length;i+=1){const c=a[i].toLowerCase();if(e.indexOf(c)!==-1&&n[c])return t.concat(n)}}return t},[]),$1=e=>console&&typeof console.warn=="function"&&console.warn(e),Zo=(e,o,t)=>{const n={};return t.filter(a=>Array.isArray(a[e])?!0:(typeof a[e]<"u"&&$1(`Helmet: ${e} should be of type "Array". Instead found type "${typeof a[e]}"`),!1)).map(a=>a[e]).reverse().reduce((a,i)=>{const s={};i.filter(d=>{let u;const m=Object.keys(d);for(let h=0;h<m.length;h+=1){const f=m[h],y=f.toLowerCase();o.indexOf(y)!==-1&&!(u==="rel"&&d[u].toLowerCase()==="canonical")&&!(y==="rel"&&d[y].toLowerCase()==="stylesheet")&&(u=y),o.indexOf(f)!==-1&&(f==="innerHTML"||f==="cssText"||f==="itemprop")&&(u=f)}if(!u||!d[u])return!1;const g=d[u].toLowerCase();return n[u]||(n[u]={}),s[u]||(s[u]={}),n[u][g]?!1:(s[u][g]=!0,!0)}).reverse().forEach(d=>a.push(d));const c=Object.keys(s);for(let d=0;d<c.length;d+=1){const u=c[d],m={...n[u],...s[u]};n[u]=m}return a},[]).reverse()},L1=(e,o)=>{if(Array.isArray(e)&&e.length){for(let t=0;t<e.length;t+=1)if(e[t][o])return!0}return!1},_1=e=>({baseTag:D1(["href"],e),bodyAttributes:ht("bodyAttributes",e),defer:Po(e,Ho.DEFER),encode:Po(e,Ho.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:ht("htmlAttributes",e),linkTags:Zo("link",["rel","href"],e),metaTags:Zo("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:Zo("noscript",["innerHTML"],e),onChangeClientState:E1(e),scriptTags:Zo("script",["src","innerHTML"],e),styleTags:Zo("style",["cssText"],e),title:A1(e),titleAttributes:ht("titleAttributes",e),prioritizeSeoTags:L1(e,Ho.PRIORITIZE_SEO_TAGS)}),js=e=>Array.isArray(e)?e.join(""):e,B1=(e,o)=>{const t=Object.keys(e);for(let n=0;n<t.length;n+=1)if(o[t[n]]&&o[t[n]].includes(e[t[n]]))return!0;return!1},ft=(e,o)=>Array.isArray(e)?e.reduce((t,n)=>(B1(n,o)?t.priority.push(n):t.default.push(n),t),{priority:[],default:[]}):{default:e,priority:[]},ya=(e,o)=>({...e,[o]:void 0}),O1=["noscript","script","style"],zt=(e,o=!0)=>o===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),ws=e=>Object.keys(e).reduce((o,t)=>{const n=typeof e[t]<"u"?`${t}="${e[t]}"`:`${t}`;return o?`${o} ${n}`:n},""),N1=(e,o,t,n)=>{const a=ws(t),i=js(o);return a?`<${e} ${_e}="true" ${a}>${zt(i,n)}</${e}>`:`<${e} ${_e}="true">${zt(i,n)}</${e}>`},q1=(e,o,t=!0)=>o.reduce((n,a)=>{const i=a,s=Object.keys(i).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,m)=>{const g=typeof i[m]>"u"?m:`${m}="${zt(i[m],t)}"`;return u?`${u} ${g}`:g},""),c=i.innerHTML||i.cssText||"",d=O1.indexOf(e)===-1;return`${n}<${e} ${_e}="true" ${s}${d?"/>":`>${c}</${e}>`}`},""),vs=(e,o={})=>Object.keys(e).reduce((t,n)=>{const a=Zr[n];return t[a||n]=e[n],t},o),U1=(e,o,t)=>{const n={key:o,[_e]:!0},a=vs(t,n);return[p.createElement("title",a,o)]},Rr=(e,o)=>o.map((t,n)=>{const a={key:n,[_e]:!0};return Object.keys(t).forEach(i=>{const c=Zr[i]||i;if(c==="innerHTML"||c==="cssText"){const d=t.innerHTML||t.cssText;a.dangerouslySetInnerHTML={__html:d}}else a[c]=t[i]}),p.createElement(e,a)}),Pe=(e,o,t=!0)=>{switch(e){case"title":return{toComponent:()=>U1(e,o.title,o.titleAttributes),toString:()=>N1(e,o.title,o.titleAttributes,t)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>vs(o),toString:()=>ws(o)};default:return{toComponent:()=>Rr(e,o),toString:()=>q1(e,o,t)}}},G1=({metaTags:e,linkTags:o,scriptTags:t,encode:n})=>{const a=ft(e,gt.meta),i=ft(o,gt.link),s=ft(t,gt.script);return{priorityMethods:{toComponent:()=>[...Rr("meta",a.priority),...Rr("link",i.priority),...Rr("script",s.priority)],toString:()=>`${Pe("meta",a.priority,n)} ${Pe("link",i.priority,n)} ${Pe("script",s.priority,n)}`},metaTags:a.default,linkTags:i.default,scriptTags:s.default}},Y1=e=>{const{baseTag:o,bodyAttributes:t,encode:n=!0,htmlAttributes:a,noscriptTags:i,styleTags:s,title:c="",titleAttributes:d,prioritizeSeoTags:u}=e;let{linkTags:m,metaTags:g,scriptTags:h}=e,f={toComponent:()=>[],toString:()=>""};return u&&({priorityMethods:f,linkTags:m,metaTags:g,scriptTags:h}=G1(e)),{priority:f,base:Pe("base",o,n),bodyAttributes:Pe("bodyAttributes",t,n),htmlAttributes:Pe("htmlAttributes",a,n),link:Pe("link",m,n),meta:Pe("meta",g,n),noscript:Pe("noscript",i,n),script:Pe("script",h,n),style:Pe("style",s,n),title:Pe("title",{title:c,titleAttributes:d},n)}},Mt=Y1,jr=[],Rn=!!(typeof window<"u"&&window.document&&window.document.createElement),Wt=class{constructor(e,o){Ue(this,"instances",[]);Ue(this,"canUseDOM",Rn);Ue(this,"context");Ue(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?jr:this.instances,add:e=>{(this.canUseDOM?jr:this.instances).push(e)},remove:e=>{const o=(this.canUseDOM?jr:this.instances).indexOf(e);(this.canUseDOM?jr:this.instances).splice(o,1)}}});this.context=e,this.canUseDOM=o||!1,o||(e.helmet=Mt({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},K1=parseInt(p.version.split(".")[0],10),Ht=K1>=19,X1={},Ts=p.createContext(X1),uo,J1=(uo=class extends p.Component{constructor(t){super(t);Ue(this,"helmetData");Ht?this.helmetData=null:this.helmetData=new Wt(this.props.context||{},uo.canUseDOM)}render(){return Ht?p.createElement(p.Fragment,null,this.props.children):p.createElement(Ts.Provider,{value:this.helmetData.value},this.props.children)}},Ue(uo,"canUseDOM",Rn),uo),Fo=(e,o)=>{const t=document.head||document.querySelector("head"),n=t.querySelectorAll(`${e}[${_e}]`),a=[].slice.call(n),i=[];let s;return o&&o.length&&o.forEach(c=>{const d=document.createElement(e);for(const u in c)if(Object.prototype.hasOwnProperty.call(c,u))if(u==="innerHTML")d.innerHTML=c.innerHTML;else if(u==="cssText"){const m=c.cssText;d.appendChild(document.createTextNode(m))}else{const m=u,g=typeof c[m]>"u"?"":c[m];d.setAttribute(u,g)}d.setAttribute(_e,"true"),a.some((u,m)=>(s=m,d.isEqualNode(u)))?a.splice(s,1):i.push(d)}),a.forEach(c=>{var d;return(d=c.parentNode)==null?void 0:d.removeChild(c)}),i.forEach(c=>t.appendChild(c)),{oldTags:a,newTags:i}},Pt=(e,o)=>{const t=document.getElementsByTagName(e)[0];if(!t)return;const n=t.getAttribute(_e),a=n?n.split(","):[],i=[...a],s=Object.keys(o);for(const c of s){const d=o[c]||"";t.getAttribute(c)!==d&&t.setAttribute(c,d),a.indexOf(c)===-1&&a.push(c);const u=i.indexOf(c);u!==-1&&i.splice(u,1)}for(let c=i.length-1;c>=0;c-=1)t.removeAttribute(i[c]);a.length===i.length?t.removeAttribute(_e):t.getAttribute(_e)!==s.join(",")&&t.setAttribute(_e,s.join(","))},Q1=(e,o)=>{typeof e<"u"&&document.title!==e&&(document.title=js(e)),Pt("title",o)},xa=(e,o)=>{const{baseTag:t,bodyAttributes:n,htmlAttributes:a,linkTags:i,metaTags:s,noscriptTags:c,onChangeClientState:d,scriptTags:u,styleTags:m,title:g,titleAttributes:h}=e;Pt("body",n),Pt("html",a),Q1(g,h);const f={baseTag:Fo("base",t),linkTags:Fo("link",i),metaTags:Fo("meta",s),noscriptTags:Fo("noscript",c),scriptTags:Fo("script",u),styleTags:Fo("style",m)},y={},k={};Object.keys(f).forEach(b=>{const{newTags:C,oldTags:S}=f[b];C.length&&(y[b]=C),S.length&&(k[b]=f[b].oldTags)}),o&&o(),d(e,y,k)},er=null,Z1=e=>{er&&cancelAnimationFrame(er),e.defer?er=requestAnimationFrame(()=>{xa(e,()=>{er=null})}):(xa(e),er=null)},ek=Z1,ba=class extends p.Component{constructor(){super(...arguments);Ue(this,"rendered",!1)}shouldComponentUpdate(o){return!V1(o,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:o}=this.props.context;o.remove(this),this.emitChange()}emitChange(){const{helmetInstances:o,setHelmet:t}=this.props.context;let n=null;const a=_1(o.get().map(i=>{const{context:s,...c}=i.props;return c}));J1.canUseDOM?ek(a):Mt&&(n=Mt(a)),t(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:o}=this.props.context;o.add(this),this.emitChange()}render(){return this.init(),null}},Fr=[],ka=e=>{const o={};for(const t of Object.keys(e))o[Ss[t]||t]=e[t];return o},so=e=>{const o={};for(const t of Object.keys(e)){const n=Zr[t];o[n||t]=e[t]}return o},Ca=(e,o)=>{if(!Rn)return;const t=document.getElementsByTagName(e)[0];if(!t)return;const n="data-rh-managed",a=t.getAttribute(n),i=a?a.split(","):[],s=Object.keys(o);for(const c of i)s.includes(c)||t.removeAttribute(c);for(const c of s){const d=o[c];d==null||d===!1?t.removeAttribute(c):d===!0?t.setAttribute(c,""):t.setAttribute(c,String(d))}s.length>0?t.setAttribute(n,s.join(",")):t.removeAttribute(n)},yt=()=>{const e={},o={};for(const t of Fr){const{htmlAttributes:n,bodyAttributes:a}=t.props;n&&Object.assign(e,ka(n)),a&&Object.assign(o,ka(a))}Ca("html",e),Ca("body",o)},ok=class extends p.Component{componentDidMount(){Fr.push(this),yt()}componentDidUpdate(){yt()}componentWillUnmount(){const e=Fr.indexOf(this);e!==-1&&Fr.splice(e,1),yt()}resolveTitle(){const{title:e,titleTemplate:o,defaultTitle:t}=this.props;return e&&o?o.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||t||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const o=this.props.titleAttributes||{};return p.createElement("title",so(o),e)}renderBase(){const{base:e}=this.props;return e?p.createElement("base",so(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>p.createElement("meta",{key:t,...so(o)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>p.createElement("link",{key:t,...so(o)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{innerHTML:n,...a}=o,i=so(a);return n&&(i.dangerouslySetInnerHTML={__html:n}),p.createElement("script",{key:t,...i})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{cssText:n,...a}=o,i=so(a);return n&&(i.dangerouslySetInnerHTML={__html:n}),p.createElement("style",{key:t,...i})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{innerHTML:n,...a}=o,i=so(a);return n&&(i.dangerouslySetInnerHTML={__html:n}),p.createElement("noscript",{key:t,...i})})}render(){return p.createElement(p.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},bt,rk=(bt=class extends p.Component{shouldComponentUpdate(e){return!M1(ya(this.props,"helmetData"),ya(e,"helmetData"))}mapNestedChildrenToProps(e,o){if(!o)return null;switch(e.type){case"script":case"noscript":return{innerHTML:o};case"style":return{cssText:o};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,o,t,n){return{...o,[e.type]:[...o[e.type]||[],{...t,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,o,t,n){switch(e.type){case"title":return{...o,[e.type]:n,titleAttributes:{...t}};case"body":return{...o,bodyAttributes:{...t}};case"html":return{...o,htmlAttributes:{...t}};default:return{...o,[e.type]:{...t}}}}mapArrayTypeChildrenToProps(e,o){let t={...o};return Object.keys(e).forEach(n=>{t={...t,[n]:e[n]}}),t}warnOnInvalidChildren(e,o){return ha(fa.some(t=>e.type===t),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${fa.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),ha(!o||typeof o=="string"||Array.isArray(o)&&!o.some(t=>typeof t!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,o){let t={};return p.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:a,...i}=n.props,s=Object.keys(i).reduce((d,u)=>(d[Ss[u]||u]=i[u],d),{});let{type:c}=n;switch(typeof c=="symbol"?c=c.toString():this.warnOnInvalidChildren(n,a),c){case"Symbol(react.fragment)":o=this.mapChildrenToProps(a,o);break;case"link":case"meta":case"noscript":case"script":case"style":t=this.flattenArrayTypeChildren(n,t,s,a);break;default:o=this.mapObjectTypeChildren(n,o,s,a);break}}),this.mapArrayTypeChildrenToProps(t,o)}render(){const{children:e,...o}=this.props;let t={...o},{helmetData:n}=o;if(e&&(t=this.mapChildrenToProps(e,t)),n&&!(n instanceof Wt)){const a=n;n=new Wt(a.context,!0),delete t.helmetData}return Ht?p.createElement(ok,{...t}):n?p.createElement(ba,{...t,context:n.value}):p.createElement(Ts.Consumer,null,a=>p.createElement(ba,{...t,context:a}))}},Ue(bt,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),bt);const tk={airbnb:{highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},apple:{highlightStyle:"solid",fontWeight:600,letterSpacing:"-0.03em"},coinbase:{highlightStyle:"solid",fontWeight:600,letterSpacing:"-0.02em"},figma:{highlightStyle:"underline",fontWeight:600,letterSpacing:"-0.01em",highlightFontWeight:700},linear:{highlightStyle:"gradient",fontWeight:600,letterSpacing:"-0.03em"},nike:{highlightStyle:"underline",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",highlightFontStyle:"italic",highlightFontWeight:900},notion:{highlightStyle:"underline",fontWeight:600,letterSpacing:"-0.01em",highlightFontStyle:"italic"},revolut:{highlightStyle:"gradient",fontWeight:700,letterSpacing:"-0.03em"},shopify:{highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},spacex:{highlightStyle:"glow",fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",highlightLetterSpacing:"0.06em"},spotify:{highlightStyle:"background",fontWeight:800,letterSpacing:"-0.03em"},stripe:{highlightStyle:"gradient",fontWeight:700,letterSpacing:"-0.03em"},tesla:{highlightStyle:"solid",fontWeight:500,letterSpacing:"-0.01em",textTransform:"uppercase"},uber:{highlightStyle:"underline",fontWeight:700,letterSpacing:"-0.02em"},vercel:{highlightStyle:"outline",fontWeight:700,letterSpacing:"-0.04em"}},nk={highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},ak=e=>tk[e.metadata.id]??nk,Is=(e,o)=>{const t=e.theme;return{canvas:je(t.canvas),surface:je(t.surface),text:je(t.text),muted:je(t.muted),border:je(t.border),primary:je(t.primary),secondary:je(t.secondary),success:je(t.success),warning:je(t.warning),error:je(t.error),onPrimary:je(t.onPrimary),appearance:o}},lk=e=>Is(e,"light"),ik=e=>Is(e,"dark"),me=({palette:e,label:o,config:t,children:n})=>r.jsxs(l.Vertical,{gap:10,flex:"1 1 320px",minWidth:0,children:[r.jsxs(l.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(l.View,{width:10,height:10,borderRadius:9999,backgroundColor:e.appearance==="dark"?"#111111":"#ffffff",borderWidth:1,borderStyle:"solid",borderColor:"rgba(0,0,0,0.15)"}),r.jsx(l.Text,{fontSize:11,fontWeight:"700",letterSpacing:"0.08em",textTransform:"uppercase",children:o})]}),r.jsx(_t,{config:t,mode:e.appearance,children:r.jsx(l.View,{padding:20,borderRadius:16,borderWidth:1,borderStyle:"solid",backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",children:n})})]}),je=e=>!e||typeof e!="string"?e:/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,Ye=(e,o)=>`color-mix(in srgb, ${je(e)} ${o}%, transparent)`,sk=e=>e&&e.startsWith("var(--")?e.slice(6,-1):e,ck={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"neutral"},dk=e=>e.personality||ck,Ke=(e,o="normal")=>{let n={light:300,regular:400,bold:700,black:800}[e.typeWeight];return o==="light"&&(n=Math.max(300,n-200)),o==="heavy"&&(n=Math.min(900,n+100)),n},gr=e=>{switch(e.density){case"tight":return{padding:16,gap:10,large:20};case"spacious":return{padding:28,gap:18,large:36};case"comfortable":default:return{padding:22,gap:14,large:28}}},uk=e=>e.typeCase==="uppercase"?"uppercase":"none",et=(e,o)=>{switch(e.surfaceTone){case"glass":return{backgroundColor:o.appearance==="dark"?"rgba(255,255,255,0.04)":"rgba(255,255,255,0.65)",backdropFilter:"blur(14px)"};case"mono":return{backgroundColor:o.appearance==="dark"?"#0a0a0a":je(o.surface)};case"matte":return{backgroundColor:o.appearance==="dark"?"#181818":"#f4f4f4"};case"paper":default:return{backgroundColor:je(o.surface)}}},Eo=(e,o)=>{const t=je(o.primary),n=je(o.secondary||o.primary);switch(e.accentTreatment){case"gradient":return`linear-gradient(135deg, ${t} 0%, ${n} 100%)`;case"glow":return t;case"stripe":return`repeating-linear-gradient(45deg, ${t} 0 8px, ${n} 8px 16px)`;case"halftone":return`radial-gradient(circle at 30% 30%, ${t} 0%, ${n} 70%)`;case"flat":default:return t}},Do=(e,o)=>{if(e.accentTreatment==="glow")return`0 0 24px ${Ye(o.primary,40)}, 0 0 4px ${je(o.primary)}`},to=e=>({letterSpacing:e.letterSpacing,textTransform:uk(e),fontStyle:e.typeStyle,fontWeight:Ke(e,"heavy")}),Ce=e=>({letterSpacing:e.typeCase==="uppercase"?"0.12em":"0.06em",textTransform:"uppercase",fontStyle:e.typeStyle,fontWeight:Ke(e,"normal")}),pk=(e,o)=>{var n,a,i;const t=(n=e.components)==null?void 0:n[o];return(i=(a=t==null?void 0:t.views)==null?void 0:a.container)==null?void 0:i.borderRadius},mk=e=>{const o=e.tokens.rawCssVars||{},t=e.theme.border,n=e.theme.surface,a=e.theme.primary,i=o["shadow-ring"]||"rgba(0,0,0,0.08) 0px 0px 0px 1px",s=o["shadow-ring-light"]||`${t} 0px 0px 0px 1px`,c=o["shadow-card"]||`rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, ${n} 0px 0px 0px 1px`,d=o["shadow-card-full"]||`rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, ${n} 0px 0px 0px 1px`;return[{name:"Level 0",label:"Flat",description:"No shadow",shadow:"none"},{name:"Level 1",label:"Ring",description:"Shadow-as-border",shadow:i},{name:"Level 1b",label:"Light Ring",description:"Lighter ring",shadow:s},{name:"Level 2",label:"Card",description:"Ring + subtle lift",shadow:c},{name:"Level 3",label:"Full Card",description:"Ring + lift + ambient + glow",shadow:d},{name:"Focus",label:"Accessibility ring",description:"Focus state — 2px ring",shadow:`0 0 0 2px ${a}`}]},or=(e,o)=>{const n={accordion:["accordion","card","alert"],tabs:["tabs","button"],panel:["card","alert"]}[o]??[o];for(const a of n){const i=pk(e,a);if(i!==void 0)return i}return"12px"},xt=({glyph:e,badge:o})=>r.jsxs(l.View,{position:"relative",display:"inline-flex",children:[r.jsx(l.View,{width:32,height:32,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center",style:{backgroundColor:"rgba(0,0,0,0.06)",fontSize:18,lineHeight:"20px"},children:e}),o?r.jsx(l.View,{position:"absolute",top:-10,right:-18,paddingHorizontal:6,paddingVertical:2,borderRadius:9999,style:{backgroundColor:"#ffffff",color:"#222222",fontSize:9,fontWeight:700,letterSpacing:"0.04em",boxShadow:"0 1px 3px rgba(0,0,0,0.18)"},children:o}):null]}),gk=[{title:"Homes",value:"homes",icon:r.jsx(xt,{glyph:"🏠"}),content:r.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"Tokens, inputs, and feedback components share the active config."})},{title:"Experiences",value:"experiences",icon:r.jsx(xt,{glyph:"🎈",badge:"NEW"}),content:r.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Services",value:"services",icon:r.jsx(xt,{glyph:"🛎️",badge:"NEW"}),content:r.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"Each tab carries an icon. Active tab uses the theme primary underline."})}],hk=[{title:"Token",field:"token"},{title:"Value",field:"value"},{title:"Role",field:"role"}],fk=[{id:"overview",label:"Overview",href:"#"},{id:"components",label:"Components",href:"#"},{id:"tokens",label:"Tokens",href:"#"}],yk=({color:e,name:o,role:t,border:n})=>r.jsxs(l.View,{borderWidth:1,borderStyle:"solid",borderRadius:8,overflow:"hidden",minWidth:0,borderColor:n,children:[r.jsx(l.View,{height:76,backgroundColor:e}),r.jsxs(l.Vertical,{gap:4,padding:12,children:[r.jsx(l.Text,{fontSize:13,lineHeight:"18px",fontWeight:"700",children:o}),r.jsx(l.Text,{fontSize:12,lineHeight:"16px",opacity:.7,children:e}),r.jsx(l.Text,{fontSize:12,lineHeight:"16px",opacity:.72,children:t})]})]}),ge=({title:e,children:o,config:t})=>r.jsxs(l.Vertical,{gap:18,padding:24,borderWidth:1,borderStyle:"solid",borderRadius:12,backgroundColor:t.theme.canvas,borderColor:t.theme.border,children:[r.jsx(l.Text,{fontSize:18,lineHeight:"24px",fontWeight:"700",color:t.theme.text,children:e}),o]}),xk=({config:e})=>{const o=ak(e),t=o.highlightStyle==="background"?e.theme.onPrimary:e.theme.primary;return r.jsx(l.View,{width:"100%",borderRadius:20,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,backgroundColor:e.theme.surface,children:r.jsxs(l.Horizontal,{width:"100%",flexWrap:"wrap",alignItems:"stretch",gap:0,children:[r.jsxs(l.Vertical,{flex:"1 1 360px",minWidth:0,padding:36,gap:20,justifyContent:"center",children:[r.jsx(we,{variant:"outline",content:`${e.metadata.label} hero`}),r.jsx(Mi,{size:"xl",responsive:!0,highlightText:"design system",highlightStyle:o.highlightStyle,highlightColor:e.theme.primary,highlightSecondaryColor:o.highlightStyle==="gradient"?e.theme.secondary:e.theme.onPrimary,views:{container:{color:e.theme.text},text:{color:e.theme.text,fontFamily:e.tokens.typography.fontFamily,fontWeight:o.fontWeight,style:{letterSpacing:o.letterSpacing,fontStyle:o.fontStyle??"normal",textTransform:o.textTransform??"none"}},highlight:{color:t,fontWeight:o.highlightFontWeight??o.fontWeight,style:{fontStyle:o.highlightFontStyle??o.fontStyle??"normal",letterSpacing:o.highlightLetterSpacing??o.letterSpacing,textTransform:o.textTransform??"none"}}},children:"Build a beautiful design system in minutes"},`${e.metadata.id}-${o.highlightStyle}`),r.jsxs(l.Text,{color:e.theme.muted,fontFamily:e.tokens.typography.fontFamily,style:{fontSize:16,lineHeight:"24px",maxWidth:520},children:["Each brand defines its own highlight treatment —"," ",r.jsx(l.Text,{as:"span",color:e.theme.primary,fontWeight:"700",children:o.highlightStyle})," ","with weight"," ",r.jsx(l.Text,{as:"span",fontWeight:"700",children:o.fontWeight}),o.highlightFontStyle==="italic"||o.fontStyle==="italic"?", italic":"",o.textTransform==="uppercase"?", uppercase":"","."]}),r.jsxs(l.Horizontal,{gap:12,flexWrap:"wrap",children:[r.jsx(ce,{color:"theme-primary",size:"md",children:"Get started"}),r.jsx(ce,{variant:"outline",color:"theme-primary",size:"md",children:"View docs"})]})]}),r.jsxs(l.View,{flex:"1 1 320px",minWidth:0,minHeight:260,position:"relative",overflow:"hidden",style:{backgroundImage:`linear-gradient(135deg, ${e.theme.primary}, ${e.theme.secondary||e.theme.primary})`},children:[r.jsx(l.View,{position:"absolute",top:"50%",left:"50%",width:180,height:180,borderRadius:9999,style:{transform:"translate(-50%, -50%)",backgroundColor:"rgba(255,255,255,0.18)",filter:"blur(40px)"}}),r.jsxs(l.Vertical,{width:"100%",height:"100%",minHeight:260,padding:32,justifyContent:"flex-end",alignItems:"flex-start",gap:12,children:[r.jsx(l.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:13,letterSpacing:"0.08em",textTransform:"uppercase"},children:e.metadata.label}),r.jsx(l.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:28,lineHeight:"32px",letterSpacing:"-0.02em"},children:e.theme.primary})]})]})]})})},bk=({config:e})=>{var t,n;const o=e.tokens.colors.slice(0,5).map(a=>({token:a.name,value:a.value,role:a.role}));return r.jsxs(l.Vertical,{gap:24,children:[r.jsx(ge,{title:"Color",config:e,children:r.jsx(l.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:12,children:e.tokens.colors.slice(0,12).map(a=>r.jsx(yk,{color:a.value,name:a.name,role:a.role,text:e.theme.text,border:e.theme.border},a.name))})}),r.jsx(ge,{title:"Typography",config:e,children:r.jsxs(l.Vertical,{gap:24,children:[r.jsxs(l.Vertical,{gap:4,children:[r.jsx(l.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:48,lineHeight:"1.0",fontWeight:"700",letterSpacing:"0.96px",textTransform:"uppercase",children:"Making Life Multiplanetary"}),r.jsx(l.Text,{fontSize:10,color:e.theme.muted,children:"Display — 48px / Bold / 1.00 / Uppercase"})]}),r.jsxs(l.Vertical,{gap:4,children:[r.jsx(l.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:16,lineHeight:"1.7",fontWeight:"400",children:"SpaceX designs, manufactures and launches advanced rockets and spacecraft. The company was founded to revolutionize space technology."}),r.jsx(l.Text,{fontSize:10,color:e.theme.muted,children:"Body — 16px / 400 / 1.70"})]}),r.jsxs(l.Vertical,{gap:4,children:[r.jsx(l.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:13,lineHeight:"0.94",fontWeight:"700",letterSpacing:"1.17px",textTransform:"uppercase",children:"Falcon 9 · Starship · Dragon"}),r.jsx(l.Text,{fontSize:10,color:e.theme.muted,children:"Nav Bold — 13px / 700 / 0.94 / Uppercase"})]}),r.jsxs(l.Vertical,{gap:4,children:[r.jsx(l.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:12,lineHeight:"1.0",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Mission Overview"}),r.jsx(l.Text,{fontSize:10,color:e.theme.muted,children:"Caption — 12px / 400 / 1.00 / Uppercase"})]}),r.jsxs(l.Vertical,{gap:4,children:[r.jsx(l.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:10,lineHeight:"0.94",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Launch Date: 2026-04-15"}),r.jsx(l.Text,{fontSize:10,color:e.theme.muted,children:"Micro — 10px / 400 / 0.94 / Uppercase"})]}),r.jsx(l.Horizontal,{gap:10,flexWrap:"wrap",marginTop:12,children:e.tokens.typography.fontSizes.map(a=>r.jsx(we,{variant:"outline",content:a},a))})]})}),r.jsx(ge,{title:"Spacing, Radius, Shadow",config:e,children:r.jsxs(l.Vertical,{gap:18,children:[r.jsx(l.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"flex-end",children:e.tokens.spacing.slice(0,10).map(a=>r.jsxs(l.Vertical,{gap:8,alignItems:"center",children:[r.jsx(l.View,{width:a,minWidth:4,height:24,borderRadius:2,backgroundColor:e.theme.primary}),r.jsx(l.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),r.jsx(l.Horizontal,{gap:12,flexWrap:"wrap",children:e.tokens.radii.slice(0,6).map(a=>r.jsxs(l.Vertical,{gap:8,alignItems:"center",children:[r.jsx(l.View,{width:64,height:64,borderRadius:a,borderWidth:1,borderStyle:"solid",backgroundColor:e.theme.surface,borderColor:e.theme.border}),r.jsx(l.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),r.jsx(l.View,{width:"100%",maxWidth:"100%",overflowX:"auto",style:{WebkitOverflowScrolling:"touch",color:e.theme.text},children:r.jsx(Ve,{views:(n=(t=e.components)==null?void 0:t.table)==null?void 0:n.views,children:r.jsx(Ve.Template,{caption:"First extracted color tokens",columns:hk,data:o})})})]})})]})},Sa=({palette:e})=>r.jsxs(ke,{width:"min(100%, 420px)",views:{container:{backgroundColor:e.surface,color:e.text,borderWidth:1,borderStyle:"solid",borderColor:e.border},header:{color:e.text,borderColor:e.border},content:{color:e.text},footer:{borderColor:e.border}},children:[r.jsx(ke.Header,{children:r.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsxs(l.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(l.Text,{fontSize:24,fontWeight:"800",color:e.text,children:"$182"}),r.jsx(l.Text,{fontSize:14,color:e.muted,children:"night"})]}),r.jsx(we,{variant:"filled",content:"Best value"})]})}),r.jsx(ke.Content,{children:r.jsxs(l.Vertical,{gap:12,children:[r.jsxs(l.Horizontal,{gap:0,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,overflow:"hidden",children:[r.jsxs(l.Vertical,{flex:1,padding:10,gap:2,borderRightWidth:1,borderRightStyle:"solid",borderColor:e.border,children:[r.jsx(l.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECK-IN"}),r.jsx(l.Text,{fontSize:14,color:e.text,children:"Mar 12, 2026"})]}),r.jsxs(l.Vertical,{flex:1,padding:10,gap:2,children:[r.jsx(l.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECKOUT"}),r.jsx(l.Text,{fontSize:14,color:e.text,children:"Mar 18, 2026"})]})]}),r.jsxs(l.Vertical,{padding:10,gap:2,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,children:[r.jsx(l.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"GUESTS"}),r.jsx(l.Text,{fontSize:14,color:e.text,children:"2 adults"})]}),r.jsx(ce,{isFilled:!0,size:"lg",children:"Reserve"}),r.jsx($r,{}),r.jsxs(l.Vertical,{gap:6,children:[r.jsxs(l.Horizontal,{justifyContent:"space-between",children:[r.jsx(l.Text,{fontSize:14,color:e.text,children:"$182 × 6 nights"}),r.jsx(l.Text,{fontSize:14,color:e.text,children:"$1,092"})]}),r.jsxs(l.Horizontal,{justifyContent:"space-between",children:[r.jsx(l.Text,{fontSize:14,color:e.text,children:"Cleaning fee"}),r.jsx(l.Text,{fontSize:14,color:e.text,children:"$48"})]}),r.jsxs(l.Horizontal,{justifyContent:"space-between",children:[r.jsx(l.Text,{fontSize:14,color:e.text,children:"Service fee"}),r.jsx(l.Text,{fontSize:14,color:e.text,children:"$165"})]})]}),r.jsx($r,{}),r.jsxs(l.Horizontal,{justifyContent:"space-between",children:[r.jsx(l.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"Total before taxes"}),r.jsx(l.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"$1,305"})]})]})})]}),ja=[{name:"Starter",tagline:"For solo makers shipping their first project.",price:"$0",period:"/ month",features:["1 workspace","Up to 3 projects","Community support"],ctaLabel:"Get started"},{name:"Pro",tagline:"For growing teams that need more room to build.",price:"$24",period:"/ month",features:["Unlimited projects","Advanced analytics","Priority email support","Custom domains"],ctaLabel:"Start free trial",featured:!0},{name:"Enterprise",tagline:"For organizations with security and scale needs.",price:"Custom",period:"",features:["SSO & SCIM","Audit logs","Dedicated success manager","99.99% uptime SLA"],ctaLabel:"Contact sales"}],wa=({palette:e,tier:o,personality:t})=>{const n=gr(t),a=et(t,e),i=Eo(t,e),s=Do(t,e);return r.jsx(l.View,{width:"min(100%, 280px)",borderRadius:t.cardRadius,overflow:"hidden",borderWidth:o.featured?0:1,borderStyle:"solid",style:{...o.featured?{background:i,boxShadow:s}:a,borderColor:e.border,color:o.featured?e.onPrimary:e.text},children:r.jsxs(l.Vertical,{gap:n.gap,padding:n.padding,children:[r.jsxs(l.Vertical,{gap:6,children:[r.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[r.jsx(l.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:Ce(t),children:o.name}),o.featured?r.jsx(l.View,{paddingHorizontal:10,paddingVertical:4,borderRadius:t.badgeRadius,backgroundColor:Ye(e.onPrimary,22),children:r.jsxs(l.Horizontal,{gap:4,alignItems:"center",children:[r.jsx(l.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1},children:t.signatureMotif}),r.jsx(l.Text,{fontSize:10,color:e.onPrimary,style:Ce(t),children:t.voice.includes("mission")?"PRIORITY":"POPULAR"})]})}):null]}),r.jsx(l.Text,{fontSize:13,lineHeight:"18px",color:o.featured?Ye(e.onPrimary,85):e.muted,style:{fontStyle:t.typeStyle},children:o.tagline})]}),r.jsxs(l.Horizontal,{alignItems:"baseline",gap:4,children:[r.jsx(l.Text,{fontSize:n.large+8,color:o.featured?e.onPrimary:e.text,style:to(t),children:o.price}),o.period?r.jsx(l.Text,{fontSize:14,color:o.featured?Ye(e.onPrimary,85):e.muted,style:{fontStyle:t.typeStyle},children:o.period}):null]}),r.jsx(l.Vertical,{gap:8,children:o.features.map(c=>r.jsxs(l.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(l.View,{width:18,height:18,borderRadius:t.cornerStyle==="sharp"?2:9999,backgroundColor:o.featured?Ye(e.onPrimary,22):e.primary,alignItems:"center",justifyContent:"center",style:{display:"flex",flexShrink:0},children:r.jsx(l.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:Ke(t,"heavy")},children:t.cornerStyle==="sharp"?"+":"✓"})}),r.jsx(l.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:{textTransform:t.typeCase==="uppercase"?"uppercase":"none",letterSpacing:t.typeCase==="uppercase"?"0.04em":"normal",fontStyle:t.typeStyle},children:c})]},c))}),r.jsx(l.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:t.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:o.featured?e.onPrimary:e.text},children:r.jsx(l.Text,{fontSize:14,color:o.featured?e.primary:e.canvas,style:{...Ce(t),letterSpacing:t.typeCase==="uppercase"?"0.08em":"0.02em"},children:o.ctaLabel})})]})})},va=({palette:e,personality:o})=>{const t=gr(o),n=et(o,e),a=o.voice.includes("athletic")||o.voice.includes("motion")?"Aero Runner GT":o.voice.includes("mission")||o.voice.includes("futurist")?"Module-04 Insulated Jacket":"Linen Throw Pillow",i=o.voice.includes("athletic")||o.voice.includes("motion")?"Court Black · Mens":o.voice.includes("mission")||o.voice.includes("futurist")?"Carbon · Standard fit":"Stonewashed · Sand";return r.jsx(l.View,{width:"min(100%, 320px)",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:r.jsxs(l.Vertical,{gap:t.gap,padding:t.padding,children:[r.jsx(l.View,{height:120,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${Ye(e.primary,20)} 0%, ${Ye(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),r.jsxs(l.Vertical,{gap:4,children:[r.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[r.jsx(l.Text,{fontSize:15,color:e.text,style:to(o),children:a}),r.jsx(l.View,{paddingHorizontal:10,paddingVertical:3,borderRadius:o.badgeRadius,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"},children:r.jsx(l.Text,{fontSize:10,color:e.text,style:Ce(o),children:"IN STOCK"})})]}),r.jsx(l.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:i})]}),r.jsxs(l.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[r.jsxs(l.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(l.Text,{fontSize:24,color:e.text,style:to(o),children:"$42"}),r.jsx(l.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$56"})]}),r.jsx(l.Text,{fontSize:12,color:e.success||e.muted,style:Ce(o),children:"FREE SHIPPING"})]}),r.jsx(l.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:Eo(o,e),boxShadow:Do(o,e)},children:r.jsx(l.Text,{fontSize:14,color:e.onPrimary,style:{...Ce(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})})},Ta=({palette:e,personality:o})=>{const t=gr(o),n=et(o,e),a=o.signatureMotif,i=o.voice.includes("athletic")?"★":o.voice.includes("mission")||o.voice.includes("futurist")?"◉":"♥",s=o.voice.includes("athletic")?"Velocity AirFlow 7":o.voice.includes("mission")||o.voice.includes("futurist")?"Sentinel Pro Headset":o.voice.includes("refined")?"Pulse Studio Monitor":"Aurora Wireless Headphones",c=o.voice.includes("athletic")?"Lightweight knit · 280g":o.voice.includes("mission")||o.voice.includes("futurist")?"Mil-spec audio · 60h endurance":"Active noise cancelling · 40h battery",d=o.voice.includes("mission")?"MISSION PICK":o.voice.includes("athletic")?"TEAM PICK":o.voice.includes("futurist")?"SIGNATURE":"BEST SELLER";return r.jsxs(l.View,{position:"relative",width:"min(100%, 320px)",children:[r.jsx(l.View,{position:"absolute",top:-10,left:16,paddingHorizontal:12,paddingVertical:6,borderRadius:o.badgeRadius,zIndex:2,style:{background:Eo(o,e),boxShadow:Do(o,e)||(e.appearance==="dark"?"0 6px 14px rgba(0,0,0,0.5)":"0 6px 14px rgba(0,0,0,0.12)")},children:r.jsxs(l.Horizontal,{gap:6,alignItems:"center",children:[r.jsx(l.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:Ke(o,"heavy")},children:a}),r.jsx(l.Text,{fontSize:10,color:e.onPrimary,style:Ce(o),children:d})]})}),r.jsx(l.View,{position:"absolute",top:12,right:12,width:36,height:36,borderRadius:o.cornerStyle==="sharp"?4:9999,borderWidth:1,borderStyle:"solid",zIndex:2,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:e.appearance==="dark"?"rgba(0,0,0,0.45)":"rgba(255,255,255,0.92)",borderColor:e.border,backdropFilter:"blur(6px)"},children:r.jsx(l.Text,{fontSize:16,color:i==="♥"&&e.error||e.primary,style:{lineHeight:1},children:i})}),r.jsx(l.View,{width:"100%",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:r.jsxs(l.Vertical,{gap:t.gap,padding:t.padding,children:[r.jsx(l.View,{height:140,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${Ye(e.primary,20)} 0%, ${Ye(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),r.jsxs(l.Vertical,{gap:6,children:[r.jsxs(l.Horizontal,{gap:6,alignItems:"center",children:[r.jsx(l.Text,{fontSize:13,color:e.warning||e.primary,style:{lineHeight:1},children:"★★★★★"}),r.jsx(l.Text,{fontSize:12,color:e.muted,children:"4.9 · 1,284 reviews"})]}),r.jsx(l.Text,{fontSize:18,color:e.text,style:to(o),children:s}),r.jsx(l.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:c})]}),r.jsxs(l.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[r.jsxs(l.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(l.Text,{fontSize:26,color:e.text,style:to(o),children:"$189"}),r.jsx(l.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$249"})]}),r.jsx(l.View,{paddingHorizontal:8,paddingVertical:3,borderRadius:o.badgeRadius,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"},children:r.jsx(l.Text,{fontSize:10,color:e.text,style:Ce(o),children:"–24%"})})]}),r.jsxs(l.Horizontal,{gap:8,children:[r.jsx(l.View,{flex:1,paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:Eo(o,e),boxShadow:Do(o,e)},children:r.jsx(l.Text,{fontSize:13,color:e.onPrimary,style:{...Ce(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Buy now"})}),r.jsx(l.View,{paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",borderColor:e.border},children:r.jsx(l.Text,{fontSize:13,color:e.text,style:{...Ce(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})]})})]})},kk=[{slug:"PRIMARY-TINT",source:"primary",intensity:"tint",heading:"Bring everyone together with systems that scale",body:"Signature primary ground for systems, FAQ, and the contact form.",cta:"Get started"},{slug:"SECONDARY-TINT",source:"secondary",intensity:"tint",heading:"A faster, more efficient way of working",body:"Secondary ground for hero moments and supporting narrative.",cta:"Explore"},{slug:"WARNING-TINT",source:"warning",intensity:"tint",heading:"Designed for the way ideas actually move",body:"Warm tint for product storytelling and brand moments.",cta:"See the story"},{slug:"SUCCESS-TINT",source:"success",intensity:"tint",heading:"Ship with confidence, every single release",body:"Cool tint for changelogs, releases, and reliability notes.",cta:"Read changelog"},{slug:"ERROR-TINT",source:"error",intensity:"tint",heading:"Built for teams who care about the details",body:"Saturated tint for community stories and testimonials.",cta:"Meet the makers"},{slug:"INK-INVERTED",source:"ink",intensity:"inverted",heading:"Go deeper. Go further. Go all-in.",body:"Inverted ground for premium tiers and developer surfaces.",cta:"Open the docs"}],Vt=(e,o)=>{const t=e.replace("#","").padEnd(6,"0").slice(0,6),n=parseInt(t.slice(0,2),16),a=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16);return[n,a,i].some(Number.isNaN)?e:`rgba(${n}, ${a}, ${i}, ${o})`},At=e=>typeof e=="string"&&/^#([0-9a-f]{3}){1,2}$/i.test(e),Re=(e,o,t)=>At(e)?Vt(e,o):e.startsWith("rgba")||e.startsWith("rgb")?e.replace(/rgba?\(([^)]+)\)/,(n,a)=>`rgba(${a.split(",").slice(0,3).map(s=>s.trim()).join(", ")}, ${o})`):t==="dark"?`rgba(255,255,255,${o})`:`rgba(0,0,0,${o})`,Ck=({block:e,palette:o,personality:t})=>{const n=gr(t);let a,i;if(e.source==="ink")a=o.text,i=o.canvas;else{const m=o[e.source]||o.primary;e.intensity==="solid"?(a=m,i=o.onPrimary):(a=Re(m,.32,o.appearance),i=(o.appearance==="dark",o.text))}if(t.accentTreatment==="gradient"&&e.intensity==="tint"){const m=o[e.source],g=o.secondary;At(m)&&At(g)&&(a=`linear-gradient(135deg, ${Vt(m,.32)} 0%, ${Vt(g,.32)} 100%)`)}if(t.accentTreatment==="stripe"&&e.intensity==="tint"){const m=Re(o[e.source],.32,o.appearance),g=Re(o.secondary,.18,o.appearance);a=`repeating-linear-gradient(135deg, ${m} 0 18px, ${g} 18px 36px)`}const s=Re(i,.72,o.appearance),c=Re(i,.55,o.appearance),d=i,u=i===o.canvas?o.text:o.canvas;return r.jsx(l.View,{width:"min(100%, 460px)",borderRadius:t.cardRadius*2,padding:n.large,style:{background:a},children:r.jsxs(l.Vertical,{gap:n.gap+6,children:[r.jsxs(l.Text,{fontSize:11,color:c,style:{...Ce(t),letterSpacing:"0.12em",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:[t.signatureMotif," ",e.slug]}),r.jsxs(l.Vertical,{gap:14,children:[r.jsx(l.Text,{fontSize:32,lineHeight:"36px",color:i,style:to(t),children:e.heading}),r.jsx(l.Text,{fontSize:16,lineHeight:"22px",color:s,style:{fontStyle:t.typeStyle},children:e.body})]}),r.jsx(l.View,{alignSelf:"flex-start",paddingHorizontal:28,paddingVertical:14,borderRadius:t.pillRadius,style:{backgroundColor:d,cursor:"pointer"},children:r.jsx(l.Text,{fontSize:15,color:u,style:{...Ce(t),letterSpacing:t.typeCase==="uppercase"?"0.08em":"0.01em",textTransform:t.typeCase==="uppercase"?"uppercase":"none"},children:e.cta})})]})})},Ia=[{id:"design-tokens",badge:"NEW",badgeTone:"success",favorite:"♥",category:"Design systems",title:"Design tokens that survive a redesign",excerpt:"Why semantic naming beats raw values — and how to migrate a token set without breaking every consumer.",author:"Léa Martin",meta:"6 min read · Mar 10",imageTone:"warm"},{id:"shipping-faster",badge:"FEATURED",badgeTone:"primary",favorite:"★",category:"Engineering",title:"Shipping faster without skipping review",excerpt:"Three async patterns we use to keep PR cycle time under 24h while still catching the regressions that matter.",author:"Jordan Reyes",meta:"9 min read · Mar 04",imageTone:"cool"},{id:"a11y-audit",badge:"TRENDING",badgeTone:"warning",favorite:"⛉",category:"Accessibility",title:"The accessibility audit nobody asked for",excerpt:"A walkthrough of the 12 issues we found on our own marketing site — and the four-week fix plan that followed.",author:"Ines Okafor",meta:"12 min read · Feb 27",imageTone:"mono"}],Ra=({palette:e,article:o,personality:t})=>{const n=gr(t),a=et(t,e),i=e[o.badgeTone]||e.primary,s=e.secondary||e.primary,c=t.accentTreatment==="gradient"?`linear-gradient(135deg, ${Re(i,.55,e.appearance)} 0%, ${Re(s,.55,e.appearance)} 100%)`:t.accentTreatment==="stripe"?`repeating-linear-gradient(45deg, ${Re(i,.45,e.appearance)} 0 16px, ${Re(s,.25,e.appearance)} 16px 32px)`:t.accentTreatment==="halftone"?`radial-gradient(circle at 30% 30%, ${Re(i,.55,e.appearance)} 0%, ${Re(s,.35,e.appearance)} 70%)`:t.accentTreatment==="glow"?`radial-gradient(circle at 50% 60%, ${Re(i,.45,e.appearance)} 0%, ${e.appearance==="dark"?"#050505":"#0a0a0a"} 100%)`:Re(i,.32,e.appearance),d=t.voice.includes("mission")||t.voice.includes("futurist")?"◉":o.favorite,u=d==="♥"?e.error||e.primary:d==="★"&&e.warning||e.primary;return r.jsx(l.View,{width:"min(100%, 320px)",borderRadius:t.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...a,borderColor:e.border,color:e.text},children:r.jsxs(l.Vertical,{gap:n.gap,padding:n.padding,children:[r.jsxs(l.View,{position:"relative",height:160,borderRadius:t.cardRadius,overflow:"hidden",style:{background:c},children:[r.jsx(l.View,{position:"absolute",top:12,left:12,paddingHorizontal:10,paddingVertical:4,borderRadius:t.badgeRadius,style:{background:Eo(t,{...e,primary:i}),boxShadow:Do(t,e)},children:r.jsxs(l.Horizontal,{gap:4,alignItems:"center",children:[r.jsx(l.Text,{fontSize:10,color:e.onPrimary,style:{lineHeight:1,fontWeight:Ke(t,"heavy")},children:t.signatureMotif}),r.jsx(l.Text,{fontSize:10,color:e.onPrimary,style:Ce(t),children:o.badge})]})}),r.jsx(l.View,{position:"absolute",top:10,right:10,width:36,height:36,borderRadius:t.cornerStyle==="sharp"?4:9999,borderWidth:1,borderStyle:"solid",alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:e.appearance==="dark"?"rgba(0,0,0,0.45)":"rgba(255,255,255,0.92)",borderColor:e.border,backdropFilter:"blur(6px)"},children:r.jsx(l.Text,{fontSize:16,color:u,style:{lineHeight:1},children:d})})]}),r.jsxs(l.Vertical,{gap:8,children:[r.jsx(l.Text,{fontSize:11,color:e.muted,style:Ce(t),children:o.category}),r.jsx(l.Text,{fontSize:18,lineHeight:"24px",color:e.text,style:to(t),children:o.title}),r.jsx(l.Text,{fontSize:13,lineHeight:"18px",color:e.muted,style:{fontStyle:t.typeStyle},children:o.excerpt})]}),r.jsxs(l.Horizontal,{gap:10,alignItems:"center",children:[r.jsx(l.View,{width:28,height:28,borderRadius:t.cornerStyle==="sharp"?4:9999,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.08)"}}),r.jsxs(l.Vertical,{gap:0,children:[r.jsx(l.Text,{fontSize:12,color:e.text,style:{fontWeight:Ke(t,"normal"),fontStyle:t.typeStyle},children:o.author}),r.jsx(l.Text,{fontSize:11,color:e.muted,children:o.meta})]})]})]})})},Fa=({palette:e,personality:o,config:t})=>{var g,h,f,y;const n=o.signatureMotif,a=e.primary,i=Eo(o,e),s=Do(o,e),c=((h=(g=t.tokens)==null?void 0:g.typography)==null?void 0:h.fontFamily)||((y=(f=t.tokens)==null?void 0:f.rawCssVars)==null?void 0:y.display)||"inherit",d=o.voice.includes("mission")?"MAKING LIFE MULTIPLANETARY":o.voice.includes("athletic")?"JUST DO IT":o.voice.includes("refined")?"A new standard in payments":o.voice.includes("speed")?"Built for the makers":o.voice.includes("rhythmic")?"Music for everyone":o.voice.includes("thoughtful")?"The connected workspace":o.voice.includes("warm")?"Belong anywhere":o.voice.includes("minimal")?"Think different":o.voice.includes("commerce")?"The platform commerce is built on":o.voice.includes("bold-fintech")?"Money for the next generation":o.voice.includes("trustworthy")?"The future of money":o.voice.includes("playful")?"Nothing great is made alone":o.voice.includes("motion")?"Get there":o.voice.includes("deploy")?"Develop. Preview. Ship.":o.voice.includes("futurist")?"Accelerating the world to sustainable energy":`${t.metadata.label}`,u=o.typeCase==="uppercase"?"EXPLORE":"Get started",m=o.typeCase==="uppercase"?"LEARN MORE":"Learn more";return r.jsxs(l.View,{width:"100%",borderRadius:o.cardRadius*2,padding:o.density==="spacious"?56:o.density==="tight"?28:40,style:{backgroundColor:e.canvas,color:e.text,fontFamily:c,position:"relative",overflow:"hidden"},children:[o.accentTreatment==="glow"&&r.jsx(l.View,{position:"absolute",top:-120,right:-80,width:360,height:360,borderRadius:9999,style:{background:`radial-gradient(circle, ${a}40 0%, transparent 70%)`,pointerEvents:"none"}}),o.accentTreatment==="halftone"&&r.jsx(l.View,{position:"absolute",top:0,right:0,width:300,height:300,style:{background:`radial-gradient(circle at 70% 30%, ${a}30 0%, transparent 60%)`,pointerEvents:"none"}}),r.jsxs(l.Vertical,{gap:24,style:{position:"relative"},children:[r.jsxs(l.Horizontal,{gap:10,alignItems:"center",children:[r.jsx(l.View,{width:32,height:32,borderRadius:o.cornerStyle==="pill"?9999:o.cornerStyle==="sharp"?0:8,alignItems:"center",justifyContent:"center",style:{display:"flex",background:i,boxShadow:s},children:r.jsx(l.Text,{fontSize:16,color:e.onPrimary,style:{lineHeight:1,fontWeight:Ke(o,"heavy")},children:n})}),r.jsx(l.Text,{fontSize:13,color:e.muted,style:{...Ce(o),letterSpacing:o.typeCase==="uppercase"?"0.18em":"0.06em"},children:t.metadata.label})]}),r.jsx(l.Text,{fontSize:o.density==="spacious"?56:o.density==="tight"?40:48,lineHeight:o.density==="spacious"?"60px":o.density==="tight"?"44px":"52px",color:e.text,style:{...to(o),letterSpacing:o.typeCase==="uppercase"?"0.06em":o.letterSpacing,maxWidth:580,fontFamily:c},children:d}),r.jsxs(l.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(l.View,{paddingHorizontal:o.density==="spacious"?32:24,paddingVertical:o.density==="spacious"?16:14,borderRadius:o.pillRadius,style:{display:"flex",cursor:"pointer",background:i,boxShadow:s},children:r.jsx(l.Text,{fontSize:15,color:e.onPrimary,style:{...Ce(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:Ke(o,"heavy"),fontFamily:c},children:u})}),r.jsx(l.View,{paddingHorizontal:24,paddingVertical:14,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",style:{display:"flex",cursor:"pointer",borderColor:e.text},children:r.jsx(l.Text,{fontSize:15,color:e.text,style:{...Ce(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:Ke(o,"heavy"),fontFamily:c},children:m})})]}),r.jsx(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"center",marginTop:8,children:[{label:"Primary",value:e.primary},{label:"Surface",value:e.surface},{label:"Text",value:e.text},{label:"Success",value:e.success}].map(k=>r.jsxs(l.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(l.View,{width:20,height:20,borderRadius:o.cornerStyle==="sharp"?0:o.cornerStyle==="pill"?9999:4,borderWidth:1,borderStyle:"solid",style:{backgroundColor:k.value,borderColor:e.border}}),r.jsxs(l.Vertical,{gap:0,children:[r.jsx(l.Text,{fontSize:11,color:e.muted,style:Ce(o),children:k.label}),r.jsx(l.Text,{fontSize:11,color:e.text,style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:sk(k.value)})]})]},k.label))})]})]})},za=({palette:e,config:o})=>r.jsxs(l.Vertical,{gap:20,padding:36,alignItems:"center",borderRadius:16,style:{backgroundColor:e.surface},children:[r.jsx(we,{variant:"outline",content:"New release"}),r.jsxs(l.Vertical,{gap:8,alignItems:"center",children:[r.jsxs(l.Text,{fontSize:36,lineHeight:"40px",fontWeight:"800",textAlign:"center",color:e.text,children:[o.metadata.label," Pro"]}),r.jsx(l.Text,{fontSize:18,lineHeight:"24px",color:e.muted,textAlign:"center",children:"Pro. Beyond."})]}),r.jsxs(l.Horizontal,{gap:12,flexWrap:"wrap",justifyContent:"center",children:[r.jsx(ce,{shape:"pill",size:"md",children:"Learn more"}),r.jsx(ce,{shape:"pill",size:"md",variant:"outline",children:"Buy"})]}),r.jsx(l.View,{width:220,height:140,borderRadius:20,backgroundColor:e.appearance==="dark"?e.canvas:e.text,opacity:.85})]}),Ma=({palette:e,config:o})=>r.jsxs(ke,{width:"min(100%, 320px)",views:{container:{backgroundColor:e.surface,color:e.text,borderWidth:1,borderStyle:"solid",borderColor:e.border},header:{color:e.text,borderColor:e.border},content:{color:e.text},footer:{borderColor:e.border}},children:[r.jsx(ke.Header,{children:r.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsx(l.Text,{color:e.text,fontWeight:"700",children:o.metadata.id==="spacex"?"Falcon 9":"Product Card"}),r.jsx(we,{variant:"filled",content:"New"})]})}),r.jsx(ke.Content,{children:r.jsx(l.Text,{fontSize:14,lineHeight:"20px",color:e.text,children:o.metadata.id==="spacex"?"The world's first orbital-class reusable rocket. Designed for reliable and safe transport of people and payloads.":"Card surfaces, borders, typography, and shadows come from the active JSON config."})}),r.jsx(ke.Footer,{children:r.jsx(ce,{size:"sm",children:o.metadata.id==="spacex"?"Explore":"Review"})})]}),Wa=({palette:e})=>r.jsxs(l.Vertical,{gap:14,children:[r.jsxs(l.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(ce,{color:"theme-primary",children:"Primary"}),r.jsx(ce,{color:"theme-secondary",children:"Secondary"}),r.jsx(ce,{color:"color-black",children:"Black"}),r.jsx(ce,{color:"color-white",textColor:"color-black",children:"White"})]}),r.jsxs(l.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(ce,{variant:"outline",color:"theme-primary",children:"Primary"}),r.jsx(ce,{variant:"outline",color:"theme-secondary",children:"Secondary"}),r.jsx(ce,{variant:"outline",color:"color-black",children:"Black"}),r.jsx(ce,{variant:"outline",color:"color-white",children:"White"})]}),r.jsxs(l.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(ce,{variant:"ghost",views:{container:{color:e.text}},children:"Ghost"}),r.jsx(ce,{variant:"link",views:{container:{color:e.primary}},children:"Link"}),r.jsx(ce,{isDisabled:!0,children:"Disabled"}),r.jsx(ce,{isLoading:!0,children:"Loading"})]})]}),Ha=({palette:e,config:o})=>r.jsx(l.View,{style:{color:e.text},children:r.jsxs(l.Vertical,{gap:14,children:[r.jsxs(l.Horizontal,{gap:10,flexWrap:"wrap",alignItems:"center",children:[r.jsx(we,{content:"Badge"}),r.jsx(we,{variant:"outline",content:"Outline"}),r.jsx(we,{content:"Primary",views:{container:{backgroundColor:e.primary,color:e.onPrimary,borderColor:e.primary}}}),r.jsx(we,{content:"Success",views:{container:{backgroundColor:e.success,color:e.onPrimary,borderColor:e.success}}}),r.jsx(we,{content:"Warning",views:{container:{backgroundColor:e.warning,color:e.onPrimary,borderColor:e.warning}}}),r.jsx(we,{content:"Error",views:{container:{backgroundColor:e.error,color:e.onPrimary,borderColor:e.error}}})]}),r.jsxs(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(Tr,{status:"success",label:"Operational"}),r.jsx(Tr,{status:"warning",label:"Degraded"}),r.jsx(Tr,{status:"error",label:"Outage"}),r.jsx(ro,{size:"sm",loaderColor:o.theme.primary})]}),r.jsx(Jt,{title:"Heads up",description:"Brand styling cascades through every alert.",variant:"info",views:{container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},title:{color:e.text},description:{color:e.muted}}}),r.jsx(Xi,{value:64,height:10,showLabel:!0,color:e.primary,backgroundColor:e.border,views:{container:{backgroundColor:e.border},bar:{backgroundColor:e.primary}}})]})}),Pa=({palette:e,config:o,mode:t})=>{const n={container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},field:{color:e.text}};return r.jsx(l.View,{style:{color:e.text},children:r.jsxs(l.Vertical,{gap:16,children:[r.jsxs(l.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[r.jsx(Fe,{size:"md",label:"Name",placeholder:"Ada Lovelace",views:n}),r.jsx(nr,{id:`forms-${o.metadata.id}-${t}`,size:"md",label:"Plan",placeholder:"Select plan",options:[{label:"Starter",value:"starter"},{label:"Team",value:"team"},{label:"Enterprise",value:"enterprise"}],views:{container:n.container,field:{fontSize:14,lineHeight:"20px",color:e.text},text:{fontSize:14,lineHeight:"20px",color:e.text}}}),r.jsx(cn,{label:"Notes",placeholder:"Add implementation notes",views:n})]}),r.jsxs(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(un,{label:"Email updates",defaultIsSelected:!0}),r.jsx(ks,{label:"Standard",value:"standard",defaultIsSelected:!0}),r.jsx(sn,{label:"Enabled",isChecked:!0})]})]})})},Sk=({config:e})=>{const[o,t]=p.useState(1),n=lk(e),a=ik(e),i=dk(e);return r.jsxs(l.Vertical,{gap:24,children:[r.jsx(ge,{title:"Brand Snapshot (Light & Dark)",config:e,children:r.jsxs(l.Vertical,{gap:20,children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Fa,{palette:n,personality:i,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Fa,{palette:a,personality:i,config:e})})]})}),r.jsx(ge,{title:"Buttons — Light & Dark",config:e,children:r.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Wa,{palette:n})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Wa,{palette:a})})]})}),r.jsx(ge,{title:"Status & Feedback — Light & Dark",config:e,children:r.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Ha,{palette:n,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Ha,{palette:a,config:e})})]})}),r.jsx(ge,{title:"Forms — Light & Dark",config:e,children:r.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Pa,{palette:n,config:e,mode:"light"})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Pa,{palette:a,config:e,mode:"dark"})})]})}),r.jsx(ge,{title:"Forms (legacy preview)",config:e,children:r.jsxs(l.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",alignItems:"start",gap:16,children:[r.jsx(Fe,{size:"md",label:"Name",placeholder:"Ada Lovelace"}),r.jsx(nr,{id:`design-system-select-${e.metadata.id}`,size:"md",label:"Plan",placeholder:"Select plan",options:[{label:"Starter",value:"starter"},{label:"Team",value:"team"},{label:"Enterprise",value:"enterprise"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}}),r.jsx(cn,{label:"Notes",placeholder:"Add implementation notes"}),r.jsxs(l.Vertical,{gap:12,children:[r.jsx(un,{label:"Email updates",defaultIsSelected:!0}),r.jsx(ks,{label:"Standard",value:"standard",defaultIsSelected:!0}),r.jsx(sn,{label:"Enabled",isChecked:!0}),r.jsx(pi,{defaultValue:58,showValue:!0}),r.jsx(Ul,{length:6,label:"Verification Code"})]})]})}),r.jsx(ge,{title:"Form States",config:e,children:r.jsxs(l.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[r.jsx(Fe,{size:"md",label:"Default",placeholder:"Type here",helperText:"Resting state"}),r.jsx(Fe,{size:"md",label:"Filled",defaultValue:"Ada Lovelace",helperText:"Has value"}),r.jsx(Fe,{size:"md",label:"With helper",placeholder:"user@example.com",helperText:"We'll never share your email"}),r.jsx(Fe,{size:"md",label:"Error",defaultValue:"invalid@",error:"Please enter a valid email"}),r.jsx(Fe,{size:"md",label:"Disabled",isDisabled:!0,defaultValue:"Cannot edit",helperText:"Field locked"}),r.jsx(Fe,{size:"md",label:"Read only",defaultValue:"Read-only value",isReadOnly:!0,helperText:"View only"}),r.jsx(nr,{id:`design-system-select-error-${e.metadata.id}`,size:"md",label:"Select error",placeholder:"Pick one",error:!0,helperText:"Selection required",options:[{label:"Option A",value:"a"},{label:"Option B",value:"b"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}}),r.jsx(nr,{id:`design-system-select-disabled-${e.metadata.id}`,size:"md",label:"Select disabled",placeholder:"Disabled",isDisabled:!0,options:[{label:"Option A",value:"a"},{label:"Option B",value:"b"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}})]})}),r.jsx(ge,{title:"Elevation & Depth",config:e,children:r.jsx(l.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:20,children:mk(e).map(s=>r.jsxs(l.Vertical,{gap:12,children:[r.jsx(l.View,{height:120,borderRadius:12,backgroundColor:e.theme.canvas,style:{boxShadow:s.shadow}}),r.jsxs(l.Vertical,{gap:4,children:[r.jsxs(l.Horizontal,{gap:8,alignItems:"baseline",flexWrap:"wrap",children:[r.jsx(l.Text,{fontSize:12,fontWeight:"700",children:s.name}),r.jsx(l.Text,{fontSize:11,fontWeight:"600",color:e.theme.primary,children:s.label})]}),r.jsx(l.Text,{fontSize:11,color:e.theme.muted,children:s.description}),r.jsx(l.Text,{fontSize:10,color:e.theme.muted,style:{wordBreak:"break-word",opacity:.8},children:s.shadow})]})]},s.name))})}),r.jsx(ge,{title:"Color Blocks",config:e,children:r.jsx(l.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:12,children:[["primary","Primary",e.theme.onPrimary],["secondary","Secondary",e.theme.onPrimary],["success","Success","#ffffff"],["warning","Warning","#ffffff"],["error","Error","#ffffff"],["canvas","Canvas",e.theme.text],["surface","Surface",e.theme.text],["text","Text",e.theme.canvas],["muted","Muted",e.theme.canvas],["border","Border",e.theme.text],["onPrimary","On primary",e.theme.text]].map(([s,c,d])=>{const u=e.theme[s];return r.jsxs(l.Vertical,{gap:0,borderRadius:12,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,children:[r.jsx(l.View,{height:88,backgroundColor:u}),r.jsxs(l.Vertical,{gap:4,padding:12,backgroundColor:e.theme.surface,children:[r.jsx(l.Text,{fontSize:13,fontWeight:"700",children:c}),r.jsxs(l.Text,{fontSize:11,color:e.theme.muted,children:["theme.",s]}),r.jsx(l.Text,{fontSize:11,color:e.theme.muted,children:u})]})]},s)})})}),r.jsx(ge,{title:"Pricing — Booking (Light & Dark)",config:e,children:r.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Sa,{palette:n})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Sa,{palette:a})})]})}),r.jsx(ge,{title:"Pricing — SaaS Tiers (Light & Dark)",config:e,children:r.jsxs(l.Vertical,{gap:20,children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:ja.map(s=>r.jsx(wa,{palette:n,tier:s,personality:i},s.name))})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:ja.map(s=>r.jsx(wa,{palette:a,tier:s,personality:i},s.name))})})]})}),r.jsx(ge,{title:"Pricing — Product (Light & Dark)",config:e,children:r.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(va,{palette:n,personality:i})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(va,{palette:a,personality:i})})]})}),r.jsx(ge,{title:"Pricing — Featured w/ Badge & Favorite (Light & Dark)",config:e,children:r.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Ta,{palette:n,personality:i})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Ta,{palette:a,personality:i})})]})}),r.jsx(ge,{title:"Content — Color Block Cards",config:e,children:r.jsx(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:kk.map(s=>r.jsx(Ck,{block:s,palette:n,personality:i},s.slug))})}),r.jsx(ge,{title:"Content — Article Cards w/ Badge & Favorite (Light & Dark)",config:e,children:r.jsxs(l.Vertical,{gap:20,children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Ia.map(s=>r.jsx(Ra,{palette:n,article:s,personality:i},s.id))})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Ia.map(s=>r.jsx(Ra,{palette:a,article:s,personality:i},s.id))})})]})}),r.jsx(ge,{title:"CTA Card — Light & Dark",config:e,children:r.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(za,{palette:n,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(za,{palette:a,config:e})})]})}),r.jsx(ge,{title:"Product Card — Light & Dark",config:e,children:r.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Ma,{palette:n,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Ma,{palette:a,config:e})})]})}),r.jsx(ge,{title:"Content & Layout",config:e,children:r.jsxs(l.Vertical,{gap:24,children:[r.jsxs(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:[r.jsxs(ke,{width:"min(100%, 320px)",children:[r.jsx(ke.Header,{children:r.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsx(l.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Falcon 9":"Product Card"}),r.jsx(we,{variant:"filled",content:"New"})]})}),r.jsx(ke.Content,{children:r.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:e.metadata.id==="spacex"?"The world's first orbital-class reusable rocket. Designed for reliable and safe transport of people and payloads.":"Card surfaces, borders, typography, and shadows come from the active JSON config."})}),r.jsx(ke.Footer,{children:r.jsx(ce,{size:"sm",children:e.metadata.id==="spacex"?"Explore":"Review"})})]}),r.jsxs(ke,{width:"min(100%, 320px)",children:[r.jsx(ke.Header,{children:r.jsxs(l.Horizontal,{gap:12,alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",children:[r.jsxs(l.Horizontal,{gap:12,alignItems:"center",children:[r.jsx(el,{fallback:e.metadata.label.slice(0,2)}),r.jsxs(l.Vertical,{gap:2,children:[r.jsx(l.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Starship":e.metadata.label}),r.jsx(l.Text,{fontSize:12,color:e.theme.muted,children:e.metadata.id==="spacex"?"Multiplanetary mission":"Config-driven preview"})]})]}),r.jsx(we,{variant:"outline",content:"Active"})]})}),r.jsx(ke.Content,{children:e.metadata.id==="spacex"?r.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"The most powerful launch vehicle ever developed. Designed to carry crew and cargo to Mars and beyond."}):r.jsx(Jt,{variant:"info",title:"Config active",description:"This alert is rendered by the shared component."})})]})]}),r.jsx(xk,{config:e}),r.jsx(Ka,{ratio:16/9,borderRadius:12,overflow:"hidden",children:r.jsx(l.View,{width:"100%",height:"100%",backgroundColor:e.theme.primary,children:r.jsxs(l.Vertical,{height:"100%",alignItems:"center",justifyContent:"center",gap:8,children:[r.jsx(l.Text,{fontWeight:"700",color:e.theme.onPrimary,children:"16:9 Aspect Ratio"}),r.jsx(we,{content:"Config primary color"})]})})}),r.jsxs($e,{children:[r.jsx($e.Content,{children:[1,2,3].map(s=>r.jsx($e.Item,{children:r.jsx(l.View,{height:200,borderRadius:12,alignItems:"center",justifyContent:"center",backgroundColor:e.theme.surface,borderColor:e.theme.border,borderWidth:1,borderStyle:"solid",children:r.jsxs(l.Text,{fontSize:24,fontWeight:"700",children:["Slide ",s]})})},s))}),r.jsxs(l.Horizontal,{gap:12,marginTop:12,justifyContent:"center",children:[r.jsx($e.Previous,{}),r.jsx($e.Next,{})]})]})]})}),r.jsx(ge,{title:"Navigation & Interactive",config:e,children:r.jsxs(l.Vertical,{gap:18,children:[r.jsxs(l.Vertical,{gap:20,children:[r.jsxs(l.Vertical,{gap:8,children:[r.jsx(l.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"With icons"}),r.jsx(Ao,{tabs:gk,defaultValue:"homes",views:{tab:{borderRadius:or(e,"tabs")},activeTab:{borderRadius:or(e,"tabs")}}})]}),r.jsxs(l.Vertical,{gap:8,children:[r.jsx(l.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"Without icons"}),r.jsx(Ao,{defaultValue:"overview",views:{tab:{borderRadius:or(e,"tabs")},activeTab:{borderRadius:or(e,"tabs")}},tabs:[{title:"Overview",value:"overview",content:r.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"Tokens and components share the active config."})},{title:"Usage",value:"usage",content:r.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Audit",value:"audit",content:r.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"Plain text tabs without icons."})}]})]})]}),r.jsx(yo,{items:fk,orientation:"horizontal",defaultActiveItemId:"components"}),(()=>{const s=or(e,"accordion"),c={borderWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftWidth:0,borderRightWidth:0,marginBottom:0,borderRadius:0},d={...c,borderTopWidth:1,borderTopStyle:"solid",borderTopColor:e.theme.border};return r.jsxs(De,{defaultValue:"tokens",collapsible:!0,shape:"rounded",views:{container:{borderRadius:s,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border}},children:[r.jsxs(De.Item,{value:"tokens",...c,views:{item:c,trigger:{borderRadius:0}},children:[r.jsx(De.Trigger,{children:"Token extraction"}),r.jsx(De.Content,{children:r.jsxs(l.Text,{color:e.theme.muted,children:[Object.keys(e.tokens.rawCssVars).length," raw CSS variables were extracted from ",e.metadata.sourcePath,"."]})})]}),r.jsxs(De.Item,{value:"overrides",...d,views:{item:d,trigger:{borderRadius:0}},children:[r.jsx(De.Trigger,{children:"Override behavior"}),r.jsx(De.Content,{children:r.jsx(l.Text,{color:e.theme.muted,children:"Props passed directly to components override the design-system defaults."})})]})]})})(),r.jsx($r,{label:"advanced tools"}),r.jsxs(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(pn,{color:e.theme.primary,children:"Toggle Button"}),r.jsx(Wi,{color:e.theme.primary,items:[{id:"left",value:"Left"},{id:"center",value:"Center"},{id:"right",value:"Right"}]}),r.jsx(Qr,{content:"Tooltip message",children:r.jsx(ce,{variant:"outline",children:"Hover for Tooltip"})}),r.jsxs(ve,{children:[r.jsx(ve.Trigger,{children:r.jsx(ce,{variant:"ghost",children:"Hover Card"})}),r.jsx(ve.Content,{children:r.jsxs(l.Vertical,{gap:4,padding:12,children:[r.jsx(l.Text,{fontWeight:"700",children:"Detailed Info"}),r.jsx(l.Text,{fontSize:12,opacity:.8,children:"Hover cards provide more context."})]})})]}),r.jsx($i,{value:e.theme.primary}),r.jsx(Qi,{shareData:{url:"https://example.com",title:"Example"}}),r.jsx(en,{to:"#",children:"Inline Link component"})]}),r.jsx(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:r.jsx(Ki,{currentPage:o,totalPages:10,onPageChange:t})})]})})]})},jk=({config:e})=>{var o;return r.jsxs(_t,{config:e,children:[r.jsx(rk,{children:(o=e.metadata.googleFontLinks)==null?void 0:o.map(t=>r.jsx("link",{rel:"stylesheet",href:t},t))}),r.jsx(l.View,{minHeight:"100vh",padding:28,fontFamily:e.tokens.typography.fontFamily,backgroundColor:e.theme.canvas,color:e.theme.text,style:{textTransform:e.metadata.id==="spacex"?"uppercase":"none"},children:r.jsxs(l.Vertical,{gap:28,children:[r.jsxs(l.Vertical,{gap:12,maxWidth:900,children:[r.jsxs(l.Text,{as:"h1",fontSize:44,lineHeight:"48px",fontWeight:"800",fontFamily:e.tokens.typography.fontFamily,children:[e.metadata.label," Design System"]}),r.jsxs(l.Text,{fontSize:16,lineHeight:"24px",color:e.theme.muted,fontFamily:e.tokens.typography.fontFamily,children:["Live App Studio components rendered with the"," ",e.metadata.label," config defaults."]})]}),r.jsxs(l.Vertical,{gap:28,children:[r.jsx(bk,{config:e}),r.jsx(Sk,{config:e})]})]})})]})};exports.Accordion=De;exports.ActionSheet=ip;exports.Alert=Jt;exports.ArrowIcon=Ju;exports.AspectRatio=Ka;exports.AttachmentGroup=Pi;exports.AttachmentIcon=ar;exports.AttachmentPreview=Vf;exports.AudioIcon=Vo;exports.AudioInput=jp;exports.AudioWaveform=Qt;exports.Avatar=el;exports.BackIcon=Cu;exports.Background=xs;exports.Badge=we;exports.BatteryIcon=au;exports.BluetoothIcon=Gu;exports.BoldArrowIcon=Xu;exports.BookmarkIcon=lu;exports.Button=ce;exports.CHART_COLORS=Ee;exports.CalendarIcon=Eu;exports.CameraIcon=Uu;exports.Card=ke;exports.Carousel=$e;exports.Chart=Rm;exports.ChartIcon=xu;exports.ChatInput=hs;exports.ChatWidget=bs;exports.ChatWidgetComponent=Tn;exports.ChatWidgetWidget=w1;exports.CheckIcon=ku;exports.Checkbox=un;exports.ChevronIcon=de;exports.ClockIcon=Du;exports.CloseEyeIcon=Gt;exports.CloseIcon=ze;exports.CloudIcon=iu;exports.ColorInput=I0;exports.ColorPicker=$i;exports.ComboBox=eh;exports.Command=Oo;exports.ContextMenu=_o;exports.CookieConsent=Hm;exports.CopyIcon=su;exports.CountryPicker=P0;exports.CreditCardIcon=Hu;exports.CropIcon=ep;exports.DEFAULT_CHART_COLORS=ml;exports.DatePicker=Ng;exports.DeleteIcon=cu;exports.DesignSystem=jk;exports.DesignSystemProvider=_t;exports.Divider=Mx;exports.DocumentIcon=yu;exports.DownloadIcon=pu;exports.DragAndDrop=$y;exports.DragAndDropComponent=Hi;exports.DragHandleIcon=Nd;exports.DragHandleLinesIcon=rp;exports.Drawer=fo;exports.DropZone=Oy;exports.DropdownMenu=ur;exports.DustBinIcon=_r;exports.EditIcon=du;exports.EmojiPicker=lx;exports.ErrorIcon=Or;exports.ExternalLinkIcon=qa;exports.FacebookIcon=Qd;exports.FileIcon=po;exports.FileImage=_m;exports.FileSVG=Lm;exports.FilterIcon=Au;exports.FolderIcon=Od;exports.FormikChatInput=Vh;exports.FormikCheckbox=hh;exports.FormikColorInput=Eh;exports.FormikComboBox=of;exports.FormikCountryPicker=_h;exports.FormikDatePicker=$h;exports.FormikEmojiPicker=Pf;exports.FormikForm=ph;exports.FormikIconPicker=If;exports.FormikOTPInput=pf;exports.FormikPassword=Zh;exports.FormikRadio=Ch;exports.FormikSelect=Oh;exports.FormikSelector=hf;exports.FormikSlider=cf;exports.FormikSwitch=qh;exports.FormikTagInput=Gh;exports.FormikTextArea=Kh;exports.FormikTextField=Jh;exports.FormikToggle=bf;exports.FormikToggleGroup=Sf;exports.FormikUploader=ti;exports.GiftIcon=Tu;exports.Gradient=Li;exports.HeartIcon=ru;exports.HelpIcon=Bd;exports.HomeIcon=uu;exports.HoverCard=ve;exports.Icon=zr;exports.IconPicker=sx;exports.ImageIcon=Ud;exports.InfoIcon=Ze;exports.InstagramIcon=Xd;exports.KeyboardAvoidingView=hi;exports.LayoutIcon=Mu;exports.LikeIcon=qu;exports.Link=en;exports.LinkIcon=zu;exports.LinkedinIcon=Zd;exports.Loader=ro;exports.LoadingSpinnerIcon=Ut;exports.LockIcon=gu;exports.LogoutIcon=Ru;exports.MagicWandIcon=Ou;exports.MapPinIcon=$u;exports.MediaPreview=Ef;exports.MenuIcon=Lu;exports.Menubar=xo;exports.MessageLayout=fp;exports.MessageView=Qa;exports.MicrophoneIcon=Nt;exports.MinusIcon=_a;exports.Modal=ho;exports.ModalLayout=gn;exports.ModalRouter=gn;exports.MoonIcon=bu;exports.MoreIcon=Pu;exports.MousePointerIcon=Ga;exports.NavigationMenu=yo;exports.NotificationIcon=fu;exports.OTPInput=Ul;exports.OpenEyeIcon=Yt;exports.PageLayout=oy;exports.Pagination=Ki;exports.PanelIcon=Ua;exports.Password=Ug;exports.PauseIcon=ou;exports.PlayIcon=Ba;exports.PlusIcon=mu;exports.PowerOffIcon=Fu;exports.PrintIcon=Bu;exports.ProfileIcon=hu;exports.ProgressBar=Xi;exports.RefreshIcon=_u;exports.Resizable=wn;exports.RotateIcon=vu;exports.Router=cy;exports.SaveIcon=nu;exports.SearchIcon=Mr;exports.Select=nr;exports.Selector=g0;exports.SendIcon=qt;exports.Separator=$r;exports.SettingsIcon=Oa;exports.ShapeIcon=wu;exports.ShareButton=Qi;exports.ShareIcon=Na;exports.ShieldIcon=Iu;exports.Sidebar=pr;exports.Slider=pi;exports.SliderIcon=Zu;exports.SpinnerIcon=Qu;exports.SplashScreen=ny;exports.StarIcon=tu;exports.StatusIndicator=Tr;exports.StopIcon=Br;exports.SuccessIcon=Kt;exports.Switch=sn;exports.Table=Ve;exports.Tabs=Ao;exports.TagInput=th;exports.TextArea=cn;exports.TextField=Fe;exports.TextIcon=ju;exports.ThreadsIcon=eu;exports.TickIcon=lr;exports.Title=Mi;exports.Toast=gb;exports.Toggle=pn;exports.ToggleGroup=Wi;exports.Tooltip=Qr;exports.TrashIcon=Vu;exports.TwitchIcon=Kd;exports.TwitterIcon=Gd;exports.UnLikeIcon=Nu;exports.UnlockIcon=Yu;exports.UploadIcon=Xt;exports.Uploader=qr;exports.UserIcon=_d;exports.VideoIcon=qd;exports.WarningIcon=Ot;exports.WifiIcon=Ku;exports.XIcon=Yd;exports.YoutubeIcon=Jd;exports.ZapIcon=Wu;exports.ZoomInIcon=op;exports.ZoomOutIcon=Su;exports.deepMerge=Ne;exports.defaultDesignSystemConfig=Va;exports.designSystemConfigList=Wd;exports.designSystemConfigs=Dt;exports.getDesignSystemComponentProps=Lt;exports.goBack=ly;exports.hideDrawer=gi;exports.hideMessage=Ja;exports.hideModal=mn;exports.matchPath=fi;exports.mergeDesignSystemComponentProps=Ea;exports.navigate=ay;exports.normalizeDesignSystemComponentProps=$t;exports.setSplashLoaded=ry;exports.setSplashStarted=ty;exports.showDrawer=Qf;exports.showMessage=Xa;exports.showModal=Df;exports.showToast=bo;exports.useDesignSystem=Lr;exports.useDesignSystemComponentProps=Lo;exports.useDrawerStore=oo;exports.useHistory=yn;exports.useMergedDesignSystemComponentProps=he;exports.useMessageStore=Nr;exports.useModalStore=eo;exports.useRouterStore=Oe;exports.useSplashStore=Kr;exports.useToast=hb;
36
36
  //# sourceMappingURL=web.cjs.js.map