@infinilabs/chat-message 0.0.8 → 0.0.10

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.
@@ -1,5 +1,5 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-20{top:calc(var(--spacing)*20)}.top-21{top:calc(var(--spacing)*21)}.top-full{top:100%}.right-4{right:calc(var(--spacing)*4)}.right-5{right:calc(var(--spacing)*5)}.right-full{right:100%}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-20{bottom:calc(var(--spacing)*20)}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-2{left:calc(var(--spacing)*2)}.left-2\\.5{left:calc(var(--spacing)*2.5)}.left-full{left:100%}.z-50{z-index:50}.z-999{z-index:999}.z-1000{z-index:1000}.-mx-6{margin-inline:calc(var(--spacing)*-6)}.my-3{margin-block:calc(var(--spacing)*3)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-5{margin-top:calc(var(--spacing)*5)}.mr-2{margin-right:calc(var(--spacing)*2)}.-mb-0\\.5{margin-bottom:calc(var(--spacing)*-.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.ml-0\\.5{margin-left:calc(var(--spacing)*.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-1\\.5{margin-left:calc(var(--spacing)*1.5)}.ml-2{margin-left:calc(var(--spacing)*2)}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-10{height:calc(var(--spacing)*10)}.h-full{height:100%}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-10{width:calc(var(--spacing)*10)}.w-\\[75\\%\\]{width:75%}.w-fit{width:fit-content}.w-full{width:100%}.w-full\\!{width:100%!important}.max-w-\\[85\\%\\]{max-width:85%}.max-w-\\[520px\\]{max-width:520px}.max-w-\\[730px\\]{max-width:730px}.max-w-full{max-width:100%}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-32{min-width:calc(var(--spacing)*32)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-\\[\\#018AE5\\]{border-color:#018ae5}.border-\\[\\#E4E5EF\\]{border-color:#e4e5ef}.border-\\[\\#E6E6E6\\]{border-color:#e6e6e6}.border-\\[\\#EEF0F3\\]{border-color:#eef0f3}.border-\\[\\#e5e5e5\\]{border-color:#e5e5e5}.border-black\\/12{border-color:#0000001f}@supports (color:color-mix(in lab,red,red)){.border-black\\/12{border-color:color-mix(in oklab,var(--color-black)12%,transparent)}}.border-black\\/15{border-color:#00000026}@supports (color:color-mix(in lab,red,red)){.border-black\\/15{border-color:color-mix(in oklab,var(--color-black)15%,transparent)}}.border-blue-100{border-color:var(--color-blue-100)}.border-blue-500{border-color:var(--color-blue-500)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.bg-\\[\\#00C868\\]{background-color:#00c868}.bg-\\[\\#1a1a1a\\]{background-color:#1a1a1a}.bg-\\[\\#1784FC\\]{background-color:#1784fc}.bg-\\[\\#666666\\]{background-color:#666}.bg-\\[\\#E9F0FE\\]{background-color:#e9f0fe}.bg-\\[\\#F3F4F6\\]{background-color:#f3f4f6}.bg-\\[\\#F5F5F5\\]{background-color:#f5f5f5}.bg-\\[\\#F7F7F7\\]{background-color:#f7f7f7}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-50\\/30{background-color:#eff6ff4d}@supports (color:color-mix(in lab,red,red)){.bg-blue-50\\/30{background-color:color-mix(in oklab,var(--color-blue-50)30%,transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-white{background-color:var(--color-white)}.p-0{padding:calc(var(--spacing)*0)}.p-0\\!{padding:calc(var(--spacing)*0)!important}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-\\[2px\\]{padding:2px}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-8{padding-block:calc(var(--spacing)*8)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-3{padding-right:calc(var(--spacing)*3)}.pr-6{padding-right:calc(var(--spacing)*6)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-8{padding-bottom:calc(var(--spacing)*8)}.pl-0{padding-left:calc(var(--spacing)*0)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-6{padding-left:calc(var(--spacing)*6)}.pl-7{padding-left:calc(var(--spacing)*7)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-4{--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.wrap-break-word{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[\\#8b8b8b\\]{color:#8b8b8b}.text-\\[\\#018AE5\\]{color:#018ae5}.text-\\[\\#22C55E\\]{color:#22c55e}.text-\\[\\#38C200\\]{color:#38c200}.text-\\[\\#148EFF\\]{color:#148eff}.text-\\[\\#333\\]{color:#333}.text-\\[\\#999\\]{color:#999}.text-\\[\\#1784FC\\]{color:#1784fc}.text-\\[\\#1990FF\\]{color:#1990ff}.text-\\[\\#333333\\]{color:#333}.text-\\[\\#666666\\]{color:#666}.text-\\[\\#999999\\]{color:#999}.text-\\[\\#C8C8C8\\]{color:#c8c8c8}.text-black{color:var(--color-black)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-900{color:var(--color-gray-900)}.text-white{color:var(--color-white)}.italic{font-style:italic}.opacity-0{opacity:0}.shadow-\\[0_2px_20px_rgba\\(0\\,0\\,0\\,0\\.1\\)\\]{--tw-shadow:0 2px 20px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}@media (hover:hover){.group-hover\\:text-\\[\\#0072FF\\]:is(:where(.group):hover *){color:#0072ff}.group-hover\\:text-\\[\\#1784FC\\]:is(:where(.group):hover *){color:#1784fc}}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.last\\:pb-0:last-child{padding-bottom:calc(var(--spacing)*0)}@media (hover:hover){.hover\\:border-\\[\\#0072ff\\]\\!:hover{border-color:#0072ff!important}.hover\\:border-blue-200:hover{border-color:var(--color-blue-200)}.hover\\:bg-\\[\\#E0E9FD\\]:hover{background-color:#e0e9fd}.hover\\:bg-\\[\\#EDEDED\\]:hover{background-color:#ededed}.hover\\:bg-\\[\\#F7F7F7\\]:hover{background-color:#f7f7f7}.hover\\:bg-black\\/5:hover{background-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.hover\\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:text-\\[\\#0072ff\\]\\!:hover{color:#0072ff!important}.hover\\:text-\\[\\#ff4d4f\\]\\!:hover{color:#ff4d4f!important}.hover\\:text-blue-600:hover{color:var(--color-blue-600)}.hover\\:text-gray-600:hover{color:var(--color-gray-600)}.hover\\:opacity-80:hover{opacity:.8}}@media (min-width:48rem){.md\\:w-\\[610px\\]{width:610px}}.dark\\:border-\\[\\#1D3A6F\\]:where(.dark,.dark *){border-color:#1d3a6f}.dark\\:border-\\[\\#3A3A3A\\]:where(.dark,.dark *){border-color:#3a3a3a}.dark\\:border-\\[\\#4e4e56\\]:where(.dark,.dark *){border-color:#4e4e56}.dark\\:border-\\[\\#272626\\]:where(.dark,.dark *){border-color:#272626}.dark\\:border-black\\/15:where(.dark,.dark *){border-color:#00000026}@supports (color:color-mix(in lab,red,red)){.dark\\:border-black\\/15:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-black)15%,transparent)}}.dark\\:border-blue-900\\/30:where(.dark,.dark *){border-color:#1c398e4d}@supports (color:color-mix(in lab,red,red)){.dark\\:border-blue-900\\/30:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-blue-900)30%,transparent)}}.dark\\:border-gray-700:where(.dark,.dark *){border-color:var(--color-gray-700)}.dark\\:border-gray-800:where(.dark,.dark *){border-color:var(--color-gray-800)}.dark\\:border-white\\/15:where(.dark,.dark *){border-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.dark\\:border-white\\/15:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.dark\\:bg-\\[\\#1E1E1E\\]:where(.dark,.dark *){background-color:#1e1e1e}.dark\\:bg-\\[\\#1F2937\\]:where(.dark,.dark *){background-color:#1f2937}.dark\\:bg-\\[\\#2A2A2A\\]:where(.dark,.dark *){background-color:#2a2a2a}.dark\\:bg-\\[\\#020617\\]:where(.dark,.dark *){background-color:#020617}.dark\\:bg-\\[\\#020817\\]:where(.dark,.dark *){background-color:#020817}.dark\\:bg-\\[\\#111827\\]:where(.dark,.dark *){background-color:#111827}.dark\\:bg-\\[\\#202126\\]:where(.dark,.dark *){background-color:#202126}.dark\\:bg-\\[\\#202126\\]\\!:where(.dark,.dark *){background-color:#202126!important}.dark\\:bg-\\[\\#A3A3A3\\]:where(.dark,.dark *){background-color:#a3a3a3}.dark\\:bg-black:where(.dark,.dark *){background-color:var(--color-black)}.dark\\:bg-blue-900\\/10:where(.dark,.dark *){background-color:#1c398e1a}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-blue-900\\/10:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-900)10%,transparent)}}.dark\\:bg-blue-900\\/20:where(.dark,.dark *){background-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-blue-900\\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-900)20%,transparent)}}.dark\\:bg-blue-900\\/30:where(.dark,.dark *){background-color:#1c398e4d}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-blue-900\\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-900)30%,transparent)}}.dark\\:bg-gray-700:where(.dark,.dark *){background-color:var(--color-gray-700)}.dark\\:bg-gray-900:where(.dark,.dark *){background-color:var(--color-gray-900)}.dark\\:text-\\[\\#38C200\\]:where(.dark,.dark *){color:#38c200}.dark\\:text-\\[\\#666\\]:where(.dark,.dark *){color:#666}.dark\\:text-\\[\\#1990FF\\]:where(.dark,.dark *){color:#1990ff}.dark\\:text-\\[\\#808080\\]:where(.dark,.dark *){color:gray}.dark\\:text-\\[\\#999999\\]:where(.dark,.dark *){color:#999}.dark\\:text-\\[\\#A3A3A3\\]:where(.dark,.dark *){color:#a3a3a3}.dark\\:text-\\[\\#A6A6A6\\]:where(.dark,.dark *){color:#a6a6a6}.dark\\:text-\\[\\#D1D5DB\\]:where(.dark,.dark *){color:#d1d5db}.dark\\:text-\\[\\#D8D8D8\\]:where(.dark,.dark *){color:#d8d8d8}.dark\\:text-\\[\\#E5E7EB\\]:where(.dark,.dark *){color:#e5e7eb}.dark\\:text-\\[\\#a6a6a6\\]:where(.dark,.dark *){color:#a6a6a6}.dark\\:text-blue-400:where(.dark,.dark *){color:var(--color-blue-400)}.dark\\:text-gray-100:where(.dark,.dark *){color:var(--color-gray-100)}.dark\\:text-gray-300:where(.dark,.dark *){color:var(--color-gray-300)}.dark\\:text-gray-400:where(.dark,.dark *){color:var(--color-gray-400)}.dark\\:text-white:where(.dark,.dark *){color:var(--color-white)}.dark\\:shadow-\\[0_2px_20px_rgba\\(255\\,255\\,255\\,0\\.1\\)\\]:where(.dark,.dark *){--tw-shadow:0 2px 20px var(--tw-shadow-color,#ffffff1a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.dark\\:drop-shadow-\\[0_0_6px_rgb\\(255\\,255\\,255\\)\\]:where(.dark,.dark *){--tw-drop-shadow-size:drop-shadow(0 0 6px var(--tw-drop-shadow-color,#fff));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}@media (hover:hover){.dark\\:group-hover\\:text-\\[\\#0072FF\\]:where(.dark,.dark *):is(:where(.group):hover *){color:#0072ff}.dark\\:hover\\:border-blue-800:where(.dark,.dark *):hover{border-color:var(--color-blue-800)}.dark\\:hover\\:bg-\\[\\#1F2937\\]:where(.dark,.dark *):hover{background-color:#1f2937}.dark\\:hover\\:bg-\\[\\#2C2C2C\\]:where(.dark,.dark *):hover{background-color:#2c2c2c}.dark\\:hover\\:bg-\\[\\#3A3A3A\\]:where(.dark,.dark *):hover{background-color:#3a3a3a}.dark\\:hover\\:bg-\\[\\#111827\\]:where(.dark,.dark *):hover{background-color:#111827}.dark\\:hover\\:bg-blue-900\\/20:where(.dark,.dark *):hover{background-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-blue-900\\/20:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-blue-900)20%,transparent)}}.dark\\:hover\\:bg-blue-900\\/50:where(.dark,.dark *):hover{background-color:#1c398e80}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-blue-900\\/50:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-blue-900)50%,transparent)}}.dark\\:hover\\:bg-gray-800:where(.dark,.dark *):hover{background-color:var(--color-gray-800)}.dark\\:hover\\:bg-white\\/5:where(.dark,.dark *):hover{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-white\\/5:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.dark\\:hover\\:text-blue-400:where(.dark,.dark *):hover{color:var(--color-blue-400)}}.\\[\\&_\\.ant-btn-icon\\]\\:flex .ant-btn-icon{display:flex}}.cm-deep-research-segmented .ant-segmented-item-label{font-size:16px}.cm-deep-research-segmented .ant-segmented-group{background-color:#fff;padding:2px}.cm-deep-research-segmented .ant-segmented-item{background-color:#fff}.cm-deep-research-segmented .ant-segmented-item:not(:last-child){margin-right:2px}.cm-deep-research-segmented .ant-segmented-item-selected{background-color:#018ae517}.cm-deep-research-segmented .ant-segmented-item-selected .ant-segmented-item-label{color:#1784fc}.cm-deep-research-segmented .ant-segmented-item:not(.ant-segmented-item-selected) .ant-segmented-item-label{color:#333}.cm-deep-research-segmented .ant-segmented-item:not(.ant-segmented-item-selected):hover{background-color:#018ae517}.cm-deep-research-segmented .ant-segmented-item:not(.ant-segmented-item-selected):hover .ant-segmented-item-label{color:#1784fc}.cm-markdown h1,.cm-markdown h2,.cm-markdown h3,.cm-markdown h4,.cm-markdown h5,.cm-markdown h6,.cm-markdown p,.cm-markdown ul,.cm-markdown ol{all:revert}.cm-markdown h1{margin-bottom:16px;font-size:24px;font-weight:600;line-height:32px}.cm-markdown h2{margin-top:24px;margin-bottom:8px;font-size:18px;font-weight:600;line-height:26px}.cm-markdown ol{margin-left:24px;list-style:decimal}.cm-markdown p{margin:4px 0;line-height:1.7}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}')),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- var ChatMessage=(function(vs,g,le,pt,ea,Kt,V,ta,sa,Jn,na){"use strict";function ra(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const Yt=ra(g);var zt={exports:{}},mt={};/**
1
+ (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-20{top:calc(var(--spacing)*20)}.top-21{top:calc(var(--spacing)*21)}.top-full{top:100%}.right-4{right:calc(var(--spacing)*4)}.right-5{right:calc(var(--spacing)*5)}.right-full{right:100%}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-20{bottom:calc(var(--spacing)*20)}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-2{left:calc(var(--spacing)*2)}.left-full{left:100%}.z-50{z-index:50}.z-999{z-index:999}.z-1000{z-index:1000}.-mx-6{margin-inline:calc(var(--spacing)*-6)}.my-3{margin-block:calc(var(--spacing)*3)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-5{margin-top:calc(var(--spacing)*5)}.mr-2{margin-right:calc(var(--spacing)*2)}.-mb-0\\.5{margin-bottom:calc(var(--spacing)*-.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.ml-0\\.5{margin-left:calc(var(--spacing)*.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-1\\.5{margin-left:calc(var(--spacing)*1.5)}.ml-2{margin-left:calc(var(--spacing)*2)}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-10{height:calc(var(--spacing)*10)}.h-full{height:100%}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-10{width:calc(var(--spacing)*10)}.w-\\[75\\%\\]{width:75%}.w-fit{width:fit-content}.w-full{width:100%}.w-full\\!{width:100%!important}.max-w-\\[85\\%\\]{max-width:85%}.max-w-\\[520px\\]{max-width:520px}.max-w-\\[730px\\]{max-width:730px}.max-w-full{max-width:100%}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-32{min-width:calc(var(--spacing)*32)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-\\[\\#018AE5\\]{border-color:#018ae5}.border-\\[\\#018AE5\\]\\/20{border-color:#018ae533}.border-\\[\\#E4E5EF\\]{border-color:#e4e5ef}.border-\\[\\#E6E6E6\\]{border-color:#e6e6e6}.border-\\[\\#EEF0F3\\]{border-color:#eef0f3}.border-\\[\\#e5e5e5\\]{border-color:#e5e5e5}.border-black\\/12{border-color:#0000001f}@supports (color:color-mix(in lab,red,red)){.border-black\\/12{border-color:color-mix(in oklab,var(--color-black)12%,transparent)}}.border-black\\/15{border-color:#00000026}@supports (color:color-mix(in lab,red,red)){.border-black\\/15{border-color:color-mix(in oklab,var(--color-black)15%,transparent)}}.border-blue-100{border-color:var(--color-blue-100)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.bg-\\[\\#00C868\\]{background-color:#00c868}.bg-\\[\\#1a1a1a\\]{background-color:#1a1a1a}.bg-\\[\\#1784FC\\]{background-color:#1784fc}.bg-\\[\\#666666\\]{background-color:#666}.bg-\\[\\#E9F0FE\\]{background-color:#e9f0fe}.bg-\\[\\#F3F4F6\\]{background-color:#f3f4f6}.bg-\\[\\#F5F5F5\\]{background-color:#f5f5f5}.bg-\\[\\#F7F7F7\\]{background-color:#f7f7f7}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-50\\/30{background-color:#eff6ff4d}@supports (color:color-mix(in lab,red,red)){.bg-blue-50\\/30{background-color:color-mix(in oklab,var(--color-blue-50)30%,transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-white{background-color:var(--color-white)}.p-0{padding:calc(var(--spacing)*0)}.p-0\\!{padding:calc(var(--spacing)*0)!important}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-\\[2px\\]{padding:2px}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-8{padding-block:calc(var(--spacing)*8)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-3{padding-right:calc(var(--spacing)*3)}.pr-6{padding-right:calc(var(--spacing)*6)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-8{padding-bottom:calc(var(--spacing)*8)}.pl-0{padding-left:calc(var(--spacing)*0)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-6{padding-left:calc(var(--spacing)*6)}.pl-7{padding-left:calc(var(--spacing)*7)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-4{--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.wrap-break-word{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[\\#8b8b8b\\]{color:#8b8b8b}.text-\\[\\#018AE5\\]{color:#018ae5}.text-\\[\\#22C55E\\]{color:#22c55e}.text-\\[\\#38C200\\]{color:#38c200}.text-\\[\\#148EFF\\]{color:#148eff}.text-\\[\\#333\\]{color:#333}.text-\\[\\#999\\]{color:#999}.text-\\[\\#1784FC\\]{color:#1784fc}.text-\\[\\#1990FF\\]{color:#1990ff}.text-\\[\\#333333\\]{color:#333}.text-\\[\\#666666\\]{color:#666}.text-\\[\\#999999\\]{color:#999}.text-\\[\\#C8C8C8\\]{color:#c8c8c8}.text-black{color:var(--color-black)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-900{color:var(--color-gray-900)}.text-white{color:var(--color-white)}.italic{font-style:italic}.opacity-0{opacity:0}.opacity-50{opacity:.5}.shadow-\\[0_2px_20px_rgba\\(0\\,0\\,0\\,0\\.1\\)\\]{--tw-shadow:0 2px 20px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}@media (hover:hover){.group-hover\\:text-\\[\\#0072FF\\]:is(:where(.group):hover *){color:#0072ff}.group-hover\\:text-\\[\\#1784FC\\]:is(:where(.group):hover *){color:#1784fc}}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.last\\:pb-0:last-child{padding-bottom:calc(var(--spacing)*0)}@media (hover:hover){.hover\\:border-\\[\\#0072ff\\]\\!:hover{border-color:#0072ff!important}.hover\\:border-blue-200:hover{border-color:var(--color-blue-200)}.hover\\:bg-\\[\\#E0E9FD\\]:hover{background-color:#e0e9fd}.hover\\:bg-\\[\\#EDEDED\\]:hover{background-color:#ededed}.hover\\:bg-\\[\\#F7F7F7\\]:hover{background-color:#f7f7f7}.hover\\:bg-black\\/5:hover{background-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.hover\\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:text-\\[\\#0072ff\\]\\!:hover{color:#0072ff!important}.hover\\:text-\\[\\#ff4d4f\\]\\!:hover{color:#ff4d4f!important}.hover\\:text-blue-600:hover{color:var(--color-blue-600)}.hover\\:text-gray-600:hover{color:var(--color-gray-600)}}@media (min-width:48rem){.md\\:w-\\[610px\\]{width:610px}}.dark\\:border-\\[\\#1D3A6F\\]:where(.dark,.dark *){border-color:#1d3a6f}.dark\\:border-\\[\\#3A3A3A\\]:where(.dark,.dark *){border-color:#3a3a3a}.dark\\:border-\\[\\#4e4e56\\]:where(.dark,.dark *){border-color:#4e4e56}.dark\\:border-\\[\\#272626\\]:where(.dark,.dark *){border-color:#272626}.dark\\:border-black\\/15:where(.dark,.dark *){border-color:#00000026}@supports (color:color-mix(in lab,red,red)){.dark\\:border-black\\/15:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-black)15%,transparent)}}.dark\\:border-blue-900\\/30:where(.dark,.dark *){border-color:#1c398e4d}@supports (color:color-mix(in lab,red,red)){.dark\\:border-blue-900\\/30:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-blue-900)30%,transparent)}}.dark\\:border-gray-700:where(.dark,.dark *){border-color:var(--color-gray-700)}.dark\\:border-gray-800:where(.dark,.dark *){border-color:var(--color-gray-800)}.dark\\:border-white\\/15:where(.dark,.dark *){border-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.dark\\:border-white\\/15:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.dark\\:bg-\\[\\#1E1E1E\\]:where(.dark,.dark *){background-color:#1e1e1e}.dark\\:bg-\\[\\#1F2937\\]:where(.dark,.dark *){background-color:#1f2937}.dark\\:bg-\\[\\#2A2A2A\\]:where(.dark,.dark *){background-color:#2a2a2a}.dark\\:bg-\\[\\#020617\\]:where(.dark,.dark *){background-color:#020617}.dark\\:bg-\\[\\#020817\\]:where(.dark,.dark *){background-color:#020817}.dark\\:bg-\\[\\#111827\\]:where(.dark,.dark *){background-color:#111827}.dark\\:bg-\\[\\#202126\\]:where(.dark,.dark *){background-color:#202126}.dark\\:bg-\\[\\#202126\\]\\!:where(.dark,.dark *){background-color:#202126!important}.dark\\:bg-\\[\\#A3A3A3\\]:where(.dark,.dark *){background-color:#a3a3a3}.dark\\:bg-black:where(.dark,.dark *){background-color:var(--color-black)}.dark\\:bg-blue-900\\/10:where(.dark,.dark *){background-color:#1c398e1a}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-blue-900\\/10:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-900)10%,transparent)}}.dark\\:bg-blue-900\\/20:where(.dark,.dark *){background-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-blue-900\\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-900)20%,transparent)}}.dark\\:bg-blue-900\\/30:where(.dark,.dark *){background-color:#1c398e4d}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-blue-900\\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-900)30%,transparent)}}.dark\\:bg-gray-700:where(.dark,.dark *){background-color:var(--color-gray-700)}.dark\\:bg-gray-900:where(.dark,.dark *){background-color:var(--color-gray-900)}.dark\\:text-\\[\\#38C200\\]:where(.dark,.dark *){color:#38c200}.dark\\:text-\\[\\#666\\]:where(.dark,.dark *){color:#666}.dark\\:text-\\[\\#1990FF\\]:where(.dark,.dark *){color:#1990ff}.dark\\:text-\\[\\#808080\\]:where(.dark,.dark *){color:gray}.dark\\:text-\\[\\#999999\\]:where(.dark,.dark *){color:#999}.dark\\:text-\\[\\#A3A3A3\\]:where(.dark,.dark *){color:#a3a3a3}.dark\\:text-\\[\\#A6A6A6\\]:where(.dark,.dark *){color:#a6a6a6}.dark\\:text-\\[\\#D1D5DB\\]:where(.dark,.dark *){color:#d1d5db}.dark\\:text-\\[\\#D8D8D8\\]:where(.dark,.dark *){color:#d8d8d8}.dark\\:text-\\[\\#E5E7EB\\]:where(.dark,.dark *){color:#e5e7eb}.dark\\:text-\\[\\#a6a6a6\\]:where(.dark,.dark *){color:#a6a6a6}.dark\\:text-blue-400:where(.dark,.dark *){color:var(--color-blue-400)}.dark\\:text-gray-100:where(.dark,.dark *){color:var(--color-gray-100)}.dark\\:text-gray-300:where(.dark,.dark *){color:var(--color-gray-300)}.dark\\:text-gray-400:where(.dark,.dark *){color:var(--color-gray-400)}.dark\\:text-white:where(.dark,.dark *){color:var(--color-white)}.dark\\:shadow-\\[0_2px_20px_rgba\\(255\\,255\\,255\\,0\\.1\\)\\]:where(.dark,.dark *){--tw-shadow:0 2px 20px var(--tw-shadow-color,#ffffff1a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.dark\\:drop-shadow-\\[0_0_6px_rgb\\(255\\,255\\,255\\)\\]:where(.dark,.dark *){--tw-drop-shadow-size:drop-shadow(0 0 6px var(--tw-drop-shadow-color,#fff));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}@media (hover:hover){.dark\\:group-hover\\:text-\\[\\#0072FF\\]:where(.dark,.dark *):is(:where(.group):hover *){color:#0072ff}.dark\\:hover\\:border-blue-800:where(.dark,.dark *):hover{border-color:var(--color-blue-800)}.dark\\:hover\\:bg-\\[\\#1F2937\\]:where(.dark,.dark *):hover{background-color:#1f2937}.dark\\:hover\\:bg-\\[\\#2C2C2C\\]:where(.dark,.dark *):hover{background-color:#2c2c2c}.dark\\:hover\\:bg-\\[\\#3A3A3A\\]:where(.dark,.dark *):hover{background-color:#3a3a3a}.dark\\:hover\\:bg-\\[\\#111827\\]:where(.dark,.dark *):hover{background-color:#111827}.dark\\:hover\\:bg-blue-900\\/20:where(.dark,.dark *):hover{background-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-blue-900\\/20:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-blue-900)20%,transparent)}}.dark\\:hover\\:bg-blue-900\\/50:where(.dark,.dark *):hover{background-color:#1c398e80}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-blue-900\\/50:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-blue-900)50%,transparent)}}.dark\\:hover\\:bg-gray-800:where(.dark,.dark *):hover{background-color:var(--color-gray-800)}.dark\\:hover\\:bg-white\\/5:where(.dark,.dark *):hover{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-white\\/5:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.dark\\:hover\\:text-blue-400:where(.dark,.dark *):hover{color:var(--color-blue-400)}}.\\[\\&_\\.ant-btn-icon\\]\\:flex .ant-btn-icon{display:flex}}.cm-deep-research-segmented .ant-segmented-item-label{font-size:16px}.cm-deep-research-segmented .ant-segmented-group{background-color:#fff;padding:2px}.cm-deep-research-segmented .ant-segmented-item{background-color:#fff}.cm-deep-research-segmented .ant-segmented-item:not(:last-child){margin-right:2px}.cm-deep-research-segmented .ant-segmented-item-selected{background-color:#018ae517}.cm-deep-research-segmented .ant-segmented-item-selected .ant-segmented-item-label{color:#1784fc}.cm-deep-research-segmented .ant-segmented-item:not(.ant-segmented-item-selected) .ant-segmented-item-label{color:#333}.cm-deep-research-segmented .ant-segmented-item:not(.ant-segmented-item-selected):hover{background-color:#018ae517}.cm-deep-research-segmented .ant-segmented-item:not(.ant-segmented-item-selected):hover .ant-segmented-item-label{color:#1784fc}.cm-markdown h1,.cm-markdown h2,.cm-markdown h3,.cm-markdown h4,.cm-markdown h5,.cm-markdown h6,.cm-markdown p,.cm-markdown ul,.cm-markdown ol{all:revert}.cm-markdown h1{margin-bottom:16px;font-size:24px;font-weight:600;line-height:32px}.cm-markdown h2{margin-top:24px;margin-bottom:8px;font-size:18px;font-weight:600;line-height:26px}.cm-markdown ol{margin-left:24px;list-style:decimal}.cm-markdown p{margin:4px 0;line-height:1.7}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}')),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ var ChatMessage=(function(zt,g,ce,Le,Bo,wt,j,Oo,Io,yn,_o){"use strict";function Uo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const At=Uo(g);var Ct={exports:{}},$e={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.min.js
5
5
  *
@@ -7,7 +7,7 @@ var ChatMessage=(function(vs,g,le,pt,ea,Kt,V,ta,sa,Jn,na){"use strict";function
7
7
  *
8
8
  * This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
- */var Qn;function ia(){if(Qn)return mt;Qn=1;var e=g,t=Symbol.for("react.element"),s=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,r=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(a,c,d){var u,h={},p=null,m=null;d!==void 0&&(p=""+d),c.key!==void 0&&(p=""+c.key),c.ref!==void 0&&(m=c.ref);for(u in c)n.call(c,u)&&!o.hasOwnProperty(u)&&(h[u]=c[u]);if(a&&a.defaultProps)for(u in c=a.defaultProps,c)h[u]===void 0&&(h[u]=c[u]);return{$$typeof:t,type:a,key:p,ref:m,props:h,_owner:r.current}}return mt.Fragment=s,mt.jsx=i,mt.jsxs=i,mt}var gt={};/**
10
+ */var xn;function Wo(){if(xn)return $e;xn=1;var e=g,t=Symbol.for("react.element"),s=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,r=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(a,c,d){var u,h={},p=null,m=null;d!==void 0&&(p=""+d),c.key!==void 0&&(p=""+c.key),c.ref!==void 0&&(m=c.ref);for(u in c)n.call(c,u)&&!i.hasOwnProperty(u)&&(h[u]=c[u]);if(a&&a.defaultProps)for(u in c=a.defaultProps,c)h[u]===void 0&&(h[u]=c[u]);return{$$typeof:t,type:a,key:p,ref:m,props:h,_owner:r.current}}return $e.Fragment=s,$e.jsx=o,$e.jsxs=o,$e}var et={};/**
11
11
  * @license React
12
12
  * react-jsx-runtime.development.js
13
13
  *
@@ -15,27 +15,27 @@ var ChatMessage=(function(vs,g,le,pt,ea,Kt,V,ta,sa,Jn,na){"use strict";function
15
15
  *
16
16
  * This source code is licensed under the MIT license found in the
17
17
  * LICENSE file in the root directory of this source tree.
18
- */var Hn;function oa(){return Hn||(Hn=1,process.env.NODE_ENV!=="production"&&(function(){var e=g,t=Symbol.for("react.element"),s=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),b=Symbol.iterator,w="@@iterator";function C(f){if(f===null||typeof f!="object")return null;var A=b&&f[b]||f[w];return typeof A=="function"?A:null}var x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(f){{for(var A=arguments.length,T=new Array(A>1?A-1:0),M=1;M<A;M++)T[M-1]=arguments[M];y("error",f,T)}}function y(f,A,T){{var M=x.ReactDebugCurrentFrame,O=M.getStackAddendum();O!==""&&(A+="%s",T=T.concat([O]));var I=T.map(function(B){return String(B)});I.unshift("Warning: "+A),Function.prototype.apply.call(console[f],console,I)}}var E=!1,P=!1,D=!1,N=!1,j=!1,R;R=Symbol.for("react.module.reference");function Q(f){return!!(typeof f=="string"||typeof f=="function"||f===n||f===o||j||f===r||f===d||f===u||N||f===m||E||P||D||typeof f=="object"&&f!==null&&(f.$$typeof===p||f.$$typeof===h||f.$$typeof===i||f.$$typeof===a||f.$$typeof===c||f.$$typeof===R||f.getModuleId!==void 0))}function ne(f,A,T){var M=f.displayName;if(M)return M;var O=A.displayName||A.name||"";return O!==""?T+"("+O+")":T}function he(f){return f.displayName||"Context"}function ie(f){if(f==null)return null;if(typeof f.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case n:return"Fragment";case s:return"Portal";case o:return"Profiler";case r:return"StrictMode";case d:return"Suspense";case u:return"SuspenseList"}if(typeof f=="object")switch(f.$$typeof){case a:var A=f;return he(A)+".Consumer";case i:var T=f;return he(T._context)+".Provider";case c:return ne(f,f.render,"ForwardRef");case h:var M=f.displayName||null;return M!==null?M:ie(f.type)||"Memo";case p:{var O=f,I=O._payload,B=O._init;try{return ie(B(I))}catch{return null}}}return null}var fe=Object.assign,pe=0,Fe,q,K,oe,ee,Ue,rt;function Mt(){}Mt.__reactDisabledLog=!0;function it(){{if(pe===0){Fe=console.log,q=console.info,K=console.warn,oe=console.error,ee=console.group,Ue=console.groupCollapsed,rt=console.groupEnd;var f={configurable:!0,enumerable:!0,value:Mt,writable:!0};Object.defineProperties(console,{info:f,log:f,warn:f,error:f,group:f,groupCollapsed:f,groupEnd:f})}pe++}}function Dt(){{if(pe--,pe===0){var f={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:fe({},f,{value:Fe}),info:fe({},f,{value:q}),warn:fe({},f,{value:K}),error:fe({},f,{value:oe}),group:fe({},f,{value:ee}),groupCollapsed:fe({},f,{value:Ue}),groupEnd:fe({},f,{value:rt})})}pe<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ft=x.ReactCurrentDispatcher,Lt;function ot(f,A,T){{if(Lt===void 0)try{throw Error()}catch(O){var M=O.stack.trim().match(/\n( *(at )?)/);Lt=M&&M[1]||""}return`
19
- `+Lt+f}}var Bt=!1,at;{var In=typeof WeakMap=="function"?WeakMap:Map;at=new In}function lt(f,A){if(!f||Bt)return"";{var T=at.get(f);if(T!==void 0)return T}var M;Bt=!0;var O=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var I;I=Ft.current,Ft.current=null,it();try{if(A){var B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch(ae){M=ae}Reflect.construct(f,[],B)}else{try{B.call()}catch(ae){M=ae}f.call(B.prototype)}}else{try{throw Error()}catch(ae){M=ae}f()}}catch(ae){if(ae&&M&&typeof ae.stack=="string"){for(var L=ae.stack.split(`
20
- `),re=M.stack.split(`
21
- `),G=L.length-1,H=re.length-1;G>=1&&H>=0&&L[G]!==re[H];)H--;for(;G>=1&&H>=0;G--,H--)if(L[G]!==re[H]){if(G!==1||H!==1)do if(G--,H--,H<0||L[G]!==re[H]){var ge=`
22
- `+L[G].replace(" at new "," at ");return f.displayName&&ge.includes("<anonymous>")&&(ge=ge.replace("<anonymous>",f.displayName)),typeof f=="function"&&at.set(f,ge),ge}while(G>=1&&H>=0);break}}}finally{Bt=!1,Ft.current=I,Dt(),Error.prepareStackTrace=O}var ft=f?f.displayName||f.name:"",Ye=ft?ot(ft):"";return typeof f=="function"&&at.set(f,Ye),Ye}function Ce(f,A,T){return lt(f,!1)}function _n(f){var A=f.prototype;return!!(A&&A.isReactComponent)}function ve(f,A,T){if(f==null)return"";if(typeof f=="function")return lt(f,_n(f));if(typeof f=="string")return ot(f);switch(f){case d:return ot("Suspense");case u:return ot("SuspenseList")}if(typeof f=="object")switch(f.$$typeof){case c:return Ce(f.render);case h:return ve(f.type,A,T);case p:{var M=f,O=M._payload,I=M._init;try{return ve(I(O),A,T)}catch{}}}return""}var Le=Object.prototype.hasOwnProperty,ct={},hs=x.ReactDebugCurrentFrame;function ut(f){if(f){var A=f._owner,T=ve(f.type,f._source,A?A.type:null);hs.setExtraStackFrame(T)}else hs.setExtraStackFrame(null)}function Wn(f,A,T,M,O){{var I=Function.call.bind(Le);for(var B in f)if(I(f,B)){var L=void 0;try{if(typeof f[B]!="function"){var re=Error((M||"React class")+": "+T+" type `"+B+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof f[B]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw re.name="Invariant Violation",re}L=f[B](A,B,M,T,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(G){L=G}L&&!(L instanceof Error)&&(ut(O),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",M||"React class",T,B,typeof L),ut(null)),L instanceof Error&&!(L.message in ct)&&(ct[L.message]=!0,ut(O),v("Failed %s type: %s",T,L.message),ut(null))}}}var Un=Array.isArray;function Rt(f){return Un(f)}function qn(f){{var A=typeof Symbol=="function"&&Symbol.toStringTag,T=A&&f[Symbol.toStringTag]||f.constructor.name||"Object";return T}}function qe(f){try{return fs(f),!1}catch{return!0}}function fs(f){return""+f}function ps(f){if(qe(f))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",qn(f)),fs(f)}var ms=x.ReactCurrentOwner,Kn={key:!0,ref:!0,__self:!0,__source:!0},Ot,gs;function dt(f){if(Le.call(f,"ref")){var A=Object.getOwnPropertyDescriptor(f,"ref").get;if(A&&A.isReactWarning)return!1}return f.ref!==void 0}function ke(f){if(Le.call(f,"key")){var A=Object.getOwnPropertyDescriptor(f,"key").get;if(A&&A.isReactWarning)return!1}return f.key!==void 0}function It(f,A){typeof f.ref=="string"&&ms.current}function _t(f,A){{var T=function(){Ot||(Ot=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",A))};T.isReactWarning=!0,Object.defineProperty(f,"key",{get:T,configurable:!0})}}function Ke(f,A){{var T=function(){gs||(gs=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",A))};T.isReactWarning=!0,Object.defineProperty(f,"ref",{get:T,configurable:!0})}}var ht=function(f,A,T,M,O,I,B){var L={$$typeof:t,type:f,key:A,ref:T,props:B,_owner:I};return L._store={},Object.defineProperty(L._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(L,"_self",{configurable:!1,enumerable:!1,writable:!1,value:M}),Object.defineProperty(L,"_source",{configurable:!1,enumerable:!1,writable:!1,value:O}),Object.freeze&&(Object.freeze(L.props),Object.freeze(L)),L};function Yn(f,A,T,M,O){{var I,B={},L=null,re=null;T!==void 0&&(ps(T),L=""+T),ke(A)&&(ps(A.key),L=""+A.key),dt(A)&&(re=A.ref,It(A,O));for(I in A)Le.call(A,I)&&!Kn.hasOwnProperty(I)&&(B[I]=A[I]);if(f&&f.defaultProps){var G=f.defaultProps;for(I in G)B[I]===void 0&&(B[I]=G[I])}if(L||re){var H=typeof f=="function"?f.displayName||f.name||"Unknown":f;L&&_t(B,H),re&&Ke(B,H)}return ht(f,L,re,O,M,ms.current,B)}}var Wt=x.ReactCurrentOwner,je=x.ReactDebugCurrentFrame;function Te(f){if(f){var A=f._owner,T=ve(f.type,f._source,A?A.type:null);je.setExtraStackFrame(T)}else je.setExtraStackFrame(null)}var Ut;Ut=!1;function qt(f){return typeof f=="object"&&f!==null&&f.$$typeof===t}function ys(){{if(Wt.current){var f=ie(Wt.current.type);if(f)return`
18
+ */var vn;function qo(){return vn||(vn=1,process.env.NODE_ENV!=="production"&&(function(){var e=g,t=Symbol.for("react.element"),s=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),v=Symbol.iterator,A="@@iterator";function C(f){if(f===null||typeof f!="object")return null;var w=v&&f[v]||f[A];return typeof w=="function"?w:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(f){{for(var w=arguments.length,k=new Array(w>1?w-1:0),V=1;V<w;V++)k[V-1]=arguments[V];x("error",f,k)}}function x(f,w,k){{var V=y.ReactDebugCurrentFrame,I=V.getStackAddendum();I!==""&&(w+="%s",k=k.concat([I]));var U=k.map(function(L){return String(L)});U.unshift("Warning: "+w),Function.prototype.apply.call(console[f],console,U)}}var N=!1,P=!1,D=!1,E=!1,S=!1,F;F=Symbol.for("react.module.reference");function _(f){return!!(typeof f=="string"||typeof f=="function"||f===n||f===i||S||f===r||f===d||f===u||E||f===m||N||P||D||typeof f=="object"&&f!==null&&(f.$$typeof===p||f.$$typeof===h||f.$$typeof===o||f.$$typeof===a||f.$$typeof===c||f.$$typeof===F||f.getModuleId!==void 0))}function X(f,w,k){var V=f.displayName;if(V)return V;var I=w.displayName||w.name||"";return I!==""?k+"("+I+")":k}function Z(f){return f.displayName||"Context"}function ae(f){if(f==null)return null;if(typeof f.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case n:return"Fragment";case s:return"Portal";case i:return"Profiler";case r:return"StrictMode";case d:return"Suspense";case u:return"SuspenseList"}if(typeof f=="object")switch(f.$$typeof){case a:var w=f;return Z(w)+".Consumer";case o:var k=f;return Z(k._context)+".Provider";case c:return X(f,f.render,"ForwardRef");case h:var V=f.displayName||null;return V!==null?V:ae(f.type)||"Memo";case p:{var I=f,U=I._payload,L=I._init;try{return ae(L(U))}catch{return null}}}return null}var $=Object.assign,ue=0,ee,B,O,Y,J,ie,Qe;function qt(){}qt.__reactDisabledLog=!0;function Ee(){{if(ue===0){ee=console.log,B=console.info,O=console.warn,Y=console.error,J=console.group,ie=console.groupCollapsed,Qe=console.groupEnd;var f={configurable:!0,enumerable:!0,value:qt,writable:!0};Object.defineProperties(console,{info:f,log:f,warn:f,error:f,group:f,groupCollapsed:f,groupEnd:f})}ue++}}function gt(){{if(ue--,ue===0){var f={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},f,{value:ee}),info:$({},f,{value:B}),warn:$({},f,{value:O}),error:$({},f,{value:Y}),group:$({},f,{value:J}),groupCollapsed:$({},f,{value:ie}),groupEnd:$({},f,{value:Qe})})}ue<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var yt=y.ReactCurrentDispatcher,xt;function He(f,w,k){{if(xt===void 0)try{throw Error()}catch(I){var V=I.stack.trim().match(/\n( *(at )?)/);xt=V&&V[1]||""}return`
19
+ `+xt+f}}var vt=!1,Fe;{var M=typeof WeakMap=="function"?WeakMap:Map;Fe=new M}function Pe(f,w){if(!f||vt)return"";{var k=Fe.get(f);if(k!==void 0)return k}var V;vt=!0;var I=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var U;U=yt.current,yt.current=null,Ee();try{if(w){var L=function(){throw Error()};if(Object.defineProperty(L.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(L,[])}catch(le){V=le}Reflect.construct(f,[],L)}else{try{L.call()}catch(le){V=le}f.call(L.prototype)}}else{try{throw Error()}catch(le){V=le}f()}}catch(le){if(le&&V&&typeof le.stack=="string"){for(var R=le.stack.split(`
20
+ `),oe=V.stack.split(`
21
+ `),z=R.length-1,Q=oe.length-1;z>=1&&Q>=0&&R[z]!==oe[Q];)Q--;for(;z>=1&&Q>=0;z--,Q--)if(R[z]!==oe[Q]){if(z!==1||Q!==1)do if(z--,Q--,Q<0||R[z]!==oe[Q]){var pe=`
22
+ `+R[z].replace(" at new "," at ");return f.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",f.displayName)),typeof f=="function"&&Fe.set(f,pe),pe}while(z>=1&&Q>=0);break}}}finally{vt=!1,yt.current=U,gt(),Error.prepareStackTrace=I}var Ze=f?f.displayName||f.name:"",Re=Ze?He(Ze):"";return typeof f=="function"&&Fe.set(f,Re),Re}function Hd(f,w,k){return Pe(f,!1)}function Xd(f){var w=f.prototype;return!!(w&&w.isReactComponent)}function Kt(f,w,k){if(f==null)return"";if(typeof f=="function")return Pe(f,Xd(f));if(typeof f=="string")return He(f);switch(f){case d:return He("Suspense");case u:return He("SuspenseList")}if(typeof f=="object")switch(f.$$typeof){case c:return Hd(f.render);case h:return Kt(f.type,w,k);case p:{var V=f,I=V._payload,U=V._init;try{return Kt(U(I),w,k)}catch{}}}return""}var bt=Object.prototype.hasOwnProperty,Co={},ko=y.ReactDebugCurrentFrame;function Yt(f){if(f){var w=f._owner,k=Kt(f.type,f._source,w?w.type:null);ko.setExtraStackFrame(k)}else ko.setExtraStackFrame(null)}function Zd(f,w,k,V,I){{var U=Function.call.bind(bt);for(var L in f)if(U(f,L)){var R=void 0;try{if(typeof f[L]!="function"){var oe=Error((V||"React class")+": "+k+" type `"+L+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof f[L]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw oe.name="Invariant Violation",oe}R=f[L](w,L,V,k,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(z){R=z}R&&!(R instanceof Error)&&(Yt(I),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",V||"React class",k,L,typeof R),Yt(null)),R instanceof Error&&!(R.message in Co)&&(Co[R.message]=!0,Yt(I),b("Failed %s type: %s",k,R.message),Yt(null))}}}var $d=Array.isArray;function hn(f){return $d(f)}function eh(f){{var w=typeof Symbol=="function"&&Symbol.toStringTag,k=w&&f[Symbol.toStringTag]||f.constructor.name||"Object";return k}}function th(f){try{return To(f),!1}catch{return!0}}function To(f){return""+f}function So(f){if(th(f))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",eh(f)),To(f)}var Eo=y.ReactCurrentOwner,sh={key:!0,ref:!0,__self:!0,__source:!0},Po,jo;function nh(f){if(bt.call(f,"ref")){var w=Object.getOwnPropertyDescriptor(f,"ref").get;if(w&&w.isReactWarning)return!1}return f.ref!==void 0}function rh(f){if(bt.call(f,"key")){var w=Object.getOwnPropertyDescriptor(f,"key").get;if(w&&w.isReactWarning)return!1}return f.key!==void 0}function ih(f,w){typeof f.ref=="string"&&Eo.current}function oh(f,w){{var k=function(){Po||(Po=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",w))};k.isReactWarning=!0,Object.defineProperty(f,"key",{get:k,configurable:!0})}}function ah(f,w){{var k=function(){jo||(jo=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",w))};k.isReactWarning=!0,Object.defineProperty(f,"ref",{get:k,configurable:!0})}}var lh=function(f,w,k,V,I,U,L){var R={$$typeof:t,type:f,key:w,ref:k,props:L,_owner:U};return R._store={},Object.defineProperty(R._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(R,"_self",{configurable:!1,enumerable:!1,writable:!1,value:V}),Object.defineProperty(R,"_source",{configurable:!1,enumerable:!1,writable:!1,value:I}),Object.freeze&&(Object.freeze(R.props),Object.freeze(R)),R};function ch(f,w,k,V,I){{var U,L={},R=null,oe=null;k!==void 0&&(So(k),R=""+k),rh(w)&&(So(w.key),R=""+w.key),nh(w)&&(oe=w.ref,ih(w,I));for(U in w)bt.call(w,U)&&!sh.hasOwnProperty(U)&&(L[U]=w[U]);if(f&&f.defaultProps){var z=f.defaultProps;for(U in z)L[U]===void 0&&(L[U]=z[U])}if(R||oe){var Q=typeof f=="function"?f.displayName||f.name||"Unknown":f;R&&oh(L,Q),oe&&ah(L,Q)}return lh(f,R,oe,I,V,Eo.current,L)}}var fn=y.ReactCurrentOwner,No=y.ReactDebugCurrentFrame;function Xe(f){if(f){var w=f._owner,k=Kt(f.type,f._source,w?w.type:null);No.setExtraStackFrame(k)}else No.setExtraStackFrame(null)}var pn;pn=!1;function mn(f){return typeof f=="object"&&f!==null&&f.$$typeof===t}function Vo(){{if(fn.current){var f=ae(fn.current.type);if(f)return`
23
23
 
24
- Check the render method of \``+f+"`."}return""}}function zn(f){return""}var xs={};function k(f){{var A=ys();if(!A){var T=typeof f=="string"?f:f.displayName||f.name;T&&(A=`
24
+ Check the render method of \``+f+"`."}return""}}function uh(f){return""}var Mo={};function dh(f){{var w=Vo();if(!w){var k=typeof f=="string"?f:f.displayName||f.name;k&&(w=`
25
25
 
26
- Check the top-level render call using <`+T+">.")}return A}}function F(f,A){{if(!f._store||f._store.validated||f.key!=null)return;f._store.validated=!0;var T=k(A);if(xs[T])return;xs[T]=!0;var M="";f&&f._owner&&f._owner!==Wt.current&&(M=" It was passed a child from "+ie(f._owner.type)+"."),Te(f),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',T,M),Te(null)}}function z(f,A){{if(typeof f!="object")return;if(Rt(f))for(var T=0;T<f.length;T++){var M=f[T];qt(M)&&F(M,A)}else if(qt(f))f._store&&(f._store.validated=!0);else if(f){var O=C(f);if(typeof O=="function"&&O!==f.entries)for(var I=O.call(f),B;!(B=I.next()).done;)qt(B.value)&&F(B.value,A)}}}function Y(f){{var A=f.type;if(A==null||typeof A=="string")return;var T;if(typeof A=="function")T=A.propTypes;else if(typeof A=="object"&&(A.$$typeof===c||A.$$typeof===h))T=A.propTypes;else return;if(T){var M=ie(A);Wn(T,f.props,"prop",M,f)}else if(A.PropTypes!==void 0&&!Ut){Ut=!0;var O=ie(A);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",O||"Unknown")}typeof A.getDefaultProps=="function"&&!A.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function me(f){{for(var A=Object.keys(f.props),T=0;T<A.length;T++){var M=A[T];if(M!=="children"&&M!=="key"){Te(f),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",M),Te(null);break}}f.ref!==null&&(Te(f),v("Invalid attribute `ref` supplied to `React.Fragment`."),Te(null))}}var Be={};function $o(f,A,T,M,O,I){{var B=Q(f);if(!B){var L="";(f===void 0||typeof f=="object"&&f!==null&&Object.keys(f).length===0)&&(L+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var re=zn();re?L+=re:L+=ys();var G;f===null?G="null":Rt(f)?G="array":f!==void 0&&f.$$typeof===t?(G="<"+(ie(f.type)||"Unknown")+" />",L=" Did you accidentally export a JSX literal instead of a component?"):G=typeof f,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",G,L)}var H=Yn(f,A,T,O,I);if(H==null)return H;if(B){var ge=A.children;if(ge!==void 0)if(M)if(Rt(ge)){for(var ft=0;ft<ge.length;ft++)z(ge[ft],f);Object.freeze&&Object.freeze(ge)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else z(ge,f)}if(Le.call(A,"key")){var Ye=ie(f),ae=Object.keys(A).filter(function(yh){return yh!=="key"}),Gn=ae.length>0?"{key: someKey, "+ae.join(": ..., ")+": ...}":"{key: someKey}";if(!Be[Ye+Gn]){var gh=ae.length>0?"{"+ae.join(": ..., ")+": ...}":"{}";v(`A props object containing a "key" prop is being spread into JSX:
26
+ Check the top-level render call using <`+k+">.")}return w}}function Do(f,w){{if(!f._store||f._store.validated||f.key!=null)return;f._store.validated=!0;var k=dh(w);if(Mo[k])return;Mo[k]=!0;var V="";f&&f._owner&&f._owner!==fn.current&&(V=" It was passed a child from "+ae(f._owner.type)+"."),Xe(f),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',k,V),Xe(null)}}function Fo(f,w){{if(typeof f!="object")return;if(hn(f))for(var k=0;k<f.length;k++){var V=f[k];mn(V)&&Do(V,w)}else if(mn(f))f._store&&(f._store.validated=!0);else if(f){var I=C(f);if(typeof I=="function"&&I!==f.entries)for(var U=I.call(f),L;!(L=U.next()).done;)mn(L.value)&&Do(L.value,w)}}}function hh(f){{var w=f.type;if(w==null||typeof w=="string")return;var k;if(typeof w=="function")k=w.propTypes;else if(typeof w=="object"&&(w.$$typeof===c||w.$$typeof===h))k=w.propTypes;else return;if(k){var V=ae(w);Zd(k,f.props,"prop",V,f)}else if(w.PropTypes!==void 0&&!pn){pn=!0;var I=ae(w);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",I||"Unknown")}typeof w.getDefaultProps=="function"&&!w.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function fh(f){{for(var w=Object.keys(f.props),k=0;k<w.length;k++){var V=w[k];if(V!=="children"&&V!=="key"){Xe(f),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",V),Xe(null);break}}f.ref!==null&&(Xe(f),b("Invalid attribute `ref` supplied to `React.Fragment`."),Xe(null))}}var Ro={};function Lo(f,w,k,V,I,U){{var L=_(f);if(!L){var R="";(f===void 0||typeof f=="object"&&f!==null&&Object.keys(f).length===0)&&(R+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var oe=uh();oe?R+=oe:R+=Vo();var z;f===null?z="null":hn(f)?z="array":f!==void 0&&f.$$typeof===t?(z="<"+(ae(f.type)||"Unknown")+" />",R=" Did you accidentally export a JSX literal instead of a component?"):z=typeof f,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",z,R)}var Q=ch(f,w,k,I,U);if(Q==null)return Q;if(L){var pe=w.children;if(pe!==void 0)if(V)if(hn(pe)){for(var Ze=0;Ze<pe.length;Ze++)Fo(pe[Ze],f);Object.freeze&&Object.freeze(pe)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Fo(pe,f)}if(bt.call(w,"key")){var Re=ae(f),le=Object.keys(w).filter(function(vh){return vh!=="key"}),gn=le.length>0?"{key: someKey, "+le.join(": ..., ")+": ...}":"{key: someKey}";if(!Ro[Re+gn]){var xh=le.length>0?"{"+le.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
27
27
  let props = %s;
28
28
  <%s {...props} />
29
29
  React keys must be passed directly to JSX without using spread:
30
30
  let props = %s;
31
- <%s key={someKey} {...props} />`,Gn,Ye,gh,Ye),Be[Ye+Gn]=!0}}return f===n?me(H):Y(H),H}}function hh(f,A,T){return $o(f,A,T,!0)}function fh(f,A,T){return $o(f,A,T,!1)}var ph=fh,mh=hh;gt.Fragment=n,gt.jsx=ph,gt.jsxs=mh})()),gt}var Xn;function aa(){return Xn||(Xn=1,process.env.NODE_ENV==="production"?zt.exports=ia():zt.exports=oa()),zt.exports}var l=aa();const la={en:{translation:{assistant:{message:{logo:"Coco AI Logo",aiName:"Coco AI",thinkingButton:"View thinking process",steps:{query_intent:"Understand the query",tools:"Call LLM Tools",source_zero:"Searching for relevant documents",fetch_source:"Retrieve {{count}} documents",pick_source:"Intelligent pick {{count}} results",pick_source_start:"Intelligently pre-selecting",deep_read:"Deep reading",think:"AI is thinking...",thoughtTime:"Thought for a few seconds",keywords:"Keywords",questionType:"Query Type",userIntent:"User Intent",relatedQuestions:"Query",suggestion:"Suggestion",informationSeeking:"Information Seeking"}}},deepResearch:{status:{completedWithCount:"Deep research completed · Found {{count}} related results",completed:"Deep research completed",running:"Deep research in progress",preparing:"Preparing deep research"},button:{view:"View",download:"Download",share:"Share"},tab:{report:"Research Report",steps:"Research Steps",searchResults:"Search Results"},report:{generatingTitle:"Generating research report",generatingDescription:"Running a complete research workflow based on your question and compiling a structured report. It will appear here once ready.",defaultTitle:"Research Report"},steps:{intro:"I will collect and analyze information related to this topic, including its definition, use cases, market landscape and common questions. If it refers to a specific domain, I will further study its concrete applications and impact in that domain, and then report the results to you.",planTitle:"Plan research steps",planDescription:"I am planning a research workflow around this topic.",generatedPlans:"Generated plans",executeTitle:"Execute research plans",searching:"Searching",searchTitle:"Search sources",optimizePlan:"Optimize research plan",reportTitle:"Generate research report"}},sessionFiles:{labels:{all:"All"},modal:{title:"Files in the conversation",description:"Only the selected files will participate in the current conversation."}}}},zh:{translation:{assistant:{message:{logo:"Coco AI 图标",aiName:"Coco AI",thinkingButton:"查看思考过程",steps:{query_intent:"理解查询",tools:"调用大模型工具",source_zero:"正在搜索相关文档",fetch_source:"检索 {{count}} 份文档",pick_source:"智能预选 {{count}} 个结果",pick_source_start:"正在智能预选",deep_read:"深度阅读",think:"AI 正在思考...",thoughtTime:"思考了数秒",keywords:"关键词",questionType:"查询类型",userIntent:"用户意图",relatedQuestions:"查询",suggestion:"建议",informationSeeking:"信息查询"}}},deepResearch:{status:{completedWithCount:"深度研究完成 · 找到 {{count}} 条相关结果",completed:"深度研究完成",running:"正在执行深度研究",preparing:"正在准备深度研究"},button:{view:"查看",download:"下载",share:"分享"},tab:{report:"研究报告",steps:"研究步骤",searchResults:"搜索结果"},report:{generatingTitle:"研究报告生成中",generatingDescription:"我正在根据你的问题执行完整的研究流程,整理结构化的研究报告。研究完成后,报告会自动展示在这里。",defaultTitle:"研究报告"},steps:{intro:"将为你整理与该主题相关的信息,包括其定义、用途、市场情况以及常见问题。如果是指特定领域的主题,我还会进一步深入研究其在该领域的具体应用和影响。完成后我会向你汇报结果。",planTitle:"规划研究计划",planDescription:"我正在针对该主题,进行规划研究计划",generatedPlans:"生成的计划",executeTitle:"执行研究计划",searching:"正在搜索",searchTitle:"搜索资料",optimizePlan:"优化研究计划",reportTitle:"生成研究报告"}},sessionFiles:{labels:{all:"全部"},modal:{title:"会话中的文件",description:"只有选定的文件才会参与当前会话。"}}}}},Zn=ea.createInstance();Zn.use(le.initReactI18next).init({resources:la,lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1},react:{useSuspense:!1}});const ca="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='128px'%20height='128px'%20viewBox='0%200%20128%20128'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e画板备份%203%3c/title%3e%3cdefs%3e%3crect%20id='path-1'%20x='0'%20y='0'%20width='56.7563872'%20height='56.5910836'%3e%3c/rect%3e%3c/defs%3e%3cg%20id='画板备份-3'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='编组-10'%20transform='translate(-5,%203)'%3e%3cpath%20d='M49.6992377,22.7719612%20C58.1101609,25.9729736%2065.0982993,25.8953017%2070.6636528,22.5389454%20C76.9251416,26.1589087%2083.1644474,26.6306437%2089.3815702,23.9541503%20C94.3476152,26.8551486%20100.059595,27.9853608%20106.517509,27.3447869%20C105.549313,31.0257953%20104.78819,34.4219965%20104.234139,37.5333904%20C81.4253389,37.5754718%2069.9035445,37.5822249%2069.6687554,37.5536499%20C69.4339664,37.5250748%2062.9957895,35.2408431%2050.3542249,30.7009547%20L49.6992377,22.7719612%20Z'%20id='路径-3'%20stroke='%235B1602'%20stroke-width='7.69374265'%20fill='%23FFFFFF'%20stroke-linejoin='round'%20transform='translate(78.1084,%2030.055)%20rotate(8)%20translate(-78.1084,%20-30.055)'%3e%3c/path%3e%3cpolyline%20id='吸管'%20stroke='%2300DBFF'%20stroke-width='7.69374265'%20stroke-linecap='round'%20stroke-linejoin='round'%20transform='translate(94.5873,%2044.3095)%20rotate(8)%20translate(-94.5873,%20-44.3095)'%20points='69.7189682%2082.7157791%2094.9436643%2013.1617143%20119.455672%205.90320063'%3e%3c/polyline%3e%3cpath%20d='M28.5919021,37.2052044%20C35.1462633,34.1433307%2041.4986116,29.0645287%2047.648947,21.9687984%20C52.2899688,28.8461867%2058.8106823,31.3991807%2067.2110875,29.6277804%20C71.408497,35.0913641%2080.5237233,36.438679%2086.7804548,32.5606249%20C94.0739201,34.0827033%2099.969508,32.0763696%20104.467218,26.5416241%20C107.701536,33.3599985%20112.68013,39.7771777%20119.403001,45.7931616%20L122.450975,53.5823748%20L114.651272,66.2383977%20L48.9468343,66.658491%20L20.2297176,54.2394236%20L28.5919021,37.2052044%20Z'%20id='路径-2'%20stroke='%235B1602'%20stroke-width='7.69374265'%20fill='%23FFFFFF'%20stroke-linejoin='round'%20transform='translate(71.3403,%2044.3136)%20rotate(8)%20translate(-71.3403,%20-44.3136)'%3e%3c/path%3e%3cpath%20d='M113.7015,44.8147987%20C116.157193,49.6714382%20117.446928,55.630252%20117.446928,62.8127672%20C117.446928,77.2276123%20111.577947,90.2770579%20102.091381,99.7232825%20C92.5988687,109.175428%2079.4847008,115.020307%2065,115.020307%20C50.5152992,115.020307%2037.4011313,109.175428%2027.9086192,99.7232825%20C18.422053,90.2770579%2012.5530717,77.2276123%2012.5530717,62.8127672%20C12.5530717,56.4626483%2013.8289507,51.0821645%2016.1681126,46.5747014%20C17.316091,48.0863106%2018.6633413,49.4215856%2020.2147206,50.5328434%20C23.2818168,52.7298139%2027.1658894,54.0895553%2032.0119555,54.0895553%20C37.5035054,54.0895553%2042.5852688,52.6067922%2046.7606738,50.1072637%20C51.767509,52.6154402%2057.7465462,54.0895553%2064.1766873,54.0895553%20C70.5217766,54.0895553%2076.4277658,52.6542274%2081.3936205,50.2068646%20C85.4809466,52.6541473%2090.3819582,54.0895553%2095.6570631,54.0895553%20C101.044745,54.0895553%20105.465622,52.4873581%20108.935094,49.8692709%20C110.797344,48.4640036%20112.390496,46.7556533%20113.7015,44.8147987%20Z'%20id='形状结合'%20stroke='%235B1602'%20stroke-width='7.69374265'%20fill='%238C3201'%20transform='translate(65,%2077.9373)%20rotate(15)%20translate(-65,%20-77.9373)'%3e%3c/path%3e%3cg%20id='线'%20transform='translate(60.1411,%2097.2296)%20rotate(15)%20translate(-60.1411,%20-97.2296)translate(38.5104,%2076.2266)'%20fill='%235B1602'%3e%3cpath%20d='M41.2225105,-3.01584387%20C43.3464343,-2.96351324%2045.0257924,-1.19931046%2044.9734617,0.92461333%20C44.7662096,9.33627924%2043.0482281,16.8196882%2039.7969064,23.3391624%20C36.6036716,29.7421619%2032.6440639,35.1156647%2027.9160763,39.4350584%20C26.3475323,40.8680484%2023.9143082,40.7581602%2022.4813182,39.1896162%20C21.0483281,37.6210722%2021.1582163,35.1878481%2022.7267604,33.754858%20C26.7326835,30.0951278%2030.1283866,25.4868885%2032.9118625,19.9055277%20C35.6372515,14.4406416%2037.1015188,8.06239408%2037.2820533,0.73510735%20C37.3343839,-1.38881644%2039.0985867,-3.0681745%2041.2225105,-3.01584387%20Z'%20id='路径-5'%20fill-rule='nonzero'%20transform='translate(33.2246,%2018.7124)%20rotate(-7)%20translate(-33.2246,%20-18.7124)'%3e%3c/path%3e%3cpath%20d='M6.42487569,17.8933379%20C7.13185699,15.8898489%209.32912731,14.8388217%2011.3326163,15.545803%20C13.3361053,16.2527843%2014.3871325,18.4500547%2013.6801512,20.4535437%20C12.3896494,24.1106505%2011.1503014,26.9971555%209.93186972,29.1456361%20C8.855525,31.0435724%206.81922579,33.9549835%203.77060698,37.9798302%20C2.4878057,39.6734097%200.0749723254,40.0064113%20-1.61860721,38.72361%20C-3.31218674,37.4408088%20-3.64518832,35.0279754%20-2.36238705,33.3343959%20C0.49243929,29.5653978%202.37716504,26.8706998%203.23942508,25.3502625%20C4.20071135,23.6552106%205.27260735,21.1587099%206.42487569,17.8933379%20Z'%20id='路径-5备份'%20fill-rule='nonzero'%20transform='translate(5.3787,%2027.4149)%20scale(-1,%201)%20rotate(-5)%20translate(-5.3787,%20-27.4149)'%3e%3c/path%3e%3cpath%20d='M17.3200105,31.8134059%20C24.2042447,31.6746843%2030.788371,26.5487636%2037.0723895,16.4356439%20C43.356408,6.32252418%2040.2906703,13.3246347%2027.8751764,37.4419755%20L17.3200105,31.8134059%20Z'%20id='路径-8'%20transform='translate(28.78,%2024.6979)%20rotate(-15)%20translate(-28.78,%20-24.6979)'%3e%3c/path%3e%3cpath%20d='M2.25547257,26.2454347%20C5.78878997,32.5137001%2012.2314539,33.0051199%2021.5834643,27.7196939%20C18.6128112,31.1984141%2014.8144813,34.3358838%2010.1884745,37.1321031%20C6.83289255,33.8641134%204.51390502,31.3598101%203.23151188,29.6191934%20C1.94911874,27.8785768%201.6237723,26.7539905%202.25547257,26.2454347%20Z'%20id='路径-8'%20transform='translate(11.7631,%2031.6888)%20scale(-1,%201)%20rotate(-38)%20translate(-11.7631,%20-31.6888)'%3e%3c/path%3e%3c/g%3e%3cg%20id='花'%20transform='translate(16.0836,%200)'%3e%3cmask%20id='mask-2'%20fill='white'%3e%3cuse%20xlink:href='%23path-1'%3e%3c/use%3e%3c/mask%3e%3cg%20id='蒙版'%3e%3c/g%3e%3cimage%20mask='url(%23mask-2)'%20x='-24.9033127'%20y='-24.2533216'%20width='105.404719'%20height='105.097727'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALYAAAC2CAYAAAB08HcEAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAtqADAAQAAAABAAAAtgAAAAD4KVXeAAA4v0lEQVR4Ae2dC9RmV1nfz3lv38zkMjNMLtwCmQQESbnItVyXAUUBQYI0IlCQVAIVhIKFhatcYqutKFJqFypBRxQKCMvWYlkgFCIWIbWphbJYQC4TApS7SSCQzMz3fe/p7/ff53wzCUkkrFJz5t175rx7n72f/ey9n/3fz3n25ZyvaaqrEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEq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WA4kxJtKdLcAEcvqAaNGfMCU/uTZq/ZUf+SSfe/cZt66HMI/3d92j/iEHyALTzx12ys4wMEIuyPJ1lEdbsCKYL8K+hnv/8uM81T6ig3hJTCdTfwxL46uXdbcHNO/gm4MMFlO9IaiOoNT2N5wcePdyXFwKI941GwRZTQHNg0lzMUtvjdp7Rfk8bJL4kcc1nmidQzC9Sq4dQqCuRWZ+2DoJeUON9FkC/nYH1W8ec2n7pcAtqCNlUd2MS8AXYq05Yvopz2S9CWe+IsYu0XDv2xJ52sBM6Ab3JJrmTPNI2MGXOX581L9915/83H5i58rJuJ0r54YD3VOqwE3PDl9f3U/6nj93bfuzG6l7jMuirGG5OAtd8uTtpc7N5MV9VfRJq8q6APEtuaswB7MR9ibQ/YZL328edenh38eb41rTvrwSqxr4F8uWPeJ6KprwXIN7NStsOTOkv8Hnu/be5U/MpVjTQ49VVCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJfC8S+L8Vg5EuY3PbmAAAAABJRU5ErkJggg=='%3e%3c/image%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e";function Gt({size:e=18,children:t,className:s,title:n,onClick:r,action:o=!1,...i}){const a=c=>{r?.(c)};return l.jsx("i",{style:{width:e,height:e},title:n,onClick:a,className:pt("inline-flex items-center justify-center rounded-sm p-[2px] transition-all",{"cursor-pointer":o},s),children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:"100%",height:"100%"},...i,children:t})})}function ua(e){return l.jsx(Gt,{...e,viewBox:"0 0 16 16",children:l.jsx("g",{id:"Understand",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsxs("g",{id:"编组",transform:"translate(0.5, 0.5)",stroke:"currentColor",strokeWidth:"1.25",children:[l.jsx("path",{d:"M7.44444444,3 C9.89904333,3 11.8888889,4.95366655 11.8888889,7.36363636 C11.8888889,9.06711551 10.8946979,10.5426108 9.44492275,11.2613085 L9.44444444,12.2727273 C9.44444444,13.3772968 8.54901394,14.2727273 7.44444444,14.2727273 C6.33987494,14.2727273 5.44444444,13.3772968 5.44444444,12.2727273 L5.44396614,11.2613085 C3.99419095,10.5426108 3,9.06711551 3,7.36363636 C3,4.95366655 4.98984556,3 7.44444444,3 Z",id:"形状结合"}),l.jsx("line",{x1:"5.5",y1:"11.2156017",x2:"9.5",y2:"11.2156017",id:"路径-11"}),l.jsx("line",{x1:"7.44444444",y1:"10.6363636",x2:"7.44444444",y2:"8.45454545",id:"路径-12"}),l.jsx("line",{x1:"7.44444444",y1:"0.818181818",x2:"7.44444444",y2:"0.272727273",id:"路径-12备份"}),l.jsx("line",{x1:"12.352383",y1:"2.81770629",x2:"12.3574335",y2:"2.26720124",id:"路径-12备份",transform:"translate(12.3549, 2.5425) rotate(45) translate(-12.3549, -2.5425)"}),l.jsx("line",{x1:"14.3888889",y1:"7.64141414",x2:"14.3888889",y2:"7.08585859",id:"路径-12备份",transform:"translate(14.3889, 7.3636) rotate(90) translate(-14.3889, -7.3636)"}),l.jsx("line",{x1:"12.3574335",y1:"12.4600715",x2:"12.352383",y2:"11.9095664",id:"路径-12备份",transform:"translate(12.3549, 12.1848) rotate(135) translate(-12.3549, -12.1848)"}),l.jsx("line",{x1:"2.53145543",y1:"12.4600715",x2:"2.53650594",y2:"11.9095664",id:"路径-12备份",transform:"translate(2.534, 12.1848) rotate(225) translate(-2.534, -12.1848)"}),l.jsx("line",{x1:"0.5",y1:"7.64141414",x2:"0.5",y2:"7.08585859",id:"路径-12备份",transform:"translate(0.5, 7.3636) rotate(270) translate(-0.5, -7.3636)"}),l.jsx("line",{x1:"2.53650594",y1:"2.81770629",x2:"2.53145543",y2:"2.26720124",id:"路径-12备份",transform:"translate(2.534, 2.5425) rotate(315) translate(-2.534, -2.5425)"}),l.jsx("polyline",{id:"路径-15",transform:"translate(7.4398, 6.7308) rotate(-45) translate(-7.4398, -6.7308)",points:"6.33632897 5.60310185 6.3568375 7.83853192 8.5432888 7.85859111"})]})})})}const da=({Detail:e,ChunkData:t,getSuggestion:s,loading:n})=>{const{t:r}=le.useTranslation(),[o,i]=g.useState(!1),[a,c]=g.useState(null);return g.useEffect(()=>{e?.payload&&(c(e?.payload),e?.payload?.suggestion&&s&&s(e?.payload?.suggestion))},[e?.payload,s]),g.useEffect(()=>{if(t?.message_chunk&&!n)try{const u=t.message_chunk.replace(/^"|"$/g,"").match(/<JSON>([\s\S]*?)<\/JSON>/g);if(u){const p=u[u.length-1].replace(/<JSON>|<\/JSON>/g,""),m=JSON.parse(p);m?.suggestion&&s&&s(m?.suggestion),c(m)}}catch(d){console.error("Failed to process message chunk in QueryIntent:",d)}},[t?.message_chunk,n,s]),!t&&!e?null:l.jsxs("div",{className:"space-y-2 mb-3 w-full",children:[l.jsxs("button",{onClick:()=>i(d=>!d),className:"inline-flex items-center gap-2 px-2 py-1 rounded-xl transition-colors border border-[#E6E6E6] dark:border-[#272626]",children:[n?l.jsxs(l.Fragment,{children:[l.jsx(V.Loader,{className:"w-4 h-4 animate-spin text-[#1990FF]"}),l.jsx("span",{className:"text-xs text-[#999999] italic",children:r(`assistant.message.steps.${t?.chunk_type||e.type}`)})]}):l.jsxs(l.Fragment,{children:[l.jsx(ua,{className:"w-4 h-4 text-[#38C200]"}),l.jsx("span",{className:"text-xs text-[#999999]",children:r(`assistant.message.steps.${t?.chunk_type||e.type}`)})]}),o?l.jsx(V.ChevronUp,{className:"w-4 h-4"}):l.jsx(V.ChevronDown,{className:"w-4 h-4"})]}),o&&l.jsx("div",{className:"pl-2 pt-1 border-l-2 border-[#e5e5e5] dark:border-[#4e4e56]",children:l.jsx("div",{className:"text-[#8b8b8b] dark:text-[#a6a6a6] space-y-2",children:l.jsxs("div",{className:"mb-4 space-y-2 text-xs",children:[a?.keyword?l.jsxs("div",{className:"flex gap-1",children:[l.jsxs("span",{className:"text-[#999999]",children:["- ",r("assistant.message.steps.keywords"),":"]}),l.jsx("div",{className:"flex flex-wrap gap-1",children:a?.keyword?.map((d,u)=>l.jsxs("span",{className:"text-[#333333] dark:text-[#D8D8D8]",children:[d,u<2&&"、"]},d+u))})]}):null,a?.category?l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsxs("span",{className:"text-[#999999]",children:["- ",r("assistant.message.steps.questionType"),":"]}),l.jsx("span",{className:"text-[#333333] dark:text-[#D8D8D8]",children:a?.category})]}):null,a?.intent?l.jsxs("div",{className:"flex items-start gap-1",children:[l.jsxs("span",{className:"text-[#999999]",children:["- ",r("assistant.message.steps.userIntent"),":"]}),l.jsx("div",{className:"flex-1 text-[#333333] dark:text-[#D8D8D8]",children:a?.intent})]}):null,a?.query?l.jsxs("div",{className:"flex items-start gap-1",children:[l.jsxs("span",{className:"text-[#999999]",children:["- ",r("assistant.message.steps.relatedQuestions"),":"]}),l.jsx("div",{className:"flex-1 flex flex-col text-[#333333] dark:text-[#D8D8D8]",children:a?.query?.map((d,u)=>l.jsxs("span",{children:["- ",d]},d+u))})]}):null]})})})]})},ha=({Detail:e,ChunkData:t,loading:s})=>{const{t:n}=le.useTranslation(),[r,o]=g.useState(!1),[i,a]=g.useState("");return g.useEffect(()=>{e?.description&&a(e?.description)},[e?.description]),g.useEffect(()=>{t?.message_chunk&&a(t?.message_chunk)},[t?.message_chunk,i]),!t&&!e?null:l.jsxs("div",{className:"space-y-2 mb-3 w-full",children:[l.jsxs("button",{onClick:()=>o(c=>!c),className:"inline-flex items-center gap-2 px-2 py-1 rounded-xl transition-colors border border-[#E6E6E6] dark:border-[#272626]",children:[s?l.jsxs(l.Fragment,{children:[l.jsx(V.Loader,{className:"w-4 h-4 animate-spin text-[#1990FF]"}),l.jsx("span",{className:"text-xs text-[#999999] italic",children:n(`assistant.message.steps.${t?.chunk_type}`)})]}):l.jsxs(l.Fragment,{children:[l.jsx(V.Hammer,{className:"w-4 h-4 text-[#38C200]"}),l.jsx("span",{className:"text-xs text-[#999999]",children:n(`assistant.message.steps.${t?.chunk_type}`)})]}),r?l.jsx(V.ChevronUp,{className:"w-4 h-4"}):l.jsx(V.ChevronDown,{className:"w-4 h-4"})]}),r&&l.jsx("div",{className:"pl-2 pt-1 border-l-2 border-[#e5e5e5] dark:border-[#4e4e56]",children:l.jsx("div",{className:"text-[#8b8b8b] dark:text-[#a6a6a6] space-y-2 cm-markdown",children:l.jsx(Kt,{content:i||""})})})]})},$n=async e=>{navigator.clipboard?await navigator.clipboard.writeText(e):console.log("Clipboard not available",e)},fa=e=>{window.open(e,"_blank")},pa=e=>{try{const t=new Date(e),s=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0"),o=String(t.getHours()).padStart(2,"0"),i=String(t.getMinutes()).padStart(2,"0"),a=String(t.getSeconds()).padStart(2,"0");return`${s}-${n}-${r} ${o}:${i}:${a}`}catch(t){return console.error(t),String(e)}};function ma(e){return l.jsx(Gt,{...e,viewBox:"0 0 16 16",children:l.jsxs("g",{id:"Retrieve",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"10.8977456",y1:"14.5",x2:"14",y2:"10.9204757",id:"路径",stroke:"currentColor",strokeWidth:"1.25",transform:"translate(12.4489, 12.7102) scale(-1, 1) translate(-12.4489, -12.7102)"}),l.jsx("circle",{id:"椭圆形",stroke:"currentColor",strokeWidth:"1.25",transform:"translate(7.5, 7) scale(-1, 1) translate(-7.5, -7)",cx:"7.5",cy:"7",r:"5"})]})})}const ga=({Detail:e,ChunkData:t,loading:s,formatUrl:n})=>{const{t:r}=le.useTranslation(),[o,i]=g.useState(!1),[a,c]=g.useState(0),[d,u]=g.useState([]);g.useEffect(()=>{e?.payload&&(u(e?.payload),c(e?.payload.length))},[e?.payload]),g.useEffect(()=>{if(t?.message_chunk&&!s)try{const p=t.message_chunk.match(/<Payload total=(\d+)>/);p&&c(Number(p[1]));const m=t.message_chunk.match(/\[([\s\S]*)\]/);if(m){const b=JSON.parse(m[0]);u(b)}}catch(p){console.error("Failed to parse fetch source data:",p)}},[t?.message_chunk,s]);const h=p=>()=>{const m=n&&n(p)||p.url;m&&fa(m)};return!t&&!e?null:l.jsxs("div",{className:`mt-2 mb-2 max-w-full w-full md:w-[610px] ${o?"rounded-lg overflow-hidden border border-[#E6E6E6] dark:border-[#272626]":""}`,children:[l.jsxs("button",{onClick:()=>i(p=>!p),className:`inline-flex justify-between items-center gap-2 px-2 py-1 rounded-xl transition-colors whitespace-nowrap ${o?"w-full":"border border-[#E6E6E6] dark:border-[#272626]"}`,children:[l.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[l.jsx(ma,{className:"w-4 h-4 text-[#38C200] shrink-0"}),l.jsx("span",{className:"text-xs text-[#999999]",children:r(`assistant.message.steps.${t?.chunk_type||e.type}`,{count:Number(a)})})]}),o?l.jsx(V.ChevronUp,{className:"w-4 h-4 text-[#999999]"}):l.jsx(V.ChevronDown,{className:"w-4 h-4 text-[#999999]"})]}),o&&l.jsx(l.Fragment,{children:d?.map((p,m)=>l.jsx("div",{onClick:h(p),className:"group flex items-center p-2 hover:bg-[#F7F7F7] dark:hover:bg-[#2C2C2C] border-b border-[#E6E6E6] dark:border-[#272626] last:border-b-0 cursor-pointer transition-colors",children:l.jsxs("div",{className:"w-full flex items-center gap-2",children:[l.jsxs("div",{className:"w-[75%] mobile:w-full flex items-center gap-1",children:[l.jsx(V.Globe,{className:"w-3 h-3 shrink-0"}),l.jsx("div",{className:"text-xs text-[#333333] dark:text-[#D8D8D8] truncate font-normal group-hover:text-[#0072FF] dark:group-hover:text-[#0072FF]",children:p.title||p.category})]}),l.jsxs("div",{className:"flex-1 mobile:hidden flex items-center justify-end gap-2",children:[l.jsx("span",{className:"text-xs text-[#999999] dark:text-[#999999] truncate",children:p.source?.name||p?.category}),l.jsx(V.SquareArrowOutUpRight,{className:"w-3 h-3 text-[#999999] dark:text-[#999999] shrink-0"})]})]})},m))})]})};function ya(e){return l.jsx(Gt,{...e,viewBox:"0 0 16 16",children:l.jsx("g",{id:"selection",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:l.jsxs("g",{id:"编组",transform:"translate(1.4813, 1)",stroke:"currentColor",strokeWidth:"1.25",children:[l.jsx("line",{x1:"6.7986538",y1:"2.8",x2:"6.7986538",y2:"2.07241631e-17",id:"路径",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("circle",{id:"椭圆形",fill:"#000000",cx:"6.7986538",cy:"6.72",r:"1"}),l.jsx("line",{x1:"2.17440858e-17",y1:"13.5186538",x2:"4.62042688",y2:"8.89822692",id:"路径",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("line",{x1:"10.1008425",y1:"4.16781133",x2:"10.1008425",y2:"2.66781133",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(10.1008, 3.4178) rotate(45) translate(-10.1008, -3.4178)"}),l.jsx("line",{x1:"12.1186538",y1:"8.12",x2:"12.1186538",y2:"5.32",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(12.1187, 6.72) rotate(90) translate(-12.1187, -6.72)"}),l.jsx("line",{x1:"10.1008425",y1:"10.7721887",x2:"10.1008425",y2:"9.27218867",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(10.1008, 10.0222) rotate(135) translate(-10.1008, -10.0222)"}),l.jsx("line",{x1:"6.7986538",y1:"13.44",x2:"6.7986538",y2:"10.64",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(6.7987, 12.04) rotate(180) translate(-6.7987, -12.04)"}),l.jsx("line",{x1:"1.4786538",y1:"8.12",x2:"1.4786538",y2:"5.32",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(1.4787, 6.72) rotate(270) translate(-1.4787, -6.72)"}),l.jsx("line",{x1:"3.49646513",y1:"4.16781133",x2:"3.49646513",y2:"2.66781133",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(3.4965, 3.4178) rotate(315) translate(-3.4965, -3.4178)"})]})})})}const xa=({Detail:e,ChunkData:t,loading:s})=>{const{t:n}=le.useTranslation(),[r,o]=g.useState(!1),[i,a]=g.useState([]);return g.useEffect(()=>{e?.payload&&a(e?.payload)},[e?.payload]),g.useEffect(()=>{if(t?.message_chunk&&!s)try{const d=t.message_chunk.replace(/^"|"$/g,"").match(/<JSON>([\s\S]*?)<\/JSON>/g);if(d)for(let u=d.length-1;u>=0;u--)try{const h=d[u].replace(/<JSON>|<\/JSON>|<think>|<\/think>/g,""),p=JSON.parse(h.trim());if(Array.isArray(p)&&p.every(m=>m.id&&m.title&&m.explain)){a(p);break}}catch{continue}}catch(c){console.error("Failed to parse pick source data:",c)}},[t?.message_chunk,s]),!t&&!e?null:l.jsxs("div",{className:"space-y-2 mb-3 w-full",children:[l.jsxs("button",{onClick:()=>o(c=>!c),className:"inline-flex items-center gap-2 px-2 py-1 rounded-xl transition-colors border border-[#E6E6E6] dark:border-[#272626]",children:[s?l.jsxs(l.Fragment,{children:[l.jsx(V.Loader,{className:"w-4 h-4 animate-spin text-[#1990FF]"}),l.jsx("span",{className:"text-xs text-[#999999] italic",children:n("assistant.message.steps.pick_source_start")})]}):l.jsxs(l.Fragment,{children:[l.jsx(ya,{className:"w-4 h-4 text-[#38C200]"}),l.jsx("span",{className:"text-xs text-[#999999]",children:n(`assistant.message.steps.${t?.chunk_type||e.type}`,{count:i?.length})})]}),r?l.jsx(V.ChevronUp,{className:"w-4 h-4"}):l.jsx(V.ChevronDown,{className:"w-4 h-4"})]}),r&&l.jsx("div",{className:"pl-2 pt-1 border-l-2 border-[#e5e5e5] dark:border-[#4e4e56]",children:l.jsx("div",{className:"text-[#8b8b8b] dark:text-[#a6a6a6] space-y-2",children:l.jsx("div",{className:"mb-4 space-y-3 text-xs",children:i?.map(c=>l.jsx("div",{className:"p-3 rounded-lg border border-[#E6E6E6] dark:border-[#272626] bg-white dark:bg-[#1E1E1E] hover:bg-gray-50 dark:hover:bg-[#2C2C2C] transition-colors",children:l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsx("div",{className:"text-sm font-medium text-[#333333] dark:text-[#D8D8D8]",children:c.title}),l.jsx("div",{className:"text-xs text-[#666666] dark:text-[#A3A3A3] line-clamp-2",children:c.explain})]})},c.id))})})})]})};function va(e){return l.jsx(Gt,{...e,viewBox:"0 0 16 16",children:l.jsxs("g",{id:"deading",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[l.jsx("circle",{id:"椭圆形",stroke:"currentColor",strokeWidth:"1.25",cx:"8",cy:"3",r:"1.375"}),l.jsx("circle",{id:"椭圆形备份-2",stroke:"currentColor",strokeWidth:"1.25",cx:"3",cy:"5",r:"1.375"}),l.jsx("circle",{id:"椭圆形备份-4",stroke:"currentColor",strokeWidth:"1.25",cx:"13",cy:"5",r:"1.375"}),l.jsx("circle",{id:"椭圆形备份",stroke:"currentColor",strokeWidth:"1.25",cx:"8",cy:"13",r:"1.375"}),l.jsx("circle",{id:"椭圆形备份-3",stroke:"currentColor",strokeWidth:"1.25",cx:"3",cy:"11",r:"1.375"}),l.jsx("circle",{id:"椭圆形备份-5",stroke:"currentColor",strokeWidth:"1.25",cx:"13",cy:"11",r:"1.375"}),l.jsx("path",{d:"M8.0070039,4.03345364 L8.0070039,8.50590493 L4.1923477,10.2855921",id:"路径-13",stroke:"currentColor",strokeWidth:"1.25"}),l.jsx("line",{x1:"11.7924093",y1:"8.47550067",x2:"8",y2:"10.2754456",id:"路径-13备份",stroke:"currentColor",strokeWidth:"1.25",transform:"translate(9.8962, 9.3755) scale(-1, 1) translate(-9.8962, -9.3755)"}),l.jsx("path",{d:"M4.17568738,4.53038288 L6.65384701,3.54050563 M9.35480875,3.53987819 L11.7283558,4.49062879",id:"形状",stroke:"currentColor",strokeWidth:"1.25"}),l.jsx("line",{x1:"3",y1:"6.06946104",x2:"3",y2:"9.97988046",id:"路径-14",stroke:"currentColor",strokeWidth:"1.25"}),l.jsx("line",{x1:"13",y1:"6.06946104",x2:"13",y2:"9.97988046",id:"路径-14备份",stroke:"currentColor",strokeWidth:"1.25"})]})})}const ba=({Detail:e,ChunkData:t,loading:s})=>{const{t:n}=le.useTranslation(),[r,o]=g.useState(!1),[i,a]=g.useState([]),[c,d]=g.useState("");return g.useEffect(()=>{e?.description&&d(e?.description)},[e?.description]),g.useEffect(()=>{if(t?.message_chunk)try{if(t.message_chunk.includes("&")){const u=t.message_chunk.split("&").filter(Boolean);a(u)}else a([t.message_chunk])}catch(u){console.error("Failed to parse query data:",u)}},[t?.message_chunk]),!t&&!e?null:l.jsxs("div",{className:"space-y-2 mb-3 w-full",children:[l.jsxs("button",{onClick:()=>o(u=>!u),className:"inline-flex items-center gap-2 px-2 py-1 rounded-xl transition-colors border border-[#E6E6E6] dark:border-[#272626]",children:[s?l.jsxs(l.Fragment,{children:[l.jsx(V.Loader,{className:"w-4 h-4 animate-spin text-[#1990FF]"}),l.jsx("span",{className:"text-xs text-[#999999] italic",children:n(`assistant.message.steps.${t?.chunk_type||e?.type}`)})]}):l.jsxs(l.Fragment,{children:[l.jsx(va,{className:"w-4 h-4 text-[#38C200]"}),l.jsx("span",{className:"text-xs text-[#999999]",children:n(`assistant.message.steps.${t?.chunk_type||e?.type}`,{count:Number(i.length)})})]}),r?l.jsx(V.ChevronUp,{className:"w-4 h-4"}):l.jsx(V.ChevronDown,{className:"w-4 h-4"})]}),r&&l.jsx("div",{className:"pl-2 pt-1 border-l-2 border-[#e5e5e5] dark:border-[#4e4e56]",children:l.jsx("div",{className:"text-[#8b8b8b] dark:text-[#a6a6a6] space-y-2",children:l.jsxs("div",{className:"mb-4 space-y-3 text-xs",children:[i?.map(u=>l.jsx("div",{className:"flex flex-col gap-2",children:l.jsxs("div",{className:"text-xs text-[#999999] dark:text-[#808080]",children:["- ",u]})},u)),c?.split(`
32
- `).map((u,h)=>u.trim()&&l.jsx("p",{className:"text-sm",children:u},h))]})})})]})},wa=({Detail:e,ChunkData:t,loading:s})=>{const{t:n}=le.useTranslation(),[r,o]=g.useState(!0),[i,a]=g.useState("");return g.useEffect(()=>{e?.description&&a(e?.description)},[e?.description]),g.useEffect(()=>{t?.message_chunk&&a(t?.message_chunk)},[t?.message_chunk,i]),!t&&!e?null:l.jsxs("div",{className:"space-y-2 mb-3 w-full",children:[l.jsxs("button",{onClick:()=>o(c=>!c),className:"inline-flex items-center gap-2 px-2 py-1 rounded-xl transition-colors border border-[#E6E6E6] dark:border-[#272626]",children:[s?l.jsxs(l.Fragment,{children:[l.jsx(V.Loader,{className:"w-4 h-4 animate-spin text-[#1990FF]"}),l.jsx("span",{className:"text-xs text-[#999999] italic",children:n(`assistant.message.steps.${t?.chunk_type}`)})]}):l.jsxs(l.Fragment,{children:[l.jsx(V.Brain,{className:"w-4 h-4 text-[#38C200]"}),l.jsx("span",{className:"text-xs text-[#999999]",children:n("assistant.message.steps.thoughtTime")})]}),r?l.jsx(V.ChevronUp,{className:"w-4 h-4"}):l.jsx(V.ChevronDown,{className:"w-4 h-4"})]}),r&&l.jsx("div",{className:"pl-2 pt-1 border-l-2 border-[#e5e5e5] dark:border-[#4e4e56]",children:l.jsx("div",{className:"text-[#8b8b8b] dark:text-[#a6a6a6] space-y-2",children:i?.split(`
33
- `).map((c,d)=>c.trim()&&l.jsx("p",{className:"text-sm",children:c},d))})})]})},Aa=["timedout","error"],Ca=({id:e,content:t,question:s,actionClassName:n,actionIconSize:r,copyButtonId:o,onResend:i})=>{const[a,c]=g.useState(!1),[d,u]=g.useState(!1),[h,p]=g.useState(!1),[m,b]=g.useState(!1),[w,C]=g.useState(!1),x=Aa.includes(e),v=async()=>{try{await $n(t),c(!0);const N=setTimeout(()=>{c(!1),clearTimeout(N)},2e3)}catch(N){console.error("copy error:",N)}},y=()=>{u(!d),p(!1)},E=()=>{p(!h),u(!1)},P=async()=>{if("speechSynthesis"in window){if(m){window.speechSynthesis.cancel(),b(!1);return}const N=new SpeechSynthesisUtterance(t);N.lang="zh-CN",N.onend=()=>{b(!1)},b(!0),window.speechSynthesis.speak(N)}},D=()=>{if(i){C(!0),i();const N=setTimeout(()=>{C(!1),clearTimeout(N)},1e3)}};return l.jsxs("div",{className:pt("flex items-center gap-2 mt-2",n),children:[!x&&l.jsx("button",{id:o,onClick:v,className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors",children:a?l.jsx(V.Check,{className:"w-4 h-4 text-[#38C200] dark:text-[#38C200]",style:{width:r,height:r}}):l.jsx(V.Copy,{className:"w-4 h-4 text-[#666666] dark:text-[#A3A3A3]",style:{width:r,height:r}})}),!x&&l.jsx("button",{onClick:y,className:`p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors ${d?"animate-shake":""}`,children:l.jsx(V.ThumbsUp,{className:`w-4 h-4 ${d?"text-[#1990FF] dark:text-[#1990FF]":"text-[#666666] dark:text-[#A3A3A3]"}`,style:{width:r,height:r}})}),!x&&l.jsx("button",{onClick:E,className:`p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors ${h?"animate-shake":""}`,children:l.jsx(V.ThumbsDown,{className:`w-4 h-4 ${h?"text-[#1990FF] dark:text-[#1990FF]":"text-[#666666] dark:text-[#A3A3A3]"}`,style:{width:r,height:r}})}),!x&&l.jsx(l.Fragment,{children:l.jsx("button",{onClick:P,className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors",children:l.jsx(V.Volume2,{className:`w-4 h-4 ${m?"text-[#1990FF] dark:text-[#1990FF]":"text-[#666666] dark:text-[#A3A3A3]"}`,style:{width:r,height:r}})})}),s&&l.jsx("button",{onClick:D,className:`p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors ${w?"animate-spin":""}`,children:l.jsx(V.RotateCcw,{className:`w-4 h-4 ${w?"text-[#1990FF] dark:text-[#1990FF]":"text-[#666666] dark:text-[#A3A3A3]"}`,style:{width:r,height:r}})})]})};function ka({suggestions:e,onSelect:t}){return!e||e.length===0?null:l.jsx("div",{className:"mt-4 flex flex-col gap-2",children:e.map((s,n)=>l.jsxs("button",{onClick:()=>t(s),className:"text-left inline-flex items-center px-3 py-1.5 rounded-full bg-[#F5F5F5] dark:bg-[#2A2A2A] border border-[#E4E5EF] dark:border-[#3A3A3A] text-sm text-[#333333] dark:text-white hover:bg-[#EDEDED] dark:hover:bg-[#3A3A3A] transition-colors w-fit max-w-full wrap-break-word whitespace-pre-wrap",children:[l.jsx("span",{className:"break-all",children:s}),l.jsx(V.MoveRight,{className:"w-3 h-3 ml-1.5 shrink-0"})]},n))})}const Ta=({textToCopy:e})=>{const[t,s]=g.useState(!1),n=async()=>{try{await $n(e),s(!0);const r=setTimeout(()=>{s(!1),clearTimeout(r)},2e3)}catch(r){console.error("copy error:",r)}};return l.jsx("button",{className:"p-1 bg-gray-200 dark:bg-gray-700 rounded",onClick:n,children:t?l.jsx(V.Check,{className:"w-4 h-4 text-[#38C200] dark:text-[#38C200]"}):l.jsx(V.Copy,{className:"w-4 h-4 text-gray-600 dark:text-gray-300"})})},Sa=e=>{const{message:t,attachments:s}=e,[n,r]=g.useState(!1),[o,i]=g.useState([]),a=c=>{if(typeof window<"u"&&typeof document<"u"){const d=window.getSelection(),u=document.createRange();if(c.currentTarget&&d&&u)try{u.selectNodeContents(c.currentTarget),d.removeAllRanges(),d.addRange(u)}catch(h){console.error("Selection failed:",h)}}};return ta.useAsyncEffect(async()=>{try{if(s.length===0)return;i({}?.hits?.hits)}catch(c){console.error("Get attachment failed:",String(c))}},[s]),l.jsxs(l.Fragment,{children:[t&&l.jsxs("div",{className:"flex gap-1 items-center justify-end",onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:[l.jsx("div",{className:pt("size-6 transition",{"opacity-0":!n}),children:l.jsx(Ta,{textToCopy:t})}),l.jsx("div",{className:"max-w-[85%] overflow-auto text-left px-3 py-2 bg-white dark:bg-[#202126]! rounded-xl border border-black/12 dark:border-black/15 font-normal text-sm text-[#333333] dark:text-white cursor-pointer user-select-text whitespace-pre-wrap",onDoubleClick:a,children:t})]}),o&&o.length>0&&l.jsx("div",{className:pt("w-full",{"mt-3":t}),children:l.jsx(sa.Attachments,{data:o.map(c=>({id:c._source.id,filename:c._source.name,extname:c._source.icon,size:c._source.size,status:"uploaded"})),className:"text-left"})})]})},Ea=({name:e,className:t,style:s,...n})=>l.jsx("svg",{className:`icon dark:drop-shadow-[0_0_6px_rgb(255,255,255)] ${t||""}`,style:s,...n,children:l.jsx("use",{xlinkHref:`#${e}`})});function ja(){const[e,t]=g.useState(),[s,n]=g.useState(),[r,o]=g.useState(),[i,a]=g.useState(),[c,d]=g.useState(),[u,h]=g.useState(),[p,m]=g.useState(),[b,w]=g.useState(),C={deal_query_intent:g.useCallback(v=>{t(y=>y?{...y,message_chunk:(y.message_chunk||"")+(v.message_chunk||"")}:v)},[]),deal_tools:g.useCallback(v=>{n(y=>y?{...y,message_chunk:(y.message_chunk||"")+(v.message_chunk||"")}:v)},[]),deal_fetch_source:g.useCallback(v=>{o(y=>y?{...y,message_chunk:(y.message_chunk||"")+(v.message_chunk||"")}:v)},[]),deal_pick_source:g.useCallback(v=>{a(y=>y?{...y,message_chunk:(y.message_chunk||"")+(v.message_chunk||"")}:v)},[]),deal_deep_read:g.useCallback(v=>{d(y=>y?{...y,message_chunk:(y.message_chunk||"")+"&"+(v.message_chunk||"")}:v)},[]),deal_think:g.useCallback(v=>{h(y=>y?{...y,message_chunk:(y.message_chunk||"")+(v.message_chunk||"")}:v)},[]),deal_response:g.useCallback(v=>{m(y=>y?{...y,message_chunk:(y.message_chunk||"")+(v.message_chunk||"")}:v)},[]),deal_deep_research:g.useCallback(v=>{w(y=>y?{...y,message_chunk:(y.message_chunk||"")+(v.message_chunk||"")}:v)},[])};return{data:{query_intent:e,tools:s,fetch_source:r,pick_source:i,deep_read:c,think:u,response:p,deepResearch:b},handlers:C,clearAllChunkData:()=>new Promise(v=>{t(void 0),n(void 0),o(void 0),a(void 0),d(void 0),h(void 0),m(void 0),w(void 0),setTimeout(v,0)})}}const bs=g.createContext({});function ws(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const As=typeof window<"u",er=As?g.useLayoutEffect:g.useEffect,Jt=g.createContext(null);function Cs(e,t){e.indexOf(t)===-1&&e.push(t)}function ks(e,t){const s=e.indexOf(t);s>-1&&e.splice(s,1)}const be=(e,t,s)=>s>t?t:s<e?e:s;function Ts(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ze=()=>{},Se=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(ze=(e,t,s)=>{!e&&typeof console<"u"&&console.warn(Ts(t,s))},Se=(e,t,s)=>{if(!e)throw new Error(Ts(t,s))});const Ee={},tr=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function sr(e){return typeof e=="object"&&e!==null}const nr=e=>/^0[^.\s]+$/u.test(e);function Ss(e){let t;return()=>(t===void 0&&(t=e()),t)}const ce=e=>e,Pa=(e,t)=>s=>t(e(s)),yt=(...e)=>e.reduce(Pa),xt=(e,t,s)=>{const n=t-e;return n===0?1:(s-e)/n};class Es{constructor(){this.subscriptions=[]}add(t){return Cs(this.subscriptions,t),()=>ks(this.subscriptions,t)}notify(t,s,n){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,s,n);else for(let o=0;o<r;o++){const i=this.subscriptions[o];i&&i(t,s,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const we=e=>e*1e3,ue=e=>e/1e3;function rr(e,t){return t?e*(1e3/t):0}const ir=new Set;function js(e,t,s){e||ir.has(t)||(console.warn(Ts(t,s)),ir.add(t))}const or=(e,t,s)=>(((1-3*s+3*t)*e+(3*s-6*t))*e+3*t)*e,Na=1e-7,Va=12;function Ma(e,t,s,n,r){let o,i,a=0;do i=t+(s-t)/2,o=or(i,n,r)-e,o>0?s=i:t=i;while(Math.abs(o)>Na&&++a<Va);return i}function vt(e,t,s,n){if(e===t&&s===n)return ce;const r=o=>Ma(o,0,1,e,s);return o=>o===0||o===1?o:or(r(o),t,n)}const ar=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,lr=e=>t=>1-e(1-t),cr=vt(.33,1.53,.69,.99),Ps=lr(cr),ur=ar(Ps),dr=e=>(e*=2)<1?.5*Ps(e):.5*(2-Math.pow(2,-10*(e-1))),Ns=e=>1-Math.sin(Math.acos(e)),hr=lr(Ns),fr=ar(Ns),Da=vt(.42,0,1,1),Fa=vt(0,0,.58,1),pr=vt(.42,0,.58,1),La=e=>Array.isArray(e)&&typeof e[0]!="number",mr=e=>Array.isArray(e)&&typeof e[0]=="number",gr={linear:ce,easeIn:Da,easeInOut:pr,easeOut:Fa,circIn:Ns,circInOut:fr,circOut:hr,backIn:Ps,backInOut:ur,backOut:cr,anticipate:dr},Ba=e=>typeof e=="string",yr=e=>{if(mr(e)){Se(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,s,n,r]=e;return vt(t,s,n,r)}else if(Ba(e))return Se(gr[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),gr[e];return e},Qt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ra(e,t){let s=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){i.has(u)&&(d.schedule(u),e()),u(a)}const d={schedule:(u,h=!1,p=!1)=>{const b=p&&r?s:n;return h&&i.add(u),b.has(u)||b.add(u),u},cancel:u=>{n.delete(u),i.delete(u)},process:u=>{if(a=u,r){o=!0;return}r=!0,[s,n]=[n,s],s.forEach(c),s.clear(),r=!1,o&&(o=!1,d.process(u))}};return d}const Oa=40;function xr(e,t){let s=!1,n=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>s=!0,i=Qt.reduce((y,E)=>(y[E]=Ra(o),y),{}),{setup:a,read:c,resolveKeyframes:d,preUpdate:u,update:h,preRender:p,render:m,postRender:b}=i,w=()=>{const y=Ee.useManualTiming?r.timestamp:performance.now();s=!1,Ee.useManualTiming||(r.delta=n?1e3/60:Math.max(Math.min(y-r.timestamp,Oa),1)),r.timestamp=y,r.isProcessing=!0,a.process(r),c.process(r),d.process(r),u.process(r),h.process(r),p.process(r),m.process(r),b.process(r),r.isProcessing=!1,s&&t&&(n=!1,e(w))},C=()=>{s=!0,n=!0,r.isProcessing||e(w)};return{schedule:Qt.reduce((y,E)=>{const P=i[E];return y[E]=(D,N=!1,j=!1)=>(s||C(),P.schedule(D,N,j)),y},{}),cancel:y=>{for(let E=0;E<Qt.length;E++)i[Qt[E]].cancel(y)},state:r,steps:i}}const{schedule:_,cancel:Pe,state:Z,steps:Vs}=xr(typeof requestAnimationFrame<"u"?requestAnimationFrame:ce,!0);let Ht;function Ia(){Ht=void 0}const te={now:()=>(Ht===void 0&&te.set(Z.isProcessing||Ee.useManualTiming?Z.timestamp:performance.now()),Ht),set:e=>{Ht=e,queueMicrotask(Ia)}},vr=e=>t=>typeof t=="string"&&t.startsWith(e),br=vr("--"),_a=vr("var(--"),Ms=e=>_a(e)?Wa.test(e.split("/*")[0].trim()):!1,Wa=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function wr(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Ge={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},bt={...Ge,transform:e=>be(0,1,e)},Xt={...Ge,default:1},wt=e=>Math.round(e*1e5)/1e5,Ds=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ua(e){return e==null}const qa=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Fs=(e,t)=>s=>!!(typeof s=="string"&&qa.test(s)&&s.startsWith(e)||t&&!Ua(s)&&Object.prototype.hasOwnProperty.call(s,t)),Ar=(e,t,s)=>n=>{if(typeof n!="string")return n;const[r,o,i,a]=n.match(Ds);return{[e]:parseFloat(r),[t]:parseFloat(o),[s]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},Ka=e=>be(0,255,e),Ls={...Ge,transform:e=>Math.round(Ka(e))},Re={test:Fs("rgb","red"),parse:Ar("red","green","blue"),transform:({red:e,green:t,blue:s,alpha:n=1})=>"rgba("+Ls.transform(e)+", "+Ls.transform(t)+", "+Ls.transform(s)+", "+wt(bt.transform(n))+")"};function Ya(e){let t="",s="",n="",r="";return e.length>5?(t=e.substring(1,3),s=e.substring(3,5),n=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),s=e.substring(2,3),n=e.substring(3,4),r=e.substring(4,5),t+=t,s+=s,n+=n,r+=r),{red:parseInt(t,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:r?parseInt(r,16)/255:1}}const Bs={test:Fs("#"),parse:Ya,transform:Re.transform},At=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ne=At("deg"),Ae=At("%"),S=At("px"),za=At("vh"),Ga=At("vw"),Cr={...Ae,parse:e=>Ae.parse(e)/100,transform:e=>Ae.transform(e*100)},Je={test:Fs("hsl","hue"),parse:Ar("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:s,alpha:n=1})=>"hsla("+Math.round(e)+", "+Ae.transform(wt(t))+", "+Ae.transform(wt(s))+", "+wt(bt.transform(n))+")"},J={test:e=>Re.test(e)||Bs.test(e)||Je.test(e),parse:e=>Re.test(e)?Re.parse(e):Je.test(e)?Je.parse(e):Bs.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Re.transform(e):Je.transform(e),getAnimatableNone:e=>{const t=J.parse(e);return t.alpha=0,J.transform(t)}},Ja=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Qa(e){return isNaN(e)&&typeof e=="string"&&(e.match(Ds)?.length||0)+(e.match(Ja)?.length||0)>0}const kr="number",Tr="color",Ha="var",Xa="var(",Sr="${}",Za=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ct(e){const t=e.toString(),s=[],n={color:[],number:[],var:[]},r=[];let o=0;const a=t.replace(Za,c=>(J.test(c)?(n.color.push(o),r.push(Tr),s.push(J.parse(c))):c.startsWith(Xa)?(n.var.push(o),r.push(Ha),s.push(c)):(n.number.push(o),r.push(kr),s.push(parseFloat(c))),++o,Sr)).split(Sr);return{values:s,split:a,indexes:n,types:r}}function Er(e){return Ct(e).values}function jr(e){const{split:t,types:s}=Ct(e),n=t.length;return r=>{let o="";for(let i=0;i<n;i++)if(o+=t[i],r[i]!==void 0){const a=s[i];a===kr?o+=wt(r[i]):a===Tr?o+=J.transform(r[i]):o+=r[i]}return o}}const $a=e=>typeof e=="number"?0:J.test(e)?J.getAnimatableNone(e):e;function el(e){const t=Er(e);return jr(e)(t.map($a))}const Ve={test:Qa,parse:Er,createTransformer:jr,getAnimatableNone:el};function Rs(e,t,s){return s<0&&(s+=1),s>1&&(s-=1),s<.16666666666666666?e+(t-e)*6*s:s<.5?t:s<.6666666666666666?e+(t-e)*(.6666666666666666-s)*6:e}function tl({hue:e,saturation:t,lightness:s,alpha:n}){e/=360,t/=100,s/=100;let r=0,o=0,i=0;if(!t)r=o=i=s;else{const a=s<.5?s*(1+t):s+t-s*t,c=2*s-a;r=Rs(c,a,e+.3333333333333333),o=Rs(c,a,e),i=Rs(c,a,e-.3333333333333333)}return{red:Math.round(r*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:n}}function Zt(e,t){return s=>s>0?t:e}const W=(e,t,s)=>e+(t-e)*s,Os=(e,t,s)=>{const n=e*e,r=s*(t*t-n)+n;return r<0?0:Math.sqrt(r)},sl=[Bs,Re,Je],nl=e=>sl.find(t=>t.test(e));function Pr(e){const t=nl(e);if(ze(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let s=t.parse(e);return t===Je&&(s=tl(s)),s}const Nr=(e,t)=>{const s=Pr(e),n=Pr(t);if(!s||!n)return Zt(e,t);const r={...s};return o=>(r.red=Os(s.red,n.red,o),r.green=Os(s.green,n.green,o),r.blue=Os(s.blue,n.blue,o),r.alpha=W(s.alpha,n.alpha,o),Re.transform(r))},Is=new Set(["none","hidden"]);function rl(e,t){return Is.has(e)?s=>s<=0?e:t:s=>s>=1?t:e}function il(e,t){return s=>W(e,t,s)}function _s(e){return typeof e=="number"?il:typeof e=="string"?Ms(e)?Zt:J.test(e)?Nr:ll:Array.isArray(e)?Vr:typeof e=="object"?J.test(e)?Nr:ol:Zt}function Vr(e,t){const s=[...e],n=s.length,r=e.map((o,i)=>_s(o)(o,t[i]));return o=>{for(let i=0;i<n;i++)s[i]=r[i](o);return s}}function ol(e,t){const s={...e,...t},n={};for(const r in s)e[r]!==void 0&&t[r]!==void 0&&(n[r]=_s(e[r])(e[r],t[r]));return r=>{for(const o in n)s[o]=n[o](r);return s}}function al(e,t){const s=[],n={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const o=t.types[r],i=e.indexes[o][n[o]],a=e.values[i]??0;s[r]=a,n[o]++}return s}const ll=(e,t)=>{const s=Ve.createTransformer(t),n=Ct(e),r=Ct(t);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?Is.has(e)&&!r.values.length||Is.has(t)&&!n.values.length?rl(e,t):yt(Vr(al(n,r),r.values),s):(ze(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Zt(e,t))};function Mr(e,t,s){return typeof e=="number"&&typeof t=="number"&&typeof s=="number"?W(e,t,s):_s(e)(e,t)}const cl=e=>{const t=({timestamp:s})=>e(s);return{start:(s=!0)=>_.update(t,s),stop:()=>Pe(t),now:()=>Z.isProcessing?Z.timestamp:te.now()}},Dr=(e,t,s=10)=>{let n="";const r=Math.max(Math.round(t/s),2);for(let o=0;o<r;o++)n+=Math.round(e(o/(r-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},$t=2e4;function Ws(e){let t=0;const s=50;let n=e.next(t);for(;!n.done&&t<$t;)t+=s,n=e.next(t);return t>=$t?1/0:t}function ul(e,t=100,s){const n=s({...e,keyframes:[0,t]}),r=Math.min(Ws(n),$t);return{type:"keyframes",ease:o=>n.next(r*o).value/t,duration:ue(r)}}const dl=5;function Fr(e,t,s){const n=Math.max(t-dl,0);return rr(s-e(n),t-n)}const U={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Us=.001;function hl({duration:e=U.duration,bounce:t=U.bounce,velocity:s=U.velocity,mass:n=U.mass}){let r,o;ze(e<=we(U.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=be(U.minDamping,U.maxDamping,i),e=be(U.minDuration,U.maxDuration,ue(e)),i<1?(r=d=>{const u=d*i,h=u*e,p=u-s,m=qs(d,i),b=Math.exp(-h);return Us-p/m*b},o=d=>{const h=d*i*e,p=h*s+s,m=Math.pow(i,2)*Math.pow(d,2)*e,b=Math.exp(-h),w=qs(Math.pow(d,2),i);return(-r(d)+Us>0?-1:1)*((p-m)*b)/w}):(r=d=>{const u=Math.exp(-d*e),h=(d-s)*e+1;return-Us+u*h},o=d=>{const u=Math.exp(-d*e),h=(s-d)*(e*e);return u*h});const a=5/e,c=pl(r,o,a);if(e=we(e),isNaN(c))return{stiffness:U.stiffness,damping:U.damping,duration:e};{const d=Math.pow(c,2)*n;return{stiffness:d,damping:i*2*Math.sqrt(n*d),duration:e}}}const fl=12;function pl(e,t,s){let n=s;for(let r=1;r<fl;r++)n=n-e(n)/t(n);return n}function qs(e,t){return e*Math.sqrt(1-t*t)}const ml=["duration","bounce"],gl=["stiffness","damping","mass"];function Lr(e,t){return t.some(s=>e[s]!==void 0)}function yl(e){let t={velocity:U.velocity,stiffness:U.stiffness,damping:U.damping,mass:U.mass,isResolvedFromDuration:!1,...e};if(!Lr(e,gl)&&Lr(e,ml))if(e.visualDuration){const s=e.visualDuration,n=2*Math.PI/(s*1.2),r=n*n,o=2*be(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:U.mass,stiffness:r,damping:o}}else{const s=hl(e);t={...t,...s,mass:U.mass},t.isResolvedFromDuration=!0}return t}function es(e=U.visualDuration,t=U.bounce){const s=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:r}=s;const o=s.keyframes[0],i=s.keyframes[s.keyframes.length-1],a={done:!1,value:o},{stiffness:c,damping:d,mass:u,duration:h,velocity:p,isResolvedFromDuration:m}=yl({...s,velocity:-ue(s.velocity||0)}),b=p||0,w=d/(2*Math.sqrt(c*u)),C=i-o,x=ue(Math.sqrt(c/u)),v=Math.abs(C)<5;n||(n=v?U.restSpeed.granular:U.restSpeed.default),r||(r=v?U.restDelta.granular:U.restDelta.default);let y;if(w<1){const P=qs(x,w);y=D=>{const N=Math.exp(-w*x*D);return i-N*((b+w*x*C)/P*Math.sin(P*D)+C*Math.cos(P*D))}}else if(w===1)y=P=>i-Math.exp(-x*P)*(C+(b+x*C)*P);else{const P=x*Math.sqrt(w*w-1);y=D=>{const N=Math.exp(-w*x*D),j=Math.min(P*D,300);return i-N*((b+w*x*C)*Math.sinh(j)+P*C*Math.cosh(j))/P}}const E={calculatedDuration:m&&h||null,next:P=>{const D=y(P);if(m)a.done=P>=h;else{let N=P===0?b:0;w<1&&(N=P===0?we(b):Fr(y,P,D));const j=Math.abs(N)<=n,R=Math.abs(i-D)<=r;a.done=j&&R}return a.value=a.done?i:D,a},toString:()=>{const P=Math.min(Ws(E),$t),D=Dr(N=>E.next(P*N).value,P,30);return P+"ms "+D},toTransition:()=>{}};return E}es.applyToOptions=e=>{const t=ul(e,100,es);return e.ease=t.ease,e.duration=we(t.duration),e.type="keyframes",e};function Ks({keyframes:e,velocity:t=0,power:s=.8,timeConstant:n=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:c,restDelta:d=.5,restSpeed:u}){const h=e[0],p={done:!1,value:h},m=j=>a!==void 0&&j<a||c!==void 0&&j>c,b=j=>a===void 0?c:c===void 0||Math.abs(a-j)<Math.abs(c-j)?a:c;let w=s*t;const C=h+w,x=i===void 0?C:i(C);x!==C&&(w=x-h);const v=j=>-w*Math.exp(-j/n),y=j=>x+v(j),E=j=>{const R=v(j),Q=y(j);p.done=Math.abs(R)<=d,p.value=p.done?x:Q};let P,D;const N=j=>{m(p.value)&&(P=j,D=es({keyframes:[p.value,b(p.value)],velocity:Fr(y,j,p.value),damping:r,stiffness:o,restDelta:d,restSpeed:u}))};return N(0),{calculatedDuration:null,next:j=>{let R=!1;return!D&&P===void 0&&(R=!0,E(j),N(j)),P!==void 0&&j>=P?D.next(j-P):(!R&&E(j),p)}}}function xl(e,t,s){const n=[],r=s||Ee.mix||Mr,o=e.length-1;for(let i=0;i<o;i++){let a=r(e[i],e[i+1]);if(t){const c=Array.isArray(t)?t[i]||ce:t;a=yt(c,a)}n.push(a)}return n}function vl(e,t,{clamp:s=!0,ease:n,mixer:r}={}){const o=e.length;if(Se(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=xl(t,n,r),c=a.length,d=u=>{if(i&&u<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(u<e[h+1]);h++);const p=xt(e[h],e[h+1],u);return a[h](p)};return s?u=>d(be(e[0],e[o-1],u)):d}function bl(e,t){const s=e[e.length-1];for(let n=1;n<=t;n++){const r=xt(0,t,n);e.push(W(s,1,r))}}function wl(e){const t=[0];return bl(t,e.length-1),t}function Al(e,t){return e.map(s=>s*t)}function Cl(e,t){return e.map(()=>t||pr).splice(0,e.length-1)}function Qe({duration:e=300,keyframes:t,times:s,ease:n="easeInOut"}){const r=La(n)?n.map(yr):yr(n),o={done:!1,value:t[0]},i=Al(s&&s.length===t.length?s:wl(t),e),a=vl(i,t,{ease:Array.isArray(r)?r:Cl(t,r)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}const kl=e=>e!==null;function Ys(e,{repeat:t,repeatType:s="loop"},n,r=1){const o=e.filter(kl),a=r<0||t&&s!=="loop"&&t%2===1?0:o.length-1;return!a||n===void 0?o[a]:n}const Tl={decay:Ks,inertia:Ks,tween:Qe,keyframes:Qe,spring:es};function Br(e){typeof e.type=="string"&&(e.type=Tl[e.type])}class zs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,s){return this.finished.then(t,s)}}const Sl=e=>e/100;class Gs extends zs{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:s}=this.options;s&&s.updatedAt!==te.now()&&this.tick(te.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Br(t);const{type:s=Qe,repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=t;let{keyframes:a}=t;const c=s||Qe;process.env.NODE_ENV!=="production"&&c!==Qe&&Se(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==Qe&&typeof a[0]!="number"&&(this.mixKeyframes=yt(Sl,Mr(a[0],a[1])),a=[0,100]);const d=c({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-i})),d.calculatedDuration===null&&(d.calculatedDuration=Ws(d));const{calculatedDuration:u}=d;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=d}updateTime(t){const s=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(t,s=!1){const{generator:n,totalDuration:r,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:d=0,keyframes:u,repeat:h,repeatType:p,repeatDelay:m,type:b,onUpdate:w,finalKeyframe:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),s?this.currentTime=t:this.updateTime(t);const x=this.currentTime-d*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?x<0:x>r;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let y=this.currentTime,E=n;if(h){const j=Math.min(this.currentTime,r)/a;let R=Math.floor(j),Q=j%1;!Q&&j>=1&&(Q=1),Q===1&&R--,R=Math.min(R,h+1),!!(R%2)&&(p==="reverse"?(Q=1-Q,m&&(Q-=m/a)):p==="mirror"&&(E=i)),y=be(0,1,Q)*a}const P=v?{done:!1,value:u[0]}:E.next(y);o&&(P.value=o(P.value));let{done:D}=P;!v&&c!==null&&(D=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return N&&b!==Ks&&(P.value=Ys(u,this.options,C,this.speed)),w&&w(P.value),N&&this.finish(),P}then(t,s){return this.finished.then(t,s)}get duration(){return ue(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ue(t)}get time(){return ue(this.currentTime)}set time(t){t=we(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(te.now());const s=this.playbackSpeed!==t;this.playbackSpeed=t,s&&(this.time=ue(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=cl,startTime:s}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),this.options.onPlay?.();const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=s??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(te.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function El(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Oe=e=>e*180/Math.PI,Js=e=>{const t=Oe(Math.atan2(e[1],e[0]));return Qs(t)},jl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Js,rotateZ:Js,skewX:e=>Oe(Math.atan(e[1])),skewY:e=>Oe(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Qs=e=>(e=e%360,e<0&&(e+=360),e),Rr=Js,Or=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ir=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Pl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Or,scaleY:Ir,scale:e=>(Or(e)+Ir(e))/2,rotateX:e=>Qs(Oe(Math.atan2(e[6],e[5]))),rotateY:e=>Qs(Oe(Math.atan2(-e[2],e[0]))),rotateZ:Rr,rotate:Rr,skewX:e=>Oe(Math.atan(e[4])),skewY:e=>Oe(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Hs(e){return e.includes("scale")?1:0}function Xs(e,t){if(!e||e==="none")return Hs(t);const s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,r;if(s)n=Pl,r=s;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=jl,r=a}if(!r)return Hs(t);const o=n[t],i=r[1].split(",").map(Vl);return typeof o=="function"?o(i):i[o]}const Nl=(e,t)=>{const{transform:s="none"}=getComputedStyle(e);return Xs(s,t)};function Vl(e){return parseFloat(e.trim())}const He=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xe=new Set(He),_r=e=>e===Ge||e===S,Ml=new Set(["x","y","z"]),Dl=He.filter(e=>!Ml.has(e));function Fl(e){const t=[];return Dl.forEach(s=>{const n=e.getValue(s);n!==void 0&&(t.push([s,n.get()]),n.set(s.startsWith("scale")?1:0))}),t}const Me={width:({x:e},{paddingLeft:t="0",paddingRight:s="0"})=>e.max-e.min-parseFloat(t)-parseFloat(s),height:({y:e},{paddingTop:t="0",paddingBottom:s="0"})=>e.max-e.min-parseFloat(t)-parseFloat(s),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Xs(t,"x"),y:(e,{transform:t})=>Xs(t,"y")};Me.translateX=Me.x,Me.translateY=Me.y;const Ie=new Set;let Zs=!1,$s=!1,en=!1;function Wr(){if($s){const e=Array.from(Ie).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),s=new Map;t.forEach(n=>{const r=Fl(n);r.length&&(s.set(n,r),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const r=s.get(n);r&&r.forEach(([o,i])=>{n.getValue(o)?.set(i)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}$s=!1,Zs=!1,Ie.forEach(e=>e.complete(en)),Ie.clear()}function Ur(){Ie.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&($s=!0)})}function Ll(){en=!0,Ur(),Wr(),en=!1}class tn{constructor(t,s,n,r,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=s,this.name=n,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(Ie.add(this),Zs||(Zs=!0,_.read(Ur),_.resolveKeyframes(Wr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:s,element:n,motionValue:r}=this;if(t[0]===null){const o=r?.get(),i=t[t.length-1];if(o!==void 0)t[0]=o;else if(n&&s){const a=n.readValue(s,i);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=i),r&&o===void 0&&r.set(t[0])}El(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ie.delete(this)}cancel(){this.state==="scheduled"&&(Ie.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Bl=e=>e.startsWith("--");function Rl(e,t,s){Bl(t)?e.style.setProperty(t,s):e.style[t]=s}const Ol=Ss(()=>window.ScrollTimeline!==void 0),Il={};function _l(e,t){const s=Ss(e);return()=>Il[t]??s()}const qr=_l(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),kt=([e,t,s,n])=>`cubic-bezier(${e}, ${t}, ${s}, ${n})`,Kr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:kt([0,.65,.55,1]),circOut:kt([.55,0,1,.45]),backIn:kt([.31,.01,.66,-.59]),backOut:kt([.33,1.53,.69,.99])};function Yr(e,t){if(e)return typeof e=="function"?qr()?Dr(e,t):"ease-out":mr(e)?kt(e):Array.isArray(e)?e.map(s=>Yr(s,t)||Kr.easeOut):Kr[e]}function Wl(e,t,s,{delay:n=0,duration:r=300,repeat:o=0,repeatType:i="loop",ease:a="easeOut",times:c}={},d=void 0){const u={[t]:s};c&&(u.offset=c);const h=Yr(a,r);Array.isArray(h)&&(u.easing=h);const p={delay:n,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"};return d&&(p.pseudoElement=d),e.animate(u,p)}function zr(e){return typeof e=="function"&&"applyToOptions"in e}function Ul({type:e,...t}){return zr(e)&&qr()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class ql extends zs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:s,name:n,keyframes:r,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=t,Se(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=Ul(t);this.animation=Wl(s,n,r,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=Ys(r,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):Rl(s,n,u),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ue(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ue(t)}get time(){return ue(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=we(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Ol()?(this.animation.timeline=t,ce):s(this)}}const Gr={anticipate:dr,backInOut:ur,circInOut:fr};function Kl(e){return e in Gr}function Yl(e){typeof e.ease=="string"&&Kl(e.ease)&&(e.ease=Gr[e.ease])}const sn=10;class zl extends ql{constructor(t){Yl(t),Br(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:s,onUpdate:n,onComplete:r,element:o,...i}=this.options;if(!s)return;if(t!==void 0){s.set(t);return}const a=new Gs({...i,autoplay:!1}),c=Math.max(sn,te.now()-this.startTime),d=be(0,sn,c-sn);s.setWithVelocity(a.sample(Math.max(0,c-d)).value,a.sample(c).value,d),a.stop()}}const Jr=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ve.test(e)||e==="0")&&!e.startsWith("url("));function Gl(e){const t=e[0];if(e.length===1)return!0;for(let s=0;s<e.length;s++)if(e[s]!==t)return!0}function Jl(e,t,s,n){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=Jr(r,t),a=Jr(o,t);return ze(i===a,`You are trying to animate ${t} from "${r}" to "${o}". "${i?o:r}" is not an animatable value.`,"value-not-animatable"),!i||!a?!1:Gl(e)||(s==="spring"||zr(s))&&n}function nn(e){e.duration=0,e.type="keyframes"}const Ql=new Set(["opacity","clipPath","filter","transform"]),Hl=Ss(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Xl(e){const{motionValue:t,name:s,repeatDelay:n,repeatType:r,damping:o,type:i}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:d}=t.owner.getProps();return Hl()&&s&&Ql.has(s)&&(s!=="transform"||!d)&&!c&&!n&&r!=="mirror"&&o!==0&&i!=="inertia"}const Zl=40;class $l extends zs{constructor({autoplay:t=!0,delay:s=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",keyframes:a,name:c,motionValue:d,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=te.now();const p={autoplay:t,delay:s,type:n,repeat:r,repeatDelay:o,repeatType:i,name:c,motionValue:d,element:u,...h},m=u?.KeyframeResolver||tn;this.keyframeResolver=new m(a,(b,w,C)=>this.onKeyframesResolved(b,w,p,!C),c,d,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,s,n,r){this.keyframeResolver=void 0;const{name:o,type:i,velocity:a,delay:c,isHandoff:d,onUpdate:u}=n;this.resolvedAt=te.now(),Jl(t,o,i,a)||((Ee.instantAnimations||!c)&&u?.(Ys(t,n,s)),t[0]=t[t.length-1],nn(n),n.repeat=0);const p={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>Zl?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...n,keyframes:t},m=!d&&Xl(p)?new zl({...p,element:p.motionValue.owner.current}):new Gs(p);m.finished.then(()=>this.notifyFinished()).catch(ce),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,s){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ll()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const ec=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function tc(e){const t=ec.exec(e);if(!t)return[,];const[,s,n,r]=t;return[`--${s??n}`,r]}const sc=4;function Qr(e,t,s=1){Se(s<=sc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[n,r]=tc(e);if(!n)return;const o=window.getComputedStyle(t).getPropertyValue(n);if(o){const i=o.trim();return tr(i)?parseFloat(i):i}return Ms(r)?Qr(r,t,s+1):r}function rn(e,t){return e?.[t]??e?.default??e}const Hr=new Set(["width","height","top","left","right","bottom",...He]),nc={test:e=>e==="auto",parse:e=>e},Xr=e=>t=>t.test(e),Zr=[Ge,S,Ae,Ne,Ga,za,nc],$r=e=>Zr.find(Xr(e));function rc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||nr(e):!0}const ic=new Set(["brightness","contrast","saturate","opacity"]);function oc(e){const[t,s]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=s.match(Ds)||[];if(!n)return e;const r=s.replace(n,"");let o=ic.has(t)?1:0;return n!==s&&(o*=100),t+"("+o+r+")"}const ac=/\b([a-z-]*)\(.*?\)/gu,on={...Ve,getAnimatableNone:e=>{const t=e.match(ac);return t?t.map(oc).join(" "):e}},ei={...Ge,transform:Math.round},an={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,radius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,top:S,right:S,bottom:S,left:S,inset:S,insetBlock:S,insetBlockStart:S,insetBlockEnd:S,insetInline:S,insetInlineStart:S,insetInlineEnd:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,paddingBlock:S,paddingBlockStart:S,paddingBlockEnd:S,paddingInline:S,paddingInlineStart:S,paddingInlineEnd:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,marginBlock:S,marginBlockStart:S,marginBlockEnd:S,marginInline:S,marginInlineStart:S,marginInlineEnd:S,backgroundPositionX:S,backgroundPositionY:S,...{rotate:Ne,rotateX:Ne,rotateY:Ne,rotateZ:Ne,scale:Xt,scaleX:Xt,scaleY:Xt,scaleZ:Xt,skew:Ne,skewX:Ne,skewY:Ne,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:bt,originX:Cr,originY:Cr,originZ:S},zIndex:ei,fillOpacity:bt,strokeOpacity:bt,numOctaves:ei},lc={...an,color:J,backgroundColor:J,outlineColor:J,fill:J,stroke:J,borderColor:J,borderTopColor:J,borderRightColor:J,borderBottomColor:J,borderLeftColor:J,filter:on,WebkitFilter:on},ti=e=>lc[e];function si(e,t){let s=ti(e);return s!==on&&(s=Ve),s.getAnimatableNone?s.getAnimatableNone(t):void 0}const cc=new Set(["auto","none","0"]);function uc(e,t,s){let n=0,r;for(;n<e.length&&!r;){const o=e[n];typeof o=="string"&&!cc.has(o)&&Ct(o).values.length&&(r=e[n]),n++}if(r&&s)for(const o of t)e[o]=si(s,r)}class dc extends tn{constructor(t,s,n,r,o){super(t,s,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:s,name:n}=this;if(!s||!s.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let h=t[u];if(typeof h=="string"&&(h=h.trim(),Ms(h))){const p=Qr(h,s.current);p!==void 0&&(t[u]=p),u===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Hr.has(n)||t.length!==2)return;const[r,o]=t,i=$r(r),a=$r(o),c=wr(r),d=wr(o);if(c!==d&&Me[n]){this.needsMeasurement=!0;return}if(i!==a)if(_r(i)&&_r(a))for(let u=0;u<t.length;u++){const h=t[u];typeof h=="string"&&(t[u]=parseFloat(h))}else Me[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:s}=this,n=[];for(let r=0;r<t.length;r++)(t[r]===null||rc(t[r]))&&n.push(r);n.length&&uc(t,n,s)}measureInitialState(){const{element:t,unresolvedKeyframes:s,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Me[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s[0]=this.measuredOrigin;const r=s[s.length-1];r!==void 0&&t.getValue(n,r).jump(r,!1)}measureEndState(){const{element:t,name:s,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const r=t.getValue(s);r&&r.jump(this.measuredOrigin,!1);const o=n.length-1,i=n[o];n[o]=Me[s](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{t.getValue(a).set(c)}),this.resolveNoneKeyframes()}}function hc(e,t,s){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const r=s?.[e]??n.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}const ni=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ri(e){return sr(e)&&"offsetHeight"in e}const ii=30,fc=e=>!isNaN(parseFloat(e));class pc{constructor(t,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{const r=te.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=s.owner}setCurrent(t){this.current=t,this.updatedAt=te.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=fc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&js(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,s){this.events[t]||(this.events[t]=new Es);const n=this.events[t].add(s);return t==="change"?()=>{n(),_.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,s){this.passiveEffect=t,this.stopPassiveEffect=s}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,s,n){this.set(s),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,s=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=te.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ii)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,ii);return rr(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(t){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=t(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ze(e,t){return new pc(e,t)}const{schedule:ln}=xr(queueMicrotask,!1),ye={x:!1,y:!1};function oi(){return ye.x||ye.y}function mc(e){return e==="x"||e==="y"?ye[e]?null:(ye[e]=!0,()=>{ye[e]=!1}):ye.x||ye.y?null:(ye.x=ye.y=!0,()=>{ye.x=ye.y=!1})}function ai(e,t){const s=hc(e),n=new AbortController,r={passive:!0,...t,signal:n.signal};return[s,r,()=>n.abort()]}function li(e){return!(e.pointerType==="touch"||oi())}function gc(e,t,s={}){const[n,r,o]=ai(e,s),i=a=>{if(!li(a))return;const{target:c}=a,d=t(c,a);if(typeof d!="function"||!c)return;const u=h=>{li(h)&&(d(h),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,r)};return n.forEach(a=>{a.addEventListener("pointerenter",i,r)}),o}const ci=(e,t)=>t?e===t?!0:ci(e,t.parentElement):!1,cn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,yc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ui(e){return yc.has(e.tagName)||e.isContentEditable===!0}const ts=new WeakSet;function di(e){return t=>{t.key==="Enter"&&e(t)}}function un(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const xc=(e,t)=>{const s=e.currentTarget;if(!s)return;const n=di(()=>{if(ts.has(s))return;un(s,"down");const r=di(()=>{un(s,"up")}),o=()=>un(s,"cancel");s.addEventListener("keyup",r,t),s.addEventListener("blur",o,t)});s.addEventListener("keydown",n,t),s.addEventListener("blur",()=>s.removeEventListener("keydown",n),t)};function hi(e){return cn(e)&&!oi()}function vc(e,t,s={}){const[n,r,o]=ai(e,s),i=a=>{const c=a.currentTarget;if(!hi(a))return;ts.add(c);const d=t(c,a),u=(m,b)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",p),ts.has(c)&&ts.delete(c),hi(m)&&typeof d=="function"&&d(m,{success:b})},h=m=>{u(m,c===window||c===document||s.useGlobalTarget||ci(c,m.target))},p=m=>{u(m,!1)};window.addEventListener("pointerup",h,r),window.addEventListener("pointercancel",p,r)};return n.forEach(a=>{(s.useGlobalTarget?window:a).addEventListener("pointerdown",i,r),ri(a)&&(a.addEventListener("focus",d=>xc(d,r)),!ui(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function fi(e){return sr(e)&&"ownerSVGElement"in e}function bc(e){return fi(e)&&e.tagName==="svg"}const $=e=>!!(e&&e.getVelocity),wc=[...Zr,J,Ve],Ac=e=>wc.find(Xr(e)),dn=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function pi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Cc(...e){return t=>{let s=!1;const n=e.map(r=>{const o=pi(r,t);return!s&&typeof o=="function"&&(s=!0),o});if(s)return()=>{for(let r=0;r<n.length;r++){const o=n[r];typeof o=="function"?o():pi(e[r],null)}}}}function kc(...e){return Yt.useCallback(Cc(...e),e)}class Tc extends Yt.Component{getSnapshotBeforeUpdate(t){const s=this.props.childRef.current;if(s&&t.isPresent&&!this.props.isPresent){const n=s.offsetParent,r=ri(n)&&n.offsetWidth||0,o=this.props.sizeRef.current;o.height=s.offsetHeight||0,o.width=s.offsetWidth||0,o.top=s.offsetTop,o.left=s.offsetLeft,o.right=r-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Sc({children:e,isPresent:t,anchorX:s,root:n}){const r=g.useId(),o=g.useRef(null),i=g.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=g.useContext(dn),c=e.props?.ref??e?.ref,d=kc(o,c);return g.useInsertionEffect(()=>{const{width:u,height:h,top:p,left:m,right:b}=i.current;if(t||!o.current||!u||!h)return;const w=s==="left"?`left: ${m}`:`right: ${b}`;o.current.dataset.motionPopId=r;const C=document.createElement("style");a&&(C.nonce=a);const x=n??document.head;return x.appendChild(C),C.sheet&&C.sheet.insertRule(`
31
+ <%s key={someKey} {...props} />`,gn,Re,xh,Re),Ro[Re+gn]=!0}}return f===n?fh(Q):hh(Q),Q}}function ph(f,w,k){return Lo(f,w,k,!0)}function mh(f,w,k){return Lo(f,w,k,!1)}var gh=mh,yh=ph;et.Fragment=n,et.jsx=gh,et.jsxs=yh})()),et}var bn;function Ko(){return bn||(bn=1,process.env.NODE_ENV==="production"?Ct.exports=Wo():Ct.exports=qo()),Ct.exports}var l=Ko();const Yo={en:{translation:{assistant:{message:{logo:"Coco AI Logo",aiName:"Coco AI",thinkingButton:"View thinking process",steps:{query_intent:"Understand the query",tools:"Call LLM Tools",source_zero:"Searching for relevant documents",fetch_source:"Retrieve {{count}} documents",pick_source:"Intelligent pick {{count}} results",pick_source_start:"Intelligently pre-selecting",deep_read:"Deep reading",think:"AI is thinking...",thoughtTime:"Thought for a few seconds",keywords:"Keywords",questionType:"Query Type",userIntent:"User Intent",relatedQuestions:"Query",suggestion:"Suggestion",informationSeeking:"Information Seeking"}}},deepResearch:{status:{completedWithCount:"Deep research completed · Found {{count}} related results",completed:"Deep research completed",running:"Deep research in progress",preparing:"Preparing deep research"},button:{view:"View",download:"Download",share:"Share"},tab:{report:"Research Report",steps:"Research Steps",searchResults:"Search Results"},report:{generatingTitle:"Generating research report",generatingDescription:"Running a complete research workflow based on your question and compiling a structured report. It will appear here once ready.",defaultTitle:"Research Report"},steps:{intro:"I will collect and analyze information related to this topic, including its definition, use cases, market landscape and common questions. If it refers to a specific domain, I will further study its concrete applications and impact in that domain, and then report the results to you.",planTitle:"Plan research steps",planDescription:"I am planning a research workflow around this topic.",generatedPlans:"Generated plans",executeTitle:"Execute research plans",searching:"Searching",searchTitle:"Search sources",optimizePlan:"Optimize research plan",reportTitle:"Generate research report"}},sessionFiles:{labels:{all:"All"},modal:{title:"Files in the conversation",description:"Only the selected files will participate in the current conversation."}}}},zh:{translation:{assistant:{message:{logo:"Coco AI 图标",aiName:"Coco AI",thinkingButton:"查看思考过程",steps:{query_intent:"理解查询",tools:"调用大模型工具",source_zero:"正在搜索相关文档",fetch_source:"检索 {{count}} 份文档",pick_source:"智能预选 {{count}} 个结果",pick_source_start:"正在智能预选",deep_read:"深度阅读",think:"AI 正在思考...",thoughtTime:"思考了数秒",keywords:"关键词",questionType:"查询类型",userIntent:"用户意图",relatedQuestions:"查询",suggestion:"建议",informationSeeking:"信息查询"}}},deepResearch:{status:{completedWithCount:"深度研究完成 · 找到 {{count}} 条相关结果",completed:"深度研究完成",running:"正在执行深度研究",preparing:"正在准备深度研究"},button:{view:"查看",download:"下载",share:"分享"},tab:{report:"研究报告",steps:"研究步骤",searchResults:"搜索结果"},report:{generatingTitle:"研究报告生成中",generatingDescription:"我正在根据你的问题执行完整的研究流程,整理结构化的研究报告。研究完成后,报告会自动展示在这里。",defaultTitle:"研究报告"},steps:{intro:"将为你整理与该主题相关的信息,包括其定义、用途、市场情况以及常见问题。如果是指特定领域的主题,我还会进一步深入研究其在该领域的具体应用和影响。完成后我会向你汇报结果。",planTitle:"规划研究计划",planDescription:"我正在针对该主题,进行规划研究计划",generatedPlans:"生成的计划",executeTitle:"执行研究计划",searching:"正在搜索",searchTitle:"搜索资料",optimizePlan:"优化研究计划",reportTitle:"生成研究报告"}},sessionFiles:{labels:{all:"全部"},modal:{title:"会话中的文件",description:"只有选定的文件才会参与当前会话。"}}}}},wn=Bo.createInstance();wn.use(ce.initReactI18next).init({resources:Yo,lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1},react:{useSuspense:!1}});const zo="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='128px'%20height='128px'%20viewBox='0%200%20128%20128'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e画板备份%203%3c/title%3e%3cdefs%3e%3crect%20id='path-1'%20x='0'%20y='0'%20width='56.7563872'%20height='56.5910836'%3e%3c/rect%3e%3c/defs%3e%3cg%20id='画板备份-3'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='编组-10'%20transform='translate(-5,%203)'%3e%3cpath%20d='M49.6992377,22.7719612%20C58.1101609,25.9729736%2065.0982993,25.8953017%2070.6636528,22.5389454%20C76.9251416,26.1589087%2083.1644474,26.6306437%2089.3815702,23.9541503%20C94.3476152,26.8551486%20100.059595,27.9853608%20106.517509,27.3447869%20C105.549313,31.0257953%20104.78819,34.4219965%20104.234139,37.5333904%20C81.4253389,37.5754718%2069.9035445,37.5822249%2069.6687554,37.5536499%20C69.4339664,37.5250748%2062.9957895,35.2408431%2050.3542249,30.7009547%20L49.6992377,22.7719612%20Z'%20id='路径-3'%20stroke='%235B1602'%20stroke-width='7.69374265'%20fill='%23FFFFFF'%20stroke-linejoin='round'%20transform='translate(78.1084,%2030.055)%20rotate(8)%20translate(-78.1084,%20-30.055)'%3e%3c/path%3e%3cpolyline%20id='吸管'%20stroke='%2300DBFF'%20stroke-width='7.69374265'%20stroke-linecap='round'%20stroke-linejoin='round'%20transform='translate(94.5873,%2044.3095)%20rotate(8)%20translate(-94.5873,%20-44.3095)'%20points='69.7189682%2082.7157791%2094.9436643%2013.1617143%20119.455672%205.90320063'%3e%3c/polyline%3e%3cpath%20d='M28.5919021,37.2052044%20C35.1462633,34.1433307%2041.4986116,29.0645287%2047.648947,21.9687984%20C52.2899688,28.8461867%2058.8106823,31.3991807%2067.2110875,29.6277804%20C71.408497,35.0913641%2080.5237233,36.438679%2086.7804548,32.5606249%20C94.0739201,34.0827033%2099.969508,32.0763696%20104.467218,26.5416241%20C107.701536,33.3599985%20112.68013,39.7771777%20119.403001,45.7931616%20L122.450975,53.5823748%20L114.651272,66.2383977%20L48.9468343,66.658491%20L20.2297176,54.2394236%20L28.5919021,37.2052044%20Z'%20id='路径-2'%20stroke='%235B1602'%20stroke-width='7.69374265'%20fill='%23FFFFFF'%20stroke-linejoin='round'%20transform='translate(71.3403,%2044.3136)%20rotate(8)%20translate(-71.3403,%20-44.3136)'%3e%3c/path%3e%3cpath%20d='M113.7015,44.8147987%20C116.157193,49.6714382%20117.446928,55.630252%20117.446928,62.8127672%20C117.446928,77.2276123%20111.577947,90.2770579%20102.091381,99.7232825%20C92.5988687,109.175428%2079.4847008,115.020307%2065,115.020307%20C50.5152992,115.020307%2037.4011313,109.175428%2027.9086192,99.7232825%20C18.422053,90.2770579%2012.5530717,77.2276123%2012.5530717,62.8127672%20C12.5530717,56.4626483%2013.8289507,51.0821645%2016.1681126,46.5747014%20C17.316091,48.0863106%2018.6633413,49.4215856%2020.2147206,50.5328434%20C23.2818168,52.7298139%2027.1658894,54.0895553%2032.0119555,54.0895553%20C37.5035054,54.0895553%2042.5852688,52.6067922%2046.7606738,50.1072637%20C51.767509,52.6154402%2057.7465462,54.0895553%2064.1766873,54.0895553%20C70.5217766,54.0895553%2076.4277658,52.6542274%2081.3936205,50.2068646%20C85.4809466,52.6541473%2090.3819582,54.0895553%2095.6570631,54.0895553%20C101.044745,54.0895553%20105.465622,52.4873581%20108.935094,49.8692709%20C110.797344,48.4640036%20112.390496,46.7556533%20113.7015,44.8147987%20Z'%20id='形状结合'%20stroke='%235B1602'%20stroke-width='7.69374265'%20fill='%238C3201'%20transform='translate(65,%2077.9373)%20rotate(15)%20translate(-65,%20-77.9373)'%3e%3c/path%3e%3cg%20id='线'%20transform='translate(60.1411,%2097.2296)%20rotate(15)%20translate(-60.1411,%20-97.2296)translate(38.5104,%2076.2266)'%20fill='%235B1602'%3e%3cpath%20d='M41.2225105,-3.01584387%20C43.3464343,-2.96351324%2045.0257924,-1.19931046%2044.9734617,0.92461333%20C44.7662096,9.33627924%2043.0482281,16.8196882%2039.7969064,23.3391624%20C36.6036716,29.7421619%2032.6440639,35.1156647%2027.9160763,39.4350584%20C26.3475323,40.8680484%2023.9143082,40.7581602%2022.4813182,39.1896162%20C21.0483281,37.6210722%2021.1582163,35.1878481%2022.7267604,33.754858%20C26.7326835,30.0951278%2030.1283866,25.4868885%2032.9118625,19.9055277%20C35.6372515,14.4406416%2037.1015188,8.06239408%2037.2820533,0.73510735%20C37.3343839,-1.38881644%2039.0985867,-3.0681745%2041.2225105,-3.01584387%20Z'%20id='路径-5'%20fill-rule='nonzero'%20transform='translate(33.2246,%2018.7124)%20rotate(-7)%20translate(-33.2246,%20-18.7124)'%3e%3c/path%3e%3cpath%20d='M6.42487569,17.8933379%20C7.13185699,15.8898489%209.32912731,14.8388217%2011.3326163,15.545803%20C13.3361053,16.2527843%2014.3871325,18.4500547%2013.6801512,20.4535437%20C12.3896494,24.1106505%2011.1503014,26.9971555%209.93186972,29.1456361%20C8.855525,31.0435724%206.81922579,33.9549835%203.77060698,37.9798302%20C2.4878057,39.6734097%200.0749723254,40.0064113%20-1.61860721,38.72361%20C-3.31218674,37.4408088%20-3.64518832,35.0279754%20-2.36238705,33.3343959%20C0.49243929,29.5653978%202.37716504,26.8706998%203.23942508,25.3502625%20C4.20071135,23.6552106%205.27260735,21.1587099%206.42487569,17.8933379%20Z'%20id='路径-5备份'%20fill-rule='nonzero'%20transform='translate(5.3787,%2027.4149)%20scale(-1,%201)%20rotate(-5)%20translate(-5.3787,%20-27.4149)'%3e%3c/path%3e%3cpath%20d='M17.3200105,31.8134059%20C24.2042447,31.6746843%2030.788371,26.5487636%2037.0723895,16.4356439%20C43.356408,6.32252418%2040.2906703,13.3246347%2027.8751764,37.4419755%20L17.3200105,31.8134059%20Z'%20id='路径-8'%20transform='translate(28.78,%2024.6979)%20rotate(-15)%20translate(-28.78,%20-24.6979)'%3e%3c/path%3e%3cpath%20d='M2.25547257,26.2454347%20C5.78878997,32.5137001%2012.2314539,33.0051199%2021.5834643,27.7196939%20C18.6128112,31.1984141%2014.8144813,34.3358838%2010.1884745,37.1321031%20C6.83289255,33.8641134%204.51390502,31.3598101%203.23151188,29.6191934%20C1.94911874,27.8785768%201.6237723,26.7539905%202.25547257,26.2454347%20Z'%20id='路径-8'%20transform='translate(11.7631,%2031.6888)%20scale(-1,%201)%20rotate(-38)%20translate(-11.7631,%20-31.6888)'%3e%3c/path%3e%3c/g%3e%3cg%20id='花'%20transform='translate(16.0836,%200)'%3e%3cmask%20id='mask-2'%20fill='white'%3e%3cuse%20xlink:href='%23path-1'%3e%3c/use%3e%3c/mask%3e%3cg%20id='蒙版'%3e%3c/g%3e%3cimage%20mask='url(%23mask-2)'%20x='-24.9033127'%20y='-24.2533216'%20width='105.404719'%20height='105.097727'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALYAAAC2CAYAAAB08HcEAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAtqADAAQAAAABAAAAtgAAAAD4K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='%3e%3c/image%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e";function kt({size:e=18,children:t,className:s,title:n,onClick:r,action:i=!1,...o}){const a=c=>{r?.(c)};return l.jsx("i",{style:{width:e,height:e},title:n,onClick:a,className:Le("inline-flex items-center justify-center rounded-sm p-[2px] transition-all",{"cursor-pointer":i},s),children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:"100%",height:"100%"},...o,children:t})})}function Go(e){return l.jsx(kt,{...e,viewBox:"0 0 16 16",children:l.jsx("g",{id:"Understand",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsxs("g",{id:"编组",transform:"translate(0.5, 0.5)",stroke:"currentColor",strokeWidth:"1.25",children:[l.jsx("path",{d:"M7.44444444,3 C9.89904333,3 11.8888889,4.95366655 11.8888889,7.36363636 C11.8888889,9.06711551 10.8946979,10.5426108 9.44492275,11.2613085 L9.44444444,12.2727273 C9.44444444,13.3772968 8.54901394,14.2727273 7.44444444,14.2727273 C6.33987494,14.2727273 5.44444444,13.3772968 5.44444444,12.2727273 L5.44396614,11.2613085 C3.99419095,10.5426108 3,9.06711551 3,7.36363636 C3,4.95366655 4.98984556,3 7.44444444,3 Z",id:"形状结合"}),l.jsx("line",{x1:"5.5",y1:"11.2156017",x2:"9.5",y2:"11.2156017",id:"路径-11"}),l.jsx("line",{x1:"7.44444444",y1:"10.6363636",x2:"7.44444444",y2:"8.45454545",id:"路径-12"}),l.jsx("line",{x1:"7.44444444",y1:"0.818181818",x2:"7.44444444",y2:"0.272727273",id:"路径-12备份"}),l.jsx("line",{x1:"12.352383",y1:"2.81770629",x2:"12.3574335",y2:"2.26720124",id:"路径-12备份",transform:"translate(12.3549, 2.5425) rotate(45) translate(-12.3549, -2.5425)"}),l.jsx("line",{x1:"14.3888889",y1:"7.64141414",x2:"14.3888889",y2:"7.08585859",id:"路径-12备份",transform:"translate(14.3889, 7.3636) rotate(90) translate(-14.3889, -7.3636)"}),l.jsx("line",{x1:"12.3574335",y1:"12.4600715",x2:"12.352383",y2:"11.9095664",id:"路径-12备份",transform:"translate(12.3549, 12.1848) rotate(135) translate(-12.3549, -12.1848)"}),l.jsx("line",{x1:"2.53145543",y1:"12.4600715",x2:"2.53650594",y2:"11.9095664",id:"路径-12备份",transform:"translate(2.534, 12.1848) rotate(225) translate(-2.534, -12.1848)"}),l.jsx("line",{x1:"0.5",y1:"7.64141414",x2:"0.5",y2:"7.08585859",id:"路径-12备份",transform:"translate(0.5, 7.3636) rotate(270) translate(-0.5, -7.3636)"}),l.jsx("line",{x1:"2.53650594",y1:"2.81770629",x2:"2.53145543",y2:"2.26720124",id:"路径-12备份",transform:"translate(2.534, 2.5425) rotate(315) translate(-2.534, -2.5425)"}),l.jsx("polyline",{id:"路径-15",transform:"translate(7.4398, 6.7308) rotate(-45) translate(-7.4398, -6.7308)",points:"6.33632897 5.60310185 6.3568375 7.83853192 8.5432888 7.85859111"})]})})})}const Jo=({Detail:e,ChunkData:t,getSuggestion:s,loading:n})=>{const{t:r}=ce.useTranslation(),[i,o]=g.useState(!1),[a,c]=g.useState(null),d=g.useRef(s);return g.useEffect(()=>{d.current=s},[s]),g.useEffect(()=>{e?.payload&&(c(e?.payload),e?.payload?.suggestion&&d.current&&d.current(e?.payload?.suggestion))},[e?.payload]),g.useEffect(()=>{if(t?.message_chunk&&!n)try{const h=t.message_chunk.replace(/^"|"$/g,"").match(/<JSON>([\s\S]*?)<\/JSON>/g);if(h){const m=h[h.length-1].replace(/<JSON>|<\/JSON>/g,""),v=JSON.parse(m);v?.suggestion&&d.current&&d.current(v?.suggestion),c(v)}}catch(u){console.error("Failed to process message chunk in QueryIntent:",u)}},[t?.message_chunk,n]),!t&&!e?null:l.jsxs("div",{className:"space-y-2 mb-3 w-full",children:[l.jsxs("button",{onClick:()=>o(u=>!u),className:"inline-flex items-center gap-2 px-2 py-1 rounded-xl transition-colors border border-[#E6E6E6] dark:border-[#272626]",children:[n?l.jsxs(l.Fragment,{children:[l.jsx(j.Loader,{className:"w-4 h-4 animate-spin text-[#1990FF]"}),l.jsx("span",{className:"text-xs text-[#999999] italic",children:r(`assistant.message.steps.${t?.chunk_type||e.type}`)})]}):l.jsxs(l.Fragment,{children:[l.jsx(Go,{className:"w-4 h-4 text-[#38C200]"}),l.jsx("span",{className:"text-xs text-[#999999]",children:r(`assistant.message.steps.${t?.chunk_type||e.type}`)})]}),i?l.jsx(j.ChevronUp,{className:"w-4 h-4"}):l.jsx(j.ChevronDown,{className:"w-4 h-4"})]}),i&&l.jsx("div",{className:"pl-2 pt-1 border-l-2 border-[#e5e5e5] dark:border-[#4e4e56]",children:l.jsx("div",{className:"text-[#8b8b8b] dark:text-[#a6a6a6] space-y-2",children:l.jsxs("div",{className:"mb-4 space-y-2 text-xs",children:[a?.keyword?l.jsxs("div",{className:"flex gap-1",children:[l.jsxs("span",{className:"text-[#999999]",children:["- ",r("assistant.message.steps.keywords"),":"]}),l.jsx("div",{className:"flex flex-wrap gap-1",children:a?.keyword?.map((u,h)=>l.jsxs("span",{className:"text-[#333333] dark:text-[#D8D8D8]",children:[u,h<2&&"、"]},u+h))})]}):null,a?.category?l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsxs("span",{className:"text-[#999999]",children:["- ",r("assistant.message.steps.questionType"),":"]}),l.jsx("span",{className:"text-[#333333] dark:text-[#D8D8D8]",children:a?.category})]}):null,a?.intent?l.jsxs("div",{className:"flex items-start gap-1",children:[l.jsxs("span",{className:"text-[#999999]",children:["- ",r("assistant.message.steps.userIntent"),":"]}),l.jsx("div",{className:"flex-1 text-[#333333] dark:text-[#D8D8D8]",children:a?.intent})]}):null,a?.query?l.jsxs("div",{className:"flex items-start gap-1",children:[l.jsxs("span",{className:"text-[#999999]",children:["- ",r("assistant.message.steps.relatedQuestions"),":"]}),l.jsx("div",{className:"flex-1 flex flex-col text-[#333333] dark:text-[#D8D8D8]",children:a?.query?.map((u,h)=>l.jsxs("span",{children:["- ",u]},u+h))})]}):null]})})})]})},Qo=({Detail:e,ChunkData:t,loading:s})=>{const{t:n}=ce.useTranslation(),[r,i]=g.useState(!1),[o,a]=g.useState("");return g.useEffect(()=>{e?.description&&a(e?.description)},[e?.description]),g.useEffect(()=>{t?.message_chunk&&a(t?.message_chunk)},[t?.message_chunk,o]),!t&&!e?null:l.jsxs("div",{className:"space-y-2 mb-3 w-full",children:[l.jsxs("button",{onClick:()=>i(c=>!c),className:"inline-flex items-center gap-2 px-2 py-1 rounded-xl transition-colors border border-[#E6E6E6] dark:border-[#272626]",children:[s?l.jsxs(l.Fragment,{children:[l.jsx(j.Loader,{className:"w-4 h-4 animate-spin text-[#1990FF]"}),l.jsx("span",{className:"text-xs text-[#999999] italic",children:n(`assistant.message.steps.${t?.chunk_type}`)})]}):l.jsxs(l.Fragment,{children:[l.jsx(j.Hammer,{className:"w-4 h-4 text-[#38C200]"}),l.jsx("span",{className:"text-xs text-[#999999]",children:n(`assistant.message.steps.${t?.chunk_type}`)})]}),r?l.jsx(j.ChevronUp,{className:"w-4 h-4"}):l.jsx(j.ChevronDown,{className:"w-4 h-4"})]}),r&&l.jsx("div",{className:"pl-2 pt-1 border-l-2 border-[#e5e5e5] dark:border-[#4e4e56]",children:l.jsx("div",{className:"text-[#8b8b8b] dark:text-[#a6a6a6] space-y-2 cm-markdown",children:l.jsx(wt,{content:o||""})})})]})},An=async e=>{navigator.clipboard?await navigator.clipboard.writeText(e):console.log("Clipboard not available",e)},Ho=e=>{window.open(e,"_blank")},Cn=e=>{try{const t=new Date(e),s=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0"),i=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0"),a=String(t.getSeconds()).padStart(2,"0");return`${s}-${n}-${r} ${i}:${o}:${a}`}catch(t){return console.error(t),String(e)}};function Xo(e){return l.jsx(kt,{...e,viewBox:"0 0 16 16",children:l.jsxs("g",{id:"Retrieve",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"10.8977456",y1:"14.5",x2:"14",y2:"10.9204757",id:"路径",stroke:"currentColor",strokeWidth:"1.25",transform:"translate(12.4489, 12.7102) scale(-1, 1) translate(-12.4489, -12.7102)"}),l.jsx("circle",{id:"椭圆形",stroke:"currentColor",strokeWidth:"1.25",transform:"translate(7.5, 7) scale(-1, 1) translate(-7.5, -7)",cx:"7.5",cy:"7",r:"5"})]})})}const Zo=({Detail:e,ChunkData:t,loading:s,formatUrl:n})=>{const{t:r}=ce.useTranslation(),[i,o]=g.useState(!1),[a,c]=g.useState(0),[d,u]=g.useState([]);g.useEffect(()=>{e?.payload&&(u(e?.payload),c(e?.payload.length))},[e?.payload]),g.useEffect(()=>{if(t?.message_chunk&&!s)try{const p=t.message_chunk.match(/<Payload total=(\d+)>/);p&&c(Number(p[1]));const m=t.message_chunk.match(/\[([\s\S]*)\]/);if(m){const v=JSON.parse(m[0]);u(v)}}catch(p){console.error("Failed to parse fetch source data:",p)}},[t?.message_chunk,s]);const h=p=>()=>{const m=n&&n(p)||p.url;m&&Ho(m)};return!t&&!e?null:l.jsxs("div",{className:`mt-2 mb-2 max-w-full w-full md:w-[610px] ${i?"rounded-lg overflow-hidden border border-[#E6E6E6] dark:border-[#272626]":""}`,children:[l.jsxs("button",{onClick:()=>o(p=>!p),className:`inline-flex justify-between items-center gap-2 px-2 py-1 rounded-xl transition-colors whitespace-nowrap ${i?"w-full":"border border-[#E6E6E6] dark:border-[#272626]"}`,children:[l.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[l.jsx(Xo,{className:"w-4 h-4 text-[#38C200] shrink-0"}),l.jsx("span",{className:"text-xs text-[#999999]",children:r(`assistant.message.steps.${t?.chunk_type||e.type}`,{count:Number(a)})})]}),i?l.jsx(j.ChevronUp,{className:"w-4 h-4 text-[#999999]"}):l.jsx(j.ChevronDown,{className:"w-4 h-4 text-[#999999]"})]}),i&&l.jsx(l.Fragment,{children:d?.map((p,m)=>l.jsx("div",{onClick:h(p),className:"group flex items-center p-2 hover:bg-[#F7F7F7] dark:hover:bg-[#2C2C2C] border-b border-[#E6E6E6] dark:border-[#272626] last:border-b-0 cursor-pointer transition-colors",children:l.jsxs("div",{className:"w-full flex items-center gap-2",children:[l.jsxs("div",{className:"w-[75%] mobile:w-full flex items-center gap-1",children:[l.jsx(j.Globe,{className:"w-3 h-3 shrink-0"}),l.jsx("div",{className:"text-xs text-[#333333] dark:text-[#D8D8D8] truncate font-normal group-hover:text-[#0072FF] dark:group-hover:text-[#0072FF]",children:p.title||p.category})]}),l.jsxs("div",{className:"flex-1 mobile:hidden flex items-center justify-end gap-2",children:[l.jsx("span",{className:"text-xs text-[#999999] dark:text-[#999999] truncate",children:p.source?.name||p?.category}),l.jsx(j.SquareArrowOutUpRight,{className:"w-3 h-3 text-[#999999] dark:text-[#999999] shrink-0"})]})]})},m))})]})};function $o(e){return l.jsx(kt,{...e,viewBox:"0 0 16 16",children:l.jsx("g",{id:"selection",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:l.jsxs("g",{id:"编组",transform:"translate(1.4813, 1)",stroke:"currentColor",strokeWidth:"1.25",children:[l.jsx("line",{x1:"6.7986538",y1:"2.8",x2:"6.7986538",y2:"2.07241631e-17",id:"路径",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("circle",{id:"椭圆形",fill:"#000000",cx:"6.7986538",cy:"6.72",r:"1"}),l.jsx("line",{x1:"2.17440858e-17",y1:"13.5186538",x2:"4.62042688",y2:"8.89822692",id:"路径",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("line",{x1:"10.1008425",y1:"4.16781133",x2:"10.1008425",y2:"2.66781133",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(10.1008, 3.4178) rotate(45) translate(-10.1008, -3.4178)"}),l.jsx("line",{x1:"12.1186538",y1:"8.12",x2:"12.1186538",y2:"5.32",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(12.1187, 6.72) rotate(90) translate(-12.1187, -6.72)"}),l.jsx("line",{x1:"10.1008425",y1:"10.7721887",x2:"10.1008425",y2:"9.27218867",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(10.1008, 10.0222) rotate(135) translate(-10.1008, -10.0222)"}),l.jsx("line",{x1:"6.7986538",y1:"13.44",x2:"6.7986538",y2:"10.64",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(6.7987, 12.04) rotate(180) translate(-6.7987, -12.04)"}),l.jsx("line",{x1:"1.4786538",y1:"8.12",x2:"1.4786538",y2:"5.32",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(1.4787, 6.72) rotate(270) translate(-1.4787, -6.72)"}),l.jsx("line",{x1:"3.49646513",y1:"4.16781133",x2:"3.49646513",y2:"2.66781133",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(3.4965, 3.4178) rotate(315) translate(-3.4965, -3.4178)"})]})})})}const ea=({Detail:e,ChunkData:t,loading:s})=>{const{t:n}=ce.useTranslation(),[r,i]=g.useState(!1),[o,a]=g.useState([]);return g.useEffect(()=>{e?.payload&&a(e?.payload)},[e?.payload]),g.useEffect(()=>{if(t?.message_chunk&&!s)try{const d=t.message_chunk.replace(/^"|"$/g,"").match(/<JSON>([\s\S]*?)<\/JSON>/g);if(d)for(let u=d.length-1;u>=0;u--)try{const h=d[u].replace(/<JSON>|<\/JSON>|<think>|<\/think>/g,""),p=JSON.parse(h.trim());if(Array.isArray(p)&&p.every(m=>m.id&&m.title&&m.explain)){a(p);break}}catch{continue}}catch(c){console.error("Failed to parse pick source data:",c)}},[t?.message_chunk,s]),!t&&!e?null:l.jsxs("div",{className:"space-y-2 mb-3 w-full",children:[l.jsxs("button",{onClick:()=>i(c=>!c),className:"inline-flex items-center gap-2 px-2 py-1 rounded-xl transition-colors border border-[#E6E6E6] dark:border-[#272626]",children:[s?l.jsxs(l.Fragment,{children:[l.jsx(j.Loader,{className:"w-4 h-4 animate-spin text-[#1990FF]"}),l.jsx("span",{className:"text-xs text-[#999999] italic",children:n("assistant.message.steps.pick_source_start")})]}):l.jsxs(l.Fragment,{children:[l.jsx($o,{className:"w-4 h-4 text-[#38C200]"}),l.jsx("span",{className:"text-xs text-[#999999]",children:n(`assistant.message.steps.${t?.chunk_type||e.type}`,{count:o?.length})})]}),r?l.jsx(j.ChevronUp,{className:"w-4 h-4"}):l.jsx(j.ChevronDown,{className:"w-4 h-4"})]}),r&&l.jsx("div",{className:"pl-2 pt-1 border-l-2 border-[#e5e5e5] dark:border-[#4e4e56]",children:l.jsx("div",{className:"text-[#8b8b8b] dark:text-[#a6a6a6] space-y-2",children:l.jsx("div",{className:"mb-4 space-y-3 text-xs",children:o?.map(c=>l.jsx("div",{className:"p-3 rounded-lg border border-[#E6E6E6] dark:border-[#272626] bg-white dark:bg-[#1E1E1E] hover:bg-gray-50 dark:hover:bg-[#2C2C2C] transition-colors",children:l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsx("div",{className:"text-sm font-medium text-[#333333] dark:text-[#D8D8D8]",children:c.title}),l.jsx("div",{className:"text-xs text-[#666666] dark:text-[#A3A3A3] line-clamp-2",children:c.explain})]})},c.id))})})})]})};function ta(e){return l.jsx(kt,{...e,viewBox:"0 0 16 16",children:l.jsxs("g",{id:"deading",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[l.jsx("circle",{id:"椭圆形",stroke:"currentColor",strokeWidth:"1.25",cx:"8",cy:"3",r:"1.375"}),l.jsx("circle",{id:"椭圆形备份-2",stroke:"currentColor",strokeWidth:"1.25",cx:"3",cy:"5",r:"1.375"}),l.jsx("circle",{id:"椭圆形备份-4",stroke:"currentColor",strokeWidth:"1.25",cx:"13",cy:"5",r:"1.375"}),l.jsx("circle",{id:"椭圆形备份",stroke:"currentColor",strokeWidth:"1.25",cx:"8",cy:"13",r:"1.375"}),l.jsx("circle",{id:"椭圆形备份-3",stroke:"currentColor",strokeWidth:"1.25",cx:"3",cy:"11",r:"1.375"}),l.jsx("circle",{id:"椭圆形备份-5",stroke:"currentColor",strokeWidth:"1.25",cx:"13",cy:"11",r:"1.375"}),l.jsx("path",{d:"M8.0070039,4.03345364 L8.0070039,8.50590493 L4.1923477,10.2855921",id:"路径-13",stroke:"currentColor",strokeWidth:"1.25"}),l.jsx("line",{x1:"11.7924093",y1:"8.47550067",x2:"8",y2:"10.2754456",id:"路径-13备份",stroke:"currentColor",strokeWidth:"1.25",transform:"translate(9.8962, 9.3755) scale(-1, 1) translate(-9.8962, -9.3755)"}),l.jsx("path",{d:"M4.17568738,4.53038288 L6.65384701,3.54050563 M9.35480875,3.53987819 L11.7283558,4.49062879",id:"形状",stroke:"currentColor",strokeWidth:"1.25"}),l.jsx("line",{x1:"3",y1:"6.06946104",x2:"3",y2:"9.97988046",id:"路径-14",stroke:"currentColor",strokeWidth:"1.25"}),l.jsx("line",{x1:"13",y1:"6.06946104",x2:"13",y2:"9.97988046",id:"路径-14备份",stroke:"currentColor",strokeWidth:"1.25"})]})})}const sa=({Detail:e,ChunkData:t,loading:s})=>{const{t:n}=ce.useTranslation(),[r,i]=g.useState(!1),[o,a]=g.useState([]),[c,d]=g.useState("");return g.useEffect(()=>{e?.description&&d(e?.description)},[e?.description]),g.useEffect(()=>{if(t?.message_chunk)try{if(t.message_chunk.includes("&")){const u=t.message_chunk.split("&").filter(Boolean);a(u)}else a([t.message_chunk])}catch(u){console.error("Failed to parse query data:",u)}},[t?.message_chunk]),!t&&!e?null:l.jsxs("div",{className:"space-y-2 mb-3 w-full",children:[l.jsxs("button",{onClick:()=>i(u=>!u),className:"inline-flex items-center gap-2 px-2 py-1 rounded-xl transition-colors border border-[#E6E6E6] dark:border-[#272626]",children:[s?l.jsxs(l.Fragment,{children:[l.jsx(j.Loader,{className:"w-4 h-4 animate-spin text-[#1990FF]"}),l.jsx("span",{className:"text-xs text-[#999999] italic",children:n(`assistant.message.steps.${t?.chunk_type||e?.type}`)})]}):l.jsxs(l.Fragment,{children:[l.jsx(ta,{className:"w-4 h-4 text-[#38C200]"}),l.jsx("span",{className:"text-xs text-[#999999]",children:n(`assistant.message.steps.${t?.chunk_type||e?.type}`,{count:Number(o.length)})})]}),r?l.jsx(j.ChevronUp,{className:"w-4 h-4"}):l.jsx(j.ChevronDown,{className:"w-4 h-4"})]}),r&&l.jsx("div",{className:"pl-2 pt-1 border-l-2 border-[#e5e5e5] dark:border-[#4e4e56]",children:l.jsx("div",{className:"text-[#8b8b8b] dark:text-[#a6a6a6] space-y-2",children:l.jsxs("div",{className:"mb-4 space-y-3 text-xs",children:[o?.map((u,h)=>l.jsx("div",{className:"flex flex-col gap-2",children:l.jsxs("div",{className:"text-xs text-[#999999] dark:text-[#808080]",children:["- ",u]})},`${u}-${h}`)),c?.split(`
32
+ `).map((u,h)=>u.trim()&&l.jsx("p",{className:"text-sm",children:u},h))]})})})]})},na=({Detail:e,ChunkData:t,loading:s})=>{const{t:n}=ce.useTranslation(),[r,i]=g.useState(!0),[o,a]=g.useState("");return g.useEffect(()=>{e?.description&&a(e?.description)},[e?.description]),g.useEffect(()=>{t?.message_chunk&&a(t?.message_chunk)},[t?.message_chunk,o]),!t&&!e?null:l.jsxs("div",{className:"space-y-2 mb-3 w-full",children:[l.jsxs("button",{onClick:()=>i(c=>!c),className:"inline-flex items-center gap-2 px-2 py-1 rounded-xl transition-colors border border-[#E6E6E6] dark:border-[#272626]",children:[s?l.jsxs(l.Fragment,{children:[l.jsx(j.Loader,{className:"w-4 h-4 animate-spin text-[#1990FF]"}),l.jsx("span",{className:"text-xs text-[#999999] italic",children:n(`assistant.message.steps.${t?.chunk_type}`)})]}):l.jsxs(l.Fragment,{children:[l.jsx(j.Brain,{className:"w-4 h-4 text-[#38C200]"}),l.jsx("span",{className:"text-xs text-[#999999]",children:n("assistant.message.steps.thoughtTime")})]}),r?l.jsx(j.ChevronUp,{className:"w-4 h-4"}):l.jsx(j.ChevronDown,{className:"w-4 h-4"})]}),r&&l.jsx("div",{className:"pl-2 pt-1 border-l-2 border-[#e5e5e5] dark:border-[#4e4e56]",children:l.jsx("div",{className:"text-[#8b8b8b] dark:text-[#a6a6a6] space-y-2",children:o?.split(`
33
+ `).map((c,d)=>c.trim()&&l.jsx("p",{className:"text-sm",children:c},d))})})]})},ra=["timedout","error"],ia=({id:e,content:t,question:s,actionClassName:n,actionIconSize:r,copyButtonId:i,onResend:o})=>{const[a,c]=g.useState(!1),[d,u]=g.useState(!1),[h,p]=g.useState(!1),[m,v]=g.useState(!1),[A,C]=g.useState(!1),y=ra.includes(e),b=async()=>{try{await An(t),c(!0);const E=setTimeout(()=>{c(!1),clearTimeout(E)},2e3)}catch(E){console.error("copy error:",E)}},x=()=>{u(!d),p(!1)},N=()=>{p(!h),u(!1)},P=async()=>{if("speechSynthesis"in window){if(m){window.speechSynthesis.cancel(),v(!1);return}const E=new SpeechSynthesisUtterance(t);E.lang="zh-CN",E.onend=()=>{v(!1)},v(!0),window.speechSynthesis.speak(E)}},D=()=>{if(o){C(!0),o();const E=setTimeout(()=>{C(!1),clearTimeout(E)},1e3)}};return l.jsxs("div",{className:Le("flex items-center gap-2 mt-2",n),children:[!y&&l.jsx("button",{id:i,onClick:b,className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors",children:a?l.jsx(j.Check,{className:"w-4 h-4 text-[#38C200] dark:text-[#38C200]",style:{width:r,height:r}}):l.jsx(j.Copy,{className:"w-4 h-4 text-[#666666] dark:text-[#A3A3A3]",style:{width:r,height:r}})}),!y&&l.jsx("button",{onClick:x,className:`p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors ${d?"animate-shake":""}`,children:l.jsx(j.ThumbsUp,{className:`w-4 h-4 ${d?"text-[#1990FF] dark:text-[#1990FF]":"text-[#666666] dark:text-[#A3A3A3]"}`,style:{width:r,height:r}})}),!y&&l.jsx("button",{onClick:N,className:`p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors ${h?"animate-shake":""}`,children:l.jsx(j.ThumbsDown,{className:`w-4 h-4 ${h?"text-[#1990FF] dark:text-[#1990FF]":"text-[#666666] dark:text-[#A3A3A3]"}`,style:{width:r,height:r}})}),!y&&l.jsx(l.Fragment,{children:l.jsx("button",{onClick:P,className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors",children:l.jsx(j.Volume2,{className:`w-4 h-4 ${m?"text-[#1990FF] dark:text-[#1990FF]":"text-[#666666] dark:text-[#A3A3A3]"}`,style:{width:r,height:r}})})}),s&&l.jsx("button",{onClick:D,className:`p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors ${A?"animate-spin":""}`,children:l.jsx(j.RotateCcw,{className:`w-4 h-4 ${A?"text-[#1990FF] dark:text-[#1990FF]":"text-[#666666] dark:text-[#A3A3A3]"}`,style:{width:r,height:r}})})]})};function oa({suggestions:e,onSelect:t}){return!e||e.length===0?null:l.jsx("div",{className:"mt-4 flex flex-col gap-2",children:e.map((s,n)=>l.jsxs("button",{onClick:()=>t(s),className:"text-left inline-flex items-center px-3 py-1.5 rounded-full bg-[#F5F5F5] dark:bg-[#2A2A2A] border border-[#E4E5EF] dark:border-[#3A3A3A] text-sm text-[#333333] dark:text-white hover:bg-[#EDEDED] dark:hover:bg-[#3A3A3A] transition-colors w-fit max-w-full wrap-break-word whitespace-pre-wrap",children:[l.jsx("span",{className:"break-all",children:s}),l.jsx(j.MoveRight,{className:"w-3 h-3 ml-1.5 shrink-0"})]},n))})}const aa=({textToCopy:e})=>{const[t,s]=g.useState(!1),n=async()=>{try{await An(e),s(!0);const r=setTimeout(()=>{s(!1),clearTimeout(r)},2e3)}catch(r){console.error("copy error:",r)}};return l.jsx("button",{className:"p-1 bg-gray-200 dark:bg-gray-700 rounded",onClick:n,children:t?l.jsx(j.Check,{className:"w-4 h-4 text-[#38C200] dark:text-[#38C200]"}):l.jsx(j.Copy,{className:"w-4 h-4 text-gray-600 dark:text-gray-300"})})},la=e=>{const{message:t,attachments:s}=e,[n,r]=g.useState(!1),[i,o]=g.useState([]),a=c=>{if(typeof window<"u"&&typeof document<"u"){const d=window.getSelection(),u=document.createRange();if(c.currentTarget&&d&&u)try{u.selectNodeContents(c.currentTarget),d.removeAllRanges(),d.addRange(u)}catch(h){console.error("Selection failed:",h)}}};return Oo.useAsyncEffect(async()=>{try{if(s.length===0)return;o({}?.hits?.hits)}catch(c){console.error("Get attachment failed:",String(c))}},[s]),l.jsxs(l.Fragment,{children:[t&&l.jsxs("div",{className:"flex gap-1 items-center justify-end",onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:[l.jsx("div",{className:Le("size-6 transition",{"opacity-0":!n}),children:l.jsx(aa,{textToCopy:t})}),l.jsx("div",{className:"max-w-[85%] overflow-auto text-left px-3 py-2 bg-white dark:bg-[#202126]! rounded-xl border border-black/12 dark:border-black/15 font-normal text-sm text-[#333333] dark:text-white cursor-pointer user-select-text whitespace-pre-wrap",onDoubleClick:a,children:t})]}),i&&i.length>0&&l.jsx("div",{className:Le("w-full",{"mt-3":t}),children:l.jsx(Io.Attachments,{data:i.map(c=>({id:c._source.id,filename:c._source.name,extname:c._source.icon,size:c._source.size,status:"uploaded"})),className:"text-left"})})]})},ca=({name:e,className:t,style:s,...n})=>l.jsx("svg",{className:`icon dark:drop-shadow-[0_0_6px_rgb(255,255,255)] ${t||""}`,style:s,...n,children:l.jsx("use",{xlinkHref:`#${e}`})});function ua(){const[e,t]=g.useState(),[s,n]=g.useState(),[r,i]=g.useState(),[o,a]=g.useState(),[c,d]=g.useState(),[u,h]=g.useState(),[p,m]=g.useState(),[v,A]=g.useState([]),C={deal_query_intent:g.useCallback(b=>{t(x=>x?{...x,message_chunk:(x.message_chunk||"")+(b.message_chunk||"")}:b)},[]),deal_tools:g.useCallback(b=>{n(x=>x?{...x,message_chunk:(x.message_chunk||"")+(b.message_chunk||"")}:b)},[]),deal_fetch_source:g.useCallback(b=>{i(x=>x?{...x,message_chunk:(x.message_chunk||"")+(b.message_chunk||"")}:b)},[]),deal_pick_source:g.useCallback(b=>{a(x=>x?{...x,message_chunk:(x.message_chunk||"")+(b.message_chunk||"")}:b)},[]),deal_deep_read:g.useCallback(b=>{d(x=>x?{...x,message_chunk:(x.message_chunk||"")+"&"+(b.message_chunk||"")}:b)},[]),deal_think:g.useCallback(b=>{h(x=>x?{...x,message_chunk:(x.message_chunk||"")+(b.message_chunk||"")}:b)},[]),deal_response:g.useCallback(b=>{m(x=>x?{...x,message_chunk:(x.message_chunk||"")+(b.message_chunk||"")}:b)},[]),deal_deep_research:g.useCallback(b=>{A(x=>[...x,b])},[])};return{data:{query_intent:e,tools:s,fetch_source:r,pick_source:o,deep_read:c,think:u,response:p,deepResearch:v},handlers:C,clearAllChunkData:()=>new Promise(b=>{t(void 0),n(void 0),i(void 0),a(void 0),d(void 0),h(void 0),m(void 0),A([]),setTimeout(b,0)})}}const Gt=g.createContext({});function Jt(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const Qt=typeof window<"u",kn=Qt?g.useLayoutEffect:g.useEffect,Tt=g.createContext(null);function Ht(e,t){e.indexOf(t)===-1&&e.push(t)}function Xt(e,t){const s=e.indexOf(t);s>-1&&e.splice(s,1)}const ye=(e,t,s)=>s>t?t:s<e?e:s;function Zt(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Be=()=>{},be=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(Be=(e,t,s)=>{!e&&typeof console<"u"&&console.warn(Zt(t,s))},be=(e,t,s)=>{if(!e)throw new Error(Zt(t,s))});const we={},Tn=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Sn(e){return typeof e=="object"&&e!==null}const En=e=>/^0[^.\s]+$/u.test(e);function $t(e){let t;return()=>(t===void 0&&(t=e()),t)}const de=e=>e,da=(e,t)=>s=>t(e(s)),tt=(...e)=>e.reduce(da),st=(e,t,s)=>{const n=t-e;return n===0?1:(s-e)/n};class es{constructor(){this.subscriptions=[]}add(t){return Ht(this.subscriptions,t),()=>Xt(this.subscriptions,t)}notify(t,s,n){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,s,n);else for(let i=0;i<r;i++){const o=this.subscriptions[i];o&&o(t,s,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const xe=e=>e*1e3,he=e=>e/1e3;function Pn(e,t){return t?e*(1e3/t):0}const jn=new Set;function ts(e,t,s){e||jn.has(t)||(console.warn(Zt(t,s)),jn.add(t))}const Nn=(e,t,s)=>(((1-3*s+3*t)*e+(3*s-6*t))*e+3*t)*e,ha=1e-7,fa=12;function pa(e,t,s,n,r){let i,o,a=0;do o=t+(s-t)/2,i=Nn(o,n,r)-e,i>0?s=o:t=o;while(Math.abs(i)>ha&&++a<fa);return o}function nt(e,t,s,n){if(e===t&&s===n)return de;const r=i=>pa(i,0,1,e,s);return i=>i===0||i===1?i:Nn(r(i),t,n)}const Vn=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Mn=e=>t=>1-e(1-t),Dn=nt(.33,1.53,.69,.99),ss=Mn(Dn),Fn=Vn(ss),Rn=e=>(e*=2)<1?.5*ss(e):.5*(2-Math.pow(2,-10*(e-1))),ns=e=>1-Math.sin(Math.acos(e)),Ln=Mn(ns),Bn=Vn(ns),ma=nt(.42,0,1,1),ga=nt(0,0,.58,1),On=nt(.42,0,.58,1),ya=e=>Array.isArray(e)&&typeof e[0]!="number",In=e=>Array.isArray(e)&&typeof e[0]=="number",_n={linear:de,easeIn:ma,easeInOut:On,easeOut:ga,circIn:ns,circInOut:Bn,circOut:Ln,backIn:ss,backInOut:Fn,backOut:Dn,anticipate:Rn},xa=e=>typeof e=="string",Un=e=>{if(In(e)){be(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,s,n,r]=e;return nt(t,s,n,r)}else if(xa(e))return be(_n[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),_n[e];return e},St=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function va(e,t){let s=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){o.has(u)&&(d.schedule(u),e()),u(a)}const d={schedule:(u,h=!1,p=!1)=>{const v=p&&r?s:n;return h&&o.add(u),v.has(u)||v.add(u),u},cancel:u=>{n.delete(u),o.delete(u)},process:u=>{if(a=u,r){i=!0;return}r=!0,[s,n]=[n,s],s.forEach(c),s.clear(),r=!1,i&&(i=!1,d.process(u))}};return d}const ba=40;function Wn(e,t){let s=!1,n=!0;const r={delta:0,timestamp:0,isProcessing:!1},i=()=>s=!0,o=St.reduce((x,N)=>(x[N]=va(i),x),{}),{setup:a,read:c,resolveKeyframes:d,preUpdate:u,update:h,preRender:p,render:m,postRender:v}=o,A=()=>{const x=we.useManualTiming?r.timestamp:performance.now();s=!1,we.useManualTiming||(r.delta=n?1e3/60:Math.max(Math.min(x-r.timestamp,ba),1)),r.timestamp=x,r.isProcessing=!0,a.process(r),c.process(r),d.process(r),u.process(r),h.process(r),p.process(r),m.process(r),v.process(r),r.isProcessing=!1,s&&t&&(n=!1,e(A))},C=()=>{s=!0,n=!0,r.isProcessing||e(A)};return{schedule:St.reduce((x,N)=>{const P=o[N];return x[N]=(D,E=!1,S=!1)=>(s||C(),P.schedule(D,E,S)),x},{}),cancel:x=>{for(let N=0;N<St.length;N++)o[St[N]].cancel(x)},state:r,steps:o}}const{schedule:W,cancel:Ae,state:te,steps:rs}=Wn(typeof requestAnimationFrame<"u"?requestAnimationFrame:de,!0);let Et;function wa(){Et=void 0}const ne={now:()=>(Et===void 0&&ne.set(te.isProcessing||we.useManualTiming?te.timestamp:performance.now()),Et),set:e=>{Et=e,queueMicrotask(wa)}},qn=e=>t=>typeof t=="string"&&t.startsWith(e),Kn=qn("--"),Aa=qn("var(--"),is=e=>Aa(e)?Ca.test(e.split("/*")[0].trim()):!1,Ca=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Yn(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Oe={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},rt={...Oe,transform:e=>ye(0,1,e)},Pt={...Oe,default:1},it=e=>Math.round(e*1e5)/1e5,os=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ka(e){return e==null}const Ta=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,as=(e,t)=>s=>!!(typeof s=="string"&&Ta.test(s)&&s.startsWith(e)||t&&!ka(s)&&Object.prototype.hasOwnProperty.call(s,t)),zn=(e,t,s)=>n=>{if(typeof n!="string")return n;const[r,i,o,a]=n.match(os);return{[e]:parseFloat(r),[t]:parseFloat(i),[s]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Sa=e=>ye(0,255,e),ls={...Oe,transform:e=>Math.round(Sa(e))},je={test:as("rgb","red"),parse:zn("red","green","blue"),transform:({red:e,green:t,blue:s,alpha:n=1})=>"rgba("+ls.transform(e)+", "+ls.transform(t)+", "+ls.transform(s)+", "+it(rt.transform(n))+")"};function Ea(e){let t="",s="",n="",r="";return e.length>5?(t=e.substring(1,3),s=e.substring(3,5),n=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),s=e.substring(2,3),n=e.substring(3,4),r=e.substring(4,5),t+=t,s+=s,n+=n,r+=r),{red:parseInt(t,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:r?parseInt(r,16)/255:1}}const cs={test:as("#"),parse:Ea,transform:je.transform},ot=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ce=ot("deg"),ve=ot("%"),T=ot("px"),Pa=ot("vh"),ja=ot("vw"),Gn={...ve,parse:e=>ve.parse(e)/100,transform:e=>ve.transform(e*100)},Ie={test:as("hsl","hue"),parse:zn("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:s,alpha:n=1})=>"hsla("+Math.round(e)+", "+ve.transform(it(t))+", "+ve.transform(it(s))+", "+it(rt.transform(n))+")"},G={test:e=>je.test(e)||cs.test(e)||Ie.test(e),parse:e=>je.test(e)?je.parse(e):Ie.test(e)?Ie.parse(e):cs.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?je.transform(e):Ie.transform(e),getAnimatableNone:e=>{const t=G.parse(e);return t.alpha=0,G.transform(t)}},Na=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Va(e){return isNaN(e)&&typeof e=="string"&&(e.match(os)?.length||0)+(e.match(Na)?.length||0)>0}const Jn="number",Qn="color",Ma="var",Da="var(",Hn="${}",Fa=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function at(e){const t=e.toString(),s=[],n={color:[],number:[],var:[]},r=[];let i=0;const a=t.replace(Fa,c=>(G.test(c)?(n.color.push(i),r.push(Qn),s.push(G.parse(c))):c.startsWith(Da)?(n.var.push(i),r.push(Ma),s.push(c)):(n.number.push(i),r.push(Jn),s.push(parseFloat(c))),++i,Hn)).split(Hn);return{values:s,split:a,indexes:n,types:r}}function Xn(e){return at(e).values}function Zn(e){const{split:t,types:s}=at(e),n=t.length;return r=>{let i="";for(let o=0;o<n;o++)if(i+=t[o],r[o]!==void 0){const a=s[o];a===Jn?i+=it(r[o]):a===Qn?i+=G.transform(r[o]):i+=r[o]}return i}}const Ra=e=>typeof e=="number"?0:G.test(e)?G.getAnimatableNone(e):e;function La(e){const t=Xn(e);return Zn(e)(t.map(Ra))}const ke={test:Va,parse:Xn,createTransformer:Zn,getAnimatableNone:La};function us(e,t,s){return s<0&&(s+=1),s>1&&(s-=1),s<.16666666666666666?e+(t-e)*6*s:s<.5?t:s<.6666666666666666?e+(t-e)*(.6666666666666666-s)*6:e}function Ba({hue:e,saturation:t,lightness:s,alpha:n}){e/=360,t/=100,s/=100;let r=0,i=0,o=0;if(!t)r=i=o=s;else{const a=s<.5?s*(1+t):s+t-s*t,c=2*s-a;r=us(c,a,e+.3333333333333333),i=us(c,a,e),o=us(c,a,e-.3333333333333333)}return{red:Math.round(r*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:n}}function jt(e,t){return s=>s>0?t:e}const q=(e,t,s)=>e+(t-e)*s,ds=(e,t,s)=>{const n=e*e,r=s*(t*t-n)+n;return r<0?0:Math.sqrt(r)},Oa=[cs,je,Ie],Ia=e=>Oa.find(t=>t.test(e));function $n(e){const t=Ia(e);if(Be(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let s=t.parse(e);return t===Ie&&(s=Ba(s)),s}const er=(e,t)=>{const s=$n(e),n=$n(t);if(!s||!n)return jt(e,t);const r={...s};return i=>(r.red=ds(s.red,n.red,i),r.green=ds(s.green,n.green,i),r.blue=ds(s.blue,n.blue,i),r.alpha=q(s.alpha,n.alpha,i),je.transform(r))},hs=new Set(["none","hidden"]);function _a(e,t){return hs.has(e)?s=>s<=0?e:t:s=>s>=1?t:e}function Ua(e,t){return s=>q(e,t,s)}function fs(e){return typeof e=="number"?Ua:typeof e=="string"?is(e)?jt:G.test(e)?er:Ka:Array.isArray(e)?tr:typeof e=="object"?G.test(e)?er:Wa:jt}function tr(e,t){const s=[...e],n=s.length,r=e.map((i,o)=>fs(i)(i,t[o]));return i=>{for(let o=0;o<n;o++)s[o]=r[o](i);return s}}function Wa(e,t){const s={...e,...t},n={};for(const r in s)e[r]!==void 0&&t[r]!==void 0&&(n[r]=fs(e[r])(e[r],t[r]));return r=>{for(const i in n)s[i]=n[i](r);return s}}function qa(e,t){const s=[],n={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const i=t.types[r],o=e.indexes[i][n[i]],a=e.values[o]??0;s[r]=a,n[i]++}return s}const Ka=(e,t)=>{const s=ke.createTransformer(t),n=at(e),r=at(t);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?hs.has(e)&&!r.values.length||hs.has(t)&&!n.values.length?_a(e,t):tt(tr(qa(n,r),r.values),s):(Be(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),jt(e,t))};function sr(e,t,s){return typeof e=="number"&&typeof t=="number"&&typeof s=="number"?q(e,t,s):fs(e)(e,t)}const Ya=e=>{const t=({timestamp:s})=>e(s);return{start:(s=!0)=>W.update(t,s),stop:()=>Ae(t),now:()=>te.isProcessing?te.timestamp:ne.now()}},nr=(e,t,s=10)=>{let n="";const r=Math.max(Math.round(t/s),2);for(let i=0;i<r;i++)n+=Math.round(e(i/(r-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},Nt=2e4;function ps(e){let t=0;const s=50;let n=e.next(t);for(;!n.done&&t<Nt;)t+=s,n=e.next(t);return t>=Nt?1/0:t}function za(e,t=100,s){const n=s({...e,keyframes:[0,t]}),r=Math.min(ps(n),Nt);return{type:"keyframes",ease:i=>n.next(r*i).value/t,duration:he(r)}}const Ga=5;function rr(e,t,s){const n=Math.max(t-Ga,0);return Pn(s-e(n),t-n)}const K={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},ms=.001;function Ja({duration:e=K.duration,bounce:t=K.bounce,velocity:s=K.velocity,mass:n=K.mass}){let r,i;Be(e<=xe(K.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=ye(K.minDamping,K.maxDamping,o),e=ye(K.minDuration,K.maxDuration,he(e)),o<1?(r=d=>{const u=d*o,h=u*e,p=u-s,m=gs(d,o),v=Math.exp(-h);return ms-p/m*v},i=d=>{const h=d*o*e,p=h*s+s,m=Math.pow(o,2)*Math.pow(d,2)*e,v=Math.exp(-h),A=gs(Math.pow(d,2),o);return(-r(d)+ms>0?-1:1)*((p-m)*v)/A}):(r=d=>{const u=Math.exp(-d*e),h=(d-s)*e+1;return-ms+u*h},i=d=>{const u=Math.exp(-d*e),h=(s-d)*(e*e);return u*h});const a=5/e,c=Ha(r,i,a);if(e=xe(e),isNaN(c))return{stiffness:K.stiffness,damping:K.damping,duration:e};{const d=Math.pow(c,2)*n;return{stiffness:d,damping:o*2*Math.sqrt(n*d),duration:e}}}const Qa=12;function Ha(e,t,s){let n=s;for(let r=1;r<Qa;r++)n=n-e(n)/t(n);return n}function gs(e,t){return e*Math.sqrt(1-t*t)}const Xa=["duration","bounce"],Za=["stiffness","damping","mass"];function ir(e,t){return t.some(s=>e[s]!==void 0)}function $a(e){let t={velocity:K.velocity,stiffness:K.stiffness,damping:K.damping,mass:K.mass,isResolvedFromDuration:!1,...e};if(!ir(e,Za)&&ir(e,Xa))if(e.visualDuration){const s=e.visualDuration,n=2*Math.PI/(s*1.2),r=n*n,i=2*ye(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:K.mass,stiffness:r,damping:i}}else{const s=Ja(e);t={...t,...s,mass:K.mass},t.isResolvedFromDuration=!0}return t}function Vt(e=K.visualDuration,t=K.bounce){const s=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:r}=s;const i=s.keyframes[0],o=s.keyframes[s.keyframes.length-1],a={done:!1,value:i},{stiffness:c,damping:d,mass:u,duration:h,velocity:p,isResolvedFromDuration:m}=$a({...s,velocity:-he(s.velocity||0)}),v=p||0,A=d/(2*Math.sqrt(c*u)),C=o-i,y=he(Math.sqrt(c/u)),b=Math.abs(C)<5;n||(n=b?K.restSpeed.granular:K.restSpeed.default),r||(r=b?K.restDelta.granular:K.restDelta.default);let x;if(A<1){const P=gs(y,A);x=D=>{const E=Math.exp(-A*y*D);return o-E*((v+A*y*C)/P*Math.sin(P*D)+C*Math.cos(P*D))}}else if(A===1)x=P=>o-Math.exp(-y*P)*(C+(v+y*C)*P);else{const P=y*Math.sqrt(A*A-1);x=D=>{const E=Math.exp(-A*y*D),S=Math.min(P*D,300);return o-E*((v+A*y*C)*Math.sinh(S)+P*C*Math.cosh(S))/P}}const N={calculatedDuration:m&&h||null,next:P=>{const D=x(P);if(m)a.done=P>=h;else{let E=P===0?v:0;A<1&&(E=P===0?xe(v):rr(x,P,D));const S=Math.abs(E)<=n,F=Math.abs(o-D)<=r;a.done=S&&F}return a.value=a.done?o:D,a},toString:()=>{const P=Math.min(ps(N),Nt),D=nr(E=>N.next(P*E).value,P,30);return P+"ms "+D},toTransition:()=>{}};return N}Vt.applyToOptions=e=>{const t=za(e,100,Vt);return e.ease=t.ease,e.duration=xe(t.duration),e.type="keyframes",e};function ys({keyframes:e,velocity:t=0,power:s=.8,timeConstant:n=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:c,restDelta:d=.5,restSpeed:u}){const h=e[0],p={done:!1,value:h},m=S=>a!==void 0&&S<a||c!==void 0&&S>c,v=S=>a===void 0?c:c===void 0||Math.abs(a-S)<Math.abs(c-S)?a:c;let A=s*t;const C=h+A,y=o===void 0?C:o(C);y!==C&&(A=y-h);const b=S=>-A*Math.exp(-S/n),x=S=>y+b(S),N=S=>{const F=b(S),_=x(S);p.done=Math.abs(F)<=d,p.value=p.done?y:_};let P,D;const E=S=>{m(p.value)&&(P=S,D=Vt({keyframes:[p.value,v(p.value)],velocity:rr(x,S,p.value),damping:r,stiffness:i,restDelta:d,restSpeed:u}))};return E(0),{calculatedDuration:null,next:S=>{let F=!1;return!D&&P===void 0&&(F=!0,N(S),E(S)),P!==void 0&&S>=P?D.next(S-P):(!F&&N(S),p)}}}function el(e,t,s){const n=[],r=s||we.mix||sr,i=e.length-1;for(let o=0;o<i;o++){let a=r(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||de:t;a=tt(c,a)}n.push(a)}return n}function tl(e,t,{clamp:s=!0,ease:n,mixer:r}={}){const i=e.length;if(be(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=el(t,n,r),c=a.length,d=u=>{if(o&&u<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(u<e[h+1]);h++);const p=st(e[h],e[h+1],u);return a[h](p)};return s?u=>d(ye(e[0],e[i-1],u)):d}function sl(e,t){const s=e[e.length-1];for(let n=1;n<=t;n++){const r=st(0,t,n);e.push(q(s,1,r))}}function nl(e){const t=[0];return sl(t,e.length-1),t}function rl(e,t){return e.map(s=>s*t)}function il(e,t){return e.map(()=>t||On).splice(0,e.length-1)}function _e({duration:e=300,keyframes:t,times:s,ease:n="easeInOut"}){const r=ya(n)?n.map(Un):Un(n),i={done:!1,value:t[0]},o=rl(s&&s.length===t.length?s:nl(t),e),a=tl(o,t,{ease:Array.isArray(r)?r:il(t,r)});return{calculatedDuration:e,next:c=>(i.value=a(c),i.done=c>=e,i)}}const ol=e=>e!==null;function xs(e,{repeat:t,repeatType:s="loop"},n,r=1){const i=e.filter(ol),a=r<0||t&&s!=="loop"&&t%2===1?0:i.length-1;return!a||n===void 0?i[a]:n}const al={decay:ys,inertia:ys,tween:_e,keyframes:_e,spring:Vt};function or(e){typeof e.type=="string"&&(e.type=al[e.type])}class vs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,s){return this.finished.then(t,s)}}const ll=e=>e/100;class bs extends vs{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:s}=this.options;s&&s.updatedAt!==ne.now()&&this.tick(ne.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;or(t);const{type:s=_e,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const c=s||_e;process.env.NODE_ENV!=="production"&&c!==_e&&be(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==_e&&typeof a[0]!="number"&&(this.mixKeyframes=tt(ll,sr(a[0],a[1])),a=[0,100]);const d=c({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=ps(d));const{calculatedDuration:u}=d;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=d}updateTime(t){const s=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(t,s=!1){const{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:d=0,keyframes:u,repeat:h,repeatType:p,repeatDelay:m,type:v,onUpdate:A,finalKeyframe:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),s?this.currentTime=t:this.updateTime(t);const y=this.currentTime-d*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?y<0:y>r;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let x=this.currentTime,N=n;if(h){const S=Math.min(this.currentTime,r)/a;let F=Math.floor(S),_=S%1;!_&&S>=1&&(_=1),_===1&&F--,F=Math.min(F,h+1),!!(F%2)&&(p==="reverse"?(_=1-_,m&&(_-=m/a)):p==="mirror"&&(N=o)),x=ye(0,1,_)*a}const P=b?{done:!1,value:u[0]}:N.next(x);i&&(P.value=i(P.value));let{done:D}=P;!b&&c!==null&&(D=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return E&&v!==ys&&(P.value=xs(u,this.options,C,this.speed)),A&&A(P.value),E&&this.finish(),P}then(t,s){return this.finished.then(t,s)}get duration(){return he(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+he(t)}get time(){return he(this.currentTime)}set time(t){t=xe(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ne.now());const s=this.playbackSpeed!==t;this.playbackSpeed=t,s&&(this.time=he(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Ya,startTime:s}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),this.options.onPlay?.();const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=s??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ne.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function cl(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ne=e=>e*180/Math.PI,ws=e=>{const t=Ne(Math.atan2(e[1],e[0]));return As(t)},ul={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ws,rotateZ:ws,skewX:e=>Ne(Math.atan(e[1])),skewY:e=>Ne(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},As=e=>(e=e%360,e<0&&(e+=360),e),ar=ws,lr=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),cr=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),dl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:lr,scaleY:cr,scale:e=>(lr(e)+cr(e))/2,rotateX:e=>As(Ne(Math.atan2(e[6],e[5]))),rotateY:e=>As(Ne(Math.atan2(-e[2],e[0]))),rotateZ:ar,rotate:ar,skewX:e=>Ne(Math.atan(e[4])),skewY:e=>Ne(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Cs(e){return e.includes("scale")?1:0}function ks(e,t){if(!e||e==="none")return Cs(t);const s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,r;if(s)n=dl,r=s;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=ul,r=a}if(!r)return Cs(t);const i=n[t],o=r[1].split(",").map(fl);return typeof i=="function"?i(o):o[i]}const hl=(e,t)=>{const{transform:s="none"}=getComputedStyle(e);return ks(s,t)};function fl(e){return parseFloat(e.trim())}const Ue=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],We=new Set(Ue),ur=e=>e===Oe||e===T,pl=new Set(["x","y","z"]),ml=Ue.filter(e=>!pl.has(e));function gl(e){const t=[];return ml.forEach(s=>{const n=e.getValue(s);n!==void 0&&(t.push([s,n.get()]),n.set(s.startsWith("scale")?1:0))}),t}const Te={width:({x:e},{paddingLeft:t="0",paddingRight:s="0"})=>e.max-e.min-parseFloat(t)-parseFloat(s),height:({y:e},{paddingTop:t="0",paddingBottom:s="0"})=>e.max-e.min-parseFloat(t)-parseFloat(s),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ks(t,"x"),y:(e,{transform:t})=>ks(t,"y")};Te.translateX=Te.x,Te.translateY=Te.y;const Ve=new Set;let Ts=!1,Ss=!1,Es=!1;function dr(){if(Ss){const e=Array.from(Ve).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),s=new Map;t.forEach(n=>{const r=gl(n);r.length&&(s.set(n,r),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const r=s.get(n);r&&r.forEach(([i,o])=>{n.getValue(i)?.set(o)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Ss=!1,Ts=!1,Ve.forEach(e=>e.complete(Es)),Ve.clear()}function hr(){Ve.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ss=!0)})}function yl(){Es=!0,hr(),dr(),Es=!1}class Ps{constructor(t,s,n,r,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=s,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ve.add(this),Ts||(Ts=!0,W.read(hr),W.resolveKeyframes(dr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:s,element:n,motionValue:r}=this;if(t[0]===null){const i=r?.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&s){const a=n.readValue(s,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),r&&i===void 0&&r.set(t[0])}cl(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ve.delete(this)}cancel(){this.state==="scheduled"&&(Ve.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const xl=e=>e.startsWith("--");function vl(e,t,s){xl(t)?e.style.setProperty(t,s):e.style[t]=s}const bl=$t(()=>window.ScrollTimeline!==void 0),wl={};function Al(e,t){const s=$t(e);return()=>wl[t]??s()}const fr=Al(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),lt=([e,t,s,n])=>`cubic-bezier(${e}, ${t}, ${s}, ${n})`,pr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:lt([0,.65,.55,1]),circOut:lt([.55,0,1,.45]),backIn:lt([.31,.01,.66,-.59]),backOut:lt([.33,1.53,.69,.99])};function mr(e,t){if(e)return typeof e=="function"?fr()?nr(e,t):"ease-out":In(e)?lt(e):Array.isArray(e)?e.map(s=>mr(s,t)||pr.easeOut):pr[e]}function Cl(e,t,s,{delay:n=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:c}={},d=void 0){const u={[t]:s};c&&(u.offset=c);const h=mr(a,r);Array.isArray(h)&&(u.easing=h);const p={delay:n,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return d&&(p.pseudoElement=d),e.animate(u,p)}function gr(e){return typeof e=="function"&&"applyToOptions"in e}function kl({type:e,...t}){return gr(e)&&fr()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Tl extends vs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:s,name:n,keyframes:r,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,be(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=kl(t);this.animation=Cl(s,n,r,d,i),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=xs(r,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):vl(s,n,u),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return he(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+he(t)}get time(){return he(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=xe(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&bl()?(this.animation.timeline=t,de):s(this)}}const yr={anticipate:Rn,backInOut:Fn,circInOut:Bn};function Sl(e){return e in yr}function El(e){typeof e.ease=="string"&&Sl(e.ease)&&(e.ease=yr[e.ease])}const js=10;class Pl extends Tl{constructor(t){El(t),or(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:s,onUpdate:n,onComplete:r,element:i,...o}=this.options;if(!s)return;if(t!==void 0){s.set(t);return}const a=new bs({...o,autoplay:!1}),c=Math.max(js,ne.now()-this.startTime),d=ye(0,js,c-js);s.setWithVelocity(a.sample(Math.max(0,c-d)).value,a.sample(c).value,d),a.stop()}}const xr=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ke.test(e)||e==="0")&&!e.startsWith("url("));function jl(e){const t=e[0];if(e.length===1)return!0;for(let s=0;s<e.length;s++)if(e[s]!==t)return!0}function Nl(e,t,s,n){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=xr(r,t),a=xr(i,t);return Be(o===a,`You are trying to animate ${t} from "${r}" to "${i}". "${o?i:r}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:jl(e)||(s==="spring"||gr(s))&&n}function Ns(e){e.duration=0,e.type="keyframes"}const Vl=new Set(["opacity","clipPath","filter","transform"]),Ml=$t(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Dl(e){const{motionValue:t,name:s,repeatDelay:n,repeatType:r,damping:i,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:d}=t.owner.getProps();return Ml()&&s&&Vl.has(s)&&(s!=="transform"||!d)&&!c&&!n&&r!=="mirror"&&i!==0&&o!=="inertia"}const Fl=40;class Rl extends vs{constructor({autoplay:t=!0,delay:s=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:c,motionValue:d,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ne.now();const p={autoplay:t,delay:s,type:n,repeat:r,repeatDelay:i,repeatType:o,name:c,motionValue:d,element:u,...h},m=u?.KeyframeResolver||Ps;this.keyframeResolver=new m(a,(v,A,C)=>this.onKeyframesResolved(v,A,p,!C),c,d,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,s,n,r){this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:c,isHandoff:d,onUpdate:u}=n;this.resolvedAt=ne.now(),Nl(t,i,o,a)||((we.instantAnimations||!c)&&u?.(xs(t,n,s)),t[0]=t[t.length-1],Ns(n),n.repeat=0);const p={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>Fl?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...n,keyframes:t},m=!d&&Dl(p)?new Pl({...p,element:p.motionValue.owner.current}):new bs(p);m.finished.then(()=>this.notifyFinished()).catch(de),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,s){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),yl()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Ll=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Bl(e){const t=Ll.exec(e);if(!t)return[,];const[,s,n,r]=t;return[`--${s??n}`,r]}const Ol=4;function vr(e,t,s=1){be(s<=Ol,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[n,r]=Bl(e);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const o=i.trim();return Tn(o)?parseFloat(o):o}return is(r)?vr(r,t,s+1):r}function Vs(e,t){return e?.[t]??e?.default??e}const br=new Set(["width","height","top","left","right","bottom",...Ue]),Il={test:e=>e==="auto",parse:e=>e},wr=e=>t=>t.test(e),Ar=[Oe,T,ve,Ce,ja,Pa,Il],Cr=e=>Ar.find(wr(e));function _l(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||En(e):!0}const Ul=new Set(["brightness","contrast","saturate","opacity"]);function Wl(e){const[t,s]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=s.match(os)||[];if(!n)return e;const r=s.replace(n,"");let i=Ul.has(t)?1:0;return n!==s&&(i*=100),t+"("+i+r+")"}const ql=/\b([a-z-]*)\(.*?\)/gu,Ms={...ke,getAnimatableNone:e=>{const t=e.match(ql);return t?t.map(Wl).join(" "):e}},kr={...Oe,transform:Math.round},Ds={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,radius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,backgroundPositionX:T,backgroundPositionY:T,...{rotate:Ce,rotateX:Ce,rotateY:Ce,rotateZ:Ce,scale:Pt,scaleX:Pt,scaleY:Pt,scaleZ:Pt,skew:Ce,skewX:Ce,skewY:Ce,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:rt,originX:Gn,originY:Gn,originZ:T},zIndex:kr,fillOpacity:rt,strokeOpacity:rt,numOctaves:kr},Kl={...Ds,color:G,backgroundColor:G,outlineColor:G,fill:G,stroke:G,borderColor:G,borderTopColor:G,borderRightColor:G,borderBottomColor:G,borderLeftColor:G,filter:Ms,WebkitFilter:Ms},Tr=e=>Kl[e];function Sr(e,t){let s=Tr(e);return s!==Ms&&(s=ke),s.getAnimatableNone?s.getAnimatableNone(t):void 0}const Yl=new Set(["auto","none","0"]);function zl(e,t,s){let n=0,r;for(;n<e.length&&!r;){const i=e[n];typeof i=="string"&&!Yl.has(i)&&at(i).values.length&&(r=e[n]),n++}if(r&&s)for(const i of t)e[i]=Sr(s,r)}class Gl extends Ps{constructor(t,s,n,r,i){super(t,s,n,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:s,name:n}=this;if(!s||!s.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let h=t[u];if(typeof h=="string"&&(h=h.trim(),is(h))){const p=vr(h,s.current);p!==void 0&&(t[u]=p),u===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!br.has(n)||t.length!==2)return;const[r,i]=t,o=Cr(r),a=Cr(i),c=Yn(r),d=Yn(i);if(c!==d&&Te[n]){this.needsMeasurement=!0;return}if(o!==a)if(ur(o)&&ur(a))for(let u=0;u<t.length;u++){const h=t[u];typeof h=="string"&&(t[u]=parseFloat(h))}else Te[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:s}=this,n=[];for(let r=0;r<t.length;r++)(t[r]===null||_l(t[r]))&&n.push(r);n.length&&zl(t,n,s)}measureInitialState(){const{element:t,unresolvedKeyframes:s,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Te[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s[0]=this.measuredOrigin;const r=s[s.length-1];r!==void 0&&t.getValue(n,r).jump(r,!1)}measureEndState(){const{element:t,name:s,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const r=t.getValue(s);r&&r.jump(this.measuredOrigin,!1);const i=n.length-1,o=n[i];n[i]=Te[s](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{t.getValue(a).set(c)}),this.resolveNoneKeyframes()}}function Jl(e,t,s){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const r=s?.[e]??n.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}const Er=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Pr(e){return Sn(e)&&"offsetHeight"in e}const jr=30,Ql=e=>!isNaN(parseFloat(e));class Hl{constructor(t,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{const r=ne.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=s.owner}setCurrent(t){this.current=t,this.updatedAt=ne.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Ql(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&ts(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,s){this.events[t]||(this.events[t]=new es);const n=this.events[t].add(s);return t==="change"?()=>{n(),W.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,s){this.passiveEffect=t,this.stopPassiveEffect=s}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,s,n){this.set(s),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,s=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ne.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>jr)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,jr);return Pn(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(t){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=t(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function qe(e,t){return new Hl(e,t)}const{schedule:Fs}=Wn(queueMicrotask,!1),me={x:!1,y:!1};function Nr(){return me.x||me.y}function Xl(e){return e==="x"||e==="y"?me[e]?null:(me[e]=!0,()=>{me[e]=!1}):me.x||me.y?null:(me.x=me.y=!0,()=>{me.x=me.y=!1})}function Vr(e,t){const s=Jl(e),n=new AbortController,r={passive:!0,...t,signal:n.signal};return[s,r,()=>n.abort()]}function Mr(e){return!(e.pointerType==="touch"||Nr())}function Zl(e,t,s={}){const[n,r,i]=Vr(e,s),o=a=>{if(!Mr(a))return;const{target:c}=a,d=t(c,a);if(typeof d!="function"||!c)return;const u=h=>{Mr(h)&&(d(h),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,r)};return n.forEach(a=>{a.addEventListener("pointerenter",o,r)}),i}const Dr=(e,t)=>t?e===t?!0:Dr(e,t.parentElement):!1,Rs=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,$l=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Fr(e){return $l.has(e.tagName)||e.isContentEditable===!0}const Mt=new WeakSet;function Rr(e){return t=>{t.key==="Enter"&&e(t)}}function Ls(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const ec=(e,t)=>{const s=e.currentTarget;if(!s)return;const n=Rr(()=>{if(Mt.has(s))return;Ls(s,"down");const r=Rr(()=>{Ls(s,"up")}),i=()=>Ls(s,"cancel");s.addEventListener("keyup",r,t),s.addEventListener("blur",i,t)});s.addEventListener("keydown",n,t),s.addEventListener("blur",()=>s.removeEventListener("keydown",n),t)};function Lr(e){return Rs(e)&&!Nr()}function tc(e,t,s={}){const[n,r,i]=Vr(e,s),o=a=>{const c=a.currentTarget;if(!Lr(a))return;Mt.add(c);const d=t(c,a),u=(m,v)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",p),Mt.has(c)&&Mt.delete(c),Lr(m)&&typeof d=="function"&&d(m,{success:v})},h=m=>{u(m,c===window||c===document||s.useGlobalTarget||Dr(c,m.target))},p=m=>{u(m,!1)};window.addEventListener("pointerup",h,r),window.addEventListener("pointercancel",p,r)};return n.forEach(a=>{(s.useGlobalTarget?window:a).addEventListener("pointerdown",o,r),Pr(a)&&(a.addEventListener("focus",d=>ec(d,r)),!Fr(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Br(e){return Sn(e)&&"ownerSVGElement"in e}function sc(e){return Br(e)&&e.tagName==="svg"}const se=e=>!!(e&&e.getVelocity),nc=[...Ar,G,ke],rc=e=>nc.find(wr(e)),Bs=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Or(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ic(...e){return t=>{let s=!1;const n=e.map(r=>{const i=Or(r,t);return!s&&typeof i=="function"&&(s=!0),i});if(s)return()=>{for(let r=0;r<n.length;r++){const i=n[r];typeof i=="function"?i():Or(e[r],null)}}}}function oc(...e){return At.useCallback(ic(...e),e)}class ac extends At.Component{getSnapshotBeforeUpdate(t){const s=this.props.childRef.current;if(s&&t.isPresent&&!this.props.isPresent){const n=s.offsetParent,r=Pr(n)&&n.offsetWidth||0,i=this.props.sizeRef.current;i.height=s.offsetHeight||0,i.width=s.offsetWidth||0,i.top=s.offsetTop,i.left=s.offsetLeft,i.right=r-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function lc({children:e,isPresent:t,anchorX:s,root:n}){const r=g.useId(),i=g.useRef(null),o=g.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=g.useContext(Bs),c=e.props?.ref??e?.ref,d=oc(i,c);return g.useInsertionEffect(()=>{const{width:u,height:h,top:p,left:m,right:v}=o.current;if(t||!i.current||!u||!h)return;const A=s==="left"?`left: ${m}`:`right: ${v}`;i.current.dataset.motionPopId=r;const C=document.createElement("style");a&&(C.nonce=a);const y=n??document.head;return y.appendChild(C),C.sheet&&C.sheet.insertRule(`
34
34
  [data-motion-pop-id="${r}"] {
35
35
  position: absolute !important;
36
36
  width: ${u}px !important;
37
37
  height: ${h}px !important;
38
- ${w}px !important;
38
+ ${A}px !important;
39
39
  top: ${p}px !important;
40
40
  }
41
- `),()=>{x.contains(C)&&x.removeChild(C)}},[t]),l.jsx(Tc,{isPresent:t,childRef:o,sizeRef:i,children:Yt.cloneElement(e,{ref:d})})}const Ec=({children:e,initial:t,isPresent:s,onExitComplete:n,custom:r,presenceAffectsLayout:o,mode:i,anchorX:a,root:c})=>{const d=ws(jc),u=g.useId();let h=!0,p=g.useMemo(()=>(h=!1,{id:u,initial:t,isPresent:s,custom:r,onExitComplete:m=>{d.set(m,!0);for(const b of d.values())if(!b)return;n&&n()},register:m=>(d.set(m,!1),()=>d.delete(m))}),[s,d,n]);return o&&h&&(p={...p}),g.useMemo(()=>{d.forEach((m,b)=>d.set(b,!1))},[s]),Yt.useEffect(()=>{!s&&!d.size&&n&&n()},[s]),i==="popLayout"&&(e=l.jsx(Sc,{isPresent:s,anchorX:a,root:c,children:e})),l.jsx(Jt.Provider,{value:p,children:e})};function jc(){return new Map}function mi(e=!0){const t=g.useContext(Jt);if(t===null)return[!0,null];const{isPresent:s,onExitComplete:n,register:r}=t,o=g.useId();g.useEffect(()=>{if(e)return r(o)},[e]);const i=g.useCallback(()=>e&&n&&n(o),[o,n,e]);return!s&&n?[!1,i]:[!0]}const ss=e=>e.key||"";function gi(e){const t=[];return g.Children.forEach(e,s=>{g.isValidElement(s)&&t.push(s)}),t}const Pc=({children:e,custom:t,initial:s=!0,onExitComplete:n,presenceAffectsLayout:r=!0,mode:o="sync",propagate:i=!1,anchorX:a="left",root:c})=>{const[d,u]=mi(i),h=g.useMemo(()=>gi(e),[e]),p=i&&!d?[]:h.map(ss),m=g.useRef(!0),b=g.useRef(h),w=ws(()=>new Map),C=g.useRef(new Set),[x,v]=g.useState(h),[y,E]=g.useState(h);er(()=>{m.current=!1,b.current=h;for(let N=0;N<y.length;N++){const j=ss(y[N]);p.includes(j)?(w.delete(j),C.current.delete(j)):w.get(j)!==!0&&w.set(j,!1)}},[y,p.length,p.join("-")]);const P=[];if(h!==x){let N=[...h];for(let j=0;j<y.length;j++){const R=y[j],Q=ss(R);p.includes(Q)||(N.splice(j,0,R),P.push(R))}return o==="wait"&&P.length&&(N=P),E(gi(N)),v(h),null}process.env.NODE_ENV!=="production"&&o==="wait"&&y.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:D}=g.useContext(bs);return l.jsx(l.Fragment,{children:y.map(N=>{const j=ss(N),R=i&&!d?!1:h===y||p.includes(j),Q=()=>{if(C.current.has(j))return;if(C.current.add(j),w.has(j))w.set(j,!0);else return;let ne=!0;w.forEach(he=>{he||(ne=!1)}),ne&&(D?.(),E(b.current),i&&u?.(),n&&n())};return l.jsx(Ec,{isPresent:R,initial:!m.current||s?void 0:!1,custom:t,presenceAffectsLayout:r,mode:o,root:c,onExitComplete:R?void 0:Q,anchorX:a,children:N},j)})})},yi=g.createContext({strict:!1}),xi={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},$e={};for(const e in xi)$e[e]={isEnabled:t=>xi[e].some(s=>!!t[s])};function Nc(e){for(const t in e)$e[t]={...$e[t],...e[t]}}const Vc=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ns(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Vc.has(e)}let vi=e=>!ns(e);function Mc(e){typeof e=="function"&&(vi=t=>t.startsWith("on")?!ns(t):e(t))}try{Mc(require("@emotion/is-prop-valid").default)}catch{}function Dc(e,t,s){const n={};for(const r in e)r==="values"&&typeof e.values=="object"||(vi(r)||s===!0&&ns(r)||!t&&!ns(r)||e.draggable&&r.startsWith("onDrag"))&&(n[r]=e[r]);return n}const rs=g.createContext({});function is(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Tt(e){return typeof e=="string"||Array.isArray(e)}const hn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],fn=["initial",...hn];function os(e){return is(e.animate)||fn.some(t=>Tt(e[t]))}function bi(e){return!!(os(e)||e.variants)}function Fc(e,t){if(os(e)){const{initial:s,animate:n}=e;return{initial:s===!1||Tt(s)?s:void 0,animate:Tt(n)?n:void 0}}return e.inherit!==!1?t:{}}function Lc(e){const{initial:t,animate:s}=Fc(e,g.useContext(rs));return g.useMemo(()=>({initial:t,animate:s}),[wi(t),wi(s)])}function wi(e){return Array.isArray(e)?e.join(" "):e}function Ai(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const St={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(S.test(e))e=parseFloat(e);else return e;const s=Ai(e,t.target.x),n=Ai(e,t.target.y);return`${s}% ${n}%`}},Bc={correct:(e,{treeScale:t,projectionDelta:s})=>{const n=e,r=Ve.parse(e);if(r.length>5)return n;const o=Ve.createTransformer(e),i=typeof r[0]!="number"?1:0,a=s.x.scale*t.x,c=s.y.scale*t.y;r[0+i]/=a,r[1+i]/=c;const d=W(a,c,.5);return typeof r[2+i]=="number"&&(r[2+i]/=d),typeof r[3+i]=="number"&&(r[3+i]/=d),o(r)}},pn={borderRadius:{...St,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomLeftRadius:St,borderBottomRightRadius:St,boxShadow:Bc};function Ci(e,{layout:t,layoutId:s}){return Xe.has(e)||e.startsWith("origin")||(t||s!==void 0)&&(!!pn[e]||e==="opacity")}const Rc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Oc=He.length;function Ic(e,t,s){let n="",r=!0;for(let o=0;o<Oc;o++){const i=He[o],a=e[i];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(i.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||s){const d=ni(a,an[i]);if(!c){r=!1;const u=Rc[i]||i;n+=`${u}(${d}) `}s&&(t[i]=d)}}return n=n.trim(),s?n=s(t,r?"":n):r&&(n="none"),n}function mn(e,t,s){const{style:n,vars:r,transformOrigin:o}=e;let i=!1,a=!1;for(const c in t){const d=t[c];if(Xe.has(c)){i=!0;continue}else if(br(c)){r[c]=d;continue}else{const u=ni(d,an[c]);c.startsWith("origin")?(a=!0,o[c]=u):n[c]=u}}if(t.transform||(i||s?n.transform=Ic(t,e.transform,s):n.transform&&(n.transform="none")),a){const{originX:c="50%",originY:d="50%",originZ:u=0}=o;n.transformOrigin=`${c} ${d} ${u}`}}const gn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ki(e,t,s){for(const n in t)!$(t[n])&&!Ci(n,s)&&(e[n]=t[n])}function _c({transformTemplate:e},t){return g.useMemo(()=>{const s=gn();return mn(s,t,e),Object.assign({},s.vars,s.style)},[t])}function Wc(e,t){const s=e.style||{},n={};return ki(n,s,e),Object.assign(n,_c(e,t)),n}function Uc(e,t){const s={},n=Wc(e,t);return e.drag&&e.dragListener!==!1&&(s.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(s.tabIndex=0),s.style=n,s}const qc={offset:"stroke-dashoffset",array:"stroke-dasharray"},Kc={offset:"strokeDashoffset",array:"strokeDasharray"};function Yc(e,t,s=1,n=0,r=!0){e.pathLength=1;const o=r?qc:Kc;e[o.offset]=S.transform(-n);const i=S.transform(t),a=S.transform(s);e[o.array]=`${i} ${a}`}const zc=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ti(e,{attrX:t,attrY:s,attrScale:n,pathLength:r,pathSpacing:o=1,pathOffset:i=0,...a},c,d,u){if(mn(e,a,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p}=e;h.transform&&(p.transform=h.transform,delete h.transform),(p.transform||h.transformOrigin)&&(p.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),p.transform&&(p.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const m of zc)h[m]!==void 0&&(p[m]=h[m],delete h[m]);t!==void 0&&(h.x=t),s!==void 0&&(h.y=s),n!==void 0&&(h.scale=n),r!==void 0&&Yc(h,r,o,i,!1)}const Si=()=>({...gn(),attrs:{}}),Ei=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Gc(e,t,s,n){const r=g.useMemo(()=>{const o=Si();return Ti(o,t,Ei(n),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};ki(o,e.style,e),r.style={...o,...r.style}}return r}const Jc=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function yn(e){return typeof e!="string"||e.includes("-")?!1:!!(Jc.indexOf(e)>-1||/[A-Z]/u.test(e))}function Qc(e,t,s,{latestValues:n},r,o=!1,i){const c=(i??yn(e)?Gc:Uc)(t,n,r,e),d=Dc(t,typeof e=="string",o),u=e!==g.Fragment?{...d,...c,ref:s}:{},{children:h}=t,p=g.useMemo(()=>$(h)?h.get():h,[h]);return g.createElement(e,{...u,children:p})}function ji(e){const t=[{},{}];return e?.values.forEach((s,n)=>{t[0][n]=s.get(),t[1][n]=s.getVelocity()}),t}function xn(e,t,s,n){if(typeof t=="function"){const[r,o]=ji(n);t=t(s!==void 0?s:e.custom,r,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,o]=ji(n);t=t(s!==void 0?s:e.custom,r,o)}return t}function as(e){return $(e)?e.get():e}function Hc({scrapeMotionValuesFromProps:e,createRenderState:t},s,n,r){return{latestValues:Xc(s,n,r,e),renderState:t()}}function Xc(e,t,s,n){const r={},o=n(e,{});for(const p in o)r[p]=as(o[p]);let{initial:i,animate:a}=e;const c=os(e),d=bi(e);t&&d&&!c&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=s?s.initial===!1:!1;u=u||i===!1;const h=u?a:i;if(h&&typeof h!="boolean"&&!is(h)){const p=Array.isArray(h)?h:[h];for(let m=0;m<p.length;m++){const b=xn(e,p[m]);if(b){const{transitionEnd:w,transition:C,...x}=b;for(const v in x){let y=x[v];if(Array.isArray(y)){const E=u?y.length-1:0;y=y[E]}y!==null&&(r[v]=y)}for(const v in w)r[v]=w[v]}}}return r}const Pi=e=>(t,s)=>{const n=g.useContext(rs),r=g.useContext(Jt),o=()=>Hc(e,t,n,r);return s?o():ws(o)};function vn(e,t,s){const{style:n}=e,r={};for(const o in n)($(n[o])||t.style&&$(t.style[o])||Ci(o,e)||s?.getValue(o)?.liveStyle!==void 0)&&(r[o]=n[o]);return r}const Zc=Pi({scrapeMotionValuesFromProps:vn,createRenderState:gn});function Ni(e,t,s){const n=vn(e,t,s);for(const r in e)if($(e[r])||$(t[r])){const o=He.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[o]=e[r]}return n}const $c=Pi({scrapeMotionValuesFromProps:Ni,createRenderState:Si}),eu=Symbol.for("motionComponentSymbol");function tu(e,t,s){const n=g.useRef(s);g.useInsertionEffect(()=>{n.current=s});const r=g.useRef(null);return g.useCallback(o=>{o&&e.onMount?.(o),t&&(o?t.mount(o):t.unmount());const i=n.current;if(typeof i=="function")if(o){const a=i(o);typeof a=="function"&&(r.current=a)}else r.current?(r.current(),r.current=null):i(o);else i&&(i.current=o)},[t])}const bn=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Vi="data-"+bn("framerAppearId"),Mi=g.createContext({});function Et(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function su(e,t,s,n,r,o){const{visualElement:i}=g.useContext(rs),a=g.useContext(yi),c=g.useContext(Jt),d=g.useContext(dn).reducedMotion,u=g.useRef(null);n=n||a.renderer,!u.current&&n&&(u.current=n(e,{visualState:t,parent:i,props:s,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,isSVG:o}));const h=u.current,p=g.useContext(Mi);h&&!h.projection&&r&&(h.type==="html"||h.type==="svg")&&nu(u.current,s,r,p);const m=g.useRef(!1);g.useInsertionEffect(()=>{h&&m.current&&h.update(s,c)});const b=s[Vi],w=g.useRef(!!b&&!window.MotionHandoffIsComplete?.(b)&&window.MotionHasOptimisedAnimation?.(b));return er(()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),w.current&&h.animationState&&h.animationState.animateChanges())}),g.useEffect(()=>{h&&(!w.current&&h.animationState&&h.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(b)}),w.current=!1),h.enteringChildren=void 0)}),h}function nu(e,t,s,n){const{layoutId:r,layout:o,drag:i,dragConstraints:a,layoutScroll:c,layoutRoot:d,layoutCrossfade:u}=t;e.projection=new s(e.latestValues,t["data-framer-portal-id"]?void 0:Di(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!i||a&&Et(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:c,layoutRoot:d})}function Di(e){if(e)return e.options.allowProjection!==!1?e.projection:Di(e.parent)}function wn(e,{forwardMotionProps:t=!1,type:s}={},n,r){n&&Nc(n);const o=s?s==="svg":yn(e),i=o?$c:Zc;function a(d,u){let h;const p={...g.useContext(dn),...d,layoutId:ru(d)},{isStatic:m}=p,b=Lc(d),w=i(d,m);if(!m&&As){iu(p,n);const C=ou(p);h=C.MeasureLayout,b.visualElement=su(e,w,p,r,C.ProjectionNode,o)}return l.jsxs(rs.Provider,{value:b,children:[h&&b.visualElement?l.jsx(h,{visualElement:b.visualElement,...p}):null,Qc(e,d,tu(w,b.visualElement,u),w,m,t,o)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=g.forwardRef(a);return c[eu]=e,c}function ru({layoutId:e}){const t=g.useContext(bs).id;return t&&e!==void 0?t+"-"+e:e}function iu(e,t){const s=g.useContext(yi).strict;if(process.env.NODE_ENV!=="production"&&t&&s){const n="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?ze(!1,n,"lazy-strict-mode"):Se(!1,n,"lazy-strict-mode")}}function ou(e){const{drag:t,layout:s}=$e;if(!t&&!s)return{};const n={...t,...s};return{MeasureLayout:t?.isEnabled(e)||s?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}function au(e,t){if(typeof Proxy>"u")return wn;const s=new Map,n=(o,i)=>wn(o,i,e,t),r=(o,i)=>(process.env.NODE_ENV!=="production"&&js(!1,"motion() is deprecated. Use motion.create() instead."),n(o,i));return new Proxy(r,{get:(o,i)=>i==="create"?n:(s.has(i)||s.set(i,wn(i,void 0,e,t)),s.get(i))})}function Fi({top:e,left:t,right:s,bottom:n}){return{x:{min:t,max:s},y:{min:e,max:n}}}function lu({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function cu(e,t){if(!t)return e;const s=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:s.y,left:s.x,bottom:n.y,right:n.x}}function An(e){return e===void 0||e===1}function Cn({scale:e,scaleX:t,scaleY:s}){return!An(e)||!An(t)||!An(s)}function _e(e){return Cn(e)||Li(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Li(e){return Bi(e.x)||Bi(e.y)}function Bi(e){return e&&e!=="0%"}function ls(e,t,s){const n=e-s,r=t*n;return s+r}function Ri(e,t,s,n,r){return r!==void 0&&(e=ls(e,r,n)),ls(e,s,n)+t}function kn(e,t=0,s=1,n,r){e.min=Ri(e.min,t,s,n,r),e.max=Ri(e.max,t,s,n,r)}function Oi(e,{x:t,y:s}){kn(e.x,t.translate,t.scale,t.originPoint),kn(e.y,s.translate,s.scale,s.originPoint)}const Ii=.999999999999,_i=1.0000000000001;function uu(e,t,s,n=!1){const r=s.length;if(!r)return;t.x=t.y=1;let o,i;for(let a=0;a<r;a++){o=s[a],i=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&o.options.layoutScroll&&o.scroll&&o!==o.root&&tt(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Oi(e,i)),n&&_e(o.latestValues)&&tt(e,o.latestValues))}t.x<_i&&t.x>Ii&&(t.x=1),t.y<_i&&t.y>Ii&&(t.y=1)}function et(e,t){e.min=e.min+t,e.max=e.max+t}function Wi(e,t,s,n,r=.5){const o=W(e.min,e.max,r);kn(e,t,s,o,n)}function tt(e,t){Wi(e.x,t.x,t.scaleX,t.scale,t.originX),Wi(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ui(e,t){return Fi(cu(e.getBoundingClientRect(),t))}function du(e,t,s){const n=Ui(e,s),{scroll:r}=t;return r&&(et(n.x,r.offset.x),et(n.y,r.offset.y)),n}const qi=()=>({translate:0,scale:1,origin:0,originPoint:0}),st=()=>({x:qi(),y:qi()}),Ki=()=>({min:0,max:0}),X=()=>({x:Ki(),y:Ki()}),Tn={current:null},Yi={current:!1};function hu(){if(Yi.current=!0,!!As)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Tn.current=e.matches;e.addEventListener("change",t),t()}else Tn.current=!1}const fu=new WeakMap;function pu(e,t,s){for(const n in t){const r=t[n],o=s[n];if($(r))e.addValue(n,r);else if($(o))e.addValue(n,Ze(r,{owner:e}));else if(o!==r)if(e.hasValue(n)){const i=e.getValue(n);i.liveStyle===!0?i.jump(r):i.hasAnimated||i.set(r)}else{const i=e.getStaticValue(n);e.addValue(n,Ze(i!==void 0?i:r,{owner:e}))}}for(const n in s)t[n]===void 0&&e.removeValue(n);return t}const zi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class mu{scrapeMotionValuesFromProps(t,s,n){return{}}constructor({parent:t,props:s,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=tn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=te.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,_.render(this.render,!1,!0))};const{latestValues:c,renderState:d}=i;this.latestValues=c,this.baseTarget={...c},this.initialValues=s.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=s,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=os(s),this.isVariantNode=bi(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(s,{},this);for(const p in h){const m=h[p];c[p]!==void 0&&$(m)&&m.set(c[p])}}mount(t){this.current=t,fu.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,n)=>this.bindToMotionValue(n,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Yi.current||hu(),this.shouldReduceMotion=Tn.current),process.env.NODE_ENV!=="production"&&js(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Pe(this.notifyUpdate),Pe(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const s=this.features[t];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,s){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Xe.has(t);n&&this.onBindTransform&&this.onBindTransform();const r=s.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&_.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,s)),this.valueSubscriptions.set(t,()=>{r(),o&&o(),s.owner&&s.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in $e){const s=$e[t];if(!s)continue;const{isEnabled:n,Feature:r}=s;if(!this.features[t]&&r&&n(this.props)&&(this.features[t]=new r(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):X()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,s){this.latestValues[t]=s}update(t,s){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let n=0;n<zi.length;n++){const r=zi[n];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const o="on"+r,i=t[o];i&&(this.propEventSubscriptions[r]=this.on(r,i))}this.prevMotionValues=pu(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(t),()=>s.variantChildren.delete(t)}addValue(t,s){const n=this.values.get(t);s!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,s),this.values.set(t,s),this.latestValues[t]=s.get())}removeValue(t){this.values.delete(t);const s=this.valueSubscriptions.get(t);s&&(s(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,s){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&s!==void 0&&(n=Ze(s===null?void 0:s,{owner:this}),this.addValue(t,n)),n}readValue(t,s){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(tr(n)||nr(n))?n=parseFloat(n):!Ac(n)&&Ve.test(s)&&(n=si(t,s)),this.setBaseTarget(t,$(n)?n.get():n)),$(n)?n.get():n}setBaseTarget(t,s){this.baseTarget[t]=s}getBaseTarget(t){const{initial:s}=this.props;let n;if(typeof s=="string"||typeof s=="object"){const o=xn(this.props,s,this.presenceContext?.custom);o&&(n=o[t])}if(s&&n!==void 0)return n;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!$(r)?r:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,s){return this.events[t]||(this.events[t]=new Es),this.events[t].add(s)}notify(t,...s){this.events[t]&&this.events[t].notify(...s)}scheduleRenderMicrotask(){ln.render(this.render)}}class Gi extends mu{constructor(){super(...arguments),this.KeyframeResolver=dc}sortInstanceNodePosition(t,s){return t.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(t,s){return t.style?t.style[s]:void 0}removeValueFromRenderState(t,{vars:s,style:n}){delete s[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;$(t)&&(this.childSubscription=t.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}function Ji(e,{style:t,vars:s},n,r){const o=e.style;let i;for(i in t)o[i]=t[i];r?.applyProjectionStyles(o,n);for(i in s)o.setProperty(i,s[i])}function gu(e){return window.getComputedStyle(e)}class yu extends Gi{constructor(){super(...arguments),this.type="html",this.renderInstance=Ji}readValueFromInstance(t,s){if(Xe.has(s))return this.projection?.isProjecting?Hs(s):Nl(t,s);{const n=gu(t),r=(br(s)?n.getPropertyValue(s):n[s])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:s}){return Ui(t,s)}build(t,s,n){mn(t,s,n.transformTemplate)}scrapeMotionValuesFromProps(t,s,n){return vn(t,s,n)}}const Qi=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function xu(e,t,s,n){Ji(e,t,void 0,n);for(const r in t.attrs)e.setAttribute(Qi.has(r)?r:bn(r),t.attrs[r])}class vu extends Gi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=X}getBaseTargetFromProps(t,s){return t[s]}readValueFromInstance(t,s){if(Xe.has(s)){const n=ti(s);return n&&n.default||0}return s=Qi.has(s)?s:bn(s),t.getAttribute(s)}scrapeMotionValuesFromProps(t,s,n){return Ni(t,s,n)}build(t,s,n){Ti(t,s,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,s,n,r){xu(t,s,n,r)}mount(t){this.isSVGTag=Ei(t.tagName),super.mount(t)}}const bu=(e,t)=>t.isSVG??yn(e)?new vu(t):new yu(t,{allowProjection:e!==g.Fragment});function nt(e,t,s){const n=e.getProps();return xn(n,t,s!==void 0?s:n.custom,e)}const Sn=e=>Array.isArray(e);function wu(e,t,s){e.hasValue(t)?e.getValue(t).set(s):e.addValue(t,Ze(s))}function Au(e){return Sn(e)?e[e.length-1]||0:e}function Cu(e,t){const s=nt(e,t);let{transitionEnd:n={},transition:r={},...o}=s||{};o={...o,...n};for(const i in o){const a=Au(o[i]);wu(e,i,a)}}function ku(e){return!!($(e)&&e.add)}function En(e,t){const s=e.getValue("willChange");if(ku(s))return s.add(t);if(!s&&Ee.WillChange){const n=new Ee.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function Hi(e){return e.props[Vi]}const Tu=e=>e!==null;function Su(e,{repeat:t,repeatType:s="loop"},n){const r=e.filter(Tu),o=t&&s!=="loop"&&t%2===1?0:r.length-1;return r[o]}const Eu={type:"spring",stiffness:500,damping:25,restSpeed:10},ju=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Pu={type:"keyframes",duration:.8},Nu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Vu=(e,{keyframes:t})=>t.length>2?Pu:Xe.has(e)?e.startsWith("scale")?ju(t[1]):Eu:Nu;function Mu({when:e,delay:t,delayChildren:s,staggerChildren:n,staggerDirection:r,repeat:o,repeatType:i,repeatDelay:a,from:c,elapsed:d,...u}){return!!Object.keys(u).length}const jn=(e,t,s,n={},r,o)=>i=>{const a=rn(n,e)||{},c=a.delay||n.delay||0;let{elapsed:d=0}=n;d=d-we(c);const u={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-d,onUpdate:p=>{t.set(p),a.onUpdate&&a.onUpdate(p)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:r};Mu(a)||Object.assign(u,Vu(e,u)),u.duration&&(u.duration=we(u.duration)),u.repeatDelay&&(u.repeatDelay=we(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(nn(u),u.delay===0&&(h=!0)),(Ee.instantAnimations||Ee.skipAnimations)&&(h=!0,nn(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!o&&t.get()!==void 0){const p=Su(u.keyframes,a);if(p!==void 0){_.update(()=>{u.onUpdate(p),u.onComplete()});return}}return a.isSync?new Gs(u):new $l(u)};function Du({protectedKeys:e,needsAnimating:t},s){const n=e.hasOwnProperty(s)&&t[s]!==!0;return t[s]=!1,n}function Xi(e,t,{delay:s=0,transitionOverride:n,type:r}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:i,...a}=t;n&&(o=n);const c=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const u in a){const h=e.getValue(u,e.latestValues[u]??null),p=a[u];if(p===void 0||d&&Du(d,u))continue;const m={delay:s,...rn(o||{},u)},b=h.get();if(b!==void 0&&!h.isAnimating&&!Array.isArray(p)&&p===b&&!m.velocity)continue;let w=!1;if(window.MotionHandoffAnimation){const x=Hi(e);if(x){const v=window.MotionHandoffAnimation(x,u,_);v!==null&&(m.startTime=v,w=!0)}}En(e,u),h.start(jn(u,h,p,e.shouldReduceMotion&&Hr.has(u)?{type:!1}:m,e,w));const C=h.animation;C&&c.push(C)}return i&&Promise.all(c).then(()=>{_.update(()=>{i&&Cu(e,i)})}),c}function Zi(e,t,s,n=0,r=1){const o=Array.from(e).sort((d,u)=>d.sortNodePosition(u)).indexOf(t),i=e.size,a=(i-1)*n;return typeof s=="function"?s(o,i):r===1?o*n:a-o*n}function Pn(e,t,s={}){const n=nt(e,t,s.type==="exit"?e.presenceContext?.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=n||{};s.transitionOverride&&(r=s.transitionOverride);const o=n?()=>Promise.all(Xi(e,n,s)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:u,staggerDirection:h}=r;return Fu(e,t,c,d,u,h,s)}:()=>Promise.resolve(),{when:a}=r;if(a){const[c,d]=a==="beforeChildren"?[o,i]:[i,o];return c().then(()=>d())}else return Promise.all([o(),i(s.delay)])}function Fu(e,t,s=0,n=0,r=0,o=1,i){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(Pn(c,t,{...i,delay:s+(typeof n=="function"?0:n)+Zi(e.variantChildren,c,n,r,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function Lu(e,t,s={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const r=t.map(o=>Pn(e,o,s));n=Promise.all(r)}else if(typeof t=="string")n=Pn(e,t,s);else{const r=typeof t=="function"?nt(e,t,s.custom):t;n=Promise.all(Xi(e,r,s))}return n.then(()=>{e.notify("AnimationComplete",t)})}function $i(e,t){if(!Array.isArray(t))return!1;const s=t.length;if(s!==e.length)return!1;for(let n=0;n<s;n++)if(t[n]!==e[n])return!1;return!0}const Bu=fn.length;function eo(e){if(!e)return;if(!e.isControllingVariants){const s=e.parent?eo(e.parent)||{}:{};return e.props.initial!==void 0&&(s.initial=e.props.initial),s}const t={};for(let s=0;s<Bu;s++){const n=fn[s],r=e.props[n];(Tt(r)||r===!1)&&(t[n]=r)}return t}const Ru=[...hn].reverse(),Ou=hn.length;function Iu(e){return t=>Promise.all(t.map(({animation:s,options:n})=>Lu(e,s,n)))}function _u(e){let t=Iu(e),s=to(),n=!0;const r=c=>(d,u)=>{const h=nt(e,u,c==="exit"?e.presenceContext?.custom:void 0);if(h){const{transition:p,transitionEnd:m,...b}=h;d={...d,...b,...m}}return d};function o(c){t=c(e)}function i(c){const{props:d}=e,u=eo(e.parent)||{},h=[],p=new Set;let m={},b=1/0;for(let C=0;C<Ou;C++){const x=Ru[C],v=s[x],y=d[x]!==void 0?d[x]:u[x],E=Tt(y),P=x===c?v.isActive:null;P===!1&&(b=C);let D=y===u[x]&&y!==d[x]&&E;if(D&&n&&e.manuallyAnimateOnMount&&(D=!1),v.protectedKeys={...m},!v.isActive&&P===null||!y&&!v.prevProp||is(y)||typeof y=="boolean")continue;const N=Wu(v.prevProp,y);let j=N||x===c&&v.isActive&&!D&&E||C>b&&E,R=!1;const Q=Array.isArray(y)?y:[y];let ne=Q.reduce(r(x),{});P===!1&&(ne={});const{prevResolvedValues:he={}}=v,ie={...he,...ne},fe=q=>{j=!0,p.has(q)&&(R=!0,p.delete(q)),v.needsAnimating[q]=!0;const K=e.getValue(q);K&&(K.liveStyle=!1)};for(const q in ie){const K=ne[q],oe=he[q];if(m.hasOwnProperty(q))continue;let ee=!1;Sn(K)&&Sn(oe)?ee=!$i(K,oe):ee=K!==oe,ee?K!=null?fe(q):p.add(q):K!==void 0&&p.has(q)?fe(q):v.protectedKeys[q]=!0}v.prevProp=y,v.prevResolvedValues=ne,v.isActive&&(m={...m,...ne}),n&&e.blockInitialAnimation&&(j=!1);const pe=D&&N;j&&(!pe||R)&&h.push(...Q.map(q=>{const K={type:x};if(typeof q=="string"&&n&&!pe&&e.manuallyAnimateOnMount&&e.parent){const{parent:oe}=e,ee=nt(oe,q);if(oe.enteringChildren&&ee){const{delayChildren:Ue}=ee.transition||{};K.delay=Zi(oe.enteringChildren,e,Ue)}}return{animation:q,options:K}}))}if(p.size){const C={};if(typeof d.initial!="boolean"){const x=nt(e,Array.isArray(d.initial)?d.initial[0]:d.initial);x&&x.transition&&(C.transition=x.transition)}p.forEach(x=>{const v=e.getBaseTarget(x),y=e.getValue(x);y&&(y.liveStyle=!0),C[x]=v??null}),h.push({animation:C})}let w=!!h.length;return n&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(w=!1),n=!1,w?t(h):Promise.resolve()}function a(c,d){if(s[c].isActive===d)return Promise.resolve();e.variantChildren?.forEach(h=>h.animationState?.setActive(c,d)),s[c].isActive=d;const u=i(c);for(const h in s)s[h].protectedKeys={};return u}return{animateChanges:i,setActive:a,setAnimateFunction:o,getState:()=>s,reset:()=>{s=to()}}}function Wu(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!$i(t,e):!1}function We(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function to(){return{animate:We(!0),whileInView:We(),whileHover:We(),whileTap:We(),whileDrag:We(),whileFocus:We(),exit:We()}}class De{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Uu extends De{constructor(t){super(t),t.animationState||(t.animationState=_u(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();is(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:s}=this.node.prevProps||{};t!==s&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let qu=0;class Ku extends De{constructor(){super(...arguments),this.id=qu++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:s}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const r=this.node.animationState.setActive("exit",!t);s&&!t&&r.then(()=>{s(this.id)})}mount(){const{register:t,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Yu={animation:{Feature:Uu},exit:{Feature:Ku}};function jt(e,t,s,n={passive:!0}){return e.addEventListener(t,s,n),()=>e.removeEventListener(t,s)}function Pt(e){return{point:{x:e.pageX,y:e.pageY}}}const zu=e=>t=>cn(t)&&e(t,Pt(t));function Nt(e,t,s,n){return jt(e,t,zu(s),n)}const so=1e-4,Gu=1-so,Ju=1+so,no=.01,Qu=0-no,Hu=0+no;function se(e){return e.max-e.min}function Xu(e,t,s){return Math.abs(e-t)<=s}function ro(e,t,s,n=.5){e.origin=n,e.originPoint=W(t.min,t.max,e.origin),e.scale=se(s)/se(t),e.translate=W(s.min,s.max,e.origin)-e.originPoint,(e.scale>=Gu&&e.scale<=Ju||isNaN(e.scale))&&(e.scale=1),(e.translate>=Qu&&e.translate<=Hu||isNaN(e.translate))&&(e.translate=0)}function Vt(e,t,s,n){ro(e.x,t.x,s.x,n?n.originX:void 0),ro(e.y,t.y,s.y,n?n.originY:void 0)}function io(e,t,s){e.min=s.min+t.min,e.max=e.min+se(t)}function Zu(e,t,s){io(e.x,t.x,s.x),io(e.y,t.y,s.y)}function oo(e,t,s){e.min=t.min-s.min,e.max=e.min+se(t)}function cs(e,t,s){oo(e.x,t.x,s.x),oo(e.y,t.y,s.y)}function de(e){return[e("x"),e("y")]}const ao=({current:e})=>e?e.ownerDocument.defaultView:null,lo=(e,t)=>Math.abs(e-t);function $u(e,t){const s=lo(e.x,t.x),n=lo(e.y,t.y);return Math.sqrt(s**2+n**2)}const co=new Set(["auto","scroll"]);class uo{constructor(t,s,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:i=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Vn(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,w=$u(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!b&&!w)return;const{point:C}=m,{timestamp:x}=Z;this.history.push({...C,timestamp:x});const{onStart:v,onMove:y}=this.handlers;b||(v&&v(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,m)},this.handlePointerMove=(m,b)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=Nn(b,this.transformPagePoint),_.update(this.updatePoint,!0)},this.handlePointerUp=(m,b)=>{this.end();const{onEnd:w,onSessionEnd:C,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Vn(m.type==="pointercancel"?this.lastMoveEventInfo:Nn(b,this.transformPagePoint),this.history);this.startEvent&&w&&w(m,v),C&&C(m,v)},!cn(t))return;this.dragSnapToOrigin=o,this.handlers=s,this.transformPagePoint=n,this.distanceThreshold=i,this.contextWindow=r||window;const c=Pt(t),d=Nn(c,this.transformPagePoint),{point:u}=d,{timestamp:h}=Z;this.history=[{...u,timestamp:h}];const{onSessionStart:p}=s;p&&p(t,Vn(d,this.history)),this.removeListeners=yt(Nt(this.contextWindow,"pointermove",this.handlePointerMove),Nt(this.contextWindow,"pointerup",this.handlePointerUp),Nt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let s=t.parentElement;for(;s;){const n=getComputedStyle(s);(co.has(n.overflowX)||co.has(n.overflowY))&&this.scrollPositions.set(s,{x:s.scrollLeft,y:s.scrollTop}),s=s.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const s=this.scrollPositions.get(t);if(!s)return;const n=t===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:r.x-s.x,y:r.y-s.y};o.x===0&&o.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,r),_.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Pe(this.updatePoint)}}function Nn(e,t){return t?{point:t(e.point)}:e}function ho(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vn({point:e},t){return{point:e,delta:ho(e,fo(t)),offset:ho(e,ed(t)),velocity:td(t,.1)}}function ed(e){return e[0]}function fo(e){return e[e.length-1]}function td(e,t){if(e.length<2)return{x:0,y:0};let s=e.length-1,n=null;const r=fo(e);for(;s>=0&&(n=e[s],!(r.timestamp-n.timestamp>we(t)));)s--;if(!n)return{x:0,y:0};const o=ue(r.timestamp-n.timestamp);if(o===0)return{x:0,y:0};const i={x:(r.x-n.x)/o,y:(r.y-n.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function sd(e,{min:t,max:s},n){return t!==void 0&&e<t?e=n?W(t,e,n.min):Math.max(e,t):s!==void 0&&e>s&&(e=n?W(s,e,n.max):Math.min(e,s)),e}function po(e,t,s){return{min:t!==void 0?e.min+t:void 0,max:s!==void 0?e.max+s-(e.max-e.min):void 0}}function nd(e,{top:t,left:s,bottom:n,right:r}){return{x:po(e.x,s,r),y:po(e.y,t,n)}}function mo(e,t){let s=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([s,n]=[n,s]),{min:s,max:n}}function rd(e,t){return{x:mo(e.x,t.x),y:mo(e.y,t.y)}}function id(e,t){let s=.5;const n=se(e),r=se(t);return r>n?s=xt(t.min,t.max-n,e.min):n>r&&(s=xt(e.min,e.max-r,t.min)),be(0,1,s)}function od(e,t){const s={};return t.min!==void 0&&(s.min=t.min-e.min),t.max!==void 0&&(s.max=t.max-e.min),s}const Mn=.35;function ad(e=Mn){return e===!1?e=0:e===!0&&(e=Mn),{x:go(e,"left","right"),y:go(e,"top","bottom")}}function go(e,t,s){return{min:yo(e,t),max:yo(e,s)}}function yo(e,t){return typeof e=="number"?e:e[t]||0}const ld=new WeakMap;class cd{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=X(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:s=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=h=>{s?(this.stopAnimation(),this.snapToCursor(Pt(h).point)):this.pauseAnimation()},i=(h,p)=>{this.stopAnimation();const{drag:m,dragPropagation:b,onDragStart:w}=this.getProps();if(m&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=mc(m),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),de(x=>{let v=this.getAxisMotionValue(x).get()||0;if(Ae.test(v)){const{projection:y}=this.visualElement;if(y&&y.layout){const E=y.layout.layoutBox[x];E&&(v=se(E)*(parseFloat(v)/100))}}this.originPoint[x]=v}),w&&_.postRender(()=>w(h,p)),En(this.visualElement,"transform");const{animationState:C}=this.visualElement;C&&C.setActive("whileDrag",!0)},a=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p;const{dragPropagation:m,dragDirectionLock:b,onDirectionLock:w,onDrag:C}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:x}=p;if(b&&this.currentDirection===null){this.currentDirection=ud(x),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",p.point,x),this.updateAxis("y",p.point,x),this.visualElement.render(),C&&C(h,p)},c=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p,this.stop(h,p),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>de(h=>this.getAnimationState(h)==="paused"&&this.getAxisMotionValue(h).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new uo(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:ao(this.visualElement),element:this.visualElement.current})}stop(t,s){const n=t||this.latestPointerEvent,r=s||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&_.postRender(()=>a(n,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:s}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}updateAxis(t,s,n){const{drag:r}=this.getProps();if(!n||!us(t,r,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(i=sd(i,this.constraints[t],this.elastic[t])),o.set(i)}resolveConstraints(){const{dragConstraints:t,dragElastic:s}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;t&&Et(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=nd(n.layoutBox,t):this.constraints=!1,this.elastic=ad(s),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&de(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=od(n.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:s}=this.getProps();if(!t||!Et(t))return!1;const n=t.current;Se(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=du(n,r.root,this.visualElement.getTransformPagePoint());let i=rd(r.layout.layoutBox,o);if(s){const a=s(lu(i));this.hasMutatedConstraints=!!a,a&&(i=Fi(a))}return i}startAnimation(t){const{drag:s,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},d=de(u=>{if(!us(u,s,this.currentDirection))return;let h=c&&c[u]||{};i&&(h={min:0,max:0});const p=r?200:1e6,m=r?40:1e7,b={type:"inertia",velocity:n?t[u]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,b)});return Promise.all(d).then(a)}startAxisValueAnimation(t,s){const n=this.getAxisMotionValue(t);return En(this.visualElement,t),n.start(jn(t,n,0,s,this.visualElement,!1))}stopAnimation(){de(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){de(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const s=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),r=n[s];return r||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){de(s=>{const{drag:n}=this.getProps();if(!us(s,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(s);if(r&&r.layout){const{min:i,max:a}=r.layout.layoutBox[s],c=o.get()||0;o.set(t[s]-W(i,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:s}=this.getProps(),{projection:n}=this.visualElement;if(!Et(s)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};de(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const c=a.get();r[i]=id({min:c,max:c},this.constraints[i])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),de(i=>{if(!us(i,t,null))return;const a=this.getAxisMotionValue(i),{min:c,max:d}=this.constraints[i];a.set(W(c,d,r[i]))})}addListeners(){if(!this.visualElement.current)return;ld.set(this.visualElement,this);const t=this.visualElement.current,s=Nt(t,"pointerdown",c=>{const{drag:d,dragListener:u=!0}=this.getProps();d&&u&&!ui(c.target)&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();Et(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,o=r.addEventListener("measure",n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),_.read(n);const i=jt(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(de(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=c[u].translate,h.set(h.get()+c[u].translate))}),this.visualElement.render())}));return()=>{i(),s(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=Mn,dragMomentum:a=!0}=t;return{...t,drag:s,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function us(e,t,s){return(t===!0||t===e)&&(s===null||s===e)}function ud(e,t=10){let s=null;return Math.abs(e.y)>t?s="y":Math.abs(e.x)>t&&(s="x"),s}class dd extends De{constructor(t){super(t),this.removeGroupControls=ce,this.removeListeners=ce,this.controls=new cd(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ce}update(){const{dragControls:t}=this.node.getProps(),{dragControls:s}=this.node.prevProps||{};t!==s&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const xo=e=>(t,s)=>{e&&_.postRender(()=>e(t,s))};class hd extends De{constructor(){super(...arguments),this.removePointerDownListener=ce}onPointerDown(t){this.session=new uo(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ao(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:s,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:xo(t),onStart:xo(s),onMove:n,onEnd:(o,i)=>{delete this.session,r&&_.postRender(()=>r(o,i))}}}mount(){this.removePointerDownListener=Nt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ds={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Dn=!1;class fd extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=t;o&&(s.group&&s.group.add(o),n&&n.register&&r&&n.register(o),Dn&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),ds.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:s,visualElement:n,drag:r,isPresent:o}=this.props,{projection:i}=n;return i&&(i.isPresent=o,Dn=!0,r||t.layoutDependency!==s||s===void 0||t.isPresent!==o?i.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?i.promote():i.relegate()||_.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ln.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:n}=this.props,{projection:r}=t;Dn=!0,r&&(r.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function vo(e){const[t,s]=mi(),n=g.useContext(bs);return l.jsx(fd,{...e,layoutGroup:n,switchLayoutGroup:g.useContext(Mi),isPresent:t,safeToRemove:s})}function pd(e,t,s){const n=$(e)?e:Ze(e);return n.start(jn("",n,t,s)),n.animation}const md=(e,t)=>e.depth-t.depth;class gd{constructor(){this.children=[],this.isDirty=!1}add(t){Cs(this.children,t),this.isDirty=!0}remove(t){ks(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(md),this.isDirty=!1,this.children.forEach(t)}}function yd(e,t){const s=te.now(),n=({timestamp:r})=>{const o=r-s;o>=t&&(Pe(n),e(o-t))};return _.setup(n,!0),()=>Pe(n)}const bo=["TopLeft","TopRight","BottomLeft","BottomRight"],xd=bo.length,wo=e=>typeof e=="string"?parseFloat(e):e,Ao=e=>typeof e=="number"||S.test(e);function vd(e,t,s,n,r,o){r?(e.opacity=W(0,s.opacity??1,bd(n)),e.opacityExit=W(t.opacity??1,0,wd(n))):o&&(e.opacity=W(t.opacity??1,s.opacity??1,n));for(let i=0;i<xd;i++){const a=`border${bo[i]}Radius`;let c=Co(t,a),d=Co(s,a);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||Ao(c)===Ao(d)?(e[a]=Math.max(W(wo(c),wo(d),n),0),(Ae.test(d)||Ae.test(c))&&(e[a]+="%")):e[a]=d}(t.rotate||s.rotate)&&(e.rotate=W(t.rotate||0,s.rotate||0,n))}function Co(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const bd=ko(0,.5,hr),wd=ko(.5,.95,ce);function ko(e,t,s){return n=>n<e?0:n>t?1:s(xt(e,t,n))}function To(e,t){e.min=t.min,e.max=t.max}function xe(e,t){To(e.x,t.x),To(e.y,t.y)}function So(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Eo(e,t,s,n,r){return e-=t,e=ls(e,1/s,n),r!==void 0&&(e=ls(e,1/r,n)),e}function Ad(e,t=0,s=1,n=.5,r,o=e,i=e){if(Ae.test(t)&&(t=parseFloat(t),t=W(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=W(o.min,o.max,n);e===o&&(a-=t),e.min=Eo(e.min,t,s,a,r),e.max=Eo(e.max,t,s,a,r)}function jo(e,t,[s,n,r],o,i){Ad(e,t[s],t[n],t[r],t.scale,o,i)}const Cd=["x","scaleX","originX"],kd=["y","scaleY","originY"];function Po(e,t,s,n){jo(e.x,t,Cd,s?s.x:void 0,n?n.x:void 0),jo(e.y,t,kd,s?s.y:void 0,n?n.y:void 0)}function No(e){return e.translate===0&&e.scale===1}function Vo(e){return No(e.x)&&No(e.y)}function Mo(e,t){return e.min===t.min&&e.max===t.max}function Td(e,t){return Mo(e.x,t.x)&&Mo(e.y,t.y)}function Do(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Fo(e,t){return Do(e.x,t.x)&&Do(e.y,t.y)}function Lo(e){return se(e.x)/se(e.y)}function Bo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Sd{constructor(){this.members=[]}add(t){Cs(this.members,t),t.scheduleRender()}remove(t){if(ks(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(t){const s=this.members.findIndex(r=>t===r);if(s===0)return!1;let n;for(let r=s;r>=0;r--){const o=this.members[r];if(o.isPresent!==!1){n=o;break}}return n?(this.promote(n),!0):!1}promote(t,s){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,s&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:s,resumingFrom:n}=t;s.onExitComplete&&s.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Ed(e,t,s){let n="";const r=e.x.translate/t.x,o=e.y.translate/t.y,i=s?.z||0;if((r||o||i)&&(n=`translate3d(${r}px, ${o}px, ${i}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),s){const{transformPerspective:d,rotate:u,rotateX:h,rotateY:p,skewX:m,skewY:b}=s;d&&(n=`perspective(${d}px) ${n}`),u&&(n+=`rotate(${u}deg) `),h&&(n+=`rotateX(${h}deg) `),p&&(n+=`rotateY(${p}deg) `),m&&(n+=`skewX(${m}deg) `),b&&(n+=`skewY(${b}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(n+=`scale(${a}, ${c})`),n||"none"}const Fn=["","X","Y","Z"],jd=1e3;let Pd=0;function Ln(e,t,s,n){const{latestValues:r}=t;r[e]&&(s[e]=r[e],t.setStaticValue(e,0),n&&(n[e]=0))}function Ro(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const s=Hi(t);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:r,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",_,!(r||o))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&Ro(n)}function Oo({attachResizeListener:e,defaultParent:t,measureScroll:s,checkIsScrollRoot:n,resetTransform:r}){return class{constructor(i={},a=t?.()){this.id=Pd++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Md),this.nodes.forEach(Bd),this.nodes.forEach(Rd),this.nodes.forEach(Dd)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new gd)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Es),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const c=this.eventHandlers.get(i);c&&c.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=fi(i)&&!bc(i),this.instance=i;const{layoutId:a,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let u,h=0;const p=()=>this.root.updateBlockedByResize=!1;_.read(()=>{h=window.innerWidth}),e(i,()=>{const m=window.innerWidth;m!==h&&(h=m,this.root.updateBlockedByResize=!0,u&&u(),u=yd(p,250),ds.hasAnimatedSinceResize&&(ds.hasAnimatedSinceResize=!1,this.nodes.forEach(Wo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&d&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||d.getDefaultTransition()||Ud,{onLayoutAnimationStart:w,onLayoutAnimationComplete:C}=d.getProps(),x=!this.targetLayout||!Fo(this.targetLayout,m),v=!h&&p;if(this.options.layoutRoot||this.resumeFrom||v||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...rn(b,"layout"),onPlay:w,onComplete:C};(d.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(u,v)}else h||Wo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Pe(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Od),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ro(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Io);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(_o);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ld),this.nodes.forEach(Nd),this.nodes.forEach(Vd)):this.nodes.forEach(_o),this.clearAllSnapshots();const a=te.now();Z.delta=be(0,16.666666666666668,a-Z.timestamp),Z.timestamp=a,Z.isProcessing=!0,Vs.update.process(Z),Vs.preRender.process(Z),Vs.render.process(Z),Z.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ln.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Fd),this.sharedNodes.forEach(Id)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!se(this.snapshot.measuredBox.x)&&!se(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=X(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&this.instance){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:c,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!r)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Vo(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,u=d!==this.prevTransformTemplateValue;i&&this.instance&&(a||_e(this.latestValues)||u)&&(r(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return i&&(c=this.removeTransform(c)),qd(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return X();const a=i.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Kd))){const{scroll:d}=this.root;d&&(et(a.x,d.offset.x),et(a.y,d.offset.y))}return a}removeElementScroll(i){const a=X();if(xe(a,i),this.scroll?.wasRoot)return a;for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:u,options:h}=d;d!==this.root&&u&&h.layoutScroll&&(u.wasRoot&&xe(a,i),et(a.x,u.offset.x),et(a.y,u.offset.y))}return a}applyTransform(i,a=!1){const c=X();xe(c,i);for(let d=0;d<this.path.length;d++){const u=this.path[d];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&tt(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),_e(u.latestValues)&&tt(c,u.latestValues)}return _e(this.latestValues)&&tt(c,this.latestValues),c}removeTransform(i){const a=X();xe(a,i);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!d.instance||!_e(d.latestValues))continue;Cn(d.latestValues)&&d.updateSnapshot();const u=X(),h=d.measurePageBox();xe(u,h),Po(a,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,u)}return _e(this.latestValues)&&Po(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Z.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=Z.timestamp;const p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=X(),this.targetWithTransforms=X()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Zu(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):xe(this.target,this.layout.layoutBox),Oi(this.target,this.targetDelta)):xe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Cn(this.parent.latestValues)||Li(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(i,a,c){this.relativeParent=i,this.linkedParentVersion=i.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=X(),this.relativeTargetOrigin=X(),cs(this.relativeTargetOrigin,a,c),xe(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const i=this.getLead(),a=!!this.resumingFrom||this!==i;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Z.timestamp&&(c=!1),c)return;const{layout:d,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||u))return;xe(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;uu(this.layoutCorrected,this.treeScale,this.path,a),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=X());const{target:m}=i;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(So(this.prevProjectionDelta.x,this.projectionDelta.x),So(this.prevProjectionDelta.y,this.projectionDelta.y)),Vt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==p||!Bo(this.projectionDelta.x,this.prevProjectionDelta.x)||!Bo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.visualElement?.scheduleRender(),i){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=st(),this.projectionDelta=st(),this.projectionDeltaWithTransform=st()}setAnimationOrigin(i,a=!1){const c=this.snapshot,d=c?c.latestValues:{},u={...this.latestValues},h=st();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=X(),m=c?c.source:void 0,b=this.layout?this.layout.source:void 0,w=m!==b,C=this.getStack(),x=!C||C.members.length<=1,v=!!(w&&!x&&this.options.crossfade===!0&&!this.path.some(Wd));this.animationProgress=0;let y;this.mixTargetDelta=E=>{const P=E/1e3;Uo(h.x,i.x,P),Uo(h.y,i.y,P),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(cs(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),_d(this.relativeTarget,this.relativeTargetOrigin,p,P),y&&Td(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=X()),xe(y,this.relativeTarget)),w&&(this.animationValues=u,vd(u,d,this.latestValues,P,v,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Pe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_.update(()=>{ds.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ze(0)),this.currentAnimation=pd(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(jd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:c,layout:d,latestValues:u}=i;if(!(!a||!c||!d)){if(this!==i&&this.layout&&d&&Go(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||X();const h=se(this.layout.layoutBox.x);c.x.min=i.target.x.min,c.x.max=c.x.min+h;const p=se(this.layout.layoutBox.y);c.y.min=i.target.y.min,c.y.max=c.y.min+p}xe(a,c),tt(a,u),Vt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Sd),this.sharedNodes.get(i).add(a);const d=a.options.initialPromotionConfig;a.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){const{layoutId:i}=this.options;return i?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:i}=this.options;return i?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:c}=i;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const d={};c.z&&Ln("z",i,d,this.animationValues);for(let u=0;u<Fn.length;u++)Ln(`rotate${Fn[u]}`,i,d,this.animationValues),Ln(`skew${Fn[u]}`,i,d,this.animationValues);i.render();for(const u in d)i.setStaticValue(u,d[u]),this.animationValues&&(this.animationValues[u]=d[u]);i.scheduleRender()}applyProjectionStyles(i,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=as(a?.pointerEvents)||"",i.transform=c?c(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=as(a?.pointerEvents)||""),this.hasProjected&&!_e(this.latestValues)&&(i.transform=c?c({},""):"none",this.hasProjected=!1);return}i.visibility="";const u=d.animationValues||d.latestValues;this.applyTransformsToTarget();let h=Ed(this.projectionDeltaWithTransform,this.treeScale,u);c&&(h=c(u,h)),i.transform=h;const{x:p,y:m}=this.projectionDelta;i.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?i.opacity=d===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:i.opacity=d===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const b in pn){if(u[b]===void 0)continue;const{correct:w,applyTo:C,isCSSVariable:x}=pn[b],v=h==="none"?u[b]:w(u[b],d);if(C){const y=C.length;for(let E=0;E<y;E++)i[C[E]]=v}else x?this.options.visualElement.renderState.vars[b]=v:i[b]=v}this.options.layoutId&&(i.pointerEvents=d===this?as(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>i.currentAnimation?.stop()),this.root.nodes.forEach(Io),this.root.sharedNodes.clear()}}}function Nd(e){e.updateLayout()}function Vd(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:n}=e.layout,{animationType:r}=e.options,o=t.source!==e.layout.source;r==="size"?de(u=>{const h=o?t.measuredBox[u]:t.layoutBox[u],p=se(h);h.min=s[u].min,h.max=h.min+p}):Go(r,t.layoutBox,s)&&de(u=>{const h=o?t.measuredBox[u]:t.layoutBox[u],p=se(s[u]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+p)});const i=st();Vt(i,s,t.layoutBox);const a=st();o?Vt(a,e.applyTransform(n,!0),t.measuredBox):Vt(a,s,t.layoutBox);const c=!Vo(i);let d=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:p}=u;if(h&&p){const m=X();cs(m,t.layoutBox,h.layoutBox);const b=X();cs(b,s,p.layoutBox),Fo(m,b)||(d=!0),u.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=m,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:a,layoutDelta:i,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function Md(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Dd(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Fd(e){e.clearSnapshot()}function Io(e){e.clearMeasurements()}function _o(e){e.isLayoutDirty=!1}function Ld(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Wo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Bd(e){e.resolveTargetDelta()}function Rd(e){e.calcProjection()}function Od(e){e.resetSkewAndRotation()}function Id(e){e.removeLeadSnapshot()}function Uo(e,t,s){e.translate=W(t.translate,0,s),e.scale=W(t.scale,1,s),e.origin=t.origin,e.originPoint=t.originPoint}function qo(e,t,s,n){e.min=W(t.min,s.min,n),e.max=W(t.max,s.max,n)}function _d(e,t,s,n){qo(e.x,t.x,s.x,n),qo(e.y,t.y,s.y,n)}function Wd(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Ud={duration:.45,ease:[.4,0,.1,1]},Ko=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Yo=Ko("applewebkit/")&&!Ko("chrome/")?Math.round:ce;function zo(e){e.min=Yo(e.min),e.max=Yo(e.max)}function qd(e){zo(e.x),zo(e.y)}function Go(e,t,s){return e==="position"||e==="preserve-aspect"&&!Xu(Lo(t),Lo(s),.2)}function Kd(e){return e!==e.root&&e.scroll?.wasRoot}const Yd=Oo({attachResizeListener:(e,t)=>jt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Bn={current:void 0},Jo=Oo({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Bn.current){const e=new Yd({});e.mount(window),e.setOptions({layoutScroll:!0}),Bn.current=e}return Bn.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),zd={pan:{Feature:hd},drag:{Feature:dd,ProjectionNode:Jo,MeasureLayout:vo}};function Qo(e,t,s){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",s==="Start");const r="onHover"+s,o=n[r];o&&_.postRender(()=>o(t,Pt(t)))}class Gd extends De{mount(){const{current:t}=this.node;t&&(this.unmount=gc(t,(s,n)=>(Qo(this.node,n,"Start"),r=>Qo(this.node,r,"End"))))}unmount(){}}class Jd extends De{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=yt(jt(this.node.current,"focus",()=>this.onFocus()),jt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ho(e,t,s){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",s==="Start");const r="onTap"+(s==="End"?"":s),o=n[r];o&&_.postRender(()=>o(t,Pt(t)))}class Qd extends De{mount(){const{current:t}=this.node;t&&(this.unmount=vc(t,(s,n)=>(Ho(this.node,n,"Start"),(r,{success:o})=>Ho(this.node,r,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Rn=new WeakMap,On=new WeakMap,Hd=e=>{const t=Rn.get(e.target);t&&t(e)},Xd=e=>{e.forEach(Hd)};function Zd({root:e,...t}){const s=e||document;On.has(s)||On.set(s,{});const n=On.get(s),r=JSON.stringify(t);return n[r]||(n[r]=new IntersectionObserver(Xd,{root:e,...t})),n[r]}function $d(e,t,s){const n=Zd(t);return Rn.set(e,s),n.observe(e),()=>{Rn.delete(e),n.unobserve(e)}}const eh={some:0,all:1};class th extends De{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:s,margin:n,amount:r="some",once:o}=t,i={root:s?s.current:void 0,rootMargin:n,threshold:typeof r=="number"?r:eh[r]},a=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),p=d?u:h;p&&p(c)};return $d(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:s}=this.node;["amount","margin","root"].some(sh(t,s))&&this.startObserver()}unmount(){}}function sh({viewport:e={}},{viewport:t={}}={}){return s=>e[s]!==t[s]}const nh={...Yu,...{inView:{Feature:th},tap:{Feature:Qd},focus:{Feature:Jd},hover:{Feature:Gd}},...zd,...{layout:{ProjectionNode:Jo,MeasureLayout:vo}}},Xo=au(nh,bu),rh=({steps:e,plannerStatus:t,executionStatus:s,reportStatus:n})=>{const{t:r}=le.useTranslation(),o=e??[],[i,a]=g.useState(new Set),[c,d]=g.useState(!1),u=x=>{a(v=>{const y=new Set(v);return y.has(x)?y.delete(x):y.add(x),y})},h=o.findIndex(x=>x.status!=="pending"),p=o.reduce((x,v,y)=>v.status!=="pending"?y:x,-1),m=o.length?o.some(x=>x.status==="in_progress")?"in_progress":o.every(x=>x.status==="done")?"done":o.some(x=>x.status==="done")?"in_progress":"pending":"pending",b=t??(o.length?"done":"pending"),w=s??m,C=n??"pending";return l.jsxs("div",{className:"space-y-6 pr-6",children:[l.jsx("div",{className:"text-sm text-[#333] dark:text-[#E5E7EB]",children:r("deepResearch.steps.intro")}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:`flex items-center gap-2 text-base font-medium ${b==="pending"?"text-[#999] dark:text-[#666]":"text-[#333] dark:text-[#E5E7EB]"}`,children:[b==="in_progress"?l.jsx("div",{className:"w-5 h-5 bg-white dark:bg-[#020817] border-2 border-blue-500 rounded-full flex items-center justify-center",children:l.jsx(V.Loader,{className:"w-3 h-3 text-blue-500 animate-spin"})}):l.jsx(V.PencilLine,{className:`w-4 h-4 ${b==="pending"?"text-[#999]":"text-[#1784FC]"}`}),r("deepResearch.steps.planTitle")]}),l.jsx("div",{className:" text-[#999] dark:text-[#A6A6A6] text-sm mb-2",children:r("deepResearch.steps.planDescription")}),l.jsxs("div",{className:"border border-[#EEF0F3] dark:border-[#1D3A6F] rounded-lg p-3 bg-white dark:bg-[#020817] flex justify-between items-center cursor-pointer hover:bg-gray-50 dark:hover:bg-[#111827] transition-colors",onClick:()=>d(x=>!x),children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm text-[#333] dark:text-[#E5E7EB]",children:[l.jsx(V.List,{className:"w-4 h-4 text-[#1784FC]"}),r("deepResearch.steps.generatedPlans")]}),c?l.jsx(V.ChevronUp,{className:"w-4 h-4 text-gray-400"}):l.jsx(V.ChevronDown,{className:"w-4 h-4 text-gray-400"})]}),c&&o.length>0&&l.jsx("div",{className:"mt-2 space-y-1 rounded-lg bg-white dark:bg-[#020817] border border-[#EEF0F3] dark:border-[#1D3A6F] p-3",children:o.map((x,v)=>l.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[l.jsxs("span",{className:"text-[#999] dark:text-[#A6A6A6]",children:[v+1,"."]}),l.jsx("span",{className:"text-[#333] dark:text-[#E5E7EB]",children:x.title})]},x.id))})]}),l.jsxs("div",{className:"pt-2",children:[l.jsxs("div",{className:`flex items-center gap-2 text-base font-medium mb-4 ${w==="pending"?"text-[#999] dark:text-[#666]":"text-[#333] dark:text-[#E5E7EB]"}`,children:[l.jsx(V.List,{className:"w-4 h-4 text-[#1784FC]"}),r("deepResearch.steps.executeTitle")]}),o.map((x,v)=>{const y=x.status!=="pending",E=v===h,P=v===p,D=x.status==="pending"&&!x.searches;return l.jsxs("div",{className:`relative ${D?"pl-0 pb-4":"pl-6 pb-8 last:pb-0"}`,children:[y&&h!==-1&&p!==-1&&l.jsx("div",{className:"absolute left-2.5 border-l border-dashed border-gray-200 dark:border-gray-700",style:{top:E?10:0,bottom:P?10:0}}),x.status==="done"&&l.jsx("div",{className:"absolute left-0 top-0 w-5 h-5 bg-blue-500 rounded-full flex items-center justify-center",children:l.jsx(V.CheckCircle,{className:"w-3 h-3 text-white"})}),x.status==="in_progress"&&l.jsx("div",{className:"absolute left-0 top-0 w-5 h-5 bg-white dark:bg-[#020817] border-2 border-blue-500 rounded-full flex items-center justify-center",children:l.jsx(V.Loader,{className:"w-3 h-3 text-blue-500 animate-spin"})}),D?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(V.List,{className:"w-4 h-4 text-[#C8C8C8]"}),l.jsx("div",{className:"text-sm text-[#999999] dark:text-[#666]",children:x.title})]}):l.jsxs(l.Fragment,{children:[l.jsx("h3",{className:`text-sm font-bold mb-1 ${x.status==="pending"?"text-[#999999] dark:text-[#666]":"text-[#333333] dark:text-[#E5E7EB]"}`,children:x.title}),x.description&&l.jsx("p",{className:"text-[#999] dark:text-[#A6A6A6] text-sm mt-4",children:x.description}),x.searches&&l.jsxs("div",{className:"mt-2 space-y-3",children:[x.searches.map(N=>N.status==="searching"?l.jsx("div",{className:"flex items-center justify-between border border-blue-100 dark:border-blue-900/30 bg-blue-50/30 dark:bg-blue-900/10 rounded-lg p-3",children:l.jsxs("div",{className:"flex items-center gap-2 text-sm overflow-hidden",children:[l.jsx(V.Search,{className:"w-4 h-4 text-[#1784FC] animate-pulse shrink-0"}),l.jsx("span",{className:"text-[#333] dark:text-[#E5E7EB] shrink-0",children:r("deepResearch.steps.searching")}),l.jsxs("span",{className:"text-[#999] dark:text-[#A6A6A6] truncate",children:["| ",N.query]})]})},N.id):l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between border border-gray-200 dark:border-[#1D3A6F] rounded-lg p-3 bg-gray-50 dark:bg-[#111827] cursor-pointer hover:bg-gray-100 dark:hover:bg-[#1F2937] transition-colors",onClick:()=>u(N.id),children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm overflow-hidden",children:[l.jsx(V.Search,{className:"w-4 h-4 text-[#1784FC] shrink-0"}),l.jsx("span",{className:"text-[#333] dark:text-[#E5E7EB] shrink-0",children:r("deepResearch.steps.searchTitle")}),l.jsxs("span",{className:"text-[#999] dark:text-[#A6A6A6] truncate",children:["| ",N.query]})]}),typeof N.resultCount=="number"&&l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("div",{className:"bg-blue-50 dark:bg-blue-900/20 text-[#1784FC] px-2 py-0.5 rounded-full text-xs font-medium",children:N.resultCount}),i.has(N.id)?l.jsx(V.ChevronUp,{className:"w-4 h-4 text-[#999]"}):l.jsx(V.ChevronDown,{className:"w-4 h-4 text-[#999]"})]})]}),i.has(N.id)&&N.hits&&l.jsx("div",{className:"mt-2 space-y-2 pl-4",children:N.hits.map((j,R)=>l.jsx("div",{className:"p-3 bg-white dark:bg-[#020817] border border-gray-100 dark:border-[#1D3A6F] rounded-lg hover:border-blue-200 dark:hover:border-blue-800 transition-colors cursor-pointer group",onClick:()=>j.url&&window.open(j.url,"_blank"),children:l.jsx("div",{className:"flex items-start gap-2",children:l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("div",{className:"text-sm font-medium text-[#333] dark:text-[#E5E7EB] group-hover:text-[#1784FC] transition-colors line-clamp-1",children:j.title}),j.content&&l.jsx("div",{className:"text-xs text-[#999] dark:text-[#A6A6A6] mt-1 line-clamp-2",children:j.content})]})})},R))}),N.note&&l.jsx("p",{className:"text-[#999] dark:text-[#A6A6A6] text-sm mt-4 mb-2",children:N.note})]},N.id)),x.showOptimizePlan&&l.jsxs("div",{className:"border border-gray-200 dark:border-[#1D3A6F] rounded-lg p-3 bg-white dark:bg-[#020817] flex justify-between items-center cursor-pointer hover:bg-gray-50 dark:hover:bg-[#111827] transition-colors",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx(V.FileText,{className:"w-4 h-4 text-[#1784FC]"}),l.jsx("span",{className:"text-[#333] dark:text-[#E5E7EB]",children:r("deepResearch.steps.optimizePlan")})]}),l.jsx(V.ChevronDown,{className:"w-4 h-4 text-[#999]"})]})]})]})]},x.id)}),l.jsx("div",{className:"pt-2",children:l.jsxs("div",{className:`flex items-center gap-2 text-base font-medium mb-4 ${C==="pending"?"text-[#999] dark:text-[#666]":"text-[#333] dark:text-[#E5E7EB]"}`,children:[C==="in_progress"?l.jsx("div",{className:"w-5 h-5 bg-white dark:bg-[#020817] border-2 border-blue-500 rounded-full flex items-center justify-center",children:l.jsx(V.Loader,{className:"w-3 h-3 text-blue-500 animate-spin"})}):l.jsx(V.BookOpenText,{className:`w-4 h-4 ${C==="pending"?"text-[#999]":"text-[#1784FC]"}`}),r("deepResearch.steps.reportTitle")]})})]})]})},ih=({content:e,data:t,formatUrl:s})=>{const{t:n}=le.useTranslation();return!e&&!t?l.jsxs("div",{className:"px-6 pb-8 max-w-[730px] h-full flex flex-col items-center justify-center text-center",children:[l.jsx("div",{className:"mb-2 text-base font-medium text-[#333333] dark:text-[#E5E7EB]",children:n("deepResearch.report.generatingTitle")}),l.jsx("div",{className:"text-sm text-[#999999] dark:text-[#A6A6A6] max-w-[520px] leading-relaxed",children:n("deepResearch.report.generatingDescription")})]}):l.jsxs("div",{className:"px-2 pb-8 max-w-[730px]",children:[t&&l.jsxs("div",{className:"mb-6 p-4 border border-gray-200 dark:border-gray-800 rounded-xl bg-gray-50 dark:bg-gray-900 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center text-blue-600 dark:text-blue-400",children:l.jsx(V.FileText,{className:"w-6 h-6"})}),l.jsxs("div",{children:[l.jsx("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:t.title||n("deepResearch.report.defaultTitle")}),l.jsx("div",{className:"text-xs text-gray-500",children:t.created?new Date(t.created).toLocaleString():""})]})]}),t.url&&l.jsx("a",{href:s?s({url:t.url}):t.url,target:"_blank",rel:"noopener noreferrer",className:"p-2 text-gray-500 hover:text-blue-600 dark:hover:text-blue-400 transition-colors cursor-pointer",title:n("deepResearch.button.view"),children:l.jsx(V.ExternalLink,{className:"w-5 h-5"})})]}),e&&l.jsx("div",{className:"cm-markdown",children:l.jsx(Kt,{content:e})}),t?.url&&l.jsx("div",{className:"cm-markdown",children:l.jsx(Kt,{url:s?s({url:t.url}):t.url})})]})},oh=({hits:e,theme:t})=>{const s=g.useMemo(()=>{if(!e||!Array.isArray(e))return[];const n=new Map;for(const o of e){if(!o||typeof o!="object")continue;const i=typeof o.title=="string"?o.title:"";i&&(n.has(i)||n.set(i,o))}const r=[];return n.forEach(o=>{const i=typeof o.title=="string"?o.title:"",a=typeof o.url=="string"?o.url:void 0,c=typeof o.content=="string"?o.content:void 0,d={title:i,summary:c,url:a,source:typeof o.source=="string"?{name:o.source}:void 0,metadata:typeof o.score=="number"?{score:o.score}:void 0};r.push(d)}),r},[e]);return l.jsx("div",{className:"pb-8 max-w-[730px]",children:l.jsx(na,{section:s,theme:t||"light",hideHeader:!0,onRecordClick:n=>{typeof n.url=="string"&&window.open(n.url)}})})},Zo=({open:e,onClose:t,defaultActiveTab:s,steps:n,plannerStatus:r,executionStatus:o,reportStatus:i,reportData:a,reportContent:c,searchHits:d,formatUrl:u,theme:h,showReportOnly:p=!1})=>{const{t:m}=le.useTranslation(),[b,w]=g.useState(s||m("deepResearch.tab.steps"));return g.useEffect(()=>{p?w(m("deepResearch.tab.report")):s&&w(s)},[s,p,m]),l.jsx(Pc,{children:e&&l.jsxs(l.Fragment,{children:[l.jsx(Xo.div,{className:"fixed inset-0 z-999 bg-black/20",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t}),l.jsxs(Xo.div,{className:"fixed z-1000 top-20 bottom-20 right-4 flex flex-col rounded-xl overflow-hidden bg-white dark:bg-black shadow-[0_2px_20px_rgba(0,0,0,0.1)] dark:shadow-[0_2px_20px_rgba(255,255,255,0.1)]",initial:{width:0,height:0,opacity:0,padding:0},animate:{width:800,height:"auto",opacity:1,padding:24},exit:{width:0,height:0,opacity:0,padding:0},children:[l.jsxs("div",{className:"flex items-center justify-between",children:[p?l.jsx("div",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-2",children:m("deepResearch.tab.report")}):l.jsx(Jn.Segmented,{className:"cm-deep-research-segmented",value:b,style:{marginBottom:8},onChange:C=>w(C),options:[m("deepResearch.tab.report"),m("deepResearch.tab.steps"),m("deepResearch.tab.searchResults")]}),l.jsxs("div",{className:"flex items-center gap-2",children:[b===m("deepResearch.tab.report")&&l.jsxs(l.Fragment,{children:[l.jsxs("button",{type:"button",className:"flex items-center gap-1 px-2 py-1 rounded-full bg-[#E9F0FE] dark:bg-blue-900/30 text-sm text-[#1784FC] dark:text-blue-400 hover:bg-[#E0E9FD] dark:hover:bg-blue-900/50 border-none outline-none cursor-pointer",onClick:()=>a?.url&&window.open(u?.({url:a.url})||a.url,"_blank"),children:[l.jsx(V.Download,{className:"w-4 h-4"}),l.jsx("span",{children:m("deepResearch.button.download")})]}),l.jsxs("button",{type:"button",className:"flex items-center gap-1 px-2 py-1 rounded-full bg-[#E9F0FE] dark:bg-blue-900/30 text-sm text-[#1784FC] dark:text-blue-400 hover:bg-[#E0E9FD] dark:hover:bg-blue-900/50 border-none outline-none cursor-pointer",children:[l.jsx(V.Share2,{className:"w-4 h-4"}),l.jsx("span",{children:m("deepResearch.button.share")})]})]}),l.jsx(Jn.Button,{type:"text",onClick:t,className:"text-[#999] hover:text-gray-600 flex items-center justify-center",children:l.jsx(V.X,{className:"w-5 h-5"})})]})]}),l.jsxs("div",{className:"pt-6 flex-1 overflow-y-auto bg-white dark:bg-black",children:[b===m("deepResearch.tab.report")&&l.jsx(ih,{content:c,data:a,formatUrl:u}),b===m("deepResearch.tab.steps")&&l.jsx(rh,{steps:n,plannerStatus:r,executionStatus:o,reportStatus:i}),b===m("deepResearch.tab.searchResults")&&l.jsx(oh,{hits:d,theme:h})]})]})]})})},ah=({stepTitle:e,description:t,query:s,statusText:n,resultCount:r,progress:o,steps:i,plannerStatus:a,executionStatus:c,reportStatus:d,reportData:u,reportContent:h,searchHits:p,formatUrl:m,theme:b})=>{const{t:w}=le.useTranslation(),[C,x]=g.useState(!1),[v,y]=g.useState(w("deepResearch.tab.steps")),E=g.useMemo(()=>typeof o!="number"||Number.isNaN(o)||o<0?0:o>1?1:o,[o]),P=g.useMemo(()=>n||(E>=1?typeof r=="number"?w("deepResearch.status.completedWithCount",{count:r}):w("deepResearch.status.completed"):E>0?w("deepResearch.status.running"):w("deepResearch.status.preparing")),[n,E,r,w]);return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"w-full my-3 cursor-pointer",onClick:()=>{y(w("deepResearch.tab.steps")),x(!0)},children:l.jsxs("div",{className:"w-full rounded-xl border border-[#EEF0F3] bg-[#F3F4F6] dark:border-[#1D3A6F] dark:bg-[#020817] p-4",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(V.Hourglass,{className:"h-4 w-4 text-[#148EFF] cm-hourglass-rotate"}),l.jsx("div",{className:"text-sm font-medium text-[#333] dark:text-[#E5E7EB] truncate",children:e})]}),t?l.jsx("div",{className:"text-sm text-[#999] dark:text-[#A6A6A6]",children:t}):null,l.jsxs("div",{className:"mt-2 flex items-center justify-between rounded-full bg-white px-3 py-2 text-sm text-[#333] dark:bg-[#111827] dark:text-[#D1D5DB]",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2 flex-1",children:[E>=1?l.jsx(V.Check,{className:"h-4 w-4 text-[#22C55E] shrink-0"}):l.jsx(V.Loader,{className:"h-4 w-4 animate-spin text-[#148EFF] shrink-0"}),l.jsxs("div",{className:"flex min-w-0 items-center flex-1",children:[l.jsx("span",{className:"whitespace-nowrap shrink-0",children:P}),l.jsxs("span",{className:"text-[#999] dark:text-[#A6A6A6] truncate ml-1",children:["| ",s]})]})]}),l.jsxs("div",{className:"ml-2 flex items-center gap-2 shrink-0",children:[E<1&&typeof r=="number"?l.jsx("div",{className:"flex py-0.5 px-1 items-center justify-center rounded-full border border-[#018AE5] bg-white text-xs font-medium text-[#018AE5] dark:bg-[#020617]",children:r}):null,E>=1&&l.jsx("button",{type:"button",className:"px-3 py-1 text-xs font-medium rounded-full bg-[#E9F0FE] dark:bg-blue-900/30 text-[#1784FC] dark:text-blue-400 hover:bg-[#E0E9FD] dark:hover:bg-blue-900/50 cursor-pointer",onClick:D=>{D.stopPropagation(),y(w("deepResearch.tab.report")),x(!0)},children:w("deepResearch.button.view")})]})]}),l.jsxs("div",{className:"mt-5 w-full flex items-center gap-2 overflow-hidden",children:[l.jsx("div",{className:"h-2 rounded-full flex-1 items-center bg-white dark:bg-[#1F2937]",children:l.jsx("div",{className:`h-full rounded-full transition-all ${E>=1?"bg-[#00C868]":"bg-[#1784FC]"}`,style:{width:`${E*100}%`}})}),l.jsx("div",{className:"flex items-center justify-center cursor-pointer hover:opacity-80 transition-opacity",children:E>=1?l.jsx(V.Check,{className:"h-4 w-4 text-[#22C55E]"}):l.jsx(V.CirclePause,{className:"h-4 w-4 text-[#1784FC]"})})]})]})}),l.jsx(Zo,{open:C,onClose:()=>x(!1),defaultActiveTab:v,steps:i,plannerStatus:a,executionStatus:c,reportStatus:d,reportData:u,reportContent:h,searchHits:p,formatUrl:m,theme:b})]})},lh=({payload:e,formatUrl:t})=>{const[s,n]=g.useState(!1);return!e?.title||!e?.url?null:l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"mt-3",children:l.jsxs("div",{className:"flex items-center gap-3 p-3 bg-gray-50 dark:bg-[#202126] rounded-lg border border-gray-200 dark:border-gray-800 max-w-sm cursor-pointer transition-colors hover:bg-gray-100 dark:hover:bg-gray-800",onClick:()=>n(!0),children:[l.jsx("div",{className:"shrink-0",children:l.jsx(V.FileText,{className:"w-6 h-6 text-blue-500"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-gray-100 truncate",title:e.title,children:e.title}),e.created&&l.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:pa(e.created)})]}),e.url&&l.jsx("a",{href:t?t({url:e.url}):e.url,target:"_blank",rel:"noopener noreferrer",className:"shrink-0 p-2 text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-md transition-colors cursor-pointer",title:"Open Link",onClick:r=>r.stopPropagation(),children:l.jsx(V.ExternalLink,{className:"w-5 h-5"})})]})}),l.jsx(Zo,{open:s,onClose:()=>n(!1),reportContent:e.content,reportData:e,formatUrl:t,showReportOnly:!0})]})};function ch(e){if(e)return e==="light"?"light":e==="dark"||typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}const uh=g.memo(g.forwardRef(function({message:t,isTyping:s,onResend:n,hide_assistant:r=!1,rootClassName:o,actionClassName:i,actionIconSize:a,copyButtonId:c,formatUrl:d,theme:u,locale:h,assistantList:p,currentAssistant:m},b){const{t:w,i18n:C}=le.useTranslation(),x=ch(u),[v,y]=g.useState({}),[E,P]=g.useState([]),[D,N]=g.useState(-1),[j,R]=g.useState(!1),[Q,ne]=g.useState(""),[he,ie]=g.useState(void 0),[fe,pe]=g.useState(!1),[Fe,q]=g.useState(!1),[K,oe]=g.useState(!1),[ee,Ue]=g.useState(!1),[rt,Mt]=g.useState(void 0),[it,Dt]=g.useState({}),{data:{query_intent:Ft,tools:Lt,fetch_source:ot,pick_source:Bt,deep_read:at,think:In,response:lt},handlers:Ce,clearAllChunkData:_n}=ja(),[ve,Le]=g.useState({query_intent:!1,tools:!1,fetch_source:!1,pick_source:!1,deep_read:!1,think:!1,response:!1,deepResearch:!1}),ct=E.length>0&&D>=0&&D<E.length,hs=ct?E[D]:"",ut=E.length>0?1:0,Wn=ct?(D+1)/E.length:0,Un=ee?1:K?.5:0,Rt=(ut+Wn+Un)/3,qn=g.useMemo(()=>{if(ee)return typeof he=="number"?`深度研究完成 · 找到 ${he} 条相关结果`:"深度研究完成";if(K)return"正在编写研究报告";if(Fe)return"正在执行研究计划";if(E.length>0)return"正在规划研究计划"},[ee,he,K,Fe,E.length]),qe=g.useMemo(()=>E.length?E.map((k,F)=>{let z="pending";ee||K?z="done":Fe&&(F<D?z="done":F===D&&(z=j?"done":"in_progress"));const Y=it[k],me=Y?.query?[{id:`step-${F+1}-search-1`,query:Y.query,resultCount:Y.resultCount,status:typeof Y.resultCount=="number"?"done":"searching",hits:Y.hits}]:void 0;return{id:`step-${F+1}`,title:k,status:z,searches:me,showOptimizePlan:!1}}):[],[E,ee,K,Fe,it,D,j]),fs=g.useMemo(()=>{const k=[];return Object.values(it).forEach(F=>{F.hits&&Array.isArray(F.hits)&&k.push(...F.hits)}),k},[it]),ps=E.length?"done":fe?"in_progress":"pending",ms=g.useMemo(()=>qe.length?qe.some(k=>k.status==="in_progress")?"in_progress":qe.some(k=>k.status==="done")?"done":"pending":"pending",[qe]),Kn=ee?"done":K?"in_progress":"pending",Ot=()=>{P([]),N(-1),R(!1),ne(""),ie(void 0),pe(!1),q(!1),oe(!1),Ue(!1),Mt(void 0),Dt({})},gs=k=>{if(k.chunk_type==="research_planner_start"){Ot(),pe(!0);return}if(k.chunk_type==="research_planner_end"){if(typeof k.message_chunk=="string")try{const F=JSON.parse(k.message_chunk);if(Array.isArray(F)){const z=F.map(Y=>String(Y));P(z),N(z.length>0?0:-1)}pe(!1)}catch(F){console.error(F)}return}if(k.chunk_type==="research_researcher_start"){if(typeof k.message_chunk=="string"&&k.message_chunk)try{const F=JSON.parse(k.message_chunk),z=typeof F?.plan=="string"?F.plan:"";z&&(q(!0),R(!1),N(Y=>{const me=E.findIndex(Be=>Be===z);return me!==-1?me:Y>=0?Y:0}))}catch(F){console.error(F)}return}if(k.chunk_type==="research_researcher_step_start"){if(typeof k.message_chunk=="string"&&k.message_chunk)try{const F=JSON.parse(k.message_chunk),z=typeof F?.plan=="string"?F.plan:"",Y=F?.step?.payload?.query;typeof Y=="string"&&ne(Y),ie(void 0),z&&typeof Y=="string"&&Dt(me=>{const Be=me[z]??{};return{...me,[z]:{...Be,query:Y}}})}catch(F){console.error(F)}return}if(k.chunk_type==="research_researcher_step_end"){if(typeof k.message_chunk=="string"&&k.message_chunk)try{const F=JSON.parse(k.message_chunk),z=typeof F?.plan=="string"?F.plan:"",Y=F?.step?.payload?.hits;Array.isArray(Y)&&(ie(Y.length),z&&Dt(me=>{const Be=me[z]??{};return{...me,[z]:{...Be,resultCount:Y.length,hits:Y}}}))}catch(F){console.error(F)}return}if(k.chunk_type==="research_researcher_end"){ne(""),R(!0);return}if(k.chunk_type==="research_reporter_start"){oe(!0);return}if(k.chunk_type==="research_reporter_end"&&(oe(!0),Ue(!0),typeof k.message_chunk=="string"&&k.message_chunk))try{const F=JSON.parse(k.message_chunk);Mt(F)}catch(F){console.error(F)}},dt=g.useRef(!1);g.useImperativeHandle(b,()=>({addChunk:k=>{if(Le(()=>({query_intent:!1,tools:!1,fetch_source:!1,pick_source:!1,deep_read:!1,think:!1,response:!1,deepResearch:!1,[k.chunk_type||""]:!0})),k.chunk_type!=="reply_start")if(k.chunk_type==="query_intent")Ce.deal_query_intent(k);else if(k.chunk_type==="tools")Ce.deal_tools(k);else if(k.chunk_type==="fetch_source")Ce.deal_fetch_source(k);else if(k.chunk_type==="pick_source")Ce.deal_pick_source(k);else if(k.chunk_type==="deep_read")Ce.deal_deep_read(k);else if(k.chunk_type==="think")Ce.deal_think(k);else if(k.chunk_type==="response"){const F=k.message_chunk;if(typeof F=="string"){if(F.includes("<think>")||F.includes("<think>")){dt.current=!0;return}else if(F.includes("</think>")||F.includes("</think>")){dt.current=!1;return}dt.current?Ce.deal_think({...k,chunk_type:"think"}):Ce.deal_response(k)}}else(k.chunk_type==="research_planner_start"||k.chunk_type==="research_planner_end"||k.chunk_type==="research_researcher_start"||k.chunk_type==="research_researcher_step_start"||k.chunk_type==="research_researcher_step_end"||k.chunk_type==="research_researcher_end"||k.chunk_type==="research_reporter_start"||k.chunk_type==="research_reporter_end")&&gs(k)},reset:()=>{_n(),Le({query_intent:!1,tools:!1,fetch_source:!1,pick_source:!1,deep_read:!1,think:!1,response:!1}),Ot(),dt.current=!1}}));const ke=t?._source?.type==="assistant",It=t?._source?.assistant_id,_t=t?._source?.assistant_item;g.useEffect(()=>{h&&C.language!==h&&C.changeLanguage(h)},[h,C]),g.useEffect(()=>{if(_t){y(_t);return}if(ke&&It&&Array.isArray(p)){y(p.find(k=>k._id===It)??{});return}y(m)},[ke,_t,It,p,m]);const Ke=t?._source,ht=Ke?.message||"",Yn=Ke?.payload,Wt=Ke?.attachments??[],je=Ke?.details||[],Te=Ke?.question||"",Ut=s===!1&&(ht||lt?.message_chunk),[qt,ys]=g.useState([]),zn=k=>{ys(k)},xs=()=>ke?l.jsxs(l.Fragment,{children:[l.jsx(da,{Detail:je.find(k=>k.type==="query_intent"),ChunkData:Ft,getSuggestion:zn,loading:ve?.query_intent}),l.jsx(ha,{Detail:je.find(k=>k.type==="tools"),ChunkData:Lt,loading:ve?.tools}),l.jsx(ga,{Detail:je.find(k=>k.type==="fetch_source"),ChunkData:ot,loading:ve?.fetch_source,formatUrl:d}),l.jsx(xa,{Detail:je.find(k=>k.type==="pick_source"),ChunkData:Bt,loading:ve?.pick_source}),l.jsx(ba,{Detail:je.find(k=>k.type==="deep_read"),ChunkData:at,loading:ve?.deep_read}),l.jsx(wa,{Detail:je.find(k=>k.type==="think"),ChunkData:In,loading:ve?.think}),l.jsx("div",{className:"cm-markdown",children:l.jsx(Kt,{content:ht||lt?.message_chunk||""})}),l.jsx(lh,{payload:Yn,formatUrl:d}),(ct||rt)&&l.jsx(ah,{stepTitle:hs,query:Q||Te,resultCount:he,progress:Rt,statusText:qn,steps:qe,plannerStatus:ps,executionStatus:ms,reportStatus:Kn,reportData:rt,searchHits:fs,formatUrl:d,theme:x}),JSON.stringify(rt),s&&l.jsx("div",{className:"inline-block w-1.5 h-5 ml-0.5 -mb-0.5 bg-[#666666] dark:bg-[#A3A3A3] rounded-sm animate-typing"}),Ut&&l.jsx(Ca,{id:t._id??"",content:ht||lt?.message_chunk||"",question:Te,actionClassName:i,actionIconSize:a,copyButtonId:c,onResend:()=>{n&&n(Te)}}),!s&&l.jsx(ka,{suggestions:qt,onSelect:k=>n&&n(k)})]}):l.jsx(Sa,{message:ht,attachments:Wt});return l.jsx("div",{className:pt("w-full py-8 flex",[ke?"justify-start":"justify-end"],x==="dark"&&"dark",o),children:l.jsx("div",{className:`w-full px-4 flex gap-4 ${ke?"w-full":"flex-row-reverse"}`,children:l.jsxs("div",{className:`w-full space-y-2 ${ke?"text-left":"text-right"}`,children:[!r&&l.jsxs("div",{className:"w-full flex items-center gap-1 font-semibold text-sm text-[#333] dark:text-white",children:[ke?l.jsx("div",{className:"w-6 h-6 flex justify-center items-center rounded-full bg-white dark:bg-[#2A2A2A] border border-[#E6E6E6] dark:border-[#3A3A3A]",children:v?._source?.icon?.startsWith("font_")?l.jsx(Ea,{name:v._source.icon,className:"w-4 h-4"}):l.jsx("img",{src:ca,className:"w-4 h-4",alt:w("assistant.message.logo")})}):null,ke?v?._source?.name||"Coco AI":""]}),l.jsx("div",{className:"w-full prose dark:prose-invert prose-sm max-w-none",children:l.jsx("div",{className:"w-full pl-7 text-[#333] dark:text-white leading-relaxed",children:xs()})})]})})})})),dh=g.memo(g.forwardRef((e,t)=>l.jsx(le.I18nextProvider,{i18n:Zn,children:l.jsx(uh,{...e,ref:t})})));return vs.ChatMessage=dh,Object.defineProperty(vs,Symbol.toStringTag,{value:"Module"}),vs})({},React,ReactI18next,clsx,i18n,Markdown,LucideReact,ahooks,attachments,antd,SearchResults);
41
+ `),()=>{y.contains(C)&&y.removeChild(C)}},[t]),l.jsx(ac,{isPresent:t,childRef:i,sizeRef:o,children:At.cloneElement(e,{ref:d})})}const cc=({children:e,initial:t,isPresent:s,onExitComplete:n,custom:r,presenceAffectsLayout:i,mode:o,anchorX:a,root:c})=>{const d=Jt(uc),u=g.useId();let h=!0,p=g.useMemo(()=>(h=!1,{id:u,initial:t,isPresent:s,custom:r,onExitComplete:m=>{d.set(m,!0);for(const v of d.values())if(!v)return;n&&n()},register:m=>(d.set(m,!1),()=>d.delete(m))}),[s,d,n]);return i&&h&&(p={...p}),g.useMemo(()=>{d.forEach((m,v)=>d.set(v,!1))},[s]),At.useEffect(()=>{!s&&!d.size&&n&&n()},[s]),o==="popLayout"&&(e=l.jsx(lc,{isPresent:s,anchorX:a,root:c,children:e})),l.jsx(Tt.Provider,{value:p,children:e})};function uc(){return new Map}function Ir(e=!0){const t=g.useContext(Tt);if(t===null)return[!0,null];const{isPresent:s,onExitComplete:n,register:r}=t,i=g.useId();g.useEffect(()=>{if(e)return r(i)},[e]);const o=g.useCallback(()=>e&&n&&n(i),[i,n,e]);return!s&&n?[!1,o]:[!0]}const Dt=e=>e.key||"";function _r(e){const t=[];return g.Children.forEach(e,s=>{g.isValidElement(s)&&t.push(s)}),t}const dc=({children:e,custom:t,initial:s=!0,onExitComplete:n,presenceAffectsLayout:r=!0,mode:i="sync",propagate:o=!1,anchorX:a="left",root:c})=>{const[d,u]=Ir(o),h=g.useMemo(()=>_r(e),[e]),p=o&&!d?[]:h.map(Dt),m=g.useRef(!0),v=g.useRef(h),A=Jt(()=>new Map),C=g.useRef(new Set),[y,b]=g.useState(h),[x,N]=g.useState(h);kn(()=>{m.current=!1,v.current=h;for(let E=0;E<x.length;E++){const S=Dt(x[E]);p.includes(S)?(A.delete(S),C.current.delete(S)):A.get(S)!==!0&&A.set(S,!1)}},[x,p.length,p.join("-")]);const P=[];if(h!==y){let E=[...h];for(let S=0;S<x.length;S++){const F=x[S],_=Dt(F);p.includes(_)||(E.splice(S,0,F),P.push(F))}return i==="wait"&&P.length&&(E=P),N(_r(E)),b(h),null}process.env.NODE_ENV!=="production"&&i==="wait"&&x.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:D}=g.useContext(Gt);return l.jsx(l.Fragment,{children:x.map(E=>{const S=Dt(E),F=o&&!d?!1:h===x||p.includes(S),_=()=>{if(C.current.has(S))return;if(C.current.add(S),A.has(S))A.set(S,!0);else return;let X=!0;A.forEach(Z=>{Z||(X=!1)}),X&&(D?.(),N(v.current),o&&u?.(),n&&n())};return l.jsx(cc,{isPresent:F,initial:!m.current||s?void 0:!1,custom:t,presenceAffectsLayout:r,mode:i,root:c,onExitComplete:F?void 0:_,anchorX:a,children:E},S)})})},Ur=g.createContext({strict:!1}),Wr={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ke={};for(const e in Wr)Ke[e]={isEnabled:t=>Wr[e].some(s=>!!t[s])};function hc(e){for(const t in e)Ke[t]={...Ke[t],...e[t]}}const fc=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ft(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||fc.has(e)}let qr=e=>!Ft(e);function pc(e){typeof e=="function"&&(qr=t=>t.startsWith("on")?!Ft(t):e(t))}try{pc(require("@emotion/is-prop-valid").default)}catch{}function mc(e,t,s){const n={};for(const r in e)r==="values"&&typeof e.values=="object"||(qr(r)||s===!0&&Ft(r)||!t&&!Ft(r)||e.draggable&&r.startsWith("onDrag"))&&(n[r]=e[r]);return n}const Rt=g.createContext({});function Lt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ct(e){return typeof e=="string"||Array.isArray(e)}const Os=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Is=["initial",...Os];function Bt(e){return Lt(e.animate)||Is.some(t=>ct(e[t]))}function Kr(e){return!!(Bt(e)||e.variants)}function gc(e,t){if(Bt(e)){const{initial:s,animate:n}=e;return{initial:s===!1||ct(s)?s:void 0,animate:ct(n)?n:void 0}}return e.inherit!==!1?t:{}}function yc(e){const{initial:t,animate:s}=gc(e,g.useContext(Rt));return g.useMemo(()=>({initial:t,animate:s}),[Yr(t),Yr(s)])}function Yr(e){return Array.isArray(e)?e.join(" "):e}function zr(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ut={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(T.test(e))e=parseFloat(e);else return e;const s=zr(e,t.target.x),n=zr(e,t.target.y);return`${s}% ${n}%`}},xc={correct:(e,{treeScale:t,projectionDelta:s})=>{const n=e,r=ke.parse(e);if(r.length>5)return n;const i=ke.createTransformer(e),o=typeof r[0]!="number"?1:0,a=s.x.scale*t.x,c=s.y.scale*t.y;r[0+o]/=a,r[1+o]/=c;const d=q(a,c,.5);return typeof r[2+o]=="number"&&(r[2+o]/=d),typeof r[3+o]=="number"&&(r[3+o]/=d),i(r)}},_s={borderRadius:{...ut,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ut,borderTopRightRadius:ut,borderBottomLeftRadius:ut,borderBottomRightRadius:ut,boxShadow:xc};function Gr(e,{layout:t,layoutId:s}){return We.has(e)||e.startsWith("origin")||(t||s!==void 0)&&(!!_s[e]||e==="opacity")}const vc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},bc=Ue.length;function wc(e,t,s){let n="",r=!0;for(let i=0;i<bc;i++){const o=Ue[i],a=e[o];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(o.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||s){const d=Er(a,Ds[o]);if(!c){r=!1;const u=vc[o]||o;n+=`${u}(${d}) `}s&&(t[o]=d)}}return n=n.trim(),s?n=s(t,r?"":n):r&&(n="none"),n}function Us(e,t,s){const{style:n,vars:r,transformOrigin:i}=e;let o=!1,a=!1;for(const c in t){const d=t[c];if(We.has(c)){o=!0;continue}else if(Kn(c)){r[c]=d;continue}else{const u=Er(d,Ds[c]);c.startsWith("origin")?(a=!0,i[c]=u):n[c]=u}}if(t.transform||(o||s?n.transform=wc(t,e.transform,s):n.transform&&(n.transform="none")),a){const{originX:c="50%",originY:d="50%",originZ:u=0}=i;n.transformOrigin=`${c} ${d} ${u}`}}const Ws=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Jr(e,t,s){for(const n in t)!se(t[n])&&!Gr(n,s)&&(e[n]=t[n])}function Ac({transformTemplate:e},t){return g.useMemo(()=>{const s=Ws();return Us(s,t,e),Object.assign({},s.vars,s.style)},[t])}function Cc(e,t){const s=e.style||{},n={};return Jr(n,s,e),Object.assign(n,Ac(e,t)),n}function kc(e,t){const s={},n=Cc(e,t);return e.drag&&e.dragListener!==!1&&(s.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(s.tabIndex=0),s.style=n,s}const Tc={offset:"stroke-dashoffset",array:"stroke-dasharray"},Sc={offset:"strokeDashoffset",array:"strokeDasharray"};function Ec(e,t,s=1,n=0,r=!0){e.pathLength=1;const i=r?Tc:Sc;e[i.offset]=T.transform(-n);const o=T.transform(t),a=T.transform(s);e[i.array]=`${o} ${a}`}const Pc=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Qr(e,{attrX:t,attrY:s,attrScale:n,pathLength:r,pathSpacing:i=1,pathOffset:o=0,...a},c,d,u){if(Us(e,a,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p}=e;h.transform&&(p.transform=h.transform,delete h.transform),(p.transform||h.transformOrigin)&&(p.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),p.transform&&(p.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const m of Pc)h[m]!==void 0&&(p[m]=h[m],delete h[m]);t!==void 0&&(h.x=t),s!==void 0&&(h.y=s),n!==void 0&&(h.scale=n),r!==void 0&&Ec(h,r,i,o,!1)}const Hr=()=>({...Ws(),attrs:{}}),Xr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function jc(e,t,s,n){const r=g.useMemo(()=>{const i=Hr();return Qr(i,t,Xr(n),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Jr(i,e.style,e),r.style={...i,...r.style}}return r}const Nc=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function qs(e){return typeof e!="string"||e.includes("-")?!1:!!(Nc.indexOf(e)>-1||/[A-Z]/u.test(e))}function Vc(e,t,s,{latestValues:n},r,i=!1,o){const c=(o??qs(e)?jc:kc)(t,n,r,e),d=mc(t,typeof e=="string",i),u=e!==g.Fragment?{...d,...c,ref:s}:{},{children:h}=t,p=g.useMemo(()=>se(h)?h.get():h,[h]);return g.createElement(e,{...u,children:p})}function Zr(e){const t=[{},{}];return e?.values.forEach((s,n)=>{t[0][n]=s.get(),t[1][n]=s.getVelocity()}),t}function Ks(e,t,s,n){if(typeof t=="function"){const[r,i]=Zr(n);t=t(s!==void 0?s:e.custom,r,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,i]=Zr(n);t=t(s!==void 0?s:e.custom,r,i)}return t}function Ot(e){return se(e)?e.get():e}function Mc({scrapeMotionValuesFromProps:e,createRenderState:t},s,n,r){return{latestValues:Dc(s,n,r,e),renderState:t()}}function Dc(e,t,s,n){const r={},i=n(e,{});for(const p in i)r[p]=Ot(i[p]);let{initial:o,animate:a}=e;const c=Bt(e),d=Kr(e);t&&d&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=s?s.initial===!1:!1;u=u||o===!1;const h=u?a:o;if(h&&typeof h!="boolean"&&!Lt(h)){const p=Array.isArray(h)?h:[h];for(let m=0;m<p.length;m++){const v=Ks(e,p[m]);if(v){const{transitionEnd:A,transition:C,...y}=v;for(const b in y){let x=y[b];if(Array.isArray(x)){const N=u?x.length-1:0;x=x[N]}x!==null&&(r[b]=x)}for(const b in A)r[b]=A[b]}}}return r}const $r=e=>(t,s)=>{const n=g.useContext(Rt),r=g.useContext(Tt),i=()=>Mc(e,t,n,r);return s?i():Jt(i)};function Ys(e,t,s){const{style:n}=e,r={};for(const i in n)(se(n[i])||t.style&&se(t.style[i])||Gr(i,e)||s?.getValue(i)?.liveStyle!==void 0)&&(r[i]=n[i]);return r}const Fc=$r({scrapeMotionValuesFromProps:Ys,createRenderState:Ws});function ei(e,t,s){const n=Ys(e,t,s);for(const r in e)if(se(e[r])||se(t[r])){const i=Ue.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}const Rc=$r({scrapeMotionValuesFromProps:ei,createRenderState:Hr}),Lc=Symbol.for("motionComponentSymbol");function Bc(e,t,s){const n=g.useRef(s);g.useInsertionEffect(()=>{n.current=s});const r=g.useRef(null);return g.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const o=n.current;if(typeof o=="function")if(i){const a=o(i);typeof a=="function"&&(r.current=a)}else r.current?(r.current(),r.current=null):o(i);else o&&(o.current=i)},[t])}const zs=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ti="data-"+zs("framerAppearId"),si=g.createContext({});function dt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Oc(e,t,s,n,r,i){const{visualElement:o}=g.useContext(Rt),a=g.useContext(Ur),c=g.useContext(Tt),d=g.useContext(Bs).reducedMotion,u=g.useRef(null);n=n||a.renderer,!u.current&&n&&(u.current=n(e,{visualState:t,parent:o,props:s,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,isSVG:i}));const h=u.current,p=g.useContext(si);h&&!h.projection&&r&&(h.type==="html"||h.type==="svg")&&Ic(u.current,s,r,p);const m=g.useRef(!1);g.useInsertionEffect(()=>{h&&m.current&&h.update(s,c)});const v=s[ti],A=g.useRef(!!v&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return kn(()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),A.current&&h.animationState&&h.animationState.animateChanges())}),g.useEffect(()=>{h&&(!A.current&&h.animationState&&h.animationState.animateChanges(),A.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),A.current=!1),h.enteringChildren=void 0)}),h}function Ic(e,t,s,n){const{layoutId:r,layout:i,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:d,layoutCrossfade:u}=t;e.projection=new s(e.latestValues,t["data-framer-portal-id"]?void 0:ni(e.parent)),e.projection.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!o||a&&dt(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:c,layoutRoot:d})}function ni(e){if(e)return e.options.allowProjection!==!1?e.projection:ni(e.parent)}function Gs(e,{forwardMotionProps:t=!1,type:s}={},n,r){n&&hc(n);const i=s?s==="svg":qs(e),o=i?Rc:Fc;function a(d,u){let h;const p={...g.useContext(Bs),...d,layoutId:_c(d)},{isStatic:m}=p,v=yc(d),A=o(d,m);if(!m&&Qt){Uc(p,n);const C=Wc(p);h=C.MeasureLayout,v.visualElement=Oc(e,A,p,r,C.ProjectionNode,i)}return l.jsxs(Rt.Provider,{value:v,children:[h&&v.visualElement?l.jsx(h,{visualElement:v.visualElement,...p}):null,Vc(e,d,Bc(A,v.visualElement,u),A,m,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=g.forwardRef(a);return c[Lc]=e,c}function _c({layoutId:e}){const t=g.useContext(Gt).id;return t&&e!==void 0?t+"-"+e:e}function Uc(e,t){const s=g.useContext(Ur).strict;if(process.env.NODE_ENV!=="production"&&t&&s){const n="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Be(!1,n,"lazy-strict-mode"):be(!1,n,"lazy-strict-mode")}}function Wc(e){const{drag:t,layout:s}=Ke;if(!t&&!s)return{};const n={...t,...s};return{MeasureLayout:t?.isEnabled(e)||s?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}function qc(e,t){if(typeof Proxy>"u")return Gs;const s=new Map,n=(i,o)=>Gs(i,o,e,t),r=(i,o)=>(process.env.NODE_ENV!=="production"&&ts(!1,"motion() is deprecated. Use motion.create() instead."),n(i,o));return new Proxy(r,{get:(i,o)=>o==="create"?n:(s.has(o)||s.set(o,Gs(o,void 0,e,t)),s.get(o))})}function ri({top:e,left:t,right:s,bottom:n}){return{x:{min:t,max:s},y:{min:e,max:n}}}function Kc({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Yc(e,t){if(!t)return e;const s=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:s.y,left:s.x,bottom:n.y,right:n.x}}function Js(e){return e===void 0||e===1}function Qs({scale:e,scaleX:t,scaleY:s}){return!Js(e)||!Js(t)||!Js(s)}function Me(e){return Qs(e)||ii(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ii(e){return oi(e.x)||oi(e.y)}function oi(e){return e&&e!=="0%"}function It(e,t,s){const n=e-s,r=t*n;return s+r}function ai(e,t,s,n,r){return r!==void 0&&(e=It(e,r,n)),It(e,s,n)+t}function Hs(e,t=0,s=1,n,r){e.min=ai(e.min,t,s,n,r),e.max=ai(e.max,t,s,n,r)}function li(e,{x:t,y:s}){Hs(e.x,t.translate,t.scale,t.originPoint),Hs(e.y,s.translate,s.scale,s.originPoint)}const ci=.999999999999,ui=1.0000000000001;function zc(e,t,s,n=!1){const r=s.length;if(!r)return;t.x=t.y=1;let i,o;for(let a=0;a<r;a++){i=s[a],o=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ze(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,li(e,o)),n&&Me(i.latestValues)&&ze(e,i.latestValues))}t.x<ui&&t.x>ci&&(t.x=1),t.y<ui&&t.y>ci&&(t.y=1)}function Ye(e,t){e.min=e.min+t,e.max=e.max+t}function di(e,t,s,n,r=.5){const i=q(e.min,e.max,r);Hs(e,t,s,i,n)}function ze(e,t){di(e.x,t.x,t.scaleX,t.scale,t.originX),di(e.y,t.y,t.scaleY,t.scale,t.originY)}function hi(e,t){return ri(Yc(e.getBoundingClientRect(),t))}function Gc(e,t,s){const n=hi(e,s),{scroll:r}=t;return r&&(Ye(n.x,r.offset.x),Ye(n.y,r.offset.y)),n}const fi=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ge=()=>({x:fi(),y:fi()}),pi=()=>({min:0,max:0}),H=()=>({x:pi(),y:pi()}),Xs={current:null},mi={current:!1};function Jc(){if(mi.current=!0,!!Qt)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Xs.current=e.matches;e.addEventListener("change",t),t()}else Xs.current=!1}const Qc=new WeakMap;function Hc(e,t,s){for(const n in t){const r=t[n],i=s[n];if(se(r))e.addValue(n,r);else if(se(i))e.addValue(n,qe(r,{owner:e}));else if(i!==r)if(e.hasValue(n)){const o=e.getValue(n);o.liveStyle===!0?o.jump(r):o.hasAnimated||o.set(r)}else{const o=e.getStaticValue(n);e.addValue(n,qe(o!==void 0?o:r,{owner:e}))}}for(const n in s)t[n]===void 0&&e.removeValue(n);return t}const gi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Xc{scrapeMotionValuesFromProps(t,s,n){return{}}constructor({parent:t,props:s,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ps,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=ne.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,W.render(this.render,!1,!0))};const{latestValues:c,renderState:d}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=s.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=s,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Bt(s),this.isVariantNode=Kr(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(s,{},this);for(const p in h){const m=h[p];c[p]!==void 0&&se(m)&&m.set(c[p])}}mount(t){this.current=t,Qc.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,n)=>this.bindToMotionValue(n,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(mi.current||Jc(),this.shouldReduceMotion=Xs.current),process.env.NODE_ENV!=="production"&&ts(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ae(this.notifyUpdate),Ae(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const s=this.features[t];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,s){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=We.has(t);n&&this.onBindTransform&&this.onBindTransform();const r=s.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&W.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,s)),this.valueSubscriptions.set(t,()=>{r(),i&&i(),s.owner&&s.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ke){const s=Ke[t];if(!s)continue;const{isEnabled:n,Feature:r}=s;if(!this.features[t]&&r&&n(this.props)&&(this.features[t]=new r(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):H()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,s){this.latestValues[t]=s}update(t,s){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let n=0;n<gi.length;n++){const r=gi[n];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const i="on"+r,o=t[i];o&&(this.propEventSubscriptions[r]=this.on(r,o))}this.prevMotionValues=Hc(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(t),()=>s.variantChildren.delete(t)}addValue(t,s){const n=this.values.get(t);s!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,s),this.values.set(t,s),this.latestValues[t]=s.get())}removeValue(t){this.values.delete(t);const s=this.valueSubscriptions.get(t);s&&(s(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,s){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&s!==void 0&&(n=qe(s===null?void 0:s,{owner:this}),this.addValue(t,n)),n}readValue(t,s){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(Tn(n)||En(n))?n=parseFloat(n):!rc(n)&&ke.test(s)&&(n=Sr(t,s)),this.setBaseTarget(t,se(n)?n.get():n)),se(n)?n.get():n}setBaseTarget(t,s){this.baseTarget[t]=s}getBaseTarget(t){const{initial:s}=this.props;let n;if(typeof s=="string"||typeof s=="object"){const i=Ks(this.props,s,this.presenceContext?.custom);i&&(n=i[t])}if(s&&n!==void 0)return n;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!se(r)?r:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,s){return this.events[t]||(this.events[t]=new es),this.events[t].add(s)}notify(t,...s){this.events[t]&&this.events[t].notify(...s)}scheduleRenderMicrotask(){Fs.render(this.render)}}class yi extends Xc{constructor(){super(...arguments),this.KeyframeResolver=Gl}sortInstanceNodePosition(t,s){return t.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(t,s){return t.style?t.style[s]:void 0}removeValueFromRenderState(t,{vars:s,style:n}){delete s[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;se(t)&&(this.childSubscription=t.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}function xi(e,{style:t,vars:s},n,r){const i=e.style;let o;for(o in t)i[o]=t[o];r?.applyProjectionStyles(i,n);for(o in s)i.setProperty(o,s[o])}function Zc(e){return window.getComputedStyle(e)}class $c extends yi{constructor(){super(...arguments),this.type="html",this.renderInstance=xi}readValueFromInstance(t,s){if(We.has(s))return this.projection?.isProjecting?Cs(s):hl(t,s);{const n=Zc(t),r=(Kn(s)?n.getPropertyValue(s):n[s])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:s}){return hi(t,s)}build(t,s,n){Us(t,s,n.transformTemplate)}scrapeMotionValuesFromProps(t,s,n){return Ys(t,s,n)}}const vi=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function eu(e,t,s,n){xi(e,t,void 0,n);for(const r in t.attrs)e.setAttribute(vi.has(r)?r:zs(r),t.attrs[r])}class tu extends yi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=H}getBaseTargetFromProps(t,s){return t[s]}readValueFromInstance(t,s){if(We.has(s)){const n=Tr(s);return n&&n.default||0}return s=vi.has(s)?s:zs(s),t.getAttribute(s)}scrapeMotionValuesFromProps(t,s,n){return ei(t,s,n)}build(t,s,n){Qr(t,s,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,s,n,r){eu(t,s,n,r)}mount(t){this.isSVGTag=Xr(t.tagName),super.mount(t)}}const su=(e,t)=>t.isSVG??qs(e)?new tu(t):new $c(t,{allowProjection:e!==g.Fragment});function Je(e,t,s){const n=e.getProps();return Ks(n,t,s!==void 0?s:n.custom,e)}const Zs=e=>Array.isArray(e);function nu(e,t,s){e.hasValue(t)?e.getValue(t).set(s):e.addValue(t,qe(s))}function ru(e){return Zs(e)?e[e.length-1]||0:e}function iu(e,t){const s=Je(e,t);let{transitionEnd:n={},transition:r={},...i}=s||{};i={...i,...n};for(const o in i){const a=ru(i[o]);nu(e,o,a)}}function ou(e){return!!(se(e)&&e.add)}function $s(e,t){const s=e.getValue("willChange");if(ou(s))return s.add(t);if(!s&&we.WillChange){const n=new we.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function bi(e){return e.props[ti]}const au=e=>e!==null;function lu(e,{repeat:t,repeatType:s="loop"},n){const r=e.filter(au),i=t&&s!=="loop"&&t%2===1?0:r.length-1;return r[i]}const cu={type:"spring",stiffness:500,damping:25,restSpeed:10},uu=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),du={type:"keyframes",duration:.8},hu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},fu=(e,{keyframes:t})=>t.length>2?du:We.has(e)?e.startsWith("scale")?uu(t[1]):cu:hu;function pu({when:e,delay:t,delayChildren:s,staggerChildren:n,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:c,elapsed:d,...u}){return!!Object.keys(u).length}const en=(e,t,s,n={},r,i)=>o=>{const a=Vs(n,e)||{},c=a.delay||n.delay||0;let{elapsed:d=0}=n;d=d-xe(c);const u={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-d,onUpdate:p=>{t.set(p),a.onUpdate&&a.onUpdate(p)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:r};pu(a)||Object.assign(u,fu(e,u)),u.duration&&(u.duration=xe(u.duration)),u.repeatDelay&&(u.repeatDelay=xe(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Ns(u),u.delay===0&&(h=!0)),(we.instantAnimations||we.skipAnimations)&&(h=!0,Ns(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!i&&t.get()!==void 0){const p=lu(u.keyframes,a);if(p!==void 0){W.update(()=>{u.onUpdate(p),u.onComplete()});return}}return a.isSync?new bs(u):new Rl(u)};function mu({protectedKeys:e,needsAnimating:t},s){const n=e.hasOwnProperty(s)&&t[s]!==!0;return t[s]=!1,n}function wi(e,t,{delay:s=0,transitionOverride:n,type:r}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:o,...a}=t;n&&(i=n);const c=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const u in a){const h=e.getValue(u,e.latestValues[u]??null),p=a[u];if(p===void 0||d&&mu(d,u))continue;const m={delay:s,...Vs(i||{},u)},v=h.get();if(v!==void 0&&!h.isAnimating&&!Array.isArray(p)&&p===v&&!m.velocity)continue;let A=!1;if(window.MotionHandoffAnimation){const y=bi(e);if(y){const b=window.MotionHandoffAnimation(y,u,W);b!==null&&(m.startTime=b,A=!0)}}$s(e,u),h.start(en(u,h,p,e.shouldReduceMotion&&br.has(u)?{type:!1}:m,e,A));const C=h.animation;C&&c.push(C)}return o&&Promise.all(c).then(()=>{W.update(()=>{o&&iu(e,o)})}),c}function Ai(e,t,s,n=0,r=1){const i=Array.from(e).sort((d,u)=>d.sortNodePosition(u)).indexOf(t),o=e.size,a=(o-1)*n;return typeof s=="function"?s(i,o):r===1?i*n:a-i*n}function tn(e,t,s={}){const n=Je(e,t,s.type==="exit"?e.presenceContext?.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=n||{};s.transitionOverride&&(r=s.transitionOverride);const i=n?()=>Promise.all(wi(e,n,s)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:u,staggerDirection:h}=r;return gu(e,t,c,d,u,h,s)}:()=>Promise.resolve(),{when:a}=r;if(a){const[c,d]=a==="beforeChildren"?[i,o]:[o,i];return c().then(()=>d())}else return Promise.all([i(),o(s.delay)])}function gu(e,t,s=0,n=0,r=0,i=1,o){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(tn(c,t,{...o,delay:s+(typeof n=="function"?0:n)+Ai(e.variantChildren,c,n,r,i)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function yu(e,t,s={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const r=t.map(i=>tn(e,i,s));n=Promise.all(r)}else if(typeof t=="string")n=tn(e,t,s);else{const r=typeof t=="function"?Je(e,t,s.custom):t;n=Promise.all(wi(e,r,s))}return n.then(()=>{e.notify("AnimationComplete",t)})}function Ci(e,t){if(!Array.isArray(t))return!1;const s=t.length;if(s!==e.length)return!1;for(let n=0;n<s;n++)if(t[n]!==e[n])return!1;return!0}const xu=Is.length;function ki(e){if(!e)return;if(!e.isControllingVariants){const s=e.parent?ki(e.parent)||{}:{};return e.props.initial!==void 0&&(s.initial=e.props.initial),s}const t={};for(let s=0;s<xu;s++){const n=Is[s],r=e.props[n];(ct(r)||r===!1)&&(t[n]=r)}return t}const vu=[...Os].reverse(),bu=Os.length;function wu(e){return t=>Promise.all(t.map(({animation:s,options:n})=>yu(e,s,n)))}function Au(e){let t=wu(e),s=Ti(),n=!0;const r=c=>(d,u)=>{const h=Je(e,u,c==="exit"?e.presenceContext?.custom:void 0);if(h){const{transition:p,transitionEnd:m,...v}=h;d={...d,...v,...m}}return d};function i(c){t=c(e)}function o(c){const{props:d}=e,u=ki(e.parent)||{},h=[],p=new Set;let m={},v=1/0;for(let C=0;C<bu;C++){const y=vu[C],b=s[y],x=d[y]!==void 0?d[y]:u[y],N=ct(x),P=y===c?b.isActive:null;P===!1&&(v=C);let D=x===u[y]&&x!==d[y]&&N;if(D&&n&&e.manuallyAnimateOnMount&&(D=!1),b.protectedKeys={...m},!b.isActive&&P===null||!x&&!b.prevProp||Lt(x)||typeof x=="boolean")continue;const E=Cu(b.prevProp,x);let S=E||y===c&&b.isActive&&!D&&N||C>v&&N,F=!1;const _=Array.isArray(x)?x:[x];let X=_.reduce(r(y),{});P===!1&&(X={});const{prevResolvedValues:Z={}}=b,ae={...Z,...X},$=B=>{S=!0,p.has(B)&&(F=!0,p.delete(B)),b.needsAnimating[B]=!0;const O=e.getValue(B);O&&(O.liveStyle=!1)};for(const B in ae){const O=X[B],Y=Z[B];if(m.hasOwnProperty(B))continue;let J=!1;Zs(O)&&Zs(Y)?J=!Ci(O,Y):J=O!==Y,J?O!=null?$(B):p.add(B):O!==void 0&&p.has(B)?$(B):b.protectedKeys[B]=!0}b.prevProp=x,b.prevResolvedValues=X,b.isActive&&(m={...m,...X}),n&&e.blockInitialAnimation&&(S=!1);const ue=D&&E;S&&(!ue||F)&&h.push(..._.map(B=>{const O={type:y};if(typeof B=="string"&&n&&!ue&&e.manuallyAnimateOnMount&&e.parent){const{parent:Y}=e,J=Je(Y,B);if(Y.enteringChildren&&J){const{delayChildren:ie}=J.transition||{};O.delay=Ai(Y.enteringChildren,e,ie)}}return{animation:B,options:O}}))}if(p.size){const C={};if(typeof d.initial!="boolean"){const y=Je(e,Array.isArray(d.initial)?d.initial[0]:d.initial);y&&y.transition&&(C.transition=y.transition)}p.forEach(y=>{const b=e.getBaseTarget(y),x=e.getValue(y);x&&(x.liveStyle=!0),C[y]=b??null}),h.push({animation:C})}let A=!!h.length;return n&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(A=!1),n=!1,A?t(h):Promise.resolve()}function a(c,d){if(s[c].isActive===d)return Promise.resolve();e.variantChildren?.forEach(h=>h.animationState?.setActive(c,d)),s[c].isActive=d;const u=o(c);for(const h in s)s[h].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>s,reset:()=>{s=Ti()}}}function Cu(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ci(t,e):!1}function De(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ti(){return{animate:De(!0),whileInView:De(),whileHover:De(),whileTap:De(),whileDrag:De(),whileFocus:De(),exit:De()}}class Se{constructor(t){this.isMounted=!1,this.node=t}update(){}}class ku extends Se{constructor(t){super(t),t.animationState||(t.animationState=Au(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Lt(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:s}=this.node.prevProps||{};t!==s&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Tu=0;class Su extends Se{constructor(){super(...arguments),this.id=Tu++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:s}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const r=this.node.animationState.setActive("exit",!t);s&&!t&&r.then(()=>{s(this.id)})}mount(){const{register:t,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Eu={animation:{Feature:ku},exit:{Feature:Su}};function ht(e,t,s,n={passive:!0}){return e.addEventListener(t,s,n),()=>e.removeEventListener(t,s)}function ft(e){return{point:{x:e.pageX,y:e.pageY}}}const Pu=e=>t=>Rs(t)&&e(t,ft(t));function pt(e,t,s,n){return ht(e,t,Pu(s),n)}const Si=1e-4,ju=1-Si,Nu=1+Si,Ei=.01,Vu=0-Ei,Mu=0+Ei;function re(e){return e.max-e.min}function Du(e,t,s){return Math.abs(e-t)<=s}function Pi(e,t,s,n=.5){e.origin=n,e.originPoint=q(t.min,t.max,e.origin),e.scale=re(s)/re(t),e.translate=q(s.min,s.max,e.origin)-e.originPoint,(e.scale>=ju&&e.scale<=Nu||isNaN(e.scale))&&(e.scale=1),(e.translate>=Vu&&e.translate<=Mu||isNaN(e.translate))&&(e.translate=0)}function mt(e,t,s,n){Pi(e.x,t.x,s.x,n?n.originX:void 0),Pi(e.y,t.y,s.y,n?n.originY:void 0)}function ji(e,t,s){e.min=s.min+t.min,e.max=e.min+re(t)}function Fu(e,t,s){ji(e.x,t.x,s.x),ji(e.y,t.y,s.y)}function Ni(e,t,s){e.min=t.min-s.min,e.max=e.min+re(t)}function _t(e,t,s){Ni(e.x,t.x,s.x),Ni(e.y,t.y,s.y)}function fe(e){return[e("x"),e("y")]}const Vi=({current:e})=>e?e.ownerDocument.defaultView:null,Mi=(e,t)=>Math.abs(e-t);function Ru(e,t){const s=Mi(e.x,t.x),n=Mi(e.y,t.y);return Math.sqrt(s**2+n**2)}const Di=new Set(["auto","scroll"]);class Fi{constructor(t,s,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=nn(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,A=Ru(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!A)return;const{point:C}=m,{timestamp:y}=te;this.history.push({...C,timestamp:y});const{onStart:b,onMove:x}=this.handlers;v||(b&&b(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,m)},this.handlePointerMove=(m,v)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=sn(v,this.transformPagePoint),W.update(this.updatePoint,!0)},this.handlePointerUp=(m,v)=>{this.end();const{onEnd:A,onSessionEnd:C,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=nn(m.type==="pointercancel"?this.lastMoveEventInfo:sn(v,this.transformPagePoint),this.history);this.startEvent&&A&&A(m,b),C&&C(m,b)},!Rs(t))return;this.dragSnapToOrigin=i,this.handlers=s,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;const c=ft(t),d=sn(c,this.transformPagePoint),{point:u}=d,{timestamp:h}=te;this.history=[{...u,timestamp:h}];const{onSessionStart:p}=s;p&&p(t,nn(d,this.history)),this.removeListeners=tt(pt(this.contextWindow,"pointermove",this.handlePointerMove),pt(this.contextWindow,"pointerup",this.handlePointerUp),pt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let s=t.parentElement;for(;s;){const n=getComputedStyle(s);(Di.has(n.overflowX)||Di.has(n.overflowY))&&this.scrollPositions.set(s,{x:s.scrollLeft,y:s.scrollTop}),s=s.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const s=this.scrollPositions.get(t);if(!s)return;const n=t===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:r.x-s.x,y:r.y-s.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,r),W.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ae(this.updatePoint)}}function sn(e,t){return t?{point:t(e.point)}:e}function Ri(e,t){return{x:e.x-t.x,y:e.y-t.y}}function nn({point:e},t){return{point:e,delta:Ri(e,Li(t)),offset:Ri(e,Lu(t)),velocity:Bu(t,.1)}}function Lu(e){return e[0]}function Li(e){return e[e.length-1]}function Bu(e,t){if(e.length<2)return{x:0,y:0};let s=e.length-1,n=null;const r=Li(e);for(;s>=0&&(n=e[s],!(r.timestamp-n.timestamp>xe(t)));)s--;if(!n)return{x:0,y:0};const i=he(r.timestamp-n.timestamp);if(i===0)return{x:0,y:0};const o={x:(r.x-n.x)/i,y:(r.y-n.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Ou(e,{min:t,max:s},n){return t!==void 0&&e<t?e=n?q(t,e,n.min):Math.max(e,t):s!==void 0&&e>s&&(e=n?q(s,e,n.max):Math.min(e,s)),e}function Bi(e,t,s){return{min:t!==void 0?e.min+t:void 0,max:s!==void 0?e.max+s-(e.max-e.min):void 0}}function Iu(e,{top:t,left:s,bottom:n,right:r}){return{x:Bi(e.x,s,r),y:Bi(e.y,t,n)}}function Oi(e,t){let s=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([s,n]=[n,s]),{min:s,max:n}}function _u(e,t){return{x:Oi(e.x,t.x),y:Oi(e.y,t.y)}}function Uu(e,t){let s=.5;const n=re(e),r=re(t);return r>n?s=st(t.min,t.max-n,e.min):n>r&&(s=st(e.min,e.max-r,t.min)),ye(0,1,s)}function Wu(e,t){const s={};return t.min!==void 0&&(s.min=t.min-e.min),t.max!==void 0&&(s.max=t.max-e.min),s}const rn=.35;function qu(e=rn){return e===!1?e=0:e===!0&&(e=rn),{x:Ii(e,"left","right"),y:Ii(e,"top","bottom")}}function Ii(e,t,s){return{min:_i(e,t),max:_i(e,s)}}function _i(e,t){return typeof e=="number"?e:e[t]||0}const Ku=new WeakMap;class Yu{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=H(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:s=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=h=>{s?(this.stopAnimation(),this.snapToCursor(ft(h).point)):this.pauseAnimation()},o=(h,p)=>{this.stopAnimation();const{drag:m,dragPropagation:v,onDragStart:A}=this.getProps();if(m&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Xl(m),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),fe(y=>{let b=this.getAxisMotionValue(y).get()||0;if(ve.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const N=x.layout.layoutBox[y];N&&(b=re(N)*(parseFloat(b)/100))}}this.originPoint[y]=b}),A&&W.postRender(()=>A(h,p)),$s(this.visualElement,"transform");const{animationState:C}=this.visualElement;C&&C.setActive("whileDrag",!0)},a=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p;const{dragPropagation:m,dragDirectionLock:v,onDirectionLock:A,onDrag:C}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:y}=p;if(v&&this.currentDirection===null){this.currentDirection=zu(y),this.currentDirection!==null&&A&&A(this.currentDirection);return}this.updateAxis("x",p.point,y),this.updateAxis("y",p.point,y),this.visualElement.render(),C&&C(h,p)},c=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p,this.stop(h,p),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>fe(h=>this.getAnimationState(h)==="paused"&&this.getAxisMotionValue(h).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Fi(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:Vi(this.visualElement),element:this.visualElement.current})}stop(t,s){const n=t||this.latestPointerEvent,r=s||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;const{velocity:o}=r;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&W.postRender(()=>a(n,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:s}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}updateAxis(t,s,n){const{drag:r}=this.getProps();if(!n||!Ut(t,r,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=Ou(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:s}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;t&&dt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=Iu(n.layoutBox,t):this.constraints=!1,this.elastic=qu(s),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&fe(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=Wu(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:s}=this.getProps();if(!t||!dt(t))return!1;const n=t.current;be(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=Gc(n,r.root,this.visualElement.getTransformPagePoint());let o=_u(r.layout.layoutBox,i);if(s){const a=s(Kc(o));this.hasMutatedConstraints=!!a,a&&(o=ri(a))}return o}startAnimation(t){const{drag:s,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},d=fe(u=>{if(!Ut(u,s,this.currentDirection))return;let h=c&&c[u]||{};o&&(h={min:0,max:0});const p=r?200:1e6,m=r?40:1e7,v={type:"inertia",velocity:n?t[u]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...i,...h};return this.startAxisValueAnimation(u,v)});return Promise.all(d).then(a)}startAxisValueAnimation(t,s){const n=this.getAxisMotionValue(t);return $s(this.visualElement,t),n.start(en(t,n,0,s,this.visualElement,!1))}stopAnimation(){fe(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){fe(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const s=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),r=n[s];return r||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){fe(s=>{const{drag:n}=this.getProps();if(!Ut(s,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(s);if(r&&r.layout){const{min:o,max:a}=r.layout.layoutBox[s],c=i.get()||0;i.set(t[s]-q(o,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:s}=this.getProps(),{projection:n}=this.visualElement;if(!dt(s)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};fe(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const c=a.get();r[o]=Uu({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),fe(o=>{if(!Ut(o,t,null))return;const a=this.getAxisMotionValue(o),{min:c,max:d}=this.constraints[o];a.set(q(c,d,r[o]))})}addListeners(){if(!this.visualElement.current)return;Ku.set(this.visualElement,this);const t=this.visualElement.current,s=pt(t,"pointerdown",c=>{const{drag:d,dragListener:u=!0}=this.getProps();d&&u&&!Fr(c.target)&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();dt(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener("measure",n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),W.read(n);const o=ht(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(fe(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=c[u].translate,h.set(h.get()+c[u].translate))}),this.visualElement.render())}));return()=>{o(),s(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=rn,dragMomentum:a=!0}=t;return{...t,drag:s,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Ut(e,t,s){return(t===!0||t===e)&&(s===null||s===e)}function zu(e,t=10){let s=null;return Math.abs(e.y)>t?s="y":Math.abs(e.x)>t&&(s="x"),s}class Gu extends Se{constructor(t){super(t),this.removeGroupControls=de,this.removeListeners=de,this.controls=new Yu(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||de}update(){const{dragControls:t}=this.node.getProps(),{dragControls:s}=this.node.prevProps||{};t!==s&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ui=e=>(t,s)=>{e&&W.postRender(()=>e(t,s))};class Ju extends Se{constructor(){super(...arguments),this.removePointerDownListener=de}onPointerDown(t){this.session=new Fi(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Vi(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:s,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ui(t),onStart:Ui(s),onMove:n,onEnd:(i,o)=>{delete this.session,r&&W.postRender(()=>r(i,o))}}}mount(){this.removePointerDownListener=pt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Wt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let on=!1;class Qu extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=t;i&&(s.group&&s.group.add(i),n&&n.register&&r&&n.register(i),on&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Wt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:s,visualElement:n,drag:r,isPresent:i}=this.props,{projection:o}=n;return o&&(o.isPresent=i,on=!0,r||t.layoutDependency!==s||s===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||W.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Fs.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:n}=this.props,{projection:r}=t;on=!0,r&&(r.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Wi(e){const[t,s]=Ir(),n=g.useContext(Gt);return l.jsx(Qu,{...e,layoutGroup:n,switchLayoutGroup:g.useContext(si),isPresent:t,safeToRemove:s})}function Hu(e,t,s){const n=se(e)?e:qe(e);return n.start(en("",n,t,s)),n.animation}const Xu=(e,t)=>e.depth-t.depth;class Zu{constructor(){this.children=[],this.isDirty=!1}add(t){Ht(this.children,t),this.isDirty=!0}remove(t){Xt(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Xu),this.isDirty=!1,this.children.forEach(t)}}function $u(e,t){const s=ne.now(),n=({timestamp:r})=>{const i=r-s;i>=t&&(Ae(n),e(i-t))};return W.setup(n,!0),()=>Ae(n)}const qi=["TopLeft","TopRight","BottomLeft","BottomRight"],ed=qi.length,Ki=e=>typeof e=="string"?parseFloat(e):e,Yi=e=>typeof e=="number"||T.test(e);function td(e,t,s,n,r,i){r?(e.opacity=q(0,s.opacity??1,sd(n)),e.opacityExit=q(t.opacity??1,0,nd(n))):i&&(e.opacity=q(t.opacity??1,s.opacity??1,n));for(let o=0;o<ed;o++){const a=`border${qi[o]}Radius`;let c=zi(t,a),d=zi(s,a);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||Yi(c)===Yi(d)?(e[a]=Math.max(q(Ki(c),Ki(d),n),0),(ve.test(d)||ve.test(c))&&(e[a]+="%")):e[a]=d}(t.rotate||s.rotate)&&(e.rotate=q(t.rotate||0,s.rotate||0,n))}function zi(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const sd=Gi(0,.5,Ln),nd=Gi(.5,.95,de);function Gi(e,t,s){return n=>n<e?0:n>t?1:s(st(e,t,n))}function Ji(e,t){e.min=t.min,e.max=t.max}function ge(e,t){Ji(e.x,t.x),Ji(e.y,t.y)}function Qi(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Hi(e,t,s,n,r){return e-=t,e=It(e,1/s,n),r!==void 0&&(e=It(e,1/r,n)),e}function rd(e,t=0,s=1,n=.5,r,i=e,o=e){if(ve.test(t)&&(t=parseFloat(t),t=q(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=q(i.min,i.max,n);e===i&&(a-=t),e.min=Hi(e.min,t,s,a,r),e.max=Hi(e.max,t,s,a,r)}function Xi(e,t,[s,n,r],i,o){rd(e,t[s],t[n],t[r],t.scale,i,o)}const id=["x","scaleX","originX"],od=["y","scaleY","originY"];function Zi(e,t,s,n){Xi(e.x,t,id,s?s.x:void 0,n?n.x:void 0),Xi(e.y,t,od,s?s.y:void 0,n?n.y:void 0)}function $i(e){return e.translate===0&&e.scale===1}function eo(e){return $i(e.x)&&$i(e.y)}function to(e,t){return e.min===t.min&&e.max===t.max}function ad(e,t){return to(e.x,t.x)&&to(e.y,t.y)}function so(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function no(e,t){return so(e.x,t.x)&&so(e.y,t.y)}function ro(e){return re(e.x)/re(e.y)}function io(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class ld{constructor(){this.members=[]}add(t){Ht(this.members,t),t.scheduleRender()}remove(t){if(Xt(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(t){const s=this.members.findIndex(r=>t===r);if(s===0)return!1;let n;for(let r=s;r>=0;r--){const i=this.members[r];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(t,s){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,s&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:s,resumingFrom:n}=t;s.onExitComplete&&s.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function cd(e,t,s){let n="";const r=e.x.translate/t.x,i=e.y.translate/t.y,o=s?.z||0;if((r||i||o)&&(n=`translate3d(${r}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),s){const{transformPerspective:d,rotate:u,rotateX:h,rotateY:p,skewX:m,skewY:v}=s;d&&(n=`perspective(${d}px) ${n}`),u&&(n+=`rotate(${u}deg) `),h&&(n+=`rotateX(${h}deg) `),p&&(n+=`rotateY(${p}deg) `),m&&(n+=`skewX(${m}deg) `),v&&(n+=`skewY(${v}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(n+=`scale(${a}, ${c})`),n||"none"}const an=["","X","Y","Z"],ud=1e3;let dd=0;function ln(e,t,s,n){const{latestValues:r}=t;r[e]&&(s[e]=r[e],t.setStaticValue(e,0),n&&(n[e]=0))}function oo(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const s=bi(t);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:r,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",W,!(r||i))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&oo(n)}function ao({attachResizeListener:e,defaultParent:t,measureScroll:s,checkIsScrollRoot:n,resetTransform:r}){return class{constructor(o={},a=t?.()){this.id=dd++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(pd),this.nodes.forEach(xd),this.nodes.forEach(vd),this.nodes.forEach(md)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Zu)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new es),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Br(o)&&!sc(o),this.instance=o;const{layoutId:a,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let u,h=0;const p=()=>this.root.updateBlockedByResize=!1;W.read(()=>{h=window.innerWidth}),e(o,()=>{const m=window.innerWidth;m!==h&&(h=m,this.root.updateBlockedByResize=!0,u&&u(),u=$u(p,250),Wt.hasAnimatedSinceResize&&(Wt.hasAnimatedSinceResize=!1,this.nodes.forEach(uo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&d&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||d.getDefaultTransition()||kd,{onLayoutAnimationStart:A,onLayoutAnimationComplete:C}=d.getProps(),y=!this.targetLayout||!no(this.targetLayout,m),b=!h&&p;if(this.options.layoutRoot||this.resumeFrom||b||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...Vs(v,"layout"),onPlay:A,onComplete:C};(d.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,b)}else h||uo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ae(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(bd),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&oo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(lo);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(co);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(yd),this.nodes.forEach(hd),this.nodes.forEach(fd)):this.nodes.forEach(co),this.clearAllSnapshots();const a=ne.now();te.delta=ye(0,16.666666666666668,a-te.timestamp),te.timestamp=a,te.isProcessing=!0,rs.update.process(te),rs.preRender.process(te),rs.render.process(te),te.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Fs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(gd),this.sharedNodes.forEach(wd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,W.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){W.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!re(this.snapshot.measuredBox.x)&&!re(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=H(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!r)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!eo(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,u=d!==this.prevTransformTemplateValue;o&&this.instance&&(a||Me(this.latestValues)||u)&&(r(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),Td(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return H();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Sd))){const{scroll:d}=this.root;d&&(Ye(a.x,d.offset.x),Ye(a.y,d.offset.y))}return a}removeElementScroll(o){const a=H();if(ge(a,o),this.scroll?.wasRoot)return a;for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:u,options:h}=d;d!==this.root&&u&&h.layoutScroll&&(u.wasRoot&&ge(a,o),Ye(a.x,u.offset.x),Ye(a.y,u.offset.y))}return a}applyTransform(o,a=!1){const c=H();ge(c,o);for(let d=0;d<this.path.length;d++){const u=this.path[d];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ze(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Me(u.latestValues)&&ze(c,u.latestValues)}return Me(this.latestValues)&&ze(c,this.latestValues),c}removeTransform(o){const a=H();ge(a,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!d.instance||!Me(d.latestValues))continue;Qs(d.latestValues)&&d.updateSnapshot();const u=H(),h=d.measurePageBox();ge(u,h),Zi(a,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,u)}return Me(this.latestValues)&&Zi(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==te.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=te.timestamp;const p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=H(),this.targetWithTransforms=H()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Fu(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ge(this.target,this.layout.layoutBox),li(this.target,this.targetDelta)):ge(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Qs(this.parent.latestValues)||ii(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=H(),this.relativeTargetOrigin=H(),_t(this.relativeTargetOrigin,a,c),ge(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===te.timestamp&&(c=!1),c)return;const{layout:d,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||u))return;ge(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;zc(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=H());const{target:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Qi(this.prevProjectionDelta.x,this.projectionDelta.x),Qi(this.prevProjectionDelta.y,this.projectionDelta.y)),mt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==p||!io(this.projectionDelta.x,this.prevProjectionDelta.x)||!io(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ge(),this.projectionDelta=Ge(),this.projectionDeltaWithTransform=Ge()}setAnimationOrigin(o,a=!1){const c=this.snapshot,d=c?c.latestValues:{},u={...this.latestValues},h=Ge();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=H(),m=c?c.source:void 0,v=this.layout?this.layout.source:void 0,A=m!==v,C=this.getStack(),y=!C||C.members.length<=1,b=!!(A&&!y&&this.options.crossfade===!0&&!this.path.some(Cd));this.animationProgress=0;let x;this.mixTargetDelta=N=>{const P=N/1e3;ho(h.x,o.x,P),ho(h.y,o.y,P),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(_t(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Ad(this.relativeTarget,this.relativeTargetOrigin,p,P),x&&ad(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=H()),ge(x,this.relativeTarget)),A&&(this.animationValues=u,td(u,d,this.latestValues,P,b,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ae(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=W.update(()=>{Wt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=qe(0)),this.currentAnimation=Hu(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ud),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:d,latestValues:u}=o;if(!(!a||!c||!d)){if(this!==o&&this.layout&&d&&yo(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||H();const h=re(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+h;const p=re(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+p}ge(a,c),ze(a,u),mt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new ld),this.sharedNodes.get(o).add(a);const d=a.options.initialPromotionConfig;a.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const d={};c.z&&ln("z",o,d,this.animationValues);for(let u=0;u<an.length;u++)ln(`rotate${an[u]}`,o,d,this.animationValues),ln(`skew${an[u]}`,o,d,this.animationValues);o.render();for(const u in d)o.setStaticValue(u,d[u]),this.animationValues&&(this.animationValues[u]=d[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Ot(a?.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Ot(a?.pointerEvents)||""),this.hasProjected&&!Me(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=d.animationValues||d.latestValues;this.applyTransformsToTarget();let h=cd(this.projectionDeltaWithTransform,this.treeScale,u);c&&(h=c(u,h)),o.transform=h;const{x:p,y:m}=this.projectionDelta;o.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?o.opacity=d===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=d===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in _s){if(u[v]===void 0)continue;const{correct:A,applyTo:C,isCSSVariable:y}=_s[v],b=h==="none"?u[v]:A(u[v],d);if(C){const x=C.length;for(let N=0;N<x;N++)o[C[N]]=b}else y?this.options.visualElement.renderState.vars[v]=b:o[v]=b}this.options.layoutId&&(o.pointerEvents=d===this?Ot(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(lo),this.root.sharedNodes.clear()}}}function hd(e){e.updateLayout()}function fd(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:n}=e.layout,{animationType:r}=e.options,i=t.source!==e.layout.source;r==="size"?fe(u=>{const h=i?t.measuredBox[u]:t.layoutBox[u],p=re(h);h.min=s[u].min,h.max=h.min+p}):yo(r,t.layoutBox,s)&&fe(u=>{const h=i?t.measuredBox[u]:t.layoutBox[u],p=re(s[u]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+p)});const o=Ge();mt(o,s,t.layoutBox);const a=Ge();i?mt(a,e.applyTransform(n,!0),t.measuredBox):mt(a,s,t.layoutBox);const c=!eo(o);let d=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:p}=u;if(h&&p){const m=H();_t(m,t.layoutBox,h.layoutBox);const v=H();_t(v,s,p.layoutBox),no(m,v)||(d=!0),u.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=m,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:a,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function pd(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function md(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function gd(e){e.clearSnapshot()}function lo(e){e.clearMeasurements()}function co(e){e.isLayoutDirty=!1}function yd(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function uo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function xd(e){e.resolveTargetDelta()}function vd(e){e.calcProjection()}function bd(e){e.resetSkewAndRotation()}function wd(e){e.removeLeadSnapshot()}function ho(e,t,s){e.translate=q(t.translate,0,s),e.scale=q(t.scale,1,s),e.origin=t.origin,e.originPoint=t.originPoint}function fo(e,t,s,n){e.min=q(t.min,s.min,n),e.max=q(t.max,s.max,n)}function Ad(e,t,s,n){fo(e.x,t.x,s.x,n),fo(e.y,t.y,s.y,n)}function Cd(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const kd={duration:.45,ease:[.4,0,.1,1]},po=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),mo=po("applewebkit/")&&!po("chrome/")?Math.round:de;function go(e){e.min=mo(e.min),e.max=mo(e.max)}function Td(e){go(e.x),go(e.y)}function yo(e,t,s){return e==="position"||e==="preserve-aspect"&&!Du(ro(t),ro(s),.2)}function Sd(e){return e!==e.root&&e.scroll?.wasRoot}const Ed=ao({attachResizeListener:(e,t)=>ht(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),cn={current:void 0},xo=ao({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!cn.current){const e=new Ed({});e.mount(window),e.setOptions({layoutScroll:!0}),cn.current=e}return cn.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Pd={pan:{Feature:Ju},drag:{Feature:Gu,ProjectionNode:xo,MeasureLayout:Wi}};function vo(e,t,s){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",s==="Start");const r="onHover"+s,i=n[r];i&&W.postRender(()=>i(t,ft(t)))}class jd extends Se{mount(){const{current:t}=this.node;t&&(this.unmount=Zl(t,(s,n)=>(vo(this.node,n,"Start"),r=>vo(this.node,r,"End"))))}unmount(){}}class Nd extends Se{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=tt(ht(this.node.current,"focus",()=>this.onFocus()),ht(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function bo(e,t,s){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",s==="Start");const r="onTap"+(s==="End"?"":s),i=n[r];i&&W.postRender(()=>i(t,ft(t)))}class Vd extends Se{mount(){const{current:t}=this.node;t&&(this.unmount=tc(t,(s,n)=>(bo(this.node,n,"Start"),(r,{success:i})=>bo(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const un=new WeakMap,dn=new WeakMap,Md=e=>{const t=un.get(e.target);t&&t(e)},Dd=e=>{e.forEach(Md)};function Fd({root:e,...t}){const s=e||document;dn.has(s)||dn.set(s,{});const n=dn.get(s),r=JSON.stringify(t);return n[r]||(n[r]=new IntersectionObserver(Dd,{root:e,...t})),n[r]}function Rd(e,t,s){const n=Fd(t);return un.set(e,s),n.observe(e),()=>{un.delete(e),n.unobserve(e)}}const Ld={some:0,all:1};class Bd extends Se{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:s,margin:n,amount:r="some",once:i}=t,o={root:s?s.current:void 0,rootMargin:n,threshold:typeof r=="number"?r:Ld[r]},a=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,i&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),p=d?u:h;p&&p(c)};return Rd(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:s}=this.node;["amount","margin","root"].some(Od(t,s))&&this.startObserver()}unmount(){}}function Od({viewport:e={}},{viewport:t={}}={}){return s=>e[s]!==t[s]}const Id={...Eu,...{inView:{Feature:Bd},tap:{Feature:Vd},focus:{Feature:Nd},hover:{Feature:jd}},...Pd,...{layout:{ProjectionNode:xo,MeasureLayout:Wi}}},wo=qc(Id,su),_d=({steps:e,plannerStatus:t,executionStatus:s,reportStatus:n})=>{const{t:r}=ce.useTranslation(),i=e??[],[o,a]=g.useState(new Set),[c,d]=g.useState(!1),u=y=>{a(b=>{const x=new Set(b);return x.has(y)?x.delete(y):x.add(y),x})},h=i.findIndex(y=>y.status!=="pending"),p=i.reduce((y,b,x)=>b.status!=="pending"?x:y,-1),m=i.length?i.some(y=>y.status==="in_progress")?"in_progress":i.every(y=>y.status==="done")?"done":i.some(y=>y.status==="done")?"in_progress":"pending":"pending",v=t??(i.length?"done":"pending"),A=s??m,C=n??"pending";return l.jsxs("div",{className:"space-y-6 pr-6",children:[l.jsx("div",{className:"text-sm text-[#333] dark:text-[#E5E7EB]",children:r("deepResearch.steps.intro")}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:`flex items-center gap-2 text-base font-medium ${v==="pending"?"text-[#999] dark:text-[#666]":"text-[#333] dark:text-[#E5E7EB]"}`,children:[v==="in_progress"?l.jsx(j.Loader,{className:"w-5 h-5 text-[#1784FC] animate-spin"}):l.jsx(j.PencilLine,{className:`w-4 h-4 ${v==="pending"?"text-[#999]":"text-[#1784FC]"}`}),r("deepResearch.steps.planTitle")]}),l.jsx("div",{className:" text-[#999] dark:text-[#A6A6A6] text-sm mb-2",children:r("deepResearch.steps.planDescription")}),l.jsxs("div",{className:"border border-[#EEF0F3] dark:border-[#1D3A6F] rounded-lg p-3 bg-white dark:bg-[#020817] flex justify-between items-center cursor-pointer hover:bg-gray-50 dark:hover:bg-[#111827] transition-colors",onClick:()=>d(y=>!y),children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm text-[#333] dark:text-[#E5E7EB]",children:[l.jsx(j.List,{className:"w-4 h-4 text-[#1784FC]"}),r("deepResearch.steps.generatedPlans")]}),c?l.jsx(j.ChevronUp,{className:"w-4 h-4 text-gray-400"}):l.jsx(j.ChevronDown,{className:"w-4 h-4 text-gray-400"})]}),c&&i.length>0&&l.jsx("div",{className:"mt-2 space-y-1 rounded-lg bg-white dark:bg-[#020817] border border-[#EEF0F3] dark:border-[#1D3A6F] p-3",children:i.map((y,b)=>l.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[l.jsxs("span",{className:"text-[#999] dark:text-[#A6A6A6]",children:[b+1,"."]}),l.jsx("span",{className:"text-[#333] dark:text-[#E5E7EB]",children:y.title})]},y.id))})]}),l.jsxs("div",{className:"pt-2",children:[l.jsxs("div",{className:`flex items-center gap-2 text-base font-medium mb-4 ${A==="pending"?"text-[#999] dark:text-[#666]":"text-[#333] dark:text-[#E5E7EB]"}`,children:[l.jsx(j.List,{className:"w-4 h-4 text-[#1784FC]"}),r("deepResearch.steps.executeTitle")]}),i.map((y,b)=>{const x=y.status!=="pending",N=b===h,P=b===p,D=y.status==="pending"&&!y.searches;return l.jsxs("div",{className:`relative ${D?"pl-0 pb-4":"pl-6 pb-8 last:pb-0"}`,children:[x&&h!==-1&&p!==-1&&l.jsx("div",{className:"absolute left-2 border-l border-dashed border-[#018AE5]/20 dark:border-gray-700",style:{top:N?10:16,bottom:P?10:-12}}),y.status==="done"&&l.jsx(j.CheckCircle,{className:"absolute left-0 top-0 w-4 h-4 text-[#1784FC]"}),y.status==="in_progress"&&l.jsx(j.Loader,{className:"absolute left-0 top-0 w-4 h-4 text-[#1784FC] animate-spin"}),D?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(j.List,{className:"w-4 h-4 text-[#C8C8C8]"}),l.jsx("div",{className:"text-sm text-[#999999] dark:text-[#666]",children:y.title})]}):l.jsxs(l.Fragment,{children:[l.jsx("h3",{className:`text-sm font-bold mb-1 ${y.status==="pending"?"text-[#999999] dark:text-[#666]":"text-[#333333] dark:text-[#E5E7EB]"}`,children:y.title}),y.description&&l.jsx("p",{className:"text-[#999] dark:text-[#A6A6A6] text-sm mt-4",children:y.description}),y.searches&&l.jsxs("div",{className:"mt-2 space-y-3",children:[y.searches.map(E=>E.status==="searching"?l.jsx("div",{className:"flex items-center justify-between border border-blue-100 dark:border-blue-900/30 bg-blue-50/30 dark:bg-blue-900/10 rounded-lg p-3",children:l.jsxs("div",{className:"flex items-center gap-2 text-sm overflow-hidden",children:[l.jsx(j.Search,{className:"w-4 h-4 text-[#1784FC] animate-pulse shrink-0"}),l.jsx("span",{className:"text-[#333] dark:text-[#E5E7EB] shrink-0",children:r("deepResearch.steps.searching")}),l.jsxs("span",{className:"text-[#999] dark:text-[#A6A6A6] truncate",children:["| ",E.query]})]})},E.id):l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between border border-gray-200 dark:border-[#1D3A6F] rounded-lg p-3 bg-gray-50 dark:bg-[#111827] cursor-pointer hover:bg-gray-100 dark:hover:bg-[#1F2937] transition-colors",onClick:()=>u(E.id),children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm overflow-hidden",children:[l.jsx(j.Search,{className:"w-4 h-4 text-[#1784FC] shrink-0"}),l.jsx("span",{className:"text-[#333] dark:text-[#E5E7EB] shrink-0",children:r("deepResearch.steps.searchTitle")}),l.jsxs("span",{className:"text-[#999] dark:text-[#A6A6A6] truncate",children:["| ",E.query]})]}),typeof E.resultCount=="number"&&l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("div",{className:"bg-blue-50 dark:bg-blue-900/20 text-[#1784FC] px-2 py-0.5 rounded-full text-xs font-medium",children:E.resultCount}),o.has(E.id)?l.jsx(j.ChevronUp,{className:"w-4 h-4 text-[#999]"}):l.jsx(j.ChevronDown,{className:"w-4 h-4 text-[#999]"})]})]}),o.has(E.id)&&E.hits&&l.jsx("div",{className:"mt-2 space-y-2 pl-4",children:E.hits.map((S,F)=>l.jsx("div",{className:"p-3 bg-white dark:bg-[#020817] border border-gray-100 dark:border-[#1D3A6F] rounded-lg hover:border-blue-200 dark:hover:border-blue-800 transition-colors cursor-pointer group",onClick:()=>S.url&&window.open(S.url,"_blank"),children:l.jsx("div",{className:"flex items-start gap-2",children:l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("div",{className:"text-sm font-medium text-[#333] dark:text-[#E5E7EB] group-hover:text-[#1784FC] transition-colors line-clamp-1",children:S.title}),S.content&&l.jsx("div",{className:"text-xs text-[#999] dark:text-[#A6A6A6] mt-1 line-clamp-2",children:S.content})]})})},F))}),E.note&&l.jsx("p",{className:"text-[#999] dark:text-[#A6A6A6] text-sm mt-4 mb-2",children:E.note})]},E.id)),y.showOptimizePlan&&l.jsxs("div",{className:"border border-gray-200 dark:border-[#1D3A6F] rounded-lg p-3 bg-white dark:bg-[#020817] flex justify-between items-center cursor-pointer hover:bg-gray-50 dark:hover:bg-[#111827] transition-colors",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx(j.FileText,{className:"w-4 h-4 text-[#1784FC]"}),l.jsx("span",{className:"text-[#333] dark:text-[#E5E7EB]",children:r("deepResearch.steps.optimizePlan")})]}),l.jsx(j.ChevronDown,{className:"w-4 h-4 text-[#999]"})]})]})]})]},y.id)}),l.jsx("div",{className:"pt-2",children:l.jsxs("div",{className:`flex items-center gap-2 text-base font-medium mb-4 ${C==="pending"?"text-[#999] dark:text-[#666]":"text-[#333] dark:text-[#E5E7EB]"}`,children:[C==="in_progress"?l.jsx(j.Loader,{className:"w-5 h-5 text-blue-500 animate-spin"}):l.jsx(j.BookOpenText,{className:`w-4 h-4 ${C==="pending"?"text-[#999]":"text-[#1784FC]"}`}),r("deepResearch.steps.reportTitle")]})})]})]})},Ud=({content:e,data:t,formatUrl:s})=>{const{t:n}=ce.useTranslation();return!e&&!t?l.jsxs("div",{className:"px-6 pb-8 max-w-[730px] h-full flex flex-col items-center justify-center text-center",children:[l.jsx("div",{className:"mb-2 text-base font-medium text-[#333333] dark:text-[#E5E7EB]",children:n("deepResearch.report.generatingTitle")}),l.jsx("div",{className:"text-sm text-[#999999] dark:text-[#A6A6A6] max-w-[520px] leading-relaxed",children:n("deepResearch.report.generatingDescription")})]}):l.jsxs("div",{className:"px-2 pb-8 max-w-[730px]",children:[t&&l.jsxs("div",{className:"mb-6 p-4 border border-gray-200 dark:border-gray-800 rounded-xl bg-gray-50 dark:bg-gray-900 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center text-blue-600 dark:text-blue-400",children:l.jsx(j.FileText,{className:"w-6 h-6"})}),l.jsxs("div",{children:[l.jsx("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:t.title||n("deepResearch.report.defaultTitle")}),l.jsx("div",{className:"text-xs text-gray-500",children:t.created?Cn(t.created):""})]})]}),t.url&&l.jsx("a",{href:s?s({url:t.url}):t.url,target:"_blank",rel:"noopener noreferrer",className:"p-2 text-gray-500 hover:text-blue-600 dark:hover:text-blue-400 transition-colors cursor-pointer",title:n("deepResearch.button.view"),children:l.jsx(j.ExternalLink,{className:"w-5 h-5"})})]}),e&&l.jsx("div",{className:"cm-markdown",children:l.jsx(wt,{content:e})}),t?.url&&l.jsx("div",{className:"cm-markdown",children:l.jsx(wt,{url:s?s({url:t.url}):t.url})})]})},Wd=({hits:e,theme:t})=>{const s=g.useMemo(()=>{if(!e||!Array.isArray(e))return[];const n=new Map;for(const i of e){if(!i||typeof i!="object")continue;const o=typeof i.title=="string"?i.title:"";o&&(n.has(o)||n.set(o,i))}const r=[];return n.forEach(i=>{const o=typeof i.title=="string"?i.title:"",a=typeof i.url=="string"?i.url:void 0,c=typeof i.content=="string"?i.content:void 0,d={title:o,summary:c,url:a,source:typeof i.source=="string"?{name:i.source}:void 0,metadata:typeof i.score=="number"?{score:i.score}:void 0};r.push(d)}),r},[e]);return l.jsx("div",{className:"pb-8 max-w-[730px]",children:l.jsx(_o,{section:s,theme:t||"light",hideHeader:!0,onRecordClick:n=>{typeof n.url=="string"&&window.open(n.url)}})})},Ao=({open:e,onClose:t,defaultActiveTab:s,steps:n,plannerStatus:r,executionStatus:i,reportStatus:o,reportData:a,reportContent:c,searchHits:d,formatUrl:u,theme:h,showReportOnly:p=!1})=>{const{t:m}=ce.useTranslation(),[v,A]=g.useState(s||m("deepResearch.tab.steps"));return g.useEffect(()=>{p?A(m("deepResearch.tab.report")):s&&A(s)},[s,p,m]),l.jsx(dc,{children:e&&l.jsxs(l.Fragment,{children:[l.jsx(wo.div,{className:"fixed inset-0 z-999 bg-black/20",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t}),l.jsxs(wo.div,{className:"fixed z-1000 top-20 bottom-20 right-4 flex flex-col rounded-xl overflow-hidden bg-white dark:bg-black shadow-[0_2px_20px_rgba(0,0,0,0.1)] dark:shadow-[0_2px_20px_rgba(255,255,255,0.1)]",initial:{width:0,height:0,opacity:0,padding:0},animate:{width:800,height:"auto",opacity:1,padding:24},exit:{width:0,height:0,opacity:0,padding:0},children:[l.jsxs("div",{className:"flex items-center justify-between",children:[p?l.jsx("div",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-2",children:m("deepResearch.tab.report")}):l.jsx(yn.Segmented,{className:"cm-deep-research-segmented",value:v,style:{marginBottom:8},onChange:C=>A(C),options:[m("deepResearch.tab.report"),m("deepResearch.tab.steps"),m("deepResearch.tab.searchResults")]}),l.jsxs("div",{className:"flex items-center gap-2",children:[v===m("deepResearch.tab.report")&&l.jsxs(l.Fragment,{children:[l.jsxs("button",{type:"button",className:"flex items-center gap-1 px-2 py-1 rounded-full bg-[#E9F0FE] dark:bg-blue-900/30 text-sm text-[#1784FC] dark:text-blue-400 hover:bg-[#E0E9FD] dark:hover:bg-blue-900/50 border-none outline-none cursor-pointer",onClick:()=>a?.url&&window.open(u?.({url:a.url})||a.url,"_blank"),children:[l.jsx(j.Download,{className:"w-4 h-4"}),l.jsx("span",{children:m("deepResearch.button.download")})]}),l.jsxs("button",{type:"button",className:"flex items-center gap-1 px-2 py-1 rounded-full bg-[#E9F0FE] dark:bg-blue-900/30 text-sm text-[#1784FC] dark:text-blue-400 hover:bg-[#E0E9FD] dark:hover:bg-blue-900/50 border-none outline-none cursor-pointer",children:[l.jsx(j.Share2,{className:"w-4 h-4"}),l.jsx("span",{children:m("deepResearch.button.share")})]})]}),l.jsx(yn.Button,{type:"text",onClick:t,className:"text-[#999] hover:text-gray-600 flex items-center justify-center",children:l.jsx(j.X,{className:"w-5 h-5"})})]})]}),l.jsxs("div",{className:"pt-6 flex-1 overflow-y-auto bg-white dark:bg-black",children:[v===m("deepResearch.tab.report")&&l.jsx(Ud,{content:c,data:a,formatUrl:u}),v===m("deepResearch.tab.steps")&&l.jsx(_d,{steps:n,plannerStatus:r,executionStatus:i,reportStatus:o}),v===m("deepResearch.tab.searchResults")&&l.jsx(Wd,{hits:d,theme:h})]})]})]})})},qd=e=>{const t={deepResearchPlans:[],deepResearchCurrentStepIndex:-1,deepResearchCurrentStepFinished:!1,deepResearchQuery:"",deepResearchResultCount:void 0,deepResearchPlannerStarted:!1,deepResearchResearcherStarted:!1,deepResearchReporterStarted:!1,deepResearchReporterFinished:!1,deepResearchReportData:void 0,deepResearchSearchMap:{}};return e.forEach(s=>{if(s.chunk_type==="research_planner_start"){t.deepResearchPlans=[],t.deepResearchCurrentStepIndex=-1,t.deepResearchCurrentStepFinished=!1,t.deepResearchQuery="",t.deepResearchResultCount=void 0,t.deepResearchPlannerStarted=!0,t.deepResearchResearcherStarted=!1,t.deepResearchReporterStarted=!1,t.deepResearchReporterFinished=!1,t.deepResearchReportData=void 0,t.deepResearchSearchMap={};return}if(s.chunk_type==="research_planner_end"){if(typeof s.message_chunk=="string")try{const n=JSON.parse(s.message_chunk);if(Array.isArray(n)){const r=n.map(i=>String(i));t.deepResearchPlans=r,t.deepResearchCurrentStepIndex=r.length>0?0:-1}t.deepResearchPlannerStarted=!1}catch(n){console.error(n)}return}if(s.chunk_type==="research_researcher_start"){if(typeof s.message_chunk=="string"&&s.message_chunk)try{const n=JSON.parse(s.message_chunk),r=typeof n?.plan=="string"?n.plan:"";if(r){t.deepResearchResearcherStarted=!0,t.deepResearchCurrentStepFinished=!1;let i=t.deepResearchPlans.findIndex(o=>o===r);i===-1&&(t.deepResearchPlans.push(r),i=t.deepResearchPlans.length-1),t.deepResearchCurrentStepIndex=i}}catch(n){console.error(n)}return}if(s.chunk_type==="research_researcher_step_start"){if(typeof s.message_chunk=="string"&&s.message_chunk)try{const n=JSON.parse(s.message_chunk),r=typeof n?.plan=="string"?n.plan:"",i=n?.step?.payload?.query;if(r&&!t.deepResearchPlans.includes(r)&&(t.deepResearchPlans.push(r),t.deepResearchCurrentStepIndex===-1&&(t.deepResearchCurrentStepIndex=t.deepResearchPlans.length-1)),typeof i=="string"&&(t.deepResearchQuery=i),t.deepResearchResultCount=void 0,r&&typeof i=="string"){const o=t.deepResearchSearchMap[r]??{};t.deepResearchSearchMap[r]={...o,query:i}}}catch(n){console.error(n)}return}if(s.chunk_type==="research_researcher_step_end"){if(typeof s.message_chunk=="string"&&s.message_chunk)try{const n=JSON.parse(s.message_chunk),r=typeof n?.plan=="string"?n.plan:"",i=n?.step?.payload?.hits;if(Array.isArray(i)&&(t.deepResearchResultCount=i.length,r)){const o=t.deepResearchSearchMap[r]??{};t.deepResearchSearchMap[r]={...o,resultCount:i.length,hits:i}}}catch(n){console.error(n)}return}if(s.chunk_type==="research_researcher_end"){t.deepResearchQuery="",t.deepResearchCurrentStepFinished=!0;return}if(s.chunk_type==="research_reporter_start"){t.deepResearchReporterStarted=!0;return}if(s.chunk_type==="research_reporter_end"&&(t.deepResearchReporterStarted=!0,t.deepResearchReporterFinished=!0,typeof s.message_chunk=="string"&&s.message_chunk))try{const n=JSON.parse(s.message_chunk);t.deepResearchReportData=n}catch(n){console.error(n)}}),t},Kd=({ChunkData:e=[],question:t,formatUrl:s,theme:n})=>{const{t:r}=ce.useTranslation(),[i,o]=g.useState(!1),[a,c]=g.useState(r("deepResearch.tab.steps")),{deepResearchPlans:d,deepResearchCurrentStepIndex:u,deepResearchCurrentStepFinished:h,deepResearchQuery:p,deepResearchResultCount:m,deepResearchPlannerStarted:v,deepResearchResearcherStarted:A,deepResearchReporterStarted:C,deepResearchReporterFinished:y,deepResearchReportData:b,deepResearchSearchMap:x}=g.useMemo(()=>qd(e),[e]),N=d.length>0&&u>=0&&u<d.length,P=N?d[u]:"",D=d.length>0?1:0,E=N?(u+1)/d.length:0,S=y?1:C?.5:0,F=(D+E+S)/3,_=g.useMemo(()=>{if(y)return typeof m=="number"?`深度研究完成 · 找到 ${m} 条相关结果`:"深度研究完成";if(C)return"正在编写研究报告";if(A)return"正在执行研究计划";if(d.length>0)return"正在规划研究计划"},[y,m,C,A,d.length]),X=g.useMemo(()=>d.length?d.map((O,Y)=>{let J="pending";y||C?J="done":A&&(Y<u?J="done":Y===u&&(J=h?"done":"in_progress"));const ie=x[O],Qe=ie?.query?[{id:`step-${Y+1}-search-1`,query:ie.query,resultCount:ie.resultCount,status:typeof ie.resultCount=="number"?"done":"searching",hits:ie.hits}]:void 0;return{id:`step-${Y+1}`,title:O,status:J,searches:Qe,showOptimizePlan:!1}}):[],[d,y,C,A,x,u,h]),Z=g.useMemo(()=>{const O=[];return Object.values(x).forEach(Y=>{Y.hits&&Array.isArray(Y.hits)&&O.push(...Y.hits)}),O},[x]),ae=d.length?"done":v?"in_progress":"pending",$=g.useMemo(()=>X.length?X.some(O=>O.status==="in_progress")?"in_progress":X.some(O=>O.status==="done")?"done":"pending":"pending",[X]),ue=y?"done":C?"in_progress":"pending",ee=g.useMemo(()=>typeof F!="number"||Number.isNaN(F)||F<0?0:F>1?1:F,[F]),B=g.useMemo(()=>_||(ee>=1?typeof m=="number"?r("deepResearch.status.completedWithCount",{count:m}):r("deepResearch.status.completed"):ee>0?r("deepResearch.status.running"):r("deepResearch.status.preparing")),[_,ee,m,r]);return e.length?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"w-full my-3 cursor-pointer",onClick:()=>{c(r("deepResearch.tab.steps")),o(!0)},children:l.jsxs("div",{className:"w-full rounded-xl border border-[#EEF0F3] bg-[#F3F4F6] dark:border-[#1D3A6F] dark:bg-[#020817] p-4",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(j.Hourglass,{className:"h-4 w-4 text-[#148EFF] cm-hourglass-rotate"}),l.jsx("div",{className:"text-sm font-medium text-[#333] dark:text-[#E5E7EB] truncate",children:P||"——"})]}),l.jsxs("div",{className:"mt-2 flex items-center justify-between rounded-full bg-white px-3 py-2 text-sm text-[#333] dark:bg-[#111827] dark:text-[#D1D5DB]",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2 flex-1",children:[ee>=1?l.jsx(j.Check,{className:"h-4 w-4 text-[#22C55E] shrink-0"}):l.jsx(j.Loader,{className:"h-4 w-4 animate-spin text-[#148EFF] shrink-0"}),l.jsxs("div",{className:"flex min-w-0 items-center flex-1",children:[l.jsx("span",{className:"whitespace-nowrap shrink-0",children:B}),l.jsxs("span",{className:"text-[#999] dark:text-[#A6A6A6] truncate ml-1",children:["| ",p||t]})]})]}),l.jsxs("div",{className:"ml-2 flex items-center gap-2 shrink-0",children:[ee<1&&typeof m=="number"?l.jsx("div",{className:"flex py-0.5 px-1 items-center justify-center rounded-full border border-[#018AE5] bg-white text-xs font-medium text-[#018AE5] dark:bg-[#020617]",children:m}):null,ee>=1&&l.jsx("button",{type:"button",className:"px-3 py-1 text-xs font-medium rounded-full bg-[#E9F0FE] dark:bg-blue-900/30 text-[#1784FC] dark:text-blue-400 hover:bg-[#E0E9FD] dark:hover:bg-blue-900/50 cursor-pointer",onClick:O=>{O.stopPropagation(),c(r("deepResearch.tab.report")),o(!0)},children:r("deepResearch.button.view")})]})]}),l.jsxs("div",{className:"mt-5 w-full flex items-center gap-2 overflow-hidden",children:[l.jsx("div",{className:"h-2 rounded-full flex-1 items-center bg-white dark:bg-[#1F2937]",children:l.jsx("div",{className:`h-full rounded-full transition-all ${ee>=1?"bg-[#00C868]":"bg-[#1784FC]"}`,style:{width:`${ee*100}%`}})}),l.jsx("div",{className:"flex items-center justify-center cursor-not-allowed opacity-50",children:ee>=1?l.jsx(j.Check,{className:"h-4 w-4 text-[#22C55E]"}):l.jsx(j.CirclePause,{className:"h-4 w-4 text-[#1784FC]"})})]})]})}),l.jsx(Ao,{open:i,onClose:()=>o(!1),defaultActiveTab:a,steps:X,plannerStatus:ae,executionStatus:$,reportStatus:ue,reportData:b,searchHits:Z,formatUrl:s,theme:n})]}):null},Yd=({payload:e,formatUrl:t})=>{const[s,n]=g.useState(!1);return!e?.title||!e?.url?null:l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"mt-3",children:l.jsxs("div",{className:"flex items-center gap-3 p-3 bg-gray-50 dark:bg-[#202126] rounded-lg border border-gray-200 dark:border-gray-800 max-w-sm cursor-pointer transition-colors hover:bg-gray-100 dark:hover:bg-gray-800",onClick:()=>n(!0),children:[l.jsx("div",{className:"shrink-0",children:l.jsx(j.FileText,{className:"w-6 h-6 text-blue-500"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-gray-100 truncate",title:e.title,children:e.title}),e.created&&l.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:Cn(e.created)})]}),e.url&&l.jsx("a",{href:t?t({url:e.url}):e.url,target:"_blank",rel:"noopener noreferrer",className:"shrink-0 p-2 text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-md transition-colors cursor-pointer",title:"Open Link",onClick:r=>r.stopPropagation(),children:l.jsx(j.ExternalLink,{className:"w-5 h-5"})})]})}),l.jsx(Ao,{open:s,onClose:()=>n(!1),reportContent:e.content,reportData:e,formatUrl:t,showReportOnly:!0})]})},zd=["research_planner_start","research_planner_progress","research_planner_end","research_researcher_start","research_researcher_step_start","research_researcher_step_end","research_researcher_end","research_reporter_start","research_reporter_end"];function Gd(e){if(e)return e==="light"?"light":e==="dark"||typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}const Jd=g.memo(g.forwardRef(function({message:t,isTyping:s,onResend:n,hide_assistant:r=!1,rootClassName:i,actionClassName:o,actionIconSize:a,copyButtonId:c,formatUrl:d,theme:u,locale:h,assistantList:p,currentAssistant:m},v){const{t:A,i18n:C}=ce.useTranslation(),y=Gd(u),[b,x]=g.useState({}),{data:{query_intent:N,tools:P,fetch_source:D,pick_source:E,deep_read:S,think:F,response:_,deepResearch:X},handlers:Z,clearAllChunkData:ae}=ua(),[$,ue]=g.useState({query_intent:!1,tools:!1,fetch_source:!1,pick_source:!1,deep_read:!1,think:!1,response:!1,deepResearch:!1}),ee=g.useRef(!1);g.useImperativeHandle(v,()=>({addChunk:M=>{if(ue(()=>({query_intent:!1,tools:!1,fetch_source:!1,pick_source:!1,deep_read:!1,think:!1,response:!1,deepResearch:!1,[M.chunk_type||""]:!0})),M.chunk_type!=="reply_start")if(M.chunk_type==="query_intent")Z.deal_query_intent(M);else if(M.chunk_type==="tools")Z.deal_tools(M);else if(M.chunk_type==="fetch_source")Z.deal_fetch_source(M);else if(M.chunk_type==="pick_source")Z.deal_pick_source(M);else if(M.chunk_type==="deep_read")Z.deal_deep_read(M);else if(M.chunk_type==="think")Z.deal_think(M);else if(M.chunk_type==="response"){const Pe=M.message_chunk;if(typeof Pe=="string"){if(Pe.includes("<think>")||Pe.includes("<think>")){ee.current=!0;return}else if(Pe.includes("</think>")||Pe.includes("</think>")){ee.current=!1;return}ee.current?Z.deal_think({...M,chunk_type:"think"}):Z.deal_response(M)}}else zd.includes(M.chunk_type||"")?Z.deal_deep_research(M):M.chunk_type},reset:()=>{ae(),ue({query_intent:!1,tools:!1,fetch_source:!1,pick_source:!1,deep_read:!1,think:!1,response:!1,deepResearch:!1}),ee.current=!1}}));const B=t?._source?.type==="assistant",O=t?._source?.assistant_id,Y=t?._source?.assistant_item;g.useEffect(()=>{h&&C.language!==h&&C.changeLanguage(h)},[h,C]),g.useEffect(()=>{if(Y){x(Y);return}if(B&&O&&Array.isArray(p)){x(p.find(M=>M._id===O)??{});return}x(m)},[B,Y,O,p,m]);const J=t?._source,ie=J?.message||"",Qe=J?.payload,qt=J?.attachments??[],Ee=J?.details||[],gt=J?.question||"",yt=s===!1&&(ie||_?.message_chunk),[xt,He]=g.useState([]),vt=M=>{He(M)},Fe=()=>B?l.jsxs(l.Fragment,{children:[l.jsx(Jo,{Detail:Ee.find(M=>M.type==="query_intent"),ChunkData:N,getSuggestion:vt,loading:$?.query_intent}),l.jsx(Qo,{Detail:Ee.find(M=>M.type==="tools"),ChunkData:P,loading:$?.tools}),l.jsx(Zo,{Detail:Ee.find(M=>M.type==="fetch_source"),ChunkData:D,loading:$?.fetch_source,formatUrl:d}),l.jsx(ea,{Detail:Ee.find(M=>M.type==="pick_source"),ChunkData:E,loading:$?.pick_source}),l.jsx(sa,{Detail:Ee.find(M=>M.type==="deep_read"),ChunkData:S,loading:$?.deep_read}),l.jsx(na,{Detail:Ee.find(M=>M.type==="think"),ChunkData:F,loading:$?.think}),l.jsx("div",{className:"cm-markdown",children:l.jsx(wt,{content:ie||_?.message_chunk||""})}),l.jsx(Yd,{payload:Qe,formatUrl:d}),l.jsx(Kd,{ChunkData:X,question:gt,formatUrl:d,theme:y}),s&&l.jsx("div",{className:"inline-block w-1.5 h-5 ml-0.5 -mb-0.5 bg-[#666666] dark:bg-[#A3A3A3] rounded-sm animate-typing"}),yt&&l.jsx(ia,{id:t._id??"",content:ie||_?.message_chunk||"",question:gt,actionClassName:o,actionIconSize:a,copyButtonId:c,onResend:()=>{n&&n(gt)}}),!s&&l.jsx(oa,{suggestions:xt,onSelect:M=>n&&n(M)})]}):l.jsx(la,{message:ie,attachments:qt});return l.jsx("div",{className:Le("w-full py-8 flex",[B?"justify-start":"justify-end"],y==="dark"&&"dark",i),children:l.jsx("div",{className:`w-full px-4 flex gap-4 ${B?"w-full":"flex-row-reverse"}`,children:l.jsxs("div",{className:`w-full space-y-2 ${B?"text-left":"text-right"}`,children:[!r&&(Fe()||_||F)&&l.jsxs("div",{className:"w-full flex items-center gap-1 font-semibold text-sm text-[#333] dark:text-white",children:[B?l.jsx("div",{className:"w-6 h-6 flex justify-center items-center rounded-full bg-white dark:bg-[#2A2A2A] border border-[#E6E6E6] dark:border-[#3A3A3A]",children:b?._source?.icon?.startsWith("font_")?l.jsx(ca,{name:b._source.icon,className:"w-4 h-4"}):l.jsx("img",{src:zo,className:"w-4 h-4",alt:A("assistant.message.logo")})}):null,B?b?._source?.name||"Coco AI":""]}),l.jsx("div",{className:"w-full prose dark:prose-invert prose-sm max-w-none",children:l.jsx("div",{className:Le("w-full text-[#333] dark:text-white leading-relaxed",B&&"pl-7"),children:Fe()})})]})})})})),Qd=g.memo(g.forwardRef((e,t)=>l.jsx(ce.I18nextProvider,{i18n:wn,children:l.jsx(Jd,{...e,ref:t})})));return zt.ChatMessage=Qd,Object.defineProperty(zt,Symbol.toStringTag,{value:"Module"}),zt})({},React,ReactI18next,clsx,i18n,Markdown,LucideReact,ahooks,attachments,antd,SearchResults);