@akropolys/kiku 2.2.28 → 2.2.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/EMBED.md +46 -7
- package/README.md +23 -5
- package/dist/embed/embed.js +15 -15
- package/dist/embed/meta.json +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{useState as Fs,useEffect as _s,useRef as Ds}from"react";import{useSearch as Wh,useAkropolysContext as Oh,useCardFields as Vh}from"@akropolys/sdk";import{resolveDisplayFields as Uh}from"@akropolys/sdk";function Ot(e,r){return e.details??(e.fields?Uh(e.fields,r).details:[])}function no(e){return e.length?` (${e.map(r=>`${r.label}: ${r.value}`).join(", ")})`:""}function As(e){var r,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(r=0;r<a;r++)e[r]&&(t=As(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Ps(){for(var e,r,t=0,n="",a=arguments.length;t<a;t++)(e=arguments[t])&&(r=As(e))&&(n&&(n+=" "),n+=r);return n}function ne(...e){return Ps(e)}import{Fragment as Hs,jsx as ft,jsxs as $t}from"react/jsx-runtime";var Bs=()=>$t("svg",{width:"15",height:"15",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[ft("circle",{cx:"8.5",cy:"8.5",r:"5.5"}),ft("line",{x1:"13",y1:"13",x2:"18",y2:"18"})]});function jh({placeholder:e="Search products\u2026",limit:r=10,debounceMs:t=150,onSelect:n,className:a,inputClassName:o,dropdownClassName:i,renderResult:c,theme:s,classNames:l={}}){let[h,d]=Fs(""),[p,u]=Fs(!1),{results:f,loading:C,search:b,clear:L}=Wh({debounceMs:t}),x=Oh(),z=Vh(),S=Ds(null),w=Ds(!1);_s(()=>{if(w.current){w.current=!1;return}if(!h.trim()){L(),u(!1);return}u(!0),b(h,r)},[h]),_s(()=>{let M=I=>{S.current&&!S.current.contains(I.target)&&u(!1)};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[]);let _=M=>{h.trim()&&x.api.searchVector(h,1,void 0,!0).catch(()=>{}),w.current=!0,u(!1),d(M.entity.title??M.entity.name??""),n?.(M)},F=()=>{h.trim()&&(f.length>0?_(f[0]):x.api.searchVector(h,1,void 0,!0).catch(()=>{}))},T=p&&h.trim().length>0,U={...s?.primaryColor&&{"--hsk-primary":s.primaryColor},...s?.backgroundColor&&{"--hsk-bg":s.backgroundColor},...s?.textColor&&{"--hsk-text":s.textColor},...s?.fontFamily&&{"--hsk-font":s.fontFamily},...s?.borderRadius&&{"--hsk-border-radius":s.borderRadius}};return $t("div",{className:ne("hsk-sb-wrap",l.root,a),ref:S,style:U,children:[ft("span",{className:"hsk-sb-icon",children:ft(Bs,{})}),ft("input",{className:ne("hsk-sb-input",l.input,o),type:"text",value:h,placeholder:e,onChange:M=>d(M.target.value),onFocus:()=>f.length>0&&h.trim()&&u(!0),onKeyDown:M=>{M.key==="Enter"&&F()},autoComplete:"off",spellCheck:!1}),T&&$t("div",{className:ne("hsk-sb-drop",l.dropdown,i),style:{position:"absolute"},children:[C&&ft("div",{className:"hsk-sb-loading-bar"}),C&&f.length===0?$t(Hs,{children:[$t("div",{className:"hsk-sb-skeleton-row",children:[ft("span",{className:"hsk-sb-skeleton-icon"}),$t("div",{className:"hsk-sb-row-body",children:[ft("div",{className:"hsk-sb-skeleton-text1"}),ft("div",{className:"hsk-sb-skeleton-text2"})]})]}),$t("div",{className:"hsk-sb-skeleton-row",children:[ft("span",{className:"hsk-sb-skeleton-icon"}),$t("div",{className:"hsk-sb-row-body",children:[ft("div",{className:"hsk-sb-skeleton-text1",style:{width:"45%"}}),ft("div",{className:"hsk-sb-skeleton-text2",style:{width:"25%"}})]})]})]}):$t(Hs,{children:[f.length===0&&!C&&$t("div",{className:"hsk-sb-empty",children:["No results for \u201C",h,"\u201D"]}),f.map((M,I)=>{if(c)return ft("div",{onClick:()=>_(M),className:"hsk-sb-fade",style:{animationDelay:`${I*18}ms`},children:c(M)},M.id);let $=M.entity.image??M.entity.thumbnail??M.entity.images?.[0];return $t("div",{className:ne("hsk-sb-row hsk-sb-fade",l.row),style:{animationDelay:`${I*18}ms`},onClick:()=>_(M),children:[ft("span",{className:"hsk-sb-row-thumb",children:$?ft("img",{src:$,alt:"",loading:"lazy",onError:P=>{P.currentTarget.style.display="none"}}):ft(Bs,{})}),$t("div",{className:"hsk-sb-row-body",children:[ft("div",{className:"hsk-sb-row-title",children:M.entity.title??M.entity.name}),Ot({fields:M.entity.fields??M.entity},z)[0]&&ft("div",{className:"hsk-sb-row-sub",children:Ot({fields:M.entity.fields??M.entity},z)[0].value})]})]},M.id)})]})]})]})}import{useState as Ua,useEffect as El,useCallback as ps,useRef as nm}from"react";import{createPortal as am}from"react-dom";var $s="hsk-sounds",Be=null,Zt=null;function ia(){try{return localStorage.getItem($s)!=="off"}catch{return!0}}function qs(e){try{localStorage.setItem($s,e?"on":"off")}catch{}e&&mr()}function mr(){if(typeof window>"u")return;try{let r=navigator.audioSession;r&&r.type!=="playback"&&(r.type="playback")}catch{}if(Be){Be.state==="suspended"&&Be.resume().catch(()=>{});return}let e=window.AudioContext||window.webkitAudioContext;if(e)try{Be=new e({latencyHint:"interactive"}),Zt=Be.createGain(),Zt.gain.value=.28,Zt.connect(Be.destination);let r=Be.createBuffer(1,1,Be.sampleRate),t=Be.createBufferSource();t.buffer=r,t.connect(Be.destination),t.start(0),Be.resume().catch(()=>{})}catch{Be=null}}function Jt(e,r,t,n,a){if(!Be||!Zt)return;let o=Be.createOscillator();o.type="sine",o.frequency.setValueAtTime(r,e),o.frequency.exponentialRampToValueAtTime(Math.max(40,r*t),e+n);let i=Be.createBiquadFilter();i.type="lowpass",i.Q.value=.9,i.frequency.setValueAtTime(Math.min(18e3,r*7),e),i.frequency.exponentialRampToValueAtTime(Math.max(80,r*1.5),e+n);let c=Be.createGain();c.gain.setValueAtTime(1e-4,e),c.gain.exponentialRampToValueAtTime(a,e+.006),c.gain.exponentialRampToValueAtTime(1e-4,e+n),o.connect(i),i.connect(c),c.connect(Zt),o.start(e),o.stop(e+n+.02)}function Us(e,r){if(!Be||!Zt)return;let t=Math.floor(Be.sampleRate*.03),n=Be.createBuffer(1,t,Be.sampleRate),a=n.getChannelData(0);for(let s=0;s<t;s++)a[s]=(Math.random()*2-1)*Math.pow(1-s/t,3);let o=Be.createBufferSource();o.buffer=n;let i=Be.createBiquadFilter();i.type="bandpass",i.frequency.value=2600,i.Q.value=5;let c=Be.createGain();c.gain.value=r,o.connect(i),i.connect(c),c.connect(Zt),o.start(e)}function Ws(){return ia()?Be?Be.state:"unsupported":"off"}function Gh(e){!Be||!Zt||(Jt(e,587.33,.985,.16,.38),Jt(e+.048,739.99,.985,.18,.42),Jt(e+.096,880,.985,.28,.46),Jt(e+.105,1174.66,.985,.22,.22),Us(e+.096,.16))}function Kh(e){!Be||!Zt||Jt(e,659.25,.97,.09,.26)}function Vt(e,r=!1){if(!r&&!ia()||(mr(),!Be||!Zt||Be.state==="closed"))return;Be.state==="suspended"&&Be.resume().catch(()=>{});let t=Be.currentTime+.01;switch(e){case"connect":Gh(t);break;case"heard":Kh(t);break;case"reply":Jt(t,440,.94,.13,.5),Jt(t+.09,660,.94,.16,.42);break;case"interrupt":Jt(t,520,.62,.17,.4);break;case"send":Jt(t,300,1.16,.1,.22);break;case"pin":Us(t,.35),Jt(t+.02,880,.97,.07,.22);break}}var ao='@property --hsk-chat-bg{syntax: "<color>"; inherits: true; initial-value: #0a0a0a;}@property --hsk-chat-text{syntax: "<color>"; inherits: true; initial-value: #f0efed;}@property --hsk-chat-muted{syntax: "<color>"; inherits: true; initial-value: #888888;}@property --hsk-chat-divide{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.08);}@property --hsk-chat-input-bg{syntax: "<color>"; inherits: true; initial-value: #191919;}@property --hsk-chat-source-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.04);}@property --hsk-fade-bg{syntax: "<color>"; inherits: true; initial-value: #0a0a0a;}@property --hsk-surface-1{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.06);}@property --hsk-surface-2{syntax: "<color>"; inherits: true; initial-value: #1f1f22;}@property --hsk-bubble-bg{syntax: "<color>"; inherits: true; initial-value: #1f1f22;}@property --hsk-think-text{syntax: "<color>"; inherits: true; initial-value: #a6a6a6;}@property --hsk-placeholder{syntax: "<color>"; inherits: true; initial-value: #555555;}@property --hsk-grid-bg{syntax: "<color>"; inherits: true; initial-value: #1a1a1c;}@property --hsk-active-bg{syntax: "<color>"; inherits: true; initial-value: #f0efed;}@property --hsk-on-active{syntax: "<color>"; inherits: true; initial-value: #0a0a0a;}@property --hsk-src-title{syntax: "<color>"; inherits: true; initial-value: #f9fafb;}@property --hsk-src-desc{syntax: "<color>"; inherits: true; initial-value: #9ca3af;}@property --hsk-price-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.08);}@property --hsk-price-text{syntax: "<color>"; inherits: true; initial-value: #ff7a45;}@property --hsk-sheet-bg{syntax: "<color>"; inherits: true; initial-value: #1f1f22;}@property --hsk-primary{syntax: "<color>"; inherits: true; initial-value: #ff6a33;}@property --hsk-pill-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.06);}@property --hsk-glass-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.07);}@property --hsk-glass-edge{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-glass-edge-top{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-glass-drop{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-glass-sheen{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-selection-bg{syntax: "<color>"; inherits: true; initial-value: #ff6a33;}@property --hsk-selection-text{syntax: "<color>"; inherits: true; initial-value: #ffffff;}[data-hsk-theme]{transition:--hsk-chat-bg .36s cubic-bezier(.4,0,.2,1),--hsk-chat-text .36s cubic-bezier(.4,0,.2,1),--hsk-chat-muted .36s cubic-bezier(.4,0,.2,1),--hsk-chat-divide .36s cubic-bezier(.4,0,.2,1),--hsk-chat-input-bg .36s cubic-bezier(.4,0,.2,1),--hsk-chat-source-bg .36s cubic-bezier(.4,0,.2,1),--hsk-fade-bg .36s cubic-bezier(.4,0,.2,1),--hsk-surface-1 .36s cubic-bezier(.4,0,.2,1),--hsk-surface-2 .36s cubic-bezier(.4,0,.2,1),--hsk-bubble-bg .36s cubic-bezier(.4,0,.2,1),--hsk-think-text .36s cubic-bezier(.4,0,.2,1),--hsk-placeholder .36s cubic-bezier(.4,0,.2,1),--hsk-grid-bg .36s cubic-bezier(.4,0,.2,1),--hsk-active-bg .36s cubic-bezier(.4,0,.2,1),--hsk-on-active .36s cubic-bezier(.4,0,.2,1),--hsk-src-title .36s cubic-bezier(.4,0,.2,1),--hsk-src-desc .36s cubic-bezier(.4,0,.2,1),--hsk-price-bg .36s cubic-bezier(.4,0,.2,1),--hsk-price-text .36s cubic-bezier(.4,0,.2,1),--hsk-sheet-bg .36s cubic-bezier(.4,0,.2,1),--hsk-primary .36s cubic-bezier(.4,0,.2,1),--hsk-pill-bg .36s cubic-bezier(.4,0,.2,1),--hsk-glass-bg .36s cubic-bezier(.4,0,.2,1),--hsk-glass-edge .36s cubic-bezier(.4,0,.2,1),--hsk-glass-edge-top .36s cubic-bezier(.4,0,.2,1),--hsk-glass-drop .36s cubic-bezier(.4,0,.2,1),--hsk-glass-sheen .36s cubic-bezier(.4,0,.2,1),--hsk-selection-bg .36s cubic-bezier(.4,0,.2,1),--hsk-selection-text .36s cubic-bezier(.4,0,.2,1)}[data-hsk-theming] *,[data-hsk-theming] *:before,[data-hsk-theming] *:after{transition-property:transform,opacity!important}[data-hsk-theming] .hsk-cb-theme-squircle-wrap{transition-property:width,height,border-radius!important}[data-hsk-theming] .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger{transition-property:height,opacity!important}@media(prefers-reduced-motion:reduce){[data-hsk-theme]{transition:none}}:host,:root{--hsk-border-radius: 0px;--hsk-brand-green: #2D7A4B;--hsk-font: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;--hsk-default-font-size: 15px}.hsk-cb-btn,.hsk-cb-close,.hsk-cb-topbar-btn,.hsk-cb-chip,.hsk-cb-source,.hsk-cb-sources-next,.hsk-action-pill,.hsk-chat-send,.hsk-chat-reset,.hsk-close-btn,.hsk-cb-overlay{--hsk-font-size: 16px;touch-action:manipulation;-webkit-tap-highlight-color:transparent;font-family:var(--hsk-font)}.hsk-cb-overlay{transition:--hsk-chat-bg .45s cubic-bezier(.16,1,.3,1),--hsk-chat-text .45s cubic-bezier(.16,1,.3,1),--hsk-chat-muted .45s cubic-bezier(.16,1,.3,1),--hsk-chat-divide .45s cubic-bezier(.16,1,.3,1),--hsk-chat-input-bg .45s cubic-bezier(.16,1,.3,1),--hsk-surface-1 .45s cubic-bezier(.16,1,.3,1),--hsk-surface-2 .45s cubic-bezier(.16,1,.3,1),--hsk-bubble-bg .45s cubic-bezier(.16,1,.3,1),--hsk-primary .45s cubic-bezier(.16,1,.3,1),--hsk-grid-bg .45s cubic-bezier(.16,1,.3,1),--hsk-active-bg .45s cubic-bezier(.16,1,.3,1),--hsk-on-active .45s cubic-bezier(.16,1,.3,1),--hsk-src-title .45s cubic-bezier(.16,1,.3,1),--hsk-src-desc .45s cubic-bezier(.16,1,.3,1),--hsk-price-bg .45s cubic-bezier(.16,1,.3,1),--hsk-price-text .45s cubic-bezier(.16,1,.3,1),--hsk-sheet-bg .45s cubic-bezier(.16,1,.3,1),--hsk-pill-bg .45s cubic-bezier(.16,1,.3,1),--hsk-glass-bg .45s cubic-bezier(.16,1,.3,1),--hsk-glass-edge .45s cubic-bezier(.16,1,.3,1),--hsk-glass-edge-top .45s cubic-bezier(.16,1,.3,1),--hsk-glass-drop .45s cubic-bezier(.16,1,.3,1),--hsk-glass-sheen .45s cubic-bezier(.16,1,.3,1),--hsk-fade-bg .45s cubic-bezier(.16,1,.3,1),--hsk-chat-source-bg .45s cubic-bezier(.16,1,.3,1),--hsk-think-text .45s cubic-bezier(.16,1,.3,1),--hsk-placeholder .45s cubic-bezier(.16,1,.3,1),background-color .45s cubic-bezier(.16,1,.3,1),border-color .45s cubic-bezier(.16,1,.3,1),color .45s cubic-bezier(.16,1,.3,1),fill .45s cubic-bezier(.16,1,.3,1),stroke .45s cubic-bezier(.16,1,.3,1),box-shadow .45s cubic-bezier(.16,1,.3,1),--hsk-selection-bg .45s cubic-bezier(.16,1,.3,1),--hsk-selection-text .45s cubic-bezier(.16,1,.3,1)}.hsk-cb-overlay{--hsk-glass-border: 1px solid var(--hsk-glass-edge);--hsk-glass-border-top: 1px solid var(--hsk-glass-edge-top);--hsk-glass-shadow: 0 12px 32px -4px var(--hsk-glass-drop), 0 1px 0 0 var(--hsk-glass-sheen) inset}.hsk-cb-overlay::selection,.hsk-cb-overlay *::selection,.hsk-cb-btn::selection,.hsk-cb-btn *::selection,.hsk-sb-wrap::selection,.hsk-sb-wrap *::selection{background:var(--hsk-selection-bg, #ff6a33);color:var(--hsk-selection-text, #ffffff)}.hsk-kiku-avatar,.hsk-kiku-avatar *{transition:none}@media(prefers-reduced-motion:reduce){.hsk-cb-overlay,.hsk-cb-overlay *,.hsk-cb-overlay *:before,.hsk-cb-overlay *:after{transition:none}}.hsk-cb-overlay button,.hsk-cb-overlay [role=button],.hsk-cb-overlay input,.hsk-cb-overlay textarea,.hsk-cb-overlay select,.hsk-chat button,.hsk-chat [role=button],.hsk-chat input,.hsk-chat textarea,.hsk-chat select,.hsk-cb-btn,.hsk-search button,.hsk-search [role=button],.hsk-search input,.hsk-search textarea,.hsk-search select{touch-action:manipulation;-webkit-tap-highlight-color:transparent;font-family:var(--hsk-font)}:host,:root,.hsk-cb-btn,.hsk-cb-overlay,.hsk-chat-widget{--hsk-marble-1: color-mix(in srgb, var(--hsk-primary, #ff6a33) 12%, #fffaf4);--hsk-marble-2: color-mix(in srgb, var(--hsk-primary, #ff6a33) 30%, #fdf0e4);--hsk-marble-3: color-mix(in srgb, var(--hsk-primary, #ff6a33) 62%, #e8cbb0);--hsk-marble-4: color-mix(in srgb, var(--hsk-primary, #ff6a33) 85%, #6d3a1c);--hsk-marble-sheen: .5}@media(prefers-color-scheme:dark){:host,:root,.hsk-cb-btn,.hsk-cb-overlay,.hsk-chat-widget{--hsk-marble-1: #FFFDF6;--hsk-marble-2: #FBF3E2;--hsk-marble-3: color-mix(in srgb, var(--hsk-primary, #ff6a33) 20%, #EDDFC4);--hsk-marble-4: color-mix(in srgb, var(--hsk-primary, #ff6a33) 42%, #D8C39C);--hsk-marble-sheen: .9}}@keyframes hsk-pulse{0%,to{transform:scale(.8);opacity:.5}50%{transform:scale(1.2);opacity:1}}.hsk-cb-btn{--hsk-primary: var(--chat-primary-color, #ff6a33);display:inline-flex;align-items:center;gap:7px;padding:8px 16px;border-radius:var(--hsk-border-radius, 0px);border:1px solid rgba(255,106,51,.4);background:#ff6a331a;color:var(--hsk-primary);font-size:13px;font-weight:600;cursor:pointer;transition:background .15s,border-color .15s,transform .16s cubic-bezier(.34,1.56,.64,1),box-shadow .15s;will-change:transform}.hsk-cb-btn:hover{background:#ff6a332e;border-color:#ff6a33b3;box-shadow:0 4px 16px #ff6a3333}.hsk-cb-btn:active{transform:scale(.97)}.hsk-cb-topbar-mark:active .hsk-cb-topbar-name{transform:scale(.95)}.hsk-cb-btn-icon{font-size:15px;line-height:1;display:flex;align-items:center}.hsk-cb-overlay{--hsk-primary: var(--chat-primary-color, #ff6a33);--hsk-font: var(--chat-font-family, "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:normal;word-spacing:normal;font-kerning:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--hsk-font-size: var(--hsk-desktop-font-size, 15px);--hsk-mobile-font-size: 14px;position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;z-index:2147483647!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;animation:hsk-overlay-in .2s ease-out;background:var(--hsk-chat-bg, #ffffff)!important;box-sizing:border-box!important;margin:0!important;padding:0!important}@keyframes hsk-overlay-in{0%{opacity:0}to{opacity:1}}.hsk-cb-overlay.hsk-cb-overlay--grows{animation:hsk-overlay-in .18s cubic-bezier(.16,1,.3,1) both!important}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-panel{transform-origin:var(--hsk-ox, 50%) var(--hsk-oy, 50%);animation:hsk-panel-float-in .22s cubic-bezier(.16,1,.3,1) both!important}@keyframes hsk-panel-float-in{0%{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-msgs{animation:hsk-content-fade .2s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-content-fade{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-lang-chip,.hsk-cb-chip{animation:hsk-pill-wave .22s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.04s + var(--hsk-pill-idx, 0) * 12ms)}.hsk-cb-lang-chips-hint{animation:hsk-content-fade .22s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.04s + var(--hsk-pill-idx, 0) * 12ms)}@keyframes hsk-pill-wave{0%{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-input-wrap{animation:hsk-input-dock .22s cubic-bezier(.16,1,.3,1) backwards}@keyframes hsk-input-dock{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}.hsk-cb-overlay.hsk-cb-overlay--closing{animation:hsk-overlay-out .2s cubic-bezier(.4,0,1,1) both!important;pointer-events:none}.hsk-cb-overlay.hsk-cb-overlay--closing .hsk-cb-panel{animation:hsk-panel-sink .2s cubic-bezier(.4,0,1,1) both!important}@keyframes hsk-overlay-out{0%{opacity:1}to{opacity:0}}@keyframes hsk-panel-sink{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(8px) scale(.985)}}@media(prefers-reduced-motion:reduce){.hsk-cb-overlay.hsk-cb-overlay--closing,.hsk-cb-overlay.hsk-cb-overlay--closing .hsk-cb-panel{animation:none!important}.hsk-cb-overlay.hsk-cb-overlay--grows{animation:none!important;-webkit-clip-path:none!important;clip-path:none!important}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-panel,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-msgs,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-lang-chip,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-chip,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-input-wrap,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-hello-avatar{animation:none!important}}.hsk-cb-panel:lang(ja){font-feature-settings:"palt";word-break:auto-phrase;line-break:strict}.hsk-cb-panel:lang(ja) p,.hsk-cb-panel:lang(ja) li{font-weight:500}.hsk-cb-panel{position:relative;display:flex;flex-direction:column;height:100%;max-width:720px;width:100%;margin:0 auto;animation:hsk-panel-in .28s cubic-bezier(.34,1.2,.64,1)}.hsk-cb-main{position:relative;flex:1;min-width:0;display:flex;flex-direction:column;height:100%;overflow:hidden}@keyframes hsk-panel-in{0%{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-topbar{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);column-gap:8px;align-items:end;padding:14px var(--hsk-gutter, 24px) 10px;flex-shrink:0;position:relative;z-index:10;background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.hsk-cb-topbar:after{display:none!important}.hsk-cb-topbar-left{display:flex;align-items:center;gap:10px;justify-self:start;min-width:0}.hsk-cb-topbar-mark{justify-self:center;display:flex;flex-direction:column;align-items:center;line-height:0;cursor:pointer;user-select:none;touch-action:manipulation;transition:transform .22s cubic-bezier(.34,1.56,.64,1)}@media(hover:hover)and (pointer:fine){.hsk-cb-topbar-mark:hover>*{translate:0 -1px}}.hsk-cb-topbar-mark[data-unread=true] .hsk-cb-topbar-name{background:var(--hsk-primary, #ff6a33);color:#fff;box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff);animation:hsk-unread-pill .9s cubic-bezier(.34,1.56,.64,1) infinite}@keyframes hsk-unread-pill{0%,to{transform:scale(1)}38%{transform:scale(1.08,.92)}62%{transform:scale(.97,1.03)}}@media(prefers-reduced-motion:reduce){.hsk-cb-topbar-mark[data-unread=true] .hsk-cb-topbar-name{animation:none}}.hsk-cb-topbar-identity{height:34px;margin-top:-10px;display:flex;align-items:center;justify-content:center}.hsk-cb-topbar-name{margin-top:0;padding:3px 13px;white-space:nowrap;border-radius:999px;background:var(--hsk-surface-2);box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px #0000001f;font-size:12px;font-weight:700;line-height:18px;letter-spacing:-.01em;color:var(--hsk-name-text, var(--hsk-chat-text));transform-origin:50% 0%;transition:transform .18s cubic-bezier(.34,1.8,.64,1)}.hsk-cb-topbar-mark{position:relative;z-index:100}.hsk-cb-topbar-ooze-menu{position:absolute;top:var(--hsk-tray-top, calc(100% + 12px) )!important;left:50%;transform:translate(-50%);width:min(300px,calc(100vw - 28px))!important;padding:var(--hsk-tray-head, 6px) 6px 6px!important;border-radius:18px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 68%,transparent)!important;backdrop-filter:blur(28px) saturate(190%) contrast(102%)!important;-webkit-backdrop-filter:blur(28px) saturate(190%) contrast(102%)!important;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 35%,transparent)!important;z-index:1000;transform-origin:50% 0;animation:hsk-topbar-ooze .25s cubic-bezier(.16,1,.3,1) both}.hsk-cb-topbar.is-docked{z-index:20!important}.hsk-cb-topbar-scrim{position:fixed;inset:0;z-index:999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:linear-gradient(to bottom,#000 40vh,rgba(0,0,0,.97) 43.5vh,rgba(0,0,0,.84) 48.75vh,rgba(0,0,0,.5) 57.5vh,rgba(0,0,0,.16) 66.25vh,rgba(0,0,0,.03) 71.5vh,transparent 75vh);-webkit-mask-image:linear-gradient(to bottom,#000 40vh,rgba(0,0,0,.97) 43.5vh,rgba(0,0,0,.84) 48.75vh,rgba(0,0,0,.5) 57.5vh,rgba(0,0,0,.16) 66.25vh,rgba(0,0,0,.03) 71.5vh,transparent 75vh);animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) both}.hsk-cb-topbar-scrim.is-closing{animation:hsk-scrim-out .18s cubic-bezier(.4,0,1,1) both}.hsk-cb-topbar-mark.is-oozing{position:relative;z-index:1001}@keyframes hsk-scrim-in{0%{opacity:0}to{opacity:1}}@keyframes hsk-scrim-out{0%{opacity:1}to{opacity:0}}.hsk-cb-topbar-ooze-menu.is-closing{animation:hsk-topbar-ooze-out .18s cubic-bezier(.4,0,1,1) both;pointer-events:none}@keyframes hsk-topbar-ooze-out{0%{opacity:1;transform:translate(-50%) scale(1)}to{opacity:0;transform:translate(-50%) scale(.96)}}@media(prefers-reduced-motion:reduce){.hsk-cb-topbar-scrim,.hsk-cb-topbar-scrim.is-closing,.hsk-cb-topbar-ooze-menu.is-closing{animation:none}}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:max-content;max-width:100%}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-block{display:flex;align-items:stretch;gap:8px;padding:6px 7px 0}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-vlabel{flex:0 0 auto;align-self:center;writing-mode:vertical-rl;transform:rotate(180deg);font-size:8px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--hsk-chat-muted);opacity:.38;user-select:none}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{display:flex!important;flex-wrap:wrap!important;justify-content:flex-start!important;gap:6px!important;width:100%!important;max-width:100%!important;min-width:0!important;padding:0!important;box-sizing:border-box!important;margin-top:0!important;background:none!important;border:none!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:max-content;max-width:100%;height:34px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 12px;border-radius:999px;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .4)) 22%,transparent)!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 34%,transparent)!important;color:var(--hsk-chat-muted, #71717a);font-size:11.5px;font-weight:600;box-sizing:border-box;white-space:nowrap;cursor:pointer;transition:background-color .16s cubic-bezier(.16,1,.3,1),color .16s cubic-bezier(.16,1,.3,1),border-color .16s cubic-bezier(.16,1,.3,1),box-shadow .16s cubic-bezier(.16,1,.3,1),transform .16s cubic-bezier(.16,1,.3,1)}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item svg{flex-shrink:0;width:12px;height:12px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item:hover{color:var(--hsk-chat-text, currentColor)!important;transform:translateY(-1px)}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item.is-active{background:var(--hsk-primary, #ff6a33)!important;color:#fff!important;border-color:var(--hsk-primary, #ff6a33)!important;box-shadow:0 3px 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)!important}@keyframes hsk-topbar-ooze{0%{opacity:0;transform:translate(-50%) translateY(-6px) scale(.94)}to{opacity:1;transform:translate(-50%) translateY(0) scale(1)}}.hsk-cb-topbar-mark[data-impacting=true] .hsk-cb-topbar-name{transform:translateY(1.5px) scale(1.09,.91);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 2px 10px var(--hsk-contact-glow, rgba(19, 78, 61, .45))}.hsk-cb-back{width:34px;height:34px;border-radius:999px;border:none;padding:0;display:flex;align-items:center;justify-content:center;background:var(--hsk-surface-1);color:var(--hsk-chat-muted);cursor:pointer;transition:transform .18s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-back:hover{background:var(--hsk-chat-divide, rgba(0,0,0,.09))}.hsk-cb-back:active{transform:scale(.94)}.hsk-cb-panel[dir=rtl] .hsk-cb-back-icon{display:inline-flex;transform:scaleX(-1)}.hsk-cb-topbar-actions{min-width:0;max-width:100%;justify-self:end}.hsk-cb-kiku-id-rail{display:none}@media(min-width:1200px){.hsk-cb-kiku-id-rail.hsk-cb-kiku-id-rail--left{display:flex;position:absolute;inset:auto 100% 48px auto!important;margin-right:28px!important;transform:none!important;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:8px;width:200px;max-width:200px;min-width:200px;padding:0;border:0;background:none;font-family:inherit;z-index:10}.hsk-cb-kiku-id-rail.hsk-cb-kiku-id-rail--right{display:flex;position:absolute;inset:auto auto 48px 100%!important;margin-left:28px!important;transform:none!important;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:8px;width:200px;max-width:200px;min-width:200px;padding:0;border:0;background:none;font-family:inherit;z-index:10}.hsk-cb-dock-frost{position:absolute;inset:-100vmax;z-index:-1;pointer-events:none;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:radial-gradient(circle at 50% 50%,#000 330px,rgba(0,0,0,.97) 369px,rgba(0,0,0,.84) 427px,rgba(0,0,0,.5) 525px,rgba(0,0,0,.16) 622px,rgba(0,0,0,.03) 681px,transparent 720px);-webkit-mask-image:radial-gradient(circle at 50% 50%,#000 330px,rgba(0,0,0,.97) 369px,rgba(0,0,0,.84) 427px,rgba(0,0,0,.5) 525px,rgba(0,0,0,.16) 622px,rgba(0,0,0,.03) 681px,transparent 720px);opacity:0;transition:opacity .2s cubic-bezier(.4,0,.9,.4)}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-kiku-id-rail{bottom:50px!important}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-kiku-id-rail{bottom:58px!important}.hsk-cb-kiku-id-pill{display:inline-flex;align-items:center;gap:6px;max-width:100%;height:28px;padding:0 11px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 62%,transparent);backdrop-filter:blur(22px) saturate(180%);-webkit-backdrop-filter:blur(22px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 14px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset;color:var(--hsk-chat-muted, #71717a);cursor:pointer;font-family:inherit;transition:all .2s cubic-bezier(.16,1,.3,1)}.hsk-cb-kiku-id-pill:hover{color:var(--hsk-primary, #ff6a33);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 80%,transparent);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 75%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 18px -2px color-mix(in srgb,#000 15%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent) inset}.hsk-cb-kiku-id-rail-val{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;letter-spacing:-.01em;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-cb-kiku-id-pill svg{flex:none;opacity:.8}.hsk-cb-theme-squircle-wrap{position:relative;display:flex;flex-direction:column;align-items:flex-start;padding:0;margin:0;border:none!important;box-shadow:none!important;background:transparent!important}.hsk-cb-theme-squircle-trigger{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px;border-radius:16px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent)!important;backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 16px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important;color:var(--hsk-chat-text)!important;font-size:11.5px;font-weight:600;cursor:pointer;font-family:inherit;transition:all .2s cubic-bezier(.16,1,.3,1)}.hsk-cb-theme-squircle-trigger:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 80%,transparent)!important;color:var(--hsk-primary, #ff6a33)!important;border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 80%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 20px -2px color-mix(in srgb,#000 16%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent) inset!important}.hsk-cb-theme-trigger-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.hsk-cb-theme-trigger-icon svg{width:13px;height:13px}.hsk-cb-theme-trigger-label{letter-spacing:-.01em}.hsk-cb-theme-2x2-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;padding:6px;width:200px;max-width:200px;min-width:200px;box-sizing:border-box;border-radius:18px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 70%,transparent);backdrop-filter:blur(28px) saturate(190%) contrast(102%);-webkit-backdrop-filter:blur(28px) saturate(190%) contrast(102%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .4)) 35%,transparent);border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 65%,transparent);border-bottom:1px solid color-mix(in srgb,#000 6%,transparent);box-shadow:0 16px 38px -6px color-mix(in srgb,#000 16%,transparent),0 0 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 20%,transparent) inset,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 50%,transparent) inset;transform-origin:bottom left;animation:hsk-theme-morph-in .26s cubic-bezier(.16,1,.3,1) both}.hsk-cb-theme-squircle-wrap.is-closing .hsk-cb-theme-2x2-grid{animation:hsk-theme-morph-out .22s cubic-bezier(.4,0,.2,1) both}.hsk-cb-theme-squircle-trigger{animation:hsk-theme-pill-in .24s cubic-bezier(.16,1,.3,1) both}.hsk-cb-theme-squircle-wrap{justify-content:flex-end;box-sizing:border-box;width:auto;height:32px;overflow:hidden;border-radius:16px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent)!important;backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 16px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important;interpolate-size:allow-keywords;transition:width .38s cubic-bezier(.16,1,.3,1),height .38s cubic-bezier(.16,1,.3,1),border-radius .38s cubic-bezier(.16,1,.3,1)}.hsk-cb-theme-squircle-wrap.is-open{width:222px;height:auto;border-radius:18px}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger,.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger:hover{flex:none;height:30px;background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;transform:none;animation:none;transition:height .38s cubic-bezier(.16,1,.3,1),opacity .2s ease,color .2s ease}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap.is-open>.hsk-cb-theme-squircle-trigger{height:0;opacity:0;pointer-events:none}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-2x2-grid{flex:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:220px;min-width:220px;max-width:220px;margin-inline-end:-220px;background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;border-radius:0;animation:none;opacity:0;transition:opacity .1s ease}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-2x2-grid>.hsk-cb-theme-grid-item{width:100%;justify-content:flex-start;padding:0 10px}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap.is-open>.hsk-cb-theme-2x2-grid{opacity:1;transition:opacity .24s ease .1s}.hsk-cb-theme-grid-item{display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:6px;height:30px;padding:0 12px;border-radius:999px;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .3)) 25%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent)!important;outline:none!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent);color:var(--hsk-chat-text, currentColor);font-size:11px;font-weight:550;cursor:pointer;font-family:inherit;transition:all .18s cubic-bezier(.16,1,.3,1);box-shadow:0 1px 3px #0000000a,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent) inset!important;box-sizing:border-box;white-space:nowrap}.hsk-cb-theme-grid-item svg{flex-shrink:0;width:12px;height:12px}.hsk-cb-theme-grid-item:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 85%,transparent);color:var(--hsk-chat-text, currentColor);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent)!important;transform:translateY(-1px);box-shadow:0 3px 8px #00000014,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent) inset!important}.hsk-cb-theme-grid-item.is-active{background:var(--hsk-primary, #ff6a33)!important;border-color:var(--hsk-primary, #ff6a33)!important;color:#fff!important;box-shadow:0 2px 10px color-mix(in srgb,var(--hsk-primary, #ff6a33) 38%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important}}.hsk-cb-topbar-actions{display:flex;align-items:center;gap:8px}.hsk-cb-topbar-btn{position:relative;display:inline-flex;align-items:center;min-width:0;max-width:100%;white-space:nowrap;flex:0 1 auto;height:34px;padding:0 14px;border-radius:var(--hsk-control-radius, 999px);border:1px solid transparent;background:var(--hsk-chat-subtle, rgba(0,0,0,.045));color:var(--hsk-chat-muted, #5f6368);font-size:12px;font-weight:500;cursor:pointer;transition:all .15s;font-family:inherit}.hsk-cb-topbar-btn.is-compact{width:34px;padding:0;flex:none;justify-content:center}.hsk-cb-clear-measure{position:absolute;visibility:hidden;pointer-events:none;white-space:nowrap;font-size:12px}.hsk-cb-topbar-btn-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-cb-topbar-btn:hover{background:color-mix(in srgb,var(--hsk-primary) 12%,transparent);color:var(--hsk-primary)}.hsk-cb-squircle-btn{width:34px;height:34px;border-radius:11px;background:color-mix(in srgb,var(--hsk-surface-1, currentColor) 35%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid color-mix(in srgb,var(--hsk-chat-border, currentColor) 16%,transparent);border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent);border-bottom:1px solid color-mix(in srgb,#000 6%,transparent);box-shadow:0 2px 6px color-mix(in srgb,var(--hsk-chat-text, #000) 6%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 25%,transparent) inset;color:var(--hsk-chat-muted, currentColor);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0;transition:all .2s cubic-bezier(.16,1,.3,1);position:relative;flex-shrink:0}.hsk-cb-squircle-btn:hover{background:color-mix(in srgb,var(--hsk-surface-2, currentColor) 50%,transparent);color:var(--hsk-chat-text, currentColor);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent);box-shadow:0 3px 10px color-mix(in srgb,var(--hsk-chat-text, #000) 8%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent) inset;transform:translateY(-1px)}.hsk-cb-squircle-btn:active{transform:scale(.95)}.hsk-cb-squircle-btn.is-active{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 16%,transparent);border-color:var(--hsk-primary, #ff6a33);color:var(--hsk-primary, #ff6a33);box-shadow:0 0 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 30%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent) inset}.hsk-cb-exit-btn:hover{background:radial-gradient(120% 90% at 30% 0%,rgba(255,255,255,.4),transparent 65%),color-mix(in srgb,var(--hsk-surface-1, currentColor) 35%,transparent);color:#ef4444}.hsk-cb-msgs{position:relative;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;touch-action:pan-y;overscroll-behavior-y:none;overflow-anchor:none;padding:16px var(--hsk-gutter, 24px) 16px;display:flex;flex-direction:column;gap:0;scrollbar-width:none;-ms-overflow-style:none;mask-image:linear-gradient(to bottom,transparent 0px,#000000 8px,#000000 100%);-webkit-mask-image:linear-gradient(to bottom,transparent 0px,#000000 8px,#000000 100%)}.hsk-cb-msgs[data-hsk-tapback-active]{background:var(--hsk-chat-bg, #fff);--hsk-viewport-feather: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .03) min(6px, 2%), rgba(0, 0, 0, .16) min(16px, 5%), rgba(0, 0, 0, .5) min(32px, 10%), rgba(0, 0, 0, .84) min(48px, 15%), rgba(0, 0, 0, .97) min(58px, 18%), #000 min(64px, 20%), #000 calc(100% - min(64px, 20%)) , rgba(0, 0, 0, .97) calc(100% - min(58px, 18%)) , rgba(0, 0, 0, .84) calc(100% - min(48px, 15%)) , rgba(0, 0, 0, .5) calc(100% - min(32px, 10%)) , rgba(0, 0, 0, .16) calc(100% - min(16px, 5%)) , rgba(0, 0, 0, .03) calc(100% - min(6px, 2%)) , transparent);--hsk-viewport-sides: linear-gradient(to right, transparent, rgba(0, 0, 0, .03) min(4px, 1%), rgba(0, 0, 0, .16) min(12px, 3%), rgba(0, 0, 0, .5) min(24px, 6%), rgba(0, 0, 0, .84) min(36px, 9%), rgba(0, 0, 0, .97) min(44px, 11%), #000 min(48px, 12%), #000 calc(100% - min(48px, 12%)) , rgba(0, 0, 0, .97) calc(100% - min(44px, 11%)) , rgba(0, 0, 0, .84) calc(100% - min(36px, 9%)) , rgba(0, 0, 0, .5) calc(100% - min(24px, 6%)) , rgba(0, 0, 0, .16) calc(100% - min(12px, 3%)) , rgba(0, 0, 0, .03) calc(100% - min(4px, 1%)) , transparent);-webkit-mask-image:var(--hsk-viewport-sides),var(--hsk-viewport-feather);mask-image:var(--hsk-viewport-sides),var(--hsk-viewport-feather);-webkit-mask-composite:source-in;mask-composite:intersect;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hsk-cb-msgs-spacer{flex:none;height:1px;pointer-events:none}.hsk-cb-msgs>:first-child{margin-top:auto}.hsk-cb-msgs.hsk-scrolling>*{pointer-events:none}.hsk-cb-msgs::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}.hsk-cb-empty{flex:1 0 auto;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:14px;padding:24px 0 32px;width:100%;text-align:start}.hsk-cb-onboarding-card{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:10px;flex-shrink:0;overflow:hidden;padding-bottom:26px;margin-bottom:-26px}.hsk-cb-onboarding-head{display:flex;align-items:center;justify-content:flex-start;width:100%;margin-bottom:8px}.hsk-cb-step-badge{font-size:11px;font-weight:600;letter-spacing:.05em;color:var(--hsk-chat-muted, #71717a);background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .06));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .08));padding:4px 10px;border-radius:999px;line-height:1}.hsk-cb-hello-wrap{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:6px;padding:0;width:100%}.hsk-cb-hello{margin:0;font-size:clamp(24px,4.5vw,34px);font-weight:500;line-height:1.2;letter-spacing:-.02em;color:color-mix(in srgb,var(--hsk-chat-text, #111) 55%,var(--hsk-chat-muted, #8b8b8f));text-align:start}.hsk-cb-hello b{font-weight:700;color:var(--hsk-primary, #ff6a33)}.hsk-cb-hello-lead{margin:0;font-size:15px;line-height:22px;color:var(--hsk-chat-muted, #5f6368);max-width:42ch;text-align:start}.hsk-cb-hello-ask{margin:2px 0;font-size:16px;font-weight:500;color:var(--hsk-chat-text, #111);text-align:start}.hsk-cb-hello-hint{margin:0;font-size:13px;line-height:1.5;color:var(--hsk-chat-muted, #5f6368);text-align:start}.hsk-cb-name-step .hsk-cb-hello{color:var(--hsk-chat-text, #111)}.hsk-cb-name-step .hsk-cb-hello-ask{margin-top:6px;font-size:19px;font-weight:600;color:color-mix(in srgb,var(--hsk-chat-text, #111) 62%,var(--hsk-chat-muted, #8b8b8f))}.hsk-cb-panel[dir=rtl] .hsk-cb-msgs{direction:ltr}.hsk-cb-panel[dir=rtl] .hsk-cb-msgs>*{direction:rtl}.hsk-cb-panel[dir=rtl] .hsk-cb-user-imgs{margin-left:0;margin-right:auto}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text{word-break:normal;overflow-wrap:break-word;letter-spacing:normal}.hsk-cb-panel[dir=rtl] .hsk-cb-hello{line-height:1.6;letter-spacing:normal}.hsk-cb-lang-chips{display:flex;flex-wrap:wrap;gap:8px 10px;margin:16px 0 8px;align-items:center}.hsk-cb-lang-chip{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:6px 15px;font-family:var(--hsk-font);font-size:13.5px;font-weight:400;line-height:1.2;letter-spacing:-.01em;color:var(--hsk-chat-text, #27272a);background:color-mix(in srgb,var(--hsk-chat-card-bg, var(--hsk-chat-bg, #ffffff)) 72%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:none;border-radius:999px;box-shadow:0 2px 8px -1px #0000000f,0 1px 2px #00000005;cursor:pointer;transition:all .18s cubic-bezier(.16,1,.3,1);user-select:none;-webkit-font-smoothing:antialiased}.hsk-cb-lang-chip:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,var(--hsk-chat-card-bg, #ffffff));color:var(--hsk-primary, #ff6a33);transform:translateY(-1px);box-shadow:0 4px 12px -2px #00000014}.hsk-cb-lang-chip:active{transform:translateY(0) scale(.97)}.hsk-cb-lang-chip:focus-visible{outline:2px solid var(--hsk-primary, #ff6a33);outline-offset:2px}[data-hsk-theme=dark] .hsk-cb-lang-chip,[data-hsk-theme=midnight] .hsk-cb-lang-chip{color:#e4e4e7;background:#ffffff12;border:none;box-shadow:0 2px 8px -1px #0000004d}[data-hsk-theme=dark] .hsk-cb-lang-chip:hover,[data-hsk-theme=midnight] .hsk-cb-lang-chip:hover{background:rgba(var(--hsk-primary-rgb, 255, 106, 51),.2);color:#fff}.hsk-cb-lang-chips-hint{display:inline-flex;align-items:center;font-size:13px;font-weight:400;color:var(--hsk-chat-muted, #71717a);padding:0 6px;margin-inline-start:4px;user-select:none;align-self:center}.hsk-cb-chrome-loading{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:12px;width:100%;max-width:480px;margin:4px 0 2px;animation:hsk-content-fade .3s ease-out both}.hsk-cb-chrome-loading-header{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:6px;width:100%}.hsk-cb-chrome-progress{height:3px;width:100%;border-radius:3px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .08));overflow:hidden;margin-top:4px}.hsk-cb-chrome-progress-track{height:100%;width:100%;border-radius:3px;background:linear-gradient(90deg,#ff6a33,#f7b733,#43c59e,#3d8bfd,#9b5de5,#ff5d8f,#ff6a33);background-size:300% 100%;animation:hsk-chrome-rainbow 2.6s linear infinite}.hsk-cb-chrome-progress{position:relative;overflow:hidden}.hsk-cb-chrome-progress:after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent 20%,rgba(255,255,255,.55) 50%,transparent 80%);transform:translate(-100%);animation:hsk-chrome-sheen 1.9s cubic-bezier(.55,0,.45,1) infinite;pointer-events:none}@keyframes hsk-chrome-rainbow{0%{background-position:0% 0}to{background-position:-300% 0}}@keyframes hsk-chrome-sheen{0%{transform:translate(-100%)}to{transform:translate(200%)}}@media(prefers-reduced-motion:reduce){.hsk-cb-chrome-progress-track{animation:none;opacity:.5}.hsk-cb-chrome-progress:after{animation:none;opacity:0}}.hsk-cb-chrome-back-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;margin-top:6px;font-size:13px;font-weight:500;color:var(--hsk-chat-muted, #a1a1aa);background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .05));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .09));border-radius:999px;cursor:pointer;transition:all .15s ease;user-select:none}.hsk-cb-chrome-back-btn:hover{background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .12));color:var(--hsk-chat-text, #ffffff);border-color:var(--hsk-chat-border, rgba(255, 255, 255, .18))}.hsk-cb-chrome-notice{display:flex;flex-direction:column;gap:6px;max-width:48ch;margin:24px 0 0;padding:14px 16px;border-radius:14px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .04));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .09));text-align:start;font-family:var(--hsk-font, system-ui, sans-serif);animation:hsk-content-fade .4s ease-out both}.hsk-cb-chrome-notice-header{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.hsk-cb-chrome-notice-pill{display:inline-flex;align-items:center;padding:2px 7px;border-radius:6px;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;background:#ff6a3326;color:var(--hsk-primary, #ff6a33);border:1px solid rgba(255,106,51,.28)}.hsk-cb-chrome-notice-title{font-size:12px;font-weight:600;letter-spacing:.01em;color:var(--hsk-chat-text, #ffffff)}.hsk-cb-chrome-notice-body{font-size:12px;line-height:1.55;color:var(--hsk-chat-muted, #a1a1aa)}.hsk-cb-chrome-notice-body b{color:var(--hsk-chat-text, #ffffff)}@media(prefers-color-scheme:light){.hsk-cb-chrome-progress{background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .06))}.hsk-cb-chrome-back-btn{color:#52525b;background:#0000000a;border-color:#00000014}.hsk-cb-chrome-back-btn:hover{background:#00000014;color:#09090b;border-color:#00000024}}.hsk-cb-input-box--waiting{opacity:.45;pointer-events:none}.hsk-cb-entlang-opts{display:flex;flex-direction:column;gap:10px;width:100%;max-width:440px;margin-top:6px}.hsk-cb-entlang-opt{position:relative;display:flex;flex-direction:row;align-items:center;width:100%;padding:16px 20px;text-align:start;background:transparent!important;border:none!important;outline:none!important;border-radius:16px;cursor:pointer;user-select:none;box-shadow:none!important;animation:hsk-entlang-opt-in .22s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.04s + var(--hsk-opt-idx, 0) * .02s)}@media(prefers-color-scheme:light){.hsk-cb-entlang-opt{background:transparent!important}}[data-hsk-theme=light] .hsk-cb-entlang-opt{background:transparent!important}@keyframes hsk-entlang-opt-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-entlang-opt:hover{background:transparent!important;border:none!important;box-shadow:none!important}.hsk-cb-entlang-opt:active{opacity:.8}.hsk-cb-check{display:inline-grid;place-items:center;width:20px;height:20px;flex-shrink:0;border-radius:6px;border:1.5px solid color-mix(in srgb,var(--hsk-chat-text, #111) 28%,transparent);background:transparent;box-sizing:border-box;transition:background-color .22s ease,border-color .22s ease}.hsk-cb-check svg{width:14px;height:14px;fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.hsk-cb-check path{stroke-dasharray:16;stroke-dashoffset:16;transition:stroke-dashoffset .3s cubic-bezier(.65,0,.35,1) .06s}.is-selected>.hsk-cb-check{background:var(--hsk-primary, #ff6a33);border-color:var(--hsk-primary, #ff6a33);animation:hsk-cb-check-press .42s cubic-bezier(.34,1.56,.64,1)}.is-selected>.hsk-cb-check path{stroke-dashoffset:0}.hsk-cb-entlang-opt:hover>.hsk-cb-check{border-color:var(--hsk-primary, #ff6a33)}@keyframes hsk-cb-check-press{0%{transform:scale(1)}35%{transform:scale(.78)}to{transform:scale(1)}}.hsk-cb-entlang-opt>.hsk-cb-check{margin-inline-end:14px}.hsk-cb-entlang-opt-text{display:flex;flex-direction:column;gap:3px;width:100%}.hsk-cb-entlang-opt-title{font-size:15px;font-weight:600;color:var(--hsk-chat-text, #1f1f1f);letter-spacing:-.01em}.hsk-cb-entlang-opt-note{font-size:12.5px;color:var(--hsk-chat-muted, #71717a);line-height:1.45}.hsk-cb-ink-skeleton{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:12px;animation:hsk-ink-bloom-in .22s cubic-bezier(.16,1,.3,1) both}.hsk-cb-ink-line{position:relative;border-radius:999px;overflow:hidden;background:color-mix(in srgb,var(--hsk-chat-text, #ffffff) 6%,transparent)}.hsk-cb-ink-line:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent) 35%,color-mix(in srgb,var(--hsk-chat-text, #ffffff) 14%,transparent) 50%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent) 65%,transparent 100%);transform:translate(-100%);animation:hsk-ink-sheen 2.2s cubic-bezier(.4,0,.2,1) infinite}.hsk-cb-ink-line--title{height:30px;width:50%;max-width:220px;border-radius:14px;margin-bottom:2px}.hsk-cb-ink-line--lead1{height:14px;width:78%;max-width:340px}.hsk-cb-ink-line--lead2{height:14px;width:60%;max-width:260px}.hsk-cb-ink-line--ask{height:15px;width:40%;max-width:170px;margin-top:3px}@keyframes hsk-ink-sheen{0%{transform:translate(-100%)}to{transform:translate(200%)}}@keyframes hsk-ink-bloom-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes hsk-hello-rise{0%{opacity:0}to{opacity:1}}.hsk-cb-hello,.hsk-cb-hello-lead,.hsk-cb-hello-ask,.hsk-cb-hello-hint,.hsk-cb-hello-skip{opacity:0;animation:hsk-hello-rise .45s cubic-bezier(.22,1,.36,1) both}.hsk-cb-hello{animation-delay:.04s}.hsk-cb-hello-lead{animation-delay:.12s}.hsk-cb-hello-ask{animation-delay:.2s}.hsk-cb-hello-hint{animation-delay:.28s}.hsk-cb-hello.hsk-cascade,.hsk-cb-hello-lead.hsk-cascade,.hsk-cb-hello-ask.hsk-cascade{opacity:1;animation:none;filter:none}.hsk-cascade__w{display:inline-block;white-space:nowrap;opacity:0;animation:hsk-cascade-rise .44s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-cascade-rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.hsk-cb-hello,.hsk-cb-hello-lead,.hsk-cb-hello-ask,.hsk-cb-hello-hint,.hsk-cb-hello-skip,.hsk-cascade__w,.hsk-cb-check{animation:none;opacity:1;transform:none;filter:none}.hsk-cb-check path{transition:none}}.hsk-cb-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-start;margin-top:4px}.hsk-cb-chip{padding:8px 16px;border-radius:var(--hsk-border-radius, 0px);border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.1));background:var(--hsk-chat-source-bg, rgba(0,0,0,.03));color:var(--hsk-chat-text, #333);font-size:13px;cursor:pointer;transition:all .15s;font-family:inherit}.hsk-cb-chip:hover{border-color:var(--hsk-primary);color:var(--hsk-primary);background:#ff6a330f}.hsk-cb-msg-group{padding:16px 0;border-bottom:none;animation:hsk-msg-in .22s ease-out both}.hsk-cb-spoken-mark{position:absolute;top:50%;margin-top:-5px;inset-inline-start:-17px;opacity:.4;pointer-events:none}.hsk-cb-msg-group--run-mid{padding-bottom:0}.hsk-cb-msg-group--run-mid .hsk-cb-user-msg{margin-bottom:3px;gap:0}.hsk-cb-msg-group--run-cont{padding-top:0}.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg{margin-bottom:3px}.hsk-cb-msg-group--run-cont .hsk-cb-ai-text{margin-top:0}.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg .hsk-cb-ai-text:before,.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg .hsk-cb-ai-text:after{display:none}.hsk-cb-msg-group--run-mid .hsk-cb-user-bubble{border-bottom-right-radius:20px!important}[dir=rtl] .hsk-cb-msg-group--run-mid .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-msg-group--run-mid .hsk-cb-user-bubble,.hsk-cb-msg-group--run-mid .hsk-cb-user-bubble[dir=rtl]{border-bottom-right-radius:20px!important;border-bottom-left-radius:20px!important}.hsk-cb-msg-group--run-cont .hsk-cb-user-bubble{border-top-right-radius:20px!important}[dir=rtl] .hsk-cb-msg-group--run-cont .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-msg-group--run-cont .hsk-cb-user-bubble,.hsk-cb-msg-group--run-cont .hsk-cb-user-bubble[dir=rtl]{border-top-right-radius:20px!important;border-top-left-radius:20px!important}.hsk-cb-msg-group:last-child{border-bottom:none}@keyframes hsk-msg-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-user-msg{display:flex;flex-direction:column;align-items:flex-end;align-self:flex-end;max-width:min(75%,420px);margin-inline-start:auto;margin-inline-end:0;gap:6px;margin-bottom:20px}@media(max-width:640px){.hsk-cb-user-msg{max-width:84%}}.hsk-cb-user-msg.hsk-sent{transform-origin:bottom right;animation:hsk-send-in .3s cubic-bezier(.22,1,.36,1) both}.hsk-cb-panel[dir=rtl] .hsk-cb-user-msg.hsk-sent{transform-origin:bottom left}@keyframes hsk-send-in{0%{opacity:0;transform:translateY(12px) scale(.94)}60%{opacity:1}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.hsk-cb-user-msg.hsk-sent{animation:none}}.hsk-cb-user-bubble{background:var(--hsk-user-bubble-bg, #007aff);color:#fff;padding:10px 18px;border-radius:20px;position:relative;font-size:var(--hsk-font-size, 15.5px);font-family:var(--hsk-font);line-height:1.45;max-width:100%;font-weight:500;width:fit-content;word-break:break-word;overflow-wrap:anywhere;letter-spacing:-.01em}.hsk-cb-user-bubble--tail:before,.hsk-cb-user-bubble--tail:after{content:"";position:absolute;bottom:0;height:25px;pointer-events:none}.hsk-cb-user-bubble--tail:before{right:-7px;width:20px;background:var(--hsk-user-bubble-bg, #007aff);border-bottom-left-radius:16px 14px}.hsk-cb-user-bubble--tail:after{right:-26px;width:26px;background:var(--hsk-chat-bg, #ffffff);border-bottom-left-radius:10px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail:before{right:auto;left:-7px;border-bottom-left-radius:0;border-bottom-right-radius:16px 14px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail:after{right:auto;left:-26px;border-bottom-left-radius:0;border-bottom-right-radius:10px}.hsk-cb-ai-msg{display:block}.hsk-cb-ai-icon{width:32px;height:32px;border-radius:0;background:transparent!important;border:none!important;color:var(--hsk-primary, #ff6a33);display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:-2px}.hsk-cb-ai-icon>svg{width:30px!important;height:30px!important}.hsk-cb-ai-body{flex:1;min-width:0}.hsk-cb-ai-content{display:flex;flex-direction:column;gap:10px;align-items:flex-start;width:100%}.hsk-cb-think+.hsk-cb-ai-content>.hsk-cb-ai-text:first-child{padding-top:20px}.hsk-cb-ai-text{font-size:var(--hsk-font-size, 14.5px);font-family:var(--hsk-font);line-height:1.48;color:var(--hsk-chat-text, #111827);background:var(--hsk-chat-ai-bg, #eeeef0);padding:11px 15px;border-radius:18px;position:relative;display:inline-block;width:fit-content;box-sizing:border-box;max-width:min(88%,460px);word-break:break-word;overflow-wrap:anywhere;margin-top:4px}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before,.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{content:"";position:absolute;bottom:0;height:25px;pointer-events:none}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{left:-7px;width:20px;background:var(--hsk-chat-ai-bg, #eeeef0);border-bottom-right-radius:16px 14px}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{left:-26px;width:26px;background:var(--hsk-chat-bg, #ffffff);border-bottom-right-radius:10px}.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{left:auto;right:-7px;border-bottom-right-radius:0;border-bottom-left-radius:16px 14px}.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{left:auto;right:-26px;border-bottom-right-radius:0;border-bottom-left-radius:10px}.hsk-cb-user-bubble--tail{border-bottom-right-radius:25px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail{border-bottom-right-radius:20px;border-bottom-left-radius:25px}.hsk-cb-user-footer{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:6px;width:100%;margin-top:2px;min-height:16px;line-height:1}.hsk-cb-ai-footer{display:flex;align-items:center;gap:4px;margin-top:4px;min-height:16px;line-height:1}.hsk-cb-ai-body:hover .hsk-cb-msg-actions,.hsk-cb-ai-body:focus-within .hsk-cb-msg-actions{opacity:1;pointer-events:auto;transform:translateY(0)}.hsk-cb-sent-status{font-size:11px;line-height:1;color:var(--hsk-chat-muted, #8a8f98);padding:0;display:inline-flex;align-items:center;user-select:none;animation:hsk-sent-in .2s ease-out both}.hsk-cb-msg-actions{display:inline-flex;align-items:center;gap:2px;padding:0;opacity:0;pointer-events:none;transform:translate(3px);transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1)}.hsk-cb-user-msg:hover .hsk-cb-msg-actions,.hsk-cb-user-msg:focus-within .hsk-cb-msg-actions,.hsk-cb-msg-actions--visible{opacity:1;pointer-events:auto;transform:translate(0)}.hsk-cb-msg-action{display:inline-flex;align-items:center;justify-content:center;gap:3.5px;padding:1px 6.5px;height:16px;border-radius:999px;font-size:11px;font-weight:500;font-family:var(--hsk-font);line-height:1;color:var(--hsk-chat-muted, #8a8f98);background:transparent;border:none;box-shadow:none;cursor:pointer;user-select:none;box-sizing:border-box;transition:color .15s ease,background-color .15s ease,transform .18s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action .hsk-cb-msg-action-label{font-size:11px;line-height:1}.hsk-cb-msg-action:hover:not(:disabled){color:var(--hsk-chat-text, #ffffff)!important;background:var(--hsk-chat-divide, rgba(140, 140, 140, .18));border:none;transform:translateY(-.5px)}.hsk-cb-msg-action:active:not(:disabled){transform:translateY(0) scale(.95);transition-duration:.1s}.hsk-cb-msg-action--retry{color:var(--hsk-primary, #ff6a33);background:transparent;border:none;box-shadow:none}.hsk-cb-msg-action--retry:hover:not(:disabled){color:var(--hsk-on-active, #ffffff)!important;background:var(--hsk-primary, #ff6a33)!important;border:none!important;box-shadow:0 1px 6px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)}.hsk-cb-failed-notice{display:inline-flex;align-items:center;gap:4px;font-size:11px;line-height:1;color:#ef4444;font-weight:500;user-select:none}.hsk-cb-failed-dot{width:5px;height:5px;border-radius:999px;background:#ef4444;box-shadow:0 0 5px #ef444499;animation:hsk-failed-pulse 1.8s ease-in-out infinite}@keyframes hsk-failed-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.25);opacity:.7}}.hsk-cb-msg-action--copied{color:#10b981!important;background:#10b98126!important;font-weight:600}@media(max-width:640px){.hsk-cb-msg-actions{display:none!important}}@keyframes hsk-sent-in{0%{opacity:0}to{opacity:1}}.hsk-cb-user-bubble--queued{opacity:.55}.hsk-cb-queued-status{display:inline-flex;align-items:center;gap:5px;font-size:11px;line-height:1;color:var(--hsk-chat-muted, #8a8f98);padding:4px 0 0;background:none;border:none;cursor:pointer;font-family:var(--hsk-font);animation:hsk-sent-in .2s ease-out both}.hsk-cb-queued-dot{width:5px;height:5px;border-radius:999px;background:currentColor;animation:hsk-queued-pulse 1.1s ease-in-out infinite}@keyframes hsk-queued-pulse{0%,to{opacity:.35;transform:scale(.85)}50%{opacity:1;transform:scale(1)}}.hsk-cb-queued-now{color:var(--hsk-primary, #ff6a33);font-weight:600;transition:opacity .15s ease}.hsk-cb-queued-status:hover .hsk-cb-queued-now{opacity:.7}@media(prefers-reduced-motion:reduce){.hsk-cb-queued-dot{animation:none;opacity:.8}}.hsk-cb-timeline{display:none}@media(min-width:1200px){.hsk-cb-timeline.hsk-cb-timeline--left{display:block;position:absolute;left:auto!important;right:100%!important;margin-right:28px!important;top:50%;transform:translateY(-50%)!important;width:180px;max-height:60%;overflow:hidden;z-index:10;pointer-events:auto;direction:ltr!important;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent)}.hsk-cb-timeline.hsk-cb-timeline--right{display:block;position:absolute;left:100%!important;right:auto!important;margin-left:28px!important;top:50%;transform:translateY(-50%)!important;width:180px;max-height:60%;overflow:hidden;z-index:10;pointer-events:auto;direction:ltr!important;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent)}.hsk-cb-timeline-track{animation:hsk-tl-in .32s cubic-bezier(.22,1,.36,1) both}}@keyframes hsk-tl-in{0%{opacity:0;transform:translate(-10px)}to{opacity:1;transform:translate(0)}}.hsk-cb-timeline-track{--hsk-tl-x: 14px;--hsk-tl-gutter: 28px;position:relative;padding-left:var(--hsk-tl-gutter)!important;padding-right:6px!important;transition:transform .28s cubic-bezier(.22,1,.36,1)}.hsk-cb-timeline-track:before,.hsk-cb-timeline-track:after{display:none!important}.hsk-cb-tl-wave{position:absolute;left:0;top:0;overflow:visible;pointer-events:none;fill:none;stroke:var(--hsk-chat-divide, rgba(0, 0, 0, .12));stroke-width:2;stroke-linecap:round;transition:d .35s cubic-bezier(.22,1,.36,1)}@media(prefers-color-scheme:dark){.hsk-cb-tl-wave{stroke:var(--hsk-chat-divide, rgba(255, 255, 255, .14))}}.hsk-cb-tl-item{--hsk-tl-d: 0;position:relative;display:block;width:100%;padding:7px 6px 7px 0!important;border:none;background:none;text-align:left!important;cursor:pointer;font-family:var(--hsk-font)}.hsk-cb-tl-dot{position:absolute;left:calc(var(--hsk-tl-x, 14px) - var(--hsk-tl-gutter, 28px) - 3px)!important;right:auto!important;top:50%;width:6px;height:6px;margin-top:-3px;border-radius:999px;background:var(--hsk-chat-muted, #8a8f98);opacity:max(.1,calc(.28 - var(--hsk-tl-d) * .07));transform:translate(calc(10px + var(--hsk-tl-d) * 7px));transition:transform .28s cubic-bezier(.34,1.4,.64,1),opacity .46s cubic-bezier(.22,1,.36,1),background .2s ease}.hsk-cb-tl-label{display:block;font-size:12px;line-height:1.4;color:var(--hsk-chat-muted, #8a8f98);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transform:translate(calc(10px + var(--hsk-tl-d) * 7px));opacity:max(.32,calc(.9 - var(--hsk-tl-d) * .15));transition:transform .46s cubic-bezier(.22,1,.36,1),opacity .46s cubic-bezier(.22,1,.36,1),color .2s ease}.hsk-cb-tl-item:hover .hsk-cb-tl-label{opacity:1;transform:translate(calc(10px + var(--hsk-tl-d) * 7px - 2px))}.hsk-cb-tl-item:hover .hsk-cb-tl-dot{transform:translate(calc(10px + var(--hsk-tl-d) * 7px - 2px)) scale(1.25)}.hsk-cb-tl-cursor{position:absolute;box-shadow:0 0 0 5px color-mix(in srgb,var(--hsk-primary, #ff6a33) 14%,transparent);left:calc(var(--hsk-tl-x, 14px) - 4.5px)!important;right:auto!important;top:0;width:9px;height:9px;margin-top:-4.5px;border-radius:999px;background:var(--hsk-primary, #ff6a33);transform:translateY(0);transition:transform .44s cubic-bezier(.22,1,.36,1);will-change:transform}.hsk-cb-tl-item--on .hsk-cb-tl-dot{opacity:0}.hsk-cb-tl-item--on .hsk-cb-tl-label{color:var(--hsk-chat-text, #1f1f1f);opacity:1;font-weight:500}@media(prefers-reduced-motion:reduce){.hsk-cb-timeline-track{animation:none}.hsk-cb-timeline-track:after,.hsk-cb-tl-label,.hsk-cb-tl-cursor,.hsk-cb-tl-dot{transition:none}}@media(prefers-color-scheme:dark){.hsk-cb-ai-text{--hsk-chat-ai-bg: #26262a;background:var(--hsk-chat-ai-bg);color:#f9fafb}}.hsk-cb-sources-wrap{position:relative;margin-top:20px}.hsk-cb-sources{display:flex;flex-direction:row;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;-ms-overflow-style:none;padding-bottom:4px}.hsk-cb-sources::-webkit-scrollbar{display:none}.hsk-cb-sources-fade-left,.hsk-cb-sources-fade-right{position:absolute;top:0;bottom:4px;width:30px;pointer-events:none;z-index:2}.hsk-cb-sources-fade-left,.hsk-cb-sources-fade-right{background-color:var(--hsk-fade-bg, var(--hsk-chat-bg, #0e0e0f))}.hsk-cb-sources-fade-left,[dir=rtl] .hsk-cb-sources-fade-right{-webkit-mask-image:linear-gradient(to right,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%);mask-image:linear-gradient(to right,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%)}.hsk-cb-sources-fade-right,[dir=rtl] .hsk-cb-sources-fade-left{-webkit-mask-image:linear-gradient(to left,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%);mask-image:linear-gradient(to left,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%)}.hsk-cb-sources-fade-left{inset-inline-start:0}.hsk-cb-sources-fade-right{inset-inline-end:0}.hsk-cb-sources-next,.hsk-cb-sources-prev{position:absolute;top:42%;transform:translateY(-50%);width:34px;height:34px;border-radius:50%!important;background:var(--hsk-chat-bg, #ffffff)!important;border:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .12))!important;color:var(--hsk-primary, #ff6a33)!important;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 14px #00000024;z-index:10;cursor:pointer;transition:transform .2s cubic-bezier(.34,1.56,.64,1),background .18s ease,color .18s ease,box-shadow .18s ease}.hsk-cb-sources-next:hover,.hsk-cb-sources-prev:hover{background:var(--hsk-primary, #ff6a33)!important;color:#fff!important;border-color:var(--hsk-primary, #ff6a33)!important;transform:translateY(-50%) scale(1.1);box-shadow:0 6px 18px #ff6a3359}.hsk-cb-sources-next{inset-inline-end:2px}.hsk-cb-sources-prev{inset-inline-start:2px}[dir=rtl] .hsk-cb-sources-next svg,[dir=rtl] .hsk-cb-sources-prev svg{transform:scaleX(-1)}.hsk-cb-carousel-dots{display:flex;align-items:center;justify-content:center;gap:5px;margin-top:10px}.hsk-cb-dot-item{width:6px;height:6px;border-radius:50%;background:#96969659;transition:all .25s cubic-bezier(.34,1.56,.64,1);cursor:pointer}.hsk-cb-dot-item--active{width:18px;border-radius:999px;background:var(--hsk-primary, #ff6a33)}.hsk-cb-source{flex:0 0 188px;scroll-snap-align:start;border-radius:var(--hsk-border-radius, 0px);border:none;background:transparent;cursor:pointer;transition:transform .14s,opacity .14s;animation:hsk-card-in .26s ease-out both;overflow:visible}@keyframes hsk-card-in{0%{opacity:0;transform:translate(16px)}to{opacity:1;transform:none}}.hsk-cb-source:hover{transform:translateY(-3px);opacity:.92}.hsk-cb-src-imgwrap{width:188px;height:188px;overflow:hidden;border-radius:var(--hsk-border-radius, 0px);display:block;background:var(--hsk-chat-source-bg, #f8f9fa)}.hsk-cb-src-imgwrap img{width:100%;height:100%;object-fit:cover;transition:transform .22s;display:block}.hsk-cb-source:hover .hsk-cb-src-imgwrap img{transform:scale(1.05)}.hsk-cb-src-imgwrap-empty{width:188px;height:188px;background:var(--hsk-chat-divide, rgba(0,0,0,.06));display:flex;align-items:center;justify-content:center;color:var(--hsk-chat-muted, #555);font-size:32px}.hsk-cb-src-info{padding:8px 2px 0}.hsk-cb-sources-wrap--compact{margin-top:10px}.hsk-cb-sources-wrap--compact .hsk-cb-sources{gap:10px}.hsk-cb-sources-wrap--compact .hsk-cb-source{flex:0 0 96px}.hsk-cb-sources-wrap--compact .hsk-cb-src-imgwrap,.hsk-cb-sources-wrap--compact .hsk-cb-src-imgwrap-empty{width:96px;height:96px}.hsk-cb-sources-wrap--compact .hsk-cb-src-imgwrap-empty{font-size:20px}.hsk-cb-sources-wrap--compact .hsk-cb-src-name{font-size:12px;-webkit-line-clamp:1}.hsk-cb-sources-wrap--compact .hsk-cb-src-detail{font-size:11px;padding:1px 6px}.hsk-cb-src-name{font-size:13px;font-weight:600;color:var(--hsk-chat-text, #333);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.hsk-cb-src-detail{display:inline-flex;align-items:center;width:fit-content;max-width:100%;padding:2px 9px;border-radius:9999px;background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .05));border:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .08));font-size:12px;font-weight:600;color:var(--hsk-primary, #ff6a33);margin-top:5px;line-height:1.2}.hsk-cb-input-wrap{position:relative;--hsk-composer-pad-top: 16px;--hsk-composer-pad-x: var(--hsk-gutter, 24px);padding:var(--hsk-composer-pad-top) var(--hsk-composer-pad-x) 24px;flex-shrink:0;background:transparent!important;z-index:10}.hsk-cb-input-wrap[data-tools-open=true]{z-index:20!important}.hsk-cb-input-wrap:after{display:none!important}.hsk-cb-input-card{position:relative;z-index:1001;border-radius:20px;background:var(--hsk-chat-input-bg, #ffffff);border:none!important;outline:none!important;box-shadow:0 3px 14px -1px #0000000d,0 1px 4px #00000008!important;overflow:hidden;transition:height .22s cubic-bezier(.32,.72,0,1)}.hsk-cb-input-card:focus-within{border:none!important;outline:none!important;box-shadow:0 4px 18px -1px #00000012,0 2px 6px #0000000a!important}.hsk-cb-docked-header{display:flex;align-items:center;gap:8px;padding:10px 16px 6px;background:transparent;border-bottom:none!important;user-select:none}.hsk-cb-docked-sub{font-size:12px;font-weight:500;letter-spacing:-.01em;color:var(--hsk-chat-text, #1f1f1f);flex:1}.hsk-cb-docked-close{background:none;border:none;color:var(--hsk-chat-muted, rgba(0, 0, 0, .4));font-size:16px;line-height:1;cursor:pointer;padding:2px 6px;border-radius:50%;transition:background .12s,color .12s}.hsk-cb-docked-close:hover{background:#00000014;color:var(--hsk-chat-text, #111111)}.hsk-cb-field{margin-inline:5px}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-field{margin-inline:0}.hsk-cb-docked-options{display:flex;flex-direction:column;padding:4px 6px;background:transparent;border-bottom:none!important;max-height:220px;overflow-y:auto;scrollbar-width:thin}.hsk-cb-docked-option{display:flex;align-items:center;gap:10px;width:100%;padding:8px 12px;border:none;background:transparent!important;border-radius:10px;color:var(--hsk-chat-text, #1f1f1f);font-family:inherit;font-size:14px;text-align:start;cursor:pointer;transition:color .15s ease}.hsk-cb-docked-option:hover,.hsk-cb-docked-option:focus{background:transparent!important;color:var(--hsk-primary, #ff6a33)}.hsk-cb-docked-option-icon{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent);color:var(--hsk-primary, #ff6a33);flex-shrink:0;overflow:hidden;transition:transform .2s cubic-bezier(.34,1.56,.64,1),background .18s ease}.hsk-cb-docked-option:hover .hsk-cb-docked-option-icon,.hsk-cb-docked-option:focus .hsk-cb-docked-option-icon{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 22%,transparent);transform:scale(1.15) rotate(4deg)}.hsk-cb-docked-option-icon img{width:100%;height:100%;object-fit:cover}.hsk-cb-docked-option-title{font-weight:500;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .15s ease}.hsk-cb-docked-option-desc{font-size:12px;color:var(--hsk-chat-muted, #6b7280);font-weight:400}.hsk-cb-docked-option-detail{font-size:12px;font-weight:600;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-input-box{position:relative;display:grid;grid-template-columns:auto 1fr auto auto;grid-template-rows:auto 0px;align-items:center;justify-items:start;column-gap:10px;row-gap:0px;transition:grid-template-rows .2s cubic-bezier(.32,.72,0,1),row-gap .2s cubic-bezier(.32,.72,0,1);background:transparent!important;border:none!important;outline:none!important;border-radius:0!important;padding-block:12px;padding-inline:18px 14px;box-shadow:none!important}.hsk-cb-tools-toggle{display:none}@media(max-width:640px){.hsk-cb-tools-toggle{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:12px;border:none;background:var(--hsk-surface-1, rgba(0,0,0,.06));color:var(--hsk-chat-muted, #5f6368);cursor:pointer;flex-shrink:0;transition:background .16s,color .16s,transform .22s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-tools-toggle:active{transform:scale(.91)}.hsk-cb-tools-toggle--open{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 14%,transparent);color:var(--hsk-primary, #ff6a33);transform:rotate(45deg)}[data-hsk-theme] .hsk-cb-tools-toggle{background:var(--hsk-surface-1)!important;color:var(--hsk-chat-muted)!important}[data-hsk-theme] .hsk-cb-tools-toggle--open{background:color-mix(in srgb,var(--hsk-primary) 14%,transparent)!important;color:var(--hsk-primary)!important}.hsk-cb-input-box{grid-template-columns:auto 1fr auto}.hsk-cb-input-box>.hsk-cb-tools-toggle{grid-column:1;grid-row:1;display:inline-flex}.hsk-cb-input-box>.hsk-cb-field{grid-column:2;grid-row:1}.hsk-cb-input-box>.hsk-cb-send,.hsk-cb-input-box>.hsk-chat-send{grid-column:3;grid-row:1}.hsk-cb-input-box>.hsk-cb-attach-btn,.hsk-cb-input-box>.hsk-cb-voice-mode-btn{display:none!important}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-field{grid-column:1 / -1;grid-row:1}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-tools-toggle,.hsk-cb-input-box[data-expanded=true]>.hsk-cb-send,.hsk-cb-input-box[data-expanded=true]>.hsk-chat-send{grid-row:2}}.hsk-cb-toolsheet-wrap{position:absolute;bottom:calc(100% - 6px);inset-inline-start:var(--hsk-composer-pad-x, 14px);inset-inline-end:auto;z-index:1000;transform-origin:bottom left;animation:hsk-toolsheet-in .22s cubic-bezier(.16,1,.3,1) both;pointer-events:auto}[dir=rtl] .hsk-cb-toolsheet-wrap,.hsk-cb-panel[dir=rtl] .hsk-cb-toolsheet-wrap{transform-origin:bottom right}.hsk-cb-toolsheet{position:relative;z-index:1;min-width:200px;padding:6px;border-radius:16px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .08));border:none!important;box-shadow:none!important}@keyframes hsk-toolsheet-in{0%{opacity:0;transform:translateY(8px) scale(.92)}to{opacity:1;transform:translateY(0) scale(1)}}.hsk-cb-toolsheet-scrim{position:fixed;inset:0;z-index:999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:linear-gradient(to top,#000 30vh,rgba(0,0,0,.84) 38vh,rgba(0,0,0,.4) 48vh,rgba(0,0,0,.1) 56vh,transparent 62vh);-webkit-mask-image:linear-gradient(to top,#000 30vh,rgba(0,0,0,.84) 38vh,rgba(0,0,0,.4) 48vh,rgba(0,0,0,.1) 56vh,transparent 62vh);animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) both;cursor:default}.hsk-cb-input-wrap[data-tools-open=true] .hsk-cb-tools-toggle{position:relative;z-index:1002}.hsk-cb-toolsheet-pub-text{display:flex;flex-direction:column;min-width:0;gap:2px}.hsk-cb-toolsheet-pub-text code{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-toolsheet-item{display:flex;align-items:center;gap:11px;width:100%;padding:10px 12px;border:none;border-radius:11px;background:transparent;color:var(--hsk-chat-text, #111827);font-family:var(--hsk-font);font-size:15px;text-align:start;cursor:pointer;transition:background-color .15s ease}.hsk-cb-toolsheet-item:hover:not(:disabled){background:var(--hsk-chat-subtle, rgba(0,0,0,.05))}.hsk-cb-toolsheet-item:disabled{opacity:.45;cursor:default}.hsk-cb-toolsheet-item>svg{flex-shrink:0;color:var(--hsk-chat-muted, #6b7280)}[data-hsk-theme] .hsk-cb-toolsheet{background:var(--hsk-sheet-bg, var(--hsk-chat-input-bg, #f3f4f6))!important;border:none!important}[data-hsk-theme] .hsk-cb-toolsheet-item{color:var(--hsk-chat-text, #111827)!important}[data-hsk-theme] .hsk-cb-toolsheet-item:hover:not(:disabled){background:var(--hsk-sheet-hover, var(--hsk-surface-2, rgba(0, 0, 0, .05)))!important}[data-hsk-theme] .hsk-cb-toolsheet-item>svg{color:var(--hsk-chat-muted, #6b7280)!important}@media(prefers-reduced-motion:reduce){.hsk-cb-toolsheet-wrap,.hsk-cb-toolsheet-stem{animation:none}}.hsk-cb-input-box>.hsk-cb-attach-btn{grid-column:1;grid-row:1}.hsk-cb-input-box>.hsk-cb-field{grid-column:2;grid-row:1}.hsk-cb-input-box>.hsk-cb-voice-mode-btn{grid-column:3;grid-row:1}.hsk-cb-input-box>.hsk-cb-send,.hsk-cb-input-box>.hsk-chat-send{grid-column:4;grid-row:1}.hsk-cb-input-box[data-expanded=true]{grid-template-rows:auto 36px;row-gap:6px}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-field{grid-column:1 / -1;grid-row:1}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-attach-btn,.hsk-cb-input-box[data-expanded=true]>.hsk-cb-voice-mode-btn,.hsk-cb-input-box[data-expanded=true]>.hsk-cb-send,.hsk-cb-input-box[data-expanded=true]>.hsk-chat-send{grid-row:2}.hsk-cb-textarea{width:100%;background:transparent;border:none;outline:none;resize:none;font-size:var(--hsk-input-font-size, 16px);font-family:var(--hsk-font);color:var(--hsk-chat-text, #111);min-height:28px;max-height:140px;field-sizing:content;line-height:var(--hsk-input-line-height, 1.55);word-break:break-word;overflow-wrap:break-word;padding:0;transition:height .18s cubic-bezier(.32,.72,0,1),color .42s cubic-bezier(.16,1,.3,1);scrollbar-width:none}.hsk-cb-textarea::-webkit-scrollbar{width:0;height:0}.hsk-cb-textarea::placeholder{color:var(--hsk-chat-muted, #9ca3af);font-family:var(--hsk-font);font-size:var(--hsk-ph-font-size, var(--hsk-input-font-size, 16px))}.hsk-cb-attach-btn,.hsk-cb-send,.hsk-chat-send{width:36px;height:36px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border:none;cursor:pointer;transition:transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s cubic-bezier(.34,1.56,.64,1),background-color .42s cubic-bezier(.16,1,.3,1),opacity .2s ease;font-family:inherit;margin:0;padding:0}.hsk-cb-send,.hsk-chat-send{background:linear-gradient(135deg,#007aff,#0056b3);color:#fff;border-radius:12px!important;box-shadow:0 4px 14px #007aff61,inset 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent);position:relative;overflow:hidden}.hsk-cb-send .hsk-telegram-icon,.hsk-chat-send .hsk-telegram-icon{transition:transform .25s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-send:hover:not(:disabled),.hsk-chat-send:hover:not(:disabled){opacity:1;transform:translateY(-1px) scale(1.05);box-shadow:0 6px 18px #007aff7a,inset 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent)}.hsk-cb-send:hover:not(:disabled) .hsk-telegram-icon,.hsk-chat-send:hover:not(:disabled) .hsk-telegram-icon{transform:translate(2px,-2px) rotate(-10deg) scale(1.1)}.hsk-cb-send:active:not(:disabled),.hsk-chat-send:active:not(:disabled){transform:translateY(0) scale(.94);box-shadow:0 1px 4px #007aff4d}.hsk-cb-send:disabled,.hsk-chat-send:disabled{opacity:.4;cursor:not-allowed;background:var(--hsk-chat-muted, #ccc);box-shadow:none}.hsk-cb-send--stop{background:#e5342a!important}.hsk-cb-send--stop:hover{background:#c92a21!important;opacity:1}.hsk-cb-field{position:relative;grid-area:field;display:flex;align-items:center;width:100%;min-width:0;--hsk-input-font-size: 16px;--hsk-input-line-height: 1.55;--hsk-input-control: 36px;--hsk-input-line-box: calc(var(--hsk-input-font-size) * var(--hsk-input-line-height))}.hsk-cb-listening{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between;pointer-events:none}.hsk-cb-listening span{width:2px;height:2px;border-radius:999px;background:var(--hsk-primary, #ff6a33);opacity:.3;transform-origin:center;will-change:transform,opacity;transition:transform 90ms linear,opacity 90ms linear}.hsk-animated-placeholder{position:absolute;inset:0;display:flex;flex-wrap:wrap;align-items:center;align-content:center;row-gap:1px;height:100%;pointer-events:none;overflow:hidden;user-select:none;padding:0;z-index:1}.hsk-cb-input-box>*{--hsk-cascade-ease: cubic-bezier(.45, 0, .55, 1);--hsk-cascade-dur: .44s;--hsk-cascade-step: 55ms}.hsk-cb-input-box[data-cascade]>*:not([type=file]):not(.hsk-cb-field){animation-duration:var(--hsk-cascade-dur);animation-timing-function:var(--hsk-cascade-ease);animation-fill-mode:none}.hsk-cb-input-box[data-cascade=a]>*:not([type=file]):not(.hsk-cb-field){animation-name:hsk-leaf-settle-a}.hsk-cb-input-box[data-cascade=b]>*:not([type=file]):not(.hsk-cb-field){animation-name:hsk-leaf-settle-b}.hsk-cb-input-box[data-cascade]>*:not([type=file]):not(.hsk-cb-field),.hsk-animated-placeholder__char{will-change:transform}.hsk-cb-input-box:hover>*,.hsk-cb-input-box:focus-within>*{will-change:auto}.hsk-cb-input-box>*{--hsk-cascade-field: .11s}.hsk-cb-input-box[data-cascade]>.hsk-cb-attach-btn{animation-delay:0ms}.hsk-cb-input-box[data-cascade]>.hsk-cb-voice-mode-btn{animation-delay:calc(var(--hsk-cascade-field) + var(--hsk-text-sweep, 0ms))}.hsk-cb-input-box[data-cascade]>.hsk-cb-send,.hsk-cb-input-box[data-cascade]>.hsk-chat-send{animation-delay:calc(var(--hsk-cascade-field) + var(--hsk-text-sweep, 0ms) + var(--hsk-cascade-step))}@keyframes hsk-leaf-settle-a{0%{transform:translateY(0) scale(1)}42%{transform:translateY(-3px) scale(1.05)}to{transform:translateY(0) scale(1)}}@keyframes hsk-leaf-settle-b{0%{transform:translateY(0) scale(1)}42%{transform:translateY(-3px) scale(1.05)}to{transform:translateY(0) scale(1)}}.hsk-cb-input-box>.hsk-cb-field .hsk-animated-placeholder__char{animation-name:hsk-placeholder-animate-up}@media(prefers-reduced-motion:reduce){.hsk-cb-input-box[data-cascade=a]>*,.hsk-cb-input-box[data-cascade=b]>*{animation:none;transform:none;opacity:1}.hsk-cb-textarea,.hsk-cb-input-card{transition-property:background-color,box-shadow}}.hsk-animated-placeholder[data-fit="2"]{--hsk-ph-font-size: 15px}.hsk-animated-placeholder[data-fit="3"]{--hsk-ph-font-size: 14px}.hsk-cb-field{transition:min-block-size .26s cubic-bezier(.16,1,.3,1)}.hsk-cb-field[data-ph-lines="2"]{min-block-size:48px}.hsk-animated-placeholder__char{display:inline-block;font-size:var(--hsk-ph-font-size, var(--hsk-input-font-size, 16px));line-height:var(--hsk-input-line-height, 1.55);color:var(--hsk-chat-muted, #9ca3af);font-family:var(--hsk-font);white-space:pre;animation:hsk-placeholder-animate-up .46s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-placeholder-animate-up{0%{opacity:0;transform:translateY(9px);color:hsl(var(--hsk-ph-hue, 0) var(--hsk-ph-sat, 68%) var(--hsk-ph-light, 55%))}55%{opacity:1;color:hsl(var(--hsk-ph-hue, 0) var(--hsk-ph-sat, 68%) var(--hsk-ph-light, 55%))}to{opacity:1;transform:translateY(0);color:var(--hsk-chat-muted, #9ca3af)}}@media(prefers-reduced-motion:reduce){.hsk-animated-placeholder__char{animation:none;transform:none;opacity:1;color:var(--hsk-chat-muted, #9ca3af);animation-delay:0ms!important}}.hsk-cb-voice-error{display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;line-height:1.45;width:fit-content;max-width:min(92%,520px);margin-inline:auto;margin:8px auto 0;text-align:center;text-wrap:balance;color:#ff6b6b;padding:3px 8px;border-radius:0;background:transparent;border:none;border-bottom:1px solid rgba(229,72,77,.35);cursor:pointer;animation:hsk-msg-in .2s ease-out both}.hsk-cb-voice-error span{text-align:center}.hsk-cb-voice-error-dismiss{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;border:none;background:#ffffff1f;color:inherit;font-size:14px;line-height:1;cursor:pointer;padding:0;flex-shrink:0;transition:background .15s ease,transform .15s ease}.hsk-cb-voice-error-dismiss:hover{background:#ffffff40;transform:scale(1.1)}.hsk-cb-img-strip{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 18px 2px;background:transparent;border:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;animation:hsk-msg-in .2s ease-out both}.hsk-cb-img-thumb-wrap{position:relative;width:60px;height:60px;flex-shrink:0;border-radius:12px;box-shadow:0 2px 8px #00000014,0 0 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 12%,transparent);transition:transform .2s cubic-bezier(.16,1,.3,1),box-shadow .2s cubic-bezier(.16,1,.3,1);overflow:visible}.hsk-cb-img-thumb-wrap:hover{transform:translateY(-2px);box-shadow:0 6px 14px #0000001f,0 0 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 20%,transparent)}.hsk-cb-img-thumb{width:100%;height:100%;object-fit:cover;border-radius:12px;border:none;display:block}.hsk-cb-img-thumb-remove{position:absolute;top:-5px;inset-inline-end:-5px;width:18px;height:18px;border-radius:50%;background:#141418bf;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#fff;border:1px solid rgba(255,255,255,.25);box-shadow:0 2px 6px #00000040;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;transition:transform .15s cubic-bezier(.16,1,.3,1),background-color .15s ease;z-index:2}.hsk-cb-img-thumb-remove:hover{background:#ef4444eb;border-color:#fff6;transform:scale(1.15)}.hsk-cb-attach-btn,.hsk-cb-voice-mode-btn{position:relative;width:36px;height:36px;border-radius:12px;border:none!important;outline:none!important;background:transparent;color:var(--hsk-chat-muted, #71717a);cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:none!important;opacity:.75;transition:transform .35s cubic-bezier(.34,1.8,.64,1),background-color .2s ease,color .2s ease,opacity .2s ease;font-family:inherit;overflow:visible}.hsk-cb-attach-btn:hover:not(:disabled),.hsk-cb-voice-mode-btn:hover:not(:disabled){opacity:1;color:var(--hsk-chat-text, #1f1f1f);background:transparent;transform:translateY(-1px)}.hsk-cb-attach-btn:active:not(:disabled),.hsk-cb-voice-mode-btn:active:not(:disabled){transform:translateY(0) scale(.94);transition-duration:.1s}.hsk-cb-attach-btn svg,.hsk-cb-voice-mode-btn svg{overflow:visible}.hsk-cb-attach-btn svg{transition:transform .34s cubic-bezier(.22,1,.36,1)}.hsk-cb-attach-btn:hover:not(:disabled) svg{transform:rotate(-14deg) translateY(-1px)}.hsk-mic-cap{transform-box:fill-box;transform-origin:center;transition:transform .32s cubic-bezier(.34,1.56,.64,1)}.hsk-wave-bar{transform-box:fill-box;transform-origin:center;transition:transform .3s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-voice-mode-btn:hover:not(:disabled) .hsk-wave-bar{animation:hsk-wave-wake .52s cubic-bezier(.34,1.8,.64,1) both,hsk-wave-live var(--hsk-period, 1.1s) ease-in-out .52s infinite;animation-delay:calc(var(--hsk-bar, 0) * 55ms),calc(.52s + var(--hsk-bar, 0) * 55ms)}.hsk-cb-voice-mode-btn:hover:not(:disabled) .hsk-wave-bar--tip{animation-name:hsk-wave-wake-tip,hsk-wave-live-tip}@keyframes hsk-wave-wake{0%{transform:scaleY(.12)}55%{transform:scaleY(calc(var(--hsk-amp, 1.6) * 1.12))}to{transform:scaleY(1)}}@keyframes hsk-wave-live{0%,to{transform:scaleY(1)}30%{transform:scaleY(var(--hsk-amp, 1.6))}55%{transform:scaleY(calc(1 + (var(--hsk-amp, 1.6) - 1) * .22))}78%{transform:scaleY(calc(1 + (var(--hsk-amp, 1.6) - 1) * .62))}}@keyframes hsk-wave-wake-tip{0%{transform:scaleX(.2);opacity:.4}55%{transform:scaleX(calc(var(--hsk-amp, 1.9) * 1.1));opacity:1}to{transform:scaleX(1);opacity:.8}}@keyframes hsk-wave-live-tip{0%,to{transform:scaleX(1);opacity:.7}30%{transform:scaleX(var(--hsk-amp, 1.9));opacity:1}70%{transform:scaleX(1.15);opacity:.8}}.hsk-copy-sheet,.hsk-copy-back{transform-box:fill-box;transform-origin:center;transition:transform .3s cubic-bezier(.22,1,.36,1)}.hsk-cb-kiku-id-pill:hover .hsk-copy-sheet,.hsk-cb-toolsheet-pub:is(:hover,:active) .hsk-copy-sheet,.hsk-cb-secret-key:is(:hover,:active) .hsk-copy-sheet{transform:translate(.9px,.9px)}.hsk-cb-kiku-id-pill:hover .hsk-copy-back,.hsk-cb-toolsheet-pub:is(:hover,:active) .hsk-copy-back,.hsk-cb-secret-key:is(:hover,:active) .hsk-copy-back{transform:translate(-.9px,-.9px)}@media(prefers-reduced-motion:reduce){.hsk-cb-attach-btn:hover:not(:disabled) svg,.hsk-cb-kiku-id-pill:hover .hsk-copy-sheet,.hsk-cb-kiku-id-pill:hover .hsk-copy-back,.hsk-cb-toolsheet-pub:is(:hover,:active) :is(.hsk-copy-sheet,.hsk-copy-back),.hsk-cb-secret-key:is(:hover,:active) :is(.hsk-copy-sheet,.hsk-copy-back){transform:none}.hsk-cb-voice-mode-btn:hover:not(:disabled) .hsk-wave-bar{animation:none}}.hsk-cb-attach-btn:disabled,.hsk-cb-voice-mode-btn:disabled{opacity:.3;cursor:not-allowed;transform:none}.hsk-cb-user-imgs{display:grid;gap:2px;width:fit-content;max-width:min(78%,320px);margin-bottom:4px;margin-left:auto;border-radius:18px 18px 4px;overflow:hidden;box-shadow:0 4px 16px #00000029}.hsk-cb-user-imgs[data-count="1"]{grid-template-columns:1fr}.hsk-cb-user-imgs[data-count="2"]{grid-template-columns:1fr 1fr}.hsk-cb-user-imgs[data-count="3"]{grid-template-columns:2fr 1fr;grid-template-rows:1fr 1fr}.hsk-cb-user-imgs[data-count="3"]>:first-child{grid-row:span 2}.hsk-cb-user-imgs[data-count="4"]{grid-template-columns:1fr 1fr}.hsk-cb-user-img-cell{position:relative;display:block;padding:0;border:none;background:none;cursor:pointer;overflow:hidden;min-width:0;line-height:0}.hsk-cb-user-imgs[data-count="1"] .hsk-cb-user-img-cell{aspect-ratio:auto}.hsk-cb-user-imgs:not([data-count="1"]) .hsk-cb-user-img-cell{aspect-ratio:1}.hsk-cb-user-img-more{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#00000073;color:#fff;font-size:20px;font-weight:600;line-height:1}.hsk-cb-user-img-thumb{width:100%;height:100%;object-fit:cover;display:block;cursor:pointer}.hsk-cb-user-imgs[data-count="1"] .hsk-cb-user-img-thumb{height:auto;max-height:300px;object-fit:contain}.hsk-cb-user-img-cell:hover .hsk-cb-user-img-thumb{filter:brightness(.93)}.hsk-cb-leave{position:relative;z-index:1002;display:inline-flex;flex-wrap:nowrap;white-space:nowrap;align-items:center;gap:8px;width:fit-content;max-width:calc(100% - 24px);margin-bottom:-11px;margin-inline-start:14px;padding:3px 4px 3px 12px;border-radius:999px;background:var(--hsk-chat-ai-bg, #eeeef0);color:var(--hsk-chat-text, #111827);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff);font:600 12px/24px var(--hsk-font);animation:hsk-leave-in .18s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-leave-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.hsk-cb-leave+.hsk-cb-input-card>*{opacity:.45;transition:opacity .15s}.hsk-cb-leave-btn{height:24px;padding:0 11px;border:none;border-radius:999px;background:#80808029;color:inherit;font:600 12px var(--hsk-font);cursor:pointer;transition:opacity .15s}.hsk-cb-leave-btn:hover{opacity:.88}.hsk-cb-leave-btn--end{background:var(--hsk-primary, #ff6a33);color:#fff}.hsk-cb-error{display:block;width:fit-content;max-width:min(560px,100%);margin:10px auto 8px;padding:10px 14px;border-radius:10px;background:#ef444414;border:1px solid rgba(239,68,68,.2);color:#ef4444;font-size:13px;line-height:1.5;font-family:var(--hsk-font);text-align:center}.hsk-kiku-badge{display:inline-block;font-size:var(--hsk-font-size, 16px);font-family:var(--hsk-font);font-weight:600;background:#ffffff38;border:1px solid rgba(255,255,255,.35);color:#fff;padding:1px 7px;border-radius:6px;margin-inline-end:6px}.hsk-cb-memory-pill{display:inline-flex;align-items:center;gap:10px;align-self:flex-start;margin:12px 0 6px;padding:12px 22px;font-size:15px;font-weight:600;text-decoration:none;color:#fff;background:linear-gradient(135deg,#007aff,#0056b3);border:none;border-radius:18px 18px 18px 4px!important;box-shadow:0 4px 16px -2px #007aff61,inset 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 28%,transparent);transition:transform .18s cubic-bezier(.34,1.56,.64,1),opacity .15s,box-shadow .18s ease;cursor:pointer}.hsk-cb-memory-pill:hover{opacity:.96;transform:translateY(-1px) scale(1.02);box-shadow:0 6px 20px #007aff7a}.hsk-cb-think{position:relative;z-index:2;margin-bottom:-11px;margin-inline-start:0;font-size:14px;font-family:var(--hsk-font)}.hsk-cb-think--note{margin-bottom:0}.hsk-cb-think-head{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 11px;border:none;border-radius:999px;background:var(--hsk-chat-ai-bg, #eeeef0);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 1px 3px #00000021;font-family:var(--hsk-font);font-size:12px;font-weight:600;color:var(--hsk-chat-muted, #6b7280);cursor:pointer;user-select:none;line-height:28px}.hsk-cb-think-head:hover{color:var(--hsk-chat-text, #111827)}.hsk-cb-think-head--static{cursor:default}.hsk-cb-think-head--static:hover{color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-think-chevron{font-size:9px;transition:transform .12s}.hsk-cb-think-chevron--open{transform:rotate(90deg)}.hsk-cb-think-body{margin-top:6px;padding:8px 12px;border-left:2px solid var(--hsk-chat-border, rgba(128,128,128,.25));color:var(--hsk-chat-muted, #4b5563);white-space:pre-wrap;line-height:1.5;font-family:var(--hsk-font);font-size:14px}.hsk-cb-stopped{display:flex;flex-direction:column;align-items:start;gap:8px;margin:10px 0 14px}.hsk-cb-stopped--empty{align-items:center;text-align:center;margin:22px auto 18px}.hsk-cb-stopped--empty .hsk-cb-stopped-label{text-align:center}.hsk-cb-stopped-dots{display:flex;gap:5px;margin-bottom:2px}.hsk-cb-stopped-dots i{width:5px;height:5px;border-radius:50%;background:var(--hsk-chat-muted, #888);opacity:.4}.hsk-cb-stopped-label{font-size:13px;line-height:1.5;color:var(--hsk-chat-muted, #888);font-family:var(--hsk-font);text-align:start}.hsk-cb-continue{display:inline-flex;align-items:center;gap:7px;padding:7px 14px;font-size:13px;font-weight:500;font-family:var(--hsk-font);color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 7%,transparent);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 12%,transparent);border-radius:999px;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.hsk-cb-continue:hover{border-color:var(--hsk-primary);color:var(--hsk-primary);background:transparent}.hsk-cb-continue svg{flex:none}[dir=rtl] .hsk-cb-continue svg{transform:scaleX(-1)}.hsk-sb-wrap{--hsk-bg: #ffffff;--hsk-border: #f1f3f4;--hsk-text: #1f1f1f;--hsk-muted: #5f6368;--hsk-hover: #f8f9fa;--hsk-drop-shadow: 0 8px 30px rgba(0,0,0,.06);--hsk-primary: var(--chat-primary-color, #ff6a33);position:relative;width:100%;font-family:inherit}@media(prefers-color-scheme:dark){.hsk-sb-wrap{--hsk-bg: #0a0a0a;--hsk-border: #202124;--hsk-text: #e8eaed;--hsk-muted: #888;--hsk-hover: #1a1a1b;--hsk-drop-shadow: 0 12px 40px rgba(0,0,0,.4)}}.hsk-sb-input{width:100%;padding:10px 16px 10px 40px;font-size:14px;border-radius:var(--hsk-border-radius, 0px);border:1.5px solid var(--hsk-border);outline:none;box-sizing:border-box;background:var(--hsk-bg);color:var(--hsk-text);transition:border-color .15s,box-shadow .15s;font-family:inherit}.hsk-sb-input::placeholder{color:var(--hsk-muted)}.hsk-sb-input:focus{border-color:var(--hsk-primary);box-shadow:0 0 0 3px #ff6a331f}.hsk-sb-icon{position:absolute;inset-inline-start:14px;top:50%;transform:translateY(-50%);color:var(--hsk-muted);pointer-events:none;display:flex;align-items:center}.hsk-sb-drop{position:absolute;top:calc(100% + 6px);left:0;right:0;background:var(--hsk-bg);border:1px solid var(--hsk-border);border-radius:var(--hsk-border-radius, 0px);box-shadow:var(--hsk-drop-shadow);z-index:9999;overflow:hidden;padding:6px 0}.hsk-sb-row{display:flex;align-items:center;gap:12px;padding:9px 16px;cursor:pointer;transition:background .1s}.hsk-sb-row:hover{background:var(--hsk-hover)}.hsk-sb-row-thumb{width:38px;height:38px;flex-shrink:0;display:flex;align-items:center;justify-content:center;color:var(--hsk-muted);background:var(--hsk-hover);border-radius:var(--hsk-border-radius, 0px);overflow:hidden}.hsk-sb-row-thumb img{width:100%;height:100%;object-fit:cover;display:block}.hsk-sb-row-body{flex:1;min-width:0}.hsk-sb-row-title{font-size:13px;font-weight:500;color:var(--hsk-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}.hsk-sb-row-sub{font-size:11px;color:var(--hsk-muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hsk-sb-empty{padding:14px 16px;font-size:13px;color:var(--hsk-muted)}.hsk-sb-loading-bar{height:2px;background:linear-gradient(90deg,transparent,var(--hsk-primary),transparent);background-size:200% 100%;animation:hsk-sweep .9s linear infinite;position:absolute;top:0;left:0;right:0}@keyframes hsk-sweep{0%{background-position:200% 0}to{background-position:-200% 0}}.hsk-sb-fade{animation:hsk-fin .1s ease-out both}@keyframes hsk-fin{0%{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}.hsk-sb-skeleton-row{display:flex;align-items:center;gap:12px;padding:9px 16px}.hsk-sb-skeleton-icon{width:38px;height:38px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:var(--hsk-border-radius, 0px);flex-shrink:0;animation:hsk-pulse 1.5s ease-in-out infinite}.hsk-sb-skeleton-text1{height:12px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:3px;width:60%;animation:hsk-pulse 1.5s ease-in-out infinite}.hsk-sb-skeleton-text2{height:8px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:2px;width:35%;margin-top:5px;animation:hsk-pulse 1.5s ease-in-out infinite}@keyframes hsk-pulse{0%,to{opacity:.6}50%{opacity:1}}@media(pointer:coarse){.hsk-cb-user-bubble,.hsk-cb-ai-body{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}}.hsk-tapback-overlay{position:absolute;inset:0;z-index:1000;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;touch-action:none}.hsk-cb-msg-group[data-hsk-tapback-focus]{position:relative;z-index:2;pointer-events:none}.hsk-tapback-frost{z-index:1;position:absolute;left:0;right:0;pointer-events:none;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 24%,transparent);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);-webkit-mask-image:var(--hsk-tapback-feather);mask-image:var(--hsk-tapback-feather);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;animation:hsk-scrim-in .2s cubic-bezier(.16,1,.3,1) both}.hsk-tapback-frost.is-upper{--hsk-tapback-feather: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .03) 6px, rgba(0, 0, 0, .16) 16px, rgba(0, 0, 0, .5) 32px, rgba(0, 0, 0, .84) 48px, rgba(0, 0, 0, .97) 58px, #000 64px)}.hsk-tapback-frost.is-lower{--hsk-tapback-feather: linear-gradient(to top, transparent, rgba(0, 0, 0, .03) 6px, rgba(0, 0, 0, .16) 16px, rgba(0, 0, 0, .5) 32px, rgba(0, 0, 0, .84) 48px, rgba(0, 0, 0, .97) 58px, #000 64px)}.hsk-tapback-frost.is-closing{animation:hsk-scrim-out .19s cubic-bezier(.4,0,1,1) both}@media(prefers-reduced-motion:reduce){.hsk-tapback-overlay *,.hsk-tapback-overlay.is-closing *,.hsk-tapback-frost,.hsk-tapback-frost.is-closing{animation:none!important;transition:none!important}}.hsk-tapback-group{position:absolute;z-index:1002;outline:none;display:flex;flex-direction:column;animation:hsk-tapback-flow-up .26s cubic-bezier(.34,1.56,.64,1) both}.hsk-tapback-group.is-closing{animation:hsk-tapback-flow-down .19s cubic-bezier(.55,0,.85,.35) forwards}.hsk-tapback-group.is-above{transform-origin:var(--tail-x, 80%) calc(100% + 16px)}.hsk-tapback-group.is-below{transform-origin:var(--tail-x, 80%) -16px}.hsk-tapback-capsule{display:inline-flex;align-items:center;gap:1px;padding:3px 5px;height:36px;min-height:36px;border-radius:999px;border:none;background:var(--hsk-skin, var(--hsk-bubble-bg, #eeeef0));box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 6px 18px #00000029;max-width:100%;position:relative;z-index:2;box-sizing:border-box}.hsk-tapback-tail{position:absolute;top:calc(100% - 2px);transform:translate(-50%);display:flex;flex-direction:column;align-items:center;gap:3px;pointer-events:none;z-index:1}.hsk-tapback-tail.is-below{top:auto;bottom:calc(100% - 2px);flex-direction:column-reverse}.hsk-tapback-dot--mid{margin-left:calc(var(--tail-dir, 0) * var(--tail-step, 5px))}.hsk-tapback-dot--anchor{margin-left:calc(var(--tail-dir, 0) * var(--tail-step, 5px) * 2.2)}.hsk-tapback-dot{display:block;border-radius:50%;flex-shrink:0;border:none}.hsk-tapback-dot--mid{width:12px;height:12px;background:var(--hsk-skin, var(--hsk-bubble-bg, #eeeef0));box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 2px 5px #0000001f;animation:hsk-tapback-bead .2s cubic-bezier(.16,1,.3,1) .06s backwards}.hsk-tapback-dot--anchor{width:9px;height:9px;background:var(--hsk-anchor-color, var(--hsk-primary, #007aff));animation:hsk-tapback-bead .2s cubic-bezier(.16,1,.3,1) .02s backwards}.hsk-tapback-tool-btn{min-width:0;flex:1 1 auto;display:inline-flex;align-items:center;gap:4px;padding:4px 8px;height:30px;border-radius:999px;font-size:12px;font-weight:500;font-family:var(--hsk-font);line-height:1;color:var(--hsk-chat-text, #f3f4f6);background:transparent;border:none;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;transition:background-color .15s ease,transform .12s ease;white-space:nowrap;animation:hsk-tapback-tool-pop .2s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.02s + var(--tool-idx, 0) * .02s)}.hsk-tapback-tool-btn span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-tapback-tool-btn svg{flex-shrink:0}.hsk-tapback-tool-btn:hover{background:color-mix(in srgb,var(--hsk-chat-text, #ffffff) 14%,transparent)}.hsk-tapback-tool-btn:active{transform:scale(.92)}.hsk-tapback-tool-btn--pin{color:var(--hsk-primary, #ff6a33)}.hsk-tapback-tool-btn--pin:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 18%,transparent)}.hsk-tapback-tool-btn--copy.is-copied{color:#10b981!important}.hsk-tapback-group.is-docked .hsk-tapback-tail{display:none}@keyframes hsk-tapback-flow-up{0%{opacity:0;transform:scale(.12,.04)}18%{opacity:1}46%{transform:scale(1.06,1.13)}74%{transform:scale(.985,.95)}to{opacity:1;transform:scale(1)}}@keyframes hsk-tapback-flow-down{0%{opacity:1;transform:scale(1)}65%{opacity:1;transform:scale(.5,.34)}to{opacity:0;transform:scale(.12,.04)}}@keyframes hsk-tapback-bead{0%{opacity:0;transform:scale(.2)}to{opacity:1;transform:scale(1)}}@keyframes hsk-tapback-tool-pop{0%{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}.hsk-cb-topbar-logo{display:block;max-height:18px;max-width:104px;object-fit:contain}.hsk-cb-sound-pill{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px;border-radius:16px;font-family:var(--hsk-font);font-size:11px;font-weight:550;color:var(--hsk-chat-muted, #71717a);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent);cursor:pointer;transition:color .2s ease,border-color .2s ease,transform .2s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-sound-pill.is-on{color:var(--hsk-chat-text, #111)}.hsk-cb-req{position:relative;width:100%}.hsk-cb-req-dot{width:7px;height:7px;border-radius:50%;background:var(--hsk-primary, #ff6a33)}.hsk-cb-req-list{position:absolute;bottom:calc(100% + 10px);inset-inline-start:0;z-index:60;display:flex;flex-direction:column;width:100%;max-height:300px;overflow-y:auto;scrollbar-width:none;font-family:var(--hsk-font);animation:hsk-leave-in .18s cubic-bezier(.16,1,.3,1) both}.hsk-cb-req-open{display:flex;align-items:flex-start;gap:9px;width:100%;padding:6px 0 6px 12px;padding-inline:12px 0;border:none;background:none;color:var(--hsk-chat-muted, #8a8f98);font:inherit;text-align:start;cursor:pointer;opacity:.6;transition:opacity .2s ease,color .2s ease}.hsk-cb-req-open:hover,.hsk-cb-req-card.is-open .hsk-cb-req-open,.hsk-cb-req-card.is-active .hsk-cb-req-open{opacity:1}.hsk-cb-req-card.is-active .hsk-cb-req-summary{color:var(--hsk-chat-text, #1f1f1f);font-weight:500}.hsk-cb-req-mark{flex:none;width:6px;height:6px;margin-top:5px;border-radius:50%;background:currentColor;opacity:.45}.hsk-cb-req-card.is-open .hsk-cb-req-mark{background:var(--hsk-primary, #ff6a33);box-shadow:0 0 0 4px color-mix(in srgb,var(--hsk-primary, #ff6a33) 14%,transparent);opacity:1}.hsk-cb-req-text{display:flex;flex-direction:column;gap:1px;min-width:0}.hsk-cb-req-summary,.hsk-cb-req-status{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hsk-cb-req-summary{font-size:12px;line-height:1.4}.hsk-cb-req-status{font-size:10.5px;opacity:.75}.hsk-cb-tray-below{position:absolute;top:calc(var(--hsk-tray-top, 100%) + var(--hsk-tray-h, 0px) + 14px);left:50%;transform:translate(-50%);width:min(300px,calc(100vw - 28px));z-index:1000;animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) .08s both}.hsk-cb-tray-below.is-closing{animation:hsk-scrim-out .18s cubic-bezier(.4,0,1,1) both;pointer-events:none}.hsk-cb-tray-below .hsk-cb-req-list{position:static;max-height:32vh;animation:none}.hsk-cb-tray-below-title{display:block;padding:0 12px 4px;font:600 10.5px var(--hsk-font);letter-spacing:.04em;text-transform:uppercase;color:var(--hsk-chat-muted, #8a8f98);opacity:.7}.hsk-cb-btn-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#ef4444;color:#fff;font-size:11px;font-weight:700;line-height:1}.hsk-cb-sound-pill:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--hsk-primary, #ff6a33) 25%,transparent);color:var(--hsk-primary, #ff6a33)}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-rule{width:13px;height:1px;background:var(--hsk-chat-muted, #71717a);opacity:.25}.hsk-cb-sound-pill.is-compact{width:26px;height:26px;padding:0;gap:0;justify-content:center;border-radius:9px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside{width:14px;flex:0 0 14px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill{width:14px;height:14px;border:none;background:none;backdrop-filter:none;-webkit-backdrop-filter:none;border-radius:0;opacity:.45}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill.is-on{opacity:.75}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill:hover{transform:none}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill svg{width:12px;height:12px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{flex:1 1 auto!important}.hsk-cb-sound-pill.is-blocked{color:#ef4444!important;opacity:1!important}.hsk-cb-panel[dir=rtl] .hsk-cb-topbar-ooze-menu .hsk-cb-theme-vlabel{transform:none}.hsk-markdown-table td.hsk-md-ok,[data-hsk-theme] .hsk-markdown-table td.hsk-md-ok{color:color-mix(in srgb,#10b981 72%,var(--hsk-chat-text, #111))!important;font-weight:600}.hsk-markdown-table td.hsk-md-bad,[data-hsk-theme] .hsk-markdown-table td.hsk-md-bad{color:color-mix(in srgb,#ef4444 72%,var(--hsk-chat-text, #111))!important;font-weight:600}@media(max-width:1199px){.hsk-cb-topbar-ooze-menu.is-island,.hsk-cb-topbar-ooze-menu.is-island.is-closing{animation:none;will-change:clip-path}.hsk-cb-topbar-ooze-menu.is-island>*{opacity:var(--hsk-island-content, 1)}}.hsk-cb-topbar-ooze-menu.is-parked,.hsk-cb-tray-shadow.is-parked{visibility:hidden;pointer-events:none;opacity:0!important}[data-hsk-theme] .hsk-cb-topbar-ooze-menu.is-parked,.hsk-cb-topbar-ooze-menu.is-parked{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none!important}.hsk-cb-tray-shadow.is-parked>div{box-shadow:none!important}.hsk-cb-tray-shadow{position:absolute;top:var(--hsk-tray-top, 0px);left:50%;transform:translate(-50%);width:var(--hsk-tray-w, 0px);height:var(--hsk-tray-h, 0px);z-index:1000;pointer-events:none}.hsk-cb-tray-shadow>div{position:absolute;left:0;top:0;width:100%;height:100%;border-radius:18px;box-shadow:0 16px 38px -6px color-mix(in srgb,#000 16%,transparent)}.hsk-cb-allowance{display:flex;flex-wrap:wrap;gap:6px;margin-block-start:8px;pointer-events:none}@media(min-width:1200px){.hsk-cb-allowance{flex-direction:column;flex-wrap:nowrap;align-items:flex-start;gap:12px;position:absolute;bottom:48px;width:auto;max-width:200px;margin-block-start:0;z-index:10;direction:ltr}.hsk-cb-allowance--right{left:100%!important;right:auto!important;margin-left:28px!important;margin-right:0!important;align-items:flex-start}.hsk-cb-allowance--left{left:auto!important;right:100%!important;margin-right:28px!important;margin-left:0!important;align-items:flex-end}}.hsk-cb-allowance-pill{display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 13px;border-radius:999px;font-family:inherit;font-size:11.5px;font-weight:550;letter-spacing:-.01em;line-height:1;white-space:nowrap;color:var(--hsk-chat-text)!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 68%,transparent)!important;backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%));-webkit-backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%));border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 35%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 8%,transparent)!important;box-shadow:0 4px 18px -2px color-mix(in srgb,#000 14%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent) inset!important;animation:hsk-allowance-in .34s cubic-bezier(.22,1,.36,1) both;transition:all .2s cubic-bezier(.16,1,.3,1);cursor:default}.hsk-cb-allowance-pill:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 82%,transparent)!important;border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 85%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 20px -2px color-mix(in srgb,#000 18%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent) inset!important}.hsk-cb-allowance-pill-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--hsk-primary, #6366f1);opacity:.95}.hsk-cb-allowance-pill-icon svg{width:12.5px;height:12.5px}.hsk-cb-allowance-pill-label{font-family:inherit;letter-spacing:-.01em}.hsk-cb-allowance-pill.is-spent{opacity:.5;filter:grayscale(.6)}@keyframes hsk-allowance-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.hsk-cb-allowance-pill{animation:none}}.hsk-cb-onboarding-card .hsk-cb-entlang-opt{padding-inline:2px 0}.hsk-cb-secret-card{display:flex;flex-direction:column;gap:8px;max-width:340px}.hsk-cb-secret-head{display:flex;align-items:center;gap:8px}.hsk-cb-secret-title{flex:1;font-size:13px;font-weight:600;color:var(--hsk-chat-text, #111)}.hsk-cb-secret-timer{font-size:11px;font-variant-numeric:tabular-nums;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-secret-dismiss{display:grid;place-items:center;width:24px;height:24px;padding:0;font-size:15px;line-height:1;color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border:0;border-radius:50%;cursor:pointer}.hsk-cb-secret-key{display:flex;align-items:center;gap:10px;width:100%;padding:8px 8px 8px 14px;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent);cursor:pointer}.hsk-cb-secret-key code{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;text-align:start;color:var(--hsk-chat-text, #111)}.hsk-cb-secret-copy{display:inline-flex;align-items:center;gap:5px;flex-shrink:0;padding:5px 12px;font-size:12px;font-weight:600;color:#fff;background:var(--hsk-primary, #ff6a33);border-radius:999px}.hsk-cb-secret-hint{font-size:11px;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-swatch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px;max-width:460px;margin-top:10px}.hsk-cb-swatch{display:flex;flex-direction:column;gap:2px;padding:0 0 8px;text-align:start;background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .03));border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border-radius:14px;overflow:hidden;cursor:pointer;animation:hsk-msg-in .25s ease-out both;transition:transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s ease}.hsk-cb-swatch--target{cursor:default;background:transparent;border-style:dashed;border-color:color-mix(in srgb,var(--hsk-chat-text, #111) 28%,transparent)}.hsk-cb-swatch--target .hsk-cb-swatch-name{color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-swatch:not(.hsk-cb-swatch--target):hover{transform:translateY(-2px);box-shadow:0 10px 24px -12px color-mix(in srgb,#000 35%,transparent)}.hsk-cb-swatch-chip{display:block;aspect-ratio:1 / .8;margin-bottom:6px;box-shadow:inset 0 -1px color-mix(in srgb,#000 8%,transparent)}.hsk-cb-swatch-name{padding:0 10px;font-size:12px;font-weight:600;line-height:1.3;color:var(--hsk-chat-text, #111);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-cb-swatch-code{padding:0 10px;font-size:11px;font-variant-numeric:tabular-nums;letter-spacing:.02em;color:var(--hsk-chat-muted, #6b7280)}@media(prefers-reduced-motion:reduce){.hsk-cb-swatch,.hsk-cb-swatch:hover{animation:none;transform:none}}.hsk-gallery-cover{position:relative;display:block;width:100%;border:0;padding:0;cursor:pointer;background:transparent}.hsk-gallery-cover img{width:100%;height:100%;object-fit:cover}.hsk-gallery-count{position:absolute;bottom:6px;right:6px;padding:3px 7px;border-radius:10px;background:#000000b8;color:#fff;font-size:11px}.hsk-gallery-cover:focus-visible{outline:2px solid var(--hsk-primary,#ff6a33);outline-offset:3px}.hsk-cb-layout-toggle{gap:7px;height:32px;min-height:32px;padding:0 10px 0 5px;box-sizing:border-box}.hsk-cb-layout-toggle:focus-visible{outline:2px solid var(--hsk-primary, #007aff);outline-offset:3px}.hsk-cb-layout-track{display:block;position:relative;width:32px;height:20px;border-radius:20px;background:var(--hsk-chat-ai-bg, #ddd);transition:background-color .32s ease}.hsk-cb-layout-thumb{position:absolute;inset-block-start:3px;inset-inline-start:3px;display:grid;place-items:center;width:14px;height:14px;border-radius:50%;background:#fff;color:#454545;box-shadow:0 1px 4px #0003;transition:inset-inline-start .38s cubic-bezier(.22,1,.36,1),scale .18s ease}.hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-track{background:var(--hsk-primary, #007aff)}.hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-thumb{inset-inline-start:15px}.hsk-cb-layout-toggle:active .hsk-cb-layout-thumb{scale:1.12 .92}.hsk-cb-speaker-label{display:none}[data-hsk-layout=wide] .hsk-cb-speaker-label{display:block;margin-block:12px 6px;font-size:11px;font-weight:650;color:var(--hsk-chat-muted, #71717a)}[data-hsk-layout=wide] .hsk-cb-ai-text{width:100%!important;max-width:100%;box-sizing:border-box;padding:0;border-radius:0;background:transparent;box-shadow:none;border:0;color:var(--hsk-chat-text, #111827);line-height:1.65}[data-hsk-layout=wide] .hsk-cb-ai-text:before,[data-hsk-layout=wide] .hsk-cb-ai-text:after{display:none}[data-hsk-layout=wide] .hsk-cb-ai-content{gap:12px}@media(prefers-reduced-motion:reduce){.hsk-cb-layout-track,.hsk-cb-layout-thumb{transition:none}}.hsk-cb-dock-layout{display:flex;justify-content:flex-end;padding:10px 0 2px}.hsk-cb-dock-layout .hsk-cb-layout-toggle{min-height:40px}[data-hsk-theme][data-hsk-layout=wide] .hsk-cb-ai-text{background:transparent!important;color:var(--hsk-chat-text, #111827)!important}.hsk-cb-rail-pair{display:flex;align-items:center;gap:8px}[data-hsk-layout=wide] .hsk-cb-think{margin-bottom:6px}[data-hsk-theme] .hsk-cb-dock-layout .hsk-cb-layout-toggle{background:var(--hsk-grid-bg)!important;color:var(--hsk-chat-muted)!important;border:none!important;box-shadow:none!important}[data-hsk-layout=wide] .hsk-cb-think+.hsk-cb-ai-content>.hsk-cb-ai-text:first-child{padding-top:0;margin-top:0}[data-hsk-layout=wide] .hsk-cb-think{margin-bottom:4px}.hsk-tapback-group.is-wide .hsk-tapback-tail{display:none}[data-hsk-theme] .hsk-cb-layout-toggle,[data-hsk-theme] .hsk-cb-dock-layout .hsk-cb-layout-toggle{background:transparent!important;border:none!important;box-shadow:none!important;color:var(--hsk-chat-text)!important}.hsk-cb-layout-track{background:color-mix(in srgb,currentColor 12%,transparent)}.hsk-cb-dock-layout{padding-top:4px}.hsk-cb-dock-layout .hsk-cb-layout-toggle{min-height:32px}.hsk-cb-dock-layout{align-items:center;justify-content:space-between;gap:12px}.hsk-cb-layout-label{padding-inline-start:12px;font-size:11px;font-weight:500;color:var(--hsk-chat-muted);opacity:.75}.hsk-cb-layout-label{text-transform:uppercase;letter-spacing:.07em}[data-hsk-theme] .hsk-cb-layout-toggle,[data-hsk-theme] .hsk-cb-dock-layout .hsk-cb-layout-toggle{padding:0 12px;background:var(--hsk-pill-bg)!important}.hsk-cb-layout-icon{display:inline-flex;align-items:center}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true]{color:var(--hsk-primary)!important}.hsk-cb-topbar-ooze-menu .hsk-cb-dock-layout{margin-inline:7px}.hsk-cb-topbar-ooze-menu .hsk-cb-layout-label{color:var(--hsk-chat-muted);opacity:.38;font-size:9px;font-weight:600;letter-spacing:.14em;padding-inline-start:0}.hsk-cb-layout-track{flex-shrink:0}[data-hsk-theme] .hsk-cb-layout-track{background:var(--hsk-grid-bg)}[data-hsk-theme] .hsk-cb-layout-thumb{background:var(--hsk-chat-bg);color:var(--hsk-chat-text)}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-track{background:var(--hsk-active-bg)}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-thumb{background:var(--hsk-on-active);color:var(--hsk-active-bg)}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true]{color:var(--hsk-chat-text)!important}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-block{display:grid;grid-template-columns:14px minmax(0,1fr);column-gap:8px;row-gap:4px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:100%;justify-content:center;min-width:0;padding-inline:6px}.hsk-cb-topbar-ooze-menu .hsk-cb-dock-layout{grid-column:2;margin:0;padding:0 0 2px;gap:6px}.hsk-cb-topbar-ooze-menu .hsk-cb-layout-label{font-size:7px;letter-spacing:.06em}@keyframes hsk-card-in{0%{opacity:0;transform:scale(.96) translateY(-12px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes hsk-bar{0%{background-position:200% 0}to{background-position:-200% 0}}@media(max-width:768px){.hsk-cb-overlay{--hsk-font-size: var(--hsk-mobile-font-size, 14px) !important;position:fixed!important;inset:0!important;width:100vw!important;height:100%!important;height:var(--hsk-vvh, 100dvh)!important;min-height:0!important;z-index:2147483647!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;overscroll-behavior:contain!important;background:var(--hsk-chat-bg, #0a0a0a)!important;box-sizing:border-box!important}.hsk-cb-panel{position:relative!important;height:100%!important;width:100%!important;max-width:100%!important;margin:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;border-radius:0!important;background:var(--hsk-chat-bg, #0a0a0a)!important;box-sizing:border-box!important}.hsk-cb-main{flex:1 1 auto!important;height:100%!important;min-height:0!important;display:flex!important;flex-direction:column!important;justify-content:space-between!important;overflow:hidden!important;background:var(--hsk-chat-bg, #0a0a0a)!important;box-sizing:border-box!important}.hsk-cb-topbar{padding:14px 14px 8px!important}.hsk-cb-msgs{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;padding:10px 14px 0!important}.hsk-cb-empty{flex:1 0 auto!important;justify-content:center!important;padding:16px 4px!important}.hsk-cb-input-box{grid-template-columns:auto 1fr auto auto}.hsk-cb-input-box>.hsk-cb-attach-btn{display:none}.hsk-cb-input-box>.hsk-cb-voice-mode-btn{display:none}.hsk-cb-input-box>.hsk-cb-field{grid-column:2}.hsk-cb-input-box>.hsk-cb-voice-mode-btn{grid-column:3}.hsk-cb-input-box>.hsk-cb-send,.hsk-cb-input-box>.hsk-chat-send{grid-column:4}.hsk-cb-tools-toggle{display:flex;grid-column:1;grid-row:1;width:36px;height:36px;align-items:center;justify-content:center;flex-shrink:0;padding:0;border:none;border-radius:12px;background:var(--hsk-chat-subtle, rgba(0,0,0,.045));color:var(--hsk-chat-muted, #6b7280);cursor:pointer;transition:transform .26s cubic-bezier(.34,1.56,.64,1),background-color .2s ease}.hsk-cb-tools-toggle--open{transform:rotate(45deg);background:var(--hsk-chat-divide, rgba(0,0,0,.09))}.hsk-cb-toolsheet-wrap,.hsk-cb-toolsheet-scrim{display:block}.hsk-cb-toolsheet-item{display:flex}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-tools-toggle{grid-row:2}.hsk-cb-ai-msg--inline{display:block!important;padding-inline-end:34px}.hsk-cb-hello-wrap{align-items:center!important;text-align:center!important;gap:4px!important;width:100%!important;max-width:min(520px,100%)!important;padding-inline:16px!important;box-sizing:border-box!important;margin-inline:auto!important}.hsk-cb-ink-skeleton{align-items:center!important}.hsk-cb-hello{font-size:clamp(21px,5.8vw,30px)!important;font-weight:600!important;line-height:1.25!important;letter-spacing:-.02em!important;color:var(--hsk-chat-muted, #8b8b8f)!important;text-align:center!important;text-wrap:balance;max-width:100%!important;overflow-wrap:break-word}.hsk-cb-hello-lead,.hsk-cb-hello-ask{font-size:14px!important;font-weight:400!important;line-height:1.45!important;text-align:center!important;text-wrap:balance;max-width:100%!important;overflow-wrap:break-word;color:color-mix(in srgb,var(--hsk-chat-muted, #8b8b8f) 78%,transparent)!important}.hsk-cb-hello-lead{font-size:14px!important;margin-top:4px!important}.hsk-cb-lang-chips{justify-content:center!important;width:100%!important;gap:8px!important;margin:12px 0 6px!important}.hsk-cb-lang-chips-hint{width:100%!important;justify-content:center!important;margin-top:6px!important;margin-inline-start:0!important}.hsk-cb-onboarding-head{justify-content:flex-start!important;margin-bottom:12px!important}.hsk-cb-onboarding-card .hsk-cb-hello-wrap{align-items:flex-start!important;text-align:start!important}.hsk-cb-onboarding-card .hsk-cb-hello,.hsk-cb-onboarding-card .hsk-cb-hello-lead,.hsk-cb-onboarding-card .hsk-cb-hello-ask,.hsk-cb-onboarding-card .hsk-cb-hello-hint{text-align:start!important}.hsk-cb-onboarding-card .hsk-cb-lang-chips,.hsk-cb-onboarding-card .hsk-cb-lang-chips-hint{justify-content:flex-start!important}.hsk-cb-doodles{opacity:.92!important}.hsk-cb-input-wrap{margin-top:auto!important;flex-shrink:0!important;--hsk-composer-pad-top: 8px;--hsk-composer-pad-x: 14px;padding:8px 14px!important;padding-bottom:max(12px,env(safe-area-inset-bottom))!important;background:var(--hsk-chat-bg, #0a0a0a)!important;position:relative!important;z-index:10!important}.hsk-cb-attach-btn,.hsk-cb-send,.hsk-chat-send{width:32px!important;height:32px!important;border-radius:8px!important}.hsk-cb-attach-btn svg,.hsk-cb-send svg,.hsk-chat-send svg{width:15px!important;height:15px!important}.hsk-cb-input-box{padding:10px 10px 10px 14px}.hsk-cb-user-bubble{max-width:85%}}.hsk-table-wrapper{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:12px 0 8px;width:100%;max-width:100%;min-width:0;border-radius:0;padding:0 0 6px;background:transparent;box-shadow:none;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:var(--hsk-chat-divide, rgba(0, 0, 0, .2)) transparent;cursor:grab;user-select:auto;transition:mask-image .15s ease,-webkit-mask-image .15s ease}.hsk-table-wrapper.is-dragging{cursor:grabbing;user-select:none}.hsk-table-wrapper::-webkit-scrollbar{height:5px}.hsk-table-wrapper::-webkit-scrollbar-track{background:transparent}.hsk-table-wrapper::-webkit-scrollbar-thumb{background:var(--hsk-chat-divide, rgba(0, 0, 0, .25));border-radius:4px}.hsk-table-wrapper::-webkit-scrollbar-thumb:hover{background:var(--hsk-chat-muted, rgba(0, 0, 0, .5))}.hsk-cb-ai-text .hsk-markdown-p{margin:0 0 10px}.hsk-cb-ai-text .hsk-markdown-p:last-child{margin-bottom:0}.hsk-cb-ai-text .hsk-markdown-list{margin:0 0 10px;padding-inline-start:1.2em}.hsk-cb-ai-text .hsk-markdown-list:last-child{margin-bottom:0}.hsk-cb-ai-text .hsk-markdown-ul{list-style:disc outside}.hsk-cb-ai-text .hsk-markdown-ol{list-style:decimal outside}.hsk-cb-ai-text .hsk-markdown-list li{margin:0 0 7px;padding-left:3px;line-height:1.5}.hsk-cb-ai-text .hsk-markdown-list li:last-child{margin-bottom:0}.hsk-cb-ai-text .hsk-markdown-list li::marker{color:var(--hsk-primary, #ff6a33)}.hsk-cb-ai-text .hsk-markdown-h1,.hsk-cb-ai-text .hsk-markdown-h2,.hsk-cb-ai-text .hsk-markdown-h3{margin:14px 0 7px;font-weight:650;line-height:1.3;letter-spacing:-.01em}.hsk-cb-ai-text .hsk-markdown-h1{font-size:1.09em}.hsk-cb-ai-text .hsk-markdown-h2{font-size:1.03em}.hsk-cb-ai-text .hsk-markdown-h3{font-size:1em}.hsk-cb-ai-text>:first-child{margin-top:0}.hsk-markdown-table{width:max-content;min-width:100%;border-collapse:collapse;border-spacing:0;text-align:start;font-size:13px;background:transparent;margin:0;border:none;font-variant-numeric:tabular-nums}.hsk-markdown-table th{padding:8px 16px 6px;vertical-align:bottom;line-height:1.35;font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap;color:var(--hsk-chat-muted, rgba(0, 0, 0, .55));border-bottom:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .1));background:transparent!important}.hsk-markdown-table td{padding:8px 16px;vertical-align:middle;line-height:1.45;font-size:13px;white-space:nowrap;color:var(--hsk-chat-text, inherit);border-bottom:.5px solid var(--hsk-chat-divide, rgba(0, 0, 0, .06));background:transparent!important}.hsk-markdown-table th:first-child,.hsk-markdown-table td:first-child{padding-inline-start:0;font-weight:590;white-space:normal;max-width:280px;min-width:150px;line-height:1.35}.hsk-markdown-table th:last-child,.hsk-markdown-table td:last-child{padding-inline-end:0}.hsk-markdown-table tbody tr:last-child td{border-bottom:none}.hsk-markdown-table td *{color:inherit}.hsk-markdown-table .hsk-markdown-link{display:inline-flex;align-items:center;padding:2px 8px;background-color:var(--hsk-chat-source-bg, rgba(0, 0, 0, .04));border:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .08));color:var(--hsk-primary, #ff6a33);font-size:12px;font-weight:500;border-radius:6px;text-decoration:none!important;margin:2px 0;transition:opacity .15s ease}.hsk-markdown-table .hsk-markdown-link:hover{opacity:.8}@media(prefers-color-scheme:dark){.hsk-markdown-table th{color:var(--hsk-chat-muted, rgba(255, 255, 255, .5));border-bottom-color:var(--hsk-chat-divide, rgba(255, 255, 255, .1))}.hsk-markdown-table td{color:var(--hsk-chat-text, #f0efed);border-bottom-color:var(--hsk-chat-divide, rgba(255, 255, 255, .06))}}.hsk-markdown-link{color:var(--hsk-primary, #ff6a33);text-decoration:underline;text-underline-offset:2px}.hsk-markdown-code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace,var(--hsk-font);font-size:.85em;background-color:#80808026;padding:.2em .4em;border-radius:var(--hsk-border-radius, 0px);color:inherit;word-break:break-word}.hsk-markdown-img-block{margin:8px 0;line-height:0}.hsk-markdown-img{display:block;max-width:100%;width:auto;max-height:220px;border-radius:10px;box-shadow:0 2px 12px #0000002e;object-fit:cover;background:#80808014}.hsk-chat-widget ::-webkit-scrollbar,.hsk-sp-card ::-webkit-scrollbar,.hsk-cb-msgs ::-webkit-scrollbar,.hsk-sp-details-pane ::-webkit-scrollbar,.hsk-sp-results ::-webkit-scrollbar,.hsk-chat-messages ::-webkit-scrollbar{width:3px;height:3px}.hsk-chat-widget ::-webkit-scrollbar-track,.hsk-sp-card ::-webkit-scrollbar-track,.hsk-cb-msgs ::-webkit-scrollbar-track,.hsk-sp-details-pane ::-webkit-scrollbar-track,.hsk-sp-results ::-webkit-scrollbar-track,.hsk-chat-messages ::-webkit-scrollbar-track{background:transparent}.hsk-chat-widget ::-webkit-scrollbar-thumb,.hsk-sp-card ::-webkit-scrollbar-thumb,.hsk-cb-msgs ::-webkit-scrollbar-thumb,.hsk-sp-details-pane ::-webkit-scrollbar-thumb,.hsk-sp-results ::-webkit-scrollbar-thumb,.hsk-chat-messages ::-webkit-scrollbar-thumb{background:#0000000f;border-radius:99px;transition:background .2s ease}.hsk-chat-widget ::-webkit-scrollbar-thumb:hover,.hsk-cb-msgs ::-webkit-scrollbar-thumb:hover{background:#00000026}@media(prefers-color-scheme:dark){.hsk-chat-widget ::-webkit-scrollbar-thumb,.hsk-sp-card ::-webkit-scrollbar-thumb,.hsk-cb-msgs ::-webkit-scrollbar-thumb,.hsk-sp-details-pane ::-webkit-scrollbar-thumb,.hsk-sp-results ::-webkit-scrollbar-thumb,.hsk-chat-messages ::-webkit-scrollbar-thumb{background:#ffffff14}.hsk-chat-widget ::-webkit-scrollbar-thumb:hover,.hsk-cb-msgs ::-webkit-scrollbar-thumb:hover{background:#fff3}}.hsk-cb-phone-form{display:flex;flex-direction:column;gap:8px;margin-top:8px}.hsk-cb-phone-label{font-size:.875rem;color:var(--hsk-chat-text, #111);margin:0}.hsk-cb-phone-input{width:100%;box-sizing:border-box;padding:8px 12px;border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.12));border-radius:var(--hsk-border-radius, 0px);background:var(--hsk-chat-input-bg, rgba(0,0,0,.04));color:var(--hsk-chat-text, #111);font-size:.9rem;outline:none;transition:border-color .15s}.hsk-cb-phone-input::placeholder{color:var(--hsk-chat-muted, #888)}.hsk-cb-phone-input:focus{border-color:var(--hsk-primary, #ff6a33)}.hsk-cb-phone-submit{align-self:flex-start;padding:8px 16px;border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.12));border-radius:var(--hsk-border-radius, 0px);background:transparent;color:var(--hsk-chat-text, #111);font-size:.875rem;font-weight:500;cursor:pointer;transition:background .15s,border-color .15s,color .15s}.hsk-cb-phone-submit:hover{border-color:var(--hsk-primary, #ff6a33);color:var(--hsk-primary, #ff6a33)}.hsk-cb-main{flex:1;min-width:0;display:flex;flex-direction:column;height:100%;overflow:hidden}@keyframes hsk-fade-in-up{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.hsk-action-pills{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;animation:hsk-fade-in-up .35s ease .1s both}.hsk-action-pill{display:inline-flex;align-items:center;gap:5px;padding:6px 12px;border-radius:20px;border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.12));background:var(--hsk-pill-bg, rgba(255,255,255,.8));color:var(--hsk-chat-text, #1f1f1f);font-size:12px;font-weight:500;cursor:pointer;font-family:inherit;transition:all .15s;white-space:nowrap;backdrop-filter:blur(4px)}.hsk-action-pill:hover:not(:disabled){border-color:var(--hsk-primary, #ff6a33);background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 8%,transparent);color:var(--hsk-primary, #ff6a33);transform:translateY(-1px);box-shadow:0 2px 8px #00000014}.hsk-action-pill:disabled{opacity:.4;cursor:not-allowed}.hsk-pill-emoji{font-size:13px;line-height:1}@media(prefers-color-scheme:dark){.hsk-action-pill{--hsk-pill-bg: rgba(40,40,42,.85);border-color:#ffffff1a;color:var(--hsk-chat-text, #e8eaed)}}[data-hsk-theme=dark] .hsk-action-pill{--hsk-pill-bg: rgba(40,40,42,.85);border-color:#ffffff1a;color:var(--hsk-chat-text, #e8eaed)}.kiku-voice-btn:hover{background:var(--hsk-hover-bg, rgba(0,0,0,.06));color:var(--hsk-primary, #6c47ff)}@keyframes kiku-voice-pulse{0%{transform:scale(1);opacity:1}to{transform:scale(1.6);opacity:0}}.kiku-style-tag{display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:99px;background:var(--hsk-primary-alpha, rgba(108,71,255,.1));color:var(--hsk-primary, #6c47ff);font-size:11px;font-weight:500;white-space:nowrap}.kiku-voice-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:none;background:transparent;color:var(--hsk-text-muted, #888);cursor:pointer;transition:color .2s,background .2s;flex-shrink:0}.kiku-voice-btn:hover{background:var(--hsk-hover-bg, rgba(0,0,0,.06));color:var(--hsk-primary, #ff6a33)}.kiku-voice-btn--active{color:#ef4444;background:#ef44441a}.kiku-voice-btn:disabled{opacity:.4;cursor:not-allowed}.kiku-voice-ripple{position:absolute;inset:-4px;border-radius:50%;border:2px solid #ef4444;animation:kiku-voice-pulse 1.2s ease-out infinite;pointer-events:none}@keyframes kiku-voice-pulse{0%{transform:scale(1);opacity:1}to{transform:scale(1.7);opacity:0}}.kiku-style-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}.kiku-style-tag{display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:99px;background:#ff6a331a;color:var(--hsk-primary, #ff6a33);font-size:11px;font-weight:500;white-space:nowrap}.hsk-kiku-badge{display:inline-flex;align-items:center;gap:3px;font-size:13px;font-weight:700;letter-spacing:-.01em;color:#fff;background:#ffffff47;border:1px solid rgba(255,255,255,.45);padding:2px 8px;border-radius:8px;margin-inline-end:8px;vertical-align:middle;position:relative;top:-1px;box-shadow:0 1px 3px #0000001f}.hsk-markdown-img,.hsk-cb-user-img-thumb,.hsk-cb-source .hsk-cb-src-imgwrap img{cursor:zoom-in}.hsk-lightbox{position:fixed;inset:0;z-index:999999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 84%,transparent);backdrop-filter:blur(28px) saturate(180%);-webkit-backdrop-filter:blur(28px) saturate(180%);display:flex;align-items:center;justify-content:center;padding:24px;animation:hsk-lightbox-in .15s ease-out both;cursor:zoom-out;user-select:none}@keyframes hsk-lightbox-in{0%{opacity:0}to{opacity:1}}.hsk-lightbox-top{position:absolute;top:18px;left:20px;right:68px;display:flex;align-items:center;z-index:2;pointer-events:none}.hsk-lightbox-title{font-size:14px;font-weight:600;letter-spacing:-.01em;color:var(--hsk-chat-text, #111);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:6px 14px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 80%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 2px 10px #0000000f}.hsk-lightbox-stage{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%;max-width:100%;max-height:100%;cursor:default}.hsk-lightbox-content{display:flex;flex-direction:column;align-items:center;justify-content:center;max-width:min(92vw,1000px);max-height:calc(100vh - 120px);position:relative}.hsk-lightbox-img{max-width:100%;max-height:min(78vh,760px);width:auto;height:auto;object-fit:contain;border-radius:12px;box-shadow:0 24px 64px -16px #0000005c;cursor:default;transition:transform .18s ease-out}.hsk-lightbox-caption{margin-top:12px;font-size:13px;font-weight:500;line-height:1.4;color:var(--hsk-chat-text, #111);text-align:center;padding:5px 14px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 75%,transparent);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);box-shadow:0 2px 8px #0000000d}.hsk-lightbox-close{position:absolute;top:16px;right:16px;width:38px;height:38px;border-radius:50%;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 78%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);color:var(--hsk-chat-text, #111);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .15s ease;z-index:3;box-shadow:0 2px 8px #00000014}.hsk-lightbox-close:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 95%,transparent);transform:scale(1.05)}.hsk-lightbox-nav{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:50%;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 12%,transparent);background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 78%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);color:var(--hsk-chat-text, #111);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .16s ease;z-index:3;box-shadow:0 4px 16px #0000001f}.hsk-lightbox-nav:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 95%,transparent);transform:translateY(-50%) scale(1.08);box-shadow:0 6px 20px #0000002e}.hsk-lightbox-nav:active{transform:translateY(-50%) scale(.96)}.hsk-lightbox-nav--prev{left:20px}.hsk-lightbox-nav--next{right:20px}.hsk-lightbox-bottom{position:absolute;bottom:22px;left:50%;transform:translate(-50%);display:flex;align-items:center;z-index:2;pointer-events:none}.hsk-lightbox-counter{padding:6px 16px;border-radius:999px;font-size:13px;font-weight:600;letter-spacing:.03em;color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 78%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 4px 14px #00000014}@media(max-width:600px){.hsk-lightbox-nav--prev{left:8px}.hsk-lightbox-nav--next{right:8px}.hsk-lightbox-content{max-width:100%}}.hsk-cb-viz{margin-top:10px;animation:hsk-msg-in .2s ease-out both}.hsk-cb-viz img,.hsk-cb-viz video{width:100%;max-width:420px;border-radius:8px;display:block}.hsk-cb-viz-disclaimer{max-width:420px;margin-top:4px;font-size:11px;line-height:1.4;color:var(--hsk-chat-muted, #9aa0a6)}.hsk-cb-calc-disclaimer{max-width:440px;margin-top:8px;padding:8px 12px;font-size:11.5px;line-height:1.45;color:var(--hsk-chat-muted, rgba(255, 255, 255, .65));background:var(--hsk-chat-callout-bg, rgba(255, 255, 255, .04));border:1px solid var(--hsk-border-subtle, rgba(255, 255, 255, .08));border-radius:8px}[data-hsk-theme=light] .hsk-cb-calc-disclaimer{color:#0009;background:#00000008;border-color:#00000014}.hsk-cb-stale{max-width:420px;margin-top:8px;padding:8px 10px;border:1px solid rgba(220,38,38,.35);border-left-width:3px;border-radius:6px;background:#dc26260f}.hsk-cb-stale-title{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#dc2626}.hsk-cb-stale-item{margin-top:3px;font-size:12px;line-height:1.45;color:var(--hsk-chat-text, #202124)}.hsk-cb-stale-reason{color:var(--hsk-chat-muted, #9aa0a6)}.hsk-cb-viz-imgwrap{position:relative;display:inline-block;max-width:100%}.hsk-cb-viz-mark{position:absolute;right:10px;bottom:10px;display:inline-flex;align-items:center;gap:6px;padding:8px 14px;font-size:13px;font-weight:600;color:#fff;background:#0000009e;backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,.35);border-radius:999px;cursor:pointer;transition:background .15s}.hsk-cb-viz-mark:hover{background:var(--hsk-primary, #ff6a33);border-color:transparent}.hsk-markup-overlay{position:fixed;inset:0;z-index:999999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 84%,transparent);backdrop-filter:blur(28px) saturate(180%);-webkit-backdrop-filter:blur(28px) saturate(180%);display:flex;align-items:center;justify-content:center;padding:12px;animation:hsk-lightbox-in .15s ease-out both}.hsk-markup{height:100%;box-sizing:border-box;padding-top:max(32px,env(safe-area-inset-top));padding-bottom:max(24px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:12px;width:100%;max-height:100%;overflow-y:auto}.hsk-markup-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.hsk-markup-title{font-size:12px;font-weight:500;line-height:1.4;color:color-mix(in srgb,var(--hsk-chat-text, #111) 55%,transparent)}.hsk-markup-cancel{flex-shrink:0;padding:6px 12px;font-size:12px;font-weight:600;color:var(--hsk-chat-text, #111);border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 6px 18px -8px color-mix(in srgb,#000 22%,transparent);cursor:pointer}.hsk-markup-cancel:hover{background:color-mix(in srgb,var(--hsk-chat-text, #111) 16%,transparent)}.hsk-markup-stage{display:flex;flex:1;min-height:0;align-items:center;justify-content:center}.hsk-markup-canvas-wrap{position:relative;max-width:100%}.hsk-markup-canvas{display:block;max-width:100%;max-height:calc(100vh - 130px);box-shadow:0 18px 50px -12px color-mix(in srgb,#000 30%,transparent);border-radius:var(--hsk-border-radius, 0px);touch-action:none}.hsk-markup-canvas--pen,.hsk-markup-canvas--eraser{cursor:crosshair}.hsk-markup-pinlabel{position:absolute;display:flex;align-items:center;gap:4px;max-width:calc(100% - 16px);padding:4px 4px 4px 12px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 78%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 10px 28px -10px color-mix(in srgb,#000 40%,transparent)}.hsk-markup-pinlabel input{min-width:0;max-width:100%;padding:6px 0;font-size:13px;color:var(--hsk-chat-text, #111);background:transparent;border:0;outline:none}.hsk-markup-pinlabel input::placeholder{color:color-mix(in srgb,var(--hsk-chat-text, #111) 45%,transparent)}.hsk-markup-pinlabel button{flex-shrink:0;display:grid;place-items:center;width:26px;height:26px;padding:0;font-size:15px;line-height:1;color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border:0;border-radius:50%;cursor:pointer}.hsk-markup-loading,.hsk-markup-error{padding:40px 16px;font-size:13px;color:color-mix(in srgb,var(--hsk-chat-text, #111) 70%,transparent);text-align:center}.hsk-markup-tools{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin-top:auto}.hsk-markup-tool{flex-shrink:0;white-space:nowrap;padding:8px 14px;font-size:12px;font-weight:600;color:var(--hsk-chat-text, #111);border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 6px 18px -8px color-mix(in srgb,#000 22%,transparent);cursor:pointer}.hsk-markup-tool:hover:not(:disabled){background:color-mix(in srgb,var(--hsk-chat-text, #111) 16%,transparent)}.hsk-markup-tool--on{color:#fff;background:var(--hsk-primary, #ff6a33);border-color:transparent}.hsk-markup-tool--on:hover:not(:disabled){background:var(--hsk-primary, #ff6a33)}.hsk-markup-tool:disabled{opacity:.4;cursor:default}.hsk-markup-go{flex-shrink:0;padding:8px 22px;font-size:13px;font-weight:600;color:#fff;background:var(--hsk-primary, #ff6a33);border:none;border-radius:999px;box-shadow:0 6px 18px -8px color-mix(in srgb,var(--hsk-primary, #ff6a33) 60%,transparent);cursor:pointer}.hsk-markup-go:hover:not(:disabled){opacity:.9}.hsk-markup-go:disabled{opacity:.45;cursor:default}@media(max-width:640px){.hsk-markup-head{flex-direction:column-reverse;align-items:flex-start}.hsk-markup-cancel{align-self:flex-end}}.hsk-cb-kimgs{margin-top:10px;display:flex;flex-direction:column;gap:10px;animation:hsk-msg-in .2s ease-out both}.hsk-cb-kimg-grid{display:flex;flex-wrap:wrap;gap:6px}.hsk-cb-kimg{width:132px;height:132px;object-fit:cover;border-radius:8px;cursor:zoom-in;border:1px solid var(--hsk-chat-border, rgba(0, 0, 0, .08))}.hsk-cb-kimg:only-child{width:100%;max-width:320px;height:auto}.hsk-cb-kimg-caption{margin-top:4px;font-size:11px;line-height:1.4;color:var(--hsk-chat-muted, #9aa0a6)}.hsk-cb-panel[data-script=nonlatin][data-host-font=gap]{--hsk-font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif}.hsk-cb-panel[data-script=nonlatin],.hsk-cb-panel[data-script=nonlatin] *{letter-spacing:normal;font-family:var(--hsk-font)}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-lead,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-ask,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-user-bubble,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-chip,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-topbar-btn,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-textarea,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-entlang-opt-title,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-entlang-opt-note,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-list li,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-h1,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-h2,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-h3,.hsk-cb-panel[data-script=nonlatin] .hsk-markdown-table th,.hsk-cb-panel[data-script=nonlatin] .hsk-markdown-table td{line-height:1.9}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-voice-error{font-size:12px;line-height:1.7;max-width:min(92%,520px);margin-left:auto;margin-right:auto}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-msg-action{height:16px;padding:1px 6.5px;font-size:9.5px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-msg-action .hsk-cb-msg-action-label{font-size:9.5px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-user-footer,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-footer{min-height:16px}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-sent-status,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-failed-notice{font-size:10px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello{font-size:clamp(20px,3.4vw,26px);line-height:1.5;text-wrap:balance;overflow-wrap:break-word}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-ask{font-size:15px;line-height:1.75}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-wrap{max-width:100%;min-width:0}.hsk-cb-panel[data-script=nonlatin] .hsk-cascade__w{white-space:normal}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-hello,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-hello-lead,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-hello-ask,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-user-bubble,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-chip,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-topbar-btn,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-textarea,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-entlang-opt-title,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-entlang-opt-note,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-list li,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-h1,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-h2,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-h3,.hsk-cb-panel[data-nastaliq=true] .hsk-markdown-table th,.hsk-cb-panel[data-nastaliq=true] .hsk-markdown-table td{line-height:2.2}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-voice-error{font-size:13px;line-height:2;max-width:min(92%,540px);margin-left:auto;margin-right:auto}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-msg-action{height:16px;padding:1px 6.5px;font-size:9px;line-height:1}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-msg-action .hsk-cb-msg-action-label{font-size:9px;line-height:1}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-user-footer,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-footer{min-height:16px}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-sent-status,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-failed-notice{font-size:9.5px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-chip{font-size:14px}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-topbar-btn{height:auto;min-height:34px;padding:5px 14px}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-field{--hsk-input-line-height: 1.9}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-textarea{min-height:34px}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-field{--hsk-input-line-height: 2.2}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-user-bubble,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text{overflow-wrap:break-word;word-break:normal}.hsk-cb-viz-broken{font-size:13px;color:var(--hsk-chat-muted, #71717a);padding:14px 16px;border:1px dashed var(--hsk-chat-divide, rgba(0, 0, 0, .12));border-radius:12px}.hsk-cb-voice-mode-btn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;background:transparent;border:1px solid transparent;border-radius:12px;color:var(--hsk-chat-muted, #71717a);cursor:pointer;transition:all .2s cubic-bezier(.34,1.56,.64,1);font-family:inherit}.hsk-cb-voice-mode-btn:hover:not(:disabled){border-color:color-mix(in srgb,var(--hsk-primary, #ff6a33) 25%,transparent);color:var(--hsk-primary, #ff6a33);background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 8%,transparent);transform:translateY(-1px)}.hsk-cb-voice-mode-btn:disabled{opacity:.35;cursor:not-allowed}.hsk-cb-panel[data-script=nonlatin] .hsk-animated-placeholder[data-fit="2"]{--hsk-ph-font-size: 13.5px}.hsk-cb-panel[data-script=nonlatin] .hsk-animated-placeholder[data-fit="3"]{--hsk-ph-font-size: 12px}.hsk-cb-panel[data-nastaliq=true] .hsk-animated-placeholder[data-fit="1"]{--hsk-ph-font-size: 15px}.hsk-cb-panel[data-nastaliq=true] .hsk-animated-placeholder[data-fit="2"]{--hsk-ph-font-size: 13px}.hsk-cb-panel[data-nastaliq=true] .hsk-animated-placeholder[data-fit="3"]{--hsk-ph-font-size: 11.5px}.hsk-cb-panel[data-script=nonlatin] .hsk-animated-placeholder__char{line-height:1.35}.hsk-cb-panel[data-script] .hsk-cb-chrome-loading,.hsk-cb-panel[data-script] .hsk-cb-chrome-loading *{font-family:system-ui,-apple-system,Segoe UI,Roboto,Noto Sans,sans-serif}.hsk-voice-overlay{position:absolute;inset:0;z-index:30;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:clamp(8px,1.4vh,16px);padding:clamp(14px,2.5vh,24px);overflow:hidden;overscroll-behavior:contain;background:var(--hsk-chat-bg, #ffffff);animation:hsk-voice-in .32s cubic-bezier(.2,.8,.2,1);will-change:opacity;contain:paint}.hsk-voice-overlay:before{content:"";position:absolute;inset:0;background:radial-gradient(46% 20% at 50% 92%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 8%,transparent) 0%,transparent 68%);pointer-events:none}.hsk-voice-overlay>*{position:relative}@keyframes hsk-voice-in{0%{opacity:0}to{opacity:1}}.hsk-voice-exit{position:absolute;z-index:2;top:14px;right:14px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;background:transparent;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 14%,transparent);border-radius:999px;color:var(--hsk-chat-muted, #71717a);cursor:pointer;transition:color .18s ease,border-color .18s ease}.hsk-voice-exit:hover{color:var(--hsk-chat-text, #1f1f1f);border-color:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 32%,transparent)}.hsk-voice-new{position:absolute;z-index:2;top:14px;right:58px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;background:transparent;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 14%,transparent);border-radius:999px;color:var(--hsk-chat-muted, #71717a);cursor:pointer;transition:color .18s ease,border-color .18s ease,transform .12s ease}.hsk-voice-new:hover:not(:disabled){color:var(--hsk-chat-text, #1f1f1f);border-color:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 32%,transparent)}.hsk-voice-new:active:not(:disabled){transform:scale(.92)}.hsk-voice-new:disabled{opacity:.4;cursor:default}.hsk-voice-stage{grid-column:2;width:100%;height:clamp(64px,13vh,140px);min-width:0;animation:hsk-composer-to-wave .42s cubic-bezier(.2,.8,.2,1) both}@keyframes hsk-composer-to-wave{0%{opacity:0;translate:0 18px}to{opacity:1;translate:0 0}}@media(prefers-reduced-motion:reduce){.hsk-voice-stage{animation:none}}.hsk-voice-thread{position:relative;z-index:1;flex:1 1 auto;width:min(720px,100%);min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:none;-ms-overflow-style:none;display:flex;flex-direction:column;gap:12px;padding:clamp(46px,8vh,72px) 4px 6px;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 34px,#000 calc(100% - 30px),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 34px,#000 calc(100% - 30px),transparent 100%)}.hsk-voice-turn--live{opacity:.72}.hsk-voice-canvas{display:block;width:100%;height:100%}.hsk-voice-controls{display:grid;grid-template-columns:52px minmax(0,1fr) 52px;align-items:center;gap:12px;flex:none;width:min(640px,100%)}.hsk-voice-controls [data-control=attach]{grid-column:1}.hsk-voice-controls [data-control=mic]{grid-column:3}.hsk-voice-control{display:flex;align-items:center;justify-content:center;width:52px;height:52px;padding:0;background:var(--hsk-surface-2, rgba(255, 255, 255, .95));border:1px solid color-mix(in srgb,var(--hsk-chat-text, #000000) 10%,transparent);border-radius:999px;color:var(--hsk-chat-text, #1f1f1f);cursor:pointer;box-shadow:0 2px 12px #00000014,0 1px 3px #0000000a;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);transition:color .2s ease,border-color .2s ease,background .2s ease,transform .2s cubic-bezier(.16,1,.3,1),box-shadow .2s ease}.hsk-voice-control:hover{transform:scale(1.06);box-shadow:0 4px 18px #0000001f}.hsk-voice-control:active{transform:scale(.92);transition-duration:.08s}.hsk-voice-control--muted{color:var(--hsk-chat-muted, #888888);border-color:color-mix(in srgb,var(--hsk-chat-text, #000000) 12%,transparent);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 85%,transparent);box-shadow:0 1px 4px #0000000a}.hsk-voice-control-icon{display:inline-flex;align-items:center;justify-content:center;z-index:2;transition:transform .2s ease}@media(prefers-reduced-motion:reduce){.hsk-voice-control-icon,.hsk-voice-control--muted{animation:none}}.hsk-voice-stage--connecting{opacity:.4;transition:opacity .25s ease}.hsk-voice-connecting{display:flex;align-items:center;gap:7px;font-family:var(--hsk-font);font-size:13px;color:var(--hsk-chat-muted, #8a8f98);animation:hsk-sent-in .2s ease-out both}.hsk-voice-connecting-dot{width:6px;height:6px;border-radius:999px;background:currentColor;animation:hsk-queued-pulse 1s ease-in-out infinite}@media(prefers-reduced-motion:reduce){.hsk-voice-connecting-dot{animation:none;opacity:.7}}.hsk-voice-error{font-family:var(--hsk-font);font-size:.85rem;color:#e5484d;text-align:center}@media(prefers-reduced-motion:reduce){.hsk-voice-overlay{animation:none}}.hsk-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.hsk-voice-picker{position:absolute;z-index:3;top:14px;left:14px;display:flex;flex-direction:column;width:auto;height:36px;overflow:hidden;border-radius:18px;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 10%,transparent);background:linear-gradient(180deg,#ffffff1f,#fff0 60%),color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 58%,transparent);backdrop-filter:blur(20px) saturate(160%);-webkit-backdrop-filter:blur(20px) saturate(160%);box-shadow:inset 0 1px #ffffff40,0 1px 2px #0000000d;interpolate-size:allow-keywords;transition:width .42s cubic-bezier(.16,1,.3,1),height .42s cubic-bezier(.16,1,.3,1),border-radius .42s cubic-bezier(.16,1,.3,1),box-shadow .3s ease;animation:hsk-voice-pill-in .42s cubic-bezier(.16,1,.3,1) both}.hsk-voice-picker[data-open]{width:224px;height:auto;border-radius:20px;background:linear-gradient(180deg,#ffffff1a,#fff0 50%),color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 78%,transparent);box-shadow:inset 0 1px #ffffff40,0 8px 22px -8px #0003,0 1px 2px #0000000d}@keyframes hsk-voice-pill-in{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}.hsk-voice-pill{display:flex;align-items:center;justify-content:space-between;gap:6px;flex:none;height:34px;padding:0 10px 0 14px;border:0;background:transparent;font:inherit;font-size:12px;font-weight:600;white-space:nowrap;color:var(--hsk-chat-text, #1f1f1f);cursor:pointer}.hsk-voice-pill-caret{display:inline-flex;color:var(--hsk-chat-muted, #71717a);transform:rotate(90deg) scale(.8);transition:transform .32s cubic-bezier(.16,1,.3,1)}.hsk-voice-picker[data-open] .hsk-voice-pill-caret{transform:rotate(-90deg) scale(.8)}.hsk-voice-menu-list{position:relative;contain:inline-size;display:flex;flex-direction:column;gap:1px;max-height:min(320px,50vh);padding:4px 5px 6px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;opacity:0;transition:opacity .18s ease;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 10px,#000 calc(100% - 16px),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 10px,#000 calc(100% - 16px),transparent 100%)}.hsk-voice-menu-list::-webkit-scrollbar{display:none}.hsk-voice-picker[data-open] .hsk-voice-menu-list{opacity:1;transition:opacity .26s ease .12s}.hsk-voice-group{display:flex;align-items:center;gap:8px;flex:none;padding:10px 9px 4px;font-size:10px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--hsk-chat-muted, #71717a)}.hsk-voice-group:after{content:"";flex:1;height:1px;background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 12%,transparent)}.hsk-voice-group:first-child{padding-top:4px}.hsk-voice-option{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex:none;padding:7px 9px;border:0;border-radius:13px;background:transparent;font:inherit;text-align:start;color:var(--hsk-chat-text, #1f1f1f);cursor:pointer;transition:background .14s ease}.hsk-voice-option:hover{background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 6%,transparent)}.hsk-voice-option-name{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600}.hsk-voice-option-trait{font-size:11px;color:var(--hsk-chat-muted, #71717a)}.hsk-voice-option--on,.hsk-voice-option--on:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent)}.hsk-voice-option--on .hsk-voice-option-name{color:var(--hsk-primary, #ff6a33)}.hsk-voice-option--on .hsk-voice-option-name:before{content:"";width:5px;height:5px;border-radius:999px;background:currentColor}@media(prefers-reduced-motion:reduce){.hsk-voice-picker{animation:none;transition:none}}@media(max-width:520px){.hsk-cb-input-box{gap:6px;padding:10px 10px 10px 12px}.hsk-cb-attach-btn,.hsk-cb-send,.hsk-cb-voice-mode-btn,.hsk-chat-send{width:32px;height:32px;border-radius:10px}.hsk-cb-textarea{flex:1 1 auto;min-width:0;font-size:16px}.hsk-cb-input-box .hsk-cb-listening{display:none}}.hsk-cb-main{position:relative}.hsk-cb-main,.hsk-voice-overlay{--hsk-doodle-ink: 31, 31, 31;--hsk-doodle-tint: 255, 106, 51}@keyframes hsk-doodles-shimmer-in{0%{opacity:0}to{opacity:.9}}.hsk-cb-doodles{position:absolute;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;opacity:.9;animation:hsk-doodles-shimmer-in .28s cubic-bezier(.16,1,.3,1) both}.hsk-cb-main>*:not(.hsk-cb-doodles){position:relative}@media(prefers-color-scheme:dark){.hsk-cb-main,.hsk-voice-overlay{--hsk-doodle-ink: 240, 239, 237;--hsk-doodle-tint: 255, 150, 110}}[data-hsk-theme=light] .hsk-cb-main,[data-hsk-theme=light] .hsk-voice-overlay{--hsk-doodle-ink: 31, 31, 31;--hsk-doodle-tint: 255, 106, 51}[data-hsk-theme=dark] .hsk-cb-main,[data-hsk-theme=dark] .hsk-voice-overlay{--hsk-doodle-ink: 240, 239, 237;--hsk-doodle-tint: 255, 150, 110}.hsk-cb-docked-option-detail,.hsk-cb-entlang-price,.hsk-cb-src-detail,.hsk-kiku-picker-item-price,.hsk-source-price,.hsk-sp-item-discount,.hsk-sp-item-original-price,.hsk-sp-item-price,.hsk-sp-mobile-main-card-price,.hsk-sp-mobile-similar-carousel-price,.hsk-voice-item-price,.hsk-live-cell{font-variant-numeric:tabular-nums}.hsk-live-wrap{margin:6px 0 2px;width:100%;max-width:100%;box-sizing:border-box}.hsk-live-carousel{display:flex;flex-wrap:wrap;gap:6px;align-items:flex-start;width:100%;box-sizing:border-box}.hsk-live-card{flex:0 1 auto;width:fit-content;min-width:120px;max-width:100%;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .05));border:1px solid var(--hsk-chat-divide, rgba(255, 255, 255, .08));border-radius:12px;padding:6px 10px;box-sizing:border-box;display:flex;flex-direction:column;gap:3px;transition:opacity .2s ease;overflow:hidden}.hsk-live-card.is-stale{opacity:.75}.hsk-live-card__top{display:flex;align-items:center;justify-content:space-between;gap:8px}.hsk-live-card__badge{display:inline-flex;align-items:center;gap:5px}.hsk-live-card__body{display:flex;align-items:center}.hsk-live-dot{width:6px;height:6px;border-radius:50%;background:#10b981;flex-shrink:0}@media(prefers-reduced-motion:no-preference){.hsk-live-dot:not(.is-stale){animation:hsk-live-pulse 2s ease-in-out infinite}}.hsk-live-dot.is-stale{background:var(--hsk-chat-muted, #9ca3af)}.hsk-live-card__title{font-size:13px;font-weight:600;color:var(--hsk-chat-text, #111827);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.01em}.hsk-live-card__age{font-size:10.5px;font-weight:500;color:var(--hsk-chat-muted, #6b7280);white-space:nowrap;flex-shrink:0}.hsk-live-card__pills{display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin-top:1px}.hsk-live-pill{display:inline-flex;align-items:center;gap:4px;padding:2px 7px;background:color-mix(in srgb,var(--hsk-surface-1, var(--hsk-chat-bg, #ffffff)) 85%,transparent);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #ffffff) 10%,transparent);border-radius:6px;font-size:11.5px;font-variant-numeric:tabular-nums;line-height:1.25;color:var(--hsk-chat-text, #111827);box-shadow:0 1px 2px #00000008}.hsk-live-pill__label{font-weight:500;color:var(--hsk-chat-muted, #6b7280);font-size:11px;text-transform:capitalize}.hsk-live-pill__value{font-weight:650;color:var(--hsk-chat-text, #111827)}@media(prefers-reduced-motion:no-preference){.hsk-live-pill.is-changed{animation:hsk-live-pill-flash 1.2s ease-out}@keyframes hsk-live-pill-flash{0%{background:#10b98140;border-color:#10b981}to{background:var(--hsk-chat-bg, #ffffff);border-color:var(--hsk-chat-divide, rgba(0, 0, 0, .08))}}}@media(max-width:640px){.hsk-cb-source{flex:0 0 128px}.hsk-cb-src-imgwrap,.hsk-cb-src-imgwrap-empty{width:128px;height:128px;font-size:24px}.hsk-cb-sources{gap:10px}.hsk-cb-src-name{font-size:12px;line-height:1.35}.hsk-cb-src-detail{font-size:11px;padding:1px 7px;margin-top:4px}}@media(max-width:480px){.hsk-cb-source{flex:0 0 114px}.hsk-cb-src-imgwrap,.hsk-cb-src-imgwrap-empty{width:114px;height:114px;font-size:20px}.hsk-cb-sources{gap:8px}.hsk-live-card{flex:0 0 auto;width:fit-content;max-width:100%}}.hsk-voice-thread::-webkit-scrollbar{width:0;height:0}.hsk-voice-thread{font-family:var(--hsk-font);gap:0;padding-inline:20px}.hsk-voice-thread .hsk-cb-user-msg,.hsk-voice-thread .hsk-cb-ai-msg{align-self:stretch;max-width:100%;margin:0}.hsk-voice-thread .hsk-cb-user-bubble{max-width:100%;padding:0;background:none!important;border:none;border-radius:0;text-align:inherit;font-family:inherit;font-style:italic;font-size:16.5px;line-height:1.62;letter-spacing:.005em;color:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 62%,transparent)}.hsk-voice-thread .hsk-cb-user-bubble:after{display:none!important}.hsk-voice-thread .hsk-cb-user-msg{align-items:flex-start}.hsk-voice-thread .hsk-cb-user-bubble{position:relative;text-align:start}.hsk-voice-thread .hsk-cb-user-bubble:before{content:"\\201c";display:block!important;position:absolute;inset-inline-start:-.62em;top:-.12em;width:auto;height:auto;background:none;font-size:1.55em;font-style:normal;line-height:1;color:color-mix(in srgb,var(--hsk-primary, #ff6a33) 72%,transparent);pointer-events:none}.hsk-voice-thread .hsk-cb-ai-msg{font-size:17px;line-height:1.68;color:var(--hsk-chat-text, #1f1f1f)}.hsk-voice-thread .hsk-cb-user-msg{margin-top:22px}.hsk-voice-thread>.hsk-cb-user-msg:first-child{margin-top:0}.hsk-voice-thread .hsk-cb-ai-msg{margin-top:6px}.hsk-voice-thread .hsk-cb-ai-body.hsk-voice-turn--live:after{content:"";display:inline-block;width:.36em;height:.36em;margin-inline-start:.34em;vertical-align:.08em;background:currentColor;border-radius:0 50% 50%;transform:rotate(45deg);animation:hsk-voice-nib 1.6s ease-in-out infinite}@keyframes hsk-voice-nib{0%,to{opacity:.25}50%{opacity:.85}}.hsk-voice-images{display:flex;gap:10px;flex:none;width:min(720px,100%);padding:4px 20px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}.hsk-voice-images::-webkit-scrollbar{display:none}.hsk-voice-image{position:relative;flex:none;width:76px;height:76px;padding:0;border-radius:14px;overflow:hidden;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 12%,transparent);background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 4%,transparent);cursor:zoom-in;animation:hsk-voice-image-in .45s cubic-bezier(.16,1,.3,1) both}@media(min-width:720px){.hsk-voice-image{width:92px;height:92px}}.hsk-voice-image img{display:block;width:100%;height:100%;object-fit:cover;animation:hsk-voice-develop 1.1s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-voice-image-in{0%{opacity:0;transform:translate(10px) scale(.92)}to{opacity:1;transform:none}}@keyframes hsk-voice-develop{0%{opacity:0;filter:blur(8px) saturate(.2) brightness(1.2);transform:scale(1.06)}to{opacity:1;filter:none;transform:scale(1)}}.hsk-voice-image[data-pending]{cursor:progress;border-color:transparent;background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 5%,var(--hsk-chat-bg, #ffffff))}.hsk-doodle-shimmer{position:absolute;inset:0;width:100%;height:100%}.hsk-working-veil{--hsk-feather-12: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 12px) , transparent), linear-gradient(to bottom, transparent, #000 12px, #000 calc(100% - 12px) , transparent);--hsk-doodle-ink: 255, 122, 64;--hsk-doodle-tint: 255, 200, 165;position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none;background:radial-gradient(ellipse at center,transparent 45%,rgba(0,0,0,.22) 100%);-webkit-mask-image:var(--hsk-feather-12);-webkit-mask-composite:source-in;mask-image:var(--hsk-feather-12);mask-composite:intersect;animation:hsk-veil-in .3s cubic-bezier(.16,1,.3,1) both}.hsk-working-veil.is-leaving{animation:hsk-veil-out .3s ease-out both}.hsk-working-veil .hsk-doodle-shimmer{filter:drop-shadow(0 0 .6px rgba(0,0,0,.75));-webkit-mask-image:radial-gradient(ellipse at center,transparent 14%,rgba(0,0,0,.5) 36%,rgba(0,0,0,.9) 58%,#000 75%);mask-image:radial-gradient(ellipse at center,transparent 14%,rgba(0,0,0,.5) 36%,rgba(0,0,0,.9) 58%,#000 75%)}.hsk-working-veil:after{content:"";position:absolute;inset:0;box-shadow:inset 0 0 20px 8px color-mix(in srgb,var(--hsk-primary, #ff6a33) 90%,transparent),inset 0 0 48px 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 30%,transparent);animation:hsk-halo-breathe 2.4s ease-in-out infinite}.hsk-cb-user-img-cell:has(>.hsk-working-veil)>img,.hsk-cb-viz--working>img,.hsk-voice-image:has(>.hsk-working-veil)>img,.hsk-voice-image[data-pending],.hsk-cb-viz--working.is-blank{-webkit-mask-image:linear-gradient(to right,transparent,#000 26px,#000 calc(100% - 26px),transparent),linear-gradient(to bottom,transparent,#000 26px,#000 calc(100% - 26px),transparent);-webkit-mask-composite:source-in;mask-image:linear-gradient(to right,transparent,#000 26px,#000 calc(100% - 26px),transparent),linear-gradient(to bottom,transparent,#000 26px,#000 calc(100% - 26px),transparent);mask-composite:intersect}.hsk-voice-image:has(>.hsk-working-veil){border-color:transparent}@keyframes hsk-veil-in{0%{opacity:0}to{opacity:1}}@keyframes hsk-veil-out{0%{opacity:1}to{opacity:0}}@keyframes hsk-halo-breathe{0%,to{opacity:.7}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.hsk-working-veil:after{animation:none;opacity:.8}}.hsk-cb-viz--working{position:relative;display:inline-block;max-width:420px;border-radius:8px;overflow:hidden;line-height:0}.hsk-cb-viz--working.is-blank{display:block;width:min(100%,320px);aspect-ratio:1;background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 5%,var(--hsk-chat-bg, #ffffff))}.hsk-cb-viz--working.is-video{display:block;width:min(100%,420px);aspect-ratio:16 / 9}.hsk-cb-viz--working img{opacity:.85}.hsk-cb-viz--working.is-video img{width:100%;height:100%;object-fit:cover}.hsk-voice-control--attach{justify-self:center;width:44px;height:44px;color:var(--hsk-chat-muted, #888888);box-shadow:none}.hsk-voice-control--attach:hover:not(:disabled){transform:none;color:var(--hsk-chat-text, #1f1f1f);box-shadow:none}.hsk-voice-control--attach:active:not(:disabled){transform:scale(.9);transition-duration:.08s}@media(prefers-reduced-motion:reduce){.hsk-voice-thread .hsk-cb-ai-body.hsk-voice-turn--live:after,.hsk-voice-image,.hsk-voice-image img{animation:none}}.hsk-voice-shelf{display:flex;align-items:flex-start;gap:10px;flex:none;width:min(720px,100%);padding:0 20px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}.hsk-voice-shelf::-webkit-scrollbar{display:none}.hsk-voice-shelf>.hsk-voice-images{width:auto;padding:4px 0;overflow:visible}.hsk-voice-shelf>.hsk-voice-sources{flex:0 1 auto;width:auto;min-width:0;padding:0}.hsk-voice-sources{flex:none;width:min(720px,100%);padding:0 20px;animation:hsk-voice-image-in .45s cubic-bezier(.16,1,.3,1) both}@media(prefers-reduced-motion:reduce){.hsk-voice-sources{animation:none}}.hsk-cb-overlay[data-hsk-theme],[data-hsk-theme] .hsk-cb-overlay{background:var(--hsk-chat-bg)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-panel{background:transparent!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-topbar-name{background:var(--hsk-surface-2)!important;color:var(--hsk-name-text, var(--hsk-chat-text))!important;box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px rgba(var(--hsk-primary-rgb),.2)!important}[data-hsk-theme] .hsk-cb-think-head{background:var(--hsk-surface-2)!important;color:var(--hsk-think-text)!important;box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px rgba(var(--hsk-primary-rgb),.2)!important}[data-hsk-theme] .hsk-cb-leave{background:var(--hsk-surface-2)!important;color:var(--hsk-chat-text)!important;box-shadow:0 0 0 3px var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-leave-btn{background:var(--hsk-surface-1)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-leave-btn--end{background:var(--hsk-primary)!important;color:var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-chip,[data-hsk-theme] .hsk-action-pill{border:var(--hsk-chip-border, none)!important;background:var(--hsk-surface-1)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-chip:hover,[data-hsk-theme] .hsk-action-pill:hover{background:rgba(var(--hsk-primary-rgb),.12)!important;color:var(--hsk-primary)!important}[data-hsk-theme] .hsk-cb-ai-text{background:var(--hsk-bubble-bg)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{background:var(--hsk-bubble-bg)!important}[data-hsk-theme] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{background:var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-user-bubble--tail:before{background:#007aff!important}[data-hsk-theme] .hsk-cb-user-bubble--tail:after{background:var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-topbar-btn,[data-hsk-theme] .hsk-cb-back{background:var(--hsk-surface-1)!important;color:var(--hsk-chat-muted)!important}[data-hsk-theme] .hsk-cb-input-box{background:transparent!important;border:none!important;border-radius:inherit!important}[data-hsk-theme] .hsk-cb-textarea{color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-textarea::placeholder{color:var(--hsk-placeholder)!important}[data-hsk-theme] .hsk-markdown-table th{color:var(--hsk-chat-muted)!important;border-bottom:1px solid var(--hsk-chat-divide)!important}[data-hsk-theme] .hsk-markdown-table td{color:var(--hsk-chat-text)!important;border-bottom:1px solid var(--hsk-chat-divide)!important}[data-hsk-theme] .hsk-cb-kiku-id-pill:hover{color:var(--hsk-primary)!important}[data-hsk-theme] .hsk-cb-theme-2x2-grid,[data-hsk-theme] .hsk-cb-topbar-ooze-menu{background:var(--hsk-glass-bg)!important;border:var(--hsk-glass-border)!important;border-top:var(--hsk-glass-border-top)!important;box-shadow:var(--hsk-glass-shadow)!important;backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%))!important;-webkit-backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%))!important}[data-hsk-theme] .hsk-cb-topbar-ooze-menu{border-top:var(--hsk-glass-border)!important;box-shadow:none!important}[data-hsk-theme] .hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{background:none!important;border:none!important;border-top:none!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}[data-hsk-theme] .hsk-cb-theme-squircle-trigger,[data-hsk-theme] .hsk-cb-theme-squircle-wrap,[data-hsk-theme] .hsk-cb-kiku-id-pill,[data-hsk-theme] .hsk-cb-kiku-id-rail .hsk-cb-sound-pill,[data-hsk-theme] .hsk-cb-layout-toggle,[data-hsk-theme] .hsk-cb-squircle-btn{background:var(--hsk-pill-bg)!important;color:var(--hsk-chat-text)!important;border:var(--hsk-glass-border)!important;border-top:var(--hsk-glass-border-top)!important;box-shadow:var(--hsk-glass-shadow)!important;backdrop-filter:blur(20px) saturate(var(--hsk-glass-saturate, 160%))!important;-webkit-backdrop-filter:blur(20px) saturate(var(--hsk-glass-saturate, 160%))!important}[data-hsk-theme] .hsk-cb-kiku-id-pill,[data-hsk-theme] .hsk-cb-squircle-btn{color:var(--hsk-chat-muted)!important}[data-hsk-theme] .hsk-cb-exit-btn:hover{background:radial-gradient(120% 90% at 30% 0%,rgba(255,255,255,.4),transparent 65%),var(--hsk-pill-bg)!important;color:#ef4444!important}[data-hsk-theme] .hsk-cb-theme-grid-item{background:var(--hsk-grid-bg)!important;color:var(--hsk-chat-muted)!important;border:none!important;box-shadow:none!important}[data-hsk-theme] .hsk-cb-theme-grid-item.is-active{background:var(--hsk-active-bg)!important;color:var(--hsk-on-active)!important;box-shadow:none!important}[data-hsk-theme] .hsk-cb-src-name,[data-hsk-theme] .hsk-source-card__title{color:var(--hsk-src-title)!important;font-weight:650!important}[data-hsk-theme] .hsk-cb-src-desc,[data-hsk-theme] .hsk-cb-src-detail,[data-hsk-theme] .hsk-source-card__desc{color:var(--hsk-src-desc)!important}[data-hsk-theme] .hsk-cb-src-detail{background:var(--hsk-price-bg)!important;color:var(--hsk-price-text)!important;font-weight:700!important}[data-hsk-theme] .hsk-cb-main,[data-hsk-theme] .hsk-voice-overlay{--hsk-doodle-ink: var(--hsk-ink) !important;--hsk-doodle-tint: var(--hsk-tint) !important}[data-hsk-theme] .hsk-voice-picker{background:var(--hsk-pill-bg)!important;border:var(--hsk-glass-border)!important;border-top:var(--hsk-glass-border-top)!important}[data-hsk-theme] .hsk-voice-picker[data-open]{background:linear-gradient(180deg,#ffffff1a,#fff0 50%),color-mix(in srgb,var(--hsk-chat-bg) 78%,transparent)!important}.hsk-cb-overlay[data-hsk-theme=light],[data-hsk-theme=light] .hsk-cb-overlay{--hsk-primary: #ff6a33 !important;--hsk-primary-rgb: 255, 106, 51 !important;--hsk-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #ffffff !important;--hsk-chat-text: #1f1f1f !important;--hsk-chat-muted: #5f6368 !important;--hsk-chat-divide: #e5e7eb !important;--hsk-chat-input-bg: #f3f4f6 !important;--hsk-chat-source-bg: #f9fafb !important;--hsk-fade-bg: #ffffff !important;--hsk-goo-fill: #ffffff !important;--hsk-surface-1: rgba(0, 0, 0, .05) !important;--hsk-surface-2: #f1f3f4 !important;--hsk-bubble-bg: #f3f4f6 !important;--hsk-think-text: #4b5563 !important;--hsk-placeholder: #757575 !important;--hsk-grid-bg: #ffffff !important;--hsk-active-bg: #1f1f1f !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #111827 !important;--hsk-src-desc: #4b5563 !important;--hsk-price-bg: #f3f4f6 !important;--hsk-price-text: #ea580c !important;--hsk-sheet-bg: #f3f4f6 !important;--hsk-chip-border: 1px solid rgba(0, 0, 0, .08) !important;--hsk-ink: 55, 65, 81 !important;--hsk-tint: 145, 77, 47 !important;--hsk-glass-bg: rgba(255, 255, 255, .72) !important;--hsk-glass-edge: rgba(0, 0, 0, .07) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .9) !important;--hsk-glass-drop: rgba(0,0,0,.1) !important;--hsk-glass-sheen: rgba(255,255,255,.85) !important;--hsk-glass-saturate: 190% !important;--hsk-pill-bg: rgba(255, 255, 255, .65) !important}.hsk-cb-overlay[data-hsk-theme=dark],[data-hsk-theme=dark] .hsk-cb-overlay{--hsk-primary: #ff6a33 !important;--hsk-primary-rgb: 255, 106, 51 !important;--hsk-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #0a0a0a !important;--hsk-chat-text: #f0efed !important;--hsk-chat-muted: #888888 !important;--hsk-chat-divide: rgba(255, 255, 255, .08) !important;--hsk-chat-input-bg: #191919 !important;--hsk-chat-source-bg: rgba(255, 255, 255, .04) !important;--hsk-fade-bg: #0a0a0a !important;--hsk-goo-fill: #1a1a1c !important;--hsk-surface-1: rgba(255, 255, 255, .06) !important;--hsk-surface-2: #1f1f22 !important;--hsk-bubble-bg: #1f1f22 !important;--hsk-think-text: #a6a6a6 !important;--hsk-placeholder: #555555 !important;--hsk-grid-bg: #1a1a1c !important;--hsk-active-bg: #f0efed !important;--hsk-on-active: #0a0a0a !important;--hsk-src-title: #f9fafb !important;--hsk-src-desc: #9ca3af !important;--hsk-price-bg: rgba(255, 255, 255, .08) !important;--hsk-price-text: #ff7a45 !important;--hsk-sheet-bg: #1f1f22 !important;--hsk-ink: 240, 239, 237 !important;--hsk-tint: 248, 195, 174 !important;--hsk-glass-bg: rgba(255, 255, 255, .07) !important;--hsk-glass-edge: rgba(255, 255, 255, .1) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .22) !important;--hsk-glass-drop: rgba(0,0,0,.45) !important;--hsk-glass-sheen: rgba(255,255,255,.1) !important;--hsk-glass-saturate: 160% !important;--hsk-pill-bg: rgba(255, 255, 255, .06) !important}.hsk-cb-overlay[data-hsk-theme=mahogany],[data-hsk-theme=mahogany] .hsk-cb-overlay{--hsk-primary: #e07a38 !important;--hsk-primary-rgb: 224, 122, 56 !important;--hsk-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #140d09 !important;--hsk-chat-text: #f6eee3 !important;--hsk-chat-muted: #a89485 !important;--hsk-chat-divide: rgba(217, 140, 85, .18) !important;--hsk-chat-input-bg: #211610 !important;--hsk-chat-source-bg: #1c130d !important;--hsk-fade-bg: #140d09 !important;--hsk-goo-fill: #211610 !important;--hsk-surface-1: #211610 !important;--hsk-surface-2: #2b1c14 !important;--hsk-bubble-bg: #261912 !important;--hsk-think-text: #c4b1a1 !important;--hsk-placeholder: #7a6557 !important;--hsk-grid-bg: #2b1c14 !important;--hsk-active-bg: #e07a38 !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #fdf8f4 !important;--hsk-src-desc: #c4b1a1 !important;--hsk-price-bg: #2b1c14 !important;--hsk-price-text: #f59e0b !important;--hsk-sheet-bg: #211610 !important;--hsk-ink: 246, 238, 227 !important;--hsk-tint: 235, 180, 142 !important;--hsk-glass-bg: rgba(255, 220, 180, .07) !important;--hsk-glass-edge: rgba(217, 140, 85, .15) !important;--hsk-glass-edge-top: rgba(255, 200, 150, .25) !important;--hsk-glass-drop: rgba(0,0,0,.55) !important;--hsk-glass-sheen: rgba(255,200,150,.12) !important;--hsk-glass-saturate: 155% !important;--hsk-pill-bg: rgba(255, 220, 180, .06) !important}.hsk-cb-overlay[data-hsk-theme=blush],[data-hsk-theme=blush] .hsk-cb-overlay{--hsk-primary: #ec4899 !important;--hsk-primary-rgb: 236, 72, 153 !important;--hsk-selection-bg: #ec4899 !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #fff5f7 !important;--hsk-chat-text: #3d1424 !important;--hsk-chat-muted: #94536d !important;--hsk-chat-divide: rgba(236, 72, 153, .18) !important;--hsk-chat-input-bg: #ffe4ec !important;--hsk-chat-source-bg: #fff0f4 !important;--hsk-fade-bg: #fff5f7 !important;--hsk-goo-fill: #ffe4ec !important;--hsk-surface-1: #ffe4ec !important;--hsk-surface-2: #fbcfe8 !important;--hsk-bubble-bg: #ffebf1 !important;--hsk-think-text: #831843 !important;--hsk-name-text: #831843 !important;--hsk-placeholder: #b57a91 !important;--hsk-grid-bg: #fff0f4 !important;--hsk-active-bg: #ec4899 !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #2b0c19 !important;--hsk-src-desc: #702648 !important;--hsk-price-bg: #fce7f3 !important;--hsk-price-text: #db2777 !important;--hsk-sheet-bg: #ffe4ec !important;--hsk-sheet-hover: #ffd2e0 !important;--hsk-ink: 130, 36, 75 !important;--hsk-tint: 175, 38, 97 !important;--hsk-glass-bg: rgba(255, 240, 248, .75) !important;--hsk-glass-edge: rgba(236, 72, 153, .1) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .9) !important;--hsk-glass-drop: rgba(180, 30, 100, .08) !important;--hsk-glass-sheen: rgba(255,255,255,.85) !important;--hsk-glass-saturate: 185% !important;--hsk-pill-bg: rgba(255, 228, 236, .8) !important}.hsk-cb-overlay[data-hsk-theme=coffee],[data-hsk-theme=coffee] .hsk-cb-overlay{--hsk-primary: #a9714b !important;--hsk-primary-rgb: 169, 113, 75 !important;--hsk-selection-bg: #a9714b !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #f7f1e8 !important;--hsk-chat-text: #3b2a1d !important;--hsk-chat-muted: #8a7561 !important;--hsk-chat-divide: rgba(169, 113, 75, .18) !important;--hsk-chat-input-bg: #efe4d6 !important;--hsk-chat-source-bg: #f2eade !important;--hsk-fade-bg: #f7f1e8 !important;--hsk-goo-fill: #efe4d6 !important;--hsk-surface-1: #efe4d6 !important;--hsk-surface-2: #e6d7c4 !important;--hsk-bubble-bg: #f0e7da !important;--hsk-think-text: #6b543f !important;--hsk-placeholder: #a89680 !important;--hsk-grid-bg: #f2eade !important;--hsk-active-bg: #a9714b !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #2a1c11 !important;--hsk-src-desc: #6b543f !important;--hsk-price-bg: #ece0cf !important;--hsk-price-text: #9a5f32 !important;--hsk-sheet-bg: #efe4d6 !important;--hsk-sheet-hover: #e6d7c4 !important;--hsk-ink: 59, 42, 29 !important;--hsk-tint: 120, 88, 62 !important;--hsk-glass-bg: rgba(247, 241, 232, .78) !important;--hsk-glass-edge: rgba(169, 113, 75, .12) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .88) !important;--hsk-glass-drop: rgba(90, 55, 20, .1) !important;--hsk-glass-sheen: rgba(255,255,255,.8) !important;--hsk-glass-saturate: 185% !important;--hsk-pill-bg: rgba(239, 228, 214, .82) !important}.hsk-cb-overlay[data-hsk-theme=midnight],[data-hsk-theme=midnight] .hsk-cb-overlay{--hsk-primary: #6366f1 !important;--hsk-primary-rgb: 99, 102, 241 !important;--hsk-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #0f1420 !important;--hsk-chat-text: #dfe6f5 !important;--hsk-chat-muted: #8792ad !important;--hsk-chat-divide: rgba(99, 102, 241, .18) !important;--hsk-chat-input-bg: #1a2133 !important;--hsk-chat-source-bg: #161d2c !important;--hsk-fade-bg: #0f1420 !important;--hsk-goo-fill: #1a2133 !important;--hsk-surface-1: #1a2133 !important;--hsk-surface-2: #222b40 !important;--hsk-bubble-bg: #1e2637 !important;--hsk-think-text: #a8b3cc !important;--hsk-placeholder: #5c6780 !important;--hsk-grid-bg: #222b40 !important;--hsk-active-bg: #6366f1 !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #f2f5fc !important;--hsk-src-desc: #a8b3cc !important;--hsk-price-bg: #222b40 !important;--hsk-price-text: #818cf8 !important;--hsk-sheet-bg: #1a2133 !important;--hsk-sheet-hover: #222b40 !important;--hsk-ink: 223, 230, 245 !important;--hsk-tint: 150, 160, 200 !important;--hsk-glass-bg: rgba(180, 190, 255, .06) !important;--hsk-glass-edge: rgba(99, 102, 241, .18) !important;--hsk-glass-edge-top: rgba(180, 185, 255, .25) !important;--hsk-glass-drop: rgba(0,0,0,.55) !important;--hsk-glass-sheen: rgba(180,190,255,.1) !important;--hsk-glass-saturate: 155% !important;--hsk-pill-bg: rgba(180, 190, 255, .06) !important}.hsk-cb-back-icon{display:inline-flex;transition:transform .22s cubic-bezier(.22,1,.36,1)}.hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon{transform:translate(-2px)}.hsk-cb-panel[dir=rtl] .hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon{transform:scaleX(-1) translate(-2px)}.hsk-cb-tools-toggle{transition:transform .26s cubic-bezier(.34,1.56,.64,1),background-color .42s cubic-bezier(.16,1,.3,1),color .42s cubic-bezier(.16,1,.3,1)}.hsk-cb-tools-toggle:hover:not(:disabled){color:var(--hsk-primary, #ff6a33);transform:rotate(90deg)}.hsk-cb-tools-toggle--open:hover:not(:disabled){transform:rotate(135deg)}.hsk-cb-tools-toggle:active:not(:disabled){transform:scale(.9);transition-duration:.1s}.hsk-cb-theme-trigger-icon{display:inline-flex;transition:transform .3s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-theme-squircle-trigger:hover .hsk-cb-theme-trigger-icon{transform:translateY(-1.5px) rotate(-8deg)}.hsk-cb-dot-item:hover:not(.hsk-cb-dot-item--active){background:var(--hsk-chat-muted, rgba(120, 120, 120, .6));transform:scale(1.35)}@media(prefers-reduced-motion:reduce){.hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon,.hsk-cb-panel[dir=rtl] .hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon,.hsk-cb-theme-squircle-trigger:hover .hsk-cb-theme-trigger-icon,.hsk-cb-dot-item:hover:not(.hsk-cb-dot-item--active),.hsk-msg-audio-btn:hover:not(:disabled){transform:none}.hsk-cb-tools-toggle:hover:not(:disabled),.hsk-cb-tools-toggle--open:hover:not(:disabled){transform:none}}.hsk-voice-control{position:relative;isolation:isolate;border-radius:999px}.hsk-voice-control--waiting{opacity:.45;cursor:default}.hsk-voice-control--waiting:before,.hsk-voice-control--waiting .hsk-voice-control-icon{animation:none!important;background:none!important}.hsk-voice-control[data-control=mic]:not(.hsk-voice-control--muted):not(.hsk-voice-control--waiting):before{content:"";position:absolute;inset:-1.5px;border-radius:inherit;background:conic-gradient(from 0deg,#ff3b30,#ff9500,#ffd60a,#34c759,#00c7be,#30b0c7,#007aff,#5856d6,#af52de,#ff2d55,#ff3b30);-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 2.5px),#000 calc(100% - 2px));mask:radial-gradient(farthest-side,transparent calc(100% - 2.5px),#000 calc(100% - 2px));animation:hsk-apple-siri-spin 3s linear infinite;pointer-events:none;z-index:1}.hsk-voice-control:after{display:none!important}.hsk-voice-control-icon{will-change:transform}.hsk-voice-control[data-control=mic]:not(.hsk-voice-control--muted):not(.hsk-voice-control--waiting) .hsk-voice-control-icon{animation:hsk-apple-siri-mic-pulse 2.2s ease-in-out infinite}.hsk-img-sun,.hsk-img-ridge{transform-box:fill-box;transform-origin:center;transition:transform .34s cubic-bezier(.34,1.56,.64,1)}.hsk-voice-control--attach:is(:hover,:active) .hsk-img-sun{transform:translate(1px,-1.5px) scale(1.25)}.hsk-voice-control--attach:is(:hover,:active) .hsk-img-ridge{transform:translateY(-1px);transition-delay:40ms}.hsk-mic-slash{stroke-dasharray:29;animation:hsk-slash-draw .3s cubic-bezier(.65,0,.35,1) both}@keyframes hsk-slash-draw{0%{stroke-dashoffset:29}to{stroke-dashoffset:0}}.hsk-voice-control[data-control=mic].hsk-voice-control--muted .hsk-voice-control-icon{animation:hsk-icon-pop .38s cubic-bezier(.34,1.56,.64,1)}@keyframes hsk-icon-pop{0%{transform:scale(.82)}to{transform:scale(1)}}.hsk-voice-exit svg{transition:transform .32s cubic-bezier(.34,1.56,.64,1)}.hsk-voice-exit:hover svg{transform:rotate(90deg)}.hsk-snd-wave{transform-box:fill-box;transform-origin:left center}.hsk-cb-sound-pill:hover .hsk-snd-wave{animation:hsk-wave-ripple .9s ease-out infinite;animation-delay:calc(var(--hsk-wave, 0) * .14s)}.hsk-mimi-dot{transform-box:fill-box;transform-origin:center;opacity:.7}.hsk-cb-sound-pill:hover .hsk-mimi-dot,.hsk-cb-toolsheet-item:hover .hsk-mimi-dot{animation:hsk-mimi-typing .9s ease-in-out infinite;animation-delay:calc(var(--hsk-dot, 0) * .13s)}@keyframes hsk-mimi-typing{0%,60%,to{transform:translateY(0);opacity:.55}30%{transform:translateY(-1.8px);opacity:1}}@keyframes hsk-wave-ripple{0%{opacity:.25;transform:scale(.7)}45%{opacity:1;transform:scale(1.05)}to{opacity:.25;transform:scale(1)}}.hsk-snd-x{stroke-dasharray:8;animation:hsk-snd-x-draw .26s ease-out both}.hsk-snd-x+.hsk-snd-x{animation-delay:70ms}@keyframes hsk-snd-x-draw{0%{stroke-dashoffset:8}to{stroke-dashoffset:0}}@keyframes hsk-apple-siri-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes hsk-apple-siri-mic-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.08)}}.hsk-voice-control--muted:before,.hsk-voice-control--muted:after{display:none}@media(prefers-reduced-motion:reduce){.hsk-voice-control:not(:hover):not(.hsk-voice-control--muted) .hsk-voice-control-icon,.hsk-voice-control:hover:before,.hsk-voice-control--muted:before,.hsk-voice-control--muted:after{animation:none}.hsk-voice-control:hover,.hsk-voice-control:hover .hsk-mic-cap{transform:none}.hsk-voice-control--attach:hover .hsk-img-sun,.hsk-voice-control--attach:hover .hsk-img-ridge,.hsk-voice-exit:hover svg{transform:none}.hsk-mic-slash,.hsk-snd-x,.hsk-cb-sound-pill:hover .hsk-snd-wave,.hsk-cb-sound-pill:hover .hsk-mimi-dot,.hsk-cb-toolsheet-item:hover .hsk-mimi-dot,.hsk-voice-controls .hsk-voice-control-icon{animation:none}}.hsk-cb-voice-error{animation:hsk-error-shake .26s cubic-bezier(.36,.07,.19,.97) both}@keyframes hsk-error-shake{0%,to{transform:translate(0)}22%{transform:translate(-3px)}55%{transform:translate(2px)}80%{transform:translate(-1px)}}@media(prefers-reduced-motion:reduce){.hsk-cb-voice-error{animation:none}}.hsk-sun-rays,.hsk-sun-core,.hsk-moon-body,.hsk-wood-layer,.hsk-heart-body,.hsk-steam,.hsk-star-spark,.hsk-check-mark,.hsk-send-tail,.hsk-send-body{transform-box:fill-box;transform-origin:center}.hsk-sun-rays{transform-origin:12px 12px;transition:transform .5s cubic-bezier(.22,1,.36,1)}.hsk-cb-theme-grid-item:hover .hsk-sun-rays,.hsk-cb-theme-squircle-trigger:hover .hsk-sun-rays{transform:rotate(45deg)}.hsk-sun-core{transition:transform .32s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-theme-grid-item:hover .hsk-sun-core,.hsk-cb-theme-squircle-trigger:hover .hsk-sun-core{transform:scale(1.14)}.hsk-moon-body{transition:transform .34s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-theme-grid-item:hover .hsk-moon-body,.hsk-cb-theme-squircle-trigger:hover .hsk-moon-body{transform:rotate(-16deg)}.hsk-wood-layer{transition:transform .34s cubic-bezier(.34,1.56,.64,1)}.hsk-wood-layer{transition-delay:calc(var(--hsk-layer, 0) * 45ms)}.hsk-cb-theme-grid-item:hover .hsk-wood-layer,.hsk-cb-theme-squircle-trigger:hover .hsk-wood-layer{transform:translateY(-1.2px)}.hsk-cb-theme-grid-item:hover .hsk-heart-body,.hsk-cb-theme-squircle-trigger:hover .hsk-heart-body{animation:hsk-heartbeat 1.1s ease-in-out infinite}@keyframes hsk-heartbeat{0%,to{transform:scale(1)}14%{transform:scale(1.18)}28%{transform:scale(1)}42%{transform:scale(1.12)}56%{transform:scale(1)}}.hsk-steam{opacity:.9}.hsk-cb-theme-grid-item:hover .hsk-steam,.hsk-cb-theme-squircle-trigger:hover .hsk-steam{animation:hsk-steam-rise 1.6s ease-out infinite;animation-delay:calc(var(--hsk-steam, 0) * .22s)}@keyframes hsk-steam-rise{0%{transform:translateY(2px) scaleY(.5);opacity:0}35%{opacity:.95}to{transform:translateY(-3px) scaleY(1.15);opacity:0}}.hsk-cb-theme-grid-item:hover .hsk-star-spark,.hsk-cb-theme-squircle-trigger:hover .hsk-star-spark{animation:hsk-twinkle 1.4s ease-in-out infinite}@keyframes hsk-twinkle{0%,to{transform:scale(1) rotate(0);opacity:.85}50%{transform:scale(1.45) rotate(20deg);opacity:1}}.hsk-check-mark{stroke-dasharray:30;stroke-dashoffset:30;animation:hsk-check-draw .42s cubic-bezier(.65,0,.35,1) forwards}@keyframes hsk-check-draw{to{stroke-dashoffset:0}}@media(prefers-reduced-motion:reduce){.hsk-sun-rays,.hsk-sun-core,.hsk-moon-body,.hsk-wood-layer,.hsk-send-body,.hsk-send-tail{transition:none;transform:none!important}.hsk-cb-theme-grid-item:hover .hsk-heart-body,.hsk-cb-theme-squircle-trigger:hover .hsk-heart-body,.hsk-cb-theme-grid-item:hover .hsk-steam,.hsk-cb-theme-squircle-trigger:hover .hsk-steam,.hsk-cb-theme-grid-item:hover .hsk-star-spark,.hsk-cb-theme-squircle-trigger:hover .hsk-star-spark{animation:none}.hsk-check-mark{animation:none;stroke-dashoffset:0}}.hsk-cb-send-stage{position:relative;display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;overflow:visible}.hsk-cb-send-seam{position:absolute;top:50%;left:50%;width:2px;height:15px;border-radius:2px;background:currentColor;transform:translate(-50%,-50%) rotate(38deg) scaleY(0);transform-origin:center;opacity:0;pointer-events:none}.hsk-cb-send-kite{display:inline-flex;transform-origin:center;will-change:transform}.hsk-cb-send:hover:not(:disabled) .hsk-cb-send-kite{transform:translate(1.5px,-1.5px);transition:transform .26s cubic-bezier(.22,1,.36,1)}.hsk-cb-send.is-launching .hsk-cb-send-kite{animation:hsk-kite-tear .55s cubic-bezier(.22,1,.36,1) both}.hsk-cb-send.is-launching .hsk-cb-send-seam{animation:hsk-seam-heal .55s cubic-bezier(.4,0,.3,1) both}@keyframes hsk-kite-tear{0%{transform:translate(0) scale(1) rotate(0);opacity:1}18%{transform:translate(-1px,2.5px) scale(.92,1.08) rotate(-4deg);opacity:1}45%{transform:translate(3px,-16px) scale(1.2,.8) rotate(6deg);opacity:.95}75%{transform:translate(6px,-38px) scale(1.05,.7) rotate(10deg);opacity:.6}to{transform:translate(8px,-56px) scale(.6,.4) rotate(12deg);opacity:0}}@keyframes hsk-seam-heal{0%{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}22%{transform:translate(-50%,-50%) rotate(38deg) scaleY(1);opacity:.9}45%{transform:translate(-50%,-50%) rotate(38deg) scaleY(1.3);opacity:.8}72%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.3);opacity:.35}to{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}}.hsk-kite-wing{transform-box:fill-box;transform-origin:100% 0}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-kite-wing--far{animation:hsk-wing-beat-far .62s ease-in-out infinite}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-kite-wing--near{animation:hsk-wing-beat-near .62s ease-in-out .07s infinite}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-kite{animation:hsk-kite-strain 2.4s cubic-bezier(.45,0,.35,1) infinite}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-seam{animation:hsk-seam-strain 2.4s cubic-bezier(.45,0,.35,1) infinite}@keyframes hsk-kite-strain{0%,10%{transform:translate(0) scale(1) rotate(0)}20%{transform:translate(-1.2px,2px) scale(.94,1.05) rotate(-4deg)}34%{transform:translate(3.5px,-5px) scale(1.16,.86) rotate(8deg)}42%{transform:translate(4.2px,-6px) scale(1.2,.82) rotate(9deg)}50%{transform:translate(2.4px,-3.4px) scale(1.06,.94) rotate(5deg)}64%{transform:translate(-.6px,1.2px) scale(.97,1.03) rotate(-2deg)}78%,to{transform:translate(0) scale(1) rotate(0)}}@keyframes hsk-seam-strain{0%,22%{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}34%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.6);opacity:.34}42%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.95);opacity:.5}52%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.55);opacity:.3}66%,to{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}}@keyframes hsk-wing-beat-far{0%,to{transform:scaleX(1) skewY(0)}50%{transform:scaleX(.86) skewY(-4deg)}}@keyframes hsk-wing-beat-near{0%,to{transform:scaleX(1) skewY(0)}50%{transform:scaleX(1.1) skewY(3deg)}}.hsk-stop-ring{transform-box:fill-box;transform-origin:center;stroke-dasharray:22 38;opacity:.85;animation:hsk-stop-orbit 1.4s linear infinite}.hsk-stop-core{transform-box:fill-box;transform-origin:center;animation:hsk-stop-pulse 1.4s ease-in-out infinite;transition:rx .2s ease,transform .2s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-send--stop:hover .hsk-stop-core{transform:scale(1.16);animation-play-state:paused}.hsk-cb-send--stop:hover .hsk-stop-ring{animation-duration:.7s}@keyframes hsk-stop-orbit{to{transform:rotate(1turn)}}@keyframes hsk-stop-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(.86);opacity:.75}}@media(prefers-reduced-motion:reduce){.hsk-cb-send.is-launching .hsk-cb-send-kite,.hsk-cb-send.is-launching .hsk-cb-send-seam,.hsk-cb-send:hover:not(:disabled) .hsk-cb-send-kite{animation:none;transform:none}}.hsk-cb-send.is-launching{overflow:visible!important}.hsk-cb-send-sheath{position:absolute;inset:-1px;background:radial-gradient(120% 90% at 32% 22%,#ffffff70,#fff0 58%),linear-gradient(150deg,color-mix(in srgb,var(--hsk-primary, #1273e6) 72%,#ffffff) 0%,var(--hsk-primary, #1273e6) 46%,color-mix(in srgb,var(--hsk-primary, #1273e6) 74%,#000000) 100%);border-radius:46% 54% 52% 48%/50% 47% 53% 50%;box-shadow:inset 0 2px 3px #ffffff80,inset 0 -3px 5px color-mix(in srgb,var(--hsk-primary, #1273e6) 30%,rgba(0,0,0,.55)),0 2px 5px #0003,0 7px 16px color-mix(in srgb,var(--hsk-primary, #1273e6) 16%,transparent);transform-origin:58% 62%;pointer-events:none;z-index:1;will-change:transform,border-radius;transition:border-radius .5s cubic-bezier(.34,1.6,.5,1),box-shadow .3s ease}.hsk-cb-send-stage{z-index:2;position:relative}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-sheath{animation:hsk-sheath-press 2.4s cubic-bezier(.35,.8,.3,1) infinite}@keyframes hsk-sheath-press{0%,12%{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}22%{transform:scale(.94,1.08) translate(-1.4px,2.2px);border-radius:52% 48% 44% 56%/58% 40% 60% 42%}36%{transform:scale(1.14,.87) translate(2.6px,-3.4px) rotate(2deg);border-radius:38% 66% 54% 46%/40% 62% 38% 60%}46%{transform:scale(1.19,.83) translate(3.6px,-4.6px) rotate(2.8deg);border-radius:34% 72% 56% 44%/36% 68% 32% 64%}58%{transform:scale(.93,1.09) translate(-1.2px,1.8px) rotate(-1.4deg);border-radius:56% 44% 42% 58%/60% 38% 62% 40%}70%{transform:scale(1.05,.96) translate(.8px,-1px) rotate(.6deg);border-radius:44% 56% 50% 50%/46% 54%}80%{transform:scale(.98,1.03);border-radius:50% 50% 48% 52%/52% 48%}88%,to{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}}.hsk-cb-send.is-launching .hsk-cb-send-sheath{animation:hsk-sheath-yield .55s cubic-bezier(.3,.7,.25,1) both}@keyframes hsk-sheath-yield{0%{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}20%{transform:scale(.88,1.14) translate(-2px,3.4px);border-radius:56% 44% 40% 60%/64% 34% 66% 36%}45%{transform:scale(1.34,.68) translate(6px,-10px) rotate(4.6deg);border-radius:24% 86% 62% 38%/26% 80% 20% 74%}65%{transform:scale(.86,1.16) translate(-2.2px,3.6px) rotate(-2.2deg);border-radius:60% 40% 38% 62%/68% 30% 70% 32%}82%{transform:scale(1.06,.95) translate(1px,-1px) rotate(.8deg);border-radius:44% 56% 52% 48%/46% 54%}to{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}}.hsk-cb-send:disabled .hsk-cb-send-sheath{opacity:0}.hsk-cb-send--stop .hsk-cb-send-sheath{display:none}.hsk-cb-send:active:not(:disabled) .hsk-cb-send-sheath{box-shadow:inset 0 1px 2px #ffffff4d,inset 0 -1px 3px color-mix(in srgb,var(--hsk-primary, #1273e6) 24%,rgba(0,0,0,.6)),0 1px 3px #0000003d}@media(prefers-reduced-motion:reduce){.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-sheath,.hsk-cb-send.is-launching .hsk-cb-send-sheath{animation:none}}.hsk-cb-send:not(.hsk-cb-send--stop):not(:disabled){background:transparent!important;box-shadow:none!important;overflow:visible!important}.hsk-cb-send:not(.hsk-cb-send--stop):not(:disabled):hover{box-shadow:none!important}.hsk-cb-send:not(:disabled):hover .hsk-cb-send-sheath{box-shadow:inset 0 2px 4px #ffffff94,inset 0 -3px 6px color-mix(in srgb,var(--hsk-primary, #1273e6) 28%,rgba(0,0,0,.5)),0 3px 7px #00000038,0 10px 22px color-mix(in srgb,var(--hsk-primary, #1273e6) 20%,transparent)}.hsk-cb-terms-sanctuary{display:flex;flex-direction:column;margin:18px 0 22px;width:100%;max-width:520px;text-align:start;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;border:none;border-radius:0;padding:0;box-shadow:none;opacity:0;animation:hsk-terms-delicate-in .5s cubic-bezier(.16,1,.3,1) .05s forwards}@keyframes hsk-terms-delicate-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-terms-item{display:flex;flex-direction:column;gap:4px;opacity:0;animation:hsk-terms-item-in .45s cubic-bezier(.16,1,.3,1) forwards;animation-delay:calc(var(--hsk-row-idx, 0) * 60ms + 80ms)}@keyframes hsk-terms-item-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-terms-head{display:flex;align-items:baseline;gap:10px}.hsk-cb-terms-numeral{font-family:ui-serif,Georgia,Cambria,Times New Roman,Times,serif;font-style:italic;font-size:11px;font-weight:600;letter-spacing:.12em;color:var(--hsk-primary, #ff6a33);opacity:.85;flex-shrink:0;user-select:none}.hsk-cb-terms-title{margin:0;font-size:14.5px;font-weight:700;letter-spacing:-.015em;color:var(--hsk-chat-text, #ffffff)}.hsk-cb-terms-desc{margin:0;padding-inline-start:22px;font-size:13px;line-height:1.55;color:var(--hsk-chat-muted, #9ca3af);font-weight:400}.hsk-cb-terms-more{margin:0 0 4px;font-size:12.5px;color:var(--hsk-chat-muted, #9ca3af);text-align:start}.hsk-cb-terms-more a{color:var(--hsk-primary, #ff6a33);font-weight:600;text-decoration:none;unicode-bidi:isolate}.hsk-cb-terms-more a:hover{text-decoration:underline}.hsk-cb-terms-divider{height:1px;margin:14px 0;background:linear-gradient(90deg,transparent 0%,color-mix(in srgb,var(--hsk-chat-text, #000000) 8%,transparent) 20%,color-mix(in srgb,var(--hsk-chat-text, #000000) 8%,transparent) 80%,transparent 100%)}.hsk-cb-terms-action-wrap{display:flex;justify-content:center;width:100%;margin-top:14px}.hsk-cb-terms-agree-btn{display:inline-flex;align-items:center;justify-content:center;padding:12px 34px;font-size:14px;font-weight:600;border-radius:9999px;border:1px solid var(--hsk-chat-divide, rgba(255, 255, 255, .08));background:var(--hsk-chat-divide, rgba(255, 255, 255, .06));color:var(--hsk-chat-muted, rgba(255, 255, 255, .4));cursor:not-allowed;transition:all .3s cubic-bezier(.16,1,.3,1);letter-spacing:-.01em}.hsk-cb-terms-agree-btn.is-active{background:var(--hsk-primary, #ff6a33);color:#fff;border-color:var(--hsk-primary, #ff6a33);cursor:pointer;box-shadow:0 4px 14px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)}.hsk-cb-terms-agree-btn.is-active:hover{filter:brightness(.92);transform:translateY(-1px);box-shadow:0 6px 18px color-mix(in srgb,var(--hsk-primary, #ff6a33) 45%,transparent)}.hsk-cb-terms-agree-btn.is-active:active{transform:translateY(0);box-shadow:0 2px 6px color-mix(in srgb,var(--hsk-primary, #ff6a33) 25%,transparent)}@keyframes hsk-theme-morph-in{0%{opacity:0;transform:scale(.92) translateY(4px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes hsk-theme-pill-in{0%{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}.hsk-cb-panel[dir=rtl] .hsk-cb-theme-2x2-grid{transform-origin:bottom right}@media(prefers-reduced-motion:reduce){.hsk-cb-theme-squircle-trigger{animation:none}}@keyframes hsk-theme-morph-out{0%{opacity:1;transform:scale(1) translateY(0)}to{opacity:0;transform:scale(.92) translateY(4px)}}.hsk-retry-icon{display:inline-flex;transform-origin:center;transition:transform .36s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action:hover:not(:disabled) .hsk-retry-icon{transform:rotate(-180deg)}.hsk-cb-msg-action:active:not(:disabled) .hsk-retry-icon{transform:rotate(-360deg) scale(.85);transition-duration:.18s}.hsk-retry-icon--spinning{animation:hsk-spin .65s linear infinite!important}.hsk-edit-icon{display:inline-flex;transform-origin:20% 80%;transition:transform .26s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action:hover:not(:disabled) .hsk-edit-icon{transform:translateY(-1.5px) rotate(-14deg)}.hsk-cb-msg-action:active:not(:disabled) .hsk-edit-icon{transform:translateY(1px) scale(.88);transition-duration:.1s}.hsk-copy-icon{display:inline-flex}.hsk-copy-sheet{transition:transform .22s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action:hover:not(:disabled) .hsk-copy-sheet{transform:translate(-1.5px,-1.5px)}.hsk-check-icon{display:inline-flex;animation:hsk-check-pop .28s cubic-bezier(.34,1.56,.64,1) both}@keyframes hsk-check-pop{0%{transform:scale(.4);opacity:0}60%{transform:scale(1.24);opacity:1}to{transform:scale(1);opacity:1}}:root{--hsk-apple-bezier: cubic-bezier(.16, 1, .3, 1);--hsk-apple-exit-bezier: cubic-bezier(.4, 0, .2, 1)}@keyframes hsk-step1-exit-up{0%{opacity:1;transform:translateY(0) scale(1);filter:blur(0px)}to{opacity:0;transform:translateY(-46px) scale(.96);filter:blur(14px)}}.hsk-step1-exit{animation:hsk-step1-exit-up .32s cubic-bezier(.16,1,.3,1) forwards;pointer-events:none;will-change:transform,opacity,filter}@keyframes hsk-composer-exit-up{0%{opacity:1;transform:translateY(0);filter:blur(0px)}to{opacity:0;transform:translateY(-42px);filter:blur(12px)}}.hsk-composer-exit-up{animation:hsk-composer-exit-up .3s cubic-bezier(.16,1,.3,1) forwards;pointer-events:none;will-change:transform,opacity,filter}.hsk-lang-loader{display:flex;flex-direction:column;align-items:center;gap:28px;padding:16px 0;width:100%}.hsk-lang-loader--enter{animation:hsk-clay-in .16s steps(2,end) both}@keyframes hsk-clay-in{0%{opacity:0}to{opacity:1}}.hsk-clay{display:flex;flex-direction:column;align-items:center;gap:8px}.hsk-clay-table{display:block;width:240px;height:160px}.hsk-lang-preparing{font-size:13px;font-weight:500;letter-spacing:-.015em;color:var(--hsk-chat-muted, rgba(255, 255, 255, .44));text-align:center;margin:0;line-height:1.4}.hsk-lang-loader--enter .hsk-lang-preparing{animation:hsk-preparing-in .42s .4s cubic-bezier(.16,1,.3,1) both}.hsk-lang-loader--exit .hsk-lang-preparing{animation:hsk-preparing-out .12s cubic-bezier(.4,0,.2,1) forwards}@keyframes hsk-preparing-in{0%{opacity:0;transform:translateY(10px);filter:blur(8px)}to{opacity:1;transform:translateY(0);filter:blur(0px)}}@keyframes hsk-preparing-out{to{opacity:0;transform:translateY(4px);filter:blur(6px)}}.hsk-composer-reveal{animation:hsk-composer-in .48s cubic-bezier(.16,1,.3,1) both;will-change:transform,opacity,filter}@keyframes hsk-composer-in{0%{opacity:0;transform:translateY(36px);filter:blur(10px)}to{opacity:1;transform:translateY(0);filter:blur(0px)}}.hsk-step-enter{animation:hsk-step-enter-in .46s cubic-bezier(.16,1,.3,1) both;will-change:transform,opacity,filter}@keyframes hsk-step-enter-in{0%{opacity:0;transform:translateY(22px);filter:blur(12px)}to{opacity:1;transform:translateY(0);filter:blur(0px)}}@media(prefers-reduced-motion:reduce){.hsk-step1-exit,.hsk-composer-exit-up,.hsk-lang-loader--enter,.hsk-lang-loader--exit,.hsk-composer-reveal,.hsk-step-enter{animation:none!important}}';var Os="akropolys-kiku-root",br=null,Qr=null,Vs=!1;function js(e){if(Vs)return;if(Vs=!0,typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype)try{let t=new CSSStyleSheet;t.replaceSync(ao),e.adoptedStyleSheets=[t];return}catch{}let r=document.createElement("style");r.textContent=ao,e.appendChild(r)}function oo(){return typeof document>"u"?null:Qr?(js(Qr),Qr):(br=document.getElementById(Os),br||(br=document.createElement("div"),br.id=Os,br.style.cssText="all: initial;",document.body.appendChild(br)),Qr=br.shadowRoot??br.attachShadow({mode:"open"}),js(Qr),Qr)}import{useAkropolysContext as om}from"@akropolys/sdk";function ca(e){if(typeof e=="string")return{themeAttr:e,vars:void 0};if(!e)return{themeAttr:void 0,vars:void 0};let r={};return e.primaryColor&&(r["--hsk-primary"]=e.primaryColor,r["--hsk-selection-bg"]=e.primaryColor),e.backgroundColor&&(r["--hsk-bg"]=e.backgroundColor,r["--hsk-chat-bg"]=e.backgroundColor),e.textColor&&(r["--hsk-text"]=e.textColor,r["--hsk-chat-text"]=e.textColor),e.fontFamily&&(r["--hsk-font"]=e.fontFamily),e.fontSize&&(r["--hsk-font-size"]=e.fontSize),e.mobileFontSize&&(r["--hsk-mobile-font-size"]=e.mobileFontSize),e.borderRadius&&(r["--hsk-border-radius"]=e.borderRadius),{themeAttr:void 0,vars:r}}import{useEffect as Ks}from"react";var qt=new Map;function so(e,r="hsk-font"){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)>>>0;return`${r}-${t.toString(36)}`}function Yh(e){let r=e.split("?")[0].split("#")[0].split(".").pop()?.toLowerCase();return r==="woff2"?"woff2":r==="woff"?"woff":r==="otf"?"opentype":r==="ttf"?"truetype":""}function io(e){let r=e.trim();return!r||/["'()\\\s]/.test(r)||/^(javascript|vbscript):/i.test(r)?null:r}var Ys=e=>/["\\{}<>;\n\r]/.test(e)?"":e.trim(),Xh=/^[Uu]\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?$/,Gs=e=>{let r=e.split(",").map(t=>t.trim()).filter(Boolean);return r.length===0||!r.every(t=>Xh.test(t))?"":r.join(", ")},Xs=e=>/^\d{3}( \d{3})?$/.test(e)?e:"400";function Qh(e,r){Ks(()=>{if(!e||!r||typeof document>"u")return;let t=so(e);if(qt.set(e,(qt.get(e)??0)+1),!document.getElementById(t)){let n=document.createElement("style");n.id=t,n.textContent=r,document.head.appendChild(n)}return()=>{let n=(qt.get(e)??1)-1;if(n>0){qt.set(e,n);return}qt.delete(e),document.getElementById(t)?.remove()}},[e,r])}function Qs(e){let r=Ys(e.family);return r?e.faces.map(t=>{let n=io(t.url);return n?`@font-face{font-family:"${r}";font-style:normal;font-weight:${Xs(t.weight)};font-display:swap;src:url(${n}) format("woff2");`+(Gs(t.unicodeRange)?`unicode-range:${Gs(t.unicodeRange)};`:"")+"}":""}).join(""):""}function co(e){let r=e?.faces??[],t=e&&r.length?Qs(e):"";Qh(t?`script|${e.family}|${r.map(n=>n.url).join("|")}`:"",t)}async function Ut(e,r=0){if(typeof document>"u"||!("fonts"in document))return;let t=Qs(e);if(!t)return;let n=`script|${e.family}|${e.faces.map(o=>o.url).join("|")}`;qt.set(n,(qt.get(n)??0)+1);let a=so(n);if(!document.getElementById(a)){let o=document.createElement("style");o.id=a,o.textContent=t,document.head.appendChild(o)}if(r>0){let o=document.fonts,i=e.family.replace(/^['"]|['"]$/g,""),c=Array.from(o||[]).filter(l=>l.family.replace(/^['"]|['"]$/g,"")===i),s=c.length>0?c.map(l=>l.load().catch(()=>{})):e.faces.map(l=>{let h=io(l.url);if(!h)return Promise.resolve();try{return new window.FontFace(i,`url(${h})`,{weight:Xs(l.weight),style:"normal"}).load().then(p=>{document.fonts?.add(p)}).catch(()=>{})}catch{return Promise.resolve()}});await Promise.race([Promise.all(s),new Promise(l=>setTimeout(l,r))])}}var Js=["400","500","600","700"];function Zs(e,r){let t=Array.from(new Set(Array.from(Object.values(r).join("")))).join(""),n=e.map(a=>`"${a.replace(/^['"]|['"]$/g,"")}"`).join(", ");return{text:t,stack:n}}function lo(e,r){let t=typeof document<"u"?document.fonts:null,{text:n,stack:a}=Zs(e,r);if(!t?.check||!n||!a)return!0;try{return Js.every(o=>t.check(`${o} 16px ${a}`,n))}catch{return!0}}async function ho(e,r,t){let n=typeof document<"u"?document.fonts:null;if(!n?.load)return;let{text:a,stack:o}=Zs(e,r);!a||!o||await Promise.race([Promise.all(Js.map(i=>n.load(`${i} 16px ${o}`,a).catch(()=>{}))),new Promise(i=>setTimeout(i,t))])}function la(e){let r=typeof e=="object"&&e?e:void 0,t=Ys(r?.fontFamily?.split(",")[0].trim().replace(/^['"]|['"]$/g,"")??""),n=typeof r?.fontUrl=="string"?{normal:r.fontUrl}:r?.fontUrl??{},a=n.normal??"",o=n.bold??"",i=n.variable??"";Ks(()=>{if(!t||!a&&!o&&!i)return;let c=i?[["100 900",i]]:[["400",a],["700",o]],s=[];for(let[p,u]of c){if(!u)continue;let f=io(u);if(!f)continue;let C=Yh(f);s.push(`@font-face{font-family:"${t}";font-style:normal;font-weight:${p};font-display:swap;src:url(${f})${C?` format("${C}")`:""};}`)}if(s.length===0)return;let l=s.join(""),h=`${t}|${a}|${o}|${i}`,d=so(h,"hsk-host-font");if(qt.set(h,(qt.get(h)??0)+1),!document.getElementById(d)){let p=document.createElement("style");p.id=d,p.textContent=l,document.head.appendChild(p)}return()=>{let p=(qt.get(h)??1)-1;if(p>0){qt.set(h,p);return}qt.delete(h),document.getElementById(d)?.remove()}},[t,a,o,i])}var ei=new WeakMap,ti=new WeakMap;function ri(e){return e?ti.get(e)??null:null}function po(e){if(!e)return Promise.resolve(null);let r=ei.get(e);if(r)return r;let t=Promise.resolve().then(()=>e.baseFont?.()??null).then(n=>(n&&(ti.set(e,n),Ut(n,0).catch(()=>{})),n)).catch(()=>null);return ei.set(e,t),t}function ni(e,r,t){e&&(po(e),r&&uo(e,r,t))}function uo(e,r,t){if(!(!e||!r))try{e.getUIStrings?.(r,t)?.then?.(n=>{n?.font&&Ut(n.font,1200).catch(()=>{})})?.catch?.(()=>{})}catch{}}import ii from"react";var Rn=[],pa=[{value:"English",native:"English",tag:"en",rtl:!1},{value:"Chinese",native:"\u4E2D\u6587",tag:"zh",rtl:!1},{value:"Spanish",native:"Espa\xF1ol",tag:"es",rtl:!1},{value:"Arabic",native:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",tag:"ar",rtl:!0},{value:"Hindi",native:"\u0939\u093F\u0928\u094D\u0926\u0940",tag:"hi",rtl:!1},{value:"French",native:"Fran\xE7ais",tag:"fr",rtl:!1},{value:"Swahili",native:"Kiswahili",tag:"sw",rtl:!1},{value:"Portuguese",native:"Portugu\xEAs",tag:"pt",rtl:!1},{value:"Japanese",native:"\u65E5\u672C\u8A9E",tag:"ja",rtl:!1},{value:"Urdu",native:"\u0627\u0631\u062F\u0648",tag:"ur",rtl:!0}];function Tn(e,r){if(!e)return;let t=e.trim();if(!t)return;let n=t.toLowerCase(),a=pa.find(c=>c.value.toLowerCase()===n||c.native.toLowerCase()===n||c.tag===n);if(a)return a.native;if(ha[n]?.endonym)return ha[n].endonym;let o=Object.values(ha).find(c=>c.endonym?.toLowerCase()===n);if(o?.endonym)return o.endonym;let i=r||(n.length<=3?n:void 0);if(i&&typeof Intl<"u"&&Intl.DisplayNames)try{let s=new Intl.DisplayNames([i],{type:"language"}).of(i);if(s&&s.toLowerCase()!==i.toLowerCase())return s}catch{}return t}function ai(e){for(let r of e){let t=r.codePointAt(0)??0;if(t>=1424&&t<=2303||t>=64285&&t<=65023||t>=65136&&t<=65279)return!0}return!1}var ha={english:{preparing:"Preparing in English\u2026",changeLang:"Change language",endonym:"English"},swahili:{preparing:"Inatayarisha kwa Kiswahili\u2026",changeLang:"Badilisha lugha",endonym:"Kiswahili"},french:{preparing:"Configuration en fran\xE7ais\u2026",changeLang:"Changer de langue",endonym:"Fran\xE7ais"},spanish:{preparing:"Configurando en espa\xF1ol\u2026",changeLang:"Cambiar idioma",endonym:"Espa\xF1ol"},arabic:{preparing:"\u062C\u0627\u0631\u064D \u0627\u0644\u0625\u0639\u062F\u0627\u062F \u0628\u0627\u0644\u0644\u063A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629\u2026",changeLang:"\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u0644\u063A\u0629",rtl:!0,endonym:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629"},portuguese:{preparing:"Configurando em portugu\xEAs\u2026",changeLang:"Alterar idioma",endonym:"Portugu\xEAs"},hindi:{preparing:"\u0939\u093F\u0928\u094D\u0926\u0940 \u092E\u0947\u0902 \u0924\u0948\u092F\u093E\u0930 \u0915\u093F\u092F\u093E \u091C\u093E \u0930\u0939\u093E \u0939\u0948\u2026",changeLang:"\u092D\u093E\u0937\u093E \u092C\u0926\u0932\u0947\u0902",endonym:"\u0939\u093F\u0928\u094D\u0926\u0940"},chinese:{preparing:"\u6B63\u5728\u51C6\u5907\u4E2D\u6587\u73AF\u5883\u2026",changeLang:"\u66F4\u6539\u8BED\u8A00",endonym:"\u4E2D\u6587"},urdu:{preparing:"\u0627\u0631\u062F\u0648 \u0645\u06CC\u06BA \u062A\u06CC\u0627\u0631\u06CC \u062C\u0627\u0631\u06CC \u06C1\u06D2\u2026",changeLang:"\u0632\u0628\u0627\u0646 \u062A\u0628\u062F\u06CC\u0644 \u06A9\u0631\u06CC\u06BA",rtl:!0,endonym:"\u0627\u0631\u062F\u0648"},japanese:{preparing:"\u65E5\u672C\u8A9E\u3092\u8A2D\u5B9A\u4E2D\u2026",changeLang:"\u8A00\u8A9E\u3092\u5909\u66F4",endonym:"\u65E5\u672C\u8A9E"},german:{preparing:"Wird auf Deutsch eingerichtet\u2026",changeLang:"Sprache \xE4ndern",endonym:"Deutsch"},italian:{preparing:"Configurazione in italiano\u2026",changeLang:"Cambia lingua",endonym:"Italiano"},russian:{preparing:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u043D\u0430 \u0440\u0443\u0441\u0441\u043A\u043E\u043C\u2026",changeLang:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u044F\u0437\u044B\u043A",endonym:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"},korean:{preparing:"\uD55C\uAD6D\uC5B4\uB85C \uC124\uC815 \uC911\u2026",changeLang:"\uC5B8\uC5B4 \uBCC0\uACBD",endonym:"\uD55C\uAD6D\uC5B4"},turkish:{preparing:"T\xFCrk\xE7e olarak haz\u0131rlan\u0131yor\u2026",changeLang:"Dili de\u011Fi\u015Ftir",endonym:"T\xFCrk\xE7e"},vietnamese:{preparing:"\u0110ang thi\u1EBFt l\u1EADp b\u1EB1ng Ti\u1EBFng Vi\u1EC7t\u2026",changeLang:"\u0110\u1ED5i ng\xF4n ng\u1EEF",endonym:"Ti\u1EBFng Vi\u1EC7t"},indonesian:{preparing:"Menyiapkan dalam Bahasa Indonesia\u2026",changeLang:"Ubah bahasa",endonym:"Bahasa Indonesia"},malay:{preparing:"Menyediakan dalam Bahasa Melayu\u2026",changeLang:"Tukar bahasa",endonym:"Bahasa Melayu"},bahasa:{preparing:"Menyediakan dalam Bahasa Melayu\u2026",changeLang:"Tukar bahasa",endonym:"Bahasa Melayu"},polish:{preparing:"Przygotowywanie w j\u0119zyku polskim\u2026",changeLang:"Zmie\u0144 j\u0119zyk",endonym:"Polski"},dutch:{preparing:"Instellen in het Nederlands\u2026",changeLang:"Taal wijzigen",endonym:"Nederlands"},thai:{preparing:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22\u2026",changeLang:"\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E20\u0E32\u0E29\u0E32",endonym:"\u0E44\u0E17\u0E22"},bengali:{preparing:"\u09AC\u09BE\u0982\u09B2\u09BE\u09AF\u09BC \u09AA\u09CD\u09B0\u09B8\u09CD\u09A4\u09C1\u09A4 \u0995\u09B0\u09BE \u09B9\u099A\u09CD\u099B\u09C7\u2026",changeLang:"\u09AD\u09BE\u09B7\u09BE \u09AA\u09B0\u09BF\u09AC\u09B0\u09CD\u09A4\u09A8 \u0995\u09B0\u09C1\u09A8",endonym:"\u09AC\u09BE\u0982\u09B2\u09BE"},tamil:{preparing:"\u0BA4\u0BAE\u0BBF\u0BB4\u0BBF\u0BB2\u0BCD \u0BA4\u0BAF\u0BBE\u0BB0\u0BCD \u0B9A\u0BC6\u0BAF\u0BCD\u0BAF\u0BAA\u0BCD\u0BAA\u0B9F\u0BC1\u0B95\u0BBF\u0BB1\u0BA4\u0BC1\u2026",changeLang:"\u0BAE\u0BCA\u0BB4\u0BBF\u0BAF\u0BC8 \u0BAE\u0BBE\u0BB1\u0BCD\u0BB1\u0BB5\u0BC1\u0BAE\u0BCD",endonym:"\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD"},telugu:{preparing:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41\u0C32\u0C4B \u0C38\u0C3F\u0C26\u0C4D\u0C27\u0C02 \u0C1A\u0C47\u0C38\u0C4D\u0C24\u0C4B\u0C02\u0C26\u0C3F\u2026",changeLang:"\u0C2D\u0C3E\u0C37\u0C28\u0C41 \u0C2E\u0C3E\u0C30\u0C4D\u0C1A\u0C02\u0C21\u0C3F",endonym:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41"},persian:{preparing:"\u062F\u0631 \u062D\u0627\u0644 \u0622\u0645\u0627\u062F\u0647\u200C\u0633\u0627\u0632\u06CC \u0628\u0647 \u0632\u0628\u0627\u0646 \u0641\u0627\u0631\u0633\u06CC\u2026",changeLang:"\u062A\u063A\u06CC\u06CC\u0631 \u0632\u0628\u0627\u0646",rtl:!0,endonym:"\u0641\u0627\u0631\u0633\u06CC"},farsi:{preparing:"\u062F\u0631 \u062D\u0627\u0644 \u0622\u0645\u0627\u062F\u0647\u200C\u0633\u0627\u0632\u06CC \u0628\u0647 \u0632\u0628\u0627\u0646 \u0641\u0627\u0631\u0633\u06CC\u2026",changeLang:"\u062A\u063A\u06CC\u06CC\u0631 \u0632\u0628\u0627\u0646",rtl:!0,endonym:"\u0641\u0627\u0631\u0633\u06CC"},greek:{preparing:"\u03A1\u03CD\u03B8\u03BC\u03B9\u03C3\u03B7 \u03C3\u03C4\u03B1 \u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC\u2026",changeLang:"\u0391\u03BB\u03BB\u03B1\u03B3\u03AE \u03B3\u03BB\u03CE\u03C3\u03C3\u03B1\u03C2",endonym:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC"},hebrew:{preparing:"\u05DE\u05D2\u05D3\u05D9\u05E8 \u05D1\u05E2\u05D1\u05E8\u05D9\u05EA\u2026",changeLang:"\u05E9\u05E0\u05D4 \u05E9\u05E4\u05D4",rtl:!0,endonym:"\u05E2\u05D1\u05E8\u05D9\u05EA"},burmese:{preparing:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C\u1016\u103C\u1004\u1037\u103A \u1015\u103C\u1004\u103A\u1006\u1004\u103A\u1014\u1031\u101E\u100A\u103A\u2026",changeLang:"\u1018\u102C\u101E\u102C\u1005\u1000\u102C\u1038\u1015\u103C\u1031\u102C\u1004\u103A\u1038\u101B\u1014\u103A",endonym:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C"},burma:{preparing:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C\u1016\u103C\u1004\u1037\u103A \u1015\u103C\u1004\u103A\u1006\u1004\u103A\u1014\u1031\u101E\u100A\u103A\u2026",changeLang:"\u1018\u102C\u101E\u102C\u1005\u1000\u102C\u1038\u1015\u103C\u1031\u102C\u1004\u103A\u1038\u101B\u1014\u103A",endonym:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C"},myanmar:{preparing:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C\u1016\u103C\u1004\u1037\u103A \u1015\u103C\u1004\u103A\u1006\u1004\u103A\u1014\u1031\u101E\u100A\u103A\u2026",changeLang:"\u1018\u102C\u101E\u102C\u1005\u1000\u102C\u1038\u1015\u103C\u1031\u102C\u1004\u103A\u1038\u101B\u1014\u103A",endonym:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C"},khmer:{preparing:"\u1780\u17C6\u1796\u17BB\u1784\u179A\u17C0\u1794\u1785\u17C6\u1787\u17B6\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A\u2026",changeLang:"\u1794\u17D2\u178F\u17BC\u179A\u1797\u17B6\u179F\u17B6",endonym:"\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A"},cambodian:{preparing:"\u1780\u17C6\u1796\u17BB\u1784\u179A\u17C0\u1794\u1785\u17C6\u1787\u17B6\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A\u2026",changeLang:"\u1794\u17D2\u178F\u17BC\u179A\u1797\u17B6\u179F\u17B6",endonym:"\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A"},swedish:{preparing:"St\xE4ller in p\xE5 svenska\u2026",changeLang:"Byt spr\xE5k",endonym:"Svenska"},svenska:{preparing:"St\xE4ller in p\xE5 svenska\u2026",changeLang:"Byt spr\xE5k",endonym:"Svenska"},sv:{preparing:"St\xE4ller in p\xE5 svenska\u2026",changeLang:"Byt spr\xE5k",endonym:"Svenska"},kikuyu:{preparing:"G\u0129k\u0169y\u0169 g\u0129g\u0129thondekwo\u2026",changeLang:"Cenjia r\u0169thiomi",endonym:"G\u0129k\u0169y\u0169"},gikuyu:{preparing:"G\u0129k\u0169y\u0169 g\u0129g\u0129thondekwo\u2026",changeLang:"Cenjia r\u0169thiomi",endonym:"G\u0129k\u0169y\u0169"},akan:{preparing:"Y\u025Bresiesie w\u0254 Akan mu\u2026",changeLang:"Sesa kasa",endonym:"Akan"},twi:{preparing:"Y\u025Bresiesie w\u0254 Twi mu\u2026",changeLang:"Sesa kasa",endonym:"Twi"},yoruba:{preparing:"Ngbaradi ni \xC8d\xE8 Yor\xF9b\xE1\u2026",changeLang:"Yi ede pada",endonym:"\xC8d\xE8 Yor\xF9b\xE1"},amharic:{preparing:"\u1260\u12A0\u121B\u122D\u129B \u1260\u1218\u12D8\u130B\u1300\u1275 \u120B\u12ED\u2026",changeLang:"\u124B\u1295\u124B \u1240\u12ED\u122D",endonym:"\u12A0\u121B\u122D\u129B"},somali:{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},soomaali:{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},"af-soomaali":{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},so:{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},hausa:{preparing:"Shirya cikin Hausa\u2026",changeLang:"Canja harshe",endonym:"Hausa"},zulu:{preparing:"Ilungiselela ngesiZulu\u2026",changeLang:"Shintsha ulimi",endonym:"isiZulu"},oromo:{preparing:"Afaan Oromootiin qophaa'aa jira\u2026",changeLang:"Afaan jijjiiri",endonym:"Afaan Oromoo"},luganda:{preparing:"Tuteekateeka mu Oluganda\u2026",changeLang:"Kyusa olulimi",endonym:"Oluganda"},igbo:{preparing:"Na-akwadebe na As\u1EE5s\u1EE5 Igbo\u2026",changeLang:"Gbanwee as\u1EE5s\u1EE5",endonym:"As\u1EE5s\u1EE5 Igbo"},xhosa:{preparing:"Ilungiselela ngesiXhosa\u2026",changeLang:"Tshintsha ulwimi",endonym:"isiXhosa"},kinyarwanda:{preparing:"Guteza imbere mu Kinyarwanda\u2026",changeLang:"Hindura ururimi",endonym:"Ikinyarwanda"},lingala:{preparing:"Kozala na Ling\xE1la\u2026",changeLang:"Bongola lok\xF3t\xE1",endonym:"Ling\xE1la"},shona:{preparing:"Kugadzirira mu chiShona\u2026",changeLang:"Chinja mutauro",endonym:"chiShona"},tigrinya:{preparing:"\u1265\u1275\u130D\u122D\u129B \u12A3\u1265 \u121D\u12F5\u120B\u12CD \u12ED\u122D\u12A8\u1265\u2026",changeLang:"\u124B\u1295\u124B \u121D\u1255\u12EB\u122D",endonym:"\u1275\u130D\u122D\u129B"},wolof:{preparing:"Waajal ci Wolof\u2026",changeLang:"Soppi l\xE0kk",endonym:"Wolof"},afrikaans:{preparing:"Berei voor in Afrikaans\u2026",changeLang:"Verander taal",endonym:"Afrikaans"}};function oi(e){let r=e.trim();return r?r.charAt(0).toUpperCase()+r.slice(1):"\u2026"}function Rr(e){if(!e)return{nativeName:"\u2026",preparing:"Preparing\u2026",changeLang:"\u2190",rtl:!1,known:!0};let r=e.trim().toLowerCase(),t=Object.entries(ha).find(([i,c])=>i===r||c.endonym?.toLowerCase()===r||Tn(i)?.toLowerCase()===r);if(t)return{nativeName:t[1].endonym||Tn(e)||oi(e),preparing:t[1].preparing,changeLang:t[1].changeLang,rtl:!!t[1].rtl||ai(t[1].preparing),known:!0};let n=Tn(e)||e,a=oi(n),o=ai(a);return{nativeName:a,preparing:`Preparing in ${a}\u2026`,changeLang:o?"\u062A\u063A\u064A\u064A\u0631":"Change",rtl:o,known:!1}}var En=[{name:"Puck",trait:"Upbeat",gender:"male"},{name:"Charon",trait:"Informative",gender:"male"},{name:"Kore",trait:"Firm",gender:"female"},{name:"Aoede",trait:"Breezy",gender:"female"},{name:"Zephyr",trait:"Bright",gender:"female"},{name:"Fenrir",trait:"Excitable",gender:"male"},{name:"Leda",trait:"Youthful",gender:"female"},{name:"Orus",trait:"Firm",gender:"male"},{name:"Callirrhoe",trait:"Easy-going",gender:"female"},{name:"Autonoe",trait:"Bright",gender:"female"},{name:"Enceladus",trait:"Breathy",gender:"male"},{name:"Iapetus",trait:"Clear",gender:"male"},{name:"Umbriel",trait:"Easy-going",gender:"male"},{name:"Algieba",trait:"Smooth",gender:"male"},{name:"Despina",trait:"Smooth",gender:"female"},{name:"Erinome",trait:"Clear",gender:"female"},{name:"Algenib",trait:"Gravelly",gender:"male"},{name:"Rasalgethi",trait:"Informative",gender:"male"},{name:"Laomedeia",trait:"Upbeat",gender:"female"},{name:"Achernar",trait:"Soft",gender:"female"},{name:"Alnilam",trait:"Firm",gender:"male"},{name:"Schedar",trait:"Even",gender:"male"},{name:"Gacrux",trait:"Mature",gender:"female"},{name:"Pulcherrima",trait:"Forward",gender:"female"},{name:"Achird",trait:"Friendly",gender:"male"},{name:"Zubenelgenubi",trait:"Casual",gender:"male"},{name:"Vindemiatrix",trait:"Gentle",gender:"female"},{name:"Sadachbia",trait:"Lively",gender:"male"},{name:"Sadaltager",trait:"Knowledgeable",gender:"male"},{name:"Sulafat",trait:"Warm",gender:"female"}],mo="hsk-live-voice",fr={langPlaceholder:"Type your language\u2026",nameStepTitle:"Good to meet you.",nameStepAsk:"What should I call you?",namePlaceholder:"Type your name\u2026",howShouldResultsLook:"How do you want to see results?",entityLangIntro:"I will write to you in {lang}. Names stay as this website wrote them. For the other details, choose below.",asWritten:"Same as the website",inLanguage:"In {lang}",namesAsWritten:"Details stay exactly as the website wrote them.",detailsTranslated:"Details are translated. Numbers and links do not change.",entityLangPlaceholder:"Choose one, then press Continue\u2026",termsStepTitle:"Privacy and terms",termsStepSubtitle:"Please read how kiku works on this website.",termsPiiTitle:"Your contact details",termsPiiDesc:"kiku never asks for your email, phone number or real name. Any name or nickname is fine.",termsSessionTitle:"A random code",termsSessionDesc:"Your browser keeps a random code so kiku can remember your conversation. The code is not linked to your name.",termsMemoryTitle:"What is kept",termsMemoryDesc:"Chat messages aren't saved for analytics. Search-bar queries and usage counts help this website improve. If you ask to speak to its team, that support conversation is saved. Things you save with @kiku are kept at mimi.akropolys.cloud, and only your secret key opens them.",termsCookieTitle:"This website's own rules",termsCookieDesc:"This website may use cookies or collect more information. kiku does not control this.",termsAiTitle:"From this website, explained by AI",termsAiDesc:"kiku answers from what this website really lists. The facts are the website's own; how kiku summarises, compares or translates them is AI and may read them differently. Check anything that matters on the website itself.",termsAgreeButton:"I agree",termsAgreeCounting:"I agree ({seconds}s)",nameStepHint:"Any name or nickname is fine.",privacyMore:"Read our full terms at",continueButton:"Continue",termsPlaceholder:"Please read the notes above\u2026",allSet:"You are ready, {name}.",replyingOriginal:"I will write to you in {lang}. Results stay as this website wrote them. Ask me anything.",replyingTranslated:"I will write to you in {lang}. Results will be translated too. Ask me anything.",greetReturning:"Hello, {name}.",greetReturningLead:"What can I find for you today?",defaultPlaceholder:"Ask me anything\u2026"},Lt={back:"Back",langPlaceholder:"Type your language\u2026",nameStepTitle:"Good to meet you.",nameStepAsk:"What should I call you?",namePlaceholder:"Type your name\u2026",attachImage:"Attach a photo",vizUnavailable:"The preview could not be loaded.",vizDisclaimerImage:"Generated using Artificial Intelligence \u2014 colours, size and placement may differ from the real product.",vizDisclaimerVideo:"Generated using Artificial Intelligence \u2014 colours, size and movement may differ from the real product.",calcDisclaimer:"This is a calculation from live figures, not a guarantee \u2014 the market can move against it.",staleTitle:"No longer available",staleRemoved:"{title} has been removed and is no longer on offer.",staleUnavailable:"{title} is currently unavailable.",keyPastePrompt:"Paste your public id \u2014 or create one",keyPastePlaceholder:"your public id\u2026",keyUseMine:"Use my id",keyCreating:"Creating\u2026",keyCreateNew:"I'm new \u2014 create one",keySecretTitle:"Your secret key \u2014 shown once",keyDismiss:"Dismiss",keyCopySecret:"Copy",keyCopied:"Copied",keySecretHint:"Keep it private. It unlocks your memory.",keyPublicTitle:"Your public id",keyCopyId:"Copy id",greetReturning:"Hello, {name}.",greetReturningLead:"What can I find for you today?",howShouldResultsLook:"How do you want to see results?",entityLangIntro:"I will write to you in {lang}. Names stay as this website wrote them. For the other details, choose below.",asWritten:"Same as the website",inLanguage:"In {lang}",namesAsWritten:"Details stay exactly as the website wrote them.",detailsTranslated:"Details are translated. Numbers and links do not change.",entityLangPlaceholder:"Choose one, then press Continue\u2026",termsStepTitle:"Privacy and terms",termsStepSubtitle:"Please read how kiku works on this website.",termsPiiTitle:"Your contact details",termsPiiDesc:"kiku never asks for your email, phone number or real name. Any name or nickname is fine.",termsSessionTitle:"A random code",termsSessionDesc:"Your browser keeps a random code so kiku can remember your conversation. The code is not linked to your name.",termsMemoryTitle:"What is kept",termsMemoryDesc:"Chat messages aren't saved for analytics. Search-bar queries and usage counts help this website improve. If you ask to speak to its team, that support conversation is saved. Things you save with @kiku are kept at mimi.akropolys.cloud, and only your secret key opens them.",termsCookieTitle:"This website's own rules",termsCookieDesc:"This website may use cookies or collect more information. kiku does not control this.",termsAiTitle:"From this website, explained by AI",termsAiDesc:"kiku answers from what this website really lists. The facts are the website's own; how kiku summarises, compares or translates them is AI and may read them differently. Check anything that matters on the website itself.",termsAgreeButton:"I agree",termsAgreeCounting:"I agree ({seconds}s)",nameStepHint:"Any name or nickname is fine.",privacyMore:"Read our full terms at",continueButton:"Continue",termsPlaceholder:"Please read the notes above\u2026",allSet:"You are ready, {name}.",replyingTranslated:"I will write to you in {lang}. Results will be translated too. Ask me anything.",replyingOriginal:"I will write to you in {lang}. Results stay as this website wrote them. Ask me anything.",defaultPlaceholder:"Ask me anything\u2026",voiceListening:"Listening\u2026 tap the mic to stop",voiceSending:"Got it \u2014 sending\u2026",voiceModeStart:"Hands-free conversation",voiceModeExit:"Leave hands-free",voicePhaseListening:"Listening",voicePhaseThinking:"Thinking",micDenied:"Microphone blocked. Allow mic access for this site, then try again.",micInsecure:"Voice needs a secure (https) connection.",micMissing:"No microphone found.",micLangUnsupported:"This browser cannot transcribe that language yet. Type instead.",micNetwork:"Couldn't reach voice. Try again in a moment.",voiceUnavailable:"Voice is unavailable right now. Try again in a moment.",voiceLimitReached:"You've used up today's voice time. It resets in a day \u2014 chat still works.",voiceSiteLimit:"Voice is out of allowance on this site for now. Chat still works.",voiceIdleEnded:"Voice closed after a quiet minute. Tap the mic to talk again.",voiceSessionEnded:"Voice session ended. Tap the mic to talk again.",voicePhotoFailed:"That photo couldn't be added. Try another one.",voiceAttachPhoto:"Attach a photo",voicePickerLabel:"Choose a voice",voiceFemale:"Female",voiceMale:"Male",voiceNewChat:"New voice chat",pillVoice:"{n} min voice",pillImages:"{n} images",pillVideos:"{n} videos",pillReplies:"{n} replies",micNoSpeech:"Didn't catch anything. Try again, a little closer to the mic.",micFailed:"Couldn't hear that. Try again.",clearChat:"Clear chat",thinking:"Thinking",thoughtForSeconds:"Thought for {duration}",thoughtProcess:"Thought process",reachingTeam:"Getting a person",passedToTeam:"Passed to a person",withTeam:"Sent to the team \xB7 a person will reply here",repliedIn:"Replied in {duration}",backWithKiku:"Kiku is back with you",teamClosed:"The team closed this conversation",teamJoined:"Another team member joined the conversation",leaveHumanWarning:"A person is replying here.",leaveHumanStay:"Wait",leaveHumanKeep:"Keep for later",leaveHumanConfirm:"End request",requestsTitle:"Your requests",requestWaiting:"Waiting for a person",requestHuman:"With a person",requestKiku:"Answered",requestClosed:"Closed",requestNewReply:"New reply",captureAndRemember:"kiku \u2014 capture & remember",captureCurrentPage:"Capture current page",captureAll:"Capture all ({count})",whatHaveYouSaved:"What have you saved?",deleteThis:"Delete this",errShopperReplyLimit:"You've reached this site's reply limit. It resets in 24 hours.",errAccessRevoked:"Your access to the assistant has been revoked on this website.",errAccountRequired:"Please create an account to continue using the chat assistant.",errStreamInterrupted:"The reply was interrupted. Please try again.",errNetwork:"The assistant couldn't respond just now \u2014 please try again in a moment.",errGeneric:"Something went wrong. Please try again.",vizWorking:"Visualizing\u2026",vizMarkEdit:"Mark & edit",swatchTarget:"Your colour",markupCancel:"Cancel",markupSketch:"Sketch",markupPin:"Edit Pin",markupPinLabel:"What should happen here?",markupPinLabelHint:"e.g. move the sofa here",markupSketchHint:"Sketch around an area, then drop a pin saying what to do with it.",markupRemovePin:"Remove pin",markupPinHint:"Drop a pin and say what should happen there. Drag to move it. Up to 4 pins.",markupSelect:"Select outline",markupCloseOutline:"Close outline",markupOutlineHint:"Tap around the item, then close the outline. Undo removes the last point.",markupSelectedHint:"Drag the outline points to refine, then drop a pin saying what to do with it.",markupEraser:"Eraser",markupUndo:"Undo",markupClear:"Clear",markupSend:"Send",markupDialogLabel:"Mark up image",markupError:"Couldn't process this image \u2014 try a newer visualization.",markupLoadError:"This image can't be edited here.",markupLoading:"Loading image\u2026",openMemory:"Open my memory on MiMi",errTooManyRequests:"The assistant is currently receiving too many requests. Please try again in a few moments.",errTokenLimit:"You've reached your usage limit. Please update your billing limits in your dashboard to continue.",statusSent:"Sent",statusStopped:"Sent \xB7 reply stopped",queuedWaiting:"Queued",queuedSendNow:"Send now",jumpToLatest:"Scroll to latest",timelineLabel:"Questions in this conversation",voiceConnecting:"Connecting \u2014 wait for the tone before speaking",stoppedByYou:"You stopped this response.",stoppedInterrupted:"This response was interrupted.",continueGenerating:"Continue generating",generateResponse:"Generate response",pillCompareTop2:"Compare top 2",pillCompareTop2Query:"Compare the {a} and {b}",pillMoreOn:"More on {name}",pillMoreOnQuery:"Tell me more about the {name}",pillSimilarOptions:"Similar options",pillSimilarOptionsQuery:"Show me more like the {name}",pillWhichBest:"Which is best?",pillWhichBestQuery:"Which one would you recommend and why?",pillFindAlternatives:"Find alternatives",pillFindAlternativesQuery:"What are good alternatives to the {name}?",pillShowPopular:"Show popular items",pillShowPopularQuery:"What are your most popular items?",pillRecommend:"Recommend something",pillRecommendQuery:"What do you recommend for me?",cardClickAnswer:"The {name}",cardClickQuery:"Tell me more about the {name}{details} \u2014 what are its key details, who is it best suited for, and what should I know?",displayCapture:"capture {name}",displayCaptureAll:"capture all ({count} items)",displayViewHistory:"what have you saved?",displayDelete:"delete this",retry:"Retry",edit:"Edit",copy:"Copy",copied:"Copied",msgFailed:"Failed to send"},bo=ii.createContext((e,r)=>{let t=Lt[e];if(r)for(let[n,a]of Object.entries(r))t=t.split(`{${n}}`).join(a);return t}),kr=()=>ii.useContext(bo);function ci(e){let r=e.trim();if(!r||r.length>40||r.includes("?"))return null;r=r.replace(/^(hi|hey|hello|yo)[,!.\s]+/i,""),r=r.replace(/^(i['’]?m|im|my name is|call me|it['’]?s|this is|name['’]?s)\s+/i,""),r=r.trim().replace(/[.!,]+$/,"");let t=r.split(/\s+/);if(t.length===0||t.length>3||!/^[\p{L}][\p{L}\-'’ ]{0,30}$/u.test(r))return null;let n=r.toLowerCase();if(["phone","laptop","tv","cheap","best","under","buy","search","find","show","need","want","price","sofa","shoe","headphone","camera","gift","help"].some(i=>n.includes(i)))return null;let o=t[0];return o.charAt(0).toUpperCase()+o.slice(1)}var si={shopper_reply_limit:"errShopperReplyLimit",RATE_LIMIT_EXCEEDED:"errShopperReplyLimit",access_revoked:"errAccessRevoked",account_required:"errAccountRequired",stream_interrupted:"errStreamInterrupted"};var li=(e,r)=>{let t=e&&typeof e=="object"?e.code:void 0;if(t&&si[t])return r(si[t]);let n="";if(typeof e=="string")n=e;else if(e&&typeof e=="object"&&e.message)n=e.message;else try{n=JSON.stringify(e)}catch{n=String(e)}let a=n.toLowerCase();if(a.includes("429")||a.includes("too many requests")||a.includes("requests per minute limit exceeded")||a.includes("too_many_requests_error")||a.includes("request_quota_exceeded")||a.includes("quota"))return r("errTooManyRequests");if(a.includes("token limit"))return r("errTokenLimit");if(a.includes("failed to fetch")||a.includes("networkerror")||a.includes("request failed"))return r("errNetwork");if(n)try{console.warn("[kiku] untranslated error:",n)}catch{}return r("errGeneric")},hi=()=>typeof window>"u"||window.isSecureContext!==!1,fo=15;var pi="light",Jh=["light","dark","mahogany","blush","coffee","midnight"];function ko(e){return typeof e=="string"&&Jh.includes(e)}function di(e){if(ko(e))return e;try{let r=typeof window<"u"?localStorage.getItem("akropolys_theme"):null;if(ko(r))return r}catch{}return pi}import Xn,{useState as Ge,useEffect as Nt,useRef as it,useCallback as It,useId as Yu}from"react";import{Fragment as _m,jsx as te,jsxs as ot}from"react/jsx-runtime";var Zh=({className:e,size:r=18,tight:t=!1})=>te("svg",{className:ne("hsk-brand-mark",e),width:r,height:r,viewBox:t?"10.2 17.4 79.5 79.5":"0 0 100 100",xmlns:"http://www.w3.org/2000/svg","aria-label":"kiku",children:ot("g",{transform:"translate(22.7 19) scale(0.62)",fill:"currentColor",fillRule:"evenodd",children:[te("path",{d:"M39.4 10.4 Q44 0 48.6 10.4 L86.1 95.8 Q88 100 83.4 100 L4.6 100 Q0 100 1.9 95.8 Z M24 100 L24 65 Q24 60 27.4 56.3 Q44 38 60.6 56.3 Q64 60 64 65 L64 100 Z"}),te("circle",{cx:"55",cy:"82",r:"3.4"})]})}),sr=Zh,ui=()=>ot("svg",{className:"hsk-stop-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[te("circle",{className:"hsk-stop-ring",cx:"12",cy:"12",r:"9.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),te("rect",{className:"hsk-stop-core",x:"8.5",y:"8.5",width:"7",height:"7",rx:"1.8",fill:"currentColor"})]});var mi=()=>ot("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),te("polyline",{points:"15 3 21 3 21 9"}),te("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),bi=()=>te("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"currentColor",children:te("path",{d:"M8 5v14l11-7z"})}),Jr=()=>ot("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[te("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),te("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Zr=()=>te("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:te("path",{d:"m15 18-6-6 6-6"})}),en=()=>te("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:te("path",{d:"m9 18 6-6-6-6"})}),fi=()=>ot("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),te("path",{d:"M3 3v5h5"}),te("path",{d:"M12 7v5l4 2"})]}),da=()=>te("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:te("path",{d:"M19 21 12 16l-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"})}),ua=()=>ot("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{d:"M3 6h18"}),te("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]});var ki=()=>te("svg",{width:"19",height:"19",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:te("path",{d:"M12 5v14M5 12h14"})}),gi=({size:e=18}={})=>ot("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{d:"M21 11.5a8.4 8.4 0 0 1-12.3 7.4L3 21l2.1-5.7A8.4 8.4 0 1 1 21 11.5Z"}),[8.9,12.6,16.3].map((r,t)=>te("circle",{className:"hsk-mimi-dot",style:{"--hsk-dot":t},cx:r,cy:"11.6",r:"1.15",fill:"currentColor",stroke:"none"},r))]}),go=()=>te("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:te("path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"})}),xi=()=>ot("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4"}),te("circle",{className:"hsk-img-sun",cx:"9",cy:"9",r:"1.8"}),te("path",{className:"hsk-img-ridge",d:"m21 15-4.5-4.5L6 21"})]}),Ln=({className:e,size:r=13}={})=>ot("svg",{className:ne("hsk-retry-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{className:"hsk-retry-arrow",d:"M21.5 2v6h-6"}),te("path",{className:"hsk-retry-arc",d:"M21.34 15.57a10 10 0 1 1-.57-8.38l5.67-5.19"})]}),ma=({className:e,size:r=13}={})=>ot("svg",{className:ne("hsk-edit-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{className:"hsk-edit-pencil",d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"}),te("path",{className:"hsk-edit-lead",d:"m15 5 4 4"})]}),Er=({className:e,size:r=13}={})=>ot("svg",{className:ne("hsk-copy-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("rect",{className:"hsk-copy-sheet",x:"8.5",y:"7",width:"12",height:"14",rx:"3.5"}),te("path",{className:"hsk-copy-back",d:"M5 15H4.5A2.5 2.5 0 0 1 2 12.5V4.5A2.5 2.5 0 0 1 4.5 2h8A2.5 2.5 0 0 1 15 4.5V5"})]}),Lr=({className:e,size:r=13}={})=>te("svg",{className:ne("hsk-check-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",children:te("polyline",{className:"hsk-check-mark",points:"20 6 9 17 4 12"})}),zn=({className:e,size:r=18}={})=>ot("svg",{className:e,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{className:"hsk-mic-cap",d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3z"}),te("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),te("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),vi=()=>ot("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("line",{className:"hsk-mic-slash",x1:"2",y1:"2",x2:"22",y2:"22"}),te("path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"}),te("path",{d:"M5 10v2a7 7 0 0 0 12 5"}),te("path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"}),te("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12"}),te("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),xo=({active:e})=>ot("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{className:"hsk-wave-bar hsk-wave-bar--tip",style:{"--hsk-bar":0,"--hsk-amp":1.9,"--hsk-period":"1.24s"},d:"M2 12h2"}),te("path",{className:"hsk-wave-bar",style:{"--hsk-bar":1,"--hsk-amp":1.78,"--hsk-period":"0.94s"},d:"M6 8v8"}),te("path",{className:"hsk-wave-bar",style:{"--hsk-bar":2,"--hsk-amp":1.26,"--hsk-period":"1.42s"},d:"M10 4v16"}),te("path",{className:"hsk-wave-bar",style:{"--hsk-bar":3,"--hsk-amp":1.62,"--hsk-period":"1.08s"},d:"M14 7v10"}),te("path",{className:"hsk-wave-bar",style:{"--hsk-bar":4,"--hsk-amp":2.05,"--hsk-period":"0.86s"},d:"M18 9v6"}),te("path",{className:"hsk-wave-bar hsk-wave-bar--tip",style:{"--hsk-bar":5,"--hsk-amp":1.9,"--hsk-period":"1.32s"},d:"M22 12h-2"})]}),yi=()=>ot("svg",{className:"hsk-telegram-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("polygon",{className:"hsk-kite-wing hsk-kite-wing--far",points:"22 2 11 13 2 9"}),te("polygon",{className:"hsk-kite-wing hsk-kite-wing--near",points:"22 2 15 22 11 13"}),te("line",{className:"hsk-kite-spine",x1:"22",y1:"2",x2:"11",y2:"13"})]}),wi=()=>ot("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("circle",{className:"hsk-sun-core",cx:"12",cy:"12",r:"5"}),ot("g",{className:"hsk-sun-rays",children:[te("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),te("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),te("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),te("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),te("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),te("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),te("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),te("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})]}),Ci=()=>te("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:te("path",{className:"hsk-moon-body",d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),Si=()=>ot("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{className:"hsk-wood-layer",style:{"--hsk-layer":0},d:"M12 2L2 7l10 5 10-5-10-5z"}),te("path",{className:"hsk-wood-layer",style:{"--hsk-layer":2},d:"M2 17l10 5 10-5"}),te("path",{className:"hsk-wood-layer",style:{"--hsk-layer":1},d:"M2 12l10 5 10-5"})]}),Mi=()=>te("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:te("path",{className:"hsk-heart-body",d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})}),Ti=()=>ot("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{d:"M17 8h1a4 4 0 1 1 0 8h-1"}),te("path",{d:"M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4z"}),te("line",{className:"hsk-steam",style:{"--hsk-steam":0},x1:"6",y1:"1",x2:"6",y2:"4"}),te("line",{className:"hsk-steam",style:{"--hsk-steam":1},x1:"10",y1:"1",x2:"10",y2:"4"}),te("line",{className:"hsk-steam",style:{"--hsk-steam":2},x1:"14",y1:"1",x2:"14",y2:"4"})]}),Ri=()=>ot("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{d:"M12 3a6.5 6.5 0 0 0 9 9 9 9 0 1 1-9-9z"}),te("path",{className:"hsk-star-spark",d:"M18.5 2.5l.6 1.6 1.6.6-1.6.6-.6 1.6-.6-1.6-1.6-.6 1.6-.6z"})]});var Ei=({size:e=11})=>ot("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round",children:[te("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),te("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Li=({className:e,size:r=16,filled:t=!1}={})=>ot("svg",{className:ne("hsk-pin-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:t?"currentColor":"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("line",{x1:"12",y1:"17",x2:"12",y2:"22"}),te("path",{d:"M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V17z"})]});var tn=[{id:"light",label:"Silver",Icon:wi,dark:!1},{id:"dark",label:"Onyx",Icon:Ci,dark:!0},{id:"mahogany",label:"Mahogany",Icon:Si,dark:!0},{id:"blush",label:"Blush",Icon:Mi,dark:!1},{id:"coffee",label:"Coffee",Icon:Ti,dark:!1},{id:"midnight",label:"Midnight",Icon:Ri,dark:!0}];function vo(e){return tn.find(r=>r.id===e)??tn[0]}import{useKiku as Xu,subscribeLiveStream as Qu}from"@akropolys/sdk";import{useAkropolysContext as Ju,useCardFields as Zu}from"@akropolys/sdk";import{useEffect as ep,useRef as tp}from"react";function rp(e,r,t=.55){return r<=0?0:e*r*t/(r+t*Math.abs(e))}function np({stiffness:e=500,damping:r=45,onFrame:t,onRest:n}){let a=0,o=0,i=0,c=null,s=0,l=d=>{let p=Math.min(.032,(d-s)/1e3)||.016666666666666666;s=d;let u=Math.max(1,Math.ceil(p/.008)),f=p/u;for(let C=0;C<u;C++){let b=-e*(a-i)-r*o;o+=b*f,a+=o*f}if(Math.abs(a-i)<.5&&Math.abs(o)<.5){a=i,o=0,c=null,t(a),n?.();return}t(a),c=requestAnimationFrame(l)},h=()=>{c===null&&(s=performance.now(),c=requestAnimationFrame(l))};return{track(d){c!==null&&(cancelAnimationFrame(c),c=null),a=d,o=0,t(a)},to(d,p=0){i=d,o=p,h()},get value(){return a},stop(){c!==null&&(cancelAnimationFrame(c),c=null)}}}function zi({panel:e,scroller:r,onDismiss:t,quiescent:n,enabled:a=!0}){let o=tp(t);o.current=t,ep(()=>{if(!a)return;let i=e();if(!i||typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches)return;let c=!1,s=0,l=0,h=0,d=-1,p=0,u=0,f=0,C=!1,b=!1,x=np({onFrame:F=>{i.style.transform=F===0?"":`translate3d(0, ${F}px, 0)`;let T=i.parentElement;T&&(T.style.opacity=F===0?"":String(Math.max(.35,1-F/(i.offsetHeight||1)*1.1)))},onRest:()=>{i.style.willChange="",b&&(b=!1,o.current())}}),z=()=>{let F=r();return F&&F.scrollTop>0?!1:n?n():!0},S=F=>{F.pointerType==="mouse"||!F.isPrimary||(c=!1,C=!1,d=F.pointerId,s=p=F.clientY,l=F.clientX,u=F.timeStamp,f=0,h=x.value)},w=F=>{if(F.pointerId!==d)return;let T=F.clientY-s,U=F.clientX-l;if(!C){if(Math.abs(T)<6&&Math.abs(U)<6)return;if(C=!0,c=T>0&&Math.abs(T)>Math.abs(U)&&z(),c){try{i.setPointerCapture(F.pointerId)}catch{}x.stop(),i.style.animation="none",i.style.willChange="transform"}}if(!c)return;let M=F.timeStamp-u;M>0&&(f=(F.clientY-p)/M*1e3),p=F.clientY,u=F.timeStamp;let I=h+T;x.track(I<0?-rp(-I,i.offsetHeight||1):I),F.cancelable&&F.preventDefault()},_=F=>{if(F.pointerId!==d)return;try{i.hasPointerCapture(F.pointerId)&&i.releasePointerCapture(F.pointerId)}catch{}if(d=-1,!c)return;c=!1;let T=i.offsetHeight||1;x.value+f*.12>T*.3||f>900?(b=!0,i.style.pointerEvents="none",x.to(T,f)):x.to(0,f)};return i.addEventListener("pointerdown",S,{passive:!0}),i.addEventListener("pointermove",w,{passive:!1}),i.addEventListener("pointerup",_,{passive:!0}),i.addEventListener("pointercancel",_,{passive:!0}),()=>{x.stop(),i.removeEventListener("pointerdown",S),i.removeEventListener("pointermove",w),i.removeEventListener("pointerup",_),i.removeEventListener("pointercancel",_),i.style.transform="",i.style.willChange="",i.style.animation="",i.style.pointerEvents="";let F=i.parentElement;F&&(F.style.opacity="")}},[a,e,r,n])}function Nn(e){return new Promise((r,t)=>{let n=new FileReader;n.onload=()=>r(n.result),n.onerror=()=>t(n.error??new Error("read failed")),n.readAsDataURL(e)})}async function ba(e){if(e.type==="image/gif"||e.type==="image/svg+xml"||e.size<=307200)return Nn(e);try{let r=await createImageBitmap(e),t=Math.min(1,1536/Math.max(r.width,r.height)),n=Math.max(1,Math.round(r.width*t)),a=Math.max(1,Math.round(r.height*t));r.close?.();let o=await createImageBitmap(e,{resizeWidth:n,resizeHeight:a,resizeQuality:"high"});try{let i=document.createElement("canvas");i.width=n,i.height=a;let c=i.getContext("2d");if(!c)return Nn(e);c.drawImage(o,0,0);let s=e.type==="image/png",l=await new Promise(h=>i.toBlob(h,s?"image/png":"image/jpeg",.85));return!l||l.size>=e.size?Nn(e):Nn(l)}finally{o.close?.()}}catch{return Nn(e)}}import{useEffect as Ai,useRef as zr,useState as Nr}from"react";var Ni=(e,r)=>Math.hypot(e.x-r.x,e.y-r.y);function ap(e){let r=0;for(let t=1;t<e.length;t++)r+=Ni(e[t-1],e[t]);return r}function yo(e){let r=1/0,t=1/0,n=-1/0,a=-1/0;for(let o of e)o.x<r&&(r=o.x),o.y<t&&(t=o.y),o.x>n&&(n=o.x),o.y>a&&(a=o.y);return{minX:r,minY:t,maxX:n,maxY:a}}var rn=e=>Math.max(0,Math.min(1e3,Math.round(e)));function wo(e,r,t){return[rn(e.minY/t*1e3),rn(e.minX/r*1e3),rn(e.maxY/t*1e3),rn(e.maxX/r*1e3)]}function op(e,r){let[t,n,a,o]=e,[i,c,s,l]=r,h=Math.min(o,l)-Math.max(n,c),d=Math.min(a,s)-Math.max(t,i);if(h<=0||d<=0)return!1;let p=Math.min((o-n)*(a-t),(l-c)*(s-i));return p>0&&h*d/p>.35}var sp=(e,r)=>[Math.min(e[0],r[0]),Math.min(e[1],r[1]),Math.max(e[2],r[2]),Math.max(e[3],r[3])];function ip(e,r,t){if(e.length<2)return null;let n=yo(e),a=wo(n,r,t),o=Math.hypot(n.maxX-n.minX,n.maxY-n.minY);if(o<4)return null;let i=ap(e),c=Ni(e[0],e[e.length-1]),s=i/Math.max(c,1e-6);return c/o<.3&&i>o*1.8?{gesture:"ring",box:a,straight:!1}:s<1.25?{gesture:"arrow",box:a,to:[rn(e[e.length-1].y/t*1e3),rn(e[e.length-1].x/r*1e3)],straight:!0}:{gesture:"scribble",box:a,straight:!1}}function Ii(e,r,t){if(!r||!t)return[];let n=[],a=[],o=[];for(let s of e){if(s.kind==="pin"&&typeof s.x=="number"&&typeof s.y=="number"){let l={x:s.x,y:s.y};o.push({gesture:"pin",id:s.id,text:s.label,box:wo(yo([l,l]),r,t)});continue}if(s.kind==="text"&&s.value&&typeof s.x=="number"&&typeof s.y=="number"){let l={x:s.x,y:s.y};a.push({gesture:"text",box:wo(yo([l,l]),r,t),text:s.value});continue}if(s.kind==="stroke"&&s.tool!=="eraser"&&s.points){let l=ip(s.points,r,t);l&&n.push(l)}}let i=new Set,c=[];for(let s=0;s<n.length;s++){if(i.has(s))continue;let l=n[s];for(let h=s+1;h<n.length;h++)i.has(h)||!l.straight||!n[h].straight||op(l.box,n[h].box)&&(i.add(h),l={gesture:"cross",box:sp(l.box,n[h].box),straight:!1});i.add(s),c.push(l.gesture==="arrow"?{gesture:"arrow",box:l.box,to:l.to}:{gesture:l.gesture,box:l.box})}return[...o,...c,...a]}import{jsx as kt,jsxs as Ir}from"react/jsx-runtime";var Pi="#ff5a5a",cp=1280,lp=4,hp=80;function pp(e,r,t){let n=[],a="";for(let o of r.split(/\s+/)){let i=a?`${a} ${o}`:o;a&&e.measureText(i).width>t?(n.push(a),a=o):a=i}return a&&n.push(a),n.slice(0,3)}function dp(e,r){let t=`${r}%`;return e<33?{top:t,left:8,transform:"translateY(-100%)"}:e>67?{top:t,right:8,transform:"translateY(-100%)"}:{top:t,left:`${e}%`,transform:"translate(-50%, -100%)"}}function Fi({src:e,onCancel:r,onSend:t,t:n}){let[a,o]=Nr(null),[i,c]=Nr(!1),[s,l]=Nr("pin"),h=zr(0),[d,p]=Nr(null),u=zr(null),[f,C]=Nr([{points:[],closed:!1}]),b=f[f.length-1],L=zr(`selection-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),x=zr(null),z=v=>C(E=>[...E.slice(-66),v]),S=s==="select",[w,_]=Nr([]),[F,T]=Nr(!1),U=zr(null),M=zr(null);Ai(()=>{let v=new Image;return v.crossOrigin="anonymous",v.onload=()=>o(v),v.onerror=()=>c(!0),v.src=e,()=>{v.onload=null,v.onerror=null}},[e]);let I=(()=>{if(!a)return{w:0,h:0};let v=Math.min(1,cp/Math.max(a.naturalWidth,a.naturalHeight));return{w:Math.round(a.naturalWidth*v),h:Math.round(a.naturalHeight*v)}})(),$=zr(null),P=v=>{let E=U.current;if(!E||!a)return;let k=E.getContext("2d");if(!k)return;$.current||($.current=document.createElement("canvas"));let ie=$.current;ie.width=E.width,ie.height=E.height;let X=ie.getContext("2d"),V=v?[...w,v]:w;for(let m of V)m.kind==="stroke"&&(X.save(),X.globalCompositeOperation=m.tool==="eraser"?"destination-out":"source-over",X.strokeStyle=Pi,X.lineWidth=m.tool==="eraser"?m.size*3:m.size,X.lineCap="round",X.lineJoin="round",X.beginPath(),m.points.forEach((g,B)=>B===0?X.moveTo(g.x,g.y):X.lineTo(g.x,g.y)),m.points.length===1&&X.lineTo(m.points[0].x+.01,m.points[0].y),X.stroke(),X.restore());k.clearRect(0,0,E.width,E.height),k.drawImage(a,0,0,E.width,E.height),k.drawImage(ie,0,0);let se=b.points.map((m,g)=>x.current?.index===g?x.current.point:m);se.length&&(k.save(),k.beginPath(),se.forEach((m,g)=>g?k.lineTo(m.x,m.y):k.moveTo(m.x,m.y)),b.closed&&(k.closePath(),k.fillStyle="#22c55e33",k.fill()),k.strokeStyle="#22c55e",k.lineWidth=Math.max(2,I.w/400),k.stroke(),k.restore());for(let m of se)k.beginPath(),k.arc(m.x,m.y,Math.max(3,I.w/260),0,Math.PI*2),k.fillStyle="#ffffff",k.fill(),k.strokeStyle="#15803d",k.stroke();for(let m of V){if(m.kind!=="pin")continue;let g=m.size;if(k.save(),k.beginPath(),k.moveTo(m.x,m.y),k.bezierCurveTo(m.x-g*2,m.y-g*2,m.x-g,m.y-g*3.5,m.x,m.y-g*3.5),k.bezierCurveTo(m.x+g,m.y-g*3.5,m.x+g*2,m.y-g*2,m.x,m.y),k.fillStyle=Pi,k.fill(),k.lineWidth=Math.max(1,g/7),k.strokeStyle="#fff",k.stroke(),k.beginPath(),k.arc(m.x,m.y-g*2.2,g*.5,0,Math.PI*2),k.fillStyle="#fff",k.fill(),m.label){k.font=`600 ${g*1.2}px system-ui, sans-serif`,k.textAlign="center",k.textBaseline="middle";let B=pp(k,m.label,E.width*.32),G=g*1.5,ae=Math.min(E.width,Math.max(...B.map(O=>k.measureText(O).width))+g),oe=B.length*G+g*.4,xe=Math.max(ae/2,Math.min(E.width-ae/2,m.x)),pe=Math.max(oe,m.y-g*3.7);k.fillStyle="rgba(0,0,0,.8)",k.fillRect(xe-ae/2,pe-oe,ae,oe),k.fillStyle="#fff",B.forEach((O,Z)=>k.fillText(O,xe,pe-oe+g*.2+G*(Z+.5),ae-g))}k.restore()}};Ai(()=>{P()},[a,w,b,I.w,I.h]);let Q=v=>{let E=U.current,k=E.getBoundingClientRect();return{x:Math.max(0,Math.min(E.width,(v.clientX-k.left)/k.width*E.width)),y:Math.max(0,Math.min(E.height,(v.clientY-k.top)/k.height*E.height))}},de=()=>Math.max(4,Math.round(I.w/180)),J=v=>{_(E=>E.filter(k=>k.kind!=="pin"||k.id!==v)),p(null)},W=()=>{let v=w.find(E=>E.kind==="pin"&&E.id===d);v?.kind==="pin"&&!v.label.trim()?J(v.id):p(null)},he=v=>{if(!a)return;let E=Q(v);if(s==="pin"){let k=w.find(V=>V.kind==="pin"&&Math.hypot(E.x-V.x,E.y-(V.y-V.size*1.7))<V.size*2);if(k?.kind==="pin"){p(k.id),v.currentTarget.setPointerCapture(v.pointerId),u.current={id:k.id,offset:{x:E.x-k.x,y:E.y-k.y}};return}if(d){W();return}if(w.filter(V=>V.kind==="pin").length>=lp)return;let ie=`pin-${++h.current}`,X=Math.max(10,I.w/U.current.getBoundingClientRect().width*9);_(V=>[...V,{kind:"pin",...E,id:ie,label:"",size:X}]),p(ie);return}if(s==="select"){let k=b.points[0],ie=U.current.getBoundingClientRect(),X=12*I.w/ie.width;if(!b.closed&&k&&b.points.length>=3&&Math.hypot(E.x-k.x,E.y-k.y)<X)z({...b,closed:!0});else{let V=b.points.findIndex(se=>Math.hypot(E.x-se.x,E.y-se.y)<X);if(V>=0){v.currentTarget.setPointerCapture(v.pointerId),x.current={index:V,point:E};return}if(b.closed||b.points.length>=64)return;z({...b,points:[...b.points,E]})}return}v.target.setPointerCapture(v.pointerId),M.current={kind:"stroke",tool:s,size:de(),points:[E]},P(M.current)},Y=v=>{if(u.current){let{id:E,offset:k}=u.current,ie=Q(v);_(X=>X.map(V=>V.kind==="pin"&&V.id===E?{...V,x:Math.max(0,Math.min(I.w,ie.x-k.x)),y:Math.max(0,Math.min(I.h,ie.y-k.y))}:V));return}if(x.current){x.current.point=Q(v),P();return}M.current&&(M.current.points.push(Q(v)),P(M.current))},D=()=>{if(u.current){u.current=null;return}if(x.current){let{index:E,point:k}=x.current;x.current=null,z({...b,points:b.points.map((ie,X)=>X===E?k:ie)});return}if(!M.current)return;let v=M.current;M.current=null,_(E=>[...E,v])},H=w.filter(v=>v.kind==="pin"),N=H.find(v=>v.id===d),R=!!a&&!(b.points.length>0&&!b.closed)&&H.length>0&&H.every(v=>v.label.trim()),A=()=>{if(!(!R||!a))try{let v=document.createElement("canvas");v.width=I.w,v.height=I.h;let E=v.getContext("2d");if(!E){T(!0);return}E.drawImage(a,0,0,I.w,I.h);let k=v.toDataURL("image/jpeg",.92),ie=U.current?.toDataURL("image/jpeg",.85)||k,X=Ii(w,I.w,I.h);if(b.closed){let V=m=>Math.round(m/I.w*1e3),se=m=>Math.round(m/I.h*1e3);X.unshift({gesture:"selection",id:L.current,box:[se(Math.min(...b.points.map(m=>m.y))),V(Math.min(...b.points.map(m=>m.x))),se(Math.max(...b.points.map(m=>m.y))),V(Math.max(...b.points.map(m=>m.x)))],points:b.points.map(m=>[V(m.x),se(m.y)])})}t(k,H.map(V=>V.label.trim()).join("; "),X,ie)}catch{T(!0)}},K=s==="pin"?"markupPinHint":s==="select"?b.closed?"markupSelectedHint":"markupOutlineHint":"markupSketchHint";return Ir("div",{className:"hsk-markup",role:"dialog","aria-label":n("markupDialogLabel"),children:[Ir("div",{className:"hsk-markup-head",children:[kt("span",{className:"hsk-markup-title",role:"status",children:n(K)}),kt("button",{className:"hsk-markup-cancel",onClick:r,children:n("markupCancel")})]}),kt("div",{className:"hsk-markup-stage",children:i?kt("div",{className:"hsk-markup-error",children:n("markupLoadError")}):a?Ir("div",{className:"hsk-markup-canvas-wrap",children:[kt("canvas",{ref:U,width:I.w,height:I.h,className:`hsk-markup-canvas hsk-markup-canvas--${s}`,style:{touchAction:"none",cursor:S||s==="pin"?"crosshair":void 0},onPointerDown:he,onPointerMove:Y,onPointerUp:D,onPointerCancel:()=>{u.current=null,x.current=null,M.current=null,P()}}),s==="pin"&&N&&Ir("div",{className:"hsk-markup-pinlabel",style:dp(N.x/I.w*100,Math.max(12,(N.y-N.size*4)/I.h*100)),children:[kt("input",{autoFocus:!0,"aria-label":n("markupPinLabel"),placeholder:n("markupPinLabelHint"),value:N.label,maxLength:hp,style:{width:`${Math.min(34,Math.max(16,N.label.length+2))}ch`},onChange:v=>_(E=>E.map(k=>k.kind==="pin"&&k.id===N.id?{...k,label:v.target.value}:k)),onKeyDown:v=>{(v.key==="Enter"||v.key==="Escape")&&W()}}),kt("button",{"aria-label":n("markupRemovePin"),title:n("markupRemovePin"),onClick:()=>J(N.id),children:"\xD7"})]})]}):kt("div",{className:"hsk-markup-loading",children:n("markupLoading")})}),Ir("div",{className:"hsk-markup-tools",children:[Ir("button",{className:`hsk-markup-tool${s==="pin"?" hsk-markup-tool--on":""}`,onClick:()=>l("pin"),children:[Ir("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{verticalAlign:"middle",marginInlineEnd:5},"aria-hidden":"true",children:[kt("path",{d:"M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 1 1 16 0Z"}),kt("circle",{cx:"12",cy:"10",r:"3"})]}),n("markupPin")]}),kt("button",{className:`hsk-markup-tool${s==="select"?" hsk-markup-tool--on":""}`,onClick:()=>{p(null),l("select")},children:n("markupSelect")}),kt("button",{className:"hsk-markup-tool",disabled:b.closed||b.points.length<3,onClick:()=>z({...b,closed:!0}),children:n("markupCloseOutline")}),kt("button",{className:`hsk-markup-tool${s==="pen"?" hsk-markup-tool--on":""}`,onClick:()=>{p(null),l("pen")},children:n("markupSketch")}),kt("button",{className:`hsk-markup-tool${s==="eraser"?" hsk-markup-tool--on":""}`,onClick:()=>{p(null),l("eraser")},children:n("markupEraser")}),kt("button",{className:"hsk-markup-tool",onClick:()=>S?C(v=>v.length>1?v.slice(0,-1):v):_(v=>v.slice(0,-1)),disabled:S?f.length<2:w.length===0,children:n("markupUndo")}),kt("button",{className:"hsk-markup-tool",onClick:()=>{_([]),p(null),C([{points:[],closed:!1}]),l("pin")},disabled:w.length===0&&!b.points.length,children:n("markupClear")}),kt("button",{className:"hsk-markup-go",onClick:A,disabled:!R,children:n("markupSend")})]}),F&&kt("div",{className:"hsk-markup-error",children:n("markupError")})]})}import up,{useEffect as Ro,useRef as gr,useState as mp}from"react";import{jsx as fa}from"react/jsx-runtime";function Wi(e){let r=2166136261;for(let t=0;t<e.length;t++)r^=e.charCodeAt(t),r=Math.imul(r,16777619);return r>>>0}function An(e){let r=e>>>0;return()=>{r=r+1831565813>>>0;let t=Math.imul(r^r>>>15,1|r);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296}}var _i=e=>e*e*(3-2*e);function bp(e){let t=new Float32Array(65536);for(let a=0;a<t.length;a++)t[a]=e();let n=(a,o)=>t[(o&255)*256+(a&255)];return(a,o)=>{let i=Math.floor(a),c=Math.floor(o),s=_i(a-i),l=_i(o-c),h=n(i,c),d=n(i+1,c),p=n(i,c+1),u=n(i+1,c+1);return(h+(d-h)*s)*(1-l)+(p+(u-p)*s)*l}}function fp(e,r,t,n){let a=t/Math.SQRT2,o=Math.ceil(e/a),i=Math.ceil(r/a),c=new Int32Array(o*i).fill(-1),s=[],l=[],h=(p,u)=>{let f=s.length;s.push([p,u]),c[Math.floor(u/a)*o+Math.floor(p/a)]=f,l.push(f)},d=(p,u)=>{if(p<0||u<0||p>=e||u>=r)return!1;let f=Math.floor(p/a),C=Math.floor(u/a);for(let b=Math.max(C-2,0);b<=Math.min(C+2,i-1);b++)for(let L=Math.max(f-2,0);L<=Math.min(f+2,o-1);L++){let x=c[b*o+L];if(x<0)continue;let z=s[x][0]-p,S=s[x][1]-u;if(z*z+S*S<t*t)return!1}return!0};for(h(n()*e,n()*r);l.length;){let p=n()*l.length|0,[u,f]=s[l[p]],C=!1;for(let b=0;b<24;b++){let L=n()*Math.PI*2,x=t*(1+n()),z=u+Math.cos(L)*x,S=f+Math.sin(L)*x;if(d(z,S)){h(z,S),C=!0;break}}C||l.splice(p,1)}return s}var mt=(e,r)=>(e()-.5)*r,Co=[(e,r,t)=>{let n=r*.5,a=r*(.14+t()*.04),o=r*.07;e.beginPath(),e.moveTo(-a-o*.6,-n),e.lineTo(a+o*.6,-n),e.moveTo(-a,-n+o),e.lineTo(a,-n+o),e.moveTo(-a,-n+o),e.lineTo(-a*.85,n-o),e.moveTo(a,-n+o),e.lineTo(a*.85,n-o),e.moveTo(0,-n+o*1.7),e.lineTo(0,n-o*1.7),e.moveTo(-a,n-o),e.lineTo(a,n-o),e.moveTo(-a-o*.6,n),e.lineTo(a+o*.6,n),e.stroke()},(e,r,t)=>{let n=r*.5,a=-n*(.18+t()*.1);e.beginPath(),e.moveTo(-n,a),e.lineTo(0,-n),e.lineTo(n,a),e.closePath(),e.moveTo(-n*.92,a+n*.16),e.lineTo(n*.92,a+n*.16);for(let o of[-.62,-.21,.21,.62])e.moveTo(n*o,a+n*.16),e.lineTo(n*o,n*.8);e.moveTo(-n,n*.8),e.lineTo(n,n*.8),e.stroke()},(e,r,t)=>{let n=r*.5,a=n*(.48+t()*.12);e.beginPath(),e.moveTo(-n*.2,-n*.86),e.lineTo(n*.2,-n*.86),e.moveTo(-n*.15,-n*.78),e.bezierCurveTo(-a,-n*.3,-a*.85,n*.6,0,n*.86),e.bezierCurveTo(a*.85,n*.6,a,-n*.3,n*.15,-n*.78),e.moveTo(-n*.17,-n*.64),e.quadraticCurveTo(-a*1.16,-n*.48,-a*.7,-n*.04),e.moveTo(n*.17,-n*.64),e.quadraticCurveTo(a*1.16,-n*.48,a*.7,-n*.04),e.stroke()},(e,r,t)=>{let n=r*.5;e.beginPath(),e.moveTo(-n*.9,n*.52),e.quadraticCurveTo(0,-n*.18,n*.9,-n*.58),e.stroke();let a=4+(t()*3|0);for(let o=0;o<a;o++){let i=.16+o/a*.8,c=-n*.9+i*n*1.8,s=n*.52-i*n*1.16+(1-i)*i*n*.3,l=o%2?1:-1,h=n*(.26+t()*.1);e.beginPath(),e.moveTo(c,s),e.quadraticCurveTo(c+h*.5,s+l*h*.66,c+h*.9,s+l*h*.08),e.quadraticCurveTo(c+h*.42,s+l*h*.04,c,s),e.stroke()}},(e,r,t)=>{let n=r*.5;e.beginPath(),e.moveTo(-n*.85,-n*.7),e.quadraticCurveTo(-n*.1,-n*.35,n*.2,n*.1),e.stroke();let a=[[-n*.45,-n*.12],[n*.05,n*.3],[n*.42,-n*.4]];for(let[o,i]of a)e.beginPath(),e.moveTo(o,i-n*.28),e.lineTo(o-n*.02,i-n*.16),e.stroke(),e.beginPath(),e.ellipse(o,i,n*(.15+t()*.04),n*.19,mt(t,.5),0,Math.PI*2),e.stroke()},(e,r,t)=>{let n=r*.5;for(let a of[-1,1]){e.beginPath(),e.arc(0,0,n*.72,a>0?-1.25:1.25,a>0?1.25:Math.PI*2-1.25,a<0),e.stroke();for(let o=0;o<5;o++){let i=-1.05+o/4*2.1,c=Math.sin(i)*a*n*.72,s=Math.cos(i)*n*.72,l=n*(.2+t()*.08);e.beginPath(),e.moveTo(c,s),e.quadraticCurveTo(c+a*l*.9,s-l*.5,c+a*l*.6,s-l*1.05),e.stroke()}}},(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(-t,t*.6),e.lineTo(t*.55,t*.6),e.lineTo(t*.55,-t*.6),e.lineTo(-t*.45,-t*.6),e.lineTo(-t*.45,t*.15),e.lineTo(t*.1,t*.15),e.lineTo(t*.1,-t*.18),e.stroke()},(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(-t*.62,t*.8),e.lineTo(-t*.62,-t*.05),e.arc(0,-t*.05,t*.62,Math.PI,0),e.lineTo(t*.62,t*.8),e.stroke(),e.beginPath(),e.moveTo(-t*.86,t*.8),e.lineTo(t*.86,t*.8),e.stroke()},(e,r,t)=>{let n=r*.5;e.beginPath(),e.arc(0,0,n*.4,0,Math.PI*2),e.stroke();let a=t()*.5;for(let o=0;o<8;o++){let i=a+o/8*Math.PI*2;e.beginPath(),e.moveTo(Math.cos(i)*n*.6,Math.sin(i)*n*.6),e.lineTo(Math.cos(i)*n*.94,Math.sin(i)*n*.94),e.stroke()}},(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(-t*.44,t*.7),e.bezierCurveTo(-t,t*.2,-t*.8,-t*.7,-t*.3,-t*.6),e.moveTo(t*.44,t*.7),e.bezierCurveTo(t,t*.2,t*.8,-t*.7,t*.3,-t*.6),e.moveTo(-t*.32,-t*.64),e.lineTo(t*.32,-t*.64),e.moveTo(-t*.44,t*.7),e.lineTo(t*.44,t*.7);for(let n of[-.16,.02,.2])e.moveTo(t*n,-t*.56),e.lineTo(t*n,t*.62);e.stroke()},(e,r,t)=>{let n=r*.5,a=n*(.4+t()*.18);e.beginPath(),e.moveTo(-n,n*.16),e.quadraticCurveTo(-n*.5,-a,0,-n*.02),e.quadraticCurveTo(n*.5,-a,n,n*.16),e.stroke()}],Di=[(e,r,t)=>{let n=r*.5,a=-n+mt(t,n*.3),o=mt(t,n);e.beginPath(),e.moveTo(a,o);let i=4+(t()*4|0);for(let c=0;c<i;c++){let s=a+n*2/i+mt(t,n*.5),l=mt(t,n*1.5);e.quadraticCurveTo(a+mt(t,n*.9),o+mt(t,n*1.6),s,l),a=s,o=l}e.stroke()},(e,r,t)=>{let n=r*.5,a=2.2+t()*1.6,o=t()<.5?-1:1;e.beginPath();for(let i=0;i<=60;i++){let c=i/60,s=o*c*a*Math.PI*2,l=n*c*(.9+mt(t,.06)),h=Math.cos(s)*l,d=Math.sin(s)*l;i===0?e.moveTo(h,d):e.lineTo(h,d)}e.stroke()},(e,r,t)=>{let n=r*.5,a=4+(t()*4|0),o=mt(t,.7);for(let i=0;i<a;i++){let c=-n+i/(a-1)*n*2+mt(t,n*.16),s=n*(.7+t()*.6);e.beginPath(),e.moveTo(c-o*s*.5,-s*.5),e.quadraticCurveTo(c+mt(t,n*.2),0,c+o*s*.5,s*.5),e.stroke()}},(e,r,t)=>{let n=r*.5,a=2+(t()*3|0),o=n*2/a;e.beginPath(),e.moveTo(-n,n*.4);for(let i=0;i<a;i++){let c=-n+i*o,s=o*(.42+t()*.18);e.bezierCurveTo(c+s*.2,n*.4-s*2.1,c+o-s*.2,n*.4-s*2.1,c+o,n*.4+mt(t,n*.14))}e.stroke()}],Bi=[(e,r,t)=>{e.beginPath(),e.arc(0,0,r*.1+t()*r*.04,0,Math.PI*2),e.fill()},(e,r,t)=>{e.beginPath(),e.arc(mt(t,r*.04),mt(t,r*.04),r*.32,0,Math.PI*2),e.stroke()},(e,r,t)=>{let n=r*.4,a=n*(.2+t()*.12);e.beginPath(),e.moveTo(0,-n),e.quadraticCurveTo(a,-a,n,0),e.quadraticCurveTo(a,a,0,n),e.quadraticCurveTo(-a,a,-n,0),e.quadraticCurveTo(-a,-a,0,-n),e.stroke()},(e,r,t)=>{let n=r*.4;e.beginPath(),e.moveTo(-n,mt(t,r*.08)),e.quadraticCurveTo(0,mt(t,r*.16),n,mt(t,r*.08)),e.stroke()}],kp={light:(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(0,-t),e.quadraticCurveTo(t*.16,-t*.16,t,0),e.quadraticCurveTo(t*.16,t*.16,0,t),e.quadraticCurveTo(-t*.16,t*.16,-t,0),e.quadraticCurveTo(-t*.16,-t*.16,0,-t),e.stroke()},dark:(e,r)=>{let t=r*.44;e.beginPath(),e.moveTo(-t*.6,-t*.5),e.lineTo(t*.6,-t*.5),e.lineTo(t,t*.05),e.lineTo(0,t),e.lineTo(-t,t*.05),e.closePath(),e.moveTo(-t,t*.05),e.lineTo(t,t*.05),e.moveTo(-t*.6,-t*.5),e.lineTo(-t*.3,t*.05),e.lineTo(0,t),e.moveTo(t*.6,-t*.5),e.lineTo(t*.3,t*.05),e.lineTo(0,t),e.stroke()},mahogany:(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(0,t),e.bezierCurveTo(-t*.9,t*.2,-t*.7,-t*.7,0,-t),e.bezierCurveTo(t*.7,-t*.7,t*.9,t*.2,0,t),e.moveTo(0,t*.86),e.lineTo(0,-t*.86);for(let n=0;n<3;n++){let a=-.34+n*.36;e.moveTo(0,t*a),e.lineTo(t*.44,t*(a-.26)),e.moveTo(0,t*a),e.lineTo(-t*.44,t*(a-.26))}e.stroke()},blush:(e,r)=>{let t=r*.5;for(let n=0;n<5;n++){let a=n/5*Math.PI*2-Math.PI/2;e.beginPath(),e.ellipse(Math.cos(a)*t*.52,Math.sin(a)*t*.52,t*.42,t*.26,a,0,Math.PI*2),e.stroke()}e.beginPath(),e.arc(0,0,t*.19,0,Math.PI*2),e.stroke()},coffee:(e,r)=>{let t=r*.5;e.beginPath(),e.ellipse(0,0,t*.6,t*.9,0,0,Math.PI*2),e.stroke(),e.beginPath(),e.moveTo(0,-t*.84),e.bezierCurveTo(t*.34,-t*.3,-t*.34,t*.3,0,t*.84),e.stroke()},midnight:(e,r)=>{let t=r*.5;e.beginPath();for(let n=0;n<10;n++){let a=n%2===0?t:t*.4,o=n/10*Math.PI*2-Math.PI/2,i=Math.cos(o)*a,c=Math.sin(o)*a;n===0?e.moveTo(i,c):e.lineTo(i,c)}e.closePath(),e.stroke()}},Hi=e=>{let r=e.split(",").map(t=>parseFloat(t.trim()));return[r[0]||0,r[1]||0,r[2]||0]};function So(e,r,t){let n=Hi(e),a=Hi(r);return`rgb(${Math.round(n[0]+(a[0]-n[0])*t)},${Math.round(n[1]+(a[1]-n[1])*t)},${Math.round(n[2]+(a[2]-n[2])*t)})`}var Mo=new Set,To=new Set;function Eo(){for(let e of To)e()}function Oi(e){Mo.forEach(r=>r(e))}var gp=83,$i=[{k:.45,hop:1},{k:1.15,hop:.55},{k:.95,hop:.12},{k:1,hop:0}],qi=7,xp=.28;function vp(e,r,t){return`hsl(${Math.round(r*300%360)}, ${t?72:68}%, ${t?58:46}%)`}function Vi(e,r,t,n,a,o,i,c=r){let s=i?kp[i]:void 0,l=An(a),h=bp(An(a^2654435769)),d=e*r,u=Math.max(40,Math.min(520,Math.round(d/3100)))/.48,f=Math.max(26,Math.sqrt(.7*d/u)),C=fp(e,r,f,l),b=4.4/Math.max(e,r),L=b*2.6,x=Math.hypot(e,r),z=l()*Math.PI*2,S=Math.cos(z),w=Math.sin(z),_=e*(.18+l()*.64),F=r*(.12+l()*.5),T=[],U=Math.hypot(e,r)||1,M=An(a^1540483477),I=o?e:0,$=Math.hypot(e,c)||1,[P,Q,de]=t.split(",").map(W=>parseFloat(W)||0),J=.2126*P+.7152*Q+.0722*de>128;for(let[W,he]of C){let Y=h(W*b,he*b)*.72+h(W*L,he*L)*.28,D=Math.min(1,Math.max(0,(Y-.26)/.44));if(l()>D*D*(3-2*D))continue;let H=l(),N=Math.max(0,1-Math.hypot(W-_,he-F)/(x*.72))**1.6,R=((W-e/2)*S+(he-r/2)*w)/x+.5,A=!J,v=((A?.055:.028)+l()*(A?.04:.025))*(.75+R*.55)*(1+N*.4),E=So(t,n,N*.85),k=((o?e-W:W)+r-he)/(e+r||1),ie=l()*16777215|0,X=vp(ie,k,J),V=0,se=A?1.05+l()*.35:.65+l()*.35,m=20,g=Co[0],B=1;H<.5?(V=mt(l,.16),se=A?1.15+l()*.45:.7+l()*.35,m=20+l()*16,g=Co[l()*Co.length|0]):H<.82?(V=l()*Math.PI*2,se=A?.95+l()*.4:.6+l()*.4,m=16+l()*20,g=Di[l()*Di.length|0]):H<.95||!s?(V=l()*Math.PI*2,se=A?.85+l()*.35:.55+l()*.35,m=7+l()*7,g=Bi[l()*Bi.length|0]):(V=mt(l,.3),se=A?1.1+l()*.3:.75+l()*.3,m=15+l()*9,g=s,B=2.6),T.push({x:W,y:he,roll:H,rotation:V,lineWidth:se,alpha:v*B,baseColor:E,shimmerColor:X,drawFn:g,size:m,seed:ie,normDist:k,bloom:Math.min(1,Math.hypot(W-I,he-c)/$)*.62+M()*.08,glow:J?.2:.06,ux:(W-I)/(Math.hypot(W-I,he-c)||1),uy:(he-c)/(Math.hypot(W-I,he-c)||1)})}return T}var yp=.3;function wp(e){return 1+(1.2+1)*(e-1)**3+1.2*(e-1)**2}function Ar(e,r,t,n,a,o=1,i){e.clearRect(0,0,t,n),e.lineCap="round",e.lineJoin="round";let c=a>=0&&a<=1.4,s=c?a*1.4-.2:-999,l=.3;for(let h of r){let d=h.alpha,p=h.baseColor,u=h.lineWidth,f=1,C=0,b=0;if(i!==void 0){let x=Math.min(1,Math.max(0,(i-h.bloom)/yp));if(x<=0)continue;let z=1-(1-x)**3,S=Math.sin(x*Math.PI)**2;d=h.alpha*z+S*h.glow,p=So(h.baseColor,h.shimmerColor,S*(h.glow>.1?.85:.55)),u=h.lineWidth*(1+S*.35),f=.86+.14*wp(x),C=-h.ux*(1-z)*9,b=-h.uy*(1-z)*9}else if(c){let x=h.normDist-s;if(x>l)d=h.alpha*.45,p=h.baseColor,u=h.lineWidth;else if(x<-l)d=h.alpha,p=h.baseColor,u=h.lineWidth;else{let z=Math.cos(x/l*(Math.PI/2))**2;d=h.alpha+z*.08,p=z>.08?So(h.baseColor,h.shimmerColor,z*.65):h.baseColor,u=h.lineWidth*(1+z*.2)}}e.save(),e.translate(h.x+(h.dx??0)+C,h.y+(h.dy??0)+b),e.rotate(h.rotation+(h.dr??0)),f!==1&&e.scale(f,f),h.hop&&(e.scale(1+h.hop,1+h.hop),d*=1+h.hop*2),e.globalAlpha=Math.min(d*o,1),e.strokeStyle=p,e.fillStyle=p,e.lineWidth=u;let L=An(h.seed);h.drawFn(e,h.size,L),e.restore()}}var Cp=up.memo(function({seed:r="",theme:t,dir:n,waitForContent:a=!1}){let o=gr(null),i=gr(!1),c=gr(0),s=gr(null),l=gr(0),h=gr(0),d=gr(a);return Ro(()=>{let p=o.current;if(!p)return;let u=Wi(r||"kiku"),f=0,C=(M,I,$,P)=>Q=>{let de=Q-M,J=Math.min(1,de/I),W=p.clientWidth,he=p.clientHeight;if(W&&he){let Y=Math.min(window.devicePixelRatio||1,3),D=Math.round(W*Y),H=Math.round(he*Y);(p.width!==D||p.height!==H)&&(p.width=D,p.height=H);let N=p.getContext("2d");N&&(N.setTransform(Y,0,0,Y,0,0),Ar(N,$,W,he,-1,1,J))}if(J<1)c.current=requestAnimationFrame(C(M,I,$,P));else{i.current=!1;let Y=p.clientWidth,D=p.clientHeight,H=p.getContext("2d");if(H&&Y&&D){let N=Math.min(window.devicePixelRatio||1,3);H.setTransform(N,0,0,N,0,0),Ar(H,$,Y,D,-1)}}},b=()=>{let M=p.clientWidth,I=p.clientHeight;if(!M||!I)return;let $=Math.min(window.devicePixelRatio||1,3),P=p.getContext("2d");if(!P)return;let Q=getComputedStyle(p),de=Q.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",J=Q.getPropertyValue("--hsk-doodle-tint").trim()||de,W=n==="rtl"||Q.direction==="rtl"||p.closest('[dir="rtl"]')!==null,he=typeof window<"u"?Math.max(I,window.innerHeight||0):I,Y=Vi(M,he,de,J,u,W,t,I);s.current=Y,l.current=M,h.current=he;let D=Math.round(M*$),H=Math.round(I*$);if((p.width!==D||p.height!==H)&&(p.width=D,p.height=H),P.setTransform($,0,0,$,0,0),d.current){P.clearRect(0,0,M,I);return}if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){Ar(P,Y,M,I,-1);return}cancelAnimationFrame(c.current),i.current=!0;let R=1500,A=performance.now();c.current=requestAnimationFrame(C(A,R,Y,W))},L=()=>{let M=s.current,I=p.clientWidth,$=p.clientHeight;if(M&&I===l.current&&$<=h.current){if(i.current||d.current||!$)return;let P=p.getContext("2d");if(!P)return;let Q=Math.min(window.devicePixelRatio||1,3);p.width=Math.round(I*Q),p.height=Math.round($*Q),P.setTransform(Q,0,0,Q,0,0),Ar(P,M,I,$,-1);return}clearTimeout(f),f=window.setTimeout(b,20)};b();let x=()=>{d.current&&(d.current=!1,b())};To.add(x);let z=d.current?window.setTimeout(x,2e3):0,S=new ResizeObserver(L);S.observe(p);let w=window.matchMedia?.("(prefers-color-scheme: dark)"),_=()=>{b()};w?.addEventListener?.("change",_);let F=0,T=()=>{let M=s.current,I=p.getContext("2d"),$=p.clientWidth,P=p.clientHeight;if(!M||!I||!$||!P)return;let Q=Math.min(window.devicePixelRatio||1,3);I.setTransform(Q,0,0,Q,0,0),Ar(I,M,$,P,-1)},U=({x:M,y:I,strength:$})=>{let P=s.current;if(!P||window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches)return;cancelAnimationFrame(c.current),i.current=!1,clearTimeout(F);let Q=p.getBoundingClientRect(),de=M-Q.left,J=I-Q.top,W=An(performance.now()*997|0),he=(N,R)=>Math.max(-R,Math.min(R,N)),Y=P.map(N=>{let R=N.dx??0,A=N.dy??0,K=N.dr??0,v=N.x-de,E=N.y-J,k=Math.hypot(v,E)||1,ie=$*(.18+.82*Math.exp(-k/220)),X=ie*(.6+W()*1.8),V=he(R+v/k*X+(W()-.5)*ie*2,qi),se=he(A+E/k*X+(W()-.5)*ie*2,qi),m=he(K+(W()-.5)*ie*.12,xp);return{g:N,fx:R,fy:A,fr:K,tx:V,ty:se,tr:m,lift:ie*.09}}),D=0,H=()=>{let N=$i[D];for(let R of Y)R.g.dx=R.fx+(R.tx-R.fx)*N.k,R.g.dy=R.fy+(R.ty-R.fy)*N.k,R.g.dr=R.fr+(R.tr-R.fr)*N.k,R.g.hop=R.lift*N.hop;T(),++D<$i.length&&(F=window.setTimeout(H,gp))};H()};return Mo.add(U),()=>{Mo.delete(U),To.delete(x),clearTimeout(z),clearTimeout(F),clearTimeout(f),cancelAnimationFrame(c.current),i.current=!1,S.disconnect(),w?.removeEventListener?.("change",_)}},[r,t,n]),fa("canvas",{className:"hsk-cb-doodles",ref:o,"aria-hidden":"true"})}),In=3,Ui=1800;function Sp({seed:e="",theme:r,alphaScale:t=1.8,weight:n=.6}){let a=gr(null);return Ro(()=>{let o=a.current,i=o?.getContext("2d");if(!o||!i)return;let c=0,s=()=>{let h=o.clientWidth,d=o.clientHeight,p=Math.min(window.devicePixelRatio||1,3);o.width=Math.round(h*p),o.height=Math.round(d*p);let u=getComputedStyle(o),f=u.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",C=u.getPropertyValue("--hsk-doodle-tint").trim()||f,b=h*In,L=d*In,x=Vi(b,L,f,C,Wi(e||"kiku"),!1,r);for(let w of x)w.lineWidth*=In*n;if(i.setTransform(p/In,0,0,p/In,0,0),window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){Ar(i,x,b,L,-1,t);return}let z=performance.now(),S=w=>{let _=(w-z)%(Ui*2)/Ui,F=_<1?_:2-_;Ar(i,x,b,L,(1-Math.cos(F*Math.PI))/2*1.4,t),c=requestAnimationFrame(S)};c=requestAnimationFrame(S)},l=new ResizeObserver(()=>{c||!o.clientWidth||!o.clientHeight||(l.disconnect(),s())});return l.observe(o),()=>{l.disconnect(),cancelAnimationFrame(c)}},[e,r,t,n]),fa("canvas",{className:"hsk-doodle-shimmer",ref:a,"aria-hidden":"true"})}var Mp=300;function nn({active:e,seed:r,theme:t}){let[n,a]=mp(e);return Ro(()=>{if(e){a(!0);return}let o=setTimeout(()=>a(!1),Mp);return()=>clearTimeout(o)},[e]),n?fa("span",{className:`hsk-working-veil${e?"":" is-leaving"}`,"aria-hidden":"true",children:fa(Sp,{seed:r,theme:t,alphaScale:18,weight:1.15})}):null}var ka=Cp;import Pn,{useState as jt,useEffect as Lo,useCallback as ji}from"react";import{useAkropolysContext as Tp}from"@akropolys/sdk";import{jsx as Yi}from"react/jsx-runtime";var Rp={english:"en",en:"en",swahili:"sw",kiswahili:"sw",sw:"sw",french:"fr",fran\u00E7ais:"fr",francais:"fr",fr:"fr",spanish:"es",espa\u00F1ol:"es",espanol:"es",es:"es",arabic:"ar",\u0627\u0644\u0639\u0631\u0628\u064A\u0629:"ar",ar:"ar",portuguese:"pt",portugu\u00EAs:"pt",pt:"pt",hindi:"hi",\u0939\u093F\u0928\u094D\u0926\u0940:"hi",hi:"hi",chinese:"zh",\u4E2D\u6587:"zh",zh:"zh",japanese:"ja",\u65E5\u672C\u8A9E:"ja",ja:"ja",urdu:"ur",\u0627\u0631\u062F\u0648:"ur",ur:"ur",burmese:"my",burma:"my",myanmar:"my","\u1019\u103C\u1014\u103A\u1019\u102C":"my","\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C":"my",my:"my",khmer:"km",cambodian:"km",\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A:"km",\u1781\u17D2\u1798\u17C2\u179A:"km",km:"km",persian:"fa",farsi:"fa",\u0641\u0627\u0631\u0633\u06CC:"fa",fa:"fa",fas:"fa",malay:"ms",bahasa:"ms",indonesian:"id","bahasa melayu":"ms","bahasa indonesia":"id",ms:"ms",id:"id",amharic:"am",\u12A0\u121B\u122D\u129B:"am",am:"am"};function an(e){let r=e?Rp[e.trim().toLowerCase()]:void 0;return r?{dir:r==="ar"||r==="ur"||r==="fa"?"rtl":"ltr",bcp47:r}:null}function Ep(e){let r=/var\(\s*(--[\w-]+)/.exec(e)?.[1];if(!r||typeof document>"u")return"";for(let t of[document.documentElement,document.body]){let n=t?getComputedStyle(t).getPropertyValue(r).trim():"";if(n)return n.split(",")[0].trim()}return""}var Gi=5e3,Ki=[5e3,15e3,45e3,12e4];function Xi({shopperLanguage:e,theme:r,preloadedStrings:t}){let n=Tp(),a=e?n?.getCachedUIStrings?.(e,Lt)??n?.getCachedUIStrings?.(e,fr):null,o=t&&Object.keys(t).length>0?t:a?.strings??{},[i,c]=jt(()=>o),[s,l]=jt(()=>!e||t&&Object.keys(t).length>0||!!a?.complete),[h,d]=jt(()=>t&&Object.keys(t).length>0||a?.complete?e:!e||an(e)?.bcp47==="en"?e||"en":""),p=!e||an(e)?.bcp47==="en",u=i;t&&Object.keys(t).length>0&&(u={...i,...t});let f=e?`akropolys_ui_dir_${e.toLowerCase()}`:"",[C,b]=jt(()=>{if(a?.dir)return a.dir==="rtl";let N=an(e);if(N)return N.dir==="rtl";if(Rr(e)?.rtl)return!0;if(typeof window>"u"||!f)return!1;try{return localStorage.getItem(f)==="rtl"}catch{return!1}}),[L,x]=jt(()=>a?.bcp47||an(e)?.bcp47||""),[z,S]=jt(()=>a?.font??null),[w,_]=jt(()=>ri(n)),[F,T]=jt(!0),[U,M]=jt(!1),I=Pn.useRef(e),[$,P]=jt(e);if(e!==$){P(e);let N=an(e);N&&(b(N.dir==="rtl"),x(N.bcp47));let R=e?n?.getCachedUIStrings?.(e,Lt)??n?.getCachedUIStrings?.(e,fr):null,A=t&&Object.keys(t).length>0?t:R?.strings;A&&Object.keys(A).length>0&&(c(A),u=A,R&&(R.font&&S(R.font),R.dir&&b(R.dir==="rtl"),R.bcp47&&x(R.bcp47)),R?.font&&Ut(R.font),M(!lo([R?.font?.family,w?.family].filter(K=>!!K),A)),d(e),l(!0))}let Q=e===I.current||p||!U&&(h.toLowerCase()===e.toLowerCase()&&s||Object.keys(u).length>0);Lo(()=>{if(!e){x(""),S(null),c({}),d(""),l(!0),b(!1);return}let N=an(e),R=Rr(e),A=N?.bcp47==="en",K=!1,v=(X,V)=>{let se=[X?.family,w?.family].filter(m=>!!m);if(e===I.current||lo(se,V)){M(!1);return}M(!0),ho(se,V,Gi).then(()=>{K||M(!1)})},E=n?.getCachedUIStrings?.(e,Lt);if(E?.strings&&Object.keys(E.strings).length>0)return c(E.strings),b(E.dir==="rtl"),x(E.bcp47||N?.bcp47||""),E.font&&(Ut(E.font),S(E.font)),v(E.font,E.strings),d(e),l(!0),()=>{K=!0};let k=n?.getCachedUIStrings?.(e,fr);k?.strings&&Object.keys(k.strings).length>0?(c(k.strings),b(k.dir==="rtl"),x(k.bcp47||N?.bcp47||""),k.font&&(Ut(k.font),S(k.font)),v(k.font,k.strings),d(e),l(!0)):(M(!1),c({}),N?(b(N.dir==="rtl"),x(N.bcp47)):R?.rtl&&b(!0),A||l(!1));let ie=async()=>{let X=!1;try{if(!k?.strings){let se=await n.getUIStrings?.(e,fr);if(!K&&se?.complete){M(!0),c(g=>({...g,...se.strings})),b(se.dir==="rtl"),x(se.bcp47||N?.bcp47||"");try{localStorage.setItem(f,se.dir)}catch{}se.font&&Ut(se.font);let m=[se.font?.family,w?.family].filter(g=>!!g);await ho(m,se.strings,Gi),K||(se.font&&S(se.font),d(e),l(!0),M(!1))}}let V=await n.getUIStrings?.(e,Lt);!K&&V?.complete&&(X=!0,c(se=>({...se,...V.strings})),V.font&&(await Ut(V.font,1200),K||S(V.font)))}catch{return!1}return X};return(async()=>{for(let X=0;!K&&!await ie();X++){let V=Ki[Math.min(X,Ki.length-1)];await new Promise(se=>window.setTimeout(se,V))}})(),()=>{K=!0}},[e,n,f]),Lo(()=>{let N=!1;return(async()=>{try{let R=await po(n);!N&&R&&_(R)}catch{}N||T(!0)})(),()=>{N=!0}},[n]),co(z),co(w);let de=Pn.useMemo(()=>{let R=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim(),A=/^var\(/i.test(R),K=R.replace(/^['"]|['"]$/g,""),v=A?Ep(R):"",E=A?v?`${v}, `:"":K?`"${K}", `:"";if(z)return`"${z.family}", ${E}"Geist", system-ui, sans-serif`;let k=e?e.trim().toLowerCase():"";if(k==="japanese"||k==="ja"||k==="\u65E5\u672C\u8A9E")return`${E}"Geist", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif`;if(k==="chinese"||k==="zh"||k==="\u4E2D\u6587")return`${E}"Geist", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif`;if(k==="urdu"||k==="ur"||k==="\u0627\u0631\u062F\u0648")return`"Noto Nastaliq Urdu", ${E}"IBM Plex Sans Arabic", "Geist", system-ui, sans-serif`;if(k==="arabic"||k==="ar"||k==="\u0627\u0644\u0639\u0631\u0628\u064A\u0629")return`"IBM Plex Sans Arabic", ${E}"Geist", system-ui, sans-serif`;if(k==="hindi"||k==="hi"||k==="\u0939\u093F\u0928\u094D\u0926\u0940")return`"Hind", ${E}"Geist", system-ui, sans-serif`},[z,e,typeof r=="object"&&r?r.fontFamily:void 0]),J=Pn.useMemo(()=>{let N=0,R=0;for(let A of Object.values(i))for(let K of A){let v=K.codePointAt(0)??0;v<192||/\p{L}/u.test(K)&&(v<=591?N++:R++)}return R>N},[i]),[W,he]=jt(0);Lo(()=>{if(typeof document>"u"||!document.fonts?.ready)return;let N=!0;return document.fonts.ready.then(()=>{N&&he(R=>R+1)}),()=>{N=!1}},[z]);let Y=Pn.useMemo(()=>{if(!J||typeof document>"u")return!0;let R=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim();if(!R)return!1;let A="";for(let v of Object.values(i))if(v){A=v;break}if(!A)return!0;let K=A.replace(/\s+/g,"");if(!K)return!0;try{let E=document.createElement("canvas").getContext("2d");if(!E)return!0;let k=R.startsWith("var(")&&getComputedStyle(document.documentElement).getPropertyValue(R.slice(4,-1).trim()).trim()||R;E.font=`16px ${k}, __akropolys_nonexistent_font__`;let ie=E.measureText(K).width;E.font="16px __akropolys_nonexistent_font__";let X=E.measureText(K).width;return Math.abs(ie-X)>1}catch{return!0}},[J,i,typeof r=="object"&&r?r.fontFamily:void 0,W]),D=ji((N,R)=>{let A=u[N]||i[N]||Lt[N]||N;if(R)for(let[K,v]of Object.entries(R))A=A.split(`{${K}}`).join(v);return A},[u,i]),H=ji((N,R)=>(u[N]||i[N]||Lt[N]||N).split(/(\{[a-zA-Z]+\})/g).map((K,v)=>{let E=K.match(/^\{([a-zA-Z]+)\}$/);return E&&R?.[E[1]]!==void 0?Yi("bdi",{children:R[E[1]]},v):Yi(Pn.Fragment,{children:K},v)}),[u,i]);return{chromeStrings:i,chromeReady:Q,isRTL:C,speechLang:L,scriptFont:z,fontStack:de,isNonLatin:J,hostFontCovers:Y,baseFontReady:F,t:D,tNode:H}}import{useState as on,useRef as at,useEffect as ga,useLayoutEffect as Lp,useCallback as er}from"react";function Qi({messages:e,loading:r,streaming:t,messageRefs:n}){let a=at(null),o=at(0),[i,c]=on(!1),[s,l]=on(1),[h,d]=on(0),p=at(()=>{}),u=at(null),f=at(!1),C=at(!0),b=at(!1),L=at(null),x=at(null),z=at(e.length),S=at(!1),w=at(()=>{}),_=at(()=>{}),F=at(null),T=at(()=>{}),[U,M]=on(0),I=at(0),$=at(""),P=at(()=>{}),Q=at(()=>{});ga(()=>{let m=a.current;if(!m)return;let g,B=()=>{clearTimeout(g),g=setTimeout(()=>{f.current=!1},150)},G=()=>{clearTimeout(g),f.current=!0,P.current()},ae=()=>{f.current&&B()};return m.addEventListener("touchstart",G,{passive:!0}),m.addEventListener("touchend",B,{passive:!0}),m.addEventListener("touchcancel",B,{passive:!0}),m.addEventListener("scroll",ae,{passive:!0}),()=>{clearTimeout(g),m.removeEventListener("touchstart",G),m.removeEventListener("touchend",B),m.removeEventListener("touchcancel",B),m.removeEventListener("scroll",ae)}},[]),ga(()=>{let m=a.current;if(!m)return;let g=160,B=8,G=0,ae=()=>{G=0;let pe=L.current?.offsetHeight??0,O=m.scrollHeight-pe-m.scrollTop-m.clientHeight,Z=performance.now()-o.current<400;O<=B&&(!b.current||Z)&&(C.current||Q.current(),C.current=!0,b.current=!1,H.current()),c(O>g&&!C.current);let ye=m.scrollHeight-m.clientHeight;l(ye>8?Math.min(1,Math.max(0,m.scrollTop/ye)):1);let ze=m.scrollTop+m.clientHeight*.33,ke=0;for(let we=0;we<n.current.length;we++){let Ne=n.current[we];Ne&&Ne.offsetTop<=ze&&(ke=we)}d(ke)},oe=()=>{G||(G=requestAnimationFrame(ae))};ae(),m.addEventListener("scroll",oe,{passive:!0});let xe=new ResizeObserver(()=>{x.current?w.current("sync"):C.current&&!f.current&&_.current(),oe()});xe.observe(m);for(let pe of n.current)pe&&xe.observe(pe);return()=>{G&&cancelAnimationFrame(G),m.removeEventListener("scroll",oe),xe.disconnect()}},[e.length,n]);let de=er(m=>{let g=`${m}:${I.current}`;$.current!==g&&($.current=g,M(B=>B+1))},[]),[J,W]=on(!1),he=at(!1),Y=er(()=>{he.current||(he.current=!0,W(!0))},[]),D=er(()=>{he.current&&(he.current=!1,W(!1))},[]),H=at(()=>{});H.current=D;let[N,R]=on(!1),A=at(!1),K=at(0),v=er(()=>{A.current=!1,R(!1)},[]),E=er(()=>{$.current="",v(),D()},[v,D]),k=er(()=>{A.current&&(performance.now()-K.current<700||v())},[v]);P.current=k,Q.current=E,ga(()=>{if(U===0)return;A.current=!0,K.current=performance.now(),R(!0);let m=setTimeout(v,4200);return()=>clearTimeout(m)},[U,v]);let ie=er(()=>{S.current=!1,x.current&&(x.current=null,L.current&&(L.current.style.height=""))},[]);T.current=ie,_.current=()=>{let m=a.current;if(!m)return;let g=m.scrollHeight-m.clientHeight;F.current?F.current(g):m.scrollTop=g},w.current=m=>{let g=a.current,B=L.current,G=x.current,ae=Z=>{let ye=m==="sync"?F.current:u.current;ye?ye(Z):g&&(g.scrollTop=Z)},oe=_.current;if(!g||!B||!G||!G.isConnected){ie(),C.current&&oe();return}let xe=parseFloat(getComputedStyle(g).paddingTop)||0;B.offsetHeight<g.clientHeight&&(B.style.height=`${g.clientHeight}px`);let pe=Math.max(0,G.offsetTop-xe),O=pe+g.clientHeight-(g.scrollHeight-B.offsetHeight);if(O<=0){ie(),C.current=!1,b.current=!0,ae(pe);return}O!==B.offsetHeight&&(B.style.height=`${O}px`),ae(pe)};let X=er(m=>{let g=a.current,B=n.current[m];if(!g||!B)return;let G=B.offsetTop-Math.max(0,(g.clientHeight-B.clientHeight)/2),ae=Math.max(0,Math.min(g.scrollHeight-g.clientHeight,G));u.current?u.current(ae):g.scrollTo({top:ae,behavior:"smooth"})},[n]),V=er(m=>{let g=a.current;if(!g||!g.contains(m))return;S.current=!1,x.current=null,C.current=!1,b.current=!0;let B=g.getBoundingClientRect(),G=m.getBoundingClientRect(),ae=Math.min(G.height>B.height?176:64,B.height/3);if(G.top>=B.top+ae&&G.bottom<=B.bottom-8)return;let oe=Math.max(0,Math.min(g.scrollHeight-g.clientHeight,g.scrollTop+G.top-B.top-ae));u.current?u.current(oe):g.scrollTo({top:oe,behavior:"auto"})},[]),se=er(()=>{let m=a.current;if(!m)return;C.current=!0,b.current=!1,T.current(),Q.current();let g=m.scrollHeight-m.clientHeight;u.current?u.current(g):m.scrollTo({top:g,behavior:"smooth"})},[]);return Lp(()=>{let m=a.current;if(!m)return;let g=e.slice(z.current);if(z.current=e.length,g.some(G=>G.role==="user")&&(C.current=!0,b.current=!1,Q.current(),x.current=null,S.current=!0),S.current){S.current=!1;for(let G=n.current.length-1;G>=0;G--){let ae=n.current[G];if(ae?.dataset.hskRole==="user"){x.current=ae;break}}if(x.current){w.current("glide");return}}if(x.current){w.current("glide");return}let B=m.scrollTop;if(!C.current)b.current||(Y(),de(e.length));else if(!f.current){_.current();return}m.scrollTop!==B&&p.current()},[e,r,t,n,de,Y]),ga(()=>{let m=a.current;if(!m||typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let g=7,B=16,G=1/(window.devicePixelRatio||1),ae=be=>Math.round(be/G)*G,oe=m.scrollTop,xe=m.scrollTop,pe=m.scrollTop,O=0,Z=null,ye=be=>{be!==pe&&(m.scrollTop=be,pe=m.scrollTop)},ze=()=>{Z!==null&&(cancelAnimationFrame(Z),Z=null),m.classList.remove("hsk-scrolling"),oe=xe=pe=m.scrollTop};p.current=ze,u.current=be=>{Math.abs(m.scrollTop-pe)>1&&(oe=xe=pe=m.scrollTop);let Pe=Math.round(Math.max(0,Math.min(m.scrollHeight-m.clientHeight,be)));Pe!==oe&&(oe=Pe,Z===null&&(O=performance.now(),Z=requestAnimationFrame(ke)))},F.current=be=>{let Pe=Math.round(Math.max(0,Math.min(m.scrollHeight-m.clientHeight,be)));Z!==null&&(cancelAnimationFrame(Z),Z=null,m.classList.remove("hsk-scrolling")),m.scrollTop=Pe,oe=xe=pe=m.scrollTop};let ke=be=>{let Pe=Math.min((be-O)/1e3,.05);if(O=be,xe+=(oe-xe)*(1-Math.exp(-g*Pe)),Math.abs(oe-xe)<G){xe=oe,ye(Math.round(oe)),m.classList.remove("hsk-scrolling"),Z=null;return}ye(ae(xe)),Z=requestAnimationFrame(ke)},we=be=>{if(be.ctrlKey)return;Math.abs(m.scrollTop-pe)>1&&(oe=xe=pe=m.scrollTop),be.deltaY<0&&(C.current&&(I.current+=1),C.current=!1,x.current=null),P.current();let Pe=be.deltaMode===1?B:be.deltaMode===2?m.clientHeight:1,We=Math.max(0,m.scrollHeight-m.clientHeight),He=Math.round(Math.max(0,Math.min(We,oe+be.deltaY*Pe)));if(He===oe){We>0&&be.preventDefault();return}be.preventDefault(),oe=He,Z===null&&(O=performance.now(),m.classList.add("hsk-scrolling"),Z=requestAnimationFrame(ke))},Ne=m.scrollTop,Ce=()=>{let be=Math.abs(m.scrollTop-pe)>1;be&&(o.current=performance.now(),m.scrollTop<Ne-1&&C.current&&(I.current+=1,C.current=!1,x.current=null)),Ne=m.scrollTop,Z!==null&&be&&(cancelAnimationFrame(Z),Z=null,m.classList.remove("hsk-scrolling"),oe=xe=pe=m.scrollTop)};return m.addEventListener("wheel",we,{passive:!1}),m.addEventListener("scroll",Ce,{passive:!0}),()=>{m.removeEventListener("scroll",Ce),m.removeEventListener("wheel",we),Z!==null&&cancelAnimationFrame(Z),m.classList.remove("hsk-scrolling"),p.current=()=>{},u.current=null,F.current=null}},[]),{msgsContainerRef:a,spacerRef:L,lastExternalScrollRef:o,showJumpToBottom:i,scrollProgress:s,activeMsgIdx:h,jumpAlert:N,unreadBelow:J,jumpToMessage:X,revealMessage:V,jumpToBottom:se,resetAlertArming:E}}import{useState as zp,useRef as sn,useEffect as Ji}from"react";var Np=450,Ip=45,Ap=900,Pp=180;function Zi(e){let[r,t]=zp(e),n=sn(e),a=sn(e),o=sn(0),i=sn(0),c=sn(0),s=sn(null);return Ji(()=>()=>{s.current!==null&&cancelAnimationFrame(s.current)},[]),Ji(()=>{if(a.current=e,window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||!e.startsWith(n.current)){s.current!==null&&(cancelAnimationFrame(s.current),s.current=null),n.current=e,o.current=0,i.current=0,t(e);return}if(s.current!==null||n.current.length>=e.length)return;c.current=performance.now();let h=d=>{let p=Math.min(d-c.current,50);c.current=d;let u=a.current,f=u.length-n.current.length,C=Math.min(Ap,Math.max(Ip,f*1e3/Np));o.current+=(C-o.current)*(1-Math.exp(-p/Pp)),i.current+=o.current*p/1e3;let b=Math.floor(i.current);b>0&&(i.current-=b,n.current=u.slice(0,Math.min(u.length,n.current.length+b)),t(n.current)),n.current.length<a.current.length?s.current=requestAnimationFrame(h):(s.current=null,i.current=0)};s.current=requestAnimationFrame(h)},[e]),r}import{useState as Pr,useEffect as ec,useCallback as zo}from"react";import{useAkropolysContext as Fp}from"@akropolys/sdk";function tc(e,r){let t=Fp(),[n,a]=Pr(""),[o,i]=Pr("idle"),[c,s]=Pr(null),[l,h]=Pr(null),[d,p]=Pr(null),[u,f]=Pr(fo),[C,b]=Pr(!1),L=zo(async(S,w)=>{try{navigator.clipboard&&window.isSecureContext?await navigator.clipboard.writeText(S):_p(S),p(w),setTimeout(()=>p(null),2e3)}catch{}},[]);ec(()=>{e&&e.type==="request_kiku_key"&&(i("prompt_key"),a(""))},[e]),ec(()=>{if(!c)return;f(fo);let S=setInterval(()=>{f(w=>w<=1?(clearInterval(S),s(null),h(null),0):w-1)},1e3);return()=>clearInterval(S)},[c]);let x=zo(async()=>{let S=n.trim();S&&(t.setKikuPub(S),a(""),i("idle"),await r())},[t,n,r]),z=zo(async()=>{if(!C){b(!0);try{let{secret:S,publicId:w}=await t.mintKikuKey();s(S),h(w),i("idle"),await r()}catch{}finally{b(!1)}}},[t,C,r]);return{keyInput:n,setKeyInput:a,keyPhase:o,setKeyPhase:i,mintedKey:c,setMintedKey:s,mintedPub:l,setMintedPub:h,copied:d,keyCountdown:u,minting:C,copyValue:L,handleUseExistingKey:x,handleCreateKey:z}}function _p(e){let r=document.createElement("textarea");r.value=e,r.setAttribute("readonly",""),r.style.cssText="position:fixed;top:0;left:0;opacity:0;",document.body.appendChild(r),r.select(),r.setSelectionRange(0,e.length);let t=document.execCommand("copy");if(r.remove(),!t)throw new Error("copy failed")}import{useCallback as xa}from"react";function rc({attachments:e,setAttachments:r,setInput:t,send:n,t:a}){let o=xa(l=>{if(typeof l.id!="string"||!l.id.trim())return;let h=l.name||"",d=`@kiku ${a("displayCapture",{name:h}).trim()}`,p=h||"capture current page";t("");let u=e;r([]);let f={id:l.id,name:h,url:l.url||l.fields?.url,image:l.image,fields:l.fields};n(p,d,u.length>0?u:void 0,"capture",[f])},[e,n,r,t,a]),i=xa(l=>{let h=l.filter(u=>typeof u.id=="string"&&u.id.trim().length>0).map(u=>({id:u.id,name:u.name||"",url:u.url||u.fields?.url,fields:u.fields,image:u.image||""}));if(h.length===0)return;let d=h.map(u=>u.name).filter(Boolean).join(", "),p=`@kiku ${a("displayCaptureAll",{count:String(h.length)})}`;t(""),r([]),n(d||"capture all",p,void 0,"capture_all",h)},[n,r,t,a]),c=xa(()=>{let l=`@kiku ${a("displayViewHistory")}`;t(""),r([]),n("show my saved items",l,void 0,"view_history")},[n,r,t,a]),s=xa(()=>{let l=`@kiku ${a("displayDelete")}`;t(""),r([]),n("delete this",l,void 0,"delete")},[n,r,t,a]);return{handleKikuCapture:o,handleKikuCaptureAll:i,handleKikuViewHistory:c,handleKikuDelete:s}}import{useState as Dr,useCallback as Sa,useEffect as vc,useRef as td}from"react";import{useAkropolysContext as rd}from"@akropolys/sdk";var ya=null,nc=null,va=null,Fn=null,ac=!1,Fr=0;function _n(e,r=130){let t=va;if(!t||!ya)return;let n=ya.currentTime;t.gain.cancelScheduledValues(n),t.gain.setValueAtTime(t.gain.value,n),t.gain.linearRampToValueAtTime(Math.max(0,Math.min(1,e)),n+r/1e3)}function oc(){if(!ac)return Fr*=.85,Fr;if(!nc||!Fn)return Fr;nc.getByteTimeDomainData(Fn);let e=0;for(let n=0;n<Fn.length;n++){let a=(Fn[n]-128)/128;e+=a*a}let r=Math.sqrt(e/Fn.length),t=Math.min(1,r*3.2);return Fr+=(t-Fr)*(t>Fr?.6:.12),Fr}function sc(){if(ac=!1,va&&ya&&(va.gain.cancelScheduledValues(ya.currentTime),va.gain.value=1),typeof window<"u"&&"speechSynthesis"in window)try{window.speechSynthesis.cancel()}catch{}}import{useCallback as tr,useEffect as xr,useRef as Qe,useState as wa}from"react";var Dp=1100,No=.012,Bp=320,Hp=.09,$p=.25,ic=130,qp=700,Up=12,Wp=48,Op=.45,Vp=.35,jp=.2,cc=.55;function lc({lang:e,onUtterance:r,onError:t,onBargeIn:n,silenceMs:a=Dp,paused:o=!1}){let[i,c]=wa(!1),[s,l]=wa(!1),[h,d]=wa(""),[p,u]=wa(!1),f=Qe(null),C=Qe(null),b=Qe(null),L=Qe(null),x=Qe(null),z=Qe(null),S=Qe(0),w=Qe(.008),_=Qe(0),F=Qe(0),T=Qe(""),U=Qe(0),M=Qe(0),I=Qe(!1),$=Qe(o),P=Qe(!1),Q=Qe(!1),de=Qe(r),J=Qe(t),W=Qe(n);xr(()=>{de.current=r},[r]),xr(()=>{J.current=t},[t]),xr(()=>{W.current=n},[n]),xr(()=>{$.current=o},[o]),xr(()=>{u(typeof window<"u"&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)&&!!navigator.mediaDevices?.getUserMedia)},[]);let he=tr(()=>S.current,[]),Y=tr(m=>{let g=L.current;return!g||m.length!==g.frequencyBinCount?!1:(g.getByteFrequencyData(m),!0)},[]),D=tr(()=>L.current?.frequencyBinCount??0,[]),H=Qe([]),N=Qe(null),R=Qe(!1),A=Qe(0),K=Qe(0),v=tr(m=>{let g=L.current;if(!g)return 0;let B=H.current;B.push(m),B.length>Wp&&B.shift();let G=0;if(B.length>=12){let we=0;for(let Ne of B)we+=Ne;if(we/=B.length,we>1e-4){let Ne=0;for(let Ce of B)Ne+=(Ce-we)*(Ce-we);G=Math.min(1,Math.sqrt(Ne/B.length)/we/.6)}}let ae=0;(!N.current||N.current.length!==g.frequencyBinCount)&&(N.current=new Uint8Array(g.frequencyBinCount));let oe=N.current;g.getByteFrequencyData(oe);let pe=(b.current?.sampleRate??48e3)/2/oe.length,O=Math.floor(300/pe),Z=Math.min(oe.length-1,Math.ceil(3400/pe)),ye=0,ze=0;for(let we=0;we<oe.length;we++)ze+=oe[we],we>=O&&we<=Z&&(ye+=oe[we]);ze>0&&(ae=ye/ze);let ke=Math.min(1,m/(w.current+No*3));return Op*ke+Vp*G+jp*ae},[]),E=tr(()=>{let m=T.current.trim();if(T.current="",U.current=M.current,d(""),l(!1),m){P.current=!1;let g=f.current;f.current=null;try{g?.stop()}catch{}de.current(m)}},[]),k=tr(()=>{let m=L.current,g=z.current;if(!m||!g)return;m.getByteTimeDomainData(g);let B=0;for(let O=0;O<g.length;O++){let Z=(g[O]-128)/128;B+=Z*Z}let G=Math.sqrt(B/g.length),ae=Math.min(1,G*4);S.current+=(ae-S.current)*(ae>S.current?.6:.12);let oe=Date.now(),xe=$.current?oc()*Hp:0;G>w.current+No+xe?(_.current=oe,F.current||(F.current=oe)):(F.current=0,w.current=Math.min(w.current*1.02+2e-5,Math.max(.004,G))),$.current?R.current?(v(G)>cc?K.current+=1:K.current=Math.max(0,K.current-2),K.current>=Up?(R.current=!1,K.current=0,_n(1,0),W.current?.()):oe-A.current>qp&&(R.current=!1,K.current=0,_n(1,ic*2))):F.current&&oe-F.current>Bp&&v(G)>cc&&(F.current=0,R.current=!0,A.current=oe,K.current=0,_n($p,ic)):T.current.trim()&&oe-_.current>a&&E(),x.current=requestAnimationFrame(k)},[E,a,v]),ie=tr(()=>{if(f.current||!I.current)return;let m=window.SpeechRecognition||window.webkitSpeechRecognition,g=new m;U.current=0,M.current=0,g.lang=e||document.documentElement.lang||navigator.language||"en-US",g.interimResults=!0,g.maxAlternatives=1,g.continuous=!0,g.onresult=B=>{let G="";for(let ae=U.current;ae<B.results.length;ae++)G+=B.results[ae][0].transcript;M.current=B.results.length,G=G.trim(),G&&(T.current=G,d(G),l(!0))},g.onerror=B=>{let G=B?.error||"";G==="no-speech"||G==="aborted"||J.current?.(G)},g.onend=()=>{f.current=null,I.current&&P.current&&setTimeout(()=>{ie()},120)},f.current=g;try{g.start()}catch{f.current=null,J.current?.("failed-to-start")}},[e]),X=tr(()=>{P.current=!1;let m=f.current;f.current=null;try{m?.stop()}catch{}},[]),V=tr(()=>{I.current=!1,R.current=!1,K.current=0,H.current=[],_n(1,0),P.current=!1,c(!1),l(!1),d(""),T.current="",S.current=0;let m=f.current;f.current=null;try{m?.abort()}catch{}x.current!==null&&(cancelAnimationFrame(x.current),x.current=null),C.current?.getTracks().forEach(g=>g.stop()),C.current=null,L.current=null,b.current?.close().catch(()=>{}),b.current=null},[]),se=tr(async()=>{if(!(I.current||!p)){I.current=!0,c(!0);try{let m=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});C.current=m;let g=window.AudioContext||window.webkitAudioContext,B=new g;b.current=B;let G=B.createAnalyser();G.fftSize=1024,G.smoothingTimeConstant=.25,B.createMediaStreamSource(m).connect(G),L.current=G,z.current=new Uint8Array(G.fftSize),w.current=.008,_.current=Date.now(),x.current=requestAnimationFrame(k)}catch(m){I.current=!1,c(!1),J.current?.(m?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}P.current=!0,ie()}},[p,k,ie]);return xr(()=>{i&&(o?(T.current="",d(""),R.current=!1,K.current=0,H.current=[],X()):(R.current=!1,_.current=Date.now(),P.current=!0,ie()))},[o,i,ie,X]),xr(()=>{if(!i||o)return;let m=setInterval(()=>{let g=!!f.current,B=S.current>w.current+No;g&&B&&T.current},2e3);return()=>clearInterval(m)},[i,o]),xr(()=>()=>{V()},[V]),{supported:p,active:i,hearing:s,interim:h,micLevel:he,micSpectrum:Y,spectrumBins:D,start:se,stop:V}}import{useCallback as Xe,useEffect as ln,useRef as Me,useState as _r}from"react";var hc=[-1,-1,-1,-1,2,4,6,8,-1,-1,-1,-1,2,4,6,8],pc=[7,8,9,10,11,12,13,14,16,17,19,21,23,25,28,31,34,37,41,45,50,55,60,66,73,80,88,97,107,118,130,143,157,173,190,209,230,253,279,307,337,371,408,449,494,544,598,658,724,796,876,963,1060,1166,1282,1411,1552,1707,1878,2066,2272,2499,2749,3024,3327,3660,4026,4428,4871,5358,5894,6484,7132,7845,8630,9493,10442,11487,12635,13899,15289,16818,18500,20350,22385,24623,27086,29794,32767],Io=e=>e<0?0:e>88?88:e,dc=e=>e<-32768?-32768:e>32767?32767:e,Dn=class{constructor(){this.index=0}encode(r){let t=r.length,n=new Uint8Array(4+(t+1>>1));if(t===0)return n.buffer;let a=r[0];new DataView(n.buffer).setInt16(0,a,!0),n[2]=this.index,n[3]=t&1;let i=this.index;for(let c=0;c<t;c++){let s=pc[i],l=r[c]-a,h=0;l<0&&(h=8,l=-l);let d=s>>3;l>=s&&(h|=4,l-=s,d+=s),s>>=1,l>=s&&(h|=2,l-=s,d+=s),s>>=1,l>=s&&(h|=1,d+=s),a=dc(h&8?a-d:a+d),i=Io(i+hc[h]),n[4+(c>>1)]|=h<<4*(c&1)}return this.index=i,n.buffer}};function uc(e){let r=new Uint8Array(e);if(r.length<4)return new Float32Array(0);let t=new DataView(e).getInt16(0,!0),n=Io(r[2]),a=(r.length-4)*2;r[3]&1&&a>0&&a--;let o=new Float32Array(a);for(let i=0;i<a;i++){let c=r[4+(i>>1)]>>4*(i&1)&15,s=pc[n],l=s>>3;c&4&&(l+=s),c&2&&(l+=s>>1),c&1&&(l+=s>>2),t=dc(c&8?t-l:t+l),n=Io(n+hc[c]),o[i]=t/32768}return o}function vr(e,r,t){for(let n=0;n<t.length;n++)e.setUint8(r+n,t.charCodeAt(n))}function mc(e,r=24e3){let t=0;for(let s of e)t+=s.length;let n=new Float32Array(t),a=0;for(let s of e)n.set(s,a),a+=s.length;let o=new ArrayBuffer(44+t*2),i=new DataView(o);vr(i,0,"RIFF"),i.setUint32(4,36+t*2,!0),vr(i,8,"WAVE"),vr(i,12,"fmt "),i.setUint32(16,16,!0),i.setUint16(20,1,!0),i.setUint16(22,1,!0),i.setUint32(24,r,!0),i.setUint32(28,r*2,!0),i.setUint16(32,2,!0),i.setUint16(34,16,!0),vr(i,36,"data"),i.setUint32(40,t*2,!0);let c=44;for(let s=0;s<t;s++){let l=Math.max(-1,Math.min(1,n[s]));i.setInt16(c,l<0?l*32768:l*32767,!0),c+=2}return new Blob([o],{type:"audio/wav"})}function bc(e,r=16e3){let t=0;for(let s of e)t+=s.length;let n=new Int16Array(t),a=0;for(let s of e)n.set(s,a),a+=s.length;let o=new ArrayBuffer(44+t*2),i=new DataView(o);vr(i,0,"RIFF"),i.setUint32(4,36+t*2,!0),vr(i,8,"WAVE"),vr(i,12,"fmt "),i.setUint32(16,16,!0),i.setUint16(20,1,!0),i.setUint16(22,1,!0),i.setUint32(24,r,!0),i.setUint32(28,r*2,!0),i.setUint16(32,2,!0),i.setUint16(34,16,!0),vr(i,36,"data"),i.setUint32(40,t*2,!0);let c=44;for(let s=0;s<t;s++)i.setInt16(c,n[s],!0),c+=2;return new Blob([o],{type:"audio/wav"})}var cn=class{constructor(){this.attempts=0}static canRetry(r){return r===1006||r===1011||r===1012||r===1013}nextDelay(){return[500,1500][this.attempts++]??null}};function fc(e,r,t){let n=e.map(a=>({...a}));for(let[a,o]of[["user",r],["assistant",t]]){if(!o.trim())continue;let i=-1;for(let c=n.length-1;c>=0;c--)if(n[c].role===a&&!n[c].done){i=c;break}if(i<0&&a==="user"){let c=n.map(s=>s.role).lastIndexOf("user");if(c>=0&&n[c].text===o.trim())continue}i>=0?n[i].text=o.trim():n.push({role:a,text:o.trim(),done:!0})}return n.map(a=>({...a,done:!0}))}var Ao=16e3,Ca=24e3,Gp=.08,Kp=.12,Yp=.03,Xp=.08;var Qp=.12,Jp=500,Zp=6e4,ed=`
|
|
2
|
+
import{useState as ei,useEffect as ti,useRef as ri}from"react";import{useSearch as up,useAkropolysContext as mp,useCardFields as bp}from"@akropolys/sdk";import{resolveDisplayFields as dp}from"@akropolys/sdk";function Kt(e,r){return e.details??(e.fields?dp(e.fields,r).details:[])}function mo(e){return e.length?` (${e.map(r=>`${r.label}: ${r.value}`).join(", ")})`:""}function Js(e){var r,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(r=0;r<a;r++)e[r]&&(t=Js(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Zs(){for(var e,r,t=0,n="",a=arguments.length;t<a;t++)(e=arguments[t])&&(r=Js(e))&&(n&&(n+=" "),n+=r);return n}function se(...e){return Zs(e)}import{Fragment as ai,jsx as ft,jsxs as Ut}from"react/jsx-runtime";var ni=()=>Ut("svg",{width:"15",height:"15",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[ft("circle",{cx:"8.5",cy:"8.5",r:"5.5"}),ft("line",{x1:"13",y1:"13",x2:"18",y2:"18"})]});function fp({placeholder:e="Search products\u2026",limit:r=10,debounceMs:t=150,onSelect:n,className:a,inputClassName:o,dropdownClassName:i,renderResult:c,theme:s,classNames:l={}}){let[h,p]=ei(""),[d,u]=ei(!1),{results:f,loading:C,search:b,clear:E}=up({debounceMs:t}),x=mp(),L=bp(),M=ri(null),w=ri(!1);ti(()=>{if(w.current){w.current=!1;return}if(!h.trim()){E(),u(!1);return}u(!0),b(h,r)},[h]),ti(()=>{let v=I=>{M.current&&!M.current.contains(I.target)&&u(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[]);let D=v=>{h.trim()&&x.api.searchVector(h,1,void 0,!0).catch(()=>{}),w.current=!0,u(!1),p(v.entity.title??v.entity.name??""),n?.(v)},H=()=>{h.trim()&&(f.length>0?D(f[0]):x.api.searchVector(h,1,void 0,!0).catch(()=>{}))},S=d&&h.trim().length>0,O={...s?.primaryColor&&{"--hsk-primary":s.primaryColor},...s?.backgroundColor&&{"--hsk-bg":s.backgroundColor},...s?.textColor&&{"--hsk-text":s.textColor},...s?.fontFamily&&{"--hsk-font":s.fontFamily},...s?.borderRadius&&{"--hsk-border-radius":s.borderRadius}};return Ut("div",{className:se("hsk-sb-wrap",l.root,a),ref:M,style:O,children:[ft("span",{className:"hsk-sb-icon",children:ft(ni,{})}),ft("input",{className:se("hsk-sb-input",l.input,o),type:"text",value:h,placeholder:e,onChange:v=>p(v.target.value),onFocus:()=>f.length>0&&h.trim()&&u(!0),onKeyDown:v=>{v.key==="Enter"&&H()},autoComplete:"off",spellCheck:!1}),S&&Ut("div",{className:se("hsk-sb-drop",l.dropdown,i),style:{position:"absolute"},children:[C&&ft("div",{className:"hsk-sb-loading-bar"}),C&&f.length===0?Ut(ai,{children:[Ut("div",{className:"hsk-sb-skeleton-row",children:[ft("span",{className:"hsk-sb-skeleton-icon"}),Ut("div",{className:"hsk-sb-row-body",children:[ft("div",{className:"hsk-sb-skeleton-text1"}),ft("div",{className:"hsk-sb-skeleton-text2"})]})]}),Ut("div",{className:"hsk-sb-skeleton-row",children:[ft("span",{className:"hsk-sb-skeleton-icon"}),Ut("div",{className:"hsk-sb-row-body",children:[ft("div",{className:"hsk-sb-skeleton-text1",style:{width:"45%"}}),ft("div",{className:"hsk-sb-skeleton-text2",style:{width:"25%"}})]})]})]}):Ut(ai,{children:[f.length===0&&!C&&Ut("div",{className:"hsk-sb-empty",children:["No results for \u201C",h,"\u201D"]}),f.map((v,I)=>{if(c)return ft("div",{onClick:()=>D(v),className:"hsk-sb-fade",style:{animationDelay:`${I*18}ms`},children:c(v)},v.id);let q=v.entity.image??v.entity.thumbnail??v.entity.images?.[0];return Ut("div",{className:se("hsk-sb-row hsk-sb-fade",l.row),style:{animationDelay:`${I*18}ms`},onClick:()=>D(v),children:[ft("span",{className:"hsk-sb-row-thumb",children:q?ft("img",{src:q,alt:"",loading:"lazy",onError:P=>{P.currentTarget.style.display="none"}}):ft(ni,{})}),Ut("div",{className:"hsk-sb-row-body",children:[ft("div",{className:"hsk-sb-row-title",children:v.entity.title??v.entity.name}),Kt({fields:v.entity.fields??v.entity},L)[0]&&ft("div",{className:"hsk-sb-row-sub",children:Kt({fields:v.entity.fields??v.entity},L)[0].value})]})]},v.id)})]})]})]})}import{useState as Ya,useEffect as Jl,useCallback as Cs,useRef as Im}from"react";import{createPortal as Am}from"react-dom";var oi="hsk-sounds",He=null,or=null;function da(){try{return localStorage.getItem(oi)!=="off"}catch{return!0}}function si(e){try{localStorage.setItem(oi,e?"on":"off")}catch{}e&&yr()}function yr(){if(typeof window>"u")return;try{let r=navigator.audioSession;r&&r.type!=="playback"&&(r.type="playback")}catch{}if(He){He.state==="suspended"&&He.resume().catch(()=>{});return}let e=window.AudioContext||window.webkitAudioContext;if(e)try{He=new e({latencyHint:"interactive"}),or=He.createGain(),or.gain.value=.28,or.connect(He.destination);let r=He.createBuffer(1,1,He.sampleRate),t=He.createBufferSource();t.buffer=r,t.connect(He.destination),t.start(0),He.resume().catch(()=>{})}catch{He=null}}function ar(e,r,t,n,a){if(!He||!or)return;let o=He.createOscillator();o.type="sine",o.frequency.setValueAtTime(r,e),o.frequency.exponentialRampToValueAtTime(Math.max(40,r*t),e+n);let i=He.createBiquadFilter();i.type="lowpass",i.Q.value=.9,i.frequency.setValueAtTime(Math.min(18e3,r*7),e),i.frequency.exponentialRampToValueAtTime(Math.max(80,r*1.5),e+n);let c=He.createGain();c.gain.setValueAtTime(1e-4,e),c.gain.exponentialRampToValueAtTime(a,e+.006),c.gain.exponentialRampToValueAtTime(1e-4,e+n),o.connect(i),i.connect(c),c.connect(or),o.start(e),o.stop(e+n+.02)}function ii(e,r){if(!He||!or)return;let t=Math.floor(He.sampleRate*.03),n=He.createBuffer(1,t,He.sampleRate),a=n.getChannelData(0);for(let s=0;s<t;s++)a[s]=(Math.random()*2-1)*Math.pow(1-s/t,3);let o=He.createBufferSource();o.buffer=n;let i=He.createBiquadFilter();i.type="bandpass",i.frequency.value=2600,i.Q.value=5;let c=He.createGain();c.gain.value=r,o.connect(i),i.connect(c),c.connect(or),o.start(e)}function ci(){return da()?He?He.state:"unsupported":"off"}function kp(e){!He||!or||(ar(e,587.33,.985,.16,.38),ar(e+.048,739.99,.985,.18,.42),ar(e+.096,880,.985,.28,.46),ar(e+.105,1174.66,.985,.22,.22),ii(e+.096,.16))}function gp(e){!He||!or||ar(e,659.25,.97,.09,.26)}function Xt(e,r=!1){if(!r&&!da()||(yr(),!He||!or||He.state==="closed"))return;He.state==="suspended"&&He.resume().catch(()=>{});let t=He.currentTime+.01;switch(e){case"connect":kp(t);break;case"heard":gp(t);break;case"reply":ar(t,440,.94,.13,.5),ar(t+.09,660,.94,.16,.42);break;case"interrupt":ar(t,520,.62,.17,.4);break;case"send":ar(t,300,1.16,.1,.22);break;case"pin":ii(t,.35),ar(t+.02,880,.97,.07,.22);break}}var bo='@property --hsk-chat-bg{syntax: "<color>"; inherits: true; initial-value: #0a0a0a;}@property --hsk-chat-text{syntax: "<color>"; inherits: true; initial-value: #f0efed;}@property --hsk-chat-muted{syntax: "<color>"; inherits: true; initial-value: #888888;}@property --hsk-chat-divide{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.08);}@property --hsk-chat-input-bg{syntax: "<color>"; inherits: true; initial-value: #191919;}@property --hsk-chat-source-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.04);}@property --hsk-fade-bg{syntax: "<color>"; inherits: true; initial-value: #0a0a0a;}@property --hsk-surface-1{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.06);}@property --hsk-surface-2{syntax: "<color>"; inherits: true; initial-value: #1f1f22;}@property --hsk-bubble-bg{syntax: "<color>"; inherits: true; initial-value: #1f1f22;}@property --hsk-think-text{syntax: "<color>"; inherits: true; initial-value: #a6a6a6;}@property --hsk-placeholder{syntax: "<color>"; inherits: true; initial-value: #555555;}@property --hsk-grid-bg{syntax: "<color>"; inherits: true; initial-value: #1a1a1c;}@property --hsk-active-bg{syntax: "<color>"; inherits: true; initial-value: #f0efed;}@property --hsk-on-active{syntax: "<color>"; inherits: true; initial-value: #0a0a0a;}@property --hsk-src-title{syntax: "<color>"; inherits: true; initial-value: #f9fafb;}@property --hsk-src-desc{syntax: "<color>"; inherits: true; initial-value: #9ca3af;}@property --hsk-price-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.08);}@property --hsk-price-text{syntax: "<color>"; inherits: true; initial-value: #ff7a45;}@property --hsk-sheet-bg{syntax: "<color>"; inherits: true; initial-value: #1f1f22;}@property --hsk-primary{syntax: "<color>"; inherits: true; initial-value: #ff6a33;}@property --hsk-pill-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.06);}@property --hsk-glass-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.07);}@property --hsk-glass-edge{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-glass-edge-top{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-glass-drop{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-glass-sheen{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-selection-bg{syntax: "<color>"; inherits: true; initial-value: #ff6a33;}@property --hsk-selection-text{syntax: "<color>"; inherits: true; initial-value: #ffffff;}[data-hsk-theme]{transition:--hsk-chat-bg .36s cubic-bezier(.4,0,.2,1),--hsk-chat-text .36s cubic-bezier(.4,0,.2,1),--hsk-chat-muted .36s cubic-bezier(.4,0,.2,1),--hsk-chat-divide .36s cubic-bezier(.4,0,.2,1),--hsk-chat-input-bg .36s cubic-bezier(.4,0,.2,1),--hsk-chat-source-bg .36s cubic-bezier(.4,0,.2,1),--hsk-fade-bg .36s cubic-bezier(.4,0,.2,1),--hsk-surface-1 .36s cubic-bezier(.4,0,.2,1),--hsk-surface-2 .36s cubic-bezier(.4,0,.2,1),--hsk-bubble-bg .36s cubic-bezier(.4,0,.2,1),--hsk-think-text .36s cubic-bezier(.4,0,.2,1),--hsk-placeholder .36s cubic-bezier(.4,0,.2,1),--hsk-grid-bg .36s cubic-bezier(.4,0,.2,1),--hsk-active-bg .36s cubic-bezier(.4,0,.2,1),--hsk-on-active .36s cubic-bezier(.4,0,.2,1),--hsk-src-title .36s cubic-bezier(.4,0,.2,1),--hsk-src-desc .36s cubic-bezier(.4,0,.2,1),--hsk-price-bg .36s cubic-bezier(.4,0,.2,1),--hsk-price-text .36s cubic-bezier(.4,0,.2,1),--hsk-sheet-bg .36s cubic-bezier(.4,0,.2,1),--hsk-primary .36s cubic-bezier(.4,0,.2,1),--hsk-pill-bg .36s cubic-bezier(.4,0,.2,1),--hsk-glass-bg .36s cubic-bezier(.4,0,.2,1),--hsk-glass-edge .36s cubic-bezier(.4,0,.2,1),--hsk-glass-edge-top .36s cubic-bezier(.4,0,.2,1),--hsk-glass-drop .36s cubic-bezier(.4,0,.2,1),--hsk-glass-sheen .36s cubic-bezier(.4,0,.2,1),--hsk-selection-bg .36s cubic-bezier(.4,0,.2,1),--hsk-selection-text .36s cubic-bezier(.4,0,.2,1)}[data-hsk-theming] *,[data-hsk-theming] *:before,[data-hsk-theming] *:after{transition-property:transform,opacity!important}[data-hsk-theming] .hsk-cb-theme-squircle-wrap{transition-property:width,height,border-radius!important}[data-hsk-theming] .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger{transition-property:height,opacity!important}@media(prefers-reduced-motion:reduce){[data-hsk-theme]{transition:none}}:host,:root{--hsk-border-radius: 0px;--hsk-brand-green: #2D7A4B;--hsk-font: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;--hsk-default-font-size: 15px}.hsk-cb-btn,.hsk-cb-close,.hsk-cb-topbar-btn,.hsk-cb-chip,.hsk-cb-source,.hsk-cb-sources-next,.hsk-action-pill,.hsk-chat-send,.hsk-chat-reset,.hsk-close-btn,.hsk-cb-overlay{--hsk-font-size: 16px;touch-action:manipulation;-webkit-tap-highlight-color:transparent;font-family:var(--hsk-font)}.hsk-cb-overlay{transition:--hsk-chat-bg .45s cubic-bezier(.16,1,.3,1),--hsk-chat-text .45s cubic-bezier(.16,1,.3,1),--hsk-chat-muted .45s cubic-bezier(.16,1,.3,1),--hsk-chat-divide .45s cubic-bezier(.16,1,.3,1),--hsk-chat-input-bg .45s cubic-bezier(.16,1,.3,1),--hsk-surface-1 .45s cubic-bezier(.16,1,.3,1),--hsk-surface-2 .45s cubic-bezier(.16,1,.3,1),--hsk-bubble-bg .45s cubic-bezier(.16,1,.3,1),--hsk-primary .45s cubic-bezier(.16,1,.3,1),--hsk-grid-bg .45s cubic-bezier(.16,1,.3,1),--hsk-active-bg .45s cubic-bezier(.16,1,.3,1),--hsk-on-active .45s cubic-bezier(.16,1,.3,1),--hsk-src-title .45s cubic-bezier(.16,1,.3,1),--hsk-src-desc .45s cubic-bezier(.16,1,.3,1),--hsk-price-bg .45s cubic-bezier(.16,1,.3,1),--hsk-price-text .45s cubic-bezier(.16,1,.3,1),--hsk-sheet-bg .45s cubic-bezier(.16,1,.3,1),--hsk-pill-bg .45s cubic-bezier(.16,1,.3,1),--hsk-glass-bg .45s cubic-bezier(.16,1,.3,1),--hsk-glass-edge .45s cubic-bezier(.16,1,.3,1),--hsk-glass-edge-top .45s cubic-bezier(.16,1,.3,1),--hsk-glass-drop .45s cubic-bezier(.16,1,.3,1),--hsk-glass-sheen .45s cubic-bezier(.16,1,.3,1),--hsk-fade-bg .45s cubic-bezier(.16,1,.3,1),--hsk-chat-source-bg .45s cubic-bezier(.16,1,.3,1),--hsk-think-text .45s cubic-bezier(.16,1,.3,1),--hsk-placeholder .45s cubic-bezier(.16,1,.3,1),background-color .45s cubic-bezier(.16,1,.3,1),border-color .45s cubic-bezier(.16,1,.3,1),color .45s cubic-bezier(.16,1,.3,1),fill .45s cubic-bezier(.16,1,.3,1),stroke .45s cubic-bezier(.16,1,.3,1),box-shadow .45s cubic-bezier(.16,1,.3,1),--hsk-selection-bg .45s cubic-bezier(.16,1,.3,1),--hsk-selection-text .45s cubic-bezier(.16,1,.3,1)}.hsk-cb-overlay{--hsk-glass-border: 1px solid var(--hsk-glass-edge);--hsk-glass-border-top: 1px solid var(--hsk-glass-edge-top);--hsk-glass-shadow: 0 12px 32px -4px var(--hsk-glass-drop), 0 1px 0 0 var(--hsk-glass-sheen) inset}.hsk-cb-overlay::selection,.hsk-cb-overlay *::selection,.hsk-cb-btn::selection,.hsk-cb-btn *::selection,.hsk-sb-wrap::selection,.hsk-sb-wrap *::selection{background:var(--hsk-selection-bg, #ff6a33);color:var(--hsk-selection-text, #ffffff)}.hsk-kiku-avatar,.hsk-kiku-avatar *{transition:none}@media(prefers-reduced-motion:reduce){.hsk-cb-overlay,.hsk-cb-overlay *,.hsk-cb-overlay *:before,.hsk-cb-overlay *:after{transition:none}}.hsk-cb-overlay button,.hsk-cb-overlay [role=button],.hsk-cb-overlay input,.hsk-cb-overlay textarea,.hsk-cb-overlay select,.hsk-chat button,.hsk-chat [role=button],.hsk-chat input,.hsk-chat textarea,.hsk-chat select,.hsk-cb-btn,.hsk-search button,.hsk-search [role=button],.hsk-search input,.hsk-search textarea,.hsk-search select{touch-action:manipulation;-webkit-tap-highlight-color:transparent;font-family:var(--hsk-font)}:host,:root,.hsk-cb-btn,.hsk-cb-overlay,.hsk-chat-widget{--hsk-marble-1: color-mix(in srgb, var(--hsk-primary, #ff6a33) 12%, #fffaf4);--hsk-marble-2: color-mix(in srgb, var(--hsk-primary, #ff6a33) 30%, #fdf0e4);--hsk-marble-3: color-mix(in srgb, var(--hsk-primary, #ff6a33) 62%, #e8cbb0);--hsk-marble-4: color-mix(in srgb, var(--hsk-primary, #ff6a33) 85%, #6d3a1c);--hsk-marble-sheen: .5}@media(prefers-color-scheme:dark){:host,:root,.hsk-cb-btn,.hsk-cb-overlay,.hsk-chat-widget{--hsk-marble-1: #FFFDF6;--hsk-marble-2: #FBF3E2;--hsk-marble-3: color-mix(in srgb, var(--hsk-primary, #ff6a33) 20%, #EDDFC4);--hsk-marble-4: color-mix(in srgb, var(--hsk-primary, #ff6a33) 42%, #D8C39C);--hsk-marble-sheen: .9}}@keyframes hsk-pulse{0%,to{transform:scale(.8);opacity:.5}50%{transform:scale(1.2);opacity:1}}.hsk-cb-btn{--hsk-primary: var(--chat-primary-color, #ff6a33);display:inline-flex;align-items:center;gap:7px;padding:8px 16px;border-radius:var(--hsk-border-radius, 0px);border:1px solid rgba(255,106,51,.4);background:#ff6a331a;color:var(--hsk-primary);font-size:13px;font-weight:600;cursor:pointer;transition:background .15s,border-color .15s,transform .16s cubic-bezier(.34,1.56,.64,1),box-shadow .15s;will-change:transform}.hsk-cb-btn:hover{background:#ff6a332e;border-color:#ff6a33b3;box-shadow:0 4px 16px #ff6a3333}.hsk-cb-btn:active{transform:scale(.97)}.hsk-cb-topbar-mark:active .hsk-cb-topbar-name{transform:scale(.95)}.hsk-cb-btn-icon{font-size:15px;line-height:1;display:flex;align-items:center}.hsk-cb-overlay{--hsk-primary: var(--chat-primary-color, #ff6a33);--hsk-font: var(--chat-font-family, "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:normal;word-spacing:normal;font-kerning:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--hsk-font-size: var(--hsk-desktop-font-size, 15px);--hsk-mobile-font-size: 14px;position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;z-index:2147483647!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;animation:hsk-overlay-in .2s ease-out;background:var(--hsk-chat-bg, #ffffff)!important;box-sizing:border-box!important;margin:0!important;padding:0!important}@keyframes hsk-overlay-in{0%{opacity:0}to{opacity:1}}.hsk-cb-overlay.hsk-cb-overlay--grows{animation:hsk-overlay-in .18s cubic-bezier(.16,1,.3,1) both!important}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-panel{transform-origin:var(--hsk-ox, 50%) var(--hsk-oy, 50%);animation:hsk-panel-float-in .22s cubic-bezier(.16,1,.3,1) both!important}@keyframes hsk-panel-float-in{0%{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-msgs{animation:hsk-content-fade .2s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-content-fade{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-lang-chip,.hsk-cb-chip{animation:hsk-pill-wave .22s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.04s + var(--hsk-pill-idx, 0) * 12ms)}.hsk-cb-lang-chips-hint{animation:hsk-content-fade .22s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.04s + var(--hsk-pill-idx, 0) * 12ms)}@keyframes hsk-pill-wave{0%{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-input-wrap{animation:hsk-input-dock .22s cubic-bezier(.16,1,.3,1) backwards}@keyframes hsk-input-dock{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}.hsk-cb-overlay.hsk-cb-overlay--closing{animation:hsk-overlay-out .2s cubic-bezier(.4,0,1,1) both!important;pointer-events:none}.hsk-cb-overlay.hsk-cb-overlay--closing .hsk-cb-panel{animation:hsk-panel-sink .2s cubic-bezier(.4,0,1,1) both!important}@keyframes hsk-overlay-out{0%{opacity:1}to{opacity:0}}@keyframes hsk-panel-sink{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(8px) scale(.985)}}@media(prefers-reduced-motion:reduce){.hsk-cb-overlay.hsk-cb-overlay--closing,.hsk-cb-overlay.hsk-cb-overlay--closing .hsk-cb-panel{animation:none!important}.hsk-cb-overlay.hsk-cb-overlay--grows{animation:none!important;-webkit-clip-path:none!important;clip-path:none!important}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-panel,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-msgs,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-lang-chip,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-chip,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-input-wrap,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-hello-avatar{animation:none!important}}.hsk-cb-panel:lang(ja){font-feature-settings:"palt";word-break:auto-phrase;line-break:strict}.hsk-cb-panel:lang(ja) p,.hsk-cb-panel:lang(ja) li{font-weight:500}.hsk-cb-panel{position:relative;display:flex;flex-direction:column;height:100%;max-width:720px;width:100%;margin:0 auto;animation:hsk-panel-in .28s cubic-bezier(.34,1.2,.64,1)}.hsk-cb-main{position:relative;flex:1;min-width:0;display:flex;flex-direction:column;height:100%;overflow:hidden}@keyframes hsk-panel-in{0%{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-topbar{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);column-gap:8px;align-items:end;padding:14px var(--hsk-gutter, 24px) 10px;flex-shrink:0;position:relative;z-index:10;background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.hsk-cb-topbar:after{display:none!important}.hsk-cb-topbar-left{display:flex;align-items:center;gap:10px;justify-self:start;min-width:0}.hsk-cb-topbar-mark{justify-self:center;display:flex;flex-direction:column;align-items:center;line-height:0;cursor:pointer;user-select:none;touch-action:manipulation;transition:transform .22s cubic-bezier(.34,1.56,.64,1)}@media(hover:hover)and (pointer:fine){.hsk-cb-topbar-mark:hover>*{translate:0 -1px}}.hsk-cb-topbar-mark[data-unread=true] .hsk-cb-topbar-name{background:var(--hsk-primary, #ff6a33);color:#fff;box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff);animation:hsk-unread-pill .9s cubic-bezier(.34,1.56,.64,1) infinite}@keyframes hsk-unread-pill{0%,to{transform:scale(1)}38%{transform:scale(1.08,.92)}62%{transform:scale(.97,1.03)}}@media(prefers-reduced-motion:reduce){.hsk-cb-topbar-mark[data-unread=true] .hsk-cb-topbar-name{animation:none}}.hsk-cb-topbar-identity{height:34px;margin-top:-10px;display:flex;align-items:center;justify-content:center}.hsk-cb-topbar-name{margin-top:0;padding:3px 13px;white-space:nowrap;border-radius:999px;background:var(--hsk-surface-2);box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px #0000001f;font-size:12px;font-weight:700;line-height:18px;letter-spacing:-.01em;color:var(--hsk-name-text, var(--hsk-chat-text));transform-origin:50% 0%;transition:transform .18s cubic-bezier(.34,1.8,.64,1)}.hsk-cb-topbar-mark{position:relative;z-index:100}.hsk-cb-topbar-ooze-menu{position:absolute;top:var(--hsk-tray-top, calc(100% + 12px) )!important;left:50%;transform:translate(-50%);width:min(300px,calc(100vw - 28px))!important;padding:var(--hsk-tray-head, 6px) 6px 6px!important;border-radius:18px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 68%,transparent)!important;backdrop-filter:blur(28px) saturate(190%) contrast(102%)!important;-webkit-backdrop-filter:blur(28px) saturate(190%) contrast(102%)!important;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 35%,transparent)!important;z-index:1000;transform-origin:50% 0;animation:hsk-topbar-ooze .25s cubic-bezier(.16,1,.3,1) both}.hsk-cb-topbar.is-docked{z-index:20!important}.hsk-cb-topbar-scrim{position:fixed;inset:0;z-index:999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:linear-gradient(to bottom,#000 40vh,rgba(0,0,0,.97) 43.5vh,rgba(0,0,0,.84) 48.75vh,rgba(0,0,0,.5) 57.5vh,rgba(0,0,0,.16) 66.25vh,rgba(0,0,0,.03) 71.5vh,transparent 75vh);-webkit-mask-image:linear-gradient(to bottom,#000 40vh,rgba(0,0,0,.97) 43.5vh,rgba(0,0,0,.84) 48.75vh,rgba(0,0,0,.5) 57.5vh,rgba(0,0,0,.16) 66.25vh,rgba(0,0,0,.03) 71.5vh,transparent 75vh);animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) both}.hsk-cb-topbar-scrim.is-closing{animation:hsk-scrim-out .18s cubic-bezier(.4,0,1,1) both}.hsk-cb-topbar-scrim.is-discovery{--hsk-discovery-edge: calc(var(--hsk-tray-top, 40px) + var(--hsk-tray-h, 160px));--hsk-discovery-mask: linear-gradient(to bottom, #000 calc(var(--hsk-discovery-edge) + 24px), rgba(0, 0, 0, .84) calc(var(--hsk-discovery-edge) + 100px), rgba(0, 0, 0, .4) calc(var(--hsk-discovery-edge) + 190px), transparent calc(var(--hsk-discovery-edge) + 320px));-webkit-mask-image:var(--hsk-discovery-mask);mask-image:var(--hsk-discovery-mask);animation-duration:.4s}.hsk-cb-theme-discovery{position:absolute;z-index:1001;inset-inline-start:calc(100% + 18px);bottom:52px;width:150px;color:var(--hsk-chat-text);text-align:center;pointer-events:none;animation:hsk-theme-discovery-in .36s ease .28s both}.hsk-cb-theme-discovery svg{display:block;width:104px;height:72px;margin:0 auto 4px;transform:rotate(-90deg)}.hsk-cb-theme-discovery path{stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;color:color-mix(in srgb,var(--hsk-primary) 62%,var(--hsk-chat-text));animation:hsk-theme-arrow-draw 1s cubic-bezier(.22,.61,.36,1) .3s both}.hsk-cb-theme-discovery span{display:inline-block;padding:6px 13px;border-radius:999px;background:color-mix(in srgb,var(--hsk-primary) 9%,transparent);font-family:var(--hsk-font);font-size:13px;font-style:italic;font-weight:550;line-height:1.5;overflow-wrap:anywhere;transform:rotate(-2deg);animation:hsk-theme-hint-hop .65s cubic-bezier(.22,.61,.36,1) .85s both}.hsk-cb-theme-discovery.is-mobile{top:calc(var(--hsk-tray-top, 40px) + var(--hsk-tray-h, 160px) + 10px);bottom:auto;left:50%;right:auto;width:min(260px,calc(100vw - 48px));transform:translate(-50%)}.hsk-cb-theme-discovery.is-mobile svg{position:relative;left:50%;width:min(calc(100vw - 24px),366px);height:calc(var(--hsk-tray-h, 160px) + 98px);margin-top:calc(-1 * var(--hsk-tray-h, 160px) - 28px);transform:translate(-50%)}.hsk-cb-panel[dir=rtl] .hsk-cb-theme-discovery:not(.is-mobile) svg{transform:rotate(90deg) scaleX(-1)}.hsk-cb-kiku-id-rail.is-theme-open .hsk-cb-dock-frost{opacity:1;transition-duration:.4s}.hsk-cb-theme-discovery.is-closing{animation:hsk-scrim-out .18s ease both}@keyframes hsk-theme-discovery-in{0%{opacity:0;translate:0 -4px}to{opacity:.8;translate:0 0}}@keyframes hsk-theme-arrow-draw{0%{stroke-dashoffset:1}to{stroke-dashoffset:0}}@keyframes hsk-theme-hint-hop{0%{transform:translateY(4px) rotate(-4deg) scale(.96)}42%{transform:translateY(-3px) rotate(1deg) scale(1.025)}72%{transform:translateY(1px) rotate(-3deg) scale(.995)}to{transform:translateY(0) rotate(-2deg) scale(1)}}.hsk-cb-topbar-mark.is-discovering:before,.hsk-cb-topbar-mark.is-discovering:after{content:"";position:absolute;inset-inline-end:-13px;top:15px;width:9px;height:13px;background:var(--hsk-primary);clip-path:polygon(50% 0,64% 35%,100% 50%,64% 64%,50% 100%,36% 64%,0 50%,36% 35%);pointer-events:none;animation:hsk-theme-twinkle 1.6s ease .8s 2 both}.hsk-cb-topbar-mark.is-discovering:after{inset-inline-end:auto;inset-inline-start:-10px;top:35px;width:6px;height:9px;animation-delay:1.2s}@keyframes hsk-theme-twinkle{0%,to{opacity:0;transform:rotate(-12deg) scale(.4)}40%{opacity:.85;transform:rotate(9deg) scale(1)}}@media(prefers-reduced-motion:reduce){.hsk-cb-theme-discovery,.hsk-cb-theme-discovery path,.hsk-cb-theme-discovery span,.hsk-cb-topbar-mark.is-discovering:before,.hsk-cb-topbar-mark.is-discovering:after{animation:none}}.hsk-cb-layout-discovery-note{display:flex;align-items:center;gap:10px;width:fit-content;max-width:min(100%,380px);margin:0 0 20px;margin-inline-start:auto;padding:8px 14px 8px 10px;border:0;border-radius:18px;background:color-mix(in srgb,var(--hsk-primary) 6%,transparent);color:var(--hsk-chat-muted);font:500 12px/1.5 var(--hsk-font);text-align:start;cursor:pointer;animation:hsk-msg-in .3s ease both}.hsk-cb-layout-discovery-note svg{width:34px;height:40px;flex-shrink:0;color:color-mix(in srgb,var(--hsk-primary) 62%,var(--hsk-chat-text));transform:scaleX(-1)}.hsk-cb-layout-discovery-note path{stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;animation:hsk-theme-arrow-draw .8s ease .2s both}.hsk-cb-layout-discovery-note:focus-visible{outline:2px solid var(--hsk-primary);outline-offset:4px}.hsk-cb-panel[dir=rtl] .hsk-cb-layout-discovery-note svg{transform:none}.hsk-cb-layout-toggle.is-discovery{position:relative}.hsk-cb-layout-toggle.is-discovery:after{content:"";position:absolute;inset:-3px;border-radius:inherit;pointer-events:none;box-shadow:0 0 0 4px color-mix(in srgb,var(--hsk-primary) 14%,transparent),0 0 12px color-mix(in srgb,var(--hsk-primary) 18%,transparent);animation:hsk-layout-discovery-pulse 1.2s ease .2s 2 both}@keyframes hsk-layout-discovery-pulse{0%,to{opacity:0;transform:scale(.98)}45%{opacity:1;transform:scale(1.02)}}@media(min-width:1200px){.hsk-cb-layout-discovery-note svg{transform:rotate(-90deg)}.hsk-cb-panel[dir=rtl] .hsk-cb-layout-discovery-note svg{transform:rotate(180deg)}}@media(prefers-reduced-motion:reduce){.hsk-cb-layout-discovery-note,.hsk-cb-layout-discovery-note path,.hsk-cb-layout-toggle.is-discovery:after{animation:none}}.hsk-cb-topbar-mark.is-oozing{position:relative;z-index:1001}@keyframes hsk-scrim-in{0%{opacity:0}to{opacity:1}}@keyframes hsk-scrim-out{0%{opacity:1}to{opacity:0}}.hsk-cb-topbar-ooze-menu.is-closing{animation:hsk-topbar-ooze-out .18s cubic-bezier(.4,0,1,1) both;pointer-events:none}@keyframes hsk-topbar-ooze-out{0%{opacity:1;transform:translate(-50%) scale(1)}to{opacity:0;transform:translate(-50%) scale(.96)}}@media(prefers-reduced-motion:reduce){.hsk-cb-topbar-scrim,.hsk-cb-topbar-scrim.is-closing,.hsk-cb-topbar-ooze-menu.is-closing{animation:none}}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:max-content;max-width:100%}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-block{display:flex;align-items:stretch;gap:8px;padding:6px 7px 0}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-vlabel{flex:0 0 auto;align-self:center;writing-mode:vertical-rl;transform:rotate(180deg);font-size:8px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--hsk-chat-muted);opacity:.38;user-select:none}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{display:flex!important;flex-wrap:wrap!important;justify-content:flex-start!important;gap:6px!important;width:100%!important;max-width:100%!important;min-width:0!important;padding:0!important;box-sizing:border-box!important;margin-top:0!important;background:none!important;border:none!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:max-content;max-width:100%;height:34px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 12px;border-radius:999px;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .4)) 22%,transparent)!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 34%,transparent)!important;color:var(--hsk-chat-muted, #71717a);font-size:11.5px;font-weight:600;box-sizing:border-box;white-space:nowrap;cursor:pointer;transition:background-color .16s cubic-bezier(.16,1,.3,1),color .16s cubic-bezier(.16,1,.3,1),border-color .16s cubic-bezier(.16,1,.3,1),box-shadow .16s cubic-bezier(.16,1,.3,1),transform .16s cubic-bezier(.16,1,.3,1)}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item svg{flex-shrink:0;width:12px;height:12px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item:hover{color:var(--hsk-chat-text, currentColor)!important;transform:translateY(-1px)}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item.is-active{background:var(--hsk-primary, #ff6a33)!important;color:#fff!important;border-color:var(--hsk-primary, #ff6a33)!important;box-shadow:0 3px 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)!important}@keyframes hsk-topbar-ooze{0%{opacity:0;transform:translate(-50%) translateY(-6px) scale(.94)}to{opacity:1;transform:translate(-50%) translateY(0) scale(1)}}.hsk-cb-topbar-mark[data-impacting=true] .hsk-cb-topbar-name{transform:translateY(1.5px) scale(1.09,.91);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 2px 10px var(--hsk-contact-glow, rgba(19, 78, 61, .45))}.hsk-cb-back{width:34px;height:34px;border-radius:999px;border:none;padding:0;display:flex;align-items:center;justify-content:center;background:var(--hsk-surface-1);color:var(--hsk-chat-muted);cursor:pointer;transition:transform .18s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-back:hover{background:var(--hsk-chat-divide, rgba(0,0,0,.09))}.hsk-cb-back:active{transform:scale(.94)}.hsk-cb-panel[dir=rtl] .hsk-cb-back-icon{display:inline-flex;transform:scaleX(-1)}.hsk-cb-topbar-actions{min-width:0;max-width:100%;justify-self:end}.hsk-cb-kiku-id-rail{display:none}@media(min-width:1200px){.hsk-cb-kiku-id-rail.hsk-cb-kiku-id-rail--left{display:flex;position:absolute;inset:auto 100% 48px auto!important;margin-right:28px!important;transform:none!important;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:8px;width:200px;max-width:200px;min-width:200px;padding:0;border:0;background:none;font-family:inherit;z-index:10}.hsk-cb-kiku-id-rail.hsk-cb-kiku-id-rail--right{display:flex;position:absolute;inset:auto auto 48px 100%!important;margin-left:28px!important;transform:none!important;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:8px;width:200px;max-width:200px;min-width:200px;padding:0;border:0;background:none;font-family:inherit;z-index:10}.hsk-cb-dock-frost{position:absolute;inset:-100vmax;z-index:-1;pointer-events:none;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:radial-gradient(circle at 50% 50%,#000 330px,rgba(0,0,0,.97) 369px,rgba(0,0,0,.84) 427px,rgba(0,0,0,.5) 525px,rgba(0,0,0,.16) 622px,rgba(0,0,0,.03) 681px,transparent 720px);-webkit-mask-image:radial-gradient(circle at 50% 50%,#000 330px,rgba(0,0,0,.97) 369px,rgba(0,0,0,.84) 427px,rgba(0,0,0,.5) 525px,rgba(0,0,0,.16) 622px,rgba(0,0,0,.03) 681px,transparent 720px);opacity:0;transition:opacity .2s cubic-bezier(.4,0,.9,.4)}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-kiku-id-rail{bottom:50px!important}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-kiku-id-rail{bottom:58px!important}.hsk-cb-kiku-id-pill{display:inline-flex;align-items:center;gap:6px;max-width:100%;height:28px;padding:0 11px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 62%,transparent);backdrop-filter:blur(22px) saturate(180%);-webkit-backdrop-filter:blur(22px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 14px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset;color:var(--hsk-chat-muted, #71717a);cursor:pointer;font-family:inherit;transition:all .2s cubic-bezier(.16,1,.3,1)}.hsk-cb-kiku-id-pill:hover{color:var(--hsk-primary, #ff6a33);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 80%,transparent);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 75%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 18px -2px color-mix(in srgb,#000 15%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent) inset}.hsk-cb-kiku-id-rail-val{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;letter-spacing:-.01em;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-cb-kiku-id-pill svg{flex:none;opacity:.8}.hsk-cb-theme-squircle-wrap{position:relative;display:flex;flex-direction:column;align-items:flex-start;padding:0;margin:0;border:none!important;box-shadow:none!important;background:transparent!important}.hsk-cb-theme-squircle-trigger{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px;border-radius:16px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent)!important;backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 16px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important;color:var(--hsk-chat-text)!important;font-size:11.5px;font-weight:600;cursor:pointer;font-family:inherit;transition:all .2s cubic-bezier(.16,1,.3,1)}.hsk-cb-theme-squircle-trigger:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 80%,transparent)!important;color:var(--hsk-primary, #ff6a33)!important;border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 80%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 20px -2px color-mix(in srgb,#000 16%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent) inset!important}.hsk-cb-theme-trigger-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.hsk-cb-theme-trigger-icon svg{width:13px;height:13px}.hsk-cb-theme-trigger-label{letter-spacing:-.01em}.hsk-cb-theme-2x2-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;padding:6px;width:200px;max-width:200px;min-width:200px;box-sizing:border-box;border-radius:18px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 70%,transparent);backdrop-filter:blur(28px) saturate(190%) contrast(102%);-webkit-backdrop-filter:blur(28px) saturate(190%) contrast(102%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .4)) 35%,transparent);border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 65%,transparent);border-bottom:1px solid color-mix(in srgb,#000 6%,transparent);box-shadow:0 16px 38px -6px color-mix(in srgb,#000 16%,transparent),0 0 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 20%,transparent) inset,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 50%,transparent) inset;transform-origin:bottom left;animation:hsk-theme-morph-in .26s cubic-bezier(.16,1,.3,1) both}.hsk-cb-theme-squircle-wrap.is-closing .hsk-cb-theme-2x2-grid{animation:hsk-theme-morph-out .22s cubic-bezier(.4,0,.2,1) both}.hsk-cb-theme-squircle-trigger{animation:hsk-theme-pill-in .24s cubic-bezier(.16,1,.3,1) both}.hsk-cb-theme-squircle-wrap{justify-content:flex-end;box-sizing:border-box;width:auto;height:32px;overflow:hidden;border-radius:16px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent)!important;backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 16px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important;interpolate-size:allow-keywords;transition:width .38s cubic-bezier(.16,1,.3,1),height .38s cubic-bezier(.16,1,.3,1),border-radius .38s cubic-bezier(.16,1,.3,1)}.hsk-cb-theme-squircle-wrap.is-open{width:222px;height:auto;border-radius:18px}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger,.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger:hover{flex:none;height:30px;background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;transform:none;animation:none;transition:height .38s cubic-bezier(.16,1,.3,1),opacity .2s ease,color .2s ease}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap.is-open>.hsk-cb-theme-squircle-trigger{height:0;opacity:0;pointer-events:none}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-2x2-grid{flex:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:220px;min-width:220px;max-width:220px;margin-inline-end:-220px;background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;border-radius:0;animation:none;opacity:0;transition:opacity .1s ease}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-2x2-grid>.hsk-cb-theme-grid-item{width:100%;justify-content:flex-start;padding:0 10px}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap.is-open>.hsk-cb-theme-2x2-grid{opacity:1;transition:opacity .24s ease .1s}.hsk-cb-theme-grid-item{display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:6px;height:30px;padding:0 12px;border-radius:999px;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .3)) 25%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent)!important;outline:none!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent);color:var(--hsk-chat-text, currentColor);font-size:11px;font-weight:550;cursor:pointer;font-family:inherit;transition:all .18s cubic-bezier(.16,1,.3,1);box-shadow:0 1px 3px #0000000a,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent) inset!important;box-sizing:border-box;white-space:nowrap}.hsk-cb-theme-grid-item svg{flex-shrink:0;width:12px;height:12px}.hsk-cb-theme-grid-item:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 85%,transparent);color:var(--hsk-chat-text, currentColor);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent)!important;transform:translateY(-1px);box-shadow:0 3px 8px #00000014,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent) inset!important}.hsk-cb-theme-grid-item.is-active{background:var(--hsk-primary, #ff6a33)!important;border-color:var(--hsk-primary, #ff6a33)!important;color:#fff!important;box-shadow:0 2px 10px color-mix(in srgb,var(--hsk-primary, #ff6a33) 38%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important}}.hsk-cb-topbar-actions{display:flex;align-items:center;gap:8px}.hsk-cb-topbar-btn{position:relative;display:inline-flex;align-items:center;min-width:0;max-width:100%;white-space:nowrap;flex:0 1 auto;height:34px;padding:0 14px;border-radius:var(--hsk-control-radius, 999px);border:1px solid transparent;background:var(--hsk-chat-subtle, rgba(0,0,0,.045));color:var(--hsk-chat-muted, #5f6368);font-size:12px;font-weight:500;cursor:pointer;transition:all .15s;font-family:inherit}.hsk-cb-topbar-btn.is-compact{width:34px;padding:0;flex:none;justify-content:center}.hsk-cb-clear-measure{position:absolute;visibility:hidden;pointer-events:none;white-space:nowrap;font-size:12px}.hsk-cb-topbar-btn-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-cb-topbar-btn:hover{background:color-mix(in srgb,var(--hsk-primary) 12%,transparent);color:var(--hsk-primary)}.hsk-cb-squircle-btn{width:34px;height:34px;border-radius:11px;background:color-mix(in srgb,var(--hsk-surface-1, currentColor) 35%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid color-mix(in srgb,var(--hsk-chat-border, currentColor) 16%,transparent);border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent);border-bottom:1px solid color-mix(in srgb,#000 6%,transparent);box-shadow:0 2px 6px color-mix(in srgb,var(--hsk-chat-text, #000) 6%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 25%,transparent) inset;color:var(--hsk-chat-muted, currentColor);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0;transition:all .2s cubic-bezier(.16,1,.3,1);position:relative;flex-shrink:0}.hsk-cb-squircle-btn:hover{background:color-mix(in srgb,var(--hsk-surface-2, currentColor) 50%,transparent);color:var(--hsk-chat-text, currentColor);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent);box-shadow:0 3px 10px color-mix(in srgb,var(--hsk-chat-text, #000) 8%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent) inset;transform:translateY(-1px)}.hsk-cb-squircle-btn:active{transform:scale(.95)}.hsk-cb-squircle-btn.is-active{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 16%,transparent);border-color:var(--hsk-primary, #ff6a33);color:var(--hsk-primary, #ff6a33);box-shadow:0 0 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 30%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent) inset}.hsk-cb-exit-btn:hover{background:radial-gradient(120% 90% at 30% 0%,rgba(255,255,255,.4),transparent 65%),color-mix(in srgb,var(--hsk-surface-1, currentColor) 35%,transparent);color:#ef4444}.hsk-cb-msgs{position:relative;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;touch-action:pan-y;overscroll-behavior-y:none;overflow-anchor:none;padding:16px var(--hsk-gutter, 24px) 16px;display:flex;flex-direction:column;gap:0;scrollbar-width:none;-ms-overflow-style:none;mask-image:linear-gradient(to bottom,transparent 0px,#000000 8px,#000000 100%);-webkit-mask-image:linear-gradient(to bottom,transparent 0px,#000000 8px,#000000 100%)}.hsk-cb-msgs[data-hsk-tapback-active]{background:var(--hsk-chat-bg, #fff);--hsk-viewport-feather: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .03) min(6px, 2%), rgba(0, 0, 0, .16) min(16px, 5%), rgba(0, 0, 0, .5) min(32px, 10%), rgba(0, 0, 0, .84) min(48px, 15%), rgba(0, 0, 0, .97) min(58px, 18%), #000 min(64px, 20%), #000 calc(100% - min(64px, 20%)) , rgba(0, 0, 0, .97) calc(100% - min(58px, 18%)) , rgba(0, 0, 0, .84) calc(100% - min(48px, 15%)) , rgba(0, 0, 0, .5) calc(100% - min(32px, 10%)) , rgba(0, 0, 0, .16) calc(100% - min(16px, 5%)) , rgba(0, 0, 0, .03) calc(100% - min(6px, 2%)) , transparent);--hsk-viewport-sides: linear-gradient(to right, transparent, rgba(0, 0, 0, .03) min(4px, 1%), rgba(0, 0, 0, .16) min(12px, 3%), rgba(0, 0, 0, .5) min(24px, 6%), rgba(0, 0, 0, .84) min(36px, 9%), rgba(0, 0, 0, .97) min(44px, 11%), #000 min(48px, 12%), #000 calc(100% - min(48px, 12%)) , rgba(0, 0, 0, .97) calc(100% - min(44px, 11%)) , rgba(0, 0, 0, .84) calc(100% - min(36px, 9%)) , rgba(0, 0, 0, .5) calc(100% - min(24px, 6%)) , rgba(0, 0, 0, .16) calc(100% - min(12px, 3%)) , rgba(0, 0, 0, .03) calc(100% - min(4px, 1%)) , transparent);-webkit-mask-image:var(--hsk-viewport-sides),var(--hsk-viewport-feather);mask-image:var(--hsk-viewport-sides),var(--hsk-viewport-feather);-webkit-mask-composite:source-in;mask-composite:intersect;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hsk-cb-msgs-spacer{flex:none;height:1px;pointer-events:none}.hsk-cb-msgs>:first-child{margin-top:auto}.hsk-cb-msgs.hsk-scrolling>*{pointer-events:none}.hsk-cb-msgs::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}.hsk-cb-empty{flex:1 0 auto;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:14px;padding:24px 0 32px;width:100%;text-align:start}.hsk-cb-onboarding-card{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:10px;flex-shrink:0;overflow:hidden;padding-bottom:26px;margin-bottom:-26px}.hsk-cb-onboarding-head{display:flex;align-items:center;justify-content:flex-start;width:100%;margin-bottom:8px}.hsk-cb-step-badge{font-size:11px;font-weight:600;letter-spacing:.05em;color:var(--hsk-chat-muted, #71717a);background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .06));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .08));padding:4px 10px;border-radius:999px;line-height:1}.hsk-cb-hello-wrap{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:6px;padding:0;width:100%}.hsk-cb-hello{margin:0;font-size:clamp(24px,4.5vw,34px);font-weight:500;line-height:1.2;letter-spacing:-.02em;color:color-mix(in srgb,var(--hsk-chat-text, #111) 55%,var(--hsk-chat-muted, #8b8b8f));text-align:start}.hsk-cb-hello b{font-weight:700;color:var(--hsk-primary, #ff6a33)}.hsk-cb-hello-lead{margin:0;font-size:15px;line-height:22px;color:var(--hsk-chat-muted, #5f6368);max-width:42ch;text-align:start}.hsk-cb-hello-ask{margin:2px 0;font-size:16px;font-weight:500;color:var(--hsk-chat-text, #111);text-align:start}.hsk-cb-hello-hint{margin:0;font-size:13px;line-height:1.5;color:var(--hsk-chat-muted, #5f6368);text-align:start}.hsk-cb-name-step .hsk-cb-hello{color:var(--hsk-chat-text, #111)}.hsk-cb-name-step .hsk-cb-hello-ask{margin-top:6px;font-size:19px;font-weight:600;color:color-mix(in srgb,var(--hsk-chat-text, #111) 62%,var(--hsk-chat-muted, #8b8b8f))}.hsk-cb-panel[dir=rtl] .hsk-cb-msgs{direction:ltr}.hsk-cb-panel[dir=rtl] .hsk-cb-msgs>*{direction:rtl}.hsk-cb-panel[dir=rtl] .hsk-cb-user-imgs{margin-left:0;margin-right:auto}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text{word-break:normal;overflow-wrap:break-word;letter-spacing:normal}.hsk-cb-panel[dir=rtl] .hsk-cb-hello{line-height:1.6;letter-spacing:normal}.hsk-cb-lang-chips{display:flex;flex-wrap:wrap;gap:8px 10px;margin:16px 0 8px;align-items:center}.hsk-cb-lang-chip{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:6px 15px;font-family:var(--hsk-font);font-size:13.5px;font-weight:400;line-height:1.2;letter-spacing:-.01em;color:var(--hsk-chat-text, #27272a);background:color-mix(in srgb,var(--hsk-chat-card-bg, var(--hsk-chat-bg, #ffffff)) 72%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:none;border-radius:999px;box-shadow:0 2px 8px -1px #0000000f,0 1px 2px #00000005;cursor:pointer;transition:all .18s cubic-bezier(.16,1,.3,1);user-select:none;-webkit-font-smoothing:antialiased}.hsk-cb-lang-chip:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,var(--hsk-chat-card-bg, #ffffff));color:var(--hsk-primary, #ff6a33);transform:translateY(-1px);box-shadow:0 4px 12px -2px #00000014}.hsk-cb-lang-chip:active{transform:translateY(0) scale(.97)}.hsk-cb-lang-chip:focus-visible{outline:2px solid var(--hsk-primary, #ff6a33);outline-offset:2px}[data-hsk-theme=dark] .hsk-cb-lang-chip,[data-hsk-theme=midnight] .hsk-cb-lang-chip{color:#e4e4e7;background:#ffffff12;border:none;box-shadow:0 2px 8px -1px #0000004d}[data-hsk-theme=dark] .hsk-cb-lang-chip:hover,[data-hsk-theme=midnight] .hsk-cb-lang-chip:hover{background:rgba(var(--hsk-primary-rgb, 255, 106, 51),.2);color:#fff}.hsk-cb-lang-chips-hint{display:inline-flex;align-items:center;font-size:13px;font-weight:400;color:var(--hsk-chat-muted, #71717a);padding:0 6px;margin-inline-start:4px;user-select:none;align-self:center}.hsk-cb-chrome-loading{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:12px;width:100%;max-width:480px;margin:4px 0 2px;animation:hsk-content-fade .3s ease-out both}.hsk-cb-chrome-loading-header{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:6px;width:100%}.hsk-cb-chrome-progress{height:3px;width:100%;border-radius:3px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .08));overflow:hidden;margin-top:4px}.hsk-cb-chrome-progress-track{height:100%;width:100%;border-radius:3px;background:linear-gradient(90deg,#ff6a33,#f7b733,#43c59e,#3d8bfd,#9b5de5,#ff5d8f,#ff6a33);background-size:300% 100%;animation:hsk-chrome-rainbow 2.6s linear infinite}.hsk-cb-chrome-progress{position:relative;overflow:hidden}.hsk-cb-chrome-progress:after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent 20%,rgba(255,255,255,.55) 50%,transparent 80%);transform:translate(-100%);animation:hsk-chrome-sheen 1.9s cubic-bezier(.55,0,.45,1) infinite;pointer-events:none}@keyframes hsk-chrome-rainbow{0%{background-position:0% 0}to{background-position:-300% 0}}@keyframes hsk-chrome-sheen{0%{transform:translate(-100%)}to{transform:translate(200%)}}@media(prefers-reduced-motion:reduce){.hsk-cb-chrome-progress-track{animation:none;opacity:.5}.hsk-cb-chrome-progress:after{animation:none;opacity:0}}.hsk-cb-chrome-back-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;margin-top:6px;font-size:13px;font-weight:500;color:var(--hsk-chat-muted, #a1a1aa);background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .05));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .09));border-radius:999px;cursor:pointer;transition:all .15s ease;user-select:none}.hsk-cb-chrome-back-btn:hover{background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .12));color:var(--hsk-chat-text, #ffffff);border-color:var(--hsk-chat-border, rgba(255, 255, 255, .18))}.hsk-cb-chrome-notice{display:flex;flex-direction:column;gap:6px;max-width:48ch;margin:24px 0 0;padding:14px 16px;border-radius:14px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .04));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .09));text-align:start;font-family:var(--hsk-font, system-ui, sans-serif);animation:hsk-content-fade .4s ease-out both}.hsk-cb-chrome-notice-header{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.hsk-cb-chrome-notice-pill{display:inline-flex;align-items:center;padding:2px 7px;border-radius:6px;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;background:#ff6a3326;color:var(--hsk-primary, #ff6a33);border:1px solid rgba(255,106,51,.28)}.hsk-cb-chrome-notice-title{font-size:12px;font-weight:600;letter-spacing:.01em;color:var(--hsk-chat-text, #ffffff)}.hsk-cb-chrome-notice-body{font-size:12px;line-height:1.55;color:var(--hsk-chat-muted, #a1a1aa)}.hsk-cb-chrome-notice-body b{color:var(--hsk-chat-text, #ffffff)}@media(prefers-color-scheme:light){.hsk-cb-chrome-progress{background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .06))}.hsk-cb-chrome-back-btn{color:#52525b;background:#0000000a;border-color:#00000014}.hsk-cb-chrome-back-btn:hover{background:#00000014;color:#09090b;border-color:#00000024}}.hsk-cb-input-box--waiting{opacity:.45;pointer-events:none}.hsk-cb-entlang-opts{display:flex;flex-direction:column;gap:10px;width:100%;max-width:440px;margin-top:6px}.hsk-cb-entlang-opt{position:relative;display:flex;flex-direction:row;align-items:center;width:100%;padding:16px 20px;text-align:start;background:transparent!important;border:none!important;outline:none!important;border-radius:16px;cursor:pointer;user-select:none;box-shadow:none!important;animation:hsk-entlang-opt-in .22s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.04s + var(--hsk-opt-idx, 0) * .02s)}@media(prefers-color-scheme:light){.hsk-cb-entlang-opt{background:transparent!important}}[data-hsk-theme=light] .hsk-cb-entlang-opt{background:transparent!important}@keyframes hsk-entlang-opt-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-entlang-opt:hover{background:transparent!important;border:none!important;box-shadow:none!important}.hsk-cb-entlang-opt:active>.hsk-cb-check{scale:.94;translate:0 1px;box-shadow:none}.hsk-cb-check{display:inline-grid;place-items:center;width:22px;height:22px;flex-shrink:0;border-radius:8px;border:1.5px solid color-mix(in srgb,var(--hsk-chat-text, #111) 20%,transparent);background:color-mix(in srgb,var(--hsk-chat-text, #111) 4%,transparent);box-shadow:0 2px color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);box-sizing:border-box;transition:background-color .22s ease,border-color .22s ease,box-shadow .16s ease,scale .16s ease,translate .16s ease}.hsk-cb-check svg{width:14px;height:14px;fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.hsk-cb-check path{stroke-dasharray:16;stroke-dashoffset:16;transition:stroke-dashoffset .3s cubic-bezier(.65,0,.35,1) .06s}.is-selected>.hsk-cb-check{background:var(--hsk-primary, #ff6a33);border-color:var(--hsk-primary, #ff6a33);animation:hsk-cb-check-press .42s cubic-bezier(.34,1.56,.64,1)}.is-selected>.hsk-cb-check path{stroke-dashoffset:0}@media(hover:hover){.hsk-cb-entlang-opt:not(.is-selected):hover>.hsk-cb-check{background:color-mix(in srgb,var(--hsk-chat-text, #111) 7%,transparent)}}.hsk-cb-entlang-opt:focus-visible{outline:2px solid var(--hsk-primary, #ff6a33)!important;outline-offset:-2px}@keyframes hsk-cb-check-press{0%{transform:scale(1)}35%{transform:scale(.9)}to{transform:scale(1)}}.hsk-cb-entlang-opt>.hsk-cb-check{margin-inline-end:14px}.hsk-cb-entlang-opt-text{display:flex;flex-direction:column;gap:3px;width:100%}.hsk-cb-entlang-opt-title{font-size:15px;font-weight:600;color:var(--hsk-chat-text, #1f1f1f);letter-spacing:-.01em}.hsk-cb-entlang-opt-note{font-size:12.5px;color:var(--hsk-chat-muted, #71717a);line-height:1.45}.hsk-cb-ink-skeleton{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:12px;animation:hsk-ink-bloom-in .22s cubic-bezier(.16,1,.3,1) both}.hsk-cb-ink-line{position:relative;border-radius:999px;overflow:hidden;background:color-mix(in srgb,var(--hsk-chat-text, #ffffff) 6%,transparent)}.hsk-cb-ink-line:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent) 35%,color-mix(in srgb,var(--hsk-chat-text, #ffffff) 14%,transparent) 50%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent) 65%,transparent 100%);transform:translate(-100%);animation:hsk-ink-sheen 2.2s cubic-bezier(.4,0,.2,1) infinite}.hsk-cb-ink-line--title{height:30px;width:50%;max-width:220px;border-radius:14px;margin-bottom:2px}.hsk-cb-ink-line--lead1{height:14px;width:78%;max-width:340px}.hsk-cb-ink-line--lead2{height:14px;width:60%;max-width:260px}.hsk-cb-ink-line--ask{height:15px;width:40%;max-width:170px;margin-top:3px}@keyframes hsk-ink-sheen{0%{transform:translate(-100%)}to{transform:translate(200%)}}@keyframes hsk-ink-bloom-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes hsk-hello-rise{0%{opacity:0}to{opacity:1}}.hsk-cb-hello,.hsk-cb-hello-lead,.hsk-cb-hello-ask,.hsk-cb-hello-hint,.hsk-cb-hello-skip{opacity:0;animation:hsk-hello-rise .45s cubic-bezier(.22,1,.36,1) both}.hsk-cb-hello{animation-delay:.04s}.hsk-cb-hello-lead{animation-delay:.12s}.hsk-cb-hello-ask{animation-delay:.2s}.hsk-cb-hello-hint{animation-delay:.28s}.hsk-cb-hello.hsk-cascade,.hsk-cb-hello-lead.hsk-cascade,.hsk-cb-hello-ask.hsk-cascade{opacity:1;animation:none;filter:none}.hsk-cascade__w{display:inline-block;white-space:nowrap;opacity:0;animation:hsk-cascade-rise .44s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-cascade-rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.hsk-cb-hello,.hsk-cb-hello-lead,.hsk-cb-hello-ask,.hsk-cb-hello-hint,.hsk-cb-hello-skip,.hsk-cascade__w,.hsk-cb-check{animation:none;opacity:1;transform:none;filter:none}.hsk-cb-check,.hsk-cb-check path{transition:none}.hsk-cb-entlang-opt:active>.hsk-cb-check{scale:none;translate:none}}.hsk-cb-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-start;margin-top:4px}.hsk-cb-chip{padding:8px 16px;border-radius:var(--hsk-border-radius, 0px);border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.1));background:var(--hsk-chat-source-bg, rgba(0,0,0,.03));color:var(--hsk-chat-text, #333);font-size:13px;cursor:pointer;transition:all .15s;font-family:inherit}.hsk-cb-chip:hover{border-color:var(--hsk-primary);color:var(--hsk-primary);background:#ff6a330f}.hsk-cb-msg-group{padding:16px 0;border-bottom:none;animation:hsk-msg-in .22s ease-out both}.hsk-cb-spoken-mark{position:absolute;top:50%;margin-top:-5px;inset-inline-start:-17px;opacity:.4;pointer-events:none}.hsk-cb-msg-group--run-mid{padding-bottom:0}.hsk-cb-msg-group--run-mid .hsk-cb-user-msg{margin-bottom:3px;gap:0}.hsk-cb-msg-group--run-cont{padding-top:0}.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg{margin-bottom:3px}.hsk-cb-msg-group--run-cont .hsk-cb-ai-text{margin-top:0}.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg .hsk-cb-ai-text:before,.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg .hsk-cb-ai-text:after{display:none}.hsk-cb-msg-group--run-mid .hsk-cb-user-bubble{border-bottom-right-radius:20px!important}[dir=rtl] .hsk-cb-msg-group--run-mid .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-msg-group--run-mid .hsk-cb-user-bubble,.hsk-cb-msg-group--run-mid .hsk-cb-user-bubble[dir=rtl]{border-bottom-right-radius:20px!important;border-bottom-left-radius:20px!important}.hsk-cb-msg-group--run-cont .hsk-cb-user-bubble{border-top-right-radius:20px!important}[dir=rtl] .hsk-cb-msg-group--run-cont .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-msg-group--run-cont .hsk-cb-user-bubble,.hsk-cb-msg-group--run-cont .hsk-cb-user-bubble[dir=rtl]{border-top-right-radius:20px!important;border-top-left-radius:20px!important}.hsk-cb-msg-group:last-child{border-bottom:none}@keyframes hsk-msg-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-user-msg{display:flex;flex-direction:column;align-items:flex-end;align-self:flex-end;max-width:min(75%,420px);margin-inline-start:auto;margin-inline-end:0;gap:6px;margin-bottom:20px}@media(max-width:640px){.hsk-cb-user-msg{max-width:84%}}.hsk-cb-user-msg.hsk-sent{transform-origin:bottom right;animation:hsk-send-in .3s cubic-bezier(.22,1,.36,1) both}.hsk-cb-panel[dir=rtl] .hsk-cb-user-msg.hsk-sent{transform-origin:bottom left}@keyframes hsk-send-in{0%{opacity:0;transform:translateY(12px) scale(.94)}60%{opacity:1}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.hsk-cb-user-msg.hsk-sent{animation:none}}.hsk-cb-user-bubble{background:var(--hsk-user-bubble-bg, #007aff);color:#fff;padding:10px 18px;border-radius:20px;position:relative;font-size:var(--hsk-font-size, 15.5px);font-family:var(--hsk-font);line-height:1.45;max-width:100%;font-weight:500;width:fit-content;word-break:break-word;overflow-wrap:anywhere;letter-spacing:-.01em}.hsk-cb-user-bubble--tail:before,.hsk-cb-user-bubble--tail:after{content:"";position:absolute;bottom:0;height:25px;pointer-events:none}.hsk-cb-user-bubble--tail:before{right:-7px;width:20px;background:var(--hsk-user-bubble-bg, #007aff);border-bottom-left-radius:16px 14px}.hsk-cb-user-bubble--tail:after{right:-26px;width:26px;background:var(--hsk-chat-bg, #ffffff);border-bottom-left-radius:10px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail:before{right:auto;left:-7px;border-bottom-left-radius:0;border-bottom-right-radius:16px 14px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail:after{right:auto;left:-26px;border-bottom-left-radius:0;border-bottom-right-radius:10px}.hsk-cb-ai-msg{display:block}.hsk-cb-ai-icon{width:32px;height:32px;border-radius:0;background:transparent!important;border:none!important;color:var(--hsk-primary, #ff6a33);display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:-2px}.hsk-cb-ai-icon>svg{width:30px!important;height:30px!important}.hsk-cb-ai-body{flex:1;min-width:0}.hsk-cb-ai-content{display:flex;flex-direction:column;gap:10px;align-items:flex-start;width:100%}.hsk-cb-think+.hsk-cb-ai-content>.hsk-cb-ai-text:first-child{padding-top:20px}.hsk-cb-ai-text{font-size:var(--hsk-font-size, 14.5px);font-family:var(--hsk-font);line-height:1.48;color:var(--hsk-chat-text, #111827);background:var(--hsk-chat-ai-bg, #eeeef0);padding:11px 15px;border-radius:18px;position:relative;display:inline-block;width:fit-content;box-sizing:border-box;max-width:min(88%,460px);word-break:break-word;overflow-wrap:anywhere;margin-top:4px}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before,.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{content:"";position:absolute;bottom:0;height:25px;pointer-events:none}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{left:-7px;width:20px;background:var(--hsk-chat-ai-bg, #eeeef0);border-bottom-right-radius:16px 14px}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{left:-26px;width:26px;background:var(--hsk-chat-bg, #ffffff);border-bottom-right-radius:10px}.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{left:auto;right:-7px;border-bottom-right-radius:0;border-bottom-left-radius:16px 14px}.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{left:auto;right:-26px;border-bottom-right-radius:0;border-bottom-left-radius:10px}.hsk-cb-user-bubble--tail{border-bottom-right-radius:25px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail{border-bottom-right-radius:20px;border-bottom-left-radius:25px}.hsk-cb-user-footer{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:6px;width:100%;margin-top:2px;min-height:16px;line-height:1}.hsk-cb-ai-footer{display:flex;align-items:center;gap:4px;margin-top:4px;min-height:16px;line-height:1}.hsk-cb-ai-body:hover .hsk-cb-msg-actions,.hsk-cb-ai-body:focus-within .hsk-cb-msg-actions{opacity:1;pointer-events:auto;transform:translateY(0)}.hsk-cb-sent-status{font-size:11px;line-height:1;color:var(--hsk-chat-muted, #8a8f98);padding:0;display:inline-flex;align-items:center;user-select:none;animation:hsk-sent-in .2s ease-out both}.hsk-cb-msg-actions{display:inline-flex;align-items:center;gap:2px;padding:0;opacity:0;pointer-events:none;transform:translate(3px);transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1)}.hsk-cb-user-msg:hover .hsk-cb-msg-actions,.hsk-cb-user-msg:focus-within .hsk-cb-msg-actions,.hsk-cb-msg-actions--visible{opacity:1;pointer-events:auto;transform:translate(0)}.hsk-cb-msg-action{display:inline-flex;align-items:center;justify-content:center;gap:3.5px;padding:1px 6.5px;height:16px;border-radius:999px;font-size:11px;font-weight:500;font-family:var(--hsk-font);line-height:1;color:var(--hsk-chat-muted, #8a8f98);background:transparent;border:none;box-shadow:none;cursor:pointer;user-select:none;box-sizing:border-box;transition:color .15s ease,background-color .15s ease,transform .18s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action .hsk-cb-msg-action-label{font-size:11px;line-height:1}.hsk-cb-msg-action:hover:not(:disabled){color:var(--hsk-chat-text, #ffffff)!important;background:var(--hsk-chat-divide, rgba(140, 140, 140, .18));border:none;transform:translateY(-.5px)}.hsk-cb-msg-action:active:not(:disabled){transform:translateY(0) scale(.95);transition-duration:.1s}.hsk-cb-msg-action--retry{color:var(--hsk-primary, #ff6a33);background:transparent;border:none;box-shadow:none}.hsk-cb-msg-action--retry:hover:not(:disabled){color:var(--hsk-on-active, #ffffff)!important;background:var(--hsk-primary, #ff6a33)!important;border:none!important;box-shadow:0 1px 6px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)}.hsk-cb-failed-notice{display:inline-flex;align-items:center;gap:4px;font-size:11px;line-height:1;color:#ef4444;font-weight:500;user-select:none}.hsk-cb-failed-dot{width:5px;height:5px;border-radius:999px;background:#ef4444;box-shadow:0 0 5px #ef444499;animation:hsk-failed-pulse 1.8s ease-in-out infinite}@keyframes hsk-failed-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.25);opacity:.7}}.hsk-cb-msg-action--copied{color:#10b981!important;background:#10b98126!important;font-weight:600}@media(max-width:640px){.hsk-cb-msg-actions{display:none!important}}@keyframes hsk-sent-in{0%{opacity:0}to{opacity:1}}.hsk-cb-user-bubble--queued{opacity:.55}.hsk-cb-queued-status{display:inline-flex;align-items:center;gap:5px;font-size:11px;line-height:1;color:var(--hsk-chat-muted, #8a8f98);padding:4px 0 0;background:none;border:none;cursor:pointer;font-family:var(--hsk-font);animation:hsk-sent-in .2s ease-out both}.hsk-cb-queued-dot{width:5px;height:5px;border-radius:999px;background:currentColor;animation:hsk-queued-pulse 1.1s ease-in-out infinite}@keyframes hsk-queued-pulse{0%,to{opacity:.35;transform:scale(.85)}50%{opacity:1;transform:scale(1)}}.hsk-cb-queued-now{color:var(--hsk-primary, #ff6a33);font-weight:600;transition:opacity .15s ease}.hsk-cb-queued-status:hover .hsk-cb-queued-now{opacity:.7}@media(prefers-reduced-motion:reduce){.hsk-cb-queued-dot{animation:none;opacity:.8}}.hsk-cb-timeline{display:none}@media(min-width:1200px){.hsk-cb-timeline.hsk-cb-timeline--left{display:block;position:absolute;left:auto!important;right:100%!important;margin-right:28px!important;top:50%;transform:translateY(-50%)!important;width:180px;max-height:60%;overflow:hidden;z-index:10;pointer-events:auto;direction:ltr!important;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent)}.hsk-cb-timeline.hsk-cb-timeline--right{display:block;position:absolute;left:100%!important;right:auto!important;margin-left:28px!important;top:50%;transform:translateY(-50%)!important;width:180px;max-height:60%;overflow:hidden;z-index:10;pointer-events:auto;direction:ltr!important;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent)}.hsk-cb-timeline-track{animation:hsk-tl-in .32s cubic-bezier(.22,1,.36,1) both}}@keyframes hsk-tl-in{0%{opacity:0;transform:translate(-10px)}to{opacity:1;transform:translate(0)}}.hsk-cb-timeline-track{--hsk-tl-x: 14px;--hsk-tl-gutter: 28px;position:relative;padding-left:var(--hsk-tl-gutter)!important;padding-right:6px!important;transition:transform .28s cubic-bezier(.22,1,.36,1)}.hsk-cb-timeline-track:before,.hsk-cb-timeline-track:after{display:none!important}.hsk-cb-tl-wave{position:absolute;left:0;top:0;overflow:visible;pointer-events:none;fill:none;stroke:var(--hsk-chat-divide, rgba(0, 0, 0, .12));stroke-width:2;stroke-linecap:round;transition:d .35s cubic-bezier(.22,1,.36,1)}@media(prefers-color-scheme:dark){.hsk-cb-tl-wave{stroke:var(--hsk-chat-divide, rgba(255, 255, 255, .14))}}.hsk-cb-tl-item{--hsk-tl-d: 0;position:relative;display:block;width:100%;padding:7px 6px 7px 0!important;border:none;background:none;text-align:left!important;cursor:pointer;font-family:var(--hsk-font)}.hsk-cb-tl-dot{position:absolute;left:calc(var(--hsk-tl-x, 14px) - var(--hsk-tl-gutter, 28px) - 3px)!important;right:auto!important;top:50%;width:6px;height:6px;margin-top:-3px;border-radius:999px;background:var(--hsk-chat-muted, #8a8f98);opacity:max(.1,calc(.28 - var(--hsk-tl-d) * .07));transform:translate(calc(10px + var(--hsk-tl-d) * 7px));transition:transform .28s cubic-bezier(.34,1.4,.64,1),opacity .46s cubic-bezier(.22,1,.36,1),background .2s ease}.hsk-cb-tl-label{display:block;font-size:12px;line-height:1.4;color:var(--hsk-chat-muted, #8a8f98);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transform:translate(calc(10px + var(--hsk-tl-d) * 7px));opacity:max(.32,calc(.9 - var(--hsk-tl-d) * .15));transition:transform .46s cubic-bezier(.22,1,.36,1),opacity .46s cubic-bezier(.22,1,.36,1),color .2s ease}.hsk-cb-tl-item:hover .hsk-cb-tl-label{opacity:1;transform:translate(calc(10px + var(--hsk-tl-d) * 7px - 2px))}.hsk-cb-tl-item:hover .hsk-cb-tl-dot{transform:translate(calc(10px + var(--hsk-tl-d) * 7px - 2px)) scale(1.25)}.hsk-cb-tl-cursor{position:absolute;box-shadow:0 0 0 5px color-mix(in srgb,var(--hsk-primary, #ff6a33) 14%,transparent);left:calc(var(--hsk-tl-x, 14px) - 4.5px)!important;right:auto!important;top:0;width:9px;height:9px;margin-top:-4.5px;border-radius:999px;background:var(--hsk-primary, #ff6a33);transform:translateY(0);transition:transform .44s cubic-bezier(.22,1,.36,1);will-change:transform}.hsk-cb-tl-item--on .hsk-cb-tl-dot{opacity:0}.hsk-cb-tl-item--on .hsk-cb-tl-label{color:var(--hsk-chat-text, #1f1f1f);opacity:1;font-weight:500}@media(prefers-reduced-motion:reduce){.hsk-cb-timeline-track{animation:none}.hsk-cb-timeline-track:after,.hsk-cb-tl-label,.hsk-cb-tl-cursor,.hsk-cb-tl-dot{transition:none}}@media(prefers-color-scheme:dark){.hsk-cb-ai-text{--hsk-chat-ai-bg: #26262a;background:var(--hsk-chat-ai-bg);color:#f9fafb}}.hsk-cb-sources-wrap{position:relative;margin-top:20px}.hsk-cb-sources{display:flex;flex-direction:row;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;-ms-overflow-style:none;padding-bottom:4px}.hsk-cb-sources::-webkit-scrollbar{display:none}.hsk-cb-sources-fade-left,.hsk-cb-sources-fade-right{position:absolute;top:0;bottom:4px;width:30px;pointer-events:none;z-index:2}.hsk-cb-sources-fade-left,.hsk-cb-sources-fade-right{background-color:var(--hsk-fade-bg, var(--hsk-chat-bg, #0e0e0f))}.hsk-cb-sources-fade-left,[dir=rtl] .hsk-cb-sources-fade-right{-webkit-mask-image:linear-gradient(to right,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%);mask-image:linear-gradient(to right,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%)}.hsk-cb-sources-fade-right,[dir=rtl] .hsk-cb-sources-fade-left{-webkit-mask-image:linear-gradient(to left,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%);mask-image:linear-gradient(to left,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%)}.hsk-cb-sources-fade-left{inset-inline-start:0}.hsk-cb-sources-fade-right{inset-inline-end:0}.hsk-cb-sources-next,.hsk-cb-sources-prev{position:absolute;top:42%;transform:translateY(-50%);width:34px;height:34px;border-radius:50%!important;background:var(--hsk-chat-bg, #ffffff)!important;border:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .12))!important;color:var(--hsk-primary, #ff6a33)!important;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 14px #00000024;z-index:10;cursor:pointer;transition:transform .2s cubic-bezier(.34,1.56,.64,1),background .18s ease,color .18s ease,box-shadow .18s ease}.hsk-cb-sources-next:hover,.hsk-cb-sources-prev:hover{background:var(--hsk-primary, #ff6a33)!important;color:#fff!important;border-color:var(--hsk-primary, #ff6a33)!important;transform:translateY(-50%) scale(1.1);box-shadow:0 6px 18px #ff6a3359}.hsk-cb-sources-next{inset-inline-end:2px}.hsk-cb-sources-prev{inset-inline-start:2px}[dir=rtl] .hsk-cb-sources-next svg,[dir=rtl] .hsk-cb-sources-prev svg{transform:scaleX(-1)}.hsk-cb-carousel-dots{display:flex;align-items:center;justify-content:center;gap:5px;margin-top:10px}.hsk-cb-dot-item{width:6px;height:6px;border-radius:50%;background:#96969659;transition:all .25s cubic-bezier(.34,1.56,.64,1);cursor:pointer}.hsk-cb-dot-item--active{width:18px;border-radius:999px;background:var(--hsk-primary, #ff6a33)}.hsk-cb-source{flex:0 0 188px;scroll-snap-align:start;border-radius:var(--hsk-border-radius, 0px);border:none;background:transparent;cursor:pointer;transition:transform .14s,opacity .14s;animation:hsk-card-in .26s ease-out both;overflow:visible}@keyframes hsk-card-in{0%{opacity:0;transform:translate(16px)}to{opacity:1;transform:none}}.hsk-cb-source:hover{transform:translateY(-3px);opacity:.92}.hsk-cb-src-imgwrap{width:188px;height:188px;overflow:hidden;border-radius:var(--hsk-border-radius, 0px);display:block;background:var(--hsk-chat-source-bg, #f8f9fa)}.hsk-cb-src-imgwrap img{width:100%;height:100%;object-fit:cover;transition:transform .22s;display:block}.hsk-cb-source:hover .hsk-cb-src-imgwrap img{transform:scale(1.05)}.hsk-cb-src-imgwrap-empty{width:188px;height:188px;background:var(--hsk-chat-divide, rgba(0,0,0,.06));display:flex;align-items:center;justify-content:center;color:var(--hsk-chat-muted, #555);font-size:32px}.hsk-cb-src-info{padding:8px 2px 0}.hsk-cb-sources-wrap--compact{margin-top:10px}.hsk-cb-sources-wrap--compact .hsk-cb-sources{gap:10px}.hsk-cb-sources-wrap--compact .hsk-cb-source{flex:0 0 96px}.hsk-cb-sources-wrap--compact .hsk-cb-src-imgwrap,.hsk-cb-sources-wrap--compact .hsk-cb-src-imgwrap-empty{width:96px;height:96px}.hsk-cb-sources-wrap--compact .hsk-cb-src-imgwrap-empty{font-size:20px}.hsk-cb-sources-wrap--compact .hsk-cb-src-name{font-size:12px;-webkit-line-clamp:1}.hsk-cb-sources-wrap--compact .hsk-cb-src-detail{font-size:11px;padding:1px 6px}.hsk-cb-src-name{font-size:13px;font-weight:600;color:var(--hsk-chat-text, #333);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.hsk-cb-src-detail{display:inline-flex;align-items:center;width:fit-content;max-width:100%;padding:2px 9px;border-radius:9999px;background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .05));border:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .08));font-size:12px;font-weight:600;color:var(--hsk-primary, #ff6a33);margin-top:5px;line-height:1.2}.hsk-cb-input-wrap{position:relative;--hsk-composer-pad-top: 16px;--hsk-composer-pad-x: var(--hsk-gutter, 24px);padding:var(--hsk-composer-pad-top) var(--hsk-composer-pad-x) 24px;flex-shrink:0;background:transparent!important;z-index:10}.hsk-cb-input-wrap[data-tools-open=true]{z-index:20!important}.hsk-cb-input-wrap:after{display:none!important}.hsk-cb-input-card{position:relative;z-index:1001;border-radius:20px;background:var(--hsk-chat-input-bg, #ffffff);border:none!important;outline:none!important;box-shadow:0 3px 14px -1px #0000000d,0 1px 4px #00000008!important;overflow:hidden;transition:height .22s cubic-bezier(.32,.72,0,1)}.hsk-cb-input-card:focus-within{border:none!important;outline:none!important;box-shadow:0 4px 18px -1px #00000012,0 2px 6px #0000000a!important}.hsk-cb-docked-header{display:flex;align-items:center;gap:8px;padding:10px 16px 6px;background:transparent;border-bottom:none!important;user-select:none}.hsk-cb-docked-sub{font-size:12px;font-weight:500;letter-spacing:-.01em;color:var(--hsk-chat-text, #1f1f1f);flex:1}.hsk-cb-docked-close{background:none;border:none;color:var(--hsk-chat-muted, rgba(0, 0, 0, .4));font-size:16px;line-height:1;cursor:pointer;padding:2px 6px;border-radius:50%;transition:background .12s,color .12s}.hsk-cb-docked-close:hover{background:#00000014;color:var(--hsk-chat-text, #111111)}.hsk-cb-field{margin-inline:5px}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-field{margin-inline:0}.hsk-cb-docked-options{display:flex;flex-direction:column;padding:4px 6px;background:transparent;border-bottom:none!important;max-height:220px;overflow-y:auto;scrollbar-width:thin}.hsk-cb-docked-option{display:flex;align-items:center;gap:10px;width:100%;padding:8px 12px;border:none;background:transparent!important;border-radius:10px;color:var(--hsk-chat-text, #1f1f1f);font-family:inherit;font-size:14px;text-align:start;cursor:pointer;transition:color .15s ease}.hsk-cb-docked-option:hover,.hsk-cb-docked-option:focus{background:transparent!important;color:var(--hsk-primary, #ff6a33)}.hsk-cb-docked-option-icon{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent);color:var(--hsk-primary, #ff6a33);flex-shrink:0;overflow:hidden;transition:transform .2s cubic-bezier(.34,1.56,.64,1),background .18s ease}.hsk-cb-docked-option:hover .hsk-cb-docked-option-icon,.hsk-cb-docked-option:focus .hsk-cb-docked-option-icon{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 22%,transparent);transform:scale(1.15) rotate(4deg)}.hsk-cb-docked-option-icon img{width:100%;height:100%;object-fit:cover}.hsk-cb-docked-option-title{font-weight:500;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .15s ease}.hsk-cb-docked-option-desc{font-size:12px;color:var(--hsk-chat-muted, #6b7280);font-weight:400}.hsk-cb-docked-option-detail{font-size:12px;font-weight:600;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-input-box{position:relative;display:grid;grid-template-columns:auto 1fr auto auto;grid-template-rows:auto 0px;align-items:center;justify-items:start;column-gap:10px;row-gap:0px;transition:grid-template-rows .2s cubic-bezier(.32,.72,0,1),row-gap .2s cubic-bezier(.32,.72,0,1);background:transparent!important;border:none!important;outline:none!important;border-radius:0!important;padding-block:12px;padding-inline:18px 14px;box-shadow:none!important}.hsk-cb-tools-toggle{display:none}@media(max-width:640px){.hsk-cb-tools-toggle{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:12px;border:none;background:var(--hsk-surface-1, rgba(0,0,0,.06));color:var(--hsk-chat-muted, #5f6368);cursor:pointer;flex-shrink:0;transition:background .16s,color .16s,transform .22s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-tools-toggle:active{transform:scale(.91)}.hsk-cb-tools-toggle--open{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 14%,transparent);color:var(--hsk-primary, #ff6a33);transform:rotate(45deg)}[data-hsk-theme] .hsk-cb-tools-toggle{background:var(--hsk-surface-1)!important;color:var(--hsk-chat-muted)!important}[data-hsk-theme] .hsk-cb-tools-toggle--open{background:color-mix(in srgb,var(--hsk-primary) 14%,transparent)!important;color:var(--hsk-primary)!important}.hsk-cb-input-box{grid-template-columns:auto 1fr auto}.hsk-cb-input-box>.hsk-cb-tools-toggle{grid-column:1;grid-row:1;display:inline-flex}.hsk-cb-input-box>.hsk-cb-field{grid-column:2;grid-row:1}.hsk-cb-input-box>.hsk-cb-send,.hsk-cb-input-box>.hsk-chat-send{grid-column:3;grid-row:1}.hsk-cb-input-box>.hsk-cb-attach-btn,.hsk-cb-input-box>.hsk-cb-voice-mode-btn{display:none!important}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-field{grid-column:1 / -1;grid-row:1}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-tools-toggle,.hsk-cb-input-box[data-expanded=true]>.hsk-cb-send,.hsk-cb-input-box[data-expanded=true]>.hsk-chat-send{grid-row:2}}.hsk-cb-toolsheet-wrap{position:absolute;bottom:calc(100% - 6px);inset-inline-start:var(--hsk-composer-pad-x, 14px);inset-inline-end:auto;z-index:1000;transform-origin:bottom left;animation:hsk-toolsheet-in .22s cubic-bezier(.16,1,.3,1) both;pointer-events:auto}[dir=rtl] .hsk-cb-toolsheet-wrap,.hsk-cb-panel[dir=rtl] .hsk-cb-toolsheet-wrap{transform-origin:bottom right}.hsk-cb-toolsheet{position:relative;z-index:1;min-width:200px;padding:6px;border-radius:16px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .08));border:none!important;box-shadow:none!important}@keyframes hsk-toolsheet-in{0%{opacity:0;transform:translateY(8px) scale(.92)}to{opacity:1;transform:translateY(0) scale(1)}}.hsk-cb-toolsheet-scrim{position:fixed;inset:0;z-index:999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:linear-gradient(to top,#000 30vh,rgba(0,0,0,.84) 38vh,rgba(0,0,0,.4) 48vh,rgba(0,0,0,.1) 56vh,transparent 62vh);-webkit-mask-image:linear-gradient(to top,#000 30vh,rgba(0,0,0,.84) 38vh,rgba(0,0,0,.4) 48vh,rgba(0,0,0,.1) 56vh,transparent 62vh);animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) both;cursor:default}.hsk-cb-input-wrap[data-tools-open=true] .hsk-cb-tools-toggle{position:relative;z-index:1002}.hsk-cb-toolsheet-pub-text{display:flex;flex-direction:column;min-width:0;gap:2px}.hsk-cb-toolsheet-pub-text code{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-toolsheet-item{display:flex;align-items:center;gap:11px;width:100%;padding:10px 12px;border:none;border-radius:11px;background:transparent;color:var(--hsk-chat-text, #111827);font-family:var(--hsk-font);font-size:15px;text-align:start;cursor:pointer;transition:background-color .15s ease}.hsk-cb-toolsheet-item:hover:not(:disabled){background:var(--hsk-chat-subtle, rgba(0,0,0,.05))}.hsk-cb-toolsheet-item:disabled{opacity:.45;cursor:default}.hsk-cb-toolsheet-item>svg{flex-shrink:0;color:var(--hsk-chat-muted, #6b7280)}[data-hsk-theme] .hsk-cb-toolsheet{background:var(--hsk-sheet-bg, var(--hsk-chat-input-bg, #f3f4f6))!important;border:none!important}[data-hsk-theme] .hsk-cb-toolsheet-item{color:var(--hsk-chat-text, #111827)!important}[data-hsk-theme] .hsk-cb-toolsheet-item:hover:not(:disabled){background:var(--hsk-sheet-hover, var(--hsk-surface-2, rgba(0, 0, 0, .05)))!important}[data-hsk-theme] .hsk-cb-toolsheet-item>svg{color:var(--hsk-chat-muted, #6b7280)!important}@media(prefers-reduced-motion:reduce){.hsk-cb-toolsheet-wrap,.hsk-cb-toolsheet-stem{animation:none}}.hsk-cb-input-box>.hsk-cb-attach-btn{grid-column:1;grid-row:1}.hsk-cb-input-box>.hsk-cb-field{grid-column:2;grid-row:1}.hsk-cb-input-box>.hsk-cb-voice-mode-btn{grid-column:3;grid-row:1}.hsk-cb-input-box>.hsk-cb-send,.hsk-cb-input-box>.hsk-chat-send{grid-column:4;grid-row:1}.hsk-cb-input-box[data-expanded=true]{grid-template-rows:auto 36px;row-gap:6px}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-field{grid-column:1 / -1;grid-row:1}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-attach-btn,.hsk-cb-input-box[data-expanded=true]>.hsk-cb-voice-mode-btn,.hsk-cb-input-box[data-expanded=true]>.hsk-cb-send,.hsk-cb-input-box[data-expanded=true]>.hsk-chat-send{grid-row:2}.hsk-cb-textarea{width:100%;background:transparent;border:none;outline:none;resize:none;font-size:var(--hsk-input-font-size, 16px);font-family:var(--hsk-font);color:var(--hsk-chat-text, #111);min-height:28px;max-height:140px;field-sizing:content;line-height:var(--hsk-input-line-height, 1.55);word-break:break-word;overflow-wrap:break-word;padding:0;transition:height .18s cubic-bezier(.32,.72,0,1),color .42s cubic-bezier(.16,1,.3,1);scrollbar-width:none}.hsk-cb-textarea::-webkit-scrollbar{width:0;height:0}.hsk-cb-textarea::placeholder{color:var(--hsk-chat-muted, #9ca3af);font-family:var(--hsk-font);font-size:var(--hsk-ph-font-size, var(--hsk-input-font-size, 16px))}.hsk-cb-attach-btn,.hsk-cb-send,.hsk-chat-send{width:36px;height:36px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border:none;cursor:pointer;transition:transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s cubic-bezier(.34,1.56,.64,1),background-color .42s cubic-bezier(.16,1,.3,1),opacity .2s ease;font-family:inherit;margin:0;padding:0}.hsk-cb-send,.hsk-chat-send{background:linear-gradient(135deg,#007aff,#0056b3);color:#fff;border-radius:12px!important;box-shadow:0 4px 14px #007aff61,inset 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent);position:relative;overflow:hidden}.hsk-cb-send .hsk-telegram-icon,.hsk-chat-send .hsk-telegram-icon{transition:transform .25s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-send:hover:not(:disabled),.hsk-chat-send:hover:not(:disabled){opacity:1;transform:translateY(-1px) scale(1.05);box-shadow:0 6px 18px #007aff7a,inset 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent)}.hsk-cb-send:hover:not(:disabled) .hsk-telegram-icon,.hsk-chat-send:hover:not(:disabled) .hsk-telegram-icon{transform:translate(2px,-2px) rotate(-10deg) scale(1.1)}.hsk-cb-send:active:not(:disabled),.hsk-chat-send:active:not(:disabled){transform:translateY(0) scale(.94);box-shadow:0 1px 4px #007aff4d}.hsk-cb-send:disabled,.hsk-chat-send:disabled{opacity:.4;cursor:not-allowed;background:var(--hsk-chat-muted, #ccc);box-shadow:none}.hsk-cb-send--stop{background:#e5342a!important}.hsk-cb-send--stop:hover{background:#c92a21!important;opacity:1}.hsk-cb-field{position:relative;grid-area:field;display:flex;align-items:center;width:100%;min-width:0;--hsk-input-font-size: 16px;--hsk-input-line-height: 1.55;--hsk-input-control: 36px;--hsk-input-line-box: calc(var(--hsk-input-font-size) * var(--hsk-input-line-height))}.hsk-cb-listening{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between;pointer-events:none}.hsk-cb-listening span{width:2px;height:2px;border-radius:999px;background:var(--hsk-primary, #ff6a33);opacity:.3;transform-origin:center;will-change:transform,opacity;transition:transform 90ms linear,opacity 90ms linear}.hsk-animated-placeholder{position:absolute;inset:0;display:flex;flex-wrap:wrap;align-items:center;align-content:center;row-gap:1px;height:100%;pointer-events:none;overflow:hidden;user-select:none;padding:0;z-index:1}.hsk-cb-input-box>*{--hsk-cascade-ease: cubic-bezier(.45, 0, .55, 1);--hsk-cascade-dur: .44s;--hsk-cascade-step: 55ms}.hsk-cb-input-box[data-cascade]>*:not([type=file]):not(.hsk-cb-field){animation-duration:var(--hsk-cascade-dur);animation-timing-function:var(--hsk-cascade-ease);animation-fill-mode:none}.hsk-cb-input-box[data-cascade=a]>*:not([type=file]):not(.hsk-cb-field){animation-name:hsk-leaf-settle-a}.hsk-cb-input-box[data-cascade=b]>*:not([type=file]):not(.hsk-cb-field){animation-name:hsk-leaf-settle-b}.hsk-cb-input-box[data-cascade]>*:not([type=file]):not(.hsk-cb-field),.hsk-animated-placeholder__char{will-change:transform}.hsk-cb-input-box:hover>*,.hsk-cb-input-box:focus-within>*{will-change:auto}.hsk-cb-input-box>*{--hsk-cascade-field: .11s}.hsk-cb-input-box[data-cascade]>.hsk-cb-attach-btn{animation-delay:0ms}.hsk-cb-input-box[data-cascade]>.hsk-cb-voice-mode-btn{animation-delay:calc(var(--hsk-cascade-field) + var(--hsk-text-sweep, 0ms))}.hsk-cb-input-box[data-cascade]>.hsk-cb-send,.hsk-cb-input-box[data-cascade]>.hsk-chat-send{animation-delay:calc(var(--hsk-cascade-field) + var(--hsk-text-sweep, 0ms) + var(--hsk-cascade-step))}@keyframes hsk-leaf-settle-a{0%{transform:translateY(0) scale(1)}42%{transform:translateY(-3px) scale(1.05)}to{transform:translateY(0) scale(1)}}@keyframes hsk-leaf-settle-b{0%{transform:translateY(0) scale(1)}42%{transform:translateY(-3px) scale(1.05)}to{transform:translateY(0) scale(1)}}.hsk-cb-input-box>.hsk-cb-field .hsk-animated-placeholder__char{animation-name:hsk-placeholder-animate-up}@media(prefers-reduced-motion:reduce){.hsk-cb-input-box[data-cascade=a]>*,.hsk-cb-input-box[data-cascade=b]>*{animation:none;transform:none;opacity:1}.hsk-cb-textarea,.hsk-cb-input-card{transition-property:background-color,box-shadow}}.hsk-animated-placeholder[data-fit="2"]{--hsk-ph-font-size: 15px}.hsk-animated-placeholder[data-fit="3"]{--hsk-ph-font-size: 14px}.hsk-cb-field{transition:min-block-size .26s cubic-bezier(.16,1,.3,1)}.hsk-cb-field[data-ph-lines="2"]{min-block-size:48px}.hsk-animated-placeholder__char{display:inline-block;font-size:var(--hsk-ph-font-size, var(--hsk-input-font-size, 16px));line-height:var(--hsk-input-line-height, 1.55);color:var(--hsk-chat-muted, #9ca3af);font-family:var(--hsk-font);white-space:pre;animation:hsk-placeholder-animate-up .46s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-placeholder-animate-up{0%{opacity:0;transform:translateY(9px);color:hsl(var(--hsk-ph-hue, 0) var(--hsk-ph-sat, 68%) var(--hsk-ph-light, 55%))}55%{opacity:1;color:hsl(var(--hsk-ph-hue, 0) var(--hsk-ph-sat, 68%) var(--hsk-ph-light, 55%))}to{opacity:1;transform:translateY(0);color:var(--hsk-chat-muted, #9ca3af)}}@media(prefers-reduced-motion:reduce){.hsk-animated-placeholder__char{animation:none;transform:none;opacity:1;color:var(--hsk-chat-muted, #9ca3af);animation-delay:0ms!important}}.hsk-cb-voice-error{display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;line-height:1.45;width:fit-content;max-width:min(92%,520px);margin-inline:auto;margin:8px auto 0;text-align:center;text-wrap:balance;color:#ff6b6b;padding:3px 8px;border-radius:0;background:transparent;border:none;border-bottom:1px solid rgba(229,72,77,.35);cursor:pointer;animation:hsk-msg-in .2s ease-out both}.hsk-cb-voice-error span{text-align:center}.hsk-cb-voice-error-dismiss{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;border:none;background:#ffffff1f;color:inherit;font-size:14px;line-height:1;cursor:pointer;padding:0;flex-shrink:0;transition:background .15s ease,transform .15s ease}.hsk-cb-voice-error-dismiss:hover{background:#ffffff40;transform:scale(1.1)}.hsk-cb-img-strip{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 18px 2px;background:transparent;border:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;animation:hsk-msg-in .2s ease-out both}.hsk-cb-img-thumb-wrap{position:relative;width:60px;height:60px;flex-shrink:0;border-radius:12px;box-shadow:0 2px 8px #00000014,0 0 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 12%,transparent);transition:transform .2s cubic-bezier(.16,1,.3,1),box-shadow .2s cubic-bezier(.16,1,.3,1);overflow:visible}.hsk-cb-img-thumb-wrap:hover{transform:translateY(-2px);box-shadow:0 6px 14px #0000001f,0 0 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 20%,transparent)}.hsk-cb-img-thumb{width:100%;height:100%;object-fit:cover;border-radius:12px;border:none;display:block}.hsk-cb-img-thumb-remove{position:absolute;top:-5px;inset-inline-end:-5px;width:18px;height:18px;border-radius:50%;background:#141418bf;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#fff;border:1px solid rgba(255,255,255,.25);box-shadow:0 2px 6px #00000040;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;transition:transform .15s cubic-bezier(.16,1,.3,1),background-color .15s ease;z-index:2}.hsk-cb-img-thumb-remove:hover{background:#ef4444eb;border-color:#fff6;transform:scale(1.15)}.hsk-cb-attach-btn,.hsk-cb-voice-mode-btn{position:relative;width:36px;height:36px;border-radius:12px;border:none!important;outline:none!important;background:transparent;color:var(--hsk-chat-muted, #71717a);cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:none!important;opacity:.75;transition:transform .35s cubic-bezier(.34,1.8,.64,1),background-color .2s ease,color .2s ease,opacity .2s ease;font-family:inherit;overflow:visible}.hsk-cb-attach-btn:hover:not(:disabled),.hsk-cb-voice-mode-btn:hover:not(:disabled){opacity:1;color:var(--hsk-chat-text, #1f1f1f);background:transparent;transform:translateY(-1px)}.hsk-cb-attach-btn:active:not(:disabled),.hsk-cb-voice-mode-btn:active:not(:disabled){transform:translateY(0) scale(.94);transition-duration:.1s}.hsk-cb-attach-btn svg,.hsk-cb-voice-mode-btn svg{overflow:visible}.hsk-cb-attach-btn svg{transition:transform .34s cubic-bezier(.22,1,.36,1)}.hsk-cb-attach-btn:hover:not(:disabled) svg{transform:rotate(-14deg) translateY(-1px)}.hsk-mic-cap{transform-box:fill-box;transform-origin:center;transition:transform .32s cubic-bezier(.34,1.56,.64,1)}.hsk-wave-bar{transform-box:fill-box;transform-origin:center;transition:transform .3s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-voice-mode-btn:hover:not(:disabled) .hsk-wave-bar{animation:hsk-wave-wake .52s cubic-bezier(.34,1.8,.64,1) both,hsk-wave-live var(--hsk-period, 1.1s) ease-in-out .52s infinite;animation-delay:calc(var(--hsk-bar, 0) * 55ms),calc(.52s + var(--hsk-bar, 0) * 55ms)}.hsk-cb-voice-mode-btn:hover:not(:disabled) .hsk-wave-bar--tip{animation-name:hsk-wave-wake-tip,hsk-wave-live-tip}@keyframes hsk-wave-wake{0%{transform:scaleY(.12)}55%{transform:scaleY(calc(var(--hsk-amp, 1.6) * 1.12))}to{transform:scaleY(1)}}@keyframes hsk-wave-live{0%,to{transform:scaleY(1)}30%{transform:scaleY(var(--hsk-amp, 1.6))}55%{transform:scaleY(calc(1 + (var(--hsk-amp, 1.6) - 1) * .22))}78%{transform:scaleY(calc(1 + (var(--hsk-amp, 1.6) - 1) * .62))}}@keyframes hsk-wave-wake-tip{0%{transform:scaleX(.2);opacity:.4}55%{transform:scaleX(calc(var(--hsk-amp, 1.9) * 1.1));opacity:1}to{transform:scaleX(1);opacity:.8}}@keyframes hsk-wave-live-tip{0%,to{transform:scaleX(1);opacity:.7}30%{transform:scaleX(var(--hsk-amp, 1.9));opacity:1}70%{transform:scaleX(1.15);opacity:.8}}.hsk-copy-sheet,.hsk-copy-back{transform-box:fill-box;transform-origin:center;transition:transform .3s cubic-bezier(.22,1,.36,1)}.hsk-cb-kiku-id-pill:hover .hsk-copy-sheet,.hsk-cb-toolsheet-pub:is(:hover,:active) .hsk-copy-sheet,.hsk-cb-secret-key:is(:hover,:active) .hsk-copy-sheet{transform:translate(.9px,.9px)}.hsk-cb-kiku-id-pill:hover .hsk-copy-back,.hsk-cb-toolsheet-pub:is(:hover,:active) .hsk-copy-back,.hsk-cb-secret-key:is(:hover,:active) .hsk-copy-back{transform:translate(-.9px,-.9px)}@media(prefers-reduced-motion:reduce){.hsk-cb-attach-btn:hover:not(:disabled) svg,.hsk-cb-kiku-id-pill:hover .hsk-copy-sheet,.hsk-cb-kiku-id-pill:hover .hsk-copy-back,.hsk-cb-toolsheet-pub:is(:hover,:active) :is(.hsk-copy-sheet,.hsk-copy-back),.hsk-cb-secret-key:is(:hover,:active) :is(.hsk-copy-sheet,.hsk-copy-back){transform:none}.hsk-cb-voice-mode-btn:hover:not(:disabled) .hsk-wave-bar{animation:none}}.hsk-cb-attach-btn:disabled,.hsk-cb-voice-mode-btn:disabled{opacity:.3;cursor:not-allowed;transform:none}.hsk-cb-user-imgs{display:grid;gap:2px;width:fit-content;max-width:min(78%,320px);margin-bottom:4px;margin-left:auto;border-radius:18px 18px 4px;overflow:hidden;box-shadow:0 4px 16px #00000029}.hsk-cb-user-imgs[data-count="1"]{grid-template-columns:1fr}.hsk-cb-user-imgs[data-count="2"]{grid-template-columns:1fr 1fr}.hsk-cb-user-imgs[data-count="3"]{grid-template-columns:2fr 1fr;grid-template-rows:1fr 1fr}.hsk-cb-user-imgs[data-count="3"]>:first-child{grid-row:span 2}.hsk-cb-user-imgs[data-count="4"]{grid-template-columns:1fr 1fr}.hsk-cb-user-img-cell{position:relative;display:block;padding:0;border:none;background:none;cursor:pointer;overflow:hidden;min-width:0;line-height:0}.hsk-cb-user-imgs[data-count="1"] .hsk-cb-user-img-cell{aspect-ratio:auto}.hsk-cb-user-imgs:not([data-count="1"]) .hsk-cb-user-img-cell{aspect-ratio:1}.hsk-cb-user-img-more{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#00000073;color:#fff;font-size:20px;font-weight:600;line-height:1}.hsk-cb-user-img-thumb{width:100%;height:100%;object-fit:cover;display:block;cursor:pointer}.hsk-cb-user-imgs[data-count="1"] .hsk-cb-user-img-thumb{height:auto;max-height:300px;object-fit:contain}.hsk-cb-user-img-cell:hover .hsk-cb-user-img-thumb{filter:brightness(.93)}.hsk-cb-leave{position:relative;z-index:1002;display:inline-flex;flex-wrap:nowrap;white-space:nowrap;align-items:center;gap:8px;width:fit-content;max-width:calc(100% - 24px);margin-bottom:-11px;margin-inline-start:14px;padding:3px 4px 3px 12px;border-radius:999px;background:var(--hsk-chat-ai-bg, #eeeef0);color:var(--hsk-chat-text, #111827);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff);font:600 12px/24px var(--hsk-font);animation:hsk-leave-in .18s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-leave-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.hsk-cb-leave+.hsk-cb-input-card>*{opacity:.45;transition:opacity .15s}.hsk-cb-leave-btn{height:24px;padding:0 11px;border:none;border-radius:999px;background:#80808029;color:inherit;font:600 12px var(--hsk-font);cursor:pointer;transition:opacity .15s}.hsk-cb-leave-btn:hover{opacity:.88}.hsk-cb-leave-btn--end{background:var(--hsk-primary, #ff6a33);color:#fff}.hsk-cb-error{display:block;width:fit-content;max-width:min(560px,100%);margin:10px auto 8px;padding:10px 14px;border-radius:10px;background:#ef444414;border:1px solid rgba(239,68,68,.2);color:#ef4444;font-size:13px;line-height:1.5;font-family:var(--hsk-font);text-align:center}.hsk-kiku-badge{display:inline-block;font-size:var(--hsk-font-size, 16px);font-family:var(--hsk-font);font-weight:600;background:#ffffff38;border:1px solid rgba(255,255,255,.35);color:#fff;padding:1px 7px;border-radius:6px;margin-inline-end:6px}.hsk-cb-memory-pill{display:inline-flex;align-items:center;gap:10px;align-self:flex-start;margin:12px 0 6px;padding:12px 22px;font-size:15px;font-weight:600;text-decoration:none;color:#fff;background:linear-gradient(135deg,#007aff,#0056b3);border:none;border-radius:18px 18px 18px 4px!important;box-shadow:0 4px 16px -2px #007aff61,inset 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 28%,transparent);transition:transform .18s cubic-bezier(.34,1.56,.64,1),opacity .15s,box-shadow .18s ease;cursor:pointer}.hsk-cb-memory-pill:hover{opacity:.96;transform:translateY(-1px) scale(1.02);box-shadow:0 6px 20px #007aff7a}.hsk-cb-think{position:relative;z-index:2;margin-bottom:-11px;margin-inline-start:0;font-size:14px;font-family:var(--hsk-font)}.hsk-cb-think--note{margin-bottom:0}.hsk-cb-think-head{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 11px;border:none;border-radius:999px;background:var(--hsk-chat-ai-bg, #eeeef0);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 1px 3px #00000021;font-family:var(--hsk-font);font-size:12px;font-weight:600;color:var(--hsk-chat-muted, #6b7280);cursor:pointer;user-select:none;line-height:28px}.hsk-cb-think-head:hover{color:var(--hsk-chat-text, #111827)}.hsk-cb-think-head--static{cursor:default}.hsk-cb-think-head--static:hover{color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-think-chevron{font-size:9px;transition:transform .12s}.hsk-cb-think-chevron--open{transform:rotate(90deg)}.hsk-cb-think-body{margin-top:6px;padding:8px 12px;border-left:2px solid var(--hsk-chat-border, rgba(128,128,128,.25));color:var(--hsk-chat-muted, #4b5563);white-space:pre-wrap;line-height:1.5;font-family:var(--hsk-font);font-size:14px}.hsk-cb-stopped{display:flex;flex-direction:column;align-items:start;gap:8px;margin:10px 0 14px}.hsk-cb-stopped--empty{align-items:center;text-align:center;margin:22px auto 18px}.hsk-cb-stopped--empty .hsk-cb-stopped-label{text-align:center}.hsk-cb-stopped-dots{display:flex;gap:5px;margin-bottom:2px}.hsk-cb-stopped-dots i{width:5px;height:5px;border-radius:50%;background:var(--hsk-chat-muted, #888);opacity:.4}.hsk-cb-stopped-label{font-size:13px;line-height:1.5;color:var(--hsk-chat-muted, #888);font-family:var(--hsk-font);text-align:start}.hsk-cb-continue{display:inline-flex;align-items:center;gap:7px;padding:7px 14px;font-size:13px;font-weight:500;font-family:var(--hsk-font);color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 7%,transparent);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 12%,transparent);border-radius:999px;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.hsk-cb-continue:hover{border-color:var(--hsk-primary);color:var(--hsk-primary);background:transparent}.hsk-cb-continue svg{flex:none}[dir=rtl] .hsk-cb-continue svg{transform:scaleX(-1)}.hsk-sb-wrap{--hsk-bg: #ffffff;--hsk-border: #f1f3f4;--hsk-text: #1f1f1f;--hsk-muted: #5f6368;--hsk-hover: #f8f9fa;--hsk-drop-shadow: 0 8px 30px rgba(0,0,0,.06);--hsk-primary: var(--chat-primary-color, #ff6a33);position:relative;width:100%;font-family:inherit}@media(prefers-color-scheme:dark){.hsk-sb-wrap{--hsk-bg: #0a0a0a;--hsk-border: #202124;--hsk-text: #e8eaed;--hsk-muted: #888;--hsk-hover: #1a1a1b;--hsk-drop-shadow: 0 12px 40px rgba(0,0,0,.4)}}.hsk-sb-input{width:100%;padding:10px 16px 10px 40px;font-size:14px;border-radius:var(--hsk-border-radius, 0px);border:1.5px solid var(--hsk-border);outline:none;box-sizing:border-box;background:var(--hsk-bg);color:var(--hsk-text);transition:border-color .15s,box-shadow .15s;font-family:inherit}.hsk-sb-input::placeholder{color:var(--hsk-muted)}.hsk-sb-input:focus{border-color:var(--hsk-primary);box-shadow:0 0 0 3px #ff6a331f}.hsk-sb-icon{position:absolute;inset-inline-start:14px;top:50%;transform:translateY(-50%);color:var(--hsk-muted);pointer-events:none;display:flex;align-items:center}.hsk-sb-drop{position:absolute;top:calc(100% + 6px);left:0;right:0;background:var(--hsk-bg);border:1px solid var(--hsk-border);border-radius:var(--hsk-border-radius, 0px);box-shadow:var(--hsk-drop-shadow);z-index:9999;overflow:hidden;padding:6px 0}.hsk-sb-row{display:flex;align-items:center;gap:12px;padding:9px 16px;cursor:pointer;transition:background .1s}.hsk-sb-row:hover{background:var(--hsk-hover)}.hsk-sb-row-thumb{width:38px;height:38px;flex-shrink:0;display:flex;align-items:center;justify-content:center;color:var(--hsk-muted);background:var(--hsk-hover);border-radius:var(--hsk-border-radius, 0px);overflow:hidden}.hsk-sb-row-thumb img{width:100%;height:100%;object-fit:cover;display:block}.hsk-sb-row-body{flex:1;min-width:0}.hsk-sb-row-title{font-size:13px;font-weight:500;color:var(--hsk-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}.hsk-sb-row-sub{font-size:11px;color:var(--hsk-muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hsk-sb-empty{padding:14px 16px;font-size:13px;color:var(--hsk-muted)}.hsk-sb-loading-bar{height:2px;background:linear-gradient(90deg,transparent,var(--hsk-primary),transparent);background-size:200% 100%;animation:hsk-sweep .9s linear infinite;position:absolute;top:0;left:0;right:0}@keyframes hsk-sweep{0%{background-position:200% 0}to{background-position:-200% 0}}.hsk-sb-fade{animation:hsk-fin .1s ease-out both}@keyframes hsk-fin{0%{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}.hsk-sb-skeleton-row{display:flex;align-items:center;gap:12px;padding:9px 16px}.hsk-sb-skeleton-icon{width:38px;height:38px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:var(--hsk-border-radius, 0px);flex-shrink:0;animation:hsk-pulse 1.5s ease-in-out infinite}.hsk-sb-skeleton-text1{height:12px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:3px;width:60%;animation:hsk-pulse 1.5s ease-in-out infinite}.hsk-sb-skeleton-text2{height:8px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:2px;width:35%;margin-top:5px;animation:hsk-pulse 1.5s ease-in-out infinite}@keyframes hsk-pulse{0%,to{opacity:.6}50%{opacity:1}}@media(pointer:coarse){.hsk-cb-user-bubble,.hsk-cb-ai-body{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}}.hsk-tapback-overlay{position:absolute;inset:0;z-index:1000;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;touch-action:none}.hsk-cb-msg-group[data-hsk-tapback-focus]{position:relative;z-index:2;pointer-events:none}.hsk-tapback-frost{z-index:1;position:absolute;left:0;right:0;pointer-events:none;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 24%,transparent);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);-webkit-mask-image:var(--hsk-tapback-feather);mask-image:var(--hsk-tapback-feather);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;animation:hsk-scrim-in .2s cubic-bezier(.16,1,.3,1) both}.hsk-tapback-frost.is-upper{--hsk-tapback-feather: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .03) 6px, rgba(0, 0, 0, .16) 16px, rgba(0, 0, 0, .5) 32px, rgba(0, 0, 0, .84) 48px, rgba(0, 0, 0, .97) 58px, #000 64px)}.hsk-tapback-frost.is-lower{--hsk-tapback-feather: linear-gradient(to top, transparent, rgba(0, 0, 0, .03) 6px, rgba(0, 0, 0, .16) 16px, rgba(0, 0, 0, .5) 32px, rgba(0, 0, 0, .84) 48px, rgba(0, 0, 0, .97) 58px, #000 64px)}.hsk-tapback-frost.is-closing{animation:hsk-scrim-out .19s cubic-bezier(.4,0,1,1) both}@media(prefers-reduced-motion:reduce){.hsk-tapback-overlay *,.hsk-tapback-overlay.is-closing *,.hsk-tapback-frost,.hsk-tapback-frost.is-closing{animation:none!important;transition:none!important}}.hsk-tapback-group{position:absolute;z-index:1002;outline:none;display:flex;flex-direction:column;animation:hsk-tapback-flow-up .26s cubic-bezier(.34,1.56,.64,1) both}.hsk-tapback-group.is-closing{animation:hsk-tapback-flow-down .19s cubic-bezier(.55,0,.85,.35) forwards}.hsk-tapback-group.is-above{transform-origin:var(--tail-x, 80%) calc(100% + 16px)}.hsk-tapback-group.is-below{transform-origin:var(--tail-x, 80%) -16px}.hsk-tapback-capsule{display:inline-flex;align-items:center;gap:1px;padding:3px 5px;height:36px;min-height:36px;border-radius:999px;border:none;background:var(--hsk-skin, var(--hsk-bubble-bg, #eeeef0));box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 6px 18px #00000029;max-width:100%;position:relative;z-index:2;box-sizing:border-box}.hsk-tapback-tail{position:absolute;top:calc(100% - 2px);transform:translate(-50%);display:flex;flex-direction:column;align-items:center;gap:3px;pointer-events:none;z-index:1}.hsk-tapback-tail.is-below{top:auto;bottom:calc(100% - 2px);flex-direction:column-reverse}.hsk-tapback-dot--mid{margin-left:calc(var(--tail-dir, 0) * var(--tail-step, 5px))}.hsk-tapback-dot--anchor{margin-left:calc(var(--tail-dir, 0) * var(--tail-step, 5px) * 2.2)}.hsk-tapback-dot{display:block;border-radius:50%;flex-shrink:0;border:none}.hsk-tapback-dot--mid{width:12px;height:12px;background:var(--hsk-skin, var(--hsk-bubble-bg, #eeeef0));box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 2px 5px #0000001f;animation:hsk-tapback-bead .2s cubic-bezier(.16,1,.3,1) .06s backwards}.hsk-tapback-dot--anchor{width:9px;height:9px;background:var(--hsk-anchor-color, var(--hsk-primary, #007aff));animation:hsk-tapback-bead .2s cubic-bezier(.16,1,.3,1) .02s backwards}.hsk-tapback-tool-btn{min-width:0;flex:1 1 auto;display:inline-flex;align-items:center;gap:4px;padding:4px 8px;height:30px;border-radius:999px;font-size:12px;font-weight:500;font-family:var(--hsk-font);line-height:1;color:var(--hsk-chat-text, #f3f4f6);background:transparent;border:none;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;transition:background-color .15s ease,transform .12s ease;white-space:nowrap;animation:hsk-tapback-tool-pop .2s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.02s + var(--tool-idx, 0) * .02s)}.hsk-tapback-tool-btn span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-tapback-tool-btn svg{flex-shrink:0}.hsk-tapback-tool-btn:hover{background:color-mix(in srgb,var(--hsk-chat-text, #ffffff) 14%,transparent)}.hsk-tapback-tool-btn:active{transform:scale(.92)}.hsk-tapback-tool-btn--pin{color:var(--hsk-primary, #ff6a33)}.hsk-tapback-tool-btn--pin:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 18%,transparent)}.hsk-tapback-tool-btn--copy.is-copied{color:#10b981!important}.hsk-tapback-group.is-docked .hsk-tapback-tail{display:none}@keyframes hsk-tapback-flow-up{0%{opacity:0;transform:scale(.12,.04)}18%{opacity:1}46%{transform:scale(1.06,1.13)}74%{transform:scale(.985,.95)}to{opacity:1;transform:scale(1)}}@keyframes hsk-tapback-flow-down{0%{opacity:1;transform:scale(1)}65%{opacity:1;transform:scale(.5,.34)}to{opacity:0;transform:scale(.12,.04)}}@keyframes hsk-tapback-bead{0%{opacity:0;transform:scale(.2)}to{opacity:1;transform:scale(1)}}@keyframes hsk-tapback-tool-pop{0%{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}.hsk-cb-topbar-logo{display:block;max-height:18px;max-width:104px;object-fit:contain}.hsk-cb-sound-pill{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px;border-radius:16px;font-family:var(--hsk-font);font-size:11px;font-weight:550;color:var(--hsk-chat-muted, #71717a);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 12%,transparent);cursor:pointer;transition:color .2s ease,background-color .2s ease,transform .2s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-sound-pill.is-on{color:var(--hsk-chat-text, #111)}.hsk-cb-req{position:relative;width:100%}.hsk-cb-req-dot{width:7px;height:7px;border-radius:50%;background:var(--hsk-primary, #ff6a33)}.hsk-cb-req-list{position:absolute;bottom:calc(100% + 10px);inset-inline-start:0;z-index:60;display:flex;flex-direction:column;width:100%;max-height:300px;overflow-y:auto;scrollbar-width:none;font-family:var(--hsk-font);animation:hsk-leave-in .18s cubic-bezier(.16,1,.3,1) both}.hsk-cb-req-open{display:flex;align-items:flex-start;gap:9px;width:100%;padding:6px 0 6px 12px;padding-inline:12px 0;border:none;background:none;color:var(--hsk-chat-muted, #8a8f98);font:inherit;text-align:start;cursor:pointer;opacity:.6;transition:opacity .2s ease,color .2s ease}.hsk-cb-req-open:hover,.hsk-cb-req-card.is-open .hsk-cb-req-open,.hsk-cb-req-card.is-active .hsk-cb-req-open{opacity:1}.hsk-cb-req-card.is-active .hsk-cb-req-summary{color:var(--hsk-chat-text, #1f1f1f);font-weight:500}.hsk-cb-req-mark{flex:none;width:6px;height:6px;margin-top:5px;border-radius:50%;background:currentColor;opacity:.45}.hsk-cb-req-card.is-open .hsk-cb-req-mark{background:var(--hsk-primary, #ff6a33);box-shadow:0 0 0 4px color-mix(in srgb,var(--hsk-primary, #ff6a33) 14%,transparent);opacity:1}.hsk-cb-req-text{display:flex;flex-direction:column;gap:1px;min-width:0}.hsk-cb-req-summary,.hsk-cb-req-status{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hsk-cb-req-summary{font-size:12px;line-height:1.4}.hsk-cb-req-status{font-size:10.5px;opacity:.75}.hsk-cb-tray-below{position:absolute;top:calc(var(--hsk-tray-top, 100%) + var(--hsk-tray-h, 0px) + 14px);left:50%;transform:translate(-50%);width:min(300px,calc(100vw - 28px));z-index:1000;animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) .08s both}.hsk-cb-tray-below.is-closing{animation:hsk-scrim-out .18s cubic-bezier(.4,0,1,1) both;pointer-events:none}.hsk-cb-tray-below .hsk-cb-req-list{position:static;max-height:32vh;animation:none}.hsk-cb-tray-below-title{display:block;padding:0 12px 4px;font:600 10.5px var(--hsk-font);letter-spacing:.04em;text-transform:uppercase;color:var(--hsk-chat-muted, #8a8f98);opacity:.7}.hsk-cb-btn-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#ef4444;color:#fff;font-size:11px;font-weight:700;line-height:1}@media(hover:hover){.hsk-cb-sound-pill:hover{background:color-mix(in srgb,var(--hsk-chat-text, #111) 7%,transparent);color:var(--hsk-primary, #ff6a33)}}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-rule{width:13px;height:1px;background:var(--hsk-chat-muted, #71717a);opacity:.25}.hsk-cb-sound-pill.is-compact{width:26px;height:26px;padding:0;gap:0;justify-content:center;border-radius:9px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside{width:14px;flex:0 0 14px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill{width:14px;height:14px;border:none;background:none;backdrop-filter:none;-webkit-backdrop-filter:none;border-radius:0;opacity:.45}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill.is-on{opacity:.75}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill:hover{transform:none}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill svg{width:12px;height:12px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{flex:1 1 auto!important}.hsk-cb-sound-pill.is-blocked{color:#ef4444!important;opacity:1!important}.hsk-cb-panel[dir=rtl] .hsk-cb-topbar-ooze-menu .hsk-cb-theme-vlabel{transform:none}.hsk-markdown-table td.hsk-md-ok,[data-hsk-theme] .hsk-markdown-table td.hsk-md-ok{color:color-mix(in srgb,#10b981 72%,var(--hsk-chat-text, #111))!important;font-weight:600}.hsk-markdown-table td.hsk-md-bad,[data-hsk-theme] .hsk-markdown-table td.hsk-md-bad{color:color-mix(in srgb,#ef4444 72%,var(--hsk-chat-text, #111))!important;font-weight:600}@media(max-width:1199px){.hsk-cb-topbar-ooze-menu.is-island,.hsk-cb-topbar-ooze-menu.is-island.is-closing{animation:none;will-change:clip-path}.hsk-cb-topbar-ooze-menu.is-island>*{opacity:var(--hsk-island-content, 1)}}.hsk-cb-topbar-ooze-menu.is-parked,.hsk-cb-tray-shadow.is-parked{visibility:hidden;pointer-events:none;opacity:0!important}[data-hsk-theme] .hsk-cb-topbar-ooze-menu.is-parked,.hsk-cb-topbar-ooze-menu.is-parked{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none!important}.hsk-cb-tray-shadow.is-parked>div{box-shadow:none!important}.hsk-cb-tray-shadow{position:absolute;top:var(--hsk-tray-top, 0px);left:50%;transform:translate(-50%);width:var(--hsk-tray-w, 0px);height:var(--hsk-tray-h, 0px);z-index:1000;pointer-events:none}.hsk-cb-tray-shadow>div{position:absolute;left:0;top:0;width:100%;height:100%;border-radius:18px;box-shadow:0 16px 38px -6px color-mix(in srgb,#000 16%,transparent)}.hsk-cb-allowance{display:flex;flex-wrap:wrap;gap:6px;margin-block-start:8px;pointer-events:none}@media(min-width:1200px){.hsk-cb-allowance{flex-direction:column;flex-wrap:nowrap;align-items:flex-start;gap:12px;position:absolute;bottom:48px;width:auto;max-width:200px;margin-block-start:0;z-index:10;direction:ltr}.hsk-cb-allowance--right{left:100%!important;right:auto!important;margin-left:28px!important;margin-right:0!important;align-items:flex-start}.hsk-cb-allowance--left{left:auto!important;right:100%!important;margin-right:28px!important;margin-left:0!important;align-items:flex-end}}.hsk-cb-allowance-pill{display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 13px;border-radius:999px;font-family:inherit;font-size:11.5px;font-weight:550;letter-spacing:-.01em;line-height:1;white-space:nowrap;color:var(--hsk-chat-text)!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 68%,transparent)!important;backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%));-webkit-backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%));border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 35%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 8%,transparent)!important;box-shadow:0 4px 18px -2px color-mix(in srgb,#000 14%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent) inset!important;animation:hsk-allowance-in .34s cubic-bezier(.22,1,.36,1) both;transition:all .2s cubic-bezier(.16,1,.3,1);cursor:default}.hsk-cb-allowance-pill:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 82%,transparent)!important;border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 85%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 20px -2px color-mix(in srgb,#000 18%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent) inset!important}.hsk-cb-allowance-pill-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--hsk-primary, #6366f1);opacity:.95}.hsk-cb-allowance-pill-icon svg{width:12.5px;height:12.5px}.hsk-cb-allowance-pill-label{font-family:inherit;letter-spacing:-.01em}.hsk-cb-allowance-pill.is-spent{opacity:.5;filter:grayscale(.6)}@keyframes hsk-allowance-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.hsk-cb-allowance-pill{animation:none}}.hsk-cb-onboarding-card .hsk-cb-entlang-opt{padding-inline:2px 0}.hsk-cb-secret-card{display:flex;flex-direction:column;gap:8px;max-width:340px}.hsk-cb-secret-head{display:flex;align-items:center;gap:8px}.hsk-cb-secret-title{flex:1;font-size:13px;font-weight:600;color:var(--hsk-chat-text, #111)}.hsk-cb-secret-timer{font-size:11px;font-variant-numeric:tabular-nums;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-secret-dismiss{display:grid;place-items:center;width:24px;height:24px;padding:0;font-size:15px;line-height:1;color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border:0;border-radius:50%;cursor:pointer}.hsk-cb-secret-key{display:flex;align-items:center;gap:10px;width:100%;padding:8px 8px 8px 14px;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent);cursor:pointer}.hsk-cb-secret-key code{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;text-align:start;color:var(--hsk-chat-text, #111)}.hsk-cb-secret-copy{display:inline-flex;align-items:center;gap:5px;flex-shrink:0;padding:5px 12px;font-size:12px;font-weight:600;color:#fff;background:var(--hsk-primary, #ff6a33);border-radius:999px}.hsk-cb-secret-hint{font-size:11px;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-swatch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px;max-width:460px;margin-top:10px}.hsk-cb-swatch{display:flex;flex-direction:column;gap:2px;padding:0 0 8px;text-align:start;background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .03));border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border-radius:14px;overflow:hidden;cursor:pointer;animation:hsk-msg-in .25s ease-out both;transition:transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s ease}.hsk-cb-swatch--target{cursor:default;background:transparent;border-style:dashed;border-color:color-mix(in srgb,var(--hsk-chat-text, #111) 28%,transparent)}.hsk-cb-swatch--target .hsk-cb-swatch-name{color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-swatch:not(.hsk-cb-swatch--target):hover{transform:translateY(-2px);box-shadow:0 10px 24px -12px color-mix(in srgb,#000 35%,transparent)}.hsk-cb-swatch-chip{display:block;aspect-ratio:1 / .8;margin-bottom:6px;box-shadow:inset 0 -1px color-mix(in srgb,#000 8%,transparent)}.hsk-cb-swatch-name{padding:0 10px;font-size:12px;font-weight:600;line-height:1.3;color:var(--hsk-chat-text, #111);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-cb-swatch-code{padding:0 10px;font-size:11px;font-variant-numeric:tabular-nums;letter-spacing:.02em;color:var(--hsk-chat-muted, #6b7280)}@media(prefers-reduced-motion:reduce){.hsk-cb-swatch,.hsk-cb-swatch:hover{animation:none;transform:none}}.hsk-gallery-cover{position:relative;display:block;width:100%;border:0;padding:0;cursor:pointer;background:transparent}.hsk-gallery-cover img{width:100%;height:100%;object-fit:cover}.hsk-gallery-count{position:absolute;bottom:6px;right:6px;padding:3px 7px;border-radius:10px;background:#000000b8;color:#fff;font-size:11px}.hsk-gallery-cover:focus-visible{outline:2px solid var(--hsk-primary,#ff6a33);outline-offset:3px}.hsk-cb-layout-toggle{gap:7px;height:32px;min-height:32px;padding:0 10px 0 5px;box-sizing:border-box}.hsk-cb-layout-toggle:focus-visible{outline:2px solid var(--hsk-primary, #007aff);outline-offset:3px}.hsk-cb-layout-track{display:block;position:relative;width:32px;height:20px;border-radius:20px;background:var(--hsk-chat-ai-bg, #ddd);transition:background-color .32s ease}.hsk-cb-layout-thumb{position:absolute;inset-block-start:3px;inset-inline-start:3px;display:grid;place-items:center;width:14px;height:14px;border-radius:50%;background:#fff;color:#454545;box-shadow:0 1px 4px #0003;transition:inset-inline-start .38s cubic-bezier(.22,1,.36,1),scale .18s ease}.hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-track{background:var(--hsk-primary, #007aff)}.hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-thumb{inset-inline-start:15px}.hsk-cb-layout-toggle:active .hsk-cb-layout-thumb{scale:1.12 .92}.hsk-cb-speaker-label{display:none}[data-hsk-layout=wide] .hsk-cb-speaker-label{display:block;margin-block:12px 6px;font-size:11px;font-weight:650;color:var(--hsk-chat-muted, #71717a)}[data-hsk-layout=wide] .hsk-cb-ai-text{width:100%!important;max-width:100%;box-sizing:border-box;padding:0;border-radius:0;background:transparent;box-shadow:none;border:0;color:var(--hsk-chat-text, #111827);line-height:1.65}[data-hsk-layout=wide] .hsk-cb-ai-text:before,[data-hsk-layout=wide] .hsk-cb-ai-text:after{display:none}[data-hsk-layout=wide] .hsk-cb-ai-content{gap:12px}@media(prefers-reduced-motion:reduce){.hsk-cb-layout-track,.hsk-cb-layout-thumb{transition:none}}.hsk-cb-dock-layout{display:flex;justify-content:flex-end;padding:10px 0 2px}.hsk-cb-dock-layout .hsk-cb-layout-toggle{min-height:40px}[data-hsk-theme][data-hsk-layout=wide] .hsk-cb-ai-text{background:transparent!important;color:var(--hsk-chat-text, #111827)!important}.hsk-cb-rail-pair{display:flex;align-items:center;gap:8px}[data-hsk-layout=wide] .hsk-cb-think{margin-bottom:6px}[data-hsk-theme] .hsk-cb-dock-layout .hsk-cb-layout-toggle{background:var(--hsk-grid-bg)!important;color:var(--hsk-chat-muted)!important;border:none!important;box-shadow:none!important}[data-hsk-layout=wide] .hsk-cb-think+.hsk-cb-ai-content>.hsk-cb-ai-text:first-child{padding-top:0;margin-top:0}[data-hsk-layout=wide] .hsk-cb-think{margin-bottom:4px}.hsk-tapback-group.is-wide .hsk-tapback-tail{display:none}[data-hsk-theme] .hsk-cb-layout-toggle,[data-hsk-theme] .hsk-cb-dock-layout .hsk-cb-layout-toggle{background:transparent!important;border:none!important;box-shadow:none!important;color:var(--hsk-chat-text)!important}.hsk-cb-layout-track{background:color-mix(in srgb,currentColor 12%,transparent)}.hsk-cb-dock-layout{padding-top:4px}.hsk-cb-dock-layout .hsk-cb-layout-toggle{min-height:32px}.hsk-cb-dock-layout{align-items:center;justify-content:space-between;gap:12px}.hsk-cb-layout-label{padding-inline-start:12px;font-size:11px;font-weight:500;color:var(--hsk-chat-muted);opacity:.75}.hsk-cb-layout-label{text-transform:uppercase;letter-spacing:.07em}[data-hsk-theme] .hsk-cb-layout-toggle,[data-hsk-theme] .hsk-cb-dock-layout .hsk-cb-layout-toggle{padding:0 12px;background:var(--hsk-pill-bg)!important}.hsk-cb-layout-icon{display:inline-flex;align-items:center}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true]{color:var(--hsk-primary)!important}.hsk-cb-topbar-ooze-menu .hsk-cb-dock-layout{margin-inline:7px}.hsk-cb-topbar-ooze-menu .hsk-cb-layout-label{color:var(--hsk-chat-muted);opacity:.38;font-size:9px;font-weight:600;letter-spacing:.14em;padding-inline-start:0}.hsk-cb-layout-track{flex-shrink:0}[data-hsk-theme] .hsk-cb-layout-track{background:var(--hsk-grid-bg)}[data-hsk-theme] .hsk-cb-layout-thumb{background:var(--hsk-chat-bg);color:var(--hsk-chat-text)}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-track{background:var(--hsk-active-bg)}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-thumb{background:var(--hsk-on-active);color:var(--hsk-active-bg)}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true]{color:var(--hsk-chat-text)!important}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-block{display:grid;grid-template-columns:14px minmax(0,1fr);column-gap:8px;row-gap:4px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:100%;justify-content:center;min-width:0;padding-inline:6px}.hsk-cb-topbar-ooze-menu .hsk-cb-dock-layout{grid-column:2;margin:0;padding:0 0 2px;gap:6px}.hsk-cb-topbar-ooze-menu .hsk-cb-layout-label{font-size:7px;letter-spacing:.06em}@keyframes hsk-card-in{0%{opacity:0;transform:scale(.96) translateY(-12px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes hsk-bar{0%{background-position:200% 0}to{background-position:-200% 0}}@media(max-width:768px){.hsk-cb-overlay{--hsk-font-size: var(--hsk-mobile-font-size, 14px) !important;position:fixed!important;inset:0!important;width:100vw!important;height:100%!important;height:var(--hsk-vvh, 100dvh)!important;min-height:0!important;z-index:2147483647!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;overscroll-behavior:contain!important;background:var(--hsk-chat-bg, #0a0a0a)!important;box-sizing:border-box!important}.hsk-cb-panel{position:relative!important;height:100%!important;width:100%!important;max-width:100%!important;margin:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;border-radius:0!important;background:var(--hsk-chat-bg, #0a0a0a)!important;box-sizing:border-box!important}.hsk-cb-main{flex:1 1 auto!important;height:100%!important;min-height:0!important;display:flex!important;flex-direction:column!important;justify-content:space-between!important;overflow:hidden!important;background:var(--hsk-chat-bg, #0a0a0a)!important;box-sizing:border-box!important}.hsk-cb-topbar{padding:14px 14px 8px!important}.hsk-cb-msgs{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;padding:10px 14px 0!important}.hsk-cb-empty{flex:1 0 auto!important;justify-content:center!important;padding:16px 4px!important}.hsk-cb-input-box{grid-template-columns:auto 1fr auto auto}.hsk-cb-input-box>.hsk-cb-attach-btn{display:none}.hsk-cb-input-box>.hsk-cb-voice-mode-btn{display:none}.hsk-cb-input-box>.hsk-cb-field{grid-column:2}.hsk-cb-input-box>.hsk-cb-voice-mode-btn{grid-column:3}.hsk-cb-input-box>.hsk-cb-send,.hsk-cb-input-box>.hsk-chat-send{grid-column:4}.hsk-cb-tools-toggle{display:flex;grid-column:1;grid-row:1;width:36px;height:36px;align-items:center;justify-content:center;flex-shrink:0;padding:0;border:none;border-radius:12px;background:var(--hsk-chat-subtle, rgba(0,0,0,.045));color:var(--hsk-chat-muted, #6b7280);cursor:pointer;transition:transform .26s cubic-bezier(.34,1.56,.64,1),background-color .2s ease}.hsk-cb-tools-toggle--open{transform:rotate(45deg);background:var(--hsk-chat-divide, rgba(0,0,0,.09))}.hsk-cb-toolsheet-wrap,.hsk-cb-toolsheet-scrim{display:block}.hsk-cb-toolsheet-item{display:flex}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-tools-toggle{grid-row:2}.hsk-cb-ai-msg--inline{display:block!important;padding-inline-end:34px}.hsk-cb-hello-wrap{align-items:center!important;text-align:center!important;gap:4px!important;width:100%!important;max-width:min(520px,100%)!important;padding-inline:16px!important;box-sizing:border-box!important;margin-inline:auto!important}.hsk-cb-ink-skeleton{align-items:center!important}.hsk-cb-hello{font-size:clamp(21px,5.8vw,30px)!important;font-weight:600!important;line-height:1.25!important;letter-spacing:-.02em!important;color:var(--hsk-chat-muted, #8b8b8f)!important;text-align:center!important;text-wrap:balance;max-width:100%!important;overflow-wrap:break-word}.hsk-cb-hello-lead,.hsk-cb-hello-ask{font-size:14px!important;font-weight:400!important;line-height:1.45!important;text-align:center!important;text-wrap:balance;max-width:100%!important;overflow-wrap:break-word;color:color-mix(in srgb,var(--hsk-chat-muted, #8b8b8f) 78%,transparent)!important}.hsk-cb-hello-lead{font-size:14px!important;margin-top:4px!important}.hsk-cb-lang-chips{justify-content:center!important;width:100%!important;gap:8px!important;margin:12px 0 6px!important}.hsk-cb-lang-chips-hint{width:100%!important;justify-content:center!important;margin-top:6px!important;margin-inline-start:0!important}.hsk-cb-onboarding-head{justify-content:flex-start!important;margin-bottom:12px!important}.hsk-cb-onboarding-card .hsk-cb-hello-wrap{align-items:flex-start!important;text-align:start!important}.hsk-cb-onboarding-card .hsk-cb-hello,.hsk-cb-onboarding-card .hsk-cb-hello-lead,.hsk-cb-onboarding-card .hsk-cb-hello-ask,.hsk-cb-onboarding-card .hsk-cb-hello-hint{text-align:start!important}.hsk-cb-onboarding-card .hsk-cb-lang-chips,.hsk-cb-onboarding-card .hsk-cb-lang-chips-hint{justify-content:flex-start!important}.hsk-cb-doodles{opacity:.92!important}.hsk-cb-input-wrap{margin-top:auto!important;flex-shrink:0!important;--hsk-composer-pad-top: 8px;--hsk-composer-pad-x: 14px;padding:8px 14px!important;padding-bottom:max(12px,env(safe-area-inset-bottom))!important;background:var(--hsk-chat-bg, #0a0a0a)!important;position:relative!important;z-index:10!important}.hsk-cb-attach-btn,.hsk-cb-send,.hsk-chat-send{width:32px!important;height:32px!important;border-radius:8px!important}.hsk-cb-attach-btn svg,.hsk-cb-send svg,.hsk-chat-send svg{width:15px!important;height:15px!important}.hsk-cb-input-box{padding:10px 10px 10px 14px}.hsk-cb-user-bubble{max-width:85%}}.hsk-table-wrapper{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:12px 0 8px;width:100%;max-width:100%;min-width:0;border-radius:0;padding:0 0 6px;background:transparent;box-shadow:none;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:var(--hsk-chat-divide, rgba(0, 0, 0, .2)) transparent;cursor:grab;user-select:auto;transition:mask-image .15s ease,-webkit-mask-image .15s ease}.hsk-table-wrapper.is-dragging{cursor:grabbing;user-select:none}.hsk-table-wrapper::-webkit-scrollbar{height:5px}.hsk-table-wrapper::-webkit-scrollbar-track{background:transparent}.hsk-table-wrapper::-webkit-scrollbar-thumb{background:var(--hsk-chat-divide, rgba(0, 0, 0, .25));border-radius:4px}.hsk-table-wrapper::-webkit-scrollbar-thumb:hover{background:var(--hsk-chat-muted, rgba(0, 0, 0, .5))}.hsk-cb-ai-text .hsk-markdown-p{margin:0 0 10px}.hsk-cb-ai-text .hsk-markdown-p:last-child{margin-bottom:0}.hsk-cb-ai-text .hsk-markdown-list{margin:0 0 10px;padding-inline-start:1.2em}.hsk-cb-ai-text .hsk-markdown-list:last-child{margin-bottom:0}.hsk-cb-ai-text .hsk-markdown-ul{list-style:disc outside}.hsk-cb-ai-text .hsk-markdown-ol{list-style:decimal outside}.hsk-cb-ai-text .hsk-markdown-list li{margin:0 0 7px;padding-left:3px;line-height:1.5}.hsk-cb-ai-text .hsk-markdown-list li:last-child{margin-bottom:0}.hsk-cb-ai-text .hsk-markdown-list li::marker{color:var(--hsk-primary, #ff6a33)}.hsk-cb-ai-text .hsk-markdown-h1,.hsk-cb-ai-text .hsk-markdown-h2,.hsk-cb-ai-text .hsk-markdown-h3{margin:14px 0 7px;font-weight:650;line-height:1.3;letter-spacing:-.01em}.hsk-cb-ai-text .hsk-markdown-h1{font-size:1.09em}.hsk-cb-ai-text .hsk-markdown-h2{font-size:1.03em}.hsk-cb-ai-text .hsk-markdown-h3{font-size:1em}.hsk-cb-ai-text>:first-child{margin-top:0}.hsk-markdown-table{width:max-content;min-width:100%;border-collapse:collapse;border-spacing:0;text-align:start;font-size:13px;background:transparent;margin:0;border:none;font-variant-numeric:tabular-nums}.hsk-markdown-table th{padding:8px 16px 6px;vertical-align:bottom;line-height:1.35;font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap;color:var(--hsk-chat-muted, rgba(0, 0, 0, .55));border-bottom:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .1));background:transparent!important}.hsk-markdown-table td{padding:8px 16px;vertical-align:middle;line-height:1.45;font-size:13px;white-space:nowrap;color:var(--hsk-chat-text, inherit);border-bottom:.5px solid var(--hsk-chat-divide, rgba(0, 0, 0, .06));background:transparent!important}.hsk-markdown-table th:first-child,.hsk-markdown-table td:first-child{padding-inline-start:0;font-weight:590;white-space:normal;max-width:280px;min-width:150px;line-height:1.35}.hsk-markdown-table th:last-child,.hsk-markdown-table td:last-child{padding-inline-end:0}.hsk-markdown-table tbody tr:last-child td{border-bottom:none}.hsk-markdown-table td *{color:inherit}.hsk-markdown-table .hsk-markdown-link{display:inline-flex;align-items:center;padding:2px 8px;background-color:var(--hsk-chat-source-bg, rgba(0, 0, 0, .04));border:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .08));color:var(--hsk-primary, #ff6a33);font-size:12px;font-weight:500;border-radius:6px;text-decoration:none!important;margin:2px 0;transition:opacity .15s ease}.hsk-markdown-table .hsk-markdown-link:hover{opacity:.8}@media(prefers-color-scheme:dark){.hsk-markdown-table th{color:var(--hsk-chat-muted, rgba(255, 255, 255, .5));border-bottom-color:var(--hsk-chat-divide, rgba(255, 255, 255, .1))}.hsk-markdown-table td{color:var(--hsk-chat-text, #f0efed);border-bottom-color:var(--hsk-chat-divide, rgba(255, 255, 255, .06))}}.hsk-markdown-link{color:var(--hsk-primary, #ff6a33);text-decoration:underline;text-underline-offset:2px}.hsk-markdown-code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace,var(--hsk-font);font-size:.85em;background-color:#80808026;padding:.2em .4em;border-radius:var(--hsk-border-radius, 0px);color:inherit;word-break:break-word}.hsk-markdown-img-block{margin:8px 0;line-height:0}.hsk-markdown-img{display:block;max-width:100%;width:auto;max-height:220px;border-radius:10px;box-shadow:0 2px 12px #0000002e;object-fit:cover;background:#80808014}.hsk-chat-widget ::-webkit-scrollbar,.hsk-sp-card ::-webkit-scrollbar,.hsk-cb-msgs ::-webkit-scrollbar,.hsk-sp-details-pane ::-webkit-scrollbar,.hsk-sp-results ::-webkit-scrollbar,.hsk-chat-messages ::-webkit-scrollbar{width:3px;height:3px}.hsk-chat-widget ::-webkit-scrollbar-track,.hsk-sp-card ::-webkit-scrollbar-track,.hsk-cb-msgs ::-webkit-scrollbar-track,.hsk-sp-details-pane ::-webkit-scrollbar-track,.hsk-sp-results ::-webkit-scrollbar-track,.hsk-chat-messages ::-webkit-scrollbar-track{background:transparent}.hsk-chat-widget ::-webkit-scrollbar-thumb,.hsk-sp-card ::-webkit-scrollbar-thumb,.hsk-cb-msgs ::-webkit-scrollbar-thumb,.hsk-sp-details-pane ::-webkit-scrollbar-thumb,.hsk-sp-results ::-webkit-scrollbar-thumb,.hsk-chat-messages ::-webkit-scrollbar-thumb{background:#0000000f;border-radius:99px;transition:background .2s ease}.hsk-chat-widget ::-webkit-scrollbar-thumb:hover,.hsk-cb-msgs ::-webkit-scrollbar-thumb:hover{background:#00000026}@media(prefers-color-scheme:dark){.hsk-chat-widget ::-webkit-scrollbar-thumb,.hsk-sp-card ::-webkit-scrollbar-thumb,.hsk-cb-msgs ::-webkit-scrollbar-thumb,.hsk-sp-details-pane ::-webkit-scrollbar-thumb,.hsk-sp-results ::-webkit-scrollbar-thumb,.hsk-chat-messages ::-webkit-scrollbar-thumb{background:#ffffff14}.hsk-chat-widget ::-webkit-scrollbar-thumb:hover,.hsk-cb-msgs ::-webkit-scrollbar-thumb:hover{background:#fff3}}.hsk-cb-phone-form{display:flex;flex-direction:column;gap:8px;margin-top:8px}.hsk-cb-phone-label{font-size:.875rem;color:var(--hsk-chat-text, #111);margin:0}.hsk-cb-phone-input{width:100%;box-sizing:border-box;padding:8px 12px;border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.12));border-radius:var(--hsk-border-radius, 0px);background:var(--hsk-chat-input-bg, rgba(0,0,0,.04));color:var(--hsk-chat-text, #111);font-size:.9rem;outline:none;transition:border-color .15s}.hsk-cb-phone-input::placeholder{color:var(--hsk-chat-muted, #888)}.hsk-cb-phone-input:focus{border-color:var(--hsk-primary, #ff6a33)}.hsk-cb-phone-submit{align-self:flex-start;padding:8px 16px;border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.12));border-radius:var(--hsk-border-radius, 0px);background:transparent;color:var(--hsk-chat-text, #111);font-size:.875rem;font-weight:500;cursor:pointer;transition:background .15s,border-color .15s,color .15s}.hsk-cb-phone-submit:hover{border-color:var(--hsk-primary, #ff6a33);color:var(--hsk-primary, #ff6a33)}.hsk-cb-main{flex:1;min-width:0;display:flex;flex-direction:column;height:100%;overflow:hidden}@keyframes hsk-fade-in-up{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.hsk-action-pills{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;animation:hsk-fade-in-up .35s ease .1s both}.hsk-action-pill{display:inline-flex;align-items:center;gap:5px;padding:6px 12px;border-radius:20px;border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.12));background:var(--hsk-pill-bg, rgba(255,255,255,.8));color:var(--hsk-chat-text, #1f1f1f);font-size:12px;font-weight:500;cursor:pointer;font-family:inherit;transition:all .15s;white-space:nowrap;backdrop-filter:blur(4px)}.hsk-action-pill:hover:not(:disabled){border-color:var(--hsk-primary, #ff6a33);background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 8%,transparent);color:var(--hsk-primary, #ff6a33);transform:translateY(-1px);box-shadow:0 2px 8px #00000014}.hsk-action-pill:disabled{opacity:.4;cursor:not-allowed}.hsk-pill-emoji{font-size:13px;line-height:1}@media(prefers-color-scheme:dark){.hsk-action-pill{--hsk-pill-bg: rgba(40,40,42,.85);border-color:#ffffff1a;color:var(--hsk-chat-text, #e8eaed)}}[data-hsk-theme=dark] .hsk-action-pill{--hsk-pill-bg: rgba(40,40,42,.85);border-color:#ffffff1a;color:var(--hsk-chat-text, #e8eaed)}.kiku-voice-btn:hover{background:var(--hsk-hover-bg, rgba(0,0,0,.06));color:var(--hsk-primary, #6c47ff)}@keyframes kiku-voice-pulse{0%{transform:scale(1);opacity:1}to{transform:scale(1.6);opacity:0}}.kiku-style-tag{display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:99px;background:var(--hsk-primary-alpha, rgba(108,71,255,.1));color:var(--hsk-primary, #6c47ff);font-size:11px;font-weight:500;white-space:nowrap}.kiku-voice-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:none;background:transparent;color:var(--hsk-text-muted, #888);cursor:pointer;transition:color .2s,background .2s;flex-shrink:0}.kiku-voice-btn:hover{background:var(--hsk-hover-bg, rgba(0,0,0,.06));color:var(--hsk-primary, #ff6a33)}.kiku-voice-btn--active{color:#ef4444;background:#ef44441a}.kiku-voice-btn:disabled{opacity:.4;cursor:not-allowed}.kiku-voice-ripple{position:absolute;inset:-4px;border-radius:50%;border:2px solid #ef4444;animation:kiku-voice-pulse 1.2s ease-out infinite;pointer-events:none}@keyframes kiku-voice-pulse{0%{transform:scale(1);opacity:1}to{transform:scale(1.7);opacity:0}}.kiku-style-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}.kiku-style-tag{display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:99px;background:#ff6a331a;color:var(--hsk-primary, #ff6a33);font-size:11px;font-weight:500;white-space:nowrap}.hsk-kiku-badge{display:inline-flex;align-items:center;gap:3px;font-size:13px;font-weight:700;letter-spacing:-.01em;color:#fff;background:#ffffff47;border:1px solid rgba(255,255,255,.45);padding:2px 8px;border-radius:8px;margin-inline-end:8px;vertical-align:middle;position:relative;top:-1px;box-shadow:0 1px 3px #0000001f}.hsk-markdown-img,.hsk-cb-user-img-thumb,.hsk-cb-source .hsk-cb-src-imgwrap img{cursor:zoom-in}.hsk-lightbox{position:fixed;inset:0;z-index:999999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 84%,transparent);backdrop-filter:blur(28px) saturate(180%);-webkit-backdrop-filter:blur(28px) saturate(180%);display:flex;align-items:center;justify-content:center;padding:24px;animation:hsk-lightbox-in .15s ease-out both;cursor:zoom-out;user-select:none}@keyframes hsk-lightbox-in{0%{opacity:0}to{opacity:1}}.hsk-lightbox-top{position:absolute;top:18px;left:20px;right:68px;display:flex;align-items:center;z-index:2;pointer-events:none}.hsk-lightbox-title{font-size:14px;font-weight:600;letter-spacing:-.01em;color:var(--hsk-chat-text, #111);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:6px 14px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 80%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 2px 10px #0000000f}.hsk-lightbox-stage{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%;max-width:100%;max-height:100%;cursor:default}.hsk-lightbox-content{display:flex;flex-direction:column;align-items:center;justify-content:center;max-width:min(92vw,1000px);max-height:calc(100vh - 120px);position:relative}.hsk-lightbox-img{max-width:100%;max-height:min(78vh,760px);width:auto;height:auto;object-fit:contain;border-radius:12px;box-shadow:0 24px 64px -16px #0000005c;cursor:default;transition:transform .18s ease-out}.hsk-lightbox-caption{margin-top:12px;font-size:13px;font-weight:500;line-height:1.4;color:var(--hsk-chat-text, #111);text-align:center;padding:5px 14px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 75%,transparent);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);box-shadow:0 2px 8px #0000000d}.hsk-lightbox-close{position:absolute;top:16px;right:16px;width:38px;height:38px;border-radius:50%;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 78%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);color:var(--hsk-chat-text, #111);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .15s ease;z-index:3;box-shadow:0 2px 8px #00000014}.hsk-lightbox-close:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 95%,transparent);transform:scale(1.05)}.hsk-lightbox-nav{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:50%;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 12%,transparent);background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 78%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);color:var(--hsk-chat-text, #111);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .16s ease;z-index:3;box-shadow:0 4px 16px #0000001f}.hsk-lightbox-nav:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 95%,transparent);transform:translateY(-50%) scale(1.08);box-shadow:0 6px 20px #0000002e}.hsk-lightbox-nav:active{transform:translateY(-50%) scale(.96)}.hsk-lightbox-nav--prev{left:20px}.hsk-lightbox-nav--next{right:20px}.hsk-lightbox-bottom{position:absolute;bottom:22px;left:50%;transform:translate(-50%);display:flex;align-items:center;z-index:2;pointer-events:none}.hsk-lightbox-counter{padding:6px 16px;border-radius:999px;font-size:13px;font-weight:600;letter-spacing:.03em;color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 78%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 4px 14px #00000014}@media(max-width:600px){.hsk-lightbox-nav--prev{left:8px}.hsk-lightbox-nav--next{right:8px}.hsk-lightbox-content{max-width:100%}}.hsk-cb-viz{margin-top:10px;animation:hsk-msg-in .2s ease-out both}.hsk-cb-viz img,.hsk-cb-viz video{width:100%;max-width:420px;border-radius:8px;display:block}.hsk-cb-viz-disclaimer{max-width:420px;margin-top:4px;font-size:11px;line-height:1.4;color:var(--hsk-chat-muted, #9aa0a6)}.hsk-cb-calc-disclaimer{max-width:440px;margin-top:8px;padding:8px 12px;font-size:11.5px;line-height:1.45;color:var(--hsk-chat-muted, rgba(255, 255, 255, .65));background:var(--hsk-chat-callout-bg, rgba(255, 255, 255, .04));border:1px solid var(--hsk-border-subtle, rgba(255, 255, 255, .08));border-radius:8px}[data-hsk-theme=light] .hsk-cb-calc-disclaimer{color:#0009;background:#00000008;border-color:#00000014}.hsk-cb-stale{max-width:420px;margin-top:8px;padding:8px 10px;border:1px solid rgba(220,38,38,.35);border-left-width:3px;border-radius:6px;background:#dc26260f}.hsk-cb-stale-title{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#dc2626}.hsk-cb-stale-item{margin-top:3px;font-size:12px;line-height:1.45;color:var(--hsk-chat-text, #202124)}.hsk-cb-stale-reason{color:var(--hsk-chat-muted, #9aa0a6)}.hsk-cb-viz-imgwrap{position:relative;display:inline-block;max-width:100%}.hsk-cb-viz-mark{position:absolute;right:10px;bottom:10px;display:inline-flex;align-items:center;gap:6px;padding:8px 14px;font-size:13px;font-weight:600;color:#fff;background:#0000009e;backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,.35);border-radius:999px;cursor:pointer;transition:background .15s}.hsk-cb-viz-mark:hover{background:var(--hsk-primary, #ff6a33);border-color:transparent}.hsk-markup-overlay{position:fixed;inset:0;z-index:999999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 84%,transparent);backdrop-filter:blur(28px) saturate(180%);-webkit-backdrop-filter:blur(28px) saturate(180%);display:flex;align-items:center;justify-content:center;padding:12px;animation:hsk-lightbox-in .15s ease-out both}.hsk-markup{height:100%;box-sizing:border-box;padding-top:max(32px,env(safe-area-inset-top));padding-bottom:max(24px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:12px;width:100%;max-height:100%;overflow-y:auto}.hsk-markup-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.hsk-markup-title{font-size:12px;font-weight:500;line-height:1.4;color:color-mix(in srgb,var(--hsk-chat-text, #111) 55%,transparent)}.hsk-markup-cancel{flex-shrink:0;padding:6px 12px;font-size:12px;font-weight:600;color:var(--hsk-chat-text, #111);border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 6px 18px -8px color-mix(in srgb,#000 22%,transparent);cursor:pointer}.hsk-markup-cancel:hover{background:color-mix(in srgb,var(--hsk-chat-text, #111) 16%,transparent)}.hsk-markup-stage{display:flex;flex:1;min-height:0;align-items:center;justify-content:center}.hsk-markup-canvas-wrap{position:relative;max-width:100%}.hsk-markup-canvas{display:block;max-width:100%;max-height:calc(100vh - 130px);box-shadow:0 18px 50px -12px color-mix(in srgb,#000 30%,transparent);border-radius:var(--hsk-border-radius, 0px);touch-action:none}.hsk-markup-canvas--pen,.hsk-markup-canvas--eraser{cursor:crosshair}.hsk-markup-pinlabel{position:absolute;display:flex;align-items:center;gap:4px;max-width:calc(100% - 16px);padding:4px 4px 4px 12px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 78%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 10px 28px -10px color-mix(in srgb,#000 40%,transparent)}.hsk-markup-pinlabel input{min-width:0;max-width:100%;padding:6px 0;font-size:13px;color:var(--hsk-chat-text, #111);background:transparent;border:0;outline:none}.hsk-markup-pinlabel input::placeholder{color:color-mix(in srgb,var(--hsk-chat-text, #111) 45%,transparent)}.hsk-markup-pinlabel button{flex-shrink:0;display:grid;place-items:center;width:26px;height:26px;padding:0;font-size:15px;line-height:1;color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border:0;border-radius:50%;cursor:pointer}.hsk-markup-loading,.hsk-markup-error{padding:40px 16px;font-size:13px;color:color-mix(in srgb,var(--hsk-chat-text, #111) 70%,transparent);text-align:center}.hsk-markup-tools{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin-top:auto}.hsk-markup-tool{flex-shrink:0;white-space:nowrap;padding:8px 14px;font-size:12px;font-weight:600;color:var(--hsk-chat-text, #111);border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 6px 18px -8px color-mix(in srgb,#000 22%,transparent);cursor:pointer}.hsk-markup-tool:hover:not(:disabled){background:color-mix(in srgb,var(--hsk-chat-text, #111) 16%,transparent)}.hsk-markup-tool--on{color:#fff;background:var(--hsk-primary, #ff6a33);border-color:transparent}.hsk-markup-tool--on:hover:not(:disabled){background:var(--hsk-primary, #ff6a33)}.hsk-markup-tool:disabled{opacity:.4;cursor:default}.hsk-markup-go{flex-shrink:0;padding:8px 22px;font-size:13px;font-weight:600;color:#fff;background:var(--hsk-primary, #ff6a33);border:none;border-radius:999px;box-shadow:0 6px 18px -8px color-mix(in srgb,var(--hsk-primary, #ff6a33) 60%,transparent);cursor:pointer}.hsk-markup-go:hover:not(:disabled){opacity:.9}.hsk-markup-go:disabled{opacity:.45;cursor:default}@media(max-width:640px){.hsk-markup-head{flex-direction:column-reverse;align-items:flex-start}.hsk-markup-cancel{align-self:flex-end}}.hsk-cb-kimgs{margin-top:10px;display:flex;flex-direction:column;gap:10px;animation:hsk-msg-in .2s ease-out both}.hsk-cb-kimg-grid{display:flex;flex-wrap:wrap;gap:6px}.hsk-cb-kimg{width:132px;height:132px;object-fit:cover;border-radius:8px;cursor:zoom-in;border:1px solid var(--hsk-chat-border, rgba(0, 0, 0, .08))}.hsk-cb-kimg:only-child{width:100%;max-width:320px;height:auto}.hsk-cb-kimg-caption{margin-top:4px;font-size:11px;line-height:1.4;color:var(--hsk-chat-muted, #9aa0a6)}.hsk-cb-panel[data-script=nonlatin][data-host-font=gap]{--hsk-font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif}.hsk-cb-panel[data-script=nonlatin],.hsk-cb-panel[data-script=nonlatin] *{letter-spacing:normal;font-family:var(--hsk-font)}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-lead,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-ask,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-user-bubble,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-chip,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-topbar-btn,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-textarea,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-entlang-opt-title,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-entlang-opt-note,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-list li,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-h1,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-h2,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-h3,.hsk-cb-panel[data-script=nonlatin] .hsk-markdown-table th,.hsk-cb-panel[data-script=nonlatin] .hsk-markdown-table td{line-height:1.9}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-voice-error{font-size:12px;line-height:1.7;max-width:min(92%,520px);margin-left:auto;margin-right:auto}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-msg-action{height:16px;padding:1px 6.5px;font-size:9.5px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-msg-action .hsk-cb-msg-action-label{font-size:9.5px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-user-footer,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-footer{min-height:16px}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-sent-status,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-failed-notice{font-size:10px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello{font-size:clamp(20px,3.4vw,26px);line-height:1.5;text-wrap:balance;overflow-wrap:break-word}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-ask{font-size:15px;line-height:1.75}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-wrap{max-width:100%;min-width:0}.hsk-cb-panel[data-script=nonlatin] .hsk-cascade__w{white-space:normal}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-hello,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-hello-lead,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-hello-ask,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-user-bubble,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-chip,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-topbar-btn,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-textarea,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-entlang-opt-title,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-entlang-opt-note,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-list li,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-h1,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-h2,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-h3,.hsk-cb-panel[data-nastaliq=true] .hsk-markdown-table th,.hsk-cb-panel[data-nastaliq=true] .hsk-markdown-table td{line-height:2.2}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-voice-error{font-size:13px;line-height:2;max-width:min(92%,540px);margin-left:auto;margin-right:auto}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-msg-action{height:16px;padding:1px 6.5px;font-size:9px;line-height:1}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-msg-action .hsk-cb-msg-action-label{font-size:9px;line-height:1}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-user-footer,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-footer{min-height:16px}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-sent-status,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-failed-notice{font-size:9.5px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-chip{font-size:14px}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-topbar-btn{height:auto;min-height:34px;padding:5px 14px}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-field{--hsk-input-line-height: 1.9}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-textarea{min-height:34px}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-field{--hsk-input-line-height: 2.2}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-user-bubble,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text{overflow-wrap:break-word;word-break:normal}.hsk-cb-viz-broken{font-size:13px;color:var(--hsk-chat-muted, #71717a);padding:14px 16px;border:1px dashed var(--hsk-chat-divide, rgba(0, 0, 0, .12));border-radius:12px}.hsk-cb-voice-mode-btn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;background:transparent;border:1px solid transparent;border-radius:12px;color:var(--hsk-chat-muted, #71717a);cursor:pointer;transition:all .2s cubic-bezier(.34,1.56,.64,1);font-family:inherit}.hsk-cb-voice-mode-btn:hover:not(:disabled){border-color:color-mix(in srgb,var(--hsk-primary, #ff6a33) 25%,transparent);color:var(--hsk-primary, #ff6a33);background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 8%,transparent);transform:translateY(-1px)}.hsk-cb-voice-mode-btn:disabled{opacity:.35;cursor:not-allowed}.hsk-cb-panel[data-script=nonlatin] .hsk-animated-placeholder[data-fit="2"]{--hsk-ph-font-size: 13.5px}.hsk-cb-panel[data-script=nonlatin] .hsk-animated-placeholder[data-fit="3"]{--hsk-ph-font-size: 12px}.hsk-cb-panel[data-nastaliq=true] .hsk-animated-placeholder[data-fit="1"]{--hsk-ph-font-size: 15px}.hsk-cb-panel[data-nastaliq=true] .hsk-animated-placeholder[data-fit="2"]{--hsk-ph-font-size: 13px}.hsk-cb-panel[data-nastaliq=true] .hsk-animated-placeholder[data-fit="3"]{--hsk-ph-font-size: 11.5px}.hsk-cb-panel[data-script=nonlatin] .hsk-animated-placeholder__char{line-height:1.35}.hsk-cb-panel[data-script] .hsk-cb-chrome-loading,.hsk-cb-panel[data-script] .hsk-cb-chrome-loading *{font-family:system-ui,-apple-system,Segoe UI,Roboto,Noto Sans,sans-serif}.hsk-voice-overlay{position:absolute;inset:0;z-index:30;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:clamp(8px,1.4vh,16px);padding:clamp(14px,2.5vh,24px);overflow:hidden;overscroll-behavior:contain;background:var(--hsk-chat-bg, #ffffff);animation:hsk-voice-in .32s cubic-bezier(.2,.8,.2,1);will-change:opacity;contain:paint}.hsk-voice-overlay:before{content:"";position:absolute;inset:0;background:radial-gradient(46% 20% at 50% 92%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 8%,transparent) 0%,transparent 68%);pointer-events:none}.hsk-voice-overlay>*{position:relative}@keyframes hsk-voice-in{0%{opacity:0}to{opacity:1}}.hsk-voice-exit{position:absolute;z-index:2;top:14px;right:14px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;background:transparent;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 14%,transparent);border-radius:999px;color:var(--hsk-chat-muted, #71717a);cursor:pointer;transition:color .18s ease,border-color .18s ease}.hsk-voice-exit:hover{color:var(--hsk-chat-text, #1f1f1f);border-color:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 32%,transparent)}.hsk-voice-new{position:absolute;z-index:2;top:14px;right:58px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;background:transparent;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 14%,transparent);border-radius:999px;color:var(--hsk-chat-muted, #71717a);cursor:pointer;transition:color .18s ease,border-color .18s ease,transform .12s ease}.hsk-voice-new:hover:not(:disabled){color:var(--hsk-chat-text, #1f1f1f);border-color:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 32%,transparent)}.hsk-voice-new:active:not(:disabled){transform:scale(.92)}.hsk-voice-new:disabled{opacity:.4;cursor:default}.hsk-voice-stage{grid-column:2;width:100%;height:clamp(64px,13vh,140px);min-width:0;animation:hsk-composer-to-wave .42s cubic-bezier(.2,.8,.2,1) both}@keyframes hsk-composer-to-wave{0%{opacity:0;translate:0 18px}to{opacity:1;translate:0 0}}@media(prefers-reduced-motion:reduce){.hsk-voice-stage{animation:none}}.hsk-voice-thread{position:relative;z-index:1;flex:1 1 auto;width:min(720px,100%);min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:none;-ms-overflow-style:none;display:flex;flex-direction:column;gap:12px;padding:clamp(46px,8vh,72px) 4px 6px;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 34px,#000 calc(100% - 30px),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 34px,#000 calc(100% - 30px),transparent 100%)}.hsk-voice-turn--live{opacity:.72}.hsk-voice-canvas{display:block;width:100%;height:100%}.hsk-voice-controls{display:grid;grid-template-columns:52px minmax(0,1fr) 52px;align-items:center;gap:12px;flex:none;width:min(640px,100%)}.hsk-voice-controls [data-control=attach]{grid-column:1}.hsk-voice-controls [data-control=mic]{grid-column:3}.hsk-voice-control{display:flex;align-items:center;justify-content:center;width:52px;height:52px;padding:0;background:var(--hsk-surface-2, rgba(255, 255, 255, .95));border:1px solid color-mix(in srgb,var(--hsk-chat-text, #000000) 10%,transparent);border-radius:999px;color:var(--hsk-chat-text, #1f1f1f);cursor:pointer;box-shadow:0 2px 12px #00000014,0 1px 3px #0000000a;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);transition:color .2s ease,border-color .2s ease,background .2s ease,transform .2s cubic-bezier(.16,1,.3,1),box-shadow .2s ease}.hsk-voice-control:hover{transform:scale(1.06);box-shadow:0 4px 18px #0000001f}.hsk-voice-control:active{transform:scale(.92);transition-duration:.08s}.hsk-voice-control--muted{color:var(--hsk-chat-muted, #888888);border-color:color-mix(in srgb,var(--hsk-chat-text, #000000) 12%,transparent);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 85%,transparent);box-shadow:0 1px 4px #0000000a}.hsk-voice-control-icon{display:inline-flex;align-items:center;justify-content:center;z-index:2;transition:transform .2s ease}@media(prefers-reduced-motion:reduce){.hsk-voice-control-icon,.hsk-voice-control--muted{animation:none}}.hsk-voice-stage--connecting{opacity:.4;transition:opacity .25s ease}.hsk-voice-connecting{display:flex;align-items:center;gap:7px;font-family:var(--hsk-font);font-size:13px;color:var(--hsk-chat-muted, #8a8f98);animation:hsk-sent-in .2s ease-out both}.hsk-voice-connecting-dot{width:6px;height:6px;border-radius:999px;background:currentColor;animation:hsk-queued-pulse 1s ease-in-out infinite}@media(prefers-reduced-motion:reduce){.hsk-voice-connecting-dot{animation:none;opacity:.7}}.hsk-voice-error{font-family:var(--hsk-font);font-size:.85rem;color:#e5484d;text-align:center}@media(prefers-reduced-motion:reduce){.hsk-voice-overlay{animation:none}}.hsk-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.hsk-voice-picker{position:absolute;z-index:3;top:14px;left:14px;display:flex;flex-direction:column;width:auto;height:36px;overflow:hidden;border-radius:18px;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 10%,transparent);background:linear-gradient(180deg,#ffffff1f,#fff0 60%),color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 58%,transparent);backdrop-filter:blur(20px) saturate(160%);-webkit-backdrop-filter:blur(20px) saturate(160%);box-shadow:inset 0 1px #ffffff40,0 1px 2px #0000000d;interpolate-size:allow-keywords;transition:width .42s cubic-bezier(.16,1,.3,1),height .42s cubic-bezier(.16,1,.3,1),border-radius .42s cubic-bezier(.16,1,.3,1),box-shadow .3s ease;animation:hsk-voice-pill-in .42s cubic-bezier(.16,1,.3,1) both}.hsk-voice-picker[data-open]{width:224px;height:auto;border-radius:20px;background:linear-gradient(180deg,#ffffff1a,#fff0 50%),color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 78%,transparent);box-shadow:inset 0 1px #ffffff40,0 8px 22px -8px #0003,0 1px 2px #0000000d}@keyframes hsk-voice-pill-in{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}.hsk-voice-pill{display:flex;align-items:center;justify-content:space-between;gap:6px;flex:none;height:34px;padding:0 10px 0 14px;border:0;background:transparent;font:inherit;font-size:12px;font-weight:600;white-space:nowrap;color:var(--hsk-chat-text, #1f1f1f);cursor:pointer}.hsk-voice-pill-caret{display:inline-flex;color:var(--hsk-chat-muted, #71717a);transform:rotate(90deg) scale(.8);transition:transform .32s cubic-bezier(.16,1,.3,1)}.hsk-voice-picker[data-open] .hsk-voice-pill-caret{transform:rotate(-90deg) scale(.8)}.hsk-voice-menu-list{position:relative;contain:inline-size;display:flex;flex-direction:column;gap:1px;max-height:min(320px,50vh);padding:4px 5px 6px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;opacity:0;transition:opacity .18s ease;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 10px,#000 calc(100% - 16px),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 10px,#000 calc(100% - 16px),transparent 100%)}.hsk-voice-menu-list::-webkit-scrollbar{display:none}.hsk-voice-picker[data-open] .hsk-voice-menu-list{opacity:1;transition:opacity .26s ease .12s}.hsk-voice-group{display:flex;align-items:center;gap:8px;flex:none;padding:10px 9px 4px;font-size:10px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--hsk-chat-muted, #71717a)}.hsk-voice-group:after{content:"";flex:1;height:1px;background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 12%,transparent)}.hsk-voice-group:first-child{padding-top:4px}.hsk-voice-option{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex:none;padding:7px 9px;border:0;border-radius:13px;background:transparent;font:inherit;text-align:start;color:var(--hsk-chat-text, #1f1f1f);cursor:pointer;transition:background .14s ease}.hsk-voice-option:hover{background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 6%,transparent)}.hsk-voice-option-name{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600}.hsk-voice-option-trait{font-size:11px;color:var(--hsk-chat-muted, #71717a)}.hsk-voice-option--on,.hsk-voice-option--on:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent)}.hsk-voice-option--on .hsk-voice-option-name{color:var(--hsk-primary, #ff6a33)}.hsk-voice-option--on .hsk-voice-option-name:before{content:"";width:5px;height:5px;border-radius:999px;background:currentColor}@media(prefers-reduced-motion:reduce){.hsk-voice-picker{animation:none;transition:none}}@media(max-width:520px){.hsk-cb-input-box{gap:6px;padding:10px 10px 10px 12px}.hsk-cb-attach-btn,.hsk-cb-send,.hsk-cb-voice-mode-btn,.hsk-chat-send{width:32px;height:32px;border-radius:10px}.hsk-cb-textarea{flex:1 1 auto;min-width:0;font-size:16px}.hsk-cb-input-box .hsk-cb-listening{display:none}}.hsk-cb-main{position:relative}.hsk-cb-main,.hsk-voice-overlay{--hsk-doodle-ink: 31, 31, 31;--hsk-doodle-tint: 255, 106, 51}@keyframes hsk-doodles-shimmer-in{0%{opacity:0}to{opacity:.9}}.hsk-cb-doodles{position:absolute;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;opacity:.9;animation:hsk-doodles-shimmer-in .28s cubic-bezier(.16,1,.3,1) both}.hsk-cb-main>*:not(.hsk-cb-doodles){position:relative}@media(prefers-color-scheme:dark){.hsk-cb-main,.hsk-voice-overlay{--hsk-doodle-ink: 240, 239, 237;--hsk-doodle-tint: 255, 150, 110}}[data-hsk-theme=light] .hsk-cb-main,[data-hsk-theme=light] .hsk-voice-overlay{--hsk-doodle-ink: 31, 31, 31;--hsk-doodle-tint: 255, 106, 51}[data-hsk-theme=dark] .hsk-cb-main,[data-hsk-theme=dark] .hsk-voice-overlay{--hsk-doodle-ink: 240, 239, 237;--hsk-doodle-tint: 255, 150, 110}.hsk-cb-docked-option-detail,.hsk-cb-entlang-price,.hsk-cb-src-detail,.hsk-kiku-picker-item-price,.hsk-source-price,.hsk-sp-item-discount,.hsk-sp-item-original-price,.hsk-sp-item-price,.hsk-sp-mobile-main-card-price,.hsk-sp-mobile-similar-carousel-price,.hsk-voice-item-price,.hsk-live-cell{font-variant-numeric:tabular-nums}.hsk-live-wrap{margin:6px 0 2px;width:100%;max-width:100%;box-sizing:border-box}.hsk-live-carousel{display:flex;flex-wrap:wrap;gap:6px;align-items:flex-start;width:100%;box-sizing:border-box}.hsk-live-card{flex:0 1 auto;width:fit-content;min-width:120px;max-width:100%;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .05));border:1px solid var(--hsk-chat-divide, rgba(255, 255, 255, .08));border-radius:12px;padding:6px 10px;box-sizing:border-box;display:flex;flex-direction:column;gap:3px;transition:opacity .2s ease;overflow:hidden}.hsk-live-card.is-stale{opacity:.75}.hsk-live-card__top{display:flex;align-items:center;justify-content:space-between;gap:8px}.hsk-live-card__badge{display:inline-flex;align-items:center;gap:5px}.hsk-live-card__body{display:flex;align-items:center}.hsk-live-dot{width:6px;height:6px;border-radius:50%;background:#10b981;flex-shrink:0}@media(prefers-reduced-motion:no-preference){.hsk-live-dot:not(.is-stale){animation:hsk-live-pulse 2s ease-in-out infinite}}.hsk-live-dot.is-stale{background:var(--hsk-chat-muted, #9ca3af)}.hsk-live-card__title{font-size:13px;font-weight:600;color:var(--hsk-chat-text, #111827);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.01em}.hsk-live-card__age{font-size:10.5px;font-weight:500;color:var(--hsk-chat-muted, #6b7280);white-space:nowrap;flex-shrink:0}.hsk-live-card__pills{display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin-top:1px}.hsk-live-pill{display:inline-flex;align-items:center;gap:4px;padding:2px 7px;background:color-mix(in srgb,var(--hsk-surface-1, var(--hsk-chat-bg, #ffffff)) 85%,transparent);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #ffffff) 10%,transparent);border-radius:6px;font-size:11.5px;font-variant-numeric:tabular-nums;line-height:1.25;color:var(--hsk-chat-text, #111827);box-shadow:0 1px 2px #00000008}.hsk-live-pill__label{font-weight:500;color:var(--hsk-chat-muted, #6b7280);font-size:11px;text-transform:capitalize}.hsk-live-pill__value{font-weight:650;color:var(--hsk-chat-text, #111827)}@media(prefers-reduced-motion:no-preference){.hsk-live-pill.is-changed{animation:hsk-live-pill-flash 1.2s ease-out}@keyframes hsk-live-pill-flash{0%{background:#10b98140;border-color:#10b981}to{background:var(--hsk-chat-bg, #ffffff);border-color:var(--hsk-chat-divide, rgba(0, 0, 0, .08))}}}@media(max-width:640px){.hsk-cb-source{flex:0 0 128px}.hsk-cb-src-imgwrap,.hsk-cb-src-imgwrap-empty{width:128px;height:128px;font-size:24px}.hsk-cb-sources{gap:10px}.hsk-cb-src-name{font-size:12px;line-height:1.35}.hsk-cb-src-detail{font-size:11px;padding:1px 7px;margin-top:4px}}@media(max-width:480px){.hsk-cb-source{flex:0 0 114px}.hsk-cb-src-imgwrap,.hsk-cb-src-imgwrap-empty{width:114px;height:114px;font-size:20px}.hsk-cb-sources{gap:8px}.hsk-live-card{flex:0 0 auto;width:fit-content;max-width:100%}}.hsk-voice-thread::-webkit-scrollbar{width:0;height:0}.hsk-voice-thread{font-family:var(--hsk-font);gap:0;padding-inline:20px}.hsk-voice-thread .hsk-cb-user-msg,.hsk-voice-thread .hsk-cb-ai-msg{align-self:stretch;max-width:100%;margin:0}.hsk-voice-thread .hsk-cb-user-bubble{max-width:100%;padding:0;background:none!important;border:none;border-radius:0;text-align:inherit;font-family:inherit;font-style:italic;font-size:16.5px;line-height:1.62;letter-spacing:.005em;color:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 62%,transparent)}.hsk-voice-thread .hsk-cb-user-bubble:after{display:none!important}.hsk-voice-thread .hsk-cb-user-msg{align-items:flex-start}.hsk-voice-thread .hsk-cb-user-bubble{position:relative;text-align:start}.hsk-voice-thread .hsk-cb-user-bubble:before{content:"\\201c";display:block!important;position:absolute;inset-inline-start:-.62em;top:-.12em;width:auto;height:auto;background:none;font-size:1.55em;font-style:normal;line-height:1;color:color-mix(in srgb,var(--hsk-primary, #ff6a33) 72%,transparent);pointer-events:none}.hsk-voice-thread .hsk-cb-ai-msg{font-size:17px;line-height:1.68;color:var(--hsk-chat-text, #1f1f1f)}.hsk-voice-thread .hsk-cb-user-msg{margin-top:22px}.hsk-voice-thread>.hsk-cb-user-msg:first-child{margin-top:0}.hsk-voice-thread .hsk-cb-ai-msg{margin-top:6px}.hsk-voice-thread .hsk-cb-ai-body.hsk-voice-turn--live:after{content:"";display:inline-block;width:.36em;height:.36em;margin-inline-start:.34em;vertical-align:.08em;background:currentColor;border-radius:0 50% 50%;transform:rotate(45deg);animation:hsk-voice-nib 1.6s ease-in-out infinite}@keyframes hsk-voice-nib{0%,to{opacity:.25}50%{opacity:.85}}.hsk-voice-images{display:flex;gap:10px;flex:none;width:min(720px,100%);padding:4px 20px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}.hsk-voice-images::-webkit-scrollbar{display:none}.hsk-voice-image{position:relative;flex:none;width:76px;height:76px;padding:0;border-radius:14px;overflow:hidden;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 12%,transparent);background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 4%,transparent);cursor:zoom-in;animation:hsk-voice-image-in .45s cubic-bezier(.16,1,.3,1) both}@media(min-width:720px){.hsk-voice-image{width:92px;height:92px}}.hsk-voice-image img{display:block;width:100%;height:100%;object-fit:cover;animation:hsk-voice-develop 1.1s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-voice-image-in{0%{opacity:0;transform:translate(10px) scale(.92)}to{opacity:1;transform:none}}@keyframes hsk-voice-develop{0%{opacity:0;filter:blur(8px) saturate(.2) brightness(1.2);transform:scale(1.06)}to{opacity:1;filter:none;transform:scale(1)}}.hsk-voice-image[data-pending]{cursor:progress;border-color:transparent;background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 5%,var(--hsk-chat-bg, #ffffff))}.hsk-doodle-shimmer{position:absolute;inset:0;width:100%;height:100%}.hsk-working-veil{--hsk-feather-12: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 12px) , transparent), linear-gradient(to bottom, transparent, #000 12px, #000 calc(100% - 12px) , transparent);--hsk-doodle-ink: 255, 122, 64;--hsk-doodle-tint: 255, 200, 165;position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none;background:radial-gradient(ellipse at center,transparent 45%,rgba(0,0,0,.22) 100%);-webkit-mask-image:var(--hsk-feather-12);-webkit-mask-composite:source-in;mask-image:var(--hsk-feather-12);mask-composite:intersect;animation:hsk-veil-in .3s cubic-bezier(.16,1,.3,1) both}.hsk-working-veil.is-leaving{animation:hsk-veil-out .3s ease-out both}.hsk-working-veil .hsk-doodle-shimmer{filter:drop-shadow(0 0 .6px rgba(0,0,0,.75));-webkit-mask-image:radial-gradient(ellipse at center,transparent 14%,rgba(0,0,0,.5) 36%,rgba(0,0,0,.9) 58%,#000 75%);mask-image:radial-gradient(ellipse at center,transparent 14%,rgba(0,0,0,.5) 36%,rgba(0,0,0,.9) 58%,#000 75%)}.hsk-working-veil:after{content:"";position:absolute;inset:0;box-shadow:inset 0 0 20px 8px color-mix(in srgb,var(--hsk-primary, #ff6a33) 90%,transparent),inset 0 0 48px 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 30%,transparent);animation:hsk-halo-breathe 2.4s ease-in-out infinite}.hsk-cb-user-img-cell:has(>.hsk-working-veil)>img,.hsk-cb-viz--working>img,.hsk-voice-image:has(>.hsk-working-veil)>img,.hsk-voice-image[data-pending],.hsk-cb-viz--working.is-blank{-webkit-mask-image:linear-gradient(to right,transparent,#000 26px,#000 calc(100% - 26px),transparent),linear-gradient(to bottom,transparent,#000 26px,#000 calc(100% - 26px),transparent);-webkit-mask-composite:source-in;mask-image:linear-gradient(to right,transparent,#000 26px,#000 calc(100% - 26px),transparent),linear-gradient(to bottom,transparent,#000 26px,#000 calc(100% - 26px),transparent);mask-composite:intersect}.hsk-voice-image:has(>.hsk-working-veil){border-color:transparent}@keyframes hsk-veil-in{0%{opacity:0}to{opacity:1}}@keyframes hsk-veil-out{0%{opacity:1}to{opacity:0}}@keyframes hsk-halo-breathe{0%,to{opacity:.7}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.hsk-working-veil:after{animation:none;opacity:.8}}.hsk-cb-viz--working{position:relative;display:inline-block;max-width:420px;border-radius:8px;overflow:hidden;line-height:0}.hsk-cb-viz--working.is-blank{display:block;width:min(100%,320px);aspect-ratio:1;background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 5%,var(--hsk-chat-bg, #ffffff))}.hsk-cb-viz--working.is-video{display:block;width:min(100%,420px);aspect-ratio:16 / 9}.hsk-cb-viz--working img{opacity:.85}.hsk-cb-viz--working.is-video img{width:100%;height:100%;object-fit:cover}.hsk-voice-control--attach{justify-self:center;width:44px;height:44px;color:var(--hsk-chat-muted, #888888);box-shadow:none}.hsk-voice-control--attach:hover:not(:disabled){transform:none;color:var(--hsk-chat-text, #1f1f1f);box-shadow:none}.hsk-voice-control--attach:active:not(:disabled){transform:scale(.9);transition-duration:.08s}@media(prefers-reduced-motion:reduce){.hsk-voice-thread .hsk-cb-ai-body.hsk-voice-turn--live:after,.hsk-voice-image,.hsk-voice-image img{animation:none}}.hsk-voice-shelf{display:flex;align-items:flex-start;gap:10px;flex:none;width:min(720px,100%);padding:0 20px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}.hsk-voice-shelf::-webkit-scrollbar{display:none}.hsk-voice-shelf>.hsk-voice-images{width:auto;padding:4px 0;overflow:visible}.hsk-voice-shelf>.hsk-voice-sources{flex:0 1 auto;width:auto;min-width:0;padding:0}.hsk-voice-sources{flex:none;width:min(720px,100%);padding:0 20px;animation:hsk-voice-image-in .45s cubic-bezier(.16,1,.3,1) both}@media(prefers-reduced-motion:reduce){.hsk-voice-sources{animation:none}}.hsk-cb-overlay[data-hsk-theme],[data-hsk-theme] .hsk-cb-overlay{background:var(--hsk-chat-bg)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-panel{background:transparent!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-topbar-name{background:var(--hsk-surface-2)!important;color:var(--hsk-name-text, var(--hsk-chat-text))!important;box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px rgba(var(--hsk-primary-rgb),.2)!important}[data-hsk-theme] .hsk-cb-think-head{background:var(--hsk-surface-2)!important;color:var(--hsk-think-text)!important;box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px rgba(var(--hsk-primary-rgb),.2)!important}[data-hsk-theme] .hsk-cb-leave{background:var(--hsk-surface-2)!important;color:var(--hsk-chat-text)!important;box-shadow:0 0 0 3px var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-leave-btn{background:var(--hsk-surface-1)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-leave-btn--end{background:var(--hsk-primary)!important;color:var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-chip,[data-hsk-theme] .hsk-action-pill{border:var(--hsk-chip-border, none)!important;background:var(--hsk-surface-1)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-chip:hover,[data-hsk-theme] .hsk-action-pill:hover{background:rgba(var(--hsk-primary-rgb),.12)!important;color:var(--hsk-primary)!important}[data-hsk-theme] .hsk-cb-ai-text{background:var(--hsk-bubble-bg)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{background:var(--hsk-bubble-bg)!important}[data-hsk-theme] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{background:var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-user-bubble--tail:before{background:#007aff!important}[data-hsk-theme] .hsk-cb-user-bubble--tail:after{background:var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-topbar-btn,[data-hsk-theme] .hsk-cb-back{background:var(--hsk-surface-1)!important;color:var(--hsk-chat-muted)!important}[data-hsk-theme] .hsk-cb-input-box{background:transparent!important;border:none!important;border-radius:inherit!important}[data-hsk-theme] .hsk-cb-textarea{color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-textarea::placeholder{color:var(--hsk-placeholder)!important}[data-hsk-theme] .hsk-markdown-table th{color:var(--hsk-chat-muted)!important;border-bottom:1px solid var(--hsk-chat-divide)!important}[data-hsk-theme] .hsk-markdown-table td{color:var(--hsk-chat-text)!important;border-bottom:1px solid var(--hsk-chat-divide)!important}[data-hsk-theme] .hsk-cb-kiku-id-pill:hover{color:var(--hsk-primary)!important}[data-hsk-theme] .hsk-cb-theme-2x2-grid,[data-hsk-theme] .hsk-cb-topbar-ooze-menu{background:var(--hsk-glass-bg)!important;border:var(--hsk-glass-border)!important;border-top:var(--hsk-glass-border-top)!important;box-shadow:var(--hsk-glass-shadow)!important;backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%))!important;-webkit-backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%))!important}[data-hsk-theme] .hsk-cb-topbar-ooze-menu{border-top:var(--hsk-glass-border)!important;box-shadow:none!important}[data-hsk-theme] .hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{background:none!important;border:none!important;border-top:none!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}[data-hsk-theme] .hsk-cb-theme-squircle-trigger,[data-hsk-theme] .hsk-cb-theme-squircle-wrap,[data-hsk-theme] .hsk-cb-kiku-id-pill,[data-hsk-theme] .hsk-cb-kiku-id-rail .hsk-cb-sound-pill,[data-hsk-theme] .hsk-cb-layout-toggle,[data-hsk-theme] .hsk-cb-squircle-btn{background:var(--hsk-pill-bg)!important;color:var(--hsk-chat-text)!important;border:var(--hsk-glass-border)!important;border-top:var(--hsk-glass-border-top)!important;box-shadow:var(--hsk-glass-shadow)!important;backdrop-filter:blur(20px) saturate(var(--hsk-glass-saturate, 160%))!important;-webkit-backdrop-filter:blur(20px) saturate(var(--hsk-glass-saturate, 160%))!important}[data-hsk-theme] .hsk-cb-kiku-id-pill,[data-hsk-theme] .hsk-cb-squircle-btn{color:var(--hsk-chat-muted)!important}[data-hsk-theme] .hsk-cb-exit-btn:hover{background:radial-gradient(120% 90% at 30% 0%,rgba(255,255,255,.4),transparent 65%),var(--hsk-pill-bg)!important;color:#ef4444!important}[data-hsk-theme] .hsk-cb-theme-grid-item{background:var(--hsk-grid-bg)!important;color:var(--hsk-chat-muted)!important;border:none!important;box-shadow:none!important}[data-hsk-theme] .hsk-cb-theme-grid-item.is-active{background:var(--hsk-active-bg)!important;color:var(--hsk-on-active)!important;box-shadow:none!important}[data-hsk-theme] .hsk-cb-src-name,[data-hsk-theme] .hsk-source-card__title{color:var(--hsk-src-title)!important;font-weight:650!important}[data-hsk-theme] .hsk-cb-src-desc,[data-hsk-theme] .hsk-cb-src-detail,[data-hsk-theme] .hsk-source-card__desc{color:var(--hsk-src-desc)!important}[data-hsk-theme] .hsk-cb-src-detail{background:var(--hsk-price-bg)!important;color:var(--hsk-price-text)!important;font-weight:700!important}[data-hsk-theme] .hsk-cb-main,[data-hsk-theme] .hsk-voice-overlay{--hsk-doodle-ink: var(--hsk-ink) !important;--hsk-doodle-tint: var(--hsk-tint) !important}[data-hsk-theme] .hsk-voice-picker{background:var(--hsk-pill-bg)!important;border:var(--hsk-glass-border)!important;border-top:var(--hsk-glass-border-top)!important}[data-hsk-theme] .hsk-voice-picker[data-open]{background:linear-gradient(180deg,#ffffff1a,#fff0 50%),color-mix(in srgb,var(--hsk-chat-bg) 78%,transparent)!important}.hsk-cb-overlay[data-hsk-theme=light],[data-hsk-theme=light] .hsk-cb-overlay{--hsk-primary: #ff6a33 !important;--hsk-primary-rgb: 255, 106, 51 !important;--hsk-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #ffffff !important;--hsk-chat-text: #1f1f1f !important;--hsk-chat-muted: #5f6368 !important;--hsk-chat-divide: #e5e7eb !important;--hsk-chat-input-bg: #f3f4f6 !important;--hsk-chat-source-bg: #f9fafb !important;--hsk-fade-bg: #ffffff !important;--hsk-goo-fill: #ffffff !important;--hsk-surface-1: rgba(0, 0, 0, .05) !important;--hsk-surface-2: #f1f3f4 !important;--hsk-bubble-bg: #f3f4f6 !important;--hsk-think-text: #4b5563 !important;--hsk-placeholder: #757575 !important;--hsk-grid-bg: #ffffff !important;--hsk-active-bg: #1f1f1f !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #111827 !important;--hsk-src-desc: #4b5563 !important;--hsk-price-bg: #f3f4f6 !important;--hsk-price-text: #ea580c !important;--hsk-sheet-bg: #f3f4f6 !important;--hsk-chip-border: 1px solid rgba(0, 0, 0, .08) !important;--hsk-ink: 55, 65, 81 !important;--hsk-tint: 145, 77, 47 !important;--hsk-glass-bg: rgba(255, 255, 255, .72) !important;--hsk-glass-edge: rgba(0, 0, 0, .07) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .9) !important;--hsk-glass-drop: rgba(0,0,0,.1) !important;--hsk-glass-sheen: rgba(255,255,255,.85) !important;--hsk-glass-saturate: 190% !important;--hsk-pill-bg: rgba(255, 255, 255, .65) !important}.hsk-cb-overlay[data-hsk-theme=dark],[data-hsk-theme=dark] .hsk-cb-overlay{--hsk-primary: #ff6a33 !important;--hsk-primary-rgb: 255, 106, 51 !important;--hsk-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #0a0a0a !important;--hsk-chat-text: #f0efed !important;--hsk-chat-muted: #888888 !important;--hsk-chat-divide: rgba(255, 255, 255, .08) !important;--hsk-chat-input-bg: #191919 !important;--hsk-chat-source-bg: rgba(255, 255, 255, .04) !important;--hsk-fade-bg: #0a0a0a !important;--hsk-goo-fill: #1a1a1c !important;--hsk-surface-1: rgba(255, 255, 255, .06) !important;--hsk-surface-2: #1f1f22 !important;--hsk-bubble-bg: #1f1f22 !important;--hsk-think-text: #a6a6a6 !important;--hsk-placeholder: #555555 !important;--hsk-grid-bg: #1a1a1c !important;--hsk-active-bg: #f0efed !important;--hsk-on-active: #0a0a0a !important;--hsk-src-title: #f9fafb !important;--hsk-src-desc: #9ca3af !important;--hsk-price-bg: rgba(255, 255, 255, .08) !important;--hsk-price-text: #ff7a45 !important;--hsk-sheet-bg: #1f1f22 !important;--hsk-ink: 240, 239, 237 !important;--hsk-tint: 248, 195, 174 !important;--hsk-glass-bg: rgba(255, 255, 255, .07) !important;--hsk-glass-edge: rgba(255, 255, 255, .1) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .22) !important;--hsk-glass-drop: rgba(0,0,0,.45) !important;--hsk-glass-sheen: rgba(255,255,255,.1) !important;--hsk-glass-saturate: 160% !important;--hsk-pill-bg: rgba(255, 255, 255, .06) !important}.hsk-cb-overlay[data-hsk-theme=mahogany],[data-hsk-theme=mahogany] .hsk-cb-overlay{--hsk-primary: #e07a38 !important;--hsk-primary-rgb: 224, 122, 56 !important;--hsk-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #140d09 !important;--hsk-chat-text: #f6eee3 !important;--hsk-chat-muted: #a89485 !important;--hsk-chat-divide: rgba(217, 140, 85, .18) !important;--hsk-chat-input-bg: #211610 !important;--hsk-chat-source-bg: #1c130d !important;--hsk-fade-bg: #140d09 !important;--hsk-goo-fill: #211610 !important;--hsk-surface-1: #211610 !important;--hsk-surface-2: #2b1c14 !important;--hsk-bubble-bg: #261912 !important;--hsk-think-text: #c4b1a1 !important;--hsk-placeholder: #7a6557 !important;--hsk-grid-bg: #2b1c14 !important;--hsk-active-bg: #e07a38 !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #fdf8f4 !important;--hsk-src-desc: #c4b1a1 !important;--hsk-price-bg: #2b1c14 !important;--hsk-price-text: #f59e0b !important;--hsk-sheet-bg: #211610 !important;--hsk-ink: 246, 238, 227 !important;--hsk-tint: 235, 180, 142 !important;--hsk-glass-bg: rgba(255, 220, 180, .07) !important;--hsk-glass-edge: rgba(217, 140, 85, .15) !important;--hsk-glass-edge-top: rgba(255, 200, 150, .25) !important;--hsk-glass-drop: rgba(0,0,0,.55) !important;--hsk-glass-sheen: rgba(255,200,150,.12) !important;--hsk-glass-saturate: 155% !important;--hsk-pill-bg: rgba(255, 220, 180, .06) !important}.hsk-cb-overlay[data-hsk-theme=blush],[data-hsk-theme=blush] .hsk-cb-overlay{--hsk-primary: #ec4899 !important;--hsk-primary-rgb: 236, 72, 153 !important;--hsk-selection-bg: #ec4899 !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #fff5f7 !important;--hsk-chat-text: #3d1424 !important;--hsk-chat-muted: #94536d !important;--hsk-chat-divide: rgba(236, 72, 153, .18) !important;--hsk-chat-input-bg: #ffe4ec !important;--hsk-chat-source-bg: #fff0f4 !important;--hsk-fade-bg: #fff5f7 !important;--hsk-goo-fill: #ffe4ec !important;--hsk-surface-1: #ffe4ec !important;--hsk-surface-2: #fbcfe8 !important;--hsk-bubble-bg: #ffebf1 !important;--hsk-think-text: #831843 !important;--hsk-name-text: #831843 !important;--hsk-placeholder: #b57a91 !important;--hsk-grid-bg: #fff0f4 !important;--hsk-active-bg: #ec4899 !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #2b0c19 !important;--hsk-src-desc: #702648 !important;--hsk-price-bg: #fce7f3 !important;--hsk-price-text: #db2777 !important;--hsk-sheet-bg: #ffe4ec !important;--hsk-sheet-hover: #ffd2e0 !important;--hsk-ink: 130, 36, 75 !important;--hsk-tint: 175, 38, 97 !important;--hsk-glass-bg: rgba(255, 240, 248, .75) !important;--hsk-glass-edge: rgba(236, 72, 153, .1) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .9) !important;--hsk-glass-drop: rgba(180, 30, 100, .08) !important;--hsk-glass-sheen: rgba(255,255,255,.85) !important;--hsk-glass-saturate: 185% !important;--hsk-pill-bg: rgba(255, 228, 236, .8) !important}.hsk-cb-overlay[data-hsk-theme=coffee],[data-hsk-theme=coffee] .hsk-cb-overlay{--hsk-primary: #a9714b !important;--hsk-primary-rgb: 169, 113, 75 !important;--hsk-selection-bg: #a9714b !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #f7f1e8 !important;--hsk-chat-text: #3b2a1d !important;--hsk-chat-muted: #8a7561 !important;--hsk-chat-divide: rgba(169, 113, 75, .18) !important;--hsk-chat-input-bg: #efe4d6 !important;--hsk-chat-source-bg: #f2eade !important;--hsk-fade-bg: #f7f1e8 !important;--hsk-goo-fill: #efe4d6 !important;--hsk-surface-1: #efe4d6 !important;--hsk-surface-2: #e6d7c4 !important;--hsk-bubble-bg: #f0e7da !important;--hsk-think-text: #6b543f !important;--hsk-placeholder: #a89680 !important;--hsk-grid-bg: #f2eade !important;--hsk-active-bg: #a9714b !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #2a1c11 !important;--hsk-src-desc: #6b543f !important;--hsk-price-bg: #ece0cf !important;--hsk-price-text: #9a5f32 !important;--hsk-sheet-bg: #efe4d6 !important;--hsk-sheet-hover: #e6d7c4 !important;--hsk-ink: 59, 42, 29 !important;--hsk-tint: 120, 88, 62 !important;--hsk-glass-bg: rgba(247, 241, 232, .78) !important;--hsk-glass-edge: rgba(169, 113, 75, .12) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .88) !important;--hsk-glass-drop: rgba(90, 55, 20, .1) !important;--hsk-glass-sheen: rgba(255,255,255,.8) !important;--hsk-glass-saturate: 185% !important;--hsk-pill-bg: rgba(239, 228, 214, .82) !important}.hsk-cb-overlay[data-hsk-theme=midnight],[data-hsk-theme=midnight] .hsk-cb-overlay{--hsk-primary: #6366f1 !important;--hsk-primary-rgb: 99, 102, 241 !important;--hsk-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #0f1420 !important;--hsk-chat-text: #dfe6f5 !important;--hsk-chat-muted: #8792ad !important;--hsk-chat-divide: rgba(99, 102, 241, .18) !important;--hsk-chat-input-bg: #1a2133 !important;--hsk-chat-source-bg: #161d2c !important;--hsk-fade-bg: #0f1420 !important;--hsk-goo-fill: #1a2133 !important;--hsk-surface-1: #1a2133 !important;--hsk-surface-2: #222b40 !important;--hsk-bubble-bg: #1e2637 !important;--hsk-think-text: #a8b3cc !important;--hsk-placeholder: #5c6780 !important;--hsk-grid-bg: #222b40 !important;--hsk-active-bg: #6366f1 !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #f2f5fc !important;--hsk-src-desc: #a8b3cc !important;--hsk-price-bg: #222b40 !important;--hsk-price-text: #818cf8 !important;--hsk-sheet-bg: #1a2133 !important;--hsk-sheet-hover: #222b40 !important;--hsk-ink: 223, 230, 245 !important;--hsk-tint: 150, 160, 200 !important;--hsk-glass-bg: rgba(180, 190, 255, .06) !important;--hsk-glass-edge: rgba(99, 102, 241, .18) !important;--hsk-glass-edge-top: rgba(180, 185, 255, .25) !important;--hsk-glass-drop: rgba(0,0,0,.55) !important;--hsk-glass-sheen: rgba(180,190,255,.1) !important;--hsk-glass-saturate: 155% !important;--hsk-pill-bg: rgba(180, 190, 255, .06) !important}.hsk-cb-back-icon{display:inline-flex;transition:transform .22s cubic-bezier(.22,1,.36,1)}.hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon{transform:translate(-2px)}.hsk-cb-panel[dir=rtl] .hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon{transform:scaleX(-1) translate(-2px)}.hsk-cb-tools-toggle{transition:transform .26s cubic-bezier(.34,1.56,.64,1),background-color .42s cubic-bezier(.16,1,.3,1),color .42s cubic-bezier(.16,1,.3,1)}.hsk-cb-tools-toggle:hover:not(:disabled){color:var(--hsk-primary, #ff6a33);transform:rotate(90deg)}.hsk-cb-tools-toggle--open:hover:not(:disabled){transform:rotate(135deg)}.hsk-cb-tools-toggle:active:not(:disabled){transform:scale(.9);transition-duration:.1s}.hsk-cb-theme-trigger-icon{display:inline-flex;transition:transform .3s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-theme-squircle-trigger:hover .hsk-cb-theme-trigger-icon{transform:translateY(-1.5px) rotate(-8deg)}.hsk-cb-dot-item:hover:not(.hsk-cb-dot-item--active){background:var(--hsk-chat-muted, rgba(120, 120, 120, .6));transform:scale(1.35)}@media(prefers-reduced-motion:reduce){.hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon,.hsk-cb-panel[dir=rtl] .hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon,.hsk-cb-theme-squircle-trigger:hover .hsk-cb-theme-trigger-icon,.hsk-cb-dot-item:hover:not(.hsk-cb-dot-item--active),.hsk-msg-audio-btn:hover:not(:disabled){transform:none}.hsk-cb-tools-toggle:hover:not(:disabled),.hsk-cb-tools-toggle--open:hover:not(:disabled){transform:none}}.hsk-voice-control{position:relative;isolation:isolate;border-radius:999px}.hsk-voice-control--waiting{opacity:.45;cursor:default}.hsk-voice-control--waiting:before,.hsk-voice-control--waiting .hsk-voice-control-icon{animation:none!important;background:none!important}.hsk-voice-control[data-control=mic]:not(.hsk-voice-control--muted):not(.hsk-voice-control--waiting):before{content:"";position:absolute;inset:-1.5px;border-radius:inherit;background:conic-gradient(from 0deg,#ff3b30,#ff9500,#ffd60a,#34c759,#00c7be,#30b0c7,#007aff,#5856d6,#af52de,#ff2d55,#ff3b30);-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 2.5px),#000 calc(100% - 2px));mask:radial-gradient(farthest-side,transparent calc(100% - 2.5px),#000 calc(100% - 2px));animation:hsk-apple-siri-spin 3s linear infinite;pointer-events:none;z-index:1}.hsk-voice-control:after{display:none!important}.hsk-voice-control-icon{will-change:transform}.hsk-voice-control[data-control=mic]:not(.hsk-voice-control--muted):not(.hsk-voice-control--waiting) .hsk-voice-control-icon{animation:hsk-apple-siri-mic-pulse 2.2s ease-in-out infinite}.hsk-img-sun,.hsk-img-ridge{transform-box:fill-box;transform-origin:center;transition:transform .34s cubic-bezier(.34,1.56,.64,1)}.hsk-voice-control--attach:is(:hover,:active) .hsk-img-sun{transform:translate(1px,-1.5px) scale(1.25)}.hsk-voice-control--attach:is(:hover,:active) .hsk-img-ridge{transform:translateY(-1px);transition-delay:40ms}.hsk-mic-slash{stroke-dasharray:29;animation:hsk-slash-draw .3s cubic-bezier(.65,0,.35,1) both}@keyframes hsk-slash-draw{0%{stroke-dashoffset:29}to{stroke-dashoffset:0}}.hsk-voice-control[data-control=mic].hsk-voice-control--muted .hsk-voice-control-icon{animation:hsk-icon-pop .38s cubic-bezier(.34,1.56,.64,1)}@keyframes hsk-icon-pop{0%{transform:scale(.82)}to{transform:scale(1)}}.hsk-voice-exit svg{transition:transform .32s cubic-bezier(.34,1.56,.64,1)}.hsk-voice-exit:hover svg{transform:rotate(90deg)}.hsk-snd-wave{transform-box:fill-box;transform-origin:left center}.hsk-cb-sound-pill:hover .hsk-snd-wave{animation:hsk-wave-ripple .9s ease-out infinite;animation-delay:calc(var(--hsk-wave, 0) * .14s)}.hsk-mimi-dot{transform-box:fill-box;transform-origin:center;opacity:.7}.hsk-cb-sound-pill:hover .hsk-mimi-dot,.hsk-cb-toolsheet-item:hover .hsk-mimi-dot{animation:hsk-mimi-typing .9s ease-in-out infinite;animation-delay:calc(var(--hsk-dot, 0) * .13s)}@keyframes hsk-mimi-typing{0%,60%,to{transform:translateY(0);opacity:.55}30%{transform:translateY(-1.8px);opacity:1}}@keyframes hsk-wave-ripple{0%{opacity:.25;transform:scale(.7)}45%{opacity:1;transform:scale(1.05)}to{opacity:.25;transform:scale(1)}}.hsk-snd-x{stroke-dasharray:8;animation:hsk-snd-x-draw .26s ease-out both}.hsk-snd-x+.hsk-snd-x{animation-delay:70ms}@keyframes hsk-snd-x-draw{0%{stroke-dashoffset:8}to{stroke-dashoffset:0}}@keyframes hsk-apple-siri-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes hsk-apple-siri-mic-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.08)}}.hsk-voice-control--muted:before,.hsk-voice-control--muted:after{display:none}@media(prefers-reduced-motion:reduce){.hsk-voice-control:not(:hover):not(.hsk-voice-control--muted) .hsk-voice-control-icon,.hsk-voice-control:hover:before,.hsk-voice-control--muted:before,.hsk-voice-control--muted:after{animation:none}.hsk-voice-control:hover,.hsk-voice-control:hover .hsk-mic-cap{transform:none}.hsk-voice-control--attach:hover .hsk-img-sun,.hsk-voice-control--attach:hover .hsk-img-ridge,.hsk-voice-exit:hover svg{transform:none}.hsk-mic-slash,.hsk-snd-x,.hsk-cb-sound-pill:hover .hsk-snd-wave,.hsk-cb-sound-pill:hover .hsk-mimi-dot,.hsk-cb-toolsheet-item:hover .hsk-mimi-dot,.hsk-voice-controls .hsk-voice-control-icon{animation:none}}.hsk-cb-voice-error{animation:hsk-error-shake .26s cubic-bezier(.36,.07,.19,.97) both}@keyframes hsk-error-shake{0%,to{transform:translate(0)}22%{transform:translate(-3px)}55%{transform:translate(2px)}80%{transform:translate(-1px)}}@media(prefers-reduced-motion:reduce){.hsk-cb-voice-error{animation:none}}.hsk-sun-rays,.hsk-sun-core,.hsk-moon-body,.hsk-wood-layer,.hsk-heart-body,.hsk-steam,.hsk-star-spark,.hsk-check-mark,.hsk-send-tail,.hsk-send-body{transform-box:fill-box;transform-origin:center}.hsk-sun-rays{transform-origin:12px 12px;transition:transform .5s cubic-bezier(.22,1,.36,1)}.hsk-cb-theme-grid-item:hover .hsk-sun-rays,.hsk-cb-theme-squircle-trigger:hover .hsk-sun-rays{transform:rotate(45deg)}.hsk-sun-core{transition:transform .32s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-theme-grid-item:hover .hsk-sun-core,.hsk-cb-theme-squircle-trigger:hover .hsk-sun-core{transform:scale(1.14)}.hsk-moon-body{transition:transform .34s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-theme-grid-item:hover .hsk-moon-body,.hsk-cb-theme-squircle-trigger:hover .hsk-moon-body{transform:rotate(-16deg)}.hsk-wood-layer{transition:transform .34s cubic-bezier(.34,1.56,.64,1)}.hsk-wood-layer{transition-delay:calc(var(--hsk-layer, 0) * 45ms)}.hsk-cb-theme-grid-item:hover .hsk-wood-layer,.hsk-cb-theme-squircle-trigger:hover .hsk-wood-layer{transform:translateY(-1.2px)}.hsk-cb-theme-grid-item:hover .hsk-heart-body,.hsk-cb-theme-squircle-trigger:hover .hsk-heart-body{animation:hsk-heartbeat 1.1s ease-in-out infinite}@keyframes hsk-heartbeat{0%,to{transform:scale(1)}14%{transform:scale(1.18)}28%{transform:scale(1)}42%{transform:scale(1.12)}56%{transform:scale(1)}}.hsk-steam{opacity:.9}.hsk-cb-theme-grid-item:hover .hsk-steam,.hsk-cb-theme-squircle-trigger:hover .hsk-steam{animation:hsk-steam-rise 1.6s ease-out infinite;animation-delay:calc(var(--hsk-steam, 0) * .22s)}@keyframes hsk-steam-rise{0%{transform:translateY(2px) scaleY(.5);opacity:0}35%{opacity:.95}to{transform:translateY(-3px) scaleY(1.15);opacity:0}}.hsk-cb-theme-grid-item:hover .hsk-star-spark,.hsk-cb-theme-squircle-trigger:hover .hsk-star-spark{animation:hsk-twinkle 1.4s ease-in-out infinite}@keyframes hsk-twinkle{0%,to{transform:scale(1) rotate(0);opacity:.85}50%{transform:scale(1.45) rotate(20deg);opacity:1}}.hsk-check-mark{stroke-dasharray:30;stroke-dashoffset:30;animation:hsk-check-draw .42s cubic-bezier(.65,0,.35,1) forwards}@keyframes hsk-check-draw{to{stroke-dashoffset:0}}@media(prefers-reduced-motion:reduce){.hsk-sun-rays,.hsk-sun-core,.hsk-moon-body,.hsk-wood-layer,.hsk-send-body,.hsk-send-tail{transition:none;transform:none!important}.hsk-cb-theme-grid-item:hover .hsk-heart-body,.hsk-cb-theme-squircle-trigger:hover .hsk-heart-body,.hsk-cb-theme-grid-item:hover .hsk-steam,.hsk-cb-theme-squircle-trigger:hover .hsk-steam,.hsk-cb-theme-grid-item:hover .hsk-star-spark,.hsk-cb-theme-squircle-trigger:hover .hsk-star-spark{animation:none}.hsk-check-mark{animation:none;stroke-dashoffset:0}}.hsk-cb-send-stage{position:relative;display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;overflow:visible}.hsk-cb-send-seam{position:absolute;top:50%;left:50%;width:2px;height:15px;border-radius:2px;background:currentColor;transform:translate(-50%,-50%) rotate(38deg) scaleY(0);transform-origin:center;opacity:0;pointer-events:none}.hsk-cb-send-kite{display:inline-flex;transform-origin:center;will-change:transform}.hsk-cb-send:hover:not(:disabled) .hsk-cb-send-kite{transform:translate(1.5px,-1.5px);transition:transform .26s cubic-bezier(.22,1,.36,1)}.hsk-cb-send.is-launching .hsk-cb-send-kite{animation:hsk-kite-tear .55s cubic-bezier(.22,1,.36,1) both}.hsk-cb-send.is-launching .hsk-cb-send-seam{animation:hsk-seam-heal .55s cubic-bezier(.4,0,.3,1) both}@keyframes hsk-kite-tear{0%{transform:translate(0) scale(1) rotate(0);opacity:1}18%{transform:translate(-1px,2.5px) scale(.92,1.08) rotate(-4deg);opacity:1}45%{transform:translate(3px,-16px) scale(1.2,.8) rotate(6deg);opacity:.95}75%{transform:translate(6px,-38px) scale(1.05,.7) rotate(10deg);opacity:.6}to{transform:translate(8px,-56px) scale(.6,.4) rotate(12deg);opacity:0}}@keyframes hsk-seam-heal{0%{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}22%{transform:translate(-50%,-50%) rotate(38deg) scaleY(1);opacity:.9}45%{transform:translate(-50%,-50%) rotate(38deg) scaleY(1.3);opacity:.8}72%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.3);opacity:.35}to{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}}.hsk-kite-wing{transform-box:fill-box;transform-origin:100% 0}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-kite-wing--far{animation:hsk-wing-beat-far .62s ease-in-out infinite}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-kite-wing--near{animation:hsk-wing-beat-near .62s ease-in-out .07s infinite}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-kite{animation:hsk-kite-strain 2.4s cubic-bezier(.45,0,.35,1) infinite}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-seam{animation:hsk-seam-strain 2.4s cubic-bezier(.45,0,.35,1) infinite}@keyframes hsk-kite-strain{0%,10%{transform:translate(0) scale(1) rotate(0)}20%{transform:translate(-1.2px,2px) scale(.94,1.05) rotate(-4deg)}34%{transform:translate(3.5px,-5px) scale(1.16,.86) rotate(8deg)}42%{transform:translate(4.2px,-6px) scale(1.2,.82) rotate(9deg)}50%{transform:translate(2.4px,-3.4px) scale(1.06,.94) rotate(5deg)}64%{transform:translate(-.6px,1.2px) scale(.97,1.03) rotate(-2deg)}78%,to{transform:translate(0) scale(1) rotate(0)}}@keyframes hsk-seam-strain{0%,22%{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}34%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.6);opacity:.34}42%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.95);opacity:.5}52%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.55);opacity:.3}66%,to{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}}@keyframes hsk-wing-beat-far{0%,to{transform:scaleX(1) skewY(0)}50%{transform:scaleX(.86) skewY(-4deg)}}@keyframes hsk-wing-beat-near{0%,to{transform:scaleX(1) skewY(0)}50%{transform:scaleX(1.1) skewY(3deg)}}.hsk-stop-ring{transform-box:fill-box;transform-origin:center;stroke-dasharray:22 38;opacity:.85;animation:hsk-stop-orbit 1.4s linear infinite}.hsk-stop-core{transform-box:fill-box;transform-origin:center;animation:hsk-stop-pulse 1.4s ease-in-out infinite;transition:rx .2s ease,transform .2s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-send--stop:hover .hsk-stop-core{transform:scale(1.16);animation-play-state:paused}.hsk-cb-send--stop:hover .hsk-stop-ring{animation-duration:.7s}@keyframes hsk-stop-orbit{to{transform:rotate(1turn)}}@keyframes hsk-stop-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(.86);opacity:.75}}@media(prefers-reduced-motion:reduce){.hsk-cb-send.is-launching .hsk-cb-send-kite,.hsk-cb-send.is-launching .hsk-cb-send-seam,.hsk-cb-send:hover:not(:disabled) .hsk-cb-send-kite{animation:none;transform:none}}.hsk-cb-send.is-launching{overflow:visible!important}.hsk-cb-send-sheath{position:absolute;inset:-1px;background:radial-gradient(120% 90% at 32% 22%,#ffffff70,#fff0 58%),linear-gradient(150deg,color-mix(in srgb,var(--hsk-primary, #1273e6) 72%,#ffffff) 0%,var(--hsk-primary, #1273e6) 46%,color-mix(in srgb,var(--hsk-primary, #1273e6) 74%,#000000) 100%);border-radius:46% 54% 52% 48%/50% 47% 53% 50%;box-shadow:inset 0 2px 3px #ffffff80,inset 0 -3px 5px color-mix(in srgb,var(--hsk-primary, #1273e6) 30%,rgba(0,0,0,.55)),0 2px 5px #0003,0 7px 16px color-mix(in srgb,var(--hsk-primary, #1273e6) 16%,transparent);transform-origin:58% 62%;pointer-events:none;z-index:1;will-change:transform,border-radius;transition:border-radius .5s cubic-bezier(.34,1.6,.5,1),box-shadow .3s ease}.hsk-cb-send-stage{z-index:2;position:relative}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-sheath{animation:hsk-sheath-press 2.4s cubic-bezier(.35,.8,.3,1) infinite}@keyframes hsk-sheath-press{0%,12%{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}22%{transform:scale(.94,1.08) translate(-1.4px,2.2px);border-radius:52% 48% 44% 56%/58% 40% 60% 42%}36%{transform:scale(1.14,.87) translate(2.6px,-3.4px) rotate(2deg);border-radius:38% 66% 54% 46%/40% 62% 38% 60%}46%{transform:scale(1.19,.83) translate(3.6px,-4.6px) rotate(2.8deg);border-radius:34% 72% 56% 44%/36% 68% 32% 64%}58%{transform:scale(.93,1.09) translate(-1.2px,1.8px) rotate(-1.4deg);border-radius:56% 44% 42% 58%/60% 38% 62% 40%}70%{transform:scale(1.05,.96) translate(.8px,-1px) rotate(.6deg);border-radius:44% 56% 50% 50%/46% 54%}80%{transform:scale(.98,1.03);border-radius:50% 50% 48% 52%/52% 48%}88%,to{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}}.hsk-cb-send.is-launching .hsk-cb-send-sheath{animation:hsk-sheath-yield .55s cubic-bezier(.3,.7,.25,1) both}@keyframes hsk-sheath-yield{0%{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}20%{transform:scale(.88,1.14) translate(-2px,3.4px);border-radius:56% 44% 40% 60%/64% 34% 66% 36%}45%{transform:scale(1.34,.68) translate(6px,-10px) rotate(4.6deg);border-radius:24% 86% 62% 38%/26% 80% 20% 74%}65%{transform:scale(.86,1.16) translate(-2.2px,3.6px) rotate(-2.2deg);border-radius:60% 40% 38% 62%/68% 30% 70% 32%}82%{transform:scale(1.06,.95) translate(1px,-1px) rotate(.8deg);border-radius:44% 56% 52% 48%/46% 54%}to{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}}.hsk-cb-send:disabled .hsk-cb-send-sheath{opacity:0}.hsk-cb-send--stop .hsk-cb-send-sheath{display:none}.hsk-cb-send:active:not(:disabled) .hsk-cb-send-sheath{box-shadow:inset 0 1px 2px #ffffff4d,inset 0 -1px 3px color-mix(in srgb,var(--hsk-primary, #1273e6) 24%,rgba(0,0,0,.6)),0 1px 3px #0000003d}@media(prefers-reduced-motion:reduce){.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-sheath,.hsk-cb-send.is-launching .hsk-cb-send-sheath{animation:none}}.hsk-cb-send:not(.hsk-cb-send--stop):not(:disabled){background:transparent!important;box-shadow:none!important;overflow:visible!important}.hsk-cb-send:not(.hsk-cb-send--stop):not(:disabled):hover{box-shadow:none!important}.hsk-cb-send:not(:disabled):hover .hsk-cb-send-sheath{box-shadow:inset 0 2px 4px #ffffff94,inset 0 -3px 6px color-mix(in srgb,var(--hsk-primary, #1273e6) 28%,rgba(0,0,0,.5)),0 3px 7px #00000038,0 10px 22px color-mix(in srgb,var(--hsk-primary, #1273e6) 20%,transparent)}.hsk-cb-terms-sanctuary{display:flex;flex-direction:column;margin:18px 0 22px;width:100%;max-width:520px;text-align:start;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;border:none;border-radius:0;padding:0;box-shadow:none;opacity:0;animation:hsk-terms-delicate-in .5s cubic-bezier(.16,1,.3,1) .05s forwards}@keyframes hsk-terms-delicate-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-terms-item{display:flex;flex-direction:column;gap:4px;opacity:0;animation:hsk-terms-item-in .45s cubic-bezier(.16,1,.3,1) forwards;animation-delay:calc(var(--hsk-row-idx, 0) * 60ms + 80ms)}@keyframes hsk-terms-item-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-terms-head{display:flex;align-items:baseline;gap:10px}.hsk-cb-terms-numeral{font-family:ui-serif,Georgia,Cambria,Times New Roman,Times,serif;font-style:italic;font-size:11px;font-weight:600;letter-spacing:.12em;color:var(--hsk-primary, #ff6a33);opacity:.85;flex-shrink:0;user-select:none}.hsk-cb-terms-title{margin:0;font-size:14.5px;font-weight:700;letter-spacing:-.015em;color:var(--hsk-chat-text, #ffffff)}.hsk-cb-terms-desc{margin:0;padding-inline-start:22px;font-size:13px;line-height:1.55;color:var(--hsk-chat-muted, #9ca3af);font-weight:400}.hsk-cb-terms-more{margin:0 0 4px;font-size:12.5px;color:var(--hsk-chat-muted, #9ca3af);text-align:start}.hsk-cb-terms-more a{color:var(--hsk-primary, #ff6a33);font-weight:600;text-decoration:none;unicode-bidi:isolate}.hsk-cb-terms-more a:hover{text-decoration:underline}.hsk-cb-terms-divider{height:1px;margin:14px 0;background:linear-gradient(90deg,transparent 0%,color-mix(in srgb,var(--hsk-chat-text, #000000) 8%,transparent) 20%,color-mix(in srgb,var(--hsk-chat-text, #000000) 8%,transparent) 80%,transparent 100%)}.hsk-cb-terms-action-wrap{display:flex;justify-content:center;width:100%;margin-top:14px}.hsk-cb-terms-agree-btn{display:inline-flex;align-items:center;justify-content:center;padding:12px 34px;font-size:14px;font-weight:600;border-radius:9999px;border:1px solid var(--hsk-chat-divide, rgba(255, 255, 255, .08));background:var(--hsk-chat-divide, rgba(255, 255, 255, .06));color:var(--hsk-chat-muted, rgba(255, 255, 255, .4));cursor:not-allowed;transition:all .3s cubic-bezier(.16,1,.3,1);letter-spacing:-.01em}.hsk-cb-terms-agree-btn.is-active{background:var(--hsk-primary, #ff6a33);color:#fff;border-color:var(--hsk-primary, #ff6a33);cursor:pointer;box-shadow:0 4px 14px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)}.hsk-cb-terms-agree-btn.is-active:hover{filter:brightness(.92);transform:translateY(-1px);box-shadow:0 6px 18px color-mix(in srgb,var(--hsk-primary, #ff6a33) 45%,transparent)}.hsk-cb-terms-agree-btn.is-active:active{transform:translateY(0);box-shadow:0 2px 6px color-mix(in srgb,var(--hsk-primary, #ff6a33) 25%,transparent)}@keyframes hsk-theme-morph-in{0%{opacity:0;transform:scale(.92) translateY(4px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes hsk-theme-pill-in{0%{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}.hsk-cb-panel[dir=rtl] .hsk-cb-theme-2x2-grid{transform-origin:bottom right}@media(prefers-reduced-motion:reduce){.hsk-cb-theme-squircle-trigger{animation:none}}@keyframes hsk-theme-morph-out{0%{opacity:1;transform:scale(1) translateY(0)}to{opacity:0;transform:scale(.92) translateY(4px)}}.hsk-retry-icon{display:inline-flex;transform-origin:center;transition:transform .36s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action:hover:not(:disabled) .hsk-retry-icon{transform:rotate(-180deg)}.hsk-cb-msg-action:active:not(:disabled) .hsk-retry-icon{transform:rotate(-360deg) scale(.85);transition-duration:.18s}.hsk-retry-icon--spinning{animation:hsk-spin .65s linear infinite!important}.hsk-edit-icon{display:inline-flex;transform-origin:20% 80%;transition:transform .26s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action:hover:not(:disabled) .hsk-edit-icon{transform:translateY(-1.5px) rotate(-14deg)}.hsk-cb-msg-action:active:not(:disabled) .hsk-edit-icon{transform:translateY(1px) scale(.88);transition-duration:.1s}.hsk-copy-icon{display:inline-flex}.hsk-copy-sheet{transition:transform .22s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action:hover:not(:disabled) .hsk-copy-sheet{transform:translate(-1.5px,-1.5px)}.hsk-check-icon{display:inline-flex;animation:hsk-check-pop .28s cubic-bezier(.34,1.56,.64,1) both}@keyframes hsk-check-pop{0%{transform:scale(.4);opacity:0}60%{transform:scale(1.24);opacity:1}to{transform:scale(1);opacity:1}}:root{--hsk-apple-bezier: cubic-bezier(.16, 1, .3, 1);--hsk-apple-exit-bezier: cubic-bezier(.4, 0, .2, 1)}@keyframes hsk-step1-exit-up{0%{opacity:1;transform:translateY(0) scale(1);filter:blur(0px)}to{opacity:0;transform:translateY(-46px) scale(.96);filter:blur(14px)}}.hsk-step1-exit{animation:hsk-step1-exit-up .32s cubic-bezier(.16,1,.3,1) forwards;pointer-events:none;will-change:transform,opacity,filter}@keyframes hsk-composer-exit-up{0%{opacity:1;transform:translateY(0);filter:blur(0px)}to{opacity:0;transform:translateY(-42px);filter:blur(12px)}}.hsk-composer-exit-up{animation:hsk-composer-exit-up .3s cubic-bezier(.16,1,.3,1) forwards;pointer-events:none;will-change:transform,opacity,filter}.hsk-lang-loader{display:flex;flex-direction:column;align-items:center;gap:28px;padding:16px 0;width:100%}.hsk-lang-loader--enter{animation:hsk-clay-in .16s steps(2,end) both}@keyframes hsk-clay-in{0%{opacity:0}to{opacity:1}}.hsk-clay{display:flex;flex-direction:column;align-items:center;gap:8px}.hsk-clay-table{display:block;width:240px;height:160px}.hsk-lang-preparing{font-size:13px;font-weight:500;letter-spacing:-.015em;color:var(--hsk-chat-muted, rgba(255, 255, 255, .44));text-align:center;margin:0;line-height:1.4}.hsk-lang-loader--enter .hsk-lang-preparing{animation:hsk-preparing-in .42s .4s cubic-bezier(.16,1,.3,1) both}.hsk-lang-loader--exit .hsk-lang-preparing{animation:hsk-preparing-out .12s cubic-bezier(.4,0,.2,1) forwards}@keyframes hsk-preparing-in{0%{opacity:0;transform:translateY(10px);filter:blur(8px)}to{opacity:1;transform:translateY(0);filter:blur(0px)}}@keyframes hsk-preparing-out{to{opacity:0;transform:translateY(4px);filter:blur(6px)}}.hsk-composer-reveal{animation:hsk-composer-in .48s cubic-bezier(.16,1,.3,1) both;will-change:transform,opacity,filter}@keyframes hsk-composer-in{0%{opacity:0;transform:translateY(36px);filter:blur(10px)}to{opacity:1;transform:translateY(0);filter:blur(0px)}}.hsk-step-enter{animation:hsk-step-enter-in .46s cubic-bezier(.16,1,.3,1) both;will-change:transform,opacity,filter}@keyframes hsk-step-enter-in{0%{opacity:0;transform:translateY(22px);filter:blur(12px)}to{opacity:1;transform:translateY(0);filter:blur(0px)}}@media(prefers-reduced-motion:reduce){.hsk-step1-exit,.hsk-composer-exit-up,.hsk-lang-loader--enter,.hsk-lang-loader--exit,.hsk-composer-reveal,.hsk-step-enter{animation:none!important}}';var li="akropolys-kiku-root",wr=null,nn=null,hi=!1;function pi(e){if(hi)return;if(hi=!0,typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype)try{let t=new CSSStyleSheet;t.replaceSync(bo),e.adoptedStyleSheets=[t];return}catch{}let r=document.createElement("style");r.textContent=bo,e.appendChild(r)}function fo(){return typeof document>"u"?null:nn?(pi(nn),nn):(wr=document.getElementById(li),wr||(wr=document.createElement("div"),wr.id=li,wr.style.cssText="all: initial;",document.body.appendChild(wr)),nn=wr.shadowRoot??wr.attachShadow({mode:"open"}),pi(nn),nn)}import{useAkropolysContext as Pm}from"@akropolys/sdk";function ua(e){if(typeof e=="string")return{themeAttr:e,vars:void 0};if(!e)return{themeAttr:void 0,vars:void 0};let r={};return e.primaryColor&&(r["--hsk-primary"]=e.primaryColor,r["--hsk-selection-bg"]=e.primaryColor),e.backgroundColor&&(r["--hsk-bg"]=e.backgroundColor,r["--hsk-chat-bg"]=e.backgroundColor),e.textColor&&(r["--hsk-text"]=e.textColor,r["--hsk-chat-text"]=e.textColor),e.fontFamily&&(r["--hsk-font"]=e.fontFamily),e.fontSize&&(r["--hsk-font-size"]=e.fontSize),e.mobileFontSize&&(r["--hsk-mobile-font-size"]=e.mobileFontSize),e.borderRadius&&(r["--hsk-border-radius"]=e.borderRadius),{themeAttr:void 0,vars:r}}import{useEffect as ui}from"react";var Wt=new Map;function ko(e,r="hsk-font"){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)>>>0;return`${r}-${t.toString(36)}`}function xp(e){let r=e.split("?")[0].split("#")[0].split(".").pop()?.toLowerCase();return r==="woff2"?"woff2":r==="woff"?"woff":r==="otf"?"opentype":r==="ttf"?"truetype":""}function go(e){let r=e.trim();return!r||/["'()\\\s]/.test(r)||/^(javascript|vbscript):/i.test(r)?null:r}var mi=e=>/["\\{}<>;\n\r]/.test(e)?"":e.trim(),vp=/^[Uu]\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?$/,di=e=>{let r=e.split(",").map(t=>t.trim()).filter(Boolean);return r.length===0||!r.every(t=>vp.test(t))?"":r.join(", ")},bi=e=>/^\d{3}( \d{3})?$/.test(e)?e:"400";function yp(e,r){ui(()=>{if(!e||!r||typeof document>"u")return;let t=ko(e);if(Wt.set(e,(Wt.get(e)??0)+1),!document.getElementById(t)){let n=document.createElement("style");n.id=t,n.textContent=r,document.head.appendChild(n)}return()=>{let n=(Wt.get(e)??1)-1;if(n>0){Wt.set(e,n);return}Wt.delete(e),document.getElementById(t)?.remove()}},[e,r])}function fi(e){let r=mi(e.family);return r?e.faces.map(t=>{let n=go(t.url);return n?`@font-face{font-family:"${r}";font-style:normal;font-weight:${bi(t.weight)};font-display:swap;src:url(${n}) format("woff2");`+(di(t.unicodeRange)?`unicode-range:${di(t.unicodeRange)};`:"")+"}":""}).join(""):""}function xo(e){let r=e?.faces??[],t=e&&r.length?fi(e):"";yp(t?`script|${e.family}|${r.map(n=>n.url).join("|")}`:"",t)}async function Vt(e,r=0){if(typeof document>"u"||!("fonts"in document))return;let t=fi(e);if(!t)return;let n=`script|${e.family}|${e.faces.map(o=>o.url).join("|")}`;Wt.set(n,(Wt.get(n)??0)+1);let a=ko(n);if(!document.getElementById(a)){let o=document.createElement("style");o.id=a,o.textContent=t,document.head.appendChild(o)}if(r>0){let o=document.fonts,i=e.family.replace(/^['"]|['"]$/g,""),c=Array.from(o||[]).filter(l=>l.family.replace(/^['"]|['"]$/g,"")===i),s=c.length>0?c.map(l=>l.load().catch(()=>{})):e.faces.map(l=>{let h=go(l.url);if(!h)return Promise.resolve();try{return new window.FontFace(i,`url(${h})`,{weight:bi(l.weight),style:"normal"}).load().then(d=>{document.fonts?.add(d)}).catch(()=>{})}catch{return Promise.resolve()}});await Promise.race([Promise.all(s),new Promise(l=>setTimeout(l,r))])}}var ki=["400","500","600","700"];function gi(e,r){let t=Array.from(new Set(Array.from(Object.values(r).join("")))).join(""),n=e.map(a=>`"${a.replace(/^['"]|['"]$/g,"")}"`).join(", ");return{text:t,stack:n}}function vo(e,r){let t=typeof document<"u"?document.fonts:null,{text:n,stack:a}=gi(e,r);if(!t?.check||!n||!a)return!0;try{return ki.every(o=>t.check(`${o} 16px ${a}`,n))}catch{return!0}}async function yo(e,r,t){let n=typeof document<"u"?document.fonts:null;if(!n?.load)return;let{text:a,stack:o}=gi(e,r);!a||!o||await Promise.race([Promise.all(ki.map(i=>n.load(`${i} 16px ${o}`,a).catch(()=>{}))),new Promise(i=>setTimeout(i,t))])}function ma(e){let r=typeof e=="object"&&e?e:void 0,t=mi(r?.fontFamily?.split(",")[0].trim().replace(/^['"]|['"]$/g,"")??""),n=typeof r?.fontUrl=="string"?{normal:r.fontUrl}:r?.fontUrl??{},a=n.normal??"",o=n.bold??"",i=n.variable??"";ui(()=>{if(!t||!a&&!o&&!i)return;let c=i?[["100 900",i]]:[["400",a],["700",o]],s=[];for(let[d,u]of c){if(!u)continue;let f=go(u);if(!f)continue;let C=xp(f);s.push(`@font-face{font-family:"${t}";font-style:normal;font-weight:${d};font-display:swap;src:url(${f})${C?` format("${C}")`:""};}`)}if(s.length===0)return;let l=s.join(""),h=`${t}|${a}|${o}|${i}`,p=ko(h,"hsk-host-font");if(Wt.set(h,(Wt.get(h)??0)+1),!document.getElementById(p)){let d=document.createElement("style");d.id=p,d.textContent=l,document.head.appendChild(d)}return()=>{let d=(Wt.get(h)??1)-1;if(d>0){Wt.set(h,d);return}Wt.delete(h),document.getElementById(p)?.remove()}},[t,a,o,i])}var xi=new WeakMap,vi=new WeakMap;function yi(e){return e?vi.get(e)??null:null}function wo(e){if(!e)return Promise.resolve(null);let r=xi.get(e);if(r)return r;let t=Promise.resolve().then(()=>e.baseFont?.()??null).then(n=>(n&&(vi.set(e,n),Vt(n,0).catch(()=>{})),n)).catch(()=>null);return xi.set(e,t),t}function wi(e,r,t){e&&(wo(e),r&&Co(e,r,t))}function Co(e,r,t){if(!(!e||!r))try{e.getUIStrings?.(r,t)?.then?.(n=>{n?.font&&Vt(n.font,1200).catch(()=>{})})?.catch?.(()=>{})}catch{}}import Ti from"react";var An=[],fa=[{value:"English",native:"English",tag:"en",rtl:!1},{value:"Chinese",native:"\u4E2D\u6587",tag:"zh",rtl:!1},{value:"Spanish",native:"Espa\xF1ol",tag:"es",rtl:!1},{value:"Arabic",native:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",tag:"ar",rtl:!0},{value:"Hindi",native:"\u0939\u093F\u0928\u094D\u0926\u0940",tag:"hi",rtl:!1},{value:"French",native:"Fran\xE7ais",tag:"fr",rtl:!1},{value:"Swahili",native:"Kiswahili",tag:"sw",rtl:!1},{value:"Portuguese",native:"Portugu\xEAs",tag:"pt",rtl:!1},{value:"Japanese",native:"\u65E5\u672C\u8A9E",tag:"ja",rtl:!1},{value:"Urdu",native:"\u0627\u0631\u062F\u0648",tag:"ur",rtl:!0}];function In(e,r){if(!e)return;let t=e.trim();if(!t)return;let n=t.toLowerCase(),a=fa.find(c=>c.value.toLowerCase()===n||c.native.toLowerCase()===n||c.tag===n);if(a)return a.native;if(ba[n]?.endonym)return ba[n].endonym;let o=Object.values(ba).find(c=>c.endonym?.toLowerCase()===n);if(o?.endonym)return o.endonym;let i=r||(n.length<=3?n:void 0);if(i&&typeof Intl<"u"&&Intl.DisplayNames)try{let s=new Intl.DisplayNames([i],{type:"language"}).of(i);if(s&&s.toLowerCase()!==i.toLowerCase())return s}catch{}return t}function Ci(e){for(let r of e){let t=r.codePointAt(0)??0;if(t>=1424&&t<=2303||t>=64285&&t<=65023||t>=65136&&t<=65279)return!0}return!1}var ba={english:{preparing:"Preparing in English\u2026",changeLang:"Change language",endonym:"English"},swahili:{preparing:"Inatayarisha kwa Kiswahili\u2026",changeLang:"Badilisha lugha",endonym:"Kiswahili"},french:{preparing:"Configuration en fran\xE7ais\u2026",changeLang:"Changer de langue",endonym:"Fran\xE7ais"},spanish:{preparing:"Configurando en espa\xF1ol\u2026",changeLang:"Cambiar idioma",endonym:"Espa\xF1ol"},arabic:{preparing:"\u062C\u0627\u0631\u064D \u0627\u0644\u0625\u0639\u062F\u0627\u062F \u0628\u0627\u0644\u0644\u063A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629\u2026",changeLang:"\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u0644\u063A\u0629",rtl:!0,endonym:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629"},portuguese:{preparing:"Configurando em portugu\xEAs\u2026",changeLang:"Alterar idioma",endonym:"Portugu\xEAs"},hindi:{preparing:"\u0939\u093F\u0928\u094D\u0926\u0940 \u092E\u0947\u0902 \u0924\u0948\u092F\u093E\u0930 \u0915\u093F\u092F\u093E \u091C\u093E \u0930\u0939\u093E \u0939\u0948\u2026",changeLang:"\u092D\u093E\u0937\u093E \u092C\u0926\u0932\u0947\u0902",endonym:"\u0939\u093F\u0928\u094D\u0926\u0940"},chinese:{preparing:"\u6B63\u5728\u51C6\u5907\u4E2D\u6587\u73AF\u5883\u2026",changeLang:"\u66F4\u6539\u8BED\u8A00",endonym:"\u4E2D\u6587"},urdu:{preparing:"\u0627\u0631\u062F\u0648 \u0645\u06CC\u06BA \u062A\u06CC\u0627\u0631\u06CC \u062C\u0627\u0631\u06CC \u06C1\u06D2\u2026",changeLang:"\u0632\u0628\u0627\u0646 \u062A\u0628\u062F\u06CC\u0644 \u06A9\u0631\u06CC\u06BA",rtl:!0,endonym:"\u0627\u0631\u062F\u0648"},japanese:{preparing:"\u65E5\u672C\u8A9E\u3092\u8A2D\u5B9A\u4E2D\u2026",changeLang:"\u8A00\u8A9E\u3092\u5909\u66F4",endonym:"\u65E5\u672C\u8A9E"},german:{preparing:"Wird auf Deutsch eingerichtet\u2026",changeLang:"Sprache \xE4ndern",endonym:"Deutsch"},italian:{preparing:"Configurazione in italiano\u2026",changeLang:"Cambia lingua",endonym:"Italiano"},russian:{preparing:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u043D\u0430 \u0440\u0443\u0441\u0441\u043A\u043E\u043C\u2026",changeLang:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u044F\u0437\u044B\u043A",endonym:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"},korean:{preparing:"\uD55C\uAD6D\uC5B4\uB85C \uC124\uC815 \uC911\u2026",changeLang:"\uC5B8\uC5B4 \uBCC0\uACBD",endonym:"\uD55C\uAD6D\uC5B4"},turkish:{preparing:"T\xFCrk\xE7e olarak haz\u0131rlan\u0131yor\u2026",changeLang:"Dili de\u011Fi\u015Ftir",endonym:"T\xFCrk\xE7e"},vietnamese:{preparing:"\u0110ang thi\u1EBFt l\u1EADp b\u1EB1ng Ti\u1EBFng Vi\u1EC7t\u2026",changeLang:"\u0110\u1ED5i ng\xF4n ng\u1EEF",endonym:"Ti\u1EBFng Vi\u1EC7t"},indonesian:{preparing:"Menyiapkan dalam Bahasa Indonesia\u2026",changeLang:"Ubah bahasa",endonym:"Bahasa Indonesia"},malay:{preparing:"Menyediakan dalam Bahasa Melayu\u2026",changeLang:"Tukar bahasa",endonym:"Bahasa Melayu"},bahasa:{preparing:"Menyediakan dalam Bahasa Melayu\u2026",changeLang:"Tukar bahasa",endonym:"Bahasa Melayu"},polish:{preparing:"Przygotowywanie w j\u0119zyku polskim\u2026",changeLang:"Zmie\u0144 j\u0119zyk",endonym:"Polski"},dutch:{preparing:"Instellen in het Nederlands\u2026",changeLang:"Taal wijzigen",endonym:"Nederlands"},thai:{preparing:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22\u2026",changeLang:"\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E20\u0E32\u0E29\u0E32",endonym:"\u0E44\u0E17\u0E22"},bengali:{preparing:"\u09AC\u09BE\u0982\u09B2\u09BE\u09AF\u09BC \u09AA\u09CD\u09B0\u09B8\u09CD\u09A4\u09C1\u09A4 \u0995\u09B0\u09BE \u09B9\u099A\u09CD\u099B\u09C7\u2026",changeLang:"\u09AD\u09BE\u09B7\u09BE \u09AA\u09B0\u09BF\u09AC\u09B0\u09CD\u09A4\u09A8 \u0995\u09B0\u09C1\u09A8",endonym:"\u09AC\u09BE\u0982\u09B2\u09BE"},tamil:{preparing:"\u0BA4\u0BAE\u0BBF\u0BB4\u0BBF\u0BB2\u0BCD \u0BA4\u0BAF\u0BBE\u0BB0\u0BCD \u0B9A\u0BC6\u0BAF\u0BCD\u0BAF\u0BAA\u0BCD\u0BAA\u0B9F\u0BC1\u0B95\u0BBF\u0BB1\u0BA4\u0BC1\u2026",changeLang:"\u0BAE\u0BCA\u0BB4\u0BBF\u0BAF\u0BC8 \u0BAE\u0BBE\u0BB1\u0BCD\u0BB1\u0BB5\u0BC1\u0BAE\u0BCD",endonym:"\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD"},telugu:{preparing:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41\u0C32\u0C4B \u0C38\u0C3F\u0C26\u0C4D\u0C27\u0C02 \u0C1A\u0C47\u0C38\u0C4D\u0C24\u0C4B\u0C02\u0C26\u0C3F\u2026",changeLang:"\u0C2D\u0C3E\u0C37\u0C28\u0C41 \u0C2E\u0C3E\u0C30\u0C4D\u0C1A\u0C02\u0C21\u0C3F",endonym:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41"},persian:{preparing:"\u062F\u0631 \u062D\u0627\u0644 \u0622\u0645\u0627\u062F\u0647\u200C\u0633\u0627\u0632\u06CC \u0628\u0647 \u0632\u0628\u0627\u0646 \u0641\u0627\u0631\u0633\u06CC\u2026",changeLang:"\u062A\u063A\u06CC\u06CC\u0631 \u0632\u0628\u0627\u0646",rtl:!0,endonym:"\u0641\u0627\u0631\u0633\u06CC"},farsi:{preparing:"\u062F\u0631 \u062D\u0627\u0644 \u0622\u0645\u0627\u062F\u0647\u200C\u0633\u0627\u0632\u06CC \u0628\u0647 \u0632\u0628\u0627\u0646 \u0641\u0627\u0631\u0633\u06CC\u2026",changeLang:"\u062A\u063A\u06CC\u06CC\u0631 \u0632\u0628\u0627\u0646",rtl:!0,endonym:"\u0641\u0627\u0631\u0633\u06CC"},greek:{preparing:"\u03A1\u03CD\u03B8\u03BC\u03B9\u03C3\u03B7 \u03C3\u03C4\u03B1 \u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC\u2026",changeLang:"\u0391\u03BB\u03BB\u03B1\u03B3\u03AE \u03B3\u03BB\u03CE\u03C3\u03C3\u03B1\u03C2",endonym:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC"},hebrew:{preparing:"\u05DE\u05D2\u05D3\u05D9\u05E8 \u05D1\u05E2\u05D1\u05E8\u05D9\u05EA\u2026",changeLang:"\u05E9\u05E0\u05D4 \u05E9\u05E4\u05D4",rtl:!0,endonym:"\u05E2\u05D1\u05E8\u05D9\u05EA"},burmese:{preparing:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C\u1016\u103C\u1004\u1037\u103A \u1015\u103C\u1004\u103A\u1006\u1004\u103A\u1014\u1031\u101E\u100A\u103A\u2026",changeLang:"\u1018\u102C\u101E\u102C\u1005\u1000\u102C\u1038\u1015\u103C\u1031\u102C\u1004\u103A\u1038\u101B\u1014\u103A",endonym:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C"},burma:{preparing:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C\u1016\u103C\u1004\u1037\u103A \u1015\u103C\u1004\u103A\u1006\u1004\u103A\u1014\u1031\u101E\u100A\u103A\u2026",changeLang:"\u1018\u102C\u101E\u102C\u1005\u1000\u102C\u1038\u1015\u103C\u1031\u102C\u1004\u103A\u1038\u101B\u1014\u103A",endonym:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C"},myanmar:{preparing:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C\u1016\u103C\u1004\u1037\u103A \u1015\u103C\u1004\u103A\u1006\u1004\u103A\u1014\u1031\u101E\u100A\u103A\u2026",changeLang:"\u1018\u102C\u101E\u102C\u1005\u1000\u102C\u1038\u1015\u103C\u1031\u102C\u1004\u103A\u1038\u101B\u1014\u103A",endonym:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C"},khmer:{preparing:"\u1780\u17C6\u1796\u17BB\u1784\u179A\u17C0\u1794\u1785\u17C6\u1787\u17B6\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A\u2026",changeLang:"\u1794\u17D2\u178F\u17BC\u179A\u1797\u17B6\u179F\u17B6",endonym:"\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A"},cambodian:{preparing:"\u1780\u17C6\u1796\u17BB\u1784\u179A\u17C0\u1794\u1785\u17C6\u1787\u17B6\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A\u2026",changeLang:"\u1794\u17D2\u178F\u17BC\u179A\u1797\u17B6\u179F\u17B6",endonym:"\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A"},swedish:{preparing:"St\xE4ller in p\xE5 svenska\u2026",changeLang:"Byt spr\xE5k",endonym:"Svenska"},svenska:{preparing:"St\xE4ller in p\xE5 svenska\u2026",changeLang:"Byt spr\xE5k",endonym:"Svenska"},sv:{preparing:"St\xE4ller in p\xE5 svenska\u2026",changeLang:"Byt spr\xE5k",endonym:"Svenska"},kikuyu:{preparing:"G\u0129k\u0169y\u0169 g\u0129g\u0129thondekwo\u2026",changeLang:"Cenjia r\u0169thiomi",endonym:"G\u0129k\u0169y\u0169"},gikuyu:{preparing:"G\u0129k\u0169y\u0169 g\u0129g\u0129thondekwo\u2026",changeLang:"Cenjia r\u0169thiomi",endonym:"G\u0129k\u0169y\u0169"},akan:{preparing:"Y\u025Bresiesie w\u0254 Akan mu\u2026",changeLang:"Sesa kasa",endonym:"Akan"},twi:{preparing:"Y\u025Bresiesie w\u0254 Twi mu\u2026",changeLang:"Sesa kasa",endonym:"Twi"},yoruba:{preparing:"Ngbaradi ni \xC8d\xE8 Yor\xF9b\xE1\u2026",changeLang:"Yi ede pada",endonym:"\xC8d\xE8 Yor\xF9b\xE1"},amharic:{preparing:"\u1260\u12A0\u121B\u122D\u129B \u1260\u1218\u12D8\u130B\u1300\u1275 \u120B\u12ED\u2026",changeLang:"\u124B\u1295\u124B \u1240\u12ED\u122D",endonym:"\u12A0\u121B\u122D\u129B"},somali:{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},soomaali:{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},"af-soomaali":{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},so:{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},hausa:{preparing:"Shirya cikin Hausa\u2026",changeLang:"Canja harshe",endonym:"Hausa"},zulu:{preparing:"Ilungiselela ngesiZulu\u2026",changeLang:"Shintsha ulimi",endonym:"isiZulu"},oromo:{preparing:"Afaan Oromootiin qophaa'aa jira\u2026",changeLang:"Afaan jijjiiri",endonym:"Afaan Oromoo"},luganda:{preparing:"Tuteekateeka mu Oluganda\u2026",changeLang:"Kyusa olulimi",endonym:"Oluganda"},igbo:{preparing:"Na-akwadebe na As\u1EE5s\u1EE5 Igbo\u2026",changeLang:"Gbanwee as\u1EE5s\u1EE5",endonym:"As\u1EE5s\u1EE5 Igbo"},xhosa:{preparing:"Ilungiselela ngesiXhosa\u2026",changeLang:"Tshintsha ulwimi",endonym:"isiXhosa"},kinyarwanda:{preparing:"Guteza imbere mu Kinyarwanda\u2026",changeLang:"Hindura ururimi",endonym:"Ikinyarwanda"},lingala:{preparing:"Kozala na Ling\xE1la\u2026",changeLang:"Bongola lok\xF3t\xE1",endonym:"Ling\xE1la"},shona:{preparing:"Kugadzirira mu chiShona\u2026",changeLang:"Chinja mutauro",endonym:"chiShona"},tigrinya:{preparing:"\u1265\u1275\u130D\u122D\u129B \u12A3\u1265 \u121D\u12F5\u120B\u12CD \u12ED\u122D\u12A8\u1265\u2026",changeLang:"\u124B\u1295\u124B \u121D\u1255\u12EB\u122D",endonym:"\u1275\u130D\u122D\u129B"},wolof:{preparing:"Waajal ci Wolof\u2026",changeLang:"Soppi l\xE0kk",endonym:"Wolof"},afrikaans:{preparing:"Berei voor in Afrikaans\u2026",changeLang:"Verander taal",endonym:"Afrikaans"}};function Si(e){let r=e.trim();return r?r.charAt(0).toUpperCase()+r.slice(1):"\u2026"}function Ar(e){if(!e)return{nativeName:"\u2026",preparing:"Preparing\u2026",changeLang:"\u2190",rtl:!1,known:!0};let r=e.trim().toLowerCase(),t=Object.entries(ba).find(([i,c])=>i===r||c.endonym?.toLowerCase()===r||In(i)?.toLowerCase()===r);if(t)return{nativeName:t[1].endonym||In(e)||Si(e),preparing:t[1].preparing,changeLang:t[1].changeLang,rtl:!!t[1].rtl||Ci(t[1].preparing),known:!0};let n=In(e)||e,a=Si(n),o=Ci(a);return{nativeName:a,preparing:`Preparing in ${a}\u2026`,changeLang:o?"\u062A\u063A\u064A\u064A\u0631":"Change",rtl:o,known:!1}}var Pn=[{name:"Puck",trait:"Upbeat",gender:"male"},{name:"Charon",trait:"Informative",gender:"male"},{name:"Kore",trait:"Firm",gender:"female"},{name:"Aoede",trait:"Breezy",gender:"female"},{name:"Zephyr",trait:"Bright",gender:"female"},{name:"Fenrir",trait:"Excitable",gender:"male"},{name:"Leda",trait:"Youthful",gender:"female"},{name:"Orus",trait:"Firm",gender:"male"},{name:"Callirrhoe",trait:"Easy-going",gender:"female"},{name:"Autonoe",trait:"Bright",gender:"female"},{name:"Enceladus",trait:"Breathy",gender:"male"},{name:"Iapetus",trait:"Clear",gender:"male"},{name:"Umbriel",trait:"Easy-going",gender:"male"},{name:"Algieba",trait:"Smooth",gender:"male"},{name:"Despina",trait:"Smooth",gender:"female"},{name:"Erinome",trait:"Clear",gender:"female"},{name:"Algenib",trait:"Gravelly",gender:"male"},{name:"Rasalgethi",trait:"Informative",gender:"male"},{name:"Laomedeia",trait:"Upbeat",gender:"female"},{name:"Achernar",trait:"Soft",gender:"female"},{name:"Alnilam",trait:"Firm",gender:"male"},{name:"Schedar",trait:"Even",gender:"male"},{name:"Gacrux",trait:"Mature",gender:"female"},{name:"Pulcherrima",trait:"Forward",gender:"female"},{name:"Achird",trait:"Friendly",gender:"male"},{name:"Zubenelgenubi",trait:"Casual",gender:"male"},{name:"Vindemiatrix",trait:"Gentle",gender:"female"},{name:"Sadachbia",trait:"Lively",gender:"male"},{name:"Sadaltager",trait:"Knowledgeable",gender:"male"},{name:"Sulafat",trait:"Warm",gender:"female"}],So="hsk-live-voice",Cr={langPlaceholder:"Type your language\u2026",nameStepTitle:"Good to meet you.",nameStepAsk:"What should I call you?",namePlaceholder:"Type your name\u2026",howShouldResultsLook:"How do you want to see results?",entityLangIntro:"I will write to you in {lang}. Names stay as this website wrote them. For the other details, choose below.",asWritten:"Same as the website",inLanguage:"In {lang}",namesAsWritten:"Details stay exactly as the website wrote them.",detailsTranslated:"Details are translated. Numbers and links do not change.",entityLangPlaceholder:"Choose one, then press Continue\u2026",termsStepTitle:"Privacy and terms",termsStepSubtitle:"Please read how kiku works on this website.",termsPiiTitle:"Your contact details",termsPiiDesc:"kiku never asks for your email, phone number or real name. Any name or nickname is fine.",termsSessionTitle:"A random code",termsSessionDesc:"Your browser keeps a random code so kiku can remember your conversation. The code is not linked to your name.",termsMemoryTitle:"What is kept",termsMemoryDesc:"Chat messages aren't saved for analytics. Search-bar queries and usage counts help this website improve. If you ask to speak to its team, that support conversation is saved. Things you save with @kiku are kept at mimi.akropolys.cloud, and only your secret key opens them.",termsCookieTitle:"This website's own rules",termsCookieDesc:"This website may use cookies or collect more information. kiku does not control this.",termsAiTitle:"From this website, explained by AI",termsAiDesc:"kiku answers from what this website really lists. The facts are the website's own; how kiku summarises, compares or translates them is AI and may read them differently. Check anything that matters on the website itself.",termsAgreeButton:"I agree",termsAgreeCounting:"I agree ({seconds}s)",nameStepHint:"Any name or nickname is fine.",privacyMore:"Read our full terms at",continueButton:"Continue",termsPlaceholder:"Please read the notes above\u2026",allSet:"You are ready, {name}.",replyingOriginal:"I will write to you in {lang}. Results stay as this website wrote them. Ask me anything.",replyingTranslated:"I will write to you in {lang}. Results will be translated too. Ask me anything.",greetReturning:"Hello, {name}.",greetReturningLead:"What can I find for you today?",defaultPlaceholder:"Ask me anything\u2026"},Pt={themeHoldHint:"Long press for themes",themeClickHint:"Pick your mood",layoutFirstReplyNote:"Open the dock and try {button} to change the reply layout.",back:"Back",langPlaceholder:"Type your language\u2026",nameStepTitle:"Good to meet you.",nameStepAsk:"What should I call you?",namePlaceholder:"Type your name\u2026",attachImage:"Attach a photo",vizUnavailable:"The preview could not be loaded.",vizDisclaimerImage:"Generated using Artificial Intelligence \u2014 colours, size and placement may differ from the real product.",vizDisclaimerVideo:"Generated using Artificial Intelligence \u2014 colours, size and movement may differ from the real product.",calcDisclaimer:"This is a calculation from live figures, not a guarantee \u2014 the market can move against it.",staleTitle:"No longer available",staleRemoved:"{title} has been removed and is no longer on offer.",staleUnavailable:"{title} is currently unavailable.",keyPastePrompt:"Paste your public id \u2014 or create one",keyPastePlaceholder:"your public id\u2026",keyUseMine:"Use my id",keyCreating:"Creating\u2026",keyCreateNew:"I'm new \u2014 create one",keySecretTitle:"Your secret key \u2014 shown once",keyDismiss:"Dismiss",keyCopySecret:"Copy",keyCopied:"Copied",keySecretHint:"Keep it private. It unlocks your memory.",keyPublicTitle:"Your public id",keyCopyId:"Copy id",greetReturning:"Hello, {name}.",greetReturningLead:"What can I find for you today?",howShouldResultsLook:"How do you want to see results?",entityLangIntro:"I will write to you in {lang}. Names stay as this website wrote them. For the other details, choose below.",asWritten:"Same as the website",inLanguage:"In {lang}",namesAsWritten:"Details stay exactly as the website wrote them.",detailsTranslated:"Details are translated. Numbers and links do not change.",entityLangPlaceholder:"Choose one, then press Continue\u2026",termsStepTitle:"Privacy and terms",termsStepSubtitle:"Please read how kiku works on this website.",termsPiiTitle:"Your contact details",termsPiiDesc:"kiku never asks for your email, phone number or real name. Any name or nickname is fine.",termsSessionTitle:"A random code",termsSessionDesc:"Your browser keeps a random code so kiku can remember your conversation. The code is not linked to your name.",termsMemoryTitle:"What is kept",termsMemoryDesc:"Chat messages aren't saved for analytics. Search-bar queries and usage counts help this website improve. If you ask to speak to its team, that support conversation is saved. Things you save with @kiku are kept at mimi.akropolys.cloud, and only your secret key opens them.",termsCookieTitle:"This website's own rules",termsCookieDesc:"This website may use cookies or collect more information. kiku does not control this.",termsAiTitle:"From this website, explained by AI",termsAiDesc:"kiku answers from what this website really lists. The facts are the website's own; how kiku summarises, compares or translates them is AI and may read them differently. Check anything that matters on the website itself.",termsAgreeButton:"I agree",termsAgreeCounting:"I agree ({seconds}s)",nameStepHint:"Any name or nickname is fine.",privacyMore:"Read our full terms at",continueButton:"Continue",termsPlaceholder:"Please read the notes above\u2026",allSet:"You are ready, {name}.",replyingTranslated:"I will write to you in {lang}. Results will be translated too. Ask me anything.",replyingOriginal:"I will write to you in {lang}. Results stay as this website wrote them. Ask me anything.",defaultPlaceholder:"Ask me anything\u2026",voiceListening:"Listening\u2026 tap the mic to stop",voiceSending:"Got it \u2014 sending\u2026",voiceModeStart:"Hands-free conversation",voiceModeExit:"Leave hands-free",voicePhaseListening:"Listening",voicePhaseThinking:"Thinking",micDenied:"Microphone blocked. Allow mic access for this site, then try again.",micInsecure:"Voice needs a secure (https) connection.",micMissing:"No microphone found.",micLangUnsupported:"This browser cannot transcribe that language yet. Type instead.",micNetwork:"Couldn't reach voice. Try again in a moment.",voiceUnavailable:"Voice is unavailable right now. Try again in a moment.",voiceLimitReached:"You've used up today's voice time. It resets in a day \u2014 chat still works.",voiceSiteLimit:"Voice is out of allowance on this site for now. Chat still works.",voiceIdleEnded:"Voice closed after a quiet minute. Tap the mic to talk again.",voiceSessionEnded:"Voice session ended. Tap the mic to talk again.",voicePhotoFailed:"That photo couldn't be added. Try another one.",voiceAttachPhoto:"Attach a photo",voicePickerLabel:"Choose a voice",voiceFemale:"Female",voiceMale:"Male",voiceNewChat:"New voice chat",pillVoice:"{n} min voice",pillImages:"{n} images",pillVideos:"{n} videos",pillReplies:"{n} replies",micNoSpeech:"Didn't catch anything. Try again, a little closer to the mic.",micFailed:"Couldn't hear that. Try again.",clearChat:"Clear chat",thinking:"Thinking",thoughtForSeconds:"Thought for {duration}",thoughtProcess:"Thought process",reachingTeam:"Getting a person",passedToTeam:"Passed to a person",withTeam:"Sent to the team \xB7 a person will reply here",repliedIn:"Replied in {duration}",backWithKiku:"Kiku is back with you",teamClosed:"The team closed this conversation",teamJoined:"Another team member joined the conversation",leaveHumanWarning:"A person is replying here.",leaveHumanStay:"Wait",leaveHumanKeep:"Keep for later",leaveHumanConfirm:"End request",requestsTitle:"Your requests",requestWaiting:"Waiting for a person",requestHuman:"With a person",requestKiku:"Answered",requestClosed:"Closed",requestNewReply:"New reply",captureAndRemember:"kiku \u2014 capture & remember",captureCurrentPage:"Capture current page",captureAll:"Capture all ({count})",whatHaveYouSaved:"What have you saved?",deleteThis:"Delete this",errShopperReplyLimit:"You've reached this site's reply limit. It resets in 24 hours.",errAccessRevoked:"Your access to the assistant has been revoked on this website.",errAccountRequired:"Please create an account to continue using the chat assistant.",errStreamInterrupted:"The reply was interrupted. Please try again.",errNetwork:"The assistant couldn't respond just now \u2014 please try again in a moment.",errGeneric:"Something went wrong. Please try again.",vizWorking:"Visualizing\u2026",vizMarkEdit:"Mark & edit",swatchTarget:"Your colour",markupCancel:"Cancel",markupSketch:"Sketch",markupPin:"Edit Pin",markupPinLabel:"What should happen here?",markupPinLabelHint:"e.g. move the sofa here",markupSketchHint:"Sketch around an area, then drop a pin saying what to do with it.",markupRemovePin:"Remove pin",markupPinHint:"Drop a pin and say what should happen there. Drag to move it. Up to 4 pins.",markupSelect:"Select outline",markupCloseOutline:"Close outline",markupOutlineHint:"Tap around the item, then close the outline. Undo removes the last point.",markupSelectedHint:"Drag the outline points to refine, then drop a pin saying what to do with it.",markupEraser:"Eraser",markupUndo:"Undo",markupClear:"Clear",markupSend:"Send",markupDialogLabel:"Mark up image",markupError:"Couldn't process this image \u2014 try a newer visualization.",markupLoadError:"This image can't be edited here.",markupLoading:"Loading image\u2026",openMemory:"Open my memory on MiMi",errTooManyRequests:"The assistant is currently receiving too many requests. Please try again in a few moments.",errTokenLimit:"You've reached your usage limit. Please update your billing limits in your dashboard to continue.",statusSent:"Sent",statusStopped:"Sent \xB7 reply stopped",queuedWaiting:"Queued",queuedSendNow:"Send now",jumpToLatest:"Scroll to latest",timelineLabel:"Questions in this conversation",voiceConnecting:"Connecting \u2014 wait for the tone before speaking",stoppedByYou:"You stopped this response.",stoppedInterrupted:"This response was interrupted.",continueGenerating:"Continue generating",generateResponse:"Generate response",pillCompareTop2:"Compare top 2",pillCompareTop2Query:"Compare the {a} and {b}",pillMoreOn:"More on {name}",pillMoreOnQuery:"Tell me more about the {name}",pillSimilarOptions:"Similar options",pillSimilarOptionsQuery:"Show me more like the {name}",pillWhichBest:"Which is best?",pillWhichBestQuery:"Which one would you recommend and why?",pillFindAlternatives:"Find alternatives",pillFindAlternativesQuery:"What are good alternatives to the {name}?",pillShowPopular:"Show popular items",pillShowPopularQuery:"What are your most popular items?",pillRecommend:"Recommend something",pillRecommendQuery:"What do you recommend for me?",cardClickAnswer:"The {name}",cardClickQuery:"Tell me more about the {name}{details} \u2014 what are its key details, who is it best suited for, and what should I know?",displayCapture:"capture {name}",displayCaptureAll:"capture all ({count} items)",displayViewHistory:"what have you saved?",displayDelete:"delete this",retry:"Retry",edit:"Edit",copy:"Copy",copied:"Copied",msgFailed:"Failed to send"},Mo=Ti.createContext((e,r)=>{let t=Pt[e];if(r)for(let[n,a]of Object.entries(r))t=t.split(`{${n}}`).join(a);return t}),Gt=()=>Ti.useContext(Mo);function Ri(e){let r=e.trim();if(!r||r.length>40||r.includes("?"))return null;r=r.replace(/^(hi|hey|hello|yo)[,!.\s]+/i,""),r=r.replace(/^(i['’]?m|im|my name is|call me|it['’]?s|this is|name['’]?s)\s+/i,""),r=r.trim().replace(/[.!,]+$/,"");let t=r.split(/\s+/);if(t.length===0||t.length>3||!/^[\p{L}][\p{L}\-'’ ]{0,30}$/u.test(r))return null;let n=r.toLowerCase();if(["phone","laptop","tv","cheap","best","under","buy","search","find","show","need","want","price","sofa","shoe","headphone","camera","gift","help"].some(i=>n.includes(i)))return null;let o=t[0];return o.charAt(0).toUpperCase()+o.slice(1)}var Mi={shopper_reply_limit:"errShopperReplyLimit",RATE_LIMIT_EXCEEDED:"errShopperReplyLimit",access_revoked:"errAccessRevoked",account_required:"errAccountRequired",stream_interrupted:"errStreamInterrupted"};var Li=(e,r)=>{let t=e&&typeof e=="object"?e.code:void 0;if(t&&Mi[t])return r(Mi[t]);let n="";if(typeof e=="string")n=e;else if(e&&typeof e=="object"&&e.message)n=e.message;else try{n=JSON.stringify(e)}catch{n=String(e)}let a=n.toLowerCase();if(a.includes("429")||a.includes("too many requests")||a.includes("requests per minute limit exceeded")||a.includes("too_many_requests_error")||a.includes("request_quota_exceeded")||a.includes("quota"))return r("errTooManyRequests");if(a.includes("token limit"))return r("errTokenLimit");if(a.includes("failed to fetch")||a.includes("networkerror")||a.includes("request failed"))return r("errNetwork");if(n)try{console.warn("[kiku] untranslated error:",n)}catch{}return r("errGeneric")},Ei=()=>typeof window>"u"||window.isSecureContext!==!1,To=15;var zi="light",wp=["light","dark","mahogany","blush","coffee","midnight"],Ni=!1;function ka(e){return typeof e=="string"&&wp.includes(e)}function Ii(e){if(ka(e))return e;try{let r=typeof window<"u"?localStorage.getItem("akropolys_theme"):null;if(ka(r))return r}catch{}return zi}function Ro(){if(Ni)return!0;try{return localStorage.getItem("akropolys_themes_seen")==="true"||ka(localStorage.getItem("akropolys_theme"))}catch{return!1}}function Ai(){Ni=!0;try{localStorage.setItem("akropolys_themes_seen","true")}catch{}}import ta,{useState as Be,useEffect as vt,useRef as pt,useCallback as zt,useId as Sm}from"react";import{Fragment as pb,jsx as re,jsxs as lt}from"react/jsx-runtime";var Cp=({className:e,size:r=18,tight:t=!1})=>re("svg",{className:se("hsk-brand-mark",e),width:r,height:r,viewBox:t?"10.2 17.4 79.5 79.5":"0 0 100 100",xmlns:"http://www.w3.org/2000/svg","aria-label":"kiku",children:lt("g",{transform:"translate(22.7 19) scale(0.62)",fill:"currentColor",fillRule:"evenodd",children:[re("path",{d:"M39.4 10.4 Q44 0 48.6 10.4 L86.1 95.8 Q88 100 83.4 100 L4.6 100 Q0 100 1.9 95.8 Z M24 100 L24 65 Q24 60 27.4 56.3 Q44 38 60.6 56.3 Q64 60 64 65 L64 100 Z"}),re("circle",{cx:"55",cy:"82",r:"3.4"})]})}),ur=Cp,Pi=()=>lt("svg",{className:"hsk-stop-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[re("circle",{className:"hsk-stop-ring",cx:"12",cy:"12",r:"9.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),re("rect",{className:"hsk-stop-core",x:"8.5",y:"8.5",width:"7",height:"7",rx:"1.8",fill:"currentColor"})]});var _i=()=>lt("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[re("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),re("polyline",{points:"15 3 21 3 21 9"}),re("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),Fi=()=>re("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"currentColor",children:re("path",{d:"M8 5v14l11-7z"})}),an=()=>lt("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[re("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),re("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),on=()=>re("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:re("path",{d:"m15 18-6-6 6-6"})}),sn=()=>re("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:re("path",{d:"m9 18 6-6-6-6"})}),Di=()=>lt("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[re("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),re("path",{d:"M3 3v5h5"}),re("path",{d:"M12 7v5l4 2"})]}),ga=()=>re("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:re("path",{d:"M19 21 12 16l-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"})}),xa=()=>lt("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[re("path",{d:"M3 6h18"}),re("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]});var Hi=()=>re("svg",{width:"19",height:"19",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:re("path",{d:"M12 5v14M5 12h14"})}),Bi=({size:e=18}={})=>lt("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[re("path",{d:"M21 11.5a8.4 8.4 0 0 1-12.3 7.4L3 21l2.1-5.7A8.4 8.4 0 1 1 21 11.5Z"}),[8.9,12.6,16.3].map((r,t)=>re("circle",{className:"hsk-mimi-dot",style:{"--hsk-dot":t},cx:r,cy:"11.6",r:"1.15",fill:"currentColor",stroke:"none"},r))]}),Lo=()=>re("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:re("path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"})}),$i=()=>lt("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[re("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4"}),re("circle",{className:"hsk-img-sun",cx:"9",cy:"9",r:"1.8"}),re("path",{className:"hsk-img-ridge",d:"m21 15-4.5-4.5L6 21"})]}),_n=({className:e,size:r=13}={})=>lt("svg",{className:se("hsk-retry-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[re("path",{className:"hsk-retry-arrow",d:"M21.5 2v6h-6"}),re("path",{className:"hsk-retry-arc",d:"M21.34 15.57a10 10 0 1 1-.57-8.38l5.67-5.19"})]}),va=({className:e,size:r=13}={})=>lt("svg",{className:se("hsk-edit-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[re("path",{className:"hsk-edit-pencil",d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"}),re("path",{className:"hsk-edit-lead",d:"m15 5 4 4"})]}),Pr=({className:e,size:r=13}={})=>lt("svg",{className:se("hsk-copy-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[re("rect",{className:"hsk-copy-sheet",x:"8.5",y:"7",width:"12",height:"14",rx:"3.5"}),re("path",{className:"hsk-copy-back",d:"M5 15H4.5A2.5 2.5 0 0 1 2 12.5V4.5A2.5 2.5 0 0 1 4.5 2h8A2.5 2.5 0 0 1 15 4.5V5"})]}),_r=({className:e,size:r=13}={})=>re("svg",{className:se("hsk-check-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",children:re("polyline",{className:"hsk-check-mark",points:"20 6 9 17 4 12"})}),Fn=({className:e,size:r=18}={})=>lt("svg",{className:e,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[re("path",{className:"hsk-mic-cap",d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3z"}),re("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),re("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),qi=()=>lt("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[re("line",{className:"hsk-mic-slash",x1:"2",y1:"2",x2:"22",y2:"22"}),re("path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"}),re("path",{d:"M5 10v2a7 7 0 0 0 12 5"}),re("path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"}),re("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12"}),re("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),Eo=({active:e})=>lt("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[re("path",{className:"hsk-wave-bar hsk-wave-bar--tip",style:{"--hsk-bar":0,"--hsk-amp":1.9,"--hsk-period":"1.24s"},d:"M2 12h2"}),re("path",{className:"hsk-wave-bar",style:{"--hsk-bar":1,"--hsk-amp":1.78,"--hsk-period":"0.94s"},d:"M6 8v8"}),re("path",{className:"hsk-wave-bar",style:{"--hsk-bar":2,"--hsk-amp":1.26,"--hsk-period":"1.42s"},d:"M10 4v16"}),re("path",{className:"hsk-wave-bar",style:{"--hsk-bar":3,"--hsk-amp":1.62,"--hsk-period":"1.08s"},d:"M14 7v10"}),re("path",{className:"hsk-wave-bar",style:{"--hsk-bar":4,"--hsk-amp":2.05,"--hsk-period":"0.86s"},d:"M18 9v6"}),re("path",{className:"hsk-wave-bar hsk-wave-bar--tip",style:{"--hsk-bar":5,"--hsk-amp":1.9,"--hsk-period":"1.32s"},d:"M22 12h-2"})]}),Oi=()=>lt("svg",{className:"hsk-telegram-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[re("polygon",{className:"hsk-kite-wing hsk-kite-wing--far",points:"22 2 11 13 2 9"}),re("polygon",{className:"hsk-kite-wing hsk-kite-wing--near",points:"22 2 15 22 11 13"}),re("line",{className:"hsk-kite-spine",x1:"22",y1:"2",x2:"11",y2:"13"})]}),Ui=()=>lt("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[re("circle",{className:"hsk-sun-core",cx:"12",cy:"12",r:"5"}),lt("g",{className:"hsk-sun-rays",children:[re("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),re("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),re("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),re("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),re("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),re("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),re("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),re("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})]}),Wi=()=>re("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:re("path",{className:"hsk-moon-body",d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),Vi=()=>lt("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[re("path",{className:"hsk-wood-layer",style:{"--hsk-layer":0},d:"M12 2L2 7l10 5 10-5-10-5z"}),re("path",{className:"hsk-wood-layer",style:{"--hsk-layer":2},d:"M2 17l10 5 10-5"}),re("path",{className:"hsk-wood-layer",style:{"--hsk-layer":1},d:"M2 12l10 5 10-5"})]}),Gi=()=>re("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:re("path",{className:"hsk-heart-body",d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})}),ji=()=>lt("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[re("path",{d:"M17 8h1a4 4 0 1 1 0 8h-1"}),re("path",{d:"M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4z"}),re("line",{className:"hsk-steam",style:{"--hsk-steam":0},x1:"6",y1:"1",x2:"6",y2:"4"}),re("line",{className:"hsk-steam",style:{"--hsk-steam":1},x1:"10",y1:"1",x2:"10",y2:"4"}),re("line",{className:"hsk-steam",style:{"--hsk-steam":2},x1:"14",y1:"1",x2:"14",y2:"4"})]}),Yi=()=>lt("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[re("path",{d:"M12 3a6.5 6.5 0 0 0 9 9 9 9 0 1 1-9-9z"}),re("path",{className:"hsk-star-spark",d:"M18.5 2.5l.6 1.6 1.6.6-1.6.6-.6 1.6-.6-1.6-1.6-.6 1.6-.6z"})]});var Ki=({size:e=11})=>lt("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round",children:[re("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),re("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Xi=({className:e,size:r=16,filled:t=!1}={})=>lt("svg",{className:se("hsk-pin-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:t?"currentColor":"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[re("line",{x1:"12",y1:"17",x2:"12",y2:"22"}),re("path",{d:"M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V17z"})]});var cn=[{id:"light",label:"Silver",Icon:Ui,dark:!1},{id:"dark",label:"Onyx",Icon:Wi,dark:!0},{id:"mahogany",label:"Mahogany",Icon:Vi,dark:!0},{id:"blush",label:"Blush",Icon:Gi,dark:!1},{id:"coffee",label:"Coffee",Icon:ji,dark:!1},{id:"midnight",label:"Midnight",Icon:Yi,dark:!0}];function zo(e){return cn.find(r=>r.id===e)??cn[0]}import{useKiku as Mm,subscribeLiveStream as Tm}from"@akropolys/sdk";import{useAkropolysContext as Rm,useCardFields as Lm}from"@akropolys/sdk";import{useEffect as Sp,useRef as Mp}from"react";function Tp(e,r,t=.55){return r<=0?0:e*r*t/(r+t*Math.abs(e))}function Rp({stiffness:e=500,damping:r=45,onFrame:t,onRest:n}){let a=0,o=0,i=0,c=null,s=0,l=p=>{let d=Math.min(.032,(p-s)/1e3)||.016666666666666666;s=p;let u=Math.max(1,Math.ceil(d/.008)),f=d/u;for(let C=0;C<u;C++){let b=-e*(a-i)-r*o;o+=b*f,a+=o*f}if(Math.abs(a-i)<.5&&Math.abs(o)<.5){a=i,o=0,c=null,t(a),n?.();return}t(a),c=requestAnimationFrame(l)},h=()=>{c===null&&(s=performance.now(),c=requestAnimationFrame(l))};return{track(p){c!==null&&(cancelAnimationFrame(c),c=null),a=p,o=0,t(a)},to(p,d=0){i=p,o=d,h()},get value(){return a},stop(){c!==null&&(cancelAnimationFrame(c),c=null)}}}function Qi({panel:e,scroller:r,onDismiss:t,quiescent:n,enabled:a=!0}){let o=Mp(t);o.current=t,Sp(()=>{if(!a)return;let i=e();if(!i||typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches)return;let c=!1,s=0,l=0,h=0,p=-1,d=0,u=0,f=0,C=!1,b=!1,x=Rp({onFrame:H=>{i.style.transform=H===0?"":`translate3d(0, ${H}px, 0)`;let S=i.parentElement;S&&(S.style.opacity=H===0?"":String(Math.max(.35,1-H/(i.offsetHeight||1)*1.1)))},onRest:()=>{i.style.willChange="",b&&(b=!1,o.current())}}),L=()=>{let H=r();return H&&H.scrollTop>0?!1:n?n():!0},M=H=>{H.pointerType==="mouse"||!H.isPrimary||(c=!1,C=!1,p=H.pointerId,s=d=H.clientY,l=H.clientX,u=H.timeStamp,f=0,h=x.value)},w=H=>{if(H.pointerId!==p)return;let S=H.clientY-s,O=H.clientX-l;if(!C){if(Math.abs(S)<6&&Math.abs(O)<6)return;if(C=!0,c=S>0&&Math.abs(S)>Math.abs(O)&&L(),c){try{i.setPointerCapture(H.pointerId)}catch{}x.stop(),i.style.animation="none",i.style.willChange="transform"}}if(!c)return;let v=H.timeStamp-u;v>0&&(f=(H.clientY-d)/v*1e3),d=H.clientY,u=H.timeStamp;let I=h+S;x.track(I<0?-Tp(-I,i.offsetHeight||1):I),H.cancelable&&H.preventDefault()},D=H=>{if(H.pointerId!==p)return;try{i.hasPointerCapture(H.pointerId)&&i.releasePointerCapture(H.pointerId)}catch{}if(p=-1,!c)return;c=!1;let S=i.offsetHeight||1;x.value+f*.12>S*.3||f>900?(b=!0,i.style.pointerEvents="none",x.to(S,f)):x.to(0,f)};return i.addEventListener("pointerdown",M,{passive:!0}),i.addEventListener("pointermove",w,{passive:!1}),i.addEventListener("pointerup",D,{passive:!0}),i.addEventListener("pointercancel",D,{passive:!0}),()=>{x.stop(),i.removeEventListener("pointerdown",M),i.removeEventListener("pointermove",w),i.removeEventListener("pointerup",D),i.removeEventListener("pointercancel",D),i.style.transform="",i.style.willChange="",i.style.animation="",i.style.pointerEvents="";let H=i.parentElement;H&&(H.style.opacity="")}},[a,e,r,n])}function ln(e){return new Promise((r,t)=>{let n=new FileReader;n.onload=()=>r(n.result),n.onerror=()=>t(n.error??new Error("read failed")),n.readAsDataURL(e)})}async function ya(e,r){if(!r&&(e.type==="image/gif"||e.type==="image/svg+xml"||e.size<=307200))return ln(e);try{let t=await createImageBitmap(e),n=Math.min(1,1536/Math.max(t.width,t.height)),a=Math.max(1,Math.round(t.width*n)),o=Math.max(1,Math.round(t.height*n));t.close?.();let i=await createImageBitmap(e,{resizeWidth:a,resizeHeight:o,resizeQuality:"high"});try{let c=document.createElement("canvas");c.width=a,c.height=o;let s=c.getContext("2d");if(!s){if(r)throw new Error("image conversion failed");return ln(e)}r&&(s.fillStyle="#fff",s.fillRect(0,0,a,o)),s.drawImage(i,0,0);let l=!r&&e.type==="image/png",h=await new Promise(p=>c.toBlob(p,l?"image/png":"image/jpeg",.85));if(!h){if(r)throw new Error("image conversion failed");return ln(e)}return!r&&h.size>=e.size?ln(e):ln(h)}finally{i.close?.()}}catch(t){if(r)throw t;return ln(e)}}import{useEffect as ec,useRef as Fr,useState as Dr}from"react";var Ji=(e,r)=>Math.hypot(e.x-r.x,e.y-r.y);function Lp(e){let r=0;for(let t=1;t<e.length;t++)r+=Ji(e[t-1],e[t]);return r}function No(e){let r=1/0,t=1/0,n=-1/0,a=-1/0;for(let o of e)o.x<r&&(r=o.x),o.y<t&&(t=o.y),o.x>n&&(n=o.x),o.y>a&&(a=o.y);return{minX:r,minY:t,maxX:n,maxY:a}}var hn=e=>Math.max(0,Math.min(1e3,Math.round(e)));function Io(e,r,t){return[hn(e.minY/t*1e3),hn(e.minX/r*1e3),hn(e.maxY/t*1e3),hn(e.maxX/r*1e3)]}function Ep(e,r){let[t,n,a,o]=e,[i,c,s,l]=r,h=Math.min(o,l)-Math.max(n,c),p=Math.min(a,s)-Math.max(t,i);if(h<=0||p<=0)return!1;let d=Math.min((o-n)*(a-t),(l-c)*(s-i));return d>0&&h*p/d>.35}var zp=(e,r)=>[Math.min(e[0],r[0]),Math.min(e[1],r[1]),Math.max(e[2],r[2]),Math.max(e[3],r[3])];function Np(e,r,t){if(e.length<2)return null;let n=No(e),a=Io(n,r,t),o=Math.hypot(n.maxX-n.minX,n.maxY-n.minY);if(o<4)return null;let i=Lp(e),c=Ji(e[0],e[e.length-1]),s=i/Math.max(c,1e-6);return c/o<.3&&i>o*1.8?{gesture:"ring",box:a,straight:!1}:s<1.25?{gesture:"arrow",box:a,to:[hn(e[e.length-1].y/t*1e3),hn(e[e.length-1].x/r*1e3)],straight:!0}:{gesture:"scribble",box:a,straight:!1}}function Zi(e,r,t){if(!r||!t)return[];let n=[],a=[],o=[];for(let s of e){if(s.kind==="pin"&&typeof s.x=="number"&&typeof s.y=="number"){let l={x:s.x,y:s.y};o.push({gesture:"pin",id:s.id,text:s.label,box:Io(No([l,l]),r,t)});continue}if(s.kind==="text"&&s.value&&typeof s.x=="number"&&typeof s.y=="number"){let l={x:s.x,y:s.y};a.push({gesture:"text",box:Io(No([l,l]),r,t),text:s.value});continue}if(s.kind==="stroke"&&s.tool!=="eraser"&&s.points){let l=Np(s.points,r,t);l&&n.push(l)}}let i=new Set,c=[];for(let s=0;s<n.length;s++){if(i.has(s))continue;let l=n[s];for(let h=s+1;h<n.length;h++)i.has(h)||!l.straight||!n[h].straight||Ep(l.box,n[h].box)&&(i.add(h),l={gesture:"cross",box:zp(l.box,n[h].box),straight:!1});i.add(s),c.push(l.gesture==="arrow"?{gesture:"arrow",box:l.box,to:l.to}:{gesture:l.gesture,box:l.box})}return[...o,...c,...a]}import{jsx as kt,jsxs as Hr}from"react/jsx-runtime";var tc="#ff5a5a",Ip=1280,Ap=4,Pp=80;function _p(e,r,t){let n=[],a="";for(let o of r.split(/\s+/)){let i=a?`${a} ${o}`:o;a&&e.measureText(i).width>t?(n.push(a),a=o):a=i}return a&&n.push(a),n.slice(0,3)}function Fp(e,r){let t=`${r}%`;return e<33?{top:t,left:8,transform:"translateY(-100%)"}:e>67?{top:t,right:8,transform:"translateY(-100%)"}:{top:t,left:`${e}%`,transform:"translate(-50%, -100%)"}}function rc({src:e,onCancel:r,onSend:t,t:n}){let[a,o]=Dr(null),[i,c]=Dr(!1),[s,l]=Dr("pin"),h=Fr(0),[p,d]=Dr(null),u=Fr(null),[f,C]=Dr([{points:[],closed:!1}]),b=f[f.length-1],E=Fr(`selection-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),x=Fr(null),L=y=>C(z=>[...z.slice(-66),y]),M=s==="select",[w,D]=Dr([]),[H,S]=Dr(!1),O=Fr(null),v=Fr(null);ec(()=>{let y=new Image;return y.crossOrigin="anonymous",y.onload=()=>o(y),y.onerror=()=>c(!0),y.src=e,()=>{y.onload=null,y.onerror=null}},[e]);let I=(()=>{if(!a)return{w:0,h:0};let y=Math.min(1,Ip/Math.max(a.naturalWidth,a.naturalHeight));return{w:Math.round(a.naturalWidth*y),h:Math.round(a.naturalHeight*y)}})(),q=Fr(null),P=y=>{let z=O.current;if(!z||!a)return;let k=z.getContext("2d");if(!k)return;q.current||(q.current=document.createElement("canvas"));let ie=q.current;ie.width=z.width,ie.height=z.height;let ne=ie.getContext("2d"),U=y?[...w,y]:w;for(let m of U)m.kind==="stroke"&&(ne.save(),ne.globalCompositeOperation=m.tool==="eraser"?"destination-out":"source-over",ne.strokeStyle=tc,ne.lineWidth=m.tool==="eraser"?m.size*3:m.size,ne.lineCap="round",ne.lineJoin="round",ne.beginPath(),m.points.forEach((R,V)=>V===0?ne.moveTo(R.x,R.y):ne.lineTo(R.x,R.y)),m.points.length===1&&ne.lineTo(m.points[0].x+.01,m.points[0].y),ne.stroke(),ne.restore());k.clearRect(0,0,z.width,z.height),k.drawImage(a,0,0,z.width,z.height),k.drawImage(ie,0,0);let oe=b.points.map((m,R)=>x.current?.index===R?x.current.point:m);oe.length&&(k.save(),k.beginPath(),oe.forEach((m,R)=>R?k.lineTo(m.x,m.y):k.moveTo(m.x,m.y)),b.closed&&(k.closePath(),k.fillStyle="#22c55e33",k.fill()),k.strokeStyle="#22c55e",k.lineWidth=Math.max(2,I.w/400),k.stroke(),k.restore());for(let m of oe)k.beginPath(),k.arc(m.x,m.y,Math.max(3,I.w/260),0,Math.PI*2),k.fillStyle="#ffffff",k.fill(),k.strokeStyle="#15803d",k.stroke();for(let m of U){if(m.kind!=="pin")continue;let R=m.size;if(k.save(),k.beginPath(),k.moveTo(m.x,m.y),k.bezierCurveTo(m.x-R*2,m.y-R*2,m.x-R,m.y-R*3.5,m.x,m.y-R*3.5),k.bezierCurveTo(m.x+R,m.y-R*3.5,m.x+R*2,m.y-R*2,m.x,m.y),k.fillStyle=tc,k.fill(),k.lineWidth=Math.max(1,R/7),k.strokeStyle="#fff",k.stroke(),k.beginPath(),k.arc(m.x,m.y-R*2.2,R*.5,0,Math.PI*2),k.fillStyle="#fff",k.fill(),m.label){k.font=`600 ${R*1.2}px system-ui, sans-serif`,k.textAlign="center",k.textBaseline="middle";let V=_p(k,m.label,z.width*.32),Q=R*1.5,G=Math.min(z.width,Math.max(...V.map(_=>k.measureText(_).width))+R),ae=V.length*Q+R*.4,be=Math.max(G/2,Math.min(z.width-G/2,m.x)),ce=Math.max(ae,m.y-R*3.7);k.fillStyle="rgba(0,0,0,.8)",k.fillRect(be-G/2,ce-ae,G,ae),k.fillStyle="#fff",V.forEach((_,ee)=>k.fillText(_,be,ce-ae+R*.2+Q*(ee+.5),G-R))}k.restore()}};ec(()=>{P()},[a,w,b,I.w,I.h]);let J=y=>{let z=O.current,k=z.getBoundingClientRect();return{x:Math.max(0,Math.min(z.width,(y.clientX-k.left)/k.width*z.width)),y:Math.max(0,Math.min(z.height,(y.clientY-k.top)/k.height*z.height))}},de=()=>Math.max(4,Math.round(I.w/180)),te=y=>{D(z=>z.filter(k=>k.kind!=="pin"||k.id!==y)),d(null)},W=()=>{let y=w.find(z=>z.kind==="pin"&&z.id===p);y?.kind==="pin"&&!y.label.trim()?te(y.id):d(null)},le=y=>{if(!a)return;let z=J(y);if(s==="pin"){let k=w.find(U=>U.kind==="pin"&&Math.hypot(z.x-U.x,z.y-(U.y-U.size*1.7))<U.size*2);if(k?.kind==="pin"){d(k.id),y.currentTarget.setPointerCapture(y.pointerId),u.current={id:k.id,offset:{x:z.x-k.x,y:z.y-k.y}};return}if(p){W();return}if(w.filter(U=>U.kind==="pin").length>=Ap)return;let ie=`pin-${++h.current}`,ne=Math.max(10,I.w/O.current.getBoundingClientRect().width*9);D(U=>[...U,{kind:"pin",...z,id:ie,label:"",size:ne}]),d(ie);return}if(s==="select"){let k=b.points[0],ie=O.current.getBoundingClientRect(),ne=12*I.w/ie.width;if(!b.closed&&k&&b.points.length>=3&&Math.hypot(z.x-k.x,z.y-k.y)<ne)L({...b,closed:!0});else{let U=b.points.findIndex(oe=>Math.hypot(z.x-oe.x,z.y-oe.y)<ne);if(U>=0){y.currentTarget.setPointerCapture(y.pointerId),x.current={index:U,point:z};return}if(b.closed||b.points.length>=64)return;L({...b,points:[...b.points,z]})}return}y.target.setPointerCapture(y.pointerId),v.current={kind:"stroke",tool:s,size:de(),points:[z]},P(v.current)},X=y=>{if(u.current){let{id:z,offset:k}=u.current,ie=J(y);D(ne=>ne.map(U=>U.kind==="pin"&&U.id===z?{...U,x:Math.max(0,Math.min(I.w,ie.x-k.x)),y:Math.max(0,Math.min(I.h,ie.y-k.y))}:U));return}if(x.current){x.current.point=J(y),P();return}v.current&&(v.current.points.push(J(y)),P(v.current))},F=()=>{if(u.current){u.current=null;return}if(x.current){let{index:z,point:k}=x.current;x.current=null,L({...b,points:b.points.map((ie,ne)=>ne===z?k:ie)});return}if(!v.current)return;let y=v.current;v.current=null,D(z=>[...z,y])},$=w.filter(y=>y.kind==="pin"),N=$.find(y=>y.id===p),T=!!a&&!(b.points.length>0&&!b.closed)&&$.length>0&&$.every(y=>y.label.trim()),A=()=>{if(!(!T||!a))try{let y=document.createElement("canvas");y.width=I.w,y.height=I.h;let z=y.getContext("2d");if(!z){S(!0);return}z.drawImage(a,0,0,I.w,I.h);let k=y.toDataURL("image/jpeg",.92),ie=O.current?.toDataURL("image/jpeg",.85)||k,ne=Zi(w,I.w,I.h);if(b.closed){let U=m=>Math.round(m/I.w*1e3),oe=m=>Math.round(m/I.h*1e3);ne.unshift({gesture:"selection",id:E.current,box:[oe(Math.min(...b.points.map(m=>m.y))),U(Math.min(...b.points.map(m=>m.x))),oe(Math.max(...b.points.map(m=>m.y))),U(Math.max(...b.points.map(m=>m.x)))],points:b.points.map(m=>[U(m.x),oe(m.y)])})}t(k,$.map(U=>U.label.trim()).join("; "),ne,ie)}catch{S(!0)}},j=s==="pin"?"markupPinHint":s==="select"?b.closed?"markupSelectedHint":"markupOutlineHint":"markupSketchHint";return Hr("div",{className:"hsk-markup",role:"dialog","aria-label":n("markupDialogLabel"),children:[Hr("div",{className:"hsk-markup-head",children:[kt("span",{className:"hsk-markup-title",role:"status",children:n(j)}),kt("button",{className:"hsk-markup-cancel",onClick:r,children:n("markupCancel")})]}),kt("div",{className:"hsk-markup-stage",children:i?kt("div",{className:"hsk-markup-error",children:n("markupLoadError")}):a?Hr("div",{className:"hsk-markup-canvas-wrap",children:[kt("canvas",{ref:O,width:I.w,height:I.h,className:`hsk-markup-canvas hsk-markup-canvas--${s}`,style:{touchAction:"none",cursor:M||s==="pin"?"crosshair":void 0},onPointerDown:le,onPointerMove:X,onPointerUp:F,onPointerCancel:()=>{u.current=null,x.current=null,v.current=null,P()}}),s==="pin"&&N&&Hr("div",{className:"hsk-markup-pinlabel",style:Fp(N.x/I.w*100,Math.max(12,(N.y-N.size*4)/I.h*100)),children:[kt("input",{autoFocus:!0,"aria-label":n("markupPinLabel"),placeholder:n("markupPinLabelHint"),value:N.label,maxLength:Pp,style:{width:`${Math.min(34,Math.max(16,N.label.length+2))}ch`},onChange:y=>D(z=>z.map(k=>k.kind==="pin"&&k.id===N.id?{...k,label:y.target.value}:k)),onKeyDown:y=>{(y.key==="Enter"||y.key==="Escape")&&W()}}),kt("button",{"aria-label":n("markupRemovePin"),title:n("markupRemovePin"),onClick:()=>te(N.id),children:"\xD7"})]})]}):kt("div",{className:"hsk-markup-loading",children:n("markupLoading")})}),Hr("div",{className:"hsk-markup-tools",children:[Hr("button",{className:`hsk-markup-tool${s==="pin"?" hsk-markup-tool--on":""}`,onClick:()=>l("pin"),children:[Hr("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{verticalAlign:"middle",marginInlineEnd:5},"aria-hidden":"true",children:[kt("path",{d:"M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 1 1 16 0Z"}),kt("circle",{cx:"12",cy:"10",r:"3"})]}),n("markupPin")]}),kt("button",{className:`hsk-markup-tool${s==="select"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("select")},children:n("markupSelect")}),kt("button",{className:"hsk-markup-tool",disabled:b.closed||b.points.length<3,onClick:()=>L({...b,closed:!0}),children:n("markupCloseOutline")}),kt("button",{className:`hsk-markup-tool${s==="pen"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("pen")},children:n("markupSketch")}),kt("button",{className:`hsk-markup-tool${s==="eraser"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("eraser")},children:n("markupEraser")}),kt("button",{className:"hsk-markup-tool",onClick:()=>M?C(y=>y.length>1?y.slice(0,-1):y):D(y=>y.slice(0,-1)),disabled:M?f.length<2:w.length===0,children:n("markupUndo")}),kt("button",{className:"hsk-markup-tool",onClick:()=>{D([]),d(null),C([{points:[],closed:!1}]),l("pin")},disabled:w.length===0&&!b.points.length,children:n("markupClear")}),kt("button",{className:"hsk-markup-go",onClick:A,disabled:!T,children:n("markupSend")})]}),H&&kt("div",{className:"hsk-markup-error",children:n("markupError")})]})}import Dp,{useEffect as Do,useRef as Sr,useState as Hp}from"react";import{jsx as wa}from"react/jsx-runtime";function hc(e){let r=2166136261;for(let t=0;t<e.length;t++)r^=e.charCodeAt(t),r=Math.imul(r,16777619);return r>>>0}function Hn(e){let r=e>>>0;return()=>{r=r+1831565813>>>0;let t=Math.imul(r^r>>>15,1|r);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296}}var nc=e=>e*e*(3-2*e);function Bp(e){let t=new Float32Array(65536);for(let a=0;a<t.length;a++)t[a]=e();let n=(a,o)=>t[(o&255)*256+(a&255)];return(a,o)=>{let i=Math.floor(a),c=Math.floor(o),s=nc(a-i),l=nc(o-c),h=n(i,c),p=n(i+1,c),d=n(i,c+1),u=n(i+1,c+1);return(h+(p-h)*s)*(1-l)+(d+(u-d)*s)*l}}function $p(e,r,t,n){let a=t/Math.SQRT2,o=Math.ceil(e/a),i=Math.ceil(r/a),c=new Int32Array(o*i).fill(-1),s=[],l=[],h=(d,u)=>{let f=s.length;s.push([d,u]),c[Math.floor(u/a)*o+Math.floor(d/a)]=f,l.push(f)},p=(d,u)=>{if(d<0||u<0||d>=e||u>=r)return!1;let f=Math.floor(d/a),C=Math.floor(u/a);for(let b=Math.max(C-2,0);b<=Math.min(C+2,i-1);b++)for(let E=Math.max(f-2,0);E<=Math.min(f+2,o-1);E++){let x=c[b*o+E];if(x<0)continue;let L=s[x][0]-d,M=s[x][1]-u;if(L*L+M*M<t*t)return!1}return!0};for(h(n()*e,n()*r);l.length;){let d=n()*l.length|0,[u,f]=s[l[d]],C=!1;for(let b=0;b<24;b++){let E=n()*Math.PI*2,x=t*(1+n()),L=u+Math.cos(E)*x,M=f+Math.sin(E)*x;if(p(L,M)){h(L,M),C=!0;break}}C||l.splice(d,1)}return s}var bt=(e,r)=>(e()-.5)*r,Ao=[(e,r,t)=>{let n=r*.5,a=r*(.14+t()*.04),o=r*.07;e.beginPath(),e.moveTo(-a-o*.6,-n),e.lineTo(a+o*.6,-n),e.moveTo(-a,-n+o),e.lineTo(a,-n+o),e.moveTo(-a,-n+o),e.lineTo(-a*.85,n-o),e.moveTo(a,-n+o),e.lineTo(a*.85,n-o),e.moveTo(0,-n+o*1.7),e.lineTo(0,n-o*1.7),e.moveTo(-a,n-o),e.lineTo(a,n-o),e.moveTo(-a-o*.6,n),e.lineTo(a+o*.6,n),e.stroke()},(e,r,t)=>{let n=r*.5,a=-n*(.18+t()*.1);e.beginPath(),e.moveTo(-n,a),e.lineTo(0,-n),e.lineTo(n,a),e.closePath(),e.moveTo(-n*.92,a+n*.16),e.lineTo(n*.92,a+n*.16);for(let o of[-.62,-.21,.21,.62])e.moveTo(n*o,a+n*.16),e.lineTo(n*o,n*.8);e.moveTo(-n,n*.8),e.lineTo(n,n*.8),e.stroke()},(e,r,t)=>{let n=r*.5,a=n*(.48+t()*.12);e.beginPath(),e.moveTo(-n*.2,-n*.86),e.lineTo(n*.2,-n*.86),e.moveTo(-n*.15,-n*.78),e.bezierCurveTo(-a,-n*.3,-a*.85,n*.6,0,n*.86),e.bezierCurveTo(a*.85,n*.6,a,-n*.3,n*.15,-n*.78),e.moveTo(-n*.17,-n*.64),e.quadraticCurveTo(-a*1.16,-n*.48,-a*.7,-n*.04),e.moveTo(n*.17,-n*.64),e.quadraticCurveTo(a*1.16,-n*.48,a*.7,-n*.04),e.stroke()},(e,r,t)=>{let n=r*.5;e.beginPath(),e.moveTo(-n*.9,n*.52),e.quadraticCurveTo(0,-n*.18,n*.9,-n*.58),e.stroke();let a=4+(t()*3|0);for(let o=0;o<a;o++){let i=.16+o/a*.8,c=-n*.9+i*n*1.8,s=n*.52-i*n*1.16+(1-i)*i*n*.3,l=o%2?1:-1,h=n*(.26+t()*.1);e.beginPath(),e.moveTo(c,s),e.quadraticCurveTo(c+h*.5,s+l*h*.66,c+h*.9,s+l*h*.08),e.quadraticCurveTo(c+h*.42,s+l*h*.04,c,s),e.stroke()}},(e,r,t)=>{let n=r*.5;e.beginPath(),e.moveTo(-n*.85,-n*.7),e.quadraticCurveTo(-n*.1,-n*.35,n*.2,n*.1),e.stroke();let a=[[-n*.45,-n*.12],[n*.05,n*.3],[n*.42,-n*.4]];for(let[o,i]of a)e.beginPath(),e.moveTo(o,i-n*.28),e.lineTo(o-n*.02,i-n*.16),e.stroke(),e.beginPath(),e.ellipse(o,i,n*(.15+t()*.04),n*.19,bt(t,.5),0,Math.PI*2),e.stroke()},(e,r,t)=>{let n=r*.5;for(let a of[-1,1]){e.beginPath(),e.arc(0,0,n*.72,a>0?-1.25:1.25,a>0?1.25:Math.PI*2-1.25,a<0),e.stroke();for(let o=0;o<5;o++){let i=-1.05+o/4*2.1,c=Math.sin(i)*a*n*.72,s=Math.cos(i)*n*.72,l=n*(.2+t()*.08);e.beginPath(),e.moveTo(c,s),e.quadraticCurveTo(c+a*l*.9,s-l*.5,c+a*l*.6,s-l*1.05),e.stroke()}}},(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(-t,t*.6),e.lineTo(t*.55,t*.6),e.lineTo(t*.55,-t*.6),e.lineTo(-t*.45,-t*.6),e.lineTo(-t*.45,t*.15),e.lineTo(t*.1,t*.15),e.lineTo(t*.1,-t*.18),e.stroke()},(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(-t*.62,t*.8),e.lineTo(-t*.62,-t*.05),e.arc(0,-t*.05,t*.62,Math.PI,0),e.lineTo(t*.62,t*.8),e.stroke(),e.beginPath(),e.moveTo(-t*.86,t*.8),e.lineTo(t*.86,t*.8),e.stroke()},(e,r,t)=>{let n=r*.5;e.beginPath(),e.arc(0,0,n*.4,0,Math.PI*2),e.stroke();let a=t()*.5;for(let o=0;o<8;o++){let i=a+o/8*Math.PI*2;e.beginPath(),e.moveTo(Math.cos(i)*n*.6,Math.sin(i)*n*.6),e.lineTo(Math.cos(i)*n*.94,Math.sin(i)*n*.94),e.stroke()}},(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(-t*.44,t*.7),e.bezierCurveTo(-t,t*.2,-t*.8,-t*.7,-t*.3,-t*.6),e.moveTo(t*.44,t*.7),e.bezierCurveTo(t,t*.2,t*.8,-t*.7,t*.3,-t*.6),e.moveTo(-t*.32,-t*.64),e.lineTo(t*.32,-t*.64),e.moveTo(-t*.44,t*.7),e.lineTo(t*.44,t*.7);for(let n of[-.16,.02,.2])e.moveTo(t*n,-t*.56),e.lineTo(t*n,t*.62);e.stroke()},(e,r,t)=>{let n=r*.5,a=n*(.4+t()*.18);e.beginPath(),e.moveTo(-n,n*.16),e.quadraticCurveTo(-n*.5,-a,0,-n*.02),e.quadraticCurveTo(n*.5,-a,n,n*.16),e.stroke()}],ac=[(e,r,t)=>{let n=r*.5,a=-n+bt(t,n*.3),o=bt(t,n);e.beginPath(),e.moveTo(a,o);let i=4+(t()*4|0);for(let c=0;c<i;c++){let s=a+n*2/i+bt(t,n*.5),l=bt(t,n*1.5);e.quadraticCurveTo(a+bt(t,n*.9),o+bt(t,n*1.6),s,l),a=s,o=l}e.stroke()},(e,r,t)=>{let n=r*.5,a=2.2+t()*1.6,o=t()<.5?-1:1;e.beginPath();for(let i=0;i<=60;i++){let c=i/60,s=o*c*a*Math.PI*2,l=n*c*(.9+bt(t,.06)),h=Math.cos(s)*l,p=Math.sin(s)*l;i===0?e.moveTo(h,p):e.lineTo(h,p)}e.stroke()},(e,r,t)=>{let n=r*.5,a=4+(t()*4|0),o=bt(t,.7);for(let i=0;i<a;i++){let c=-n+i/(a-1)*n*2+bt(t,n*.16),s=n*(.7+t()*.6);e.beginPath(),e.moveTo(c-o*s*.5,-s*.5),e.quadraticCurveTo(c+bt(t,n*.2),0,c+o*s*.5,s*.5),e.stroke()}},(e,r,t)=>{let n=r*.5,a=2+(t()*3|0),o=n*2/a;e.beginPath(),e.moveTo(-n,n*.4);for(let i=0;i<a;i++){let c=-n+i*o,s=o*(.42+t()*.18);e.bezierCurveTo(c+s*.2,n*.4-s*2.1,c+o-s*.2,n*.4-s*2.1,c+o,n*.4+bt(t,n*.14))}e.stroke()}],oc=[(e,r,t)=>{e.beginPath(),e.arc(0,0,r*.1+t()*r*.04,0,Math.PI*2),e.fill()},(e,r,t)=>{e.beginPath(),e.arc(bt(t,r*.04),bt(t,r*.04),r*.32,0,Math.PI*2),e.stroke()},(e,r,t)=>{let n=r*.4,a=n*(.2+t()*.12);e.beginPath(),e.moveTo(0,-n),e.quadraticCurveTo(a,-a,n,0),e.quadraticCurveTo(a,a,0,n),e.quadraticCurveTo(-a,a,-n,0),e.quadraticCurveTo(-a,-a,0,-n),e.stroke()},(e,r,t)=>{let n=r*.4;e.beginPath(),e.moveTo(-n,bt(t,r*.08)),e.quadraticCurveTo(0,bt(t,r*.16),n,bt(t,r*.08)),e.stroke()}],qp={light:(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(0,-t),e.quadraticCurveTo(t*.16,-t*.16,t,0),e.quadraticCurveTo(t*.16,t*.16,0,t),e.quadraticCurveTo(-t*.16,t*.16,-t,0),e.quadraticCurveTo(-t*.16,-t*.16,0,-t),e.stroke()},dark:(e,r)=>{let t=r*.44;e.beginPath(),e.moveTo(-t*.6,-t*.5),e.lineTo(t*.6,-t*.5),e.lineTo(t,t*.05),e.lineTo(0,t),e.lineTo(-t,t*.05),e.closePath(),e.moveTo(-t,t*.05),e.lineTo(t,t*.05),e.moveTo(-t*.6,-t*.5),e.lineTo(-t*.3,t*.05),e.lineTo(0,t),e.moveTo(t*.6,-t*.5),e.lineTo(t*.3,t*.05),e.lineTo(0,t),e.stroke()},mahogany:(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(0,t),e.bezierCurveTo(-t*.9,t*.2,-t*.7,-t*.7,0,-t),e.bezierCurveTo(t*.7,-t*.7,t*.9,t*.2,0,t),e.moveTo(0,t*.86),e.lineTo(0,-t*.86);for(let n=0;n<3;n++){let a=-.34+n*.36;e.moveTo(0,t*a),e.lineTo(t*.44,t*(a-.26)),e.moveTo(0,t*a),e.lineTo(-t*.44,t*(a-.26))}e.stroke()},blush:(e,r)=>{let t=r*.5;for(let n=0;n<5;n++){let a=n/5*Math.PI*2-Math.PI/2;e.beginPath(),e.ellipse(Math.cos(a)*t*.52,Math.sin(a)*t*.52,t*.42,t*.26,a,0,Math.PI*2),e.stroke()}e.beginPath(),e.arc(0,0,t*.19,0,Math.PI*2),e.stroke()},coffee:(e,r)=>{let t=r*.5;e.beginPath(),e.ellipse(0,0,t*.6,t*.9,0,0,Math.PI*2),e.stroke(),e.beginPath(),e.moveTo(0,-t*.84),e.bezierCurveTo(t*.34,-t*.3,-t*.34,t*.3,0,t*.84),e.stroke()},midnight:(e,r)=>{let t=r*.5;e.beginPath();for(let n=0;n<10;n++){let a=n%2===0?t:t*.4,o=n/10*Math.PI*2-Math.PI/2,i=Math.cos(o)*a,c=Math.sin(o)*a;n===0?e.moveTo(i,c):e.lineTo(i,c)}e.closePath(),e.stroke()}},sc=e=>{let r=e.split(",").map(t=>parseFloat(t.trim()));return[r[0]||0,r[1]||0,r[2]||0]};function Po(e,r,t){let n=sc(e),a=sc(r);return`rgb(${Math.round(n[0]+(a[0]-n[0])*t)},${Math.round(n[1]+(a[1]-n[1])*t)},${Math.round(n[2]+(a[2]-n[2])*t)})`}var _o=new Set,Fo=new Set;function Ho(){for(let e of Fo)e()}function pc(e){_o.forEach(r=>r(e))}var Op=83,ic=[{k:.45,hop:1},{k:1.15,hop:.55},{k:.95,hop:.12},{k:1,hop:0}],cc=7,Up=.28;function Wp(e,r,t){return`hsl(${Math.round(r*300%360)}, ${t?72:68}%, ${t?58:46}%)`}function dc(e,r,t,n,a,o,i,c=r){let s=i?qp[i]:void 0,l=Hn(a),h=Bp(Hn(a^2654435769)),p=e*r,u=Math.max(40,Math.min(520,Math.round(p/3100)))/.48,f=Math.max(26,Math.sqrt(.7*p/u)),C=$p(e,r,f,l),b=4.4/Math.max(e,r),E=b*2.6,x=Math.hypot(e,r),L=l()*Math.PI*2,M=Math.cos(L),w=Math.sin(L),D=e*(.18+l()*.64),H=r*(.12+l()*.5),S=[],O=Math.hypot(e,r)||1,v=Hn(a^1540483477),I=o?e:0,q=Math.hypot(e,c)||1,[P,J,de]=t.split(",").map(W=>parseFloat(W)||0),te=.2126*P+.7152*J+.0722*de>128;for(let[W,le]of C){let X=h(W*b,le*b)*.72+h(W*E,le*E)*.28,F=Math.min(1,Math.max(0,(X-.26)/.44));if(l()>F*F*(3-2*F))continue;let $=l(),N=Math.max(0,1-Math.hypot(W-D,le-H)/(x*.72))**1.6,T=((W-e/2)*M+(le-r/2)*w)/x+.5,A=!te,y=((A?.055:.028)+l()*(A?.04:.025))*(.75+T*.55)*(1+N*.4),z=Po(t,n,N*.85),k=((o?e-W:W)+r-le)/(e+r||1),ie=l()*16777215|0,ne=Wp(ie,k,te),U=0,oe=A?1.05+l()*.35:.65+l()*.35,m=20,R=Ao[0],V=1;$<.5?(U=bt(l,.16),oe=A?1.15+l()*.45:.7+l()*.35,m=20+l()*16,R=Ao[l()*Ao.length|0]):$<.82?(U=l()*Math.PI*2,oe=A?.95+l()*.4:.6+l()*.4,m=16+l()*20,R=ac[l()*ac.length|0]):$<.95||!s?(U=l()*Math.PI*2,oe=A?.85+l()*.35:.55+l()*.35,m=7+l()*7,R=oc[l()*oc.length|0]):(U=bt(l,.3),oe=A?1.1+l()*.3:.75+l()*.3,m=15+l()*9,R=s,V=2.6),S.push({x:W,y:le,roll:$,rotation:U,lineWidth:oe,alpha:y*V,baseColor:z,shimmerColor:ne,drawFn:R,size:m,seed:ie,normDist:k,bloom:Math.min(1,Math.hypot(W-I,le-c)/q)*.62+v()*.08,glow:te?.2:.06,ux:(W-I)/(Math.hypot(W-I,le-c)||1),uy:(le-c)/(Math.hypot(W-I,le-c)||1)})}return S}var Vp=.3;function Gp(e){return 1+(1.2+1)*(e-1)**3+1.2*(e-1)**2}function Br(e,r,t,n,a,o=1,i){e.clearRect(0,0,t,n),e.lineCap="round",e.lineJoin="round";let c=a>=0&&a<=1.4,s=c?a*1.4-.2:-999,l=.3;for(let h of r){let p=h.alpha,d=h.baseColor,u=h.lineWidth,f=1,C=0,b=0;if(i!==void 0){let x=Math.min(1,Math.max(0,(i-h.bloom)/Vp));if(x<=0)continue;let L=1-(1-x)**3,M=Math.sin(x*Math.PI)**2;p=h.alpha*L+M*h.glow,d=Po(h.baseColor,h.shimmerColor,M*(h.glow>.1?.85:.55)),u=h.lineWidth*(1+M*.35),f=.86+.14*Gp(x),C=-h.ux*(1-L)*9,b=-h.uy*(1-L)*9}else if(c){let x=h.normDist-s;if(x>l)p=h.alpha*.45,d=h.baseColor,u=h.lineWidth;else if(x<-l)p=h.alpha,d=h.baseColor,u=h.lineWidth;else{let L=Math.cos(x/l*(Math.PI/2))**2;p=h.alpha+L*.08,d=L>.08?Po(h.baseColor,h.shimmerColor,L*.65):h.baseColor,u=h.lineWidth*(1+L*.2)}}e.save(),e.translate(h.x+(h.dx??0)+C,h.y+(h.dy??0)+b),e.rotate(h.rotation+(h.dr??0)),f!==1&&e.scale(f,f),h.hop&&(e.scale(1+h.hop,1+h.hop),p*=1+h.hop*2),e.globalAlpha=Math.min(p*o,1),e.strokeStyle=d,e.fillStyle=d,e.lineWidth=u;let E=Hn(h.seed);h.drawFn(e,h.size,E),e.restore()}}var jp=Dp.memo(function({seed:r="",theme:t,dir:n,waitForContent:a=!1}){let o=Sr(null),i=Sr(!1),c=Sr(0),s=Sr(null),l=Sr(0),h=Sr(0),p=Sr(a);return Do(()=>{let d=o.current;if(!d)return;let u=hc(r||"kiku"),f=0,C=(v,I,q,P)=>()=>{let J=performance.now(),de=d.clientWidth,te=d.clientHeight;v===null&&de&&te&&(v=J);let W=v===null?0:J-v,le=Math.min(1,W/I);if(de&&te){let X=Math.min(window.devicePixelRatio||1,3),F=Math.round(de*X),$=Math.round(te*X);(d.width!==F||d.height!==$)&&(d.width=F,d.height=$);let N=d.getContext("2d");N&&(N.setTransform(X,0,0,X,0,0),Br(N,q,de,te,-1,1,le))}if(le<1)c.current=requestAnimationFrame(C(v,I,q,P));else{i.current=!1;let X=d.clientWidth,F=d.clientHeight,$=d.getContext("2d");if($&&X&&F){let N=Math.min(window.devicePixelRatio||1,3);$.setTransform(N,0,0,N,0,0),Br($,q,X,F,-1)}}},b=()=>{let v=d.clientWidth,I=d.clientHeight;if(!v||!I)return;let q=Math.min(window.devicePixelRatio||1,3),P=d.getContext("2d");if(!P)return;let J=getComputedStyle(d),de=J.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",te=J.getPropertyValue("--hsk-doodle-tint").trim()||de,W=n==="rtl"||J.direction==="rtl"||d.closest('[dir="rtl"]')!==null,le=typeof window<"u"?Math.max(I,window.innerHeight||0):I,X=dc(v,le,de,te,u,W,t,I);s.current=X,l.current=v,h.current=le;let F=Math.round(v*q),$=Math.round(I*q);if((d.width!==F||d.height!==$)&&(d.width=F,d.height=$),P.setTransform(q,0,0,q,0,0),p.current){P.clearRect(0,0,v,I);return}if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){Br(P,X,v,I,-1);return}cancelAnimationFrame(c.current),i.current=!0;let T=1500;c.current=requestAnimationFrame(C(null,T,X,W))},E=()=>{let v=s.current,I=d.clientWidth,q=d.clientHeight;if(v&&I===l.current&&q<=h.current){if(i.current||p.current||!q)return;let P=d.getContext("2d");if(!P)return;let J=Math.min(window.devicePixelRatio||1,3);d.width=Math.round(I*J),d.height=Math.round(q*J),P.setTransform(J,0,0,J,0,0),Br(P,v,I,q,-1);return}clearTimeout(f),f=window.setTimeout(b,20)};b();let x=()=>{p.current&&(p.current=!1,b())};Fo.add(x);let L=p.current?window.setTimeout(x,2e3):0,M=new ResizeObserver(E);M.observe(d);let w=window.matchMedia?.("(prefers-color-scheme: dark)"),D=()=>{b()};w?.addEventListener?.("change",D);let H=0,S=()=>{let v=s.current,I=d.getContext("2d"),q=d.clientWidth,P=d.clientHeight;if(!v||!I||!q||!P)return;let J=Math.min(window.devicePixelRatio||1,3);I.setTransform(J,0,0,J,0,0),Br(I,v,q,P,-1)},O=({x:v,y:I,strength:q})=>{let P=s.current;if(p.current||i.current||!P||window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches)return;cancelAnimationFrame(c.current),i.current=!1,clearTimeout(H);let J=d.getBoundingClientRect(),de=v-J.left,te=I-J.top,W=Hn(performance.now()*997|0),le=(N,T)=>Math.max(-T,Math.min(T,N)),X=P.map(N=>{let T=N.dx??0,A=N.dy??0,j=N.dr??0,y=N.x-de,z=N.y-te,k=Math.hypot(y,z)||1,ie=q*(.18+.82*Math.exp(-k/220)),ne=ie*(.6+W()*1.8),U=le(T+y/k*ne+(W()-.5)*ie*2,cc),oe=le(A+z/k*ne+(W()-.5)*ie*2,cc),m=le(j+(W()-.5)*ie*.12,Up);return{g:N,fx:T,fy:A,fr:j,tx:U,ty:oe,tr:m,lift:ie*.09}}),F=0,$=()=>{let N=ic[F];for(let T of X)T.g.dx=T.fx+(T.tx-T.fx)*N.k,T.g.dy=T.fy+(T.ty-T.fy)*N.k,T.g.dr=T.fr+(T.tr-T.fr)*N.k,T.g.hop=T.lift*N.hop;S(),++F<ic.length&&(H=window.setTimeout($,Op))};$()};return _o.add(O),()=>{_o.delete(O),Fo.delete(x),clearTimeout(L),clearTimeout(H),clearTimeout(f),cancelAnimationFrame(c.current),i.current=!1,M.disconnect(),w?.removeEventListener?.("change",D)}},[r,t,n]),wa("canvas",{className:"hsk-cb-doodles",ref:o,"aria-hidden":"true"})}),Dn=3,lc=1800;function Yp({seed:e="",theme:r,alphaScale:t=1.8,weight:n=.6}){let a=Sr(null);return Do(()=>{let o=a.current,i=o?.getContext("2d");if(!o||!i)return;let c=0,s=()=>{let h=o.clientWidth,p=o.clientHeight,d=Math.min(window.devicePixelRatio||1,3);o.width=Math.round(h*d),o.height=Math.round(p*d);let u=getComputedStyle(o),f=u.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",C=u.getPropertyValue("--hsk-doodle-tint").trim()||f,b=h*Dn,E=p*Dn,x=dc(b,E,f,C,hc(e||"kiku"),!1,r);for(let w of x)w.lineWidth*=Dn*n;if(i.setTransform(d/Dn,0,0,d/Dn,0,0),window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){Br(i,x,b,E,-1,t);return}let L=performance.now(),M=w=>{let D=(w-L)%(lc*2)/lc,H=D<1?D:2-D;Br(i,x,b,E,(1-Math.cos(H*Math.PI))/2*1.4,t),c=requestAnimationFrame(M)};c=requestAnimationFrame(M)},l=new ResizeObserver(()=>{c||!o.clientWidth||!o.clientHeight||(l.disconnect(),s())});return l.observe(o),()=>{l.disconnect(),cancelAnimationFrame(c)}},[e,r,t,n]),wa("canvas",{className:"hsk-doodle-shimmer",ref:a,"aria-hidden":"true"})}var Kp=300;function pn({active:e,seed:r,theme:t}){let[n,a]=Hp(e);return Do(()=>{if(e){a(!0);return}let o=setTimeout(()=>a(!1),Kp);return()=>clearTimeout(o)},[e]),n?wa("span",{className:`hsk-working-veil${e?"":" is-leaving"}`,"aria-hidden":"true",children:wa(Yp,{seed:r,theme:t,alphaScale:18,weight:1.15})}):null}var Ca=jp;import Bn,{useState as Qt,useEffect as Bo,useCallback as uc}from"react";import{useAkropolysContext as Xp}from"@akropolys/sdk";import{jsx as fc}from"react/jsx-runtime";var Qp={english:"en",en:"en",swahili:"sw",kiswahili:"sw",sw:"sw",french:"fr",fran\u00E7ais:"fr",francais:"fr",fr:"fr",spanish:"es",espa\u00F1ol:"es",espanol:"es",es:"es",arabic:"ar",\u0627\u0644\u0639\u0631\u0628\u064A\u0629:"ar",ar:"ar",portuguese:"pt",portugu\u00EAs:"pt",pt:"pt",hindi:"hi",\u0939\u093F\u0928\u094D\u0926\u0940:"hi",hi:"hi",chinese:"zh",\u4E2D\u6587:"zh",zh:"zh",japanese:"ja",\u65E5\u672C\u8A9E:"ja",ja:"ja",urdu:"ur",\u0627\u0631\u062F\u0648:"ur",ur:"ur",burmese:"my",burma:"my",myanmar:"my","\u1019\u103C\u1014\u103A\u1019\u102C":"my","\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C":"my",my:"my",khmer:"km",cambodian:"km",\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A:"km",\u1781\u17D2\u1798\u17C2\u179A:"km",km:"km",persian:"fa",farsi:"fa",\u0641\u0627\u0631\u0633\u06CC:"fa",fa:"fa",fas:"fa",malay:"ms",bahasa:"ms",indonesian:"id","bahasa melayu":"ms","bahasa indonesia":"id",ms:"ms",id:"id",amharic:"am",\u12A0\u121B\u122D\u129B:"am",am:"am"};function dn(e){let r=e?Qp[e.trim().toLowerCase()]:void 0;return r?{dir:r==="ar"||r==="ur"||r==="fa"?"rtl":"ltr",bcp47:r}:null}function Jp(e){let r=/var\(\s*(--[\w-]+)/.exec(e)?.[1];if(!r||typeof document>"u")return"";for(let t of[document.documentElement,document.body]){let n=t?getComputedStyle(t).getPropertyValue(r).trim():"";if(n)return n.split(",")[0].trim()}return""}var mc=5e3,bc=[5e3,15e3,45e3,12e4];function kc({shopperLanguage:e,theme:r,preloadedStrings:t}){let n=Xp(),a=e?n?.getCachedUIStrings?.(e,Pt)??n?.getCachedUIStrings?.(e,Cr):null,o=t&&Object.keys(t).length>0?t:a?.strings??{},[i,c]=Qt(()=>o),[s,l]=Qt(()=>!e||t&&Object.keys(t).length>0||!!a?.complete),[h,p]=Qt(()=>t&&Object.keys(t).length>0||a?.complete?e:!e||dn(e)?.bcp47==="en"?e||"en":""),d=!e||dn(e)?.bcp47==="en",u=i;t&&Object.keys(t).length>0&&(u={...i,...t});let f=e?`akropolys_ui_dir_${e.toLowerCase()}`:"",[C,b]=Qt(()=>{if(a?.dir)return a.dir==="rtl";let N=dn(e);if(N)return N.dir==="rtl";if(Ar(e)?.rtl)return!0;if(typeof window>"u"||!f)return!1;try{return localStorage.getItem(f)==="rtl"}catch{return!1}}),[E,x]=Qt(()=>a?.bcp47||dn(e)?.bcp47||""),[L,M]=Qt(()=>a?.font??null),[w,D]=Qt(()=>yi(n)),[H,S]=Qt(!0),[O,v]=Qt(!1),I=Bn.useRef(e),[q,P]=Qt(e);if(e!==q){P(e);let N=dn(e);N&&(b(N.dir==="rtl"),x(N.bcp47));let T=e?n?.getCachedUIStrings?.(e,Pt)??n?.getCachedUIStrings?.(e,Cr):null,A=t&&Object.keys(t).length>0?t:T?.strings;A&&Object.keys(A).length>0&&(c(A),u=A,T&&(T.font&&M(T.font),T.dir&&b(T.dir==="rtl"),T.bcp47&&x(T.bcp47)),T?.font&&Vt(T.font),v(!vo([T?.font?.family,w?.family].filter(j=>!!j),A)),p(e),l(!0))}let J=e===I.current||d||!O&&(h.toLowerCase()===e.toLowerCase()&&s||Object.keys(u).length>0);Bo(()=>{if(!e){x(""),M(null),c({}),p(""),l(!0),b(!1);return}let N=dn(e),T=Ar(e),A=N?.bcp47==="en",j=!1,y=(ne,U)=>{let oe=[ne?.family,w?.family].filter(m=>!!m);if(e===I.current||vo(oe,U)){v(!1);return}v(!0),yo(oe,U,mc).then(()=>{j||v(!1)})},z=n?.getCachedUIStrings?.(e,Pt);if(z?.strings&&Object.keys(z.strings).length>0)return c(z.strings),b(z.dir==="rtl"),x(z.bcp47||N?.bcp47||""),z.font&&(Vt(z.font),M(z.font)),y(z.font,z.strings),p(e),l(!0),()=>{j=!0};let k=n?.getCachedUIStrings?.(e,Cr);k?.strings&&Object.keys(k.strings).length>0?(c(k.strings),b(k.dir==="rtl"),x(k.bcp47||N?.bcp47||""),k.font&&(Vt(k.font),M(k.font)),y(k.font,k.strings),p(e),l(!0)):(v(!1),c({}),N?(b(N.dir==="rtl"),x(N.bcp47)):T?.rtl&&b(!0),A||l(!1));let ie=async()=>{let ne=!1;try{if(!k?.strings){let oe=await n.getUIStrings?.(e,Cr);if(!j&&oe?.complete){v(!0),c(R=>({...R,...oe.strings})),b(oe.dir==="rtl"),x(oe.bcp47||N?.bcp47||"");try{localStorage.setItem(f,oe.dir)}catch{}oe.font&&Vt(oe.font);let m=[oe.font?.family,w?.family].filter(R=>!!R);await yo(m,oe.strings,mc),j||(oe.font&&M(oe.font),p(e),l(!0),v(!1))}}let U=await n.getUIStrings?.(e,Pt);!j&&U?.complete&&(ne=!0,c(oe=>({...oe,...U.strings})),U.font&&(await Vt(U.font,1200),j||M(U.font)))}catch{return!1}return ne};return(async()=>{for(let ne=0;!j&&!await ie();ne++){let U=bc[Math.min(ne,bc.length-1)];await new Promise(oe=>window.setTimeout(oe,U))}})(),()=>{j=!0}},[e,n,f]),Bo(()=>{let N=!1;return(async()=>{try{let T=await wo(n);!N&&T&&D(T)}catch{}N||S(!0)})(),()=>{N=!0}},[n]),xo(L),xo(w);let de=Bn.useMemo(()=>{let T=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim(),A=/^var\(/i.test(T),j=T.replace(/^['"]|['"]$/g,""),y=A?Jp(T):"",z=A?y?`${y}, `:"":j?`"${j}", `:"";if(L)return`"${L.family}", ${z}"Geist", system-ui, sans-serif`;let k=e?e.trim().toLowerCase():"";if(k==="japanese"||k==="ja"||k==="\u65E5\u672C\u8A9E")return`${z}"Geist", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif`;if(k==="chinese"||k==="zh"||k==="\u4E2D\u6587")return`${z}"Geist", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif`;if(k==="urdu"||k==="ur"||k==="\u0627\u0631\u062F\u0648")return`"Noto Nastaliq Urdu", ${z}"IBM Plex Sans Arabic", "Geist", system-ui, sans-serif`;if(k==="arabic"||k==="ar"||k==="\u0627\u0644\u0639\u0631\u0628\u064A\u0629")return`"IBM Plex Sans Arabic", ${z}"Geist", system-ui, sans-serif`;if(k==="hindi"||k==="hi"||k==="\u0939\u093F\u0928\u094D\u0926\u0940")return`"Hind", ${z}"Geist", system-ui, sans-serif`},[L,e,typeof r=="object"&&r?r.fontFamily:void 0]),te=Bn.useMemo(()=>{let N=0,T=0;for(let A of Object.values(i))for(let j of A){let y=j.codePointAt(0)??0;y<192||/\p{L}/u.test(j)&&(y<=591?N++:T++)}return T>N},[i]),[W,le]=Qt(0);Bo(()=>{if(typeof document>"u"||!document.fonts?.ready)return;let N=!0;return document.fonts.ready.then(()=>{N&&le(T=>T+1)}),()=>{N=!1}},[L]);let X=Bn.useMemo(()=>{if(!te||typeof document>"u")return!0;let T=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim();if(!T)return!1;let A="";for(let y of Object.values(i))if(y){A=y;break}if(!A)return!0;let j=A.replace(/\s+/g,"");if(!j)return!0;try{let z=document.createElement("canvas").getContext("2d");if(!z)return!0;let k=T.startsWith("var(")&&getComputedStyle(document.documentElement).getPropertyValue(T.slice(4,-1).trim()).trim()||T;z.font=`16px ${k}, __akropolys_nonexistent_font__`;let ie=z.measureText(j).width;z.font="16px __akropolys_nonexistent_font__";let ne=z.measureText(j).width;return Math.abs(ie-ne)>1}catch{return!0}},[te,i,typeof r=="object"&&r?r.fontFamily:void 0,W]),F=uc((N,T)=>{let A=u[N]||i[N]||Pt[N]||N;if(T)for(let[j,y]of Object.entries(T))A=A.split(`{${j}}`).join(y);return A},[u,i]),$=uc((N,T)=>(u[N]||i[N]||Pt[N]||N).split(/(\{[a-zA-Z]+\})/g).map((j,y)=>{let z=j.match(/^\{([a-zA-Z]+)\}$/);return z&&T?.[z[1]]!==void 0?fc("bdi",{children:T[z[1]]},y):fc(Bn.Fragment,{children:j},y)}),[u,i]);return{chromeStrings:i,chromeReady:J,isRTL:C,speechLang:E,scriptFont:L,fontStack:de,isNonLatin:te,hostFontCovers:X,baseFontReady:H,t:F,tNode:$}}import{useState as un,useRef as st,useEffect as Sa,useLayoutEffect as Zp,useCallback as sr}from"react";function gc({messages:e,loading:r,streaming:t,messageRefs:n}){let a=st(null),o=st(0),[i,c]=un(!1),[s,l]=un(1),[h,p]=un(0),d=st(()=>{}),u=st(null),f=st(!1),C=st(!0),b=st(!1),E=st(null),x=st(null),L=st(e.length),M=st(!1),w=st(()=>{}),D=st(()=>{}),H=st(null),S=st(()=>{}),[O,v]=un(0),I=st(0),q=st(""),P=st(()=>{}),J=st(()=>{});Sa(()=>{let m=a.current;if(!m)return;let R,V=()=>{clearTimeout(R),R=setTimeout(()=>{f.current=!1},150)},Q=()=>{clearTimeout(R),f.current=!0,P.current()},G=()=>{f.current&&V()};return m.addEventListener("touchstart",Q,{passive:!0}),m.addEventListener("touchend",V,{passive:!0}),m.addEventListener("touchcancel",V,{passive:!0}),m.addEventListener("scroll",G,{passive:!0}),()=>{clearTimeout(R),m.removeEventListener("touchstart",Q),m.removeEventListener("touchend",V),m.removeEventListener("touchcancel",V),m.removeEventListener("scroll",G)}},[]),Sa(()=>{let m=a.current;if(!m)return;let R=160,V=8,Q=0,G=()=>{Q=0;let ce=E.current?.offsetHeight??0,_=m.scrollHeight-ce-m.scrollTop-m.clientHeight,ee=performance.now()-o.current<400;_<=V&&(!b.current||ee)&&(C.current||J.current(),C.current=!0,b.current=!1,$.current()),c(_>R&&!C.current);let ve=m.scrollHeight-m.clientHeight;l(ve>8?Math.min(1,Math.max(0,m.scrollTop/ve)):1);let Ie=m.scrollTop+m.clientHeight*.33,fe=0;for(let Se=0;Se<n.current.length;Se++){let Ne=n.current[Se];Ne&&Ne.offsetTop<=Ie&&(fe=Se)}p(fe)},ae=()=>{Q||(Q=requestAnimationFrame(G))};G(),m.addEventListener("scroll",ae,{passive:!0});let be=new ResizeObserver(()=>{x.current?w.current("sync"):C.current&&!f.current&&D.current(),ae()});be.observe(m);for(let ce of n.current)ce&&be.observe(ce);return()=>{Q&&cancelAnimationFrame(Q),m.removeEventListener("scroll",ae),be.disconnect()}},[e.length,n]);let de=sr(m=>{let R=`${m}:${I.current}`;q.current!==R&&(q.current=R,v(V=>V+1))},[]),[te,W]=un(!1),le=st(!1),X=sr(()=>{le.current||(le.current=!0,W(!0))},[]),F=sr(()=>{le.current&&(le.current=!1,W(!1))},[]),$=st(()=>{});$.current=F;let[N,T]=un(!1),A=st(!1),j=st(0),y=sr(()=>{A.current=!1,T(!1)},[]),z=sr(()=>{q.current="",y(),F()},[y,F]),k=sr(()=>{A.current&&(performance.now()-j.current<700||y())},[y]);P.current=k,J.current=z,Sa(()=>{if(O===0)return;A.current=!0,j.current=performance.now(),T(!0);let m=setTimeout(y,4200);return()=>clearTimeout(m)},[O,y]);let ie=sr(()=>{M.current=!1,x.current&&(x.current=null,E.current&&(E.current.style.height=""))},[]);S.current=ie,D.current=()=>{let m=a.current;if(!m)return;let R=m.scrollHeight-m.clientHeight;H.current?H.current(R):m.scrollTop=R},w.current=m=>{let R=a.current,V=E.current,Q=x.current,G=ee=>{let ve=m==="sync"?H.current:u.current;ve?ve(ee):R&&(R.scrollTop=ee)},ae=D.current;if(!R||!V||!Q||!Q.isConnected){ie(),C.current&&ae();return}let be=parseFloat(getComputedStyle(R).paddingTop)||0;V.offsetHeight<R.clientHeight&&(V.style.height=`${R.clientHeight}px`);let ce=Math.max(0,Q.offsetTop-be),_=ce+R.clientHeight-(R.scrollHeight-V.offsetHeight);if(_<=0){ie(),C.current=!1,b.current=!0,G(ce);return}_!==V.offsetHeight&&(V.style.height=`${_}px`),G(ce)};let ne=sr(m=>{let R=a.current,V=n.current[m];if(!R||!V)return;let Q=V.offsetTop-Math.max(0,(R.clientHeight-V.clientHeight)/2),G=Math.max(0,Math.min(R.scrollHeight-R.clientHeight,Q));u.current?u.current(G):R.scrollTo({top:G,behavior:"smooth"})},[n]),U=sr(m=>{let R=a.current;if(!R||!R.contains(m))return;M.current=!1,x.current=null,C.current=!1,b.current=!0;let V=R.getBoundingClientRect(),Q=m.getBoundingClientRect(),G=Math.min(Q.height>V.height?176:64,V.height/3);if(Q.top>=V.top+G&&Q.bottom<=V.bottom-8)return;let ae=Math.max(0,Math.min(R.scrollHeight-R.clientHeight,R.scrollTop+Q.top-V.top-G));u.current?u.current(ae):R.scrollTo({top:ae,behavior:"auto"})},[]),oe=sr(()=>{let m=a.current;if(!m)return;C.current=!0,b.current=!1,S.current(),J.current();let R=m.scrollHeight-m.clientHeight;u.current?u.current(R):m.scrollTo({top:R,behavior:"smooth"})},[]);return Zp(()=>{let m=a.current;if(!m)return;let R=e.slice(L.current);if(L.current=e.length,R.some(Q=>Q.role==="user")&&(C.current=!0,b.current=!1,J.current(),x.current=null,M.current=!0),M.current){M.current=!1;for(let Q=n.current.length-1;Q>=0;Q--){let G=n.current[Q];if(G?.dataset.hskRole==="user"){x.current=G;break}}if(x.current){w.current("glide");return}}if(x.current){w.current("glide");return}let V=m.scrollTop;if(!C.current)b.current||(X(),de(e.length));else if(!f.current){D.current();return}m.scrollTop!==V&&d.current()},[e,r,t,n,de,X]),Sa(()=>{let m=a.current;if(!m||typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let R=7,V=16,Q=1/(window.devicePixelRatio||1),G=he=>Math.round(he/Q)*Q,ae=m.scrollTop,be=m.scrollTop,ce=m.scrollTop,_=0,ee=null,ve=he=>{he!==ce&&(m.scrollTop=he,ce=m.scrollTop)},Ie=()=>{ee!==null&&(cancelAnimationFrame(ee),ee=null),m.classList.remove("hsk-scrolling"),ae=be=ce=m.scrollTop};d.current=Ie,u.current=he=>{Math.abs(m.scrollTop-ce)>1&&(ae=be=ce=m.scrollTop);let Fe=Math.round(Math.max(0,Math.min(m.scrollHeight-m.clientHeight,he)));Fe!==ae&&(ae=Fe,ee===null&&(_=performance.now(),ee=requestAnimationFrame(fe)))},H.current=he=>{let Fe=Math.round(Math.max(0,Math.min(m.scrollHeight-m.clientHeight,he)));ee!==null&&(cancelAnimationFrame(ee),ee=null,m.classList.remove("hsk-scrolling")),m.scrollTop=Fe,ae=be=ce=m.scrollTop};let fe=he=>{let Fe=Math.min((he-_)/1e3,.05);if(_=he,be+=(ae-be)*(1-Math.exp(-R*Fe)),Math.abs(ae-be)<Q){be=ae,ve(Math.round(ae)),m.classList.remove("hsk-scrolling"),ee=null;return}ve(G(be)),ee=requestAnimationFrame(fe)},Se=he=>{if(he.ctrlKey)return;Math.abs(m.scrollTop-ce)>1&&(ae=be=ce=m.scrollTop),he.deltaY<0&&(C.current&&(I.current+=1),C.current=!1,x.current=null),P.current();let Fe=he.deltaMode===1?V:he.deltaMode===2?m.clientHeight:1,Oe=Math.max(0,m.scrollHeight-m.clientHeight),Ge=Math.round(Math.max(0,Math.min(Oe,ae+he.deltaY*Fe)));if(Ge===ae){Oe>0&&he.preventDefault();return}he.preventDefault(),ae=Ge,ee===null&&(_=performance.now(),m.classList.add("hsk-scrolling"),ee=requestAnimationFrame(fe))},Ne=m.scrollTop,Te=()=>{let he=Math.abs(m.scrollTop-ce)>1;he&&(o.current=performance.now(),m.scrollTop<Ne-1&&C.current&&(I.current+=1,C.current=!1,x.current=null)),Ne=m.scrollTop,ee!==null&&he&&(cancelAnimationFrame(ee),ee=null,m.classList.remove("hsk-scrolling"),ae=be=ce=m.scrollTop)};return m.addEventListener("wheel",Se,{passive:!1}),m.addEventListener("scroll",Te,{passive:!0}),()=>{m.removeEventListener("scroll",Te),m.removeEventListener("wheel",Se),ee!==null&&cancelAnimationFrame(ee),m.classList.remove("hsk-scrolling"),d.current=()=>{},u.current=null,H.current=null}},[]),{msgsContainerRef:a,spacerRef:E,lastExternalScrollRef:o,showJumpToBottom:i,scrollProgress:s,activeMsgIdx:h,jumpAlert:N,unreadBelow:te,jumpToMessage:ne,revealMessage:U,jumpToBottom:oe,resetAlertArming:z}}import{useState as ed,useRef as mn,useEffect as xc}from"react";var td=450,rd=45,nd=900,ad=180;function vc(e){let[r,t]=ed(e),n=mn(e),a=mn(e),o=mn(0),i=mn(0),c=mn(0),s=mn(null);return xc(()=>()=>{s.current!==null&&cancelAnimationFrame(s.current)},[]),xc(()=>{if(a.current=e,window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||!e.startsWith(n.current)){s.current!==null&&(cancelAnimationFrame(s.current),s.current=null),n.current=e,o.current=0,i.current=0,t(e);return}if(s.current!==null||n.current.length>=e.length)return;c.current=performance.now();let h=p=>{let d=Math.min(p-c.current,50);c.current=p;let u=a.current,f=u.length-n.current.length,C=Math.min(nd,Math.max(rd,f*1e3/td));o.current+=(C-o.current)*(1-Math.exp(-d/ad)),i.current+=o.current*d/1e3;let b=Math.floor(i.current);b>0&&(i.current-=b,n.current=u.slice(0,Math.min(u.length,n.current.length+b)),t(n.current)),n.current.length<a.current.length?s.current=requestAnimationFrame(h):(s.current=null,i.current=0)};s.current=requestAnimationFrame(h)},[e]),r}import{useState as $r,useEffect as yc,useCallback as $o}from"react";import{useAkropolysContext as od}from"@akropolys/sdk";function wc(e,r){let t=od(),[n,a]=$r(""),[o,i]=$r("idle"),[c,s]=$r(null),[l,h]=$r(null),[p,d]=$r(null),[u,f]=$r(To),[C,b]=$r(!1),E=$o(async(M,w)=>{try{navigator.clipboard&&window.isSecureContext?await navigator.clipboard.writeText(M):sd(M),d(w),setTimeout(()=>d(null),2e3)}catch{}},[]);yc(()=>{e&&e.type==="request_kiku_key"&&(i("prompt_key"),a(""))},[e]),yc(()=>{if(!c)return;f(To);let M=setInterval(()=>{f(w=>w<=1?(clearInterval(M),s(null),h(null),0):w-1)},1e3);return()=>clearInterval(M)},[c]);let x=$o(async()=>{let M=n.trim();M&&(t.setKikuPub(M),a(""),i("idle"),await r())},[t,n,r]),L=$o(async()=>{if(!C){b(!0);try{let{secret:M,publicId:w}=await t.mintKikuKey();s(M),h(w),i("idle"),await r()}catch{}finally{b(!1)}}},[t,C,r]);return{keyInput:n,setKeyInput:a,keyPhase:o,setKeyPhase:i,mintedKey:c,setMintedKey:s,mintedPub:l,setMintedPub:h,copied:p,keyCountdown:u,minting:C,copyValue:E,handleUseExistingKey:x,handleCreateKey:L}}function sd(e){let r=document.createElement("textarea");r.value=e,r.setAttribute("readonly",""),r.style.cssText="position:fixed;top:0;left:0;opacity:0;",document.body.appendChild(r),r.select(),r.setSelectionRange(0,e.length);let t=document.execCommand("copy");if(r.remove(),!t)throw new Error("copy failed")}import{useCallback as Ma}from"react";function Cc({attachments:e,setAttachments:r,setInput:t,send:n,t:a}){let o=Ma(l=>{if(typeof l.id!="string"||!l.id.trim())return;let h=l.name||"",p=`@kiku ${a("displayCapture",{name:h}).trim()}`,d=h||"capture current page";t("");let u=e;r([]);let f={id:l.id,name:h,url:l.url||l.fields?.url,image:l.image,fields:l.fields};n(d,p,u.length>0?u:void 0,"capture",[f])},[e,n,r,t,a]),i=Ma(l=>{let h=l.filter(u=>typeof u.id=="string"&&u.id.trim().length>0).map(u=>({id:u.id,name:u.name||"",url:u.url||u.fields?.url,fields:u.fields,image:u.image||""}));if(h.length===0)return;let p=h.map(u=>u.name).filter(Boolean).join(", "),d=`@kiku ${a("displayCaptureAll",{count:String(h.length)})}`;t(""),r([]),n(p||"capture all",d,void 0,"capture_all",h)},[n,r,t,a]),c=Ma(()=>{let l=`@kiku ${a("displayViewHistory")}`;t(""),r([]),n("show my saved items",l,void 0,"view_history")},[n,r,t,a]),s=Ma(()=>{let l=`@kiku ${a("displayDelete")}`;t(""),r([]),n("delete this",l,void 0,"delete")},[n,r,t,a]);return{handleKikuCapture:o,handleKikuCaptureAll:i,handleKikuViewHistory:c,handleKikuDelete:s}}import{useState as Ur,useCallback as za,useEffect as qc,useRef as Md}from"react";import{useAkropolysContext as Td}from"@akropolys/sdk";var Ra=null,Sc=null,Ta=null,$n=null,Mc=!1,qr=0;function qn(e,r=130){let t=Ta;if(!t||!Ra)return;let n=Ra.currentTime;t.gain.cancelScheduledValues(n),t.gain.setValueAtTime(t.gain.value,n),t.gain.linearRampToValueAtTime(Math.max(0,Math.min(1,e)),n+r/1e3)}function Tc(){if(!Mc)return qr*=.85,qr;if(!Sc||!$n)return qr;Sc.getByteTimeDomainData($n);let e=0;for(let n=0;n<$n.length;n++){let a=($n[n]-128)/128;e+=a*a}let r=Math.sqrt(e/$n.length),t=Math.min(1,r*3.2);return qr+=(t-qr)*(t>qr?.6:.12),qr}function Rc(){if(Mc=!1,Ta&&Ra&&(Ta.gain.cancelScheduledValues(Ra.currentTime),Ta.gain.value=1),typeof window<"u"&&"speechSynthesis"in window)try{window.speechSynthesis.cancel()}catch{}}import{useCallback as ir,useEffect as Mr,useRef as tt,useState as La}from"react";var id=1100,qo=.012,cd=320,ld=.09,hd=.25,Lc=130,pd=700,dd=12,ud=48,md=.45,bd=.35,fd=.2,Ec=.55;function zc({lang:e,onUtterance:r,onError:t,onBargeIn:n,silenceMs:a=id,paused:o=!1}){let[i,c]=La(!1),[s,l]=La(!1),[h,p]=La(""),[d,u]=La(!1),f=tt(null),C=tt(null),b=tt(null),E=tt(null),x=tt(null),L=tt(null),M=tt(0),w=tt(.008),D=tt(0),H=tt(0),S=tt(""),O=tt(0),v=tt(0),I=tt(!1),q=tt(o),P=tt(!1),J=tt(!1),de=tt(r),te=tt(t),W=tt(n);Mr(()=>{de.current=r},[r]),Mr(()=>{te.current=t},[t]),Mr(()=>{W.current=n},[n]),Mr(()=>{q.current=o},[o]),Mr(()=>{u(typeof window<"u"&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)&&!!navigator.mediaDevices?.getUserMedia)},[]);let le=ir(()=>M.current,[]),X=ir(m=>{let R=E.current;return!R||m.length!==R.frequencyBinCount?!1:(R.getByteFrequencyData(m),!0)},[]),F=ir(()=>E.current?.frequencyBinCount??0,[]),$=tt([]),N=tt(null),T=tt(!1),A=tt(0),j=tt(0),y=ir(m=>{let R=E.current;if(!R)return 0;let V=$.current;V.push(m),V.length>ud&&V.shift();let Q=0;if(V.length>=12){let Se=0;for(let Ne of V)Se+=Ne;if(Se/=V.length,Se>1e-4){let Ne=0;for(let Te of V)Ne+=(Te-Se)*(Te-Se);Q=Math.min(1,Math.sqrt(Ne/V.length)/Se/.6)}}let G=0;(!N.current||N.current.length!==R.frequencyBinCount)&&(N.current=new Uint8Array(R.frequencyBinCount));let ae=N.current;R.getByteFrequencyData(ae);let ce=(b.current?.sampleRate??48e3)/2/ae.length,_=Math.floor(300/ce),ee=Math.min(ae.length-1,Math.ceil(3400/ce)),ve=0,Ie=0;for(let Se=0;Se<ae.length;Se++)Ie+=ae[Se],Se>=_&&Se<=ee&&(ve+=ae[Se]);Ie>0&&(G=ve/Ie);let fe=Math.min(1,m/(w.current+qo*3));return md*fe+bd*Q+fd*G},[]),z=ir(()=>{let m=S.current.trim();if(S.current="",O.current=v.current,p(""),l(!1),m){P.current=!1;let R=f.current;f.current=null;try{R?.stop()}catch{}de.current(m)}},[]),k=ir(()=>{let m=E.current,R=L.current;if(!m||!R)return;m.getByteTimeDomainData(R);let V=0;for(let _=0;_<R.length;_++){let ee=(R[_]-128)/128;V+=ee*ee}let Q=Math.sqrt(V/R.length),G=Math.min(1,Q*4);M.current+=(G-M.current)*(G>M.current?.6:.12);let ae=Date.now(),be=q.current?Tc()*ld:0;Q>w.current+qo+be?(D.current=ae,H.current||(H.current=ae)):(H.current=0,w.current=Math.min(w.current*1.02+2e-5,Math.max(.004,Q))),q.current?T.current?(y(Q)>Ec?j.current+=1:j.current=Math.max(0,j.current-2),j.current>=dd?(T.current=!1,j.current=0,qn(1,0),W.current?.()):ae-A.current>pd&&(T.current=!1,j.current=0,qn(1,Lc*2))):H.current&&ae-H.current>cd&&y(Q)>Ec&&(H.current=0,T.current=!0,A.current=ae,j.current=0,qn(hd,Lc)):S.current.trim()&&ae-D.current>a&&z(),x.current=requestAnimationFrame(k)},[z,a,y]),ie=ir(()=>{if(f.current||!I.current)return;let m=window.SpeechRecognition||window.webkitSpeechRecognition,R=new m;O.current=0,v.current=0,R.lang=e||document.documentElement.lang||navigator.language||"en-US",R.interimResults=!0,R.maxAlternatives=1,R.continuous=!0,R.onresult=V=>{let Q="";for(let G=O.current;G<V.results.length;G++)Q+=V.results[G][0].transcript;v.current=V.results.length,Q=Q.trim(),Q&&(S.current=Q,p(Q),l(!0))},R.onerror=V=>{let Q=V?.error||"";Q==="no-speech"||Q==="aborted"||te.current?.(Q)},R.onend=()=>{f.current=null,I.current&&P.current&&setTimeout(()=>{ie()},120)},f.current=R;try{R.start()}catch{f.current=null,te.current?.("failed-to-start")}},[e]),ne=ir(()=>{P.current=!1;let m=f.current;f.current=null;try{m?.stop()}catch{}},[]),U=ir(()=>{I.current=!1,T.current=!1,j.current=0,$.current=[],qn(1,0),P.current=!1,c(!1),l(!1),p(""),S.current="",M.current=0;let m=f.current;f.current=null;try{m?.abort()}catch{}x.current!==null&&(cancelAnimationFrame(x.current),x.current=null),C.current?.getTracks().forEach(R=>R.stop()),C.current=null,E.current=null,b.current?.close().catch(()=>{}),b.current=null},[]),oe=ir(async()=>{if(!(I.current||!d)){I.current=!0,c(!0);try{let m=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});C.current=m;let R=window.AudioContext||window.webkitAudioContext,V=new R;b.current=V;let Q=V.createAnalyser();Q.fftSize=1024,Q.smoothingTimeConstant=.25,V.createMediaStreamSource(m).connect(Q),E.current=Q,L.current=new Uint8Array(Q.fftSize),w.current=.008,D.current=Date.now(),x.current=requestAnimationFrame(k)}catch(m){I.current=!1,c(!1),te.current?.(m?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}P.current=!0,ie()}},[d,k,ie]);return Mr(()=>{i&&(o?(S.current="",p(""),T.current=!1,j.current=0,$.current=[],ne()):(T.current=!1,D.current=Date.now(),P.current=!0,ie()))},[o,i,ie,ne]),Mr(()=>{if(!i||o)return;let m=setInterval(()=>{let R=!!f.current,V=M.current>w.current+qo;R&&V&&S.current},2e3);return()=>clearInterval(m)},[i,o]),Mr(()=>()=>{U()},[U]),{supported:d,active:i,hearing:s,interim:h,micLevel:le,micSpectrum:X,spectrumBins:F,start:oe,stop:U}}import{useCallback as Ze,useEffect as fn,useRef as Re,useState as Or}from"react";var Nc=[-1,-1,-1,-1,2,4,6,8,-1,-1,-1,-1,2,4,6,8],Ic=[7,8,9,10,11,12,13,14,16,17,19,21,23,25,28,31,34,37,41,45,50,55,60,66,73,80,88,97,107,118,130,143,157,173,190,209,230,253,279,307,337,371,408,449,494,544,598,658,724,796,876,963,1060,1166,1282,1411,1552,1707,1878,2066,2272,2499,2749,3024,3327,3660,4026,4428,4871,5358,5894,6484,7132,7845,8630,9493,10442,11487,12635,13899,15289,16818,18500,20350,22385,24623,27086,29794,32767],Oo=e=>e<0?0:e>88?88:e,Ac=e=>e<-32768?-32768:e>32767?32767:e,On=class{constructor(){this.index=0}encode(r){let t=r.length,n=new Uint8Array(4+(t+1>>1));if(t===0)return n.buffer;let a=r[0];new DataView(n.buffer).setInt16(0,a,!0),n[2]=this.index,n[3]=t&1;let i=this.index;for(let c=0;c<t;c++){let s=Ic[i],l=r[c]-a,h=0;l<0&&(h=8,l=-l);let p=s>>3;l>=s&&(h|=4,l-=s,p+=s),s>>=1,l>=s&&(h|=2,l-=s,p+=s),s>>=1,l>=s&&(h|=1,p+=s),a=Ac(h&8?a-p:a+p),i=Oo(i+Nc[h]),n[4+(c>>1)]|=h<<4*(c&1)}return this.index=i,n.buffer}};function Pc(e){let r=new Uint8Array(e);if(r.length<4)return new Float32Array(0);let t=new DataView(e).getInt16(0,!0),n=Oo(r[2]),a=(r.length-4)*2;r[3]&1&&a>0&&a--;let o=new Float32Array(a);for(let i=0;i<a;i++){let c=r[4+(i>>1)]>>4*(i&1)&15,s=Ic[n],l=s>>3;c&4&&(l+=s),c&2&&(l+=s>>1),c&1&&(l+=s>>2),t=Ac(c&8?t-l:t+l),n=Oo(n+Nc[c]),o[i]=t/32768}return o}function Tr(e,r,t){for(let n=0;n<t.length;n++)e.setUint8(r+n,t.charCodeAt(n))}function _c(e,r=24e3){let t=0;for(let s of e)t+=s.length;let n=new Float32Array(t),a=0;for(let s of e)n.set(s,a),a+=s.length;let o=new ArrayBuffer(44+t*2),i=new DataView(o);Tr(i,0,"RIFF"),i.setUint32(4,36+t*2,!0),Tr(i,8,"WAVE"),Tr(i,12,"fmt "),i.setUint32(16,16,!0),i.setUint16(20,1,!0),i.setUint16(22,1,!0),i.setUint32(24,r,!0),i.setUint32(28,r*2,!0),i.setUint16(32,2,!0),i.setUint16(34,16,!0),Tr(i,36,"data"),i.setUint32(40,t*2,!0);let c=44;for(let s=0;s<t;s++){let l=Math.max(-1,Math.min(1,n[s]));i.setInt16(c,l<0?l*32768:l*32767,!0),c+=2}return new Blob([o],{type:"audio/wav"})}function Fc(e,r=16e3){let t=0;for(let s of e)t+=s.length;let n=new Int16Array(t),a=0;for(let s of e)n.set(s,a),a+=s.length;let o=new ArrayBuffer(44+t*2),i=new DataView(o);Tr(i,0,"RIFF"),i.setUint32(4,36+t*2,!0),Tr(i,8,"WAVE"),Tr(i,12,"fmt "),i.setUint32(16,16,!0),i.setUint16(20,1,!0),i.setUint16(22,1,!0),i.setUint32(24,r,!0),i.setUint32(28,r*2,!0),i.setUint16(32,2,!0),i.setUint16(34,16,!0),Tr(i,36,"data"),i.setUint32(40,t*2,!0);let c=44;for(let s=0;s<t;s++)i.setInt16(c,n[s],!0),c+=2;return new Blob([o],{type:"audio/wav"})}var bn=class{constructor(){this.attempts=0}static canRetry(r){return r===1006||r===1011||r===1012||r===1013}nextDelay(){return[500,1500][this.attempts++]??null}};function Dc(e,r,t){let n=e.map(a=>({...a}));for(let[a,o]of[["user",r],["assistant",t]]){if(!o.trim())continue;let i=-1;for(let c=n.length-1;c>=0;c--)if(n[c].role===a&&!n[c].done){i=c;break}if(i<0&&a==="user"){let c=n.map(s=>s.role).lastIndexOf("user");if(c>=0&&n[c].text===o.trim())continue}i>=0?n[i].text=o.trim():n.push({role:a,text:o.trim(),done:!0})}return n.map(a=>({...a,done:!0}))}var Uo=16e3,Ea=24e3,kd=.08,gd=.12,xd=.03,vd=.08;var yd=.12,wd=500,Cd=6e4,Sd=`
|
|
3
3
|
class KikuCapture extends AudioWorkletProcessor {
|
|
4
4
|
constructor() {
|
|
5
5
|
super();
|
|
6
|
-
this._ratio = sampleRate / ${
|
|
7
|
-
this._chunk = ${Math.round(
|
|
6
|
+
this._ratio = sampleRate / ${Uo};
|
|
7
|
+
this._chunk = ${Math.round(Uo*.04)};
|
|
8
8
|
this._acc = new Int16Array(this._chunk);
|
|
9
9
|
this._n = 0;
|
|
10
10
|
this._pos = 0;
|
|
@@ -32,8 +32,8 @@ class KikuCapture extends AudioWorkletProcessor {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
registerProcessor('kiku-capture', KikuCapture);
|
|
35
|
-
`;function kc(e){return e.proof?["akropolys.token."+e.token,"akropolys.proof."+e.proof]:["akropolys.token."+e.token]}function gc(e,r){let t=e.apiUrl.replace(/\/+$/,""),n=t.endsWith("/voice/live")?t:t+"/voice/live",a=new URL(n,window.location.href);a.protocol=a.protocol==="https:"?"wss:":"ws:",a.searchParams.set("siteId",e.siteId),e.kikuId&&a.searchParams.set("kikuId",e.kikuId),e.sessionId&&a.searchParams.set("sessionId",e.sessionId),e.name&&a.searchParams.set("name",e.name),e.language&&a.searchParams.set("language",e.language),a.searchParams.set("codec","adpcm");let o=r||e.voice;return o&&a.searchParams.set("voice",o),a.toString()}function xc(e){let[r,t]=_r("idle"),[n,a]=_r(!1),[o,i]=_r([]),[c,s]=_r(null),[l,h]=_r(!1),d=Me(null),p=Me(!1),u=Me(new cn),f=Me(()=>!1),C=Me(null),b=Me(null),L=Me(!1),x=Me(0),z=Me(0),S=Me(!1),w=Me(null),_=Me(0),F=Me(!1),T=Me(!1),U=Me(null),M=Me(null),I=Me(null),$=Me(null),P=Me(0),Q=Me(!1),de=Me([]),J=Me(0),W=Me(new Set),he=Me(null),Y=Me(null),D=Me(Ca),H=Me(e);ln(()=>{H.current=e;let j=M.current;if(j)for(let re of j.getAudioTracks())re.enabled=!e.muted},[e]);let N=Me(!1),R=Me([]),A=Me(new Dn),K=Me(null),v=Me(""),E=Me(""),[k,ie]=_r([]),X=Me([]);X.current=k;let V=Me([]),[se,m]=_r([]),g=Me(0),B=Me([]),G=Me(void 0),ae=Me(null),oe=Me([]),xe=Me([]),pe=Xe(()=>{let j=v.current.trim(),re=E.current.trim(),ue=ae.current?Math.max(.1,(Date.now()-ae.current)/1e3):void 0,ee;if(oe.current.length>0)try{let Ee=mc(oe.current,D.current);ee=URL.createObjectURL(Ee)}catch(Ee){console.error("[kiku] failed to encode bot audio wav:",Ee)}let le;if(xe.current.length>0)try{let Ee=bc(xe.current,Ao);le=URL.createObjectURL(Ee)}catch(Ee){console.error("[kiku] failed to encode user audio wav:",Ee)}let ce=B.current.length?B.current:void 0,Ie=G.current;v.current="",E.current="",ae.current=null,oe.current=[],xe.current=[],B.current=[],G.current=void 0,!(!j&&!re&&!ce&&!Ie)&&H.current.onExchange?.({heard:j,said:re,duration:ue,userAudioUrl:le,audioUrl:ee,images:ce,visualization:Ie})},[]),O=Xe(()=>{},[]),Z=Xe(j=>{if(x.current=Date.now(),H.current.muted)return;let re=new Int16Array(j),ue=0;for(let le=0;le<re.length;le+=8){let ce=Math.abs(re[le]);ce>ue&&(ue=ce)}ue>1200&&(_.current=Date.now());let ee=d.current;if(!(!N.current||!ee||ee.readyState!==WebSocket.OPEN)){if(ee.bufferedAmount>256*1024){f.current()||H.current.onError?.("connection");return}xe.current.push(new Int16Array(j.slice(0)));try{ee.send(A.current.encode(new Int16Array(j)))}catch{f.current()||H.current.onError?.("connection")}}},[]),ye=Xe(()=>{R.current=[]},[]),ze=Xe(()=>{let j=U.current;if(K.current&&j&&j.state!=="closed")return K.current;let re=window.AudioContext||window.webkitAudioContext;if(!re)return Promise.resolve(null);let ue=new re({latencyHint:"interactive",sampleRate:Ca});U.current=ue;let ee=URL.createObjectURL(new Blob([ed],{type:"application/javascript"}));return K.current=ue.audioWorklet.addModule(ee).then(()=>ue).catch(()=>null).finally(()=>URL.revokeObjectURL(ee)),K.current},[]),ke=Xe(()=>{typeof window>"u"||ze()},[ze]),we=Xe(()=>{let j=$.current;if(!j)return 0;let re=new Uint8Array(j.fftSize);j.getByteTimeDomainData(re);let ue=0;for(let ee=0;ee<re.length;ee++){let le=(re[ee]-128)/128;ue+=le*le}return Math.min(1,Math.sqrt(ue/re.length)*4)},[]),Ne=r==="speaking"||r==="thinking",Ce=Xe(j=>{let re=Ne?he.current:$.current;return!re||j.length!==re.frequencyBinCount?!1:(re.getByteFrequencyData(j),!0)},[Ne]),be=Xe(()=>(Ne?he.current:$.current)?.frequencyBinCount??0,[Ne]),Pe=Xe(()=>{let j=Y.current,re=U.current;if(!j||!re||re.state==="closed"){P.current=0;for(let le of W.current)try{le.onended=null,le.stop()}catch{}W.current.clear();return}let ue=re.currentTime,ee=ue+Xp;j.gain.cancelScheduledValues(ue),j.gain.setValueAtTime(j.gain.value,ue),j.gain.linearRampToValueAtTime(0,ee),j.gain.setValueAtTime(1,ee);for(let le of W.current)try{le.onended=null,le.stop(ee)}catch{}W.current.clear(),P.current=ee},[]),We=Xe(j=>{let re=U.current,ue=he.current;if(!re||!ue||j.length===0)return;re.state==="suspended"&&re.resume().catch(()=>{});let ee=re.createBuffer(1,j.length,D.current);ee.getChannelData(0).set(j);let le=re.createBufferSource();le.buffer=ee,le.connect(ue);let ce=re.currentTime,Ie=P.current>ce?P.current:ce+Yp;le.start(Ie),P.current=Ie+ee.duration,W.current.add(le),le.onended=()=>{W.current.delete(le),W.current.size===0&&(P.current=0,Q.current=!1,t(Ee=>Ee==="speaking"?"listening":Ee))},t(Ee=>Ee==="speaking"||Ee==="idle"||Ee==="ended"?Ee:"speaking")},[]),He=Xe(()=>{let j=de.current;de.current=[],J.current=0;for(let re of j)We(re)},[We]),_e=Xe(()=>{de.current=[],J.current=0},[]),Tt=Xe(j=>{let re=U.current;if(!re||j.length===0)return;if(P.current>re.currentTime&&de.current.length===0){We(j);return}let ee=Q.current?Kp:Gp;de.current.push(j),J.current+=j.length/D.current,J.current>=ee&&(Q.current=!0,He())},[We,He]),St=Me(null),Ft=Me(null),ct=Xe(()=>{St.current&&(clearInterval(St.current),St.current=null);let j=Ft.current,re=U.current;if(j&&re&&re.state!=="closed"){let ue=re.currentTime;try{j.gain.cancelScheduledValues(ue),j.gain.setValueAtTime(j.gain.value,ue),j.gain.linearRampToValueAtTime(1e-4,ue+.04)}catch{}setTimeout(()=>{try{j.disconnect()}catch{}Ft.current===j&&(Ft.current=null)},50)}},[]),_t=Xe(()=>{},[]),vt=Xe(j=>{C.current!==null&&clearTimeout(C.current),b.current!==null&&clearTimeout(b.current),C.current=b.current=null,L.current=!1,z.current=0,pe();let re=d.current;d.current=null;try{re?.close()}catch{}N.current=!1,R.current=[],K.current=null,Q.current=!1,de.current=[],J.current=0,ct(),Pe(),w.current=null,I.current&&(I.current.port.onmessage=null),I.current?.disconnect(),I.current=null,M.current?.getTracks().forEach(ue=>ue.stop()),M.current=null,$.current=null,he.current=null,Y.current=null,U.current?.close().catch(()=>{}),U.current=null,t(j),a(!1),i([]),p.current=!1,S.current=!1},[pe,Pe,ct]),fe=Xe(()=>{try{d.current?.send(JSON.stringify({type:"close"}))}catch{}try{d.current?.close()}catch{}vt("idle")},[vt]),Oe=Xe(j=>{let re=[...V.current,...X.current.filter(ue=>ue.done)].filter(ue=>ue.text).map(ue=>({role:ue.role,text:ue.text}));try{j.send(JSON.stringify({type:"open",history:re}))}catch{}},[]),pt=Xe(j=>{let re=!1;b.current!==null&&clearTimeout(b.current),b.current=setTimeout(()=>{d.current!==j||N.current||f.current()||(H.current.onError?.("connection"),fe())},3e4),j.binaryType="arraybuffer",A.current=new Dn,j.onopen=()=>{d.current!==j||!S.current||(S.current=!1,Oe(j))},j.onmessage=ue=>{if(d.current!==j)return;if(ue.data instanceof ArrayBuffer){if(!F.current){F.current=!0;let ce=E.current.trim();ce&&ie(Ie=>{let Ee=Ie.slice();for(let Ve=Ee.length-1;Ve>=0;Ve--)Ee[Ve].role==="user"&&!Ee[Ve].done&&(Ee[Ve]={...Ee[Ve],done:!0});return Ee.push({role:"assistant",text:ce,done:!1}),Ee})}!T.current&&_.current&&(T.current=!0,console.log("[kiku] wait from last speech to first audio: "+(Date.now()-_.current)+"ms")),ct();let le=uc(ue.data);oe.current.push(le.slice()),Tt(le);return}let ee;try{ee=JSON.parse(ue.data)}catch{return}switch(ee.type){case"ready":b.current!==null&&clearTimeout(b.current),b.current=null,L.current=!0,x.current=Date.now(),ee.sampleRate&&(D.current=ee.sampleRate,ee.sampleRate!==Ca&&console.warn(`[kiku] live audio rate ${ee.sampleRate} != context ${Ca}; per-buffer resampling will click at every chunk seam`)),typeof ee.secondsLeft=="number"&&s(ee.secondsLeft),h(ee.photos===!0),N.current=!0,t("listening"),ye(),w.current?.(),w.current=null,Vt("connect",!0);break;case"hearing":ae.current||(ae.current=Date.now()),a(!0);break;case"thinking":ae.current||(ae.current=Date.now()),a(!1),t("thinking"),_t(),ee.tool==="visualize"&&m(le=>le.some(ce=>ce.pending)?le:[...le,{id:++g.current,url:"",pending:!0}]);break;case"viz":typeof ee.url=="string"&&ee.url?(G.current=ee.url,m(le=>le.map(ce=>ce.pending?{...ce,url:ee.url,pending:!1}:ce))):m(le=>le.filter(ce=>!ce.pending));break;case"heard":W.current.size===0&&(P.current=0),ae.current||(ae.current=Date.now(),Vt("heard")),v.current+=ee.text,ie(le=>{let ce=le.slice(),Ie=ce[ce.length-1];return Ie&&Ie.role==="user"&&!Ie.done?ce[ce.length-1]={...Ie,text:v.current.trim()}:ce.push({role:"user",text:v.current.trim(),done:!1}),ce}),a(!1),t("thinking"),_t();break;case"said":if(E.current+=ee.text,!F.current)break;ie(le=>{let ce=le.slice();for(let Ve=ce.length-1;Ve>=0;Ve--)ce[Ve].role==="user"&&!ce[Ve].done&&(ce[Ve]={...ce[Ve],done:!0});let Ie=ce[ce.length-1],Ee=E.current.trim();return Ie&&Ie.role==="assistant"&&!Ie.done?ce[ce.length-1]={...Ie,text:Ee}:ce.push({role:"assistant",text:Ee,done:!1}),ce});break;case"interrupted":Q.current=!1,_e(),ct(),Pe(),Vt("interrupt"),a(!1),t("listening");break;case"turn_complete":T.current=!1,F.current=!1,_.current=0,ie(le=>le.map(ce=>ce.done?ce:{...ce,done:!0})),He(),Q.current=!1,ct(),a(!1),pe();break;case"sources":Array.isArray(ee.sources)&&ee.sources.length&&i(ee.sources);break;case"seconds":typeof ee.secondsLeft=="number"&&s(ee.secondsLeft);break;case"refused":H.current.onRefused?.(ee.code||"guest"),fe();break;case"error":if(ee.code==="session_expiring"&&f.current())return;H.current.onError?.(ee.code||"unavailable"),fe();break}},j.onclose=ue=>{d.current===j&&(b.current!==null&&clearTimeout(b.current),b.current=null,!(cn.canRetry(ue.code)&&f.current())&&(ue.code===4402&&(re=!0,H.current.onError?.(ue.reason==="site"?"siteLimit":"limit")),vt("ended")))},j.onerror=()=>{!re&&d.current===j&&console.warn("[kiku] voice transport interrupted")}},[_e,Tt,pe,ye,Pe,He,Oe,_t,ct,fe,vt]),dt=Xe(j=>{let re=d.current;if(d.current=null,N.current=!1,X.current=fc(X.current,v.current,E.current),ie(X.current),m(le=>le.filter(ce=>!ce.pending)),pe(),F.current=!1,T.current=!1,Q.current=!1,_e(),t("connecting"),Pe(),ct(),re){try{re.send(JSON.stringify({type:"close"}))}catch{}try{re.close()}catch{}}let ue=H.current;S.current=!0;let ee=new WebSocket(gc(ue,j),kc(ue));d.current=ee,pt(ee)},[pt,_e,pe,Pe,ct]),nt=Xe(()=>{if(!p.current||!L.current||!I.current)return!1;if(C.current!==null)return!0;let j=u.current.nextDelay();if(j===null)return H.current.onError?.("connection"),fe(),!0;let re=d.current;d.current=null,N.current=!1,b.current!==null&&clearTimeout(b.current),b.current=null;try{re?.close()}catch{}return Pe(),_e(),ct(),a(!1),t("connecting"),C.current=setTimeout(()=>{C.current=null,p.current&&dt()},j),!0},[_e,Pe,dt,fe,ct]);f.current=nt,ln(()=>{let j=()=>{if(!p.current||!N.current||!I.current||document.visibilityState==="hidden")return;let ue=U.current;if(!ue)return;let ee=Date.now();if(ee-x.current<1e4){z.current=0;return}z.current?ee-z.current>1e4&&(H.current.onError?.("audio-capture"),fe()):(z.current=ee,ue.resume().catch(()=>{}))},re=window.setInterval(j,2e3);return document.addEventListener("visibilitychange",j),()=>{clearInterval(re),document.removeEventListener("visibilitychange",j)}},[fe]);let ut=Me(e.voice);ln(()=>{ut.current!==e.voice&&(ut.current=e.voice,d.current&&(r==="listening"||r==="thinking"||r==="speaking")&&dt(e.voice))},[e.voice,r,dt]);let Bt=Xe(async(j=[])=>{if(p.current&&(d.current||C.current!==null))return;p.current=!0,u.current=new cn,L.current=!1,t("connecting");let re=H.current;R.current=[],V.current=j,X.current=[],ie([]),m([]),v.current="",E.current="";let ue=ze();U.current?.resume().catch(()=>{}),mr();let ee=d.current;ee&&ee.readyState===WebSocket.OPEN?Oe(ee):ee&&ee.readyState===WebSocket.CONNECTING?S.current=!0:(ee=new WebSocket(gc(re),kc(re)),d.current=ee,S.current=!0,pt(ee));let le;try{if(!navigator.mediaDevices?.getUserMedia)throw{name:"NotAllowedError"};le=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}})}catch(bt){try{ee.close()}catch{}d.current=null,t("idle"),re.onError?.(bt?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}if(d.current!==ee){le.getTracks().forEach(bt=>bt.stop());return}M.current=le;for(let bt of le.getAudioTracks())bt.enabled=!H.current.muted;let ce=await ue;if(d.current!==ee){le.getTracks().forEach(bt=>bt.stop());return}if(!ce){H.current.onError?.("audio-worklet"),fe();return}ce.state==="suspended"&&ce.resume().catch(()=>{});let Ie=ce.createAnalyser();Ie.fftSize=1024,Ie.smoothingTimeConstant=.25,$.current=Ie;let Ee=ce.createGain();Ee.gain.value=1,Ee.connect(ce.destination),Y.current=Ee;let Ve=ce.createAnalyser();Ve.fftSize=1024,Ve.smoothingTimeConstant=.25,Ve.connect(Ee),he.current=Ve;try{let bt=new AudioWorkletNode(ce,"kiku-capture");I.current=bt,bt.port.onmessage=Or=>Z(Or.data);let ar=ce.createMediaStreamSource(le),Wr=()=>{if(!(d.current!==ee||!I.current)){try{ar.connect(Ie)}catch{}try{ar.connect(bt)}catch{}}};N.current?Wr():w.current=Wr}catch{H.current.onError?.("audio-worklet"),fe()}},[pt,ze,Z,Oe,fe]);ln(()=>{if(r!=="listening"){a(!1);return}let j=0,re=!1,ue=Date.now(),ee=window.setInterval(()=>{let le=Date.now();if(!H.current.muted&&we()>Qp&&(j=le),le-Math.max(j,ue)>Zp){window.clearInterval(ee),H.current.onError?.("idle"),fe();return}let ce=le-j<Jp;ce!==re&&(re=ce,a(ce))},100);return()=>window.clearInterval(ee)},[r,we,fe]);let Dt=Xe(()=>{ke()},[ke]);ln(()=>()=>{fe()},[fe]),ln(()=>{let j=M.current;if(j)for(let re of j.getAudioTracks())re.enabled=!e.muted},[e.muted,r]);let lt=Xe(async j=>{let re=H.current.storeScene;if(!re||!j.type.startsWith("image/"))return!1;let ue;try{ue=await ba(j)}catch{return!1}let ee=++g.current;if(m(ce=>[...ce,{id:ee,url:ue,pending:!1,sending:!0}]),!await re(ue))return m(ce=>ce.filter(Ie=>Ie.id!==ee)),!1;m(ce=>ce.map(Ie=>Ie.id===ee?{...Ie,sending:!1}:Ie)),B.current.push(ue);let le=d.current;return le&&le.readyState===WebSocket.OPEN&&le.send(JSON.stringify({type:"text",text:"(The visitor just attached a photo. You cannot see it. In one short sentence, ask what they would like changed in it.)"})),!0},[]),yt=Xe(j=>{let re=d.current;re&&re.readyState===WebSocket.OPEN&&j.trim()&&re.send(JSON.stringify({type:"text",text:j}))},[]);return{state:r,phase:r,hearing:n,sources:o,secondsLeft:c,photos:l,turns:k,images:se,micLevel:we,micSpectrum:Ce,spectrumBins:be,start:Bt,stop:fe,prewarm:Dt,attachPhoto:lt,ask:yt}}var nd=e=>e==="connecting"||e==="ended"?"idle":e,yc={turns:[],images:[]},wc=()=>`v${Date.now().toString(36)}`;function ad(e,r){let t=[],n=[];for(let a of e)if(a.live===r){a.content&&t.push({role:a.role==="user"?"user":"assistant",text:a.content,done:!0});for(let o of[...a.images??[],...a.visualization?[a.visualization]:[]])n.push({id:-(n.length+1),url:o,pending:!1})}return{turns:t,images:n}}function Cc({voiceLang:e,speechLang:r,shopperLanguage:t,ttsVoice:n="Algenib",messages:a,handleSendUtterance:o,appendSpokenExchange:i}){let c=rd(),[s,l]=Dr("off"),[h,d]=Dr("idle"),[p,u]=Dr(""),[f,C]=Dr(!1),[b,L]=Dr(!1),[x,z]=Dr(()=>{try{let A=localStorage.getItem(mo);if(A&&En.some(K=>K.name===A))return A}catch{}return n||"Algenib"}),S=td(wc()),w=Sa(A=>{z(A);try{localStorage.setItem(mo,A)}catch{}},[]),_=lc({lang:e||r,onUtterance:A=>{d("thinking"),o(A)},onError:A=>{l("off"),d("idle"),u(A==="not-allowed"?"micDenied":A==="language-not-supported"?"micLangUnsupported":A==="audio-capture"?"micMissing":A==="network"?"micNetwork":"micFailed")},onBargeIn:()=>{sc()}}),T=c?.voiceUrl||c?.api?.voiceUrl||c?.api?.apiUrl||c?.apiUrl||"",U=c?.api?.siteId||c?.siteId||"",M=c?.api?.apiToken||c?.apiToken||"",I=c?.getShopperId?.()||c?.getKikuPub?.()||void 0,$=c?.getShopperName?.()||void 0,P=xc({apiUrl:T,siteId:U,token:M,kikuId:I,proof:c?.getUserProof?.()||void 0,sessionId:c?.getSessionId?.()||void 0,storeScene:A=>c?.storeScene?.(A)??Promise.resolve(!1),name:$,language:t,voice:x,muted:f,onExchange:A=>{i(A.heard,A.said,A.duration,A.userAudioUrl,A.audioUrl,{images:A.images,visualization:A.visualization,live:S.current})},onError:A=>{if(A==="shopper_reply_limit"||A==="access_revoked"||A==="account_required"){L(!0),P.stop(),l("off");return}l("off"),u(A==="idle"?"voiceIdleEnded":A==="not-allowed"?"micDenied":A==="audio-capture"?"micMissing":A==="limit"?"voiceLimitReached":A==="siteLimit"?"voiceSiteLimit":A==="connection"||A==="network"?"micNetwork":"voiceUnavailable")},onRefused:A=>{(A==="shopper_reply_limit"||A==="access_revoked"||A==="account_required")&&L(!0),l("off"),u("voiceUnavailable")}}),Q=typeof window<"u"&&!!window.WebSocket&&!!(window.AudioContext||window.webkitAudioContext)&&!!navigator.mediaDevices?.getUserMedia,{prewarm:de}=P;vc(()=>{if(!Q)return;let A=window;if(A.requestIdleCallback){let v=A.requestIdleCallback(de,{timeout:3e3});return()=>A.cancelIdleCallback(v)}let K=window.setTimeout(de,1500);return()=>window.clearTimeout(K)},[Q,de]),vc(()=>{s==="converse"&&P.state==="ended"&&(l("off"),u("voiceSessionEnded"))},[s,P.state]);let[J,W]=Dr(yc),he=Sa(async A=>{if(!hi()){u("micInsecure");return}if(u(""),l(A),A==="dictate")d("listening"),await _.start();else{let K=ad(a,S.current);W(K),P.start(K.turns)}},[P,_,a]),Y=Sa(()=>{P.stop(),S.current=wc(),W(yc),P.start([])},[P]),D=Sa(()=>{l("off"),d("idle"),_.stop(),P.stop()},[P,_]),H=s==="converse"?nd(P.state):s==="dictate"?h==="listening"?_.hearing?"speaking":"listening":h:"idle",N=s==="converse"&&P.state!=="listening"&&P.state!=="thinking"&&P.state!=="speaking";return{attachPhoto:async A=>{await P.attachPhoto(A)||u("voicePhotoFailed")},voiceMode:s,voicePhase:H,voiceConnecting:N,voiceError:p,setVoiceError:u,voiceMuted:f,setVoiceMuted:C,voiceSecondsLeft:P.secondsLeft??null,voiceBlocked:b,liveVoiceName:x,chooseVoice:w,canConverse:Q,startVoice:he,stopVoice:D,voice:_,live:P,earlier:J,newVoiceChat:Y}}import qe from"react";import{useEffect as od,useRef as st}from"react";import{jsx as De,jsxs as At}from"react/jsx-runtime";var Po={idle:{bw:50,bh:60,tr:1,br:.42,bow:3},thinking:{bw:46,bh:46,tr:1,br:1,bow:2},visualizing:{bw:64,bh:42,tr:.42,br:.42,bow:2},speaking:{bw:44,bh:54,tr:.9,br:.9,bow:3},failed:{bw:53,bh:45,tr:.95,br:.55,bow:4},curious:{bw:48,bh:52,tr:.9,br:.7,bow:3},welcoming:{bw:50,bh:58,tr:1,br:.5,bow:2},guiding:{bw:46,bh:50,tr:.8,br:.8,bow:2},happy:{bw:52,bh:56,tr:1,br:.4,bow:4},focused:{bw:48,bh:52,tr:.9,br:.7,bow:2}},Fo={idle:{lid:1,warm:0,breath:2100,wob:1},thinking:{lid:1,warm:.2,breath:1700,wob:1.6},visualizing:{lid:1,warm:.9,breath:1200,wob:2.2},speaking:{lid:1,warm:.35,breath:900,wob:1.8},failed:{lid:.28,warm:0,breath:3e3,wob:.6},curious:{lid:1,warm:.15,breath:1800,wob:1.4},welcoming:{lid:1,warm:.25,breath:1600,wob:1.2},guiding:{lid:1,warm:.2,breath:1500,wob:1.3},happy:{lid:1,warm:.4,breath:1200,wob:1.5},focused:{lid:1,warm:.2,breath:1500,wob:1.2}},Ma=[[0,0,0],[.09,.54,0],[.19,-.36,32],[.31,-.22,58],[.42,-.12,68],[.54,.04,28],[.63,.96,0],[.71,.18,0],[.79,-.16,20],[.88,.34,0],[.95,-.05,4],[1,0,0]],sd=.42,id=170;function cd(e){let r=1;for(;r<Ma.length-1&&Ma[r][0]<e;)r++;let[t,n,a]=Ma[r-1],[o,i,c]=Ma[r],s=o===t?0:(e-t)/(o-t),l=s*s*(3-2*s);return[n+(i-n)*l,a+(c-a)*l]}var Bn=6,Sc=["bw","bh","tr","br","bow","lid","warm","wob","gx","gy"],yr=(e,r,t)=>Math.max(r,Math.min(t,e));function Mc(e,r,t,n){let a=l=>l.toFixed(2),o=(r+t)/2,i=e+n,c=(o-r)*.55,s=(t-o)*.55;return`C${a(e)} ${a(r+c)} ${a(i)} ${a(o-c)} ${a(i)} ${a(o)}C${a(i)} ${a(o+s)} ${a(e)} ${a(t-s)} ${a(e)} ${a(t)}`}function ld(e,r,t,n,a){let o=yr(e*t,8,r*.96),i=yr(e*n,8,r*.96),c=(d,p)=>`${d.toFixed(2)} ${p.toFixed(2)}`,s=.46,l=yr((e-o)/e,0,1),h=yr((e-i)/e,0,1);return`M${c(-e,-r+o)}C${c(-e,-r+o*s)} ${c(-e+o*s,-r)} ${c(-e+o,-r)}C${c(-e*.3*l,-r-2*l)} ${c(e*.3*l,-r-2*l)} ${c(e-o,-r)}C${c(e-o*s,-r)} ${c(e,-r+o*s)} ${c(e,-r+o)}`+Mc(e,-r+o,r-i,a)+`C${c(e,r-i*s)} ${c(e-i*s,r)} ${c(e-i,r)}C${c(e*.3*h,r+2*h)} ${c(-e*.3*h,r+2*h)} ${c(-e+i,r)}C${c(-e+i*s,r)} ${c(-e,r-i*s)} ${c(-e,r-i)}`+Mc(-e,r-i,-r+o,-a)+"Z"}var hn=[{name:"Graphite",color:"#4B5058",light:"#A8AEB6",glow:"rgba(75, 80, 88, 0.26)"},{name:"Mist",color:"#78868F",light:"#BFC9CF",glow:"rgba(120, 134, 143, 0.26)"},{name:"Sandstone",color:"#8A7E71",light:"#CBC1B5",glow:"rgba(138, 126, 113, 0.26)"},{name:"Pewter",color:"#5F6670",light:"#B3BAC3",glow:"rgba(95, 102, 112, 0.26)"}],Bo=[{name:"Aegean",color:"#2E6FB7",light:"#9CC1E6",glow:"rgba(46, 111, 183, 0.30)"},{name:"Fern",color:"#3C8C60",light:"#A2CFB4",glow:"rgba(60, 140, 96, 0.30)"},{name:"Marigold",color:"#C48A22",light:"#EBD095",glow:"rgba(196, 138, 34, 0.30)"},{name:"Coral",color:"#C15A4E",light:"#E9AEA3",glow:"rgba(193, 90, 78, 0.30)"},{name:"Iris",color:"#5F5CC4",light:"#B6B4E8",glow:"rgba(95, 92, 196, 0.30)"}],Hb=[...hn,...Bo];function _o(e){let n=(!Bo.includes(e)&&Math.random()<.26?Bo:hn).filter(a=>a!==e);return n[Math.floor(Math.random()*n.length)]}function rr(e){let r=parseInt(e.slice(1),16);return[r>>16&255,r>>8&255,r&255]}function Do(e){return`rgb(${Math.round(e[0])}, ${Math.round(e[1])}, ${Math.round(e[2])})`}function hd(e,r,t){return[e[0]+(r[0]-e[0])*t,e[1]+(r[1]-e[1])*t,e[2]+(r[2]-e[2])*t]}var pd=[[255,253,248],[247,240,231],[231,218,202],[198,178,156]],Tc=[.05,.15,.42,.74],dd=[.52,.72,.9,1],Rc={color:"#E2581D",light:"#FFBE96",glow:"rgba(226, 88, 29, 0.34)"};function Ec({state:e="idle",size:r=40,alert:t=!1,theme:n,feminine:a,accessories:o,onImpact:i,triggerRef:c,dropIn:s=!1}){let l=st(s),h=st(e);h.current=e;let d=st(t);d.current=t;let p=n==="blush"||a===!0||!!(o?.flower||o?.eyelashes||o?.blush),u=o?.flower??p,f=o?.eyelashes??p,C=o?.blush??p,b=st(null),L=st(null),x=st(null),z=st(null),S=st(null),w=st(null),_=st(null),F=st(null),T=st(null),U=st(null),M=st(null),I=st(null),$=st(null),P=st(null),Q=st([]),de=st([]),J=st(null),W=st(`kiku-${Math.random().toString(36).slice(2,8)}`).current,he=st(i);return he.current=i,od(()=>{let Y=window.matchMedia("(prefers-reduced-motion: reduce)").matches,D={},H={};Sc.forEach(fe=>{D[fe]=Po.idle[fe]??Fo.idle[fe]??0,H[fe]=0});let N=Array.from({length:Bn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),R=Array.from({length:Bn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),A=1800,K=-1,v=0,E=2600,k=0,ie=!1,X=9e3+Math.random()*8e3,V=-1,se=0;l.current&&!Y&&(V=sd,se=performance.now()+id);let m=0,g=0,B=0,G=4200,ae=0,oe=0,xe=0,pe=12e3,O=hn[0],Z=rr(O.color),ye=rr(O.light),ze=[...Z],ke=[...ye],we=2600,Ne=-1/0,Ce=!1,be=0,Pe=!1,We=0,He=0,_e=0,Tt=!1,St=0,Ft=fe=>{fe-Ne<we?(O=_o(O),ze=rr(O.color),ke=rr(O.light),Ne=-1/0):Ne=fe},ct=(fe,Oe,pt,dt)=>{let nt=h.current,ut=Array.from({length:Bn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),Bt=(Dt,lt,yt=0)=>{let j=Math.max(4,54*Math.max(.06,Oe));ut[Dt]={x:lt+pt,y:-4+dt+yt,w:21,h:j,rx:10.5,a:1}};if(nt==="thinking"){let lt=fe%2800/2800,yt=Math.pow(Math.sin(lt*Math.PI*2)*.5+.5,3);for(let j=0;j<4;j++){let re=fe/700+j/4*Math.PI*2,ue=(26-j%2*5)*(1-.94*yt),ee=16+yt*6+Math.sin(fe/420+j)*1.4;ut[j]={x:Math.cos(re)*ue,y:Math.sin(re)*ue*.86+2,w:ee,h:ee,rx:ee/2,a:1}}}else if(nt==="visualizing")ut[0]={x:0,y:-2,w:78,h:26,rx:13,a:1};else if(nt==="speaking")for(let lt=0;lt<5;lt++){let yt=12+Math.abs(Math.sin(fe/150+lt*.9))*26;ut[lt]={x:(lt-4/2)*15,y:-2,w:9,h:yt,rx:4.5,a:1}}else nt==="failed"?(Bt(0,-22,8),Bt(1,22,8)):(Bt(0,-22),Bt(1,22));return ut};c&&(c.current=()=>{if(V>=0){Pe=!0,O=_o(O),ze=rr(O.color),ke=rr(O.light),Ne=-1/0;return}V=0,Ft(We),X=We+4e3});let _t=fe=>{We=fe;let Oe=h.current,pt=Po[Oe]??Po.idle,dt=Fo[Oe]??Fo.idle,nt=Oe==="idle"||Oe==="failed";nt&&!Y&&(fe>E&&(v=(Math.random()-.5)*2,E=fe+1800+Math.random()*3600),D.wantGx=v*5);let ut=d.current?1:0;_e=(_e+(ut-He)*.1)*.88,He+=_e;let Bt=d.current&&!Y?Math.sin(fe/480)*.055*He:0,Dt={bw:pt.bw*(1+He*.34+Bt),bh:pt.bh*(1+He*.2+Bt),tr:pt.tr,br:pt.br,bow:pt.bow,warm:dt.warm,wob:dt.wob,lid:dt.lid,gx:nt&&!Y?v*5:0,gy:nt&&!Y?Math.sin(fe/2600)*2:0};!Y&&nt&&(K<0&&fe>A&&(K=0),K>=0&&(K+=1/7,Dt.lid=dt.lid*Math.abs(K-.5)*2,K>=1&&(K=-1,Dt.lid=dt.lid,A=fe+(Math.random()<.22?340:2600+Math.random()*4200)))),Sc.forEach(Ae=>{let tt=Ae;if(Y){D[tt]=Dt[tt];return}let $e=tt==="lid"?.42:.11,Rt=tt==="lid"?.55:.78;H[tt]=(H[tt]+(Dt[tt]-D[tt])*$e)*Rt,D[tt]+=H[tt]});let lt=0,yt=0;!Y&&d.current&&V<0&&fe>St&&(V=0,St=fe+2100,X=fe+4e3),!Y&&Oe==="idle"?V<0&&fe>X&&(V=0,Ce?(Ce=!1,be=0,O=_o(O),ze=rr(O.color),ke=rr(O.light),Ne=-1/0):(be++,Ft(fe))):V<0&&(X=fe+3e3+Math.random()*3e3),V>=0&&(fe>=se&&(V+=1/96),[lt,yt]=cd(V),V>=1&&(V=-1,lt=0,yt=0,Pe?(Pe=!1,be=0,X=fe+150):!Ce&&be>=2?(Ce=!0,X=fe+240):X=fe+5e3+Math.random()*5e3));let j=Math.max(0,lt);if(d.current!==Tt){Tt=d.current;let Ae=d.current?Rc:O;ze=rr(Ae.color),ke=rr(Ae.light),d.current&&!Y&&(V<0&&(V=0),St=fe+2600)}let re=d.current?Rc:O;if(Y)Z=[...ze],ye=[...ke];else for(let Ae=0;Ae<3;Ae++)Z[Ae]+=(ze[Ae]-Z[Ae])*.055,ye[Ae]+=(ke[Ae]-ye[Ae])*.055;let ue=Do(Z),ee=Do(ye);I.current?.setAttribute("stop-color",ue),$.current?.setAttribute("stop-color",ee),P.current?.setAttribute("stop-color",ee);for(let Ae=0;Ae<4;Ae++){let tt=Tc[Ae]+(dd[Ae]-Tc[Ae])*He;Q.current[Ae]?.style.setProperty("stop-color",Do(hd(pd[Ae],Z,tt)))}let le=.34+Math.sin(fe/1200)*.06,ce=j>.02?Math.min(.72,le+j*.34):le;M.current?.setAttribute("opacity",ce.toFixed(3)),j>.04?he.current?.(j,re.color,re.glow):vt>.04&&he.current?.(0,re.color,re.glow),vt=j;let Ie=Y?0:Math.sin(fe/1900)*.9*D.wob,Ee=D.bw*(1+lt*.55)+Ie*.4,Ve=D.bh*(1-lt*.62),bt=ld(Ee,Ve,yr(D.tr+j*.5,0,1.2),yr(D.br+j*.9,0,1),D.bow+Ie+j*5);b.current?.setAttribute("d",bt),L.current?.setAttribute("d",bt);let ar=Oe==="thinking";ar!==ie&&(ie=ar,J.current?.setAttribute("filter",ar?`url(#${W}-goo)`:"none"));let Wr=ct(fe,D.lid*(1-j*.85),D.gx,D.gy);for(let Ae=0;Ae<Bn;Ae++){let tt=Wr[Ae],$e=N[Ae],Rt=R[Ae];for(let Et of["x","y","w","h","rx","a"]){if(Y){$e[Et]=tt[Et];continue}Rt[Et]=(Rt[Et]+(tt[Et]-$e[Et])*.16)*.74,$e[Et]+=Rt[Et]}let ht=de.current[Ae];ht&&(ht.setAttribute("x",($e.x-$e.w/2).toFixed(2)),ht.setAttribute("y",($e.y-$e.h/2).toFixed(2)),ht.setAttribute("width",Math.max(0,$e.w).toFixed(2)),ht.setAttribute("height",Math.max(0,$e.h).toFixed(2)),ht.setAttribute("rx",Math.max(0,Math.min($e.rx,$e.w/2,$e.h/2)).toFixed(2)),ht.setAttribute("opacity",yr($e.a,0,1).toFixed(2)))}let Or=Y?0:Math.sin(fe/dt.breath)*1.5;!Y&&nt&&V<0?(fe>G&&(B=(Math.random()<.5?-1:1)*(.35+Math.random()*.65),G=fe+2600+Math.random()*4200),fe>pe&&(xe=xe>.1?0:1,pe=fe+(xe>.1?900:9e3+Math.random()*11e3))):(B=0,xe=0),g=(g+(B-m)*.028)*.9,m+=g,oe=(oe+(xe-ae)*.06)*.82,ae+=oe;let Qn=D.bh-Ve,Vr=m*3.4+ae*4.5,Jn=m*2.2+ae*3,jr=ae*2.4;if(x.current?.setAttribute("transform",`translate(${Jn.toFixed(2)} ${(Or+Qn-yt+jr).toFixed(2)}) rotate(${Vr.toFixed(2)} 0 60)`),z.current&&z.current.setAttribute("transform",`translate(${Jn.toFixed(2)} ${(Or+Qn-yt+jr).toFixed(2)}) rotate(${Vr.toFixed(2)} 0 60)`),u&&S.current){let Ae=-Ee*.62,tt=-Ve*.7,$e=-16+(Y?0:Math.sin(fe/1400)*3)+Vr*.4;S.current.setAttribute("transform",`translate(${Ae.toFixed(2)}, ${tt.toFixed(2)}) rotate(${$e.toFixed(2)})`)}if(C&&w.current){let Ae=12+D.gy*.5;w.current.setAttribute("transform",`translate(0, ${Ae.toFixed(2)})`)}if(f&&_.current){let Ae=Oe!=="thinking"&&Oe!=="visualizing"&&Oe!=="speaking";_.current.setAttribute("opacity",Ae?yr(D.lid*1.3,0,1).toFixed(2):"0");let tt=($e,Rt)=>{let ht=Math.max(1,Math.min($e.w,$e.h)/2),Et=$e.y-$e.h/2+ht,Gr="";for(let[Wa,Sr]of[[20,7],[48,8],[76,6.5]]){let pr=Wa*Math.PI/180,Oa=$e.x+Rt*Math.sin(pr)*ht,Va=Et-Math.cos(pr)*ht,ja=$e.x+Rt*Math.sin(pr)*(ht+Sr),Ga=Et-Math.cos(pr)*(ht+Sr)-1.5,dr=$e.x+Rt*Math.sin(pr-.22)*(ht+Sr*.65),Ka=Et-Math.cos(pr-.22)*(ht+Sr*.65);Gr+=` M ${Oa.toFixed(2)} ${Va.toFixed(2)} Q ${dr.toFixed(2)} ${Ka.toFixed(2)} ${ja.toFixed(2)} ${Ga.toFixed(2)}`}return Gr.trim()};F.current?.setAttribute("d",tt(N[0],-1)),T.current?.setAttribute("d",tt(N[1],1))}k=requestAnimationFrame(_t)},vt=0;return k=requestAnimationFrame(_t),()=>cancelAnimationFrame(k)},[u,f,C,p]),At("svg",{className:"hsk-kiku-avatar",width:r,height:r,viewBox:"-100 -100 200 200","aria-hidden":"true",style:{display:"block",overflow:"visible"},children:[At("defs",{children:[De("linearGradient",{id:`${W}-marble`,x1:".2",y1:"0",x2:".42",y2:"1",children:[0,40,82,100].map((Y,D)=>De("stop",{ref:H=>{Q.current[D]=H},offset:`${Y}%`,style:{stopColor:`var(--hsk-marble-${D+1}, #FAF7F2)`}},Y))}),At("linearGradient",{id:`${W}-contact`,x1:"0",y1:"1",x2:"0",y2:"0",children:[De("stop",{ref:I,offset:"0%",stopColor:hn[0].color,stopOpacity:"0.9"}),De("stop",{ref:$,offset:"45%",stopColor:hn[0].light,stopOpacity:"0.5"}),De("stop",{ref:P,offset:"100%",stopColor:hn[0].light,stopOpacity:"0"})]}),At("radialGradient",{id:`${W}-sheen`,cx:".34",cy:".2",r:".55",children:[De("stop",{offset:"0%",stopColor:"#FFFFFF",style:{stopOpacity:"var(--hsk-marble-sheen, .9)"}}),De("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]}),At("linearGradient",{id:`${W}-hibiscus-petal`,x1:"0",y1:"1",x2:"0",y2:"0",children:[De("stop",{offset:"0%",stopColor:"#FF3366"}),De("stop",{offset:"65%",stopColor:"#FF758F"}),De("stop",{offset:"100%",stopColor:"#FFAAA6"})]}),At("radialGradient",{id:`${W}-blush-cheek`,cx:"50%",cy:"50%",r:"50%",children:[De("stop",{offset:"0%",stopColor:"#FB7185",stopOpacity:"0.48"}),De("stop",{offset:"100%",stopColor:"#FB7185",stopOpacity:"0"})]}),De("clipPath",{id:`${W}-skin`,children:De("use",{href:`#${W}-body`})}),At("filter",{id:`${W}-goo`,x:"-50%",y:"-50%",width:"200%",height:"200%",children:[De("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"4",result:"b"}),De("feColorMatrix",{in:"b",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7"})]}),At("mask",{id:`${W}-cut`,children:[De("path",{ref:L,d:"",fill:"#FFFFFF"}),De("g",{ref:J,children:Array.from({length:Bn},(Y,D)=>De("rect",{ref:H=>{de.current[D]=H},fill:"#000000"},D))})]})]}),At("g",{ref:x,mask:`url(#${W}-cut)`,children:[De("path",{id:`${W}-body`,ref:b,d:"",fill:`url(#${W}-marble)`}),At("g",{clipPath:`url(#${W}-skin)`,children:[De("ellipse",{cx:"-14",cy:"-40",rx:"46",ry:"34",fill:`url(#${W}-sheen)`}),De("rect",{ref:M,x:"-100",y:"-20",width:"200",height:"100",fill:`url(#${W}-contact)`,opacity:"0.45"})]})]}),At("g",{ref:z,style:{pointerEvents:"none"},children:[C&&At("g",{ref:w,children:[De("ellipse",{cx:"-28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${W}-blush-cheek)`}),De("ellipse",{cx:"28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${W}-blush-cheek)`})]}),f&&At("g",{ref:_,children:[De("path",{ref:F,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"}),De("path",{ref:T,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"})]}),u&&At("g",{ref:S,className:"hsk-avatar-flower",children:[De("path",{d:"M 0 0 C -12 -7 -15 5 0 0 Z",fill:"#10B981",transform:"translate(6, 4) rotate(-35)"}),[0,72,144,216,288].map(Y=>De("path",{d:"M 0 0 C -6 -13 6 -13 0 0 Z",fill:`url(#${W}-hibiscus-petal)`,stroke:"#FF2A5F",strokeWidth:"0.6",transform:`rotate(${Y-18})`},Y)),De("path",{d:"M 0 0 Q 3 -10 9 -14",stroke:"#F59E0B",strokeWidth:"1.6",strokeLinecap:"round",fill:"none"}),De("circle",{cx:"9",cy:"-14",r:"1.3",fill:"#FDE047"}),De("circle",{cx:"7",cy:"-12",r:"1.1",fill:"#FDE047"}),De("circle",{cx:"6.5",cy:"-15",r:"1.1",fill:"#FDE047"}),De("circle",{cx:"0",cy:"0",r:"2.2",fill:"#881337"})]})]})]})}import{useState as Lc}from"react";import{Fragment as zc,jsx as pn,jsxs as Ta}from"react/jsx-runtime";function Ra({className:e="",compact:r=!1}){let[t,n]=Lc(()=>ia()),[a,o]=Lc(""),i=()=>{let c=!t;qs(c),n(c),Vt(c?"reply":"interrupt",!0),o(Ws())};return Ta("button",{type:"button",className:ne("hsk-cb-sound-pill",r&&"is-compact",t&&"is-on",a&&a!=="running"&&a!=="off"&&"is-blocked",e),onClick:i,role:"switch","aria-checked":t,"aria-label":t?"Mute notification sounds":"Unmute notification sounds",children:[Ta("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[pn("path",{d:"M11 5 6 9H3v6h3l5 4V5Z"}),t?Ta(zc,{children:[pn("path",{className:"hsk-snd-wave",style:{"--hsk-wave":0},d:"M15.5 8.5a5 5 0 0 1 0 7"}),pn("path",{className:"hsk-snd-wave",style:{"--hsk-wave":1},d:"M18.5 5.5a9 9 0 0 1 0 13"})]}):Ta(zc,{children:[pn("line",{className:"hsk-snd-x",x1:"16",y1:"9",x2:"21",y2:"15"}),pn("line",{className:"hsk-snd-x",x1:"21",y1:"9",x2:"16",y2:"15"})]})]}),!r&&pn("span",{children:t?"Sounds":"Muted"})]})}import{useCallback as Nc,useLayoutEffect as ud,useRef as dn}from"react";var md=300,bd=220,fd=120,kd=.45,gd=.4,xd=.25,Ea=e=>Math.min(1,Math.max(0,e));function vd(e,r,t,n){let a=3*e,o=3*(t-e)-a,i=1-a-o,c=3*r,s=3*(n-r)-c,l=1-c-s,h=u=>((i*u+o)*u+a)*u,d=u=>((l*u+s)*u+c)*u,p=u=>(3*i*u+2*o)*u+a;return u=>{let f=u;for(let C=0;C<8;C++){let b=h(f)-u,L=p(f);if(Math.abs(b)<1e-5||Math.abs(L)<1e-6)break;f-=b/L}return d(Ea(f))}}var yd=vd(.32,.72,0,1);function wd(e){let r=e.getBoundingClientRect();return{top:r.top,left:r.left,width:r.width,height:r.height,radius:Math.min(parseFloat(getComputedStyle(e).borderTopLeftRadius)||0,r.height/2)}}function Ic({target:e,trigger:r,shadow:t,radius:n=0,enabled:a,onClosed:o}){let i=dn(null),c=dn(null),s=dn(!1),l=dn(0),h=dn(null),d=dn(o);d.current=o;let p=Nc(x=>{l.current=x;let z=e(),S=i.current,w=c.current;if(!z||!S||!w)return;let _=1-x,F=Math.min(Math.max(S.top,w.top),w.bottom-S.height),T=Math.min(Math.max(S.left,w.left),w.right-S.width),U=(S.top-F)*_,M=(S.left-T)*_,I=Math.max(0,(F-w.top)*_),$=Math.max(0,(T-w.left)*_),P=Math.max(0,(w.right-T-S.width)*_),Q=Math.max(0,(w.bottom-F-S.height)*_),de=S.radius*_+n*x;z.style.clipPath=`inset(${I}px ${P}px ${Q}px ${$}px round ${de}px)`,z.style.translate=M||U?`${M}px ${U}px`:"";let J=t?.();J&&Object.assign(J.style,{left:`${$}px`,top:`${I}px`,width:`${Math.max(0,w.width-$-P)}px`,height:`${Math.max(0,w.height-I-Q)}px`,borderRadius:`${de}px`,translate:z.style.translate}),z.style.setProperty("--hsk-island-content",String(Ea((x-kd)/gd)));let W=String(Ea(x/xd));z.style.opacity=W,J&&(J.style.opacity=W)},[e,t,n]),u=()=>{let x=e();if(x)for(let S of["clip-path","translate","--hsk-island-content","opacity"])x.style.removeProperty(S);let z=t?.();if(z)for(let S of["left","top","width","height","border-radius","translate","opacity"])z.style.removeProperty(S)},f=()=>{h.current!==null&&cancelAnimationFrame(h.current),h.current=null},C=(x,z,S)=>{f();let w=l.current,_=Math.max(fd,z*Math.abs(x-w)),F=performance.now(),T=U=>{let M=Ea((U-F)/_);p(w+(x-w)*yd(M)),M<1?h.current=requestAnimationFrame(T):(h.current=null,S())};p(w),h.current=requestAnimationFrame(T)},b=(x,z)=>{i.current=wd(z),x.style.clipPath="",x.style.translate="",c.current=x.getBoundingClientRect()};return ud(()=>{if(!a)return;let x=e(),z=r();if(!(!x||!z))return s.current=!1,x.style.removeProperty("pointer-events"),b(x,z),l.current=0,C(1,md,u),()=>{f(),u()}},[a]),{close:Nc(()=>{let x=e(),z=a?r():null,S=z?.getBoundingClientRect(),w=S&&S.bottom>0&&S.top<window.innerHeight;if(!x||!z||!w){d.current();return}let _=h.current!==null?l.current:1;b(x,z),s.current=!0,x.style.pointerEvents="none",l.current=_,C(0,bd,()=>d.current())},[a,e,r])}}import{jsx as Je,jsxs as wr}from"react/jsx-runtime";var Ac=!1;function Pc({title:e,logo:r,hasMessages:t,avatarState:n="idle",unread:a=!1,awayFromBottom:o=!1,themeMenuOpen:i=!1,themeMenuClosing:c=!1,onThemeMenuClosed:s,isNarrow:l=!1,currentTheme:h="dark",onJumpToLatest:d,onReset:p,onClose:u,onToggleThemeMenu:f,onSelectTheme:C,themeAttr:b,below:L,layoutControl:x}){let z=kr(),S=qe.useRef(null),w=qe.useRef(null),_=qe.useRef(null),F=qe.useRef(null),[T]=qe.useState(()=>{let g=!Ac;return Ac=!0,g}),U=qe.useRef(null),M=qe.useRef(null),I=z("clearChat"),[$,P]=qe.useState({size:12,compact:!1});qe.useLayoutEffect(()=>{let g=S.current,B=U.current,G=M.current;if(!g||!B||!G)return;let ae=!0,oe=()=>{if(!ae)return;let pe=B.parentElement,O=getComputedStyle(g).gridTemplateColumns.split(" "),Z=parseFloat(O[2])||pe.clientWidth,ye=pe.querySelector(".hsk-cb-exit-btn"),ze=parseFloat(getComputedStyle(pe).gap)||0,ke=Math.max(0,Z-(ye?ye.offsetWidth+ze:0)-30),we=Math.min(12,Math.floor(1200*ke/Math.max(1,G.scrollWidth))/100),Ne=we<10;P(Ce=>Ce.size===we&&Ce.compact===Ne?Ce:{size:we,compact:Ne})};oe();let xe=new ResizeObserver(oe);return xe.observe(g),F.current&&xe.observe(F.current),document.fonts?.ready.then(oe).catch(()=>{}),document.fonts?.addEventListener("loadingdone",oe),()=>{ae=!1,xe.disconnect(),document.fonts?.removeEventListener("loadingdone",oe)}},[I,t,l,e,r]),qe.useLayoutEffect(()=>{let g=S.current,B=F.current,G=w.current;if(!g||!B||!G)return;let ae=B.offsetParent;if(!ae)return;let oe=ae.offsetTop+B.offsetTop+B.offsetHeight/2;g.style.setProperty("--hsk-tray-top",`${oe}px`),g.style.setProperty("--hsk-tray-head",`${B.offsetHeight/2+8}px`),g.style.setProperty("--hsk-tray-h",`${G.offsetHeight}px`),g.style.setProperty("--hsk-tray-w",`${G.offsetWidth}px`)},[i,l]);let[Q]=qe.useState(()=>typeof window<"u"&&!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches),[de,J]=qe.useState(!1);qe.useEffect(()=>{if(!l||de)return;let g=window.requestIdleCallback,B=g?g(()=>J(!0),{timeout:1200}):setTimeout(()=>J(!0),600);return()=>{let G=window.cancelIdleCallback;g&&G?G(B):clearTimeout(B)}},[l,de]);let W=l&&(i||de),he=Ic({target:qe.useCallback(()=>w.current,[]),trigger:qe.useCallback(()=>F.current,[]),shadow:qe.useCallback(()=>_.current,[]),radius:18,enabled:l&&i&&Q,onClosed:()=>s?.()});qe.useEffect(()=>{l&&c&&he.close()},[c,l]);let[Y,D]=qe.useState(!1),[H,N]=qe.useState("#134e3d"),[R,A]=qe.useState("rgba(19, 78, 61, 0.45)"),K=qe.useRef(void 0),v=qe.useRef(null),E=qe.useRef(!1),k=qe.useRef(0),ie=qe.useCallback(()=>{E.current=!1,k.current=Date.now(),v.current=setTimeout(()=>{if(E.current=!0,typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}f?.()},350)},[f]),X=qe.useCallback(()=>{v.current&&(clearTimeout(v.current),v.current=null)},[]),V=qe.useCallback(()=>{v.current&&(clearTimeout(v.current),v.current=null)},[]),se=qe.useCallback(g=>{if(E.current){E.current=!1,g.preventDefault(),g.stopPropagation();return}o?d?.():l?f?.():K.current?.()},[o,l,d,f]),m=qe.useCallback((g,B,G)=>{g>.04?(D(!0),N(B),A(G)):D(!1)},[]);return wr("div",{ref:S,className:ne("hsk-cb-topbar",l&&i&&"is-docked"),children:[Je("div",{className:"hsk-cb-topbar-left",style:{minWidth:"34px"},children:l&&Je("button",{type:"button",className:"hsk-cb-back",onClick:u,"aria-label":z("back"),children:Je("span",{className:"hsk-cb-back-icon",children:Je(Zr,{})})})}),wr("div",{className:ne("hsk-cb-topbar-mark",l&&i&&"is-oozing"),"data-impacting":Y?"true":"false",style:{"--hsk-contact-color":H,"--hsk-contact-glow":R},"data-unread":a?"true":"false",onTouchStart:ie,onTouchEnd:X,onTouchMove:V,onTouchCancel:V,onClick:se,role:"button",tabIndex:0,"aria-label":o?z("jumpToLatest"):`${e} (tap for themes)`,children:[Je(Ec,{state:n,size:34,theme:h,alert:a,onImpact:m,triggerRef:K,dropIn:T}),Je("div",{className:"hsk-cb-topbar-identity",children:r?Je("img",{ref:F,className:"hsk-cb-topbar-logo",src:r,alt:e}):Je("span",{ref:F,className:"hsk-cb-topbar-name",children:e})})]}),wr("div",{className:"hsk-cb-topbar-actions",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t&&wr("button",{ref:U,type:"button",className:ne("hsk-cb-topbar-btn",$.compact&&"is-compact"),onClick:p,title:I,"aria-label":I,children:[Je("span",{ref:M,className:"hsk-cb-clear-measure","aria-hidden":"true",children:I}),$.compact?Je(ua,{}):Je("span",{className:"hsk-cb-topbar-btn-label",style:{fontSize:$.size},children:I})]}),!l&&Je("button",{type:"button",className:"hsk-cb-squircle-btn hsk-cb-exit-btn",onClick:u,"aria-label":"Close Chat",children:Je(Jr,{})})]}),l&&i&&Je("div",{className:ne("hsk-cb-topbar-scrim",c&&"is-closing"),onClick:f,"aria-hidden":"true"}),W&&Je("div",{className:ne("hsk-cb-tray-shadow",!i&&"is-parked"),"aria-hidden":"true",children:Je("div",{ref:_})}),W&&Je("div",{ref:w,className:ne("hsk-cb-topbar-ooze-menu",c&&"is-closing",Q&&"is-island",!i&&"is-parked"),role:"dialog","aria-label":"Theme selector",style:{position:"absolute",left:"50%",transform:"translateX(-50%)",zIndex:1e3},onPointerDown:g=>g.stopPropagation(),onClick:g=>g.stopPropagation(),onMouseDown:g=>g.stopPropagation(),children:wr("div",{className:"hsk-cb-theme-block",children:[wr("div",{className:"hsk-cb-tray-aside",children:[Je(Ra,{compact:!0}),Je("span",{className:"hsk-cb-tray-rule","aria-hidden":"true"}),Je("span",{className:"hsk-cb-theme-vlabel","aria-hidden":"true",children:"Themes"})]}),Je("div",{className:"hsk-cb-theme-2x2-grid",children:tn.map(({id:g,label:B,Icon:G})=>wr("button",{type:"button",className:ne("hsk-cb-theme-grid-item",h===g&&"is-active"),onClick:ae=>{ae.stopPropagation(),C?.(g)},children:[Je(G,{}),Je("span",{children:B})]},g))}),x&&wr("div",{className:"hsk-cb-dock-layout",children:[Je("span",{className:"hsk-cb-layout-label",children:"RESPONSIVE LAYOUT"}),x]})]})}),l&&i&&L&&Je("div",{className:ne("hsk-cb-tray-below",c&&"is-closing"),children:L})]})}import Hr from"react";import La from"react";import{jsx as Bc,jsxs as Ed}from"react/jsx-runtime";var Fc=83,Cd=2,Na=240,$o=160,zt=Na/2,gt=$o/2,ir=24,un=50,mn=56,qo=124,kn=22,Gt=6,Uo=13,Sd=30,nr=(e,r,t)=>e+(r-e)*t,$n=(e,r)=>Math.sin(e*12.9898+r*78.233)*.5;function Hc(e,r,t,n,a,o=0){let i=[];for(let l=0;l<16;l++){let h=l/16*Math.PI*2,d=1+Math.sin(l*2.3+1.7)*.06+Math.sin(l*5.1)*.03+$n(e.n,l)*.02;i.push([r+Math.cos(h+o)*n*d,t+Math.sin(h+o)*a*d])}let c=(l,h)=>[(l[0]+h[0])/2,(l[1]+h[1])/2],{ctx:s}=e;s.beginPath(),s.moveTo(...c(i[15],i[0]));for(let l=0;l<16;l++)s.quadraticCurveTo(i[l][0],i[l][1],...c(i[l],i[(l+1)%16]));s.closePath()}function Aa(e,r){let{ctx:t,dpr:n}=e;t.shadowColor=`rgba(0,0,0,${.5-r*.22})`,t.shadowBlur=(4+r*14)*n,t.shadowOffsetX=(1.5+r*13)*n,t.shadowOffsetY=(2.5+r*17)*n}function jo(e,r,t,n){let a=e.ctx.createRadialGradient(r-n*.35,t-n*.4,0,r,t,n*1.15);return a.addColorStop(0,e.light),a.addColorStop(.35,e.clay),a.addColorStop(1,e.dark),a}function Md(e,r,t){let n=e.ctx.createLinearGradient(0,r-t/2,0,r+t/2);return n.addColorStop(0,e.clay),n.addColorStop(.25,e.light),n.addColorStop(.5,e.clay),n.addColorStop(1,e.dark),n}function Br(e,r,t=0){let{ctx:n}=e,a=r*(1+t*.3);n.save(),Aa(e,t),n.fillStyle=jo(e,zt,gt,a),Hc(e,zt,gt,a,a,e.n*.03),n.fill(),n.restore()}function Ho(e,r,t,n){let{ctx:a}=e;a.save(),n!==void 0&&(a.beginPath(),a.rect(0,0,Na,n),a.clip()),Aa(e,0),a.fillStyle=jo(e,zt,gt,Math.max(r,t)),Hc(e,zt,gt,r,t),a.fill(),a.restore()}function za(e,r,t,n,a,o=a/2,i=a/2){let{ctx:c}=e;c.save(),Aa(e,0),c.fillStyle=Md(e,n,a),c.beginPath(),c.roundRect(r+$n(e.n,r)*.6,n-a/2+$n(e.n,n)*.6,t-r,a,[o,i,i,o]),c.fill(),c.restore()}function Wo(e,r,t,n,a=0){let{ctx:o}=e,i=n*(1+a*.2);o.save(),Aa(e,a),o.fillStyle=jo(e,r,t,i),o.beginPath(),o.arc(r,t,i,0,Math.PI*2),o.fill(),o.restore(),o.save(),o.strokeStyle=e.dark,o.lineWidth=1.4,o.lineCap="round",o.beginPath();for(let c=0;c<=1.001;c+=.04){let s=c*Math.PI*5+r*.3,l=(1.5+c*(n-4))*(1+a*.2),h=r+Math.cos(s)*l,d=t+Math.sin(s)*l;c===0?o.moveTo(h,d):o.lineTo(h,d)}o.stroke(),o.restore()}function Ia(e,r){let{ctx:t}=e;t.save(),t.strokeStyle=`rgba(${e.ink},${.55*r})`,t.lineWidth=2,t.lineCap="round";for(let n=0;n<7;n++){let a=n/7*Math.PI*2+.14,o=38+(1-r)*8,i=n%2?5:8;t.beginPath(),t.moveTo(zt+Math.cos(a)*o,gt+Math.sin(a)*o),t.lineTo(zt+Math.cos(a)*(o+i),gt+Math.sin(a)*(o+i)),t.stroke()}t.restore()}var Oo=e=>zt-qo/2+qo*e/Gt;function Td(e,r){let{ctx:t}=e;t.save(),t.strokeStyle=e.dark,t.lineWidth=1.5,t.lineCap="round",t.beginPath(),t.moveTo(r,gt-kn/2+2),t.lineTo(r+$n(e.n,r)*1.5,gt+kn/2-2),t.stroke(),t.restore()}var Vo=e=>zt+(e-(Gt-1)/2)*Sd;function Hn(e,r,t=-1,n=-1){for(let a=0;a<Gt;a++){let o=0;for(let s=0;s<r;s++)o+=a<=s?-2:2;let i=Oo(a)+o,c=Oo(a+1)+o;a===n?Wo(e,nr((i+c)/2,Vo(a),.5),gt-4,Uo,.5):a<=t?Wo(e,Vo(a),gt,Uo):za(e,i,c,gt,kn,a===0?kn/2:2,a===Gt-1?kn/2:2)}}function Rd(){let e=[];for(let n=0;n<5;n++)e.push({draw:a=>Br(a,ir)});let r=[[ir,ir,34,38],[34,38,44,48],[44,48,un,mn]];for(let[n,a,o,i]of r){for(let c=0;c<3;c++){let s=(c+1)/3,l=c===0?1.05:1;e.push({hold:1,thump:c===0?.25:void 0,draw:h=>Ho(h,nr(n,o,s),nr(a,i,s)*l)})}e.push({hold:1,draw:c=>Ho(c,o,i)})}let t=0;for(let n=0;n<12;n++){let a=(n+1)/12,o=nr(gt+mn,gt-mn,a),i=nr(8,24,a),c=(o-gt)/mn;t=Math.max(t,2*un*Math.sqrt(Math.max(0,1-c*c)),30);let s=t;e.push({draw:l=>{a<1&&Ho(l,un,mn,o-i*.3),za(l,zt-s/2,zt+s/2,o,i)}})}for(let n of[.5,1])e.push({draw:a=>za(a,zt-un,zt+un,nr(gt-mn,gt,n),24)});for(let n=0;n<6;n++){let a=(n+1)/6,o=nr(2*un,qo,a),i=nr(24,kn,a),c=n%2?2:-2;e.push({draw:s=>za(s,zt-o/2+c,zt+o/2+c,gt,i)})}for(let n=1;n<Gt;n++)e.push({draw:a=>{Hn(a,n-1),Td(a,Oo(n))}}),e.push({thump:.35,draw:a=>Hn(a,n)});e.push({draw:n=>Hn(n,Gt-1)});for(let n=0;n<Gt;n++)e.push({thump:.12,draw:a=>Hn(a,Gt-1,n-1,n)});for(let n=0;n<4;n++)e.push({draw:a=>Hn(a,Gt-1,Gt-1)});for(let n of[.35,.7,1])e.push({draw:a=>{for(let o=0;o<Gt;o++)Wo(a,nr(Vo(o),zt,n),gt,nr(Uo,10,n),.4)}});return e.push({thump:1,draw:n=>{Br(n,ir*1.3),Ia(n,1)}}),e.push({draw:n=>{Br(n,ir*1.12),Ia(n,.4)}}),e.push({draw:n=>Br(n,ir*1.04)}),e}var bn=Rd(),_c=[...[1.6,1.25,.9,.5,.18].map(e=>({draw:r=>Br(r,ir,e)})),{thump:.7,draw:e=>{Br(e,ir*1.24),Ia(e,1)}},{draw:e=>{Br(e,ir*1.08),Ia(e,.4)}}],Dc=[1,.7,.35,0];function fn(e,r){let t=document.createElement("span");t.style.display="none",t.style.color=r,e.parentElement?.appendChild(t);let n=getComputedStyle(t).color;return t.remove(),n}function $c({phase:e,label:r,theme:t}){let n=La.useRef(null),a=La.useRef(null),o=La.useRef({n:0,at:0,held:0,entered:!1,last:bn[0]});return La.useEffect(()=>{let i=n.current,c=a.current,s=i?.getContext("2d");if(!i||!s||!c)return;let l=Math.min(window.devicePixelRatio||1,3);i.width=Na*l,i.height=$o*l;let h="var(--hsk-primary, #ff6a33)",d={ctx:s,dpr:l,n:0,clay:fn(i,h),light:fn(i,`color-mix(in srgb, ${h} 55%, white)`),dark:fn(i,`color-mix(in srgb, ${h} 70%, black)`),ink:getComputedStyle(i).getPropertyValue("--hsk-doodle-ink").trim()||"31, 31, 31"},p=o.current,u="",f=()=>{let w=getComputedStyle(i).getPropertyValue("--hsk-primary").trim()||"#ff6a33";w!==u&&(u=w,d.clay=fn(i,w),d.light=fn(i,`color-mix(in srgb, ${w} 55%, white)`),d.dark=fn(i,`color-mix(in srgb, ${w} 70%, black)`),d.ink=getComputedStyle(i).getPropertyValue("--hsk-doodle-ink").trim()||"31, 31, 31")},C=(w,_=1)=>{f(),s.setTransform(l,0,0,l,0,0),s.clearRect(0,0,Na,$o),s.globalAlpha=_,d.n=p.n++,w.draw(d),s.globalAlpha=1},b=w=>{let _=i.getBoundingClientRect();Oi({x:_.left+_.width/2,y:_.top+_.height/2,strength:w}),c.style.translate="0 1px",c.style.rotate=`${$n(p.n,4)*.8}deg`};if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){C(bn[0]);let w=window.setInterval(()=>C(bn[0]),Fc);return()=>clearInterval(w)}let L=e==="exit"?null:e==="enter"&&!p.entered?_c:bn;L&&(p.at=0);let x=0,z=0,S=()=>{if(c.style.translate="",c.style.rotate="",!L){x===0&&b(.6),C(p.last,Dc[x]),++x>=Dc.length&&clearInterval(z);return}let w=L[p.at];C(w),p.last=w,w.thump&&p.held===0&&b(w.thump),!(L===bn&&++p.held<(w.hold??Cd))&&(p.held=0,!(++p.at<L.length)&&(L===_c&&(p.entered=!0),L=bn,p.at=0))};return S(),z=window.setInterval(S,Fc),()=>clearInterval(z)},[e==="exit",t]),Ed("div",{className:"hsk-clay",children:[Bc("canvas",{className:"hsk-clay-table",ref:n,"aria-hidden":"true"}),Bc("p",{className:"hsk-lang-preparing",ref:a,children:r})]})}import{jsx as ve,jsxs as Ze}from"react/jsx-runtime";function Ld(){return ve("span",{className:"hsk-cb-check","aria-hidden":"true",children:ve("svg",{viewBox:"0 0 16 16",children:ve("path",{d:"M3.5 8.4 6.6 11.4 12.6 4.8"})})})}function qc({theme:e,inOnboarding:r,justCompleted:t,onboardingMood:n,awaitingLang:a,awaitingName:o,awaitingEntityLang:i,awaitingConsent:c,termsAgreed:s,shopperLanguage:l,pendingLanguage:h,shopperName:d,entityLangPref:p,chromeReady:u,activeChips:f,speechLang:C,t:b,tNode:L,chooseLanguage:x,langSwitching:z=!1,isLangPreparing:S,chooseEntityLang:w,agreeTerms:_,handleSend:F}){let T=h||l,U=!T||T.toLowerCase()==="english"||T.toLowerCase()==="en",M=S??(z||!!h||!!l&&!u&&!U),I=Rr(T),[$,P]=Hr.useState(M),[Q,de]=Hr.useState(()=>M?"spinner-steady":"idle"),J=Hr.useRef([]),W=()=>{J.current.forEach(clearTimeout),J.current=[]};M!==$&&(P(M),W(),M?(de("step1-exit"),J.current.push(setTimeout(()=>de("spinner-enter"),280)),J.current.push(setTimeout(()=>de("spinner-steady"),960))):(de("spinner-exit"),J.current.push(setTimeout(()=>de("idle"),460)))),Hr.useEffect(()=>()=>W(),[]);let he=Q==="spinner-enter"||Q==="spinner-steady"||Q==="spinner-exit",Y=Q==="step1-exit",D=he||Y||!l||a?"1":!d||o?"2":!p||i?"3":!s||c?"4":null,[H,N]=Hr.useState(null),[R,A]=Hr.useState(3);Hr.useEffect(()=>{if(!c)return;A(3);let v=setInterval(()=>{A(E=>E<=1?(clearInterval(v),0):E-1)},1e3);return()=>clearInterval(v)},[c]);let K=l?Tn(l,C)||l.charAt(0).toUpperCase()+l.slice(1):"";return ve("div",{className:"hsk-cb-empty",children:Ze("div",{className:"hsk-cb-onboarding-card",children:[D&&ve("div",{className:"hsk-cb-onboarding-head",children:Ze("span",{className:"hsk-cb-step-badge",dir:"ltr",children:[D," / 4"]})}),he?ve("div",{className:ne("hsk-lang-loader",Q==="spinner-enter"&&"hsk-lang-loader--enter",Q==="spinner-exit"&&"hsk-lang-loader--exit"),children:ve($c,{theme:e,phase:Q==="spinner-exit"?"exit":Q==="spinner-enter"?"enter":"steady",label:I.preparing})},"spinner-loading"):Y||a||!l?Ze("div",{className:ne("hsk-cb-hello-wrap",Y&&"hsk-step1-exit"),children:[ve("h2",{className:"hsk-cb-hello",children:"Which language do you want to use?"}),Ze("div",{className:"hsk-cb-lang-chips",children:[pa.map((v,E)=>ve("button",{type:"button",className:"hsk-cb-lang-chip",style:{"--hsk-pill-idx":E},lang:v.tag,dir:v.rtl?"rtl":"ltr",disabled:z,onClick:()=>!z&&x(v.value),children:v.native},v.value)),ve("span",{className:"hsk-cb-lang-chips-hint",style:{"--hsk-pill-idx":pa.length},children:"or type another one"})]})]},"step-lang"):o||!d?Ze("div",{className:"hsk-cb-hello-wrap hsk-cb-name-step hsk-step-enter",children:[ve("h2",{className:"hsk-cb-hello",children:b("nameStepTitle")}),ve("p",{className:"hsk-cb-hello-ask",children:b("nameStepAsk")}),ve("p",{className:"hsk-cb-hello-hint",children:b("nameStepHint")})]},"step-name"):i?Ze("div",{className:"hsk-cb-hello-wrap",children:[ve("h2",{className:"hsk-cb-hello",children:b("howShouldResultsLook")}),ve("p",{className:"hsk-cb-hello-lead",children:L("entityLangIntro",{lang:K})}),ve("div",{className:"hsk-cb-entlang-opts",role:"radiogroup","aria-label":b("howShouldResultsLook"),children:["translated","original"].map((v,E)=>Ze("button",{type:"button",role:"radio","aria-checked":(H??p)===v,className:ne("hsk-cb-entlang-opt",(H??p)===v&&"is-selected"),style:{"--hsk-opt-idx":E},onClick:()=>N(v),children:[ve(Ld,{}),Ze("span",{className:"hsk-cb-entlang-opt-text",children:[ve("span",{className:"hsk-cb-entlang-opt-title",children:v==="translated"?L("inLanguage",{lang:K}):b("asWritten")}),ve("span",{className:"hsk-cb-entlang-opt-note",children:b(v==="translated"?"detailsTranslated":"namesAsWritten")})]})]},v))}),ve("div",{className:"hsk-cb-terms-action-wrap",children:ve("button",{type:"button",className:ne("hsk-cb-terms-agree-btn",H&&"is-active"),disabled:!H,onClick:()=>H&&w(H),children:b("continueButton")})})]},"step-entity-lang"):c?Ze("div",{className:"hsk-cb-hello-wrap",children:[ve("h2",{className:"hsk-cb-hello",children:b("termsStepTitle")}),ve("p",{className:"hsk-cb-hello-lead",children:b("termsStepSubtitle")}),Ze("div",{className:"hsk-cb-terms-sanctuary",children:[Ze("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":0},children:[Ze("div",{className:"hsk-cb-terms-head",children:[ve("span",{className:"hsk-cb-terms-numeral",children:"I"}),ve("h3",{className:"hsk-cb-terms-title",children:b("termsPiiTitle")})]}),ve("p",{className:"hsk-cb-terms-desc",children:b("termsPiiDesc")})]}),ve("div",{className:"hsk-cb-terms-divider"}),Ze("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":1},children:[Ze("div",{className:"hsk-cb-terms-head",children:[ve("span",{className:"hsk-cb-terms-numeral",children:"II"}),ve("h3",{className:"hsk-cb-terms-title",children:b("termsSessionTitle")})]}),ve("p",{className:"hsk-cb-terms-desc",children:b("termsSessionDesc")})]}),ve("div",{className:"hsk-cb-terms-divider"}),Ze("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":2},children:[Ze("div",{className:"hsk-cb-terms-head",children:[ve("span",{className:"hsk-cb-terms-numeral",children:"III"}),ve("h3",{className:"hsk-cb-terms-title",children:b("termsMemoryTitle")})]}),ve("p",{className:"hsk-cb-terms-desc",children:b("termsMemoryDesc")})]}),ve("div",{className:"hsk-cb-terms-divider"}),Ze("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":3},children:[Ze("div",{className:"hsk-cb-terms-head",children:[ve("span",{className:"hsk-cb-terms-numeral",children:"IV"}),ve("h3",{className:"hsk-cb-terms-title",children:b("termsCookieTitle")})]}),ve("p",{className:"hsk-cb-terms-desc",children:b("termsCookieDesc")})]}),ve("div",{className:"hsk-cb-terms-divider"}),Ze("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":4},children:[Ze("div",{className:"hsk-cb-terms-head",children:[ve("span",{className:"hsk-cb-terms-numeral",children:"V"}),ve("h3",{className:"hsk-cb-terms-title",children:b("termsAiTitle")})]}),ve("p",{className:"hsk-cb-terms-desc",children:b("termsAiDesc")})]})]}),Ze("p",{className:"hsk-cb-terms-more",children:[b("privacyMore")," ",ve("a",{href:"https://akropolys.cloud/privacy",target:"_blank",rel:"noopener noreferrer",dir:"ltr",children:"akropolys.cloud/privacy"})]}),ve("div",{className:"hsk-cb-terms-action-wrap",children:ve("button",{type:"button",className:ne("hsk-cb-terms-agree-btn",R===0&&"is-active"),disabled:R>0,onClick:_,children:R>0?b("termsAgreeCounting",{seconds:String(R)}):b("termsAgreeButton")})})]},"step-terms"):t?Ze("div",{className:"hsk-cb-hello-wrap",children:[ve("h2",{className:"hsk-cb-hello",children:L("allSet",{name:d})}),ve("p",{className:"hsk-cb-hello-lead",children:p==="translated"?L("replyingTranslated",{lang:K}):L("replyingOriginal",{lang:K})})]},"step-completed"):d?Ze("div",{className:"hsk-cb-hello-wrap",children:[ve("h2",{className:"hsk-cb-hello",children:L("greetReturning",{name:d})}),ve("p",{className:"hsk-cb-hello-lead",children:b("greetReturningLead")})]},"step-returning"):Ze("div",{className:"hsk-cb-hello-wrap",children:[Ze("h2",{className:"hsk-cb-hello",children:["Hello, I am ",ve("b",{children:"kiku"}),"."]}),ve("p",{className:"hsk-cb-hello-lead",children:"Ask me to find, show or save anything. I look through this whole website for you."})]},"step-initial"),!r&&(f?.length??0)>0&&ve("div",{className:"hsk-cb-chips",children:f.map((v,E)=>ve("button",{className:"hsk-cb-chip",style:{"--hsk-pill-idx":E},onClick:()=>F(v),children:v},v))})]})})}import{jsx as qn,jsxs as zd}from"react/jsx-runtime";function Go({wide:e,onToggle:r}){return zd("button",{type:"button",className:"hsk-cb-sound-pill hsk-cb-layout-toggle",role:"switch","aria-checked":e,"aria-label":"Wide AI responses",onClick:r,children:[qn("span",{className:"hsk-cb-layout-track","aria-hidden":"true",children:qn("span",{className:"hsk-cb-layout-thumb",children:qn("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:qn("path",{d:"M3 4h10M3 8h10M3 12h7"})})})}),qn("span",{children:"Wide"})]})}import{useEffect as Uc,useLayoutEffect as Nd,useRef as Ko,useState as Id}from"react";var Wc="akropolys_chat_layout";function Oc(e){let[r,t]=Id(()=>{try{return typeof window<"u"&&localStorage.getItem(Wc)==="wide"}catch{return!1}}),n=Ko(null),a=Ko([]),o=Ko(new Map),i=()=>{a.current.forEach(s=>s.cancel()),o.current.clear(),e.current?.querySelectorAll(".hsk-cb-msg-group").forEach(s=>o.current.set(s,s.getBoundingClientRect()));let c=e.current;if(c){let s=c.getBoundingClientRect().top,l=Array.from(c.querySelectorAll(".hsk-cb-msg-group")).find(h=>h.getBoundingClientRect().bottom>s);n.current={node:l,top:l?l.getBoundingClientRect().top-s:0,bottom:c.scrollHeight-c.scrollTop-c.clientHeight<40}}t(s=>!s)};return Nd(()=>{let c=n.current,s=e.current;if(!c||!s)return;n.current=null;let l=s.style.scrollBehavior;if(s.style.scrollBehavior="auto",c.bottom?s.scrollTop=s.scrollHeight:c.node?.isConnected&&(s.scrollTop+=c.node.getBoundingClientRect().top-s.getBoundingClientRect().top-c.top),s.style.scrollBehavior=l,a.current.forEach(h=>h.cancel()),a.current=[],!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){let h=s.getBoundingClientRect();for(let d of s.querySelectorAll(".hsk-cb-msg-group")){let p=d.getBoundingClientRect();if(p.bottom<h.top||p.top>h.bottom||!d.animate)continue;let u=o.current.get(d);!u||!p.width||!p.height||a.current.push(d.animate([{transformOrigin:"top left",transform:`translate(${u.left-p.left}px, ${u.top-p.top}px) scale(${u.width/p.width}, ${u.height/p.height})`},{transformOrigin:"top left",transform:"none"}],{duration:360,easing:"cubic-bezier(.4,0,.2,1)"}))}}},[r,e]),Uc(()=>{try{localStorage.setItem(Wc,r?"wide":"bubbles")}catch{}},[r]),Uc(()=>()=>a.current.forEach(c=>c.cancel()),[]),{wide:r,toggle:i}}import{useState as Vc,useEffect as Ad,useRef as Pd}from"react";import{jsx as Yo,jsxs as jc}from"react/jsx-runtime";function Pa(e){let r=e.match(/<\s*thinking\s*>/i);if(!r)return{thinking:"",content:e,isComplete:!0};let t=r.index??0,n=r[0].length,a=t+n,o=e.slice(0,t),i=e.slice(a),c=i.match(/<\/\s*thinking\s*>/i);if(!c)return{thinking:i,content:o,isComplete:!1};let s=c.index??0,l=c[0].length;return{thinking:i.slice(0,s),content:o+i.slice(s+l),isComplete:!0}}var Un=e=>e==="with_team"||e==="back_with_kiku"||e==="team_closed"||e==="team_joined";function Fd(e){return e<60?`${Math.max(1,Math.round(e))}s`:e<3600?`${Math.round(e/60)} min`:`${Math.round(e/3600)} h`}function Gc({text:e,isComplete:r,seconds:t,stage:n,repliedSeconds:a}){let o=kr(),i=Pd(Date.now()),[c,s]=Vc(()=>r?null:0),[l,h]=Vc(!r);Ad(()=>{if(r){c!==null&&(s(Math.max(1,Math.round((Date.now()-i.current)/1e3))),h(!1));return}h(!0);let f=setInterval(()=>{s(Math.round((Date.now()-i.current)/1e3))},1e3);return()=>clearInterval(f)},[r]);let d=t??c,p=a!=null?o("repliedIn",{duration:Fd(a)}):n==="with_team"?o("withTeam"):n==="back_with_kiku"?o("backWithKiku"):n==="team_closed"?o("teamClosed"):n==="team_joined"?o("teamJoined"):n==="reaching_team"?r?o("passedToTeam"):`${o("reachingTeam")}\u2026`:r?d!=null?o("thoughtForSeconds",{duration:`${d}s`}):o("thoughtProcess"):`${o("thinking")}${c?` \xB7 ${c}s`:"\u2026"}`,u=!!e;return jc("div",{className:ne("hsk-cb-think",!r&&"hsk-cb-think--live",a==null&&Un(n)&&"hsk-cb-think--note"),children:[jc("button",{type:"button",className:ne("hsk-cb-think-head",!u&&"hsk-cb-think-head--static"),onClick:u?()=>h(f=>!f):void 0,"aria-expanded":u?l:void 0,children:[Yo("span",{children:p}),u&&Yo("span",{className:ne("hsk-cb-think-chevron",l&&"hsk-cb-think-chevron--open"),children:"\u25B6"})]}),u&&l&&Yo("div",{className:"hsk-cb-think-body",children:e})]})}import{useCallback as Kc,useEffect as _d,useRef as Yc,useState as Dd}from"react";function Wn(e,r){let[t,n]=Dd(!1),a=Yc(null),o=Yc(r);o.current=r,_d(()=>()=>{a.current&&clearTimeout(a.current)},[]);let i=Kc(()=>{a.current||(n(!0),a.current=setTimeout(()=>{a.current=null,n(!1),o.current()},e))},[e]),c=Kc(()=>{a.current&&(clearTimeout(a.current),a.current=null),n(!1),o.current()},[]);return{closing:t,requestClose:i,closeNow:c}}import Mt from"react";import{useAkropolysContext as Su}from"@akropolys/sdk";function Xo(e){let r=/<\s*[||]+\s*DSML\s*[||]+\s*([a-z_]+)\b[^>]*>/i,t=e,n="";for(;t;){let a=r.exec(t);if(!a){let s=/<\s*\/?\s*[||]+[\s\S]*$/i.exec(t);if(s){let l=s[0].replace(/\s/g,"").replace(/|/g,"|").replace(/\|+/g,"|").toLowerCase();if("<|dsml|".startsWith(l)||"</|dsml|".startsWith(l)||l.startsWith("<|dsml|")||l.startsWith("</|dsml|"))return n+t.slice(0,s.index)}return n+(t.endsWith("<")?t.slice(0,-1):t)}n+=t.slice(0,a.index);let o=new RegExp("<\\s*/\\s*[|\uFF5C]+\\s*DSML\\s*[|\uFF5C]+\\s*"+a[1]+"\\s*>","i"),i=t.slice(a.index+a[0].length),c=o.exec(i);if(!c)return n;t=i.slice(c.index+c[0].length)}return n}import gn from"react";var Bd=/\p{L}/u,Hd=/\]\([^)]*\)|https?:\/\/\S+|www\.\S+/g;function $d(e){return e>=1424&&e<=2303||e>=64285&&e<=65023||e>=65136&&e<=65279}function Fa(e,r=1){let t=0,n=0;for(let a of e.replace(Hd," "))Bd.test(a)&&($d(a.codePointAt(0)??0)?t++:n++);if(!(t+n<r||t===n))return t>n?"rtl":"ltr"}import{Fragment as nu,jsx as et,jsxs as ru}from"react/jsx-runtime";var qd=/[ \t]{2,}/g,Ud=/ ([.,!?:;])/g,Wd=/\(([ \t]+)/g,Od=/([ \t]+)\)/g,Vd=/(\d+)\s+(MP|mAh|W|GB|MB|KHz|Hz|KSh|KES|USD|EUR)\b/gi,jd=/(!\[[^\]]*\]\([^)]+\)|\[[^\]]+\]\([^)]+\)|\*\*[^*]+\*\*|`[^`]+`)/g,Gd=/^!\[([^\]]*)\]\(([^)]+)\)$/,Kd=/^\[([^\]]+)\]\(([^)]+)\)$/,Yd=/^(data:image|blob):/i,Jc=/^(https?|mailto|tel):/i;function On(e){let r=String(e??"").trim();return Jc.test(r)||r.startsWith("/")&&!r.startsWith("//")?r:void 0}var Qo=null;function Zc(e){if(Yd.test(e))return!0;if(typeof location>"u")return!1;try{let r=new URL(e,location.href);return/^https?:$/.test(r.protocol)&&(r.host===location.host||!!Qo?.has(r.host))}catch{return!1}}var Xd=/memory|mimi/i,Qd=/mimi\.akropolys/i,Jd=e=>e&&e.replace(qd," ").replace(Ud,"$1").replace(Wd,"(").replace(Od,")").replace(Vd,"$1 $2"),cr=(e,r)=>Jd(e).split(jd).map((a,o)=>{if(!a)return null;let i=`${r}-inline-${o}`;if(a.startsWith("`")&&a.endsWith("`"))return et("code",{className:"hsk-markdown-code",children:a.slice(1,-1)},i);if(a.startsWith("**")&&a.endsWith("**"))return et("strong",{children:cr(a.slice(2,-2),i)},i);let c=a.match(Gd);if(c){let l=c[1],h=c[2];return Zc(h)?et("img",{src:h,alt:l||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:d=>{d.target.style.display="none"}},i):null}let s=a.match(Kd);if(s){let l=s[1],h=s[2];return Xd.test(l)||Qd.test(h)?null:Jc.test(h)||h.startsWith("/")?et("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:"hsk-markdown-link",children:cr(l,i)},i):et("span",{children:cr(l,i)},i)}return a}),Zd=/^\s*\|?[\s:|-]*-[\s:|-]*\|?\s*$/;function Xc(e,r){let t=e.trim();return r?t.includes("|"):t.startsWith("|")}function Qc(e){let r=e.trim();return r.startsWith("|")&&(r=r.slice(1)),r.endsWith("|")&&(r=r.slice(0,-1)),r.split("|").map(t=>t.trim())}function eu({children:e}){let r=gn.useRef(null),[t,n]=gn.useState("none"),[a,o]=gn.useState(!1),i=gn.useRef({startX:0,scrollLeft:0,isDown:!1,hasMoved:!1}),c=gn.useCallback(()=>{let d=r.current;if(!d)return;if(!(d.scrollWidth>d.clientWidth+2)){n("none");return}let u=getComputedStyle(d).direction==="rtl",f=Math.abs(d.scrollLeft),C=f<=4,b=f+d.clientWidth>=d.scrollWidth-4;n(C?u?"right":"left":b?u?"left":"right":"middle")},[]);gn.useEffect(()=>{c();let d=r.current;if(!d)return;let p=typeof ResizeObserver<"u"?new ResizeObserver(c):null;return p?.observe(d),()=>p?.disconnect()},[c]);let s=d=>{let p=r.current;!p||p.scrollWidth<=p.clientWidth||d.target.closest("a, button, input")||(i.current={startX:d.pageX-p.offsetLeft,scrollLeft:p.scrollLeft,isDown:!0,hasMoved:!1},o(!0))},l=d=>{if(!i.current.isDown)return;let p=r.current;if(!p)return;let f=(d.pageX-p.offsetLeft-i.current.startX)*1.5;Math.abs(f)>3&&(i.current.hasMoved=!0,d.preventDefault(),p.scrollLeft=i.current.scrollLeft-f)},h=()=>{i.current.isDown=!1,o(!1)};return et("div",{ref:r,className:`hsk-table-wrapper hsk-table-wrapper--${t}${a?" is-dragging":""}`,onScroll:c,onMouseDown:s,onMouseMove:l,onMouseUp:h,onMouseLeave:h,children:e})}function el(e,r=!1,t){Qo=t??null;try{return tu(e,r)}finally{Qo=null}}function tu(e,r){let t=e.split(`
|
|
35
|
+
`;function Hc(e){return e.proof?["akropolys.token."+e.token,"akropolys.proof."+e.proof]:["akropolys.token."+e.token]}function Bc(e,r){let t=e.apiUrl.replace(/\/+$/,""),n=t.endsWith("/voice/live")?t:t+"/voice/live",a=new URL(n,window.location.href);a.protocol=a.protocol==="https:"?"wss:":"ws:",a.searchParams.set("siteId",e.siteId),e.kikuId&&a.searchParams.set("kikuId",e.kikuId),e.sessionId&&a.searchParams.set("sessionId",e.sessionId),e.name&&a.searchParams.set("name",e.name),e.language&&a.searchParams.set("language",e.language),a.searchParams.set("codec","adpcm");let o=r||e.voice;return o&&a.searchParams.set("voice",o),a.toString()}function $c(e){let[r,t]=Or("idle"),[n,a]=Or(!1),[o,i]=Or([]),[c,s]=Or(null),[l,h]=Or(!1),p=Re(null),d=Re(!1),u=Re(new bn),f=Re(()=>!1),C=Re(null),b=Re(null),E=Re(!1),x=Re(0),L=Re(0),M=Re(!1),w=Re(null),D=Re(0),H=Re(!1),S=Re(!1),O=Re(null),v=Re(null),I=Re(null),q=Re(null),P=Re(0),J=Re(!1),de=Re([]),te=Re(0),W=Re(new Set),le=Re(null),X=Re(null),F=Re(Ea),$=Re(e);fn(()=>{$.current=e;let Y=v.current;if(Y)for(let Z of Y.getAudioTracks())Z.enabled=!e.muted},[e]);let N=Re(!1),T=Re([]),A=Re(new On),j=Re(null),y=Re(""),z=Re(""),[k,ie]=Or([]),ne=Re([]);ne.current=k;let U=Re([]),[oe,m]=Or([]),R=Re(0),V=Re(!1),Q=Re(null),G=Re(new Map),ae=Re([]),be=Re(void 0),ce=Re(null),_=Re([]),ee=Re([]),ve=Ze(()=>{let Y=y.current.trim(),Z=z.current.trim(),ue=ce.current?Math.max(.1,(Date.now()-ce.current)/1e3):void 0,K;if(_.current.length>0)try{let pe=_c(_.current,F.current);K=URL.createObjectURL(pe)}catch(pe){console.error("[kiku] failed to encode bot audio wav:",pe)}let ke;if(ee.current.length>0)try{let pe=Fc(ee.current,Uo);ke=URL.createObjectURL(pe)}catch(pe){console.error("[kiku] failed to encode user audio wav:",pe)}let ye=ae.current.length?ae.current:void 0,we=be.current;y.current="",z.current="",ce.current=null,_.current=[],ee.current=[],ae.current=[],be.current=void 0,!(!Y&&!Z&&!ye&&!we)&&$.current.onExchange?.({heard:Y,said:Z,duration:ue,userAudioUrl:ke,audioUrl:K,images:ye,visualization:we})},[]),Ie=Ze(()=>{},[]),fe=Ze(Y=>{if(x.current=Date.now(),$.current.muted)return;let Z=new Int16Array(Y),ue=0;for(let ke=0;ke<Z.length;ke+=8){let ye=Math.abs(Z[ke]);ye>ue&&(ue=ye)}ue>1200&&(D.current=Date.now());let K=p.current;if(!(!N.current||!K||K.readyState!==WebSocket.OPEN)){if(K.bufferedAmount>256*1024){f.current()||$.current.onError?.("connection");return}ee.current.push(new Int16Array(Y.slice(0)));try{K.send(A.current.encode(new Int16Array(Y)))}catch{f.current()||$.current.onError?.("connection")}}},[]),Se=Ze(()=>{T.current=[]},[]),Ne=Ze(()=>{let Y=O.current;if(j.current&&Y&&Y.state!=="closed")return j.current;let Z=window.AudioContext||window.webkitAudioContext;if(!Z)return Promise.resolve(null);let ue=new Z({latencyHint:"interactive",sampleRate:Ea});O.current=ue;let K=URL.createObjectURL(new Blob([Sd],{type:"application/javascript"}));return j.current=ue.audioWorklet.addModule(K).then(()=>ue).catch(()=>null).finally(()=>URL.revokeObjectURL(K)),j.current},[]),Te=Ze(()=>{typeof window>"u"||Ne()},[Ne]),he=Ze(()=>{let Y=q.current;if(!Y)return 0;let Z=new Uint8Array(Y.fftSize);Y.getByteTimeDomainData(Z);let ue=0;for(let K=0;K<Z.length;K++){let ke=(Z[K]-128)/128;ue+=ke*ke}return Math.min(1,Math.sqrt(ue/Z.length)*4)},[]),Fe=r==="speaking"||r==="thinking",Oe=Ze(Y=>{let Z=Fe?le.current:q.current;return!Z||Y.length!==Z.frequencyBinCount?!1:(Z.getByteFrequencyData(Y),!0)},[Fe]),Ge=Ze(()=>(Fe?le.current:q.current)?.frequencyBinCount??0,[Fe]),Ae=Ze(()=>{let Y=X.current,Z=O.current;if(!Y||!Z||Z.state==="closed"){P.current=0;for(let ke of W.current)try{ke.onended=null,ke.stop()}catch{}W.current.clear();return}let ue=Z.currentTime,K=ue+vd;Y.gain.cancelScheduledValues(ue),Y.gain.setValueAtTime(Y.gain.value,ue),Y.gain.linearRampToValueAtTime(0,K),Y.gain.setValueAtTime(1,K);for(let ke of W.current)try{ke.onended=null,ke.stop(K)}catch{}W.current.clear(),P.current=K},[]),yt=Ze(Y=>{let Z=O.current,ue=le.current;if(!Z||!ue||Y.length===0)return;Z.state==="suspended"&&Z.resume().catch(()=>{});let K=Z.createBuffer(1,Y.length,F.current);K.getChannelData(0).set(Y);let ke=Z.createBufferSource();ke.buffer=K,ke.connect(ue);let ye=Z.currentTime,we=P.current>ye?P.current:ye+xd;ke.start(we),P.current=we+K.duration,W.current.add(ke),ke.onended=()=>{W.current.delete(ke),W.current.size===0&&(P.current=0,J.current=!1,t(pe=>pe==="speaking"?"listening":pe))},t(pe=>pe==="speaking"||pe==="idle"||pe==="ended"?pe:"speaking")},[]),wt=Ze(()=>{let Y=de.current;de.current=[],te.current=0;for(let Z of Y)yt(Z)},[yt]),Tt=Ze(()=>{de.current=[],te.current=0},[]),$t=Ze(Y=>{let Z=O.current;if(!Z||Y.length===0)return;if(P.current>Z.currentTime&&de.current.length===0){yt(Y);return}let K=J.current?gd:kd;de.current.push(Y),te.current+=Y.length/F.current,te.current>=K&&(J.current=!0,wt())},[yt,wt]),qt=Re(null),Rt=Re(null),xe=Ze(()=>{qt.current&&(clearInterval(qt.current),qt.current=null);let Y=Rt.current,Z=O.current;if(Y&&Z&&Z.state!=="closed"){let ue=Z.currentTime;try{Y.gain.cancelScheduledValues(ue),Y.gain.setValueAtTime(Y.gain.value,ue),Y.gain.linearRampToValueAtTime(1e-4,ue+.04)}catch{}setTimeout(()=>{try{Y.disconnect()}catch{}Rt.current===Y&&(Rt.current=null)},50)}},[]),Ye=Ze(()=>{},[]),mt=Ze(Y=>{for(let ue of G.current.values())ue(!1);Q.current=null,V.current=!1,C.current!==null&&clearTimeout(C.current),b.current!==null&&clearTimeout(b.current),C.current=b.current=null,E.current=!1,L.current=0,ve();let Z=p.current;p.current=null;try{Z?.close()}catch{}N.current=!1,T.current=[],j.current=null,J.current=!1,de.current=[],te.current=0,xe(),Ae(),w.current=null,I.current&&(I.current.port.onmessage=null),I.current?.disconnect(),I.current=null,v.current?.getTracks().forEach(ue=>ue.stop()),v.current=null,q.current=null,le.current=null,X.current=null,O.current?.close().catch(()=>{}),O.current=null,t(Y),a(!1),i([]),d.current=!1,M.current=!1},[ve,Ae,xe]),$e=Ze(()=>{try{p.current?.send(JSON.stringify({type:"close"}))}catch{}try{p.current?.close()}catch{}mt("idle")},[mt]),Xe=Ze(Y=>{let Z=[...U.current,...ne.current.filter(pe=>pe.done)].filter(pe=>pe.text).map(pe=>({role:pe.role,text:pe.text})),ue=$.current.getShopperAuth,K=pe=>{if(!(p.current!==Y||!d.current||Y.readyState!==WebSocket.OPEN))try{Y.send(JSON.stringify({type:"open",history:Z,...pe?{authorization:pe}:{}}))}catch{}};if(!ue){K();return}let ke=new AbortController,ye=setTimeout(()=>ke.abort(),5e3);new Promise(pe=>{ke.signal.addEventListener("abort",()=>pe(void 0),{once:!0}),Promise.resolve().then(()=>ue(ke.signal)).then(pe,()=>pe(void 0))}).then(K).finally(()=>clearTimeout(ye))},[]),dt=Ze(Y=>{let Z=!1;b.current!==null&&clearTimeout(b.current),b.current=setTimeout(()=>{p.current!==Y||N.current||f.current()||($.current.onError?.("connection"),$e())},3e4),Y.binaryType="arraybuffer",A.current=new On,Y.onopen=()=>{p.current!==Y||!M.current||(M.current=!1,Xe(Y))},Y.onmessage=ue=>{if(p.current!==Y)return;if(ue.data instanceof ArrayBuffer){if(!H.current){H.current=!0;let ye=z.current.trim();ye&&ie(we=>{let pe=we.slice();for(let je=pe.length-1;je>=0;je--)pe[je].role==="user"&&!pe[je].done&&(pe[je]={...pe[je],done:!0});return pe.push({role:"assistant",text:ye,done:!1}),pe})}!S.current&&D.current&&(S.current=!0,console.log("[kiku] wait from last speech to first audio: "+(Date.now()-D.current)+"ms")),xe();let ke=Pc(ue.data);_.current.push(ke.slice()),$t(ke);return}let K;try{K=JSON.parse(ue.data)}catch{return}switch(K.type){case"image_received":G.current.get(K.imageId)?.(!0);break;case"image_error":G.current.get(K.imageId)?.(!1);break;case"ready":b.current!==null&&clearTimeout(b.current),b.current=null,E.current=!0,x.current=Date.now(),K.sampleRate&&(F.current=K.sampleRate,K.sampleRate!==Ea&&console.warn(`[kiku] live audio rate ${K.sampleRate} != context ${Ea}; per-buffer resampling will click at every chunk seam`)),typeof K.secondsLeft=="number"&&s(K.secondsLeft),h(K.photos===!0),V.current=K.imageInput===!0;let ke=Q.current;if(ke&&V.current)try{Y.send(JSON.stringify({type:"image",imageId:ke.id,image:ke.image}))}catch{}N.current=!0,t("listening"),Se(),w.current?.(),w.current=null,Xt("connect",!0);break;case"hearing":ce.current||(ce.current=Date.now()),a(!0);break;case"thinking":ce.current||(ce.current=Date.now()),a(!1),t("thinking"),Ye(),K.tool==="visualize"&&m(ye=>ye.some(we=>we.pending)?ye:[...ye,{id:++R.current,url:"",pending:!0}]);break;case"viz":typeof K.url=="string"&&K.url?(be.current=K.url,m(ye=>ye.map(we=>we.pending?{...we,url:K.url,pending:!1}:we))):m(ye=>ye.filter(we=>!we.pending));break;case"heard":W.current.size===0&&(P.current=0),ce.current||(ce.current=Date.now(),Xt("heard")),y.current+=K.text,ie(ye=>{let we=ye.slice(),pe=we[we.length-1];return pe&&pe.role==="user"&&!pe.done?we[we.length-1]={...pe,text:y.current.trim()}:we.push({role:"user",text:y.current.trim(),done:!1}),we}),a(!1),t("thinking"),Ye();break;case"said":if(z.current+=K.text,!H.current)break;ie(ye=>{let we=ye.slice();for(let Ke=we.length-1;Ke>=0;Ke--)we[Ke].role==="user"&&!we[Ke].done&&(we[Ke]={...we[Ke],done:!0});let pe=we[we.length-1],je=z.current.trim();return pe&&pe.role==="assistant"&&!pe.done?we[we.length-1]={...pe,text:je}:we.push({role:"assistant",text:je,done:!1}),we});break;case"interrupted":J.current=!1,Tt(),xe(),Ae(),Xt("interrupt"),a(!1),t("listening");break;case"turn_complete":S.current=!1,H.current=!1,D.current=0,ie(ye=>ye.map(we=>we.done?we:{...we,done:!0})),wt(),J.current=!1,xe(),a(!1),ve();break;case"sources":Array.isArray(K.sources)&&K.sources.length&&i(K.sources);break;case"seconds":typeof K.secondsLeft=="number"&&s(K.secondsLeft);break;case"refused":$.current.onRefused?.(K.code||"guest"),$e();break;case"error":if(K.code==="session_expiring"&&f.current())return;$.current.onError?.(K.code||"unavailable"),$e();break}},Y.onclose=ue=>{p.current===Y&&(b.current!==null&&clearTimeout(b.current),b.current=null,!(bn.canRetry(ue.code)&&f.current())&&(ue.code===4402&&(Z=!0,$.current.onError?.(ue.reason==="site"?"siteLimit":"limit")),mt("ended")))},Y.onerror=()=>{!Z&&p.current===Y&&console.warn("[kiku] voice transport interrupted")}},[Tt,$t,ve,Se,Ae,wt,Xe,Ye,xe,$e,mt]),Nt=Ze(Y=>{for(let ke of G.current.values())ke(!1);let Z=p.current;if(p.current=null,N.current=!1,ne.current=Dc(ne.current,y.current,z.current),ie(ne.current),m(ke=>ke.filter(ye=>!ye.pending)),ve(),H.current=!1,S.current=!1,J.current=!1,Tt(),t("connecting"),Ae(),xe(),Z){try{Z.send(JSON.stringify({type:"close"}))}catch{}try{Z.close()}catch{}}let ue=$.current;M.current=!0;let K=new WebSocket(Bc(ue,Y),Hc(ue));p.current=K,dt(K)},[dt,Tt,ve,Ae,xe]),Ot=Ze(()=>{if(!d.current||!E.current||!I.current)return!1;if(C.current!==null)return!0;let Y=u.current.nextDelay();if(Y===null)return $.current.onError?.("connection"),$e(),!0;for(let ue of G.current.values())ue(!1);let Z=p.current;p.current=null,N.current=!1,b.current!==null&&clearTimeout(b.current),b.current=null;try{Z?.close()}catch{}return Ae(),Tt(),xe(),a(!1),t("connecting"),C.current=setTimeout(()=>{C.current=null,d.current&&Nt()},Y),!0},[Tt,Ae,Nt,$e,xe]);f.current=Ot,fn(()=>{let Y=()=>{if(!d.current||!N.current||!I.current||document.visibilityState==="hidden")return;let ue=O.current;if(!ue)return;let K=Date.now();if(K-x.current<1e4){L.current=0;return}L.current?K-L.current>1e4&&($.current.onError?.("audio-capture"),$e()):(L.current=K,ue.resume().catch(()=>{}))},Z=window.setInterval(Y,2e3);return document.addEventListener("visibilitychange",Y),()=>{clearInterval(Z),document.removeEventListener("visibilitychange",Y)}},[$e]);let it=Re(e.voice);fn(()=>{it.current!==e.voice&&(it.current=e.voice,p.current&&(r==="listening"||r==="thinking"||r==="speaking")&&Nt(e.voice))},[e.voice,r,Nt]);let Ct=Ze(async(Y=[])=>{if(d.current&&(p.current||C.current!==null))return;d.current=!0,u.current=new bn,E.current=!1,t("connecting");let Z=$.current;T.current=[],U.current=Y,ne.current=[],ie([]),m([]),y.current="",z.current="";let ue=Ne();O.current?.resume().catch(()=>{}),yr();let K=p.current;K&&K.readyState===WebSocket.OPEN?Xe(K):K&&K.readyState===WebSocket.CONNECTING?M.current=!0:(K=new WebSocket(Bc(Z),Hc(Z)),p.current=K,M.current=!0,dt(K));let ke;try{if(!navigator.mediaDevices?.getUserMedia)throw{name:"NotAllowedError"};ke=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}})}catch(Ke){try{K.close()}catch{}p.current=null,t("idle"),Z.onError?.(Ke?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}if(p.current!==K){ke.getTracks().forEach(Ke=>Ke.stop());return}v.current=ke;for(let Ke of ke.getAudioTracks())Ke.enabled=!$.current.muted;let ye=await ue;if(p.current!==K){ke.getTracks().forEach(Ke=>Ke.stop());return}if(!ye){$.current.onError?.("audio-worklet"),$e();return}ye.state==="suspended"&&ye.resume().catch(()=>{});let we=ye.createAnalyser();we.fftSize=1024,we.smoothingTimeConstant=.25,q.current=we;let pe=ye.createGain();pe.gain.value=1,pe.connect(ye.destination),X.current=pe;let je=ye.createAnalyser();je.fftSize=1024,je.smoothingTimeConstant=.25,je.connect(pe),le.current=je;try{let Ke=new AudioWorkletNode(ye,"kiku-capture");I.current=Ke,Ke.port.onmessage=Jr=>fe(Jr.data);let hr=ye.createMediaStreamSource(ke),pr=()=>{if(!(p.current!==K||!I.current)){try{hr.connect(we)}catch{}try{hr.connect(Ke)}catch{}}};N.current?pr():w.current=pr}catch{$.current.onError?.("audio-worklet"),$e()}},[dt,Ne,fe,Xe,$e]);fn(()=>{if(r!=="listening"){a(!1);return}let Y=0,Z=!1,ue=Date.now(),K=window.setInterval(()=>{let ke=Date.now();if(!$.current.muted&&he()>yd&&(Y=ke),ke-Math.max(Y,ue)>Cd){window.clearInterval(K),$.current.onError?.("idle"),$e();return}let ye=ke-Y<wd;ye!==Z&&(Z=ye,a(ye))},100);return()=>window.clearInterval(K)},[r,he,$e]);let ct=Ze(()=>{Te()},[Te]);fn(()=>()=>{$e()},[$e]),fn(()=>{let Y=v.current;if(Y)for(let Z of Y.getAudioTracks())Z.enabled=!e.muted},[e.muted,r]);let Ft=Ze(async Y=>{let Z=p.current;if(!d.current||!N.current||!Z||Z.readyState!==WebSocket.OPEN||!Y.type.startsWith("image/"))return!1;let ue;try{ue=await ya(Y,"image/jpeg")}catch{return!1}if(ue.length>Math.ceil(4*1024*1024/3)*4+32||p.current!==Z||!d.current)return!1;let K=++R.current;m(pe=>[...pe,{id:K,url:ue,pending:!1,sending:!0}]);let ke=$.current.storeScene,ye=ke?await ke(ue).catch(()=>!1):!1;if(p.current!==Z||!d.current||Z.readyState!==WebSocket.OPEN)return m(pe=>pe.filter(je=>je.id!==K)),!1;let we=ye;return V.current?we=await new Promise(pe=>{let je=setTimeout(()=>Ke(!1),15e3),Ke=hr=>{clearTimeout(je),G.current.delete(K),pe(hr)};G.current.set(K,Ke);try{Z.send(JSON.stringify({type:"image",imageId:K,image:ue}))}catch{Ke(!1)}}):ye&&Z.send(JSON.stringify({type:"text",text:"(The visitor attached a photo for editing. Briefly ask what they would like changed.)"})),!we||p.current!==Z||!d.current||!N.current?(m(pe=>pe.filter(je=>je.id!==K)),!1):(V.current&&(Q.current={id:K,image:ue}),m(pe=>pe.map(je=>je.id===K?{...je,sending:!1}:je)),ae.current.push(ue),!0)},[]),rr=Ze(Y=>{let Z=p.current;Z&&Z.readyState===WebSocket.OPEN&&Y.trim()&&Z.send(JSON.stringify({type:"text",text:Y}))},[]);return{state:r,phase:r,hearing:n,sources:o,secondsLeft:c,photos:l,turns:k,images:oe,micLevel:he,micSpectrum:Oe,spectrumBins:Ge,start:Ct,stop:$e,prewarm:ct,attachPhoto:Ft,ask:rr}}var Rd=e=>e==="connecting"||e==="ended"?"idle":e,Oc={turns:[],images:[]},Uc=()=>`v${Date.now().toString(36)}`;function Ld(e,r){let t=[],n=[];for(let a of e)if(a.live===r){a.content&&t.push({role:a.role==="user"?"user":"assistant",text:a.content,done:!0});for(let o of[...a.images??[],...a.visualization?[a.visualization]:[]])n.push({id:-(n.length+1),url:o,pending:!1})}return{turns:t,images:n}}function Wc({voiceLang:e,speechLang:r,shopperLanguage:t,ttsVoice:n="Algenib",messages:a,handleSendUtterance:o,appendSpokenExchange:i}){let c=Td(),[s,l]=Ur("off"),[h,p]=Ur("idle"),[d,u]=Ur(""),[f,C]=Ur(!1),[b,E]=Ur(!1),[x,L]=Ur(()=>{try{let A=localStorage.getItem(So);if(A&&Pn.some(j=>j.name===A))return A}catch{}return n||"Algenib"}),M=Md(Uc()),w=za(A=>{L(A);try{localStorage.setItem(So,A)}catch{}},[]),D=zc({lang:e||r,onUtterance:A=>{p("thinking"),o(A)},onError:A=>{l("off"),p("idle"),u(A==="not-allowed"?"micDenied":A==="language-not-supported"?"micLangUnsupported":A==="audio-capture"?"micMissing":A==="network"?"micNetwork":"micFailed")},onBargeIn:()=>{Rc()}}),S=c?.voiceUrl||c?.api?.voiceUrl||c?.api?.apiUrl||c?.apiUrl||"",O=c?.api?.siteId||c?.siteId||"",v=c?.api?.apiToken||c?.apiToken||"",I=c?.getShopperId?.()||c?.getKikuPub?.()||void 0,q=c?.getShopperName?.()||void 0,P=$c({apiUrl:S,siteId:O,token:v,kikuId:I,proof:c?.getUserProof?.()||void 0,sessionId:c?.getSessionId?.()||void 0,storeScene:A=>c?.storeScene?.(A)??Promise.resolve(!1),getShopperAuth:A=>c?.api?.getShopperAuth?.(A)??Promise.resolve(void 0),name:q,language:t,voice:x,muted:f,onExchange:A=>{i(A.heard,A.said,A.duration,A.userAudioUrl,A.audioUrl,{images:A.images,visualization:A.visualization,live:M.current})},onError:A=>{if(A==="shopper_reply_limit"||A==="access_revoked"||A==="account_required"){E(!0),P.stop(),l("off");return}l("off"),u(A==="idle"?"voiceIdleEnded":A==="not-allowed"?"micDenied":A==="audio-capture"?"micMissing":A==="limit"?"voiceLimitReached":A==="siteLimit"?"voiceSiteLimit":A==="connection"||A==="network"?"micNetwork":"voiceUnavailable")},onRefused:A=>{(A==="shopper_reply_limit"||A==="access_revoked"||A==="account_required")&&E(!0),l("off"),u("voiceUnavailable")}}),J=typeof window<"u"&&!!window.WebSocket&&!!(window.AudioContext||window.webkitAudioContext)&&!!navigator.mediaDevices?.getUserMedia,{prewarm:de}=P;qc(()=>{if(!J)return;let A=window;if(A.requestIdleCallback){let y=A.requestIdleCallback(de,{timeout:3e3});return()=>A.cancelIdleCallback(y)}let j=window.setTimeout(de,1500);return()=>window.clearTimeout(j)},[J,de]),qc(()=>{s==="converse"&&P.state==="ended"&&(l("off"),u("voiceSessionEnded"))},[s,P.state]);let[te,W]=Ur(Oc),le=za(async A=>{if(!Ei()){u("micInsecure");return}if(u(""),l(A),A==="dictate")p("listening"),await D.start();else{let j=Ld(a,M.current);W(j),P.start(j.turns)}},[P,D,a]),X=za(()=>{P.stop(),M.current=Uc(),W(Oc),P.start([])},[P]),F=za(()=>{l("off"),p("idle"),D.stop(),P.stop()},[P,D]),$=s==="converse"?Rd(P.state):s==="dictate"?h==="listening"?D.hearing?"speaking":"listening":h:"idle",N=s==="converse"&&P.state!=="listening"&&P.state!=="thinking"&&P.state!=="speaking";return{attachPhoto:async A=>{await P.attachPhoto(A)||u("voicePhotoFailed")},voiceMode:s,voicePhase:$,voiceConnecting:N,voiceError:d,setVoiceError:u,voiceMuted:f,setVoiceMuted:C,voiceSecondsLeft:P.secondsLeft??null,voiceBlocked:b,liveVoiceName:x,chooseVoice:w,canConverse:J,startVoice:le,stopVoice:F,voice:D,live:P,earlier:te,newVoiceChat:X}}import qe from"react";import{useEffect as Ed,useRef as ht}from"react";import{jsx as De,jsxs as Ht}from"react/jsx-runtime";var Wo={idle:{bw:50,bh:60,tr:1,br:.42,bow:3},thinking:{bw:46,bh:46,tr:1,br:1,bow:2},visualizing:{bw:64,bh:42,tr:.42,br:.42,bow:2},speaking:{bw:44,bh:54,tr:.9,br:.9,bow:3},failed:{bw:53,bh:45,tr:.95,br:.55,bow:4},curious:{bw:48,bh:52,tr:.9,br:.7,bow:3},welcoming:{bw:50,bh:58,tr:1,br:.5,bow:2},guiding:{bw:46,bh:50,tr:.8,br:.8,bow:2},happy:{bw:52,bh:56,tr:1,br:.4,bow:4},focused:{bw:48,bh:52,tr:.9,br:.7,bow:2}},Vo={idle:{lid:1,warm:0,breath:2100,wob:1},thinking:{lid:1,warm:.2,breath:1700,wob:1.6},visualizing:{lid:1,warm:.9,breath:1200,wob:2.2},speaking:{lid:1,warm:.35,breath:900,wob:1.8},failed:{lid:.28,warm:0,breath:3e3,wob:.6},curious:{lid:1,warm:.15,breath:1800,wob:1.4},welcoming:{lid:1,warm:.25,breath:1600,wob:1.2},guiding:{lid:1,warm:.2,breath:1500,wob:1.3},happy:{lid:1,warm:.4,breath:1200,wob:1.5},focused:{lid:1,warm:.2,breath:1500,wob:1.2}},Na=[[0,0,0],[.09,.54,0],[.19,-.36,32],[.31,-.22,58],[.42,-.12,68],[.54,.04,28],[.63,.96,0],[.71,.18,0],[.79,-.16,20],[.88,.34,0],[.95,-.05,4],[1,0,0]],zd=.42,Nd=170;function Id(e){let r=1;for(;r<Na.length-1&&Na[r][0]<e;)r++;let[t,n,a]=Na[r-1],[o,i,c]=Na[r],s=o===t?0:(e-t)/(o-t),l=s*s*(3-2*s);return[n+(i-n)*l,a+(c-a)*l]}var Un=6,Vc=["bw","bh","tr","br","bow","lid","warm","wob","gx","gy"],Rr=(e,r,t)=>Math.max(r,Math.min(t,e));function Gc(e,r,t,n){let a=l=>l.toFixed(2),o=(r+t)/2,i=e+n,c=(o-r)*.55,s=(t-o)*.55;return`C${a(e)} ${a(r+c)} ${a(i)} ${a(o-c)} ${a(i)} ${a(o)}C${a(i)} ${a(o+s)} ${a(e)} ${a(t-s)} ${a(e)} ${a(t)}`}function Ad(e,r,t,n,a){let o=Rr(e*t,8,r*.96),i=Rr(e*n,8,r*.96),c=(p,d)=>`${p.toFixed(2)} ${d.toFixed(2)}`,s=.46,l=Rr((e-o)/e,0,1),h=Rr((e-i)/e,0,1);return`M${c(-e,-r+o)}C${c(-e,-r+o*s)} ${c(-e+o*s,-r)} ${c(-e+o,-r)}C${c(-e*.3*l,-r-2*l)} ${c(e*.3*l,-r-2*l)} ${c(e-o,-r)}C${c(e-o*s,-r)} ${c(e,-r+o*s)} ${c(e,-r+o)}`+Gc(e,-r+o,r-i,a)+`C${c(e,r-i*s)} ${c(e-i*s,r)} ${c(e-i,r)}C${c(e*.3*h,r+2*h)} ${c(-e*.3*h,r+2*h)} ${c(-e+i,r)}C${c(-e+i*s,r)} ${c(-e,r-i*s)} ${c(-e,r-i)}`+Gc(-e,r-i,-r+o,-a)+"Z"}var kn=[{name:"Graphite",color:"#4B5058",light:"#A8AEB6",glow:"rgba(75, 80, 88, 0.26)"},{name:"Mist",color:"#78868F",light:"#BFC9CF",glow:"rgba(120, 134, 143, 0.26)"},{name:"Sandstone",color:"#8A7E71",light:"#CBC1B5",glow:"rgba(138, 126, 113, 0.26)"},{name:"Pewter",color:"#5F6670",light:"#B3BAC3",glow:"rgba(95, 102, 112, 0.26)"}],Yo=[{name:"Aegean",color:"#2E6FB7",light:"#9CC1E6",glow:"rgba(46, 111, 183, 0.30)"},{name:"Fern",color:"#3C8C60",light:"#A2CFB4",glow:"rgba(60, 140, 96, 0.30)"},{name:"Marigold",color:"#C48A22",light:"#EBD095",glow:"rgba(196, 138, 34, 0.30)"},{name:"Coral",color:"#C15A4E",light:"#E9AEA3",glow:"rgba(193, 90, 78, 0.30)"},{name:"Iris",color:"#5F5CC4",light:"#B6B4E8",glow:"rgba(95, 92, 196, 0.30)"}],bf=[...kn,...Yo];function Go(e){let n=(!Yo.includes(e)&&Math.random()<.26?Yo:kn).filter(a=>a!==e);return n[Math.floor(Math.random()*n.length)]}function cr(e){let r=parseInt(e.slice(1),16);return[r>>16&255,r>>8&255,r&255]}function jo(e){return`rgb(${Math.round(e[0])}, ${Math.round(e[1])}, ${Math.round(e[2])})`}function Pd(e,r,t){return[e[0]+(r[0]-e[0])*t,e[1]+(r[1]-e[1])*t,e[2]+(r[2]-e[2])*t]}var _d=[[255,253,248],[247,240,231],[231,218,202],[198,178,156]],jc=[.05,.15,.42,.74],Fd=[.52,.72,.9,1],Yc={color:"#E2581D",light:"#FFBE96",glow:"rgba(226, 88, 29, 0.34)"};function Kc({state:e="idle",size:r=40,alert:t=!1,theme:n,feminine:a,accessories:o,onImpact:i,triggerRef:c,dropIn:s=!1}){let l=ht(s),h=ht(e);h.current=e;let p=ht(t);p.current=t;let d=n==="blush"||a===!0||!!(o?.flower||o?.eyelashes||o?.blush),u=o?.flower??d,f=o?.eyelashes??d,C=o?.blush??d,b=ht(null),E=ht(null),x=ht(null),L=ht(null),M=ht(null),w=ht(null),D=ht(null),H=ht(null),S=ht(null),O=ht(null),v=ht(null),I=ht(null),q=ht(null),P=ht(null),J=ht([]),de=ht([]),te=ht(null),W=ht(`kiku-${Math.random().toString(36).slice(2,8)}`).current,le=ht(i);return le.current=i,Ed(()=>{let X=window.matchMedia("(prefers-reduced-motion: reduce)").matches,F={},$={};Vc.forEach(xe=>{F[xe]=Wo.idle[xe]??Vo.idle[xe]??0,$[xe]=0});let N=Array.from({length:Un},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),T=Array.from({length:Un},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),A=1800,j=-1,y=0,z=2600,k=0,ie=!1,ne=9e3+Math.random()*8e3,U=-1,oe=0;l.current&&!X&&(U=zd,oe=performance.now()+Nd);let m=0,R=0,V=0,Q=4200,G=0,ae=0,be=0,ce=12e3,_=kn[0],ee=cr(_.color),ve=cr(_.light),Ie=[...ee],fe=[...ve],Se=2600,Ne=-1/0,Te=!1,he=0,Fe=!1,Oe=0,Ge=0,Ae=0,yt=!1,wt=0,Tt=xe=>{xe-Ne<Se?(_=Go(_),Ie=cr(_.color),fe=cr(_.light),Ne=-1/0):Ne=xe},$t=(xe,Ye,mt,$e)=>{let Xe=h.current,dt=Array.from({length:Un},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),Nt=(Ot,it,Ct=0)=>{let ct=Math.max(4,54*Math.max(.06,Ye));dt[Ot]={x:it+mt,y:-4+$e+Ct,w:21,h:ct,rx:10.5,a:1}};if(Xe==="thinking"){let it=xe%2800/2800,Ct=Math.pow(Math.sin(it*Math.PI*2)*.5+.5,3);for(let ct=0;ct<4;ct++){let Ft=xe/700+ct/4*Math.PI*2,rr=(26-ct%2*5)*(1-.94*Ct),Y=16+Ct*6+Math.sin(xe/420+ct)*1.4;dt[ct]={x:Math.cos(Ft)*rr,y:Math.sin(Ft)*rr*.86+2,w:Y,h:Y,rx:Y/2,a:1}}}else if(Xe==="visualizing")dt[0]={x:0,y:-2,w:78,h:26,rx:13,a:1};else if(Xe==="speaking")for(let it=0;it<5;it++){let Ct=12+Math.abs(Math.sin(xe/150+it*.9))*26;dt[it]={x:(it-4/2)*15,y:-2,w:9,h:Ct,rx:4.5,a:1}}else Xe==="failed"?(Nt(0,-22,8),Nt(1,22,8)):(Nt(0,-22),Nt(1,22));return dt};c&&(c.current=()=>{if(U>=0){Fe=!0,_=Go(_),Ie=cr(_.color),fe=cr(_.light),Ne=-1/0;return}U=0,Tt(Oe),ne=Oe+4e3});let qt=xe=>{Oe=xe;let Ye=h.current,mt=Wo[Ye]??Wo.idle,$e=Vo[Ye]??Vo.idle,Xe=Ye==="idle"||Ye==="failed";Xe&&!X&&(xe>z&&(y=(Math.random()-.5)*2,z=xe+1800+Math.random()*3600),F.wantGx=y*5);let dt=p.current?1:0;Ae=(Ae+(dt-Ge)*.1)*.88,Ge+=Ae;let Nt=p.current&&!X?Math.sin(xe/480)*.055*Ge:0,Ot={bw:mt.bw*(1+Ge*.34+Nt),bh:mt.bh*(1+Ge*.2+Nt),tr:mt.tr,br:mt.br,bow:mt.bow,warm:$e.warm,wob:$e.wob,lid:$e.lid,gx:Xe&&!X?y*5:0,gy:Xe&&!X?Math.sin(xe/2600)*2:0};!X&&Xe&&(j<0&&xe>A&&(j=0),j>=0&&(j+=1/7,Ot.lid=$e.lid*Math.abs(j-.5)*2,j>=1&&(j=-1,Ot.lid=$e.lid,A=xe+(Math.random()<.22?340:2600+Math.random()*4200)))),Vc.forEach(Pe=>{let at=Pe;if(X){F[at]=Ot[at];return}let Ue=at==="lid"?.42:.11,It=at==="lid"?.55:.78;$[at]=($[at]+(Ot[at]-F[at])*Ue)*It,F[at]+=$[at]});let it=0,Ct=0;!X&&p.current&&U<0&&xe>wt&&(U=0,wt=xe+2100,ne=xe+4e3),!X&&Ye==="idle"?U<0&&xe>ne&&(U=0,Te?(Te=!1,he=0,_=Go(_),Ie=cr(_.color),fe=cr(_.light),Ne=-1/0):(he++,Tt(xe))):U<0&&(ne=xe+3e3+Math.random()*3e3),U>=0&&(xe>=oe&&(U+=1/96),[it,Ct]=Id(U),U>=1&&(U=-1,it=0,Ct=0,Fe?(Fe=!1,he=0,ne=xe+150):!Te&&he>=2?(Te=!0,ne=xe+240):ne=xe+5e3+Math.random()*5e3));let ct=Math.max(0,it);if(p.current!==yt){yt=p.current;let Pe=p.current?Yc:_;Ie=cr(Pe.color),fe=cr(Pe.light),p.current&&!X&&(U<0&&(U=0),wt=xe+2600)}let Ft=p.current?Yc:_;if(X)ee=[...Ie],ve=[...fe];else for(let Pe=0;Pe<3;Pe++)ee[Pe]+=(Ie[Pe]-ee[Pe])*.055,ve[Pe]+=(fe[Pe]-ve[Pe])*.055;let rr=jo(ee),Y=jo(ve);I.current?.setAttribute("stop-color",rr),q.current?.setAttribute("stop-color",Y),P.current?.setAttribute("stop-color",Y);for(let Pe=0;Pe<4;Pe++){let at=jc[Pe]+(Fd[Pe]-jc[Pe])*Ge;J.current[Pe]?.style.setProperty("stop-color",jo(Pd(_d[Pe],ee,at)))}let Z=.34+Math.sin(xe/1200)*.06,ue=ct>.02?Math.min(.72,Z+ct*.34):Z;v.current?.setAttribute("opacity",ue.toFixed(3)),ct>.04?le.current?.(ct,Ft.color,Ft.glow):Rt>.04&&le.current?.(0,Ft.color,Ft.glow),Rt=ct;let K=X?0:Math.sin(xe/1900)*.9*F.wob,ke=F.bw*(1+it*.55)+K*.4,ye=F.bh*(1-it*.62),we=Ad(ke,ye,Rr(F.tr+ct*.5,0,1.2),Rr(F.br+ct*.9,0,1),F.bow+K+ct*5);b.current?.setAttribute("d",we),E.current?.setAttribute("d",we);let pe=Ye==="thinking";pe!==ie&&(ie=pe,te.current?.setAttribute("filter",pe?`url(#${W}-goo)`:"none"));let je=$t(xe,F.lid*(1-ct*.85),F.gx,F.gy);for(let Pe=0;Pe<Un;Pe++){let at=je[Pe],Ue=N[Pe],It=T[Pe];for(let At of["x","y","w","h","rx","a"]){if(X){Ue[At]=at[At];continue}It[At]=(It[At]+(at[At]-Ue[At])*.16)*.74,Ue[At]+=It[At]}let ut=de.current[Pe];ut&&(ut.setAttribute("x",(Ue.x-Ue.w/2).toFixed(2)),ut.setAttribute("y",(Ue.y-Ue.h/2).toFixed(2)),ut.setAttribute("width",Math.max(0,Ue.w).toFixed(2)),ut.setAttribute("height",Math.max(0,Ue.h).toFixed(2)),ut.setAttribute("rx",Math.max(0,Math.min(Ue.rx,Ue.w/2,Ue.h/2)).toFixed(2)),ut.setAttribute("opacity",Rr(Ue.a,0,1).toFixed(2)))}let Ke=X?0:Math.sin(xe/$e.breath)*1.5;!X&&Xe&&U<0?(xe>Q&&(V=(Math.random()<.5?-1:1)*(.35+Math.random()*.65),Q=xe+2600+Math.random()*4200),xe>ce&&(be=be>.1?0:1,ce=xe+(be>.1?900:9e3+Math.random()*11e3))):(V=0,be=0),R=(R+(V-m)*.028)*.9,m+=R,ae=(ae+(be-G)*.06)*.82,G+=ae;let hr=F.bh-ye,pr=m*3.4+G*4.5,Jr=m*2.2+G*3,Zr=G*2.4;if(x.current?.setAttribute("transform",`translate(${Jr.toFixed(2)} ${(Ke+hr-Ct+Zr).toFixed(2)}) rotate(${pr.toFixed(2)} 0 60)`),L.current&&L.current.setAttribute("transform",`translate(${Jr.toFixed(2)} ${(Ke+hr-Ct+Zr).toFixed(2)}) rotate(${pr.toFixed(2)} 0 60)`),u&&M.current){let Pe=-ke*.62,at=-ye*.7,Ue=-16+(X?0:Math.sin(xe/1400)*3)+pr*.4;M.current.setAttribute("transform",`translate(${Pe.toFixed(2)}, ${at.toFixed(2)}) rotate(${Ue.toFixed(2)})`)}if(C&&w.current){let Pe=12+F.gy*.5;w.current.setAttribute("transform",`translate(0, ${Pe.toFixed(2)})`)}if(f&&D.current){let Pe=Ye!=="thinking"&&Ye!=="visualizing"&&Ye!=="speaking";D.current.setAttribute("opacity",Pe?Rr(F.lid*1.3,0,1).toFixed(2):"0");let at=(Ue,It)=>{let ut=Math.max(1,Math.min(Ue.w,Ue.h)/2),At=Ue.y-Ue.h/2+ut,gr="";for(let[Ka,zr]of[[20,7],[48,8],[76,6.5]]){let xr=Ka*Math.PI/180,Xa=Ue.x+It*Math.sin(xr)*ut,Qa=At-Math.cos(xr)*ut,Ja=Ue.x+It*Math.sin(xr)*(ut+zr),Za=At-Math.cos(xr)*(ut+zr)-1.5,Yt=Ue.x+It*Math.sin(xr-.22)*(ut+zr*.65),eo=At-Math.cos(xr-.22)*(ut+zr*.65);gr+=` M ${Xa.toFixed(2)} ${Qa.toFixed(2)} Q ${Yt.toFixed(2)} ${eo.toFixed(2)} ${Ja.toFixed(2)} ${Za.toFixed(2)}`}return gr.trim()};H.current?.setAttribute("d",at(N[0],-1)),S.current?.setAttribute("d",at(N[1],1))}k=requestAnimationFrame(qt)},Rt=0;return k=requestAnimationFrame(qt),()=>cancelAnimationFrame(k)},[u,f,C,d]),Ht("svg",{className:"hsk-kiku-avatar",width:r,height:r,viewBox:"-100 -100 200 200","aria-hidden":"true",style:{display:"block",overflow:"visible"},children:[Ht("defs",{children:[De("linearGradient",{id:`${W}-marble`,x1:".2",y1:"0",x2:".42",y2:"1",children:[0,40,82,100].map((X,F)=>De("stop",{ref:$=>{J.current[F]=$},offset:`${X}%`,style:{stopColor:`var(--hsk-marble-${F+1}, #FAF7F2)`}},X))}),Ht("linearGradient",{id:`${W}-contact`,x1:"0",y1:"1",x2:"0",y2:"0",children:[De("stop",{ref:I,offset:"0%",stopColor:kn[0].color,stopOpacity:"0.9"}),De("stop",{ref:q,offset:"45%",stopColor:kn[0].light,stopOpacity:"0.5"}),De("stop",{ref:P,offset:"100%",stopColor:kn[0].light,stopOpacity:"0"})]}),Ht("radialGradient",{id:`${W}-sheen`,cx:".34",cy:".2",r:".55",children:[De("stop",{offset:"0%",stopColor:"#FFFFFF",style:{stopOpacity:"var(--hsk-marble-sheen, .9)"}}),De("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]}),Ht("linearGradient",{id:`${W}-hibiscus-petal`,x1:"0",y1:"1",x2:"0",y2:"0",children:[De("stop",{offset:"0%",stopColor:"#FF3366"}),De("stop",{offset:"65%",stopColor:"#FF758F"}),De("stop",{offset:"100%",stopColor:"#FFAAA6"})]}),Ht("radialGradient",{id:`${W}-blush-cheek`,cx:"50%",cy:"50%",r:"50%",children:[De("stop",{offset:"0%",stopColor:"#FB7185",stopOpacity:"0.48"}),De("stop",{offset:"100%",stopColor:"#FB7185",stopOpacity:"0"})]}),De("clipPath",{id:`${W}-skin`,children:De("use",{href:`#${W}-body`})}),Ht("filter",{id:`${W}-goo`,x:"-50%",y:"-50%",width:"200%",height:"200%",children:[De("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"4",result:"b"}),De("feColorMatrix",{in:"b",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7"})]}),Ht("mask",{id:`${W}-cut`,children:[De("path",{ref:E,d:"",fill:"#FFFFFF"}),De("g",{ref:te,children:Array.from({length:Un},(X,F)=>De("rect",{ref:$=>{de.current[F]=$},fill:"#000000"},F))})]})]}),Ht("g",{ref:x,mask:`url(#${W}-cut)`,children:[De("path",{id:`${W}-body`,ref:b,d:"",fill:`url(#${W}-marble)`}),Ht("g",{clipPath:`url(#${W}-skin)`,children:[De("ellipse",{cx:"-14",cy:"-40",rx:"46",ry:"34",fill:`url(#${W}-sheen)`}),De("rect",{ref:v,x:"-100",y:"-20",width:"200",height:"100",fill:`url(#${W}-contact)`,opacity:"0.45"})]})]}),Ht("g",{ref:L,style:{pointerEvents:"none"},children:[C&&Ht("g",{ref:w,children:[De("ellipse",{cx:"-28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${W}-blush-cheek)`}),De("ellipse",{cx:"28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${W}-blush-cheek)`})]}),f&&Ht("g",{ref:D,children:[De("path",{ref:H,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"}),De("path",{ref:S,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"})]}),u&&Ht("g",{ref:M,className:"hsk-avatar-flower",children:[De("path",{d:"M 0 0 C -12 -7 -15 5 0 0 Z",fill:"#10B981",transform:"translate(6, 4) rotate(-35)"}),[0,72,144,216,288].map(X=>De("path",{d:"M 0 0 C -6 -13 6 -13 0 0 Z",fill:`url(#${W}-hibiscus-petal)`,stroke:"#FF2A5F",strokeWidth:"0.6",transform:`rotate(${X-18})`},X)),De("path",{d:"M 0 0 Q 3 -10 9 -14",stroke:"#F59E0B",strokeWidth:"1.6",strokeLinecap:"round",fill:"none"}),De("circle",{cx:"9",cy:"-14",r:"1.3",fill:"#FDE047"}),De("circle",{cx:"7",cy:"-12",r:"1.1",fill:"#FDE047"}),De("circle",{cx:"6.5",cy:"-15",r:"1.1",fill:"#FDE047"}),De("circle",{cx:"0",cy:"0",r:"2.2",fill:"#881337"})]})]})]})}import{useState as Xc}from"react";import{Fragment as Qc,jsx as gn,jsxs as Ia}from"react/jsx-runtime";function Aa({className:e="",compact:r=!1}){let[t,n]=Xc(()=>da()),[a,o]=Xc(""),i=()=>{let c=!t;si(c),n(c),Xt(c?"reply":"interrupt",!0),o(ci())};return Ia("button",{type:"button",className:se("hsk-cb-sound-pill",r&&"is-compact",t&&"is-on",a&&a!=="running"&&a!=="off"&&"is-blocked",e),onClick:i,role:"switch","aria-checked":t,"aria-label":t?"Mute notification sounds":"Unmute notification sounds",children:[Ia("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[gn("path",{d:"M11 5 6 9H3v6h3l5 4V5Z"}),t?Ia(Qc,{children:[gn("path",{className:"hsk-snd-wave",style:{"--hsk-wave":0},d:"M15.5 8.5a5 5 0 0 1 0 7"}),gn("path",{className:"hsk-snd-wave",style:{"--hsk-wave":1},d:"M18.5 5.5a9 9 0 0 1 0 13"})]}):Ia(Qc,{children:[gn("line",{className:"hsk-snd-x",x1:"16",y1:"9",x2:"21",y2:"15"}),gn("line",{className:"hsk-snd-x",x1:"21",y1:"9",x2:"16",y2:"15"})]})]}),!r&&gn("span",{children:t?"Sounds":"Muted"})]})}import{useCallback as Jc,useLayoutEffect as Dd,useRef as xn}from"react";var Hd=300,Bd=220,$d=120,qd=.45,Od=.4,Ud=.25,Pa=e=>Math.min(1,Math.max(0,e));function Wd(e,r,t,n){let a=3*e,o=3*(t-e)-a,i=1-a-o,c=3*r,s=3*(n-r)-c,l=1-c-s,h=u=>((i*u+o)*u+a)*u,p=u=>((l*u+s)*u+c)*u,d=u=>(3*i*u+2*o)*u+a;return u=>{let f=u;for(let C=0;C<8;C++){let b=h(f)-u,E=d(f);if(Math.abs(b)<1e-5||Math.abs(E)<1e-6)break;f-=b/E}return p(Pa(f))}}var Vd=Wd(.32,.72,0,1);function Gd(e){let r=e.getBoundingClientRect();return{top:r.top,left:r.left,width:r.width,height:r.height,radius:Math.min(parseFloat(getComputedStyle(e).borderTopLeftRadius)||0,r.height/2)}}function Zc({target:e,trigger:r,shadow:t,radius:n=0,enabled:a,onClosed:o}){let i=xn(null),c=xn(null),s=xn(!1),l=xn(0),h=xn(null),p=xn(o);p.current=o;let d=Jc(x=>{l.current=x;let L=e(),M=i.current,w=c.current;if(!L||!M||!w)return;let D=1-x,H=Math.min(Math.max(M.top,w.top),w.bottom-M.height),S=Math.min(Math.max(M.left,w.left),w.right-M.width),O=(M.top-H)*D,v=(M.left-S)*D,I=Math.max(0,(H-w.top)*D),q=Math.max(0,(S-w.left)*D),P=Math.max(0,(w.right-S-M.width)*D),J=Math.max(0,(w.bottom-H-M.height)*D),de=M.radius*D+n*x;L.style.clipPath=`inset(${I}px ${P}px ${J}px ${q}px round ${de}px)`,L.style.translate=v||O?`${v}px ${O}px`:"";let te=t?.();te&&Object.assign(te.style,{left:`${q}px`,top:`${I}px`,width:`${Math.max(0,w.width-q-P)}px`,height:`${Math.max(0,w.height-I-J)}px`,borderRadius:`${de}px`,translate:L.style.translate}),L.style.setProperty("--hsk-island-content",String(Pa((x-qd)/Od)));let W=String(Pa(x/Ud));L.style.opacity=W,te&&(te.style.opacity=W)},[e,t,n]),u=()=>{let x=e();if(x)for(let M of["clip-path","translate","--hsk-island-content","opacity"])x.style.removeProperty(M);let L=t?.();if(L)for(let M of["left","top","width","height","border-radius","translate","opacity"])L.style.removeProperty(M)},f=()=>{h.current!==null&&cancelAnimationFrame(h.current),h.current=null},C=(x,L,M)=>{f();let w=l.current,D=Math.max($d,L*Math.abs(x-w)),H=performance.now(),S=O=>{let v=Pa((O-H)/D);d(w+(x-w)*Vd(v)),v<1?h.current=requestAnimationFrame(S):(h.current=null,M())};d(w),h.current=requestAnimationFrame(S)},b=(x,L)=>{i.current=Gd(L),x.style.clipPath="",x.style.translate="",c.current=x.getBoundingClientRect()};return Dd(()=>{if(!a)return;let x=e(),L=r();if(!(!x||!L))return s.current=!1,x.style.removeProperty("pointer-events"),b(x,L),l.current=0,C(1,Hd,u),()=>{f(),u()}},[a]),{close:Jc(()=>{let x=e(),L=a?r():null,M=L?.getBoundingClientRect(),w=M&&M.bottom>0&&M.top<window.innerHeight;if(!x||!L||!w){p.current();return}let D=h.current!==null?l.current:1;b(x,L),s.current=!0,x.style.pointerEvents="none",l.current=D,C(0,Bd,()=>p.current())},[a,e,r])}}import{jsx as Ko,jsxs as jd}from"react/jsx-runtime";function _a({mobile:e=!1,closing:r=!1}){let t=Gt();return jd("div",{className:se("hsk-cb-theme-discovery",e&&"is-mobile",r&&"is-closing"),role:"note",children:[Ko("svg",{viewBox:e?"0 0 360 260":"0 0 120 80",preserveAspectRatio:"none",fill:"none","aria-hidden":"true",children:Ko("path",{pathLength:"1",vectorEffect:"non-scaling-stroke",d:e?"M174 250C213 263 247 245 239 225C230 205 205 222 220 239C244 269 294 251 326 220C354 194 343 158 351 132C363 90 349 66 352 43C356 20 311 16 215 14M225 5L213 14L224 24":"M26 67C48 78 63 61 54 52C43 43 37 58 50 62C81 73 106 44 84 22C79 16 73 13 66 12M72 27L65 12L83 10"})}),Ko("span",{children:t(e?"themeHoldHint":"themeClickHint")})]})}import{jsx as et,jsxs as Lr}from"react/jsx-runtime";var el=!1;function tl({title:e,logo:r,hasMessages:t,avatarState:n="idle",unread:a=!1,awayFromBottom:o=!1,themeMenuOpen:i=!1,themeMenuClosing:c=!1,themeDiscovery:s=!1,onThemeMenuReady:l,onThemeMenuClosed:h,isNarrow:p=!1,currentTheme:d="dark",onJumpToLatest:u,onReset:f,onClose:C,onToggleThemeMenu:b,onSelectTheme:E,themeAttr:x,below:L,layoutControl:M}){let w=Gt(),D=!!M,H=qe.useRef(null),S=qe.useRef(null),O=qe.useRef(null),v=qe.useRef(null),[I]=qe.useState(()=>{let G=!el;return el=!0,G}),q=qe.useRef(null),P=qe.useRef(null),J=w("clearChat"),[de,te]=qe.useState({size:12,compact:!1});qe.useLayoutEffect(()=>{let G=H.current,ae=q.current,be=P.current;if(!G||!ae||!be)return;let ce=!0,_=()=>{if(!ce)return;let ve=ae.parentElement,Ie=getComputedStyle(G).gridTemplateColumns.split(" "),fe=parseFloat(Ie[2])||ve.clientWidth,Se=ve.querySelector(".hsk-cb-exit-btn"),Ne=parseFloat(getComputedStyle(ve).gap)||0,Te=Math.max(0,fe-(Se?Se.offsetWidth+Ne:0)-30),he=Math.min(12,Math.floor(1200*Te/Math.max(1,be.scrollWidth))/100),Fe=he<10;te(Oe=>Oe.size===he&&Oe.compact===Fe?Oe:{size:he,compact:Fe})};_();let ee=new ResizeObserver(_);return ee.observe(G),v.current&&ee.observe(v.current),document.fonts?.ready.then(_).catch(()=>{}),document.fonts?.addEventListener("loadingdone",_),()=>{ce=!1,ee.disconnect(),document.fonts?.removeEventListener("loadingdone",_)}},[J,t,p,e,r]),qe.useLayoutEffect(()=>{let G=H.current,ae=v.current,be=S.current;if(!G||!ae||!be)return;let ce=ae.offsetParent;if(!ce)return;let _=ce.offsetTop+ae.offsetTop+ae.offsetHeight/2;G.style.setProperty("--hsk-tray-top",`${_}px`),G.style.setProperty("--hsk-tray-head",`${ae.offsetHeight/2+8}px`),G.style.setProperty("--hsk-tray-h",`${be.offsetHeight}px`),G.style.setProperty("--hsk-tray-w",`${be.offsetWidth}px`)},[i,p,D]);let[W]=qe.useState(()=>typeof window<"u"&&!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches),[le,X]=qe.useState(!1);qe.useEffect(()=>{if(!p||le)return;let G=window.requestIdleCallback,ae=G?G(()=>X(!0),{timeout:1200}):setTimeout(()=>X(!0),600);return()=>{let be=window.cancelIdleCallback;G&&be?be(ae):clearTimeout(ae)}},[p,le]);let F=p&&(i||le);qe.useEffect(()=>{if(p&&!le)return;let G=requestAnimationFrame(()=>l?.());return()=>cancelAnimationFrame(G)},[p,le,l]);let $=Zc({target:qe.useCallback(()=>S.current,[]),trigger:qe.useCallback(()=>v.current,[]),shadow:qe.useCallback(()=>O.current,[]),radius:18,enabled:p&&i&&W,onClosed:()=>h?.()});qe.useEffect(()=>{p&&c&&$.close()},[c,p]);let[N,T]=qe.useState(!1),[A,j]=qe.useState("#134e3d"),[y,z]=qe.useState("rgba(19, 78, 61, 0.45)"),k=qe.useRef(void 0),ie=qe.useRef(null),ne=qe.useRef(!1),U=qe.useRef(0),oe=qe.useCallback(()=>{ne.current=!1,U.current=Date.now(),ie.current=setTimeout(()=>{if(ne.current=!0,typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}b?.()},350)},[b]),m=qe.useCallback(()=>{ie.current&&(clearTimeout(ie.current),ie.current=null)},[]),R=qe.useCallback(()=>{ie.current&&(clearTimeout(ie.current),ie.current=null)},[]),V=qe.useCallback(G=>{if(ne.current){ne.current=!1,G.preventDefault(),G.stopPropagation();return}o?u?.():p?b?.():k.current?.()},[o,p,u,b]),Q=qe.useCallback((G,ae,be)=>{G>.04?(T(!0),j(ae),z(be)):T(!1)},[]);return Lr("div",{ref:H,className:se("hsk-cb-topbar",p&&i&&"is-docked"),children:[et("div",{className:"hsk-cb-topbar-left",style:{minWidth:"34px"},children:p&&et("button",{type:"button",className:"hsk-cb-back",onClick:C,"aria-label":w("back"),children:et("span",{className:"hsk-cb-back-icon",children:et(on,{})})})}),Lr("div",{className:se("hsk-cb-topbar-mark",p&&i&&"is-oozing",s&&i&&!c&&"is-discovering"),"data-impacting":N?"true":"false",style:{"--hsk-contact-color":A,"--hsk-contact-glow":y},"data-unread":a?"true":"false",onTouchStart:oe,onTouchEnd:m,onTouchMove:R,onTouchCancel:R,onClick:V,role:"button",tabIndex:0,"aria-label":o?w("jumpToLatest"):`${e} (tap for themes)`,children:[et(Kc,{state:n,size:34,theme:d,alert:a,onImpact:Q,triggerRef:k,dropIn:I}),et("div",{className:"hsk-cb-topbar-identity",children:r?et("img",{ref:v,className:"hsk-cb-topbar-logo",src:r,alt:e}):et("span",{ref:v,className:"hsk-cb-topbar-name",children:e})})]}),Lr("div",{className:"hsk-cb-topbar-actions",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t&&Lr("button",{ref:q,type:"button",className:se("hsk-cb-topbar-btn",de.compact&&"is-compact"),onClick:f,title:J,"aria-label":J,children:[et("span",{ref:P,className:"hsk-cb-clear-measure","aria-hidden":"true",children:J}),de.compact?et(xa,{}):et("span",{className:"hsk-cb-topbar-btn-label",style:{fontSize:de.size},children:J})]}),!p&&et("button",{type:"button",className:"hsk-cb-squircle-btn hsk-cb-exit-btn",onClick:C,"aria-label":"Close Chat",children:et(an,{})})]}),p&&i&&et("div",{className:se("hsk-cb-topbar-scrim",s&&"is-discovery",c&&"is-closing"),onClick:b,"aria-hidden":"true"}),F&&et("div",{className:se("hsk-cb-tray-shadow",!i&&"is-parked"),"aria-hidden":"true",children:et("div",{ref:O})}),F&&et("div",{ref:S,className:se("hsk-cb-topbar-ooze-menu",c&&"is-closing",W&&"is-island",!i&&"is-parked"),role:"dialog","aria-label":"Theme selector",style:{position:"absolute",left:"50%",transform:"translateX(-50%)",zIndex:1e3},onPointerDown:G=>G.stopPropagation(),onClick:G=>G.stopPropagation(),onMouseDown:G=>G.stopPropagation(),children:Lr("div",{className:"hsk-cb-theme-block",children:[Lr("div",{className:"hsk-cb-tray-aside",children:[et(Aa,{compact:!0}),et("span",{className:"hsk-cb-tray-rule","aria-hidden":"true"}),et("span",{className:"hsk-cb-theme-vlabel","aria-hidden":"true",children:"Themes"})]}),et("div",{className:"hsk-cb-theme-2x2-grid",children:cn.map(({id:G,label:ae,Icon:be})=>Lr("button",{type:"button",className:se("hsk-cb-theme-grid-item",d===G&&"is-active"),onClick:ce=>{ce.stopPropagation(),E?.(G)},children:[et(be,{}),et("span",{children:ae})]},G))}),M&&Lr("div",{className:"hsk-cb-dock-layout",children:[et("span",{className:"hsk-cb-layout-label",children:"RESPONSIVE LAYOUT"}),M]})]})}),p&&i&&L&&et("div",{className:se("hsk-cb-tray-below",c&&"is-closing"),children:L}),p&&i&&s&&et(_a,{mobile:!0,closing:c})]})}import Vr from"react";import Fa from"react";import{jsx as ol,jsxs as Zd}from"react/jsx-runtime";var rl=83,Yd=2,Ha=240,Qo=160,_t=Ha/2,gt=Qo/2,mr=24,vn=50,yn=56,Jo=124,Sn=22,Jt=6,Zo=13,Kd=30,lr=(e,r,t)=>e+(r-e)*t,Vn=(e,r)=>Math.sin(e*12.9898+r*78.233)*.5;function sl(e,r,t,n,a,o=0){let i=[];for(let l=0;l<16;l++){let h=l/16*Math.PI*2,p=1+Math.sin(l*2.3+1.7)*.06+Math.sin(l*5.1)*.03+Vn(e.n,l)*.02;i.push([r+Math.cos(h+o)*n*p,t+Math.sin(h+o)*a*p])}let c=(l,h)=>[(l[0]+h[0])/2,(l[1]+h[1])/2],{ctx:s}=e;s.beginPath(),s.moveTo(...c(i[15],i[0]));for(let l=0;l<16;l++)s.quadraticCurveTo(i[l][0],i[l][1],...c(i[l],i[(l+1)%16]));s.closePath()}function $a(e,r){let{ctx:t,dpr:n}=e;t.shadowColor=`rgba(0,0,0,${.5-r*.22})`,t.shadowBlur=(4+r*14)*n,t.shadowOffsetX=(1.5+r*13)*n,t.shadowOffsetY=(2.5+r*17)*n}function ns(e,r,t,n){let a=e.ctx.createRadialGradient(r-n*.35,t-n*.4,0,r,t,n*1.15);return a.addColorStop(0,e.light),a.addColorStop(.35,e.clay),a.addColorStop(1,e.dark),a}function Xd(e,r,t){let n=e.ctx.createLinearGradient(0,r-t/2,0,r+t/2);return n.addColorStop(0,e.clay),n.addColorStop(.25,e.light),n.addColorStop(.5,e.clay),n.addColorStop(1,e.dark),n}function Wr(e,r,t=0){let{ctx:n}=e,a=r*(1+t*.3);n.save(),$a(e,t),n.fillStyle=ns(e,_t,gt,a),sl(e,_t,gt,a,a,e.n*.03),n.fill(),n.restore()}function Xo(e,r,t,n){let{ctx:a}=e;a.save(),n!==void 0&&(a.beginPath(),a.rect(0,0,Ha,n),a.clip()),$a(e,0),a.fillStyle=ns(e,_t,gt,Math.max(r,t)),sl(e,_t,gt,r,t),a.fill(),a.restore()}function Da(e,r,t,n,a,o=a/2,i=a/2){let{ctx:c}=e;c.save(),$a(e,0),c.fillStyle=Xd(e,n,a),c.beginPath(),c.roundRect(r+Vn(e.n,r)*.6,n-a/2+Vn(e.n,n)*.6,t-r,a,[o,i,i,o]),c.fill(),c.restore()}function es(e,r,t,n,a=0){let{ctx:o}=e,i=n*(1+a*.2);o.save(),$a(e,a),o.fillStyle=ns(e,r,t,i),o.beginPath(),o.arc(r,t,i,0,Math.PI*2),o.fill(),o.restore(),o.save(),o.strokeStyle=e.dark,o.lineWidth=1.4,o.lineCap="round",o.beginPath();for(let c=0;c<=1.001;c+=.04){let s=c*Math.PI*5+r*.3,l=(1.5+c*(n-4))*(1+a*.2),h=r+Math.cos(s)*l,p=t+Math.sin(s)*l;c===0?o.moveTo(h,p):o.lineTo(h,p)}o.stroke(),o.restore()}function Ba(e,r){let{ctx:t}=e;t.save(),t.strokeStyle=`rgba(${e.ink},${.55*r})`,t.lineWidth=2,t.lineCap="round";for(let n=0;n<7;n++){let a=n/7*Math.PI*2+.14,o=38+(1-r)*8,i=n%2?5:8;t.beginPath(),t.moveTo(_t+Math.cos(a)*o,gt+Math.sin(a)*o),t.lineTo(_t+Math.cos(a)*(o+i),gt+Math.sin(a)*(o+i)),t.stroke()}t.restore()}var ts=e=>_t-Jo/2+Jo*e/Jt;function Qd(e,r){let{ctx:t}=e;t.save(),t.strokeStyle=e.dark,t.lineWidth=1.5,t.lineCap="round",t.beginPath(),t.moveTo(r,gt-Sn/2+2),t.lineTo(r+Vn(e.n,r)*1.5,gt+Sn/2-2),t.stroke(),t.restore()}var rs=e=>_t+(e-(Jt-1)/2)*Kd;function Wn(e,r,t=-1,n=-1){for(let a=0;a<Jt;a++){let o=0;for(let s=0;s<r;s++)o+=a<=s?-2:2;let i=ts(a)+o,c=ts(a+1)+o;a===n?es(e,lr((i+c)/2,rs(a),.5),gt-4,Zo,.5):a<=t?es(e,rs(a),gt,Zo):Da(e,i,c,gt,Sn,a===0?Sn/2:2,a===Jt-1?Sn/2:2)}}function Jd(){let e=[];for(let n=0;n<5;n++)e.push({draw:a=>Wr(a,mr)});let r=[[mr,mr,34,38],[34,38,44,48],[44,48,vn,yn]];for(let[n,a,o,i]of r){for(let c=0;c<3;c++){let s=(c+1)/3,l=c===0?1.05:1;e.push({hold:1,thump:c===0?.25:void 0,draw:h=>Xo(h,lr(n,o,s),lr(a,i,s)*l)})}e.push({hold:1,draw:c=>Xo(c,o,i)})}let t=0;for(let n=0;n<12;n++){let a=(n+1)/12,o=lr(gt+yn,gt-yn,a),i=lr(8,24,a),c=(o-gt)/yn;t=Math.max(t,2*vn*Math.sqrt(Math.max(0,1-c*c)),30);let s=t;e.push({draw:l=>{a<1&&Xo(l,vn,yn,o-i*.3),Da(l,_t-s/2,_t+s/2,o,i)}})}for(let n of[.5,1])e.push({draw:a=>Da(a,_t-vn,_t+vn,lr(gt-yn,gt,n),24)});for(let n=0;n<6;n++){let a=(n+1)/6,o=lr(2*vn,Jo,a),i=lr(24,Sn,a),c=n%2?2:-2;e.push({draw:s=>Da(s,_t-o/2+c,_t+o/2+c,gt,i)})}for(let n=1;n<Jt;n++)e.push({draw:a=>{Wn(a,n-1),Qd(a,ts(n))}}),e.push({thump:.35,draw:a=>Wn(a,n)});e.push({draw:n=>Wn(n,Jt-1)});for(let n=0;n<Jt;n++)e.push({thump:.12,draw:a=>Wn(a,Jt-1,n-1,n)});for(let n=0;n<4;n++)e.push({draw:a=>Wn(a,Jt-1,Jt-1)});for(let n of[.35,.7,1])e.push({draw:a=>{for(let o=0;o<Jt;o++)es(a,lr(rs(o),_t,n),gt,lr(Zo,10,n),.4)}});return e.push({thump:1,draw:n=>{Wr(n,mr*1.3),Ba(n,1)}}),e.push({draw:n=>{Wr(n,mr*1.12),Ba(n,.4)}}),e.push({draw:n=>Wr(n,mr*1.04)}),e}var wn=Jd(),nl=[...[1.6,1.25,.9,.5,.18].map(e=>({draw:r=>Wr(r,mr,e)})),{thump:.7,draw:e=>{Wr(e,mr*1.24),Ba(e,1)}},{draw:e=>{Wr(e,mr*1.08),Ba(e,.4)}}],al=[1,.7,.35,0];function Cn(e,r){let t=document.createElement("span");t.style.display="none",t.style.color=r,e.parentElement?.appendChild(t);let n=getComputedStyle(t).color;return t.remove(),n}function il({phase:e,label:r,theme:t}){let n=Fa.useRef(null),a=Fa.useRef(null),o=Fa.useRef({n:0,at:0,held:0,entered:!1,last:wn[0]});return Fa.useEffect(()=>{let i=n.current,c=a.current,s=i?.getContext("2d");if(!i||!s||!c)return;let l=Math.min(window.devicePixelRatio||1,3);i.width=Ha*l,i.height=Qo*l;let h="var(--hsk-primary, #ff6a33)",p={ctx:s,dpr:l,n:0,clay:Cn(i,h),light:Cn(i,`color-mix(in srgb, ${h} 55%, white)`),dark:Cn(i,`color-mix(in srgb, ${h} 70%, black)`),ink:getComputedStyle(i).getPropertyValue("--hsk-doodle-ink").trim()||"31, 31, 31"},d=o.current,u="",f=()=>{let w=getComputedStyle(i).getPropertyValue("--hsk-primary").trim()||"#ff6a33";w!==u&&(u=w,p.clay=Cn(i,w),p.light=Cn(i,`color-mix(in srgb, ${w} 55%, white)`),p.dark=Cn(i,`color-mix(in srgb, ${w} 70%, black)`),p.ink=getComputedStyle(i).getPropertyValue("--hsk-doodle-ink").trim()||"31, 31, 31")},C=(w,D=1)=>{f(),s.setTransform(l,0,0,l,0,0),s.clearRect(0,0,Ha,Qo),s.globalAlpha=D,p.n=d.n++,w.draw(p),s.globalAlpha=1},b=w=>{let D=i.getBoundingClientRect();pc({x:D.left+D.width/2,y:D.top+D.height/2,strength:w}),c.style.translate="0 1px",c.style.rotate=`${Vn(d.n,4)*.8}deg`};if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){C(wn[0]);let w=window.setInterval(()=>C(wn[0]),rl);return()=>clearInterval(w)}let E=e==="exit"?null:e==="enter"&&!d.entered?nl:wn;E&&(d.at=0);let x=0,L=0,M=()=>{if(c.style.translate="",c.style.rotate="",!E){x===0&&b(.6),C(d.last,al[x]),++x>=al.length&&clearInterval(L);return}let w=E[d.at];C(w),d.last=w,w.thump&&d.held===0&&b(w.thump),!(E===wn&&++d.held<(w.hold??Yd))&&(d.held=0,!(++d.at<E.length)&&(E===nl&&(d.entered=!0),E=wn,d.at=0))};return M(),L=window.setInterval(M,rl),()=>clearInterval(L)},[e==="exit",t]),Zd("div",{className:"hsk-clay",children:[ol("canvas",{className:"hsk-clay-table",ref:n,"aria-hidden":"true"}),ol("p",{className:"hsk-lang-preparing",ref:a,children:r})]})}import{jsx as Ce,jsxs as rt}from"react/jsx-runtime";function eu(){return Ce("span",{className:"hsk-cb-check","aria-hidden":"true",children:Ce("svg",{viewBox:"0 0 16 16",children:Ce("path",{d:"M3.5 8.4 6.6 11.4 12.6 4.8"})})})}function cl({theme:e,inOnboarding:r,justCompleted:t,onboardingMood:n,awaitingLang:a,awaitingName:o,awaitingEntityLang:i,awaitingConsent:c,termsAgreed:s,shopperLanguage:l,pendingLanguage:h,shopperName:p,entityLangPref:d,chromeReady:u,activeChips:f,speechLang:C,t:b,tNode:E,chooseLanguage:x,langSwitching:L=!1,isLangPreparing:M,chooseEntityLang:w,agreeTerms:D,handleSend:H}){let S=h||l,O=!S||S.toLowerCase()==="english"||S.toLowerCase()==="en",v=M??(L||!!h||!!l&&!u&&!O),I=Ar(S),[q,P]=Vr.useState(v),[J,de]=Vr.useState(()=>v?"spinner-steady":"idle"),te=Vr.useRef([]),W=()=>{te.current.forEach(clearTimeout),te.current=[]};v!==q&&(P(v),W(),v?(de("step1-exit"),te.current.push(setTimeout(()=>de("spinner-enter"),280)),te.current.push(setTimeout(()=>de("spinner-steady"),960))):(de("spinner-exit"),te.current.push(setTimeout(()=>de("idle"),460)))),Vr.useEffect(()=>()=>W(),[]);let le=J==="spinner-enter"||J==="spinner-steady"||J==="spinner-exit",X=J==="step1-exit",F=le||X||!l||a?"1":!p||o?"2":!d||i?"3":!s||c?"4":null,[$,N]=Vr.useState(null),[T,A]=Vr.useState(3);Vr.useEffect(()=>{if(!c)return;A(3);let y=setInterval(()=>{A(z=>z<=1?(clearInterval(y),0):z-1)},1e3);return()=>clearInterval(y)},[c]);let j=l?In(l,C)||l.charAt(0).toUpperCase()+l.slice(1):"";return Ce("div",{className:"hsk-cb-empty",children:rt("div",{className:"hsk-cb-onboarding-card",children:[F&&Ce("div",{className:"hsk-cb-onboarding-head",children:rt("span",{className:"hsk-cb-step-badge",dir:"ltr",children:[F," / 4"]})}),le?Ce("div",{className:se("hsk-lang-loader",J==="spinner-enter"&&"hsk-lang-loader--enter",J==="spinner-exit"&&"hsk-lang-loader--exit"),children:Ce(il,{theme:e,phase:J==="spinner-exit"?"exit":J==="spinner-enter"?"enter":"steady",label:I.preparing})},"spinner-loading"):X||a||!l?rt("div",{className:se("hsk-cb-hello-wrap",X&&"hsk-step1-exit"),children:[Ce("h2",{className:"hsk-cb-hello",children:"Which language do you want to use?"}),rt("div",{className:"hsk-cb-lang-chips",children:[fa.map((y,z)=>Ce("button",{type:"button",className:"hsk-cb-lang-chip",style:{"--hsk-pill-idx":z},lang:y.tag,dir:y.rtl?"rtl":"ltr",disabled:L,onClick:()=>!L&&x(y.value),children:y.native},y.value)),Ce("span",{className:"hsk-cb-lang-chips-hint",style:{"--hsk-pill-idx":fa.length},children:"or type another one"})]})]},"step-lang"):o||!p?rt("div",{className:"hsk-cb-hello-wrap hsk-cb-name-step hsk-step-enter",children:[Ce("h2",{className:"hsk-cb-hello",children:b("nameStepTitle")}),Ce("p",{className:"hsk-cb-hello-ask",children:b("nameStepAsk")}),Ce("p",{className:"hsk-cb-hello-hint",children:b("nameStepHint")})]},"step-name"):i?rt("div",{className:"hsk-cb-hello-wrap",children:[Ce("h2",{className:"hsk-cb-hello",children:b("howShouldResultsLook")}),Ce("p",{className:"hsk-cb-hello-lead",children:E("entityLangIntro",{lang:j})}),Ce("div",{className:"hsk-cb-entlang-opts",role:"radiogroup","aria-label":b("howShouldResultsLook"),children:["translated","original"].map((y,z)=>rt("button",{type:"button",role:"radio","aria-checked":($??d)===y,className:se("hsk-cb-entlang-opt",($??d)===y&&"is-selected"),style:{"--hsk-opt-idx":z},onClick:()=>N(y),children:[Ce(eu,{}),rt("span",{className:"hsk-cb-entlang-opt-text",children:[Ce("span",{className:"hsk-cb-entlang-opt-title",children:y==="translated"?E("inLanguage",{lang:j}):b("asWritten")}),Ce("span",{className:"hsk-cb-entlang-opt-note",children:b(y==="translated"?"detailsTranslated":"namesAsWritten")})]})]},y))}),Ce("div",{className:"hsk-cb-terms-action-wrap",children:Ce("button",{type:"button",className:se("hsk-cb-terms-agree-btn",$&&"is-active"),disabled:!$,onClick:()=>$&&w($),children:b("continueButton")})})]},"step-entity-lang"):c?rt("div",{className:"hsk-cb-hello-wrap",children:[Ce("h2",{className:"hsk-cb-hello",children:b("termsStepTitle")}),Ce("p",{className:"hsk-cb-hello-lead",children:b("termsStepSubtitle")}),rt("div",{className:"hsk-cb-terms-sanctuary",children:[rt("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":0},children:[rt("div",{className:"hsk-cb-terms-head",children:[Ce("span",{className:"hsk-cb-terms-numeral",children:"I"}),Ce("h3",{className:"hsk-cb-terms-title",children:b("termsPiiTitle")})]}),Ce("p",{className:"hsk-cb-terms-desc",children:b("termsPiiDesc")})]}),Ce("div",{className:"hsk-cb-terms-divider"}),rt("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":1},children:[rt("div",{className:"hsk-cb-terms-head",children:[Ce("span",{className:"hsk-cb-terms-numeral",children:"II"}),Ce("h3",{className:"hsk-cb-terms-title",children:b("termsSessionTitle")})]}),Ce("p",{className:"hsk-cb-terms-desc",children:b("termsSessionDesc")})]}),Ce("div",{className:"hsk-cb-terms-divider"}),rt("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":2},children:[rt("div",{className:"hsk-cb-terms-head",children:[Ce("span",{className:"hsk-cb-terms-numeral",children:"III"}),Ce("h3",{className:"hsk-cb-terms-title",children:b("termsMemoryTitle")})]}),Ce("p",{className:"hsk-cb-terms-desc",children:b("termsMemoryDesc")})]}),Ce("div",{className:"hsk-cb-terms-divider"}),rt("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":3},children:[rt("div",{className:"hsk-cb-terms-head",children:[Ce("span",{className:"hsk-cb-terms-numeral",children:"IV"}),Ce("h3",{className:"hsk-cb-terms-title",children:b("termsCookieTitle")})]}),Ce("p",{className:"hsk-cb-terms-desc",children:b("termsCookieDesc")})]}),Ce("div",{className:"hsk-cb-terms-divider"}),rt("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":4},children:[rt("div",{className:"hsk-cb-terms-head",children:[Ce("span",{className:"hsk-cb-terms-numeral",children:"V"}),Ce("h3",{className:"hsk-cb-terms-title",children:b("termsAiTitle")})]}),Ce("p",{className:"hsk-cb-terms-desc",children:b("termsAiDesc")})]})]}),rt("p",{className:"hsk-cb-terms-more",children:[b("privacyMore")," ",Ce("a",{href:"https://akropolys.cloud/privacy",target:"_blank",rel:"noopener noreferrer",dir:"ltr",children:"akropolys.cloud/privacy"})]}),Ce("div",{className:"hsk-cb-terms-action-wrap",children:Ce("button",{type:"button",className:se("hsk-cb-terms-agree-btn",T===0&&"is-active"),disabled:T>0,onClick:D,children:T>0?b("termsAgreeCounting",{seconds:String(T)}):b("termsAgreeButton")})})]},"step-terms"):t?rt("div",{className:"hsk-cb-hello-wrap",children:[Ce("h2",{className:"hsk-cb-hello",children:E("allSet",{name:p})}),Ce("p",{className:"hsk-cb-hello-lead",children:d==="translated"?E("replyingTranslated",{lang:j}):E("replyingOriginal",{lang:j})})]},"step-completed"):p?rt("div",{className:"hsk-cb-hello-wrap",children:[Ce("h2",{className:"hsk-cb-hello",children:E("greetReturning",{name:p})}),Ce("p",{className:"hsk-cb-hello-lead",children:b("greetReturningLead")})]},"step-returning"):rt("div",{className:"hsk-cb-hello-wrap",children:[rt("h2",{className:"hsk-cb-hello",children:["Hello, I am ",Ce("b",{children:"kiku"}),"."]}),Ce("p",{className:"hsk-cb-hello-lead",children:"Ask me to find, show or save anything. I look through this whole website for you."})]},"step-initial"),!r&&(f?.length??0)>0&&Ce("div",{className:"hsk-cb-chips",children:f.map((y,z)=>Ce("button",{className:"hsk-cb-chip",style:{"--hsk-pill-idx":z},onClick:()=>H(y),children:y},y))})]})})}import{jsx as Gn,jsxs as tu}from"react/jsx-runtime";function as({wide:e,onToggle:r,emphasized:t=!1}){return tu("button",{type:"button",className:`hsk-cb-sound-pill hsk-cb-layout-toggle${t?" is-discovery":""}`,role:"switch","aria-checked":e,"aria-label":"Wide AI responses",onClick:r,children:[Gn("span",{className:"hsk-cb-layout-track","aria-hidden":"true",children:Gn("span",{className:"hsk-cb-layout-thumb",children:Gn("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:Gn("path",{d:"M3 4h10M3 8h10M3 12h7"})})})}),Gn("span",{children:"Wide"})]})}import{useEffect as ll,useLayoutEffect as ru,useRef as os,useState as nu}from"react";var hl="akropolys_chat_layout";function pl(e){let[r,t]=nu(()=>{try{return typeof window<"u"&&localStorage.getItem(hl)==="wide"}catch{return!1}}),n=os(null),a=os([]),o=os(new Map),i=()=>{a.current.forEach(s=>s.cancel()),o.current.clear(),e.current?.querySelectorAll(".hsk-cb-msg-group").forEach(s=>o.current.set(s,s.getBoundingClientRect()));let c=e.current;if(c){let s=c.getBoundingClientRect().top,l=Array.from(c.querySelectorAll(".hsk-cb-msg-group")).find(h=>h.getBoundingClientRect().bottom>s);n.current={node:l,top:l?l.getBoundingClientRect().top-s:0,bottom:c.scrollHeight-c.scrollTop-c.clientHeight<40}}t(s=>!s)};return ru(()=>{let c=n.current,s=e.current;if(!c||!s)return;n.current=null;let l=s.style.scrollBehavior;if(s.style.scrollBehavior="auto",c.bottom?s.scrollTop=s.scrollHeight:c.node?.isConnected&&(s.scrollTop+=c.node.getBoundingClientRect().top-s.getBoundingClientRect().top-c.top),s.style.scrollBehavior=l,a.current.forEach(h=>h.cancel()),a.current=[],!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){let h=s.getBoundingClientRect();for(let p of s.querySelectorAll(".hsk-cb-msg-group")){let d=p.getBoundingClientRect();if(d.bottom<h.top||d.top>h.bottom||!p.animate)continue;let u=o.current.get(p);!u||!d.width||!d.height||a.current.push(p.animate([{transformOrigin:"top left",transform:`translate(${u.left-d.left}px, ${u.top-d.top}px) scale(${u.width/d.width}, ${u.height/d.height})`},{transformOrigin:"top left",transform:"none"}],{duration:360,easing:"cubic-bezier(.4,0,.2,1)"}))}}},[r,e]),ll(()=>{try{localStorage.setItem(hl,r?"wide":"bubbles")}catch{}},[r]),ll(()=>()=>a.current.forEach(c=>c.cancel()),[]),{wide:r,toggle:i}}import{useState as dl,useEffect as au,useRef as ou}from"react";import{jsx as ss,jsxs as ul}from"react/jsx-runtime";function Gr(e){let r=e.match(/<\s*thinking\s*>/i);if(!r)return{thinking:"",content:e,isComplete:!0};let t=r.index??0,n=r[0].length,a=t+n,o=e.slice(0,t),i=e.slice(a),c=i.match(/<\/\s*thinking\s*>/i);if(!c)return{thinking:i,content:o,isComplete:!1};let s=c.index??0,l=c[0].length;return{thinking:i.slice(0,s),content:o+i.slice(s+l),isComplete:!0}}var jr=e=>e==="with_team"||e==="back_with_kiku"||e==="team_closed"||e==="team_joined";function su(e){return e<60?`${Math.max(1,Math.round(e))}s`:e<3600?`${Math.round(e/60)} min`:`${Math.round(e/3600)} h`}function ml({text:e,isComplete:r,seconds:t,stage:n,repliedSeconds:a}){let o=Gt(),i=ou(Date.now()),[c,s]=dl(()=>r?null:0),[l,h]=dl(!r);au(()=>{if(r){c!==null&&(s(Math.max(1,Math.round((Date.now()-i.current)/1e3))),h(!1));return}h(!0);let f=setInterval(()=>{s(Math.round((Date.now()-i.current)/1e3))},1e3);return()=>clearInterval(f)},[r]);let p=t??c,d=a!=null?o("repliedIn",{duration:su(a)}):n==="with_team"?o("withTeam"):n==="back_with_kiku"?o("backWithKiku"):n==="team_closed"?o("teamClosed"):n==="team_joined"?o("teamJoined"):n==="reaching_team"?r?o("passedToTeam"):`${o("reachingTeam")}\u2026`:r?p!=null?o("thoughtForSeconds",{duration:`${p}s`}):o("thoughtProcess"):`${o("thinking")}${c?` \xB7 ${c}s`:"\u2026"}`,u=!!e;return ul("div",{className:se("hsk-cb-think",!r&&"hsk-cb-think--live",a==null&&jr(n)&&"hsk-cb-think--note"),children:[ul("button",{type:"button",className:se("hsk-cb-think-head",!u&&"hsk-cb-think-head--static"),onClick:u?()=>h(f=>!f):void 0,"aria-expanded":u?l:void 0,children:[ss("span",{children:d}),u&&ss("span",{className:se("hsk-cb-think-chevron",l&&"hsk-cb-think-chevron--open"),children:"\u25B6"})]}),u&&l&&ss("div",{className:"hsk-cb-think-body",children:e})]})}import{useCallback as bl,useEffect as iu,useRef as fl,useState as cu}from"react";function jn(e,r){let[t,n]=cu(!1),a=fl(null),o=fl(r);o.current=r,iu(()=>()=>{a.current&&clearTimeout(a.current)},[]);let i=bl(()=>{a.current||(n(!0),a.current=setTimeout(()=>{a.current=null,n(!1),o.current()},e))},[e]),c=bl(()=>{a.current&&(clearTimeout(a.current),a.current=null),n(!1),o.current()},[]);return{closing:t,requestClose:i,closeNow:c}}import Ju from"react";import Et from"react";import{useAkropolysContext as Ku}from"@akropolys/sdk";function is(e){let r=/<\s*[||]+\s*DSML\s*[||]+\s*([a-z_]+)\b[^>]*>/i,t=e,n="";for(;t;){let a=r.exec(t);if(!a){let s=/<\s*\/?\s*[||]+[\s\S]*$/i.exec(t);if(s){let l=s[0].replace(/\s/g,"").replace(/|/g,"|").replace(/\|+/g,"|").toLowerCase();if("<|dsml|".startsWith(l)||"</|dsml|".startsWith(l)||l.startsWith("<|dsml|")||l.startsWith("</|dsml|"))return n+t.slice(0,s.index)}return n+(t.endsWith("<")?t.slice(0,-1):t)}n+=t.slice(0,a.index);let o=new RegExp("<\\s*/\\s*[|\uFF5C]+\\s*DSML\\s*[|\uFF5C]+\\s*"+a[1]+"\\s*>","i"),i=t.slice(a.index+a[0].length),c=o.exec(i);if(!c)return n;t=i.slice(c.index+c[0].length)}return n}import Mn from"react";var lu=/\p{L}/u,hu=/\]\([^)]*\)|https?:\/\/\S+|www\.\S+/g;function pu(e){return e>=1424&&e<=2303||e>=64285&&e<=65023||e>=65136&&e<=65279}function qa(e,r=1){let t=0,n=0;for(let a of e.replace(hu," "))lu.test(a)&&(pu(a.codePointAt(0)??0)?t++:n++);if(!(t+n<r||t===n))return t>n?"rtl":"ltr"}import{Fragment as Lu,jsx as nt,jsxs as Ru}from"react/jsx-runtime";var du=/[ \t]{2,}/g,uu=/ ([.,!?:;])/g,mu=/\(([ \t]+)/g,bu=/([ \t]+)\)/g,fu=/(\d+)\s+(MP|mAh|W|GB|MB|KHz|Hz|KSh|KES|USD|EUR)\b/gi,ku=/(!\[[^\]]*\]\([^)]+\)|\[[^\]]+\]\([^)]+\)|\*\*[^*]+\*\*|`[^`]+`)/g,gu=/^!\[([^\]]*)\]\(([^)]+)\)$/,xu=/^\[([^\]]+)\]\(([^)]+)\)$/,vu=/^(data:image|blob):/i,xl=/^(https?|mailto|tel):/i;function Yn(e){let r=String(e??"").trim();return xl.test(r)||r.startsWith("/")&&!r.startsWith("//")?r:void 0}var cs=null;function vl(e){if(vu.test(e))return!0;if(typeof location>"u")return!1;try{let r=new URL(e,location.href);return/^https?:$/.test(r.protocol)&&(r.host===location.host||!!cs?.has(r.host))}catch{return!1}}var yu=/memory|mimi/i,wu=/mimi\.akropolys/i,Cu=e=>e&&e.replace(du," ").replace(uu,"$1").replace(mu,"(").replace(bu,")").replace(fu,"$1 $2"),br=(e,r)=>Cu(e).split(ku).map((a,o)=>{if(!a)return null;let i=`${r}-inline-${o}`;if(a.startsWith("`")&&a.endsWith("`"))return nt("code",{className:"hsk-markdown-code",children:a.slice(1,-1)},i);if(a.startsWith("**")&&a.endsWith("**"))return nt("strong",{children:br(a.slice(2,-2),i)},i);let c=a.match(gu);if(c){let l=c[1],h=c[2];return vl(h)?nt("img",{src:h,alt:l||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:p=>{p.target.style.display="none"}},i):null}let s=a.match(xu);if(s){let l=s[1],h=s[2];return yu.test(l)||wu.test(h)?null:xl.test(h)||h.startsWith("/")?nt("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:"hsk-markdown-link",children:br(l,i)},i):nt("span",{children:br(l,i)},i)}return a}),Su=/^\s*\|?[\s:|-]*-[\s:|-]*\|?\s*$/;function kl(e,r){let t=e.trim();return r?t.includes("|"):t.startsWith("|")}function gl(e){let r=e.trim();return r.startsWith("|")&&(r=r.slice(1)),r.endsWith("|")&&(r=r.slice(0,-1)),r.split("|").map(t=>t.trim())}function Mu({children:e}){let r=Mn.useRef(null),[t,n]=Mn.useState("none"),[a,o]=Mn.useState(!1),i=Mn.useRef({startX:0,scrollLeft:0,isDown:!1,hasMoved:!1}),c=Mn.useCallback(()=>{let p=r.current;if(!p)return;if(!(p.scrollWidth>p.clientWidth+2)){n("none");return}let u=getComputedStyle(p).direction==="rtl",f=Math.abs(p.scrollLeft),C=f<=4,b=f+p.clientWidth>=p.scrollWidth-4;n(C?u?"right":"left":b?u?"left":"right":"middle")},[]);Mn.useEffect(()=>{c();let p=r.current;if(!p)return;let d=typeof ResizeObserver<"u"?new ResizeObserver(c):null;return d?.observe(p),()=>d?.disconnect()},[c]);let s=p=>{let d=r.current;!d||d.scrollWidth<=d.clientWidth||p.target.closest("a, button, input")||(i.current={startX:p.pageX-d.offsetLeft,scrollLeft:d.scrollLeft,isDown:!0,hasMoved:!1},o(!0))},l=p=>{if(!i.current.isDown)return;let d=r.current;if(!d)return;let f=(p.pageX-d.offsetLeft-i.current.startX)*1.5;Math.abs(f)>3&&(i.current.hasMoved=!0,p.preventDefault(),d.scrollLeft=i.current.scrollLeft-f)},h=()=>{i.current.isDown=!1,o(!1)};return nt("div",{ref:r,className:`hsk-table-wrapper hsk-table-wrapper--${t}${a?" is-dragging":""}`,onScroll:c,onMouseDown:s,onMouseMove:l,onMouseUp:h,onMouseLeave:h,children:e})}function yl(e,r=!1,t){cs=t??null;try{return Tu(e,r)}finally{cs=null}}function Tu(e,r){let t=e.split(`
|
|
36
36
|
`);if(r&&t.length>0){!e.endsWith(`
|
|
37
|
-
`)&&t[t.length-1].trim().startsWith("|")&&t.pop();let l=t.length-1;for(;l>=0&&t[l].trim().startsWith("|");)l--;l++,l<t.length&&!t.slice(l).some(h=>Zd.test(h))&&(t.length=l)}let n=(l,h)=>Fa(l,r&&h===t.length-1?15:1),a=[],o=[],i=0,c=()=>{o.length>0&&(a.push(et("div",{className:"hsk-cb-ai-text",children:o},`text-bubble-${i++}`)),o=[])},s=0;for(;s<t.length;){let l=t[s],h=`md-line-${s}`;if(!l.trim()){s++;continue}let d=l.trim().match(/^!\[([^\]]*)\]\(([^)]+)\)$/);if(d){c();let u=d[1],f=d[2];Zc(f)&&a.push(et("div",{className:"hsk-markdown-img-block",children:et("img",{src:f,alt:u||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:C=>{C.target.style.display="none"}})},h)),s++;continue}let p=l.match(/^(#{1,3})\s+(.*)/);if(p){let u=p[1].length,f=`h${u+3}`;o.push(et(f,{className:`hsk-markdown-h${u}`,dir:n(p[2],s),children:cr(p[2],h)},h)),s++;continue}if(l.match(/^[\s]*[-*+•]\s+/)){let u=[],f="";for(;s<t.length&&t[s].match(/^[\s]*[-*+•]\s+/);){let C=t[s].replace(/^[\s]*[-*+•]\s+/,"");f+=C+" ",u.push(et("li",{children:cr(C,`li-${s}`)},`li-${s}`)),s++}o.push(et("ul",{className:"hsk-markdown-list hsk-markdown-ul",dir:n(f,s-1),children:u},`ul-${h}`));continue}if(l.match(/^[\s]*\d+[\.\)]\s+/)){let u=[],f="";for(;s<t.length&&t[s].match(/^[\s]*\d+[\.\)]\s+/);){let C=t[s].replace(/^[\s]*\d+[\.\)]\s+/,"");f+=C+" ",u.push(et("li",{children:cr(C,`li-${s}`)},`li-${s}`)),s++}o.push(et("ol",{className:"hsk-markdown-list hsk-markdown-ol",dir:n(f,s-1),children:u},`ol-${h}`));continue}if(Xc(l,!1)){c();let u=[],f=[],C=[],b=!0;for(;s<t.length&&Xc(t[s],!0);){let w=t[s].trim();if(w.match(/^\|?[-:| ]+\|?$/)&&w.includes("-")){C=Qc(w).map(T=>{let U=T.trim(),M=U.startsWith(":"),I=U.endsWith(":");return M&&I?"center":I?"end":"start"}),s++,b=!1;continue}let _=Qc(w);b&&u.length===0?u=_:f.push(_),s++}let L=Math.max(u.length,...f.map(w=>w.length)),x=[];for(let w=0;w<L;w++)if(C[w])x[w]=C[w];else if(w===0)x[w]="start";else{let _=f.filter(F=>{let T=(F[w]||"").trim();return/^[\$€£¥+-]?\d+([.,]\d+)?%?$/.test(T)||/^[\$€£¥+-]?\d+([.,]\d+)?\s*(bps|M|K|B)?$/i.test(T)}).length;x[w]=_>=Math.ceil(f.length/2)?"end":"start"}let z=u.length>0?et("tr",{children:u.map((w,_)=>et("th",{style:{textAlign:x[_]||"start"},children:et("bdi",{children:cr(w,`th-${h}-${_}`)})},`th-${h}-${_}`))},`tr-head-${h}`):null,S=f.map((w,_)=>et("tr",{children:w.map((F,T)=>et("td",{className:F.trim().startsWith("\u2713")?"hsk-md-ok":F.trim().startsWith("\u2717")?"hsk-md-bad":void 0,style:{textAlign:x[T]||"start"},children:et("bdi",{children:cr(F,`td-${h}-${_}-${T}`)})},`td-${h}-${_}-${T}`))},`tr-body-${h}-${_}`));a.push(et(eu,{children:ru("table",{className:"hsk-markdown-table",children:[z&&et("thead",{children:z}),et("tbody",{children:S})]})},`table-wrapper-${h}`));continue}o.push(et("p",{className:"hsk-markdown-p",dir:n(l,s),children:cr(l,h)},h)),s++}return c(),et(nu,{children:a})}import{useEffect as tl,useState as au}from"react";import{describeAge as rl,getLiveValue as ou,isFresh as su,isStale as iu,labelFor as cu,formatLiveValue as lu,subscribeLiveValues as hu,LIVE_FLASH_MS as pu}from"@akropolys/sdk";import{jsx as Kt,jsxs as Jo}from"react/jsx-runtime";function du(e){let[,r]=au(0),t=JSON.stringify(e);return tl(()=>hu(n=>{e.includes(n)&&r(a=>a+1)}),[t]),tl(()=>{let n=setInterval(()=>r(a=>a+1),1e3);return()=>clearInterval(n)},[]),e.map(ou)}var uu=["title","name","label","headline","subject"],mu=8,bu=40;function fu({record:e,now:r}){let t=iu(e,r),n=e.fields,a=uu.find(s=>n[s]),o=a?n[a]:e.key,i=o.length>38?o.slice(0,36)+"\u2026":o,c=Object.entries(n).filter(([s,l])=>s!==a&&l!==""&&l.length<=bu&&!/^[0-9a-fA-F-]{26,}$/.test(l)).slice(0,mu).map(([s,l])=>({label:cu(s),value:lu(l),rawKey:s}));return Jo("div",{className:`hsk-live-card${t?" is-stale":""}`,role:"region","aria-label":"Live values",children:[Kt("div",{className:"hsk-live-card__top",children:Jo("div",{className:"hsk-live-card__badge",children:[Kt("span",{className:`hsk-live-dot${t?" is-stale":""}`,"aria-hidden":"true"}),Kt("span",{className:"hsk-live-card__age",children:t?`Paused \xB7 ${rl(r-e.at)}`:`Live \xB7 ${rl(r-e.at)}`})]})}),Kt("div",{className:"hsk-live-card__body",children:Kt("span",{className:"hsk-live-card__title",title:o,children:i})}),Kt("div",{className:"hsk-live-card__pills",children:c.map(s=>{let l=su(e,s.rawKey,r);return Jo("div",{className:`hsk-live-pill${l?" is-changed":""}`,style:l?{animationDuration:`${pu}ms`}:void 0,children:[Kt("span",{className:"hsk-live-pill__label",children:s.label}),Kt("span",{className:"hsk-live-pill__value",children:s.value})]},s.rawKey)})})]})}function nl({keys:e}){let r=new Set,t=(e??[]).filter(c=>r.has(c)?!1:(r.add(c),!0)),n=du(t);if(t.filter((c,s)=>n[s]).length===0)return null;let o=n.filter(c=>!!c),i=Date.now();return Kt("div",{className:"hsk-live-wrap",role:"group","aria-label":"Live data",children:Kt("div",{className:"hsk-live-carousel",children:o.map(c=>Kt(fu,{record:c,now:i},c.key))})})}import{useState as ku}from"react";import{normalizeEntityImages as gu}from"@akropolys/sdk";import{jsx as _a,jsxs as al}from"react/jsx-runtime";function ol({source:e,onImageClick:r}){let t=gu(e.images??e.fields?.images,e.image,e.url),[n,a]=ku(!1),o=e.image||t[0]?.url;if(!o)return _a("div",{className:"hsk-cb-src-imgwrap-empty",children:_a(sr,{})});let i=c=>{if(c.stopPropagation(),!r)return;let s=Math.max(0,t.findIndex(l=>l.url===o));t.length>1?r(o,{images:t.map(l=>({url:l.url,caption:l.caption,alt:l.alt})),index:s,title:e.name}):r(o)};return al("button",{type:"button",className:"hsk-cb-src-imgwrap hsk-gallery-cover","aria-label":t.length>1?`View ${t.length} images of ${e.name}`:`View image of ${e.name}`,onClick:i,children:[n?_a(sr,{}):_a("img",{src:o,alt:t.find(c=>c.url===o)?.alt||e.name,loading:"lazy",onError:()=>a(!0)}),t.length>1&&al("span",{className:"hsk-gallery-count",children:[Math.max(0,t.findIndex(c=>c.url===o))+1," / ",t.length]})]})}import{useState as Zo,useRef as xu,useEffect as vu,useCallback as yu}from"react";import{normalizeEntityImages as sl,useCardFields as wu}from"@akropolys/sdk";import{Fragment as es,jsx as xt,jsxs as $r}from"react/jsx-runtime";function Da({sources:e,onSelectSource:r,onImageClick:t,referencedIds:n=[],compact:a=!1,targetLabel:o="Your colour"}){let i=wu(),c=xu(null),[s,l]=Zo(!1),[h,d]=Zo(!1),[p,u]=Zo(0),f=e.filter(T=>T.id&&n.includes(T.id)),C=f.filter(T=>T.swatch),b=f.filter(T=>!T.swatch),L=b.length===1,x=L?b.flatMap(T=>{let U=sl(T.images??T.fields?.images,T.image,T.url);return U.length?U.map((M,I)=>({source:T,image:M,photoIndex:I,totalPhotos:U.length})):[{source:T,image:void 0,photoIndex:0,totalPhotos:0}]}):b.map(T=>{let U=sl(T.images??T.fields?.images,T.image,T.url);return{source:T,image:U[0],photoIndex:0,totalPhotos:U.length}}),z=yu(()=>{let T=c.current;if(!T||x.length===0)return;let U=Math.abs(T.scrollLeft),M=T.scrollWidth-T.clientWidth;l(U>10),d(M>4&&U<M-12);let $=Math.round(U/190);u(Math.min(Math.max(0,$),x.length-1))},[x.length]);vu(()=>{z();let T=c.current;if(!T)return;let U=new ResizeObserver(z);return U.observe(T),T.addEventListener("scroll",z,{passive:!0}),()=>{U.disconnect(),T.removeEventListener("scroll",z)}},[z,e]);let S=T=>{let U=c.current;if(!U)return;let M=getComputedStyle(U).direction==="rtl";U.scrollBy({left:190*T*(M?-1:1),behavior:"smooth"})},w=()=>S(1),_=()=>S(-1);if(x.length===0&&C.length===0)return null;let F=C.length>0&&xt("div",{className:"hsk-cb-swatch-grid",children:C.map((T,U)=>$r("button",{type:"button",className:ne("hsk-cb-swatch",T.target&&"hsk-cb-swatch--target"),style:{animationDelay:`${U*40}ms`},onClick:T.target?void 0:()=>r?.(T),children:[xt("span",{className:"hsk-cb-swatch-chip",style:{background:T.swatch}}),xt("span",{className:"hsk-cb-swatch-name",children:T.target?o:T.name}),xt("span",{className:"hsk-cb-swatch-code",children:T.swatch})]},T.id??T.url??U))});return x.length===0?F||null:$r(es,{children:[F,$r("div",{className:ne("hsk-cb-sources-wrap",a&&"hsk-cb-sources-wrap--compact"),children:[s&&$r(es,{children:[xt("div",{className:"hsk-cb-sources-fade-left"}),xt("button",{className:"hsk-cb-sources-prev",onClick:_,"aria-label":"Previous",children:xt(Zr,{})})]}),xt("div",{className:"hsk-cb-sources",ref:c,children:x.map(({source:T,image:U,photoIndex:M,totalPhotos:I},$)=>{let P=!!(T.id&&n.includes(T.id));return $r("div",{className:ne("hsk-cb-source",P&&"hsk-cb-source--referenced"),style:{animationDelay:`${$*50}ms`},onClick:()=>r?.(T),children:[xt(ol,{source:L&&U?{...T,image:U.url,images:[U]}:T,onImageClick:t}),$r("div",{className:"hsk-cb-src-info",children:[xt("div",{className:"hsk-cb-src-name",children:T.name}),L&&U?.caption?xt("div",{className:"hsk-cb-src-detail",children:U.caption}):L&&I>1?xt("div",{className:"hsk-cb-src-detail",children:`Photo ${M+1} of ${I}`}):null,Ot(T,i).slice(0,2).map(Q=>xt("div",{className:"hsk-cb-src-detail",children:Q.value},Q.label))]})]},`${T.id??T.url??$}:${U?.url??M}`)})}),h&&$r(es,{children:[xt("div",{className:"hsk-cb-sources-fade-right"}),xt("button",{className:"hsk-cb-sources-next",onClick:w,"aria-label":"See more",children:xt(en,{})})]}),x.length>1&&xt("div",{className:"hsk-cb-carousel-dots",children:x.map((T,U)=>xt("div",{className:ne("hsk-cb-dot-item",U===p&&"hsk-cb-dot-item--active"),onClick:()=>{let M=c.current;if(M){let I=getComputedStyle(M).direction==="rtl";M.scrollTo({left:U*190*(I?-1:1),behavior:"smooth"})}}},U))})]})]})}import{jsx as il,jsxs as Cu}from"react/jsx-runtime";function cl({intent:e,sources:r,onSend:t,loading:n}){let a=kr();if(!e)return null;let o=[],i=r[0]?.name??"",c=r.slice(0,2).map(s=>s.name);if(e==="search"&&r.length>0){if(c.length>=2&&o.push({emoji:"\u2696\uFE0F",label:a("pillCompareTop2"),query:a("pillCompareTop2Query",{a:c[0],b:c[1]})}),i){let s=i.split(" ").slice(0,3).join(" ");o.push({emoji:"\u{1F4A1}",label:a("pillMoreOn",{name:s}),query:a("pillMoreOnQuery",{name:i})})}}else e==="compare"&&r.length>0?(i&&o.push({emoji:"\u{1F50D}",label:a("pillSimilarOptions"),query:a("pillSimilarOptionsQuery",{name:i})}),o.push({emoji:"\u{1F4A1}",label:a("pillWhichBest"),query:a("pillWhichBestQuery")})):e==="specs"&&r.length>0?i&&o.push({emoji:"\u{1F504}",label:a("pillFindAlternatives"),query:a("pillFindAlternativesQuery",{name:i})}):e==="general"&&(o.push({emoji:"\u{1F50D}",label:a("pillShowPopular"),query:a("pillShowPopularQuery")}),o.push({emoji:"\u{1F4A1}",label:a("pillRecommend"),query:a("pillRecommendQuery")}));return o.length===0?null:il("div",{className:"hsk-action-pills",children:o.map(s=>Cu("button",{className:"hsk-action-pill",onClick:()=>t(s.query),disabled:n,children:[il("span",{className:"hsk-pill-emoji",children:s.emoji}),s.label]},s.query))})}import{Fragment as ts,jsx as Se,jsxs as Ue}from"react/jsx-runtime";var ll=Mt.memo(({content:e,streaming:r,hosts:t})=>Se(ts,{children:el(e,r,new Set(t.split(",")))}),(e,r)=>e.content===r.content&&e.streaming===r.streaming&&e.hosts===r.hosts);ll.displayName="MarkdownBlock";function Mu(e){let r=new Set;for(let t of e)if(t)try{r.add(new URL(t,location.href).host)}catch{}return[...r].sort().join(",")}function Tu(e,r){Mt.useLayoutEffect(()=>{let t=e.current;if(!t)return;let n=()=>{t.style.width="";let i=document.createRange();i.selectNodeContents(t);let c=Array.from(i.getClientRects()),s=t.getBoundingClientRect();if(!c.length||!t.offsetWidth||!s.width)return;let l=s.width/t.offsetWidth,h=getComputedStyle(t),d=parseFloat(h.paddingLeft)+parseFloat(h.paddingRight)+parseFloat(h.borderLeftWidth)+parseFloat(h.borderRightWidth),p=Math.max(...c.map(f=>f.right))-Math.min(...c.map(f=>f.left)),u=Math.ceil(p/l)+1;u+d<t.offsetWidth&&(t.style.width=`${h.boxSizing==="border-box"?u+d:u}px`)};n(),document.fonts?.ready.then(n).catch(()=>{});let a=t.closest(".hsk-cb-msg-group");if(!a||typeof ResizeObserver>"u")return;let o=new ResizeObserver(n);return o.observe(a),()=>o.disconnect()},[e,r])}function hl({msg:e,idx:r,isLast:t,isLastUser:n,isRunEnd:a,runMid:o,runCont:i,isNarrow:c,loading:s,streaming:l,stopped:h,interrupted:d,sources:p,referencedIds:u,discussedSources:f,lastIntent:C,lastAction:b,vizState:L,setVizState:x,setLightboxSrc:z,setMarkupSrc:S,handleSend:w,handleSourceClick:_,onRetry:F,onEdit:T,onLongPress:U,hasError:M,retrying:I,t:$,messageRef:P,photosSending:Q,workingOn:de,doodleTheme:J}){let W=Su()?.api,he=W?.siteId??"",Y=Mu([W?.apiUrl,...(t?p:e.sources??[]).flatMap(O=>[O.image,O.url])]),D=e.role==="user",H=D?e.content:Xo(e.content),N=!D&&H!==e.content,[R,A]=Mt.useState(!1),K=Mt.useRef(null);Tu(K,e.content);let v=Mt.useRef(null),E=Mt.useRef(null),k=Mt.useRef(!1),ie=Mt.useCallback(O=>{let Z=D?".hsk-cb-user-bubble":".hsk-cb-ai-body";return O.matches?.(Z)?O:O.querySelector(Z)||O},[D]),X=Mt.useCallback(O=>{E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{if(U){if(typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}let Z=ie(O),ye=Z.getBoundingClientRect();U(D?e:{...e,content:H},{top:ye.top,left:ye.left,width:ye.width,height:ye.height},D,Z),k.current=!0}E.current=null},420)},[e,H,D,U,ie]),V=Mt.useCallback(O=>{if(O.touches.length!==1)return;let Z=O.touches[0];v.current={x:Z.clientX,y:Z.clientY},k.current=!1,X(O.currentTarget)},[X]),se=Mt.useCallback(O=>{if(!v.current||!E.current)return;let Z=O.touches[0];Math.hypot(Z.clientX-v.current.x,Z.clientY-v.current.y)>8&&(clearTimeout(E.current),E.current=null)},[]),m=Mt.useCallback(O=>{E.current&&(clearTimeout(E.current),E.current=null),v.current=null,k.current&&O.cancelable&&O.preventDefault()},[]),g=Mt.useCallback(O=>{if(!U||(O.preventDefault(),k.current))return;let Z=ie(O.currentTarget),ye=Z.getBoundingClientRect();U(D?e:{...e,content:H},{top:ye.top,left:ye.left,width:ye.width,height:ye.height},D,Z)},[e,H,D,U,ie]);Mt.useEffect(()=>()=>{E.current&&clearTimeout(E.current)},[]);let B=Mt.useCallback(O=>{if(O)try{navigator.clipboard.writeText(O),A(!0),setTimeout(()=>A(!1),2e3)}catch{}},[]),G=Mt.useMemo(()=>Pa(H),[H]),ae=Xo(e.thinking||G.thinking),oe=/(?:^|\n+)(?:[>*_~`\s]*)(?:This is a calculation from live figures,?\s*not a guarantee\s*[—–-]\s*the market can move against it\.?)(?:[>*_~`\s]*)/gi,xe=oe.test(G.content),pe=xe?G.content.replace(oe,"").trimEnd():G.content;return Se("div",{className:ne("hsk-cb-msg-group",o&&"hsk-cb-msg-group--run-mid",i&&"hsk-cb-msg-group--run-cont"),"data-hsk-role":D?"user":"assistant",ref:P,children:D?Ue("div",{className:`hsk-cb-user-msg${n?" hsk-sent":""}`,children:[e.images&&e.images.length>0&&Se("div",{className:"hsk-cb-user-imgs","data-count":Math.min(e.images.length,4),children:e.images.slice(0,4).map((O,Z)=>Ue("button",{type:"button",className:"hsk-cb-user-img-cell",onClick:()=>z(O),children:[Se("img",{src:O,alt:`attachment ${Z+1}`,className:"hsk-cb-user-img-thumb"}),Se(nn,{active:Q,seed:he,theme:J}),Z===3&&e.images.length>4&&Ue("span",{className:"hsk-cb-user-img-more",children:["+",e.images.length-3]})]},Z))}),e.content&&Ue("div",{ref:K,className:ne("hsk-cb-user-bubble",a&&"hsk-cb-user-bubble--tail",e.spoken&&"hsk-cb-user-bubble--spoken",M&&"hsk-cb-user-bubble--error"),onTouchStart:V,onTouchMove:se,onTouchEnd:m,onTouchCancel:m,onContextMenu:g,dir:Fa(e.content.replace(/^@kiku\s*/i,"")),children:[e.spoken&&Se(zn,{className:"hsk-cb-spoken-mark",size:10}),/^@kiku\b/i.test(e.content)?Ue(ts,{children:[Se("span",{className:"hsk-kiku-badge",children:"@kiku"}),e.content.replace(/^@kiku\s*/i,"")]}):e.content]}),a&&Ue("div",{className:"hsk-cb-user-footer",children:[Ue("div",{className:"hsk-cb-msg-actions",children:[F&&(M||n)&&Ue("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>F(e),"aria-label":$("retry"),children:[Se(Ln,{className:I?"hsk-retry-icon--spinning":"",size:11}),Se("span",{className:"hsk-cb-msg-action-label",children:$("retry")})]}),T&&Ue("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--edit",onClick:()=>T(e),"aria-label":$("edit"),children:[Se(ma,{size:11}),Se("span",{className:"hsk-cb-msg-action-label",children:$("edit")})]}),Ue("button",{type:"button",className:ne("hsk-cb-msg-action hsk-cb-msg-action--copy",R&&"hsk-cb-msg-action--copied"),onClick:()=>B(e.content),"aria-label":$(R?"copied":"copy"),children:[R?Se(Lr,{size:11}):Se(Er,{size:11}),Se("span",{className:"hsk-cb-msg-action-label",children:$(R?"copied":"copy")})]})]}),n&&!M&&Se("span",{className:"hsk-cb-sent-status",children:$(h||d?"statusStopped":"statusSent")}),M&&Ue("span",{className:"hsk-cb-failed-notice",children:[Se("span",{className:"hsk-cb-failed-dot"}),$("msgFailed")]})]})]}):Se("div",{className:ne("hsk-cb-ai-msg",c&&"hsk-cb-ai-msg--inline"),children:Ue("div",{className:"hsk-cb-ai-body",onTouchStart:V,onTouchMove:se,onTouchEnd:m,onTouchCancel:m,onContextMenu:g,children:[(()=>{let O=e.thoughtForSeconds!=null||pe.length>0||!(t&&(l||s));return Ue(ts,{children:[!e.spoken&&(ae||e.thoughtForSeconds!=null||e.repliedSeconds!=null||Un(e.statusStage)||t&&(l||s))&&Se(Gc,{text:ae,isComplete:O,seconds:e.thoughtForSeconds,stage:e.statusStage,repliedSeconds:e.repliedSeconds}),e.spoken&&typeof e.thoughtForSeconds=="number"&&e.thoughtForSeconds>0&&Se("div",{className:"hsk-cb-think",children:Ue("span",{className:"hsk-cb-think-head hsk-cb-think-head--static",children:[Se(zn,{size:11}),Ue("span",{children:["spoken \xB7 ",e.thoughtForSeconds.toFixed(1),"s"]})]})}),!pe&&N&&!(t&&(l||s))&&Se("p",{className:"hsk-cb-ai-content",children:$("errStreamInterrupted")}),pe&&Se("div",{className:"hsk-cb-ai-content",children:Se(ll,{content:pe,streaming:t&&l,hosts:Y})}),xe&&Se("div",{className:"hsk-cb-calc-disclaimer",children:$("calcDisclaimer")})]})})(),e.visualizing&&Se("div",{className:"hsk-cb-viz",children:Ue("div",{className:ne("hsk-cb-viz--working",!de&&"is-blank",e.visualizationType==="video"&&"is-video"),role:"status","aria-label":e.visualizingText||$("vizWorking"),children:[de&&Se("img",{src:de,alt:""}),Se(nn,{active:!0,seed:he,theme:J})]})}),e.visualization&&Ue("div",{className:"hsk-cb-viz",children:[Ue("div",{className:"hsk-cb-viz-imgwrap",children:[e.visualizationType==="video"||e.visualization.includes("/videos/")?Se("video",{src:e.visualization,controls:!0,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"hsk-markdown-video",style:{display:"block",maxHeight:"400px",objectFit:"contain",width:"100%"}}):Se("img",{src:e.visualization,alt:"Product visualized in your photo",className:"hsk-markdown-img",style:L[e.visualization]==="err"?{display:"none"}:void 0,onLoad:()=>x(O=>({...O,[e.visualization]:"ok"})),onError:()=>x(O=>({...O,[e.visualization]:"err"}))}),L[e.visualization]==="err"&&Se("div",{className:"hsk-cb-viz-broken",children:$("vizUnavailable")}),t&&!l&&L[e.visualization]==="ok"&&e.visualizationType!=="video"&&!e.visualization.includes("/videos/")&&Ue("button",{className:"hsk-cb-viz-mark",onClick:()=>S(e.visualization),children:[Ue("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[Se("path",{d:"M12 20h9"}),Se("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z"})]}),$("vizMarkEdit")]})]}),Se("div",{className:"hsk-cb-viz-disclaimer",children:e.visualizationType==="video"||e.visualization.includes("/videos/")?$("vizDisclaimerVideo"):$("vizDisclaimerImage")})]}),!D&&(e.knowledgeImages?.length??0)>0&&Se("div",{className:"hsk-cb-kimgs",children:e.knowledgeImages.map(O=>Ue("div",{className:"hsk-cb-kimg-group",children:[Se("div",{className:"hsk-cb-kimg-grid",children:O.images.map((Z,ye)=>Se("img",{src:Z.url,alt:Z.note||O.title||"Reference image",className:"hsk-cb-kimg",loading:"lazy",onClick:()=>z(Z.url),onError:ze=>{ze.target.style.display="none"}},ye))}),(O.title||O.images[0]?.note)&&Se("div",{className:"hsk-cb-kimg-caption",children:O.title||O.images[0]?.note})]},O.entryId))}),!D&&Se(nl,{keys:e.liveKeys}),!D&&(e.staleNotices?.length??0)>0&&Ue("div",{className:"hsk-cb-stale",role:"status",children:[Se("div",{className:"hsk-cb-stale-title",children:$("staleTitle")}),e.staleNotices.map((O,Z)=>Ue("div",{className:"hsk-cb-stale-item",children:[O.state==="removed"?$("staleRemoved",{title:O.title}):$("staleUnavailable",{title:O.title}),O.reason&&Ue("span",{className:"hsk-cb-stale-reason",children:[" ",O.reason]})]},Z))]}),(()=>{let O=t&&(s||l),Z=O?u:e.referencedIds??[],ye=O?p:e.sources??[],ze=t?C:e.intent,ke=ze==="compare"||ze==="capture"||ze==="capture_all"||ze==="delete"||ze==="view_history";return Z.length>0&&!ke&&(!t||b?.type!=="request_kiku_key")&&Se(Da,{sources:ye,onSelectSource:_,onImageClick:z,referencedIds:Z,compact:!!e.visualization,targetLabel:$("swatchTarget")})})(),t&&!s&&!l&&b?.type==="open_memory"&&On(b.url)&&Ue("a",{className:"hsk-cb-memory-pill",href:On(b.url),target:"_blank",rel:"noopener noreferrer",children:[$("openMemory"),Se(mi,{})]}),t&&!s&&On(b?.url)&&b?.type!=="open_memory"&&Se("div",{className:"hsk-action-pills",children:Ue("a",{className:"hsk-action-pill",href:On(b?.url),children:[String(b?.type||"continue").replace(/_/g," ")," \u2192"]})}),t&&!s&&Se(cl,{intent:C,sources:f,onSend:w,loading:s}),!D&&a&&!l&&pe&&Se("div",{className:"hsk-cb-ai-footer",children:Ue("div",{className:"hsk-cb-msg-actions",children:[Ue("button",{type:"button",className:ne("hsk-cb-msg-action hsk-cb-msg-action--copy",R&&"hsk-cb-msg-action--copied"),onClick:()=>B(pe),"aria-label":$(R?"copied":"copy"),children:[R?Se(Lr,{size:11}):Se(Er,{size:11}),Se("span",{className:"hsk-cb-msg-action-label",children:$(R?"copied":"copy")})]}),t&&(M||pe.includes("We're experiencing high demand right now"))&&F&&Ue("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>F(e),"aria-label":$("retry"),children:[Se(Ln,{className:I?"hsk-retry-icon--spinning":"",size:11}),Se("span",{className:"hsk-cb-msg-action-label",children:$("retry")})]})]})})]})})})}import{jsx as Ct,jsxs as lr}from"react/jsx-runtime";function pl({keyInput:e,setKeyInput:r,minting:t,handleUseExistingKey:n,handleCreateKey:a,t:o}){return lr("div",{className:"hsk-cb-ai-msg",children:[Ct("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:Ct(sr,{})}),Ct("div",{className:"hsk-cb-ai-body",children:Ct("div",{className:"hsk-cb-ai-text",children:lr("div",{className:"hsk-cb-phone-form",children:[Ct("label",{className:"hsk-cb-phone-label",children:o("keyPastePrompt")}),Ct("input",{type:"text",className:"hsk-cb-phone-input",placeholder:o("keyPastePlaceholder"),value:e,onChange:i=>r(i.target.value),onKeyDown:i=>i.key==="Enter"&&n(),autoFocus:!0}),lr("div",{style:{display:"flex",gap:8},children:[Ct("button",{className:"hsk-cb-phone-submit",onClick:n,disabled:!e.trim(),children:o("keyUseMine")}),Ct("button",{className:"hsk-cb-phone-submit",onClick:a,disabled:t,children:o(t?"keyCreating":"keyCreateNew")})]})]})})})]})}function dl({mintedKey:e,copied:r,keyCountdown:t,onDismiss:n,copyValue:a,t:o}){return lr("div",{className:"hsk-cb-ai-msg",children:[Ct("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:Ct(sr,{})}),Ct("div",{className:"hsk-cb-ai-body",children:lr("div",{className:"hsk-cb-secret-card",children:[lr("div",{className:"hsk-cb-secret-head",children:[Ct("span",{className:"hsk-cb-secret-title",children:o("keySecretTitle")}),lr("span",{className:"hsk-cb-secret-timer",children:[t,"s"]}),Ct("button",{type:"button",className:"hsk-cb-secret-dismiss",onClick:n,"aria-label":o("keyDismiss"),children:"\xD7"})]}),lr("button",{type:"button",className:"hsk-cb-secret-key",onClick:()=>a(e,"secret"),children:[Ct("code",{children:e}),lr("span",{className:"hsk-cb-secret-copy",children:[r==="secret"?Ct(Lr,{}):Ct(Er,{}),o(r==="secret"?"keyCopied":"keyCopySecret")]})]}),Ct("span",{className:"hsk-cb-secret-hint",children:o("keySecretHint")})]})})]})}import{Fragment as Eu,jsx as Pt,jsxs as xn}from"react/jsx-runtime";function Ru(e,r){for(let t=r-1;t>=0;t--){let n=e[t];if(n.visualization&&n.visualizationType!=="video")return n.visualization;if(n.images?.length)return n.images[n.images.length-1]}}function ul({displayMessages:e,messageRefs:r,isNarrow:t,loading:n,streaming:a,sources:o,referencedIds:i,discussedSources:c,lastIntent:s,lastAction:l,stopped:h,interrupted:d,halted:p,haltedEmpty:u,error:f,errorCode:C,keyPhase:b,keyInput:L,setKeyInput:x,mintedKey:z,setMintedKey:S,setMintedPub:w,minting:_,copied:F,keyCountdown:T,handleUseExistingKey:U,handleCreateKey:M,copyValue:I,queuedMessage:$,sendQueuedNow:P,setLightboxSrc:Q,setMarkupSrc:de,handleSend:J,handleSourceClick:W,onRetry:he,onEdit:Y,onLongPress:D,retrying:H,continueGenerating:N,t:R,spacerRef:A,vizState:K,setVizState:v,messages:E,doodleTheme:k}){return xn(Eu,{children:[(()=>{let ie=-1;for(let X=e.length-1;X>=0;X--)if(e[X]?.role==="user"){ie=X;break}return e.map((X,V)=>{let se=V===e.length-1,m=X.role==="user",g=m&&V===ie,B=e[V+1]?.role!==X.role,G=!B,ae=e[V-1]?.role===X.role,oe=X.id||`${X.role}-${V}`,xe=e[V+1]?.content??"",pe=g&&(n||a)&&!Pa(xe).content.trim(),O=X.visualizing?Ru(e,V):void 0,Z=g&&!!f||!m&&se&&!!f||!m&&!!X.content?.includes("We're experiencing high demand right now");return Pt(hl,{msg:X,idx:V,isLast:se,isLastUser:g,isRunEnd:B,runMid:G,runCont:ae,isNarrow:t,loading:n,streaming:a,stopped:h,interrupted:d,sources:o,referencedIds:i,discussedSources:c,lastIntent:s,lastAction:l,vizState:K,setVizState:v,setLightboxSrc:Q,setMarkupSrc:de,handleSend:J,handleSourceClick:W,onRetry:he,onEdit:Y,onLongPress:D,hasError:Z,retrying:H,t:R,messageRef:ye=>{r.current[V]=ye},photosSending:pe,workingOn:O,doodleTheme:k},oe)})})(),p&&E.length>0&&xn("div",{className:ne("hsk-cb-stopped",u&&"hsk-cb-stopped--empty"),children:[u&&xn("span",{className:"hsk-cb-stopped-dots","aria-hidden":"true",children:[Pt("i",{}),Pt("i",{}),Pt("i",{})]}),Pt("span",{className:"hsk-cb-stopped-label",children:R(h?"stoppedByYou":"stoppedInterrupted")}),xn("button",{className:"hsk-cb-continue",onClick:N,children:[Pt(bi,{}),R(E[E.length-1]?.role==="assistant"?"continueGenerating":"generateResponse")]})]}),f&&Pt("div",{className:"hsk-cb-error",children:li({code:C??void 0,message:f},R)}),b==="prompt_key"&&Pt(pl,{keyInput:L,setKeyInput:x,minting:_,handleUseExistingKey:U,handleCreateKey:M,t:R}),z&&Pt(dl,{mintedKey:z,copied:F,keyCountdown:T,onDismiss:()=>{S(null),w(null)},copyValue:I,t:R}),$&&Pt("div",{className:ne("hsk-cb-msg-group",e[e.length-1]?.role==="user"&&"hsk-cb-msg-group--run-cont"),children:xn("div",{className:"hsk-cb-user-msg",children:[Pt("div",{className:"hsk-cb-user-bubble hsk-cb-user-bubble--tail hsk-cb-user-bubble--queued",children:$.content}),xn("button",{type:"button",className:"hsk-cb-queued-status",onClick:P,children:[Pt("span",{className:"hsk-cb-queued-dot"}),R("queuedWaiting"),Pt("span",{className:"hsk-cb-queued-now",children:R("queuedSendNow")})]})]})}),Pt("div",{ref:A,className:"hsk-cb-msgs-spacer"})]})}import Vn,{useState as fl,useRef as ns,useEffect as as}from"react";import{useAkropolysContext as Nu,useCardFields as Iu}from"@akropolys/sdk";import{jsx as ml}from"react/jsx-runtime";var Ba=16,Lu=110,zu=/[-ۿ܀-ݏ߀-߿ࡠ-ࣿﭐ-﷿ﹰ-]/;function rs(e){if(!e)return[];if(zu.test(e))return e.split(/(\s+)/).filter(Boolean);let r=typeof Intl<"u"?Intl:void 0;if(r?.Segmenter){let t=new r.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e),n=>n.segment)}return e.split(/(\s+)/).filter(Boolean)}function bl({text:e,placeholder:r,visible:t=!0,replay:n=0,replaySeed:a,staggerMs:o=Ba}){if(!t)return null;let i=e||r||"";if(!i)return null;let c=a!==void 0?a:n,s=i.length>26,l=s?i.match(/\S+\s*/g)??[i]:rs(i),h=Math.max(l.length-1,1),d=i.length>44?"3":s?"2":"1";return ml("div",{className:"hsk-animated-placeholder","data-fit":d,dir:"auto","aria-hidden":"true",children:l.map((p,u)=>ml("span",{className:"hsk-animated-placeholder__char",style:{animationDelay:`${Lu+u*o}ms`,"--hsk-ph-hue":`${Math.round(u/h*300)}`},children:p},`${i}|${c}|${u}`))})}import{Fragment as os,jsx as ge,jsxs as rt}from"react/jsx-runtime";function kl({gooId:e,input:r,setInput:t,showKikuPicker:n,setShowKikuPicker:a,showAtPicker:o,setShowAtPicker:i,captureAllowed:c,discussedSources:s,handleSelectExtension:l,handleKikuCapture:h,handleKikuCaptureAll:d,handleKikuViewHistory:p,handleKikuDelete:u,attachments:f,removeAttachment:C,chromeLoading:b,inputLocked:L,langSwitching:x=!1,imageInputRef:z,handleImageFiles:S,enableVision:w,enableVoice:_,canConverse:F,startVoice:T,voiceBlocked:U,textareaRef:M,classNames:I={},handleInput:$,handleKeyDown:P,voice:Q,voicePhase:de,activePlaceholder:J,loading:W,streaming:he,stop:Y,handleSend:D,voiceError:H,setVoiceError:N,t:R,rail:A,notice:K,onOpenMimi:v}){let E=Nu(),k=Iu(),[ie,X]=Vn.useState(0),[V,se]=Vn.useState(!1);Vn.useEffect(()=>{if(!H)return;let ke=setTimeout(()=>{N?.("")},6e3);return()=>clearTimeout(ke)},[H,N]);let m=Vn.useRef(null);Vn.useEffect(()=>{if(!V)return;let ke=Ne=>{Ne.key==="Escape"&&se(!1)},we=Ne=>{let Ce=Ne.composedPath?Ne.composedPath():[],Pe=Ne.target?.closest?.(".hsk-cb-tools-toggle")||Ce.some(He=>He?.classList?.contains?.("hsk-cb-tools-toggle")),We=m.current&&(Ce.includes(m.current)||m.current.contains(Ne.target));Pe||We||se(!1)};return window.addEventListener("keydown",ke),document.addEventListener("mousedown",we),document.addEventListener("touchstart",we,{passive:!0}),()=>{window.removeEventListener("keydown",ke),document.removeEventListener("mousedown",we),document.removeEventListener("touchstart",we)}},[V]);let g=J||"Ask me anything\u2026",B=ns(null),[G,ae]=fl(()=>g.length>26);as(()=>{let ke=B.current;if(!ke||r)return;let we=()=>{let Ce=ke.querySelectorAll(".hsk-animated-placeholder__char");if(Ce.length<2)return ae(!1);let be=Ce[0].offsetTop,Pe=Ce[Ce.length-1].offsetTop;ae(Pe-be>Ce[0].offsetHeight/2)};we();let Ne=new ResizeObserver(we);return Ne.observe(ke),()=>Ne.disconnect()},[g,r]);let oe=Math.max(rs(g).length-1,0)*Ba,[xe,pe]=fl(!1),O=ns(null),Z=()=>{O.current&&clearTimeout(O.current),pe(!0),O.current=setTimeout(()=>{pe(!1),O.current=null},550)};as(()=>()=>{O.current&&clearTimeout(O.current)},[]);let ye=ns(null),ze=!!K;return as(()=>{ye.current?.toggleAttribute("inert",ze)},[ze]),rt("div",{className:"hsk-cb-input-wrap","data-tools-open":V?"true":void 0,children:[V&&rt(os,{children:[ge("div",{className:"hsk-cb-toolsheet-scrim",onClick:()=>se(!1),"aria-hidden":"true"}),ge("div",{className:"hsk-cb-toolsheet-wrap",ref:m,children:rt("div",{className:"hsk-cb-toolsheet",role:"menu",children:[w&&rt("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{se(!1),z.current?.click()},disabled:W,children:[ge(go,{}),ge("span",{children:R("attachImage")})]}),_&&F&&rt("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{se(!1),U?N?.(R("errAccountRequired")):T("converse")},disabled:W||b,children:[ge(xo,{}),ge("span",{children:R("voiceModeStart")})]}),v&&rt("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{se(!1),v()},children:[ge(gi,{}),ge("span",{children:"MiMi"})]})]})})]}),K,rt("div",{className:"hsk-cb-input-card",ref:ye,children:[(/^@kiku\b/i.test(r)||n||o)&&rt("div",{className:"hsk-cb-docked-header",children:[ge("span",{className:"hsk-cb-docked-sub",children:R("captureAndRemember")}),ge("button",{type:"button",className:"hsk-cb-docked-close",onClick:()=>{t(ke=>ke.replace(/^@kiku\s*/i,"")),a(!1),i(!1)},"aria-label":"Close mode",children:"\xD7"})]}),(n||o)&&rt("div",{className:"hsk-cb-docked-options",onMouseDown:ke=>ke.preventDefault(),children:[o&&c&&rt("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>l("@kiku"),children:[ge("span",{className:"hsk-cb-docked-option-icon",children:ge(sr,{})}),ge("span",{className:"hsk-cb-docked-option-title",children:"kiku"}),ge("span",{className:"hsk-cb-docked-option-desc",children:"capture & remember"})]}),n&&c&&rt(os,{children:[s.map((ke,we)=>rt("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h(ke),a(!1)},children:[ge("span",{className:"hsk-cb-docked-option-icon",children:ke.image?ge("img",{src:ke.image,alt:""}):ge(da,{})}),ge("span",{className:"hsk-cb-docked-option-title",children:ke.name}),Ot(ke,k)[0]&&ge("span",{className:"hsk-cb-docked-option-detail",children:Ot(ke,k)[0].value})]},ke.id??we)),s.length>1&&rt("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{d(s),a(!1)},children:[ge("span",{className:"hsk-cb-docked-option-icon",children:ge(da,{})}),ge("span",{className:"hsk-cb-docked-option-title",children:R("captureAll",{count:String(s.length)})})]}),s.length===0&&rt("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h({name:"current page",id:void 0}),a(!1)},children:[ge("span",{className:"hsk-cb-docked-option-icon",children:ge(da,{})}),ge("span",{className:"hsk-cb-docked-option-title",children:R("captureCurrentPage")})]}),rt("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{p(),a(!1)},children:[ge("span",{className:"hsk-cb-docked-option-icon",children:ge(fi,{})}),ge("span",{className:"hsk-cb-docked-option-title",children:R("whatHaveYouSaved")})]}),rt("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{u(),a(!1)},children:[ge("span",{className:"hsk-cb-docked-option-icon",children:ge(ua,{})}),ge("span",{className:"hsk-cb-docked-option-title",children:R("deleteThis")})]})]})]}),f.length>0&&ge("div",{className:"hsk-cb-img-strip",children:f.map((ke,we)=>rt("div",{className:"hsk-cb-img-thumb-wrap",children:[ge("img",{src:ke.thumb||ke.data,alt:`attachment ${we+1}`,className:"hsk-cb-img-thumb"}),ge("button",{type:"button",className:"hsk-cb-img-thumb-remove",onClick:()=>C(we),"aria-label":"Remove image",children:ge(Ei,{size:10})})]},we))}),rt("div",{className:ne("hsk-cb-input-box",b&&"hsk-cb-input-box--waiting"),"data-cascade":ie%2?"b":"a","data-tools":V?"open":"closed",style:{"--hsk-text-sweep":`${oe}ms`},children:[ge("input",{ref:z,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:ke=>{S(ke.target.files),ke.target.value=""}}),(v||w||_&&F)&&ge("button",{className:ne("hsk-cb-tools-toggle",V&&"hsk-cb-tools-toggle--open"),onClick:()=>se(ke=>!ke),disabled:W||b,"aria-label":V?"Close options":"More options","aria-expanded":V,children:ge(ki,{})}),ge(os,{children:w&&ge("button",{className:"hsk-cb-attach-btn",onClick:()=>z.current?.click(),disabled:W,"aria-label":"Attach image",children:ge(go,{})})}),rt("div",{className:"hsk-cb-field",ref:B,"data-ph-lines":!r&&G?"2":void 0,children:[ge("textarea",{ref:M,value:r,onChange:$,onKeyDown:P,rows:1,placeholder:"",className:ne("hsk-cb-textarea",I.input),"aria-label":J,disabled:L||W&&!he||x}),ge(bl,{placeholder:J,visible:!r,staggerMs:Ba,replaySeed:ie})]}),_&&F&&ge("button",{className:ne("hsk-cb-voice-mode-btn",U&&"hsk-cb-voice-mode-btn--blocked"),onClick:()=>U?N?.(R("errAccountRequired")):T("converse"),disabled:W||b,"aria-label":"Voice conversation",children:ge(xo,{})}),(W||he)&&!xe?ge("button",{className:ne("hsk-cb-send","hsk-cb-send--stop",I.sendButton),onClick:Y,"aria-label":"Stop generating",children:ge(ui,{})}):rt("button",{className:ne("hsk-cb-send",xe&&"is-launching",I.sendButton),onClick:()=>{Z(),D()},disabled:x||L||b||!r.trim()&&f.length===0,"aria-label":"Send message",children:[ge("svg",{width:"0",height:"0","aria-hidden":"true",focusable:"false",style:{position:"absolute"},children:ge("defs",{children:rt("filter",{id:e,children:[ge("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"1.6",result:"blur"}),ge("feColorMatrix",{in:"blur",type:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 16 -7",result:"goo"}),ge("feBlend",{in:"SourceGraphic",in2:"goo"})]})})}),ge("span",{className:"hsk-cb-send-sheath","aria-hidden":"true"}),rt("span",{className:"hsk-cb-send-stage",style:{filter:`url(#${e})`},children:[ge("span",{className:"hsk-cb-send-seam","aria-hidden":"true"}),ge("span",{className:"hsk-cb-send-kite",children:ge(yi,{})})]})]})]})]}),U?rt("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>N?.(""),children:[ge("span",{children:R("errAccountRequired")}),ge("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:ke=>{ke.stopPropagation(),N?.("")},"aria-label":"Dismiss error",children:"\xD7"})]}):H&&rt("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>N?.(""),children:[ge("span",{children:R(H)}),ge("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:ke=>{ke.stopPropagation(),N?.("")},"aria-label":"Dismiss error",children:"\xD7"})]})]})}import Bu,{useEffect as ss,useRef as qr,useState as is}from"react";import{useEffect as jn,useRef as Gn}from"react";import{jsx as Fu}from"react/jsx-runtime";function gl(e,r){let t=e.trim().match(/^#([\da-f]{3}|[\da-f]{6})$/i);if(t){let a=t[1].length===3?t[1].split("").map(o=>o+o).join(""):t[1];return[parseInt(a.slice(0,2),16),parseInt(a.slice(2,4),16),parseInt(a.slice(4,6),16)]}let n=e.match(/-?[\d.]+/g);return!n||n.length<3?r:[Number(n[0]),Number(n[1]),Number(n[2])]}function Au(e,r,t){return[e[0]+(r[0]-e[0])*t,e[1]+(r[1]-e[1])*t,e[2]+(r[2]-e[2])*t]}function vn(e,r){return`rgba(${e[0]|0}, ${e[1]|0}, ${e[2]|0}, ${r})`}var hr=24,Pu=.42;function xl({phase:e,theme:r,level:t,spectrum:n,bins:a,className:o}){let i=Gn(null),c=Gn(e),s=Gn(t),l=Gn(n),h=Gn(a);return jn(()=>{c.current=e},[e]),jn(()=>{s.current=t},[t]),jn(()=>{l.current=n},[n]),jn(()=>{h.current=a},[a]),jn(()=>{let d=i.current;if(!d)return;let p=d.getContext("2d");if(!p)return;let u=getComputedStyle(d),f=gl(u.getPropertyValue("--hsk-primary")||"",[255,106,51]),C=gl(u.getPropertyValue("--hsk-chat-text")||"",[31,31,31]),b=0,L=0,x=0,z=()=>{let Y=Math.min(window.devicePixelRatio||1,3),D=d.getBoundingClientRect();L=Math.max(1,D.width),x=Math.max(1,D.height),d.width=Math.round(L*Y),d.height=Math.round(x*Y),p.setTransform(Y,0,0,Y,0,0)};z();let S=typeof ResizeObserver<"u"?new ResizeObserver(z):null;S?.observe(d),window.addEventListener("resize",z);let w=window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches??!1,_=new Float32Array(hr),F=[],T=null,U=-1,M=null,I=0,$=0,P=performance.now(),Q=(Y,D,H,N)=>Y+(D-Y)*(D>Y?H:N),de=()=>{let Y=l.current,D=h.current?.()??0;if(!Y||!D||((!M||M.length!==D)&&(M=new Uint8Array(D)),!Y(M)))return!1;let N=Math.max(hr,Math.floor(D*Pu))/hr;for(let R=0;R<hr;R++){let A=Math.floor(R*N),K=Math.max(A+1,Math.floor((R+1)*N)),v=0;for(let k=A;k<K;k++)v+=M[k];let E=v/(K-A)/255;_[R]=Q(_[R],E,w?.2:.55,w?.06:.14)}return!0},J=(Y,D)=>{for(let H=0;H<hr;H++){let N=H/(hr-1),R=Math.pow(1-N,1.6)*(.75+.25*Math.sin(Y*3.1+H*.7));_[H]=Q(_[H],R*D,.3,.12)}},W=Y=>{let D=Math.min(hr-1,Math.max(0,Y*(hr-1))),H=Math.floor(D),N=D-H,R=_[H],A=_[Math.min(hr-1,H+1)];return R+(A-R)*N*N*(3-2*N)},he=Y=>{b=requestAnimationFrame(he);let D=(Y-P)/1e3,H=c.current,N=Math.min(1,s.current());I=Q(I,Math.max(H==="speaking"?.42:H==="listening"?.3:H==="thinking"?.28:.12,N),w?.1:.5,w?.05:.11),de()||J(D,Math.max(.25,I)),p.clearRect(0,0,L,x);let A=x/2;$=H==="thinking"?($+.012)%1.6:0;let K=3;if(U!==L){F=[];for(let k=0;k<K;k++){let ie=k/(K-1||1),X=Au(f,C,ie*.5),V=p.createLinearGradient(0,0,L,0);V.addColorStop(0,vn(X,0)),V.addColorStop(.5,vn(X,.9-ie*.35)),V.addColorStop(1,vn(X,0)),F.push(V)}T=p.createLinearGradient(0,0,L,0),T.addColorStop(0,vn(f,0)),T.addColorStop(.5,vn(f,.14)),T.addColorStop(1,vn(f,0)),U=L}let v=x*.32,E=Math.max(4,L/130);for(let k=0;k<K;k++){let ie=k/(K-1||1),X=k*.055,V=1-ie*.22;p.beginPath();let se=0,m=A;for(let B=0;B<=L;B+=E){let G=B/L,ae=Math.pow(Math.sin(Math.PI*G),.85),oe=H==="thinking"?Math.exp(-Math.pow((G-($-.3))*4.5,2)):1,xe=W(Math.abs(G-.5)*2),pe=D-X,O=Math.sin(G*Math.PI*2*2.1+pe*7.4)*.66+Math.sin(G*Math.PI*2*3.7-pe*5.6)*.26+Math.sin(G*Math.PI*2*5.9+pe*9.1)*.08,Z=A+ae*oe*V*v*I*(.6+xe*1.1)*O+Math.sin(G*Math.PI*2*.6+(D-X)*2.2)*ae*x*.01;B===0?p.moveTo(B,Z):p.quadraticCurveTo(se,m,(se+B)/2,(m+Z)/2),se=B,m=Z}p.quadraticCurveTo(se,m,L,m),p.lineCap="round",p.lineJoin="round";let g=(k===0?3:1.6)*(1+I*.6);k===0&&(p.strokeStyle=T,p.lineWidth=g*5,p.stroke()),p.strokeStyle=F[k],p.lineWidth=g,p.stroke()}};return b=requestAnimationFrame(he),()=>{cancelAnimationFrame(b),S?.disconnect(),window.removeEventListener("resize",z)}},[r]),Fu("canvas",{ref:i,className:o,"aria-hidden":"true"})}import{useState as _u,useEffect as vl,useRef as Du}from"react";import{jsx as Yt,jsxs as Ha}from"react/jsx-runtime";function Kn({src:e,images:r,initialIndex:t=0,title:n,onClose:a}){let o=r&&r.length>0?r:e?[{url:e}]:[],[i,c]=_u(t),s=Du(null);if(vl(()=>{c(Math.min(Math.max(0,t),Math.max(0,o.length-1)))},[t,o.length]),vl(()=>{if(o.length===0)return;let d=p=>{p.key==="Escape"&&a(),o.length>1&&(p.key==="ArrowLeft"&&c(u=>(u-1+o.length)%o.length),p.key==="ArrowRight"&&c(u=>(u+1)%o.length))};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[o.length,a]),o.length===0)return null;let l=o[i]||o[0],h=d=>c(p=>(p+d+o.length)%o.length);return Ha("div",{className:"hsk-lightbox",onClick:a,role:"dialog","aria-modal":"true","aria-label":n||"Image preview",children:[Yt("button",{className:"hsk-lightbox-close",onClick:a,"aria-label":"Close image",children:Yt(Jr,{})}),n&&Yt("div",{className:"hsk-lightbox-top",onClick:d=>d.stopPropagation(),children:Yt("span",{className:"hsk-lightbox-title",children:n})}),Ha("div",{className:"hsk-lightbox-stage",onClick:d=>d.stopPropagation(),onTouchStart:d=>{s.current=d.touches[0]?.clientX??null},onTouchEnd:d=>{let p=d.changedTouches[0]?.clientX;s.current!==null&&p!==void 0&&Math.abs(p-s.current)>40&&h(p<s.current?1:-1),s.current=null},children:[o.length>1&&Yt("button",{type:"button",className:"hsk-lightbox-nav hsk-lightbox-nav--prev",onClick:()=>h(-1),"aria-label":"Previous image",children:Yt(Zr,{})}),Ha("div",{className:"hsk-lightbox-content",children:[Yt("img",{src:l.url,alt:l.alt||n||"",className:"hsk-lightbox-img"},l.url),l.caption&&Yt("div",{className:"hsk-lightbox-caption",children:l.caption})]}),o.length>1&&Yt("button",{type:"button",className:"hsk-lightbox-nav hsk-lightbox-nav--next",onClick:()=>h(1),"aria-label":"Next image",children:Yt(en,{})})]}),o.length>1&&Yt("div",{className:"hsk-lightbox-bottom",onClick:d=>d.stopPropagation(),children:Ha("div",{className:"hsk-lightbox-counter",children:[i+1," / ",o.length]})})]})}import{normalizeEntityImages as Hu}from"@akropolys/sdk";import{Fragment as Uu,jsx as Le,jsxs as Wt}from"react/jsx-runtime";function $u({images:e,siteId:r,themeAttr:t}){let n=qr(null),[a,o]=is(null);if(ss(()=>{let s=n.current;s&&s.scrollTo({left:s.scrollWidth,behavior:"smooth"})},[e.length]),!e.length)return null;let i=e.findIndex(s=>s.pending),c=i>0?e.slice(0,i).reverse().find(s=>s.url)?.id:void 0;return Wt("div",{className:"hsk-voice-images",ref:n,children:[e.map(s=>Wt("button",{type:"button",className:"hsk-voice-image","data-pending":s.pending?"":void 0,disabled:s.pending,onClick:()=>o(s.url),children:[s.pending&&Le(nn,{active:!0,seed:r,theme:t}),s.url&&Le("img",{src:s.url,alt:"",draggable:!1},s.url),s.url&&Le(nn,{active:!!s.sending||s.id===c,seed:r,theme:t})]},s.id)),a&&Le(Kn,{src:a,onClose:()=>o(null)})]})}function qu({current:e,choose:r,label:t,groups:n}){let a=En.find(l=>l.name===e),[o,i]=is(!1),c=qr(null),s=qr(null);return ss(()=>{if(s.current&&(s.current.inert=!o),!o)return;let l=s.current,h=l?.querySelector('[aria-checked="true"]');l&&h&&(l.scrollTop=h.offsetTop-(l.clientHeight-h.offsetHeight)/2);let d=u=>{c.current&&!u.composedPath().includes(c.current)&&i(!1)},p=u=>{u.key==="Escape"&&i(!1)};return document.addEventListener("pointerdown",d),document.addEventListener("keydown",p),()=>{document.removeEventListener("pointerdown",d),document.removeEventListener("keydown",p)}},[o]),Wt("div",{className:"hsk-voice-picker",ref:c,"data-open":o?"":void 0,dir:"ltr",children:[Wt("button",{type:"button",className:"hsk-voice-pill hsk-voice-pill--current","aria-haspopup":"true","aria-expanded":o,"aria-label":`${t}: ${a?.trait??e} (${e})`,onClick:()=>i(l=>!l),children:[Le("span",{children:a?.trait??e}),Le("span",{className:"hsk-voice-pill-caret",children:Le(en,{})})]}),Le("div",{className:"hsk-voice-menu-list",role:"radiogroup","aria-label":t,ref:s,children:["male","female"].map(l=>Wt(Bu.Fragment,{children:[Le("div",{className:"hsk-voice-group","aria-hidden":"true",children:n[l]}),En.filter(h=>h.gender===l).map(h=>Wt("button",{type:"button",role:"radio","aria-checked":e===h.name,"aria-label":`${h.trait}, ${n[l]} (${h.name})`,className:ne("hsk-voice-option",e===h.name&&"hsk-voice-option--on"),onClick:()=>{r(h.name),i(!1)},children:[Le("span",{className:"hsk-voice-option-name",children:h.trait}),Le("span",{className:"hsk-voice-option-trait",children:h.name})]},h.name))]},l))})]})}function yl({siteId:e,themeAttr:r,stopVoice:t,chooseVoice:n,liveVoiceName:a,voiceSecondsLeft:o,voiceConnecting:i,voicePhase:c,live:s,earlier:l,newVoiceChat:h,voiceMuted:d,setVoiceMuted:p,voiceError:u,attachPhoto:f,onSelectSource:C,t:b}){let L=qr(null),x=qr(null),z=qr(null),S=[...l.turns,...s.turns??[]],w=[...l.images,...s.images??[]],_=s.sources??[],[F,T]=is(null),U=w.some(P=>P.pending),M=S.length,I=S[M-1]?.text??"",$=qr(!1);return ss(()=>{x.current?.scrollIntoView({block:"end",behavior:$.current?"smooth":"auto"}),$.current=!0},[M,I]),Wt("div",{className:"hsk-voice-overlay",role:"dialog","aria-label":b("voiceModeStart"),children:[Le(ka,{seed:e,theme:r}),S.some(P=>P.text)&&Le("button",{type:"button",className:"hsk-voice-new",onClick:h,disabled:i,"aria-label":b("voiceNewChat"),title:b("voiceNewChat"),children:Le(ma,{size:15})}),Le("button",{className:"hsk-voice-exit",onClick:t,"aria-label":b("voiceModeExit"),children:Le(Jr,{})}),Le(qu,{current:a,choose:n,label:b("voicePickerLabel"),groups:{female:b("voiceFemale"),male:b("voiceMale")}}),Wt("div",{className:"hsk-voice-thread",ref:L,children:[S.filter(P=>P.text).map((P,Q)=>P.role==="user"?Le("div",{className:"hsk-cb-user-msg",children:Le("div",{className:ne("hsk-cb-user-bubble","hsk-cb-user-bubble--spoken",!P.done&&"hsk-voice-turn--live"),children:P.text})},Q):Le("div",{className:"hsk-cb-ai-msg",children:Le("div",{className:ne("hsk-cb-ai-body",!P.done&&"hsk-voice-turn--live"),children:P.text})},Q)),Le("div",{ref:x})]}),(w.length>0||_.length>0)&&Wt("div",{className:"hsk-voice-shelf",children:[Le($u,{images:w,siteId:e,themeAttr:r}),_.length>0&&Le("div",{className:"hsk-voice-sources",children:Le(Da,{sources:_.map(P=>({...P,images:Hu(P.images??P.fields?.images,P.image,P.url)})),onSelectSource:C,onImageClick:T,referencedIds:_.map(P=>P.id).filter(P=>!!P),compact:!0})})]}),F&&Le(Kn,{src:F,onClose:()=>T(null)}),i&&Wt("div",{className:"hsk-voice-connecting",role:"status",children:[Le("span",{className:"hsk-voice-connecting-dot"}),Le("span",{children:b("voiceConnecting")})]}),u&&Le("div",{className:"hsk-voice-error",children:b(u)}),Wt("div",{className:"hsk-voice-controls",dir:"ltr",children:[s.photos&&Wt(Uu,{children:[Le("input",{ref:z,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:P=>{let Q=P.target.files?.[0];P.target.value="",Q&&f(Q)}}),Le("button",{type:"button",className:"hsk-voice-control hsk-voice-control--attach","data-control":"attach",disabled:i||U,onClick:()=>z.current?.click(),"aria-label":b("voiceAttachPhoto"),children:Le("span",{className:"hsk-voice-control-icon",children:Le(xi,{})})})]}),Le("div",{className:ne("hsk-voice-stage",i&&"hsk-voice-stage--connecting"),children:Le(xl,{className:"hsk-voice-canvas",theme:r,phase:c,level:s.micLevel,spectrum:s.micSpectrum,bins:s.spectrumBins})}),Le("button",{className:ne("hsk-voice-control",d&&"hsk-voice-control--muted",i&&"hsk-voice-control--waiting"),"data-control":"mic",disabled:i,onClick:()=>p(P=>!P),"aria-label":b(d?"voicePhaseListening":"voiceModeExit"),children:Le("span",{className:"hsk-voice-control-icon",children:d?Le(vi,{}):Le(zn,{})},d?"off":"on")})]})]})}import{useRef as $a,useEffect as Wu,useState as Ou}from"react";import{jsx as yn,jsxs as Cl}from"react/jsx-runtime";var Yn=14,wl=6;function Vu(e,r){let t=e.filter(Boolean);if(t.length<2)return null;let n=s=>s.offsetTop+s.offsetHeight/2,a=n(t[t.length-1])+10,o=s=>(s===r?wl*1.3:wl*.6)*(s%2?1:-1),i=`M ${Yn} 0`,c=0;return t.forEach((s,l)=>{let h=n(s),d=c+(h-c)/2;i+=` C ${Yn+o(l)} ${d}, ${Yn+o(l)} ${d}, ${Yn} ${h}`,c=h}),{d:i+` L ${Yn} ${a}`,height:a}}function Sl({items:e,activeIdx:r,progress:t,onJump:n,side:a="right"}){let o=kr(),i=$a(null),c=$a(null),s=$a([]),l=$a(null),[h,d]=Ou(null),p=0;for(let u=0;u<e.length;u++)e[u].idx<=r&&(p=u);return Wu(()=>{let u=s.current[p],f=l.current,C=c.current,b=i.current;if(u&&(f&&(f.style.transform=`translateY(${u.offsetTop+u.offsetHeight/2}px)`),d(Vu(s.current,p)),C&&b)){let L=b.clientHeight;if(C.scrollHeight>L&&L>0){let z=u.offsetTop+u.offsetHeight/2,S=L/2-z;C.style.transform=`translateY(${S}px)`}else C.style.transform="none"}},[p,e.length]),e.length<2?null:yn("nav",{ref:i,className:ne("hsk-cb-timeline",a==="left"?"hsk-cb-timeline--left":"hsk-cb-timeline--right"),"aria-label":o("timelineLabel"),children:Cl("div",{ref:c,className:"hsk-cb-timeline-track",style:{"--hsk-tl-progress":t},children:[h&&yn("svg",{className:"hsk-cb-tl-wave",width:"28",height:h.height,viewBox:`0 0 28 ${h.height}`,"aria-hidden":"true",children:yn("path",{d:h.d})}),yn("span",{className:"hsk-cb-tl-cursor",ref:l,"aria-hidden":"true"}),e.map((u,f)=>Cl("button",{ref:C=>{s.current[f]=C},type:"button",className:ne("hsk-cb-tl-item",f===p&&"hsk-cb-tl-item--on"),style:{"--hsk-tl-d":Math.min(Math.abs(f-p),4)},onClick:()=>n(u.idx),title:u.text,children:[yn("span",{className:"hsk-cb-tl-dot"}),yn("span",{className:"hsk-cb-tl-label",children:u.text})]},u.idx))]})})}import{useState as qa,useEffect as Ml,useLayoutEffect as cs,useRef as Tl,useCallback as ls}from"react";import{createPortal as ju}from"react-dom";import{Fragment as Ku,jsx as Xt,jsxs as Cr}from"react/jsx-runtime";var Gu=190;function Rl({msg:e,rect:r,containerRect:t,anchorEl:n,containerEl:a,scrollEl:o,isUser:i,isRTL:c=!1,canRetry:s,onPin:l,onRetry:h,onCopy:d,onClose:p,t:u}){let[f,C]=qa(!1),b=Tl(null),L=Tl(),[x]=qa(()=>{let be=o?.getBoundingClientRect();return!!be&&(r.top<be.top+64||r.top+r.height>be.bottom-8)});cs(()=>{let be=n?.closest(".hsk-cb-msg-group");if(!be)return;let Pe=be.inert;return be.setAttribute("data-hsk-tapback-focus",""),be.inert=!0,()=>{be.removeAttribute("data-hsk-tapback-focus"),be.inert=Pe}},[n]),cs(()=>{if(!o)return;let be=o.getAttribute("data-hsk-tapback-active");return o.setAttribute("data-hsk-tapback-active",""),()=>{be===null?o.removeAttribute("data-hsk-tapback-active"):o.setAttribute("data-hsk-tapback-active",be)}},[o]);let{closing:z,requestClose:S}=Wn(Gu,p);Ml(()=>{let be=document.activeElement,Pe=()=>Array.from(b.current?.querySelectorAll("button")??[]);b.current?.focus({preventScroll:!0});let We=He=>{if(He.key==="Escape"&&(He.preventDefault(),He.stopImmediatePropagation(),S()),He.key!=="Tab")return;let _e=Pe();if(!_e.length)return;let Tt=_e.indexOf(document.activeElement);(He.shiftKey?Tt<=0:Tt===_e.length-1||Tt<0)&&(He.preventDefault(),_e[He.shiftKey?_e.length-1:0].focus({preventScroll:!0}))};return window.addEventListener("keydown",We,!0),()=>{window.removeEventListener("keydown",We,!0),clearTimeout(L.current),be?.isConnected&&be.focus({preventScroll:!0})}},[S]);let w=ls(async()=>{await d(e.content||"")&&(C(!0),L.current=setTimeout(S,450))},[e.content,d,S]),_=ls(()=>{Vt("pin"),l(e),S()},[e,l,S]),F=ls(()=>{h&&h(e),S()},[e,h,S]),[T,U]=qa(()=>({box:r,attachment:r,thought:void 0,container:t,viewport:o?.getBoundingClientRect(),width:0,height:36,scrollTop:o?.scrollTop??0}));cs(()=>{let be=0,Pe=()=>{be=0;let _e=n?.getBoundingClientRect()??r,Tt=(i?null:n?.querySelector(".hsk-cb-ai-text"))?.getBoundingClientRect()??_e,St=i?void 0:n?.querySelector(".hsk-cb-think-head")?.getBoundingClientRect(),Ft=a?.getBoundingClientRect()??t,ct=o?.getBoundingClientRect()??Ft,_t=b.current?.offsetWidth??0,vt=b.current?.offsetHeight??36,fe=o?.scrollTop??0;U(Oe=>{let pt=(dt,nt)=>dt===nt||!!dt&&!!nt&&["top","left","width","height"].every(ut=>Math.abs(dt[ut]-nt[ut])<.5);return pt(Oe.box,_e)&&pt(Oe.attachment,Tt)&&pt(Oe.thought,St)&&pt(Oe.container,Ft)&&pt(Oe.viewport,ct)&&Oe.width===_t&&Oe.height===vt&&Oe.scrollTop===fe?Oe:{box:_e,attachment:Tt,thought:St,container:Ft,viewport:ct,width:_t,height:vt,scrollTop:fe}})},We=()=>{be||(be=requestAnimationFrame(Pe))};Pe();let He=typeof ResizeObserver>"u"?null:new ResizeObserver(We);for(let _e of[n,a,o,b.current])_e&&He?.observe(_e);return o?.addEventListener("scroll",We,{passive:!0}),window.addEventListener("resize",We),window.visualViewport?.addEventListener("resize",We),window.visualViewport?.addEventListener("scroll",We),()=>{cancelAnimationFrame(be),He?.disconnect(),o?.removeEventListener("scroll",We),window.removeEventListener("resize",We),window.visualViewport?.removeEventListener("resize",We),window.visualViewport?.removeEventListener("scroll",We)}},[n,a,o,r,t,i]);let[M,I]=qa("");Ml(()=>{if(!n)return;let be=getComputedStyle(n).backgroundColor;be&&be!=="rgba(0, 0, 0, 0)"&&be!=="transparent"&&I(be)},[n]);let{box:$,attachment:P,thought:Q,container:de,viewport:J}=T,W=de?.top??0,he=de?.left??0,Y=de?.width??(typeof window<"u"?window.innerWidth:390),D=$.top-W,H=P.left-he,N=P.width,R=$.height,A=2;s&&h&&A++;let K=A===2?122:170,v=T.width||K,E=T.height,k=window.visualViewport?.offsetTop??0,ie=k+(window.visualViewport?.height??window.innerHeight),X=Math.max(0,Math.max(J?.top??W,k)-W),V=Math.min(de?.height??window.innerHeight,Math.min(J?J.top+J.height:ie,ie)-W),se=X+8,m=Math.max(se,V-E-8),g=!!Q,B=g||x||D-E-9>=se,G=B?D-E-9:D+R+9,ae=Q?Math.max(se,Math.min(Q.top-W+(Q.height-E)/2,m)):x?se:Math.max(se,Math.min(G,m)),oe=Math.round($.top-(J?.top??W)+T.scrollTop),xe=Math.min(24,R/2),pe=Math.ceil(Math.max(240,J?.height??de?.height??window.innerHeight)+64),O=Cr(Ku,{children:[Xt("div",{className:ne("hsk-tapback-frost","is-upper",z&&"is-closing"),"aria-hidden":"true",style:{top:(o?oe:D)-pe,height:pe+xe}}),Xt("div",{className:ne("hsk-tapback-frost","is-lower",z&&"is-closing"),"aria-hidden":"true",style:{top:(o?oe:D)+R-xe,height:pe+xe}})]}),Z=!i&&!!n?.closest('[data-hsk-layout="wide"]'),ye=c,ze=ye?Math.min(Y-18,H+N-7):Math.max(18,H+7),ke=ye?ze-v+18:ze-18;ke=Math.max(10,Math.min(ke,Y-v-10));let we=Math.max(18,Math.min(ze-ke,v-18)),Ne=M||(i?"var(--hsk-user-bubble-bg, var(--hsk-primary, #007aff))":"var(--hsk-bubble-bg, #eeeef0)"),Ce=0;return Cr("div",{className:ne("hsk-tapback-overlay",z&&"is-closing"),onClick:S,children:[o?ju(O,o):O,Cr("div",{ref:b,className:ne("hsk-tapback-group",Z&&"is-wide",(x||g)&&"is-docked",z&&"is-closing",B?"is-above":"is-below",i?"is-user":"is-ai"),style:{top:`${ae}px`,left:`${ke}px`,maxWidth:`${Math.max(0,Y-20)}px`,"--tail-x":`${we}px`,"--tail-dir":ye?1:-1,"--tail-step":i?"9px":"8px","--hsk-anchor-color":Ne,"--hsk-skin":"var(--hsk-bubble-bg, var(--hsk-chat-ai-bg, #eeeef0))"},tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":"Message actions",onClick:be=>be.stopPropagation(),children:[Cr("div",{className:"hsk-tapback-capsule",children:[Cr("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--pin",onClick:_,"aria-label":"Pin to Kiku Memory",style:{"--tool-idx":Ce++},children:[Xt(Li,{size:14}),Xt("span",{children:"Pin"})]}),s&&h&&Cr("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--retry",onClick:F,"aria-label":u("retry"),style:{"--tool-idx":Ce++},children:[Xt(Ln,{size:14}),Xt("span",{children:u("retry")})]}),Cr("button",{type:"button",className:ne("hsk-tapback-tool-btn hsk-tapback-tool-btn--copy",f&&"is-copied"),onClick:w,"aria-label":u(f?"copied":"copy"),style:{"--tool-idx":Ce++},children:[f?Xt(Lr,{size:14}):Xt(Er,{size:14}),Xt("span",{children:u(f?"copied":"copy")})]})]}),Cr("div",{className:ne("hsk-tapback-tail",B?"is-above":"is-below"),style:{left:`${we}px`},children:[Xt("span",{className:"hsk-tapback-dot hsk-tapback-dot--mid"}),Xt("span",{className:"hsk-tapback-dot hsk-tapback-dot--anchor"})]})]})]})}import{jsx as Ke,jsxs as Ur}from"react/jsx-runtime";var em=240,tm=700,rm=200;function hs({title:e="kiku",logo:r,placeholder:t="Ask me anything\u2026",backdropColor:n,backdropBlur:a,onClose:o,onSelectSource:i,chips:c=Rn,theme:s,classNames:l={},enableVoice:h=!1,voiceLang:d,enableVision:p=!1,ttsVoice:u="Algenib",origin:f}){let C=Ju(),b=Zu(),{messages:L,sources:x,loading:z,streaming:S,error:w,errorCode:_,lastAction:F,lastIntent:T,allowedActions:U,send:M,queuedMessage:I,sendQueuedNow:$,appendSpokenExchange:P,stop:Q,stopped:de,interrupted:J,continueGenerating:W,reset:he,referencedIds:Y,humanPending:D,leaveHuman:H}=Xu(),[N,R]=Ge(null),A=it(null),K=It(()=>{window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||A.current?.animate([0,-7,6,-4,2,0].map(y=>({transform:`translateX(${y}px)`})),{duration:380,easing:"cubic-bezier(.36, .07, .19, .97)"})},[]);Nt(()=>{if(!N)return;let y=Te=>{(Te.key.length===1||Te.key==="Enter"||Te.key==="Backspace")&&K()},q=Te=>{let Re=je=>Te.composedPath().some(Fe=>Fe.classList?.contains(je));!Re("hsk-cb-leave")&&!Re("hsk-cb-topbar")&&K()},me=Tr.current;return me?.setAttribute("inert",""),document.addEventListener("keydown",y),document.addEventListener("pointerdown",q,!0),()=>{me?.removeAttribute("inert"),document.removeEventListener("keydown",y),document.removeEventListener("pointerdown",q,!0)}},[N,K]);let[v,E]=Ge(()=>{try{return C.getShopperName?.()??""}catch{return""}}),[k,ie]=Ge(()=>{try{return C.getShopperLanguage?.()??""}catch{return""}}),[X,V]=Ge(()=>{try{return C.getEntityLanguageMode?.()??""}catch{return""}}),[se,m]=Ge(!1),[g,B]=Ge(null),[G,ae]=Ge(""),[oe,xe]=Ge(!1),{chromeReady:pe,baseFontReady:O,isRTL:Z,speechLang:ye,scriptFont:ze,fontStack:ke,isNonLatin:we,hostFontCovers:Ne,t:Ce,tNode:be}=Xi({shopperLanguage:k||G,theme:s,preloadedStrings:g}),Pe=Xn.useMemo(()=>{let y=x.filter(Fe=>Fe.id&&Y.includes(Fe.id)),q=[...L].reverse().find(Fe=>Fe.role==="assistant")?.content??"";if(!q)return y;let me=new Set(y.map(Fe=>Fe.id)),Te=q.toLowerCase().replace(/\s+/g," "),Re=Fe=>{let wt=String(Fe??"").toLowerCase().replace(/\s+/g," ").trim(),Ye=wt.split(" "),Ht=[wt];return Ye.length>3&&Ht.push(Ye.slice(0,3).join(" ")),Ye.length>4&&Ht.push(Ye.slice(0,4).join(" ")),Ht.filter(Xr=>Xr.length>=5)},je=x.filter(Fe=>Fe.id&&!me.has(Fe.id)&&Re(Fe.name).some(wt=>Te.includes(wt)));return[...y,...je]},[x,Y,L]),We=U===null||U.includes("capture"),[He,_e]=Ge(""),[Tt,St]=Ge(!1),[Ft,ct]=Ge(!1),[_t,vt]=Ge([]),fe=it(new Map),Oe=it(null),[pt,dt]=Ge({}),[nt,ut]=Ge(null),Bt=It((y,q)=>{if(!y&&!q){ut(null);return}ut(q?{images:q.images,initialIndex:q.index??0,title:q.title}:{src:y})},[]),[Dt,lt]=Ge(null),[yt,j]=Ge(()=>{if(typeof window>"u")return!1;try{return localStorage.getItem("akropolys_terms_agreed")==="true"}catch{return!1}}),re=L.length===0,ue=G||k,ee=!ue||ue.toLowerCase()==="english"||ue.toLowerCase()==="en",le=oe||!!G||!!k&&!pe&&!ee,ce=re&&!k&&!le,Ie=re&&!!k&&!v&&!le,Ee=re&&!!k&&!!v&&!X,Ve=re&&!!k&&!!v&&!!X&&!yt,bt=ce||Ie||Ee||Ve||le,ar=Ee||Ve||le,[Wr,Or]=Ge(le),[Qn,Vr]=Ge(!1),[Jn,jr]=Ge(!1),[Ae,tt]=Ge(!1),$e=it(!1),Rt=it(null),ht=it(null);le!==Wr&&(Or(le),le?(ht.current&&clearTimeout(ht.current),tt(!1),jr(!0),Rt.current=setTimeout(()=>{Vr(!0),jr(!1),$e.current=!0},280)):(Rt.current&&clearTimeout(Rt.current),jr(!1),Vr(!1),$e.current&&($e.current=!1,tt(!0),ht.current=setTimeout(()=>tt(!1),560)))),Nt(()=>()=>{Rt.current&&clearTimeout(Rt.current),ht.current&&clearTimeout(ht.current)},[]);let Et=Xn.useMemo(()=>L.some(y=>y.liveKeys?.length>0),[L]);Nt(()=>{if(Et)return Qu({client:C})},[Et,C]);let[Gr,Wa]=Ge(!1);Nt(()=>{let y=window.matchMedia?.("(max-width: 1199px)");if(!y)return;let q=()=>Wa(y.matches);return q(),y.addEventListener?.("change",q),()=>y.removeEventListener?.("change",q)},[]);let Sr=async y=>{let q=y.trim();if(!q){try{C.setShopperLanguage?.("")}catch{}ie(""),ae(""),B(null);return}if(ae(q),xe(!0),q.toLowerCase()==="english"||q.toLowerCase()==="en"){B(Lt);try{C.setShopperLanguage?.(q)}catch{}ie(q),ae(""),xe(!1),m(!1);return}let Te=Date.now(),Re=1200;try{let Fe=C.getCachedUIStrings?.(q,fr)??C.getCachedUIStrings?.(q,Lt);if(Fe?.strings&&Object.keys(Fe.strings).length>0)B(Fe.strings),Fe.font&&await Ut(Fe.font,800);else{let wt=C.getUIStrings?.(q,fr),Ye=await Promise.race([wt,new Promise(Ht=>setTimeout(()=>Ht(null),8e3))]);Ye?.font&&await Ut(Ye.font,1200),Ye?.strings&&Object.keys(Ye.strings).length>0&&B(Ye.strings)}}catch{}let je=Date.now()-Te;je<Re&&await new Promise(Fe=>setTimeout(Fe,Re-je));try{C.setShopperLanguage?.(q)}catch{}ie(q),ae(""),xe(!1),m(!1);try{C.getUIStrings?.(q,Lt)?.catch?.(()=>{})}catch{}},pr=y=>{try{C.setEntityLanguageMode?.(y)}catch{}V(y),yt&&m(!0)},Oa=()=>{try{localStorage.setItem("akropolys_terms_agreed","true")}catch{}j(!0),m(!0)},Va=le?Rr(G||k).preparing:ce?Ce("langPlaceholder"):Ie?Ce("namePlaceholder"):Ee?Ce("entityLangPlaceholder"):Ve?Ce("termsPlaceholder"):t==="Ask me anything\u2026"?Ce("defaultPlaceholder"):t,ja=!c||c===Rn?[]:Array.isArray(c)?c:[],Ga=ce?"curious":Ie?"welcoming":Ee?"guiding":Ve?"focused":"happy",[dr,Ka]=Ge(()=>di(s)),[zl,ms]=Ge(!1),wn=it(null);Nt(()=>()=>{wn.current&&clearTimeout(wn.current)},[]);let bs=it(null),Nl=()=>{let y=Tr.current;if(!y?.animate||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let q=Z?-3:3;bs.current?.cancel(),bs.current=y.animate([{transform:"translate(0, 0)",easing:"cubic-bezier(.3, 0, .2, 1)"},{offset:.26,transform:`translate(${q}px, -6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.52,transform:`translate(${-q*.3}px, 1.6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.74,transform:`translate(${q*.1}px, -0.6px)`,easing:"cubic-bezier(.45, 0, .55, 1)"},{transform:"translate(0, 0)"}],{duration:1100,delay:380})},fs=it(!1);Nt(()=>{if(fs.current)return;let y=Tr.current;if(!y){Eo();return}let q=!1,me=()=>y.querySelector(".hsk-cb-hello-wrap, .hsk-cb-msg-group"),Te=()=>{q||(q=!0,fs.current=!0,Re.disconnect(),clearTimeout(je),Eo())},Re=new MutationObserver(()=>{me()&&Te()});Re.observe(y,{childList:!0,subtree:!0});let je=window.setTimeout(Te,2e3);return me()&&Te(),()=>{q=!0,Re.disconnect(),clearTimeout(je)}},[]);let ks=(y,q=!1)=>{ms(!0),wn.current&&clearTimeout(wn.current),wn.current=setTimeout(()=>ms(!1),420),Ka(y),Nl(),q&&na();try{localStorage.setItem("akropolys_theme",y)}catch{}},{vars:Il}=ca(s),Kr=dr;la(s);let gs=it(()=>{}),or=it(null),ur=async(y,q,me,Te)=>{let Re=(y??He).trim(),je=q??_t;if(!Re&&je.length===0||!pe||I)return;if(Vt("send"),Ie){if(!Re)return;let Ye=ci(Re)||Re.slice(0,40);try{C.setShopperName?.(Ye)}catch{}E(Ye),_e("");return}if(ce){if(!Re||oe)return;_e(""),Sr(Re);return}if(ar){_e("");return}St(!1),ct(!1),_e(""),vt([]);let Fe=(await Promise.all(je.map(async({thumb:Ye,...Ht})=>{let Xr=Ht.data||(Ye?await fe.current.get(Ye)?.catch(()=>""):"")||"";return Ye&&URL.revokeObjectURL(Ye),{...Ht,data:Xr}}))).filter(Ye=>Ye.data),wt=Re||(Fe.some(Ye=>Ye.type==="image")?"Analyze this image":"What is this?");await M(wt,Re,Fe.length>0?Fe:void 0,me,Te)},[Al,xs]=Ge(!1),Zn=It(async y=>{let q=y&&y.role==="user"?y:[...L].reverse().find(me=>me.role==="user");if(q?.content){xs(!0);try{await ur(q.content)}finally{xs(!1)}}},[L,ur]),Pl=It(y=>{y?.content&&(_e(y.content),setTimeout(()=>{if(or.current){or.current.focus();let q=y.content.length;try{or.current.setSelectionRange(q,q)}catch{}}},50))},[_e,or]),Fl=It(async()=>{await Zn()},[Zn]),{keyInput:_l,setKeyInput:Dl,keyPhase:Bl,setKeyPhase:vs,mintedKey:Hl,setMintedKey:$l,mintedPub:im,setMintedPub:ql,copied:Ul,keyCountdown:Wl,minting:Ol,copyValue:Vl,handleUseExistingKey:jl,handleCreateKey:Gl}=tc(F,Fl),Kl=It(()=>{let y=C?.getKikuKey?.();y&&window.open(`https://mimi.akropolys.cloud/#k=${encodeURIComponent(y)}`,"_blank","noopener")},[C]),[Cn,ys]=Ge(null),Yl=It(async y=>{let q=(y.content||"").replace(/^(@kiku pin\s*)+/i,""),Te=`@kiku pin ${q.slice(0,50).replace(/\n+/g," ")}`;await M(q||"pin message",Te,void 0,"capture")},[M]),{handleKikuCapture:Xl,handleKikuCaptureAll:Ql,handleKikuViewHistory:Jl,handleKikuDelete:Zl}=rc({attachments:_t,setAttachments:vt,setInput:_e,send:M,t:Ce}),{voiceMode:ws,voicePhase:Cs,voiceConnecting:eh,voiceError:Ya,setVoiceError:Ss,voiceMuted:th,setVoiceMuted:rh,voiceSecondsLeft:nh,voiceBlocked:ah,liveVoiceName:oh,chooseVoice:sh,canConverse:ih,startVoice:ch,stopVoice:lh,voice:hh,live:Ms,earlier:ph,newVoiceChat:dh,attachPhoto:uh}=Cc({voiceLang:d,speechLang:ye,shopperLanguage:k,ttsVoice:u,messages:L,handleSendUtterance:y=>gs.current(y),appendSpokenExchange:P}),ea=it(null),[Qt,ta]=Ge(!1),Mr=it(null);Nt(()=>(!Qt&&Mr.current&&clearTimeout(Mr.current),()=>{Mr.current&&clearTimeout(Mr.current)}),[Qt]);let[mh,bh]=Ge(null),ra=it(null),Xa=it(null),Ts=it([]),Sn=it(null),fh=`hsk-goo-${Yu()}`,{closing:Qa,requestClose:Ja,closeNow:na}=Wn(Gr?tm:em,()=>ta(!1));Nt(()=>{if(!Qt)return;let y=q=>{let me=q.composedPath?q.composedPath():[],Te=ra.current&&(me.includes(ra.current)||ra.current.contains(q.target)),Re=Xa.current&&(me.includes(Xa.current)||Xa.current.contains(q.target)),je=q.target,Fe=je?.closest?.(".hsk-cb-topbar-mark"),wt=je?.closest?.(".hsk-cb-topbar-ooze-menu")||me.some(Ye=>Ye?.classList?.contains?.("hsk-cb-topbar-ooze-menu"));Te||Re||Fe||wt||Ja()};return document.addEventListener("mousedown",y),document.addEventListener("touchstart",y,{passive:!0}),()=>{document.removeEventListener("mousedown",y),document.removeEventListener("touchstart",y)}},[Qt]);let{msgsContainerRef:Tr,spacerRef:kh,lastExternalScrollRef:gh,showJumpToBottom:xh,scrollProgress:vh,activeMsgIdx:yh,unreadBelow:wh,jumpToMessage:Ch,revealMessage:Rs,jumpToBottom:Sh}=Qi({messages:L,loading:z,streaming:S,messageRefs:Ts}),Mh=It((y,q,me,Te)=>{Te&&Rs(Te),ys({msg:y,rect:q,isUser:me,el:Te})},[Rs]),Mn=Oc(Tr),{closing:Th,requestClose:Es}=Wn(rm,o),Za=It(y=>{y&&H(),ta(!1),window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?o():Es()},[Es,o,H]),aa=It(()=>{N?K():D?R("close"):Za(!1)},[D,Za,N,K]);zi({panel:It(()=>ea.current,[]),scroller:It(()=>Tr.current,[]),onDismiss:o,quiescent:It(()=>performance.now()-gh.current>90,[])}),Nt(()=>{if(typeof window>"u")return;let y=window.innerWidth-document.documentElement.clientWidth,q=document.body.style.overflow,me=document.body.style.paddingRight;if(y>0){let Te=parseFloat(window.getComputedStyle(document.body).paddingRight)||0;document.body.style.paddingRight=`${Te+y}px`,document.documentElement.style.setProperty("--hsk-scrollbar-width",`${y}px`)}return document.body.style.overflow="hidden",()=>{document.body.style.overflow=q,document.body.style.paddingRight=me,document.documentElement.style.removeProperty("--hsk-scrollbar-width")}},[]),Nt(()=>{let y=window.visualViewport;if(!y)return;let q=document.documentElement,me=()=>{q.style.setProperty("--hsk-vvh",`${y.height}px`)};return me(),y.addEventListener("resize",me),y.addEventListener("scroll",me),()=>{y.removeEventListener("resize",me),y.removeEventListener("scroll",me),q.style.removeProperty("--hsk-vvh")}},[]),Nt(()=>{let y=q=>{if(q.key==="Escape"){if(nt){ut(null);return}aa()}};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[nt,aa]);let eo=It(y=>{y&&H(),he(),vs("idle")},[he,vs,H]),Rh=It(()=>{N?K():D?R("reset"):eo(!1)},[D,eo,N,K]),Eh=y=>{i?.(y);let q=[...L].reverse().find(me=>me.role==="assistant");if(q&&q.content.trim().endsWith("?")){M(Ce("cardClickAnswer",{name:y.name}));return}M(Ce("cardClickQuery",{name:y.name,details:no(Ot(y,b))}))},Lh=y=>{_e(y+" "),ct(!1),St(!0),or.current&&or.current.focus()},zh=y=>{if(y.key==="Escape"&&Tt){y.preventDefault(),St(!1);return}if(y.key==="Escape"&&Ft){y.preventDefault(),ct(!1);return}y.key==="Enter"&&!y.shiftKey&&!y.nativeEvent.isComposing&&(y.preventDefault(),ur())},to=it(28),Ls=it(280),ro=it(null),Nh=(y,q)=>{try{!ro.current&&typeof document<"u"&&(ro.current=document.createElement("canvas"));let me=ro.current?.getContext("2d");return me?(me.font=q,me.measureText(y).width):y.length*8.5}catch{return y.length*8.5}},Ih=y=>{let q=y.closest(".hsk-cb-input-box");if(!q)return;let me=y.value;!(q.dataset.expanded==="true")&&y.clientWidth>50&&(Ls.current=y.clientWidth);let Re=window.getComputedStyle(y),je=Re.font||`${Re.fontSize||"16px"} ${Re.fontFamily||"Geist, sans-serif"}`,Fe=Nh(me,je),wt=Math.max(120,Ls.current-14),Ye=me.includes(`
|
|
38
|
-
`),Ht=!!(me&&(Ye||Fe>wt));if(q.dataset.expanded!==(Ht?"true":"false")&&(q.dataset.expanded=Ht?"true":"false"),!me){to.current=28,y.style.height="";return}if(!Ht){to.current=28,y.style.height="";return}y.style.height="auto";let Xr=Math.max(28,Math.min(y.scrollHeight,140));to.current=Xr,y.style.height=`${Xr}px`};Nt(()=>{or.current&&Ih(or.current)},[He]);let Ah=y=>{let q=y.target.value;_e(q),Ya&&Ss("");let me=q.trim();ct(me==="@"),St(/^@kiku\s*$/i.test(me))};Nt(()=>{gs.current=y=>{ur(y)}});let Ph=async y=>{if(!y||y.length===0)return;let q=Array.from(y);for(let me of q){if(!me.type.startsWith("image/"))continue;let Te=URL.createObjectURL(me),Re=ba(me);fe.current.set(Te,Re),vt(je=>[...je,{type:"image",data:"",thumb:Te}]),Re.then(je=>vt(Fe=>Fe.map(wt=>wt.thumb===Te?{...wt,data:je}:wt))).catch(()=>vt(je=>je.filter(Fe=>Fe.thumb!==Te))).finally(()=>fe.current.delete(Te))}},Fh=y=>{vt(q=>{let me=q[y]?.thumb;return me&&URL.revokeObjectURL(me),q.filter((Te,Re)=>Re!==y)})},_h=n&&(n.includes("rgba")||n.includes("hsla")||n==="transparent"),Dh=a||_h?{backdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`,WebkitBackdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`}:{},zs=it(!1);Nt(()=>{if(zs.current&&!S){let y=L[L.length-1];y&&y.role!=="user"&&Vt("reply")}zs.current=S},[S,L]);let Ns=(de||J)&&!z&&!S,oa=L[L.length-1],sa=Zi(oa?.role==="assistant"?oa.content??"":""),Bh=oa?.role==="assistant"&&sa.length<(oa.content?.length??0),Hh=S||Bh,Yr=Xn.useMemo(()=>{let y=z||S,q=L.filter((Re,je)=>Re.role!=="assistant"||je===L.length-1&&y?!0:!!Re.content||!!Re.visualization||Re.visualizing||(Re.knowledgeImages?.length??0)>0||(Re.referencedIds?.length??0)>0||Un(Re.statusStage)),me=q.length-1;if(me<0||q[me].role!=="assistant"||q[me]!==L[L.length-1])return q;let Te=sa.length<(q[me].content?.length??0);return!y&&!Te?q:q.map((Re,je)=>je===me?{...Re,content:sa}:Re)},[L,z,S,sa]),$h=Xn.useMemo(()=>{let y=[];return Yr.forEach((q,me)=>{if(q.role==="user"&&q.content.trim()){let Te=q.content.replace(/^@kiku\s*/i,"").replace(/\s+/g," ").trim();y.push({idx:me,text:Te.length>28?Te.slice(0,27).trimEnd()+"\u2026":Te})}}),y},[Yr]),qh=Ns&&Yr[Yr.length-1]?.role!=="assistant",Is=it(Date.now());return Nt(()=>{Is.current=Date.now()},[]),Ke(bo.Provider,{value:Ce,children:Ke("div",{ref:Sn,className:ne("hsk-cb-overlay",f&&"hsk-cb-overlay--grows",Th&&"hsk-cb-overlay--closing",l.overlay),onPointerDown:y=>{mr(),y.target===y.currentTarget&&(Sn.current._ptrDown=!0)},onClick:y=>{y.target===y.currentTarget&&Sn.current?._ptrDown&&Date.now()-Is.current>200&&aa(),Sn.current&&(Sn.current._ptrDown=!1)},"data-hsk-theme":Kr,"data-hsk-layout":Mn.wide?"wide":"bubbles","data-hsk-theming":zl?"":void 0,style:{...Dh,...n?{background:n}:{},...f?{"--hsk-ox":`${f.x}px`,"--hsk-oy":`${f.y}px`}:{},...Il},children:Ur("div",{ref:ea,className:ne("hsk-cb-panel",l.panel),dir:Z?"rtl":"ltr",lang:ye||void 0,"data-script":we?"nonlatin":"latin","data-host-font":Ne?"covers":"gap","data-nastaliq":ze?.family==="Noto Nastaliq Urdu"||k?.toLowerCase()==="urdu"||k?.toLowerCase()==="ur"||k==="\u0627\u0631\u062F\u0648"?"true":void 0,style:ke?{"--hsk-font":ke}:void 0,onClick:y=>{y.stopPropagation();let q=y.target;if(q.tagName==="IMG"&&(q.classList.contains("hsk-markdown-img")||q.classList.contains("hsk-cb-user-img-thumb"))){let me=q.src;me&&Bt(me)}},children:[Ke(Kn,{src:nt?.src,images:nt?.images,initialIndex:nt?.initialIndex,title:nt?.title,onClose:()=>ut(null)}),Dt&&Ke("div",{className:"hsk-markup-overlay",children:Ke(Fi,{src:Dt,t:Ce,onCancel:()=>lt(null),onSend:(y,q,me,Te)=>{lt(null),ur(q,[{type:"image",data:y,annotated:!0,marks:me,instructed:!0,preview:Te}])}})}),Ur("div",{className:"hsk-cb-main",children:[Ke(ka,{seed:C?.api?.siteId??"",theme:Kr,dir:Z?"rtl":"ltr",waitForContent:!0}),Ke(Pc,{layoutControl:Ke(Go,{wide:Mn.wide,onToggle:()=>{Mn.toggle(),Mr.current&&clearTimeout(Mr.current),window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?na():Mr.current=setTimeout(Ja,400)}}),title:e,logo:r,hasMessages:L.length>0,avatarState:S?"speaking":z?"thinking":"idle",unread:wh,awayFromBottom:xh,themeMenuOpen:Qt,themeMenuClosing:Qa,onThemeMenuClosed:na,isNarrow:Gr,currentTheme:dr,onJumpToLatest:Sh,onReset:Rh,onClose:aa,onToggleThemeMenu:()=>Qt?Ja():ta(!0),onSelectTheme:y=>{ks(y,!0)},themeAttr:Kr}),Ke("div",{className:"hsk-cb-msgs",ref:Tr,children:Yr.length===0?Ke(qc,{theme:Kr,inOnboarding:bt,justCompleted:se,onboardingMood:Ga,awaitingLang:ce,awaitingName:Ie,awaitingEntityLang:Ee,awaitingConsent:Ve,termsAgreed:yt,shopperLanguage:k,pendingLanguage:G,shopperName:v,entityLangPref:X,chromeReady:pe&&O,activeChips:ja,speechLang:ye,t:Ce,tNode:be,chooseLanguage:Sr,langSwitching:oe,isLangPreparing:le,chooseEntityLang:pr,agreeTerms:Oa,handleSend:ur}):Ke(ul,{doodleTheme:Kr,displayMessages:Yr,messageRefs:Ts,isNarrow:Gr,loading:z,streaming:Hh,sources:x,referencedIds:Y,discussedSources:Pe,lastIntent:T,lastAction:F,stopped:de,interrupted:J,halted:Ns,haltedEmpty:qh,error:w,errorCode:_,keyPhase:Bl,keyInput:_l,setKeyInput:Dl,mintedKey:Hl,setMintedKey:$l,setMintedPub:ql,minting:Ol,copied:Ul,keyCountdown:Wl,handleUseExistingKey:jl,handleCreateKey:Gl,copyValue:Vl,queuedMessage:I,sendQueuedNow:$,setLightboxSrc:Bt,setMarkupSrc:lt,handleSend:ur,handleSourceClick:Eh,onRetry:Zn,onEdit:Pl,onLongPress:Mh,retrying:Al,continueGenerating:W,t:Ce,spacerRef:kh,vizState:pt,setVizState:dt,messages:L})}),!Qn&&Ke("div",{className:ne("hsk-cb-composer-wrapper",Jn&&"hsk-composer-exit-up",Ae&&"hsk-composer-reveal"),children:Ke(kl,{notice:N&&Ur("div",{className:"hsk-cb-leave",role:"alertdialog",ref:A,children:[Ke("span",{children:Ce("leaveHumanWarning")}),Ke("button",{type:"button",className:"hsk-cb-leave-btn",onClick:()=>R(null),children:Ce("leaveHumanStay")}),Ke("button",{type:"button",className:"hsk-cb-leave-btn hsk-cb-leave-btn--end",onClick:()=>{let y=N;R(null),y==="reset"?eo(!0):Za(!0)},children:Ce("leaveHumanConfirm")})]}),gooId:fh,input:He,setInput:_e,showKikuPicker:Tt,setShowKikuPicker:St,showAtPicker:Ft,setShowAtPicker:ct,captureAllowed:We,discussedSources:Pe,handleSelectExtension:Lh,handleKikuCapture:Xl,handleKikuCaptureAll:Ql,handleKikuViewHistory:Jl,handleKikuDelete:Zl,attachments:_t,removeAttachment:Fh,chromeLoading:!pe,imageInputRef:Oe,handleImageFiles:Ph,enableVision:p&&!bt,enableVoice:h&&!bt,canConverse:ih,startVoice:ch,inputLocked:ar,voiceBlocked:ah,textareaRef:or,classNames:l,handleInput:Ah,handleKeyDown:zh,voice:hh,voicePhase:Cs,activePlaceholder:Va,loading:z,streaming:S,stop:Q,handleSend:ur,voiceError:Ya,setVoiceError:Ss,langSwitching:oe||le,t:Ce,onOpenMimi:C?.getKikuKey?.()?Kl:void 0})})]}),ws!=="converse"&&Ke(Sl,{items:$h,activeIdx:yh,progress:vh,onJump:Ch,side:Z?"left":"right"}),Ur("div",{className:ne("hsk-cb-kiku-id-rail",Z?"hsk-cb-kiku-id-rail--right":"hsk-cb-kiku-id-rail--left"),children:[Ke("div",{className:"hsk-cb-dock-frost","aria-hidden":"true"}),Ke(Ra,{}),Ur("div",{className:ne("hsk-cb-theme-squircle-wrap",Qt&&!Qa&&"is-open"),ref:ra,children:[Ke("div",{className:"hsk-cb-theme-2x2-grid",role:"dialog","aria-label":"Theme selector",ref:y=>{y&&(y.inert=!Qt||Qa)},children:tn.map(({id:y,label:q,Icon:me})=>Ur("button",{type:"button",className:ne("hsk-cb-theme-grid-item",(mh??dr)===y&&"is-active"),onClick:Te=>{Te.stopPropagation(),ks(y,!0)},children:[Ke(me,{}),Ke("span",{children:q})]},y))}),Ur("button",{type:"button",className:"hsk-cb-theme-squircle-trigger",onClick:()=>{if(Qt){na();return}bh(dr),ta(!0)},"aria-label":"Themes","aria-expanded":Qt,children:[Ke("span",{className:"hsk-cb-theme-trigger-icon",children:Xn.createElement(vo(dr).Icon)}),Ke("span",{className:"hsk-cb-theme-trigger-label",children:vo(dr).label})]})]}),Ke(Go,{wide:Mn.wide,onToggle:()=>{Mn.toggle()}})]}),ws==="converse"&&Ke(yl,{siteId:C?.api?.siteId??"",themeAttr:Kr,stopVoice:lh,chooseVoice:sh,liveVoiceName:oh,voiceSecondsLeft:nh,voiceConnecting:eh,voicePhase:Cs,live:Ms,earlier:ph,newVoiceChat:dh,voiceMuted:th,setVoiceMuted:rh,voiceError:Ya,attachPhoto:uh,onSelectSource:y=>{i?.(y),Ms.ask(Ce("cardClickQuery",{name:y.name,details:no(Ot(y,b))}))},t:Ce}),Cn&&Ke(Rl,{msg:Cn.msg,rect:Cn.rect,anchorEl:Cn.el,containerEl:ea.current,scrollEl:Tr.current,containerRect:ea.current?.getBoundingClientRect(),isUser:Cn.isUser,isRTL:Z,canRetry:!z&&!S,onPin:Yl,onRetry:Zn,onCopy:async y=>{if(!y)return!1;try{return await navigator.clipboard.writeText(y),!0}catch{}try{let q=document.createElement("textarea");q.value=y,q.setAttribute("readonly",""),q.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild(q),q.select(),q.setSelectionRange(0,y.length);let me=document.execCommand("copy");return document.body.removeChild(q),me}catch{return!1}},onClose:()=>ys(null),t:Ce})]})})})}import{Fragment as Ll,jsx as ds,jsxs as us}from"react/jsx-runtime";function sm({label:e="Ask AI",children:r,icon:t,title:n,logo:a,placeholder:o,backdropColor:i,backdropBlur:c,className:s,onSelectSource:l,chips:h,theme:d,classNames:p={},enableVoice:u=!1,voiceLang:f,ttsVoice:C,enableVision:b=!1}){let L=om(),[x,z]=Ua(!1),[S,w]=Ua(!1),[_,F]=Ua(null),[T,U]=Ua(0);El(()=>{if(x){U(0);return}let J=!0;return L?.api?.unreadFromTeam?.().then(W=>{J&&U(W)}).catch(()=>{}),()=>{J=!1}},[x,L]);let M=ps(()=>{oo();try{ni(L,L?.getShopperLanguage?.()??"",Lt),L?.api?.widgetSettings?.().then(J=>{J?.detectedLanguage&&J.detectedLanguage.toLowerCase()!=="english"&&uo(L,J.detectedLanguage,Lt)}).catch(()=>{})}catch{}},[L]),I=nm(null),$=ps(()=>{let J=I.current?.getBoundingClientRect();F(J?{x:J.left+J.width/2,y:J.top+J.height/2}:null),z(!0),M();try{mr()}catch{}},[M]);El(()=>{if(w(!0),M(),typeof window<"u"&&!window.__akropolys_nav_patched){window.__akropolys_nav_patched=!0;let W=window.location.pathname,he=window.history.pushState,Y=window.history.replaceState;window.history.pushState=function(...D){he.apply(this,D),window.location.pathname!==W&&(W=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))},window.history.replaceState=function(...D){Y.apply(this,D),window.location.pathname!==W&&(W=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))}}let J=()=>{z(!1)};return window.addEventListener("popstate",J),window.addEventListener("akropolys:navigation",J),()=>{window.removeEventListener("popstate",J),window.removeEventListener("akropolys:navigation",J)}},[M]);let P=ps(()=>{z(!1),requestAnimationFrame(()=>I.current?.focus())},[]),{themeAttr:Q,vars:de}=ca(d);return la(d),us(Ll,{children:[us("button",{ref:I,className:ne("hsk-cb-btn",p.button,s),onClick:$,onPointerEnter:M,onPointerDown:M,style:de,"data-hsk-theme":Q,"aria-label":"Open AI chat","aria-haspopup":"dialog","aria-expanded":x,children:[r!==void 0?r:us(Ll,{children:[t?ds("span",{className:"hsk-cb-btn-icon",style:{display:"flex",alignItems:"center"},children:t}):null,e]}),T>0&&ds("span",{className:"hsk-cb-btn-badge","aria-label":`${T} new replies`,children:T})]}),x&&S&&am(ds(hs,{title:n,logo:a,placeholder:o,backdropColor:i,backdropBlur:c,origin:_,onClose:P,onSelectSource:l,chips:h??Rn,theme:d,classNames:p,enableVoice:u,voiceLang:f,enableVision:b,ttsVoice:C}),oo()??document.body)]})}export{sm as KikuButton,jh as SearchBar};
|
|
37
|
+
`)&&t[t.length-1].trim().startsWith("|")&&t.pop();let l=t.length-1;for(;l>=0&&t[l].trim().startsWith("|");)l--;l++,l<t.length&&!t.slice(l).some(h=>Su.test(h))&&(t.length=l)}let n=(l,h)=>qa(l,r&&h===t.length-1?15:1),a=[],o=[],i=0,c=()=>{o.length>0&&(a.push(nt("div",{className:"hsk-cb-ai-text",children:o},`text-bubble-${i++}`)),o=[])},s=0;for(;s<t.length;){let l=t[s],h=`md-line-${s}`;if(!l.trim()){s++;continue}let p=l.trim().match(/^!\[([^\]]*)\]\(([^)]+)\)$/);if(p){c();let u=p[1],f=p[2];vl(f)&&a.push(nt("div",{className:"hsk-markdown-img-block",children:nt("img",{src:f,alt:u||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:C=>{C.target.style.display="none"}})},h)),s++;continue}let d=l.match(/^(#{1,3})\s+(.*)/);if(d){let u=d[1].length,f=`h${u+3}`;o.push(nt(f,{className:`hsk-markdown-h${u}`,dir:n(d[2],s),children:br(d[2],h)},h)),s++;continue}if(l.match(/^[\s]*[-*+•]\s+/)){let u=[],f="";for(;s<t.length&&t[s].match(/^[\s]*[-*+•]\s+/);){let C=t[s].replace(/^[\s]*[-*+•]\s+/,"");f+=C+" ",u.push(nt("li",{children:br(C,`li-${s}`)},`li-${s}`)),s++}o.push(nt("ul",{className:"hsk-markdown-list hsk-markdown-ul",dir:n(f,s-1),children:u},`ul-${h}`));continue}if(l.match(/^[\s]*\d+[\.\)]\s+/)){let u=[],f="";for(;s<t.length&&t[s].match(/^[\s]*\d+[\.\)]\s+/);){let C=t[s].replace(/^[\s]*\d+[\.\)]\s+/,"");f+=C+" ",u.push(nt("li",{children:br(C,`li-${s}`)},`li-${s}`)),s++}o.push(nt("ol",{className:"hsk-markdown-list hsk-markdown-ol",dir:n(f,s-1),children:u},`ol-${h}`));continue}if(kl(l,!1)){c();let u=[],f=[],C=[],b=!0;for(;s<t.length&&kl(t[s],!0);){let w=t[s].trim();if(w.match(/^\|?[-:| ]+\|?$/)&&w.includes("-")){C=gl(w).map(S=>{let O=S.trim(),v=O.startsWith(":"),I=O.endsWith(":");return v&&I?"center":I?"end":"start"}),s++,b=!1;continue}let D=gl(w);b&&u.length===0?u=D:f.push(D),s++}let E=Math.max(u.length,...f.map(w=>w.length)),x=[];for(let w=0;w<E;w++)if(C[w])x[w]=C[w];else if(w===0)x[w]="start";else{let D=f.filter(H=>{let S=(H[w]||"").trim();return/^[\$€£¥+-]?\d+([.,]\d+)?%?$/.test(S)||/^[\$€£¥+-]?\d+([.,]\d+)?\s*(bps|M|K|B)?$/i.test(S)}).length;x[w]=D>=Math.ceil(f.length/2)?"end":"start"}let L=u.length>0?nt("tr",{children:u.map((w,D)=>nt("th",{style:{textAlign:x[D]||"start"},children:nt("bdi",{children:br(w,`th-${h}-${D}`)})},`th-${h}-${D}`))},`tr-head-${h}`):null,M=f.map((w,D)=>nt("tr",{children:w.map((H,S)=>nt("td",{className:H.trim().startsWith("\u2713")?"hsk-md-ok":H.trim().startsWith("\u2717")?"hsk-md-bad":void 0,style:{textAlign:x[S]||"start"},children:nt("bdi",{children:br(H,`td-${h}-${D}-${S}`)})},`td-${h}-${D}-${S}`))},`tr-body-${h}-${D}`));a.push(nt(Mu,{children:Ru("table",{className:"hsk-markdown-table",children:[L&&nt("thead",{children:L}),nt("tbody",{children:M})]})},`table-wrapper-${h}`));continue}o.push(nt("p",{className:"hsk-markdown-p",dir:n(l,s),children:br(l,h)},h)),s++}return c(),nt(Lu,{children:a})}import{useEffect as wl,useState as Eu}from"react";import{describeAge as Cl,getLiveValue as zu,isFresh as Nu,isStale as Iu,labelFor as Au,formatLiveValue as Pu,subscribeLiveValues as _u,LIVE_FLASH_MS as Fu}from"@akropolys/sdk";import{jsx as Zt,jsxs as ls}from"react/jsx-runtime";function Du(e){let[,r]=Eu(0),t=JSON.stringify(e);return wl(()=>_u(n=>{e.includes(n)&&r(a=>a+1)}),[t]),wl(()=>{let n=setInterval(()=>r(a=>a+1),1e3);return()=>clearInterval(n)},[]),e.map(zu)}var Hu=["title","name","label","headline","subject"],Bu=8,$u=40;function qu({record:e,now:r}){let t=Iu(e,r),n=e.fields,a=Hu.find(s=>n[s]),o=a?n[a]:e.key,i=o.length>38?o.slice(0,36)+"\u2026":o,c=Object.entries(n).filter(([s,l])=>s!==a&&l!==""&&l.length<=$u&&!/^[0-9a-fA-F-]{26,}$/.test(l)).slice(0,Bu).map(([s,l])=>({label:Au(s),value:Pu(l),rawKey:s}));return ls("div",{className:`hsk-live-card${t?" is-stale":""}`,role:"region","aria-label":"Live values",children:[Zt("div",{className:"hsk-live-card__top",children:ls("div",{className:"hsk-live-card__badge",children:[Zt("span",{className:`hsk-live-dot${t?" is-stale":""}`,"aria-hidden":"true"}),Zt("span",{className:"hsk-live-card__age",children:t?`Paused \xB7 ${Cl(r-e.at)}`:`Live \xB7 ${Cl(r-e.at)}`})]})}),Zt("div",{className:"hsk-live-card__body",children:Zt("span",{className:"hsk-live-card__title",title:o,children:i})}),Zt("div",{className:"hsk-live-card__pills",children:c.map(s=>{let l=Nu(e,s.rawKey,r);return ls("div",{className:`hsk-live-pill${l?" is-changed":""}`,style:l?{animationDuration:`${Fu}ms`}:void 0,children:[Zt("span",{className:"hsk-live-pill__label",children:s.label}),Zt("span",{className:"hsk-live-pill__value",children:s.value})]},s.rawKey)})})]})}function Sl({keys:e}){let r=new Set,t=(e??[]).filter(c=>r.has(c)?!1:(r.add(c),!0)),n=Du(t);if(t.filter((c,s)=>n[s]).length===0)return null;let o=n.filter(c=>!!c),i=Date.now();return Zt("div",{className:"hsk-live-wrap",role:"group","aria-label":"Live data",children:Zt("div",{className:"hsk-live-carousel",children:o.map(c=>Zt(qu,{record:c,now:i},c.key))})})}import{useState as Ou}from"react";import{normalizeEntityImages as Uu}from"@akropolys/sdk";import{jsx as Oa,jsxs as Ml}from"react/jsx-runtime";function Tl({source:e,onImageClick:r}){let t=Uu(e.images??e.fields?.images,e.image,e.url),[n,a]=Ou(!1),o=e.image||t[0]?.url;if(!o)return Oa("div",{className:"hsk-cb-src-imgwrap-empty",children:Oa(ur,{})});let i=c=>{if(c.stopPropagation(),!r)return;let s=Math.max(0,t.findIndex(l=>l.url===o));t.length>1?r(o,{images:t.map(l=>({url:l.url,caption:l.caption,alt:l.alt})),index:s,title:e.name}):r(o)};return Ml("button",{type:"button",className:"hsk-cb-src-imgwrap hsk-gallery-cover","aria-label":t.length>1?`View ${t.length} images of ${e.name}`:`View image of ${e.name}`,onClick:i,children:[n?Oa(ur,{}):Oa("img",{src:o,alt:t.find(c=>c.url===o)?.alt||e.name,loading:"lazy",onError:()=>a(!0)}),t.length>1&&Ml("span",{className:"hsk-gallery-count",children:[Math.max(0,t.findIndex(c=>c.url===o))+1," / ",t.length]})]})}import{useState as hs,useRef as Wu,useEffect as Vu,useCallback as Gu}from"react";import{normalizeEntityImages as Rl,useCardFields as ju}from"@akropolys/sdk";import{Fragment as ps,jsx as xt,jsxs as Yr}from"react/jsx-runtime";function Ua({sources:e,onSelectSource:r,onImageClick:t,referencedIds:n=[],compact:a=!1,targetLabel:o="Your colour"}){let i=ju(),c=Wu(null),[s,l]=hs(!1),[h,p]=hs(!1),[d,u]=hs(0),f=e.filter(S=>S.id&&n.includes(S.id)),C=f.filter(S=>S.swatch),b=f.filter(S=>!S.swatch),E=b.length===1,x=E?b.flatMap(S=>{let O=Rl(S.images??S.fields?.images,S.image,S.url);return O.length?O.map((v,I)=>({source:S,image:v,photoIndex:I,totalPhotos:O.length})):[{source:S,image:void 0,photoIndex:0,totalPhotos:0}]}):b.map(S=>{let O=Rl(S.images??S.fields?.images,S.image,S.url);return{source:S,image:O[0],photoIndex:0,totalPhotos:O.length}}),L=Gu(()=>{let S=c.current;if(!S||x.length===0)return;let O=Math.abs(S.scrollLeft),v=S.scrollWidth-S.clientWidth;l(O>10),p(v>4&&O<v-12);let q=Math.round(O/190);u(Math.min(Math.max(0,q),x.length-1))},[x.length]);Vu(()=>{L();let S=c.current;if(!S)return;let O=new ResizeObserver(L);return O.observe(S),S.addEventListener("scroll",L,{passive:!0}),()=>{O.disconnect(),S.removeEventListener("scroll",L)}},[L,e]);let M=S=>{let O=c.current;if(!O)return;let v=getComputedStyle(O).direction==="rtl";O.scrollBy({left:190*S*(v?-1:1),behavior:"smooth"})},w=()=>M(1),D=()=>M(-1);if(x.length===0&&C.length===0)return null;let H=C.length>0&&xt("div",{className:"hsk-cb-swatch-grid",children:C.map((S,O)=>Yr("button",{type:"button",className:se("hsk-cb-swatch",S.target&&"hsk-cb-swatch--target"),style:{animationDelay:`${O*40}ms`},onClick:S.target?void 0:()=>r?.(S),children:[xt("span",{className:"hsk-cb-swatch-chip",style:{background:S.swatch}}),xt("span",{className:"hsk-cb-swatch-name",children:S.target?o:S.name}),xt("span",{className:"hsk-cb-swatch-code",children:S.swatch})]},S.id??S.url??O))});return x.length===0?H||null:Yr(ps,{children:[H,Yr("div",{className:se("hsk-cb-sources-wrap",a&&"hsk-cb-sources-wrap--compact"),children:[s&&Yr(ps,{children:[xt("div",{className:"hsk-cb-sources-fade-left"}),xt("button",{className:"hsk-cb-sources-prev",onClick:D,"aria-label":"Previous",children:xt(on,{})})]}),xt("div",{className:"hsk-cb-sources",ref:c,children:x.map(({source:S,image:O,photoIndex:v,totalPhotos:I},q)=>{let P=!!(S.id&&n.includes(S.id));return Yr("div",{className:se("hsk-cb-source",P&&"hsk-cb-source--referenced"),style:{animationDelay:`${q*50}ms`},onClick:()=>r?.(S),children:[xt(Tl,{source:E&&O?{...S,image:O.url,images:[O]}:S,onImageClick:t}),Yr("div",{className:"hsk-cb-src-info",children:[xt("div",{className:"hsk-cb-src-name",children:S.name}),E&&O?.caption?xt("div",{className:"hsk-cb-src-detail",children:O.caption}):E&&I>1?xt("div",{className:"hsk-cb-src-detail",children:`Photo ${v+1} of ${I}`}):null,Kt(S,i).slice(0,2).map(J=>xt("div",{className:"hsk-cb-src-detail",children:J.value},J.label))]})]},`${S.id??S.url??q}:${O?.url??v}`)})}),h&&Yr(ps,{children:[xt("div",{className:"hsk-cb-sources-fade-right"}),xt("button",{className:"hsk-cb-sources-next",onClick:w,"aria-label":"See more",children:xt(sn,{})})]}),x.length>1&&xt("div",{className:"hsk-cb-carousel-dots",children:x.map((S,O)=>xt("div",{className:se("hsk-cb-dot-item",O===d&&"hsk-cb-dot-item--active"),onClick:()=>{let v=c.current;if(v){let I=getComputedStyle(v).direction==="rtl";v.scrollTo({left:O*190*(I?-1:1),behavior:"smooth"})}}},O))})]})]})}import{jsx as Ll,jsxs as Yu}from"react/jsx-runtime";function El({intent:e,sources:r,onSend:t,loading:n}){let a=Gt();if(!e)return null;let o=[],i=r[0]?.name??"",c=r.slice(0,2).map(s=>s.name);if(e==="search"&&r.length>0){if(c.length>=2&&o.push({emoji:"\u2696\uFE0F",label:a("pillCompareTop2"),query:a("pillCompareTop2Query",{a:c[0],b:c[1]})}),i){let s=i.split(" ").slice(0,3).join(" ");o.push({emoji:"\u{1F4A1}",label:a("pillMoreOn",{name:s}),query:a("pillMoreOnQuery",{name:i})})}}else e==="compare"&&r.length>0?(i&&o.push({emoji:"\u{1F50D}",label:a("pillSimilarOptions"),query:a("pillSimilarOptionsQuery",{name:i})}),o.push({emoji:"\u{1F4A1}",label:a("pillWhichBest"),query:a("pillWhichBestQuery")})):e==="specs"&&r.length>0?i&&o.push({emoji:"\u{1F504}",label:a("pillFindAlternatives"),query:a("pillFindAlternativesQuery",{name:i})}):e==="general"&&(o.push({emoji:"\u{1F50D}",label:a("pillShowPopular"),query:a("pillShowPopularQuery")}),o.push({emoji:"\u{1F4A1}",label:a("pillRecommend"),query:a("pillRecommendQuery")}));return o.length===0?null:Ll("div",{className:"hsk-action-pills",children:o.map(s=>Yu("button",{className:"hsk-action-pill",onClick:()=>t(s.query),disabled:n,children:[Ll("span",{className:"hsk-pill-emoji",children:s.emoji}),s.label]},s.query))})}import{Fragment as ds,jsx as Me,jsxs as We}from"react/jsx-runtime";var zl=Et.memo(({content:e,streaming:r,hosts:t})=>Me(ds,{children:yl(e,r,new Set(t.split(",")))}),(e,r)=>e.content===r.content&&e.streaming===r.streaming&&e.hosts===r.hosts);zl.displayName="MarkdownBlock";function Xu(e){let r=new Set;for(let t of e)if(t)try{r.add(new URL(t,location.href).host)}catch{}return[...r].sort().join(",")}function Qu(e,r){Et.useLayoutEffect(()=>{let t=e.current;if(!t)return;let n=()=>{t.style.width="";let i=document.createRange();i.selectNodeContents(t);let c=Array.from(i.getClientRects()),s=t.getBoundingClientRect();if(!c.length||!t.offsetWidth||!s.width)return;let l=s.width/t.offsetWidth,h=getComputedStyle(t),p=parseFloat(h.paddingLeft)+parseFloat(h.paddingRight)+parseFloat(h.borderLeftWidth)+parseFloat(h.borderRightWidth),d=Math.max(...c.map(f=>f.right))-Math.min(...c.map(f=>f.left)),u=Math.ceil(d/l)+1;u+p<t.offsetWidth&&(t.style.width=`${h.boxSizing==="border-box"?u+p:u}px`)};n(),document.fonts?.ready.then(n).catch(()=>{});let a=t.closest(".hsk-cb-msg-group");if(!a||typeof ResizeObserver>"u")return;let o=new ResizeObserver(n);return o.observe(a),()=>o.disconnect()},[e,r])}function Nl({msg:e,idx:r,isLast:t,isLastUser:n,isRunEnd:a,runMid:o,runCont:i,isNarrow:c,loading:s,streaming:l,stopped:h,interrupted:p,sources:d,referencedIds:u,discussedSources:f,lastIntent:C,lastAction:b,vizState:E,setVizState:x,setLightboxSrc:L,setMarkupSrc:M,handleSend:w,handleSourceClick:D,onRetry:H,onEdit:S,onLongPress:O,hasError:v,retrying:I,t:q,messageRef:P,photosSending:J,workingOn:de,doodleTheme:te}){let W=Ku()?.api,le=W?.siteId??"",X=Xu([W?.apiUrl,...(t?d:e.sources??[]).flatMap(_=>[_.image,_.url])]),F=e.role==="user",$=F?e.content:is(e.content),N=!F&&$!==e.content,[T,A]=Et.useState(!1),j=Et.useRef(null);Qu(j,e.content);let y=Et.useRef(null),z=Et.useRef(null),k=Et.useRef(!1),ie=Et.useCallback(_=>{let ee=F?".hsk-cb-user-bubble":".hsk-cb-ai-body";return _.matches?.(ee)?_:_.querySelector(ee)||_},[F]),ne=Et.useCallback(_=>{z.current&&clearTimeout(z.current),z.current=setTimeout(()=>{if(O){if(typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}let ee=ie(_),ve=ee.getBoundingClientRect();O(F?e:{...e,content:$},{top:ve.top,left:ve.left,width:ve.width,height:ve.height},F,ee),k.current=!0}z.current=null},420)},[e,$,F,O,ie]),U=Et.useCallback(_=>{if(_.touches.length!==1)return;let ee=_.touches[0];y.current={x:ee.clientX,y:ee.clientY},k.current=!1,ne(_.currentTarget)},[ne]),oe=Et.useCallback(_=>{if(!y.current||!z.current)return;let ee=_.touches[0];Math.hypot(ee.clientX-y.current.x,ee.clientY-y.current.y)>8&&(clearTimeout(z.current),z.current=null)},[]),m=Et.useCallback(_=>{z.current&&(clearTimeout(z.current),z.current=null),y.current=null,k.current&&_.cancelable&&_.preventDefault()},[]),R=Et.useCallback(_=>{if(!O||(_.preventDefault(),k.current))return;let ee=ie(_.currentTarget),ve=ee.getBoundingClientRect();O(F?e:{...e,content:$},{top:ve.top,left:ve.left,width:ve.width,height:ve.height},F,ee)},[e,$,F,O,ie]);Et.useEffect(()=>()=>{z.current&&clearTimeout(z.current)},[]);let V=Et.useCallback(_=>{if(_)try{navigator.clipboard.writeText(_),A(!0),setTimeout(()=>A(!1),2e3)}catch{}},[]),Q=Et.useMemo(()=>Gr($),[$]),G=is(e.thinking||Q.thinking),ae=/(?:^|\n+)(?:[>*_~`\s]*)(?:This is a calculation from live figures,?\s*not a guarantee\s*[—–-]\s*the market can move against it\.?)(?:[>*_~`\s]*)/gi,be=ae.test(Q.content),ce=be?Q.content.replace(ae,"").trimEnd():Q.content;return Me("div",{className:se("hsk-cb-msg-group",o&&"hsk-cb-msg-group--run-mid",i&&"hsk-cb-msg-group--run-cont"),"data-hsk-role":F?"user":"assistant",ref:P,children:F?We("div",{className:`hsk-cb-user-msg${n?" hsk-sent":""}`,children:[e.images&&e.images.length>0&&Me("div",{className:"hsk-cb-user-imgs","data-count":Math.min(e.images.length,4),children:e.images.slice(0,4).map((_,ee)=>We("button",{type:"button",className:"hsk-cb-user-img-cell",onClick:()=>L(_),children:[Me("img",{src:_,alt:`attachment ${ee+1}`,className:"hsk-cb-user-img-thumb"}),Me(pn,{active:J,seed:le,theme:te}),ee===3&&e.images.length>4&&We("span",{className:"hsk-cb-user-img-more",children:["+",e.images.length-3]})]},ee))}),e.content&&We("div",{ref:j,className:se("hsk-cb-user-bubble",a&&"hsk-cb-user-bubble--tail",e.spoken&&"hsk-cb-user-bubble--spoken",v&&"hsk-cb-user-bubble--error"),onTouchStart:U,onTouchMove:oe,onTouchEnd:m,onTouchCancel:m,onContextMenu:R,dir:qa(e.content.replace(/^@kiku\s*/i,"")),children:[e.spoken&&Me(Fn,{className:"hsk-cb-spoken-mark",size:10}),/^@kiku\b/i.test(e.content)?We(ds,{children:[Me("span",{className:"hsk-kiku-badge",children:"@kiku"}),e.content.replace(/^@kiku\s*/i,"")]}):e.content]}),a&&We("div",{className:"hsk-cb-user-footer",children:[We("div",{className:"hsk-cb-msg-actions",children:[H&&(v||n)&&We("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>H(e),"aria-label":q("retry"),children:[Me(_n,{className:I?"hsk-retry-icon--spinning":"",size:11}),Me("span",{className:"hsk-cb-msg-action-label",children:q("retry")})]}),S&&We("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--edit",onClick:()=>S(e),"aria-label":q("edit"),children:[Me(va,{size:11}),Me("span",{className:"hsk-cb-msg-action-label",children:q("edit")})]}),We("button",{type:"button",className:se("hsk-cb-msg-action hsk-cb-msg-action--copy",T&&"hsk-cb-msg-action--copied"),onClick:()=>V(e.content),"aria-label":q(T?"copied":"copy"),children:[T?Me(_r,{size:11}):Me(Pr,{size:11}),Me("span",{className:"hsk-cb-msg-action-label",children:q(T?"copied":"copy")})]})]}),n&&!v&&Me("span",{className:"hsk-cb-sent-status",children:q(h||p?"statusStopped":"statusSent")}),v&&We("span",{className:"hsk-cb-failed-notice",children:[Me("span",{className:"hsk-cb-failed-dot"}),q("msgFailed")]})]})]}):Me("div",{className:se("hsk-cb-ai-msg",c&&"hsk-cb-ai-msg--inline"),children:We("div",{className:"hsk-cb-ai-body",onTouchStart:U,onTouchMove:oe,onTouchEnd:m,onTouchCancel:m,onContextMenu:R,children:[(()=>{let _=e.thoughtForSeconds!=null||ce.length>0||!(t&&(l||s));return We(ds,{children:[!e.spoken&&(G||e.thoughtForSeconds!=null||e.repliedSeconds!=null||jr(e.statusStage)||t&&(l||s))&&Me(ml,{text:G,isComplete:_,seconds:e.thoughtForSeconds,stage:e.statusStage,repliedSeconds:e.repliedSeconds}),e.spoken&&typeof e.thoughtForSeconds=="number"&&e.thoughtForSeconds>0&&Me("div",{className:"hsk-cb-think",children:We("span",{className:"hsk-cb-think-head hsk-cb-think-head--static",children:[Me(Fn,{size:11}),We("span",{children:["spoken \xB7 ",e.thoughtForSeconds.toFixed(1),"s"]})]})}),!ce&&N&&!(t&&(l||s))&&Me("p",{className:"hsk-cb-ai-content",children:q("errStreamInterrupted")}),ce&&Me("div",{className:"hsk-cb-ai-content",children:Me(zl,{content:ce,streaming:t&&l,hosts:X})}),be&&Me("div",{className:"hsk-cb-calc-disclaimer",children:q("calcDisclaimer")})]})})(),e.visualizing&&Me("div",{className:"hsk-cb-viz",children:We("div",{className:se("hsk-cb-viz--working",!de&&"is-blank",e.visualizationType==="video"&&"is-video"),role:"status","aria-label":e.visualizingText||q("vizWorking"),children:[de&&Me("img",{src:de,alt:""}),Me(pn,{active:!0,seed:le,theme:te})]})}),e.visualization&&We("div",{className:"hsk-cb-viz",children:[We("div",{className:"hsk-cb-viz-imgwrap",children:[e.visualizationType==="video"||e.visualization.includes("/videos/")?Me("video",{src:e.visualization,controls:!0,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"hsk-markdown-video",style:{display:"block",maxHeight:"400px",objectFit:"contain",width:"100%"}}):Me("img",{src:e.visualization,alt:"Product visualized in your photo",className:"hsk-markdown-img",style:E[e.visualization]==="err"?{display:"none"}:void 0,onLoad:()=>x(_=>({..._,[e.visualization]:"ok"})),onError:()=>x(_=>({..._,[e.visualization]:"err"}))}),E[e.visualization]==="err"&&Me("div",{className:"hsk-cb-viz-broken",children:q("vizUnavailable")}),t&&!l&&E[e.visualization]==="ok"&&e.visualizationType!=="video"&&!e.visualization.includes("/videos/")&&We("button",{className:"hsk-cb-viz-mark",onClick:()=>M(e.visualization),children:[We("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[Me("path",{d:"M12 20h9"}),Me("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z"})]}),q("vizMarkEdit")]})]}),Me("div",{className:"hsk-cb-viz-disclaimer",children:e.visualizationType==="video"||e.visualization.includes("/videos/")?q("vizDisclaimerVideo"):q("vizDisclaimerImage")})]}),!F&&(e.knowledgeImages?.length??0)>0&&Me("div",{className:"hsk-cb-kimgs",children:e.knowledgeImages.map(_=>We("div",{className:"hsk-cb-kimg-group",children:[Me("div",{className:"hsk-cb-kimg-grid",children:_.images.map((ee,ve)=>Me("img",{src:ee.url,alt:ee.note||_.title||"Reference image",className:"hsk-cb-kimg",loading:"lazy",onClick:()=>L(ee.url),onError:Ie=>{Ie.target.style.display="none"}},ve))}),(_.title||_.images[0]?.note)&&Me("div",{className:"hsk-cb-kimg-caption",children:_.title||_.images[0]?.note})]},_.entryId))}),!F&&Me(Sl,{keys:e.liveKeys}),!F&&(e.staleNotices?.length??0)>0&&We("div",{className:"hsk-cb-stale",role:"status",children:[Me("div",{className:"hsk-cb-stale-title",children:q("staleTitle")}),e.staleNotices.map((_,ee)=>We("div",{className:"hsk-cb-stale-item",children:[_.state==="removed"?q("staleRemoved",{title:_.title}):q("staleUnavailable",{title:_.title}),_.reason&&We("span",{className:"hsk-cb-stale-reason",children:[" ",_.reason]})]},ee))]}),(()=>{let _=t&&(s||l),ee=_?u:e.referencedIds??[],ve=_?d:e.sources??[],Ie=t?C:e.intent,fe=Ie==="compare"||Ie==="capture"||Ie==="capture_all"||Ie==="delete"||Ie==="view_history";return ee.length>0&&!fe&&(!t||b?.type!=="request_kiku_key")&&Me(Ua,{sources:ve,onSelectSource:D,onImageClick:L,referencedIds:ee,compact:!!e.visualization,targetLabel:q("swatchTarget")})})(),t&&!s&&!l&&b?.type==="open_memory"&&Yn(b.url)&&We("a",{className:"hsk-cb-memory-pill",href:Yn(b.url),target:"_blank",rel:"noopener noreferrer",children:[q("openMemory"),Me(_i,{})]}),t&&!s&&Yn(b?.url)&&b?.type!=="open_memory"&&Me("div",{className:"hsk-action-pills",children:We("a",{className:"hsk-action-pill",href:Yn(b?.url),children:[String(b?.type||"continue").replace(/_/g," ")," \u2192"]})}),t&&!s&&Me(El,{intent:C,sources:f,onSend:w,loading:s}),!F&&a&&!l&&ce&&Me("div",{className:"hsk-cb-ai-footer",children:We("div",{className:"hsk-cb-msg-actions",children:[We("button",{type:"button",className:se("hsk-cb-msg-action hsk-cb-msg-action--copy",T&&"hsk-cb-msg-action--copied"),onClick:()=>V(ce),"aria-label":q(T?"copied":"copy"),children:[T?Me(_r,{size:11}):Me(Pr,{size:11}),Me("span",{className:"hsk-cb-msg-action-label",children:q(T?"copied":"copy")})]}),t&&(v||ce.includes("We're experiencing high demand right now"))&&H&&We("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>H(e),"aria-label":q("retry"),children:[Me(_n,{className:I?"hsk-retry-icon--spinning":"",size:11}),Me("span",{className:"hsk-cb-msg-action-label",children:q("retry")})]})]})})]})})})}import{jsx as Mt,jsxs as fr}from"react/jsx-runtime";function Il({keyInput:e,setKeyInput:r,minting:t,handleUseExistingKey:n,handleCreateKey:a,t:o}){return fr("div",{className:"hsk-cb-ai-msg",children:[Mt("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:Mt(ur,{})}),Mt("div",{className:"hsk-cb-ai-body",children:Mt("div",{className:"hsk-cb-ai-text",children:fr("div",{className:"hsk-cb-phone-form",children:[Mt("label",{className:"hsk-cb-phone-label",children:o("keyPastePrompt")}),Mt("input",{type:"text",className:"hsk-cb-phone-input",placeholder:o("keyPastePlaceholder"),value:e,onChange:i=>r(i.target.value),onKeyDown:i=>i.key==="Enter"&&n(),autoFocus:!0}),fr("div",{style:{display:"flex",gap:8},children:[Mt("button",{className:"hsk-cb-phone-submit",onClick:n,disabled:!e.trim(),children:o("keyUseMine")}),Mt("button",{className:"hsk-cb-phone-submit",onClick:a,disabled:t,children:o(t?"keyCreating":"keyCreateNew")})]})]})})})]})}function Al({mintedKey:e,copied:r,keyCountdown:t,onDismiss:n,copyValue:a,t:o}){return fr("div",{className:"hsk-cb-ai-msg",children:[Mt("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:Mt(ur,{})}),Mt("div",{className:"hsk-cb-ai-body",children:fr("div",{className:"hsk-cb-secret-card",children:[fr("div",{className:"hsk-cb-secret-head",children:[Mt("span",{className:"hsk-cb-secret-title",children:o("keySecretTitle")}),fr("span",{className:"hsk-cb-secret-timer",children:[t,"s"]}),Mt("button",{type:"button",className:"hsk-cb-secret-dismiss",onClick:n,"aria-label":o("keyDismiss"),children:"\xD7"})]}),fr("button",{type:"button",className:"hsk-cb-secret-key",onClick:()=>a(e,"secret"),children:[Mt("code",{children:e}),fr("span",{className:"hsk-cb-secret-copy",children:[r==="secret"?Mt(_r,{}):Mt(Pr,{}),o(r==="secret"?"keyCopied":"keyCopySecret")]})]}),Mt("span",{className:"hsk-cb-secret-hint",children:o("keySecretHint")})]})})]})}import{Fragment as em,jsx as Bt,jsxs as Kr}from"react/jsx-runtime";function Zu(e,r){for(let t=r-1;t>=0;t--){let n=e[t];if(n.visualization&&n.visualizationType!=="video")return n.visualization;if(n.images?.length)return n.images[n.images.length-1]}}function Pl({displayMessages:e,messageRefs:r,isNarrow:t,loading:n,streaming:a,sources:o,referencedIds:i,discussedSources:c,lastIntent:s,lastAction:l,stopped:h,interrupted:p,halted:d,haltedEmpty:u,error:f,errorCode:C,keyPhase:b,keyInput:E,setKeyInput:x,mintedKey:L,setMintedKey:M,setMintedPub:w,minting:D,copied:H,keyCountdown:S,handleUseExistingKey:O,handleCreateKey:v,copyValue:I,queuedMessage:q,sendQueuedNow:P,setLightboxSrc:J,setMarkupSrc:de,handleSend:te,handleSourceClick:W,onRetry:le,onEdit:X,onLongPress:F,retrying:$,continueGenerating:N,t:T,spacerRef:A,vizState:j,setVizState:y,messages:z,doodleTheme:k,afterReply:ie}){return Kr(em,{children:[(()=>{let ne=-1;for(let U=e.length-1;U>=0;U--)if(e[U]?.role==="user"){ne=U;break}return e.map((U,oe)=>{let m=oe===e.length-1,R=U.role==="user",V=R&&oe===ne,Q=e[oe+1]?.role!==U.role,G=!Q,ae=e[oe-1]?.role===U.role,be=U.id||`${U.role}-${oe}`,ce=e[oe+1]?.content??"",_=V&&(n||a)&&!Gr(ce).content.trim(),ee=U.visualizing?Zu(e,oe):void 0,ve=V&&!!f||!R&&m&&!!f||!R&&!!U.content?.includes("We're experiencing high demand right now");return Kr(Ju.Fragment,{children:[Bt(Nl,{msg:U,idx:oe,isLast:m,isLastUser:V,isRunEnd:Q,runMid:G,runCont:ae,isNarrow:t,loading:n,streaming:a,stopped:h,interrupted:p,sources:o,referencedIds:i,discussedSources:c,lastIntent:s,lastAction:l,vizState:j,setVizState:y,setLightboxSrc:J,setMarkupSrc:de,handleSend:te,handleSourceClick:W,onRetry:le,onEdit:X,onLongPress:F,hasError:ve,retrying:$,t:T,messageRef:Ie=>{r.current[oe]=Ie},photosSending:_,workingOn:ee,doodleTheme:k}),oe===ie?.index&&ie.node]},be)})})(),d&&z.length>0&&Kr("div",{className:se("hsk-cb-stopped",u&&"hsk-cb-stopped--empty"),children:[u&&Kr("span",{className:"hsk-cb-stopped-dots","aria-hidden":"true",children:[Bt("i",{}),Bt("i",{}),Bt("i",{})]}),Bt("span",{className:"hsk-cb-stopped-label",children:T(h?"stoppedByYou":"stoppedInterrupted")}),Kr("button",{className:"hsk-cb-continue",onClick:N,children:[Bt(Fi,{}),T(z[z.length-1]?.role==="assistant"?"continueGenerating":"generateResponse")]})]}),f&&Bt("div",{className:"hsk-cb-error",children:Li({code:C??void 0,message:f},T)}),b==="prompt_key"&&Bt(Il,{keyInput:E,setKeyInput:x,minting:D,handleUseExistingKey:O,handleCreateKey:v,t:T}),L&&Bt(Al,{mintedKey:L,copied:H,keyCountdown:S,onDismiss:()=>{M(null),w(null)},copyValue:I,t:T}),q&&Bt("div",{className:se("hsk-cb-msg-group",e[e.length-1]?.role==="user"&&"hsk-cb-msg-group--run-cont"),children:Kr("div",{className:"hsk-cb-user-msg",children:[Bt("div",{className:"hsk-cb-user-bubble hsk-cb-user-bubble--tail hsk-cb-user-bubble--queued",children:q.content}),Kr("button",{type:"button",className:"hsk-cb-queued-status",onClick:P,children:[Bt("span",{className:"hsk-cb-queued-dot"}),T("queuedWaiting"),Bt("span",{className:"hsk-cb-queued-now",children:T("queuedSendNow")})]})]})}),Bt("div",{ref:A,className:"hsk-cb-msgs-spacer"})]})}import Kn,{useState as Dl,useRef as ms,useEffect as bs}from"react";import{useAkropolysContext as nm,useCardFields as am}from"@akropolys/sdk";import{jsx as _l}from"react/jsx-runtime";var Wa=16,tm=110,rm=/[-ۿ܀-ݏ߀-߿ࡠ-ࣿﭐ-﷿ﹰ-]/;function us(e){if(!e)return[];if(rm.test(e))return e.split(/(\s+)/).filter(Boolean);let r=typeof Intl<"u"?Intl:void 0;if(r?.Segmenter){let t=new r.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e),n=>n.segment)}return e.split(/(\s+)/).filter(Boolean)}function Fl({text:e,placeholder:r,visible:t=!0,replay:n=0,replaySeed:a,staggerMs:o=Wa}){if(!t)return null;let i=e||r||"";if(!i)return null;let c=a!==void 0?a:n,s=i.length>26,l=s?i.match(/\S+\s*/g)??[i]:us(i),h=Math.max(l.length-1,1),p=i.length>44?"3":s?"2":"1";return _l("div",{className:"hsk-animated-placeholder","data-fit":p,dir:"auto","aria-hidden":"true",children:l.map((d,u)=>_l("span",{className:"hsk-animated-placeholder__char",style:{animationDelay:`${tm+u*o}ms`,"--hsk-ph-hue":`${Math.round(u/h*300)}`},children:d},`${i}|${c}|${u}`))})}import{Fragment as fs,jsx as ge,jsxs as ot}from"react/jsx-runtime";function Hl({gooId:e,input:r,setInput:t,showKikuPicker:n,setShowKikuPicker:a,showAtPicker:o,setShowAtPicker:i,captureAllowed:c,discussedSources:s,handleSelectExtension:l,handleKikuCapture:h,handleKikuCaptureAll:p,handleKikuViewHistory:d,handleKikuDelete:u,attachments:f,removeAttachment:C,chromeLoading:b,inputLocked:E,langSwitching:x=!1,imageInputRef:L,handleImageFiles:M,enableVision:w,enableVoice:D,canConverse:H,startVoice:S,voiceBlocked:O,textareaRef:v,classNames:I={},handleInput:q,handleKeyDown:P,voice:J,voicePhase:de,activePlaceholder:te,loading:W,streaming:le,stop:X,handleSend:F,voiceError:$,setVoiceError:N,t:T,rail:A,notice:j,onOpenMimi:y}){let z=nm(),k=am(),[ie,ne]=Kn.useState(0),[U,oe]=Kn.useState(!1);Kn.useEffect(()=>{if(!$)return;let fe=setTimeout(()=>{N?.("")},6e3);return()=>clearTimeout(fe)},[$,N]);let m=Kn.useRef(null);Kn.useEffect(()=>{if(!U)return;let fe=Ne=>{Ne.key==="Escape"&&oe(!1)},Se=Ne=>{let Te=Ne.composedPath?Ne.composedPath():[],Fe=Ne.target?.closest?.(".hsk-cb-tools-toggle")||Te.some(Ge=>Ge?.classList?.contains?.("hsk-cb-tools-toggle")),Oe=m.current&&(Te.includes(m.current)||m.current.contains(Ne.target));Fe||Oe||oe(!1)};return window.addEventListener("keydown",fe),document.addEventListener("mousedown",Se),document.addEventListener("touchstart",Se,{passive:!0}),()=>{window.removeEventListener("keydown",fe),document.removeEventListener("mousedown",Se),document.removeEventListener("touchstart",Se)}},[U]);let R=te||"Ask me anything\u2026",V=ms(null),[Q,G]=Dl(()=>R.length>26);bs(()=>{let fe=V.current;if(!fe||r)return;let Se=()=>{let Te=fe.querySelectorAll(".hsk-animated-placeholder__char");if(Te.length<2)return G(!1);let he=Te[0].offsetTop,Fe=Te[Te.length-1].offsetTop;G(Fe-he>Te[0].offsetHeight/2)};Se();let Ne=new ResizeObserver(Se);return Ne.observe(fe),()=>Ne.disconnect()},[R,r]);let ae=Math.max(us(R).length-1,0)*Wa,[be,ce]=Dl(!1),_=ms(null),ee=()=>{_.current&&clearTimeout(_.current),ce(!0),_.current=setTimeout(()=>{ce(!1),_.current=null},550)};bs(()=>()=>{_.current&&clearTimeout(_.current)},[]);let ve=ms(null),Ie=!!j;return bs(()=>{ve.current?.toggleAttribute("inert",Ie)},[Ie]),ot("div",{className:"hsk-cb-input-wrap","data-tools-open":U?"true":void 0,children:[U&&ot(fs,{children:[ge("div",{className:"hsk-cb-toolsheet-scrim",onClick:()=>oe(!1),"aria-hidden":"true"}),ge("div",{className:"hsk-cb-toolsheet-wrap",ref:m,children:ot("div",{className:"hsk-cb-toolsheet",role:"menu",children:[w&&ot("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{oe(!1),L.current?.click()},disabled:W,children:[ge(Lo,{}),ge("span",{children:T("attachImage")})]}),D&&H&&ot("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{oe(!1),O?N?.(T("errAccountRequired")):S("converse")},disabled:W||b,children:[ge(Eo,{}),ge("span",{children:T("voiceModeStart")})]}),y&&ot("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{oe(!1),y()},children:[ge(Bi,{}),ge("span",{children:"MiMi"})]})]})})]}),j,ot("div",{className:"hsk-cb-input-card",ref:ve,children:[(/^@kiku\b/i.test(r)||n||o)&&ot("div",{className:"hsk-cb-docked-header",children:[ge("span",{className:"hsk-cb-docked-sub",children:T("captureAndRemember")}),ge("button",{type:"button",className:"hsk-cb-docked-close",onClick:()=>{t(fe=>fe.replace(/^@kiku\s*/i,"")),a(!1),i(!1)},"aria-label":"Close mode",children:"\xD7"})]}),(n||o)&&ot("div",{className:"hsk-cb-docked-options",onMouseDown:fe=>fe.preventDefault(),children:[o&&c&&ot("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>l("@kiku"),children:[ge("span",{className:"hsk-cb-docked-option-icon",children:ge(ur,{})}),ge("span",{className:"hsk-cb-docked-option-title",children:"kiku"}),ge("span",{className:"hsk-cb-docked-option-desc",children:"capture & remember"})]}),n&&c&&ot(fs,{children:[s.map((fe,Se)=>ot("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h(fe),a(!1)},children:[ge("span",{className:"hsk-cb-docked-option-icon",children:fe.image?ge("img",{src:fe.image,alt:""}):ge(ga,{})}),ge("span",{className:"hsk-cb-docked-option-title",children:fe.name}),Kt(fe,k)[0]&&ge("span",{className:"hsk-cb-docked-option-detail",children:Kt(fe,k)[0].value})]},fe.id??Se)),s.length>1&&ot("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{p(s),a(!1)},children:[ge("span",{className:"hsk-cb-docked-option-icon",children:ge(ga,{})}),ge("span",{className:"hsk-cb-docked-option-title",children:T("captureAll",{count:String(s.length)})})]}),s.length===0&&ot("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h({name:"current page",id:void 0}),a(!1)},children:[ge("span",{className:"hsk-cb-docked-option-icon",children:ge(ga,{})}),ge("span",{className:"hsk-cb-docked-option-title",children:T("captureCurrentPage")})]}),ot("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{d(),a(!1)},children:[ge("span",{className:"hsk-cb-docked-option-icon",children:ge(Di,{})}),ge("span",{className:"hsk-cb-docked-option-title",children:T("whatHaveYouSaved")})]}),ot("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{u(),a(!1)},children:[ge("span",{className:"hsk-cb-docked-option-icon",children:ge(xa,{})}),ge("span",{className:"hsk-cb-docked-option-title",children:T("deleteThis")})]})]})]}),f.length>0&&ge("div",{className:"hsk-cb-img-strip",children:f.map((fe,Se)=>ot("div",{className:"hsk-cb-img-thumb-wrap",children:[ge("img",{src:fe.thumb||fe.data,alt:`attachment ${Se+1}`,className:"hsk-cb-img-thumb"}),ge("button",{type:"button",className:"hsk-cb-img-thumb-remove",onClick:()=>C(Se),"aria-label":"Remove image",children:ge(Ki,{size:10})})]},Se))}),ot("div",{className:se("hsk-cb-input-box",b&&"hsk-cb-input-box--waiting"),"data-cascade":ie%2?"b":"a","data-tools":U?"open":"closed",style:{"--hsk-text-sweep":`${ae}ms`},children:[ge("input",{ref:L,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:fe=>{M(fe.target.files),fe.target.value=""}}),(y||w||D&&H)&&ge("button",{className:se("hsk-cb-tools-toggle",U&&"hsk-cb-tools-toggle--open"),onClick:()=>oe(fe=>!fe),disabled:W||b,"aria-label":U?"Close options":"More options","aria-expanded":U,children:ge(Hi,{})}),ge(fs,{children:w&&ge("button",{className:"hsk-cb-attach-btn",onClick:()=>L.current?.click(),disabled:W,"aria-label":"Attach image",children:ge(Lo,{})})}),ot("div",{className:"hsk-cb-field",ref:V,"data-ph-lines":!r&&Q?"2":void 0,children:[ge("textarea",{ref:v,value:r,onChange:q,onKeyDown:P,rows:1,placeholder:"",className:se("hsk-cb-textarea",I.input),"aria-label":te,disabled:E||W&&!le||x}),ge(Fl,{placeholder:te,visible:!r,staggerMs:Wa,replaySeed:ie})]}),D&&H&&ge("button",{className:se("hsk-cb-voice-mode-btn",O&&"hsk-cb-voice-mode-btn--blocked"),onClick:()=>O?N?.(T("errAccountRequired")):S("converse"),disabled:W||b,"aria-label":"Voice conversation",children:ge(Eo,{})}),(W||le)&&!be?ge("button",{className:se("hsk-cb-send","hsk-cb-send--stop",I.sendButton),onClick:X,"aria-label":"Stop generating",children:ge(Pi,{})}):ot("button",{className:se("hsk-cb-send",be&&"is-launching",I.sendButton),onClick:()=>{ee(),F()},disabled:x||E||b||!r.trim()&&f.length===0,"aria-label":"Send message",children:[ge("svg",{width:"0",height:"0","aria-hidden":"true",focusable:"false",style:{position:"absolute"},children:ge("defs",{children:ot("filter",{id:e,children:[ge("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"1.6",result:"blur"}),ge("feColorMatrix",{in:"blur",type:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 16 -7",result:"goo"}),ge("feBlend",{in:"SourceGraphic",in2:"goo"})]})})}),ge("span",{className:"hsk-cb-send-sheath","aria-hidden":"true"}),ot("span",{className:"hsk-cb-send-stage",style:{filter:`url(#${e})`},children:[ge("span",{className:"hsk-cb-send-seam","aria-hidden":"true"}),ge("span",{className:"hsk-cb-send-kite",children:ge(Oi,{})})]})]})]})]}),O?ot("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>N?.(""),children:[ge("span",{children:T("errAccountRequired")}),ge("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:fe=>{fe.stopPropagation(),N?.("")},"aria-label":"Dismiss error",children:"\xD7"})]}):$&&ot("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>N?.(""),children:[ge("span",{children:T($)}),ge("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:fe=>{fe.stopPropagation(),N?.("")},"aria-label":"Dismiss error",children:"\xD7"})]})]})}import hm,{useEffect as ks,useRef as Xr,useState as gs}from"react";import{useEffect as Xn,useRef as Qn}from"react";import{jsx as im}from"react/jsx-runtime";function Bl(e,r){let t=e.trim().match(/^#([\da-f]{3}|[\da-f]{6})$/i);if(t){let a=t[1].length===3?t[1].split("").map(o=>o+o).join(""):t[1];return[parseInt(a.slice(0,2),16),parseInt(a.slice(2,4),16),parseInt(a.slice(4,6),16)]}let n=e.match(/-?[\d.]+/g);return!n||n.length<3?r:[Number(n[0]),Number(n[1]),Number(n[2])]}function om(e,r,t){return[e[0]+(r[0]-e[0])*t,e[1]+(r[1]-e[1])*t,e[2]+(r[2]-e[2])*t]}function Tn(e,r){return`rgba(${e[0]|0}, ${e[1]|0}, ${e[2]|0}, ${r})`}var kr=24,sm=.42;function $l({phase:e,theme:r,level:t,spectrum:n,bins:a,className:o}){let i=Qn(null),c=Qn(e),s=Qn(t),l=Qn(n),h=Qn(a);return Xn(()=>{c.current=e},[e]),Xn(()=>{s.current=t},[t]),Xn(()=>{l.current=n},[n]),Xn(()=>{h.current=a},[a]),Xn(()=>{let p=i.current;if(!p)return;let d=p.getContext("2d");if(!d)return;let u=getComputedStyle(p),f=Bl(u.getPropertyValue("--hsk-primary")||"",[255,106,51]),C=Bl(u.getPropertyValue("--hsk-chat-text")||"",[31,31,31]),b=0,E=0,x=0,L=()=>{let X=Math.min(window.devicePixelRatio||1,3),F=p.getBoundingClientRect();E=Math.max(1,F.width),x=Math.max(1,F.height),p.width=Math.round(E*X),p.height=Math.round(x*X),d.setTransform(X,0,0,X,0,0)};L();let M=typeof ResizeObserver<"u"?new ResizeObserver(L):null;M?.observe(p),window.addEventListener("resize",L);let w=window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches??!1,D=new Float32Array(kr),H=[],S=null,O=-1,v=null,I=0,q=0,P=performance.now(),J=(X,F,$,N)=>X+(F-X)*(F>X?$:N),de=()=>{let X=l.current,F=h.current?.()??0;if(!X||!F||((!v||v.length!==F)&&(v=new Uint8Array(F)),!X(v)))return!1;let N=Math.max(kr,Math.floor(F*sm))/kr;for(let T=0;T<kr;T++){let A=Math.floor(T*N),j=Math.max(A+1,Math.floor((T+1)*N)),y=0;for(let k=A;k<j;k++)y+=v[k];let z=y/(j-A)/255;D[T]=J(D[T],z,w?.2:.55,w?.06:.14)}return!0},te=(X,F)=>{for(let $=0;$<kr;$++){let N=$/(kr-1),T=Math.pow(1-N,1.6)*(.75+.25*Math.sin(X*3.1+$*.7));D[$]=J(D[$],T*F,.3,.12)}},W=X=>{let F=Math.min(kr-1,Math.max(0,X*(kr-1))),$=Math.floor(F),N=F-$,T=D[$],A=D[Math.min(kr-1,$+1)];return T+(A-T)*N*N*(3-2*N)},le=X=>{b=requestAnimationFrame(le);let F=(X-P)/1e3,$=c.current,N=Math.min(1,s.current());I=J(I,Math.max($==="speaking"?.42:$==="listening"?.3:$==="thinking"?.28:.12,N),w?.1:.5,w?.05:.11),de()||te(F,Math.max(.25,I)),d.clearRect(0,0,E,x);let A=x/2;q=$==="thinking"?(q+.012)%1.6:0;let j=3;if(O!==E){H=[];for(let k=0;k<j;k++){let ie=k/(j-1||1),ne=om(f,C,ie*.5),U=d.createLinearGradient(0,0,E,0);U.addColorStop(0,Tn(ne,0)),U.addColorStop(.5,Tn(ne,.9-ie*.35)),U.addColorStop(1,Tn(ne,0)),H.push(U)}S=d.createLinearGradient(0,0,E,0),S.addColorStop(0,Tn(f,0)),S.addColorStop(.5,Tn(f,.14)),S.addColorStop(1,Tn(f,0)),O=E}let y=x*.32,z=Math.max(4,E/130);for(let k=0;k<j;k++){let ie=k/(j-1||1),ne=k*.055,U=1-ie*.22;d.beginPath();let oe=0,m=A;for(let V=0;V<=E;V+=z){let Q=V/E,G=Math.pow(Math.sin(Math.PI*Q),.85),ae=$==="thinking"?Math.exp(-Math.pow((Q-(q-.3))*4.5,2)):1,be=W(Math.abs(Q-.5)*2),ce=F-ne,_=Math.sin(Q*Math.PI*2*2.1+ce*7.4)*.66+Math.sin(Q*Math.PI*2*3.7-ce*5.6)*.26+Math.sin(Q*Math.PI*2*5.9+ce*9.1)*.08,ee=A+G*ae*U*y*I*(.6+be*1.1)*_+Math.sin(Q*Math.PI*2*.6+(F-ne)*2.2)*G*x*.01;V===0?d.moveTo(V,ee):d.quadraticCurveTo(oe,m,(oe+V)/2,(m+ee)/2),oe=V,m=ee}d.quadraticCurveTo(oe,m,E,m),d.lineCap="round",d.lineJoin="round";let R=(k===0?3:1.6)*(1+I*.6);k===0&&(d.strokeStyle=S,d.lineWidth=R*5,d.stroke()),d.strokeStyle=H[k],d.lineWidth=R,d.stroke()}};return b=requestAnimationFrame(le),()=>{cancelAnimationFrame(b),M?.disconnect(),window.removeEventListener("resize",L)}},[r]),im("canvas",{ref:i,className:o,"aria-hidden":"true"})}import{useState as cm,useEffect as ql,useRef as lm}from"react";import{jsx as er,jsxs as Va}from"react/jsx-runtime";function Jn({src:e,images:r,initialIndex:t=0,title:n,onClose:a}){let o=r&&r.length>0?r:e?[{url:e}]:[],[i,c]=cm(t),s=lm(null);if(ql(()=>{c(Math.min(Math.max(0,t),Math.max(0,o.length-1)))},[t,o.length]),ql(()=>{if(o.length===0)return;let p=d=>{d.key==="Escape"&&a(),o.length>1&&(d.key==="ArrowLeft"&&c(u=>(u-1+o.length)%o.length),d.key==="ArrowRight"&&c(u=>(u+1)%o.length))};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[o.length,a]),o.length===0)return null;let l=o[i]||o[0],h=p=>c(d=>(d+p+o.length)%o.length);return Va("div",{className:"hsk-lightbox",onClick:a,role:"dialog","aria-modal":"true","aria-label":n||"Image preview",children:[er("button",{className:"hsk-lightbox-close",onClick:a,"aria-label":"Close image",children:er(an,{})}),n&&er("div",{className:"hsk-lightbox-top",onClick:p=>p.stopPropagation(),children:er("span",{className:"hsk-lightbox-title",children:n})}),Va("div",{className:"hsk-lightbox-stage",onClick:p=>p.stopPropagation(),onTouchStart:p=>{s.current=p.touches[0]?.clientX??null},onTouchEnd:p=>{let d=p.changedTouches[0]?.clientX;s.current!==null&&d!==void 0&&Math.abs(d-s.current)>40&&h(d<s.current?1:-1),s.current=null},children:[o.length>1&&er("button",{type:"button",className:"hsk-lightbox-nav hsk-lightbox-nav--prev",onClick:()=>h(-1),"aria-label":"Previous image",children:er(on,{})}),Va("div",{className:"hsk-lightbox-content",children:[er("img",{src:l.url,alt:l.alt||n||"",className:"hsk-lightbox-img"},l.url),l.caption&&er("div",{className:"hsk-lightbox-caption",children:l.caption})]}),o.length>1&&er("button",{type:"button",className:"hsk-lightbox-nav hsk-lightbox-nav--next",onClick:()=>h(1),"aria-label":"Next image",children:er(sn,{})})]}),o.length>1&&er("div",{className:"hsk-lightbox-bottom",onClick:p=>p.stopPropagation(),children:Va("div",{className:"hsk-lightbox-counter",children:[i+1," / ",o.length]})})]})}import{normalizeEntityImages as pm}from"@akropolys/sdk";import{Fragment as mm,jsx as ze,jsxs as jt}from"react/jsx-runtime";function dm({images:e,siteId:r,themeAttr:t}){let n=Xr(null),[a,o]=gs(null);if(ks(()=>{let s=n.current;s&&s.scrollTo({left:s.scrollWidth,behavior:"smooth"})},[e.length]),!e.length)return null;let i=e.findIndex(s=>s.pending),c=i>0?e.slice(0,i).reverse().find(s=>s.url)?.id:void 0;return jt("div",{className:"hsk-voice-images",ref:n,children:[e.map(s=>jt("button",{type:"button",className:"hsk-voice-image","data-pending":s.pending?"":void 0,disabled:s.pending,onClick:()=>o(s.url),children:[s.pending&&ze(pn,{active:!0,seed:r,theme:t}),s.url&&ze("img",{src:s.url,alt:"",draggable:!1},s.url),s.url&&ze(pn,{active:!!s.sending||s.id===c,seed:r,theme:t})]},s.id)),a&&ze(Jn,{src:a,onClose:()=>o(null)})]})}function um({current:e,choose:r,label:t,groups:n}){let a=Pn.find(l=>l.name===e),[o,i]=gs(!1),c=Xr(null),s=Xr(null);return ks(()=>{if(s.current&&(s.current.inert=!o),!o)return;let l=s.current,h=l?.querySelector('[aria-checked="true"]');l&&h&&(l.scrollTop=h.offsetTop-(l.clientHeight-h.offsetHeight)/2);let p=u=>{c.current&&!u.composedPath().includes(c.current)&&i(!1)},d=u=>{u.key==="Escape"&&i(!1)};return document.addEventListener("pointerdown",p),document.addEventListener("keydown",d),()=>{document.removeEventListener("pointerdown",p),document.removeEventListener("keydown",d)}},[o]),jt("div",{className:"hsk-voice-picker",ref:c,"data-open":o?"":void 0,dir:"ltr",children:[jt("button",{type:"button",className:"hsk-voice-pill hsk-voice-pill--current","aria-haspopup":"true","aria-expanded":o,"aria-label":`${t}: ${a?.trait??e} (${e})`,onClick:()=>i(l=>!l),children:[ze("span",{children:a?.trait??e}),ze("span",{className:"hsk-voice-pill-caret",children:ze(sn,{})})]}),ze("div",{className:"hsk-voice-menu-list",role:"radiogroup","aria-label":t,ref:s,children:["male","female"].map(l=>jt(hm.Fragment,{children:[ze("div",{className:"hsk-voice-group","aria-hidden":"true",children:n[l]}),Pn.filter(h=>h.gender===l).map(h=>jt("button",{type:"button",role:"radio","aria-checked":e===h.name,"aria-label":`${h.trait}, ${n[l]} (${h.name})`,className:se("hsk-voice-option",e===h.name&&"hsk-voice-option--on"),onClick:()=>{r(h.name),i(!1)},children:[ze("span",{className:"hsk-voice-option-name",children:h.trait}),ze("span",{className:"hsk-voice-option-trait",children:h.name})]},h.name))]},l))})]})}function Ol({siteId:e,themeAttr:r,stopVoice:t,chooseVoice:n,liveVoiceName:a,voiceSecondsLeft:o,voiceConnecting:i,voicePhase:c,live:s,earlier:l,newVoiceChat:h,voiceMuted:p,setVoiceMuted:d,voiceError:u,attachPhoto:f,onSelectSource:C,t:b}){let E=Xr(null),x=Xr(null),L=Xr(null),M=[...l.turns,...s.turns??[]],w=[...l.images,...s.images??[]],D=s.sources??[],[H,S]=gs(null),O=w.some(P=>P.pending),v=M.length,I=M[v-1]?.text??"",q=Xr(!1);return ks(()=>{x.current?.scrollIntoView({block:"end",behavior:q.current?"smooth":"auto"}),q.current=!0},[v,I]),jt("div",{className:"hsk-voice-overlay",role:"dialog","aria-label":b("voiceModeStart"),children:[ze(Ca,{seed:e,theme:r}),M.some(P=>P.text)&&ze("button",{type:"button",className:"hsk-voice-new",onClick:h,disabled:i,"aria-label":b("voiceNewChat"),title:b("voiceNewChat"),children:ze(va,{size:15})}),ze("button",{className:"hsk-voice-exit",onClick:t,"aria-label":b("voiceModeExit"),children:ze(an,{})}),ze(um,{current:a,choose:n,label:b("voicePickerLabel"),groups:{female:b("voiceFemale"),male:b("voiceMale")}}),jt("div",{className:"hsk-voice-thread",ref:E,children:[M.filter(P=>P.text).map((P,J)=>P.role==="user"?ze("div",{className:"hsk-cb-user-msg",children:ze("div",{className:se("hsk-cb-user-bubble","hsk-cb-user-bubble--spoken",!P.done&&"hsk-voice-turn--live"),children:P.text})},J):ze("div",{className:"hsk-cb-ai-msg",children:ze("div",{className:se("hsk-cb-ai-body",!P.done&&"hsk-voice-turn--live"),children:P.text})},J)),ze("div",{ref:x})]}),(w.length>0||D.length>0)&&jt("div",{className:"hsk-voice-shelf",children:[ze(dm,{images:w,siteId:e,themeAttr:r}),D.length>0&&ze("div",{className:"hsk-voice-sources",children:ze(Ua,{sources:D.map(P=>({...P,images:pm(P.images??P.fields?.images,P.image,P.url)})),onSelectSource:C,onImageClick:S,referencedIds:D.map(P=>P.id).filter(P=>!!P),compact:!0})})]}),H&&ze(Jn,{src:H,onClose:()=>S(null)}),i&&jt("div",{className:"hsk-voice-connecting",role:"status",children:[ze("span",{className:"hsk-voice-connecting-dot"}),ze("span",{children:b("voiceConnecting")})]}),u&&ze("div",{className:"hsk-voice-error",children:b(u)}),jt("div",{className:"hsk-voice-controls",dir:"ltr",children:[s.photos&&jt(mm,{children:[ze("input",{ref:L,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:P=>{let J=P.target.files?.[0];P.target.value="",J&&f(J)}}),ze("button",{type:"button",className:"hsk-voice-control hsk-voice-control--attach","data-control":"attach",disabled:i||O,onClick:()=>L.current?.click(),"aria-label":b("voiceAttachPhoto"),children:ze("span",{className:"hsk-voice-control-icon",children:ze($i,{})})})]}),ze("div",{className:se("hsk-voice-stage",i&&"hsk-voice-stage--connecting"),children:ze($l,{className:"hsk-voice-canvas",theme:r,phase:c,level:s.micLevel,spectrum:s.micSpectrum,bins:s.spectrumBins})}),ze("button",{className:se("hsk-voice-control",p&&"hsk-voice-control--muted",i&&"hsk-voice-control--waiting"),"data-control":"mic",disabled:i,onClick:()=>d(P=>!P),"aria-label":b(p?"voicePhaseListening":"voiceModeExit"),children:ze("span",{className:"hsk-voice-control-icon",children:p?ze(qi,{}):ze(Fn,{})},p?"off":"on")})]})]})}import{useRef as Ga,useEffect as bm,useState as fm}from"react";import{jsx as Rn,jsxs as Wl}from"react/jsx-runtime";var Zn=14,Ul=6;function km(e,r){let t=e.filter(Boolean);if(t.length<2)return null;let n=s=>s.offsetTop+s.offsetHeight/2,a=n(t[t.length-1])+10,o=s=>(s===r?Ul*1.3:Ul*.6)*(s%2?1:-1),i=`M ${Zn} 0`,c=0;return t.forEach((s,l)=>{let h=n(s),p=c+(h-c)/2;i+=` C ${Zn+o(l)} ${p}, ${Zn+o(l)} ${p}, ${Zn} ${h}`,c=h}),{d:i+` L ${Zn} ${a}`,height:a}}function Vl({items:e,activeIdx:r,progress:t,onJump:n,side:a="right"}){let o=Gt(),i=Ga(null),c=Ga(null),s=Ga([]),l=Ga(null),[h,p]=fm(null),d=0;for(let u=0;u<e.length;u++)e[u].idx<=r&&(d=u);return bm(()=>{let u=s.current[d],f=l.current,C=c.current,b=i.current;if(u&&(f&&(f.style.transform=`translateY(${u.offsetTop+u.offsetHeight/2}px)`),p(km(s.current,d)),C&&b)){let E=b.clientHeight;if(C.scrollHeight>E&&E>0){let L=u.offsetTop+u.offsetHeight/2,M=E/2-L;C.style.transform=`translateY(${M}px)`}else C.style.transform="none"}},[d,e.length]),e.length<2?null:Rn("nav",{ref:i,className:se("hsk-cb-timeline",a==="left"?"hsk-cb-timeline--left":"hsk-cb-timeline--right"),"aria-label":o("timelineLabel"),children:Wl("div",{ref:c,className:"hsk-cb-timeline-track",style:{"--hsk-tl-progress":t},children:[h&&Rn("svg",{className:"hsk-cb-tl-wave",width:"28",height:h.height,viewBox:`0 0 28 ${h.height}`,"aria-hidden":"true",children:Rn("path",{d:h.d})}),Rn("span",{className:"hsk-cb-tl-cursor",ref:l,"aria-hidden":"true"}),e.map((u,f)=>Wl("button",{ref:C=>{s.current[f]=C},type:"button",className:se("hsk-cb-tl-item",f===d&&"hsk-cb-tl-item--on"),style:{"--hsk-tl-d":Math.min(Math.abs(f-d),4)},onClick:()=>n(u.idx),title:u.text,children:[Rn("span",{className:"hsk-cb-tl-dot"}),Rn("span",{className:"hsk-cb-tl-label",children:u.text})]},u.idx))]})})}import{useState as ja,useEffect as Gl,useLayoutEffect as xs,useRef as jl,useCallback as vs}from"react";import{createPortal as gm}from"react-dom";import{Fragment as vm,jsx as tr,jsxs as Er}from"react/jsx-runtime";var xm=190;function Yl({msg:e,rect:r,containerRect:t,anchorEl:n,containerEl:a,scrollEl:o,isUser:i,isRTL:c=!1,canRetry:s,onPin:l,onRetry:h,onCopy:p,onClose:d,t:u}){let[f,C]=ja(!1),b=jl(null),E=jl(),[x]=ja(()=>{let he=o?.getBoundingClientRect();return!!he&&(r.top<he.top+64||r.top+r.height>he.bottom-8)});xs(()=>{let he=n?.closest(".hsk-cb-msg-group");if(!he)return;let Fe=he.inert;return he.setAttribute("data-hsk-tapback-focus",""),he.inert=!0,()=>{he.removeAttribute("data-hsk-tapback-focus"),he.inert=Fe}},[n]),xs(()=>{if(!o)return;let he=o.getAttribute("data-hsk-tapback-active");return o.setAttribute("data-hsk-tapback-active",""),()=>{he===null?o.removeAttribute("data-hsk-tapback-active"):o.setAttribute("data-hsk-tapback-active",he)}},[o]);let{closing:L,requestClose:M}=jn(xm,d);Gl(()=>{let he=document.activeElement,Fe=()=>Array.from(b.current?.querySelectorAll("button")??[]);b.current?.focus({preventScroll:!0});let Oe=Ge=>{if(Ge.key==="Escape"&&(Ge.preventDefault(),Ge.stopImmediatePropagation(),M()),Ge.key!=="Tab")return;let Ae=Fe();if(!Ae.length)return;let yt=Ae.indexOf(document.activeElement);(Ge.shiftKey?yt<=0:yt===Ae.length-1||yt<0)&&(Ge.preventDefault(),Ae[Ge.shiftKey?Ae.length-1:0].focus({preventScroll:!0}))};return window.addEventListener("keydown",Oe,!0),()=>{window.removeEventListener("keydown",Oe,!0),clearTimeout(E.current),he?.isConnected&&he.focus({preventScroll:!0})}},[M]);let w=vs(async()=>{await p(e.content||"")&&(C(!0),E.current=setTimeout(M,450))},[e.content,p,M]),D=vs(()=>{Xt("pin"),l(e),M()},[e,l,M]),H=vs(()=>{h&&h(e),M()},[e,h,M]),[S,O]=ja(()=>({box:r,attachment:r,thought:void 0,container:t,viewport:o?.getBoundingClientRect(),width:0,height:36,scrollTop:o?.scrollTop??0}));xs(()=>{let he=0,Fe=()=>{he=0;let Ae=n?.getBoundingClientRect()??r,yt=(i?null:n?.querySelector(".hsk-cb-ai-text"))?.getBoundingClientRect()??Ae,wt=i?void 0:n?.querySelector(".hsk-cb-think-head")?.getBoundingClientRect(),Tt=a?.getBoundingClientRect()??t,$t=o?.getBoundingClientRect()??Tt,qt=b.current?.offsetWidth??0,Rt=b.current?.offsetHeight??36,xe=o?.scrollTop??0;O(Ye=>{let mt=($e,Xe)=>$e===Xe||!!$e&&!!Xe&&["top","left","width","height"].every(dt=>Math.abs($e[dt]-Xe[dt])<.5);return mt(Ye.box,Ae)&&mt(Ye.attachment,yt)&&mt(Ye.thought,wt)&&mt(Ye.container,Tt)&&mt(Ye.viewport,$t)&&Ye.width===qt&&Ye.height===Rt&&Ye.scrollTop===xe?Ye:{box:Ae,attachment:yt,thought:wt,container:Tt,viewport:$t,width:qt,height:Rt,scrollTop:xe}})},Oe=()=>{he||(he=requestAnimationFrame(Fe))};Fe();let Ge=typeof ResizeObserver>"u"?null:new ResizeObserver(Oe);for(let Ae of[n,a,o,b.current])Ae&&Ge?.observe(Ae);return o?.addEventListener("scroll",Oe,{passive:!0}),window.addEventListener("resize",Oe),window.visualViewport?.addEventListener("resize",Oe),window.visualViewport?.addEventListener("scroll",Oe),()=>{cancelAnimationFrame(he),Ge?.disconnect(),o?.removeEventListener("scroll",Oe),window.removeEventListener("resize",Oe),window.visualViewport?.removeEventListener("resize",Oe),window.visualViewport?.removeEventListener("scroll",Oe)}},[n,a,o,r,t,i]);let[v,I]=ja("");Gl(()=>{if(!n)return;let he=getComputedStyle(n).backgroundColor;he&&he!=="rgba(0, 0, 0, 0)"&&he!=="transparent"&&I(he)},[n]);let{box:q,attachment:P,thought:J,container:de,viewport:te}=S,W=de?.top??0,le=de?.left??0,X=de?.width??(typeof window<"u"?window.innerWidth:390),F=q.top-W,$=P.left-le,N=P.width,T=q.height,A=2;s&&h&&A++;let j=A===2?122:170,y=S.width||j,z=S.height,k=window.visualViewport?.offsetTop??0,ie=k+(window.visualViewport?.height??window.innerHeight),ne=Math.max(0,Math.max(te?.top??W,k)-W),U=Math.min(de?.height??window.innerHeight,Math.min(te?te.top+te.height:ie,ie)-W),oe=ne+8,m=Math.max(oe,U-z-8),R=!!J,V=R||x||F-z-9>=oe,Q=V?F-z-9:F+T+9,G=J?Math.max(oe,Math.min(J.top-W+(J.height-z)/2,m)):x?oe:Math.max(oe,Math.min(Q,m)),ae=Math.round(q.top-(te?.top??W)+S.scrollTop),be=Math.min(24,T/2),ce=Math.ceil(Math.max(240,te?.height??de?.height??window.innerHeight)+64),_=Er(vm,{children:[tr("div",{className:se("hsk-tapback-frost","is-upper",L&&"is-closing"),"aria-hidden":"true",style:{top:(o?ae:F)-ce,height:ce+be}}),tr("div",{className:se("hsk-tapback-frost","is-lower",L&&"is-closing"),"aria-hidden":"true",style:{top:(o?ae:F)+T-be,height:ce+be}})]}),ee=!i&&!!n?.closest('[data-hsk-layout="wide"]'),ve=c,Ie=ve?Math.min(X-18,$+N-7):Math.max(18,$+7),fe=ve?Ie-y+18:Ie-18;fe=Math.max(10,Math.min(fe,X-y-10));let Se=Math.max(18,Math.min(Ie-fe,y-18)),Ne=v||(i?"var(--hsk-user-bubble-bg, var(--hsk-primary, #007aff))":"var(--hsk-bubble-bg, #eeeef0)"),Te=0;return Er("div",{className:se("hsk-tapback-overlay",L&&"is-closing"),onClick:M,children:[o?gm(_,o):_,Er("div",{ref:b,className:se("hsk-tapback-group",ee&&"is-wide",(x||R)&&"is-docked",L&&"is-closing",V?"is-above":"is-below",i?"is-user":"is-ai"),style:{top:`${G}px`,left:`${fe}px`,maxWidth:`${Math.max(0,X-20)}px`,"--tail-x":`${Se}px`,"--tail-dir":ve?1:-1,"--tail-step":i?"9px":"8px","--hsk-anchor-color":Ne,"--hsk-skin":"var(--hsk-bubble-bg, var(--hsk-chat-ai-bg, #eeeef0))"},tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":"Message actions",onClick:he=>he.stopPropagation(),children:[Er("div",{className:"hsk-tapback-capsule",children:[Er("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--pin",onClick:D,"aria-label":"Pin to Kiku Memory",style:{"--tool-idx":Te++},children:[tr(Xi,{size:14}),tr("span",{children:"Pin"})]}),s&&h&&Er("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--retry",onClick:H,"aria-label":u("retry"),style:{"--tool-idx":Te++},children:[tr(_n,{size:14}),tr("span",{children:u("retry")})]}),Er("button",{type:"button",className:se("hsk-tapback-tool-btn hsk-tapback-tool-btn--copy",f&&"is-copied"),onClick:w,"aria-label":u(f?"copied":"copy"),style:{"--tool-idx":Te++},children:[f?tr(_r,{size:14}):tr(Pr,{size:14}),tr("span",{children:u(f?"copied":"copy")})]})]}),Er("div",{className:se("hsk-tapback-tail",V?"is-above":"is-below"),style:{left:`${Se}px`},children:[tr("span",{className:"hsk-tapback-dot hsk-tapback-dot--mid"}),tr("span",{className:"hsk-tapback-dot hsk-tapback-dot--anchor"})]})]})]})}import{useEffect as ym,useRef as wm}from"react";var Kl=!1;function Xl(){if(Kl)return!0;try{return localStorage.getItem("akropolys_layout_hint_seen")==="true"||localStorage.getItem("akropolys_chat_layout")==="wide"}catch{return!1}}function ea(){Kl=!0;try{localStorage.setItem("akropolys_layout_hint_seen","true")}catch{}}import{jsx as ys,jsxs as Cm}from"react/jsx-runtime";function Ql({onOpenDock:e}){let r=Gt(),t=wm(null);return ym(()=>{let n=t.current;if(!n)return;if(typeof IntersectionObserver>"u"){ea();return}let a=new IntersectionObserver(o=>{o.some(i=>i.isIntersecting&&i.intersectionRatio>=.5)&&(ea(),a.disconnect())},{threshold:.5});return a.observe(n),()=>a.disconnect()},[]),Cm("button",{ref:t,type:"button",className:"hsk-cb-layout-discovery-note",onClick:e,children:[ys("svg",{viewBox:"0 0 44 48",fill:"none","aria-hidden":"true",children:ys("path",{pathLength:"1",d:"M36 43C14 46 8 27 20 23C32 18 36 31 24 31C11 31 9 15 18 6M10 10L18 5L23 14"})}),ys("span",{children:r("layoutFirstReplyNote",{button:"Wide"})})]})}import{jsx as Ve,jsxs as Qr}from"react/jsx-runtime";var Em=240,zm=700,Nm=200;function ws({title:e="kiku",logo:r,placeholder:t="Ask me anything\u2026",backdropColor:n,backdropBlur:a,onClose:o,onSelectSource:i,chips:c=An,theme:s,classNames:l={},enableVoice:h=!1,voiceLang:p,enableVision:d=!1,ttsVoice:u="Algenib",origin:f}){let C=Rm(),b=Lm(),{messages:E,sources:x,loading:L,streaming:M,error:w,errorCode:D,lastAction:H,lastIntent:S,allowedActions:O,send:v,queuedMessage:I,sendQueuedNow:q,appendSpokenExchange:P,stop:J,stopped:de,interrupted:te,continueGenerating:W,reset:le,referencedIds:X,humanPending:F,leaveHuman:$}=Mm(),[N,T]=Be(null),A=pt(null),j=zt(()=>{window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||A.current?.animate([0,-7,6,-4,2,0].map(g=>({transform:`translateX(${g}px)`})),{duration:380,easing:"cubic-bezier(.36, .07, .19, .97)"})},[]);vt(()=>{if(!N)return;let g=Le=>{(Le.key.length===1||Le.key==="Enter"||Le.key==="Backspace")&&j()},B=Le=>{let Ee=Qe=>Le.composedPath().some(_e=>_e.classList?.contains(Qe));!Ee("hsk-cb-leave")&&!Ee("hsk-cb-topbar")&&j()},me=Ir.current;return me?.setAttribute("inert",""),document.addEventListener("keydown",g),document.addEventListener("pointerdown",B,!0),()=>{me?.removeAttribute("inert"),document.removeEventListener("keydown",g),document.removeEventListener("pointerdown",B,!0)}},[N,j]);let[y,z]=Be(()=>{try{return C.getShopperName?.()??""}catch{return""}}),[k,ie]=Be(()=>{try{return C.getShopperLanguage?.()??""}catch{return""}}),[ne,U]=Be(()=>{try{return C.getEntityLanguageMode?.()??""}catch{return""}}),[oe,m]=Be(!1),[R,V]=Be(null),[Q,G]=Be(""),[ae,be]=Be(!1),{chromeReady:ce,baseFontReady:_,isRTL:ee,speechLang:ve,scriptFont:Ie,fontStack:fe,isNonLatin:Se,hostFontCovers:Ne,t:Te,tNode:he}=kc({shopperLanguage:k||Q,theme:s,preloadedStrings:R}),Fe=ta.useMemo(()=>{let g=x.filter(_e=>_e.id&&X.includes(_e.id)),B=[...E].reverse().find(_e=>_e.role==="assistant")?.content??"";if(!B)return g;let me=new Set(g.map(_e=>_e.id)),Le=B.toLowerCase().replace(/\s+/g," "),Ee=_e=>{let St=String(_e??"").toLowerCase().replace(/\s+/g," ").trim(),Je=St.split(" "),Lt=[St];return Je.length>3&&Lt.push(Je.slice(0,3).join(" ")),Je.length>4&&Lt.push(Je.slice(0,4).join(" ")),Lt.filter(rn=>rn.length>=5)},Qe=x.filter(_e=>_e.id&&!me.has(_e.id)&&Ee(_e.name).some(St=>Le.includes(St)));return[...g,...Qe]},[x,X,E]),Oe=O===null||O.includes("capture"),[Ge,Ae]=Be(""),[yt,wt]=Be(!1),[Tt,$t]=Be(!1),[qt,Rt]=Be([]),xe=pt(new Map),Ye=pt(null),[mt,$e]=Be({}),[Xe,dt]=Be(null),Nt=zt((g,B)=>{if(!g&&!B){dt(null);return}dt(B?{images:B.images,initialIndex:B.index??0,title:B.title}:{src:g})},[]),[Ot,it]=Be(null),[Ct,ct]=Be(()=>{if(typeof window>"u")return!1;try{return localStorage.getItem("akropolys_terms_agreed")==="true"}catch{return!1}}),Ft=E.length===0,rr=Q||k,Y=!rr||rr.toLowerCase()==="english"||rr.toLowerCase()==="en",Z=ae||!!Q||!!k&&!ce&&!Y,ue=Ft&&!k&&!Z,K=Ft&&!!k&&!y&&!Z,ke=Ft&&!!k&&!!y&&!ne,ye=Ft&&!!k&&!!y&&!!ne&&!Ct,we=ue||K||ke||ye||Z,pe=ke||ye||Z,[je,Ke]=Be(Z),[hr,pr]=Be(!1),[Jr,Zr]=Be(!1),[Pe,at]=Be(!1),Ue=pt(!1),It=pt(null),ut=pt(null);Z!==je&&(Ke(Z),Z?(ut.current&&clearTimeout(ut.current),at(!1),Zr(!0),It.current=setTimeout(()=>{pr(!0),Zr(!1),Ue.current=!0},280)):(It.current&&clearTimeout(It.current),Zr(!1),pr(!1),Ue.current&&(Ue.current=!1,at(!0),ut.current=setTimeout(()=>at(!1),560)))),vt(()=>()=>{It.current&&clearTimeout(It.current),ut.current&&clearTimeout(ut.current)},[]);let At=ta.useMemo(()=>E.some(g=>g.liveKeys?.length>0),[E]);vt(()=>{if(At)return Tm({client:C})},[At,C]);let[gr,Ka]=Be(()=>typeof window<"u"&&!!window.matchMedia?.("(max-width: 1199px)").matches);vt(()=>{let g=window.matchMedia?.("(max-width: 1199px)");if(!g)return;let B=()=>Ka(g.matches);return B(),g.addEventListener?.("change",B),()=>g.removeEventListener?.("change",B)},[]);let zr=async g=>{let B=g.trim();if(!B){try{C.setShopperLanguage?.("")}catch{}ie(""),G(""),V(null);return}if(G(B),be(!0),B.toLowerCase()==="english"||B.toLowerCase()==="en"){V(Pt);try{C.setShopperLanguage?.(B)}catch{}ie(B),G(""),be(!1),m(!1);return}let Le=Date.now(),Ee=1200;try{let _e=C.getCachedUIStrings?.(B,Cr)??C.getCachedUIStrings?.(B,Pt);if(_e?.strings&&Object.keys(_e.strings).length>0)V(_e.strings),_e.font&&await Vt(_e.font,800);else{let St=C.getUIStrings?.(B,Cr),Je=await Promise.race([St,new Promise(Lt=>setTimeout(()=>Lt(null),8e3))]);Je?.font&&await Vt(Je.font,1200),Je?.strings&&Object.keys(Je.strings).length>0&&V(Je.strings)}}catch{}let Qe=Date.now()-Le;Qe<Ee&&await new Promise(_e=>setTimeout(_e,Ee-Qe));try{C.setShopperLanguage?.(B)}catch{}ie(B),G(""),be(!1),m(!1);try{C.getUIStrings?.(B,Pt)?.catch?.(()=>{})}catch{}},xr=g=>{try{C.setEntityLanguageMode?.(g)}catch{}U(g),Ct&&m(!0)},Xa=()=>{try{localStorage.setItem("akropolys_terms_agreed","true")}catch{}ct(!0),m(!0)},Qa=Z?Ar(Q||k).preparing:ue?Te("langPlaceholder"):K?Te("namePlaceholder"):ke?Te("entityLangPlaceholder"):ye?Te("termsPlaceholder"):t==="Ask me anything\u2026"?Te("defaultPlaceholder"):t,Ja=!c||c===An?[]:Array.isArray(c)?c:[],Za=ue?"curious":K?"welcoming":ke?"guiding":ye?"focused":"happy",[Yt,eo]=Be(()=>Ii(s)),[eh,Ts]=Be(!1),Ln=pt(null);vt(()=>()=>{Ln.current&&clearTimeout(Ln.current)},[]);let Rs=pt(null),th=()=>{let g=Ir.current;if(!g?.animate||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let B=ee?-3:3;Rs.current?.cancel(),Rs.current=g.animate([{transform:"translate(0, 0)",easing:"cubic-bezier(.3, 0, .2, 1)"},{offset:.26,transform:`translate(${B}px, -6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.52,transform:`translate(${-B*.3}px, 1.6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.74,transform:`translate(${B*.1}px, -0.6px)`,easing:"cubic-bezier(.45, 0, .55, 1)"},{transform:"translate(0, 0)"}],{duration:1100,delay:380})},Ls=pt(!1);vt(()=>{if(Ls.current)return;let g=Ir.current;if(!g){Ho();return}let B=!1,me=()=>g.querySelector(".hsk-cb-hello-wrap, .hsk-cb-msg-group"),Le=()=>{B||(B=!0,Ls.current=!0,Ee.disconnect(),clearTimeout(Qe),Ho())},Ee=new MutationObserver(()=>{me()&&Le()});Ee.observe(g,{childList:!0,subtree:!0});let Qe=window.setTimeout(Le,2e3);return me()&&Le(),()=>{B=!0,Ee.disconnect(),clearTimeout(Qe)}},[]);let Es=(g,B=!1)=>{Ts(!0),Ln.current&&clearTimeout(Ln.current),Ln.current=setTimeout(()=>Ts(!1),420),eo(g),th(),B&&sa();try{localStorage.setItem("akropolys_theme",g)}catch{}},{vars:rh}=ua(s),en=Yt;ma(s);let zs=pt(()=>{}),dr=pt(null),vr=async(g,B,me,Le)=>{let Ee=(g??Ge).trim(),Qe=B??qt;if(!Ee&&Qe.length===0||!ce||I)return;if(Xt("send"),K){if(!Ee)return;let Je=Ri(Ee)||Ee.slice(0,40);try{C.setShopperName?.(Je)}catch{}z(Je),Ae("");return}if(ue){if(!Ee||ae)return;Ae(""),zr(Ee);return}if(pe){Ae("");return}wt(!1),$t(!1),Ae(""),Rt([]);let _e=(await Promise.all(Qe.map(async({thumb:Je,...Lt})=>{let rn=Lt.data||(Je?await xe.current.get(Je)?.catch(()=>""):"")||"";return Je&&URL.revokeObjectURL(Je),{...Lt,data:rn}}))).filter(Je=>Je.data),St=Ee||(_e.some(Je=>Je.type==="image")?"Analyze this image":"What is this?");await v(St,Ee,_e.length>0?_e:void 0,me,Le)},[nh,Ns]=Be(!1),ra=zt(async g=>{let B=g&&g.role==="user"?g:[...E].reverse().find(me=>me.role==="user");if(B?.content){Ns(!0);try{await vr(B.content)}finally{Ns(!1)}}},[E,vr]),ah=zt(g=>{g?.content&&(Ae(g.content),setTimeout(()=>{if(dr.current){dr.current.focus();let B=g.content.length;try{dr.current.setSelectionRange(B,B)}catch{}}},50))},[Ae,dr]),oh=zt(async()=>{await ra()},[ra]),{keyInput:sh,setKeyInput:ih,keyPhase:ch,setKeyPhase:Is,mintedKey:lh,setMintedKey:hh,mintedPub:Fm,setMintedPub:ph,copied:dh,keyCountdown:uh,minting:mh,copyValue:bh,handleUseExistingKey:fh,handleCreateKey:kh}=wc(H,oh),gh=zt(()=>{let g=C?.getKikuKey?.();g&&window.open(`https://mimi.akropolys.cloud/#k=${encodeURIComponent(g)}`,"_blank","noopener")},[C]),[En,As]=Be(null),xh=zt(async g=>{let B=(g.content||"").replace(/^(@kiku pin\s*)+/i,""),Le=`@kiku pin ${B.slice(0,50).replace(/\n+/g," ")}`;await v(B||"pin message",Le,void 0,"capture")},[v]),{handleKikuCapture:vh,handleKikuCaptureAll:yh,handleKikuViewHistory:wh,handleKikuDelete:Ch}=Cc({attachments:qt,setAttachments:Rt,setInput:Ae,send:v,t:Te}),{voiceMode:na,voicePhase:Ps,voiceConnecting:Sh,voiceError:to,setVoiceError:_s,voiceMuted:Mh,setVoiceMuted:Th,voiceSecondsLeft:Rh,voiceBlocked:Lh,liveVoiceName:Eh,chooseVoice:zh,canConverse:Nh,startVoice:Ih,stopVoice:Ah,voice:Ph,live:Fs,earlier:_h,newVoiceChat:Fh,attachPhoto:Dh}=Wc({voiceLang:p,speechLang:ve,shopperLanguage:k,ttsVoice:u,messages:E,handleSendUtterance:g=>zs.current(g),appendSpokenExchange:P}),aa=pt(null),[Dt,tn]=Be(!1),[Ds,Hs]=Be(!1),[Bs,$s]=Be(()=>!Xl()),[qs,ro]=Be(null),[Os,no]=Be(!1),[Us,Hh]=Be(!1),Bh=zt(()=>Hh(!0),[]);vt(()=>{Dt?Ai():(Hs(!1),no(!1))},[Dt]);let Nr=pt(null);vt(()=>(!Dt&&Nr.current&&clearTimeout(Nr.current),()=>{Nr.current&&clearTimeout(Nr.current)}),[Dt]);let[$h,ao]=Be(null),oa=pt(null),oo=pt(null),Ws=pt([]),zn=pt(null),qh=`hsk-goo-${Sm()}`,{closing:Nn,requestClose:so,closeNow:sa}=jn(gr?zm:Em,()=>tn(!1));vt(()=>{if(!Dt)return;let g=B=>{let me=B.composedPath?B.composedPath():[],Le=oa.current&&(me.includes(oa.current)||oa.current.contains(B.target)),Ee=oo.current&&(me.includes(oo.current)||oo.current.contains(B.target)),Qe=me.some(Lt=>Lt.classList?.contains("hsk-cb-layout-discovery-note")),_e=B.target,St=_e?.closest?.(".hsk-cb-topbar-mark"),Je=_e?.closest?.(".hsk-cb-topbar-ooze-menu")||me.some(Lt=>Lt?.classList?.contains?.("hsk-cb-topbar-ooze-menu"));Le||Ee||St||Je||Qe||so()};return document.addEventListener("mousedown",g),document.addEventListener("touchstart",g,{passive:!0}),()=>{document.removeEventListener("mousedown",g),document.removeEventListener("touchstart",g)}},[Dt]);let{msgsContainerRef:Ir,spacerRef:Oh,lastExternalScrollRef:Uh,showJumpToBottom:Wh,scrollProgress:Vh,activeMsgIdx:Gh,unreadBelow:jh,jumpToMessage:Yh,revealMessage:Vs,jumpToBottom:Kh}=gc({messages:E,loading:L,streaming:M,messageRefs:Ws}),Xh=zt((g,B,me,Le)=>{Le&&Vs(Le),As({msg:g,rect:B,isUser:me,el:Le})},[Vs]),ia=pl(Ir),Gs=()=>{ia.toggle(),ea(),$s(!1),ro(null),no(!1),gr&&(Nr.current&&clearTimeout(Nr.current),window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?sa():Nr.current=setTimeout(so,400))},Qh=()=>{ao(Yt),no(!0),tn(!0)},{closing:io,requestClose:js}=jn(Nm,o);vt(()=>{if(!ce||!_||!Us||io||Ro())return;let g=window.setTimeout(()=>{Ro()||(ao(Yt),Hs(!0),tn(!0))},650);return()=>window.clearTimeout(g)},[ce,_,Us,io,Yt]);let co=zt(g=>{g&&$(),tn(!1),window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?o():js()},[js,o,$]),ca=zt(()=>{N?j():F?T("close"):co(!1)},[F,co,N,j]);Qi({panel:zt(()=>aa.current,[]),scroller:zt(()=>Ir.current,[]),onDismiss:o,quiescent:zt(()=>performance.now()-Uh.current>90,[])}),vt(()=>{if(typeof window>"u")return;let g=window.innerWidth-document.documentElement.clientWidth,B=document.body.style.overflow,me=document.body.style.paddingRight;if(g>0){let Le=parseFloat(window.getComputedStyle(document.body).paddingRight)||0;document.body.style.paddingRight=`${Le+g}px`,document.documentElement.style.setProperty("--hsk-scrollbar-width",`${g}px`)}return document.body.style.overflow="hidden",()=>{document.body.style.overflow=B,document.body.style.paddingRight=me,document.documentElement.style.removeProperty("--hsk-scrollbar-width")}},[]),vt(()=>{let g=window.visualViewport;if(!g)return;let B=document.documentElement,me=()=>{B.style.setProperty("--hsk-vvh",`${g.height}px`)};return me(),g.addEventListener("resize",me),g.addEventListener("scroll",me),()=>{g.removeEventListener("resize",me),g.removeEventListener("scroll",me),B.style.removeProperty("--hsk-vvh")}},[]),vt(()=>{let g=B=>{if(B.key==="Escape"){if(Xe){dt(null);return}ca()}};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[Xe,ca]);let lo=zt(g=>{g&&$(),le(),ro(null),Is("idle")},[le,Is,$]),Jh=zt(()=>{N?j():F?T("reset"):lo(!1)},[F,lo,N,j]),Zh=g=>{i?.(g);let B=[...E].reverse().find(me=>me.role==="assistant");if(B&&B.content.trim().endsWith("?")){v(Te("cardClickAnswer",{name:g.name}));return}v(Te("cardClickQuery",{name:g.name,details:mo(Kt(g,b))}))},ep=g=>{Ae(g+" "),$t(!1),wt(!0),dr.current&&dr.current.focus()},tp=g=>{if(g.key==="Escape"&&yt){g.preventDefault(),wt(!1);return}if(g.key==="Escape"&&Tt){g.preventDefault(),$t(!1);return}g.key==="Enter"&&!g.shiftKey&&!g.nativeEvent.isComposing&&(g.preventDefault(),vr())},ho=pt(28),Ys=pt(280),po=pt(null),rp=(g,B)=>{try{!po.current&&typeof document<"u"&&(po.current=document.createElement("canvas"));let me=po.current?.getContext("2d");return me?(me.font=B,me.measureText(g).width):g.length*8.5}catch{return g.length*8.5}},np=g=>{let B=g.closest(".hsk-cb-input-box");if(!B)return;let me=g.value;!(B.dataset.expanded==="true")&&g.clientWidth>50&&(Ys.current=g.clientWidth);let Ee=window.getComputedStyle(g),Qe=Ee.font||`${Ee.fontSize||"16px"} ${Ee.fontFamily||"Geist, sans-serif"}`,_e=rp(me,Qe),St=Math.max(120,Ys.current-14),Je=me.includes(`
|
|
38
|
+
`),Lt=!!(me&&(Je||_e>St));if(B.dataset.expanded!==(Lt?"true":"false")&&(B.dataset.expanded=Lt?"true":"false"),!me){ho.current=28,g.style.height="";return}if(!Lt){ho.current=28,g.style.height="";return}g.style.height="auto";let rn=Math.max(28,Math.min(g.scrollHeight,140));ho.current=rn,g.style.height=`${rn}px`};vt(()=>{dr.current&&np(dr.current)},[Ge]);let ap=g=>{let B=g.target.value;Ae(B),to&&_s("");let me=B.trim();$t(me==="@"),wt(/^@kiku\s*$/i.test(me))};vt(()=>{zs.current=g=>{vr(g)}});let op=async g=>{if(!g||g.length===0)return;let B=Array.from(g);for(let me of B){if(!me.type.startsWith("image/"))continue;let Le=URL.createObjectURL(me),Ee=ya(me);xe.current.set(Le,Ee),Rt(Qe=>[...Qe,{type:"image",data:"",thumb:Le}]),Ee.then(Qe=>Rt(_e=>_e.map(St=>St.thumb===Le?{...St,data:Qe}:St))).catch(()=>Rt(Qe=>Qe.filter(_e=>_e.thumb!==Le))).finally(()=>xe.current.delete(Le))}},sp=g=>{Rt(B=>{let me=B[g]?.thumb;return me&&URL.revokeObjectURL(me),B.filter((Le,Ee)=>Ee!==g)})},ip=n&&(n.includes("rgba")||n.includes("hsla")||n==="transparent"),cp=a||ip?{backdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`,WebkitBackdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`}:{},Ks=pt(!1);vt(()=>{if(Ks.current&&!M){let g=E[E.length-1];g&&g.role!=="user"&&Xt("reply")}Ks.current=M},[M,E]);let la=(de||te)&&!L&&!M,ha=E[E.length-1],pa=vc(ha?.role==="assistant"?ha.content??"":""),lp=ha?.role==="assistant"&&pa.length<(ha.content?.length??0),uo=M||lp,nr=ta.useMemo(()=>{let g=L||M,B=E.filter((Ee,Qe)=>Ee.role!=="assistant"||Qe===E.length-1&&g?!0:!!Ee.content||!!Ee.visualization||Ee.visualizing||(Ee.knowledgeImages?.length??0)>0||(Ee.referencedIds?.length??0)>0||jr(Ee.statusStage)),me=B.length-1;if(me<0||B[me].role!=="assistant"||B[me]!==E[E.length-1])return B;let Le=pa.length<(B[me].content?.length??0);return!g&&!Le?B:B.map((Ee,Qe)=>Qe===me?{...Ee,content:pa}:Ee)},[E,L,M,pa]),Xs=nr.some(g=>g.role==="assistant"&&!jr(g.statusStage)&&Gr(g.content).content.trim().length>0);vt(()=>{if(!(!Bs||L||uo||w||la||na!=="off"))for(let g=nr.length-1;g>=0;g--){let B=nr[g];if(!(B.role!=="assistant"||jr(B.statusStage)||!Gr(B.content).content.trim())){$s(!1),ro(g);break}}},[Bs,nr,L,uo,w,la,na]);let hp=ta.useMemo(()=>{let g=[];return nr.forEach((B,me)=>{if(B.role==="user"&&B.content.trim()){let Le=B.content.replace(/^@kiku\s*/i,"").replace(/\s+/g," ").trim();g.push({idx:me,text:Le.length>28?Le.slice(0,27).trimEnd()+"\u2026":Le})}}),g},[nr]),pp=la&&nr[nr.length-1]?.role!=="assistant",Qs=pt(Date.now());return vt(()=>{Qs.current=Date.now()},[]),Ve(Mo.Provider,{value:Te,children:Ve("div",{ref:zn,className:se("hsk-cb-overlay",f&&"hsk-cb-overlay--grows",io&&"hsk-cb-overlay--closing",l.overlay),onPointerDown:g=>{yr(),g.target===g.currentTarget&&(zn.current._ptrDown=!0)},onClick:g=>{g.target===g.currentTarget&&zn.current?._ptrDown&&Date.now()-Qs.current>200&&ca(),zn.current&&(zn.current._ptrDown=!1)},"data-hsk-theme":en,"data-hsk-layout":ia.wide?"wide":"bubbles","data-hsk-theming":eh?"":void 0,style:{...cp,...n?{background:n}:{},...f?{"--hsk-ox":`${f.x}px`,"--hsk-oy":`${f.y}px`}:{},...rh},children:Qr("div",{ref:aa,className:se("hsk-cb-panel",l.panel),dir:ee?"rtl":"ltr",lang:ve||void 0,"data-script":Se?"nonlatin":"latin","data-host-font":Ne?"covers":"gap","data-nastaliq":Ie?.family==="Noto Nastaliq Urdu"||k?.toLowerCase()==="urdu"||k?.toLowerCase()==="ur"||k==="\u0627\u0631\u062F\u0648"?"true":void 0,style:fe?{"--hsk-font":fe}:void 0,onClick:g=>{g.stopPropagation();let B=g.target;if(B.tagName==="IMG"&&(B.classList.contains("hsk-markdown-img")||B.classList.contains("hsk-cb-user-img-thumb"))){let me=B.src;me&&Nt(me)}},children:[Ve(Jn,{src:Xe?.src,images:Xe?.images,initialIndex:Xe?.initialIndex,title:Xe?.title,onClose:()=>dt(null)}),Ot&&Ve("div",{className:"hsk-markup-overlay",children:Ve(rc,{src:Ot,t:Te,onCancel:()=>it(null),onSend:(g,B,me,Le)=>{it(null),vr(B,[{type:"image",data:g,annotated:!0,marks:me,instructed:!0,preview:Le}])}})}),Qr("div",{className:"hsk-cb-main",children:[Ve(Ca,{seed:C?.api?.siteId??"",theme:en,dir:ee?"rtl":"ltr",waitForContent:!0}),Ve(tl,{layoutControl:Xs?Ve(as,{wide:ia.wide,onToggle:Gs,emphasized:Os}):void 0,title:e,logo:r,hasMessages:E.length>0,avatarState:M?"speaking":L?"thinking":"idle",unread:jh,awayFromBottom:Wh,themeMenuOpen:Dt,themeMenuClosing:Nn,themeDiscovery:Ds,onThemeMenuReady:Bh,onThemeMenuClosed:sa,isNarrow:gr,currentTheme:Yt,onJumpToLatest:Kh,onReset:Jh,onClose:ca,onToggleThemeMenu:()=>Dt?so():tn(!0),onSelectTheme:g=>{Es(g,!0)},themeAttr:en}),Ve("div",{className:"hsk-cb-msgs",ref:Ir,children:nr.length===0?Ve(cl,{theme:en,inOnboarding:we,justCompleted:oe,onboardingMood:Za,awaitingLang:ue,awaitingName:K,awaitingEntityLang:ke,awaitingConsent:ye,termsAgreed:Ct,shopperLanguage:k,pendingLanguage:Q,shopperName:y,entityLangPref:ne,chromeReady:ce&&_,activeChips:Ja,speechLang:ve,t:Te,tNode:he,chooseLanguage:zr,langSwitching:ae,isLangPreparing:Z,chooseEntityLang:xr,agreeTerms:Xa,handleSend:vr}):Ve(Pl,{afterReply:qs===null?void 0:{index:qs,node:Ve(Ql,{onOpenDock:Qh})},doodleTheme:en,displayMessages:nr,messageRefs:Ws,isNarrow:gr,loading:L,streaming:uo,sources:x,referencedIds:X,discussedSources:Fe,lastIntent:S,lastAction:H,stopped:de,interrupted:te,halted:la,haltedEmpty:pp,error:w,errorCode:D,keyPhase:ch,keyInput:sh,setKeyInput:ih,mintedKey:lh,setMintedKey:hh,setMintedPub:ph,minting:mh,copied:dh,keyCountdown:uh,handleUseExistingKey:fh,handleCreateKey:kh,copyValue:bh,queuedMessage:I,sendQueuedNow:q,setLightboxSrc:Nt,setMarkupSrc:it,handleSend:vr,handleSourceClick:Zh,onRetry:ra,onEdit:ah,onLongPress:Xh,retrying:nh,continueGenerating:W,t:Te,spacerRef:Oh,vizState:mt,setVizState:$e,messages:E})}),!hr&&Ve("div",{className:se("hsk-cb-composer-wrapper",Jr&&"hsk-composer-exit-up",Pe&&"hsk-composer-reveal"),children:Ve(Hl,{notice:N&&Qr("div",{className:"hsk-cb-leave",role:"alertdialog",ref:A,children:[Ve("span",{children:Te("leaveHumanWarning")}),Ve("button",{type:"button",className:"hsk-cb-leave-btn",onClick:()=>T(null),children:Te("leaveHumanStay")}),Ve("button",{type:"button",className:"hsk-cb-leave-btn hsk-cb-leave-btn--end",onClick:()=>{let g=N;T(null),g==="reset"?lo(!0):co(!0)},children:Te("leaveHumanConfirm")})]}),gooId:qh,input:Ge,setInput:Ae,showKikuPicker:yt,setShowKikuPicker:wt,showAtPicker:Tt,setShowAtPicker:$t,captureAllowed:Oe,discussedSources:Fe,handleSelectExtension:ep,handleKikuCapture:vh,handleKikuCaptureAll:yh,handleKikuViewHistory:wh,handleKikuDelete:Ch,attachments:qt,removeAttachment:sp,chromeLoading:!ce,imageInputRef:Ye,handleImageFiles:op,enableVision:d&&!we,enableVoice:h&&!we,canConverse:Nh,startVoice:Ih,inputLocked:pe,voiceBlocked:Lh,textareaRef:dr,classNames:l,handleInput:ap,handleKeyDown:tp,voice:Ph,voicePhase:Ps,activePlaceholder:Qa,loading:L,streaming:M,stop:J,handleSend:vr,voiceError:to,setVoiceError:_s,langSwitching:ae||Z,t:Te,onOpenMimi:C?.getKikuKey?.()?gh:void 0})})]}),na!=="converse"&&Ve(Vl,{items:hp,activeIdx:Gh,progress:Vh,onJump:Yh,side:ee?"left":"right"}),Qr("div",{className:se("hsk-cb-kiku-id-rail",ee?"hsk-cb-kiku-id-rail--right":"hsk-cb-kiku-id-rail--left",Dt&&!Nn&&"is-theme-open"),children:[Ve("div",{className:"hsk-cb-dock-frost","aria-hidden":"true"}),Ve(Aa,{}),Qr("div",{className:se("hsk-cb-theme-squircle-wrap",Dt&&!Nn&&"is-open"),ref:oa,children:[Ve("div",{className:"hsk-cb-theme-2x2-grid",role:"dialog","aria-label":"Theme selector",ref:g=>{g&&(g.inert=!Dt||Nn)},children:cn.map(({id:g,label:B,Icon:me})=>Qr("button",{type:"button",className:se("hsk-cb-theme-grid-item",($h??Yt)===g&&"is-active"),onClick:Le=>{Le.stopPropagation(),Es(g,!0)},children:[Ve(me,{}),Ve("span",{children:B})]},g))}),Qr("button",{type:"button",className:"hsk-cb-theme-squircle-trigger",onClick:()=>{if(Dt){sa();return}ao(Yt),tn(!0)},"aria-label":"Themes","aria-expanded":Dt,children:[Ve("span",{className:"hsk-cb-theme-trigger-icon",children:ta.createElement(zo(Yt).Icon)}),Ve("span",{className:"hsk-cb-theme-trigger-label",children:zo(Yt).label})]})]}),!gr&&Dt&&Ds&&Ve(_a,{closing:Nn}),Xs&&Ve(as,{wide:ia.wide,onToggle:Gs,emphasized:Os})]}),na==="converse"&&Ve(Ol,{siteId:C?.api?.siteId??"",themeAttr:en,stopVoice:Ah,chooseVoice:zh,liveVoiceName:Eh,voiceSecondsLeft:Rh,voiceConnecting:Sh,voicePhase:Ps,live:Fs,earlier:_h,newVoiceChat:Fh,voiceMuted:Mh,setVoiceMuted:Th,voiceError:to,attachPhoto:Dh,onSelectSource:g=>{i?.(g),Fs.ask(Te("cardClickQuery",{name:g.name,details:mo(Kt(g,b))}))},t:Te}),En&&Ve(Yl,{msg:En.msg,rect:En.rect,anchorEl:En.el,containerEl:aa.current,scrollEl:Ir.current,containerRect:aa.current?.getBoundingClientRect(),isUser:En.isUser,isRTL:ee,canRetry:!L&&!M,onPin:xh,onRetry:ra,onCopy:async g=>{if(!g)return!1;try{return await navigator.clipboard.writeText(g),!0}catch{}try{let B=document.createElement("textarea");B.value=g,B.setAttribute("readonly",""),B.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild(B),B.select(),B.setSelectionRange(0,g.length);let me=document.execCommand("copy");return document.body.removeChild(B),me}catch{return!1}},onClose:()=>As(null),t:Te})]})})})}import{Fragment as Zl,jsx as Ss,jsxs as Ms}from"react/jsx-runtime";function _m({label:e="Ask AI",children:r,icon:t,title:n,logo:a,placeholder:o,backdropColor:i,backdropBlur:c,className:s,onSelectSource:l,chips:h,theme:p,classNames:d={},enableVoice:u=!1,voiceLang:f,ttsVoice:C,enableVision:b=!1}){let E=Pm(),[x,L]=Ya(!1),[M,w]=Ya(!1),[D,H]=Ya(null),[S,O]=Ya(0);Jl(()=>{if(x){O(0);return}let te=!0;return E?.api?.unreadFromTeam?.().then(W=>{te&&O(W)}).catch(()=>{}),()=>{te=!1}},[x,E]);let v=Cs(()=>{fo();try{wi(E,E?.getShopperLanguage?.()??"",Pt),E?.api?.widgetSettings?.().then(te=>{te?.detectedLanguage&&te.detectedLanguage.toLowerCase()!=="english"&&Co(E,te.detectedLanguage,Pt)}).catch(()=>{})}catch{}},[E]),I=Im(null),q=Cs(()=>{let te=I.current?.getBoundingClientRect();H(te?{x:te.left+te.width/2,y:te.top+te.height/2}:null),L(!0),v();try{yr()}catch{}},[v]);Jl(()=>{if(w(!0),v(),typeof window<"u"&&!window.__akropolys_nav_patched){window.__akropolys_nav_patched=!0;let W=window.location.pathname,le=window.history.pushState,X=window.history.replaceState;window.history.pushState=function(...F){le.apply(this,F),window.location.pathname!==W&&(W=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))},window.history.replaceState=function(...F){X.apply(this,F),window.location.pathname!==W&&(W=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))}}let te=()=>{L(!1)};return window.addEventListener("popstate",te),window.addEventListener("akropolys:navigation",te),()=>{window.removeEventListener("popstate",te),window.removeEventListener("akropolys:navigation",te)}},[v]);let P=Cs(()=>{L(!1),requestAnimationFrame(()=>I.current?.focus())},[]),{themeAttr:J,vars:de}=ua(p);return ma(p),Ms(Zl,{children:[Ms("button",{ref:I,className:se("hsk-cb-btn",d.button,s),onClick:q,onPointerEnter:v,onPointerDown:v,style:de,"data-hsk-theme":J,"aria-label":"Open AI chat","aria-haspopup":"dialog","aria-expanded":x,children:[r!==void 0?r:Ms(Zl,{children:[t?Ss("span",{className:"hsk-cb-btn-icon",style:{display:"flex",alignItems:"center"},children:t}):null,e]}),S>0&&Ss("span",{className:"hsk-cb-btn-badge","aria-label":`${S} new replies`,children:S})]}),x&&M&&Am(Ss(ws,{title:n,logo:a,placeholder:o,backdropColor:i,backdropBlur:c,origin:D,onClose:P,onSelectSource:l,chips:h??An,theme:p,classNames:d,enableVoice:u,voiceLang:f,enableVision:b,ttsVoice:C}),fo()??document.body)]})}export{_m as KikuButton,fp as SearchBar};
|
|
39
39
|
//# sourceMappingURL=index.mjs.map
|